@dylanpiercey/work 0.0.44 → 0.0.45
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/dist/{_B6irorCp.js → _BlvusYIA.js} +2 -2
- package/dist/{_Tcoxq_nF.js → _DncwyiYL.js} +17 -17
- package/dist/{_Cja4R2gP.js → _P9IsUQm2.js} +58 -59
- package/dist/_kABYZA6_.js +2 -0
- package/dist/index.mjs +398 -867
- package/dist/public/assets/{_D0en76Ej.js → _0jDMZ5Nf.js} +1 -1
- package/dist/public/assets/_0jDMZ5Nf.js.br +0 -0
- package/dist/public/assets/{_dAPOyRJr.js → _2JIp-AkL.js} +1 -1
- package/dist/public/assets/_2JIp-AkL.js.br +0 -0
- package/dist/public/assets/{_DAVDeGoR.js → _6t6kjpdU.js} +1 -1
- package/dist/public/assets/_6t6kjpdU.js.br +0 -0
- package/dist/public/assets/{_D_EzfDaC.js → _7WXyLEhK.js} +1 -1
- package/dist/public/assets/_7WXyLEhK.js.br +0 -0
- package/dist/public/assets/{_CIVAj2XC.js → _B-HE1A0L.js} +1 -1
- package/dist/public/assets/_B-HE1A0L.js.br +0 -0
- package/dist/public/assets/{_D5BjTqU42.js → _B-tmCiTe2.js} +1 -1
- package/dist/public/assets/_B-tmCiTe2.js.br +0 -0
- package/dist/public/assets/{_CcjW-l5T.js → _B1lH2KuX.js} +1 -1
- package/dist/public/assets/_B1lH2KuX.js.br +0 -0
- package/dist/public/assets/{_DJAJCWgm.js → _B2jdNsMP.js} +5 -5
- package/dist/public/assets/_B2jdNsMP.js.br +0 -0
- package/dist/public/assets/{_Bd7b48iJ.js → _B6bkX_xw.js} +1 -1
- package/dist/public/assets/_B6bkX_xw.js.br +0 -0
- package/dist/public/assets/{_FT8jstIj.js → _B7_IQvxy.js} +1 -1
- package/dist/public/assets/_B7_IQvxy.js.br +0 -0
- package/dist/public/assets/{_ePAxCx7r.js → _BBnPf4LB.js} +1 -1
- package/dist/public/assets/_BBnPf4LB.js.br +0 -0
- package/dist/public/assets/{_BPvgcQ_P.js → _BEn7bsbI.js} +1 -1
- package/dist/public/assets/_BEn7bsbI.js.br +0 -0
- package/dist/public/assets/{_Bnp1UtCp2.js → _BKPFmzRa2.js} +1 -1
- package/dist/public/assets/_BKPFmzRa2.js.br +0 -0
- package/dist/public/assets/{_CJ4aiC36.js → _BKSy9tfl.js} +1 -1
- package/dist/public/assets/_BKSy9tfl.js.br +0 -0
- package/dist/public/assets/{_Z_Oh39Jb.js → _BPhrpOAd.js} +1 -1
- package/dist/public/assets/_BPhrpOAd.js.br +0 -0
- package/dist/public/assets/{_DZtm6WF2.js → _BQKEgF_-.js} +1 -1
- package/dist/public/assets/_BQKEgF_-.js.br +0 -0
- package/dist/public/assets/{_DA_t7MOs2.js → _BVVf3KNx2.js} +1 -1
- package/dist/public/assets/_BVVf3KNx2.js.br +0 -0
- package/dist/public/assets/{_D0ljGGvp2.js → _BdE0YzeT2.js} +1 -1
- package/dist/public/assets/_BdE0YzeT2.js.br +0 -0
- package/dist/public/assets/{_BCTR0wV0.js → _BeS7I1tE.js} +1 -1
- package/dist/public/assets/_BeS7I1tE.js.br +0 -0
- package/dist/public/assets/{_DtMzVsHW2.js → _Bj8eqKyf2.js} +1 -1
- package/dist/public/assets/_Bj8eqKyf2.js.br +0 -0
- package/dist/public/assets/{_DvsUo16D2.js → _BmpuJc0U2.js} +1 -1
- package/dist/public/assets/_BmpuJc0U2.js.br +0 -0
- package/dist/public/assets/{_C2OfA6BZ.js → _BrNJO7NC.js} +1 -1
- package/dist/public/assets/_BrNJO7NC.js.br +0 -0
- package/dist/public/assets/{_BA7PhURg.js → _BsDGIBWi.js} +1 -1
- package/dist/public/assets/_BsDGIBWi.js.br +0 -0
- package/dist/public/assets/{_BBXJK7fW.js → _BszYFXns.js} +1 -1
- package/dist/public/assets/_BszYFXns.js.br +0 -0
- package/dist/public/assets/{_DbJRI9_H.js → _C-3_S2jT.js} +1 -1
- package/dist/public/assets/_C-3_S2jT.js.br +0 -0
- package/dist/public/assets/{_DucRMQLL2.js → _C2a60ukk2.js} +1 -1
- package/dist/public/assets/_C2a60ukk2.js.br +0 -0
- package/dist/public/assets/{_CasdikBZ2.js → _C5qWivO82.js} +1 -1
- package/dist/public/assets/_C5qWivO82.js.br +0 -0
- package/dist/public/assets/{_CL84pok8.js → _C7E2sftJ.js} +1 -1
- package/dist/public/assets/_C7E2sftJ.js.br +0 -0
- package/dist/public/assets/{_Tou5xDB12.js → _C9jJ-zAu2.js} +1 -1
- package/dist/public/assets/_C9jJ-zAu2.js.br +0 -0
- package/dist/public/assets/{_DbnzsP9f.js → _CBWyaxNg.js} +1 -1
- package/dist/public/assets/_CBWyaxNg.js.br +0 -0
- package/dist/public/assets/{_CjrYQPNO.js → _CCxiHsg1.js} +1 -1
- package/dist/public/assets/_CCxiHsg1.js.br +0 -0
- package/dist/public/assets/{_BnN7B1Mb.js → _CMXeuTU3.js} +1 -1
- package/dist/public/assets/_CMXeuTU3.js.br +0 -0
- package/dist/public/assets/{_DoaHBjpa.js → _COItZVVh.js} +1 -1
- package/dist/public/assets/_COItZVVh.js.br +0 -0
- package/dist/public/assets/{_DaTkOx5R.js → _CQjfWgLv.js} +1 -1
- package/dist/public/assets/_CQjfWgLv.js.br +0 -0
- package/dist/public/assets/{_2By3R--W2.js → _CUudFj1k2.js} +1 -1
- package/dist/public/assets/_CUudFj1k2.js.br +0 -0
- package/dist/public/assets/{__UTjMwX3.js → _CVRoyRZW.js} +1 -1
- package/dist/public/assets/_CVRoyRZW.js.br +0 -0
- package/dist/public/assets/{_CQRG1j1X.js → _CVpg0dqw.js} +1 -1
- package/dist/public/assets/_CVpg0dqw.js.br +0 -0
- package/dist/public/assets/{__OpDUxvR.js → _CWcbEhLf.js} +1 -1
- package/dist/public/assets/_CWcbEhLf.js.br +0 -0
- package/dist/public/assets/{_jDukN6_E2.js → _ChdHZg3q2.js} +1 -1
- package/dist/public/assets/_ChdHZg3q2.js.br +0 -0
- package/dist/public/assets/{_e1lYvQAo2.js → _Csumg8kE2.js} +1 -1
- package/dist/public/assets/_Csumg8kE2.js.br +0 -0
- package/dist/public/assets/{_BRP9V2vY.js → _Cu2zWIrA.js} +1 -1
- package/dist/public/assets/_Cu2zWIrA.js.br +0 -0
- package/dist/public/assets/{_C1uG69PI.js → _CvB8TafR.js} +1 -1
- package/dist/public/assets/_CvB8TafR.js.br +0 -0
- package/dist/public/assets/{_ZLwlH_XK.js → _CxfUzQkI.js} +1 -1
- package/dist/public/assets/_CxfUzQkI.js.br +0 -0
- package/dist/public/assets/{_DIezl6EI.js → _D5wyt0NZ.js} +1 -1
- package/dist/public/assets/_D5wyt0NZ.js.br +0 -0
- package/dist/public/assets/{_BqdeosKn.js → _DAES5BQ6.js} +1 -1
- package/dist/public/assets/_DAES5BQ6.js.br +0 -0
- package/dist/public/assets/{_jmw7zbFI2.js → _DAp7RKbE2.js} +1 -1
- package/dist/public/assets/_DAp7RKbE2.js.br +0 -0
- package/dist/public/assets/{_BNDbFEJj.js → _DJIoEU4l.js} +1 -1
- package/dist/public/assets/_DJIoEU4l.js.br +0 -0
- package/dist/public/assets/{_CQ3pD5r12.js → _DQZT5aYv2.js} +1 -1
- package/dist/public/assets/_DQZT5aYv2.js.br +0 -0
- package/dist/public/assets/{_Dkmb-8CU.js → _DSfzkPVh.js} +1 -1
- package/dist/public/assets/_DSfzkPVh.js.br +0 -0
- package/dist/public/assets/{_D861FlLr2.js → _DSl3gnKp2.js} +1 -1
- package/dist/public/assets/{_BBdsdafe2.js → _DUwDVnyb2.js} +1 -1
- package/dist/public/assets/_DUwDVnyb2.js.br +0 -0
- package/dist/public/assets/{_DCD2JMxh2.js → _DYgx29Kq2.js} +1 -1
- package/dist/public/assets/{_DS7FwF-J.js → _DbeeD9R1.js} +1 -1
- package/dist/public/assets/_DbeeD9R1.js.br +0 -0
- package/dist/public/assets/{_CqmPWoAp2.js → _DdvD3pSx2.js} +1 -1
- package/dist/public/assets/_DdvD3pSx2.js.br +0 -0
- package/dist/public/assets/{_D0PcbpPB.js → _DlEZP4B2.js} +1 -1
- package/dist/public/assets/_DlEZP4B2.js.br +0 -0
- package/dist/public/assets/{_C9UHqcOT2.js → _DmkxrcNE2.js} +1 -1
- package/dist/public/assets/_DmkxrcNE2.js.br +0 -0
- package/dist/public/assets/{_DY4GR3La.js → _Dp6GcCez.js} +1 -1
- package/dist/public/assets/_Dp6GcCez.js.br +0 -0
- package/dist/public/assets/{_E5DvansN.js → _Drob8ol2.js} +1 -1
- package/dist/public/assets/_Drob8ol2.js.br +0 -0
- package/dist/public/assets/{_4aAs0pvU.js → _Fd6qP3go.js} +1 -1
- package/dist/public/assets/_Fd6qP3go.js.br +0 -0
- package/dist/public/assets/{_U0PVI62V.js → _GX4ApnkB.js} +1 -1
- package/dist/public/assets/_GX4ApnkB.js.br +0 -0
- package/dist/public/assets/{_BAQFHOGb.js → _HmwD_O7C.js} +1 -1
- package/dist/public/assets/_HmwD_O7C.js.br +0 -0
- package/dist/public/assets/{_BdiO50aC2.js → _IiVyZhFQ2.js} +1 -1
- package/dist/public/assets/_IiVyZhFQ2.js.br +0 -0
- package/dist/public/assets/{_BaIOx6992.js → _M4_M1GCx2.js} +1 -1
- package/dist/public/assets/_M4_M1GCx2.js.br +0 -0
- package/dist/public/assets/{_D2sFNldb.js → _MbiYJ36s.js} +1 -1
- package/dist/public/assets/_MbiYJ36s.js.br +0 -0
- package/dist/public/assets/{_BBEMecyM2.js → _NSw61-q82.js} +1 -1
- package/dist/public/assets/_NSw61-q82.js.br +0 -0
- package/dist/public/assets/{_BRV26aAF.js → _QBVNsQ8h.js} +1 -1
- package/dist/public/assets/_QBVNsQ8h.js.br +0 -0
- package/dist/public/assets/{_Dyejz2MQ.js → _RcdEaPTX.js} +1 -1
- package/dist/public/assets/_RcdEaPTX.js.br +0 -0
- package/dist/public/assets/{_BPzHoTu3.js → _Ty6Zi_p6.js} +1 -1
- package/dist/public/assets/_Ty6Zi_p6.js.br +0 -0
- package/dist/public/assets/{_BculF-XV.js → _WSiIjl8k.js} +1 -1
- package/dist/public/assets/{_DbbVTGR82.js → _c4j42n9F2.js} +1 -1
- package/dist/public/assets/_c4j42n9F2.js.br +0 -0
- package/dist/public/assets/{_CAP_5S-t.js → _cRSAYsIy.js} +1 -1
- package/dist/public/assets/_cRSAYsIy.js.br +0 -0
- package/dist/public/assets/{_BkeFq1dG2.js → _gqKnRhHm2.js} +1 -1
- package/dist/public/assets/_gqKnRhHm2.js.br +0 -0
- package/dist/public/assets/{_Bt3B1aEu2.js → _i3m2va9y2.js} +1 -1
- package/dist/public/assets/_i3m2va9y2.js.br +0 -0
- package/dist/public/assets/{_CMmwGR_Q.js → _rShrll8V.js} +1 -1
- package/dist/public/assets/_rShrll8V.js.br +0 -0
- package/dist/public/assets/{_BYRkkQxk.js → _wsALS6ya.js} +1 -1
- package/dist/public/assets/_wsALS6ya.js.br +0 -0
- package/dist/public/assets/{_B7T2AE8L.js → _wx4NAfvC.js} +1 -1
- package/dist/public/assets/_wx4NAfvC.js.br +0 -0
- package/dist/public/assets/{diff-view-sXFdzozK.css → diff-view-l7q43Ong.css} +1 -1
- package/dist/public/assets/diff-view-l7q43Ong.css.br +0 -0
- package/dist/public/assets/{index-DKRkgwLo.js → index-BXWsr0DP.js} +4 -4
- package/dist/public/assets/index-BXWsr0DP.js.br +0 -0
- package/dist/public/assets/index-Du7Hgz2d.css +1 -0
- package/dist/public/assets/index-Du7Hgz2d.css.br +0 -0
- package/dist/public/assets/{preload-helper-Cioq5Qre.css → preload-helper-Di0vWBYv.css} +1 -1
- package/dist/public/assets/preload-helper-Di0vWBYv.css.br +0 -0
- package/package.json +1 -1
- package/scripts/migrate.mjs +93 -0
- package/dist/_L15vvgS1.js +0 -2
- package/dist/public/assets/_2By3R--W2.js.br +0 -0
- package/dist/public/assets/_4aAs0pvU.js.br +0 -0
- package/dist/public/assets/_B7T2AE8L.js.br +0 -0
- package/dist/public/assets/_BA7PhURg.js.br +0 -0
- package/dist/public/assets/_BAQFHOGb.js.br +0 -0
- package/dist/public/assets/_BBEMecyM2.js.br +0 -0
- package/dist/public/assets/_BBXJK7fW.js.br +0 -0
- package/dist/public/assets/_BBdsdafe2.js.br +0 -0
- package/dist/public/assets/_BCTR0wV0.js.br +0 -0
- package/dist/public/assets/_BNDbFEJj.js.br +0 -0
- package/dist/public/assets/_BPvgcQ_P.js.br +0 -0
- package/dist/public/assets/_BPzHoTu3.js.br +0 -0
- package/dist/public/assets/_BRP9V2vY.js.br +0 -0
- package/dist/public/assets/_BRV26aAF.js.br +0 -0
- package/dist/public/assets/_BYRkkQxk.js.br +0 -0
- package/dist/public/assets/_BaIOx6992.js.br +0 -0
- package/dist/public/assets/_Bd7b48iJ.js.br +0 -0
- package/dist/public/assets/_BdiO50aC2.js.br +0 -0
- package/dist/public/assets/_BkeFq1dG2.js.br +0 -0
- package/dist/public/assets/_BnN7B1Mb.js.br +0 -0
- package/dist/public/assets/_Bnp1UtCp2.js.br +0 -0
- package/dist/public/assets/_BqdeosKn.js.br +0 -0
- package/dist/public/assets/_Bt3B1aEu2.js.br +0 -0
- package/dist/public/assets/_C1uG69PI.js.br +0 -0
- package/dist/public/assets/_C2OfA6BZ.js.br +0 -0
- package/dist/public/assets/_C9UHqcOT2.js.br +0 -0
- package/dist/public/assets/_CAP_5S-t.js.br +0 -0
- package/dist/public/assets/_CIVAj2XC.js.br +0 -0
- package/dist/public/assets/_CJ4aiC36.js.br +0 -0
- package/dist/public/assets/_CL84pok8.js.br +0 -0
- package/dist/public/assets/_CMmwGR_Q.js.br +0 -0
- package/dist/public/assets/_CQ3pD5r12.js.br +0 -0
- package/dist/public/assets/_CQRG1j1X.js.br +0 -0
- package/dist/public/assets/_CasdikBZ2.js.br +0 -0
- package/dist/public/assets/_CcjW-l5T.js.br +0 -0
- package/dist/public/assets/_CjrYQPNO.js.br +0 -0
- package/dist/public/assets/_CqmPWoAp2.js.br +0 -0
- package/dist/public/assets/_D0PcbpPB.js.br +0 -0
- package/dist/public/assets/_D0en76Ej.js.br +0 -0
- package/dist/public/assets/_D0ljGGvp2.js.br +0 -0
- package/dist/public/assets/_D2sFNldb.js.br +0 -0
- package/dist/public/assets/_D5BjTqU42.js.br +0 -0
- package/dist/public/assets/_DAVDeGoR.js.br +0 -0
- package/dist/public/assets/_DA_t7MOs2.js.br +0 -0
- package/dist/public/assets/_DIezl6EI.js.br +0 -0
- package/dist/public/assets/_DJAJCWgm.js.br +0 -0
- package/dist/public/assets/_DS7FwF-J.js.br +0 -0
- package/dist/public/assets/_DY4GR3La.js.br +0 -0
- package/dist/public/assets/_DZtm6WF2.js.br +0 -0
- package/dist/public/assets/_D_EzfDaC.js.br +0 -0
- package/dist/public/assets/_DaTkOx5R.js.br +0 -0
- package/dist/public/assets/_DbJRI9_H.js.br +0 -0
- package/dist/public/assets/_DbbVTGR82.js.br +0 -0
- package/dist/public/assets/_DbnzsP9f.js.br +0 -0
- package/dist/public/assets/_Dkmb-8CU.js.br +0 -0
- package/dist/public/assets/_DoaHBjpa.js.br +0 -0
- package/dist/public/assets/_DtMzVsHW2.js.br +0 -0
- package/dist/public/assets/_DucRMQLL2.js.br +0 -0
- package/dist/public/assets/_DvsUo16D2.js.br +0 -0
- package/dist/public/assets/_Dyejz2MQ.js.br +0 -0
- package/dist/public/assets/_E5DvansN.js.br +0 -0
- package/dist/public/assets/_FT8jstIj.js.br +0 -0
- package/dist/public/assets/_Tou5xDB12.js.br +0 -0
- package/dist/public/assets/_U0PVI62V.js.br +0 -0
- package/dist/public/assets/_ZLwlH_XK.js.br +0 -0
- package/dist/public/assets/_Z_Oh39Jb.js.br +0 -0
- package/dist/public/assets/__OpDUxvR.js.br +0 -0
- package/dist/public/assets/__UTjMwX3.js.br +0 -0
- package/dist/public/assets/_dAPOyRJr.js.br +0 -0
- package/dist/public/assets/_e1lYvQAo2.js.br +0 -0
- package/dist/public/assets/_ePAxCx7r.js.br +0 -0
- package/dist/public/assets/_jDukN6_E2.js.br +0 -0
- package/dist/public/assets/_jmw7zbFI2.js.br +0 -0
- package/dist/public/assets/diff-view-sXFdzozK.css.br +0 -0
- package/dist/public/assets/index-DKRkgwLo.js.br +0 -0
- package/dist/public/assets/index-c70b3ZMB.css +0 -1
- package/dist/public/assets/index-c70b3ZMB.css.br +0 -0
- package/dist/public/assets/preload-helper-Cioq5Qre.css.br +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/
|
|
2
|
-
import{$ as e,A as t,At as n,B as r,Bt as i,C as a,Ct as o,D as s,Dt as c,E as l,Et as u,F as d,Ft as f,Gt as p,Ht as m,I as h,It as g,J as _,Jt as v,L as y,Lt as b,M as ee,Mt as x,N as te,Nt as S,O as ne,Ot as C,P as w,Pt as re,Q as T,R as ie,Rt as E,S as ae,St as D,T as O,Tt as k,Ut as oe,V as se,W as ce,X as le,Y as ue,Z as de,Zt as fe,_ as pe,_t as me,a as he,at as A,b as j,bt as ge,c as _e,ct as ve,d as ye,dt as be,et as M,f as xe,ft as Se,g as Ce,h as we,ht as N,i as Te,j as Ee,jt as P,k as De,kt as Oe,l as ke,lt as Ae,m as je,mt as F,n as Me,nt as Ne,o as Pe,ot as I,p as Fe,pt as L,q as Ie,qt as Le,r as Re,s as ze,t as Be,tt as Ve,u as He,ut as Ue,v as We,vt as Ge,w as Ke,wt as qe,x as Je,xt as R,y as Ye,zt as Xe}from"./_CIVAj2XC.js";var Ze=null,Qe=null,$e=null,et=new EventTarget;function tt(e,t){et.addEventListener(`intent`,e,{signal:t})}function nt(e,t){Ze={workspaceId:e,pr:t},et.dispatchEvent(new Event(`intent`))}function rt(e){if(Ze?.workspaceId!==e)return!1;let t=Ze.pr;return Ze=null,{pr:t}}function it(e,t){Qe=[e,t],et.dispatchEvent(new Event(`intent`))}function at(e){if(Qe?.[0]!==e)return null;let t=Qe[1];return Qe=null,t}function ot(e){$e=e,et.dispatchEvent(new Event(`intent`))}function st(e){return $e===e&&($e=null,!0)}function ct(e){let t=!1,n=!1;return async()=>{if(t){n=!0;return}t=!0;try{do n=!1,await e();while(n)}finally{t=!1}}}function lt(){return typeof window<`u`&&`serviceWorker`in navigator&&`PushManager`in window}async function ut(){return lt()?(await mt()).pushManager.getSubscription():null}async function dt(){if(await Notification.requestPermission()!==`granted`)return!1;let e=await mt(),t=await e.pushManager.getSubscription();if(!t){let{publicKey:n}=await M(`/api/push`);t=await e.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:ht(n)})}return await M(`/api/push`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(t.toJSON())}),!0}async function ft(){let e=await ut();e&&(await M(`/api/push?endpoint=${encodeURIComponent(e.endpoint)}`,{method:`DELETE`}).catch(()=>{}),await e.unsubscribe())}function pt(e){let t=()=>{document.visibilityState===`visible`&&navigator.clearAppBadge?.().catch(()=>{})};t(),document.addEventListener(`visibilitychange`,t,{signal:e})}async function mt(){return await navigator.serviceWorker.getRegistration()??navigator.serviceWorker.register(`/sw.js`)}function ht(e){let t=e.padEnd(e.length+(4-e.length%4)%4,`=`),n=atob(t.replace(/-/g,`+`).replace(/_/g,`/`));return Uint8Array.from(n,e=>e.charCodeAt(0))}function gt(e){return e?.working?`working`:e?.waiting?`waiting`:e?.agents?`idle`:`off`}function _t(e){return e?.phase===`working`?`working`:e?.phase===`waiting`?`waiting`:e?.alive?`idle`:`off`}var vt={claude:`claude`,codex:`codex`,grok:`grok`,copilot:`copilot`,"cursor-agent":`cursor`};function yt(e){if(e.agent!==`shell`)return e.agent;let t=e.state?.command?.trim();return t&&vt[t]||e.agent}var bt=a,xt=(e=>`/${e}&`)(Ke);function St(e){Je(e.a,`M18 21C19.1046 21 20 20.1046 20 19C20 17.8954 19.1046 17 18 17C16.8954 17 16 17.8954 16 19C16 20.1046 16.8954 21 18 21Z M6 7C7.10457 7 8 6.10457 8 5C8 3.89543 7.10457 3 6 3C4.89543 3 4 3.89543 4 5C4 6.10457 4.89543 7 6 7Z M18 17V7C18 7 18 5 16 5H13 M6 7V17C6 17 6 19 8 19H11 M15.0005 7.50012L12.5005 5.00012L15.0005 2.50012 M8.5 16.5L11 19L8.5 21.5`)}var Ct=(e,t)=>ae(e.a,t),wt=(e,t)=>j(e.a,t),Tt=a,Et=(e=>`/${e}&`)(Ke);function Dt(e){Je(e.a,`M12 15C13.6569 15 15 13.6569 15 12C15 10.3431 13.6569 9 12 9C10.3431 9 9 10.3431 9 12C9 13.6569 10.3431 15 12 15Z M19.6224 10.3954L18.5247 7.7448L20 6L18 4L16.2647 5.48295L13.5578 4.36974L12.9353 2H10.981L10.3491 4.40113L7.70441 5.51596L6 4L4 6L5.45337 7.78885L4.3725 10.4463L2 11V13L4.40111 13.6555L5.51575 16.2997L4 18L6 20L7.79116 18.5403L10.397 19.6123L11 22H13L13.6045 19.6132L16.2551 18.5155C16.6969 18.8313 18 20 18 20L20 18L18.5159 16.2494L19.6139 13.598L21.9999 12.9772L22 11L19.6224 10.3954Z`)}var Ot=(e,t)=>ae(e.a,t),kt=(e,t)=>j(e.a,t),At=a,jt=(e=>`/${e}&`)(Ke);function Mt(e){Je(e.a,`M6 12H12M18 12H12M12 12V6M12 12V18`)}var Nt=(e,t)=>ae(e.a,t),Pt=(e,t)=>j(e.a,t),Ft=`<!><!><!>`,It={claude:`M4.709 15.955l4.72-2.647.08-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0 11.784l.055-.352.48-.321.686.06 1.52.103 2.278.158 1.652.097 2.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686 1.908 1.476 2.491 1.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97 2.97 0 01-.104-.729L6.283.134 6.696 0l.996.134.42.364.62 1.414 1.002 2.229 1.555 3.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.376-.91.747-.492.584.28.48.685-.067.444-.286 1.851-.559 2.903-.364 1.942h.212l.243-.242.985-1.306 1.652-2.064.73-.82.85-.904.547-.431h1.033l.76 1.129-.34 1.166-1.064 1.347-.881 1.142-1.264 1.7-.79 1.36.073.11.188-.02 2.856-.606 1.543-.28 1.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.049.061 1.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093 1.068 2.006 1.81 2.509 2.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649 2.345 3.521.122 1.08-.17.353-.608.213-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674 7.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434 1.967-2.18 2.945-1.726 1.845-.414.164-.717-.37.067-.662.401-.589 2.388-3.036 1.44-1.882.93-1.086-.006-.158h-.055L4.132 18.56l-1.13.146-.487-.456.061-.746.231-.243 1.908-1.312-.006.006z`,codex:`M9.205 8.658v-2.26c0-.19.072-.333.238-.428l4.543-2.616c.619-.357 1.356-.523 2.117-.523 2.854 0 4.662 2.212 4.662 4.566 0 .167 0 .357-.024.547l-4.71-2.759a.797.797 0 00-.856 0l-5.97 3.473zm10.609 8.8V12.06c0-.333-.143-.57-.429-.737l-5.97-3.473 1.95-1.118a.433.433 0 01.476 0l4.543 2.617c1.309.76 2.189 2.378 2.189 3.948 0 1.808-1.07 3.473-2.76 4.163zM7.802 12.703l-1.95-1.142c-.167-.095-.239-.238-.239-.428V5.899c0-2.545 1.95-4.472 4.591-4.472 1 0 1.927.333 2.712.928L8.23 5.067c-.285.166-.428.404-.428.737v6.898zM12 15.128l-2.795-1.57v-3.33L12 8.658l2.795 1.57v3.33L12 15.128zm1.796 7.23c-1 0-1.927-.332-2.712-.927l4.686-2.712c.285-.166.428-.404.428-.737v-6.898l1.974 1.142c.167.095.238.238.238.428v5.233c0 2.545-1.974 4.472-4.614 4.472zm-5.637-5.303l-4.544-2.617c-1.308-.761-2.188-2.378-2.188-3.948A4.482 4.482 0 014.21 6.327v5.423c0 .333.143.571.428.738l5.947 3.449-1.95 1.118a.432.432 0 01-.476 0zm-.262 3.9c-2.688 0-4.662-2.021-4.662-4.519 0-.19.024-.38.047-.57l4.686 2.71c.286.167.571.167.856 0l5.97-3.448v2.26c0 .19-.07.333-.237.428l-4.543 2.616c-.619.357-1.356.523-2.117.523zm5.899 2.83a5.947 5.947 0 005.827-4.756C22.287 18.339 24 15.84 24 13.296c0-1.665-.713-3.282-1.998-4.448.119-.5.19-.999.19-1.498 0-3.401-2.759-5.947-5.946-5.947-.642 0-1.26.095-1.88.31A5.962 5.962 0 0010.205 0a5.947 5.947 0 00-5.827 4.757C1.713 5.447 0 7.945 0 10.49c0 1.666.713 3.283 1.998 4.448-.119.5-.19 1-.19 1.499 0 3.401 2.759 5.946 5.946 5.946.642 0 1.26-.095 1.88-.309a5.96 5.96 0 004.162 1.713z`,grok:`M9.27 15.29l7.978-5.897c.391-.29.95-.177 1.137.272.98 2.369.542 5.215-1.41 7.169-1.951 1.954-4.667 2.382-7.149 1.406l-2.711 1.257c3.889 2.661 8.611 2.003 11.562-.953 2.341-2.344 3.066-5.539 2.388-8.42l.006.007c-.983-4.232.242-5.924 2.75-9.383.06-.082.12-.164.179-.248l-3.301 3.305v-.01L9.267 15.292M7.623 16.723c-2.792-2.67-2.31-6.801.071-9.184 1.761-1.763 4.647-2.483 7.166-1.425l2.705-1.25a7.808 7.808 0 00-1.829-1A8.975 8.975 0 005.984 5.83c-2.533 2.536-3.33 6.436-1.962 9.764 1.022 2.487-.653 4.246-2.34 6.022-.599.63-1.199 1.259-1.682 1.925l7.62-6.815`,copilot:`M19.245 5.364c1.322 1.36 1.877 3.216 2.11 5.817.622 0 1.2.135 1.592.654l.73.964c.21.278.323.61.323.955v2.62c0 .339-.173.669-.453.868C20.239 19.602 16.157 21.5 12 21.5c-4.6 0-9.205-2.583-11.547-4.258-.28-.2-.452-.53-.453-.868v-2.62c0-.345.113-.679.321-.956l.73-.963c.392-.517.974-.654 1.593-.654l.029-.297c.25-2.446.81-4.213 2.082-5.52 2.461-2.54 5.71-2.851 7.146-2.864h.198c1.436.013 4.685.323 7.146 2.864zm-7.244 4.328c-.284 0-.613.016-.962.05-.123.447-.305.85-.57 1.108-1.05 1.023-2.316 1.18-2.994 1.18-.638 0-1.306-.13-1.851-.464-.516.165-1.012.403-1.044.996a65.882 65.882 0 00-.063 2.884l-.002.48c-.002.563-.005 1.126-.013 1.69.002.326.204.63.51.765 2.482 1.102 4.83 1.657 6.99 1.657 2.156 0 4.504-.555 6.985-1.657a.854.854 0 00.51-.766c.03-1.682.006-3.372-.076-5.053-.031-.596-.528-.83-1.046-.996-.546.333-1.212.464-1.85.464-.677 0-1.942-.157-2.993-1.18-.266-.258-.447-.661-.57-1.108-.32-.032-.64-.049-.96-.05zm-2.525 4.013c.539 0 .976.426.976.95v1.753c0 .525-.437.95-.976.95a.964.964 0 01-.976-.95v-1.752c0-.525.437-.951.976-.951zm5 0c.539 0 .976.426.976.95v1.753c0 .525-.437.95-.976.95a.964.964 0 01-.976-.95v-1.752c0-.525.437-.951.976-.951zM7.635 5.087c-1.05.102-1.935.438-2.385.906-.975 1.037-.765 3.668-.21 4.224.405.394 1.17.657 1.995.657h.09c.649-.013 1.785-.176 2.73-1.11.435-.41.705-1.433.675-2.47-.03-.834-.27-1.52-.63-1.813-.39-.336-1.275-.482-2.265-.394zm6.465.394c-.36.292-.6.98-.63 1.813-.03 1.037.24 2.06.675 2.47.968.957 2.136 1.104 2.776 1.11h.044c.825 0 1.59-.263 1.995-.657.555-.556.765-3.187-.21-4.224-.45-.468-1.335-.804-2.385-.906-.99-.088-1.875.058-2.265.394zM12 7.615c-.24 0-.525.015-.84.044.03.16.045.336.06.526l-.001.159a2.94 2.94 0 01-.014.25c.225-.022.425-.027.612-.028h.366c.187 0 .387.006.612.028-.015-.146-.015-.277-.015-.409.015-.19.03-.365.06-.526a9.29 9.29 0 00-.84-.044z`,cursor:`M22.106 5.68L12.5.135a.998.998 0 00-.998 0L1.893 5.68a.84.84 0 00-.419.726v11.186c0 .3.16.577.42.727l9.607 5.547a.999.999 0 00.998 0l9.608-5.547a.84.84 0 00.42-.727V6.407a.84.84 0 00-.42-.726zm-.603 1.176L12.228 22.92c-.063.108-.228.064-.228-.061V12.34a.59.59 0 00-.295-.51l-9.11-5.26c-.107-.062-.063-.228.062-.228h18.55c.264 0 .428.286.296.514z`},Lt=c(0,1,e=>ae(e.a,e._.d)),Rt=e=>{Lt._(e),zt._(e),Je(e.a,`M5 7L10 12L5 17 M13 17H20`)},zt=c(0,1,e=>j(e.a,e._.f)),Bt=c(0,0,e=>I(e.a,[`_d`,e._.f])),Vt=e=>{Bt._(e),Ht._(e),Ut._(e)},Ht=c(0,0,e=>{A(e.a,`width`,e._.g),A(e.a,`height`,e._.g)}),Ut=c(0,0,e=>A(e.b,`d`,e._.h)),Wt=N(6,Ht),Gt=N(3,e=>{Wt(e,e.d??15),Lt(e)}),Kt=u(0,`<svg viewBox="0 0 24 24" fill=currentColor fill-rule=evenodd aria-hidden=true><path></path></svg>`,` D `,Vt,a,(e=>`/${e}&`)(Ke),Rt),qt=N(7,e=>{Kt(e,+!e.h),Ut(e)}),Jt=(e,t)=>qt(e,It[t]),Yt=N(5,e=>{Bt(e),zt(e)}),Xt=`<!><!><div data-palette role=dialog aria-label=Workspaces><!><input autofocus placeholder="Jump to workspace…" aria-label="Filter workspaces"><ul></ul><!><div><span></span><span>↑↓ navigate · ↵ open · ⌘1–9 switch · esc close</span><!></div></div>`,Zt=`b%b D%b b b%b Db b%m`,Qt=(e,t)=>{A(e.a,`value`,t),E(e.b,t)},$t=(e,t)=>Qt(e,t[0]),en=e=>I(e.a,`_o`),tn=(e,t)=>E(e.b,t),nn=(e,t)=>tn(e,t[0]?.worktree),rn=e=>I(e.a,`_j`),an=e=>I(e.a,[`_j`,`_9`]),on=c(8,0,e=>{A(e.a,`title`,`${e._.u} open PR${e._.u===1?``:`s`}`),E(e.b,e._.u),E(e.c,e._.u===1?``:`s`)}),sn=e=>{on._(e),I(e.a,[`_j`,`__`])},cn=c(9,0,e=>A(e.a,`title`,e._.r.map(e=>`:${e.port} ${e.cmd}`).join(`
|
|
3
|
-
`))),ln=e=>{cn._(e),un._(e),I(e.a,[`_j`,`__`])},un=c(9,0,e=>E(e.b,e._.s)),dn=x(2,e=>A(e.a,`title`,`${e._.o} running session${e._.o===1?``:`s`}${e._.p?` — ${e._.p} working`:``}${e._.q?` — ${e._.q} waiting on you`:``}`),2),fn=c(7,0,e=>{E(e.b,e._.o),dn(e)}),pn=e=>{fn._(e),mn._(e),hn._(e),I(e.a,[`_j`,`__`])},mn=c(7,0,dn),hn=c(7,0,dn),gn=e=>I(e.a,`_6`),_n=c(1,1,e=>E(e.b,e._.h)),vn=e=>{_n._(e),I(e.a,[`_6`,`_4`])},yn=e=>{I(e.a,`_5`),I(e.b,`_bg`),I(e.c,`_bg`)},bn=x(2,e=>E(e.b,e._.af?`hide archived`:`archived (${e._.ai})`)),xn=c(5,0,bn),Sn=g(`o8`,e=>P(e.a,`click`,function(){ri(e._,!e._.af)})),Cn=e=>{xn._(e),wn._(e),I(e.a,`_bd`),Sn(e)},wn=c(5,0,bn),Tn=c(8,0,e=>Ue(e,`b`,e._.aa?.preferredAgent,Ai(e))),En=g(`o9`,e=>be(e,`b`)),Dn=e=>{Tn._(e),kn._(e),I(e.a,`_n`),I(e.b,`_bh`),En(e)},On=R(1,`<option> </option>`,` D `,0,$t),kn=c(8,0,e=>On(e,[e._.ad,e=>e])),An=g(`o4`,e=>P(e.a,`click`,function(){kr(e._,!1)})),jn=e=>{I(e.a,`_V`),An(e)},Mn=g(`o5`,e=>P(e.a,`click`,function(t,n){n.closest(`[popover]`)?.hidePopover(),e._._._.z(e._._.i,e.e)})),Nn=e=>{I(e.a,`_bN`),e.b,Gt(e.b,14),Yt(e.b),Mn(e)},Pn=N(4,e=>{Jt(e.b,e.e),E(e.c,e.e)}),Fn=R(6,(e=>`<button>${e}<!></button>`)(Ft),(e=>` D/${e}&%l`)(`b%c`),Nn,(e,t)=>Pn(e,t[0])),In=x(9,e=>Fn(e,[e.i?[...e._._.a7||[],`shell`]:[],e=>e])),Ln=F(59,In,e=>e._._),Rn=(e,t)=>{A(e.e,`popovertarget`,t),A(e.g,`id`,t)},zn=C(8,In),Bn=g(`o6`,e=>{P(e.a,`click`,function(t){t.stopPropagation(),e._._.x(e._.i)}),P(e.c,`click`,function(t){t.stopPropagation(),e._._.y(e._.i)}),P(e.e,`pointerdown`,function(){zn(e,!0)}),P(e.e,`focus`,function(){zn(e,!0)}),P(e.e,`click`,function(e){e.stopPropagation()}),P(e.g,`toggle`,function(t,n){if(t.newState===`open`){zn(e,!0);let t=e.e.getBoundingClientRect();n.style.top=`${t.bottom+4}px`,n.style.left=`${Math.max(8,t.right-n.offsetWidth)}px`}})}),Vn=e=>{Ln(e),I(e.a,`_3`),St(e.b),Ct(e.b,13),wt(e.b),I(e.c,`_3`),Dt(e.d),Ot(e.d,13),kt(e.d),I(e.e,`_3`),Mt(e.f),Nt(e.f,13),Pt(e.f),I(e.g,`_bM`),Rn(e,k(e)),zn(e,!1),Bn(e)},Hn=u(4,`<span>open</span>`,` `,an),Un=x(21,e=>Hn(e,e._.j===e._._.v?0:1)),Wn=F(57,Un,e=>e._._),Gn=e=>{Wn(e),Jn(e),Xn._(e),Zn._(e),Qn._(e),tr._(e),I(e.a,`_6`),I(e.c,`_7`),I(e.g,`_8`),I(e.k,`_ba`)},Kn=(e,t)=>{I(e.b,[`_q`,Ne[gt(t)]]),rr(e,t?.repos),ar(e,t?.agents),or(e,t?.working),sr(e,t?.waiting),lr(e,t?.ports)},qn=x(22,e=>Kn(e,e._._.a6[e._.j])),Jn=F(58,qn,e=>e._._),Yn=u(5,`<span>archived</span>`,` `,rn),Xn=c(1,2,e=>Yn(e,+!e._.g)),Zn=c(1,2,e=>{qn(e),Un(e)}),Qn=c(1,2,e=>E(e.d,e._.k)),$n=R(10,`<span> </span>`,` D `,en,nn),er=x(13,e=>$n(e,[e.m||e._.l,`full_name`])),tr=c(1,2,er),nr=(e,t)=>fr(e,t?.length),rr=N(12,e=>{nr(e,(e.m||[]).flatMap(e=>e.prs||[])),er(e)}),ir=u(7,`<span> </span>`,` D `,pn),ar=N(14,e=>{ir(e,+!e.o),fn(e)}),or=N(15,mn),sr=N(16,hn),cr=u(9,`<span>:<!></span>`,` Db%`,ln),lr=N(17,e=>{ur(e,e.r?.length),cr(e,+!(e.r||[]).length),cn(e)}),ur=N(18,un),dr=u(8,`<span><!> PR<!></span>`,` D%c%`,sn),fr=N(20,e=>{dr(e,+!e.u),on(e)}),pr=x(13,e=>I(e.b,[`_2`,{_1:e.m===e._.as,_0:e.f===`ws`&&e.g}]),3),mr=ge(4,pr),hr=g(`o7`,e=>{P(e.b,`click`,function(){e._.au(e.e)}),P(e.b,`mouseenter`,function(){ni(e._,e.m)})}),gr=e=>{mr._(e),I(e.a,`_Z`),hr(e)},_r=u(1,`<span>+ New workspace</span>`,` `,gn,`<span>▸ <!></span>`,` Db%`,vn,`<span><span></span><span> </span><!><!><span><!><!><!></span></span><span></span>`,` D b D l%b%b D%b%b%m `,Gn),vr=u(2,((e,t,n)=>`<button title="Review changes">${e}</button><button title="Manage workspace">${t}</button><button title="New session">${n}</button><div popover=auto></div>`)(bt,Tt,At),((e,t,n)=>` D/${e}&l D/${t}&l D/${n}&l b`)(xt,Et,jt),Vn),yr=N(5,e=>{_r(e,e.f===`new`?0:e.f===`cmd`?1:2),vr(e,e.f===`ws`?0:1),pr(e)}),br=N(6,e=>{pr(e),Xn(e)}),xr=N(12,pr),Sr=(e,t)=>{Cr(e,t[0]),xr(e,t[1])},Cr=N(4,e=>{yr(e,e.e?.kind),br(e,e.e?.archived),wr(e,e.e?.label),Tr(e,e.e?.ws)}),wr=N(7,_n),Tr=N(8,e=>{Er(e,e.i?.id),Dr(e,e.i?.name),Or(e,e.i?.repos)}),Er=N(9,Zn),Dr=N(10,Qn),Or=N(11,tr),kr=Oe(19),Ar=x(13,e=>kr(e,e.l,e.m)),jr=N(11,Ar),Mr=N(12,Ar),Nr=R(4,`<li><div><button></button><!></div></li>`,`D D b%`,gr,Sr),Pr=g(`o12`,e=>{{let t=e.ap.findIndex(t=>t.kind===`ws`&&t.ws.id===e.v);t>=0&&ni(e,t)}setTimeout(()=>e.d?.focus(),0),e.e.children[e.as]?.scrollIntoView({block:`nearest`})}),Fr=x(55,Pr,2),Ir=N(51,e=>{_i(e,e.ap.length),Nr(e,[e.ap,e=>e.kind===`new`?`new`:e.kind===`cmd`?`cmd:${e.label}`:e.ws.id]),Fr(e)}),Lr=x(50,e=>Ir(e,[...e.ak(e.ag).map(e=>({kind:`ws`,ws:e})),...e.af||e.a8?e.ak(e.ah).map(e=>({kind:`ws`,ws:e,archived:!0})):[],...e.an,{kind:`new`}]),5),Rr=N(46,Lr),zr=N(49,Lr),Br=x(48,e=>zr(e,!e.a8||!e.al?[]:[{kind:`cmd`,label:`Review changes — ${e.al?.name}`,run:()=>e.x(e.al)},{kind:`cmd`,label:`Manage workspace — ${e.al?.name}`,run:()=>e.y(e.al)},{kind:`cmd`,label:`New ${e.ac||`agent`} session — ${e.al?.name}`,run:()=>e.z(e.al,e.ac||`claude`)}].filter(t=>t.kind===`cmd`&&O(e.a8||``,t.label))),5),Vr=u(5,`<button> </button>`,` D `,Cn),Hr=x(45,e=>Vr(e,e.ai&&!e.a8?0:1)),Ur=Oe(34,e=>{ve(e,`d`,e.a8||``,Mi(e)),Rr(e,ji(e)),Br(e),Lr(e),Hr(e)}),Wr=x(16,e=>Ur(e,e.o,e.p)),Gr=N(14,Wr),Kr=N(15,Wr),qr=u(8,`<label><select aria-label="Preferred agent"></select></label>`,` D `,Dn),Jr=Oe(36,e=>{Yr(e,e.aa?.preferredAgent),Xr(e,e.aa?.agents),qr(e,+!e.aa),Tn(e)}),Yr=N(38,Br),Xr=N(39,kn),Zr=x(19,e=>Jr(e,e.r,e.s)),Qr=N(17,e=>{Oi(e,e.r?.agents),Zr(e)}),$r=N(18,Zr),ei=N(54,e=>{Fr(e),mr(e)}),ti=x(53,e=>ei(e,Math.min(e.ae,e.aq-1))),ni=C(40,ti),ri=C(41,e=>{Lr(e),xn(e)}),ii=g(`o10`,e=>{Ae(e,`d`),P(e.d,`keydown`,function(t){t.key===`ArrowDown`?(t.preventDefault(),ni(e,Math.min(e.as+1,e.ap.length-1))):t.key===`ArrowUp`?(t.preventDefault(),ni(e,Math.max(e.as-1,0))):t.key===`Enter`&&(t.preventDefault(),e.au(e.ap[e.as]))})});function ai(e){I(e.d,`_be`),I(e.g,`_bb`),I(e.h,`_bc`),ni(e,0),ri(e,!1),ii(e)}var oi=N(42,Lr),si=N(43,e=>{di(e,e.ah?.length),Lr(e)}),ci=N(47,Br),li=x(22,e=>ci(e,e.u.find(t=>t.id===e.v))),ui=N(20,e=>{Di(e,e.u?.length),oi(e,e.u.filter(e=>e.status===`active`)),si(e,e.u.filter(e=>e.status===`archived`)),li(e)}),di=N(44,e=>{Hr(e),wn(e)}),fi=L(Wn),pi=N(21,e=>{li(e),Fr(e),fi(e)}),mi=N(23,Br),hi=N(24,Br),gi=N(25,Br),_i=N(52,ti),vi=N(56),yi=x(28,e=>vi(e,Ni(e))),bi=N(26,yi),xi=N(27,yi),Si=u(0,`<div></div>`,` `,jn),Ci=u(2,`<div><p>A <strong>workspace</strong> checks out one or more repos as git worktrees on a shared branch and gives each agent session its own terminal. Create one to get started.</p><p>Pick your preferred agent below — new sessions and the quick-create button use it. GitHub access uses your <code>gh</code> login.</p></div>`,` D b `,yn),wi=x(31,e=>Ci(e,e.a3&&!e.a4?0:1)),Ti=g(`o11`,e=>P(e.b,`keydown`,!e.a3&&(t=>{t.key===`Escape`&&(document.querySelector(`:popover-open`)||document.querySelector(`dialog[open]`)||(t.preventDefault(),kr(e,!1)))}))),Ei=N(29,e=>{I(e.b,[`_X`,{_W:e.a3}]),A(e.b,`data-inline`,e.a3?``:void 0),I(e.e,[`_Y`,!e.a3&&`_bf`]),Si(e,+!!e.a3),wi(e),Ti(e)}),Di=N(30,wi),Oi=N(33,L(Ln)),ki=N(32,L(Jn));function Ai(e){return function(t){Jr(e._,{...e._.aa,preferredAgent:t}),M(`/api/settings`,{method:`PUT`,headers:{"content-type":`application/json`},body:JSON.stringify({preferredAgent:t})}).catch(()=>{})}}function ji(e){return t=>t.filter(t=>O(e.a8||``,t.name))}function Mi(e){return function(t){Ur(e,t),ni(e,0)}}function Ni(e){return t=>{t&&(t.kind===`new`?e.a0():t.kind===`cmd`?t.run():e.a1(t.ws))}}S(`o1`,Ai),S(`o2`,ji),S(`o0`,Mi),S(`o3`,Ni);var Pi=`_bi _O`,Fi=`_bl _y`,Ii=`<div><input placeholder="Add a repo…" aria-label="Add a repo"><!><!></div>`,Li=` D b%b%l`,Ri=null,zi=e=>I(e.a,`_cC`),Bi=e=>{I(e.a,`_cC`),I(e.b,`_w`)},Vi=e=>I(e.a,`_cC`),Hi=g(`q7`,e=>P(e.a,`click`,function(){e._._._._._.a1(e._._._.j,e.e)})),Ui=e=>{I(e.a,[`_cv`,`_cF`]),I(e.b,[`_cB`,`_o`]),Hi(e)},Wi=N(4,e=>E(e.c,e.e)),Gi=(e,t)=>Wi(e,t[0]),Ki=F(35,e=>ve(e,`a`,e._._._._._.a0,$a(e)),e=>e._._._._._),qi=g(`q6`,e=>Ae(e,`a`)),Ji=e=>{Ki(e),I(e.a,`_cE`),qi(e)},Yi=R(2,`<li><button><span> </span></button></li>`,`D D D `,Ui,Gi),Xi=(e,t)=>{ia(e,t?.length),Yi(e,[t,e=>e])},Zi=x(6,e=>Xi(e,(e._._._._.a0?e._._._._.y.filter(t=>t.toLowerCase().includes(e._._._._.a0.toLowerCase())):e._._._._.y).slice(0,12))),Qi=F(33,Zi,e=>e._._._._),$i=e=>{Qi(e),ta(e),na(e),I(e.b,`_cz`)},ea=u(0,`<input placeholder="Filter branches…" aria-label="Filter branches" autofocus>`,` `,Ji),ta=F(34,e=>ea(e,e._._._._.z>8?0:1),e=>e._._._._),na=F(35,Zi,e=>e._._._._),ra=u(3,`<li><p>No branches match.</p></li>`,`D `,zi),ia=(e,t)=>ra(e,+!!t),aa=u(0,`<p><span></span> Loading branches…</p>`,` D `,Bi,`<!><!><ul><!><!></ul>`,`b%b D%b%`,$i),oa=F(33,e=>aa(e,+!!e._._._.y),e=>e._._._),sa=e=>{oa(e),I(e.a,`_cy`)},ca=x(12,e=>I(e.a,[`_cu`,{_ct:e.l===e._._.r}])),la=F(30,ca,e=>e._._),ua=g(`q8`,e=>{P(e.a,`mouseenter`,function(){Pa(e._._,e.l)}),P(e.b,`click`,function(){e._._.a1(e.j)}),P(e.f,`click`,function(){e._._.a2(e.j)})}),da=e=>{la(e),ma(e),I(e.b,`_cv`),Mt(e.c),Nt(e.c,12),Pt(e.c,`_cA`),I(e.d,`_cB`),ua(e)},fa=u(6,`<div></div>`,` `,sa),pa=x(10,e=>{I(e.f,[`_cx`,{_cw:e._._.w===e.j}]),fa(e,e._._.w===e.j?0:1)}),ma=F(32,pa,e=>e._._),ha=N(11,ca),ga=N(9,e=>{E(e.e,e.j),A(e.f,`title`,`Pick a base branch for ${e.j}`),A(e.f,`aria-label`,`Pick a base branch for ${e.j}`),pa(e)}),_a=R(0,(e=>`<li><div><button>${e}<span> </span></button><button>⎇</button></div><!></li>`)(At),(e=>`D D D/${e}& D m l%l`)(jt),da,(e,t)=>{ga(e,t[0]?.nameWithOwner),ha(e,t[1])}),va=c(3,0,e=>_a(e,[e._.t,`nameWithOwner`])),ya=e=>{va._(e),I(e.a,`_cs`)},ba=c(3,1,e=>E(e.b,e._.o)),xa=e=>{ba._(e),I(e.a,`_cC`)},Sa=Oe(8),Ca=x(8,e=>Sa(e,e.g,e.h)),wa=N(6,Ca),Ta=N(7,Ca),Ea=N(19,e=>{qa(e,e.t?.length),va(e)}),Da=x(16,e=>Ea(e,e.n&&e.o?l(e.o,e.n?.repos,t=>e.k.has(t)):[]),2),Oa=u(2,`<p>Loading repos…</p>`,` `,Vi),ka=x(15,e=>Oa(e,e.o&&!e.n?0:1)),Aa=u(3,`<ul></ul>`,` `,ya,`<p>No repos match "<!>".</p>`,` Db%`,xa),ja=x(21,e=>Aa(e,e.u?0:e.o&&e.n?1:2),2),Ma=C(13,e=>{Da(e),ka(e),ja(e)}),Na=C(14,e=>{ve(e,`b`,e.o,eo(e)),Da(e),ka(e),ja(e),ba(e)}),Pa=C(17,L(la)),Fa=N(28),Ia=x(23,e=>Fa(e,to(e))),La=L(ma),Ra=C(22,e=>{Ia(e),La(e)}),za=L(oa,Qi),Ba=C(24,e=>{Ya(e,e.y?.length),za(e)}),Va=C(26,L(na,Ki)),Ha=g(`q9`,e=>{Ae(e,`b`),P(e.b,`keydown`,function(t){t.key===`ArrowDown`?(t.preventDefault(),Pa(e,Math.min(e.r+1,e.t?.length-1))):t.key===`ArrowUp`?(t.preventDefault(),Pa(e,Math.max(e.r-1,0))):t.key===`Enter`?(t.preventDefault(),e.t[e.r]&&e.a1(e.t[e.r].nameWithOwner)):t.key===`Escape`&&e.o&&(t.preventDefault(),Na(e,``))})});function Ua(e){I(e.a,`_cr`),I(e.b,`_cD`),Ma(e,null),Na(e,``),Pa(e,0),Ra(e,null),Ba(e,null),Va(e,``),Ha(e)}var Wa=g(`q10`,e=>n(e,{onMount:function(){Ri&&Ma(e,Ri),e.s(!1)}})),Ga=N(18,e=>{f(e,no(e)),Wa(e)}),Ka=N(9,e=>{Ga(e,ro(e)),Ia(e)}),qa=N(20,ja),Ja=N(10,Da),Ya=N(25,L(ta)),Xa=N(27),Za=N(11,e=>Xa(e,io(e))),Qa=(e,t)=>A(e.b,`disabled`,t);function $a(e){return t=>{Va(e._._._._._,t)}}function eo(e){return function(t){Na(e,t),Pa(e,0)}}function to(e){return async t=>{if(e.w===t){Ra(e,null);return}Ra(e,t),Ba(e,null),Va(e,``);try{let n=await M(`/api/repos/branches?repo=${encodeURIComponent(t)}`);e.w===t&&Ba(e,n.branches)}catch(t){Ra(e,null),e.j?.(String(t.message||t))}}}function no(e){return()=>e.s(!0)}function ro(e){return async t=>{t&&Sa(e,!0);try{let n=await M(`/api/repos${t?`?refresh`:``}`);Ri=n,Ma(e,n)}catch(t){e.j?.(String(t.message||t))}t&&Sa(e,!1)}}function io(e){return(t,n)=>{Na(e,``),Ra(e,null),e.l(t,n)}}S(`q1`,$a),S(`q0`,eo),S(`q5`,to),S(`q2`,no),S(`q3`,ro),S(`q4`,io);var ao=((e,t)=>`<div role=region><div><div><header><div><h1>New workspace</h1><p>Name the space and pick repos — or restore an archived one below.</p></div></header><!><label><span>Name</span><input placeholder=my-feature autofocus></label><section><div><h2>Repos</h2><button title="Refresh repo list" aria-label="Refresh repo list">${e}</button></div><ul><!><!></ul>${t}</section><!><div><button type=button>Cancel</button><button type=button> </button></div><!></div></div></div>`)(We,Ii),oo=((e,t)=>` D D D D D b m%b D b l D D b D/${e}&m D%b%l0${t}&l%b D b D m%n`)(Ye,Li),so=e=>I(e.a,`_w`),co=e=>I(e.a,`_bx`),lo=e=>I(e.a,`_w`),uo=e=>I(e.a,`_bu`),fo=c(3,0,e=>E(e.b,e._.i)),po=e=>{fo._(e),I(e.a,[`_bs`,`_o`])},mo=u(1,`<span></span>`,` `,lo,`<span>✓</span>`,` `,co),ho=F(65,e=>{I(e.a,[`_bK`,{_bw:e.M===e._._.ai-1}]),mo(e,e.M===e._._.ai-1?0:1)},e=>e._._),go=ho,_o=(e,t)=>E(e.c,t),vo=R(0,`<li><!><!></li>`,` D%b%`,go,(e,t)=>_o(e,t[0])),yo=c(21,0,e=>vo(e,[e._.ah])),bo=e=>{yo._(e),I(e.a,`_bv`)},xo=F(63,e=>E(e.a,e._._.ag),e=>e._._),So=me(`m10`,` `,` `,xo),Co=e=>{w(e.a),ne(e.a,So(e)),ee(e.a,`inline`),te(e.a,Bs(e)),s(e.a),t(e.a),Ee(e.a),h(e.a),De(e.a,{})},wo=x(15,e=>A(e.g,`disabled`,e._._.ab||!!e._._.ac)),To=F(61,wo,e=>e._._),Eo=g(`m13`,e=>P(e.g,`click`,function(){e._._.av(e.i)})),Do=e=>{To(e),Ao(e),I(e.a,`_bC`),I(e.b,`_bD`),I(e.c,`_bE`),I(e.e,[`_bF`,`_o`]),I(e.g,[`_f`,`_bG`]),Eo(e)},Oo=u(6,`<span></span> Restoring…`,` `,so,`Restore`),ko=x(14,e=>Oo(e,e._._.ac===e.n?0:1)),Ao=F(62,e=>{wo(e),ko(e)},e=>e._._),jo=(e,t)=>E(e.d,t),Mo=x(12,e=>{A(e.e,`title`,e.k||e.l),E(e.f,e.k||e.l)}),No=N(10,Mo),Po=N(11,Mo),Fo=N(13,ko),Io=(e,t)=>Lo(e,t[0]),Lo=N(8,e=>{jo(e,e.i?.name),No(e,e.i?.display_path),Po(e,e.i?.path),Fo(e,e.i?.id)}),Ro=R(6,`<li><div><span> </span><span> </span></div><button type=button></button></li>`,` D D D l D m `,Do,Io),zo=c(26,0,e=>Ro(e,[e._.ak,`id`])),Bo=e=>{zo._(e),Vo._(e),I(e.a,`_by`),I(e.b,`_bo`),I(e.c,`_bJ`),I(e.d,`_bz`),I(e.f,`_bA`),I(e.g,`_bB`)},Vo=c(26,0,e=>E(e.e,e._.al)),Ho=ge(17,e=>A(e.e,`disabled`,e._.ab)),Uo=g(`m11`,e=>P(e.e,`click`,function(){e._.au(e.h)})),Wo=e=>{Ho._(e),I(e.a,`_bq`),I(e.b,`_br`),I(e.e,`_bt`),Uo(e)},Go=N(7,e=>{E(e.c,e.h),A(e.e,`title`,`Remove ${e.h}`)}),Ko=u(3,`<span title="Base branch">⎇ <!></span>`,` Db%`,po),qo=N(8,e=>{Ko(e,+!e.i),fo(e)}),Jo=(e,t)=>{Go(e,t[0]?.fullName),qo(e,t[0]?.baseBranch)},Yo=o(60),Xo=N(58),Zo=x(54,e=>Xo(e,Vs(e)),6),Qo=x(41,e=>A(e.y,`disabled`,e.ab||!!e.ac||!e.a7.trim()),2),$o=C(33,e=>{ve(e,`k`,e.a7,Hs(e)),Zo(e),Qo(e)}),es=C(34,e=>{A(e.o,`disabled`,e.a8),we(e.p,e.a8&&`_v`)}),ts=N(55,e=>Za(e.t,Us(e))),ns=N(56),rs=R(17,`<li><span> </span><!><button>×</button></li>`,` D D l%b `,Wo,Jo),is=C(35,e=>{Ja(e.t,new Set(e.a9.map(e=>e.fullName))),Ds(e,e.a9?.length),ts(e,Ws(e)),ns(e,Gs(e)),rs(e,[e.a9,`fullName`]),Zo(e)}),as=g(`m15`,e=>n(e,{busy:e.ab,onMount:function(){let t=new AbortController;return T().addEventListener(`workspace.progress`,t=>{this.busy&&t.data?.message&&e.aq([t.data])},{signal:t.signal}),{abort:t}},onDestroy:function(){this.abort.abort()}})),os=x(53,as),ss=N(57),cs=x(40,e=>ss(e,Ks(e)),2),ls=u(21,`<ul></ul>`,` `,bo),us=x(45,e=>ls(e,e.ab&&e.ai?0:1)),ds=x(39,e=>A(e.x,`disabled`,e.ab||!!e.ac)),fs=L(To),ps=C(37,e=>{A(e.k,`disabled`,e.ab),Qa(e.t,e.ab),E(e.z,e.ab?`Creating…`:`Create workspace`),os(e),cs(e),us(e),ds(e),Qo(e),Ho(e),fs(e)}),ms=L(Ao),hs=C(38,e=>{cs(e),Zo(e),ds(e),Qo(e),ms(e)}),gs=u(7,d,(e=>`/${e}&`)(y),Co),_s=L(xo),vs=C(42,e=>{gs(e,+!e.ag),_s(e)}),ys=N(52,e=>{os(e),Zo(e)}),bs=x(51,e=>ys(e,qs(e)),2),xs=C(43,e=>{ks(e,e.ah?.length),bs(e),yo(e)}),Ss=(e,t)=>{Ps(e,t.op),Fs(e,t.last)},Cs=(e,t)=>{A(e.a,`aria-labelledby`,t),A(e.f,`id`,t)},ws=g(`m14`,e=>{Ae(e,`k`),P(e.o,`click`,function(){Yo(e)()}),P(e.x,`click`,function(){e.a6?.()}),P(e.y,`click`,function(){e.aw()})});function Ts(e){I(e.a,`_M`),I(e.b,`_N`),I(e.c,Pi),I(e.d,`_Q`),I(e.e,`_S`),I(e.f,`_R`),I(e.g,`_T`),I(e.i,`_bm`),I(e.j,`_bH`),I(e.k,`_bI`),I(e.l,`_bn`),I(e.m,`_bo`),I(e.n,`_bJ`),I(e.o,Fi),pe(e.p),Ce(e.p,14),I(e.q,`_bp`),i(e,19,Rs),Ua(e.t),Ka(e.t,Ys(e)),Ta(e.t,Js(e)),wa(e.t),I(e.w,`_bj`),I(e.x,[`_f`,`_bL`]),I(e.y,[`_f`,`_g`,`_bk`,`_bL`]),$o(e,``),es(e,!1),is(e,[]),ps(e,!1),hs(e,null),vs(e,null),xs(e,[]),Ss(e,{last:0,op:``}),Cs(e,k(e)),ws(e)}var Es=u(18,`<li>No repos yet — search below to add one (or create empty).</li>`,` `,uo),Ds=N(36,e=>Es(e,+!!e.aa)),Os=L(ho),ks=N(44,e=>{us(e),Os(e)}),As=N(46,e=>{Ms(e,e.ak?.length),zo(e)}),js=u(26,`<section><div><h2>Archived</h2><span> </span></div><p>Restore a parked space instead of creating a new one.</p><ul></ul></section>`,` D D b D m b `,Bo),Ms=N(47,e=>{js(e,+!e.al),Vo(e)}),Ns=(e,t)=>As(e,(t||[]).filter(e=>e.status===`archived`).slice().sort((e,t)=>t.created_at.localeCompare(e.created_at))),Ps=N(49,e=>{bs(e),Zo(e)}),Fs=N(50,e=>{bs(e),Zo(e)}),Is=N(30,cs),Ls=N(31,Zo),Rs=m(`m12`,N(60)),zs=N(32);function Bs(e){return function(){vs(e._,null)}}function Vs(e){return async()=>{if(e.ac)return;ps(e,!0),vs(e,null),xs(e,[]),e.an=Math.random().toString(36).slice(2,10);try{e.ao=(await M(`/api/progress`)).seq}catch{}let t=setInterval(async()=>{try{let t=await M(`/api/progress?since=${e.ao}&op=${e.an}`);e.aq(t.messages)}catch{}},800);try{let t=await M(`/api/workspaces`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({name:e.a7,repos:e.a9,opId:e.an})});ps(e,!1),e.a5?.(t)}catch(t){ps(e,!1),vs(e,String(t.message||t))}finally{clearInterval(t)}}}function Hs(e){return t=>{$o(e,t)}}function Us(e){return function(t,n){e.at(t,n)}}function Ws(e){return(t,n)=>{!t||e.a9.some(e=>e.fullName===t)||is(e,e.a9.concat({fullName:t,baseBranch:n}))}}function Gs(e){return t=>{is(e,e.a9.filter(e=>e.fullName!==t))}}function Ks(e){return async t=>{if(!(e.ab||e.ac)){vs(e,null),hs(e,t.id);try{await M(`/api/workspaces/${t.id}`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({action:`restore`})}),e.a4?.({...t,status:`active`})}catch(t){vs(e,String(t.message||t))}finally{hs(e,null)}}}}function qs(e){return t=>{for(let n of t)n.op===e.an&&(n.seq&&n.seq<=e.ao||(n.seq&&(e.ao=n.seq),xs(e,e.ah.concat(n.message))))}}function Js(e){return function(t){es(e,t)}}function Ys(e){return function(t){vs(e,t)}}S(`m6`,Bs),S(`m5`,Vs),S(`m0`,Hs),S(`m7`,Us),S(`m2`,Ws),S(`m3`,Gs),S(`m4`,Ks),S(`m1`,qs),S(`m9`,Js),S(`m8`,Ys);var Xs=`_c8 _y`,Zs=`_db _y`,Qs=`_dc _y`,$s=a,ec=(e=>`/${e}&`)(Ke);function tc(e){Je(e.a,`M18 8.4C18 6.70261 17.3679 5.07475 16.2426 3.87452C15.1174 2.67428 13.5913 2 12 2C10.4087 2 8.88258 2.67428 7.75736 3.87452C6.63214 5.07475 6 6.70261 6 8.4C6 15.8667 3 18 3 18H21C21 18 18 15.8667 18 8.4Z M13.73 21C13.5542 21.3031 13.3019 21.5547 12.9982 21.7295C12.6946 21.9044 12.3504 21.9965 12 21.9965C11.6496 21.9965 11.3054 21.9044 11.0018 21.7295C10.6982 21.5547 10.4458 21.3031 10.27 21`)}var nc=(e,t)=>ae(e.a,t),rc=(e,t)=>j(e.a,t),ic=a,ac=(e=>`/${e}&`)(Ke);function oc(e){Je(e.a,`M3 12H6L9 3L15 21L18 12H21`)}var sc=(e,t)=>ae(e.a,t),cc=(e,t)=>j(e.a,t),lc=`_fz _y`,uc=a,dc=(e=>`/${e}&`)(Ke);function fc(e){Je(e.a,`M14.3632 5.65156L15.8431 4.17157C16.6242 3.39052 17.8905 3.39052 18.6716 4.17157L20.0858 5.58579C20.8668 6.36683 20.8668 7.63316 20.0858 8.41421L18.6058 9.8942M14.3632 5.65156L4.74749 15.2672C4.41542 15.5993 4.21079 16.0376 4.16947 16.5054L3.92738 19.2459C3.87261 19.8659 4.39148 20.3848 5.0115 20.33L7.75191 20.0879C8.21972 20.0466 8.65806 19.8419 8.99013 19.5099L18.6058 9.8942M14.3632 5.65156L18.6058 9.8942`)}var pc=(e,t)=>ae(e.a,t),mc=(e,t)=>j(e.a,t),hc=`_fZ _j _fY`,gc=`_f0 _j _fY`,_c={open:`_f5`,merged:`_f6`,closed:`_f7`},vc=a,yc=(e=>`/${e}&`)(Ke);function bc(e){Je(e.a,`M6.75827 17.2426L12.0009 12M17.2435 6.75736L12.0009 12M12.0009 12L6.75827 6.75736M12.0009 12L17.2435 17.2426`)}var xc=(e,t)=>ae(e.a,t),Sc=(e,t)=>j(e.a,t),Cc=`<!><!><!>`,wc=(e,t)=>{let n=[`${e.worktree} — ${t.title}`];return t.state===`MERGED`?n.push(`merged`):t.state===`CLOSED`?n.push(`closed`):t.isDraft?n.push(`draft`):n.push(`open`),n.join(` · `)},Tc=e=>!e.state||e.state===`OPEN`,Ec=c(4,1,e=>A(e.a,`title`,`Clear #${e._.l} from this list`)),Dc=g(`r4`,e=>P(e.a,`click`,function(){e._._._._.m(e._._.f,e._.l)})),Oc=e=>{Ec._(e),I(e.a,[`_f1`,`_f2`,`_f3`]),bc(e.b),xc(e.b,12),Sc(e.b),Dc(e)},kc=x(10,e=>I(e.d,[`_f1`,`_f2`,`_f3`,{_f4:e._._.i===e.j}])),Ac=x(11,e=>A(e.d,`title`,e._._.i===e.j?`Really kill ${e.h}?`:`Kill ${e.h} (pid ${e.j})`),2),jc=F(17,e=>{kc(e),Ac(e)},e=>e._._),Mc=g(`r5`,e=>{P(e.b,`click`,function(){window.open(`http://${location.hostname}:${e.i}`,`_blank`,`noopener`)}),P(e.d,`click`,function(){e._._.i===e.j?(fl(e._._,null),fetch(`/api/procs/${e.j}`,{method:`DELETE`}).catch(()=>{})):e._._.l(e.j)})}),Nc=e=>{jc(e),I(e.a,[`_j`,gc]),I(e.b,[`_f1`,`_f8`]),bc(e.e),xc(e.e,12),Sc(e.e),Mc(e)},Pc=N(7,e=>{A(e.a,`title`,e.h),Ac(e)}),Fc=N(8,e=>{A(e.b,`title`,`Open http://${typeof location>`u`?`localhost`:location.hostname}:${e.i}`),E(e.c,e.i)}),Ic=N(9,e=>{kc(e),Ac(e)}),Lc=(e,t)=>{Pc(e,t[0]?.cmd),Fc(e,t[0]?.port),Ic(e,t[0]?.pid)},Rc=c(4,0,e=>A(e.a,`title`,`Review #${e._.l} diff`)),zc=g(`r3`,e=>P(e.a,`click`,function(){e._._._._.h?.(e._._.e,e._.l)})),Bc=e=>{Rc._(e),I(e.a,[`_f1`,`_f2`]),St(e.b),Ct(e.b,12),wt(e.b),zc(e)},Vc=x(14,e=>E(e.c,e._._.d(e._.c))),Hc=F(4,Vc,e=>e._._),Uc=e=>{Hc(e),Gc._(e)},Wc=x(7,e=>A(e.a,`title`,wc(e._.c,e.g))),Gc=ge(0,e=>{Wc(e),Vc(e)}),Kc=u(4,(e=>`<button type=button>${e}</button>`)(bt),(e=>` D/${e}&l`)(xt),Bc,(e=>`<button type=button>${e}</button>`)(vc),(e=>` D/${e}&l`)(yc),Oc),qc=x(13,e=>I(e.a,[`_j`,hc,{_l:e.m&&!e.i,_m:e.m&&e.i,[_c.merged]:e.j===`MERGED`,[_c.closed]:e.j===`CLOSED`}]),2),Jc=N(12,e=>{I(e.b,[`_f1`,{_f9:!e.m}]),Kc(e,+!e.m),qc(e)}),Yc=N(6,e=>{Xc(e,e.g?.isDraft),Zc(e,e.g?.state),Qc(e,e.g?.url),$c(e,e.g?.number),Jc(e,Tc(e.g)),Wc(e)}),Xc=N(8,qc),Zc=N(9,qc),Qc=(e,t)=>A(e.b,`href`,t),$c=N(11,e=>{E(e.d,e.l),Rc(e),Ec(e)}),el=R(0,`<span><a target=_blank rel=noopener><!>#<!></a><!></span>`,` D D%c%l%`,Uc,(e,t)=>Yc(e,t[0])),tl=(e,t)=>el(e,[t||[],`number`]),nl=(e,t)=>rl(e,t[0]),rl=N(2,e=>{tl(e,e.c?.prs),il(e,e.c?.worktree),al(e,e.c?.full_name),Gc(e)}),il=N(4),al=N(5),ol=N(3,L(Hc)),sl=R(1,`<!><!><!>`,`b%`,0,nl),cl=c(0,0,e=>{ol(e,Ol(e)),sl(e,[e._.n,`full_name`])}),ll=e=>{cl._(e),dl._(e),I(e.a,`_fX`)},ul=R(2,(e=>`<span><button type=button>:<!></button><button type=button>${e}</button></span>`)(vc),(e=>` D Db%l D/${e}&m`)(yc),Nc,Lc),dl=c(0,0,e=>ul(e,[e._.o,`port`])),fl=C(8,L(jc)),pl=(e,t)=>gl(e,t.timer);function ml(e){fl(e,null),pl(e,{timer:0})}var hl=N(11),gl=N(10,e=>hl(e,kl(e))),_l=N(12),vl=N(3,e=>_l(e,Al(e))),yl=u(0,`<div><!><!></div>`,` D%b%`,ll),bl=x(16,e=>yl(e,e.n.some(e=>(e.prs||[]).length)||e.p?0:1)),xl=N(13,e=>{bl(e),cl(e)}),Sl=(e,t)=>xl(e,t||[]),Cl=N(14,e=>{wl(e,e.o.length),dl(e)}),wl=N(15,bl),Tl=(e,t)=>Cl(e,t||[]),El=(e,t)=>{Sl(e,t?.repos),Tl(e,t?.ports)},Dl=N(7);function Ol(e){return t=>{if(e._.n.length<2)return``;let n=t.full_name.split(`/`)[1];return e._.n.some(e=>e.full_name!==t.full_name&&e.full_name.split(`/`)[1]===n)?t.full_name:n}}function kl(e){return t=>{clearTimeout(e.k),fl(e,t),e.k=setTimeout(()=>{fl(e,null)},3500)}}function Al(e){return(t,n)=>{fetch(`/api/workspaces/${e.d}/prs`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({fullName:t,number:n})}).catch(()=>{})}}S(`r2`,Ol),S(`r0`,kl),S(`r1`,Al);var jl=`<!><!><!>`,Ml=c(8,0,e=>E(e.b,e._.u)),Nl=e=>{Ml._(e),I(e.a,`_fN`)},Pl=c(4,0,e=>Jt(e.a,yt(e._.q))),Fl=e=>{Pl._(e),e.a,Gt(e.a,12),Yt(e.a,`_fK`)},Il=F(50,e=>ve(e,`c`,e._._._._.a3,qd(e)),e=>e._._._._),Ll=g(`s8`,e=>{Ae(e,`c`),P(e.c,`keydown`,function(t){t.key===`Enter`?(t.preventDefault(),e._._._._.a5(e._.c)):t.key===`Escape`&&(t.preventDefault(),gd(e._._._._,null))}),P(e.c,`blur`,function(){e._._._._.a5(e._.c)}),n(e,{onMount:function(){queueMicrotask(()=>{let t=e.c;t?.focus(),t?.select()})}})}),Rl=e=>{Il(e),zl._(e),Bl._(e),e.b,Gt(e.b,13),Yt(e.b,`_fW`),I(e.c,`_fT`),Ll(e)},zl=c(0,0,e=>Jt(e.b,yt(e._.c))),Bl=c(0,0,e=>I(e.a,[`_q`,Ne[_t(e._.g)],`_fS`])),Vl=x(9,e=>{I(e.i,[`_fJ`,{_fy:e._._._._.y===e._.d}]),A(e.i,`title`,e._._._._.y===e._.d?`Really kill this session?`:`Kill session`)}),Hl=F(48,Vl,e=>e._._._._),Ul=g(`s9`,e=>{P(e.a,`click`,function(){e._._._._.v?.(e._.d)}),P(e.g,`click`,function(){gd(e._._._._,e._.d),vd(e._._._._,e._.h||e._.i)}),P(e.i,`click`,function(){e._._._._.y===e._.d?(dd(e._._._._,null),e._._._._.w?.(e._.d)):e._._._._.a1(e._.d)})}),Wl=e=>{Hl(e),Gl._(e),Kl._(e),ql._(e),I(e.a,`_fV`),e.c,Gt(e.c,13),Yt(e.c,`_fW`),I(e.d,`_fQ`),I(e.f,`_fR`),I(e.g,`_fI`),fc(e.h),pc(e.h,12),mc(e.h),Ul(e)},Gl=c(0,1,e=>{Jt(e.c,yt(e._.c)),E(e.e,e._.c?.title||yt(e._.c))}),Kl=c(0,1,Vl),ql=c(0,1,e=>I(e.b,[`_q`,Ne[_t(e._.g)]])),Jl=x(4,e=>I(e.a,[`_fH`,{_fw:e.d===e._._._.u}])),Yl=F(46,Jl,e=>e._._._),Xl=e=>{Yl(e),$l(e)},Zl=u(0,(e=>`<span></span>${e}<input aria-label="Session name">`)(Ft),(e=>` b/${e}& b`)(`b%c`),Rl,((e,t)=>`<button><span></span>${e}<span> </span></button><div><button title="Rename session">${t}</button><button>×</button></div>`)(Ft,uc),((e,t)=>` D b/${e}& D m D D/${t}&l l`)(`b%c`,dc),Wl),Ql=x(5,e=>Zl(e,e._._._.a2===e.d?0:1)),$l=F(49,Ql,e=>e._._._),eu=N(3,e=>{Jl(e),Ql(e),Kl(e)}),tu=(e,t)=>nu(e,t[0]),nu=N(2,e=>{eu(e,e.c?.id),ru(e,e.c?.state),iu(e,e.c?.title),au(e,e.c?.agent),Gl(e),zl(e)}),ru=N(6,e=>{ql(e),Bl(e)}),iu=N(7),au=N(8),ou=g(`s6`,e=>P(e.a,`click`,function(){e._._._._.r?.()})),su=e=>{I(e.a,`_fI`),St(e.b),Ct(e.b,12),wt(e.b),ou(e)},cu=g(`s4`,e=>P(e.a,`click`,function(t,n){n.closest(`[popover]`)?.hidePopover(),e._._._._._.p?.(e.e)})),lu=e=>{I(e.a,`_bN`),e.b,Gt(e.b,14),Yt(e.b),cu(e)},uu=N(4,e=>{Jt(e.b,e.e),E(e.c,e.e)}),du=R(2,(e=>`<button>${e}<!></button>`)(Ft),(e=>` D/${e}&%l`)(`b%c`),lu,(e,t)=>uu(e,t[0])),fu=x(5,e=>du(e,[e.e?[...e._._._._.q||[],`shell`]:[],e=>e])),pu=F(43,fu,e=>e._._._._),mu=(e,t)=>{A(e.a,`popovertarget`,t),A(e.c,`id`,t)},hu=C(4,fu),gu=g(`s5`,e=>{P(e.a,`pointerdown`,function(){hu(e,!0)}),P(e.a,`focus`,function(){hu(e,!0)}),P(e.c,`toggle`,function(t,n){if(t.newState===`open`){hu(e,!0);let t=e.a.getBoundingClientRect();n.style.top=`${t.bottom+4}px`,n.style.left=`${Math.max(8,Math.min(t.left,window.innerWidth-n.offsetWidth-8))}px`}})}),_u=u(1,(e=>`<button title="New session">${e}</button><div popover=auto></div>`)(Ft),(e=>` D/${e}&l b`)(`b%c`),e=>{pu(e),I(e.a,`_fI`),e.b,Jt(e.b,`shell`),Gt(e.b,12),Yt(e.b),I(e.c,`_bM`),mu(e,k(e)),hu(e,!1),gu(e)}),vu=F(42,e=>_u(e,+!e._._._.p),e=>e._._._),yu=g(`s7`,e=>P(e.d,`click`,function(){e._._._.t?.()})),bu=e=>{vu(e),Su(e),Cu(e),I(e.a,`_fG`),Dt(e.e),Ot(e.e,12),kt(e.e),yu(e)},xu=u(2,(e=>`<button title="Review changes">${e}</button>`)(bt),(e=>` D/${e}&l`)(xt),su),Su=F(44,e=>xu(e,+!e._._._.r),e=>e._._._),Cu=F(45,e=>{I(e.d,[`_fI`,{_fx:e._._._.s}]),A(e.d,`aria-pressed`,e._._._.s?`true`:`false`)},e=>e._._._),wu=F(37,e=>E(e.b,e._._._.j?`Open`:``),e=>e._._._),Tu=e=>{wu(e),I(e.a,`_fO`)},Eu=F(34,e=>vl(e.n,e._._.f),e=>e._._),Du=g(`s10`,e=>{P(e.a,`click`,function(t){t.target?.closest(`button, input, a, [popover]`)||e._._.k()}),P(e.c,`click`,function(){e._._.k()})}),Ou=e=>{Eu(e),Au(e),Nu(e),Pu(e),zu(e),Bu(e),Vu(e),Hu._(e),Ku._(e),I(e.b,`_fE`),I(e.c,`_fF`),I(e.f,`_fL`),I(e.g,`_fM`),I(e.l,`_fU`),ml(e.n),Du(e)},ku=x(22,e=>I(e.a,[`_fC`,{_fw:e._._.j,_fD:e._._.n,_fB:e._._.o}]),2),Au=F(37,ku,e=>e._._),ju=R(12,`<div></div>`,` `,Xl,tu),Mu=(e,t)=>{Ju(e,t.length),Yu(e,t[0]),ju(e,[t.length>1?t:[],`id`])},Nu=F(39,e=>Mu(e,e._._.m||[]),e=>e._._),Pu=F(40,ku,e=>e._._),Fu=u(9,`<span> </span>`,` D `,Tu),Iu=u(10,(e=>`<div><!><!><button title="Manage workspace">${e}</button></div>`)(Tt),(e=>` D%b%b D/${e}&m`)(Et),bu),Lu=u(8,`<span> </span>`,` D `,Nl),Ru=x(21,e=>Lu(e,e._._.o&&e.u?0:1)),zu=F(41,e=>{Fu(e,+!e._._.o),Iu(e,+!!e._._.o),ku(e),Ru(e)},e=>e._._),Bu=F(47,e=>Dl(e.n,e._._.x),e=>e._._),Vu=F(51,e=>E(e.h,e._._.a7),e=>e._._),Hu=c(0,1,e=>El(e.n,e._.b)),Uu=N(20,e=>{Ru(e),Ml(e)}),Wu=x(19,e=>Uu(e,e.p===0?e.s:e.p===1?e.r||``:`${e.p} sessions`),2),Gu=N(18,Wu),Ku=c(0,1,e=>{I(e.d,[`_q`,Ne[e._.c],`_fP`]),Gu(e,e._.c===`working`?`Working`:e._.c===`waiting`?`Needs you`:e._.c===`idle`?`Idle`:`Off`)}),qu=u(4,(e=>`<!>${e}<!>`)(Ft),(e=>`b/${e}&b`)(`b%c`),Fl),Ju=N(15,e=>{qu(e,e.p===1?0:1),Wu(e)}),Yu=N(16,e=>{Xu(e,e.q?.title),Pl(e)}),Xu=N(17,Wu),Zu=F(37,e=>I(e.a,[lc,{_fw:e._._.j}]),e=>e._._),Qu=g(`s3`,e=>P(e.a,`click`,function(){e._._.k()})),$u=e=>{Zu(e),ed(e),td(e),nd._(e),Qu(e)},ed=F(38,e=>E(e.b,(e._._.l??0)+1),e=>e._._),td=F(51,e=>A(e.a,`title`,e._._.a7),e=>e._._),nd=c(0,0,e=>I(e.c,[`_q`,Ne[e._.c],`_fA`])),rd=N(2,e=>{nd(e),Ku(e)}),id=N(1,e=>{rd(e,gt(e.b)),Hu(e)}),ad=x(3,e=>id(e,e._.h[e._.f])),od=c(0,0,ad),sd=e=>{od._(e),cd._(e),ud._(e)},cd=c(0,0,ad),ld=u(0,`<button> <span></span></button>`,` D b `,$u,(e=>`<section><div><button><span></span><!><span><span> </span><!></span><!></button><!></div><div><!>${e}</div></section>`)(Cc),(e=>` D D D b%b D D l%l%l%l D%b/${e}&m`)(`b%c`),Ou),ud=c(0,0,e=>ld(e,+!e._.i)),dd=C(24,L(Hl)),fd=(e,t)=>xd(e,t.timer),pd=N(31),md=x(30,e=>pd(e,Jd(e)),2),hd=L($l),gd=C(28,e=>{md(e),hd(e)}),_d=L(Il),vd=C(29,e=>{md(e),_d(e)});function yd(e){dd(e,null),fd(e,{timer:0}),gd(e,null),vd(e,``)}var bd=N(27),xd=N(26,e=>bd(e,Yd(e))),Sd=N(3,md),Cd=u(0,`<!><!><!>`,`b%`,sd),wd=(e,t)=>{Td(e,t?.name),Cd(e,+!t)},Td=N(33,L(td,Vu)),Ed=x(6,e=>wd(e,e.e.find(t=>t.id===e.f))),Dd=N(4,Ed),Od=L(Eu),kd=N(5,e=>{Ed(e),od(e),Od(e)}),Ad=N(7,cd),jd=N(8,ud),Md=N(9,L(Zu,Au,wu)),Nd=N(10),Pd=N(11,L(ed)),Fd=N(12,L(Nu)),Id=N(13,L(Pu)),Ld=N(14,L(zu)),Rd=N(15,L(vu)),zd=N(16,L(pu)),Bd=N(17,L(Su)),Vd=N(18,L(Cu)),Hd=N(19),Ud=N(20,L(Yl)),Wd=N(21),Gd=N(22),Kd=N(23,L(Bu));function qd(e){return t=>{vd(e._._._._,t)}}function Jd(e){return t=>{if(e.a2!==t.id)return;let n=e.a3.trim();gd(e,null),n&&e.d?.(t,n)}}function Yd(e){return t=>{clearTimeout(e.a0),dd(e,t),e.a0=setTimeout(()=>{dd(e,null)},3500)}}S(`s0`,qd),S(`s2`,Jd),S(`s1`,Yd);var Xd=a,Zd=(e=>`/${e}&`)(Ke);function Qd(e){Je(e.a,`M18 6H20M22 6H20M20 6V4M20 6V8 M21.4 20H2.6C2.26863 20 2 19.7314 2 19.4V11H21.4C21.7314 11 22 11.2686 22 11.6V19.4C22 19.7314 21.7314 20 21.4 20Z M2 11V4.6C2 4.26863 2.26863 4 2.6 4H8.77805C8.92127 4 9.05977 4.05124 9.16852 4.14445L12.3315 6.85555C12.4402 6.94876 12.5787 7 12.722 7H14`)}var $d=(e,t)=>ae(e.a,t),ef=(e,t)=>j(e.a,t),tf=a,nf=(e=>`/${e}&`)(Ke);function rf(e){Je(e.a,`M19 21L5 21C3.89543 21 3 20.1046 3 19L3 5C3 3.89543 3.89543 3 5 3L19 3C20.1046 3 21 3.89543 21 5L21 19C21 20.1046 20.1046 21 19 21Z M7.25 10L5.5 12L7.25 14 M9.5 21V3`)}var af=(e,t)=>ae(e.a,t),of=(e,t)=>j(e.a,t),sf=`<aside><!><div></div><!><div></div></aside>`,cf=` D%b b%b l`,lf=e=>{xe(e.a),ye(e.a,15),He(e.a)},uf=e=>{rf(e.a),af(e.a,15),of(e.a)},df=e=>I(e.a,`_dh`),ff=e=>I(e.a,`_dh`),pf=F(66,e=>{I(e.a,[Qs,{_c7:e._._.ac}]),A(e.a,`title`,e._._.ac?`Disable agent-waiting notifications`:`Notify when an agent is waiting`)},e=>e._._),mf=g(`t22`,e=>P(e.a,`click`,function(){e._._.ag()})),hf=e=>{pf(e),tc(e.b),nc(e.b,15),rc(e.b),mf(e)},gf=F(66,e=>{I(e.a,[Qs,`_dg`,{_c7:e._._.ac}]),A(e.a,`title`,e._._.ac?`Disable agent-waiting notifications`:`Notify when an agent is waiting`)},e=>e._._),_f=g(`t17`,e=>P(e.a,`click`,function(){e._._.ag()})),vf=e=>{gf(e),tc(e.b),nc(e.b,16),rc(e.b),_f(e)},yf=c(4,1,e=>{I(e.d,[Xs,{_c7:e._.a9===`usage`}]),A(e.d,`aria-pressed`,e._.a9===`usage`?`true`:`false`),I(e.f,[Xs,{_c7:e._.a9===`new`}]),A(e.f,`aria-pressed`,e._.a9===`new`?`true`:`false`)}),bf=g(`t23`,e=>{P(e.a,`click`,function(){Fm(e._,!e._.ab),_(e._.ab)}),P(e.d,`click`,function(){e._.af(),e._.s?.()}),P(e.f,`click`,function(){e._.af(),e._.a2?.()})}),xf=e=>{yf._(e),Cf._(e),Tf._(e),I(e.a,Zs),I(e.b,[`_p`,`_dm`]),oc(e.e),sc(e.e,15),cc(e.e),Qd(e.g),$d(e.g,16),ef(e.g),bf(e)},Sf=u(0,tf,(e=>`/${e}&`)(nf),uf,Fe,(e=>`/${e}&`)(je),lf),Cf=c(4,1,e=>{A(e.a,`title`,e._.ab?`Collapse sidebar`:`Expand sidebar`),Sf(e,+!e._.ab)}),wf=u(2,(e=>`<button>${e}</button>`)($s),(e=>` D/${e}&l`)(ec),hf),Tf=c(4,1,e=>wf(e,+!e._.ae)),Ef=c(4,0,e=>{I(e.a,[`_di`,{_c7:e._.a9===`new`}]),A(e.a,`aria-pressed`,e._.a9===`new`?`true`:`false`)}),Df=g(`t21`,e=>P(e.a,`click`,function(){e._.af(),e._.a2?.()})),Of=e=>{Ef._(e),Qd(e.b),$d(e.b,16),ef(e.b),Df(e)},kf=x(8,e=>Bd(e.b,hh(e)),4),Af=F(55,kf,e=>e._._),jf=g(`t20`,e=>{P(e.a,`mouseenter`,function(){e._.i()}),P(e.a,`mouseleave`,function(){e._.j()})}),Mf=e=>{Af(e),Nf(e),Ff(e),If(e),Rf(e),zf(e),Bf(e),Wf(e),Gf(e),Kf(e),qf(e),Jf(e),Yf(e),Zf._(e),$f._(e),ep._(e),I(e.a,`_dn`),yd(e.b),Id(e.b,!0),Hd(e.b,gh(e)),jd(e.b),Pd(e.b),Ld(e.b),jf(e)},Nf=F(56,e=>zd(e.b,e._._.v),e=>e._._),Pf=x(3,e=>Rd(e.b,_h(e))),Ff=F(57,Pf,e=>e._._),If=F(58,kf,e=>e._._),Lf=x(6,e=>Fd(e.b,e.c===e._._.a5&&e._._.y?e._._.y:e._._.ak[e.c]?.sessions||[]),3),Rf=F(59,Lf,e=>e._._),zf=F(60,e=>Sd(e.b,e._._.a0),e=>e._._),Bf=F(61,e=>Gd(e.b,e._._.a1),e=>e._._),Vf=x(5,e=>Md(e.b,e._._.ao&&e.c===e._._.a5),2),Hf=x(4,e=>Vd(e.b,e._._.a9===`manage`&&e.c===e._._.a5),2),Uf=x(7,e=>Ud(e.b,e.c===e._._.a5&&e._._.a9===`term`?e._._.a7:null),3),Wf=F(62,e=>{Nd(e.b,bh(e)),Kd(e.b,yh(e)),Wd(e.b,vh(e)),Vf(e),Hf(e),kf(e),Lf(e),Uf(e)},e=>e._._),Gf=F(63,Uf,e=>e._._),Kf=F(64,e=>{Hf(e),kf(e),Uf(e)},e=>e._._),qf=F(70,e=>Dd(e.b,e._._.aj),e=>e._._),Jf=F(71,e=>{Ad(e.b,e._._.ak),Lf(e)},e=>e._._),Yf=F(73,Vf,e=>e._._),Xf=N(2,e=>{kd(e.b,e.c),Vf(e),Hf(e),Pf(e),kf(e),Lf(e),Uf(e)}),Zf=c(1,0,e=>Xf(e,e._.d)),Qf=x(9,e=>Se(e.a,`top:${e._.e}px;left:${e._.f}px`)),$f=c(1,0,Qf),ep=c(1,0,Qf),tp=x(4,e=>Md(e.b,e._._.ao&&e.d===e._._.a5),2),np=F(62,e=>{Nd(e.b,xh(e)),tp(e)},e=>e._._),rp=g(`t19`,e=>{P(e.a,`mouseenter`,function(t,n){e._.i();let r=n.getBoundingClientRect();pp(e._,{id:e.d,top:r.top,left:r.right+8})}),P(e.a,`mouseleave`,function(){e._.j()})}),ip=e=>{np(e),ap(e),op(e),sp(e),yd(e.b),jd(e.b,!0),Sd(e.b),Fd(e.b),Id(e.b),Ld(e.b),Rd(e.b),zd(e.b),Bd(e.b),Vd(e.b),Hd(e.b),Ud(e.b),Wd(e.b),Gd(e.b),Kd(e.b),rp(e)},ap=F(70,e=>Dd(e.b,e._._.aj),e=>e._._),op=F(71,e=>Ad(e.b,e._._.ak),e=>e._._),sp=F(73,tp,e=>e._._),cp=(e,t)=>Pd(e.b,t),lp=N(3,e=>{kd(e.b,e.d),tp(e)}),up=R(0,(e=>`<span>${e}</span>`)(jl),(e=>` D/${e}&l`)(`b%c`),ip,(e,t)=>{lp(e,t[0]),cp(e,t[1])}),dp=c(3,0,e=>up(e,[e._.ah,e=>e])),fp=u(1,(e=>`<div>${e}</div>`)(jl),(e=>` D/${e}&l`)(`b%c`),Mf),pp=C(2,e=>{gp(e,e.c?.id),_p(e,e.c?.top),vp(e,e.c?.left),fp(e,+!e.c)}),mp=(e,t)=>xp(e,t.timer),hp=e=>{dp._(e),I(e.a,`_dk`),pp(e,null),mp(e,{timer:0})},gp=N(3,Zf),_p=N(4,$f),vp=N(5,ep),yp=N(8),bp=N(9),xp=N(7,e=>{yp(e,Sh(e)),bp(e,Ch(e))}),Sp=x(12,e=>Bd(e.c,wh(e)),4),Cp=ge(2,Sp),wp=e=>{Cp._(e),Tp._(e),Dp._(e),Op._(e),Ap._(e),jp._(e),Mp._(e),Bp._(e),Vp._(e),Hp._(e),Up._(e),Wp._(e),Gp._(e),Kp._(e),qp._(e),Jp._(e),yd(e.c),Hd(e.c,Th(e)),jd(e.c),Pd(e.c),Id(e.c)},Tp=ge(2,e=>zd(e.c,e._.v)),Ep=x(5,e=>Rd(e.c,Eh(e)),2),Dp=ge(2,Ep),Op=ge(2,Sp),kp=x(9,e=>Fd(e.c,e.e===e._.a5&&e._.y?e._.y:e._.ak[e.e]?.sessions||[]),3),Ap=ge(2,kp),jp=ge(2,e=>Sd(e.c,e._.a0)),Mp=ge(2,e=>Gd(e.c,e._.a1)),Np=u(0,`<h2>Current</h2>`,` `,ff),Pp=x(7,e=>Np(e,e._.am&&e.e===e._.a5?0:1),2),Fp=u(1,`<h2>Other spaces</h2>`,` `,df),Ip=x(11,e=>Fp(e,e._.am&&e.e!==e._.a5&&e.e===e._.ar?0:1),3),Lp=x(8,e=>Md(e.c,e._.ao&&e.e===e._.a5),2),Rp=x(6,e=>Vd(e.c,e._.a9===`manage`&&e.e===e._.a5),2),zp=x(10,e=>Ud(e.c,e.e===e._.a5&&e._.a9===`term`?e._.a7:null),3),Bp=D(2,31,4,e=>{Nd(e.c,kh(e)),Kd(e.c,Oh(e)),Wd(e.c,Dh(e)),Pp(e),Ip(e),Lp(e),Rp(e),Sp(e),kp(e),zp(e)}),Vp=ge(2,zp),Hp=ge(2,e=>{Rp(e),Sp(e),zp(e)}),Up=ge(2,Ep),Wp=ge(2,e=>Dd(e.c,e._.aj)),Gp=ge(2,e=>{Ad(e.c,e._.ak),kp(e)}),Kp=ge(2,e=>{Ld(e.c,e._.am),Pp(e),Ip(e)}),qp=ge(2,Lp),Jp=D(2,53,4,Ip),Yp=N(4,e=>{kd(e.c,e.e),Pp(e),Ip(e),Lp(e),Rp(e),Ep(e),Sp(e),kp(e),zp(e)}),Xp=(e,t)=>Yp(e,t[0]),Zp=c(1,0,e=>{I(e.e,[Xs,`_dg`,{_c7:e._.a9===`usage`}]),A(e.e,`aria-pressed`,e._.a9===`usage`?`true`:`false`)}),Qp=g(`t18`,e=>P(e.e,`click`,function(){e._.af(),e._.s?.()})),$p=e=>{Zp._(e),tm._(e),I(e.a,`_dd`),I(e.b,`_de`),I(e.c,`_df`),oc(e.f),sc(e.f,16),cc(e.f),Qp(e)},em=u(3,(e=>`<button>${e}</button>`)($s),(e=>` D/${e}&l`)(ec),vf),tm=c(1,0,e=>em(e,+!e._.ae)),nm=L(ap,qf),rm=N(45,e=>{Wp(e),nm(e)}),im=x(30,e=>rm(e,e.q||[e.a3])),am=N(29,e=>{hm(e,e.a3?.id),im(e)}),om=R(2,(e=>`<!><!><!>${e}<!>`)(jl),(e=>`b%b%b/${e}&b`)(`b%c`),wp,Xp),sm=(e,t)=>om(e,[t,e=>e]),cm=x(52,e=>sm(e,e.am?[e.a5,...e.ap]:e.ah),3),lm=N(51,e=>{Xm(e,e.ap?.[0]),cm(e)}),um=x(44,e=>lm(e,e.ah.filter(t=>t!==e.a5))),dm=N(43,e=>{um(e),cm(e),dp(e)}),fm=x(32,e=>dm(e,e.q?.length?e.q.filter(e=>e.status===`active`).map(e=>e.id):[e.a5])),pm=x(47,e=>e.ak[e.a5]),mm=L(np,Wf),hm=N(31,e=>{fm(e),pm(e),um(e),cm(e),Bp(e),mm(e)}),gm=am,_m=L(Gf),vm=Oe(33,e=>{Vp(e),_m(e)}),ym=x(10,e=>vm(e,e.i,e.j)),bm=N(8,ym),xm=N(9,ym),Sm=N(41,Up),Cm=u(1,(e=>`<header><h1>Workspaces</h1><div><!><button title=Usage>${e}</button></div></header>`)(ic),(e=>` D b D%b D/${e}&n`)(ac),$p),wm=u(4,(e=>`<button title="New workspace">${e} New workspace</button>`)(Xd),(e=>` D/${e}&l`)(Zd),Of,((e,t)=>`<button></button><div></div><!><button title=Usage>${e}</button><button title="New workspace">${t}</button>`)(ic,Xd),((e,t)=>` b b%b D/${e}&l D/${t}&l`)(ac,Zd),xf),Tm=x(49,e=>I(e.a,[`_da`,{_c9:!e.ab,_c_:e.am}])),Em=N(48,e=>{Cm(e,+!e.am),wm(e,+!e.am),cm(e),Tm(e),Kp(e)}),Dm=L(sp,Yf),Om=N(50,e=>{qp(e),Dm(e)}),km=L(Kf),Am=Oe(35,e=>{A(e.a,`hidden`,e.a9===`diff`),Sm(e,Ah(e)),Em(e,e.a9===`nav`),Om(e,e.a9!==`usage`&&e.a9!==`new`),Zp(e),Hp(e),km(e),Ef(e),yf(e)}),jm=x(13,e=>Am(e,e.l,e.m)),Mm=N(11,jm),Nm=N(12,jm),Pm=u(3,`<div></div><!><!>`,` b%`,hp),Fm=C(37,e=>{Pm(e,+!!e.ab),Tm(e),Cf(e)}),Im=N(42),Lm=x(39,e=>Im(e,jh(e))),Rm=L(gf,pf),zm=C(38,e=>{Lm(e),Rm(e)}),Bm=g(`t25`,e=>n(e,{onMount:function(){Vm(e,lt()),e.ae&&ut().then(t=>{zm(e,!!t)})}})),Vm=C(40,e=>{tm(e),Tf(e),Bm(e)});function Hm(e){I(e.c,`_dj`),I(e.e,`_dl`),Fm(e,le()),zm(e,!1),Vm(e,!1)}var Um=N(14,Lm),Wm=g(`t24`,e=>{e.p&&Fm(e,le())}),Gm=N(15,Wm),Km=N(16,e=>{fm(e),im(e)}),qm=L(op,Jf),Jm=N(46,e=>{pm(e),Gp(e),qm(e)}),Ym=(e,t)=>Jm(e,t||{}),Xm=N(53,Jp),Zm=N(18),Qm=L(Af),$m=N(19,e=>{Cp(e),Qm(e)}),eh=N(20),th=L(Nf),nh=N(21,e=>{Tp(e),th(e)}),rh=L(Ff),ih=N(22,e=>{Dp(e),rh(e)}),ah=L(If),oh=N(23,e=>{Op(e),ah(e)}),sh=L(Rf),ch=N(24,e=>{Ap(e),sh(e)}),lh=N(25),uh=L(zf),dh=N(26,e=>{jp(e),uh(e)}),fh=L(Bf),ph=N(27,e=>{Mp(e),fh(e)}),mh=N(28);function hh(e){return function(){pp(e._,null),e.c===e._._.a5?e._._.a9===`diff`?Am(e._._,`term`):e._._.x?.():(nt(e.c),e._._.t?.(e.c))}}function gh(e){return function(){pp(e._,null),e._._.u?.(e.c)}}function _h(e){return function(t){pp(e._,null),e._._.w(e.c,t)}}function vh(e){return function(t){pp(e._,null),e.c===e._._.a5?(vm(e._._,t),Am(e._._,`term`)):e._._.z?.(e.c,t)}}function yh(e){return function(t,n){pp(e._,null);let r=`${t}/${n}`;e.c===e._._.a5?e._._.x?.(r):(nt(e.c,r),e._._.t?.(e.c))}}function bh(e){return function(){pp(e._,null),e.c===e._._.a5?(e._._.a9===`manage`||e._._.a9===`usage`||e._._.a9===`new`)&&Am(e._._,`term`):e._._.t?.(e.c)}}function xh(e){return function(){e.d===e._._.a5?(e._._.a9===`manage`||e._._.a9===`usage`||e._._.a9===`new`)&&Am(e._._,`term`):e._._.t?.(e.d)}}function Sh(e){return()=>clearTimeout(e.h)}function Ch(e){return()=>{clearTimeout(e.h),e.h=setTimeout(()=>{pp(e,null)},150)}}function wh(e){return function(){e.e===e._.a5?e._.a9===`diff`?Am(e._,`term`):e._.x?.():(nt(e.e),e._.t?.(e.e))}}function Th(e){return function(){e._.u?.(e.e)}}function Eh(e){return function(t){e._.af(),e._.w(e.e,t)}}function Dh(e){return function(t){e.e===e._.a5?(vm(e._,t),Am(e._,`term`)):e._.z?.(e.e,t)}}function Oh(e){return function(t,n){let r=`${t}/${n}`;e.e===e._.a5?e._.x?.(r):(nt(e.e,r),e._.t?.(e.e))}}function kh(e){return function(){e.e===e._.a5?(e._.a9===`nav`||e._.a9===`manage`||e._.a9===`usage`||e._.a9===`new`)&&Am(e._,`term`):(e._.af(),e._.t?.(e.e))}}function Ah(e){return()=>{e.a9===`nav`&&Am(e,`term`)}}function jh(e){return async()=>{try{e.ac?(await ft(),zm(e,!1)):(zm(e,await dt()),e.ac||e.o?.(`Notifications blocked — allow them for this site in browser/system settings.`))}catch(t){zm(e,!1),e.o?.(`Notifications failed: ${String(t.message||t)}`)}}}S(`t14`,hh),S(`t12`,gh),S(`t13`,_h),S(`t16`,vh),S(`t15`,yh),S(`t11`,bh),S(`t10`,xh),S(`t8`,Sh),S(`t9`,Ch),S(`t5`,wh),S(`t3`,Th),S(`t4`,Eh),S(`t7`,Dh),S(`t6`,Oh),S(`t2`,kh),S(`t0`,Ah),S(`t1`,jh);var Mh=`_bX _O`,Nh=`_bY _T`,Ph=`_cp _y`,Fh=((e,t)=>`<div role=region><div><div><header><div><h1>Manage</h1><p><span> </span><!><span aria-hidden=true>·</span><span> </span></p></div></header><!><!><section><div><h2>Repos</h2><span> </span><div></div><button title="Refresh repo list" aria-label="Refresh repo list">${e}</button></div><ul><!><!></ul><!><div>${t}</div></section><!><section><div><h2>Workspace</h2></div><div><!><button type=button> </button></div><p>Archive hides the space from the list. Delete removes it and its worktrees.</p></section></div></div></div>`)(We,Ii),Ih=((e,t)=>` D D D D D b D D l%b b D o%b%b D D b D l b D/${e}&m D%b%l%b D0${t}&m%b D D l D%b D m o`)(Ye,Li),Lh=new Map,Rh=g(`k13`,e=>P(e.a,`click`,function(){window.open(`http://${location.hostname}:${e.d}`,`_blank`,`noopener`)})),zh=e=>{I(e.a,[`_j`,`_cj`]),Rh(e)},Bh=N(3,e=>{A(e.a,`title`,`Open http://${typeof location>`u`?`localhost`:location.hostname}:${e.d}`),E(e.b,e.d)}),Vh=R(0,`<button>:<!></button>`,` Db%`,zh,(e,t)=>Bh(e,t[0])),Hh=c(4,0,e=>Vh(e,[e._.k,e=>String(e)])),Uh=e=>{Hh._(e),I(e.a,`_cd`)},Wh=e=>I(e.a,`_ck`),Gh=e=>{I(e.a,[`_ca`,`_b_`]),I(e.b,`_w`),I(e.c,`_cb`),I(e.d,`_ce`)},Kh=(e,t)=>E(e.e,t),qh=(e,t)=>Kh(e,t[0]),Jh=e=>I(e.a,`_w`),Yh=c(7,0,e=>E(e.b,e._.o)),Xh=e=>{Yh._(e),I(e.a,[`_cf`,`_o`])},Zh=e=>I(e.a,[`_b2`,`_b3`]),Qh=g(`k14`,e=>P(e.f,`click`,function(){e._._.ba(e.m)})),$h=e=>{I(e.a,`_ca`),I(e.b,`_cb`),I(e.c,[`_cc`,`_o`]),I(e.f,[`_cg`,`_ci`]),Qh(e)},eg=(e,t)=>A(e.b,`title`,t),tg=(e,t)=>E(e.d,t),ng=u(4,`<span></span>`,` `,Uh),rg=(e,t)=>ng(e,+!t),ig=N(12,e=>{A(e.f,`title`,`Kill ${e.m}`),A(e.f,`aria-label`,`Kill process ${e.m}`)}),ag=(e,t)=>{eg(e,t[0]?.args),tg(e,t[0]?.cmd),og(e,t[0]?.ports),ig(e,t[0]?.pid)},og=N(10,e=>{rg(e,e.k?.length),Hh(e)}),sg=R(5,`<li><div><span> </span><!></div><button type=button>×</button></li>`,` D D D l%l `,$h,ag),cg=c(30,0,e=>sg(e,[e._.bd,`pid`])),lg=e=>{cg._(e),ug._(e),I(e.a,`_b5`),I(e.b,`_b6`),I(e.c,`_cq`),I(e.d,`_b7`),I(e.f,`_b9`)},ug=c(30,0,e=>E(e.e,e._.be)),dg=c(14,0,e=>E(e.c,e._.at)),fg=e=>{dg._(e),I(e.a,`_b4`),I(e.b,`_w`)},pg=x(2,e=>{I(e.a,[`_cg`,`_ci`,{_ch:e._._.as===e._.m}]),E(e.b,e._._.as===e._.m?`Remove?`:`×`)}),mg=x(3,e=>A(e.a,`title`,e._._.as===e._.m?`Really remove ${e._.l}/? Uncommitted changes are lost.`:`Remove ${e._.l}/`),2),hg=F(86,e=>{pg(e),mg(e)},e=>e._._),gg=g(`k11`,e=>P(e.a,`click`,function(){e._._.as===e._.k?.full_name?(s_(e._._,null),e._._.b8(e._.k)):(s_(e._._,e._.k?.full_name),setTimeout(()=>{s_(e._._,null)},4e3))})),_g=e=>{hg(e),vg._(e),yg._(e),gg(e)},vg=c(8,1,mg),yg=c(8,1,e=>{pg(e),mg(e)}),bg=c(35,1,e=>A(e.a,`disabled`,!!e._.ap)),xg=g(`k16`,e=>P(e.a,`click`,function(){e._.b9(`restore`)})),Sg=e=>{bg._(e),I(e.a,[`_f`,`_cn`]),xg(e)},Cg=c(35,0,e=>{A(e.a,`disabled`,!!e._.ap),E(e.b,e._.ap===`archive`?`Archiving…`:`Archive`)}),wg=g(`k15`,e=>P(e.a,`click`,function(){e._.b9(`archive`)})),Tg=e=>{Cg._(e),I(e.a,[`_f`,`_cn`]),wg(e)},Eg=F(84,e=>E(e.a,e._._.ao),e=>e._._),Dg=me(`k10`,` `,` `,Eg),Og=e=>{w(e.a),ne(e.a,Dg(e)),ee(e.a,`inline`),te(e.a,U_(e)),s(e.a),t(e.a),Ee(e.a),h(e.a),De(e.a,{})},kg=u(8,`<span></span>`,` `,Jh,`<button> </button>`,` D `,_g),Ag=x(13,e=>kg(e,+!e._.am.has(e.m))),jg=ge(24,Ag),Mg=e=>{jg._(e),I(e.a,`_ca`),I(e.b,`_cb`),I(e.c,[`_cc`,`_o`]),I(e.e,`_cd`),I(e.f,`_ce`)},Ng=N(11,e=>{E(e.d,e.l),vg(e)}),Pg=N(12,e=>{E(e.g,e.m),Ag(e),yg(e)}),Fg=u(7,`<span title="Base branch">⎇ <!></span>`,` Db%`,Xh),Ig=x(16,e=>Fg(e,+(e.o===e.p))),Lg=N(14,e=>{Ig(e),Yh(e)}),Rg=N(15,Ig),zg=(e,t)=>Bg(e,t[0]),Bg=N(10,e=>{Ng(e,e.k?.worktree),Pg(e,e.k?.full_name),Lg(e,e.k?.base_branch),Rg(e,e.k?.default_branch)}),Vg=o(74),Hg=C(46,e=>{A(e.v,`disabled`,e.ak),we(e.w,e.ak&&`_v`)}),Ug=N(69,e=>Za(e.a2,W_(e))),Wg=x(82,e=>Ug(e,G_(e)),2),Gg=N(70),Kg=x(81,e=>Gg(e,K_(e)),2),qg=N(68,e=>{Wg(e),Kg(e)}),Jg=R(25,`<li><span></span><div><span>Adding <!>…</span></div></li>`,` D b D Db%`,Gh,qh),Yg=x(80,e=>Jg(e,[[...e.am].filter(t=>!e.b5.has(t)),e=>e])),Xg=C(48,e=>{__(e,e.am?.size),qg(e,q_(e)),Wg(e),Kg(e),Yg(e),jg(e)}),Zg=u(13,d,(e=>`/${e}&`)(y),Og),Qg=L(Eg),$g=C(50,e=>{Zg(e,+!e.ao),Qg(e)}),e_=g(`k18`,e=>n(e,{busyCount:e.an,pendingAction:e.ap,onMount:function(){let t=new AbortController,n=t.signal;return T().addEventListener(`workspace.progress`,t=>{(this.pendingAction||this.busyCount)&&t.data?.message&&t.data.op===e.ax&&c_(e,t.data.message)},{signal:n}),e.b4(n),{abort:t}},onDestroy:function(){this.abort.abort()}})),t_=x(79,e_,3),n_=u(14,`<p><span></span> </p>`,` D b `,fg),r_=x(56,e=>n_(e,e.ap&&e.at?0:1)),i_=x(53,e=>E(e.ab,e.ap===`delete`?`Deleting…`:e.aq?`Really delete?`:`Delete`)),a_=C(51,e=>{A(e.aa,`disabled`,!!e.ap),t_(e),r_(e),i_(e),Cg(e),bg(e)}),o_=C(52,e=>{I(e.aa,[`_f`,`_i`,`_cn`,{_h:e.aq}]),i_(e)}),s_=C(54,L(hg)),c_=C(55,e=>{r_(e),dg(e)}),l_=(e,t)=>{A(e.a,`aria-labelledby`,t),A(e.f,`id`,t)},u_=g(`k17`,e=>{P(e.v,`click`,function(){Vg(e)()}),P(e.aa,`click`,function(){e.aq?(o_(e,!1),e.b9(`delete`)):(o_(e,!0),setTimeout(()=>{o_(e,!1)},4e3))})});function d_(e){I(e.a,`_M`),I(e.b,`_N`),I(e.c,Mh),I(e.d,`_Q`),I(e.e,`_S`),I(e.f,`_R`),I(e.g,Nh),I(e.h,`_bZ`),I(e.k,`_b0`),I(e.l,[`_b1`,`_o`]),I(e.p,`_b5`),I(e.q,`_b6`),I(e.r,`_cq`),I(e.s,`_b7`),I(e.u,`_p`),I(e.v,Ph),pe(e.w),Ce(e.w,14),I(e.x,`_b9`),I(e.a1,`_b8`),i(e,28,B_),Ua(e.a2),Ka(e.a2,Y_(e)),Ta(e.a2,J_(e)),wa(e.a2),Qa(e.a2),I(e.a5,[`_b5`,`_cl`]),I(e.a6,`_b6`),I(e.a7,`_cq`),I(e.a8,`_cm`),I(e.ac,`_co`),Hg(e,!1),Xg(e,new Set),$g(e,null),a_(e,null),o_(e,!1),s_(e,null),c_(e,null),l_(e,k(e)),u_(e)}var f_=N(75,e=>{H_(e,e.bd.length),cg(e)}),p_=C(47,e=>f_(e,e.al||[])),m_=(e,t)=>p_(e,Lh.get(`procs:${t}`)||null),h_=u(26,`<p>No repos yet — search below to add one.</p>`,` `,Wh),g_=x(78,e=>h_(e,!e.b3&&!e.an?0:1)),__=N(49,e=>{t_(e),g_(e)}),v_=N(71),y_=x(77,e=>v_(e,X_(e)),2),b_=e=>{A(e.g,`title`,e.az||e.b0),E(e.m,e.az||e.b0)},x_=Oe(57,e=>{S_(e,e.av),Kg(e),y_(e),b_(e)}),S_=e=>{T_(e,e.av?.id),O_(e,e.av?.repos),A_(e,e.av?.display_path),j_(e,e.av?.path),M_(e,e.av?.name),F_(e,e.av?.status)},C_=N(72),w_=N(66,e=>{C_(e,Z_(e)),t_(e)}),T_=N(59,e=>{w_(e,Q_(e)),t_(e),Wg(e)}),E_=N(67,e=>{Ja(e.a2,e.b5),Yg(e)}),D_=R(24,`<li><div><span><!>/</span><span><span> </span><!></span></div><!></li>`,` D D D%l D D l%m%`,Mg,zg),O_=N(60,e=>{k_(e,e.ay?.length),E_(e,new Set(e.ay.map(e=>e.full_name))),D_(e,[e.ay,`full_name`])}),k_=N(65,e=>{E(e.t,e.b3),g_(e)}),A_=N(61),j_=N(62),M_=N(63,e=>E(e.i,e.b1)),N_=u(9,`<span>Archived</span>`,` `,Zh),P_=u(35,`<button type=button> </button>`,` D `,Tg,`<button type=button>Restore</button>`,` `,Sg),F_=N(64,e=>{N_(e,+(e.b2===`active`)),P_(e,e.b2===`active`?0:1)}),I_=x(44,e=>x_(e,e.af,e.ah)),L_=N(41,e=>{m_(e,e.af?.id),I_(e)}),R_=N(43,e=>{I_(e),y_(e)}),z_=N(45,y_),B_=m(`k12`,N(74)),V_=u(30,`<section><div><h2>Running</h2><span> </span></div><ul></ul></section>`,` D D b D m `,lg),H_=N(76,e=>{V_(e,+!e.be),ug(e)});function U_(e){return function(){$g(e._,null)}}function W_(e){return function(t,n){e.b7(t,n)}}function G_(e){return async(t,n)=>{if(!(!t||e.am.has(t))){$g(e,null),e.b6(t,!0);try{x_(e,await M(`/api/workspaces/${e.ax}/repos`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({fullName:t,baseBranch:n})}))}catch(t){$g(e,String(t.message||t))}e.b6(t,!1)}}}function K_(e){return async t=>{if(!e.am.has(t.full_name)){$g(e,null),e.b6(t.full_name,!0);try{await M(`/api/workspaces/${e.av?.id}/repos/${encodeURIComponent(t.worktree)}`,{method:`DELETE`}),x_(e,{...e.av,repos:(e.av?.repos).filter(e=>e.full_name!==t.full_name)})}catch(t){$g(e,String(t.message||t))}e.b6(t.full_name,!1)}}}function q_(e){return(t,n)=>{let r=new Set(e.am);n?r.add(t):r.delete(t),Xg(e,r)}}function J_(e){return function(t){Hg(e,t)}}function Y_(e){return function(t){$g(e,t)}}function X_(e){return async t=>{$g(e,null),a_(e,t),c_(e,null);try{await M(`/api/workspaces/${e.av?.id}`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({action:t})}),t===`archive`?e.ah?.({...e.av,status:`archived`}):t===`delete`&&e.aj?.()}catch(t){$g(e,String(t.message||t))}finally{a_(e,null),c_(e,null)}}}function Z_(e){return async t=>{await fetch(`/api/procs/${t}`,{method:`DELETE`}),setTimeout(()=>e.b4(void 0),500)}}function Q_(e){return async t=>{try{let n=await M(`/api/workspaces/${e.ax}/procs`,{signal:t});p_(e,n),Lh.set(`procs:${e.ax}`,n)}catch{}}}S(`k6`,U_),S(`k7`,W_),S(`k2`,G_),S(`k3`,K_),S(`k1`,q_),S(`k9`,J_),S(`k8`,Y_),S(`k4`,X_),S(`k5`,Z_),S(`k0`,Q_);var $_=`_cG _O _P`,ev=`_cH _y`,tv=(e=>`<div role=region><div><div><header><div><h1>Usage</h1><p>Provider plan windows across your agents.</p></div><div><button title="Refresh usage" aria-label="Refresh usage">${e}</button></div></header><!></div></div></div>`)(We),nv=(e=>` D D D D D b l D D/${e}&n%n`)(Ye);function rv(e){let t=Math.round(e/6e4);if(t<60)return`${t}m`;let n=Math.round(t/60);return n<48?`${n}h`:`${Math.round(n/24)}d`}function iv(e,t){if(!e)return null;let n=new Date(e).getTime()-Date.now();return n<=0?t?null:`now`:rv(n)}var av=c(8,0,e=>E(e.b,e._.o)),ov=e=>{av._(e),I(e.a,`_cQ`)},sv=(e,t)=>E(e.i,t?`↻ ${Xe(t)}`:``),cv=x(13,e=>sv(e,iv(e.m,e._.n!=null))),lv=ge(7,cv),uv=e=>{lv._(e),I(e.a,`_cR`),I(e.b,`_cS`),I(e.d,`_cT`),I(e.h,`_c4`)},dv=x(16,e=>A(e.a,`title`,`${e.o}: ${e.p}% used${e.m?` — resets ${new Date(e.m).toLocaleString()}`:``}`),2),fv=N(15,e=>{E(e.g,e.p),dv(e)}),pv=(e,t)=>I(e.e,[`_cU`,t]),mv=(e,t)=>I(e.f,[`_cZ`,t]),hv=(e,t)=>{Se(e.e,`width:${Math.min(100,Math.max(2,t))}%`),fv(e,Math.round(t)),pv(e,t>=90?`_cY`:t>=70?`_cX`:t>=40?`_cW`:`_cV`),mv(e,t>=90?`_c3`:t>=70?`_c2`:t>=40?`_c1`:`_c0`)},gv=N(12,e=>{cv(e),dv(e)}),_v=N(14,e=>{E(e.c,e.o),dv(e)}),vv=(e,t)=>{hv(e,t[0]?.used_percent),gv(e,t[0]?.resets_at),_v(e,t[0]?.window)},yv=x(2,e=>A(e.a,`title`,`${e._.o||`couldn't reach this provider`} — these are the last cached numbers, ${rv(e._.n*1e3)} old`)),bv=c(5,0,e=>{E(e.b,rv(e._.n*1e3)),yv(e)}),xv=e=>{bv._(e),Sv._(e),I(e.a,`_cO`)},Sv=c(5,0,yv),Cv=c(4,0,e=>E(e.b,e._.m.replace(/^default_/,``).replaceAll(`_`,` `))),wv=e=>{Cv._(e),I(e.a,`_cN`)},Tv=e=>{I(e.a,`_cL`),I(e.b,`_cM`),I(e.c,`_c5`)},Ev=(e,t)=>E(e.d,t),Dv=u(4,`<span> </span>`,` D `,wv),Ov=N(12,e=>{Dv(e,+!e.m),Cv(e)}),kv=u(5,`<span>⚠ <!> old</span>`,` Db%`,xv),Av=N(13,e=>{I(e.g,[`_cP`,{_c6:e.n!=null}]),kv(e,+(e.n==null)),bv(e),lv(e)}),jv=R(7,`<div><span> </span><span><span></span></span><span><!>%</span><span> </span></div>`,` D D l D l D%l D `,uv,vv),Mv=(e,t)=>jv(e,[t||[],`window`]),Nv=u(8,`<p> </p>`,` D `,ov),Pv=N(14,e=>{Nv(e,+!e.o),Sv(e),av(e)}),Fv=(e,t)=>{Ev(e,t[0]?.agent),Ov(e,t[0]?.plan),Av(e,t[0]?.stale_seconds),Pv(e,t[0]?.note),Mv(e,t[0]?.windows)},Iv=e=>{I(e.a,[`_n`,`_cJ`]),I(e.b,`_w`)},Lv=R(0,`<div><div><strong> </strong><!><!></div><div><!><!></div></div>`,` D D D l%b%l D%b%`,Tv,Fv),Rv=c(10,2,e=>Lv(e,[e._.n||[],e=>`${e.agent}-${e.account||``}`])),zv=e=>{Rv._(e),I(e.a,`_cK`)},Bv=c(10,1,e=>E(e.b,e._.m)),Vv=u(10,`<p><span></span> Loading usage…</p>`,` D `,Iv,`<p> </p>`,` D `,e=>{Bv._(e),I(e.a,[`_n`,`_cJ`])},`<div></div>`,` `,zv),Hv=C(11,e=>{Uv(e,e.l?.error),Wv(e,e.l?.agents),Vv(e,e.l?e.l?.error?1:2:0)}),Uv=N(12,Bv),Wv=N(13,Rv),Gv=C(14,e=>{A(e.i,`disabled`,e.o),we(e.j,e.o&&`_v`)}),Kv=N(16),qv=g(`x3`,e=>n(e,{onMount:function(){e.p(!1)}})),Jv=N(15,e=>{Kv(e,Qv(e)),qv(e)}),Yv=(e,t)=>{A(e.a,`aria-labelledby`,t),A(e.f,`id`,t)},Xv=g(`x2`,e=>P(e.i,`click`,function(){e.q()}));function Zv(e){I(e.a,`_M`),I(e.b,`_N`),I(e.c,$_),I(e.d,`_Q`),I(e.e,`_S`),I(e.f,`_R`),I(e.g,`_T`),I(e.h,`_U`),I(e.i,[ev,`_cI`]),pe(e.j),Ce(e.j,14),Hv(e,null),Gv(e,!1),Jv(e,$v(e)),Yv(e,k(e)),Xv(e)}function Qv(e){return async()=>{Gv(e,!0),await e.p(!0),Gv(e,!1)}}function $v(e){return async t=>{try{Hv(e,await M(`/api/usage${t?`?refresh`:``}`))}catch(t){Hv(e,{error:String(t.message||t)})}}}S(`x1`,Qv),S(`x0`,$v);var ey=Object.defineProperty,ty=Object.getOwnPropertyDescriptor,ny=(e,t)=>{for(var n in t)ey(e,n,{get:t[n],enumerable:!0})},ry=(e,t,n,r)=>{for(var i=r>1?void 0:r?ty(t,n):t,a=e.length-1,o;a>=0;a--)(o=e[a])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&ey(t,n,i),i},z=(e,t)=>(n,r)=>t(n,r,e),iy=`Terminal input`,ay={get:()=>iy,set:e=>iy=e},oy=`Too much output to announce, navigate to rows manually to read`,sy={get:()=>oy,set:e=>oy=e};function cy(e){return e.replace(/\r?\n/g,`\r`)}function ly(e,t){return t?`\x1B[200~`+e+`\x1B[201~`:e}function uy(e,t){e.clipboardData&&e.clipboardData.setData(`text/plain`,t.selectionText),e.preventDefault()}function dy(e,t,n,r){e.stopPropagation(),e.clipboardData&&fy(e.clipboardData.getData(`text/plain`),t,n,r)}function fy(e,t,n,r){e=cy(e),e=ly(e,n.decPrivateModes.bracketedPasteMode&&r.rawOptions.ignoreBracketedPasteMode!==!0),n.triggerDataEvent(e,!0),t.value=``}function py(e,t,n){let r=n.getBoundingClientRect(),i=e.clientX-r.left-10,a=e.clientY-r.top-10;t.style.width=`20px`,t.style.height=`20px`,t.style.left=`${i}px`,t.style.top=`${a}px`,t.style.zIndex=`1000`,t.focus()}function my(e,t,n,r,i){py(e,t,n),i&&r.rightClickSelect(e),t.value=r.selectionText,t.select()}function hy(e){return e>65535?(e-=65536,String.fromCharCode((e>>10)+55296)+String.fromCharCode(e%1024+56320)):String.fromCharCode(e)}function gy(e,t=0,n=e.length){let r=``;for(let i=t;i<n;++i){let t=e[i];t>65535?(t-=65536,r+=String.fromCharCode((t>>10)+55296)+String.fromCharCode(t%1024+56320)):r+=String.fromCharCode(t)}return r}var _y=class{constructor(){this._interim=0}clear(){this._interim=0}decode(e,t){let n=e.length;if(!n)return 0;let r=0,i=0;if(this._interim){let n=e.charCodeAt(i++);56320<=n&&n<=57343?t[r++]=(this._interim-55296)*1024+n-56320+65536:(t[r++]=this._interim,t[r++]=n),this._interim=0}for(let a=i;a<n;++a){let i=e.charCodeAt(a);if(55296<=i&&i<=56319){if(++a>=n)return this._interim=i,r;let o=e.charCodeAt(a);56320<=o&&o<=57343?t[r++]=(i-55296)*1024+o-56320+65536:(t[r++]=i,t[r++]=o);continue}i!==65279&&(t[r++]=i)}return r}},vy=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(e,t){let n=e.length;if(!n)return 0;let r=0,i,a,o,s,c=0,l=0;if(this.interim[0]){let i=!1,a=this.interim[0];a&=(a&224)==192?31:(a&240)==224?15:7;let o=0,s;for(;(s=this.interim[++o]&63)&&o<4;)a<<=6,a|=s;let c=(this.interim[0]&224)==192?2:(this.interim[0]&240)==224?3:4,u=c-o;for(;l<u;){if(l>=n)return 0;if(s=e[l++],(s&192)!=128){l--,i=!0;break}this.interim[o++]=s,a<<=6,a|=s&63}i||(c===2?a<128?l--:t[r++]=a:c===3?a<2048||a>=55296&&a<=57343||a===65279||(t[r++]=a):a<65536||a>1114111||(t[r++]=a)),this.interim.fill(0)}let u=n-4,d=l;for(;d<n;){for(;d<u&&!((i=e[d])&128)&&!((a=e[d+1])&128)&&!((o=e[d+2])&128)&&!((s=e[d+3])&128);)t[r++]=i,t[r++]=a,t[r++]=o,t[r++]=s,d+=4;if(i=e[d++],i<128)t[r++]=i;else if((i&224)==192){if(d>=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128){d--;continue}if(c=(i&31)<<6|a&63,c<128){d--;continue}t[r++]=c}else if((i&240)==224){if(d>=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,r;if(o=e[d++],(o&192)!=128){d--;continue}if(c=(i&15)<<12|(a&63)<<6|o&63,c<2048||c>=55296&&c<=57343||c===65279)continue;t[r++]=c}else if((i&248)==240){if(d>=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,r;if(o=e[d++],(o&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,this.interim[2]=o,r;if(s=e[d++],(s&192)!=128){d--;continue}if(c=(i&7)<<18|(a&63)<<12|(o&63)<<6|s&63,c<65536||c>1114111)continue;t[r++]=c}}return r}},yy=``,by=` `,xy=class e{constructor(){this.fg=0,this.bg=0,this.extended=new Sy}static toColorRGB(e){return[e>>>16&255,e>>>8&255,e&255]}static fromColorRGB(e){return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255}clone(){let t=new e;return t.fg=this.fg,t.bg=this.bg,t.extended=this.extended.clone(),t}isInverse(){return this.fg&67108864}isBold(){return this.fg&134217728}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:this.fg&268435456}isBlink(){return this.fg&536870912}isInvisible(){return this.fg&1073741824}isItalic(){return this.bg&67108864}isDim(){return this.bg&134217728}isStrikethrough(){return this.fg&2147483648}isProtected(){return this.bg&536870912}isOverline(){return this.bg&1073741824}getFgColorMode(){return this.fg&50331648}getBgColorMode(){return this.bg&50331648}isFgRGB(){return(this.fg&50331648)==50331648}isBgRGB(){return(this.bg&50331648)==50331648}isFgPalette(){return(this.fg&50331648)==16777216||(this.fg&50331648)==33554432}isBgPalette(){return(this.bg&50331648)==16777216||(this.bg&50331648)==33554432}isFgDefault(){return!(this.fg&50331648)}isBgDefault(){return!(this.bg&50331648)}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(this.fg&50331648){case 16777216:case 33554432:return this.fg&255;case 50331648:return this.fg&16777215;default:return-1}}getBgColor(){switch(this.bg&50331648){case 16777216:case 33554432:return this.bg&255;case 50331648:return this.bg&16777215;default:return-1}}hasExtendedAttrs(){return this.bg&268435456}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(this.bg&268435456&&~this.extended.underlineColor)switch(this.extended.underlineColor&50331648){case 16777216:case 33554432:return this.extended.underlineColor&255;case 50331648:return this.extended.underlineColor&16777215;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return this.bg&268435456&&~this.extended.underlineColor?this.extended.underlineColor&50331648:this.getFgColorMode()}isUnderlineColorRGB(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)==16777216||(this.extended.underlineColor&50331648)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return this.bg&268435456&&~this.extended.underlineColor?!(this.extended.underlineColor&50331648):this.isFgDefault()}getUnderlineStyle(){return this.fg&268435456?this.bg&268435456?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}},Sy=class e{constructor(e=0,t=0){this._ext=0,this._urlId=0,this._ext=e,this._urlId=t}get ext(){return this._urlId?this._ext&-469762049|this.underlineStyle<<26:this._ext}set ext(e){this._ext=e}get underlineStyle(){return this._urlId?5:(this._ext&469762048)>>26}set underlineStyle(e){this._ext&=-469762049,this._ext|=e<<26&469762048}get underlineColor(){return this._ext&67108863}set underlineColor(e){this._ext&=-67108864,this._ext|=e&67108863}get urlId(){return this._urlId}set urlId(e){this._urlId=e}get underlineVariantOffset(){let e=(this._ext&3758096384)>>29;return e<0?e^4294967288:e}set underlineVariantOffset(e){this._ext&=536870911,this._ext|=e<<29&3758096384}clone(){return new e(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}},Cy=class e extends xy{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new Sy,this.combinedData=``}static fromCharData(t){let n=new e;return n.setFromCharData(t),n}isCombined(){return this.content&2097152}getWidth(){return this.content>>22}getChars(){return this.content&2097152?this.combinedData:this.content&2097151?hy(this.content&2097151):``}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):this.content&2097151}setFromCharData(e){this.fg=e[0],this.bg=0;let t=!1;if(e[1].length>2)t=!0;else if(e[1].length===2){let n=e[1].charCodeAt(0);if(55296<=n&&n<=56319){let r=e[1].charCodeAt(1);56320<=r&&r<=57343?this.content=(n-55296)*1024+r-56320+65536|e[2]<<22:t=!0}else t=!0}else this.content=e[1].charCodeAt(0)|e[2]<<22;t&&(this.combinedData=e[1],this.content=2097152|e[2]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},wy=`di$target`,Ty=`di$dependencies`,Ey=new Map;function Dy(e){return e[Ty]||[]}function Oy(e){if(Ey.has(e))return Ey.get(e);let t=function(e,n,r){if(arguments.length!==3)throw Error(`@IServiceName-decorator can only be used to decorate a parameter`);ky(t,e,r)};return t._id=e,Ey.set(e,t),t}function ky(e,t,n){t[wy]===t?t[Ty].push({id:e,index:n}):(t[Ty]=[{id:e,index:n}],t[wy]=t)}var Ay=Oy(`BufferService`),jy=Oy(`CoreMouseService`),My=Oy(`CoreService`),Ny=Oy(`CharsetService`),Py=Oy(`InstantiationService`),Fy=Oy(`LogService`),Iy=Oy(`OptionsService`),Ly=Oy(`OscLinkService`),Ry=Oy(`UnicodeService`),zy=Oy(`DecorationService`),By=class{constructor(e,t,n){this._bufferService=e,this._optionsService=t,this._oscLinkService=n}provideLinks(e,t){let n=this._bufferService.buffer.lines.get(e-1);if(!n){t(void 0);return}let r=[],i=this._optionsService.rawOptions.linkHandler,a=new Cy,o=n.getTrimmedLength(),s=-1,c=-1,l=!1;for(let t=0;t<o;t++)if(!(c===-1&&!n.hasContent(t))){if(n.loadCell(t,a),a.hasExtendedAttrs()&&a.extended.urlId){if(c===-1){c=t,s=a.extended.urlId;continue}l=a.extended.urlId!==s}else c!==-1&&(l=!0);if(l||c!==-1&&t===o-1){let n=this._oscLinkService.getLinkData(s)?.uri;if(n){let a={start:{x:c+1,y:e},end:{x:t+ +(!l&&t===o-1),y:e}},s=!1;if(!i?.allowNonHttpProtocols)try{let e=new URL(n);[`http:`,`https:`].includes(e.protocol)||(s=!0)}catch{s=!0}s||r.push({text:n,range:a,activate:(e,t)=>i?i.activate(e,t,a):Vy(e,t),hover:(e,t)=>i?.hover?.(e,t,a),leave:(e,t)=>i?.leave?.(e,t,a)})}l=!1,a.hasExtendedAttrs()&&a.extended.urlId?(c=t,s=a.extended.urlId):(c=-1,s=-1)}}t(r)}};By=ry([z(0,Ay),z(1,Iy),z(2,Ly)],By);function Vy(e,t){if(confirm(`Do you want to navigate to ${t}?
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_B2jdNsMP.js","assets/_B-HE1A0L.js","assets/preload-helper-Di0vWBYv.css","assets/diff-view-l7q43Ong.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{$ as e,A as t,At as n,B as r,Bt as i,C as a,Ct as o,D as s,Dt as c,E as l,Et as u,F as d,Ft as f,Gt as p,Ht as m,I as h,It as g,J as _,Jt as v,L as y,Lt as b,M as ee,Mt as x,N as te,Nt as S,O as ne,Ot as C,P as w,Pt as re,Q as T,R as ie,Rt as E,S as ae,St as D,T as O,Tt as k,Ut as oe,V as se,W as ce,X as le,Y as ue,Z as de,Zt as fe,_ as pe,_t as me,a as he,at as A,b as j,bt as ge,c as _e,ct as ve,d as ye,dt as be,et as M,f as xe,ft as Se,g as Ce,h as we,ht as N,i as Te,j as Ee,jt as P,k as De,kt as Oe,l as ke,lt as Ae,m as je,mt as F,n as Me,nt as Ne,o as Pe,ot as I,p as Fe,pt as L,q as Ie,qt as Le,r as Re,s as ze,t as Be,tt as Ve,u as He,ut as Ue,v as We,vt as Ge,w as Ke,wt as qe,x as Je,xt as R,y as Ye,zt as Xe}from"./_B-HE1A0L.js";var Ze=null,Qe=null,$e=null,et=new EventTarget;function tt(e,t){et.addEventListener(`intent`,e,{signal:t})}function nt(e,t){Ze={workspaceId:e,pr:t},et.dispatchEvent(new Event(`intent`))}function rt(e){if(Ze?.workspaceId!==e)return!1;let t=Ze.pr;return Ze=null,{pr:t}}function it(e,t){Qe=[e,t],et.dispatchEvent(new Event(`intent`))}function at(e){if(Qe?.[0]!==e)return null;let t=Qe[1];return Qe=null,t}function ot(e){$e=e,et.dispatchEvent(new Event(`intent`))}function st(e){return $e===e&&($e=null,!0)}function ct(e){let t=!1,n=!1;return async()=>{if(t){n=!0;return}t=!0;try{do n=!1,await e();while(n)}finally{t=!1}}}function lt(){return typeof window<`u`&&`serviceWorker`in navigator&&`PushManager`in window}async function ut(){return lt()?(await mt()).pushManager.getSubscription():null}async function dt(){if(await Notification.requestPermission()!==`granted`)return!1;let e=await mt(),t=await e.pushManager.getSubscription();if(!t){let{publicKey:n}=await M(`/api/push`);t=await e.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:ht(n)})}return await M(`/api/push`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(t.toJSON())}),!0}async function ft(){let e=await ut();e&&(await M(`/api/push?endpoint=${encodeURIComponent(e.endpoint)}`,{method:`DELETE`}).catch(()=>{}),await e.unsubscribe())}function pt(e){let t=()=>{document.visibilityState===`visible`&&navigator.clearAppBadge?.().catch(()=>{})};t(),document.addEventListener(`visibilitychange`,t,{signal:e})}async function mt(){return await navigator.serviceWorker.getRegistration()??navigator.serviceWorker.register(`/sw.js`)}function ht(e){let t=e.padEnd(e.length+(4-e.length%4)%4,`=`),n=atob(t.replace(/-/g,`+`).replace(/_/g,`/`));return Uint8Array.from(n,e=>e.charCodeAt(0))}function gt(e){return e?.working?`working`:e?.waiting?`waiting`:e?.agents?`idle`:`off`}function _t(e){return e?.phase===`working`?`working`:e?.phase===`waiting`?`waiting`:e?.alive?`idle`:`off`}var vt={claude:`claude`,codex:`codex`,grok:`grok`,copilot:`copilot`,"cursor-agent":`cursor`};function yt(e){if(e.agent!==`shell`)return e.agent;let t=e.state?.command?.trim();return t&&vt[t]||e.agent}var bt=a,xt=(e=>`/${e}&`)(Ke);function St(e){Je(e.a,`M18 21C19.1046 21 20 20.1046 20 19C20 17.8954 19.1046 17 18 17C16.8954 17 16 17.8954 16 19C16 20.1046 16.8954 21 18 21Z M6 7C7.10457 7 8 6.10457 8 5C8 3.89543 7.10457 3 6 3C4.89543 3 4 3.89543 4 5C4 6.10457 4.89543 7 6 7Z M18 17V7C18 7 18 5 16 5H13 M6 7V17C6 17 6 19 8 19H11 M15.0005 7.50012L12.5005 5.00012L15.0005 2.50012 M8.5 16.5L11 19L8.5 21.5`)}var Ct=(e,t)=>ae(e.a,t),wt=(e,t)=>j(e.a,t),Tt=a,Et=(e=>`/${e}&`)(Ke);function Dt(e){Je(e.a,`M12 15C13.6569 15 15 13.6569 15 12C15 10.3431 13.6569 9 12 9C10.3431 9 9 10.3431 9 12C9 13.6569 10.3431 15 12 15Z M19.6224 10.3954L18.5247 7.7448L20 6L18 4L16.2647 5.48295L13.5578 4.36974L12.9353 2H10.981L10.3491 4.40113L7.70441 5.51596L6 4L4 6L5.45337 7.78885L4.3725 10.4463L2 11V13L4.40111 13.6555L5.51575 16.2997L4 18L6 20L7.79116 18.5403L10.397 19.6123L11 22H13L13.6045 19.6132L16.2551 18.5155C16.6969 18.8313 18 20 18 20L20 18L18.5159 16.2494L19.6139 13.598L21.9999 12.9772L22 11L19.6224 10.3954Z`)}var Ot=(e,t)=>ae(e.a,t),kt=(e,t)=>j(e.a,t),At=a,jt=(e=>`/${e}&`)(Ke);function Mt(e){Je(e.a,`M6 12H12M18 12H12M12 12V6M12 12V18`)}var Nt=(e,t)=>ae(e.a,t),Pt=(e,t)=>j(e.a,t),Ft=`<!><!><!>`,It={claude:`M4.709 15.955l4.72-2.647.08-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0 11.784l.055-.352.48-.321.686.06 1.52.103 2.278.158 1.652.097 2.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686 1.908 1.476 2.491 1.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97 2.97 0 01-.104-.729L6.283.134 6.696 0l.996.134.42.364.62 1.414 1.002 2.229 1.555 3.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.376-.91.747-.492.584.28.48.685-.067.444-.286 1.851-.559 2.903-.364 1.942h.212l.243-.242.985-1.306 1.652-2.064.73-.82.85-.904.547-.431h1.033l.76 1.129-.34 1.166-1.064 1.347-.881 1.142-1.264 1.7-.79 1.36.073.11.188-.02 2.856-.606 1.543-.28 1.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.049.061 1.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093 1.068 2.006 1.81 2.509 2.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649 2.345 3.521.122 1.08-.17.353-.608.213-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674 7.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434 1.967-2.18 2.945-1.726 1.845-.414.164-.717-.37.067-.662.401-.589 2.388-3.036 1.44-1.882.93-1.086-.006-.158h-.055L4.132 18.56l-1.13.146-.487-.456.061-.746.231-.243 1.908-1.312-.006.006z`,codex:`M9.205 8.658v-2.26c0-.19.072-.333.238-.428l4.543-2.616c.619-.357 1.356-.523 2.117-.523 2.854 0 4.662 2.212 4.662 4.566 0 .167 0 .357-.024.547l-4.71-2.759a.797.797 0 00-.856 0l-5.97 3.473zm10.609 8.8V12.06c0-.333-.143-.57-.429-.737l-5.97-3.473 1.95-1.118a.433.433 0 01.476 0l4.543 2.617c1.309.76 2.189 2.378 2.189 3.948 0 1.808-1.07 3.473-2.76 4.163zM7.802 12.703l-1.95-1.142c-.167-.095-.239-.238-.239-.428V5.899c0-2.545 1.95-4.472 4.591-4.472 1 0 1.927.333 2.712.928L8.23 5.067c-.285.166-.428.404-.428.737v6.898zM12 15.128l-2.795-1.57v-3.33L12 8.658l2.795 1.57v3.33L12 15.128zm1.796 7.23c-1 0-1.927-.332-2.712-.927l4.686-2.712c.285-.166.428-.404.428-.737v-6.898l1.974 1.142c.167.095.238.238.238.428v5.233c0 2.545-1.974 4.472-4.614 4.472zm-5.637-5.303l-4.544-2.617c-1.308-.761-2.188-2.378-2.188-3.948A4.482 4.482 0 014.21 6.327v5.423c0 .333.143.571.428.738l5.947 3.449-1.95 1.118a.432.432 0 01-.476 0zm-.262 3.9c-2.688 0-4.662-2.021-4.662-4.519 0-.19.024-.38.047-.57l4.686 2.71c.286.167.571.167.856 0l5.97-3.448v2.26c0 .19-.07.333-.237.428l-4.543 2.616c-.619.357-1.356.523-2.117.523zm5.899 2.83a5.947 5.947 0 005.827-4.756C22.287 18.339 24 15.84 24 13.296c0-1.665-.713-3.282-1.998-4.448.119-.5.19-.999.19-1.498 0-3.401-2.759-5.947-5.946-5.947-.642 0-1.26.095-1.88.31A5.962 5.962 0 0010.205 0a5.947 5.947 0 00-5.827 4.757C1.713 5.447 0 7.945 0 10.49c0 1.666.713 3.283 1.998 4.448-.119.5-.19 1-.19 1.499 0 3.401 2.759 5.946 5.946 5.946.642 0 1.26-.095 1.88-.309a5.96 5.96 0 004.162 1.713z`,grok:`M9.27 15.29l7.978-5.897c.391-.29.95-.177 1.137.272.98 2.369.542 5.215-1.41 7.169-1.951 1.954-4.667 2.382-7.149 1.406l-2.711 1.257c3.889 2.661 8.611 2.003 11.562-.953 2.341-2.344 3.066-5.539 2.388-8.42l.006.007c-.983-4.232.242-5.924 2.75-9.383.06-.082.12-.164.179-.248l-3.301 3.305v-.01L9.267 15.292M7.623 16.723c-2.792-2.67-2.31-6.801.071-9.184 1.761-1.763 4.647-2.483 7.166-1.425l2.705-1.25a7.808 7.808 0 00-1.829-1A8.975 8.975 0 005.984 5.83c-2.533 2.536-3.33 6.436-1.962 9.764 1.022 2.487-.653 4.246-2.34 6.022-.599.63-1.199 1.259-1.682 1.925l7.62-6.815`,copilot:`M19.245 5.364c1.322 1.36 1.877 3.216 2.11 5.817.622 0 1.2.135 1.592.654l.73.964c.21.278.323.61.323.955v2.62c0 .339-.173.669-.453.868C20.239 19.602 16.157 21.5 12 21.5c-4.6 0-9.205-2.583-11.547-4.258-.28-.2-.452-.53-.453-.868v-2.62c0-.345.113-.679.321-.956l.73-.963c.392-.517.974-.654 1.593-.654l.029-.297c.25-2.446.81-4.213 2.082-5.52 2.461-2.54 5.71-2.851 7.146-2.864h.198c1.436.013 4.685.323 7.146 2.864zm-7.244 4.328c-.284 0-.613.016-.962.05-.123.447-.305.85-.57 1.108-1.05 1.023-2.316 1.18-2.994 1.18-.638 0-1.306-.13-1.851-.464-.516.165-1.012.403-1.044.996a65.882 65.882 0 00-.063 2.884l-.002.48c-.002.563-.005 1.126-.013 1.69.002.326.204.63.51.765 2.482 1.102 4.83 1.657 6.99 1.657 2.156 0 4.504-.555 6.985-1.657a.854.854 0 00.51-.766c.03-1.682.006-3.372-.076-5.053-.031-.596-.528-.83-1.046-.996-.546.333-1.212.464-1.85.464-.677 0-1.942-.157-2.993-1.18-.266-.258-.447-.661-.57-1.108-.32-.032-.64-.049-.96-.05zm-2.525 4.013c.539 0 .976.426.976.95v1.753c0 .525-.437.95-.976.95a.964.964 0 01-.976-.95v-1.752c0-.525.437-.951.976-.951zm5 0c.539 0 .976.426.976.95v1.753c0 .525-.437.95-.976.95a.964.964 0 01-.976-.95v-1.752c0-.525.437-.951.976-.951zM7.635 5.087c-1.05.102-1.935.438-2.385.906-.975 1.037-.765 3.668-.21 4.224.405.394 1.17.657 1.995.657h.09c.649-.013 1.785-.176 2.73-1.11.435-.41.705-1.433.675-2.47-.03-.834-.27-1.52-.63-1.813-.39-.336-1.275-.482-2.265-.394zm6.465.394c-.36.292-.6.98-.63 1.813-.03 1.037.24 2.06.675 2.47.968.957 2.136 1.104 2.776 1.11h.044c.825 0 1.59-.263 1.995-.657.555-.556.765-3.187-.21-4.224-.45-.468-1.335-.804-2.385-.906-.99-.088-1.875.058-2.265.394zM12 7.615c-.24 0-.525.015-.84.044.03.16.045.336.06.526l-.001.159a2.94 2.94 0 01-.014.25c.225-.022.425-.027.612-.028h.366c.187 0 .387.006.612.028-.015-.146-.015-.277-.015-.409.015-.19.03-.365.06-.526a9.29 9.29 0 00-.84-.044z`,cursor:`M22.106 5.68L12.5.135a.998.998 0 00-.998 0L1.893 5.68a.84.84 0 00-.419.726v11.186c0 .3.16.577.42.727l9.607 5.547a.999.999 0 00.998 0l9.608-5.547a.84.84 0 00.42-.727V6.407a.84.84 0 00-.42-.726zm-.603 1.176L12.228 22.92c-.063.108-.228.064-.228-.061V12.34a.59.59 0 00-.295-.51l-9.11-5.26c-.107-.062-.063-.228.062-.228h18.55c.264 0 .428.286.296.514z`},Lt=c(0,1,e=>ae(e.a,e._.d)),Rt=e=>{Lt._(e),zt._(e),Je(e.a,`M5 7L10 12L5 17 M13 17H20`)},zt=c(0,1,e=>j(e.a,e._.f)),Bt=c(0,0,e=>I(e.a,[`_d`,e._.f])),Vt=e=>{Bt._(e),Ht._(e),Ut._(e)},Ht=c(0,0,e=>{A(e.a,`width`,e._.g),A(e.a,`height`,e._.g)}),Ut=c(0,0,e=>A(e.b,`d`,e._.h)),Wt=N(6,Ht),Gt=N(3,e=>{Wt(e,e.d??15),Lt(e)}),Kt=u(0,`<svg viewBox="0 0 24 24" fill=currentColor fill-rule=evenodd aria-hidden=true><path></path></svg>`,` D `,Vt,a,(e=>`/${e}&`)(Ke),Rt),qt=N(7,e=>{Kt(e,+!e.h),Ut(e)}),Jt=(e,t)=>qt(e,It[t]),Yt=N(5,e=>{Bt(e),zt(e)}),Xt=`<!><!><div data-palette role=dialog aria-label=Workspaces><!><input autofocus placeholder="Jump to workspace…" aria-label="Filter workspaces"><ul></ul><!><div><span></span><span>↑↓ navigate · ↵ open · ⌘1–9 switch · esc close</span><!></div></div>`,Zt=`b%b D%b b b%b Db b%m`,Qt=(e,t)=>{A(e.a,`value`,t),E(e.b,t)},$t=(e,t)=>Qt(e,t[0]),en=e=>I(e.a,`_o`),tn=(e,t)=>E(e.b,t),nn=(e,t)=>tn(e,t[0]?.worktree),rn=e=>I(e.a,`_j`),an=e=>I(e.a,[`_j`,`_bC`]),on=c(8,0,e=>{A(e.a,`title`,`${e._.u} open PR${e._.u===1?``:`s`}`),E(e.b,e._.u),E(e.c,e._.u===1?``:`s`)}),sn=e=>{on._(e),I(e.a,[`_j`,`_bD`])},cn=c(9,0,e=>A(e.a,`title`,e._.r.map(e=>`:${e.port} ${e.cmd}`).join(`
|
|
3
|
+
`))),ln=e=>{cn._(e),un._(e),I(e.a,[`_j`,`_bD`])},un=c(9,0,e=>E(e.b,e._.s)),dn=x(2,e=>A(e.a,`title`,`${e._.o} running session${e._.o===1?``:`s`}${e._.p?` — ${e._.p} working`:``}${e._.q?` — ${e._.q} waiting on you`:``}`),2),fn=c(7,0,e=>{E(e.b,e._.o),dn(e)}),pn=e=>{fn._(e),mn._(e),hn._(e),I(e.a,[`_j`,`_bD`])},mn=c(7,0,dn),hn=c(7,0,dn),gn=e=>I(e.a,`_bz`),_n=c(1,1,e=>E(e.b,e._.h)),vn=e=>{_n._(e),I(e.a,[`_bz`,`_bx`])},yn=e=>{I(e.a,`_by`),I(e.b,`_bK`),I(e.c,`_bK`)},bn=x(2,e=>E(e.b,e._.af?`hide archived`:`archived (${e._.ai})`)),xn=c(5,0,bn),Sn=g(`o8`,e=>P(e.a,`click`,function(){ri(e._,!e._.af)})),Cn=e=>{xn._(e),wn._(e),I(e.a,`_bH`),Sn(e)},wn=c(5,0,bn),Tn=c(8,0,e=>Ue(e,`b`,e._.aa?.preferredAgent,Ai(e))),En=g(`o9`,e=>be(e,`b`)),Dn=e=>{Tn._(e),kn._(e),I(e.a,`_n`),I(e.b,`_bL`),En(e)},On=R(1,`<option> </option>`,` D `,0,$t),kn=c(8,0,e=>On(e,[e._.ad,e=>e])),An=g(`o4`,e=>P(e.a,`click`,function(){kr(e._,!1)})),jn=e=>{I(e.a,`_bo`),An(e)},Mn=g(`o5`,e=>P(e.a,`click`,function(t,n){n.closest(`[popover]`)?.hidePopover(),e._._._.z(e._._.i,e.e)})),Nn=e=>{I(e.a,`_bN`),e.b,Gt(e.b,14),Yt(e.b),Mn(e)},Pn=N(4,e=>{Jt(e.b,e.e),E(e.c,e.e)}),Fn=R(6,(e=>`<button>${e}<!></button>`)(Ft),(e=>` D/${e}&%l`)(`b%c`),Nn,(e,t)=>Pn(e,t[0])),In=x(9,e=>Fn(e,[e.i?[...e._._.a7||[],`shell`]:[],e=>e])),Ln=F(59,In,e=>e._._),Rn=(e,t)=>{A(e.e,`popovertarget`,t),A(e.g,`id`,t)},zn=C(8,In),Bn=g(`o6`,e=>{P(e.a,`click`,function(t){t.stopPropagation(),e._._.x(e._.i)}),P(e.c,`click`,function(t){t.stopPropagation(),e._._.y(e._.i)}),P(e.e,`pointerdown`,function(){zn(e,!0)}),P(e.e,`focus`,function(){zn(e,!0)}),P(e.e,`click`,function(e){e.stopPropagation()}),P(e.g,`toggle`,function(t,n){if(t.newState===`open`){zn(e,!0);let t=e.e.getBoundingClientRect();n.style.top=`${t.bottom+4}px`,n.style.left=`${Math.max(8,t.right-n.offsetWidth)}px`}})}),Vn=e=>{Ln(e),I(e.a,`_bw`),St(e.b),Ct(e.b,13),wt(e.b),I(e.c,`_bw`),Dt(e.d),Ot(e.d,13),kt(e.d),I(e.e,`_bw`),Mt(e.f),Nt(e.f,13),Pt(e.f),I(e.g,`_bM`),Rn(e,k(e)),zn(e,!1),Bn(e)},Hn=u(4,`<span>open</span>`,` `,an),Un=x(21,e=>Hn(e,e._.j===e._._.v?0:1)),Wn=F(57,Un,e=>e._._),Gn=e=>{Wn(e),Jn(e),Xn._(e),Zn._(e),Qn._(e),tr._(e),I(e.a,`_bz`),I(e.c,`_bA`),I(e.g,`_bB`),I(e.k,`_bE`)},Kn=(e,t)=>{I(e.b,[`_q`,Ne[gt(t)]]),rr(e,t?.repos),ar(e,t?.agents),or(e,t?.working),sr(e,t?.waiting),lr(e,t?.ports)},qn=x(22,e=>Kn(e,e._._.a6[e._.j])),Jn=F(58,qn,e=>e._._),Yn=u(5,`<span>archived</span>`,` `,rn),Xn=c(1,2,e=>Yn(e,+!e._.g)),Zn=c(1,2,e=>{qn(e),Un(e)}),Qn=c(1,2,e=>E(e.d,e._.k)),$n=R(10,`<span> </span>`,` D `,en,nn),er=x(13,e=>$n(e,[e.m||e._.l,`full_name`])),tr=c(1,2,er),nr=(e,t)=>fr(e,t?.length),rr=N(12,e=>{nr(e,(e.m||[]).flatMap(e=>e.prs||[])),er(e)}),ir=u(7,`<span> </span>`,` D `,pn),ar=N(14,e=>{ir(e,+!e.o),fn(e)}),or=N(15,mn),sr=N(16,hn),cr=u(9,`<span>:<!></span>`,` Db%`,ln),lr=N(17,e=>{ur(e,e.r?.length),cr(e,+!(e.r||[]).length),cn(e)}),ur=N(18,un),dr=u(8,`<span><!> PR<!></span>`,` D%c%`,sn),fr=N(20,e=>{dr(e,+!e.u),on(e)}),pr=x(13,e=>I(e.b,[`_bv`,{_bu:e.m===e._.as,_bt:e.f===`ws`&&e.g}]),3),mr=ge(4,pr),hr=g(`o7`,e=>{P(e.b,`click`,function(){e._.au(e.e)}),P(e.b,`mouseenter`,function(){ni(e._,e.m)})}),gr=e=>{mr._(e),I(e.a,`_bs`),hr(e)},_r=u(1,`<span>+ New workspace</span>`,` `,gn,`<span>▸ <!></span>`,` Db%`,vn,`<span><span></span><span> </span><!><!><span><!><!><!></span></span><span></span>`,` D b D l%b%b D%b%b%m `,Gn),vr=u(2,((e,t,n)=>`<button title="Review changes">${e}</button><button title="Manage workspace">${t}</button><button title="New session">${n}</button><div popover=auto></div>`)(bt,Tt,At),((e,t,n)=>` D/${e}&l D/${t}&l D/${n}&l b`)(xt,Et,jt),Vn),yr=N(5,e=>{_r(e,e.f===`new`?0:e.f===`cmd`?1:2),vr(e,e.f===`ws`?0:1),pr(e)}),br=N(6,e=>{pr(e),Xn(e)}),xr=N(12,pr),Sr=(e,t)=>{Cr(e,t[0]),xr(e,t[1])},Cr=N(4,e=>{yr(e,e.e?.kind),br(e,e.e?.archived),wr(e,e.e?.label),Tr(e,e.e?.ws)}),wr=N(7,_n),Tr=N(8,e=>{Er(e,e.i?.id),Dr(e,e.i?.name),Or(e,e.i?.repos)}),Er=N(9,Zn),Dr=N(10,Qn),Or=N(11,tr),kr=Oe(19),Ar=x(13,e=>kr(e,e.l,e.m)),jr=N(11,Ar),Mr=N(12,Ar),Nr=R(4,`<li><div><button></button><!></div></li>`,`D D b%`,gr,Sr),Pr=g(`o12`,e=>{{let t=e.ap.findIndex(t=>t.kind===`ws`&&t.ws.id===e.v);t>=0&&ni(e,t)}setTimeout(()=>e.d?.focus(),0),e.e.children[e.as]?.scrollIntoView({block:`nearest`})}),Fr=x(55,Pr,2),Ir=N(51,e=>{_i(e,e.ap.length),Nr(e,[e.ap,e=>e.kind===`new`?`new`:e.kind===`cmd`?`cmd:${e.label}`:e.ws.id]),Fr(e)}),Lr=x(50,e=>Ir(e,[...e.ak(e.ag).map(e=>({kind:`ws`,ws:e})),...e.af||e.a8?e.ak(e.ah).map(e=>({kind:`ws`,ws:e,archived:!0})):[],...e.an,{kind:`new`}]),5),Rr=N(46,Lr),zr=N(49,Lr),Br=x(48,e=>zr(e,!e.a8||!e.al?[]:[{kind:`cmd`,label:`Review changes — ${e.al?.name}`,run:()=>e.x(e.al)},{kind:`cmd`,label:`Manage workspace — ${e.al?.name}`,run:()=>e.y(e.al)},{kind:`cmd`,label:`New ${e.ac||`agent`} session — ${e.al?.name}`,run:()=>e.z(e.al,e.ac||`claude`)}].filter(t=>t.kind===`cmd`&&O(e.a8||``,t.label))),5),Vr=u(5,`<button> </button>`,` D `,Cn),Hr=x(45,e=>Vr(e,e.ai&&!e.a8?0:1)),Ur=Oe(34,e=>{ve(e,`d`,e.a8||``,Mi(e)),Rr(e,ji(e)),Br(e),Lr(e),Hr(e)}),Wr=x(16,e=>Ur(e,e.o,e.p)),Gr=N(14,Wr),Kr=N(15,Wr),qr=u(8,`<label><select aria-label="Preferred agent"></select></label>`,` D `,Dn),Jr=Oe(36,e=>{Yr(e,e.aa?.preferredAgent),Xr(e,e.aa?.agents),qr(e,+!e.aa),Tn(e)}),Yr=N(38,Br),Xr=N(39,kn),Zr=x(19,e=>Jr(e,e.r,e.s)),Qr=N(17,e=>{Oi(e,e.r?.agents),Zr(e)}),$r=N(18,Zr),ei=N(54,e=>{Fr(e),mr(e)}),ti=x(53,e=>ei(e,Math.min(e.ae,e.aq-1))),ni=C(40,ti),ri=C(41,e=>{Lr(e),xn(e)}),ii=g(`o10`,e=>{Ae(e,`d`),P(e.d,`keydown`,function(t){t.key===`ArrowDown`?(t.preventDefault(),ni(e,Math.min(e.as+1,e.ap.length-1))):t.key===`ArrowUp`?(t.preventDefault(),ni(e,Math.max(e.as-1,0))):t.key===`Enter`&&(t.preventDefault(),e.au(e.ap[e.as]))})});function ai(e){I(e.d,`_bI`),I(e.g,`_bF`),I(e.h,`_bG`),ni(e,0),ri(e,!1),ii(e)}var oi=N(42,Lr),si=N(43,e=>{di(e,e.ah?.length),Lr(e)}),ci=N(47,Br),li=x(22,e=>ci(e,e.u.find(t=>t.id===e.v))),ui=N(20,e=>{Di(e,e.u?.length),oi(e,e.u.filter(e=>e.status===`active`)),si(e,e.u.filter(e=>e.status===`archived`)),li(e)}),di=N(44,e=>{Hr(e),wn(e)}),fi=L(Wn),pi=N(21,e=>{li(e),Fr(e),fi(e)}),mi=N(23,Br),hi=N(24,Br),gi=N(25,Br),_i=N(52,ti),vi=N(56),yi=x(28,e=>vi(e,Ni(e))),bi=N(26,yi),xi=N(27,yi),Si=u(0,`<div></div>`,` `,jn),Ci=u(2,`<div><p>A <strong>workspace</strong> checks out one or more repos as git worktrees on a shared branch and gives each agent session its own terminal. Create one to get started.</p><p>Pick your preferred agent below — new sessions and the quick-create button use it. GitHub access uses your <code>gh</code> login.</p></div>`,` D b `,yn),wi=x(31,e=>Ci(e,e.a3&&!e.a4?0:1)),Ti=g(`o11`,e=>P(e.b,`keydown`,!e.a3&&(t=>{t.key===`Escape`&&(document.querySelector(`:popover-open`)||document.querySelector(`dialog[open]`)||(t.preventDefault(),kr(e,!1)))}))),Ei=N(29,e=>{I(e.b,[`_bq`,{_bp:e.a3}]),A(e.b,`data-inline`,e.a3?``:void 0),I(e.e,[`_br`,!e.a3&&`_bJ`]),Si(e,+!!e.a3),wi(e),Ti(e)}),Di=N(30,wi),Oi=N(33,L(Ln)),ki=N(32,L(Jn));function Ai(e){return function(t){Jr(e._,{...e._.aa,preferredAgent:t}),M(`/api/settings`,{method:`PUT`,headers:{"content-type":`application/json`},body:JSON.stringify({preferredAgent:t})}).catch(()=>{})}}function ji(e){return t=>t.filter(t=>O(e.a8||``,t.name))}function Mi(e){return function(t){Ur(e,t),ni(e,0)}}function Ni(e){return t=>{t&&(t.kind===`new`?e.a0():t.kind===`cmd`?t.run():e.a1(t.ws))}}S(`o1`,Ai),S(`o2`,ji),S(`o0`,Mi),S(`o3`,Ni);var Pi=`_V _O`,Fi=`_Y _y`,Ii=`<div><input placeholder="Add a repo…" aria-label="Add a repo"><!><!></div>`,Li=` D b%b%l`,Ri=null,zi=e=>I(e.a,`_b8`),Bi=e=>{I(e.a,`_b8`),I(e.b,`_w`)},Vi=e=>I(e.a,`_b8`),Hi=g(`q7`,e=>P(e.a,`click`,function(){e._._._._._.a1(e._._._.j,e.e)})),Ui=e=>{I(e.a,[`_b1`,`_ca`]),I(e.b,[`_b7`,`_o`]),Hi(e)},Wi=N(4,e=>E(e.c,e.e)),Gi=(e,t)=>Wi(e,t[0]),Ki=F(35,e=>ve(e,`a`,e._._._._._.a0,$a(e)),e=>e._._._._._),qi=g(`q6`,e=>Ae(e,`a`)),Ji=e=>{Ki(e),I(e.a,`_b_`),qi(e)},Yi=R(2,`<li><button><span> </span></button></li>`,`D D D `,Ui,Gi),Xi=(e,t)=>{ia(e,t?.length),Yi(e,[t,e=>e])},Zi=x(6,e=>Xi(e,(e._._._._.a0?e._._._._.y.filter(t=>t.toLowerCase().includes(e._._._._.a0.toLowerCase())):e._._._._.y).slice(0,12))),Qi=F(33,Zi,e=>e._._._._),$i=e=>{Qi(e),ta(e),na(e),I(e.b,`_b5`)},ea=u(0,`<input placeholder="Filter branches…" aria-label="Filter branches" autofocus>`,` `,Ji),ta=F(34,e=>ea(e,e._._._._.z>8?0:1),e=>e._._._._),na=F(35,Zi,e=>e._._._._),ra=u(3,`<li><p>No branches match.</p></li>`,`D `,zi),ia=(e,t)=>ra(e,+!!t),aa=u(0,`<p><span></span> Loading branches…</p>`,` D `,Bi,`<!><!><ul><!><!></ul>`,`b%b D%b%`,$i),oa=F(33,e=>aa(e,+!!e._._._.y),e=>e._._._),sa=e=>{oa(e),I(e.a,`_b4`)},ca=x(12,e=>I(e.a,[`_b0`,{_bZ:e.l===e._._.r}])),la=F(30,ca,e=>e._._),ua=g(`q8`,e=>{P(e.a,`mouseenter`,function(){Pa(e._._,e.l)}),P(e.b,`click`,function(){e._._.a1(e.j)}),P(e.f,`click`,function(){e._._.a2(e.j)})}),da=e=>{la(e),ma(e),I(e.b,`_b1`),Mt(e.c),Nt(e.c,12),Pt(e.c,`_b6`),I(e.d,`_b7`),ua(e)},fa=u(6,`<div></div>`,` `,sa),pa=x(10,e=>{I(e.f,[`_b3`,{_b2:e._._.w===e.j}]),fa(e,e._._.w===e.j?0:1)}),ma=F(32,pa,e=>e._._),ha=N(11,ca),ga=N(9,e=>{E(e.e,e.j),A(e.f,`title`,`Pick a base branch for ${e.j}`),A(e.f,`aria-label`,`Pick a base branch for ${e.j}`),pa(e)}),_a=R(0,(e=>`<li><div><button>${e}<span> </span></button><button>⎇</button></div><!></li>`)(At),(e=>`D D D/${e}& D m l%l`)(jt),da,(e,t)=>{ga(e,t[0]?.nameWithOwner),ha(e,t[1])}),va=c(3,0,e=>_a(e,[e._.t,`nameWithOwner`])),ya=e=>{va._(e),I(e.a,`_bY`)},ba=c(3,1,e=>E(e.b,e._.o)),xa=e=>{ba._(e),I(e.a,`_b8`)},Sa=Oe(8),Ca=x(8,e=>Sa(e,e.g,e.h)),wa=N(6,Ca),Ta=N(7,Ca),Ea=N(19,e=>{qa(e,e.t?.length),va(e)}),Da=x(16,e=>Ea(e,e.n&&e.o?l(e.o,e.n?.repos,t=>e.k.has(t)):[]),2),Oa=u(2,`<p>Loading repos…</p>`,` `,Vi),ka=x(15,e=>Oa(e,e.o&&!e.n?0:1)),Aa=u(3,`<ul></ul>`,` `,ya,`<p>No repos match "<!>".</p>`,` Db%`,xa),ja=x(21,e=>Aa(e,e.u?0:e.o&&e.n?1:2),2),Ma=C(13,e=>{Da(e),ka(e),ja(e)}),Na=C(14,e=>{ve(e,`b`,e.o,eo(e)),Da(e),ka(e),ja(e),ba(e)}),Pa=C(17,L(la)),Fa=N(28),Ia=x(23,e=>Fa(e,to(e))),La=L(ma),Ra=C(22,e=>{Ia(e),La(e)}),za=L(oa,Qi),Ba=C(24,e=>{Ya(e,e.y?.length),za(e)}),Va=C(26,L(na,Ki)),Ha=g(`q9`,e=>{Ae(e,`b`),P(e.b,`keydown`,function(t){t.key===`ArrowDown`?(t.preventDefault(),Pa(e,Math.min(e.r+1,e.t?.length-1))):t.key===`ArrowUp`?(t.preventDefault(),Pa(e,Math.max(e.r-1,0))):t.key===`Enter`?(t.preventDefault(),e.t[e.r]&&e.a1(e.t[e.r].nameWithOwner)):t.key===`Escape`&&e.o&&(t.preventDefault(),Na(e,``))})});function Ua(e){I(e.a,`_bX`),I(e.b,`_b9`),Ma(e,null),Na(e,``),Pa(e,0),Ra(e,null),Ba(e,null),Va(e,``),Ha(e)}var Wa=g(`q10`,e=>n(e,{onMount:function(){Ri&&Ma(e,Ri),e.s(!1)}})),Ga=N(18,e=>{f(e,no(e)),Wa(e)}),Ka=N(9,e=>{Ga(e,ro(e)),Ia(e)}),qa=N(20,ja),Ja=N(10,Da),Ya=N(25,L(ta)),Xa=N(27),Za=N(11,e=>Xa(e,io(e))),Qa=(e,t)=>A(e.b,`disabled`,t);function $a(e){return t=>{Va(e._._._._._,t)}}function eo(e){return function(t){Na(e,t),Pa(e,0)}}function to(e){return async t=>{if(e.w===t){Ra(e,null);return}Ra(e,t),Ba(e,null),Va(e,``);try{let n=await M(`/api/repos/branches?repo=${encodeURIComponent(t)}`);e.w===t&&Ba(e,n.branches)}catch(t){Ra(e,null),e.j?.(String(t.message||t))}}}function no(e){return()=>e.s(!0)}function ro(e){return async t=>{t&&Sa(e,!0);try{let n=await M(`/api/repos${t?`?refresh`:``}`);Ri=n,Ma(e,n)}catch(t){e.j?.(String(t.message||t))}t&&Sa(e,!1)}}function io(e){return(t,n)=>{Na(e,``),Ra(e,null),e.l(t,n)}}S(`q1`,$a),S(`q0`,eo),S(`q5`,to),S(`q2`,no),S(`q3`,ro),S(`q4`,io);var ao=((e,t)=>`<div role=region><div><div><header><div><h1>New workspace</h1><p>Name the space and pick repos — or restore an archived one below.</p></div></header><!><label><span>Name</span><input placeholder=my-feature autofocus></label><section><div><h2>Repos</h2><button title="Refresh repo list" aria-label="Refresh repo list">${e}</button></div><ul><!><!></ul>${t}</section><!><div><button type=button>Cancel</button><button type=button> </button></div><!></div></div></div>`)(We,Ii),oo=((e,t)=>` D D D D D b m%b D b l D D b D/${e}&m D%b%l0${t}&l%b D b D m%n`)(Ye,Li),so=e=>I(e.a,`_w`),co=e=>I(e.a,`__`),lo=e=>I(e.a,`_w`),uo=e=>I(e.a,`_7`),fo=c(3,0,e=>E(e.b,e._.i)),po=e=>{fo._(e),I(e.a,[`_5`,`_o`])},mo=u(1,`<span></span>`,` `,lo,`<span>✓</span>`,` `,co),ho=F(65,e=>{I(e.a,[`_bm`,{_9:e.M===e._._.ai-1}]),mo(e,e.M===e._._.ai-1?0:1)},e=>e._._),go=ho,_o=(e,t)=>E(e.c,t),vo=R(0,`<li><!><!></li>`,` D%b%`,go,(e,t)=>_o(e,t[0])),yo=c(21,0,e=>vo(e,[e._.ah])),bo=e=>{yo._(e),I(e.a,`_8`)},xo=F(63,e=>E(e.a,e._._.ag),e=>e._._),So=me(`m10`,` `,` `,xo),Co=e=>{w(e.a),ne(e.a,So(e)),ee(e.a,`inline`),te(e.a,Bs(e)),s(e.a),t(e.a),Ee(e.a),h(e.a),De(e.a,{})},wo=x(15,e=>A(e.g,`disabled`,e._._.ab||!!e._._.ac)),To=F(61,wo,e=>e._._),Eo=g(`m13`,e=>P(e.g,`click`,function(){e._._.av(e.i)})),Do=e=>{To(e),Ao(e),I(e.a,`_be`),I(e.b,`_bf`),I(e.c,`_bg`),I(e.e,[`_bh`,`_o`]),I(e.g,[`_f`,`_bi`]),Eo(e)},Oo=u(6,`<span></span> Restoring…`,` `,so,`Restore`),ko=x(14,e=>Oo(e,e._._.ac===e.n?0:1)),Ao=F(62,e=>{wo(e),ko(e)},e=>e._._),jo=(e,t)=>E(e.d,t),Mo=x(12,e=>{A(e.e,`title`,e.k||e.l),E(e.f,e.k||e.l)}),No=N(10,Mo),Po=N(11,Mo),Fo=N(13,ko),Io=(e,t)=>Lo(e,t[0]),Lo=N(8,e=>{jo(e,e.i?.name),No(e,e.i?.display_path),Po(e,e.i?.path),Fo(e,e.i?.id)}),Ro=R(6,`<li><div><span> </span><span> </span></div><button type=button></button></li>`,` D D D l D m `,Do,Io),zo=c(26,0,e=>Ro(e,[e._.ak,`id`])),Bo=e=>{zo._(e),Vo._(e),I(e.a,`_ba`),I(e.b,`_1`),I(e.c,`_bl`),I(e.d,`_bb`),I(e.f,`_bc`),I(e.g,`_bd`)},Vo=c(26,0,e=>E(e.e,e._.al)),Ho=ge(17,e=>A(e.e,`disabled`,e._.ab)),Uo=g(`m11`,e=>P(e.e,`click`,function(){e._.au(e.h)})),Wo=e=>{Ho._(e),I(e.a,`_3`),I(e.b,`_4`),I(e.e,`_6`),Uo(e)},Go=N(7,e=>{E(e.c,e.h),A(e.e,`title`,`Remove ${e.h}`)}),Ko=u(3,`<span title="Base branch">⎇ <!></span>`,` Db%`,po),qo=N(8,e=>{Ko(e,+!e.i),fo(e)}),Jo=(e,t)=>{Go(e,t[0]?.fullName),qo(e,t[0]?.baseBranch)},Yo=o(60),Xo=N(58),Zo=x(54,e=>Xo(e,Vs(e)),6),Qo=x(41,e=>A(e.y,`disabled`,e.ab||!!e.ac||!e.a7.trim()),2),$o=C(33,e=>{ve(e,`k`,e.a7,Hs(e)),Zo(e),Qo(e)}),es=C(34,e=>{A(e.o,`disabled`,e.a8),we(e.p,e.a8&&`_v`)}),ts=N(55,e=>Za(e.t,Us(e))),ns=N(56),rs=R(17,`<li><span> </span><!><button>×</button></li>`,` D D l%b `,Wo,Jo),is=C(35,e=>{Ja(e.t,new Set(e.a9.map(e=>e.fullName))),Ds(e,e.a9?.length),ts(e,Ws(e)),ns(e,Gs(e)),rs(e,[e.a9,`fullName`]),Zo(e)}),as=g(`m15`,e=>n(e,{busy:e.ab,onMount:function(){let t=new AbortController;return T().addEventListener(`workspace.progress`,t=>{this.busy&&t.data?.message&&e.aq([t.data])},{signal:t.signal}),{abort:t}},onDestroy:function(){this.abort.abort()}})),os=x(53,as),ss=N(57),cs=x(40,e=>ss(e,Ks(e)),2),ls=u(21,`<ul></ul>`,` `,bo),us=x(45,e=>ls(e,e.ab&&e.ai?0:1)),ds=x(39,e=>A(e.x,`disabled`,e.ab||!!e.ac)),fs=L(To),ps=C(37,e=>{A(e.k,`disabled`,e.ab),Qa(e.t,e.ab),E(e.z,e.ab?`Creating…`:`Create workspace`),os(e),cs(e),us(e),ds(e),Qo(e),Ho(e),fs(e)}),ms=L(Ao),hs=C(38,e=>{cs(e),Zo(e),ds(e),Qo(e),ms(e)}),gs=u(7,d,(e=>`/${e}&`)(y),Co),_s=L(xo),vs=C(42,e=>{gs(e,+!e.ag),_s(e)}),ys=N(52,e=>{os(e),Zo(e)}),bs=x(51,e=>ys(e,qs(e)),2),xs=C(43,e=>{ks(e,e.ah?.length),bs(e),yo(e)}),Ss=(e,t)=>{Ps(e,t.op),Fs(e,t.last)},Cs=(e,t)=>{A(e.a,`aria-labelledby`,t),A(e.f,`id`,t)},ws=g(`m14`,e=>{Ae(e,`k`),P(e.o,`click`,function(){Yo(e)()}),P(e.x,`click`,function(){e.a6?.()}),P(e.y,`click`,function(){e.aw()})});function Ts(e){I(e.a,`_M`),I(e.b,`_N`),I(e.c,Pi),I(e.d,`_Q`),I(e.e,`_S`),I(e.f,`_R`),I(e.g,`_T`),I(e.i,`_Z`),I(e.j,`_bj`),I(e.k,`_bk`),I(e.l,`_0`),I(e.m,`_1`),I(e.n,`_bl`),I(e.o,Fi),pe(e.p),Ce(e.p,14),I(e.q,`_2`),i(e,19,Rs),Ua(e.t),Ka(e.t,Ys(e)),Ta(e.t,Js(e)),wa(e.t),I(e.w,`_W`),I(e.x,[`_f`,`_bn`]),I(e.y,[`_f`,`_g`,`_X`,`_bn`]),$o(e,``),es(e,!1),is(e,[]),ps(e,!1),hs(e,null),vs(e,null),xs(e,[]),Ss(e,{last:0,op:``}),Cs(e,k(e)),ws(e)}var Es=u(18,`<li>No repos yet — search below to add one (or create empty).</li>`,` `,uo),Ds=N(36,e=>Es(e,+!!e.aa)),Os=L(ho),ks=N(44,e=>{us(e),Os(e)}),As=N(46,e=>{Ms(e,e.ak?.length),zo(e)}),js=u(26,`<section><div><h2>Archived</h2><span> </span></div><p>Restore a parked space instead of creating a new one.</p><ul></ul></section>`,` D D b D m b `,Bo),Ms=N(47,e=>{js(e,+!e.al),Vo(e)}),Ns=(e,t)=>As(e,(t||[]).filter(e=>e.status===`archived`).slice().sort((e,t)=>t.created_at.localeCompare(e.created_at))),Ps=N(49,e=>{bs(e),Zo(e)}),Fs=N(50,e=>{bs(e),Zo(e)}),Is=N(30,cs),Ls=N(31,Zo),Rs=m(`m12`,N(60)),zs=N(32);function Bs(e){return function(){vs(e._,null)}}function Vs(e){return async()=>{if(e.ac)return;ps(e,!0),vs(e,null),xs(e,[]),e.an=Math.random().toString(36).slice(2,10);try{e.ao=(await M(`/api/progress`)).seq}catch{}let t=setInterval(async()=>{try{let t=await M(`/api/progress?since=${e.ao}&op=${e.an}`);e.aq(t.messages)}catch{}},800);try{let t=await M(`/api/workspaces`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({name:e.a7,repos:e.a9,opId:e.an})});ps(e,!1),e.a5?.(t)}catch(t){ps(e,!1),vs(e,String(t.message||t))}finally{clearInterval(t)}}}function Hs(e){return t=>{$o(e,t)}}function Us(e){return function(t,n){e.at(t,n)}}function Ws(e){return(t,n)=>{!t||e.a9.some(e=>e.fullName===t)||is(e,e.a9.concat({fullName:t,baseBranch:n}))}}function Gs(e){return t=>{is(e,e.a9.filter(e=>e.fullName!==t))}}function Ks(e){return async t=>{if(!(e.ab||e.ac)){vs(e,null),hs(e,t.id);try{await M(`/api/workspaces/${t.id}`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({action:`restore`})}),e.a4?.({...t,status:`active`})}catch(t){vs(e,String(t.message||t))}finally{hs(e,null)}}}}function qs(e){return t=>{for(let n of t)n.op===e.an&&(n.seq&&n.seq<=e.ao||(n.seq&&(e.ao=n.seq),xs(e,e.ah.concat(n.message))))}}function Js(e){return function(t){es(e,t)}}function Ys(e){return function(t){vs(e,t)}}S(`m6`,Bs),S(`m5`,Vs),S(`m0`,Hs),S(`m7`,Us),S(`m2`,Ws),S(`m3`,Gs),S(`m4`,Ks),S(`m1`,qs),S(`m9`,Js),S(`m8`,Ys);var Xs=`_cD _y`,Zs=`_cH _y`,Qs=`_cI _y`,$s=a,ec=(e=>`/${e}&`)(Ke);function tc(e){Je(e.a,`M18 8.4C18 6.70261 17.3679 5.07475 16.2426 3.87452C15.1174 2.67428 13.5913 2 12 2C10.4087 2 8.88258 2.67428 7.75736 3.87452C6.63214 5.07475 6 6.70261 6 8.4C6 15.8667 3 18 3 18H21C21 18 18 15.8667 18 8.4Z M13.73 21C13.5542 21.3031 13.3019 21.5547 12.9982 21.7295C12.6946 21.9044 12.3504 21.9965 12 21.9965C11.6496 21.9965 11.3054 21.9044 11.0018 21.7295C10.6982 21.5547 10.4458 21.3031 10.27 21`)}var nc=(e,t)=>ae(e.a,t),rc=(e,t)=>j(e.a,t),ic=a,ac=(e=>`/${e}&`)(Ke);function oc(e){Je(e.a,`M3 12H6L9 3L15 21L18 12H21`)}var sc=(e,t)=>ae(e.a,t),cc=(e,t)=>j(e.a,t),lc=`_fz _y`,uc=a,dc=(e=>`/${e}&`)(Ke);function fc(e){Je(e.a,`M14.3632 5.65156L15.8431 4.17157C16.6242 3.39052 17.8905 3.39052 18.6716 4.17157L20.0858 5.58579C20.8668 6.36683 20.8668 7.63316 20.0858 8.41421L18.6058 9.8942M14.3632 5.65156L4.74749 15.2672C4.41542 15.5993 4.21079 16.0376 4.16947 16.5054L3.92738 19.2459C3.87261 19.8659 4.39148 20.3848 5.0115 20.33L7.75191 20.0879C8.21972 20.0466 8.65806 19.8419 8.99013 19.5099L18.6058 9.8942M14.3632 5.65156L18.6058 9.8942`)}var pc=(e,t)=>ae(e.a,t),mc=(e,t)=>j(e.a,t),hc=`_fZ _j _fY`,gc=`_f0 _j _fY`,_c={open:`_f5`,merged:`_f6`,closed:`_f7`},vc=a,yc=(e=>`/${e}&`)(Ke);function bc(e){Je(e.a,`M6.75827 17.2426L12.0009 12M17.2435 6.75736L12.0009 12M12.0009 12L6.75827 6.75736M12.0009 12L17.2435 17.2426`)}var xc=(e,t)=>ae(e.a,t),Sc=(e,t)=>j(e.a,t),Cc=`<!><!><!>`,wc=(e,t)=>{let n=[`${e.worktree} — ${t.title}`];return t.state===`MERGED`?n.push(`merged`):t.state===`CLOSED`?n.push(`closed`):t.isDraft?n.push(`draft`):n.push(`open`),n.join(` · `)},Tc=e=>!e.state||e.state===`OPEN`,Ec=c(4,1,e=>A(e.a,`title`,`Clear #${e._.l} from this list`)),Dc=g(`r4`,e=>P(e.a,`click`,function(){e._._._._.m(e._._.f,e._.l)})),Oc=e=>{Ec._(e),I(e.a,[`_f1`,`_f2`,`_f3`]),bc(e.b),xc(e.b,12),Sc(e.b),Dc(e)},kc=x(10,e=>I(e.d,[`_f1`,`_f2`,`_f3`,{_f4:e._._.i===e.j}])),Ac=x(11,e=>A(e.d,`title`,e._._.i===e.j?`Really kill ${e.h}?`:`Kill ${e.h} (pid ${e.j})`),2),jc=F(17,e=>{kc(e),Ac(e)},e=>e._._),Mc=g(`r5`,e=>{P(e.b,`click`,function(){window.open(`http://${location.hostname}:${e.i}`,`_blank`,`noopener`)}),P(e.d,`click`,function(){e._._.i===e.j?(fl(e._._,null),fetch(`/api/procs/${e.j}`,{method:`DELETE`}).catch(()=>{})):e._._.l(e.j)})}),Nc=e=>{jc(e),I(e.a,[`_j`,gc]),I(e.b,[`_f1`,`_f8`]),bc(e.e),xc(e.e,12),Sc(e.e),Mc(e)},Pc=N(7,e=>{A(e.a,`title`,e.h),Ac(e)}),Fc=N(8,e=>{A(e.b,`title`,`Open http://${typeof location>`u`?`localhost`:location.hostname}:${e.i}`),E(e.c,e.i)}),Ic=N(9,e=>{kc(e),Ac(e)}),Lc=(e,t)=>{Pc(e,t[0]?.cmd),Fc(e,t[0]?.port),Ic(e,t[0]?.pid)},Rc=c(4,0,e=>A(e.a,`title`,`Review #${e._.l} diff`)),zc=g(`r3`,e=>P(e.a,`click`,function(){e._._._._.h?.(e._._.e,e._.l)})),Bc=e=>{Rc._(e),I(e.a,[`_f1`,`_f2`]),St(e.b),Ct(e.b,12),wt(e.b),zc(e)},Vc=x(14,e=>E(e.c,e._._.d(e._.c))),Hc=F(4,Vc,e=>e._._),Uc=e=>{Hc(e),Gc._(e)},Wc=x(7,e=>A(e.a,`title`,wc(e._.c,e.g))),Gc=ge(0,e=>{Wc(e),Vc(e)}),Kc=u(4,(e=>`<button type=button>${e}</button>`)(bt),(e=>` D/${e}&l`)(xt),Bc,(e=>`<button type=button>${e}</button>`)(vc),(e=>` D/${e}&l`)(yc),Oc),qc=x(13,e=>I(e.a,[`_j`,hc,{_l:e.m&&!e.i,_m:e.m&&e.i,[_c.merged]:e.j===`MERGED`,[_c.closed]:e.j===`CLOSED`}]),2),Jc=N(12,e=>{I(e.b,[`_f1`,{_f9:!e.m}]),Kc(e,+!e.m),qc(e)}),Yc=N(6,e=>{Xc(e,e.g?.isDraft),Zc(e,e.g?.state),Qc(e,e.g?.url),$c(e,e.g?.number),Jc(e,Tc(e.g)),Wc(e)}),Xc=N(8,qc),Zc=N(9,qc),Qc=(e,t)=>A(e.b,`href`,t),$c=N(11,e=>{E(e.d,e.l),Rc(e),Ec(e)}),el=R(0,`<span><a target=_blank rel=noopener><!>#<!></a><!></span>`,` D D%c%l%`,Uc,(e,t)=>Yc(e,t[0])),tl=(e,t)=>el(e,[t||[],`number`]),nl=(e,t)=>rl(e,t[0]),rl=N(2,e=>{tl(e,e.c?.prs),il(e,e.c?.worktree),al(e,e.c?.full_name),Gc(e)}),il=N(4),al=N(5),ol=N(3,L(Hc)),sl=R(1,`<!><!><!>`,`b%`,0,nl),cl=c(0,0,e=>{ol(e,Ol(e)),sl(e,[e._.n,`full_name`])}),ll=e=>{cl._(e),dl._(e),I(e.a,`_fX`)},ul=R(2,(e=>`<span><button type=button>:<!></button><button type=button>${e}</button></span>`)(vc),(e=>` D Db%l D/${e}&m`)(yc),Nc,Lc),dl=c(0,0,e=>ul(e,[e._.o,`port`])),fl=C(8,L(jc)),pl=(e,t)=>gl(e,t.timer);function ml(e){fl(e,null),pl(e,{timer:0})}var hl=N(11),gl=N(10,e=>hl(e,kl(e))),_l=N(12),vl=N(3,e=>_l(e,Al(e))),yl=u(0,`<div><!><!></div>`,` D%b%`,ll),bl=x(16,e=>yl(e,e.n.some(e=>(e.prs||[]).length)||e.p?0:1)),xl=N(13,e=>{bl(e),cl(e)}),Sl=(e,t)=>xl(e,t||[]),Cl=N(14,e=>{wl(e,e.o.length),dl(e)}),wl=N(15,bl),Tl=(e,t)=>Cl(e,t||[]),El=(e,t)=>{Sl(e,t?.repos),Tl(e,t?.ports)},Dl=N(7);function Ol(e){return t=>{if(e._.n.length<2)return``;let n=t.full_name.split(`/`)[1];return e._.n.some(e=>e.full_name!==t.full_name&&e.full_name.split(`/`)[1]===n)?t.full_name:n}}function kl(e){return t=>{clearTimeout(e.k),fl(e,t),e.k=setTimeout(()=>{fl(e,null)},3500)}}function Al(e){return(t,n)=>{fetch(`/api/workspaces/${e.d}/prs`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({fullName:t,number:n})}).catch(()=>{})}}S(`r2`,Ol),S(`r0`,kl),S(`r1`,Al);var jl=`<!><!><!>`,Ml=c(8,0,e=>E(e.b,e._.u)),Nl=e=>{Ml._(e),I(e.a,`_fN`)},Pl=c(4,0,e=>Jt(e.a,yt(e._.q))),Fl=e=>{Pl._(e),e.a,Gt(e.a,12),Yt(e.a,`_fK`)},Il=F(50,e=>ve(e,`c`,e._._._._.a3,qd(e)),e=>e._._._._),Ll=g(`s8`,e=>{Ae(e,`c`),P(e.c,`keydown`,function(t){t.key===`Enter`?(t.preventDefault(),e._._._._.a5(e._.c)):t.key===`Escape`&&(t.preventDefault(),gd(e._._._._,null))}),P(e.c,`blur`,function(){e._._._._.a5(e._.c)}),n(e,{onMount:function(){queueMicrotask(()=>{let t=e.c;t?.focus(),t?.select()})}})}),Rl=e=>{Il(e),zl._(e),Bl._(e),e.b,Gt(e.b,13),Yt(e.b,`_fW`),I(e.c,`_fT`),Ll(e)},zl=c(0,0,e=>Jt(e.b,yt(e._.c))),Bl=c(0,0,e=>I(e.a,[`_q`,Ne[_t(e._.g)],`_fS`])),Vl=x(9,e=>{I(e.i,[`_fJ`,{_fy:e._._._._.y===e._.d}]),A(e.i,`title`,e._._._._.y===e._.d?`Really kill this session?`:`Kill session`)}),Hl=F(48,Vl,e=>e._._._._),Ul=g(`s9`,e=>{P(e.a,`click`,function(){e._._._._.v?.(e._.d)}),P(e.g,`click`,function(){gd(e._._._._,e._.d),vd(e._._._._,e._.h||e._.i)}),P(e.i,`click`,function(){e._._._._.y===e._.d?(dd(e._._._._,null),e._._._._.w?.(e._.d)):e._._._._.a1(e._.d)})}),Wl=e=>{Hl(e),Gl._(e),Kl._(e),ql._(e),I(e.a,`_fV`),e.c,Gt(e.c,13),Yt(e.c,`_fW`),I(e.d,`_fQ`),I(e.f,`_fR`),I(e.g,`_fI`),fc(e.h),pc(e.h,12),mc(e.h),Ul(e)},Gl=c(0,1,e=>{Jt(e.c,yt(e._.c)),E(e.e,e._.c?.title||yt(e._.c))}),Kl=c(0,1,Vl),ql=c(0,1,e=>I(e.b,[`_q`,Ne[_t(e._.g)]])),Jl=x(4,e=>I(e.a,[`_fH`,{_fw:e.d===e._._._.u}])),Yl=F(46,Jl,e=>e._._._),Xl=e=>{Yl(e),$l(e)},Zl=u(0,(e=>`<span></span>${e}<input aria-label="Session name">`)(Ft),(e=>` b/${e}& b`)(`b%c`),Rl,((e,t)=>`<button><span></span>${e}<span> </span></button><div><button title="Rename session">${t}</button><button>×</button></div>`)(Ft,uc),((e,t)=>` D b/${e}& D m D D/${t}&l l`)(`b%c`,dc),Wl),Ql=x(5,e=>Zl(e,e._._._.a2===e.d?0:1)),$l=F(49,Ql,e=>e._._._),eu=N(3,e=>{Jl(e),Ql(e),Kl(e)}),tu=(e,t)=>nu(e,t[0]),nu=N(2,e=>{eu(e,e.c?.id),ru(e,e.c?.state),iu(e,e.c?.title),au(e,e.c?.agent),Gl(e),zl(e)}),ru=N(6,e=>{ql(e),Bl(e)}),iu=N(7),au=N(8),ou=g(`s6`,e=>P(e.a,`click`,function(){e._._._._.r?.()})),su=e=>{I(e.a,`_fI`),St(e.b),Ct(e.b,12),wt(e.b),ou(e)},cu=g(`s4`,e=>P(e.a,`click`,function(t,n){n.closest(`[popover]`)?.hidePopover(),e._._._._._.p?.(e.e)})),lu=e=>{I(e.a,`_bN`),e.b,Gt(e.b,14),Yt(e.b),cu(e)},uu=N(4,e=>{Jt(e.b,e.e),E(e.c,e.e)}),du=R(2,(e=>`<button>${e}<!></button>`)(Ft),(e=>` D/${e}&%l`)(`b%c`),lu,(e,t)=>uu(e,t[0])),fu=x(5,e=>du(e,[e.e?[...e._._._._.q||[],`shell`]:[],e=>e])),pu=F(43,fu,e=>e._._._._),mu=(e,t)=>{A(e.a,`popovertarget`,t),A(e.c,`id`,t)},hu=C(4,fu),gu=g(`s5`,e=>{P(e.a,`pointerdown`,function(){hu(e,!0)}),P(e.a,`focus`,function(){hu(e,!0)}),P(e.c,`toggle`,function(t,n){if(t.newState===`open`){hu(e,!0);let t=e.a.getBoundingClientRect();n.style.top=`${t.bottom+4}px`,n.style.left=`${Math.max(8,Math.min(t.left,window.innerWidth-n.offsetWidth-8))}px`}})}),_u=u(1,(e=>`<button title="New session">${e}</button><div popover=auto></div>`)(Ft),(e=>` D/${e}&l b`)(`b%c`),e=>{pu(e),I(e.a,`_fI`),e.b,Jt(e.b,`shell`),Gt(e.b,12),Yt(e.b),I(e.c,`_bM`),mu(e,k(e)),hu(e,!1),gu(e)}),vu=F(42,e=>_u(e,+!e._._._.p),e=>e._._._),yu=g(`s7`,e=>P(e.d,`click`,function(){e._._._.t?.()})),bu=e=>{vu(e),Su(e),Cu(e),I(e.a,`_fG`),Dt(e.e),Ot(e.e,12),kt(e.e),yu(e)},xu=u(2,(e=>`<button title="Review changes">${e}</button>`)(bt),(e=>` D/${e}&l`)(xt),su),Su=F(44,e=>xu(e,+!e._._._.r),e=>e._._._),Cu=F(45,e=>{I(e.d,[`_fI`,{_fx:e._._._.s}]),A(e.d,`aria-pressed`,e._._._.s?`true`:`false`)},e=>e._._._),wu=F(37,e=>E(e.b,e._._._.j?`Open`:``),e=>e._._._),Tu=e=>{wu(e),I(e.a,`_fO`)},Eu=F(34,e=>vl(e.n,e._._.f),e=>e._._),Du=g(`s10`,e=>{P(e.a,`click`,function(t){t.target?.closest(`button, input, a, [popover]`)||e._._.k()}),P(e.c,`click`,function(){e._._.k()})}),Ou=e=>{Eu(e),Au(e),Nu(e),Pu(e),zu(e),Bu(e),Vu(e),Hu._(e),Ku._(e),I(e.b,`_fE`),I(e.c,`_fF`),I(e.f,`_fL`),I(e.g,`_fM`),I(e.l,`_fU`),ml(e.n),Du(e)},ku=x(22,e=>I(e.a,[`_fC`,{_fw:e._._.j,_fD:e._._.n,_fB:e._._.o}]),2),Au=F(37,ku,e=>e._._),ju=R(12,`<div></div>`,` `,Xl,tu),Mu=(e,t)=>{Ju(e,t.length),Yu(e,t[0]),ju(e,[t.length>1?t:[],`id`])},Nu=F(39,e=>Mu(e,e._._.m||[]),e=>e._._),Pu=F(40,ku,e=>e._._),Fu=u(9,`<span> </span>`,` D `,Tu),Iu=u(10,(e=>`<div><!><!><button title="Manage workspace">${e}</button></div>`)(Tt),(e=>` D%b%b D/${e}&m`)(Et),bu),Lu=u(8,`<span> </span>`,` D `,Nl),Ru=x(21,e=>Lu(e,e._._.o&&e.u?0:1)),zu=F(41,e=>{Fu(e,+!e._._.o),Iu(e,+!!e._._.o),ku(e),Ru(e)},e=>e._._),Bu=F(47,e=>Dl(e.n,e._._.x),e=>e._._),Vu=F(51,e=>E(e.h,e._._.a7),e=>e._._),Hu=c(0,1,e=>El(e.n,e._.b)),Uu=N(20,e=>{Ru(e),Ml(e)}),Wu=x(19,e=>Uu(e,e.p===0?e.s:e.p===1?e.r||``:`${e.p} sessions`),2),Gu=N(18,Wu),Ku=c(0,1,e=>{I(e.d,[`_q`,Ne[e._.c],`_fP`]),Gu(e,e._.c===`working`?`Working`:e._.c===`waiting`?`Needs you`:e._.c===`idle`?`Idle`:`Off`)}),qu=u(4,(e=>`<!>${e}<!>`)(Ft),(e=>`b/${e}&b`)(`b%c`),Fl),Ju=N(15,e=>{qu(e,e.p===1?0:1),Wu(e)}),Yu=N(16,e=>{Xu(e,e.q?.title),Pl(e)}),Xu=N(17,Wu),Zu=F(37,e=>I(e.a,[lc,{_fw:e._._.j}]),e=>e._._),Qu=g(`s3`,e=>P(e.a,`click`,function(){e._._.k()})),$u=e=>{Zu(e),ed(e),td(e),nd._(e),Qu(e)},ed=F(38,e=>E(e.b,(e._._.l??0)+1),e=>e._._),td=F(51,e=>A(e.a,`title`,e._._.a7),e=>e._._),nd=c(0,0,e=>I(e.c,[`_q`,Ne[e._.c],`_fA`])),rd=N(2,e=>{nd(e),Ku(e)}),id=N(1,e=>{rd(e,gt(e.b)),Hu(e)}),ad=x(3,e=>id(e,e._.h[e._.f])),od=c(0,0,ad),sd=e=>{od._(e),cd._(e),ud._(e)},cd=c(0,0,ad),ld=u(0,`<button> <span></span></button>`,` D b `,$u,(e=>`<section><div><button><span></span><!><span><span> </span><!></span><!></button><!></div><div><!>${e}</div></section>`)(Cc),(e=>` D D D b%b D D l%l%l%l D%b/${e}&m`)(`b%c`),Ou),ud=c(0,0,e=>ld(e,+!e._.i)),dd=C(24,L(Hl)),fd=(e,t)=>xd(e,t.timer),pd=N(31),md=x(30,e=>pd(e,Jd(e)),2),hd=L($l),gd=C(28,e=>{md(e),hd(e)}),_d=L(Il),vd=C(29,e=>{md(e),_d(e)});function yd(e){dd(e,null),fd(e,{timer:0}),gd(e,null),vd(e,``)}var bd=N(27),xd=N(26,e=>bd(e,Yd(e))),Sd=N(3,md),Cd=u(0,`<!><!><!>`,`b%`,sd),wd=(e,t)=>{Td(e,t?.name),Cd(e,+!t)},Td=N(33,L(td,Vu)),Ed=x(6,e=>wd(e,e.e.find(t=>t.id===e.f))),Dd=N(4,Ed),Od=L(Eu),kd=N(5,e=>{Ed(e),od(e),Od(e)}),Ad=N(7,cd),jd=N(8,ud),Md=N(9,L(Zu,Au,wu)),Nd=N(10),Pd=N(11,L(ed)),Fd=N(12,L(Nu)),Id=N(13,L(Pu)),Ld=N(14,L(zu)),Rd=N(15,L(vu)),zd=N(16,L(pu)),Bd=N(17,L(Su)),Vd=N(18,L(Cu)),Hd=N(19),Ud=N(20,L(Yl)),Wd=N(21),Gd=N(22),Kd=N(23,L(Bu));function qd(e){return t=>{vd(e._._._._,t)}}function Jd(e){return t=>{if(e.a2!==t.id)return;let n=e.a3.trim();gd(e,null),n&&e.d?.(t,n)}}function Yd(e){return t=>{clearTimeout(e.a0),dd(e,t),e.a0=setTimeout(()=>{dd(e,null)},3500)}}S(`s0`,qd),S(`s2`,Jd),S(`s1`,Yd);var Xd=a,Zd=(e=>`/${e}&`)(Ke);function Qd(e){Je(e.a,`M18 6H20M22 6H20M20 6V4M20 6V8 M21.4 20H2.6C2.26863 20 2 19.7314 2 19.4V11H21.4C21.7314 11 22 11.2686 22 11.6V19.4C22 19.7314 21.7314 20 21.4 20Z M2 11V4.6C2 4.26863 2.26863 4 2.6 4H8.77805C8.92127 4 9.05977 4.05124 9.16852 4.14445L12.3315 6.85555C12.4402 6.94876 12.5787 7 12.722 7H14`)}var $d=(e,t)=>ae(e.a,t),ef=(e,t)=>j(e.a,t),tf=a,nf=(e=>`/${e}&`)(Ke);function rf(e){Je(e.a,`M19 21L5 21C3.89543 21 3 20.1046 3 19L3 5C3 3.89543 3.89543 3 5 3L19 3C20.1046 3 21 3.89543 21 5L21 19C21 20.1046 20.1046 21 19 21Z M7.25 10L5.5 12L7.25 14 M9.5 21V3`)}var af=(e,t)=>ae(e.a,t),of=(e,t)=>j(e.a,t),sf=`<aside><!><div></div><!><div></div></aside>`,cf=` D%b b%b l`,lf=e=>{xe(e.a),ye(e.a,15),He(e.a)},uf=e=>{rf(e.a),af(e.a,15),of(e.a)},df=e=>I(e.a,`_cN`),ff=e=>I(e.a,`_cN`),pf=F(66,e=>{I(e.a,[Qs,{_cC:e._._.ac}]),A(e.a,`title`,e._._.ac?`Disable agent-waiting notifications`:`Notify when an agent is waiting`)},e=>e._._),mf=g(`t22`,e=>P(e.a,`click`,function(){e._._.ag()})),hf=e=>{pf(e),tc(e.b),nc(e.b,15),rc(e.b),mf(e)},gf=F(66,e=>{I(e.a,[Qs,`_cM`,{_cC:e._._.ac}]),A(e.a,`title`,e._._.ac?`Disable agent-waiting notifications`:`Notify when an agent is waiting`)},e=>e._._),_f=g(`t17`,e=>P(e.a,`click`,function(){e._._.ag()})),vf=e=>{gf(e),tc(e.b),nc(e.b,16),rc(e.b),_f(e)},yf=c(4,1,e=>{I(e.d,[Xs,{_cC:e._.a9===`usage`}]),A(e.d,`aria-pressed`,e._.a9===`usage`?`true`:`false`),I(e.f,[Xs,{_cC:e._.a9===`new`}]),A(e.f,`aria-pressed`,e._.a9===`new`?`true`:`false`)}),bf=g(`t23`,e=>{P(e.a,`click`,function(){Fm(e._,!e._.ab),_(e._.ab)}),P(e.d,`click`,function(){e._.af(),e._.s?.()}),P(e.f,`click`,function(){e._.af(),e._.a2?.()})}),xf=e=>{yf._(e),Cf._(e),Tf._(e),I(e.a,Zs),I(e.b,[`_p`,`_cS`]),oc(e.e),sc(e.e,15),cc(e.e),Qd(e.g),$d(e.g,16),ef(e.g),bf(e)},Sf=u(0,tf,(e=>`/${e}&`)(nf),uf,Fe,(e=>`/${e}&`)(je),lf),Cf=c(4,1,e=>{A(e.a,`title`,e._.ab?`Collapse sidebar`:`Expand sidebar`),Sf(e,+!e._.ab)}),wf=u(2,(e=>`<button>${e}</button>`)($s),(e=>` D/${e}&l`)(ec),hf),Tf=c(4,1,e=>wf(e,+!e._.ae)),Ef=c(4,0,e=>{I(e.a,[`_cO`,{_cC:e._.a9===`new`}]),A(e.a,`aria-pressed`,e._.a9===`new`?`true`:`false`)}),Df=g(`t21`,e=>P(e.a,`click`,function(){e._.af(),e._.a2?.()})),Of=e=>{Ef._(e),Qd(e.b),$d(e.b,16),ef(e.b),Df(e)},kf=x(8,e=>Bd(e.b,hh(e)),4),Af=F(55,kf,e=>e._._),jf=g(`t20`,e=>{P(e.a,`mouseenter`,function(){e._.i()}),P(e.a,`mouseleave`,function(){e._.j()})}),Mf=e=>{Af(e),Nf(e),Ff(e),If(e),Rf(e),zf(e),Bf(e),Wf(e),Gf(e),Kf(e),qf(e),Jf(e),Yf(e),Zf._(e),$f._(e),ep._(e),I(e.a,`_cT`),yd(e.b),Id(e.b,!0),Hd(e.b,gh(e)),jd(e.b),Pd(e.b),Ld(e.b),jf(e)},Nf=F(56,e=>zd(e.b,e._._.v),e=>e._._),Pf=x(3,e=>Rd(e.b,_h(e))),Ff=F(57,Pf,e=>e._._),If=F(58,kf,e=>e._._),Lf=x(6,e=>Fd(e.b,e.c===e._._.a5&&e._._.y?e._._.y:e._._.ak[e.c]?.sessions||[]),3),Rf=F(59,Lf,e=>e._._),zf=F(60,e=>Sd(e.b,e._._.a0),e=>e._._),Bf=F(61,e=>Gd(e.b,e._._.a1),e=>e._._),Vf=x(5,e=>Md(e.b,e._._.ao&&e.c===e._._.a5),2),Hf=x(4,e=>Vd(e.b,e._._.a9===`manage`&&e.c===e._._.a5),2),Uf=x(7,e=>Ud(e.b,e.c===e._._.a5&&e._._.a9===`term`?e._._.a7:null),3),Wf=F(62,e=>{Nd(e.b,bh(e)),Kd(e.b,yh(e)),Wd(e.b,vh(e)),Vf(e),Hf(e),kf(e),Lf(e),Uf(e)},e=>e._._),Gf=F(63,Uf,e=>e._._),Kf=F(64,e=>{Hf(e),kf(e),Uf(e)},e=>e._._),qf=F(70,e=>Dd(e.b,e._._.aj),e=>e._._),Jf=F(71,e=>{Ad(e.b,e._._.ak),Lf(e)},e=>e._._),Yf=F(73,Vf,e=>e._._),Xf=N(2,e=>{kd(e.b,e.c),Vf(e),Hf(e),Pf(e),kf(e),Lf(e),Uf(e)}),Zf=c(1,0,e=>Xf(e,e._.d)),Qf=x(9,e=>Se(e.a,`top:${e._.e}px;left:${e._.f}px`)),$f=c(1,0,Qf),ep=c(1,0,Qf),tp=x(4,e=>Md(e.b,e._._.ao&&e.d===e._._.a5),2),np=F(62,e=>{Nd(e.b,xh(e)),tp(e)},e=>e._._),rp=g(`t19`,e=>{P(e.a,`mouseenter`,function(t,n){e._.i();let r=n.getBoundingClientRect();pp(e._,{id:e.d,top:r.top,left:r.right+8})}),P(e.a,`mouseleave`,function(){e._.j()})}),ip=e=>{np(e),ap(e),op(e),sp(e),yd(e.b),jd(e.b,!0),Sd(e.b),Fd(e.b),Id(e.b),Ld(e.b),Rd(e.b),zd(e.b),Bd(e.b),Vd(e.b),Hd(e.b),Ud(e.b),Wd(e.b),Gd(e.b),Kd(e.b),rp(e)},ap=F(70,e=>Dd(e.b,e._._.aj),e=>e._._),op=F(71,e=>Ad(e.b,e._._.ak),e=>e._._),sp=F(73,tp,e=>e._._),cp=(e,t)=>Pd(e.b,t),lp=N(3,e=>{kd(e.b,e.d),tp(e)}),up=R(0,(e=>`<span>${e}</span>`)(jl),(e=>` D/${e}&l`)(`b%c`),ip,(e,t)=>{lp(e,t[0]),cp(e,t[1])}),dp=c(3,0,e=>up(e,[e._.ah,e=>e])),fp=u(1,(e=>`<div>${e}</div>`)(jl),(e=>` D/${e}&l`)(`b%c`),Mf),pp=C(2,e=>{gp(e,e.c?.id),_p(e,e.c?.top),vp(e,e.c?.left),fp(e,+!e.c)}),mp=(e,t)=>xp(e,t.timer),hp=e=>{dp._(e),I(e.a,`_cQ`),pp(e,null),mp(e,{timer:0})},gp=N(3,Zf),_p=N(4,$f),vp=N(5,ep),yp=N(8),bp=N(9),xp=N(7,e=>{yp(e,Sh(e)),bp(e,Ch(e))}),Sp=x(12,e=>Bd(e.c,wh(e)),4),Cp=ge(2,Sp),wp=e=>{Cp._(e),Tp._(e),Dp._(e),Op._(e),Ap._(e),jp._(e),Mp._(e),Bp._(e),Vp._(e),Hp._(e),Up._(e),Wp._(e),Gp._(e),Kp._(e),qp._(e),Jp._(e),yd(e.c),Hd(e.c,Th(e)),jd(e.c),Pd(e.c),Id(e.c)},Tp=ge(2,e=>zd(e.c,e._.v)),Ep=x(5,e=>Rd(e.c,Eh(e)),2),Dp=ge(2,Ep),Op=ge(2,Sp),kp=x(9,e=>Fd(e.c,e.e===e._.a5&&e._.y?e._.y:e._.ak[e.e]?.sessions||[]),3),Ap=ge(2,kp),jp=ge(2,e=>Sd(e.c,e._.a0)),Mp=ge(2,e=>Gd(e.c,e._.a1)),Np=u(0,`<h2>Current</h2>`,` `,ff),Pp=x(7,e=>Np(e,e._.am&&e.e===e._.a5?0:1),2),Fp=u(1,`<h2>Other spaces</h2>`,` `,df),Ip=x(11,e=>Fp(e,e._.am&&e.e!==e._.a5&&e.e===e._.ar?0:1),3),Lp=x(8,e=>Md(e.c,e._.ao&&e.e===e._.a5),2),Rp=x(6,e=>Vd(e.c,e._.a9===`manage`&&e.e===e._.a5),2),zp=x(10,e=>Ud(e.c,e.e===e._.a5&&e._.a9===`term`?e._.a7:null),3),Bp=D(2,31,4,e=>{Nd(e.c,kh(e)),Kd(e.c,Oh(e)),Wd(e.c,Dh(e)),Pp(e),Ip(e),Lp(e),Rp(e),Sp(e),kp(e),zp(e)}),Vp=ge(2,zp),Hp=ge(2,e=>{Rp(e),Sp(e),zp(e)}),Up=ge(2,Ep),Wp=ge(2,e=>Dd(e.c,e._.aj)),Gp=ge(2,e=>{Ad(e.c,e._.ak),kp(e)}),Kp=ge(2,e=>{Ld(e.c,e._.am),Pp(e),Ip(e)}),qp=ge(2,Lp),Jp=D(2,53,4,Ip),Yp=N(4,e=>{kd(e.c,e.e),Pp(e),Ip(e),Lp(e),Rp(e),Ep(e),Sp(e),kp(e),zp(e)}),Xp=(e,t)=>Yp(e,t[0]),Zp=c(1,0,e=>{I(e.e,[Xs,`_cM`,{_cC:e._.a9===`usage`}]),A(e.e,`aria-pressed`,e._.a9===`usage`?`true`:`false`)}),Qp=g(`t18`,e=>P(e.e,`click`,function(){e._.af(),e._.s?.()})),$p=e=>{Zp._(e),tm._(e),I(e.a,`_cJ`),I(e.b,`_cK`),I(e.c,`_cL`),oc(e.f),sc(e.f,16),cc(e.f),Qp(e)},em=u(3,(e=>`<button>${e}</button>`)($s),(e=>` D/${e}&l`)(ec),vf),tm=c(1,0,e=>em(e,+!e._.ae)),nm=L(ap,qf),rm=N(45,e=>{Wp(e),nm(e)}),im=x(30,e=>rm(e,e.q||[e.a3])),am=N(29,e=>{hm(e,e.a3?.id),im(e)}),om=R(2,(e=>`<!><!><!>${e}<!>`)(jl),(e=>`b%b%b/${e}&b`)(`b%c`),wp,Xp),sm=(e,t)=>om(e,[t,e=>e]),cm=x(52,e=>sm(e,e.am?[e.a5,...e.ap]:e.ah),3),lm=N(51,e=>{Xm(e,e.ap?.[0]),cm(e)}),um=x(44,e=>lm(e,e.ah.filter(t=>t!==e.a5))),dm=N(43,e=>{um(e),cm(e),dp(e)}),fm=x(32,e=>dm(e,e.q?.length?e.q.filter(e=>e.status===`active`).map(e=>e.id):[e.a5])),pm=x(47,e=>e.ak[e.a5]),mm=L(np,Wf),hm=N(31,e=>{fm(e),pm(e),um(e),cm(e),Bp(e),mm(e)}),gm=am,_m=L(Gf),vm=Oe(33,e=>{Vp(e),_m(e)}),ym=x(10,e=>vm(e,e.i,e.j)),bm=N(8,ym),xm=N(9,ym),Sm=N(41,Up),Cm=u(1,(e=>`<header><h1>Workspaces</h1><div><!><button title=Usage>${e}</button></div></header>`)(ic),(e=>` D b D%b D/${e}&n`)(ac),$p),wm=u(4,(e=>`<button title="New workspace">${e} New workspace</button>`)(Xd),(e=>` D/${e}&l`)(Zd),Of,((e,t)=>`<button></button><div></div><!><button title=Usage>${e}</button><button title="New workspace">${t}</button>`)(ic,Xd),((e,t)=>` b b%b D/${e}&l D/${t}&l`)(ac,Zd),xf),Tm=x(49,e=>I(e.a,[`_cG`,{_cE:!e.ab,_cF:e.am}])),Em=N(48,e=>{Cm(e,+!e.am),wm(e,+!e.am),cm(e),Tm(e),Kp(e)}),Dm=L(sp,Yf),Om=N(50,e=>{qp(e),Dm(e)}),km=L(Kf),Am=Oe(35,e=>{A(e.a,`hidden`,e.a9===`diff`),Sm(e,Ah(e)),Em(e,e.a9===`nav`),Om(e,e.a9!==`usage`&&e.a9!==`new`),Zp(e),Hp(e),km(e),Ef(e),yf(e)}),jm=x(13,e=>Am(e,e.l,e.m)),Mm=N(11,jm),Nm=N(12,jm),Pm=u(3,`<div></div><!><!>`,` b%`,hp),Fm=C(37,e=>{Pm(e,+!!e.ab),Tm(e),Cf(e)}),Im=N(42),Lm=x(39,e=>Im(e,jh(e))),Rm=L(gf,pf),zm=C(38,e=>{Lm(e),Rm(e)}),Bm=g(`t25`,e=>n(e,{onMount:function(){Vm(e,lt()),e.ae&&ut().then(t=>{zm(e,!!t)})}})),Vm=C(40,e=>{tm(e),Tf(e),Bm(e)});function Hm(e){I(e.c,`_cP`),I(e.e,`_cR`),Fm(e,le()),zm(e,!1),Vm(e,!1)}var Um=N(14,Lm),Wm=g(`t24`,e=>{e.p&&Fm(e,le())}),Gm=N(15,Wm),Km=N(16,e=>{fm(e),im(e)}),qm=L(op,Jf),Jm=N(46,e=>{pm(e),Gp(e),qm(e)}),Ym=(e,t)=>Jm(e,t||{}),Xm=N(53,Jp),Zm=N(18),Qm=L(Af),$m=N(19,e=>{Cp(e),Qm(e)}),eh=N(20),th=L(Nf),nh=N(21,e=>{Tp(e),th(e)}),rh=L(Ff),ih=N(22,e=>{Dp(e),rh(e)}),ah=L(If),oh=N(23,e=>{Op(e),ah(e)}),sh=L(Rf),ch=N(24,e=>{Ap(e),sh(e)}),lh=N(25),uh=L(zf),dh=N(26,e=>{jp(e),uh(e)}),fh=L(Bf),ph=N(27,e=>{Mp(e),fh(e)}),mh=N(28);function hh(e){return function(){pp(e._,null),e.c===e._._.a5?e._._.a9===`diff`?Am(e._._,`term`):e._._.x?.():(nt(e.c),e._._.t?.(e.c))}}function gh(e){return function(){pp(e._,null),e._._.u?.(e.c)}}function _h(e){return function(t){pp(e._,null),e._._.w(e.c,t)}}function vh(e){return function(t){pp(e._,null),e.c===e._._.a5?(vm(e._._,t),Am(e._._,`term`)):e._._.z?.(e.c,t)}}function yh(e){return function(t,n){pp(e._,null);let r=`${t}/${n}`;e.c===e._._.a5?e._._.x?.(r):(nt(e.c,r),e._._.t?.(e.c))}}function bh(e){return function(){pp(e._,null),e.c===e._._.a5?(e._._.a9===`manage`||e._._.a9===`usage`||e._._.a9===`new`)&&Am(e._._,`term`):e._._.t?.(e.c)}}function xh(e){return function(){e.d===e._._.a5?(e._._.a9===`manage`||e._._.a9===`usage`||e._._.a9===`new`)&&Am(e._._,`term`):e._._.t?.(e.d)}}function Sh(e){return()=>clearTimeout(e.h)}function Ch(e){return()=>{clearTimeout(e.h),e.h=setTimeout(()=>{pp(e,null)},150)}}function wh(e){return function(){e.e===e._.a5?e._.a9===`diff`?Am(e._,`term`):e._.x?.():(nt(e.e),e._.t?.(e.e))}}function Th(e){return function(){e._.u?.(e.e)}}function Eh(e){return function(t){e._.af(),e._.w(e.e,t)}}function Dh(e){return function(t){e.e===e._.a5?(vm(e._,t),Am(e._,`term`)):e._.z?.(e.e,t)}}function Oh(e){return function(t,n){let r=`${t}/${n}`;e.e===e._.a5?e._.x?.(r):(nt(e.e,r),e._.t?.(e.e))}}function kh(e){return function(){e.e===e._.a5?(e._.a9===`nav`||e._.a9===`manage`||e._.a9===`usage`||e._.a9===`new`)&&Am(e._,`term`):(e._.af(),e._.t?.(e.e))}}function Ah(e){return()=>{e.a9===`nav`&&Am(e,`term`)}}function jh(e){return async()=>{try{e.ac?(await ft(),zm(e,!1)):(zm(e,await dt()),e.ac||e.o?.(`Notifications blocked — allow them for this site in browser/system settings.`))}catch(t){zm(e,!1),e.o?.(`Notifications failed: ${String(t.message||t)}`)}}}S(`t14`,hh),S(`t12`,gh),S(`t13`,_h),S(`t16`,vh),S(`t15`,yh),S(`t11`,bh),S(`t10`,xh),S(`t8`,Sh),S(`t9`,Ch),S(`t5`,wh),S(`t3`,Th),S(`t4`,Eh),S(`t7`,Dh),S(`t6`,Oh),S(`t2`,kh),S(`t0`,Ah),S(`t1`,jh);var Mh=`_cU _O`,Nh=`_cV _T`,Ph=`_dm _y`,Fh=((e,t)=>`<div role=region><div><div><header><div><h1>Manage</h1><p><span> </span><!><span aria-hidden=true>·</span><span> </span></p></div></header><!><!><section><div><h2>Repos</h2><span> </span><div></div><button title="Refresh repo list" aria-label="Refresh repo list">${e}</button></div><ul><!><!></ul><!><div>${t}</div></section><!><section><div><h2>Workspace</h2></div><div><!><button type=button> </button></div><p>Archive hides the space from the list. Delete removes it and its worktrees.</p></section></div></div></div>`)(We,Ii),Ih=((e,t)=>` D D D D D b D D l%b b D o%b%b D D b D l b D/${e}&m D%b%l%b D0${t}&m%b D D l D%b D m o`)(Ye,Li),Lh=new Map,Rh=g(`k13`,e=>P(e.a,`click`,function(){window.open(`http://${location.hostname}:${e.d}`,`_blank`,`noopener`)})),zh=e=>{I(e.a,[`_j`,`_dg`]),Rh(e)},Bh=N(3,e=>{A(e.a,`title`,`Open http://${typeof location>`u`?`localhost`:location.hostname}:${e.d}`),E(e.b,e.d)}),Vh=R(0,`<button>:<!></button>`,` Db%`,zh,(e,t)=>Bh(e,t[0])),Hh=c(4,0,e=>Vh(e,[e._.k,e=>String(e)])),Uh=e=>{Hh._(e),I(e.a,`_da`)},Wh=e=>I(e.a,`_dh`),Gh=e=>{I(e.a,[`_c8`,`_c7`]),I(e.b,`_w`),I(e.c,`_c9`),I(e.d,`_db`)},Kh=(e,t)=>E(e.e,t),qh=(e,t)=>Kh(e,t[0]),Jh=e=>I(e.a,`_w`),Yh=c(7,0,e=>E(e.b,e._.o)),Xh=e=>{Yh._(e),I(e.a,[`_dc`,`_o`])},Zh=e=>I(e.a,[`_cZ`,`_c0`]),Qh=g(`k14`,e=>P(e.f,`click`,function(){e._._.ba(e.m)})),$h=e=>{I(e.a,`_c8`),I(e.b,`_c9`),I(e.c,[`_c_`,`_o`]),I(e.f,[`_dd`,`_df`]),Qh(e)},eg=(e,t)=>A(e.b,`title`,t),tg=(e,t)=>E(e.d,t),ng=u(4,`<span></span>`,` `,Uh),rg=(e,t)=>ng(e,+!t),ig=N(12,e=>{A(e.f,`title`,`Kill ${e.m}`),A(e.f,`aria-label`,`Kill process ${e.m}`)}),ag=(e,t)=>{eg(e,t[0]?.args),tg(e,t[0]?.cmd),og(e,t[0]?.ports),ig(e,t[0]?.pid)},og=N(10,e=>{rg(e,e.k?.length),Hh(e)}),sg=R(5,`<li><div><span> </span><!></div><button type=button>×</button></li>`,` D D D l%l `,$h,ag),cg=c(30,0,e=>sg(e,[e._.bd,`pid`])),lg=e=>{cg._(e),ug._(e),I(e.a,`_c2`),I(e.b,`_c3`),I(e.c,`_dn`),I(e.d,`_c4`),I(e.f,`_c6`)},ug=c(30,0,e=>E(e.e,e._.be)),dg=c(14,0,e=>E(e.c,e._.at)),fg=e=>{dg._(e),I(e.a,`_c1`),I(e.b,`_w`)},pg=x(2,e=>{I(e.a,[`_dd`,`_df`,{_de:e._._.as===e._.m}]),E(e.b,e._._.as===e._.m?`Remove?`:`×`)}),mg=x(3,e=>A(e.a,`title`,e._._.as===e._.m?`Really remove ${e._.l}/? Uncommitted changes are lost.`:`Remove ${e._.l}/`),2),hg=F(86,e=>{pg(e),mg(e)},e=>e._._),gg=g(`k11`,e=>P(e.a,`click`,function(){e._._.as===e._.k?.full_name?(s_(e._._,null),e._._.b8(e._.k)):(s_(e._._,e._.k?.full_name),setTimeout(()=>{s_(e._._,null)},4e3))})),_g=e=>{hg(e),vg._(e),yg._(e),gg(e)},vg=c(8,1,mg),yg=c(8,1,e=>{pg(e),mg(e)}),bg=c(35,1,e=>A(e.a,`disabled`,!!e._.ap)),xg=g(`k16`,e=>P(e.a,`click`,function(){e._.b9(`restore`)})),Sg=e=>{bg._(e),I(e.a,[`_f`,`_dk`]),xg(e)},Cg=c(35,0,e=>{A(e.a,`disabled`,!!e._.ap),E(e.b,e._.ap===`archive`?`Archiving…`:`Archive`)}),wg=g(`k15`,e=>P(e.a,`click`,function(){e._.b9(`archive`)})),Tg=e=>{Cg._(e),I(e.a,[`_f`,`_dk`]),wg(e)},Eg=F(84,e=>E(e.a,e._._.ao),e=>e._._),Dg=me(`k10`,` `,` `,Eg),Og=e=>{w(e.a),ne(e.a,Dg(e)),ee(e.a,`inline`),te(e.a,U_(e)),s(e.a),t(e.a),Ee(e.a),h(e.a),De(e.a,{})},kg=u(8,`<span></span>`,` `,Jh,`<button> </button>`,` D `,_g),Ag=x(13,e=>kg(e,+!e._.am.has(e.m))),jg=ge(24,Ag),Mg=e=>{jg._(e),I(e.a,`_c8`),I(e.b,`_c9`),I(e.c,[`_c_`,`_o`]),I(e.e,`_da`),I(e.f,`_db`)},Ng=N(11,e=>{E(e.d,e.l),vg(e)}),Pg=N(12,e=>{E(e.g,e.m),Ag(e),yg(e)}),Fg=u(7,`<span title="Base branch">⎇ <!></span>`,` Db%`,Xh),Ig=x(16,e=>Fg(e,+(e.o===e.p))),Lg=N(14,e=>{Ig(e),Yh(e)}),Rg=N(15,Ig),zg=(e,t)=>Bg(e,t[0]),Bg=N(10,e=>{Ng(e,e.k?.worktree),Pg(e,e.k?.full_name),Lg(e,e.k?.base_branch),Rg(e,e.k?.default_branch)}),Vg=o(74),Hg=C(46,e=>{A(e.v,`disabled`,e.ak),we(e.w,e.ak&&`_v`)}),Ug=N(69,e=>Za(e.a2,W_(e))),Wg=x(82,e=>Ug(e,G_(e)),2),Gg=N(70),Kg=x(81,e=>Gg(e,K_(e)),2),qg=N(68,e=>{Wg(e),Kg(e)}),Jg=R(25,`<li><span></span><div><span>Adding <!>…</span></div></li>`,` D b D Db%`,Gh,qh),Yg=x(80,e=>Jg(e,[[...e.am].filter(t=>!e.b5.has(t)),e=>e])),Xg=C(48,e=>{__(e,e.am?.size),qg(e,q_(e)),Wg(e),Kg(e),Yg(e),jg(e)}),Zg=u(13,d,(e=>`/${e}&`)(y),Og),Qg=L(Eg),$g=C(50,e=>{Zg(e,+!e.ao),Qg(e)}),e_=g(`k18`,e=>n(e,{busyCount:e.an,pendingAction:e.ap,onMount:function(){let t=new AbortController,n=t.signal;return T().addEventListener(`workspace.progress`,t=>{(this.pendingAction||this.busyCount)&&t.data?.message&&t.data.op===e.ax&&c_(e,t.data.message)},{signal:n}),e.b4(n),{abort:t}},onDestroy:function(){this.abort.abort()}})),t_=x(79,e_,3),n_=u(14,`<p><span></span> </p>`,` D b `,fg),r_=x(56,e=>n_(e,e.ap&&e.at?0:1)),i_=x(53,e=>E(e.ab,e.ap===`delete`?`Deleting…`:e.aq?`Really delete?`:`Delete`)),a_=C(51,e=>{A(e.aa,`disabled`,!!e.ap),t_(e),r_(e),i_(e),Cg(e),bg(e)}),o_=C(52,e=>{I(e.aa,[`_f`,`_i`,`_dk`,{_h:e.aq}]),i_(e)}),s_=C(54,L(hg)),c_=C(55,e=>{r_(e),dg(e)}),l_=(e,t)=>{A(e.a,`aria-labelledby`,t),A(e.f,`id`,t)},u_=g(`k17`,e=>{P(e.v,`click`,function(){Vg(e)()}),P(e.aa,`click`,function(){e.aq?(o_(e,!1),e.b9(`delete`)):(o_(e,!0),setTimeout(()=>{o_(e,!1)},4e3))})});function d_(e){I(e.a,`_M`),I(e.b,`_N`),I(e.c,Mh),I(e.d,`_Q`),I(e.e,`_S`),I(e.f,`_R`),I(e.g,Nh),I(e.h,`_cW`),I(e.k,`_cX`),I(e.l,[`_cY`,`_o`]),I(e.p,`_c2`),I(e.q,`_c3`),I(e.r,`_dn`),I(e.s,`_c4`),I(e.u,`_p`),I(e.v,Ph),pe(e.w),Ce(e.w,14),I(e.x,`_c6`),I(e.a1,`_c5`),i(e,28,B_),Ua(e.a2),Ka(e.a2,Y_(e)),Ta(e.a2,J_(e)),wa(e.a2),Qa(e.a2),I(e.a5,[`_c2`,`_di`]),I(e.a6,`_c3`),I(e.a7,`_dn`),I(e.a8,`_dj`),I(e.ac,`_dl`),Hg(e,!1),Xg(e,new Set),$g(e,null),a_(e,null),o_(e,!1),s_(e,null),c_(e,null),l_(e,k(e)),u_(e)}var f_=N(75,e=>{H_(e,e.bd.length),cg(e)}),p_=C(47,e=>f_(e,e.al||[])),m_=(e,t)=>p_(e,Lh.get(`procs:${t}`)||null),h_=u(26,`<p>No repos yet — search below to add one.</p>`,` `,Wh),g_=x(78,e=>h_(e,!e.b3&&!e.an?0:1)),__=N(49,e=>{t_(e),g_(e)}),v_=N(71),y_=x(77,e=>v_(e,X_(e)),2),b_=e=>{A(e.g,`title`,e.az||e.b0),E(e.m,e.az||e.b0)},x_=Oe(57,e=>{S_(e,e.av),Kg(e),y_(e),b_(e)}),S_=e=>{T_(e,e.av?.id),O_(e,e.av?.repos),A_(e,e.av?.display_path),j_(e,e.av?.path),M_(e,e.av?.name),F_(e,e.av?.status)},C_=N(72),w_=N(66,e=>{C_(e,Z_(e)),t_(e)}),T_=N(59,e=>{w_(e,Q_(e)),t_(e),Wg(e)}),E_=N(67,e=>{Ja(e.a2,e.b5),Yg(e)}),D_=R(24,`<li><div><span><!>/</span><span><span> </span><!></span></div><!></li>`,` D D D%l D D l%m%`,Mg,zg),O_=N(60,e=>{k_(e,e.ay?.length),E_(e,new Set(e.ay.map(e=>e.full_name))),D_(e,[e.ay,`full_name`])}),k_=N(65,e=>{E(e.t,e.b3),g_(e)}),A_=N(61),j_=N(62),M_=N(63,e=>E(e.i,e.b1)),N_=u(9,`<span>Archived</span>`,` `,Zh),P_=u(35,`<button type=button> </button>`,` D `,Tg,`<button type=button>Restore</button>`,` `,Sg),F_=N(64,e=>{N_(e,+(e.b2===`active`)),P_(e,e.b2===`active`?0:1)}),I_=x(44,e=>x_(e,e.af,e.ah)),L_=N(41,e=>{m_(e,e.af?.id),I_(e)}),R_=N(43,e=>{I_(e),y_(e)}),z_=N(45,y_),B_=m(`k12`,N(74)),V_=u(30,`<section><div><h2>Running</h2><span> </span></div><ul></ul></section>`,` D D b D m `,lg),H_=N(76,e=>{V_(e,+!e.be),ug(e)});function U_(e){return function(){$g(e._,null)}}function W_(e){return function(t,n){e.b7(t,n)}}function G_(e){return async(t,n)=>{if(!(!t||e.am.has(t))){$g(e,null),e.b6(t,!0);try{x_(e,await M(`/api/workspaces/${e.ax}/repos`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({fullName:t,baseBranch:n})}))}catch(t){$g(e,String(t.message||t))}e.b6(t,!1)}}}function K_(e){return async t=>{if(!e.am.has(t.full_name)){$g(e,null),e.b6(t.full_name,!0);try{await M(`/api/workspaces/${e.av?.id}/repos/${encodeURIComponent(t.worktree)}`,{method:`DELETE`}),x_(e,{...e.av,repos:(e.av?.repos).filter(e=>e.full_name!==t.full_name)})}catch(t){$g(e,String(t.message||t))}e.b6(t.full_name,!1)}}}function q_(e){return(t,n)=>{let r=new Set(e.am);n?r.add(t):r.delete(t),Xg(e,r)}}function J_(e){return function(t){Hg(e,t)}}function Y_(e){return function(t){$g(e,t)}}function X_(e){return async t=>{$g(e,null),a_(e,t),c_(e,null);try{await M(`/api/workspaces/${e.av?.id}`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({action:t})}),t===`archive`?e.ah?.({...e.av,status:`archived`}):t===`delete`&&e.aj?.()}catch(t){$g(e,String(t.message||t))}finally{a_(e,null),c_(e,null)}}}function Z_(e){return async t=>{await fetch(`/api/procs/${t}`,{method:`DELETE`}),setTimeout(()=>e.b4(void 0),500)}}function Q_(e){return async t=>{try{let n=await M(`/api/workspaces/${e.ax}/procs`,{signal:t});p_(e,n),Lh.set(`procs:${e.ax}`,n)}catch{}}}S(`k6`,U_),S(`k7`,W_),S(`k2`,G_),S(`k3`,K_),S(`k1`,q_),S(`k9`,J_),S(`k8`,Y_),S(`k4`,X_),S(`k5`,Z_),S(`k0`,Q_);var $_=`_cb _O _P`,ev=`_cc _y`,tv=(e=>`<div role=region><div><div><header><div><h1>Usage</h1><p>Provider plan windows across your agents.</p></div><div><button title="Refresh usage" aria-label="Refresh usage">${e}</button></div></header><!></div></div></div>`)(We),nv=(e=>` D D D D D b l D D/${e}&n%n`)(Ye);function rv(e){let t=Math.round(e/6e4);if(t<60)return`${t}m`;let n=Math.round(t/60);return n<48?`${n}h`:`${Math.round(n/24)}d`}function iv(e,t){if(!e)return null;let n=new Date(e).getTime()-Date.now();return n<=0?t?null:`now`:rv(n)}var av=c(8,0,e=>E(e.b,e._.o)),ov=e=>{av._(e),I(e.a,`_cl`)},sv=(e,t)=>E(e.i,t?`↻ ${Xe(t)}`:``),cv=x(13,e=>sv(e,iv(e.m,e._.n!=null))),lv=ge(7,cv),uv=e=>{lv._(e),I(e.a,`_cm`),I(e.b,`_cn`),I(e.d,`_co`),I(e.h,`_cz`)},dv=x(16,e=>A(e.a,`title`,`${e.o}: ${e.p}% used${e.m?` — resets ${new Date(e.m).toLocaleString()}`:``}`),2),fv=N(15,e=>{E(e.g,e.p),dv(e)}),pv=(e,t)=>I(e.e,[`_cp`,t]),mv=(e,t)=>I(e.f,[`_cu`,t]),hv=(e,t)=>{Se(e.e,`width:${Math.min(100,Math.max(2,t))}%`),fv(e,Math.round(t)),pv(e,t>=90?`_ct`:t>=70?`_cs`:t>=40?`_cr`:`_cq`),mv(e,t>=90?`_cy`:t>=70?`_cx`:t>=40?`_cw`:`_cv`)},gv=N(12,e=>{cv(e),dv(e)}),_v=N(14,e=>{E(e.c,e.o),dv(e)}),vv=(e,t)=>{hv(e,t[0]?.used_percent),gv(e,t[0]?.resets_at),_v(e,t[0]?.window)},yv=x(2,e=>A(e.a,`title`,`${e._.o||`couldn't reach this provider`} — these are the last cached numbers, ${rv(e._.n*1e3)} old`)),bv=c(5,0,e=>{E(e.b,rv(e._.n*1e3)),yv(e)}),xv=e=>{bv._(e),Sv._(e),I(e.a,`_cj`)},Sv=c(5,0,yv),Cv=c(4,0,e=>E(e.b,e._.m.replace(/^default_/,``).replaceAll(`_`,` `))),wv=e=>{Cv._(e),I(e.a,`_ci`)},Tv=e=>{I(e.a,`_cg`),I(e.b,`_ch`),I(e.c,`_cA`)},Ev=(e,t)=>E(e.d,t),Dv=u(4,`<span> </span>`,` D `,wv),Ov=N(12,e=>{Dv(e,+!e.m),Cv(e)}),kv=u(5,`<span>⚠ <!> old</span>`,` Db%`,xv),Av=N(13,e=>{I(e.g,[`_ck`,{_cB:e.n!=null}]),kv(e,+(e.n==null)),bv(e),lv(e)}),jv=R(7,`<div><span> </span><span><span></span></span><span><!>%</span><span> </span></div>`,` D D l D l D%l D `,uv,vv),Mv=(e,t)=>jv(e,[t||[],`window`]),Nv=u(8,`<p> </p>`,` D `,ov),Pv=N(14,e=>{Nv(e,+!e.o),Sv(e),av(e)}),Fv=(e,t)=>{Ev(e,t[0]?.agent),Ov(e,t[0]?.plan),Av(e,t[0]?.stale_seconds),Pv(e,t[0]?.note),Mv(e,t[0]?.windows)},Iv=e=>{I(e.a,[`_n`,`_ce`]),I(e.b,`_w`)},Lv=R(0,`<div><div><strong> </strong><!><!></div><div><!><!></div></div>`,` D D D l%b%l D%b%`,Tv,Fv),Rv=c(10,2,e=>Lv(e,[e._.n||[],e=>`${e.agent}-${e.account||``}`])),zv=e=>{Rv._(e),I(e.a,`_cf`)},Bv=c(10,1,e=>E(e.b,e._.m)),Vv=u(10,`<p><span></span> Loading usage…</p>`,` D `,Iv,`<p> </p>`,` D `,e=>{Bv._(e),I(e.a,[`_n`,`_ce`])},`<div></div>`,` `,zv),Hv=C(11,e=>{Uv(e,e.l?.error),Wv(e,e.l?.agents),Vv(e,e.l?e.l?.error?1:2:0)}),Uv=N(12,Bv),Wv=N(13,Rv),Gv=C(14,e=>{A(e.i,`disabled`,e.o),we(e.j,e.o&&`_v`)}),Kv=N(16),qv=g(`x3`,e=>n(e,{onMount:function(){e.p(!1)}})),Jv=N(15,e=>{Kv(e,Qv(e)),qv(e)}),Yv=(e,t)=>{A(e.a,`aria-labelledby`,t),A(e.f,`id`,t)},Xv=g(`x2`,e=>P(e.i,`click`,function(){e.q()}));function Zv(e){I(e.a,`_M`),I(e.b,`_N`),I(e.c,$_),I(e.d,`_Q`),I(e.e,`_S`),I(e.f,`_R`),I(e.g,`_T`),I(e.h,`_U`),I(e.i,[ev,`_cd`]),pe(e.j),Ce(e.j,14),Hv(e,null),Gv(e,!1),Jv(e,$v(e)),Yv(e,k(e)),Xv(e)}function Qv(e){return async()=>{Gv(e,!0),await e.p(!0),Gv(e,!1)}}function $v(e){return async t=>{try{Hv(e,await M(`/api/usage${t?`?refresh`:``}`))}catch(t){Hv(e,{error:String(t.message||t)})}}}S(`x1`,Qv),S(`x0`,$v);var ey=Object.defineProperty,ty=Object.getOwnPropertyDescriptor,ny=(e,t)=>{for(var n in t)ey(e,n,{get:t[n],enumerable:!0})},ry=(e,t,n,r)=>{for(var i=r>1?void 0:r?ty(t,n):t,a=e.length-1,o;a>=0;a--)(o=e[a])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&ey(t,n,i),i},z=(e,t)=>(n,r)=>t(n,r,e),iy=`Terminal input`,ay={get:()=>iy,set:e=>iy=e},oy=`Too much output to announce, navigate to rows manually to read`,sy={get:()=>oy,set:e=>oy=e};function cy(e){return e.replace(/\r?\n/g,`\r`)}function ly(e,t){return t?`\x1B[200~`+e+`\x1B[201~`:e}function uy(e,t){e.clipboardData&&e.clipboardData.setData(`text/plain`,t.selectionText),e.preventDefault()}function dy(e,t,n,r){e.stopPropagation(),e.clipboardData&&fy(e.clipboardData.getData(`text/plain`),t,n,r)}function fy(e,t,n,r){e=cy(e),e=ly(e,n.decPrivateModes.bracketedPasteMode&&r.rawOptions.ignoreBracketedPasteMode!==!0),n.triggerDataEvent(e,!0),t.value=``}function py(e,t,n){let r=n.getBoundingClientRect(),i=e.clientX-r.left-10,a=e.clientY-r.top-10;t.style.width=`20px`,t.style.height=`20px`,t.style.left=`${i}px`,t.style.top=`${a}px`,t.style.zIndex=`1000`,t.focus()}function my(e,t,n,r,i){py(e,t,n),i&&r.rightClickSelect(e),t.value=r.selectionText,t.select()}function hy(e){return e>65535?(e-=65536,String.fromCharCode((e>>10)+55296)+String.fromCharCode(e%1024+56320)):String.fromCharCode(e)}function gy(e,t=0,n=e.length){let r=``;for(let i=t;i<n;++i){let t=e[i];t>65535?(t-=65536,r+=String.fromCharCode((t>>10)+55296)+String.fromCharCode(t%1024+56320)):r+=String.fromCharCode(t)}return r}var _y=class{constructor(){this._interim=0}clear(){this._interim=0}decode(e,t){let n=e.length;if(!n)return 0;let r=0,i=0;if(this._interim){let n=e.charCodeAt(i++);56320<=n&&n<=57343?t[r++]=(this._interim-55296)*1024+n-56320+65536:(t[r++]=this._interim,t[r++]=n),this._interim=0}for(let a=i;a<n;++a){let i=e.charCodeAt(a);if(55296<=i&&i<=56319){if(++a>=n)return this._interim=i,r;let o=e.charCodeAt(a);56320<=o&&o<=57343?t[r++]=(i-55296)*1024+o-56320+65536:(t[r++]=i,t[r++]=o);continue}i!==65279&&(t[r++]=i)}return r}},vy=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(e,t){let n=e.length;if(!n)return 0;let r=0,i,a,o,s,c=0,l=0;if(this.interim[0]){let i=!1,a=this.interim[0];a&=(a&224)==192?31:(a&240)==224?15:7;let o=0,s;for(;(s=this.interim[++o]&63)&&o<4;)a<<=6,a|=s;let c=(this.interim[0]&224)==192?2:(this.interim[0]&240)==224?3:4,u=c-o;for(;l<u;){if(l>=n)return 0;if(s=e[l++],(s&192)!=128){l--,i=!0;break}this.interim[o++]=s,a<<=6,a|=s&63}i||(c===2?a<128?l--:t[r++]=a:c===3?a<2048||a>=55296&&a<=57343||a===65279||(t[r++]=a):a<65536||a>1114111||(t[r++]=a)),this.interim.fill(0)}let u=n-4,d=l;for(;d<n;){for(;d<u&&!((i=e[d])&128)&&!((a=e[d+1])&128)&&!((o=e[d+2])&128)&&!((s=e[d+3])&128);)t[r++]=i,t[r++]=a,t[r++]=o,t[r++]=s,d+=4;if(i=e[d++],i<128)t[r++]=i;else if((i&224)==192){if(d>=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128){d--;continue}if(c=(i&31)<<6|a&63,c<128){d--;continue}t[r++]=c}else if((i&240)==224){if(d>=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,r;if(o=e[d++],(o&192)!=128){d--;continue}if(c=(i&15)<<12|(a&63)<<6|o&63,c<2048||c>=55296&&c<=57343||c===65279)continue;t[r++]=c}else if((i&248)==240){if(d>=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,r;if(o=e[d++],(o&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,this.interim[2]=o,r;if(s=e[d++],(s&192)!=128){d--;continue}if(c=(i&7)<<18|(a&63)<<12|(o&63)<<6|s&63,c<65536||c>1114111)continue;t[r++]=c}}return r}},yy=``,by=` `,xy=class e{constructor(){this.fg=0,this.bg=0,this.extended=new Sy}static toColorRGB(e){return[e>>>16&255,e>>>8&255,e&255]}static fromColorRGB(e){return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255}clone(){let t=new e;return t.fg=this.fg,t.bg=this.bg,t.extended=this.extended.clone(),t}isInverse(){return this.fg&67108864}isBold(){return this.fg&134217728}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:this.fg&268435456}isBlink(){return this.fg&536870912}isInvisible(){return this.fg&1073741824}isItalic(){return this.bg&67108864}isDim(){return this.bg&134217728}isStrikethrough(){return this.fg&2147483648}isProtected(){return this.bg&536870912}isOverline(){return this.bg&1073741824}getFgColorMode(){return this.fg&50331648}getBgColorMode(){return this.bg&50331648}isFgRGB(){return(this.fg&50331648)==50331648}isBgRGB(){return(this.bg&50331648)==50331648}isFgPalette(){return(this.fg&50331648)==16777216||(this.fg&50331648)==33554432}isBgPalette(){return(this.bg&50331648)==16777216||(this.bg&50331648)==33554432}isFgDefault(){return!(this.fg&50331648)}isBgDefault(){return!(this.bg&50331648)}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(this.fg&50331648){case 16777216:case 33554432:return this.fg&255;case 50331648:return this.fg&16777215;default:return-1}}getBgColor(){switch(this.bg&50331648){case 16777216:case 33554432:return this.bg&255;case 50331648:return this.bg&16777215;default:return-1}}hasExtendedAttrs(){return this.bg&268435456}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(this.bg&268435456&&~this.extended.underlineColor)switch(this.extended.underlineColor&50331648){case 16777216:case 33554432:return this.extended.underlineColor&255;case 50331648:return this.extended.underlineColor&16777215;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return this.bg&268435456&&~this.extended.underlineColor?this.extended.underlineColor&50331648:this.getFgColorMode()}isUnderlineColorRGB(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)==16777216||(this.extended.underlineColor&50331648)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return this.bg&268435456&&~this.extended.underlineColor?!(this.extended.underlineColor&50331648):this.isFgDefault()}getUnderlineStyle(){return this.fg&268435456?this.bg&268435456?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}},Sy=class e{constructor(e=0,t=0){this._ext=0,this._urlId=0,this._ext=e,this._urlId=t}get ext(){return this._urlId?this._ext&-469762049|this.underlineStyle<<26:this._ext}set ext(e){this._ext=e}get underlineStyle(){return this._urlId?5:(this._ext&469762048)>>26}set underlineStyle(e){this._ext&=-469762049,this._ext|=e<<26&469762048}get underlineColor(){return this._ext&67108863}set underlineColor(e){this._ext&=-67108864,this._ext|=e&67108863}get urlId(){return this._urlId}set urlId(e){this._urlId=e}get underlineVariantOffset(){let e=(this._ext&3758096384)>>29;return e<0?e^4294967288:e}set underlineVariantOffset(e){this._ext&=536870911,this._ext|=e<<29&3758096384}clone(){return new e(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}},Cy=class e extends xy{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new Sy,this.combinedData=``}static fromCharData(t){let n=new e;return n.setFromCharData(t),n}isCombined(){return this.content&2097152}getWidth(){return this.content>>22}getChars(){return this.content&2097152?this.combinedData:this.content&2097151?hy(this.content&2097151):``}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):this.content&2097151}setFromCharData(e){this.fg=e[0],this.bg=0;let t=!1;if(e[1].length>2)t=!0;else if(e[1].length===2){let n=e[1].charCodeAt(0);if(55296<=n&&n<=56319){let r=e[1].charCodeAt(1);56320<=r&&r<=57343?this.content=(n-55296)*1024+r-56320+65536|e[2]<<22:t=!0}else t=!0}else this.content=e[1].charCodeAt(0)|e[2]<<22;t&&(this.combinedData=e[1],this.content=2097152|e[2]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},wy=`di$target`,Ty=`di$dependencies`,Ey=new Map;function Dy(e){return e[Ty]||[]}function Oy(e){if(Ey.has(e))return Ey.get(e);let t=function(e,n,r){if(arguments.length!==3)throw Error(`@IServiceName-decorator can only be used to decorate a parameter`);ky(t,e,r)};return t._id=e,Ey.set(e,t),t}function ky(e,t,n){t[wy]===t?t[Ty].push({id:e,index:n}):(t[Ty]=[{id:e,index:n}],t[wy]=t)}var Ay=Oy(`BufferService`),jy=Oy(`CoreMouseService`),My=Oy(`CoreService`),Ny=Oy(`CharsetService`),Py=Oy(`InstantiationService`),Fy=Oy(`LogService`),Iy=Oy(`OptionsService`),Ly=Oy(`OscLinkService`),Ry=Oy(`UnicodeService`),zy=Oy(`DecorationService`),By=class{constructor(e,t,n){this._bufferService=e,this._optionsService=t,this._oscLinkService=n}provideLinks(e,t){let n=this._bufferService.buffer.lines.get(e-1);if(!n){t(void 0);return}let r=[],i=this._optionsService.rawOptions.linkHandler,a=new Cy,o=n.getTrimmedLength(),s=-1,c=-1,l=!1;for(let t=0;t<o;t++)if(!(c===-1&&!n.hasContent(t))){if(n.loadCell(t,a),a.hasExtendedAttrs()&&a.extended.urlId){if(c===-1){c=t,s=a.extended.urlId;continue}l=a.extended.urlId!==s}else c!==-1&&(l=!0);if(l||c!==-1&&t===o-1){let n=this._oscLinkService.getLinkData(s)?.uri;if(n){let a={start:{x:c+1,y:e},end:{x:t+ +(!l&&t===o-1),y:e}},s=!1;if(!i?.allowNonHttpProtocols)try{let e=new URL(n);[`http:`,`https:`].includes(e.protocol)||(s=!0)}catch{s=!0}s||r.push({text:n,range:a,activate:(e,t)=>i?i.activate(e,t,a):Vy(e,t),hover:(e,t)=>i?.hover?.(e,t,a),leave:(e,t)=>i?.leave?.(e,t,a)})}l=!1,a.hasExtendedAttrs()&&a.extended.urlId?(c=t,s=a.extended.urlId):(c=-1,s=-1)}}t(r)}};By=ry([z(0,Ay),z(1,Iy),z(2,Ly)],By);function Vy(e,t){if(confirm(`Do you want to navigate to ${t}?
|
|
4
4
|
|
|
5
5
|
WARNING: This link could potentially be dangerous`)){let e=window.open();if(e){try{e.opener=null}catch{}e.location.href=t}else console.warn(`Opening link blocked as opener could not be cleared`)}}var Hy=Oy(`CharSizeService`),Uy=Oy(`CoreBrowserService`),Wy=Oy(`MouseService`),Gy=Oy(`RenderService`),Ky=Oy(`SelectionService`),qy=Oy(`CharacterJoinerService`),Jy=Oy(`ThemeService`),Yy=Oy(`LinkProviderService`),Xy=new class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?nb.isErrorNoTelemetry(e)?new nb(e.message+`
|
|
6
6
|
|
|
@@ -83,4 +83,4 @@ out vec4 outColor;
|
|
|
83
83
|
void main() {
|
|
84
84
|
outColor = v_color;
|
|
85
85
|
}`,Ok=8,kk=Ok*Float32Array.BYTES_PER_ELEMENT,Ak=20*Ok,jk=class{constructor(){this.attributes=new Float32Array(Ak),this.count=0}},Mk=0,Nk=0,Pk=0,Fk=0,Ik=0,Lk=0,Rk=0,zk=class extends fD{constructor(e,t,n,r){super(),this._terminal=e,this._gl=t,this._dimensions=n,this._themeService=r,this._vertices=new jk,this._verticesCursor=new jk;let i=this._gl;this._program=PD(ak(i,Ek,Dk)),this._register(lD(()=>i.deleteProgram(this._program))),this._projectionLocation=PD(i.getUniformLocation(this._program,`u_projection`)),this._vertexArrayObject=i.createVertexArray(),i.bindVertexArray(this._vertexArrayObject);let a=new Float32Array([0,0,1,0,0,1,1,1]),o=i.createBuffer();this._register(lD(()=>i.deleteBuffer(o))),i.bindBuffer(i.ARRAY_BUFFER,o),i.bufferData(i.ARRAY_BUFFER,a,i.STATIC_DRAW),i.enableVertexAttribArray(3),i.vertexAttribPointer(3,2,this._gl.FLOAT,!1,0,0);let s=new Uint8Array([0,1,2,3]),c=i.createBuffer();this._register(lD(()=>i.deleteBuffer(c))),i.bindBuffer(i.ELEMENT_ARRAY_BUFFER,c),i.bufferData(i.ELEMENT_ARRAY_BUFFER,s,i.STATIC_DRAW),this._attributesBuffer=PD(i.createBuffer()),this._register(lD(()=>i.deleteBuffer(this._attributesBuffer))),i.bindBuffer(i.ARRAY_BUFFER,this._attributesBuffer),i.enableVertexAttribArray(0),i.vertexAttribPointer(0,2,i.FLOAT,!1,kk,0),i.vertexAttribDivisor(0,1),i.enableVertexAttribArray(1),i.vertexAttribPointer(1,2,i.FLOAT,!1,kk,2*Float32Array.BYTES_PER_ELEMENT),i.vertexAttribDivisor(1,1),i.enableVertexAttribArray(2),i.vertexAttribPointer(2,4,i.FLOAT,!1,kk,4*Float32Array.BYTES_PER_ELEMENT),i.vertexAttribDivisor(2,1),this._updateCachedColors(r.colors),this._register(this._themeService.onChangeColors(e=>{this._updateCachedColors(e),this._updateViewportRectangle()}))}renderBackgrounds(){this._renderVertices(this._vertices)}renderCursor(){this._renderVertices(this._verticesCursor)}_renderVertices(e){let t=this._gl;t.useProgram(this._program),t.bindVertexArray(this._vertexArrayObject),t.uniformMatrix4fv(this._projectionLocation,!1,ik),t.bindBuffer(t.ARRAY_BUFFER,this._attributesBuffer),t.bufferData(t.ARRAY_BUFFER,e.attributes,t.DYNAMIC_DRAW),t.drawElementsInstanced(this._gl.TRIANGLE_STRIP,4,t.UNSIGNED_BYTE,0,e.count)}handleResize(){this._updateViewportRectangle()}setDimensions(e){this._dimensions=e}_updateCachedColors(e){this._bgFloat=this._colorToFloat32Array(e.background),this._cursorFloat=this._colorToFloat32Array(e.cursor)}_updateViewportRectangle(){this._addRectangleFloat(this._vertices.attributes,0,0,0,this._terminal.cols*this._dimensions.device.cell.width,this._terminal.rows*this._dimensions.device.cell.height,this._bgFloat)}updateBackgrounds(e){let t=this._terminal,n=this._vertices,r=1,i,a,o,s,c,l,u,d,f,p,m;for(i=0;i<t.rows;i++){for(o=-1,s=0,c=0,l=!1,a=0;a<t.cols;a++)u=(i*t.cols+a)*bk,d=e.cells[u+xk],f=e.cells[u+Sk],p=!!(f&67108864),(d!==s||f!==c&&(l||p))&&((s!==0||l&&c!==0)&&(m=r++*Ok,this._updateRectangle(n,m,c,s,o,a,i)),o=a,s=d,c=f,l=p);(s!==0||l&&c!==0)&&(m=r++*Ok,this._updateRectangle(n,m,c,s,o,t.cols,i))}n.count=r}updateCursor(e){let t=this._verticesCursor,n=e.cursor;if(!n||n.style===`block`){t.count=0;return}let r,i=0;(n.style===`bar`||n.style===`outline`)&&(r=i++*Ok,this._addRectangleFloat(t.attributes,r,n.x*this._dimensions.device.cell.width,n.y*this._dimensions.device.cell.height,n.style===`bar`?n.dpr*n.cursorWidth:n.dpr,this._dimensions.device.cell.height,this._cursorFloat)),(n.style===`underline`||n.style===`outline`)&&(r=i++*Ok,this._addRectangleFloat(t.attributes,r,n.x*this._dimensions.device.cell.width,(n.y+1)*this._dimensions.device.cell.height-n.dpr,n.width*this._dimensions.device.cell.width,n.dpr,this._cursorFloat)),n.style===`outline`&&(r=i++*Ok,this._addRectangleFloat(t.attributes,r,n.x*this._dimensions.device.cell.width,n.y*this._dimensions.device.cell.height,n.width*this._dimensions.device.cell.width,n.dpr,this._cursorFloat),r=i++*Ok,this._addRectangleFloat(t.attributes,r,(n.x+n.width)*this._dimensions.device.cell.width-n.dpr,n.y*this._dimensions.device.cell.height,n.dpr,this._dimensions.device.cell.height,this._cursorFloat)),t.count=i}_updateRectangle(e,t,n,r,i,a,o){if(n&67108864)switch(n&50331648){case 16777216:case 33554432:Mk=this._themeService.colors.ansi[n&255].rgba;break;case 50331648:Mk=(n&16777215)<<8;break;case 0:default:Mk=this._themeService.colors.foreground.rgba}else switch(r&50331648){case 16777216:case 33554432:Mk=this._themeService.colors.ansi[r&255].rgba;break;case 50331648:Mk=(r&16777215)<<8;break;case 0:default:Mk=this._themeService.colors.background.rgba}e.attributes.length<t+4&&(e.attributes=sk(e.attributes,this._terminal.rows*this._terminal.cols*Ok)),Nk=i*this._dimensions.device.cell.width,Pk=o*this._dimensions.device.cell.height,Fk=(Mk>>24&255)/255,Ik=(Mk>>16&255)/255,Lk=(Mk>>8&255)/255,Rk=1,this._addRectangle(e.attributes,t,Nk,Pk,(a-i)*this._dimensions.device.cell.width,this._dimensions.device.cell.height,Fk,Ik,Lk,Rk)}_addRectangle(e,t,n,r,i,a,o,s,c,l){e[t]=n/this._dimensions.device.canvas.width,e[t+1]=r/this._dimensions.device.canvas.height,e[t+2]=i/this._dimensions.device.canvas.width,e[t+3]=a/this._dimensions.device.canvas.height,e[t+4]=o,e[t+5]=s,e[t+6]=c,e[t+7]=l}_addRectangleFloat(e,t,n,r,i,a,o){e[t]=n/this._dimensions.device.canvas.width,e[t+1]=r/this._dimensions.device.canvas.height,e[t+2]=i/this._dimensions.device.canvas.width,e[t+3]=a/this._dimensions.device.canvas.height,e[t+4]=o[0],e[t+5]=o[1],e[t+6]=o[2],e[t+7]=o[3]}_colorToFloat32Array(e){return new Float32Array([(e.rgba>>24&255)/255,(e.rgba>>16&255)/255,(e.rgba>>8&255)/255,(e.rgba&255)/255])}},Bk=class extends fD{constructor(e,t,n,r,i,a,o,s){super(),this._container=t,this._alpha=i,this._coreBrowserService=a,this._optionsService=o,this._themeService=s,this._deviceCharWidth=0,this._deviceCharHeight=0,this._deviceCellWidth=0,this._deviceCellHeight=0,this._deviceCharLeft=0,this._deviceCharTop=0,this._canvas=this._coreBrowserService.mainDocument.createElement(`canvas`),this._canvas.classList.add(`xterm-${n}-layer`),this._canvas.style.zIndex=r.toString(),this._initCanvas(),this._container.appendChild(this._canvas),this._register(this._themeService.onChangeColors(t=>{this._refreshCharAtlas(e,t),this.reset(e)})),this._register(lD(()=>{this._canvas.remove()}))}_initCanvas(){this._ctx=PD(this._canvas.getContext(`2d`,{alpha:this._alpha})),this._alpha||this._clearAll()}handleBlur(e){}handleFocus(e){}handleCursorMove(e){}handleGridChanged(e,t,n){}handleSelectionChanged(e,t,n,r=!1){}_setTransparency(e,t){if(t===this._alpha)return;let n=this._canvas;this._alpha=t,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,n),this._refreshCharAtlas(e,this._themeService.colors),this.handleGridChanged(e,0,e.rows-1)}_refreshCharAtlas(e,t){this._deviceCharWidth<=0&&this._deviceCharHeight<=0||(this._charAtlas=ZO(e,this._optionsService.rawOptions,t,this._deviceCellWidth,this._deviceCellHeight,this._deviceCharWidth,this._deviceCharHeight,this._coreBrowserService.dpr,2048),this._charAtlas.warmUp())}resize(e,t){this._deviceCellWidth=t.device.cell.width,this._deviceCellHeight=t.device.cell.height,this._deviceCharWidth=t.device.char.width,this._deviceCharHeight=t.device.char.height,this._deviceCharLeft=t.device.char.left,this._deviceCharTop=t.device.char.top,this._canvas.width=t.device.canvas.width,this._canvas.height=t.device.canvas.height,this._canvas.style.width=`${t.css.canvas.width}px`,this._canvas.style.height=`${t.css.canvas.height}px`,this._alpha||this._clearAll(),this._refreshCharAtlas(e,this._themeService.colors)}_fillBottomLineAtCells(e,t,n=1){this._ctx.fillRect(e*this._deviceCellWidth,(t+1)*this._deviceCellHeight-this._coreBrowserService.dpr-1,n*this._deviceCellWidth,this._coreBrowserService.dpr)}_clearAll(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))}_clearCells(e,t,n,r){this._alpha?this._ctx.clearRect(e*this._deviceCellWidth,t*this._deviceCellHeight,n*this._deviceCellWidth,r*this._deviceCellHeight):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(e*this._deviceCellWidth,t*this._deviceCellHeight,n*this._deviceCellWidth,r*this._deviceCellHeight))}_fillCharTrueColor(e,t,n,r){this._ctx.font=this._getFont(e,!1,!1),this._ctx.textBaseline=eO,this._clipCell(n,r,t.getWidth()),this._ctx.fillText(t.getChars(),n*this._deviceCellWidth+this._deviceCharLeft,r*this._deviceCellHeight+this._deviceCharTop+this._deviceCharHeight)}_clipCell(e,t,n){this._ctx.beginPath(),this._ctx.rect(e*this._deviceCellWidth,t*this._deviceCellHeight,n*this._deviceCellWidth,this._deviceCellHeight),this._ctx.clip()}_getFont(e,t,n){let r=t?e.options.fontWeightBold:e.options.fontWeight;return`${n?`italic`:``} ${r} ${e.options.fontSize*this._coreBrowserService.dpr}px ${e.options.fontFamily}`}},Vk=class extends Bk{constructor(e,t,n,r,i,a,o){super(n,e,`link`,t,!0,i,a,o),this._register(r.onShowLinkUnderline(e=>this._handleShowLinkUnderline(e))),this._register(r.onHideLinkUnderline(e=>this._handleHideLinkUnderline(e)))}resize(e,t){super.resize(e,t),this._state=void 0}reset(e){this._clearCurrentLink()}_clearCurrentLink(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);let e=this._state.y2-this._state.y1-1;e>0&&this._clearCells(0,this._state.y1+1,this._state.cols,e),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}}_handleShowLinkUnderline(e){if(e.fg===257?this._ctx.fillStyle=this._themeService.colors.background.css:e.fg!==void 0&&YO(e.fg)?this._ctx.fillStyle=this._themeService.colors.ansi[e.fg].css:this._ctx.fillStyle=this._themeService.colors.foreground.css,e.y1===e.y2)this._fillBottomLineAtCells(e.x1,e.y1,e.x2-e.x1);else{this._fillBottomLineAtCells(e.x1,e.y1,e.cols-e.x1);for(let t=e.y1+1;t<e.y2;t++)this._fillBottomLineAtCells(0,t,e.cols);this._fillBottomLineAtCells(0,e.y2,e.x2)}this._state=e}_handleHideLinkUnderline(e){this._clearCurrentLink()}},Hk=typeof window==`object`?window:globalThis,Uk=class{constructor(){this.mapWindowIdToZoomLevel=new Map,this._onDidChangeZoomLevel=new Z,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this.mapWindowIdToZoomFactor=new Map,this._onDidChangeFullscreen=new Z,this.onDidChangeFullscreen=this._onDidChangeFullscreen.event,this.mapWindowIdToFullScreen=new Map}getZoomLevel(e){return this.mapWindowIdToZoomLevel.get(this.getWindowId(e))??0}setZoomLevel(e,t){if(this.getZoomLevel(t)===e)return;let n=this.getWindowId(t);this.mapWindowIdToZoomLevel.set(n,e),this._onDidChangeZoomLevel.fire(n)}getZoomFactor(e){return this.mapWindowIdToZoomFactor.get(this.getWindowId(e))??1}setZoomFactor(e,t){this.mapWindowIdToZoomFactor.set(this.getWindowId(t),e)}setFullscreen(e,t){if(this.isFullscreen(t)===e)return;let n=this.getWindowId(t);this.mapWindowIdToFullScreen.set(n,e),this._onDidChangeFullscreen.fire(n)}isFullscreen(e){return!!this.mapWindowIdToFullScreen.get(this.getWindowId(e))}getWindowId(e){return e.vscodeWindowId}};Uk.INSTANCE=new Uk;var Wk=Uk;function Gk(e,t,n){typeof t==`string`&&(t=e.matchMedia(t)),t.addEventListener(`change`,n)}Wk.INSTANCE.onDidChangeZoomLevel,Wk.INSTANCE.onDidChangeFullscreen;var Kk=typeof navigator==`object`?navigator.userAgent:``;Kk.indexOf(`Firefox`);var qk=Kk.indexOf(`AppleWebKit`)>=0;!(Kk.indexOf(`Chrome`)>=0)&&Kk.indexOf(`Safari`),Kk.indexOf(`Electron/`),Kk.indexOf(`Android`);var Jk=!1;if(typeof Hk.matchMedia==`function`){let e=Hk.matchMedia(`(display-mode: standalone) or (display-mode: window-controls-overlay)`),t=Hk.matchMedia(`(display-mode: fullscreen)`);Jk=e.matches,Gk(Hk,e,({matches:e})=>{Jk&&t.matches||(Jk=e)})}function Yk(){return Jk}var Xk=`en`,Zk=!1,Qk=!1,$k=!1,eA=Xk,tA,nA=globalThis,rA;typeof nA.vscode<`u`&&typeof nA.vscode.process<`u`?rA=nA.vscode.process:typeof process<`u`&&typeof process?.versions?.node==`string`&&(rA=process);var iA=typeof rA?.versions?.electron==`string`&&rA?.type===`renderer`;if(typeof rA==`object`){rA.platform,rA.platform,Zk=rA.platform===`linux`,Zk&&rA.env.SNAP&&rA.env.SNAP_REVISION,rA.env.CI||rA.env.BUILD_ARTIFACTSTAGINGDIRECTORY,eA=Xk;let e=rA.env.VSCODE_NLS_CONFIG;if(e)try{let t=JSON.parse(e);t.userLocale,t.osLocale,eA=t.resolvedLanguage||Xk,t.languagePack?.translationsConfigFile}catch{}Qk=!0}else typeof navigator==`object`&&!iA?(tA=navigator.userAgent,tA.indexOf(`Windows`),tA.indexOf(`Macintosh`),(tA.indexOf(`Macintosh`)>=0||tA.indexOf(`iPad`)>=0||tA.indexOf(`iPhone`)>=0)&&navigator.maxTouchPoints&&navigator.maxTouchPoints,Zk=tA.indexOf(`Linux`)>=0,tA?.indexOf(`Mobi`),$k=!0,eA=globalThis._VSCODE_NLS_LANGUAGE||Xk,navigator.language.toLowerCase()):console.error(`Unable to resolve platform.`);var aA=Qk;$k&&typeof nA.importScripts==`function`&&nA.origin;var oA=tA,sA=eA,cA;(e=>{function t(){return sA}e.value=t;function n(){return sA.length===2?sA===`en`:sA.length>=3&&sA[0]===`e`&&sA[1]===`n`&&sA[2]===`-`}e.isDefaultVariant=n;function r(){return sA===`en`}e.isDefault=r})(cA||={});var lA=typeof nA.postMessage==`function`&&!nA.importScripts;(()=>{if(lA){let e=[];nA.addEventListener(`message`,t=>{if(t.data&&t.data.vscodeScheduleAsyncWork)for(let n=0,r=e.length;n<r;n++){let r=e[n];if(r.id===t.data.vscodeScheduleAsyncWork){e.splice(n,1),r.callback();return}}});let t=0;return n=>{let r=++t;e.push({id:r,callback:n}),nA.postMessage({vscodeScheduleAsyncWork:r},`*`)}}return e=>setTimeout(e)})();var uA=!!(oA&&oA.indexOf(`Chrome`)>=0);oA&&oA.indexOf(`Firefox`),!uA&&oA&&oA.indexOf(`Safari`),oA&&oA.indexOf(`Edg/`),oA&&oA.indexOf(`Android`);var dA=typeof navigator==`object`?navigator:{};aA||document.queryCommandSupported&&document.queryCommandSupported(`copy`)||dA&&dA.clipboard&&dA.clipboard.writeText,aA||dA&&dA.clipboard&&dA.clipboard.readText,aA||Yk()||dA.keyboard,`ontouchstart`in Hk||dA.maxTouchPoints,Hk.PointerEvent&&(`ontouchstart`in Hk||navigator.maxTouchPoints);var fA=class{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}},pA=new fA,mA=new fA,hA=new fA;Array(230);var gA;(e=>{function t(e){return pA.keyCodeToStr(e)}e.toString=t;function n(e){return pA.strToKeyCode(e)}e.fromString=n;function r(e){return mA.keyCodeToStr(e)}e.toUserSettingsUS=r;function i(e){return hA.keyCodeToStr(e)}e.toUserSettingsGeneral=i;function a(e){return mA.strToKeyCode(e)||hA.strToKeyCode(e)}e.fromUserSettings=a;function o(e){if(e>=98&&e<=113)return null;switch(e){case 16:return`Up`;case 18:return`Down`;case 15:return`Left`;case 17:return`Right`}return pA.keyCodeToStr(e)}e.toElectronAccelerator=o})(gA||={});var _A=Object.freeze(function(e,t){let n=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(n)}}}),vA;(e=>{function t(t){return t===e.None||t===e.Cancelled||t instanceof yA?!0:!t||typeof t!=`object`?!1:typeof t.isCancellationRequested==`boolean`&&typeof t.onCancellationRequested==`function`}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:TO.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:_A})})(vA||={});var yA=class{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?_A:(this._emitter||=new Z,this._emitter.event)}dispose(){this._emitter&&=(this._emitter.dispose(),null)}};(function(){typeof globalThis.requestIdleCallback!=`function`||globalThis.cancelIdleCallback})();var bA;(e=>{async function t(e){let t,n=await Promise.all(e.map(e=>e.then(e=>e,e=>{t||=e})));if(typeof t<`u`)throw t;return n}e.settled=t;function n(e){return new Promise(async(t,n)=>{try{await e(t,n)}catch(e){n(e)}})}e.withAsyncBody=n})(bA||={});var xA=class e{static fromArray(t){return new e(e=>{e.emitMany(t)})}static fromPromise(t){return new e(async e=>{e.emitMany(await t)})}static fromPromises(t){return new e(async e=>{await Promise.all(t.map(async t=>e.emitOne(await t)))})}static merge(t){return new e(async e=>{await Promise.all(t.map(async t=>{for await(let n of t)e.emitOne(n)}))})}constructor(e,t){this._state=0,this._results=[],this._error=null,this._onReturn=t,this._onStateChanged=new Z,queueMicrotask(async()=>{let t={emitOne:e=>this.emitOne(e),emitMany:e=>this.emitMany(e),reject:e=>this.reject(e)};try{await Promise.resolve(e(t)),this.resolve()}catch(e){this.reject(e)}finally{t.emitOne=void 0,t.emitMany=void 0,t.reject=void 0}})}[Symbol.asyncIterator](){let e=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(e<this._results.length)return{done:!1,value:this._results[e++]};if(this._state===1)return{done:!0,value:void 0};await TO.toPromise(this._onStateChanged.event)}while(!0)},return:async()=>(this._onReturn?.(),{done:!0,value:void 0})}}static map(t,n){return new e(async e=>{for await(let r of t)e.emitOne(n(r))})}map(t){return e.map(this,t)}static filter(t,n){return new e(async e=>{for await(let r of t)n(r)&&e.emitOne(r)})}filter(t){return e.filter(this,t)}static coalesce(t){return e.filter(t,e=>!!e)}coalesce(){return e.coalesce(this)}static async toPromise(e){let t=[];for await(let n of e)t.push(n);return t}toPromise(){return e.toPromise(this)}emitOne(e){this._state===0&&(this._results.push(e),this._onStateChanged.fire())}emitMany(e){this._state===0&&(this._results=this._results.concat(e),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(e){this._state===0&&(this._state=2,this._error=e,this._onStateChanged.fire())}};xA.EMPTY=xA.fromArray([]);function SA(e){return CA(e,0)}function CA(e,t){switch(typeof e){case`object`:return e===null?wA(349,t):Array.isArray(e)?DA(e,t):OA(e,t);case`string`:return EA(e,t);case`boolean`:return TA(e,t);case`number`:return wA(e,t);case`undefined`:return wA(937,t);default:return wA(617,t)}}function wA(e,t){return(t<<5)-t+e|0}function TA(e,t){return wA(e?433:863,t)}function EA(e,t){t=wA(149417,t);for(let n=0,r=e.length;n<r;n++)t=wA(e.charCodeAt(n),t);return t}function DA(e,t){return t=wA(104579,t),e.reduce((e,t)=>CA(t,e),t)}function OA(e,t){return t=wA(181387,t),Object.keys(e).sort().reduce((t,n)=>(t=EA(n,t),CA(e[n],t)),t)}var{registerWindow:kA,getWindow:AA,getDocument:jA,getWindows:MA,getWindowsCount:NA,getWindowId:PA,getWindowById:FA,hasWindow:IA,onDidRegisterWindow:LA,onWillUnregisterWindow:RA,onDidUnregisterWindow:zA}=function(){let e=new Map,t={window:Hk,disposables:new dD};e.set(Hk.vscodeWindowId,t);let n=new Z,r=new Z,i=new Z;function a(n,r){return(typeof n==`number`?e.get(n):void 0)??(r?t:void 0)}return{onDidRegisterWindow:n.event,onWillUnregisterWindow:i.event,onDidUnregisterWindow:r.event,registerWindow(t){if(e.has(t.vscodeWindowId))return fD.None;let a=new dD,o={window:t,disposables:a.add(new dD)};return e.set(t.vscodeWindowId,o),a.add(lD(()=>{e.delete(t.vscodeWindowId),r.fire(t)})),a.add(VA(t,UA.BEFORE_UNLOAD,()=>{i.fire(t)})),n.fire(o),a},getWindows(){return e.values()},getWindowsCount(){return e.size},getWindowId(e){return e.vscodeWindowId},hasWindow(t){return e.has(t)},getWindowById:a,getWindow(e){let t=e;if(t?.ownerDocument?.defaultView)return t.ownerDocument.defaultView.window;let n=e;return n?.view?n.view.window:Hk},getDocument(e){return AA(e).document}}}(),BA=class{constructor(e,t,n,r){this._node=e,this._type=t,this._handler=n,this._options=r||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){this._handler&&=(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,null)}};function VA(e,t,n,r){return new BA(e,t,n,r)}var HA=class e{constructor(e,t){this.width=e,this.height=t}with(t=this.width,n=this.height){return t!==this.width||n!==this.height?new e(t,n):this}static is(e){return typeof e==`object`&&typeof e.height==`number`&&typeof e.width==`number`}static lift(t){return t instanceof e?t:new e(t.width,t.height)}static equals(e,t){return e===t?!0:!e||!t?!1:e.width===t.width&&e.height===t.height}};HA.None=new HA(0,0),new class{constructor(){this.mutationObservers=new Map}observe(e,t,n){let r=this.mutationObservers.get(e);r||(r=new Map,this.mutationObservers.set(e,r));let i=SA(n),a=r.get(i);if(a)a.users+=1;else{let o=new Z,s=new MutationObserver(e=>o.fire(e));s.observe(e,n);let c=a={users:1,observer:s,onDidMutate:o.event};t.add(lD(()=>{--c.users,c.users===0&&(o.dispose(),s.disconnect(),r?.delete(i),r?.size===0&&this.mutationObservers.delete(e))})),r.set(i,a)}return a.onDidMutate}};var UA={CLICK:`click`,AUXCLICK:`auxclick`,DBLCLICK:`dblclick`,MOUSE_UP:`mouseup`,MOUSE_DOWN:`mousedown`,MOUSE_OVER:`mouseover`,MOUSE_MOVE:`mousemove`,MOUSE_OUT:`mouseout`,MOUSE_ENTER:`mouseenter`,MOUSE_LEAVE:`mouseleave`,MOUSE_WHEEL:`wheel`,POINTER_UP:`pointerup`,POINTER_DOWN:`pointerdown`,POINTER_MOVE:`pointermove`,POINTER_LEAVE:`pointerleave`,CONTEXT_MENU:`contextmenu`,WHEEL:`wheel`,KEY_DOWN:`keydown`,KEY_PRESS:`keypress`,KEY_UP:`keyup`,LOAD:`load`,BEFORE_UNLOAD:`beforeunload`,UNLOAD:`unload`,PAGE_SHOW:`pageshow`,PAGE_HIDE:`pagehide`,PASTE:`paste`,ABORT:`abort`,ERROR:`error`,RESIZE:`resize`,SCROLL:`scroll`,FULLSCREEN_CHANGE:`fullscreenchange`,WK_FULLSCREEN_CHANGE:`webkitfullscreenchange`,SELECT:`select`,CHANGE:`change`,SUBMIT:`submit`,RESET:`reset`,FOCUS:`focus`,FOCUS_IN:`focusin`,FOCUS_OUT:`focusout`,BLUR:`blur`,INPUT:`input`,STORAGE:`storage`,DRAG_START:`dragstart`,DRAG:`drag`,DRAG_ENTER:`dragenter`,DRAG_LEAVE:`dragleave`,DRAG_OVER:`dragover`,DROP:`drop`,DRAG_END:`dragend`,ANIMATION_START:qk?`webkitAnimationStart`:`animationstart`,ANIMATION_END:qk?`webkitAnimationEnd`:`animationend`,ANIMATION_ITERATION:qk?`webkitAnimationIteration`:`animationiteration`},WA=class extends fD{constructor(e,t,n,r,i,a,o,s,c){super(),this._terminal=e,this._characterJoinerService=t,this._charSizeService=n,this._coreBrowserService=r,this._coreService=i,this._decorationService=a,this._optionsService=o,this._themeService=s,this._cursorBlinkStateManager=new pD,this._charAtlasDisposable=this._register(new pD),this._observerDisposable=this._register(new pD),this._model=new Tk,this._workCell=new rk,this._workCell2=new rk,this._rectangleRenderer=this._register(new pD),this._glyphRenderer=this._register(new pD),this._onChangeTextureAtlas=this._register(new Z),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this._register(new Z),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this._register(new Z),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onRequestRedraw=this._register(new Z),this.onRequestRedraw=this._onRequestRedraw.event,this._onContextLoss=this._register(new Z),this.onContextLoss=this._onContextLoss.event,this._canvas=this._coreBrowserService.mainDocument.createElement(`canvas`);let l={antialias:!1,depth:!1,preserveDrawingBuffer:c};if(this._gl=this._canvas.getContext(`webgl2`,l),!this._gl)throw Error(`WebGL2 not supported `+this._gl);this._register(this._themeService.onChangeColors(()=>this._handleColorChange())),this._cellColorResolver=new QD(this._terminal,this._optionsService,this._model.selection,this._decorationService,this._coreBrowserService,this._themeService),this._core=this._terminal._core,this._renderLayers=[new Vk(this._core.screenElement,2,this._terminal,this._core.linkifier,this._coreBrowserService,o,this._themeService)],this.dimensions=HD(),this._devicePixelRatio=this._coreBrowserService.dpr,this._updateDimensions(),this._updateCursorBlink(),this._register(o.onOptionChange(()=>this._handleOptionsChanged())),this._deviceMaxTextureSize=this._gl.getParameter(this._gl.MAX_TEXTURE_SIZE),this._register(VA(this._canvas,`webglcontextlost`,e=>{console.log(`webglcontextlost event received`),e.preventDefault(),this._contextRestorationTimeout=setTimeout(()=>{this._contextRestorationTimeout=void 0,console.warn(`webgl context not restored; firing onContextLoss`),this._onContextLoss.fire(e)},3e3)})),this._register(VA(this._canvas,`webglcontextrestored`,e=>{console.warn(`webglcontextrestored event received`),clearTimeout(this._contextRestorationTimeout),this._contextRestorationTimeout=void 0,QO(this._terminal),this._initializeWebGLState(),this._requestRedrawViewport()})),this._observerDisposable.value=tk(this._canvas,this._coreBrowserService.window,(e,t)=>this._setCanvasDevicePixelDimensions(e,t)),this._register(this._coreBrowserService.onWindowChange(e=>{this._observerDisposable.value=tk(this._canvas,e,(e,t)=>this._setCanvasDevicePixelDimensions(e,t))})),this._core.screenElement.appendChild(this._canvas),[this._rectangleRenderer.value,this._glyphRenderer.value]=this._initializeWebGLState(),this._isAttached=this._core.screenElement.isConnected,this._register(lD(()=>{for(let e of this._renderLayers)e.dispose();this._canvas.parentElement?.removeChild(this._canvas),QO(this._terminal)}))}get textureAtlas(){return this._charAtlas?.pages[0].canvas}_handleColorChange(){this._refreshCharAtlas(),this._clearModel(!0)}handleDevicePixelRatioChange(){this._devicePixelRatio!==this._coreBrowserService.dpr&&(this._devicePixelRatio=this._coreBrowserService.dpr,this.handleResize(this._terminal.cols,this._terminal.rows))}handleResize(e,t){this._updateDimensions(),this._model.resize(this._terminal.cols,this._terminal.rows);for(let e of this._renderLayers)e.resize(this._terminal,this.dimensions);this._canvas.width=this.dimensions.device.canvas.width,this._canvas.height=this.dimensions.device.canvas.height,this._canvas.style.width=`${this.dimensions.css.canvas.width}px`,this._canvas.style.height=`${this.dimensions.css.canvas.height}px`,this._core.screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._core.screenElement.style.height=`${this.dimensions.css.canvas.height}px`,this._rectangleRenderer.value?.setDimensions(this.dimensions),this._rectangleRenderer.value?.handleResize(),this._glyphRenderer.value?.setDimensions(this.dimensions),this._glyphRenderer.value?.handleResize(),this._refreshCharAtlas(),this._clearModel(!1)}handleCharSizeChanged(){this.handleResize(this._terminal.cols,this._terminal.rows)}handleBlur(){for(let e of this._renderLayers)e.handleBlur(this._terminal);this._cursorBlinkStateManager.value?.pause(),this._requestRedrawViewport()}handleFocus(){for(let e of this._renderLayers)e.handleFocus(this._terminal);this._cursorBlinkStateManager.value?.resume(),this._requestRedrawViewport()}handleSelectionChanged(e,t,n){for(let r of this._renderLayers)r.handleSelectionChanged(this._terminal,e,t,n);this._model.selection.update(this._core,e,t,n),this._requestRedrawViewport()}handleCursorMove(){for(let e of this._renderLayers)e.handleCursorMove(this._terminal);this._cursorBlinkStateManager.value?.restartBlinkAnimation()}_handleOptionsChanged(){this._updateDimensions(),this._refreshCharAtlas(),this._updateCursorBlink()}_initializeWebGLState(){return this._rectangleRenderer.value=new zk(this._terminal,this._gl,this.dimensions,this._themeService),this._glyphRenderer.value=new _k(this._terminal,this._gl,this.dimensions,this._optionsService),this.handleCharSizeChanged(),[this._rectangleRenderer.value,this._glyphRenderer.value]}_refreshCharAtlas(){if(this.dimensions.device.char.width<=0&&this.dimensions.device.char.height<=0){this._isAttached=!1;return}let e=ZO(this._terminal,this._optionsService.rawOptions,this._themeService.colors,this.dimensions.device.cell.width,this.dimensions.device.cell.height,this.dimensions.device.char.width,this.dimensions.device.char.height,this._coreBrowserService.dpr,this._deviceMaxTextureSize);this._charAtlas!==e&&(this._onChangeTextureAtlas.fire(e.pages[0].canvas),this._charAtlasDisposable.value=cD(TO.forward(e.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas),TO.forward(e.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas))),this._charAtlas=e,this._charAtlas.warmUp(),this._glyphRenderer.value?.setAtlas(this._charAtlas)}_clearModel(e){this._model.clear(),e&&this._glyphRenderer.value?.clear()}clearTextureAtlas(){this._charAtlas?.clearTexture(),this._clearModel(!0),this._requestRedrawViewport()}clear(){this._clearModel(!0);for(let e of this._renderLayers)e.reset(this._terminal);this._cursorBlinkStateManager.value?.restartBlinkAnimation(),this._updateCursorBlink()}renderRows(e,t){if(!this._isAttached){if(this._core.screenElement?.isConnected&&this._charSizeService.width&&this._charSizeService.height)this._updateDimensions(),this._refreshCharAtlas(),this._isAttached=!0;else return}for(let n of this._renderLayers)n.handleGridChanged(this._terminal,e,t);!this._glyphRenderer.value||!this._rectangleRenderer.value||(this._glyphRenderer.value.beginFrame()?(this._clearModel(!0),this._updateModel(0,this._terminal.rows-1)):this._updateModel(e,t),this._rectangleRenderer.value.renderBackgrounds(),this._glyphRenderer.value.render(this._model),(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible)&&this._rectangleRenderer.value.renderCursor())}_updateCursorBlink(){this._coreService.decPrivateModes.cursorBlink??this._terminal.options.cursorBlink?this._cursorBlinkStateManager.value=new ek(()=>{this._requestRedrawCursor()},this._coreBrowserService):this._cursorBlinkStateManager.clear(),this._requestRedrawCursor()}_updateModel(e,t){let n=this._core,r=this._workCell,i,a,o,s,c,l,u=0,d=!0,f,p,m,h,g,_,v,y,b;e=KA(e,n.rows-1,0),t=KA(t,n.rows-1,0);let ee=this._coreService.decPrivateModes.cursorStyle??n.options.cursorStyle??`block`,x=this._terminal.buffer.active.baseY+this._terminal.buffer.active.cursorY,te=x-n.buffer.ydisp,S=Math.min(this._terminal.buffer.active.cursorX,n.cols-1),ne=-1,C=this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden&&(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible);this._model.cursor=void 0;let w=!1;for(a=e;a<=t;a++)for(o=a+n.buffer.ydisp,s=n.buffer.lines.get(o),this._model.lineLengths[a]=0,m=x===o,u=0,c=this._characterJoinerService.getJoinedCharacters(o),y=0;y<n.cols;y++){if(i=this._cellColorResolver.result.bg,s.loadCell(y,r),y===0&&(i=this._cellColorResolver.result.bg),l=!1,d=y>=u,f=y,c.length>0&&y===c[0][0]&&d){p=c.shift();let e=this._model.selection.isCellSelected(this._terminal,p[0],o);for(v=p[0]+1;v<p[1];v++)d&&=e===this._model.selection.isCellSelected(this._terminal,v,o);d&&=!m||S<p[0]||S>=p[1],d?(l=!0,r=new GA(r,s.translateToString(!0,p[0],p[1]),p[1]-p[0]),f=p[1]-1):u=p[1]}if(h=r.getChars(),g=r.getCode(),v=(a*n.cols+y)*bk,this._cellColorResolver.resolve(r,y,o,this.dimensions.device.cell.width),C&&o===x&&(y===S&&(this._model.cursor={x:S,y:te,width:r.getWidth(),style:this._coreBrowserService.isFocused?ee:n.options.cursorInactiveStyle,cursorWidth:n.options.cursorWidth,dpr:this._devicePixelRatio},ne=S+r.getWidth()-1),y>=S&&y<=ne&&(this._coreBrowserService.isFocused&&ee===`block`||this._coreBrowserService.isFocused===!1&&n.options.cursorInactiveStyle===`block`)&&(this._cellColorResolver.result.fg=50331648|this._themeService.colors.cursorAccent.rgba>>8&16777215,this._cellColorResolver.result.bg=50331648|this._themeService.colors.cursor.rgba>>8&16777215)),g!==0&&(this._model.lineLengths[a]=y+1),(this._model.cells[v]!==g||this._model.cells[v+xk]!==this._cellColorResolver.result.bg||this._model.cells[v+Sk]!==this._cellColorResolver.result.fg||this._model.cells[v+Ck]!==this._cellColorResolver.result.ext)&&(w=!0,h.length>1&&(g|=wk),this._model.cells[v]=g,this._model.cells[v+xk]=this._cellColorResolver.result.bg,this._model.cells[v+Sk]=this._cellColorResolver.result.fg,this._model.cells[v+Ck]=this._cellColorResolver.result.ext,_=r.getWidth(),this._glyphRenderer.value.updateCell(y,a,g,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,h,_,i),l)){for(r=this._workCell,y++;y<=f;y++)b=(a*n.cols+y)*bk,this._glyphRenderer.value.updateCell(y,a,0,0,0,0,xD,0,0),this._model.cells[b]=0,this._model.cells[b+xk]=this._cellColorResolver.result.bg,this._model.cells[b+Sk]=this._cellColorResolver.result.fg,this._model.cells[b+Ck]=this._cellColorResolver.result.ext;y--}}w&&this._rectangleRenderer.value.updateBackgrounds(this._model),this._rectangleRenderer.value.updateCursor(this._model)}_updateDimensions(){!this._charSizeService.width||!this._charSizeService.height||(this.dimensions.device.char.width=Math.floor(this._charSizeService.width*this._devicePixelRatio),this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*this._devicePixelRatio),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.top=this._optionsService.rawOptions.lineHeight===1?0:Math.round((this.dimensions.device.cell.height-this.dimensions.device.char.height)/2),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.char.left=Math.floor(this._optionsService.rawOptions.letterSpacing/2),this.dimensions.device.canvas.height=this._terminal.rows*this.dimensions.device.cell.height,this.dimensions.device.canvas.width=this._terminal.cols*this.dimensions.device.cell.width,this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/this._devicePixelRatio),this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/this._devicePixelRatio),this.dimensions.css.cell.height=this.dimensions.device.cell.height/this._devicePixelRatio,this.dimensions.css.cell.width=this.dimensions.device.cell.width/this._devicePixelRatio)}_setCanvasDevicePixelDimensions(e,t){this._canvas.width===e&&this._canvas.height===t||(this._canvas.width=e,this._canvas.height=t,this._requestRedrawViewport())}_requestRedrawViewport(){this._onRequestRedraw.fire({start:0,end:this._terminal.rows-1})}_requestRedrawCursor(){let e=this._terminal.buffer.active.cursorY;this._onRequestRedraw.fire({start:e,end:e})}},GA=class extends bO{constructor(e,t,n){super(),this.content=0,this.combinedData=``,this.fg=e.fg,this.bg=e.bg,this.combinedData=t,this._width=n}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(e){throw Error(`not implemented`)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}};function KA(e,t,n=0){return Math.max(Math.min(e,t),n)}var qA=`di$target`,JA=`di$dependencies`,YA=new Map;function XA(e){if(YA.has(e))return YA.get(e);let t=function(e,n,r){if(arguments.length!==3)throw Error(`@IServiceName-decorator can only be used to decorate a parameter`);ZA(t,e,r)};return t._id=e,YA.set(e,t),t}function ZA(e,t,n){t[qA]===t?t[JA].push({id:e,index:n}):(t[JA]=[{id:e,index:n}],t[qA]=t)}XA(`BufferService`),XA(`CoreMouseService`),XA(`CoreService`),XA(`CharsetService`),XA(`InstantiationService`),XA(`LogService`);var QA=XA(`OptionsService`);XA(`OscLinkService`),XA(`UnicodeService`),XA(`DecorationService`);var $A={trace:0,debug:1,info:2,warn:3,error:4,off:5},ej=`xterm.js: `,tj=class extends fD{constructor(e){super(),this._optionsService=e,this._logLevel=5,this._updateLogLevel(),this._register(this._optionsService.onSpecificOptionChange(`logLevel`,()=>this._updateLogLevel())),nj=this}get logLevel(){return this._logLevel}_updateLogLevel(){this._logLevel=$A[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(e){for(let t=0;t<e.length;t++)typeof e[t]==`function`&&(e[t]=e[t]())}_log(e,t,n){this._evalLazyOptionalParams(n),e.call(console,(this._optionsService.options.logger?``:ej)+t,...n)}trace(e,...t){this._logLevel<=0&&this._log(this._optionsService.options.logger?.trace.bind(this._optionsService.options.logger)??console.log,e,t)}debug(e,...t){this._logLevel<=1&&this._log(this._optionsService.options.logger?.debug.bind(this._optionsService.options.logger)??console.log,e,t)}info(e,...t){this._logLevel<=2&&this._log(this._optionsService.options.logger?.info.bind(this._optionsService.options.logger)??console.info,e,t)}warn(e,...t){this._logLevel<=3&&this._log(this._optionsService.options.logger?.warn.bind(this._optionsService.options.logger)??console.warn,e,t)}error(e,...t){this._logLevel<=4&&this._log(this._optionsService.options.logger?.error.bind(this._optionsService.options.logger)??console.error,e,t)}};tj=GE([KE(0,QA)],tj);var nj,rj=class extends fD{constructor(e){if(yD&&bD()<16&&!document.createElement(`canvas`).getContext(`webgl2`,{antialias:!1,depth:!1,preserveDrawingBuffer:!0}))throw Error(`Webgl2 is only supported on Safari 16 and above`);super(),this._preserveDrawingBuffer=e,this._onChangeTextureAtlas=this._register(new Z),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this._register(new Z),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this._register(new Z),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onContextLoss=this._register(new Z),this.onContextLoss=this._onContextLoss.event}activate(e){let t=e._core;if(!e.element){this._register(t.onWillOpen(()=>this.activate(e)));return}this._terminal=e;let n=t.coreService,r=t.optionsService,i=t,a=i._renderService,o=i._characterJoinerService,s=i._charSizeService,c=i._coreBrowserService,l=i._decorationService;i._logService;let u=i._themeService;this._renderer=this._register(new WA(e,o,s,c,n,l,r,u,this._preserveDrawingBuffer)),this._register(TO.forward(this._renderer.onContextLoss,this._onContextLoss)),this._register(TO.forward(this._renderer.onChangeTextureAtlas,this._onChangeTextureAtlas)),this._register(TO.forward(this._renderer.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas)),this._register(TO.forward(this._renderer.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)),a.setRenderer(this._renderer),this._register(lD(()=>{if(this._terminal._core._store._isDisposed)return;let t=this._terminal._core._renderService;t.setRenderer(this._terminal._core._createRenderer()),t.handleResize(e.cols,e.rows)}))}get textureAtlas(){return this._renderer?.textureAtlas}clearTextureAtlas(){this._renderer?.clearTextureAtlas()}},ij=2,aj=1,oj=class{activate(e){this._terminal=e}dispose(){}fit(){let e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;let t=this._terminal._core;(this._terminal.rows!==e.rows||this._terminal.cols!==e.cols)&&(t._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let e=this._terminal._core._renderService.dimensions;if(e.css.cell.width===0||e.css.cell.height===0)return;let t=this._terminal.options.scrollback===0?0:this._terminal.options.overviewRuler?.width||14,n=window.getComputedStyle(this._terminal.element.parentElement),r=parseInt(n.getPropertyValue(`height`)),i=Math.max(0,parseInt(n.getPropertyValue(`width`))),a=window.getComputedStyle(this._terminal.element),o={top:parseInt(a.getPropertyValue(`padding-top`)),bottom:parseInt(a.getPropertyValue(`padding-bottom`)),right:parseInt(a.getPropertyValue(`padding-right`)),left:parseInt(a.getPropertyValue(`padding-left`))},s=o.top+o.bottom,c=o.right+o.left,l=r-s,u=i-c-t;return{cols:Math.max(ij,Math.floor(u/e.css.cell.width)),rows:Math.max(aj,Math.floor(l/e.css.cell.height))}}},sj=`3.7.8`,cj=sj,lj=typeof Buffer==`function`,uj=typeof TextDecoder==`function`?new TextDecoder:void 0,dj=typeof TextEncoder==`function`?new TextEncoder:void 0,fj=Array.prototype.slice.call(`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=`),pj=(e=>{let t={};return e.forEach((e,n)=>t[e]=n),t})(fj),mj=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,hj=String.fromCharCode.bind(String),gj=typeof Uint8Array.from==`function`?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),_j=e=>e.replace(/=/g,``).replace(/[+\/]/g,e=>e==`+`?`-`:`_`),vj=e=>e.replace(/[^A-Za-z0-9\+\/]/g,``),yj=e=>{let t,n,r,i,a=``,o=e.length%3;for(let o=0;o<e.length;){if((n=e.charCodeAt(o++))>255||(r=e.charCodeAt(o++))>255||(i=e.charCodeAt(o++))>255)throw TypeError(`invalid character found`);t=n<<16|r<<8|i,a+=fj[t>>18&63]+fj[t>>12&63]+fj[t>>6&63]+fj[t&63]}return o?a.slice(0,o-3)+`===`.substring(o):a},bj=typeof btoa==`function`?e=>btoa(e):lj?e=>Buffer.from(e,`binary`).toString(`base64`):yj,xj=lj?e=>Buffer.from(e).toString(`base64`):e=>{let t=[];for(let n=0,r=e.length;n<r;n+=4096)t.push(hj.apply(null,e.subarray(n,n+4096)));return bj(t.join(``))},Sj=(e,t=!1)=>t?_j(xj(e)):xj(e),Cj=e=>{if(e.length<2){var t=e.charCodeAt(0);return t<128?e:t<2048?hj(192|t>>>6)+hj(128|t&63):hj(224|t>>>12&15)+hj(128|t>>>6&63)+hj(128|t&63)}var t=65536+(e.charCodeAt(0)-55296)*1024+(e.charCodeAt(1)-56320);return hj(240|t>>>18&7)+hj(128|t>>>12&63)+hj(128|t>>>6&63)+hj(128|t&63)},wj=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,Tj=e=>e.replace(wj,Cj),Ej=lj?e=>Buffer.from(e,`utf8`).toString(`base64`):dj?e=>xj(dj.encode(e)):e=>bj(Tj(e)),Dj=(e,t=!1)=>t?_j(Ej(e)):Ej(e),Oj=e=>Dj(e,!0),kj=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,Aj=e=>{switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return hj((t>>>10)+55296)+hj((t&1023)+56320);case 3:return hj((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return hj((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},jj=e=>e.replace(kj,Aj),Mj=e=>{if(e=e.replace(/\s+/g,``),!mj.test(e))throw TypeError(`malformed base64.`);e+=`==`.slice(2-(e.length&3));let t,n,r,i=[];for(let a=0;a<e.length;)t=pj[e.charAt(a++)]<<18|pj[e.charAt(a++)]<<12|(n=pj[e.charAt(a++)])<<6|(r=pj[e.charAt(a++)]),n===64?i.push(hj(t>>16&255)):r===64?i.push(hj(t>>16&255,t>>8&255)):i.push(hj(t>>16&255,t>>8&255,t&255));return i.join(``)},Nj=typeof atob==`function`?e=>atob(vj(e)):lj?e=>Buffer.from(e,`base64`).toString(`binary`):Mj,Pj=lj?e=>gj(Buffer.from(e,`base64`)):e=>gj(Nj(e).split(``).map(e=>e.charCodeAt(0))),Fj=e=>Pj(Lj(e)),Ij=lj?e=>Buffer.from(e,`base64`).toString(`utf8`):uj?e=>uj.decode(Pj(e)):e=>jj(Nj(e)),Lj=e=>vj(e.replace(/[-_]/g,e=>e==`-`?`+`:`/`)),Rj=e=>Ij(Lj(e)),zj=e=>{if(typeof e!=`string`)return!1;let t=e.replace(/\s+/g,``).replace(/={0,2}$/,``);return!/[^\s0-9a-zA-Z\+/]/.test(t)||!/[^\s0-9a-zA-Z\-_]/.test(t)},Bj=e=>({value:e,enumerable:!1,writable:!0,configurable:!0}),Vj=function(){let e=(e,t)=>Object.defineProperty(String.prototype,e,Bj(t));e(`fromBase64`,function(){return Rj(this)}),e(`toBase64`,function(e){return Dj(this,e)}),e(`toBase64URI`,function(){return Dj(this,!0)}),e(`toBase64URL`,function(){return Dj(this,!0)}),e(`toUint8Array`,function(){return Fj(this)})},Hj=function(){let e=(e,t)=>Object.defineProperty(Uint8Array.prototype,e,Bj(t));e(`toBase64`,function(e){return Sj(this,e)}),e(`toBase64URI`,function(){return Sj(this,!0)}),e(`toBase64URL`,function(){return Sj(this,!0)})},Uj={version:sj,VERSION:cj,atob:Nj,atobPolyfill:Mj,btoa:bj,btoaPolyfill:yj,fromBase64:Rj,toBase64:Dj,encode:Dj,encodeURI:Oj,encodeURL:Oj,utob:Tj,btou:jj,decode:Rj,isValid:zj,fromUint8Array:Sj,toUint8Array:Fj,extendString:Vj,extendUint8Array:Hj,extendBuiltins:()=>{Vj(),Hj()}},Wj=class{constructor(e=new Kj,t=new Gj){this._base64=e,this._provider=t}activate(e){this._terminal=e,this._disposable=e.parser.registerOscHandler(52,e=>this._setOrReportClipboard(e))}dispose(){return this._disposable?.dispose()}_readText(e,t){let n=this._base64.encodeText(t);this._terminal?.input(`\x1B]52;${e};${n}\x07`,!1)}_setOrReportClipboard(e){let t=e.split(`;`);if(t.length<2)return!0;let n=t[0],r=t[1];if(r===`?`){let e=this._provider.readText(n);return e instanceof Promise?e.then(e=>(this._readText(n,e),!0)):(this._readText(n,e),!0)}let i=``;try{i=this._base64.decodeText(r)}catch{}let a=this._provider.writeText(n,i);return a instanceof Promise?a.then(()=>!0):!0}},Gj=class{async readText(e){return e===`c`?navigator.clipboard.readText():Promise.resolve(``)}async writeText(e,t){return e===`c`?navigator.clipboard.writeText(t):Promise.resolve()}},Kj=class{encodeText(e){return Uj.encode(e)}decodeText(e){let t=Uj.decode(e);return!Uj.isValid(e)||Uj.encode(t)!==e?``:t}},qj=class{constructor(e,t,n,r={}){this._terminal=e,this._regex=t,this._handler=n,this._options=r}provideLinks(e,t){let n=Yj.computeLink(e,this._regex,this._terminal,this._handler);t(this._addCallbacks(n))}_addCallbacks(e){return e.map(e=>(e.leave=this._options.leave,e.hover=(t,n)=>{if(this._options.hover){let{range:r}=e;this._options.hover(t,n,r)}},e))}};function Jj(e){try{let t=new URL(e),n=t.password&&t.username?`${t.protocol}//${t.username}:${t.password}@${t.host}`:t.username?`${t.protocol}//${t.username}@${t.host}`:`${t.protocol}//${t.host}`;return e.toLocaleLowerCase().startsWith(n.toLocaleLowerCase())}catch{return!1}}var Yj=class e{static computeLink(t,n,r,i){let a=new RegExp(n.source,(n.flags||``)+`g`),[o,s]=e._getWindowedLineStrings(t-1,r),c=o.join(``),l,u=[];for(;l=a.exec(c);){let t=l[0];if(!Jj(t))continue;let[n,a]=e._mapStrIdx(r,s,0,l.index),[o,c]=e._mapStrIdx(r,n,a,t.length);if(n===-1||a===-1||o===-1||c===-1)continue;let d={start:{x:a+1,y:n+1},end:{x:c,y:o+1}};u.push({range:d,text:t,activate:i})}return u}static _getWindowedLineStrings(e,t){let n,r=e,i=e,a=0,o=``,s=[];if(n=t.buffer.active.getLine(e)){let e=n.translateToString(!0);if(n.isWrapped&&e[0]!==` `){for(a=0;(n=t.buffer.active.getLine(--r))&&a<2048&&(o=n.translateToString(!0),a+=o.length,s.push(o),!(!n.isWrapped||o.indexOf(` `)!==-1)););s.reverse()}for(s.push(e),a=0;(n=t.buffer.active.getLine(++i))&&n.isWrapped&&a<2048&&(o=n.translateToString(!0),a+=o.length,s.push(o),o.indexOf(` `)===-1););}return[s,r]}static _mapStrIdx(e,t,n,r){let i=e.buffer.active,a=i.getNullCell(),o=n;for(;r;){let e=i.getLine(t);if(!e)return[-1,-1];for(let n=o;n<e.length;++n){e.getCell(n,a);let o=a.getChars();if(a.getWidth()&&(r-=o.length||1,n===e.length-1&&o===``)){let e=i.getLine(t+1);e&&e.isWrapped&&(e.getCell(0,a),a.getWidth()===2&&(r+=1))}if(r<0)return[t,n]}t++,o=0}return[t,o]}},Xj=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function Zj(e,t){let n=window.open();if(n){try{n.opener=null}catch{}n.location.href=t}else console.warn(`Opening link blocked as opener could not be cleared`)}var Qj=class{constructor(e=Zj,t={}){this._handler=e,this._options=t}activate(e){this._terminal=e;let t=this._options,n=t.urlRegex||Xj;this._linkProvider=this._terminal.registerLinkProvider(new qj(this._terminal,n,this._handler,t))}dispose(){this._linkProvider?.dispose()}};function $j(e,t){let{term:n,write:r}=e,i=new TextEncoder,a=null,o=0,s=!1,c=null,l=()=>{if(s)return;let i=location.protocol===`https:`?`wss`:`ws`,f=a=new WebSocket(`${i}://${location.host}/term/${e.sessionId}?cols=${n.cols}&rows=${n.rows}&visible=${+!!u()}`);f.onmessage=e=>r(e.data),f.onopen=()=>{o=0,d(f),c&&=(f.send(JSON.stringify({resize:c})),null),m()},f.onclose=()=>{if(!(t.aborted||s||a!==f)){if(document.visibilityState!==`visible`){let e=()=>{document.visibilityState===`visible`&&(document.removeEventListener(`visibilitychange`,e),!t.aborted&&a===f&&l())};document.addEventListener(`visibilitychange`,e,{signal:t})}else++o<=3?setTimeout(()=>{!t.aborted&&a===f&&l()},400*o):e.onDead()}}},u=()=>document.visibilityState===`visible`&&e.isVisible(),d=e=>{e.readyState===WebSocket.OPEN&&e.send(JSON.stringify({visible:u()}))};document.addEventListener(`visibilitychange`,()=>a&&d(a),{signal:t}),l(),t.addEventListener(`abort`,()=>a?.close());let f=[],p=0,m=()=>{for(;f.length&&a?.readyState===WebSocket.OPEN;)a.send(i.encode(f.shift()));p=0};return{send(e){a?.readyState===WebSocket.OPEN?a.send(i.encode(e)):p<1024&&(f.push(e),p+=e.length)},resize(e,t){a?.readyState===WebSocket.OPEN?a.send(JSON.stringify({resize:[e,t]})):c=[e,t]},syncVisibility(){a&&d(a)},get readyState(){return a?.readyState},reconnect(){s=!1,l()},disconnect(){s=!0,a?.close()}}}function eM(e,t,n,r){let i=null,a=0,o=0,s=0,c=0,l=n=>{let r=t().querySelector(`.xterm-screen`)||t(),i=r.clientHeight/e.rows||17;c+=n/i;let a=Math.trunc(c);if(!a)return;c-=a;let o=r.getBoundingClientRect(),s=a>0?1:-1;for(let e=0;e!==a;e+=s)r.dispatchEvent(new WheelEvent(`wheel`,{deltaY:s,deltaMode:WheelEvent.DOM_DELTA_LINE,bubbles:!0,cancelable:!0,clientX:o.left+o.width/2,clientY:o.top+o.height/2}))},u=()=>{cancelAnimationFrame(s),s=0},d=()=>{o*=.97,!(Math.abs(o)<.25)&&(l(o*16),s=requestAnimationFrame(d))};n.addEventListener(`abort`,u),t().addEventListener(`touchstart`,e=>{u(),o=0,i=e.touches[0]?.clientY??null,a=e.timeStamp},{passive:!0,signal:n}),t().addEventListener(`touchmove`,e=>{if(r?.())return;let t=e.touches[0]?.clientY;if(t==null||i==null)return;let n=i-t;Math.abs(n)>=2&&(o=n/Math.max(1,e.timeStamp-a),i=t,a=e.timeStamp,l(n)),e.preventDefault()},{passive:!1,signal:n}),t().addEventListener(`touchend`,()=>{i=null,Math.abs(o)>.5&&(u(),s=requestAnimationFrame(d))},{signal:n})}function tM(e){let t=!1,n=[],r=0;return{write(i){if(!t){e.write(i);return}for(n.push(i),r+=i.length;r>1048576&&n.length>1;)r-=n.shift().length},setFrozen(i){if(t!==i&&(t=i,!i)){let t=n.join(``);n=[],r=0,t&&e.write(t)}}}}function nM(e,t,n){let r=e.textarea;if(!r)return;let i=`\xA0`.repeat(4),a={deleteContentBackward:``,deleteWordBackward:``,deleteSoftLineBackward:``,deleteHardLineBackward:``},o=!1,s=()=>{o||(r.value!==i&&(r.value=i),r.setSelectionRange(i.length,i.length))};r.addEventListener(`beforeinput`,e=>{let n=a[e.inputType];n&&(e.preventDefault(),e.stopImmediatePropagation(),t(n))},{capture:!0,signal:n}),r.addEventListener(`compositionstart`,()=>{o=!0},{signal:n}),r.addEventListener(`compositionend`,()=>{o=!1,setTimeout(s,0)},{signal:n}),r.addEventListener(`input`,()=>setTimeout(s,0),{signal:n}),r.addEventListener(`focus`,()=>setTimeout(s,0),{signal:n}),s()}var rM=450,iM=12,aM=` ·│┃()[]{}<>'"\`,;│|`;function oM(e,t,n,r){let i=!1,a,o=0,s=0,c=null,l=null,u=()=>t().querySelector(`.xterm-screen`)||t(),d=(t,n)=>{let r=u().getBoundingClientRect();return{col:Math.max(0,Math.min(e.cols-1,Math.floor((t-r.left)/r.width*e.cols))),row:Math.max(0,Math.min(e.rows-1,Math.floor((n-r.top)/r.height*e.rows)))+e.buffer.active.viewportY}},f=t=>{let n=e.buffer.active.getLine(t.row)?.translateToString()??``,r=e=>!e||e===` `||aM.includes(e);if(r(n[t.col]))return{start:t,end:t};let i=t.col,a=t.col;for(;i>0&&!r(n[i-1]);)i--;for(;a<n.length-1&&!r(n[a+1]);)a++;return{start:{col:i,row:t.row},end:{col:a,row:t.row}}},p=(e,t)=>e.row<t.row||e.row===t.row&&e.col<=t.col,m=()=>{if(!c||!l)return;let[t,n]=p(c,l)?[c,l]:[l,c],r=(n.row-t.row)*e.cols+(n.col-t.col)+1;e.select(t.col,t.row,Math.max(1,r))},h=()=>{clearTimeout(a),a=void 0};t().addEventListener(`touchstart`,t=>{if(t.touches.length!==1){h();return}!i&&e.hasSelection()&&e.clearSelection(),o=t.touches[0].clientX,s=t.touches[0].clientY,a=setTimeout(()=>{a=void 0,i=!0,n.onStart();let e=f(d(o,s));c=e.start,l=e.end,m(),navigator.vibrate?.(10)},rM)},{passive:!0,signal:r}),t().addEventListener(`touchmove`,e=>{let t=e.touches[0];if(t){if(i){l=d(t.clientX,t.clientY),m(),e.preventDefault();return}a&&Math.hypot(t.clientX-o,t.clientY-s)>iM&&h()}},{passive:!1,signal:r});let g=()=>{if(h(),!i)return;i=!1,n.onEnd();let t=e.getSelection();t&&ke(t).then(e=>{e&&n.onCopy(t)})};return t().addEventListener(`touchend`,g,{signal:r}),t().addEventListener(`touchcancel`,g,{signal:r}),{selecting:()=>i}}var sM=5;function cM(e,t,n,r){let i=null,a=!1,o=0,s=0,c=()=>t().querySelector(`.xterm-screen`)||t(),l=(t,n)=>{let r=c().getBoundingClientRect();return{col:Math.max(0,Math.min(e.cols-1,Math.floor((t-r.left)/r.width*e.cols))),row:Math.max(0,Math.min(e.rows-1,Math.floor((n-r.top)/r.height*e.rows)))+e.buffer.active.viewportY}};t().addEventListener(`mousedown`,t=>{if(a||t.button!==0||t.shiftKey||t.altKey||t.ctrlKey||t.metaKey)return;t.preventDefault(),t.stopImmediatePropagation();let n=t.timeStamp;s=n-o<400?s+1:1,o=n;let r=l(t.clientX,t.clientY);i={startX:t.clientX,startY:t.clientY,startCol:r.col,startRow:r.row,selecting:!1,detail:s},e.focus()},{capture:!0,signal:r}),window.addEventListener(`mousemove`,t=>{if(!i)return;if(!i.selecting){if(Math.hypot(t.clientX-i.startX,t.clientY-i.startY)<sM)return;i.selecting=!0}let n=l(t.clientX,t.clientY),r=(n.row-i.startRow)*e.cols+(n.col-i.startCol)+1,[a,o,s]=r>=0?[i.startCol,i.startRow,Math.max(1,r)]:[n.col,n.row,Math.max(1,-r+1)];e.select(a,o,s),t.preventDefault()},{signal:r}),window.addEventListener(`mouseup`,async t=>{if(!i)return;let r=i.selecting,o=i;if(i=null,r){let t=e.getSelection();t&&await ke(t)&&n(t);return}a=!0;let s={bubbles:!0,cancelable:!0,clientX:o.startX,clientY:o.startY,button:0,buttons:1,detail:o.detail,view:window},c=document.elementFromPoint(o.startX,o.startY);c?.dispatchEvent(new MouseEvent(`mousedown`,s)),c?.dispatchEvent(new MouseEvent(`mouseup`,{...s,buttons:0,button:0})),c?.dispatchEvent(new MouseEvent(`click`,{...s,buttons:0})),a=!1,t.preventDefault()},{signal:r})}function lM(e,t){let n=t.trim().toLowerCase();if(!n)return[];let r=e.buffer.active,i=n.length,a=[];for(let e=0;e<r.length;e++){let t=r.getLine(e);if(!t)continue;let o=t.translateToString(!1).toLowerCase(),s=0;for(;s<=o.length-i;){let t=o.indexOf(n,s);if(t<0)break;a.push({row:e,col:t,len:i}),s=t+i}}return a}var uM=24,dM=500,fM=700,pM=4,mM=16;function hM(e,t){let n=document.createElement(`div`);n.className=`_f_`,n.setAttribute(`aria-hidden`,`true`),t.appendChild(n);let r=``,i=null,a=null,o=null,s=!1,c=null,l=()=>e.element?.querySelector(`.xterm-screen`)||e.element?.querySelector(`.xterm-rows`)||t,u=()=>{let n=l();if(!e.cols||!e.rows)return null;let r=t.getBoundingClientRect(),i=n.getBoundingClientRect();return i.width<1||i.height<1?null:{w:i.width/e.cols,h:i.height/e.rows,left:i.left-r.left,top:i.top-r.top}},d=()=>{let t=c;if(c=null,!t)return;let n=e.getSelectionPosition();n&&n.start.y===t.row&&n.start.x===t.col&&n.end.y===t.row&&n.end.x===t.col+t.len&&e.clearSelection()},f=()=>{n.replaceChildren();let t=r.trim().toLowerCase(),a=u();if(!a||!t){n.style.display=`none`;return}n.style.display=`block`,n.style.left=`${a.left}px`,n.style.top=`${a.top}px`,n.style.width=`${a.w*e.cols}px`,n.style.height=`${a.h*e.rows}px`;let s=e.buffer.active,c=s.viewportY,l=t.length,f=!1;for(let r=0;r<e.rows;r++){let u=c+r,d=s.getLine(u);if(!d)continue;let p=d.translateToString(!1).toLowerCase(),m=null,h=0;for(;h<=p.length-l;){let s=p.indexOf(t,h);if(s<0)break;if(s<e.cols){let t=Math.min(l,e.cols-s),c=document.createElement(`div`);m===null&&i&&i.row===u&&(m=d.translateToString(!0));let p=!!(i&&i.row===u&&i.col===s&&i.len===l&&(!o||m===o.text));p&&(f=!0),c.className=p?`_ga _gb`:`_ga`,c.style.left=`${s*a.w}px`,c.style.top=`${r*a.h}px`,c.style.width=`${t*a.w}px`,c.style.height=`${a.h}px`,n.appendChild(c)}h=s+l}}i&&!f&&d()},p=t=>{let n=e.buffer.active.getLine(t);return n?n.translateToString(!0):``},m=()=>{let t=e.buffer.active.viewportY,n=[];for(let r=1;r<e.rows-2;r++)n.push(p(t+r));return n.join(`
|
|
86
|
-
`)},h=e=>{i=e;let t=p(e.row);o=t.trim()?{text:t,col:e.col,row:e.row}:null,g(e)},g=t=>{let n=e.buffer.active.viewportY;(t.row<n||t.row>=n+e.rows)&&e.scrollToLine(Math.max(0,t.row-Math.floor(e.rows/2))),e.select(t.col,t.row,t.len),c=t},_=t=>{let n=lM(e,r);if(!n.length)return i=null,d(),t<0?`up`:t>0?`down`:null;let a=i,s=a?n.findIndex(e=>e.row===a.row&&e.col===a.col&&(!o||p(e.row)===o.text)):-1;if(t===0)s=n.length-1;else if(s<0)s=t>0?0:n.length-1;else if(t>0){if(s>=n.length-1)return`down`;s+=1}else{if(s<=0)return`up`;--s}return h(n[s]),null},v=(e,t)=>{let n=l(),r=n.getBoundingClientRect(),i=e;for(let e=0;e<t;e++)n.dispatchEvent(new WheelEvent(`wheel`,{deltaY:i,deltaMode:WheelEvent.DOM_DELTA_LINE,bubbles:!0,cancelable:!0,clientX:r.left+r.width/2,clientY:r.top+r.height/2}))},y=()=>{if(!o)return-1;let t=e.buffer.active.viewportY,n=-1;for(let r=0;r<e.rows;r++){let e=t+r;p(e)===o.text&&(n<0||Math.abs(e-o.row)<Math.abs(n-o.row))&&(n=e)}return n},b=()=>{if(!o)return!1;let t=y();if(t<0)return!1;let n=lM(e,r).find(e=>e.row===t&&e.col===o?.col);return n?(i=n,g(n),!0):!1},ee=t=>{let n=lM(e,r);if(!n.length)return!1;let i=y(),a=i<0?n:n.filter(e=>t<0?e.row<i||e.row===i&&e.col<o.col:e.row>i||e.row===i&&e.col>o.col);return a.length?(h(t<0?a[a.length-1]:a[0]),!0):!1},x=()=>{a?.cancel(),a=null},te=(t,n)=>{let r=0,i=0,o=()=>{x(),n()},s=e.onWriteParsed(()=>{m()!==t&&(i||=setTimeout(o,fM),r&&clearTimeout(r),r=setTimeout(o,uM))}),c=setTimeout(o,dM);a={cancel(){s.dispose(),r&&clearTimeout(r),i&&clearTimeout(i),clearTimeout(c)}}},S=(e,t,n,i)=>{if(r!==i){s=!1;return}if(t<=0){s=!1,b(),f();return}let a=m(),o=Math.min(n,t);v(e===1?-1:1,o),te(a,()=>{if(r!==i){s=!1;return}if(m()===a){s=!1,b(),f();return}S(e,t-o,n,i)})},ne=(t,n,i,a)=>{if(n){S(t,n,i,a);return}if(!b()){let n=lM(e,r);n.length&&h(t<0?n[0]:n[n.length-1])}s=!1,f()},C=(t,n,i,a=0)=>{if(r!==i){s=!1;return}let o=Math.max(1,Math.floor(e.rows/pM));if(n<=0){ne(t,a,o,i);return}s=!0;let c=m();v(t,o),te(c,()=>{try{if(r!==i){s=!1;return}if(m()===c){ne(t,a,o,i);return}if(ee(t)){s=!1,f();return}f(),C(t,n-1,i,a+o)}catch(e){throw s=!1,e}})};return{search(e,t){if(s&&t!==0&&e===r)return;s=!1,x(),e!==r&&(i=null,o=null),r=e;let n=_(t);n&&t!==0&&(i=null,d()),f(),!(!n||t===0)&&C(n===`up`?-1:1,mM,e)},refresh(){f()},clear(){x(),r=``,i=null,o=null,s=!1,d(),f()},dispose(){x(),d(),n.remove()}}}var gM=2,_M=[`#2e3436`,`#cc0000`,`#4e9a06`,`#c4a000`,`#3465a4`,`#75507b`,`#06989a`,`#d3d7cf`,`#555753`,`#ef2929`,`#8ae234`,`#fce94f`,`#729fcf`,`#ad7fa8`,`#34e2e2`,`#eeeeec`];function vM(e){return e?.background||`#000000`}function yM(e,t){if(t<0||t>255)return vM(e);let n=[e?.black,e?.red,e?.green,e?.yellow,e?.blue,e?.magenta,e?.cyan,e?.white,e?.brightBlack,e?.brightRed,e?.brightGreen,e?.brightYellow,e?.brightBlue,e?.brightMagenta,e?.brightCyan,e?.brightWhite][t];if(n)return n;if(t<16)return _M[t];if(t<232){let e=t-16,n=Math.floor(e/36),r=Math.floor(e%36/6),i=e%6,a=e=>e===0?0:55+e*40;return`rgb(${a(n)},${a(r)},${a(i)})`}let r=8+(t-232)*10;return`rgb(${r},${r},${r})`}function bM(e,t){let n=e.options.theme;if(t.isBgDefault())return vM(n);if(t.isBgRGB()){let e=t.getBgColor();return`rgb(${e>>16&255},${e>>8&255},${e&255})`}return t.isBgPalette()?yM(n,t.getBgColor()):vM(n)}function xM(e){let t=e.buffer.active,n=t.getNullCell(),r=t.viewportY,i=Math.min(t.length-1,r+Math.max(0,e.rows-1)),a=Math.max(0,e.cols-1),o=[[0,r],[a,r],[0,i],[a,i],[Math.floor(a/2),r+Math.floor((i-r)/2)]],s=new Map;for(let[r,i]of o){if(!t.getLine(i)?.getCell(r,n))continue;let a=bM(e,n);s.set(a,(s.get(a)||0)+1)}let c=vM(e.options.theme),l=0;for(let[e,t]of s)t>l&&(c=e,l=t);return c}function SM(e){let t=e._core?._renderService?.dimensions?.css?.cell;return!t?.width||!t?.height?null:{w:t.width,h:t.height}}function CM(e){try{let t=e._core;if(!t)return;let n=t._viewport||t.viewport;return n?n._scrollableElement||n.scrollableElement:void 0}catch{return}}function wM(e){try{let t=e.options.overviewRuler;(!t||t.width!==0)&&(e.options.overviewRuler={...t||{},width:0}),CM(e)?.updateOptions?.({vertical:gM,verticalScrollbarSize:0})}catch{}}function TM(e,t,n){return e.style.getPropertyValue(t)===n&&e.style.getPropertyPriority(t)===`important`?!1:(e.style.setProperty(t,n,`important`),!0)}function EM(e){TM(e,`display`,`none`),TM(e,`width`,`0px`),TM(e,`min-width`,`0px`),TM(e,`max-width`,`0px`),TM(e,`height`,`0px`),TM(e,`opacity`,`0`),TM(e,`pointer-events`,`none`),TM(e,`visibility`,`hidden`)}function DM(e){return e instanceof HTMLElement?e.classList.contains(`scrollbar`)||e.classList.contains(`slider`)||e.classList.contains(`shadow`):!1}function OM(e){let t=e.element;if(!t)return{dispose(){}};let n=!1,r=new Set,i=new MutationObserver(()=>{if(!n){n=!0;try{for(let e of r)e.isConnected&&EM(e)}finally{n=!1}}}),a=e=>{if(!r.has(e)){r.add(e),n=!0;try{EM(e)}finally{n=!1}i.observe(e,{attributes:!0,attributeFilter:[`style`,`class`]})}};(()=>{wM(e);let r=t.querySelector(`.xterm-viewport`);if(r){n=!0;try{TM(r,`overflow`,`hidden`),TM(r,`overflow-y`,`hidden`),TM(r,`overflow-x`,`hidden`)}finally{n=!1}}for(let e of t.querySelectorAll(`.scrollbar, .scrollbar .slider, .xterm-scrollable-element > .shadow`))a(e)})();let o=new MutationObserver(t=>{let n=!1;for(let e of t)for(let t of e.addedNodes)if(DM(t))n=!0,a(t);else if(t instanceof HTMLElement)for(let e of t.querySelectorAll(`.scrollbar, .slider, .shadow`))n=!0,a(e);n&&wM(e)});return o.observe(t,{childList:!0,subtree:!0}),{dispose(){i.disconnect(),o.disconnect(),r.clear()}}}function kM(e,t){wM(e);let n=e.element?.parentElement,r=SM(e);if(!n||!r||!e.element){t.fit();return}let i=getComputedStyle(n),a=getComputedStyle(e.element),o=(parseFloat(a.paddingLeft)||0)+(parseFloat(a.paddingRight)||0),s=(parseFloat(a.paddingTop)||0)+(parseFloat(a.paddingBottom)||0),c=Math.max(0,parseFloat(i.width)||n.clientWidth)-o,l=Math.max(0,parseFloat(i.height)||n.clientHeight)-s,u=Math.max(2,Math.floor(c/r.w)),d=Math.max(1,Math.floor(l/r.h));if(e.cols!==u||e.rows!==d){try{e._core?._renderService?.clear?.()}catch{}e.resize(u,d)}}function AM(e,t){let n=e.element;if(!n)return;let r=xM(e);if(n.dataset.shellBg===r&&(!t||t.dataset.shellBg===r))return;n.dataset.shellBg=r,n.style.backgroundColor=r,t&&(t.dataset.shellBg=r,t.style.backgroundColor=r);let i=n.querySelector(`.xterm-viewport`);i&&(i.style.backgroundColor=r);let a=n.querySelector(`.xterm-scrollable-element`);a&&(a.style.backgroundColor=r)}function jM(e,t){let n=0,r=()=>{n||=requestAnimationFrame(()=>{n=0,AM(e,t())})};AM(e,t());let i=e.onWriteParsed(r);return{dispose(){cancelAnimationFrame(n),i.dispose()}}}var MM=`_do _y`,NM=`_dS _y`,PM=`_dV _dU`,FM=`_dW _dU`,IM=`_dZ _dU`,LM=`<div><div><input type=search enterkeyhint=search autocomplete=off placeholder="Find in terminal" aria-label="Find in terminal"><button type=button title="Previous match">↑</button><button type=button title="Next match">↓</button><button type=button title="Close find">×</button></div></div>`,RM=` D D b b b m`,zM=(e,t)=>{A(e.d,`disabled`,!t),A(e.e,`disabled`,!t)},BM=x(34,e=>zM(e,e.a7&&e.q)),VM=g(`u6`,e=>{e.u=!!e.q,e.w=e.s,e.n&&(e.n.focus=e.a4)}),HM=x(31,VM,5),UM=g(`u5`,e=>n(e,{onMount:function(){let t=new AbortController;return document.addEventListener(`keydown`,t=>{if(!e.u)return;if(t.key===`Escape`){if(document.querySelector(`dialog[open]`))return;t.preventDefault(),t.stopPropagation(),e.a3();return}let n=t.metaKey||t.ctrlKey;if(t.key===`F3`||n&&t.key.toLowerCase()===`g`){t.preventDefault(),t.stopPropagation(),e.a1(t.shiftKey?-1:1);return}if(!(n||t.altKey)){if(t.key===`Enter`){if(document.activeElement!==e.c)return;t.preventDefault(),t.stopPropagation(),e.a1(t.shiftKey?-1:1);return}if(t.key===`ArrowDown`){if(!e.w.trim())return;t.preventDefault(),t.stopPropagation(),e.a1(1);return}if(t.key===`ArrowUp`){if(!e.w.trim())return;t.preventDefault(),t.stopPropagation(),e.a1(-1)}}},{capture:!0,signal:t.signal}),e.z=e.o,e.a0=!!e.q,e.q&&e.a4(),{abort:t}},onUpdate:function(){e.o!==e.z&&(e.z=e.o,e.q&&(e.a4(),e.c?.select())),e.q&&!e.a0?(e.a0=!0,e.a4()):e.q||(e.a0=!1)},onDestroy:function(){if(this.abort.abort(),e.u){let t=e.m;t&&t()}}})),WM=x(32,UM,9),GM=x(37,e=>I(e.a,[`_fp`,e.aa?`_fr`:`_fq`,!e.q&&`_ft`])),KM=x(28,e=>ve(e,`c`,e.s,vN(e)),3),qM=Oe(16,e=>{A(e.a,`aria-hidden`,e.q?`false`:`true`),A(e.c,`tabindex`,e.q?0:-1),A(e.d,`tabindex`,e.q?0:-1),A(e.e,`tabindex`,e.q?0:-1),A(e.f,`tabindex`,e.q?0:-1),BM(e),HM(e),WM(e),GM(e),KM(e)}),JM=x(10,e=>qM(e,e.i,e.j)),YM=N(8,JM),XM=N(9,JM),ZM=N(33,BM),QM=C(18,e=>{ZM(e,!!e.s.trim()),HM(e),KM(e)}),$M=(e,t)=>{cN(e,t.open),lN(e,t.query)},eN=(e,t)=>{uN(e,t.tick),dN(e,t.wasOpen)},tN=N(30,e=>{HM(e),WM(e)}),nN=g(`u4`,e=>{Ae(e,`c`),P(e.c,`keydown`,function(t){if(e.q){if(t.key===`Escape`){t.preventDefault(),t.stopPropagation(),e.a3();return}t.stopPropagation()}}),P(e.d,`mousedown`,function(e){e.preventDefault()}),P(e.d,`click`,function(){e.a1(-1)}),P(e.e,`mousedown`,function(e){e.preventDefault()}),P(e.e,`click`,function(){e.a1(1)}),P(e.f,`mousedown`,function(e){e.preventDefault()}),P(e.f,`click`,function(){e.a3()})});function rN(e){QM(e,``),$M(e,{open:!1,query:``}),eN(e,{tick:0,wasOpen:!1}),tN(e,yN(e)),nN(e)}var iN=N(27,e=>{WM(e),KM(e)}),aN=x(23,e=>iN(e,bN(e)),2),oN=N(29,WM),sN=x(21,e=>oN(e,xN(e))),cN=N(20,e=>{aN(e),sN(e),HM(e),WM(e)}),lN=N(22,e=>{aN(e),HM(e),WM(e),KM(e)}),uN=N(25,WM),dN=N(26,WM),fN=N(11,aN),pN=N(12,e=>{sN(e),WM(e)}),mN=N(13,HM),hN=N(14,WM),gN=N(36,e=>{I(e.b,[`_fk`,e.aa?`_fs`:`_fm`]),I(e.c,[_e,e.aa&&`_fu`]),I(e.d,[ze,e.aa&&`_fv`]),I(e.e,[ze,e.aa&&`_fv`]),I(e.f,[ze,e.aa&&`_fv`]),GM(e)}),_N=(e,t)=>gN(e,t===`keybar`);function vN(e){return function(t){e.q&&(QM(e,t),e.w=t,e.a1(0))}}function yN(e){return()=>{let t=e.c;t&&(t.focus(),document.activeElement!==t&&setTimeout(()=>t.focus(),0))}}function bN(e){return t=>{if(!e.u)return;let n=e.l;n&&n(e.w,t)}}function xN(e){return()=>{qM(e,!1),e.u=!1;let t=e.m;t&&t()}}S(`u0`,vN),S(`u3`,yN),S(`u1`,bN),S(`u2`,xN);var SN=a,CN=(e=>`/${e}&`)(Ke);function wN(e){Je(e.a,`M8 6L20 6 M4 6.01L4.01 5.99889 M4 12.01L4.01 11.9989 M4 18.01L4.01 17.9989 M8 12L20 12 M8 18L20 18`)}var TN=(e,t)=>ae(e.a,t),EN=(e,t)=>j(e.a,t),DN=a,ON=(e=>`/${e}&`)(Ke);function kN(e){Je(e.a,`M15 4L8 20`)}var AN=(e,t)=>ae(e.a,t),jN=(e,t)=>j(e.a,t),MN=a,NN=(e=>`/${e}&`)(Ke);function PN(e){Je(e.a,`M7 12L17 12 M7 8L13 8 M3 20.2895V5C3 3.89543 3.89543 3 5 3H19C20.1046 3 21 3.89543 21 5V15C21 16.1046 20.1046 17 19 17H7.96125C7.35368 17 6.77906 17.2762 6.39951 17.7506L4.06852 20.6643C3.71421 21.1072 3 20.8567 3 20.2895Z`)}var FN=(e,t)=>ae(e.a,t),IN=(e,t)=>j(e.a,t),LN=a,RN=(e=>`/${e}&`)(Ke);function zN(e){Je(e.a,`M8.5 4H6C4.89543 4 4 4.89543 4 6V20C4 21.1046 4.89543 22 6 22H18C19.1046 22 20 21.1046 20 20V6C20 4.89543 19.1046 4 18 4H15.5 M8 6.4V4.5C8 4.22386 8.22386 4 8.5 4C8.77614 4 9.00422 3.77604 9.05152 3.50398C9.19968 2.65171 9.77399 1 12 1C14.226 1 14.8003 2.65171 14.9485 3.50398C14.9958 3.77604 15.2239 4 15.5 4C15.7761 4 16 4.22386 16 4.5V6.4C16 6.73137 15.7314 7 15.4 7H8.6C8.26863 7 8 6.73137 8 6.4Z`)}var BN=(e,t)=>ae(e.a,t),VN=(e,t)=>j(e.a,t),HN=`<div><div></div><!><!><!><!><!></div><!><!>`,UN=` D b%b%b%b%b%l%c`,WN=400,GN=55,KN=3e4,qN=150,JN=[[{kind:`paste`},{kind:`key`,label:`▲`,seq:`\x1B[A`},{kind:`key`,label:`⇥`,seq:` `}],[{kind:`key`,label:`◀`,seq:`\x1B[D`},{kind:`key`,label:`↵`,seq:`\r`},{kind:`key`,label:`▶`,seq:`\x1B[C`}],[{kind:`esc`},{kind:`key`,label:`▼`,seq:`\x1B[B`},{kind:`key`,label:`^C`,seq:``}]],YN=g(`v26`,e=>P(e.a,`click`,function(){TF(e._._._,e._._.d),DF(e._._._,e._._.h||e._._.i)})),XN=e=>{I(e.a,[`_dL`,`_dM`]),fc(e.b),pc(e.b,12),mc(e.b),YN(e)},ZN=F(6,e=>ve(e,`c`,e._._.c,KL(e)),e=>e._._),QN=g(`v25`,e=>{Ae(e,`c`),P(e.c,`keydown`,function(t){t.key===`Enter`?(t.preventDefault(),e._._.e(e._.d)):t.key===`Escape`&&(t.preventDefault(),TF(e._._,null))}),P(e.c,`blur`,function(){e._._.e(e._.d)}),n(e,{onMount:function(){queueMicrotask(()=>{let t=e.c;t?.focus(),t?.select()})}})}),$N=e=>{ZN(e),eP._(e),tP._(e),e.b,Gt(e.b,14),Yt(e.b),I(e.c,`_dJ`),QN(e)},eP=c(0,0,e=>Jt(e.b,yt(e._.c))),tP=c(0,0,e=>I(e.a,[`_q`,Ne[_t(e._.g)]])),nP=e=>I(e.a,`_dt`),rP=e=>I(e.a,`_du`),iP=g(`v32`,e=>{P(e.a,`pointerdown`,function(e){e.preventDefault()}),P(e.a,`click`,function(){e._._._._.be()})}),aP=e=>{I(e.a,PM),zN(e.b),BN(e.b,16),VN(e.b),iP(e)},oP=c(0,2,e=>{I(e.a,[FM,{_dY:e._.e===`↵`,_dX:e._.e===`↵`||e._.e===`⇥`}]),E(e.b,e._.e)}),sP=g(`v35`,e=>{P(e.a,`pointerdown`,function(t){t.preventDefault(),e._._._._.b8(e._.f)}),P(e.a,`pointerup`,function(){e._._._._.b9()}),P(e.a,`pointercancel`,function(){e._._._._.b9()}),P(e.a,`pointerleave`,function(){e._._._._.b9()}),P(e.a,`contextmenu`,function(e){e.preventDefault()})}),cP=e=>{oP._(e),sP(e)},lP=g(`v33`,e=>P(e.a,`click`,function(){e._._._._.af?.send(`\x1B`)})),uP=F(92,lP,e=>e._._._._),dP=g(`v34`,e=>P(e.a,`pointerdown`,function(e){e.preventDefault()})),fP=u(0,(e=>`<button title=Paste>${e}</button>`)(LN),(e=>` D/${e}&l`)(RN),aP,`<button title=Escape>esc</button>`,` `,e=>{uP(e),I(e.a,IM),dP(e)},`<button> </button>`,` D `,cP),pP=(e,t)=>fP(e,t===`paste`?0:t===`esc`?1:2),mP=(e,t)=>{pP(e,t[0]?.kind),hP(e,t[0]?.label),gP(e,t[0]?.seq)},hP=N(4),gP=N(5),_P=R(0,`<!><!><!>`,`b%`,0,mP),vP=(e,t)=>_P(e,[t]),yP=(e,t)=>vP(e,t[0]),bP=F(89,e=>YM(e.a,e._._.aa),e=>e._._),xP=e=>{bP(e),SP(e),CP(e),TP(e),EP(e),DP(e),OP(e),rN(e.a),_N(e.a,`keybar`)},SP=F(90,e=>XM(e.a,e._._.ac),e=>e._._),CP=F(91,e=>hN(e.a,e._._.ad),e=>e._._),wP=x(1,e=>pN(e.a,qL(e))),TP=F(92,wP,e=>e._._),EP=F(93,e=>mN(e.a,e._._.am),e=>e._._),DP=F(94,e=>fN(e.a,JL(e)),e=>e._._),OP=F(95,wP,e=>e._._),kP=c(2,0,e=>YM(e.a,e._.aa)),AP=e=>{kP._(e),jP._(e),MP._(e),PP._(e),FP._(e),IP._(e),LP._(e),rN(e.a),_N(e.a,`overlay`)},jP=c(2,0,e=>XM(e.a,e._.ac)),MP=c(2,0,e=>hN(e.a,e._.ad)),NP=x(1,e=>pN(e.a,YL(e))),PP=c(2,0,NP),FP=c(2,0,e=>mN(e.a,e._.am)),IP=c(2,0,e=>fN(e.a,XL(e))),LP=c(2,0,NP),RP=g(`v23`,e=>{e._.a9&&setTimeout(()=>e.d?.focus(),50)}),zP=c(6,0,RP),BP=g(`v24`,e=>{P(e.a,`click`,function(){RI(e._,!1)}),P(e.b,`click`,function(e){e.stopPropagation()}),P(e.d,`paste`,function(t){t.preventDefault(),e._.bd(t.clipboardData)}),P(e.e,`click`,function(){RI(e._,!1)})}),VP=e=>{zP._(e),I(e.a,`_dv`),I(e.b,`_dw`),I(e.c,`_d0`),I(e.e,`_f`),BP(e)},HP=g(`v22`,e=>P(e.b,`click`,function(){yI(e._,!1)})),UP=e=>{I(e.a,`_dr`),I(e.b,[`_f`,`_g`]),HP(e)},WP=F(86,e=>E(e.c,e._._.a2),e=>e._._),GP=e=>{WP(e),I(e.a,`_dP`),I(e.b,`_dQ`)},KP=g(`v29`,e=>P(e.a,`click`,function(t,n){n.closest(`[popover]`)?.hidePopover(),e._._._.v?.(e.d)})),qP=e=>{I(e.a,MM),e.b,Gt(e.b,15),Yt(e.b),KP(e)},JP=N(3,e=>{A(e.a,`title`,`New ${e.d} session`),Jt(e.b,e.d)}),YP=(e,t)=>JP(e,t[0]),XP=x(1,e=>{I(e.a,[`_dL`,{_dK:e._._._._.g===e._._.d}]),A(e.a,`title`,e._._._._.g===e._._.d?`Really kill this session?`:`Kill session`)}),ZP=F(9,XP,e=>e._._._._),QP=g(`v27`,e=>P(e.a,`click`,function(t,n){e._._._._.g===e._._.d?(jF(e._._._._,null),n.closest(`[popover]`)?.hidePopover(),e._._._._._._.a0?.(e._._.d)):jF(e._._._._,e._._.d)})),$P=e=>{ZP(e),eF(e),QP(e)},eF=F(10,XP,e=>e._._),tF=u(5,(e=>`<button title="Rename session">${e}</button>`)(uc),(e=>` D/${e}&l`)(dc),XN),nF=F(83,e=>tF(e,+!e._._._._._.z),e=>e._._._._._),rF=g(`v28`,e=>P(e.a,`click`,function(t,n){n.closest(`[popover]`)?.hidePopover(),e._.d!==e._._._._._.x&&e._._._._._.w?.(e._.d)})),iF=e=>{nF(e),oF(e),sF._(e),cF._(e),I(e.a,`_dH`),e.c,Gt(e.c,14),Yt(e.c),I(e.d,`_dI`),rF(e)},aF=u(6,`<button>×</button>`,` `,$P),oF=F(84,e=>aF(e,+!e._._._._._.a0),e=>e._._._._._),sF=c(0,1,e=>{Jt(e.c,yt(e._.c)),E(e.e,e._.c?.title||yt(e._.c))}),cF=c(0,1,e=>I(e.b,[`_q`,Ne[_t(e._.g)]])),lF=x(4,e=>I(e.a,[`_dG`,{_dF:e.d===e._._._._.x}])),uF=F(81,lF,e=>e._._._._),dF=e=>{uF(e),pF._(e)},fF=u(0,(e=>`<span></span>${e}<input aria-label="Session name">`)(Ft),(e=>` b/${e}& b`)(`b%c`),$N,(e=>`<button><span></span>${e}<span> </span></button><!><!><!>`)(Ft),(e=>` D b/${e}& D m%b%c`)(`b%c`),iF),pF=D(0,1,3,e=>fF(e,e._.b===e.d?0:1)),mF=L(eF),hF=N(3,e=>{lF(e),mF(e)}),gF=(e,t)=>_F(e,t[0]),_F=N(2,e=>{hF(e,e.c?.id),vF(e,e.c?.state),yF(e,e.c?.title),bF(e,e.c?.agent),sF(e),eP(e)}),vF=N(6,e=>{cF(e),tP(e)}),yF=N(7),bF=N(8),xF=R(0,`<div></div>`,` `,dF,gF),SF=F(82,e=>xF(e,[e._._._.y||[],`id`]),e=>e._._._),CF=N(4),wF=x(3,e=>CF(e,ZL(e)),2),TF=C(1,e=>{wF(e),pF(e)}),EF=L(ZN),DF=C(2,e=>{wF(e),EF(e)}),OF=e=>{SF(e),kF(e),TF(e,null),DF(e,``)},kF=F(83,wF,e=>e._._._),AF=F(79,e=>I(e.c,[`_q`,`_dD`,Ne[_t(e._._.o)]]),e=>e._._),jF=C(6,L(ZP)),MF=x(8,e=>A(e.a,`popovertarget`,e._._.au?e.h:void 0)),NF=N(7,e=>{A(e.d,`id`,e.h),MF(e)}),PF=g(`v30`,e=>P(e.d,`toggle`,function(t,n){if(jF(e,null),t.newState===`open`){let t=e.a.getBoundingClientRect();n.style.top=`${Math.max(8,t.top-n.offsetHeight-8)}px`,n.style.left=`${Math.max(8,Math.min(t.left+t.width/2-n.offsetWidth/2,window.innerWidth-n.offsetWidth-8))}px`}})),FF=e=>{AF(e),LF(e),zF(e),VF(e),HF(e),I(e.a,[NM,`_dC`]),e.b,Gt(e.b,16),Yt(e.b),I(e.d,`_dE`),jF(e,null),NF(e,k(e)),PF(e)},IF=u(4,`<!><!><!>`,`b%`,OF),LF=F(82,e=>{I(e.f,[`_dO`,{_dN:(e._._.y||[]).length<=1}]),IF(e,(e._._.y||[]).length>1?0:1)},e=>e._._),RF=R(5,(e=>`<button>${e}</button>`)(Ft),(e=>` D/${e}&l`)(`b%c`),qP,YP),zF=F(85,e=>RF(e,[[...e._._.a1||[],`shell`],e=>e]),e=>e._._),BF=g(`v31`,e=>P(e.a,`click`,!e._._.au&&(()=>{e._._.w?.(e._._.x)}))),VF=F(96,e=>{A(e.a,`title`,e._._.au?`Sessions`:`Back to session`),MF(e),BF(e)},e=>e._._),HF=F(99,e=>Jt(e.b,e._._.b1),e=>e._._),UF=qe(`v21`,19),WF=x(23,e=>I(e.d,[`_dz`,{_dA:e._.aa||!!e._.l&&e._.k===`diff`}]),2),GF=x(24,e=>{A(e.o,`title`,e._.az?`Close find`:e._.ax?e._.k===`diff`?`Find in the review`:`Find in terminal`:`Find unavailable on this page`),A(e.o,`aria-label`,e._.az?`Close find`:e._.ax?e._.k===`diff`?`Find in the review`:`Find in terminal`:`Find unavailable on this page`)},2),KF=c(7,0,e=>{I(e.e,[NM,{_dR:e._.k===`nav`}]),A(e.e,`aria-pressed`,e._.k===`nav`?`true`:`false`),I(e.g,[NM,{_dR:e._.k===`manage`}]),A(e.g,`aria-pressed`,e._.k===`manage`?`true`:`false`),I(e.i,[NM,{_dR:e._.k===`diff`}]),A(e.i,`title`,e._.k===`diff`?`Back to terminal`:`Review changes`),A(e.i,`aria-pressed`,e._.k===`diff`?`true`:`false`),WF(e),GF(e)}),qF=N(19,e=>A(e.m,`aria-controls`,e.t)),JF=(e,t)=>pI(e,t.open),YF=R(18,`<!><!><!>`,`b%`,0,yP),XF=g(`v38`,e=>{P(e.e,`click`,function(){e._.r?.()}),P(e.g,`click`,function(){e._.s?.()}),P(e.i,`click`,function(){e._.k===`diff`?e._.t?.():e._.u?.()}),P(e.o,`click`,function(){e._.b0()}),P(e.q,`pointerdown`,function(e){e.preventDefault()}),P(e.s,`pointerdown`,function(e){e.preventDefault()}),P(e.s,`toggle`,function(t,n){t.newState===`open`&&requestAnimationFrame(()=>{let t=e.m?.getBoundingClientRect();t&&(n.style.bottom=`auto`,n.style.right=`0.5rem`,n.style.left=`auto`,n.style.top=`${Math.max(8,t.top-n.offsetHeight-8)}px`)})})}),ZF=e=>{KF._(e),QF._(e),eI._(e),nI._(e),iI._(e),aI._(e),sI._(e),lI._(e),uI._(e),dI._(e),I(e.a,`_dx`),I(e.b,`_dy`),wN(e.f),TN(e.f,16),EN(e.f),Dt(e.h),Ot(e.h,16),kt(e.h),St(e.j),Ct(e.j,16),wt(e.j),I(e.k,`_dB`),I(e.m,NM),kN(e.n),AN(e.n,16),jN(e.n),Te(e.p),Re(e.p,16),Me(e.p),PN(e.r),FN(e.r,16),IN(e.r),A(e.s,`id`,UF(e)),I(e.s,`_dT`),qF(e,k(e)),JF(e,{open:!1}),YF(e,[JN]),XF(e)},QF=c(7,0,WF),$F=u(10,(e=>`<button>${e}<span></span></button><div popover=auto><!><div></div></div>`)(Ft),(e=>` D/${e}& l D%b l`)(`b%c`),FF),eI=c(7,0,e=>$F(e,+!e._.v)),tI=u(11,`<span aria-hidden=true><span> </span></span>`,` D D `,GP),nI=c(7,0,e=>tI(e,+!e._.a2)),rI=x(22,e=>A(e.q,`title`,e._.ax?e._.a5?`Hide keyboard`:`Show keyboard`:`Keyboard unavailable on this page`)),iI=c(7,0,e=>{I(e.q,[NM,{_dR:e._.a5}]),rI(e)}),aI=c(7,0,WF),oI=g(`v36`,e=>P(e.q,`click`,function(){OI(e._,!e._.a5),e._.af?.setKeyboard(e._.a5)})),sI=c(7,0,oI),cI=u(2,LM,(e=>`/${e}&`)(RM),xP),lI=c(7,0,e=>cI(e,+!e._.au)),uI=c(7,0,e=>{A(e.m,`title`,e._.ax?`More keys`:`Keys unavailable on this page`),A(e.m,`disabled`,!e._.ax),A(e.o,`disabled`,!e._.ax),A(e.q,`disabled`,!e._.ax),GF(e),rI(e)}),dI=c(7,0,e=>{I(e.o,[NM,{_dR:e._.az}]),A(e.o,`aria-pressed`,e._.az?`true`:`false`),GF(e)}),fI=g(`v37`,e=>{P(e.m,`pointerdown`,function(t){t.preventDefault(),e.v=!!e.s?.matches(`:popover-open`)}),P(e.m,`click`,function(){let t=e.s;t&&(e.v?t.hidePopover():t.showPopover())})}),pI=N(21,fI),mI=qe(`v20`,1),hI=o(71),gI=u(5,`<div><button>Reconnect</button></div>`,` D `,UP),_I=g(`v39`,e=>n(e,{onMount:function(){let t=new AbortController,n=t.signal,i=new HE({fontSize:13,fontFamily:`ui-monospace, monospace`,scrollback:0,overviewRuler:{width:0},allowProposedApi:!0,rightClickSelectsWord:!0,macOptionClickForcesSelection:!0,theme:{selectionBackground:`#ffb000`,selectionInactiveBackground:`#ffb000`,selectionForeground:`#000000`},linkHandler:{activate(e,t){se(t)}}}),a=new oj;i.loadAddon(a),i.open(e.b);let o=r();try{let e=new rj;e.onContextLoss(()=>e.dispose()),i.loadAddon(e)}catch{}try{i.loadAddon(new Wj(void 0,{readText:()=>navigator.clipboard.readText().catch(()=>``),writeText:(e,t)=>ke(t).then(()=>{})}))}catch{}i.loadAddon(new Qj((e,t)=>se(t)));let s=hM(i,e.b);e.aj=s;let c=i.onScroll(()=>e.ao()),l=i.onWriteParsed(()=>e.ao());e.b.addEventListener(`wheel`,()=>e.ao(),{passive:!0,signal:n}),kM(i,a);let u=OM(i),d=jM(i,mI(e));n.addEventListener(`abort`,()=>{c.dispose(),l.dispose(),u.dispose(),d.dispose(),e.aq(),s.dispose(),e.aj=null});let f=o?tM(i):null,p=f?f.write:e=>i.write(e),m=$j({sessionId:e.x,term:i,write:p,onDead:()=>{yI(e,!0)},isVisible:()=>!!e.a3},n),h={on:!1},g=e=>e.startsWith(`\x1B[<`)||e.startsWith(`\x1B[M`)||e.startsWith(`\x1B[>`);i.onData(e=>{h.on&&!g(e)||m.send(e)}),i.attachCustomKeyEventHandler(t=>h.on?!1:t.key===`Enter`&&t.shiftKey?(t.type===`keydown`&&m.send(`\x1B\r`),!1):(t.ctrlKey||t.metaKey)&&t.key.toLowerCase()===`c`&&i.hasSelection()?(t.type===`keydown`&&ke(i.getSelection()).then(t=>{t&&(i.clearSelection(),e.b4())}),!1):t.metaKey&&!t.ctrlKey&&!t.altKey&&(t.key===`ArrowLeft`||t.key===`ArrowRight`)?(t.preventDefault(),t.type===`keydown`&&e.af?.send(t.key===`ArrowLeft`?``:``),!1):!((t.ctrlKey||t.metaKey)&&!t.shiftKey&&!t.altKey&&t.key.toLowerCase()===`f`||o&&t.type===`keydown`&&t.key===`Backspace`));let _=()=>{if(!e.b.clientWidth)return;let t=i.cols,n=i.rows;kM(i,a),(i.cols!==t||i.rows!==n)&&m.resize(i.cols,i.rows),AM(i,e.b),e.ao()},v=new ResizeObserver(_);v.observe(e.b),n.addEventListener(`abort`,()=>v.disconnect());let y=()=>requestAnimationFrame(_);if(document.addEventListener(`visibilitychange`,()=>{document.hidden||y()},{signal:n}),window.addEventListener(`pageshow`,y,{signal:n}),window.addEventListener(`focus`,y,{signal:n}),window.visualViewport?.addEventListener(`resize`,y,{signal:n}),window.addEventListener(`keydown`,t=>{e.a3&&(e.k==null||e.k===`term`)&&(t.metaKey||t.ctrlKey)&&!t.shiftKey&&!t.altKey&&t.key.toLowerCase()===`f`&&(t.preventDefault(),t.stopPropagation(),e.ar())},{capture:!0,signal:n}),e.b.addEventListener(`paste`,t=>{let n=[...t.clipboardData?.files||[]];if(n.length){t.preventDefault(),t.stopImmediatePropagation();for(let t of n)e.ba(t)}},{capture:!0,signal:n}),e.af={send(e){h.on||m.send(e)},setKeyboard(e){if(h.on&&e)return;let t=i.textarea;t&&(t.inputMode=e?`text`:`none`,e?(t.focus(),setTimeout(()=>{document.activeElement!==t&&t.focus()},50)):t.blur())},setFindMode(e){h.on=e;let t=i.textarea;t&&(e?(t.inputMode=`none`,t.readOnly=!0,t.blur()):(t.readOnly=!1,o||(t.inputMode=`text`)))}},o){i.textarea&&(i.textarea.inputMode=`none`);let t=window.visualViewport;if(t){let r=0,a=()=>{r=Math.max(r,t.height),e.a5&&r-t.height<qN&&(OI(e,!1),i.textarea&&(i.textarea.inputMode=`none`))};a(),t.addEventListener(`resize`,a,{signal:n}),window.addEventListener(`orientationchange`,()=>{r=0},{signal:n})}let r=oM(i,mI(e),{onStart(){f?.setFrozen(!0)},onEnd(){f?.setFrozen(!1)},onCopy(){e.b4()}},n);eM(i,mI(e),n,r.selecting),nM(i,e=>{h.on||m.send(e)},n)}else cM(i,mI(e),()=>e.b4(),n);e.a3&&!o&&i.focus();let b={term:i,socket:m,abort:t,suspend:void 0};return e.a3||(b.suspend=setTimeout(()=>m.disconnect(),KN)),b},onUpdate:function(){clearTimeout(this.suspend),this.socket.syncVisibility(),e.a3?(!e.a4&&this.socket.readyState>=WebSocket.CLOSING&&(this.term.reset(),this.socket.reconnect()),!e.a4&&!e.a6&&this.term.focus()):this.suspend=setTimeout(()=>this.socket.disconnect(),KN)},onDestroy:function(){clearTimeout(this.suspend),this.abort.abort(),this.term.dispose()}})),vI=x(74,_I,12),yI=C(30,e=>{gI(e,+!e.a4),vI(e)}),bI=N(62),xI=x(60,e=>bI(e,QL(e)),4),SI=N(55,xI),CI=x(54,e=>SI(e,$L(e)),3),wI=N(53,e=>{CI(e),vI(e)}),TI=x(49,e=>wI(e,eR(e)),3),EI=g(`v40`,e=>{e.au||(e.aa&&(HI(e,!1),e.aq(),e.af?.setFindMode(!1)),e.a5&&(OI(e,!1),e.af?.setKeyboard(!1)))}),DI=x(58,EI,4),OI=C(31,e=>{TI(e),DI(e),vI(e),iI(e)}),kI=u(7,((e,t,n,r,i,a)=>`<div><div><!><div><button title=Workspaces>${e}</button><button title="Manage workspace">${t}</button><button>${n}</button><div></div><!><button aria-haspopup=dialog>${r}</button><button>${i}</button><button>${a}</button></div><div popover=auto></div></div></div>`)(SN,Tt,bt,DN,he,MN),((e,t,n,r,i,a)=>` D D%b D D/${e}&l D/${t}&l D/${n}&l b%b D/${r}&l D/${i}&l D/${a}&m m`)(CN,Et,xt,ON,Pe,NN),ZF),AI=u(2,LM,(e=>`/${e}&`)(RM),AP),jI=x(37,e=>AI(e,!e.a6&&e.aa?0:1)),MI=C(32,e=>{kI(e,+!e.a6),jI(e),vI(e)}),NI=u(3,`<div>uploading…</div>`,` `,rP),PI=C(33,e=>NI(e,+!e.a7)),FI=u(4,`<div>Copied</div>`,` `,nP),II=C(34,e=>FI(e,+!e.a8)),LI=u(6,`<div><div><p>Long-press below and choose Paste</p><input placeholder="Paste here…"><button>Cancel</button></div></div>`,` D D b b `,VP),RI=C(35,e=>{LI(e,+!e.a9),zP(e)}),zI=N(61,dI),BI=x(57,e=>zI(e,e.au?e.aa:e.k===`diff`&&!!e.l),3),VI=L(bP),HI=C(36,e=>{CI(e),BI(e),DI(e),jI(e),aI(e),kP(e),VI(e)}),UI=N(38),WI=L(CP),GI=C(39,e=>{TI(e),MP(e),WI(e)}),KI=(e,t)=>oL(e,t.current),qI=(e,t)=>{dL(e,t.query),fL(e,t.overlay),pL(e,t.refreshTimer)},JI=N(48,TI),YI=(e,t)=>DL(e,t.timer),XI=(e,t)=>kL(e,t.current),ZI=g(`v41`,e=>{MI(e,r()),P(e.a,`dragover`,function(e){e.preventDefault()}),P(e.a,`drop`,function(t){t.preventDefault();for(let n of t.dataTransfer?.files||[])e.ba(n)})});function QI(e){I(e.a,`_dp`),I(e.b,`_dq`),yI(e,!1),OI(e,!1),MI(e,!1),PI(e,!1),II(e,!1),RI(e,!1),HI(e,!1),UI(e,tR(e)),GI(e,0),KI(e,{current:null}),qI(e,{overlay:null,query:``,refreshTimer:0}),JI(e,{focus:nR}),YI(e,{timer:0}),XI(e,{current:null}),ZI(e)}var $I=N(70),eL=x(69,e=>$I(e,rR(e))),tL=N(75),nL=N(76),rL=x(73,e=>{tL(e,iR(e)),nL(e,aR(e))}),iL=N(72,e=>{rL(e),vI(e)}),aL=x(42,e=>iL(e,oR(e))),oL=N(41,e=>{TI(e),CI(e),eL(e),aL(e),rL(e),DI(e),vI(e)}),sL=N(50,vI),cL=N(51),lL=N(52,e=>{CI(e),DI(e),vI(e)}),uL=x(47,e=>{sL(e,sR(e)),cL(e,cR(e)),lL(e,lR(e))},2),dL=N(44,uL),fL=N(45,e=>{uL(e),vI(e)}),pL=N(46,uL),mL=L(VF),hL=N(56,e=>{A(e.a,`hidden`,!e.au),BI(e),xI(e),DI(e),lI(e),mL(e)}),gL=N(59,e=>{xI(e),uI(e)}),_L=e=>{gL(e,e.au||e.k===`diff`)},vL=N(10,e=>{hL(e,e.k==null||e.k===`term`),_L(e),BI(e),xI(e),vI(e),KF(e)}),yL=N(11,e=>{BI(e),QF(e)}),bL=N(12,xI),xL=N(63,L(HF)),SL=x(15,e=>xL(e,yt({agent:e.n||`shell`,state:e.o}))),CL=N(13,SL),wL=L(AF),TL=N(14,e=>{SL(e),wL(e)}),EL=N(66,vI),DL=N(65,e=>EL(e,uR(e))),OL=N(71),kL=N(68,e=>{OL(e,dR(e)),eL(e)}),AL=N(16,aL),jL=L(uF),ML=N(23,e=>{vI(e),jL(e)}),NL=N(29,vI),PL=N(17),FL=N(18),IL=N(19),LL=N(20),RL=N(21,eI),zL=N(22),BL=N(24,L(LF,SF)),VL=N(25,L(kF,nF)),HL=N(26,L(oF)),UL=N(27,L(zF)),WL=L(WP),GL=N(28,e=>{nI(e),WL(e)});function KL(e){return t=>{DF(e._._,t)}}function qL(e){return function(){e._._.aq(),e._._.af?.setFindMode(!1)}}function JL(e){return function(t,n){e._._.ap(t,n)}}function YL(e){return function(){e._.aq(),e._.af?.setFindMode(!1)}}function XL(e){return function(t,n){e._.ap(t,n)}}function ZL(e){return t=>{if(e.b!==t)return;let n=e.c.trim();TF(e,null),n&&e._._._.z?.(t,n)}}function QL(e){return()=>{if(e.ax){if(e.au){e.at();return}e.k===`diff`&&e.m?.()}}}function $L(e){return()=>{if(e.aa){HI(e,!1),e.aq(),e.af?.setFindMode(!1);return}e.ar()}}function eR(e){return()=>{e.a5&&(OI(e,!1),e.af?.setKeyboard(!1)),e.af?.setFindMode(!0),HI(e,!0),GI(e,e.ad+1),e.am.focus()}}function tR(e){return t=>{HI(e,t)}}function nR(){}function rR(e){return t=>{hI(e)(),e.af?.send(t);let n={};n.delay=setTimeout(()=>{n.repeat=setInterval(()=>e.af?.send(t),GN)},WN),e.b6=n}}function iR(e){return async t=>{let n=[...t?.files||[]];for(let t of n)await e.ba(t);if(!n.length){let n=t?.getData(`text/plain`);n&&e.af?.send(n)}RI(e,!1)}}function aR(e){return async()=>{if(!navigator.clipboard?.read){RI(e,!0);return}try{for(let t of await navigator.clipboard.read()){let n=t.types.find(e=>e.startsWith(`image/`));if(n){let r=await t.getType(n);await e.ba(new File([r],`pasted.${n.split(`/`)[1]||`png`}`,{type:n}))}else if(t.types.includes(`text/plain`)){let n=await(await t.getType(`text/plain`)).text();n&&e.af?.send(n)}}}catch{RI(e,!0)}}}function oR(e){return async t=>{if(t){PI(e,!0);try{let n=await(await fetch(`/api/workspaces/${e.q}/assets?name=${encodeURIComponent(t.name||`pasted.png`)}`,{method:`POST`,body:t})).json();n.path&&e.af?.send(`${n.path} `)}finally{PI(e,!1)}}}}function sR(e){return()=>{!e.ai.trim()||!e.aj||(e.ak&&clearTimeout(e.ak),e.ak=setTimeout(()=>{e.ak=0,e.aj?.refresh()},32))}}function cR(e){return(t,n)=>{let r=e.aj;if(r){if(e.ai=t,e.ak&&=(clearTimeout(e.ak),0),!t.trim()){r.clear();return}r.search(t,n)}}}function lR(e){return()=>{e.ak&&=(clearTimeout(e.ak),0),e.ai=``,e.aj?.clear()}}function uR(e){return()=>{clearTimeout(e.b3),II(e,!0),e.b3=setTimeout(()=>{II(e,!1)},1200)}}function dR(e){return()=>{let t=e.b6;t&&(clearTimeout(t.delay),clearInterval(t.repeat),e.b6=null)}}S(`v0`,KL),S(`v18`,qL),S(`v17`,JL),S(`v16`,YL),S(`v15`,XL),S(`v19`,ZL),S(`v8`,QL),S(`v7`,$L),S(`v6`,eR),S(`v1`,tR),S(`v2`,nR),S(`v10`,rR),S(`v13`,iR),S(`v14`,aR),S(`v12`,oR),S(`v3`,sR),S(`v4`,cR),S(`v5`,lR),S(`v9`,uR),S(`v11`,dR);var fR=(e=>`<div><div>${e}</div><div><!><!><!><!><!><div></div></div></div>`)(sf),pR=(e=>` D D/${e}&l D%b%b%b%b%b m`)(cf);re();var mR=e=>I(e.a,`_bU`),hR=F(106,e=>E(e.a,e._._.ak),e=>e._._),gR=me(`y47`,` `,` `,hR),_R=e=>{w(e.a),ne(e.a,gR(e)),te(e.a,wV(e)),s(e.a),t(e.a),Ee(e.a),ee(e.a),h(e.a),De(e.a,{})},vR=b(3,0,2),yR=c(7,0,e=>vR(e,e._.a3===`usage`)),bR=e=>{yR._(e),Zv(e.b)},xR=x(4,e=>E(e.d,e._._.al?`Starting…`:`Start ${e._._.r||`claude`}`)),SR=F(93,xR,e=>e._._),CR=g(`y48`,e=>P(e.c,`click`,function(){e._._.bg(e._._.r||`claude`,!0)})),wR=e=>{SR(e),TR(e),I(e.a,`_bV`),I(e.b,`_bW`),I(e.c,[`_f`,`_g`]),CR(e)},TR=F(107,e=>{A(e.c,`disabled`,e._._.al),xR(e)},e=>e._._),ER=x(8,e=>NL(e.b,e._._.o&&e._._.a3===`term`&&e.g===e._._.b8),3),DR=F(92,ER,e=>e._._),OR=e=>{DR(e),kR(e),AR(e),jR(e),NR(e),PR(e),FR(e),RR(e),zR(e),BR(e),VR(e),HR(e),QI(e.b),zL(e.b,kV(e)),LL(e.b,OV(e)),IL(e.b,DV(e)),PL(e.b,EV(e)),FL(e.b,TV(e))},kR=F(96,e=>UL(e.b,e._._.u),e=>e._._),AR=F(99,e=>{vL(e.b,e._._.a3),ER(e)},e=>e._._),jR=F(101,e=>yL(e.b,e._._.ac),e=>e._._),MR=x(11,e=>RL(e.b,AV(e))),NR=F(109,e=>{AL(e.b,e._._.an),MR(e)},e=>e._._),PR=F(111,e=>GL(e.b,e._._.at),e=>e._._),FR=F(112,e=>BL(e.b,e._._.b5),e=>e._._),IR=b(3,0,2),LR=x(7,e=>IR(e,e.g===e._._.b8)),RR=F(114,e=>{ER(e),LR(e)},e=>e._._),zR=F(115,e=>bL(e.b,jV(e)),e=>e._._),BR=F(117,e=>HL(e.b,MV(e)),e=>e._._),VR=F(118,e=>VL(e.b,NV(e)),e=>e._._),HR=F(119,MR,e=>e._._),UR=N(6,e=>{ML(e.b,e.g),ER(e),LR(e)}),WR=(e,t)=>TL(e.b,t),GR=(e,t)=>CL(e.b,t),KR=R(0,(e=>`<!><!>${e}<!><!><!>`)(HN),(e=>`b%b/${e}&%b%c`)(UN),OR,(e,t)=>{UR(e,t[0]?.id),WR(e,t[0]?.state),GR(e,t[0]?.agent)}),qR=c(9,0,e=>KR(e,[e._.b5,`id`])),JR=e=>{qR._(e),XR._(e)},YR=u(1,`<div><p>No sessions in this workspace.</p><button> </button></div>`,` D b D `,wR),XR=c(9,0,e=>YR(e,+!!e._.b7)),ZR=x(4,e=>Is(e.b,PV(e)),2),QR=c(8,0,ZR),$R=e=>{QR._(e),ez._(e),tz._(e),nz._(e),iz._(e),az._(e),Ts(e.b),zs(e.b,FV(e))},ez=c(8,0,e=>Ns(e.b,e._.t||[])),tz=c(8,0,ZR),nz=c(8,0,e=>Ls(e.b,IV(e))),rz=b(3,0,2),iz=c(8,0,e=>rz(e,e._.a3===`new`)),az=c(8,0,ZR),oz=c(6,0,e=>R_(e.b,LV(e))),sz=e=>{oz._(e),lz._(e),uz._(e),d_(e.b),z_(e.b,RV(e))},cz=b(3,0,2),lz=c(6,0,e=>cz(e,e._.a3===`manage`)),uz=c(6,0,e=>L_(e.b,e._.am)),dz=Ge(1),fz=x(4,e=>dz(e,e._.a6,()=>({workspaceId:e._.an,workspaceBranch:e._.as,workspaceName:e._.at,sessions:e._.b5||[],active:e._.o&&e._.a3===`diff`,focusPr:e._.ah,focusNonce:e._.ai,findOpen:e._.ac,findOpenChange:VV(e),findTick:e._.ae,findFocusRef:e._.af,onSent:BV(e),onExit:zV(e)})),11),pz=c(5,0,fz),mz=e=>{pz._(e),gz._(e),_z._(e),vz._(e),yz._(e),bz._(e),xz._(e),Sz._(e),Cz._(e),wz._(e),Tz._(e),Ez._(e)},hz=b(3,0,2),gz=c(5,0,e=>{hz(e,e._.a3===`diff`),fz(e)}),_z=c(5,0,fz),vz=c(5,0,fz),yz=c(5,0,fz),bz=c(5,0,fz),xz=c(5,0,fz),Sz=c(5,0,fz),Cz=c(5,0,fz),wz=c(5,0,fz),Tz=c(5,0,fz),Ez=c(5,0,fz),Dz=L(VR),Oz=N(89,e=>{dh(e.c,HV(e)),Dz(e)}),kz=u(9,`<!><!><!><!>`,`b%b%`,JR,`<p>Loading sessions…</p>`,` `,mR),Az=L(RR),jz=N(70,e=>{bm(e.c,e.b8),Az(e)}),Mz=x(68,e=>jz(e,(()=>{if(e.a1&&e.b5?.some(t=>t.id===e.a1))return e.a1;let t=de(e.an);return t&&e.b5?.some(e=>e.id===t)?t:e.b5?.[0]?.id??null})()),2),Nz=L(FR),Pz=N(67,e=>{ch(e.c,e.b5),rV(e,e.b5?.length),kz(e,+!e.b5),Mz(e),Ez(e),qR(e),Nz(e)}),Fz=x(52,e=>Pz(e,e.a0??e.n?.[e.an]?.sessions??null),2),Iz=g(`y50`,t=>n(t,{active:t.o,load:t.bo,onMount:function(){let n=new AbortController,r=n.signal,i={abort:n,started:!1,stale:!1,timer:void 0,refresh:()=>{if(document.hidden){i.stale=!0;return}i.stale=!1,this.load(!1)},applySessions:e=>{Xz(t,e);let n=de(t.an);n&&e.some(e=>e.id===n)&&$z(t,n),e.some(e=>e.id===t.a1)||$z(t,e[0]?.id||null),i.stale=!1},mergeStatus:e=>{let n=e?.[t.an]?.sessions;if(!n||!t.a0)return;let r=new Map(n.map(e=>[e.id,e.state]));Xz(t,t.a0.map(e=>{let t=r.get(e.id);return t?{...e,state:t}:e}))},syncPoll:()=>{if(!this.active||e()){i.stop();return}i.timer??=setInterval(i.refresh,15e3)},sync:()=>{this.active?(i.started||(i.started=!0,this.load(!0)),i.syncPoll()):i.stop()},stop:()=>{clearInterval(i.timer),i.timer=void 0}};return T().addEventListener(`sessions.changed`,e=>{if(!i.started)return;let n=e.data;if(!(n?.workspaceId&&n.workspaceId!==t.an)){if(Array.isArray(n?.sessions)){i.applySessions(n.sessions);return}i.refresh()}},{signal:r}),T().addEventListener(`status.changed`,e=>{i.started&&i.mergeStatus(e.data)},{signal:r}),T().addEventListener(`sse.health`,()=>{i.syncPoll()},{signal:r}),document.addEventListener(`visibilitychange`,()=>{!document.hidden&&i.stale&&i.refresh()},{signal:r}),tt(()=>{if(!this.active)return;let e=rt(t.an);e&&t.au(e.pr),st(t.an)&&t.aw();let n=at(t.an);n&&($z(t,n),$(t,`term`))},r),i.sync(),i},onUpdate:function(){this.sync()},onDestroy:function(){this.abort.abort(),this.stop()}})),Lz=x(87,Iz,6),Rz=N(86,Lz),zz=x(85,e=>Rz(e,WV(e)),2),Bz=N(84,zz),Vz=x(82,e=>Bz(e,GV(e)),6),Hz=x(91,e=>ih(e.c,KV(e))),Uz=L(HR),Wz=N(90,e=>{Hz(e),Uz(e)}),Gz=x(79,e=>Wz(e,qV(e)),2),Kz=N(78,e=>{Vz(e),Gz(e)}),qz=x(50,e=>Kz(e,JV(e))),Jz=N(88,L(BR)),Yz=x(28,e=>Jz(e,YV(e))),Xz=C(26,e=>{Oz(e,UV(e)),Fz(e),qz(e),Vz(e),Yz(e),Lz(e)}),Zz=g(`y51`,e=>{e.a1&&ue(e.an,e.a1)}),Qz=x(51,Zz),$z=C(27,e=>{Mz(e),Vz(e),Yz(e),Qz(e),Lz(e)}),eB=N(64),tB=x(76,e=>$m(e.c,ZV(e))),nB=x(77,e=>oh(e.c,QV(e))),rB=N(75,e=>{tB(e),Hz(e),nB(e),az(e)}),iB=N(63),aB=x(62,e=>iB(e,eH(e))),oB=N(65),sB=x(59,e=>oB(e,tH(e))),cB=N(66),lB=x(57,e=>cB(e,nH(e))),uB=g(`y55`,e=>{!e.o&&(e.a3===`nav`||e.a3===`manage`||e.a3===`usage`||e.a3===`new`)&&$(e,`term`)}),dB=x(30,uB),fB=g(`y54`,e=>{e.a3!==`diff`&&e.ac&&FB(e,!1)}),pB=x(39,fB),mB=g(`y53`,e=>{e.o&&e.p&&!e.ba&&(e.ba=!0,jB(e,!0),$(e,`new`)),e.p?e.ba&&e.a3!==`new`&&(e.ba=!1,e.q?.()):(e.ba=!1,e.a3===`new`&&$(e,`term`))}),hB=x(73,mB,4),gB=L(AR),$=C(29,e=>{I(e.a,[`_bP`,{_bO:e.a3===`nav`}]),Mm(e.c,e.a3),I(e.j,[`_bT`,{_bS:e.a3!==`term`}]),eB(e,XV(e)),rB(e,$V(e)),aB(e),sB(e),lB(e),dB(e),pB(e),hB(e),gz(e),lz(e),iz(e),gB(e),yR(e)}),_B=u(5,`<!><!><!><!><!><!>`,`b%b%b%b%`,mz),vB=x(33,e=>_B(e,e.a5&&e.a6?0:1)),yB=C(31,vB),bB=g(`y52`,e=>{if(e.o){let t=rt(e.an);t&&e.au(t.pr),st(e.an)&&e.aw();let n=at(e.an);n&&($z(e,n),$(e,`term`))}}),xB=x(60,bB,3),SB=N(56,e=>{lB(e),xB(e),Lz(e),nB(e)}),CB=x(45,e=>SB(e,rH(e))),wB=N(34,CB),TB=C(32,e=>{wB(e,iH(e)),vB(e),_z(e)}),EB=u(6,(e=>`<!><!>${e}<!><!><!>`)(Fh),(e=>`b%b/${e}&%b%c`)(Ih),sz),DB=C(35,e=>EB(e,+!e.a9)),OB=u(7,(e=>`<!><!>${e}<!><!><!>`)(tv),(e=>`b%b/${e}&%b%c`)(nv),bR),kB=C(36,e=>OB(e,+!e.aa)),AB=u(8,(e=>`<!><!>${e}<!><!><!>`)(ao),(e=>`b%b/${e}&%b%c`)(oo),$R),jB=C(37,e=>AB(e,+!e.ab)),MB=N(74,L(zR)),NB=x(42,e=>MB(e,aH(e)),2),PB=L(jR),FB=C(38,e=>{pB(e),NB(e),vz(e),PB(e)}),IB=C(40,e=>{NB(e),yz(e)}),LB=N(41,NB),RB=C(43,xz),zB=C(44,e=>{CB(e),Sz(e)}),BB=u(4,d,(e=>`/${e}&`)(y),_R),VB=L(hR),HB=C(46,e=>{BB(e,+!e.ak),VB(e)}),UB=C(47,L(TR)),WB=N(58,e=>{sB(e),xB(e),Lz(e)}),GB=N(61,aB),KB=(e,t)=>aV(e,t.open),qB=(e,t)=>{dV(e,t.wanted),fV(e,t.run)};function JB(e){I(e.b,`_bQ`),Hm(e.c),xm(e.c,hH(e)),Nm(e.c,mH(e)),Um(e.c,pH(e)),lh(e.c,fH(e)),mh(e.c,dH(e)),Zm(e.c,uH(e)),ph(e.c,lH(e)),I(e.d,`_bR`),Xz(e,null),$z(e,null),$(e,`term`),yB(e,!1),TB(e,null),DB(e,!1),kB(e,!1),jB(e,!1),FB(e,!1),IB(e,0),LB(e,{focus:oH}),RB(e,``),zB(e,0),HB(e,null),UB(e,!1),WB(e,sH(e)),GB(e,cH(e)),KB(e,{open:!1}),qB(e,{wanted:!1,run:void 0})}var YB=N(48,e=>{gm(e.c,e.am),ZB(e,e.am?.id),QB(e,e.am?.status),$B(e,e.am?.branch),tV(e,e.am?.name),uz(e)}),XB=L(NR),ZB=N(49,e=>{eh(e.c,gH(e)),Fz(e),Mz(e),xB(e),qz(e),Vz(e),Qz(e),Gz(e),Lz(e),Cz(e),XB(e)}),QB=N(53,Vz),$B=N(54,wz),eV=L(PR),tV=N(55,e=>{Tz(e),eV(e)}),nV=YB,rV=N(69,XR),iV=N(13,e=>{Ym(e.c,e.n),Fz(e)}),aV=N(72,hB),oV=L(DR),sV=g(`y49`,e=>P(e.a,`keydown`,e.o&&(t=>{if(t.key===`Escape`&&e.a3===`nav`&&!document.querySelector(`dialog[open]`)&&$(e,`term`),(t.metaKey||t.ctrlKey)&&t.shiftKey&&t.key.toLowerCase()===`d`&&(t.preventDefault(),e.b4()),t.altKey&&(t.key===`[`||t.key===`]`)&&(e.b5?.length??0)>1){t.preventDefault();let n=e.b5.map(e=>e.id);$z(e,n[(Math.max(0,n.indexOf(e.b8))+(t.key===`]`?1:n.length-1))%n.length]),$(e,`term`)}}))),cV=N(14,e=>{Gm(e.c,e.o),dB(e),hB(e),xB(e),Lz(e),pz(e),oV(e),sV(e)}),lV=N(15,hB),uV=N(16,hB),dV=N(81,e=>{Vz(e),zz(e)}),fV=N(83,zz),pV=L(SR),mV=N(17,e=>{Vz(e),pV(e)}),hV=N(18,e=>{Gz(e),tB(e),QR(e)}),gV=N(19,e=>{Km(e.c,e.t),ez(e)}),_V=L(kR),vV=N(20,e=>{nh(e.c,e.u),_V(e)}),yV=N(21),bV=N(22),xV=N(23),SV=N(24,e=>{oz(e),tz(e)}),CV=N(25,nz);function wV(e){return function(){HB(e._,null)}}function TV(e){return function(){e._._.b3()}}function EV(e){return function(){e._._.b2()}}function DV(e){return function(){$(e._._,`term`)}}function OV(e){return function(){e._._.b4()}}function kV(e){return function(t){$z(e._._,t),$(e._._,`term`)}}function AV(e){return function(t){$(e._._,`term`),e._._.bs(e._._.an,t)}}function jV(e){return function(){e._._.bc()}}function MV(e){return function(t){e._._.bq(t)}}function NV(e){return function(t,n){e._._.br(t,n)}}function PV(e){return function(t){e._.y?.(t),e._.s?.(t.id),e._.bd()}}function FV(e){return function(){e._.bd()}}function IV(e){return function(t){e._.z?.(t)}}function LV(e){return function(t){e._.y?.(t)}}function RV(e){return function(){$(e._,`term`)}}function zV(e){return function(){$(e._,`term`)}}function BV(e){return function(t){$z(e._,t),$(e._,`term`)}}function VV(e){return t=>{FB(e._,t)}}function HV(e){return function(t,n){e.br(t.id,n)}}function UV(e){return async(t,n)=>{n=n.trim(),n&&(Xz(e,(e.a0||[]).map(e=>e.id===t?{...e,title:n}:e)),await fetch(`/api/sessions/${t}`,{method:`PATCH`,headers:{"content-type":`application/json`},body:JSON.stringify({title:n})}))}}function WV(e){return t=>(t&&(e.bj=!0),(e.bl??=ct(e.bm))())}function GV(e){return async()=>{let t=e.bj;e.bj=!1;try{let n=`/api/workspaces/${e.an}/sessions`,r=await M(n);!r.length&&t&&e.ar===`active`&&(r=await M(n)),!r.length&&t&&e.ar===`active`&&(await e.bg(e.r||`claude`,!1),r=await M(n).catch(()=>e.a0||[])),Xz(e,r);let i=de(e.an);i&&r.some(e=>e.id===i)&&$z(e,i),e.a0.some(t=>t.id===e.a1)||$z(e,e.a0?.[0]?.id||null)}catch(t){if(Xz(e,e.a0||[]),Ve(t))return;HB(e,String(t.message||t))}}}function KV(e){return function(t,n){e.bd(),e.bs(t,n)}}function qV(e){return async(t,n)=>{if(t===e.an){let r=await e.bg(n,!0);r&&ue(t,r.id);return}try{let r=await M(`/api/workspaces/${t}/sessions`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({agent:n})});ue(t,r.id),e.s?.(t)}catch(t){HB(e,String(t.message||t))}}}function JV(e){return async(t,n)=>{UB(e,!0);try{let r=await M(`/api/workspaces/${e.an}/sessions`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({agent:t})});if(n){let t=e.a0||[];Xz(e,t.some(e=>e.id===r.id)?t:t.concat(r)),$z(e,r.id)}return r}catch(t){return HB(e,String(t.message||t)),null}finally{UB(e,!1)}}}function YV(e){return async t=>{try{await M(`/api/sessions/${t}`,{method:`DELETE`}),Xz(e,(e.a0||[]).filter(e=>e.id!==t)),e.a1===t&&$z(e,e.a0?.[0]?.id||null)}catch(t){HB(e,`Kill session failed: ${String(t.message||t)}`)}}}function XV(e){return()=>{$(e,e.a3===`nav`?`term`:`nav`)}}function ZV(e){return function(t){e.bd(),e.s?.(t)}}function QV(e){return function(t){e.bd(),e.au(t)}}function $V(e){return()=>{e.a3===`new`&&$(e,`term`)}}function eH(e){return()=>{e.a3===`usage`?$(e,`term`):e.az()}}function tH(e){return()=>{e.a3===`manage`?$(e,`term`):e.aw()}}function nH(e){return()=>{e.a3===`diff`?$(e,`term`):e.au()}}function rH(e){return t=>{RB(e,t||``),t&&zB(e,e.ai+1),e.a8(),yB(e,!0),$(e,`diff`)}}function iH(e){return()=>{e.a6||Be(()=>import(`./_DJAJCWgm.js`).then(t=>{TB(e,t.default)}),__vite__mapDeps([0,1,2,3]))}}function aH(e){return()=>{if(e.ac){FB(e,!1);return}FB(e,!0),IB(e,e.ae+1),e.af.focus()}}function oH(){}function sH(e){return()=>{DB(e,!0),$(e,`manage`)}}function cH(e){return()=>{kB(e,!0),$(e,`usage`)}}function lH(e){return function(t){e.bq(t)}}function uH(e){return function(){e.bd(),e.b1()}}function dH(e){return function(){e.a3===`new`?e.bd():e.x?.()}}function fH(e){return function(t,n){e.bd(),e.v?.(t,n)}}function pH(e){return function(t){HB(e,t)}}function mH(e){return t=>{$(e,t)}}function hH(e){return function(t){$z(e,t)}}function gH(e){return function(t){e.bd(),!t||t===e.an?e.b3():e.w?.(t)}}S(`y32`,wV),S(`y45`,TV),S(`y44`,EV),S(`y43`,DV),S(`y42`,OV),S(`y39`,kV),S(`y38`,AV),S(`y46`,jV),S(`y40`,MV),S(`y41`,NV),S(`y37`,PV),S(`y35`,FV),S(`y36`,IV),S(`y33`,LV),S(`y34`,RV),S(`y3`,zV),S(`y2`,BV),S(`y1`,VV),S(`y30`,HV),S(`y18`,UV),S(`y16`,WV),S(`y15`,GV),S(`y28`,KV),S(`y19`,qV),S(`y14`,JV),S(`y17`,YV),S(`y9`,XV),S(`y23`,ZV),S(`y31`,QV),S(`y13`,$V),S(`y8`,eH),S(`y10`,tH),S(`y11`,nH),S(`y5`,rH),S(`y4`,iH),S(`y12`,aH),S(`y0`,oH),S(`y6`,sH),S(`y7`,cH),S(`y29`,lH),S(`y27`,uH),S(`y26`,dH),S(`y24`,fH),S(`y22`,pH),S(`y21`,mH),S(`y20`,hH),S(`y25`,gH);var _H=F(47,e=>E(e.a,e._._.a0),e=>e._._),vH=me(`n23`,` `,` `,_H),yH=e=>{w(e.a),ne(e.a,vH(e)),te(e.a,RU(e)),s(e.a),t(e.a),Ee(e.a),ee(e.a),h(e.a),De(e.a,{})},bH=x(4,e=>SV(e.b,zU(e))),xH=x(5,e=>CV(e.b,BU(e))),SH=F(41,e=>{gV(e.b,e._._.o),bH(e),xH(e)},e=>e._._),CH=e=>{SH(e),wH(e),TH(e),kH(e),AH(e),jH(e),MH(e),NH._(e),PH._(e),JB(e.b),yV(e.b,UU(e)),xV(e.b,HU(e)),uV(e.b,VU(e))},wH=F(42,e=>iV(e.b,e._._.p),e=>e._._),TH=F(43,e=>{mV(e.b,e._._.q?e._._.q?.preferredAgent:`claude`),vV(e.b,e._._.q?e._._.q?.agents:[`claude`])},e=>e._._),EH=b(3,0,2),DH=x(6,e=>{cV(e.b,e._.f===e._._.s),EH(e,e._.f===e._._.s)}),OH=x(7,e=>lV(e.b,e._._.x&&e._.f===e._._.s),2),kH=F(44,e=>{DH(e),OH(e)},e=>e._._),AH=F(45,OH,e=>e._._),jH=F(48,bH,e=>e._._),MH=F(49,e=>{hV(e.b,WU(e)),xH(e)},e=>e._._),NH=c(0,0,e=>nV(e.b,e._.e)),PH=c(0,0,e=>{bV(e.b,GU(e)),DH(e),OH(e)}),FH=u(0,(e=>`<!><!>${e}<!><!><!>`)(fR),(e=>`b%b/${e}&%b%c`)(pR),CH),IH=N(4,e=>{BH(e,e.e?.id),FH(e,+!e.e),NH(e)}),LH=x(3,e=>IH(e,e._.o.find(t=>t.id===e.c))),RH=ge(4,LH),zH=RH,BH=N(5,PH),VH=N(2,LH),HH=(e,t)=>VH(e,t[0]),UH=x(1,e=>Ls(e.a,KU(e))),WH=x(2,e=>Is(e.a,qU(e)),2),GH=c(3,0,e=>{Ns(e.a,e._.o),UH(e),WH(e)}),KH=e=>{GH._(e),qH._(e),JH._(e),Ts(e.a),zs(e.a,JU(e))},qH=c(3,0,WH),JH=c(3,0,e=>{UH(e),WH(e)}),YH=c(2,0,e=>ui(e.a,e._.o)),XH=e=>{YH._(e),ZH._(e),QH._(e),$H._(e),tU._(e),nU._(e),rU._(e),ai(e.a),$r(e.a,ZU(e)),bi(e.a,XU(e)),Mr(e.a,YU(e)),Gr(e.a),Kr(e.a)},ZH=c(2,0,e=>ki(e.a,e._.p)),QH=c(2,0,e=>Qr(e.a,e._.q)),$H=c(2,0,e=>pi(e.a,e._.s)),eU=x(1,e=>Ei(e.a,!e._.z&&e._.ad)),tU=c(2,0,e=>{jr(e.a,e._.z),eU(e)}),nU=c(2,0,e=>{xi(e.a,tW(e)),mi(e.a,eW(e)),gi(e.a,$U(e)),hi(e.a,QU(e))}),rU=c(2,0,eU),iU=g(`n25`,e=>n(e,{onMount:function(){let t=new AbortController,n=t.signal,r={abort:t,statusStale:!1,statusDebounce:void 0};ce(e.m),pt(n);let i=(t,n)=>{n&&(it(t,n),ue(t,n)),e.a9(t)},a=new URLSearchParams(location.search);a.get(`ws`)&&(i(a.get(`ws`),a.get(`session`)),history.replaceState(null,``,`/`)),ie()&&document.addEventListener(`click`,e=>{let t=e.target?.closest?.(`a[target="_blank"][href^="http"]`);t&&(e.preventDefault(),se(t.href))},{capture:!0,signal:n}),navigator.serviceWorker?.addEventListener(`message`,e=>{e.data?.type===`open-session`&&i(e.data.workspaceId,e.data.sessionId)},{signal:n});let o=()=>{if(document.hidden){r.statusStale=!0;return}r.statusStale=!1,e.a8()};document.addEventListener(`visibilitychange`,()=>{document.hidden||(r.statusStale=!1,e.a8(!0))},{signal:n}),o(),T().addEventListener(`workspaces.changed`,t=>{let n=t.data;Array.isArray(n)?e.a1(n):e.a2(),o()},{signal:n}),T().addEventListener(`sessions.changed`,t=>{let n=t.data;if(n?.workspaceId&&Array.isArray(n.sessions)){e.a3(n.workspaceId,n.sessions),r.statusStale=!1;return}clearTimeout(r.statusDebounce),r.statusDebounce=setTimeout(o,300)},{signal:n}),T().addEventListener(`status.changed`,t=>{t.data&&(yU(e,t.data),r.statusStale=!1)},{signal:n});let s=window.visualViewport;if(s){let e=()=>{let e=Math.abs(s.height-window.innerHeight)<1;document.documentElement.style.setProperty(`--app-height`,e?``:`${Math.round(s.height)}px`),e||window.scrollTo(0,0)};s.addEventListener(`resize`,e,{signal:n}),s.addEventListener(`scroll`,e,{signal:n}),document.addEventListener(`visibilitychange`,()=>{document.hidden||e()},{signal:n}),window.addEventListener(`pageshow`,e,{signal:n}),window.addEventListener(`focus`,e,{signal:n})}return r},onDestroy:function(){this.abort.abort(),clearTimeout(this.statusDebounce)}})),aU=x(36,iU,5),oU=L(MH),sU=N(35,e=>{aU(e),nU(e),JH(e),oU(e)}),cU=x(21,e=>sU(e,nW(e))),lU=u(2,(e=>`<!>${e}`)(Xt),(e=>`b/${e}&`)(Zt),XH),uU=x(40,e=>lU(e,e.z||e.ad?0:1)),dU=N(39,e=>{uU(e),rU(e)}),fU=x(38,e=>dU(e,!e.x&&!e.ab)),pU=N(37,fU),mU=x(19,e=>pU(e,e.o.find(t=>t.id===e.s))),hU=L(SH),gU=C(14,e=>{cU(e),mU(e),YH(e),GH(e),RH(e),hU(e)}),_U=N(29,aU),vU=L(wH),yU=C(15,e=>{_U(e,rW(e)),ZH(e),vU(e)}),bU=L(TH),xU=C(16,e=>{QH(e),bU(e)}),SU=R(4,`<!><!><!>`,`b%`,zH,HH),CU=N(28,aU),wU=L(jH),TU=N(27,e=>{CU(e,iW(e)),aU(e),qH(e),wU(e)}),EU=x(22,e=>TU(e,aW(e))),DU=C(20,e=>{SU(e,[e.u,e=>e]),EU(e),cU(e)}),OU=u(3,ao,(e=>`/${e}&`)(oo),KH),kU=x(24,e=>OU(e,e.x&&!e.s?0:1)),AU=L(kH),jU=C(18,e=>{DU(e,e.s?[e.s]:[]),EU(e),mU(e),kU(e),$H(e),AU(e)}),MU=L(AH),NU=C(23,e=>{fU(e),kU(e),MU(e)}),PU=C(25,e=>{uU(e),tU(e)}),FU=u(1,d,(e=>`/${e}&`)(y),yH),IU=L(_H),LU=C(26,e=>{FU(e,+!e.a0),IU(e)});g(`n24`,e=>P(e.a,`keydown`,function(t){if((t.metaKey||t.ctrlKey)&&t.key===`k`&&(t.preventDefault(),PU(e,!e.z)),(t.metaKey||t.ctrlKey)&&!t.shiftKey&&!t.altKey&&t.key>=`1`&&t.key<=`9`){let n=e.o.filter(e=>e.status===`active`)[Number(t.key)-1];n&&(t.preventDefault(),e.a9(n.id))}}));function RU(e){return function(){LU(e._,null)}}function zU(e){return function(t){e._._.a1(e._._.o.map(e=>e.id===t.id?t:e))}}function BU(e){return function(t){e._._.o.some(e=>e.id===t.id)||gU(e._._,[t,...e._._.o]),NU(e._._,!1),e._._.a9(t.id)}}function VU(e){return function(){NU(e._._,!1)}}function HU(e){return function(){NU(e._._,!0)}}function UU(e){return function(t,n){it(t,n),ue(t,n),e._._.a9(t)}}function WU(e){return function(t){e._._.a9(t)}}function GU(e){return function(t){let n=t||e._.f;ot(n),e._._.a9(n)}}function KU(e){return function(t){e._.o.some(e=>e.id===t.id)||gU(e._,[t,...e._.o]),NU(e._,!1),e._.a9(t.id)}}function qU(e){return function(t){e._.a1(e._.o.map(e=>e.id===t.id?t:e)),NU(e._,!1),e._.a9(t.id)}}function JU(e){return function(){NU(e._,!1)}}function YU(e){return t=>{PU(e._,t)}}function XU(e){return function(){NU(e._,!0),PU(e._,!1)}}function ZU(e){return function(t){xU(e._,t)}}function QU(e){return function(t){NU(e._,!1),PU(e._,!1),ot(t.id),e._.a9(t.id)}}function $U(e){return function(t,n){PU(e._,!1),M(`/api/workspaces/${t.id}/sessions`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({agent:n})}).then(n=>{it(t.id,n.id),e._.a9(t.id)}).catch(t=>{LU(e._,`New session failed: ${String(t.message||t)}`)})}}function eW(e){return function(t){nt(t.id),e._.a9(t.id)}}function tW(e){return function(t){e._.a9(t.id)}}function nW(e){return async t=>{e.o.find(e=>e.id===t)?.status===`archived`&&(await M(`/api/workspaces/${t}`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({action:`restore`})}).catch(()=>{}),gU(e,e.o.map(e=>e.id===t?{...e,status:`active`}:e))),jU(e,t),NU(e,!1),PU(e,!1),e.u.includes(t)||DU(e,e.u.concat(t)),Ie(t)}}function rW(e){return(t,n)=>{let r=e.p[t];if(!r)return;let i=n.map(e=>e.state).filter(e=>!!e?.alive);yU(e,{...e.p,[t]:{...r,sessions:n.map(e=>({id:e.id,agent:e.agent,title:e.title,state:e.state||{alive:!1}})),agents:i.length,working:i.filter(e=>e.phase===`working`).length,waiting:i.filter(e=>e.phase===`waiting`).length}})}}function iW(e){return async()=>{try{e.a1(await M(`/api/workspaces`))}catch(t){if(Ve(t))return;LU(e,`Loading workspaces failed: ${t.message||String(t)}`)}}}function aW(e){return t=>{gU(e,t);let n=new Set(t.filter(e=>e.status===`active`).map(e=>e.id));DU(e,e.u.filter(e=>n.has(e))),e.s&&!n.has(e.s)&&(jU(e,e.u[e.u?.length-1]||null),Ie(e.s))}}function oW(e){return(t=!1)=>(e.a5||=t,(e.a6??=ct(async()=>{let t=e.a5;e.a5=!1;try{yU(e,await M(`/api/status${t?`?fresh`:``}`))}catch(e){if(!Ve(e))throw e}}))())}S(`n5`,RU),S(`n19`,zU),S(`n22`,BU),S(`n21`,VU),S(`n20`,HU),S(`n17`,UU),S(`n16`,WU),S(`n18`,GU),S(`n14`,KU),S(`n15`,qU),S(`n13`,JU),S(`n12`,YU),S(`n11`,XU),S(`n6`,ZU),S(`n10`,QU),S(`n9`,$U),S(`n8`,eW),S(`n7`,tW),S(`n4`,nW),S(`n2`,rW),S(`n1`,iW),S(`n0`,aW),S(`n3`,oW);var sW=(e,t,n)=>{for(;n;){if(n.O?.i)return(n.J||=[]).push(e,t);n=n.N}};Le(e=>(t,n=v.has(t))=>{if(n||oe.has(t)){let e=0,r,i,a;for(;e<t.length;)r=t[e++],i=t[e++],(a=i.F)?.H!==0&&!(n&&sW(r,i,a))&&r(i)}else e(t)},e=>t=>{try{let n=t.b.F;for(;n;){if(n.W)return t.f=1,n.W.push(t);n=n.N}t.f=0,e(t)}catch(e){fe(t.b,e)}});var cW=e=>I(e.a,`_b`),lW=(e,t)=>E(e.b,t instanceof Error?t.message:String(t));me(`b1`,`<div><p> </p></div>`,` E `,cW,(e,t)=>lW(e,t[0])),me(`b0`,`<div><span></span>Loading workspaces…</div>`,` D `,e=>{I(e.a,`_b`),I(e.b,`_w`)}),p();
|
|
86
|
+
`)},h=e=>{i=e;let t=p(e.row);o=t.trim()?{text:t,col:e.col,row:e.row}:null,g(e)},g=t=>{let n=e.buffer.active.viewportY;(t.row<n||t.row>=n+e.rows)&&e.scrollToLine(Math.max(0,t.row-Math.floor(e.rows/2))),e.select(t.col,t.row,t.len),c=t},_=t=>{let n=lM(e,r);if(!n.length)return i=null,d(),t<0?`up`:t>0?`down`:null;let a=i,s=a?n.findIndex(e=>e.row===a.row&&e.col===a.col&&(!o||p(e.row)===o.text)):-1;if(t===0)s=n.length-1;else if(s<0)s=t>0?0:n.length-1;else if(t>0){if(s>=n.length-1)return`down`;s+=1}else{if(s<=0)return`up`;--s}return h(n[s]),null},v=(e,t)=>{let n=l(),r=n.getBoundingClientRect(),i=e;for(let e=0;e<t;e++)n.dispatchEvent(new WheelEvent(`wheel`,{deltaY:i,deltaMode:WheelEvent.DOM_DELTA_LINE,bubbles:!0,cancelable:!0,clientX:r.left+r.width/2,clientY:r.top+r.height/2}))},y=()=>{if(!o)return-1;let t=e.buffer.active.viewportY,n=-1;for(let r=0;r<e.rows;r++){let e=t+r;p(e)===o.text&&(n<0||Math.abs(e-o.row)<Math.abs(n-o.row))&&(n=e)}return n},b=()=>{if(!o)return!1;let t=y();if(t<0)return!1;let n=lM(e,r).find(e=>e.row===t&&e.col===o?.col);return n?(i=n,g(n),!0):!1},ee=t=>{let n=lM(e,r);if(!n.length)return!1;let i=y(),a=i<0?n:n.filter(e=>t<0?e.row<i||e.row===i&&e.col<o.col:e.row>i||e.row===i&&e.col>o.col);return a.length?(h(t<0?a[a.length-1]:a[0]),!0):!1},x=()=>{a?.cancel(),a=null},te=(t,n)=>{let r=0,i=0,o=()=>{x(),n()},s=e.onWriteParsed(()=>{m()!==t&&(i||=setTimeout(o,fM),r&&clearTimeout(r),r=setTimeout(o,uM))}),c=setTimeout(o,dM);a={cancel(){s.dispose(),r&&clearTimeout(r),i&&clearTimeout(i),clearTimeout(c)}}},S=(e,t,n,i)=>{if(r!==i){s=!1;return}if(t<=0){s=!1,b(),f();return}let a=m(),o=Math.min(n,t);v(e===1?-1:1,o),te(a,()=>{if(r!==i){s=!1;return}if(m()===a){s=!1,b(),f();return}S(e,t-o,n,i)})},ne=(t,n,i,a)=>{if(n){S(t,n,i,a);return}if(!b()){let n=lM(e,r);n.length&&h(t<0?n[0]:n[n.length-1])}s=!1,f()},C=(t,n,i,a=0)=>{if(r!==i){s=!1;return}let o=Math.max(1,Math.floor(e.rows/pM));if(n<=0){ne(t,a,o,i);return}s=!0;let c=m();v(t,o),te(c,()=>{try{if(r!==i){s=!1;return}if(m()===c){ne(t,a,o,i);return}if(ee(t)){s=!1,f();return}f(),C(t,n-1,i,a+o)}catch(e){throw s=!1,e}})};return{search(e,t){if(s&&t!==0&&e===r)return;s=!1,x(),e!==r&&(i=null,o=null),r=e;let n=_(t);n&&t!==0&&(i=null,d()),f(),!(!n||t===0)&&C(n===`up`?-1:1,mM,e)},refresh(){f()},clear(){x(),r=``,i=null,o=null,s=!1,d(),f()},dispose(){x(),d(),n.remove()}}}var gM=2,_M=[`#2e3436`,`#cc0000`,`#4e9a06`,`#c4a000`,`#3465a4`,`#75507b`,`#06989a`,`#d3d7cf`,`#555753`,`#ef2929`,`#8ae234`,`#fce94f`,`#729fcf`,`#ad7fa8`,`#34e2e2`,`#eeeeec`];function vM(e){return e?.background||`#000000`}function yM(e,t){if(t<0||t>255)return vM(e);let n=[e?.black,e?.red,e?.green,e?.yellow,e?.blue,e?.magenta,e?.cyan,e?.white,e?.brightBlack,e?.brightRed,e?.brightGreen,e?.brightYellow,e?.brightBlue,e?.brightMagenta,e?.brightCyan,e?.brightWhite][t];if(n)return n;if(t<16)return _M[t];if(t<232){let e=t-16,n=Math.floor(e/36),r=Math.floor(e%36/6),i=e%6,a=e=>e===0?0:55+e*40;return`rgb(${a(n)},${a(r)},${a(i)})`}let r=8+(t-232)*10;return`rgb(${r},${r},${r})`}function bM(e,t){let n=e.options.theme;if(t.isBgDefault())return vM(n);if(t.isBgRGB()){let e=t.getBgColor();return`rgb(${e>>16&255},${e>>8&255},${e&255})`}return t.isBgPalette()?yM(n,t.getBgColor()):vM(n)}function xM(e){let t=e.buffer.active,n=t.getNullCell(),r=t.viewportY,i=Math.min(t.length-1,r+Math.max(0,e.rows-1)),a=Math.max(0,e.cols-1),o=[[0,r],[a,r],[0,i],[a,i],[Math.floor(a/2),r+Math.floor((i-r)/2)]],s=new Map;for(let[r,i]of o){if(!t.getLine(i)?.getCell(r,n))continue;let a=bM(e,n);s.set(a,(s.get(a)||0)+1)}let c=vM(e.options.theme),l=0;for(let[e,t]of s)t>l&&(c=e,l=t);return c}function SM(e){let t=e._core?._renderService?.dimensions?.css?.cell;return!t?.width||!t?.height?null:{w:t.width,h:t.height}}function CM(e){try{let t=e._core;if(!t)return;let n=t._viewport||t.viewport;return n?n._scrollableElement||n.scrollableElement:void 0}catch{return}}function wM(e){try{let t=e.options.overviewRuler;(!t||t.width!==0)&&(e.options.overviewRuler={...t||{},width:0}),CM(e)?.updateOptions?.({vertical:gM,verticalScrollbarSize:0})}catch{}}function TM(e,t,n){return e.style.getPropertyValue(t)===n&&e.style.getPropertyPriority(t)===`important`?!1:(e.style.setProperty(t,n,`important`),!0)}function EM(e){TM(e,`display`,`none`),TM(e,`width`,`0px`),TM(e,`min-width`,`0px`),TM(e,`max-width`,`0px`),TM(e,`height`,`0px`),TM(e,`opacity`,`0`),TM(e,`pointer-events`,`none`),TM(e,`visibility`,`hidden`)}function DM(e){return e instanceof HTMLElement?e.classList.contains(`scrollbar`)||e.classList.contains(`slider`)||e.classList.contains(`shadow`):!1}function OM(e){let t=e.element;if(!t)return{dispose(){}};let n=!1,r=new Set,i=new MutationObserver(()=>{if(!n){n=!0;try{for(let e of r)e.isConnected&&EM(e)}finally{n=!1}}}),a=e=>{if(!r.has(e)){r.add(e),n=!0;try{EM(e)}finally{n=!1}i.observe(e,{attributes:!0,attributeFilter:[`style`,`class`]})}};(()=>{wM(e);let r=t.querySelector(`.xterm-viewport`);if(r){n=!0;try{TM(r,`overflow`,`hidden`),TM(r,`overflow-y`,`hidden`),TM(r,`overflow-x`,`hidden`)}finally{n=!1}}for(let e of t.querySelectorAll(`.scrollbar, .scrollbar .slider, .xterm-scrollable-element > .shadow`))a(e)})();let o=new MutationObserver(t=>{let n=!1;for(let e of t)for(let t of e.addedNodes)if(DM(t))n=!0,a(t);else if(t instanceof HTMLElement)for(let e of t.querySelectorAll(`.scrollbar, .slider, .shadow`))n=!0,a(e);n&&wM(e)});return o.observe(t,{childList:!0,subtree:!0}),{dispose(){i.disconnect(),o.disconnect(),r.clear()}}}function kM(e,t){wM(e);let n=e.element?.parentElement,r=SM(e);if(!n||!r||!e.element){t.fit();return}let i=getComputedStyle(n),a=getComputedStyle(e.element),o=(parseFloat(a.paddingLeft)||0)+(parseFloat(a.paddingRight)||0),s=(parseFloat(a.paddingTop)||0)+(parseFloat(a.paddingBottom)||0),c=Math.max(0,parseFloat(i.width)||n.clientWidth)-o,l=Math.max(0,parseFloat(i.height)||n.clientHeight)-s;if(c<r.w*2||l<r.h)return;let u=Math.max(2,Math.floor(c/r.w)),d=Math.max(1,Math.floor(l/r.h));if(e.cols!==u||e.rows!==d){try{e._core?._renderService?.clear?.()}catch{}e.resize(u,d)}}function AM(e,t){let n=e.element;if(!n)return;let r=xM(e);if(n.dataset.shellBg===r&&(!t||t.dataset.shellBg===r))return;n.dataset.shellBg=r,n.style.backgroundColor=r,t&&(t.dataset.shellBg=r,t.style.backgroundColor=r);let i=n.querySelector(`.xterm-viewport`);i&&(i.style.backgroundColor=r);let a=n.querySelector(`.xterm-scrollable-element`);a&&(a.style.backgroundColor=r)}function jM(e,t){let n=0,r=()=>{n||=requestAnimationFrame(()=>{n=0,AM(e,t())})};AM(e,t());let i=e.onWriteParsed(r);return{dispose(){cancelAnimationFrame(n),i.dispose()}}}var MM=`_do _y`,NM=`_dS _y`,PM=`_dV _dU`,FM=`_dW _dU`,IM=`_dZ _dU`,LM=`<div><div><input type=search enterkeyhint=search autocomplete=off placeholder="Find in terminal" aria-label="Find in terminal"><button type=button title="Previous match">↑</button><button type=button title="Next match">↓</button><button type=button title="Close find">×</button></div></div>`,RM=` D D b b b m`,zM=(e,t)=>{A(e.d,`disabled`,!t),A(e.e,`disabled`,!t)},BM=x(34,e=>zM(e,e.a7&&e.q)),VM=g(`u6`,e=>{e.u=!!e.q,e.w=e.s,e.n&&(e.n.focus=e.a4)}),HM=x(31,VM,5),UM=g(`u5`,e=>n(e,{onMount:function(){let t=new AbortController;return document.addEventListener(`keydown`,t=>{if(!e.u)return;if(t.key===`Escape`){if(document.querySelector(`dialog[open]`))return;t.preventDefault(),t.stopPropagation(),e.a3();return}let n=t.metaKey||t.ctrlKey;if(t.key===`F3`||n&&t.key.toLowerCase()===`g`){t.preventDefault(),t.stopPropagation(),e.a1(t.shiftKey?-1:1);return}if(!(n||t.altKey)){if(t.key===`Enter`){if(document.activeElement!==e.c)return;t.preventDefault(),t.stopPropagation(),e.a1(t.shiftKey?-1:1);return}if(t.key===`ArrowDown`){if(!e.w.trim())return;t.preventDefault(),t.stopPropagation(),e.a1(1);return}if(t.key===`ArrowUp`){if(!e.w.trim())return;t.preventDefault(),t.stopPropagation(),e.a1(-1)}}},{capture:!0,signal:t.signal}),e.z=e.o,e.a0=!!e.q,e.q&&e.a4(),{abort:t}},onUpdate:function(){e.o!==e.z&&(e.z=e.o,e.q&&(e.a4(),e.c?.select())),e.q&&!e.a0?(e.a0=!0,e.a4()):e.q||(e.a0=!1)},onDestroy:function(){if(this.abort.abort(),e.u){let t=e.m;t&&t()}}})),WM=x(32,UM,9),GM=x(37,e=>I(e.a,[`_fb`,e.aa?`_fd`:`_fc`,!e.q&&`_ff`])),KM=x(28,e=>ve(e,`c`,e.s,vN(e)),3),qM=Oe(16,e=>{A(e.a,`aria-hidden`,e.q?`false`:`true`),A(e.c,`tabindex`,e.q?0:-1),A(e.d,`tabindex`,e.q?0:-1),A(e.e,`tabindex`,e.q?0:-1),A(e.f,`tabindex`,e.q?0:-1),BM(e),HM(e),WM(e),GM(e),KM(e)}),JM=x(10,e=>qM(e,e.i,e.j)),YM=N(8,JM),XM=N(9,JM),ZM=N(33,BM),QM=C(18,e=>{ZM(e,!!e.s.trim()),HM(e),KM(e)}),$M=(e,t)=>{cN(e,t.open),lN(e,t.query)},eN=(e,t)=>{uN(e,t.tick),dN(e,t.wasOpen)},tN=N(30,e=>{HM(e),WM(e)}),nN=g(`u4`,e=>{Ae(e,`c`),P(e.c,`keydown`,function(t){if(e.q){if(t.key===`Escape`){t.preventDefault(),t.stopPropagation(),e.a3();return}t.stopPropagation()}}),P(e.d,`mousedown`,function(e){e.preventDefault()}),P(e.d,`click`,function(){e.a1(-1)}),P(e.e,`mousedown`,function(e){e.preventDefault()}),P(e.e,`click`,function(){e.a1(1)}),P(e.f,`mousedown`,function(e){e.preventDefault()}),P(e.f,`click`,function(){e.a3()})});function rN(e){QM(e,``),$M(e,{open:!1,query:``}),eN(e,{tick:0,wasOpen:!1}),tN(e,yN(e)),nN(e)}var iN=N(27,e=>{WM(e),KM(e)}),aN=x(23,e=>iN(e,bN(e)),2),oN=N(29,WM),sN=x(21,e=>oN(e,xN(e))),cN=N(20,e=>{aN(e),sN(e),HM(e),WM(e)}),lN=N(22,e=>{aN(e),HM(e),WM(e),KM(e)}),uN=N(25,WM),dN=N(26,WM),fN=N(11,aN),pN=N(12,e=>{sN(e),WM(e)}),mN=N(13,HM),hN=N(14,WM),gN=N(36,e=>{I(e.b,[`_e7`,e.aa?`_fe`:`_e9`]),I(e.c,[_e,e.aa&&`_fg`]),I(e.d,[ze,e.aa&&`_fh`]),I(e.e,[ze,e.aa&&`_fh`]),I(e.f,[ze,e.aa&&`_fh`]),GM(e)}),_N=(e,t)=>gN(e,t===`keybar`);function vN(e){return function(t){e.q&&(QM(e,t),e.w=t,e.a1(0))}}function yN(e){return()=>{let t=e.c;t&&(t.focus(),document.activeElement!==t&&setTimeout(()=>t.focus(),0))}}function bN(e){return t=>{if(!e.u)return;let n=e.l;n&&n(e.w,t)}}function xN(e){return()=>{qM(e,!1),e.u=!1;let t=e.m;t&&t()}}S(`u0`,vN),S(`u3`,yN),S(`u1`,bN),S(`u2`,xN);var SN=a,CN=(e=>`/${e}&`)(Ke);function wN(e){Je(e.a,`M8 6L20 6 M4 6.01L4.01 5.99889 M4 12.01L4.01 11.9989 M4 18.01L4.01 17.9989 M8 12L20 12 M8 18L20 18`)}var TN=(e,t)=>ae(e.a,t),EN=(e,t)=>j(e.a,t),DN=a,ON=(e=>`/${e}&`)(Ke);function kN(e){Je(e.a,`M15 4L8 20`)}var AN=(e,t)=>ae(e.a,t),jN=(e,t)=>j(e.a,t),MN=a,NN=(e=>`/${e}&`)(Ke);function PN(e){Je(e.a,`M7 12L17 12 M7 8L13 8 M3 20.2895V5C3 3.89543 3.89543 3 5 3H19C20.1046 3 21 3.89543 21 5V15C21 16.1046 20.1046 17 19 17H7.96125C7.35368 17 6.77906 17.2762 6.39951 17.7506L4.06852 20.6643C3.71421 21.1072 3 20.8567 3 20.2895Z`)}var FN=(e,t)=>ae(e.a,t),IN=(e,t)=>j(e.a,t),LN=a,RN=(e=>`/${e}&`)(Ke);function zN(e){Je(e.a,`M8.5 4H6C4.89543 4 4 4.89543 4 6V20C4 21.1046 4.89543 22 6 22H18C19.1046 22 20 21.1046 20 20V6C20 4.89543 19.1046 4 18 4H15.5 M8 6.4V4.5C8 4.22386 8.22386 4 8.5 4C8.77614 4 9.00422 3.77604 9.05152 3.50398C9.19968 2.65171 9.77399 1 12 1C14.226 1 14.8003 2.65171 14.9485 3.50398C14.9958 3.77604 15.2239 4 15.5 4C15.7761 4 16 4.22386 16 4.5V6.4C16 6.73137 15.7314 7 15.4 7H8.6C8.26863 7 8 6.73137 8 6.4Z`)}var BN=(e,t)=>ae(e.a,t),VN=(e,t)=>j(e.a,t),HN=`<div><div></div><!><!><!><!><!></div><!><!>`,UN=` D b%b%b%b%b%l%c`,WN=400,GN=55,KN=3e4,qN=150,JN=[[{kind:`paste`},{kind:`key`,label:`▲`,seq:`\x1B[A`},{kind:`key`,label:`⇥`,seq:` `}],[{kind:`key`,label:`◀`,seq:`\x1B[D`},{kind:`key`,label:`↵`,seq:`\r`},{kind:`key`,label:`▶`,seq:`\x1B[C`}],[{kind:`esc`},{kind:`key`,label:`▼`,seq:`\x1B[B`},{kind:`key`,label:`^C`,seq:``}]],YN=g(`v26`,e=>P(e.a,`click`,function(){TF(e._._._,e._._.d),DF(e._._._,e._._.h||e._._.i)})),XN=e=>{I(e.a,[`_dL`,`_dM`]),fc(e.b),pc(e.b,12),mc(e.b),YN(e)},ZN=F(6,e=>ve(e,`c`,e._._.c,KL(e)),e=>e._._),QN=g(`v25`,e=>{Ae(e,`c`),P(e.c,`keydown`,function(t){t.key===`Enter`?(t.preventDefault(),e._._.e(e._.d)):t.key===`Escape`&&(t.preventDefault(),TF(e._._,null))}),P(e.c,`blur`,function(){e._._.e(e._.d)}),n(e,{onMount:function(){queueMicrotask(()=>{let t=e.c;t?.focus(),t?.select()})}})}),$N=e=>{ZN(e),eP._(e),tP._(e),e.b,Gt(e.b,14),Yt(e.b),I(e.c,`_dJ`),QN(e)},eP=c(0,0,e=>Jt(e.b,yt(e._.c))),tP=c(0,0,e=>I(e.a,[`_q`,Ne[_t(e._.g)]])),nP=e=>I(e.a,`_dt`),rP=e=>I(e.a,`_du`),iP=g(`v32`,e=>{P(e.a,`pointerdown`,function(e){e.preventDefault()}),P(e.a,`click`,function(){e._._._._.be()})}),aP=e=>{I(e.a,PM),zN(e.b),BN(e.b,16),VN(e.b),iP(e)},oP=c(0,2,e=>{I(e.a,[FM,{_dY:e._.e===`↵`,_dX:e._.e===`↵`||e._.e===`⇥`}]),E(e.b,e._.e)}),sP=g(`v35`,e=>{P(e.a,`pointerdown`,function(t){t.preventDefault(),e._._._._.b8(e._.f)}),P(e.a,`pointerup`,function(){e._._._._.b9()}),P(e.a,`pointercancel`,function(){e._._._._.b9()}),P(e.a,`pointerleave`,function(){e._._._._.b9()}),P(e.a,`contextmenu`,function(e){e.preventDefault()})}),cP=e=>{oP._(e),sP(e)},lP=g(`v33`,e=>P(e.a,`click`,function(){e._._._._.af?.send(`\x1B`)})),uP=F(92,lP,e=>e._._._._),dP=g(`v34`,e=>P(e.a,`pointerdown`,function(e){e.preventDefault()})),fP=u(0,(e=>`<button title=Paste>${e}</button>`)(LN),(e=>` D/${e}&l`)(RN),aP,`<button title=Escape>esc</button>`,` `,e=>{uP(e),I(e.a,IM),dP(e)},`<button> </button>`,` D `,cP),pP=(e,t)=>fP(e,t===`paste`?0:t===`esc`?1:2),mP=(e,t)=>{pP(e,t[0]?.kind),hP(e,t[0]?.label),gP(e,t[0]?.seq)},hP=N(4),gP=N(5),_P=R(0,`<!><!><!>`,`b%`,0,mP),vP=(e,t)=>_P(e,[t]),yP=(e,t)=>vP(e,t[0]),bP=F(89,e=>YM(e.a,e._._.aa),e=>e._._),xP=e=>{bP(e),SP(e),CP(e),TP(e),EP(e),DP(e),OP(e),rN(e.a),_N(e.a,`keybar`)},SP=F(90,e=>XM(e.a,e._._.ac),e=>e._._),CP=F(91,e=>hN(e.a,e._._.ad),e=>e._._),wP=x(1,e=>pN(e.a,qL(e))),TP=F(92,wP,e=>e._._),EP=F(93,e=>mN(e.a,e._._.am),e=>e._._),DP=F(94,e=>fN(e.a,JL(e)),e=>e._._),OP=F(95,wP,e=>e._._),kP=c(2,0,e=>YM(e.a,e._.aa)),AP=e=>{kP._(e),jP._(e),MP._(e),PP._(e),FP._(e),IP._(e),LP._(e),rN(e.a),_N(e.a,`overlay`)},jP=c(2,0,e=>XM(e.a,e._.ac)),MP=c(2,0,e=>hN(e.a,e._.ad)),NP=x(1,e=>pN(e.a,YL(e))),PP=c(2,0,NP),FP=c(2,0,e=>mN(e.a,e._.am)),IP=c(2,0,e=>fN(e.a,XL(e))),LP=c(2,0,NP),RP=g(`v23`,e=>{e._.a9&&setTimeout(()=>e.d?.focus(),50)}),zP=c(6,0,RP),BP=g(`v24`,e=>{P(e.a,`click`,function(){RI(e._,!1)}),P(e.b,`click`,function(e){e.stopPropagation()}),P(e.d,`paste`,function(t){t.preventDefault(),e._.bd(t.clipboardData)}),P(e.e,`click`,function(){RI(e._,!1)})}),VP=e=>{zP._(e),I(e.a,`_dv`),I(e.b,`_dw`),I(e.c,`_d0`),I(e.e,`_f`),BP(e)},HP=g(`v22`,e=>P(e.b,`click`,function(){yI(e._,!1)})),UP=e=>{I(e.a,`_dr`),I(e.b,[`_f`,`_g`]),HP(e)},WP=F(86,e=>E(e.c,e._._.a2),e=>e._._),GP=e=>{WP(e),I(e.a,`_dP`),I(e.b,`_dQ`)},KP=g(`v29`,e=>P(e.a,`click`,function(t,n){n.closest(`[popover]`)?.hidePopover(),e._._._.v?.(e.d)})),qP=e=>{I(e.a,MM),e.b,Gt(e.b,15),Yt(e.b),KP(e)},JP=N(3,e=>{A(e.a,`title`,`New ${e.d} session`),Jt(e.b,e.d)}),YP=(e,t)=>JP(e,t[0]),XP=x(1,e=>{I(e.a,[`_dL`,{_dK:e._._._._.g===e._._.d}]),A(e.a,`title`,e._._._._.g===e._._.d?`Really kill this session?`:`Kill session`)}),ZP=F(9,XP,e=>e._._._._),QP=g(`v27`,e=>P(e.a,`click`,function(t,n){e._._._._.g===e._._.d?(jF(e._._._._,null),n.closest(`[popover]`)?.hidePopover(),e._._._._._._.a0?.(e._._.d)):jF(e._._._._,e._._.d)})),$P=e=>{ZP(e),eF(e),QP(e)},eF=F(10,XP,e=>e._._),tF=u(5,(e=>`<button title="Rename session">${e}</button>`)(uc),(e=>` D/${e}&l`)(dc),XN),nF=F(83,e=>tF(e,+!e._._._._._.z),e=>e._._._._._),rF=g(`v28`,e=>P(e.a,`click`,function(t,n){n.closest(`[popover]`)?.hidePopover(),e._.d!==e._._._._._.x&&e._._._._._.w?.(e._.d)})),iF=e=>{nF(e),oF(e),sF._(e),cF._(e),I(e.a,`_dH`),e.c,Gt(e.c,14),Yt(e.c),I(e.d,`_dI`),rF(e)},aF=u(6,`<button>×</button>`,` `,$P),oF=F(84,e=>aF(e,+!e._._._._._.a0),e=>e._._._._._),sF=c(0,1,e=>{Jt(e.c,yt(e._.c)),E(e.e,e._.c?.title||yt(e._.c))}),cF=c(0,1,e=>I(e.b,[`_q`,Ne[_t(e._.g)]])),lF=x(4,e=>I(e.a,[`_dG`,{_dF:e.d===e._._._._.x}])),uF=F(81,lF,e=>e._._._._),dF=e=>{uF(e),pF._(e)},fF=u(0,(e=>`<span></span>${e}<input aria-label="Session name">`)(Ft),(e=>` b/${e}& b`)(`b%c`),$N,(e=>`<button><span></span>${e}<span> </span></button><!><!><!>`)(Ft),(e=>` D b/${e}& D m%b%c`)(`b%c`),iF),pF=D(0,1,3,e=>fF(e,e._.b===e.d?0:1)),mF=L(eF),hF=N(3,e=>{lF(e),mF(e)}),gF=(e,t)=>_F(e,t[0]),_F=N(2,e=>{hF(e,e.c?.id),vF(e,e.c?.state),yF(e,e.c?.title),bF(e,e.c?.agent),sF(e),eP(e)}),vF=N(6,e=>{cF(e),tP(e)}),yF=N(7),bF=N(8),xF=R(0,`<div></div>`,` `,dF,gF),SF=F(82,e=>xF(e,[e._._._.y||[],`id`]),e=>e._._._),CF=N(4),wF=x(3,e=>CF(e,ZL(e)),2),TF=C(1,e=>{wF(e),pF(e)}),EF=L(ZN),DF=C(2,e=>{wF(e),EF(e)}),OF=e=>{SF(e),kF(e),TF(e,null),DF(e,``)},kF=F(83,wF,e=>e._._._),AF=F(79,e=>I(e.c,[`_q`,`_dD`,Ne[_t(e._._.o)]]),e=>e._._),jF=C(6,L(ZP)),MF=x(8,e=>A(e.a,`popovertarget`,e._._.au?e.h:void 0)),NF=N(7,e=>{A(e.d,`id`,e.h),MF(e)}),PF=g(`v30`,e=>P(e.d,`toggle`,function(t,n){if(jF(e,null),t.newState===`open`){let t=e.a.getBoundingClientRect();n.style.top=`${Math.max(8,t.top-n.offsetHeight-8)}px`,n.style.left=`${Math.max(8,Math.min(t.left+t.width/2-n.offsetWidth/2,window.innerWidth-n.offsetWidth-8))}px`}})),FF=e=>{AF(e),LF(e),zF(e),VF(e),HF(e),I(e.a,[NM,`_dC`]),e.b,Gt(e.b,16),Yt(e.b),I(e.d,`_dE`),jF(e,null),NF(e,k(e)),PF(e)},IF=u(4,`<!><!><!>`,`b%`,OF),LF=F(82,e=>{I(e.f,[`_dO`,{_dN:(e._._.y||[]).length<=1}]),IF(e,(e._._.y||[]).length>1?0:1)},e=>e._._),RF=R(5,(e=>`<button>${e}</button>`)(Ft),(e=>` D/${e}&l`)(`b%c`),qP,YP),zF=F(85,e=>RF(e,[[...e._._.a1||[],`shell`],e=>e]),e=>e._._),BF=g(`v31`,e=>P(e.a,`click`,!e._._.au&&(()=>{e._._.w?.(e._._.x)}))),VF=F(96,e=>{A(e.a,`title`,e._._.au?`Sessions`:`Back to session`),MF(e),BF(e)},e=>e._._),HF=F(99,e=>Jt(e.b,e._._.b1),e=>e._._),UF=qe(`v21`,19),WF=x(23,e=>I(e.d,[`_dz`,{_dA:e._.aa||!!e._.l&&e._.k===`diff`}]),2),GF=x(24,e=>{A(e.o,`title`,e._.az?`Close find`:e._.ax?e._.k===`diff`?`Find in the review`:`Find in terminal`:`Find unavailable on this page`),A(e.o,`aria-label`,e._.az?`Close find`:e._.ax?e._.k===`diff`?`Find in the review`:`Find in terminal`:`Find unavailable on this page`)},2),KF=c(7,0,e=>{I(e.e,[NM,{_dR:e._.k===`nav`}]),A(e.e,`aria-pressed`,e._.k===`nav`?`true`:`false`),I(e.g,[NM,{_dR:e._.k===`manage`}]),A(e.g,`aria-pressed`,e._.k===`manage`?`true`:`false`),I(e.i,[NM,{_dR:e._.k===`diff`}]),A(e.i,`title`,e._.k===`diff`?`Back to terminal`:`Review changes`),A(e.i,`aria-pressed`,e._.k===`diff`?`true`:`false`),WF(e),GF(e)}),qF=N(19,e=>A(e.m,`aria-controls`,e.t)),JF=(e,t)=>pI(e,t.open),YF=R(18,`<!><!><!>`,`b%`,0,yP),XF=g(`v38`,e=>{P(e.e,`click`,function(){e._.r?.()}),P(e.g,`click`,function(){e._.s?.()}),P(e.i,`click`,function(){e._.k===`diff`?e._.t?.():e._.u?.()}),P(e.o,`click`,function(){e._.b0()}),P(e.q,`pointerdown`,function(e){e.preventDefault()}),P(e.s,`pointerdown`,function(e){e.preventDefault()}),P(e.s,`toggle`,function(t,n){t.newState===`open`&&requestAnimationFrame(()=>{let t=e.m?.getBoundingClientRect();t&&(n.style.bottom=`auto`,n.style.right=`0.5rem`,n.style.left=`auto`,n.style.top=`${Math.max(8,t.top-n.offsetHeight-8)}px`)})})}),ZF=e=>{KF._(e),QF._(e),eI._(e),nI._(e),iI._(e),aI._(e),sI._(e),lI._(e),uI._(e),dI._(e),I(e.a,`_dx`),I(e.b,`_dy`),wN(e.f),TN(e.f,16),EN(e.f),Dt(e.h),Ot(e.h,16),kt(e.h),St(e.j),Ct(e.j,16),wt(e.j),I(e.k,`_dB`),I(e.m,NM),kN(e.n),AN(e.n,16),jN(e.n),Te(e.p),Re(e.p,16),Me(e.p),PN(e.r),FN(e.r,16),IN(e.r),A(e.s,`id`,UF(e)),I(e.s,`_dT`),qF(e,k(e)),JF(e,{open:!1}),YF(e,[JN]),XF(e)},QF=c(7,0,WF),$F=u(10,(e=>`<button>${e}<span></span></button><div popover=auto><!><div></div></div>`)(Ft),(e=>` D/${e}& l D%b l`)(`b%c`),FF),eI=c(7,0,e=>$F(e,+!e._.v)),tI=u(11,`<span aria-hidden=true><span> </span></span>`,` D D `,GP),nI=c(7,0,e=>tI(e,+!e._.a2)),rI=x(22,e=>A(e.q,`title`,e._.ax?e._.a5?`Hide keyboard`:`Show keyboard`:`Keyboard unavailable on this page`)),iI=c(7,0,e=>{I(e.q,[NM,{_dR:e._.a5}]),rI(e)}),aI=c(7,0,WF),oI=g(`v36`,e=>P(e.q,`click`,function(){OI(e._,!e._.a5),e._.af?.setKeyboard(e._.a5)})),sI=c(7,0,oI),cI=u(2,LM,(e=>`/${e}&`)(RM),xP),lI=c(7,0,e=>cI(e,+!e._.au)),uI=c(7,0,e=>{A(e.m,`title`,e._.ax?`More keys`:`Keys unavailable on this page`),A(e.m,`disabled`,!e._.ax),A(e.o,`disabled`,!e._.ax),A(e.q,`disabled`,!e._.ax),GF(e),rI(e)}),dI=c(7,0,e=>{I(e.o,[NM,{_dR:e._.az}]),A(e.o,`aria-pressed`,e._.az?`true`:`false`),GF(e)}),fI=g(`v37`,e=>{P(e.m,`pointerdown`,function(t){t.preventDefault(),e.v=!!e.s?.matches(`:popover-open`)}),P(e.m,`click`,function(){let t=e.s;t&&(e.v?t.hidePopover():t.showPopover())})}),pI=N(21,fI),mI=qe(`v20`,1),hI=o(71),gI=u(5,`<div><button>Reconnect</button></div>`,` D `,UP),_I=g(`v39`,e=>n(e,{onMount:function(){let t=new AbortController,n=t.signal,i=new HE({fontSize:13,fontFamily:`ui-monospace, monospace`,scrollback:0,overviewRuler:{width:0},allowProposedApi:!0,rightClickSelectsWord:!0,macOptionClickForcesSelection:!0,theme:{selectionBackground:`#ffb000`,selectionInactiveBackground:`#ffb000`,selectionForeground:`#000000`},linkHandler:{activate(e,t){se(t)}}}),a=new oj;i.loadAddon(a),i.open(e.b);let o=r();try{let e=new rj;e.onContextLoss(()=>e.dispose()),i.loadAddon(e)}catch{}try{i.loadAddon(new Wj(void 0,{readText:()=>navigator.clipboard.readText().catch(()=>``),writeText:(e,t)=>ke(t).then(()=>{})}))}catch{}i.loadAddon(new Qj((e,t)=>se(t)));let s=hM(i,e.b);e.aj=s;let c=i.onScroll(()=>e.ao()),l=i.onWriteParsed(()=>e.ao());e.b.addEventListener(`wheel`,()=>e.ao(),{passive:!0,signal:n}),kM(i,a);let u=OM(i),d=jM(i,mI(e));n.addEventListener(`abort`,()=>{c.dispose(),l.dispose(),u.dispose(),d.dispose(),e.aq(),s.dispose(),e.aj=null});let f=o?tM(i):null,p=f?f.write:e=>i.write(e),m=$j({sessionId:e.x,term:i,write:p,onDead:()=>{yI(e,!0)},isVisible:()=>!!e.a3},n),h={on:!1},g=e=>e.startsWith(`\x1B[<`)||e.startsWith(`\x1B[M`)||e.startsWith(`\x1B[>`);i.onData(e=>{h.on&&!g(e)||m.send(e)}),i.attachCustomKeyEventHandler(t=>h.on?!1:t.key===`Enter`&&t.shiftKey?(t.type===`keydown`&&m.send(`\x1B\r`),!1):(t.ctrlKey||t.metaKey)&&t.key.toLowerCase()===`c`&&i.hasSelection()?(t.type===`keydown`&&ke(i.getSelection()).then(t=>{t&&(i.clearSelection(),e.b4())}),!1):t.metaKey&&!t.ctrlKey&&!t.altKey&&(t.key===`ArrowLeft`||t.key===`ArrowRight`)?(t.preventDefault(),t.type===`keydown`&&e.af?.send(t.key===`ArrowLeft`?``:``),!1):!((t.ctrlKey||t.metaKey)&&!t.shiftKey&&!t.altKey&&t.key.toLowerCase()===`f`||o&&t.type===`keydown`&&t.key===`Backspace`));let _=()=>{if(!e.b.clientWidth)return;let t=i.cols,n=i.rows;kM(i,a),(i.cols!==t||i.rows!==n)&&m.resize(i.cols,i.rows),AM(i,e.b),e.ao()},v=new ResizeObserver(_);v.observe(e.b),n.addEventListener(`abort`,()=>v.disconnect());let y=()=>requestAnimationFrame(_);if(document.addEventListener(`visibilitychange`,()=>{document.hidden||y()},{signal:n}),window.addEventListener(`pageshow`,y,{signal:n}),window.addEventListener(`focus`,y,{signal:n}),window.visualViewport?.addEventListener(`resize`,y,{signal:n}),window.addEventListener(`keydown`,t=>{e.a3&&(e.k==null||e.k===`term`)&&(t.metaKey||t.ctrlKey)&&!t.shiftKey&&!t.altKey&&t.key.toLowerCase()===`f`&&(t.preventDefault(),t.stopPropagation(),e.ar())},{capture:!0,signal:n}),e.b.addEventListener(`paste`,t=>{let n=[...t.clipboardData?.files||[]];if(n.length){t.preventDefault(),t.stopImmediatePropagation();for(let t of n)e.ba(t)}},{capture:!0,signal:n}),e.af={send(e){h.on||m.send(e)},setKeyboard(e){if(h.on&&e)return;let t=i.textarea;t&&(t.inputMode=e?`text`:`none`,e?(t.focus(),setTimeout(()=>{document.activeElement!==t&&t.focus()},50)):t.blur())},setFindMode(e){h.on=e;let t=i.textarea;t&&(e?(t.inputMode=`none`,t.readOnly=!0,t.blur()):(t.readOnly=!1,o||(t.inputMode=`text`)))}},o){i.textarea&&(i.textarea.inputMode=`none`);let t=window.visualViewport;if(t){let r=0,a=()=>{r=Math.max(r,t.height),e.a5&&r-t.height<qN&&(OI(e,!1),i.textarea&&(i.textarea.inputMode=`none`))};a(),t.addEventListener(`resize`,a,{signal:n}),window.addEventListener(`orientationchange`,()=>{r=0},{signal:n})}let r=oM(i,mI(e),{onStart(){f?.setFrozen(!0)},onEnd(){f?.setFrozen(!1)},onCopy(){e.b4()}},n);eM(i,mI(e),n,r.selecting),nM(i,e=>{h.on||m.send(e)},n)}else cM(i,mI(e),()=>e.b4(),n);e.a3&&!o&&i.focus();let b={term:i,socket:m,abort:t,suspend:void 0};return e.a3||(b.suspend=setTimeout(()=>m.disconnect(),KN)),b},onUpdate:function(){clearTimeout(this.suspend),this.socket.syncVisibility(),e.a3?(!e.a4&&this.socket.readyState>=WebSocket.CLOSING&&(this.term.reset(),this.socket.reconnect()),!e.a4&&!e.a6&&this.term.focus()):this.suspend=setTimeout(()=>this.socket.disconnect(),KN)},onDestroy:function(){clearTimeout(this.suspend),this.abort.abort(),this.term.dispose()}})),vI=x(74,_I,12),yI=C(30,e=>{gI(e,+!e.a4),vI(e)}),bI=N(62),xI=x(60,e=>bI(e,QL(e)),4),SI=N(55,xI),CI=x(54,e=>SI(e,$L(e)),3),wI=N(53,e=>{CI(e),vI(e)}),TI=x(49,e=>wI(e,eR(e)),3),EI=g(`v40`,e=>{e.au||(e.aa&&(HI(e,!1),e.aq(),e.af?.setFindMode(!1)),e.a5&&(OI(e,!1),e.af?.setKeyboard(!1)))}),DI=x(58,EI,4),OI=C(31,e=>{TI(e),DI(e),vI(e),iI(e)}),kI=u(7,((e,t,n,r,i,a)=>`<div><div><!><div><button title=Workspaces>${e}</button><button title="Manage workspace">${t}</button><button>${n}</button><div></div><!><button aria-haspopup=dialog>${r}</button><button>${i}</button><button>${a}</button></div><div popover=auto></div></div></div>`)(SN,Tt,bt,DN,he,MN),((e,t,n,r,i,a)=>` D D%b D D/${e}&l D/${t}&l D/${n}&l b%b D/${r}&l D/${i}&l D/${a}&m m`)(CN,Et,xt,ON,Pe,NN),ZF),AI=u(2,LM,(e=>`/${e}&`)(RM),AP),jI=x(37,e=>AI(e,!e.a6&&e.aa?0:1)),MI=C(32,e=>{kI(e,+!e.a6),jI(e),vI(e)}),NI=u(3,`<div>uploading…</div>`,` `,rP),PI=C(33,e=>NI(e,+!e.a7)),FI=u(4,`<div>Copied</div>`,` `,nP),II=C(34,e=>FI(e,+!e.a8)),LI=u(6,`<div><div><p>Long-press below and choose Paste</p><input placeholder="Paste here…"><button>Cancel</button></div></div>`,` D D b b `,VP),RI=C(35,e=>{LI(e,+!e.a9),zP(e)}),zI=N(61,dI),BI=x(57,e=>zI(e,e.au?e.aa:e.k===`diff`&&!!e.l),3),VI=L(bP),HI=C(36,e=>{CI(e),BI(e),DI(e),jI(e),aI(e),kP(e),VI(e)}),UI=N(38),WI=L(CP),GI=C(39,e=>{TI(e),MP(e),WI(e)}),KI=(e,t)=>oL(e,t.current),qI=(e,t)=>{dL(e,t.query),fL(e,t.overlay),pL(e,t.refreshTimer)},JI=N(48,TI),YI=(e,t)=>DL(e,t.timer),XI=(e,t)=>kL(e,t.current),ZI=g(`v41`,e=>{MI(e,r()),P(e.a,`dragover`,function(e){e.preventDefault()}),P(e.a,`drop`,function(t){t.preventDefault();for(let n of t.dataTransfer?.files||[])e.ba(n)})});function QI(e){I(e.a,`_dp`),I(e.b,`_dq`),yI(e,!1),OI(e,!1),MI(e,!1),PI(e,!1),II(e,!1),RI(e,!1),HI(e,!1),UI(e,tR(e)),GI(e,0),KI(e,{current:null}),qI(e,{overlay:null,query:``,refreshTimer:0}),JI(e,{focus:nR}),YI(e,{timer:0}),XI(e,{current:null}),ZI(e)}var $I=N(70),eL=x(69,e=>$I(e,rR(e))),tL=N(75),nL=N(76),rL=x(73,e=>{tL(e,iR(e)),nL(e,aR(e))}),iL=N(72,e=>{rL(e),vI(e)}),aL=x(42,e=>iL(e,oR(e))),oL=N(41,e=>{TI(e),CI(e),eL(e),aL(e),rL(e),DI(e),vI(e)}),sL=N(50,vI),cL=N(51),lL=N(52,e=>{CI(e),DI(e),vI(e)}),uL=x(47,e=>{sL(e,sR(e)),cL(e,cR(e)),lL(e,lR(e))},2),dL=N(44,uL),fL=N(45,e=>{uL(e),vI(e)}),pL=N(46,uL),mL=L(VF),hL=N(56,e=>{A(e.a,`hidden`,!e.au),BI(e),xI(e),DI(e),lI(e),mL(e)}),gL=N(59,e=>{xI(e),uI(e)}),_L=e=>{gL(e,e.au||e.k===`diff`)},vL=N(10,e=>{hL(e,e.k==null||e.k===`term`),_L(e),BI(e),xI(e),vI(e),KF(e)}),yL=N(11,e=>{BI(e),QF(e)}),bL=N(12,xI),xL=N(63,L(HF)),SL=x(15,e=>xL(e,yt({agent:e.n||`shell`,state:e.o}))),CL=N(13,SL),wL=L(AF),TL=N(14,e=>{SL(e),wL(e)}),EL=N(66,vI),DL=N(65,e=>EL(e,uR(e))),OL=N(71),kL=N(68,e=>{OL(e,dR(e)),eL(e)}),AL=N(16,aL),jL=L(uF),ML=N(23,e=>{vI(e),jL(e)}),NL=N(29,vI),PL=N(17),FL=N(18),IL=N(19),LL=N(20),RL=N(21,eI),zL=N(22),BL=N(24,L(LF,SF)),VL=N(25,L(kF,nF)),HL=N(26,L(oF)),UL=N(27,L(zF)),WL=L(WP),GL=N(28,e=>{nI(e),WL(e)});function KL(e){return t=>{DF(e._._,t)}}function qL(e){return function(){e._._.aq(),e._._.af?.setFindMode(!1)}}function JL(e){return function(t,n){e._._.ap(t,n)}}function YL(e){return function(){e._.aq(),e._.af?.setFindMode(!1)}}function XL(e){return function(t,n){e._.ap(t,n)}}function ZL(e){return t=>{if(e.b!==t)return;let n=e.c.trim();TF(e,null),n&&e._._._.z?.(t,n)}}function QL(e){return()=>{if(e.ax){if(e.au){e.at();return}e.k===`diff`&&e.m?.()}}}function $L(e){return()=>{if(e.aa){HI(e,!1),e.aq(),e.af?.setFindMode(!1);return}e.ar()}}function eR(e){return()=>{e.a5&&(OI(e,!1),e.af?.setKeyboard(!1)),e.af?.setFindMode(!0),HI(e,!0),GI(e,e.ad+1),e.am.focus()}}function tR(e){return t=>{HI(e,t)}}function nR(){}function rR(e){return t=>{hI(e)(),e.af?.send(t);let n={};n.delay=setTimeout(()=>{n.repeat=setInterval(()=>e.af?.send(t),GN)},WN),e.b6=n}}function iR(e){return async t=>{let n=[...t?.files||[]];for(let t of n)await e.ba(t);if(!n.length){let n=t?.getData(`text/plain`);n&&e.af?.send(n)}RI(e,!1)}}function aR(e){return async()=>{if(!navigator.clipboard?.read){RI(e,!0);return}try{for(let t of await navigator.clipboard.read()){let n=t.types.find(e=>e.startsWith(`image/`));if(n){let r=await t.getType(n);await e.ba(new File([r],`pasted.${n.split(`/`)[1]||`png`}`,{type:n}))}else if(t.types.includes(`text/plain`)){let n=await(await t.getType(`text/plain`)).text();n&&e.af?.send(n)}}}catch{RI(e,!0)}}}function oR(e){return async t=>{if(t){PI(e,!0);try{let n=await(await fetch(`/api/workspaces/${e.q}/assets?name=${encodeURIComponent(t.name||`pasted.png`)}`,{method:`POST`,body:t})).json();n.path&&e.af?.send(`${n.path} `)}finally{PI(e,!1)}}}}function sR(e){return()=>{!e.ai.trim()||!e.aj||(e.ak&&clearTimeout(e.ak),e.ak=setTimeout(()=>{e.ak=0,e.aj?.refresh()},32))}}function cR(e){return(t,n)=>{let r=e.aj;if(r){if(e.ai=t,e.ak&&=(clearTimeout(e.ak),0),!t.trim()){r.clear();return}r.search(t,n)}}}function lR(e){return()=>{e.ak&&=(clearTimeout(e.ak),0),e.ai=``,e.aj?.clear()}}function uR(e){return()=>{clearTimeout(e.b3),II(e,!0),e.b3=setTimeout(()=>{II(e,!1)},1200)}}function dR(e){return()=>{let t=e.b6;t&&(clearTimeout(t.delay),clearInterval(t.repeat),e.b6=null)}}S(`v0`,KL),S(`v18`,qL),S(`v17`,JL),S(`v16`,YL),S(`v15`,XL),S(`v19`,ZL),S(`v8`,QL),S(`v7`,$L),S(`v6`,eR),S(`v1`,tR),S(`v2`,nR),S(`v10`,rR),S(`v13`,iR),S(`v14`,aR),S(`v12`,oR),S(`v3`,sR),S(`v4`,cR),S(`v5`,lR),S(`v9`,uR),S(`v11`,dR);var fR=(e=>`<div><div>${e}</div><div><!><!><!><!><!><div></div></div></div>`)(sf),pR=(e=>` D D/${e}&l D%b%b%b%b%b m`)(cf);re();var mR=e=>I(e.a,`_bU`),hR=F(106,e=>E(e.a,e._._.ak),e=>e._._),gR=me(`y47`,` `,` `,hR),_R=e=>{w(e.a),ne(e.a,gR(e)),te(e.a,wV(e)),s(e.a),t(e.a),Ee(e.a),ee(e.a),h(e.a),De(e.a,{})},vR=b(3,0,2),yR=c(7,0,e=>vR(e,e._.a3===`usage`)),bR=e=>{yR._(e),Zv(e.b)},xR=x(4,e=>E(e.d,e._._.al?`Starting…`:`Start ${e._._.r||`claude`}`)),SR=F(93,xR,e=>e._._),CR=g(`y48`,e=>P(e.c,`click`,function(){e._._.bg(e._._.r||`claude`,!0)})),wR=e=>{SR(e),TR(e),I(e.a,`_bV`),I(e.b,`_bW`),I(e.c,[`_f`,`_g`]),CR(e)},TR=F(107,e=>{A(e.c,`disabled`,e._._.al),xR(e)},e=>e._._),ER=x(8,e=>NL(e.b,e._._.o&&e._._.a3===`term`&&e.g===e._._.b8),3),DR=F(92,ER,e=>e._._),OR=e=>{DR(e),kR(e),AR(e),jR(e),NR(e),PR(e),FR(e),RR(e),zR(e),BR(e),VR(e),HR(e),QI(e.b),zL(e.b,kV(e)),LL(e.b,OV(e)),IL(e.b,DV(e)),PL(e.b,EV(e)),FL(e.b,TV(e))},kR=F(96,e=>UL(e.b,e._._.u),e=>e._._),AR=F(99,e=>{vL(e.b,e._._.a3),ER(e)},e=>e._._),jR=F(101,e=>yL(e.b,e._._.ac),e=>e._._),MR=x(11,e=>RL(e.b,AV(e))),NR=F(109,e=>{AL(e.b,e._._.an),MR(e)},e=>e._._),PR=F(111,e=>GL(e.b,e._._.at),e=>e._._),FR=F(112,e=>BL(e.b,e._._.b5),e=>e._._),IR=b(3,0,2),LR=x(7,e=>IR(e,e.g===e._._.b8)),RR=F(114,e=>{ER(e),LR(e)},e=>e._._),zR=F(115,e=>bL(e.b,jV(e)),e=>e._._),BR=F(117,e=>HL(e.b,MV(e)),e=>e._._),VR=F(118,e=>VL(e.b,NV(e)),e=>e._._),HR=F(119,MR,e=>e._._),UR=N(6,e=>{ML(e.b,e.g),ER(e),LR(e)}),WR=(e,t)=>TL(e.b,t),GR=(e,t)=>CL(e.b,t),KR=R(0,(e=>`<!><!>${e}<!><!><!>`)(HN),(e=>`b%b/${e}&%b%c`)(UN),OR,(e,t)=>{UR(e,t[0]?.id),WR(e,t[0]?.state),GR(e,t[0]?.agent)}),qR=c(9,0,e=>KR(e,[e._.b5,`id`])),JR=e=>{qR._(e),XR._(e)},YR=u(1,`<div><p>No sessions in this workspace.</p><button> </button></div>`,` D b D `,wR),XR=c(9,0,e=>YR(e,+!!e._.b7)),ZR=x(4,e=>Is(e.b,PV(e)),2),QR=c(8,0,ZR),$R=e=>{QR._(e),ez._(e),tz._(e),nz._(e),iz._(e),az._(e),Ts(e.b),zs(e.b,FV(e))},ez=c(8,0,e=>Ns(e.b,e._.t||[])),tz=c(8,0,ZR),nz=c(8,0,e=>Ls(e.b,IV(e))),rz=b(3,0,2),iz=c(8,0,e=>rz(e,e._.a3===`new`)),az=c(8,0,ZR),oz=c(6,0,e=>R_(e.b,LV(e))),sz=e=>{oz._(e),lz._(e),uz._(e),d_(e.b),z_(e.b,RV(e))},cz=b(3,0,2),lz=c(6,0,e=>cz(e,e._.a3===`manage`)),uz=c(6,0,e=>L_(e.b,e._.am)),dz=Ge(1),fz=x(4,e=>dz(e,e._.a6,()=>({workspaceId:e._.an,workspaceBranch:e._.as,workspaceName:e._.at,sessions:e._.b5||[],active:e._.o&&e._.a3===`diff`,focusPr:e._.ah,focusNonce:e._.ai,findOpen:e._.ac,findOpenChange:VV(e),findTick:e._.ae,findFocusRef:e._.af,onSent:BV(e),onExit:zV(e)})),11),pz=c(5,0,fz),mz=e=>{pz._(e),gz._(e),_z._(e),vz._(e),yz._(e),bz._(e),xz._(e),Sz._(e),Cz._(e),wz._(e),Tz._(e),Ez._(e)},hz=b(3,0,2),gz=c(5,0,e=>{hz(e,e._.a3===`diff`),fz(e)}),_z=c(5,0,fz),vz=c(5,0,fz),yz=c(5,0,fz),bz=c(5,0,fz),xz=c(5,0,fz),Sz=c(5,0,fz),Cz=c(5,0,fz),wz=c(5,0,fz),Tz=c(5,0,fz),Ez=c(5,0,fz),Dz=L(VR),Oz=N(89,e=>{dh(e.c,HV(e)),Dz(e)}),kz=u(9,`<!><!><!><!>`,`b%b%`,JR,`<p>Loading sessions…</p>`,` `,mR),Az=L(RR),jz=N(70,e=>{bm(e.c,e.b8),Az(e)}),Mz=x(68,e=>jz(e,(()=>{if(e.a1&&e.b5?.some(t=>t.id===e.a1))return e.a1;let t=de(e.an);return t&&e.b5?.some(e=>e.id===t)?t:e.b5?.[0]?.id??null})()),2),Nz=L(FR),Pz=N(67,e=>{ch(e.c,e.b5),rV(e,e.b5?.length),kz(e,+!e.b5),Mz(e),Ez(e),qR(e),Nz(e)}),Fz=x(52,e=>Pz(e,e.a0??e.n?.[e.an]?.sessions??null),2),Iz=g(`y50`,t=>n(t,{active:t.o,load:t.bo,onMount:function(){let n=new AbortController,r=n.signal,i={abort:n,started:!1,stale:!1,timer:void 0,refresh:()=>{if(document.hidden){i.stale=!0;return}i.stale=!1,this.load(!1)},applySessions:e=>{Xz(t,e);let n=de(t.an);n&&e.some(e=>e.id===n)&&$z(t,n),e.some(e=>e.id===t.a1)||$z(t,e[0]?.id||null),i.stale=!1},mergeStatus:e=>{let n=e?.[t.an]?.sessions;if(!n||!t.a0)return;let r=new Map(n.map(e=>[e.id,e.state]));Xz(t,t.a0.map(e=>{let t=r.get(e.id);return t?{...e,state:t}:e}))},syncPoll:()=>{if(!this.active||e()){i.stop();return}i.timer??=setInterval(i.refresh,15e3)},sync:()=>{this.active?(i.started||(i.started=!0,this.load(!0)),i.syncPoll()):i.stop()},stop:()=>{clearInterval(i.timer),i.timer=void 0}};return T().addEventListener(`sessions.changed`,e=>{if(!i.started)return;let n=e.data;if(!(n?.workspaceId&&n.workspaceId!==t.an)){if(Array.isArray(n?.sessions)){i.applySessions(n.sessions);return}i.refresh()}},{signal:r}),T().addEventListener(`status.changed`,e=>{i.started&&i.mergeStatus(e.data)},{signal:r}),T().addEventListener(`sse.health`,()=>{i.syncPoll()},{signal:r}),document.addEventListener(`visibilitychange`,()=>{!document.hidden&&i.stale&&i.refresh()},{signal:r}),tt(()=>{if(!this.active)return;let e=rt(t.an);e&&t.au(e.pr),st(t.an)&&t.aw();let n=at(t.an);n&&($z(t,n),$(t,`term`))},r),i.sync(),i},onUpdate:function(){this.sync()},onDestroy:function(){this.abort.abort(),this.stop()}})),Lz=x(87,Iz,6),Rz=N(86,Lz),zz=x(85,e=>Rz(e,WV(e)),2),Bz=N(84,zz),Vz=x(82,e=>Bz(e,GV(e)),6),Hz=x(91,e=>ih(e.c,KV(e))),Uz=L(HR),Wz=N(90,e=>{Hz(e),Uz(e)}),Gz=x(79,e=>Wz(e,qV(e)),2),Kz=N(78,e=>{Vz(e),Gz(e)}),qz=x(50,e=>Kz(e,JV(e))),Jz=N(88,L(BR)),Yz=x(28,e=>Jz(e,YV(e))),Xz=C(26,e=>{Oz(e,UV(e)),Fz(e),qz(e),Vz(e),Yz(e),Lz(e)}),Zz=g(`y51`,e=>{e.a1&&ue(e.an,e.a1)}),Qz=x(51,Zz),$z=C(27,e=>{Mz(e),Vz(e),Yz(e),Qz(e),Lz(e)}),eB=N(64),tB=x(76,e=>$m(e.c,ZV(e))),nB=x(77,e=>oh(e.c,QV(e))),rB=N(75,e=>{tB(e),Hz(e),nB(e),az(e)}),iB=N(63),aB=x(62,e=>iB(e,eH(e))),oB=N(65),sB=x(59,e=>oB(e,tH(e))),cB=N(66),lB=x(57,e=>cB(e,nH(e))),uB=g(`y55`,e=>{!e.o&&(e.a3===`nav`||e.a3===`manage`||e.a3===`usage`||e.a3===`new`)&&$(e,`term`)}),dB=x(30,uB),fB=g(`y54`,e=>{e.a3!==`diff`&&e.ac&&FB(e,!1)}),pB=x(39,fB),mB=g(`y53`,e=>{e.o&&e.p&&!e.ba&&(e.ba=!0,jB(e,!0),$(e,`new`)),e.p?e.ba&&e.a3!==`new`&&(e.ba=!1,e.q?.()):(e.ba=!1,e.a3===`new`&&$(e,`term`))}),hB=x(73,mB,4),gB=L(AR),$=C(29,e=>{I(e.a,[`_bP`,{_bO:e.a3===`nav`}]),Mm(e.c,e.a3),I(e.j,[`_bT`,{_bS:e.a3!==`term`}]),eB(e,XV(e)),rB(e,$V(e)),aB(e),sB(e),lB(e),dB(e),pB(e),hB(e),gz(e),lz(e),iz(e),gB(e),yR(e)}),_B=u(5,`<!><!><!><!><!><!>`,`b%b%b%b%`,mz),vB=x(33,e=>_B(e,e.a5&&e.a6?0:1)),yB=C(31,vB),bB=g(`y52`,e=>{if(e.o){let t=rt(e.an);t&&e.au(t.pr),st(e.an)&&e.aw();let n=at(e.an);n&&($z(e,n),$(e,`term`))}}),xB=x(60,bB,3),SB=N(56,e=>{lB(e),xB(e),Lz(e),nB(e)}),CB=x(45,e=>SB(e,rH(e))),wB=N(34,CB),TB=C(32,e=>{wB(e,iH(e)),vB(e),_z(e)}),EB=u(6,(e=>`<!><!>${e}<!><!><!>`)(Fh),(e=>`b%b/${e}&%b%c`)(Ih),sz),DB=C(35,e=>EB(e,+!e.a9)),OB=u(7,(e=>`<!><!>${e}<!><!><!>`)(tv),(e=>`b%b/${e}&%b%c`)(nv),bR),kB=C(36,e=>OB(e,+!e.aa)),AB=u(8,(e=>`<!><!>${e}<!><!><!>`)(ao),(e=>`b%b/${e}&%b%c`)(oo),$R),jB=C(37,e=>AB(e,+!e.ab)),MB=N(74,L(zR)),NB=x(42,e=>MB(e,aH(e)),2),PB=L(jR),FB=C(38,e=>{pB(e),NB(e),vz(e),PB(e)}),IB=C(40,e=>{NB(e),yz(e)}),LB=N(41,NB),RB=C(43,xz),zB=C(44,e=>{CB(e),Sz(e)}),BB=u(4,d,(e=>`/${e}&`)(y),_R),VB=L(hR),HB=C(46,e=>{BB(e,+!e.ak),VB(e)}),UB=C(47,L(TR)),WB=N(58,e=>{sB(e),xB(e),Lz(e)}),GB=N(61,aB),KB=(e,t)=>aV(e,t.open),qB=(e,t)=>{dV(e,t.wanted),fV(e,t.run)};function JB(e){I(e.b,`_bQ`),Hm(e.c),xm(e.c,hH(e)),Nm(e.c,mH(e)),Um(e.c,pH(e)),lh(e.c,fH(e)),mh(e.c,dH(e)),Zm(e.c,uH(e)),ph(e.c,lH(e)),I(e.d,`_bR`),Xz(e,null),$z(e,null),$(e,`term`),yB(e,!1),TB(e,null),DB(e,!1),kB(e,!1),jB(e,!1),FB(e,!1),IB(e,0),LB(e,{focus:oH}),RB(e,``),zB(e,0),HB(e,null),UB(e,!1),WB(e,sH(e)),GB(e,cH(e)),KB(e,{open:!1}),qB(e,{wanted:!1,run:void 0})}var YB=N(48,e=>{gm(e.c,e.am),ZB(e,e.am?.id),QB(e,e.am?.status),$B(e,e.am?.branch),tV(e,e.am?.name),uz(e)}),XB=L(NR),ZB=N(49,e=>{eh(e.c,gH(e)),Fz(e),Mz(e),xB(e),qz(e),Vz(e),Qz(e),Gz(e),Lz(e),Cz(e),XB(e)}),QB=N(53,Vz),$B=N(54,wz),eV=L(PR),tV=N(55,e=>{Tz(e),eV(e)}),nV=YB,rV=N(69,XR),iV=N(13,e=>{Ym(e.c,e.n),Fz(e)}),aV=N(72,hB),oV=L(DR),sV=g(`y49`,e=>P(e.a,`keydown`,e.o&&(t=>{if(t.key===`Escape`&&e.a3===`nav`&&!document.querySelector(`dialog[open]`)&&$(e,`term`),(t.metaKey||t.ctrlKey)&&t.shiftKey&&t.key.toLowerCase()===`d`&&(t.preventDefault(),e.b4()),t.altKey&&(t.key===`[`||t.key===`]`)&&(e.b5?.length??0)>1){t.preventDefault();let n=e.b5.map(e=>e.id);$z(e,n[(Math.max(0,n.indexOf(e.b8))+(t.key===`]`?1:n.length-1))%n.length]),$(e,`term`)}}))),cV=N(14,e=>{Gm(e.c,e.o),dB(e),hB(e),xB(e),Lz(e),pz(e),oV(e),sV(e)}),lV=N(15,hB),uV=N(16,hB),dV=N(81,e=>{Vz(e),zz(e)}),fV=N(83,zz),pV=L(SR),mV=N(17,e=>{Vz(e),pV(e)}),hV=N(18,e=>{Gz(e),tB(e),QR(e)}),gV=N(19,e=>{Km(e.c,e.t),ez(e)}),_V=L(kR),vV=N(20,e=>{nh(e.c,e.u),_V(e)}),yV=N(21),bV=N(22),xV=N(23),SV=N(24,e=>{oz(e),tz(e)}),CV=N(25,nz);function wV(e){return function(){HB(e._,null)}}function TV(e){return function(){e._._.b3()}}function EV(e){return function(){e._._.b2()}}function DV(e){return function(){$(e._._,`term`)}}function OV(e){return function(){e._._.b4()}}function kV(e){return function(t){$z(e._._,t),$(e._._,`term`)}}function AV(e){return function(t){$(e._._,`term`),e._._.bs(e._._.an,t)}}function jV(e){return function(){e._._.bc()}}function MV(e){return function(t){e._._.bq(t)}}function NV(e){return function(t,n){e._._.br(t,n)}}function PV(e){return function(t){e._.y?.(t),e._.s?.(t.id),e._.bd()}}function FV(e){return function(){e._.bd()}}function IV(e){return function(t){e._.z?.(t)}}function LV(e){return function(t){e._.y?.(t)}}function RV(e){return function(){$(e._,`term`)}}function zV(e){return function(){$(e._,`term`)}}function BV(e){return function(t){$z(e._,t),$(e._,`term`)}}function VV(e){return t=>{FB(e._,t)}}function HV(e){return function(t,n){e.br(t.id,n)}}function UV(e){return async(t,n)=>{n=n.trim(),n&&(Xz(e,(e.a0||[]).map(e=>e.id===t?{...e,title:n}:e)),await fetch(`/api/sessions/${t}`,{method:`PATCH`,headers:{"content-type":`application/json`},body:JSON.stringify({title:n})}))}}function WV(e){return t=>(t&&(e.bj=!0),(e.bl??=ct(e.bm))())}function GV(e){return async()=>{let t=e.bj;e.bj=!1;try{let n=`/api/workspaces/${e.an}/sessions`,r=await M(n);!r.length&&t&&e.ar===`active`&&(r=await M(n)),!r.length&&t&&e.ar===`active`&&(await e.bg(e.r||`claude`,!1),r=await M(n).catch(()=>e.a0||[])),Xz(e,r);let i=de(e.an);i&&r.some(e=>e.id===i)&&$z(e,i),e.a0.some(t=>t.id===e.a1)||$z(e,e.a0?.[0]?.id||null)}catch(t){if(Xz(e,e.a0||[]),Ve(t))return;HB(e,String(t.message||t))}}}function KV(e){return function(t,n){e.bd(),e.bs(t,n)}}function qV(e){return async(t,n)=>{if(t===e.an){let r=await e.bg(n,!0);r&&ue(t,r.id);return}try{let r=await M(`/api/workspaces/${t}/sessions`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({agent:n})});ue(t,r.id),e.s?.(t)}catch(t){HB(e,String(t.message||t))}}}function JV(e){return async(t,n)=>{UB(e,!0);try{let r=await M(`/api/workspaces/${e.an}/sessions`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({agent:t})});if(n){let t=e.a0||[];Xz(e,t.some(e=>e.id===r.id)?t:t.concat(r)),$z(e,r.id)}return r}catch(t){return HB(e,String(t.message||t)),null}finally{UB(e,!1)}}}function YV(e){return async t=>{try{await M(`/api/sessions/${t}`,{method:`DELETE`}),Xz(e,(e.a0||[]).filter(e=>e.id!==t)),e.a1===t&&$z(e,e.a0?.[0]?.id||null)}catch(t){HB(e,`Kill session failed: ${String(t.message||t)}`)}}}function XV(e){return()=>{$(e,e.a3===`nav`?`term`:`nav`)}}function ZV(e){return function(t){e.bd(),e.s?.(t)}}function QV(e){return function(t){e.bd(),e.au(t)}}function $V(e){return()=>{e.a3===`new`&&$(e,`term`)}}function eH(e){return()=>{e.a3===`usage`?$(e,`term`):e.az()}}function tH(e){return()=>{e.a3===`manage`?$(e,`term`):e.aw()}}function nH(e){return()=>{e.a3===`diff`?$(e,`term`):e.au()}}function rH(e){return t=>{RB(e,t||``),t&&zB(e,e.ai+1),e.a8(),yB(e,!0),$(e,`diff`)}}function iH(e){return()=>{e.a6||Be(()=>import(`./_B2jdNsMP.js`).then(t=>{TB(e,t.default)}),__vite__mapDeps([0,1,2,3]))}}function aH(e){return()=>{if(e.ac){FB(e,!1);return}FB(e,!0),IB(e,e.ae+1),e.af.focus()}}function oH(){}function sH(e){return()=>{DB(e,!0),$(e,`manage`)}}function cH(e){return()=>{kB(e,!0),$(e,`usage`)}}function lH(e){return function(t){e.bq(t)}}function uH(e){return function(){e.bd(),e.b1()}}function dH(e){return function(){e.a3===`new`?e.bd():e.x?.()}}function fH(e){return function(t,n){e.bd(),e.v?.(t,n)}}function pH(e){return function(t){HB(e,t)}}function mH(e){return t=>{$(e,t)}}function hH(e){return function(t){$z(e,t)}}function gH(e){return function(t){e.bd(),!t||t===e.an?e.b3():e.w?.(t)}}S(`y32`,wV),S(`y45`,TV),S(`y44`,EV),S(`y43`,DV),S(`y42`,OV),S(`y39`,kV),S(`y38`,AV),S(`y46`,jV),S(`y40`,MV),S(`y41`,NV),S(`y37`,PV),S(`y35`,FV),S(`y36`,IV),S(`y33`,LV),S(`y34`,RV),S(`y3`,zV),S(`y2`,BV),S(`y1`,VV),S(`y30`,HV),S(`y18`,UV),S(`y16`,WV),S(`y15`,GV),S(`y28`,KV),S(`y19`,qV),S(`y14`,JV),S(`y17`,YV),S(`y9`,XV),S(`y23`,ZV),S(`y31`,QV),S(`y13`,$V),S(`y8`,eH),S(`y10`,tH),S(`y11`,nH),S(`y5`,rH),S(`y4`,iH),S(`y12`,aH),S(`y0`,oH),S(`y6`,sH),S(`y7`,cH),S(`y29`,lH),S(`y27`,uH),S(`y26`,dH),S(`y24`,fH),S(`y22`,pH),S(`y21`,mH),S(`y20`,hH),S(`y25`,gH);var _H=F(47,e=>E(e.a,e._._.a0),e=>e._._),vH=me(`n23`,` `,` `,_H),yH=e=>{w(e.a),ne(e.a,vH(e)),te(e.a,RU(e)),s(e.a),t(e.a),Ee(e.a),ee(e.a),h(e.a),De(e.a,{})},bH=x(4,e=>SV(e.b,zU(e))),xH=x(5,e=>CV(e.b,BU(e))),SH=F(41,e=>{gV(e.b,e._._.o),bH(e),xH(e)},e=>e._._),CH=e=>{SH(e),wH(e),TH(e),kH(e),AH(e),jH(e),MH(e),NH._(e),PH._(e),JB(e.b),yV(e.b,UU(e)),xV(e.b,HU(e)),uV(e.b,VU(e))},wH=F(42,e=>iV(e.b,e._._.p),e=>e._._),TH=F(43,e=>{mV(e.b,e._._.q?e._._.q?.preferredAgent:`claude`),vV(e.b,e._._.q?e._._.q?.agents:[`claude`])},e=>e._._),EH=b(3,0,2),DH=x(6,e=>{cV(e.b,e._.f===e._._.s),EH(e,e._.f===e._._.s)}),OH=x(7,e=>lV(e.b,e._._.x&&e._.f===e._._.s),2),kH=F(44,e=>{DH(e),OH(e)},e=>e._._),AH=F(45,OH,e=>e._._),jH=F(48,bH,e=>e._._),MH=F(49,e=>{hV(e.b,WU(e)),xH(e)},e=>e._._),NH=c(0,0,e=>nV(e.b,e._.e)),PH=c(0,0,e=>{bV(e.b,GU(e)),DH(e),OH(e)}),FH=u(0,(e=>`<!><!>${e}<!><!><!>`)(fR),(e=>`b%b/${e}&%b%c`)(pR),CH),IH=N(4,e=>{BH(e,e.e?.id),FH(e,+!e.e),NH(e)}),LH=x(3,e=>IH(e,e._.o.find(t=>t.id===e.c))),RH=ge(4,LH),zH=RH,BH=N(5,PH),VH=N(2,LH),HH=(e,t)=>VH(e,t[0]),UH=x(1,e=>Ls(e.a,KU(e))),WH=x(2,e=>Is(e.a,qU(e)),2),GH=c(3,0,e=>{Ns(e.a,e._.o),UH(e),WH(e)}),KH=e=>{GH._(e),qH._(e),JH._(e),Ts(e.a),zs(e.a,JU(e))},qH=c(3,0,WH),JH=c(3,0,e=>{UH(e),WH(e)}),YH=c(2,0,e=>ui(e.a,e._.o)),XH=e=>{YH._(e),ZH._(e),QH._(e),$H._(e),tU._(e),nU._(e),rU._(e),ai(e.a),$r(e.a,ZU(e)),bi(e.a,XU(e)),Mr(e.a,YU(e)),Gr(e.a),Kr(e.a)},ZH=c(2,0,e=>ki(e.a,e._.p)),QH=c(2,0,e=>Qr(e.a,e._.q)),$H=c(2,0,e=>pi(e.a,e._.s)),eU=x(1,e=>Ei(e.a,!e._.z&&e._.ad)),tU=c(2,0,e=>{jr(e.a,e._.z),eU(e)}),nU=c(2,0,e=>{xi(e.a,tW(e)),mi(e.a,eW(e)),gi(e.a,$U(e)),hi(e.a,QU(e))}),rU=c(2,0,eU),iU=g(`n25`,e=>n(e,{onMount:function(){let t=new AbortController,n=t.signal,r={abort:t,statusStale:!1,statusDebounce:void 0};ce(e.m),pt(n);let i=(t,n)=>{n&&(it(t,n),ue(t,n)),e.a9(t)},a=new URLSearchParams(location.search);a.get(`ws`)&&(i(a.get(`ws`),a.get(`session`)),history.replaceState(null,``,`/`)),ie()&&document.addEventListener(`click`,e=>{let t=e.target?.closest?.(`a[target="_blank"][href^="http"]`);t&&(e.preventDefault(),se(t.href))},{capture:!0,signal:n}),navigator.serviceWorker?.addEventListener(`message`,e=>{e.data?.type===`open-session`&&i(e.data.workspaceId,e.data.sessionId)},{signal:n});let o=()=>{if(document.hidden){r.statusStale=!0;return}r.statusStale=!1,e.a8()};document.addEventListener(`visibilitychange`,()=>{document.hidden||(r.statusStale=!1,e.a8(!0))},{signal:n}),o(),T().addEventListener(`workspaces.changed`,t=>{let n=t.data;Array.isArray(n)?e.a1(n):e.a2(),o()},{signal:n}),T().addEventListener(`sessions.changed`,t=>{let n=t.data;if(n?.workspaceId&&Array.isArray(n.sessions)){e.a3(n.workspaceId,n.sessions),r.statusStale=!1;return}clearTimeout(r.statusDebounce),r.statusDebounce=setTimeout(o,300)},{signal:n}),T().addEventListener(`status.changed`,t=>{let n=t.data;n&&(yU(e,{...e.p,...n}),r.statusStale=!1)},{signal:n});let s=window.visualViewport;if(s){let e=()=>{let e=Math.abs(s.height-window.innerHeight)<1;document.documentElement.style.setProperty(`--app-height`,e?``:`${Math.round(s.height)}px`),e||window.scrollTo(0,0)};s.addEventListener(`resize`,e,{signal:n}),s.addEventListener(`scroll`,e,{signal:n}),document.addEventListener(`visibilitychange`,()=>{document.hidden||e()},{signal:n}),window.addEventListener(`pageshow`,e,{signal:n}),window.addEventListener(`focus`,e,{signal:n})}return r},onDestroy:function(){this.abort.abort(),clearTimeout(this.statusDebounce)}})),aU=x(36,iU,6),oU=L(MH),sU=N(35,e=>{aU(e),nU(e),JH(e),oU(e)}),cU=x(21,e=>sU(e,nW(e))),lU=u(2,(e=>`<!>${e}`)(Xt),(e=>`b/${e}&`)(Zt),XH),uU=x(40,e=>lU(e,e.z||e.ad?0:1)),dU=N(39,e=>{uU(e),rU(e)}),fU=x(38,e=>dU(e,!e.x&&!e.ab)),pU=N(37,fU),mU=x(19,e=>pU(e,e.o.find(t=>t.id===e.s))),hU=L(SH),gU=C(14,e=>{cU(e),mU(e),YH(e),GH(e),RH(e),hU(e)}),_U=N(29,aU),vU=L(wH),yU=C(15,e=>{_U(e,rW(e)),aU(e),ZH(e),vU(e)}),bU=L(TH),xU=C(16,e=>{QH(e),bU(e)}),SU=R(4,`<!><!><!>`,`b%`,zH,HH),CU=N(28,aU),wU=L(jH),TU=N(27,e=>{CU(e,iW(e)),aU(e),qH(e),wU(e)}),EU=x(22,e=>TU(e,aW(e))),DU=C(20,e=>{SU(e,[e.u,e=>e]),EU(e),cU(e)}),OU=u(3,ao,(e=>`/${e}&`)(oo),KH),kU=x(24,e=>OU(e,e.x&&!e.s?0:1)),AU=L(kH),jU=C(18,e=>{DU(e,e.s?[e.s]:[]),EU(e),mU(e),kU(e),$H(e),AU(e)}),MU=L(AH),NU=C(23,e=>{fU(e),kU(e),MU(e)}),PU=C(25,e=>{uU(e),tU(e)}),FU=u(1,d,(e=>`/${e}&`)(y),yH),IU=L(_H),LU=C(26,e=>{FU(e,+!e.a0),IU(e)});g(`n24`,e=>P(e.a,`keydown`,function(t){if((t.metaKey||t.ctrlKey)&&t.key===`k`&&(t.preventDefault(),PU(e,!e.z)),(t.metaKey||t.ctrlKey)&&!t.shiftKey&&!t.altKey&&t.key>=`1`&&t.key<=`9`){let n=e.o.filter(e=>e.status===`active`)[Number(t.key)-1];n&&(t.preventDefault(),e.a9(n.id))}}));function RU(e){return function(){LU(e._,null)}}function zU(e){return function(t){e._._.a1(e._._.o.map(e=>e.id===t.id?t:e))}}function BU(e){return function(t){e._._.o.some(e=>e.id===t.id)||gU(e._._,[t,...e._._.o]),NU(e._._,!1),e._._.a9(t.id)}}function VU(e){return function(){NU(e._._,!1)}}function HU(e){return function(){NU(e._._,!0)}}function UU(e){return function(t,n){it(t,n),ue(t,n),e._._.a9(t)}}function WU(e){return function(t){e._._.a9(t)}}function GU(e){return function(t){let n=t||e._.f;ot(n),e._._.a9(n)}}function KU(e){return function(t){e._.o.some(e=>e.id===t.id)||gU(e._,[t,...e._.o]),NU(e._,!1),e._.a9(t.id)}}function qU(e){return function(t){e._.a1(e._.o.map(e=>e.id===t.id?t:e)),NU(e._,!1),e._.a9(t.id)}}function JU(e){return function(){NU(e._,!1)}}function YU(e){return t=>{PU(e._,t)}}function XU(e){return function(){NU(e._,!0),PU(e._,!1)}}function ZU(e){return function(t){xU(e._,t)}}function QU(e){return function(t){NU(e._,!1),PU(e._,!1),ot(t.id),e._.a9(t.id)}}function $U(e){return function(t,n){PU(e._,!1),M(`/api/workspaces/${t.id}/sessions`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({agent:n})}).then(n=>{it(t.id,n.id),e._.a9(t.id)}).catch(t=>{LU(e._,`New session failed: ${String(t.message||t)}`)})}}function eW(e){return function(t){nt(t.id),e._.a9(t.id)}}function tW(e){return function(t){e._.a9(t.id)}}function nW(e){return async t=>{e.o.find(e=>e.id===t)?.status===`archived`&&(await M(`/api/workspaces/${t}`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({action:`restore`})}).catch(()=>{}),gU(e,e.o.map(e=>e.id===t?{...e,status:`active`}:e))),jU(e,t),NU(e,!1),PU(e,!1),e.u.includes(t)||DU(e,e.u.concat(t)),Ie(t)}}function rW(e){return(t,n)=>{let r=e.p[t];if(!r)return;let i=n.map(e=>e.state).filter(e=>!!e?.alive);yU(e,{...e.p,[t]:{...r,sessions:n.map(e=>({id:e.id,agent:e.agent,title:e.title,state:e.state||{alive:!1}})),agents:i.length,working:i.filter(e=>e.phase===`working`).length,waiting:i.filter(e=>e.phase===`waiting`).length}})}}function iW(e){return async()=>{try{e.a1(await M(`/api/workspaces`))}catch(t){if(Ve(t))return;LU(e,`Loading workspaces failed: ${t.message||String(t)}`)}}}function aW(e){return t=>{gU(e,t);let n=new Set(t.filter(e=>e.status===`active`).map(e=>e.id));DU(e,e.u.filter(e=>n.has(e))),e.s&&!n.has(e.s)&&(jU(e,e.u[e.u?.length-1]||null),Ie(e.s))}}function oW(e){return(t=!1)=>(e.a5||=t,(e.a6??=ct(async()=>{let t=e.a5;e.a5=!1;try{yU(e,await M(`/api/status${t?`?fresh`:``}`))}catch(e){if(!Ve(e))throw e}}))())}S(`n5`,RU),S(`n19`,zU),S(`n22`,BU),S(`n21`,VU),S(`n20`,HU),S(`n17`,UU),S(`n16`,WU),S(`n18`,GU),S(`n14`,KU),S(`n15`,qU),S(`n13`,JU),S(`n12`,YU),S(`n11`,XU),S(`n6`,ZU),S(`n10`,QU),S(`n9`,$U),S(`n8`,eW),S(`n7`,tW),S(`n4`,nW),S(`n2`,rW),S(`n1`,iW),S(`n0`,aW),S(`n3`,oW);var sW=(e,t,n)=>{for(;n;){if(n.O?.i)return(n.J||=[]).push(e,t);n=n.N}};Le(e=>(t,n=v.has(t))=>{if(n||oe.has(t)){let e=0,r,i,a;for(;e<t.length;)r=t[e++],i=t[e++],(a=i.F)?.H!==0&&!(n&&sW(r,i,a))&&r(i)}else e(t)},e=>t=>{try{let n=t.b.F;for(;n;){if(n.W)return t.f=1,n.W.push(t);n=n.N}t.f=0,e(t)}catch(e){fe(t.b,e)}});var cW=e=>I(e.a,`_b`),lW=(e,t)=>E(e.b,t instanceof Error?t.message:String(t));me(`b1`,`<div><p> </p></div>`,` E `,cW,(e,t)=>lW(e,t[0])),me(`b0`,`<div><span></span>Loading workspaces…</div>`,` D `,e=>{I(e.a,`_b`),I(e.b,`_w`)}),p();
|