@dylanpiercey/work 0.0.103 → 0.0.104
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/{_BOEACXPY.js → _CitVRaSI.js} +21 -21
- package/dist/index.mjs +71 -71
- package/dist/public/assets/{_BeZxh-mm.js → _12lZruw9.js} +1 -1
- package/dist/public/assets/_12lZruw9.js.br +0 -0
- package/dist/public/assets/{_Cz-F5n3k.js → _1BKgldy4.js} +1 -1
- package/dist/public/assets/_1BKgldy4.js.br +0 -0
- package/dist/public/assets/{_BZIMrsDn2.js → _1MeG_S3S2.js} +1 -1
- package/dist/public/assets/_1MeG_S3S2.js.br +0 -0
- package/dist/public/assets/{_DYSQKsfU.js → _As0ljVB2.js} +1 -1
- package/dist/public/assets/_As0ljVB2.js.br +0 -0
- package/dist/public/assets/{_CZrYSTD2.js → _B15SHkNA.js} +1 -1
- package/dist/public/assets/_B15SHkNA.js.br +0 -0
- package/dist/public/assets/{_B8NXfLLc2.js → _B1Mp7ADV2.js} +1 -1
- package/dist/public/assets/_B1Mp7ADV2.js.br +0 -0
- package/dist/public/assets/{_Cz3Q_PBh.js → _B4XC6CdS.js} +1 -1
- package/dist/public/assets/_B4XC6CdS.js.br +0 -0
- package/dist/public/assets/{_AETv3BSd.js → _B69hDpaD.js} +1 -1
- package/dist/public/assets/_B69hDpaD.js.br +0 -0
- package/dist/public/assets/{_YSBx8SDL.js → _B6BYxEQ1.js} +1 -1
- package/dist/public/assets/_B6BYxEQ1.js.br +0 -0
- package/dist/public/assets/{_C0APEMM8.js → _BEqjpoZg.js} +1 -1
- package/dist/public/assets/_BEqjpoZg.js.br +0 -0
- package/dist/public/assets/{_C6KJHYnD.js → _BLAH3Vfy.js} +1 -1
- package/dist/public/assets/_BLAH3Vfy.js.br +0 -0
- package/dist/public/assets/{_DhOYufO92.js → _BOPuHJtM2.js} +1 -1
- package/dist/public/assets/_BOPuHJtM2.js.br +0 -0
- package/dist/public/assets/{_gSF-kG0H.js → _BOjZTPOf.js} +1 -1
- package/dist/public/assets/_BOjZTPOf.js.br +0 -0
- package/dist/public/assets/{_Bqnfd5-l2.js → _BU7BYRGF2.js} +1 -1
- package/dist/public/assets/_BU7BYRGF2.js.br +0 -0
- package/dist/public/assets/{_VZNpIoO_.js → _BU87-dOv.js} +1 -1
- package/dist/public/assets/_BU87-dOv.js.br +0 -0
- package/dist/public/assets/{_lsWZ-d9b2.js → _Bawj-fZJ2.js} +1 -1
- package/dist/public/assets/_Bawj-fZJ2.js.br +0 -0
- package/dist/public/assets/{_CujUTIm_.js → _BfC_HlYy.js} +1 -1
- package/dist/public/assets/_BfC_HlYy.js.br +0 -0
- package/dist/public/assets/{_BBwdSVv62.js → _BforbyCy2.js} +1 -1
- package/dist/public/assets/{_BluAgQCN.js → _BmHqUXK-.js} +1 -1
- package/dist/public/assets/_BmHqUXK-.js.br +0 -0
- package/dist/public/assets/{_OoofsdUJ2.js → _Bnik8iDk2.js} +1 -1
- package/dist/public/assets/{_DHDATJPn.js → _C-Ym0bJX.js} +1 -1
- package/dist/public/assets/_C-Ym0bJX.js.br +0 -0
- package/dist/public/assets/{_-y9IcHi0.js → _C1-CcZmk.js} +1 -1
- package/dist/public/assets/_C1-CcZmk.js.br +0 -0
- package/dist/public/assets/{_CHi0915U2.js → _C1kG0lEK2.js} +1 -1
- package/dist/public/assets/_C1kG0lEK2.js.br +0 -0
- package/dist/public/assets/{_ZwWSSMOB.js → _C2aOnovs.js} +1 -1
- package/dist/public/assets/_C2aOnovs.js.br +0 -0
- package/dist/public/assets/{_Yu4fyCcu.js → _C5Et7abb.js} +1 -1
- package/dist/public/assets/_C5Et7abb.js.br +0 -0
- package/dist/public/assets/{_BQOcxkC52.js → _C7EInDaj2.js} +1 -1
- package/dist/public/assets/_C7EInDaj2.js.br +0 -0
- package/dist/public/assets/{_COj2A5or2.js → _CBnLDY8w2.js} +1 -1
- package/dist/public/assets/_CBnLDY8w2.js.br +0 -0
- package/dist/public/assets/{_DDtWgMTb.js → _CCtRb96Z.js} +1 -1
- package/dist/public/assets/_CCtRb96Z.js.br +0 -0
- package/dist/public/assets/{_CLJysxj2.js → _CIURJUOW.js} +1 -1
- package/dist/public/assets/_CIURJUOW.js.br +0 -0
- package/dist/public/assets/{_HkYUHfHw2.js → _CKA8Jx8E2.js} +1 -1
- package/dist/public/assets/_CKA8Jx8E2.js.br +0 -0
- package/dist/public/assets/{_ctD402GZ.js → _CKU_POWM.js} +1 -1
- package/dist/public/assets/_CKU_POWM.js.br +0 -0
- package/dist/public/assets/{_x5nTH0On.js → _CMxAFImx.js} +1 -1
- package/dist/public/assets/_CMxAFImx.js.br +0 -0
- package/dist/public/assets/{_DfoHvGIL.js → _CNHkYcg2.js} +1 -1
- package/dist/public/assets/_CNHkYcg2.js.br +0 -0
- package/dist/public/assets/{__YTl1JhJ.js → _COw_Ql4e.js} +1 -1
- package/dist/public/assets/_COw_Ql4e.js.br +0 -0
- package/dist/public/assets/{_CVxl2RPD.js → _CS8QjIcU.js} +1 -1
- package/dist/public/assets/_CS8QjIcU.js.br +0 -0
- package/dist/public/assets/{_Dqt_SamS.js → _CUosKAJV.js} +1 -1
- package/dist/public/assets/_CUosKAJV.js.br +0 -0
- package/dist/public/assets/{_Bsgj4mnQ2.js → _CWDwsyGF2.js} +1 -1
- package/dist/public/assets/_CWDwsyGF2.js.br +0 -0
- package/dist/public/assets/{_C_R8yF5L2.js → _C_0o64__2.js} +1 -1
- package/dist/public/assets/_C_0o64__2.js.br +0 -0
- package/dist/public/assets/{_CllJAI4M.js → _CcOTHVrp.js} +1 -1
- package/dist/public/assets/_CcOTHVrp.js.br +0 -0
- package/dist/public/assets/{_CDgWUXzI.js → _CgGNirdt.js} +1 -1
- package/dist/public/assets/_CgGNirdt.js.br +0 -0
- package/dist/public/assets/{_CTXtNwcB.js → _ChBpI_ne.js} +1 -1
- package/dist/public/assets/_ChBpI_ne.js.br +0 -0
- package/dist/public/assets/{_BxMKrdPQ2.js → _Cj7lRVDV2.js} +1 -1
- package/dist/public/assets/_Cj7lRVDV2.js.br +0 -0
- package/dist/public/assets/{_CxvJdv0j.js → _CkqhlnJo.js} +1 -1
- package/dist/public/assets/_CkqhlnJo.js.br +0 -0
- package/dist/public/assets/{_KcAMZi58.js → _CmLJj9ME.js} +1 -1
- package/dist/public/assets/_CmLJj9ME.js.br +0 -0
- package/dist/public/assets/{_CAJL1j7c.js → _CpKjlFiU.js} +1 -1
- package/dist/public/assets/_CpKjlFiU.js.br +0 -0
- package/dist/public/assets/{_C0KKmjwL.js → _CpyJj23g.js} +1 -1
- package/dist/public/assets/_CpyJj23g.js.br +0 -0
- package/dist/public/assets/{_DdRslm62.js → _CqBCOVhg.js} +1 -1
- package/dist/public/assets/_CqBCOVhg.js.br +0 -0
- package/dist/public/assets/{_DVU0fIS52.js → _CtC-w3pF2.js} +1 -1
- package/dist/public/assets/_CtC-w3pF2.js.br +0 -0
- package/dist/public/assets/{_CXr3yXer.js → _CvO23f2W.js} +1 -1
- package/dist/public/assets/_CvO23f2W.js.br +0 -0
- package/dist/public/assets/{_C5w6NPXI.js → _CyeKaLvw.js} +1 -1
- package/dist/public/assets/_CyeKaLvw.js.br +0 -0
- package/dist/public/assets/{_CKbWnV5d2.js → _D3YZ2wOH2.js} +1 -1
- package/dist/public/assets/_D3YZ2wOH2.js.br +0 -0
- package/dist/public/assets/{_Dxrzn7gD2.js → _DBYlf6SS2.js} +1 -1
- package/dist/public/assets/_DBYlf6SS2.js.br +0 -0
- package/dist/public/assets/{_DCJbqegl.js → _DBaVsSW4.js} +3 -3
- package/dist/public/assets/_DBaVsSW4.js.br +0 -0
- package/dist/public/assets/{_DELEyvLh.js → _DNkR_p3W.js} +1 -1
- package/dist/public/assets/_DNkR_p3W.js.br +0 -0
- package/dist/public/assets/{_BiN-p3Mm.js → _DWMLMYo_.js} +1 -1
- package/dist/public/assets/_DWMLMYo_.js.br +0 -0
- package/dist/public/assets/{_CF1RpvOn.js → _D_M1vhwv.js} +1 -1
- package/dist/public/assets/{_CgNZ23K4.js → _Dc15LcQx.js} +1 -1
- package/dist/public/assets/_Dc15LcQx.js.br +0 -0
- package/dist/public/assets/{_DbVqh6Th2.js → _DhL9zXK82.js} +1 -1
- package/dist/public/assets/_DhL9zXK82.js.br +0 -0
- package/dist/public/assets/{_BH11gEoi.js → _DidQ_9x_.js} +1 -1
- package/dist/public/assets/_DidQ_9x_.js.br +0 -0
- package/dist/public/assets/{_RhWmjjkn2.js → _Doyrf5HK2.js} +1 -1
- package/dist/public/assets/_Doyrf5HK2.js.br +0 -0
- package/dist/public/assets/{_DXOxxxFa2.js → _DwUB7T1V2.js} +1 -1
- package/dist/public/assets/_DwUB7T1V2.js.br +0 -0
- package/dist/public/assets/{_TmpPKG1G2.js → _DxKN9WoJ2.js} +1 -1
- package/dist/public/assets/_DxKN9WoJ2.js.br +0 -0
- package/dist/public/assets/{_DBXFxML6.js → _Dzc2cx5V.js} +1 -1
- package/dist/public/assets/_Dzc2cx5V.js.br +0 -0
- package/dist/public/assets/{_CPFHxSUK.js → _EcnGmJNQ.js} +4 -4
- package/dist/public/assets/_EcnGmJNQ.js.br +0 -0
- package/dist/public/assets/{_4r616vef.js → _FQAA91B4.js} +1 -1
- package/dist/public/assets/_FQAA91B4.js.br +0 -0
- package/dist/public/assets/{_Cbc0eAHQ.js → _JDi-LZlL.js} +1 -1
- package/dist/public/assets/_JDi-LZlL.js.br +0 -0
- package/dist/public/assets/{_CaTMj4Ey2.js → _JpnKiuVh2.js} +1 -1
- package/dist/public/assets/_JpnKiuVh2.js.br +0 -0
- package/dist/public/assets/{_Cgsoq1kD.js → _MqvVvGe9.js} +1 -1
- package/dist/public/assets/_MqvVvGe9.js.br +0 -0
- package/dist/public/assets/{_DZ2ozFyE2.js → _SfOgPYKw2.js} +1 -1
- package/dist/public/assets/_SfOgPYKw2.js.br +0 -0
- package/dist/public/assets/{_ChjLT4BW.js → _eAO_YRah.js} +1 -1
- package/dist/public/assets/_eAO_YRah.js.br +0 -0
- package/dist/public/assets/{_BcLYjRvj2.js → _fGhykqTS2.js} +1 -1
- package/dist/public/assets/_fGhykqTS2.js.br +0 -0
- package/dist/public/assets/{_Dyl0CkEc.js → _gxIUA82n.js} +1 -1
- package/dist/public/assets/_gxIUA82n.js.br +0 -0
- package/dist/public/assets/{_DJ2UU6Tq.js → _ikQj-IKt.js} +1 -1
- package/dist/public/assets/_ikQj-IKt.js.br +0 -0
- package/dist/public/assets/{_dj-y3boC.js → _jDsA0WhJ.js} +1 -1
- package/dist/public/assets/_jDsA0WhJ.js.br +0 -0
- package/dist/public/assets/{_CABMXi3p.js → _m8kUoGWY.js} +1 -1
- package/dist/public/assets/_m8kUoGWY.js.br +0 -0
- package/dist/public/assets/{_BjvRt40f.js → _n2gAvKOC.js} +1 -1
- package/dist/public/assets/_n2gAvKOC.js.br +0 -0
- package/dist/public/assets/{app-page-ClW4MXmb.css → app-page-8q6zQ0vc.css} +1 -1
- package/dist/public/assets/app-page-8q6zQ0vc.css.br +0 -0
- package/dist/public/assets/{diff-view-DnJaRGTY.css → diff-view-CnITVdkB.css} +1 -1
- package/dist/public/assets/diff-view-CnITVdkB.css.br +0 -0
- package/dist/public/assets/new-odamhZDH.js +1 -0
- package/dist/public/assets/settings-odamhZDH.js +1 -0
- package/dist/public/assets/w-odamhZDH.js +1 -0
- package/dist/public/assets/w._-Cfyf2vGo.js +1 -0
- package/dist/public/assets/w._-odamhZDH.js +1 -0
- package/package.json +1 -1
- package/dist/public/assets/_-y9IcHi0.js.br +0 -0
- package/dist/public/assets/_4r616vef.js.br +0 -0
- package/dist/public/assets/_AETv3BSd.js.br +0 -0
- package/dist/public/assets/_B8NXfLLc2.js.br +0 -0
- package/dist/public/assets/_BH11gEoi.js.br +0 -0
- package/dist/public/assets/_BQOcxkC52.js.br +0 -0
- package/dist/public/assets/_BZIMrsDn2.js.br +0 -0
- package/dist/public/assets/_BcLYjRvj2.js.br +0 -0
- package/dist/public/assets/_BeZxh-mm.js.br +0 -0
- package/dist/public/assets/_BiN-p3Mm.js.br +0 -0
- package/dist/public/assets/_BjvRt40f.js.br +0 -0
- package/dist/public/assets/_BluAgQCN.js.br +0 -0
- package/dist/public/assets/_Bqnfd5-l2.js.br +0 -0
- package/dist/public/assets/_Bsgj4mnQ2.js.br +0 -0
- package/dist/public/assets/_BxMKrdPQ2.js.br +0 -0
- package/dist/public/assets/_C0APEMM8.js.br +0 -0
- package/dist/public/assets/_C0KKmjwL.js.br +0 -0
- package/dist/public/assets/_C5w6NPXI.js.br +0 -0
- package/dist/public/assets/_C6KJHYnD.js.br +0 -0
- package/dist/public/assets/_CABMXi3p.js.br +0 -0
- package/dist/public/assets/_CAJL1j7c.js.br +0 -0
- package/dist/public/assets/_CDgWUXzI.js.br +0 -0
- package/dist/public/assets/_CHi0915U2.js.br +0 -0
- package/dist/public/assets/_CKbWnV5d2.js.br +0 -0
- package/dist/public/assets/_CLJysxj2.js.br +0 -0
- package/dist/public/assets/_COj2A5or2.js.br +0 -0
- package/dist/public/assets/_CPFHxSUK.js.br +0 -0
- package/dist/public/assets/_CTXtNwcB.js.br +0 -0
- package/dist/public/assets/_CVxl2RPD.js.br +0 -0
- package/dist/public/assets/_CXr3yXer.js.br +0 -0
- package/dist/public/assets/_CZrYSTD2.js.br +0 -0
- package/dist/public/assets/_C_R8yF5L2.js.br +0 -0
- package/dist/public/assets/_CaTMj4Ey2.js.br +0 -0
- package/dist/public/assets/_Cbc0eAHQ.js.br +0 -0
- package/dist/public/assets/_CgNZ23K4.js.br +0 -0
- package/dist/public/assets/_Cgsoq1kD.js.br +0 -0
- package/dist/public/assets/_ChjLT4BW.js.br +0 -0
- package/dist/public/assets/_CllJAI4M.js.br +0 -0
- package/dist/public/assets/_CujUTIm_.js.br +0 -0
- package/dist/public/assets/_CxvJdv0j.js.br +0 -0
- package/dist/public/assets/_Cz-F5n3k.js.br +0 -0
- package/dist/public/assets/_Cz3Q_PBh.js.br +0 -0
- package/dist/public/assets/_DBXFxML6.js.br +0 -0
- package/dist/public/assets/_DCJbqegl.js.br +0 -0
- package/dist/public/assets/_DDtWgMTb.js.br +0 -0
- package/dist/public/assets/_DELEyvLh.js.br +0 -0
- package/dist/public/assets/_DHDATJPn.js.br +0 -0
- package/dist/public/assets/_DJ2UU6Tq.js.br +0 -0
- package/dist/public/assets/_DVU0fIS52.js.br +0 -0
- package/dist/public/assets/_DXOxxxFa2.js.br +0 -0
- package/dist/public/assets/_DYSQKsfU.js.br +0 -0
- package/dist/public/assets/_DZ2ozFyE2.js.br +0 -0
- package/dist/public/assets/_DbVqh6Th2.js.br +0 -0
- package/dist/public/assets/_DdRslm62.js.br +0 -0
- package/dist/public/assets/_DfoHvGIL.js.br +0 -0
- package/dist/public/assets/_DhOYufO92.js.br +0 -0
- package/dist/public/assets/_Dqt_SamS.js.br +0 -0
- package/dist/public/assets/_Dxrzn7gD2.js.br +0 -0
- package/dist/public/assets/_Dyl0CkEc.js.br +0 -0
- package/dist/public/assets/_HkYUHfHw2.js.br +0 -0
- package/dist/public/assets/_KcAMZi58.js.br +0 -0
- package/dist/public/assets/_RhWmjjkn2.js.br +0 -0
- package/dist/public/assets/_TmpPKG1G2.js.br +0 -0
- package/dist/public/assets/_VZNpIoO_.js.br +0 -0
- package/dist/public/assets/_YSBx8SDL.js.br +0 -0
- package/dist/public/assets/_Yu4fyCcu.js.br +0 -0
- package/dist/public/assets/_ZwWSSMOB.js.br +0 -0
- package/dist/public/assets/__YTl1JhJ.js.br +0 -0
- package/dist/public/assets/_ctD402GZ.js.br +0 -0
- package/dist/public/assets/_dj-y3boC.js.br +0 -0
- package/dist/public/assets/_gSF-kG0H.js.br +0 -0
- package/dist/public/assets/_lsWZ-d9b2.js.br +0 -0
- package/dist/public/assets/_x5nTH0On.js.br +0 -0
- package/dist/public/assets/app-page-ClW4MXmb.css.br +0 -0
- package/dist/public/assets/diff-view-DnJaRGTY.css.br +0 -0
- package/dist/public/assets/new-Dy2OOQ3s.js +0 -1
- package/dist/public/assets/settings-Dy2OOQ3s.js +0 -1
- package/dist/public/assets/w-Dy2OOQ3s.js +0 -1
- package/dist/public/assets/w._-C0fh5mzT.js +0 -1
- package/dist/public/assets/w._-Dy2OOQ3s.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/
|
|
2
|
-
import{$ as e,A as t,At as n,B as r,Bt as i,C as a,Ct as o,D as s,Dt as c,E as l,Et as u,F as d,Ft as f,G as p,Gt as m,H as h,Ht as g,I as _,It as v,J as y,Jt as b,K as x,Kt as S,L as C,Lt as w,M as ee,Mt as te,N as ne,Nt as re,O as ie,Ot as ae,P as oe,Pt as se,Q as ce,R as le,Rt as ue,S as de,St as fe,T as pe,Tt as me,U as he,Ut as T,V as ge,Vt as _e,W as ve,Wt as E,X as ye,Xt as D,Y as be,Yt as O,Z as xe,Zt as k,_ as Se,_t as Ce,a as we,at as Te,b as Ee,bt as De,c as Oe,ct as ke,d as Ae,dt as je,et as Me,f as Ne,ft as Pe,g as Fe,gt as Ie,h as Le,ht as Re,i as ze,it as Be,j as Ve,jt as He,k as Ue,kt as We,l as Ge,lt as Ke,m as qe,mt as Je,n as Ye,nt as Xe,o as Ze,ot as Qe,p as $e,pt as et,q as tt,qt as A,r as nt,rt,s as it,st as at,t as j,tt as ot,u as st,ut as ct,v as lt,vt as ut,w as dt,wt as ft,x as pt,xt as mt,y as ht,yt as gt,z as _t,zt as vt}from"./
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_BEqjpoZg.js","assets/_CNHkYcg2.js","assets/_m8kUoGWY.js","assets/_1BKgldy4.js","assets/_ikQj-IKt.js","assets/_CkqhlnJo.js","assets/_CIURJUOW.js","assets/_C-Ym0bJX.js","assets/_BmHqUXK-.js","assets/_12lZruw9.js","assets/_BOPuHJtM2.js","assets/_DxKN9WoJ2.js","assets/_BXeXVLqQ2.js","assets/_Bawj-fZJ2.js","assets/_DwUB7T1V2.js","assets/_BforbyCy2.js","assets/_CtC-w3pF2.js","assets/_CpYNKFv52.js","assets/_bTVj8UrX2.js","assets/_kIpfj7zU2.js","assets/_gzcpVVnB2.js","assets/_C1kG0lEK2.js","assets/_DhL9zXK82.js","assets/_B6BYxEQ1.js","assets/_B15SHkNA.js","assets/_CpyJj23g.js","assets/_ChBpI_ne.js","assets/_CqBCOVhg.js","assets/_DWMLMYo_.js","assets/_C1-CcZmk.js","assets/_DidQ_9x_.js","assets/_jDsA0WhJ.js","assets/_MqvVvGe9.js","assets/_CcOTHVrp.js","assets/_CKU_POWM.js","assets/_n2gAvKOC.js","assets/_B4XC6CdS.js","assets/_FQAA91B4.js","assets/_DNkR_p3W.js","assets/_BU87-dOv.js","assets/_BaHq4SXp.js","assets/_BYOwaDjH.js","assets/_DsKRHcpP2.js","assets/_CYNrtFtB2.js","assets/_DmIc4jLQ2.js","assets/_CY8IvGdO2.js","assets/_CBce3t8t2.js","assets/_DYvRD3hg2.js","assets/_Dl-2e7rI2.js","assets/_woXpYk--.js","assets/_Bnik8iDk2.js","assets/_fGhykqTS2.js","assets/_CKA8Jx8E2.js","assets/_Doyrf5HK2.js","assets/_Cj7lRVDV2.js","assets/_CCtRb96Z.js","assets/_JDi-LZlL.js","assets/_Dx-8-gkx.js","assets/_DLbMbJfH.js","assets/_C8oCnwJJ2.js","assets/_As0ljVB2.js","assets/_C2aOnovs.js","assets/_eAO_YRah.js","assets/_B69hDpaD.js","assets/_Dc15LcQx.js","assets/_COw_Ql4e.js","assets/_BfC_HlYy.js","assets/_BLAH3Vfy.js","assets/_CpKjlFiU.js","assets/_CS8QjIcU.js","assets/_DVTAwKKz.js","assets/_CgGNirdt.js","assets/_DY5hwH4S2.js","assets/_DJMQeKeT2.js","assets/_DBYlf6SS2.js","assets/_C_0o64__2.js","assets/_D3YZ2wOH2.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/_B1Mp7ADV2.js","assets/_DOwzaHZ02.js","assets/_B3gFvitq2.js","assets/_Cfkwpbl82.js","assets/_BiFt_7mu2.js","assets/_CMLA9XwU2.js","assets/_SfOgPYKw2.js","assets/_Dzc2cx5V.js","assets/_BOjZTPOf.js","assets/_CUosKAJV.js","assets/_C5Et7abb.js","assets/_Bj61d0ZC.js","assets/_gxIUA82n.js","assets/_BM315xPC.js","assets/_Cvrh5tZx2.js","assets/_D_M1vhwv.js","assets/_CMxAFImx.js","assets/_L8AbGenz.js","assets/_ByJddavk.js","assets/_CmLJj9ME.js","assets/_CvO23f2W.js","assets/_CyeKaLvw.js","assets/_C7EInDaj2.js","assets/_CBnLDY8w2.js","assets/_1MeG_S3S2.js","assets/_JpnKiuVh2.js","assets/_CWDwsyGF2.js","assets/_BU7BYRGF2.js","assets/_B6D30XZt.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{$ as e,A as t,At as n,B as r,Bt as i,C as a,Ct as o,D as s,Dt as c,E as l,Et as u,F as d,Ft as f,G as p,Gt as m,H as h,Ht as g,I as _,It as v,J as y,Jt as b,K as x,Kt as S,L as C,Lt as w,M as ee,Mt as te,N as ne,Nt as re,O as ie,Ot as ae,P as oe,Pt as se,Q as ce,R as le,Rt as ue,S as de,St as fe,T as pe,Tt as me,U as he,Ut as T,V as ge,Vt as _e,W as ve,Wt as E,X as ye,Xt as D,Y as be,Yt as O,Z as xe,Zt as k,_ as Se,_t as Ce,a as we,at as Te,b as Ee,bt as De,c as Oe,ct as ke,d as Ae,dt as je,et as Me,f as Ne,ft as Pe,g as Fe,gt as Ie,h as Le,ht as Re,i as ze,it as Be,j as Ve,jt as He,k as Ue,kt as We,l as Ge,lt as Ke,m as qe,mt as Je,n as Ye,nt as Xe,o as Ze,ot as Qe,p as $e,pt as et,q as tt,qt as A,r as nt,rt,s as it,st as at,t as j,tt as ot,u as st,ut as ct,v as lt,vt as ut,w as dt,wt as ft,x as pt,xt as mt,y as ht,yt as gt,z as _t,zt as vt}from"./_DBaVsSW4.js";var yt=Object.create,bt=Object.defineProperty,xt=Object.getOwnPropertyDescriptor,St=Object.getOwnPropertyNames,Ct=Object.getPrototypeOf,wt=Object.prototype.hasOwnProperty,Tt=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),Et=(e,t)=>{let n={};for(var r in e)bt(n,r,{get:e[r],enumerable:!0});return t||bt(n,Symbol.toStringTag,{value:`Module`}),n},Dt=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=St(t),a=0,o=i.length,s;a<o;a++)s=i[a],!wt.call(e,s)&&s!==n&&bt(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=xt(t,s))||r.enumerable});return e},Ot=(e,t,n)=>(n=e==null?{}:yt(Ct(e)),Dt(t||!e||!e.__esModule||!wt.call(e,`default`)?bt(n,`default`,{value:e,enumerable:!0}):n,e));function kt(e){return e.map(e=>{let t=e.pr?String(e.pr.number):`-`,n=e.pr&&(e.pr.headRefOid||e.head)||``,r=e.localHead||e.head||``;return`${e.worktree}#${t}:${n}:L${r}`}).sort().join(`\0`)}function At(e){return e.repos.flatMap(e=>{let t=e.localHead||``;return e.prs.length?e.prs.map(n=>`${e.worktree}#${n.number}:${n.headRefOid||``}:L${t}`):[`${e.worktree}#-::L${t}`]}).sort().join(`\0`)}function jt(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(Mt(i))}return e=>!n.some(t=>t(e))&&t.every(t=>t(e))}function Mt(e){if(!/[*?]/.test(e))return t=>Fe(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=>Fe(e,t)}}var Nt=`search-mark`,Pt=`mark.${Nt}`,Ft=`mark.${Nt}{display:inline;background:#ffd24a;color:#1a1408;-webkit-text-fill-color:#1a1408;border-radius:3px;padding:0 2px}mark.${Nt} *,mark.${Nt} *::before,mark.${Nt} *::after{color:inherit!important;-webkit-text-fill-color:inherit!important;background:transparent!important}mark.${Nt}.active{background:#ffb000;box-shadow:0 0 0 1px #c98400}`,It={query:``,hit:null,keys:null},Lt=new Map,Rt=new WeakMap,zt=(e,t)=>t?`${e}\n${t.line}\n${t.side||``}`:e;function Bt(e,t,n){It.query=e,It.hit=t,It.keys=n?new Set(n):null;for(let[e,t]of Lt)Kt(e,t,!1);t&&Ht(t)}function Vt(){It.hit&&Ht(It.hit)}function Ht(e,t=0){requestAnimationFrame(()=>{requestAnimationFrame(()=>{let n=!1;for(let[r,i]of Lt)if(i===e.key&&(n=!0,Gt(r,e)||t>=40))return;t>=40||(!n||t<12)&&setTimeout(()=>Ht(e,t+1),n?32:48)})})}function Ut(e,t,n){let r=e.getBoundingClientRect(),i=t.getBoundingClientRect();if(i.height===0&&i.width===0)return!1;if(n===`y`){let t=i.top-r.top+e.scrollTop-(r.height/2-i.height/2);return e.scrollTo({top:Math.max(0,t)}),!0}if(e.scrollWidth<=e.clientWidth+1)return!0;let a=Math.min(24,r.width/8);if(i.left>=r.left+a&&i.right<=r.right-a)return!0;let o=i.left-r.left+e.scrollLeft-(r.width/2-i.width/2),s=Math.max(0,e.scrollWidth-e.clientWidth);return e.scrollTo({left:Math.max(0,Math.min(o,s))}),!0}function Wt(e,t){let n=t.parentElement,r=e;for(;r&&r!==n;){if(r instanceof HTMLElement&&r.scrollWidth>r.clientWidth+1){let e=getComputedStyle(r).overflowX;if(e===`auto`||e===`scroll`)return r}let e=r.getRootNode(),t=r.parentElement??(e instanceof ShadowRoot?e.host:null);if(t===r)break;r=t}return null}function Gt(e,t){let n=e.querySelector(`diffs-container`)?.shadowRoot;if(!n)return!1;let r=n.querySelector(`mark.search-mark.active`)??(()=>{if(t.line<1)return null;let e=[...n.querySelectorAll(`[data-line="${t.line}"]`)],r=t.side||`additions`;return e.find(e=>Xt(e)===r)??e[0]??null})();if(!r)return!1;let i=e.closest(`[data-diff-main]`);if(i){if(!Ut(i,r,`y`))return!1}else r.scrollIntoView({block:`center`,inline:`nearest`});let a=Wt(r,e);return a&&Ut(a,r,`x`),!0}function Kt(e,t,n=!0){let r=t&&It.hit?.key===t?It.hit:null,i=It.query.trim(),a=!!i&&!!It.keys&&!!t&&!It.keys.has(t),o=a?``:zt(i,r);!n&&Rt.get(e)===o||(Rt.set(e,o),tn(e,a?``:i,r),r&&Ht(r))}function qt(e,t){return Lt.set(e,t),Kt(e,t),()=>{Lt.delete(e),Rt.delete(e)}}function Jt(e){Kt(e,Lt.get(e))}function Yt(e){let t=e.querySelectorAll(Pt);if(!t.length)return;let n=new Set;for(let e of[...t])e.parentElement&&n.add(e.parentElement),e.replaceWith(...e.childNodes);for(let e of n)e.normalize()}function Xt(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 Zt(e){let t=document.createTreeWalker(e,NodeFilter.SHOW_TEXT),n=[];for(let e=t.nextNode();e;e=t.nextNode())e.parentElement?.closest(Pt)||n.push(e);return n}function Qt(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 $t(e,t,n,r,i){let a=Qt(e,t,n),o=Qt(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 en(e,t,n,r){let i=Zt(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=Xt(e),u=Number(e.getAttribute(`data-line`)),d=r&&r.line===u&&(r.side||`additions`)===l?`${Nt} active`:Nt;for(let e=c.length-1;e>=0;e--)$t(i,a,c[e][0],c[e][1],d)}function tn(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(Yt(e),s)for(let t of e.querySelectorAll(`[data-code] [data-line]`)){let e=t.textContent||``;(o?e:e.toLowerCase()).includes(s)&&en(t,s,o,n)}}var nn=3;function rn(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(on(e,n,a));for(let e of a){i++;let t=e.side===`deletions`?`Old`:`New`,a=e.line_start===e.line_end?`line ${e.line_start}`:`lines ${e.line_start}-${e.line_end}`;r.push(``),r.push(`${i}. **${e.path}** (${t} ${a})`);let o=e.snippet??an(n,e);if(o!=null){let e=ln(o);r.push(``),r.push(un(`${e}diff\n${o}\n${e}`))}r.push(``),r.push(un(e.text))}}return r.join(`
|
|
3
3
|
`)}function an(e,t){let n=e?.files?.find(e=>e.path===t.path),r=t.side===`deletions`?n?.old:n?.new;return r==null?null:cn(r,t.line_start,t.line_end,t.side)}function on(e,t,n){if(t?.head){let n=sn(t.head),r=t.baseSha?sn(t.baseSha):``,i=t.pr?.headRefName||t.branch||`HEAD`;return`${e}/${t.pr?` #${t.pr.number}`:``}: \`${i}\` ${n}${t.base?` vs \`${t.base}\` ${r}`:``}`}let r=[...new Set(n.map(e=>e.head).filter(Boolean))];return r.length?`${e}/: ${r.map(e=>sn(e)).join(`, `)}`:`${e}/`}function sn(e,t=12){return e.slice(0,t)}function cn(e,t,n,r){let i=e.split(`
|
|
4
4
|
`),a=Math.max(1,t-nn),o=Math.min(i.length,n+nn),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(`
|
|
5
5
|
`)}function ln(e){let t=3,n=/`+/g,r;for(;r=n.exec(e);)t=Math.max(t,r[0].length+1);return"`".repeat(t)}function un(e){return e.split(`
|
|
@@ -31,7 +31,7 @@ import{$ as e,A as t,At as n,B as r,Bt as i,C as a,Ct as o,D as s,Dt as c,E as l
|
|
|
31
31
|
\f\r &>`.split(``),`\0
|
|
32
32
|
\f\r "&'<=>\``.split(``)],[`\0
|
|
33
33
|
\f\r "&'<=>\``.split(``),`\0
|
|
34
|
-
\f\r "&'<=>\``.split(``)]],single:[[`&'`.split(``),`"&'\``.split(``)],[`\0&'`.split(``),`\0"&'\``.split(``)]],double:[[`"&`.split(``),`"&'\``.split(``)],[`\0"&`.split(``),`\0"&'\``.split(``)]]};function To(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=ma);let l=Eo(r,e.properties),u=r.all(i.space===`html`&&e.tagName===`template`?e.content:e);return r.schema=i,u&&(o=!1),(l||!a||!vo(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||!to(e,t,n))&&s.push(`</`+e.tagName+`>`),s.join(``)}function Eo(e,t){let n=[],r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){let r=Do(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 Do(e,t,n){let r=ua(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=Ra(r.attribute,Object.assign({},e.settings.characterReferences,{subset:wo.name[i][a]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?Ga:Ka)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?c:(e.settings.preferUnquoted&&(s=Ra(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:wo.unquoted[i][a]}))),s!==n&&(e.settings.quoteSmart&&Wa(n,o)>Wa(n,e.alternative)&&(o=e.alternative),s=o+Ra(n,Object.assign({},e.settings.characterReferences,{subset:(o===`'`?wo.single:wo.double)[i][a],attribute:!0}))+o),c+(s&&`=`+s))}var Oo=[`<`,`&`];function ko(e,t,n,r){return n&&n.type===`element`&&(n.tagName===`script`||n.tagName===`style`)?e.value:Ra(e.value,Object.assign({},r.settings.characterReferences,{subset:Oo}))}function Ao(e,t,n,r){return r.settings.allowDangerousHtml?e.value:ko(e,t,n,r)}function jo(e,t,n,r){return r.all(e)}var Mo=ga(`type`,{invalid:No,unknown:Po,handlers:{comment:Ha,doctype:Ua,element:To,raw:Ao,root:jo,text:ko}});function No(e){throw Error("Expected node, not `"+e+"`")}function Po(e){throw Error("Cannot compile unknown node `"+e.type+"`")}var Fo={},Io={},Lo=[];function Ro(e,t){let n=t||Fo,r=n.quote||`"`,i=r===`"`?`'`:`"`;if(r!==`"`&&r!==`'`)throw Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:zo,all:Bo,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||Bi,characterReferences:n.characterReferences||Io,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space===`svg`?ma:pa,quote:r,alternative:i}.one(Array.isArray(e)?{type:`root`,children:e}:e,void 0,void 0)}function zo(e,t,n){return Mo(e,t,n,this)}function Bo(e){let t=[],n=e&&e.children||Lo,r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join(``)}var Vo=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(),gr(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||yr(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&&zi(e.composedPath())||(os(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||(os(this.options.__debugPointerEvents,`move`,`FileDiff.DEBUG.handlePointerMove:`,e),this.handlePointerEvent({eventType:`move`,event:e}))};handlePointerLeave=e=>{let{__debugPointerEvents:t}=this.options;if(os(t,`move`,`FileDiff.DEBUG.handlePointerLeave: no event`),this.hoveredLine==null&&this.hoveredToken==null){os(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();os(n,e,`FileDiff.DEBUG.handlePointerEvent:`,{eventType:e,composedPath:r});let i=this.resolvePointerTarget(r);os(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=Ko(i)&&this.hoveredLine?.lineElement===i.lineElement;Go(i)&&this.hoveredToken?.tokenElement===i.tokenElement||(this.hoveredToken!=null&&(d?.(this.hoveredToken,t),this.clearHoveredToken()),Go(i)&&(this.setHoveredToken(this.toTokenEventBaseProps(i)),u?.(this.hoveredToken,t))),e||(this.hoveredLine!=null&&(c?.({...this.hoveredLine,event:t}),this.clearHoveredLine()),Ko(i)?(this.setHoveredLine(this.toEventBaseProps(i)),this.placeUtility(),s?.({...this.hoveredLine,event:t})):this.placeUtility());break}case`click`:{if(i==null)break;if(Jo(i)&&p!=null){p(i);break}if(qo(i)&&f!=null){f(i.hunkIndex,i.all||t.shiftKey?`both`:i.direction,i.all||t.shiftKey?1/0:void 0);break}if(!Ko(i))break;Go(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,os(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})()),os(t,`move`,`FileDiff.DEBUG.attachEventListeners: Attaching pointer move event`),os(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();zi(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(Ri(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=Ro(Li());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);Wo(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(Zo(t));if(Wo(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(Wo(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(Wo(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&&zi(e))){for(let n of e)if(n instanceof Element)return this.pathFromElement(n,t)}}pathFromElement(e,t){let n=Zo(e);if(t&&zi(n))return;let r=Qo(e);return r==null?this.pathFromAnnotationSlot(e):Zo(r)}pathFromAnnotationSlot(e){let t=es($o(e));if(t==null)return;let n=this.targetForSelectionPoint(t);return n==null?void 0:Zo(n.lineElement)}hitTest(e){if(!Number.isFinite(e.clientX)||!Number.isFinite(e.clientY))return;let t=this.pre?.getRootNode(),n=ts(t)?t:ts(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)}yr(r??void 0,i??void 0)||(this.selectedRangeHighlightSide=void 0,this.selectedRangeLineNumberOnly=!1,this.options.controlledSelection===!0?this.proposedSelectedRange=i:(this.selectedRange=i,hr(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=()=>{gr(this.renderSelection);let e=this.getSelectionRenderState();if(this.pre==null)return;let{editorActiveLine:t,selectedLines:n}=e,r=!rs(this.renderedSelectedLinesState,n),i=!rs(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);Yo(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=as(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=as(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:Xo(r,`[data-line][data-line-index="${a}"]`),o??=a==null?void 0:Xo(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:is(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:is(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 Ho({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:Uo({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 Uo({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 Wo(e){return e!=null&&`kind`in e&&e.kind===`line`}function Go(e){return e!=null&&`kind`in e&&e.kind===`token`}function Ko(e){return Wo(e)||Go(e)}function qo(e){return`type`in e&&e.type===`line-info`}function Jo(e){return`kind`in e&&e.kind===`merge-conflict-action`}function Yo(e){return e===`current`||e===`incoming`||e===`both`}function Xo(e,t){let n=e?.querySelector(t);return n instanceof HTMLElement?n:void 0}function Zo(e){let t=[],n=e;for(;n!=null;)t.push(n),n=n.parentNode;return t}function Qo(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 $o(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 es(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 ts(e){return e!=null&&typeof e.elementFromPoint==`function`}function ns(e,t){return e===t||yr(e??void 0,t??void 0)}function rs(e,t){return e?.highlightSide===t.highlightSide&&e?.lineNumberOnly===t.lineNumberOnly&&ns(e?.range??null,t.range)}function is(e,t){switch(e){case`change-deletion`:return`deletions`;case`change-addition`:return`additions`;default:return t.hasAttribute(`data-deletions`)?`deletions`:`additions`}}function as(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 os(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 ss=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),us(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`?ps(t):ms(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:cs(n.codeInlineSize),r=n.numberInlineSize==null?t.numberWidth:ls(n.numberInlineSize),i=e!==t.codeWidth,a=r!==t.numberWidth;!i&&!a||(t.codeWidth=e,t.numberWidth=r,t.applyColumnVariables&&ds(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 cs(e){let t=Math.max(Math.floor(e),0);return t===0?`auto`:t}function ls(e){return Math.max(Math.ceil(e),0)}function us(e,t){e.applyColumnVariables!==t&&(e.applyColumnVariables=t,t?ds(e,{codeWidthChanged:!0,numberWidthChanged:!0}):fs(e))}function ds(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 fs(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 ps(e){e.codeElement.isConnected&&fs(e)}function ms(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 hs=new Map,gs=new Map,_s=new Map,vs=new Set;function ys(e){for(let t of Array.isArray(e)?e:[e])if(t!==`text`&&t!==`ansi`&&!vs.has(t))return!1;return!0}function bs(e,t){e=Array.isArray(e)?e:[e];for(let n of e){if(vs.has(n.name))continue;let e=hs.get(n.name);e??(e=n,hs.set(n.name,e)),vs.add(e.name),t.loadLanguageSync(e.data)}}function xs(){return typeof WorkerGlobalScope<`u`&&typeof self<`u`&&self instanceof WorkerGlobalScope}var Ss=Object.defineProperty,Cs=Object.getOwnPropertyDescriptor,ws=Object.getOwnPropertyNames,Ts=Object.prototype.hasOwnProperty,Es=(e,t)=>{let n={};for(var r in e)Ss(n,r,{get:e[r],enumerable:!0});return t||Ss(n,Symbol.toStringTag,{value:`Module`}),n},Ds=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=ws(t),a=0,o=i.length,s;a<o;a++)s=i[a],!Ts.call(e,s)&&s!==n&&Ss(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=Cs(t,s))||r.enumerable});return e},Os=(e,t,n)=>(Ds(e,t,`default`),n&&Ds(n,t,`default`)),ks=[{id:`abap`,name:`ABAP`,import:(()=>j(()=>import(`./_CLvhMVsD.js`),[]))},{id:`actionscript-3`,name:`ActionScript`,aliases:[`actionscript`,`as3`],import:(()=>j(()=>import(`./_Cs6JJXT5.js`),[]))},{id:`ada`,name:`Ada`,import:(()=>j(()=>import(`./_C5qYipkI.js`),[]))},{id:`ahk`,name:`AutoHotkey`,aliases:[`ahk1`],import:(()=>j(()=>import(`./_CA9gdOdF.js`),[]))},{id:`ahk2`,name:`AutoHotkey2`,import:(()=>j(()=>import(`./__6rzW9BS.js`),[]))},{id:`angular-html`,name:`Angular HTML`,import:(()=>j(()=>import(`./_C0APEMM8.js`).then(e=>e.n),__vite__mapDeps([0,1,2,3])))},{id:`angular-ts`,name:`Angular TypeScript`,import:(()=>j(()=>import(`./_DJ2UU6Tq.js`),__vite__mapDeps([4,0,1,2,3,5])))},{id:`apache`,name:`Apache Conf`,import:(()=>j(()=>import(`./_U0d_L8uA.js`),[]))},{id:`apex`,name:`Apex`,import:(()=>j(()=>import(`./_KFGFyKwG.js`),[]))},{id:`apl`,name:`APL`,import:(()=>j(()=>import(`./_CLJysxj2.js`),__vite__mapDeps([6,2,3,1,7,8,9])))},{id:`applescript`,name:`AppleScript`,import:(()=>j(()=>import(`./_CCn79oCD.js`),[]))},{id:`ara`,name:`Ara`,import:(()=>j(()=>import(`./_4CJ0cIlV.js`),[]))},{id:`asciidoc`,name:`AsciiDoc`,aliases:[`adoc`],import:(()=>j(()=>import(`./_SCjQUq34.js`),[]))},{id:`asm`,name:`Assembly`,import:(()=>j(()=>import(`./_Cmm7eHzH2.js`),[]))},{id:`astro`,name:`Astro`,import:(()=>j(()=>import(`./_DhOYufO92.js`),__vite__mapDeps([10,2,3,9,11,12,13])))},{id:`awk`,name:`AWK`,import:(()=>j(()=>import(`./_BWXHIvNe2.js`),[]))},{id:`ballerina`,name:`Ballerina`,import:(()=>j(()=>import(`./_B7ZEbQpA2.js`),[]))},{id:`bat`,name:`Batch File`,aliases:[`batch`,`cmd`],import:(()=>j(()=>import(`./_qdxAdBWQ2.js`),[]))},{id:`beancount`,name:`Beancount`,import:(()=>j(()=>import(`./_D-usSTwE2.js`),[]))},{id:`berry`,name:`Berry`,aliases:[`be`],import:(()=>j(()=>import(`./_DKpUyyne2.js`),[]))},{id:`bibtex`,name:`BibTeX`,import:(()=>j(()=>import(`./_Ci_nEsc72.js`),[]))},{id:`bicep`,name:`Bicep`,import:(()=>j(()=>import(`./_CUHmPFLl2.js`),[]))},{id:`bird2`,name:`BIRD2 Configuration`,aliases:[`bird`],import:(()=>j(()=>import(`./_CYIUgYqB2.js`),[]))},{id:`blade`,name:`Blade`,import:(()=>j(()=>import(`./_DXOxxxFa2.js`),__vite__mapDeps([14,2,3,1,7,8,9,15,16])))},{id:`bsl`,name:`1C (Enterprise)`,aliases:[`1c`],import:(()=>j(()=>import(`./_CpYNKFv52.js`),__vite__mapDeps([17,18])))},{id:`c`,name:`C`,import:(()=>j(()=>import(`./_DbVqh6Th2.js`).then(e=>e.n),[]))},{id:`c3`,name:`C3`,import:(()=>j(()=>import(`./_D0apG41V2.js`),[]))},{id:`cadence`,name:`Cadence`,aliases:[`cdc`],import:(()=>j(()=>import(`./_CQ2zXKGN2.js`),[]))},{id:`cairo`,name:`Cairo`,import:(()=>j(()=>import(`./_kIpfj7zU2.js`),__vite__mapDeps([19,20])))},{id:`chapel`,name:`Chapel`,aliases:[`chpl`],import:(()=>j(()=>import(`./_CHi0915U2.js`),__vite__mapDeps([21,22])))},{id:`clarity`,name:`Clarity`,import:(()=>j(()=>import(`./_CtfBBspg2.js`),[]))},{id:`clojure`,name:`Clojure`,aliases:[`clj`],import:(()=>j(()=>import(`./_DqKBuwfJ2.js`),[]))},{id:`cmake`,name:`CMake`,import:(()=>j(()=>import(`./_Bj61d0ZC.js`),[]))},{id:`cobol`,name:`COBOL`,import:(()=>j(()=>import(`./_YSBx8SDL.js`),__vite__mapDeps([23,1,2,3,8])))},{id:`codeowners`,name:`CODEOWNERS`,import:(()=>j(()=>import(`./_C8r90Shi.js`),[]))},{id:`codeql`,name:`CodeQL`,aliases:[`ql`],import:(()=>j(()=>import(`./_oeQT6MSM.js`),[]))},{id:`coffee`,name:`CoffeeScript`,aliases:[`coffeescript`],import:(()=>j(()=>import(`./_CZrYSTD2.js`),__vite__mapDeps([24,2])))},{id:`common-lisp`,name:`Common Lisp`,aliases:[`lisp`],import:(()=>j(()=>import(`./_Cv5bFMCO.js`),[]))},{id:`coq`,name:`Rocq`,import:(()=>j(()=>import(`./_DuBRPxYg.js`),[]))},{id:`cpp`,name:`C++`,aliases:[`c++`],import:(()=>j(()=>import(`./_C0KKmjwL.js`).then(e=>e.n),__vite__mapDeps([25,26,27,22])))},{id:`crystal`,name:`Crystal`,import:(()=>j(()=>import(`./_BiN-p3Mm.js`),__vite__mapDeps([28,2,3,1,16,22,29])))},{id:`csharp`,name:`C#`,aliases:[`c#`,`cs`],import:(()=>j(()=>import(`./_oqKa8noW.js`),[]))},{id:`css`,name:`CSS`,import:(()=>j(()=>import(`./_Cz-F5n3k.js`).then(e=>e.n),[]))},{id:`csv`,name:`CSV`,import:(()=>j(()=>import(`./_Dx-8-gkx.js`),[]))},{id:`cue`,name:`CUE`,import:(()=>j(()=>import(`./_CE9AQfxI.js`),[]))},{id:`cypher`,name:`Cypher`,aliases:[`cql`],import:(()=>j(()=>import(`./_ClKdZ_lG.js`),[]))},{id:`d`,name:`D`,import:(()=>j(()=>import(`./_qD-0Kul2.js`),[]))},{id:`dart`,name:`Dart`,import:(()=>j(()=>import(`./_CnvKMtbv.js`),[]))},{id:`dax`,name:`DAX`,import:(()=>j(()=>import(`./_BkyTk9wS.js`),[]))},{id:`desktop`,name:`Desktop`,import:(()=>j(()=>import(`./_Dlh5hvp9.js`),[]))},{id:`diff`,name:`Diff`,import:(()=>j(()=>import(`./_woXpYk--.js`),[]))},{id:`docker`,name:`Dockerfile`,aliases:[`dockerfile`],import:(()=>j(()=>import(`./_IyjqRm3v.js`),[]))},{id:`dotenv`,name:`dotEnv`,import:(()=>j(()=>import(`./__5a1GRtc.js`),[]))},{id:`dream-maker`,name:`Dream Maker`,import:(()=>j(()=>import(`./_DW3nJb8Q.js`),[]))},{id:`edge`,name:`Edge`,import:(()=>j(()=>import(`./_BH11gEoi.js`),__vite__mapDeps([30,1,2,3,11,15])))},{id:`elixir`,name:`Elixir`,import:(()=>j(()=>import(`./_dj-y3boC.js`),__vite__mapDeps([31,1,2,3])))},{id:`elm`,name:`Elm`,import:(()=>j(()=>import(`./_Cgsoq1kD.js`),__vite__mapDeps([32,27,22])))},{id:`emacs-lisp`,name:`Emacs Lisp`,aliases:[`elisp`],import:(()=>j(()=>import(`./_c_oH4hRZ.js`),[]))},{id:`erb`,name:`ERB`,import:(()=>j(()=>import(`./_CllJAI4M.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:(()=>j(()=>import(`./_BaHq4SXp.js`),__vite__mapDeps([40,41])))},{id:`fennel`,name:`Fennel`,import:(()=>j(()=>import(`./_DQxkIbk2.js`),[]))},{id:`fish`,name:`Fish`,import:(()=>j(()=>import(`./_BJitypiv2.js`),[]))},{id:`fluent`,name:`Fluent`,aliases:[`ftl`],import:(()=>j(()=>import(`./_C03EYrpw2.js`),[]))},{id:`fortran-fixed-form`,name:`Fortran (Fixed Form)`,aliases:[`f`,`for`,`f77`],import:(()=>j(()=>import(`./_DsKRHcpP2.js`),__vite__mapDeps([42,43])))},{id:`fortran-free-form`,name:`Fortran (Free Form)`,aliases:[`f90`,`f95`,`f03`,`f08`,`f18`],import:(()=>j(()=>import(`./_CYNrtFtB2.js`),[]))},{id:`fsharp`,name:`F#`,aliases:[`f#`,`fs`],import:(()=>j(()=>import(`./_DmIc4jLQ2.js`),__vite__mapDeps([44,41])))},{id:`gdresource`,name:`GDResource`,aliases:[`tscn`,`tres`],import:(()=>j(()=>import(`./_CY8IvGdO2.js`),__vite__mapDeps([45,46,47])))},{id:`gdscript`,name:`GDScript`,aliases:[`gd`],import:(()=>j(()=>import(`./_DYvRD3hg2.js`),[]))},{id:`gdshader`,name:`GDShader`,import:(()=>j(()=>import(`./_CBce3t8t2.js`),[]))},{id:`genie`,name:`Genie`,import:(()=>j(()=>import(`./_CV2tkWYe2.js`),[]))},{id:`gherkin`,name:`Gherkin`,import:(()=>j(()=>import(`./_DExj1W_82.js`),[]))},{id:`git-commit`,name:`Git Commit Message`,import:(()=>j(()=>import(`./_Dl-2e7rI2.js`),__vite__mapDeps([48,49])))},{id:`git-rebase`,name:`Git Rebase Message`,import:(()=>j(()=>import(`./_OoofsdUJ2.js`),__vite__mapDeps([50,29])))},{id:`gleam`,name:`Gleam`,import:(()=>j(()=>import(`./_CSRkHgEL2.js`),[]))},{id:`glimmer-js`,name:`Glimmer JS`,aliases:[`gjs`],import:(()=>j(()=>import(`./_BcLYjRvj2.js`),__vite__mapDeps([51,2,3,1,11])))},{id:`glimmer-ts`,name:`Glimmer TS`,aliases:[`gts`],import:(()=>j(()=>import(`./_HkYUHfHw2.js`),__vite__mapDeps([52,2,3,1,11])))},{id:`glsl`,name:`GLSL`,import:(()=>j(()=>import(`./_DdRslm62.js`).then(e=>e.n),__vite__mapDeps([27,22])))},{id:`gn`,name:`GN`,import:(()=>j(()=>import(`./_ilITqXS62.js`),[]))},{id:`gnuplot`,name:`Gnuplot`,import:(()=>j(()=>import(`./_7GGW24-e2.js`),[]))},{id:`go`,name:`Go`,import:(()=>j(()=>import(`./_rLFTqkRN2.js`),[]))},{id:`graphql`,name:`GraphQL`,aliases:[`gql`],import:(()=>j(()=>import(`./_Cz3Q_PBh.js`).then(e=>e.n),__vite__mapDeps([36,2,11,13,37])))},{id:`groovy`,name:`Groovy`,import:(()=>j(()=>import(`./_CacY0gHj2.js`),[]))},{id:`hack`,name:`Hack`,import:(()=>j(()=>import(`./_RhWmjjkn2.js`),__vite__mapDeps([53,1,2,3,16])))},{id:`haml`,name:`Ruby Haml`,import:(()=>j(()=>import(`./_BjvRt40f.js`).then(e=>e.n),__vite__mapDeps([35,2,3])))},{id:`handlebars`,name:`Handlebars`,aliases:[`hbs`],import:(()=>j(()=>import(`./_BxMKrdPQ2.js`),__vite__mapDeps([54,2,3,1,39])))},{id:`haskell`,name:`Haskell`,aliases:[`hs`],import:(()=>j(()=>import(`./_D8IpX4py2.js`),[]))},{id:`haxe`,name:`Haxe`,import:(()=>j(()=>import(`./_C8oCnwJJ2.js`),[]))},{id:`hcl`,name:`HashiCorp HCL`,import:(()=>j(()=>import(`./_Dh228itO2.js`),[]))},{id:`hjson`,name:`Hjson`,import:(()=>j(()=>import(`./_CxZEssPk2.js`),[]))},{id:`hlsl`,name:`HLSL`,import:(()=>j(()=>import(`./_Cvrh5tZx2.js`),[]))},{id:`html`,name:`HTML`,import:(()=>j(()=>import(`./_DfoHvGIL.js`).then(e=>e.n),__vite__mapDeps([1,2,3])))},{id:`html-derivative`,name:`HTML (Derivative)`,import:(()=>j(()=>import(`./_BBwdSVv62.js`),__vite__mapDeps([15,1,2,3])))},{id:`http`,name:`HTTP`,import:(()=>j(()=>import(`./_DDtWgMTb.js`),__vite__mapDeps([55,7,8,9,29,36,2,11,13,37])))},{id:`hurl`,name:`Hurl`,import:(()=>j(()=>import(`./_Cbc0eAHQ.js`),__vite__mapDeps([56,7,8,57,36,2,11,13,37])))},{id:`hxml`,name:`HXML`,import:(()=>j(()=>import(`./_DLbMbJfH.js`),__vite__mapDeps([58,59])))},{id:`hy`,name:`Hy`,import:(()=>j(()=>import(`./_CZbG8q4J.js`),[]))},{id:`imba`,name:`Imba`,import:(()=>j(()=>import(`./_DsUTQ-LC.js`),[]))},{id:`ini`,name:`INI`,aliases:[`properties`],import:(()=>j(()=>import(`./_B5eOa1yu.js`),[]))},{id:`java`,name:`Java`,import:(()=>j(()=>import(`./_BluAgQCN.js`).then(e=>e.n),[]))},{id:`javascript`,name:`JavaScript`,aliases:[`js`,`cjs`,`mjs`],import:(()=>j(()=>import(`./_CABMXi3p.js`).then(e=>e.n),[]))},{id:`jinja`,name:`Jinja`,import:(()=>j(()=>import(`./_DYSQKsfU.js`),__vite__mapDeps([60,1,2,3])))},{id:`jison`,name:`Jison`,import:(()=>j(()=>import(`./_ZwWSSMOB.js`),__vite__mapDeps([61,2])))},{id:`json`,name:`JSON`,import:(()=>j(()=>import(`./_BeZxh-mm.js`).then(e=>e.n),[]))},{id:`json5`,name:`JSON5`,import:(()=>j(()=>import(`./_BR5RXkoi.js`),[]))},{id:`jsonc`,name:`JSON with Comments`,import:(()=>j(()=>import(`./_CYpm1nAK.js`),[]))},{id:`jsonl`,name:`JSON Lines`,import:(()=>j(()=>import(`./_CmCQp5Yx.js`),[]))},{id:`jsonnet`,name:`Jsonnet`,import:(()=>j(()=>import(`./_CJTPZ8u_.js`),[]))},{id:`jssm`,name:`JSSM`,aliases:[`fsl`],import:(()=>j(()=>import(`./_DXw9l8Rf.js`),[]))},{id:`jsx`,name:`JSX`,import:(()=>j(()=>import(`./_4r616vef.js`).then(e=>e.n),[]))},{id:`julia`,name:`Julia`,aliases:[`jl`],import:(()=>j(()=>import(`./_ChjLT4BW.js`),__vite__mapDeps([62,2,16,20,25,26,27,22,63])))},{id:`just`,name:`Just`,aliases:[`justfile`],import:(()=>j(()=>import(`./_CgNZ23K4.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:(()=>j(()=>import(`./_CsD5j6eV.js`),[]))},{id:`kotlin`,name:`Kotlin`,aliases:[`kt`,`kts`],import:(()=>j(()=>import(`./_DhhofPvG.js`),[]))},{id:`kusto`,name:`Kusto`,aliases:[`kql`],import:(()=>j(()=>import(`./_C7mF5XQf.js`),[]))},{id:`latex`,name:`LaTeX`,import:(()=>j(()=>import(`./_CujUTIm_.js`),__vite__mapDeps([66,67,63])))},{id:`lean`,name:`Lean 4`,aliases:[`lean4`],import:(()=>j(()=>import(`./_CewbzKMR.js`),[]))},{id:`less`,name:`Less`,import:(()=>j(()=>import(`./_DVTAwKKz.js`),[]))},{id:`liquid`,name:`Liquid`,import:(()=>j(()=>import(`./_CAJL1j7c.js`),__vite__mapDeps([68,2,3,1,9])))},{id:`llvm`,name:`LLVM IR`,import:(()=>j(()=>import(`./_DqHOMS-s.js`),[]))},{id:`log`,name:`Log file`,import:(()=>j(()=>import(`./_BNLmms1o.js`),[]))},{id:`logo`,name:`Logo`,import:(()=>j(()=>import(`./_Cluzi2Zq.js`),[]))},{id:`lua`,name:`Lua`,import:(()=>j(()=>import(`./_DELEyvLh.js`).then(e=>e.n),__vite__mapDeps([38,22])))},{id:`luau`,name:`Luau`,import:(()=>j(()=>import(`./_C2pBCSgt.js`),[]))},{id:`make`,name:`Makefile`,aliases:[`makefile`],import:(()=>j(()=>import(`./_Dixweg8N.js`),[]))},{id:`markdown`,name:`Markdown`,aliases:[`md`],import:(()=>j(()=>import(`./_BYOwaDjH.js`),[]))},{id:`marko`,name:`Marko`,import:(()=>j(()=>import(`./_CVxl2RPD.js`),__vite__mapDeps([69,3,5,11,70])))},{id:`matlab`,name:`MATLAB`,import:(()=>j(()=>import(`./_D7qyCx1q.js`),[]))},{id:`mdc`,name:`MDC`,import:(()=>j(()=>import(`./_CDgWUXzI.js`),__vite__mapDeps([71,15,1,2,3,39,41])))},{id:`mdx`,name:`MDX`,import:(()=>j(()=>import(`./_DQZ5AkYe.js`),[]))},{id:`mermaid`,name:`Mermaid`,aliases:[`mmd`],import:(()=>j(()=>import(`./_BxpfTIzt.js`),[]))},{id:`mipsasm`,name:`MIPS Assembly`,aliases:[`mips`],import:(()=>j(()=>import(`./_BMqwQI7S.js`),[]))},{id:`mojo`,name:`Mojo`,import:(()=>j(()=>import(`./_CFuIV2fl.js`),[]))},{id:`moonbit`,name:`MoonBit`,aliases:[`mbt`,`mbti`],import:(()=>j(()=>import(`./_DgjMoLWr.js`),[]))},{id:`move`,name:`Move`,import:(()=>j(()=>import(`./_BYnGhZoM2.js`),[]))},{id:`narrat`,name:`Narrat Language`,aliases:[`nar`],import:(()=>j(()=>import(`./__X_XdTYD2.js`),[]))},{id:`nextflow`,name:`Nextflow`,aliases:[`nf`],import:(()=>j(()=>import(`./_DY5hwH4S2.js`),__vite__mapDeps([72,73])))},{id:`nextflow-groovy`,name:`Nextflow Groovy`,import:(()=>j(()=>import(`./_DJMQeKeT2.js`),[]))},{id:`nginx`,name:`Nginx`,import:(()=>j(()=>import(`./_Dxrzn7gD2.js`),__vite__mapDeps([74,38,22])))},{id:`nim`,name:`Nim`,import:(()=>j(()=>import(`./_C_R8yF5L2.js`),__vite__mapDeps([75,2,3,1,7,8,22,27,41])))},{id:`nix`,name:`Nix`,import:(()=>j(()=>import(`./_IvuFDN5E2.js`),[]))},{id:`nsis`,name:`NSIS`,import:(()=>j(()=>import(`./_CjNLYCLg2.js`),[]))},{id:`nushell`,name:`nushell`,aliases:[`nu`],import:(()=>j(()=>import(`./_DHYfO66s2.js`),[]))},{id:`objective-c`,name:`Objective-C`,aliases:[`objc`],import:(()=>j(()=>import(`./_D1A_Heim2.js`),[]))},{id:`objective-cpp`,name:`Objective-C++`,import:(()=>j(()=>import(`./_BsSzOQcm2.js`),[]))},{id:`ocaml`,name:`OCaml`,import:(()=>j(()=>import(`./_O90oeIOV2.js`),[]))},{id:`odin`,name:`Odin`,import:(()=>j(()=>import(`./_B1RWQWA52.js`),[]))},{id:`openscad`,name:`OpenSCAD`,aliases:[`scad`],import:(()=>j(()=>import(`./_BUDT5pXO2.js`),[]))},{id:`org`,name:`Org Markup`,import:(()=>j(()=>import(`./_CKbWnV5d2.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:(()=>j(()=>import(`./_4ZHwLPI52.js`),[]))},{id:`perl`,name:`Perl`,import:(()=>j(()=>import(`./__YTl1JhJ.js`),__vite__mapDeps([65,2,3,1,7,8,16])))},{id:`php`,name:`PHP`,import:(()=>j(()=>import(`./_B8NXfLLc2.js`),__vite__mapDeps([87,2,3,1,7,8,9,16])))},{id:`pkl`,name:`Pkl`,import:(()=>j(()=>import(`./_ot-7Btpt2.js`),[]))},{id:`plsql`,name:`PL/SQL`,import:(()=>j(()=>import(`./_DGHpHOYJ2.js`),[]))},{id:`po`,name:`Gettext PO`,aliases:[`pot`,`potx`],import:(()=>j(()=>import(`./_BiJDBrnU2.js`),[]))},{id:`polar`,name:`Polar`,import:(()=>j(()=>import(`./_C7UOKdEL.js`),[]))},{id:`postcss`,name:`PostCSS`,import:(()=>j(()=>import(`./_BXeXVLqQ2.js`),[]))},{id:`powerquery`,name:`PowerQuery`,import:(()=>j(()=>import(`./_DNMTfnFr.js`),[]))},{id:`powershell`,name:`PowerShell`,aliases:[`ps`,`ps1`,`pwsh`],import:(()=>j(()=>import(`./_CCSX75yM.js`),[]))},{id:`prisma`,name:`Prisma`,import:(()=>j(()=>import(`./_DMgNhnYS.js`),[]))},{id:`prolog`,name:`Prolog`,import:(()=>j(()=>import(`./_iXnhIJG7.js`),[]))},{id:`proto`,name:`Protocol Buffer 3`,aliases:[`protobuf`],import:(()=>j(()=>import(`./_DB4EqR-F.js`),[]))},{id:`pug`,name:`Pug`,aliases:[`jade`],import:(()=>j(()=>import(`./_DBXFxML6.js`),__vite__mapDeps([94,2,3,1])))},{id:`puppet`,name:`Puppet`,import:(()=>j(()=>import(`./_CDv2pdJW.js`),[]))},{id:`purescript`,name:`PureScript`,import:(()=>j(()=>import(`./_9MfHhQsQ.js`),[]))},{id:`python`,name:`Python`,aliases:[`py`],import:(()=>j(()=>import(`./_gzcpVVnB2.js`),[]))},{id:`qml`,name:`QML`,import:(()=>j(()=>import(`./_gSF-kG0H.js`),__vite__mapDeps([95,2])))},{id:`qmldir`,name:`QML Directory`,import:(()=>j(()=>import(`./_DCQb3MpD.js`),[]))},{id:`qss`,name:`Qt Style Sheets`,import:(()=>j(()=>import(`./_Fe1Jh2GI.js`),[]))},{id:`r`,name:`R`,import:(()=>j(()=>import(`./_AETv3BSd.js`).then(e=>e.n),[]))},{id:`racket`,name:`Racket`,import:(()=>j(()=>import(`./_DcIDlBhZ.js`),[]))},{id:`raku`,name:`Raku`,aliases:[`perl6`],import:(()=>j(()=>import(`./_B3gFvitq2.js`),[]))},{id:`razor`,name:`ASP.NET Razor`,import:(()=>j(()=>import(`./_Dqt_SamS.js`),__vite__mapDeps([96,1,2,3,78])))},{id:`rbs`,name:`RBS`,aliases:[`ruby-signature`],import:(()=>j(()=>import(`./_C0MpOrj4.js`),[]))},{id:`reg`,name:`Windows Registry Script`,import:(()=>j(()=>import(`./_CRGYupPL.js`),[]))},{id:`regexp`,name:`RegExp`,aliases:[`regex`],import:(()=>j(()=>import(`./_CTXtNwcB.js`).then(e=>e.n),[]))},{id:`rel`,name:`Rel`,import:(()=>j(()=>import(`./_BtDbiS_P.js`),[]))},{id:`riscv`,name:`RISC-V`,import:(()=>j(()=>import(`./_Ckw8ddFX.js`),[]))},{id:`ron`,name:`RON`,import:(()=>j(()=>import(`./_VUp2lXgN.js`),[]))},{id:`rosmsg`,name:`ROS Interface`,import:(()=>j(()=>import(`./_CAekHB0j.js`),[]))},{id:`rst`,name:`reStructuredText`,import:(()=>j(()=>import(`./_Yu4fyCcu.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:(()=>j(()=>import(`./_ctD402GZ.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:(()=>j(()=>import(`./_Cfkwpbl82.js`),[]))},{id:`sas`,name:`SAS`,import:(()=>j(()=>import(`./_Dyl0CkEc.js`),__vite__mapDeps([99,16])))},{id:`sass`,name:`Sass`,import:(()=>j(()=>import(`./_DXrisJhu.js`),[]))},{id:`scala`,name:`Scala`,import:(()=>j(()=>import(`./_BiFt_7mu2.js`),[]))},{id:`scheme`,name:`Scheme`,import:(()=>j(()=>import(`./_DQCgrYNe.js`),[]))},{id:`scss`,name:`SCSS`,import:(()=>j(()=>import(`./_CxvJdv0j.js`).then(e=>e.n),__vite__mapDeps([5,3])))},{id:`sdbl`,name:`1C (Query)`,aliases:[`1c-query`],import:(()=>j(()=>import(`./_bTVj8UrX2.js`),[]))},{id:`shaderlab`,name:`ShaderLab`,aliases:[`shader`],import:(()=>j(()=>import(`./_BM315xPC.js`),__vite__mapDeps([100,101])))},{id:`shellscript`,name:`Shell`,aliases:[`bash`,`sh`,`shell`,`zsh`],import:(()=>j(()=>import(`./_-y9IcHi0.js`).then(e=>e.n),[]))},{id:`shellsession`,name:`Shell Session`,aliases:[`console`],import:(()=>j(()=>import(`./_CF1RpvOn.js`),__vite__mapDeps([102,29])))},{id:`smalltalk`,name:`GNU Smalltalk`,import:(()=>j(()=>import(`./_BHpQb5nM.js`),[]))},{id:`smithy`,name:`Smithy`,import:(()=>j(()=>import(`./_Dgaz7aur.js`),[]))},{id:`solidity`,name:`Solidity`,import:(()=>j(()=>import(`./_Bj7E1mRn.js`),[]))},{id:`soy`,name:`Closure Templates`,aliases:[`closure-templates`],import:(()=>j(()=>import(`./_x5nTH0On.js`),__vite__mapDeps([103,1,2,3])))},{id:`sparql`,name:`SPARQL`,import:(()=>j(()=>import(`./_L8AbGenz.js`),__vite__mapDeps([104,105])))},{id:`splunk`,name:`Splunk Query Language`,aliases:[`spl`],import:(()=>j(()=>import(`./_BC2Px7Mm.js`),[]))},{id:`sql`,name:`SQL`,import:(()=>j(()=>import(`./_DVU0fIS52.js`).then(e=>e.n),[]))},{id:`ssh-config`,name:`SSH Config`,import:(()=>j(()=>import(`./_BgfXC-Er.js`),[]))},{id:`stata`,name:`Stata`,import:(()=>j(()=>import(`./_KcAMZi58.js`),__vite__mapDeps([106,16])))},{id:`stylus`,name:`Stylus`,aliases:[`styl`],import:(()=>j(()=>import(`./_B6D30XZt.js`),[]))},{id:`surrealql`,name:`SurrealQL`,aliases:[`surql`],import:(()=>j(()=>import(`./_CXr3yXer.js`),__vite__mapDeps([107,2])))},{id:`svelte`,name:`Svelte`,import:(()=>j(()=>import(`./_C5w6NPXI.js`),__vite__mapDeps([108,2,3,11,12])))},{id:`swift`,name:`Swift`,import:(()=>j(()=>import(`./_CyEgAFGc2.js`),[]))},{id:`system-verilog`,name:`SystemVerilog`,import:(()=>j(()=>import(`./_Dh5ihWbf2.js`),[]))},{id:`systemd`,name:`Systemd Units`,import:(()=>j(()=>import(`./_BxMlprV52.js`),[]))},{id:`talonscript`,name:`TalonScript`,aliases:[`talon`],import:(()=>j(()=>import(`./_CohzipZa2.js`),[]))},{id:`tasl`,name:`Tasl`,import:(()=>j(()=>import(`./_DMoTqEGO2.js`),[]))},{id:`tcl`,name:`Tcl`,import:(()=>j(()=>import(`./_CZd0xW_V2.js`),[]))},{id:`templ`,name:`Templ`,import:(()=>j(()=>import(`./_BQOcxkC52.js`),__vite__mapDeps([109,2,3,81])))},{id:`terraform`,name:`Terraform`,aliases:[`tf`,`tfvars`],import:(()=>j(()=>import(`./_DswuEJGm2.js`),[]))},{id:`tex`,name:`TeX`,import:(()=>j(()=>import(`./_C6KJHYnD.js`).then(e=>e.n),__vite__mapDeps([67,63])))},{id:`toml`,name:`TOML`,import:(()=>j(()=>import(`./_CcmNWLt02.js`),[]))},{id:`ts-tags`,name:`TypeScript with Tags`,aliases:[`lit`],import:(()=>j(()=>import(`./_COj2A5or2.js`),__vite__mapDeps([110,2,3,1,7,8,11,16,27,22])))},{id:`tsv`,name:`TSV`,import:(()=>j(()=>import(`./_sltzmVWM2.js`),[]))},{id:`tsx`,name:`TSX`,import:(()=>j(()=>import(`./_lsWZ-d9b2.js`).then(e=>e.n),[]))},{id:`turtle`,name:`Turtle`,import:(()=>j(()=>import(`./_ByJddavk.js`),[]))},{id:`twig`,name:`Twig`,import:(()=>j(()=>import(`./_BZIMrsDn2.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:(()=>j(()=>import(`./_TmpPKG1G2.js`).then(e=>e.n),[]))},{id:`typespec`,name:`TypeSpec`,aliases:[`tsp`],import:(()=>j(()=>import(`./_BRdr0IET2.js`),[]))},{id:`typst`,name:`Typst`,aliases:[`typ`],import:(()=>j(()=>import(`./_DI99ib-x2.js`),[]))},{id:`v`,name:`V`,import:(()=>j(()=>import(`./_DBj4K9d_2.js`),[]))},{id:`vala`,name:`Vala`,import:(()=>j(()=>import(`./_zf12oZj62.js`),[]))},{id:`vb`,name:`Visual Basic`,import:(()=>j(()=>import(`./_DOwzaHZ02.js`),[]))},{id:`verilog`,name:`Verilog`,import:(()=>j(()=>import(`./_B2gwz-sJ2.js`),[]))},{id:`vhdl`,name:`VHDL`,import:(()=>j(()=>import(`./_BroJfC0k2.js`),[]))},{id:`viml`,name:`Vim Script`,aliases:[`vim`,`vimscript`],import:(()=>j(()=>import(`./_DvXPmvsu2.js`),[]))},{id:`vue`,name:`Vue`,import:(()=>j(()=>import(`./_CaTMj4Ey2.js`),__vite__mapDeps([112,2,3,1,9,11,15])))},{id:`vue-html`,name:`Vue HTML`,import:(()=>j(()=>import(`./_Bsgj4mnQ2.js`),__vite__mapDeps([113,2])))},{id:`vue-vine`,name:`Vue Vine`,import:(()=>j(()=>import(`./_Bqnfd5-l2.js`),__vite__mapDeps([114,2,3,5,12,70,115])))},{id:`vyper`,name:`Vyper`,aliases:[`vy`],import:(()=>j(()=>import(`./_CgoNMtux2.js`),[]))},{id:`wasm`,name:`WebAssembly`,import:(()=>j(()=>import(`./_ByWQv1Qj2.js`),[]))},{id:`wenyan`,name:`Wenyan`,aliases:[`文言`],import:(()=>j(()=>import(`./_C8pVoKbM2.js`),[]))},{id:`wgsl`,name:`WGSL`,import:(()=>j(()=>import(`./_BsKzXJz42.js`),[]))},{id:`wikitext`,name:`Wikitext`,aliases:[`mediawiki`,`wiki`],import:(()=>j(()=>import(`./_ClFFjSW2.js`),[]))},{id:`wit`,name:`WebAssembly Interface Types`,import:(()=>j(()=>import(`./_DdvCle-K.js`),[]))},{id:`wolfram`,name:`Wolfram`,aliases:[`wl`],import:(()=>j(()=>import(`./_DLL8P-h_.js`),[]))},{id:`xml`,name:`XML`,import:(()=>j(()=>import(`./_DHDATJPn.js`).then(e=>e.n),__vite__mapDeps([7,8])))},{id:`xsl`,name:`XSL`,import:(()=>j(()=>import(`./_DZ2ozFyE2.js`),__vite__mapDeps([93,7,8])))},{id:`yaml`,name:`YAML`,aliases:[`yml`],import:(()=>j(()=>import(`./_VZNpIoO_.js`).then(e=>e.n),[]))},{id:`zenscript`,name:`ZenScript`,import:(()=>j(()=>import(`./_BnlCZFoB.js`),[]))},{id:`zig`,name:`Zig`,import:(()=>j(()=>import(`./_CMLA9XwU2.js`),[]))}],As=Object.fromEntries(ks.map(e=>[e.id,e.import])),js=Object.fromEntries(ks.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),Ms={...As,...js},Ns=Object.fromEntries([{id:`andromeeda`,displayName:`Andromeeda`,type:`dark`,import:(()=>j(()=>import(`./_vGVdxbeo.js`),[]))},{id:`aurora-x`,displayName:`Aurora X`,type:`dark`,import:(()=>j(()=>import(`./_CDeNXAV0.js`),[]))},{id:`ayu-dark`,displayName:`Ayu Dark`,type:`dark`,import:(()=>j(()=>import(`./_DluEY0Gj.js`),[]))},{id:`ayu-light`,displayName:`Ayu Light`,type:`light`,import:(()=>j(()=>import(`./_C3h-C4tm.js`),[]))},{id:`ayu-mirage`,displayName:`Ayu Mirage`,type:`dark`,import:(()=>j(()=>import(`./_Bqwy1Gya.js`),[]))},{id:`catppuccin-frappe`,displayName:`Catppuccin Frappé`,type:`dark`,import:(()=>j(()=>import(`./_C9Q5zVZY.js`),[]))},{id:`catppuccin-latte`,displayName:`Catppuccin Latte`,type:`light`,import:(()=>j(()=>import(`./_CtsyrtPq.js`),[]))},{id:`catppuccin-macchiato`,displayName:`Catppuccin Macchiato`,type:`dark`,import:(()=>j(()=>import(`./_R8nAf1vR.js`),[]))},{id:`catppuccin-mocha`,displayName:`Catppuccin Mocha`,type:`dark`,import:(()=>j(()=>import(`./_DjuaAJKi.js`),[]))},{id:`dark-plus`,displayName:`Dark Plus`,type:`dark`,import:(()=>j(()=>import(`./_Cs2F2srj.js`),[]))},{id:`dracula`,displayName:`Dracula Theme`,type:`dark`,import:(()=>j(()=>import(`./_BHWKrbxM.js`),[]))},{id:`dracula-soft`,displayName:`Dracula Theme Soft`,type:`dark`,import:(()=>j(()=>import(`./_5eyTD99u.js`),[]))},{id:`everforest-dark`,displayName:`Everforest Dark`,type:`dark`,import:(()=>j(()=>import(`./_sB-x3p7T.js`),[]))},{id:`everforest-light`,displayName:`Everforest Light`,type:`light`,import:(()=>j(()=>import(`./_Df2xbC6M.js`),[]))},{id:`github-dark`,displayName:`GitHub Dark`,type:`dark`,import:(()=>j(()=>import(`./_C-LZuMrd.js`),[]))},{id:`github-dark-default`,displayName:`GitHub Dark Default`,type:`dark`,import:(()=>j(()=>import(`./_DXG-b-1a.js`),[]))},{id:`github-dark-dimmed`,displayName:`GitHub Dark Dimmed`,type:`dark`,import:(()=>j(()=>import(`./_Bx1FflLF.js`),[]))},{id:`github-dark-high-contrast`,displayName:`GitHub Dark High Contrast`,type:`dark`,import:(()=>j(()=>import(`./_B_tTalzw.js`),[]))},{id:`github-light`,displayName:`GitHub Light`,type:`light`,import:(()=>j(()=>import(`./_EUqPIrTm.js`),[]))},{id:`github-light-default`,displayName:`GitHub Light Default`,type:`light`,import:(()=>j(()=>import(`./_BXViO-2h.js`),[]))},{id:`github-light-high-contrast`,displayName:`GitHub Light High Contrast`,type:`light`,import:(()=>j(()=>import(`./_B68TUdTA.js`),[]))},{id:`gruvbox-dark-hard`,displayName:`Gruvbox Dark Hard`,type:`dark`,import:(()=>j(()=>import(`./_C820rvS2.js`),[]))},{id:`gruvbox-dark-medium`,displayName:`Gruvbox Dark Medium`,type:`dark`,import:(()=>j(()=>import(`./_BPjhmG05.js`),[]))},{id:`gruvbox-dark-soft`,displayName:`Gruvbox Dark Soft`,type:`dark`,import:(()=>j(()=>import(`./_MrdJrrXF.js`),[]))},{id:`gruvbox-light-hard`,displayName:`Gruvbox Light Hard`,type:`light`,import:(()=>j(()=>import(`./_BC_s9l72.js`),[]))},{id:`gruvbox-light-medium`,displayName:`Gruvbox Light Medium`,type:`light`,import:(()=>j(()=>import(`./_BAWPOn9u.js`),[]))},{id:`gruvbox-light-soft`,displayName:`Gruvbox Light Soft`,type:`light`,import:(()=>j(()=>import(`./_BSMLrYjP.js`),[]))},{id:`horizon`,displayName:`Horizon`,type:`dark`,import:(()=>j(()=>import(`./_CE9ld1lL.js`),[]))},{id:`horizon-bright`,displayName:`Horizon Bright`,type:`light`,import:(()=>j(()=>import(`./_DSNQnXHK.js`),[]))},{id:`houston`,displayName:`Houston`,type:`dark`,import:(()=>j(()=>import(`./_CsvMBhTu.js`),[]))},{id:`kanagawa-dragon`,displayName:`Kanagawa Dragon`,type:`dark`,import:(()=>j(()=>import(`./_Bozd7klA.js`),[]))},{id:`kanagawa-lotus`,displayName:`Kanagawa Lotus`,type:`light`,import:(()=>j(()=>import(`./_BmuOG9ZW.js`),[]))},{id:`kanagawa-wave`,displayName:`Kanagawa Wave`,type:`dark`,import:(()=>j(()=>import(`./_BML5mF2J.js`),[]))},{id:`laserwave`,displayName:`LaserWave`,type:`dark`,import:(()=>j(()=>import(`./_C_8bwKvT.js`),[]))},{id:`light-plus`,displayName:`Light Plus`,type:`light`,import:(()=>j(()=>import(`./_DVQuIRkW2.js`),[]))},{id:`material-theme`,displayName:`Material Theme`,type:`dark`,import:(()=>j(()=>import(`./_Bm3Qr25_2.js`),[]))},{id:`material-theme-darker`,displayName:`Material Theme Darker`,type:`dark`,import:(()=>j(()=>import(`./_2IIEA8gg2.js`),[]))},{id:`material-theme-lighter`,displayName:`Material Theme Lighter`,type:`light`,import:(()=>j(()=>import(`./_uhdI0v042.js`),[]))},{id:`material-theme-ocean`,displayName:`Material Theme Ocean`,type:`dark`,import:(()=>j(()=>import(`./_CHQ94UKr2.js`),[]))},{id:`material-theme-palenight`,displayName:`Material Theme Palenight`,type:`dark`,import:(()=>j(()=>import(`./_B5W6OYN72.js`),[]))},{id:`min-dark`,displayName:`Min Dark`,type:`dark`,import:(()=>j(()=>import(`./_BSWPekZh2.js`),[]))},{id:`min-light`,displayName:`Min Light`,type:`light`,import:(()=>j(()=>import(`./_DDpmG2fV2.js`),[]))},{id:`monokai`,displayName:`Monokai`,type:`dark`,import:(()=>j(()=>import(`./_B_bV9PQ92.js`),[]))},{id:`night-owl`,displayName:`Night Owl`,type:`dark`,import:(()=>j(()=>import(`./_DhmEMT882.js`),[]))},{id:`night-owl-light`,displayName:`Night Owl Light`,type:`light`,import:(()=>j(()=>import(`./_eJ-hLW7d2.js`),[]))},{id:`nord`,displayName:`Nord`,type:`dark`,import:(()=>j(()=>import(`./_Cb4Vim4T2.js`),[]))},{id:`one-dark-pro`,displayName:`One Dark Pro`,type:`dark`,import:(()=>j(()=>import(`./_CLwyXe_n2.js`),[]))},{id:`one-light`,displayName:`One Light`,type:`light`,import:(()=>j(()=>import(`./_D7Lr4KcI2.js`),[]))},{id:`plastic`,displayName:`Plastic`,type:`dark`,import:(()=>j(()=>import(`./_DQwYfKfQ2.js`),[]))},{id:`poimandres`,displayName:`Poimandres`,type:`dark`,import:(()=>j(()=>import(`./_DRFjx7u42.js`),[]))},{id:`red`,displayName:`Red`,type:`dark`,import:(()=>j(()=>import(`./_DX1BQOs82.js`),[]))},{id:`rose-pine`,displayName:`Rosé Pine`,type:`dark`,import:(()=>j(()=>import(`./_aMsaMD1D2.js`),[]))},{id:`rose-pine-dawn`,displayName:`Rosé Pine Dawn`,type:`light`,import:(()=>j(()=>import(`./_8PwUyIlP2.js`),[]))},{id:`rose-pine-moon`,displayName:`Rosé Pine Moon`,type:`dark`,import:(()=>j(()=>import(`./_DO-qXg-I2.js`),[]))},{id:`slack-dark`,displayName:`Slack Dark`,type:`dark`,import:(()=>j(()=>import(`./_DnToyrRv2.js`),[]))},{id:`slack-ochin`,displayName:`Slack Ochin`,type:`light`,import:(()=>j(()=>import(`./_B2OO5cIa2.js`),[]))},{id:`snazzy-light`,displayName:`Snazzy Light`,type:`light`,import:(()=>j(()=>import(`./_4G7pJPwS2.js`),[]))},{id:`solarized-dark`,displayName:`Solarized Dark`,type:`dark`,import:(()=>j(()=>import(`./_UdsmMDCL2.js`),[]))},{id:`solarized-light`,displayName:`Solarized Light`,type:`light`,import:(()=>j(()=>import(`./_C1IUL_tW2.js`),[]))},{id:`synthwave-84`,displayName:`Synthwave '84`,type:`dark`,import:(()=>j(()=>import(`./_nFMaYfgc2.js`),[]))},{id:`tokyo-night`,displayName:`Tokyo Night`,type:`dark`,import:(()=>j(()=>import(`./_oM2G3aXe.js`),[]))},{id:`vesper`,displayName:`Vesper`,type:`dark`,import:(()=>j(()=>import(`./_DdrHHSXu.js`),[]))},{id:`vitesse-black`,displayName:`Vitesse Black`,type:`dark`,import:(()=>j(()=>import(`./_fwtXNY1n.js`),[]))},{id:`vitesse-dark`,displayName:`Vitesse Dark`,type:`dark`,import:(()=>j(()=>import(`./_BZCL-v6S.js`),[]))},{id:`vitesse-light`,displayName:`Vitesse Light`,type:`light`,import:(()=>j(()=>import(`./_VbXTXTou.js`),[]))}].map(e=>[e.id,e.import])),Ps=Et({createOnigurumaEngine:()=>oc,getDefaultWasmLoader:()=>ac,loadWasm:()=>$s,setDefaultWasmLoader:()=>ic}),Fs=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function Is(){return 2147483648}function Ls(){return typeof performance<`u`?performance.now():Date.now()}var Rs=(e,t)=>e+(t-e%t)%t;async function zs(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=Is();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,Rs(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:Ls,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 Bs=Object.defineProperty,Vs=(e,t,n)=>t in e?Bs(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,U=(e,t,n)=>Vs(e,typeof t==`symbol`?t:t+``,n),W=null;function Hs(e){throw new Fs(e.UTF8ToString(e.getLastOnigError()))}var Us=class e{constructor(t){U(this,`utf16Length`),U(this,`utf8Length`),U(this,`utf16Value`),U(this,`utf8Value`),U(this,`utf16OffsetToUtf8`),U(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}},Ws=class e{constructor(t){if(U(this,`id`,++e.LAST_ID),U(this,`_onigBinding`),U(this,`content`),U(this,`utf16Length`),U(this,`utf8Length`),U(this,`utf16OffsetToUtf8`),U(this,`utf8OffsetToUtf16`),U(this,`ptr`),!W)throw new Fs(`Must invoke loadWasm first.`);this._onigBinding=W,this.content=t;let n=new Us(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||=W.omalloc(1e4),e._sharedPtrInUse=!0,W.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString(W)}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)}};U(Ws,`LAST_ID`,0),U(Ws,`_sharedPtr`,0),U(Ws,`_sharedPtrInUse`,!1);var Gs=Ws,Ks=class{constructor(e){if(U(this,`_onigBinding`),U(this,`_ptr`),!W)throw new Fs(`Must invoke loadWasm first.`);let t=[],n=[];for(let r=0,i=e.length;r<i;r++){let i=new Us(e[r]);t[r]=i.createString(W),n[r]=i.utf8Length}let r=W.omalloc(4*e.length);W.HEAPU32.set(t,r/4);let i=W.omalloc(4*e.length);W.HEAPU32.set(n,i/4);let a=W.createOnigScanner(r,i,e.length);for(let n=0,r=e.length;n<r;n++)W.ofree(t[n]);W.ofree(i),W.ofree(r),a===0&&Hs(W),this._onigBinding=W,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 Gs(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 qs(e){return typeof e.instantiator==`function`}function Js(e){return typeof e.default==`function`}function Ys(e){return e.data!==void 0}function Xs(e){return typeof Response<`u`&&e instanceof Response}function Zs(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 Qs;function $s(e){if(Qs)return Qs;async function t(){W=await zs(async t=>{let n=e;return n=await n,typeof n==`function`&&(n=await n(t)),typeof n==`function`&&(n=await n(t)),qs(n)?n=await n.instantiator(t):Js(n)?n=await n.default(t):(Ys(n)&&(n=n.data),Xs(n)?n=typeof WebAssembly.instantiateStreaming==`function`?await tc(n)(t):await nc(n)(t):Zs(n)||n instanceof WebAssembly.Module?n=await ec(n)(t):`default`in n&&n.default instanceof WebAssembly.Module&&(n=await ec(n.default)(t))),`instance`in n&&(n=n.instance),`exports`in n&&(n=n.exports),n})}return Qs=t(),Qs}function ec(e){return t=>WebAssembly.instantiate(e,t)}function tc(e){return t=>WebAssembly.instantiateStreaming(e,t)}function nc(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}var rc;function ic(e){rc=e}function ac(){return rc}async function oc(e){return e&&await $s(e),{createScanner(e){return new Ks(e.map(e=>typeof e==`string`?e:e.source))},createString(e){return new Gs(e)}}}var sc=Es({});Os(sc,Ps);var G=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function cc(e){return lc(e)}function lc(e){return Array.isArray(e)?uc(e):e instanceof RegExp?e:typeof e==`object`?dc(e):e}function uc(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=lc(e[n]);return t}function dc(e){let t={};for(let n in e)t[n]=lc(e[n]);return t}function fc(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function pc(e){let t=~e.lastIndexOf(`/`)||~e.lastIndexOf(`\\`);return t===0?e:~t===e.length-1?pc(e.substring(0,e.length-1)):e.substr(~t+1)}var mc=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,hc=class{static hasCaptures(e){return e!==null&&(mc.lastIndex=0,mc.test(e))}static replaceCaptures(e,t,n){return e.replace(mc,(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 gc(e,t){return e<t?-1:+(e>t)}function _c(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=gc(e[r],t[r]);if(n!==0)return n}return 0}return n-r}function vc(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 yc(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,`\\$&`)}var bc=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}},xc=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(Ec(e),t)}static createFromParsedTheme(e,t){return Oc(e,t)}_cachedMatchRoot=new bc(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=>Cc(e.parent,t.parentScopes));return n?new Tc(n.fontStyle,n.foreground,n.background):null}},Sc=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 Cc(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&&!wc(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function wc(e,t){return t===e||e.startsWith(t)&&e[t.length]===`.`}var Tc=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function Ec(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`&&vc(i.settings.foreground)&&(s=i.settings.foreground);let c=null;typeof i.settings.background==`string`&&vc(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 Dc(l,u,e,o,s,c)}}return n}var Dc=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}},K=(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))(K||{});function Oc(e,t){e.sort((e,t)=>{let n=gc(e.scope,t.scope);return n!==0||(n=_c(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 kc(t),o=new Tc(n,a.getId(r),a.getId(i)),s=new Mc(new jc(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 xc(a,o,s)}var kc=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)}},Ac=Object.freeze([]),jc=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||Ac,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)}},Mc=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(),jc.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(_c(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 jc(e,t,n,r,i))}},Nc=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=Fc(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 Pc(e){return e}function Fc(e){return e}function Ic(e,t){let n=[],r=Rc(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(Lc(i)){let e=[];do e.push(i),i=r.next();while(Lc(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 Lc(e){return!!e&&!!e.match(/[\w\.:]+/)}function Rc(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 zc(e){typeof e.dispose==`function`&&e.dispose()}var Bc=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},Vc=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},Hc=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))}},Uc=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Bc(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new Hc;for(let n of e)Wc(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof Bc){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 Wc(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 Bc?Kc({baseGrammar:a,selfGrammar:i},r):Gc(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 Bc(e))}function Gc(e,t,n){if(t.repository&&t.repository[e]){let r=t.repository[e];qc([r],t,n)}}function Kc(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&qc(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&qc(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function qc(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?fc({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&qc(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let a=$c(i);switch(a.kind){case 0:Kc({...t,selfGrammar:t.baseGrammar},n);break;case 1:Kc(t,n);break;case 2:Gc(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?Gc(a.ruleName,i,n):Kc(i,n)}else a.kind===4?n.add(new Vc(a.scopeName,a.ruleName)):n.add(new Bc(a.scopeName))}}}var Jc=class{kind=0},Yc=class{kind=1},Xc=class{constructor(e){this.ruleName=e}kind=2},Zc=class{constructor(e){this.scopeName=e}kind=3},Qc=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function $c(e){if(e===`$base`)return new Jc;if(e===`$self`)return new Yc;let t=e.indexOf(`#`);return t===-1?new Zc(e):t===0?new Xc(e.substring(1)):new Qc(e.substring(0,t),e.substring(t+1))}var el=/\\(\d+)/,tl=/\\(\d+)/g,nl=-1,rl=-2;function il(e){return e}function al(e){return e}var ol=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=hc.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=hc.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${pc(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:hc.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:hc.replaceCaptures(this._contentName,e,t)}},sl=class extends ol{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!`)}},cl=class extends ol{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new pl(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 ml,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},ll=class extends ol{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 ml,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},ul=class extends ol{_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 pl(i,this.id),this.beginCaptures=a,this._end=new pl(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 ml;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}},dl=class extends ol{_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 pl(i,this.id),this.beginCaptures=a,this.whileCaptures=s,this._while=new pl(o,rl),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 ml;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 ml,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||``),this._cachedCompiledWhilePatterns}},fl=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new sl(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new cl(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(t.begin===void 0){t.repository&&(r=fc({},r,t.repository));let i=t.patterns;return i===void 0&&t.include&&(i=[{include:t.include}]),new ll(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new dl(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 ul(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=$c(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 ll||e instanceof ul||e instanceof dl)&&e.hasMissingPatterns&&e.patterns.length===0&&(t=!0),t)continue;i.push(s)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},pl=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`&&el.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 tl.lastIndex=0,this.source.replace(tl,(e,t)=>yc(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}},ml=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 hl(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 hl(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},hl=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(`
|
|
34
|
+
\f\r "&'<=>\``.split(``)]],single:[[`&'`.split(``),`"&'\``.split(``)],[`\0&'`.split(``),`\0"&'\``.split(``)]],double:[[`"&`.split(``),`"&'\``.split(``)],[`\0"&`.split(``),`\0"&'\``.split(``)]]};function To(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=ma);let l=Eo(r,e.properties),u=r.all(i.space===`html`&&e.tagName===`template`?e.content:e);return r.schema=i,u&&(o=!1),(l||!a||!vo(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||!to(e,t,n))&&s.push(`</`+e.tagName+`>`),s.join(``)}function Eo(e,t){let n=[],r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){let r=Do(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 Do(e,t,n){let r=ua(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=Ra(r.attribute,Object.assign({},e.settings.characterReferences,{subset:wo.name[i][a]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?Ga:Ka)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?c:(e.settings.preferUnquoted&&(s=Ra(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:wo.unquoted[i][a]}))),s!==n&&(e.settings.quoteSmart&&Wa(n,o)>Wa(n,e.alternative)&&(o=e.alternative),s=o+Ra(n,Object.assign({},e.settings.characterReferences,{subset:(o===`'`?wo.single:wo.double)[i][a],attribute:!0}))+o),c+(s&&`=`+s))}var Oo=[`<`,`&`];function ko(e,t,n,r){return n&&n.type===`element`&&(n.tagName===`script`||n.tagName===`style`)?e.value:Ra(e.value,Object.assign({},r.settings.characterReferences,{subset:Oo}))}function Ao(e,t,n,r){return r.settings.allowDangerousHtml?e.value:ko(e,t,n,r)}function jo(e,t,n,r){return r.all(e)}var Mo=ga(`type`,{invalid:No,unknown:Po,handlers:{comment:Ha,doctype:Ua,element:To,raw:Ao,root:jo,text:ko}});function No(e){throw Error("Expected node, not `"+e+"`")}function Po(e){throw Error("Cannot compile unknown node `"+e.type+"`")}var Fo={},Io={},Lo=[];function Ro(e,t){let n=t||Fo,r=n.quote||`"`,i=r===`"`?`'`:`"`;if(r!==`"`&&r!==`'`)throw Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:zo,all:Bo,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||Bi,characterReferences:n.characterReferences||Io,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space===`svg`?ma:pa,quote:r,alternative:i}.one(Array.isArray(e)?{type:`root`,children:e}:e,void 0,void 0)}function zo(e,t,n){return Mo(e,t,n,this)}function Bo(e){let t=[],n=e&&e.children||Lo,r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join(``)}var Vo=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(),gr(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||yr(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&&zi(e.composedPath())||(os(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||(os(this.options.__debugPointerEvents,`move`,`FileDiff.DEBUG.handlePointerMove:`,e),this.handlePointerEvent({eventType:`move`,event:e}))};handlePointerLeave=e=>{let{__debugPointerEvents:t}=this.options;if(os(t,`move`,`FileDiff.DEBUG.handlePointerLeave: no event`),this.hoveredLine==null&&this.hoveredToken==null){os(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();os(n,e,`FileDiff.DEBUG.handlePointerEvent:`,{eventType:e,composedPath:r});let i=this.resolvePointerTarget(r);os(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=Ko(i)&&this.hoveredLine?.lineElement===i.lineElement;Go(i)&&this.hoveredToken?.tokenElement===i.tokenElement||(this.hoveredToken!=null&&(d?.(this.hoveredToken,t),this.clearHoveredToken()),Go(i)&&(this.setHoveredToken(this.toTokenEventBaseProps(i)),u?.(this.hoveredToken,t))),e||(this.hoveredLine!=null&&(c?.({...this.hoveredLine,event:t}),this.clearHoveredLine()),Ko(i)?(this.setHoveredLine(this.toEventBaseProps(i)),this.placeUtility(),s?.({...this.hoveredLine,event:t})):this.placeUtility());break}case`click`:{if(i==null)break;if(Jo(i)&&p!=null){p(i);break}if(qo(i)&&f!=null){f(i.hunkIndex,i.all||t.shiftKey?`both`:i.direction,i.all||t.shiftKey?1/0:void 0);break}if(!Ko(i))break;Go(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,os(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})()),os(t,`move`,`FileDiff.DEBUG.attachEventListeners: Attaching pointer move event`),os(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();zi(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(Ri(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=Ro(Li());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);Wo(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(Zo(t));if(Wo(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(Wo(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(Wo(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&&zi(e))){for(let n of e)if(n instanceof Element)return this.pathFromElement(n,t)}}pathFromElement(e,t){let n=Zo(e);if(t&&zi(n))return;let r=Qo(e);return r==null?this.pathFromAnnotationSlot(e):Zo(r)}pathFromAnnotationSlot(e){let t=es($o(e));if(t==null)return;let n=this.targetForSelectionPoint(t);return n==null?void 0:Zo(n.lineElement)}hitTest(e){if(!Number.isFinite(e.clientX)||!Number.isFinite(e.clientY))return;let t=this.pre?.getRootNode(),n=ts(t)?t:ts(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)}yr(r??void 0,i??void 0)||(this.selectedRangeHighlightSide=void 0,this.selectedRangeLineNumberOnly=!1,this.options.controlledSelection===!0?this.proposedSelectedRange=i:(this.selectedRange=i,hr(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=()=>{gr(this.renderSelection);let e=this.getSelectionRenderState();if(this.pre==null)return;let{editorActiveLine:t,selectedLines:n}=e,r=!rs(this.renderedSelectedLinesState,n),i=!rs(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);Yo(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=as(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=as(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:Xo(r,`[data-line][data-line-index="${a}"]`),o??=a==null?void 0:Xo(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:is(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:is(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 Ho({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:Uo({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 Uo({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 Wo(e){return e!=null&&`kind`in e&&e.kind===`line`}function Go(e){return e!=null&&`kind`in e&&e.kind===`token`}function Ko(e){return Wo(e)||Go(e)}function qo(e){return`type`in e&&e.type===`line-info`}function Jo(e){return`kind`in e&&e.kind===`merge-conflict-action`}function Yo(e){return e===`current`||e===`incoming`||e===`both`}function Xo(e,t){let n=e?.querySelector(t);return n instanceof HTMLElement?n:void 0}function Zo(e){let t=[],n=e;for(;n!=null;)t.push(n),n=n.parentNode;return t}function Qo(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 $o(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 es(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 ts(e){return e!=null&&typeof e.elementFromPoint==`function`}function ns(e,t){return e===t||yr(e??void 0,t??void 0)}function rs(e,t){return e?.highlightSide===t.highlightSide&&e?.lineNumberOnly===t.lineNumberOnly&&ns(e?.range??null,t.range)}function is(e,t){switch(e){case`change-deletion`:return`deletions`;case`change-addition`:return`additions`;default:return t.hasAttribute(`data-deletions`)?`deletions`:`additions`}}function as(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 os(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 ss=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),us(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`?ps(t):ms(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:cs(n.codeInlineSize),r=n.numberInlineSize==null?t.numberWidth:ls(n.numberInlineSize),i=e!==t.codeWidth,a=r!==t.numberWidth;!i&&!a||(t.codeWidth=e,t.numberWidth=r,t.applyColumnVariables&&ds(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 cs(e){let t=Math.max(Math.floor(e),0);return t===0?`auto`:t}function ls(e){return Math.max(Math.ceil(e),0)}function us(e,t){e.applyColumnVariables!==t&&(e.applyColumnVariables=t,t?ds(e,{codeWidthChanged:!0,numberWidthChanged:!0}):fs(e))}function ds(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 fs(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 ps(e){e.codeElement.isConnected&&fs(e)}function ms(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 hs=new Map,gs=new Map,_s=new Map,vs=new Set;function ys(e){for(let t of Array.isArray(e)?e:[e])if(t!==`text`&&t!==`ansi`&&!vs.has(t))return!1;return!0}function bs(e,t){e=Array.isArray(e)?e:[e];for(let n of e){if(vs.has(n.name))continue;let e=hs.get(n.name);e??(e=n,hs.set(n.name,e)),vs.add(e.name),t.loadLanguageSync(e.data)}}function xs(){return typeof WorkerGlobalScope<`u`&&typeof self<`u`&&self instanceof WorkerGlobalScope}var Ss=Object.defineProperty,Cs=Object.getOwnPropertyDescriptor,ws=Object.getOwnPropertyNames,Ts=Object.prototype.hasOwnProperty,Es=(e,t)=>{let n={};for(var r in e)Ss(n,r,{get:e[r],enumerable:!0});return t||Ss(n,Symbol.toStringTag,{value:`Module`}),n},Ds=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=ws(t),a=0,o=i.length,s;a<o;a++)s=i[a],!Ts.call(e,s)&&s!==n&&Ss(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=Cs(t,s))||r.enumerable});return e},Os=(e,t,n)=>(Ds(e,t,`default`),n&&Ds(n,t,`default`)),ks=[{id:`abap`,name:`ABAP`,import:(()=>j(()=>import(`./_CLvhMVsD.js`),[]))},{id:`actionscript-3`,name:`ActionScript`,aliases:[`actionscript`,`as3`],import:(()=>j(()=>import(`./_Cs6JJXT5.js`),[]))},{id:`ada`,name:`Ada`,import:(()=>j(()=>import(`./_C5qYipkI.js`),[]))},{id:`ahk`,name:`AutoHotkey`,aliases:[`ahk1`],import:(()=>j(()=>import(`./_CA9gdOdF.js`),[]))},{id:`ahk2`,name:`AutoHotkey2`,import:(()=>j(()=>import(`./__6rzW9BS.js`),[]))},{id:`angular-html`,name:`Angular HTML`,import:(()=>j(()=>import(`./_BEqjpoZg.js`).then(e=>e.n),__vite__mapDeps([0,1,2,3])))},{id:`angular-ts`,name:`Angular TypeScript`,import:(()=>j(()=>import(`./_ikQj-IKt.js`),__vite__mapDeps([4,0,1,2,3,5])))},{id:`apache`,name:`Apache Conf`,import:(()=>j(()=>import(`./_U0d_L8uA.js`),[]))},{id:`apex`,name:`Apex`,import:(()=>j(()=>import(`./_KFGFyKwG.js`),[]))},{id:`apl`,name:`APL`,import:(()=>j(()=>import(`./_CIURJUOW.js`),__vite__mapDeps([6,2,3,1,7,8,9])))},{id:`applescript`,name:`AppleScript`,import:(()=>j(()=>import(`./_CCn79oCD.js`),[]))},{id:`ara`,name:`Ara`,import:(()=>j(()=>import(`./_4CJ0cIlV.js`),[]))},{id:`asciidoc`,name:`AsciiDoc`,aliases:[`adoc`],import:(()=>j(()=>import(`./_SCjQUq34.js`),[]))},{id:`asm`,name:`Assembly`,import:(()=>j(()=>import(`./_Cmm7eHzH2.js`),[]))},{id:`astro`,name:`Astro`,import:(()=>j(()=>import(`./_BOPuHJtM2.js`),__vite__mapDeps([10,2,3,9,11,12,13])))},{id:`awk`,name:`AWK`,import:(()=>j(()=>import(`./_BWXHIvNe2.js`),[]))},{id:`ballerina`,name:`Ballerina`,import:(()=>j(()=>import(`./_B7ZEbQpA2.js`),[]))},{id:`bat`,name:`Batch File`,aliases:[`batch`,`cmd`],import:(()=>j(()=>import(`./_qdxAdBWQ2.js`),[]))},{id:`beancount`,name:`Beancount`,import:(()=>j(()=>import(`./_D-usSTwE2.js`),[]))},{id:`berry`,name:`Berry`,aliases:[`be`],import:(()=>j(()=>import(`./_DKpUyyne2.js`),[]))},{id:`bibtex`,name:`BibTeX`,import:(()=>j(()=>import(`./_Ci_nEsc72.js`),[]))},{id:`bicep`,name:`Bicep`,import:(()=>j(()=>import(`./_CUHmPFLl2.js`),[]))},{id:`bird2`,name:`BIRD2 Configuration`,aliases:[`bird`],import:(()=>j(()=>import(`./_CYIUgYqB2.js`),[]))},{id:`blade`,name:`Blade`,import:(()=>j(()=>import(`./_DwUB7T1V2.js`),__vite__mapDeps([14,2,3,1,7,8,9,15,16])))},{id:`bsl`,name:`1C (Enterprise)`,aliases:[`1c`],import:(()=>j(()=>import(`./_CpYNKFv52.js`),__vite__mapDeps([17,18])))},{id:`c`,name:`C`,import:(()=>j(()=>import(`./_DhL9zXK82.js`).then(e=>e.n),[]))},{id:`c3`,name:`C3`,import:(()=>j(()=>import(`./_D0apG41V2.js`),[]))},{id:`cadence`,name:`Cadence`,aliases:[`cdc`],import:(()=>j(()=>import(`./_CQ2zXKGN2.js`),[]))},{id:`cairo`,name:`Cairo`,import:(()=>j(()=>import(`./_kIpfj7zU2.js`),__vite__mapDeps([19,20])))},{id:`chapel`,name:`Chapel`,aliases:[`chpl`],import:(()=>j(()=>import(`./_C1kG0lEK2.js`),__vite__mapDeps([21,22])))},{id:`clarity`,name:`Clarity`,import:(()=>j(()=>import(`./_CtfBBspg2.js`),[]))},{id:`clojure`,name:`Clojure`,aliases:[`clj`],import:(()=>j(()=>import(`./_DqKBuwfJ2.js`),[]))},{id:`cmake`,name:`CMake`,import:(()=>j(()=>import(`./_Bj61d0ZC.js`),[]))},{id:`cobol`,name:`COBOL`,import:(()=>j(()=>import(`./_B6BYxEQ1.js`),__vite__mapDeps([23,1,2,3,8])))},{id:`codeowners`,name:`CODEOWNERS`,import:(()=>j(()=>import(`./_C8r90Shi.js`),[]))},{id:`codeql`,name:`CodeQL`,aliases:[`ql`],import:(()=>j(()=>import(`./_oeQT6MSM.js`),[]))},{id:`coffee`,name:`CoffeeScript`,aliases:[`coffeescript`],import:(()=>j(()=>import(`./_B15SHkNA.js`),__vite__mapDeps([24,2])))},{id:`common-lisp`,name:`Common Lisp`,aliases:[`lisp`],import:(()=>j(()=>import(`./_Cv5bFMCO.js`),[]))},{id:`coq`,name:`Rocq`,import:(()=>j(()=>import(`./_DuBRPxYg.js`),[]))},{id:`cpp`,name:`C++`,aliases:[`c++`],import:(()=>j(()=>import(`./_CpyJj23g.js`).then(e=>e.n),__vite__mapDeps([25,26,27,22])))},{id:`crystal`,name:`Crystal`,import:(()=>j(()=>import(`./_DWMLMYo_.js`),__vite__mapDeps([28,2,3,1,16,22,29])))},{id:`csharp`,name:`C#`,aliases:[`c#`,`cs`],import:(()=>j(()=>import(`./_oqKa8noW.js`),[]))},{id:`css`,name:`CSS`,import:(()=>j(()=>import(`./_1BKgldy4.js`).then(e=>e.n),[]))},{id:`csv`,name:`CSV`,import:(()=>j(()=>import(`./_Dx-8-gkx.js`),[]))},{id:`cue`,name:`CUE`,import:(()=>j(()=>import(`./_CE9AQfxI.js`),[]))},{id:`cypher`,name:`Cypher`,aliases:[`cql`],import:(()=>j(()=>import(`./_ClKdZ_lG.js`),[]))},{id:`d`,name:`D`,import:(()=>j(()=>import(`./_qD-0Kul2.js`),[]))},{id:`dart`,name:`Dart`,import:(()=>j(()=>import(`./_CnvKMtbv.js`),[]))},{id:`dax`,name:`DAX`,import:(()=>j(()=>import(`./_BkyTk9wS.js`),[]))},{id:`desktop`,name:`Desktop`,import:(()=>j(()=>import(`./_Dlh5hvp9.js`),[]))},{id:`diff`,name:`Diff`,import:(()=>j(()=>import(`./_woXpYk--.js`),[]))},{id:`docker`,name:`Dockerfile`,aliases:[`dockerfile`],import:(()=>j(()=>import(`./_IyjqRm3v.js`),[]))},{id:`dotenv`,name:`dotEnv`,import:(()=>j(()=>import(`./__5a1GRtc.js`),[]))},{id:`dream-maker`,name:`Dream Maker`,import:(()=>j(()=>import(`./_DW3nJb8Q.js`),[]))},{id:`edge`,name:`Edge`,import:(()=>j(()=>import(`./_DidQ_9x_.js`),__vite__mapDeps([30,1,2,3,11,15])))},{id:`elixir`,name:`Elixir`,import:(()=>j(()=>import(`./_jDsA0WhJ.js`),__vite__mapDeps([31,1,2,3])))},{id:`elm`,name:`Elm`,import:(()=>j(()=>import(`./_MqvVvGe9.js`),__vite__mapDeps([32,27,22])))},{id:`emacs-lisp`,name:`Emacs Lisp`,aliases:[`elisp`],import:(()=>j(()=>import(`./_c_oH4hRZ.js`),[]))},{id:`erb`,name:`ERB`,import:(()=>j(()=>import(`./_CcOTHVrp.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:(()=>j(()=>import(`./_BaHq4SXp.js`),__vite__mapDeps([40,41])))},{id:`fennel`,name:`Fennel`,import:(()=>j(()=>import(`./_DQxkIbk2.js`),[]))},{id:`fish`,name:`Fish`,import:(()=>j(()=>import(`./_BJitypiv2.js`),[]))},{id:`fluent`,name:`Fluent`,aliases:[`ftl`],import:(()=>j(()=>import(`./_C03EYrpw2.js`),[]))},{id:`fortran-fixed-form`,name:`Fortran (Fixed Form)`,aliases:[`f`,`for`,`f77`],import:(()=>j(()=>import(`./_DsKRHcpP2.js`),__vite__mapDeps([42,43])))},{id:`fortran-free-form`,name:`Fortran (Free Form)`,aliases:[`f90`,`f95`,`f03`,`f08`,`f18`],import:(()=>j(()=>import(`./_CYNrtFtB2.js`),[]))},{id:`fsharp`,name:`F#`,aliases:[`f#`,`fs`],import:(()=>j(()=>import(`./_DmIc4jLQ2.js`),__vite__mapDeps([44,41])))},{id:`gdresource`,name:`GDResource`,aliases:[`tscn`,`tres`],import:(()=>j(()=>import(`./_CY8IvGdO2.js`),__vite__mapDeps([45,46,47])))},{id:`gdscript`,name:`GDScript`,aliases:[`gd`],import:(()=>j(()=>import(`./_DYvRD3hg2.js`),[]))},{id:`gdshader`,name:`GDShader`,import:(()=>j(()=>import(`./_CBce3t8t2.js`),[]))},{id:`genie`,name:`Genie`,import:(()=>j(()=>import(`./_CV2tkWYe2.js`),[]))},{id:`gherkin`,name:`Gherkin`,import:(()=>j(()=>import(`./_DExj1W_82.js`),[]))},{id:`git-commit`,name:`Git Commit Message`,import:(()=>j(()=>import(`./_Dl-2e7rI2.js`),__vite__mapDeps([48,49])))},{id:`git-rebase`,name:`Git Rebase Message`,import:(()=>j(()=>import(`./_Bnik8iDk2.js`),__vite__mapDeps([50,29])))},{id:`gleam`,name:`Gleam`,import:(()=>j(()=>import(`./_CSRkHgEL2.js`),[]))},{id:`glimmer-js`,name:`Glimmer JS`,aliases:[`gjs`],import:(()=>j(()=>import(`./_fGhykqTS2.js`),__vite__mapDeps([51,2,3,1,11])))},{id:`glimmer-ts`,name:`Glimmer TS`,aliases:[`gts`],import:(()=>j(()=>import(`./_CKA8Jx8E2.js`),__vite__mapDeps([52,2,3,1,11])))},{id:`glsl`,name:`GLSL`,import:(()=>j(()=>import(`./_CqBCOVhg.js`).then(e=>e.n),__vite__mapDeps([27,22])))},{id:`gn`,name:`GN`,import:(()=>j(()=>import(`./_ilITqXS62.js`),[]))},{id:`gnuplot`,name:`Gnuplot`,import:(()=>j(()=>import(`./_7GGW24-e2.js`),[]))},{id:`go`,name:`Go`,import:(()=>j(()=>import(`./_rLFTqkRN2.js`),[]))},{id:`graphql`,name:`GraphQL`,aliases:[`gql`],import:(()=>j(()=>import(`./_B4XC6CdS.js`).then(e=>e.n),__vite__mapDeps([36,2,11,13,37])))},{id:`groovy`,name:`Groovy`,import:(()=>j(()=>import(`./_CacY0gHj2.js`),[]))},{id:`hack`,name:`Hack`,import:(()=>j(()=>import(`./_Doyrf5HK2.js`),__vite__mapDeps([53,1,2,3,16])))},{id:`haml`,name:`Ruby Haml`,import:(()=>j(()=>import(`./_n2gAvKOC.js`).then(e=>e.n),__vite__mapDeps([35,2,3])))},{id:`handlebars`,name:`Handlebars`,aliases:[`hbs`],import:(()=>j(()=>import(`./_Cj7lRVDV2.js`),__vite__mapDeps([54,2,3,1,39])))},{id:`haskell`,name:`Haskell`,aliases:[`hs`],import:(()=>j(()=>import(`./_D8IpX4py2.js`),[]))},{id:`haxe`,name:`Haxe`,import:(()=>j(()=>import(`./_C8oCnwJJ2.js`),[]))},{id:`hcl`,name:`HashiCorp HCL`,import:(()=>j(()=>import(`./_Dh228itO2.js`),[]))},{id:`hjson`,name:`Hjson`,import:(()=>j(()=>import(`./_CxZEssPk2.js`),[]))},{id:`hlsl`,name:`HLSL`,import:(()=>j(()=>import(`./_Cvrh5tZx2.js`),[]))},{id:`html`,name:`HTML`,import:(()=>j(()=>import(`./_CNHkYcg2.js`).then(e=>e.n),__vite__mapDeps([1,2,3])))},{id:`html-derivative`,name:`HTML (Derivative)`,import:(()=>j(()=>import(`./_BforbyCy2.js`),__vite__mapDeps([15,1,2,3])))},{id:`http`,name:`HTTP`,import:(()=>j(()=>import(`./_CCtRb96Z.js`),__vite__mapDeps([55,7,8,9,29,36,2,11,13,37])))},{id:`hurl`,name:`Hurl`,import:(()=>j(()=>import(`./_JDi-LZlL.js`),__vite__mapDeps([56,7,8,57,36,2,11,13,37])))},{id:`hxml`,name:`HXML`,import:(()=>j(()=>import(`./_DLbMbJfH.js`),__vite__mapDeps([58,59])))},{id:`hy`,name:`Hy`,import:(()=>j(()=>import(`./_CZbG8q4J.js`),[]))},{id:`imba`,name:`Imba`,import:(()=>j(()=>import(`./_DsUTQ-LC.js`),[]))},{id:`ini`,name:`INI`,aliases:[`properties`],import:(()=>j(()=>import(`./_B5eOa1yu.js`),[]))},{id:`java`,name:`Java`,import:(()=>j(()=>import(`./_BmHqUXK-.js`).then(e=>e.n),[]))},{id:`javascript`,name:`JavaScript`,aliases:[`js`,`cjs`,`mjs`],import:(()=>j(()=>import(`./_m8kUoGWY.js`).then(e=>e.n),[]))},{id:`jinja`,name:`Jinja`,import:(()=>j(()=>import(`./_As0ljVB2.js`),__vite__mapDeps([60,1,2,3])))},{id:`jison`,name:`Jison`,import:(()=>j(()=>import(`./_C2aOnovs.js`),__vite__mapDeps([61,2])))},{id:`json`,name:`JSON`,import:(()=>j(()=>import(`./_12lZruw9.js`).then(e=>e.n),[]))},{id:`json5`,name:`JSON5`,import:(()=>j(()=>import(`./_BR5RXkoi.js`),[]))},{id:`jsonc`,name:`JSON with Comments`,import:(()=>j(()=>import(`./_CYpm1nAK.js`),[]))},{id:`jsonl`,name:`JSON Lines`,import:(()=>j(()=>import(`./_CmCQp5Yx.js`),[]))},{id:`jsonnet`,name:`Jsonnet`,import:(()=>j(()=>import(`./_CJTPZ8u_.js`),[]))},{id:`jssm`,name:`JSSM`,aliases:[`fsl`],import:(()=>j(()=>import(`./_DXw9l8Rf.js`),[]))},{id:`jsx`,name:`JSX`,import:(()=>j(()=>import(`./_FQAA91B4.js`).then(e=>e.n),[]))},{id:`julia`,name:`Julia`,aliases:[`jl`],import:(()=>j(()=>import(`./_eAO_YRah.js`),__vite__mapDeps([62,2,16,20,25,26,27,22,63])))},{id:`just`,name:`Just`,aliases:[`justfile`],import:(()=>j(()=>import(`./_Dc15LcQx.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:(()=>j(()=>import(`./_CsD5j6eV.js`),[]))},{id:`kotlin`,name:`Kotlin`,aliases:[`kt`,`kts`],import:(()=>j(()=>import(`./_DhhofPvG.js`),[]))},{id:`kusto`,name:`Kusto`,aliases:[`kql`],import:(()=>j(()=>import(`./_C7mF5XQf.js`),[]))},{id:`latex`,name:`LaTeX`,import:(()=>j(()=>import(`./_BfC_HlYy.js`),__vite__mapDeps([66,67,63])))},{id:`lean`,name:`Lean 4`,aliases:[`lean4`],import:(()=>j(()=>import(`./_CewbzKMR.js`),[]))},{id:`less`,name:`Less`,import:(()=>j(()=>import(`./_DVTAwKKz.js`),[]))},{id:`liquid`,name:`Liquid`,import:(()=>j(()=>import(`./_CpKjlFiU.js`),__vite__mapDeps([68,2,3,1,9])))},{id:`llvm`,name:`LLVM IR`,import:(()=>j(()=>import(`./_DqHOMS-s.js`),[]))},{id:`log`,name:`Log file`,import:(()=>j(()=>import(`./_BNLmms1o.js`),[]))},{id:`logo`,name:`Logo`,import:(()=>j(()=>import(`./_Cluzi2Zq.js`),[]))},{id:`lua`,name:`Lua`,import:(()=>j(()=>import(`./_DNkR_p3W.js`).then(e=>e.n),__vite__mapDeps([38,22])))},{id:`luau`,name:`Luau`,import:(()=>j(()=>import(`./_C2pBCSgt.js`),[]))},{id:`make`,name:`Makefile`,aliases:[`makefile`],import:(()=>j(()=>import(`./_Dixweg8N.js`),[]))},{id:`markdown`,name:`Markdown`,aliases:[`md`],import:(()=>j(()=>import(`./_BYOwaDjH.js`),[]))},{id:`marko`,name:`Marko`,import:(()=>j(()=>import(`./_CS8QjIcU.js`),__vite__mapDeps([69,3,5,11,70])))},{id:`matlab`,name:`MATLAB`,import:(()=>j(()=>import(`./_D7qyCx1q.js`),[]))},{id:`mdc`,name:`MDC`,import:(()=>j(()=>import(`./_CgGNirdt.js`),__vite__mapDeps([71,15,1,2,3,39,41])))},{id:`mdx`,name:`MDX`,import:(()=>j(()=>import(`./_DQZ5AkYe.js`),[]))},{id:`mermaid`,name:`Mermaid`,aliases:[`mmd`],import:(()=>j(()=>import(`./_BxpfTIzt.js`),[]))},{id:`mipsasm`,name:`MIPS Assembly`,aliases:[`mips`],import:(()=>j(()=>import(`./_BMqwQI7S.js`),[]))},{id:`mojo`,name:`Mojo`,import:(()=>j(()=>import(`./_CFuIV2fl.js`),[]))},{id:`moonbit`,name:`MoonBit`,aliases:[`mbt`,`mbti`],import:(()=>j(()=>import(`./_DgjMoLWr.js`),[]))},{id:`move`,name:`Move`,import:(()=>j(()=>import(`./_BYnGhZoM2.js`),[]))},{id:`narrat`,name:`Narrat Language`,aliases:[`nar`],import:(()=>j(()=>import(`./__X_XdTYD2.js`),[]))},{id:`nextflow`,name:`Nextflow`,aliases:[`nf`],import:(()=>j(()=>import(`./_DY5hwH4S2.js`),__vite__mapDeps([72,73])))},{id:`nextflow-groovy`,name:`Nextflow Groovy`,import:(()=>j(()=>import(`./_DJMQeKeT2.js`),[]))},{id:`nginx`,name:`Nginx`,import:(()=>j(()=>import(`./_DBYlf6SS2.js`),__vite__mapDeps([74,38,22])))},{id:`nim`,name:`Nim`,import:(()=>j(()=>import(`./_C_0o64__2.js`),__vite__mapDeps([75,2,3,1,7,8,22,27,41])))},{id:`nix`,name:`Nix`,import:(()=>j(()=>import(`./_IvuFDN5E2.js`),[]))},{id:`nsis`,name:`NSIS`,import:(()=>j(()=>import(`./_CjNLYCLg2.js`),[]))},{id:`nushell`,name:`nushell`,aliases:[`nu`],import:(()=>j(()=>import(`./_DHYfO66s2.js`),[]))},{id:`objective-c`,name:`Objective-C`,aliases:[`objc`],import:(()=>j(()=>import(`./_D1A_Heim2.js`),[]))},{id:`objective-cpp`,name:`Objective-C++`,import:(()=>j(()=>import(`./_BsSzOQcm2.js`),[]))},{id:`ocaml`,name:`OCaml`,import:(()=>j(()=>import(`./_O90oeIOV2.js`),[]))},{id:`odin`,name:`Odin`,import:(()=>j(()=>import(`./_B1RWQWA52.js`),[]))},{id:`openscad`,name:`OpenSCAD`,aliases:[`scad`],import:(()=>j(()=>import(`./_BUDT5pXO2.js`),[]))},{id:`org`,name:`Org Markup`,import:(()=>j(()=>import(`./_D3YZ2wOH2.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:(()=>j(()=>import(`./_4ZHwLPI52.js`),[]))},{id:`perl`,name:`Perl`,import:(()=>j(()=>import(`./_COw_Ql4e.js`),__vite__mapDeps([65,2,3,1,7,8,16])))},{id:`php`,name:`PHP`,import:(()=>j(()=>import(`./_B1Mp7ADV2.js`),__vite__mapDeps([87,2,3,1,7,8,9,16])))},{id:`pkl`,name:`Pkl`,import:(()=>j(()=>import(`./_ot-7Btpt2.js`),[]))},{id:`plsql`,name:`PL/SQL`,import:(()=>j(()=>import(`./_DGHpHOYJ2.js`),[]))},{id:`po`,name:`Gettext PO`,aliases:[`pot`,`potx`],import:(()=>j(()=>import(`./_BiJDBrnU2.js`),[]))},{id:`polar`,name:`Polar`,import:(()=>j(()=>import(`./_C7UOKdEL.js`),[]))},{id:`postcss`,name:`PostCSS`,import:(()=>j(()=>import(`./_BXeXVLqQ2.js`),[]))},{id:`powerquery`,name:`PowerQuery`,import:(()=>j(()=>import(`./_DNMTfnFr.js`),[]))},{id:`powershell`,name:`PowerShell`,aliases:[`ps`,`ps1`,`pwsh`],import:(()=>j(()=>import(`./_CCSX75yM.js`),[]))},{id:`prisma`,name:`Prisma`,import:(()=>j(()=>import(`./_DMgNhnYS.js`),[]))},{id:`prolog`,name:`Prolog`,import:(()=>j(()=>import(`./_iXnhIJG7.js`),[]))},{id:`proto`,name:`Protocol Buffer 3`,aliases:[`protobuf`],import:(()=>j(()=>import(`./_DB4EqR-F.js`),[]))},{id:`pug`,name:`Pug`,aliases:[`jade`],import:(()=>j(()=>import(`./_Dzc2cx5V.js`),__vite__mapDeps([94,2,3,1])))},{id:`puppet`,name:`Puppet`,import:(()=>j(()=>import(`./_CDv2pdJW.js`),[]))},{id:`purescript`,name:`PureScript`,import:(()=>j(()=>import(`./_9MfHhQsQ.js`),[]))},{id:`python`,name:`Python`,aliases:[`py`],import:(()=>j(()=>import(`./_gzcpVVnB2.js`),[]))},{id:`qml`,name:`QML`,import:(()=>j(()=>import(`./_BOjZTPOf.js`),__vite__mapDeps([95,2])))},{id:`qmldir`,name:`QML Directory`,import:(()=>j(()=>import(`./_DCQb3MpD.js`),[]))},{id:`qss`,name:`Qt Style Sheets`,import:(()=>j(()=>import(`./_Fe1Jh2GI.js`),[]))},{id:`r`,name:`R`,import:(()=>j(()=>import(`./_B69hDpaD.js`).then(e=>e.n),[]))},{id:`racket`,name:`Racket`,import:(()=>j(()=>import(`./_DcIDlBhZ.js`),[]))},{id:`raku`,name:`Raku`,aliases:[`perl6`],import:(()=>j(()=>import(`./_B3gFvitq2.js`),[]))},{id:`razor`,name:`ASP.NET Razor`,import:(()=>j(()=>import(`./_CUosKAJV.js`),__vite__mapDeps([96,1,2,3,78])))},{id:`rbs`,name:`RBS`,aliases:[`ruby-signature`],import:(()=>j(()=>import(`./_C0MpOrj4.js`),[]))},{id:`reg`,name:`Windows Registry Script`,import:(()=>j(()=>import(`./_CRGYupPL.js`),[]))},{id:`regexp`,name:`RegExp`,aliases:[`regex`],import:(()=>j(()=>import(`./_ChBpI_ne.js`).then(e=>e.n),[]))},{id:`rel`,name:`Rel`,import:(()=>j(()=>import(`./_BtDbiS_P.js`),[]))},{id:`riscv`,name:`RISC-V`,import:(()=>j(()=>import(`./_Ckw8ddFX.js`),[]))},{id:`ron`,name:`RON`,import:(()=>j(()=>import(`./_VUp2lXgN.js`),[]))},{id:`rosmsg`,name:`ROS Interface`,import:(()=>j(()=>import(`./_CAekHB0j.js`),[]))},{id:`rst`,name:`reStructuredText`,import:(()=>j(()=>import(`./_C5Et7abb.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:(()=>j(()=>import(`./_CKU_POWM.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:(()=>j(()=>import(`./_Cfkwpbl82.js`),[]))},{id:`sas`,name:`SAS`,import:(()=>j(()=>import(`./_gxIUA82n.js`),__vite__mapDeps([99,16])))},{id:`sass`,name:`Sass`,import:(()=>j(()=>import(`./_DXrisJhu.js`),[]))},{id:`scala`,name:`Scala`,import:(()=>j(()=>import(`./_BiFt_7mu2.js`),[]))},{id:`scheme`,name:`Scheme`,import:(()=>j(()=>import(`./_DQCgrYNe.js`),[]))},{id:`scss`,name:`SCSS`,import:(()=>j(()=>import(`./_CkqhlnJo.js`).then(e=>e.n),__vite__mapDeps([5,3])))},{id:`sdbl`,name:`1C (Query)`,aliases:[`1c-query`],import:(()=>j(()=>import(`./_bTVj8UrX2.js`),[]))},{id:`shaderlab`,name:`ShaderLab`,aliases:[`shader`],import:(()=>j(()=>import(`./_BM315xPC.js`),__vite__mapDeps([100,101])))},{id:`shellscript`,name:`Shell`,aliases:[`bash`,`sh`,`shell`,`zsh`],import:(()=>j(()=>import(`./_C1-CcZmk.js`).then(e=>e.n),[]))},{id:`shellsession`,name:`Shell Session`,aliases:[`console`],import:(()=>j(()=>import(`./_D_M1vhwv.js`),__vite__mapDeps([102,29])))},{id:`smalltalk`,name:`GNU Smalltalk`,import:(()=>j(()=>import(`./_BHpQb5nM.js`),[]))},{id:`smithy`,name:`Smithy`,import:(()=>j(()=>import(`./_Dgaz7aur.js`),[]))},{id:`solidity`,name:`Solidity`,import:(()=>j(()=>import(`./_Bj7E1mRn.js`),[]))},{id:`soy`,name:`Closure Templates`,aliases:[`closure-templates`],import:(()=>j(()=>import(`./_CMxAFImx.js`),__vite__mapDeps([103,1,2,3])))},{id:`sparql`,name:`SPARQL`,import:(()=>j(()=>import(`./_L8AbGenz.js`),__vite__mapDeps([104,105])))},{id:`splunk`,name:`Splunk Query Language`,aliases:[`spl`],import:(()=>j(()=>import(`./_BC2Px7Mm.js`),[]))},{id:`sql`,name:`SQL`,import:(()=>j(()=>import(`./_CtC-w3pF2.js`).then(e=>e.n),[]))},{id:`ssh-config`,name:`SSH Config`,import:(()=>j(()=>import(`./_BgfXC-Er.js`),[]))},{id:`stata`,name:`Stata`,import:(()=>j(()=>import(`./_CmLJj9ME.js`),__vite__mapDeps([106,16])))},{id:`stylus`,name:`Stylus`,aliases:[`styl`],import:(()=>j(()=>import(`./_B6D30XZt.js`),[]))},{id:`surrealql`,name:`SurrealQL`,aliases:[`surql`],import:(()=>j(()=>import(`./_CvO23f2W.js`),__vite__mapDeps([107,2])))},{id:`svelte`,name:`Svelte`,import:(()=>j(()=>import(`./_CyeKaLvw.js`),__vite__mapDeps([108,2,3,11,12])))},{id:`swift`,name:`Swift`,import:(()=>j(()=>import(`./_CyEgAFGc2.js`),[]))},{id:`system-verilog`,name:`SystemVerilog`,import:(()=>j(()=>import(`./_Dh5ihWbf2.js`),[]))},{id:`systemd`,name:`Systemd Units`,import:(()=>j(()=>import(`./_BxMlprV52.js`),[]))},{id:`talonscript`,name:`TalonScript`,aliases:[`talon`],import:(()=>j(()=>import(`./_CohzipZa2.js`),[]))},{id:`tasl`,name:`Tasl`,import:(()=>j(()=>import(`./_DMoTqEGO2.js`),[]))},{id:`tcl`,name:`Tcl`,import:(()=>j(()=>import(`./_CZd0xW_V2.js`),[]))},{id:`templ`,name:`Templ`,import:(()=>j(()=>import(`./_C7EInDaj2.js`),__vite__mapDeps([109,2,3,81])))},{id:`terraform`,name:`Terraform`,aliases:[`tf`,`tfvars`],import:(()=>j(()=>import(`./_DswuEJGm2.js`),[]))},{id:`tex`,name:`TeX`,import:(()=>j(()=>import(`./_BLAH3Vfy.js`).then(e=>e.n),__vite__mapDeps([67,63])))},{id:`toml`,name:`TOML`,import:(()=>j(()=>import(`./_CcmNWLt02.js`),[]))},{id:`ts-tags`,name:`TypeScript with Tags`,aliases:[`lit`],import:(()=>j(()=>import(`./_CBnLDY8w2.js`),__vite__mapDeps([110,2,3,1,7,8,11,16,27,22])))},{id:`tsv`,name:`TSV`,import:(()=>j(()=>import(`./_sltzmVWM2.js`),[]))},{id:`tsx`,name:`TSX`,import:(()=>j(()=>import(`./_Bawj-fZJ2.js`).then(e=>e.n),[]))},{id:`turtle`,name:`Turtle`,import:(()=>j(()=>import(`./_ByJddavk.js`),[]))},{id:`twig`,name:`Twig`,import:(()=>j(()=>import(`./_1MeG_S3S2.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:(()=>j(()=>import(`./_DxKN9WoJ2.js`).then(e=>e.n),[]))},{id:`typespec`,name:`TypeSpec`,aliases:[`tsp`],import:(()=>j(()=>import(`./_BRdr0IET2.js`),[]))},{id:`typst`,name:`Typst`,aliases:[`typ`],import:(()=>j(()=>import(`./_DI99ib-x2.js`),[]))},{id:`v`,name:`V`,import:(()=>j(()=>import(`./_DBj4K9d_2.js`),[]))},{id:`vala`,name:`Vala`,import:(()=>j(()=>import(`./_zf12oZj62.js`),[]))},{id:`vb`,name:`Visual Basic`,import:(()=>j(()=>import(`./_DOwzaHZ02.js`),[]))},{id:`verilog`,name:`Verilog`,import:(()=>j(()=>import(`./_B2gwz-sJ2.js`),[]))},{id:`vhdl`,name:`VHDL`,import:(()=>j(()=>import(`./_BroJfC0k2.js`),[]))},{id:`viml`,name:`Vim Script`,aliases:[`vim`,`vimscript`],import:(()=>j(()=>import(`./_DvXPmvsu2.js`),[]))},{id:`vue`,name:`Vue`,import:(()=>j(()=>import(`./_JpnKiuVh2.js`),__vite__mapDeps([112,2,3,1,9,11,15])))},{id:`vue-html`,name:`Vue HTML`,import:(()=>j(()=>import(`./_CWDwsyGF2.js`),__vite__mapDeps([113,2])))},{id:`vue-vine`,name:`Vue Vine`,import:(()=>j(()=>import(`./_BU7BYRGF2.js`),__vite__mapDeps([114,2,3,5,12,70,115])))},{id:`vyper`,name:`Vyper`,aliases:[`vy`],import:(()=>j(()=>import(`./_CgoNMtux2.js`),[]))},{id:`wasm`,name:`WebAssembly`,import:(()=>j(()=>import(`./_ByWQv1Qj2.js`),[]))},{id:`wenyan`,name:`Wenyan`,aliases:[`文言`],import:(()=>j(()=>import(`./_C8pVoKbM2.js`),[]))},{id:`wgsl`,name:`WGSL`,import:(()=>j(()=>import(`./_BsKzXJz42.js`),[]))},{id:`wikitext`,name:`Wikitext`,aliases:[`mediawiki`,`wiki`],import:(()=>j(()=>import(`./_ClFFjSW2.js`),[]))},{id:`wit`,name:`WebAssembly Interface Types`,import:(()=>j(()=>import(`./_DdvCle-K.js`),[]))},{id:`wolfram`,name:`Wolfram`,aliases:[`wl`],import:(()=>j(()=>import(`./_DLL8P-h_.js`),[]))},{id:`xml`,name:`XML`,import:(()=>j(()=>import(`./_C-Ym0bJX.js`).then(e=>e.n),__vite__mapDeps([7,8])))},{id:`xsl`,name:`XSL`,import:(()=>j(()=>import(`./_SfOgPYKw2.js`),__vite__mapDeps([93,7,8])))},{id:`yaml`,name:`YAML`,aliases:[`yml`],import:(()=>j(()=>import(`./_BU87-dOv.js`).then(e=>e.n),[]))},{id:`zenscript`,name:`ZenScript`,import:(()=>j(()=>import(`./_BnlCZFoB.js`),[]))},{id:`zig`,name:`Zig`,import:(()=>j(()=>import(`./_CMLA9XwU2.js`),[]))}],As=Object.fromEntries(ks.map(e=>[e.id,e.import])),js=Object.fromEntries(ks.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),Ms={...As,...js},Ns=Object.fromEntries([{id:`andromeeda`,displayName:`Andromeeda`,type:`dark`,import:(()=>j(()=>import(`./_vGVdxbeo.js`),[]))},{id:`aurora-x`,displayName:`Aurora X`,type:`dark`,import:(()=>j(()=>import(`./_CDeNXAV0.js`),[]))},{id:`ayu-dark`,displayName:`Ayu Dark`,type:`dark`,import:(()=>j(()=>import(`./_DluEY0Gj.js`),[]))},{id:`ayu-light`,displayName:`Ayu Light`,type:`light`,import:(()=>j(()=>import(`./_C3h-C4tm.js`),[]))},{id:`ayu-mirage`,displayName:`Ayu Mirage`,type:`dark`,import:(()=>j(()=>import(`./_Bqwy1Gya.js`),[]))},{id:`catppuccin-frappe`,displayName:`Catppuccin Frappé`,type:`dark`,import:(()=>j(()=>import(`./_C9Q5zVZY.js`),[]))},{id:`catppuccin-latte`,displayName:`Catppuccin Latte`,type:`light`,import:(()=>j(()=>import(`./_CtsyrtPq.js`),[]))},{id:`catppuccin-macchiato`,displayName:`Catppuccin Macchiato`,type:`dark`,import:(()=>j(()=>import(`./_R8nAf1vR.js`),[]))},{id:`catppuccin-mocha`,displayName:`Catppuccin Mocha`,type:`dark`,import:(()=>j(()=>import(`./_DjuaAJKi.js`),[]))},{id:`dark-plus`,displayName:`Dark Plus`,type:`dark`,import:(()=>j(()=>import(`./_Cs2F2srj.js`),[]))},{id:`dracula`,displayName:`Dracula Theme`,type:`dark`,import:(()=>j(()=>import(`./_BHWKrbxM.js`),[]))},{id:`dracula-soft`,displayName:`Dracula Theme Soft`,type:`dark`,import:(()=>j(()=>import(`./_5eyTD99u.js`),[]))},{id:`everforest-dark`,displayName:`Everforest Dark`,type:`dark`,import:(()=>j(()=>import(`./_sB-x3p7T.js`),[]))},{id:`everforest-light`,displayName:`Everforest Light`,type:`light`,import:(()=>j(()=>import(`./_Df2xbC6M.js`),[]))},{id:`github-dark`,displayName:`GitHub Dark`,type:`dark`,import:(()=>j(()=>import(`./_C-LZuMrd.js`),[]))},{id:`github-dark-default`,displayName:`GitHub Dark Default`,type:`dark`,import:(()=>j(()=>import(`./_DXG-b-1a.js`),[]))},{id:`github-dark-dimmed`,displayName:`GitHub Dark Dimmed`,type:`dark`,import:(()=>j(()=>import(`./_Bx1FflLF.js`),[]))},{id:`github-dark-high-contrast`,displayName:`GitHub Dark High Contrast`,type:`dark`,import:(()=>j(()=>import(`./_B_tTalzw.js`),[]))},{id:`github-light`,displayName:`GitHub Light`,type:`light`,import:(()=>j(()=>import(`./_EUqPIrTm.js`),[]))},{id:`github-light-default`,displayName:`GitHub Light Default`,type:`light`,import:(()=>j(()=>import(`./_BXViO-2h.js`),[]))},{id:`github-light-high-contrast`,displayName:`GitHub Light High Contrast`,type:`light`,import:(()=>j(()=>import(`./_B68TUdTA.js`),[]))},{id:`gruvbox-dark-hard`,displayName:`Gruvbox Dark Hard`,type:`dark`,import:(()=>j(()=>import(`./_C820rvS2.js`),[]))},{id:`gruvbox-dark-medium`,displayName:`Gruvbox Dark Medium`,type:`dark`,import:(()=>j(()=>import(`./_BPjhmG05.js`),[]))},{id:`gruvbox-dark-soft`,displayName:`Gruvbox Dark Soft`,type:`dark`,import:(()=>j(()=>import(`./_MrdJrrXF.js`),[]))},{id:`gruvbox-light-hard`,displayName:`Gruvbox Light Hard`,type:`light`,import:(()=>j(()=>import(`./_BC_s9l72.js`),[]))},{id:`gruvbox-light-medium`,displayName:`Gruvbox Light Medium`,type:`light`,import:(()=>j(()=>import(`./_BAWPOn9u.js`),[]))},{id:`gruvbox-light-soft`,displayName:`Gruvbox Light Soft`,type:`light`,import:(()=>j(()=>import(`./_BSMLrYjP.js`),[]))},{id:`horizon`,displayName:`Horizon`,type:`dark`,import:(()=>j(()=>import(`./_CE9ld1lL.js`),[]))},{id:`horizon-bright`,displayName:`Horizon Bright`,type:`light`,import:(()=>j(()=>import(`./_DSNQnXHK.js`),[]))},{id:`houston`,displayName:`Houston`,type:`dark`,import:(()=>j(()=>import(`./_CsvMBhTu.js`),[]))},{id:`kanagawa-dragon`,displayName:`Kanagawa Dragon`,type:`dark`,import:(()=>j(()=>import(`./_Bozd7klA.js`),[]))},{id:`kanagawa-lotus`,displayName:`Kanagawa Lotus`,type:`light`,import:(()=>j(()=>import(`./_BmuOG9ZW.js`),[]))},{id:`kanagawa-wave`,displayName:`Kanagawa Wave`,type:`dark`,import:(()=>j(()=>import(`./_BML5mF2J.js`),[]))},{id:`laserwave`,displayName:`LaserWave`,type:`dark`,import:(()=>j(()=>import(`./_C_8bwKvT.js`),[]))},{id:`light-plus`,displayName:`Light Plus`,type:`light`,import:(()=>j(()=>import(`./_DVQuIRkW2.js`),[]))},{id:`material-theme`,displayName:`Material Theme`,type:`dark`,import:(()=>j(()=>import(`./_Bm3Qr25_2.js`),[]))},{id:`material-theme-darker`,displayName:`Material Theme Darker`,type:`dark`,import:(()=>j(()=>import(`./_2IIEA8gg2.js`),[]))},{id:`material-theme-lighter`,displayName:`Material Theme Lighter`,type:`light`,import:(()=>j(()=>import(`./_uhdI0v042.js`),[]))},{id:`material-theme-ocean`,displayName:`Material Theme Ocean`,type:`dark`,import:(()=>j(()=>import(`./_CHQ94UKr2.js`),[]))},{id:`material-theme-palenight`,displayName:`Material Theme Palenight`,type:`dark`,import:(()=>j(()=>import(`./_B5W6OYN72.js`),[]))},{id:`min-dark`,displayName:`Min Dark`,type:`dark`,import:(()=>j(()=>import(`./_BSWPekZh2.js`),[]))},{id:`min-light`,displayName:`Min Light`,type:`light`,import:(()=>j(()=>import(`./_DDpmG2fV2.js`),[]))},{id:`monokai`,displayName:`Monokai`,type:`dark`,import:(()=>j(()=>import(`./_B_bV9PQ92.js`),[]))},{id:`night-owl`,displayName:`Night Owl`,type:`dark`,import:(()=>j(()=>import(`./_DhmEMT882.js`),[]))},{id:`night-owl-light`,displayName:`Night Owl Light`,type:`light`,import:(()=>j(()=>import(`./_eJ-hLW7d2.js`),[]))},{id:`nord`,displayName:`Nord`,type:`dark`,import:(()=>j(()=>import(`./_Cb4Vim4T2.js`),[]))},{id:`one-dark-pro`,displayName:`One Dark Pro`,type:`dark`,import:(()=>j(()=>import(`./_CLwyXe_n2.js`),[]))},{id:`one-light`,displayName:`One Light`,type:`light`,import:(()=>j(()=>import(`./_D7Lr4KcI2.js`),[]))},{id:`plastic`,displayName:`Plastic`,type:`dark`,import:(()=>j(()=>import(`./_DQwYfKfQ2.js`),[]))},{id:`poimandres`,displayName:`Poimandres`,type:`dark`,import:(()=>j(()=>import(`./_DRFjx7u42.js`),[]))},{id:`red`,displayName:`Red`,type:`dark`,import:(()=>j(()=>import(`./_DX1BQOs82.js`),[]))},{id:`rose-pine`,displayName:`Rosé Pine`,type:`dark`,import:(()=>j(()=>import(`./_aMsaMD1D2.js`),[]))},{id:`rose-pine-dawn`,displayName:`Rosé Pine Dawn`,type:`light`,import:(()=>j(()=>import(`./_8PwUyIlP2.js`),[]))},{id:`rose-pine-moon`,displayName:`Rosé Pine Moon`,type:`dark`,import:(()=>j(()=>import(`./_DO-qXg-I2.js`),[]))},{id:`slack-dark`,displayName:`Slack Dark`,type:`dark`,import:(()=>j(()=>import(`./_DnToyrRv2.js`),[]))},{id:`slack-ochin`,displayName:`Slack Ochin`,type:`light`,import:(()=>j(()=>import(`./_B2OO5cIa2.js`),[]))},{id:`snazzy-light`,displayName:`Snazzy Light`,type:`light`,import:(()=>j(()=>import(`./_4G7pJPwS2.js`),[]))},{id:`solarized-dark`,displayName:`Solarized Dark`,type:`dark`,import:(()=>j(()=>import(`./_UdsmMDCL2.js`),[]))},{id:`solarized-light`,displayName:`Solarized Light`,type:`light`,import:(()=>j(()=>import(`./_C1IUL_tW2.js`),[]))},{id:`synthwave-84`,displayName:`Synthwave '84`,type:`dark`,import:(()=>j(()=>import(`./_nFMaYfgc2.js`),[]))},{id:`tokyo-night`,displayName:`Tokyo Night`,type:`dark`,import:(()=>j(()=>import(`./_oM2G3aXe.js`),[]))},{id:`vesper`,displayName:`Vesper`,type:`dark`,import:(()=>j(()=>import(`./_DdrHHSXu.js`),[]))},{id:`vitesse-black`,displayName:`Vitesse Black`,type:`dark`,import:(()=>j(()=>import(`./_fwtXNY1n.js`),[]))},{id:`vitesse-dark`,displayName:`Vitesse Dark`,type:`dark`,import:(()=>j(()=>import(`./_BZCL-v6S.js`),[]))},{id:`vitesse-light`,displayName:`Vitesse Light`,type:`light`,import:(()=>j(()=>import(`./_VbXTXTou.js`),[]))}].map(e=>[e.id,e.import])),Ps=Et({createOnigurumaEngine:()=>oc,getDefaultWasmLoader:()=>ac,loadWasm:()=>$s,setDefaultWasmLoader:()=>ic}),Fs=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function Is(){return 2147483648}function Ls(){return typeof performance<`u`?performance.now():Date.now()}var Rs=(e,t)=>e+(t-e%t)%t;async function zs(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=Is();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,Rs(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:Ls,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 Bs=Object.defineProperty,Vs=(e,t,n)=>t in e?Bs(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,U=(e,t,n)=>Vs(e,typeof t==`symbol`?t:t+``,n),W=null;function Hs(e){throw new Fs(e.UTF8ToString(e.getLastOnigError()))}var Us=class e{constructor(t){U(this,`utf16Length`),U(this,`utf8Length`),U(this,`utf16Value`),U(this,`utf8Value`),U(this,`utf16OffsetToUtf8`),U(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}},Ws=class e{constructor(t){if(U(this,`id`,++e.LAST_ID),U(this,`_onigBinding`),U(this,`content`),U(this,`utf16Length`),U(this,`utf8Length`),U(this,`utf16OffsetToUtf8`),U(this,`utf8OffsetToUtf16`),U(this,`ptr`),!W)throw new Fs(`Must invoke loadWasm first.`);this._onigBinding=W,this.content=t;let n=new Us(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||=W.omalloc(1e4),e._sharedPtrInUse=!0,W.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString(W)}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)}};U(Ws,`LAST_ID`,0),U(Ws,`_sharedPtr`,0),U(Ws,`_sharedPtrInUse`,!1);var Gs=Ws,Ks=class{constructor(e){if(U(this,`_onigBinding`),U(this,`_ptr`),!W)throw new Fs(`Must invoke loadWasm first.`);let t=[],n=[];for(let r=0,i=e.length;r<i;r++){let i=new Us(e[r]);t[r]=i.createString(W),n[r]=i.utf8Length}let r=W.omalloc(4*e.length);W.HEAPU32.set(t,r/4);let i=W.omalloc(4*e.length);W.HEAPU32.set(n,i/4);let a=W.createOnigScanner(r,i,e.length);for(let n=0,r=e.length;n<r;n++)W.ofree(t[n]);W.ofree(i),W.ofree(r),a===0&&Hs(W),this._onigBinding=W,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 Gs(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 qs(e){return typeof e.instantiator==`function`}function Js(e){return typeof e.default==`function`}function Ys(e){return e.data!==void 0}function Xs(e){return typeof Response<`u`&&e instanceof Response}function Zs(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 Qs;function $s(e){if(Qs)return Qs;async function t(){W=await zs(async t=>{let n=e;return n=await n,typeof n==`function`&&(n=await n(t)),typeof n==`function`&&(n=await n(t)),qs(n)?n=await n.instantiator(t):Js(n)?n=await n.default(t):(Ys(n)&&(n=n.data),Xs(n)?n=typeof WebAssembly.instantiateStreaming==`function`?await tc(n)(t):await nc(n)(t):Zs(n)||n instanceof WebAssembly.Module?n=await ec(n)(t):`default`in n&&n.default instanceof WebAssembly.Module&&(n=await ec(n.default)(t))),`instance`in n&&(n=n.instance),`exports`in n&&(n=n.exports),n})}return Qs=t(),Qs}function ec(e){return t=>WebAssembly.instantiate(e,t)}function tc(e){return t=>WebAssembly.instantiateStreaming(e,t)}function nc(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}var rc;function ic(e){rc=e}function ac(){return rc}async function oc(e){return e&&await $s(e),{createScanner(e){return new Ks(e.map(e=>typeof e==`string`?e:e.source))},createString(e){return new Gs(e)}}}var sc=Es({});Os(sc,Ps);var G=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function cc(e){return lc(e)}function lc(e){return Array.isArray(e)?uc(e):e instanceof RegExp?e:typeof e==`object`?dc(e):e}function uc(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=lc(e[n]);return t}function dc(e){let t={};for(let n in e)t[n]=lc(e[n]);return t}function fc(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function pc(e){let t=~e.lastIndexOf(`/`)||~e.lastIndexOf(`\\`);return t===0?e:~t===e.length-1?pc(e.substring(0,e.length-1)):e.substr(~t+1)}var mc=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,hc=class{static hasCaptures(e){return e!==null&&(mc.lastIndex=0,mc.test(e))}static replaceCaptures(e,t,n){return e.replace(mc,(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 gc(e,t){return e<t?-1:+(e>t)}function _c(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=gc(e[r],t[r]);if(n!==0)return n}return 0}return n-r}function vc(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 yc(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,`\\$&`)}var bc=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}},xc=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(Ec(e),t)}static createFromParsedTheme(e,t){return Oc(e,t)}_cachedMatchRoot=new bc(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=>Cc(e.parent,t.parentScopes));return n?new Tc(n.fontStyle,n.foreground,n.background):null}},Sc=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 Cc(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&&!wc(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function wc(e,t){return t===e||e.startsWith(t)&&e[t.length]===`.`}var Tc=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function Ec(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`&&vc(i.settings.foreground)&&(s=i.settings.foreground);let c=null;typeof i.settings.background==`string`&&vc(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 Dc(l,u,e,o,s,c)}}return n}var Dc=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}},K=(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))(K||{});function Oc(e,t){e.sort((e,t)=>{let n=gc(e.scope,t.scope);return n!==0||(n=_c(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 kc(t),o=new Tc(n,a.getId(r),a.getId(i)),s=new Mc(new jc(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 xc(a,o,s)}var kc=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)}},Ac=Object.freeze([]),jc=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||Ac,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)}},Mc=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(),jc.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(_c(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 jc(e,t,n,r,i))}},Nc=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=Fc(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 Pc(e){return e}function Fc(e){return e}function Ic(e,t){let n=[],r=Rc(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(Lc(i)){let e=[];do e.push(i),i=r.next();while(Lc(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 Lc(e){return!!e&&!!e.match(/[\w\.:]+/)}function Rc(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 zc(e){typeof e.dispose==`function`&&e.dispose()}var Bc=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},Vc=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},Hc=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))}},Uc=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Bc(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new Hc;for(let n of e)Wc(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof Bc){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 Wc(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 Bc?Kc({baseGrammar:a,selfGrammar:i},r):Gc(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 Bc(e))}function Gc(e,t,n){if(t.repository&&t.repository[e]){let r=t.repository[e];qc([r],t,n)}}function Kc(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&qc(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&qc(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function qc(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?fc({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&qc(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let a=$c(i);switch(a.kind){case 0:Kc({...t,selfGrammar:t.baseGrammar},n);break;case 1:Kc(t,n);break;case 2:Gc(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?Gc(a.ruleName,i,n):Kc(i,n)}else a.kind===4?n.add(new Vc(a.scopeName,a.ruleName)):n.add(new Bc(a.scopeName))}}}var Jc=class{kind=0},Yc=class{kind=1},Xc=class{constructor(e){this.ruleName=e}kind=2},Zc=class{constructor(e){this.scopeName=e}kind=3},Qc=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function $c(e){if(e===`$base`)return new Jc;if(e===`$self`)return new Yc;let t=e.indexOf(`#`);return t===-1?new Zc(e):t===0?new Xc(e.substring(1)):new Qc(e.substring(0,t),e.substring(t+1))}var el=/\\(\d+)/,tl=/\\(\d+)/g,nl=-1,rl=-2;function il(e){return e}function al(e){return e}var ol=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=hc.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=hc.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${pc(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:hc.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:hc.replaceCaptures(this._contentName,e,t)}},sl=class extends ol{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!`)}},cl=class extends ol{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new pl(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 ml,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},ll=class extends ol{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 ml,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},ul=class extends ol{_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 pl(i,this.id),this.beginCaptures=a,this._end=new pl(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 ml;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}},dl=class extends ol{_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 pl(i,this.id),this.beginCaptures=a,this.whileCaptures=s,this._while=new pl(o,rl),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 ml;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 ml,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||``),this._cachedCompiledWhilePatterns}},fl=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new sl(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new cl(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(t.begin===void 0){t.repository&&(r=fc({},r,t.repository));let i=t.patterns;return i===void 0&&t.include&&(i=[{include:t.include}]),new ll(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new dl(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 ul(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=$c(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 ll||e instanceof ul||e instanceof dl)&&e.hasMissingPatterns&&e.patterns.length===0&&(t=!0),t)continue;i.push(s)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},pl=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`&&el.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 tl.lastIndex=0,this.source.replace(tl,(e,t)=>yc(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}},ml=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 hl(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 hl(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},hl=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(`
|
|
35
35
|
`)}findNextMatchSync(e,t,n){let r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},gl=class{constructor(e,t){this.languageId=e,this.tokenType=t}},_l=class e{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,t){this._defaultAttributes=new gl(e,8),this._embeddedLanguagesMatcher=new vl(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 gl(0,0);_getBasicScopeAttributes=new bc(e=>new gl(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/},vl=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])=>yc(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 yl=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function bl(e,t,n,r,i,a,o,s){let c=t.content.length,l=!1,u=-1;if(o){let o=xl(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 yl(i,!0);f()}return new yl(i,!1);function f(){let o=Sl(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===nl){let o=i.getRule(e);a.produce(i,s[0].start),i=i.withContentNameScopesList(i.nameScopesList),Dl(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 ul){let r=o;Dl(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 dl){let r=o;Dl(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(Dl(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 xl(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 dl&&s.push({rule:n,stack:t})}for(let c=s.pop();c;c=s.pop()){let{ruleScanner:s,findOptions:l}=El(c.rule,e,c.stack.endRule,n,r===o),u=s.findNextMatchSync(t,r,l);if(u){if(u.ruleId!==rl){i=c.stack.pop();break}u.captureIndices&&u.captureIndices.length&&(a.produce(c.stack,u.captureIndices[0].start),Dl(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 Sl(e,t,n,r,i,a){let o=Cl(e,t,n,r,i,a),s=e.getInjections();if(s.length===0)return o;let c=wl(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 Cl(e,t,n,r,i,a){let{ruleScanner:o,findOptions:s}=Tl(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 wl(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}=Tl(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 Tl(e,t,n,r,i){return{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function El(e,t,n,r,i){return{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function Dl(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));bl(e,p,n&&d.start===0,d.start,f,i,!1,0),zc(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 Ol(t,d.end))}}for(;l.length>0;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop()}var Ol=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function kl(e,t,n,r,i,a,o,s){return new Nl(e,t,n,r,i,a,o,s)}function Al(e,t,n,r,i){let a=Ic(t,jl),o=fl.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 jl(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(Ml(t[r],e))return n=r+1,!0;return!1})}function Ml(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 Nl=class{constructor(e,t,n,r,i,a,o,s){if(this._rootScopeName=e,this.balancedBracketSelectors=a,this._onigLib=s,this._basicScopeAttributesProvider=new _l(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=Pl(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(let e of Object.keys(i)){let t=Ic(e,jl);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)Al(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&&Al(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(il(t));return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[al(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]=Pl(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=fl.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===Il.NULL){i=!0;let e=this._basicScopeAttributesProvider.getDefaultAttributes(),n=this.themeProvider.getDefaults(),r=Nc.set(0,e.languageId,e.tokenType,null,n.fontStyle,n.foregroundId,n.backgroundId),a=this.getRule(this._rootId).getName(null,null),o;o=a?Fl.createRootAndLookUpScopeName(a,r,this):Fl.createRoot(`unknown`,r),t=new Il(null,this._rootId,-1,-1,!1,null,o,o)}else i=!1,t.reset();e+=`
|
|
36
36
|
`;let a=this.createOnigString(e),o=a.content.length,s=new Rl(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),c=bl(this,a,i,0,t,s,!0,r);return zc(a),{lineLength:o,lineTokens:s,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function Pl(e,t){return e=cc(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 Fl=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=Sc.push(i,t.scopeNames),r=new e(r,i,t.encodedTokenAttributes);return r}static createRoot(t,n){return new e(null,new Sc(null,t),n)}static createRootAndLookUpScopeName(t,n,r){let i=r.getMetadataForScope(t),a=new Sc(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),Nc.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}},Il=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)?Fl.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:al(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=Fl.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new e(t,il(n.ruleId),n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,Fl.fromExtension(r,n.contentNameScopesList))}},Ll=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(e=>e===`*`?(this.allowAny=!0,[]):Ic(e,jl).map(e=>e.matcher)),this.unbalancedBracketScopes=t.flatMap(e=>Ic(e,jl).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}},Rl=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=Nc.set(n,0,Pc(e.type),null,-1,0,0));this.balancedBracketSelectors&&(r=this.balancedBracketSelectors.match(t))}if(r&&(n=Nc.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}},zl=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,kl(e,a,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},Bl=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new zl(xc.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(xc.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 Ll(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,r,i){let a=new Uc(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)}},Vl=Il.NULL;function Hl(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 Ul(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function Wl(e){return Array.isArray(e)?e:[e]}async function Gl(e){return Promise.resolve(typeof e==`function`?e():e).then(e=>e.default||e)}function Kl(e){return!e||[`plaintext`,`txt`,`text`,`plain`].includes(e)}function ql(e){return e===`ansi`||Kl(e)}function Jl(e){return e===`none`}function Yl(e){return Jl(e)}var Xl=/(\r?\n)/g;function Zl(e,t=!1){if(e.length===0)return[[``,0]];let n=e.split(Xl),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 Ql={light:`#333333`,dark:`#bbbbbb`},$l={light:`#fffffe`,dark:`#1e1e1e`},eu=`__shiki_resolved`;function tu(e){if(e?.[eu])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`?Ql.light:Ql.dark,n||=t.type===`light`?$l.light:$l.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,eu,{enumerable:!1,writable:!1,value:!0}),t}async function nu(e){return[...new Set((await Promise.all(e.filter(e=>!ql(e)).map(async e=>await Gl(e).then(e=>Array.isArray(e)?e:[e])))).flat())]}async function ru(e){return(await Promise.all(e.map(async e=>Yl(e)?null:tu(await Gl(e))))).filter(e=>!!e)}function iu(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 G(`Circular alias \`${[...n].join(` -> `)} -> ${e}\``);n.add(e)}}return e}var au=class extends Bl{_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=tu(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=xc.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=iu(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 G(`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))}},ou=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}},su=0;function cu(e){su+=1,e.warnings!==!1&&su>=10&&su%10==0&&console.warn(`[Shiki] ${su} 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 G("`engine` option is required for synchronous mode");let n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(tu),i=new au(new ou(e.engine,n),r,n,e.langAlias),a;function o(t){return iu(t,e.langAlias)}function s(e){g();let t=i.getGrammar(typeof e==`string`?e:e.name);if(!t)throw new G(`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 G(`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 nu(e))}function m(...e){g();for(let t of e.flat(1))i.loadTheme(t)}async function h(...e){return g(),m(await ru(e))}function g(){if(t)throw new G(`Shiki instance has been disposed`)}function _(){t||(t=!0,i.dispose(),--su)}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 lu(e){e.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,n,r]=await Promise.all([ru(e.themes||[]),nu(e.langs||[]),e.engine]);return cu({...e,themes:t,langs:n,engine:r})}var uu=new WeakMap;function du(e,t){uu.set(e,t)}function fu(e){return uu.get(e)}var pu=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(Wl(n).map(e=>[e,Vl])),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 mu(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function mu(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 hu(e,t){if(!(e instanceof pu))throw new G(`Invalid grammar state`);return e.getInternalStack(t)}var gu=/,/,_u=/ /;function vu(e,t,n={}){let{theme:r=e.getLoadedThemes()[0]}=n;if(Kl(e.resolveLangAlias(n.lang||`text`))||Jl(r))return Zl(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 G(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${o.name}"`);if(!n.grammarState.themes.includes(i.name))throw new G(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${i.name}"`)}return bu(t,o,i,a,n)}function yu(...e){if(e.length===2)return fu(e[1]);let[t,n,r={}]=e,{lang:i=`text`,theme:a=t.getLoadedThemes()[0]}=r;if(Kl(i)||Jl(a))throw new G(`Plain language does not have grammar state`);if(i===`ansi`)throw new G(`ANSI language does not have grammar state`);let{theme:o,colorMap:s}=t.setTheme(a),c=t.getLanguage(i);return new pu(xu(n,c,o,s,r).stateStack,c.name,o.name)}function bu(e,t,n,r,i){let a=xu(e,t,n,r,i),o=new pu(a.stateStack,t.name,n.name);return du(a.tokens,o),a.tokens}function xu(e,t,n,r,i){let a=Hl(n,i),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:s=500,includeExplanation:c=!1}=i,l=Zl(e),u=i.grammarState?hu(i.grammarState,n.name)??Vl:i.grammarContextCode==null?Vl:xu(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=Ul(r[Nc.getForeground(s)],a),u=Nc.getFontStyle(s),f={content:i.substring(t,o),offset:p+t,color:l,fontStyle:u};if(c===`tokenType`)f.type=Nc.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(gu).map(e=>e.trim());break;case`object`:n=t.scope;break;default:continue}e.push({settings:t,selectors:n.map(e=>e.split(_u))})}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`?Su(t.scopes):Cu(e,t.scopes)}),g+=1}}d.push(f)}f.push(d),d=[],u=_.ruleStack}return{tokens:f,stateStack:u}}function Su(e){return e.map(e=>({scopeName:e}))}function Cu(e,t){let n=[];for(let r=0,i=t.length;r<i;r++){let i=t[r];n[r]={scopeName:i,themeMatches:Eu(e,i,t.slice(0,r))}}return n}function wu(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]===`.`}function Tu(e,t,n){if(!wu(e.at(-1),t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)wu(e[r],n[i])&&--r,--i;return r===-1}function Eu(e,t,n){let r=[];for(let{selectors:i,settings:a}of e)for(let e of i)if(Tu(e,t,n)){r.push(a);break}return r}function Du(e,t,n,r=vu){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:fu(a),theme:typeof i.theme==`string`?i.theme:i.theme.name}}),o=Ou(...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 pu(Object.fromEntries(a.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),a[0].state.lang):void 0;return c&&du(s,c),s}function Ou(...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 ku=/\s+/g;function Au(e,t){if(!t)return e;e.properties||={},e.properties.class||=[],typeof e.properties.class==`string`&&(e.properties.class=e.properties.class.split(ku)),Array.isArray(e.properties.class)||(e.properties.class=[]);let n=Array.isArray(t)?t:t.split(ku);for(let t of n)t&&!e.properties.class.includes(t)&&e.properties.class.push(t);return e}var ju=/:?lang=["']([^"']+)["']/g,Mu=/(?:```|~~~)([\w-]+)/g,Nu=/\\begin\{([\w-]+)\}/g,Pu=/<script\s+(?:type|lang)=["']([^"']+)["']/gi,Fu=/^\s*---\r?\n[\s\S]*?\r?\n---(?:\r?\n|\s*$)/;function Iu(e){let t=Zl(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 Lu(e,t,n){let r=new Set;for(let t of e.matchAll(ju)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(Mu)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(Nu)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(Pu)){let e=t[1].toLowerCase().trim(),n=e.includes(`/`)?e.split(`/`).pop():e;n&&r.add(n)}if(Fu.test(e)&&r.add(`yaml`),!n)return[...r];let i=n.getBundledLanguages();return[...r].filter(e=>e&&i[e])}var Ru=[`color`,`background-color`];function zu(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 Bu(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 Vu(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=Bu(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 zu(e,a)})):e}function Hu(e,t,n,r,i=`css-vars`){let a={content:e.content,explanation:e.explanation,offset:e.offset},o=t.map(t=>Uu(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&&Ru.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 G('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 Uu(e){let t={};if(e.color&&(t.color=e.color),e.bgColor&&(t[`background-color`]=e.bgColor),e.fontStyle){e.fontStyle&K.Italic&&(t[`font-style`]=`italic`),e.fontStyle&K.Bold&&(t[`font-weight`]=`bold`);let n=[];e.fontStyle&K.Underline&&n.push(`underline`),e.fontStyle&K.Strikethrough&&n.push(`line-through`),n.length&&(t[`text-decoration`]=n.join(` `))}return t}function Wu(e){return typeof e==`string`?e:Object.entries(e).map(([e,t])=>`${e}:${t}`).join(`;`)}function Gu(){let e=new WeakMap;function t(t){if(!e.has(t.meta)){let n=Iu(t.source);function r(e){if(typeof e==`number`){if(e<0||e>t.source.length)throw new G(`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 G(`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 G(`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)}));Ku(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 Vu(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 G(`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+=qu(a.children[e]),c===-1&&s.length===t&&(c=e+1),l===-1&&s.length===n&&(l=e+1);if(c===-1)throw new G(`Failed to find start index for decoration ${JSON.stringify(i.start)}`);if(l===-1)throw new G(`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&&Au(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 Ku(e){for(let t=0;t<e.length;t++){let n=e[t];if(n.start.offset>n.end.offset)throw new G(`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 G(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(t.start)} intersect.`)}}}}function qu(e){return e.type===`text`?e.value:e.type===`element`?e.children.map(qu).join(``):``}var Ju=[Gu()];function Yu(e){let t=Xu(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...Ju]}function Xu(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 Zu=[`black`,`red`,`green`,`yellow`,`blue`,`magenta`,`cyan`,`white`,`brightBlack`,`brightRed`,`brightGreen`,`brightYellow`,`brightBlue`,`brightMagenta`,`brightCyan`,`brightWhite`],Qu={1:`bold`,2:`dim`,3:`italic`,4:`underline`,7:`reverse`,8:`hidden`,9:`strikethrough`};function $u(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 ed(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 td(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)Qu[r]&&t.push({type:`setDecoration`,value:Qu[r]});else if(r<=29){let e=Qu[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:Zu[r-30]}});else if(r===38){let n=ed(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:Zu[r-40]}});else if(r===48){let n=ed(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:Zu[r-90+8]}}):r>=100&&r<=107&&t.push({type:`setBackgroundColor`,value:{type:`named`,name:Zu[r-100+8]}})}}return t}function nd(){let e=null,t=null,n=new Set;return{parse(r){let i=[],a=0;do{let o=$u(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=td(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 rd={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 id(e=rd){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<Zu.length;e++)r.push(t(Zu[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 ad=/#([0-9a-f]{3,8})/i,od=/var\((--[\w-]+-ansi-[\w-]+)\)/,sd={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 cd(e,t,n){let r=Hl(e,n),i=Zl(t),a=id(Object.fromEntries(Zu.map(t=>{let n=`terminal.ansi${t[0].toUpperCase()}${t.substring(1)}`;return[t,e.colors?.[n]||sd[t]]}))),o=nd();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=Ul(i,r),o=Ul(o,r),n.decorations.has(`dim`)&&(i=ld(i));let s=K.None;return n.decorations.has(`bold`)&&(s|=K.Bold),n.decorations.has(`italic`)&&(s|=K.Italic),n.decorations.has(`underline`)&&(s|=K.Underline),n.decorations.has(`strikethrough`)&&(s|=K.Strikethrough),{content:n.value,offset:t[1],color:i,bgColor:o,fontStyle:s}}))}function ld(e){let t=e.match(ad);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(od);return n?`var(${n[1]}-dim)`:e}function ud(e,t,n={}){let r=e.resolveLangAlias(n.lang||`text`),{theme:i=e.getLoadedThemes()[0]}=n;if(!Kl(r)&&!Jl(i)&&r===`ansi`){let{theme:r}=e.setTheme(i);return cd(r,t,n)}return vu(e,t,n)}function dd(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 G("`themes` option must not be empty");let p=Du(e,t,n,ud);if(c=fu(p),l&&l!==`light-dark()`&&!f.some(e=>e.color===l))throw new G(`\`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=>Hu(e,h,u,l,d))),c&&du(a,c);let g=f.map(e=>Hl(e.theme,n));i=fd(f,m,g,u,l,`fg`,d),r=fd(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=Hl(n.theme,n);a=ud(e,t,n);let l=e.getTheme(n.theme);r=Ul(l.bg,s),i=Ul(l.fg,s),o=l.name,c=fu(a)}else throw new G("Invalid options, either `theme` or `themes` must be provided");return{tokens:a,fg:i,bg:r,themeName:o,rootStyle:s,grammarState:c}}function fd(e,t,n,r,i,a,o){return e.map((s,c)=>{let l=Ul(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 G('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${Ul(t[r][a],n[r])||`inherit`}, ${Ul(t[i][a],n[i])||`inherit`});${u}`}return l}return o===`css-vars`?u:null}).filter(e=>!!e).join(`;`)}var pd=/^\s+$/,md=/^(\s*)(.*?)(\s*)$/;function hd(e,t,n,r={meta:{},options:n,codeToHast:(t,n)=>hd(e,t,n),codeToTokens:(t,n)=>dd(e,t,n)}){let i=t;for(let e of Yu(n))i=e.preprocess?.call(r,i,n)||i;let{tokens:a,fg:o,bg:s,themeName:c,rootStyle:l,grammarState:u}=dd(e,i,n),{mergeWhitespaces:d=!0,mergeSameStyleTokens:f=!1}=n;d===!0?a=_d(a):d===`never`&&(a=vd(a)),f&&(a=yd(a));let p={...r,get source(){return i}};for(let e of Yu(n))a=e.tokens?.call(p,a)||a;return gd(a,{...n,fg:o,bg:s,themeName:c,rootStyle:n.rootStyle===!1?!1:n.rootStyle??l},p,u)}function gd(e,t,n,r=fu(e)){let i=Yu(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:Au,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:`
|
|
37
37
|
`}));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=Wu(a.htmlStyle||Uu(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&&du(m,r),m}function _d(e){return e.map(e=>{let t=[],n=``,r;return e.forEach((i,a)=>{let o=!(i.fontStyle&&(i.fontStyle&K.Underline||i.fontStyle&K.Strikethrough));o&&pd.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 vd(e){return e.map(e=>e.flatMap(e=>{if(pd.test(e.content))return e;let t=e.content.match(md);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 yd(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=Wu(e.htmlStyle||Uu(e)),i=Wu(n.htmlStyle||Uu(n)),a=e.fontStyle&&(e.fontStyle&K.Underline||e.fontStyle&K.Strikethrough),o=n.fontStyle&&(n.fontStyle&K.Underline||n.fontStyle&K.Strikethrough);!a&&!o&&r===i?e.content+=n.content:t.push({...n})}return t})}var bd=Ro;function xd(e,t,n){let r={meta:{},options:n,codeToHast:(t,n)=>hd(e,t,n),codeToTokens:(t,n)=>dd(e,t,n)},i=bd(hd(e,t,n,r));for(let e of Yu(n))i=e.postprocess?.call(r,i,n)||i;return i}async function Sd(e){let t=await lu(e);return{getLastGrammarState:(...e)=>yu(t,...e),codeToTokensBase:(e,n)=>ud(t,e,n),codeToTokensWithThemes:(e,n)=>Du(t,e,n),codeToTokens:(e,n)=>dd(t,e,n),codeToHast:(e,n)=>hd(t,e,n),codeToHtml:(e,n)=>xd(t,e,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function Cd(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,ql(n))return[];let r=t[n];if(!r)throw new G(`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(Yl(e))return`none`;if(typeof e==`string`){let t=n[e];if(!t)throw new G(`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 Sd({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 wd(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 Td(e,t){let n=wd(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 Ed=Cd({langs:Ms,themes:Ns,engine:()=>(0,sc.createOnigurumaEngine)(j(()=>import(`./_BnjxR4X6.js`),[]))}),{codeToHtml:Dd,codeToHast:Od,codeToTokens:kd,codeToTokensBase:Ad,codeToTokensWithThemes:jd,getSingletonHighlighter:Md,getLastGrammarState:Nd}=Td(Ed,{guessEmbeddedLanguages:Lu}),Pd=4294967295,Fd=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:Pd,end:Pd,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 Id(e){if([...e].length!==1)throw Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function Ld(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}var Rd=new Set([`alnum`,`alpha`,`ascii`,`blank`,`cntrl`,`digit`,`graph`,`lower`,`print`,`punct`,`space`,`upper`,`word`,`xdigit`]),q=String.raw;function zd(e,t){if(e==null)throw Error(t??`Value expected`);return e}var Bd=q`\[\^?`,Vd=`c.? | C(?:-.?)?|${q`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${q`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${q`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${q`o\{[^\}]*\}?`}|${q`\d{1,3}`}`,Hd=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,Ud=new RegExp(q`
|
|
@@ -1533,4 +1533,4 @@ XID_Start XIDS`.split(/\s/).map(e=>[up(e),e])),nm=new Map([[`s`,J(383)],[J(383),
|
|
|
1533
1533
|
`}function wy(e,t){return Math.max(e.additionLines.length,e.deletionLines.length)>t}function Ty(e,t){return e.isPartial&&t&&(e.type===`change`||e.type===`rename-changed`)}function Ey(e,t){return e.lineNumber===t.lineNumber&&e.side===t.side&&e.metadata===t.metadata}function Dy(e,t){return e.slotName===t.slotName&&e.hunkIndex===t.hunkIndex&&e.lines===t.lines&&e.lineCountKnown===t.lineCountKnown&&e.type===t.type&&e.expandable?.chunked===t.expandable?.chunked&&e.expandable?.up===t.expandable?.up&&e.expandable?.down===t.expandable?.down}async function Oy(e,t=300){let n;try{await Promise.race([e(),new Promise(e=>{n=setTimeout(e,t)})])}finally{n!=null&&clearTimeout(n)}}function ky({oldFile:e,newFile:t},n){if(e!==void 0||t!==void 0){if(e===void 0||t===void 0)throw Error(`${n}: Pass null for an intentionally missing oldFile or newFile side`);if(e===null){if(t===null)throw Error(`${n}: You must pass oldFile, newFile, or both`);return{oldFile:e,newFile:t}}return{oldFile:e,newFile:t}}}function Ay(e){return{theme:e?.theme,disableLineNumbers:e?.disableLineNumbers,overflow:e?.overflow,collapsed:e?.collapsed,disableFileHeader:e?.disableFileHeader,disableVirtualizationBuffers:e?.disableVirtualizationBuffers,stickyHeader:e?.stickyHeader,preferredHighlighter:e?.preferredHighlighter,useCSSClasses:e?.useCSSClasses,useTokenTransformer:x_(e),tokenizeMaxLineLength:e?.tokenizeMaxLineLength,tokenizeMaxLength:e?.tokenizeMaxLength,diffStyle:e?.diffStyle,diffIndicators:e?.diffIndicators,disableBackground:e?.disableBackground,hunkSeparators:typeof e?.hunkSeparators==`function`?`custom`:e?.hunkSeparators,expandUnchanged:e?.expandUnchanged,loadDiffFiles:e?.loadDiffFiles,collapsedContextThreshold:e?.collapsedContextThreshold,lineDiffType:e?.lineDiffType,maxLineDiffLength:e?.maxLineDiffLength,expansionLineCount:e?.expansionLineCount,headerRenderMode:e?.renderCustomHeader==null?`default`:`custom`}}function jy(e){return e.isPartial&&(e.type===`change`||e.type===`rename-changed`||e.type===`rename-pure`)}var My=-1,Ny=class{options;workerManager;isContainerManaged;static LoadedCustomComponent=!0;__id=`file-diff:${++My}`;type=`file-diff`;fileContainer;spriteSVG;pre;codeUnified;codeDeletions;codeAdditions;bufferBefore;bufferAfter;themeCSSStyle;appliedThemeCSS;hasAdoptedThemeCSS=!1;unsafeCSSStyle;appliedUnsafeCSS;gutterUtilityContent;headerElement;headerPrefix;headerFilenameSuffix;headerMetadata;headerCustom;separatorCache=new Map;errorWrapper;placeHolder;hunksRenderer;resizeManager;scrollSyncManager;interactionManager;annotationCache=new Map;lineAnnotations=[];managersDirty=!1;deletionFile;additionFile;fileDiff;renderRange;pendingFiles;appliedPreAttributes;lastRenderedHeaderHTML;cachedHeaderHTML;lastRowCount;mounted=!1;enabled=!0;editor;refreshViewTimeout;lineStateRefreshPending=!1;deferredSelectedLines;deferredEditorActiveLine;constructor(e={theme:M},t,n=!1){this.options=e,this.workerManager=t,this.isContainerManaged=n,this.hunksRenderer=this.createHunksRenderer(e),this.resizeManager=new ss,this.scrollSyncManager=new z_,this.interactionManager=new Vo(`diff`,Ho(e,typeof e.hunkSeparators==`function`||(e.hunkSeparators??`line-info`)===`line-info`||e.hunkSeparators===`line-info-basic`?this.handleExpandHunk:void 0,this.getLineIndex)),this.workerManager?.subscribeToThemeChanges(this),this.enabled=!0}handleHighlightRender=()=>{this.rerender()};getHunksRendererOptions(e){return Ay(e)}createHunksRenderer(e){return new ly(this.getHunksRendererOptions(e),this.handleHighlightRender,this.workerManager)}getLineIndex=(e,t=`additions`)=>{let n=this.fileDiffCache;if(n==null)return;let r=n.hunks.at(-1),i,a;hunkIterator:for(let o of n.hunks){let n=t===`deletions`?o.deletionStart:o.additionStart,s=t===`deletions`?o.deletionCount:o.additionCount,c=Dr(n,s)+1,l=o.splitLineStart,u=o.unifiedLineStart;if(e<c){let t=c-e;i=Math.max(u-t,0),a=Math.max(l-t,0);break hunkIterator}if(e>=c+s){if(o===r){let t=e-(c+s);i=u+o.unifiedLineCount+t,a=l+o.splitLineCount+t;break hunkIterator}continue}for(let n of o.hunkContent)if(n.type===`context`){if(e<c+n.lines){let t=e-c;a=l+t,i=u+t;break hunkIterator}c+=n.lines,l+=n.lines,u+=n.lines}else{let r=t===`deletions`?n.deletions:n.additions;if(e<c+r){let r=e-c;i=u+(t===`additions`?n.deletions:0)+r,a=l+r;break hunkIterator}c+=r,l+=Math.max(n.deletions,n.additions),u+=n.deletions+n.additions}break hunkIterator}if(i!=null&&a!=null)return[i,a]};setOptions(e){e!=null&&(this.options=e,this.cachedHeaderHTML=void 0,this.hunksRenderer.setOptions(this.getHunksRendererOptions(e)),this.syncInteractionOptions())}syncInteractionOptions(){this.interactionManager.setOptions(Ho(this.options,typeof this.options.hunkSeparators==`function`||(this.options.hunkSeparators??`line-info`)===`line-info`||this.options.hunkSeparators===`line-info-basic`?this.handleExpandHunk:void 0,this.getLineIndex))}mergeOptions(e){this.options={...this.options,...e}}setThemeType(e){(this.options.themeType??`system`)!==e&&(this.mergeOptions({themeType:e}),this.applyCachedThemeState(e))}applyCachedThemeState(e){if(typeof this.options.theme==`string`||this.fileContainer==null||this.appliedThemeCSS==null)return!1;let t=this.appliedThemeCSS.baseThemeType??e;return this.appliedThemeCSS.themeType!==t&&(this.applyThemeState(this.fileContainer,this.appliedThemeCSS.themeStyles,e,this.appliedThemeCSS.baseThemeType),!0)}hasThemeChanged(){return this.appliedThemeCSS!=null&&!vr(this.appliedThemeCSS.theme,this.options.theme??M)}getHoveredLine=()=>this.interactionManager.getHoveredLine();setLineAnnotations(e){this.lineAnnotations=e}canPartiallyRender(e,t,n){return!(e||t||n||typeof this.options.hunkSeparators==`function`)}setSelectedLines(e,t){this.lineStateRefreshPending?this.deferredSelectedLines=[e,t]:this.interactionManager.setSelection(e,t)}setEditorActiveLine(e,t){this.lineStateRefreshPending?this.deferredEditorActiveLine=[e,t]:this.interactionManager.setEditorActiveLine(e,{lineNumberOnly:t?.lineNumberOnly,side:t?.side??`additions`})}flushDeferredLineState(){let{deferredEditorActiveLine:e,deferredSelectedLines:t}=this;this.lineStateRefreshPending=!1,this.deferredEditorActiveLine=void 0,this.deferredSelectedLines=void 0,e!=null&&this.setEditorActiveLine(...e),t!=null&&this.interactionManager.setSelection(...t)}flushManagers(){if(!this.managersDirty||this.pre==null){this.managersDirty=!1;return}let{diffStyle:e=`split`,overflow:t=`scroll`}=this.options;this.interactionManager.setup(this.pre),this.resizeManager.setup(this.pre,{disableAnnotations:t===`wrap`,columnVariables:this.shouldApplyColumnVariables(t)?`apply`:`measure`}),t===`scroll`&&e===`split`?this.scrollSyncManager.setup(this.pre,this.codeDeletions,this.codeAdditions):this.scrollSyncManager.cleanUp(),this.managersDirty=!1}shouldApplyColumnVariables(e){return typeof this.options.hunkSeparators==`function`||e===`scroll`&&(this.lineAnnotations.length>0||this.pre?.hasAttribute(`data-has-merge-conflict`)===!0)}getCodeScrollLeft(){return Math.max(this.codeUnified?.scrollLeft??0,this.codeDeletions?.scrollLeft??0,this.codeAdditions?.scrollLeft??0)}setCodeScrollLeft(e){this.codeUnified!=null&&(this.codeUnified.scrollLeft=e),this.codeAdditions!=null&&(this.codeAdditions.scrollLeft=e),this.codeDeletions!=null&&(this.codeDeletions.scrollLeft=e)}__getEffectiveCodeOptions(){return{...this.options,...this.hunksRenderer.getEffectiveCodeOptions()}}cleanUp(e=!1){gr(this.handleEditSessionRender),this.emitPostRender(!0),this.editor?.cleanUp(e),this.editor=void 0,this.resizeManager.cleanUp(),this.interactionManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.managersDirty=!1,this.workerManager?.unsubscribeToThemeChanges(this),this.renderRange=void 0,this.pendingFiles=void 0,this.isContainerManaged||this.fileContainer?.remove(),this.fileContainer=void 0,this.mounted=!1,e||(this.lineAnnotations=[]),this.clearAuxiliaryNodes(),this.annotationCache.clear(),this.pre=void 0,this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0,this.bufferBefore?.remove(),this.bufferBefore=void 0,this.bufferAfter?.remove(),this.bufferAfter=void 0,this.appliedPreAttributes=void 0,this.headerElement=void 0,this.headerPrefix=void 0,this.headerFilenameSuffix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0,this.placeHolder?.remove(),this.placeHolder=void 0,this.lastRenderedHeaderHTML=void 0,e||(this.cachedHeaderHTML=void 0),this.errorWrapper?.remove(),this.errorWrapper=void 0,this.spriteSVG=void 0,this.lastRowCount=void 0,this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0,this.hasAdoptedThemeCSS=!1,this.unsafeCSSStyle=void 0,this.appliedUnsafeCSS=void 0,e?this.hunksRenderer.recycle():(this.hunksRenderer.cleanUp(),this.workerManager=void 0,this.fileDiff=void 0,this.deletionFile=void 0,this.additionFile=void 0),this.refreshViewTimeout!=null&&(clearTimeout(this.refreshViewTimeout),this.refreshViewTimeout=void 0),this.lineStateRefreshPending=!1,this.deferredEditorActiveLine=void 0,this.deferredSelectedLines=void 0,this.enabled=!1}virtualizedSetup(){this.enabled=!0,this.workerManager?.subscribeToThemeChanges(this)}hydrate({fileContainer:e,prerenderedHTML:t,preventEmit:n=!1,lineAnnotations:r,fileDiff:i,...a}){if(!this.enabled)throw Error(`FileDiff.hydrate: attempting to call hydrate after cleaned up`);if(this.fileContainer!=null)throw Error(`FileDiff.hydrate: hydrate can only be called before the instance has rendered or hydrated`);let o=ky(a,`FileDiff.hydrate`),s=o?.oldFile,c=o?.newFile;this.hydrateElements(e,t),Ly(this.pre,Fy({fileDiff:i,oldFile:s,newFile:c}),this.options.collapsed)||Ry(this.headerElement,Iy({fileDiff:i,oldFile:s,newFile:c}),this.options.disableFileHeader)?this.render({...a,fileContainer:e,lineAnnotations:r,fileDiff:i,preventEmit:!0}):this.hydrationSetup({fileDiff:i,lineAnnotations:r,...o}),n||this.emitPostRender()}hydrateElements(e,t){this.fileContainer!==e&&this.emitPostRender(!0),v_(e,t);for(let t of e.shadowRoot?.children??[]){if(t instanceof SVGElement){this.spriteSVG=t;continue}if(t instanceof HTMLElement){if(t instanceof HTMLPreElement){this.pre=t;for(let e of t.children)!(e instanceof HTMLElement)||e.tagName.toLowerCase()!==`code`||(`deletions`in e.dataset&&(this.codeDeletions=e),`additions`in e.dataset&&(this.codeAdditions=e),`unified`in e.dataset&&(this.codeUnified=e));continue}if(`diffsHeader`in t.dataset){this.headerElement=t;continue}if(t instanceof HTMLStyleElement&&t.hasAttribute(`data-theme-css`)){this.themeCSSStyle=t;continue}if(t instanceof HTMLStyleElement&&t.hasAttribute(`data-unsafe-css`)){this.unsafeCSSStyle=t,this.appliedUnsafeCSS=t.textContent;continue}}}this.pre!=null&&(this.syncCodeNodesFromPre(this.pre),this.pre.removeAttribute(`data-dehydrated`)),this.fileContainer=e,this.hydrateMeasuredScrollbar()}hydrationSetup({fileDiff:e,oldFile:t,newFile:n,lineAnnotations:r}){this.lineAnnotations=r??this.lineAnnotations,this.additionFile=n,this.deletionFile=t,this.fileDiff=e??(t!==void 0&&n!==void 0?Oi(t,n,this.options.parseDiffOptions):void 0),this.pre!=null&&(this.syncInteractionOptions(),this.hunksRenderer.hydrate(this.fileDiff),this.renderAnnotations(),this.renderGutterUtility(),this.injectUnsafeCSS(),this.managersDirty=!0,this.flushManagers())}rerender(){!this.enabled||this.fileDiff==null&&this.additionFile==null&&this.deletionFile==null||this.render({forceRender:!0,renderRange:this.renderRange})}onThemeChange(){this.hunksRenderer.clearRenderCache(),this.rerender()}handleExpandHunk=(e,t,n)=>{this.expandHunk(e,t,n)};expandHunk=(e,t,n)=>{this.hunksRenderer.expandHunk(e,t,n),this.loadFilesIfNecessary(),this.rerender()};loadFilesIfNecessary(){let{fileDiff:e,options:{loadDiffFiles:t}}=this;e==null||t==null||!jy(e)||this.pendingFiles?.fileDiff===e||(this.pendingFiles={fileDiff:e,promise:this.loadFilesForDiff(e,t)})}async loadFilesForDiff(e,t){try{let n=await t(e);if(!this.enabled||this.fileDiff!==e)return;await this.handleFilesLoaded(e,n)}catch(e){if(this.options.disableErrorHandling===!0)throw e;console.error(e)}finally{this.pendingFiles?.fileDiff===e&&(this.pendingFiles=void 0)}}async handleFilesLoaded(e,t){this.fileDiff!==e||!e.isPartial||(A_(`merge`,e,t),this.setHydratedState(t),await Oy(()=>this.primeHighlightCache(e)),!(!this.enabled||this.fileDiff!==e)&&this.rerender())}setHydratedState(e){this.deletionFile=e.oldFile,this.additionFile=e.newFile,this.workerManager?.cleanUpTasks(this.hunksRenderer),this.hunksRenderer.clearRenderCache()}render({fileDiff:e,deferManagers:t=!1,forceRender:n=!1,preventEmit:r=!1,lineAnnotations:i,fileContainer:a,containerWrapper:o,renderRange:s,...c}){let l=ky(c,`FileDiff.render`),u=l?.oldFile,d=l?.newFile;if(!this.enabled)throw Error(`FileDiff.render: attempting to call render after cleaned up`);e!=null&&e.cacheKey===void 0&&(e.cacheKey=e.prevName==null?e.name:e.prevName+`:`+e.name),this.editor?.__postponeBgTokenizeToNextFrame();let{collapsed:f=!1,themeType:p=`system`,expandUnchanged:m=!1}=this.options,h=f?void 0:s,g=this.hasThemeChanged(),_=l!=null,v=_&&(!Py(u,this.deletionFile)||!Py(d,this.additionFile)),y=e!=null&&e!==this.fileDiff,b=i!=null&&(i.length>0||this.lineAnnotations.length>0)&&i!==this.lineAnnotations;if(!f&&Zh(h,this.renderRange)&&!n&&!b&&!g&&(e!=null&&e===this.fileDiff||e==null&&!v))return this.applyCachedThemeState(p);let x;e==null&&_&&(v||this.fileDiff==null)&&(x=Oi(l.oldFile,l.newFile,this.options.parseDiffOptions));let{renderRange:S}=this;if(this.renderRange=h,_?(this.deletionFile=u,this.additionFile=d):e!=null&&(this.deletionFile=void 0,this.additionFile=void 0),e==null?x!=null&&(y=!0,this.fileDiff=x):this.fileDiff=e,y&&(this.cachedHeaderHTML=void 0),i!=null&&this.setLineAnnotations(i),this.fileDiff==null)return!1;this.fileDiff.editSessionDirty===!0&&this.shouldSelfHealEditSession()&&(Gv(this.fileDiff,this.options.parseDiffOptions),this.hunksRenderer.refreshHighlightedResult()),m&&this.loadFilesIfNecessary(),this.hunksRenderer.setOptions(this.getHunksRendererOptions(this.options)),this.syncInteractionOptions(),this.hunksRenderer.setLineAnnotations(this.lineAnnotations);let{disableErrorHandling:C=!1,disableFileHeader:w=!1}=this.options;if(w&&(this.headerElement!=null&&(this.headerElement.remove(),this.headerElement=void 0,this.lastRenderedHeaderHTML=void 0),this.clearHeaderSlots()),a=this.getOrCreateFileContainer(a,o),this.applyCachedThemeState(p),f){this.removeRenderedCode(),this.clearAuxiliaryNodes();try{let e=this.hunksRenderer.renderDiff(this.fileDiff,fr);e!=null&&this.applyThemeState(a,e.themeStyles,p,e.baseThemeType),e?.headerElement!=null&&this.applyHeaderToDOM(e.headerElement,a),this.renderSeparators([]),this.injectUnsafeCSS()}catch(e){if(C)throw e;console.error(e),e instanceof Error&&this.applyErrorToDOM(e,a)}return r||this.emitPostRender(),!0}try{let e=this.getOrCreatePreNode(a);if(!(this.canPartiallyRender(n,b,v||y||g)&&this.applyPartialRender({previousRenderRange:S,renderRange:h}))){let t=this.hunksRenderer.renderDiff(this.fileDiff,h);if(t==null)return this.workerManager?.isInitialized()===!1&&this.workerManager.initialize().then(()=>this.rerender()),!1;this.applyThemeState(a,t.themeStyles,p,t.baseThemeType),t.headerElement!=null&&this.applyHeaderToDOM(t.headerElement,a),t.additionsContentAST!=null||t.deletionsContentAST!=null||t.unifiedContentAST!=null?this.applyHunksToDOM(e,t):this.pre!=null&&(this.pre.remove(),this.pre=void 0),this.renderSeparators(t.hunkData)}this.applyBuffers(e,h),this.injectUnsafeCSS(),this.renderAnnotations(),this.renderGutterUtility(),this.managersDirty=!0,t||this.flushManagers(),this.editor!=null&&this.syncRenderViewToEditor()}catch(e){if(C)throw e;console.error(e),e instanceof Error&&this.applyErrorToDOM(e,a)}return r||this.emitPostRender(),!0}emitPostRender(e=!1){let{fileContainer:t,options:{onPostRender:n}}=this;if(e){if(!this.mounted||(this.mounted=!1,t==null))return;this.options.onPostRender?.(t,this,`unmount`);return}if(t==null)return;let r=this.mounted?`update`:`mount`;this.mounted=!0,n?.(t,this,r)}get fileDiffCache(){return this.hunksRenderer.diffCache??this.fileDiff}syncRenderViewToEditor(){let e=this.editor,t=this.fileContainer,n=this.fileDiffCache,r=this.lineAnnotations,i=this.computeEditorRenderRange(this.renderRange);e!=null&&t!=null&&n!=null&&!n.isPartial&&this.hunksRenderer.initializeHighlighter().then(a=>{!this.enabled||this.editor!==e||this.fileContainer!==t||this.fileDiffCache!==n||e.__syncRenderView(a,t,n,r,i)})}computeEditorRenderRange(e){let t=this.fileDiffCache;if(e==null||t==null||q_(e))return e;let{diffStyle:n=`split`,expandUnchanged:r=!1,collapsedContextThreshold:i=1}=this.options,a,o;return rv({diff:t,diffStyle:n,startingLine:e.startingLine,totalLines:e.totalLines,expandedHunks:r?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:i,callback:({additionLine:e})=>{e!=null&&(a??=e.lineNumber,o=e.lineNumber)}}),a==null||o==null?{...e,startingLine:0,totalLines:0}:{...e,startingLine:a-1,totalLines:o-a+1}}attachEditor(e){if(this.type!==`file-diff`)throw Error(`FileDiff.attachEditor: cannot attach an editor to a "${this.type}" diff`);return this.editor?.cleanUp(),this.editor=e,this.hunksRenderer.beginEditSession(),this.fileDiff?.isPartial===!0&&this.loadFilesIfNecessary(),this.hunksRenderer.editorRenderReady()?this.syncRenderViewToEditor():this.rerender(),e=>{this.editor=void 0,e!==!0&&this.finishEditSession()}}finishEditSession(){this.hunksRenderer.endEditSession(),this.completeEditSession()}completeEditSession(){let e=this.fileDiffCache;if(e==null||e.editSessionDirty!==!0)return!1;let{collapsedContextThreshold:t=1}=this.options,n=Uv(e,this.hunksRenderer.getExpandedHunksMap(),t);return Gv(e,this.options.parseDiffOptions),this.hunksRenderer.setExpandedHunksMap(Wv(e,n)),this.hunksRenderer.refreshHighlightedResult(),this.escalateEditSessionRender(),!0}applyDocumentChange(e,t){this.hunksRenderer.applyDocumentChange(e);let n=this.hunksRenderer.diffCache;if(n!=null){let e=this.fileDiff?.cacheKey;e!=null&&n.cacheKey==null&&(n.cacheKey=e),this.fileDiff=n}t!==void 0&&t!==this.lineAnnotations&&(this.setLineAnnotations(t),this.hunksRenderer.setLineAnnotations(this.lineAnnotations),this.renderAnnotations()),this.rerender(),this.interactionManager.setSelectionDirty()}updateRenderCache(e,t,n={}){let{shouldRefreshDiffsView:r,lineCountChangeInFlight:i}=n;if(this.hunksRenderer.updateRenderCache(e,t,i)){this.refreshViewTimeout!=null&&(clearTimeout(this.refreshViewTimeout),this.refreshViewTimeout=void 0),this.lineStateRefreshPending=!0,this.escalateEditSessionRender();return}r===!0&&(this.refreshViewTimeout!=null&&clearTimeout(this.refreshViewTimeout),this.lineStateRefreshPending=!0,this.refreshViewTimeout=setTimeout(()=>{this.refreshViewTimeout=void 0,this.options.diffStyle===`split`?this.refreshSplitDiffView():this.refreshUnifiedDiffView(),this.flushDeferredLineState()},150))}isLineRenderable(e){let t=this.fileDiffCache;if(t==null)return!0;let{expandUnchanged:n=!1,collapsedContextThreshold:r=1}=this.options;return tv({fileDiff:t,lineNumber:e,expandedHunks:n?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:r})}getNearestRenderableLine(e,t){let n=this.fileDiffCache;if(n==null)return e;let{expandUnchanged:r=!1,collapsedContextThreshold:i=1}=this.options;return nv({fileDiff:n,lineNumber:e,direction:t,expandedHunks:r?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:i})}revealLine(e){let t=this.fileDiffCache,{expandUnchanged:n=!1,collapsedContextThreshold:r=1,expansionLineCount:i=100}=this.options;if(t==null||t.isPartial||n)return!1;let a=this.hunksRenderer.getExpandedHunksMap();for(let[n,o]of t.hunks.entries()){let[s,c]=X_(o);if(e<s){let c=Z_({isPartial:t.isPartial,rangeSize:o.collapsedBefore,expandedHunks:a,hunkIndex:n,collapsedContextThreshold:r}),l=s-c.rangeSize;if(c.renderAll||e<l+c.fromStart||e>=s-c.fromEnd)return!1;let u=e-(l+c.fromStart)+1,d=s-c.fromEnd-e;return u<=d?this.expandHunk(n,`up`,u+i):this.expandHunk(n,`down`,d+i),!0}if(e<c)return!1}let o=ev({fileDiff:t,hunkIndex:t.hunks.length-1,expandedHunks:a,collapsedContextThreshold:r,errorPrefix:`FileDiff.revealLine`});if(o==null||o.renderAll)return!1;let s=t.hunks[t.hunks.length-1],[,c]=X_(s);return e<c+o.fromStart||e>=c+o.rangeSize?!1:(this.expandHunk(t.hunks.length,`up`,e-(c+o.fromStart)+1+i),!0)}shouldSelfHealEditSession(){return this.editor==null}escalateEditSessionRender(){hr(this.handleEditSessionRender)}handleEditSessionRender=()=>{this.rerender(),this.flushDeferredLineState()};removeRenderedCode(){this.resizeManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.interactionManager.cleanUp(),this.bufferBefore?.remove(),this.bufferBefore=void 0,this.bufferAfter?.remove(),this.bufferAfter=void 0,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0,this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0,this.lastRowCount=void 0}clearAuxiliaryNodes(){for(let{element:e}of this.separatorCache.values())e.remove();this.separatorCache.clear();for(let{element:e}of this.annotationCache.values())e.remove();this.annotationCache.clear(),this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0}renderPlaceholder(e){if(this.fileContainer==null)return!1;if(this.emitPostRender(!0),this.cleanChildNodes(),this.placeHolder==null){let e=this.fileContainer.shadowRoot??this.fileContainer.attachShadow({mode:`open`});this.placeHolder=document.createElement(`div`),this.placeHolder.dataset.placeholder=``,e.appendChild(this.placeHolder)}return this.placeHolder.style.setProperty(`height`,`${e}px`),!0}async primeHighlightCache(e=this.fileDiff){let{workerManager:t}=this;if(e==null||t==null||!t.isWorkingPool()||e.cacheKey==null||sy(e))return;let n=this.options.tokenizeMaxLength??1e5;Math.max(e.additionLines.length,e.deletionLines.length)>n||await t.primeDiffHighlightCache(e).catch(e=>{console.error(e)})}cleanChildNodes(){this.resizeManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.interactionManager.cleanUp(),this.clearAuxiliaryNodes(),this.bufferAfter?.remove(),this.bufferBefore?.remove(),this.codeAdditions?.remove(),this.codeDeletions?.remove(),this.codeUnified?.remove(),this.errorWrapper?.remove(),this.headerElement?.remove(),this.headerPrefix?.remove(),this.headerFilenameSuffix?.remove(),this.headerMetadata?.remove(),this.headerCustom?.remove(),this.pre?.remove(),this.spriteSVG?.remove(),this.themeCSSStyle?.remove(),this.unsafeCSSStyle?.remove(),this.bufferAfter=void 0,this.bufferBefore=void 0,this.codeAdditions=void 0,this.codeDeletions=void 0,this.codeUnified=void 0,this.errorWrapper=void 0,this.headerElement=void 0,this.headerPrefix=void 0,this.headerFilenameSuffix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0,this.pre=void 0,this.spriteSVG=void 0,this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0,this.hasAdoptedThemeCSS=!1,this.unsafeCSSStyle=void 0,this.appliedUnsafeCSS=void 0,this.lastRenderedHeaderHTML=void 0,this.lastRowCount=void 0,this.mounted=!1}renderSeparators(e){let{hunkSeparators:t}=this.options;if(this.isContainerManaged||this.fileContainer==null||typeof t!=`function`){for(let{element:e}of this.separatorCache.values())e.remove();this.separatorCache.clear();return}let n=new Map(this.separatorCache);for(let r of e){let e=r.slotName,i=this.separatorCache.get(e);if(i==null||!Dy(r,i.hunkData)){i?.element.remove();let n=document.createElement(`div`);n.style.display=`contents`,n.slot=r.slotName;let a=t(r,this);a!=null&&n.appendChild(a),this.fileContainer.appendChild(n),i={element:n,hunkData:r},this.separatorCache.set(e,i)}n.delete(e)}for(let[e,{element:t}]of n.entries())this.separatorCache.delete(e),t.remove()}renderAnnotations(){if(this.isContainerManaged||this.fileContainer==null){for(let{element:e}of this.annotationCache.values())e.remove();this.annotationCache.clear();return}let e=new Map(this.annotationCache),{renderAnnotation:t}=this.options;if(t!=null&&this.lineAnnotations.length>0)for(let[n,r]of this.lineAnnotations.entries()){let i=`${n}-${fg(r)}`,a=this.annotationCache.get(i);if(a==null||!Ey(r,a.annotation)){a?.element.remove();let e=t(r);if(e==null)continue;a={element:i_(fg(r)),annotation:r},a.element.appendChild(e),this.fileContainer.appendChild(a.element),this.annotationCache.set(i,a)}e.delete(i)}for(let[t,{element:n}]of e.entries())this.annotationCache.delete(t),n.remove()}renderGutterUtility(){let{renderGutterUtility:e}=this.options;if(this.fileContainer==null||e==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}let t=e(this.interactionManager.getHoveredLine);if(t!=null&&this.gutterUtilityContent!=null)return;if(t==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}let n=a_();n.appendChild(t),this.fileContainer.appendChild(n),this.gutterUtilityContent=n}getOrCreateFileContainer(e,t){let{fileContainer:n}=this,r=e??n??document.createElement(`diffs-container`),i=n!==r;return n!=null&&i&&this.editor?.__captureFocusForDOMReplacement(),i&&this.emitPostRender(!0),this.fileContainer=r,n!=null&&i&&(this.lastRenderedHeaderHTML=void 0,this.headerElement=void 0),t!=null&&this.fileContainer.parentNode!==t&&t.appendChild(this.fileContainer),i&&this.adoptReusableShellElements(this.fileContainer),this.ensureSpriteSVG(this.fileContainer),this.fileContainer}adoptReusableShellElements(e){let{shadowRoot:t}=e;if(t!=null)for(let e of t.children)e instanceof SVGElement?this.spriteSVG??=e:b_(e)&&e.hasAttribute(`data-theme-css`)?(this.themeCSSStyle??=e,this.hasAdoptedThemeCSS=!0):b_(e)&&e.hasAttribute(`data-unsafe-css`)&&(this.unsafeCSSStyle??=e,this.appliedUnsafeCSS??=this.options.unsafeCSS??void 0)}ensureSpriteSVG(e){let t=e.shadowRoot??e.attachShadow({mode:`open`});if(this.spriteSVG==null){let e=document.createElement(`div`);e.innerHTML=e_;let t=e.firstChild;t instanceof SVGElement&&(this.spriteSVG=t)}this.spriteSVG!=null&&this.spriteSVG.parentNode!==t&&t.appendChild(this.spriteSVG)}getOrCreatePreNode(e){let t=e.shadowRoot??e.attachShadow({mode:`open`});return this.pre==null?(this.pre=document.createElement(`pre`),this.appliedPreAttributes=void 0,this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0,t.appendChild(this.pre)):this.pre.parentNode!==t&&(this.editor?.__captureFocusForDOMReplacement(),t.appendChild(this.pre),this.appliedPreAttributes=void 0),this.placeHolder?.remove(),this.placeHolder=void 0,this.pre}syncCodeNodesFromPre(e){this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0;for(let t of Array.from(e.children))t instanceof HTMLElement&&(t.hasAttribute(`data-unified`)?this.codeUnified=t:t.hasAttribute(`data-deletions`)?this.codeDeletions=t:t.hasAttribute(`data-additions`)&&(this.codeAdditions=t))}applyHeaderToDOM(e,t){this.cleanupErrorWrapper(),this.placeHolder?.remove(),this.placeHolder=void 0;let{fileDiff:n}=this,r=this.cachedHeaderHTML??Ro(e);if(this.cachedHeaderHTML=r,r!==this.lastRenderedHeaderHTML){let e=document.createElement(`div`);e.innerHTML=r;let n=e.firstElementChild;if(!(n instanceof HTMLElement))return;this.headerElement==null?t.shadowRoot?.prepend(n):t.shadowRoot?.replaceChild(n,this.headerElement),this.headerElement=n,this.lastRenderedHeaderHTML=r}if(this.isContainerManaged||n==null)return;let{renderCustomHeader:i,renderHeaderPrefix:a,renderHeaderFilenameSuffix:o,renderHeaderMetadata:s}=this.options;if(i!=null){let e=i(n)??void 0;this.headerCustom=this.upsertHeaderSlotElement(t,this.headerCustom,ir,e),this.headerPrefix?.remove(),this.headerFilenameSuffix?.remove(),this.headerMetadata?.remove(),this.headerPrefix=void 0,this.headerFilenameSuffix=void 0,this.headerMetadata=void 0;return}let c=a?.(n)??void 0,l=o?.(n)??void 0,u=s?.(n)??void 0;this.headerPrefix=this.upsertHeaderSlotElement(t,this.headerPrefix,tr,c),this.headerFilenameSuffix=this.upsertHeaderSlotElement(t,this.headerFilenameSuffix,nr,l),this.headerMetadata=this.upsertHeaderSlotElement(t,this.headerMetadata,rr,u),this.headerCustom?.remove(),this.headerCustom=void 0}clearHeaderSlots(){this.headerPrefix?.remove(),this.headerFilenameSuffix?.remove(),this.headerMetadata?.remove(),this.headerCustom?.remove(),this.headerPrefix=void 0,this.headerFilenameSuffix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0}upsertHeaderSlotElement(e,t,n,r){if(r==null){t?.remove();return}let i=t??this.createHeaderSlotElement(n);return t??e.appendChild(i),this.replaceHeaderSlotContent(i,r),i}replaceHeaderSlotContent(e,t){e.replaceChildren(),t instanceof Element?e.appendChild(t):e.innerText=`${t}`}createHeaderSlotElement(e){let t=document.createElement(`div`);return t.slot=e,t}injectUnsafeCSS(){let{unsafeCSS:e}=this.options,t=this.fileContainer?.shadowRoot;if(t!=null){if(e==null||e===``){this.unsafeCSSStyle!=null&&(this.unsafeCSSStyle.remove(),this.unsafeCSSStyle=void 0),this.appliedUnsafeCSS=void 0;return}(this.unsafeCSSStyle?.parentNode!==t||this.appliedUnsafeCSS!==e)&&(this.unsafeCSSStyle??=o_(),this.unsafeCSSStyle.parentNode!==t&&t.appendChild(this.unsafeCSSStyle),this.unsafeCSSStyle.textContent=p_(e),this.appliedUnsafeCSS=e)}}applyThemeState(e,t,n,r){let i=e.shadowRoot??e.attachShadow({mode:`open`}),a=r??n,o=this.options.theme??M,s=typeof o==`string`?o:{...o},c=l_(i);if(this.themeCSSStyle?.parentNode===i&&this.appliedThemeCSS?.themeStyles===t&&this.appliedThemeCSS.themeType===a&&this.appliedThemeCSS.scrollbarGutter===c){this.appliedThemeCSS.theme=s;return}if(this.hasAdoptedThemeCSS&&this.themeCSSStyle?.parentNode===i){this.hasAdoptedThemeCSS=!1,this.appliedThemeCSS={theme:s,themeStyles:t,themeType:a,baseThemeType:r,scrollbarGutter:c};return}this.themeCSSStyle=C_({shadowRoot:i,currentNode:this.themeCSSStyle,themeCSS:m_(t,a,c)}),this.appliedThemeCSS=this.themeCSSStyle==null?void 0:{theme:s,themeStyles:t,themeType:a,baseThemeType:r,scrollbarGutter:c}}hydrateMeasuredScrollbar(){let e=this.fileContainer?.shadowRoot;e!=null&&this.themeCSSStyle!=null&&(this.themeCSSStyle.textContent=h_(this.themeCSSStyle.textContent??``,l_(e)))}shouldGuardRebuildScroll(){return this.editor!=null&&E_()}applyHunksToDOM(e,t){this.shouldGuardRebuildScroll()?S_(e,()=>this.replaceCodeColumns(e,t)):this.replaceCodeColumns(e,t)}applyCodeColumnsInPlace(e,t,n){let r=this.getColumnPair(e);if(r==null)return!1;let i=zy(t[0]),a=zy(t[1]);return i==null||a==null?!1:(r.gutter.innerHTML=Ro(i),r.content.innerHTML=Ro(a),n!==this.lastRowCount&&(r.gutter.style.setProperty(`grid-row`,`span ${n}`),r.content.style.setProperty(`grid-row`,`span ${n}`)),!0)}replaceCodeColumns(e,t){let{overflow:n=`scroll`}=this.options,r=(this.options.hunkSeparators??`line-info`)===`line-info`,i=n===`wrap`?t.rowCount:void 0;this.cleanupErrorWrapper(),this.applyPreNodeAttributes(e,t);let a=!1,o=[],s=this.hunksRenderer.renderCodeAST(`unified`,t),c=this.hunksRenderer.renderCodeAST(`deletions`,t),l=this.hunksRenderer.renderCodeAST(`additions`,t);this.editor?.__captureFocusForDOMReplacement(),s==null?c!=null||l!=null?(c==null?(this.codeDeletions?.remove(),this.codeDeletions=void 0):(a=this.codeDeletions==null||this.codeUnified!=null,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions=__({code:this.codeDeletions,columnType:`deletions`,rowSpan:i,containerSize:r}),this.applyCodeColumnsInPlace(this.codeDeletions,c,t.rowCount)||(this.codeDeletions.innerHTML=this.hunksRenderer.renderPartialHTML(c)),o.push(this.codeDeletions)),l==null?(this.codeAdditions?.remove(),this.codeAdditions=void 0):(a=a||this.codeAdditions==null||this.codeUnified!=null,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeAdditions=__({code:this.codeAdditions,columnType:`additions`,rowSpan:i,containerSize:r}),this.applyCodeColumnsInPlace(this.codeAdditions,l,t.rowCount)||(this.codeAdditions.innerHTML=this.hunksRenderer.renderPartialHTML(l)),o.push(this.codeAdditions))):(this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0):(a=this.codeUnified==null||this.codeAdditions!=null||this.codeDeletions!=null,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0,this.codeUnified=__({code:this.codeUnified,columnType:`unified`,rowSpan:i,containerSize:r}),this.applyCodeColumnsInPlace(this.codeUnified,s,t.rowCount)||(this.codeUnified.innerHTML=this.hunksRenderer.renderPartialHTML(s)),o.push(this.codeUnified)),o.length===0?e.textContent=``:a&&e.replaceChildren(...o),this.lastRowCount=t.rowCount}applyPartialRender({previousRenderRange:e,renderRange:t}){let{pre:n,codeUnified:r,codeAdditions:i,codeDeletions:a,options:{diffStyle:o=`split`}}=this;if(n==null||e==null||t==null||!Number.isFinite(e.totalLines)||!Number.isFinite(t.totalLines)||this.lastRowCount==null)return!1;let s=this.getCodeColumns(o,r,a,i);if(s==null)return!1;let c=e.startingLine,l=t.startingLine,u=c+e.totalLines,d=l+t.totalLines,f=Math.max(c,l),p=Math.min(u,d);if(p<=f)return!1;let m=Math.max(0,f-c),h=Math.max(0,u-p),g=this.trimColumns({columns:s,trimStart:m,trimEnd:h,previousStart:c,overlapStart:f,overlapEnd:p,diffStyle:o});if(g<0)throw Error(`FileDiff.applyPartialRender: failed to trim to overlap`);if(this.lastRowCount<g)throw Error(`FileDiff.applyPartialRender: trimmed beyond DOM row count`);let _=this.lastRowCount-g,v=(e,t)=>{if(!(t<=0||this.fileDiff==null))return this.hunksRenderer.renderDiff(this.fileDiff,{startingLine:e,totalLines:t,bufferBefore:0,bufferAfter:0})},y=v(l,Math.max(f-l,0));if(y==null&&l<f)return!1;let b=v(p,Math.max(d-p,0));if(b==null&&d>p)return!1;let x=(e,t)=>{if(e!=null){if(o===`unified`&&!Array.isArray(s))this.insertPartialHTML(o,s,e,t);else if(o===`split`&&Array.isArray(s))this.insertPartialHTML(o,s,e,t);else throw Error(`FileDiff.applyPartialRender.applyChunk: invalid chunk application`);_+=e.rowCount}};return this.cleanupErrorWrapper(),x(y,`afterbegin`),x(b,`beforeend`),this.lastRowCount!==_&&(this.applyRowSpan(o,s,_),this.lastRowCount=_),!0}insertPartialHTML(e,t,n,r){if(e===`unified`&&!Array.isArray(t)){let e=this.hunksRenderer.renderCodeAST(`unified`,n);this.renderPartialColumn(t,e,r)}else if(e===`split`&&Array.isArray(t)){let e=this.hunksRenderer.renderCodeAST(`deletions`,n),i=this.hunksRenderer.renderCodeAST(`additions`,n);this.renderPartialColumn(t[0],e,r),this.renderPartialColumn(t[1],i,r)}else throw Error(`FileDiff.insertPartialHTML: Invalid argument composition`)}refreshSplitDiffView(){if(this.options.diffStyle!==`split`)return;let e=this.hunksRenderer.renderDiff(this.fileDiff,this.renderRange);if(e==null)return;let t=this.getCodeColumns(`split`,this.codeUnified,this.codeDeletions,this.codeAdditions);if(!Array.isArray(t))return;let n=(t,n)=>{if(n==null)return;let r=this.hunksRenderer.renderCodeAST(t,e),i=zy(r?.[0]),a=zy(r?.[1]);for(let[e,t]of[[n.gutter,i],[n.content,a]])if(t!=null&&e.childElementCount===t.length)for(let n=0;n<t.length;n++){let r=e.children[n],i=t[n].properties[`data-line-type`];i!=null&&r.dataset.lineType!==i&&(r.dataset.lineType=i)}};n(`deletions`,t[0]),n(`additions`,t[1])}refreshUnifiedDiffView(){if(this.options.diffStyle!==`unified`)return;let e=this.hunksRenderer.renderDiff(this.fileDiff,this.renderRange);if(e==null)return;let t=this.getCodeColumns(`unified`,this.codeUnified,this.codeDeletions,this.codeAdditions);if(t==null||Array.isArray(t))return;let n=this.hunksRenderer.renderCodeAST(`unified`,e),r=zy(n?.[0]),i=zy(n?.[1]),a=()=>{for(let[e,n]of[[t.gutter,r],[t.content,i]])n!=null&&(e.innerHTML=Ro(n));e.rowCount!==this.lastRowCount&&(this.applyRowSpan(`unified`,t,e.rowCount),this.lastRowCount=e.rowCount)};this.shouldGuardRebuildScroll()?S_(this.pre,a):a(),this.renderSeparators(e.hunkData),this.managersDirty=!0,this.flushManagers(),this.syncRenderViewToEditor()}renderPartialColumn(e,t,n){if(e==null||t==null)return;let r=zy(t[0]),i=zy(t[1]);if(r==null||i==null)throw Error(`FileDiff.insertPartialHTML: Unexpected AST structure`);let a=i.at(0);n===`beforeend`&&a?.type===`element`&&typeof a.properties[`data-buffer-size`]==`number`&&this.mergeBuffersIfNecessary(a.properties[`data-buffer-size`],e.content.children[e.content.children.length-1],e.gutter.children[e.gutter.children.length-1],r,i,!0);let o=i.at(-1);n===`afterbegin`&&o?.type===`element`&&typeof o.properties[`data-buffer-size`]==`number`&&this.mergeBuffersIfNecessary(o.properties[`data-buffer-size`],e.content.children[0],e.gutter.children[0],r,i,!1),e.gutter.insertAdjacentHTML(n,this.hunksRenderer.renderPartialHTML(r)),e.content.insertAdjacentHTML(n,this.hunksRenderer.renderPartialHTML(i))}mergeBuffersIfNecessary(e,t,n,r,i,a){if(!(t instanceof HTMLElement)||!(n instanceof HTMLElement))return;let o=this.getBufferSize(t.dataset);o!=null&&(a?(r.shift(),i.shift()):(r.pop(),i.pop()),this.updateBufferSize(t,o+e),this.updateBufferSize(n,o+e))}applyRowSpan(e,t,n){let r=e=>{e!=null&&(e.gutter.style.setProperty(`grid-row`,`span ${n}`),e.content.style.setProperty(`grid-row`,`span ${n}`))};if(e===`unified`&&!Array.isArray(t))r(t);else if(e===`split`&&Array.isArray(t))r(t[0]),r(t[1]);else throw Error(`dun fuuuuked up`)}trimColumnRows(e,t,n){let r=0,i=0,a=0,o=!1,s=n>=0;if(e==null)return 0;let c=Array.from(e.content.children),l=Array.from(e.gutter.children);if(c.length!==l.length)throw Error(`FileDiff.trimColumnRows: columns do not match`);for(;a<c.length&&!(t<=0&&!s&&!o);){let e=l[a],u=c[a];if(a++,!(e instanceof HTMLElement)||!(u instanceof HTMLElement))throw console.error({gutterElement:e,contentElement:u}),Error(`FileDiff.trimColumnRows: invalid row elements`);if(o&&(o=!1,e.dataset.gutterBuffer===`annotation`&&`lineAnnotation`in u.dataset||e.dataset.gutterBuffer===`metadata`&&`noNewline`in u.dataset)){e.remove(),u.remove(),i++;continue}if(`lineIndex`in e.dataset&&`lineIndex`in u.dataset){(t>0||s&&r>=n)&&(e.remove(),u.remove(),t>0&&(t--,t===0&&(o=!0)),i++),r++;continue}if(`separator`in e.dataset&&`separator`in u.dataset){(t>0||s&&r>=n)&&(e.remove(),u.remove(),i++);continue}if(e.dataset.gutterBuffer===`annotation`&&`lineAnnotation`in u.dataset){(t>0||s&&r>=n)&&(e.remove(),u.remove(),i++);continue}if(e.dataset.gutterBuffer===`metadata`&&`noNewline`in u.dataset){(t>0||s&&r>=n)&&(e.remove(),u.remove(),i++);continue}if(e.dataset.gutterBuffer===`buffer`&&`contentBuffer`in u.dataset){let a=this.getBufferSize(u.dataset);if(a==null)throw Error(`FileDiff.trimColumnRows: invalid element`);if(t>0){let n=Math.min(t,a),r=a-n;r>0?(this.updateBufferSize(e,r),this.updateBufferSize(u,r),i+=n):(e.remove(),u.remove(),i+=a),t-=n,t===0&&r===0&&(o=!0)}else if(s){let t=r,o=r+a-1;if(n<=t)e.remove(),u.remove(),i+=a;else if(n<=o){let t=o-n+1,r=a-t;this.updateBufferSize(e,r),this.updateBufferSize(u,r),i+=t}}r+=a;continue}throw console.error({gutterElement:e,contentElement:u}),Error(`FileDiff.trimColumnRows: unknown row elements`)}return i}trimColumns({columns:e,diffStyle:t,overlapEnd:n,overlapStart:r,previousStart:i,trimEnd:a,trimStart:o}){let s=Math.max(0,r-i),c=n-i;if(c<0)throw Error(`FileDiff.trimColumns: overlap ends before previous`);let l=o>0,u=a>0;if(!l&&!u)return 0;let d=l?s:0,f=u?c:-1;if(t===`unified`&&!Array.isArray(e))return this.trimColumnRows(e,d,f);if(t===`split`&&Array.isArray(e)){let t=this.trimColumnRows(e[0],d,f),n=this.trimColumnRows(e[1],d,f);if(e[0]!=null&&e[1]!=null&&t!==n)throw Error(`FileDiff.trimColumns: split columns out of sync`);return e[0]==null?n:t}throw console.error({diffStyle:t,columns:e}),Error(`FileDiff.trimColumns: Invalid columns for diffType`)}getBufferSize(e){let t=Number.parseInt(e?.bufferSize??``,10);return Number.isNaN(t)?void 0:t}updateBufferSize(e,t){e.dataset.bufferSize=`${t}`,e.style.setProperty(`grid-row`,`span ${t}`),e.style.setProperty(`min-height`,`calc(${t} * 1lh)`)}getColumnPair(e){if(e==null)return;let t=e.children[0],n=e.children[1];if(!(!(t instanceof HTMLElement)||!(n instanceof HTMLElement)||t.dataset.gutter==null||n.dataset.content==null))return{gutter:t,content:n}}getCodeColumns(e,t,n,r){if(e===`unified`)return this.getColumnPair(t);{let e=this.getColumnPair(n),t=this.getColumnPair(r);return e!=null||t!=null?[e,t]:void 0}}updateBuffers(e){this.pre!=null&&this.applyBuffers(this.pre,e)}applyBuffers(e,t){if(t==null||this.shouldDisableVirtualizationBuffers()){this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),this.bufferAfter!=null&&(this.bufferAfter.remove(),this.bufferAfter=void 0);return}t.bufferBefore>0?(this.bufferBefore??(this.bufferBefore=document.createElement(`div`),this.bufferBefore.dataset.virtualizerBuffer=`before`,e.before(this.bufferBefore)),this.bufferBefore.style.setProperty(`height`,`${t.bufferBefore}px`),this.bufferBefore.style.setProperty(`contain`,`strict`)):this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),t.bufferAfter>0?(this.bufferAfter??(this.bufferAfter=document.createElement(`div`),this.bufferAfter.dataset.virtualizerBuffer=`after`,e.after(this.bufferAfter)),this.bufferAfter.style.setProperty(`height`,`${t.bufferAfter}px`),this.bufferAfter.style.setProperty(`contain`,`strict`)):this.bufferAfter!=null&&(this.bufferAfter.remove(),this.bufferAfter=void 0)}shouldDisableVirtualizationBuffers(){return this.options.disableVirtualizationBuffers??!1}applyPreNodeAttributes(e,{additionsContentAST:t,deletionsContentAST:n,totalLines:r},i){let{diffIndicators:a=`bars`,disableBackground:o=!1,disableLineNumbers:s=!1,overflow:c=`scroll`,diffStyle:l=`split`}=this.options,u={type:`diff`,diffIndicators:a,disableBackground:o,disableLineNumbers:s,overflow:c,split:l!==`unified`&&t!=null&&n!=null,totalLines:r,customProperties:i};t_(u,this.appliedPreAttributes)||(y_(e,u),this.appliedPreAttributes=u)}applyErrorToDOM(e,t){this.cleanupErrorWrapper(),this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0;let n=t.shadowRoot??t.attachShadow({mode:`open`});this.errorWrapper??=document.createElement(`div`),this.errorWrapper.dataset.errorWrapper=``,this.errorWrapper.textContent=``,n.appendChild(this.errorWrapper);let r=document.createElement(`div`);r.dataset.errorMessage=``,r.innerText=e.message,this.errorWrapper.appendChild(r);let i=document.createElement(`pre`);i.dataset.errorStack=``,i.innerText=e.stack??`No Error Stack`,this.errorWrapper.appendChild(i)}cleanupErrorWrapper(){this.errorWrapper?.remove(),this.errorWrapper=void 0}};function Py(e,t){return e==null||t==null?e==null&&t==null:Ai(e,t)}function Fy({fileDiff:e,oldFile:t,newFile:n}){return e!=null&&e.hunks.length>0||t!=null||n!=null}function Iy({fileDiff:e,oldFile:t,newFile:n}){return e!=null||t!=null||n!=null}function Ly(e,t,n=!1){return!n&&e==null&&t}function Ry(e,t,n=!1){return e==null&&t&&!n}function zy(e){if(e!=null&&e.type===`element`)return e.children??[]}function By(e){let t=[];for(let n of e){let e=hs.get(n);if(e==null)throw Error(`getResolvedLanguages: ${n} is not resolved. Please resolve languages before calling getResolvedLanguages`);t.push(e)}return t}function Vy(e){for(let t of Array.isArray(e)?e:[e])if(!hs.has(t))return!1;return!0}async function Hy(e){let t=[],n=[];for(let r of e){if(r===`text`||r===`ansi`)continue;let e=ah(r)??ih(r);`then`in e?n.push(e):t.push(e)}return n.length>0&&await Promise.all(n).then(e=>{for(let n of e){if(n==null)throw Error(`resolvedLanguages: unable to resolve language`);t.push(n)}}),t}function Uy(e){return _h.getResolvedThemes(e)}async function Wy(e){for(let t of e)zh(t);let t=await _h.resolveThemes(e);for(let n=0;n<e.length;n++)Bh(e[n],t[n]);return t}var Gy=40,Ky;function qy(e){return e.length>=200?null:[...new Set(e.map(e=>e.key))]}function Jy(e,t){let n=t.trim();if(!n)return[];if(Ky&&Ky.files===e&&Ky.query===n)return Ky.hits;let r=Zy(e,n);return Ky={files:e,query:n,hits:r},r}var Yy=new WeakMap;function Xy(e){let t=Yy.get(e);return t||(t={visible:$y(e.old,e.new),newLines:e.new==null?null:e.new.split(`
|
|
1534
1534
|
`),oldLines:e.old==null?null:e.old.split(`
|
|
1535
1535
|
`)},Yy.set(e,t)),t}function Zy(e,t){let n=/[A-Z]/.test(t),r=n?t:t.toLowerCase(),i=[];for(let t of e){if(i.length>=200)break;let e=i.length,{visible:a,newLines:o,oldLines:s}=Xy(t),c=new Set;eb(t,o,`additions`,r,n,c,i,a.additions),eb(t,s,`deletions`,r,n,c,i,a.deletions),i.length===e&&Qy(t.path,r,n)&&i.push({key:t.key,path:t.path,repo:t.repo,line:0,side:null,preview:t.path})}return i}function Qy(e,t,n){let r=n?e:e.toLowerCase();if(!r.includes(t))return!1;let i=e.lastIndexOf(`/`),a=i>=0?e.slice(i+1):e,o=a.lastIndexOf(`.`);if(o<=0)return!0;let s=a.slice(o+1);if(!(n?s:s.toLowerCase()).includes(t))return!0;let c=e.length-s.length;for(let e=r.indexOf(t);e!==-1;e=r.indexOf(t,e+1))if(e<c)return!0;return!1}function $y(e,t){let n=new Set,r=new Set;if(e==null&&t==null)return{additions:n,deletions:r};try{let i=Oi(e==null?null:{name:`old`,contents:e},t==null?null:{name:`new`,contents:t});for(let e of i.hunks){for(let t=0;t<e.additionCount;t++)n.add(e.additionStart+t);for(let t=0;t<e.deletionCount;t++)r.add(e.deletionStart+t)}}catch{}return{additions:n,deletions:r}}function eb(e,t,n,r,i,a,o,s){if(!t||o.length>=200||!s.size)return;let c=0;for(let l=0;l<t.length;l++){if(o.length>=200||c>=Gy)return;let u=l+1;if(!s.has(u))continue;let d=t[l],f=(i?d:d.toLowerCase()).indexOf(r);f<0||n===`deletions`&&a.has(d)||(n===`additions`&&a.add(d),c++,o.push({key:e.key,path:e.path,repo:e.repo,line:u,side:n,preview:tb(d,f,r.length)}))}}function tb(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 nb=((e,t,n)=>`<div><input type=search enterkeyhint=search autocomplete=off placeholder="Find in review" aria-label="Find in review"><span> </span><button type=button title="Previous match">${e}</button><button type=button title="Next match">${t}</button><button type=button title="Close find">${n}</button></div>`)(pe,we,xe),rb=((e,t,n)=>` D b D l D/${e}&l D/${t}&l D/${n}&m`)(l,Ze,ce),ib=D(`i8`,e=>{e.ad=!!e.y,e.w&&(e.w.focus=e.ar)}),ab=b(54,ib,3),ob=D(`i7`,e=>S(e,{onMount:function(){let t=new AbortController;return document.addEventListener(`keydown`,t=>{if(!e.ad)return;if(t.key===`Escape`){if(document.querySelector(`dialog[open]`)||t.target instanceof HTMLTextAreaElement)return;t.preventDefault(),e.aq();return}let n=t.metaKey||t.ctrlKey;(t.key===`F3`||n&&t.key.toLowerCase()===`g`)&&(t.preventDefault(),e.ap(t.shiftKey?-1:1))},{signal:t.signal}),e.ai=e.x,e.aj=!!e.y,e.y&&e.ar(),{abort:t}},onUpdate:function(){e.x!==e.ai&&(e.ai=e.x,e.y&&e.ar()),e.y&&!e.aj?(e.aj=!0,e.ar()):!e.y&&e.aj&&(e.aj=!1,e.ag&&=(clearTimeout(e.ag),0),Bt(``,null),Cb(e,{query:``,hit:null,keys:[]}))},onDestroy:function(){e.ag&&clearTimeout(e.ag),this.abort.abort(),Bt(``,null),Cb(e,{query:``,hit:null,keys:[]})}})),sb=b(55,ob,8),cb=b(37,e=>k(e.d,e.y&&(e.a0||``).trim()?e.a7?`${e.aa+1}/${e.a7}`:`0/0`:``),3),lb=b(34,e=>{u(e.e,`disabled`,!e.a7||!e.y),u(e.g,`disabled`,!e.a7||!e.y)}),ub=m(24,e=>{c(e.a,[`_fB`,!e.y&&`_fA`]),u(e.a,`aria-hidden`,e.y?`false`:`true`),u(e.b,`tabindex`,e.y?0:-1),u(e.e,`tabindex`,e.y?0:-1),u(e.g,`tabindex`,e.y?0:-1),u(e.i,`tabindex`,e.y?0:-1),ab(e),sb(e),cb(e),lb(e)}),db=b(14,e=>ub(e,e.m,e.n)),fb=w(12,db),pb=w(13,db),mb=(e,t)=>zb(e,t?.length),hb=b(28,e=>mb(e,Jy(e.v,e.a0||``))),gb=w(51,sb),_b=b(48,e=>gb(e,Yb(e)),4),vb=b(50,e=>n(e,`b`,e.a0||``,Xb(e))),yb=m(26,e=>{hb(e),_b(e),vb(e),cb(e)}),bb=b(17,e=>yb(e,e.p,e.q)),xb=w(15,bb),Sb=w(16,bb),Cb=m(29),wb=b(20,e=>Cb(e,e.s,e.t)),Tb=w(18,wb),Eb=w(19,wb),Db=w(36,e=>{_b(e),cb(e)}),Ob=b(35,e=>Db(e,e.a7?Math.min(e.a5,e.a7-1):-1)),kb=w(49,vb),Ab=b(47,e=>kb(e,Zb(e)),3),jb=w(46,e=>{Ab(e),_b(e)}),Mb=b(40,e=>jb(e,Qb(e)),2),Nb=E(31,e=>{Ob(e),Mb(e)}),Pb=(e,t)=>Ub(e,t.open),Fb=(e,t)=>{Wb(e,t.timer),Gb(e,t.tick),Kb(e,t.wasOpen)},Ib=w(53,e=>{ab(e),sb(e)}),Lb=D(`i6`,e=>{He(e,`b`),A(e.b,`keydown`,function(t){if(e.y){if(t.key===`Escape`){t.preventDefault(),e.aq();return}t.key===`Enter`&&(t.preventDefault(),e.ap(t.shiftKey?-1:1))}}),A(e.e,`mousedown`,function(e){e.preventDefault()}),A(e.e,`click`,function(){e.ap(-1)}),A(e.g,`mousedown`,function(e){e.preventDefault()}),A(e.g,`click`,function(){e.ap(1)}),A(e.i,`mousedown`,function(e){e.preventDefault()}),A(e.i,`click`,function(){e.aq()})});function Rb(e){c(e.b,Oe),c(e.c,`_fE`),c(e.e,it),dt(e.f),a(e.f,14),de(e.f),c(e.g,it),ze(e.h),nt(e.h,14),Ye(e.h),c(e.i,it),ye(e.j),be(e.j,14),y(e.j),Nb(e,0),Pb(e,{open:!1}),Fb(e,{timer:0,tick:0,wasOpen:!1}),Ib(e,$b(e)),Lb(e)}var zb=w(33,e=>{Ob(e),cb(e),lb(e)}),Bb=w(21,e=>{hb(e),Mb(e),Ab(e)}),Vb=w(52,sb),Hb=b(43,e=>Vb(e,ex(e))),Ub=w(39,e=>{Mb(e),Ab(e),_b(e),Hb(e),ab(e),sb(e)}),Wb=w(42,e=>{Ab(e),_b(e),Hb(e),sb(e)}),Gb=w(44,sb),Kb=w(45,sb),qb=w(22,ab),Jb=w(23,sb),Yb=e=>t=>{e.ad&&(e.ag&&=(clearTimeout(e.ag),0),e.ak(e.a0||``,(e.aa<0?0:e.aa)+t))},Xb=e=>function(t){e.an(t)},Zb=e=>t=>{if(!e.ad)return;yb(e,t),Nb(e,0);let n=Jy(e.v,t);Bt(t,n[0]??null,qy(n)??void 0),e.ag&&clearTimeout(e.ag),e.ag=setTimeout(()=>{e.ag=0,e.ak(t,0)},80)},Qb=e=>(t,n)=>{if(!e.ad)return;let r=Jy(e.v,t),i=[...new Set(r.map(e=>e.key))];if(!r.length){Nb(e,0),Bt(t,null,i),Cb(e,{query:t,hit:null,keys:i});return}Nb(e,(n%r.length+r.length)%r.length);let a=r[e.a5];Bt(t,a,qy(r)??void 0),Cb(e,{query:t,hit:a,keys:i})},$b=e=>()=>{let t=e.b;t&&(t.focus(),t.select(),document.activeElement!==t&&setTimeout(()=>{t.focus(),t.select()},0))},ex=e=>()=>{ub(e,!1),e.ad=!1,e.ag&&=(clearTimeout(e.ag),0),Bt(``,null),Cb(e,{query:``,hit:null,keys:[]})};O(`i3`,Yb),O(`i0`,Xb),O(`i2`,Zb),O(`i1`,Qb),O(`i5`,$b),O(`i4`,ex);function tx(e){let t=e.replace(/^origin\//,``);return nx(t.includes(`/`)?t.slice(t.lastIndexOf(`/`)+1):t)}function nx(e){return e.replace(/-[a-z0-9]{1,6}$/i,``)||e}function rx(e,t){if(!t)return``;let n=e.replace(/^origin\//,``),r=t.replace(/^origin\//,``);return n.startsWith(`${r}-`)?n.slice(r.length+1):``}function ix(e){let t=nx(e);if(t.length<=20)return t;let n=t.split(`-`);return n.length>1?n[n.length-1]:t}function ax(e,t,n=``,r=``){let i=(e||`base`).replace(/^origin\//,``),a=(t||`HEAD`).replace(/^origin\//,``),o=(n||``).replace(/^origin\//,``),s=!!o&&(a===o||a.startsWith(`${o}-`));return{base:i,head:s?r||tx(o):ix(a),topic:s?rx(a,o):``,title:a===i?i:`${a} vs ${i}`}}function ox(e,t=``,n=``){let r=e.replace(/^origin\//,``);if(!r||r===`HEAD`)return r||`HEAD`;let i=t.replace(/^origin\//,``);if(i&&(r===i||r.startsWith(`${i}-`))){let e=n||tx(i),t=rx(r,i);return t?`${e} [${t}]`:e}return ix(r)}var sx=`_gX _x`,cx=`_g3 _w`,lx=Xe,ux=(e=>`/${e}&`)(rt);function dx(e){Me(e.a,`M9 6L15 12L9 18`)}var fx=(e,t)=>ot(e.a,t),px=(t,n)=>e(t.a,n),mx=Xe,hx=(e=>`/${e}&`)(rt);function gx(e){Me(e.a,`M6 9L12 15L18 9`)}var _x=(e,t)=>ot(e.a,t),vx=(t,n)=>e(t.a,n),yx=Xe,bx=(e=>`/${e}&`)(rt);function xx(e){Me(e.a,`M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 13.8214 2.48697 15.5291 3.33782 17L2.5 21.5L7 20.6622C8.47087 21.513 10.1786 22 12 22Z`)}var Sx=(e,t)=>ot(e.a,t),Cx=(t,n)=>e(t.a,n),wx=Xe,Tx=(e=>`/${e}&`)(rt);function Ex(e){Me(e.a,`M18 2L6 2 M18 22L6 22 M12 5V10M12 10L15 7M12 10L9 7 M12 19V14M12 14L15 17M12 14L9 17`)}var Dx=(e,t)=>ot(e.a,t),Ox=(t,n)=>e(t.a,n),kx=Xe,Ax=(e=>`/${e}&`)(rt);function jx(e){Me(e.a,`M18 2L6 2 M18 22L6 22 M12 14V19M12 19L15 16M12 19L9 16 M12 10V5M12 5L15 8M12 5L9 8`)}var Mx=(e,t)=>ot(e.a,t),Nx=(t,n)=>e(t.a,n),Px=Ot(Tt(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?r(e):typeof define==`function`&&define.amd?define([`exports`],r):r((n||=self).lru_map=n.lru_map||{})})(e,function(e){let t=Symbol(`newer`),n=Symbol(`older`);class r{constructor(e,t){typeof e!=`number`&&(t=e,e=0),this.size=0,this.limit=e,this.oldest=this.newest=void 0,this._keymap=new Map,t&&(this.assign(t),e<1&&(this.limit=this.size))}_markEntryAsUsed(e){e!==this.newest&&(e[t]&&(e===this.oldest&&(this.oldest=e[t]),e[t][n]=e[n]),e[n]&&(e[n][t]=e[t]),e[t]=void 0,e[n]=this.newest,this.newest&&(this.newest[t]=e),this.newest=e)}assign(e){let r,a=this.limit||Number.MAX_VALUE;this._keymap.clear();let o=e[Symbol.iterator]();for(let e=o.next();!e.done;e=o.next()){let o=new i(e.value[0],e.value[1]);if(this._keymap.set(o.key,o),r?(r[t]=o,o[n]=r):this.oldest=o,r=o,a--==0)throw Error(`overflow`)}this.newest=r,this.size=this._keymap.size}get(e){var t=this._keymap.get(e);return t?(this._markEntryAsUsed(t),t.value):void 0}set(e,r){var a=this._keymap.get(e);return a?(a.value=r,this._markEntryAsUsed(a),this):(this._keymap.set(e,a=new i(e,r)),this.newest?(this.newest[t]=a,a[n]=this.newest):this.oldest=a,this.newest=a,++this.size,this.size>this.limit&&this.shift(),this)}shift(){var e=this.oldest;if(e)return this.oldest[t]?(this.oldest=this.oldest[t],this.oldest[n]=void 0):(this.oldest=void 0,this.newest=void 0),e[t]=e[n]=void 0,this._keymap.delete(e.key),--this.size,[e.key,e.value]}find(e){let t=this._keymap.get(e);return t?t.value:void 0}has(e){return this._keymap.has(e)}delete(e){var r=this._keymap.get(e);return r?(this._keymap.delete(r.key),r[t]&&r[n]?(r[n][t]=r[t],r[t][n]=r[n]):r[t]?(r[t][n]=void 0,this.oldest=r[t]):r[n]?(r[n][t]=void 0,this.newest=r[n]):this.oldest=this.newest=void 0,this.size--,r.value):void 0}clear(){this.oldest=this.newest=void 0,this.size=0,this._keymap.clear()}keys(){return new o(this.oldest)}values(){return new s(this.oldest)}entries(){return this}[Symbol.iterator](){return new a(this.oldest)}forEach(e,n){typeof n!=`object`&&(n=this);let r=this.oldest;for(;r;)e.call(n,r.value,r.key,this),r=r[t]}toJSON(){for(var e=Array(this.size),n=0,r=this.oldest;r;)e[n++]={key:r.key,value:r.value},r=r[t];return e}toString(){for(var e=``,n=this.oldest;n;)e+=String(n.key)+`:`+n.value,n=n[t],n&&(e+=` < `);return e}}e.LRUMap=r;function i(e,r){this.key=e,this.value=r,this[t]=void 0,this[n]=void 0}function a(e){this.entry=e}a.prototype[Symbol.iterator]=function(){return this},a.prototype.next=function(){let e=this.entry;return e?(this.entry=e[t],{done:!1,value:[e.key,e.value]}):{done:!0,value:void 0}};function o(e){this.entry=e}o.prototype[Symbol.iterator]=function(){return this},o.prototype.next=function(){let e=this.entry;return e?(this.entry=e[t],{done:!1,value:e.key}):{done:!0,value:void 0}};function s(e){this.entry=e}s.prototype[Symbol.iterator]=function(){return this},s.prototype.next=function(){let e=this.entry;return e?(this.entry=e[t],{done:!1,value:e.value}):{done:!0,value:void 0}}})}))(),1),Fx=Symbol(`IGNORE_RESPONSE`),Ix=class extends Error{constructor(){super(`WorkerPoolManager: operation canceled because the pool terminated`)}},Lx=class extends Error{constructor(){super(`WorkerPoolManager: operation canceled before the task completed`)}},Rx=class{options;highlighter;preferredHighlighter;renderOptions;renderOptionsRequestVersion=0;renderOptionsVersion=0;initialized=!1;workers=[];queuedTasks=[];queuedTaskByInstance=new Map;taskByHighlightKey=new Map;activeTaskById=new Map;activeRequestByInstance=new Map;nextRequestId=0;themeSubscribers=new Set;workersFailed=!1;statSubscribers=new Set;fileCache;diffCache;_queuedBroadcast;lifecycleGeneration=0;constructor(e,{langs:t,theme:n=M,useTokenTransformer:r=!1,lineDiffType:i=`word-alt`,maxLineDiffLength:a=1e3,tokenizeMaxLineLength:o=1e3,preferredHighlighter:s=`shiki-js`}){this.options=e,this.preferredHighlighter=s,this.renderOptions={theme:n,useTokenTransformer:r,lineDiffType:i,maxLineDiffLength:a,tokenizeMaxLineLength:o},this.fileCache=new Px.default.LRUMap(e.totalASTLRUCacheSize??100),this.diffCache=new Px.default.LRUMap(e.totalASTLRUCacheSize??100),this.queueInitialization(t)}isWorkingPool(){return!this.workersFailed}getFileResultCache(e){return e.cacheKey==null?void 0:this.fileCache.get(e.cacheKey)}getDiffResultCache(e){return e.cacheKey==null?void 0:this.diffCache.get(e.cacheKey)}inspectCaches(){let{fileCache:e,diffCache:t}=this;return{fileCache:e,diffCache:t}}evictFileFromCache(e){try{return this.fileCache.delete(e)!==void 0}finally{this.queueBroadcastStateChanges()}}evictDiffFromCache(e){try{return this.diffCache.delete(e)!==void 0}finally{this.queueBroadcastStateChanges()}}async setRenderOptions({theme:e=this.renderOptions.theme??M,useTokenTransformer:t=this.renderOptions.useTokenTransformer??!1,lineDiffType:n=this.renderOptions.lineDiffType??`word-alt`,maxLineDiffLength:r=this.renderOptions.maxLineDiffLength??1e3,tokenizeMaxLineLength:i=this.renderOptions.tokenizeMaxLineLength??1e3}){let{lifecycleGeneration:a}=this,o=++this.renderOptionsRequestVersion,s=()=>this.isCurrentLifecycle(a)&&this.renderOptionsRequestVersion===o;try{let a={theme:e,useTokenTransformer:t,lineDiffType:n,maxLineDiffLength:r,tokenizeMaxLineLength:i};if(this.isInitialized()||await this.initialize(),!s()||B_(a,this.renderOptions))return;let o=qh(e),c=[];if(vr(a.theme,this.renderOptions.theme)||(c=Yh(o)?Uy(o):await Wy(o)),!s())return;if(this.highlighter!=null)vh(c,this.highlighter);else{let e=await Wh({themes:o,langs:[`text`],preferredHighlighter:this.preferredHighlighter});if(!s())return;this.highlighter=e}let l=this.setRenderOptionsOnWorkers(a,c);this.renderOptions=a,this.renderOptionsVersion++,this.diffCache.clear(),this.fileCache.clear(),this.invalidateRenderTasks();for(let e of this.themeSubscribers)e.onThemeChange();await l}catch(e){if(e instanceof Ix||!s())return;throw e}}getPreferredHighlighter(){return this.preferredHighlighter}getFileRenderOptions(){let{tokenizeMaxLineLength:e,theme:t,useTokenTransformer:n}=this.renderOptions;return{theme:t,useTokenTransformer:n,tokenizeMaxLineLength:e}}getDiffRenderOptions(){return{...this.renderOptions}}async setRenderOptionsOnWorkers(e,t){if(this.workersFailed)return;this.isInitialized()||await this.initialize();let n=[];for(let r of this.workers){if(!r.initialized)throw console.log({managedWorker:r}),Error(`setRenderOptionsOnWorkers: Somehow we have an uninitialized worker`);n.push(new Promise((n,i)=>{let a=this.generateRequestId(),o={type:`set-render-options`,id:a,request:{type:`set-render-options`,id:a,renderOptions:e,resolvedThemes:t},resolve:n,reject:i,requestStart:Date.now()};this.activeTaskById.set(a,o),r.pendingSetupRequestId=a,r.worker.postMessage(o.request)}))}await Promise.all(n)}subscribeToThemeChanges(e){return this.themeSubscribers.add(e),this.queueBroadcastStateChanges(),()=>{this.unsubscribeToThemeChanges(e),this.queueBroadcastStateChanges()}}unsubscribeToThemeChanges(e){this.themeSubscribers.delete(e),this.queueBroadcastStateChanges()}subscribeToStatChanges(e){return this.statSubscribers.add(e),e(this.getStats()),()=>{this.statSubscribers.delete(e)}}queueBroadcastStateChanges(){this._queuedBroadcast??=requestAnimationFrame(this._broadcastStateChanges)}_broadcastStateChanges=()=>{this._queuedBroadcast!=null&&(cancelAnimationFrame(this._queuedBroadcast),this._queuedBroadcast=void 0);let e=this.getStats();for(let t of this.statSubscribers)t(e)};cleanUpTasks(e){this.detachInstanceFromQueuedTasks(e);let t=this.activeRequestByInstance.get(e);if(t!=null){let n=this.activeTaskById.get(t);Vx(n)?(this.detachInstanceFromRenderTask(n,e),!n.primeCache&&n.instances.size===0&&this.removeActiveTask(n)):this.activeTaskById.delete(t)}this.activeRequestByInstance.delete(e),this.queueBroadcastStateChanges()}isInitialized(){return this.initialized===!0}async initialize(e=[]){if(this.initialized!==!0){if(this.initialized===!1){let{lifecycleGeneration:t}=this;this.initialized=new Promise((n,r)=>{(async()=>{try{let r=qh(this.renderOptions.theme),i=[];if(i=Yh(r)?Uy(r):await Wy(r),!this.isCurrentLifecycle(t)){n();return}let a=[];if(a=Vy(e)?By(e):await Hy(e),!this.isCurrentLifecycle(t)){n();return}let[o]=await Promise.all([Wh({themes:r,langs:[`text`,...e],preferredHighlighter:this.preferredHighlighter}),this.initializeWorkers(i,a)]);if(!this.isCurrentLifecycle(t)){this.terminateWorkers(),n();return}this.highlighter=o,this.initialized=!0,this.diffCache.clear(),this.fileCache.clear(),this.drainQueue(),this.queueBroadcastStateChanges(),n()}catch(e){if(e instanceof Ix||!this.isCurrentLifecycle(t)){n();return}this.initialized=!1,this.workersFailed=!0;for(let t of this.queuedTasks)this.rejectRenderTaskCallbacks(t,Ux(e));this.queueBroadcastStateChanges(),r(e)}})()}),this.queueBroadcastStateChanges()}else return this.initialized}}async initializeWorkers(e,t){this.workersFailed=!1;let n=[],r=lg(),i=r>0?ug():void 0;this.workers.length>0&&this.terminateWorkers();for(let a=0;a<(this.options.poolSize??8);a++){let a=this.options.workerFactory(),o={worker:a,requestId:void 0,pendingSetupRequestId:void 0,initialized:!1,langs:new Set([`text`,...t.map(({name:e})=>e)]),customExtensionsVersion:0};a.addEventListener(`message`,e=>{this.handleWorkerMessage(o,e.data)}),a.addEventListener(`error`,e=>console.error(`Worker error:`,e,o)),this.workers.push(o),n.push(new Promise((n,a)=>{let s=this.generateRequestId(),c={type:`initialize`,id:s,request:{type:`initialize`,id:s,renderOptions:this.renderOptions,preferredHighlighter:this.preferredHighlighter,resolvedThemes:e,resolvedLanguages:t,customExtensionsVersion:i==null?void 0:r,customExtensionMap:i},resolve(){o.initialized=!0,n()},reject:a,requestStart:Date.now()};this.activeTaskById.set(s,c),this.executeTask(o,c)}))}await Promise.all(n)}drainQueue=()=>{if(this._queuedDrain=void 0,this.initialized===!0&&this.queuedTasks.length!==0){for(let e=0;e<this.queuedTasks.length;){let t=this.queuedTasks[e];if(this.hasActiveRequest(t)){e++;continue}let n=Bx(t),r=this.getAvailableWorker(n);if(r==null)break;this.queuedTasks.splice(e,1),this.assignWorkerToTask(t,r),this.resolveLanguagesAndExecuteTask(r,t,n)}this.queueBroadcastStateChanges()}};highlightFileAST(e,t){let n=this.getFileResultCache(t);$g(t)||n!=null&&Xh(n.options,this.getFileRenderOptions())||this.hasMatchingFileInstanceTask(e,t)||this.submitTask(e,{type:`file`,file:t})}primeFileHighlightCache(e){if(!this.isWorkingPool())return Promise.reject(Error(`WorkerPoolManager.primeFileHighlightCache: worker pool is not working`));let t=this.getOrCreateFileHighlightCacheTask(e);return t==null?Promise.resolve():this.createRenderTaskCallbacks(t)}getOrCreateFileHighlightCacheTask(e){if(e.cacheKey==null){console.warn(`WorkerPoolManager.primeFileHighlightCache: priming highlight cache requires file.cacheKey; skipping "${e.name}".`);return}let t=this.getFileResultCache(e),n=this.getFileHighlightKey(e);if(n==null||$g(e)||t!=null&&Xh(t.options,this.getFileRenderOptions()))return;let r=this.getTaskByHighlightKey(n);if(r!=null)return r.primeCache=!0,r.type===`file`?r:void 0;{let t=this.submitCacheTask({type:`file`,file:e},n);return t.type===`file`?t:void 0}}getPlainFileAST(e,t,n,r){if(this.highlighter==null){this.queueInitialization();return}return qg(e,this.highlighter,this.renderOptions,{forcePlainText:!0,startingLine:t,totalLines:n,lines:r})}highlightDiffAST(e,t){let n=this.getDiffResultCache(t);sy(t)||n!=null&&B_(n.options,this.getDiffRenderOptions())||this.hasMatchingDiffInstanceTask(e,t)||this.submitTask(e,{type:`diff`,diff:t})}primeDiffHighlightCache(e){if(!this.isWorkingPool())return Promise.reject(Error(`WorkerPoolManager.primeDiffHighlightCache: worker pool is not working`));let t=this.getOrCreateDiffHighlightCacheTask(e);return t==null?Promise.resolve():this.createRenderTaskCallbacks(t)}getOrCreateDiffHighlightCacheTask(e){if(e.cacheKey==null){console.warn(`WorkerPoolManager.primeDiffHighlightCache: priming highlight cache requires diff.cacheKey; skipping "${e.prevName??e.name}" -> "${e.name}".`);return}let t=this.getDiffResultCache(e),n=this.getDiffHighlightKey(e);if(n==null||sy(e)||t!=null&&B_(t.options,this.getDiffRenderOptions()))return;let r=this.getTaskByHighlightKey(n);if(r!=null)return r.primeCache=!0,r.type===`diff`?r:void 0;{let t=this.submitCacheTask({type:`diff`,diff:e},n);return t.type===`diff`?t:void 0}}getPlainDiffAST(e,t,n,r,i){return this.highlighter==null?void 0:dv(e,this.highlighter,this.renderOptions,{forcePlainText:!0,startingLine:t,totalLines:n,expandedHunks:r,collapsedContextThreshold:i})}terminate(){this.lifecycleGeneration++,this.cancelActiveWorkerTasks(),this.terminateWorkers();let e=new Ix;for(let t of this.queuedTasks)this.rejectRenderTaskCallbacks(t,e);this.fileCache.clear(),this.diffCache.clear(),this.activeRequestByInstance.clear(),this.queuedTasks.length=0,this.queuedTaskByInstance.clear(),this.taskByHighlightKey.clear(),this.activeTaskById.clear(),this.highlighter=void 0,this.initialized=!1,this.workersFailed=!1,this.queueBroadcastStateChanges()}isCurrentLifecycle(e){return this.lifecycleGeneration===e}queueInitialization(e){this.initialize(e).catch(e=>{console.error(e)})}cancelActiveWorkerTasks(){let e=new Ix;for(let t of this.activeTaskById.values())`reject`in t?t.reject(e):Vx(t)&&this.rejectRenderTaskCallbacks(t,e)}terminateWorkers(){for(let e of this.workers)e.worker.terminate();this.workers.length=0}getStats(){return{managerState:this.initialized===!1?`waiting`:this.initialized===!0?`initialized`:`initializing`,totalWorkers:this.workers.length,workersFailed:this.workersFailed,busyWorkers:this.workers.filter(e=>e.requestId!=null||e.pendingSetupRequestId!=null).length,queuedTasks:this.queuedTasks.length,activeTasks:this.activeTaskById.size,themeSubscribers:this.themeSubscribers.size,fileCacheSize:this.fileCache.size,diffCacheSize:this.diffCache.size}}submitTask(e,t){this.initialized===!1&&this.queueInitialization();let n=this.getHighlightKeyForRequest(t),r=n==null?void 0:this.getTaskByHighlightKey(n);if(r!=null){this.detachInstanceFromQueuedTasks(e,r),this.addInstanceToTask(r,e),this.queueBroadcastStateChanges();return}this.detachInstanceFromQueuedTasks(e);let i=this.generateRequestId(),a=Date.now(),{renderOptionsVersion:o}=this,s=(()=>{switch(t.type){case`file`:return{type:`file`,id:i,request:{...t,id:i},instances:new Set([e]),primeCache:!1,highlightKey:n,callbacks:new Set,renderOptionsVersion:o,requestStart:a};case`diff`:return{type:`diff`,id:i,request:{...t,id:i},instances:new Set([e]),primeCache:!1,highlightKey:n,callbacks:new Set,renderOptionsVersion:o,requestStart:a}}})();this.enqueueRenderTask(s,e)}submitCacheTask(e,t){this.initialized===!1&&this.queueInitialization();let n=this.generateRequestId(),r=Date.now(),{renderOptionsVersion:i}=this,a=(()=>{switch(e.type){case`file`:return{type:`file`,id:n,request:{...e,id:n},instances:new Set,primeCache:!0,highlightKey:t,callbacks:new Set,renderOptionsVersion:i,requestStart:r};case`diff`:return{type:`diff`,id:n,request:{...e,id:n},instances:new Set,primeCache:!0,highlightKey:t,callbacks:new Set,renderOptionsVersion:i,requestStart:r}}})();return this.enqueueRenderTask(a),a}enqueueRenderTask(e,t){this.queuedTasks.push(e),t!=null&&this.queuedTaskByInstance.set(t,e),e.highlightKey!=null&&this.taskByHighlightKey.set(e.highlightKey,e),this.queueDrain()}async resolveLanguagesAndExecuteTask(e,t,n){try{let r=n.filter(t=>!e.langs.has(t));if(r.length>0&&(Vy(r)?t.request.resolvedLanguages=By(r):t.request.resolvedLanguages=await Hy(r)),!this.activeTaskById.has(t.id)){e.requestId===t.id&&(this.cleanWorkerAndTask(e,t),this.queueBroadcastStateChanges(),this.queuedTasks.length>0&&this.queueDrain());return}this.executeTask(e,t)}catch(n){this.rejectRenderTaskCallbacks(t,Ux(n)),this.cleanWorkerAndTask(e,t),this.queueBroadcastStateChanges(),this.queuedTasks.length>0&&this.queueDrain()}}handleWorkerMessage(e,t){let n=this.activeTaskById.get(t.id);try{if(n==null)throw Fx;if(t.type===`error`){let e=Error(t.error);if(t.stack&&(e.stack=t.stack),`reject`in n)n.reject(e);else if(Vx(n))this.notifyHighlightError(n,e),this.rejectRenderTaskCallbacks(n,e);else throw Error(`handleWorkerMessage: unknown task type`);throw e}switch(t.requestType){case`initialize`:if(n.type!==`initialize`)throw Error(`handleWorkerMessage: task/response dont match`);this.syncCustomExtensionVersion(e,n.request),n.resolve();break;case`set-render-options`:if(n.type!==`set-render-options`)throw Error(`handleWorkerMessage: task/response dont match`);n.resolve();break;case`file`:{if(n.type!==`file`)throw Error(`handleWorkerMessage: task/response dont match`);let{result:r,options:i}=t;if(!this.isCurrentRenderTask(n)||!Xh(i,this.getFileRenderOptions()))throw Fx;let{request:a}=n;this.syncCustomExtensionVersion(e,a),n.cacheKeyAtDispatch!=null&&this.fileCache.set(n.cacheKeyAtDispatch,{result:r,options:i}),this.resolveRenderTaskCallbacks(n),this.notifyFileInstances(n,r,i);break}case`diff`:{if(n.type!==`diff`)throw Error(`handleWorkerMessage: task/response dont match`);let{result:r,options:i}=t;if(!this.isCurrentRenderTask(n)||!B_(i,this.getDiffRenderOptions()))throw Fx;let{request:a}=n;this.syncCustomExtensionVersion(e,a),n.cacheKeyAtDispatch!=null&&this.diffCache.set(n.cacheKeyAtDispatch,{result:r,options:i}),this.resolveRenderTaskCallbacks(n),this.notifyDiffInstances(n,r,i);break}}}catch(e){e!==Fx&&console.error(e,n,t)}this.cleanWorkerAndTask(e,n,t.id),this.queueBroadcastStateChanges(),this.queuedTasks.length>0&&this.queueDrain()}_queuedDrain;queueDrain(){this._queuedDrain??(this._queuedDrain=Promise.resolve().then(this.drainQueue),this.queueBroadcastStateChanges())}assignWorkerToTask(e,t){t.requestId=e.id,Vx(e)&&(this.clearQueuedInstanceRequests(e),this.trackInstanceRequests(e)),this.activeTaskById.set(e.id,e)}cleanWorkerAndTask(e,t,n=t?.id){e.requestId===n&&(e.requestId=void 0),e.pendingSetupRequestId===n&&(e.pendingSetupRequestId=void 0),t!=null&&(Vx(t)&&(this.rejectRenderTaskCallbacks(t,new Lx),this.clearInstanceRequests(t),this.clearHighlightKey(t)),this.activeTaskById.delete(t.id))}executeTask(e,t){zx(t.request)&&this.maybeAttachCustomExtensions(e,t.request),this.activeTaskById.has(t.id)||this.assignWorkerToTask(t,e);for(let n of Bx(t))e.langs.add(n);try{t.type===`file`?t.cacheKeyAtDispatch=t.request.file.cacheKey:t.type===`diff`&&(t.cacheKeyAtDispatch=t.request.diff.cacheKey),e.worker.postMessage(t.request)}catch(n){console.error(`Failed to post message to worker:`,n),Vx(t)?(this.notifyHighlightError(t,n),this.rejectRenderTaskCallbacks(t,Ux(n))):`reject`in t&&t.reject(n),this.cleanWorkerAndTask(e,t),this.queuedTasks.length>0&&this.queueDrain()}this.queueBroadcastStateChanges()}maybeAttachCustomExtensions(e,t){if(t.customExtensionsVersion!=null)return;let n=lg();e.customExtensionsVersion>=n||(t.customExtensionsVersion=n,t.customExtensionMap=ug())}syncCustomExtensionVersion(e,t){t.customExtensionsVersion!=null&&(e.customExtensionsVersion=t.customExtensionsVersion)}getAvailableWorker(e){let t;for(let n of this.workers){if(n.requestId!=null||n.pendingSetupRequestId!=null||!n.initialized)continue;if(t=n,e.length===0)break;let r=!0;for(let t of e)if(!n.langs.has(t)){r=!1;break}if(r)break}return t}getFileHighlightKey(e){if(e.cacheKey!=null)return`file:${e.cacheKey}:${this.renderOptionsVersion}`}getDiffHighlightKey(e){if(e.cacheKey!=null)return`diff:${e.cacheKey}:${this.renderOptionsVersion}`}getHighlightKeyForRequest(e){switch(e.type){case`file`:return this.getFileHighlightKey(e.file);case`diff`:return this.getDiffHighlightKey(e.diff)}}hasActiveRequest(e){for(let t of Hx(e))if(this.activeRequestByInstance.has(t))return!0;return!1}addInstanceToTask(e,t){e.type,e.instances.add(t),this.activeTaskById.has(e.id)?this.activeRequestByInstance.set(t,e.id):this.queuedTaskByInstance.set(t,e)}detachInstanceFromQueuedTasks(e,t){let n=this.queuedTaskByInstance.get(e);n!=null&&n!==t&&(this.queuedTaskByInstance.delete(e),this.detachInstanceFromRenderTask(n,e),!n.primeCache&&n.instances.size===0&&this.removeQueuedTask(n))}detachInstanceFromRenderTask(e,t){e.type,e.instances.delete(t)}removeQueuedTask(e){let t=this.queuedTasks.indexOf(e);t!==-1&&this.queuedTasks.splice(t,1),this.rejectRenderTaskCallbacks(e,new Lx),this.clearQueuedInstanceRequests(e),this.clearHighlightKey(e)}removeActiveTask(e){this.rejectRenderTaskCallbacks(e,new Lx),this.clearInstanceRequests(e),this.clearHighlightKey(e),this.activeTaskById.delete(e.id)}createRenderTaskCallbacks(e){return new Promise((t,n)=>{e.callbacks.add({resolve:t,reject:n})})}resolveRenderTaskCallbacks(e){for(let t of e.callbacks)t.resolve();e.callbacks.clear()}rejectRenderTaskCallbacks(e,t){for(let n of e.callbacks)n.reject(t);e.callbacks.clear()}invalidateRenderTasks(){for(let e=this.queuedTasks.length-1;e>=0;e--){let t=this.queuedTasks[e];t.renderOptionsVersion!==this.renderOptionsVersion&&this.removeQueuedTask(t)}for(let e of Array.from(this.activeTaskById.values()))Vx(e)&&e.renderOptionsVersion!==this.renderOptionsVersion&&this.removeActiveTask(e)}clearQueuedInstanceRequests(e){for(let t of Hx(e))this.queuedTaskByInstance.get(t)===e&&this.queuedTaskByInstance.delete(t)}clearHighlightKey(e){e.highlightKey!=null&&this.taskByHighlightKey.get(e.highlightKey)===e&&this.taskByHighlightKey.delete(e.highlightKey)}trackInstanceRequests(e){for(let t of Hx(e))this.activeRequestByInstance.set(t,e.id)}clearInstanceRequests(e){for(let t of Hx(e))this.activeRequestByInstance.get(t)===e.id&&this.activeRequestByInstance.delete(t)}notifyFileInstances(e,t,n){for(let r of e.instances)this.activeRequestByInstance.get(r)===e.id&&r.onHighlightSuccess(e.request.file,t,n)}notifyDiffInstances(e,t,n){for(let r of e.instances)this.activeRequestByInstance.get(r)===e.id&&r.onHighlightSuccess(e.request.diff,t,n)}notifyHighlightError(e,t){for(let n of Hx(e))this.activeRequestByInstance.get(n)===e.id&&n.onHighlightError(t)}hasMatchingFileInstanceTask(e,t){for(let n of this.iterateRenderTasks())if(n.type===`file`&&this.isCurrentRenderTask(n)&&n.instances.has(e)&&Ai(t,n.request.file))return!0;return!1}hasMatchingDiffInstanceTask(e,t){for(let n of this.iterateRenderTasks())if(n.type===`diff`&&this.isCurrentRenderTask(n)&&n.instances.has(e)&&D_(n.request.diff,t))return!0;return!1}getTaskByHighlightKey(e){let t=this.taskByHighlightKey.get(e);return t!=null&&this.isCurrentRenderTask(t)?t:void 0}isCurrentRenderTask(e){return e.renderOptionsVersion===this.renderOptionsVersion}*iterateRenderTasks(){for(let e of this.queuedTasks)yield e;for(let e of this.activeTaskById.values())Vx(e)&&(yield e)}generateRequestId(){return`req_${++this.nextRequestId}`}};function zx(e){return e.type===`initialize`||e.type===`file`||e.type===`diff`}function Bx(e){let t=new Set;if(e.type===`initialize`||e.type===`set-render-options`)return[];switch(e.type){case`file`:t.add(e.request.file.lang??cg(e.request.file.name));break;case`diff`:t.add(e.request.diff.lang??cg(e.request.diff.name)),t.add(e.request.diff.lang??cg(e.request.diff.prevName??`-`))}return t.delete(`text`),Array.from(t)}function Vx(e){return e?.type===`file`||e?.type===`diff`}function Hx(e){return e.instances}function Ux(e){return e instanceof Error?e:Error(String(e))}var Wx;function Gx({poolOptions:e,highlighterOptions:t}){return Wx??=new Rx(e,t),Wx}var Kx=`/assets/worker-DZo603XT.js`,qx;function Jx(){return qx??=Gx({poolOptions:{workerFactory:()=>new Worker(Kx,{type:`module`}),poolSize:Math.min(2,navigator.hardwareConcurrency||2)},highlighterOptions:{theme:{dark:`pierre-dark`,light:`pierre-light`}}})}function Yx(e,t){let n=3735928559,r=1103547991;for(let e=0;e<t.length;e++){let i=t.charCodeAt(e);n=Math.imul(n^i,2654435761),r=Math.imul(r^i,1597334677)}return n=Math.imul(n^n>>>16,2246822507)^Math.imul(r^r>>>13,3266489909),r=Math.imul(r^r>>>16,2246822507)^Math.imul(n^n>>>13,3266489909),`${e}@${(r>>>0).toString(36)}${(n>>>0).toString(36)}:${t.length}`}function Xx(e,t){let n=null,r=()=>{if(!n||t.aborted)return;let i=e().closest(`[data-diff-main]`);if(i){let t=i.getBoundingClientRect(),r=0;if(n.y>=t.bottom-110?r=Math.max(4,Math.min(20,(n.y-(t.bottom-110))/3)):n.y<=t.top+110&&(r=-Math.max(4,Math.min(20,(t.top+110-n.y)/3))),r){i.scrollTop+=r;let a=e().getBoundingClientRect(),o=Math.max(t.top+12,a.top+48),s=Math.min(t.bottom-12,a.bottom-48),c=Math.max(o,Math.min(n.y,s));document.dispatchEvent(new PointerEvent(`pointermove`,{clientX:n.x,clientY:c,pointerId:n.pointerId,pointerType:`touch`,bubbles:!0,composed:!0}))}}requestAnimationFrame(r)};e().addEventListener(`pointerdown`,e=>{e.pointerType!==`mouse`&&e.composedPath().some(e=>e instanceof HTMLElement&&e.hasAttribute?.(`data-column-number`))&&(n={pointerId:e.pointerId,x:e.clientX,y:e.clientY},requestAnimationFrame(r))},{capture:!0,signal:t}),document.addEventListener(`pointermove`,e=>{n&&e.pointerId===n.pointerId&&e.isTrusted&&(n.x=e.clientX,n.y=e.clientY)},{capture:!0,passive:!0,signal:t});for(let e of[`pointerup`,`pointercancel`])document.addEventListener(e,e=>{n&&e.pointerId===n.pointerId&&(n=null)},{capture:!0,signal:t})}var Zx=`<div></div>`,Qx=`background:var(--panel);border-block:1px solid var(--border);padding:.5rem .75rem;font-family:system-ui,sans-serif;font-size:.85rem;display:flex;flex-direction:column;gap:.35rem;`,$x=`display:flex;flex-wrap:wrap;gap:.4rem;align-items:center;`,eS=[`_o`,Te,`_p`,`_U`,`_I`,Ke.warn,`_fx`,`_fy`,`_fz`],tS=null;function nS(e,t){let n=e||[],r=t||[];return n.length===r.length&&n.every((e,t)=>e===r[t]||e.id===r[t].id&&e.text===r[t].text)}function rS(){if(tS)return tS;let e=new CSSStyleSheet,t=eS.flatMap(e=>e.split(/\s+/)).filter(Boolean).map(e=>`.${e}`),n=[],r=e=>t.some(t=>RegExp(`${t.replace(/[.$]/g,`\\$&`)}(?![\\w-])`).test(e));for(let e of document.styleSheets){let t;try{t=e.cssRules}catch{continue}for(let e of t){let t=e.selectorText;t&&r(t)&&n.push(e.cssText)}}return n.unshift(`button, select { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; } textarea { font: inherit; font-family: system-ui, sans-serif; color: inherit; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.45rem 0.6rem; } textarea:focus-visible, select:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }`),e.replaceSync(n.join(`
|
|
1536
|
-
`)),tS=e,e}var iS=new CSSStyleSheet;iS.replaceSync(`:host { display: block; max-width: 100%; overflow-x: auto; } @media (pointer: coarse) { pre[data-diff] { touch-action: pan-x pan-y; } [data-column-number], [data-gutter-utility-slot] { touch-action: none !important; } }`+Ft);var aS=vt(`h0`,0),oS=(e,t)=>c(e.a,[`_hp`,t]),sS=D(`h1`,e=>S(e,{file:e.e,comments:e.f,draft:e.g,sessions:e.h,wholeFile:e.i,onMount:function(){let t=()=>e.h||[],n=()=>{let e=t();if(e.length<=1)return null;let n=document.createElement(`select`);n.setAttribute(`aria-label`,`Send to session`),n.className=`_fz`;for(let t of e){let e=document.createElement(`option`);e.value=t.id,e.textContent=t.title||t.agent,n.append(e)}return n},r=e=>e?.value||t()[0]?.id||null,i=(e,t,n)=>{for(let r of e)r.disabled=t,n&&r.dataset.role===`send`&&(r.textContent=t?`Sending…`:n)},a=(e,n,r)=>{let i=t()[0];if(!n)return e.className=`_o ${r?Te:``} _p`,e.textContent=`Send`,i&&(e.title=`Send to ${i.title||i.agent}`),e;let a=document.createElement(`span`);return a.className=`_fx`,r&&(a.style.cssText=`font-size:.75rem;`),e.className=`_p _fy`,e.textContent=`Send to`,a.append(e,n),a},o=t=>{if(t.snippet==null)return null;let n=t.side===`deletions`?e.e.old:e.e.new;if(n==null||cn(n,t.line_start,t.line_end,t.side)===t.snippet)return null;let r=document.createElement(`span`);return r.className=`_I ${Ke.warn}`,r.textContent=`changed since`,r.title=`The file changed here after this comment was written; the agent gets the lines as they were.`,r},s=s=>{if(!s)return;let c=document.createElement(`div`);c.style.cssText=Qx;let l=document.createElement(`div`),u=document.createElement(`div`);u.style.cssText=$x;let d=()=>{l.replaceChildren(),u.replaceChildren();let c=document.createElement(`p`);c.textContent=s.text,c.style.cssText=`margin:0;white-space:pre-wrap;`;let d=document.createElement(`button`);d.type=`button`,d.textContent=`Remove`,d.className=`_o ${Te}`,d.onclick=()=>e.j?.(s.id);let p=document.createElement(`button`);p.type=`button`,p.textContent=`Edit`,p.className=`_o ${Te}`,p.hidden=!e.k,p.onclick=()=>f();let m=t().length>0&&!!e.l,h=document.createElement(`button`);h.type=`button`,h.dataset.role=`send`,h.textContent=`Send`,h.hidden=!m;let g=m?n():null,_=g?`Send to`:h.textContent;h.onclick=()=>{(async()=>{let t=r(g);if(!(!t||h.disabled)){i([d,p,h],!0,_);try{await e.l?.(s.id,t)}finally{i([d,p,h],!1,_)}}})()},u.append(p,d),m&&u.append(a(h,g,!0));let v=o(s);v&&u.append(v),l.append(c)},f=()=>{l.replaceChildren(),u.replaceChildren();let t=document.createElement(`textarea`);t.value=s.text,t.rows=3,t.className=`_U`,t.style.cssText=`resize:vertical;`+(je()?`font-size:16px;`:``);let n=document.createElement(`button`);n.type=`button`,n.textContent=`Save`,n.className=`_o _p`;let r=document.createElement(`button`);r.type=`button`,r.textContent=`Cancel`,r.className=`_o`;let a=()=>{let a=t.value.trim();if(!a||a===s.text){d();return}(async()=>{i([n,r],!0,`Save`);try{await e.k?.(s.id,a),s.text=a,d()}catch{i([n,r],!1,`Save`)}})()};n.onclick=a,r.onclick=()=>d(),t.onkeydown=e=>{e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),a()),e.key===`Escape`&&(e.preventDefault(),d())},u.append(n,r),l.append(t),setTimeout(()=>{t.focus(),t.setSelectionRange(t.value.length,t.value.length)},0)};return d(),c.append(l,u),c},c=()=>{let o=document.createElement(`div`);o.style.cssText=Qx;let s=document.createElement(`textarea`);s.placeholder=`Add a comment…`,s.rows=3,s.className=`_U`,s.style.cssText=`resize:vertical;`+(je()?`font-size:16px;`:``);let c=document.createElement(`button`);c.type=`button`,c.textContent=`Add`,c.className=`_o`;let l=document.createElement(`button`);l.type=`button`,l.dataset.role=`send`,l.textContent=`Send`;let u=document.createElement(`button`);u.type=`button`,u.textContent=`Cancel`,u.className=`_o`;let d=t().length>0&&!!e.m;l.hidden=!d;let f=d?n():null,p=d?a(l,f,!1):l,m=l.textContent;c.onclick=()=>{s.value.trim()&&e.n?.(s.value)},l.onclick=()=>{(async()=>{let t=s.value.trim(),n=r(f);if(!(!t||!n||l.disabled)){i([c,l,u],!0,m);try{await e.m?.(t,n)}finally{i([c,l,u],!1,m)}}})()},u.onclick=()=>e.o?.(),s.onkeydown=e=>{e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),d?l.onclick():c.onclick()),e.key===`Escape`&&u.onclick()};let h=document.createElement(`div`);h.style.cssText=$x,h.append(c),d&&h.append(p),h.append(u),o.append(s,h);let g=()=>s.scrollIntoView({block:`center`,behavior:`smooth`});s.addEventListener(`focus`,()=>{let e=window.visualViewport;e&&(e.addEventListener(`resize`,g),s.addEventListener(`blur`,()=>e.removeEventListener(`resize`,g),{once:!0}))});let _=(e=0)=>{if(!s.isConnected||!s.getClientRects().length){e<120&&requestAnimationFrame(()=>_(e+1));return}s.scrollIntoView({block:`center`,behavior:`instant`}),s.focus({preventScroll:!0})};return setTimeout(_,0),o},l=new Map,u,d={draft:!0},f,p={diffStyle:ct()?`unified`:`split`,disableFileHeader:!0,expandUnchanged:!!e.i,enableLineSelection:!0,onLineSelectionEnd(t){if(!t)return;let n=t.endSide!=null&&t.endSide!==t.side;e.p?.({side:t.side,start:t.start,end:n?t.start:t.end})},onPostRender(t,n,r){if(r===`unmount`)return;g(),Jt(e.a);let i=f?.querySelector(`textarea`),a=f?.getRootNode();if(i&&a&&`activeElement`in a&&a.activeElement===i){let e=i.getBoundingClientRect();e.height&&(e.top<0||e.bottom>window.innerHeight)&&i.scrollIntoView({block:`center`,behavior:`instant`})}},renderAnnotation(e){let t=e.metadata||{};return t.draft?f??=c():s(t.comment)}},m=new Ny(p,Jx()),h=()=>{let t=[],n=new Map;for(let r of e.f||[]){let e=l.get(r.id);(!e||e.comment.text!==r.text)&&(e={comment:r}),n.set(r.id,e),t.push({side:r.side,lineNumber:r.line_end,metadata:e})}return l=n,e.g&&(u!==e.g&&(u=e.g,d={draft:!0},f=void 0),t.push({side:e.g.side,lineNumber:e.g.end,metadata:d})),t},g=()=>{let t=e.a.querySelector(`diffs-container`)?.shadowRoot;t&&!t.adoptedStyleSheets.includes(iS)&&(t.adoptedStyleSheets=[...t.adoptedStyleSheets,iS,rS()])},_=()=>{if(e.e.old==null&&e.e.new==null){e.q?.(`could not read ${e.e.path}`);return}let t=m.render({containerWrapper:e.a,oldFile:e.e.old==null?null:{name:e.e.oldPath||e.e.path,contents:e.e.old,cacheKey:Yx(`${e.e.key}:old`,e.e.old)},newFile:e.e.new==null?null:{name:e.e.path,contents:e.e.new,cacheKey:Yx(`${e.e.key}:new`,e.e.new)},lineAnnotations:h()});Promise.resolve(t).then(()=>{g(),Jt(e.a)}).catch(t=>e.q?.(`diff render: ${t}`))};_();let v=new AbortController;return je()&&Xx(aS(e),v.signal),{instance:m,render:_,dragAbort:v,unregSearch:qt(e.a,e.e.key),shownFile:e.e,shownComments:e.f,shownDraft:e.g,shownSessions:e.h,shownWhole:!!e.i,options:p}},onUpdate:function(){!!this.wholeFile!==this.shownWhole&&(this.shownWhole=!!this.wholeFile,this.options.expandUnchanged=this.shownWhole,this.instance.setOptions(this.options),this.instance.rerender()),this.shownDraft&&!this.draft&&this.instance.setSelectedLines(null);let e=this.file,t=this.shownFile;(e.old!==t.old||e.new!==t.new||e.path!==t.path||e.oldPath!==t.oldPath||!nS(this.comments,this.shownComments)||this.draft!==this.shownDraft||this.sessions!==this.shownSessions)&&(this.shownFile=this.file,this.shownComments=this.comments,this.shownDraft=this.draft,this.shownSessions=this.sessions,this.render())},onDestroy:function(){this.unregSearch(),this.dragAbort.abort(),this.instance.cleanUp?.()}})),cS=b(17,sS,12),lS=w(4,cS),uS=w(5,cS),dS=w(6,cS),fS=w(7,cS),pS=w(8,cS),mS=w(9,cS),hS=w(10,cS),gS=w(11,cS),_S=w(12,cS),vS=w(13,cS),yS=w(14,cS),bS=w(15,cS),xS=w(16,cS),SS=`<section><div><!><!><span><span> </span><span aria-hidden=true>vs</span><span> </span><!></span><!><!><!><span><span><!> file<!></span><!><!></span></div><!></section>`,CS=` D D%b%b D D l b D l%l%b%b%b E%c%l%b%m%l`,wS=e=>c(e.a,[`_hk`,`_hc`]),TS=e=>c(e.a,[`_hk`,`_hc`]),ES=e=>c(e.a,[`_hk`,`_hc`]),DS=e=>{jx(e.a),Mx(e.a,13),Nx(e.a)},OS=e=>{Ex(e.a),Dx(e.a,13),Ox(e.a)},kS=e=>c(e.a,[`_z`,`_g_`]),AS=T(7,0,e=>k(e.c,e._.a0)),jS=e=>{AS._(e),c(e.a,`_s`),xx(e.b),Sx(e.b,12),Cx(e.b)},MS=e=>{gx(e.a),_x(e.a,14),vx(e.a)},NS=e=>{dx(e.a),fx(e.a,14),px(e.a)},PS=T(10,0,e=>k(e.b,e._.by)),FS=e=>{PS._(e),c(e.a,[`_I`,Ke.accent,`_g8`])},IS=T(17,0,e=>k(e.b,e._.bo)),LS=e=>{IS._(e),RS._(e),c(e.a,`_gZ`),c(e.c,`_g0`)},RS=T(17,0,e=>k(e.d,e._.bp)),zS=g(0,wx,(e=>`/${e}&`)(Tx),OS,kx,(e=>`/${e}&`)(Ax),DS),BS=b(1,e=>{c(e.a,[ke,`_hl`,{_hm:e._._._.bg.has(e._.m)}]),u(e.a,`title`,e._._._.bg.has(e._.m)?`Show changes only`:`Show whole file`),u(e.a,`aria-label`,e._._._.bg.has(e._.m)?`Show changes only`:`Show whole file`),u(e.a,`aria-pressed`,e._._._.bg.has(e._.m)?`true`:`false`),zS(e,+!e._._._.bg.has(e._.m))}),VS=v(135,BS,e=>e._._._),HS=D(`u12`,e=>A(e.a,`click`,function(t){t.preventDefault(),t.stopPropagation();let n=new Set(e._._._.bg);n.delete(e._.m)||n.add(e._.m),DT(e._._._,n)})),US=e=>{VS(e),WS._(e),HS(e)},WS=T(8,0,BS),GS=b(2,e=>u(e.a,`title`,`${e._.ax?`#${e._.ax.number}`:e._.b1} is already in ${e._.az}; showing the working tree only`),2),KS=T(12,0,GS),qS=e=>{KS._(e),JS._(e),YS._(e),c(e.a,[`_I`,`_g9`])},JS=T(12,0,e=>{k(e.b,e._.az),GS(e)}),YS=T(12,0,GS),XS=T(3,1,e=>k(e.b,Be(e._.ba))),ZS=e=>{XS._(e),c(e.a,cx)},QS=T(3,0,e=>k(e.d,e._.b3)),$S=e=>{QS._(e),eC._(e),tC._(e),nC._(e),c(e.a,[`_s`,`_u`]),c(e.c,cx)},eC=T(3,0,e=>k(e.b,e._.b7)),tC=T(3,0,e=>u(e.a,`href`,`${e._.b9}/files`)),nC=T(3,0,e=>u(e.a,`title`,e._.bz)),rC=T(2,1,e=>k(e.b,e._.b6)),iC=e=>{rC._(e),c(e.a,sx)},aC=b(1,e=>dS(e.a,e._._._._.am&&e._._._._.am.key===e._._.m?e._._._._.am:null)),oC=v(113,aC,e=>e._._._._),sC=e=>{oC(e),cC(e),uC(e),fC(e),mC(e),hC(e),gC(e),_C(e),vC(e),yC(e),xC(e),SC(e),CC(e),wC(e),e.a,oS(e.a,`_hc`)},cC=v(114,e=>fS(e.a,e._._._._.an),e=>e._._._._),lC=b(2,e=>bS(e.a,ME(e))),uC=v(115,lC,e=>e._._._._),dC=b(3,e=>vS(e.a,NE(e))),fC=v(116,dC,e=>e._._._._),pC=b(4,e=>_S(e.a,PE(e))),mC=v(117,pC,e=>e._._._._),hC=v(118,e=>yS(e.a,FE(e)),e=>e._._._._),gC=v(119,e=>mS(e.a,IE(e)),e=>e._._._._),_C=v(120,e=>hS(e.a,LE(e)),e=>e._._._._),vC=v(121,e=>gS(e.a,RE(e)),e=>e._._._._),yC=v(122,e=>xS(e.a,zE(e)),e=>e._._._._),bC=b(5,e=>pS(e.a,e._._._._.bg.has(e._._.m))),xC=v(135,bC,e=>e._._._._),SC=v(30,e=>{lS(e.a,e._._.l),lC(e),dC(e),pC(e)},e=>e._._),CC=v(31,e=>{aC(e),bC(e)},e=>e._._),wC=v(32,e=>uS(e.a,e._._.z),e=>e._._),TC=D(`u13`,e=>S(e,{onMount:function(){e._._._._.v.observeNear(e.a,()=>{MC(e._,!0)})}})),EC=v(98,TC,e=>e._._._._),DC=g(0,`<div></div>`,` `,e=>{EC(e),c(e.a,[`_he`,`_hc`])},Zx,(e=>`/${e}&`)(` b`),sC),OC=b(4,e=>DC(e,e.c||e.d?1:0)),kC=w(3,OC),AC=b(1,e=>kC(e,e._._._.aj===e._.m)),jC=v(110,AC,e=>e._._._),MC=E(2,OC),NC=e=>{jC(e),PC._(e),MC(e,!1)},PC=T(9,3,AC),FC=b(13,e=>u(e.a,`hidden`,!e._._.y.has(e.m))),IC=v(100,FC,e=>e._._),LC=D(`u14`,e=>{We(e,`a`),A(e.a,`toggle`,function(e,t){if(!t.open){let e=t.closest(`[data-diff-main]`);if(e){let n=t.getBoundingClientRect().top-e.getBoundingClientRect().top;n<0&&(e.scrollTop+=n)}}})}),RC=e=>{IC(e),HC(e),YC(e),QC(e),$C(e),ew(e),c(e.b,`_hd`),c(e.c,`_hi`),LC(e)},zC=f(wC),BC=w(25,e=>{nw(e,e.z.length),zC(e)}),VC=b(14,e=>BC(e,e._._.ah.get(e.m)||[])),HC=v(108,VC,e=>e._._),UC=b(28,e=>ae(e,`a`,e.a1,BE(e)),2),WC=g(8,`<button type=button></button>`,` `,US),GC=g(9,`<p>binary file</p>`,` `,ES,`<p>file too large to display</p>`,` `,TS,`<p>file could not be read</p>`,` `,wS,`<!><!><!>`,`b%`,NC),KC=b(29,e=>{WC(e,e.a1&&!e.v&&!e.w&&e.x!=null&&e.y!=null?0:1),GC(e,e.v?0:e.w?1:e.x==null&&e.y==null?2:e.a1?3:4)},4),qC=w(27,e=>{UC(e),KC(e)}),JC=b(15,e=>qC(e,!e._._.ai.has(e.m))),YC=v(109,JC,e=>e._._),XC=b(16,e=>c(e.a,[`_hb`,e._._.aj===e.m&&`_gR`])),ZC=b(17,e=>c(e.e,[`_hj`,e._._.aj===e.m&&e._._.al<1&&`_gS`]),2),QC=v(110,e=>{XC(e),ZC(e)},e=>e._._),$C=v(111,UC,e=>e._._),ew=v(112,ZC,e=>e._._),tw=g(7,(e=>`<span>${e} <!></span>`)(yx),(e=>` D/${e}&b%l`)(bx),jS),nw=w(26,e=>{tw(e,+!e.a0),AS(e)}),rw=f(CC),iw=w(12,e=>{u(e.a,`data-key`,e.m),VC(e),JC(e),UC(e),XC(e),FC(e),ZC(e),PC(e),rw(e),WS(e)}),aw=(e,t)=>{u(e.c,`data-status`,t),k(e.d,t)},ow=(e,t)=>{u(e.e,`title`,t),k(e.f,t)},sw=g(6,`<span title="Changed since your last visit"></span>`,` `,kS),cw=(e,t)=>sw(e,+!t),lw=w(21,KC),uw=w(22,KC),dw=w(23,KC),fw=w(24,KC),pw=(e,t)=>hw(e,t[0]),mw=f(SC),hw=w(11,e=>{iw(e,e.l?.key),aw(e,e.l?.status),ow(e,e.l?.path),cw(e,e.l?.changedSince),lw(e,e.l?.binary),uw(e,e.l?.tooLarge),dw(e,e.l?.old),fw(e,e.l?.new),mw(e)}),gw=_e(0,`<details><summary><span> </span><span><bdi> </bdi></span><!><!><!></summary><!></details>`,` D D D l E m%b%b%l%`,RC,pw),_w=T(19,0,e=>gw(e,[e._.x,`key`])),vw=e=>{_w._(e),bw._(e),xw._(e),c(e.a,`_ha`)},yw=b(1,e=>u(e.a,`hidden`,e._.a5&&e._.a6)),bw=T(19,0,yw),xw=T(19,0,yw),Sw=T(18,0,e=>{c(e.a,[`_g2`,{_g1:e._.ad}]),u(e.a,`aria-pressed`,e._.ad?`true`:`false`),u(e.a,`title`,e._.ad?`Show every file`:`Show only files changed since your last visit`)}),Cw=D(`u11`,e=>A(e.a,`click`,function(){e._.ae()})),ww=e=>{Sw._(e),Tw._(e),Cw(e)},Tw=T(18,0,e=>k(e.b,e._.br)),Ew=b(3,e=>k(e.b,ox(e._.b1,e._.a1,e._.a2)),2),Dw=T(13,0,Ew),Ow=e=>{Dw._(e),kw._(e),jw._(e),Mw._(e),Nw._(e),Pw._(e),c(e.a,[`_I`,`_g9`])},kw=T(13,0,Ew),Aw=b(4,e=>u(e.a,`title`,`This view is ${sn(e._.b4)} (${e._.b0}); checked out is ${sn(e._.bf)} (${e._.b1})`),3),jw=T(13,0,Aw),Mw=T(13,0,e=>{Aw(e),Ew(e)}),Nw=T(13,0,Aw),Pw=T(13,0,e=>{k(e.c,sn(e._.bf,7)),Aw(e)}),Fw=T(11,0,e=>u(e.a,`disabled`,e._.aa)),Iw=D(`u10`,e=>A(e.a,`click`,function(){e._.ab()})),Lw=e=>{Fw._(e),zw._(e),Bw._(e),Vw._(e),c(e.a,[`_I`,Ke.warn,`_g9`]),Iw(e)},Rw=b(3,e=>u(e.a,`title`,`origin/${e._.b0} ${e._.b4} · GitHub ${e._.bc}. Reload to re-ask GitHub`),2),zw=T(11,0,Rw),Bw=T(11,0,e=>{k(e.b,sn(e._.b4,7)),Rw(e)}),Vw=T(11,0,e=>{k(e.c,sn(e._.bc,7)),Rw(e)}),Hw=g(1,lx,(e=>`/${e}&`)(ux),NS,mx,(e=>`/${e}&`)(hx),MS),Uw=b(5,e=>u(e.a,`title`,e._.a6?`Show ${e._.bm} files`:`Hide files`)),Ww=b(4,e=>c(e.b,[`_hf`,!e._.a6&&`_hg`,e._.a8&&`_hh`])),Gw=T(2,0,e=>{u(e.a,`aria-expanded`,e._.a6?`false`:`true`),Hw(e,+!e._.a6),Uw(e),Ww(e)}),Kw=D(`u9`,e=>A(e.a,`click`,function(){e._.a9()})),qw=e=>{Gw._(e),Jw._(e),Yw._(e),Xw._(e),c(e.a,`_gW`),c(e.c,sx),Kw(e)},Jw=T(2,0,e=>{u(e.a,`aria-busy`,e._.a8?`true`:`false`),Ww(e)}),Yw=T(2,0,e=>k(e.d,e._.b6)),Xw=T(2,0,Uw),Zw=(e,t)=>{eT(e,t?.pr),lT(e,t?.base),uT(e,t?.branch),fT(e,t?.head),pT(e,t?.baseSha),mT(e,t?.worktree),hT(e,t?.id),gT(e,t?.full_name),vT(e,t?.githubDrift),xT(e,t?.contained),ST(e,t?.localHead)},Qw=g(3,`<a target=_blank rel=noopener>#<!></a><span> </span>`,` Db%l D `,$S,`<span> </span>`,` D `,ZS),$w=b(83,e=>u(e.a,`hidden`,!e.bj&&!e.ax&&e.a4!==e.b8),3),eT=w(59,e=>{rT(e,e.ax?.baseRefName),iT(e,e.ax?.headRefName),aT(e,e.ax?.title),oT(e,e.ax?.number),sT(e,e.ax?.url),cT(e,e.ax?.headRefOid),Qw(e,+!e.ax),$w(e),KS(e)}),tT=(e,t)=>{KT(e,t?.title),qT(e,t?.base),JT(e,t?.head),XT(e,t?.topic)},nT=b(64,e=>tT(e,ax(e.ay||e.az,e.b0||e.b1,e.a1,e.a2)),5),rT=w(60,nT),iT=w(62,e=>{nT(e),zw(e),jw(e)}),aT=w(65,QS),oT=w(69,eC),sT=w(71,tC),cT=w(74,Vw),lT=w(61,e=>{nT(e),JS(e)}),uT=w(63,e=>{nT(e),Mw(e),YS(e)}),dT=b(93,e=>u(e.e,`title`,`${e.bu} · ${e.b4.slice(0,7)}…${e.b5.slice(0,7)}`),2),fT=w(66,e=>{dT(e),Bw(e),Nw(e)}),pT=w(67,dT),mT=w(68,e=>{Yw(e),rC(e)}),hT=w(70,$w),gT=w(72,XS),_T=g(11,`<button type=button>behind GitHub <!> → <!></button>`,` Db%c%`,Lw),vT=(e,t)=>_T(e,+!t),yT=g(12,`<span>already in <!></span>`,` Db%`,qS),bT=b(76,e=>yT(e,e.bd&&e.a0?0:1)),xT=w(75,bT),ST=w(77,Pw),CT=w(97,nC),wT=e=>{CT(e,e.ax?`${e.ax.title}: ${e.ax.headRefName} ${e.b4} vs ${e.az} ${e.b5}`:``)},TT=e=>{u(e.a,`data-pr`,e.ax?`${e.b6}/${e.ax.number}`:void 0)},ET=w(22,e=>{Zw(e,e.w),wT(e),TT(e)}),DT=E(78,f(xC,VS));function OT(e){c(e.a,`_gT`),c(e.e,`_g4`),c(e.f,[`_I`,`_g5`]),c(e.h,[`_K`,`_g7`]),c(e.i,[`_I`,`_g6`]),c(e.o,`_gY`),DT(e,new Set)}var kT=(e,t)=>{WT(e,t?.additions),GT(e,t?.deletions)},AT=(e,t)=>{NT(e,t?.length),kT(e,(()=>{let e=0,n=0;for(let r of t)e+=r.additions||0,n+=r.deletions||0;return{additions:e,deletions:n}})())},jT=w(84,e=>{k(e.p,e.bm),k(e.q,e.bm===1?``:`s`),Xw(e)}),MT=b(82,e=>jT(e,e.bj||e.a0)),NT=w(81,e=>{MT(e),$w(e)}),PT=b(25,e=>AT(e,e.x.filter(t=>e.y.has(t.key)))),FT=g(18,`<button type=button><!> new</button>`,` D%`,ww),IT=b(90,e=>FT(e,e.br||e.ad?0:1)),LT=w(89,e=>{IT(e),Tw(e)}),RT=w(23,e=>{VT(e,e.x?.length),LT(e,e.x.filter(e=>e.changedSince).length),PT(e),_w(e)}),zT=f(IC),BT=w(24,e=>{PT(e),zT(e)}),VT=w(26,e=>{MT(e),bT(e)}),HT=g(17,`<span>+<!></span><span>−<!></span>`,` Db%l Db%`,LS),UT=b(88,e=>HT(e,e.bo||e.bp?0:1)),WT=w(86,e=>{UT(e),IS(e)}),GT=w(87,e=>{UT(e),RS(e)}),KT=w(92,dT),qT=(e,t)=>k(e.g,t),JT=(e,t)=>k(e.j,t),YT=g(10,`<span> </span>`,` D `,FS),XT=w(96,e=>{YT(e,+!e.by),PS(e)}),ZT=w(27,e=>{nT(e),Dw(e)}),QT=w(28,e=>{nT(e),kw(e)}),$T=w(30,$w),eE=b(33,e=>c(e.b,[`_gU`,{_gV:e.a5&&e.a6}])),tE=g(2,`<button type=button><span aria-hidden=true></span><span> </span></button>`,` D b D `,qw,`<span> </span>`,` D `,iC),nE=g(19,`<div></div>`,` `,vw),rE=b(42,e=>nE(e,!e.a5||!e.a6||e.af?0:1),2),iE=w(31,e=>{tE(e,+!e.a5),eE(e),rE(e),bw(e)}),aE=w(32,e=>{eE(e),rE(e),Gw(e),xw(e)}),oE=g(13,`<span>local <!> <!></span>`,` Db%c%`,Ow),sE=(e,t)=>oE(e,+!t),cE=w(39,e=>{IT(e),Sw(e)}),lE=w(41,rE),uE=f(EC),dE=w(21,e=>{ET(e,e.v.repo),RT(e,e.v.files),BT(e,e.v.shownKeys),ZT(e,e.v.workspaceBranch),QT(e,e.v.workspaceName),$T(e,e.v.findHit?.repo),fE(e,e.v.findHit?.key),pE(e,e.v.findHit?.line),iE(e,e.v.collapsible),aE(e,e.v.collapsed),mE(e,e.v.expanding),hE(e,e.v.onToggle),gE(e,e.v.loading),_E(e,e.v.onReload),sE(e,e.v.localDiffers),cE(e,e.v.onlyNew),vE(e,e.v.onToggleNew),lE(e,e.v.opened),yE(e,e.v.commentsByFile),bE(e,e.v.collapsedFiles),xE(e,e.v.onFileToggle),SE(e,e.v.draft),CE(e,e.v.sessions),wE(e,e.v.onSelect),TE(e,e.v.onSaveComment),EE(e,e.v.onSendDraft),DE(e,e.v.onCancelDraft),OE(e,e.v.onDeleteComment),kE(e,e.v.onEditComment),AE(e,e.v.onSendComment),jE(e,e.v.onError),uE(e)}),fE=w(45,f(QC,jC)),pE=w(47,f(ew)),mE=w(34,Jw),hE=w(35),gE=w(36,Fw),_E=w(37),vE=w(40),yE=w(43,f(HC)),bE=w(44,f(YC)),xE=w(46,f($C)),SE=w(48,f(oC)),CE=w(49,f(cC)),wE=w(50,f(uC)),TE=w(51,f(fC)),EE=w(52,f(mC)),DE=w(53,f(hC)),OE=w(54,f(gC)),kE=w(55,f(_C)),AE=w(56,f(vC)),jE=w(57,f(yC)),ME=e=>function(t){e._._._._.ao(e._._.l,t)},NE=e=>function(t){e._._._._.ap(e._._.l,t)},PE=e=>function(t,n){e._._._._.aq(e._._.l,t,n)},FE=e=>function(){e._._._._.ar()},IE=e=>function(t){e._._._._.as(t)},LE=e=>function(t,n){e._._._._.at(t,n)},RE=e=>function(t,n){e._._._._.au(t,n)},zE=e=>function(t){e._._._._.av(t)},BE=e=>function(t){e._._.ak(e.m,t)};O(`u1`,ME),O(`u2`,NE),O(`u3`,PE),O(`u4`,FE),O(`u5`,IE),O(`u6`,LE),O(`u7`,RE),O(`u8`,zE),O(`u0`,BE);var VE=`_ho _l`,HE=`<div><input type=search placeholder="Filter files…" aria-label="Filter files"></div>`,UE=` D l`,WE=b(18,e=>n(e,`b`,e.l,oD(e))),GE=w(11,WE),KE=b(10,e=>GE(e,(e.j??e.h)||``)),qE=w(17,WE),JE=b(16,e=>qE(e,sD(e))),YE=w(15,JE),XE=b(14,e=>YE(e,cD(e)),2),ZE=m(7,e=>{KE(e),XE(e)}),QE=b(6,e=>ZE(e,e.e,e.f)),$E=w(4,QE),eD=w(5,QE),tD=E(9,e=>{KE(e),XE(e)}),nD=(e,t)=>aD(e,t.timer),rD=D(`n3`,e=>{He(e,`b`),A(e.b,`keydown`,function(t){t.key===`Enter`&&e.p(),t.key===`Escape`&&e.l&&(t.preventDefault(),e.r(``))})});function iD(e){c(e.a,`_hn`),c(e.b,VE),tD(e,null),nD(e,{timer:0}),rD(e)}var aD=w(13,e=>{XE(e),JE(e)}),oD=e=>function(t){e.r(t)},sD=e=>t=>{if(e.n&&clearTimeout(e.n),!t){e.n=0,tD(e,null),ZE(e,``);return}tD(e,t),e.n=setTimeout(e.p,150)},cD=e=>()=>{e.n&&=(clearTimeout(e.n),0);let t=e.j===null?e.h||``:e.j;tD(e,null),ZE(e,t)};O(`n0`,oD),O(`n2`,sD),O(`n1`,cD);var lD=`<!><!><!><!>`,uD=`b%b%c`,dD=e=>{c(e.a,`_f2`),xx(e.b),Sx(e.b,12),Cx(e.b)},fD=e=>c(e.a,[`_z`,`_f1`]),pD=e=>{gx(e.a),_x(e.a,12),vx(e.a)},mD=e=>{dx(e.a),fx(e.a,12),px(e.a)},hD=b(11,e=>u(e.a,`href`,e._.d.hrefFor(e.k))),gD=i(1,hD),_D=e=>{gD._(e),bD._(e),CD._(e),ED._(e),DD._(e),c(e.b,`_f4`),c(e.d,`_f0`)},vD=b(12,e=>c(e.a,[`_fZ`,{_fY:e._.j?.has(e.k)}])),yD=b(16,e=>u(e.a,`title`,e._.j?.has(e.k)?`${e.p} (folded — click to open)`:e.p),2),bD=i(1,e=>{vD(e),yD(e)}),xD=g(6,(e=>`<span>${e}</span>`)(yx),(e=>` D/${e}&l`)(bx),dD),SD=b(13,e=>xD(e,+!e._.k.has(e.k))),CD=i(1,SD),wD=g(5,`<span title="Changed since your last visit"></span>`,` `,fD),TD=b(14,e=>wD(e,+!e._.l.has(e.k))),ED=i(1,TD),DD=i(1,e=>se(e.a,`--depth:${e._.p+1}`)),OD=w(10,e=>{hD(e),vD(e),yD(e),TD(e),SD(e)}),kD=w(15,yD),AD=(e,t)=>{u(e.b,`data-status`,t),k(e.c,t)},jD=(e,t)=>k(e.e,t),MD=(e,t)=>{OD(e,(t?.[0]).file?.key),kD(e,(t?.[0]).file?.path),AD(e,(t?.[0]).file?.status),jD(e,(t?.[0]).name)},ND=b(1,e=>cO(e.a,{dir:e._.h,collapsed:e._._.f,collapsedKey:e._._.h,onToggleDir:e._._.g,hrefFor:e._._.i,collapsedFiles:e._._.j,commentKeys:e._._.k,newKeys:e._._.l}),7),PD=v(17,ND,e=>e._._),FD=e=>{PD(e),ID(e),LD(e),RD(e),zD(e),BD(e),VD(e),HD._(e)},ID=v(18,ND,e=>e._._),LD=v(19,ND,e=>e._._),RD=v(20,ND,e=>e._._),zD=v(21,ND,e=>e._._),BD=v(22,ND,e=>e._._),VD=v(23,ND,e=>e._._),HD=T(5,0,ND),UD=g(2,lx,(e=>`/${e}&`)(ux),mD,mx,(e=>`/${e}&`)(hx),pD),WD=g(5,(e=>`<!>${e}<!>`)(lD),(e=>`b/${e}&b`)(uD),FD),GD=(e,t)=>{c(e.b,[`_fW`,{_fN:t}]),UD(e,+!t),WD(e,+!!t)},KD=b(9,e=>GD(e,e._.d.collapsed.has(e._.d.collapsedKey(e.i)))),qD=i(0,KD),JD=D(`k0`,e=>A(e.b,`click`,function(){e._.g(e.h)})),YD=e=>{qD._(e),c(e.a,`_fV`),c(e.c,`_f3`),c(e.d,`_fX`),JD(e)},XD=w(8,e=>{u(e.b,`title`,e.i),KD(e)}),ZD=(e,t)=>se(e.b,`--depth:${t}`),QD=(e,t)=>k(e.e,t),$D=(e,t)=>eO(e,t[0]),eO=w(7,e=>{XD(e,e.h?.path),ZD(e,e.h?.depth),QD(e,e.h?.label),HD(e)}),tO=(e,t)=>{rO(e,t?.dirs),aO(e,t?.files),oO(e,t?.depth)},nO=_e(0,`<div><button type=button><span></span><span><!>/</span></button><!></div>`,` D D b D%m%`,YD,$D),rO=(e,t)=>nO(e,[t,`path`]),iO=_e(1,`<a><span> </span><span> </span><!><!></a>`,` D D l D l%b%`,_D,MD),aO=(e,t)=>iO(e,[t,e=>e.file.key]),oO=w(15,DD),sO=tO,cO=w(3,e=>{sO(e,e.d.dir),lO(e,e.d.collapsed),uO(e,e.d.onToggleDir),dO(e,e.d.collapsedKey),fO(e,e.d.hrefFor),mO(e,e.d.collapsedFiles),gO(e,e.d.commentKeys),vO(e,e.d.newKeys),qD(e),gD(e)}),lO=w(5,f(PD)),uO=w(6,f(ID)),dO=w(7,f(LD)),fO=w(8,f(RD)),pO=f(zD),mO=w(9,e=>{pO(e),bD(e)}),hO=f(BD),gO=w(10,e=>{hO(e),CD(e)}),_O=f(VD),vO=w(11,e=>{_O(e),ED(e)}),yO=(e=>`<aside><div>${e}</div><div><!><!></div></aside>`)(HE),bO=(e=>` D D/${e}&l D%b%m`)(UE),xO=e=>{gx(e.a),_x(e.a,12),vx(e.a)},SO=e=>{dx(e.a),fx(e.a,12),px(e.a)},CO=e=>c(e.a,`_fR`),wO=b(4,e=>cO(e.b,{dir:e.d,collapsed:e._._.a8,collapsedKey:Dk(e),onToggleDir:Ek(e),hrefFor:e._._.ab,collapsedFiles:e._._.a0,commentKeys:e._._.a9,newKeys:e._._.aa}),8),TO=v(38,wO,e=>e._._),EO=e=>{TO(e),DO(e),kO(e),AO(e),jO(e),MO(e),NO(e),PO._(e),IO._(e),c(e.a,`_fU`)},DO=v(39,wO,e=>e._._),OO=b(2,e=>u(e.a,`hidden`,e._._.a1.has(e._.i))),kO=v(40,OO,e=>e._._),AO=v(42,wO,e=>e._._),jO=v(43,wO,e=>e._._),MO=v(44,wO,e=>e._._),NO=v(45,wO,e=>e._._),PO=T(5,0,e=>{OO(e),wO(e)}),FO=w(3,wO),IO=T(5,0,e=>{FO(e,dn(e._.m)),wO(e)}),LO=g(2,lx,(e=>`/${e}&`)(ux),SO,mx,(e=>`/${e}&`)(hx),xO),RO=b(9,e=>{c(e.b,[`_fT`,{_fN:e._.a1.has(e.i)}]),LO(e,+!e._.a1.has(e.i))}),zO=g(5,(e=>`<div>${e}</div>`)(lD),(e=>` D/${e}&l`)(uD),EO),BO=b(10,e=>zO(e,!e._.a1.has(e.i)||e._.a3.has(e.i)?0:1),2),VO=i(5,e=>{RO(e),BO(e)}),HO=D(`l4`,e=>A(e.b,`click`,function(){let t=e.i,n=new Set(e._.a1);n.delete(t)||(ek(e._,new Set([...e._.a3,t])),n.add(t)),XO(e._,n)})),UO=e=>{VO._(e),WO._(e),c(e.a,`_fS`),c(e.c,`_f3`),c(e.d,`_fX`),HO(e)},WO=i(5,BO),GO=w(8,e=>{RO(e),BO(e),PO(e)}),KO=(e,t)=>k(e.e,t),qO=(e,t)=>{GO(e,t[0]?.id),KO(e,t[0]?.label),JO(e,t[0]?.files)},JO=w(12,IO),YO=f(kO),XO=m(27,e=>{VO(e),YO(e)}),ZO=b(10,e=>XO(e,e.i,e.j)),QO=w(8,ZO),$O=w(9,ZO),ek=m(29,WO),tk=b(13,e=>ek(e,e.l,e.m)),nk=w(11,tk),rk=w(12,tk),ik=g(4,`<p>No files match.</p>`,` `,CO),ak=b(33,e=>ik(e,!e.y&&e.a5?0:1)),ok=m(31,e=>{$E(e.c,e.a5),ak(e)}),sk=b(16,e=>ok(e,e.o,e.p)),ck=w(14,sk),lk=w(15,sk),uk=E(34,f(AO));function dk(e){c(e.b,`_fP`),iD(e.c),eD(e.c,Ok(e)),c(e.d,`_fQ`),uk(e,new Set)}var fk=w(35,f(jO)),pk=(e,t)=>fk(e,t||new Set),mk=w(36,f(MO)),hk=(e,t)=>mk(e,t||new Set),gk=w(37,f(NO)),_k=b(21,e=>gk(e,kk(e))),vk=w(19,_k),yk=w(20,_k),bk=(e,t)=>c(e.a,[`_fO`,{_fN:t===!1}]),xk=w(24,ak),Sk=_e(5,`<div><button type=button><span></span><span> </span></button><!></div>`,` D D b D m%`,UO,qO),Ck=(e,t)=>{xk(e,t?.length),Sk(e,[t,`id`])},wk=w(25,f(TO)),Tk=w(26,f(DO)),Ek=e=>function(t){let n=`${e._.i}/${t.path}`,r=new Set(e._._.a8),i=!r.delete(n);i&&r.add(n),uk(e._._,r),e._._.z?.(e._.m.filter(e=>e.path.startsWith(`${t.path}/`)).map(e=>e.key),i)},Dk=e=>t=>`${e._.i}/${t}`,Ok=e=>t=>{ok(e,t)},kk=e=>t=>Pe({workspaceId:e.t,view:`diff`,scope:e.u??null,file:t});O(`l3`,Ek),O(`l2`,Dk),O(`l1`,Ok),O(`l0`,kk);var Ak=`<!><!><!>`,jk=e=>c(e.a,`_gk`),Mk=e=>{xx(e.a),Sx(e.a,12),Cx(e.a,`_gm`)},Nk=e=>c(e.a,[`_z`,`_gl`]),Pk=T(1,0,e=>{u(e.a,`title`,e._.f),k(e.b,e._.f)}),Fk=e=>{Pk._(e),c(e.a,`_gh`)},Ik=g(6,yx,(e=>`/${e}&`)(bx),Mk),Lk=b(11,e=>Ik(e,+!e._._._._.w.has(e.k))),Rk=v(29,Lk,e=>e._._._._),zk=D(`g2`,e=>A(e.a,`click`,function(){_A(e._._._._,!1)})),Bk=e=>{Rk(e),Uk(e),Gk(e),c(e.a,[`_gg`,`_x`]),c(e.b,`_gn`),c(e.d,`_gi`),zk(e)},Vk=g(5,`<span title="Changed since your last visit"></span>`,` `,Nk),Hk=b(12,e=>Vk(e,+!e._._._._.x.has(e.k))),Uk=v(30,Hk,e=>e._._._._),Wk=b(13,e=>u(e.a,`href`,e._._._._.z(e.k))),Gk=v(32,Wk,e=>e._._._._),Kk=w(10,e=>{Wk(e),Hk(e),Lk(e)}),qk=(e,t)=>{u(e.b,`data-status`,t),k(e.c,t)},Jk=(e,t)=>k(e.e,t),Yk=(e,t)=>{Kk(e,(t?.[0]).file?.key),qk(e,(t?.[0]).file?.status),Jk(e,(t?.[0]).name)},Xk=e=>c(e.a,`_gf`),Zk=g(1,`<div><bdi><!>/</bdi></div>`,` E%`,Fk),Qk=w(5,e=>{Zk(e,+!e.f),Pk(e)}),$k=_e(2,`<a><span> </span><span><bdi> </bdi></span><!><!></a>`,` D D l E m%b%`,Bk,Yk),eA=(e,t)=>$k(e,[t,e=>e.file.key]),tA=(e,t)=>{Qk(e,(t?.[0]).dir),eA(e,(t?.[0]).files)},nA=e=>{c(e.a,`_gd`),c(e.b,`_ge`)},rA=(e,t)=>k(e.c,t),iA=_e(3,`<div><!><!></div>`,` D%b%`,Xk,tA),aA=(e,t)=>iA(e,[t,`dir`]),oA=(e,t)=>{rA(e,t[0]?.repo),aA(e,t[0]?.dirs)},sA=g(13,`<p>No files match.</p>`,` `,jk),cA=b(14,e=>k(e.g,e._.n===e._.y?``:` / ${e._.y}`)),lA=T(0,0,e=>{k(e.f,e._.n),sA(e,+!!e._.n),cA(e)}),uA=D(`g3`,e=>{A(e.a,`click`,function(){_A(e._,!1)}),A(e.h,`click`,function(){_A(e._,!1)})}),dA=e=>{lA._(e),fA._(e),pA._(e),hA._(e),c(e.a,`_f9`),c(e.b,`_f_`),c(e.c,`_ga`),c(e.d,`_f8`),c(e.e,`_gb`),c(e.h,[Qe,`_f7`]),ye(e.i),be(e.i,16),y(e.i),c(e.j,`_gj`),iD(e.k),eD(e.k,zA(e)),c(e.l,`_gc`),uA(e)},fA=T(0,0,e=>$E(e.k,e._.u)),pA=T(0,0,cA),mA=_e(12,`<div><div> </div><!></div>`,` D D l%`,nA,oA),hA=T(0,0,e=>mA(e,[e._.a0,`repo`])),gA=g(0,((e,t)=>`<div></div><div role=dialog aria-label="Jump to file"><div><strong>Files</strong><span><!><!></span><button type=button title=Close aria-label=Close>${e}</button></div><div>${t}</div><div><!><!></div></div>`)(xe,HE),((e,t)=>` b D D b D%b%l D/${e}&m D/${t}&l D%b%m`)(ce,UE),dA),_A=m(18,e=>gA(e,+!e.s)),vA=b(5,e=>_A(e,e.d,e.e)),yA=w(3,vA),bA=w(4,vA),xA=m(20,fA),SA=b(8,e=>xA(e,e.g,e.h)),CA=w(6,SA),wA=w(7,SA),TA=w(22,f(Rk)),EA=(e,t)=>TA(e,t||new Set),DA=w(23,f(Uk)),OA=(e,t)=>DA(e,t||new Set),kA=w(24,pA),AA=b(14,e=>kA(e,e.l??e.n)),jA=w(11,AA),MA=w(13,e=>{AA(e),lA(e)}),NA=w(25,f(Gk)),PA=b(17,e=>NA(e,BA(e))),FA=w(15,PA),IA=w(16,PA),LA=w(26,hA),RA=(e,t)=>{MA(e,t?.length),LA(e,(()=>{let e=[],n=new Map;for(let r of t){let t=r.key.indexOf(`/`),i=r.key.slice(0,t),a=r.key.slice(t+1),o=a.lastIndexOf(`/`),s=o<0?``:a.slice(0,o),c=o<0?a:a.slice(o+1),l=n.get(i);l||(n.set(i,l=new Map),e.push({repo:i,dirs:[]}));let u=l.get(s);u||(l.set(s,u={dir:s,files:[]}),e[e.length-1].dirs.push(u)),u.files.push({file:r,name:c})}return e})())},zA=e=>t=>{xA(e._,t)},BA=e=>t=>Pe({workspaceId:e.p,view:`diff`,scope:e.q??null,file:t});O(`g1`,zA),O(`g0`,BA);var VA=((e,t,n,r)=>`<div><div><div><div><!><h1>Review</h1><!><!></div><div><!><button title="Refresh diff">${e}</button><!><div role=group aria-label="Review scope"><button type=button title="Committed changes only (base…tip, no working-tree edits)">Committed</button><button type=button title="Committed changes plus uncommitted and untracked files">Working tree</button><button type=button title="Only uncommitted and untracked files, against HEAD">Uncommitted</button></div><span><select aria-label="Review scope"><option value=committed>Committed</option><option value=working>Working tree</option><option value=dirty>Uncommitted</option></select></span><div>${t}</div><!></div></div><div data-diff-main><!><!><!><!><!></div></div>${n}${r}</div>`)(d,nb,yO,Ak),HA=((e,t,n,r)=>` D D D D%b b%b%l D%b D/${e}&l%b D b b l D l D/${t}&l%m D%b%b%b%b%m/${n}&/${r}&l`)(_,rb,bO,`b%c`),UA=e=>{c(e.a,`_fh`),c(e.b,[`_fi`,`_fj`]),c(e.c,[`_fi`,`_fk`]),c(e.d,[`_fi`,`_fl`]),c(e.e,[`_fi`,`_fk`]),c(e.f,[`_fi`,`_fl`])},WA=T(21,0,e=>u(e.a,`hidden`,e._.b5)),GA=D(`m56`,e=>A(e.a,`click`,function(){e._.e0()})),KA=e=>{WA._(e),c(e.a,[at,`_e6`,`_eX`]),ht(e.b),lt(e.b,14),Se(e.b),GA(e)},qA=T(12,0,e=>k(e.b,e._.d5)),JA=D(`m55`,e=>A(e.a,`click`,function(){MN(e._,!0)})),YA=e=>{qA._(e),c(e.a,[`_o`,`_fm`]),JA(e)},XA=T(9,0,e=>{c(e.a,[fn,`_eX`,{_eW:e._.b3}]),u(e.a,`title`,e._.b3?`Hide file tree`:`Show file tree`)}),ZA=D(`m54`,e=>A(e.a,`click`,function(){jN(e._,!e._.b3),De(e._.b3)})),QA=e=>{XA._(e),$e(e.b),Ne(e.b,14),Ae(e.b),ZA(e)},$A=b(2,e=>k(e.b,e._.cw.some(e=>e.unborn)?`No commits yet.`:e._.b2===`dirty`?`Nothing uncommitted.`:e._.cw.some(e=>e.pr)?`No file changes on these PRs.`:`No changes vs base.`)),ej=T(26,0,$A),tj=e=>{ej._(e),nj._(e),c(e.a,`_bG`)},nj=T(26,0,$A),rj=v(184,e=>k(e.b,e._._.b2===`committed`?``:`, showing uncommitted changes only`),e=>e._._),ij=e=>{rj(e),aj(e)},aj=v(5,e=>k(e.a,e._.e)),oj=ue(`m58`,`<!><!>.`,`%b%`,ij),sj=e=>{ve(e.a),le(e.a,oj(e)),ge(e.a,`warn`),h(e.a,`inline`),C(e.a),r(e.a),he(e.a),_t(e.a,{})},cj=(e,t)=>x(e.a,`${t}: base not found`),lj=(e,t)=>{cj(e,t[0]?.worktree),uj(e,t[0]?.base)},uj=w(4,f(aj)),dj=b(2,e=>k(e.b,e._.bc.trim()?`No matches in review.`:e._.b1&&!e._.ay?`Nothing changed since your last visit.`:`No files match "${e._.ay}".`),2),fj=T(26,1,dj),pj=e=>{fj._(e),mj._(e),hj._(e),c(e.a,`_bG`)},mj=T(26,1,dj),hj=T(26,1,dj),gj=v(180,e=>k(e.a,e._._.av),e=>e._._),_j=ue(`m57`,` `,` `,gj),vj=e=>{ve(e.a),le(e.a,_j(e)),he(e.a,wF(e)),C(e.a),r(e.a),ge(e.a),h(e.a),x(e.a),_t(e.a,{})},yj=T(6,0,e=>{k(e.b,e._.at),k(e.c,e._.at===1?``:`s`)}),bj=e=>{yj._(e),c(e.a,`_e4`)},Q=b(1,e=>dE(e.a,{repo:e._.c,files:e._.g,shownKeys:e._._.d7,collapsible:e._._.cx>1,collapsed:e._._.bg.has(e._.c?.id),expanding:e._._.bk.has(e._.c?.id),opened:e._._.bj.has(e._.c?.id),onToggle:FF(e),workspaceBranch:e._._.an||``,workspaceName:e._._.ao||``,localDiffers:e._._.di.has(e._.c?.id),onlyNew:e._._.b1,onToggleNew:PF(e),onReload:e._._.cr,loading:e._._.aw,findHit:e._._.be,commentsByFile:e._._.df,draft:e._._.au,sessions:e._._.am||[],observeNear:e._._.br,collapsedFiles:e._._.bh,onFileToggle:NF(e),onSelect:MF(e),onSaveComment:jF(e),onSendDraft:AF(e),onCancelDraft:kF(e),onDeleteComment:OF(e),onEditComment:DF(e),onSendComment:EF(e),onError:TF(e)}),25),xj=v(175,Q,e=>e._._),Sj=e=>{xj(e),Cj(e),wj(e),Tj(e),Ej(e),Dj(e),Oj(e),kj(e),Aj(e),jj(e),Mj(e),Nj(e),Pj(e),Fj(e),Ij(e),Lj(e),Rj(e),zj(e),Bj(e),Vj(e),Hj(e),Uj(e),Wj(e),Gj(e),Kj._(e),qj._(e),OT(e.a)},Cj=v(176,Q,e=>e._._),wj=v(177,Q,e=>e._._),Tj=v(179,Q,e=>e._._),Ej=v(181,Q,e=>e._._),Dj=v(183,Q,e=>e._._),Oj=v(188,Q,e=>e._._),kj=v(189,Q,e=>e._._),Aj=v(190,Q,e=>e._._),jj=v(191,Q,e=>e._._),Mj=v(192,Q,e=>e._._),Nj=v(193,Q,e=>e._._),Pj=v(194,Q,e=>e._._),Fj=v(195,Q,e=>e._._),Ij=v(197,Q,e=>e._._),Lj=v(199,Q,e=>e._._),Rj=v(201,Q,e=>e._._),zj=v(202,Q,e=>e._._),Bj=v(204,Q,e=>e._._),Vj=v(205,Q,e=>e._._),Hj=v(206,Q,e=>e._._),Uj=v(209,Q,e=>e._._),Wj=v(210,Q,e=>e._._),Gj=v(211,Q,e=>e._._),Kj=T(0,0,Q),qj=T(0,0,Q),Jj=w(6,e=>{tM(e,e.g.length),qj(e)}),Yj=b(4,e=>Jj(e,e._.dc.get(e.d)||[])),Xj=i(27,Yj),Zj=e=>{Xj._(e),eM._(e)},Qj=g(0,SS,(e=>`/${e}&`)(CS),Sj),$j=b(8,e=>Qj(e,e.h||e.f&&e._.dj?0:1),2),eM=i(27,$j),tM=w(7,$j),nM=w(3,Yj),rM=w(5,$j),iM=(e,t)=>aM(e,t[0]),aM=w(2,e=>{nM(e,e.c?.id),rM(e,e.c?.pr),Kj(e)}),oM=T(7,0,e=>Wn(e.b,e._.am)),sM=e=>{oM._(e),cM._(e),lM._(e),c(e.a,`_e3`),Rn(e.b)},cM=T(7,0,e=>Gn(e.b,e._.dw)),lM=T(7,0,e=>Kn(e.b,e._.dx)),uM=T(4,0,e=>u(e.a,`href`,`/w/${e._.a6}`)),dM=e=>{uM._(e),c(e.a,[at,`_e2`]),Ue(e.b),ie(e.b,14),s(e.b)},fM=(e,t)=>{hk(e.a2,t),OA(e.a3,t)},pM=w(141,f(Lj)),mM=(e,t)=>Ck(e.a2,t),hM=b(148,e=>mM(e,e.cw.filter(t=>(e.dd.get(t.id)||[]).length).map(t=>({id:t.id,label:t.pr?`${t.worktree} #${t.pr.number}`:t.worktree,files:e.dd.get(t.id)||[]})))),gM=w(147,hM),_M=b(145,e=>gM(e,e.d9(e.d4))),vM=w(138,e=>{RA(e.a3,e.d4),hF(e,e.d4?.length),pM(e,new Set(e.d4.map(e=>e.key))),_M(e)}),yM=b(137,e=>vM(e,e.d2?e.d1.filter(t=>e.d2.has(t.key)||t.key===e.bf):e.d1),2),bM=w(135,e=>{Bb(e.u,e.d1),yM(e)}),xM=b(133,e=>bM(e,(()=>{let t=jt(e.ay);return e.cy.filter(n=>t(n.key)&&(!e.b1||n.changedSince))})()),2),SM=w(146,Xj),CM=b(144,e=>SM(e,e.d9(e.cy))),wM=w(132,e=>{mF(e,e.cy?.length),fM(e,new Set(e.cy.filter(e=>e.changedSince).map(e=>e.key))),xM(e),CM(e)}),TM=w(152,f(zj)),EM=w(157,f(Bj)),DM=b(156,e=>EM(e,IF(e)),4),OM=w(169,f(Wj)),kM=b(165,e=>OM(e,LF(e)),4),AM=w(155,e=>{DM(e),kM(e)}),jM=_e(25,p,(e=>`/${e}&`)(tt),sj,lj),MM=_e(27,`<!><!><!>`,`b%`,Zj,iM),NM=w(130,e=>{pF(e,e.cw.length),wM(e,e.cw.flatMap(e=>e.files.map(t=>({...t,repo:e.id,key:`${e.worktree}/${t.path}`})))),TM(e,new Set(e.cw.filter(e=>!!e.pr&&!!e.localHead&&(e.localHead!==e.head||e.branch!==e.pr.headRefName)).map(e=>e.id))),AM(e,RF(e)),jM(e,[e.cw.filter(e=>e.baseMissing),`id`]),MM(e,[e.cw,`id`]),hM(e),nj(e)}),PM=D(`m61`,e=>S(e,{active:e.ah,load:e.ci,onMount:function(){let t=new AbortController,n={abort:t,loaded:!1,wasActive:!1,lastPr:e.ae||``,lastNonce:e.ai||0,lastFileNonce:e.aj||0,start:()=>{this.active&&!n.loaded&&(n.loaded=!0,this.load())}};return n.wasActive=!!this.active,mt().addEventListener(`review.changed`,t=>{n.loaded&&t.data?.workspaceId===e.a6&&e.cq()},{signal:t.signal}),mt().addEventListener(`status.changed`,t=>{if(!this.active||!n.loaded||e.aw)return;let r=t.data,i=r&&r[e.a6];if(!i)return;let a=At(i);!a||!e.cd||a===e.cd||e.ct()},{signal:t.signal}),window.addEventListener(`pagehide`,()=>{this.active&&n.loaded&&(e.cu(),e.ca())},{signal:t.signal}),document.addEventListener(`visibilitychange`,()=>{document.visibilityState===`hidden`&&this.active&&n.loaded&&e.ca()},{signal:t.signal}),n.start(),n},onUpdate:function(){this.start(),this.active&&this.loaded&&!this.wasActive&&(e.cr(),e.c3&&e.cb(e.c3)),!this.active&&this.loaded&&this.wasActive&&(e.cu(),e.ca()),this.wasActive=!!this.active;let t=e.ae||``,n=e.ai||0;this.loaded&&t&&n!==this.lastNonce?(this.lastNonce=n,this.lastPr=t,e.bv(t)):(this.lastPr=t,this.lastNonce=n);let r=e.aj||0;this.loaded&&e.af&&r!==this.lastFileNonce&&e.c0(e.af),this.lastFileNonce=r,e.a7&&e.a7!==e.b2&&e.cl(e.a7,!1)},onDestroy:function(){e.ce&&clearTimeout(e.ce),this.loaded&&(e.cu(),e.ca()),this.abort.abort()}})),$=b(129,PM,21),FM=b(120,e=>te(e,`s`,e.b2,zF(e))),IM=w(119,e=>{$(e),FM(e)}),LM=b(118,e=>IM(e,BF(e)),2),RM=w(127,$),zM=b(126,e=>RM(e,VF(e))),BM=f(Fj),VM=w(125,e=>{zM(e),$(e),BM(e)}),HM=b(117,e=>VM(e,HF(e))),UM=w(116,e=>{LM(e),HM(e),$(e)}),WM=b(115,e=>UM(e,UF(e)),8),GM=w(93,e=>{WM(e),$(e)}),KM=b(92,e=>GM(e,WF(e)),4),qM=w(108,$),JM=b(102,e=>qM(e,GF(e)),2),YM=w(128,$),XM=b(52,e=>YM(e,KF(e))),ZM=g(9,(e=>`<button>${e}</button>`)(qe),(e=>` D/${e}&l`)(Le),QA),QM=g(12,`<button title="Jump to file">Files (<!>)</button>`,` Db%`,YA),$M=g(21,(e=>`<button title="Find in review (⌘/Ctrl+F)" aria-label="Find in review">${e}</button>`)(Ee),(e=>` D/${e}&l`)(pt),KA),eN=w(153,e=>{ZM(e,+!e.dj),QM(e,+!e.dj),$M(e,+!e.dj),eM(e)}),tN=e=>{eN(e,!e.ap||e.d0>0)},nN=w(166,cM),rN=w(167,lM),iN=w(168,f(Uj)),aN=b(164,e=>{nN(e,qF(e)),rN(e,JF(e)),iN(e,YF(e))}),oN=w(163,e=>{aN(e),kM(e)}),sN=b(160,e=>oN(e,XF(e)),4),cN=g(24,`<div aria-hidden=true><div></div><div></div><div></div><div></div><div></div></div>`,` D b b b b `,UA),lN=b(59,e=>cN(e,!e.ap&&e.aw?0:1)),uN=g(26,`<p> </p>`,` D `,tj,`<p> </p>`,` D `,pj),dN=b(140,e=>uN(e,e.ap&&!e.d0?0:e.ap&&!e.d5&&!e.be?1:2),3),fN=E(51,e=>{NM(e,e.ap||[]),KM(e),JM(e),XM(e),tN(e),sN(e),lN(e),dN(e)}),pN=(e,t)=>{pk(e.a2,t),EA(e.a3,t)},mN=f(Rj),hN=w(149,e=>{pN(e,new Set(e.df.keys())),mN(e)}),gN=w(161,f(Vj)),_N=b(159,e=>gN(e,ZF(e))),vN=w(162,f(Hj)),yN=b(54,e=>vN(e,QF(e))),bN=E(53,e=>{hP(e,e.ar?.length),hN(e,(()=>{let t=new Map;for(let n of e.ar){let e=`${n.worktree}/${n.path}`;t.set(e,[...t.get(e)||[],n])}return t})()),DM(e),_N(e),yN(e),sN(e),aN(e)}),xN=f(Tj),SN=E(56,e=>{DM(e),kM(e),xN(e)}),CN=g(23,p,(e=>`/${e}&`)(tt),vj),wN=f(gj),TN=E(57,e=>{CN(e,+!e.av),wN(e)}),EN=f(Ej),DN=E(58,e=>{u(e.k,`disabled`,e.aw),ee(e.l,e.aw&&`_E`),u(e.o,`disabled`,e.aw),u(e.p,`disabled`,e.aw),u(e.q,`disabled`,e.aw),u(e.s,`disabled`,e.aw),$(e),lN(e),EN(e)}),ON=(e,t)=>{lk(e.a2,t),wA(e.a3,t)},kN=f(Dj),AN=E(63,e=>{xM(e),kN(e),mj(e)}),jN=E(65,e=>{bk(e.a2,e.b3),XA(e)}),MN=E(66,e=>yA(e.a3,e.b4)),NN=w(136,yM),PN=e=>{NN(e,e.bc.trim()?new Set(e.bd):null)},FN=E(73,e=>{UP(e,e.bb?.query),WP(e,e.bb?.keys),KP(e,e.bb?.hit),PN(e)}),IN=w(173,f(Gj)),LN=b(83,e=>IN(e,eI(e)),2),RN=f(kj),zN=E(78,e=>{QO(e.a2,e.bg),KM(e),LN(e),RN(e)}),BN=f(jj),VN=w(80,e=>{wk(e.a2,tI(e)),BN(e)}),HN=f(Aj),UN=E(79,e=>{Tk(e.a2,e.bh),VN(e,nI(e)),HN(e)}),WN=f(Mj),GN=E(81,e=>{nk(e.a2,e.bj),KM(e),LN(e),WN(e)}),KN=f(Nj),qN=E(82,e=>{LN(e),KN(e)}),JN=(e,t)=>{XP(e,t.cbs),ZP(e,t.io),QP(e,t.root)},YN=w(98,e=>{WM(e),$(e)}),XN=b(97,e=>YN(e,rI(e)),3),ZN=w(172,e=>Eb(e.u,iI(e))),QN=b(96,e=>ZN(e,aI(e))),$N=w(90,e=>{KM(e),XN(e),QN(e)}),eP=w(91,e=>{KM(e),XN(e)}),tP=w(95,e=>{XN(e),QN(e)}),nP=w(109,e=>{WM(e),$(e)}),rP=b(104,e=>nP(e,lI(e))),iP=w(94,e=>{tP(e,cI(e)),rP(e)}),aP=(e,t)=>{eF(e,t.raf),tF(e,t.anchor),nF(e,t.run)},oP=(e,t)=>{rF(e,t.sig),iF(e,t.timer)},sP=(e,t)=>aF(e,t.seq),cP=(e,t)=>lF(e,t.busy),lP=w(143,e=>{CM(e),_M(e)}),uP=w(154,e=>{DM(e),kM(e)}),dP=D(`m59`,e=>{A(e.k,`click`,function(){e.cr()}),A(e.o,`click`,function(){e.cl(`committed`)}),A(e.p,`click`,function(){e.cl(`working`)}),A(e.q,`click`,function(){e.cl(`dirty`)}),re(e,`s`),A(e.w,`scroll`,function(){e.c9()})});function fP(e){c(e.a,`_eV`),c(e.b,`_e0`),c(e.c,`_e1`),c(e.f,`_e5`),c(e.i,`_eZ`),c(e.k,[at,`_eX`]),oe(e.l),ne(e.l,14),c(e.n,`_fb`),c(e.r,[`_m`,`_fe`]),c(e.s,[`_n`,`_ff`]),Rb(e.u),pb(e.u,gI(e)),xb(e.u),Sb(e.u),Tb(e.u),c(e.w,`_e9`),dk(e.a2),$O(e.a2,hI(e)),rk(e.a2,mI(e)),e.a3,bA(e.a3,pI(e)),fN(e,null),bN(e,[]),SN(e,null),TN(e,null),DN(e,!1),ON(e,$F(e)),AN(e,!1),jN(e,Ie()),MN(e,!1),FN(e,{query:``,hit:null,keys:[]}),zN(e,new Set),UN(e,new Set),GN(e,new Set),qN(e,new Set),JN(e,{io:null,root:null,cbs:null}),$N(e,oI(e)),eP(e,sI),iP(e,uI(e)),aP(e,{anchor:null,raf:0,run:0}),oP(e,{sig:``,timer:0}),sP(e,{seq:0}),cP(e,{busy:0}),lP(e,dI),uP(e,fI),dP(e)}var pP=g(6,`<span><!> comment<!></span>`,` D%c%`,bj),mP=g(7,(e=>`<span>${e}</span>`)(pn),(e=>` D/${e}&l`)(mn),sM),hP=w(55,e=>{c(e.d,[`_fa`,{_e_:!e.at}]),pP(e,+!e.at),mP(e,+!e.at),yj(e)}),gP=D(`m63`,e=>{e.ay!==et(e.a6)&&Ce(e.a6,e.ay)}),_P=b(61,gP),vP=E(60,e=>{ck(e.a2,e.ay),CA(e.a3,e.ay),_P(e),xM(e),fj(e)}),yP=w(158,e=>{_N(e),sN(e)}),bP=w(124,$),xP=b(123,e=>bP(e,vI(e))),SP=w(32,e=>{vk(e.a2,e.a6),FA(e.a3,e.a6),vP(e,et(e.a6)),yP(e,_I(e)),_P(e),JM(e),WM(e),xP(e),XM(e),$(e),DM(e),yN(e),kM(e),uM(e)}),CP=w(107),wP=b(106,e=>CP(e,yI(e)),2),TP=w(105,wP),EP=f(rj),DP=E(64,e=>{c(e.o,[`_fd`,{_fc:e.b2===`committed`}]),u(e.o,`aria-pressed`,e.b2===`committed`?`true`:`false`),c(e.p,[`_fd`,{_fc:e.b2===`working`}]),u(e.p,`aria-pressed`,e.b2===`working`?`true`:`false`),c(e.q,[`_fd`,{_fc:e.b2===`dirty`}]),u(e.q,`aria-pressed`,e.b2===`dirty`?`true`:`false`),yk(e.a2,e.b2),IA(e.a3,e.b2),TP(e,bI(e)),WM(e),LM(e),HM(e),$(e),FM(e),EP(e),ej(e)}),OP=w(33,e=>{DP(e,e.a7??Re()),$(e)}),kP=m(67,e=>{c(e.t,[`_e8`,{_e7:!e.b5}]),fb(e.u,e.b5),WA(e)}),AP=b(36,e=>kP(e,e.a8,e.a9)),jP=w(34,AP),MP=w(35,AP),NP=D(`m62`,e=>{e.ab!=null&&e.ab!==e.b7&&zP(e,e.ab)}),PP=b(70,NP),FP=D(`m60`,e=>{e.ah&&window.addEventListener(`keydown`,t=>{!(t.metaKey||t.ctrlKey)||t.altKey||t.shiftKey||t.key.toLowerCase()===`f`&&(t.target instanceof HTMLTextAreaElement||(t.preventDefault(),e.e0()))},{capture:!0,signal:ft(e,0)})}),IP=b(171,e=>{me(e,0),FP(e)}),LP=w(170,IP),RP=b(72,e=>LP(e,xI(e))),zP=E(69,e=>{Jb(e.u,e.b7),PP(e),RP(e)}),BP=w(37,e=>{zP(e,e.ab||0),PP(e)}),VP=w(71,e=>{qb(e.u,e.b9),RP(e)}),HP=(e,t)=>VP(e,t||{focus:SI}),UP=w(74,hj),WP=w(75),GP=f(Oj),KP=w(76,e=>{qP(e,e.be?.key),dN(e),GP(e)}),qP=w(77,yM),JP=w(89),YP=b(88,e=>JP(e,CI(e)),2),XP=w(85,YP),ZP=w(86,YP),QP=w(87,YP),$P=w(39,XN),eF=w(100,wP),tF=w(101,e=>{wP(e),JM(e),$(e)}),nF=w(103,rP),rF=w(111,e=>{WM(e),$(e)}),iF=w(112,e=>{zM(e),$(e)}),aF=w(114,WM),oF=w(40,e=>{WM(e),$(e)}),sF=w(41,e=>{WM(e),$(e)}),cF=w(42,LM),lF=w(122,e=>{xP(e),sN(e)}),uF=w(43,e=>{$(e),IP(e)}),dF=w(44,$),fF=w(45,$),pF=w(131,f(Ij)),mF=w(134,e=>{jA(e.a3,e.d0),dN(e)}),hF=w(139,e=>{dN(e),qA(e)}),gF=w(46,sN),_F=g(4,(e=>`<a title="Back to terminal (Esc)">${e}</a>`)(t),(e=>` D/${e}&l`)(Ve),dM),vF=(e,t)=>_F(e,+!t),yF=(e,t)=>{SP(e,t.workspaceId),OP(e,t.scope),jP(e,t.findOpen),MP(e,t.findOpenChange),BP(e,t.findTick),HP(e,t.findFocusRef),$P(e,t.onFileChange),oF(e,t.focusPr),sF(e,t.focusFile),cF(e,t.onScopeChange),uF(e,t.active),dF(e,t.focusNonce),fF(e,t.focusFileNonce),gF(e,t.onSent),vF(e,t.onExit),xF(e,t.sessions),SF(e,t.workspaceBranch),CF(e,t.workspaceName)},bF=f(xj),xF=w(48,e=>{oM(e),bF(e)}),SF=w(49,f(Cj)),CF=w(50,f(wj)),wF=e=>function(){TN(e._,null)},TF=e=>function(t){TN(e._._,t)},EF=e=>function(t,n){e._._.dy(t,n)},DF=e=>function(t,n){e._._.ds(t,n)},OF=e=>function(t){e._._.dr(t)},kF=e=>function(){SN(e._._,null)},AF=e=>function(t,n,r){e._._.dz(t,n,r)},jF=e=>function(t,n){e._._.dn(t,n)},MF=e=>function(t,n){SN(e._._,{key:t.key,side:n.side||`additions`,start:Math.min(n.start,n.end),end:Math.max(n.start,n.end)})},NF=e=>function(t,n){e._._.bi([t],!n)},PF=e=>function(){AN(e._._,!e._._.b1)},FF=e=>function(){e._._.e3(e._.c?.id)},IF=e=>async(t,n)=>{let r=e.au;if(SN(e,null),r)try{let i=await fe(`/api/workspaces/${e.a6}/review`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({action:`comment`,worktree:e.dk(t.repo),path:t.path,side:r.side,line_start:r.start,line_end:r.end,text:n.trim(),...e.dl(t,r)})});bN(e,e.ar.concat(i))}catch(t){TN(e,String(t.message||t))}},LF=e=>(t,n,r)=>{let i=e.au,a=n.trim();if(!i||!a)return Promise.resolve(!1);let o={id:-1,workspace_id:e.a6,worktree:e.dk(t.repo),path:t.path,side:i.side===`deletions`?`deletions`:`additions`,line_start:i.start,line_end:i.end,text:a,created_at:``,...e.dl(t,i)};return e.dt([o],{session:r},[])},RF=e=>(t,n)=>{let r=e.cw.find(e=>e.id===t.repo),i=n.side===`deletions`?t.old:t.new;return{head:r?.head,snippet:i==null?void 0:cn(i,n.start,n.end,n.side===`deletions`?`deletions`:`additions`)}},zF=e=>function(t){e.cl(t)},BF=e=>(t,n=!0)=>{t!==e.b2&&(DP(e,t),n&>(t),e.ag?.(t),e.ci(t))},VF=e=>()=>{e.ce&&clearTimeout(e.ce),e.ce=setTimeout(()=>{e.ce=0,e.cr()},250)},HF=e=>()=>e.ci(e.b2,!0),UF=e=>async(t=e.b2,n=!1)=>{let r=++e.cg;DN(e,!0),TN(e,null);try{let i=new URLSearchParams;t!==`committed`&&i.set(`scope`,t),n&&i.set(`refresh`,`1`);let a=i.size?`?${i}`:``,[o,s]=await Promise.all([fe(`/api/workspaces/${e.a6}/diff${a}`),fe(`/api/workspaces/${e.a6}/review`)]);if(r!==e.cg)return;if(fN(e,o),bN(e,s.comments||[]),e.cd=kt(o),e.ae)e.bv(e.ae);else if(e.af)e.c0(e.af);else if(!n&&e.cg===1){let n=Je(e.a6);n&&n.scope===t&&e.cb(n)}}catch(t){if(r!==e.cg)return;TN(e,String(t.message||t))}finally{r===e.cg&&DN(e,!1)}},WF=e=>t=>{if(!t)return;let n=e.ap||[],r=n.find(e=>e.pr&&`${e.worktree}/${e.pr.number}`===t),i=new Set(e.bj);for(let t of n)e.bg.has(t.id)||i.add(t.id);r&&i.add(r.id),GN(e,i);let a=new Set;for(let e of n)(!r||e.id!==r.id)&&a.add(e.id);zN(e,a),qN(e,new Set),e.bt(()=>{let n=e.w?.querySelector(`[data-pr="${CSS.escape(t)}"]`);return n&&e.bs(n),!!n})},GF=e=>()=>{e.ap&&ut(e.a6,e.c3)},KF=e=>()=>{if(!e.ap)return;let t={},n={};for(let r of e.ap){(!t[r.worktree]||!r.pr)&&(t[r.worktree]=r.head);for(let e of r.files)e.hash&&(n[`${r.worktree}/${e.path}`]=e.hash)}fetch(`/api/workspaces/${e.a6}/review`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({action:`seen`,heads:t,dirty:n}),keepalive:!0}).catch(()=>{})},qF=e=>()=>e.dt(e.ar,{clipboard:!0},`all`),JF=e=>t=>e.dt(e.ar,{session:t},`all`),YF=e=>(t,n)=>{let r=e.ar.find(e=>e.id===t);return r?e.dt([r],{session:n},[t]):Promise.resolve(!1)},XF=e=>async(t,n,r)=>{if(!t.length)return!0;e.co++;try{let i=rn(t,e.ap);if(`clipboard`in n){if(!await st(i))return TN(e,`Copy failed: the clipboard needs HTTPS in this browser.`),!1}else await fe(`/api/sessions/${n.session}/send`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({text:`Please address this review feedback, then summarize what you changed.\n\n${i}`,...Ge()||{}})}),e.ak?.(n.session);if(SN(e,null),r===`all`)bN(e,[]);else{let t=new Set(r);bN(e,e.ar.filter(e=>!t.has(e.id)))}return(r===`all`||r.length)&&await e.do(r).catch(()=>{}),!0}catch(t){return TN(e,String(t.message||t)),!1}finally{e.co--}},ZF=e=>async t=>{bN(e,e.ar.filter(e=>e.id!==t)),await e.do([t]).catch(()=>{})},QF=e=>async(t,n)=>{let r=e.ar.find(e=>e.id===t);if(!r)return;let i=n.trim();if(!(!i||i===r.text)){bN(e,e.ar.map(e=>e.id===t?{...e,text:i}:e));try{await fe(`/api/workspaces/${e.a6}/review/${t}`,{method:`PATCH`,headers:{"content-type":`application/json`},body:JSON.stringify({text:i})})}catch(n){throw bN(e,e.ar.map(e=>e.id===t?r:e)),TN(e,String(n.message||n)),n}}},$F=e=>t=>{vP(e,t)},eI=e=>t=>{if(e.bk.has(t)){let n=new Set(e.bk);n.delete(t),qN(e,n),e.bg.has(t)||zN(e,new Set([...e.bg,t]));return}if(e.bg.has(t)){if(e.bj.has(t)){let n=new Set(e.bg);n.delete(t),zN(e,n);return}qN(e,new Set([...e.bk,t])),requestAnimationFrame(()=>{requestAnimationFrame(()=>{if(!e.bk.has(t))return;let n=new Set(e.bg);n.delete(t),zN(e,n);let r=new Set(e.bk);r.delete(t),qN(e,r)})})}else GN(e,new Set([...e.bj,t])),zN(e,new Set([...e.bg,t]))},tI=e=>function(t,n){e.bi(t,n)},nI=e=>(t,n)=>{let r=new Set(e.bh);for(let e of t)n?r.add(e):r.delete(e);(r.size!==e.bh?.size||[...r].some(t=>!e.bh.has(t)))&&UN(e,r)},rI=e=>t=>{e.ad?.(t),e.bt(()=>{let n=e.bx(t);return n&&e.bs(n),!!n})},iI=e=>function(t){e.e2(t)},aI=e=>t=>{if(FN(e,t),!t.hit)return;let n=t.hit;setTimeout(()=>{let r=e.bx(n.key);if(r){if(n.line<1){e.bs(r);return}Bt(t.query,n),Vt()}},0)},oI=e=>t=>{let n=e.w;if(!n){t.scrollIntoView({block:`start`});return}let r=t.getBoundingClientRect().top-n.getBoundingClientRect().top+n.scrollTop;n.scrollTo({top:Math.max(0,r-8)})};function sI(e,t=2500){let n=Date.now(),r=()=>{!e()&&Date.now()-n<t&&requestAnimationFrame(r)};r()}var cI=e=>t=>{let n=e.bw(t);return n&&(n.open=!0),n},lI=e=>t=>{let n=++e.c5,r=Date.now(),i=0,a=()=>{e.c5===n&&e.c5++},o=()=>{if(e.c5!==n)return;let s=e.w,c=e.bw(t.key);if(s&&c){let e=c.getBoundingClientRect().top-s.getBoundingClientRect().top+t.off;if(Math.abs(e)>1&&(s.scrollTop+=e),!i){i=Date.now();for(let e of[`wheel`,`touchstart`,`keydown`])s.addEventListener(e,a,{once:!0,passive:!0})}Date.now()-i<1500&&requestAnimationFrame(o)}else!i&&Date.now()-r<2500&&requestAnimationFrame(o)};requestAnimationFrame(o)},uI=e=>t=>e.w?.querySelector(`details[data-key="${CSS.escape(t)}"]`)??null;function dI(e){let t=new Map;for(let n of e){let e=t.get(n.repo);e?e.push(n):t.set(n.repo,[n])}return t}function fI(e){return e.includes(`#`)?e.split(`#`)[0]:e}var pI=e=>t=>{MN(e,t)},mI=e=>t=>{GN(e,t)},hI=e=>t=>{zN(e,t)},gI=e=>t=>{kP(e,t)},_I=e=>t=>t===`all`?fetch(`/api/workspaces/${e.a6}/review`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({action:`clear`})}):Promise.all(t.map(t=>fetch(`/api/workspaces/${e.a6}/review/${t}`,{method:`DELETE`}))),vI=e=>async()=>{if(!e.co)try{let t=await fe(`/api/workspaces/${e.a6}/review`);if(e.co)return;bN(e,t.comments||[])}catch{}},yI=e=>()=>{e.c2||=requestAnimationFrame(()=>{e.c2=0,e.w?.isConnected&&(e.c3=e.c7())})},bI=e=>()=>{let t=e.w;if(!t||!t.scrollTop)return null;let n=t.getBoundingClientRect().top,r=null;for(let i of t.querySelectorAll(`details[data-key]`)){if(i.hidden)continue;let t=i.getBoundingClientRect().top;if(t>n+1)break;r={scope:e.b2,key:i.dataset.key,off:Math.round(n-t)}}return r},xI=e=>()=>{kP(e,!0),zP(e,+e.b7+1),e.b9.focus()};function SI(){}var CI=e=>(t,n)=>{e.bn??=new WeakMap,e.bn.set(t,n);let r=e.w||null;(!e.bo||e.bp!==r)&&(e.bo?.disconnect(),e.bp=r,e.bo=new IntersectionObserver(t=>{for(let n of t)n.isIntersecting&&(e.bo.unobserve(n.target),e.bn.get(n.target)?.())},{root:r,rootMargin:`800px 0px`})),e.bo.observe(t),requestAnimationFrame(()=>{if(!t.isConnected)return;let r=e.w,i=t.getBoundingClientRect(),a=r?r.getBoundingClientRect():{top:0,bottom:window.innerHeight};i.bottom>=a.top-800&&i.top<=a.bottom+800&&(e.bo?.unobserve(t),n())})};O(`m38`,wF),O(`m49`,TF),O(`m48`,EF),O(`m47`,DF),O(`m46`,OF),O(`m45`,kF),O(`m44`,AF),O(`m43`,jF),O(`m42`,MF),O(`m41`,NF),O(`m40`,PF),O(`m39`,FF),O(`m24`,IF),O(`m32`,LF),O(`m23`,RF),O(`m0`,zF),O(`m16`,BF),O(`m19`,VF),O(`m18`,HF),O(`m15`,UF),O(`m7`,WF),O(`m13`,GF),O(`m20`,KF),O(`m29`,qF),O(`m30`,JF),O(`m31`,YF),O(`m28`,XF),O(`m26`,ZF),O(`m27`,QF),O(`m1`,$F),O(`m35`,eI),O(`m52`,tI),O(`m3`,nI),O(`m10`,rI),O(`m37`,iI),O(`m34`,aI),O(`m5`,oI),O(`m6`,sI),O(`m9`,cI),O(`m14`,lI),O(`m8`,uI),O(`m21`,dI),O(`m22`,fI),O(`m53`,pI),O(`m51`,mI),O(`m50`,hI),O(`m36`,gI),O(`m25`,_I),O(`m17`,vI),O(`m12`,yI),O(`m11`,bI),O(`m33`,xI),O(`m2`,SI),O(`m4`,CI);var wI=o(`m`,VA,HA,fP,yF);export{wI as default,Et as t};
|
|
1536
|
+
`)),tS=e,e}var iS=new CSSStyleSheet;iS.replaceSync(`:host { display: block; max-width: 100%; overflow-x: auto; } @media (pointer: coarse) { pre[data-diff] { touch-action: pan-x pan-y; } [data-column-number], [data-gutter-utility-slot] { touch-action: none !important; } }`+Ft);var aS=vt(`h0`,0),oS=(e,t)=>c(e.a,[`_hp`,t]),sS=D(`h1`,e=>S(e,{file:e.e,comments:e.f,draft:e.g,sessions:e.h,wholeFile:e.i,onMount:function(){let t=()=>e.h||[],n=()=>{let e=t();if(e.length<=1)return null;let n=document.createElement(`select`);n.setAttribute(`aria-label`,`Send to session`),n.className=`_fz`;for(let t of e){let e=document.createElement(`option`);e.value=t.id,e.textContent=t.title||t.agent,n.append(e)}return n},r=e=>e?.value||t()[0]?.id||null,i=(e,t,n)=>{for(let r of e)r.disabled=t,n&&r.dataset.role===`send`&&(r.textContent=t?`Sending…`:n)},a=(e,n,r)=>{let i=t()[0];if(!n)return e.className=`_o ${r?Te:``} _p`,e.textContent=`Send`,i&&(e.title=`Send to ${i.title||i.agent}`),e;let a=document.createElement(`span`);return a.className=`_fx`,r&&(a.style.cssText=`font-size:.75rem;`),e.className=`_p _fy`,e.textContent=`Send to`,a.append(e,n),a},o=t=>{if(t.snippet==null)return null;let n=t.side===`deletions`?e.e.old:e.e.new;if(n==null||cn(n,t.line_start,t.line_end,t.side)===t.snippet)return null;let r=document.createElement(`span`);return r.className=`_I ${Ke.warn}`,r.textContent=`changed since`,r.title=`The file changed here after this comment was written; the agent gets the lines as they were.`,r},s=s=>{if(!s)return;let c=document.createElement(`div`);c.style.cssText=Qx;let l=document.createElement(`div`),u=document.createElement(`div`);u.style.cssText=$x;let d=()=>{l.replaceChildren(),u.replaceChildren();let c=document.createElement(`p`);c.textContent=s.text,c.style.cssText=`margin:0;white-space:pre-wrap;`;let d=document.createElement(`button`);d.type=`button`,d.textContent=`Remove`,d.className=`_o ${Te}`,d.onclick=()=>e.j?.(s.id);let p=document.createElement(`button`);p.type=`button`,p.textContent=`Edit`,p.className=`_o ${Te}`,p.hidden=!e.k,p.onclick=()=>f();let m=t().length>0&&!!e.l,h=document.createElement(`button`);h.type=`button`,h.dataset.role=`send`,h.textContent=`Send`,h.hidden=!m;let g=m?n():null,_=g?`Send to`:h.textContent;h.onclick=()=>{(async()=>{let t=r(g);if(!(!t||h.disabled)){i([d,p,h],!0,_);try{await e.l?.(s.id,t)}finally{i([d,p,h],!1,_)}}})()},u.append(p,d),m&&u.append(a(h,g,!0));let v=o(s);v&&u.append(v),l.append(c)},f=()=>{l.replaceChildren(),u.replaceChildren();let t=document.createElement(`textarea`);t.value=s.text,t.rows=3,t.className=`_U`,t.style.cssText=`resize:vertical;`+(je()?`font-size:16px;`:``);let n=document.createElement(`button`);n.type=`button`,n.textContent=`Save`,n.className=`_o _p`;let r=document.createElement(`button`);r.type=`button`,r.textContent=`Cancel`,r.className=`_o`;let a=()=>{let a=t.value.trim();if(!a||a===s.text){d();return}(async()=>{i([n,r],!0,`Save`);try{await e.k?.(s.id,a),s.text=a,d()}catch{i([n,r],!1,`Save`)}})()};n.onclick=a,r.onclick=()=>d(),t.onkeydown=e=>{e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),a()),e.key===`Escape`&&(e.preventDefault(),d())},u.append(n,r),l.append(t),setTimeout(()=>{t.focus(),t.setSelectionRange(t.value.length,t.value.length)},0)};return d(),c.append(l,u),c},c=()=>{let o=document.createElement(`div`);o.style.cssText=`background:var(--panel);border-block:1px solid var(--border);padding:.5rem .75rem;font-family:system-ui,sans-serif;font-size:.85rem;display:flex;flex-direction:column;gap:.35rem;scroll-margin:4rem 0 1.5rem;`;let s=document.createElement(`textarea`);s.placeholder=`Add a comment…`,s.rows=3,s.className=`_U`,s.style.cssText=`resize:vertical;`+(je()?`font-size:16px;`:``);let c=document.createElement(`button`);c.type=`button`,c.textContent=`Add`,c.className=`_o`;let l=document.createElement(`button`);l.type=`button`,l.dataset.role=`send`,l.textContent=`Send`;let u=document.createElement(`button`);u.type=`button`,u.textContent=`Cancel`,u.className=`_o`;let d=t().length>0&&!!e.m;l.hidden=!d;let f=d?n():null,p=d?a(l,f,!1):l,m=l.textContent;c.onclick=()=>{s.value.trim()&&e.n?.(s.value)},l.onclick=()=>{(async()=>{let t=s.value.trim(),n=r(f);if(!(!t||!n||l.disabled)){i([c,l,u],!0,m);try{await e.m?.(t,n)}finally{i([c,l,u],!1,m)}}})()},u.onclick=()=>e.o?.(),s.onkeydown=e=>{e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),d?l.onclick():c.onclick()),e.key===`Escape`&&u.onclick()};let h=document.createElement(`div`);h.style.cssText=$x,h.append(c),d&&h.append(p),h.append(u),o.append(s,h);let g=()=>o.scrollIntoView({block:`nearest`,behavior:`smooth`}),_=g;s.addEventListener(`focus`,()=>{let e=window.visualViewport;e&&(e.addEventListener(`resize`,_),s.addEventListener(`blur`,()=>e.removeEventListener(`resize`,_),{once:!0}))});let v=(e=0)=>{if(!s.isConnected||!s.getClientRects().length){e<120&&requestAnimationFrame(()=>v(e+1));return}g(),s.focus({preventScroll:!0})};return setTimeout(v,0),o},l=new Map,u,d={draft:!0},f,p={diffStyle:ct()?`unified`:`split`,disableFileHeader:!0,expandUnchanged:!!e.i,enableLineSelection:!0,onLineSelectionEnd(t){if(!t)return;let n=t.endSide!=null&&t.endSide!==t.side;e.p?.({side:t.side,start:t.start,end:n?t.start:t.end})},onPostRender(t,n,r){if(r===`unmount`)return;g(),Jt(e.a);let i=f?.querySelector(`textarea`),a=f?.getRootNode();if(i&&a&&`activeElement`in a&&a.activeElement===i){let e=f.getBoundingClientRect();e.height&&(e.top<0||e.bottom>window.innerHeight)&&f.scrollIntoView({block:`nearest`,behavior:`smooth`})}},renderAnnotation(e){let t=e.metadata||{};return t.draft?f??=c():s(t.comment)}},m=new Ny(p,Jx()),h=()=>{let t=[],n=new Map;for(let r of e.f||[]){let e=l.get(r.id);(!e||e.comment.text!==r.text)&&(e={comment:r}),n.set(r.id,e),t.push({side:r.side,lineNumber:r.line_end,metadata:e})}return l=n,e.g&&(u!==e.g&&(u=e.g,d={draft:!0},f=void 0),t.push({side:e.g.side,lineNumber:e.g.end,metadata:d})),t},g=()=>{let t=e.a.querySelector(`diffs-container`)?.shadowRoot;t&&!t.adoptedStyleSheets.includes(iS)&&(t.adoptedStyleSheets=[...t.adoptedStyleSheets,iS,rS()])},_=()=>{if(e.e.old==null&&e.e.new==null){e.q?.(`could not read ${e.e.path}`);return}let t=m.render({containerWrapper:e.a,oldFile:e.e.old==null?null:{name:e.e.oldPath||e.e.path,contents:e.e.old,cacheKey:Yx(`${e.e.key}:old`,e.e.old)},newFile:e.e.new==null?null:{name:e.e.path,contents:e.e.new,cacheKey:Yx(`${e.e.key}:new`,e.e.new)},lineAnnotations:h()});Promise.resolve(t).then(()=>{g(),Jt(e.a)}).catch(t=>e.q?.(`diff render: ${t}`))};_();let v=new AbortController;return je()&&Xx(aS(e),v.signal),{instance:m,render:_,dragAbort:v,unregSearch:qt(e.a,e.e.key),shownFile:e.e,shownComments:e.f,shownDraft:e.g,shownSessions:e.h,shownWhole:!!e.i,options:p}},onUpdate:function(){!!this.wholeFile!==this.shownWhole&&(this.shownWhole=!!this.wholeFile,this.options.expandUnchanged=this.shownWhole,this.instance.setOptions(this.options),this.instance.rerender()),this.shownDraft&&!this.draft&&this.instance.setSelectedLines(null);let e=this.file,t=this.shownFile;(e.old!==t.old||e.new!==t.new||e.path!==t.path||e.oldPath!==t.oldPath||!nS(this.comments,this.shownComments)||this.draft!==this.shownDraft||this.sessions!==this.shownSessions)&&(this.shownFile=this.file,this.shownComments=this.comments,this.shownDraft=this.draft,this.shownSessions=this.sessions,this.render())},onDestroy:function(){this.unregSearch(),this.dragAbort.abort(),this.instance.cleanUp?.()}})),cS=b(17,sS,12),lS=w(4,cS),uS=w(5,cS),dS=w(6,cS),fS=w(7,cS),pS=w(8,cS),mS=w(9,cS),hS=w(10,cS),gS=w(11,cS),_S=w(12,cS),vS=w(13,cS),yS=w(14,cS),bS=w(15,cS),xS=w(16,cS),SS=`<section><div><!><!><span><span> </span><span aria-hidden=true>vs</span><span> </span><!></span><!><!><!><span><span><!> file<!></span><!><!></span></div><!></section>`,CS=` D D%b%b D D l b D l%l%b%b%b E%c%l%b%m%l`,wS=e=>c(e.a,[`_hk`,`_hc`]),TS=e=>c(e.a,[`_hk`,`_hc`]),ES=e=>c(e.a,[`_hk`,`_hc`]),DS=e=>{jx(e.a),Mx(e.a,13),Nx(e.a)},OS=e=>{Ex(e.a),Dx(e.a,13),Ox(e.a)},kS=e=>c(e.a,[`_z`,`_g_`]),AS=T(7,0,e=>k(e.c,e._.a0)),jS=e=>{AS._(e),c(e.a,`_s`),xx(e.b),Sx(e.b,12),Cx(e.b)},MS=e=>{gx(e.a),_x(e.a,14),vx(e.a)},NS=e=>{dx(e.a),fx(e.a,14),px(e.a)},PS=T(10,0,e=>k(e.b,e._.by)),FS=e=>{PS._(e),c(e.a,[`_I`,Ke.accent,`_g8`])},IS=T(17,0,e=>k(e.b,e._.bo)),LS=e=>{IS._(e),RS._(e),c(e.a,`_gZ`),c(e.c,`_g0`)},RS=T(17,0,e=>k(e.d,e._.bp)),zS=g(0,wx,(e=>`/${e}&`)(Tx),OS,kx,(e=>`/${e}&`)(Ax),DS),BS=b(1,e=>{c(e.a,[ke,`_hl`,{_hm:e._._._.bg.has(e._.m)}]),u(e.a,`title`,e._._._.bg.has(e._.m)?`Show changes only`:`Show whole file`),u(e.a,`aria-label`,e._._._.bg.has(e._.m)?`Show changes only`:`Show whole file`),u(e.a,`aria-pressed`,e._._._.bg.has(e._.m)?`true`:`false`),zS(e,+!e._._._.bg.has(e._.m))}),VS=v(135,BS,e=>e._._._),HS=D(`u12`,e=>A(e.a,`click`,function(t){t.preventDefault(),t.stopPropagation();let n=new Set(e._._._.bg);n.delete(e._.m)||n.add(e._.m),DT(e._._._,n)})),US=e=>{VS(e),WS._(e),HS(e)},WS=T(8,0,BS),GS=b(2,e=>u(e.a,`title`,`${e._.ax?`#${e._.ax.number}`:e._.b1} is already in ${e._.az}; showing the working tree only`),2),KS=T(12,0,GS),qS=e=>{KS._(e),JS._(e),YS._(e),c(e.a,[`_I`,`_g9`])},JS=T(12,0,e=>{k(e.b,e._.az),GS(e)}),YS=T(12,0,GS),XS=T(3,1,e=>k(e.b,Be(e._.ba))),ZS=e=>{XS._(e),c(e.a,cx)},QS=T(3,0,e=>k(e.d,e._.b3)),$S=e=>{QS._(e),eC._(e),tC._(e),nC._(e),c(e.a,[`_s`,`_u`]),c(e.c,cx)},eC=T(3,0,e=>k(e.b,e._.b7)),tC=T(3,0,e=>u(e.a,`href`,`${e._.b9}/files`)),nC=T(3,0,e=>u(e.a,`title`,e._.bz)),rC=T(2,1,e=>k(e.b,e._.b6)),iC=e=>{rC._(e),c(e.a,sx)},aC=b(1,e=>dS(e.a,e._._._._.am&&e._._._._.am.key===e._._.m?e._._._._.am:null)),oC=v(113,aC,e=>e._._._._),sC=e=>{oC(e),cC(e),uC(e),fC(e),mC(e),hC(e),gC(e),_C(e),vC(e),yC(e),xC(e),SC(e),CC(e),wC(e),e.a,oS(e.a,`_hc`)},cC=v(114,e=>fS(e.a,e._._._._.an),e=>e._._._._),lC=b(2,e=>bS(e.a,ME(e))),uC=v(115,lC,e=>e._._._._),dC=b(3,e=>vS(e.a,NE(e))),fC=v(116,dC,e=>e._._._._),pC=b(4,e=>_S(e.a,PE(e))),mC=v(117,pC,e=>e._._._._),hC=v(118,e=>yS(e.a,FE(e)),e=>e._._._._),gC=v(119,e=>mS(e.a,IE(e)),e=>e._._._._),_C=v(120,e=>hS(e.a,LE(e)),e=>e._._._._),vC=v(121,e=>gS(e.a,RE(e)),e=>e._._._._),yC=v(122,e=>xS(e.a,zE(e)),e=>e._._._._),bC=b(5,e=>pS(e.a,e._._._._.bg.has(e._._.m))),xC=v(135,bC,e=>e._._._._),SC=v(30,e=>{lS(e.a,e._._.l),lC(e),dC(e),pC(e)},e=>e._._),CC=v(31,e=>{aC(e),bC(e)},e=>e._._),wC=v(32,e=>uS(e.a,e._._.z),e=>e._._),TC=D(`u13`,e=>S(e,{onMount:function(){e._._._._.v.observeNear(e.a,()=>{MC(e._,!0)})}})),EC=v(98,TC,e=>e._._._._),DC=g(0,`<div></div>`,` `,e=>{EC(e),c(e.a,[`_he`,`_hc`])},Zx,(e=>`/${e}&`)(` b`),sC),OC=b(4,e=>DC(e,e.c||e.d?1:0)),kC=w(3,OC),AC=b(1,e=>kC(e,e._._._.aj===e._.m)),jC=v(110,AC,e=>e._._._),MC=E(2,OC),NC=e=>{jC(e),PC._(e),MC(e,!1)},PC=T(9,3,AC),FC=b(13,e=>u(e.a,`hidden`,!e._._.y.has(e.m))),IC=v(100,FC,e=>e._._),LC=D(`u14`,e=>{We(e,`a`),A(e.a,`toggle`,function(e,t){if(!t.open){let e=t.closest(`[data-diff-main]`);if(e){let n=t.getBoundingClientRect().top-e.getBoundingClientRect().top;n<0&&(e.scrollTop+=n)}}})}),RC=e=>{IC(e),HC(e),YC(e),QC(e),$C(e),ew(e),c(e.b,`_hd`),c(e.c,`_hi`),LC(e)},zC=f(wC),BC=w(25,e=>{nw(e,e.z.length),zC(e)}),VC=b(14,e=>BC(e,e._._.ah.get(e.m)||[])),HC=v(108,VC,e=>e._._),UC=b(28,e=>ae(e,`a`,e.a1,BE(e)),2),WC=g(8,`<button type=button></button>`,` `,US),GC=g(9,`<p>binary file</p>`,` `,ES,`<p>file too large to display</p>`,` `,TS,`<p>file could not be read</p>`,` `,wS,`<!><!><!>`,`b%`,NC),KC=b(29,e=>{WC(e,e.a1&&!e.v&&!e.w&&e.x!=null&&e.y!=null?0:1),GC(e,e.v?0:e.w?1:e.x==null&&e.y==null?2:e.a1?3:4)},4),qC=w(27,e=>{UC(e),KC(e)}),JC=b(15,e=>qC(e,!e._._.ai.has(e.m))),YC=v(109,JC,e=>e._._),XC=b(16,e=>c(e.a,[`_hb`,e._._.aj===e.m&&`_gR`])),ZC=b(17,e=>c(e.e,[`_hj`,e._._.aj===e.m&&e._._.al<1&&`_gS`]),2),QC=v(110,e=>{XC(e),ZC(e)},e=>e._._),$C=v(111,UC,e=>e._._),ew=v(112,ZC,e=>e._._),tw=g(7,(e=>`<span>${e} <!></span>`)(yx),(e=>` D/${e}&b%l`)(bx),jS),nw=w(26,e=>{tw(e,+!e.a0),AS(e)}),rw=f(CC),iw=w(12,e=>{u(e.a,`data-key`,e.m),VC(e),JC(e),UC(e),XC(e),FC(e),ZC(e),PC(e),rw(e),WS(e)}),aw=(e,t)=>{u(e.c,`data-status`,t),k(e.d,t)},ow=(e,t)=>{u(e.e,`title`,t),k(e.f,t)},sw=g(6,`<span title="Changed since your last visit"></span>`,` `,kS),cw=(e,t)=>sw(e,+!t),lw=w(21,KC),uw=w(22,KC),dw=w(23,KC),fw=w(24,KC),pw=(e,t)=>hw(e,t[0]),mw=f(SC),hw=w(11,e=>{iw(e,e.l?.key),aw(e,e.l?.status),ow(e,e.l?.path),cw(e,e.l?.changedSince),lw(e,e.l?.binary),uw(e,e.l?.tooLarge),dw(e,e.l?.old),fw(e,e.l?.new),mw(e)}),gw=_e(0,`<details><summary><span> </span><span><bdi> </bdi></span><!><!><!></summary><!></details>`,` D D D l E m%b%b%l%`,RC,pw),_w=T(19,0,e=>gw(e,[e._.x,`key`])),vw=e=>{_w._(e),bw._(e),xw._(e),c(e.a,`_ha`)},yw=b(1,e=>u(e.a,`hidden`,e._.a5&&e._.a6)),bw=T(19,0,yw),xw=T(19,0,yw),Sw=T(18,0,e=>{c(e.a,[`_g2`,{_g1:e._.ad}]),u(e.a,`aria-pressed`,e._.ad?`true`:`false`),u(e.a,`title`,e._.ad?`Show every file`:`Show only files changed since your last visit`)}),Cw=D(`u11`,e=>A(e.a,`click`,function(){e._.ae()})),ww=e=>{Sw._(e),Tw._(e),Cw(e)},Tw=T(18,0,e=>k(e.b,e._.br)),Ew=b(3,e=>k(e.b,ox(e._.b1,e._.a1,e._.a2)),2),Dw=T(13,0,Ew),Ow=e=>{Dw._(e),kw._(e),jw._(e),Mw._(e),Nw._(e),Pw._(e),c(e.a,[`_I`,`_g9`])},kw=T(13,0,Ew),Aw=b(4,e=>u(e.a,`title`,`This view is ${sn(e._.b4)} (${e._.b0}); checked out is ${sn(e._.bf)} (${e._.b1})`),3),jw=T(13,0,Aw),Mw=T(13,0,e=>{Aw(e),Ew(e)}),Nw=T(13,0,Aw),Pw=T(13,0,e=>{k(e.c,sn(e._.bf,7)),Aw(e)}),Fw=T(11,0,e=>u(e.a,`disabled`,e._.aa)),Iw=D(`u10`,e=>A(e.a,`click`,function(){e._.ab()})),Lw=e=>{Fw._(e),zw._(e),Bw._(e),Vw._(e),c(e.a,[`_I`,Ke.warn,`_g9`]),Iw(e)},Rw=b(3,e=>u(e.a,`title`,`origin/${e._.b0} ${e._.b4} · GitHub ${e._.bc}. Reload to re-ask GitHub`),2),zw=T(11,0,Rw),Bw=T(11,0,e=>{k(e.b,sn(e._.b4,7)),Rw(e)}),Vw=T(11,0,e=>{k(e.c,sn(e._.bc,7)),Rw(e)}),Hw=g(1,lx,(e=>`/${e}&`)(ux),NS,mx,(e=>`/${e}&`)(hx),MS),Uw=b(5,e=>u(e.a,`title`,e._.a6?`Show ${e._.bm} files`:`Hide files`)),Ww=b(4,e=>c(e.b,[`_hf`,!e._.a6&&`_hg`,e._.a8&&`_hh`])),Gw=T(2,0,e=>{u(e.a,`aria-expanded`,e._.a6?`false`:`true`),Hw(e,+!e._.a6),Uw(e),Ww(e)}),Kw=D(`u9`,e=>A(e.a,`click`,function(){e._.a9()})),qw=e=>{Gw._(e),Jw._(e),Yw._(e),Xw._(e),c(e.a,`_gW`),c(e.c,sx),Kw(e)},Jw=T(2,0,e=>{u(e.a,`aria-busy`,e._.a8?`true`:`false`),Ww(e)}),Yw=T(2,0,e=>k(e.d,e._.b6)),Xw=T(2,0,Uw),Zw=(e,t)=>{eT(e,t?.pr),lT(e,t?.base),uT(e,t?.branch),fT(e,t?.head),pT(e,t?.baseSha),mT(e,t?.worktree),hT(e,t?.id),gT(e,t?.full_name),vT(e,t?.githubDrift),xT(e,t?.contained),ST(e,t?.localHead)},Qw=g(3,`<a target=_blank rel=noopener>#<!></a><span> </span>`,` Db%l D `,$S,`<span> </span>`,` D `,ZS),$w=b(83,e=>u(e.a,`hidden`,!e.bj&&!e.ax&&e.a4!==e.b8),3),eT=w(59,e=>{rT(e,e.ax?.baseRefName),iT(e,e.ax?.headRefName),aT(e,e.ax?.title),oT(e,e.ax?.number),sT(e,e.ax?.url),cT(e,e.ax?.headRefOid),Qw(e,+!e.ax),$w(e),KS(e)}),tT=(e,t)=>{KT(e,t?.title),qT(e,t?.base),JT(e,t?.head),XT(e,t?.topic)},nT=b(64,e=>tT(e,ax(e.ay||e.az,e.b0||e.b1,e.a1,e.a2)),5),rT=w(60,nT),iT=w(62,e=>{nT(e),zw(e),jw(e)}),aT=w(65,QS),oT=w(69,eC),sT=w(71,tC),cT=w(74,Vw),lT=w(61,e=>{nT(e),JS(e)}),uT=w(63,e=>{nT(e),Mw(e),YS(e)}),dT=b(93,e=>u(e.e,`title`,`${e.bu} · ${e.b4.slice(0,7)}…${e.b5.slice(0,7)}`),2),fT=w(66,e=>{dT(e),Bw(e),Nw(e)}),pT=w(67,dT),mT=w(68,e=>{Yw(e),rC(e)}),hT=w(70,$w),gT=w(72,XS),_T=g(11,`<button type=button>behind GitHub <!> → <!></button>`,` Db%c%`,Lw),vT=(e,t)=>_T(e,+!t),yT=g(12,`<span>already in <!></span>`,` Db%`,qS),bT=b(76,e=>yT(e,e.bd&&e.a0?0:1)),xT=w(75,bT),ST=w(77,Pw),CT=w(97,nC),wT=e=>{CT(e,e.ax?`${e.ax.title}: ${e.ax.headRefName} ${e.b4} vs ${e.az} ${e.b5}`:``)},TT=e=>{u(e.a,`data-pr`,e.ax?`${e.b6}/${e.ax.number}`:void 0)},ET=w(22,e=>{Zw(e,e.w),wT(e),TT(e)}),DT=E(78,f(xC,VS));function OT(e){c(e.a,`_gT`),c(e.e,`_g4`),c(e.f,[`_I`,`_g5`]),c(e.h,[`_K`,`_g7`]),c(e.i,[`_I`,`_g6`]),c(e.o,`_gY`),DT(e,new Set)}var kT=(e,t)=>{WT(e,t?.additions),GT(e,t?.deletions)},AT=(e,t)=>{NT(e,t?.length),kT(e,(()=>{let e=0,n=0;for(let r of t)e+=r.additions||0,n+=r.deletions||0;return{additions:e,deletions:n}})())},jT=w(84,e=>{k(e.p,e.bm),k(e.q,e.bm===1?``:`s`),Xw(e)}),MT=b(82,e=>jT(e,e.bj||e.a0)),NT=w(81,e=>{MT(e),$w(e)}),PT=b(25,e=>AT(e,e.x.filter(t=>e.y.has(t.key)))),FT=g(18,`<button type=button><!> new</button>`,` D%`,ww),IT=b(90,e=>FT(e,e.br||e.ad?0:1)),LT=w(89,e=>{IT(e),Tw(e)}),RT=w(23,e=>{VT(e,e.x?.length),LT(e,e.x.filter(e=>e.changedSince).length),PT(e),_w(e)}),zT=f(IC),BT=w(24,e=>{PT(e),zT(e)}),VT=w(26,e=>{MT(e),bT(e)}),HT=g(17,`<span>+<!></span><span>−<!></span>`,` Db%l Db%`,LS),UT=b(88,e=>HT(e,e.bo||e.bp?0:1)),WT=w(86,e=>{UT(e),IS(e)}),GT=w(87,e=>{UT(e),RS(e)}),KT=w(92,dT),qT=(e,t)=>k(e.g,t),JT=(e,t)=>k(e.j,t),YT=g(10,`<span> </span>`,` D `,FS),XT=w(96,e=>{YT(e,+!e.by),PS(e)}),ZT=w(27,e=>{nT(e),Dw(e)}),QT=w(28,e=>{nT(e),kw(e)}),$T=w(30,$w),eE=b(33,e=>c(e.b,[`_gU`,{_gV:e.a5&&e.a6}])),tE=g(2,`<button type=button><span aria-hidden=true></span><span> </span></button>`,` D b D `,qw,`<span> </span>`,` D `,iC),nE=g(19,`<div></div>`,` `,vw),rE=b(42,e=>nE(e,!e.a5||!e.a6||e.af?0:1),2),iE=w(31,e=>{tE(e,+!e.a5),eE(e),rE(e),bw(e)}),aE=w(32,e=>{eE(e),rE(e),Gw(e),xw(e)}),oE=g(13,`<span>local <!> <!></span>`,` Db%c%`,Ow),sE=(e,t)=>oE(e,+!t),cE=w(39,e=>{IT(e),Sw(e)}),lE=w(41,rE),uE=f(EC),dE=w(21,e=>{ET(e,e.v.repo),RT(e,e.v.files),BT(e,e.v.shownKeys),ZT(e,e.v.workspaceBranch),QT(e,e.v.workspaceName),$T(e,e.v.findHit?.repo),fE(e,e.v.findHit?.key),pE(e,e.v.findHit?.line),iE(e,e.v.collapsible),aE(e,e.v.collapsed),mE(e,e.v.expanding),hE(e,e.v.onToggle),gE(e,e.v.loading),_E(e,e.v.onReload),sE(e,e.v.localDiffers),cE(e,e.v.onlyNew),vE(e,e.v.onToggleNew),lE(e,e.v.opened),yE(e,e.v.commentsByFile),bE(e,e.v.collapsedFiles),xE(e,e.v.onFileToggle),SE(e,e.v.draft),CE(e,e.v.sessions),wE(e,e.v.onSelect),TE(e,e.v.onSaveComment),EE(e,e.v.onSendDraft),DE(e,e.v.onCancelDraft),OE(e,e.v.onDeleteComment),kE(e,e.v.onEditComment),AE(e,e.v.onSendComment),jE(e,e.v.onError),uE(e)}),fE=w(45,f(QC,jC)),pE=w(47,f(ew)),mE=w(34,Jw),hE=w(35),gE=w(36,Fw),_E=w(37),vE=w(40),yE=w(43,f(HC)),bE=w(44,f(YC)),xE=w(46,f($C)),SE=w(48,f(oC)),CE=w(49,f(cC)),wE=w(50,f(uC)),TE=w(51,f(fC)),EE=w(52,f(mC)),DE=w(53,f(hC)),OE=w(54,f(gC)),kE=w(55,f(_C)),AE=w(56,f(vC)),jE=w(57,f(yC)),ME=e=>function(t){e._._._._.ao(e._._.l,t)},NE=e=>function(t){e._._._._.ap(e._._.l,t)},PE=e=>function(t,n){e._._._._.aq(e._._.l,t,n)},FE=e=>function(){e._._._._.ar()},IE=e=>function(t){e._._._._.as(t)},LE=e=>function(t,n){e._._._._.at(t,n)},RE=e=>function(t,n){e._._._._.au(t,n)},zE=e=>function(t){e._._._._.av(t)},BE=e=>function(t){e._._.ak(e.m,t)};O(`u1`,ME),O(`u2`,NE),O(`u3`,PE),O(`u4`,FE),O(`u5`,IE),O(`u6`,LE),O(`u7`,RE),O(`u8`,zE),O(`u0`,BE);var VE=`_ho _l`,HE=`<div><input type=search placeholder="Filter files…" aria-label="Filter files"></div>`,UE=` D l`,WE=b(18,e=>n(e,`b`,e.l,oD(e))),GE=w(11,WE),KE=b(10,e=>GE(e,(e.j??e.h)||``)),qE=w(17,WE),JE=b(16,e=>qE(e,sD(e))),YE=w(15,JE),XE=b(14,e=>YE(e,cD(e)),2),ZE=m(7,e=>{KE(e),XE(e)}),QE=b(6,e=>ZE(e,e.e,e.f)),$E=w(4,QE),eD=w(5,QE),tD=E(9,e=>{KE(e),XE(e)}),nD=(e,t)=>aD(e,t.timer),rD=D(`n3`,e=>{He(e,`b`),A(e.b,`keydown`,function(t){t.key===`Enter`&&e.p(),t.key===`Escape`&&e.l&&(t.preventDefault(),e.r(``))})});function iD(e){c(e.a,`_hn`),c(e.b,VE),tD(e,null),nD(e,{timer:0}),rD(e)}var aD=w(13,e=>{XE(e),JE(e)}),oD=e=>function(t){e.r(t)},sD=e=>t=>{if(e.n&&clearTimeout(e.n),!t){e.n=0,tD(e,null),ZE(e,``);return}tD(e,t),e.n=setTimeout(e.p,150)},cD=e=>()=>{e.n&&=(clearTimeout(e.n),0);let t=e.j===null?e.h||``:e.j;tD(e,null),ZE(e,t)};O(`n0`,oD),O(`n2`,sD),O(`n1`,cD);var lD=`<!><!><!><!>`,uD=`b%b%c`,dD=e=>{c(e.a,`_f4`),xx(e.b),Sx(e.b,12),Cx(e.b)},fD=e=>c(e.a,[`_z`,`_f3`]),pD=e=>{gx(e.a),_x(e.a,12),vx(e.a)},mD=e=>{dx(e.a),fx(e.a,12),px(e.a)},hD=b(11,e=>u(e.a,`href`,e._.d.hrefFor(e.k))),gD=i(1,hD),_D=e=>{gD._(e),bD._(e),CD._(e),ED._(e),DD._(e),c(e.b,`_f6`),c(e.d,`_f2`)},vD=b(12,e=>c(e.a,[`_f1`,{_f0:e._.j?.has(e.k)}])),yD=b(16,e=>u(e.a,`title`,e._.j?.has(e.k)?`${e.p} (folded — click to open)`:e.p),2),bD=i(1,e=>{vD(e),yD(e)}),xD=g(6,(e=>`<span>${e}</span>`)(yx),(e=>` D/${e}&l`)(bx),dD),SD=b(13,e=>xD(e,+!e._.k.has(e.k))),CD=i(1,SD),wD=g(5,`<span title="Changed since your last visit"></span>`,` `,fD),TD=b(14,e=>wD(e,+!e._.l.has(e.k))),ED=i(1,TD),DD=i(1,e=>se(e.a,`--depth:${e._.p+1}`)),OD=w(10,e=>{hD(e),vD(e),yD(e),TD(e),SD(e)}),kD=w(15,yD),AD=(e,t)=>{u(e.b,`data-status`,t),k(e.c,t)},jD=(e,t)=>k(e.e,t),MD=(e,t)=>{OD(e,(t?.[0]).file?.key),kD(e,(t?.[0]).file?.path),AD(e,(t?.[0]).file?.status),jD(e,(t?.[0]).name)},ND=b(1,e=>cO(e.a,{dir:e._.h,collapsed:e._._.f,collapsedKey:e._._.h,onToggleDir:e._._.g,hrefFor:e._._.i,collapsedFiles:e._._.j,commentKeys:e._._.k,newKeys:e._._.l}),7),PD=v(17,ND,e=>e._._),FD=e=>{PD(e),ID(e),LD(e),RD(e),zD(e),BD(e),VD(e),HD._(e)},ID=v(18,ND,e=>e._._),LD=v(19,ND,e=>e._._),RD=v(20,ND,e=>e._._),zD=v(21,ND,e=>e._._),BD=v(22,ND,e=>e._._),VD=v(23,ND,e=>e._._),HD=T(5,0,ND),UD=g(2,lx,(e=>`/${e}&`)(ux),mD,mx,(e=>`/${e}&`)(hx),pD),WD=g(5,(e=>`<!>${e}<!>`)(lD),(e=>`b/${e}&b`)(uD),FD),GD=(e,t)=>{c(e.b,[`_fY`,{_fP:t}]),UD(e,+!t),WD(e,+!!t)},KD=b(9,e=>GD(e,e._.d.collapsed.has(e._.d.collapsedKey(e.i)))),qD=i(0,KD),JD=D(`k0`,e=>A(e.b,`click`,function(){e._.g(e.h)})),YD=e=>{qD._(e),c(e.a,`_fX`),c(e.c,`_f5`),c(e.d,`_fZ`),JD(e)},XD=w(8,e=>{u(e.b,`title`,e.i),KD(e)}),ZD=(e,t)=>se(e.b,`--depth:${t}`),QD=(e,t)=>k(e.e,t),$D=(e,t)=>eO(e,t[0]),eO=w(7,e=>{XD(e,e.h?.path),ZD(e,e.h?.depth),QD(e,e.h?.label),HD(e)}),tO=(e,t)=>{rO(e,t?.dirs),aO(e,t?.files),oO(e,t?.depth)},nO=_e(0,`<div><button type=button><span></span><span><!>/</span></button><!></div>`,` D D b D%m%`,YD,$D),rO=(e,t)=>nO(e,[t,`path`]),iO=_e(1,`<a><span> </span><span> </span><!><!></a>`,` D D l D l%b%`,_D,MD),aO=(e,t)=>iO(e,[t,e=>e.file.key]),oO=w(15,DD),sO=tO,cO=w(3,e=>{sO(e,e.d.dir),lO(e,e.d.collapsed),uO(e,e.d.onToggleDir),dO(e,e.d.collapsedKey),fO(e,e.d.hrefFor),mO(e,e.d.collapsedFiles),gO(e,e.d.commentKeys),vO(e,e.d.newKeys),qD(e),gD(e)}),lO=w(5,f(PD)),uO=w(6,f(ID)),dO=w(7,f(LD)),fO=w(8,f(RD)),pO=f(zD),mO=w(9,e=>{pO(e),bD(e)}),hO=f(BD),gO=w(10,e=>{hO(e),CD(e)}),_O=f(VD),vO=w(11,e=>{_O(e),ED(e)}),yO=(e=>`<aside><div>${e}</div><div><!><!></div></aside>`)(HE),bO=(e=>` D D/${e}&l D%b%m`)(UE),xO=e=>{gx(e.a),_x(e.a,12),vx(e.a)},SO=e=>{dx(e.a),fx(e.a,12),px(e.a)},CO=e=>c(e.a,`_fT`),wO=b(4,e=>cO(e.b,{dir:e.d,collapsed:e._._.a8,collapsedKey:Dk(e),onToggleDir:Ek(e),hrefFor:e._._.ab,collapsedFiles:e._._.a0,commentKeys:e._._.a9,newKeys:e._._.aa}),8),TO=v(38,wO,e=>e._._),EO=e=>{TO(e),DO(e),kO(e),AO(e),jO(e),MO(e),NO(e),PO._(e),IO._(e),c(e.a,`_fW`)},DO=v(39,wO,e=>e._._),OO=b(2,e=>u(e.a,`hidden`,e._._.a1.has(e._.i))),kO=v(40,OO,e=>e._._),AO=v(42,wO,e=>e._._),jO=v(43,wO,e=>e._._),MO=v(44,wO,e=>e._._),NO=v(45,wO,e=>e._._),PO=T(5,0,e=>{OO(e),wO(e)}),FO=w(3,wO),IO=T(5,0,e=>{FO(e,dn(e._.m)),wO(e)}),LO=g(2,lx,(e=>`/${e}&`)(ux),SO,mx,(e=>`/${e}&`)(hx),xO),RO=b(9,e=>{c(e.b,[`_fV`,{_fP:e._.a1.has(e.i)}]),LO(e,+!e._.a1.has(e.i))}),zO=g(5,(e=>`<div>${e}</div>`)(lD),(e=>` D/${e}&l`)(uD),EO),BO=b(10,e=>zO(e,!e._.a1.has(e.i)||e._.a3.has(e.i)?0:1),2),VO=i(5,e=>{RO(e),BO(e)}),HO=D(`l4`,e=>A(e.b,`click`,function(){let t=e.i,n=new Set(e._.a1);n.delete(t)||(ek(e._,new Set([...e._.a3,t])),n.add(t)),XO(e._,n)})),UO=e=>{VO._(e),WO._(e),c(e.a,`_fU`),c(e.c,`_f5`),c(e.d,`_fZ`),HO(e)},WO=i(5,BO),GO=w(8,e=>{RO(e),BO(e),PO(e)}),KO=(e,t)=>k(e.e,t),qO=(e,t)=>{GO(e,t[0]?.id),KO(e,t[0]?.label),JO(e,t[0]?.files)},JO=w(12,IO),YO=f(kO),XO=m(27,e=>{VO(e),YO(e)}),ZO=b(10,e=>XO(e,e.i,e.j)),QO=w(8,ZO),$O=w(9,ZO),ek=m(29,WO),tk=b(13,e=>ek(e,e.l,e.m)),nk=w(11,tk),rk=w(12,tk),ik=g(4,`<p>No files match.</p>`,` `,CO),ak=b(33,e=>ik(e,!e.y&&e.a5?0:1)),ok=m(31,e=>{$E(e.c,e.a5),ak(e)}),sk=b(16,e=>ok(e,e.o,e.p)),ck=w(14,sk),lk=w(15,sk),uk=E(34,f(AO));function dk(e){c(e.b,`_fR`),iD(e.c),eD(e.c,Ok(e)),c(e.d,`_fS`),uk(e,new Set)}var fk=w(35,f(jO)),pk=(e,t)=>fk(e,t||new Set),mk=w(36,f(MO)),hk=(e,t)=>mk(e,t||new Set),gk=w(37,f(NO)),_k=b(21,e=>gk(e,kk(e))),vk=w(19,_k),yk=w(20,_k),bk=(e,t)=>c(e.a,[`_fQ`,{_fP:t===!1}]),xk=w(24,ak),Sk=_e(5,`<div><button type=button><span></span><span> </span></button><!></div>`,` D D b D m%`,UO,qO),Ck=(e,t)=>{xk(e,t?.length),Sk(e,[t,`id`])},wk=w(25,f(TO)),Tk=w(26,f(DO)),Ek=e=>function(t){let n=`${e._.i}/${t.path}`,r=new Set(e._._.a8),i=!r.delete(n);i&&r.add(n),uk(e._._,r),e._._.z?.(e._.m.filter(e=>e.path.startsWith(`${t.path}/`)).map(e=>e.key),i)},Dk=e=>t=>`${e._.i}/${t}`,Ok=e=>t=>{ok(e,t)},kk=e=>t=>Pe({workspaceId:e.t,view:`diff`,scope:e.u??null,file:t});O(`l3`,Ek),O(`l2`,Dk),O(`l1`,Ok),O(`l0`,kk);var Ak=`<!><!><!>`,jk=e=>c(e.a,`_gN`),Mk=e=>{xx(e.a),Sx(e.a,12),Cx(e.a,`_gP`)},Nk=e=>c(e.a,[`_z`,`_gO`]),Pk=T(1,0,e=>{u(e.a,`title`,e._.f),k(e.b,e._.f)}),Fk=e=>{Pk._(e),c(e.a,`_gK`)},Ik=g(6,yx,(e=>`/${e}&`)(bx),Mk),Lk=b(11,e=>Ik(e,+!e._._._._.w.has(e.k))),Rk=v(29,Lk,e=>e._._._._),zk=D(`g2`,e=>A(e.a,`click`,function(){_A(e._._._._,!1)})),Bk=e=>{Rk(e),Uk(e),Gk(e),c(e.a,[`_gJ`,`_x`]),c(e.b,`_gQ`),c(e.d,`_gL`),zk(e)},Vk=g(5,`<span title="Changed since your last visit"></span>`,` `,Nk),Hk=b(12,e=>Vk(e,+!e._._._._.x.has(e.k))),Uk=v(30,Hk,e=>e._._._._),Wk=b(13,e=>u(e.a,`href`,e._._._._.z(e.k))),Gk=v(32,Wk,e=>e._._._._),Kk=w(10,e=>{Wk(e),Hk(e),Lk(e)}),qk=(e,t)=>{u(e.b,`data-status`,t),k(e.c,t)},Jk=(e,t)=>k(e.e,t),Yk=(e,t)=>{Kk(e,(t?.[0]).file?.key),qk(e,(t?.[0]).file?.status),Jk(e,(t?.[0]).name)},Xk=e=>c(e.a,`_gI`),Zk=g(1,`<div><bdi><!>/</bdi></div>`,` E%`,Fk),Qk=w(5,e=>{Zk(e,+!e.f),Pk(e)}),$k=_e(2,`<a><span> </span><span><bdi> </bdi></span><!><!></a>`,` D D l E m%b%`,Bk,Yk),eA=(e,t)=>$k(e,[t,e=>e.file.key]),tA=(e,t)=>{Qk(e,(t?.[0]).dir),eA(e,(t?.[0]).files)},nA=e=>{c(e.a,`_gG`),c(e.b,`_gH`)},rA=(e,t)=>k(e.c,t),iA=_e(3,`<div><!><!></div>`,` D%b%`,Xk,tA),aA=(e,t)=>iA(e,[t,`dir`]),oA=(e,t)=>{rA(e,t[0]?.repo),aA(e,t[0]?.dirs)},sA=g(13,`<p>No files match.</p>`,` `,jk),cA=b(14,e=>k(e.g,e._.n===e._.y?``:` / ${e._.y}`)),lA=T(0,0,e=>{k(e.f,e._.n),sA(e,+!!e._.n),cA(e)}),uA=D(`g3`,e=>{A(e.a,`click`,function(){_A(e._,!1)}),A(e.h,`click`,function(){_A(e._,!1)})}),dA=e=>{lA._(e),fA._(e),pA._(e),hA._(e),c(e.a,`_gB`),c(e.b,`_gC`),c(e.c,`_gD`),c(e.d,`_gA`),c(e.e,`_gE`),c(e.h,[Qe,`_gz`]),ye(e.i),be(e.i,16),y(e.i),c(e.j,`_gM`),iD(e.k),eD(e.k,zA(e)),c(e.l,`_gF`),uA(e)},fA=T(0,0,e=>$E(e.k,e._.u)),pA=T(0,0,cA),mA=_e(12,`<div><div> </div><!></div>`,` D D l%`,nA,oA),hA=T(0,0,e=>mA(e,[e._.a0,`repo`])),gA=g(0,((e,t)=>`<div></div><div role=dialog aria-label="Jump to file"><div><strong>Files</strong><span><!><!></span><button type=button title=Close aria-label=Close>${e}</button></div><div>${t}</div><div><!><!></div></div>`)(xe,HE),((e,t)=>` b D D b D%b%l D/${e}&m D/${t}&l D%b%m`)(ce,UE),dA),_A=m(18,e=>gA(e,+!e.s)),vA=b(5,e=>_A(e,e.d,e.e)),yA=w(3,vA),bA=w(4,vA),xA=m(20,fA),SA=b(8,e=>xA(e,e.g,e.h)),CA=w(6,SA),wA=w(7,SA),TA=w(22,f(Rk)),EA=(e,t)=>TA(e,t||new Set),DA=w(23,f(Uk)),OA=(e,t)=>DA(e,t||new Set),kA=w(24,pA),AA=b(14,e=>kA(e,e.l??e.n)),jA=w(11,AA),MA=w(13,e=>{AA(e),lA(e)}),NA=w(25,f(Gk)),PA=b(17,e=>NA(e,BA(e))),FA=w(15,PA),IA=w(16,PA),LA=w(26,hA),RA=(e,t)=>{MA(e,t?.length),LA(e,(()=>{let e=[],n=new Map;for(let r of t){let t=r.key.indexOf(`/`),i=r.key.slice(0,t),a=r.key.slice(t+1),o=a.lastIndexOf(`/`),s=o<0?``:a.slice(0,o),c=o<0?a:a.slice(o+1),l=n.get(i);l||(n.set(i,l=new Map),e.push({repo:i,dirs:[]}));let u=l.get(s);u||(l.set(s,u={dir:s,files:[]}),e[e.length-1].dirs.push(u)),u.files.push({file:r,name:c})}return e})())},zA=e=>t=>{xA(e._,t)},BA=e=>t=>Pe({workspaceId:e.p,view:`diff`,scope:e.q??null,file:t});O(`g1`,zA),O(`g0`,BA);var VA=((e,t,n,r)=>`<div><div><div><div><!><h1>Review</h1><!><!></div><div><!><button title="Refresh diff">${e}</button><!><div role=group aria-label="Review scope"><button type=button title="Committed changes only (base…tip, no working-tree edits)">Committed</button><button type=button title="Committed changes plus uncommitted and untracked files">Working tree</button><button type=button title="Only uncommitted and untracked files, against HEAD">Uncommitted</button></div><span><select aria-label="Review scope"><option value=committed>Committed</option><option value=working>Working tree</option><option value=dirty>Uncommitted</option></select></span><div>${t}</div><!></div></div><div data-diff-main><!><!><!><!><!></div></div>${n}${r}</div>`)(d,nb,yO,Ak),HA=((e,t,n,r)=>` D D D D%b b%b%l D%b D/${e}&l%b D b b l D l D/${t}&l%m D%b%b%b%b%m/${n}&/${r}&l`)(_,rb,bO,`b%c`),UA=e=>{c(e.a,`_fh`),c(e.b,[`_fi`,`_fj`]),c(e.c,[`_fi`,`_fk`]),c(e.d,[`_fi`,`_fl`]),c(e.e,[`_fi`,`_fk`]),c(e.f,[`_fi`,`_fl`])},WA=T(21,0,e=>u(e.a,`hidden`,e._.b5)),GA=D(`m56`,e=>A(e.a,`click`,function(){e._.e0()})),KA=e=>{WA._(e),c(e.a,[at,`_e6`,`_eX`]),ht(e.b),lt(e.b,14),Se(e.b),GA(e)},qA=T(12,0,e=>k(e.b,e._.d5)),JA=D(`m55`,e=>A(e.a,`click`,function(){MN(e._,!0)})),YA=e=>{qA._(e),c(e.a,[`_o`,`_fm`]),JA(e)},XA=T(9,0,e=>{c(e.a,[fn,`_eX`,{_eW:e._.b3}]),u(e.a,`title`,e._.b3?`Hide file tree`:`Show file tree`)}),ZA=D(`m54`,e=>A(e.a,`click`,function(){jN(e._,!e._.b3),De(e._.b3)})),QA=e=>{XA._(e),$e(e.b),Ne(e.b,14),Ae(e.b),ZA(e)},$A=b(2,e=>k(e.b,e._.cw.some(e=>e.unborn)?`No commits yet.`:e._.b2===`dirty`?`Nothing uncommitted.`:e._.cw.some(e=>e.pr)?`No file changes on these PRs.`:`No changes vs base.`)),ej=T(26,0,$A),tj=e=>{ej._(e),nj._(e),c(e.a,`_bG`)},nj=T(26,0,$A),rj=v(184,e=>k(e.b,e._._.b2===`committed`?``:`, showing uncommitted changes only`),e=>e._._),ij=e=>{rj(e),aj(e)},aj=v(5,e=>k(e.a,e._.e)),oj=ue(`m58`,`<!><!>.`,`%b%`,ij),sj=e=>{ve(e.a),le(e.a,oj(e)),ge(e.a,`warn`),h(e.a,`inline`),C(e.a),r(e.a),he(e.a),_t(e.a,{})},cj=(e,t)=>x(e.a,`${t}: base not found`),lj=(e,t)=>{cj(e,t[0]?.worktree),uj(e,t[0]?.base)},uj=w(4,f(aj)),dj=b(2,e=>k(e.b,e._.bc.trim()?`No matches in review.`:e._.b1&&!e._.ay?`Nothing changed since your last visit.`:`No files match "${e._.ay}".`),2),fj=T(26,1,dj),pj=e=>{fj._(e),mj._(e),hj._(e),c(e.a,`_bG`)},mj=T(26,1,dj),hj=T(26,1,dj),gj=v(180,e=>k(e.a,e._._.av),e=>e._._),_j=ue(`m57`,` `,` `,gj),vj=e=>{ve(e.a),le(e.a,_j(e)),he(e.a,wF(e)),C(e.a),r(e.a),ge(e.a),h(e.a),x(e.a),_t(e.a,{})},yj=T(6,0,e=>{k(e.b,e._.at),k(e.c,e._.at===1?``:`s`)}),bj=e=>{yj._(e),c(e.a,`_e4`)},Q=b(1,e=>dE(e.a,{repo:e._.c,files:e._.g,shownKeys:e._._.d7,collapsible:e._._.cx>1,collapsed:e._._.bg.has(e._.c?.id),expanding:e._._.bk.has(e._.c?.id),opened:e._._.bj.has(e._.c?.id),onToggle:FF(e),workspaceBranch:e._._.an||``,workspaceName:e._._.ao||``,localDiffers:e._._.di.has(e._.c?.id),onlyNew:e._._.b1,onToggleNew:PF(e),onReload:e._._.cr,loading:e._._.aw,findHit:e._._.be,commentsByFile:e._._.df,draft:e._._.au,sessions:e._._.am||[],observeNear:e._._.br,collapsedFiles:e._._.bh,onFileToggle:NF(e),onSelect:MF(e),onSaveComment:jF(e),onSendDraft:AF(e),onCancelDraft:kF(e),onDeleteComment:OF(e),onEditComment:DF(e),onSendComment:EF(e),onError:TF(e)}),25),xj=v(175,Q,e=>e._._),Sj=e=>{xj(e),Cj(e),wj(e),Tj(e),Ej(e),Dj(e),Oj(e),kj(e),Aj(e),jj(e),Mj(e),Nj(e),Pj(e),Fj(e),Ij(e),Lj(e),Rj(e),zj(e),Bj(e),Vj(e),Hj(e),Uj(e),Wj(e),Gj(e),Kj._(e),qj._(e),OT(e.a)},Cj=v(176,Q,e=>e._._),wj=v(177,Q,e=>e._._),Tj=v(179,Q,e=>e._._),Ej=v(181,Q,e=>e._._),Dj=v(183,Q,e=>e._._),Oj=v(188,Q,e=>e._._),kj=v(189,Q,e=>e._._),Aj=v(190,Q,e=>e._._),jj=v(191,Q,e=>e._._),Mj=v(192,Q,e=>e._._),Nj=v(193,Q,e=>e._._),Pj=v(194,Q,e=>e._._),Fj=v(195,Q,e=>e._._),Ij=v(197,Q,e=>e._._),Lj=v(199,Q,e=>e._._),Rj=v(201,Q,e=>e._._),zj=v(202,Q,e=>e._._),Bj=v(204,Q,e=>e._._),Vj=v(205,Q,e=>e._._),Hj=v(206,Q,e=>e._._),Uj=v(209,Q,e=>e._._),Wj=v(210,Q,e=>e._._),Gj=v(211,Q,e=>e._._),Kj=T(0,0,Q),qj=T(0,0,Q),Jj=w(6,e=>{tM(e,e.g.length),qj(e)}),Yj=b(4,e=>Jj(e,e._.dc.get(e.d)||[])),Xj=i(27,Yj),Zj=e=>{Xj._(e),eM._(e)},Qj=g(0,SS,(e=>`/${e}&`)(CS),Sj),$j=b(8,e=>Qj(e,e.h||e.f&&e._.dj?0:1),2),eM=i(27,$j),tM=w(7,$j),nM=w(3,Yj),rM=w(5,$j),iM=(e,t)=>aM(e,t[0]),aM=w(2,e=>{nM(e,e.c?.id),rM(e,e.c?.pr),Kj(e)}),oM=T(7,0,e=>Wn(e.b,e._.am)),sM=e=>{oM._(e),cM._(e),lM._(e),c(e.a,`_e3`),Rn(e.b)},cM=T(7,0,e=>Gn(e.b,e._.dw)),lM=T(7,0,e=>Kn(e.b,e._.dx)),uM=T(4,0,e=>u(e.a,`href`,`/w/${e._.a6}`)),dM=e=>{uM._(e),c(e.a,[at,`_e2`]),Ue(e.b),ie(e.b,14),s(e.b)},fM=(e,t)=>{hk(e.a2,t),OA(e.a3,t)},pM=w(141,f(Lj)),mM=(e,t)=>Ck(e.a2,t),hM=b(148,e=>mM(e,e.cw.filter(t=>(e.dd.get(t.id)||[]).length).map(t=>({id:t.id,label:t.pr?`${t.worktree} #${t.pr.number}`:t.worktree,files:e.dd.get(t.id)||[]})))),gM=w(147,hM),_M=b(145,e=>gM(e,e.d9(e.d4))),vM=w(138,e=>{RA(e.a3,e.d4),hF(e,e.d4?.length),pM(e,new Set(e.d4.map(e=>e.key))),_M(e)}),yM=b(137,e=>vM(e,e.d2?e.d1.filter(t=>e.d2.has(t.key)||t.key===e.bf):e.d1),2),bM=w(135,e=>{Bb(e.u,e.d1),yM(e)}),xM=b(133,e=>bM(e,(()=>{let t=jt(e.ay);return e.cy.filter(n=>t(n.key)&&(!e.b1||n.changedSince))})()),2),SM=w(146,Xj),CM=b(144,e=>SM(e,e.d9(e.cy))),wM=w(132,e=>{mF(e,e.cy?.length),fM(e,new Set(e.cy.filter(e=>e.changedSince).map(e=>e.key))),xM(e),CM(e)}),TM=w(152,f(zj)),EM=w(157,f(Bj)),DM=b(156,e=>EM(e,IF(e)),4),OM=w(169,f(Wj)),kM=b(165,e=>OM(e,LF(e)),4),AM=w(155,e=>{DM(e),kM(e)}),jM=_e(25,p,(e=>`/${e}&`)(tt),sj,lj),MM=_e(27,`<!><!><!>`,`b%`,Zj,iM),NM=w(130,e=>{pF(e,e.cw.length),wM(e,e.cw.flatMap(e=>e.files.map(t=>({...t,repo:e.id,key:`${e.worktree}/${t.path}`})))),TM(e,new Set(e.cw.filter(e=>!!e.pr&&!!e.localHead&&(e.localHead!==e.head||e.branch!==e.pr.headRefName)).map(e=>e.id))),AM(e,RF(e)),jM(e,[e.cw.filter(e=>e.baseMissing),`id`]),MM(e,[e.cw,`id`]),hM(e),nj(e)}),PM=D(`m61`,e=>S(e,{active:e.ah,load:e.ci,onMount:function(){let t=new AbortController,n={abort:t,loaded:!1,wasActive:!1,lastPr:e.ae||``,lastNonce:e.ai||0,lastFileNonce:e.aj||0,start:()=>{this.active&&!n.loaded&&(n.loaded=!0,this.load())}};return n.wasActive=!!this.active,mt().addEventListener(`review.changed`,t=>{n.loaded&&t.data?.workspaceId===e.a6&&e.cq()},{signal:t.signal}),mt().addEventListener(`status.changed`,t=>{if(!this.active||!n.loaded||e.aw)return;let r=t.data,i=r&&r[e.a6];if(!i)return;let a=At(i);!a||!e.cd||a===e.cd||e.ct()},{signal:t.signal}),window.addEventListener(`pagehide`,()=>{this.active&&n.loaded&&(e.cu(),e.ca())},{signal:t.signal}),document.addEventListener(`visibilitychange`,()=>{document.visibilityState===`hidden`&&this.active&&n.loaded&&e.ca()},{signal:t.signal}),n.start(),n},onUpdate:function(){this.start(),this.active&&this.loaded&&!this.wasActive&&(e.cr(),e.c3&&e.cb(e.c3)),!this.active&&this.loaded&&this.wasActive&&(e.cu(),e.ca()),this.wasActive=!!this.active;let t=e.ae||``,n=e.ai||0;this.loaded&&t&&n!==this.lastNonce?(this.lastNonce=n,this.lastPr=t,e.bv(t)):(this.lastPr=t,this.lastNonce=n);let r=e.aj||0;this.loaded&&e.af&&r!==this.lastFileNonce&&e.c0(e.af),this.lastFileNonce=r,e.a7&&e.a7!==e.b2&&e.cl(e.a7,!1)},onDestroy:function(){e.ce&&clearTimeout(e.ce),this.loaded&&(e.cu(),e.ca()),this.abort.abort()}})),$=b(129,PM,21),FM=b(120,e=>te(e,`s`,e.b2,zF(e))),IM=w(119,e=>{$(e),FM(e)}),LM=b(118,e=>IM(e,BF(e)),2),RM=w(127,$),zM=b(126,e=>RM(e,VF(e))),BM=f(Fj),VM=w(125,e=>{zM(e),$(e),BM(e)}),HM=b(117,e=>VM(e,HF(e))),UM=w(116,e=>{LM(e),HM(e),$(e)}),WM=b(115,e=>UM(e,UF(e)),8),GM=w(93,e=>{WM(e),$(e)}),KM=b(92,e=>GM(e,WF(e)),4),qM=w(108,$),JM=b(102,e=>qM(e,GF(e)),2),YM=w(128,$),XM=b(52,e=>YM(e,KF(e))),ZM=g(9,(e=>`<button>${e}</button>`)(qe),(e=>` D/${e}&l`)(Le),QA),QM=g(12,`<button title="Jump to file">Files (<!>)</button>`,` Db%`,YA),$M=g(21,(e=>`<button title="Find in review (⌘/Ctrl+F)" aria-label="Find in review">${e}</button>`)(Ee),(e=>` D/${e}&l`)(pt),KA),eN=w(153,e=>{ZM(e,+!e.dj),QM(e,+!e.dj),$M(e,+!e.dj),eM(e)}),tN=e=>{eN(e,!e.ap||e.d0>0)},nN=w(166,cM),rN=w(167,lM),iN=w(168,f(Uj)),aN=b(164,e=>{nN(e,qF(e)),rN(e,JF(e)),iN(e,YF(e))}),oN=w(163,e=>{aN(e),kM(e)}),sN=b(160,e=>oN(e,XF(e)),4),cN=g(24,`<div aria-hidden=true><div></div><div></div><div></div><div></div><div></div></div>`,` D b b b b `,UA),lN=b(59,e=>cN(e,!e.ap&&e.aw?0:1)),uN=g(26,`<p> </p>`,` D `,tj,`<p> </p>`,` D `,pj),dN=b(140,e=>uN(e,e.ap&&!e.d0?0:e.ap&&!e.d5&&!e.be?1:2),3),fN=E(51,e=>{NM(e,e.ap||[]),KM(e),JM(e),XM(e),tN(e),sN(e),lN(e),dN(e)}),pN=(e,t)=>{pk(e.a2,t),EA(e.a3,t)},mN=f(Rj),hN=w(149,e=>{pN(e,new Set(e.df.keys())),mN(e)}),gN=w(161,f(Vj)),_N=b(159,e=>gN(e,ZF(e))),vN=w(162,f(Hj)),yN=b(54,e=>vN(e,QF(e))),bN=E(53,e=>{hP(e,e.ar?.length),hN(e,(()=>{let t=new Map;for(let n of e.ar){let e=`${n.worktree}/${n.path}`;t.set(e,[...t.get(e)||[],n])}return t})()),DM(e),_N(e),yN(e),sN(e),aN(e)}),xN=f(Tj),SN=E(56,e=>{DM(e),kM(e),xN(e)}),CN=g(23,p,(e=>`/${e}&`)(tt),vj),wN=f(gj),TN=E(57,e=>{CN(e,+!e.av),wN(e)}),EN=f(Ej),DN=E(58,e=>{u(e.k,`disabled`,e.aw),ee(e.l,e.aw&&`_E`),u(e.o,`disabled`,e.aw),u(e.p,`disabled`,e.aw),u(e.q,`disabled`,e.aw),u(e.s,`disabled`,e.aw),$(e),lN(e),EN(e)}),ON=(e,t)=>{lk(e.a2,t),wA(e.a3,t)},kN=f(Dj),AN=E(63,e=>{xM(e),kN(e),mj(e)}),jN=E(65,e=>{bk(e.a2,e.b3),XA(e)}),MN=E(66,e=>yA(e.a3,e.b4)),NN=w(136,yM),PN=e=>{NN(e,e.bc.trim()?new Set(e.bd):null)},FN=E(73,e=>{UP(e,e.bb?.query),WP(e,e.bb?.keys),KP(e,e.bb?.hit),PN(e)}),IN=w(173,f(Gj)),LN=b(83,e=>IN(e,eI(e)),2),RN=f(kj),zN=E(78,e=>{QO(e.a2,e.bg),KM(e),LN(e),RN(e)}),BN=f(jj),VN=w(80,e=>{wk(e.a2,tI(e)),BN(e)}),HN=f(Aj),UN=E(79,e=>{Tk(e.a2,e.bh),VN(e,nI(e)),HN(e)}),WN=f(Mj),GN=E(81,e=>{nk(e.a2,e.bj),KM(e),LN(e),WN(e)}),KN=f(Nj),qN=E(82,e=>{LN(e),KN(e)}),JN=(e,t)=>{XP(e,t.cbs),ZP(e,t.io),QP(e,t.root)},YN=w(98,e=>{WM(e),$(e)}),XN=b(97,e=>YN(e,rI(e)),3),ZN=w(172,e=>Eb(e.u,iI(e))),QN=b(96,e=>ZN(e,aI(e))),$N=w(90,e=>{KM(e),XN(e),QN(e)}),eP=w(91,e=>{KM(e),XN(e)}),tP=w(95,e=>{XN(e),QN(e)}),nP=w(109,e=>{WM(e),$(e)}),rP=b(104,e=>nP(e,lI(e))),iP=w(94,e=>{tP(e,cI(e)),rP(e)}),aP=(e,t)=>{eF(e,t.raf),tF(e,t.anchor),nF(e,t.run)},oP=(e,t)=>{rF(e,t.sig),iF(e,t.timer)},sP=(e,t)=>aF(e,t.seq),cP=(e,t)=>lF(e,t.busy),lP=w(143,e=>{CM(e),_M(e)}),uP=w(154,e=>{DM(e),kM(e)}),dP=D(`m59`,e=>{A(e.k,`click`,function(){e.cr()}),A(e.o,`click`,function(){e.cl(`committed`)}),A(e.p,`click`,function(){e.cl(`working`)}),A(e.q,`click`,function(){e.cl(`dirty`)}),re(e,`s`),A(e.w,`scroll`,function(){e.c9()})});function fP(e){c(e.a,`_eV`),c(e.b,`_e0`),c(e.c,`_e1`),c(e.f,`_e5`),c(e.i,`_eZ`),c(e.k,[at,`_eX`]),oe(e.l),ne(e.l,14),c(e.n,`_fb`),c(e.r,[`_m`,`_fe`]),c(e.s,[`_n`,`_ff`]),Rb(e.u),pb(e.u,gI(e)),xb(e.u),Sb(e.u),Tb(e.u),c(e.w,`_e9`),dk(e.a2),$O(e.a2,hI(e)),rk(e.a2,mI(e)),e.a3,bA(e.a3,pI(e)),fN(e,null),bN(e,[]),SN(e,null),TN(e,null),DN(e,!1),ON(e,$F(e)),AN(e,!1),jN(e,Ie()),MN(e,!1),FN(e,{query:``,hit:null,keys:[]}),zN(e,new Set),UN(e,new Set),GN(e,new Set),qN(e,new Set),JN(e,{io:null,root:null,cbs:null}),$N(e,oI(e)),eP(e,sI),iP(e,uI(e)),aP(e,{anchor:null,raf:0,run:0}),oP(e,{sig:``,timer:0}),sP(e,{seq:0}),cP(e,{busy:0}),lP(e,dI),uP(e,fI),dP(e)}var pP=g(6,`<span><!> comment<!></span>`,` D%c%`,bj),mP=g(7,(e=>`<span>${e}</span>`)(pn),(e=>` D/${e}&l`)(mn),sM),hP=w(55,e=>{c(e.d,[`_fa`,{_e_:!e.at}]),pP(e,+!e.at),mP(e,+!e.at),yj(e)}),gP=D(`m63`,e=>{e.ay!==et(e.a6)&&Ce(e.a6,e.ay)}),_P=b(61,gP),vP=E(60,e=>{ck(e.a2,e.ay),CA(e.a3,e.ay),_P(e),xM(e),fj(e)}),yP=w(158,e=>{_N(e),sN(e)}),bP=w(124,$),xP=b(123,e=>bP(e,vI(e))),SP=w(32,e=>{vk(e.a2,e.a6),FA(e.a3,e.a6),vP(e,et(e.a6)),yP(e,_I(e)),_P(e),JM(e),WM(e),xP(e),XM(e),$(e),DM(e),yN(e),kM(e),uM(e)}),CP=w(107),wP=b(106,e=>CP(e,yI(e)),2),TP=w(105,wP),EP=f(rj),DP=E(64,e=>{c(e.o,[`_fd`,{_fc:e.b2===`committed`}]),u(e.o,`aria-pressed`,e.b2===`committed`?`true`:`false`),c(e.p,[`_fd`,{_fc:e.b2===`working`}]),u(e.p,`aria-pressed`,e.b2===`working`?`true`:`false`),c(e.q,[`_fd`,{_fc:e.b2===`dirty`}]),u(e.q,`aria-pressed`,e.b2===`dirty`?`true`:`false`),yk(e.a2,e.b2),IA(e.a3,e.b2),TP(e,bI(e)),WM(e),LM(e),HM(e),$(e),FM(e),EP(e),ej(e)}),OP=w(33,e=>{DP(e,e.a7??Re()),$(e)}),kP=m(67,e=>{c(e.t,[`_e8`,{_e7:!e.b5}]),fb(e.u,e.b5),WA(e)}),AP=b(36,e=>kP(e,e.a8,e.a9)),jP=w(34,AP),MP=w(35,AP),NP=D(`m62`,e=>{e.ab!=null&&e.ab!==e.b7&&zP(e,e.ab)}),PP=b(70,NP),FP=D(`m60`,e=>{e.ah&&window.addEventListener(`keydown`,t=>{!(t.metaKey||t.ctrlKey)||t.altKey||t.shiftKey||t.key.toLowerCase()===`f`&&(t.target instanceof HTMLTextAreaElement||(t.preventDefault(),e.e0()))},{capture:!0,signal:ft(e,0)})}),IP=b(171,e=>{me(e,0),FP(e)}),LP=w(170,IP),RP=b(72,e=>LP(e,xI(e))),zP=E(69,e=>{Jb(e.u,e.b7),PP(e),RP(e)}),BP=w(37,e=>{zP(e,e.ab||0),PP(e)}),VP=w(71,e=>{qb(e.u,e.b9),RP(e)}),HP=(e,t)=>VP(e,t||{focus:SI}),UP=w(74,hj),WP=w(75),GP=f(Oj),KP=w(76,e=>{qP(e,e.be?.key),dN(e),GP(e)}),qP=w(77,yM),JP=w(89),YP=b(88,e=>JP(e,CI(e)),2),XP=w(85,YP),ZP=w(86,YP),QP=w(87,YP),$P=w(39,XN),eF=w(100,wP),tF=w(101,e=>{wP(e),JM(e),$(e)}),nF=w(103,rP),rF=w(111,e=>{WM(e),$(e)}),iF=w(112,e=>{zM(e),$(e)}),aF=w(114,WM),oF=w(40,e=>{WM(e),$(e)}),sF=w(41,e=>{WM(e),$(e)}),cF=w(42,LM),lF=w(122,e=>{xP(e),sN(e)}),uF=w(43,e=>{$(e),IP(e)}),dF=w(44,$),fF=w(45,$),pF=w(131,f(Ij)),mF=w(134,e=>{jA(e.a3,e.d0),dN(e)}),hF=w(139,e=>{dN(e),qA(e)}),gF=w(46,sN),_F=g(4,(e=>`<a title="Back to terminal (Esc)">${e}</a>`)(t),(e=>` D/${e}&l`)(Ve),dM),vF=(e,t)=>_F(e,+!t),yF=(e,t)=>{SP(e,t.workspaceId),OP(e,t.scope),jP(e,t.findOpen),MP(e,t.findOpenChange),BP(e,t.findTick),HP(e,t.findFocusRef),$P(e,t.onFileChange),oF(e,t.focusPr),sF(e,t.focusFile),cF(e,t.onScopeChange),uF(e,t.active),dF(e,t.focusNonce),fF(e,t.focusFileNonce),gF(e,t.onSent),vF(e,t.onExit),xF(e,t.sessions),SF(e,t.workspaceBranch),CF(e,t.workspaceName)},bF=f(xj),xF=w(48,e=>{oM(e),bF(e)}),SF=w(49,f(Cj)),CF=w(50,f(wj)),wF=e=>function(){TN(e._,null)},TF=e=>function(t){TN(e._._,t)},EF=e=>function(t,n){e._._.dy(t,n)},DF=e=>function(t,n){e._._.ds(t,n)},OF=e=>function(t){e._._.dr(t)},kF=e=>function(){SN(e._._,null)},AF=e=>function(t,n,r){e._._.dz(t,n,r)},jF=e=>function(t,n){e._._.dn(t,n)},MF=e=>function(t,n){SN(e._._,{key:t.key,side:n.side||`additions`,start:Math.min(n.start,n.end),end:Math.max(n.start,n.end)})},NF=e=>function(t,n){e._._.bi([t],!n)},PF=e=>function(){AN(e._._,!e._._.b1)},FF=e=>function(){e._._.e3(e._.c?.id)},IF=e=>async(t,n)=>{let r=e.au;if(SN(e,null),r)try{let i=await fe(`/api/workspaces/${e.a6}/review`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({action:`comment`,worktree:e.dk(t.repo),path:t.path,side:r.side,line_start:r.start,line_end:r.end,text:n.trim(),...e.dl(t,r)})});bN(e,e.ar.concat(i))}catch(t){TN(e,String(t.message||t))}},LF=e=>(t,n,r)=>{let i=e.au,a=n.trim();if(!i||!a)return Promise.resolve(!1);let o={id:-1,workspace_id:e.a6,worktree:e.dk(t.repo),path:t.path,side:i.side===`deletions`?`deletions`:`additions`,line_start:i.start,line_end:i.end,text:a,created_at:``,...e.dl(t,i)};return e.dt([o],{session:r},[])},RF=e=>(t,n)=>{let r=e.cw.find(e=>e.id===t.repo),i=n.side===`deletions`?t.old:t.new;return{head:r?.head,snippet:i==null?void 0:cn(i,n.start,n.end,n.side===`deletions`?`deletions`:`additions`)}},zF=e=>function(t){e.cl(t)},BF=e=>(t,n=!0)=>{t!==e.b2&&(DP(e,t),n&>(t),e.ag?.(t),e.ci(t))},VF=e=>()=>{e.ce&&clearTimeout(e.ce),e.ce=setTimeout(()=>{e.ce=0,e.cr()},250)},HF=e=>()=>e.ci(e.b2,!0),UF=e=>async(t=e.b2,n=!1)=>{let r=++e.cg;DN(e,!0),TN(e,null);try{let i=new URLSearchParams;t!==`committed`&&i.set(`scope`,t),n&&i.set(`refresh`,`1`);let a=i.size?`?${i}`:``,[o,s]=await Promise.all([fe(`/api/workspaces/${e.a6}/diff${a}`),fe(`/api/workspaces/${e.a6}/review`)]);if(r!==e.cg)return;if(fN(e,o),bN(e,s.comments||[]),e.cd=kt(o),e.ae)e.bv(e.ae);else if(e.af)e.c0(e.af);else if(!n&&e.cg===1){let n=Je(e.a6);n&&n.scope===t&&e.cb(n)}}catch(t){if(r!==e.cg)return;TN(e,String(t.message||t))}finally{r===e.cg&&DN(e,!1)}},WF=e=>t=>{if(!t)return;let n=e.ap||[],r=n.find(e=>e.pr&&`${e.worktree}/${e.pr.number}`===t),i=new Set(e.bj);for(let t of n)e.bg.has(t.id)||i.add(t.id);r&&i.add(r.id),GN(e,i);let a=new Set;for(let e of n)(!r||e.id!==r.id)&&a.add(e.id);zN(e,a),qN(e,new Set),e.bt(()=>{let n=e.w?.querySelector(`[data-pr="${CSS.escape(t)}"]`);return n&&e.bs(n),!!n})},GF=e=>()=>{e.ap&&ut(e.a6,e.c3)},KF=e=>()=>{if(!e.ap)return;let t={},n={};for(let r of e.ap){(!t[r.worktree]||!r.pr)&&(t[r.worktree]=r.head);for(let e of r.files)e.hash&&(n[`${r.worktree}/${e.path}`]=e.hash)}fetch(`/api/workspaces/${e.a6}/review`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({action:`seen`,heads:t,dirty:n}),keepalive:!0}).catch(()=>{})},qF=e=>()=>e.dt(e.ar,{clipboard:!0},`all`),JF=e=>t=>e.dt(e.ar,{session:t},`all`),YF=e=>(t,n)=>{let r=e.ar.find(e=>e.id===t);return r?e.dt([r],{session:n},[t]):Promise.resolve(!1)},XF=e=>async(t,n,r)=>{if(!t.length)return!0;e.co++;try{let i=rn(t,e.ap);if(`clipboard`in n){if(!await st(i))return TN(e,`Copy failed: the clipboard needs HTTPS in this browser.`),!1}else await fe(`/api/sessions/${n.session}/send`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({text:`Please address this review feedback, then summarize what you changed.\n\n${i}`,...Ge()||{}})}),e.ak?.(n.session);if(SN(e,null),r===`all`)bN(e,[]);else{let t=new Set(r);bN(e,e.ar.filter(e=>!t.has(e.id)))}return(r===`all`||r.length)&&await e.do(r).catch(()=>{}),!0}catch(t){return TN(e,String(t.message||t)),!1}finally{e.co--}},ZF=e=>async t=>{bN(e,e.ar.filter(e=>e.id!==t)),await e.do([t]).catch(()=>{})},QF=e=>async(t,n)=>{let r=e.ar.find(e=>e.id===t);if(!r)return;let i=n.trim();if(!(!i||i===r.text)){bN(e,e.ar.map(e=>e.id===t?{...e,text:i}:e));try{await fe(`/api/workspaces/${e.a6}/review/${t}`,{method:`PATCH`,headers:{"content-type":`application/json`},body:JSON.stringify({text:i})})}catch(n){throw bN(e,e.ar.map(e=>e.id===t?r:e)),TN(e,String(n.message||n)),n}}},$F=e=>t=>{vP(e,t)},eI=e=>t=>{if(e.bk.has(t)){let n=new Set(e.bk);n.delete(t),qN(e,n),e.bg.has(t)||zN(e,new Set([...e.bg,t]));return}if(e.bg.has(t)){if(e.bj.has(t)){let n=new Set(e.bg);n.delete(t),zN(e,n);return}qN(e,new Set([...e.bk,t])),requestAnimationFrame(()=>{requestAnimationFrame(()=>{if(!e.bk.has(t))return;let n=new Set(e.bg);n.delete(t),zN(e,n);let r=new Set(e.bk);r.delete(t),qN(e,r)})})}else GN(e,new Set([...e.bj,t])),zN(e,new Set([...e.bg,t]))},tI=e=>function(t,n){e.bi(t,n)},nI=e=>(t,n)=>{let r=new Set(e.bh);for(let e of t)n?r.add(e):r.delete(e);(r.size!==e.bh?.size||[...r].some(t=>!e.bh.has(t)))&&UN(e,r)},rI=e=>t=>{e.ad?.(t),e.bt(()=>{let n=e.bx(t);return n&&e.bs(n),!!n})},iI=e=>function(t){e.e2(t)},aI=e=>t=>{if(FN(e,t),!t.hit)return;let n=t.hit;setTimeout(()=>{let r=e.bx(n.key);if(r){if(n.line<1){e.bs(r);return}Bt(t.query,n),Vt()}},0)},oI=e=>t=>{let n=e.w;if(!n){t.scrollIntoView({block:`start`});return}let r=t.getBoundingClientRect().top-n.getBoundingClientRect().top+n.scrollTop;n.scrollTo({top:Math.max(0,r-8)})};function sI(e,t=2500){let n=Date.now(),r=()=>{!e()&&Date.now()-n<t&&requestAnimationFrame(r)};r()}var cI=e=>t=>{let n=e.bw(t);return n&&(n.open=!0),n},lI=e=>t=>{let n=++e.c5,r=Date.now(),i=0,a=()=>{e.c5===n&&e.c5++},o=()=>{if(e.c5!==n)return;let s=e.w,c=e.bw(t.key);if(s&&c){let e=c.getBoundingClientRect().top-s.getBoundingClientRect().top+t.off;if(Math.abs(e)>1&&(s.scrollTop+=e),!i){i=Date.now();for(let e of[`wheel`,`touchstart`,`keydown`])s.addEventListener(e,a,{once:!0,passive:!0})}Date.now()-i<1500&&requestAnimationFrame(o)}else!i&&Date.now()-r<2500&&requestAnimationFrame(o)};requestAnimationFrame(o)},uI=e=>t=>e.w?.querySelector(`details[data-key="${CSS.escape(t)}"]`)??null;function dI(e){let t=new Map;for(let n of e){let e=t.get(n.repo);e?e.push(n):t.set(n.repo,[n])}return t}function fI(e){return e.includes(`#`)?e.split(`#`)[0]:e}var pI=e=>t=>{MN(e,t)},mI=e=>t=>{GN(e,t)},hI=e=>t=>{zN(e,t)},gI=e=>t=>{kP(e,t)},_I=e=>t=>t===`all`?fetch(`/api/workspaces/${e.a6}/review`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({action:`clear`})}):Promise.all(t.map(t=>fetch(`/api/workspaces/${e.a6}/review/${t}`,{method:`DELETE`}))),vI=e=>async()=>{if(!e.co)try{let t=await fe(`/api/workspaces/${e.a6}/review`);if(e.co)return;bN(e,t.comments||[])}catch{}},yI=e=>()=>{e.c2||=requestAnimationFrame(()=>{e.c2=0,e.w?.isConnected&&(e.c3=e.c7())})},bI=e=>()=>{let t=e.w;if(!t||!t.scrollTop)return null;let n=t.getBoundingClientRect().top,r=null;for(let i of t.querySelectorAll(`details[data-key]`)){if(i.hidden)continue;let t=i.getBoundingClientRect().top;if(t>n+1)break;r={scope:e.b2,key:i.dataset.key,off:Math.round(n-t)}}return r},xI=e=>()=>{kP(e,!0),zP(e,+e.b7+1),e.b9.focus()};function SI(){}var CI=e=>(t,n)=>{e.bn??=new WeakMap,e.bn.set(t,n);let r=e.w||null;(!e.bo||e.bp!==r)&&(e.bo?.disconnect(),e.bp=r,e.bo=new IntersectionObserver(t=>{for(let n of t)n.isIntersecting&&(e.bo.unobserve(n.target),e.bn.get(n.target)?.())},{root:r,rootMargin:`800px 0px`})),e.bo.observe(t),requestAnimationFrame(()=>{if(!t.isConnected)return;let r=e.w,i=t.getBoundingClientRect(),a=r?r.getBoundingClientRect():{top:0,bottom:window.innerHeight};i.bottom>=a.top-800&&i.top<=a.bottom+800&&(e.bo?.unobserve(t),n())})};O(`m38`,wF),O(`m49`,TF),O(`m48`,EF),O(`m47`,DF),O(`m46`,OF),O(`m45`,kF),O(`m44`,AF),O(`m43`,jF),O(`m42`,MF),O(`m41`,NF),O(`m40`,PF),O(`m39`,FF),O(`m24`,IF),O(`m32`,LF),O(`m23`,RF),O(`m0`,zF),O(`m16`,BF),O(`m19`,VF),O(`m18`,HF),O(`m15`,UF),O(`m7`,WF),O(`m13`,GF),O(`m20`,KF),O(`m29`,qF),O(`m30`,JF),O(`m31`,YF),O(`m28`,XF),O(`m26`,ZF),O(`m27`,QF),O(`m1`,$F),O(`m35`,eI),O(`m52`,tI),O(`m3`,nI),O(`m10`,rI),O(`m37`,iI),O(`m34`,aI),O(`m5`,oI),O(`m6`,sI),O(`m9`,cI),O(`m14`,lI),O(`m8`,uI),O(`m21`,dI),O(`m22`,fI),O(`m53`,pI),O(`m51`,mI),O(`m50`,hI),O(`m36`,gI),O(`m25`,_I),O(`m17`,vI),O(`m12`,yI),O(`m11`,bI),O(`m33`,xI),O(`m2`,SI),O(`m4`,CI);var wI=o(`m`,VA,HA,fP,yF);export{wI as default,Et as t};
|