@dylanpiercey/work 0.0.23 → 0.0.24
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/index.mjs +4 -4
- package/dist/public/assets/{_EvlrXhbk.js → _-PHnfq4a.js} +2 -2
- package/dist/public/assets/{_EvlrXhbk.js.map → _-PHnfq4a.js.map} +1 -1
- package/dist/public/assets/{_D7G7VxOT2.js → _1ekz7WZH2.js} +2 -2
- package/dist/public/assets/{_D7G7VxOT2.js.map → _1ekz7WZH2.js.map} +1 -1
- package/dist/public/assets/{_CEIEA3ep2.js → _4hF1nRbz2.js} +2 -2
- package/dist/public/assets/{_CEIEA3ep2.js.map → _4hF1nRbz2.js.map} +1 -1
- package/dist/public/assets/{_BETbcidE.js → _5m9S-EqP.js} +2 -2
- package/dist/public/assets/{_BETbcidE.js.map → _5m9S-EqP.js.map} +1 -1
- package/dist/public/assets/{_CpKSyXc-.js → _9xw8jbbj.js} +2 -2
- package/dist/public/assets/{_CpKSyXc-.js.map → _9xw8jbbj.js.map} +1 -1
- package/dist/public/assets/{_BFlxNucX.js → _B188UjZf.js} +2 -2
- package/dist/public/assets/{_BFlxNucX.js.map → _B188UjZf.js.map} +1 -1
- package/dist/public/assets/{_zSpkIZIf.js → _B3VJsccP.js} +2 -2
- package/dist/public/assets/{_zSpkIZIf.js.map → _B3VJsccP.js.map} +1 -1
- package/dist/public/assets/{_BUJEC41U.js → _BB-k_pmY.js} +2 -2
- package/dist/public/assets/{_BUJEC41U.js.map → _BB-k_pmY.js.map} +1 -1
- package/dist/public/assets/{_C0Mb2VcL.js → _BCxZLbx3.js} +2 -2
- package/dist/public/assets/{_C0Mb2VcL.js.map → _BCxZLbx3.js.map} +1 -1
- package/dist/public/assets/{_DIRjHwSF.js → _BD5amGrQ.js} +2 -2
- package/dist/public/assets/{_DIRjHwSF.js.map → _BD5amGrQ.js.map} +1 -1
- package/dist/public/assets/{_DPCPAr2n.js → _BLtivKRU.js} +2 -2
- package/dist/public/assets/{_DPCPAr2n.js.map → _BLtivKRU.js.map} +1 -1
- package/dist/public/assets/{_3kCHjcbq2.js → _BNo-u1xU2.js} +2 -2
- package/dist/public/assets/{_3kCHjcbq2.js.map → _BNo-u1xU2.js.map} +1 -1
- package/dist/public/assets/{_hISQM_VO.js → _BO7vkzOE.js} +2 -2
- package/dist/public/assets/{_hISQM_VO.js.map → _BO7vkzOE.js.map} +1 -1
- package/dist/public/assets/{_iBei63n02.js → _BUvwthbH2.js} +2 -2
- package/dist/public/assets/{_iBei63n02.js.map → _BUvwthbH2.js.map} +1 -1
- package/dist/public/assets/{_RnK9hNYz2.js → _BV_gjARS2.js} +2 -2
- package/dist/public/assets/{_RnK9hNYz2.js.map → _BV_gjARS2.js.map} +1 -1
- package/dist/public/assets/{_ZKXMh2Tt2.js → _B_w1CUT_2.js} +2 -2
- package/dist/public/assets/{_ZKXMh2Tt2.js.map → _B_w1CUT_2.js.map} +1 -1
- package/dist/public/assets/{_gmz8tY8_.js → _BmHD_PQz.js} +2 -2
- package/dist/public/assets/{_gmz8tY8_.js.map → _BmHD_PQz.js.map} +1 -1
- package/dist/public/assets/{_DMsB9L9v.js → _BtLeIMtD.js} +2 -2
- package/dist/public/assets/{_DMsB9L9v.js.map → _BtLeIMtD.js.map} +1 -1
- package/dist/public/assets/{_tpLKr6cN.js → _BtgxAMFg.js} +2 -2
- package/dist/public/assets/{_tpLKr6cN.js.map → _BtgxAMFg.js.map} +1 -1
- package/dist/public/assets/{_neTzmpuG.js → _BwD36Jxt.js} +2 -2
- package/dist/public/assets/{_neTzmpuG.js.map → _BwD36Jxt.js.map} +1 -1
- package/dist/public/assets/{_DFGsDSnY2.js → _ByTPjRw62.js} +2 -2
- package/dist/public/assets/{_DFGsDSnY2.js.map → _ByTPjRw62.js.map} +1 -1
- package/dist/public/assets/{_TU1mBzaU.js → _C-rQpLhV.js} +2 -2
- package/dist/public/assets/{_TU1mBzaU.js.map → _C-rQpLhV.js.map} +1 -1
- package/dist/public/assets/{_DXaWF80G2.js → _C1Q5Y-qX2.js} +2 -2
- package/dist/public/assets/{_DXaWF80G2.js.map → _C1Q5Y-qX2.js.map} +1 -1
- package/dist/public/assets/{_R8c16EMU.js → _C3ojQhq_.js} +2 -2
- package/dist/public/assets/{_R8c16EMU.js.map → _C3ojQhq_.js.map} +1 -1
- package/dist/public/assets/{_X-KO8p5S.js → _CEKQC0zT.js} +2 -2
- package/dist/public/assets/{_X-KO8p5S.js.map → _CEKQC0zT.js.map} +1 -1
- package/dist/public/assets/{__Jb3rACh2.js → _CG70dRIO2.js} +2 -2
- package/dist/public/assets/{__Jb3rACh2.js.map → _CG70dRIO2.js.map} +1 -1
- package/dist/public/assets/{_Di-YLGzT2.js → _CIsBeTH02.js} +2 -2
- package/dist/public/assets/{_Di-YLGzT2.js.map → _CIsBeTH02.js.map} +1 -1
- package/dist/public/assets/{_BwcmCe3s2.js → _CLIa1YQd2.js} +2 -2
- package/dist/public/assets/{_BwcmCe3s2.js.map → _CLIa1YQd2.js.map} +1 -1
- package/dist/public/assets/{_f7tCreYA2.js → _CMTwhWsT2.js} +2 -2
- package/dist/public/assets/{_f7tCreYA2.js.map → _CMTwhWsT2.js.map} +1 -1
- package/dist/public/assets/{_pLH8IrZs.js → _COiMaMJZ.js} +2 -2
- package/dist/public/assets/{_pLH8IrZs.js.map → _COiMaMJZ.js.map} +1 -1
- package/dist/public/assets/{_BBMJRHpW2.js → _CRki4AYt2.js} +2 -2
- package/dist/public/assets/{_BBMJRHpW2.js.map → _CRki4AYt2.js.map} +1 -1
- package/dist/public/assets/{_CryOUQWa.js → _CT_4g0KI.js} +2 -2
- package/dist/public/assets/{_CryOUQWa.js.map → _CT_4g0KI.js.map} +1 -1
- package/dist/public/assets/{_COfQsLkO2.js → _CVaw8Um22.js} +2 -2
- package/dist/public/assets/{_COfQsLkO2.js.map → _CVaw8Um22.js.map} +1 -1
- package/dist/public/assets/{_BdquJqIK.js → _CZnxQQgK.js} +2 -2
- package/dist/public/assets/{_BdquJqIK.js.map → _CZnxQQgK.js.map} +1 -1
- package/dist/public/assets/{_CQAlIUsH.js → _CfAVvRJH.js} +2 -2
- package/dist/public/assets/{_CQAlIUsH.js.map → _CfAVvRJH.js.map} +1 -1
- package/dist/public/assets/{_Fj4bovY5.js → _Cfo3E_wG.js} +2 -2
- package/dist/public/assets/{_Fj4bovY5.js.map → _Cfo3E_wG.js.map} +1 -1
- package/dist/public/assets/{_DvHrD9Fu.js → _Ch8Be5o8.js} +2 -2
- package/dist/public/assets/{_DvHrD9Fu.js.map → _Ch8Be5o8.js.map} +1 -1
- package/dist/public/assets/{_BZi1ECCN2.js → _CleGVtQz2.js} +2 -2
- package/dist/public/assets/{_BZi1ECCN2.js.map → _CleGVtQz2.js.map} +1 -1
- package/dist/public/assets/{_DSVLtY7p2.js → _CnKTlQqQ2.js} +2 -2
- package/dist/public/assets/{_DSVLtY7p2.js.map → _CnKTlQqQ2.js.map} +1 -1
- package/dist/public/assets/{_DM9HoTb6.js → _Co9z77Nx.js} +2 -2
- package/dist/public/assets/{_DM9HoTb6.js.map → _Co9z77Nx.js.map} +1 -1
- package/dist/public/assets/{_BKl_tugb2.js → _Cow3qpju2.js} +2 -2
- package/dist/public/assets/{_BKl_tugb2.js.map → _Cow3qpju2.js.map} +1 -1
- package/dist/public/assets/{_CvFGNDic.js → _D0fCsOyy.js} +2 -2
- package/dist/public/assets/{_CvFGNDic.js.map → _D0fCsOyy.js.map} +1 -1
- package/dist/public/assets/{_N0sGQTbG.js → _D3xYfaOf.js} +2 -2
- package/dist/public/assets/{_N0sGQTbG.js.map → _D3xYfaOf.js.map} +1 -1
- package/dist/public/assets/{_BDH5DRhl.js → _DNzHuu0T.js} +2 -2
- package/dist/public/assets/{_BDH5DRhl.js.map → _DNzHuu0T.js.map} +1 -1
- package/dist/public/assets/{_W6bV3Bg-.js → _DUq73rvH.js} +2 -2
- package/dist/public/assets/{_W6bV3Bg-.js.map → _DUq73rvH.js.map} +1 -1
- package/dist/public/assets/{_BxtE0n7j.js → _DY1svXxJ.js} +2 -2
- package/dist/public/assets/{_BxtE0n7j.js.map → _DY1svXxJ.js.map} +1 -1
- package/dist/public/assets/{_BZXlp_i6.js → _DYh4cJsz.js} +2 -2
- package/dist/public/assets/{_BZXlp_i6.js.map → _DYh4cJsz.js.map} +1 -1
- package/dist/public/assets/{_BIa4GhFA.js → _DlvFdJCo.js} +2 -2
- package/dist/public/assets/{_BIa4GhFA.js.map → _DlvFdJCo.js.map} +1 -1
- package/dist/public/assets/{_B9Irhi-K.js → _DnzEKJPD.js} +2 -2
- package/dist/public/assets/{_B9Irhi-K.js.map → _DnzEKJPD.js.map} +1 -1
- package/dist/public/assets/{_Ck3cW4fo.js → _DuEDhE7_.js} +2 -2
- package/dist/public/assets/{_Ck3cW4fo.js.map → _DuEDhE7_.js.map} +1 -1
- package/dist/public/assets/{_DPzN_k3h2.js → _DuSeBQp62.js} +2 -2
- package/dist/public/assets/{_DPzN_k3h2.js.map → _DuSeBQp62.js.map} +1 -1
- package/dist/public/assets/{_BVd4uTiE.js → _Dvw8-jm8.js} +2 -2
- package/dist/public/assets/{_BVd4uTiE.js.map → _Dvw8-jm8.js.map} +1 -1
- package/dist/public/assets/{_EcnhZ-Zb.js → _DxpMxX_U.js} +2 -2
- package/dist/public/assets/{_EcnhZ-Zb.js.map → _DxpMxX_U.js.map} +1 -1
- package/dist/public/assets/{_DbjjwNMJ.js → _DxpiV80x.js} +2 -2
- package/dist/public/assets/{_DbjjwNMJ.js.map → _DxpiV80x.js.map} +1 -1
- package/dist/public/assets/{_DDkTpbnp.js → _DyPhwgp5.js} +2 -2
- package/dist/public/assets/{_DDkTpbnp.js.map → _DyPhwgp5.js.map} +1 -1
- package/dist/public/assets/{_bsvRRwZw.js → _DzZk65e-.js} +2 -2
- package/dist/public/assets/{_bsvRRwZw.js.map → _DzZk65e-.js.map} +1 -1
- package/dist/public/assets/{_BOk-H2vI.js → _IMDOu8ab.js} +2 -2
- package/dist/public/assets/{_BOk-H2vI.js.map → _IMDOu8ab.js.map} +1 -1
- package/dist/public/assets/{_uw9JGYrH.js → _L4EiQqOc.js} +2 -2
- package/dist/public/assets/{_uw9JGYrH.js.map → _L4EiQqOc.js.map} +1 -1
- package/dist/public/assets/{_DZDs2rZG.js → _MoGAjrcU.js} +2 -2
- package/dist/public/assets/{_DZDs2rZG.js.map → _MoGAjrcU.js.map} +1 -1
- package/dist/public/assets/{_nqYjkgOI2.js → _Oze5lLxj2.js} +2 -2
- package/dist/public/assets/{_nqYjkgOI2.js.map → _Oze5lLxj2.js.map} +1 -1
- package/dist/public/assets/{_H3THB0QM.js → _QYUGbx7I.js} +2 -2
- package/dist/public/assets/{_H3THB0QM.js.map → _QYUGbx7I.js.map} +1 -1
- package/dist/public/assets/{_iGURufnd.js → _RlilnCgQ.js} +2 -2
- package/dist/public/assets/{_iGURufnd.js.map → _RlilnCgQ.js.map} +1 -1
- package/dist/public/assets/{_l3il9fbj2.js → _SgPPrTlV2.js} +2 -2
- package/dist/public/assets/{_l3il9fbj2.js.map → _SgPPrTlV2.js.map} +1 -1
- package/dist/public/assets/{_D68sBB9M.js → _U0FwxsZW.js} +2 -2
- package/dist/public/assets/{_D68sBB9M.js.map → _U0FwxsZW.js.map} +1 -1
- package/dist/public/assets/{_EbANNtLE.js → _VD6oOoMX.js} +2 -2
- package/dist/public/assets/{_EbANNtLE.js.map → _VD6oOoMX.js.map} +1 -1
- package/dist/public/assets/{_BNAm8vGo.js → _h0ukKclW.js} +2 -2
- package/dist/public/assets/{_BNAm8vGo.js.map → _h0ukKclW.js.map} +1 -1
- package/dist/public/assets/{_0vMHm-vn.js → _nefOiZv8.js} +2 -2
- package/dist/public/assets/{_0vMHm-vn.js.map → _nefOiZv8.js.map} +1 -1
- package/dist/public/assets/{_BuDEoDsw.js → _oJGy-rnh.js} +2 -2
- package/dist/public/assets/{_BuDEoDsw.js.map → _oJGy-rnh.js.map} +1 -1
- package/dist/public/assets/{_Dg6disZS.js → _qvuZuJzY.js} +2 -2
- package/dist/public/assets/{_Dg6disZS.js.map → _qvuZuJzY.js.map} +1 -1
- package/dist/public/assets/{_CYYkpc6O2.js → _vUbaa6R_2.js} +2 -2
- package/dist/public/assets/{_CYYkpc6O2.js.map → _vUbaa6R_2.js.map} +1 -1
- package/dist/public/assets/{_Ca-yxP452.js → _vpBiEKFg2.js} +2 -2
- package/dist/public/assets/{_Ca-yxP452.js.map → _vpBiEKFg2.js.map} +1 -1
- package/dist/public/assets/{_UPKxbAis2.js → _xSxIYOF32.js} +2 -2
- package/dist/public/assets/{_UPKxbAis2.js.map → _xSxIYOF32.js.map} +1 -1
- package/dist/public/assets/{_Cl4Juxka2.js → _yyKj-WvW2.js} +2 -2
- package/dist/public/assets/{_Cl4Juxka2.js.map → _yyKj-WvW2.js.map} +1 -1
- package/dist/public/assets/{_8A9cS7sg.js → _z_rEl9X7.js} +2 -2
- package/dist/public/assets/{_8A9cS7sg.js.map → _z_rEl9X7.js.map} +1 -1
- package/dist/public/assets/{index-KetIC6bX.js → index-BzkRLVQ8.js} +7 -7
- package/dist/public/assets/index-BzkRLVQ8.js.map +1 -0
- package/package.json +1 -1
- package/dist/public/assets/index-KetIC6bX.js.map +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/
|
|
2
|
-
var e=Object.defineProperty,t=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],enumerable:!0});return n||e(r,Symbol.toStringTag,{value:`Module`}),r},n=/[\\;]/g,r=e=>e===`;`?`\\3B `:`\\\\`,i=function e(t,n,r){let i=``,a=``,o;if(t){if(typeof t!=`object`)i+=t;else if(Array.isArray(t))for(let s of t)o=e(s,n,r),o&&(i+=a+o,a=n);else for(let e in t)o=r(e,t[e]),o&&(i+=a+o,a=n)}return i},a=e=>(e+(e<26?10:e<962?334:11998)).toString(36),o,s,c=2,l=[],u=[],d=(e=>{for(let t=0;t<e.length;)e[t++](e[t++])}),f=e=>{(!o||e.b.F?.H!==0)&&e.c(e.b,e.d)},p,m=(e,t)=>t[1+e]||=(document.addEventListener(e,t,!0),1),h={},g=1e6,_,v=function e(t){t.H=0,t.D?.forEach(e),t.B?.forEach(Pe)},y,b,x=(e,t)=>e.T?.(t),S=new WeakMap,C,ee=function e(t,n,r){let i,o,s=0,c=0;for(;t<n.length;)if(i=n.charCodeAt(t++),o=s,s=0,i===32)r[a(c++)]=C;else if(i===37||i===49)C.replaceWith(C=r[a(c++)]=new Text),i===49&&(r[a(c++)]=Me());else if(i===38)return t;else if(i===47||i===48)t=e(t,n,r[a(c++)]=je(r.$,r.F)),i===48&&(r[a(c++)]=Me());else if(i<92)for(i=25*o+i-67;i--;)te();else if(i<107)for(i=10*o+i-97;i--;)ne();else if(i<117){for(i=10*o+i-107;i--;)C=C.parentNode||C;ne()}else s=o*10+i-117},te=()=>{if(C.firstChild)return C=C.firstChild;for(;!C.nextSibling&&C.parentNode;)C=C.parentNode;ne()},ne=()=>C=C.nextSibling||C,w={},re,ie,ae,oe,se={},T=/[\p{L}\p{N}]/gu,E=``,D={},ce={},O=ye((e,...t)=>{e=a(e);let n=`D`+e,r=[],i=0;for(;i<t.length;)r.push(ot(``,t[i++],t[i++],t[i++])());return(t,i)=>{i!==(t[n]??(t[`A`+e]&&0))&&Wt(t,e,r[t[n]=i],it)}}),le=ye((e,t,n)=>{e=a(e),t!==void 0&&(t=a(t)),n!==void 0&&(n=a(n));let r=`A`+e;return(i,a)=>{let o=i[e],s=o.nodeType===1,c=s?o:o.parentNode,l=i[r];l||(l=i[r]={},l.S=s?c.firstChild:i[t],l.K=s?c.lastChild:n===void 0?o.previousSibling:i[n]);let u=l.S;if(l.L&&u===l.K&&u.tagName===`T`){let e=u;e.firstChild||e.appendChild(new Text),l=i[r]={},l.S=u=e.firstChild,l.K=e.lastChild,e.replaceWith(...e.childNodes)}let d=s?!!c.firstChild:u.parentNode===c;a?d||Le(l,c,s?null:o):d&&(s&&(l.S=c.firstChild,l.K=c.lastChild),Re(l))}}),ue=ye((e,t,n,r)=>{e=a(e);let i=`A`+e,o=`D`+e;return(a,s,c)=>{let l=ve(s);if(a[o]!==(a[o]=l?.a||l)||t&&!(l||a[i])){if(Wt(a,e,l||(t?t(a):void 0),Gt),n&&(a[i].T=e=>n()(a,e)),typeof l==`string`){if(t){let e=t(a);Wt(a[i],`a`,e,it),e.f&&Ke(e.e,e.f,a[i].Aa)}}else l?.f&&Ke(l.e,l.f,a[i])}if(l){let e=a[i],n=c?.();if(typeof l==`string`)(t?pt:mt)(e,`a`,(r?n[0]:n)||{},ce[e.a.tagName]),(e.Ia||e.Ea)&&Se(e,Ut);else{for(let t in l.g)l.g[t](e,l.h[t]);if(l.d){if(r)l.d(e,l._?n[0]:n);else{let r=t?{...n,content:t(a)}:n||{};l.d(e,l._?r:[r])}}}}}}),de=ye(e=>{e=a(e);let t=`A`+e,n=`D`+e;return(r,i)=>{if(r[n]!==(r[n]=i?.a||i)&&(Wt(r,e,i,it),i?.f&&Ke(i.e,i.f,r[t])),i)for(let e in i.g)i.g[e](r[t],i.h[e])}}),k=ye(e=>(t,n,r,i,o)=>{t=a(t);let s=`A`+t,c=`O`+t,l=ot(``,n,r,i)();return(n,r)=>{let i=n[t],a=ke(n[s]),u=n[s]=[];n[c]=null;let d=a.length,f=i.nodeType>1?i.parentNode||a[0]?.S.parentNode:i,p,m,h=0;e(r,(e,t)=>{let r=u.length,i=a[r],s=d&&(p||e!==(i?.M??r)?(p||=a.reduce((e,t,n)=>n<r?e:(t.I=n,e.set(t.M??n,t)),new Map)).get(e):i&&(h++,i));s?(m=!0,p?.delete(e)):s=it(n.$,l,n,f),s.M=e,u.push(s),o?.(s,t)});let g=u.length,_=i!==f,v=null,y=d-1,b=g-1;if(_&&(d?(v=a[y].K.nextSibling,g||f.insertBefore(i,v)):g&&(v=i.nextSibling,i.remove())),!m){d&&(a.forEach(_?Ie:Ne),_||(f.textContent=``));for(let e of u)Le(e,f,v);return}if(p)p.forEach(Ie);else for(let e=g;e<d;e++)Ie(a[e]);for(;y>=h&&b>=h&&a[y]===u[b];)y--,b--;if(y+1<d&&(v=a[y+1].S),h>y||h>b){for(let e=h;e<=b;e++)Le(u[e],f,v);return}let x=b-h+1,S=Array(x),C=Array(x),ee=[],te=-1,ne,w,re;for(let e=x;e--;)S[e]=u[h+e].I??-1;for(let e=0;e<x;e++)if(~S[e]){if(te<0||S[ee[te]]<S[e])~te&&(C[e]=ee[te]),ee[++te]=e;else{for(ne=0,w=te;ne<w;)re=(ne+w)/2|0,S[ee[re]]<S[e]?ne=re+1:w=re;S[e]<S[ee[ne]]&&(ne>0&&(C[e]=ee[ne-1]),ee[ne]=e)}}for(w=ee[te],ne=te+1;ne-->0;)ee[ne]=w,w=C[w];for(let e=x;e--;)~te&&e===ee[te]?te--:Le(u[h+e],f,v),v=u[h+e].S}})(([e,t],n)=>{t||=Kt,typeof t==`string`?be(e,(e,r)=>n(e[t],[e,r])):be(e,(e,r)=>n(t(e,r),[e,r]))});function fe(e,t){return t?e:``}function pe(e,t){return t||t===0?me(e)+`:`+me(t+``):``}function me(e){return n.test(e)?e.replace(n,r):e}function he(e){return/^on[A-Z-]/.test(e)}function ge(e){return e[2]===`-`?e.slice(3):e.slice(2).toLowerCase()}function _e(e){return e!=null&&e!==!1}function ve(e){if(e){if(typeof e==`string`)return e;let t=e.content||e.default||e;if(`a`in t)return t}}function ye(e){return o=1,e}function be(e,t){if(e){let n=0;for(let r of e)t(r,n++)}}function xe(e,t,n,r,i=e.L){let a;if(n>=0&&(a=e[n])){if(a.d=r,a.e===c||p&&a.f)return;a.e=c}else a={a:i*1e6+n,b:e,c:t,d:r,e:c},n>=0&&(e[n]=a);eee(a)}function eee(e){let t=u.push(e)-1;for(;t;){let n=t-1>>1,r=u[n];if(e.a-r.a>=0)break;u[t]=r,t=n}u[t]=e}function Se(e,t){l.push(t,e)}function Ce(){let e=l;try{s=1,we()}finally{c++,s=0,u=[],l=[]}d(e)}function we(){for(;u.length;){let e=u[0],t=u.pop();if(e!==t){let e=0,n=u.length>>1,r=(u[0]=t).a;for(;e<n;){let t=(e<<1)+1,n=t+1;if(n<u.length&&u[n].a-u[t].a<0&&(t=n),u[t].a-r>=0)break;u[e]=u[t],e=t}u[e]=t}f(e)}}function Te(e,t){let n=e.A?.[t];n&&(e.A[t]=void 0,s?Se(n,Oe):Oe(n))}function Ee(e,t){return De(e),((e.A||={})[t]||=new AbortController).signal}function De(e,t){let n=e.F;n&&(n.B||=new Set).add(e),t&&(e.Z||=[]).push(t)}function Oe(e){e.abort()}function ke(e){return e?Array.isArray(e)?e:[e]:[]}function tee(e,t){if(e){if(Array.isArray(e))for(let n of e)t(n);else t(e)}}function nee(e,t){return e?Array.isArray(e)?(e.push(t),e):[e,t]:t}function A(e,t,n){e[1+t]===void 0&&m(t,Ae),e[1+t]=n||null}function Ae(e){let t=!s&&e.target;for(;t;)t[1+e.type]?.(e,t),t=e.bubbles&&!e.cancelBubble&&t.parentNode}function ree(e,t){let n=h[t]||=document.createElementNS(t,`template`);return n.innerHTML=e,n.content||n}function je(e,t){let n={L:g++,H:c,F:t,$:e};return _?.push(n),n}function Me(){return g++}function Ne(e){e.N?.D?.delete(e),v(e)}function Pe(e){e.Z?.forEach(Fe,e);for(let t in e.A)Te(e,t)}function Fe(e){e.delete(this)}function Ie(e){Ne(e),St(e.S,e.K)}function Le(e,t,n){Ct(t,n,e.S,e.K)}function Re(e){let t=new DocumentFragment;t.namespaceURI=e.S.parentNode.namespaceURI,Ct(t,null,e.S,e.K)}function ze(){y||(y=1,queueMicrotask(Be))}function Be(){requestAnimationFrame(iee),Ce()}function iee(){b||(b=new MessageChannel,b.port1.onmessage=()=>{y=0,Ce()}),b.port2.postMessage(0)}function j(e,t){let n=a(e);return(r,i)=>(s?r.H===c&&(r[n]=i,t?.(r)):(r[n]!==i||!(n in r))&&(r[n]=i,t)&&(ze(),xe(r,t,e)),i)}function Ve(e,t){let n=a(e),r=a(e+1),i=j(e,t);return(e,a,o)=>(s?(e[r]=o)&&(e[n]!==a||!(n in e))?(e[n]=a,t?.(e)):i(e,a):e[r]?e[r](a):i(e,a),a)}function M(e,t){return e=a(e),((n,r)=>{(n[e]!==r||!(e in n))&&(n[e]=r,t?.(n))})}function N(e,t,n=1,r=`L`){return r!==`L`&&(r=a(r)),i=>{i.H===c?~e in i?--i[~e]||t(i):i[~e]=n:xe(i,t,e,0,i[r])}}function He(e,t){e=a(e);let n=`A`+e,r=e=>{let r=ke(e[n]);r.length&&xe(e,()=>{for(let e of r)e.H>0&&e.H<c&&t(e)},-1,0,r[0].L)};return r._=t,r}function Ue(e,t,n,r){e=a(e),t=a(t),n!==`M`&&(n=a(n));let i=`A`+e,o=`O`+e,s=`_${t}`,l=e=>{let a=ke(e[i]);if(e.H<c&&a.length){let c=e[t];xe(e,()=>{let t=We(e,i,o,n);if(t&&s in t){let e=t.get(t[s]),n=t.get(c);e!==n&&(Ge(e,r),Ge(n,r))}else for(let t of ke(e[i]))Ge(t,r);t&&(t[s]=c)},-1,0,a[0].L)}};return l._=r,l}function We(e,t,n,r){let i=e[n]||=new Map;if(!i.size)for(let a of ke(e[t])){let t=a.M??a[r];if(t===void 0)return e[n]=null;a.M=t,i.set(t,a)}return i}function Ge(e,t){e&&e.H>0&&e.H<c&&t(e)}function P(e,t,n){e=a(e);let r=`A`+e,i=`D`+e,o=e=>{let a=e[r];a&&a.H>0&&a.H<c&&(e[i]||0)===t&&xe(a,n,-1)};return o._=n,o}function Ke(e,t,n){let r=e[t]||=new Set,{size:i}=r;r.add(n).size!==i&&De(n,r)}function F(...e){let[t]=e,n=t.a,r=t.b;for(let t=e.length;t--;)e[t].c=t;return t=>{if(t[n])for(let i of t[n])i.H>0&&i.H<c&&xe(i,e[i[r]||0],-1)}}function I(e,t,n,r){e=a(e);let i=(e=>{e[i.b]=i.c,t(e),Ke(n?n(e):e._,i.a,e)});return i.a=e,i.b=`C`+e,r&&R(r,i),i}function qe(e,t,n){e[a(t)].T=t=>n(e,t)}function Je({$:e}){let t=S.get(e)||0;return S.set(e,t+1),`c`+e.runtimeId+e.renderId+t.toString(36)}function L(e,t){return R(e,t),e=>{Se(e,t)}}function*Ye(e,t,n=t.length-1){if(e){if(Symbol.iterator in e)for(let r of e.values())yield*Ye(r,t,n);else{let r=e[t[n]];n?yield*Ye(r,t,n-1):yield typeof r==`function`?r():r}}}function Xe(...e){return e=e.map(e=>typeof e==`string`?e:a(e)),t=>{let n=()=>Ye(t,e).next().value;return n[Symbol.iterator]=()=>Ye(t,e),n}}function aee(e,...t){return R(e,Xe(...t))}function Ze(e,t,n){C=e,ee(0,t,n)}function Qe(e=`M`){if(re)return;let t=self[e],n=t=>Object.defineProperty(self,e,t),r=t=>{n({value:re=(n=>{let r=re[n]=t[n]||t(n),i=r.w,a={},s=e=>a[e]||(+e?l(a[e]={L:+e}):c()),c=()=>a[0]||={runtimeId:e,renderId:n},l=e=>(e.H=1,e.$=c(),o&&e.G&&(e.F=s(e.G)),e),u=e=>{let t=e[0];for(let n=1;n<e.length;n++){let r=e[n];typeof r==`number`?t+=r:(t?l(Object.assign(a[t]||=(r.L=t,r),r)):Object.assign(c(),r),t++)}},d=((e,t)=>typeof e==`number`?t?w[t](s(e)):s(e):u(e)),f=(e=[],t=[],n=[],i=[],a)=>(o,c,l,u,d,f=_.parentNode,m=_,h=n.length,v=i.length)=>{for(y!==`[`&&(b[p()]=y===`)`||y===`}`?f:_,u=`A`+x,d=y!==`]`&&y!==`)`,p());o=+x;){if((l||=[]).push(c=s(o)),rt(c,c.F),(c.O=r.p?.[o])&&(c.O.m=r.m),d){for(;m.previousSibling&&~g.indexOf(m=m.previousSibling););c._??=b,c.K=c.S=m,y===`'`&&(c.a=m)}else a=nee(a,c),u&&(b[u]=a,tee(a,e=>e._??=b),a=e.pop()),m=t.pop(),f!==m.parentNode&&f.prepend(m),c.S=m,c.K=_.previousSibling===m?m:f.insertBefore(new Text,_);for(;h&&n[h-1].L>o;)h--,rt(n.pop(),c);for(;v&&i[v-1].L>o;){v--;let e=i.pop();e.F!==e&&(e.F=c)}p()}if(l){for(let e of l)n.push(e);d&&(b[u]=l.length>1?l.reverse():l[0])}y===`[`?(l||(e.push(a),a=void 0),t.push(_)):i.push(b)},p=()=>x=v.slice(S,(S=v.indexOf(` `,S)+1||v.length+1)-1),m=(e=[],t)=>{let n=0;for(;n<e.length;n++){let i=e[n];if(typeof i==`string`)for(S=0,v=i;p();)/\D/.test(x)?h=w[x]:t.push(h,s(x));else if(Array.isArray(i)){if(!(ae&&i.every(e=>ae.has(e)&&!r.b[e].length)))break}else if(ae&&typeof i==`number`)break;else{let e=i(d);Array.isArray(e)&&u(e)}}return e.splice(0,n),n},h,g,_,v,y,b,x,S,C,ee;return d._=w,r.m=e=>{if(m(r.r,e),ae&&r.b)for(let t=1;t;){t=0;for(let n of ae){let i=r.b[n];i&&m(i,e)&&(t=1)}}let t=0;for(_ of g=r.v)if(S=r.i.length,v=_.data,y=v[S++],b=s(p()),y===`*`){let e=_.previousSibling;b[p()]=e&&(e.nodeType<8||e.data)?e:_.parentNode.insertBefore(new Text,_)}else o?(C||=f())():r.b&&(g[t++]=_);return ie&&!ee&&_&&ie.set(ee=_.parentNode.insertBefore(new Text,_.nextSibling),[n,a]),g.length=t,e},r.w=()=>{i(),$e(r)},r})})};if(t){r(t);for(let e in t)$e(re(e))}else n({configurable:!0,set:r})}function $e(e){try{oe=1,d(e.m([]),1)}finally{oe=0}}function R(e,t){return w[e]=t}function et(e,t){return R(e,e=>n=>t(e,n)),t}function tt(e,t){return t=a(t),R(e,e=>()=>e[t])}function nt(e,t,n,r){let i=je(e);return i._=t.e||n,rt(i,n?.F),t.b?.(i,r.namespaceURI),i}function rt(e,t){t&&(e.N=t,(t.D||=new Set).add(e)),e.F=e}function it(e,t,n,r){return at(t,nt(e,t,n,r))}function at(e,t){return e.c&&xe(t,e.c,-1),t}function ot(e,t,n,r,i,a){n=n?n.replace(/[^\0-1]+$/,``):``,r=r?r._||r:void 0,i||=void 0;let o=t?(e,r)=>{((se[r]||={})[1+t]||=oee(t,r))(e,n)}:e=>{Ze(e.S=e.K=new Text,n,e)};return t=>({a:e,b:o,e:t,c:r,d:i,f:a})}function st(e,t,n,r,i,a){return R(e,ot(e,t,n,r,i,a))}function oee(e,t){let{firstChild:n,lastChild:r}=ree(e,t),i=document.createElementNS(t,`t`);return Ct(i,null,n,r),n===r&&n.nodeType<8?(e,t)=>{Ze(e.S=e.K=n.cloneNode(!0),t,e)}:(e,t)=>{let n=i.cloneNode(!0);Ze(n.firstChild,t,e),e.S=n.firstChild,e.K=n.lastChild}}function ct(e){return e||e===0?e+``:``}function z(e,t,n){lt(e,t,bt(n))}function lt(e,t,n){e.getAttribute(t)!=n&&(n===void 0?e.removeAttribute(t):e.setAttribute(t,n))}function ut(e,t){lt(e,`class`,i(t,` `,fe)||void 0)}function dt(e,t){for(let n in t)B(e,n,t[n])}function B(e,t,n){e.classList.toggle(t,!!n)}function ft(e,t){lt(e,`style`,i(t,`;`,pe)||void 0)}function V(e,t){let n=ct(t);e.data!==n&&(e.data=n)}function pt(e,t,n,r){let i=e[t];for(let e=i.attributes.length;e--;){let{name:t}=i.attributes.item(e);n&&(t in n||ht(i,t,n))||i.removeAttribute(t)}gt(e,t,n,r)}function mt(e,t,n,r){pt(e,t,n,r),_t(e,t,n?.content)}function ht(e,t,n){return t===`checked`&&e.tagName===`INPUT`&&`checkedValue`in n}function gt(e,t,n,r){let i=e[t],a=e[`I`+t],o;for(let e in a)a[e]=0;r&&(e[`F`+t]=5,e[`E`+t]=0,n&&(o=r(e,t,n)));for(let r in n){let s=n[r];switch(r){case`class`:ut(i,s);break;case`style`:ft(i,s);break;default:he(r)?(a||=e[`I`+t]={})[ge(r)]=s:o?.test(r)||r===`content`&&i.tagName!==`META`||z(i,r,s)}}}function _t(e,t,n){let r=yt(n);e[`D`+t]!==(e[`D`+t]=r?.a)&&(Wt(e,t,r,it),r?.f&&Ke(r.e,r.f,e[`A`+t]));for(let n in r?.g)r.g[n](e[`A`+t],r.h[n])}function vt(e,t){let n=e[t],r=e[`I`+t];D[e[`F`+t]]?.(e,t);for(let e in r)A(n,e,r[e])}function yt(e){let t=ve(e);if(t&&t.a)return t}function bt(e){if(_e(e))return e===!0?``:e+``}function xt(e,t,n=0){let r=`K`+n,i=e[r];i?(Object.assign(i,t),i.onUpdate?.()):(e[r]=t,Object.assign(t,t.onMount?.()),Ee(e,r).onabort=()=>t.onDestroy?.())}function St(e,t){let n=t.nextSibling;for(;e!==n;){let t=e.nextSibling;e.remove(),e=t}}function Ct(e,t,n,r){if(e.isConnected)e.insertBefore(wt(n,r),t);else{let i=r.nextSibling;for(;n!==i;){let r=n.nextSibling;e.insertBefore(n,t),n=r}}return e}function wt(e,t){return e===t?e:Ct(new DocumentFragment,null,e,t)}function Tt(e,t,n,r){if((t||t===0)&&(t!==n.length||/kw/.test(e))){let e=n.slice(0,t),i=n.slice(t);if(r.startsWith(e))return t;if(r.endsWith(i))return r.length-i.length;let a=e.match(T)?.length;for(;a&&T.test(r);)a--;return a?r.length:T.lastIndex}return-1}function Et(e,t,n){let r=e[t],i=_e(n);if(r.defaultChecked!==i){let t=e.H<c?r.checked:i;r.defaultChecked=i,t!==i&&(r.checked=t)}}function Dt(e,t,n,r){let i=e[t],a=_e(n);e[`E`+t]=r,e[`F`+t]=r?0:5,r&&e.H<c?i.checked=a:Et(e,t,a)}function Ot(e,t){let n=e[t];Rt(n,Bt,()=>{let r=e[`E`+t];if(r){let e=n.checked;n.checked=!e,r(e),Ce()}})}function kt(e,t,n){let r=e[t],i=bt(n)||``;if(r.defaultValue!==i){let t=e.H<c?r.value:i;r.defaultValue=i,Mt(r,t)}}function At(e,t,n,r,i=kt){let a=e[t],o=bt(n)||``;e[`E`+t]=r,e[`G`+t]=o,e[`F`+t]=r?2:5,r&&e.H<c?Mt(a,o):i(e,t,o)}function jt(e,t){let n=e[t];oe&&(e[`G`+t]=n.defaultValue),Rt(n,zt,r=>{let i=e[`E`+t];i&&(E=r?.inputType,i(n.value),Ce(),Mt(n,e[`G`+t]),E=``)})}function Mt(e,t){if(e.value!==t){let n=Tt(E,document.activeElement===e&&e.selectionStart,e.value,e.value=t);~n&&e.setSelectionRange(n,n)}}function Nt(e,t,n){let r,i=e[t],a=e.H<c,o=Array.isArray(n),s=o?n.map(Ht):Ht(n);l.unshift(()=>{for(let e of i.options){let t=o?s.includes(e.value):e.value===s;e.defaultSelected!==t&&(a&&(r??=Lt(i,o)),e.defaultSelected=t)}r!==void 0&&It(i,r,o)},e)}function Pt(e,t,n,r){let i=e[t],a=e.H<c,o=Array.isArray(n),s=e[`G`+t]=o?n.map(Ht):Ht(n);e[`E`+t]=r,e[`F`+t]=r?3:5,r&&a?l.unshift(()=>It(i,s,o),e):Nt(e,t,s)}function Ft(e,t){let n=e[t],r=()=>{let r=e[`E`+t];if(r){let i=e[`G`+t],a=Array.isArray(i),o=Lt(n,a);It(n,i,a),r(o),Ce()}};if(oe){if(n.multiple){e[`G`+t]=[];for(let r of n.options)r.defaultSelected&&e[`G`+t].push(r.value)}else{e[`G`+t]=``;for(let r of n.options)if(r.defaultSelected){e[`G`+t]=r.value;break}}}Rt(n,Vt,r),cee(e,t,{childList:!0,subtree:!0},()=>{let i=e[`G`+t];(Array.isArray(i)?i.length!==n.selectedOptions.length||i.some((e,t)=>!i.includes(n.selectedOptions[t].value)):n.value!==i)&&r()})}function It(e,t,n){if(n)for(let n of e.options)n.selected=t.includes(n.value);else e.value=t}function Lt(e,t){return t?Array.from(e.selectedOptions,e=>e.value):e.value}function see(e,t,n){e.H===c&&(e[t].open=_e(n))}function cee(e,t,n,r){(e[`N`+t]||=new MutationObserver(r)).observe(e[t],n)}function Rt(e,t,n){e._=n,m(`input`,lee),e.form&&m(`reset`,uee),oe&&t(e)&&queueMicrotask(n)}function lee(e){e.target._?.(e)}function uee(e){let t=[];for(let n of e.target.elements)n._&&dee(n)&&t.push(n._);requestAnimationFrame(()=>{if(!e.defaultPrevented)for(let e of t)e()})}function zt(e){return e.value!==e.defaultValue}function Bt(e){return e.checked!==e.defaultChecked}function Vt(e){for(let t of e.options)if(t.selected!==t.defaultSelected)return!0}function dee(e){return e.options?Vt(e):zt(e)||Bt(e)}function Ht(e){return bt(e)||``}function Ut(e){vt(e,`a`)}function Wt(e,t,n,r){let i=e[t],a=e[`A`+t],o=i.nodeType>1?(a?.S||i).parentNode:i,s=e[`A`+t]=n&&r(e.$,n,e,o);i===o?(a&&(Ne(a),i.textContent=``),s&&Le(s,o,null)):a?(s?Le(s,o,a.S):o.insertBefore(i,a.S),Ie(a)):s&&(Le(s,o,i),i.remove())}function Gt(e,t,n,r){let i=nt(e,t,n,r);return typeof t==`string`?i.a=i.S=i.K=document.createElementNS(t===`svg`?`http://www.w3.org/2000/svg`:t===`math`?`http://www.w3.org/1998/Math/MathML`:r.namespaceURI,t):at(t,i),i}function Kt(e,t){return t}var qt=[],Jt=Symbol();function Yt(e){return e[Symbol.iterator]=Xt,e[Jt]=qt,e}function*Xt(){yield this,yield*this[Jt]}async function H(e,t){let n=await fetch(e,t),r;try{r=await n.json()}catch{throw Error(n.ok?`invalid response`:`HTTP ${n.status}`)}if(r&&typeof r==`object`&&r.error)throw Error(r.error);if(!n.ok)throw Error(`HTTP ${n.status}`);return r}function Zt(e){let t=e instanceof Error?e.message:String(e);return/HTTP 502|HTTP 503|HTTP 504|Failed to fetch|NetworkError|Load failed|ECONNREFUSED/i.test(t)}var Qt=[`workspaces.changed`,`sessions.changed`,`workspace.progress`,`review.changed`,`status.changed`],$t=1e4,en=4e4,tn=8e3,nn=5e3,rn=6e4,an,on,sn=null,cn,ln,un,dn,fn=0;function pn(e){on&&e!==on&&location.reload(),on=e}async function mn(){try{pn((await H(`/api/boot`)).boot)}catch{}}function hn(){clearTimeout(ln),clearTimeout(un),un=setTimeout(gn,en),fn&&(fn=0,clearInterval(dn),dn=void 0)}function gn(){_n(),!fn&&(fn=Date.now(),dn=setInterval(()=>{document.visibilityState===`visible`&&(Date.now()-fn>rn&&(fn=Date.now(),yn()),vn(),H(`/api/status`).then(e=>{an.dispatchEvent(new MessageEvent(`status.changed`,{data:e}))}).catch(()=>{}))},nn))}function _n(){clearTimeout(ln),clearTimeout(un),sn?.close(),sn=null}function vn(){for(let e of[`workspaces.changed`,`sessions.changed`])an.dispatchEvent(new MessageEvent(e,{data:null}))}function yn(){if(sn)return;let e=sn=new EventSource(`/api/events`);clearTimeout(ln),ln=setTimeout(gn,tn),e.addEventListener(`hello`,e=>{hn(),pn(JSON.parse(e.data||`{}`).boot)}),e.addEventListener(`ping`,hn);for(let t of Qt)e.addEventListener(t,e=>{hn(),an.dispatchEvent(new MessageEvent(t,{data:JSON.parse(e.data||`null`)}))})}function bn(){return an||(an=new EventTarget,yn(),mn(),document.addEventListener(`visibilitychange`,()=>{document.visibilityState===`visible`?(clearTimeout(cn),yn(),mn(),vn()):(clearTimeout(cn),cn=setTimeout(()=>{fn||_n()},$t))})),an}var xn=null,Sn=null,Cn=new EventTarget;function fee(e,t){Cn.addEventListener(`intent`,e,{signal:t})}function wn(e,t){xn={workspaceId:e,pr:t},Cn.dispatchEvent(new Event(`intent`))}function Tn(e){if(xn?.workspaceId!==e)return!1;let t=xn.pr;return xn=null,{pr:t}}function En(e,t){Sn=[e,t],Cn.dispatchEvent(new Event(`intent`))}function Dn(e){if(Sn?.[0]!==e)return null;let t=Sn[1];return Sn=null,t}function On(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}}}var kn=new Map,An=new Set,pee;function mee(){return typeof window>`u`?Promise.resolve():pee??=(async()=>{try{let e=await(await fetch(`/api/prefs`)).json();for(let[t,n]of Object.entries(e))An.has(t)||kn.set(t,n)}catch{}})()}function jn(e){return kn.get(e)??null}function Mn(e,t){An.add(e),t===null?kn.delete(e):kn.set(e,t),hee(e,t)}function hee(e,t){return fetch(`/api/prefs`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({key:e,value:t})}).catch(()=>{})}function gee(){return jn(`last-workspace`)}function Nn(e){Mn(`last-workspace`,e)}function Pn(){return jn(`side-nav`)!==`0`}function _ee(e){Mn(`side-nav`,e?`1`:`0`)}function Fn(e){return jn(`tab:${e}`)}function In(e,t){Mn(`tab:${e}`,t)}function Ln(){return jn(`diff-tree`)!==`0`}function Rn(e){Mn(`diff-tree`,e?`1`:`0`)}function zn(){return jn(`diff-uncommitted`)===`1`}function Bn(e){Mn(`diff-uncommitted`,e?`1`:`0`)}function Vn(){return typeof window<`u`&&`serviceWorker`in navigator&&`PushManager`in window}async function Hn(){return Vn()?(await Kn()).pushManager.getSubscription():null}async function Un(){if(await Notification.requestPermission()!==`granted`)return!1;let e=await Kn(),t=await e.pushManager.getSubscription();if(!t){let{publicKey:n}=await H(`/api/push`);t=await e.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:qn(n)})}return await H(`/api/push`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(t.toJSON())}),!0}async function Wn(){let e=await Hn();e&&(await H(`/api/push?endpoint=${encodeURIComponent(e.endpoint)}`,{method:`DELETE`}).catch(()=>{}),await e.unsubscribe())}function Gn(e){let t=()=>{document.visibilityState===`visible`&&navigator.clearAppBadge?.().catch(()=>{})};t(),document.addEventListener(`visibilitychange`,t,{signal:e})}async function Kn(){return await navigator.serviceWorker.getRegistration()??navigator.serviceWorker.register(`/sw.js`)}function qn(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 Jn(){return typeof window<`u`&&window.matchMedia(`(pointer: coarse)`).matches}function Yn(){return typeof window<`u`&&window.matchMedia(`(max-width: 899px)`).matches}function Xn(){return typeof navigator<`u`&&navigator.standalone===!0}function Zn(e){if(!Xn()||!/^https?:\/\//.test(e)){window.open(e,`_blank`,`noopener`);return}if(localStorage.getItem(`xSafariOk`)){location.href=`x-safari-${e}`;return}if(localStorage.getItem(`xSafariNo`)){window.open(e,`_blank`,`noopener`);return}let t=!1,n=()=>{document.visibilityState===`hidden`&&(t=!0,localStorage.setItem(`xSafariOk`,`1`))};document.addEventListener(`visibilitychange`,n),window.addEventListener(`pagehide`,n),setTimeout(()=>{document.removeEventListener(`visibilitychange`,n),window.removeEventListener(`pagehide`,n),!(t||document.visibilityState===`hidden`)&&(localStorage.setItem(`xSafariNo`,`1`),window.open(e,`_blank`,`noopener`))},1500),location.href=`x-safari-${e}`}var Qn=`<div><div class=toast-body><!><!></div><!></div>`,$n=` E%b%l%l`,er=L(`q0`,e=>A(e.a,`click`,function(){e._._.l?.()})),tr=ue(0),nr=I(22,e=>tr(e,e._._.n),e=>e._._),rr=O(0,`<!><!><!>`,`b%`,nr),ir=P(3,0,e=>rr(e,+!e._.k)),ar=e=>{ir._(e),sr._(e)},or=O(1,`<button class="icon-btn toast-dismiss" title=Dismiss>×</button>`,` `,er),sr=P(3,0,e=>or(e,+!e._.l)),cr=ue(0),lr=P(2,0,e=>cr(e,e._.j)),ur=lr,dr=P(1,0,e=>V(e.a,e._.i)),fr=dr,pr=N(17,e=>ut(e.a,[`toast`,`toast-${e.o}`,`toast-${e.p}`])),mr=M(14,e=>{z(e.a,`role`,e.o===`error`?`alert`:`status`),pr(e)}),hr=(e,t)=>mr(e,t||`error`),gr=N(16,L(`q1`,e=>xt(e,{onDismiss:e.l,placement:e.p,onMount:function(){let e=new AbortController;return this.placement===`float`&&this.onDismiss&&window.addEventListener(`keydown`,e=>{e.key===`Escape`&&(e.target instanceof HTMLInputElement&&e.target.value||e.target instanceof Element&&e.target.closest(`.palette, [role=dialog]`)||(e.stopPropagation(),this.onDismiss?.()))},{capture:!0,signal:e.signal}),{abort:e}},onDestroy:function(){this.abort.abort()}}))),_r=M(15,e=>{pr(e),gr(e)}),vr=(e,t)=>_r(e,t||`float`),yr=O(1,`<strong class=toast-title> </strong>`,`D `,fr),br=M(8,e=>{yr(e,+!e.i),dr(e)}),xr=O(2,`<div class=toast-content><!></div>`,`D%`,ur),Sr=M(9,e=>{xr(e,+!e.j),lr(e)}),Cr=O(3,`<div class=toast-actions><!><!></div>`,`D%b%`,ar),wr=N(12,e=>Cr(e,e.k||e.l?0:1)),Tr=M(10,e=>{Dr(e,e.k?.content),wr(e),ir(e)}),Er=M(11,e=>{wr(e),gr(e),sr(e)}),Dr=M(13,F(nr));function Or(e,t){if(!e)return-1;let n=e.toLowerCase(),r=t.toLowerCase(),i=r.lastIndexOf(`/`),a=r.slice(i+1),o=r.slice(0,Math.max(0,i)).includes(n)?5:0;return a===n?1e3+o:a.startsWith(n)?800+o:a.includes(n)?600+o:Ar(n,a)?400+o:r.includes(n)?300:Ar(n,r)?100:-1}function kr(e,t,n){return e?t.map(t=>({repo:t,score:Or(e,t.nameWithOwner)})).filter(({repo:e,score:t})=>!e.isArchived&&t>=0&&!n(e.nameWithOwner)).sort((e,t)=>t.score-e.score||e.repo.nameWithOwner.length-t.repo.nameWithOwner.length||e.repo.nameWithOwner.localeCompare(t.repo.nameWithOwner)).slice(0,8).map(({repo:e})=>e):[]}function Ar(e,t){if(!e)return!0;let n=0,r=t.toLowerCase();for(let t of e.toLowerCase()){if(n=r.indexOf(t,n),n===-1)return!1;n++}return!0}function jr(e){return e?.working?`working`:e?.waiting?`waiting`:e?.agents?`idle`:`off`}function Mr(e){return e?.phase===`working`?`working`:e?.phase===`waiting`?`waiting`:e?.alive?`idle`:`off`}var Nr=`<svg viewBox="0 0 24 24" fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round aria-hidden=true><path></path></svg>`,Pr=` D l`,Fr=(e,t)=>{z(e.a,`width`,t),z(e.a,`height`,t)},Ir=(e,t)=>Fr(e,t??15),Lr=(e,t)=>ut(e.a,[`icon`,t]),Rr=(e,t)=>z(e.b,`d`,t),zr=Nr,Br=(e=>`/${e}&`)(Pr);function Vr(e){Rr(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 Hr=(e,t)=>Ir(e.a,t),Ur=(e,t)=>Lr(e.a,t),Wr=Nr,Gr=(e=>`/${e}&`)(Pr);function Kr(e){Rr(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 qr=(e,t)=>Ir(e.a,t),Jr=(e,t)=>Lr(e.a,t),Yr=Nr,Xr=(e=>`/${e}&`)(Pr);function Zr(e){Rr(e.a,`M6 12H12M18 12H12M12 12V6M12 12V18`)}var Qr=(e,t)=>Ir(e.a,t),$r=(e,t)=>Lr(e.a,t),ei=`<!><!><!>`,vee={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`},ti=P(0,1,e=>Ir(e.a,e._.d)),yee=e=>{ti._(e),ni._(e),Rr(e.a,`M5 7L10 12L5 17 M13 17H20`)},ni=P(0,1,e=>Lr(e.a,e._.f)),ri=P(0,0,e=>ut(e.a,[`icon`,e._.f])),bee=e=>{ri._(e),ii._(e),ai._(e)},ii=P(0,0,e=>{z(e.a,`width`,e._.g),z(e.a,`height`,e._.g)}),ai=P(0,0,e=>z(e.b,`d`,e._.h)),oi=M(6,ii),si=M(3,e=>{oi(e,e.d??15),ti(e)}),ci=O(0,`<svg viewBox="0 0 24 24" fill=currentColor fill-rule=evenodd aria-hidden=true><path></path></svg>`,` D `,bee,Nr,(e=>`/${e}&`)(Pr),yee),li=M(7,e=>{ci(e,+!e.h),ai(e)}),ui=(e,t)=>li(e,vee[t]),di=M(5,e=>{ri(e),ni(e)}),fi=`<!><!><div class=palette role=dialog aria-label=Workspaces><!><input autofocus placeholder="Jump to workspace…" aria-label="Filter workspaces"><ul class=rows></ul><!><div class=palette-foot><span></span><span class="dim hint">↑↓ navigate · ↵ open · ⌘1–9 switch · esc close</span><!></div></div>`,pi=`b%b D%b b b%bDc%m`,mi=(e,t)=>{z(e.a,`value`,t),V(e.b,t)},hi=(e,t)=>mi(e,t[0]),gi=(e,t)=>V(e.a,t),_i=(e,t)=>gi(e,t[0]?.worktree),vi=P(5,0,e=>{z(e.a,`title`,`${e._.r} open PR${e._.r===1?``:`s`}`),V(e.b,e._.r),V(e.c,e._.r===1?``:`s`)}),yi=vi,bi=P(6,0,e=>z(e.a,`title`,e._.o.map(e=>`:${e.port} ${e.cmd}`).join(`
|
|
3
|
-
`))),xi=e=>{bi._(e),Si._(e)},Si=P(6,0,e=>V(e.b,e._.p)),Ci=N(2,e=>z(e.a,`title`,`${e._.l} running session${e._.l===1?``:`s`}${e._.m?` — ${e._.m} working`:``}${e._.n?` — ${e._.n} waiting on you`:``}`),2),wi=P(4,0,e=>{V(e.b,e._.l),Ci(e)}),Ti=e=>{wi._(e),Ei._(e),Di._(e)},Ei=P(4,0,Ci),Di=P(4,0,Ci),Oi=P(0,1,e=>V(e.a,e._.g)),ki=Oi,Ai=N(2,e=>V(e.b,e._.a3?`hide archived`:`archived (${e._.a6})`)),ji=P(5,0,Ai),Mi=L(`k8`,e=>A(e.a,`click`,function(){Qa(e._,!e._.a3)})),Ni=e=>{ji._(e),Pi._(e),Mi(e)},Pi=P(5,0,Ai),Fi=N(1,e=>Pt(e,`a`,e._.o.preferredAgent,jo(e))),Ii=P(6,0,Fi),Li=L(`k9`,e=>Ft(e,`a`)),Ri=e=>{Ii._(e),Bi._(e),Vi._(e),Li(e)},zi=k(0,`<option> </option>`,` D `,0,hi),Bi=P(6,0,e=>zi(e,[e._.z,e=>e])),Vi=P(6,0,Fi),Hi=L(`k5`,e=>A(e.a,`click`,function(t,n){n.closest(`[popover]`)?.hidePopover(),e._._._.q(e._._.h,e.e)})),Ui=e=>{e.b,si(e.b,14),di(e.b),Hi(e)},Wi=M(4,e=>{ui(e.b,e.e),V(e.c,e.e)}),Gi=k(6,(e=>`<button>${e}<!></button>`)(ei),(e=>` D/${e}&%l`)(`b%c`),Ui,(e,t)=>Wi(e,t[0])),Ki=I(48,e=>Gi(e,[[...e._._.z||[],`shell`],e=>e]),e=>e._._),qi=(e,t)=>{z(e.e,`popovertarget`,t),z(e.g,`id`,t)},Ji=L(`k6`,e=>{A(e.a,`click`,function(t){t.stopPropagation(),e._._.m(e._.h)}),A(e.c,`click`,function(t){t.stopPropagation(),e._._.n(e._.h)}),A(e.e,`click`,function(e){e.stopPropagation()}),A(e.g,`toggle`,function(t,n){if(t.newState===`open`){let t=e.e.getBoundingClientRect();n.style.top=`${t.bottom+4}px`,n.style.left=`${Math.max(8,t.right-n.offsetWidth)}px`}})}),Yi=e=>{Ki(e),Vr(e.b),Hr(e.b,13),Ur(e.b),Kr(e.d),qr(e.d,13),Jr(e.d),Zr(e.f),Qr(e.f,13),$r(e.f),qi(e,Je(e)),Ji(e)},Xi=O(2,`<span class="chip open">open</span>`),Zi=N(18,e=>Xi(e,e._.i===e._._.k?0:1)),Qi=I(45,Zi,e=>e._._),$i=e=>{Qi(e),na(e),ia._(e),aa._(e),oa._(e),la._(e)},ea=(e,t)=>{ut(e.a,[`dot`,jr(t)]),da(e,t?.repos),pa(e,t?.agents),ma(e,t?.working),ha(e,t?.waiting),_a(e,t?.ports)},ta=N(19,e=>ea(e,e._._.y[e._.i])),na=I(47,ta,e=>e._._),ra=O(3,`<span class=chip>archived</span>`),ia=P(0,2,e=>ra(e,+!e._.f)),aa=P(0,2,e=>{ta(e),Zi(e)}),oa=P(0,2,e=>V(e.b,e._.j)),sa=k(7,`<span class=mono> </span>`,`D `,0,_i),ca=N(10,e=>sa(e,[e.j||e._.k,`full_name`])),la=P(0,2,ca),ua=(e,t)=>ba(e,t?.length),da=M(9,e=>{ua(e,(e.j||[]).flatMap(e=>e.prs||[])),ca(e)}),fa=O(4,`<span class="chip stat"> </span>`,` D `,Ti),pa=M(11,e=>{fa(e,+!e.l),wi(e)}),ma=M(12,Ei),ha=M(13,Di),ga=O(6,`<span class="chip stat">:<!></span>`,` Db%`,xi),_a=M(14,e=>{va(e,e.o?.length),ga(e,+!(e.o||[]).length),bi(e)}),va=M(15,Si),ya=O(5,`<span class="chip stat"><!> PR<!></span>`,` D%c%`,yi),ba=M(17,e=>{ya(e,+!e.r),vi(e)}),xa=N(12,e=>dt(e.a,{hi:e.l===e._.ah,archived:e.e===`ws`&&e.f}),3),Sa=He(4,xa),Ca=L(`k7`,e=>{A(e.a,`click`,function(){e._.ai(e.d)}),A(e.a,`mouseenter`,function(){Za(e._,e.l)})}),wa=e=>{Sa._(e),Ca(e)},Ta=O(0,`<span class=row-name>+ New workspace</span>`,0,0,`<span class="row-name cmd-row">▸ <!></span>`,`Db%`,ki,`<span class=row-name><span></span><span class=row-name-text> </span><!><!><span class=row-stats><!><!><!></span></span><span class=row-repos></span>`,`D bD l%b%bD%b%b%m `,$i),Ea=O(1,((e,t,n)=>`<button class=row-more title="Review changes">${e}</button><button class=row-more title="Manage workspace">${t}</button><button class=row-more title="New session">${n}</button><div popover=auto class=new-session-pop></div>`)(zr,Wr,Yr),((e,t,n)=>` D/${e}&l D/${t}&l D/${n}&l b`)(Br,Gr,Xr),Yi),Da=M(4,e=>{Ta(e,e.e===`new`?0:e.e===`cmd`?1:2),Ea(e,e.e===`ws`?0:1),xa(e)}),Oa=M(5,e=>{xa(e),ia(e)}),ka=M(11,xa),Aa=(e,t)=>{ja(e,t[0]),ka(e,t[1])},ja=M(3,e=>{Da(e,e.d?.kind),Oa(e,e.d?.archived),Ma(e,e.d?.label),Na(e,e.d?.ws)}),Ma=M(6,Oi),Na=M(7,e=>{Pa(e,e.h?.id),Fa(e,e.h?.name),Ia(e,e.h?.repos)}),Pa=M(8,aa),Fa=M(9,oa),Ia=M(10,la),La=L(`k4`,e=>A(e.a,`click`,function(){e._.v?.()})),Ra=k(4,`<li><div class=row-wrap><button class=row></button><!></div></li>`,`E b%`,wa,Aa),za=N(40,L(`k12`,e=>xt(e,{onMount:function(){let t=new AbortController,n=e.ad.findIndex(t=>t.kind===`ws`&&t.ws.id===e.k);n>=0&&Za(e,n),setTimeout(()=>e.d?.focus(),0);let r=t.signal;return document.addEventListener(`keydown`,t=>{document.querySelector(`:popover-open`)||t.key===`Escape`&&!e.u&&(t.preventDefault(),e.v?.())},{capture:!0,signal:r}),{abort:t}},onDestroy:function(){this.abort.abort()}})),3),Ba=M(39,e=>{mo(e,e.ad.length),Ra(e,[e.ad,e=>e.kind===`new`?`new`:e.kind===`cmd`?`cmd:${e.label}`:e.ws.id]),za(e)}),Va=N(38,e=>Ba(e,[...e.a8(e.a4).map(e=>({kind:`ws`,ws:e})),...e.a3||e.a1?e.a8(e.a5).map(e=>({kind:`ws`,ws:e,archived:!0})):[],...e.ab,{kind:`new`}]),5),Ha=M(34,Va),Ua=M(37,Va),Wa=N(36,e=>Ua(e,!e.a1||!e.a9?[]:[{kind:`cmd`,label:`Review changes — ${e.a9?.name}`,run:()=>e.m(e.a9)},{kind:`cmd`,label:`Manage workspace — ${e.a9?.name}`,run:()=>e.n(e.a9)},{kind:`cmd`,label:`New ${e.p||`agent`} session — ${e.a9?.name}`,run:()=>e.q(e.a9,e.p||`claude`)}].filter(t=>t.kind===`cmd`&&Ar(e.a1,t.label))),5),Ga=O(5,`<button class="archived-link dim"> </button>`,` D `,Ni),Ka=N(33,e=>Ga(e,e.a6&&!e.a1?0:1)),qa=j(27,e=>{At(e,`d`,e.a1,No(e)),Ha(e,Mo(e)),Wa(e),Va(e),Ka(e)}),Ja=L(`k11`,e=>e.e.children[e.ah]?.scrollIntoView({block:`nearest`})),Ya=M(43,e=>{Sa(e),Ja(e)}),Xa=N(42,e=>Ya(e,Math.min(e.a2,e.af-1))),Za=j(28,Xa),Qa=j(29,e=>{Va(e),ji(e)}),$a=L(`k10`,e=>{jt(e,`d`),A(e.d,`keydown`,function(t){t.key===`ArrowDown`?(t.preventDefault(),Za(e,Math.min(e.ah+1,e.ad.length-1))):t.key===`ArrowUp`?(t.preventDefault(),Za(e,Math.max(e.ah-1,0))):t.key===`Enter`?(t.preventDefault(),e.ai(e.ad[e.ah])):t.key===`Escape`&&!e.u&&(t.preventDefault(),e.v?.())})});function eo(e){qa(e,``),Za(e,0),Qa(e,!1),$a(e)}var to=M(30,Va),no=M(31,e=>{oo(e,e.a5?.length),Va(e)}),ro=M(35,Wa),io=N(11,e=>ro(e,e.j.find(t=>t.id===e.k))),ao=M(9,e=>{wo(e,e.j?.length),to(e,e.j.filter(e=>e.status===`active`)),no(e,e.j.filter(e=>e.status===`archived`)),io(e)}),oo=M(32,e=>{Ka(e),Pi(e)}),so=F(Qi),co=M(10,e=>{io(e),za(e),so(e)}),lo=M(12,Wa),uo=M(13,Wa),fo=M(15,Wa),po=M(16,Wa),mo=M(41,Xa),ho=M(44),go=N(19,e=>ho(e,Po(e))),_o=M(17,go),vo=M(18,go),yo=O(0,`<div class=palette-backdrop></div>`,` `,La),bo=O(2,`<div class="onboard dim"><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>`),xo=N(23,e=>bo(e,e.u&&!e.w?0:1)),So=M(20,e=>{B(e.b,`inline`,e.u),yo(e,+!!e.u),za(e),xo(e)}),Co=M(21,za),wo=M(22,xo),To=O(6,`<label class=dim><select aria-label="Preferred agent"></select></label>`,`D `,Ri),Eo=M(14,e=>{fo(e,e.o?.preferredAgent),Oo(e,e.o?.agents),To(e,+!e.o),Ii(e)}),Do=F(Ki),Oo=M(25,e=>{Do(e),Bi(e)}),ko=M(24,F(na)),Ao=M(26,Vi);function jo(e){return function(t){e._.a0({...e._.o,preferredAgent:t}),H(`/api/settings`,{method:`PUT`,headers:{"content-type":`application/json`},body:JSON.stringify({preferredAgent:t})}).catch(()=>{})}}function Mo(e){return t=>t.filter(t=>Ar(e.a1,t.name))}function No(e){return function(t){qa(e,t),Za(e,0)}}function Po(e){return t=>{t&&(t.kind===`new`?e.r():t.kind===`cmd`?t.run():e.s(t.ws))}}R(`k1`,jo),R(`k2`,Mo),R(`k0`,No),R(`k3`,Po);var Fo=`<button type=submit><!></button>`,Io=` D%l`,Lo=de(1),Ro=(e,t)=>ut(e.a,t),zo=(e,t)=>z(e.a,`disabled`,t),Bo=(e,t)=>z(e.a,`title`,t),Vo=Nr,Ho=(e=>`/${e}&`)(Pr);function Uo(e){Rr(e.a,`M21.8883 13.5C21.1645 18.3113 17.013 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C16.1006 2 19.6248 4.46819 21.1679 8 M17 8H21.4C21.7314 8 22 7.73137 22 7.4V3`)}var Wo=(e,t)=>Ir(e.a,t),Go=(e,t)=>Lr(e.a,t),Ko=`<div class=add-repo><input placeholder="Add a repo…" aria-label="Add a repo"><!><!></div>`,qo=`D b%b%l`,Jo=null,Yo=L(`m7`,e=>A(e.a,`click`,function(){e._._._._._.z(e._._._.i,e.d)})),Xo=M(3,e=>V(e.b,e.d)),Zo=(e,t)=>Xo(e,t[0]),Qo=I(33,e=>At(e,`a`,e._._._._._.y,Ps(e)),e=>e._._._._._),$o=L(`m6`,e=>jt(e,`a`)),es=e=>{Qo(e),$o(e)},ts=k(1,`<li><button class=result-row><span class="repo-name mono"> </span></button></li>`,`D E `,Yo,Zo),ns=(e,t)=>{wee(e,t?.length),ts(e,[t,e=>e])},rs=N(5,e=>ns(e,(e._._._._.y?e._._._._.w.filter(t=>t.toLowerCase().includes(e._._._._.y.toLowerCase())):e._._._._.w).slice(0,12))),is=I(31,rs,e=>e._._._._),xee=e=>{is(e),as(e),os(e)},See=O(0,`<input placeholder="Filter branches…" aria-label="Filter branches" autofocus>`,` `,es),as=I(32,e=>See(e,e._._._._.x>8?0:1),e=>e._._._._),os=I(33,rs,e=>e._._._._),Cee=O(2,`<li><p class="dim empty-note">No branches match.</p></li>`),wee=(e,t)=>Cee(e,+!!t),Tee=O(0,`<p class="dim empty-note"><span class=spin></span> Loading branches…</p>`,0,0,`<!><!><ul class=branch-list><!><!></ul>`,`b%bD%b%`,xee),ss=I(31,e=>Tee(e,+!!e._._._.w),e=>e._._._),Eee=ss,cs=N(11,e=>B(e.a,`hi`,e.k===e._._.p)),ls=I(28,cs,e=>e._._),Dee=L(`m8`,e=>{A(e.a,`mouseenter`,function(){ys(e._._,e.k)}),A(e.b,`click`,function(){e._._.z(e.i)}),A(e.e,`click`,function(){e._._.a0(e.i)})}),Oee=e=>{ls(e),ds(e),Zr(e.c),Qr(e.c,12),$r(e.c,`result-plus`),Dee(e)},kee=O(5,`<div class=branch-pick></div>`,` `,Eee),us=N(9,e=>{B(e.e,`on`,e._._.u===e.i),kee(e,e._._.u===e.i?0:1)}),ds=I(30,us,e=>e._._),Aee=M(10,cs),jee=M(8,e=>{V(e.d,e.i),z(e.e,`title`,`Pick a base branch for ${e.i}`),z(e.e,`aria-label`,`Pick a base branch for ${e.i}`),us(e)}),Mee=k(0,(e=>`<li><div class=result-wrap><button class=result-row>${e}<span class=repo-name> </span></button><button class=result-branch>⎇</button></div><!></li>`)(Yr),(e=>`D D D/${e}&D m l%l`)(Xr),Oee,(e,t)=>{jee(e,t[0]?.nameWithOwner),Aee(e,t[1])}),fs=P(2,0,e=>Mee(e,[e._.r,`nameWithOwner`])),Nee=fs,ps=P(2,1,e=>V(e.a,e._.m)),Pee=ps,Fee=M(17,e=>{Os(e,e.r?.length),fs(e)}),ms=N(14,e=>Fee(e,e.l&&e.m?kr(e.m,e.l?.repos,t=>e.i.has(t)):[]),2),Iee=O(1,`<p class="dim empty-note">Loading repos…</p>`),hs=N(13,e=>Iee(e,e.m&&!e.l?0:1)),Lee=O(2,`<ul class=repo-results></ul>`,` `,Nee,`<p class="dim empty-note">No repos match "<!>".</p>`,`Db%`,Pee),gs=N(19,e=>Lee(e,e.s?0:e.m&&e.l?1:2),2),_s=j(11,e=>{ms(e),hs(e),gs(e)}),vs=j(12,e=>{At(e,`a`,e.m,Fs(e)),ms(e),hs(e),gs(e),ps(e)}),ys=j(15,F(ls)),Ree=M(26),bs=N(21,e=>Ree(e,Is(e))),zee=F(ds),xs=j(20,e=>{bs(e),zee(e)}),Bee=F(ss,is),Ss=j(22,e=>{As(e,e.w?.length),Bee(e)}),Cs=j(24,F(os,Qo)),Vee=L(`m9`,e=>{jt(e,`a`),A(e.a,`keydown`,function(t){t.key===`ArrowDown`?(t.preventDefault(),ys(e,Math.min(e.p+1,e.r?.length-1))):t.key===`ArrowUp`?(t.preventDefault(),ys(e,Math.max(e.p-1,0))):t.key===`Enter`?(t.preventDefault(),e.r[e.p]&&e.z(e.r[e.p].nameWithOwner)):t.key===`Escape`&&e.m&&(t.preventDefault(),vs(e,``))})});function ws(e){_s(e,null),vs(e,``),ys(e,0),xs(e,null),Ss(e,null),Cs(e,``),Vee(e)}var Hee=L(`m10`,e=>xt(e,{onMount:function(){Jo&&_s(e,Jo),e.q(!1)}})),Uee=M(16,e=>{x(e,Ls(e)),Hee(e)}),Ts=N(7,e=>Uee(e,Rs(e))),Es=M(5,Ts),Ds=M(6,e=>{Ts(e),bs(e)}),Os=M(18,gs),ks=M(8,ms),As=M(23,F(as)),js=M(25),Ms=M(9,e=>js(e,zs(e))),Ns=(e,t)=>z(e.a,`disabled`,t);function Ps(e){return t=>{Cs(e._._._._._,t)}}function Fs(e){return function(t){vs(e,t),ys(e,0)}}function Is(e){return async t=>{if(e.u===t){xs(e,null);return}xs(e,t),Ss(e,null),Cs(e,``);try{let n=await H(`/api/repos/branches?repo=${encodeURIComponent(t)}`);e.u===t&&Ss(e,n.branches)}catch(t){xs(e,null),e.g?.(String(t.message||t))}}}function Ls(e){return()=>e.q(!0)}function Rs(e){return async t=>{t&&e.f?.(!0);try{let n=await H(`/api/repos${t?`?refresh`:``}`);Jo=n,_s(e,n)}catch(t){e.g?.(String(t.message||t))}t&&e.f?.(!1)}}function zs(e){return(t,n)=>{vs(e,``),xs(e,null),e.j(t,n)}}R(`m1`,Ps),R(`m0`,Fs),R(`m5`,Is),R(`m2`,Ls),R(`m3`,Rs),R(`m4`,zs);var Bs=`<dialog><div class=manage><!></div><!></dialog>`,Vs=` E%l%l`,Hs=de(1),Us=ot(`i0`,`Done`),Ws=e=>{e.a,Lo(e.a,Us(e)),Ro(e.a,`btn primary`),zo(e.a),Bo(e.a)},Gs=ue(0),Ks=P(2,0,e=>Gs(e,e._.o)),qs=Ks,Js=M(15,e=>z(e.a,`closedby`,e.p?`any`:`none`)),Ys=(e,t)=>Js(e,t!==!1),Xs=Ve(16,L(`i2`,e=>{{let t=e.a;e.q?t.open||t.showModal():t.open&&t.close()}})),Zs=N(8,e=>Xs(e,e.g,e.h)),Qs=M(6,Zs),$s=O(2,`<form method=dialog class=manage-bar><!></form>`,`D%`,qs,(e=>`<form method=dialog class=manage-bar>${e}</form>`)(Fo),(e=>`D/${e}&l`)(Io),Ws),ec=N(13,e=>$s(e,e.m?0:e.h?1:2)),tc=M(7,e=>{Zs(e),ec(e)}),nc=(e,t)=>ut(e.a,[`manage-view`,t]),rc=(e,t)=>z(e.a,`aria-label`,t),ic=L(`i1`,e=>{A(e.a,`cancel`,function(t){t.preventDefault(),e.p&&Xs(e,!1)}),A(e.a,`close`,function(){e.q&&Xs(e,!1)})}),ac=M(12,e=>{oc(e,e.m?.content),ec(e)}),oc=M(14,Ks),sc=Bs,cc=(e=>`/${e}&`)(Vs),lc=new Map,uc=M(3,e=>{z(e.a,`title`,`Open http://${typeof location>`u`?`localhost`:location.hostname}:${e.d}`),V(e.b,e.d)}),dc=L(`h24`,e=>A(e.a,`click`,function(){window.open(`http://${location.hostname}:${e.d}`,`_blank`,`noopener`)})),fc=(e,t)=>uc(e,t[0]),pc=(e,t)=>V(e.a,t),mc=(e,t)=>pc(e,t[0]),hc=P(2,0,e=>V(e.a,e._.j)),gc=hc,_c=P(0,0,e=>V(e.a,e._.e)),vc=_c,yc=ot(`h14`,`Done`),bc=(e,t)=>z(e.a,`title`,t),xc=(e,t)=>V(e.b,t),Sc=k(2,`<button class="chip port-link">:<!></button>`,` Db%`,dc,fc),Cc=(e,t)=>Sc(e,[t,e=>String(e)]),wc=M(9,e=>z(e.d,`title`,`Kill ${e.j}`)),Tc=L(`h25`,e=>A(e.d,`click`,function(){e._._._.ah(e.j)})),Ec=(e,t)=>{bc(e,t[0]?.args),xc(e,t[0]?.cmd),Cc(e,t[0]?.ports),wc(e,t[0]?.pid)},Dc=P(6,0,e=>z(e.a,`title`,`Confirm #${e._.p} is done — remove from this list`)),Oc=L(`h20`,e=>A(e.a,`click`,function(){e._._._._._.a9(e._._.g,e._.p)})),kc=O(6,`<button class=pr-dismiss>✓</button>`,` `,e=>{Dc._(e),Oc(e)}),Ac=N(11,e=>V(e.b,e.j===`OPEN`&&e.k?`draft`:e.j.toLowerCase())),jc=O(2,`<span class="pr-state open" title=Approved>✓</span>`,0,0,`<span class="pr-state closed" title="Changes requested">✗</span>`),Mc=N(13,e=>jc(e,e.j===`OPEN`&&e.m===`APPROVED`?0:e.j===`OPEN`&&e.m===`CHANGES_REQUESTED`?1:2)),Nc=M(9,e=>{ut(e.a,[`pr-state`,e.j.toLowerCase()]),kc(e,+(e.j===`OPEN`)),Ac(e),Mc(e)}),Pc=M(10,Ac),Fc=M(12,Mc),Ic=(e,t)=>z(e.d,`href`,t),Lc=M(15,e=>{V(e.e,e.p),Dc(e)}),Rc=(e,t)=>V(e.f,t),zc=(e,t)=>{Nc(e,t[0]?.state),Pc(e,t[0]?.isDraft),Fc(e,t[0]?.reviewDecision),Ic(e,t[0]?.url),Lc(e,t[0]?.number),Rc(e,t[0]?.title)},Bc=P(0,0,e=>V(e.b,e._.e)),Vc=L(`h19`,e=>A(e.a,`click`,function(){e._._._.a8()})),Hc=e=>{Bc._(e),Vc(e)},Uc=I(55,e=>V(e.a,e._._.t),e=>e._._),Wc=Uc,Gc=N(2,e=>{B(e.a,`armed`,e._._._.s===e._.h),V(e.b,e._._._.s===e._.h?`remove?`:`×`)}),Kc=N(3,e=>z(e.a,`title`,e._._._.s===e._.h?`Really remove ${e._.g}/? Uncommitted changes are lost.`:`Remove ${e._.g}/`),2),qc=I(54,e=>{Gc(e),Kc(e)},e=>e._._._),Jc=L(`h22`,e=>A(e.a,`click`,function(){e._._._.s===e._.f?.full_name?(Fu(e._._._,null),e._._._.af(e._.f)):(Fu(e._._._,e._.f?.full_name),setTimeout(()=>{Fu(e._._._,null)},4e3))})),Yc=e=>{qc(e),Xc._(e),Zc._(e),Jc(e)},Xc=P(3,1,Kc),Zc=P(3,1,e=>{Gc(e),Kc(e)}),Qc=I(52,e=>z(e.a,`disabled`,!!e._._.q),e=>e._._),$c=L(`h16`,e=>A(e.a,`click`,function(){e._._.ag(`restore`)})),el=e=>{Qc(e),$c(e)},tl=I(52,e=>{z(e.a,`disabled`,!!e._._.q),V(e.b,e._._.q===`archive`?`Archiving…`:`Archive`)},e=>e._._),nl=L(`h15`,e=>A(e.a,`click`,function(){e._._.ag(`archive`)})),rl=e=>{tl(e),nl(e)},il=O(1,`<span class="act-step dim"><span class=spin></span> </span>`,`Db `,Wc),al=N(6,e=>il(e,e._.q&&e._.t?0:1)),ol=N(5,e=>V(e.e,e._.q===`delete`?`Deleting…`:e._.r?`Really delete?`:`Delete`)),sl=I(52,e=>{zo(e.a,!!e._.q),z(e.d,`disabled`,!!e._.q),al(e),ol(e)}),cl=L(`h17`,e=>A(e.d,`click`,function(){e._.r?(Pu(e._,!1),e._.ag(`delete`)):(Pu(e._,!0),setTimeout(()=>{Pu(e._,!1)},4e3))})),ll=e=>{sl(e),ul(e),dl(e),pl(e),e.a,Lo(e.a,yc(e)),Ro(e.a,`btn primary`),Bo(e.a),cl(e)},ul=I(53,e=>{B(e.d,`armed`,e._.r),ol(e)}),dl=I(55,al),fl=O(2,`<button type=button class=btn> </button>`,` D `,rl,`<button type=button class=btn>Restore</button>`,` `,el),pl=I(58,e=>fl(e,e._.z===`active`?0:1)),ml=st(`h27`,(e=>`${e}<!><div class=spacer></div><!><button type=button class="btn danger"> </button>`)(Fo),(e=>`/${e}&%c%b D l`)(Io),ll),hl=I(51,e=>V(e.a,e._._._.p),e=>e._._._),gl=st(`h18`,` `,` `,hl),_l=e=>{Sr(e.a,gl(e)),vr(e.a,`inline`),Er(e.a,hd(e)),hr(e.a),br(e.a),Tr(e.a)},vl=O(3,`<span class=spin></span>`,0,0,`<button class=cur-remove> </button>`,` D `,Yc),yl=N(8,e=>vl(e,+!e._._.n.has(e.h))),bl=I(49,yl,e=>e._._),xl=bl,Sl=M(6,e=>{V(e.a,e.g),Xc(e)}),Cl=M(7,e=>{V(e.b,e.h),yl(e),Zc(e)}),wl=O(2,`<span class="cur-base mono" title="Base branch">⎇ <!></span>`,`Db%`,gc),Tl=N(11,e=>wl(e,+(e.j===e.k))),El=M(9,e=>{Tl(e),hc(e)}),Dl=M(10,Tl),Ol=(e,t)=>kl(e,t[0]),kl=M(5,e=>{Sl(e,e.f?.worktree),Cl(e,e.f?.full_name),El(e,e.f?.base_branch),Dl(e,e.f?.default_branch)}),Al=O(0,`<div class="pr-repo-name mono dim"> </div>`,`D `,vc),jl=I(47,e=>Al(e,e._._._.l>1?0:1),e=>e._._._),Ml=jl,Nl=k(1,`<li><span> </span><!><a class=pr-link target=_blank rel=noopener><span class="dim mono">#<!></span> </a><span class=pr-spacer></span><!></li>`,`D D l%b Eb%l lb%`,0,zc),Pl=(e,t)=>Nl(e,[t,`number`]),Fl=(e,t)=>{Il(e,t[0]?.worktree),Pl(e,t[0]?.prs),Ll(e,t[0]?.full_name)},Il=M(4,_c),Ll=M(6),Rl=O(0,`<button class=btn title="Confirm every merged/closed PR is done — remove them from this list">Clear <!> finished</button>`,` Db%`,Hc),zl=M(4,e=>{Rl(e,+!e.e),Bc(e)}),Bl=k(3,`<div class=pr-repo><!><ul class=pr-list></ul></div>`,`D%b `,Ml,Fl),Vl=I(46,e=>{zl(e,(e._._.k||[]).reduce((e,t)=>e+t.prs.filter(e=>e.state!==`OPEN`).length,0)),Bl(e,[e._._.k.filter(e=>e.prs.length),`full_name`])},e=>e._._),Hl=L(`h21`,e=>A(e.b,`click`,function(){e._._.a7()})),Ul=e=>{Vl(e),Wl(e),Uo(e.c),Wo(e.c,13),Go(e.c),Hl(e)},Wl=I(48,e=>{B(e.b,`spinning`,e._._.m),z(e.b,`disabled`,e._._.m)},e=>e._._),Gl=k(0,`<li><span class="mono proc-cmd"><!><!></span><button class=proc-kill>×</button></li>`,`D D%b%l `,Tc,Ec),Kl=I(45,e=>Gl(e,[e._._.j,`pid`]),e=>e._._),ql=Kl,Jl=Xe(12),Yl=I(44,e=>{B(e.e,`spinning`,e._.i),z(e.e,`disabled`,e._.i)}),Xl=L(`h26`,e=>A(e.e,`click`,function(){Jl(e)()})),Zl=e=>{Yl(e),$l(e),tu(e),iu(e),su(e),lu(e),du(e),fu(e),mu(e),hu(e),gu(e),_u(e),vu(e),Uo(e.f),Wo(e.f,13),Go(e.f),qe(e,9,yu),ws(e.j),Ds(e.j,_d(e)),Es(e.j,gd(e)),Ns(e.j),Xl(e)},Ql=O(11,`<section><h3>Processes</h3><ul class=procs></ul></section>`,`Db `,ql),$l=I(45,e=>Ql(e,e._.j&&e._.j?.length?0:1)),eu=O(3,(e=>`<section><div class=repos-head><h3>Pull requests</h3><!><button class=icon-btn title="Refresh PRs">${e}</button></div><!></section>`)(Vo),(e=>`Eb%b D/${e}&m%l`)(Ho),Ul),tu=I(46,e=>eu(e,e._.k&&e._.k.some(e=>e.prs.length)?0:1)),nu=k(7,`<li class="cur-repo pending"><span class=spin></span><span class="dim cur-full"> </span></li>`,`DbD `,0,mc),ru=N(13,e=>nu(e,[[...e._.n].filter(t=>!e._.aa.has(t)),e=>e])),iu=I(49,ru),au=O(8,`<li class="dim empty-note">No repos yet — search below to add one.</li>`),ou=N(14,e=>au(e,!e._.a2&&!e._.o?0:1)),su=I(50,ou),cu=O(2,Qn,(e=>`/${e}&`)($n),_l),lu=I(51,e=>cu(e,+!e._.p)),uu=k(6,`<li class=cur-repo><span class="mono cur-worktree"><!>/</span><span class="dim cur-full"> </span><!><!></li>`,`E%lD l%b%`,xl,Ol),du=I(56,e=>uu(e,[e._.x,`full_name`])),fu=I(57,e=>V(e.a,e._.y)),pu=N(15,e=>V(e.b,e._.a0||e._.a1)),mu=I(59,pu),hu=I(60,pu),gu=I(61,ou),_u=I(62,e=>{ks(e.j,e._.aa),ru(e)}),vu=I(63,e=>Ms(e.j,vd(e))),yu=et(`h23`,M(12)),bu=ot(`h28`,((e,t)=>`<header class=manage-head><div><h2> </h2><p class="dim mono"> </p></div></header><!><!><section><div class=repos-head><h3>Repos</h3><button class=icon-btn title="Refresh repo list">${e}</button></div><ul class=cur-repos><!><!><!></ul>${t}</section><!><!>`)(Vo,Ko),((e,t)=>`F lD n%b%bEb D/${e}&mD%b%b%l0${t}&l%c`)(Ho,qo),Zl,0,`B1`),xu=j(8,F(Yl)),Su=j(12,F(Wl)),Cu=M(40,F(vu)),wu=N(39,e=>Cu(e,yd(e)),3),Tu=M(41),Eu=N(38,e=>Tu(e,bd(e)),3),Du=M(37,e=>{wu(e),Eu(e)}),Ou=F(iu,bl),ku=j(13,e=>{Ku(e,e.n?.size),Du(e,xd(e)),wu(e),Eu(e),Ou(e)}),Au=j(15,F(lu,hl)),ju=N(32,L(`h29`,e=>xt(e,{busyCount:e.o,pendingAction:e.q,onMount:function(){let t=new AbortController,n=t.signal;return bn().addEventListener(`workspace.progress`,t=>{(this.pendingAction||this.busyCount)&&t.data?.message&&t.data.op===e.v&&Iu(e,t.data.message)},{signal:n}),e.a3(n),e.a4(n,!1).then(()=>e.a4(n,!0)),{abort:t}},onDestroy:function(){this.abort.abort()}})),4),Mu=F(sl,tl,Qc),Nu=j(16,e=>{Ys(e.a,!e.q),ju(e),Mu(e)}),Pu=j(17,F(ul)),Fu=j(18,F(qc)),Iu=j(19,F(dl,Uc));function Lu(e){ic(e.a),ac(e.a,Yt({content:ml(e)})),Hs(e.a,bu(e)),nc(e.a),xu(e,!1),Su(e,!1),ku(e,new Set),Au(e,null),Nu(e,null),Pu(e,!1),Fu(e,null),Iu(e,null)}var Ru=j(9,F($l,Kl)),zu=M(34),Bu=N(31,e=>zu(e,Sd(e)),2),Vu=F(tu,Vl),Hu=j(10,e=>{Wu(e,e.k?.length),Bu(e),Vu(e)}),Uu=(e,t)=>{Ru(e,lc.get(`procs:${t}`)||null),Hu(e,lc.get(`prs:${t}`)||null)},Wu=M(11,F(jl)),Gu=F(su),Ku=M(14,e=>{ju(e),Gu(e)}),qu=M(20,e=>{td(e,e.u?.id),id(e,e.u?.repos),sd(e,e.u?.name),cd(e,e.u?.status),ld(e,e.u?.display_path),ud(e,e.u?.path),Eu(e)}),Ju=M(43),Yu=M(29,e=>{Ju(e,Cd(e)),ju(e)}),Xu=M(33),Zu=M(30,e=>{Xu(e,Td(e)),ju(e),Bu(e)}),Qu=M(35),$u=M(42),ed=N(22,e=>$u(e,Od(e))),td=M(21,e=>{Yu(e,wd(e)),Zu(e,Ed(e)),Qu(e,Dd(e)),ju(e),Bu(e),wu(e),ed(e)}),nd=M(36,F(_u)),rd=F(du),id=M(23,e=>{ad(e,e.x?.length),nd(e,new Set(e.x.map(e=>e.full_name))),rd(e)}),ad=M(28,F(gu)),od=F(fu),sd=M(24,e=>{rc(e.a,`Manage ${e.y}`),od(e)}),cd=M(25,F(pl)),ld=M(26,F(mu)),ud=M(27,F(hu)),dd=(e,t)=>{Uu(e,t?.id),qu(e,t)},fd=M(5,e=>{wu(e),Eu(e)}),pd=M(6,e=>{tc(e.a,e.g),ed(e)}),md=(e,t)=>Qs(e.a,t);function hd(e){return function(){Au(e._._,null)}}function gd(e){return function(t){xu(e._,t)}}function _d(e){return function(t){Au(e._,t)}}function vd(e){return function(t,n){e._.ae(t,n)}}function yd(e){return async(t,n)=>{if(!(!t||e.n.has(t))){Au(e,null),e.ab(t,!0);try{let r=await H(`/api/workspaces/${e.v}/repos`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({fullName:t,baseBranch:n})});e.f?.(r)}catch(t){Au(e,String(t.message||t))}e.ab(t,!1)}}}function bd(e){return async t=>{if(!e.n.has(t.full_name)){Au(e,null),e.ab(t.full_name,!0);try{await H(`/api/workspaces/${e.u?.id}/repos/${encodeURIComponent(t.worktree)}`,{method:`DELETE`}),e.f?.({...e.u,repos:(e.u?.repos).filter(e=>e.full_name!==t.full_name)})}catch(t){Au(e,String(t.message||t))}e.ab(t.full_name,!1)}}}function xd(e){return(t,n)=>{let r=new Set(e.n);n?r.add(t):r.delete(t),ku(e,r)}}function Sd(e){return async()=>{for(let t of e.k||[])for(let n of t.prs)n.state!==`OPEN`&&await H(`/api/workspaces/${e.v}/prs`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({fullName:t.full_name,number:n.number})}).catch(()=>{});await e.a4(void 0,!1)}}function Cd(e){return async t=>{await fetch(`/api/procs/${t}`,{method:`DELETE`}),setTimeout(()=>e.a3(void 0),500)}}function wd(e){return async t=>{try{let n=await H(`/api/workspaces/${e.v}/procs`,{signal:t});Ru(e,n),lc.set(`procs:${e.v}`,n)}catch{}}}function Td(e){return async()=>{Su(e,!0),await e.a4(void 0,!0),Su(e,!1)}}function Ed(e){return async(t,n)=>{try{let r=await H(`/api/workspaces/${e.v}/prs${n?`?refresh`:``}`,{signal:t});Hu(e,r),lc.set(`prs:${e.v}`,r)}catch{}}}function Dd(e){return async(t,n)=>{Au(e,null);try{let r=await H(`/api/workspaces/${e.v}/prs`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({fullName:t,number:n})});Hu(e,r),lc.set(`prs:${e.v}`,r)}catch(t){Au(e,String(t.message||t))}}}function Od(e){return async t=>{Au(e,null),Nu(e,t),Iu(e,null);try{await H(`/api/workspaces/${e.v}`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({action:t})}),t===`delete`&&e.g?.(!1)}catch(t){Au(e,String(t.message||t))}finally{Nu(e,null),Iu(e,null)}}}R(`h10`,hd),R(`h13`,gd),R(`h12`,_d),R(`h11`,vd),R(`h6`,yd),R(`h7`,bd),R(`h5`,xd),R(`h3`,Sd),R(`h9`,Cd),R(`h0`,wd),R(`h2`,Td),R(`h1`,Ed),R(`h4`,Dd),R(`h8`,Od);var kd=Bs,Ad=(e=>`/${e}&`)(Vs),jd=P(1,0,e=>V(e.a,e._.g)),Md=jd,Nd=ot(`j9`,`Cancel`),Pd=O(1,`<span class=spin></span>`,0,0,`<span class=step-done>✓</span>`),Fd=I(31,e=>{B(e.a,`active`,e.M===e._._._.n-1),Pd(e,e.M===e._._._.n-1?0:1)},e=>e._._._),Id=Fd,Ld=(e,t)=>V(e.c,t),Rd=k(0,`<li><!><!></li>`,` D%b%`,Id,(e,t)=>Ld(e,t[0])),zd=I(30,e=>Rd(e,[e._._.m]),e=>e._._),Bd=zd,Vd=I(29,e=>V(e.a,e._._._.l),e=>e._._._),Hd=st(`j11`,` `,` `,Vd),Ud=e=>{Sr(e.a,Hd(e)),vr(e.a,`inline`),Er(e.a,Jf(e)),hr(e.a),br(e.a),Tr(e.a)},Wd=I(28,e=>z(e.c,`disabled`,e._._.k),e=>e._._),Gd=L(`j12`,e=>A(e.c,`click`,function(){e._._.w(e.f)})),Kd=e=>{Wd(e),Gd(e)},qd=M(5,e=>{V(e.a,e.f),z(e.c,`title`,`Remove ${e.f}`)}),Jd=O(1,`<span class="cur-base mono" title="Base branch">⎇ <!></span>`,`Db%`,Md),Yd=M(6,e=>{Jd(e,+!e.g),jd(e)}),Xd=(e,t)=>{qd(e,t[0]?.fullName),Yd(e,t[0]?.baseBranch)},Zd=Xe(9),Qd=I(24,e=>At(e,`b`,e._.g,Yf(e))),$d=L(`j14`,e=>{jt(e,`b`),A(e.c,`click`,function(){Zd(e)()})}),ef=e=>{Qd(e),tf(e),rf(e),of(e),lf(e),df(e),ff(e),pf(e),Uo(e.d),Wo(e.d,13),Go(e.d),qe(e,6,mf),ws(e.g),Ds(e.g,Zf(e)),Es(e.g,Xf(e)),$d(e)},tf=I(25,e=>{B(e.c,`spinning`,e._.h),z(e.c,`disabled`,e._.h)}),nf=k(4,`<li class=cur-repo><span class=cur-full> </span><!><button class=cur-remove>×</button></li>`,`E l%b `,Kd,Xd),rf=I(26,e=>{ks(e.g,new Set(e._.i.map(e=>e.fullName))),nf(e,[e._.i,`fullName`])}),af=O(5,`<li class="dim empty-note">No repos yet — search below to add one (or create empty).</li>`),of=I(27,e=>af(e,+!!e._.j)),sf=O(8,`<ul class=steps></ul>`,` `,Bd),cf=N(10,e=>sf(e,e._.k&&e._.n?0:1)),lf=I(28,e=>{z(e.b,`disabled`,e._.k),Ns(e.g,e._.k),cf(e)}),uf=O(0,Qn,(e=>`/${e}&`)($n),Ud),df=I(29,e=>uf(e,+!e._.l)),ff=I(31,cf),pf=I(32,e=>Ms(e.g,Qf(e))),mf=et(`j13`,M(9)),hf=ot(`j16`,((e,t)=>`<header class=manage-head><div><h2>New workspace</h2></div></header><!><label class=field><span>Name</span><input placeholder=my-feature autofocus></label><section><div class=repos-head><h3>Repos</h3><button class=icon-btn title="Refresh repo list">${e}</button></div><ul class=cur-repos><!><!></ul>${t}</section><!><!>`)(Vo,Ko),((e,t)=>`b%bDb lEb D/${e}&mD%b%l0${t}&l%c`)(Ho,qo),ef,0,`B2`),gf=N(3,e=>z(e.a,`disabled`,e._.k||!e._.g.trim())),_f=I(24,gf),vf=L(`j10`,e=>A(e.a,`click`,function(){e._.x()})),yf=e=>{_f(e),bf(e),e.c,Lo(e.c,Nd(e)),Ro(e.c,`btn`),Bo(e.c),vf(e)},bf=I(28,e=>{V(e.b,e._.k?`Creating…`:`Create workspace`),zo(e.c,e._.k),gf(e)}),xf=st(`j15`,(e=>`<button type=button class="btn primary"> </button><div class=spacer></div>${e}`)(Fo),(e=>` D lb/${e}&`)(Io),yf),Sf=M(23),Cf=N(20,e=>Sf(e,$f(e)),5),wf=F(_f,Qd),Tf=j(6,e=>{Cf(e),wf(e)}),Ef=j(7,F(tf)),Df=M(21,F(pf)),Of=M(22),kf=F(rf),Af=j(8,e=>{Vf(e,e.i?.length),Df(e,ep(e)),Of(e,tp(e)),Cf(e),kf(e)}),jf=N(19,L(`j17`,e=>xt(e,{busy:e.k,onMount:function(){let t=new AbortController;return bn().addEventListener(`workspace.progress`,t=>{this.busy&&t.data?.message&&e.s([t.data])},{signal:t.signal}),{abort:t}},onDestroy:function(){this.abort.abort()}}))),Mf=F(bf,lf,Wd),Nf=j(10,e=>{Ys(e.a,!e.k),jf(e),Mf(e)}),Pf=j(11,F(df,Vd)),Ff=M(18,e=>{jf(e),Cf(e)}),If=N(17,e=>Ff(e,np(e)),2),Lf=F(zd),Rf=j(12,e=>{Hf(e,e.m?.length),If(e),Lf(e)}),zf=(e,t)=>{Uf(e,t.op),Wf(e,t.last)};function Bf(e){ic(e.a),ac(e.a,Yt({content:xf(e)})),Hs(e.a,hf(e)),rc(e.a,`New workspace`),nc(e.a,`new-ws`),Tf(e,``),Ef(e,!1),Af(e,[]),Nf(e,!1),Pf(e,null),Rf(e,[]),zf(e,{last:0,op:``})}var Vf=M(9,F(of)),Hf=M(13,F(ff,Fd)),Uf=M(15,e=>{If(e),Cf(e)}),Wf=M(16,e=>{If(e),Cf(e)}),Gf=M(3,Cf),Kf=(e,t)=>Qs(e.a,t),qf=(e,t)=>tc(e.a,t);function Jf(e){return function(){Pf(e._._,null)}}function Yf(e){return t=>{Tf(e._,t)}}function Xf(e){return function(t){Ef(e._,t)}}function Zf(e){return function(t){Pf(e._,t)}}function Qf(e){return function(t,n){e._.v(t,n)}}function $f(e){return async()=>{Nf(e,!0),Pf(e,null),Rf(e,[]),e.p=Math.random().toString(36).slice(2,10);try{e.q=(await H(`/api/progress`)).seq}catch{}let t=setInterval(async()=>{try{let t=await H(`/api/progress?since=${e.q}&op=${e.p}`);e.s(t.messages)}catch{}},800);try{let t=await H(`/api/workspaces`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({name:e.g,repos:e.i,opId:e.p})});Nf(e,!1),e.d?.(t)}catch(t){Nf(e,!1),Pf(e,String(t.message||t))}finally{clearInterval(t)}}}function ep(e){return(t,n)=>{!t||e.i.some(e=>e.fullName===t)||Af(e,e.i.concat({fullName:t,baseBranch:n}))}}function tp(e){return t=>{Af(e,e.i.filter(e=>e.fullName!==t))}}function np(e){return t=>{for(let n of t)n.op===e.p&&(n.seq&&n.seq<=e.q||(n.seq&&(e.q=n.seq),Rf(e,e.m.concat(n.message))))}}R(`j5`,Jf),R(`j0`,Yf),R(`j8`,Xf),R(`j7`,Zf),R(`j6`,Qf),R(`j4`,$f),R(`j2`,ep),R(`j3`,tp),R(`j1`,np);var rp=Nr,ip=(e=>`/${e}&`)(Pr);function ap(e){Rr(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 op=(e,t)=>Ir(e.a,t),sp=(e,t)=>Lr(e.a,t),cp=`<!><!><!>`,lp=N(9,e=>B(e.d,`armed`,e._._._._.w===e.i)),up=N(10,e=>z(e.d,`title`,e._._._._.w===e.i?`Really kill ${e.g}?`:`Kill ${e.g} (pid ${e.i})`),2),dp=I(39,e=>{lp(e),up(e)},e=>e._._._._),fp=L(`n8`,e=>{A(e.b,`click`,function(){window.open(`http://${location.hostname}:${e.h}`,`_blank`,`noopener`)}),A(e.d,`click`,function(){e._._._._.w===e.i?(jm(e._._._._,null),fetch(`/api/procs/${e.i}`,{method:`DELETE`}).catch(()=>{})):e._._._._.z(()=>{jm(e._._._._,e.i)})})}),pp=e=>{dp(e),fp(e)},mp=M(6,e=>{z(e.a,`title`,e.g),up(e)}),hp=M(7,e=>{z(e.b,`title`,`Open http://${typeof location>`u`?`localhost`:location.hostname}:${e.h}`),V(e.c,e.h)}),gp=M(8,e=>{lp(e),up(e)}),_p=(e,t)=>{mp(e,t[0]?.cmd),hp(e,t[0]?.port),gp(e,t[0]?.pid)},vp=N(12,e=>V(e.b,e._._.c(e._.c))),yp=I(3,vp,e=>e._._),bp=L(`n7`,e=>A(e.a,`click`,function(){e._._._._._.u?.(e._.e,e.l)})),xp=e=>{yp(e),Sp._(e),wp._(e),bp(e)},Sp=He(0,vp),Cp=N(10,e=>z(e.a,`title`,`${e._.e} — ${e.j}${e.h===`APPROVED`?` (approved)`:e.h===`CHANGES_REQUESTED`?` (changes requested)`:``}`),2),wp=He(0,Cp),Tp=N(8,e=>dt(e.a,{draft:e.g,rejected:e.h===`CHANGES_REQUESTED`})),Ep=M(6,Tp),Dp=M(7,e=>{V(e.d,e.h===`APPROVED`?` ✓`:e.h===`CHANGES_REQUESTED`?` ✗`:``),Tp(e),Cp(e)}),Op=M(9,Cp),kp=M(11,e=>V(e.c,e.l)),Ap=k(0,`<button class="chip pr"><!>#<!><!></button>`,` D%c%b%`,xp,(e,t)=>{Ep(e,t[0]?.isDraft),Dp(e,t[0]?.reviewDecision),Op(e,t[0]?.title),kp(e,t[0]?.number)}),jp=(e,t)=>Ap(e,[t||[],`number`]),Mp=(e,t)=>Np(e,t[0]),Np=M(2,e=>{jp(e,e.c?.prs),Pp(e,e.c?.worktree),Sp(e)}),Pp=M(4,wp),Fp=M(2,F(yp)),Ip=k(0,`<!><!><!>`,`b%`,0,Mp),Lp=I(6,e=>{Fp(e,Zm(e)),Ip(e,[e._._.c||[],`full_name`])},e=>e._._),Rp=e=>{Lp(e),Bp(e)},zp=k(1,`<span class="chip port-chip"><button class=port-open>:<!></button><button class=port-kill>×</button></span>`,` D Db%l `,pp,_p),Bp=I(7,e=>zp(e,[e._._.d||[],`port`]),e=>e._._),Vp=N(11,e=>B(e.a,`current`,e.k===e._._._.q)),Hp=I(37,Vp,e=>e._._._),Up=L(`n6`,e=>{A(e.b,`click`,function(){e._._._.r?.(e.k)}),A(e.f,`click`,function(){e._._._.s?.(e.j)}),A(e.h,`click`,function(){e._._._.v===e.k?(Am(e._._._,null),e._._._.t?.(e.k)):e._._._.z(()=>{Am(e._._._,e.k)})})}),Wp=e=>{Hp(e),Kp(e),e.d,si(e.d,13),di(e.d,`sess-icon`),ap(e.g),op(e.g,12),sp(e.g),Up(e)},Gp=N(12,e=>{B(e.h,`armed`,e._._._.v===e.k),z(e.h,`title`,e._._._.v===e.k?`Really kill this session?`:`Kill session`)}),Kp=I(38,Gp,e=>e._._._),qp=M(10,e=>{Vp(e),Gp(e)}),Jp=(e,t)=>ut(e.c,[`dot`,Mr(t)]),Yp=N(16,e=>V(e.e,e.p||e.o)),Xp=M(14,e=>{ui(e.d,e.o),Yp(e)}),Zp=M(15,Yp),Qp=(e,t)=>$p(e,t[0]),$p=M(9,e=>{qp(e,e.j?.id),Jp(e,e.j?.state),Xp(e,e.j?.agent),Zp(e,e.j?.title)}),em=L(`n4`,e=>A(e.a,`click`,function(t,n){n.closest(`[popover]`)?.hidePopover(),e._._._._.n?.(e.e)})),tm=e=>{e.b,si(e.b,14),di(e.b),em(e)},nm=M(4,e=>{ui(e.b,e.e),V(e.c,e.e)}),rm=k(2,(e=>`<button>${e}<!></button>`)(ei),(e=>` D/${e}&%l`)(`b%c`),tm,(e,t)=>nm(e,t[0])),im=I(35,e=>rm(e,[[...e._._._.o||[],`shell`],e=>e]),e=>e._._._),am=(e,t)=>{z(e.a,`popovertarget`,t),z(e.c,`id`,t)},om=L(`n5`,e=>A(e.c,`toggle`,function(t,n){if(t.newState===`open`){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`}})),sm=e=>{im(e),e.b,ui(e.b,`shell`),si(e.b,12),di(e.b),am(e,Je(e)),om(e)},cm=L(`n3`,e=>A(e.a,`click`,function(){e._._._.l?.()})),lm=e=>{Vr(e.b),Hr(e.b,12),Ur(e.b),cm(e)},um=I(31,e=>B(e.a,`current`,e._._.i),e=>e._._),dm=L(`n9`,e=>{A(e.b,`click`,function(){e._._.j()}),A(e.f,`click`,function(){e._._.m?.()})}),fm=e=>{um(e),mm(e),hm(e),gm(e),_m(e),ym._(e),bm._(e),xm._(e),Kr(e.g),qr(e.g,12),Jr(e.g),dm(e)},pm=O(4,(e=>`<button class="row-icon new-sess" title="Review changes">${e}</button>`)(zr),(e=>` D/${e}&l`)(Br),lm),mm=I(33,e=>pm(e,+!e._._.l),e=>e._._),Wee=O(7,(e=>`<button class="row-icon new-sess" title="New session">${e}</button><div popover=auto class=new-session-pop></div>`)(ei),(e=>` D/${e}&l b`)(`b%c`),sm),hm=I(34,e=>Wee(e,+!e._._.n),e=>e._._),Gee=k(8,((e,t)=>`<div class=side-sess><button class=side-sess-btn><span></span>${e}<!></button><button class=row-icon title="Rename session">${t}</button><button class=close>×</button></div>`)(ei,rp),((e,t)=>` D D b/${e}&%l D/${t}&l l`)(`b%c`,ip),Wp,Qp),Kee=(e,t)=>Gee(e,[t.length>1?t:[],`id`]),gm=I(36,e=>Kee(e,e._._.p||[]),e=>e._._),_m=I(40,e=>V(e.d,e._._.a1),e=>e._._),qee=O(9,`<div class=side-chips><!><!></div>`,`D%b%`,Rp),vm=N(11,e=>qee(e,(e._.c||[]).some(e=>(e.prs||[]).length)||(e._.d||[]).length?0:1)),ym=P(0,1,vm),bm=P(0,1,vm),xm=P(0,1,e=>ut(e.c,[`dot`,e._.e])),Sm=I(31,e=>B(e.a,`current`,e._._.i),e=>e._._),Jee=L(`n2`,e=>A(e.a,`click`,function(){e._._.j()})),Yee=e=>{Sm(e),Cm(e),wm(e),Tm._(e),Jee(e)},Cm=I(32,e=>V(e.b,(e._._.k??0)+1),e=>e._._),wm=I(40,e=>z(e.a,`title`,e._._.a1),e=>e._._),Tm=P(0,0,e=>ut(e.c,[`dot`,e._.e])),Xee=M(4,e=>{Tm(e),xm(e)}),Zee=(e,t)=>{tte(e,t?.repos),rte(e,t?.ports),Xee(e,jr(t))},Em=N(5,e=>Zee(e,e._.g[e._.e])),Dm=P(0,0,Em),Qee=e=>{Dm._(e),Om._(e),km._(e)},Om=P(0,0,Em),$ee=O(0,`<button class="icon-btn rail-btn"> <span></span></button>`,` D b `,Yee,(e=>`<section class=side-ws><div class=side-ws-row><button class=side-ws-btn><span></span><span class=side-ws-name> </span></button><!><button class=row-icon title="Manage workspace">${e}</button><!></div><div class=side-sessions><!><!></div></section>`)(Wr),(e=>` E D bD m%b D/${e}&l%lD%b%m`)(Gr),fm),km=P(0,0,e=>$ee(e,+!e._.h)),ete=F(Lp),tte=M(2,e=>{ym(e),ete(e)}),nte=F(Bp),rte=M(3,e=>{bm(e),nte(e)}),Am=j(21,F(Kp)),jm=j(22,F(dp)),ite=(e,t)=>ote(e,t.timer);function Mm(e){Am(e,null),jm(e,null),ite(e,{timer:0})}var ate=M(25),ote=M(24,e=>ate(e,Qm(e))),ste=O(0,`<!><!><!>`,`b%`,Qee),cte=(e,t)=>{lte(e,t?.name),ste(e,+!t)},lte=M(27,F(wm,_m)),Nm=N(5,e=>cte(e,e.d.find(t=>t.id===e.e))),Pm=M(3,Nm),Fm=M(4,e=>{Nm(e),Dm(e)}),Im=M(6,Om),Lm=M(7,km),Rm=M(8,F(Sm,um)),zm=M(9),Bm=M(10,F(Cm)),Vm=M(11,F(mm)),Hm=M(12),Um=M(13,F(hm)),Wm=M(14,F(im)),Gm=M(15,F(gm)),Km=M(16,F(Hp)),qm=M(17),Jm=M(18),Ym=M(19),Xm=M(20);function Zm(e){return t=>{let n=e._._.c||[];if(n.length<2)return``;let r=t.full_name.split(`/`)[1];return n.some(e=>e.full_name!==t.full_name&&e.full_name.split(`/`)[1]===r)?t.full_name:r}}function Qm(e){return t=>{clearTimeout(e.y),t(),e.y=setTimeout(()=>{Am(e,null),jm(e,null)},3500)}}R(`n1`,Zm),R(`n0`,Qm);var ute=Nr,dte=(e=>`/${e}&`)(Pr);function fte(e){Rr(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 pte=(e,t)=>Ir(e.a,t),mte=(e,t)=>Lr(e.a,t),$m=Nr,eh=(e=>`/${e}&`)(Pr);function th(e){Rr(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 M9.5 21V3 M5.5 10L7.25 12L5.5 14`)}var nh=(e,t)=>Ir(e.a,t),rh=(e,t)=>Lr(e.a,t),hte=Nr,gte=(e=>`/${e}&`)(Pr);function _te(e){Rr(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 vte=(e,t)=>Ir(e.a,t),yte=(e,t)=>Lr(e.a,t),bte=Nr,xte=(e=>`/${e}&`)(Pr);function Ste(e){Rr(e.a,`M3 12H6L9 3L15 21L18 12H21`)}var ih=(e,t)=>Ir(e.a,t),ah=(e,t)=>Lr(e.a,t),oh=Nr,sh=(e=>`/${e}&`)(Pr);function ch(e){Rr(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 lh=(e,t)=>Ir(e.a,t),uh=(e,t)=>Lr(e.a,t),dh=((e,t)=>`<!><!><aside class=side-nav><div class=side-list></div><!><div class=side-foot><button class="icon-btn nav-toggle"></button><div class=spacer></div><!><button class=icon-btn title=Usage>${e}</button><button class=icon-btn title="New workspace">${t}</button></div></aside>`)(bte,oh),fh=((e,t)=>`b%b D b%bD c%b D/${e}&l D/${t}&n`)(xte,sh),ph=e=>{th(e.a),nh(e.a,15),rh(e.a)},mh=e=>{fte(e.a),pte(e.a,15),mte(e.a)},hh=P(5,0,e=>{B(e.a,`on`,e._.an),z(e.a,`title`,e._.an?`Disable agent-waiting notifications`:`Notify when an agent is waiting`)}),gh=L(`o19`,e=>A(e.a,`click`,function(){e._.ap()})),_h=e=>{hh._(e),_te(e.b),vte(e.b,15),yte(e.b),gh(e)},vh=L(`o16`,e=>A(e.a,`click`,function(){Zg(e._,!1)})),yh=N(7,e=>Vm(e.b,P_(e)),4),bh=I(56,yh,e=>e._._),xh=L(`o18`,e=>{A(e.a,`mouseenter`,function(){e._.i()}),A(e.a,`mouseleave`,function(){e._.j()})}),Sh=e=>{bh(e),Ch(e),Th(e),Eh(e),Oh(e),kh(e),Ah(e),Nh(e),Ph(e),Fh(e),Ih(e),Lh(e),zh._(e),Vh._(e),Hh._(e),Mm(e.b),Hm(e.b,F_(e)),Lm(e.b),Bm(e.b),xh(e)},Ch=I(57,e=>Wm(e.b,e._._.a2),e=>e._._),wh=N(3,e=>Um(e.b,I_(e))),Th=I(58,wh,e=>e._._),Eh=I(59,yh,e=>e._._),Dh=N(5,e=>Gm(e.b,e.c===e._._.ad&&e._._.a5?e._._.a5:e._._.as[e.c]?.sessions||[]),3),Oh=I(60,Dh,e=>e._._),kh=I(61,e=>Jm(e.b,e._._.a7),e=>e._._),Ah=I(62,e=>Ym(e.b,e._._.a8),e=>e._._),jh=N(4,e=>Rm(e.b,e.c===e._._.ad)),Mh=N(6,e=>Km(e.b,e.c===e._._.ad&&e._._.ah===`term`?e._._.af:null),3),Nh=I(63,e=>{zm(e.b,z_(e)),Xm(e.b,R_(e)),qm(e.b,L_(e)),jh(e),yh(e),Dh(e),Mh(e)},e=>e._._),Ph=I(64,Mh,e=>e._._),Fh=I(65,e=>{yh(e),Mh(e)},e=>e._._),Ih=I(68,e=>Pm(e.b,e._._.ar),e=>e._._),Lh=I(69,e=>{Im(e.b,e._._.as),Dh(e)},e=>e._._),Rh=M(2,e=>{Fm(e.b,e.c),jh(e),wh(e),yh(e),Dh(e),Mh(e)}),zh=P(1,0,e=>Rh(e,e._.d)),Bh=N(8,e=>ft(e.a,`top:${e._.e}px;left:${e._.f}px`)),Vh=P(1,0,Bh),Hh=P(1,0,Bh),Uh=N(4,e=>Rm(e.b,e.d===e._._.ad)),Wh=I(63,e=>{zm(e.b,B_(e)),Uh(e)},e=>e._._),Gh=L(`o17`,e=>{A(e.a,`mouseenter`,function(t,n){e._.i();let r=n.getBoundingClientRect();eg(e._,{id:e.d,top:r.top,left:r.right+8})}),A(e.a,`mouseleave`,function(){e._.j()})}),Kh=e=>{Wh(e),qh(e),Jh(e),Mm(e.b),Lm(e.b,!0),Vm(e.b),Hm(e.b),Um(e.b),Wm(e.b),Gm(e.b),Km(e.b),qm(e.b),Jm(e.b),Ym(e.b),Xm(e.b),Gh(e)},qh=I(68,e=>Pm(e.b,e._._.ar),e=>e._._),Jh=I(69,e=>Im(e.b,e._._.as),e=>e._._),Yh=(e,t)=>Bm(e.b,t),Xh=M(3,e=>{Fm(e.b,e.d),Uh(e)}),Zh=k(0,(e=>`<span>${e}</span>`)(cp),(e=>` D/${e}&l`)(`b%c`),Kh,(e,t)=>{Xh(e,t[0]),Yh(e,t[1])}),Qh=P(3,0,e=>Zh(e,[e._.aq,e=>e])),$h=O(1,(e=>`<div class=rail-pop>${e}</div>`)(cp),(e=>` D/${e}&l`)(`b%c`),Sh),eg=j(2,e=>{rg(e,e.c?.id),ig(e,e.c?.top),ag(e,e.c?.left),$h(e,+!e.c)}),tg=(e,t)=>cg(e,t.timer),ng=e=>{Qh._(e),eg(e,null),tg(e,{timer:0})},rg=M(3,zh),ig=M(4,Vh),ag=M(5,Hh),og=M(8),sg=M(9),cg=M(7,e=>{og(e,V_(e)),sg(e,H_(e))}),lg=N(7,e=>Vm(e.a,U_(e)),4),ug=He(2,lg),dg=e=>{ug._(e),fg._(e),mg._(e),hg._(e),_g._(e),vg._(e),yg._(e),xg._(e),Sg._(e),Cg._(e),wg._(e),Tg._(e),Mm(e.a),Hm(e.a,W_(e)),Lm(e.a),Bm(e.a)},fg=He(2,e=>Wm(e.a,e._.a2)),pg=N(3,e=>Um(e.a,G_(e))),mg=He(2,pg),hg=He(2,lg),gg=N(5,e=>Gm(e.a,e.c===e._.ad&&e._.a5?e._.a5:e._.as[e.c]?.sessions||[]),3),_g=He(2,gg),vg=He(2,e=>Jm(e.a,e._.a7)),yg=He(2,e=>Ym(e.a,e._.a8)),bg=N(6,e=>Km(e.a,e.c===e._.ad&&e._.ah===`term`?e._.af:null),3),xg=Ue(2,39,2,e=>{Rm(e.a,e.c===e._.ad),zm(e.a,J_(e)),Xm(e.a,q_(e)),qm(e.a,K_(e)),lg(e),gg(e),bg(e)}),Sg=He(2,bg),Cg=He(2,e=>{lg(e),bg(e)}),wg=He(2,e=>Pm(e.a,e._.ar)),Tg=He(2,e=>{Im(e.a,e._.as),gg(e)}),Eg=M(2,e=>{Fm(e.a,e.c),pg(e),lg(e),gg(e),bg(e)}),Dg=(e,t)=>Eg(e,t[0]),Og=F(qh,Ih),kg=M(53,e=>{wg(e),Og(e)}),Ag=N(38,e=>kg(e,e.y||[e.ab])),jg=M(37,e=>{Lg(e,e.ab?.id),Ag(e)}),Mg=k(2,(e=>`<!>${e}<!>`)(cp),(e=>`b/${e}&b`)(`b%c`),dg,Dg),Ng=M(52,e=>{Mg(e,[e.aq,e=>e]),Qh(e)}),Pg=N(40,e=>Ng(e,e.y?.length?e.y.filter(e=>e.status===`active`).map(e=>e.id):[e.ad])),Fg=N(55,e=>e.as[e.ad]),Ig=F(Wh,Nh),Lg=M(39,e=>{Pg(e),Fg(e),xg(e),Ig(e)}),Rg=jg,zg=F(Ph),Bg=Ve(41,e=>{Sg(e),zg(e)}),Vg=N(15,e=>Bg(e,e.n,e.o)),Hg=M(13,Vg),Ug=M(14,Vg),Wg=F(Fh),Gg=Ve(43,e=>{z(e.b,`hidden`,e.ah===`diff`),Cg(e),Wg(e)}),Kg=N(18,e=>Gg(e,e.q,e.r)),qg=M(16,Kg),Jg=M(17,Kg),Yg=O(0,`<div class=drawer-backdrop></div>`,` `,vh),Xg=N(48,e=>dt(e.b,{closed:!e.al,open:e.aj})),Zg=Ve(45,e=>{Yg(e,+!e.aj),Xg(e)}),Qg=N(21,e=>Zg(e,e.t,e.u)),$g=M(19,Qg),e_=M(20,Qg),t_=O(3,`<div class=side-rail></div><!><!>`,` b%`,ng),n_=O(4,ute,(e=>`/${e}&`)(dte),mh,$m,(e=>`/${e}&`)(eh),ph),r_=j(47,e=>{z(e.e,`title`,e.al?`Collapse sidebar`:`Expand sidebar`),t_(e,+!!e.al),n_(e,+!e.al),Xg(e)}),i_=M(51),a_=N(50,e=>i_(e,Y_(e))),o_=j(49,e=>{a_(e),hh(e)}),s_=O(5,(e=>`<button class="icon-btn notify-btn">${e}</button>`)(hte),(e=>` D/${e}&l`)(gte),_h),c_=L(`o21`,e=>{xt(e,{onMount:function(){Vn()&&Hn().then(t=>{o_(e,!!t)})}}),A(e.e,`click`,function(){r_(e,!e.al),_ee(e.al)}),A(e.g,`click`,function(){Zg(e,!1),e.a9?.()}),A(e.i,`click`,function(){Zg(e,!1),e.aa?.()})});function l_(e){Ste(e.h),ih(e.h,15),ah(e.h),ch(e.j),lh(e.j,16),uh(e.j),r_(e,Pn()),o_(e,!1),s_(e,+!Vn()),c_(e)}var u_=M(22,a_),d_=M(23,L(`o20`,e=>{e.x&&r_(e,Pn())})),f_=M(24,e=>{Pg(e),Ag(e)}),p_=F(Jh,Lh),m_=M(54,e=>{Fg(e),Tg(e),p_(e)}),h_=(e,t)=>m_(e,t||{}),g_=F(bh),__=M(26,e=>{ug(e),g_(e)}),v_=M(27),y_=F(Ch),b_=M(28,e=>{fg(e),y_(e)}),x_=F(Th),S_=M(29,e=>{mg(e),x_(e)}),C_=F(Eh),w_=M(30,e=>{hg(e),C_(e)}),T_=F(Oh),E_=M(31,e=>{_g(e),T_(e)}),D_=M(32),O_=F(kh),k_=M(33,e=>{vg(e),O_(e)}),A_=F(Ah),j_=M(34,e=>{yg(e),A_(e)}),M_=M(35),N_=M(36);function P_(e){return function(){eg(e._,null),e.c===e._._.ad?(Gg(e._._,e._._.ah===`diff`?`term`:`diff`),e._._.ah===`diff`&&e._._.a4?.()):(wn(e.c),e._._.a0?.(e.c))}}function F_(e){return function(){eg(e._,null),e._._.a1?.(e.c)}}function I_(e){return function(t){eg(e._,null),e._._.a3(e.c,t)}}function L_(e){return function(t){eg(e._,null),e.c===e._._.ad?(Bg(e._._,t),Gg(e._._,`term`)):e._._.a6?.(e.c,t)}}function R_(e){return function(t,n){eg(e._,null);let r=`${t}/${n}`;e.c===e._._.ad?(Gg(e._._,`diff`),e._._.a4?.(r)):(wn(e.c,r),e._._.a0?.(e.c))}}function z_(e){return function(){eg(e._,null),e.c!==e._._.ad&&e._._.a0?.(e.c)}}function B_(e){return function(){e.d!==e._._.ad&&e._._.a0?.(e.d)}}function V_(e){return()=>clearTimeout(e.h)}function H_(e){return()=>{clearTimeout(e.h),e.h=setTimeout(()=>{eg(e,null)},150)}}function U_(e){return function(){Zg(e._,!1),e.c===e._.ad?(Gg(e._,e._.ah===`diff`?`term`:`diff`),e._.ah===`diff`&&e._.a4?.()):(wn(e.c),e._.a0?.(e.c))}}function W_(e){return function(){Zg(e._,!1),e._.a1?.(e.c)}}function G_(e){return function(t){Zg(e._,!1),e._.a3(e.c,t)}}function K_(e){return function(t){Zg(e._,!1),e.c===e._.ad?(Bg(e._,t),Gg(e._,`term`)):e._.a6?.(e.c,t)}}function q_(e){return function(t,n){Zg(e._,!1);let r=`${t}/${n}`;e.c===e._.ad?(Gg(e._,`diff`),e._.a4?.(r)):(wn(e.c,r),e._.a0?.(e.c))}}function J_(e){return function(){e.c!==e._.ad&&(Zg(e._,!1),e._.a0?.(e.c))}}function Y_(e){return async()=>{try{e.an?(await Wn(),o_(e,!1)):(o_(e,await Un()),e.an||e.w?.(`Notifications blocked — allow them for this site in browser/system settings.`))}catch(t){o_(e,!1),e.w?.(`Notifications failed: ${String(t.message||t)}`)}}}R(`o13`,P_),R(`o11`,F_),R(`o12`,I_),R(`o15`,L_),R(`o14`,R_),R(`o10`,z_),R(`o9`,B_),R(`o7`,V_),R(`o8`,H_),R(`o4`,U_),R(`o2`,W_),R(`o3`,G_),R(`o6`,K_),R(`o5`,q_),R(`o1`,J_),R(`o0`,Y_);async function X_(e){try{return await navigator.clipboard.writeText(e),!0}catch{let t=document.createElement(`textarea`);t.value=e,t.style.cssText=`position:fixed;top:-100px;opacity:0;`,document.body.append(t),t.focus(),t.select();let n=document.execCommand(`copy`);return t.remove(),n}}function Z_(e){return e.filter(e=>e.pr).map(e=>`${e.worktree}#${e.pr.number}:${e.pr.headRefOid||e.head||``}`).sort().join(`\0`)}function Q_(e){return e.repos.flatMap(e=>e.prs.map(t=>`${e.worktree}#${t.number}:${t.headRefOid||``}`)).sort().join(`\0`)}var $_=null;function ev(){return $_}function tv(e){let t=[],n=[];for(let r of e.trim().split(/\s+/).filter(Boolean)){let e=r.startsWith(`!`),i=e?r.slice(1):r;i&&(e?n:t).push(nv(i))}return e=>!n.some(t=>t(e))&&t.every(t=>t(e))}function nv(e){if(!/[*?]/.test(e))return t=>Ar(e,t);let t=``;for(let n=0;n<e.length;n++){let r=e[n];r===`*`?e[n+1]===`*`?(t+=`.*`,n++):t+=`[^/]*`:t+=r===`?`?`[^/]`:r.replace(/[.+^${}()|[\]\\]/,`\\$&`)}try{let e=new RegExp(t,`i`);return t=>e.test(t)}catch{return t=>Ar(e,t)}}var rv=3;function iv(e,t){let n=new Map;for(let t of e)n.set(t.worktree,[...n.get(t.worktree)||[],t]);let r=[`Review feedback:`],i=0;for(let[e,a]of n){let n=(t||[]).find(t=>t.worktree===e);r.push(``),r.push(av(e,n));for(let e of a){i++;let t=n?.files.find(t=>t.path===e.path),a=e.side===`deletions`?t?.old:t?.new,o=e.side===`deletions`?`Old`:`New`,s=e.line_start===e.line_end?`line ${e.line_start}`:`lines ${e.line_start}-${e.line_end}`;if(r.push(``),r.push(`${i}. **${e.path}** (${o} ${s})`),a!=null){let t=sv(a,e.line_start,e.line_end,e.side),n=cv(t);r.push(``),r.push(lv(`${n}diff\n${t}\n${n}`))}r.push(``),r.push(lv(e.text))}}return r.join(`
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_B3VJsccP.js","assets/_9xw8jbbj.js","assets/_BCxZLbx3.js","assets/_D3xYfaOf.js","assets/_C-rQpLhV.js","assets/_U0FwxsZW.js","assets/_DzZk65e-.js","assets/_DxpiV80x.js","assets/_CEKQC0zT.js","assets/_BwD36Jxt.js","assets/_DuEDhE7_.js","assets/_MoGAjrcU.js","assets/_BXeXVLqQ.js","assets/_D0fCsOyy.js","assets/_CVaw8Um22.js","assets/_SgPPrTlV2.js","assets/_BUvwthbH2.js","assets/_CpYNKFv52.js","assets/_bTVj8UrX2.js","assets/_kIpfj7zU2.js","assets/_gzcpVVnB2.js","assets/_CleGVtQz2.js","assets/_1ekz7WZH2.js","assets/_DuSeBQp62.js","assets/_ByTPjRw62.js","assets/_BmHD_PQz.js","assets/_IMDOu8ab.js","assets/_RlilnCgQ.js","assets/_DxpMxX_U.js","assets/_Dvw8-jm8.js","assets/_BD5amGrQ.js","assets/_QYUGbx7I.js","assets/_CfAVvRJH.js","assets/_-PHnfq4a.js","assets/_qvuZuJzY.js","assets/_BtgxAMFg.js","assets/_L4EiQqOc.js","assets/_Ch8Be5o8.js","assets/_nefOiZv8.js","assets/_Cfo3E_wG.js","assets/_BaHq4SXp.js","assets/_BYOwaDjH.js","assets/_CQJs3lWb.js","assets/_CYNrtFtB.js","assets/_DmIc4jLQ.js","assets/_CY8IvGdO2.js","assets/_CBce3t8t2.js","assets/_DYvRD3hg2.js","assets/_Dl-2e7rI2.js","assets/_woXpYk--.js","assets/_CG70dRIO2.js","assets/_C1Q5Y-qX2.js","assets/_xSxIYOF32.js","assets/_CMTwhWsT2.js","assets/_4hF1nRbz2.js","assets/_Cow3qpju2.js","assets/_CLIa1YQd2.js","assets/_Dx-8-gkx.js","assets/_DLbMbJfH2.js","assets/_C8oCnwJJ2.js","assets/_Co9z77Nx.js","assets/_COiMaMJZ.js","assets/_h0ukKclW.js","assets/_BB-k_pmY.js","assets/_DyPhwgp5.js","assets/_CZnxQQgK.js","assets/_BtLeIMtD.js","assets/_B188UjZf.js","assets/_DY1svXxJ.js","assets/_BLtivKRU.js","assets/_DVTAwKKz.js","assets/_CT_4g0KI.js","assets/_DWQbgPoS.js","assets/_DJMQeKeT.js","assets/_DNzHuu0T.js","assets/_vUbaa6R_2.js","assets/_CRki4AYt2.js","assets/_DqKBuwfJ2.js","assets/_oqKa8noW.js","assets/_CnvKMtbv.js","assets/_IyjqRm3v.js","assets/_rLFTqkRN2.js","assets/_CacY0gHj2.js","assets/_B5eOa1yu.js","assets/_Dixweg8N.js","assets/_D1A_Heim2.js","assets/_O90oeIOV2.js","assets/_Oze5lLxj2.js","assets/_DOwzaHZ02.js","assets/_B3gFvitq2.js","assets/_Cfkwpbl82.js","assets/_BiFt_7mu2.js","assets/_CMLA9XwU2.js","assets/_CIsBeTH02.js","assets/_DlvFdJCo.js","assets/_BO7vkzOE.js","assets/_VD6oOoMX.js","assets/_DYh4cJsz.js","assets/_Bj61d0ZC2.js","assets/_DUq73rvH.js","assets/_BM315xPC.js","assets/_Cvrh5tZx2.js","assets/_C3ojQhq_.js","assets/_5m9S-EqP.js","assets/_L8AbGenz.js","assets/_ByJddavk.js","assets/_oJGy-rnh.js","assets/_z_rEl9X7.js","assets/_DnzEKJPD.js","assets/_vpBiEKFg2.js","assets/_yyKj-WvW2.js","assets/_BV_gjARS2.js","assets/_B_w1CUT_2.js","assets/_BNo-u1xU2.js","assets/_CnKTlQqQ2.js","assets/_B6D30XZt.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var e=Object.defineProperty,t=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],enumerable:!0});return n||e(r,Symbol.toStringTag,{value:`Module`}),r},n=/[\\;]/g,r=e=>e===`;`?`\\3B `:`\\\\`,i=function e(t,n,r){let i=``,a=``,o;if(t){if(typeof t!=`object`)i+=t;else if(Array.isArray(t))for(let s of t)o=e(s,n,r),o&&(i+=a+o,a=n);else for(let e in t)o=r(e,t[e]),o&&(i+=a+o,a=n)}return i},a=e=>(e+(e<26?10:e<962?334:11998)).toString(36),o,s,c=2,l=[],u=[],d=(e=>{for(let t=0;t<e.length;)e[t++](e[t++])}),f=e=>{(!o||e.b.F?.H!==0)&&e.c(e.b,e.d)},p,m=(e,t)=>t[1+e]||=(document.addEventListener(e,t,!0),1),h={},g=1e6,_,v=function e(t){t.H=0,t.D?.forEach(e),t.B?.forEach(Pe)},y,b,x=(e,t)=>e.T?.(t),S=new WeakMap,C,ee=function e(t,n,r){let i,o,s=0,c=0;for(;t<n.length;)if(i=n.charCodeAt(t++),o=s,s=0,i===32)r[a(c++)]=C;else if(i===37||i===49)C.replaceWith(C=r[a(c++)]=new Text),i===49&&(r[a(c++)]=Me());else if(i===38)return t;else if(i===47||i===48)t=e(t,n,r[a(c++)]=je(r.$,r.F)),i===48&&(r[a(c++)]=Me());else if(i<92)for(i=25*o+i-67;i--;)te();else if(i<107)for(i=10*o+i-97;i--;)ne();else if(i<117){for(i=10*o+i-107;i--;)C=C.parentNode||C;ne()}else s=o*10+i-117},te=()=>{if(C.firstChild)return C=C.firstChild;for(;!C.nextSibling&&C.parentNode;)C=C.parentNode;ne()},ne=()=>C=C.nextSibling||C,w={},re,ie,ae,oe,se={},T=/[\p{L}\p{N}]/gu,E=``,D={},ce={},O=ye((e,...t)=>{e=a(e);let n=`D`+e,r=[],i=0;for(;i<t.length;)r.push(ot(``,t[i++],t[i++],t[i++])());return(t,i)=>{i!==(t[n]??(t[`A`+e]&&0))&&Wt(t,e,r[t[n]=i],it)}}),le=ye((e,t,n)=>{e=a(e),t!==void 0&&(t=a(t)),n!==void 0&&(n=a(n));let r=`A`+e;return(i,a)=>{let o=i[e],s=o.nodeType===1,c=s?o:o.parentNode,l=i[r];l||(l=i[r]={},l.S=s?c.firstChild:i[t],l.K=s?c.lastChild:n===void 0?o.previousSibling:i[n]);let u=l.S;if(l.L&&u===l.K&&u.tagName===`T`){let e=u;e.firstChild||e.appendChild(new Text),l=i[r]={},l.S=u=e.firstChild,l.K=e.lastChild,e.replaceWith(...e.childNodes)}let d=s?!!c.firstChild:u.parentNode===c;a?d||Le(l,c,s?null:o):d&&(s&&(l.S=c.firstChild,l.K=c.lastChild),Re(l))}}),ue=ye((e,t,n,r)=>{e=a(e);let i=`A`+e,o=`D`+e;return(a,s,c)=>{let l=ve(s);if(a[o]!==(a[o]=l?.a||l)||t&&!(l||a[i])){if(Wt(a,e,l||(t?t(a):void 0),Gt),n&&(a[i].T=e=>n()(a,e)),typeof l==`string`){if(t){let e=t(a);Wt(a[i],`a`,e,it),e.f&&Ke(e.e,e.f,a[i].Aa)}}else l?.f&&Ke(l.e,l.f,a[i])}if(l){let e=a[i],n=c?.();if(typeof l==`string`)(t?pt:mt)(e,`a`,(r?n[0]:n)||{},ce[e.a.tagName]),(e.Ia||e.Ea)&&Se(e,Ut);else{for(let t in l.g)l.g[t](e,l.h[t]);if(l.d){if(r)l.d(e,l._?n[0]:n);else{let r=t?{...n,content:t(a)}:n||{};l.d(e,l._?r:[r])}}}}}}),de=ye(e=>{e=a(e);let t=`A`+e,n=`D`+e;return(r,i)=>{if(r[n]!==(r[n]=i?.a||i)&&(Wt(r,e,i,it),i?.f&&Ke(i.e,i.f,r[t])),i)for(let e in i.g)i.g[e](r[t],i.h[e])}}),k=ye(e=>(t,n,r,i,o)=>{t=a(t);let s=`A`+t,c=`O`+t,l=ot(``,n,r,i)();return(n,r)=>{let i=n[t],a=ke(n[s]),u=n[s]=[];n[c]=null;let d=a.length,f=i.nodeType>1?i.parentNode||a[0]?.S.parentNode:i,p,m,h=0;e(r,(e,t)=>{let r=u.length,i=a[r],s=d&&(p||e!==(i?.M??r)?(p||=a.reduce((e,t,n)=>n<r?e:(t.I=n,e.set(t.M??n,t)),new Map)).get(e):i&&(h++,i));s?(m=!0,p?.delete(e)):s=it(n.$,l,n,f),s.M=e,u.push(s),o?.(s,t)});let g=u.length,_=i!==f,v=null,y=d-1,b=g-1;if(_&&(d?(v=a[y].K.nextSibling,g||f.insertBefore(i,v)):g&&(v=i.nextSibling,i.remove())),!m){d&&(a.forEach(_?Ie:Ne),_||(f.textContent=``));for(let e of u)Le(e,f,v);return}if(p)p.forEach(Ie);else for(let e=g;e<d;e++)Ie(a[e]);for(;y>=h&&b>=h&&a[y]===u[b];)y--,b--;if(y+1<d&&(v=a[y+1].S),h>y||h>b){for(let e=h;e<=b;e++)Le(u[e],f,v);return}let x=b-h+1,S=Array(x),C=Array(x),ee=[],te=-1,ne,w,re;for(let e=x;e--;)S[e]=u[h+e].I??-1;for(let e=0;e<x;e++)if(~S[e]){if(te<0||S[ee[te]]<S[e])~te&&(C[e]=ee[te]),ee[++te]=e;else{for(ne=0,w=te;ne<w;)re=(ne+w)/2|0,S[ee[re]]<S[e]?ne=re+1:w=re;S[e]<S[ee[ne]]&&(ne>0&&(C[e]=ee[ne-1]),ee[ne]=e)}}for(w=ee[te],ne=te+1;ne-->0;)ee[ne]=w,w=C[w];for(let e=x;e--;)~te&&e===ee[te]?te--:Le(u[h+e],f,v),v=u[h+e].S}})(([e,t],n)=>{t||=Kt,typeof t==`string`?be(e,(e,r)=>n(e[t],[e,r])):be(e,(e,r)=>n(t(e,r),[e,r]))});function fe(e,t){return t?e:``}function pe(e,t){return t||t===0?me(e)+`:`+me(t+``):``}function me(e){return n.test(e)?e.replace(n,r):e}function he(e){return/^on[A-Z-]/.test(e)}function ge(e){return e[2]===`-`?e.slice(3):e.slice(2).toLowerCase()}function _e(e){return e!=null&&e!==!1}function ve(e){if(e){if(typeof e==`string`)return e;let t=e.content||e.default||e;if(`a`in t)return t}}function ye(e){return o=1,e}function be(e,t){if(e){let n=0;for(let r of e)t(r,n++)}}function xe(e,t,n,r,i=e.L){let a;if(n>=0&&(a=e[n])){if(a.d=r,a.e===c||p&&a.f)return;a.e=c}else a={a:i*1e6+n,b:e,c:t,d:r,e:c},n>=0&&(e[n]=a);eee(a)}function eee(e){let t=u.push(e)-1;for(;t;){let n=t-1>>1,r=u[n];if(e.a-r.a>=0)break;u[t]=r,t=n}u[t]=e}function Se(e,t){l.push(t,e)}function Ce(){let e=l;try{s=1,we()}finally{c++,s=0,u=[],l=[]}d(e)}function we(){for(;u.length;){let e=u[0],t=u.pop();if(e!==t){let e=0,n=u.length>>1,r=(u[0]=t).a;for(;e<n;){let t=(e<<1)+1,n=t+1;if(n<u.length&&u[n].a-u[t].a<0&&(t=n),u[t].a-r>=0)break;u[e]=u[t],e=t}u[e]=t}f(e)}}function Te(e,t){let n=e.A?.[t];n&&(e.A[t]=void 0,s?Se(n,Oe):Oe(n))}function Ee(e,t){return De(e),((e.A||={})[t]||=new AbortController).signal}function De(e,t){let n=e.F;n&&(n.B||=new Set).add(e),t&&(e.Z||=[]).push(t)}function Oe(e){e.abort()}function ke(e){return e?Array.isArray(e)?e:[e]:[]}function tee(e,t){if(e){if(Array.isArray(e))for(let n of e)t(n);else t(e)}}function nee(e,t){return e?Array.isArray(e)?(e.push(t),e):[e,t]:t}function A(e,t,n){e[1+t]===void 0&&m(t,Ae),e[1+t]=n||null}function Ae(e){let t=!s&&e.target;for(;t;)t[1+e.type]?.(e,t),t=e.bubbles&&!e.cancelBubble&&t.parentNode}function ree(e,t){let n=h[t]||=document.createElementNS(t,`template`);return n.innerHTML=e,n.content||n}function je(e,t){let n={L:g++,H:c,F:t,$:e};return _?.push(n),n}function Me(){return g++}function Ne(e){e.N?.D?.delete(e),v(e)}function Pe(e){e.Z?.forEach(Fe,e);for(let t in e.A)Te(e,t)}function Fe(e){e.delete(this)}function Ie(e){Ne(e),St(e.S,e.K)}function Le(e,t,n){Ct(t,n,e.S,e.K)}function Re(e){let t=new DocumentFragment;t.namespaceURI=e.S.parentNode.namespaceURI,Ct(t,null,e.S,e.K)}function ze(){y||(y=1,queueMicrotask(Be))}function Be(){requestAnimationFrame(iee),Ce()}function iee(){b||(b=new MessageChannel,b.port1.onmessage=()=>{y=0,Ce()}),b.port2.postMessage(0)}function j(e,t){let n=a(e);return(r,i)=>(s?r.H===c&&(r[n]=i,t?.(r)):(r[n]!==i||!(n in r))&&(r[n]=i,t)&&(ze(),xe(r,t,e)),i)}function Ve(e,t){let n=a(e),r=a(e+1),i=j(e,t);return(e,a,o)=>(s?(e[r]=o)&&(e[n]!==a||!(n in e))?(e[n]=a,t?.(e)):i(e,a):e[r]?e[r](a):i(e,a),a)}function M(e,t){return e=a(e),((n,r)=>{(n[e]!==r||!(e in n))&&(n[e]=r,t?.(n))})}function N(e,t,n=1,r=`L`){return r!==`L`&&(r=a(r)),i=>{i.H===c?~e in i?--i[~e]||t(i):i[~e]=n:xe(i,t,e,0,i[r])}}function He(e,t){e=a(e);let n=`A`+e,r=e=>{let r=ke(e[n]);r.length&&xe(e,()=>{for(let e of r)e.H>0&&e.H<c&&t(e)},-1,0,r[0].L)};return r._=t,r}function Ue(e,t,n,r){e=a(e),t=a(t),n!==`M`&&(n=a(n));let i=`A`+e,o=`O`+e,s=`_${t}`,l=e=>{let a=ke(e[i]);if(e.H<c&&a.length){let c=e[t];xe(e,()=>{let t=We(e,i,o,n);if(t&&s in t){let e=t.get(t[s]),n=t.get(c);e!==n&&(Ge(e,r),Ge(n,r))}else for(let t of ke(e[i]))Ge(t,r);t&&(t[s]=c)},-1,0,a[0].L)}};return l._=r,l}function We(e,t,n,r){let i=e[n]||=new Map;if(!i.size)for(let a of ke(e[t])){let t=a.M??a[r];if(t===void 0)return e[n]=null;a.M=t,i.set(t,a)}return i}function Ge(e,t){e&&e.H>0&&e.H<c&&t(e)}function P(e,t,n){e=a(e);let r=`A`+e,i=`D`+e,o=e=>{let a=e[r];a&&a.H>0&&a.H<c&&(e[i]||0)===t&&xe(a,n,-1)};return o._=n,o}function Ke(e,t,n){let r=e[t]||=new Set,{size:i}=r;r.add(n).size!==i&&De(n,r)}function F(...e){let[t]=e,n=t.a,r=t.b;for(let t=e.length;t--;)e[t].c=t;return t=>{if(t[n])for(let i of t[n])i.H>0&&i.H<c&&xe(i,e[i[r]||0],-1)}}function I(e,t,n,r){e=a(e);let i=(e=>{e[i.b]=i.c,t(e),Ke(n?n(e):e._,i.a,e)});return i.a=e,i.b=`C`+e,r&&R(r,i),i}function qe(e,t,n){e[a(t)].T=t=>n(e,t)}function Je({$:e}){let t=S.get(e)||0;return S.set(e,t+1),`c`+e.runtimeId+e.renderId+t.toString(36)}function L(e,t){return R(e,t),e=>{Se(e,t)}}function*Ye(e,t,n=t.length-1){if(e){if(Symbol.iterator in e)for(let r of e.values())yield*Ye(r,t,n);else{let r=e[t[n]];n?yield*Ye(r,t,n-1):yield typeof r==`function`?r():r}}}function Xe(...e){return e=e.map(e=>typeof e==`string`?e:a(e)),t=>{let n=()=>Ye(t,e).next().value;return n[Symbol.iterator]=()=>Ye(t,e),n}}function aee(e,...t){return R(e,Xe(...t))}function Ze(e,t,n){C=e,ee(0,t,n)}function Qe(e=`M`){if(re)return;let t=self[e],n=t=>Object.defineProperty(self,e,t),r=t=>{n({value:re=(n=>{let r=re[n]=t[n]||t(n),i=r.w,a={},s=e=>a[e]||(+e?l(a[e]={L:+e}):c()),c=()=>a[0]||={runtimeId:e,renderId:n},l=e=>(e.H=1,e.$=c(),o&&e.G&&(e.F=s(e.G)),e),u=e=>{let t=e[0];for(let n=1;n<e.length;n++){let r=e[n];typeof r==`number`?t+=r:(t?l(Object.assign(a[t]||=(r.L=t,r),r)):Object.assign(c(),r),t++)}},d=((e,t)=>typeof e==`number`?t?w[t](s(e)):s(e):u(e)),f=(e=[],t=[],n=[],i=[],a)=>(o,c,l,u,d,f=_.parentNode,m=_,h=n.length,v=i.length)=>{for(y!==`[`&&(b[p()]=y===`)`||y===`}`?f:_,u=`A`+x,d=y!==`]`&&y!==`)`,p());o=+x;){if((l||=[]).push(c=s(o)),rt(c,c.F),(c.O=r.p?.[o])&&(c.O.m=r.m),d){for(;m.previousSibling&&~g.indexOf(m=m.previousSibling););c._??=b,c.K=c.S=m,y===`'`&&(c.a=m)}else a=nee(a,c),u&&(b[u]=a,tee(a,e=>e._??=b),a=e.pop()),m=t.pop(),f!==m.parentNode&&f.prepend(m),c.S=m,c.K=_.previousSibling===m?m:f.insertBefore(new Text,_);for(;h&&n[h-1].L>o;)h--,rt(n.pop(),c);for(;v&&i[v-1].L>o;){v--;let e=i.pop();e.F!==e&&(e.F=c)}p()}if(l){for(let e of l)n.push(e);d&&(b[u]=l.length>1?l.reverse():l[0])}y===`[`?(l||(e.push(a),a=void 0),t.push(_)):i.push(b)},p=()=>x=v.slice(S,(S=v.indexOf(` `,S)+1||v.length+1)-1),m=(e=[],t)=>{let n=0;for(;n<e.length;n++){let i=e[n];if(typeof i==`string`)for(S=0,v=i;p();)/\D/.test(x)?h=w[x]:t.push(h,s(x));else if(Array.isArray(i)){if(!(ae&&i.every(e=>ae.has(e)&&!r.b[e].length)))break}else if(ae&&typeof i==`number`)break;else{let e=i(d);Array.isArray(e)&&u(e)}}return e.splice(0,n),n},h,g,_,v,y,b,x,S,C,ee;return d._=w,r.m=e=>{if(m(r.r,e),ae&&r.b)for(let t=1;t;){t=0;for(let n of ae){let i=r.b[n];i&&m(i,e)&&(t=1)}}let t=0;for(_ of g=r.v)if(S=r.i.length,v=_.data,y=v[S++],b=s(p()),y===`*`){let e=_.previousSibling;b[p()]=e&&(e.nodeType<8||e.data)?e:_.parentNode.insertBefore(new Text,_)}else o?(C||=f())():r.b&&(g[t++]=_);return ie&&!ee&&_&&ie.set(ee=_.parentNode.insertBefore(new Text,_.nextSibling),[n,a]),g.length=t,e},r.w=()=>{i(),$e(r)},r})})};if(t){r(t);for(let e in t)$e(re(e))}else n({configurable:!0,set:r})}function $e(e){try{oe=1,d(e.m([]),1)}finally{oe=0}}function R(e,t){return w[e]=t}function et(e,t){return R(e,e=>n=>t(e,n)),t}function tt(e,t){return t=a(t),R(e,e=>()=>e[t])}function nt(e,t,n,r){let i=je(e);return i._=t.e||n,rt(i,n?.F),t.b?.(i,r.namespaceURI),i}function rt(e,t){t&&(e.N=t,(t.D||=new Set).add(e)),e.F=e}function it(e,t,n,r){return at(t,nt(e,t,n,r))}function at(e,t){return e.c&&xe(t,e.c,-1),t}function ot(e,t,n,r,i,a){n=n?n.replace(/[^\0-1]+$/,``):``,r=r?r._||r:void 0,i||=void 0;let o=t?(e,r)=>{((se[r]||={})[1+t]||=oee(t,r))(e,n)}:e=>{Ze(e.S=e.K=new Text,n,e)};return t=>({a:e,b:o,e:t,c:r,d:i,f:a})}function st(e,t,n,r,i,a){return R(e,ot(e,t,n,r,i,a))}function oee(e,t){let{firstChild:n,lastChild:r}=ree(e,t),i=document.createElementNS(t,`t`);return Ct(i,null,n,r),n===r&&n.nodeType<8?(e,t)=>{Ze(e.S=e.K=n.cloneNode(!0),t,e)}:(e,t)=>{let n=i.cloneNode(!0);Ze(n.firstChild,t,e),e.S=n.firstChild,e.K=n.lastChild}}function ct(e){return e||e===0?e+``:``}function z(e,t,n){lt(e,t,bt(n))}function lt(e,t,n){e.getAttribute(t)!=n&&(n===void 0?e.removeAttribute(t):e.setAttribute(t,n))}function ut(e,t){lt(e,`class`,i(t,` `,fe)||void 0)}function dt(e,t){for(let n in t)B(e,n,t[n])}function B(e,t,n){e.classList.toggle(t,!!n)}function ft(e,t){lt(e,`style`,i(t,`;`,pe)||void 0)}function V(e,t){let n=ct(t);e.data!==n&&(e.data=n)}function pt(e,t,n,r){let i=e[t];for(let e=i.attributes.length;e--;){let{name:t}=i.attributes.item(e);n&&(t in n||ht(i,t,n))||i.removeAttribute(t)}gt(e,t,n,r)}function mt(e,t,n,r){pt(e,t,n,r),_t(e,t,n?.content)}function ht(e,t,n){return t===`checked`&&e.tagName===`INPUT`&&`checkedValue`in n}function gt(e,t,n,r){let i=e[t],a=e[`I`+t],o;for(let e in a)a[e]=0;r&&(e[`F`+t]=5,e[`E`+t]=0,n&&(o=r(e,t,n)));for(let r in n){let s=n[r];switch(r){case`class`:ut(i,s);break;case`style`:ft(i,s);break;default:he(r)?(a||=e[`I`+t]={})[ge(r)]=s:o?.test(r)||r===`content`&&i.tagName!==`META`||z(i,r,s)}}}function _t(e,t,n){let r=yt(n);e[`D`+t]!==(e[`D`+t]=r?.a)&&(Wt(e,t,r,it),r?.f&&Ke(r.e,r.f,e[`A`+t]));for(let n in r?.g)r.g[n](e[`A`+t],r.h[n])}function vt(e,t){let n=e[t],r=e[`I`+t];D[e[`F`+t]]?.(e,t);for(let e in r)A(n,e,r[e])}function yt(e){let t=ve(e);if(t&&t.a)return t}function bt(e){if(_e(e))return e===!0?``:e+``}function xt(e,t,n=0){let r=`K`+n,i=e[r];i?(Object.assign(i,t),i.onUpdate?.()):(e[r]=t,Object.assign(t,t.onMount?.()),Ee(e,r).onabort=()=>t.onDestroy?.())}function St(e,t){let n=t.nextSibling;for(;e!==n;){let t=e.nextSibling;e.remove(),e=t}}function Ct(e,t,n,r){if(e.isConnected)e.insertBefore(wt(n,r),t);else{let i=r.nextSibling;for(;n!==i;){let r=n.nextSibling;e.insertBefore(n,t),n=r}}return e}function wt(e,t){return e===t?e:Ct(new DocumentFragment,null,e,t)}function Tt(e,t,n,r){if((t||t===0)&&(t!==n.length||/kw/.test(e))){let e=n.slice(0,t),i=n.slice(t);if(r.startsWith(e))return t;if(r.endsWith(i))return r.length-i.length;let a=e.match(T)?.length;for(;a&&T.test(r);)a--;return a?r.length:T.lastIndex}return-1}function Et(e,t,n){let r=e[t],i=_e(n);if(r.defaultChecked!==i){let t=e.H<c?r.checked:i;r.defaultChecked=i,t!==i&&(r.checked=t)}}function Dt(e,t,n,r){let i=e[t],a=_e(n);e[`E`+t]=r,e[`F`+t]=r?0:5,r&&e.H<c?i.checked=a:Et(e,t,a)}function Ot(e,t){let n=e[t];Rt(n,Bt,()=>{let r=e[`E`+t];if(r){let e=n.checked;n.checked=!e,r(e),Ce()}})}function kt(e,t,n){let r=e[t],i=bt(n)||``;if(r.defaultValue!==i){let t=e.H<c?r.value:i;r.defaultValue=i,Mt(r,t)}}function At(e,t,n,r,i=kt){let a=e[t],o=bt(n)||``;e[`E`+t]=r,e[`G`+t]=o,e[`F`+t]=r?2:5,r&&e.H<c?Mt(a,o):i(e,t,o)}function jt(e,t){let n=e[t];oe&&(e[`G`+t]=n.defaultValue),Rt(n,zt,r=>{let i=e[`E`+t];i&&(E=r?.inputType,i(n.value),Ce(),Mt(n,e[`G`+t]),E=``)})}function Mt(e,t){if(e.value!==t){let n=Tt(E,document.activeElement===e&&e.selectionStart,e.value,e.value=t);~n&&e.setSelectionRange(n,n)}}function Nt(e,t,n){let r,i=e[t],a=e.H<c,o=Array.isArray(n),s=o?n.map(Ht):Ht(n);l.unshift(()=>{for(let e of i.options){let t=o?s.includes(e.value):e.value===s;e.defaultSelected!==t&&(a&&(r??=Lt(i,o)),e.defaultSelected=t)}r!==void 0&&It(i,r,o)},e)}function Pt(e,t,n,r){let i=e[t],a=e.H<c,o=Array.isArray(n),s=e[`G`+t]=o?n.map(Ht):Ht(n);e[`E`+t]=r,e[`F`+t]=r?3:5,r&&a?l.unshift(()=>It(i,s,o),e):Nt(e,t,s)}function Ft(e,t){let n=e[t],r=()=>{let r=e[`E`+t];if(r){let i=e[`G`+t],a=Array.isArray(i),o=Lt(n,a);It(n,i,a),r(o),Ce()}};if(oe){if(n.multiple){e[`G`+t]=[];for(let r of n.options)r.defaultSelected&&e[`G`+t].push(r.value)}else{e[`G`+t]=``;for(let r of n.options)if(r.defaultSelected){e[`G`+t]=r.value;break}}}Rt(n,Vt,r),cee(e,t,{childList:!0,subtree:!0},()=>{let i=e[`G`+t];(Array.isArray(i)?i.length!==n.selectedOptions.length||i.some((e,t)=>!i.includes(n.selectedOptions[t].value)):n.value!==i)&&r()})}function It(e,t,n){if(n)for(let n of e.options)n.selected=t.includes(n.value);else e.value=t}function Lt(e,t){return t?Array.from(e.selectedOptions,e=>e.value):e.value}function see(e,t,n){e.H===c&&(e[t].open=_e(n))}function cee(e,t,n,r){(e[`N`+t]||=new MutationObserver(r)).observe(e[t],n)}function Rt(e,t,n){e._=n,m(`input`,lee),e.form&&m(`reset`,uee),oe&&t(e)&&queueMicrotask(n)}function lee(e){e.target._?.(e)}function uee(e){let t=[];for(let n of e.target.elements)n._&&dee(n)&&t.push(n._);requestAnimationFrame(()=>{if(!e.defaultPrevented)for(let e of t)e()})}function zt(e){return e.value!==e.defaultValue}function Bt(e){return e.checked!==e.defaultChecked}function Vt(e){for(let t of e.options)if(t.selected!==t.defaultSelected)return!0}function dee(e){return e.options?Vt(e):zt(e)||Bt(e)}function Ht(e){return bt(e)||``}function Ut(e){vt(e,`a`)}function Wt(e,t,n,r){let i=e[t],a=e[`A`+t],o=i.nodeType>1?(a?.S||i).parentNode:i,s=e[`A`+t]=n&&r(e.$,n,e,o);i===o?(a&&(Ne(a),i.textContent=``),s&&Le(s,o,null)):a?(s?Le(s,o,a.S):o.insertBefore(i,a.S),Ie(a)):s&&(Le(s,o,i),i.remove())}function Gt(e,t,n,r){let i=nt(e,t,n,r);return typeof t==`string`?i.a=i.S=i.K=document.createElementNS(t===`svg`?`http://www.w3.org/2000/svg`:t===`math`?`http://www.w3.org/1998/Math/MathML`:r.namespaceURI,t):at(t,i),i}function Kt(e,t){return t}var qt=[],Jt=Symbol();function Yt(e){return e[Symbol.iterator]=Xt,e[Jt]=qt,e}function*Xt(){yield this,yield*this[Jt]}async function H(e,t){let n=await fetch(e,t),r;try{r=await n.json()}catch{throw Error(n.ok?`invalid response`:`HTTP ${n.status}`)}if(r&&typeof r==`object`&&r.error)throw Error(r.error);if(!n.ok)throw Error(`HTTP ${n.status}`);return r}function Zt(e){let t=e instanceof Error?e.message:String(e);return/HTTP 502|HTTP 503|HTTP 504|Failed to fetch|NetworkError|Load failed|ECONNREFUSED/i.test(t)}var Qt=[`workspaces.changed`,`sessions.changed`,`workspace.progress`,`review.changed`,`status.changed`],$t=1e4,en=4e4,tn=8e3,nn=5e3,rn=6e4,an,on,sn=null,cn,ln,un,dn,fn=0;function pn(e){on&&e!==on&&location.reload(),on=e}async function mn(){try{pn((await H(`/api/boot`)).boot)}catch{}}function hn(){clearTimeout(ln),clearTimeout(un),un=setTimeout(gn,en),fn&&(fn=0,clearInterval(dn),dn=void 0)}function gn(){_n(),!fn&&(fn=Date.now(),dn=setInterval(()=>{document.visibilityState===`visible`&&(Date.now()-fn>rn&&(fn=Date.now(),yn()),vn(),H(`/api/status`).then(e=>{an.dispatchEvent(new MessageEvent(`status.changed`,{data:e}))}).catch(()=>{}))},nn))}function _n(){clearTimeout(ln),clearTimeout(un),sn?.close(),sn=null}function vn(){for(let e of[`workspaces.changed`,`sessions.changed`])an.dispatchEvent(new MessageEvent(e,{data:null}))}function yn(){if(sn)return;let e=sn=new EventSource(`/api/events`);clearTimeout(ln),ln=setTimeout(gn,tn),e.addEventListener(`hello`,e=>{hn(),pn(JSON.parse(e.data||`{}`).boot)}),e.addEventListener(`ping`,hn);for(let t of Qt)e.addEventListener(t,e=>{hn(),an.dispatchEvent(new MessageEvent(t,{data:JSON.parse(e.data||`null`)}))})}function bn(){return an||(an=new EventTarget,yn(),mn(),document.addEventListener(`visibilitychange`,()=>{document.visibilityState===`visible`?(clearTimeout(cn),yn(),mn(),vn()):(clearTimeout(cn),cn=setTimeout(()=>{fn||_n()},$t))})),an}var xn=null,Sn=null,Cn=new EventTarget;function fee(e,t){Cn.addEventListener(`intent`,e,{signal:t})}function wn(e,t){xn={workspaceId:e,pr:t},Cn.dispatchEvent(new Event(`intent`))}function Tn(e){if(xn?.workspaceId!==e)return!1;let t=xn.pr;return xn=null,{pr:t}}function En(e,t){Sn=[e,t],Cn.dispatchEvent(new Event(`intent`))}function Dn(e){if(Sn?.[0]!==e)return null;let t=Sn[1];return Sn=null,t}function On(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}}}var kn=new Map,An=new Set,pee;function mee(){return typeof window>`u`?Promise.resolve():pee??=(async()=>{try{let e=await(await fetch(`/api/prefs`)).json();for(let[t,n]of Object.entries(e))An.has(t)||kn.set(t,n)}catch{}})()}function jn(e){return kn.get(e)??null}function Mn(e,t){An.add(e),t===null?kn.delete(e):kn.set(e,t),hee(e,t)}function hee(e,t){return fetch(`/api/prefs`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({key:e,value:t})}).catch(()=>{})}function gee(){return jn(`last-workspace`)}function Nn(e){Mn(`last-workspace`,e)}function Pn(){return jn(`side-nav`)!==`0`}function _ee(e){Mn(`side-nav`,e?`1`:`0`)}function Fn(e){return jn(`tab:${e}`)}function In(e,t){Mn(`tab:${e}`,t)}function Ln(){return jn(`diff-tree`)!==`0`}function Rn(e){Mn(`diff-tree`,e?`1`:`0`)}function zn(){return jn(`diff-uncommitted`)===`1`}function Bn(e){Mn(`diff-uncommitted`,e?`1`:`0`)}function Vn(){return typeof window<`u`&&`serviceWorker`in navigator&&`PushManager`in window}async function Hn(){return Vn()?(await Kn()).pushManager.getSubscription():null}async function Un(){if(await Notification.requestPermission()!==`granted`)return!1;let e=await Kn(),t=await e.pushManager.getSubscription();if(!t){let{publicKey:n}=await H(`/api/push`);t=await e.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:qn(n)})}return await H(`/api/push`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(t.toJSON())}),!0}async function Wn(){let e=await Hn();e&&(await H(`/api/push?endpoint=${encodeURIComponent(e.endpoint)}`,{method:`DELETE`}).catch(()=>{}),await e.unsubscribe())}function Gn(e){let t=()=>{document.visibilityState===`visible`&&navigator.clearAppBadge?.().catch(()=>{})};t(),document.addEventListener(`visibilitychange`,t,{signal:e})}async function Kn(){return await navigator.serviceWorker.getRegistration()??navigator.serviceWorker.register(`/sw.js`)}function qn(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 Jn(){return typeof window<`u`&&window.matchMedia(`(pointer: coarse)`).matches}function Yn(){return typeof window<`u`&&window.matchMedia(`(max-width: 899px)`).matches}function Xn(){return typeof navigator<`u`&&navigator.standalone===!0}function Zn(e){if(!Xn()||!/^https?:\/\//.test(e)){window.open(e,`_blank`,`noopener`);return}if(localStorage.getItem(`xSafariOk`)){location.href=`x-safari-${e}`;return}if(localStorage.getItem(`xSafariNo`)){window.open(e,`_blank`,`noopener`);return}let t=!1,n=()=>{document.visibilityState===`hidden`&&(t=!0,localStorage.setItem(`xSafariOk`,`1`))};document.addEventListener(`visibilitychange`,n),window.addEventListener(`pagehide`,n),setTimeout(()=>{document.removeEventListener(`visibilitychange`,n),window.removeEventListener(`pagehide`,n),!(t||document.visibilityState===`hidden`)&&(localStorage.setItem(`xSafariNo`,`1`),window.open(e,`_blank`,`noopener`))},1500),location.href=`x-safari-${e}`}var Qn=`<div><div class=toast-body><!><!></div><!></div>`,$n=` E%b%l%l`,er=L(`q0`,e=>A(e.a,`click`,function(){e._._.l?.()})),tr=ue(0),nr=I(22,e=>tr(e,e._._.n),e=>e._._),rr=O(0,`<!><!><!>`,`b%`,nr),ir=P(3,0,e=>rr(e,+!e._.k)),ar=e=>{ir._(e),sr._(e)},or=O(1,`<button class="icon-btn toast-dismiss" title=Dismiss>×</button>`,` `,er),sr=P(3,0,e=>or(e,+!e._.l)),cr=ue(0),lr=P(2,0,e=>cr(e,e._.j)),ur=lr,dr=P(1,0,e=>V(e.a,e._.i)),fr=dr,pr=N(17,e=>ut(e.a,[`toast`,`toast-${e.o}`,`toast-${e.p}`])),mr=M(14,e=>{z(e.a,`role`,e.o===`error`?`alert`:`status`),pr(e)}),hr=(e,t)=>mr(e,t||`error`),gr=N(16,L(`q1`,e=>xt(e,{onDismiss:e.l,placement:e.p,onMount:function(){let e=new AbortController;return this.placement===`float`&&this.onDismiss&&window.addEventListener(`keydown`,e=>{e.key===`Escape`&&(document.querySelector(`dialog[open]`)||document.querySelector(`.palette:not(.inline)`)||e.target instanceof HTMLInputElement&&e.target.value||(e.stopPropagation(),this.onDismiss?.()))},{capture:!0,signal:e.signal}),{abort:e}},onDestroy:function(){this.abort.abort()}}))),_r=M(15,e=>{pr(e),gr(e)}),vr=(e,t)=>_r(e,t||`float`),yr=O(1,`<strong class=toast-title> </strong>`,`D `,fr),br=M(8,e=>{yr(e,+!e.i),dr(e)}),xr=O(2,`<div class=toast-content><!></div>`,`D%`,ur),Sr=M(9,e=>{xr(e,+!e.j),lr(e)}),Cr=O(3,`<div class=toast-actions><!><!></div>`,`D%b%`,ar),wr=N(12,e=>Cr(e,e.k||e.l?0:1)),Tr=M(10,e=>{Dr(e,e.k?.content),wr(e),ir(e)}),Er=M(11,e=>{wr(e),gr(e),sr(e)}),Dr=M(13,F(nr));function Or(e,t){if(!e)return-1;let n=e.toLowerCase(),r=t.toLowerCase(),i=r.lastIndexOf(`/`),a=r.slice(i+1),o=r.slice(0,Math.max(0,i)).includes(n)?5:0;return a===n?1e3+o:a.startsWith(n)?800+o:a.includes(n)?600+o:Ar(n,a)?400+o:r.includes(n)?300:Ar(n,r)?100:-1}function kr(e,t,n){return e?t.map(t=>({repo:t,score:Or(e,t.nameWithOwner)})).filter(({repo:e,score:t})=>!e.isArchived&&t>=0&&!n(e.nameWithOwner)).sort((e,t)=>t.score-e.score||e.repo.nameWithOwner.length-t.repo.nameWithOwner.length||e.repo.nameWithOwner.localeCompare(t.repo.nameWithOwner)).slice(0,8).map(({repo:e})=>e):[]}function Ar(e,t){if(!e)return!0;let n=0,r=t.toLowerCase();for(let t of e.toLowerCase()){if(n=r.indexOf(t,n),n===-1)return!1;n++}return!0}function jr(e){return e?.working?`working`:e?.waiting?`waiting`:e?.agents?`idle`:`off`}function Mr(e){return e?.phase===`working`?`working`:e?.phase===`waiting`?`waiting`:e?.alive?`idle`:`off`}var Nr=`<svg viewBox="0 0 24 24" fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round aria-hidden=true><path></path></svg>`,Pr=` D l`,Fr=(e,t)=>{z(e.a,`width`,t),z(e.a,`height`,t)},Ir=(e,t)=>Fr(e,t??15),Lr=(e,t)=>ut(e.a,[`icon`,t]),Rr=(e,t)=>z(e.b,`d`,t),zr=Nr,Br=(e=>`/${e}&`)(Pr);function Vr(e){Rr(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 Hr=(e,t)=>Ir(e.a,t),Ur=(e,t)=>Lr(e.a,t),Wr=Nr,Gr=(e=>`/${e}&`)(Pr);function Kr(e){Rr(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 qr=(e,t)=>Ir(e.a,t),Jr=(e,t)=>Lr(e.a,t),Yr=Nr,Xr=(e=>`/${e}&`)(Pr);function Zr(e){Rr(e.a,`M6 12H12M18 12H12M12 12V6M12 12V18`)}var Qr=(e,t)=>Ir(e.a,t),$r=(e,t)=>Lr(e.a,t),ei=`<!><!><!>`,vee={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`},ti=P(0,1,e=>Ir(e.a,e._.d)),yee=e=>{ti._(e),ni._(e),Rr(e.a,`M5 7L10 12L5 17 M13 17H20`)},ni=P(0,1,e=>Lr(e.a,e._.f)),ri=P(0,0,e=>ut(e.a,[`icon`,e._.f])),bee=e=>{ri._(e),ii._(e),ai._(e)},ii=P(0,0,e=>{z(e.a,`width`,e._.g),z(e.a,`height`,e._.g)}),ai=P(0,0,e=>z(e.b,`d`,e._.h)),oi=M(6,ii),si=M(3,e=>{oi(e,e.d??15),ti(e)}),ci=O(0,`<svg viewBox="0 0 24 24" fill=currentColor fill-rule=evenodd aria-hidden=true><path></path></svg>`,` D `,bee,Nr,(e=>`/${e}&`)(Pr),yee),li=M(7,e=>{ci(e,+!e.h),ai(e)}),ui=(e,t)=>li(e,vee[t]),di=M(5,e=>{ri(e),ni(e)}),fi=`<!><!><div class=palette role=dialog aria-label=Workspaces><!><input autofocus placeholder="Jump to workspace…" aria-label="Filter workspaces"><ul class=rows></ul><!><div class=palette-foot><span></span><span class="dim hint">↑↓ navigate · ↵ open · ⌘1–9 switch · esc close</span><!></div></div>`,pi=`b%b D%b b b%bDc%m`,mi=(e,t)=>{z(e.a,`value`,t),V(e.b,t)},hi=(e,t)=>mi(e,t[0]),gi=(e,t)=>V(e.a,t),_i=(e,t)=>gi(e,t[0]?.worktree),vi=P(5,0,e=>{z(e.a,`title`,`${e._.r} open PR${e._.r===1?``:`s`}`),V(e.b,e._.r),V(e.c,e._.r===1?``:`s`)}),yi=vi,bi=P(6,0,e=>z(e.a,`title`,e._.o.map(e=>`:${e.port} ${e.cmd}`).join(`
|
|
3
|
+
`))),xi=e=>{bi._(e),Si._(e)},Si=P(6,0,e=>V(e.b,e._.p)),Ci=N(2,e=>z(e.a,`title`,`${e._.l} running session${e._.l===1?``:`s`}${e._.m?` — ${e._.m} working`:``}${e._.n?` — ${e._.n} waiting on you`:``}`),2),wi=P(4,0,e=>{V(e.b,e._.l),Ci(e)}),Ti=e=>{wi._(e),Ei._(e),Di._(e)},Ei=P(4,0,Ci),Di=P(4,0,Ci),Oi=P(0,1,e=>V(e.a,e._.g)),ki=Oi,Ai=N(2,e=>V(e.b,e._.a3?`hide archived`:`archived (${e._.a6})`)),ji=P(5,0,Ai),Mi=L(`k8`,e=>A(e.a,`click`,function(){Qa(e._,!e._.a3)})),Ni=e=>{ji._(e),Pi._(e),Mi(e)},Pi=P(5,0,Ai),Fi=N(1,e=>Pt(e,`a`,e._.o.preferredAgent,jo(e))),Ii=P(6,0,Fi),Li=L(`k9`,e=>Ft(e,`a`)),Ri=e=>{Ii._(e),Bi._(e),Vi._(e),Li(e)},zi=k(0,`<option> </option>`,` D `,0,hi),Bi=P(6,0,e=>zi(e,[e._.z,e=>e])),Vi=P(6,0,Fi),Hi=L(`k5`,e=>A(e.a,`click`,function(t,n){n.closest(`[popover]`)?.hidePopover(),e._._._.q(e._._.h,e.e)})),Ui=e=>{e.b,si(e.b,14),di(e.b),Hi(e)},Wi=M(4,e=>{ui(e.b,e.e),V(e.c,e.e)}),Gi=k(6,(e=>`<button>${e}<!></button>`)(ei),(e=>` D/${e}&%l`)(`b%c`),Ui,(e,t)=>Wi(e,t[0])),Ki=I(48,e=>Gi(e,[[...e._._.z||[],`shell`],e=>e]),e=>e._._),qi=(e,t)=>{z(e.e,`popovertarget`,t),z(e.g,`id`,t)},Ji=L(`k6`,e=>{A(e.a,`click`,function(t){t.stopPropagation(),e._._.m(e._.h)}),A(e.c,`click`,function(t){t.stopPropagation(),e._._.n(e._.h)}),A(e.e,`click`,function(e){e.stopPropagation()}),A(e.g,`toggle`,function(t,n){if(t.newState===`open`){let t=e.e.getBoundingClientRect();n.style.top=`${t.bottom+4}px`,n.style.left=`${Math.max(8,t.right-n.offsetWidth)}px`}})}),Yi=e=>{Ki(e),Vr(e.b),Hr(e.b,13),Ur(e.b),Kr(e.d),qr(e.d,13),Jr(e.d),Zr(e.f),Qr(e.f,13),$r(e.f),qi(e,Je(e)),Ji(e)},Xi=O(2,`<span class="chip open">open</span>`),Zi=N(18,e=>Xi(e,e._.i===e._._.k?0:1)),Qi=I(45,Zi,e=>e._._),$i=e=>{Qi(e),na(e),ia._(e),aa._(e),oa._(e),la._(e)},ea=(e,t)=>{ut(e.a,[`dot`,jr(t)]),da(e,t?.repos),pa(e,t?.agents),ma(e,t?.working),ha(e,t?.waiting),_a(e,t?.ports)},ta=N(19,e=>ea(e,e._._.y[e._.i])),na=I(47,ta,e=>e._._),ra=O(3,`<span class=chip>archived</span>`),ia=P(0,2,e=>ra(e,+!e._.f)),aa=P(0,2,e=>{ta(e),Zi(e)}),oa=P(0,2,e=>V(e.b,e._.j)),sa=k(7,`<span class=mono> </span>`,`D `,0,_i),ca=N(10,e=>sa(e,[e.j||e._.k,`full_name`])),la=P(0,2,ca),ua=(e,t)=>ba(e,t?.length),da=M(9,e=>{ua(e,(e.j||[]).flatMap(e=>e.prs||[])),ca(e)}),fa=O(4,`<span class="chip stat"> </span>`,` D `,Ti),pa=M(11,e=>{fa(e,+!e.l),wi(e)}),ma=M(12,Ei),ha=M(13,Di),ga=O(6,`<span class="chip stat">:<!></span>`,` Db%`,xi),_a=M(14,e=>{va(e,e.o?.length),ga(e,+!(e.o||[]).length),bi(e)}),va=M(15,Si),ya=O(5,`<span class="chip stat"><!> PR<!></span>`,` D%c%`,yi),ba=M(17,e=>{ya(e,+!e.r),vi(e)}),xa=N(12,e=>dt(e.a,{hi:e.l===e._.ah,archived:e.e===`ws`&&e.f}),3),Sa=He(4,xa),Ca=L(`k7`,e=>{A(e.a,`click`,function(){e._.ai(e.d)}),A(e.a,`mouseenter`,function(){Za(e._,e.l)})}),wa=e=>{Sa._(e),Ca(e)},Ta=O(0,`<span class=row-name>+ New workspace</span>`,0,0,`<span class="row-name cmd-row">▸ <!></span>`,`Db%`,ki,`<span class=row-name><span></span><span class=row-name-text> </span><!><!><span class=row-stats><!><!><!></span></span><span class=row-repos></span>`,`D bD l%b%bD%b%b%m `,$i),Ea=O(1,((e,t,n)=>`<button class=row-more title="Review changes">${e}</button><button class=row-more title="Manage workspace">${t}</button><button class=row-more title="New session">${n}</button><div popover=auto class=new-session-pop></div>`)(zr,Wr,Yr),((e,t,n)=>` D/${e}&l D/${t}&l D/${n}&l b`)(Br,Gr,Xr),Yi),Da=M(4,e=>{Ta(e,e.e===`new`?0:e.e===`cmd`?1:2),Ea(e,e.e===`ws`?0:1),xa(e)}),Oa=M(5,e=>{xa(e),ia(e)}),ka=M(11,xa),Aa=(e,t)=>{ja(e,t[0]),ka(e,t[1])},ja=M(3,e=>{Da(e,e.d?.kind),Oa(e,e.d?.archived),Ma(e,e.d?.label),Na(e,e.d?.ws)}),Ma=M(6,Oi),Na=M(7,e=>{Pa(e,e.h?.id),Fa(e,e.h?.name),Ia(e,e.h?.repos)}),Pa=M(8,aa),Fa=M(9,oa),Ia=M(10,la),La=L(`k4`,e=>A(e.a,`click`,function(){e._.v?.(!1)})),Ra=k(4,`<li><div class=row-wrap><button class=row></button><!></div></li>`,`E b%`,wa,Aa),za=N(40,L(`k12`,e=>xt(e,{onMount:function(){let t=new AbortController,n=e.ad.findIndex(t=>t.kind===`ws`&&t.ws.id===e.k);n>=0&&Za(e,n),setTimeout(()=>e.d?.focus(),0);let r=t.signal;return document.addEventListener(`keydown`,t=>{t.key!==`Escape`||e.u||document.querySelector(`:popover-open`)||document.querySelector(`dialog[open]`)||(t.preventDefault(),e.v?.(!1))},{capture:!0,signal:r}),{abort:t}},onDestroy:function(){this.abort.abort()}})),3),Ba=M(39,e=>{mo(e,e.ad.length),Ra(e,[e.ad,e=>e.kind===`new`?`new`:e.kind===`cmd`?`cmd:${e.label}`:e.ws.id]),za(e)}),Va=N(38,e=>Ba(e,[...e.a8(e.a4).map(e=>({kind:`ws`,ws:e})),...e.a3||e.a1?e.a8(e.a5).map(e=>({kind:`ws`,ws:e,archived:!0})):[],...e.ab,{kind:`new`}]),5),Ha=M(34,Va),Ua=M(37,Va),Wa=N(36,e=>Ua(e,!e.a1||!e.a9?[]:[{kind:`cmd`,label:`Review changes — ${e.a9?.name}`,run:()=>e.m(e.a9)},{kind:`cmd`,label:`Manage workspace — ${e.a9?.name}`,run:()=>e.n(e.a9)},{kind:`cmd`,label:`New ${e.p||`agent`} session — ${e.a9?.name}`,run:()=>e.q(e.a9,e.p||`claude`)}].filter(t=>t.kind===`cmd`&&Ar(e.a1,t.label))),5),Ga=O(5,`<button class="archived-link dim"> </button>`,` D `,Ni),Ka=N(33,e=>Ga(e,e.a6&&!e.a1?0:1)),qa=j(27,e=>{At(e,`d`,e.a1,No(e)),Ha(e,Mo(e)),Wa(e),Va(e),Ka(e)}),Ja=L(`k11`,e=>e.e.children[e.ah]?.scrollIntoView({block:`nearest`})),Ya=M(43,e=>{Sa(e),Ja(e)}),Xa=N(42,e=>Ya(e,Math.min(e.a2,e.af-1))),Za=j(28,Xa),Qa=j(29,e=>{Va(e),ji(e)}),$a=L(`k10`,e=>{jt(e,`d`),A(e.d,`keydown`,function(t){t.key===`ArrowDown`?(t.preventDefault(),Za(e,Math.min(e.ah+1,e.ad.length-1))):t.key===`ArrowUp`?(t.preventDefault(),Za(e,Math.max(e.ah-1,0))):t.key===`Enter`?(t.preventDefault(),e.ai(e.ad[e.ah])):t.key===`Escape`&&!e.u&&(t.preventDefault(),e.v?.(!1))})});function eo(e){qa(e,``),Za(e,0),Qa(e,!1),$a(e)}var to=M(30,Va),no=M(31,e=>{oo(e,e.a5?.length),Va(e)}),ro=M(35,Wa),io=N(11,e=>ro(e,e.j.find(t=>t.id===e.k))),ao=M(9,e=>{wo(e,e.j?.length),to(e,e.j.filter(e=>e.status===`active`)),no(e,e.j.filter(e=>e.status===`archived`)),io(e)}),oo=M(32,e=>{Ka(e),Pi(e)}),so=F(Qi),co=M(10,e=>{io(e),za(e),so(e)}),lo=M(12,Wa),uo=M(13,Wa),fo=M(15,Wa),po=M(16,Wa),mo=M(41,Xa),ho=M(44),go=N(19,e=>ho(e,Po(e))),_o=M(17,go),vo=M(18,go),yo=O(0,`<div class=palette-backdrop></div>`,` `,La),bo=O(2,`<div class="onboard dim"><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>`),xo=N(23,e=>bo(e,e.u&&!e.w?0:1)),So=M(20,e=>{B(e.b,`inline`,e.u),yo(e,+!!e.u),za(e),xo(e)}),Co=M(21,za),wo=M(22,xo),To=O(6,`<label class=dim><select aria-label="Preferred agent"></select></label>`,`D `,Ri),Eo=M(14,e=>{fo(e,e.o?.preferredAgent),Oo(e,e.o?.agents),To(e,+!e.o),Ii(e)}),Do=F(Ki),Oo=M(25,e=>{Do(e),Bi(e)}),ko=M(24,F(na)),Ao=M(26,Vi);function jo(e){return function(t){e._.a0({...e._.o,preferredAgent:t}),H(`/api/settings`,{method:`PUT`,headers:{"content-type":`application/json`},body:JSON.stringify({preferredAgent:t})}).catch(()=>{})}}function Mo(e){return t=>t.filter(t=>Ar(e.a1,t.name))}function No(e){return function(t){qa(e,t),Za(e,0)}}function Po(e){return t=>{t&&(t.kind===`new`?e.r():t.kind===`cmd`?t.run():e.s(t.ws))}}R(`k1`,jo),R(`k2`,Mo),R(`k0`,No),R(`k3`,Po);var Fo=`<button type=submit><!></button>`,Io=` D%l`,Lo=de(1),Ro=(e,t)=>ut(e.a,t),zo=(e,t)=>z(e.a,`disabled`,t),Bo=(e,t)=>z(e.a,`title`,t),Vo=Nr,Ho=(e=>`/${e}&`)(Pr);function Uo(e){Rr(e.a,`M21.8883 13.5C21.1645 18.3113 17.013 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C16.1006 2 19.6248 4.46819 21.1679 8 M17 8H21.4C21.7314 8 22 7.73137 22 7.4V3`)}var Wo=(e,t)=>Ir(e.a,t),Go=(e,t)=>Lr(e.a,t),Ko=`<div class=add-repo><input placeholder="Add a repo…" aria-label="Add a repo"><!><!></div>`,qo=`D b%b%l`,Jo=null,Yo=L(`m7`,e=>A(e.a,`click`,function(){e._._._._._.z(e._._._.i,e.d)})),Xo=M(3,e=>V(e.b,e.d)),Zo=(e,t)=>Xo(e,t[0]),Qo=I(33,e=>At(e,`a`,e._._._._._.y,Ps(e)),e=>e._._._._._),$o=L(`m6`,e=>jt(e,`a`)),es=e=>{Qo(e),$o(e)},ts=k(1,`<li><button class=result-row><span class="repo-name mono"> </span></button></li>`,`D E `,Yo,Zo),ns=(e,t)=>{wee(e,t?.length),ts(e,[t,e=>e])},rs=N(5,e=>ns(e,(e._._._._.y?e._._._._.w.filter(t=>t.toLowerCase().includes(e._._._._.y.toLowerCase())):e._._._._.w).slice(0,12))),is=I(31,rs,e=>e._._._._),xee=e=>{is(e),as(e),os(e)},See=O(0,`<input placeholder="Filter branches…" aria-label="Filter branches" autofocus>`,` `,es),as=I(32,e=>See(e,e._._._._.x>8?0:1),e=>e._._._._),os=I(33,rs,e=>e._._._._),Cee=O(2,`<li><p class="dim empty-note">No branches match.</p></li>`),wee=(e,t)=>Cee(e,+!!t),Tee=O(0,`<p class="dim empty-note"><span class=spin></span> Loading branches…</p>`,0,0,`<!><!><ul class=branch-list><!><!></ul>`,`b%bD%b%`,xee),ss=I(31,e=>Tee(e,+!!e._._._.w),e=>e._._._),Eee=ss,cs=N(11,e=>B(e.a,`hi`,e.k===e._._.p)),ls=I(28,cs,e=>e._._),Dee=L(`m8`,e=>{A(e.a,`mouseenter`,function(){ys(e._._,e.k)}),A(e.b,`click`,function(){e._._.z(e.i)}),A(e.e,`click`,function(){e._._.a0(e.i)})}),Oee=e=>{ls(e),ds(e),Zr(e.c),Qr(e.c,12),$r(e.c,`result-plus`),Dee(e)},kee=O(5,`<div class=branch-pick></div>`,` `,Eee),us=N(9,e=>{B(e.e,`on`,e._._.u===e.i),kee(e,e._._.u===e.i?0:1)}),ds=I(30,us,e=>e._._),Aee=M(10,cs),jee=M(8,e=>{V(e.d,e.i),z(e.e,`title`,`Pick a base branch for ${e.i}`),z(e.e,`aria-label`,`Pick a base branch for ${e.i}`),us(e)}),Mee=k(0,(e=>`<li><div class=result-wrap><button class=result-row>${e}<span class=repo-name> </span></button><button class=result-branch>⎇</button></div><!></li>`)(Yr),(e=>`D D D/${e}&D m l%l`)(Xr),Oee,(e,t)=>{jee(e,t[0]?.nameWithOwner),Aee(e,t[1])}),fs=P(2,0,e=>Mee(e,[e._.r,`nameWithOwner`])),Nee=fs,ps=P(2,1,e=>V(e.a,e._.m)),Pee=ps,Fee=M(17,e=>{Os(e,e.r?.length),fs(e)}),ms=N(14,e=>Fee(e,e.l&&e.m?kr(e.m,e.l?.repos,t=>e.i.has(t)):[]),2),Iee=O(1,`<p class="dim empty-note">Loading repos…</p>`),hs=N(13,e=>Iee(e,e.m&&!e.l?0:1)),Lee=O(2,`<ul class=repo-results></ul>`,` `,Nee,`<p class="dim empty-note">No repos match "<!>".</p>`,`Db%`,Pee),gs=N(19,e=>Lee(e,e.s?0:e.m&&e.l?1:2),2),_s=j(11,e=>{ms(e),hs(e),gs(e)}),vs=j(12,e=>{At(e,`a`,e.m,Fs(e)),ms(e),hs(e),gs(e),ps(e)}),ys=j(15,F(ls)),Ree=M(26),bs=N(21,e=>Ree(e,Is(e))),zee=F(ds),xs=j(20,e=>{bs(e),zee(e)}),Bee=F(ss,is),Ss=j(22,e=>{As(e,e.w?.length),Bee(e)}),Cs=j(24,F(os,Qo)),Vee=L(`m9`,e=>{jt(e,`a`),A(e.a,`keydown`,function(t){t.key===`ArrowDown`?(t.preventDefault(),ys(e,Math.min(e.p+1,e.r?.length-1))):t.key===`ArrowUp`?(t.preventDefault(),ys(e,Math.max(e.p-1,0))):t.key===`Enter`?(t.preventDefault(),e.r[e.p]&&e.z(e.r[e.p].nameWithOwner)):t.key===`Escape`&&e.m&&(t.preventDefault(),vs(e,``))})});function ws(e){_s(e,null),vs(e,``),ys(e,0),xs(e,null),Ss(e,null),Cs(e,``),Vee(e)}var Hee=L(`m10`,e=>xt(e,{onMount:function(){Jo&&_s(e,Jo),e.q(!1)}})),Uee=M(16,e=>{x(e,Ls(e)),Hee(e)}),Ts=N(7,e=>Uee(e,Rs(e))),Es=M(5,Ts),Ds=M(6,e=>{Ts(e),bs(e)}),Os=M(18,gs),ks=M(8,ms),As=M(23,F(as)),js=M(25),Ms=M(9,e=>js(e,zs(e))),Ns=(e,t)=>z(e.a,`disabled`,t);function Ps(e){return t=>{Cs(e._._._._._,t)}}function Fs(e){return function(t){vs(e,t),ys(e,0)}}function Is(e){return async t=>{if(e.u===t){xs(e,null);return}xs(e,t),Ss(e,null),Cs(e,``);try{let n=await H(`/api/repos/branches?repo=${encodeURIComponent(t)}`);e.u===t&&Ss(e,n.branches)}catch(t){xs(e,null),e.g?.(String(t.message||t))}}}function Ls(e){return()=>e.q(!0)}function Rs(e){return async t=>{t&&e.f?.(!0);try{let n=await H(`/api/repos${t?`?refresh`:``}`);Jo=n,_s(e,n)}catch(t){e.g?.(String(t.message||t))}t&&e.f?.(!1)}}function zs(e){return(t,n)=>{vs(e,``),xs(e,null),e.j(t,n)}}R(`m1`,Ps),R(`m0`,Fs),R(`m5`,Is),R(`m2`,Ls),R(`m3`,Rs),R(`m4`,zs);var Bs=`<dialog><div class=manage><!></div><!></dialog>`,Vs=` E%l%l`,Hs=de(1),Us=ot(`i0`,`Done`),Ws=e=>{e.a,Lo(e.a,Us(e)),Ro(e.a,`btn primary`),zo(e.a),Bo(e.a)},Gs=ue(0),Ks=P(2,0,e=>Gs(e,e._.o)),qs=Ks,Js=M(15,e=>z(e.a,`closedby`,e.p?`any`:`none`)),Ys=(e,t)=>Js(e,t!==!1),Xs=Ve(16,L(`i2`,e=>{{let t=e.a;e.q?t.open||t.showModal():t.open&&t.close()}})),Zs=N(8,e=>Xs(e,e.g,e.h)),Qs=M(6,Zs),$s=O(2,`<form method=dialog class=manage-bar><!></form>`,`D%`,qs,(e=>`<form method=dialog class=manage-bar>${e}</form>`)(Fo),(e=>`D/${e}&l`)(Io),Ws),ec=N(13,e=>$s(e,e.m?0:e.h?1:2)),tc=M(7,e=>{Zs(e),ec(e)}),nc=(e,t)=>ut(e.a,[`manage-view`,t]),rc=(e,t)=>z(e.a,`aria-label`,t),ic=L(`i1`,e=>{A(e.a,`cancel`,function(t){t.preventDefault(),e.p&&Xs(e,!1)}),A(e.a,`close`,function(){e.q&&Xs(e,!1)})}),ac=M(12,e=>{oc(e,e.m?.content),ec(e)}),oc=M(14,Ks),sc=Bs,cc=(e=>`/${e}&`)(Vs),lc=new Map,uc=M(3,e=>{z(e.a,`title`,`Open http://${typeof location>`u`?`localhost`:location.hostname}:${e.d}`),V(e.b,e.d)}),dc=L(`h24`,e=>A(e.a,`click`,function(){window.open(`http://${location.hostname}:${e.d}`,`_blank`,`noopener`)})),fc=(e,t)=>uc(e,t[0]),pc=(e,t)=>V(e.a,t),mc=(e,t)=>pc(e,t[0]),hc=P(2,0,e=>V(e.a,e._.j)),gc=hc,_c=P(0,0,e=>V(e.a,e._.e)),vc=_c,yc=ot(`h14`,`Done`),bc=(e,t)=>z(e.a,`title`,t),xc=(e,t)=>V(e.b,t),Sc=k(2,`<button class="chip port-link">:<!></button>`,` Db%`,dc,fc),Cc=(e,t)=>Sc(e,[t,e=>String(e)]),wc=M(9,e=>z(e.d,`title`,`Kill ${e.j}`)),Tc=L(`h25`,e=>A(e.d,`click`,function(){e._._._.ah(e.j)})),Ec=(e,t)=>{bc(e,t[0]?.args),xc(e,t[0]?.cmd),Cc(e,t[0]?.ports),wc(e,t[0]?.pid)},Dc=P(6,0,e=>z(e.a,`title`,`Confirm #${e._.p} is done — remove from this list`)),Oc=L(`h20`,e=>A(e.a,`click`,function(){e._._._._._.a9(e._._.g,e._.p)})),kc=O(6,`<button class=pr-dismiss>✓</button>`,` `,e=>{Dc._(e),Oc(e)}),Ac=N(11,e=>V(e.b,e.j===`OPEN`&&e.k?`draft`:e.j.toLowerCase())),jc=O(2,`<span class="pr-state open" title=Approved>✓</span>`,0,0,`<span class="pr-state closed" title="Changes requested">✗</span>`),Mc=N(13,e=>jc(e,e.j===`OPEN`&&e.m===`APPROVED`?0:e.j===`OPEN`&&e.m===`CHANGES_REQUESTED`?1:2)),Nc=M(9,e=>{ut(e.a,[`pr-state`,e.j.toLowerCase()]),kc(e,+(e.j===`OPEN`)),Ac(e),Mc(e)}),Pc=M(10,Ac),Fc=M(12,Mc),Ic=(e,t)=>z(e.d,`href`,t),Lc=M(15,e=>{V(e.e,e.p),Dc(e)}),Rc=(e,t)=>V(e.f,t),zc=(e,t)=>{Nc(e,t[0]?.state),Pc(e,t[0]?.isDraft),Fc(e,t[0]?.reviewDecision),Ic(e,t[0]?.url),Lc(e,t[0]?.number),Rc(e,t[0]?.title)},Bc=P(0,0,e=>V(e.b,e._.e)),Vc=L(`h19`,e=>A(e.a,`click`,function(){e._._._.a8()})),Hc=e=>{Bc._(e),Vc(e)},Uc=I(55,e=>V(e.a,e._._.t),e=>e._._),Wc=Uc,Gc=N(2,e=>{B(e.a,`armed`,e._._._.s===e._.h),V(e.b,e._._._.s===e._.h?`remove?`:`×`)}),Kc=N(3,e=>z(e.a,`title`,e._._._.s===e._.h?`Really remove ${e._.g}/? Uncommitted changes are lost.`:`Remove ${e._.g}/`),2),qc=I(54,e=>{Gc(e),Kc(e)},e=>e._._._),Jc=L(`h22`,e=>A(e.a,`click`,function(){e._._._.s===e._.f?.full_name?(Fu(e._._._,null),e._._._.af(e._.f)):(Fu(e._._._,e._.f?.full_name),setTimeout(()=>{Fu(e._._._,null)},4e3))})),Yc=e=>{qc(e),Xc._(e),Zc._(e),Jc(e)},Xc=P(3,1,Kc),Zc=P(3,1,e=>{Gc(e),Kc(e)}),Qc=I(52,e=>z(e.a,`disabled`,!!e._._.q),e=>e._._),$c=L(`h16`,e=>A(e.a,`click`,function(){e._._.ag(`restore`)})),el=e=>{Qc(e),$c(e)},tl=I(52,e=>{z(e.a,`disabled`,!!e._._.q),V(e.b,e._._.q===`archive`?`Archiving…`:`Archive`)},e=>e._._),nl=L(`h15`,e=>A(e.a,`click`,function(){e._._.ag(`archive`)})),rl=e=>{tl(e),nl(e)},il=O(1,`<span class="act-step dim"><span class=spin></span> </span>`,`Db `,Wc),al=N(6,e=>il(e,e._.q&&e._.t?0:1)),ol=N(5,e=>V(e.e,e._.q===`delete`?`Deleting…`:e._.r?`Really delete?`:`Delete`)),sl=I(52,e=>{zo(e.a,!!e._.q),z(e.d,`disabled`,!!e._.q),al(e),ol(e)}),cl=L(`h17`,e=>A(e.d,`click`,function(){e._.r?(Pu(e._,!1),e._.ag(`delete`)):(Pu(e._,!0),setTimeout(()=>{Pu(e._,!1)},4e3))})),ll=e=>{sl(e),ul(e),dl(e),pl(e),e.a,Lo(e.a,yc(e)),Ro(e.a,`btn primary`),Bo(e.a),cl(e)},ul=I(53,e=>{B(e.d,`armed`,e._.r),ol(e)}),dl=I(55,al),fl=O(2,`<button type=button class=btn> </button>`,` D `,rl,`<button type=button class=btn>Restore</button>`,` `,el),pl=I(58,e=>fl(e,e._.z===`active`?0:1)),ml=st(`h27`,(e=>`${e}<!><div class=spacer></div><!><button type=button class="btn danger"> </button>`)(Fo),(e=>`/${e}&%c%b D l`)(Io),ll),hl=I(51,e=>V(e.a,e._._._.p),e=>e._._._),gl=st(`h18`,` `,` `,hl),_l=e=>{Sr(e.a,gl(e)),vr(e.a,`inline`),Er(e.a,hd(e)),hr(e.a),br(e.a),Tr(e.a)},vl=O(3,`<span class=spin></span>`,0,0,`<button class=cur-remove> </button>`,` D `,Yc),yl=N(8,e=>vl(e,+!e._._.n.has(e.h))),bl=I(49,yl,e=>e._._),xl=bl,Sl=M(6,e=>{V(e.a,e.g),Xc(e)}),Cl=M(7,e=>{V(e.b,e.h),yl(e),Zc(e)}),wl=O(2,`<span class="cur-base mono" title="Base branch">⎇ <!></span>`,`Db%`,gc),Tl=N(11,e=>wl(e,+(e.j===e.k))),El=M(9,e=>{Tl(e),hc(e)}),Dl=M(10,Tl),Ol=(e,t)=>kl(e,t[0]),kl=M(5,e=>{Sl(e,e.f?.worktree),Cl(e,e.f?.full_name),El(e,e.f?.base_branch),Dl(e,e.f?.default_branch)}),Al=O(0,`<div class="pr-repo-name mono dim"> </div>`,`D `,vc),jl=I(47,e=>Al(e,e._._._.l>1?0:1),e=>e._._._),Ml=jl,Nl=k(1,`<li><span> </span><!><a class=pr-link target=_blank rel=noopener><span class="dim mono">#<!></span> </a><span class=pr-spacer></span><!></li>`,`D D l%b Eb%l lb%`,0,zc),Pl=(e,t)=>Nl(e,[t,`number`]),Fl=(e,t)=>{Il(e,t[0]?.worktree),Pl(e,t[0]?.prs),Ll(e,t[0]?.full_name)},Il=M(4,_c),Ll=M(6),Rl=O(0,`<button class=btn title="Confirm every merged/closed PR is done — remove them from this list">Clear <!> finished</button>`,` Db%`,Hc),zl=M(4,e=>{Rl(e,+!e.e),Bc(e)}),Bl=k(3,`<div class=pr-repo><!><ul class=pr-list></ul></div>`,`D%b `,Ml,Fl),Vl=I(46,e=>{zl(e,(e._._.k||[]).reduce((e,t)=>e+t.prs.filter(e=>e.state!==`OPEN`).length,0)),Bl(e,[e._._.k.filter(e=>e.prs.length),`full_name`])},e=>e._._),Hl=L(`h21`,e=>A(e.b,`click`,function(){e._._.a7()})),Ul=e=>{Vl(e),Wl(e),Uo(e.c),Wo(e.c,13),Go(e.c),Hl(e)},Wl=I(48,e=>{B(e.b,`spinning`,e._._.m),z(e.b,`disabled`,e._._.m)},e=>e._._),Gl=k(0,`<li><span class="mono proc-cmd"><!><!></span><button class=proc-kill>×</button></li>`,`D D%b%l `,Tc,Ec),Kl=I(45,e=>Gl(e,[e._._.j,`pid`]),e=>e._._),ql=Kl,Jl=Xe(12),Yl=I(44,e=>{B(e.e,`spinning`,e._.i),z(e.e,`disabled`,e._.i)}),Xl=L(`h26`,e=>A(e.e,`click`,function(){Jl(e)()})),Zl=e=>{Yl(e),$l(e),tu(e),iu(e),su(e),lu(e),du(e),fu(e),mu(e),hu(e),gu(e),_u(e),vu(e),Uo(e.f),Wo(e.f,13),Go(e.f),qe(e,9,yu),ws(e.j),Ds(e.j,_d(e)),Es(e.j,gd(e)),Ns(e.j),Xl(e)},Ql=O(11,`<section><h3>Processes</h3><ul class=procs></ul></section>`,`Db `,ql),$l=I(45,e=>Ql(e,e._.j&&e._.j?.length?0:1)),eu=O(3,(e=>`<section><div class=repos-head><h3>Pull requests</h3><!><button class=icon-btn title="Refresh PRs">${e}</button></div><!></section>`)(Vo),(e=>`Eb%b D/${e}&m%l`)(Ho),Ul),tu=I(46,e=>eu(e,e._.k&&e._.k.some(e=>e.prs.length)?0:1)),nu=k(7,`<li class="cur-repo pending"><span class=spin></span><span class="dim cur-full"> </span></li>`,`DbD `,0,mc),ru=N(13,e=>nu(e,[[...e._.n].filter(t=>!e._.aa.has(t)),e=>e])),iu=I(49,ru),au=O(8,`<li class="dim empty-note">No repos yet — search below to add one.</li>`),ou=N(14,e=>au(e,!e._.a2&&!e._.o?0:1)),su=I(50,ou),cu=O(2,Qn,(e=>`/${e}&`)($n),_l),lu=I(51,e=>cu(e,+!e._.p)),uu=k(6,`<li class=cur-repo><span class="mono cur-worktree"><!>/</span><span class="dim cur-full"> </span><!><!></li>`,`E%lD l%b%`,xl,Ol),du=I(56,e=>uu(e,[e._.x,`full_name`])),fu=I(57,e=>V(e.a,e._.y)),pu=N(15,e=>V(e.b,e._.a0||e._.a1)),mu=I(59,pu),hu=I(60,pu),gu=I(61,ou),_u=I(62,e=>{ks(e.j,e._.aa),ru(e)}),vu=I(63,e=>Ms(e.j,vd(e))),yu=et(`h23`,M(12)),bu=ot(`h28`,((e,t)=>`<header class=manage-head><div><h2> </h2><p class="dim mono"> </p></div></header><!><!><section><div class=repos-head><h3>Repos</h3><button class=icon-btn title="Refresh repo list">${e}</button></div><ul class=cur-repos><!><!><!></ul>${t}</section><!><!>`)(Vo,Ko),((e,t)=>`F lD n%b%bEb D/${e}&mD%b%b%l0${t}&l%c`)(Ho,qo),Zl,0,`B1`),xu=j(8,F(Yl)),Su=j(12,F(Wl)),Cu=M(40,F(vu)),wu=N(39,e=>Cu(e,yd(e)),3),Tu=M(41),Eu=N(38,e=>Tu(e,bd(e)),3),Du=M(37,e=>{wu(e),Eu(e)}),Ou=F(iu,bl),ku=j(13,e=>{Ku(e,e.n?.size),Du(e,xd(e)),wu(e),Eu(e),Ou(e)}),Au=j(15,F(lu,hl)),ju=N(32,L(`h29`,e=>xt(e,{busyCount:e.o,pendingAction:e.q,onMount:function(){let t=new AbortController,n=t.signal;return bn().addEventListener(`workspace.progress`,t=>{(this.pendingAction||this.busyCount)&&t.data?.message&&t.data.op===e.v&&Iu(e,t.data.message)},{signal:n}),e.a3(n),e.a4(n,!1).then(()=>e.a4(n,!0)),{abort:t}},onDestroy:function(){this.abort.abort()}})),4),Mu=F(sl,tl,Qc),Nu=j(16,e=>{Ys(e.a,!e.q),ju(e),Mu(e)}),Pu=j(17,F(ul)),Fu=j(18,F(qc)),Iu=j(19,F(dl,Uc));function Lu(e){ic(e.a),ac(e.a,Yt({content:ml(e)})),Hs(e.a,bu(e)),nc(e.a),xu(e,!1),Su(e,!1),ku(e,new Set),Au(e,null),Nu(e,null),Pu(e,!1),Fu(e,null),Iu(e,null)}var Ru=j(9,F($l,Kl)),zu=M(34),Bu=N(31,e=>zu(e,Sd(e)),2),Vu=F(tu,Vl),Hu=j(10,e=>{Wu(e,e.k?.length),Bu(e),Vu(e)}),Uu=(e,t)=>{Ru(e,lc.get(`procs:${t}`)||null),Hu(e,lc.get(`prs:${t}`)||null)},Wu=M(11,F(jl)),Gu=F(su),Ku=M(14,e=>{ju(e),Gu(e)}),qu=M(20,e=>{td(e,e.u?.id),id(e,e.u?.repos),sd(e,e.u?.name),cd(e,e.u?.status),ld(e,e.u?.display_path),ud(e,e.u?.path),Eu(e)}),Ju=M(43),Yu=M(29,e=>{Ju(e,Cd(e)),ju(e)}),Xu=M(33),Zu=M(30,e=>{Xu(e,Td(e)),ju(e),Bu(e)}),Qu=M(35),$u=M(42),ed=N(22,e=>$u(e,Od(e))),td=M(21,e=>{Yu(e,wd(e)),Zu(e,Ed(e)),Qu(e,Dd(e)),ju(e),Bu(e),wu(e),ed(e)}),nd=M(36,F(_u)),rd=F(du),id=M(23,e=>{ad(e,e.x?.length),nd(e,new Set(e.x.map(e=>e.full_name))),rd(e)}),ad=M(28,F(gu)),od=F(fu),sd=M(24,e=>{rc(e.a,`Manage ${e.y}`),od(e)}),cd=M(25,F(pl)),ld=M(26,F(mu)),ud=M(27,F(hu)),dd=(e,t)=>{Uu(e,t?.id),qu(e,t)},fd=M(5,e=>{wu(e),Eu(e)}),pd=M(6,e=>{tc(e.a,e.g),ed(e)}),md=(e,t)=>Qs(e.a,t);function hd(e){return function(){Au(e._._,null)}}function gd(e){return function(t){xu(e._,t)}}function _d(e){return function(t){Au(e._,t)}}function vd(e){return function(t,n){e._.ae(t,n)}}function yd(e){return async(t,n)=>{if(!(!t||e.n.has(t))){Au(e,null),e.ab(t,!0);try{let r=await H(`/api/workspaces/${e.v}/repos`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({fullName:t,baseBranch:n})});e.f?.(r)}catch(t){Au(e,String(t.message||t))}e.ab(t,!1)}}}function bd(e){return async t=>{if(!e.n.has(t.full_name)){Au(e,null),e.ab(t.full_name,!0);try{await H(`/api/workspaces/${e.u?.id}/repos/${encodeURIComponent(t.worktree)}`,{method:`DELETE`}),e.f?.({...e.u,repos:(e.u?.repos).filter(e=>e.full_name!==t.full_name)})}catch(t){Au(e,String(t.message||t))}e.ab(t.full_name,!1)}}}function xd(e){return(t,n)=>{let r=new Set(e.n);n?r.add(t):r.delete(t),ku(e,r)}}function Sd(e){return async()=>{for(let t of e.k||[])for(let n of t.prs)n.state!==`OPEN`&&await H(`/api/workspaces/${e.v}/prs`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({fullName:t.full_name,number:n.number})}).catch(()=>{});await e.a4(void 0,!1)}}function Cd(e){return async t=>{await fetch(`/api/procs/${t}`,{method:`DELETE`}),setTimeout(()=>e.a3(void 0),500)}}function wd(e){return async t=>{try{let n=await H(`/api/workspaces/${e.v}/procs`,{signal:t});Ru(e,n),lc.set(`procs:${e.v}`,n)}catch{}}}function Td(e){return async()=>{Su(e,!0),await e.a4(void 0,!0),Su(e,!1)}}function Ed(e){return async(t,n)=>{try{let r=await H(`/api/workspaces/${e.v}/prs${n?`?refresh`:``}`,{signal:t});Hu(e,r),lc.set(`prs:${e.v}`,r)}catch{}}}function Dd(e){return async(t,n)=>{Au(e,null);try{let r=await H(`/api/workspaces/${e.v}/prs`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({fullName:t,number:n})});Hu(e,r),lc.set(`prs:${e.v}`,r)}catch(t){Au(e,String(t.message||t))}}}function Od(e){return async t=>{Au(e,null),Nu(e,t),Iu(e,null);try{await H(`/api/workspaces/${e.v}`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({action:t})}),t===`delete`&&e.g?.(!1)}catch(t){Au(e,String(t.message||t))}finally{Nu(e,null),Iu(e,null)}}}R(`h10`,hd),R(`h13`,gd),R(`h12`,_d),R(`h11`,vd),R(`h6`,yd),R(`h7`,bd),R(`h5`,xd),R(`h3`,Sd),R(`h9`,Cd),R(`h0`,wd),R(`h2`,Td),R(`h1`,Ed),R(`h4`,Dd),R(`h8`,Od);var kd=Bs,Ad=(e=>`/${e}&`)(Vs),jd=P(1,0,e=>V(e.a,e._.g)),Md=jd,Nd=ot(`j9`,`Cancel`),Pd=O(1,`<span class=spin></span>`,0,0,`<span class=step-done>✓</span>`),Fd=I(31,e=>{B(e.a,`active`,e.M===e._._._.n-1),Pd(e,e.M===e._._._.n-1?0:1)},e=>e._._._),Id=Fd,Ld=(e,t)=>V(e.c,t),Rd=k(0,`<li><!><!></li>`,` D%b%`,Id,(e,t)=>Ld(e,t[0])),zd=I(30,e=>Rd(e,[e._._.m]),e=>e._._),Bd=zd,Vd=I(29,e=>V(e.a,e._._._.l),e=>e._._._),Hd=st(`j11`,` `,` `,Vd),Ud=e=>{Sr(e.a,Hd(e)),vr(e.a,`inline`),Er(e.a,Jf(e)),hr(e.a),br(e.a),Tr(e.a)},Wd=I(28,e=>z(e.c,`disabled`,e._._.k),e=>e._._),Gd=L(`j12`,e=>A(e.c,`click`,function(){e._._.w(e.f)})),Kd=e=>{Wd(e),Gd(e)},qd=M(5,e=>{V(e.a,e.f),z(e.c,`title`,`Remove ${e.f}`)}),Jd=O(1,`<span class="cur-base mono" title="Base branch">⎇ <!></span>`,`Db%`,Md),Yd=M(6,e=>{Jd(e,+!e.g),jd(e)}),Xd=(e,t)=>{qd(e,t[0]?.fullName),Yd(e,t[0]?.baseBranch)},Zd=Xe(9),Qd=I(24,e=>At(e,`b`,e._.g,Yf(e))),$d=L(`j14`,e=>{jt(e,`b`),A(e.c,`click`,function(){Zd(e)()})}),ef=e=>{Qd(e),tf(e),rf(e),of(e),lf(e),df(e),ff(e),pf(e),Uo(e.d),Wo(e.d,13),Go(e.d),qe(e,6,mf),ws(e.g),Ds(e.g,Zf(e)),Es(e.g,Xf(e)),$d(e)},tf=I(25,e=>{B(e.c,`spinning`,e._.h),z(e.c,`disabled`,e._.h)}),nf=k(4,`<li class=cur-repo><span class=cur-full> </span><!><button class=cur-remove>×</button></li>`,`E l%b `,Kd,Xd),rf=I(26,e=>{ks(e.g,new Set(e._.i.map(e=>e.fullName))),nf(e,[e._.i,`fullName`])}),af=O(5,`<li class="dim empty-note">No repos yet — search below to add one (or create empty).</li>`),of=I(27,e=>af(e,+!!e._.j)),sf=O(8,`<ul class=steps></ul>`,` `,Bd),cf=N(10,e=>sf(e,e._.k&&e._.n?0:1)),lf=I(28,e=>{z(e.b,`disabled`,e._.k),Ns(e.g,e._.k),cf(e)}),uf=O(0,Qn,(e=>`/${e}&`)($n),Ud),df=I(29,e=>uf(e,+!e._.l)),ff=I(31,cf),pf=I(32,e=>Ms(e.g,Qf(e))),mf=et(`j13`,M(9)),hf=ot(`j16`,((e,t)=>`<header class=manage-head><div><h2>New workspace</h2></div></header><!><label class=field><span>Name</span><input placeholder=my-feature autofocus></label><section><div class=repos-head><h3>Repos</h3><button class=icon-btn title="Refresh repo list">${e}</button></div><ul class=cur-repos><!><!></ul>${t}</section><!><!>`)(Vo,Ko),((e,t)=>`b%bDb lEb D/${e}&mD%b%l0${t}&l%c`)(Ho,qo),ef,0,`B2`),gf=N(3,e=>z(e.a,`disabled`,e._.k||!e._.g.trim())),_f=I(24,gf),vf=L(`j10`,e=>A(e.a,`click`,function(){e._.x()})),yf=e=>{_f(e),bf(e),e.c,Lo(e.c,Nd(e)),Ro(e.c,`btn`),Bo(e.c),vf(e)},bf=I(28,e=>{V(e.b,e._.k?`Creating…`:`Create workspace`),zo(e.c,e._.k),gf(e)}),xf=st(`j15`,(e=>`<button type=button class="btn primary"> </button><div class=spacer></div>${e}`)(Fo),(e=>` D lb/${e}&`)(Io),yf),Sf=M(23),Cf=N(20,e=>Sf(e,$f(e)),5),wf=F(_f,Qd),Tf=j(6,e=>{Cf(e),wf(e)}),Ef=j(7,F(tf)),Df=M(21,F(pf)),Of=M(22),kf=F(rf),Af=j(8,e=>{Vf(e,e.i?.length),Df(e,ep(e)),Of(e,tp(e)),Cf(e),kf(e)}),jf=N(19,L(`j17`,e=>xt(e,{busy:e.k,onMount:function(){let t=new AbortController;return bn().addEventListener(`workspace.progress`,t=>{this.busy&&t.data?.message&&e.s([t.data])},{signal:t.signal}),{abort:t}},onDestroy:function(){this.abort.abort()}}))),Mf=F(bf,lf,Wd),Nf=j(10,e=>{Ys(e.a,!e.k),jf(e),Mf(e)}),Pf=j(11,F(df,Vd)),Ff=M(18,e=>{jf(e),Cf(e)}),If=N(17,e=>Ff(e,np(e)),2),Lf=F(zd),Rf=j(12,e=>{Hf(e,e.m?.length),If(e),Lf(e)}),zf=(e,t)=>{Uf(e,t.op),Wf(e,t.last)};function Bf(e){ic(e.a),ac(e.a,Yt({content:xf(e)})),Hs(e.a,hf(e)),rc(e.a,`New workspace`),nc(e.a,`new-ws`),Tf(e,``),Ef(e,!1),Af(e,[]),Nf(e,!1),Pf(e,null),Rf(e,[]),zf(e,{last:0,op:``})}var Vf=M(9,F(of)),Hf=M(13,F(ff,Fd)),Uf=M(15,e=>{If(e),Cf(e)}),Wf=M(16,e=>{If(e),Cf(e)}),Gf=M(3,Cf),Kf=(e,t)=>Qs(e.a,t),qf=(e,t)=>tc(e.a,t);function Jf(e){return function(){Pf(e._._,null)}}function Yf(e){return t=>{Tf(e._,t)}}function Xf(e){return function(t){Ef(e._,t)}}function Zf(e){return function(t){Pf(e._,t)}}function Qf(e){return function(t,n){e._.v(t,n)}}function $f(e){return async()=>{Nf(e,!0),Pf(e,null),Rf(e,[]),e.p=Math.random().toString(36).slice(2,10);try{e.q=(await H(`/api/progress`)).seq}catch{}let t=setInterval(async()=>{try{let t=await H(`/api/progress?since=${e.q}&op=${e.p}`);e.s(t.messages)}catch{}},800);try{let t=await H(`/api/workspaces`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({name:e.g,repos:e.i,opId:e.p})});Nf(e,!1),e.d?.(t)}catch(t){Nf(e,!1),Pf(e,String(t.message||t))}finally{clearInterval(t)}}}function ep(e){return(t,n)=>{!t||e.i.some(e=>e.fullName===t)||Af(e,e.i.concat({fullName:t,baseBranch:n}))}}function tp(e){return t=>{Af(e,e.i.filter(e=>e.fullName!==t))}}function np(e){return t=>{for(let n of t)n.op===e.p&&(n.seq&&n.seq<=e.q||(n.seq&&(e.q=n.seq),Rf(e,e.m.concat(n.message))))}}R(`j5`,Jf),R(`j0`,Yf),R(`j8`,Xf),R(`j7`,Zf),R(`j6`,Qf),R(`j4`,$f),R(`j2`,ep),R(`j3`,tp),R(`j1`,np);var rp=Nr,ip=(e=>`/${e}&`)(Pr);function ap(e){Rr(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 op=(e,t)=>Ir(e.a,t),sp=(e,t)=>Lr(e.a,t),cp=`<!><!><!>`,lp=N(9,e=>B(e.d,`armed`,e._._._._.w===e.i)),up=N(10,e=>z(e.d,`title`,e._._._._.w===e.i?`Really kill ${e.g}?`:`Kill ${e.g} (pid ${e.i})`),2),dp=I(39,e=>{lp(e),up(e)},e=>e._._._._),fp=L(`n8`,e=>{A(e.b,`click`,function(){window.open(`http://${location.hostname}:${e.h}`,`_blank`,`noopener`)}),A(e.d,`click`,function(){e._._._._.w===e.i?(jm(e._._._._,null),fetch(`/api/procs/${e.i}`,{method:`DELETE`}).catch(()=>{})):e._._._._.z(()=>{jm(e._._._._,e.i)})})}),pp=e=>{dp(e),fp(e)},mp=M(6,e=>{z(e.a,`title`,e.g),up(e)}),hp=M(7,e=>{z(e.b,`title`,`Open http://${typeof location>`u`?`localhost`:location.hostname}:${e.h}`),V(e.c,e.h)}),gp=M(8,e=>{lp(e),up(e)}),_p=(e,t)=>{mp(e,t[0]?.cmd),hp(e,t[0]?.port),gp(e,t[0]?.pid)},vp=N(12,e=>V(e.b,e._._.c(e._.c))),yp=I(3,vp,e=>e._._),bp=L(`n7`,e=>A(e.a,`click`,function(){e._._._._._.u?.(e._.e,e.l)})),xp=e=>{yp(e),Sp._(e),wp._(e),bp(e)},Sp=He(0,vp),Cp=N(10,e=>z(e.a,`title`,`${e._.e} — ${e.j}${e.h===`APPROVED`?` (approved)`:e.h===`CHANGES_REQUESTED`?` (changes requested)`:``}`),2),wp=He(0,Cp),Tp=N(8,e=>dt(e.a,{draft:e.g,rejected:e.h===`CHANGES_REQUESTED`})),Ep=M(6,Tp),Dp=M(7,e=>{V(e.d,e.h===`APPROVED`?` ✓`:e.h===`CHANGES_REQUESTED`?` ✗`:``),Tp(e),Cp(e)}),Op=M(9,Cp),kp=M(11,e=>V(e.c,e.l)),Ap=k(0,`<button class="chip pr"><!>#<!><!></button>`,` D%c%b%`,xp,(e,t)=>{Ep(e,t[0]?.isDraft),Dp(e,t[0]?.reviewDecision),Op(e,t[0]?.title),kp(e,t[0]?.number)}),jp=(e,t)=>Ap(e,[t||[],`number`]),Mp=(e,t)=>Np(e,t[0]),Np=M(2,e=>{jp(e,e.c?.prs),Pp(e,e.c?.worktree),Sp(e)}),Pp=M(4,wp),Fp=M(2,F(yp)),Ip=k(0,`<!><!><!>`,`b%`,0,Mp),Lp=I(6,e=>{Fp(e,Zm(e)),Ip(e,[e._._.c||[],`full_name`])},e=>e._._),Rp=e=>{Lp(e),Bp(e)},zp=k(1,`<span class="chip port-chip"><button class=port-open>:<!></button><button class=port-kill>×</button></span>`,` D Db%l `,pp,_p),Bp=I(7,e=>zp(e,[e._._.d||[],`port`]),e=>e._._),Vp=N(11,e=>B(e.a,`current`,e.k===e._._._.q)),Hp=I(37,Vp,e=>e._._._),Up=L(`n6`,e=>{A(e.b,`click`,function(){e._._._.r?.(e.k)}),A(e.f,`click`,function(){e._._._.s?.(e.j)}),A(e.h,`click`,function(){e._._._.v===e.k?(Am(e._._._,null),e._._._.t?.(e.k)):e._._._.z(()=>{Am(e._._._,e.k)})})}),Wp=e=>{Hp(e),Kp(e),e.d,si(e.d,13),di(e.d,`sess-icon`),ap(e.g),op(e.g,12),sp(e.g),Up(e)},Gp=N(12,e=>{B(e.h,`armed`,e._._._.v===e.k),z(e.h,`title`,e._._._.v===e.k?`Really kill this session?`:`Kill session`)}),Kp=I(38,Gp,e=>e._._._),qp=M(10,e=>{Vp(e),Gp(e)}),Jp=(e,t)=>ut(e.c,[`dot`,Mr(t)]),Yp=N(16,e=>V(e.e,e.p||e.o)),Xp=M(14,e=>{ui(e.d,e.o),Yp(e)}),Zp=M(15,Yp),Qp=(e,t)=>$p(e,t[0]),$p=M(9,e=>{qp(e,e.j?.id),Jp(e,e.j?.state),Xp(e,e.j?.agent),Zp(e,e.j?.title)}),em=L(`n4`,e=>A(e.a,`click`,function(t,n){n.closest(`[popover]`)?.hidePopover(),e._._._._.n?.(e.e)})),tm=e=>{e.b,si(e.b,14),di(e.b),em(e)},nm=M(4,e=>{ui(e.b,e.e),V(e.c,e.e)}),rm=k(2,(e=>`<button>${e}<!></button>`)(ei),(e=>` D/${e}&%l`)(`b%c`),tm,(e,t)=>nm(e,t[0])),im=I(35,e=>rm(e,[[...e._._._.o||[],`shell`],e=>e]),e=>e._._._),am=(e,t)=>{z(e.a,`popovertarget`,t),z(e.c,`id`,t)},om=L(`n5`,e=>A(e.c,`toggle`,function(t,n){if(t.newState===`open`){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`}})),sm=e=>{im(e),e.b,ui(e.b,`shell`),si(e.b,12),di(e.b),am(e,Je(e)),om(e)},cm=L(`n3`,e=>A(e.a,`click`,function(){e._._._.l?.()})),lm=e=>{Vr(e.b),Hr(e.b,12),Ur(e.b),cm(e)},um=I(31,e=>B(e.a,`current`,e._._.i),e=>e._._),dm=L(`n9`,e=>{A(e.b,`click`,function(){e._._.j()}),A(e.f,`click`,function(){e._._.m?.()})}),fm=e=>{um(e),mm(e),hm(e),gm(e),_m(e),ym._(e),bm._(e),xm._(e),Kr(e.g),qr(e.g,12),Jr(e.g),dm(e)},pm=O(4,(e=>`<button class="row-icon new-sess" title="Review changes">${e}</button>`)(zr),(e=>` D/${e}&l`)(Br),lm),mm=I(33,e=>pm(e,+!e._._.l),e=>e._._),Wee=O(7,(e=>`<button class="row-icon new-sess" title="New session">${e}</button><div popover=auto class=new-session-pop></div>`)(ei),(e=>` D/${e}&l b`)(`b%c`),sm),hm=I(34,e=>Wee(e,+!e._._.n),e=>e._._),Gee=k(8,((e,t)=>`<div class=side-sess><button class=side-sess-btn><span></span>${e}<!></button><button class=row-icon title="Rename session">${t}</button><button class=close>×</button></div>`)(ei,rp),((e,t)=>` D D b/${e}&%l D/${t}&l l`)(`b%c`,ip),Wp,Qp),Kee=(e,t)=>Gee(e,[t.length>1?t:[],`id`]),gm=I(36,e=>Kee(e,e._._.p||[]),e=>e._._),_m=I(40,e=>V(e.d,e._._.a1),e=>e._._),qee=O(9,`<div class=side-chips><!><!></div>`,`D%b%`,Rp),vm=N(11,e=>qee(e,(e._.c||[]).some(e=>(e.prs||[]).length)||(e._.d||[]).length?0:1)),ym=P(0,1,vm),bm=P(0,1,vm),xm=P(0,1,e=>ut(e.c,[`dot`,e._.e])),Sm=I(31,e=>B(e.a,`current`,e._._.i),e=>e._._),Jee=L(`n2`,e=>A(e.a,`click`,function(){e._._.j()})),Yee=e=>{Sm(e),Cm(e),wm(e),Tm._(e),Jee(e)},Cm=I(32,e=>V(e.b,(e._._.k??0)+1),e=>e._._),wm=I(40,e=>z(e.a,`title`,e._._.a1),e=>e._._),Tm=P(0,0,e=>ut(e.c,[`dot`,e._.e])),Xee=M(4,e=>{Tm(e),xm(e)}),Zee=(e,t)=>{tte(e,t?.repos),rte(e,t?.ports),Xee(e,jr(t))},Em=N(5,e=>Zee(e,e._.g[e._.e])),Dm=P(0,0,Em),Qee=e=>{Dm._(e),Om._(e),km._(e)},Om=P(0,0,Em),$ee=O(0,`<button class="icon-btn rail-btn"> <span></span></button>`,` D b `,Yee,(e=>`<section class=side-ws><div class=side-ws-row><button class=side-ws-btn><span></span><span class=side-ws-name> </span></button><!><button class=row-icon title="Manage workspace">${e}</button><!></div><div class=side-sessions><!><!></div></section>`)(Wr),(e=>` E D bD m%b D/${e}&l%lD%b%m`)(Gr),fm),km=P(0,0,e=>$ee(e,+!e._.h)),ete=F(Lp),tte=M(2,e=>{ym(e),ete(e)}),nte=F(Bp),rte=M(3,e=>{bm(e),nte(e)}),Am=j(21,F(Kp)),jm=j(22,F(dp)),ite=(e,t)=>ote(e,t.timer);function Mm(e){Am(e,null),jm(e,null),ite(e,{timer:0})}var ate=M(25),ote=M(24,e=>ate(e,Qm(e))),ste=O(0,`<!><!><!>`,`b%`,Qee),cte=(e,t)=>{lte(e,t?.name),ste(e,+!t)},lte=M(27,F(wm,_m)),Nm=N(5,e=>cte(e,e.d.find(t=>t.id===e.e))),Pm=M(3,Nm),Fm=M(4,e=>{Nm(e),Dm(e)}),Im=M(6,Om),Lm=M(7,km),Rm=M(8,F(Sm,um)),zm=M(9),Bm=M(10,F(Cm)),Vm=M(11,F(mm)),Hm=M(12),Um=M(13,F(hm)),Wm=M(14,F(im)),Gm=M(15,F(gm)),Km=M(16,F(Hp)),qm=M(17),Jm=M(18),Ym=M(19),Xm=M(20);function Zm(e){return t=>{let n=e._._.c||[];if(n.length<2)return``;let r=t.full_name.split(`/`)[1];return n.some(e=>e.full_name!==t.full_name&&e.full_name.split(`/`)[1]===r)?t.full_name:r}}function Qm(e){return t=>{clearTimeout(e.y),t(),e.y=setTimeout(()=>{Am(e,null),jm(e,null)},3500)}}R(`n1`,Zm),R(`n0`,Qm);var ute=Nr,dte=(e=>`/${e}&`)(Pr);function fte(e){Rr(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 pte=(e,t)=>Ir(e.a,t),mte=(e,t)=>Lr(e.a,t),$m=Nr,eh=(e=>`/${e}&`)(Pr);function th(e){Rr(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 M9.5 21V3 M5.5 10L7.25 12L5.5 14`)}var nh=(e,t)=>Ir(e.a,t),rh=(e,t)=>Lr(e.a,t),hte=Nr,gte=(e=>`/${e}&`)(Pr);function _te(e){Rr(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 vte=(e,t)=>Ir(e.a,t),yte=(e,t)=>Lr(e.a,t),bte=Nr,xte=(e=>`/${e}&`)(Pr);function Ste(e){Rr(e.a,`M3 12H6L9 3L15 21L18 12H21`)}var ih=(e,t)=>Ir(e.a,t),ah=(e,t)=>Lr(e.a,t),oh=Nr,sh=(e=>`/${e}&`)(Pr);function ch(e){Rr(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 lh=(e,t)=>Ir(e.a,t),uh=(e,t)=>Lr(e.a,t),dh=((e,t)=>`<!><!><aside class=side-nav><div class=side-list></div><!><div class=side-foot><button class="icon-btn nav-toggle"></button><div class=spacer></div><!><button class=icon-btn title=Usage>${e}</button><button class=icon-btn title="New workspace">${t}</button></div></aside>`)(bte,oh),fh=((e,t)=>`b%b D b%bD c%b D/${e}&l D/${t}&n`)(xte,sh),ph=e=>{th(e.a),nh(e.a,15),rh(e.a)},mh=e=>{fte(e.a),pte(e.a,15),mte(e.a)},hh=P(5,0,e=>{B(e.a,`on`,e._.an),z(e.a,`title`,e._.an?`Disable agent-waiting notifications`:`Notify when an agent is waiting`)}),gh=L(`o19`,e=>A(e.a,`click`,function(){e._.ap()})),_h=e=>{hh._(e),_te(e.b),vte(e.b,15),yte(e.b),gh(e)},vh=L(`o16`,e=>A(e.a,`click`,function(){Zg(e._,!1)})),yh=N(7,e=>Vm(e.b,P_(e)),4),bh=I(56,yh,e=>e._._),xh=L(`o18`,e=>{A(e.a,`mouseenter`,function(){e._.i()}),A(e.a,`mouseleave`,function(){e._.j()})}),Sh=e=>{bh(e),Ch(e),Th(e),Eh(e),Oh(e),kh(e),Ah(e),Nh(e),Ph(e),Fh(e),Ih(e),Lh(e),zh._(e),Vh._(e),Hh._(e),Mm(e.b),Hm(e.b,F_(e)),Lm(e.b),Bm(e.b),xh(e)},Ch=I(57,e=>Wm(e.b,e._._.a2),e=>e._._),wh=N(3,e=>Um(e.b,I_(e))),Th=I(58,wh,e=>e._._),Eh=I(59,yh,e=>e._._),Dh=N(5,e=>Gm(e.b,e.c===e._._.ad&&e._._.a5?e._._.a5:e._._.as[e.c]?.sessions||[]),3),Oh=I(60,Dh,e=>e._._),kh=I(61,e=>Jm(e.b,e._._.a7),e=>e._._),Ah=I(62,e=>Ym(e.b,e._._.a8),e=>e._._),jh=N(4,e=>Rm(e.b,e.c===e._._.ad)),Mh=N(6,e=>Km(e.b,e.c===e._._.ad&&e._._.ah===`term`?e._._.af:null),3),Nh=I(63,e=>{zm(e.b,z_(e)),Xm(e.b,R_(e)),qm(e.b,L_(e)),jh(e),yh(e),Dh(e),Mh(e)},e=>e._._),Ph=I(64,Mh,e=>e._._),Fh=I(65,e=>{yh(e),Mh(e)},e=>e._._),Ih=I(68,e=>Pm(e.b,e._._.ar),e=>e._._),Lh=I(69,e=>{Im(e.b,e._._.as),Dh(e)},e=>e._._),Rh=M(2,e=>{Fm(e.b,e.c),jh(e),wh(e),yh(e),Dh(e),Mh(e)}),zh=P(1,0,e=>Rh(e,e._.d)),Bh=N(8,e=>ft(e.a,`top:${e._.e}px;left:${e._.f}px`)),Vh=P(1,0,Bh),Hh=P(1,0,Bh),Uh=N(4,e=>Rm(e.b,e.d===e._._.ad)),Wh=I(63,e=>{zm(e.b,B_(e)),Uh(e)},e=>e._._),Gh=L(`o17`,e=>{A(e.a,`mouseenter`,function(t,n){e._.i();let r=n.getBoundingClientRect();eg(e._,{id:e.d,top:r.top,left:r.right+8})}),A(e.a,`mouseleave`,function(){e._.j()})}),Kh=e=>{Wh(e),qh(e),Jh(e),Mm(e.b),Lm(e.b,!0),Vm(e.b),Hm(e.b),Um(e.b),Wm(e.b),Gm(e.b),Km(e.b),qm(e.b),Jm(e.b),Ym(e.b),Xm(e.b),Gh(e)},qh=I(68,e=>Pm(e.b,e._._.ar),e=>e._._),Jh=I(69,e=>Im(e.b,e._._.as),e=>e._._),Yh=(e,t)=>Bm(e.b,t),Xh=M(3,e=>{Fm(e.b,e.d),Uh(e)}),Zh=k(0,(e=>`<span>${e}</span>`)(cp),(e=>` D/${e}&l`)(`b%c`),Kh,(e,t)=>{Xh(e,t[0]),Yh(e,t[1])}),Qh=P(3,0,e=>Zh(e,[e._.aq,e=>e])),$h=O(1,(e=>`<div class=rail-pop>${e}</div>`)(cp),(e=>` D/${e}&l`)(`b%c`),Sh),eg=j(2,e=>{rg(e,e.c?.id),ig(e,e.c?.top),ag(e,e.c?.left),$h(e,+!e.c)}),tg=(e,t)=>cg(e,t.timer),ng=e=>{Qh._(e),eg(e,null),tg(e,{timer:0})},rg=M(3,zh),ig=M(4,Vh),ag=M(5,Hh),og=M(8),sg=M(9),cg=M(7,e=>{og(e,V_(e)),sg(e,H_(e))}),lg=N(7,e=>Vm(e.a,U_(e)),4),ug=He(2,lg),dg=e=>{ug._(e),fg._(e),mg._(e),hg._(e),_g._(e),vg._(e),yg._(e),xg._(e),Sg._(e),Cg._(e),wg._(e),Tg._(e),Mm(e.a),Hm(e.a,W_(e)),Lm(e.a),Bm(e.a)},fg=He(2,e=>Wm(e.a,e._.a2)),pg=N(3,e=>Um(e.a,G_(e))),mg=He(2,pg),hg=He(2,lg),gg=N(5,e=>Gm(e.a,e.c===e._.ad&&e._.a5?e._.a5:e._.as[e.c]?.sessions||[]),3),_g=He(2,gg),vg=He(2,e=>Jm(e.a,e._.a7)),yg=He(2,e=>Ym(e.a,e._.a8)),bg=N(6,e=>Km(e.a,e.c===e._.ad&&e._.ah===`term`?e._.af:null),3),xg=Ue(2,39,2,e=>{Rm(e.a,e.c===e._.ad),zm(e.a,J_(e)),Xm(e.a,q_(e)),qm(e.a,K_(e)),lg(e),gg(e),bg(e)}),Sg=He(2,bg),Cg=He(2,e=>{lg(e),bg(e)}),wg=He(2,e=>Pm(e.a,e._.ar)),Tg=He(2,e=>{Im(e.a,e._.as),gg(e)}),Eg=M(2,e=>{Fm(e.a,e.c),pg(e),lg(e),gg(e),bg(e)}),Dg=(e,t)=>Eg(e,t[0]),Og=F(qh,Ih),kg=M(53,e=>{wg(e),Og(e)}),Ag=N(38,e=>kg(e,e.y||[e.ab])),jg=M(37,e=>{Lg(e,e.ab?.id),Ag(e)}),Mg=k(2,(e=>`<!>${e}<!>`)(cp),(e=>`b/${e}&b`)(`b%c`),dg,Dg),Ng=M(52,e=>{Mg(e,[e.aq,e=>e]),Qh(e)}),Pg=N(40,e=>Ng(e,e.y?.length?e.y.filter(e=>e.status===`active`).map(e=>e.id):[e.ad])),Fg=N(55,e=>e.as[e.ad]),Ig=F(Wh,Nh),Lg=M(39,e=>{Pg(e),Fg(e),xg(e),Ig(e)}),Rg=jg,zg=F(Ph),Bg=Ve(41,e=>{Sg(e),zg(e)}),Vg=N(15,e=>Bg(e,e.n,e.o)),Hg=M(13,Vg),Ug=M(14,Vg),Wg=F(Fh),Gg=Ve(43,e=>{z(e.b,`hidden`,e.ah===`diff`),Cg(e),Wg(e)}),Kg=N(18,e=>Gg(e,e.q,e.r)),qg=M(16,Kg),Jg=M(17,Kg),Yg=O(0,`<div class=drawer-backdrop></div>`,` `,vh),Xg=N(48,e=>dt(e.b,{closed:!e.al,open:e.aj})),Zg=Ve(45,e=>{Yg(e,+!e.aj),Xg(e)}),Qg=N(21,e=>Zg(e,e.t,e.u)),$g=M(19,Qg),e_=M(20,Qg),t_=O(3,`<div class=side-rail></div><!><!>`,` b%`,ng),n_=O(4,ute,(e=>`/${e}&`)(dte),mh,$m,(e=>`/${e}&`)(eh),ph),r_=j(47,e=>{z(e.e,`title`,e.al?`Collapse sidebar`:`Expand sidebar`),t_(e,+!!e.al),n_(e,+!e.al),Xg(e)}),i_=M(51),a_=N(50,e=>i_(e,Y_(e))),o_=j(49,e=>{a_(e),hh(e)}),s_=O(5,(e=>`<button class="icon-btn notify-btn">${e}</button>`)(hte),(e=>` D/${e}&l`)(gte),_h),c_=L(`o21`,e=>{xt(e,{onMount:function(){Vn()&&Hn().then(t=>{o_(e,!!t)})}}),A(e.e,`click`,function(){r_(e,!e.al),_ee(e.al)}),A(e.g,`click`,function(){Zg(e,!1),e.a9?.()}),A(e.i,`click`,function(){Zg(e,!1),e.aa?.()})});function l_(e){Ste(e.h),ih(e.h,15),ah(e.h),ch(e.j),lh(e.j,16),uh(e.j),r_(e,Pn()),o_(e,!1),s_(e,+!Vn()),c_(e)}var u_=M(22,a_),d_=M(23,L(`o20`,e=>{e.x&&r_(e,Pn())})),f_=M(24,e=>{Pg(e),Ag(e)}),p_=F(Jh,Lh),m_=M(54,e=>{Fg(e),Tg(e),p_(e)}),h_=(e,t)=>m_(e,t||{}),g_=F(bh),__=M(26,e=>{ug(e),g_(e)}),v_=M(27),y_=F(Ch),b_=M(28,e=>{fg(e),y_(e)}),x_=F(Th),S_=M(29,e=>{mg(e),x_(e)}),C_=F(Eh),w_=M(30,e=>{hg(e),C_(e)}),T_=F(Oh),E_=M(31,e=>{_g(e),T_(e)}),D_=M(32),O_=F(kh),k_=M(33,e=>{vg(e),O_(e)}),A_=F(Ah),j_=M(34,e=>{yg(e),A_(e)}),M_=M(35),N_=M(36);function P_(e){return function(){eg(e._,null),e.c===e._._.ad?(Gg(e._._,e._._.ah===`diff`?`term`:`diff`),e._._.ah===`diff`&&e._._.a4?.()):(wn(e.c),e._._.a0?.(e.c))}}function F_(e){return function(){eg(e._,null),e._._.a1?.(e.c)}}function I_(e){return function(t){eg(e._,null),e._._.a3(e.c,t)}}function L_(e){return function(t){eg(e._,null),e.c===e._._.ad?(Bg(e._._,t),Gg(e._._,`term`)):e._._.a6?.(e.c,t)}}function R_(e){return function(t,n){eg(e._,null);let r=`${t}/${n}`;e.c===e._._.ad?(Gg(e._._,`diff`),e._._.a4?.(r)):(wn(e.c,r),e._._.a0?.(e.c))}}function z_(e){return function(){eg(e._,null),e.c!==e._._.ad&&e._._.a0?.(e.c)}}function B_(e){return function(){e.d!==e._._.ad&&e._._.a0?.(e.d)}}function V_(e){return()=>clearTimeout(e.h)}function H_(e){return()=>{clearTimeout(e.h),e.h=setTimeout(()=>{eg(e,null)},150)}}function U_(e){return function(){Zg(e._,!1),e.c===e._.ad?(Gg(e._,e._.ah===`diff`?`term`:`diff`),e._.ah===`diff`&&e._.a4?.()):(wn(e.c),e._.a0?.(e.c))}}function W_(e){return function(){Zg(e._,!1),e._.a1?.(e.c)}}function G_(e){return function(t){Zg(e._,!1),e._.a3(e.c,t)}}function K_(e){return function(t){Zg(e._,!1),e.c===e._.ad?(Bg(e._,t),Gg(e._,`term`)):e._.a6?.(e.c,t)}}function q_(e){return function(t,n){Zg(e._,!1);let r=`${t}/${n}`;e.c===e._.ad?(Gg(e._,`diff`),e._.a4?.(r)):(wn(e.c,r),e._.a0?.(e.c))}}function J_(e){return function(){e.c!==e._.ad&&(Zg(e._,!1),e._.a0?.(e.c))}}function Y_(e){return async()=>{try{e.an?(await Wn(),o_(e,!1)):(o_(e,await Un()),e.an||e.w?.(`Notifications blocked — allow them for this site in browser/system settings.`))}catch(t){o_(e,!1),e.w?.(`Notifications failed: ${String(t.message||t)}`)}}}R(`o13`,P_),R(`o11`,F_),R(`o12`,I_),R(`o15`,L_),R(`o14`,R_),R(`o10`,z_),R(`o9`,B_),R(`o7`,V_),R(`o8`,H_),R(`o4`,U_),R(`o2`,W_),R(`o3`,G_),R(`o6`,K_),R(`o5`,q_),R(`o1`,J_),R(`o0`,Y_);async function X_(e){try{return await navigator.clipboard.writeText(e),!0}catch{let t=document.createElement(`textarea`);t.value=e,t.style.cssText=`position:fixed;top:-100px;opacity:0;`,document.body.append(t),t.focus(),t.select();let n=document.execCommand(`copy`);return t.remove(),n}}function Z_(e){return e.filter(e=>e.pr).map(e=>`${e.worktree}#${e.pr.number}:${e.pr.headRefOid||e.head||``}`).sort().join(`\0`)}function Q_(e){return e.repos.flatMap(e=>e.prs.map(t=>`${e.worktree}#${t.number}:${t.headRefOid||``}`)).sort().join(`\0`)}var $_=null;function ev(){return $_}function tv(e){let t=[],n=[];for(let r of e.trim().split(/\s+/).filter(Boolean)){let e=r.startsWith(`!`),i=e?r.slice(1):r;i&&(e?n:t).push(nv(i))}return e=>!n.some(t=>t(e))&&t.every(t=>t(e))}function nv(e){if(!/[*?]/.test(e))return t=>Ar(e,t);let t=``;for(let n=0;n<e.length;n++){let r=e[n];r===`*`?e[n+1]===`*`?(t+=`.*`,n++):t+=`[^/]*`:t+=r===`?`?`[^/]`:r.replace(/[.+^${}()|[\]\\]/,`\\$&`)}try{let e=new RegExp(t,`i`);return t=>e.test(t)}catch{return t=>Ar(e,t)}}var rv=3;function iv(e,t){let n=new Map;for(let t of e)n.set(t.worktree,[...n.get(t.worktree)||[],t]);let r=[`Review feedback:`],i=0;for(let[e,a]of n){let n=(t||[]).find(t=>t.worktree===e);r.push(``),r.push(av(e,n));for(let e of a){i++;let t=n?.files.find(t=>t.path===e.path),a=e.side===`deletions`?t?.old:t?.new,o=e.side===`deletions`?`Old`:`New`,s=e.line_start===e.line_end?`line ${e.line_start}`:`lines ${e.line_start}-${e.line_end}`;if(r.push(``),r.push(`${i}. **${e.path}** (${o} ${s})`),a!=null){let t=sv(a,e.line_start,e.line_end,e.side),n=cv(t);r.push(``),r.push(lv(`${n}diff\n${t}\n${n}`))}r.push(``),r.push(lv(e.text))}}return r.join(`
|
|
4
4
|
`)}function av(e,t){if(!t?.head)return`${e}/`;let n=ov(t.head),r=ov(t.baseSha),i=t.pr?.headRefName||t.branch||`HEAD`;return`${e}/${t.pr?` #${t.pr.number}`:``} — \`${i}\` ${n} vs \`${t.base}\` ${r}`}function ov(e,t=12){return e.slice(0,t)}function sv(e,t,n,r){let i=e.split(`
|
|
5
5
|
`),a=Math.max(1,t-rv),o=Math.min(i.length,n+rv),s=r===`deletions`?`-`:`+`,c=[];for(let e=a;e<=o;e++){let r=e>=t&&e<=n?s:` `;c.push(`${r}${String(e).padStart(4)} | ${i[e-1]??``}`)}return c.join(`
|
|
6
6
|
`)}function cv(e){let t=3,n=/`+/g,r;for(;r=n.exec(e);)t=Math.max(t,r[0].length+1);return"`".repeat(t)}function lv(e){return e.split(`
|
|
7
7
|
`).map(e=>e&&` ${e}`).join(`
|
|
8
8
|
`)}function uv(e){let t={dirs:new Map,files:[]};for(let n of e){let e=n.path.split(`/`),r=e.pop(),i=t;for(let t of e){let e=i.dirs.get(t);e||(e={dirs:new Map,files:[]},i.dirs.set(t,e)),i=e}i.files.push({file:n,name:r})}let n=[],r=(e,t,i)=>{for(let[a,o]of[...e.dirs].sort(([e],[t])=>e.localeCompare(t))){let e=a,s=o;for(;s.dirs.size===1&&!s.files.length;){let[[t,n]]=s.dirs;e+=`/${t}`,s=n}let c=i?`${i}/${e}`:e;n.push({kind:`dir`,label:e,path:c,depth:t}),r(s,t+1,c)}for(let{file:r,name:i}of e.files)n.push({kind:`file`,file:r,name:i,depth:t})};return r(t,0,``),n}var dv=Nr,fv=(e=>`/${e}&`)(Pr);function pv(e){Rr(e.a,`M15 6L9 12L15 18`)}var mv=(e,t)=>Ir(e.a,t),hv=(e,t)=>Lr(e.a,t),gv=Nr,_v=(e=>`/${e}&`)(Pr);function vv(e){Rr(e.a,`M17 17L21 21 M3 11C3 15.4183 6.58172 19 11 19C13.213 19 15.2161 18.1015 16.6644 16.6493C18.1077 15.2022 19 13.2053 19 11C19 6.58172 15.4183 3 11 3C6.58172 3 3 6.58172 3 11Z`)}var yv=(e,t)=>Ir(e.a,t),bv=(e,t)=>Lr(e.a,t),xv=`<div class=wrap><input class=file-filter type=search placeholder="Filter files… (globs, !excludes)" aria-label="Filter files"></div>`,Sv=N(17,e=>At(e,`a`,e.k,Rv(e))),Cv=M(10,Sv),wv=N(9,e=>Cv(e,(e.i??e.g)||``)),Tv=M(16,Sv),Ev=N(15,e=>Tv(e,zv(e))),Dv=M(14,Ev),Ov=N(13,e=>Dv(e,Bv(e)),2),kv=Ve(6,e=>{wv(e),Ov(e)}),Av=N(5,e=>kv(e,e.d,e.e)),jv=M(3,Av),Mv=M(4,Av),Nv=j(8,e=>{wv(e),Ov(e)}),Pv=(e,t)=>Lv(e,t.timer),Fv=L(`g3`,e=>{jt(e,`a`),A(e.a,`keydown`,function(t){t.key===`Enter`&&e.o(),t.key===`Escape`&&e.k&&(t.preventDefault(),e.q(``))})});function Iv(e){Nv(e,null),Pv(e,{timer:0}),Fv(e)}var Lv=M(12,e=>{Ov(e),Ev(e)});function Rv(e){return function(t){e.q(t)}}function zv(e){return t=>{if(e.m&&clearTimeout(e.m),!t){e.m=0,Nv(e,null),kv(e,``);return}Nv(e,t),e.m=setTimeout(e.o,150)}}function Bv(e){return()=>{e.m&&=(clearTimeout(e.m),0);let t=e.i===null?e.g||``:e.i;Nv(e,null),kv(e,t)}}R(`g0`,Rv),R(`g2`,zv),R(`g1`,Bv);var Vv=200,Hv=40;function Uv(e,t){let n=t.trim();if(!n)return[];let r=/[A-Z]/.test(n),i=r?n:n.toLowerCase(),a=[];for(let t of e){if(a.length>=Vv)break;(r?t.path:t.path.toLowerCase()).includes(i)&&a.push({key:t.key,path:t.path,repo:t.repo,line:0,side:null,preview:t.path});let e=new Set;Wv(t,t.new,`additions`,i,r,e,a),Wv(t,t.old,`deletions`,i,r,e,a)}return a}function Wv(e,t,n,r,i,a,o){if(!t||o.length>=Vv)return;let s=0,c=t.split(`
|
|
9
|
-
`);for(let t=0;t<c.length;t++){if(o.length>=Vv||s>=Hv)return;let l=c[t],u=(i?l:l.toLowerCase()).indexOf(r);u<0||n===`deletions`&&a.has(l)||(n===`additions`&&a.add(l),s++,o.push({key:e.key,path:e.path,repo:e.repo,line:t+1,side:n,preview:Gv(l,u,r.length)}))}}function Gv(e,t,n){let r=Math.max(0,t-36),i=Math.min(e.length,t+n+36);return(r>0?`…`:``)+e.slice(r,i)+(i<e.length?`…`:``)}var Kv=`search-mark`,qv=`mark.${Kv}`,Jv=`mark.${Kv}{display:inline;background:#ffd24a;color:#1a1408;-webkit-text-fill-color:#1a1408;border-radius:3px;padding:0 2px}mark.${Kv} *,mark.${Kv} *::before,mark.${Kv} *::after{color:inherit!important;-webkit-text-fill-color:inherit!important;background:transparent!important}mark.${Kv}.active{background:#ffb000;box-shadow:0 0 0 1px #c98400}`,Yv={query:``,hit:null},Xv=new Map;function Zv(e,t){Yv.query=e,Yv.hit=t;for(let[e,t]of Xv)cy(e,Yv.query,Yv.hit?.key===t?Yv.hit:null);t&&requestAnimationFrame(()=>{for(let[e,n]of Xv)n===t.key&&Qv(e,t)})}function Qv(e,t){let n=e.querySelector(`diffs-container`)?.shadowRoot;if(!n)return;let r=n.querySelector(`mark.search-mark.active`);if(r){r.scrollIntoView({block:`center`});return}if(t.line<1)return;let i=[...n.querySelectorAll(`[data-line="${t.line}"]`)],a=t.side||`additions`;(i.find(e=>ry(e)===a)??i[0])?.scrollIntoView({block:`center`})}function $v(e,t){let n=t&&Yv.hit?.key===t?Yv.hit:null;cy(e,Yv.query,n),n&&requestAnimationFrame(()=>Qv(e,n))}function ey(e,t){return Xv.set(e,t),$v(e,t),()=>{Xv.delete(e)}}function ty(e){$v(e,Xv.get(e))}function ny(e){for(let t of[...e.querySelectorAll(qv)]){let e=t.parentElement;t.replaceWith(...t.childNodes),e?.normalize()}}function ry(e){let t=e.closest(`[data-code]`);return t?.hasAttribute(`data-deletions`)?`deletions`:t?.hasAttribute(`data-additions`)?`additions`:(e.getAttribute(`data-line-type`)||``).includes(`deletion`)?`deletions`:`additions`}function iy(e){let t=document.createTreeWalker(e,NodeFilter.SHOW_TEXT),n=[];for(let e=t.nextNode();e;e=t.nextNode())e.parentElement?.closest(qv)||n.push(e);return n}function ay(e,t,n){let r=0;for(let i=0;i<e.length;i++){let a=t[i].length;if(n<=r+a)return{node:e[i],offset:Math.min(a,Math.max(0,n-r))};r+=a}let i=e.at(-1);return i?{node:i,offset:t.at(-1)?.length??0}:null}function oy(e,t,n,r,i){let a=ay(e,t,n),o=ay(e,t,r);if(!a||!o)return;let s=document.createRange();s.setStart(a.node,a.offset),s.setEnd(o.node,o.offset);let c=document.createElement(`mark`);c.className=i;try{c.append(s.extractContents()),s.insertNode(c)}catch{}}function sy(e,t,n,r){let i=iy(e);if(!i.length)return;let a=i.map(e=>e.textContent??``),o=a.join(``),s=n?o:o.toLowerCase(),c=[];for(let e=s.indexOf(t);e!==-1;e=s.indexOf(t,e+t.length))c.push([e,e+t.length]);if(!c.length)return;let l=ry(e),u=Number(e.getAttribute(`data-line`)),d=r&&r.line===u&&(r.side||`additions`)===l?`${Kv} active`:Kv;for(let e=c.length-1;e>=0;e--)oy(i,a,c[e][0],c[e][1],d)}function cy(e,t,n){let r=[e],i=e.querySelector(`diffs-container`)?.shadowRoot;i&&r.push(i);let a=t.trim(),o=/[A-Z]/.test(a),s=a&&!o?a.toLowerCase():a;for(let e of r)if(ny(e),s)for(let t of e.querySelectorAll(`[data-code] [data-line]`))sy(t,s,o,n)}var ly=`<div class=find-bar><input class=find-input type=search placeholder="Find in diffs" aria-label="Find in diffs"><span class=count> </span><button class=icon-btn title="Previous match">↑</button><button class=icon-btn title="Next match">↓</button><button class=icon-btn title="Close find">×</button></div>`,uy=`D bD l b b l`,dy=(e,t)=>ky(e,t?.length),fy=N(12,e=>dy(e,Uv(e.h,e.l))),py=N(29,L(`e5`,e=>xt(e,{onMount:function(){let t=new AbortController;return document.addEventListener(`keydown`,t=>{if(t.key===`Escape`){if(t.target instanceof HTMLTextAreaElement)return;t.preventDefault(),e.j();return}let n=t.metaKey||t.ctrlKey;(t.key===`F3`||n&&t.key.toLowerCase()===`g`)&&(t.preventDefault(),e.a2(t.shiftKey?-1:1))},{signal:t.signal}),e.w=e.k,setTimeout(()=>e.a?.focus(),0),{abort:t}},onUpdate:function(){if(e.k!==e.w){e.w=e.k;let t=e.a;t?.focus(),t?.select()}},onDestroy:function(){e.v&&clearTimeout(e.v),this.abort.abort(),Zv(``,null),e.i({query:``,hit:null,keys:[]})}})),5),my=M(28,py),hy=N(25,e=>my(e,Iy(e)),3),gy=N(27,e=>At(e,`a`,e.l,Ly(e))),_y=N(19,e=>V(e.b,e.l.trim()?e.q?`${e.s+1}/${e.q}`:`0/0`:``),2),vy=j(11,e=>{fy(e),hy(e),gy(e),_y(e)}),yy=M(18,e=>{hy(e),_y(e)}),by=N(17,e=>yy(e,e.q?Math.min(e.n,e.q-1):-1)),xy=M(26,gy),Sy=N(24,e=>xy(e,Ry(e)),2),Cy=M(23,e=>{Sy(e),hy(e)}),wy=N(14,e=>Cy(e,zy(e)),2),Ty=j(13,e=>{by(e),wy(e)}),Ey=(e,t)=>{jy(e,t.timer),My(e,t.tick)},Dy=L(`e4`,e=>{jt(e,`a`),A(e.a,`keydown`,function(t){t.key===`Enter`&&(t.preventDefault(),e.a2(t.shiftKey?-1:1))}),A(e.c,`click`,function(){e.a2(-1)}),A(e.d,`click`,function(){e.a2(1)}),A(e.e,`click`,function(){e.j()})});function Oy(e){vy(e,``),Ty(e,0),Ey(e,{timer:0,tick:0}),Dy(e)}var ky=M(16,e=>{z(e.c,`disabled`,!e.q),z(e.d,`disabled`,!e.q),by(e),_y(e)}),Ay=M(7,e=>{fy(e),wy(e),Sy(e)}),jy=M(21,e=>{Sy(e),hy(e),py(e)}),My=M(22,py),Ny=M(8,e=>{wy(e),py(e)}),Py=M(9,py),Fy=M(10,py);function Iy(e){return t=>{e.v&&=(clearTimeout(e.v),0),e.x(e.l,(e.s<0?0:e.s)+t)}}function Ly(e){return function(t){e.a0(t)}}function Ry(e){return t=>{vy(e,t),Ty(e,0),Zv(t,Uv(e.h,t)[0]??null),e.v&&clearTimeout(e.v),e.v=setTimeout(()=>{e.v=0,e.x(t,0)},80)}}function zy(e){return(t,n)=>{let r=Uv(e.h,t),i=[...new Set(r.map(e=>e.key))];if(!r.length){Ty(e,0),Zv(t,null),e.i({query:t,hit:null,keys:i});return}Ty(e,(n%r.length+r.length)%r.length);let a=r[e.n];Zv(t,a),e.i({query:t,hit:a,keys:i})}}R(`e3`,Iy),R(`e0`,Ly),R(`e2`,Ry),R(`e1`,zy);var By=`diffs-container`,Vy=/(?=^diff --git)/gm,Hy=/(?<=\n)/,Uy=/^(---|\+\+\+)\s+([^\t\r\n]+)/,Wy=/^(---|\+\+\+)\s+[ab]\/([^\t\r\n]+)/,Gy=/^diff --git (?:"a\/(.+?)"|a\/(.+?)) (?:"b\/(.+?)"|b\/(.+?))$/,Ky=/^index ([0-9a-f]+)\.\.([0-9a-f]+)(?: (\d+))?$/i,qy=`header-prefix`,Jy=`header-filename-suffix`,Yy=`header-metadata`,Xy=`header-custom`,Zy={dark:`pierre-dark`,light:`pierre-light`},Qy=`data-theme-css`,$y=`data-unsafe-css`,eb=`data-diffs-scrollbar-measure`,tb=`--diffs-scrollbar-gutter-measured`,nb=1e5,rb=Object.freeze({fromStart:0,fromEnd:0}),ib={startingLine:0,totalLines:1/0,bufferBefore:0,bufferAfter:0},ab={startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:0},ob=new Set,sb=null;function cb(e){ob.add(e),sb??=requestAnimationFrame(ub)}function lb(e){ob.delete(e)&&ob.size===0&&sb!=null&&(cancelAnimationFrame(sb),sb=null)}function ub(e){let t=new Set(ob);ob.clear();for(let n of t)try{n(e)}catch(e){console.error(e)}sb=ob.size>0?requestAnimationFrame(ub):null}function db(e,t){return e==null||t==null||typeof e==`string`||typeof t==`string`?e===t:e.dark===t.dark&&e.light===t.light}function fb(e,t){return e?.start===t?.start&&e?.end===t?.end&&e?.side===t?.side&&e?.endSide===t?.endSide}function pb(e){let t=e.length;return e.charCodeAt(t-1)===10&&(t--,e.charCodeAt(t-1)===13&&t--),e.slice(0,t)}var mb=new TextEncoder,hb=new TextDecoder(`utf-8`,{ignoreBOM:!0}),gb=/[\uD800-\uDFFF]/,_b=1024,vb=new Uint8Array(_b);function yb(){vb.length!==_b&&(vb=new Uint8Array(_b))}function bb(e){if(e.length===0)return e;if(gb.test(e))return JSON.parse(JSON.stringify(e));let t=e.length*3;vb.length<t&&(vb=new Uint8Array(t));let{written:n}=mb.encodeInto(e,vb);return hb.decode(vb.subarray(0,n))}function xb(e,t){return e-(t===0?0:1)}function Sb(e,t){return xb(e,t)+t}var Cb=4096,wb=.5;function Tb(e){for(let t of e.hunks){for(let n=0;n<t.hunkContent.length;n++){let r=t.hunkContent[n];if(r.type!==`change`)continue;let i=Db(e,r);i!=null&&(t.hunkContent.splice(n,1,...i),n+=i.length-1)}Eb(t,e)}}function Eb(e,t){let{hunkContent:n}=e;for(let e=1;e<n.length;e++){let r=n[e],i=n[e-1];if(r.type!==`change`||r.additions>0&&r.deletions>0||i.type!==`context`)continue;let a=r.additions>0,o=a?t.additionLines:t.deletionLines,s=a?r.additionLineIndex:r.deletionLineIndex,c=a?r.additions:r.deletions,l=o[s]??``;if(l.trim()!==``)continue;let u=!0;for(let e=1;e<c;e++)if(o[s+e]!==l){u=!1;break}if(!u)continue;let d=0;for(;d<i.lines&&t.additionLines[i.additionLineIndex+i.lines-1-d]===l;)d++;if(d===0||e===1&&d===i.lines)continue;r.additionLineIndex-=d,r.deletionLineIndex-=d;let f=r.additionLineIndex+r.additions,p=r.deletionLineIndex+r.deletions,m=n[e+1];m?.type===`context`?(m.lines+=d,m.additionLineIndex=f,m.deletionLineIndex=p):n.splice(e+1,0,{type:`context`,lines:d,additionLineIndex:f,deletionLineIndex:p}),i.lines-=d,i.lines===0&&(n.splice(e-1,1),e--)}}function Db(e,t){let{deletions:n,additions:r,deletionLineIndex:i,additionLineIndex:a}=t,o=Math.min(n,r),s=Math.abs(r-n);if(o===0||s===0||o*(s+1)>Cb)return null;let c=[];for(let t=0;t<n;t++)c.push(kb(e.deletionLines[i+t]??``));let l=[];for(let t=0;t<r;t++)l.push(kb(e.additionLines[a+t]??``));let u=r>n,d=0,f=-1;for(let e=0;e<=s;e++){let t=0;for(let n=0;n<o;n++)t+=Ab(c[n+(u?0:e)],l[n+(u?e:0)]);e===0?f=t+o*wb:t>f&&(f=t,d=e)}if(d===0)return null;let p=[],m=(e,t,n,r)=>{(e>0||t>0)&&p.push({type:`change`,deletions:e,additions:t,deletionLineIndex:n,additionLineIndex:r})};return u?(m(0,d,i,a),m(o,o,i,a+d),m(0,r-o-d,i+o,a+d+o)):(m(d,0,i,a),m(o,o,i+d,a),m(n-o-d,0,i+d+o,a+o)),p}var Ob=/\s+/g;function kb(e){return e.replace(Ob,``)}function Ab(e,t){if(e===t)return 1;let n=Math.max(e.length,t.length),r=Math.min(e.length,t.length);if(r===0)return 0;let i=0;for(;i<r&&e[i]===t[i];)i++;let a=0;for(;a<r-i&&e[e.length-1-a]===t[t.length-1-a];)a++;return(i+a)/n}function jb(e,t){try{return Mb(e,t)}finally{yb()}}function Mb(e,{cacheKey:t,isGitDiff:n=Vy.test(e),oldFile:r,newFile:i,throwOnError:a=!1}={}){let o=0,s=Bb(e,`@@ `),c,l=r==null||i==null,u=0,d=0;for(let e of s){let s=Pb(e),f=s[0];if(f==null){if(a)throw Error(`parsePatchContent: invalid hunk`);console.error(`parsePatchContent: invalid hunk`,e);continue}let p=Lb(f),m=0,h=0;if(p==null||c==null){if(c!=null){if(a)throw Error(`parsePatchContent: Invalid hunk`);console.error(`parsePatchContent: Invalid hunk`,e);continue}c={name:``,type:`change`,hunks:[],splitLineCount:0,unifiedLineCount:0,isPartial:l,additionLines:!l&&r!=null&&i!=null?Nb(i.contents):[],deletionLines:!l&&r!=null&&i!=null?Nb(r.contents):[],cacheKey:Hb(t)},c.additionLines.length===1&&i?.contents===``&&(c.additionLines.length=0),c.deletionLines.length===1&&r?.contents===``&&(c.deletionLines.length=0);for(let e of s){if(e.startsWith(`diff --git`)){let t=e.trim().match(Gy),n=t?.[1]??t?.[2],r=t?.[3]??t?.[4];if(n==null||r==null){if(a)throw Error(`parsePatchContent: invalid git diff header`);console.error(`parsePatchContent: invalid git diff header`,e);continue}c.name=bb(r.trim()),n!==r&&(c.prevName=bb(n.trim()));continue}let t=e.startsWith(`---`)||e.startsWith(`+++`)?e.match(n?Wy:Uy):null;if(t!=null){let[,e,n]=t;if(e===`---`&&n!==`/dev/null`){let e=bb(n.trim());c.prevName=e,c.name=e}else e===`+++`&&n!==`/dev/null`&&(c.name=bb(n.trim()))}else if(n){if(e.startsWith(`new mode `)&&(c.mode=bb(e.slice(8).trim())),e.startsWith(`old mode `)&&(c.prevMode=bb(e.slice(8).trim())),e.startsWith(`new file mode`)&&(c.type=`new`,c.mode=bb(e.slice(13).trim())),e.startsWith(`deleted file mode`)&&(c.type=`deleted`,c.mode=bb(e.slice(17).trim())),e.startsWith(`similarity index`)&&(e.startsWith(`similarity index 100%`)?c.type=`rename-pure`:c.type=`rename-changed`),e.startsWith(`index `)){let[,t,n,r]=e.trim().match(Ky)??[];t!=null&&(c.prevObjectId=bb(t)),n!=null&&(c.newObjectId=bb(n)),r!=null&&(c.mode=bb(r))}e.startsWith(`rename from `)&&(c.prevName=bb(e.slice(12).trim())),e.startsWith(`rename to `)&&(c.name=bb(e.slice(10).trim()))}}continue}let g,_;for(;s.length>0&&(s[s.length-1]===`
|
|
9
|
+
`);for(let t=0;t<c.length;t++){if(o.length>=Vv||s>=Hv)return;let l=c[t],u=(i?l:l.toLowerCase()).indexOf(r);u<0||n===`deletions`&&a.has(l)||(n===`additions`&&a.add(l),s++,o.push({key:e.key,path:e.path,repo:e.repo,line:t+1,side:n,preview:Gv(l,u,r.length)}))}}function Gv(e,t,n){let r=Math.max(0,t-36),i=Math.min(e.length,t+n+36);return(r>0?`…`:``)+e.slice(r,i)+(i<e.length?`…`:``)}var Kv=`search-mark`,qv=`mark.${Kv}`,Jv=`mark.${Kv}{display:inline;background:#ffd24a;color:#1a1408;-webkit-text-fill-color:#1a1408;border-radius:3px;padding:0 2px}mark.${Kv} *,mark.${Kv} *::before,mark.${Kv} *::after{color:inherit!important;-webkit-text-fill-color:inherit!important;background:transparent!important}mark.${Kv}.active{background:#ffb000;box-shadow:0 0 0 1px #c98400}`,Yv={query:``,hit:null},Xv=new Map;function Zv(e,t){Yv.query=e,Yv.hit=t;for(let[e,t]of Xv)cy(e,Yv.query,Yv.hit?.key===t?Yv.hit:null);t&&requestAnimationFrame(()=>{for(let[e,n]of Xv)n===t.key&&Qv(e,t)})}function Qv(e,t){let n=e.querySelector(`diffs-container`)?.shadowRoot;if(!n)return;let r=n.querySelector(`mark.search-mark.active`);if(r){r.scrollIntoView({block:`center`});return}if(t.line<1)return;let i=[...n.querySelectorAll(`[data-line="${t.line}"]`)],a=t.side||`additions`;(i.find(e=>ry(e)===a)??i[0])?.scrollIntoView({block:`center`})}function $v(e,t){let n=t&&Yv.hit?.key===t?Yv.hit:null;cy(e,Yv.query,n),n&&requestAnimationFrame(()=>Qv(e,n))}function ey(e,t){return Xv.set(e,t),$v(e,t),()=>{Xv.delete(e)}}function ty(e){$v(e,Xv.get(e))}function ny(e){for(let t of[...e.querySelectorAll(qv)]){let e=t.parentElement;t.replaceWith(...t.childNodes),e?.normalize()}}function ry(e){let t=e.closest(`[data-code]`);return t?.hasAttribute(`data-deletions`)?`deletions`:t?.hasAttribute(`data-additions`)?`additions`:(e.getAttribute(`data-line-type`)||``).includes(`deletion`)?`deletions`:`additions`}function iy(e){let t=document.createTreeWalker(e,NodeFilter.SHOW_TEXT),n=[];for(let e=t.nextNode();e;e=t.nextNode())e.parentElement?.closest(qv)||n.push(e);return n}function ay(e,t,n){let r=0;for(let i=0;i<e.length;i++){let a=t[i].length;if(n<=r+a)return{node:e[i],offset:Math.min(a,Math.max(0,n-r))};r+=a}let i=e.at(-1);return i?{node:i,offset:t.at(-1)?.length??0}:null}function oy(e,t,n,r,i){let a=ay(e,t,n),o=ay(e,t,r);if(!a||!o)return;let s=document.createRange();s.setStart(a.node,a.offset),s.setEnd(o.node,o.offset);let c=document.createElement(`mark`);c.className=i;try{c.append(s.extractContents()),s.insertNode(c)}catch{}}function sy(e,t,n,r){let i=iy(e);if(!i.length)return;let a=i.map(e=>e.textContent??``),o=a.join(``),s=n?o:o.toLowerCase(),c=[];for(let e=s.indexOf(t);e!==-1;e=s.indexOf(t,e+t.length))c.push([e,e+t.length]);if(!c.length)return;let l=ry(e),u=Number(e.getAttribute(`data-line`)),d=r&&r.line===u&&(r.side||`additions`)===l?`${Kv} active`:Kv;for(let e=c.length-1;e>=0;e--)oy(i,a,c[e][0],c[e][1],d)}function cy(e,t,n){let r=[e],i=e.querySelector(`diffs-container`)?.shadowRoot;i&&r.push(i);let a=t.trim(),o=/[A-Z]/.test(a),s=a&&!o?a.toLowerCase():a;for(let e of r)if(ny(e),s)for(let t of e.querySelectorAll(`[data-code] [data-line]`))sy(t,s,o,n)}var ly=`<div class=find-bar><input class=find-input type=search placeholder="Find in diffs" aria-label="Find in diffs"><span class=count> </span><button class=icon-btn title="Previous match">↑</button><button class=icon-btn title="Next match">↓</button><button class=icon-btn title="Close find">×</button></div>`,uy=`D bD l b b l`,dy=(e,t)=>ky(e,t?.length),fy=N(12,e=>dy(e,Uv(e.h,e.l))),py=N(29,L(`e5`,e=>xt(e,{onMount:function(){let t=new AbortController;return document.addEventListener(`keydown`,t=>{if(t.key===`Escape`){if(document.querySelector(`dialog[open]`)||t.target instanceof HTMLTextAreaElement)return;t.preventDefault(),e.j();return}let n=t.metaKey||t.ctrlKey;(t.key===`F3`||n&&t.key.toLowerCase()===`g`)&&(t.preventDefault(),e.a2(t.shiftKey?-1:1))},{signal:t.signal}),e.w=e.k,setTimeout(()=>e.a?.focus(),0),{abort:t}},onUpdate:function(){if(e.k!==e.w){e.w=e.k;let t=e.a;t?.focus(),t?.select()}},onDestroy:function(){e.v&&clearTimeout(e.v),this.abort.abort(),Zv(``,null),e.i({query:``,hit:null,keys:[]})}})),5),my=M(28,py),hy=N(25,e=>my(e,Iy(e)),3),gy=N(27,e=>At(e,`a`,e.l,Ly(e))),_y=N(19,e=>V(e.b,e.l.trim()?e.q?`${e.s+1}/${e.q}`:`0/0`:``),2),vy=j(11,e=>{fy(e),hy(e),gy(e),_y(e)}),yy=M(18,e=>{hy(e),_y(e)}),by=N(17,e=>yy(e,e.q?Math.min(e.n,e.q-1):-1)),xy=M(26,gy),Sy=N(24,e=>xy(e,Ry(e)),2),Cy=M(23,e=>{Sy(e),hy(e)}),wy=N(14,e=>Cy(e,zy(e)),2),Ty=j(13,e=>{by(e),wy(e)}),Ey=(e,t)=>{jy(e,t.timer),My(e,t.tick)},Dy=L(`e4`,e=>{jt(e,`a`),A(e.a,`keydown`,function(t){t.key===`Enter`&&(t.preventDefault(),e.a2(t.shiftKey?-1:1))}),A(e.c,`click`,function(){e.a2(-1)}),A(e.d,`click`,function(){e.a2(1)}),A(e.e,`click`,function(){e.j()})});function Oy(e){vy(e,``),Ty(e,0),Ey(e,{timer:0,tick:0}),Dy(e)}var ky=M(16,e=>{z(e.c,`disabled`,!e.q),z(e.d,`disabled`,!e.q),by(e),_y(e)}),Ay=M(7,e=>{fy(e),wy(e),Sy(e)}),jy=M(21,e=>{Sy(e),hy(e),py(e)}),My=M(22,py),Ny=M(8,e=>{wy(e),py(e)}),Py=M(9,py),Fy=M(10,py);function Iy(e){return t=>{e.v&&=(clearTimeout(e.v),0),e.x(e.l,(e.s<0?0:e.s)+t)}}function Ly(e){return function(t){e.a0(t)}}function Ry(e){return t=>{vy(e,t),Ty(e,0),Zv(t,Uv(e.h,t)[0]??null),e.v&&clearTimeout(e.v),e.v=setTimeout(()=>{e.v=0,e.x(t,0)},80)}}function zy(e){return(t,n)=>{let r=Uv(e.h,t),i=[...new Set(r.map(e=>e.key))];if(!r.length){Ty(e,0),Zv(t,null),e.i({query:t,hit:null,keys:i});return}Ty(e,(n%r.length+r.length)%r.length);let a=r[e.n];Zv(t,a),e.i({query:t,hit:a,keys:i})}}R(`e3`,Iy),R(`e0`,Ly),R(`e2`,Ry),R(`e1`,zy);var By=`diffs-container`,Vy=/(?=^diff --git)/gm,Hy=/(?<=\n)/,Uy=/^(---|\+\+\+)\s+([^\t\r\n]+)/,Wy=/^(---|\+\+\+)\s+[ab]\/([^\t\r\n]+)/,Gy=/^diff --git (?:"a\/(.+?)"|a\/(.+?)) (?:"b\/(.+?)"|b\/(.+?))$/,Ky=/^index ([0-9a-f]+)\.\.([0-9a-f]+)(?: (\d+))?$/i,qy=`header-prefix`,Jy=`header-filename-suffix`,Yy=`header-metadata`,Xy=`header-custom`,Zy={dark:`pierre-dark`,light:`pierre-light`},Qy=`data-theme-css`,$y=`data-unsafe-css`,eb=`data-diffs-scrollbar-measure`,tb=`--diffs-scrollbar-gutter-measured`,nb=1e5,rb=Object.freeze({fromStart:0,fromEnd:0}),ib={startingLine:0,totalLines:1/0,bufferBefore:0,bufferAfter:0},ab={startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:0},ob=new Set,sb=null;function cb(e){ob.add(e),sb??=requestAnimationFrame(ub)}function lb(e){ob.delete(e)&&ob.size===0&&sb!=null&&(cancelAnimationFrame(sb),sb=null)}function ub(e){let t=new Set(ob);ob.clear();for(let n of t)try{n(e)}catch(e){console.error(e)}sb=ob.size>0?requestAnimationFrame(ub):null}function db(e,t){return e==null||t==null||typeof e==`string`||typeof t==`string`?e===t:e.dark===t.dark&&e.light===t.light}function fb(e,t){return e?.start===t?.start&&e?.end===t?.end&&e?.side===t?.side&&e?.endSide===t?.endSide}function pb(e){let t=e.length;return e.charCodeAt(t-1)===10&&(t--,e.charCodeAt(t-1)===13&&t--),e.slice(0,t)}var mb=new TextEncoder,hb=new TextDecoder(`utf-8`,{ignoreBOM:!0}),gb=/[\uD800-\uDFFF]/,_b=1024,vb=new Uint8Array(_b);function yb(){vb.length!==_b&&(vb=new Uint8Array(_b))}function bb(e){if(e.length===0)return e;if(gb.test(e))return JSON.parse(JSON.stringify(e));let t=e.length*3;vb.length<t&&(vb=new Uint8Array(t));let{written:n}=mb.encodeInto(e,vb);return hb.decode(vb.subarray(0,n))}function xb(e,t){return e-(t===0?0:1)}function Sb(e,t){return xb(e,t)+t}var Cb=4096,wb=.5;function Tb(e){for(let t of e.hunks){for(let n=0;n<t.hunkContent.length;n++){let r=t.hunkContent[n];if(r.type!==`change`)continue;let i=Db(e,r);i!=null&&(t.hunkContent.splice(n,1,...i),n+=i.length-1)}Eb(t,e)}}function Eb(e,t){let{hunkContent:n}=e;for(let e=1;e<n.length;e++){let r=n[e],i=n[e-1];if(r.type!==`change`||r.additions>0&&r.deletions>0||i.type!==`context`)continue;let a=r.additions>0,o=a?t.additionLines:t.deletionLines,s=a?r.additionLineIndex:r.deletionLineIndex,c=a?r.additions:r.deletions,l=o[s]??``;if(l.trim()!==``)continue;let u=!0;for(let e=1;e<c;e++)if(o[s+e]!==l){u=!1;break}if(!u)continue;let d=0;for(;d<i.lines&&t.additionLines[i.additionLineIndex+i.lines-1-d]===l;)d++;if(d===0||e===1&&d===i.lines)continue;r.additionLineIndex-=d,r.deletionLineIndex-=d;let f=r.additionLineIndex+r.additions,p=r.deletionLineIndex+r.deletions,m=n[e+1];m?.type===`context`?(m.lines+=d,m.additionLineIndex=f,m.deletionLineIndex=p):n.splice(e+1,0,{type:`context`,lines:d,additionLineIndex:f,deletionLineIndex:p}),i.lines-=d,i.lines===0&&(n.splice(e-1,1),e--)}}function Db(e,t){let{deletions:n,additions:r,deletionLineIndex:i,additionLineIndex:a}=t,o=Math.min(n,r),s=Math.abs(r-n);if(o===0||s===0||o*(s+1)>Cb)return null;let c=[];for(let t=0;t<n;t++)c.push(kb(e.deletionLines[i+t]??``));let l=[];for(let t=0;t<r;t++)l.push(kb(e.additionLines[a+t]??``));let u=r>n,d=0,f=-1;for(let e=0;e<=s;e++){let t=0;for(let n=0;n<o;n++)t+=Ab(c[n+(u?0:e)],l[n+(u?e:0)]);e===0?f=t+o*wb:t>f&&(f=t,d=e)}if(d===0)return null;let p=[],m=(e,t,n,r)=>{(e>0||t>0)&&p.push({type:`change`,deletions:e,additions:t,deletionLineIndex:n,additionLineIndex:r})};return u?(m(0,d,i,a),m(o,o,i,a+d),m(0,r-o-d,i+o,a+d+o)):(m(d,0,i,a),m(o,o,i+d,a),m(n-o-d,0,i+d+o,a+o)),p}var Ob=/\s+/g;function kb(e){return e.replace(Ob,``)}function Ab(e,t){if(e===t)return 1;let n=Math.max(e.length,t.length),r=Math.min(e.length,t.length);if(r===0)return 0;let i=0;for(;i<r&&e[i]===t[i];)i++;let a=0;for(;a<r-i&&e[e.length-1-a]===t[t.length-1-a];)a++;return(i+a)/n}function jb(e,t){try{return Mb(e,t)}finally{yb()}}function Mb(e,{cacheKey:t,isGitDiff:n=Vy.test(e),oldFile:r,newFile:i,throwOnError:a=!1}={}){let o=0,s=Bb(e,`@@ `),c,l=r==null||i==null,u=0,d=0;for(let e of s){let s=Pb(e),f=s[0];if(f==null){if(a)throw Error(`parsePatchContent: invalid hunk`);console.error(`parsePatchContent: invalid hunk`,e);continue}let p=Lb(f),m=0,h=0;if(p==null||c==null){if(c!=null){if(a)throw Error(`parsePatchContent: Invalid hunk`);console.error(`parsePatchContent: Invalid hunk`,e);continue}c={name:``,type:`change`,hunks:[],splitLineCount:0,unifiedLineCount:0,isPartial:l,additionLines:!l&&r!=null&&i!=null?Nb(i.contents):[],deletionLines:!l&&r!=null&&i!=null?Nb(r.contents):[],cacheKey:Hb(t)},c.additionLines.length===1&&i?.contents===``&&(c.additionLines.length=0),c.deletionLines.length===1&&r?.contents===``&&(c.deletionLines.length=0);for(let e of s){if(e.startsWith(`diff --git`)){let t=e.trim().match(Gy),n=t?.[1]??t?.[2],r=t?.[3]??t?.[4];if(n==null||r==null){if(a)throw Error(`parsePatchContent: invalid git diff header`);console.error(`parsePatchContent: invalid git diff header`,e);continue}c.name=bb(r.trim()),n!==r&&(c.prevName=bb(n.trim()));continue}let t=e.startsWith(`---`)||e.startsWith(`+++`)?e.match(n?Wy:Uy):null;if(t!=null){let[,e,n]=t;if(e===`---`&&n!==`/dev/null`){let e=bb(n.trim());c.prevName=e,c.name=e}else e===`+++`&&n!==`/dev/null`&&(c.name=bb(n.trim()))}else if(n){if(e.startsWith(`new mode `)&&(c.mode=bb(e.slice(8).trim())),e.startsWith(`old mode `)&&(c.prevMode=bb(e.slice(8).trim())),e.startsWith(`new file mode`)&&(c.type=`new`,c.mode=bb(e.slice(13).trim())),e.startsWith(`deleted file mode`)&&(c.type=`deleted`,c.mode=bb(e.slice(17).trim())),e.startsWith(`similarity index`)&&(e.startsWith(`similarity index 100%`)?c.type=`rename-pure`:c.type=`rename-changed`),e.startsWith(`index `)){let[,t,n,r]=e.trim().match(Ky)??[];t!=null&&(c.prevObjectId=bb(t)),n!=null&&(c.newObjectId=bb(n)),r!=null&&(c.mode=bb(r))}e.startsWith(`rename from `)&&(c.prevName=bb(e.slice(12).trim())),e.startsWith(`rename to `)&&(c.name=bb(e.slice(10).trim()))}}continue}let g,_;for(;s.length>0&&(s[s.length-1]===`
|
|
10
10
|
`||s[s.length-1]===`\r`||s[s.length-1]===`\r
|
|
11
11
|
`||s[s.length-1]===``);)s.pop();let{additionStart:v,deletionStart:y}=p;u=l?u:y-1,d=l?d:v-1;let b={collapsedBefore:0,splitLineCount:0,splitLineStart:0,unifiedLineCount:0,unifiedLineStart:0,additionCount:p.additionCount,additionStart:v,additionLines:m,deletionCount:p.deletionCount,deletionStart:y,deletionLines:h,deletionLineIndex:u,additionLineIndex:d,hunkContent:[],hunkContext:Hb(p.hunkContext),hunkSpecs:bb(f),noEOFCRAdditions:!1,noEOFCRDeletions:!1},x=0,S=0;for(let e=1;e<s.length;e++){let t=s[e];if(x>=b.additionCount&&S>=b.deletionCount&&!t.startsWith(`\\`)){if(a&&Fb(t)&&!Ib(t))throw Error(`parsePatchContent: hunk has more lines than expected`);break}let n=t[0];if(n!==`+`&&n!==`-`&&n!==` `&&n!==`\\`){if(a)throw Error(`parsePatchContent: invalid hunk line`);console.error(`parseLineType: Invalid firstChar: "${n}", full line: "${t}"`),console.error(`processFile: invalid rawLine:`,t);continue}let r=Ub(n);if(r===`addition`){if(a&&x>=b.additionCount)throw Error(`parsePatchContent: hunk has too many addition lines`);let e=Wb(t);(g==null||g.type!==`change`)&&(g=Gb(`change`,u,d),b.hunkContent.push(g)),d++,x++,l&&c.additionLines.push(e),g.additions++,m++,_=`addition`}else if(r===`deletion`){if(a&&S>=b.deletionCount)throw Error(`parsePatchContent: hunk has too many deletion lines`);let e=Wb(t);(g==null||g.type!==`change`)&&(g=Gb(`change`,u,d),b.hunkContent.push(g)),u++,S++,l&&c.deletionLines.push(e),g.deletions++,h++,_=`deletion`}else if(r===`context`){if(a&&(S>=b.deletionCount||x>=b.additionCount))throw Error(`parsePatchContent: hunk has too many context lines`);let e=Wb(t);(g==null||g.type!==`context`)&&(g=Gb(`context`,u,d),b.hunkContent.push(g)),d++,u++,x++,S++,l&&(c.deletionLines.push(e),c.additionLines.push(e)),g.lines++,_=`context`}else if(r===`metadata`&&g!=null){if(g.type===`context`?(b.noEOFCRAdditions=!0,b.noEOFCRDeletions=!0):_===`deletion`?b.noEOFCRDeletions=!0:_===`addition`&&(b.noEOFCRAdditions=!0),l&&(_===`addition`||_===`context`)){let e=c.additionLines.length-1;e>=0&&(c.additionLines[e]=pb(c.additionLines[e]))}if(l&&(_===`deletion`||_===`context`)){let e=c.deletionLines.length-1;e>=0&&(c.deletionLines[e]=pb(c.deletionLines[e]))}}}if(a&&(x!==b.additionCount||S!==b.deletionCount))throw Error(`parsePatchContent: hunk line count mismatch`);b.additionLines=m,b.deletionLines=h,b.collapsedBefore=Math.max(xb(b.additionStart,b.additionCount)-o,0),c.hunks.push(b),o=Sb(b.additionStart,b.additionCount);for(let e of b.hunkContent)e.type===`context`?(b.splitLineCount+=e.lines,b.unifiedLineCount+=e.lines):(b.splitLineCount+=Math.max(e.additions,e.deletions),b.unifiedLineCount+=e.deletions+e.additions);b.splitLineStart=c.splitLineCount+b.collapsedBefore,b.unifiedLineStart=c.unifiedLineCount+b.collapsedBefore,c.splitLineCount+=b.collapsedBefore+b.splitLineCount,c.unifiedLineCount+=b.collapsedBefore+b.unifiedLineCount}if(c!=null){if(a&&l&&!n&&c.hunks.length===0)throw Error(`parsePatchContent: unified file has no hunks`);if(c.hunks.length>0&&!l&&c.additionLines.length>0&&c.deletionLines.length>0){let e=c.hunks[c.hunks.length-1],t=Sb(e.additionStart,e.additionCount),n=c.additionLines.length,r=Math.max(n-t,0);c.splitLineCount+=r,c.unifiedLineCount+=r}return n||(c.prevName!=null&&c.name!==c.prevName?c.hunks.length>0?c.type=`rename-changed`:c.type=`rename-pure`:(r==null||r.contents===``)&&i!=null&&i.contents!==``?c.type=`new`:r!=null&&r.contents!==``&&(i==null||i.contents===``)&&(c.type=`deleted`)),c.type!==`rename-pure`&&c.type!==`rename-changed`&&(c.prevName=void 0),Tb(c),c}}function Nb(e){let t=Pb(e);for(let e=0;e<t.length;e++)t[e]=bb(t[e]);return t}function Pb(e){if(e.length===0)return[``];let t=[],n=0;for(;;){let r=e.indexOf(`
|
|
12
12
|
`,n);if(r===-1)break;t.push(e.slice(n,r+1)),n=r+1}return n<e.length&&t.push(e.slice(n)),t}function Fb(e){let t=e[0];return t===`+`||t===`-`||t===` `}function Ib(e){if(!e.startsWith(`--`))return!1;for(let t=2;t<e.length;t++){let n=e[t];if(n!==` `&&n!==` `&&n!==`
|
|
@@ -33,7 +33,7 @@ var e=Object.defineProperty,t=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],en
|
|
|
33
33
|
\f\r &>`.split(``),`\0
|
|
34
34
|
\f\r "&'<=>\``.split(``)],[`\0
|
|
35
35
|
\f\r "&'<=>\``.split(``),`\0
|
|
36
|
-
\f\r "&'<=>\``.split(``)]],single:[[`&'`.split(``),`"&'\``.split(``)],[`\0&'`.split(``),`\0"&'\``.split(``)]],double:[[`"&`.split(``),`"&'\``.split(``)],[`\0"&`.split(``),`\0"&'\``.split(``)]]};function wC(e,t,n,r){let i=r.schema,a=i.space!==`svg`&&r.settings.omitOptionalTags,o=i.space===`svg`?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase()),s=[],c;i.space===`html`&&e.tagName===`svg`&&(r.schema=pS);let l=TC(r,e.properties),u=r.all(i.space===`html`&&e.tagName===`template`?e.content:e);return r.schema=i,u&&(o=!1),(l||!a||!_C(e,t,n))&&(s.push(`<`,e.tagName,l?` `+l:``),o&&(i.space===`svg`||r.settings.closeSelfClosing)&&(c=l.charAt(l.length-1),(!r.settings.tightSelfClosing||c===`/`||c&&c!==`"`&&c!==`'`)&&s.push(` `),s.push(`/`)),s.push(`>`)),s.push(u),!o&&(!a||!tC(e,t,n))&&s.push(`</`+e.tagName+`>`),s.join(``)}function TC(e,t){let n=[],r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){let r=EC(e,i,t[i]);r&&n.push(r)}}for(;++r<n.length;){let t=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&t!==`"`&&t!==`'`&&(n[r]+=` `)}return n.join(``)}function EC(e,t,n){let r=lS(e.schema,t),i=e.settings.allowParseErrors&&e.schema.space===`html`?0:1,a=+!e.settings.allowDangerousCharacters,o=e.quote,s;if(r.overloadedBoolean&&(n===r.attribute||n===``)?n=!0:(r.boolean||r.overloadedBoolean)&&(typeof n!=`string`||n===r.attribute||n===``)&&(n=!!n),n==null||n===!1||typeof n==`number`&&Number.isNaN(n))return``;let c=LS(r.attribute,Object.assign({},e.settings.characterReferences,{subset:CC.name[i][a]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?WS:GS)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?c:(e.settings.preferUnquoted&&(s=LS(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:CC.unquoted[i][a]}))),s!==n&&(e.settings.quoteSmart&&US(n,o)>US(n,e.alternative)&&(o=e.alternative),s=o+LS(n,Object.assign({},e.settings.characterReferences,{subset:(o===`'`?CC.single:CC.double)[i][a],attribute:!0}))+o),c+(s&&`=`+s))}var DC=[`<`,`&`];function OC(e,t,n,r){return n&&n.type===`element`&&(n.tagName===`script`||n.tagName===`style`)?e.value:LS(e.value,Object.assign({},r.settings.characterReferences,{subset:DC}))}function kC(e,t,n,r){return r.settings.allowDangerousHtml?e.value:OC(e,t,n,r)}function AC(e,t,n,r){return r.all(e)}var jC=hS(`type`,{invalid:MC,unknown:NC,handlers:{comment:VS,doctype:HS,element:wC,raw:kC,root:AC,text:OC}});function MC(e){throw Error("Expected node, not `"+e+"`")}function NC(e){throw Error("Cannot compile unknown node `"+e.type+"`")}var PC={},FC={},IC=[];function LC(e,t){let n=t||PC,r=n.quote||`"`,i=r===`"`?`'`:`"`;if(r!==`"`&&r!==`'`)throw Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:RC,all:zC,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||Fx,characterReferences:n.characterReferences||FC,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space===`svg`?pS:fS,quote:r,alternative:i}.one(Array.isArray(e)?{type:`root`,children:e}:e,void 0,void 0)}function RC(e,t,n){return jC(e,t,n,this)}function zC(e){let t=[],n=e&&e.children||IC,r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join(``)}var BC=class{mode;options;hoveredLine;hoveredToken;pre;gutterUtilityLine;gutterUtilityContainer;gutterUtilityButton;gutterUtilitySlot;interactiveLinesAttr=!1;interactiveLineNumbersAttr=!1;hasPointerListeners=!1;hasDocumentPointerListeners=!1;selectedRange=null;selectedRangeHighlightSide;selectedRangeLineNumberOnly=!1;editorActiveLine=null;editorActiveLineSide;editorLineNumberOnly=!1;proposedSelectedRange;renderedSelectedLinesState;renderedEditorActiveLineState;selectionAnchor;pointerSession={mode:`idle`};constructor(e,t){this.mode=e,this.options=t}setOptions(e){this.options=e}cleanUp(){this.pre?.removeEventListener(`click`,this.handlePointerClick),this.pre?.removeEventListener(`pointerdown`,this.handlePointerDown),this.pre?.removeEventListener(`pointermove`,this.handlePointerMove),this.pre?.removeEventListener(`pointerleave`,this.handlePointerLeave),this.pre?.removeAttribute(`data-interactive-lines`),this.pre?.removeAttribute(`data-interactive-line-numbers`),this.pre=void 0,this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.clearHoveredLine(),this.clearHoveredToken(),this.detachDocumentPointerListeners(),this.clearPointerSession(),lb(this.renderSelection),this.interactiveLinesAttr=!1,this.interactiveLineNumbersAttr=!1,this.hasPointerListeners=!1,this.setSelectionDirty()}setup(e){this.setSelectionDirty();let{usesCustomGutterUtility:t=!1,enableGutterUtility:n=!1}=this.options;this.pre!==e&&(this.cleanUp(),this.pre=e),n?this.ensureGutterUtilityNode(t):this.gutterUtilityContainer!=null&&(this.gutterUtilityContainer.remove(),this.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.pointerSession.mode===`gutterSelecting`&&(this.clearPointerSession(),this.detachDocumentPointerListeners())),this.syncPointerListeners(e),this.updateInteractiveLineAttributes(),this.renderSelection(),this.placeUtility()}setSelectionDirty(){this.renderedSelectedLinesState=void 0,this.renderedEditorActiveLineState=void 0}isSelectionDirty(){return this.renderedSelectedLinesState===void 0||this.renderedEditorActiveLineState===void 0}setSelection(e,t){let n=!(e===this.selectedRange||fb(e??void 0,this.selectedRange??void 0)),r=t?.lineNumberOnly??!1,i=t?.activeLineSide!==this.selectedRangeHighlightSide||r!==this.selectedRangeLineNumberOnly;!this.isSelectionDirty()&&!n&&!i||(this.proposedSelectedRange=void 0,this.selectedRange=e,this.selectedRangeHighlightSide=t?.activeLineSide,this.selectedRangeLineNumberOnly=r,this.renderSelection(),this.placeUtility(),n&&t?.notify!==!1&&this.notifySelectionCommitted(e))}setEditorActiveLine(e,{lineNumberOnly:t=!1,side:n}={}){let r=e!==this.editorActiveLine,i=n!==this.editorActiveLineSide||t!==this.editorLineNumberOnly;!this.isSelectionDirty()&&!r&&!i||(this.editorActiveLine=e,this.editorActiveLineSide=n,this.editorLineNumberOnly=t,this.renderSelection())}getSelection(){return this.selectedRange}getHoveredLine=()=>{let e=this.gutterUtilityLine??this.hoveredLine;if(e!=null){if(this.mode===`diff`&&e.type===`diff-line`)return{lineNumber:e.lineNumber,side:e.annotationSide};if(this.mode===`file`&&e.type===`line`)return{lineNumber:e.lineNumber}}};handlePointerClick=e=>{let{onHunkExpand:t,onLineClick:n,onLineNumberClick:r,onTokenClick:i,onMergeConflictActionClick:a}=this.options;(t!=null||n!=null||r!=null||a!=null||i!=null)&&(this.options.onGutterUtilityClick!=null&&Px(e.composedPath())||(aw(this.options.__debugPointerEvents,`click`,`FileDiff.DEBUG.handlePointerClick:`,e),this.handlePointerEvent({eventType:`click`,event:e})))};handlePointerMove=e=>{if(e.pointerType!==`mouse`)return;let{lineHoverHighlight:t=`disabled`,onLineEnter:n,onLineLeave:r,onTokenEnter:i,onTokenLeave:a,enableGutterUtility:o=!1}=this.options;t===`disabled`&&!o&&n==null&&r==null&&i==null&&a==null||(aw(this.options.__debugPointerEvents,`move`,`FileDiff.DEBUG.handlePointerMove:`,e),this.handlePointerEvent({eventType:`move`,event:e}))};handlePointerLeave=e=>{let{__debugPointerEvents:t}=this.options;if(aw(t,`move`,`FileDiff.DEBUG.handlePointerLeave: no event`),this.hoveredLine==null&&this.hoveredToken==null){aw(t,`move`,`FileDiff.DEBUG.handlePointerLeave: returned early, no hovered line or token`);return}this.hoveredToken!=null&&(this.options.onTokenLeave?.(this.hoveredToken,e),this.clearHoveredToken()),this.hoveredLine!=null&&(this.options.onLineLeave?.({...this.hoveredLine,event:e}),this.clearHoveredLine()),this.placeUtility()};handlePointerEvent({eventType:e,event:t}){let{__debugPointerEvents:n}=this.options,r=t.composedPath();aw(n,e,`FileDiff.DEBUG.handlePointerEvent:`,{eventType:e,composedPath:r});let i=this.resolvePointerTarget(r);aw(n,e,`FileDiff.DEBUG.handlePointerEvent: resolvePointerTarget result:`,i);let{onLineClick:a,onLineNumberClick:o,onLineEnter:s,onLineLeave:c,onTokenClick:l,onTokenEnter:u,onTokenLeave:d,onHunkExpand:f,onMergeConflictActionClick:p}=this.options;switch(e){case`move`:{let e=GC(i)&&this.hoveredLine?.lineElement===i.lineElement;WC(i)&&this.hoveredToken?.tokenElement===i.tokenElement||(this.hoveredToken!=null&&(d?.(this.hoveredToken,t),this.clearHoveredToken()),WC(i)&&(this.setHoveredToken(this.toTokenEventBaseProps(i)),u?.(this.hoveredToken,t))),e||(this.hoveredLine!=null&&(c?.({...this.hoveredLine,event:t}),this.clearHoveredLine()),GC(i)?(this.setHoveredLine(this.toEventBaseProps(i)),this.placeUtility(),s?.({...this.hoveredLine,event:t})):this.placeUtility());break}case`click`:{if(i==null)break;if(qC(i)&&p!=null){p(i);break}if(KC(i)&&f!=null){f(i.hunkIndex,i.all||t.shiftKey?`both`:i.direction,i.all||t.shiftKey?1/0:void 0);break}if(!GC(i))break;WC(i)&&l!=null&&l(this.toTokenEventBaseProps(i),t);let e=this.toEventBaseProps(i);o!=null&&i.numberColumn?o({...e,event:t}):a?.({...e,event:t});break}}}syncPointerListeners(e){let{__debugPointerEvents:t,lineHoverHighlight:n=`disabled`,onLineClick:r,onLineNumberClick:i,onLineEnter:a,onLineLeave:o,onTokenClick:s,onTokenEnter:c,onTokenLeave:l,onHunkExpand:u,onMergeConflictActionClick:d,enableGutterUtility:f=!1,enableLineSelection:p=!1,onGutterUtilityClick:m}=this.options,h=m!=null,g=n!==`disabled`||r!=null||i!=null||a!=null||o!=null||s!=null||c!=null||l!=null||u!=null||d!=null||f||p||h;g&&!this.hasPointerListeners?(e.addEventListener(`click`,this.handlePointerClick),e.addEventListener(`pointerdown`,this.handlePointerDown),e.addEventListener(`pointermove`,this.handlePointerMove),e.addEventListener(`pointerleave`,this.handlePointerLeave),this.hasPointerListeners=!0,aw(t,`click`,`FileDiff.DEBUG.attachEventListeners: Attaching click events for:`,(()=>{let e=[];return(t===`both`||t===`click`)&&(r!=null&&e.push(`onLineClick`),i!=null&&e.push(`onLineNumberClick`),u!=null&&e.push(`expandable hunk separators`),d!=null&&e.push(`merge conflict actions`)),e})()),aw(t,`move`,`FileDiff.DEBUG.attachEventListeners: Attaching pointer move event`),aw(t,`move`,`FileDiff.DEBUG.attachEventListeners: Attaching pointer leave event`)):!g&&this.hasPointerListeners&&(e.removeEventListener(`click`,this.handlePointerClick),e.removeEventListener(`pointerdown`,this.handlePointerDown),e.removeEventListener(`pointermove`,this.handlePointerMove),e.removeEventListener(`pointerleave`,this.handlePointerLeave),this.hasPointerListeners=!1);let _=this.pointerSession.mode===`selecting`||this.pointerSession.mode===`pendingSingleLineUnselect`,v=this.pointerSession.mode===`gutterSelecting`;(!p&&_||!h&&v)&&(this.clearPointerSession(),this.detachDocumentPointerListeners(),this.selectionAnchor=void 0,this.clearPendingSingleLineState())}updateInteractiveLineAttributes(){if(this.pre==null)return;let{onLineClick:e,onLineNumberClick:t,enableLineSelection:n=!1}=this.options,r=e!=null,i=t!=null||n;r&&!this.interactiveLinesAttr?(this.pre.setAttribute(`data-interactive-lines`,``),this.interactiveLinesAttr=!0):!r&&this.interactiveLinesAttr&&(this.pre.removeAttribute(`data-interactive-lines`),this.interactiveLinesAttr=!1),i&&!this.interactiveLineNumbersAttr?(this.pre.setAttribute(`data-interactive-line-numbers`,``),this.interactiveLineNumbersAttr=!0):!i&&this.interactiveLineNumbersAttr&&(this.pre.removeAttribute(`data-interactive-line-numbers`),this.interactiveLineNumbersAttr=!1)}handlePointerDown=e=>{if(e.pointerType===`mouse`&&e.button!==0||this.pre==null||this.pointerSession.mode!==`idle`)return;let t=e.composedPath();Px(t)&&this.options.onGutterUtilityClick!=null?this.startGutterSelectionFromPointerDown(e):(e.pointerType!==`mouse`&&this.revealUtilityFromGutterPath(t),this.startLineSelectionFromPointerDown(e))};startLineSelectionFromPointerDown(e){let{enableLineSelection:t=!1}=this.options;if(!t)return;let n=this.resolveSelectionInfo(e,{source:`event-path`,requireNumberColumn:!0});if(n==null)return;let{pre:r}=this;if(r==null)return;let{lineNumber:i,eventSide:a,lineIndex:o}=n;if(e.shiftKey&&this.selectedRange!=null){let t=this.getIndexesFromSelection(this.selectedRange,r.getAttribute(`data-diff-type`)===`split`);if(t==null)return;let n=t.start<=t.end?o>=t.start:o<=t.end;this.selectionAnchor={lineNumber:n?this.selectedRange.start:this.selectedRange.end,side:n?this.selectedRange.side:this.selectedRange.endSide??this.selectedRange.side},this.updateSelection(i,a,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:`selecting`,pointerId:e.pointerId},this.attachDocumentPointerListeners();return}if(this.selectedRange?.start===i&&this.selectedRange?.end===i){let t={lineNumber:i,side:a};this.selectionAnchor=t,this.pointerSession={mode:`pendingSingleLineUnselect`,pointerId:e.pointerId,anchor:t,pending:t},this.attachDocumentPointerListeners();return}this.options.controlledSelection===!0?this.proposedSelectedRange=null:this.selectedRange=null,this.placeUtility(),this.selectionAnchor={lineNumber:i,side:a},this.updateSelection(i,a,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:`selecting`,pointerId:e.pointerId},this.attachDocumentPointerListeners()}startGutterSelectionFromPointerDown(e){let{onGutterUtilityClick:t}=this.options;if(t==null)return;let n=this.currentSelectionEnds(),r=n?.bottom??this.resolveSelectionPoint(e,{source:`event-path`,excludeUtility:!1}),i=n?.top??r;r!=null&&i!=null&&(e.preventDefault(),e.stopPropagation(),this.pointerSession={mode:`gutterSelecting`,pointerId:e.pointerId,anchor:i,current:r},this.selectionAnchor={lineNumber:i.lineNumber,side:i.side},this.updateSelection(r.lineNumber,r.side,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.attachDocumentPointerListeners())}handleDocumentPointerMove=e=>{switch(this.pointerSession.mode){case`idle`:return;case`gutterSelecting`:{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();let t=this.resolveSelectionPoint(e,{source:`coordinates-first`});if(t==null)return;this.pointerSession.current=t,this.updateSelection(t.lineNumber,t.side);return}case`selecting`:{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();let t=this.resolveSelectionInfo(e,{source:`coordinates-first`,requireNumberColumn:!1});if(t==null||this.selectionAnchor==null)return;this.updateSelection(t.lineNumber,t.eventSide);return}case`pendingSingleLineUnselect`:{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();let t=this.resolveSelectionInfo(e,{source:`coordinates-first`,requireNumberColumn:!1});if(t==null||this.selectionAnchor==null)return;let n={lineNumber:t.lineNumber,side:t.eventSide};if(Nx(this.pointerSession.pending,n))return;this.updateSelection(t.lineNumber,t.eventSide,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.notifySelectionChangeDelta(),this.pointerSession={mode:`selecting`,pointerId:e.pointerId};return}}};handleDocumentPointerUp=e=>{let{onGutterUtilityClick:t}=this.options;switch(this.pointerSession.mode){case`idle`:return;case`gutterSelecting`:{let{pointerSession:n}=this;if(e.pointerId!==n.pointerId)return;e.preventDefault();let r=this.resolveSelectionPoint(e,{source:`coordinates-first`});r!=null&&(n.current=r,this.updateSelection(r.lineNumber,r.side));let i=this.buildSelectedLineRange(n.anchor,n.current);t?.({...i}),this.selectionAnchor=void 0,this.notifySelectionEnd(i),this.notifySelectionCommitted(i),this.clearProposedSelection(),this.clearPointerSession(),this.detachDocumentPointerListeners();return}case`pendingSingleLineUnselect`:if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.updateSelection(null,void 0,!1),this.selectionAnchor=void 0,this.clearPendingSingleLineState(),this.detachDocumentPointerListeners(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(this.getCurrentSelectionRange()),this.clearProposedSelection();return;case`selecting`:if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.selectionAnchor=void 0,this.detachDocumentPointerListeners(),this.clearPointerSession(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(this.getCurrentSelectionRange()),this.clearProposedSelection()}};handleDocumentPointerCancel=e=>{switch(this.pointerSession.mode){case`idle`:return;case`gutterSelecting`:case`selecting`:case`pendingSingleLineUnselect`:if(`pointerId`in this.pointerSession&&e.pointerId!==this.pointerSession.pointerId)return;this.selectionAnchor=void 0,this.clearProposedSelection(),this.clearPendingSingleLineState(),this.clearPointerSession(),this.detachDocumentPointerListeners()}};clearHoveredLine(){this.hoveredLine!=null&&(this.hoveredLine.lineElement.removeAttribute(`data-hovered`),this.hoveredLine.numberElement.removeAttribute(`data-hovered`),this.hoveredLine=void 0)}setHoveredLine(e){let{lineHoverHighlight:t=`disabled`}=this.options;this.hoveredLine!=null&&this.clearHoveredLine(),this.hoveredLine=e,t!==`disabled`&&((t===`both`||t===`line`)&&this.hoveredLine.lineElement.setAttribute(`data-hovered`,``),(t===`both`||t===`number`)&&this.hoveredLine.numberElement.setAttribute(`data-hovered`,``))}clearHoveredToken(){this.hoveredToken!=null&&(this.hoveredToken=void 0)}setHoveredToken(e){this.hoveredToken!=null&&this.clearHoveredToken(),this.hoveredToken=e}ensureGutterUtilityNode(e){if(this.gutterUtilityContainer??(this.gutterUtilityContainer=document.createElement(`div`),this.gutterUtilityContainer.setAttribute(`data-gutter-utility-slot`,``)),e)this.gutterUtilityButton!=null&&(this.gutterUtilityButton.remove(),this.gutterUtilityButton=void 0),this.gutterUtilitySlot??(this.gutterUtilitySlot=document.createElement(`slot`),this.gutterUtilitySlot.name=`gutter-utility-slot`),this.gutterUtilitySlot.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilitySlot);else{if(this.gutterUtilitySlot?.remove(),this.gutterUtilitySlot=void 0,this.gutterUtilityButton==null){let e=document.createElement(`div`);e.innerHTML=LC(Mx());let t=e.firstElementChild;if(!(t instanceof HTMLButtonElement))throw Error(`InteractionManager.ensureGutterUtilityNode: Node element should be a button`);t.remove(),this.gutterUtilityButton=t}this.gutterUtilityButton.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilityButton)}}revealUtilityFromGutterPath(e){if(this.placeUtilityFromSelection())return;let t=this.resolvePointerTarget(e);UC(t)&&t.numberColumn&&this.showUtilityOnLine(this.toEventBaseProps(t))}placeUtility(){if(!this.placeUtilityFromSelection()){if(this.hoveredLine!=null){this.showUtilityOnLine(this.hoveredLine);return}this.hideUtility()}}placeUtilityFromSelection(){let e=this.currentSelectionEnds();if(e==null)return!1;let t=this.targetForSelectionPoint(e.bottom);return t==null?this.hideUtility():this.showUtilityOnLine(this.toEventBaseProps(t)),!0}showUtilityOnLine(e){this.gutterUtilityContainer!=null&&(this.gutterUtilityLine=e,e.numberElement.appendChild(this.gutterUtilityContainer))}hideUtility(){this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0}currentSelectionEnds(){let e=this.getCurrentSelectionRange();return e==null?void 0:this.selectionEnds(e)}selectionEnds(e){let t={lineNumber:e.start,side:e.side},n={lineNumber:e.end,side:e.endSide??e.side},r=this.selectionPointRowIndex(t),i=this.selectionPointRowIndex(n);if(r!=null&&i!=null)return r>i?{top:n,bottom:t}:{top:t,bottom:n}}selectionPointRowIndex(e){let t=this.getLineIndex(e.lineNumber,e.side);if(t!=null)return this.isSplitDiff()?t[1]:t[0]}targetForSelectionPoint(e){if(this.pre==null)return;let t=this.getLineIndex(e.lineNumber,e.side);if(t==null)return;let n=this.mode===`diff`?`${t[0]},${t[1]}`:`${t[0]}`,r=this.pre.querySelectorAll(`[data-column-number="${e.lineNumber}"][data-line-index="${n}"]`);for(let t of r){if(!(t instanceof HTMLElement))continue;let n=this.resolvePointerTarget(XC(t));if(UC(n)&&(this.mode!==`diff`||e.side==null||n.side===e.side))return n}}attachDocumentPointerListeners(){this.hasDocumentPointerListeners||=(document.addEventListener(`pointermove`,this.handleDocumentPointerMove),document.addEventListener(`pointerup`,this.handleDocumentPointerUp),document.addEventListener(`pointercancel`,this.handleDocumentPointerCancel),!0)}detachDocumentPointerListeners(){this.hasDocumentPointerListeners&&=(document.removeEventListener(`pointermove`,this.handleDocumentPointerMove),document.removeEventListener(`pointerup`,this.handleDocumentPointerUp),document.removeEventListener(`pointercancel`,this.handleDocumentPointerCancel),!1)}clearPointerSession(){this.pointerSession={mode:`idle`}}clearPendingSingleLineState(){this.pointerSession.mode===`pendingSingleLineUnselect`&&(this.pointerSession={mode:`idle`})}selectionInfoFromPath(e,t){let n=this.resolvePointerTarget(e);if(UC(n)&&!(t&&!n.numberColumn)&&n.splitLineIndex!=null)return{lineIndex:n.splitLineIndex,lineNumber:n.lineNumber,eventSide:this.mode===`diff`?n.side:void 0}}resolveSelectionInfo(e,t){let n=this.resolveSelectionPath(e,t);return n==null?void 0:this.selectionInfoFromPath(n,t.requireNumberColumn)}selectionPointFromPath(e){let t=this.resolvePointerTarget(e);if(UC(t))return{lineNumber:t.lineNumber,side:this.mode===`diff`?t.side:void 0}}resolveSelectionPoint(e,t){let n=this.resolveSelectionPath(e,t);return n==null?void 0:this.selectionPointFromPath(n)}resolveSelectionPath(e,t){let n=t.excludeUtility!==!1;switch(t.source){case`event-path`:return this.pathFromEventPath(e.composedPath(),n);case`coordinates-first`:{let t=this.pathFromCoordinates(e,n);return t===void 0?this.pathFromEventPath(e.composedPath(),n):t??void 0}}}pathFromCoordinates(e,t){let n=this.hitTest(e);if(n!==void 0)return n===null?null:this.pathFromElement(n,t)??null}pathFromEventPath(e,t){if(!(t&&Px(e))){for(let n of e)if(n instanceof Element)return this.pathFromElement(n,t)}}pathFromElement(e,t){let n=XC(e);if(t&&Px(n))return;let r=ZC(e);return r==null?this.pathFromAnnotationSlot(e):XC(r)}pathFromAnnotationSlot(e){let t=$C(QC(e));if(t==null)return;let n=this.targetForSelectionPoint(t);return n==null?void 0:XC(n.lineElement)}hitTest(e){if(!Number.isFinite(e.clientX)||!Number.isFinite(e.clientY))return;let t=this.pre?.getRootNode(),n=ew(t)?t:ew(document)?document:void 0;if(n!=null)return n.elementFromPoint(e.clientX,e.clientY)}getLineIndex(e,t){let{getLineIndex:n}=this.options;return n==null?[e-1,e-1]:n(e,t)}getCurrentSelectionRange(){return this.proposedSelectedRange===void 0?this.selectedRange:this.proposedSelectedRange}clearProposedSelection(){this.proposedSelectedRange=void 0}updateSelection(e,t,n=!0){let r=this.getCurrentSelectionRange(),i;if(e==null)i=null;else{let n=this.selectionAnchor?.side??t,r=this.selectionAnchor?.lineNumber??e;i=this.buildSelectionRange(r,e,n,t)}fb(r??void 0,i??void 0)||(this.selectedRangeHighlightSide=void 0,this.selectedRangeLineNumberOnly=!1,this.options.controlledSelection===!0?this.proposedSelectedRange=i:(this.selectedRange=i,cb(this.renderSelection)),this.placeUtility(),n&&this.notifySelectionChangeDelta())}getIndexesFromSelection(e,t){if(this.pre==null)return;let n=this.getLineIndex(e.start,e.side),r=this.getLineIndex(e.end,e.endSide??e.side);return n!=null&&r!=null?{start:t?n[1]:n[0],end:t?r[1]:r[0]}:void 0}getSelectionRenderState(){return{selectedLines:{range:this.selectedRange,highlightSide:this.selectedRangeHighlightSide,lineNumberOnly:this.selectedRangeLineNumberOnly},editorActiveLine:{range:this.editorActiveLine==null?null:{start:this.editorActiveLine,end:this.editorActiveLine,side:this.editorActiveLineSide},highlightSide:this.editorActiveLineSide,lineNumberOnly:this.editorLineNumberOnly}}}resolveLineRenderRange(e,t,n){if(e.range==null)return;let r=this.getIndexesFromSelection(e.range,t);if(r==null)throw console.error({rowRange:r,range:e.range}),Error(`InteractionManager.renderSelection: No valid ${n} rowRange`);return r}getLineRenderColumns(e,t,n,r){if(this.pre==null||t==null&&r==null)return[];let{children:i}=this.pre;if(i.length>2)throw console.error(i),Error(`InteractionManager.renderSelection: Somehow there are more than 2 code elements...`);let a=[];for(let o of i){let i=o.hasAttribute(`data-deletions`)?`deletions`:o.hasAttribute(`data-additions`)?`additions`:void 0,s=e!=null&&t!=null&&(e.highlightSide==null||i==null||e.highlightSide===i),c=n!=null&&r!=null&&(n.highlightSide==null||i==null||n.highlightSide===i);if(!s&&!c)continue;let[l,u]=o.children;if(!(l instanceof HTMLElement)||!(u instanceof HTMLElement))throw Error(`InteractionManager.renderSelection: missing gutter or content element`);if(u.children.length!==l.children.length)throw Error(`InteractionManager.renderSelection: gutter and content children dont match, something is wrong`);a.push({content:u,gutter:l,renderEditorActiveLine:c,renderSelectedLines:s})}return a}renderSelection=()=>{lb(this.renderSelection);let e=this.getSelectionRenderState();if(this.pre==null)return;let{editorActiveLine:t,selectedLines:n}=e,r=!nw(this.renderedSelectedLinesState,n),i=!nw(this.renderedEditorActiveLineState,t);if(!r&&!i)return;r&&(this.renderedSelectedLinesState=void 0),i&&(this.renderedEditorActiveLineState=void 0);let a=this.pre.getAttribute(`data-diff-type`)===`split`,o=r?this.resolveLineRenderRange(n,a,`selected-lines`):void 0,s=i?this.resolveLineRenderRange(t,a,`editor-active-line`):void 0,c=this.getLineRenderColumns(r?n:void 0,o,i?t:void 0,s),l=n.range==null||c.some(e=>e.renderSelectedLines),u=t.range==null||c.some(e=>e.renderEditorActiveLine);if(r)for(let e of this.pre.querySelectorAll(`[data-selected-line]`))e.removeAttribute(`data-selected-line`);if(i)for(let e of this.pre.querySelectorAll(`[data-editor-active-line]`))e.removeAttribute(`data-editor-active-line`);let d=o==null?void 0:Math.min(o.start,o.end),f=o==null?void 0:Math.max(o.start,o.end),p=d===f,m=s?.start;for(let e of c){let{content:r,gutter:i,renderEditorActiveLine:o,renderSelectedLines:s}=e,c=Math.max(s?f??-1/0:-1/0,o?m??-1/0:-1/0),l=r.children.length;for(let e=0;e<l;e++){let l=r.children[e],u=i.children[e];if(!(l instanceof HTMLElement)||!(u instanceof HTMLElement))continue;let h=this.parseLineIndex(l,a);if((h??0)>c)break;if(h!=null){if(s&&d!=null&&f!=null&&h>=d&&h<=f){let e=p?`single`:h===d?`first`:h===f?`last`:``;u.setAttribute(`data-selected-line`,e),n.lineNumberOnly||(l.setAttribute(`data-selected-line`,e),u.nextSibling instanceof HTMLElement&&l.nextSibling instanceof HTMLElement&&(l.nextSibling.hasAttribute(`data-line-annotation`)||l.nextSibling.hasAttribute(`data-merge-conflict-actions`))&&(p?(e=`last`,l.setAttribute(`data-selected-line`,`first`)):h===d?e=``:h===f&&l.setAttribute(`data-selected-line`,``),l.nextSibling.setAttribute(`data-selected-line`,e),u.nextSibling.setAttribute(`data-selected-line`,e)))}o&&h===m&&(u.setAttribute(`data-editor-active-line`,``),t.lineNumberOnly||l.setAttribute(`data-editor-active-line`,``))}}}r&&l&&(this.renderedSelectedLinesState=n),i&&u&&(this.renderedEditorActiveLineState=t)};notifySelectionCommitted(e){this.options.onLineSelected?.(e)}notifySelectionChangeDelta(){this.options.onLineSelectionChange?.(this.getCurrentSelectionRange()??null)}notifySelectionStart(e){this.options.onLineSelectionStart?.(e)}notifySelectionEnd(e){this.options.onLineSelectionEnd?.(e)}toEventBaseProps(e){return this.mode===`file`?{type:`line`,lineElement:e.lineElement,lineNumber:e.lineNumber,numberColumn:e.numberColumn,numberElement:e.numberElement}:{type:`diff-line`,annotationSide:e.side,lineType:e.lineType,lineElement:e.lineElement,numberElement:e.numberElement,lineNumber:e.lineNumber,numberColumn:e.numberColumn}}toTokenEventBaseProps({lineCharEnd:e,lineCharStart:t,lineNumber:n,side:r,tokenElement:i,tokenText:a}){return this.mode===`file`?{type:`token`,lineCharEnd:e,lineCharStart:t,lineNumber:n,tokenElement:i,tokenText:a}:{type:`token`,lineCharEnd:e,lineCharStart:t,lineNumber:n,side:r,tokenElement:i,tokenText:a}}buildSelectedLineRange(e,t){return this.buildSelectionRange(e.lineNumber,t.lineNumber,e.side,t.side)}buildSelectionRange(e,t,n,r){return{start:e,end:t,...n==null?{}:{side:n},...n!==r&&r!=null?{endSide:r}:{}}}resolvePointerTarget(e){let t=!1,n,r,i,a,o,s,c,l,u,d;for(let f of e){if(!(f instanceof HTMLElement))continue;if(d==null&&f.hasAttribute(`data-merge-conflict-action`)){let e=f.getAttribute(`data-merge-conflict-action`)??void 0,t=f.getAttribute(`data-merge-conflict-conflict-index`)??void 0,n=t==null?NaN:Number.parseInt(t,10);JC(e)&&Number.isFinite(n)&&(d={kind:`merge-conflict-action`,resolution:e,conflictIndex:n})}if(s==null&&f.hasAttribute(`data-char`)){s=f;let e=f.getAttribute(`data-char`);if(e!=null){let t=Number.parseInt(e,10);if(!Number.isNaN(t)){let e=f.textContent??``,n=t+e.length;(e.trim()!==``||this.options.enableTokenInteractionsOnWhitespace===!0)&&(c={tokenElement:s,lineCharStart:t,lineCharEnd:n,tokenText:e});continue}}}let e=o==null?f.getAttribute(`data-column-number`)??void 0:void 0;if(e!=null){o=f,u=Number.parseInt(e,10),t=!0,n=iw(f),a=f.getAttribute(`data-line-index`)??void 0;continue}let p=i==null?f.getAttribute(`data-line`)??void 0:void 0;if(p!=null){i=f,u=Number.parseInt(p,10),n=iw(f),a=f.getAttribute(`data-line-index`)??void 0;continue}if(l==null&&(f.hasAttribute(`data-expand-button`)||f.hasAttribute(`data-unmodified-lines`))){l={hunkIndex:void 0,direction:f.hasAttribute(`data-expand-up`)?`up`:f.hasAttribute(`data-expand-down`)?`down`:`both`,all:f.hasAttribute(`data-expand-all-button`)};continue}let m=l==null?void 0:f.getAttribute(`data-expand-index`)??void 0;if(l!=null&&m!=null){let e=Number.parseInt(m,10);Number.isNaN(e)||(l.hunkIndex=e);continue}if(r==null&&f.hasAttribute(`data-code`)){r=f;break}}if(d!=null)return d;if(l?.hunkIndex!=null)return{type:`line-info`,hunkIndex:l.hunkIndex,direction:l.direction,all:l.all};if(i??=a==null?void 0:YC(r,`[data-line][data-line-index="${a}"]`),o??=a==null?void 0:YC(r,`[data-column-number][data-line-index="${a}"]`),r==null||i==null||o==null||n==null||u==null||Number.isNaN(u))return;let f=this.parseLineIndex(i,this.isSplitDiff());return c==null?this.mode===`file`?{kind:`line`,lineType:n,lineElement:i,lineNumber:u,numberColumn:t,numberElement:o,side:void 0,splitLineIndex:f}:{kind:`line`,lineType:n,lineElement:i,lineNumber:u,numberColumn:t,numberElement:o,side:rw(n,r),splitLineIndex:f}:this.mode===`file`?{kind:`token`,lineType:n,lineElement:i,lineNumber:u,numberColumn:t,numberElement:o,side:void 0,splitLineIndex:f,...c}:{kind:`token`,lineType:n,lineElement:i,lineNumber:u,numberColumn:t,numberElement:o,side:rw(n,r),splitLineIndex:f,...c}}isSplitDiff(){return this.pre?.getAttribute(`data-diff-type`)===`split`}parseLineIndex(e,t){let n=(e.getAttribute(`data-line-index`)??``).split(`,`).map(e=>Number.parseInt(e,10)).filter(e=>!Number.isNaN(e));if(t&&n.length===2)return n[1];if(!t)return n[0]}};function VC({enableTokenInteractionsOnWhitespace:e,enableGutterUtility:t,lineHoverHighlight:n,onGutterUtilityClick:r,onLineClick:i,onLineEnter:a,onLineLeave:o,onLineNumberClick:s,onTokenClick:c,onTokenEnter:l,onTokenLeave:u,renderGutterUtility:d,__debugPointerEvents:f,enableLineSelection:p,controlledSelection:m,onLineSelected:h,onLineSelectionStart:g,onLineSelectionChange:_,onLineSelectionEnd:v},y,b,x){return{enableTokenInteractionsOnWhitespace:e,enableGutterUtility:HC({enableGutterUtility:t,renderGutterUtility:d,onGutterUtilityClick:r}),usesCustomGutterUtility:d!=null,lineHoverHighlight:n,onGutterUtilityClick:r,onHunkExpand:y,onMergeConflictActionClick:x,onLineClick:i,onLineEnter:a,onLineLeave:o,onLineNumberClick:s,onTokenClick:c,onTokenEnter:l,onTokenLeave:u,__debugPointerEvents:f,enableLineSelection:p,controlledSelection:m,onLineSelected:h,onLineSelectionStart:g,onLineSelectionChange:_,onLineSelectionEnd:v,getLineIndex:b}}function HC({enableGutterUtility:e,renderGutterUtility:t,onGutterUtilityClick:n}){if(n!=null&&t!=null)throw Error(`Cannot use both 'onGutterUtilityClick' and 'renderGutterUtility'. Use only one gutter utility API.`);return e??!1}function UC(e){return e!=null&&`kind`in e&&e.kind===`line`}function WC(e){return e!=null&&`kind`in e&&e.kind===`token`}function GC(e){return UC(e)||WC(e)}function KC(e){return`type`in e&&e.type===`line-info`}function qC(e){return`kind`in e&&e.kind===`merge-conflict-action`}function JC(e){return e===`current`||e===`incoming`||e===`both`}function YC(e,t){let n=e?.querySelector(t);return n instanceof HTMLElement?n:void 0}function XC(e){let t=[],n=e;for(;n!=null;)t.push(n),n=n.parentNode;return t}function ZC(e){let t=e.closest(`[data-line], [data-column-number]`);if(t instanceof HTMLElement)return t;let n=e.closest(`[data-line-annotation], [data-gutter-buffer="annotation"]`);if(!(n instanceof HTMLElement))return;let r=n.previousElementSibling;return r instanceof HTMLElement&&(r.hasAttribute(`data-line`)||r.hasAttribute(`data-column-number`))?r:void 0}function QC(e){let t=e.closest(`[slot^="annotation-"]`);if(t instanceof HTMLElement)return t.getAttribute(`slot`)??void 0;if(e instanceof HTMLElement){let t=e.getAttribute(`name`)??void 0;return t!=null&&t.startsWith(`annotation-`)?t:void 0}}function $C(e){if(e==null)return;let t=/^annotation-(?:(additions|deletions)-)?(\d+)$/.exec(e);if(t==null)return;let n=Number.parseInt(t[2],10);if(!(!Number.isFinite(n)||n<=0))return{lineNumber:n,side:t[1]}}function ew(e){return e!=null&&typeof e.elementFromPoint==`function`}function tw(e,t){return e===t||fb(e??void 0,t??void 0)}function nw(e,t){return e?.highlightSide===t.highlightSide&&e?.lineNumberOnly===t.lineNumberOnly&&tw(e?.range??null,t.range)}function rw(e,t){switch(e){case`change-deletion`:return`deletions`;case`change-addition`:return`additions`;default:return t.hasAttribute(`data-deletions`)?`deletions`:`additions`}}function iw(e){let t=e.getAttribute(`data-line-type`);if(t!=null)switch(t){case`change-deletion`:case`change-addition`:case`context`:case`context-expanded`:return t;default:return}}function aw(e=`none`,t,...n){switch(e){case`none`:return;case`both`:break;case`click`:if(t!==`click`)return;break;case`move`:if(t!==`move`)return}console.log(...n)}var ow=class e{static resizeObserver;static managersByElement=new Map;static getResizeObserver(){let t=e.resizeObserver??new ResizeObserver(e.handleSharedResizeEntries);return e.resizeObserver=t,t}static handleSharedResizeEntries(t){let n=new Map;for(let r of t){let t=e.managersByElement.get(r.target);if(t==null)continue;let i=n.get(t);i==null?n.set(t,[r]):i.push(r)}for(let[e,t]of n)e.handleResizeEntries(t)}observedNodes=new Map;setup(e,{disableAnnotations:t,columnVariables:n=`apply`}){let r=new Set,i=n===`apply`,a=0,o=new Map(this.observedNodes);this.observedNodes.clear();for(let t of e.children){if(a===2)break;let e=(()=>{if(t instanceof HTMLElement&&t.tagName===`CODE`)return t})();if(e==null)continue;a++;let n=o.get(e);if(n!=null&&n.type!==`code`)throw Error(`ResizeManager.setup: somehow a code node is being used for an annotation, should be impossible`);let r=e.firstElementChild;r instanceof HTMLElement||(r=null),n==null?(n={type:`code`,codeElement:e,numberElement:r,codeWidth:`auto`,numberWidth:0,applyColumnVariables:i},this.observedNodes.set(e,n),this.observe(e),r!=null&&(this.observedNodes.set(r,n),this.observe(r))):(this.observedNodes.set(e,n),o.delete(e),n.numberElement===r?n.numberElement==null?n.numberWidth=0:(o.delete(n.numberElement),this.observedNodes.set(n.numberElement,n)):(n.numberElement!=null&&(this.unobserve(n.numberElement),o.delete(n.numberElement)),r!=null&&(this.observe(r),o.delete(r),this.observedNodes.set(r,n)),n.numberElement=r,n.numberWidth=0),lw(n,i))}if(a>1&&!t){let t=e.querySelectorAll(`[data-line-annotation*=","]`),n=new Map;for(let e of t){if(!(e instanceof HTMLElement))continue;let t=e.getAttribute(`data-line-annotation`)??``;if(!/^-?\d+,-?\d+$/.test(t)){console.error(`DiffFileRenderer.setupResizeObserver: Invalid element or annotation`,{lineAnnotation:t,element:e});continue}let r=n.get(t);r??(r=[],n.set(t,r)),r.push(e)}for(let[e,t]of n){if(t.length!==2){console.error(`DiffFileRenderer.setupResizeObserver: Bad Pair`,e,t);continue}let[n,i]=t,a=n.firstElementChild,s=i.firstElementChild;if(!(n instanceof HTMLElement)||!(i instanceof HTMLElement)||!(a instanceof HTMLElement)||!(s instanceof HTMLElement))continue;let c=o.get(a);if(c!=null){this.observedNodes.set(a,c),this.observedNodes.set(s,c),o.delete(a),o.delete(s);continue}let l=a.getBoundingClientRect().height,u=s.getBoundingClientRect().height;c={type:`annotations`,column1:{container:n,child:a,childHeight:l},column2:{container:i,child:s,childHeight:u},currentHeight:`auto`},r.add({child1:a,child2:s,item:c,newHeight:Math.max(l,u)})}for(let e of r)this.applyNewHeight(e.item,e.newHeight),this.observedNodes.set(e.child1,e.item),this.observedNodes.set(e.child2,e.item),this.observe(e.child1),this.observe(e.child2);r.clear()}for(let[e,t]of o)this.unobserve(e),t.type===`code`?fw(t):pw(t);o.clear()}cleanUp(){for(let e of this.observedNodes.keys())this.unobserve(e);this.observedNodes.clear()}observe(t){let{managersByElement:n}=e,r=n.get(t);if(r!==this){if(r!=null&&r!==this)throw Error(`ResizeManager.observe: element is already owned by another ResizeManager`);n.set(t,this),e.getResizeObserver().observe(t)}}unobserve(t){let{managersByElement:n,resizeObserver:r}=e,i=n.get(t);if(i!=null){if(i!==this)throw Error(`ResizeManager.unobserve: element is owned by another ResizeManager`);n.delete(t),r?.unobserve(t),r!=null&&n.size===0&&(r.disconnect(),e.resizeObserver=void 0)}}handleResizeEntries(e){let t=new Map,n=new Set;for(let r of e){let{target:e,borderBoxSize:i,contentBoxSize:a}=r;if(!(e instanceof HTMLElement)){console.error(`ResizeManager.handleResizeEntries: Invalid element for ResizeObserver`,r);continue}let o=this.observedNodes.get(e);if(o==null){console.error(`ResizeManager.handleResizeEntries: Not a valid observed node`,r);continue}if(o.type===`annotations`){let t=(()=>{if(e===o.column1.child)return o.column1;if(e===o.column2.child)return o.column2})();if(t==null){console.error(`ResizeManager.handleResizeEntries: Couldn't find a column for`,{item:o,target:e});continue}t.childHeight=i[0].blockSize,n.add(o)}else if(o.type===`code`){let n=t.get(o)??{},r=a[0].inlineSize;e===o.codeElement?n.codeInlineSize=r:e===o.numberElement&&(n.numberInlineSize=r),t.set(o,n)}}this.applyAnnotationUpdates(n),n.clear(),this.applyColumnUpdates(t),t.clear()}applyAnnotationUpdates(e){for(let t of e)this.applyNewHeight(t,Math.max(t.column1.childHeight,t.column2.childHeight))}applyColumnUpdates=e=>{for(let[t,n]of e){let e=n.codeInlineSize==null?t.codeWidth:sw(n.codeInlineSize),r=n.numberInlineSize==null?t.numberWidth:cw(n.numberInlineSize),i=e!==t.codeWidth,a=r!==t.numberWidth;!i&&!a||(t.codeWidth=e,t.numberWidth=r,t.applyColumnVariables&&uw(t,{codeWidthChanged:i,numberWidthChanged:a}))}};applyNewHeight(e,t){t!==e.currentHeight&&(e.currentHeight=Math.max(t,0),e.column1.container.style.setProperty(`--diffs-annotation-min-height`,`${e.currentHeight}px`),e.column2.container.style.setProperty(`--diffs-annotation-min-height`,`${e.currentHeight}px`))}};function sw(e){let t=Math.max(Math.floor(e),0);return t===0?`auto`:t}function cw(e){return Math.max(Math.ceil(e),0)}function lw(e,t){e.applyColumnVariables!==t&&(e.applyColumnVariables=t,t?uw(e,{codeWidthChanged:!0,numberWidthChanged:!0}):dw(e))}function uw(e,{codeWidthChanged:t,numberWidthChanged:n}){let{codeElement:r,codeWidth:i,numberWidth:a}=e;if(t&&r.style.setProperty(`--diffs-column-width`,`${typeof i==`number`?`${i}px`:`auto`}`),n&&r.style.setProperty(`--diffs-column-number-width`,`${a===0?`auto`:`${a}px`}`),t||n&&i!==`auto`){let e=typeof i==`number`?Math.max(i-a,0):0;r.style.setProperty(`--diffs-column-content-width`,`${e>0?`${e}px`:`auto`}`)}}function dw(e){e.codeElement.style.removeProperty(`--diffs-column-content-width`),e.codeElement.style.removeProperty(`--diffs-column-number-width`),e.codeElement.style.removeProperty(`--diffs-column-width`)}function fw(e){e.codeElement.isConnected&&dw(e)}function pw(e){e.column1.container.isConnected&&e.column1.container.style.removeProperty(`--diffs-annotation-min-height`),e.column2.container.isConnected&&e.column2.container.style.removeProperty(`--diffs-annotation-min-height`)}var mw=new Map,hw=new Map,gw=new Map,_w=new Set;function vw(e){for(let t of Array.isArray(e)?e:[e])if(t!==`text`&&t!==`ansi`&&!_w.has(t))return!1;return!0}function yw(e,t){e=Array.isArray(e)?e:[e];for(let n of e){if(_w.has(n.name))continue;let e=mw.get(n.name);e??(e=n,mw.set(n.name,e)),_w.add(e.name),t.loadLanguageSync(e.data)}}function bw(){return typeof WorkerGlobalScope<`u`&&typeof self<`u`&&self instanceof WorkerGlobalScope}var xw=Object.defineProperty,Sw=Object.getOwnPropertyDescriptor,Cw=Object.getOwnPropertyNames,ww=Object.prototype.hasOwnProperty,Tw=(e,t)=>{let n={};for(var r in e)xw(n,r,{get:e[r],enumerable:!0});return t||xw(n,Symbol.toStringTag,{value:`Module`}),n},Ew=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=Cw(t),a=0,o=i.length,s;a<o;a++)s=i[a],!ww.call(e,s)&&s!==n&&xw(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=Sw(t,s))||r.enumerable});return e},Dw=(e,t,n)=>(Ew(e,t,`default`),n&&Ew(n,t,`default`)),Ow=(function(){let e=typeof document<`u`&&document.createElement(`link`).relList;return e&&e.supports&&e.supports(`modulepreload`)?`modulepreload`:`preload`})(),kw=function(e){return`/`+e},Aw={},K=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=kw(t,n),t=s(t),t in Aw)return;Aw[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:Ow,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},jw=[{id:`abap`,name:`ABAP`,import:(()=>K(()=>import(`./_CLvhMVsD.js`),[]))},{id:`actionscript-3`,name:`ActionScript`,aliases:[`actionscript`,`as3`],import:(()=>K(()=>import(`./_Cs6JJXT5.js`),[]))},{id:`ada`,name:`Ada`,import:(()=>K(()=>import(`./_C5qYipkI.js`),[]))},{id:`ahk`,name:`AutoHotkey`,aliases:[`ahk1`],import:(()=>K(()=>import(`./_CA9gdOdF.js`),[]))},{id:`ahk2`,name:`AutoHotkey2`,import:(()=>K(()=>import(`./__6rzW9BS.js`),[]))},{id:`angular-html`,name:`Angular HTML`,import:(()=>K(()=>import(`./_zSpkIZIf.js`).then(e=>e.n),__vite__mapDeps([0,1,2,3])))},{id:`angular-ts`,name:`Angular TypeScript`,import:(()=>K(()=>import(`./_TU1mBzaU.js`),__vite__mapDeps([4,0,1,2,3,5])))},{id:`apache`,name:`Apache Conf`,import:(()=>K(()=>import(`./_U0d_L8uA.js`),[]))},{id:`apex`,name:`Apex`,import:(()=>K(()=>import(`./_KFGFyKwG.js`),[]))},{id:`apl`,name:`APL`,import:(()=>K(()=>import(`./_bsvRRwZw.js`),__vite__mapDeps([6,2,3,1,7,8,9])))},{id:`applescript`,name:`AppleScript`,import:(()=>K(()=>import(`./_CCn79oCD.js`),[]))},{id:`ara`,name:`Ara`,import:(()=>K(()=>import(`./_4CJ0cIlV.js`),[]))},{id:`asciidoc`,name:`AsciiDoc`,aliases:[`adoc`],import:(()=>K(()=>import(`./_SCjQUq34.js`),[]))},{id:`asm`,name:`Assembly`,import:(()=>K(()=>import(`./_Cmm7eHzH.js`),[]))},{id:`astro`,name:`Astro`,import:(()=>K(()=>import(`./_Ck3cW4fo.js`),__vite__mapDeps([10,2,3,9,11,12,13])))},{id:`awk`,name:`AWK`,import:(()=>K(()=>import(`./_BWXHIvNe2.js`),[]))},{id:`ballerina`,name:`Ballerina`,import:(()=>K(()=>import(`./_B7ZEbQpA2.js`),[]))},{id:`bat`,name:`Batch File`,aliases:[`batch`,`cmd`],import:(()=>K(()=>import(`./_qdxAdBWQ2.js`),[]))},{id:`beancount`,name:`Beancount`,import:(()=>K(()=>import(`./_D-usSTwE2.js`),[]))},{id:`berry`,name:`Berry`,aliases:[`be`],import:(()=>K(()=>import(`./_DKpUyyne2.js`),[]))},{id:`bibtex`,name:`BibTeX`,import:(()=>K(()=>import(`./_Ci_nEsc72.js`),[]))},{id:`bicep`,name:`Bicep`,import:(()=>K(()=>import(`./_CUHmPFLl2.js`),[]))},{id:`bird2`,name:`BIRD2 Configuration`,aliases:[`bird`],import:(()=>K(()=>import(`./_CYIUgYqB2.js`),[]))},{id:`blade`,name:`Blade`,import:(()=>K(()=>import(`./_COfQsLkO2.js`),__vite__mapDeps([14,2,3,1,7,8,9,15,16])))},{id:`bsl`,name:`1C (Enterprise)`,aliases:[`1c`],import:(()=>K(()=>import(`./_CpYNKFv52.js`),__vite__mapDeps([17,18])))},{id:`c`,name:`C`,import:(()=>K(()=>import(`./_D7G7VxOT2.js`).then(e=>e.n),[]))},{id:`c3`,name:`C3`,import:(()=>K(()=>import(`./_D0apG41V2.js`),[]))},{id:`cadence`,name:`Cadence`,aliases:[`cdc`],import:(()=>K(()=>import(`./_CQ2zXKGN2.js`),[]))},{id:`cairo`,name:`Cairo`,import:(()=>K(()=>import(`./_kIpfj7zU2.js`),__vite__mapDeps([19,20])))},{id:`chapel`,name:`Chapel`,aliases:[`chpl`],import:(()=>K(()=>import(`./_BZi1ECCN2.js`),__vite__mapDeps([21,22])))},{id:`clarity`,name:`Clarity`,import:(()=>K(()=>import(`./_CtfBBspg2.js`),[]))},{id:`clojure`,name:`Clojure`,aliases:[`clj`],import:(()=>K(()=>import(`./_DqKBuwfJ2.js`),[]))},{id:`cmake`,name:`CMake`,import:(()=>K(()=>import(`./_Bj61d0ZC2.js`),[]))},{id:`cobol`,name:`COBOL`,import:(()=>K(()=>import(`./_DPzN_k3h2.js`),__vite__mapDeps([23,1,2,3,8])))},{id:`codeowners`,name:`CODEOWNERS`,import:(()=>K(()=>import(`./_C8r90Shi2.js`),[]))},{id:`codeql`,name:`CodeQL`,aliases:[`ql`],import:(()=>K(()=>import(`./_oeQT6MSM2.js`),[]))},{id:`coffee`,name:`CoffeeScript`,aliases:[`coffeescript`],import:(()=>K(()=>import(`./_DFGsDSnY2.js`),__vite__mapDeps([24,2])))},{id:`common-lisp`,name:`Common Lisp`,aliases:[`lisp`],import:(()=>K(()=>import(`./_Cv5bFMCO.js`),[]))},{id:`coq`,name:`Rocq`,import:(()=>K(()=>import(`./_DuBRPxYg.js`),[]))},{id:`cpp`,name:`C++`,aliases:[`c++`],import:(()=>K(()=>import(`./_gmz8tY8_.js`).then(e=>e.n),__vite__mapDeps([25,26,27,22])))},{id:`crystal`,name:`Crystal`,import:(()=>K(()=>import(`./_EcnhZ-Zb.js`),__vite__mapDeps([28,2,3,1,16,22,29])))},{id:`csharp`,name:`C#`,aliases:[`c#`,`cs`],import:(()=>K(()=>import(`./_oqKa8noW.js`),[]))},{id:`css`,name:`CSS`,import:(()=>K(()=>import(`./_N0sGQTbG.js`).then(e=>e.n),[]))},{id:`csv`,name:`CSV`,import:(()=>K(()=>import(`./_Dx-8-gkx.js`),[]))},{id:`cue`,name:`CUE`,import:(()=>K(()=>import(`./_CE9AQfxI.js`),[]))},{id:`cypher`,name:`Cypher`,aliases:[`cql`],import:(()=>K(()=>import(`./_ClKdZ_lG.js`),[]))},{id:`d`,name:`D`,import:(()=>K(()=>import(`./_qD-0Kul2.js`),[]))},{id:`dart`,name:`Dart`,import:(()=>K(()=>import(`./_CnvKMtbv.js`),[]))},{id:`dax`,name:`DAX`,import:(()=>K(()=>import(`./_BkyTk9wS.js`),[]))},{id:`desktop`,name:`Desktop`,import:(()=>K(()=>import(`./_Dlh5hvp9.js`),[]))},{id:`diff`,name:`Diff`,import:(()=>K(()=>import(`./_woXpYk--.js`),[]))},{id:`docker`,name:`Dockerfile`,aliases:[`dockerfile`],import:(()=>K(()=>import(`./_IyjqRm3v.js`),[]))},{id:`dotenv`,name:`dotEnv`,import:(()=>K(()=>import(`./__5a1GRtc.js`),[]))},{id:`dream-maker`,name:`Dream Maker`,import:(()=>K(()=>import(`./_DW3nJb8Q.js`),[]))},{id:`edge`,name:`Edge`,import:(()=>K(()=>import(`./_DIRjHwSF.js`),__vite__mapDeps([30,1,2,3,11,15])))},{id:`elixir`,name:`Elixir`,import:(()=>K(()=>import(`./_H3THB0QM.js`),__vite__mapDeps([31,1,2,3])))},{id:`elm`,name:`Elm`,import:(()=>K(()=>import(`./_CQAlIUsH.js`),__vite__mapDeps([32,27,22])))},{id:`emacs-lisp`,name:`Emacs Lisp`,aliases:[`elisp`],import:(()=>K(()=>import(`./_c_oH4hRZ.js`),[]))},{id:`erb`,name:`ERB`,import:(()=>K(()=>import(`./_EvlrXhbk.js`),__vite__mapDeps([33,1,2,3,34,7,8,16,22,25,26,27,29,35,36,11,13,37,38,39])))},{id:`erlang`,name:`Erlang`,aliases:[`erl`],import:(()=>K(()=>import(`./_BaHq4SXp.js`),__vite__mapDeps([40,41])))},{id:`fennel`,name:`Fennel`,import:(()=>K(()=>import(`./_DQxkIbk2.js`),[]))},{id:`fish`,name:`Fish`,import:(()=>K(()=>import(`./_BJitypiv.js`),[]))},{id:`fluent`,name:`Fluent`,aliases:[`ftl`],import:(()=>K(()=>import(`./_C03EYrpw.js`),[]))},{id:`fortran-fixed-form`,name:`Fortran (Fixed Form)`,aliases:[`f`,`for`,`f77`],import:(()=>K(()=>import(`./_CQJs3lWb.js`),__vite__mapDeps([42,43])))},{id:`fortran-free-form`,name:`Fortran (Free Form)`,aliases:[`f90`,`f95`,`f03`,`f08`,`f18`],import:(()=>K(()=>import(`./_CYNrtFtB.js`),[]))},{id:`fsharp`,name:`F#`,aliases:[`f#`,`fs`],import:(()=>K(()=>import(`./_DmIc4jLQ.js`),__vite__mapDeps([44,41])))},{id:`gdresource`,name:`GDResource`,aliases:[`tscn`,`tres`],import:(()=>K(()=>import(`./_CY8IvGdO2.js`),__vite__mapDeps([45,46,47])))},{id:`gdscript`,name:`GDScript`,aliases:[`gd`],import:(()=>K(()=>import(`./_DYvRD3hg2.js`),[]))},{id:`gdshader`,name:`GDShader`,import:(()=>K(()=>import(`./_CBce3t8t2.js`),[]))},{id:`genie`,name:`Genie`,import:(()=>K(()=>import(`./_CV2tkWYe2.js`),[]))},{id:`gherkin`,name:`Gherkin`,import:(()=>K(()=>import(`./_DExj1W_82.js`),[]))},{id:`git-commit`,name:`Git Commit Message`,import:(()=>K(()=>import(`./_Dl-2e7rI2.js`),__vite__mapDeps([48,49])))},{id:`git-rebase`,name:`Git Rebase Message`,import:(()=>K(()=>import(`./__Jb3rACh2.js`),__vite__mapDeps([50,29])))},{id:`gleam`,name:`Gleam`,import:(()=>K(()=>import(`./_CSRkHgEL2.js`),[]))},{id:`glimmer-js`,name:`Glimmer JS`,aliases:[`gjs`],import:(()=>K(()=>import(`./_DXaWF80G2.js`),__vite__mapDeps([51,2,3,1,11])))},{id:`glimmer-ts`,name:`Glimmer TS`,aliases:[`gts`],import:(()=>K(()=>import(`./_UPKxbAis2.js`),__vite__mapDeps([52,2,3,1,11])))},{id:`glsl`,name:`GLSL`,import:(()=>K(()=>import(`./_iGURufnd.js`).then(e=>e.n),__vite__mapDeps([27,22])))},{id:`gn`,name:`GN`,import:(()=>K(()=>import(`./_ilITqXS62.js`),[]))},{id:`gnuplot`,name:`Gnuplot`,import:(()=>K(()=>import(`./_7GGW24-e2.js`),[]))},{id:`go`,name:`Go`,import:(()=>K(()=>import(`./_rLFTqkRN2.js`),[]))},{id:`graphql`,name:`GraphQL`,aliases:[`gql`],import:(()=>K(()=>import(`./_uw9JGYrH.js`).then(e=>e.n),__vite__mapDeps([36,2,11,13,37])))},{id:`groovy`,name:`Groovy`,import:(()=>K(()=>import(`./_CacY0gHj2.js`),[]))},{id:`hack`,name:`Hack`,import:(()=>K(()=>import(`./_f7tCreYA2.js`),__vite__mapDeps([53,1,2,3,16])))},{id:`haml`,name:`Ruby Haml`,import:(()=>K(()=>import(`./_tpLKr6cN.js`).then(e=>e.n),__vite__mapDeps([35,2,3])))},{id:`handlebars`,name:`Handlebars`,aliases:[`hbs`],import:(()=>K(()=>import(`./_CEIEA3ep2.js`),__vite__mapDeps([54,2,3,1,39])))},{id:`haskell`,name:`Haskell`,aliases:[`hs`],import:(()=>K(()=>import(`./_D8IpX4py2.js`),[]))},{id:`haxe`,name:`Haxe`,import:(()=>K(()=>import(`./_C8oCnwJJ2.js`),[]))},{id:`hcl`,name:`HashiCorp HCL`,import:(()=>K(()=>import(`./_Dh228itO2.js`),[]))},{id:`hjson`,name:`Hjson`,import:(()=>K(()=>import(`./_CxZEssPk2.js`),[]))},{id:`hlsl`,name:`HLSL`,import:(()=>K(()=>import(`./_Cvrh5tZx2.js`),[]))},{id:`html`,name:`HTML`,import:(()=>K(()=>import(`./_CpKSyXc-.js`).then(e=>e.n),__vite__mapDeps([1,2,3])))},{id:`html-derivative`,name:`HTML (Derivative)`,import:(()=>K(()=>import(`./_l3il9fbj2.js`),__vite__mapDeps([15,1,2,3])))},{id:`http`,name:`HTTP`,import:(()=>K(()=>import(`./_BKl_tugb2.js`),__vite__mapDeps([55,7,8,9,29,36,2,11,13,37])))},{id:`hurl`,name:`Hurl`,import:(()=>K(()=>import(`./_BwcmCe3s2.js`),__vite__mapDeps([56,7,8,57,36,2,11,13,37])))},{id:`hxml`,name:`HXML`,import:(()=>K(()=>import(`./_DLbMbJfH2.js`),__vite__mapDeps([58,59])))},{id:`hy`,name:`Hy`,import:(()=>K(()=>import(`./_CZbG8q4J2.js`),[]))},{id:`imba`,name:`Imba`,import:(()=>K(()=>import(`./_DsUTQ-LC2.js`),[]))},{id:`ini`,name:`INI`,aliases:[`properties`],import:(()=>K(()=>import(`./_B5eOa1yu.js`),[]))},{id:`java`,name:`Java`,import:(()=>K(()=>import(`./_X-KO8p5S.js`).then(e=>e.n),[]))},{id:`javascript`,name:`JavaScript`,aliases:[`js`,`cjs`,`mjs`],import:(()=>K(()=>import(`./_C0Mb2VcL.js`).then(e=>e.n),[]))},{id:`jinja`,name:`Jinja`,import:(()=>K(()=>import(`./_DM9HoTb6.js`),__vite__mapDeps([60,1,2,3])))},{id:`jison`,name:`Jison`,import:(()=>K(()=>import(`./_pLH8IrZs.js`),__vite__mapDeps([61,2])))},{id:`json`,name:`JSON`,import:(()=>K(()=>import(`./_neTzmpuG.js`).then(e=>e.n),[]))},{id:`json5`,name:`JSON5`,import:(()=>K(()=>import(`./_BR5RXkoi.js`),[]))},{id:`jsonc`,name:`JSON with Comments`,import:(()=>K(()=>import(`./_CYpm1nAK.js`),[]))},{id:`jsonl`,name:`JSON Lines`,import:(()=>K(()=>import(`./_CmCQp5Yx.js`),[]))},{id:`jsonnet`,name:`Jsonnet`,import:(()=>K(()=>import(`./_CJTPZ8u_.js`),[]))},{id:`jssm`,name:`JSSM`,aliases:[`fsl`],import:(()=>K(()=>import(`./_DXw9l8Rf.js`),[]))},{id:`jsx`,name:`JSX`,import:(()=>K(()=>import(`./_DvHrD9Fu.js`).then(e=>e.n),[]))},{id:`julia`,name:`Julia`,aliases:[`jl`],import:(()=>K(()=>import(`./_BNAm8vGo.js`),__vite__mapDeps([62,2,16,20,25,26,27,22,63])))},{id:`just`,name:`Just`,aliases:[`justfile`],import:(()=>K(()=>import(`./_DDkTpbnp.js`),__vite__mapDeps([64,2,11,20,29,34,3,1,7,8,16,22,25,26,27,35,36,13,37,38,39,65])))},{id:`kdl`,name:`KDL`,import:(()=>K(()=>import(`./_CsD5j6eV.js`),[]))},{id:`kotlin`,name:`Kotlin`,aliases:[`kt`,`kts`],import:(()=>K(()=>import(`./_DhhofPvG.js`),[]))},{id:`kusto`,name:`Kusto`,aliases:[`kql`],import:(()=>K(()=>import(`./_C7mF5XQf.js`),[]))},{id:`latex`,name:`LaTeX`,import:(()=>K(()=>import(`./_DMsB9L9v.js`),__vite__mapDeps([66,67,63])))},{id:`lean`,name:`Lean 4`,aliases:[`lean4`],import:(()=>K(()=>import(`./_CewbzKMR.js`),[]))},{id:`less`,name:`Less`,import:(()=>K(()=>import(`./_DVTAwKKz.js`),[]))},{id:`liquid`,name:`Liquid`,import:(()=>K(()=>import(`./_BxtE0n7j.js`),__vite__mapDeps([68,2,3,1,9])))},{id:`llvm`,name:`LLVM IR`,import:(()=>K(()=>import(`./_DqHOMS-s.js`),[]))},{id:`log`,name:`Log file`,import:(()=>K(()=>import(`./_BNLmms1o.js`),[]))},{id:`logo`,name:`Logo`,import:(()=>K(()=>import(`./_Cluzi2Zq.js`),[]))},{id:`lua`,name:`Lua`,import:(()=>K(()=>import(`./_0vMHm-vn.js`).then(e=>e.n),__vite__mapDeps([38,22])))},{id:`luau`,name:`Luau`,import:(()=>K(()=>import(`./_C2pBCSgt.js`),[]))},{id:`make`,name:`Makefile`,aliases:[`makefile`],import:(()=>K(()=>import(`./_Dixweg8N.js`),[]))},{id:`markdown`,name:`Markdown`,aliases:[`md`],import:(()=>K(()=>import(`./_BYOwaDjH.js`),[]))},{id:`marko`,name:`Marko`,import:(()=>K(()=>import(`./_DPCPAr2n.js`),__vite__mapDeps([69,3,5,11,70])))},{id:`matlab`,name:`MATLAB`,import:(()=>K(()=>import(`./_D7qyCx1q.js`),[]))},{id:`mdc`,name:`MDC`,import:(()=>K(()=>import(`./_CryOUQWa.js`),__vite__mapDeps([71,15,1,2,3,39,41])))},{id:`mdx`,name:`MDX`,import:(()=>K(()=>import(`./_DQZ5AkYe.js`),[]))},{id:`mermaid`,name:`Mermaid`,aliases:[`mmd`],import:(()=>K(()=>import(`./_BxpfTIzt.js`),[]))},{id:`mipsasm`,name:`MIPS Assembly`,aliases:[`mips`],import:(()=>K(()=>import(`./_BMqwQI7S.js`),[]))},{id:`mojo`,name:`Mojo`,import:(()=>K(()=>import(`./_CFuIV2fl.js`),[]))},{id:`moonbit`,name:`MoonBit`,aliases:[`mbt`,`mbti`],import:(()=>K(()=>import(`./_DgjMoLWr.js`),[]))},{id:`move`,name:`Move`,import:(()=>K(()=>import(`./_BYnGhZoM.js`),[]))},{id:`narrat`,name:`Narrat Language`,aliases:[`nar`],import:(()=>K(()=>import(`./__X_XdTYD.js`),[]))},{id:`nextflow`,name:`Nextflow`,aliases:[`nf`],import:(()=>K(()=>import(`./_DWQbgPoS.js`),__vite__mapDeps([72,73])))},{id:`nextflow-groovy`,name:`Nextflow Groovy`,import:(()=>K(()=>import(`./_DJMQeKeT.js`),[]))},{id:`nginx`,name:`Nginx`,import:(()=>K(()=>import(`./_BDH5DRhl.js`),__vite__mapDeps([74,38,22])))},{id:`nim`,name:`Nim`,import:(()=>K(()=>import(`./_CYYkpc6O2.js`),__vite__mapDeps([75,2,3,1,7,8,22,27,41])))},{id:`nix`,name:`Nix`,import:(()=>K(()=>import(`./_IvuFDN5E2.js`),[]))},{id:`nsis`,name:`NSIS`,import:(()=>K(()=>import(`./_CjNLYCLg2.js`),[]))},{id:`nushell`,name:`nushell`,aliases:[`nu`],import:(()=>K(()=>import(`./_DHYfO66s2.js`),[]))},{id:`objective-c`,name:`Objective-C`,aliases:[`objc`],import:(()=>K(()=>import(`./_D1A_Heim2.js`),[]))},{id:`objective-cpp`,name:`Objective-C++`,import:(()=>K(()=>import(`./_BsSzOQcm2.js`),[]))},{id:`ocaml`,name:`OCaml`,import:(()=>K(()=>import(`./_O90oeIOV2.js`),[]))},{id:`odin`,name:`Odin`,import:(()=>K(()=>import(`./_B1RWQWA52.js`),[]))},{id:`openscad`,name:`OpenSCAD`,aliases:[`scad`],import:(()=>K(()=>import(`./_BUDT5pXO2.js`),[]))},{id:`org`,name:`Org Markup`,import:(()=>K(()=>import(`./_BBMJRHpW2.js`),__vite__mapDeps([76,2,3,1,5,8,7,9,11,13,16,22,20,77,24,26,25,27,29,78,79,49,80,31,38,39,34,35,36,37,41,40,48,50,81,82,83,63,65,66,67,70,84,75,85,86,87,88,89,90,91,92,93])))},{id:`pascal`,name:`Pascal`,import:(()=>K(()=>import(`./_4ZHwLPI52.js`),[]))},{id:`perl`,name:`Perl`,import:(()=>K(()=>import(`./_BdquJqIK.js`),__vite__mapDeps([65,2,3,1,7,8,16])))},{id:`php`,name:`PHP`,import:(()=>K(()=>import(`./_nqYjkgOI2.js`),__vite__mapDeps([87,2,3,1,7,8,9,16])))},{id:`pkl`,name:`Pkl`,import:(()=>K(()=>import(`./_ot-7Btpt2.js`),[]))},{id:`plsql`,name:`PL/SQL`,import:(()=>K(()=>import(`./_DGHpHOYJ2.js`),[]))},{id:`po`,name:`Gettext PO`,aliases:[`pot`,`potx`],import:(()=>K(()=>import(`./_BiJDBrnU2.js`),[]))},{id:`polar`,name:`Polar`,import:(()=>K(()=>import(`./_C7UOKdEL2.js`),[]))},{id:`postcss`,name:`PostCSS`,import:(()=>K(()=>import(`./_BXeXVLqQ.js`),[]))},{id:`powerquery`,name:`PowerQuery`,import:(()=>K(()=>import(`./_DNMTfnFr2.js`),[]))},{id:`powershell`,name:`PowerShell`,aliases:[`ps`,`ps1`,`pwsh`],import:(()=>K(()=>import(`./_CCSX75yM2.js`),[]))},{id:`prisma`,name:`Prisma`,import:(()=>K(()=>import(`./_DMgNhnYS2.js`),[]))},{id:`prolog`,name:`Prolog`,import:(()=>K(()=>import(`./_iXnhIJG72.js`),[]))},{id:`proto`,name:`Protocol Buffer 3`,aliases:[`protobuf`],import:(()=>K(()=>import(`./_DB4EqR-F.js`),[]))},{id:`pug`,name:`Pug`,aliases:[`jade`],import:(()=>K(()=>import(`./_BIa4GhFA.js`),__vite__mapDeps([94,2,3,1])))},{id:`puppet`,name:`Puppet`,import:(()=>K(()=>import(`./_CDv2pdJW.js`),[]))},{id:`purescript`,name:`PureScript`,import:(()=>K(()=>import(`./_9MfHhQsQ.js`),[]))},{id:`python`,name:`Python`,aliases:[`py`],import:(()=>K(()=>import(`./_gzcpVVnB2.js`),[]))},{id:`qml`,name:`QML`,import:(()=>K(()=>import(`./_hISQM_VO.js`),__vite__mapDeps([95,2])))},{id:`qmldir`,name:`QML Directory`,import:(()=>K(()=>import(`./_DCQb3MpD.js`),[]))},{id:`qss`,name:`Qt Style Sheets`,import:(()=>K(()=>import(`./_Fe1Jh2GI.js`),[]))},{id:`r`,name:`R`,import:(()=>K(()=>import(`./_BUJEC41U.js`).then(e=>e.n),[]))},{id:`racket`,name:`Racket`,import:(()=>K(()=>import(`./_DcIDlBhZ.js`),[]))},{id:`raku`,name:`Raku`,aliases:[`perl6`],import:(()=>K(()=>import(`./_B3gFvitq2.js`),[]))},{id:`razor`,name:`ASP.NET Razor`,import:(()=>K(()=>import(`./_EbANNtLE.js`),__vite__mapDeps([96,1,2,3,78])))},{id:`rbs`,name:`RBS`,aliases:[`ruby-signature`],import:(()=>K(()=>import(`./_C0MpOrj4.js`),[]))},{id:`reg`,name:`Windows Registry Script`,import:(()=>K(()=>import(`./_CRGYupPL.js`),[]))},{id:`regexp`,name:`RegExp`,aliases:[`regex`],import:(()=>K(()=>import(`./_BOk-H2vI.js`).then(e=>e.n),[]))},{id:`rel`,name:`Rel`,import:(()=>K(()=>import(`./_BtDbiS_P.js`),[]))},{id:`riscv`,name:`RISC-V`,import:(()=>K(()=>import(`./_Ckw8ddFX.js`),[]))},{id:`ron`,name:`RON`,import:(()=>K(()=>import(`./_VUp2lXgN.js`),[]))},{id:`rosmsg`,name:`ROS Interface`,import:(()=>K(()=>import(`./_CAekHB0j.js`),[]))},{id:`rst`,name:`reStructuredText`,import:(()=>K(()=>import(`./_BZXlp_i6.js`),__vite__mapDeps([97,2,15,1,3,20,98,25,26,27,22,29,39,34,7,8,16,35,36,11,13,37,38])))},{id:`ruby`,name:`Ruby`,aliases:[`rb`],import:(()=>K(()=>import(`./_Dg6disZS.js`),__vite__mapDeps([34,2,3,1,7,8,16,22,25,26,27,29,35,36,11,13,37,38,39])))},{id:`rust`,name:`Rust`,aliases:[`rs`],import:(()=>K(()=>import(`./_Cfkwpbl82.js`),[]))},{id:`sas`,name:`SAS`,import:(()=>K(()=>import(`./_W6bV3Bg-.js`),__vite__mapDeps([99,16])))},{id:`sass`,name:`Sass`,import:(()=>K(()=>import(`./_DXrisJhu.js`),[]))},{id:`scala`,name:`Scala`,import:(()=>K(()=>import(`./_BiFt_7mu2.js`),[]))},{id:`scheme`,name:`Scheme`,import:(()=>K(()=>import(`./_DQCgrYNe.js`),[]))},{id:`scss`,name:`SCSS`,import:(()=>K(()=>import(`./_D68sBB9M.js`).then(e=>e.n),__vite__mapDeps([5,3])))},{id:`sdbl`,name:`1C (Query)`,aliases:[`1c-query`],import:(()=>K(()=>import(`./_bTVj8UrX2.js`),[]))},{id:`shaderlab`,name:`ShaderLab`,aliases:[`shader`],import:(()=>K(()=>import(`./_BM315xPC.js`),__vite__mapDeps([100,101])))},{id:`shellscript`,name:`Shell`,aliases:[`bash`,`sh`,`shell`,`zsh`],import:(()=>K(()=>import(`./_BVd4uTiE.js`).then(e=>e.n),[]))},{id:`shellsession`,name:`Shell Session`,aliases:[`console`],import:(()=>K(()=>import(`./_R8c16EMU.js`),__vite__mapDeps([102,29])))},{id:`smalltalk`,name:`GNU Smalltalk`,import:(()=>K(()=>import(`./_BHpQb5nM.js`),[]))},{id:`smithy`,name:`Smithy`,import:(()=>K(()=>import(`./_Dgaz7aur.js`),[]))},{id:`solidity`,name:`Solidity`,import:(()=>K(()=>import(`./_Bj7E1mRn.js`),[]))},{id:`soy`,name:`Closure Templates`,aliases:[`closure-templates`],import:(()=>K(()=>import(`./_BETbcidE.js`),__vite__mapDeps([103,1,2,3])))},{id:`sparql`,name:`SPARQL`,import:(()=>K(()=>import(`./_L8AbGenz.js`),__vite__mapDeps([104,105])))},{id:`splunk`,name:`Splunk Query Language`,aliases:[`spl`],import:(()=>K(()=>import(`./_BC2Px7Mm.js`),[]))},{id:`sql`,name:`SQL`,import:(()=>K(()=>import(`./_iBei63n02.js`).then(e=>e.n),[]))},{id:`ssh-config`,name:`SSH Config`,import:(()=>K(()=>import(`./_BgfXC-Er.js`),[]))},{id:`stata`,name:`Stata`,import:(()=>K(()=>import(`./_BuDEoDsw.js`),__vite__mapDeps([106,16])))},{id:`stylus`,name:`Stylus`,aliases:[`styl`],import:(()=>K(()=>import(`./_B6D30XZt.js`),[]))},{id:`surrealql`,name:`SurrealQL`,aliases:[`surql`],import:(()=>K(()=>import(`./_8A9cS7sg.js`),__vite__mapDeps([107,2])))},{id:`svelte`,name:`Svelte`,import:(()=>K(()=>import(`./_B9Irhi-K.js`),__vite__mapDeps([108,2,3,11,12])))},{id:`swift`,name:`Swift`,import:(()=>K(()=>import(`./_CyEgAFGc.js`),[]))},{id:`system-verilog`,name:`SystemVerilog`,import:(()=>K(()=>import(`./_Dh5ihWbf.js`),[]))},{id:`systemd`,name:`Systemd Units`,import:(()=>K(()=>import(`./_BxMlprV5.js`),[]))},{id:`talonscript`,name:`TalonScript`,aliases:[`talon`],import:(()=>K(()=>import(`./_CohzipZa.js`),[]))},{id:`tasl`,name:`Tasl`,import:(()=>K(()=>import(`./_DMoTqEGO.js`),[]))},{id:`tcl`,name:`Tcl`,import:(()=>K(()=>import(`./_CZd0xW_V2.js`),[]))},{id:`templ`,name:`Templ`,import:(()=>K(()=>import(`./_Ca-yxP452.js`),__vite__mapDeps([109,2,3,81])))},{id:`terraform`,name:`Terraform`,aliases:[`tf`,`tfvars`],import:(()=>K(()=>import(`./_DswuEJGm2.js`),[]))},{id:`tex`,name:`TeX`,import:(()=>K(()=>import(`./_BFlxNucX.js`).then(e=>e.n),__vite__mapDeps([67,63])))},{id:`toml`,name:`TOML`,import:(()=>K(()=>import(`./_CcmNWLt02.js`),[]))},{id:`ts-tags`,name:`TypeScript with Tags`,aliases:[`lit`],import:(()=>K(()=>import(`./_Cl4Juxka2.js`),__vite__mapDeps([110,2,3,1,7,8,11,16,27,22])))},{id:`tsv`,name:`TSV`,import:(()=>K(()=>import(`./_sltzmVWM2.js`),[]))},{id:`tsx`,name:`TSX`,import:(()=>K(()=>import(`./_CvFGNDic.js`).then(e=>e.n),[]))},{id:`turtle`,name:`Turtle`,import:(()=>K(()=>import(`./_ByJddavk.js`),[]))},{id:`twig`,name:`Twig`,import:(()=>K(()=>import(`./_RnK9hNYz2.js`),__vite__mapDeps([111,2,3,5,20,34,1,7,8,16,22,25,26,27,29,35,36,11,13,37,38,39,87,9])))},{id:`typescript`,name:`TypeScript`,aliases:[`ts`,`cts`,`mts`],import:(()=>K(()=>import(`./_DZDs2rZG.js`).then(e=>e.n),[]))},{id:`typespec`,name:`TypeSpec`,aliases:[`tsp`],import:(()=>K(()=>import(`./_BRdr0IET2.js`),[]))},{id:`typst`,name:`Typst`,aliases:[`typ`],import:(()=>K(()=>import(`./_DI99ib-x2.js`),[]))},{id:`v`,name:`V`,import:(()=>K(()=>import(`./_DBj4K9d_2.js`),[]))},{id:`vala`,name:`Vala`,import:(()=>K(()=>import(`./_zf12oZj62.js`),[]))},{id:`vb`,name:`Visual Basic`,import:(()=>K(()=>import(`./_DOwzaHZ02.js`),[]))},{id:`verilog`,name:`Verilog`,import:(()=>K(()=>import(`./_B2gwz-sJ2.js`),[]))},{id:`vhdl`,name:`VHDL`,import:(()=>K(()=>import(`./_BroJfC0k2.js`),[]))},{id:`viml`,name:`Vim Script`,aliases:[`vim`,`vimscript`],import:(()=>K(()=>import(`./_DvXPmvsu2.js`),[]))},{id:`vue`,name:`Vue`,import:(()=>K(()=>import(`./_ZKXMh2Tt2.js`),__vite__mapDeps([112,2,3,1,9,11,15])))},{id:`vue-html`,name:`Vue HTML`,import:(()=>K(()=>import(`./_3kCHjcbq2.js`),__vite__mapDeps([113,2])))},{id:`vue-vine`,name:`Vue Vine`,import:(()=>K(()=>import(`./_DSVLtY7p2.js`),__vite__mapDeps([114,2,3,5,12,70,115])))},{id:`vyper`,name:`Vyper`,aliases:[`vy`],import:(()=>K(()=>import(`./_CgoNMtux2.js`),[]))},{id:`wasm`,name:`WebAssembly`,import:(()=>K(()=>import(`./_ByWQv1Qj2.js`),[]))},{id:`wenyan`,name:`Wenyan`,aliases:[`文言`],import:(()=>K(()=>import(`./_C8pVoKbM2.js`),[]))},{id:`wgsl`,name:`WGSL`,import:(()=>K(()=>import(`./_BsKzXJz42.js`),[]))},{id:`wikitext`,name:`Wikitext`,aliases:[`mediawiki`,`wiki`],import:(()=>K(()=>import(`./_ClFFjSW22.js`),[]))},{id:`wit`,name:`WebAssembly Interface Types`,import:(()=>K(()=>import(`./_DdvCle-K2.js`),[]))},{id:`wolfram`,name:`Wolfram`,aliases:[`wl`],import:(()=>K(()=>import(`./_DLL8P-h_2.js`),[]))},{id:`xml`,name:`XML`,import:(()=>K(()=>import(`./_DbjjwNMJ.js`).then(e=>e.n),__vite__mapDeps([7,8])))},{id:`xsl`,name:`XSL`,import:(()=>K(()=>import(`./_Di-YLGzT2.js`),__vite__mapDeps([93,7,8])))},{id:`yaml`,name:`YAML`,aliases:[`yml`],import:(()=>K(()=>import(`./_Fj4bovY5.js`).then(e=>e.n),[]))},{id:`zenscript`,name:`ZenScript`,import:(()=>K(()=>import(`./_BnlCZFoB2.js`),[]))},{id:`zig`,name:`Zig`,import:(()=>K(()=>import(`./_CMLA9XwU2.js`),[]))}],Mw=Object.fromEntries(jw.map(e=>[e.id,e.import])),Nw=Object.fromEntries(jw.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),Pw={...Mw,...Nw},Fw=Object.fromEntries([{id:`andromeeda`,displayName:`Andromeeda`,type:`dark`,import:(()=>K(()=>import(`./_vGVdxbeo2.js`),[]))},{id:`aurora-x`,displayName:`Aurora X`,type:`dark`,import:(()=>K(()=>import(`./_CDeNXAV0.js`),[]))},{id:`ayu-dark`,displayName:`Ayu Dark`,type:`dark`,import:(()=>K(()=>import(`./_DluEY0Gj.js`),[]))},{id:`ayu-light`,displayName:`Ayu Light`,type:`light`,import:(()=>K(()=>import(`./_C3h-C4tm.js`),[]))},{id:`ayu-mirage`,displayName:`Ayu Mirage`,type:`dark`,import:(()=>K(()=>import(`./_Bqwy1Gya.js`),[]))},{id:`catppuccin-frappe`,displayName:`Catppuccin Frappé`,type:`dark`,import:(()=>K(()=>import(`./_C9Q5zVZY.js`),[]))},{id:`catppuccin-latte`,displayName:`Catppuccin Latte`,type:`light`,import:(()=>K(()=>import(`./_CtsyrtPq.js`),[]))},{id:`catppuccin-macchiato`,displayName:`Catppuccin Macchiato`,type:`dark`,import:(()=>K(()=>import(`./_R8nAf1vR.js`),[]))},{id:`catppuccin-mocha`,displayName:`Catppuccin Mocha`,type:`dark`,import:(()=>K(()=>import(`./_DjuaAJKi.js`),[]))},{id:`dark-plus`,displayName:`Dark Plus`,type:`dark`,import:(()=>K(()=>import(`./_Cs2F2srj.js`),[]))},{id:`dracula`,displayName:`Dracula Theme`,type:`dark`,import:(()=>K(()=>import(`./_BHWKrbxM.js`),[]))},{id:`dracula-soft`,displayName:`Dracula Theme Soft`,type:`dark`,import:(()=>K(()=>import(`./_5eyTD99u.js`),[]))},{id:`everforest-dark`,displayName:`Everforest Dark`,type:`dark`,import:(()=>K(()=>import(`./_sB-x3p7T.js`),[]))},{id:`everforest-light`,displayName:`Everforest Light`,type:`light`,import:(()=>K(()=>import(`./_Df2xbC6M.js`),[]))},{id:`github-dark`,displayName:`GitHub Dark`,type:`dark`,import:(()=>K(()=>import(`./_C-LZuMrd.js`),[]))},{id:`github-dark-default`,displayName:`GitHub Dark Default`,type:`dark`,import:(()=>K(()=>import(`./_DXG-b-1a.js`),[]))},{id:`github-dark-dimmed`,displayName:`GitHub Dark Dimmed`,type:`dark`,import:(()=>K(()=>import(`./_Bx1FflLF.js`),[]))},{id:`github-dark-high-contrast`,displayName:`GitHub Dark High Contrast`,type:`dark`,import:(()=>K(()=>import(`./_B_tTalzw.js`),[]))},{id:`github-light`,displayName:`GitHub Light`,type:`light`,import:(()=>K(()=>import(`./_EUqPIrTm.js`),[]))},{id:`github-light-default`,displayName:`GitHub Light Default`,type:`light`,import:(()=>K(()=>import(`./_BXViO-2h.js`),[]))},{id:`github-light-high-contrast`,displayName:`GitHub Light High Contrast`,type:`light`,import:(()=>K(()=>import(`./_B68TUdTA.js`),[]))},{id:`gruvbox-dark-hard`,displayName:`Gruvbox Dark Hard`,type:`dark`,import:(()=>K(()=>import(`./_C820rvS2.js`),[]))},{id:`gruvbox-dark-medium`,displayName:`Gruvbox Dark Medium`,type:`dark`,import:(()=>K(()=>import(`./_BPjhmG05.js`),[]))},{id:`gruvbox-dark-soft`,displayName:`Gruvbox Dark Soft`,type:`dark`,import:(()=>K(()=>import(`./_MrdJrrXF.js`),[]))},{id:`gruvbox-light-hard`,displayName:`Gruvbox Light Hard`,type:`light`,import:(()=>K(()=>import(`./_BC_s9l72.js`),[]))},{id:`gruvbox-light-medium`,displayName:`Gruvbox Light Medium`,type:`light`,import:(()=>K(()=>import(`./_BAWPOn9u.js`),[]))},{id:`gruvbox-light-soft`,displayName:`Gruvbox Light Soft`,type:`light`,import:(()=>K(()=>import(`./_BSMLrYjP.js`),[]))},{id:`horizon`,displayName:`Horizon`,type:`dark`,import:(()=>K(()=>import(`./_CE9ld1lL.js`),[]))},{id:`horizon-bright`,displayName:`Horizon Bright`,type:`light`,import:(()=>K(()=>import(`./_DSNQnXHK.js`),[]))},{id:`houston`,displayName:`Houston`,type:`dark`,import:(()=>K(()=>import(`./_CsvMBhTu.js`),[]))},{id:`kanagawa-dragon`,displayName:`Kanagawa Dragon`,type:`dark`,import:(()=>K(()=>import(`./_Bozd7klA.js`),[]))},{id:`kanagawa-lotus`,displayName:`Kanagawa Lotus`,type:`light`,import:(()=>K(()=>import(`./_BmuOG9ZW.js`),[]))},{id:`kanagawa-wave`,displayName:`Kanagawa Wave`,type:`dark`,import:(()=>K(()=>import(`./_BML5mF2J.js`),[]))},{id:`laserwave`,displayName:`LaserWave`,type:`dark`,import:(()=>K(()=>import(`./_C_8bwKvT.js`),[]))},{id:`light-plus`,displayName:`Light Plus`,type:`light`,import:(()=>K(()=>import(`./_DVQuIRkW.js`),[]))},{id:`material-theme`,displayName:`Material Theme`,type:`dark`,import:(()=>K(()=>import(`./_Bm3Qr25_2.js`),[]))},{id:`material-theme-darker`,displayName:`Material Theme Darker`,type:`dark`,import:(()=>K(()=>import(`./_2IIEA8gg.js`),[]))},{id:`material-theme-lighter`,displayName:`Material Theme Lighter`,type:`light`,import:(()=>K(()=>import(`./_uhdI0v04.js`),[]))},{id:`material-theme-ocean`,displayName:`Material Theme Ocean`,type:`dark`,import:(()=>K(()=>import(`./_CHQ94UKr.js`),[]))},{id:`material-theme-palenight`,displayName:`Material Theme Palenight`,type:`dark`,import:(()=>K(()=>import(`./_B5W6OYN7.js`),[]))},{id:`min-dark`,displayName:`Min Dark`,type:`dark`,import:(()=>K(()=>import(`./_BSWPekZh2.js`),[]))},{id:`min-light`,displayName:`Min Light`,type:`light`,import:(()=>K(()=>import(`./_DDpmG2fV2.js`),[]))},{id:`monokai`,displayName:`Monokai`,type:`dark`,import:(()=>K(()=>import(`./_B_bV9PQ92.js`),[]))},{id:`night-owl`,displayName:`Night Owl`,type:`dark`,import:(()=>K(()=>import(`./_DhmEMT882.js`),[]))},{id:`night-owl-light`,displayName:`Night Owl Light`,type:`light`,import:(()=>K(()=>import(`./_eJ-hLW7d2.js`),[]))},{id:`nord`,displayName:`Nord`,type:`dark`,import:(()=>K(()=>import(`./_Cb4Vim4T2.js`),[]))},{id:`one-dark-pro`,displayName:`One Dark Pro`,type:`dark`,import:(()=>K(()=>import(`./_CLwyXe_n2.js`),[]))},{id:`one-light`,displayName:`One Light`,type:`light`,import:(()=>K(()=>import(`./_D7Lr4KcI2.js`),[]))},{id:`plastic`,displayName:`Plastic`,type:`dark`,import:(()=>K(()=>import(`./_DQwYfKfQ2.js`),[]))},{id:`poimandres`,displayName:`Poimandres`,type:`dark`,import:(()=>K(()=>import(`./_DRFjx7u42.js`),[]))},{id:`red`,displayName:`Red`,type:`dark`,import:(()=>K(()=>import(`./_DX1BQOs82.js`),[]))},{id:`rose-pine`,displayName:`Rosé Pine`,type:`dark`,import:(()=>K(()=>import(`./_aMsaMD1D2.js`),[]))},{id:`rose-pine-dawn`,displayName:`Rosé Pine Dawn`,type:`light`,import:(()=>K(()=>import(`./_8PwUyIlP2.js`),[]))},{id:`rose-pine-moon`,displayName:`Rosé Pine Moon`,type:`dark`,import:(()=>K(()=>import(`./_DO-qXg-I2.js`),[]))},{id:`slack-dark`,displayName:`Slack Dark`,type:`dark`,import:(()=>K(()=>import(`./_DnToyrRv2.js`),[]))},{id:`slack-ochin`,displayName:`Slack Ochin`,type:`light`,import:(()=>K(()=>import(`./_B2OO5cIa2.js`),[]))},{id:`snazzy-light`,displayName:`Snazzy Light`,type:`light`,import:(()=>K(()=>import(`./_4G7pJPwS2.js`),[]))},{id:`solarized-dark`,displayName:`Solarized Dark`,type:`dark`,import:(()=>K(()=>import(`./_UdsmMDCL2.js`),[]))},{id:`solarized-light`,displayName:`Solarized Light`,type:`light`,import:(()=>K(()=>import(`./_C1IUL_tW2.js`),[]))},{id:`synthwave-84`,displayName:`Synthwave '84`,type:`dark`,import:(()=>K(()=>import(`./_nFMaYfgc2.js`),[]))},{id:`tokyo-night`,displayName:`Tokyo Night`,type:`dark`,import:(()=>K(()=>import(`./_oM2G3aXe2.js`),[]))},{id:`vesper`,displayName:`Vesper`,type:`dark`,import:(()=>K(()=>import(`./_DdrHHSXu2.js`),[]))},{id:`vitesse-black`,displayName:`Vitesse Black`,type:`dark`,import:(()=>K(()=>import(`./_fwtXNY1n2.js`),[]))},{id:`vitesse-dark`,displayName:`Vitesse Dark`,type:`dark`,import:(()=>K(()=>import(`./_BZCL-v6S2.js`),[]))},{id:`vitesse-light`,displayName:`Vitesse Light`,type:`light`,import:(()=>K(()=>import(`./_VbXTXTou2.js`),[]))}].map(e=>[e.id,e.import])),Iw=t({createOnigurumaEngine:()=>uT,getDefaultWasmLoader:()=>lT,loadWasm:()=>rT,setDefaultWasmLoader:()=>cT}),Lw=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function Rw(){return 2147483648}function zw(){return typeof performance<`u`?performance.now():Date.now()}var Bw=(e,t)=>e+(t-e%t)%t;async function Vw(e){let t,n,r={};function i(e){n=e,r.HEAPU8=new Uint8Array(e),r.HEAPU32=new Uint32Array(e)}function a(e,t,n){r.HEAPU8.copyWithin(e,t,t+n)}function o(e){try{return t.grow(e-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}function s(e){let t=r.HEAPU8.length;e>>>=0;let n=Rw();if(e>n)return!1;for(let r=1;r<=4;r*=2){let i=t*(1+.2/r);if(i=Math.min(i,e+100663296),o(Math.min(n,Bw(Math.max(e,i),65536))))return!0}return!1}let c=typeof TextDecoder<`u`?new TextDecoder(`utf8`):void 0;function l(e,t,n=1024){let r=t+n,i=t;for(;e[i]&&!(i>=r);)++i;if(i-t>16&&e.buffer&&c)return c.decode(e.subarray(t,i));let a=``;for(;t<i;){let n=e[t++];if(!(n&128)){a+=String.fromCharCode(n);continue}let r=e[t++]&63;if((n&224)==192){a+=String.fromCharCode((n&31)<<6|r);continue}let i=e[t++]&63;if(n=(n&240)==224?(n&15)<<12|r<<6|i:(n&7)<<18|r<<12|i<<6|e[t++]&63,n<65536)a+=String.fromCharCode(n);else{let e=n-65536;a+=String.fromCharCode(55296|e>>10,56320|e&1023)}}return a}function u(e,t){return e?l(r.HEAPU8,e,t):``}let d={emscripten_get_now:zw,emscripten_memcpy_big:a,emscripten_resize_heap:s,fd_write:()=>0};async function f(){let n=await e({env:d,wasi_snapshot_preview1:d});t=n.memory,i(t.buffer),Object.assign(r,n),r.UTF8ToString=u}return await f(),r}var Hw=Object.defineProperty,Uw=(e,t,n)=>t in e?Hw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ww=(e,t,n)=>Uw(e,typeof t==`symbol`?t:t+``,n),Gw=null;function Kw(e){throw new Lw(e.UTF8ToString(e.getLastOnigError()))}var qw=class e{constructor(t){Ww(this,`utf16Length`),Ww(this,`utf8Length`),Ww(this,`utf16Value`),Ww(this,`utf8Value`),Ww(this,`utf16OffsetToUtf8`),Ww(this,`utf8OffsetToUtf16`);let n=t.length,r=e._utf8ByteLength(t),i=r!==n,a=i?new Uint32Array(n+1):null;i&&(a[n]=r);let o=i?new Uint32Array(r+1):null;i&&(o[r]=n);let s=new Uint8Array(r),c=0;for(let e=0;e<n;e++){let r=t.charCodeAt(e),l=r,u=!1;if(r>=55296&&r<=56319&&e+1<n){let n=t.charCodeAt(e+1);n>=56320&&n<=57343&&(l=(r-55296<<10)+65536|n-56320,u=!0)}i&&(a[e]=c,u&&(a[e+1]=c),l<=127?o[c+0]=e:l<=2047?(o[c+0]=e,o[c+1]=e):l<=65535?(o[c+0]=e,o[c+1]=e,o[c+2]=e):(o[c+0]=e,o[c+1]=e,o[c+2]=e,o[c+3]=e)),l<=127?s[c++]=l:l<=2047?(s[c++]=192|(l&1984)>>>6,s[c++]=128|(l&63)>>>0):l<=65535?(s[c++]=224|(l&61440)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0):(s[c++]=240|(l&1835008)>>>18,s[c++]=128|(l&258048)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0),u&&e++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=s,this.utf16OffsetToUtf8=a,this.utf8OffsetToUtf16=o}static _utf8ByteLength(e){let t=0;for(let n=0,r=e.length;n<r;n++){let i=e.charCodeAt(n),a=i,o=!1;if(i>=55296&&i<=56319&&n+1<r){let t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(a=(i-55296<<10)+65536|t-56320,o=!0)}t+=a<=127?1:a<=2047?2:a<=65535?3:4,o&&n++}return t}createString(e){let t=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}},Jw=class e{constructor(t){if(Ww(this,`id`,++e.LAST_ID),Ww(this,`_onigBinding`),Ww(this,`content`),Ww(this,`utf16Length`),Ww(this,`utf8Length`),Ww(this,`utf16OffsetToUtf8`),Ww(this,`utf8OffsetToUtf16`),Ww(this,`ptr`),!Gw)throw new Lw(`Must invoke loadWasm first.`);this._onigBinding=Gw,this.content=t;let n=new qw(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||=Gw.omalloc(1e4),e._sharedPtrInUse=!0,Gw.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString(Gw)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===e._sharedPtr?e._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};Ww(Jw,`LAST_ID`,0),Ww(Jw,`_sharedPtr`,0),Ww(Jw,`_sharedPtrInUse`,!1);var Yw=Jw,Xw=class{constructor(e){if(Ww(this,`_onigBinding`),Ww(this,`_ptr`),!Gw)throw new Lw(`Must invoke loadWasm first.`);let t=[],n=[];for(let r=0,i=e.length;r<i;r++){let i=new qw(e[r]);t[r]=i.createString(Gw),n[r]=i.utf8Length}let r=Gw.omalloc(4*e.length);Gw.HEAPU32.set(t,r/4);let i=Gw.omalloc(4*e.length);Gw.HEAPU32.set(n,i/4);let a=Gw.createOnigScanner(r,i,e.length);for(let n=0,r=e.length;n<r;n++)Gw.ofree(t[n]);Gw.ofree(i),Gw.ofree(r),a===0&&Kw(Gw),this._onigBinding=Gw,this._ptr=a}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,t,n){let r=0;if(typeof n==`number`&&(r=n),typeof e==`string`){e=new Yw(e);let n=this._findNextMatchSync(e,t,!1,r);return e.dispose(),n}return this._findNextMatchSync(e,t,!1,r)}_findNextMatchSync(e,t,n,r){let i=this._onigBinding,a=i.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),r);if(a===0)return null;let o=i.HEAPU32,s=a/4,c=o[s++],l=o[s++],u=[];for(let t=0;t<l;t++){let n=e.convertUtf8OffsetToUtf16(o[s++]),r=e.convertUtf8OffsetToUtf16(o[s++]);u[t]={start:n,end:r,length:r-n}}return{index:c,captureIndices:u}}};function Zw(e){return typeof e.instantiator==`function`}function Qw(e){return typeof e.default==`function`}function $w(e){return e.data!==void 0}function eT(e){return typeof Response<`u`&&e instanceof Response}function tT(e){return typeof ArrayBuffer<`u`&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<`u`&&Buffer.isBuffer?.(e)||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer||typeof Uint32Array<`u`&&e instanceof Uint32Array}var nT;function rT(e){if(nT)return nT;async function t(){Gw=await Vw(async t=>{let n=e;return n=await n,typeof n==`function`&&(n=await n(t)),typeof n==`function`&&(n=await n(t)),Zw(n)?n=await n.instantiator(t):Qw(n)?n=await n.default(t):($w(n)&&(n=n.data),eT(n)?n=typeof WebAssembly.instantiateStreaming==`function`?await aT(n)(t):await oT(n)(t):tT(n)||n instanceof WebAssembly.Module?n=await iT(n)(t):`default`in n&&n.default instanceof WebAssembly.Module&&(n=await iT(n.default)(t))),`instance`in n&&(n=n.instance),`exports`in n&&(n=n.exports),n})}return nT=t(),nT}function iT(e){return t=>WebAssembly.instantiate(e,t)}function aT(e){return t=>WebAssembly.instantiateStreaming(e,t)}function oT(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}var sT;function cT(e){sT=e}function lT(){return sT}async function uT(e){return e&&await rT(e),{createScanner(e){return new Xw(e.map(e=>typeof e==`string`?e:e.source))},createString(e){return new Yw(e)}}}var dT=Tw({});Dw(dT,Iw);var fT=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function pT(e){return mT(e)}function mT(e){return Array.isArray(e)?hT(e):e instanceof RegExp?e:typeof e==`object`?gT(e):e}function hT(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=mT(e[n]);return t}function gT(e){let t={};for(let n in e)t[n]=mT(e[n]);return t}function _T(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function vT(e){let t=~e.lastIndexOf(`/`)||~e.lastIndexOf(`\\`);return t===0?e:~t===e.length-1?vT(e.substring(0,e.length-1)):e.substr(~t+1)}var yT=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,bT=class{static hasCaptures(e){return e!==null&&(yT.lastIndex=0,yT.test(e))}static replaceCaptures(e,t,n){return e.replace(yT,(e,r,i,a)=>{let o=n[parseInt(r||i,10)];if(o){let e=t.substring(o.start,o.end);for(;e[0]===`.`;)e=e.substring(1);switch(a){case`downcase`:return e.toLowerCase();case`upcase`:return e.toUpperCase();default:return e}}else return e})}};function xT(e,t){return e<t?-1:+(e>t)}function ST(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let r=0;r<n;r++){let n=xT(e[r],t[r]);if(n!==0)return n}return 0}return n-r}function CT(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function wT(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,`\\$&`)}var TT=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},ET=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(jT(e),t)}static createFromParsedTheme(e,t){return PT(e,t)}_cachedMatchRoot=new TT(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;let t=e.scopeName,n=this._cachedMatchRoot.get(t).find(t=>OT(e.parent,t.parentScopes));return n?new AT(n.fontStyle,n.foreground,n.background):null}},DT=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,n){for(let r of n)t=new e(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new e(n,t[r]);return n}push(t){return new e(this,t)}getSegments(){let e=this,t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(` `)}extends(e){return this===e||this.parent!==null&&this.parent.extends(e)}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}};function OT(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],i=!1;if(r===`>`){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!kT(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function kT(e,t){return t===e||e.startsWith(t)&&e[t.length]===`.`}var AT=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function jT(e){if(!e||!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let e=0,i=t.length;e<i;e++){let i=t[e];if(!i.settings)continue;let a;if(typeof i.scope==`string`){let e=i.scope;e=e.replace(/^[,]+/,``),e=e.replace(/[,]+$/,``),a=e.split(`,`)}else a=Array.isArray(i.scope)?i.scope:[``];let o=-1;if(typeof i.settings.fontStyle==`string`){o=0;let e=i.settings.fontStyle.split(` `);for(let t=0,n=e.length;t<n;t++)switch(e[t]){case`italic`:o|=1;break;case`bold`:o|=2;break;case`underline`:o|=4;break;case`strikethrough`:o|=8}}let s=null;typeof i.settings.foreground==`string`&&CT(i.settings.foreground)&&(s=i.settings.foreground);let c=null;typeof i.settings.background==`string`&&CT(i.settings.background)&&(c=i.settings.background);for(let t=0,i=a.length;t<i;t++){let i=a[t].trim().split(` `),l=i[i.length-1],u=null;i.length>1&&(u=i.slice(0,i.length-1),u.reverse()),n[r++]=new MT(l,u,e,o,s,c)}}return n}var MT=class{constructor(e,t,n,r,i,a){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=a}},NT=(e=>(e[e.NotSet=-1]=`NotSet`,e[e.None=0]=`None`,e[e.Italic=1]=`Italic`,e[e.Bold=2]=`Bold`,e[e.Underline=4]=`Underline`,e[e.Strikethrough=8]=`Strikethrough`,e))(NT||{});function PT(e,t){e.sort((e,t)=>{let n=xT(e.scope,t.scope);return n!==0||(n=ST(e.parentScopes,t.parentScopes),n!==0)?n:e.index-t.index});let n=0,r=`#000000`,i=`#ffffff`;for(;e.length>=1&&e[0].scope===``;){let t=e.shift();t.fontStyle!==-1&&(n=t.fontStyle),t.foreground!==null&&(r=t.foreground),t.background!==null&&(i=t.background)}let a=new FT(t),o=new AT(n,a.getId(r),a.getId(i)),s=new RT(new LT(0,null,-1,0,0),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];s.insert(0,n.scope,n.parentScopes,n.fontStyle,a.getId(n.foreground),a.getId(n.background))}return new ET(a,o,s)}var FT=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},IT=Object.freeze([]),LT=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||IT,this.fontStyle=n,this.foreground=r,this.background=i}clone(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,r){this.scopeDepth>e?console.log(`how did this happen?`):this.scopeDepth=e,t!==-1&&(this.fontStyle=t),n!==0&&(this.foreground=n),r!==0&&(this.background=r)}},RT=class e{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,r=0;for(;e.parentScopes[n]===`>`&&n++,t.parentScopes[r]===`>`&&r++,!(n>=e.parentScopes.length||r>=t.parentScopes.length);){let i=t.parentScopes[r].length-e.parentScopes[n].length;if(i!==0)return i;n++,r++}return t.parentScopes.length-e.parentScopes.length}match(t){if(t!==``){let e=t.indexOf(`.`),n,r;if(e===-1?(n=t,r=``):(n=t.substring(0,e),r=t.substring(e+1)),this._children.hasOwnProperty(n))return this._children[n].match(r)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(e._cmpBySpecificity),n}insert(t,n,r,i,a,o){if(n===``){this._doInsertHere(t,r,i,a,o);return}let s=n.indexOf(`.`),c,l;s===-1?(c=n,l=``):(c=n.substring(0,s),l=n.substring(s+1));let u;this._children.hasOwnProperty(c)?u=this._children[c]:(u=new e(this._mainRule.clone(),LT.cloneArr(this._rulesWithParentScopes)),this._children[c]=u),u.insert(t+1,l,r,i,a,o)}_doInsertHere(e,t,n,r,i){if(t===null){this._mainRule.acceptOverwrite(e,n,r,i);return}for(let a=0,o=this._rulesWithParentScopes.length;a<o;a++){let o=this._rulesWithParentScopes[a];if(ST(o.parentScopes,t)===0){o.acceptOverwrite(e,n,r,i);return}}n===-1&&(n=this._mainRule.fontStyle),r===0&&(r=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new LT(e,t,n,r,i))}},zT=class e{static toBinaryStr(e){return e.toString(2).padStart(32,`0`)}static print(t){let n=e.getLanguageId(t),r=e.getTokenType(t),i=e.getFontStyle(t),a=e.getForeground(t),o=e.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:a,background:o})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return!!(e&1024)}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(t,n,r,i,a,o,s){let c=e.getLanguageId(t),l=e.getTokenType(t),u=+!!e.containsBalancedBrackets(t),d=e.getFontStyle(t),f=e.getForeground(t),p=e.getBackground(t);return n!==0&&(c=n),r!==8&&(l=VT(r)),i!==null&&(u=+!!i),a!==-1&&(d=a),o!==0&&(f=o),s!==0&&(p=s),(c<<0|l<<8|u<<10|d<<11|f<<15|p<<24)>>>0}};function BT(e){return e}function VT(e){return e}function HT(e,t){let n=[],r=WT(e),i=r.next();for(;i!==null;){let e=0;if(i.length===2&&i.charAt(1)===`:`){switch(i.charAt(0)){case`R`:e=1;break;case`L`:e=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let t=o();if(n.push({matcher:t,priority:e}),i!==`,`)break;i=r.next()}return n;function a(){if(i===`-`){i=r.next();let e=a();return t=>!!e&&!e(t)}if(i===`(`){i=r.next();let e=s();return i===`)`&&(i=r.next()),e}if(UT(i)){let e=[];do e.push(i),i=r.next();while(UT(i));return n=>t(e,n)}return null}function o(){let e=[],t=a();for(;t;)e.push(t),t=a();return t=>e.every(e=>e(t))}function s(){let e=[],t=o();for(;t&&(e.push(t),i===`|`||i===`,`);){do i=r.next();while(i===`|`||i===`,`);t=o()}return t=>e.some(e=>e(t))}}function UT(e){return!!e&&!!e.match(/[\w\.:]+/)}function WT(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;let r=n[0];return n=t.exec(e),r}}}function GT(e){typeof e.dispose==`function`&&e.dispose()}var KT=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},qT=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},JT=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){let t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},YT=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new KT(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new JT;for(let n of e)XT(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof KT){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName)||this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};function XT(e,t,n,r){let i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw Error(`No grammar provided for <${t}>`);return}let a=n.lookup(t);e instanceof KT?QT({baseGrammar:a,selfGrammar:i},r):ZT(e.ruleName,{baseGrammar:a,selfGrammar:i,repository:i.repository},r);let o=n.injections(e.scopeName);if(o)for(let e of o)r.add(new KT(e))}function ZT(e,t,n){if(t.repository&&t.repository[e]){let r=t.repository[e];$T([r],t,n)}}function QT(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&$T(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&$T(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function $T(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?_T({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&$T(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let a=aE(i);switch(a.kind){case 0:QT({...t,selfGrammar:t.baseGrammar},n);break;case 1:QT(t,n);break;case 2:ZT(a.ruleName,{...t,repository:e},n);break;case 3:case 4:let r=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(r){let i={baseGrammar:t.baseGrammar,selfGrammar:r,repository:e};a.kind===4?ZT(a.ruleName,i,n):QT(i,n)}else a.kind===4?n.add(new qT(a.scopeName,a.ruleName)):n.add(new KT(a.scopeName))}}}var eE=class{kind=0},tE=class{kind=1},nE=class{constructor(e){this.ruleName=e}kind=2},rE=class{constructor(e){this.scopeName=e}kind=3},iE=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function aE(e){if(e===`$base`)return new eE;if(e===`$self`)return new tE;let t=e.indexOf(`#`);return t===-1?new rE(e):t===0?new nE(e.substring(1)):new iE(e.substring(0,t),e.substring(t+1))}var oE=/\\(\d+)/,sE=/\\(\d+)/g,cE=-1,lE=-2;function uE(e){return e}function dE(e){return e}var fE=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=bT.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=bT.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${vT(this.$location.filename)}:${this.$location.line}`:`unknown`;return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:bT.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:bT.replaceCaptures(this._contentName,e,t)}},pE=class extends fE{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw Error(`Not supported!`)}compile(e,t){throw Error(`Not supported!`)}compileAG(e,t,n,r){throw Error(`Not supported!`)}},mE=class extends fE{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new yE(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new bE,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},hE=class extends fE{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}collectPatterns(e,t){for(let n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new bE,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},gE=class extends fE{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,a,o,s,c,l){super(e,t,n,r),this._begin=new yE(i,this.id),this.beginCaptures=a,this._end=new yE(o||``,-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=s,this.applyEndPatternLast=c||!1,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new bE;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},_E=class extends fE{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,a,o,s,c){super(e,t,n,r),this._begin=new yE(i,this.id),this.beginCaptures=a,this.whileCaptures=s,this._while=new yE(o,lE),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null),this._cachedCompiledWhilePatterns&&=(this._cachedCompiledWhilePatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new bE;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new bE,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||``),this._cachedCompiledWhilePatterns}},vE=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new pE(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new mE(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(t.begin===void 0){t.repository&&(r=_T({},r,t.repository));let i=t.patterns;return i===void 0&&t.include&&(i=[{include:t.include}]),new hE(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new _E(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,e._compileCaptures(t.whileCaptures||t.captures,n,r),e._compilePatterns(t.patterns,n,r)):new gE(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,e._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,e._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let a=0;for(let e in t){if(e===`$vscodeTextmateLocation`)continue;let t=parseInt(e,10);t>a&&(a=t)}for(let e=0;e<=a;e++)i[e]=null;for(let a in t){if(a===`$vscodeTextmateLocation`)continue;let o=parseInt(a,10),s=0;t[a].patterns&&(s=e.getCompiledRuleId(t[a],n,r)),i[o]=e.createCaptureRule(n,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,s)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let a=0,o=t.length;a<o;a++){let o=t[a],s=-1;if(o.include){let t=aE(o.include);switch(t.kind){case 0:case 1:s=e.getCompiledRuleId(r[o.include],n,r);break;case 2:let i=r[t.ruleName];i&&(s=e.getCompiledRuleId(i,n,r));break;case 3:case 4:let a=t.scopeName,c=t.kind===4?t.ruleName:null,l=n.getExternalGrammar(a,r);if(l){if(c){let t=l.repository[c];t&&(s=e.getCompiledRuleId(t,n,l.repository))}else s=e.getCompiledRuleId(l.repository.$self,n,l.repository)}}}else s=e.getCompiledRuleId(o,n,r);if(s!==-1){let e=n.getRule(s),t=!1;if((e instanceof hE||e instanceof gE||e instanceof _E)&&e.hasMissingPatterns&&e.patterns.length===0&&(t=!0),t)continue;i.push(s)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},yE=class e{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&typeof e==`string`){let t=e.length,n=0,r=[],i=!1;for(let a=0;a<t;a++)if(e.charAt(a)===`\\`&&a+1<t){let t=e.charAt(a+1);t===`z`?(r.push(e.substring(n,a)),r.push(`$(?!\\n)(?<!\\n)`),n=a+2):(t===`A`||t===`G`)&&(i=!0),a++}this.hasAnchor=i,n===0?this.source=e:(r.push(e.substring(n,t)),this.source=r.join(``))}else this.hasAnchor=!1,this.source=e;this._anchorCache=this.hasAnchor?this._buildAnchorCache():null,this.ruleId=t,this.hasBackReferences=typeof this.source==`string`&&oE.test(this.source)}clone(){return new e(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let n=t.map(t=>e.substring(t.start,t.end));return sE.lastIndex=0,this.source.replace(sE,(e,t)=>wT(n[parseInt(t,10)]||``))}_buildAnchorCache(){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let e=[],t=[],n=[],r=[],i,a,o,s;for(i=0,a=this.source.length;i<a;i++)o=this.source.charAt(i),e[i]=o,t[i]=o,n[i]=o,r[i]=o,o===`\\`&&i+1<a&&(s=this.source.charAt(i+1),s===`A`?(e[i+1]=``,t[i+1]=``,n[i+1]=`A`,r[i+1]=`A`):s===`G`?(e[i+1]=``,t[i+1]=`G`,n[i+1]=``,r[i+1]=`G`):(e[i+1]=s,t[i+1]=s,n[i+1]=s,r[i+1]=s),i++);return{A0_G0:e.join(``),A0_G1:t.join(``),A1_G0:n.join(``),A1_G1:r.join(``)}}resolveAnchors(e,t){return!this.hasAnchor||!this._anchorCache||typeof this.source!=`string`?this.source:e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},bE=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&=(this._cached.dispose(),null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(e=>e.source);this._cached=new xE(e,t,this._items.map(e=>e.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){return new xE(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},xE=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose==`function`&&this.scanner.dispose()}toString(){let e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(` - `+this.rules[t]+`: `+this.regExps[t]);return e.join(`
|
|
36
|
+
\f\r "&'<=>\``.split(``)]],single:[[`&'`.split(``),`"&'\``.split(``)],[`\0&'`.split(``),`\0"&'\``.split(``)]],double:[[`"&`.split(``),`"&'\``.split(``)],[`\0"&`.split(``),`\0"&'\``.split(``)]]};function wC(e,t,n,r){let i=r.schema,a=i.space!==`svg`&&r.settings.omitOptionalTags,o=i.space===`svg`?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase()),s=[],c;i.space===`html`&&e.tagName===`svg`&&(r.schema=pS);let l=TC(r,e.properties),u=r.all(i.space===`html`&&e.tagName===`template`?e.content:e);return r.schema=i,u&&(o=!1),(l||!a||!_C(e,t,n))&&(s.push(`<`,e.tagName,l?` `+l:``),o&&(i.space===`svg`||r.settings.closeSelfClosing)&&(c=l.charAt(l.length-1),(!r.settings.tightSelfClosing||c===`/`||c&&c!==`"`&&c!==`'`)&&s.push(` `),s.push(`/`)),s.push(`>`)),s.push(u),!o&&(!a||!tC(e,t,n))&&s.push(`</`+e.tagName+`>`),s.join(``)}function TC(e,t){let n=[],r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){let r=EC(e,i,t[i]);r&&n.push(r)}}for(;++r<n.length;){let t=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&t!==`"`&&t!==`'`&&(n[r]+=` `)}return n.join(``)}function EC(e,t,n){let r=lS(e.schema,t),i=e.settings.allowParseErrors&&e.schema.space===`html`?0:1,a=+!e.settings.allowDangerousCharacters,o=e.quote,s;if(r.overloadedBoolean&&(n===r.attribute||n===``)?n=!0:(r.boolean||r.overloadedBoolean)&&(typeof n!=`string`||n===r.attribute||n===``)&&(n=!!n),n==null||n===!1||typeof n==`number`&&Number.isNaN(n))return``;let c=LS(r.attribute,Object.assign({},e.settings.characterReferences,{subset:CC.name[i][a]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?WS:GS)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?c:(e.settings.preferUnquoted&&(s=LS(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:CC.unquoted[i][a]}))),s!==n&&(e.settings.quoteSmart&&US(n,o)>US(n,e.alternative)&&(o=e.alternative),s=o+LS(n,Object.assign({},e.settings.characterReferences,{subset:(o===`'`?CC.single:CC.double)[i][a],attribute:!0}))+o),c+(s&&`=`+s))}var DC=[`<`,`&`];function OC(e,t,n,r){return n&&n.type===`element`&&(n.tagName===`script`||n.tagName===`style`)?e.value:LS(e.value,Object.assign({},r.settings.characterReferences,{subset:DC}))}function kC(e,t,n,r){return r.settings.allowDangerousHtml?e.value:OC(e,t,n,r)}function AC(e,t,n,r){return r.all(e)}var jC=hS(`type`,{invalid:MC,unknown:NC,handlers:{comment:VS,doctype:HS,element:wC,raw:kC,root:AC,text:OC}});function MC(e){throw Error("Expected node, not `"+e+"`")}function NC(e){throw Error("Cannot compile unknown node `"+e.type+"`")}var PC={},FC={},IC=[];function LC(e,t){let n=t||PC,r=n.quote||`"`,i=r===`"`?`'`:`"`;if(r!==`"`&&r!==`'`)throw Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:RC,all:zC,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||Fx,characterReferences:n.characterReferences||FC,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space===`svg`?pS:fS,quote:r,alternative:i}.one(Array.isArray(e)?{type:`root`,children:e}:e,void 0,void 0)}function RC(e,t,n){return jC(e,t,n,this)}function zC(e){let t=[],n=e&&e.children||IC,r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join(``)}var BC=class{mode;options;hoveredLine;hoveredToken;pre;gutterUtilityLine;gutterUtilityContainer;gutterUtilityButton;gutterUtilitySlot;interactiveLinesAttr=!1;interactiveLineNumbersAttr=!1;hasPointerListeners=!1;hasDocumentPointerListeners=!1;selectedRange=null;selectedRangeHighlightSide;selectedRangeLineNumberOnly=!1;editorActiveLine=null;editorActiveLineSide;editorLineNumberOnly=!1;proposedSelectedRange;renderedSelectedLinesState;renderedEditorActiveLineState;selectionAnchor;pointerSession={mode:`idle`};constructor(e,t){this.mode=e,this.options=t}setOptions(e){this.options=e}cleanUp(){this.pre?.removeEventListener(`click`,this.handlePointerClick),this.pre?.removeEventListener(`pointerdown`,this.handlePointerDown),this.pre?.removeEventListener(`pointermove`,this.handlePointerMove),this.pre?.removeEventListener(`pointerleave`,this.handlePointerLeave),this.pre?.removeAttribute(`data-interactive-lines`),this.pre?.removeAttribute(`data-interactive-line-numbers`),this.pre=void 0,this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.clearHoveredLine(),this.clearHoveredToken(),this.detachDocumentPointerListeners(),this.clearPointerSession(),lb(this.renderSelection),this.interactiveLinesAttr=!1,this.interactiveLineNumbersAttr=!1,this.hasPointerListeners=!1,this.setSelectionDirty()}setup(e){this.setSelectionDirty();let{usesCustomGutterUtility:t=!1,enableGutterUtility:n=!1}=this.options;this.pre!==e&&(this.cleanUp(),this.pre=e),n?this.ensureGutterUtilityNode(t):this.gutterUtilityContainer!=null&&(this.gutterUtilityContainer.remove(),this.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.pointerSession.mode===`gutterSelecting`&&(this.clearPointerSession(),this.detachDocumentPointerListeners())),this.syncPointerListeners(e),this.updateInteractiveLineAttributes(),this.renderSelection(),this.placeUtility()}setSelectionDirty(){this.renderedSelectedLinesState=void 0,this.renderedEditorActiveLineState=void 0}isSelectionDirty(){return this.renderedSelectedLinesState===void 0||this.renderedEditorActiveLineState===void 0}setSelection(e,t){let n=!(e===this.selectedRange||fb(e??void 0,this.selectedRange??void 0)),r=t?.lineNumberOnly??!1,i=t?.activeLineSide!==this.selectedRangeHighlightSide||r!==this.selectedRangeLineNumberOnly;!this.isSelectionDirty()&&!n&&!i||(this.proposedSelectedRange=void 0,this.selectedRange=e,this.selectedRangeHighlightSide=t?.activeLineSide,this.selectedRangeLineNumberOnly=r,this.renderSelection(),this.placeUtility(),n&&t?.notify!==!1&&this.notifySelectionCommitted(e))}setEditorActiveLine(e,{lineNumberOnly:t=!1,side:n}={}){let r=e!==this.editorActiveLine,i=n!==this.editorActiveLineSide||t!==this.editorLineNumberOnly;!this.isSelectionDirty()&&!r&&!i||(this.editorActiveLine=e,this.editorActiveLineSide=n,this.editorLineNumberOnly=t,this.renderSelection())}getSelection(){return this.selectedRange}getHoveredLine=()=>{let e=this.gutterUtilityLine??this.hoveredLine;if(e!=null){if(this.mode===`diff`&&e.type===`diff-line`)return{lineNumber:e.lineNumber,side:e.annotationSide};if(this.mode===`file`&&e.type===`line`)return{lineNumber:e.lineNumber}}};handlePointerClick=e=>{let{onHunkExpand:t,onLineClick:n,onLineNumberClick:r,onTokenClick:i,onMergeConflictActionClick:a}=this.options;(t!=null||n!=null||r!=null||a!=null||i!=null)&&(this.options.onGutterUtilityClick!=null&&Px(e.composedPath())||(aw(this.options.__debugPointerEvents,`click`,`FileDiff.DEBUG.handlePointerClick:`,e),this.handlePointerEvent({eventType:`click`,event:e})))};handlePointerMove=e=>{if(e.pointerType!==`mouse`)return;let{lineHoverHighlight:t=`disabled`,onLineEnter:n,onLineLeave:r,onTokenEnter:i,onTokenLeave:a,enableGutterUtility:o=!1}=this.options;t===`disabled`&&!o&&n==null&&r==null&&i==null&&a==null||(aw(this.options.__debugPointerEvents,`move`,`FileDiff.DEBUG.handlePointerMove:`,e),this.handlePointerEvent({eventType:`move`,event:e}))};handlePointerLeave=e=>{let{__debugPointerEvents:t}=this.options;if(aw(t,`move`,`FileDiff.DEBUG.handlePointerLeave: no event`),this.hoveredLine==null&&this.hoveredToken==null){aw(t,`move`,`FileDiff.DEBUG.handlePointerLeave: returned early, no hovered line or token`);return}this.hoveredToken!=null&&(this.options.onTokenLeave?.(this.hoveredToken,e),this.clearHoveredToken()),this.hoveredLine!=null&&(this.options.onLineLeave?.({...this.hoveredLine,event:e}),this.clearHoveredLine()),this.placeUtility()};handlePointerEvent({eventType:e,event:t}){let{__debugPointerEvents:n}=this.options,r=t.composedPath();aw(n,e,`FileDiff.DEBUG.handlePointerEvent:`,{eventType:e,composedPath:r});let i=this.resolvePointerTarget(r);aw(n,e,`FileDiff.DEBUG.handlePointerEvent: resolvePointerTarget result:`,i);let{onLineClick:a,onLineNumberClick:o,onLineEnter:s,onLineLeave:c,onTokenClick:l,onTokenEnter:u,onTokenLeave:d,onHunkExpand:f,onMergeConflictActionClick:p}=this.options;switch(e){case`move`:{let e=GC(i)&&this.hoveredLine?.lineElement===i.lineElement;WC(i)&&this.hoveredToken?.tokenElement===i.tokenElement||(this.hoveredToken!=null&&(d?.(this.hoveredToken,t),this.clearHoveredToken()),WC(i)&&(this.setHoveredToken(this.toTokenEventBaseProps(i)),u?.(this.hoveredToken,t))),e||(this.hoveredLine!=null&&(c?.({...this.hoveredLine,event:t}),this.clearHoveredLine()),GC(i)?(this.setHoveredLine(this.toEventBaseProps(i)),this.placeUtility(),s?.({...this.hoveredLine,event:t})):this.placeUtility());break}case`click`:{if(i==null)break;if(qC(i)&&p!=null){p(i);break}if(KC(i)&&f!=null){f(i.hunkIndex,i.all||t.shiftKey?`both`:i.direction,i.all||t.shiftKey?1/0:void 0);break}if(!GC(i))break;WC(i)&&l!=null&&l(this.toTokenEventBaseProps(i),t);let e=this.toEventBaseProps(i);o!=null&&i.numberColumn?o({...e,event:t}):a?.({...e,event:t});break}}}syncPointerListeners(e){let{__debugPointerEvents:t,lineHoverHighlight:n=`disabled`,onLineClick:r,onLineNumberClick:i,onLineEnter:a,onLineLeave:o,onTokenClick:s,onTokenEnter:c,onTokenLeave:l,onHunkExpand:u,onMergeConflictActionClick:d,enableGutterUtility:f=!1,enableLineSelection:p=!1,onGutterUtilityClick:m}=this.options,h=m!=null,g=n!==`disabled`||r!=null||i!=null||a!=null||o!=null||s!=null||c!=null||l!=null||u!=null||d!=null||f||p||h;g&&!this.hasPointerListeners?(e.addEventListener(`click`,this.handlePointerClick),e.addEventListener(`pointerdown`,this.handlePointerDown),e.addEventListener(`pointermove`,this.handlePointerMove),e.addEventListener(`pointerleave`,this.handlePointerLeave),this.hasPointerListeners=!0,aw(t,`click`,`FileDiff.DEBUG.attachEventListeners: Attaching click events for:`,(()=>{let e=[];return(t===`both`||t===`click`)&&(r!=null&&e.push(`onLineClick`),i!=null&&e.push(`onLineNumberClick`),u!=null&&e.push(`expandable hunk separators`),d!=null&&e.push(`merge conflict actions`)),e})()),aw(t,`move`,`FileDiff.DEBUG.attachEventListeners: Attaching pointer move event`),aw(t,`move`,`FileDiff.DEBUG.attachEventListeners: Attaching pointer leave event`)):!g&&this.hasPointerListeners&&(e.removeEventListener(`click`,this.handlePointerClick),e.removeEventListener(`pointerdown`,this.handlePointerDown),e.removeEventListener(`pointermove`,this.handlePointerMove),e.removeEventListener(`pointerleave`,this.handlePointerLeave),this.hasPointerListeners=!1);let _=this.pointerSession.mode===`selecting`||this.pointerSession.mode===`pendingSingleLineUnselect`,v=this.pointerSession.mode===`gutterSelecting`;(!p&&_||!h&&v)&&(this.clearPointerSession(),this.detachDocumentPointerListeners(),this.selectionAnchor=void 0,this.clearPendingSingleLineState())}updateInteractiveLineAttributes(){if(this.pre==null)return;let{onLineClick:e,onLineNumberClick:t,enableLineSelection:n=!1}=this.options,r=e!=null,i=t!=null||n;r&&!this.interactiveLinesAttr?(this.pre.setAttribute(`data-interactive-lines`,``),this.interactiveLinesAttr=!0):!r&&this.interactiveLinesAttr&&(this.pre.removeAttribute(`data-interactive-lines`),this.interactiveLinesAttr=!1),i&&!this.interactiveLineNumbersAttr?(this.pre.setAttribute(`data-interactive-line-numbers`,``),this.interactiveLineNumbersAttr=!0):!i&&this.interactiveLineNumbersAttr&&(this.pre.removeAttribute(`data-interactive-line-numbers`),this.interactiveLineNumbersAttr=!1)}handlePointerDown=e=>{if(e.pointerType===`mouse`&&e.button!==0||this.pre==null||this.pointerSession.mode!==`idle`)return;let t=e.composedPath();Px(t)&&this.options.onGutterUtilityClick!=null?this.startGutterSelectionFromPointerDown(e):(e.pointerType!==`mouse`&&this.revealUtilityFromGutterPath(t),this.startLineSelectionFromPointerDown(e))};startLineSelectionFromPointerDown(e){let{enableLineSelection:t=!1}=this.options;if(!t)return;let n=this.resolveSelectionInfo(e,{source:`event-path`,requireNumberColumn:!0});if(n==null)return;let{pre:r}=this;if(r==null)return;let{lineNumber:i,eventSide:a,lineIndex:o}=n;if(e.shiftKey&&this.selectedRange!=null){let t=this.getIndexesFromSelection(this.selectedRange,r.getAttribute(`data-diff-type`)===`split`);if(t==null)return;let n=t.start<=t.end?o>=t.start:o<=t.end;this.selectionAnchor={lineNumber:n?this.selectedRange.start:this.selectedRange.end,side:n?this.selectedRange.side:this.selectedRange.endSide??this.selectedRange.side},this.updateSelection(i,a,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:`selecting`,pointerId:e.pointerId},this.attachDocumentPointerListeners();return}if(this.selectedRange?.start===i&&this.selectedRange?.end===i){let t={lineNumber:i,side:a};this.selectionAnchor=t,this.pointerSession={mode:`pendingSingleLineUnselect`,pointerId:e.pointerId,anchor:t,pending:t},this.attachDocumentPointerListeners();return}this.options.controlledSelection===!0?this.proposedSelectedRange=null:this.selectedRange=null,this.placeUtility(),this.selectionAnchor={lineNumber:i,side:a},this.updateSelection(i,a,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:`selecting`,pointerId:e.pointerId},this.attachDocumentPointerListeners()}startGutterSelectionFromPointerDown(e){let{onGutterUtilityClick:t}=this.options;if(t==null)return;let n=this.currentSelectionEnds(),r=n?.bottom??this.resolveSelectionPoint(e,{source:`event-path`,excludeUtility:!1}),i=n?.top??r;r!=null&&i!=null&&(e.preventDefault(),e.stopPropagation(),this.pointerSession={mode:`gutterSelecting`,pointerId:e.pointerId,anchor:i,current:r},this.selectionAnchor={lineNumber:i.lineNumber,side:i.side},this.updateSelection(r.lineNumber,r.side,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.attachDocumentPointerListeners())}handleDocumentPointerMove=e=>{switch(this.pointerSession.mode){case`idle`:return;case`gutterSelecting`:{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();let t=this.resolveSelectionPoint(e,{source:`coordinates-first`});if(t==null)return;this.pointerSession.current=t,this.updateSelection(t.lineNumber,t.side);return}case`selecting`:{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();let t=this.resolveSelectionInfo(e,{source:`coordinates-first`,requireNumberColumn:!1});if(t==null||this.selectionAnchor==null)return;this.updateSelection(t.lineNumber,t.eventSide);return}case`pendingSingleLineUnselect`:{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();let t=this.resolveSelectionInfo(e,{source:`coordinates-first`,requireNumberColumn:!1});if(t==null||this.selectionAnchor==null)return;let n={lineNumber:t.lineNumber,side:t.eventSide};if(Nx(this.pointerSession.pending,n))return;this.updateSelection(t.lineNumber,t.eventSide,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.notifySelectionChangeDelta(),this.pointerSession={mode:`selecting`,pointerId:e.pointerId};return}}};handleDocumentPointerUp=e=>{let{onGutterUtilityClick:t}=this.options;switch(this.pointerSession.mode){case`idle`:return;case`gutterSelecting`:{let{pointerSession:n}=this;if(e.pointerId!==n.pointerId)return;e.preventDefault();let r=this.resolveSelectionPoint(e,{source:`coordinates-first`});r!=null&&(n.current=r,this.updateSelection(r.lineNumber,r.side));let i=this.buildSelectedLineRange(n.anchor,n.current);t?.({...i}),this.selectionAnchor=void 0,this.notifySelectionEnd(i),this.notifySelectionCommitted(i),this.clearProposedSelection(),this.clearPointerSession(),this.detachDocumentPointerListeners();return}case`pendingSingleLineUnselect`:if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.updateSelection(null,void 0,!1),this.selectionAnchor=void 0,this.clearPendingSingleLineState(),this.detachDocumentPointerListeners(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(this.getCurrentSelectionRange()),this.clearProposedSelection();return;case`selecting`:if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.selectionAnchor=void 0,this.detachDocumentPointerListeners(),this.clearPointerSession(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(this.getCurrentSelectionRange()),this.clearProposedSelection()}};handleDocumentPointerCancel=e=>{switch(this.pointerSession.mode){case`idle`:return;case`gutterSelecting`:case`selecting`:case`pendingSingleLineUnselect`:if(`pointerId`in this.pointerSession&&e.pointerId!==this.pointerSession.pointerId)return;this.selectionAnchor=void 0,this.clearProposedSelection(),this.clearPendingSingleLineState(),this.clearPointerSession(),this.detachDocumentPointerListeners()}};clearHoveredLine(){this.hoveredLine!=null&&(this.hoveredLine.lineElement.removeAttribute(`data-hovered`),this.hoveredLine.numberElement.removeAttribute(`data-hovered`),this.hoveredLine=void 0)}setHoveredLine(e){let{lineHoverHighlight:t=`disabled`}=this.options;this.hoveredLine!=null&&this.clearHoveredLine(),this.hoveredLine=e,t!==`disabled`&&((t===`both`||t===`line`)&&this.hoveredLine.lineElement.setAttribute(`data-hovered`,``),(t===`both`||t===`number`)&&this.hoveredLine.numberElement.setAttribute(`data-hovered`,``))}clearHoveredToken(){this.hoveredToken!=null&&(this.hoveredToken=void 0)}setHoveredToken(e){this.hoveredToken!=null&&this.clearHoveredToken(),this.hoveredToken=e}ensureGutterUtilityNode(e){if(this.gutterUtilityContainer??(this.gutterUtilityContainer=document.createElement(`div`),this.gutterUtilityContainer.setAttribute(`data-gutter-utility-slot`,``)),e)this.gutterUtilityButton!=null&&(this.gutterUtilityButton.remove(),this.gutterUtilityButton=void 0),this.gutterUtilitySlot??(this.gutterUtilitySlot=document.createElement(`slot`),this.gutterUtilitySlot.name=`gutter-utility-slot`),this.gutterUtilitySlot.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilitySlot);else{if(this.gutterUtilitySlot?.remove(),this.gutterUtilitySlot=void 0,this.gutterUtilityButton==null){let e=document.createElement(`div`);e.innerHTML=LC(Mx());let t=e.firstElementChild;if(!(t instanceof HTMLButtonElement))throw Error(`InteractionManager.ensureGutterUtilityNode: Node element should be a button`);t.remove(),this.gutterUtilityButton=t}this.gutterUtilityButton.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilityButton)}}revealUtilityFromGutterPath(e){if(this.placeUtilityFromSelection())return;let t=this.resolvePointerTarget(e);UC(t)&&t.numberColumn&&this.showUtilityOnLine(this.toEventBaseProps(t))}placeUtility(){if(!this.placeUtilityFromSelection()){if(this.hoveredLine!=null){this.showUtilityOnLine(this.hoveredLine);return}this.hideUtility()}}placeUtilityFromSelection(){let e=this.currentSelectionEnds();if(e==null)return!1;let t=this.targetForSelectionPoint(e.bottom);return t==null?this.hideUtility():this.showUtilityOnLine(this.toEventBaseProps(t)),!0}showUtilityOnLine(e){this.gutterUtilityContainer!=null&&(this.gutterUtilityLine=e,e.numberElement.appendChild(this.gutterUtilityContainer))}hideUtility(){this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0}currentSelectionEnds(){let e=this.getCurrentSelectionRange();return e==null?void 0:this.selectionEnds(e)}selectionEnds(e){let t={lineNumber:e.start,side:e.side},n={lineNumber:e.end,side:e.endSide??e.side},r=this.selectionPointRowIndex(t),i=this.selectionPointRowIndex(n);if(r!=null&&i!=null)return r>i?{top:n,bottom:t}:{top:t,bottom:n}}selectionPointRowIndex(e){let t=this.getLineIndex(e.lineNumber,e.side);if(t!=null)return this.isSplitDiff()?t[1]:t[0]}targetForSelectionPoint(e){if(this.pre==null)return;let t=this.getLineIndex(e.lineNumber,e.side);if(t==null)return;let n=this.mode===`diff`?`${t[0]},${t[1]}`:`${t[0]}`,r=this.pre.querySelectorAll(`[data-column-number="${e.lineNumber}"][data-line-index="${n}"]`);for(let t of r){if(!(t instanceof HTMLElement))continue;let n=this.resolvePointerTarget(XC(t));if(UC(n)&&(this.mode!==`diff`||e.side==null||n.side===e.side))return n}}attachDocumentPointerListeners(){this.hasDocumentPointerListeners||=(document.addEventListener(`pointermove`,this.handleDocumentPointerMove),document.addEventListener(`pointerup`,this.handleDocumentPointerUp),document.addEventListener(`pointercancel`,this.handleDocumentPointerCancel),!0)}detachDocumentPointerListeners(){this.hasDocumentPointerListeners&&=(document.removeEventListener(`pointermove`,this.handleDocumentPointerMove),document.removeEventListener(`pointerup`,this.handleDocumentPointerUp),document.removeEventListener(`pointercancel`,this.handleDocumentPointerCancel),!1)}clearPointerSession(){this.pointerSession={mode:`idle`}}clearPendingSingleLineState(){this.pointerSession.mode===`pendingSingleLineUnselect`&&(this.pointerSession={mode:`idle`})}selectionInfoFromPath(e,t){let n=this.resolvePointerTarget(e);if(UC(n)&&!(t&&!n.numberColumn)&&n.splitLineIndex!=null)return{lineIndex:n.splitLineIndex,lineNumber:n.lineNumber,eventSide:this.mode===`diff`?n.side:void 0}}resolveSelectionInfo(e,t){let n=this.resolveSelectionPath(e,t);return n==null?void 0:this.selectionInfoFromPath(n,t.requireNumberColumn)}selectionPointFromPath(e){let t=this.resolvePointerTarget(e);if(UC(t))return{lineNumber:t.lineNumber,side:this.mode===`diff`?t.side:void 0}}resolveSelectionPoint(e,t){let n=this.resolveSelectionPath(e,t);return n==null?void 0:this.selectionPointFromPath(n)}resolveSelectionPath(e,t){let n=t.excludeUtility!==!1;switch(t.source){case`event-path`:return this.pathFromEventPath(e.composedPath(),n);case`coordinates-first`:{let t=this.pathFromCoordinates(e,n);return t===void 0?this.pathFromEventPath(e.composedPath(),n):t??void 0}}}pathFromCoordinates(e,t){let n=this.hitTest(e);if(n!==void 0)return n===null?null:this.pathFromElement(n,t)??null}pathFromEventPath(e,t){if(!(t&&Px(e))){for(let n of e)if(n instanceof Element)return this.pathFromElement(n,t)}}pathFromElement(e,t){let n=XC(e);if(t&&Px(n))return;let r=ZC(e);return r==null?this.pathFromAnnotationSlot(e):XC(r)}pathFromAnnotationSlot(e){let t=$C(QC(e));if(t==null)return;let n=this.targetForSelectionPoint(t);return n==null?void 0:XC(n.lineElement)}hitTest(e){if(!Number.isFinite(e.clientX)||!Number.isFinite(e.clientY))return;let t=this.pre?.getRootNode(),n=ew(t)?t:ew(document)?document:void 0;if(n!=null)return n.elementFromPoint(e.clientX,e.clientY)}getLineIndex(e,t){let{getLineIndex:n}=this.options;return n==null?[e-1,e-1]:n(e,t)}getCurrentSelectionRange(){return this.proposedSelectedRange===void 0?this.selectedRange:this.proposedSelectedRange}clearProposedSelection(){this.proposedSelectedRange=void 0}updateSelection(e,t,n=!0){let r=this.getCurrentSelectionRange(),i;if(e==null)i=null;else{let n=this.selectionAnchor?.side??t,r=this.selectionAnchor?.lineNumber??e;i=this.buildSelectionRange(r,e,n,t)}fb(r??void 0,i??void 0)||(this.selectedRangeHighlightSide=void 0,this.selectedRangeLineNumberOnly=!1,this.options.controlledSelection===!0?this.proposedSelectedRange=i:(this.selectedRange=i,cb(this.renderSelection)),this.placeUtility(),n&&this.notifySelectionChangeDelta())}getIndexesFromSelection(e,t){if(this.pre==null)return;let n=this.getLineIndex(e.start,e.side),r=this.getLineIndex(e.end,e.endSide??e.side);return n!=null&&r!=null?{start:t?n[1]:n[0],end:t?r[1]:r[0]}:void 0}getSelectionRenderState(){return{selectedLines:{range:this.selectedRange,highlightSide:this.selectedRangeHighlightSide,lineNumberOnly:this.selectedRangeLineNumberOnly},editorActiveLine:{range:this.editorActiveLine==null?null:{start:this.editorActiveLine,end:this.editorActiveLine,side:this.editorActiveLineSide},highlightSide:this.editorActiveLineSide,lineNumberOnly:this.editorLineNumberOnly}}}resolveLineRenderRange(e,t,n){if(e.range==null)return;let r=this.getIndexesFromSelection(e.range,t);if(r==null)throw console.error({rowRange:r,range:e.range}),Error(`InteractionManager.renderSelection: No valid ${n} rowRange`);return r}getLineRenderColumns(e,t,n,r){if(this.pre==null||t==null&&r==null)return[];let{children:i}=this.pre;if(i.length>2)throw console.error(i),Error(`InteractionManager.renderSelection: Somehow there are more than 2 code elements...`);let a=[];for(let o of i){let i=o.hasAttribute(`data-deletions`)?`deletions`:o.hasAttribute(`data-additions`)?`additions`:void 0,s=e!=null&&t!=null&&(e.highlightSide==null||i==null||e.highlightSide===i),c=n!=null&&r!=null&&(n.highlightSide==null||i==null||n.highlightSide===i);if(!s&&!c)continue;let[l,u]=o.children;if(!(l instanceof HTMLElement)||!(u instanceof HTMLElement))throw Error(`InteractionManager.renderSelection: missing gutter or content element`);if(u.children.length!==l.children.length)throw Error(`InteractionManager.renderSelection: gutter and content children dont match, something is wrong`);a.push({content:u,gutter:l,renderEditorActiveLine:c,renderSelectedLines:s})}return a}renderSelection=()=>{lb(this.renderSelection);let e=this.getSelectionRenderState();if(this.pre==null)return;let{editorActiveLine:t,selectedLines:n}=e,r=!nw(this.renderedSelectedLinesState,n),i=!nw(this.renderedEditorActiveLineState,t);if(!r&&!i)return;r&&(this.renderedSelectedLinesState=void 0),i&&(this.renderedEditorActiveLineState=void 0);let a=this.pre.getAttribute(`data-diff-type`)===`split`,o=r?this.resolveLineRenderRange(n,a,`selected-lines`):void 0,s=i?this.resolveLineRenderRange(t,a,`editor-active-line`):void 0,c=this.getLineRenderColumns(r?n:void 0,o,i?t:void 0,s),l=n.range==null||c.some(e=>e.renderSelectedLines),u=t.range==null||c.some(e=>e.renderEditorActiveLine);if(r)for(let e of this.pre.querySelectorAll(`[data-selected-line]`))e.removeAttribute(`data-selected-line`);if(i)for(let e of this.pre.querySelectorAll(`[data-editor-active-line]`))e.removeAttribute(`data-editor-active-line`);let d=o==null?void 0:Math.min(o.start,o.end),f=o==null?void 0:Math.max(o.start,o.end),p=d===f,m=s?.start;for(let e of c){let{content:r,gutter:i,renderEditorActiveLine:o,renderSelectedLines:s}=e,c=Math.max(s?f??-1/0:-1/0,o?m??-1/0:-1/0),l=r.children.length;for(let e=0;e<l;e++){let l=r.children[e],u=i.children[e];if(!(l instanceof HTMLElement)||!(u instanceof HTMLElement))continue;let h=this.parseLineIndex(l,a);if((h??0)>c)break;if(h!=null){if(s&&d!=null&&f!=null&&h>=d&&h<=f){let e=p?`single`:h===d?`first`:h===f?`last`:``;u.setAttribute(`data-selected-line`,e),n.lineNumberOnly||(l.setAttribute(`data-selected-line`,e),u.nextSibling instanceof HTMLElement&&l.nextSibling instanceof HTMLElement&&(l.nextSibling.hasAttribute(`data-line-annotation`)||l.nextSibling.hasAttribute(`data-merge-conflict-actions`))&&(p?(e=`last`,l.setAttribute(`data-selected-line`,`first`)):h===d?e=``:h===f&&l.setAttribute(`data-selected-line`,``),l.nextSibling.setAttribute(`data-selected-line`,e),u.nextSibling.setAttribute(`data-selected-line`,e)))}o&&h===m&&(u.setAttribute(`data-editor-active-line`,``),t.lineNumberOnly||l.setAttribute(`data-editor-active-line`,``))}}}r&&l&&(this.renderedSelectedLinesState=n),i&&u&&(this.renderedEditorActiveLineState=t)};notifySelectionCommitted(e){this.options.onLineSelected?.(e)}notifySelectionChangeDelta(){this.options.onLineSelectionChange?.(this.getCurrentSelectionRange()??null)}notifySelectionStart(e){this.options.onLineSelectionStart?.(e)}notifySelectionEnd(e){this.options.onLineSelectionEnd?.(e)}toEventBaseProps(e){return this.mode===`file`?{type:`line`,lineElement:e.lineElement,lineNumber:e.lineNumber,numberColumn:e.numberColumn,numberElement:e.numberElement}:{type:`diff-line`,annotationSide:e.side,lineType:e.lineType,lineElement:e.lineElement,numberElement:e.numberElement,lineNumber:e.lineNumber,numberColumn:e.numberColumn}}toTokenEventBaseProps({lineCharEnd:e,lineCharStart:t,lineNumber:n,side:r,tokenElement:i,tokenText:a}){return this.mode===`file`?{type:`token`,lineCharEnd:e,lineCharStart:t,lineNumber:n,tokenElement:i,tokenText:a}:{type:`token`,lineCharEnd:e,lineCharStart:t,lineNumber:n,side:r,tokenElement:i,tokenText:a}}buildSelectedLineRange(e,t){return this.buildSelectionRange(e.lineNumber,t.lineNumber,e.side,t.side)}buildSelectionRange(e,t,n,r){return{start:e,end:t,...n==null?{}:{side:n},...n!==r&&r!=null?{endSide:r}:{}}}resolvePointerTarget(e){let t=!1,n,r,i,a,o,s,c,l,u,d;for(let f of e){if(!(f instanceof HTMLElement))continue;if(d==null&&f.hasAttribute(`data-merge-conflict-action`)){let e=f.getAttribute(`data-merge-conflict-action`)??void 0,t=f.getAttribute(`data-merge-conflict-conflict-index`)??void 0,n=t==null?NaN:Number.parseInt(t,10);JC(e)&&Number.isFinite(n)&&(d={kind:`merge-conflict-action`,resolution:e,conflictIndex:n})}if(s==null&&f.hasAttribute(`data-char`)){s=f;let e=f.getAttribute(`data-char`);if(e!=null){let t=Number.parseInt(e,10);if(!Number.isNaN(t)){let e=f.textContent??``,n=t+e.length;(e.trim()!==``||this.options.enableTokenInteractionsOnWhitespace===!0)&&(c={tokenElement:s,lineCharStart:t,lineCharEnd:n,tokenText:e});continue}}}let e=o==null?f.getAttribute(`data-column-number`)??void 0:void 0;if(e!=null){o=f,u=Number.parseInt(e,10),t=!0,n=iw(f),a=f.getAttribute(`data-line-index`)??void 0;continue}let p=i==null?f.getAttribute(`data-line`)??void 0:void 0;if(p!=null){i=f,u=Number.parseInt(p,10),n=iw(f),a=f.getAttribute(`data-line-index`)??void 0;continue}if(l==null&&(f.hasAttribute(`data-expand-button`)||f.hasAttribute(`data-unmodified-lines`))){l={hunkIndex:void 0,direction:f.hasAttribute(`data-expand-up`)?`up`:f.hasAttribute(`data-expand-down`)?`down`:`both`,all:f.hasAttribute(`data-expand-all-button`)};continue}let m=l==null?void 0:f.getAttribute(`data-expand-index`)??void 0;if(l!=null&&m!=null){let e=Number.parseInt(m,10);Number.isNaN(e)||(l.hunkIndex=e);continue}if(r==null&&f.hasAttribute(`data-code`)){r=f;break}}if(d!=null)return d;if(l?.hunkIndex!=null)return{type:`line-info`,hunkIndex:l.hunkIndex,direction:l.direction,all:l.all};if(i??=a==null?void 0:YC(r,`[data-line][data-line-index="${a}"]`),o??=a==null?void 0:YC(r,`[data-column-number][data-line-index="${a}"]`),r==null||i==null||o==null||n==null||u==null||Number.isNaN(u))return;let f=this.parseLineIndex(i,this.isSplitDiff());return c==null?this.mode===`file`?{kind:`line`,lineType:n,lineElement:i,lineNumber:u,numberColumn:t,numberElement:o,side:void 0,splitLineIndex:f}:{kind:`line`,lineType:n,lineElement:i,lineNumber:u,numberColumn:t,numberElement:o,side:rw(n,r),splitLineIndex:f}:this.mode===`file`?{kind:`token`,lineType:n,lineElement:i,lineNumber:u,numberColumn:t,numberElement:o,side:void 0,splitLineIndex:f,...c}:{kind:`token`,lineType:n,lineElement:i,lineNumber:u,numberColumn:t,numberElement:o,side:rw(n,r),splitLineIndex:f,...c}}isSplitDiff(){return this.pre?.getAttribute(`data-diff-type`)===`split`}parseLineIndex(e,t){let n=(e.getAttribute(`data-line-index`)??``).split(`,`).map(e=>Number.parseInt(e,10)).filter(e=>!Number.isNaN(e));if(t&&n.length===2)return n[1];if(!t)return n[0]}};function VC({enableTokenInteractionsOnWhitespace:e,enableGutterUtility:t,lineHoverHighlight:n,onGutterUtilityClick:r,onLineClick:i,onLineEnter:a,onLineLeave:o,onLineNumberClick:s,onTokenClick:c,onTokenEnter:l,onTokenLeave:u,renderGutterUtility:d,__debugPointerEvents:f,enableLineSelection:p,controlledSelection:m,onLineSelected:h,onLineSelectionStart:g,onLineSelectionChange:_,onLineSelectionEnd:v},y,b,x){return{enableTokenInteractionsOnWhitespace:e,enableGutterUtility:HC({enableGutterUtility:t,renderGutterUtility:d,onGutterUtilityClick:r}),usesCustomGutterUtility:d!=null,lineHoverHighlight:n,onGutterUtilityClick:r,onHunkExpand:y,onMergeConflictActionClick:x,onLineClick:i,onLineEnter:a,onLineLeave:o,onLineNumberClick:s,onTokenClick:c,onTokenEnter:l,onTokenLeave:u,__debugPointerEvents:f,enableLineSelection:p,controlledSelection:m,onLineSelected:h,onLineSelectionStart:g,onLineSelectionChange:_,onLineSelectionEnd:v,getLineIndex:b}}function HC({enableGutterUtility:e,renderGutterUtility:t,onGutterUtilityClick:n}){if(n!=null&&t!=null)throw Error(`Cannot use both 'onGutterUtilityClick' and 'renderGutterUtility'. Use only one gutter utility API.`);return e??!1}function UC(e){return e!=null&&`kind`in e&&e.kind===`line`}function WC(e){return e!=null&&`kind`in e&&e.kind===`token`}function GC(e){return UC(e)||WC(e)}function KC(e){return`type`in e&&e.type===`line-info`}function qC(e){return`kind`in e&&e.kind===`merge-conflict-action`}function JC(e){return e===`current`||e===`incoming`||e===`both`}function YC(e,t){let n=e?.querySelector(t);return n instanceof HTMLElement?n:void 0}function XC(e){let t=[],n=e;for(;n!=null;)t.push(n),n=n.parentNode;return t}function ZC(e){let t=e.closest(`[data-line], [data-column-number]`);if(t instanceof HTMLElement)return t;let n=e.closest(`[data-line-annotation], [data-gutter-buffer="annotation"]`);if(!(n instanceof HTMLElement))return;let r=n.previousElementSibling;return r instanceof HTMLElement&&(r.hasAttribute(`data-line`)||r.hasAttribute(`data-column-number`))?r:void 0}function QC(e){let t=e.closest(`[slot^="annotation-"]`);if(t instanceof HTMLElement)return t.getAttribute(`slot`)??void 0;if(e instanceof HTMLElement){let t=e.getAttribute(`name`)??void 0;return t!=null&&t.startsWith(`annotation-`)?t:void 0}}function $C(e){if(e==null)return;let t=/^annotation-(?:(additions|deletions)-)?(\d+)$/.exec(e);if(t==null)return;let n=Number.parseInt(t[2],10);if(!(!Number.isFinite(n)||n<=0))return{lineNumber:n,side:t[1]}}function ew(e){return e!=null&&typeof e.elementFromPoint==`function`}function tw(e,t){return e===t||fb(e??void 0,t??void 0)}function nw(e,t){return e?.highlightSide===t.highlightSide&&e?.lineNumberOnly===t.lineNumberOnly&&tw(e?.range??null,t.range)}function rw(e,t){switch(e){case`change-deletion`:return`deletions`;case`change-addition`:return`additions`;default:return t.hasAttribute(`data-deletions`)?`deletions`:`additions`}}function iw(e){let t=e.getAttribute(`data-line-type`);if(t!=null)switch(t){case`change-deletion`:case`change-addition`:case`context`:case`context-expanded`:return t;default:return}}function aw(e=`none`,t,...n){switch(e){case`none`:return;case`both`:break;case`click`:if(t!==`click`)return;break;case`move`:if(t!==`move`)return}console.log(...n)}var ow=class e{static resizeObserver;static managersByElement=new Map;static getResizeObserver(){let t=e.resizeObserver??new ResizeObserver(e.handleSharedResizeEntries);return e.resizeObserver=t,t}static handleSharedResizeEntries(t){let n=new Map;for(let r of t){let t=e.managersByElement.get(r.target);if(t==null)continue;let i=n.get(t);i==null?n.set(t,[r]):i.push(r)}for(let[e,t]of n)e.handleResizeEntries(t)}observedNodes=new Map;setup(e,{disableAnnotations:t,columnVariables:n=`apply`}){let r=new Set,i=n===`apply`,a=0,o=new Map(this.observedNodes);this.observedNodes.clear();for(let t of e.children){if(a===2)break;let e=(()=>{if(t instanceof HTMLElement&&t.tagName===`CODE`)return t})();if(e==null)continue;a++;let n=o.get(e);if(n!=null&&n.type!==`code`)throw Error(`ResizeManager.setup: somehow a code node is being used for an annotation, should be impossible`);let r=e.firstElementChild;r instanceof HTMLElement||(r=null),n==null?(n={type:`code`,codeElement:e,numberElement:r,codeWidth:`auto`,numberWidth:0,applyColumnVariables:i},this.observedNodes.set(e,n),this.observe(e),r!=null&&(this.observedNodes.set(r,n),this.observe(r))):(this.observedNodes.set(e,n),o.delete(e),n.numberElement===r?n.numberElement==null?n.numberWidth=0:(o.delete(n.numberElement),this.observedNodes.set(n.numberElement,n)):(n.numberElement!=null&&(this.unobserve(n.numberElement),o.delete(n.numberElement)),r!=null&&(this.observe(r),o.delete(r),this.observedNodes.set(r,n)),n.numberElement=r,n.numberWidth=0),lw(n,i))}if(a>1&&!t){let t=e.querySelectorAll(`[data-line-annotation*=","]`),n=new Map;for(let e of t){if(!(e instanceof HTMLElement))continue;let t=e.getAttribute(`data-line-annotation`)??``;if(!/^-?\d+,-?\d+$/.test(t)){console.error(`DiffFileRenderer.setupResizeObserver: Invalid element or annotation`,{lineAnnotation:t,element:e});continue}let r=n.get(t);r??(r=[],n.set(t,r)),r.push(e)}for(let[e,t]of n){if(t.length!==2){console.error(`DiffFileRenderer.setupResizeObserver: Bad Pair`,e,t);continue}let[n,i]=t,a=n.firstElementChild,s=i.firstElementChild;if(!(n instanceof HTMLElement)||!(i instanceof HTMLElement)||!(a instanceof HTMLElement)||!(s instanceof HTMLElement))continue;let c=o.get(a);if(c!=null){this.observedNodes.set(a,c),this.observedNodes.set(s,c),o.delete(a),o.delete(s);continue}let l=a.getBoundingClientRect().height,u=s.getBoundingClientRect().height;c={type:`annotations`,column1:{container:n,child:a,childHeight:l},column2:{container:i,child:s,childHeight:u},currentHeight:`auto`},r.add({child1:a,child2:s,item:c,newHeight:Math.max(l,u)})}for(let e of r)this.applyNewHeight(e.item,e.newHeight),this.observedNodes.set(e.child1,e.item),this.observedNodes.set(e.child2,e.item),this.observe(e.child1),this.observe(e.child2);r.clear()}for(let[e,t]of o)this.unobserve(e),t.type===`code`?fw(t):pw(t);o.clear()}cleanUp(){for(let e of this.observedNodes.keys())this.unobserve(e);this.observedNodes.clear()}observe(t){let{managersByElement:n}=e,r=n.get(t);if(r!==this){if(r!=null&&r!==this)throw Error(`ResizeManager.observe: element is already owned by another ResizeManager`);n.set(t,this),e.getResizeObserver().observe(t)}}unobserve(t){let{managersByElement:n,resizeObserver:r}=e,i=n.get(t);if(i!=null){if(i!==this)throw Error(`ResizeManager.unobserve: element is owned by another ResizeManager`);n.delete(t),r?.unobserve(t),r!=null&&n.size===0&&(r.disconnect(),e.resizeObserver=void 0)}}handleResizeEntries(e){let t=new Map,n=new Set;for(let r of e){let{target:e,borderBoxSize:i,contentBoxSize:a}=r;if(!(e instanceof HTMLElement)){console.error(`ResizeManager.handleResizeEntries: Invalid element for ResizeObserver`,r);continue}let o=this.observedNodes.get(e);if(o==null){console.error(`ResizeManager.handleResizeEntries: Not a valid observed node`,r);continue}if(o.type===`annotations`){let t=(()=>{if(e===o.column1.child)return o.column1;if(e===o.column2.child)return o.column2})();if(t==null){console.error(`ResizeManager.handleResizeEntries: Couldn't find a column for`,{item:o,target:e});continue}t.childHeight=i[0].blockSize,n.add(o)}else if(o.type===`code`){let n=t.get(o)??{},r=a[0].inlineSize;e===o.codeElement?n.codeInlineSize=r:e===o.numberElement&&(n.numberInlineSize=r),t.set(o,n)}}this.applyAnnotationUpdates(n),n.clear(),this.applyColumnUpdates(t),t.clear()}applyAnnotationUpdates(e){for(let t of e)this.applyNewHeight(t,Math.max(t.column1.childHeight,t.column2.childHeight))}applyColumnUpdates=e=>{for(let[t,n]of e){let e=n.codeInlineSize==null?t.codeWidth:sw(n.codeInlineSize),r=n.numberInlineSize==null?t.numberWidth:cw(n.numberInlineSize),i=e!==t.codeWidth,a=r!==t.numberWidth;!i&&!a||(t.codeWidth=e,t.numberWidth=r,t.applyColumnVariables&&uw(t,{codeWidthChanged:i,numberWidthChanged:a}))}};applyNewHeight(e,t){t!==e.currentHeight&&(e.currentHeight=Math.max(t,0),e.column1.container.style.setProperty(`--diffs-annotation-min-height`,`${e.currentHeight}px`),e.column2.container.style.setProperty(`--diffs-annotation-min-height`,`${e.currentHeight}px`))}};function sw(e){let t=Math.max(Math.floor(e),0);return t===0?`auto`:t}function cw(e){return Math.max(Math.ceil(e),0)}function lw(e,t){e.applyColumnVariables!==t&&(e.applyColumnVariables=t,t?uw(e,{codeWidthChanged:!0,numberWidthChanged:!0}):dw(e))}function uw(e,{codeWidthChanged:t,numberWidthChanged:n}){let{codeElement:r,codeWidth:i,numberWidth:a}=e;if(t&&r.style.setProperty(`--diffs-column-width`,`${typeof i==`number`?`${i}px`:`auto`}`),n&&r.style.setProperty(`--diffs-column-number-width`,`${a===0?`auto`:`${a}px`}`),t||n&&i!==`auto`){let e=typeof i==`number`?Math.max(i-a,0):0;r.style.setProperty(`--diffs-column-content-width`,`${e>0?`${e}px`:`auto`}`)}}function dw(e){e.codeElement.style.removeProperty(`--diffs-column-content-width`),e.codeElement.style.removeProperty(`--diffs-column-number-width`),e.codeElement.style.removeProperty(`--diffs-column-width`)}function fw(e){e.codeElement.isConnected&&dw(e)}function pw(e){e.column1.container.isConnected&&e.column1.container.style.removeProperty(`--diffs-annotation-min-height`),e.column2.container.isConnected&&e.column2.container.style.removeProperty(`--diffs-annotation-min-height`)}var mw=new Map,hw=new Map,gw=new Map,_w=new Set;function vw(e){for(let t of Array.isArray(e)?e:[e])if(t!==`text`&&t!==`ansi`&&!_w.has(t))return!1;return!0}function yw(e,t){e=Array.isArray(e)?e:[e];for(let n of e){if(_w.has(n.name))continue;let e=mw.get(n.name);e??(e=n,mw.set(n.name,e)),_w.add(e.name),t.loadLanguageSync(e.data)}}function bw(){return typeof WorkerGlobalScope<`u`&&typeof self<`u`&&self instanceof WorkerGlobalScope}var xw=Object.defineProperty,Sw=Object.getOwnPropertyDescriptor,Cw=Object.getOwnPropertyNames,ww=Object.prototype.hasOwnProperty,Tw=(e,t)=>{let n={};for(var r in e)xw(n,r,{get:e[r],enumerable:!0});return t||xw(n,Symbol.toStringTag,{value:`Module`}),n},Ew=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=Cw(t),a=0,o=i.length,s;a<o;a++)s=i[a],!ww.call(e,s)&&s!==n&&xw(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=Sw(t,s))||r.enumerable});return e},Dw=(e,t,n)=>(Ew(e,t,`default`),n&&Ew(n,t,`default`)),Ow=(function(){let e=typeof document<`u`&&document.createElement(`link`).relList;return e&&e.supports&&e.supports(`modulepreload`)?`modulepreload`:`preload`})(),kw=function(e){return`/`+e},Aw={},K=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=kw(t,n),t=s(t),t in Aw)return;Aw[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:Ow,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},jw=[{id:`abap`,name:`ABAP`,import:(()=>K(()=>import(`./_CLvhMVsD.js`),[]))},{id:`actionscript-3`,name:`ActionScript`,aliases:[`actionscript`,`as3`],import:(()=>K(()=>import(`./_Cs6JJXT5.js`),[]))},{id:`ada`,name:`Ada`,import:(()=>K(()=>import(`./_C5qYipkI.js`),[]))},{id:`ahk`,name:`AutoHotkey`,aliases:[`ahk1`],import:(()=>K(()=>import(`./_CA9gdOdF.js`),[]))},{id:`ahk2`,name:`AutoHotkey2`,import:(()=>K(()=>import(`./__6rzW9BS.js`),[]))},{id:`angular-html`,name:`Angular HTML`,import:(()=>K(()=>import(`./_B3VJsccP.js`).then(e=>e.n),__vite__mapDeps([0,1,2,3])))},{id:`angular-ts`,name:`Angular TypeScript`,import:(()=>K(()=>import(`./_C-rQpLhV.js`),__vite__mapDeps([4,0,1,2,3,5])))},{id:`apache`,name:`Apache Conf`,import:(()=>K(()=>import(`./_U0d_L8uA.js`),[]))},{id:`apex`,name:`Apex`,import:(()=>K(()=>import(`./_KFGFyKwG.js`),[]))},{id:`apl`,name:`APL`,import:(()=>K(()=>import(`./_DzZk65e-.js`),__vite__mapDeps([6,2,3,1,7,8,9])))},{id:`applescript`,name:`AppleScript`,import:(()=>K(()=>import(`./_CCn79oCD.js`),[]))},{id:`ara`,name:`Ara`,import:(()=>K(()=>import(`./_4CJ0cIlV.js`),[]))},{id:`asciidoc`,name:`AsciiDoc`,aliases:[`adoc`],import:(()=>K(()=>import(`./_SCjQUq34.js`),[]))},{id:`asm`,name:`Assembly`,import:(()=>K(()=>import(`./_Cmm7eHzH.js`),[]))},{id:`astro`,name:`Astro`,import:(()=>K(()=>import(`./_DuEDhE7_.js`),__vite__mapDeps([10,2,3,9,11,12,13])))},{id:`awk`,name:`AWK`,import:(()=>K(()=>import(`./_BWXHIvNe2.js`),[]))},{id:`ballerina`,name:`Ballerina`,import:(()=>K(()=>import(`./_B7ZEbQpA2.js`),[]))},{id:`bat`,name:`Batch File`,aliases:[`batch`,`cmd`],import:(()=>K(()=>import(`./_qdxAdBWQ2.js`),[]))},{id:`beancount`,name:`Beancount`,import:(()=>K(()=>import(`./_D-usSTwE2.js`),[]))},{id:`berry`,name:`Berry`,aliases:[`be`],import:(()=>K(()=>import(`./_DKpUyyne2.js`),[]))},{id:`bibtex`,name:`BibTeX`,import:(()=>K(()=>import(`./_Ci_nEsc72.js`),[]))},{id:`bicep`,name:`Bicep`,import:(()=>K(()=>import(`./_CUHmPFLl2.js`),[]))},{id:`bird2`,name:`BIRD2 Configuration`,aliases:[`bird`],import:(()=>K(()=>import(`./_CYIUgYqB2.js`),[]))},{id:`blade`,name:`Blade`,import:(()=>K(()=>import(`./_CVaw8Um22.js`),__vite__mapDeps([14,2,3,1,7,8,9,15,16])))},{id:`bsl`,name:`1C (Enterprise)`,aliases:[`1c`],import:(()=>K(()=>import(`./_CpYNKFv52.js`),__vite__mapDeps([17,18])))},{id:`c`,name:`C`,import:(()=>K(()=>import(`./_1ekz7WZH2.js`).then(e=>e.n),[]))},{id:`c3`,name:`C3`,import:(()=>K(()=>import(`./_D0apG41V2.js`),[]))},{id:`cadence`,name:`Cadence`,aliases:[`cdc`],import:(()=>K(()=>import(`./_CQ2zXKGN2.js`),[]))},{id:`cairo`,name:`Cairo`,import:(()=>K(()=>import(`./_kIpfj7zU2.js`),__vite__mapDeps([19,20])))},{id:`chapel`,name:`Chapel`,aliases:[`chpl`],import:(()=>K(()=>import(`./_CleGVtQz2.js`),__vite__mapDeps([21,22])))},{id:`clarity`,name:`Clarity`,import:(()=>K(()=>import(`./_CtfBBspg2.js`),[]))},{id:`clojure`,name:`Clojure`,aliases:[`clj`],import:(()=>K(()=>import(`./_DqKBuwfJ2.js`),[]))},{id:`cmake`,name:`CMake`,import:(()=>K(()=>import(`./_Bj61d0ZC2.js`),[]))},{id:`cobol`,name:`COBOL`,import:(()=>K(()=>import(`./_DuSeBQp62.js`),__vite__mapDeps([23,1,2,3,8])))},{id:`codeowners`,name:`CODEOWNERS`,import:(()=>K(()=>import(`./_C8r90Shi2.js`),[]))},{id:`codeql`,name:`CodeQL`,aliases:[`ql`],import:(()=>K(()=>import(`./_oeQT6MSM2.js`),[]))},{id:`coffee`,name:`CoffeeScript`,aliases:[`coffeescript`],import:(()=>K(()=>import(`./_ByTPjRw62.js`),__vite__mapDeps([24,2])))},{id:`common-lisp`,name:`Common Lisp`,aliases:[`lisp`],import:(()=>K(()=>import(`./_Cv5bFMCO.js`),[]))},{id:`coq`,name:`Rocq`,import:(()=>K(()=>import(`./_DuBRPxYg.js`),[]))},{id:`cpp`,name:`C++`,aliases:[`c++`],import:(()=>K(()=>import(`./_BmHD_PQz.js`).then(e=>e.n),__vite__mapDeps([25,26,27,22])))},{id:`crystal`,name:`Crystal`,import:(()=>K(()=>import(`./_DxpMxX_U.js`),__vite__mapDeps([28,2,3,1,16,22,29])))},{id:`csharp`,name:`C#`,aliases:[`c#`,`cs`],import:(()=>K(()=>import(`./_oqKa8noW.js`),[]))},{id:`css`,name:`CSS`,import:(()=>K(()=>import(`./_D3xYfaOf.js`).then(e=>e.n),[]))},{id:`csv`,name:`CSV`,import:(()=>K(()=>import(`./_Dx-8-gkx.js`),[]))},{id:`cue`,name:`CUE`,import:(()=>K(()=>import(`./_CE9AQfxI.js`),[]))},{id:`cypher`,name:`Cypher`,aliases:[`cql`],import:(()=>K(()=>import(`./_ClKdZ_lG.js`),[]))},{id:`d`,name:`D`,import:(()=>K(()=>import(`./_qD-0Kul2.js`),[]))},{id:`dart`,name:`Dart`,import:(()=>K(()=>import(`./_CnvKMtbv.js`),[]))},{id:`dax`,name:`DAX`,import:(()=>K(()=>import(`./_BkyTk9wS.js`),[]))},{id:`desktop`,name:`Desktop`,import:(()=>K(()=>import(`./_Dlh5hvp9.js`),[]))},{id:`diff`,name:`Diff`,import:(()=>K(()=>import(`./_woXpYk--.js`),[]))},{id:`docker`,name:`Dockerfile`,aliases:[`dockerfile`],import:(()=>K(()=>import(`./_IyjqRm3v.js`),[]))},{id:`dotenv`,name:`dotEnv`,import:(()=>K(()=>import(`./__5a1GRtc.js`),[]))},{id:`dream-maker`,name:`Dream Maker`,import:(()=>K(()=>import(`./_DW3nJb8Q.js`),[]))},{id:`edge`,name:`Edge`,import:(()=>K(()=>import(`./_BD5amGrQ.js`),__vite__mapDeps([30,1,2,3,11,15])))},{id:`elixir`,name:`Elixir`,import:(()=>K(()=>import(`./_QYUGbx7I.js`),__vite__mapDeps([31,1,2,3])))},{id:`elm`,name:`Elm`,import:(()=>K(()=>import(`./_CfAVvRJH.js`),__vite__mapDeps([32,27,22])))},{id:`emacs-lisp`,name:`Emacs Lisp`,aliases:[`elisp`],import:(()=>K(()=>import(`./_c_oH4hRZ.js`),[]))},{id:`erb`,name:`ERB`,import:(()=>K(()=>import(`./_-PHnfq4a.js`),__vite__mapDeps([33,1,2,3,34,7,8,16,22,25,26,27,29,35,36,11,13,37,38,39])))},{id:`erlang`,name:`Erlang`,aliases:[`erl`],import:(()=>K(()=>import(`./_BaHq4SXp.js`),__vite__mapDeps([40,41])))},{id:`fennel`,name:`Fennel`,import:(()=>K(()=>import(`./_DQxkIbk2.js`),[]))},{id:`fish`,name:`Fish`,import:(()=>K(()=>import(`./_BJitypiv.js`),[]))},{id:`fluent`,name:`Fluent`,aliases:[`ftl`],import:(()=>K(()=>import(`./_C03EYrpw.js`),[]))},{id:`fortran-fixed-form`,name:`Fortran (Fixed Form)`,aliases:[`f`,`for`,`f77`],import:(()=>K(()=>import(`./_CQJs3lWb.js`),__vite__mapDeps([42,43])))},{id:`fortran-free-form`,name:`Fortran (Free Form)`,aliases:[`f90`,`f95`,`f03`,`f08`,`f18`],import:(()=>K(()=>import(`./_CYNrtFtB.js`),[]))},{id:`fsharp`,name:`F#`,aliases:[`f#`,`fs`],import:(()=>K(()=>import(`./_DmIc4jLQ.js`),__vite__mapDeps([44,41])))},{id:`gdresource`,name:`GDResource`,aliases:[`tscn`,`tres`],import:(()=>K(()=>import(`./_CY8IvGdO2.js`),__vite__mapDeps([45,46,47])))},{id:`gdscript`,name:`GDScript`,aliases:[`gd`],import:(()=>K(()=>import(`./_DYvRD3hg2.js`),[]))},{id:`gdshader`,name:`GDShader`,import:(()=>K(()=>import(`./_CBce3t8t2.js`),[]))},{id:`genie`,name:`Genie`,import:(()=>K(()=>import(`./_CV2tkWYe2.js`),[]))},{id:`gherkin`,name:`Gherkin`,import:(()=>K(()=>import(`./_DExj1W_82.js`),[]))},{id:`git-commit`,name:`Git Commit Message`,import:(()=>K(()=>import(`./_Dl-2e7rI2.js`),__vite__mapDeps([48,49])))},{id:`git-rebase`,name:`Git Rebase Message`,import:(()=>K(()=>import(`./_CG70dRIO2.js`),__vite__mapDeps([50,29])))},{id:`gleam`,name:`Gleam`,import:(()=>K(()=>import(`./_CSRkHgEL2.js`),[]))},{id:`glimmer-js`,name:`Glimmer JS`,aliases:[`gjs`],import:(()=>K(()=>import(`./_C1Q5Y-qX2.js`),__vite__mapDeps([51,2,3,1,11])))},{id:`glimmer-ts`,name:`Glimmer TS`,aliases:[`gts`],import:(()=>K(()=>import(`./_xSxIYOF32.js`),__vite__mapDeps([52,2,3,1,11])))},{id:`glsl`,name:`GLSL`,import:(()=>K(()=>import(`./_RlilnCgQ.js`).then(e=>e.n),__vite__mapDeps([27,22])))},{id:`gn`,name:`GN`,import:(()=>K(()=>import(`./_ilITqXS62.js`),[]))},{id:`gnuplot`,name:`Gnuplot`,import:(()=>K(()=>import(`./_7GGW24-e2.js`),[]))},{id:`go`,name:`Go`,import:(()=>K(()=>import(`./_rLFTqkRN2.js`),[]))},{id:`graphql`,name:`GraphQL`,aliases:[`gql`],import:(()=>K(()=>import(`./_L4EiQqOc.js`).then(e=>e.n),__vite__mapDeps([36,2,11,13,37])))},{id:`groovy`,name:`Groovy`,import:(()=>K(()=>import(`./_CacY0gHj2.js`),[]))},{id:`hack`,name:`Hack`,import:(()=>K(()=>import(`./_CMTwhWsT2.js`),__vite__mapDeps([53,1,2,3,16])))},{id:`haml`,name:`Ruby Haml`,import:(()=>K(()=>import(`./_BtgxAMFg.js`).then(e=>e.n),__vite__mapDeps([35,2,3])))},{id:`handlebars`,name:`Handlebars`,aliases:[`hbs`],import:(()=>K(()=>import(`./_4hF1nRbz2.js`),__vite__mapDeps([54,2,3,1,39])))},{id:`haskell`,name:`Haskell`,aliases:[`hs`],import:(()=>K(()=>import(`./_D8IpX4py2.js`),[]))},{id:`haxe`,name:`Haxe`,import:(()=>K(()=>import(`./_C8oCnwJJ2.js`),[]))},{id:`hcl`,name:`HashiCorp HCL`,import:(()=>K(()=>import(`./_Dh228itO2.js`),[]))},{id:`hjson`,name:`Hjson`,import:(()=>K(()=>import(`./_CxZEssPk2.js`),[]))},{id:`hlsl`,name:`HLSL`,import:(()=>K(()=>import(`./_Cvrh5tZx2.js`),[]))},{id:`html`,name:`HTML`,import:(()=>K(()=>import(`./_9xw8jbbj.js`).then(e=>e.n),__vite__mapDeps([1,2,3])))},{id:`html-derivative`,name:`HTML (Derivative)`,import:(()=>K(()=>import(`./_SgPPrTlV2.js`),__vite__mapDeps([15,1,2,3])))},{id:`http`,name:`HTTP`,import:(()=>K(()=>import(`./_Cow3qpju2.js`),__vite__mapDeps([55,7,8,9,29,36,2,11,13,37])))},{id:`hurl`,name:`Hurl`,import:(()=>K(()=>import(`./_CLIa1YQd2.js`),__vite__mapDeps([56,7,8,57,36,2,11,13,37])))},{id:`hxml`,name:`HXML`,import:(()=>K(()=>import(`./_DLbMbJfH2.js`),__vite__mapDeps([58,59])))},{id:`hy`,name:`Hy`,import:(()=>K(()=>import(`./_CZbG8q4J2.js`),[]))},{id:`imba`,name:`Imba`,import:(()=>K(()=>import(`./_DsUTQ-LC2.js`),[]))},{id:`ini`,name:`INI`,aliases:[`properties`],import:(()=>K(()=>import(`./_B5eOa1yu.js`),[]))},{id:`java`,name:`Java`,import:(()=>K(()=>import(`./_CEKQC0zT.js`).then(e=>e.n),[]))},{id:`javascript`,name:`JavaScript`,aliases:[`js`,`cjs`,`mjs`],import:(()=>K(()=>import(`./_BCxZLbx3.js`).then(e=>e.n),[]))},{id:`jinja`,name:`Jinja`,import:(()=>K(()=>import(`./_Co9z77Nx.js`),__vite__mapDeps([60,1,2,3])))},{id:`jison`,name:`Jison`,import:(()=>K(()=>import(`./_COiMaMJZ.js`),__vite__mapDeps([61,2])))},{id:`json`,name:`JSON`,import:(()=>K(()=>import(`./_BwD36Jxt.js`).then(e=>e.n),[]))},{id:`json5`,name:`JSON5`,import:(()=>K(()=>import(`./_BR5RXkoi.js`),[]))},{id:`jsonc`,name:`JSON with Comments`,import:(()=>K(()=>import(`./_CYpm1nAK.js`),[]))},{id:`jsonl`,name:`JSON Lines`,import:(()=>K(()=>import(`./_CmCQp5Yx.js`),[]))},{id:`jsonnet`,name:`Jsonnet`,import:(()=>K(()=>import(`./_CJTPZ8u_.js`),[]))},{id:`jssm`,name:`JSSM`,aliases:[`fsl`],import:(()=>K(()=>import(`./_DXw9l8Rf.js`),[]))},{id:`jsx`,name:`JSX`,import:(()=>K(()=>import(`./_Ch8Be5o8.js`).then(e=>e.n),[]))},{id:`julia`,name:`Julia`,aliases:[`jl`],import:(()=>K(()=>import(`./_h0ukKclW.js`),__vite__mapDeps([62,2,16,20,25,26,27,22,63])))},{id:`just`,name:`Just`,aliases:[`justfile`],import:(()=>K(()=>import(`./_DyPhwgp5.js`),__vite__mapDeps([64,2,11,20,29,34,3,1,7,8,16,22,25,26,27,35,36,13,37,38,39,65])))},{id:`kdl`,name:`KDL`,import:(()=>K(()=>import(`./_CsD5j6eV.js`),[]))},{id:`kotlin`,name:`Kotlin`,aliases:[`kt`,`kts`],import:(()=>K(()=>import(`./_DhhofPvG.js`),[]))},{id:`kusto`,name:`Kusto`,aliases:[`kql`],import:(()=>K(()=>import(`./_C7mF5XQf.js`),[]))},{id:`latex`,name:`LaTeX`,import:(()=>K(()=>import(`./_BtLeIMtD.js`),__vite__mapDeps([66,67,63])))},{id:`lean`,name:`Lean 4`,aliases:[`lean4`],import:(()=>K(()=>import(`./_CewbzKMR.js`),[]))},{id:`less`,name:`Less`,import:(()=>K(()=>import(`./_DVTAwKKz.js`),[]))},{id:`liquid`,name:`Liquid`,import:(()=>K(()=>import(`./_DY1svXxJ.js`),__vite__mapDeps([68,2,3,1,9])))},{id:`llvm`,name:`LLVM IR`,import:(()=>K(()=>import(`./_DqHOMS-s.js`),[]))},{id:`log`,name:`Log file`,import:(()=>K(()=>import(`./_BNLmms1o.js`),[]))},{id:`logo`,name:`Logo`,import:(()=>K(()=>import(`./_Cluzi2Zq.js`),[]))},{id:`lua`,name:`Lua`,import:(()=>K(()=>import(`./_nefOiZv8.js`).then(e=>e.n),__vite__mapDeps([38,22])))},{id:`luau`,name:`Luau`,import:(()=>K(()=>import(`./_C2pBCSgt.js`),[]))},{id:`make`,name:`Makefile`,aliases:[`makefile`],import:(()=>K(()=>import(`./_Dixweg8N.js`),[]))},{id:`markdown`,name:`Markdown`,aliases:[`md`],import:(()=>K(()=>import(`./_BYOwaDjH.js`),[]))},{id:`marko`,name:`Marko`,import:(()=>K(()=>import(`./_BLtivKRU.js`),__vite__mapDeps([69,3,5,11,70])))},{id:`matlab`,name:`MATLAB`,import:(()=>K(()=>import(`./_D7qyCx1q.js`),[]))},{id:`mdc`,name:`MDC`,import:(()=>K(()=>import(`./_CT_4g0KI.js`),__vite__mapDeps([71,15,1,2,3,39,41])))},{id:`mdx`,name:`MDX`,import:(()=>K(()=>import(`./_DQZ5AkYe.js`),[]))},{id:`mermaid`,name:`Mermaid`,aliases:[`mmd`],import:(()=>K(()=>import(`./_BxpfTIzt.js`),[]))},{id:`mipsasm`,name:`MIPS Assembly`,aliases:[`mips`],import:(()=>K(()=>import(`./_BMqwQI7S.js`),[]))},{id:`mojo`,name:`Mojo`,import:(()=>K(()=>import(`./_CFuIV2fl.js`),[]))},{id:`moonbit`,name:`MoonBit`,aliases:[`mbt`,`mbti`],import:(()=>K(()=>import(`./_DgjMoLWr.js`),[]))},{id:`move`,name:`Move`,import:(()=>K(()=>import(`./_BYnGhZoM.js`),[]))},{id:`narrat`,name:`Narrat Language`,aliases:[`nar`],import:(()=>K(()=>import(`./__X_XdTYD.js`),[]))},{id:`nextflow`,name:`Nextflow`,aliases:[`nf`],import:(()=>K(()=>import(`./_DWQbgPoS.js`),__vite__mapDeps([72,73])))},{id:`nextflow-groovy`,name:`Nextflow Groovy`,import:(()=>K(()=>import(`./_DJMQeKeT.js`),[]))},{id:`nginx`,name:`Nginx`,import:(()=>K(()=>import(`./_DNzHuu0T.js`),__vite__mapDeps([74,38,22])))},{id:`nim`,name:`Nim`,import:(()=>K(()=>import(`./_vUbaa6R_2.js`),__vite__mapDeps([75,2,3,1,7,8,22,27,41])))},{id:`nix`,name:`Nix`,import:(()=>K(()=>import(`./_IvuFDN5E2.js`),[]))},{id:`nsis`,name:`NSIS`,import:(()=>K(()=>import(`./_CjNLYCLg2.js`),[]))},{id:`nushell`,name:`nushell`,aliases:[`nu`],import:(()=>K(()=>import(`./_DHYfO66s2.js`),[]))},{id:`objective-c`,name:`Objective-C`,aliases:[`objc`],import:(()=>K(()=>import(`./_D1A_Heim2.js`),[]))},{id:`objective-cpp`,name:`Objective-C++`,import:(()=>K(()=>import(`./_BsSzOQcm2.js`),[]))},{id:`ocaml`,name:`OCaml`,import:(()=>K(()=>import(`./_O90oeIOV2.js`),[]))},{id:`odin`,name:`Odin`,import:(()=>K(()=>import(`./_B1RWQWA52.js`),[]))},{id:`openscad`,name:`OpenSCAD`,aliases:[`scad`],import:(()=>K(()=>import(`./_BUDT5pXO2.js`),[]))},{id:`org`,name:`Org Markup`,import:(()=>K(()=>import(`./_CRki4AYt2.js`),__vite__mapDeps([76,2,3,1,5,8,7,9,11,13,16,22,20,77,24,26,25,27,29,78,79,49,80,31,38,39,34,35,36,37,41,40,48,50,81,82,83,63,65,66,67,70,84,75,85,86,87,88,89,90,91,92,93])))},{id:`pascal`,name:`Pascal`,import:(()=>K(()=>import(`./_4ZHwLPI52.js`),[]))},{id:`perl`,name:`Perl`,import:(()=>K(()=>import(`./_CZnxQQgK.js`),__vite__mapDeps([65,2,3,1,7,8,16])))},{id:`php`,name:`PHP`,import:(()=>K(()=>import(`./_Oze5lLxj2.js`),__vite__mapDeps([87,2,3,1,7,8,9,16])))},{id:`pkl`,name:`Pkl`,import:(()=>K(()=>import(`./_ot-7Btpt2.js`),[]))},{id:`plsql`,name:`PL/SQL`,import:(()=>K(()=>import(`./_DGHpHOYJ2.js`),[]))},{id:`po`,name:`Gettext PO`,aliases:[`pot`,`potx`],import:(()=>K(()=>import(`./_BiJDBrnU2.js`),[]))},{id:`polar`,name:`Polar`,import:(()=>K(()=>import(`./_C7UOKdEL2.js`),[]))},{id:`postcss`,name:`PostCSS`,import:(()=>K(()=>import(`./_BXeXVLqQ.js`),[]))},{id:`powerquery`,name:`PowerQuery`,import:(()=>K(()=>import(`./_DNMTfnFr2.js`),[]))},{id:`powershell`,name:`PowerShell`,aliases:[`ps`,`ps1`,`pwsh`],import:(()=>K(()=>import(`./_CCSX75yM2.js`),[]))},{id:`prisma`,name:`Prisma`,import:(()=>K(()=>import(`./_DMgNhnYS2.js`),[]))},{id:`prolog`,name:`Prolog`,import:(()=>K(()=>import(`./_iXnhIJG72.js`),[]))},{id:`proto`,name:`Protocol Buffer 3`,aliases:[`protobuf`],import:(()=>K(()=>import(`./_DB4EqR-F.js`),[]))},{id:`pug`,name:`Pug`,aliases:[`jade`],import:(()=>K(()=>import(`./_DlvFdJCo.js`),__vite__mapDeps([94,2,3,1])))},{id:`puppet`,name:`Puppet`,import:(()=>K(()=>import(`./_CDv2pdJW.js`),[]))},{id:`purescript`,name:`PureScript`,import:(()=>K(()=>import(`./_9MfHhQsQ.js`),[]))},{id:`python`,name:`Python`,aliases:[`py`],import:(()=>K(()=>import(`./_gzcpVVnB2.js`),[]))},{id:`qml`,name:`QML`,import:(()=>K(()=>import(`./_BO7vkzOE.js`),__vite__mapDeps([95,2])))},{id:`qmldir`,name:`QML Directory`,import:(()=>K(()=>import(`./_DCQb3MpD.js`),[]))},{id:`qss`,name:`Qt Style Sheets`,import:(()=>K(()=>import(`./_Fe1Jh2GI.js`),[]))},{id:`r`,name:`R`,import:(()=>K(()=>import(`./_BB-k_pmY.js`).then(e=>e.n),[]))},{id:`racket`,name:`Racket`,import:(()=>K(()=>import(`./_DcIDlBhZ.js`),[]))},{id:`raku`,name:`Raku`,aliases:[`perl6`],import:(()=>K(()=>import(`./_B3gFvitq2.js`),[]))},{id:`razor`,name:`ASP.NET Razor`,import:(()=>K(()=>import(`./_VD6oOoMX.js`),__vite__mapDeps([96,1,2,3,78])))},{id:`rbs`,name:`RBS`,aliases:[`ruby-signature`],import:(()=>K(()=>import(`./_C0MpOrj4.js`),[]))},{id:`reg`,name:`Windows Registry Script`,import:(()=>K(()=>import(`./_CRGYupPL.js`),[]))},{id:`regexp`,name:`RegExp`,aliases:[`regex`],import:(()=>K(()=>import(`./_IMDOu8ab.js`).then(e=>e.n),[]))},{id:`rel`,name:`Rel`,import:(()=>K(()=>import(`./_BtDbiS_P.js`),[]))},{id:`riscv`,name:`RISC-V`,import:(()=>K(()=>import(`./_Ckw8ddFX.js`),[]))},{id:`ron`,name:`RON`,import:(()=>K(()=>import(`./_VUp2lXgN.js`),[]))},{id:`rosmsg`,name:`ROS Interface`,import:(()=>K(()=>import(`./_CAekHB0j.js`),[]))},{id:`rst`,name:`reStructuredText`,import:(()=>K(()=>import(`./_DYh4cJsz.js`),__vite__mapDeps([97,2,15,1,3,20,98,25,26,27,22,29,39,34,7,8,16,35,36,11,13,37,38])))},{id:`ruby`,name:`Ruby`,aliases:[`rb`],import:(()=>K(()=>import(`./_qvuZuJzY.js`),__vite__mapDeps([34,2,3,1,7,8,16,22,25,26,27,29,35,36,11,13,37,38,39])))},{id:`rust`,name:`Rust`,aliases:[`rs`],import:(()=>K(()=>import(`./_Cfkwpbl82.js`),[]))},{id:`sas`,name:`SAS`,import:(()=>K(()=>import(`./_DUq73rvH.js`),__vite__mapDeps([99,16])))},{id:`sass`,name:`Sass`,import:(()=>K(()=>import(`./_DXrisJhu.js`),[]))},{id:`scala`,name:`Scala`,import:(()=>K(()=>import(`./_BiFt_7mu2.js`),[]))},{id:`scheme`,name:`Scheme`,import:(()=>K(()=>import(`./_DQCgrYNe.js`),[]))},{id:`scss`,name:`SCSS`,import:(()=>K(()=>import(`./_U0FwxsZW.js`).then(e=>e.n),__vite__mapDeps([5,3])))},{id:`sdbl`,name:`1C (Query)`,aliases:[`1c-query`],import:(()=>K(()=>import(`./_bTVj8UrX2.js`),[]))},{id:`shaderlab`,name:`ShaderLab`,aliases:[`shader`],import:(()=>K(()=>import(`./_BM315xPC.js`),__vite__mapDeps([100,101])))},{id:`shellscript`,name:`Shell`,aliases:[`bash`,`sh`,`shell`,`zsh`],import:(()=>K(()=>import(`./_Dvw8-jm8.js`).then(e=>e.n),[]))},{id:`shellsession`,name:`Shell Session`,aliases:[`console`],import:(()=>K(()=>import(`./_C3ojQhq_.js`),__vite__mapDeps([102,29])))},{id:`smalltalk`,name:`GNU Smalltalk`,import:(()=>K(()=>import(`./_BHpQb5nM.js`),[]))},{id:`smithy`,name:`Smithy`,import:(()=>K(()=>import(`./_Dgaz7aur.js`),[]))},{id:`solidity`,name:`Solidity`,import:(()=>K(()=>import(`./_Bj7E1mRn.js`),[]))},{id:`soy`,name:`Closure Templates`,aliases:[`closure-templates`],import:(()=>K(()=>import(`./_5m9S-EqP.js`),__vite__mapDeps([103,1,2,3])))},{id:`sparql`,name:`SPARQL`,import:(()=>K(()=>import(`./_L8AbGenz.js`),__vite__mapDeps([104,105])))},{id:`splunk`,name:`Splunk Query Language`,aliases:[`spl`],import:(()=>K(()=>import(`./_BC2Px7Mm.js`),[]))},{id:`sql`,name:`SQL`,import:(()=>K(()=>import(`./_BUvwthbH2.js`).then(e=>e.n),[]))},{id:`ssh-config`,name:`SSH Config`,import:(()=>K(()=>import(`./_BgfXC-Er.js`),[]))},{id:`stata`,name:`Stata`,import:(()=>K(()=>import(`./_oJGy-rnh.js`),__vite__mapDeps([106,16])))},{id:`stylus`,name:`Stylus`,aliases:[`styl`],import:(()=>K(()=>import(`./_B6D30XZt.js`),[]))},{id:`surrealql`,name:`SurrealQL`,aliases:[`surql`],import:(()=>K(()=>import(`./_z_rEl9X7.js`),__vite__mapDeps([107,2])))},{id:`svelte`,name:`Svelte`,import:(()=>K(()=>import(`./_DnzEKJPD.js`),__vite__mapDeps([108,2,3,11,12])))},{id:`swift`,name:`Swift`,import:(()=>K(()=>import(`./_CyEgAFGc.js`),[]))},{id:`system-verilog`,name:`SystemVerilog`,import:(()=>K(()=>import(`./_Dh5ihWbf.js`),[]))},{id:`systemd`,name:`Systemd Units`,import:(()=>K(()=>import(`./_BxMlprV5.js`),[]))},{id:`talonscript`,name:`TalonScript`,aliases:[`talon`],import:(()=>K(()=>import(`./_CohzipZa.js`),[]))},{id:`tasl`,name:`Tasl`,import:(()=>K(()=>import(`./_DMoTqEGO.js`),[]))},{id:`tcl`,name:`Tcl`,import:(()=>K(()=>import(`./_CZd0xW_V2.js`),[]))},{id:`templ`,name:`Templ`,import:(()=>K(()=>import(`./_vpBiEKFg2.js`),__vite__mapDeps([109,2,3,81])))},{id:`terraform`,name:`Terraform`,aliases:[`tf`,`tfvars`],import:(()=>K(()=>import(`./_DswuEJGm2.js`),[]))},{id:`tex`,name:`TeX`,import:(()=>K(()=>import(`./_B188UjZf.js`).then(e=>e.n),__vite__mapDeps([67,63])))},{id:`toml`,name:`TOML`,import:(()=>K(()=>import(`./_CcmNWLt02.js`),[]))},{id:`ts-tags`,name:`TypeScript with Tags`,aliases:[`lit`],import:(()=>K(()=>import(`./_yyKj-WvW2.js`),__vite__mapDeps([110,2,3,1,7,8,11,16,27,22])))},{id:`tsv`,name:`TSV`,import:(()=>K(()=>import(`./_sltzmVWM2.js`),[]))},{id:`tsx`,name:`TSX`,import:(()=>K(()=>import(`./_D0fCsOyy.js`).then(e=>e.n),[]))},{id:`turtle`,name:`Turtle`,import:(()=>K(()=>import(`./_ByJddavk.js`),[]))},{id:`twig`,name:`Twig`,import:(()=>K(()=>import(`./_BV_gjARS2.js`),__vite__mapDeps([111,2,3,5,20,34,1,7,8,16,22,25,26,27,29,35,36,11,13,37,38,39,87,9])))},{id:`typescript`,name:`TypeScript`,aliases:[`ts`,`cts`,`mts`],import:(()=>K(()=>import(`./_MoGAjrcU.js`).then(e=>e.n),[]))},{id:`typespec`,name:`TypeSpec`,aliases:[`tsp`],import:(()=>K(()=>import(`./_BRdr0IET2.js`),[]))},{id:`typst`,name:`Typst`,aliases:[`typ`],import:(()=>K(()=>import(`./_DI99ib-x2.js`),[]))},{id:`v`,name:`V`,import:(()=>K(()=>import(`./_DBj4K9d_2.js`),[]))},{id:`vala`,name:`Vala`,import:(()=>K(()=>import(`./_zf12oZj62.js`),[]))},{id:`vb`,name:`Visual Basic`,import:(()=>K(()=>import(`./_DOwzaHZ02.js`),[]))},{id:`verilog`,name:`Verilog`,import:(()=>K(()=>import(`./_B2gwz-sJ2.js`),[]))},{id:`vhdl`,name:`VHDL`,import:(()=>K(()=>import(`./_BroJfC0k2.js`),[]))},{id:`viml`,name:`Vim Script`,aliases:[`vim`,`vimscript`],import:(()=>K(()=>import(`./_DvXPmvsu2.js`),[]))},{id:`vue`,name:`Vue`,import:(()=>K(()=>import(`./_B_w1CUT_2.js`),__vite__mapDeps([112,2,3,1,9,11,15])))},{id:`vue-html`,name:`Vue HTML`,import:(()=>K(()=>import(`./_BNo-u1xU2.js`),__vite__mapDeps([113,2])))},{id:`vue-vine`,name:`Vue Vine`,import:(()=>K(()=>import(`./_CnKTlQqQ2.js`),__vite__mapDeps([114,2,3,5,12,70,115])))},{id:`vyper`,name:`Vyper`,aliases:[`vy`],import:(()=>K(()=>import(`./_CgoNMtux2.js`),[]))},{id:`wasm`,name:`WebAssembly`,import:(()=>K(()=>import(`./_ByWQv1Qj2.js`),[]))},{id:`wenyan`,name:`Wenyan`,aliases:[`文言`],import:(()=>K(()=>import(`./_C8pVoKbM2.js`),[]))},{id:`wgsl`,name:`WGSL`,import:(()=>K(()=>import(`./_BsKzXJz42.js`),[]))},{id:`wikitext`,name:`Wikitext`,aliases:[`mediawiki`,`wiki`],import:(()=>K(()=>import(`./_ClFFjSW22.js`),[]))},{id:`wit`,name:`WebAssembly Interface Types`,import:(()=>K(()=>import(`./_DdvCle-K2.js`),[]))},{id:`wolfram`,name:`Wolfram`,aliases:[`wl`],import:(()=>K(()=>import(`./_DLL8P-h_2.js`),[]))},{id:`xml`,name:`XML`,import:(()=>K(()=>import(`./_DxpiV80x.js`).then(e=>e.n),__vite__mapDeps([7,8])))},{id:`xsl`,name:`XSL`,import:(()=>K(()=>import(`./_CIsBeTH02.js`),__vite__mapDeps([93,7,8])))},{id:`yaml`,name:`YAML`,aliases:[`yml`],import:(()=>K(()=>import(`./_Cfo3E_wG.js`).then(e=>e.n),[]))},{id:`zenscript`,name:`ZenScript`,import:(()=>K(()=>import(`./_BnlCZFoB2.js`),[]))},{id:`zig`,name:`Zig`,import:(()=>K(()=>import(`./_CMLA9XwU2.js`),[]))}],Mw=Object.fromEntries(jw.map(e=>[e.id,e.import])),Nw=Object.fromEntries(jw.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),Pw={...Mw,...Nw},Fw=Object.fromEntries([{id:`andromeeda`,displayName:`Andromeeda`,type:`dark`,import:(()=>K(()=>import(`./_vGVdxbeo2.js`),[]))},{id:`aurora-x`,displayName:`Aurora X`,type:`dark`,import:(()=>K(()=>import(`./_CDeNXAV0.js`),[]))},{id:`ayu-dark`,displayName:`Ayu Dark`,type:`dark`,import:(()=>K(()=>import(`./_DluEY0Gj.js`),[]))},{id:`ayu-light`,displayName:`Ayu Light`,type:`light`,import:(()=>K(()=>import(`./_C3h-C4tm.js`),[]))},{id:`ayu-mirage`,displayName:`Ayu Mirage`,type:`dark`,import:(()=>K(()=>import(`./_Bqwy1Gya.js`),[]))},{id:`catppuccin-frappe`,displayName:`Catppuccin Frappé`,type:`dark`,import:(()=>K(()=>import(`./_C9Q5zVZY.js`),[]))},{id:`catppuccin-latte`,displayName:`Catppuccin Latte`,type:`light`,import:(()=>K(()=>import(`./_CtsyrtPq.js`),[]))},{id:`catppuccin-macchiato`,displayName:`Catppuccin Macchiato`,type:`dark`,import:(()=>K(()=>import(`./_R8nAf1vR.js`),[]))},{id:`catppuccin-mocha`,displayName:`Catppuccin Mocha`,type:`dark`,import:(()=>K(()=>import(`./_DjuaAJKi.js`),[]))},{id:`dark-plus`,displayName:`Dark Plus`,type:`dark`,import:(()=>K(()=>import(`./_Cs2F2srj.js`),[]))},{id:`dracula`,displayName:`Dracula Theme`,type:`dark`,import:(()=>K(()=>import(`./_BHWKrbxM.js`),[]))},{id:`dracula-soft`,displayName:`Dracula Theme Soft`,type:`dark`,import:(()=>K(()=>import(`./_5eyTD99u.js`),[]))},{id:`everforest-dark`,displayName:`Everforest Dark`,type:`dark`,import:(()=>K(()=>import(`./_sB-x3p7T.js`),[]))},{id:`everforest-light`,displayName:`Everforest Light`,type:`light`,import:(()=>K(()=>import(`./_Df2xbC6M.js`),[]))},{id:`github-dark`,displayName:`GitHub Dark`,type:`dark`,import:(()=>K(()=>import(`./_C-LZuMrd.js`),[]))},{id:`github-dark-default`,displayName:`GitHub Dark Default`,type:`dark`,import:(()=>K(()=>import(`./_DXG-b-1a.js`),[]))},{id:`github-dark-dimmed`,displayName:`GitHub Dark Dimmed`,type:`dark`,import:(()=>K(()=>import(`./_Bx1FflLF.js`),[]))},{id:`github-dark-high-contrast`,displayName:`GitHub Dark High Contrast`,type:`dark`,import:(()=>K(()=>import(`./_B_tTalzw.js`),[]))},{id:`github-light`,displayName:`GitHub Light`,type:`light`,import:(()=>K(()=>import(`./_EUqPIrTm.js`),[]))},{id:`github-light-default`,displayName:`GitHub Light Default`,type:`light`,import:(()=>K(()=>import(`./_BXViO-2h.js`),[]))},{id:`github-light-high-contrast`,displayName:`GitHub Light High Contrast`,type:`light`,import:(()=>K(()=>import(`./_B68TUdTA.js`),[]))},{id:`gruvbox-dark-hard`,displayName:`Gruvbox Dark Hard`,type:`dark`,import:(()=>K(()=>import(`./_C820rvS2.js`),[]))},{id:`gruvbox-dark-medium`,displayName:`Gruvbox Dark Medium`,type:`dark`,import:(()=>K(()=>import(`./_BPjhmG05.js`),[]))},{id:`gruvbox-dark-soft`,displayName:`Gruvbox Dark Soft`,type:`dark`,import:(()=>K(()=>import(`./_MrdJrrXF.js`),[]))},{id:`gruvbox-light-hard`,displayName:`Gruvbox Light Hard`,type:`light`,import:(()=>K(()=>import(`./_BC_s9l72.js`),[]))},{id:`gruvbox-light-medium`,displayName:`Gruvbox Light Medium`,type:`light`,import:(()=>K(()=>import(`./_BAWPOn9u.js`),[]))},{id:`gruvbox-light-soft`,displayName:`Gruvbox Light Soft`,type:`light`,import:(()=>K(()=>import(`./_BSMLrYjP.js`),[]))},{id:`horizon`,displayName:`Horizon`,type:`dark`,import:(()=>K(()=>import(`./_CE9ld1lL.js`),[]))},{id:`horizon-bright`,displayName:`Horizon Bright`,type:`light`,import:(()=>K(()=>import(`./_DSNQnXHK.js`),[]))},{id:`houston`,displayName:`Houston`,type:`dark`,import:(()=>K(()=>import(`./_CsvMBhTu.js`),[]))},{id:`kanagawa-dragon`,displayName:`Kanagawa Dragon`,type:`dark`,import:(()=>K(()=>import(`./_Bozd7klA.js`),[]))},{id:`kanagawa-lotus`,displayName:`Kanagawa Lotus`,type:`light`,import:(()=>K(()=>import(`./_BmuOG9ZW.js`),[]))},{id:`kanagawa-wave`,displayName:`Kanagawa Wave`,type:`dark`,import:(()=>K(()=>import(`./_BML5mF2J.js`),[]))},{id:`laserwave`,displayName:`LaserWave`,type:`dark`,import:(()=>K(()=>import(`./_C_8bwKvT.js`),[]))},{id:`light-plus`,displayName:`Light Plus`,type:`light`,import:(()=>K(()=>import(`./_DVQuIRkW.js`),[]))},{id:`material-theme`,displayName:`Material Theme`,type:`dark`,import:(()=>K(()=>import(`./_Bm3Qr25_2.js`),[]))},{id:`material-theme-darker`,displayName:`Material Theme Darker`,type:`dark`,import:(()=>K(()=>import(`./_2IIEA8gg.js`),[]))},{id:`material-theme-lighter`,displayName:`Material Theme Lighter`,type:`light`,import:(()=>K(()=>import(`./_uhdI0v04.js`),[]))},{id:`material-theme-ocean`,displayName:`Material Theme Ocean`,type:`dark`,import:(()=>K(()=>import(`./_CHQ94UKr.js`),[]))},{id:`material-theme-palenight`,displayName:`Material Theme Palenight`,type:`dark`,import:(()=>K(()=>import(`./_B5W6OYN7.js`),[]))},{id:`min-dark`,displayName:`Min Dark`,type:`dark`,import:(()=>K(()=>import(`./_BSWPekZh2.js`),[]))},{id:`min-light`,displayName:`Min Light`,type:`light`,import:(()=>K(()=>import(`./_DDpmG2fV2.js`),[]))},{id:`monokai`,displayName:`Monokai`,type:`dark`,import:(()=>K(()=>import(`./_B_bV9PQ92.js`),[]))},{id:`night-owl`,displayName:`Night Owl`,type:`dark`,import:(()=>K(()=>import(`./_DhmEMT882.js`),[]))},{id:`night-owl-light`,displayName:`Night Owl Light`,type:`light`,import:(()=>K(()=>import(`./_eJ-hLW7d2.js`),[]))},{id:`nord`,displayName:`Nord`,type:`dark`,import:(()=>K(()=>import(`./_Cb4Vim4T2.js`),[]))},{id:`one-dark-pro`,displayName:`One Dark Pro`,type:`dark`,import:(()=>K(()=>import(`./_CLwyXe_n2.js`),[]))},{id:`one-light`,displayName:`One Light`,type:`light`,import:(()=>K(()=>import(`./_D7Lr4KcI2.js`),[]))},{id:`plastic`,displayName:`Plastic`,type:`dark`,import:(()=>K(()=>import(`./_DQwYfKfQ2.js`),[]))},{id:`poimandres`,displayName:`Poimandres`,type:`dark`,import:(()=>K(()=>import(`./_DRFjx7u42.js`),[]))},{id:`red`,displayName:`Red`,type:`dark`,import:(()=>K(()=>import(`./_DX1BQOs82.js`),[]))},{id:`rose-pine`,displayName:`Rosé Pine`,type:`dark`,import:(()=>K(()=>import(`./_aMsaMD1D2.js`),[]))},{id:`rose-pine-dawn`,displayName:`Rosé Pine Dawn`,type:`light`,import:(()=>K(()=>import(`./_8PwUyIlP2.js`),[]))},{id:`rose-pine-moon`,displayName:`Rosé Pine Moon`,type:`dark`,import:(()=>K(()=>import(`./_DO-qXg-I2.js`),[]))},{id:`slack-dark`,displayName:`Slack Dark`,type:`dark`,import:(()=>K(()=>import(`./_DnToyrRv2.js`),[]))},{id:`slack-ochin`,displayName:`Slack Ochin`,type:`light`,import:(()=>K(()=>import(`./_B2OO5cIa2.js`),[]))},{id:`snazzy-light`,displayName:`Snazzy Light`,type:`light`,import:(()=>K(()=>import(`./_4G7pJPwS2.js`),[]))},{id:`solarized-dark`,displayName:`Solarized Dark`,type:`dark`,import:(()=>K(()=>import(`./_UdsmMDCL2.js`),[]))},{id:`solarized-light`,displayName:`Solarized Light`,type:`light`,import:(()=>K(()=>import(`./_C1IUL_tW2.js`),[]))},{id:`synthwave-84`,displayName:`Synthwave '84`,type:`dark`,import:(()=>K(()=>import(`./_nFMaYfgc2.js`),[]))},{id:`tokyo-night`,displayName:`Tokyo Night`,type:`dark`,import:(()=>K(()=>import(`./_oM2G3aXe2.js`),[]))},{id:`vesper`,displayName:`Vesper`,type:`dark`,import:(()=>K(()=>import(`./_DdrHHSXu2.js`),[]))},{id:`vitesse-black`,displayName:`Vitesse Black`,type:`dark`,import:(()=>K(()=>import(`./_fwtXNY1n2.js`),[]))},{id:`vitesse-dark`,displayName:`Vitesse Dark`,type:`dark`,import:(()=>K(()=>import(`./_BZCL-v6S2.js`),[]))},{id:`vitesse-light`,displayName:`Vitesse Light`,type:`light`,import:(()=>K(()=>import(`./_VbXTXTou2.js`),[]))}].map(e=>[e.id,e.import])),Iw=t({createOnigurumaEngine:()=>uT,getDefaultWasmLoader:()=>lT,loadWasm:()=>rT,setDefaultWasmLoader:()=>cT}),Lw=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function Rw(){return 2147483648}function zw(){return typeof performance<`u`?performance.now():Date.now()}var Bw=(e,t)=>e+(t-e%t)%t;async function Vw(e){let t,n,r={};function i(e){n=e,r.HEAPU8=new Uint8Array(e),r.HEAPU32=new Uint32Array(e)}function a(e,t,n){r.HEAPU8.copyWithin(e,t,t+n)}function o(e){try{return t.grow(e-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}function s(e){let t=r.HEAPU8.length;e>>>=0;let n=Rw();if(e>n)return!1;for(let r=1;r<=4;r*=2){let i=t*(1+.2/r);if(i=Math.min(i,e+100663296),o(Math.min(n,Bw(Math.max(e,i),65536))))return!0}return!1}let c=typeof TextDecoder<`u`?new TextDecoder(`utf8`):void 0;function l(e,t,n=1024){let r=t+n,i=t;for(;e[i]&&!(i>=r);)++i;if(i-t>16&&e.buffer&&c)return c.decode(e.subarray(t,i));let a=``;for(;t<i;){let n=e[t++];if(!(n&128)){a+=String.fromCharCode(n);continue}let r=e[t++]&63;if((n&224)==192){a+=String.fromCharCode((n&31)<<6|r);continue}let i=e[t++]&63;if(n=(n&240)==224?(n&15)<<12|r<<6|i:(n&7)<<18|r<<12|i<<6|e[t++]&63,n<65536)a+=String.fromCharCode(n);else{let e=n-65536;a+=String.fromCharCode(55296|e>>10,56320|e&1023)}}return a}function u(e,t){return e?l(r.HEAPU8,e,t):``}let d={emscripten_get_now:zw,emscripten_memcpy_big:a,emscripten_resize_heap:s,fd_write:()=>0};async function f(){let n=await e({env:d,wasi_snapshot_preview1:d});t=n.memory,i(t.buffer),Object.assign(r,n),r.UTF8ToString=u}return await f(),r}var Hw=Object.defineProperty,Uw=(e,t,n)=>t in e?Hw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ww=(e,t,n)=>Uw(e,typeof t==`symbol`?t:t+``,n),Gw=null;function Kw(e){throw new Lw(e.UTF8ToString(e.getLastOnigError()))}var qw=class e{constructor(t){Ww(this,`utf16Length`),Ww(this,`utf8Length`),Ww(this,`utf16Value`),Ww(this,`utf8Value`),Ww(this,`utf16OffsetToUtf8`),Ww(this,`utf8OffsetToUtf16`);let n=t.length,r=e._utf8ByteLength(t),i=r!==n,a=i?new Uint32Array(n+1):null;i&&(a[n]=r);let o=i?new Uint32Array(r+1):null;i&&(o[r]=n);let s=new Uint8Array(r),c=0;for(let e=0;e<n;e++){let r=t.charCodeAt(e),l=r,u=!1;if(r>=55296&&r<=56319&&e+1<n){let n=t.charCodeAt(e+1);n>=56320&&n<=57343&&(l=(r-55296<<10)+65536|n-56320,u=!0)}i&&(a[e]=c,u&&(a[e+1]=c),l<=127?o[c+0]=e:l<=2047?(o[c+0]=e,o[c+1]=e):l<=65535?(o[c+0]=e,o[c+1]=e,o[c+2]=e):(o[c+0]=e,o[c+1]=e,o[c+2]=e,o[c+3]=e)),l<=127?s[c++]=l:l<=2047?(s[c++]=192|(l&1984)>>>6,s[c++]=128|(l&63)>>>0):l<=65535?(s[c++]=224|(l&61440)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0):(s[c++]=240|(l&1835008)>>>18,s[c++]=128|(l&258048)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0),u&&e++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=s,this.utf16OffsetToUtf8=a,this.utf8OffsetToUtf16=o}static _utf8ByteLength(e){let t=0;for(let n=0,r=e.length;n<r;n++){let i=e.charCodeAt(n),a=i,o=!1;if(i>=55296&&i<=56319&&n+1<r){let t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(a=(i-55296<<10)+65536|t-56320,o=!0)}t+=a<=127?1:a<=2047?2:a<=65535?3:4,o&&n++}return t}createString(e){let t=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}},Jw=class e{constructor(t){if(Ww(this,`id`,++e.LAST_ID),Ww(this,`_onigBinding`),Ww(this,`content`),Ww(this,`utf16Length`),Ww(this,`utf8Length`),Ww(this,`utf16OffsetToUtf8`),Ww(this,`utf8OffsetToUtf16`),Ww(this,`ptr`),!Gw)throw new Lw(`Must invoke loadWasm first.`);this._onigBinding=Gw,this.content=t;let n=new qw(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||=Gw.omalloc(1e4),e._sharedPtrInUse=!0,Gw.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString(Gw)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===e._sharedPtr?e._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};Ww(Jw,`LAST_ID`,0),Ww(Jw,`_sharedPtr`,0),Ww(Jw,`_sharedPtrInUse`,!1);var Yw=Jw,Xw=class{constructor(e){if(Ww(this,`_onigBinding`),Ww(this,`_ptr`),!Gw)throw new Lw(`Must invoke loadWasm first.`);let t=[],n=[];for(let r=0,i=e.length;r<i;r++){let i=new qw(e[r]);t[r]=i.createString(Gw),n[r]=i.utf8Length}let r=Gw.omalloc(4*e.length);Gw.HEAPU32.set(t,r/4);let i=Gw.omalloc(4*e.length);Gw.HEAPU32.set(n,i/4);let a=Gw.createOnigScanner(r,i,e.length);for(let n=0,r=e.length;n<r;n++)Gw.ofree(t[n]);Gw.ofree(i),Gw.ofree(r),a===0&&Kw(Gw),this._onigBinding=Gw,this._ptr=a}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,t,n){let r=0;if(typeof n==`number`&&(r=n),typeof e==`string`){e=new Yw(e);let n=this._findNextMatchSync(e,t,!1,r);return e.dispose(),n}return this._findNextMatchSync(e,t,!1,r)}_findNextMatchSync(e,t,n,r){let i=this._onigBinding,a=i.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),r);if(a===0)return null;let o=i.HEAPU32,s=a/4,c=o[s++],l=o[s++],u=[];for(let t=0;t<l;t++){let n=e.convertUtf8OffsetToUtf16(o[s++]),r=e.convertUtf8OffsetToUtf16(o[s++]);u[t]={start:n,end:r,length:r-n}}return{index:c,captureIndices:u}}};function Zw(e){return typeof e.instantiator==`function`}function Qw(e){return typeof e.default==`function`}function $w(e){return e.data!==void 0}function eT(e){return typeof Response<`u`&&e instanceof Response}function tT(e){return typeof ArrayBuffer<`u`&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<`u`&&Buffer.isBuffer?.(e)||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer||typeof Uint32Array<`u`&&e instanceof Uint32Array}var nT;function rT(e){if(nT)return nT;async function t(){Gw=await Vw(async t=>{let n=e;return n=await n,typeof n==`function`&&(n=await n(t)),typeof n==`function`&&(n=await n(t)),Zw(n)?n=await n.instantiator(t):Qw(n)?n=await n.default(t):($w(n)&&(n=n.data),eT(n)?n=typeof WebAssembly.instantiateStreaming==`function`?await aT(n)(t):await oT(n)(t):tT(n)||n instanceof WebAssembly.Module?n=await iT(n)(t):`default`in n&&n.default instanceof WebAssembly.Module&&(n=await iT(n.default)(t))),`instance`in n&&(n=n.instance),`exports`in n&&(n=n.exports),n})}return nT=t(),nT}function iT(e){return t=>WebAssembly.instantiate(e,t)}function aT(e){return t=>WebAssembly.instantiateStreaming(e,t)}function oT(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}var sT;function cT(e){sT=e}function lT(){return sT}async function uT(e){return e&&await rT(e),{createScanner(e){return new Xw(e.map(e=>typeof e==`string`?e:e.source))},createString(e){return new Yw(e)}}}var dT=Tw({});Dw(dT,Iw);var fT=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function pT(e){return mT(e)}function mT(e){return Array.isArray(e)?hT(e):e instanceof RegExp?e:typeof e==`object`?gT(e):e}function hT(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=mT(e[n]);return t}function gT(e){let t={};for(let n in e)t[n]=mT(e[n]);return t}function _T(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function vT(e){let t=~e.lastIndexOf(`/`)||~e.lastIndexOf(`\\`);return t===0?e:~t===e.length-1?vT(e.substring(0,e.length-1)):e.substr(~t+1)}var yT=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,bT=class{static hasCaptures(e){return e!==null&&(yT.lastIndex=0,yT.test(e))}static replaceCaptures(e,t,n){return e.replace(yT,(e,r,i,a)=>{let o=n[parseInt(r||i,10)];if(o){let e=t.substring(o.start,o.end);for(;e[0]===`.`;)e=e.substring(1);switch(a){case`downcase`:return e.toLowerCase();case`upcase`:return e.toUpperCase();default:return e}}else return e})}};function xT(e,t){return e<t?-1:+(e>t)}function ST(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let r=0;r<n;r++){let n=xT(e[r],t[r]);if(n!==0)return n}return 0}return n-r}function CT(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function wT(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,`\\$&`)}var TT=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},ET=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(jT(e),t)}static createFromParsedTheme(e,t){return PT(e,t)}_cachedMatchRoot=new TT(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;let t=e.scopeName,n=this._cachedMatchRoot.get(t).find(t=>OT(e.parent,t.parentScopes));return n?new AT(n.fontStyle,n.foreground,n.background):null}},DT=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,n){for(let r of n)t=new e(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new e(n,t[r]);return n}push(t){return new e(this,t)}getSegments(){let e=this,t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(` `)}extends(e){return this===e||this.parent!==null&&this.parent.extends(e)}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}};function OT(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],i=!1;if(r===`>`){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!kT(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function kT(e,t){return t===e||e.startsWith(t)&&e[t.length]===`.`}var AT=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function jT(e){if(!e||!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let e=0,i=t.length;e<i;e++){let i=t[e];if(!i.settings)continue;let a;if(typeof i.scope==`string`){let e=i.scope;e=e.replace(/^[,]+/,``),e=e.replace(/[,]+$/,``),a=e.split(`,`)}else a=Array.isArray(i.scope)?i.scope:[``];let o=-1;if(typeof i.settings.fontStyle==`string`){o=0;let e=i.settings.fontStyle.split(` `);for(let t=0,n=e.length;t<n;t++)switch(e[t]){case`italic`:o|=1;break;case`bold`:o|=2;break;case`underline`:o|=4;break;case`strikethrough`:o|=8}}let s=null;typeof i.settings.foreground==`string`&&CT(i.settings.foreground)&&(s=i.settings.foreground);let c=null;typeof i.settings.background==`string`&&CT(i.settings.background)&&(c=i.settings.background);for(let t=0,i=a.length;t<i;t++){let i=a[t].trim().split(` `),l=i[i.length-1],u=null;i.length>1&&(u=i.slice(0,i.length-1),u.reverse()),n[r++]=new MT(l,u,e,o,s,c)}}return n}var MT=class{constructor(e,t,n,r,i,a){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=a}},NT=(e=>(e[e.NotSet=-1]=`NotSet`,e[e.None=0]=`None`,e[e.Italic=1]=`Italic`,e[e.Bold=2]=`Bold`,e[e.Underline=4]=`Underline`,e[e.Strikethrough=8]=`Strikethrough`,e))(NT||{});function PT(e,t){e.sort((e,t)=>{let n=xT(e.scope,t.scope);return n!==0||(n=ST(e.parentScopes,t.parentScopes),n!==0)?n:e.index-t.index});let n=0,r=`#000000`,i=`#ffffff`;for(;e.length>=1&&e[0].scope===``;){let t=e.shift();t.fontStyle!==-1&&(n=t.fontStyle),t.foreground!==null&&(r=t.foreground),t.background!==null&&(i=t.background)}let a=new FT(t),o=new AT(n,a.getId(r),a.getId(i)),s=new RT(new LT(0,null,-1,0,0),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];s.insert(0,n.scope,n.parentScopes,n.fontStyle,a.getId(n.foreground),a.getId(n.background))}return new ET(a,o,s)}var FT=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},IT=Object.freeze([]),LT=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||IT,this.fontStyle=n,this.foreground=r,this.background=i}clone(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,r){this.scopeDepth>e?console.log(`how did this happen?`):this.scopeDepth=e,t!==-1&&(this.fontStyle=t),n!==0&&(this.foreground=n),r!==0&&(this.background=r)}},RT=class e{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,r=0;for(;e.parentScopes[n]===`>`&&n++,t.parentScopes[r]===`>`&&r++,!(n>=e.parentScopes.length||r>=t.parentScopes.length);){let i=t.parentScopes[r].length-e.parentScopes[n].length;if(i!==0)return i;n++,r++}return t.parentScopes.length-e.parentScopes.length}match(t){if(t!==``){let e=t.indexOf(`.`),n,r;if(e===-1?(n=t,r=``):(n=t.substring(0,e),r=t.substring(e+1)),this._children.hasOwnProperty(n))return this._children[n].match(r)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(e._cmpBySpecificity),n}insert(t,n,r,i,a,o){if(n===``){this._doInsertHere(t,r,i,a,o);return}let s=n.indexOf(`.`),c,l;s===-1?(c=n,l=``):(c=n.substring(0,s),l=n.substring(s+1));let u;this._children.hasOwnProperty(c)?u=this._children[c]:(u=new e(this._mainRule.clone(),LT.cloneArr(this._rulesWithParentScopes)),this._children[c]=u),u.insert(t+1,l,r,i,a,o)}_doInsertHere(e,t,n,r,i){if(t===null){this._mainRule.acceptOverwrite(e,n,r,i);return}for(let a=0,o=this._rulesWithParentScopes.length;a<o;a++){let o=this._rulesWithParentScopes[a];if(ST(o.parentScopes,t)===0){o.acceptOverwrite(e,n,r,i);return}}n===-1&&(n=this._mainRule.fontStyle),r===0&&(r=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new LT(e,t,n,r,i))}},zT=class e{static toBinaryStr(e){return e.toString(2).padStart(32,`0`)}static print(t){let n=e.getLanguageId(t),r=e.getTokenType(t),i=e.getFontStyle(t),a=e.getForeground(t),o=e.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:a,background:o})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return!!(e&1024)}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(t,n,r,i,a,o,s){let c=e.getLanguageId(t),l=e.getTokenType(t),u=+!!e.containsBalancedBrackets(t),d=e.getFontStyle(t),f=e.getForeground(t),p=e.getBackground(t);return n!==0&&(c=n),r!==8&&(l=VT(r)),i!==null&&(u=+!!i),a!==-1&&(d=a),o!==0&&(f=o),s!==0&&(p=s),(c<<0|l<<8|u<<10|d<<11|f<<15|p<<24)>>>0}};function BT(e){return e}function VT(e){return e}function HT(e,t){let n=[],r=WT(e),i=r.next();for(;i!==null;){let e=0;if(i.length===2&&i.charAt(1)===`:`){switch(i.charAt(0)){case`R`:e=1;break;case`L`:e=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let t=o();if(n.push({matcher:t,priority:e}),i!==`,`)break;i=r.next()}return n;function a(){if(i===`-`){i=r.next();let e=a();return t=>!!e&&!e(t)}if(i===`(`){i=r.next();let e=s();return i===`)`&&(i=r.next()),e}if(UT(i)){let e=[];do e.push(i),i=r.next();while(UT(i));return n=>t(e,n)}return null}function o(){let e=[],t=a();for(;t;)e.push(t),t=a();return t=>e.every(e=>e(t))}function s(){let e=[],t=o();for(;t&&(e.push(t),i===`|`||i===`,`);){do i=r.next();while(i===`|`||i===`,`);t=o()}return t=>e.some(e=>e(t))}}function UT(e){return!!e&&!!e.match(/[\w\.:]+/)}function WT(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;let r=n[0];return n=t.exec(e),r}}}function GT(e){typeof e.dispose==`function`&&e.dispose()}var KT=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},qT=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},JT=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){let t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},YT=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new KT(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new JT;for(let n of e)XT(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof KT){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName)||this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};function XT(e,t,n,r){let i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw Error(`No grammar provided for <${t}>`);return}let a=n.lookup(t);e instanceof KT?QT({baseGrammar:a,selfGrammar:i},r):ZT(e.ruleName,{baseGrammar:a,selfGrammar:i,repository:i.repository},r);let o=n.injections(e.scopeName);if(o)for(let e of o)r.add(new KT(e))}function ZT(e,t,n){if(t.repository&&t.repository[e]){let r=t.repository[e];$T([r],t,n)}}function QT(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&$T(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&$T(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function $T(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?_T({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&$T(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let a=aE(i);switch(a.kind){case 0:QT({...t,selfGrammar:t.baseGrammar},n);break;case 1:QT(t,n);break;case 2:ZT(a.ruleName,{...t,repository:e},n);break;case 3:case 4:let r=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(r){let i={baseGrammar:t.baseGrammar,selfGrammar:r,repository:e};a.kind===4?ZT(a.ruleName,i,n):QT(i,n)}else a.kind===4?n.add(new qT(a.scopeName,a.ruleName)):n.add(new KT(a.scopeName))}}}var eE=class{kind=0},tE=class{kind=1},nE=class{constructor(e){this.ruleName=e}kind=2},rE=class{constructor(e){this.scopeName=e}kind=3},iE=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function aE(e){if(e===`$base`)return new eE;if(e===`$self`)return new tE;let t=e.indexOf(`#`);return t===-1?new rE(e):t===0?new nE(e.substring(1)):new iE(e.substring(0,t),e.substring(t+1))}var oE=/\\(\d+)/,sE=/\\(\d+)/g,cE=-1,lE=-2;function uE(e){return e}function dE(e){return e}var fE=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=bT.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=bT.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${vT(this.$location.filename)}:${this.$location.line}`:`unknown`;return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:bT.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:bT.replaceCaptures(this._contentName,e,t)}},pE=class extends fE{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw Error(`Not supported!`)}compile(e,t){throw Error(`Not supported!`)}compileAG(e,t,n,r){throw Error(`Not supported!`)}},mE=class extends fE{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new yE(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new bE,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},hE=class extends fE{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}collectPatterns(e,t){for(let n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new bE,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},gE=class extends fE{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,a,o,s,c,l){super(e,t,n,r),this._begin=new yE(i,this.id),this.beginCaptures=a,this._end=new yE(o||``,-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=s,this.applyEndPatternLast=c||!1,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new bE;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},_E=class extends fE{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,a,o,s,c){super(e,t,n,r),this._begin=new yE(i,this.id),this.beginCaptures=a,this.whileCaptures=s,this._while=new yE(o,lE),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null),this._cachedCompiledWhilePatterns&&=(this._cachedCompiledWhilePatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new bE;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new bE,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||``),this._cachedCompiledWhilePatterns}},vE=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new pE(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new mE(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(t.begin===void 0){t.repository&&(r=_T({},r,t.repository));let i=t.patterns;return i===void 0&&t.include&&(i=[{include:t.include}]),new hE(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new _E(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,e._compileCaptures(t.whileCaptures||t.captures,n,r),e._compilePatterns(t.patterns,n,r)):new gE(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,e._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,e._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let a=0;for(let e in t){if(e===`$vscodeTextmateLocation`)continue;let t=parseInt(e,10);t>a&&(a=t)}for(let e=0;e<=a;e++)i[e]=null;for(let a in t){if(a===`$vscodeTextmateLocation`)continue;let o=parseInt(a,10),s=0;t[a].patterns&&(s=e.getCompiledRuleId(t[a],n,r)),i[o]=e.createCaptureRule(n,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,s)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let a=0,o=t.length;a<o;a++){let o=t[a],s=-1;if(o.include){let t=aE(o.include);switch(t.kind){case 0:case 1:s=e.getCompiledRuleId(r[o.include],n,r);break;case 2:let i=r[t.ruleName];i&&(s=e.getCompiledRuleId(i,n,r));break;case 3:case 4:let a=t.scopeName,c=t.kind===4?t.ruleName:null,l=n.getExternalGrammar(a,r);if(l){if(c){let t=l.repository[c];t&&(s=e.getCompiledRuleId(t,n,l.repository))}else s=e.getCompiledRuleId(l.repository.$self,n,l.repository)}}}else s=e.getCompiledRuleId(o,n,r);if(s!==-1){let e=n.getRule(s),t=!1;if((e instanceof hE||e instanceof gE||e instanceof _E)&&e.hasMissingPatterns&&e.patterns.length===0&&(t=!0),t)continue;i.push(s)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},yE=class e{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&typeof e==`string`){let t=e.length,n=0,r=[],i=!1;for(let a=0;a<t;a++)if(e.charAt(a)===`\\`&&a+1<t){let t=e.charAt(a+1);t===`z`?(r.push(e.substring(n,a)),r.push(`$(?!\\n)(?<!\\n)`),n=a+2):(t===`A`||t===`G`)&&(i=!0),a++}this.hasAnchor=i,n===0?this.source=e:(r.push(e.substring(n,t)),this.source=r.join(``))}else this.hasAnchor=!1,this.source=e;this._anchorCache=this.hasAnchor?this._buildAnchorCache():null,this.ruleId=t,this.hasBackReferences=typeof this.source==`string`&&oE.test(this.source)}clone(){return new e(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let n=t.map(t=>e.substring(t.start,t.end));return sE.lastIndex=0,this.source.replace(sE,(e,t)=>wT(n[parseInt(t,10)]||``))}_buildAnchorCache(){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let e=[],t=[],n=[],r=[],i,a,o,s;for(i=0,a=this.source.length;i<a;i++)o=this.source.charAt(i),e[i]=o,t[i]=o,n[i]=o,r[i]=o,o===`\\`&&i+1<a&&(s=this.source.charAt(i+1),s===`A`?(e[i+1]=``,t[i+1]=``,n[i+1]=`A`,r[i+1]=`A`):s===`G`?(e[i+1]=``,t[i+1]=`G`,n[i+1]=``,r[i+1]=`G`):(e[i+1]=s,t[i+1]=s,n[i+1]=s,r[i+1]=s),i++);return{A0_G0:e.join(``),A0_G1:t.join(``),A1_G0:n.join(``),A1_G1:r.join(``)}}resolveAnchors(e,t){return!this.hasAnchor||!this._anchorCache||typeof this.source!=`string`?this.source:e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},bE=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&=(this._cached.dispose(),null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(e=>e.source);this._cached=new xE(e,t,this._items.map(e=>e.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){return new xE(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},xE=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose==`function`&&this.scanner.dispose()}toString(){let e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(` - `+this.rules[t]+`: `+this.regExps[t]);return e.join(`
|
|
37
37
|
`)}findNextMatchSync(e,t,n){let r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},SE=class{constructor(e,t){this.languageId=e,this.tokenType=t}},CE=class e{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,t){this._defaultAttributes=new SE(e,8),this._embeddedLanguagesMatcher=new wE(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?e._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new SE(0,0);_getBasicScopeAttributes=new TT(e=>new SE(this._scopeToLanguage(e),this._toStandardTokenType(e)));_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(t){let n=t.match(e.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case`comment`:return 1;case`string`:return 2;case`regex`:return 3;case`meta.embedded`:return 0}throw Error(`Unexpected match for standard token type!`)}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},wE=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);let t=e.map(([e,t])=>wT(e));t.sort(),t.reverse(),this.scopesRegExp=RegExp(`^((${t.join(`)|(`)}))($|\\.)`,``)}}match(e){if(!this.scopesRegExp)return;let t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}};typeof process<`u`&&{}.VSCODE_TEXTMATE_DEBUG;var TE=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function EE(e,t,n,r,i,a,o,s){let c=t.content.length,l=!1,u=-1;if(o){let o=DE(e,t,n,r,i,a);i=o.stack,r=o.linePos,n=o.isFirstLine,u=o.anchorPosition}let d=Date.now();for(;!l;){if(s!==0&&Date.now()-d>s)return new TE(i,!0);f()}return new TE(i,!1);function f(){let o=OE(e,t,n,r,i,u);if(!o){a.produce(i,c),l=!0;return}let s=o.captureIndices,d=o.matchedRuleId,f=s&&s.length>0?s[0].end>r:!1;if(d===cE){let o=i.getRule(e);a.produce(i,s[0].start),i=i.withContentNameScopesList(i.nameScopesList),NE(e,t,n,i,a,o.endCaptures,s),a.produce(i,s[0].end);let d=i;if(i=i.parent,u=d.getAnchorPos(),!f&&d.getEnterPos()===r){i=d,a.produce(i,c),l=!0;return}}else{let o=e.getRule(d);a.produce(i,s[0].start);let p=i,m=o.getName(t.content,s),h=i.contentNameScopesList.pushAttributed(m,e);if(i=i.push(d,r,u,s[0].end===c,null,h,h),o instanceof gE){let r=o;NE(e,t,n,i,a,r.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let d=r.getContentName(t.content,s),m=h.pushAttributed(d,e);if(i=i.withContentNameScopesList(m),r.endHasBackReferences&&(i=i.withEndRule(r.getEndWithResolvedBackReferences(t.content,s))),!f&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),l=!0;return}}else if(o instanceof _E){let r=o;NE(e,t,n,i,a,r.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let d=r.getContentName(t.content,s),m=h.pushAttributed(d,e);if(i=i.withContentNameScopesList(m),r.whileHasBackReferences&&(i=i.withEndRule(r.getWhileWithResolvedBackReferences(t.content,s))),!f&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),l=!0;return}}else if(NE(e,t,n,i,a,o.captures,s),a.produce(i,s[0].end),i=i.pop(),!f){i=i.safePop(),a.produce(i,c),l=!0;return}}s[0].end>r&&(r=s[0].end,n=!1)}}function DE(e,t,n,r,i,a){let o=i.beginRuleCapturedEOL?0:-1,s=[];for(let t=i;t;t=t.pop()){let n=t.getRule(e);n instanceof _E&&s.push({rule:n,stack:t})}for(let c=s.pop();c;c=s.pop()){let{ruleScanner:s,findOptions:l}=ME(c.rule,e,c.stack.endRule,n,r===o),u=s.findNextMatchSync(t,r,l);if(u){if(u.ruleId!==lE){i=c.stack.pop();break}u.captureIndices&&u.captureIndices.length&&(a.produce(c.stack,u.captureIndices[0].start),NE(e,t,n,c.stack,a,c.rule.whileCaptures,u.captureIndices),a.produce(c.stack,u.captureIndices[0].end),o=u.captureIndices[0].end,u.captureIndices[0].end>r&&(r=u.captureIndices[0].end,n=!1))}else{i=c.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:o,isFirstLine:n}}function OE(e,t,n,r,i,a){let o=kE(e,t,n,r,i,a),s=e.getInjections();if(s.length===0)return o;let c=AE(s,e,t,n,r,i,a);if(!c)return o;if(!o)return c;let l=o.captureIndices[0].start,u=c.captureIndices[0].start;return u<l||c.priorityMatch&&u===l?c:o}function kE(e,t,n,r,i,a){let{ruleScanner:o,findOptions:s}=jE(i.getRule(e),e,i.endRule,n,r===a),c=o.findNextMatchSync(t,r,s);return c?{captureIndices:c.captureIndices,matchedRuleId:c.ruleId}:null}function AE(e,t,n,r,i,a,o){let s=Number.MAX_VALUE,c=null,l,u=0,d=a.contentNameScopesList.getScopeNames();for(let a=0,f=e.length;a<f;a++){let f=e[a];if(!f.matcher(d))continue;let{ruleScanner:p,findOptions:m}=jE(t.getRule(f.ruleId),t,null,r,i===o),h=p.findNextMatchSync(n,i,m);if(!h)continue;let g=h.captureIndices[0].start;if(!(g>=s)&&(s=g,c=h.captureIndices,l=h.ruleId,u=f.priority,s===i))break}return c?{priorityMatch:u===-1,captureIndices:c,matchedRuleId:l}:null}function jE(e,t,n,r,i){return{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function ME(e,t,n,r,i){return{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function NE(e,t,n,r,i,a,o){if(a.length===0)return;let s=t.content,c=Math.min(a.length,o.length),l=[],u=o[0].end;for(let t=0;t<c;t++){let c=a[t];if(c===null)continue;let d=o[t];if(d.length===0)continue;if(d.start>u)break;for(;l.length>0&&l[l.length-1].endPos<=d.start;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop();if(l.length>0?i.produceFromScopes(l[l.length-1].scopes,d.start):i.produce(r,d.start),c.retokenizeCapturedWithRuleId){let t=c.getName(s,o),a=r.contentNameScopesList.pushAttributed(t,e),l=c.getContentName(s,o),u=a.pushAttributed(l,e),f=r.push(c.retokenizeCapturedWithRuleId,d.start,-1,!1,null,a,u),p=e.createOnigString(s.substring(0,d.end));EE(e,p,n&&d.start===0,d.start,f,i,!1,0),GT(p);continue}let f=c.getName(s,o);if(f!==null){let t=(l.length>0?l[l.length-1].scopes:r.contentNameScopesList).pushAttributed(f,e);l.push(new PE(t,d.end))}}for(;l.length>0;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop()}var PE=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function FE(e,t,n,r,i,a,o,s){return new zE(e,t,n,r,i,a,o,s)}function IE(e,t,n,r,i){let a=HT(t,LE),o=vE.getCompiledRuleId(n,r,i.repository);for(let n of a)e.push({debugSelector:t,matcher:n.matcher,ruleId:o,grammar:i,priority:n.priority})}function LE(e,t){if(t.length<e.length)return!1;let n=0;return e.every(e=>{for(let r=n;r<t.length;r++)if(RE(t[r],e))return n=r+1,!0;return!1})}function RE(e,t){if(!e)return!1;if(e===t)return!0;let n=t.length;return e.length>n&&e.substr(0,n)===t&&e[n]===`.`}var zE=class{constructor(e,t,n,r,i,a,o,s){if(this._rootScopeName=e,this.balancedBracketSelectors=a,this._onigLib=s,this._basicScopeAttributesProvider=new CE(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=BE(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(let e of Object.keys(i)){let t=HT(e,LE);for(let n of t)this._tokenTypeMatchers.push({matcher:n.matcher,type:i[e]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(let e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){let e={lookup:e=>e===this._rootScopeName?this._grammar:this.getExternalGrammar(e),injections:e=>this._grammarRepository.injections(e)},t=[],n=this._rootScopeName,r=e.lookup(n);if(r){let e=r.injections;if(e)for(let n in e)IE(t,n,e[n],this,r);let i=this._grammarRepository.injections(n);i&&i.forEach(e=>{let n=this.getExternalGrammar(e);if(n){let e=n.injectionSelector;e&&IE(t,e,n,this,n)}})}return t.sort((e,t)=>e.priority-t.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){let t=++this._lastRuleId,n=e(uE(t));return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[dE(e)]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){let n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=BE(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){let r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){let r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){this._rootId===-1&&(this._rootId=vE.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===HE.NULL){i=!0;let e=this._basicScopeAttributesProvider.getDefaultAttributes(),n=this.themeProvider.getDefaults(),r=zT.set(0,e.languageId,e.tokenType,null,n.fontStyle,n.foregroundId,n.backgroundId),a=this.getRule(this._rootId).getName(null,null),o;o=a?VE.createRootAndLookUpScopeName(a,r,this):VE.createRoot(`unknown`,r),t=new HE(null,this._rootId,-1,-1,!1,null,o,o)}else i=!1,t.reset();e+=`
|
|
38
38
|
`;let a=this.createOnigString(e),o=a.content.length,s=new WE(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),c=EE(this,a,i,0,t,s,!0,r);return GT(a),{lineLength:o,lineTokens:s,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function BE(e,t){return e=pT(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var VE=class e{constructor(e,t,n){this.parent=e,this.scopePath=t,this.tokenAttributes=n}static fromExtension(t,n){let r=t,i=t?.scopePath??null;for(let t of n)i=DT.push(i,t.scopeNames),r=new e(r,i,t.encodedTokenAttributes);return r}static createRoot(t,n){return new e(null,new DT(null,t),n)}static createRootAndLookUpScopeName(t,n,r){let i=r.getMetadataForScope(t),a=new DT(null,t),o=r.themeProvider.themeMatch(a),s=e.mergeAttributes(n,i,o);return new e(null,a,s)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(` `)}equals(t){return e.equals(this,t)}static equals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}while(!0)}static mergeAttributes(e,t,n){let r=-1,i=0,a=0;return n!==null&&(r=n.fontStyle,i=n.foregroundId,a=n.backgroundId),zT.set(e,t.languageId,t.tokenType,null,r,i,a)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(` `)===-1)return e._pushAttributed(this,t,n);let r=t.split(/ /g),i=this;for(let t of r)i=e._pushAttributed(i,t,n);return i}static _pushAttributed(t,n,r){let i=r.getMetadataForScope(n),a=t.scopePath.push(n),o=r.themeProvider.themeMatch(a),s=e.mergeAttributes(t.tokenAttributes,i,o);return new e(t,a,s)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(n.parent?.scopePath??null)}),n=n.parent;return n===e?t.reverse():void 0}},HE=class e{constructor(e,t,n,r,i,a,o,s){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=i,this.endRule=a,this.nameScopesList=o,this.contentNameScopesList=s,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=r}_stackElementBrand=void 0;static NULL=new e(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t!==null&&e._equals(this,t)}static _equals(e,t){return e===t?!0:this._structuralEquals(e,t)?VE.equals(e.contentNameScopesList,t.contentNameScopesList):!1}static _structuralEquals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}while(!0)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){e._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,i,a,o,s){return new e(this,t,n,r,i,a,o,s)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){let e=[];return this._writeString(e,0),`[`+e.join(`,`)+`]`}_writeString(e,t){return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(t){return this.endRule===t?this:new e(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){return{ruleId:dE(this.ruleId),beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){let r=VE.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new e(t,uE(n.ruleId),n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,VE.fromExtension(r,n.contentNameScopesList))}},UE=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(e=>e===`*`?(this.allowAny=!0,[]):HT(e,LE).map(e=>e.matcher)),this.unbalancedBracketScopes=t.flatMap(e=>HT(e,LE).map(e=>e.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(let t of this.unbalancedBracketScopes)if(t(e))return!1;for(let t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},WE=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let n=e?.tokenAttributes??0,r=!1;if(this.balancedBracketSelectors?.matchesAlways&&(r=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){let t=e?.getScopeNames()??[];for(let e of this._tokenTypeOverrides)e.matcher(t)&&(n=zT.set(n,0,BT(e.type),null,-1,0,0));this.balancedBracketSelectors&&(r=this.balancedBracketSelectors.match(t))}if(r&&(n=zT.set(n,0,8,r,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),this._lastTokenEndIndex=t;return}let n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);let n=new Uint32Array(this._binaryTokens.length);for(let e=0,t=this._binaryTokens.length;e<t;e++)n[e]=this._binaryTokens[e];return n}},GE=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(let e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,i){if(!this._grammars.has(e)){let a=this._rawGrammars.get(e);if(!a)return null;this._grammars.set(e,FE(e,a,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},KE=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new GE(ET.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(ET.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes,new UE(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,r,i){let a=new YT(this._syncRegistry,e);for(;a.Q.length>0;)a.Q.map(e=>this._loadSingleGrammar(e.scopeName)),a.processQueue();return this._grammarForScopeName(e,t,n,r,i)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){let t=this._options.loadGrammar(e);if(t){let n=typeof this._options.getInjections==`function`?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}addGrammar(e,t=[],n=0,r=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,n,r)}_grammarForScopeName(e,t=0,n=null,r=null,i=null){return this._syncRegistry.grammarForScopeName(e,t,n,r,i)}},qE=HE.NULL;function JE(e,t){let n=typeof e==`string`?{}:{...e.colorReplacements},r=typeof e==`string`?e:e.name;for(let[e,i]of Object.entries(t?.colorReplacements||{}))typeof i==`string`?n[e]=i:e===r&&Object.assign(n,i);return n}function YE(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function XE(e){return Array.isArray(e)?e:[e]}async function ZE(e){return Promise.resolve(typeof e==`function`?e():e).then(e=>e.default||e)}function QE(e){return!e||[`plaintext`,`txt`,`text`,`plain`].includes(e)}function $E(e){return e===`ansi`||QE(e)}function eD(e){return e===`none`}function tD(e){return eD(e)}var nD=/(\r?\n)/g;function rD(e,t=!1){if(e.length===0)return[[``,0]];let n=e.split(nD),r=0,i=[];for(let e=0;e<n.length;e+=2){let a=t?n[e]+(n[e+1]||``):n[e];i.push([a,r]),r+=n[e].length,r+=n[e+1]?.length||0}return i}var iD={light:`#333333`,dark:`#bbbbbb`},aD={light:`#fffffe`,dark:`#1e1e1e`},oD=`__shiki_resolved`;function sD(e){if(e?.[oD])return e;let t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||=`dark`,t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:r}=t;if(!n||!r){let e=t.settings?t.settings.find(e=>!e.name&&!e.scope):void 0;e?.settings?.foreground&&(r=e.settings.foreground),e?.settings?.background&&(n=e.settings.background),!r&&t?.colors?.[`editor.foreground`]&&(r=t.colors[`editor.foreground`]),!n&&t?.colors?.[`editor.background`]&&(n=t.colors[`editor.background`]),r||=t.type===`light`?iD.light:iD.dark,n||=t.type===`light`?aD.light:aD.dark,t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let i=0,a=new Map;function o(e){if(a.has(e))return a.get(e);i+=1;let n=`#${i.toString(16).padStart(8,`0`).toLowerCase()}`;return t.colorReplacements?.[`#${n}`]?o(e):(a.set(e,n),n)}t.settings=t.settings.map(e=>{let n=e.settings?.foreground&&!e.settings.foreground.startsWith(`#`),r=e.settings?.background&&!e.settings.background.startsWith(`#`);if(!n&&!r)return e;let i={...e,settings:{...e.settings}};if(n){let n=o(e.settings.foreground);t.colorReplacements[n]=e.settings.foreground,i.settings.foreground=n}if(r){let n=o(e.settings.background);t.colorReplacements[n]=e.settings.background,i.settings.background=n}return i});for(let e of Object.keys(t.colors||{}))if((e===`editor.foreground`||e===`editor.background`||e.startsWith(`terminal.ansi`))&&!t.colors[e]?.startsWith(`#`)){let n=o(t.colors[e]);t.colorReplacements[n]=t.colors[e],t.colors[e]=n}return Object.defineProperty(t,oD,{enumerable:!1,writable:!1,value:!0}),t}async function cD(e){return[...new Set((await Promise.all(e.filter(e=>!$E(e)).map(async e=>await ZE(e).then(e=>Array.isArray(e)?e:[e])))).flat())]}async function lD(e){return(await Promise.all(e.map(async e=>tD(e)?null:sD(await ZE(e))))).filter(e=>!!e)}function uD(e,t){if(!t)return e;if(t[e]){let n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new fT(`Circular alias \`${[...n].join(` -> `)} -> ${e}\``);n.add(e)}}return e}var dD=class extends KE{_resolver;_themes;_langs;_alias;_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(e,t,n,r={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=r,this._themes.map(e=>this.loadTheme(e)),this.loadLanguages(this._langs)}getTheme(e){return typeof e==`string`?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){let t=sD(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||=[...this._resolvedThemes.keys()],this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=ET.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=uD(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;let t=new Set([...this._langMap.values()].filter(t=>t.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);let n={balancedBracketSelectors:e.balancedBracketSelectors||[`*`],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);let r=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(r.name=e.name,this._resolvedGrammars.set(e.name,r),e.aliases&&e.aliases.forEach(t=>{this._alias[t]=e.name}),this._loadedLanguagesCache=null,t.size)for(let e of t)this._resolvedGrammars.delete(e.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(e.scopeName),this._syncRegistry?._grammars?.delete(e.scopeName),this.loadLanguage(this._langMap.get(e.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(let t of e)this.resolveEmbeddedLanguages(t);let t=[...this._langGraph.entries()],n=t.filter(([e,t])=>!t);if(n.length){let e=t.filter(([e,t])=>t?(t.embeddedLanguages||t.embeddedLangs)?.some(e=>n.map(([e])=>e).includes(e)):!1).filter(e=>!n.includes(e));throw new fT(`Missing languages ${n.map(([e])=>`\`${e}\``).join(`, `)}, required by ${e.map(([e])=>`\`${e}\``).join(`, `)}`)}for(let[e,n]of t)this._resolver.addLanguage(n);for(let[e,n]of t)this.loadLanguage(n)}getLoadedLanguages(){return this._loadedLanguagesCache||=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])],this._loadedLanguagesCache}resolveEmbeddedLanguages(e){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);let t=e.embeddedLanguages??e.embeddedLangs;if(t)for(let e of t)this._langGraph.set(e,this._langMap.get(e))}},fD=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:t=>e.createScanner(t),createOnigString:t=>e.createString(t)},t.forEach(e=>this.addLanguage(e))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){let t=e.split(`.`),n=[];for(let e=1;e<=t.length;e++){let r=t.slice(0,e).join(`.`);n=[...n,...this._injections.get(r)||[]]}return n}},pD=0;function mD(e){pD+=1,e.warnings!==!1&&pD>=10&&pD%10==0&&console.warn(`[Shiki] ${pD} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new fT("`engine` option is required for synchronous mode");let n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(sD),i=new dD(new fD(e.engine,n),r,n,e.langAlias),a;function o(t){return uD(t,e.langAlias)}function s(e){g();let t=i.getGrammar(typeof e==`string`?e:e.name);if(!t)throw new fT(`Language \`${e}\` not found, you may need to load it first`);return t}function c(e){if(e===`none`)return{bg:``,fg:``,name:`none`,settings:[],type:`dark`};g();let t=i.getTheme(e);if(!t)throw new fT(`Theme \`${e}\` not found, you may need to load it first`);return t}function l(e){g();let t=c(e);return a!==e&&(i.setTheme(t),a=e),{theme:t,colorMap:i.getColorMap()}}function u(){return g(),i.getLoadedThemes()}function d(){return g(),i.getLoadedLanguages()}function f(...e){g(),i.loadLanguages(e.flat(1))}async function p(...e){return f(await cD(e))}function m(...e){g();for(let t of e.flat(1))i.loadTheme(t)}async function h(...e){return g(),m(await lD(e))}function g(){if(t)throw new fT(`Shiki instance has been disposed`)}function _(){t||(t=!0,i.dispose(),--pD)}return{setTheme:l,getTheme:c,getLanguage:s,getLoadedThemes:u,getLoadedLanguages:d,resolveLangAlias:o,loadLanguage:p,loadLanguageSync:f,loadTheme:h,loadThemeSync:m,dispose:_,[Symbol.dispose]:_}}async function hD(e){e.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,n,r]=await Promise.all([lD(e.themes||[]),cD(e.langs||[]),e.engine]);return mD({...e,themes:t,langs:n,engine:r})}var gD=new WeakMap;function _D(e,t){gD.set(e,t)}function vD(e){return gD.get(e)}var yD=class e{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new e(Object.fromEntries(XE(n).map(e=>[e,qE])),t)}constructor(...e){if(e.length===2){let[t,n]=e;this.lang=n,this._stacks=t}else{let[t,n,r]=e;this.lang=n,this._stacks={[r]:t}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return bD(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function bD(e){let t=[],n=new Set;function r(e){if(n.has(e))return;n.add(e);let i=e?.nameScopesList?.scopeName;i&&t.push(i),e.parent&&r(e.parent)}return r(e),t}function xD(e,t){if(!(e instanceof yD))throw new fT(`Invalid grammar state`);return e.getInternalStack(t)}var SD=/,/,CD=/ /;function wD(e,t,n={}){let{theme:r=e.getLoadedThemes()[0]}=n;if(QE(e.resolveLangAlias(n.lang||`text`))||eD(r))return rD(t).map(e=>[{content:e[0],offset:e[1]}]);let{theme:i,colorMap:a}=e.setTheme(r),o=e.getLanguage(n.lang||`text`);if(n.grammarState){if(n.grammarState.lang!==o.name)throw new fT(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${o.name}"`);if(!n.grammarState.themes.includes(i.name))throw new fT(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${i.name}"`)}return ED(t,o,i,a,n)}function TD(...e){if(e.length===2)return vD(e[1]);let[t,n,r={}]=e,{lang:i=`text`,theme:a=t.getLoadedThemes()[0]}=r;if(QE(i)||eD(a))throw new fT(`Plain language does not have grammar state`);if(i===`ansi`)throw new fT(`ANSI language does not have grammar state`);let{theme:o,colorMap:s}=t.setTheme(a),c=t.getLanguage(i);return new yD(DD(n,c,o,s,r).stateStack,c.name,o.name)}function ED(e,t,n,r,i){let a=DD(e,t,n,r,i),o=new yD(a.stateStack,t.name,n.name);return _D(a.tokens,o),a.tokens}function DD(e,t,n,r,i){let a=JE(n,i),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:s=500,includeExplanation:c=!1}=i,l=rD(e),u=i.grammarState?xD(i.grammarState,n.name)??qE:i.grammarContextCode==null?qE:DD(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack,d=[],f=[];for(let e=0,i=l.length;e<i;e++){let[i,p]=l[e];if(i===``){d=[],f.push([]);continue}if(o>0&&i.length>=o){d=[],f.push([{content:i,offset:p,color:``,fontStyle:0}]);continue}let m,h,g;c&&c!==`tokenType`&&(m=t.tokenizeLine(i,u,s),h=m.tokens,g=0);let _=t.tokenizeLine2(i,u,s),v=_.tokens.length/2;for(let e=0;e<v;e++){let t=_.tokens[2*e],o=e+1<v?_.tokens[2*e+2]:i.length;if(t===o)continue;let s=_.tokens[2*e+1],l=YE(r[zT.getForeground(s)],a),u=zT.getFontStyle(s),f={content:i.substring(t,o),offset:p+t,color:l,fontStyle:u};if(c===`tokenType`)f.type=zT.getTokenType(s);else if(c){let e=[];if(c!==`scopeName`)for(let t of n.settings){let n;switch(typeof t.scope){case`string`:n=t.scope.split(SD).map(e=>e.trim());break;case`object`:n=t.scope;break;default:continue}e.push({settings:t,selectors:n.map(e=>e.split(CD))})}f.explanation=[];let r=0;for(;t+r<o;){let t=h[g],n=i.substring(t.startIndex,t.endIndex);r+=n.length,f.explanation.push({content:n,scopes:c===`scopeName`?OD(t.scopes):kD(e,t.scopes)}),g+=1}}d.push(f)}f.push(d),d=[],u=_.ruleStack}return{tokens:f,stateStack:u}}function OD(e){return e.map(e=>({scopeName:e}))}function kD(e,t){let n=[];for(let r=0,i=t.length;r<i;r++){let i=t[r];n[r]={scopeName:i,themeMatches:MD(e,i,t.slice(0,r))}}return n}function AD(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]===`.`}function jD(e,t,n){if(!AD(e.at(-1),t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)AD(e[r],n[i])&&--r,--i;return r===-1}function MD(e,t,n){let r=[];for(let{selectors:i,settings:a}of e)for(let e of i)if(jD(e,t,n)){r.push(a);break}return r}function ND(e,t,n,r=wD){let i=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})),a=i.map(i=>{let a=r(e,t,{...n,theme:i.theme});return{tokens:a,state:vD(a),theme:typeof i.theme==`string`?i.theme:i.theme.name}}),o=PD(...a.map(e=>e.tokens)),s=o[0].map((e,t)=>e.map((e,r)=>{let a={content:e.content,variants:{},offset:e.offset};return`includeExplanation`in n&&n.includeExplanation&&(a.explanation=e.explanation),o.forEach((e,n)=>{let{content:o,explanation:s,offset:c,...l}=e[t][r];a.variants[i[n].color]=l}),a})),c=a[0].state?new yD(Object.fromEntries(a.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),a[0].state.lang):void 0;return c&&_D(s,c),s}function PD(...e){let t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){let i=e.map(e=>e[r]),a=t.map(()=>[]);t.forEach((e,t)=>e.push(a[t]));let o=i.map(()=>0),s=i.map(e=>e[0]);for(;s.every(e=>e);){let e=Math.min(...s.map(e=>e.content.length));for(let t=0;t<n;t++){let n=s[t];n.content.length===e?(a[t].push(n),o[t]+=1,s[t]=i[t][o[t]]):(a[t].push({...n,content:n.content.slice(0,e)}),s[t]={...n,content:n.content.slice(e),offset:n.offset+e})}}}return t}var FD=/\s+/g;function ID(e,t){if(!t)return e;e.properties||={},e.properties.class||=[],typeof e.properties.class==`string`&&(e.properties.class=e.properties.class.split(FD)),Array.isArray(e.properties.class)||(e.properties.class=[]);let n=Array.isArray(t)?t:t.split(FD);for(let t of n)t&&!e.properties.class.includes(t)&&e.properties.class.push(t);return e}var LD=/:?lang=["']([^"']+)["']/g,RD=/(?:```|~~~)([\w-]+)/g,zD=/\\begin\{([\w-]+)\}/g,BD=/<script\s+(?:type|lang)=["']([^"']+)["']/gi,VD=/^\s*---\r?\n[\s\S]*?\r?\n---(?:\r?\n|\s*$)/;function HD(e){let t=rD(e,!0).map(([e])=>e);function n(n){if(n===e.length)return{line:t.length-1,character:t.at(-1).length};let r=n,i=0;for(let e of t){if(r<e.length)break;r-=e.length,i++}return{line:i,character:r}}function r(e,n){let r=0;for(let n=0;n<e;n++)r+=t[n].length;return r+=n,r}return{lines:t,indexToPos:n,posToIndex:r}}function UD(e,t,n){let r=new Set;for(let t of e.matchAll(LD)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(RD)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(zD)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(BD)){let e=t[1].toLowerCase().trim(),n=e.includes(`/`)?e.split(`/`).pop():e;n&&r.add(n)}if(VD.test(e)&&r.add(`yaml`),!n)return[...r];let i=n.getBundledLanguages();return[...r].filter(e=>e&&i[e])}var WD=[`color`,`background-color`];function GD(e,t){let n=0,r=[];for(let i of t)i>n&&r.push({...e,content:e.content.slice(n,i),offset:e.offset+n}),n=i;return n<e.content.length&&r.push({...e,content:e.content.slice(n),offset:e.offset+n}),r}function KD(e,t){let n=0,r=e.length;for(;n<r;){let i=n+(r-n>>1);e[i]<=t?n=i+1:r=i}return n}function qD(e,t){let n=[...t instanceof Set?t:new Set(t)].sort((e,t)=>e-t);return n.length?e.map(e=>e.flatMap(e=>{let t=e.offset+e.content.length,r=KD(n,e.offset),i=r;for(;i<n.length&&n[i]<t;)i++;if(r===i)return e;let a=n.slice(r,i);for(let t=0;t<a.length;t++)a[t]-=e.offset;return GD(e,a)})):e}function JD(e,t,n,r,i=`css-vars`){let a={content:e.content,explanation:e.explanation,offset:e.offset},o=t.map(t=>YD(e.variants[t])),s=new Set(o.flatMap(e=>Object.keys(e))),c={},l=(e,r)=>{let i=r===`color`?``:r===`background-color`?`-bg`:`-${r}`;return n+t[e]+(r===`color`?``:i)};return o.forEach((e,n)=>{for(let a of s){let s=e[a]||`inherit`;if(n===0&&r&&WD.includes(a)){if(r===`light-dark()`&&o.length>1){let e=t.findIndex(e=>e===`light`),r=t.findIndex(e=>e===`dark`);if(e===-1||r===-1)throw new fT('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');let u=o[e][a]||`inherit`,d=o[r][a]||`inherit`;c[a]=`light-dark(${u}, ${d})`,i===`css-vars`&&(c[l(n,a)]=s)}else c[a]=s}else i===`css-vars`&&(c[l(n,a)]=s)}}),a.htmlStyle=c,a}function YD(e){let t={};if(e.color&&(t.color=e.color),e.bgColor&&(t[`background-color`]=e.bgColor),e.fontStyle){e.fontStyle&NT.Italic&&(t[`font-style`]=`italic`),e.fontStyle&NT.Bold&&(t[`font-weight`]=`bold`);let n=[];e.fontStyle&NT.Underline&&n.push(`underline`),e.fontStyle&NT.Strikethrough&&n.push(`line-through`),n.length&&(t[`text-decoration`]=n.join(` `))}return t}function XD(e){return typeof e==`string`?e:Object.entries(e).map(([e,t])=>`${e}:${t}`).join(`;`)}function ZD(){let e=new WeakMap;function t(t){if(!e.has(t.meta)){let n=HD(t.source);function r(e){if(typeof e==`number`){if(e<0||e>t.source.length)throw new fT(`Invalid decoration offset: ${e}. Code length: ${t.source.length}`);return{...n.indexToPos(e),offset:e}}{let t=n.lines[e.line];if(t===void 0)throw new fT(`Invalid decoration position ${JSON.stringify(e)}. Lines length: ${n.lines.length}`);let r=e.character;if(r<0&&(r=t.length+r),r<0||r>t.length)throw new fT(`Invalid decoration position ${JSON.stringify(e)}. Line ${e.line} length: ${t.length}`);return{...e,character:r,offset:n.posToIndex(e.line,r)}}}let i=(t.options.decorations||[]).map(e=>({...e,start:r(e.start),end:r(e.end)}));QD(i),e.set(t.meta,{decorations:i,converter:n,source:t.source})}return e.get(t.meta)}return{name:`shiki:decorations`,tokens(e){if(this.options.decorations?.length)return qD(e,t(this).decorations.flatMap(e=>[e.start.offset,e.end.offset]))},code(e){if(!this.options.decorations?.length)return;let n=t(this),r=[...e.children].filter(e=>e.type===`element`&&e.tagName===`span`);if(r.length!==n.converter.lines.length)throw new fT(`Number of lines in code element (${r.length}) does not match the number of lines in the source (${n.converter.lines.length}). Failed to apply decorations.`);function i(e,t,n,i){let a=r[e],s=``,c=-1,l=-1;if(t===0&&(c=0),n===0&&(l=0),n===1/0&&(l=a.children.length),c===-1||l===-1)for(let e=0;e<a.children.length;e++)s+=$D(a.children[e]),c===-1&&s.length===t&&(c=e+1),l===-1&&s.length===n&&(l=e+1);if(c===-1)throw new fT(`Failed to find start index for decoration ${JSON.stringify(i.start)}`);if(l===-1)throw new fT(`Failed to find end index for decoration ${JSON.stringify(i.end)}`);let u=a.children.slice(c,l);if(!i.alwaysWrap&&u.length===a.children.length)o(a,i,`line`);else if(!i.alwaysWrap&&u.length===1&&u[0].type===`element`)o(u[0],i,`token`);else{let e={type:`element`,tagName:`span`,properties:{},children:u};o(e,i,`wrapper`),a.children.splice(c,u.length,e)}}function a(e,t){r[e]=o(r[e],t,`line`)}function o(e,t,n){let r=t.properties||{},i=t.transform||(e=>e);return e.tagName=t.tagName||`span`,e.properties={...e.properties,...r,class:e.properties.class},t.properties?.class&&ID(e,t.properties.class),e=i(e,n)||e,e}let s=[],c=n.decorations.sort((e,t)=>t.start.offset-e.start.offset||e.end.offset-t.end.offset);for(let e of c){let{start:t,end:n}=e;if(t.line===n.line)i(t.line,t.character,n.character,e);else if(t.line<n.line){i(t.line,t.character,1/0,e);for(let r=t.line+1;r<n.line;r++)s.unshift(()=>a(r,e));i(n.line,0,n.character,e)}}s.forEach(e=>e())}}}function QD(e){for(let t=0;t<e.length;t++){let n=e[t];if(n.start.offset>n.end.offset)throw new fT(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){let t=e[r],i=n.start.offset<=t.start.offset&&t.start.offset<n.end.offset,a=n.start.offset<t.end.offset&&t.end.offset<=n.end.offset,o=t.start.offset<=n.start.offset&&n.start.offset<t.end.offset,s=t.start.offset<n.end.offset&&n.end.offset<=t.end.offset;if(i||a||o||s){if(i&&a||o&&s||o&&n.start.offset===n.end.offset||a&&t.start.offset===t.end.offset)continue;throw new fT(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(t.start)} intersect.`)}}}}function $D(e){return e.type===`text`?e.value:e.type===`element`?e.children.map($D).join(``):``}var eO=[ZD()];function tO(e){let t=nO(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...eO]}function nO(e){let t=[],n=[],r=[];for(let i of e)switch(i.enforce){case`pre`:t.push(i);break;case`post`:n.push(i);break;default:r.push(i)}return{pre:t,post:n,normal:r}}var rO=[`black`,`red`,`green`,`yellow`,`blue`,`magenta`,`cyan`,`white`,`brightBlack`,`brightRed`,`brightGreen`,`brightYellow`,`brightBlue`,`brightMagenta`,`brightCyan`,`brightWhite`],iO={1:`bold`,2:`dim`,3:`italic`,4:`underline`,7:`reverse`,8:`hidden`,9:`strikethrough`};function aO(e,t){let n=e.indexOf(`\x1B`,t);if(n!==-1&&e[n+1]===`[`){let t=e.indexOf(`m`,n);if(t!==-1)return{sequence:e.substring(n+2,t).split(`;`),startPosition:n,position:t+1}}return{position:e.length}}function oO(e){let t=e.shift();if(t===`2`){let t=e.splice(0,3).map(e=>Number.parseInt(e));return t.length!==3||t.some(e=>Number.isNaN(e))?void 0:{type:`rgb`,rgb:t}}if(t===`5`){let t=e.shift();if(t)return{type:`table`,index:Number(t)}}}function sO(e){let t=[];for(;e.length>0;){let n=e.shift();if(!n)continue;let r=Number.parseInt(n);if(!Number.isNaN(r)){if(r===0)t.push({type:`resetAll`});else if(r<=9)iO[r]&&t.push({type:`setDecoration`,value:iO[r]});else if(r<=29){let e=iO[r-20];e&&(t.push({type:`resetDecoration`,value:e}),e===`dim`&&t.push({type:`resetDecoration`,value:`bold`}))}else if(r<=37)t.push({type:`setForegroundColor`,value:{type:`named`,name:rO[r-30]}});else if(r===38){let n=oO(e);n&&t.push({type:`setForegroundColor`,value:n})}else if(r===39)t.push({type:`resetForegroundColor`});else if(r<=47)t.push({type:`setBackgroundColor`,value:{type:`named`,name:rO[r-40]}});else if(r===48){let n=oO(e);n&&t.push({type:`setBackgroundColor`,value:n})}else r===49?t.push({type:`resetBackgroundColor`}):r===53?t.push({type:`setDecoration`,value:`overline`}):r===55?t.push({type:`resetDecoration`,value:`overline`}):r>=90&&r<=97?t.push({type:`setForegroundColor`,value:{type:`named`,name:rO[r-90+8]}}):r>=100&&r<=107&&t.push({type:`setBackgroundColor`,value:{type:`named`,name:rO[r-100+8]}})}}return t}function cO(){let e=null,t=null,n=new Set;return{parse(r){let i=[],a=0;do{let o=aO(r,a),s=o.sequence?r.substring(a,o.startPosition):r.substring(a);if(s.length>0&&i.push({value:s,foreground:e,background:t,decorations:new Set(n)}),o.sequence){let r=sO(o.sequence);for(let i of r)i.type===`resetAll`?(e=null,t=null,n.clear()):i.type===`resetForegroundColor`?e=null:i.type===`resetBackgroundColor`?t=null:i.type===`resetDecoration`&&n.delete(i.value);for(let i of r)i.type===`setForegroundColor`?e=i.value:i.type===`setBackgroundColor`?t=i.value:i.type===`setDecoration`&&n.add(i.value)}a=o.position}while(a<r.length);return i}}}var lO={black:`#000000`,red:`#bb0000`,green:`#00bb00`,yellow:`#bbbb00`,blue:`#0000bb`,magenta:`#ff00ff`,cyan:`#00bbbb`,white:`#eeeeee`,brightBlack:`#555555`,brightRed:`#ff5555`,brightGreen:`#00ff00`,brightYellow:`#ffff55`,brightBlue:`#5555ff`,brightMagenta:`#ff55ff`,brightCyan:`#55ffff`,brightWhite:`#ffffff`};function uO(e=lO){function t(t){return e[t]}function n(e){return`#${e.map(e=>Math.max(0,Math.min(e,255)).toString(16).padStart(2,`0`)).join(``)}`}let r;function i(){if(r)return r;r=[];for(let e=0;e<rO.length;e++)r.push(t(rO[e]));let e=[0,95,135,175,215,255];for(let t=0;t<6;t++)for(let i=0;i<6;i++)for(let a=0;a<6;a++)r.push(n([e[t],e[i],e[a]]));let i=8;for(let e=0;e<24;e++,i+=10)r.push(n([i,i,i]));return r}function a(e){return i()[e]}function o(e){switch(e.type){case`named`:return t(e.name);case`rgb`:return n(e.rgb);case`table`:return a(e.index)}}return{value:o}}var dO=/#([0-9a-f]{3,8})/i,fO=/var\((--[\w-]+-ansi-[\w-]+)\)/,pO={black:`#000000`,red:`#cd3131`,green:`#0DBC79`,yellow:`#E5E510`,blue:`#2472C8`,magenta:`#BC3FBC`,cyan:`#11A8CD`,white:`#E5E5E5`,brightBlack:`#666666`,brightRed:`#F14C4C`,brightGreen:`#23D18B`,brightYellow:`#F5F543`,brightBlue:`#3B8EEA`,brightMagenta:`#D670D6`,brightCyan:`#29B8DB`,brightWhite:`#FFFFFF`};function mO(e,t,n){let r=JE(e,n),i=rD(t),a=uO(Object.fromEntries(rO.map(t=>{let n=`terminal.ansi${t[0].toUpperCase()}${t.substring(1)}`;return[t,e.colors?.[n]||pO[t]]}))),o=cO();return i.map(t=>o.parse(t[0]).map(n=>{let i,o;n.decorations.has(`reverse`)?(i=n.background?a.value(n.background):e.bg,o=n.foreground?a.value(n.foreground):e.fg):(i=n.foreground?a.value(n.foreground):e.fg,o=n.background?a.value(n.background):void 0),i=YE(i,r),o=YE(o,r),n.decorations.has(`dim`)&&(i=hO(i));let s=NT.None;return n.decorations.has(`bold`)&&(s|=NT.Bold),n.decorations.has(`italic`)&&(s|=NT.Italic),n.decorations.has(`underline`)&&(s|=NT.Underline),n.decorations.has(`strikethrough`)&&(s|=NT.Strikethrough),{content:n.value,offset:t[1],color:i,bgColor:o,fontStyle:s}}))}function hO(e){let t=e.match(dO);if(t){let e=t[1];if(e.length===8){let t=Math.round(Number.parseInt(e.slice(6,8),16)/2).toString(16).padStart(2,`0`);return`#${e.slice(0,6)}${t}`}if(e.length===6)return`#${e}80`;if(e.length===4){let t=e[0],n=e[1],r=e[2],i=e[3];return`#${t}${t}${n}${n}${r}${r}${Math.round(Number.parseInt(`${i}${i}`,16)/2).toString(16).padStart(2,`0`)}`}if(e.length===3){let t=e[0],n=e[1],r=e[2];return`#${t}${t}${n}${n}${r}${r}80`}}let n=e.match(fO);return n?`var(${n[1]}-dim)`:e}function gO(e,t,n={}){let r=e.resolveLangAlias(n.lang||`text`),{theme:i=e.getLoadedThemes()[0]}=n;if(!QE(r)&&!eD(i)&&r===`ansi`){let{theme:r}=e.setTheme(i);return mO(r,t,n)}return wD(e,t,n)}function _O(e,t,n){let r,i,a,o,s,c;if(`themes`in n){let{defaultColor:l=`light`,cssVariablePrefix:u=`--shiki-`,colorsRendering:d=`css-vars`}=n,f=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})).sort((e,t)=>e.color===l?-1:+(t.color===l));if(f.length===0)throw new fT("`themes` option must not be empty");let p=ND(e,t,n,gO);if(c=vD(p),l&&l!==`light-dark()`&&!f.some(e=>e.color===l))throw new fT(`\`themes\` option must contain the defaultColor key \`${l}\``);let m=f.map(t=>e.getTheme(t.theme)),h=f.map(e=>e.color);a=p.map(e=>e.map(e=>JD(e,h,u,l,d))),c&&_D(a,c);let g=f.map(e=>JE(e.theme,n));i=vO(f,m,g,u,l,`fg`,d),r=vO(f,m,g,u,l,`bg`,d),o=`shiki-themes ${m.map(e=>e.name).join(` `)}`,s=l?void 0:[i,r].join(`;`)}else if(`theme`in n){let s=JE(n.theme,n);a=gO(e,t,n);let l=e.getTheme(n.theme);r=YE(l.bg,s),i=YE(l.fg,s),o=l.name,c=vD(a)}else throw new fT("Invalid options, either `theme` or `themes` must be provided");return{tokens:a,fg:i,bg:r,themeName:o,rootStyle:s,grammarState:c}}function vO(e,t,n,r,i,a,o){return e.map((s,c)=>{let l=YE(t[c][a],n[c])||`inherit`,u=`${r+s.color}${a===`bg`?`-bg`:``}:${l}`;if(c===0&&i){if(i===`light-dark()`&&e.length>1){let r=e.findIndex(e=>e.color===`light`),i=e.findIndex(e=>e.color===`dark`);if(r===-1||i===-1)throw new fT('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${YE(t[r][a],n[r])||`inherit`}, ${YE(t[i][a],n[i])||`inherit`});${u}`}return l}return o===`css-vars`?u:null}).filter(e=>!!e).join(`;`)}var yO=/^\s+$/,bO=/^(\s*)(.*?)(\s*)$/;function xO(e,t,n,r={meta:{},options:n,codeToHast:(t,n)=>xO(e,t,n),codeToTokens:(t,n)=>_O(e,t,n)}){let i=t;for(let e of tO(n))i=e.preprocess?.call(r,i,n)||i;let{tokens:a,fg:o,bg:s,themeName:c,rootStyle:l,grammarState:u}=_O(e,i,n),{mergeWhitespaces:d=!0,mergeSameStyleTokens:f=!1}=n;d===!0?a=CO(a):d===`never`&&(a=wO(a)),f&&(a=TO(a));let p={...r,get source(){return i}};for(let e of tO(n))a=e.tokens?.call(p,a)||a;return SO(a,{...n,fg:o,bg:s,themeName:c,rootStyle:n.rootStyle===!1?!1:n.rootStyle??l},p,u)}function SO(e,t,n,r=vD(e)){let i=tO(t),a=[],o={type:`root`,children:[]},{structure:s=`classic`,tabindex:c=`0`}=t,l={class:`shiki ${t.themeName||``}`};t.rootStyle!==!1&&(l.style=t.rootStyle==null?`background-color:${t.bg};color:${t.fg}`:t.rootStyle),c!==!1&&c!=null&&(l.tabindex=c.toString());for(let[e,n]of Object.entries(t.meta||{}))e.startsWith(`_`)||(l[e]=n);let u={type:`element`,tagName:`pre`,properties:l,children:[],data:t.data},d={type:`element`,tagName:`code`,properties:{},children:a},f=[],p={...n,structure:s,addClassToHast:ID,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return o},get pre(){return u},get code(){return d},get lines(){return f}};if(e.forEach((e,t)=>{t&&(s===`inline`?o.children.push({type:`element`,tagName:`br`,properties:{},children:[]}):s===`classic`&&a.push({type:`text`,value:`
|
|
39
39
|
`}));let n={type:`element`,tagName:`span`,properties:{class:`line`},children:[]},r=0;for(let a of e){let e={type:`element`,tagName:`span`,properties:{...a.htmlAttrs},children:[{type:`text`,value:a.content}]},c=XD(a.htmlStyle||YD(a));c&&(e.properties.style=c);for(let o of i)e=o?.span?.call(p,e,t+1,r,n,a)||e;s===`inline`?o.children.push(e):s===`classic`&&n.children.push(e),r+=a.content.length}if(s===`classic`){for(let e of i)n=e?.line?.call(p,n,t+1)||n;f.push(n),a.push(n)}else s===`inline`&&f.push(n)}),s===`classic`){for(let e of i)d=e?.code?.call(p,d)||d;u.children.push(d);for(let e of i)u=e?.pre?.call(p,u)||u;o.children.push(u)}else if(s===`inline`){let e=[],t={type:`element`,tagName:`span`,properties:{class:`line`},children:[]};for(let n of o.children)n.type===`element`&&n.tagName===`br`?(e.push(t),t={type:`element`,tagName:`span`,properties:{class:`line`},children:[]}):(n.type===`element`||n.type===`text`)&&t.children.push(n);e.push(t);let n={type:`element`,tagName:`code`,properties:{},children:e};for(let e of i)n=e?.code?.call(p,n)||n;o.children=[];for(let e=0;e<n.children.length;e++){e>0&&o.children.push({type:`element`,tagName:`br`,properties:{},children:[]});let t=n.children[e];t.type===`element`&&o.children.push(...t.children)}}let m=o;for(let e of i)m=e?.root?.call(p,m)||m;return r&&_D(m,r),m}function CO(e){return e.map(e=>{let t=[],n=``,r;return e.forEach((i,a)=>{let o=!(i.fontStyle&&(i.fontStyle&NT.Underline||i.fontStyle&NT.Strikethrough));o&&yO.test(i.content)&&e[a+1]?(r===void 0&&(r=i.offset),n+=i.content):n?(o?t.push({...i,offset:r,content:n+i.content}):t.push({content:n,offset:r},i),r=void 0,n=``):t.push(i)}),t})}function wO(e){return e.map(e=>e.flatMap(e=>{if(yO.test(e.content))return e;let t=e.content.match(bO);if(!t)return e;let[,n,r,i]=t;if(!n&&!i)return e;let a=[{...e,offset:e.offset+n.length,content:r}];return n&&a.unshift({content:n,offset:e.offset}),i&&a.push({content:i,offset:e.offset+n.length+r.length}),a}))}function TO(e){return e.map(e=>{let t=[];for(let n of e){if(t.length===0){t.push({...n});continue}let e=t.at(-1),r=XD(e.htmlStyle||YD(e)),i=XD(n.htmlStyle||YD(n)),a=e.fontStyle&&(e.fontStyle&NT.Underline||e.fontStyle&NT.Strikethrough),o=n.fontStyle&&(n.fontStyle&NT.Underline||n.fontStyle&NT.Strikethrough);!a&&!o&&r===i?e.content+=n.content:t.push({...n})}return t})}var EO=LC;function DO(e,t,n){let r={meta:{},options:n,codeToHast:(t,n)=>xO(e,t,n),codeToTokens:(t,n)=>_O(e,t,n)},i=EO(xO(e,t,n,r));for(let e of tO(n))i=e.postprocess?.call(r,i,n)||i;return i}async function OO(e){let t=await hD(e);return{getLastGrammarState:(...e)=>TD(t,...e),codeToTokensBase:(e,n)=>gO(t,e,n),codeToTokensWithThemes:(e,n)=>ND(t,e,n),codeToTokens:(e,n)=>_O(t,e,n),codeToHast:(e,n)=>xO(t,e,n),codeToHtml:(e,n)=>DO(t,e,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function kO(e){let t=e.langs,n=e.themes,r=e.engine;async function i(e){function i(n){if(typeof n==`string`){if(n=e.langAlias?.[n]||n,$E(n))return[];let r=t[n];if(!r)throw new fT(`Language \`${n}\` is not included in this bundle. You may want to load it from external source.`);return r}return n}function a(e){if(tD(e))return`none`;if(typeof e==`string`){let t=n[e];if(!t)throw new fT(`Theme \`${e}\` is not included in this bundle. You may want to load it from external source.`);return t}return e}let o=(e.themes??[]).map(e=>a(e)),s=(e.langs??[]).map(e=>i(e)),c=await OO({engine:e.engine??r(),...e,themes:o,langs:s});return{...c,loadLanguage(...e){return c.loadLanguage(...e.map(i))},loadTheme(...e){return c.loadTheme(...e.map(a))},getBundledLanguages(){return t},getBundledThemes(){return n}}}return i}function AO(e){let t;async function n(n={}){if(t){let e=await t;return await Promise.all([e.loadTheme(...n.themes||[]),e.loadLanguage(...n.langs||[])]),e}{t=e({...n,themes:[],langs:[]});let r=await t;return await Promise.all([r.loadTheme(...n.themes||[]),r.loadLanguage(...n.langs||[])]),r}}return n}function jO(e,t){let n=AO(e);async function r(e,r){let i=await n({langs:[r.lang],themes:`theme`in r?[r.theme]:Object.values(r.themes)}),a=await t?.guessEmbeddedLanguages?.(e,r.lang,i);return a&&await i.loadLanguage(...a),i}return{getSingletonHighlighter(e){return n(e)},async codeToHtml(e,t){return(await r(e,t)).codeToHtml(e,t)},async codeToHast(e,t){return(await r(e,t)).codeToHast(e,t)},async codeToTokens(e,t){return(await r(e,t)).codeToTokens(e,t)},async codeToTokensBase(e,t){return(await r(e,t)).codeToTokensBase(e,t)},async codeToTokensWithThemes(e,t){return(await r(e,t)).codeToTokensWithThemes(e,t)},async getLastGrammarState(e,t){return(await n({langs:[t.lang],themes:[t.theme]})).getLastGrammarState(e,t)}}}var MO=kO({langs:Pw,themes:Fw,engine:()=>(0,dT.createOnigurumaEngine)(K(()=>import(`./_BnjxR4X6.js`),[]))}),{codeToHtml:Cte,codeToHast:wte,codeToTokens:Tte,codeToTokensBase:Ete,codeToTokensWithThemes:Dte,getSingletonHighlighter:Ote,getLastGrammarState:kte}=jO(MO,{guessEmbeddedLanguages:UD}),NO=4294967295,PO=class{patterns;options;regexps;constructor(e,t={}){this.patterns=e,this.options=t;let{forgiving:n=!1,cache:r,regexConstructor:i}=t;if(!i)throw Error("Option `regexConstructor` is not provided");this.regexps=e.map(e=>{if(typeof e!=`string`)return e;let t=r?.get(e);if(t){if(t instanceof RegExp)return t;if(n)return null;throw t}try{let t=i(e);return r?.set(e,t),t}catch(t){if(r?.set(e,t),n)return null;throw t}})}findNextMatchSync(e,t,n){let r=typeof e==`string`?e:e.content,i=[];function a(e,t,n=0){return{index:e,captureIndices:t.indices.map(e=>e==null?{start:NO,end:NO,length:0}:{start:e[0]+n,end:e[1]+n,length:e[1]-e[0]})}}for(let e=0;e<this.regexps.length;e++){let n=this.regexps[e];if(n)try{n.lastIndex=t;let o=n.exec(r);if(!o)continue;if(o.index===t)return a(e,o,0);i.push([e,o,0])}catch(e){if(this.options.forgiving)continue;throw e}}if(i.length){let e=Math.min(...i.map(e=>e[1].index));for(let[t,n,r]of i)if(n.index===e)return a(t,n,r)}return null}};function FO(e){if([...e].length!==1)throw Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function IO(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}var LO=new Set([`alnum`,`alpha`,`ascii`,`blank`,`cntrl`,`digit`,`graph`,`lower`,`print`,`punct`,`space`,`upper`,`word`,`xdigit`]),RO=String.raw;function zO(e,t){if(e==null)throw Error(t??`Value expected`);return e}var BO=RO`\[\^?`,VO=`c.? | C(?:-.?)?|${RO`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${RO`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${RO`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${RO`o\{[^\}]*\}?`}|${RO`\d{1,3}`}`,HO=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,UO=new RegExp(RO`
|
|
@@ -1611,5 +1611,5 @@ out vec4 outColor;
|
|
|
1611
1611
|
|
|
1612
1612
|
void main() {
|
|
1613
1613
|
outColor = v_color;
|
|
1614
|
-
}`,N1=8,P1=N1*Float32Array.BYTES_PER_ELEMENT,F1=20*N1,I1=class{constructor(){this.attributes=new Float32Array(F1),this.count=0}},L1=0,R1=0,z1=0,B1=0,V1=0,H1=0,U1=0,W1=class extends hQ{constructor(e,t,n,r){super(),this._terminal=e,this._gl=t,this._dimensions=n,this._themeService=r,this._vertices=new I1,this._verticesCursor=new I1;let i=this._gl;this._program=LQ(l1(i,j1,M1)),this._register(fQ(()=>i.deleteProgram(this._program))),this._projectionLocation=LQ(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(fQ(()=>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(fQ(()=>i.deleteBuffer(c))),i.bindBuffer(i.ELEMENT_ARRAY_BUFFER,c),i.bufferData(i.ELEMENT_ARRAY_BUFFER,s,i.STATIC_DRAW),this._attributesBuffer=LQ(i.createBuffer()),this._register(fQ(()=>i.deleteBuffer(this._attributesBuffer))),i.bindBuffer(i.ARRAY_BUFFER,this._attributesBuffer),i.enableVertexAttribArray(0),i.vertexAttribPointer(0,2,i.FLOAT,!1,P1,0),i.vertexAttribDivisor(0,1),i.enableVertexAttribArray(1),i.vertexAttribPointer(1,2,i.FLOAT,!1,P1,2*Float32Array.BYTES_PER_ELEMENT),i.vertexAttribDivisor(1,1),i.enableVertexAttribArray(2),i.vertexAttribPointer(2,4,i.FLOAT,!1,P1,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,c1),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)*T1,d=e.cells[u+E1],f=e.cells[u+D1],p=!!(f&67108864),(d!==s||f!==c&&(l||p))&&((s!==0||l&&c!==0)&&(m=r++*N1,this._updateRectangle(n,m,c,s,o,a,i)),o=a,s=d,c=f,l=p);(s!==0||l&&c!==0)&&(m=r++*N1,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++*N1,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++*N1,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++*N1,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++*N1,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:L1=this._themeService.colors.ansi[n&255].rgba;break;case 50331648:L1=(n&16777215)<<8;break;case 0:default:L1=this._themeService.colors.foreground.rgba}else switch(r&50331648){case 16777216:case 33554432:L1=this._themeService.colors.ansi[r&255].rgba;break;case 50331648:L1=(r&16777215)<<8;break;case 0:default:L1=this._themeService.colors.background.rgba}e.attributes.length<t+4&&(e.attributes=d1(e.attributes,this._terminal.rows*this._terminal.cols*N1)),R1=i*this._dimensions.device.cell.width,z1=o*this._dimensions.device.cell.height,B1=(L1>>24&255)/255,V1=(L1>>16&255)/255,H1=(L1>>8&255)/255,U1=1,this._addRectangle(e.attributes,t,R1,z1,(a-i)*this._dimensions.device.cell.width,this._dimensions.device.cell.height,B1,V1,H1,U1)}_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])}},G1=class extends hQ{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(fQ(()=>{this._canvas.remove()}))}_initCanvas(){this._ctx=LQ(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=t1(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=r$,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}`}},K1=class extends G1{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&&$$(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()}},q1=typeof window==`object`?window:globalThis,J1=class{constructor(){this.mapWindowIdToZoomLevel=new Map,this._onDidChangeZoomLevel=new V$,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this.mapWindowIdToZoomFactor=new Map,this._onDidChangeFullscreen=new V$,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}};J1.INSTANCE=new J1;var Y1=J1;function X1(e,t,n){typeof t==`string`&&(t=e.matchMedia(t)),t.addEventListener(`change`,n)}Y1.INSTANCE.onDidChangeZoomLevel,Y1.INSTANCE.onDidChangeFullscreen;var Z1=typeof navigator==`object`?navigator.userAgent:``;Z1.indexOf(`Firefox`);var Q1=Z1.indexOf(`AppleWebKit`)>=0;!(Z1.indexOf(`Chrome`)>=0)&&Z1.indexOf(`Safari`),Z1.indexOf(`Electron/`),Z1.indexOf(`Android`);var $1=!1;if(typeof q1.matchMedia==`function`){let e=q1.matchMedia(`(display-mode: standalone) or (display-mode: window-controls-overlay)`),t=q1.matchMedia(`(display-mode: fullscreen)`);$1=e.matches,X1(q1,e,({matches:e})=>{$1&&t.matches||($1=e)})}function e0(){return $1}var t0=`en`,n0=!1,r0=!1,i0=!1,a0=t0,o0,s0=globalThis,c0;typeof s0.vscode<`u`&&typeof s0.vscode.process<`u`?c0=s0.vscode.process:typeof process<`u`&&typeof process?.versions?.node==`string`&&(c0=process);var l0=typeof c0?.versions?.electron==`string`&&c0?.type===`renderer`;if(typeof c0==`object`){c0.platform,c0.platform,n0=c0.platform===`linux`,n0&&c0.env.SNAP&&c0.env.SNAP_REVISION,c0.env.CI||c0.env.BUILD_ARTIFACTSTAGINGDIRECTORY,a0=t0;let e=c0.env.VSCODE_NLS_CONFIG;if(e)try{let t=JSON.parse(e);t.userLocale,t.osLocale,a0=t.resolvedLanguage||t0,t.languagePack?.translationsConfigFile}catch{}r0=!0}else typeof navigator==`object`&&!l0?(o0=navigator.userAgent,o0.indexOf(`Windows`),o0.indexOf(`Macintosh`),(o0.indexOf(`Macintosh`)>=0||o0.indexOf(`iPad`)>=0||o0.indexOf(`iPhone`)>=0)&&navigator.maxTouchPoints&&navigator.maxTouchPoints,n0=o0.indexOf(`Linux`)>=0,o0?.indexOf(`Mobi`),i0=!0,a0=globalThis._VSCODE_NLS_LANGUAGE||t0,navigator.language.toLowerCase()):console.error(`Unable to resolve platform.`);var u0=r0;i0&&typeof s0.importScripts==`function`&&s0.origin;var d0=o0,f0=a0,p0;(e=>{function t(){return f0}e.value=t;function n(){return f0.length===2?f0===`en`:f0.length>=3&&f0[0]===`e`&&f0[1]===`n`&&f0[2]===`-`}e.isDefaultVariant=n;function r(){return f0===`en`}e.isDefault=r})(p0||={});var m0=typeof s0.postMessage==`function`&&!s0.importScripts;(()=>{if(m0){let e=[];s0.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}),s0.postMessage({vscodeScheduleAsyncWork:r},`*`)}}return e=>setTimeout(e)})();var h0=!!(d0&&d0.indexOf(`Chrome`)>=0);d0&&d0.indexOf(`Firefox`),!h0&&d0&&d0.indexOf(`Safari`),d0&&d0.indexOf(`Edg/`),d0&&d0.indexOf(`Android`);var g0=typeof navigator==`object`?navigator:{};u0||document.queryCommandSupported&&document.queryCommandSupported(`copy`)||g0&&g0.clipboard&&g0.clipboard.writeText,u0||g0&&g0.clipboard&&g0.clipboard.readText,u0||e0()||g0.keyboard,`ontouchstart`in q1||g0.maxTouchPoints,q1.PointerEvent&&(`ontouchstart`in q1||navigator.maxTouchPoints);var _0=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}},v0=new _0,y0=new _0,b0=new _0;Array(230);var x0;(e=>{function t(e){return v0.keyCodeToStr(e)}e.toString=t;function n(e){return v0.strToKeyCode(e)}e.fromString=n;function r(e){return y0.keyCodeToStr(e)}e.toUserSettingsUS=r;function i(e){return b0.keyCodeToStr(e)}e.toUserSettingsGeneral=i;function a(e){return y0.strToKeyCode(e)||b0.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 v0.keyCodeToStr(e)}e.toElectronAccelerator=o})(x0||={});var S0=Object.freeze(function(e,t){let n=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(n)}}}),C0;(e=>{function t(t){return t===e.None||t===e.Cancelled||t instanceof w0?!0:!t||typeof t!=`object`?!1:typeof t.isCancellationRequested==`boolean`&&typeof t.onCancellationRequested==`function`}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:O$.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:S0})})(C0||={});var w0=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?S0:(this._emitter||=new V$,this._emitter.event)}dispose(){this._emitter&&=(this._emitter.dispose(),null)}};(function(){typeof globalThis.requestIdleCallback!=`function`||globalThis.cancelIdleCallback})();var T0;(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})(T0||={});var E0=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 V$,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 O$.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())}};E0.EMPTY=E0.fromArray([]);function D0(e){return O0(e,0)}function O0(e,t){switch(typeof e){case`object`:return e===null?k0(349,t):Array.isArray(e)?M0(e,t):N0(e,t);case`string`:return j0(e,t);case`boolean`:return A0(e,t);case`number`:return k0(e,t);case`undefined`:return k0(937,t);default:return k0(617,t)}}function k0(e,t){return(t<<5)-t+e|0}function A0(e,t){return k0(e?433:863,t)}function j0(e,t){t=k0(149417,t);for(let n=0,r=e.length;n<r;n++)t=k0(e.charCodeAt(n),t);return t}function M0(e,t){return t=k0(104579,t),e.reduce((e,t)=>O0(t,e),t)}function N0(e,t){return t=k0(181387,t),Object.keys(e).sort().reduce((t,n)=>(t=j0(n,t),O0(e[n],t)),t)}var{registerWindow:nre,getWindow:P0,getDocument:rre,getWindows:ire,getWindowsCount:are,getWindowId:ore,getWindowById:sre,hasWindow:cre,onDidRegisterWindow:lre,onWillUnregisterWindow:ure,onDidUnregisterWindow:dre}=function(){let e=new Map,t={window:q1,disposables:new mQ};e.set(q1.vscodeWindowId,t);let n=new V$,r=new V$,i=new V$;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 hQ.None;let a=new mQ,o={window:t,disposables:a.add(new mQ)};return e.set(t.vscodeWindowId,o),a.add(fQ(()=>{e.delete(t.vscodeWindowId),r.fire(t)})),a.add(I0(t,R0.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:q1},getDocument(e){return P0(e).document}}}(),F0=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 I0(e,t,n,r){return new F0(e,t,n,r)}var L0=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}};L0.None=new L0(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=D0(n),a=r.get(i);if(a)a.users+=1;else{let o=new V$,s=new MutationObserver(e=>o.fire(e));s.observe(e,n);let c=a={users:1,observer:s,onDidMutate:o.event};t.add(fQ(()=>{--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 R0={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:Q1?`webkitAnimationStart`:`animationstart`,ANIMATION_END:Q1?`webkitAnimationEnd`:`animationend`,ANIMATION_ITERATION:Q1?`webkitAnimationIteration`:`animationiteration`},z0=class extends hQ{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 gQ,this._charAtlasDisposable=this._register(new gQ),this._observerDisposable=this._register(new gQ),this._model=new A1,this._workCell=new s1,this._workCell2=new s1,this._rectangleRenderer=this._register(new gQ),this._glyphRenderer=this._register(new gQ),this._onChangeTextureAtlas=this._register(new V$),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this._register(new V$),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this._register(new V$),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onRequestRedraw=this._register(new V$),this.onRequestRedraw=this._onRequestRedraw.event,this._onContextLoss=this._register(new V$),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 t$(this._terminal,this._optionsService,this._model.selection,this._decorationService,this._coreBrowserService,this._themeService),this._core=this._terminal._core,this._renderLayers=[new K1(this._core.screenElement,2,this._terminal,this._core.linkifier,this._coreBrowserService,o,this._themeService)],this.dimensions=GQ(),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(I0(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(I0(this._canvas,`webglcontextrestored`,e=>{console.warn(`webglcontextrestored event received`),clearTimeout(this._contextRestorationTimeout),this._contextRestorationTimeout=void 0,n1(this._terminal),this._initializeWebGLState(),this._requestRedrawViewport()})),this._observerDisposable.value=a1(this._canvas,this._coreBrowserService.window,(e,t)=>this._setCanvasDevicePixelDimensions(e,t)),this._register(this._coreBrowserService.onWindowChange(e=>{this._observerDisposable.value=a1(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(fQ(()=>{for(let e of this._renderLayers)e.dispose();this._canvas.parentElement?.removeChild(this._canvas),n1(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 W1(this._terminal,this._gl,this.dimensions,this._themeService),this._glyphRenderer.value=new S1(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=t1(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=dQ(O$.forward(e.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas),O$.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 i1(()=>{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=V0(e,n.rows-1,0),t=V0(t,n.rows-1,0);let x=this._coreService.decPrivateModes.cursorStyle??n.options.cursorStyle??`block`,S=this._terminal.buffer.active.baseY+this._terminal.buffer.active.cursorY,C=S-n.buffer.ydisp,ee=Math.min(this._terminal.buffer.active.cursorX,n.cols-1),te=-1,ne=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=S===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||ee<p[0]||ee>=p[1],d?(l=!0,r=new B0(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)*T1,this._cellColorResolver.resolve(r,y,o,this.dimensions.device.cell.width),ne&&o===S&&(y===ee&&(this._model.cursor={x:ee,y:C,width:r.getWidth(),style:this._coreBrowserService.isFocused?x:n.options.cursorInactiveStyle,cursorWidth:n.options.cursorWidth,dpr:this._devicePixelRatio},te=ee+r.getWidth()-1),y>=ee&&y<=te&&(this._coreBrowserService.isFocused&&x===`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+E1]!==this._cellColorResolver.result.bg||this._model.cells[v+D1]!==this._cellColorResolver.result.fg||this._model.cells[v+O1]!==this._cellColorResolver.result.ext)&&(w=!0,h.length>1&&(g|=k1),this._model.cells[v]=g,this._model.cells[v+E1]=this._cellColorResolver.result.bg,this._model.cells[v+D1]=this._cellColorResolver.result.fg,this._model.cells[v+O1]=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)*T1,this._glyphRenderer.value.updateCell(y,a,0,0,0,0,wQ,0,0),this._model.cells[b]=0,this._model.cells[b+E1]=this._cellColorResolver.result.bg,this._model.cells[b+D1]=this._cellColorResolver.result.fg,this._model.cells[b+O1]=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})}},B0=class extends C${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 V0(e,t,n=0){return Math.max(Math.min(e,t),n)}var H0=`di$target`,U0=`di$dependencies`,W0=new Map;function G0(e){if(W0.has(e))return W0.get(e);let t=function(e,n,r){if(arguments.length!==3)throw Error(`@IServiceName-decorator can only be used to decorate a parameter`);K0(t,e,r)};return t._id=e,W0.set(e,t),t}function K0(e,t,n){t[H0]===t?t[U0].push({id:e,index:n}):(t[U0]=[{id:e,index:n}],t[H0]=t)}G0(`BufferService`),G0(`CoreMouseService`),G0(`CoreService`),G0(`CharsetService`),G0(`InstantiationService`),G0(`LogService`);var q0=G0(`OptionsService`);G0(`OscLinkService`),G0(`UnicodeService`),G0(`DecorationService`);var J0={trace:0,debug:1,info:2,warn:3,error:4,off:5},Y0=`xterm.js: `,X0=class extends hQ{constructor(e){super(),this._optionsService=e,this._logLevel=5,this._updateLogLevel(),this._register(this._optionsService.onSpecificOptionChange(`logLevel`,()=>this._updateLogLevel())),Z0=this}get logLevel(){return this._logLevel}_updateLogLevel(){this._logLevel=J0[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?``:Y0)+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)}};X0=JZ([YZ(0,q0)],X0);var Z0,Q0=class extends hQ{constructor(e){if(SQ&&CQ()<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 V$),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this._register(new V$),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this._register(new V$),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onContextLoss=this._register(new V$),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 z0(e,o,s,c,n,l,r,u,this._preserveDrawingBuffer)),this._register(O$.forward(this._renderer.onContextLoss,this._onContextLoss)),this._register(O$.forward(this._renderer.onChangeTextureAtlas,this._onChangeTextureAtlas)),this._register(O$.forward(this._renderer.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas)),this._register(O$.forward(this._renderer.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)),a.setRenderer(this._renderer),this._register(fQ(()=>{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()}},$0=2,e2=1,t2=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($0,Math.floor(u/e.css.cell.width)),rows:Math.max(e2,Math.floor(l/e.css.cell.height))}}},n2=`3.7.8`,r2=n2,i2=typeof Buffer==`function`,a2=typeof TextDecoder==`function`?new TextDecoder:void 0,o2=typeof TextEncoder==`function`?new TextEncoder:void 0,s2=Array.prototype.slice.call(`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=`),c2=(e=>{let t={};return e.forEach((e,n)=>t[e]=n),t})(s2),l2=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,u2=String.fromCharCode.bind(String),d2=typeof Uint8Array.from==`function`?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),f2=e=>e.replace(/=/g,``).replace(/[+\/]/g,e=>e==`+`?`-`:`_`),p2=e=>e.replace(/[^A-Za-z0-9\+\/]/g,``),m2=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+=s2[t>>18&63]+s2[t>>12&63]+s2[t>>6&63]+s2[t&63]}return o?a.slice(0,o-3)+`===`.substring(o):a},h2=typeof btoa==`function`?e=>btoa(e):i2?e=>Buffer.from(e,`binary`).toString(`base64`):m2,g2=i2?e=>Buffer.from(e).toString(`base64`):e=>{let t=[];for(let n=0,r=e.length;n<r;n+=4096)t.push(u2.apply(null,e.subarray(n,n+4096)));return h2(t.join(``))},_2=(e,t=!1)=>t?f2(g2(e)):g2(e),v2=e=>{if(e.length<2){var t=e.charCodeAt(0);return t<128?e:t<2048?u2(192|t>>>6)+u2(128|t&63):u2(224|t>>>12&15)+u2(128|t>>>6&63)+u2(128|t&63)}var t=65536+(e.charCodeAt(0)-55296)*1024+(e.charCodeAt(1)-56320);return u2(240|t>>>18&7)+u2(128|t>>>12&63)+u2(128|t>>>6&63)+u2(128|t&63)},y2=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,b2=e=>e.replace(y2,v2),x2=i2?e=>Buffer.from(e,`utf8`).toString(`base64`):o2?e=>g2(o2.encode(e)):e=>h2(b2(e)),S2=(e,t=!1)=>t?f2(x2(e)):x2(e),C2=e=>S2(e,!0),w2=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,T2=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 u2((t>>>10)+55296)+u2((t&1023)+56320);case 3:return u2((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return u2((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},E2=e=>e.replace(w2,T2),D2=e=>{if(e=e.replace(/\s+/g,``),!l2.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=c2[e.charAt(a++)]<<18|c2[e.charAt(a++)]<<12|(n=c2[e.charAt(a++)])<<6|(r=c2[e.charAt(a++)]),n===64?i.push(u2(t>>16&255)):r===64?i.push(u2(t>>16&255,t>>8&255)):i.push(u2(t>>16&255,t>>8&255,t&255));return i.join(``)},O2=typeof atob==`function`?e=>atob(p2(e)):i2?e=>Buffer.from(e,`base64`).toString(`binary`):D2,k2=i2?e=>d2(Buffer.from(e,`base64`)):e=>d2(O2(e).split(``).map(e=>e.charCodeAt(0))),A2=e=>k2(M2(e)),j2=i2?e=>Buffer.from(e,`base64`).toString(`utf8`):a2?e=>a2.decode(k2(e)):e=>E2(O2(e)),M2=e=>p2(e.replace(/[-_]/g,e=>e==`-`?`+`:`/`)),N2=e=>j2(M2(e)),P2=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)},F2=e=>({value:e,enumerable:!1,writable:!0,configurable:!0}),I2=function(){let e=(e,t)=>Object.defineProperty(String.prototype,e,F2(t));e(`fromBase64`,function(){return N2(this)}),e(`toBase64`,function(e){return S2(this,e)}),e(`toBase64URI`,function(){return S2(this,!0)}),e(`toBase64URL`,function(){return S2(this,!0)}),e(`toUint8Array`,function(){return A2(this)})},L2=function(){let e=(e,t)=>Object.defineProperty(Uint8Array.prototype,e,F2(t));e(`toBase64`,function(e){return _2(this,e)}),e(`toBase64URI`,function(){return _2(this,!0)}),e(`toBase64URL`,function(){return _2(this,!0)})},R2={version:n2,VERSION:r2,atob:O2,atobPolyfill:D2,btoa:h2,btoaPolyfill:m2,fromBase64:N2,toBase64:S2,encode:S2,encodeURI:C2,encodeURL:C2,utob:b2,btou:E2,decode:N2,isValid:P2,fromUint8Array:_2,toUint8Array:A2,extendString:I2,extendUint8Array:L2,extendBuiltins:()=>{I2(),L2()}},z2=class{constructor(e=new V2,t=new B2){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}},B2=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()}},V2=class{encodeText(e){return R2.encode(e)}decodeText(e){let t=R2.decode(e);return!R2.isValid(e)||R2.encode(t)!==e?``:t}},H2=class{constructor(e,t,n,r={}){this._terminal=e,this._regex=t,this._handler=n,this._options=r}provideLinks(e,t){let n=W2.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 U2(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 W2=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(!U2(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]}},G2=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function K2(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 q2=class{constructor(e=K2,t={}){this._handler=e,this._options=t}activate(e){this._terminal=e;let t=this._options,n=t.urlRegex||G2;this._linkProvider=this._terminal.registerLinkProvider(new H2(this._terminal,n,this._handler,t))}dispose(){this._linkProvider?.dispose()}};function J2(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 Y2(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 X2(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 Z2(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 Q2=450,$2=12,e4=` ·│┃()[]{}<>'"\`,;│|`;function t4(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===` `||e4.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)},Q2)},{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)>$2&&h()}},{passive:!1,signal:r});let g=()=>{if(h(),!i)return;i=!1,n.onEnd();let t=e.getSelection();t&&X_(t).then(e=>{e&&n.onCopy(t)})};return t().addEventListener(`touchend`,g,{signal:r}),t().addEventListener(`touchcancel`,g,{signal:r}),{selecting:()=>i}}var n4=5;function r4(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)<n4)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 X_(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})}var i4=Nr,a4=(e=>`/${e}&`)(Pr);function o4(e){Rr(e.a,`M15 4L8 20`)}var s4=(e,t)=>Ir(e.a,t),c4=(e,t)=>Lr(e.a,t),l4=Nr,u4=(e=>`/${e}&`)(Pr);function d4(e){Rr(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 f4=(e,t)=>Ir(e.a,t),p4=(e,t)=>Lr(e.a,t),m4=Nr,h4=(e=>`/${e}&`)(Pr);function g4(e){Rr(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 _4=(e,t)=>Ir(e.a,t),v4=(e,t)=>Lr(e.a,t),y4=Nr,b4=(e=>`/${e}&`)(Pr);function x4(e){Rr(e.a,`M21 3.6V20.4C21 20.7314 20.7314 21 20.4 21H3.6C3.26863 21 3 20.7314 3 20.4V3.6C3 3.26863 3.26863 3 3.6 3H20.4C20.7314 3 21 3.26863 21 3.6Z M3 16L10 13L21 18 M16 10C14.8954 10 14 9.10457 14 8C14 6.89543 14.8954 6 16 6C17.1046 6 18 6.89543 18 8C18 9.10457 17.1046 10 16 10Z`)}var S4=(e,t)=>Ir(e.a,t),C4=(e,t)=>Lr(e.a,t),w4=`<div class=term-wrap><div class=term></div><!><!><!><!></div><!><!>`,T4=` D b%b%b%b%l%c`,E4=400,D4=55,O4=3e4,k4=150,A4=[[{kind:`paste`},{kind:`key`,label:`▲`,seq:`\x1B[A`},{kind:`attach`}],[{kind:`key`,label:`◀`,seq:`\x1B[D`},{kind:`key`,label:`↵`,seq:`\r`},{kind:`key`,label:`▶`,seq:`\x1B[C`}],[{kind:`key`,label:`⇥`,seq:` `},{kind:`key`,label:`▼`,seq:`\x1B[B`},{kind:`key`,label:`^C`,seq:``}]],j4=L(`p20`,e=>A(e.a,`click`,function(){e._._._.d.click()})),M4=e=>{x4(e.b),S4(e.b,16),C4(e.b),j4(e)},N4=L(`p19`,e=>{A(e.a,`pointerdown`,function(e){e.preventDefault()}),A(e.a,`click`,function(){e._._._._.al()})}),P4=e=>{g4(e.b),_4(e.b,16),v4(e.b),N4(e)},F4=P(0,2,e=>{dt(e.a,{enter:e._.e===`↵`,"big-glyph":e._.e===`↵`||e._.e===`⇥`}),V(e.b,e._.e)}),I4=L(`p21`,e=>{A(e.a,`pointerdown`,function(t){t.preventDefault(),e._._._._.af(e._.f)}),A(e.a,`pointerup`,function(){e._._._._.ag()}),A(e.a,`pointercancel`,function(){e._._._._.ag()}),A(e.a,`pointerleave`,function(){e._._._._.ag()}),A(e.a,`contextmenu`,function(e){e.preventDefault()})}),L4=O(0,(e=>`<button title=Paste>${e}</button>`)(m4),(e=>` D/${e}&l`)(h4),P4,(e=>`<button title="Attach image">${e}</button>`)(y4),(e=>` D/${e}&l`)(b4),M4,`<button class=repeat> </button>`,` D `,e=>{F4._(e),I4(e)}),R4=(e,t)=>L4(e,t===`paste`?0:t===`attach`?1:2),z4=(e,t)=>{R4(e,t[0]?.kind),B4(e,t[0]?.label),V4(e,t[0]?.seq)},B4=M(4),V4=M(5),H4=k(0,`<!><!><!>`,`b%`,0,z4),U4=(e,t)=>H4(e,[t]),W4=(e,t)=>U4(e,t[0]),G4=I(60,L(`p17`,e=>A(e.a,`click`,function(){e._._.a7?.send(`\x1B`)})),e=>e._._),K4=L(`p18`,e=>A(e.a,`pointerdown`,function(e){e.preventDefault()})),q4=e=>{G4(e),K4(e)},J4=P(5,0,L(`p8`,e=>{e._.a5&&setTimeout(()=>e.c?.focus(),50)})),Y4=L(`p9`,e=>{A(e.a,`click`,function(){m6(e._,!1)}),A(e.b,`click`,function(e){e.stopPropagation()}),A(e.c,`paste`,function(t){t.preventDefault(),e._.ak(t.clipboardData)}),A(e.d,`click`,function(){m6(e._,!1)})}),X4=e=>{J4._(e),Y4(e)},Z4=L(`p7`,e=>A(e.a,`click`,function(){a6(e._,!1)})),Q4=I(51,e=>ut(e.a,[`dot`,Mr(e._._.r)]),e=>e._._),$4=e=>{Q4(e),e3(e)},e3=I(57,e=>V(e.b,e._._.y),e=>e._._),t3=M(3,e=>{z(e.a,`title`,`New ${e.d} session`),ui(e.b,e.d)}),n3=L(`p15`,e=>A(e.a,`click`,function(t,n){n.closest(`[popover]`)?.hidePopover(),e._._._.p?.(e.d)})),r3=e=>{e.b,si(e.b,15),di(e.b),n3(e)},i3=(e,t)=>t3(e,t[0]),a3=N(1,e=>{B(e.a,`armed`,e._._._.g===e._.j),z(e.a,`title`,e._._._.g===e._.j?`Really kill this session?`:`Kill session`)}),o3=I(8,a3,e=>e._._._),s3=L(`p13`,e=>A(e.a,`click`,function(t,n){e._._._.g===e._.j?(k3(e._._._,null),n.closest(`[popover]`)?.hidePopover(),e._._._._._.w?.(e._.j)):k3(e._._._,e._.j)})),c3=e=>{o3(e),l3._(e),s3(e)},l3=P(6,0,a3),u3=L(`p12`,e=>A(e.a,`click`,function(t,n){n.closest(`[popover]`)?.hidePopover(),e._._._._._.v?.(e._.j)})),d3=e=>{ap(e.b),op(e.b,12),sp(e.b),u3(e)},f3=N(10,e=>B(e.a,`current`,e.j===e._._._._.t)),p3=I(53,f3,e=>e._._._._),m3=L(`p14`,e=>A(e.b,`click`,function(t,n){n.closest(`[popover]`)?.hidePopover(),e.j!==e._._._._.t&&e._._._._.u?.(e.j)})),h3=e=>{p3(e),_3(e),y3(e),e.d,si(e.d,14),di(e.d),m3(e)},g3=O(5,(e=>`<button class="sess-x sess-edit" title="Rename session">${e}</button>`)(rp),(e=>` D/${e}&l`)(ip),d3),_3=I(54,e=>g3(e,+!e._._._._.v),e=>e._._._._),v3=O(6,`<button class=sess-x>×</button>`,` `,c3),y3=I(55,e=>v3(e,+!e._._._._.w),e=>e._._._._),b3=M(9,e=>{f3(e),l3(e)}),x3=(e,t)=>ut(e.c,[`dot`,Mr(t)]),S3=N(14,e=>V(e.e,e.n||e.m)),C3=M(12,e=>{ui(e.d,e.m),S3(e)}),w3=M(13,S3),T3=k(0,(e=>`<div class=sess-row><button class=sess-open><span></span>${e}<span class=sess-title> </span></button><!><!></div>`)(ei),(e=>` D D b/${e}&D m%b%l`)(`b%c`),h3,(e,t)=>{b3(e,t[0]?.id),x3(e,t[0]?.state),C3(e,t[0]?.agent),w3(e,t[0]?.title)}),E3=I(52,e=>T3(e,[e._._._.s||[],`id`]),e=>e._._._),D3=E3,O3=I(50,e=>ui(e.b,e._._.q||`shell`),e=>e._._),k3=j(6,F(o3)),A3=(e,t)=>{z(e.a,`popovertarget`,t),z(e.d,`id`,t)},j3=L(`p16`,e=>A(e.d,`toggle`,function(t,n){if(k3(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`}})),M3=e=>{O3(e),N3(e),F3(e),L3(e),e.b,si(e.b,16),di(e.b),k3(e,null),A3(e,Je(e)),j3(e)},N3=I(51,e=>ut(e.c,[`dot`,`sess-dot`,Mr(e._._.r)]),e=>e._._),P3=O(4,`<!><!><!>`,`b%`,D3),F3=I(52,e=>{B(e.f,`lone`,(e._._.s||[]).length<=1),P3(e,(e._._.s||[]).length>1?0:1)},e=>e._._),I3=k(5,(e=>`<button class=icon-btn>${e}</button>`)(ei),(e=>` D/${e}&l`)(`b%c`),r3,i3),L3=I(56,e=>I3(e,[[...e._._.x||[],`shell`],e=>e]),e=>e._._),R3=L(`p11`,e=>{A(e.a,`click`,function(){e._._.m?.()}),A(e.c,`click`,function(){e._._.n?.()}),A(e.e,`click`,function(){e._._.o?.()})}),z3=e=>{th(e.b),nh(e.b,16),rh(e.b),Kr(e.d),qr(e.d,16),Jr(e.d),Vr(e.f),Hr(e.f,16),Ur(e.f),R3(e)},B3=L(`p10`,e=>A(e.a,`click`,function(){e._._.l?.()})),V3=O(0,(e=>`<button class="icon-btn kbtn" title="Back to terminal">${e}</button>`)(dv),(e=>` D/${e}&l`)(fv),e=>{pv(e.b),mv(e.b,16),hv(e.b),B3(e)},((e,t,n)=>`<button class="icon-btn kbtn" title=Workspaces>${e}</button><button class="icon-btn kbtn" title="Manage workspace">${t}</button><button class="icon-btn kbtn" title="Review changes">${n}</button>`)($m,Wr,zr),((e,t,n)=>` D/${e}&l D/${t}&l D/${n}&l`)(eh,Gr,Br),z3),H3=O(8,`<button class="icon-btn kbtn kbtn-esc" title=Escape>esc</button>`,` `,q4),U3=O(1,(e=>`<button class="icon-btn kbtn sess-btn" title=Sessions>${e}<span></span></button><div popover=auto class=sess-pop><!><div class=sess-new></div></div>`)(ei),(e=>` D/${e}& l D%b l`)(`b%c`),M3),W3=N(11,e=>U3(e,e._.k!==`diff`&&e._.p?0:1)),G3=P(6,0,e=>{V3(e,e._.k===`diff`?0:1),H3(e,+(e._.k===`diff`)),W3(e)}),K3=(e,t)=>{z(e.e,`popovertarget`,t),z(e.j,`id`,t)},q3=k(9,`<!><!><!>`,`b%`,0,W4),J3=L(`p23`,e=>{A(e.d,`change`,function(t,n){for(let t of n.files||[])e._.ah(t);n.value=``}),A(e.e,`pointerdown`,function(e){e.preventDefault()}),A(e.g,`pointerdown`,function(e){e.preventDefault()}),A(e.j,`pointerdown`,function(e){e.preventDefault()}),A(e.j,`toggle`,function(t,n){if(t.newState===`open`){let t=e.e.getBoundingClientRect();n.style.top=`${Math.max(8,t.top-n.offsetHeight-8)}px`,n.style.bottom=`auto`}})}),Y3=e=>{G3._(e),X3._(e),Q3._(e),$3._(e),e6._(e),o4(e.f),s4(e.f,16),c4(e.f),d4(e.h),f4(e.h,16),p4(e.h),K3(e,Je(e)),q3(e,[A4]),J3(e)},X3=P(6,0,W3),Z3=O(2,`<span class="kbar-ws dim" aria-hidden=true><span></span><span class=kbar-ws-name> </span></span>`,`D bD `,$4),Q3=P(6,0,e=>Z3(e,+!e._.y)),$3=P(6,0,e=>{B(e.g,`on`,e._.a1),z(e.g,`title`,e._.a1?`Hide keyboard`:`Show keyboard`)}),e6=P(6,0,L(`p22`,e=>A(e.g,`click`,function(){o6(e._,!e._.a1),e._.a7?.setKeyboard(e._.a1)}))),t6=aee(`p6`,1),n6=Xe(42),r6=O(4,`<div class=term-dead><button class="btn primary">Reconnect</button></div>`,`D `,Z4),i6=N(45,L(`p24`,e=>xt(e,{onMount:function(){let t=new AbortController,n=t.signal,r=new GZ({fontSize:13,fontFamily:`ui-monospace, monospace`,scrollback:5e3,allowProposedApi:!0,rightClickSelectsWord:!0,macOptionClickForcesSelection:!0,linkHandler:{activate(e,t){Zn(t)}}}),i=new t2;r.loadAddon(i),r.open(e.b);let a=Jn();try{let e=new Q0;e.onContextLoss(()=>e.dispose()),r.loadAddon(e)}catch{}try{r.loadAddon(new z2(void 0,{readText:()=>navigator.clipboard.readText().catch(()=>``),writeText:(e,t)=>X_(t).then(()=>{})}))}catch{}r.loadAddon(new q2((e,t)=>Zn(t))),i.fit();let o=a?X2(r):null,s=o?o.write:e=>r.write(e),c=J2({sessionId:e.t,term:r,write:s,onDead:()=>{a6(e,!0)},isVisible:()=>!!e.z},n);r.onData(e=>c.send(e)),r.attachCustomKeyEventHandler(t=>t.key===`Enter`&&t.shiftKey?(t.type===`keydown`&&c.send(`\x1B\r`),!1):(t.ctrlKey||t.metaKey)&&t.key.toLowerCase()===`c`&&r.hasSelection()?(t.type===`keydown`&&X_(r.getSelection()).then(t=>{t&&(r.clearSelection(),e.ab())}),!1):!(a&&t.type===`keydown`&&t.key===`Backspace`));let l=()=>{if(!e.b.clientWidth)return;let t=i.proposeDimensions();!t||t.cols===r.cols&&t.rows===r.rows||(i.fit(),c.resize(r.cols,r.rows))},u=new ResizeObserver(l);u.observe(e.b),n.addEventListener(`abort`,()=>u.disconnect());let d=()=>requestAnimationFrame(l);if(document.addEventListener(`visibilitychange`,()=>{document.hidden||d()},{signal:n}),window.addEventListener(`pageshow`,d,{signal:n}),window.addEventListener(`focus`,d,{signal:n}),window.visualViewport?.addEventListener(`resize`,d,{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.ah(t)}},{capture:!0,signal:n}),e.a7={send(e){c.send(e)},setKeyboard(e){let t=r.textarea;t&&(t.inputMode=e?`text`:`none`,e?(t.focus(),setTimeout(()=>{document.activeElement!==t&&t.focus()},50)):t.blur())}},a){r.textarea&&(r.textarea.inputMode=`none`);let t=window.visualViewport;if(t){let i=0,a=()=>{i=Math.max(i,t.height),e.a1&&i-t.height<k4&&(o6(e,!1),r.textarea&&(r.textarea.inputMode=`none`))};a(),t.addEventListener(`resize`,a,{signal:n}),window.addEventListener(`orientationchange`,()=>{i=0},{signal:n})}let i=t4(r,t6(e),{onStart(){o?.setFrozen(!0)},onEnd(){o?.setFrozen(!1)},onCopy(){e.ab()}},n);Y2(r,t6(e),n,i.selecting),Z2(r,e=>c.send(e),n)}else r4(r,t6(e),()=>e.ab(),n);e.z&&!a&&r.focus();let f={term:r,socket:c,abort:t,suspend:void 0};return e.z||(f.suspend=setTimeout(()=>c.disconnect(),O4)),f},onUpdate:function(){clearTimeout(this.suspend),this.socket.syncVisibility(),e.z?(!e.a0&&this.socket.readyState>=WebSocket.CLOSING&&(this.term.reset(),this.socket.reconnect()),!e.a0&&!e.a2&&this.term.focus()):this.suspend=setTimeout(()=>this.socket.disconnect(),O4)},onDestroy:function(){clearTimeout(this.suspend),this.abort.abort(),this.term.dispose()}})),7),a6=j(26,e=>{r6(e,+!e.a0),i6(e)}),o6=j(27,e=>{i6(e),$3(e)}),s6=O(6,((e,t)=>`<div class=kb-slot><div class=key-bar><!><div class=kspacer></div><!><input type=file accept=image/* hidden><button class="icon-btn kbtn dpad-btn" title="More keys">${e}</button><button class="icon-btn kbtn kb-toggle">${t}</button><!><div popover=auto class=dpad-grid></div></div></div>`)(i4,l4),((e,t)=>`E%b b%b b D/${e}&l D/${t}&l%b m`)(a4,u4),Y3),c6=j(28,e=>{s6(e,+!e.a2),i6(e)}),l6=O(2,`<div class="term-uploading dim">uploading…</div>`),u6=j(29,e=>l6(e,+!e.a3)),d6=O(3,`<div class=term-copied>Copied</div>`),f6=j(30,e=>d6(e,+!e.a4)),p6=O(5,`<div class=trap-backdrop><div class=paste-trap><p class=dim>Long-press below and choose Paste</p><input placeholder="Paste here…"><button class=btn>Cancel</button></div></div>`,` D Db b `,X4),m6=j(31,e=>{p6(e,+!e.a5),J4(e)}),h6=(e,t)=>D6(e,t.current),g6=(e,t)=>k6(e,t.timer),_6=(e,t)=>j6(e,t.current),v6=L(`p25`,e=>{c6(e,Jn()),A(e.a,`dragover`,function(e){e.preventDefault()}),A(e.a,`drop`,function(t){t.preventDefault();for(let n of t.dataTransfer?.files||[])e.ah(n)})});function y6(e){a6(e,!1),o6(e,!1),c6(e,!1),u6(e,!1),f6(e,!1),m6(e,!1),h6(e,{current:null}),g6(e,{timer:0}),_6(e,{current:null}),v6(e)}var b6=M(41),x6=N(40,e=>b6(e,Z6(e))),S6=M(46),C6=M(47),w6=N(44,e=>{S6(e,Q6(e)),C6(e,$6(e))}),T6=M(43,e=>{w6(e),i6(e)}),E6=N(34,e=>T6(e,e8(e))),D6=M(33,e=>{x6(e),E6(e),w6(e),i6(e)}),O6=M(37,i6),k6=M(36,e=>O6(e,t8(e))),A6=M(42),j6=M(39,e=>{A6(e,n8(e)),x6(e)}),M6=M(9,E6),N6=M(10,e=>{z(e.a,`hidden`,e.k===`diff`),G3(e)}),P6=F(p3),F6=M(19,e=>{i6(e),P6(e)}),I6=M(25,i6),L6=M(11),R6=M(12),z6=M(13),B6=M(14),V6=M(15,X3),H6=M(16,F(O3)),U6=M(17,F(N3,Q4)),W6=M(18,F(F3,E3)),G6=M(20),K6=M(21,F(_3)),q6=M(22,F(y3)),J6=M(23,F(L3)),Y6=F(e3),X6=M(24,e=>{Q3(e),Y6(e)});function Z6(e){return t=>{n6(e)(),e.a7?.send(t);let n={};n.delay=setTimeout(()=>{n.repeat=setInterval(()=>e.a7?.send(t),D4)},E4),e.ad=n}}function Q6(e){return async t=>{let n=[...t?.files||[]];for(let t of n)await e.ah(t);if(!n.length){let n=t?.getData(`text/plain`);n&&e.a7?.send(n)}m6(e,!1)}}function $6(e){return async()=>{if(!navigator.clipboard?.read){m6(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.ah(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.a7?.send(n)}}}catch{m6(e,!0)}}}function e8(e){return async t=>{if(t){u6(e,!0);try{let n=await(await fetch(`/api/workspaces/${e.j}/assets?name=${encodeURIComponent(t.name||`pasted.png`)}`,{method:`POST`,body:t})).json();n.path&&e.a7?.send(`${n.path} `)}finally{u6(e,!1)}}}}function t8(e){return()=>{clearTimeout(e.aa),f6(e,!0),e.aa=setTimeout(()=>{f6(e,!1)},1200)}}function n8(e){return()=>{let t=e.ad;t&&(clearTimeout(t.delay),clearInterval(t.repeat),e.ad=null)}}R(`p1`,Z6),R(`p4`,Q6),R(`p5`,$6),R(`p3`,e8),R(`p0`,t8),R(`p2`,n8);var r8=Bs,i8=(e=>`/${e}&`)(Vs);function a8(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 o8(e,t){if(!e)return null;let n=new Date(e).getTime()-Date.now();return n<=0?t?null:`now`:a8(n)}var s8=(e,t)=>V(e.e,t?`↻ ${ct(t)}`:``),c8=N(9,e=>s8(e,o8(e.i,e._.h!=null))),l8=He(4,c8),u8=l8,d8=N(12,e=>z(e.a,`title`,`${e.k}: ${e.l}% used${e.i?` — resets ${new Date(e.i).toLocaleString()}`:``}`),2),f8=M(11,e=>{V(e.d,e.l),d8(e)}),p8=M(7,e=>{dt(e.c,{hot:e.h>=90,warm:e.h>=70&&e.h<90}),ft(e.c,`width:${Math.min(100,Math.max(2,e.h))}%`),f8(e,Math.round(e.h))}),m8=M(8,e=>{c8(e),d8(e)}),h8=M(10,e=>{V(e.b,e.k),d8(e)}),g8=(e,t)=>{p8(e,t[0]?.used_percent),m8(e,t[0]?.resets_at),h8(e,t[0]?.window)},_8=P(3,0,e=>{z(e.a,`title`,`plan-usage could not reach this provider — these are its last cached numbers, ${a8(e._.h*1e3)} old`),V(e.b,a8(e._.h*1e3))}),v8=_8,y8=P(2,0,e=>V(e.a,e._.j.replace(/^default_/,``).replaceAll(`_`,` `))),b8=y8,x8=O(3,`<span class=usage-stale>⚠ <!> old</span>`,` Db%`,v8),S8=M(7,e=>{B(e.a,`stale`,e.h!=null),x8(e,+(e.h==null)),_8(e),l8(e)}),C8=(e,t)=>V(e.b,t),w8=O(2,`<span class=dim> </span>`,`D `,b8),T8=M(9,e=>{w8(e,+!e.j),y8(e)}),E8=k(4,`<div class=meter><span class="meter-label dim"> </span><span class=meter-track><span class=meter-fill></span></span><span class=meter-pct><!>%</span><span class="meter-reset dim"> </span></div>`,` E lD lD%lD `,u8,g8),D8=(e,t)=>E8(e,[t||[],`window`]),O8=k(0,`<div class=usage-row><div class=usage-name><strong> </strong><!><!></div><div class=usage-meters></div></div>`,` F l%b%l `,0,(e,t)=>{S8(e,t[0]?.stale_seconds),C8(e,t[0]?.agent),T8(e,t[0]?.plan),D8(e,t[0]?.windows)}),k8=I(13,e=>O8(e,[e._._.h||[],e=>`${e.agent}-${e.account||``}`]),e=>e._._),A8=k8,j8=I(12,e=>V(e.a,e._._.g),e=>e._._),M8=O(2,`<p class=dim><span class=spin></span> Loading usage…</p>`,0,0,`<p class=dim> </p>`,`D `,j8,`<div class=usage-list></div>`,` `,A8),N8=I(11,e=>M8(e,e._.f?e._.f?.error?1:2:0)),P8=L(`r2`,e=>A(e.a,`click`,function(){e._.k()})),F8=e=>{N8(e),I8(e),Uo(e.b),Wo(e.b,13),Go(e.b),P8(e)},I8=I(14,e=>{B(e.a,`spinning`,e._.i),z(e.a,`disabled`,e._.i)}),L8=ot(`r3`,(e=>`<header class=manage-head><div><h2>Usage</h2></div><button class=icon-btn title="Refresh usage">${e}</button></header><!><!>`)(Vo),(e=>`Db D/${e}&m%c`)(Ho),F8),R8=F(N8),z8=j(5,e=>{B8(e,e.f?.error),V8(e,e.f?.agents),R8(e)}),B8=M(6,F(j8)),V8=M(7,F(k8)),H8=j(8,F(I8)),U8=M(10),W8=L(`r4`,e=>xt(e,{onMount:function(){e.j(!1)}})),G8=M(9,e=>{U8(e,Y8(e)),W8(e)});function K8(e){ic(e.a),Hs(e.a,L8(e)),rc(e.a,`Usage`),nc(e.a,`usage-modal`),Ys(e.a),ac(e.a),z8(e,null),H8(e,!1),G8(e,X8(e))}var q8=(e,t)=>Qs(e.a,t),J8=(e,t)=>tc(e.a,t);function Y8(e){return async()=>{H8(e,!0),await e.j(!0),H8(e,!1)}}function X8(e){return async t=>{try{z8(e,await H(`/api/usage${t?`?refresh`:``}`))}catch(t){z8(e,{error:String(t.message||t)})}}}R(`r1`,Y8),R(`r0`,X8);var Z8=Bs,Q8=(e=>`/${e}&`)(Vs),$8=ot(`l2`,`Cancel`),e5=Xe(1,`B2`),t5=I(13,e=>V(e.a,e._.f)),n5=L(`l4`,e=>{jt(e,`b`),A(e.b,`keydown`,function(t){t.key===`Enter`?(t.preventDefault(),e._.m()):t.key===`Escape`&&e._.k&&e._.h?.(!1)})}),r5=e=>{t5(e),i5(e),a5(e),n5(e)},i5=I(15,e=>z(e.b,`placeholder`,e._.j)),a5=I(16,e=>At(e,`b`,e._.k,h5(e))),o5=ot(`l6`,`<h2 class=prompt-title> </h2><input>`,`D l `,r5,0,`B2`),s5=I(14,e=>V(e.b,e._.i||`OK`)),c5=L(`l3`,e=>A(e.a,`click`,function(){e._.m()})),l5=e=>{s5(e),u5(e),e.c,Lo(e.c,$8(e)),Ro(e.c,`btn`),zo(e.c),Bo(e.c),c5(e)},u5=I(16,e=>z(e.a,`disabled`,!e._.k.trim())),d5=st(`l5`,(e=>`<button type=button class="btn primary"> </button><div class=spacer></div>${e}`)(Fo),(e=>` D lb/${e}&`)(Io),l5),f5=M(12),p5=N(11,e=>f5(e,g5(e))),fre=F(u5,a5),m5=j(10,e=>{p5(e),fre(e)}),pre=(e,t)=>m5(e,t||``),mre=M(4,p5),hre=L(`l7`,e=>xt(e,{onMount:function(){setTimeout(()=>{let t=e5(e)();t?.focus(),t?.select()},0)}}));function gre(e){ic(e.a),ac(e.a,Yt({content:d5(e)})),Hs(e.a,o5(e)),nc(e.a,`prompt-dlg`),Ys(e.a),hre(e)}var _re=F(t5),vre=M(5,e=>{rc(e.a,e.f),_re(e)}),yre=(e,t)=>Qs(e.a,t),bre=M(7,e=>tc(e.a,e.h)),xre=M(8,F(s5)),Sre=M(9,F(i5));function h5(e){return t=>{m5(e._,t)}}function g5(e){return()=>{let t=e.k.trim();t&&e.e(t)}}R(`l0`,h5),R(`l1`,g5);var Cre=((e,t)=>`<div class=work-view>${e}<div class=main-col><!><!>${t}<!><!><div class=term-area></div></div><!><!></div>`)(dh,TF),wre=((e,t)=>`D/${e}&D%b%b/${t}&%b%b l%b%l`)(fh,EF),_5=P(8,0,e=>yre(e.a,!!e._.a6)),Tre=e=>{_5._(e),y5._(e),b5._(e),S5._(e),C5._(e),gre(e.a),vre(e.a,`Rename session`),xre(e.a,`Rename`),bre(e.a,d7(e)),Sre(e.a)},v5=N(1,e=>pre(e.a,e._.a7||e._.a8)),y5=P(8,0,v5),b5=P(8,0,v5),x5=N(2,e=>mre(e.a,f7(e))),S5=P(8,0,x5),C5=P(8,0,x5),w5=I(69,e=>V(e.a,e._._.a4),e=>e._._),Ere=st(`s31`,` `,` `,w5),Dre=e=>{Sr(e.a,Ere(e)),Er(e.a,p7(e)),hr(e.a),vr(e.a),br(e.a),Tr(e.a)},T5=P(7,0,e=>q8(e.a,e._.a3)),Ore=e=>{T5._(e),K8(e.a),J8(e.a,m7(e))},E5=N(2,e=>V(e.b,e._._.a5?`Starting…`:`Start ${e._._.o||`claude`}`)),D5=I(65,E5,e=>e._._),kre=L(`s32`,e=>A(e.a,`click`,function(){e._._.ao(e._._.o||`claude`,!0)})),Are=e=>{D5(e),O5(e),kre(e)},O5=I(70,e=>{z(e.a,`disabled`,e._._.a5),E5(e)},e=>e._._),k5=N(8,e=>I6(e.b,e._._.n&&e._._.y===`term`&&e.g===e._._.am),3),A5=I(64,k5,e=>e._._),jre=e=>{A5(e),j5(e),M5(e),P5(e),F5(e),I5(e),R5(e),z5(e),B5(e),y6(e.b),G6(e.b,v7(e)),B6(e.b,_7(e)),L6(e.b,g7(e)),R6(e.b,h7(e))},j5=I(66,e=>J6(e.b,e._._.r),e=>e._._),M5=I(67,e=>{N6(e.b,e._._.y),k5(e)},e=>e._._),N5=N(11,e=>V6(e.b,y7(e))),P5=I(75,e=>{M6(e.b,e._._.ab),z6(e.b,b7(e)),N5(e)},e=>e._._),F5=I(76,e=>X6(e.b,e._._.ag),e=>e._._),I5=I(77,e=>{W6(e.b,e._._.aj),K6(e.b,x7(e))},e=>e._._),Mre=le(3,0,2),L5=N(7,e=>Mre(e,e.g===e._._.am)),R5=I(79,e=>{k5(e),L5(e)},e=>e._._),z5=I(80,e=>q6(e.b,S7(e)),e=>e._._),B5=I(82,N5,e=>e._._),Nre=M(6,e=>{F6(e.b,e.g),k5(e),L5(e)}),Pre=(e,t)=>U6(e.b,t),Fre=(e,t)=>H6(e.b,t),Ire=k(0,(e=>`<!><!>${e}<!><!><!>`)(w4),(e=>`b%b/${e}&%b%c`)(T4),jre,(e,t)=>{Nre(e,t[0]?.id),Pre(e,t[0]?.state),Fre(e,t[0]?.agent)}),V5=P(6,0,e=>Ire(e,[e._.aj,`id`])),Lre=e=>{V5._(e),H5._(e)},Rre=O(1,`<div class=empty-sess><p class=dim>No sessions in this workspace.</p><button class="btn primary"> </button></div>`,`Db D `,Are),H5=P(6,0,e=>Rre(e,+!!e._.al)),zre=M(61,C5),Bre=O(6,`<!><!><!><!>`,`b%b%`,Lre,`<p class="dim pad-inline">Loading sessions…</p>`),Vre=L(`s35`,e=>{e.n&&window.addEventListener(`keydown`,t=>{if(t.key===`Escape`&&e.a2&&o7(e,!1),(t.metaKey||t.ctrlKey)&&t.shiftKey&&t.key.toLowerCase()===`d`&&(t.preventDefault(),n7(e,e.y===`diff`?`term`:`diff`)),t.altKey&&(t.key===`[`||t.key===`]`)&&(e.aj?.length??0)>1){t.preventDefault();let n=e.aj.map(e=>e.id);e7(e,n[(Math.max(0,n.indexOf(e.am))+(t.key===`]`?1:n.length-1))%n.length]),n7(e,`term`)}},{capture:!0,signal:Ee(e,0)})}),U5=N(49,e=>{Te(e,0),Vre(e)},4),Hre=F(R5),Ure=M(48,e=>{Hg(e.a,e.am),U5(e),Hre(e)}),W5=N(46,e=>Ure(e,(()=>{if(e.w&&e.aj?.some(t=>t.id===e.w))return e.w;let t=Fn(e.ab);return t&&e.aj?.some(e=>e.id===t)?t:e.aj?.[0]?.id??null})()),2),Wre=F(I5),Gre=M(45,e=>{E_(e.a,e.aj),yU(e.d,e.aj||[]),_ie(e,e.aj?.length),Bre(e,+!e.aj),W5(e),U5(e),V5(e),Wre(e)}),G5=N(40,e=>Gre(e,e.v??e.m?.[e.ab]?.sessions??null),2),K5=N(59,L(`s33`,e=>xt(e,{active:e.n,load:e.aw,onMount:function(){let t=new AbortController,n=t.signal,r={abort:t,started:!1,stale:!1,timer:void 0,refresh:()=>{if(document.hidden){r.stale=!0;return}r.stale=!1,this.load(!1)},sync:()=>{this.active?(r.started||(r.started=!0,this.load(!0)),r.timer??=setInterval(r.refresh,1e4)):r.stop()},stop:()=>{clearInterval(r.timer),r.timer=void 0}};return bn().addEventListener(`sessions.changed`,t=>{let n=t.data?.workspaceId;r.started&&(!n||n===e.ab)&&r.refresh()},{signal:n}),document.addEventListener(`visibilitychange`,()=>{!document.hidden&&r.stale&&r.refresh()},{signal:n}),fee(()=>{if(!this.active)return;let t=Tn(e.ab);t&&e.ah(t.pr);let n=Dn(e.ab);n&&(e7(e,n),n7(e,`term`))},n),r.sync(),r},onUpdate:function(){this.sync()},onDestroy:function(){this.abort.abort(),this.stop()}})),3),Kre=M(58,K5),q5=N(57,e=>Kre(e,w7(e)),2),qre=M(56,q5),J5=N(54,e=>qre(e,T7(e)),6),Jre=F(B5),Yre=M(62,e=>{S_(e.a,E7(e)),Jre(e)}),Y5=N(51,e=>Yre(e,D7(e)),2),Xre=M(50,e=>{J5(e),Y5(e)}),X5=N(38,e=>Xre(e,O7(e))),Zre=M(60,F(z5)),Z5=N(23,e=>Zre(e,k7(e))),Q5=j(21,e=>{zre(e,C7(e)),G5(e),X5(e),J5(e),Z5(e)}),$5=N(39,L(`s34`,e=>{e.w&&In(e.ab,e.w)})),e7=j(22,e=>{W5(e),J5(e),Z5(e),$5(e)}),Qre=le(5,2,4),t7=N(25,e=>pU(e.d,e.n&&e.y===`diff`)),$re=F(M5),n7=j(24,e=>{qg(e.a,e.y),B(e.g,`as-bar`,e.y===`diff`),Qre(e,e.y===`diff`),U5(e),t7(e),$re(e)}),r7=j(26,e=>fU(e.d,e.a0)),i7=N(44,L(`s36`,e=>{if(e.n){let t=Tn(e.ab);t&&e.ah(t.pr);let n=Dn(e.ab);n&&(e7(e,n),n7(e,`term`))}}),2),eie=M(43,e=>{w_(e.a,A7(e)),i7(e),K5(e)}),a7=j(27,e=>{mU(e.d,e.a1),eie(e,j7(e))}),o7=j(28,e=>{$g(e.a,e.a2),U5(e)}),tie=O(7,r8,(e=>`/${e}&`)(i8),Ore),s7=j(29,e=>{tie(e,+!e.a3),T5(e)}),nie=O(1,Qn,(e=>`/${e}&`)($n),Dre),rie=F(w5),c7=j(30,e=>{nie(e,+!e.a4),rie(e)}),l7=j(31,F(O5)),iie=O(8,Z8,(e=>`/${e}&`)(Q8),Tre),u7=j(32,e=>{cie(e,e.a6?.title),lie(e,e.a6?.agent),uie(e,e.a6?.id),iie(e,+!e.a6),_5(e)}),aie=(e,t)=>{Sie(e,t.wanted),Cie(e,t.run)},oie=M(63);function sie(e){l_(e.a),Ug(e.a,V7(e)),Jg(e.a,B7(e)),e_(e.a,z7(e)),u_(e.a,R7(e)),M_(e.a,L7(e)),j_(e.a,I7(e)),k_(e.a,F7(e)),JH(e.d),SU(e.d,P7(e)),wU(e.d,N7(e)),Q5(e,null),e7(e,null),n7(e,`term`),r7(e,``),a7(e,0),o7(e,!1),s7(e,!1),c7(e,null),l7(e,!1),u7(e,null),aie(e,{wanted:!1,run:void 0}),oie(e,M7(e))}var cie=M(33,y5),lie=M(34,b5),uie=M(35,S5),die=(e,t)=>{Rg(e.a,t),pie(e,t?.id),mie(e,t?.status),hie(e,t?.name)},fie=F(P5),pie=M(37,e=>{dU(e.d,e.ab),G5(e),W5(e),i7(e),X5(e),J5(e),$5(e),Y5(e),K5(e),fie(e)}),mie=M(41,J5),hie=M(42,F(F5)),gie=die,_ie=M(47,H5),vie=M(12,e=>{h_(e.a,e.m),G5(e)}),yie=F(A5),bie=L(`s37`,e=>{e.n||o7(e,!1)}),xie=M(13,e=>{d_(e.a,e.n),i7(e),U5(e),K5(e),t7(e),yie(e),bie(e)}),Sie=M(53,e=>{J5(e),q5(e)}),Cie=M(55,q5),wie=F(D5),Tie=M(14,e=>{J5(e),wie(e)}),Eie=M(15,e=>{__(e.a,e.p),Y5(e)}),Die=(e,t)=>f_(e.a,t),Oie=F(j5),kie=M(17,e=>{b_(e.a,e.r),Oie(e)}),Aie=(e,t)=>D_(e.a,t),jie=M(19,e=>v_(e.a,e.t)),Mie=(e,t)=>N_(e.a,t);function d7(e){return function(t){t||u7(e._,null)}}function f7(e){return function(t){e._.az(e._.a9,t),u7(e._,null)}}function p7(e){return function(){c7(e._,null)}}function m7(e){return t=>{s7(e._,t)}}function h7(e){return function(){o7(e._._,!0)}}function g7(e){return function(){n7(e._._,`term`)}}function _7(e){return function(){e._._.ah()}}function v7(e){return function(t){e7(e._._,t)}}function y7(e){return function(t){e._._.b0(e._._.ab,t)}}function b7(e){return function(){e._._.t?.(e._._.ab)}}function x7(e){return function(t){let n=(e._._.aj||[]).find(e=>e.id===t);n&&u7(e._._,n)}}function S7(e){return function(t){e._._.ay(t)}}function C7(e){return async(t,n)=>{n=n.trim(),n&&(Q5(e,(e.v||[]).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 w7(e){return t=>(t&&(e.ar=!0),(e.at??=On(e.au))())}function T7(e){return async()=>{let t=e.ar;e.ar=!1;try{let n=await H(`/api/workspaces/${e.ab}/sessions`);if(!n.length&&t&&e.af===`active`){let t=await e.ao(e.o||`claude`,!1);n=t?[t]:[]}Q5(e,n);let r=Fn(e.ab);r&&n.some(e=>e.id===r)&&e7(e,r),e.v.some(t=>t.id===e.w)||e7(e,e.v?.[0]?.id||null)}catch(t){if(Q5(e,e.v||[]),Zt(t))return;c7(e,String(t.message||t))}}}function E7(e){return function(t,n){e.b0(t,n)}}function D7(e){return async(t,n)=>{if(t===e.ab){let r=await e.ao(n,!0);r&&In(t,r.id);return}try{In(t,(await H(`/api/workspaces/${t}/sessions`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({agent:n})})).id),e.p?.(t)}catch(t){c7(e,String(t.message||t))}}}function O7(e){return async(t,n)=>{l7(e,!0);try{let r=await H(`/api/workspaces/${e.ab}/sessions`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({agent:t})});return n&&(Q5(e,(e.v||[]).concat(r)),e7(e,r.id)),r}catch(t){return c7(e,String(t.message||t)),null}finally{l7(e,!1)}}}function k7(e){return async t=>{try{await H(`/api/sessions/${t}`,{method:`DELETE`}),Q5(e,(e.v||[]).filter(e=>e.id!==t)),e.w===t&&e7(e,e.v?.[0]?.id||null)}catch(t){c7(e,`Kill session failed: ${String(t.message||t)}`)}}}function A7(e){return function(t){e.ah(t)}}function j7(e){return t=>{r7(e,t||``),t&&a7(e,e.a1+1),n7(e,`diff`)}}function M7(e){return t=>{u7(e,t)}}function N7(e){return function(){n7(e,`term`)}}function P7(e){return function(t){e7(e,t),n7(e,`term`)}}function F7(e){return function(t){e.b1(t)}}function I7(e){return function(t){e.ay(t)}}function L7(e){return function(){s7(e,!0)}}function R7(e){return function(t){c7(e,t)}}function z7(e){return t=>{o7(e,t)}}function B7(e){return t=>{n7(e,t)}}function V7(e){return function(t){e7(e,t)}}R(`s29`,d7),R(`s30`,f7),R(`s17`,p7),R(`s28`,m7),R(`s26`,h7),R(`s25`,g7),R(`s24`,_7),R(`s21`,v7),R(`s20`,y7),R(`s27`,b7),R(`s23`,x7),R(`s22`,S7),R(`s5`,C7),R(`s3`,w7),R(`s2`,T7),R(`s13`,E7),R(`s6`,D7),R(`s1`,O7),R(`s4`,k7),R(`s16`,A7),R(`s0`,j7),R(`s7`,M7),R(`s19`,N7),R(`s18`,P7),R(`s15`,F7),R(`s14`,I7),R(`s12`,L7),R(`s11`,R7),R(`s10`,z7),R(`s9`,B7),R(`s8`,V7);var H7=I(41,e=>V(e.a,e._._.t),e=>e._._),Nie=L(`b20`,e=>A(e.b,`click`,function(){F9(e._._,null),e._._.v()})),Pie=O(0,`<p> </p><button class=btn>Retry</button>`,`D l `,e=>{H7(e),Nie(e)},`<span class=spin></span>Loading workspaces…`),U7=P(1,0,e=>Pie(e,+!e._.t)),Fie=U7,W7=I(41,e=>V(e.a,e._._.t),e=>e._._),Iie=st(`b19`,` `,` `,W7),Lie=e=>{Sr(e.a,Iie(e)),Er(e.a,I9(e)),hr(e.a),vr(e.a),br(e.a),Tr(e.a)},G7=I(34,e=>Die(e.b,e._._.g),e=>e._._),Rie=e=>{G7(e),K7(e),q7(e),X7(e),Z7(e),Q7(e),$7(e),e9._(e),t9._(e),sie(e.b),Aie(e.b,R9(e)),Mie(e.b,L9(e))},K7=I(35,e=>vie(e.b,e._._.h),e=>e._._),q7=I(36,e=>{Tie(e.b,e._._.i?e._._.i?.preferredAgent:`claude`),kie(e.b,e._._.i?e._._.i?.agents:[`claude`])},e=>e._._),J7=N(5,e=>xie(e.b,!e._._.p&&!e._._.a5&&e._.f===e._._.k),3),zie=le(3,0,2),Y7=N(4,e=>zie(e,e._.f===e._._.k)),X7=I(37,e=>{J7(e),Y7(e)},e=>e._._),Z7=I(38,J7,e=>e._._),Q7=I(42,e=>Eie(e.b,z9(e)),e=>e._._),$7=I(43,J7,e=>e._._),e9=P(0,0,e=>gie(e.b,e._.e)),t9=P(0,0,e=>{jie(e.b,B9(e)),J7(e),Y7(e)}),Bie=O(0,(e=>`<!><!>${e}<!><!><!>`)(Cre),(e=>`b%b/${e}&%b%c`)(wre),Rie),Vie=M(4,e=>{Uie(e,e.e?.id),Bie(e,+!e.e),e9(e)}),n9=N(3,e=>Vie(e,e._.g.find(t=>t.id===e.c))),r9=He(5,n9),Hie=r9,Uie=M(5,t9),Wie=M(2,n9),Gie=(e,t)=>Wie(e,t[0]),i9=N(1,e=>Gf(e.a,V9(e))),a9=P(4,0,i9),Kie=e=>{a9._(e),o9._(e),s9._(e),Bf(e.a),qf(e.a,H9(e))},o9=P(4,0,e=>Kf(e.a,e._.p)),s9=P(4,0,i9),c9=P(3,0,e=>fd(e.a,U9(e))),qie=e=>{c9._(e),l9._(e),u9._(e),Lu(e.a),pd(e.a,W9(e))},l9=P(3,0,e=>md(e.a,!!e._.q)),u9=P(3,0,e=>dd(e.a,e._.a5)),d9=P(2,0,e=>ao(e.a,e._.g)),Jie=e=>{d9._(e),f9._(e),p9._(e),m9._(e),g9._(e),_9._(e),v9._(e),eo(e.a),Ao(e.a,J9(e)),uo(e.a,q9(e)),_o(e.a,K9(e)),Co(e.a,G9(e))},f9=P(2,0,e=>ko(e.a,e._.h)),p9=P(2,0,e=>Eo(e.a,e._.i)),m9=P(2,0,e=>co(e.a,e._.k)),h9=N(1,e=>So(e.a,!e._.s&&e._.a6)),g9=P(2,0,h9),_9=P(2,0,e=>{vo(e.a,Z9(e)),lo(e.a,X9(e)),po(e.a,Y9(e))}),v9=P(2,0,h9),y9=N(28,L(`b21`,e=>xt(e,{paletteOpen:e.s,load:e.v,activeList:e.g.filter(e=>e.status===`active`).map(e=>e.id),onMount:function(){let t=new AbortController,n=t.signal,r={abort:t,statusStale:!1,statusDebounce:void 0,timer:void 0};Gn(n);let i=(t,n)=>{n&&(En(t,n),In(t,n)),e.a1(t)},a=new URLSearchParams(location.search);a.get(`ws`)&&(i(a.get(`ws`),a.get(`session`)),history.replaceState(null,``,`/`)),Xn()&&document.addEventListener(`click`,e=>{let t=e.target?.closest?.(`a[target="_blank"][href^="http"]`);t&&(e.preventDefault(),Zn(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}),H(`/api/settings`).then(t=>{D9(e,t)}).catch(()=>{});let o=()=>{if(document.hidden){r.statusStale=!0;return}r.statusStale=!1,e.a0()};document.addEventListener(`visibilitychange`,()=>{document.hidden||(r.statusStale=!1,e.a0(!0))},{signal:n}),this.load(),o(),bn().addEventListener(`workspaces.changed`,()=>{this.load(),o()},{signal:n}),bn().addEventListener(`sessions.changed`,()=>{clearTimeout(r.statusDebounce),r.statusDebounce=setTimeout(o,300)},{signal:n}),bn().addEventListener(`status.changed`,t=>{t.data&&(E9(e,t.data),r.statusStale=!1)},{signal:n}),r.timer=setInterval(o,6e4),window.addEventListener(`keydown`,t=>{if((t.metaKey||t.ctrlKey)&&t.key===`k`&&(t.preventDefault(),P9(e,!this.paletteOpen)),(t.metaKey||t.ctrlKey)&&!t.shiftKey&&!t.altKey&&t.key>=`1`&&t.key<=`9`){let n=this.activeList?.[Number(t.key)-1];n&&(t.preventDefault(),e.a1(n))}},{capture:!0,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),clearInterval(this.timer)}})),4),Yie=F(Q7),Xie=M(27,e=>{y9(e),_9(e),s9(e),Yie(e)}),b9=N(13,e=>Xie(e,Q9(e))),Zie=O(2,(e=>`<!>${e}`)(fi),(e=>`b/${e}&`)(pi),Jie),x9=N(33,e=>Zie(e,e.s||e.a6?0:1)),Qie=M(32,e=>{x9(e),v9(e)}),S9=N(30,e=>Qie(e,!e.p&&!e.a3&&e.j),2),$ie=M(29,S9),C9=N(11,e=>$ie(e,e.g.find(t=>t.id===e.k))),eae=O(3,sc,(e=>`/${e}&`)(cc),qie),tae=F($7),nae=M(31,e=>{eae(e,+!e.a5),u9(e),tae(e)}),w9=N(17,e=>nae(e,e.g.find(t=>t.id===e.q))),rae=F(G7),T9=j(6,e=>{b9(e),y9(e),C9(e),w9(e),d9(e),c9(e),a9(e),r9(e),rae(e)}),iae=F(K7),E9=j(7,e=>{f9(e),iae(e)}),aae=F(q7),D9=j(8,e=>{p9(e),aae(e)}),oae=O(1,`<div class="boot dim"></div>`,` `,Fie),sae=M(21,y9),O9=N(14,e=>sae(e,$9(e)),2),cae=O(0,Qn,(e=>`/${e}&`)($n),Lie),k9=N(20,e=>cae(e,e.t&&e.j?0:1)),lae=j(9,e=>{oae(e,+!!e.j),O9(e),S9(e),k9(e)}),uae=F(X7),A9=j(10,e=>{O9(e),C9(e),m9(e),uae(e)}),dae=k(5,`<!><!><!>`,`b%`,Hie,Gie),j9=j(12,e=>{dae(e,[e.m,e=>e]),O9(e),b9(e)}),fae=O(4,kd,(e=>`/${e}&`)(Ad),Kie),pae=F(Z7),M9=j(15,e=>{fae(e,+!e.p),S9(e),o9(e),pae(e)}),N9=j(16,e=>{w9(e),l9(e)}),P9=j(18,e=>{y9(e),x9(e),g9(e)}),mae=F(W7,H7),F9=j(19,e=>{k9(e),mae(e),U7(e)});function I9(e){return function(){F9(e._,null)}}function L9(e){return function(){M9(e._._,!0)}}function R9(e){return function(t,n){En(t,n),In(t,n),e._._.a1(t)}}function z9(e){return function(t){e._._.a1(t)}}function B9(e){return function(t){N9(e._._,t||e._.f)}}function V9(e){return function(t){e._.g.some(e=>e.id===t.id)||T9(e._,[t,...e._.g]),M9(e._,!1),e._.a1(t.id)}}function H9(e){return t=>{M9(e._,t)}}function U9(e){return function(t){T9(e._,e._.g.map(e=>e.id===t.id?t:e))}}function W9(e){return function(t){t||N9(e._,null)}}function G9(e){return function(){P9(e._,!1)}}function K9(e){return function(){M9(e._,!0),P9(e._,!1)}}function q9(e){return function(t){N9(e._,t.id),M9(e._,!1),P9(e._,!1)}}function J9(e){return function(t){D9(e._,t)}}function Y9(e){return function(t,n){P9(e._,!1),H(`/api/workspaces/${t.id}/sessions`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({agent:n})}).then(n=>{En(t.id,n.id),e._.a1(t.id)}).catch(t=>{F9(e._,`New session failed: ${String(t.message||t)}`)})}}function X9(e){return function(t){wn(t.id),e._.a1(t.id)}}function Z9(e){return function(t){e._.a1(t.id)}}function Q9(e){return async t=>{e.g.find(e=>e.id===t)?.status===`archived`&&(await H(`/api/workspaces/${t}`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({action:`restore`})}).catch(()=>{}),T9(e,e.g.map(e=>e.id===t?{...e,status:`active`}:e))),A9(e,t),M9(e,!1),N9(e,null),P9(e,!1),e.m.includes(t)||j9(e,e.m.concat(t)),Nn(t)}}function $9(e){return async()=>{try{let[t]=await Promise.all([H(`/api/workspaces`),mee()]);if(T9(e,t),e.j){let n=new Set(t.filter(e=>e.status===`active`).map(e=>e.id));j9(e,e.m.filter(e=>n.has(e))),e.k&&!n.has(e.k)&&(A9(e,e.m[e.m?.length-1]||null),Nn(e.k))}else{let n=gee();n&&t.some(e=>e.id===n)&&(A9(e,n),j9(e,[n]))}lae(e,!0)}catch(t){if(e.j&&Zt(t))return;F9(e,`Loading workspaces failed: ${t.message||String(t)}`)}}}function hae(e){return(t=!1)=>(e.x||=t,(e.y??=On(async()=>{let t=e.x;e.x=!1;try{E9(e,await H(`/api/status${t?`?fresh`:``}`))}catch(e){if(!Zt(e))throw e}}))())}R(`b3`,I9),R(`b18`,L9),R(`b16`,R9),R(`b15`,z9),R(`b17`,B9),R(`b14`,V9),R(`b13`,H9),R(`b12`,U9),R(`b11`,W9),R(`b10`,G9),R(`b9`,K9),R(`b8`,q9),R(`b4`,J9),R(`b7`,Y9),R(`b6`,X9),R(`b5`,Z9),R(`b2`,Q9),R(`b0`,$9),R(`b1`,hae),Qe();export{t};
|
|
1615
|
-
//# sourceMappingURL=index-
|
|
1614
|
+
}`,N1=8,P1=N1*Float32Array.BYTES_PER_ELEMENT,F1=20*N1,I1=class{constructor(){this.attributes=new Float32Array(F1),this.count=0}},L1=0,R1=0,z1=0,B1=0,V1=0,H1=0,U1=0,W1=class extends hQ{constructor(e,t,n,r){super(),this._terminal=e,this._gl=t,this._dimensions=n,this._themeService=r,this._vertices=new I1,this._verticesCursor=new I1;let i=this._gl;this._program=LQ(l1(i,j1,M1)),this._register(fQ(()=>i.deleteProgram(this._program))),this._projectionLocation=LQ(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(fQ(()=>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(fQ(()=>i.deleteBuffer(c))),i.bindBuffer(i.ELEMENT_ARRAY_BUFFER,c),i.bufferData(i.ELEMENT_ARRAY_BUFFER,s,i.STATIC_DRAW),this._attributesBuffer=LQ(i.createBuffer()),this._register(fQ(()=>i.deleteBuffer(this._attributesBuffer))),i.bindBuffer(i.ARRAY_BUFFER,this._attributesBuffer),i.enableVertexAttribArray(0),i.vertexAttribPointer(0,2,i.FLOAT,!1,P1,0),i.vertexAttribDivisor(0,1),i.enableVertexAttribArray(1),i.vertexAttribPointer(1,2,i.FLOAT,!1,P1,2*Float32Array.BYTES_PER_ELEMENT),i.vertexAttribDivisor(1,1),i.enableVertexAttribArray(2),i.vertexAttribPointer(2,4,i.FLOAT,!1,P1,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,c1),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)*T1,d=e.cells[u+E1],f=e.cells[u+D1],p=!!(f&67108864),(d!==s||f!==c&&(l||p))&&((s!==0||l&&c!==0)&&(m=r++*N1,this._updateRectangle(n,m,c,s,o,a,i)),o=a,s=d,c=f,l=p);(s!==0||l&&c!==0)&&(m=r++*N1,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++*N1,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++*N1,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++*N1,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++*N1,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:L1=this._themeService.colors.ansi[n&255].rgba;break;case 50331648:L1=(n&16777215)<<8;break;case 0:default:L1=this._themeService.colors.foreground.rgba}else switch(r&50331648){case 16777216:case 33554432:L1=this._themeService.colors.ansi[r&255].rgba;break;case 50331648:L1=(r&16777215)<<8;break;case 0:default:L1=this._themeService.colors.background.rgba}e.attributes.length<t+4&&(e.attributes=d1(e.attributes,this._terminal.rows*this._terminal.cols*N1)),R1=i*this._dimensions.device.cell.width,z1=o*this._dimensions.device.cell.height,B1=(L1>>24&255)/255,V1=(L1>>16&255)/255,H1=(L1>>8&255)/255,U1=1,this._addRectangle(e.attributes,t,R1,z1,(a-i)*this._dimensions.device.cell.width,this._dimensions.device.cell.height,B1,V1,H1,U1)}_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])}},G1=class extends hQ{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(fQ(()=>{this._canvas.remove()}))}_initCanvas(){this._ctx=LQ(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=t1(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=r$,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}`}},K1=class extends G1{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&&$$(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()}},q1=typeof window==`object`?window:globalThis,J1=class{constructor(){this.mapWindowIdToZoomLevel=new Map,this._onDidChangeZoomLevel=new V$,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this.mapWindowIdToZoomFactor=new Map,this._onDidChangeFullscreen=new V$,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}};J1.INSTANCE=new J1;var Y1=J1;function X1(e,t,n){typeof t==`string`&&(t=e.matchMedia(t)),t.addEventListener(`change`,n)}Y1.INSTANCE.onDidChangeZoomLevel,Y1.INSTANCE.onDidChangeFullscreen;var Z1=typeof navigator==`object`?navigator.userAgent:``;Z1.indexOf(`Firefox`);var Q1=Z1.indexOf(`AppleWebKit`)>=0;!(Z1.indexOf(`Chrome`)>=0)&&Z1.indexOf(`Safari`),Z1.indexOf(`Electron/`),Z1.indexOf(`Android`);var $1=!1;if(typeof q1.matchMedia==`function`){let e=q1.matchMedia(`(display-mode: standalone) or (display-mode: window-controls-overlay)`),t=q1.matchMedia(`(display-mode: fullscreen)`);$1=e.matches,X1(q1,e,({matches:e})=>{$1&&t.matches||($1=e)})}function e0(){return $1}var t0=`en`,n0=!1,r0=!1,i0=!1,a0=t0,o0,s0=globalThis,c0;typeof s0.vscode<`u`&&typeof s0.vscode.process<`u`?c0=s0.vscode.process:typeof process<`u`&&typeof process?.versions?.node==`string`&&(c0=process);var l0=typeof c0?.versions?.electron==`string`&&c0?.type===`renderer`;if(typeof c0==`object`){c0.platform,c0.platform,n0=c0.platform===`linux`,n0&&c0.env.SNAP&&c0.env.SNAP_REVISION,c0.env.CI||c0.env.BUILD_ARTIFACTSTAGINGDIRECTORY,a0=t0;let e=c0.env.VSCODE_NLS_CONFIG;if(e)try{let t=JSON.parse(e);t.userLocale,t.osLocale,a0=t.resolvedLanguage||t0,t.languagePack?.translationsConfigFile}catch{}r0=!0}else typeof navigator==`object`&&!l0?(o0=navigator.userAgent,o0.indexOf(`Windows`),o0.indexOf(`Macintosh`),(o0.indexOf(`Macintosh`)>=0||o0.indexOf(`iPad`)>=0||o0.indexOf(`iPhone`)>=0)&&navigator.maxTouchPoints&&navigator.maxTouchPoints,n0=o0.indexOf(`Linux`)>=0,o0?.indexOf(`Mobi`),i0=!0,a0=globalThis._VSCODE_NLS_LANGUAGE||t0,navigator.language.toLowerCase()):console.error(`Unable to resolve platform.`);var u0=r0;i0&&typeof s0.importScripts==`function`&&s0.origin;var d0=o0,f0=a0,p0;(e=>{function t(){return f0}e.value=t;function n(){return f0.length===2?f0===`en`:f0.length>=3&&f0[0]===`e`&&f0[1]===`n`&&f0[2]===`-`}e.isDefaultVariant=n;function r(){return f0===`en`}e.isDefault=r})(p0||={});var m0=typeof s0.postMessage==`function`&&!s0.importScripts;(()=>{if(m0){let e=[];s0.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}),s0.postMessage({vscodeScheduleAsyncWork:r},`*`)}}return e=>setTimeout(e)})();var h0=!!(d0&&d0.indexOf(`Chrome`)>=0);d0&&d0.indexOf(`Firefox`),!h0&&d0&&d0.indexOf(`Safari`),d0&&d0.indexOf(`Edg/`),d0&&d0.indexOf(`Android`);var g0=typeof navigator==`object`?navigator:{};u0||document.queryCommandSupported&&document.queryCommandSupported(`copy`)||g0&&g0.clipboard&&g0.clipboard.writeText,u0||g0&&g0.clipboard&&g0.clipboard.readText,u0||e0()||g0.keyboard,`ontouchstart`in q1||g0.maxTouchPoints,q1.PointerEvent&&(`ontouchstart`in q1||navigator.maxTouchPoints);var _0=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}},v0=new _0,y0=new _0,b0=new _0;Array(230);var x0;(e=>{function t(e){return v0.keyCodeToStr(e)}e.toString=t;function n(e){return v0.strToKeyCode(e)}e.fromString=n;function r(e){return y0.keyCodeToStr(e)}e.toUserSettingsUS=r;function i(e){return b0.keyCodeToStr(e)}e.toUserSettingsGeneral=i;function a(e){return y0.strToKeyCode(e)||b0.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 v0.keyCodeToStr(e)}e.toElectronAccelerator=o})(x0||={});var S0=Object.freeze(function(e,t){let n=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(n)}}}),C0;(e=>{function t(t){return t===e.None||t===e.Cancelled||t instanceof w0?!0:!t||typeof t!=`object`?!1:typeof t.isCancellationRequested==`boolean`&&typeof t.onCancellationRequested==`function`}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:O$.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:S0})})(C0||={});var w0=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?S0:(this._emitter||=new V$,this._emitter.event)}dispose(){this._emitter&&=(this._emitter.dispose(),null)}};(function(){typeof globalThis.requestIdleCallback!=`function`||globalThis.cancelIdleCallback})();var T0;(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})(T0||={});var E0=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 V$,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 O$.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())}};E0.EMPTY=E0.fromArray([]);function D0(e){return O0(e,0)}function O0(e,t){switch(typeof e){case`object`:return e===null?k0(349,t):Array.isArray(e)?M0(e,t):N0(e,t);case`string`:return j0(e,t);case`boolean`:return A0(e,t);case`number`:return k0(e,t);case`undefined`:return k0(937,t);default:return k0(617,t)}}function k0(e,t){return(t<<5)-t+e|0}function A0(e,t){return k0(e?433:863,t)}function j0(e,t){t=k0(149417,t);for(let n=0,r=e.length;n<r;n++)t=k0(e.charCodeAt(n),t);return t}function M0(e,t){return t=k0(104579,t),e.reduce((e,t)=>O0(t,e),t)}function N0(e,t){return t=k0(181387,t),Object.keys(e).sort().reduce((t,n)=>(t=j0(n,t),O0(e[n],t)),t)}var{registerWindow:nre,getWindow:P0,getDocument:rre,getWindows:ire,getWindowsCount:are,getWindowId:ore,getWindowById:sre,hasWindow:cre,onDidRegisterWindow:lre,onWillUnregisterWindow:ure,onDidUnregisterWindow:dre}=function(){let e=new Map,t={window:q1,disposables:new mQ};e.set(q1.vscodeWindowId,t);let n=new V$,r=new V$,i=new V$;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 hQ.None;let a=new mQ,o={window:t,disposables:a.add(new mQ)};return e.set(t.vscodeWindowId,o),a.add(fQ(()=>{e.delete(t.vscodeWindowId),r.fire(t)})),a.add(I0(t,R0.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:q1},getDocument(e){return P0(e).document}}}(),F0=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 I0(e,t,n,r){return new F0(e,t,n,r)}var L0=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}};L0.None=new L0(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=D0(n),a=r.get(i);if(a)a.users+=1;else{let o=new V$,s=new MutationObserver(e=>o.fire(e));s.observe(e,n);let c=a={users:1,observer:s,onDidMutate:o.event};t.add(fQ(()=>{--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 R0={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:Q1?`webkitAnimationStart`:`animationstart`,ANIMATION_END:Q1?`webkitAnimationEnd`:`animationend`,ANIMATION_ITERATION:Q1?`webkitAnimationIteration`:`animationiteration`},z0=class extends hQ{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 gQ,this._charAtlasDisposable=this._register(new gQ),this._observerDisposable=this._register(new gQ),this._model=new A1,this._workCell=new s1,this._workCell2=new s1,this._rectangleRenderer=this._register(new gQ),this._glyphRenderer=this._register(new gQ),this._onChangeTextureAtlas=this._register(new V$),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this._register(new V$),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this._register(new V$),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onRequestRedraw=this._register(new V$),this.onRequestRedraw=this._onRequestRedraw.event,this._onContextLoss=this._register(new V$),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 t$(this._terminal,this._optionsService,this._model.selection,this._decorationService,this._coreBrowserService,this._themeService),this._core=this._terminal._core,this._renderLayers=[new K1(this._core.screenElement,2,this._terminal,this._core.linkifier,this._coreBrowserService,o,this._themeService)],this.dimensions=GQ(),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(I0(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(I0(this._canvas,`webglcontextrestored`,e=>{console.warn(`webglcontextrestored event received`),clearTimeout(this._contextRestorationTimeout),this._contextRestorationTimeout=void 0,n1(this._terminal),this._initializeWebGLState(),this._requestRedrawViewport()})),this._observerDisposable.value=a1(this._canvas,this._coreBrowserService.window,(e,t)=>this._setCanvasDevicePixelDimensions(e,t)),this._register(this._coreBrowserService.onWindowChange(e=>{this._observerDisposable.value=a1(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(fQ(()=>{for(let e of this._renderLayers)e.dispose();this._canvas.parentElement?.removeChild(this._canvas),n1(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 W1(this._terminal,this._gl,this.dimensions,this._themeService),this._glyphRenderer.value=new S1(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=t1(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=dQ(O$.forward(e.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas),O$.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 i1(()=>{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=V0(e,n.rows-1,0),t=V0(t,n.rows-1,0);let x=this._coreService.decPrivateModes.cursorStyle??n.options.cursorStyle??`block`,S=this._terminal.buffer.active.baseY+this._terminal.buffer.active.cursorY,C=S-n.buffer.ydisp,ee=Math.min(this._terminal.buffer.active.cursorX,n.cols-1),te=-1,ne=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=S===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||ee<p[0]||ee>=p[1],d?(l=!0,r=new B0(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)*T1,this._cellColorResolver.resolve(r,y,o,this.dimensions.device.cell.width),ne&&o===S&&(y===ee&&(this._model.cursor={x:ee,y:C,width:r.getWidth(),style:this._coreBrowserService.isFocused?x:n.options.cursorInactiveStyle,cursorWidth:n.options.cursorWidth,dpr:this._devicePixelRatio},te=ee+r.getWidth()-1),y>=ee&&y<=te&&(this._coreBrowserService.isFocused&&x===`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+E1]!==this._cellColorResolver.result.bg||this._model.cells[v+D1]!==this._cellColorResolver.result.fg||this._model.cells[v+O1]!==this._cellColorResolver.result.ext)&&(w=!0,h.length>1&&(g|=k1),this._model.cells[v]=g,this._model.cells[v+E1]=this._cellColorResolver.result.bg,this._model.cells[v+D1]=this._cellColorResolver.result.fg,this._model.cells[v+O1]=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)*T1,this._glyphRenderer.value.updateCell(y,a,0,0,0,0,wQ,0,0),this._model.cells[b]=0,this._model.cells[b+E1]=this._cellColorResolver.result.bg,this._model.cells[b+D1]=this._cellColorResolver.result.fg,this._model.cells[b+O1]=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})}},B0=class extends C${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 V0(e,t,n=0){return Math.max(Math.min(e,t),n)}var H0=`di$target`,U0=`di$dependencies`,W0=new Map;function G0(e){if(W0.has(e))return W0.get(e);let t=function(e,n,r){if(arguments.length!==3)throw Error(`@IServiceName-decorator can only be used to decorate a parameter`);K0(t,e,r)};return t._id=e,W0.set(e,t),t}function K0(e,t,n){t[H0]===t?t[U0].push({id:e,index:n}):(t[U0]=[{id:e,index:n}],t[H0]=t)}G0(`BufferService`),G0(`CoreMouseService`),G0(`CoreService`),G0(`CharsetService`),G0(`InstantiationService`),G0(`LogService`);var q0=G0(`OptionsService`);G0(`OscLinkService`),G0(`UnicodeService`),G0(`DecorationService`);var J0={trace:0,debug:1,info:2,warn:3,error:4,off:5},Y0=`xterm.js: `,X0=class extends hQ{constructor(e){super(),this._optionsService=e,this._logLevel=5,this._updateLogLevel(),this._register(this._optionsService.onSpecificOptionChange(`logLevel`,()=>this._updateLogLevel())),Z0=this}get logLevel(){return this._logLevel}_updateLogLevel(){this._logLevel=J0[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?``:Y0)+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)}};X0=JZ([YZ(0,q0)],X0);var Z0,Q0=class extends hQ{constructor(e){if(SQ&&CQ()<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 V$),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this._register(new V$),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this._register(new V$),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onContextLoss=this._register(new V$),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 z0(e,o,s,c,n,l,r,u,this._preserveDrawingBuffer)),this._register(O$.forward(this._renderer.onContextLoss,this._onContextLoss)),this._register(O$.forward(this._renderer.onChangeTextureAtlas,this._onChangeTextureAtlas)),this._register(O$.forward(this._renderer.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas)),this._register(O$.forward(this._renderer.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)),a.setRenderer(this._renderer),this._register(fQ(()=>{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()}},$0=2,e2=1,t2=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($0,Math.floor(u/e.css.cell.width)),rows:Math.max(e2,Math.floor(l/e.css.cell.height))}}},n2=`3.7.8`,r2=n2,i2=typeof Buffer==`function`,a2=typeof TextDecoder==`function`?new TextDecoder:void 0,o2=typeof TextEncoder==`function`?new TextEncoder:void 0,s2=Array.prototype.slice.call(`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=`),c2=(e=>{let t={};return e.forEach((e,n)=>t[e]=n),t})(s2),l2=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,u2=String.fromCharCode.bind(String),d2=typeof Uint8Array.from==`function`?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),f2=e=>e.replace(/=/g,``).replace(/[+\/]/g,e=>e==`+`?`-`:`_`),p2=e=>e.replace(/[^A-Za-z0-9\+\/]/g,``),m2=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+=s2[t>>18&63]+s2[t>>12&63]+s2[t>>6&63]+s2[t&63]}return o?a.slice(0,o-3)+`===`.substring(o):a},h2=typeof btoa==`function`?e=>btoa(e):i2?e=>Buffer.from(e,`binary`).toString(`base64`):m2,g2=i2?e=>Buffer.from(e).toString(`base64`):e=>{let t=[];for(let n=0,r=e.length;n<r;n+=4096)t.push(u2.apply(null,e.subarray(n,n+4096)));return h2(t.join(``))},_2=(e,t=!1)=>t?f2(g2(e)):g2(e),v2=e=>{if(e.length<2){var t=e.charCodeAt(0);return t<128?e:t<2048?u2(192|t>>>6)+u2(128|t&63):u2(224|t>>>12&15)+u2(128|t>>>6&63)+u2(128|t&63)}var t=65536+(e.charCodeAt(0)-55296)*1024+(e.charCodeAt(1)-56320);return u2(240|t>>>18&7)+u2(128|t>>>12&63)+u2(128|t>>>6&63)+u2(128|t&63)},y2=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,b2=e=>e.replace(y2,v2),x2=i2?e=>Buffer.from(e,`utf8`).toString(`base64`):o2?e=>g2(o2.encode(e)):e=>h2(b2(e)),S2=(e,t=!1)=>t?f2(x2(e)):x2(e),C2=e=>S2(e,!0),w2=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,T2=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 u2((t>>>10)+55296)+u2((t&1023)+56320);case 3:return u2((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return u2((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},E2=e=>e.replace(w2,T2),D2=e=>{if(e=e.replace(/\s+/g,``),!l2.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=c2[e.charAt(a++)]<<18|c2[e.charAt(a++)]<<12|(n=c2[e.charAt(a++)])<<6|(r=c2[e.charAt(a++)]),n===64?i.push(u2(t>>16&255)):r===64?i.push(u2(t>>16&255,t>>8&255)):i.push(u2(t>>16&255,t>>8&255,t&255));return i.join(``)},O2=typeof atob==`function`?e=>atob(p2(e)):i2?e=>Buffer.from(e,`base64`).toString(`binary`):D2,k2=i2?e=>d2(Buffer.from(e,`base64`)):e=>d2(O2(e).split(``).map(e=>e.charCodeAt(0))),A2=e=>k2(M2(e)),j2=i2?e=>Buffer.from(e,`base64`).toString(`utf8`):a2?e=>a2.decode(k2(e)):e=>E2(O2(e)),M2=e=>p2(e.replace(/[-_]/g,e=>e==`-`?`+`:`/`)),N2=e=>j2(M2(e)),P2=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)},F2=e=>({value:e,enumerable:!1,writable:!0,configurable:!0}),I2=function(){let e=(e,t)=>Object.defineProperty(String.prototype,e,F2(t));e(`fromBase64`,function(){return N2(this)}),e(`toBase64`,function(e){return S2(this,e)}),e(`toBase64URI`,function(){return S2(this,!0)}),e(`toBase64URL`,function(){return S2(this,!0)}),e(`toUint8Array`,function(){return A2(this)})},L2=function(){let e=(e,t)=>Object.defineProperty(Uint8Array.prototype,e,F2(t));e(`toBase64`,function(e){return _2(this,e)}),e(`toBase64URI`,function(){return _2(this,!0)}),e(`toBase64URL`,function(){return _2(this,!0)})},R2={version:n2,VERSION:r2,atob:O2,atobPolyfill:D2,btoa:h2,btoaPolyfill:m2,fromBase64:N2,toBase64:S2,encode:S2,encodeURI:C2,encodeURL:C2,utob:b2,btou:E2,decode:N2,isValid:P2,fromUint8Array:_2,toUint8Array:A2,extendString:I2,extendUint8Array:L2,extendBuiltins:()=>{I2(),L2()}},z2=class{constructor(e=new V2,t=new B2){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}},B2=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()}},V2=class{encodeText(e){return R2.encode(e)}decodeText(e){let t=R2.decode(e);return!R2.isValid(e)||R2.encode(t)!==e?``:t}},H2=class{constructor(e,t,n,r={}){this._terminal=e,this._regex=t,this._handler=n,this._options=r}provideLinks(e,t){let n=W2.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 U2(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 W2=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(!U2(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]}},G2=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function K2(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 q2=class{constructor(e=K2,t={}){this._handler=e,this._options=t}activate(e){this._terminal=e;let t=this._options,n=t.urlRegex||G2;this._linkProvider=this._terminal.registerLinkProvider(new H2(this._terminal,n,this._handler,t))}dispose(){this._linkProvider?.dispose()}};function J2(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 Y2(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 X2(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 Z2(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 Q2=450,$2=12,e4=` ·│┃()[]{}<>'"\`,;│|`;function t4(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===` `||e4.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)},Q2)},{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)>$2&&h()}},{passive:!1,signal:r});let g=()=>{if(h(),!i)return;i=!1,n.onEnd();let t=e.getSelection();t&&X_(t).then(e=>{e&&n.onCopy(t)})};return t().addEventListener(`touchend`,g,{signal:r}),t().addEventListener(`touchcancel`,g,{signal:r}),{selecting:()=>i}}var n4=5;function r4(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)<n4)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 X_(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})}var i4=Nr,a4=(e=>`/${e}&`)(Pr);function o4(e){Rr(e.a,`M15 4L8 20`)}var s4=(e,t)=>Ir(e.a,t),c4=(e,t)=>Lr(e.a,t),l4=Nr,u4=(e=>`/${e}&`)(Pr);function d4(e){Rr(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 f4=(e,t)=>Ir(e.a,t),p4=(e,t)=>Lr(e.a,t),m4=Nr,h4=(e=>`/${e}&`)(Pr);function g4(e){Rr(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 _4=(e,t)=>Ir(e.a,t),v4=(e,t)=>Lr(e.a,t),y4=Nr,b4=(e=>`/${e}&`)(Pr);function x4(e){Rr(e.a,`M21 3.6V20.4C21 20.7314 20.7314 21 20.4 21H3.6C3.26863 21 3 20.7314 3 20.4V3.6C3 3.26863 3.26863 3 3.6 3H20.4C20.7314 3 21 3.26863 21 3.6Z M3 16L10 13L21 18 M16 10C14.8954 10 14 9.10457 14 8C14 6.89543 14.8954 6 16 6C17.1046 6 18 6.89543 18 8C18 9.10457 17.1046 10 16 10Z`)}var S4=(e,t)=>Ir(e.a,t),C4=(e,t)=>Lr(e.a,t),w4=`<div class=term-wrap><div class=term></div><!><!><!><!></div><!><!>`,T4=` D b%b%b%b%l%c`,E4=400,D4=55,O4=3e4,k4=150,A4=[[{kind:`paste`},{kind:`key`,label:`▲`,seq:`\x1B[A`},{kind:`attach`}],[{kind:`key`,label:`◀`,seq:`\x1B[D`},{kind:`key`,label:`↵`,seq:`\r`},{kind:`key`,label:`▶`,seq:`\x1B[C`}],[{kind:`key`,label:`⇥`,seq:` `},{kind:`key`,label:`▼`,seq:`\x1B[B`},{kind:`key`,label:`^C`,seq:``}]],j4=L(`p20`,e=>A(e.a,`click`,function(){e._._._.d.click()})),M4=e=>{x4(e.b),S4(e.b,16),C4(e.b),j4(e)},N4=L(`p19`,e=>{A(e.a,`pointerdown`,function(e){e.preventDefault()}),A(e.a,`click`,function(){e._._._._.al()})}),P4=e=>{g4(e.b),_4(e.b,16),v4(e.b),N4(e)},F4=P(0,2,e=>{dt(e.a,{enter:e._.e===`↵`,"big-glyph":e._.e===`↵`||e._.e===`⇥`}),V(e.b,e._.e)}),I4=L(`p21`,e=>{A(e.a,`pointerdown`,function(t){t.preventDefault(),e._._._._.af(e._.f)}),A(e.a,`pointerup`,function(){e._._._._.ag()}),A(e.a,`pointercancel`,function(){e._._._._.ag()}),A(e.a,`pointerleave`,function(){e._._._._.ag()}),A(e.a,`contextmenu`,function(e){e.preventDefault()})}),L4=O(0,(e=>`<button title=Paste>${e}</button>`)(m4),(e=>` D/${e}&l`)(h4),P4,(e=>`<button title="Attach image">${e}</button>`)(y4),(e=>` D/${e}&l`)(b4),M4,`<button class=repeat> </button>`,` D `,e=>{F4._(e),I4(e)}),R4=(e,t)=>L4(e,t===`paste`?0:t===`attach`?1:2),z4=(e,t)=>{R4(e,t[0]?.kind),B4(e,t[0]?.label),V4(e,t[0]?.seq)},B4=M(4),V4=M(5),H4=k(0,`<!><!><!>`,`b%`,0,z4),U4=(e,t)=>H4(e,[t]),W4=(e,t)=>U4(e,t[0]),G4=I(60,L(`p17`,e=>A(e.a,`click`,function(){e._._.a7?.send(`\x1B`)})),e=>e._._),K4=L(`p18`,e=>A(e.a,`pointerdown`,function(e){e.preventDefault()})),q4=e=>{G4(e),K4(e)},J4=P(5,0,L(`p8`,e=>{e._.a5&&setTimeout(()=>e.c?.focus(),50)})),Y4=L(`p9`,e=>{A(e.a,`click`,function(){m6(e._,!1)}),A(e.b,`click`,function(e){e.stopPropagation()}),A(e.c,`paste`,function(t){t.preventDefault(),e._.ak(t.clipboardData)}),A(e.d,`click`,function(){m6(e._,!1)})}),X4=e=>{J4._(e),Y4(e)},Z4=L(`p7`,e=>A(e.a,`click`,function(){a6(e._,!1)})),Q4=I(51,e=>ut(e.a,[`dot`,Mr(e._._.r)]),e=>e._._),$4=e=>{Q4(e),e3(e)},e3=I(57,e=>V(e.b,e._._.y),e=>e._._),t3=M(3,e=>{z(e.a,`title`,`New ${e.d} session`),ui(e.b,e.d)}),n3=L(`p15`,e=>A(e.a,`click`,function(t,n){n.closest(`[popover]`)?.hidePopover(),e._._._.p?.(e.d)})),r3=e=>{e.b,si(e.b,15),di(e.b),n3(e)},i3=(e,t)=>t3(e,t[0]),a3=N(1,e=>{B(e.a,`armed`,e._._._.g===e._.j),z(e.a,`title`,e._._._.g===e._.j?`Really kill this session?`:`Kill session`)}),o3=I(8,a3,e=>e._._._),s3=L(`p13`,e=>A(e.a,`click`,function(t,n){e._._._.g===e._.j?(k3(e._._._,null),n.closest(`[popover]`)?.hidePopover(),e._._._._._.w?.(e._.j)):k3(e._._._,e._.j)})),c3=e=>{o3(e),l3._(e),s3(e)},l3=P(6,0,a3),u3=L(`p12`,e=>A(e.a,`click`,function(t,n){n.closest(`[popover]`)?.hidePopover(),e._._._._._.v?.(e._.j)})),d3=e=>{ap(e.b),op(e.b,12),sp(e.b),u3(e)},f3=N(10,e=>B(e.a,`current`,e.j===e._._._._.t)),p3=I(53,f3,e=>e._._._._),m3=L(`p14`,e=>A(e.b,`click`,function(t,n){n.closest(`[popover]`)?.hidePopover(),e.j!==e._._._._.t&&e._._._._.u?.(e.j)})),h3=e=>{p3(e),_3(e),y3(e),e.d,si(e.d,14),di(e.d),m3(e)},g3=O(5,(e=>`<button class="sess-x sess-edit" title="Rename session">${e}</button>`)(rp),(e=>` D/${e}&l`)(ip),d3),_3=I(54,e=>g3(e,+!e._._._._.v),e=>e._._._._),v3=O(6,`<button class=sess-x>×</button>`,` `,c3),y3=I(55,e=>v3(e,+!e._._._._.w),e=>e._._._._),b3=M(9,e=>{f3(e),l3(e)}),x3=(e,t)=>ut(e.c,[`dot`,Mr(t)]),S3=N(14,e=>V(e.e,e.n||e.m)),C3=M(12,e=>{ui(e.d,e.m),S3(e)}),w3=M(13,S3),T3=k(0,(e=>`<div class=sess-row><button class=sess-open><span></span>${e}<span class=sess-title> </span></button><!><!></div>`)(ei),(e=>` D D b/${e}&D m%b%l`)(`b%c`),h3,(e,t)=>{b3(e,t[0]?.id),x3(e,t[0]?.state),C3(e,t[0]?.agent),w3(e,t[0]?.title)}),E3=I(52,e=>T3(e,[e._._._.s||[],`id`]),e=>e._._._),D3=E3,O3=I(50,e=>ui(e.b,e._._.q||`shell`),e=>e._._),k3=j(6,F(o3)),A3=(e,t)=>{z(e.a,`popovertarget`,t),z(e.d,`id`,t)},j3=L(`p16`,e=>A(e.d,`toggle`,function(t,n){if(k3(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`}})),M3=e=>{O3(e),N3(e),F3(e),L3(e),e.b,si(e.b,16),di(e.b),k3(e,null),A3(e,Je(e)),j3(e)},N3=I(51,e=>ut(e.c,[`dot`,`sess-dot`,Mr(e._._.r)]),e=>e._._),P3=O(4,`<!><!><!>`,`b%`,D3),F3=I(52,e=>{B(e.f,`lone`,(e._._.s||[]).length<=1),P3(e,(e._._.s||[]).length>1?0:1)},e=>e._._),I3=k(5,(e=>`<button class=icon-btn>${e}</button>`)(ei),(e=>` D/${e}&l`)(`b%c`),r3,i3),L3=I(56,e=>I3(e,[[...e._._.x||[],`shell`],e=>e]),e=>e._._),R3=L(`p11`,e=>{A(e.a,`click`,function(){e._._.m?.()}),A(e.c,`click`,function(){e._._.n?.()}),A(e.e,`click`,function(){e._._.o?.()})}),z3=e=>{th(e.b),nh(e.b,16),rh(e.b),Kr(e.d),qr(e.d,16),Jr(e.d),Vr(e.f),Hr(e.f,16),Ur(e.f),R3(e)},B3=L(`p10`,e=>A(e.a,`click`,function(){e._._.l?.()})),V3=O(0,(e=>`<button class="icon-btn kbtn" title="Back to terminal">${e}</button>`)(dv),(e=>` D/${e}&l`)(fv),e=>{pv(e.b),mv(e.b,16),hv(e.b),B3(e)},((e,t,n)=>`<button class="icon-btn kbtn" title=Workspaces>${e}</button><button class="icon-btn kbtn" title="Manage workspace">${t}</button><button class="icon-btn kbtn" title="Review changes">${n}</button>`)($m,Wr,zr),((e,t,n)=>` D/${e}&l D/${t}&l D/${n}&l`)(eh,Gr,Br),z3),H3=O(8,`<button class="icon-btn kbtn kbtn-esc" title=Escape>esc</button>`,` `,q4),U3=O(1,(e=>`<button class="icon-btn kbtn sess-btn" title=Sessions>${e}<span></span></button><div popover=auto class=sess-pop><!><div class=sess-new></div></div>`)(ei),(e=>` D/${e}& l D%b l`)(`b%c`),M3),W3=N(11,e=>U3(e,e._.k!==`diff`&&e._.p?0:1)),G3=P(6,0,e=>{V3(e,e._.k===`diff`?0:1),H3(e,+(e._.k===`diff`)),W3(e)}),K3=(e,t)=>{z(e.e,`popovertarget`,t),z(e.j,`id`,t)},q3=k(9,`<!><!><!>`,`b%`,0,W4),J3=L(`p23`,e=>{A(e.d,`change`,function(t,n){for(let t of n.files||[])e._.ah(t);n.value=``}),A(e.e,`pointerdown`,function(e){e.preventDefault()}),A(e.g,`pointerdown`,function(e){e.preventDefault()}),A(e.j,`pointerdown`,function(e){e.preventDefault()}),A(e.j,`toggle`,function(t,n){if(t.newState===`open`){let t=e.e.getBoundingClientRect();n.style.top=`${Math.max(8,t.top-n.offsetHeight-8)}px`,n.style.bottom=`auto`}})}),Y3=e=>{G3._(e),X3._(e),Q3._(e),$3._(e),e6._(e),o4(e.f),s4(e.f,16),c4(e.f),d4(e.h),f4(e.h,16),p4(e.h),K3(e,Je(e)),q3(e,[A4]),J3(e)},X3=P(6,0,W3),Z3=O(2,`<span class="kbar-ws dim" aria-hidden=true><span></span><span class=kbar-ws-name> </span></span>`,`D bD `,$4),Q3=P(6,0,e=>Z3(e,+!e._.y)),$3=P(6,0,e=>{B(e.g,`on`,e._.a1),z(e.g,`title`,e._.a1?`Hide keyboard`:`Show keyboard`)}),e6=P(6,0,L(`p22`,e=>A(e.g,`click`,function(){o6(e._,!e._.a1),e._.a7?.setKeyboard(e._.a1)}))),t6=aee(`p6`,1),n6=Xe(42),r6=O(4,`<div class=term-dead><button class="btn primary">Reconnect</button></div>`,`D `,Z4),i6=N(45,L(`p24`,e=>xt(e,{onMount:function(){let t=new AbortController,n=t.signal,r=new GZ({fontSize:13,fontFamily:`ui-monospace, monospace`,scrollback:5e3,allowProposedApi:!0,rightClickSelectsWord:!0,macOptionClickForcesSelection:!0,linkHandler:{activate(e,t){Zn(t)}}}),i=new t2;r.loadAddon(i),r.open(e.b);let a=Jn();try{let e=new Q0;e.onContextLoss(()=>e.dispose()),r.loadAddon(e)}catch{}try{r.loadAddon(new z2(void 0,{readText:()=>navigator.clipboard.readText().catch(()=>``),writeText:(e,t)=>X_(t).then(()=>{})}))}catch{}r.loadAddon(new q2((e,t)=>Zn(t))),i.fit();let o=a?X2(r):null,s=o?o.write:e=>r.write(e),c=J2({sessionId:e.t,term:r,write:s,onDead:()=>{a6(e,!0)},isVisible:()=>!!e.z},n);r.onData(e=>c.send(e)),r.attachCustomKeyEventHandler(t=>t.key===`Enter`&&t.shiftKey?(t.type===`keydown`&&c.send(`\x1B\r`),!1):(t.ctrlKey||t.metaKey)&&t.key.toLowerCase()===`c`&&r.hasSelection()?(t.type===`keydown`&&X_(r.getSelection()).then(t=>{t&&(r.clearSelection(),e.ab())}),!1):!(a&&t.type===`keydown`&&t.key===`Backspace`));let l=()=>{if(!e.b.clientWidth)return;let t=i.proposeDimensions();!t||t.cols===r.cols&&t.rows===r.rows||(i.fit(),c.resize(r.cols,r.rows))},u=new ResizeObserver(l);u.observe(e.b),n.addEventListener(`abort`,()=>u.disconnect());let d=()=>requestAnimationFrame(l);if(document.addEventListener(`visibilitychange`,()=>{document.hidden||d()},{signal:n}),window.addEventListener(`pageshow`,d,{signal:n}),window.addEventListener(`focus`,d,{signal:n}),window.visualViewport?.addEventListener(`resize`,d,{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.ah(t)}},{capture:!0,signal:n}),e.a7={send(e){c.send(e)},setKeyboard(e){let t=r.textarea;t&&(t.inputMode=e?`text`:`none`,e?(t.focus(),setTimeout(()=>{document.activeElement!==t&&t.focus()},50)):t.blur())}},a){r.textarea&&(r.textarea.inputMode=`none`);let t=window.visualViewport;if(t){let i=0,a=()=>{i=Math.max(i,t.height),e.a1&&i-t.height<k4&&(o6(e,!1),r.textarea&&(r.textarea.inputMode=`none`))};a(),t.addEventListener(`resize`,a,{signal:n}),window.addEventListener(`orientationchange`,()=>{i=0},{signal:n})}let i=t4(r,t6(e),{onStart(){o?.setFrozen(!0)},onEnd(){o?.setFrozen(!1)},onCopy(){e.ab()}},n);Y2(r,t6(e),n,i.selecting),Z2(r,e=>c.send(e),n)}else r4(r,t6(e),()=>e.ab(),n);e.z&&!a&&r.focus();let f={term:r,socket:c,abort:t,suspend:void 0};return e.z||(f.suspend=setTimeout(()=>c.disconnect(),O4)),f},onUpdate:function(){clearTimeout(this.suspend),this.socket.syncVisibility(),e.z?(!e.a0&&this.socket.readyState>=WebSocket.CLOSING&&(this.term.reset(),this.socket.reconnect()),!e.a0&&!e.a2&&this.term.focus()):this.suspend=setTimeout(()=>this.socket.disconnect(),O4)},onDestroy:function(){clearTimeout(this.suspend),this.abort.abort(),this.term.dispose()}})),7),a6=j(26,e=>{r6(e,+!e.a0),i6(e)}),o6=j(27,e=>{i6(e),$3(e)}),s6=O(6,((e,t)=>`<div class=kb-slot><div class=key-bar><!><div class=kspacer></div><!><input type=file accept=image/* hidden><button class="icon-btn kbtn dpad-btn" title="More keys">${e}</button><button class="icon-btn kbtn kb-toggle">${t}</button><!><div popover=auto class=dpad-grid></div></div></div>`)(i4,l4),((e,t)=>`E%b b%b b D/${e}&l D/${t}&l%b m`)(a4,u4),Y3),c6=j(28,e=>{s6(e,+!e.a2),i6(e)}),l6=O(2,`<div class="term-uploading dim">uploading…</div>`),u6=j(29,e=>l6(e,+!e.a3)),d6=O(3,`<div class=term-copied>Copied</div>`),f6=j(30,e=>d6(e,+!e.a4)),p6=O(5,`<div class=trap-backdrop><div class=paste-trap><p class=dim>Long-press below and choose Paste</p><input placeholder="Paste here…"><button class=btn>Cancel</button></div></div>`,` D Db b `,X4),m6=j(31,e=>{p6(e,+!e.a5),J4(e)}),h6=(e,t)=>D6(e,t.current),g6=(e,t)=>k6(e,t.timer),_6=(e,t)=>j6(e,t.current),v6=L(`p25`,e=>{c6(e,Jn()),A(e.a,`dragover`,function(e){e.preventDefault()}),A(e.a,`drop`,function(t){t.preventDefault();for(let n of t.dataTransfer?.files||[])e.ah(n)})});function y6(e){a6(e,!1),o6(e,!1),c6(e,!1),u6(e,!1),f6(e,!1),m6(e,!1),h6(e,{current:null}),g6(e,{timer:0}),_6(e,{current:null}),v6(e)}var b6=M(41),x6=N(40,e=>b6(e,Z6(e))),S6=M(46),C6=M(47),w6=N(44,e=>{S6(e,Q6(e)),C6(e,$6(e))}),T6=M(43,e=>{w6(e),i6(e)}),E6=N(34,e=>T6(e,e8(e))),D6=M(33,e=>{x6(e),E6(e),w6(e),i6(e)}),O6=M(37,i6),k6=M(36,e=>O6(e,t8(e))),A6=M(42),j6=M(39,e=>{A6(e,n8(e)),x6(e)}),M6=M(9,E6),N6=M(10,e=>{z(e.a,`hidden`,e.k===`diff`),G3(e)}),P6=F(p3),F6=M(19,e=>{i6(e),P6(e)}),I6=M(25,i6),L6=M(11),R6=M(12),z6=M(13),B6=M(14),V6=M(15,X3),H6=M(16,F(O3)),U6=M(17,F(N3,Q4)),W6=M(18,F(F3,E3)),G6=M(20),K6=M(21,F(_3)),q6=M(22,F(y3)),J6=M(23,F(L3)),Y6=F(e3),X6=M(24,e=>{Q3(e),Y6(e)});function Z6(e){return t=>{n6(e)(),e.a7?.send(t);let n={};n.delay=setTimeout(()=>{n.repeat=setInterval(()=>e.a7?.send(t),D4)},E4),e.ad=n}}function Q6(e){return async t=>{let n=[...t?.files||[]];for(let t of n)await e.ah(t);if(!n.length){let n=t?.getData(`text/plain`);n&&e.a7?.send(n)}m6(e,!1)}}function $6(e){return async()=>{if(!navigator.clipboard?.read){m6(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.ah(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.a7?.send(n)}}}catch{m6(e,!0)}}}function e8(e){return async t=>{if(t){u6(e,!0);try{let n=await(await fetch(`/api/workspaces/${e.j}/assets?name=${encodeURIComponent(t.name||`pasted.png`)}`,{method:`POST`,body:t})).json();n.path&&e.a7?.send(`${n.path} `)}finally{u6(e,!1)}}}}function t8(e){return()=>{clearTimeout(e.aa),f6(e,!0),e.aa=setTimeout(()=>{f6(e,!1)},1200)}}function n8(e){return()=>{let t=e.ad;t&&(clearTimeout(t.delay),clearInterval(t.repeat),e.ad=null)}}R(`p1`,Z6),R(`p4`,Q6),R(`p5`,$6),R(`p3`,e8),R(`p0`,t8),R(`p2`,n8);var r8=Bs,i8=(e=>`/${e}&`)(Vs);function a8(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 o8(e,t){if(!e)return null;let n=new Date(e).getTime()-Date.now();return n<=0?t?null:`now`:a8(n)}var s8=(e,t)=>V(e.e,t?`↻ ${ct(t)}`:``),c8=N(9,e=>s8(e,o8(e.i,e._.h!=null))),l8=He(4,c8),u8=l8,d8=N(12,e=>z(e.a,`title`,`${e.k}: ${e.l}% used${e.i?` — resets ${new Date(e.i).toLocaleString()}`:``}`),2),f8=M(11,e=>{V(e.d,e.l),d8(e)}),p8=M(7,e=>{dt(e.c,{hot:e.h>=90,warm:e.h>=70&&e.h<90}),ft(e.c,`width:${Math.min(100,Math.max(2,e.h))}%`),f8(e,Math.round(e.h))}),m8=M(8,e=>{c8(e),d8(e)}),h8=M(10,e=>{V(e.b,e.k),d8(e)}),g8=(e,t)=>{p8(e,t[0]?.used_percent),m8(e,t[0]?.resets_at),h8(e,t[0]?.window)},_8=P(3,0,e=>{z(e.a,`title`,`plan-usage could not reach this provider — these are its last cached numbers, ${a8(e._.h*1e3)} old`),V(e.b,a8(e._.h*1e3))}),v8=_8,y8=P(2,0,e=>V(e.a,e._.j.replace(/^default_/,``).replaceAll(`_`,` `))),b8=y8,x8=O(3,`<span class=usage-stale>⚠ <!> old</span>`,` Db%`,v8),S8=M(7,e=>{B(e.a,`stale`,e.h!=null),x8(e,+(e.h==null)),_8(e),l8(e)}),C8=(e,t)=>V(e.b,t),w8=O(2,`<span class=dim> </span>`,`D `,b8),T8=M(9,e=>{w8(e,+!e.j),y8(e)}),E8=k(4,`<div class=meter><span class="meter-label dim"> </span><span class=meter-track><span class=meter-fill></span></span><span class=meter-pct><!>%</span><span class="meter-reset dim"> </span></div>`,` E lD lD%lD `,u8,g8),D8=(e,t)=>E8(e,[t||[],`window`]),O8=k(0,`<div class=usage-row><div class=usage-name><strong> </strong><!><!></div><div class=usage-meters></div></div>`,` F l%b%l `,0,(e,t)=>{S8(e,t[0]?.stale_seconds),C8(e,t[0]?.agent),T8(e,t[0]?.plan),D8(e,t[0]?.windows)}),k8=I(13,e=>O8(e,[e._._.h||[],e=>`${e.agent}-${e.account||``}`]),e=>e._._),A8=k8,j8=I(12,e=>V(e.a,e._._.g),e=>e._._),M8=O(2,`<p class=dim><span class=spin></span> Loading usage…</p>`,0,0,`<p class=dim> </p>`,`D `,j8,`<div class=usage-list></div>`,` `,A8),N8=I(11,e=>M8(e,e._.f?e._.f?.error?1:2:0)),P8=L(`r2`,e=>A(e.a,`click`,function(){e._.k()})),F8=e=>{N8(e),I8(e),Uo(e.b),Wo(e.b,13),Go(e.b),P8(e)},I8=I(14,e=>{B(e.a,`spinning`,e._.i),z(e.a,`disabled`,e._.i)}),L8=ot(`r3`,(e=>`<header class=manage-head><div><h2>Usage</h2></div><button class=icon-btn title="Refresh usage">${e}</button></header><!><!>`)(Vo),(e=>`Db D/${e}&m%c`)(Ho),F8),R8=F(N8),z8=j(5,e=>{B8(e,e.f?.error),V8(e,e.f?.agents),R8(e)}),B8=M(6,F(j8)),V8=M(7,F(k8)),H8=j(8,F(I8)),U8=M(10),W8=L(`r4`,e=>xt(e,{onMount:function(){e.j(!1)}})),G8=M(9,e=>{U8(e,Y8(e)),W8(e)});function K8(e){ic(e.a),Hs(e.a,L8(e)),rc(e.a,`Usage`),nc(e.a,`usage-modal`),Ys(e.a),ac(e.a),z8(e,null),H8(e,!1),G8(e,X8(e))}var q8=(e,t)=>Qs(e.a,t),J8=(e,t)=>tc(e.a,t);function Y8(e){return async()=>{H8(e,!0),await e.j(!0),H8(e,!1)}}function X8(e){return async t=>{try{z8(e,await H(`/api/usage${t?`?refresh`:``}`))}catch(t){z8(e,{error:String(t.message||t)})}}}R(`r1`,Y8),R(`r0`,X8);var Z8=Bs,Q8=(e=>`/${e}&`)(Vs),$8=ot(`l2`,`Cancel`),e5=Xe(1,`B2`),t5=I(13,e=>V(e.a,e._.f)),n5=L(`l4`,e=>{jt(e,`b`),A(e.b,`keydown`,function(t){t.key===`Enter`?(t.preventDefault(),e._.m()):t.key===`Escape`&&e._.k&&e._.h?.(!1)})}),r5=e=>{t5(e),i5(e),a5(e),n5(e)},i5=I(15,e=>z(e.b,`placeholder`,e._.j)),a5=I(16,e=>At(e,`b`,e._.k,h5(e))),o5=ot(`l6`,`<h2 class=prompt-title> </h2><input>`,`D l `,r5,0,`B2`),s5=I(14,e=>V(e.b,e._.i||`OK`)),c5=L(`l3`,e=>A(e.a,`click`,function(){e._.m()})),l5=e=>{s5(e),u5(e),e.c,Lo(e.c,$8(e)),Ro(e.c,`btn`),zo(e.c),Bo(e.c),c5(e)},u5=I(16,e=>z(e.a,`disabled`,!e._.k.trim())),d5=st(`l5`,(e=>`<button type=button class="btn primary"> </button><div class=spacer></div>${e}`)(Fo),(e=>` D lb/${e}&`)(Io),l5),f5=M(12),p5=N(11,e=>f5(e,g5(e))),fre=F(u5,a5),m5=j(10,e=>{p5(e),fre(e)}),pre=(e,t)=>m5(e,t||``),mre=M(4,p5),hre=L(`l7`,e=>xt(e,{onMount:function(){setTimeout(()=>{let t=e5(e)();t?.focus(),t?.select()},0)}}));function gre(e){ic(e.a),ac(e.a,Yt({content:d5(e)})),Hs(e.a,o5(e)),nc(e.a,`prompt-dlg`),Ys(e.a),hre(e)}var _re=F(t5),vre=M(5,e=>{rc(e.a,e.f),_re(e)}),yre=(e,t)=>Qs(e.a,t),bre=M(7,e=>tc(e.a,e.h)),xre=M(8,F(s5)),Sre=M(9,F(i5));function h5(e){return t=>{m5(e._,t)}}function g5(e){return()=>{let t=e.k.trim();t&&e.e(t)}}R(`l0`,h5),R(`l1`,g5);var Cre=((e,t)=>`<div class=work-view>${e}<div class=main-col><!><!>${t}<!><!><div class=term-area></div></div><!><!></div>`)(dh,TF),wre=((e,t)=>`D/${e}&D%b%b/${t}&%b%b l%b%l`)(fh,EF),_5=P(8,0,e=>yre(e.a,!!e._.a6)),Tre=e=>{_5._(e),y5._(e),b5._(e),S5._(e),C5._(e),gre(e.a),vre(e.a,`Rename session`),xre(e.a,`Rename`),bre(e.a,d7(e)),Sre(e.a)},v5=N(1,e=>pre(e.a,e._.a7||e._.a8)),y5=P(8,0,v5),b5=P(8,0,v5),x5=N(2,e=>mre(e.a,f7(e))),S5=P(8,0,x5),C5=P(8,0,x5),w5=I(69,e=>V(e.a,e._._.a4),e=>e._._),Ere=st(`s31`,` `,` `,w5),Dre=e=>{Sr(e.a,Ere(e)),Er(e.a,p7(e)),hr(e.a),vr(e.a),br(e.a),Tr(e.a)},T5=P(7,0,e=>q8(e.a,e._.a3)),Ore=e=>{T5._(e),K8(e.a),J8(e.a,m7(e))},E5=N(2,e=>V(e.b,e._._.a5?`Starting…`:`Start ${e._._.o||`claude`}`)),D5=I(65,E5,e=>e._._),kre=L(`s32`,e=>A(e.a,`click`,function(){e._._.ao(e._._.o||`claude`,!0)})),Are=e=>{D5(e),O5(e),kre(e)},O5=I(70,e=>{z(e.a,`disabled`,e._._.a5),E5(e)},e=>e._._),k5=N(8,e=>I6(e.b,e._._.n&&e._._.y===`term`&&e.g===e._._.am),3),A5=I(64,k5,e=>e._._),jre=e=>{A5(e),j5(e),M5(e),P5(e),F5(e),I5(e),R5(e),z5(e),B5(e),y6(e.b),G6(e.b,v7(e)),B6(e.b,_7(e)),L6(e.b,g7(e)),R6(e.b,h7(e))},j5=I(66,e=>J6(e.b,e._._.r),e=>e._._),M5=I(67,e=>{N6(e.b,e._._.y),k5(e)},e=>e._._),N5=N(11,e=>V6(e.b,y7(e))),P5=I(75,e=>{M6(e.b,e._._.ab),z6(e.b,b7(e)),N5(e)},e=>e._._),F5=I(76,e=>X6(e.b,e._._.ag),e=>e._._),I5=I(77,e=>{W6(e.b,e._._.aj),K6(e.b,x7(e))},e=>e._._),Mre=le(3,0,2),L5=N(7,e=>Mre(e,e.g===e._._.am)),R5=I(79,e=>{k5(e),L5(e)},e=>e._._),z5=I(80,e=>q6(e.b,S7(e)),e=>e._._),B5=I(82,N5,e=>e._._),Nre=M(6,e=>{F6(e.b,e.g),k5(e),L5(e)}),Pre=(e,t)=>U6(e.b,t),Fre=(e,t)=>H6(e.b,t),Ire=k(0,(e=>`<!><!>${e}<!><!><!>`)(w4),(e=>`b%b/${e}&%b%c`)(T4),jre,(e,t)=>{Nre(e,t[0]?.id),Pre(e,t[0]?.state),Fre(e,t[0]?.agent)}),V5=P(6,0,e=>Ire(e,[e._.aj,`id`])),Lre=e=>{V5._(e),H5._(e)},Rre=O(1,`<div class=empty-sess><p class=dim>No sessions in this workspace.</p><button class="btn primary"> </button></div>`,`Db D `,Are),H5=P(6,0,e=>Rre(e,+!!e._.al)),zre=M(61,C5),Bre=O(6,`<!><!><!><!>`,`b%b%`,Lre,`<p class="dim pad-inline">Loading sessions…</p>`),Vre=L(`s35`,e=>{e.n&&window.addEventListener(`keydown`,t=>{if(t.key===`Escape`&&e.a2&&!document.querySelector(`dialog[open]`)&&o7(e,!1),(t.metaKey||t.ctrlKey)&&t.shiftKey&&t.key.toLowerCase()===`d`&&(t.preventDefault(),n7(e,e.y===`diff`?`term`:`diff`)),t.altKey&&(t.key===`[`||t.key===`]`)&&(e.aj?.length??0)>1){t.preventDefault();let n=e.aj.map(e=>e.id);e7(e,n[(Math.max(0,n.indexOf(e.am))+(t.key===`]`?1:n.length-1))%n.length]),n7(e,`term`)}},{capture:!0,signal:Ee(e,0)})}),U5=N(49,e=>{Te(e,0),Vre(e)},4),Hre=F(R5),Ure=M(48,e=>{Hg(e.a,e.am),U5(e),Hre(e)}),W5=N(46,e=>Ure(e,(()=>{if(e.w&&e.aj?.some(t=>t.id===e.w))return e.w;let t=Fn(e.ab);return t&&e.aj?.some(e=>e.id===t)?t:e.aj?.[0]?.id??null})()),2),Wre=F(I5),Gre=M(45,e=>{E_(e.a,e.aj),yU(e.d,e.aj||[]),_ie(e,e.aj?.length),Bre(e,+!e.aj),W5(e),U5(e),V5(e),Wre(e)}),G5=N(40,e=>Gre(e,e.v??e.m?.[e.ab]?.sessions??null),2),K5=N(59,L(`s33`,e=>xt(e,{active:e.n,load:e.aw,onMount:function(){let t=new AbortController,n=t.signal,r={abort:t,started:!1,stale:!1,timer:void 0,refresh:()=>{if(document.hidden){r.stale=!0;return}r.stale=!1,this.load(!1)},sync:()=>{this.active?(r.started||(r.started=!0,this.load(!0)),r.timer??=setInterval(r.refresh,1e4)):r.stop()},stop:()=>{clearInterval(r.timer),r.timer=void 0}};return bn().addEventListener(`sessions.changed`,t=>{let n=t.data?.workspaceId;r.started&&(!n||n===e.ab)&&r.refresh()},{signal:n}),document.addEventListener(`visibilitychange`,()=>{!document.hidden&&r.stale&&r.refresh()},{signal:n}),fee(()=>{if(!this.active)return;let t=Tn(e.ab);t&&e.ah(t.pr);let n=Dn(e.ab);n&&(e7(e,n),n7(e,`term`))},n),r.sync(),r},onUpdate:function(){this.sync()},onDestroy:function(){this.abort.abort(),this.stop()}})),3),Kre=M(58,K5),q5=N(57,e=>Kre(e,w7(e)),2),qre=M(56,q5),J5=N(54,e=>qre(e,T7(e)),6),Jre=F(B5),Yre=M(62,e=>{S_(e.a,E7(e)),Jre(e)}),Y5=N(51,e=>Yre(e,D7(e)),2),Xre=M(50,e=>{J5(e),Y5(e)}),X5=N(38,e=>Xre(e,O7(e))),Zre=M(60,F(z5)),Z5=N(23,e=>Zre(e,k7(e))),Q5=j(21,e=>{zre(e,C7(e)),G5(e),X5(e),J5(e),Z5(e)}),$5=N(39,L(`s34`,e=>{e.w&&In(e.ab,e.w)})),e7=j(22,e=>{W5(e),J5(e),Z5(e),$5(e)}),Qre=le(5,2,4),t7=N(25,e=>pU(e.d,e.n&&e.y===`diff`)),$re=F(M5),n7=j(24,e=>{qg(e.a,e.y),B(e.g,`as-bar`,e.y===`diff`),Qre(e,e.y===`diff`),U5(e),t7(e),$re(e)}),r7=j(26,e=>fU(e.d,e.a0)),i7=N(44,L(`s36`,e=>{if(e.n){let t=Tn(e.ab);t&&e.ah(t.pr);let n=Dn(e.ab);n&&(e7(e,n),n7(e,`term`))}}),2),eie=M(43,e=>{w_(e.a,A7(e)),i7(e),K5(e)}),a7=j(27,e=>{mU(e.d,e.a1),eie(e,j7(e))}),o7=j(28,e=>{$g(e.a,e.a2),U5(e)}),tie=O(7,r8,(e=>`/${e}&`)(i8),Ore),s7=j(29,e=>{tie(e,+!e.a3),T5(e)}),nie=O(1,Qn,(e=>`/${e}&`)($n),Dre),rie=F(w5),c7=j(30,e=>{nie(e,+!e.a4),rie(e)}),l7=j(31,F(O5)),iie=O(8,Z8,(e=>`/${e}&`)(Q8),Tre),u7=j(32,e=>{cie(e,e.a6?.title),lie(e,e.a6?.agent),uie(e,e.a6?.id),iie(e,+!e.a6),_5(e)}),aie=(e,t)=>{Sie(e,t.wanted),Cie(e,t.run)},oie=M(63);function sie(e){l_(e.a),Ug(e.a,V7(e)),Jg(e.a,B7(e)),e_(e.a,z7(e)),u_(e.a,R7(e)),M_(e.a,L7(e)),j_(e.a,I7(e)),k_(e.a,F7(e)),JH(e.d),SU(e.d,P7(e)),wU(e.d,N7(e)),Q5(e,null),e7(e,null),n7(e,`term`),r7(e,``),a7(e,0),o7(e,!1),s7(e,!1),c7(e,null),l7(e,!1),u7(e,null),aie(e,{wanted:!1,run:void 0}),oie(e,M7(e))}var cie=M(33,y5),lie=M(34,b5),uie=M(35,S5),die=(e,t)=>{Rg(e.a,t),pie(e,t?.id),mie(e,t?.status),hie(e,t?.name)},fie=F(P5),pie=M(37,e=>{dU(e.d,e.ab),G5(e),W5(e),i7(e),X5(e),J5(e),$5(e),Y5(e),K5(e),fie(e)}),mie=M(41,J5),hie=M(42,F(F5)),gie=die,_ie=M(47,H5),vie=M(12,e=>{h_(e.a,e.m),G5(e)}),yie=F(A5),bie=L(`s37`,e=>{e.n||o7(e,!1)}),xie=M(13,e=>{d_(e.a,e.n),i7(e),U5(e),K5(e),t7(e),yie(e),bie(e)}),Sie=M(53,e=>{J5(e),q5(e)}),Cie=M(55,q5),wie=F(D5),Tie=M(14,e=>{J5(e),wie(e)}),Eie=M(15,e=>{__(e.a,e.p),Y5(e)}),Die=(e,t)=>f_(e.a,t),Oie=F(j5),kie=M(17,e=>{b_(e.a,e.r),Oie(e)}),Aie=(e,t)=>D_(e.a,t),jie=M(19,e=>v_(e.a,e.t)),Mie=(e,t)=>N_(e.a,t);function d7(e){return function(t){t||u7(e._,null)}}function f7(e){return function(t){e._.az(e._.a9,t),u7(e._,null)}}function p7(e){return function(){c7(e._,null)}}function m7(e){return t=>{s7(e._,t)}}function h7(e){return function(){o7(e._._,!0)}}function g7(e){return function(){n7(e._._,`term`)}}function _7(e){return function(){e._._.ah()}}function v7(e){return function(t){e7(e._._,t)}}function y7(e){return function(t){e._._.b0(e._._.ab,t)}}function b7(e){return function(){e._._.t?.(e._._.ab)}}function x7(e){return function(t){let n=(e._._.aj||[]).find(e=>e.id===t);n&&u7(e._._,n)}}function S7(e){return function(t){e._._.ay(t)}}function C7(e){return async(t,n)=>{n=n.trim(),n&&(Q5(e,(e.v||[]).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 w7(e){return t=>(t&&(e.ar=!0),(e.at??=On(e.au))())}function T7(e){return async()=>{let t=e.ar;e.ar=!1;try{let n=await H(`/api/workspaces/${e.ab}/sessions`);if(!n.length&&t&&e.af===`active`){let t=await e.ao(e.o||`claude`,!1);n=t?[t]:[]}Q5(e,n);let r=Fn(e.ab);r&&n.some(e=>e.id===r)&&e7(e,r),e.v.some(t=>t.id===e.w)||e7(e,e.v?.[0]?.id||null)}catch(t){if(Q5(e,e.v||[]),Zt(t))return;c7(e,String(t.message||t))}}}function E7(e){return function(t,n){e.b0(t,n)}}function D7(e){return async(t,n)=>{if(t===e.ab){let r=await e.ao(n,!0);r&&In(t,r.id);return}try{In(t,(await H(`/api/workspaces/${t}/sessions`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({agent:n})})).id),e.p?.(t)}catch(t){c7(e,String(t.message||t))}}}function O7(e){return async(t,n)=>{l7(e,!0);try{let r=await H(`/api/workspaces/${e.ab}/sessions`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({agent:t})});return n&&(Q5(e,(e.v||[]).concat(r)),e7(e,r.id)),r}catch(t){return c7(e,String(t.message||t)),null}finally{l7(e,!1)}}}function k7(e){return async t=>{try{await H(`/api/sessions/${t}`,{method:`DELETE`}),Q5(e,(e.v||[]).filter(e=>e.id!==t)),e.w===t&&e7(e,e.v?.[0]?.id||null)}catch(t){c7(e,`Kill session failed: ${String(t.message||t)}`)}}}function A7(e){return function(t){e.ah(t)}}function j7(e){return t=>{r7(e,t||``),t&&a7(e,e.a1+1),n7(e,`diff`)}}function M7(e){return t=>{u7(e,t)}}function N7(e){return function(){n7(e,`term`)}}function P7(e){return function(t){e7(e,t),n7(e,`term`)}}function F7(e){return function(t){e.b1(t)}}function I7(e){return function(t){e.ay(t)}}function L7(e){return function(){s7(e,!0)}}function R7(e){return function(t){c7(e,t)}}function z7(e){return t=>{o7(e,t)}}function B7(e){return t=>{n7(e,t)}}function V7(e){return function(t){e7(e,t)}}R(`s29`,d7),R(`s30`,f7),R(`s17`,p7),R(`s28`,m7),R(`s26`,h7),R(`s25`,g7),R(`s24`,_7),R(`s21`,v7),R(`s20`,y7),R(`s27`,b7),R(`s23`,x7),R(`s22`,S7),R(`s5`,C7),R(`s3`,w7),R(`s2`,T7),R(`s13`,E7),R(`s6`,D7),R(`s1`,O7),R(`s4`,k7),R(`s16`,A7),R(`s0`,j7),R(`s7`,M7),R(`s19`,N7),R(`s18`,P7),R(`s15`,F7),R(`s14`,I7),R(`s12`,L7),R(`s11`,R7),R(`s10`,z7),R(`s9`,B7),R(`s8`,V7);var H7=I(41,e=>V(e.a,e._._.t),e=>e._._),Nie=L(`b20`,e=>A(e.b,`click`,function(){F9(e._._,null),e._._.v()})),Pie=O(0,`<p> </p><button class=btn>Retry</button>`,`D l `,e=>{H7(e),Nie(e)},`<span class=spin></span>Loading workspaces…`),U7=P(1,0,e=>Pie(e,+!e._.t)),Fie=U7,W7=I(41,e=>V(e.a,e._._.t),e=>e._._),Iie=st(`b19`,` `,` `,W7),Lie=e=>{Sr(e.a,Iie(e)),Er(e.a,I9(e)),hr(e.a),vr(e.a),br(e.a),Tr(e.a)},G7=I(34,e=>Die(e.b,e._._.g),e=>e._._),Rie=e=>{G7(e),K7(e),q7(e),X7(e),Z7(e),Q7(e),$7(e),e9._(e),t9._(e),sie(e.b),Aie(e.b,R9(e)),Mie(e.b,L9(e))},K7=I(35,e=>vie(e.b,e._._.h),e=>e._._),q7=I(36,e=>{Tie(e.b,e._._.i?e._._.i?.preferredAgent:`claude`),kie(e.b,e._._.i?e._._.i?.agents:[`claude`])},e=>e._._),J7=N(5,e=>xie(e.b,!e._._.p&&!e._._.a5&&e._.f===e._._.k),3),zie=le(3,0,2),Y7=N(4,e=>zie(e,e._.f===e._._.k)),X7=I(37,e=>{J7(e),Y7(e)},e=>e._._),Z7=I(38,J7,e=>e._._),Q7=I(42,e=>Eie(e.b,z9(e)),e=>e._._),$7=I(43,J7,e=>e._._),e9=P(0,0,e=>gie(e.b,e._.e)),t9=P(0,0,e=>{jie(e.b,B9(e)),J7(e),Y7(e)}),Bie=O(0,(e=>`<!><!>${e}<!><!><!>`)(Cre),(e=>`b%b/${e}&%b%c`)(wre),Rie),Vie=M(4,e=>{Uie(e,e.e?.id),Bie(e,+!e.e),e9(e)}),n9=N(3,e=>Vie(e,e._.g.find(t=>t.id===e.c))),r9=He(5,n9),Hie=r9,Uie=M(5,t9),Wie=M(2,n9),Gie=(e,t)=>Wie(e,t[0]),i9=N(1,e=>Gf(e.a,V9(e))),a9=P(4,0,i9),Kie=e=>{a9._(e),o9._(e),s9._(e),Bf(e.a),qf(e.a,H9(e))},o9=P(4,0,e=>Kf(e.a,e._.p)),s9=P(4,0,i9),c9=P(3,0,e=>fd(e.a,U9(e))),qie=e=>{c9._(e),l9._(e),u9._(e),Lu(e.a),pd(e.a,W9(e))},l9=P(3,0,e=>md(e.a,!!e._.q)),u9=P(3,0,e=>dd(e.a,e._.a5)),d9=P(2,0,e=>ao(e.a,e._.g)),Jie=e=>{d9._(e),f9._(e),p9._(e),m9._(e),g9._(e),_9._(e),v9._(e),eo(e.a),Ao(e.a,J9(e)),uo(e.a,q9(e)),_o(e.a,K9(e)),Co(e.a,G9(e))},f9=P(2,0,e=>ko(e.a,e._.h)),p9=P(2,0,e=>Eo(e.a,e._.i)),m9=P(2,0,e=>co(e.a,e._.k)),h9=N(1,e=>So(e.a,!e._.s&&e._.a6)),g9=P(2,0,h9),_9=P(2,0,e=>{vo(e.a,Z9(e)),lo(e.a,X9(e)),po(e.a,Y9(e))}),v9=P(2,0,h9),y9=N(28,L(`b21`,e=>xt(e,{paletteOpen:e.s,load:e.v,activeList:e.g.filter(e=>e.status===`active`).map(e=>e.id),onMount:function(){let t=new AbortController,n=t.signal,r={abort:t,statusStale:!1,statusDebounce:void 0,timer:void 0};Gn(n);let i=(t,n)=>{n&&(En(t,n),In(t,n)),e.a1(t)},a=new URLSearchParams(location.search);a.get(`ws`)&&(i(a.get(`ws`),a.get(`session`)),history.replaceState(null,``,`/`)),Xn()&&document.addEventListener(`click`,e=>{let t=e.target?.closest?.(`a[target="_blank"][href^="http"]`);t&&(e.preventDefault(),Zn(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}),H(`/api/settings`).then(t=>{D9(e,t)}).catch(()=>{});let o=()=>{if(document.hidden){r.statusStale=!0;return}r.statusStale=!1,e.a0()};document.addEventListener(`visibilitychange`,()=>{document.hidden||(r.statusStale=!1,e.a0(!0))},{signal:n}),this.load(),o(),bn().addEventListener(`workspaces.changed`,()=>{this.load(),o()},{signal:n}),bn().addEventListener(`sessions.changed`,()=>{clearTimeout(r.statusDebounce),r.statusDebounce=setTimeout(o,300)},{signal:n}),bn().addEventListener(`status.changed`,t=>{t.data&&(E9(e,t.data),r.statusStale=!1)},{signal:n}),r.timer=setInterval(o,6e4),window.addEventListener(`keydown`,t=>{if((t.metaKey||t.ctrlKey)&&t.key===`k`&&(t.preventDefault(),P9(e,!this.paletteOpen)),(t.metaKey||t.ctrlKey)&&!t.shiftKey&&!t.altKey&&t.key>=`1`&&t.key<=`9`){let n=this.activeList?.[Number(t.key)-1];n&&(t.preventDefault(),e.a1(n))}},{capture:!0,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),clearInterval(this.timer)}})),4),Yie=F(Q7),Xie=M(27,e=>{y9(e),_9(e),s9(e),Yie(e)}),b9=N(13,e=>Xie(e,Q9(e))),Zie=O(2,(e=>`<!>${e}`)(fi),(e=>`b/${e}&`)(pi),Jie),x9=N(33,e=>Zie(e,e.s||e.a6?0:1)),Qie=M(32,e=>{x9(e),v9(e)}),S9=N(30,e=>Qie(e,!e.p&&!e.a3&&e.j),2),$ie=M(29,S9),C9=N(11,e=>$ie(e,e.g.find(t=>t.id===e.k))),eae=O(3,sc,(e=>`/${e}&`)(cc),qie),tae=F($7),nae=M(31,e=>{eae(e,+!e.a5),u9(e),tae(e)}),w9=N(17,e=>nae(e,e.g.find(t=>t.id===e.q))),rae=F(G7),T9=j(6,e=>{b9(e),y9(e),C9(e),w9(e),d9(e),c9(e),a9(e),r9(e),rae(e)}),iae=F(K7),E9=j(7,e=>{f9(e),iae(e)}),aae=F(q7),D9=j(8,e=>{p9(e),aae(e)}),oae=O(1,`<div class="boot dim"></div>`,` `,Fie),sae=M(21,y9),O9=N(14,e=>sae(e,$9(e)),2),cae=O(0,Qn,(e=>`/${e}&`)($n),Lie),k9=N(20,e=>cae(e,e.t&&e.j?0:1)),lae=j(9,e=>{oae(e,+!!e.j),O9(e),S9(e),k9(e)}),uae=F(X7),A9=j(10,e=>{O9(e),C9(e),m9(e),uae(e)}),dae=k(5,`<!><!><!>`,`b%`,Hie,Gie),j9=j(12,e=>{dae(e,[e.m,e=>e]),O9(e),b9(e)}),fae=O(4,kd,(e=>`/${e}&`)(Ad),Kie),pae=F(Z7),M9=j(15,e=>{fae(e,+!e.p),S9(e),o9(e),pae(e)}),N9=j(16,e=>{w9(e),l9(e)}),P9=j(18,e=>{y9(e),x9(e),g9(e)}),mae=F(W7,H7),F9=j(19,e=>{k9(e),mae(e),U7(e)});function I9(e){return function(){F9(e._,null)}}function L9(e){return function(){M9(e._._,!0)}}function R9(e){return function(t,n){En(t,n),In(t,n),e._._.a1(t)}}function z9(e){return function(t){e._._.a1(t)}}function B9(e){return function(t){N9(e._._,t||e._.f)}}function V9(e){return function(t){e._.g.some(e=>e.id===t.id)||T9(e._,[t,...e._.g]),M9(e._,!1),e._.a1(t.id)}}function H9(e){return t=>{M9(e._,t)}}function U9(e){return function(t){T9(e._,e._.g.map(e=>e.id===t.id?t:e))}}function W9(e){return function(t){t||N9(e._,null)}}function G9(e){return t=>{P9(e._,t)}}function K9(e){return function(){M9(e._,!0),P9(e._,!1)}}function q9(e){return function(t){N9(e._,t.id),M9(e._,!1),P9(e._,!1)}}function J9(e){return function(t){D9(e._,t)}}function Y9(e){return function(t,n){P9(e._,!1),H(`/api/workspaces/${t.id}/sessions`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({agent:n})}).then(n=>{En(t.id,n.id),e._.a1(t.id)}).catch(t=>{F9(e._,`New session failed: ${String(t.message||t)}`)})}}function X9(e){return function(t){wn(t.id),e._.a1(t.id)}}function Z9(e){return function(t){e._.a1(t.id)}}function Q9(e){return async t=>{e.g.find(e=>e.id===t)?.status===`archived`&&(await H(`/api/workspaces/${t}`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({action:`restore`})}).catch(()=>{}),T9(e,e.g.map(e=>e.id===t?{...e,status:`active`}:e))),A9(e,t),M9(e,!1),N9(e,null),P9(e,!1),e.m.includes(t)||j9(e,e.m.concat(t)),Nn(t)}}function $9(e){return async()=>{try{let[t]=await Promise.all([H(`/api/workspaces`),mee()]);if(T9(e,t),e.j){let n=new Set(t.filter(e=>e.status===`active`).map(e=>e.id));j9(e,e.m.filter(e=>n.has(e))),e.k&&!n.has(e.k)&&(A9(e,e.m[e.m?.length-1]||null),Nn(e.k))}else{let n=gee();n&&t.some(e=>e.id===n)&&(A9(e,n),j9(e,[n]))}lae(e,!0)}catch(t){if(e.j&&Zt(t))return;F9(e,`Loading workspaces failed: ${t.message||String(t)}`)}}}function hae(e){return(t=!1)=>(e.x||=t,(e.y??=On(async()=>{let t=e.x;e.x=!1;try{E9(e,await H(`/api/status${t?`?fresh`:``}`))}catch(e){if(!Zt(e))throw e}}))())}R(`b3`,I9),R(`b18`,L9),R(`b16`,R9),R(`b15`,z9),R(`b17`,B9),R(`b14`,V9),R(`b13`,H9),R(`b12`,U9),R(`b11`,W9),R(`b10`,G9),R(`b9`,K9),R(`b8`,q9),R(`b4`,J9),R(`b7`,Y9),R(`b6`,X9),R(`b5`,Z9),R(`b2`,Q9),R(`b0`,$9),R(`b1`,hae),Qe();export{t};
|
|
1615
|
+
//# sourceMappingURL=index-BzkRLVQ8.js.map
|