@dylanpiercey/work 0.0.194 → 0.0.195
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/bin/work.mjs +72 -70
- package/dist/index.mjs +544 -461
- package/dist/public/assets/{_DD16BGvo.js → _0h0AIzFj.js} +1 -1
- package/dist/public/assets/_0h0AIzFj.js.br +0 -0
- package/dist/public/assets/_0za8Cr1n.js +1 -0
- package/dist/public/assets/{_DS1wABH-.js → _18epjYOV.js} +1 -1
- package/dist/public/assets/_18epjYOV.js.br +0 -0
- package/dist/public/assets/_3xkbncP_.js +1 -0
- package/dist/public/assets/_4HZDmYgs.js +1 -0
- package/dist/public/assets/{_ZYpoEyN8.js → _AiyczSWt.js} +1 -1
- package/dist/public/assets/_AiyczSWt.js.br +0 -0
- package/dist/public/assets/_AuCIj6im.js +1 -0
- package/dist/public/assets/{_4upXK7xi.js → _B46lef50.js} +1 -1
- package/dist/public/assets/_B46lef50.js.br +0 -0
- package/dist/public/assets/{_BGp6KcCQ.js → _B8MJcLaM.js} +1 -1
- package/dist/public/assets/_B8MJcLaM.js.br +0 -0
- package/dist/public/assets/{_IJNr37kx.js → _BAP6pe7u.js} +1 -1
- package/dist/public/assets/_BAP6pe7u.js.br +0 -0
- package/dist/public/assets/{_iBVWvD0A.js → _BAlyV91f.js} +1 -1
- package/dist/public/assets/_BAlyV91f.js.br +0 -0
- package/dist/public/assets/_BBR_LwBj.js +1 -0
- package/dist/public/assets/_BF_doyRg.js +1 -0
- package/dist/public/assets/_BFfXXja-.js +1 -0
- package/dist/public/assets/{_CnzQ4juf.js → _BJy_w8mx.js} +1 -1
- package/dist/public/assets/_BJy_w8mx.js.br +0 -0
- package/dist/public/assets/{_CGzFAUY6.js → _BMR6K6ZH.js} +1 -1
- package/dist/public/assets/_BMR6K6ZH.js.br +0 -0
- package/dist/public/assets/_BN9FKcnK.js +1 -0
- package/dist/public/assets/{_AZWrS2Jm.js → _BOc-526n.js} +1 -1
- package/dist/public/assets/_BOc-526n.js.br +0 -0
- package/dist/public/assets/_BR0iuQr9.js +1 -0
- package/dist/public/assets/{_-5VRB-d8.js → _BRObdg0l.js} +1 -1
- package/dist/public/assets/_BRObdg0l.js.br +0 -0
- package/dist/public/assets/{_BtL0sglJ.js → _BRSKw1cV.js} +1 -1
- package/dist/public/assets/_BRSKw1cV.js.br +0 -0
- package/dist/public/assets/{_CR72KzUy.js → _BRphDJH_.js} +1 -1
- package/dist/public/assets/_BRphDJH_.js.br +0 -0
- package/dist/public/assets/{_DdXJJzzZ.js → _BUWvw-TH.js} +1 -1
- package/dist/public/assets/_BUWvw-TH.js.br +0 -0
- package/dist/public/assets/_BWLfnp5O.js +1 -0
- package/dist/public/assets/_BYkdEfpP.js +1 -0
- package/dist/public/assets/_BZ6hXL2R.js +1 -0
- package/dist/public/assets/_BZd_Xfcs.js +1 -0
- package/dist/public/assets/{_D875Kcfa.js → _Bb8mR-HM.js} +1 -1
- package/dist/public/assets/_Bb8mR-HM.js.br +0 -0
- package/dist/public/assets/{_DdOHjgo4.js → _BdAMRKrG.js} +1 -1
- package/dist/public/assets/_BdAMRKrG.js.br +0 -0
- package/dist/public/assets/{_DDOtP_nf.js → _BdDLH1XV.js} +1 -1
- package/dist/public/assets/_BdDLH1XV.js.br +0 -0
- package/dist/public/assets/{_EH5vEr2e.js → _BhWv3wNf.js} +1 -1
- package/dist/public/assets/_BhWv3wNf.js.br +0 -0
- package/dist/public/assets/{_Ci6csctL.js → _BlzNrz3K.js} +1 -1
- package/dist/public/assets/_BlzNrz3K.js.br +0 -0
- package/dist/public/assets/_BmraoyEp.js +1 -0
- package/dist/public/assets/{_dN2Rs1x8.js → _BnV94dO7.js} +1 -1
- package/dist/public/assets/_BnV94dO7.js.br +0 -0
- package/dist/public/assets/{_BFgcLXyz.js → _BpzaSD-m.js} +1 -1
- package/dist/public/assets/_BpzaSD-m.js.br +0 -0
- package/dist/public/assets/{_C98LcKxW.js → _Bs1kE95N.js} +4 -4
- package/dist/public/assets/_Bs1kE95N.js.br +0 -0
- package/dist/public/assets/_BsdHIscx.js +1 -0
- package/dist/public/assets/_BtICabTK.js +1 -0
- package/dist/public/assets/_BtZUbiKy.js +1 -0
- package/dist/public/assets/{_Cez0GncF.js → _Bw3gx4-Q.js} +1 -1
- package/dist/public/assets/_Bw3gx4-Q.js.br +0 -0
- package/dist/public/assets/_BwzlI7lz.js +1 -0
- package/dist/public/assets/{_B-Uq1tN8.js → _Bx6eTqoq.js} +1 -1
- package/dist/public/assets/{_Dzg96yJW.js → _C-1cKTkv.js} +1 -1
- package/dist/public/assets/_C-1cKTkv.js.br +0 -0
- package/dist/public/assets/_C1AI3pME.js +1 -0
- package/dist/public/assets/{_RymhJ-oH.js → _C3I-Anub.js} +1 -1
- package/dist/public/assets/_C3I-Anub.js.br +0 -0
- package/dist/public/assets/_C3MZsvvL.js +1 -0
- package/dist/public/assets/{_CyH7-G4O.js → _C41zuCzJ.js} +3 -3
- package/dist/public/assets/_C41zuCzJ.js.br +0 -0
- package/dist/public/assets/{_CT1Gdljn.js → _C4mnN_oZ.js} +1 -1
- package/dist/public/assets/_C4mnN_oZ.js.br +0 -0
- package/dist/public/assets/{_B1t_3R3E.js → _C55Vt4KA.js} +1 -1
- package/dist/public/assets/_C55Vt4KA.js.br +0 -0
- package/dist/public/assets/{_DL37mEnd.js → _C5YR9YJh.js} +1 -1
- package/dist/public/assets/_C5YR9YJh.js.br +0 -0
- package/dist/public/assets/{_BXfOoEFL.js → _C683mkqv.js} +1 -1
- package/dist/public/assets/_C683mkqv.js.br +0 -0
- package/dist/public/assets/_CA_mP0vg.js +1 -0
- package/dist/public/assets/{_BuGdTsCt.js → _CB4KzoDJ.js} +1 -1
- package/dist/public/assets/_CB4KzoDJ.js.br +0 -0
- package/dist/public/assets/_CBCt9rbU.js +1 -0
- package/dist/public/assets/{_CsuGx1ff.js → _CCDxcQQY.js} +1 -1
- package/dist/public/assets/_CCDxcQQY.js.br +0 -0
- package/dist/public/assets/_CDvfsA-P.js +1 -0
- package/dist/public/assets/_CIeJf4eB.js +1 -0
- package/dist/public/assets/{_BFU2lAlj.js → _CIjkAiih.js} +1 -1
- package/dist/public/assets/{_CuyX02Pl.js → _CLiSZPPg.js} +1 -1
- package/dist/public/assets/_CLiSZPPg.js.br +0 -0
- package/dist/public/assets/{_ZsJ1B5tS.js → _CNxXQqXS.js} +1 -1
- package/dist/public/assets/_CNxXQqXS.js.br +0 -0
- package/dist/public/assets/{_BD5eb9JF.js → _CODFsVds.js} +1 -1
- package/dist/public/assets/_CODFsVds.js.br +0 -0
- package/dist/public/assets/{_UlVjGC9v.js → _CPKZgGBI.js} +4 -4
- package/dist/public/assets/_CPKZgGBI.js.br +0 -0
- package/dist/public/assets/{_VCUJ4E0Z.js → _CW2a9XvK.js} +1 -1
- package/dist/public/assets/_CW2a9XvK.js.br +0 -0
- package/dist/public/assets/{_C-_9s2XH.js → _CWMJH-rn.js} +1 -1
- package/dist/public/assets/_CWMJH-rn.js.br +0 -0
- package/dist/public/assets/{_DeGNETkV.js → _CXxKcxHR.js} +1 -1
- package/dist/public/assets/_CXxKcxHR.js.br +0 -0
- package/dist/public/assets/{_94VO1H1D.js → _CZeIAKZQ.js} +1 -1
- package/dist/public/assets/_CZeIAKZQ.js.br +0 -0
- package/dist/public/assets/{_CIQLqWPr.js → _CakhbveI.js} +1 -1
- package/dist/public/assets/_CakhbveI.js.br +0 -0
- package/dist/public/assets/{_DvgXuM5Z.js → _CcEehkYP.js} +1 -1
- package/dist/public/assets/_CcEehkYP.js.br +0 -0
- package/dist/public/assets/{_MITe5BKM.js → _CdU5S35_.js} +2 -2
- package/dist/public/assets/_CdU5S35_.js.br +0 -0
- package/dist/public/assets/{_hNtFhi2H.js → _Cgb2RJJJ.js} +1 -1
- package/dist/public/assets/_Cgb2RJJJ.js.br +0 -0
- package/dist/public/assets/{_AGSf1cOD.js → _CjKem1sO.js} +1 -1
- package/dist/public/assets/_CjKem1sO.js.br +0 -0
- package/dist/public/assets/_CjKzx4Md.js +1 -0
- package/dist/public/assets/_Ck7MmnzY.js +1 -0
- package/dist/public/assets/{_lTtrjH_y.js → _CnCRB0XK.js} +1 -1
- package/dist/public/assets/_CnCRB0XK.js.br +0 -0
- package/dist/public/assets/{_CCrALKLA.js → _CoJxQd1B.js} +1 -1
- package/dist/public/assets/_CoJxQd1B.js.br +0 -0
- package/dist/public/assets/_Coao3E79.js +1 -0
- package/dist/public/assets/_Cpg5MJ_u.js +1 -0
- package/dist/public/assets/{_oQDS6HaL.js → _CrQmOSDl.js} +1 -1
- package/dist/public/assets/_CsWug15t.js +1 -0
- package/dist/public/assets/_CvQswCKM.js +1 -0
- package/dist/public/assets/_Cvw22lZx.js +1 -0
- package/dist/public/assets/{_C70n3Uh0.js → _CzbgKank.js} +1 -1
- package/dist/public/assets/_CzbgKank.js.br +0 -0
- package/dist/public/assets/{_CHHD69iN.js → _CzfZbwGO.js} +1 -1
- package/dist/public/assets/_CzfZbwGO.js.br +0 -0
- package/dist/public/assets/{_DTTu8ZoT.js → _D-97toYv.js} +1 -1
- package/dist/public/assets/_D-97toYv.js.br +0 -0
- package/dist/public/assets/_D1RANegM.js +1 -0
- package/dist/public/assets/_D4eqQKOn.js +1 -0
- package/dist/public/assets/{_D0FsS7fp.js → _D78Rmq5N.js} +1 -1
- package/dist/public/assets/_D78Rmq5N.js.br +0 -0
- package/dist/public/assets/{_D0_HRw9h.js → _DA-0s5a6.js} +1 -1
- package/dist/public/assets/_DA-0s5a6.js.br +0 -0
- package/dist/public/assets/{_BLDfMNIY.js → _DBgXUlmC.js} +1 -1
- package/dist/public/assets/_DBgXUlmC.js.br +0 -0
- package/dist/public/assets/{_DBXzGyX_.js → _DDXMnJp1.js} +1 -1
- package/dist/public/assets/_DDXMnJp1.js.br +0 -0
- package/dist/public/assets/{_BqDr3Tw4.js → _DECvFD3C.js} +1 -1
- package/dist/public/assets/_DECvFD3C.js.br +0 -0
- package/dist/public/assets/{_DfPcMMq-.js → _DG3lNhs6.js} +1 -1
- package/dist/public/assets/_DG3lNhs6.js.br +0 -0
- package/dist/public/assets/{_7VnEzO6q.js → _DHUfylTf.js} +1 -1
- package/dist/public/assets/_DHUfylTf.js.br +0 -0
- package/dist/public/assets/{_81bytH-7.js → _DIqCp0Dr.js} +1 -1
- package/dist/public/assets/_DIqCp0Dr.js.br +0 -0
- package/dist/public/assets/{_RBcjVTtc.js → _DKA87yrO.js} +1 -1
- package/dist/public/assets/_DKA87yrO.js.br +0 -0
- package/dist/public/assets/{_C2pCQFbc.js → _DOgiz2sq.js} +1 -1
- package/dist/public/assets/_DOgiz2sq.js.br +0 -0
- package/dist/public/assets/{_BaGCGJ3V.js → _DP2LKafM.js} +1 -1
- package/dist/public/assets/_DP2LKafM.js.br +0 -0
- package/dist/public/assets/{_BHpWtqGi.js → _DPzxebn1.js} +1 -1
- package/dist/public/assets/_DPzxebn1.js.br +0 -0
- package/dist/public/assets/{_Bpjh_GiT.js → _DQb-Prlp.js} +1 -1
- package/dist/public/assets/_DR6o0ihU.js +1 -0
- package/dist/public/assets/_DRMBZW5C.js +1 -0
- package/dist/public/assets/_DS2o6oMD.js +1 -0
- package/dist/public/assets/{_DjNrP2xy.js → _DU3Vsw3V.js} +1 -1
- package/dist/public/assets/_DUqZ0WL5.js +1 -0
- package/dist/public/assets/{_DUprEXi6.js → _Dc2TbKDN.js} +1 -1
- package/dist/public/assets/_Dc2TbKDN.js.br +0 -0
- package/dist/public/assets/_Dc56XaC3.js +1 -0
- package/dist/public/assets/{_CwRY7vN8.js → _DcDGku3c.js} +1 -1
- package/dist/public/assets/_DcDGku3c.js.br +0 -0
- package/dist/public/assets/_DdR4vgZH.js +1 -0
- package/dist/public/assets/{_CWkeO0Fk.js → _De3Bqgjq.js} +1 -1
- package/dist/public/assets/_De3Bqgjq.js.br +0 -0
- package/dist/public/assets/{_CGI1BtkI.js → _DfQw6r-m.js} +1 -1
- package/dist/public/assets/_DfQw6r-m.js.br +0 -0
- package/dist/public/assets/_DgX_vew2.js +1 -0
- package/dist/public/assets/{_CgljKJDn.js → _DiZR5A2Z.js} +1 -1
- package/dist/public/assets/_DiZR5A2Z.js.br +0 -0
- package/dist/public/assets/{_C5HEiR3-.js → _Dl_aiyLq.js} +1 -1
- package/dist/public/assets/_Dl_aiyLq.js.br +0 -0
- package/dist/public/assets/_DnChB8C1.js +1 -0
- package/dist/public/assets/_Dq32gZSy.js +1 -0
- package/dist/public/assets/{_CIvfn_vo.js → _Ds8cRiqE.js} +1 -1
- package/dist/public/assets/_Ds8cRiqE.js.br +0 -0
- package/dist/public/assets/{_UDN-Kw2b.js → _DtkWFnwh.js} +1 -1
- package/dist/public/assets/_DtkWFnwh.js.br +0 -0
- package/dist/public/assets/_DuzGrmQ5.js +1 -0
- package/dist/public/assets/{_BMAKFvwT.js → _F4wO2bpH.js} +1 -1
- package/dist/public/assets/_F4wO2bpH.js.br +0 -0
- package/dist/public/assets/_HOdpMHxl.js +1 -0
- package/dist/public/assets/{_DOiJubUI.js → _IKyWRqQj.js} +1 -1
- package/dist/public/assets/_IKyWRqQj.js.br +0 -0
- package/dist/public/assets/_KRVYITR_.js +1 -0
- package/dist/public/assets/{_Cpwq78LC.js → _LVs8hGnf.js} +1 -1
- package/dist/public/assets/_LVs8hGnf.js.br +0 -0
- package/dist/public/assets/{_DNaxiSse.js → _LyXyKVdu.js} +1 -1
- package/dist/public/assets/_LyXyKVdu.js.br +0 -0
- package/dist/public/assets/{_BbKk7fzo.js → _Qp3bXDzX.js} +2 -2
- package/dist/public/assets/_Qp3bXDzX.js.br +0 -0
- package/dist/public/assets/{_C8F-ulr0.js → _U49daapm.js} +1 -1
- package/dist/public/assets/_U49daapm.js.br +0 -0
- package/dist/public/assets/{_D_y2aFw-.js → _W5nLbLR0.js} +1 -1
- package/dist/public/assets/_W5nLbLR0.js.br +0 -0
- package/dist/public/assets/{_DvhcOREH.js → _YChD2z1e.js} +1 -1
- package/dist/public/assets/_YChD2z1e.js.br +0 -0
- package/dist/public/assets/{_C3EwuwTS.js → _ZKNPt6D-.js} +1 -1
- package/dist/public/assets/_ZKNPt6D-.js.br +0 -0
- package/dist/public/assets/{_Cku0OZEV.js → _Z_elapBC.js} +1 -1
- package/dist/public/assets/_Z_elapBC.js.br +0 -0
- package/dist/public/assets/_ZrI-bccm.js +1 -0
- package/dist/public/assets/{_C9CagP3D.js → __3UGRi5e.js} +1 -1
- package/dist/public/assets/__3UGRi5e.js.br +0 -0
- package/dist/public/assets/__VmSq1gY.js +1 -0
- package/dist/public/assets/_acWElTft.js +1 -0
- package/dist/public/assets/{_BYQ1qFAr.js → _awPDUP7f.js} +1 -1
- package/dist/public/assets/_awPDUP7f.js.br +0 -0
- package/dist/public/assets/{_CWzZgLRl.js → _b5I_nxEK.js} +1 -1
- package/dist/public/assets/_b5I_nxEK.js.br +0 -0
- package/dist/public/assets/_bkGAJhVw.js +1 -0
- package/dist/public/assets/{_De_ipH7W.js → _dLObuZst.js} +1 -1
- package/dist/public/assets/_dLObuZst.js.br +0 -0
- package/dist/public/assets/_fLtBkEgC.js +1 -0
- package/dist/public/assets/{_CnIqepEi.js → _fxmXMnQo.js} +1 -1
- package/dist/public/assets/_fxmXMnQo.js.br +0 -0
- package/dist/public/assets/_k6RGMQOn.js +1 -0
- package/dist/public/assets/{_DUoMqwhS.js → _ktZqvcQv.js} +1 -1
- package/dist/public/assets/{_DGwvafH8.js → _lNS9HyGM.js} +1 -1
- package/dist/public/assets/_lNS9HyGM.js.br +0 -0
- package/dist/public/assets/_m6mY1g2k.js +1 -0
- package/dist/public/assets/{_Cp2aP4_b.js → _n9oRx7Ms.js} +1 -1
- package/dist/public/assets/_n9oRx7Ms.js.br +0 -0
- package/dist/public/assets/_ne68jIT3.js +1 -0
- package/dist/public/assets/_o7EZS1PU.js +1 -0
- package/dist/public/assets/{_D72YKK3J.js → _pk73RhvL.js} +1 -1
- package/dist/public/assets/_pk73RhvL.js.br +0 -0
- package/dist/public/assets/_pnS1VR4S.js +1 -0
- package/dist/public/assets/_rngmM1WE.js +1 -0
- package/dist/public/assets/{_BUi_qcC9.js → _sA9LOck8.js} +1 -1
- package/dist/public/assets/_sA9LOck8.js.br +0 -0
- package/dist/public/assets/_tjCTuAiB.js +1 -0
- package/dist/public/assets/{_DarXw3BK.js → _v2hjUzql.js} +1 -1
- package/dist/public/assets/_v2hjUzql.js.br +0 -0
- package/dist/public/assets/_xeXcHxFy.js +1 -0
- package/dist/public/assets/{_CP8OA6zX.js → _zte35G0C.js} +1 -1
- package/dist/public/assets/_zte35G0C.js.br +0 -0
- package/dist/public/assets/{app-page-BH1eJtJY.css → app-page-q9DSx_6H.css} +1 -1
- package/dist/public/assets/app-page-q9DSx_6H.css.br +0 -0
- package/dist/public/assets/{files-view-BWUVbyE_.css → files-view-4E3kXASs.css} +1 -1
- package/dist/public/assets/files-view-4E3kXASs.css.br +0 -0
- package/dist/public/assets/files-view-UszCym42.js +2 -0
- package/dist/public/assets/icon-go-to-file-BtF0WaqZ.css +1 -0
- package/dist/public/assets/icon-go-to-file-BtF0WaqZ.css.br +0 -0
- package/dist/public/assets/{icon-search-B4XHh_CO.css → icon-search-BxpLvwZF.css} +1 -1
- package/dist/public/assets/icon-search-BxpLvwZF.css.br +0 -0
- package/dist/public/assets/key-bar.css.ts-BZo5sjtE.css +1 -0
- package/dist/public/assets/key-bar.css.ts-BZo5sjtE.css.br +0 -0
- package/dist/public/assets/manage-workspace-CS7zLgiS.js +2 -0
- package/dist/public/assets/{modal-view-Dp-yH6Kp.css → modal-view-UBeCgIX7.css} +1 -1
- package/dist/public/assets/modal-view-UBeCgIX7.css.br +0 -0
- package/dist/public/assets/new-CM-FhUNi.js +1 -0
- package/dist/public/assets/new-workspace-DI64ZaMU.css +1 -0
- package/dist/public/assets/new-workspace-DI64ZaMU.css.br +0 -0
- package/dist/public/assets/new-workspace-fOyt4nRa.js +2 -0
- package/dist/public/assets/port-chip-Cz4VnZ9z.css +1 -0
- package/dist/public/assets/port-chip-Cz4VnZ9z.css.br +0 -0
- package/dist/public/assets/prompt-dialog-CH7vaJAn.css +1 -0
- package/dist/public/assets/prompt-dialog-CH7vaJAn.css.br +0 -0
- package/dist/public/assets/{quick-open-D4Ti6tCj.css → quick-open-BzjNryb1.css} +1 -1
- package/dist/public/assets/quick-open-BzjNryb1.css.br +0 -0
- package/dist/public/assets/repo-picker-Du9faofk.css +1 -0
- package/dist/public/assets/repo-picker-Du9faofk.css.br +2 -0
- package/dist/public/assets/{review-view-DyVGn3ET.css → review-view-9_qRBmzb.css} +1 -1
- package/dist/public/assets/review-view-9_qRBmzb.css.br +0 -0
- package/dist/public/assets/review-view-MwSvyFb0.js +2 -0
- package/dist/public/assets/{section-Cy7IT4ed.css → section-CZ2IaRip.css} +1 -1
- package/dist/public/assets/section-CZ2IaRip.css.br +0 -0
- package/dist/public/assets/settings-CM-FhUNi.js +1 -0
- package/dist/public/assets/settings-page-6e1aPE3t.js +2 -0
- package/dist/public/assets/{settings-page-CkOwBPiA.css → settings-page-C1jdrZXw.css} +1 -1
- package/dist/public/assets/settings-page-C1jdrZXw.css.br +0 -0
- package/dist/public/assets/w-CM-FhUNi.js +1 -0
- package/dist/public/assets/w._-CM-FhUNi.js +1 -0
- package/dist/public/assets/w._-MjovPk6K.js +1 -0
- package/dist/public/assets/w._-b1g1Pfei.js +1 -0
- package/package.json +1 -1
- package/dist/public/assets/_-5VRB-d8.js.br +0 -0
- package/dist/public/assets/_17YARaZI.js +0 -1
- package/dist/public/assets/_4upXK7xi.js.br +0 -0
- package/dist/public/assets/_7VnEzO6q.js.br +0 -0
- package/dist/public/assets/_81bytH-7.js.br +0 -0
- package/dist/public/assets/_94VO1H1D.js.br +0 -0
- package/dist/public/assets/_AGSf1cOD.js.br +0 -0
- package/dist/public/assets/_ARikQN6m.js +0 -1
- package/dist/public/assets/_AZWrS2Jm.js.br +0 -0
- package/dist/public/assets/_B1t_3R3E.js.br +0 -0
- package/dist/public/assets/_B2C9gp4T.js +0 -1
- package/dist/public/assets/_BANxovHo.js +0 -1
- package/dist/public/assets/_BD5eb9JF.js.br +0 -0
- package/dist/public/assets/_BFgcLXyz.js.br +0 -0
- package/dist/public/assets/_BGeDyB3V.js +0 -1
- package/dist/public/assets/_BGp6KcCQ.js.br +0 -0
- package/dist/public/assets/_BHpWtqGi.js.br +0 -0
- package/dist/public/assets/_BI-YRnhV.js +0 -1
- package/dist/public/assets/_BLDfMNIY.js.br +0 -0
- package/dist/public/assets/_BLqPpdme.js +0 -1
- package/dist/public/assets/_BMAKFvwT.js.br +0 -0
- package/dist/public/assets/_BO-Jsv0u.js +0 -1
- package/dist/public/assets/_BUi_qcC9.js.br +0 -0
- package/dist/public/assets/_BXZ8uyt2.js +0 -1
- package/dist/public/assets/_BXfOoEFL.js.br +0 -0
- package/dist/public/assets/_BYQ1qFAr.js.br +0 -0
- package/dist/public/assets/_BaDX7xGL.js +0 -1
- package/dist/public/assets/_BaGCGJ3V.js.br +0 -0
- package/dist/public/assets/_BbKk7fzo.js.br +0 -0
- package/dist/public/assets/_BjW31SFQ.js +0 -1
- package/dist/public/assets/_BjgImFNS.js +0 -1
- package/dist/public/assets/_BlOjfecc.js +0 -1
- package/dist/public/assets/_BoYE2vep.js +0 -1
- package/dist/public/assets/_BqDr3Tw4.js.br +0 -0
- package/dist/public/assets/_BtL0sglJ.js.br +0 -0
- package/dist/public/assets/_BuGdTsCt.js.br +0 -0
- package/dist/public/assets/_BuY8ki8b.js +0 -1
- package/dist/public/assets/_By2Snm-W.js +0 -1
- package/dist/public/assets/_BytT4SK1.js +0 -1
- package/dist/public/assets/_C-_9s2XH.js.br +0 -0
- package/dist/public/assets/_C2pCQFbc.js.br +0 -0
- package/dist/public/assets/_C3EwuwTS.js.br +0 -0
- package/dist/public/assets/_C5HEiR3-.js.br +0 -0
- package/dist/public/assets/_C70n3Uh0.js.br +0 -0
- package/dist/public/assets/_C8F-ulr0.js.br +0 -0
- package/dist/public/assets/_C98LcKxW.js.br +0 -0
- package/dist/public/assets/_C9CagP3D.js.br +0 -0
- package/dist/public/assets/_C9OZtkIs.js +0 -1
- package/dist/public/assets/_CCrALKLA.js.br +0 -0
- package/dist/public/assets/_CGI1BtkI.js.br +0 -0
- package/dist/public/assets/_CGIx5BHI.js +0 -1
- package/dist/public/assets/_CGzFAUY6.js.br +0 -0
- package/dist/public/assets/_CHHD69iN.js.br +0 -0
- package/dist/public/assets/_CIQLqWPr.js.br +0 -0
- package/dist/public/assets/_CIvfn_vo.js.br +0 -0
- package/dist/public/assets/_CP8OA6zX.js.br +0 -0
- package/dist/public/assets/_CQYWGGw1.js +0 -1
- package/dist/public/assets/_CR72KzUy.js.br +0 -0
- package/dist/public/assets/_CSm-EvZt.js +0 -1
- package/dist/public/assets/_CT1Gdljn.js.br +0 -0
- package/dist/public/assets/_CU2Rmo9L.js +0 -1
- package/dist/public/assets/_CWkeO0Fk.js.br +0 -0
- package/dist/public/assets/_CWzZgLRl.js.br +0 -0
- package/dist/public/assets/_C_F7Tl5w.js +0 -1
- package/dist/public/assets/_C_l42G5f.js +0 -1
- package/dist/public/assets/_CcVILLR8.js +0 -1
- package/dist/public/assets/_Cez0GncF.js.br +0 -0
- package/dist/public/assets/_CgljKJDn.js.br +0 -0
- package/dist/public/assets/_Ci6csctL.js.br +0 -0
- package/dist/public/assets/_CkJC-Rya.js +0 -1
- package/dist/public/assets/_Ckc4saGa.js +0 -1
- package/dist/public/assets/_Cku0OZEV.js.br +0 -0
- package/dist/public/assets/_CnIqepEi.js.br +0 -0
- package/dist/public/assets/_CnzQ4juf.js.br +0 -0
- package/dist/public/assets/_Cp2aP4_b.js.br +0 -0
- package/dist/public/assets/_Cpwq78LC.js.br +0 -0
- package/dist/public/assets/_CsuGx1ff.js.br +0 -0
- package/dist/public/assets/_CuyX02Pl.js.br +0 -0
- package/dist/public/assets/_CwRY7vN8.js.br +0 -0
- package/dist/public/assets/_CyH7-G4O.js.br +0 -0
- package/dist/public/assets/_D0FsS7fp.js.br +0 -0
- package/dist/public/assets/_D0_HRw9h.js.br +0 -0
- package/dist/public/assets/_D2HhmR2c.js +0 -1
- package/dist/public/assets/_D2rliuRa.js +0 -1
- package/dist/public/assets/_D72YKK3J.js.br +0 -0
- package/dist/public/assets/_D875Kcfa.js.br +0 -0
- package/dist/public/assets/_DBXzGyX_.js.br +0 -0
- package/dist/public/assets/_DByxtG6g.js +0 -1
- package/dist/public/assets/_DD16BGvo.js.br +0 -0
- package/dist/public/assets/_DDOtP_nf.js.br +0 -0
- package/dist/public/assets/_DFnwLEWk.js +0 -1
- package/dist/public/assets/_DGbpBQwH.js +0 -1
- package/dist/public/assets/_DGt79ckV.js +0 -1
- package/dist/public/assets/_DGwvafH8.js.br +0 -0
- package/dist/public/assets/_DJRfFb8h.js +0 -1
- package/dist/public/assets/_DKC19r0n.js +0 -1
- package/dist/public/assets/_DL37mEnd.js.br +0 -0
- package/dist/public/assets/_DLwjHB7c.js +0 -1
- package/dist/public/assets/_DNaxiSse.js.br +0 -0
- package/dist/public/assets/_DOiJubUI.js.br +0 -0
- package/dist/public/assets/_DS1wABH-.js.br +0 -0
- package/dist/public/assets/_DTTu8ZoT.js.br +0 -0
- package/dist/public/assets/_DUprEXi6.js.br +0 -0
- package/dist/public/assets/_DWh_YDAh.js +0 -1
- package/dist/public/assets/_DZ-Lo7dJ.js +0 -1
- package/dist/public/assets/_D_y2aFw-.js.br +0 -0
- package/dist/public/assets/_DarXw3BK.js.br +0 -0
- package/dist/public/assets/_DdOHjgo4.js.br +0 -0
- package/dist/public/assets/_DdXJJzzZ.js.br +0 -0
- package/dist/public/assets/_DeGNETkV.js.br +0 -0
- package/dist/public/assets/_De_ipH7W.js.br +0 -0
- package/dist/public/assets/_DfPcMMq-.js.br +0 -0
- package/dist/public/assets/_DnI0p7IL.js +0 -1
- package/dist/public/assets/_DpqRyroK.js +0 -1
- package/dist/public/assets/_DvLTN_1N.js +0 -1
- package/dist/public/assets/_DvgXuM5Z.js.br +0 -0
- package/dist/public/assets/_DvhcOREH.js.br +0 -0
- package/dist/public/assets/_Dzg96yJW.js.br +0 -0
- package/dist/public/assets/_EH5vEr2e.js.br +0 -0
- package/dist/public/assets/_EcZv8Nzi.js +0 -1
- package/dist/public/assets/_ElN9429q.js +0 -1
- package/dist/public/assets/_IJNr37kx.js.br +0 -0
- package/dist/public/assets/_KOzhfdTx.js +0 -1
- package/dist/public/assets/_MITe5BKM.js.br +0 -0
- package/dist/public/assets/_MR7uo2mc.js +0 -1
- package/dist/public/assets/_Mxop3LTn.js +0 -1
- package/dist/public/assets/_QW38dwH2.js +0 -1
- package/dist/public/assets/_RBcjVTtc.js.br +0 -0
- package/dist/public/assets/_RymhJ-oH.js.br +0 -0
- package/dist/public/assets/_UDN-Kw2b.js.br +0 -0
- package/dist/public/assets/_UlVjGC9v.js.br +0 -0
- package/dist/public/assets/_VCUJ4E0Z.js.br +0 -0
- package/dist/public/assets/_ZYpoEyN8.js.br +0 -0
- package/dist/public/assets/_ZsJ1B5tS.js.br +0 -0
- package/dist/public/assets/_buY79gP0.js +0 -1
- package/dist/public/assets/_bxcOWiWt.js +0 -1
- package/dist/public/assets/_dN2Rs1x8.js.br +0 -0
- package/dist/public/assets/_fZzNR3iI.js +0 -1
- package/dist/public/assets/_fxnmrIn3.js +0 -1
- package/dist/public/assets/_hNtFhi2H.js.br +0 -0
- package/dist/public/assets/_iBVWvD0A.js.br +0 -0
- package/dist/public/assets/_kYfPle1m.js +0 -1
- package/dist/public/assets/_k_5G0NCr.js +0 -1
- package/dist/public/assets/_lTtrjH_y.js.br +0 -0
- package/dist/public/assets/_m9PX5OYx.js +0 -1
- package/dist/public/assets/_pGY2eazQ.js +0 -1
- package/dist/public/assets/_u8Grdxbq.js +0 -1
- package/dist/public/assets/_v4yKwLDL.js +0 -1
- package/dist/public/assets/_vk1QtrAJ.js +0 -1
- package/dist/public/assets/app-page-BH1eJtJY.css.br +0 -0
- package/dist/public/assets/files-view-BWUVbyE_.css.br +0 -0
- package/dist/public/assets/files-view-C6oE6Lfx.js +0 -2
- package/dist/public/assets/icon-go-to-file-CQy45Ytk.css +0 -1
- package/dist/public/assets/icon-go-to-file-CQy45Ytk.css.br +0 -0
- package/dist/public/assets/icon-search-B4XHh_CO.css.br +0 -0
- package/dist/public/assets/key-bar.css.ts-CY294iEQ.css +0 -1
- package/dist/public/assets/key-bar.css.ts-CY294iEQ.css.br +0 -0
- package/dist/public/assets/manage-workspace-B8JeSyar.js +0 -2
- package/dist/public/assets/modal-view-Dp-yH6Kp.css.br +0 -0
- package/dist/public/assets/new-C0tyNSk0.js +0 -1
- package/dist/public/assets/new-workspace-CPvtstbA.js +0 -2
- package/dist/public/assets/new-workspace-DQJ28GeD.css +0 -1
- package/dist/public/assets/new-workspace-DQJ28GeD.css.br +0 -0
- package/dist/public/assets/port-chip-COcJpxld.css +0 -1
- package/dist/public/assets/port-chip-COcJpxld.css.br +0 -0
- package/dist/public/assets/prompt-dialog-DZHelkFg.css +0 -1
- package/dist/public/assets/prompt-dialog-DZHelkFg.css.br +0 -0
- package/dist/public/assets/quick-open-D4Ti6tCj.css.br +0 -0
- package/dist/public/assets/repo-picker-D3Idu6QD.css +0 -1
- package/dist/public/assets/repo-picker-D3Idu6QD.css.br +0 -2
- package/dist/public/assets/review-view-A8lxTwiR.js +0 -2
- package/dist/public/assets/review-view-DyVGn3ET.css.br +0 -0
- package/dist/public/assets/section-Cy7IT4ed.css.br +0 -0
- package/dist/public/assets/settings-C0tyNSk0.js +0 -1
- package/dist/public/assets/settings-page-CkOwBPiA.css.br +0 -0
- package/dist/public/assets/settings-page-DAib5ZGj.js +0 -2
- package/dist/public/assets/w-C0tyNSk0.js +0 -1
- package/dist/public/assets/w._-0xd6gDBN.js +0 -1
- package/dist/public/assets/w._-BkNES9p7.js +0 -1
- package/dist/public/assets/w._-C0tyNSk0.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/
|
|
2
|
-
import{F as e,I as t,L as n,O as r,o as i,s as a}from"./_CuyX02Pl.js";import{B as o,F as s,G as c,H as l,I as u,K as d,L as f,N as p,O as m,P as h,R as g,S as _,W as v,a as y,b,d as x,f as S,i as C,p as w,t as T,u as E,x as D,y as O,z as k}from"./_DQPZ_gMG.js";import{C as A,E as ee,S as j,T as te,W as M,Z as ne,_ as re,_t as ie,a as ae,b as oe,bn as se,gn as ce,ht as le,i as ue,n as de,r as fe,t as pe,v as me,vt as he,w as ge,wt as _e,x as ve,y as ye}from"./_ZsJ1B5tS.js";import{c as be,i as xe,l as Se,n as Ce,o as we,r as Te,s as Ee}from"./_DZ9AjglW.js";import{a as De,c as Oe,d as N,f as ke,i as Ae,l as je,n as Me,o as Ne,p as Pe,r as Fe,s as Ie,t as Le,u as Re}from"./_VCUJ4E0Z.js";import{t as ze}from"./_CcFCI5Av.js";import{i as Be,n as Ve,r as He,t as Ue}from"./_RBcjVTtc.js";var We=`diffs-container`,Ge=(()=>{try{return!1}catch{return!1}})(),Ke=/(?=^From [a-f0-9]+ .+$)/m,qe=/(?=^diff --git)/gm,Je=/(?<=\n)/,Ye=/^(---|\+\+\+)\s+([^\t\r\n]+)/,Xe=/^(---|\+\+\+)\s+[ab]\/([^\t\r\n]+)/,Ze=/^diff --git (?:"a\/(.+?)"|a\/(.+?)) (?:"b\/(.+?)"|b\/(.+?))$/,Qe=/^index ([0-9a-f]+)\.\.([0-9a-f]+)(?: (\d+))?$/i,$e=`header-prefix`,et=`header-filename-suffix`,tt=`header-metadata`,nt=`header-custom`,P={dark:`pierre-dark`,light:`pierre-light`},rt=`data-theme-css`,it=`data-unsafe-css`,at=`data-diffs-scrollbar-measure`,ot=`data-diffs-code-view-header`,st=`data-diffs-code-view-footer`,ct=`--diffs-scrollbar-gutter-measured`,lt=1e5,F={hunkLineCount:50,lineHeight:20,diffHeaderHeight:44,spacing:8},I={...F,hunkLineCount:1},ut={paddingTop:8,paddingBottom:8,gap:8},dt={omega:.015,positionEpsilon:.5,velocityEpsilon:.05},ft=Object.freeze({fromStart:0,fromEnd:0}),pt={startingLine:0,totalLines:1/0,bufferBefore:0,bufferAfter:0},mt={startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:0},ht=new Map,gt=new Map,_t=new Map,vt=new Set;function L(e){for(let t of Array.isArray(e)?e:[e])if(t!==`text`&&t!==`ansi`&&!vt.has(t))return!1;return!0}function yt(e,t){e=Array.isArray(e)?e:[e];for(let n of e){if(vt.has(n.name))continue;let e=ht.get(n.name);e??(e=n,ht.set(n.name,e));let r=e.data.find(t=>t.name===e.name||t.aliases?.includes(e.name)===!0);if(r==null)throw Error(`attachResolvedLanguages: No returned grammar declares "${e.name}" as its name or an alias.`);t.loadLanguageSync(e.data);try{t.getLanguage(e.name)}catch{throw Error(`attachResolvedLanguages: "${r.name}" is already loaded without alias "${e.name}". Load the alias first or give the grammar a unique name.`)}vt.add(e.name)}}function bt(){return typeof WorkerGlobalScope<`u`&&typeof self<`u`&&self instanceof WorkerGlobalScope}var xt=Object.defineProperty,St=Object.getOwnPropertyDescriptor,Ct=Object.getOwnPropertyNames,wt=Object.prototype.hasOwnProperty,Tt=(e,t)=>{let n={};for(var r in e)xt(n,r,{get:e[r],enumerable:!0});return t||xt(n,Symbol.toStringTag,{value:`Module`}),n},Et=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=Ct(t),a=0,o=i.length,s;a<o;a++)s=i[a],!wt.call(e,s)&&s!==n&&xt(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=St(t,s))||r.enumerable});return e},Dt=(e,t,n)=>(Et(e,t,`default`),n&&Et(n,t,`default`)),Ot=[{id:`abap`,name:`ABAP`,import:(()=>T(()=>import(`./_CLvhMVsD.js`),[]))},{id:`actionscript-3`,name:`ActionScript`,aliases:[`actionscript`,`as3`],import:(()=>T(()=>import(`./_Cs6JJXT5.js`),[]))},{id:`ada`,name:`Ada`,import:(()=>T(()=>import(`./_C5qYipkI.js`),[]))},{id:`ahk`,name:`AutoHotkey`,aliases:[`ahk1`],import:(()=>T(()=>import(`./_CA9gdOdF.js`),[]))},{id:`ahk2`,name:`AutoHotkey2`,import:(()=>T(()=>import(`./__6rzW9BS.js`),[]))},{id:`angular-html`,name:`Angular HTML`,import:(()=>T(()=>import(`./_BGp6KcCQ.js`).then(e=>e.n),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])))},{id:`angular-ts`,name:`Angular TypeScript`,import:(()=>T(()=>import(`./_-5VRB-d8.js`),__vite__mapDeps([11,0,1,2,3,4,5,6,7,8,9,10,12])))},{id:`apache`,name:`Apache Conf`,import:(()=>T(()=>import(`./_U0d_L8uA.js`),[]))},{id:`apex`,name:`Apex`,import:(()=>T(()=>import(`./_KFGFyKwG.js`),[]))},{id:`apl`,name:`APL`,import:(()=>T(()=>import(`./_4upXK7xi.js`),__vite__mapDeps([13,9,1,2,3,4,5,6,7,10,8,14,15,16])))},{id:`applescript`,name:`AppleScript`,import:(()=>T(()=>import(`./_CCn79oCD.js`),[]))},{id:`ara`,name:`Ara`,import:(()=>T(()=>import(`./_4CJ0cIlV.js`),[]))},{id:`asciidoc`,name:`AsciiDoc`,aliases:[`adoc`],import:(()=>T(()=>import(`./_SCjQUq34.js`),[]))},{id:`asm`,name:`Assembly`,import:(()=>T(()=>import(`./_Cmm7eHzH.js`),[]))},{id:`astro`,name:`Astro`,import:(()=>T(()=>import(`./_CHHD69iN.js`),__vite__mapDeps([17,9,1,2,3,4,5,6,7,10,16,18,19,20])))},{id:`awk`,name:`AWK`,import:(()=>T(()=>import(`./_BWXHIvNe.js`),[]))},{id:`ballerina`,name:`Ballerina`,import:(()=>T(()=>import(`./_B7ZEbQpA.js`),[]))},{id:`bat`,name:`Batch File`,aliases:[`batch`,`cmd`],import:(()=>T(()=>import(`./_qdxAdBWQ.js`),[]))},{id:`beancount`,name:`Beancount`,import:(()=>T(()=>import(`./_D-usSTwE.js`),[]))},{id:`berry`,name:`Berry`,aliases:[`be`],import:(()=>T(()=>import(`./_DKpUyyne.js`),[]))},{id:`bibtex`,name:`BibTeX`,import:(()=>T(()=>import(`./_Ci_nEsc7.js`),[]))},{id:`bicep`,name:`Bicep`,import:(()=>T(()=>import(`./_CUHmPFLl.js`),[]))},{id:`bird2`,name:`BIRD2 Configuration`,aliases:[`bird`],import:(()=>T(()=>import(`./_CYIUgYqB.js`),[]))},{id:`blade`,name:`Blade`,import:(()=>T(()=>import(`./_CnzQ4juf.js`),__vite__mapDeps([21,9,1,2,3,4,5,6,7,10,8,14,15,16,22,23])))},{id:`bsl`,name:`1C (Enterprise)`,aliases:[`1c`],import:(()=>T(()=>import(`./_YkIvmgMd.js`),__vite__mapDeps([24,25])))},{id:`c`,name:`C`,import:(()=>T(()=>import(`./_IJNr37kx.js`).then(e=>e.n),__vite__mapDeps([26,1,2,3,4,5,6,7])))},{id:`c3`,name:`C3`,import:(()=>T(()=>import(`./_D0apG41V.js`),[]))},{id:`cadence`,name:`Cadence`,aliases:[`cdc`],import:(()=>T(()=>import(`./_CQ2zXKGN.js`),[]))},{id:`cairo`,name:`Cairo`,import:(()=>T(()=>import(`./_BAfg1_wL.js`),__vite__mapDeps([27,28])))},{id:`chapel`,name:`Chapel`,aliases:[`chpl`],import:(()=>T(()=>import(`./_BMAKFvwT.js`),__vite__mapDeps([29,26,1,2,3,4,5,6,7])))},{id:`clarity`,name:`Clarity`,import:(()=>T(()=>import(`./_CtfBBspg.js`),[]))},{id:`clojure`,name:`Clojure`,aliases:[`clj`],import:(()=>T(()=>import(`./_DqKBuwfJ.js`),[]))},{id:`cmake`,name:`CMake`,import:(()=>T(()=>import(`./_Bj61d0ZC.js`),[]))},{id:`cobol`,name:`COBOL`,import:(()=>T(()=>import(`./_B1t_3R3E.js`),__vite__mapDeps([30,8,1,2,3,4,5,6,7,9,10,15])))},{id:`codeowners`,name:`CODEOWNERS`,import:(()=>T(()=>import(`./_C8r90Shi.js`),[]))},{id:`codeql`,name:`CodeQL`,aliases:[`ql`],import:(()=>T(()=>import(`./_oeQT6MSM.js`),[]))},{id:`coffee`,name:`CoffeeScript`,aliases:[`coffeescript`],import:(()=>T(()=>import(`./_Cez0GncF.js`),__vite__mapDeps([31,9,1,2,3,4,5,6,7])))},{id:`common-lisp`,name:`Common Lisp`,aliases:[`lisp`],import:(()=>T(()=>import(`./_Cv5bFMCO.js`),[]))},{id:`coq`,name:`Rocq`,import:(()=>T(()=>import(`./_DuBRPxYg.js`),[]))},{id:`cpp`,name:`C++`,aliases:[`c++`],import:(()=>T(()=>import(`./_CnIqepEi.js`).then(e=>e.n),__vite__mapDeps([32,1,2,3,4,5,6,7,33,34,26])))},{id:`crystal`,name:`Crystal`,import:(()=>T(()=>import(`./_DvhcOREH.js`),__vite__mapDeps([35,9,1,2,3,4,5,6,7,10,8,23,26,36])))},{id:`csharp`,name:`C#`,aliases:[`c#`,`cs`],import:(()=>T(()=>import(`./_oqKa8noW.js`),[]))},{id:`css`,name:`CSS`,import:(()=>T(()=>import(`./_81bytH-7.js`).then(e=>e.n),__vite__mapDeps([10,1,2,3,4,5,6,7])))},{id:`csv`,name:`CSV`,import:(()=>T(()=>import(`./_Dx-8-gkx.js`),[]))},{id:`cue`,name:`CUE`,import:(()=>T(()=>import(`./_CE9AQfxI.js`),[]))},{id:`cypher`,name:`Cypher`,aliases:[`cql`],import:(()=>T(()=>import(`./_ClKdZ_lG.js`),[]))},{id:`d`,name:`D`,import:(()=>T(()=>import(`./_qD-0Kul2.js`),[]))},{id:`dart`,name:`Dart`,import:(()=>T(()=>import(`./_CnvKMtbv.js`),[]))},{id:`dax`,name:`DAX`,import:(()=>T(()=>import(`./_BkyTk9wS.js`),[]))},{id:`desktop`,name:`Desktop`,import:(()=>T(()=>import(`./_Dlh5hvp9.js`),[]))},{id:`diff`,name:`Diff`,import:(()=>T(()=>import(`./_woXpYk--.js`),[]))},{id:`docker`,name:`Dockerfile`,aliases:[`dockerfile`],import:(()=>T(()=>import(`./_IyjqRm3v.js`),[]))},{id:`dotenv`,name:`dotEnv`,import:(()=>T(()=>import(`./__5a1GRtc.js`),[]))},{id:`dream-maker`,name:`Dream Maker`,import:(()=>T(()=>import(`./_DW3nJb8Q.js`),[]))},{id:`edge`,name:`Edge`,import:(()=>T(()=>import(`./_D72YKK3J.js`),__vite__mapDeps([37,8,1,2,3,4,5,6,7,9,10,18,22])))},{id:`elixir`,name:`Elixir`,import:(()=>T(()=>import(`./_BtL0sglJ.js`),__vite__mapDeps([38,8,1,2,3,4,5,6,7,9,10])))},{id:`elm`,name:`Elm`,import:(()=>T(()=>import(`./_EH5vEr2e.js`),__vite__mapDeps([39,34,1,2,3,4,5,6,7,26])))},{id:`emacs-lisp`,name:`Emacs Lisp`,aliases:[`elisp`],import:(()=>T(()=>import(`./_c_oH4hRZ.js`),[]))},{id:`erb`,name:`ERB`,import:(()=>T(()=>import(`./_DOiJubUI.js`),__vite__mapDeps([40,8,1,2,3,4,5,6,7,9,10,41,14,15,23,26,32,33,34,36,42,43,18,20,44,45,46])))},{id:`erlang`,name:`Erlang`,aliases:[`erl`],import:(()=>T(()=>import(`./_BaHq4SXp.js`),__vite__mapDeps([47,48])))},{id:`fennel`,name:`Fennel`,import:(()=>T(()=>import(`./_DQxkIbk2.js`),[]))},{id:`fish`,name:`Fish`,import:(()=>T(()=>import(`./_BJitypiv.js`),[]))},{id:`fluent`,name:`Fluent`,aliases:[`ftl`],import:(()=>T(()=>import(`./_C03EYrpw.js`),[]))},{id:`fortran-fixed-form`,name:`Fortran (Fixed Form)`,aliases:[`f`,`for`,`f77`],import:(()=>T(()=>import(`./_CQJs3lWb.js`),__vite__mapDeps([49,50])))},{id:`fortran-free-form`,name:`Fortran (Free Form)`,aliases:[`f90`,`f95`,`f03`,`f08`,`f18`],import:(()=>T(()=>import(`./_CYNrtFtB.js`),[]))},{id:`fsharp`,name:`F#`,aliases:[`f#`,`fs`],import:(()=>T(()=>import(`./_DmIc4jLQ.js`),__vite__mapDeps([51,48])))},{id:`gdresource`,name:`GDResource`,aliases:[`tscn`,`tres`],import:(()=>T(()=>import(`./_DbYA3moe.js`),__vite__mapDeps([52,53,54])))},{id:`gdscript`,name:`GDScript`,aliases:[`gd`],import:(()=>T(()=>import(`./_DYvRD3hg.js`),[]))},{id:`gdshader`,name:`GDShader`,import:(()=>T(()=>import(`./_CBce3t8t.js`),[]))},{id:`genie`,name:`Genie`,import:(()=>T(()=>import(`./_CV2tkWYe.js`),[]))},{id:`gherkin`,name:`Gherkin`,import:(()=>T(()=>import(`./_DExj1W_8.js`),[]))},{id:`git-commit`,name:`Git Commit Message`,import:(()=>T(()=>import(`./_Dl-2e7rI.js`),__vite__mapDeps([55,56])))},{id:`git-rebase`,name:`Git Rebase Message`,import:(()=>T(()=>import(`./_oQDS6HaL.js`),__vite__mapDeps([57,36,1,2,3,4,5,6,7])))},{id:`gleam`,name:`Gleam`,import:(()=>T(()=>import(`./_CSRkHgEL.js`),[]))},{id:`glimmer-js`,name:`Glimmer JS`,aliases:[`gjs`],import:(()=>T(()=>import(`./_DD16BGvo.js`),__vite__mapDeps([58,9,1,2,3,4,5,6,7,10,8,18])))},{id:`glimmer-ts`,name:`Glimmer TS`,aliases:[`gts`],import:(()=>T(()=>import(`./_BLDfMNIY.js`),__vite__mapDeps([59,9,1,2,3,4,5,6,7,10,8,18])))},{id:`glsl`,name:`GLSL`,import:(()=>T(()=>import(`./_CIvfn_vo.js`).then(e=>e.n),__vite__mapDeps([34,1,2,3,4,5,6,7,26])))},{id:`gn`,name:`GN`,import:(()=>T(()=>import(`./_ilITqXS6.js`),[]))},{id:`gnuplot`,name:`Gnuplot`,import:(()=>T(()=>import(`./_7GGW24-e.js`),[]))},{id:`go`,name:`Go`,import:(()=>T(()=>import(`./_rLFTqkRN.js`),[]))},{id:`graphql`,name:`GraphQL`,aliases:[`gql`],import:(()=>T(()=>import(`./_CP8OA6zX.js`).then(e=>e.n),__vite__mapDeps([43,1,2,3,4,5,6,7,9,18,20,44])))},{id:`groovy`,name:`Groovy`,import:(()=>T(()=>import(`./_CacY0gHj.js`),[]))},{id:`hack`,name:`Hack`,import:(()=>T(()=>import(`./_7VnEzO6q.js`),__vite__mapDeps([60,8,1,2,3,4,5,6,7,9,10,23])))},{id:`haml`,name:`Ruby Haml`,import:(()=>T(()=>import(`./_DS1wABH-.js`).then(e=>e.n),__vite__mapDeps([42,1,2,3,4,5,6,7,9,10])))},{id:`handlebars`,name:`Handlebars`,aliases:[`hbs`],import:(()=>T(()=>import(`./_iBVWvD0A.js`),__vite__mapDeps([61,9,1,2,3,4,5,6,7,10,8,46])))},{id:`haskell`,name:`Haskell`,aliases:[`hs`],import:(()=>T(()=>import(`./_D8IpX4py.js`),[]))},{id:`haxe`,name:`Haxe`,import:(()=>T(()=>import(`./_C8oCnwJJ.js`),[]))},{id:`hcl`,name:`HashiCorp HCL`,import:(()=>T(()=>import(`./_Dh228itO.js`),[]))},{id:`hjson`,name:`Hjson`,import:(()=>T(()=>import(`./_CxZEssPk.js`),[]))},{id:`hlsl`,name:`HLSL`,import:(()=>T(()=>import(`./_Cvrh5tZx.js`),[]))},{id:`html`,name:`HTML`,import:(()=>T(()=>import(`./_C5HEiR3-.js`).then(e=>e.n),__vite__mapDeps([8,1,2,3,4,5,6,7,9,10])))},{id:`html-derivative`,name:`HTML (Derivative)`,import:(()=>T(()=>import(`./_DUoMqwhS.js`),__vite__mapDeps([22,8,1,2,3,4,5,6,7,9,10])))},{id:`http`,name:`HTTP`,import:(()=>T(()=>import(`./_UDN-Kw2b.js`),__vite__mapDeps([62,14,1,2,3,4,5,6,7,15,16,36,43,9,18,20,44])))},{id:`hurl`,name:`Hurl`,import:(()=>T(()=>import(`./_DeGNETkV.js`),__vite__mapDeps([63,14,1,2,3,4,5,6,7,15,64,43,9,18,20,44])))},{id:`hxml`,name:`HXML`,import:(()=>T(()=>import(`./_DekxQCZG.js`),__vite__mapDeps([65,66])))},{id:`hy`,name:`Hy`,import:(()=>T(()=>import(`./_CZbG8q4J.js`),[]))},{id:`imba`,name:`Imba`,import:(()=>T(()=>import(`./_DsUTQ-LC.js`),[]))},{id:`ini`,name:`INI`,aliases:[`properties`],import:(()=>T(()=>import(`./_B5eOa1yu.js`),[]))},{id:`java`,name:`Java`,import:(()=>T(()=>import(`./_Cku0OZEV.js`).then(e=>e.n),__vite__mapDeps([15,1,2,3,4,5,6,7])))},{id:`javascript`,name:`JavaScript`,aliases:[`js`,`cjs`,`mjs`],import:(()=>T(()=>import(`./_CsuGx1ff.js`).then(e=>e.n),__vite__mapDeps([9,1,2,3,4,5,6,7])))},{id:`jinja`,name:`Jinja`,import:(()=>T(()=>import(`./_lTtrjH_y.js`),__vite__mapDeps([67,8,1,2,3,4,5,6,7,9,10])))},{id:`jison`,name:`Jison`,import:(()=>T(()=>import(`./_CwRY7vN8.js`),__vite__mapDeps([68,9,1,2,3,4,5,6,7])))},{id:`json`,name:`JSON`,import:(()=>T(()=>import(`./_RymhJ-oH.js`).then(e=>e.n),__vite__mapDeps([16,1,2,3,4,5,6,7])))},{id:`json5`,name:`JSON5`,import:(()=>T(()=>import(`./_BR5RXkoi.js`),[]))},{id:`jsonc`,name:`JSON with Comments`,import:(()=>T(()=>import(`./_CYpm1nAK.js`),[]))},{id:`jsonl`,name:`JSON Lines`,import:(()=>T(()=>import(`./_CmCQp5Yx.js`),[]))},{id:`jsonnet`,name:`Jsonnet`,import:(()=>T(()=>import(`./_CJTPZ8u_.js`),[]))},{id:`jssm`,name:`JSSM`,aliases:[`fsl`],import:(()=>T(()=>import(`./_DXw9l8Rf.js`),[]))},{id:`jsx`,name:`JSX`,import:(()=>T(()=>import(`./_D0FsS7fp.js`).then(e=>e.n),__vite__mapDeps([44,1,2,3,4,5,6,7])))},{id:`julia`,name:`Julia`,aliases:[`jl`],import:(()=>T(()=>import(`./_DdXJJzzZ.js`),__vite__mapDeps([69,9,1,2,3,4,5,6,7,23,28,32,33,34,26,70])))},{id:`just`,name:`Just`,aliases:[`justfile`],import:(()=>T(()=>import(`./_CR72KzUy.js`),__vite__mapDeps([71,9,1,2,3,4,5,6,7,18,28,36,41,10,8,14,15,23,26,32,33,34,42,43,20,44,45,46,72])))},{id:`kdl`,name:`KDL`,import:(()=>T(()=>import(`./_CsD5j6eV.js`),[]))},{id:`kotlin`,name:`Kotlin`,aliases:[`kt`,`kts`],import:(()=>T(()=>import(`./_DhhofPvG.js`),[]))},{id:`kusto`,name:`Kusto`,aliases:[`kql`],import:(()=>T(()=>import(`./_C7mF5XQf.js`),[]))},{id:`latex`,name:`LaTeX`,import:(()=>T(()=>import(`./_CWzZgLRl.js`),__vite__mapDeps([73,74,1,2,3,4,5,6,7,70])))},{id:`lean`,name:`Lean 4`,aliases:[`lean4`],import:(()=>T(()=>import(`./_CewbzKMR.js`),[]))},{id:`less`,name:`Less`,import:(()=>T(()=>import(`./_DVTAwKKz.js`),[]))},{id:`liquid`,name:`Liquid`,import:(()=>T(()=>import(`./_BuGdTsCt.js`),__vite__mapDeps([75,9,1,2,3,4,5,6,7,10,8,16])))},{id:`llvm`,name:`LLVM IR`,import:(()=>T(()=>import(`./_DqHOMS-s.js`),[]))},{id:`log`,name:`Log file`,import:(()=>T(()=>import(`./_BNLmms1o.js`),[]))},{id:`logo`,name:`Logo`,import:(()=>T(()=>import(`./_Cluzi2Zq.js`),[]))},{id:`lua`,name:`Lua`,import:(()=>T(()=>import(`./_BXfOoEFL.js`).then(e=>e.n),__vite__mapDeps([45,1,2,3,4,5,6,7,26])))},{id:`luau`,name:`Luau`,import:(()=>T(()=>import(`./_C2pBCSgt.js`),[]))},{id:`make`,name:`Makefile`,aliases:[`makefile`],import:(()=>T(()=>import(`./_Dixweg8N.js`),[]))},{id:`markdown`,name:`Markdown`,aliases:[`md`],import:(()=>T(()=>import(`./_BYOwaDjH.js`),[]))},{id:`marko`,name:`Marko`,import:(()=>T(()=>import(`./_DNaxiSse.js`),__vite__mapDeps([76,10,1,2,3,4,5,6,7,12,18,77])))},{id:`matlab`,name:`MATLAB`,import:(()=>T(()=>import(`./_D7qyCx1q.js`),[]))},{id:`mdc`,name:`MDC`,import:(()=>T(()=>import(`./_DGwvafH8.js`),__vite__mapDeps([78,22,8,1,2,3,4,5,6,7,9,10,46,48])))},{id:`mdx`,name:`MDX`,import:(()=>T(()=>import(`./_DQZ5AkYe.js`),[]))},{id:`mermaid`,name:`Mermaid`,aliases:[`mmd`],import:(()=>T(()=>import(`./_BxpfTIzt.js`),[]))},{id:`mipsasm`,name:`MIPS Assembly`,aliases:[`mips`],import:(()=>T(()=>import(`./_BMqwQI7S.js`),[]))},{id:`mojo`,name:`Mojo`,import:(()=>T(()=>import(`./_fg40_ntQ.js`),[]))},{id:`moonbit`,name:`MoonBit`,aliases:[`mbt`,`mbti`],import:(()=>T(()=>import(`./_DgjMoLWr.js`),[]))},{id:`move`,name:`Move`,import:(()=>T(()=>import(`./_BYnGhZoM.js`),[]))},{id:`narrat`,name:`Narrat Language`,aliases:[`nar`],import:(()=>T(()=>import(`./__X_XdTYD.js`),[]))},{id:`nextflow`,name:`Nextflow`,aliases:[`nf`],import:(()=>T(()=>import(`./_DWQbgPoS.js`),__vite__mapDeps([79,80])))},{id:`nextflow-groovy`,name:`Nextflow Groovy`,import:(()=>T(()=>import(`./_DJMQeKeT.js`),[]))},{id:`nginx`,name:`Nginx`,import:(()=>T(()=>import(`./_AGSf1cOD.js`),__vite__mapDeps([81,45,1,2,3,4,5,6,7,26])))},{id:`nim`,name:`Nim`,import:(()=>T(()=>import(`./_dN2Rs1x8.js`),__vite__mapDeps([82,9,1,2,3,4,5,6,7,10,8,14,15,26,34,48])))},{id:`nix`,name:`Nix`,import:(()=>T(()=>import(`./_IvuFDN5E.js`),[]))},{id:`nsis`,name:`NSIS`,import:(()=>T(()=>import(`./_CjNLYCLg.js`),[]))},{id:`nushell`,name:`nushell`,aliases:[`nu`],import:(()=>T(()=>import(`./_DHYfO66s.js`),[]))},{id:`objective-c`,name:`Objective-C`,aliases:[`objc`],import:(()=>T(()=>import(`./_D1A_Heim.js`),[]))},{id:`objective-cpp`,name:`Objective-C++`,import:(()=>T(()=>import(`./_BsSzOQcm.js`),[]))},{id:`ocaml`,name:`OCaml`,import:(()=>T(()=>import(`./_O90oeIOV.js`),[]))},{id:`odin`,name:`Odin`,import:(()=>T(()=>import(`./_B1RWQWA5.js`),[]))},{id:`openscad`,name:`OpenSCAD`,aliases:[`scad`],import:(()=>T(()=>import(`./_BUDT5pXO.js`),[]))},{id:`org`,name:`Org Markup`,import:(()=>T(()=>import(`./_BHpWtqGi.js`),__vite__mapDeps([83,9,1,2,3,4,5,6,7,10,8,12,15,14,16,18,20,23,26,28,84,31,33,32,34,36,85,86,56,87,38,45,46,41,42,43,44,48,47,55,57,88,89,90,70,72,73,74,77,91,82,92,93,94,95,96,97,98,99,100])))},{id:`pascal`,name:`Pascal`,import:(()=>T(()=>import(`./_4ZHwLPI5.js`),[]))},{id:`perl`,name:`Perl`,import:(()=>T(()=>import(`./_hNtFhi2H.js`),__vite__mapDeps([72,9,1,2,3,4,5,6,7,10,8,14,15,23])))},{id:`php`,name:`PHP`,import:(()=>T(()=>import(`./_C3EwuwTS.js`),__vite__mapDeps([94,9,1,2,3,4,5,6,7,10,8,14,15,16,23])))},{id:`pkl`,name:`Pkl`,import:(()=>T(()=>import(`./_ot-7Btpt.js`),[]))},{id:`plsql`,name:`PL/SQL`,import:(()=>T(()=>import(`./_DGHpHOYJ.js`),[]))},{id:`po`,name:`Gettext PO`,aliases:[`pot`,`potx`],import:(()=>T(()=>import(`./_BiJDBrnU.js`),[]))},{id:`polar`,name:`Polar`,import:(()=>T(()=>import(`./_C7UOKdEL.js`),[]))},{id:`postcss`,name:`PostCSS`,import:(()=>T(()=>import(`./_BXeXVLqQ.js`),[]))},{id:`powerquery`,name:`PowerQuery`,import:(()=>T(()=>import(`./_DNMTfnFr.js`),[]))},{id:`powershell`,name:`PowerShell`,aliases:[`ps`,`ps1`,`pwsh`],import:(()=>T(()=>import(`./_CCSX75yM.js`),[]))},{id:`prisma`,name:`Prisma`,import:(()=>T(()=>import(`./_DMgNhnYS.js`),[]))},{id:`prolog`,name:`Prolog`,import:(()=>T(()=>import(`./_iXnhIJG7.js`),[]))},{id:`proto`,name:`Protocol Buffer 3`,aliases:[`protobuf`],import:(()=>T(()=>import(`./_DB4EqR-F.js`),[]))},{id:`pug`,name:`Pug`,aliases:[`jade`],import:(()=>T(()=>import(`./_BaGCGJ3V.js`),__vite__mapDeps([101,9,1,2,3,4,5,6,7,10,8])))},{id:`puppet`,name:`Puppet`,import:(()=>T(()=>import(`./_CDv2pdJW.js`),[]))},{id:`purescript`,name:`PureScript`,import:(()=>T(()=>import(`./_9MfHhQsQ.js`),[]))},{id:`python`,name:`Python`,aliases:[`py`],import:(()=>T(()=>import(`./_gzcpVVnB.js`),[]))},{id:`qml`,name:`QML`,import:(()=>T(()=>import(`./_DL37mEnd.js`),__vite__mapDeps([102,9,1,2,3,4,5,6,7])))},{id:`qmldir`,name:`QML Directory`,import:(()=>T(()=>import(`./_DCQb3MpD.js`),[]))},{id:`qss`,name:`Qt Style Sheets`,import:(()=>T(()=>import(`./_Fe1Jh2GI.js`),[]))},{id:`r`,name:`R`,import:(()=>T(()=>import(`./_CgljKJDn.js`).then(e=>e.n),__vite__mapDeps([70,1,2,3,4,5,6,7])))},{id:`racket`,name:`Racket`,import:(()=>T(()=>import(`./_DcIDlBhZ.js`),[]))},{id:`raku`,name:`Raku`,aliases:[`perl6`],import:(()=>T(()=>import(`./_B3gFvitq.js`),[]))},{id:`razor`,name:`ASP.NET Razor`,import:(()=>T(()=>import(`./_BUi_qcC9.js`),__vite__mapDeps([103,8,1,2,3,4,5,6,7,9,10,85])))},{id:`rbs`,name:`RBS`,aliases:[`ruby-signature`],import:(()=>T(()=>import(`./_C0MpOrj4.js`),[]))},{id:`reg`,name:`Windows Registry Script`,import:(()=>T(()=>import(`./_CRGYupPL.js`),[]))},{id:`regexp`,name:`RegExp`,aliases:[`regex`],import:(()=>T(()=>import(`./_DdOHjgo4.js`).then(e=>e.n),__vite__mapDeps([33,1,2,3,4,5,6,7])))},{id:`rel`,name:`Rel`,import:(()=>T(()=>import(`./_BtDbiS_P.js`),[]))},{id:`riscv`,name:`RISC-V`,import:(()=>T(()=>import(`./_Ckw8ddFX.js`),[]))},{id:`ron`,name:`RON`,import:(()=>T(()=>import(`./_VUp2lXgN.js`),[]))},{id:`rosmsg`,name:`ROS Interface`,import:(()=>T(()=>import(`./_CAekHB0j.js`),[]))},{id:`rst`,name:`reStructuredText`,import:(()=>T(()=>import(`./_CIQLqWPr.js`),__vite__mapDeps([104,9,1,2,3,4,5,6,7,22,8,10,28,105,32,33,34,26,36,46,41,14,15,23,42,43,18,20,44,45])))},{id:`ruby`,name:`Ruby`,aliases:[`rb`],import:(()=>T(()=>import(`./_Dzg96yJW.js`),__vite__mapDeps([41,9,1,2,3,4,5,6,7,10,8,14,15,23,26,32,33,34,36,42,43,18,20,44,45,46])))},{id:`rust`,name:`Rust`,aliases:[`rs`],import:(()=>T(()=>import(`./_Cfkwpbl8.js`),[]))},{id:`sas`,name:`SAS`,import:(()=>T(()=>import(`./_C9CagP3D.js`),__vite__mapDeps([106,23,1,2,3,4,5,6,7])))},{id:`sass`,name:`Sass`,import:(()=>T(()=>import(`./_DXrisJhu.js`),[]))},{id:`scala`,name:`Scala`,import:(()=>T(()=>import(`./_BiFt_7mu.js`),[]))},{id:`scheme`,name:`Scheme`,import:(()=>T(()=>import(`./_DQCgrYNe.js`),[]))},{id:`scss`,name:`SCSS`,import:(()=>T(()=>import(`./_BYQ1qFAr.js`).then(e=>e.n),__vite__mapDeps([12,1,2,3,4,5,6,7,10])))},{id:`sdbl`,name:`1C (Query)`,aliases:[`1c-query`],import:(()=>T(()=>import(`./_bTVj8UrX.js`),[]))},{id:`shaderlab`,name:`ShaderLab`,aliases:[`shader`],import:(()=>T(()=>import(`./_DB-OQ-9y.js`),__vite__mapDeps([107,108])))},{id:`shellscript`,name:`Shell`,aliases:[`bash`,`sh`,`shell`,`zsh`],import:(()=>T(()=>import(`./_DBXzGyX_.js`).then(e=>e.n),__vite__mapDeps([36,1,2,3,4,5,6,7])))},{id:`shellsession`,name:`Shell Session`,aliases:[`console`],import:(()=>T(()=>import(`./_Bpjh_GiT.js`),__vite__mapDeps([109,36,1,2,3,4,5,6,7])))},{id:`smalltalk`,name:`GNU Smalltalk`,import:(()=>T(()=>import(`./_BHpQb5nM.js`),[]))},{id:`smithy`,name:`Smithy`,import:(()=>T(()=>import(`./_Dgaz7aur.js`),[]))},{id:`solidity`,name:`Solidity`,import:(()=>T(()=>import(`./_Bj7E1mRn.js`),[]))},{id:`soy`,name:`Closure Templates`,aliases:[`closure-templates`],import:(()=>T(()=>import(`./_Cp2aP4_b.js`),__vite__mapDeps([110,8,1,2,3,4,5,6,7,9,10])))},{id:`sparql`,name:`SPARQL`,import:(()=>T(()=>import(`./_L8AbGenz.js`),__vite__mapDeps([111,112])))},{id:`splunk`,name:`Splunk Query Language`,aliases:[`spl`],import:(()=>T(()=>import(`./_BC2Px7Mm.js`),[]))},{id:`sql`,name:`SQL`,import:(()=>T(()=>import(`./_DarXw3BK.js`).then(e=>e.n),__vite__mapDeps([23,1,2,3,4,5,6,7])))},{id:`ssh-config`,name:`SSH Config`,import:(()=>T(()=>import(`./_BgfXC-Er.js`),[]))},{id:`stata`,name:`Stata`,import:(()=>T(()=>import(`./_C70n3Uh0.js`),__vite__mapDeps([113,23,1,2,3,4,5,6,7])))},{id:`stylus`,name:`Stylus`,aliases:[`styl`],import:(()=>T(()=>import(`./_B6D30XZt.js`),[]))},{id:`surrealql`,name:`SurrealQL`,aliases:[`surql`],import:(()=>T(()=>import(`./_CCrALKLA.js`),__vite__mapDeps([114,9,1,2,3,4,5,6,7])))},{id:`svelte`,name:`Svelte`,import:(()=>T(()=>import(`./_BqDr3Tw4.js`),__vite__mapDeps([115,9,1,2,3,4,5,6,7,10,18,19])))},{id:`swift`,name:`Swift`,import:(()=>T(()=>import(`./_CyEgAFGc.js`),[]))},{id:`system-verilog`,name:`SystemVerilog`,import:(()=>T(()=>import(`./_Dh5ihWbf.js`),[]))},{id:`systemd`,name:`Systemd Units`,import:(()=>T(()=>import(`./_BxMlprV5.js`),[]))},{id:`talonscript`,name:`TalonScript`,aliases:[`talon`],import:(()=>T(()=>import(`./_CohzipZa.js`),[]))},{id:`tasl`,name:`Tasl`,import:(()=>T(()=>import(`./_DMoTqEGO.js`),[]))},{id:`tcl`,name:`Tcl`,import:(()=>T(()=>import(`./_CZd0xW_V.js`),[]))},{id:`templ`,name:`Templ`,import:(()=>T(()=>import(`./_CGI1BtkI.js`),__vite__mapDeps([116,9,1,2,3,4,5,6,7,10,88])))},{id:`terraform`,name:`Terraform`,aliases:[`tf`,`tfvars`],import:(()=>T(()=>import(`./_DswuEJGm.js`),[]))},{id:`tex`,name:`TeX`,import:(()=>T(()=>import(`./_De_ipH7W.js`).then(e=>e.n),__vite__mapDeps([74,1,2,3,4,5,6,7,70])))},{id:`toml`,name:`TOML`,import:(()=>T(()=>import(`./_CcmNWLt0.js`),[]))},{id:`ts-tags`,name:`TypeScript with Tags`,aliases:[`lit`],import:(()=>T(()=>import(`./_C-_9s2XH.js`),__vite__mapDeps([117,9,1,2,3,4,5,6,7,10,8,14,15,18,23,34,26])))},{id:`tsv`,name:`TSV`,import:(()=>T(()=>import(`./_sltzmVWM.js`),[]))},{id:`tsx`,name:`TSX`,import:(()=>T(()=>import(`./_DTTu8ZoT.js`).then(e=>e.n),__vite__mapDeps([20,1,2,3,4,5,6,7])))},{id:`turtle`,name:`Turtle`,import:(()=>T(()=>import(`./_ByJddavk.js`),[]))},{id:`twig`,name:`Twig`,import:(()=>T(()=>import(`./_ZYpoEyN8.js`),__vite__mapDeps([118,9,1,2,3,4,5,6,7,10,12,28,41,8,14,15,23,26,32,33,34,36,42,43,18,20,44,45,46,94,16])))},{id:`typescript`,name:`TypeScript`,aliases:[`ts`,`cts`,`mts`],import:(()=>T(()=>import(`./_DDOtP_nf.js`).then(e=>e.n),__vite__mapDeps([18,1,2,3,4,5,6,7])))},{id:`typespec`,name:`TypeSpec`,aliases:[`tsp`],import:(()=>T(()=>import(`./_BRdr0IET.js`),[]))},{id:`typst`,name:`Typst`,aliases:[`typ`],import:(()=>T(()=>import(`./_AZWrS2Jm.js`),__vite__mapDeps([119,9,1,2,3,4,5,6,7,10,8,12,15,14,16,18,20,120,121,23,26,28,84,31,33,32,34,36,85,86,56,87,38,45,46,41,42,43,44,48,47,51,55,57,88,89,61,90,122,70,69,72,73,74,77,123,91,92,94,95,96,97,98,100,124,101,125,126,118,127])))},{id:`v`,name:`V`,import:(()=>T(()=>import(`./_DBj4K9d_.js`),[]))},{id:`vala`,name:`Vala`,import:(()=>T(()=>import(`./_zf12oZj6.js`),[]))},{id:`vb`,name:`Visual Basic`,import:(()=>T(()=>import(`./_DOwzaHZ0.js`),[]))},{id:`verilog`,name:`Verilog`,import:(()=>T(()=>import(`./_B2gwz-sJ.js`),[]))},{id:`vhdl`,name:`VHDL`,import:(()=>T(()=>import(`./_BroJfC0k.js`),[]))},{id:`viml`,name:`Vim Script`,aliases:[`vim`,`vimscript`],import:(()=>T(()=>import(`./_DvXPmvsu.js`),[]))},{id:`vue`,name:`Vue`,import:(()=>T(()=>import(`./_D_y2aFw-.js`),__vite__mapDeps([128,9,1,2,3,4,5,6,7,10,8,16,18,22])))},{id:`vue-html`,name:`Vue HTML`,import:(()=>T(()=>import(`./_DfPcMMq-.js`),__vite__mapDeps([129,9,1,2,3,4,5,6,7])))},{id:`vue-vine`,name:`Vue Vine`,import:(()=>T(()=>import(`./_C2pCQFbc.js`),__vite__mapDeps([130,9,1,2,3,4,5,6,7,10,12,19,77,131])))},{id:`vyper`,name:`Vyper`,aliases:[`vy`],import:(()=>T(()=>import(`./_CgoNMtux.js`),[]))},{id:`wasm`,name:`WebAssembly`,import:(()=>T(()=>import(`./_ByWQv1Qj.js`),[]))},{id:`wenyan`,name:`Wenyan`,aliases:[`文言`],import:(()=>T(()=>import(`./_C8pVoKbM.js`),[]))},{id:`wgsl`,name:`WGSL`,import:(()=>T(()=>import(`./_BsKzXJz4.js`),[]))},{id:`wikitext`,name:`Wikitext`,aliases:[`mediawiki`,`wiki`],import:(()=>T(()=>import(`./_ClFFjSW2.js`),[]))},{id:`wit`,name:`WebAssembly Interface Types`,import:(()=>T(()=>import(`./_DdvCle-K.js`),[]))},{id:`wolfram`,name:`Wolfram`,aliases:[`wl`],import:(()=>T(()=>import(`./_DLL8P-h_.js`),[]))},{id:`xml`,name:`XML`,import:(()=>T(()=>import(`./_CWkeO0Fk.js`).then(e=>e.n),__vite__mapDeps([14,1,2,3,4,5,6,7,15])))},{id:`xsl`,name:`XSL`,import:(()=>T(()=>import(`./_CT1Gdljn.js`),__vite__mapDeps([100,14,1,2,3,4,5,6,7,15])))},{id:`yaml`,name:`YAML`,aliases:[`yml`],import:(()=>T(()=>import(`./_Ci6csctL.js`).then(e=>e.n),__vite__mapDeps([46,1,2,3,4,5,6,7])))},{id:`zenscript`,name:`ZenScript`,import:(()=>T(()=>import(`./_BnlCZFoB.js`),[]))},{id:`zig`,name:`Zig`,import:(()=>T(()=>import(`./_CMLA9XwU.js`),[]))}],kt=Object.fromEntries(Ot.map(e=>[e.id,e.import])),At=Object.fromEntries(Ot.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),jt={...kt,...At},Mt=Object.fromEntries([{id:`andromeeda`,displayName:`Andromeeda`,type:`dark`,import:(()=>T(()=>import(`./_vGVdxbeo.js`),[]))},{id:`aurora-x`,displayName:`Aurora X`,type:`dark`,import:(()=>T(()=>import(`./_CDeNXAV0.js`),[]))},{id:`ayu-dark`,displayName:`Ayu Dark`,type:`dark`,import:(()=>T(()=>import(`./_DluEY0Gj.js`),[]))},{id:`ayu-light`,displayName:`Ayu Light`,type:`light`,import:(()=>T(()=>import(`./_C3h-C4tm.js`),[]))},{id:`ayu-mirage`,displayName:`Ayu Mirage`,type:`dark`,import:(()=>T(()=>import(`./_Bqwy1Gya.js`),[]))},{id:`catppuccin-frappe`,displayName:`Catppuccin Frappé`,type:`dark`,import:(()=>T(()=>import(`./_C9Q5zVZY.js`),[]))},{id:`catppuccin-latte`,displayName:`Catppuccin Latte`,type:`light`,import:(()=>T(()=>import(`./_CtsyrtPq.js`),[]))},{id:`catppuccin-macchiato`,displayName:`Catppuccin Macchiato`,type:`dark`,import:(()=>T(()=>import(`./_R8nAf1vR.js`),[]))},{id:`catppuccin-mocha`,displayName:`Catppuccin Mocha`,type:`dark`,import:(()=>T(()=>import(`./_DjuaAJKi.js`),[]))},{id:`dark-plus`,displayName:`Dark Plus`,type:`dark`,import:(()=>T(()=>import(`./_Cs2F2srj.js`),[]))},{id:`dracula`,displayName:`Dracula Theme`,type:`dark`,import:(()=>T(()=>import(`./_BHWKrbxM.js`),[]))},{id:`dracula-soft`,displayName:`Dracula Theme Soft`,type:`dark`,import:(()=>T(()=>import(`./_5eyTD99u.js`),[]))},{id:`everforest-dark`,displayName:`Everforest Dark`,type:`dark`,import:(()=>T(()=>import(`./_sB-x3p7T.js`),[]))},{id:`everforest-light`,displayName:`Everforest Light`,type:`light`,import:(()=>T(()=>import(`./_Df2xbC6M.js`),[]))},{id:`github-dark`,displayName:`GitHub Dark`,type:`dark`,import:(()=>T(()=>import(`./_C-LZuMrd.js`),[]))},{id:`github-dark-default`,displayName:`GitHub Dark Default`,type:`dark`,import:(()=>T(()=>import(`./_DXG-b-1a.js`),[]))},{id:`github-dark-dimmed`,displayName:`GitHub Dark Dimmed`,type:`dark`,import:(()=>T(()=>import(`./_Bx1FflLF.js`),[]))},{id:`github-dark-high-contrast`,displayName:`GitHub Dark High Contrast`,type:`dark`,import:(()=>T(()=>import(`./_B_tTalzw.js`),[]))},{id:`github-light`,displayName:`GitHub Light`,type:`light`,import:(()=>T(()=>import(`./_EUqPIrTm.js`),[]))},{id:`github-light-default`,displayName:`GitHub Light Default`,type:`light`,import:(()=>T(()=>import(`./_BXViO-2h.js`),[]))},{id:`github-light-high-contrast`,displayName:`GitHub Light High Contrast`,type:`light`,import:(()=>T(()=>import(`./_B68TUdTA.js`),[]))},{id:`gruvbox-dark-hard`,displayName:`Gruvbox Dark Hard`,type:`dark`,import:(()=>T(()=>import(`./_C820rvS2.js`),[]))},{id:`gruvbox-dark-medium`,displayName:`Gruvbox Dark Medium`,type:`dark`,import:(()=>T(()=>import(`./_BPjhmG05.js`),[]))},{id:`gruvbox-dark-soft`,displayName:`Gruvbox Dark Soft`,type:`dark`,import:(()=>T(()=>import(`./_MrdJrrXF.js`),[]))},{id:`gruvbox-light-hard`,displayName:`Gruvbox Light Hard`,type:`light`,import:(()=>T(()=>import(`./_BC_s9l72.js`),[]))},{id:`gruvbox-light-medium`,displayName:`Gruvbox Light Medium`,type:`light`,import:(()=>T(()=>import(`./_BAWPOn9u.js`),[]))},{id:`gruvbox-light-soft`,displayName:`Gruvbox Light Soft`,type:`light`,import:(()=>T(()=>import(`./_BSMLrYjP.js`),[]))},{id:`horizon`,displayName:`Horizon`,type:`dark`,import:(()=>T(()=>import(`./_CE9ld1lL.js`),[]))},{id:`horizon-bright`,displayName:`Horizon Bright`,type:`light`,import:(()=>T(()=>import(`./_DSNQnXHK.js`),[]))},{id:`houston`,displayName:`Houston`,type:`dark`,import:(()=>T(()=>import(`./_CsvMBhTu.js`),[]))},{id:`kanagawa-dragon`,displayName:`Kanagawa Dragon`,type:`dark`,import:(()=>T(()=>import(`./_Bozd7klA.js`),[]))},{id:`kanagawa-lotus`,displayName:`Kanagawa Lotus`,type:`light`,import:(()=>T(()=>import(`./_BmuOG9ZW.js`),[]))},{id:`kanagawa-wave`,displayName:`Kanagawa Wave`,type:`dark`,import:(()=>T(()=>import(`./_BML5mF2J.js`),[]))},{id:`laserwave`,displayName:`LaserWave`,type:`dark`,import:(()=>T(()=>import(`./_C_8bwKvT.js`),[]))},{id:`light-plus`,displayName:`Light Plus`,type:`light`,import:(()=>T(()=>import(`./_DVQuIRkW.js`),[]))},{id:`material-theme`,displayName:`Material Theme`,type:`dark`,import:(()=>T(()=>import(`./_Bm3Qr25_.js`),[]))},{id:`material-theme-darker`,displayName:`Material Theme Darker`,type:`dark`,import:(()=>T(()=>import(`./_2IIEA8gg.js`),[]))},{id:`material-theme-lighter`,displayName:`Material Theme Lighter`,type:`light`,import:(()=>T(()=>import(`./_uhdI0v04.js`),[]))},{id:`material-theme-ocean`,displayName:`Material Theme Ocean`,type:`dark`,import:(()=>T(()=>import(`./_CHQ94UKr.js`),[]))},{id:`material-theme-palenight`,displayName:`Material Theme Palenight`,type:`dark`,import:(()=>T(()=>import(`./_B5W6OYN7.js`),[]))},{id:`min-dark`,displayName:`Min Dark`,type:`dark`,import:(()=>T(()=>import(`./_BSWPekZh.js`),[]))},{id:`min-light`,displayName:`Min Light`,type:`light`,import:(()=>T(()=>import(`./_DDpmG2fV.js`),[]))},{id:`monokai`,displayName:`Monokai`,type:`dark`,import:(()=>T(()=>import(`./_B_bV9PQ9.js`),[]))},{id:`night-owl`,displayName:`Night Owl`,type:`dark`,import:(()=>T(()=>import(`./_DhmEMT88.js`),[]))},{id:`night-owl-light`,displayName:`Night Owl Light`,type:`light`,import:(()=>T(()=>import(`./_eJ-hLW7d.js`),[]))},{id:`nord`,displayName:`Nord`,type:`dark`,import:(()=>T(()=>import(`./_Cb4Vim4T.js`),[]))},{id:`one-dark-pro`,displayName:`One Dark Pro`,type:`dark`,import:(()=>T(()=>import(`./_CLwyXe_n.js`),[]))},{id:`one-light`,displayName:`One Light`,type:`light`,import:(()=>T(()=>import(`./_D7Lr4KcI.js`),[]))},{id:`plastic`,displayName:`Plastic`,type:`dark`,import:(()=>T(()=>import(`./_DQwYfKfQ.js`),[]))},{id:`poimandres`,displayName:`Poimandres`,type:`dark`,import:(()=>T(()=>import(`./_DRFjx7u4.js`),[]))},{id:`red`,displayName:`Red`,type:`dark`,import:(()=>T(()=>import(`./_DX1BQOs8.js`),[]))},{id:`rose-pine`,displayName:`Rosé Pine`,type:`dark`,import:(()=>T(()=>import(`./_aMsaMD1D.js`),[]))},{id:`rose-pine-dawn`,displayName:`Rosé Pine Dawn`,type:`light`,import:(()=>T(()=>import(`./_8PwUyIlP.js`),[]))},{id:`rose-pine-moon`,displayName:`Rosé Pine Moon`,type:`dark`,import:(()=>T(()=>import(`./_DO-qXg-I.js`),[]))},{id:`slack-dark`,displayName:`Slack Dark`,type:`dark`,import:(()=>T(()=>import(`./_DnToyrRv.js`),[]))},{id:`slack-ochin`,displayName:`Slack Ochin`,type:`light`,import:(()=>T(()=>import(`./_B2OO5cIa.js`),[]))},{id:`snazzy-light`,displayName:`Snazzy Light`,type:`light`,import:(()=>T(()=>import(`./_4G7pJPwS.js`),[]))},{id:`solarized-dark`,displayName:`Solarized Dark`,type:`dark`,import:(()=>T(()=>import(`./_UdsmMDCL.js`),[]))},{id:`solarized-light`,displayName:`Solarized Light`,type:`light`,import:(()=>T(()=>import(`./_C1IUL_tW.js`),[]))},{id:`synthwave-84`,displayName:`Synthwave '84`,type:`dark`,import:(()=>T(()=>import(`./_nFMaYfgc.js`),[]))},{id:`tokyo-night`,displayName:`Tokyo Night`,type:`dark`,import:(()=>T(()=>import(`./_oM2G3aXe.js`),[]))},{id:`vesper`,displayName:`Vesper`,type:`dark`,import:(()=>T(()=>import(`./_DdrHHSXu.js`),[]))},{id:`vitesse-black`,displayName:`Vitesse Black`,type:`dark`,import:(()=>T(()=>import(`./_fwtXNY1n.js`),[]))},{id:`vitesse-dark`,displayName:`Vitesse Dark`,type:`dark`,import:(()=>T(()=>import(`./_BZCL-v6S.js`),[]))},{id:`vitesse-light`,displayName:`Vitesse Light`,type:`light`,import:(()=>T(()=>import(`./_VbXTXTou.js`),[]))}].map(e=>[e.id,e.import])),Nt=t({createOnigurumaEngine:()=>sn,getDefaultWasmLoader:()=>on,loadWasm:()=>$t,setDefaultWasmLoader:()=>an}),Pt=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function Ft(){return 2147483648}function It(){return typeof performance<`u`?performance.now():Date.now()}var Lt=(e,t)=>e+(t-e%t)%t;async function Rt(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=Ft();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,Lt(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:It,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 zt=Object.defineProperty,Bt=(e,t,n)=>t in e?zt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Vt=(e,t,n)=>Bt(e,typeof t==`symbol`?t:t+``,n),R=null;function Ht(e){throw new Pt(e.UTF8ToString(e.getLastOnigError()))}var Ut=class e{constructor(t){Vt(this,`utf16Length`),Vt(this,`utf8Length`),Vt(this,`utf16Value`),Vt(this,`utf8Value`),Vt(this,`utf16OffsetToUtf8`),Vt(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}},Wt=class e{constructor(t){if(Vt(this,`id`,++e.LAST_ID),Vt(this,`_onigBinding`),Vt(this,`content`),Vt(this,`utf16Length`),Vt(this,`utf8Length`),Vt(this,`utf16OffsetToUtf8`),Vt(this,`utf8OffsetToUtf16`),Vt(this,`ptr`),!R)throw new Pt(`Must invoke loadWasm first.`);this._onigBinding=R,this.content=t;let n=new Ut(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||=R.omalloc(1e4),e._sharedPtrInUse=!0,R.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString(R)}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)}};Vt(Wt,`LAST_ID`,0),Vt(Wt,`_sharedPtr`,0),Vt(Wt,`_sharedPtrInUse`,!1);var Gt=Wt,Kt=class{constructor(e){if(Vt(this,`_onigBinding`),Vt(this,`_ptr`),!R)throw new Pt(`Must invoke loadWasm first.`);let t=[],n=[];for(let r=0,i=e.length;r<i;r++){let i=new Ut(e[r]);t[r]=i.createString(R),n[r]=i.utf8Length}let r=R.omalloc(4*e.length);R.HEAPU32.set(t,r/4);let i=R.omalloc(4*e.length);R.HEAPU32.set(n,i/4);let a=R.createOnigScanner(r,i,e.length);for(let n=0,r=e.length;n<r;n++)R.ofree(t[n]);R.ofree(i),R.ofree(r),a===0&&Ht(R),this._onigBinding=R,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 Gt(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 qt(e){return typeof e.instantiator==`function`}function Jt(e){return typeof e.default==`function`}function Yt(e){return e.data!==void 0}function Xt(e){return typeof Response<`u`&&e instanceof Response}function Zt(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 Qt;function $t(e){if(Qt)return Qt;async function t(){R=await Rt(async t=>{let n=e;return n=await n,typeof n==`function`&&(n=await n(t)),typeof n==`function`&&(n=await n(t)),qt(n)?n=await n.instantiator(t):Jt(n)?n=await n.default(t):(Yt(n)&&(n=n.data),Xt(n)?n=typeof WebAssembly.instantiateStreaming==`function`?await tn(n)(t):await nn(n)(t):Zt(n)||n instanceof WebAssembly.Module?n=await en(n)(t):`default`in n&&n.default instanceof WebAssembly.Module&&(n=await en(n.default)(t))),`instance`in n&&(n=n.instance),`exports`in n&&(n=n.exports),n})}return Qt=t(),Qt}function en(e){return t=>WebAssembly.instantiate(e,t)}function tn(e){return t=>WebAssembly.instantiateStreaming(e,t)}function nn(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}var rn;function an(e){rn=e}function on(){return rn}async function sn(e){return e&&await $t(e),{createScanner(e){return new Kt(e.map(e=>typeof e==`string`?e:e.source))},createString(e){return new Gt(e)}}}var cn=Tt({});Dt(cn,Nt);var z=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function ln(e){return un(e)}function un(e){return Array.isArray(e)?dn(e):e instanceof RegExp?e:typeof e==`object`?fn(e):e}function dn(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=un(e[n]);return t}function fn(e){let t={};for(let n in e)t[n]=un(e[n]);return t}function pn(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function mn(e){let t=~e.lastIndexOf(`/`)||~e.lastIndexOf(`\\`);return t===0?e:~t===e.length-1?mn(e.substring(0,e.length-1)):e.substr(~t+1)}var hn=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,gn=class{static hasCaptures(e){return e!==null&&(hn.lastIndex=0,hn.test(e))}static replaceCaptures(e,t,n){return e.replace(hn,(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 _n(e,t){return e<t?-1:+(e>t)}function vn(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=_n(e[r],t[r]);if(n!==0)return n}return 0}return n-r}function yn(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 bn(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,`\\$&`)}var xn=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}},Sn=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(Dn(e),t)}static createFromParsedTheme(e,t){return An(e,t)}_cachedMatchRoot=new xn(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=>wn(e.parent,t.parentScopes));return n?new En(n.fontStyle,n.foreground,n.background):null}},Cn=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 wn(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&&!Tn(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function Tn(e,t){return t===e||e.startsWith(t)&&e[t.length]===`.`}var En=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function Dn(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`&&yn(i.settings.foreground)&&(s=i.settings.foreground);let c=null;typeof i.settings.background==`string`&&yn(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 On(l,u,e,o,s,c)}}return n}var On=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}},kn=(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))(kn||{});function An(e,t){e.sort((e,t)=>{let n=_n(e.scope,t.scope);return n!==0||(n=vn(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 jn(t),o=new En(n,a.getId(r),a.getId(i)),s=new Pn(new Nn(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 Sn(a,o,s)}var jn=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)}},Mn=Object.freeze([]),Nn=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||Mn,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)}},Pn=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(),Nn.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(vn(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 Nn(e,t,n,r,i))}},Fn=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=Ln(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 In(e){return e}function Ln(e){return e}function Rn(e,t){let n=[],r=Bn(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(zn(i)){let e=[];do e.push(i),i=r.next();while(zn(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 zn(e){return!!e&&!!e.match(/[\w\.:]+/)}function Bn(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 Vn(e){typeof e.dispose==`function`&&e.dispose()}var Hn=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},Un=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},Wn=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))}},Gn=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Hn(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new Wn;for(let n of e)Kn(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof Hn){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 Kn(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 Hn?Jn({baseGrammar:a,selfGrammar:i},r):qn(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 Hn(e))}function qn(e,t,n){if(t.repository&&t.repository[e]){let r=t.repository[e];Yn([r],t,n)}}function Jn(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&Yn(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&Yn(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function Yn(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?pn({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&Yn(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let a=tr(i);switch(a.kind){case 0:Jn({...t,selfGrammar:t.baseGrammar},n);break;case 1:Jn(t,n);break;case 2:qn(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?qn(a.ruleName,i,n):Jn(i,n)}else a.kind===4?n.add(new Un(a.scopeName,a.ruleName)):n.add(new Hn(a.scopeName))}}}var Xn=class{kind=0},Zn=class{kind=1},Qn=class{constructor(e){this.ruleName=e}kind=2},$n=class{constructor(e){this.scopeName=e}kind=3},er=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function tr(e){if(e===`$base`)return new Xn;if(e===`$self`)return new Zn;let t=e.indexOf(`#`);return t===-1?new $n(e):t===0?new Qn(e.substring(1)):new er(e.substring(0,t),e.substring(t+1))}var nr=/\\(\d+)/,rr=/\\(\d+)/g,ir=-1,ar=-2;function or(e){return e}function sr(e){return e}var cr=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=gn.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=gn.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${mn(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:gn.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:gn.replaceCaptures(this._contentName,e,t)}},lr=class extends cr{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!`)}},ur=class extends cr{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new hr(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 gr,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},dr=class extends cr{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 gr,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},fr=class extends cr{_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 hr(i,this.id),this.beginCaptures=a,this._end=new hr(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 gr;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}},pr=class extends cr{_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 hr(i,this.id),this.beginCaptures=a,this.whileCaptures=s,this._while=new hr(o,ar),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 gr;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 gr,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||``),this._cachedCompiledWhilePatterns}},mr=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new lr(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new ur(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(t.begin===void 0){t.repository&&(r=pn({},r,t.repository));let i=t.patterns;return i===void 0&&t.include&&(i=[{include:t.include}]),new dr(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new pr(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 fr(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=tr(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 dr||e instanceof fr||e instanceof pr)&&e.hasMissingPatterns&&e.patterns.length===0&&(t=!0),t)continue;i.push(s)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},hr=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`&&nr.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 rr.lastIndex=0,this.source.replace(rr,(e,t)=>bn(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}},gr=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 _r(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 _r(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},_r=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(`
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_B8MJcLaM.js","assets/_CLiSZPPg.js","assets/_DQPZ_gMG.js","assets/_CNxXQqXS.js","assets/icon-search-BxpLvwZF.css","assets/_Dc2TbKDN.js","assets/_LVs8hGnf.js","assets/icon-go-to-file-BtF0WaqZ.css","assets/_Dl_aiyLq.js","assets/_CCDxcQQY.js","assets/_DIqCp0Dr.js","assets/_BRObdg0l.js","assets/_awPDUP7f.js","assets/_B46lef50.js","assets/_De3Bqgjq.js","assets/_Z_elapBC.js","assets/_C3I-Anub.js","assets/_CzfZbwGO.js","assets/_BdDLH1XV.js","assets/_BXeXVLqQ.js","assets/_D-97toYv.js","assets/_BJy_w8mx.js","assets/_ktZqvcQv.js","assets/_v2hjUzql.js","assets/_YkIvmgMd.js","assets/_bTVj8UrX.js","assets/_BAP6pe7u.js","assets/_BAfg1_wL.js","assets/_gzcpVVnB.js","assets/_F4wO2bpH.js","assets/_C55Vt4KA.js","assets/_Bw3gx4-Q.js","assets/_fxmXMnQo.js","assets/_BdAMRKrG.js","assets/_Ds8cRiqE.js","assets/_YChD2z1e.js","assets/_DDXMnJp1.js","assets/_pk73RhvL.js","assets/_BRSKw1cV.js","assets/_BhWv3wNf.js","assets/_IKyWRqQj.js","assets/_C-1cKTkv.js","assets/_18epjYOV.js","assets/_zte35G0C.js","assets/_D78Rmq5N.js","assets/_C683mkqv.js","assets/_BlzNrz3K.js","assets/_BaHq4SXp.js","assets/_BYOwaDjH.js","assets/_CQJs3lWb.js","assets/_CYNrtFtB.js","assets/_DmIc4jLQ.js","assets/_DbYA3moe.js","assets/_CBce3t8t.js","assets/_DYvRD3hg.js","assets/_Dl-2e7rI.js","assets/_woXpYk--.js","assets/_CrQmOSDl.js","assets/_0h0AIzFj.js","assets/_DBgXUlmC.js","assets/_DHUfylTf.js","assets/_BAlyV91f.js","assets/_DtkWFnwh.js","assets/_CXxKcxHR.js","assets/_Dx-8-gkx.js","assets/_DekxQCZG.js","assets/_C8oCnwJJ.js","assets/_CnCRB0XK.js","assets/_DcDGku3c.js","assets/_BUWvw-TH.js","assets/_DiZR5A2Z.js","assets/_BRphDJH_.js","assets/_Cgb2RJJJ.js","assets/_b5I_nxEK.js","assets/_dLObuZst.js","assets/_CB4KzoDJ.js","assets/_LyXyKVdu.js","assets/_DVTAwKKz.js","assets/_lNS9HyGM.js","assets/_DWQbgPoS.js","assets/_DJMQeKeT.js","assets/_CjKem1sO.js","assets/_BnV94dO7.js","assets/_DPzxebn1.js","assets/_DqKBuwfJ.js","assets/_oqKa8noW.js","assets/_CnvKMtbv.js","assets/_IyjqRm3v.js","assets/_rLFTqkRN.js","assets/_CacY0gHj.js","assets/_B5eOa1yu.js","assets/_Dixweg8N.js","assets/_D1A_Heim.js","assets/_O90oeIOV.js","assets/_ZKNPt6D-.js","assets/_DOwzaHZ0.js","assets/_B3gFvitq.js","assets/_Cfkwpbl8.js","assets/_BiFt_7mu.js","assets/_CMLA9XwU.js","assets/_C4mnN_oZ.js","assets/_DP2LKafM.js","assets/_C5YR9YJh.js","assets/_sA9LOck8.js","assets/_CakhbveI.js","assets/_Bj61d0ZC.js","assets/__3UGRi5e.js","assets/_DB-OQ-9y.js","assets/_Cvrh5tZx.js","assets/_DQb-Prlp.js","assets/_n9oRx7Ms.js","assets/_L8AbGenz.js","assets/_ByJddavk.js","assets/_CzbgKank.js","assets/_CoJxQd1B.js","assets/_DECvFD3C.js","assets/_DfQw6r-m.js","assets/_CWMJH-rn.js","assets/_AiyczSWt.js","assets/_BOc-526n.js","assets/_qdxAdBWQ.js","assets/_Ci_nEsc7.js","assets/_CYpm1nAK.js","assets/_BNLmms1o.js","assets/_CCSX75yM.js","assets/_CyEgAFGc.js","assets/_Dh5ihWbf.js","assets/_B2gwz-sJ.js","assets/_W5nLbLR0.js","assets/_DG3lNhs6.js","assets/_DOgiz2sq.js","assets/_B6D30XZt.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{F as e,I as t,L as n,O as r,o as i,s as a}from"./_CLiSZPPg.js";import{B as o,F as s,G as c,H as l,I as u,K as d,L as f,N as p,O as m,P as h,R as g,S as _,W as v,a as y,b,d as x,f as S,i as C,p as w,t as T,u as E,x as D,y as O,z as k}from"./_DQPZ_gMG.js";import{C as A,E as ee,S as j,T as te,W as M,Z as ne,_ as re,_t as ie,a as ae,b as oe,bn as se,gn as ce,ht as le,i as ue,n as de,r as fe,t as pe,v as me,vt as he,w as ge,wt as _e,x as ve,y as ye}from"./_CNxXQqXS.js";import{c as be,i as xe,l as Se,n as Ce,o as we,r as Te,s as Ee}from"./_DZ9AjglW.js";import{a as De,c as Oe,d as N,f as ke,i as Ae,l as je,n as Me,o as Ne,p as Pe,r as Fe,s as Ie,t as Le,u as Re}from"./_CW2a9XvK.js";import{t as ze}from"./_CcFCI5Av.js";import{i as Be,n as Ve,r as He,t as Ue}from"./_DKA87yrO.js";var We=`diffs-container`,Ge=(()=>{try{return!1}catch{return!1}})(),Ke=/(?=^From [a-f0-9]+ .+$)/m,qe=/(?=^diff --git)/gm,Je=/(?<=\n)/,Ye=/^(---|\+\+\+)\s+([^\t\r\n]+)/,Xe=/^(---|\+\+\+)\s+[ab]\/([^\t\r\n]+)/,Ze=/^diff --git (?:"a\/(.+?)"|a\/(.+?)) (?:"b\/(.+?)"|b\/(.+?))$/,Qe=/^index ([0-9a-f]+)\.\.([0-9a-f]+)(?: (\d+))?$/i,$e=`header-prefix`,et=`header-filename-suffix`,tt=`header-metadata`,nt=`header-custom`,P={dark:`pierre-dark`,light:`pierre-light`},rt=`data-theme-css`,it=`data-unsafe-css`,at=`data-diffs-scrollbar-measure`,ot=`data-diffs-code-view-header`,st=`data-diffs-code-view-footer`,ct=`--diffs-scrollbar-gutter-measured`,lt=1e5,F={hunkLineCount:50,lineHeight:20,diffHeaderHeight:44,spacing:8},I={...F,hunkLineCount:1},ut={paddingTop:8,paddingBottom:8,gap:8},dt={omega:.015,positionEpsilon:.5,velocityEpsilon:.05},ft=Object.freeze({fromStart:0,fromEnd:0}),pt={startingLine:0,totalLines:1/0,bufferBefore:0,bufferAfter:0},mt={startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:0},ht=new Map,gt=new Map,_t=new Map,vt=new Set;function L(e){for(let t of Array.isArray(e)?e:[e])if(t!==`text`&&t!==`ansi`&&!vt.has(t))return!1;return!0}function yt(e,t){e=Array.isArray(e)?e:[e];for(let n of e){if(vt.has(n.name))continue;let e=ht.get(n.name);e??(e=n,ht.set(n.name,e));let r=e.data.find(t=>t.name===e.name||t.aliases?.includes(e.name)===!0);if(r==null)throw Error(`attachResolvedLanguages: No returned grammar declares "${e.name}" as its name or an alias.`);t.loadLanguageSync(e.data);try{t.getLanguage(e.name)}catch{throw Error(`attachResolvedLanguages: "${r.name}" is already loaded without alias "${e.name}". Load the alias first or give the grammar a unique name.`)}vt.add(e.name)}}function bt(){return typeof WorkerGlobalScope<`u`&&typeof self<`u`&&self instanceof WorkerGlobalScope}var xt=Object.defineProperty,St=Object.getOwnPropertyDescriptor,Ct=Object.getOwnPropertyNames,wt=Object.prototype.hasOwnProperty,Tt=(e,t)=>{let n={};for(var r in e)xt(n,r,{get:e[r],enumerable:!0});return t||xt(n,Symbol.toStringTag,{value:`Module`}),n},Et=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=Ct(t),a=0,o=i.length,s;a<o;a++)s=i[a],!wt.call(e,s)&&s!==n&&xt(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=St(t,s))||r.enumerable});return e},Dt=(e,t,n)=>(Et(e,t,`default`),n&&Et(n,t,`default`)),Ot=[{id:`abap`,name:`ABAP`,import:(()=>T(()=>import(`./_CLvhMVsD.js`),[]))},{id:`actionscript-3`,name:`ActionScript`,aliases:[`actionscript`,`as3`],import:(()=>T(()=>import(`./_Cs6JJXT5.js`),[]))},{id:`ada`,name:`Ada`,import:(()=>T(()=>import(`./_C5qYipkI.js`),[]))},{id:`ahk`,name:`AutoHotkey`,aliases:[`ahk1`],import:(()=>T(()=>import(`./_CA9gdOdF.js`),[]))},{id:`ahk2`,name:`AutoHotkey2`,import:(()=>T(()=>import(`./__6rzW9BS.js`),[]))},{id:`angular-html`,name:`Angular HTML`,import:(()=>T(()=>import(`./_B8MJcLaM.js`).then(e=>e.n),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])))},{id:`angular-ts`,name:`Angular TypeScript`,import:(()=>T(()=>import(`./_BRObdg0l.js`),__vite__mapDeps([11,0,1,2,3,4,5,6,7,8,9,10,12])))},{id:`apache`,name:`Apache Conf`,import:(()=>T(()=>import(`./_U0d_L8uA.js`),[]))},{id:`apex`,name:`Apex`,import:(()=>T(()=>import(`./_KFGFyKwG.js`),[]))},{id:`apl`,name:`APL`,import:(()=>T(()=>import(`./_B46lef50.js`),__vite__mapDeps([13,9,1,2,3,4,5,6,7,10,8,14,15,16])))},{id:`applescript`,name:`AppleScript`,import:(()=>T(()=>import(`./_CCn79oCD.js`),[]))},{id:`ara`,name:`Ara`,import:(()=>T(()=>import(`./_4CJ0cIlV.js`),[]))},{id:`asciidoc`,name:`AsciiDoc`,aliases:[`adoc`],import:(()=>T(()=>import(`./_SCjQUq34.js`),[]))},{id:`asm`,name:`Assembly`,import:(()=>T(()=>import(`./_Cmm7eHzH.js`),[]))},{id:`astro`,name:`Astro`,import:(()=>T(()=>import(`./_CzfZbwGO.js`),__vite__mapDeps([17,9,1,2,3,4,5,6,7,10,16,18,19,20])))},{id:`awk`,name:`AWK`,import:(()=>T(()=>import(`./_BWXHIvNe.js`),[]))},{id:`ballerina`,name:`Ballerina`,import:(()=>T(()=>import(`./_B7ZEbQpA.js`),[]))},{id:`bat`,name:`Batch File`,aliases:[`batch`,`cmd`],import:(()=>T(()=>import(`./_qdxAdBWQ.js`),[]))},{id:`beancount`,name:`Beancount`,import:(()=>T(()=>import(`./_D-usSTwE.js`),[]))},{id:`berry`,name:`Berry`,aliases:[`be`],import:(()=>T(()=>import(`./_DKpUyyne.js`),[]))},{id:`bibtex`,name:`BibTeX`,import:(()=>T(()=>import(`./_Ci_nEsc7.js`),[]))},{id:`bicep`,name:`Bicep`,import:(()=>T(()=>import(`./_CUHmPFLl.js`),[]))},{id:`bird2`,name:`BIRD2 Configuration`,aliases:[`bird`],import:(()=>T(()=>import(`./_CYIUgYqB.js`),[]))},{id:`blade`,name:`Blade`,import:(()=>T(()=>import(`./_BJy_w8mx.js`),__vite__mapDeps([21,9,1,2,3,4,5,6,7,10,8,14,15,16,22,23])))},{id:`bsl`,name:`1C (Enterprise)`,aliases:[`1c`],import:(()=>T(()=>import(`./_YkIvmgMd.js`),__vite__mapDeps([24,25])))},{id:`c`,name:`C`,import:(()=>T(()=>import(`./_BAP6pe7u.js`).then(e=>e.n),__vite__mapDeps([26,1,2,3,4,5,6,7])))},{id:`c3`,name:`C3`,import:(()=>T(()=>import(`./_D0apG41V.js`),[]))},{id:`cadence`,name:`Cadence`,aliases:[`cdc`],import:(()=>T(()=>import(`./_CQ2zXKGN.js`),[]))},{id:`cairo`,name:`Cairo`,import:(()=>T(()=>import(`./_BAfg1_wL.js`),__vite__mapDeps([27,28])))},{id:`chapel`,name:`Chapel`,aliases:[`chpl`],import:(()=>T(()=>import(`./_F4wO2bpH.js`),__vite__mapDeps([29,26,1,2,3,4,5,6,7])))},{id:`clarity`,name:`Clarity`,import:(()=>T(()=>import(`./_CtfBBspg.js`),[]))},{id:`clojure`,name:`Clojure`,aliases:[`clj`],import:(()=>T(()=>import(`./_DqKBuwfJ.js`),[]))},{id:`cmake`,name:`CMake`,import:(()=>T(()=>import(`./_Bj61d0ZC.js`),[]))},{id:`cobol`,name:`COBOL`,import:(()=>T(()=>import(`./_C55Vt4KA.js`),__vite__mapDeps([30,8,1,2,3,4,5,6,7,9,10,15])))},{id:`codeowners`,name:`CODEOWNERS`,import:(()=>T(()=>import(`./_C8r90Shi.js`),[]))},{id:`codeql`,name:`CodeQL`,aliases:[`ql`],import:(()=>T(()=>import(`./_oeQT6MSM.js`),[]))},{id:`coffee`,name:`CoffeeScript`,aliases:[`coffeescript`],import:(()=>T(()=>import(`./_Bw3gx4-Q.js`),__vite__mapDeps([31,9,1,2,3,4,5,6,7])))},{id:`common-lisp`,name:`Common Lisp`,aliases:[`lisp`],import:(()=>T(()=>import(`./_Cv5bFMCO.js`),[]))},{id:`coq`,name:`Rocq`,import:(()=>T(()=>import(`./_DuBRPxYg.js`),[]))},{id:`cpp`,name:`C++`,aliases:[`c++`],import:(()=>T(()=>import(`./_fxmXMnQo.js`).then(e=>e.n),__vite__mapDeps([32,1,2,3,4,5,6,7,33,34,26])))},{id:`crystal`,name:`Crystal`,import:(()=>T(()=>import(`./_YChD2z1e.js`),__vite__mapDeps([35,9,1,2,3,4,5,6,7,10,8,23,26,36])))},{id:`csharp`,name:`C#`,aliases:[`c#`,`cs`],import:(()=>T(()=>import(`./_oqKa8noW.js`),[]))},{id:`css`,name:`CSS`,import:(()=>T(()=>import(`./_DIqCp0Dr.js`).then(e=>e.n),__vite__mapDeps([10,1,2,3,4,5,6,7])))},{id:`csv`,name:`CSV`,import:(()=>T(()=>import(`./_Dx-8-gkx.js`),[]))},{id:`cue`,name:`CUE`,import:(()=>T(()=>import(`./_CE9AQfxI.js`),[]))},{id:`cypher`,name:`Cypher`,aliases:[`cql`],import:(()=>T(()=>import(`./_ClKdZ_lG.js`),[]))},{id:`d`,name:`D`,import:(()=>T(()=>import(`./_qD-0Kul2.js`),[]))},{id:`dart`,name:`Dart`,import:(()=>T(()=>import(`./_CnvKMtbv.js`),[]))},{id:`dax`,name:`DAX`,import:(()=>T(()=>import(`./_BkyTk9wS.js`),[]))},{id:`desktop`,name:`Desktop`,import:(()=>T(()=>import(`./_Dlh5hvp9.js`),[]))},{id:`diff`,name:`Diff`,import:(()=>T(()=>import(`./_woXpYk--.js`),[]))},{id:`docker`,name:`Dockerfile`,aliases:[`dockerfile`],import:(()=>T(()=>import(`./_IyjqRm3v.js`),[]))},{id:`dotenv`,name:`dotEnv`,import:(()=>T(()=>import(`./__5a1GRtc.js`),[]))},{id:`dream-maker`,name:`Dream Maker`,import:(()=>T(()=>import(`./_DW3nJb8Q.js`),[]))},{id:`edge`,name:`Edge`,import:(()=>T(()=>import(`./_pk73RhvL.js`),__vite__mapDeps([37,8,1,2,3,4,5,6,7,9,10,18,22])))},{id:`elixir`,name:`Elixir`,import:(()=>T(()=>import(`./_BRSKw1cV.js`),__vite__mapDeps([38,8,1,2,3,4,5,6,7,9,10])))},{id:`elm`,name:`Elm`,import:(()=>T(()=>import(`./_BhWv3wNf.js`),__vite__mapDeps([39,34,1,2,3,4,5,6,7,26])))},{id:`emacs-lisp`,name:`Emacs Lisp`,aliases:[`elisp`],import:(()=>T(()=>import(`./_c_oH4hRZ.js`),[]))},{id:`erb`,name:`ERB`,import:(()=>T(()=>import(`./_IKyWRqQj.js`),__vite__mapDeps([40,8,1,2,3,4,5,6,7,9,10,41,14,15,23,26,32,33,34,36,42,43,18,20,44,45,46])))},{id:`erlang`,name:`Erlang`,aliases:[`erl`],import:(()=>T(()=>import(`./_BaHq4SXp.js`),__vite__mapDeps([47,48])))},{id:`fennel`,name:`Fennel`,import:(()=>T(()=>import(`./_DQxkIbk2.js`),[]))},{id:`fish`,name:`Fish`,import:(()=>T(()=>import(`./_BJitypiv.js`),[]))},{id:`fluent`,name:`Fluent`,aliases:[`ftl`],import:(()=>T(()=>import(`./_C03EYrpw.js`),[]))},{id:`fortran-fixed-form`,name:`Fortran (Fixed Form)`,aliases:[`f`,`for`,`f77`],import:(()=>T(()=>import(`./_CQJs3lWb.js`),__vite__mapDeps([49,50])))},{id:`fortran-free-form`,name:`Fortran (Free Form)`,aliases:[`f90`,`f95`,`f03`,`f08`,`f18`],import:(()=>T(()=>import(`./_CYNrtFtB.js`),[]))},{id:`fsharp`,name:`F#`,aliases:[`f#`,`fs`],import:(()=>T(()=>import(`./_DmIc4jLQ.js`),__vite__mapDeps([51,48])))},{id:`gdresource`,name:`GDResource`,aliases:[`tscn`,`tres`],import:(()=>T(()=>import(`./_DbYA3moe.js`),__vite__mapDeps([52,53,54])))},{id:`gdscript`,name:`GDScript`,aliases:[`gd`],import:(()=>T(()=>import(`./_DYvRD3hg.js`),[]))},{id:`gdshader`,name:`GDShader`,import:(()=>T(()=>import(`./_CBce3t8t.js`),[]))},{id:`genie`,name:`Genie`,import:(()=>T(()=>import(`./_CV2tkWYe.js`),[]))},{id:`gherkin`,name:`Gherkin`,import:(()=>T(()=>import(`./_DExj1W_8.js`),[]))},{id:`git-commit`,name:`Git Commit Message`,import:(()=>T(()=>import(`./_Dl-2e7rI.js`),__vite__mapDeps([55,56])))},{id:`git-rebase`,name:`Git Rebase Message`,import:(()=>T(()=>import(`./_CrQmOSDl.js`),__vite__mapDeps([57,36,1,2,3,4,5,6,7])))},{id:`gleam`,name:`Gleam`,import:(()=>T(()=>import(`./_CSRkHgEL.js`),[]))},{id:`glimmer-js`,name:`Glimmer JS`,aliases:[`gjs`],import:(()=>T(()=>import(`./_0h0AIzFj.js`),__vite__mapDeps([58,9,1,2,3,4,5,6,7,10,8,18])))},{id:`glimmer-ts`,name:`Glimmer TS`,aliases:[`gts`],import:(()=>T(()=>import(`./_DBgXUlmC.js`),__vite__mapDeps([59,9,1,2,3,4,5,6,7,10,8,18])))},{id:`glsl`,name:`GLSL`,import:(()=>T(()=>import(`./_Ds8cRiqE.js`).then(e=>e.n),__vite__mapDeps([34,1,2,3,4,5,6,7,26])))},{id:`gn`,name:`GN`,import:(()=>T(()=>import(`./_ilITqXS6.js`),[]))},{id:`gnuplot`,name:`Gnuplot`,import:(()=>T(()=>import(`./_7GGW24-e.js`),[]))},{id:`go`,name:`Go`,import:(()=>T(()=>import(`./_rLFTqkRN.js`),[]))},{id:`graphql`,name:`GraphQL`,aliases:[`gql`],import:(()=>T(()=>import(`./_zte35G0C.js`).then(e=>e.n),__vite__mapDeps([43,1,2,3,4,5,6,7,9,18,20,44])))},{id:`groovy`,name:`Groovy`,import:(()=>T(()=>import(`./_CacY0gHj.js`),[]))},{id:`hack`,name:`Hack`,import:(()=>T(()=>import(`./_DHUfylTf.js`),__vite__mapDeps([60,8,1,2,3,4,5,6,7,9,10,23])))},{id:`haml`,name:`Ruby Haml`,import:(()=>T(()=>import(`./_18epjYOV.js`).then(e=>e.n),__vite__mapDeps([42,1,2,3,4,5,6,7,9,10])))},{id:`handlebars`,name:`Handlebars`,aliases:[`hbs`],import:(()=>T(()=>import(`./_BAlyV91f.js`),__vite__mapDeps([61,9,1,2,3,4,5,6,7,10,8,46])))},{id:`haskell`,name:`Haskell`,aliases:[`hs`],import:(()=>T(()=>import(`./_D8IpX4py.js`),[]))},{id:`haxe`,name:`Haxe`,import:(()=>T(()=>import(`./_C8oCnwJJ.js`),[]))},{id:`hcl`,name:`HashiCorp HCL`,import:(()=>T(()=>import(`./_Dh228itO.js`),[]))},{id:`hjson`,name:`Hjson`,import:(()=>T(()=>import(`./_CxZEssPk.js`),[]))},{id:`hlsl`,name:`HLSL`,import:(()=>T(()=>import(`./_Cvrh5tZx.js`),[]))},{id:`html`,name:`HTML`,import:(()=>T(()=>import(`./_Dl_aiyLq.js`).then(e=>e.n),__vite__mapDeps([8,1,2,3,4,5,6,7,9,10])))},{id:`html-derivative`,name:`HTML (Derivative)`,import:(()=>T(()=>import(`./_ktZqvcQv.js`),__vite__mapDeps([22,8,1,2,3,4,5,6,7,9,10])))},{id:`http`,name:`HTTP`,import:(()=>T(()=>import(`./_DtkWFnwh.js`),__vite__mapDeps([62,14,1,2,3,4,5,6,7,15,16,36,43,9,18,20,44])))},{id:`hurl`,name:`Hurl`,import:(()=>T(()=>import(`./_CXxKcxHR.js`),__vite__mapDeps([63,14,1,2,3,4,5,6,7,15,64,43,9,18,20,44])))},{id:`hxml`,name:`HXML`,import:(()=>T(()=>import(`./_DekxQCZG.js`),__vite__mapDeps([65,66])))},{id:`hy`,name:`Hy`,import:(()=>T(()=>import(`./_CZbG8q4J.js`),[]))},{id:`imba`,name:`Imba`,import:(()=>T(()=>import(`./_DsUTQ-LC.js`),[]))},{id:`ini`,name:`INI`,aliases:[`properties`],import:(()=>T(()=>import(`./_B5eOa1yu.js`),[]))},{id:`java`,name:`Java`,import:(()=>T(()=>import(`./_Z_elapBC.js`).then(e=>e.n),__vite__mapDeps([15,1,2,3,4,5,6,7])))},{id:`javascript`,name:`JavaScript`,aliases:[`js`,`cjs`,`mjs`],import:(()=>T(()=>import(`./_CCDxcQQY.js`).then(e=>e.n),__vite__mapDeps([9,1,2,3,4,5,6,7])))},{id:`jinja`,name:`Jinja`,import:(()=>T(()=>import(`./_CnCRB0XK.js`),__vite__mapDeps([67,8,1,2,3,4,5,6,7,9,10])))},{id:`jison`,name:`Jison`,import:(()=>T(()=>import(`./_DcDGku3c.js`),__vite__mapDeps([68,9,1,2,3,4,5,6,7])))},{id:`json`,name:`JSON`,import:(()=>T(()=>import(`./_C3I-Anub.js`).then(e=>e.n),__vite__mapDeps([16,1,2,3,4,5,6,7])))},{id:`json5`,name:`JSON5`,import:(()=>T(()=>import(`./_BR5RXkoi.js`),[]))},{id:`jsonc`,name:`JSON with Comments`,import:(()=>T(()=>import(`./_CYpm1nAK.js`),[]))},{id:`jsonl`,name:`JSON Lines`,import:(()=>T(()=>import(`./_CmCQp5Yx.js`),[]))},{id:`jsonnet`,name:`Jsonnet`,import:(()=>T(()=>import(`./_CJTPZ8u_.js`),[]))},{id:`jssm`,name:`JSSM`,aliases:[`fsl`],import:(()=>T(()=>import(`./_DXw9l8Rf.js`),[]))},{id:`jsx`,name:`JSX`,import:(()=>T(()=>import(`./_D78Rmq5N.js`).then(e=>e.n),__vite__mapDeps([44,1,2,3,4,5,6,7])))},{id:`julia`,name:`Julia`,aliases:[`jl`],import:(()=>T(()=>import(`./_BUWvw-TH.js`),__vite__mapDeps([69,9,1,2,3,4,5,6,7,23,28,32,33,34,26,70])))},{id:`just`,name:`Just`,aliases:[`justfile`],import:(()=>T(()=>import(`./_BRphDJH_.js`),__vite__mapDeps([71,9,1,2,3,4,5,6,7,18,28,36,41,10,8,14,15,23,26,32,33,34,42,43,20,44,45,46,72])))},{id:`kdl`,name:`KDL`,import:(()=>T(()=>import(`./_CsD5j6eV.js`),[]))},{id:`kotlin`,name:`Kotlin`,aliases:[`kt`,`kts`],import:(()=>T(()=>import(`./_DhhofPvG.js`),[]))},{id:`kusto`,name:`Kusto`,aliases:[`kql`],import:(()=>T(()=>import(`./_C7mF5XQf.js`),[]))},{id:`latex`,name:`LaTeX`,import:(()=>T(()=>import(`./_b5I_nxEK.js`),__vite__mapDeps([73,74,1,2,3,4,5,6,7,70])))},{id:`lean`,name:`Lean 4`,aliases:[`lean4`],import:(()=>T(()=>import(`./_CewbzKMR.js`),[]))},{id:`less`,name:`Less`,import:(()=>T(()=>import(`./_DVTAwKKz.js`),[]))},{id:`liquid`,name:`Liquid`,import:(()=>T(()=>import(`./_CB4KzoDJ.js`),__vite__mapDeps([75,9,1,2,3,4,5,6,7,10,8,16])))},{id:`llvm`,name:`LLVM IR`,import:(()=>T(()=>import(`./_DqHOMS-s.js`),[]))},{id:`log`,name:`Log file`,import:(()=>T(()=>import(`./_BNLmms1o.js`),[]))},{id:`logo`,name:`Logo`,import:(()=>T(()=>import(`./_Cluzi2Zq.js`),[]))},{id:`lua`,name:`Lua`,import:(()=>T(()=>import(`./_C683mkqv.js`).then(e=>e.n),__vite__mapDeps([45,1,2,3,4,5,6,7,26])))},{id:`luau`,name:`Luau`,import:(()=>T(()=>import(`./_C2pBCSgt.js`),[]))},{id:`make`,name:`Makefile`,aliases:[`makefile`],import:(()=>T(()=>import(`./_Dixweg8N.js`),[]))},{id:`markdown`,name:`Markdown`,aliases:[`md`],import:(()=>T(()=>import(`./_BYOwaDjH.js`),[]))},{id:`marko`,name:`Marko`,import:(()=>T(()=>import(`./_LyXyKVdu.js`),__vite__mapDeps([76,10,1,2,3,4,5,6,7,12,18,77])))},{id:`matlab`,name:`MATLAB`,import:(()=>T(()=>import(`./_D7qyCx1q.js`),[]))},{id:`mdc`,name:`MDC`,import:(()=>T(()=>import(`./_lNS9HyGM.js`),__vite__mapDeps([78,22,8,1,2,3,4,5,6,7,9,10,46,48])))},{id:`mdx`,name:`MDX`,import:(()=>T(()=>import(`./_DQZ5AkYe.js`),[]))},{id:`mermaid`,name:`Mermaid`,aliases:[`mmd`],import:(()=>T(()=>import(`./_BxpfTIzt.js`),[]))},{id:`mipsasm`,name:`MIPS Assembly`,aliases:[`mips`],import:(()=>T(()=>import(`./_BMqwQI7S.js`),[]))},{id:`mojo`,name:`Mojo`,import:(()=>T(()=>import(`./_fg40_ntQ.js`),[]))},{id:`moonbit`,name:`MoonBit`,aliases:[`mbt`,`mbti`],import:(()=>T(()=>import(`./_DgjMoLWr.js`),[]))},{id:`move`,name:`Move`,import:(()=>T(()=>import(`./_BYnGhZoM.js`),[]))},{id:`narrat`,name:`Narrat Language`,aliases:[`nar`],import:(()=>T(()=>import(`./__X_XdTYD.js`),[]))},{id:`nextflow`,name:`Nextflow`,aliases:[`nf`],import:(()=>T(()=>import(`./_DWQbgPoS.js`),__vite__mapDeps([79,80])))},{id:`nextflow-groovy`,name:`Nextflow Groovy`,import:(()=>T(()=>import(`./_DJMQeKeT.js`),[]))},{id:`nginx`,name:`Nginx`,import:(()=>T(()=>import(`./_CjKem1sO.js`),__vite__mapDeps([81,45,1,2,3,4,5,6,7,26])))},{id:`nim`,name:`Nim`,import:(()=>T(()=>import(`./_BnV94dO7.js`),__vite__mapDeps([82,9,1,2,3,4,5,6,7,10,8,14,15,26,34,48])))},{id:`nix`,name:`Nix`,import:(()=>T(()=>import(`./_IvuFDN5E.js`),[]))},{id:`nsis`,name:`NSIS`,import:(()=>T(()=>import(`./_CjNLYCLg.js`),[]))},{id:`nushell`,name:`nushell`,aliases:[`nu`],import:(()=>T(()=>import(`./_DHYfO66s.js`),[]))},{id:`objective-c`,name:`Objective-C`,aliases:[`objc`],import:(()=>T(()=>import(`./_D1A_Heim.js`),[]))},{id:`objective-cpp`,name:`Objective-C++`,import:(()=>T(()=>import(`./_BsSzOQcm.js`),[]))},{id:`ocaml`,name:`OCaml`,import:(()=>T(()=>import(`./_O90oeIOV.js`),[]))},{id:`odin`,name:`Odin`,import:(()=>T(()=>import(`./_B1RWQWA5.js`),[]))},{id:`openscad`,name:`OpenSCAD`,aliases:[`scad`],import:(()=>T(()=>import(`./_BUDT5pXO.js`),[]))},{id:`org`,name:`Org Markup`,import:(()=>T(()=>import(`./_DPzxebn1.js`),__vite__mapDeps([83,9,1,2,3,4,5,6,7,10,8,12,15,14,16,18,20,23,26,28,84,31,33,32,34,36,85,86,56,87,38,45,46,41,42,43,44,48,47,55,57,88,89,90,70,72,73,74,77,91,82,92,93,94,95,96,97,98,99,100])))},{id:`pascal`,name:`Pascal`,import:(()=>T(()=>import(`./_4ZHwLPI5.js`),[]))},{id:`perl`,name:`Perl`,import:(()=>T(()=>import(`./_Cgb2RJJJ.js`),__vite__mapDeps([72,9,1,2,3,4,5,6,7,10,8,14,15,23])))},{id:`php`,name:`PHP`,import:(()=>T(()=>import(`./_ZKNPt6D-.js`),__vite__mapDeps([94,9,1,2,3,4,5,6,7,10,8,14,15,16,23])))},{id:`pkl`,name:`Pkl`,import:(()=>T(()=>import(`./_ot-7Btpt.js`),[]))},{id:`plsql`,name:`PL/SQL`,import:(()=>T(()=>import(`./_DGHpHOYJ.js`),[]))},{id:`po`,name:`Gettext PO`,aliases:[`pot`,`potx`],import:(()=>T(()=>import(`./_BiJDBrnU.js`),[]))},{id:`polar`,name:`Polar`,import:(()=>T(()=>import(`./_C7UOKdEL.js`),[]))},{id:`postcss`,name:`PostCSS`,import:(()=>T(()=>import(`./_BXeXVLqQ.js`),[]))},{id:`powerquery`,name:`PowerQuery`,import:(()=>T(()=>import(`./_DNMTfnFr.js`),[]))},{id:`powershell`,name:`PowerShell`,aliases:[`ps`,`ps1`,`pwsh`],import:(()=>T(()=>import(`./_CCSX75yM.js`),[]))},{id:`prisma`,name:`Prisma`,import:(()=>T(()=>import(`./_DMgNhnYS.js`),[]))},{id:`prolog`,name:`Prolog`,import:(()=>T(()=>import(`./_iXnhIJG7.js`),[]))},{id:`proto`,name:`Protocol Buffer 3`,aliases:[`protobuf`],import:(()=>T(()=>import(`./_DB4EqR-F.js`),[]))},{id:`pug`,name:`Pug`,aliases:[`jade`],import:(()=>T(()=>import(`./_DP2LKafM.js`),__vite__mapDeps([101,9,1,2,3,4,5,6,7,10,8])))},{id:`puppet`,name:`Puppet`,import:(()=>T(()=>import(`./_CDv2pdJW.js`),[]))},{id:`purescript`,name:`PureScript`,import:(()=>T(()=>import(`./_9MfHhQsQ.js`),[]))},{id:`python`,name:`Python`,aliases:[`py`],import:(()=>T(()=>import(`./_gzcpVVnB.js`),[]))},{id:`qml`,name:`QML`,import:(()=>T(()=>import(`./_C5YR9YJh.js`),__vite__mapDeps([102,9,1,2,3,4,5,6,7])))},{id:`qmldir`,name:`QML Directory`,import:(()=>T(()=>import(`./_DCQb3MpD.js`),[]))},{id:`qss`,name:`Qt Style Sheets`,import:(()=>T(()=>import(`./_Fe1Jh2GI.js`),[]))},{id:`r`,name:`R`,import:(()=>T(()=>import(`./_DiZR5A2Z.js`).then(e=>e.n),__vite__mapDeps([70,1,2,3,4,5,6,7])))},{id:`racket`,name:`Racket`,import:(()=>T(()=>import(`./_DcIDlBhZ.js`),[]))},{id:`raku`,name:`Raku`,aliases:[`perl6`],import:(()=>T(()=>import(`./_B3gFvitq.js`),[]))},{id:`razor`,name:`ASP.NET Razor`,import:(()=>T(()=>import(`./_sA9LOck8.js`),__vite__mapDeps([103,8,1,2,3,4,5,6,7,9,10,85])))},{id:`rbs`,name:`RBS`,aliases:[`ruby-signature`],import:(()=>T(()=>import(`./_C0MpOrj4.js`),[]))},{id:`reg`,name:`Windows Registry Script`,import:(()=>T(()=>import(`./_CRGYupPL.js`),[]))},{id:`regexp`,name:`RegExp`,aliases:[`regex`],import:(()=>T(()=>import(`./_BdAMRKrG.js`).then(e=>e.n),__vite__mapDeps([33,1,2,3,4,5,6,7])))},{id:`rel`,name:`Rel`,import:(()=>T(()=>import(`./_BtDbiS_P.js`),[]))},{id:`riscv`,name:`RISC-V`,import:(()=>T(()=>import(`./_Ckw8ddFX.js`),[]))},{id:`ron`,name:`RON`,import:(()=>T(()=>import(`./_VUp2lXgN.js`),[]))},{id:`rosmsg`,name:`ROS Interface`,import:(()=>T(()=>import(`./_CAekHB0j.js`),[]))},{id:`rst`,name:`reStructuredText`,import:(()=>T(()=>import(`./_CakhbveI.js`),__vite__mapDeps([104,9,1,2,3,4,5,6,7,22,8,10,28,105,32,33,34,26,36,46,41,14,15,23,42,43,18,20,44,45])))},{id:`ruby`,name:`Ruby`,aliases:[`rb`],import:(()=>T(()=>import(`./_C-1cKTkv.js`),__vite__mapDeps([41,9,1,2,3,4,5,6,7,10,8,14,15,23,26,32,33,34,36,42,43,18,20,44,45,46])))},{id:`rust`,name:`Rust`,aliases:[`rs`],import:(()=>T(()=>import(`./_Cfkwpbl8.js`),[]))},{id:`sas`,name:`SAS`,import:(()=>T(()=>import(`./__3UGRi5e.js`),__vite__mapDeps([106,23,1,2,3,4,5,6,7])))},{id:`sass`,name:`Sass`,import:(()=>T(()=>import(`./_DXrisJhu.js`),[]))},{id:`scala`,name:`Scala`,import:(()=>T(()=>import(`./_BiFt_7mu.js`),[]))},{id:`scheme`,name:`Scheme`,import:(()=>T(()=>import(`./_DQCgrYNe.js`),[]))},{id:`scss`,name:`SCSS`,import:(()=>T(()=>import(`./_awPDUP7f.js`).then(e=>e.n),__vite__mapDeps([12,1,2,3,4,5,6,7,10])))},{id:`sdbl`,name:`1C (Query)`,aliases:[`1c-query`],import:(()=>T(()=>import(`./_bTVj8UrX.js`),[]))},{id:`shaderlab`,name:`ShaderLab`,aliases:[`shader`],import:(()=>T(()=>import(`./_DB-OQ-9y.js`),__vite__mapDeps([107,108])))},{id:`shellscript`,name:`Shell`,aliases:[`bash`,`sh`,`shell`,`zsh`],import:(()=>T(()=>import(`./_DDXMnJp1.js`).then(e=>e.n),__vite__mapDeps([36,1,2,3,4,5,6,7])))},{id:`shellsession`,name:`Shell Session`,aliases:[`console`],import:(()=>T(()=>import(`./_DQb-Prlp.js`),__vite__mapDeps([109,36,1,2,3,4,5,6,7])))},{id:`smalltalk`,name:`GNU Smalltalk`,import:(()=>T(()=>import(`./_BHpQb5nM.js`),[]))},{id:`smithy`,name:`Smithy`,import:(()=>T(()=>import(`./_Dgaz7aur.js`),[]))},{id:`solidity`,name:`Solidity`,import:(()=>T(()=>import(`./_Bj7E1mRn.js`),[]))},{id:`soy`,name:`Closure Templates`,aliases:[`closure-templates`],import:(()=>T(()=>import(`./_n9oRx7Ms.js`),__vite__mapDeps([110,8,1,2,3,4,5,6,7,9,10])))},{id:`sparql`,name:`SPARQL`,import:(()=>T(()=>import(`./_L8AbGenz.js`),__vite__mapDeps([111,112])))},{id:`splunk`,name:`Splunk Query Language`,aliases:[`spl`],import:(()=>T(()=>import(`./_BC2Px7Mm.js`),[]))},{id:`sql`,name:`SQL`,import:(()=>T(()=>import(`./_v2hjUzql.js`).then(e=>e.n),__vite__mapDeps([23,1,2,3,4,5,6,7])))},{id:`ssh-config`,name:`SSH Config`,import:(()=>T(()=>import(`./_BgfXC-Er.js`),[]))},{id:`stata`,name:`Stata`,import:(()=>T(()=>import(`./_CzbgKank.js`),__vite__mapDeps([113,23,1,2,3,4,5,6,7])))},{id:`stylus`,name:`Stylus`,aliases:[`styl`],import:(()=>T(()=>import(`./_B6D30XZt.js`),[]))},{id:`surrealql`,name:`SurrealQL`,aliases:[`surql`],import:(()=>T(()=>import(`./_CoJxQd1B.js`),__vite__mapDeps([114,9,1,2,3,4,5,6,7])))},{id:`svelte`,name:`Svelte`,import:(()=>T(()=>import(`./_DECvFD3C.js`),__vite__mapDeps([115,9,1,2,3,4,5,6,7,10,18,19])))},{id:`swift`,name:`Swift`,import:(()=>T(()=>import(`./_CyEgAFGc.js`),[]))},{id:`system-verilog`,name:`SystemVerilog`,import:(()=>T(()=>import(`./_Dh5ihWbf.js`),[]))},{id:`systemd`,name:`Systemd Units`,import:(()=>T(()=>import(`./_BxMlprV5.js`),[]))},{id:`talonscript`,name:`TalonScript`,aliases:[`talon`],import:(()=>T(()=>import(`./_CohzipZa.js`),[]))},{id:`tasl`,name:`Tasl`,import:(()=>T(()=>import(`./_DMoTqEGO.js`),[]))},{id:`tcl`,name:`Tcl`,import:(()=>T(()=>import(`./_CZd0xW_V.js`),[]))},{id:`templ`,name:`Templ`,import:(()=>T(()=>import(`./_DfQw6r-m.js`),__vite__mapDeps([116,9,1,2,3,4,5,6,7,10,88])))},{id:`terraform`,name:`Terraform`,aliases:[`tf`,`tfvars`],import:(()=>T(()=>import(`./_DswuEJGm.js`),[]))},{id:`tex`,name:`TeX`,import:(()=>T(()=>import(`./_dLObuZst.js`).then(e=>e.n),__vite__mapDeps([74,1,2,3,4,5,6,7,70])))},{id:`toml`,name:`TOML`,import:(()=>T(()=>import(`./_CcmNWLt0.js`),[]))},{id:`ts-tags`,name:`TypeScript with Tags`,aliases:[`lit`],import:(()=>T(()=>import(`./_CWMJH-rn.js`),__vite__mapDeps([117,9,1,2,3,4,5,6,7,10,8,14,15,18,23,34,26])))},{id:`tsv`,name:`TSV`,import:(()=>T(()=>import(`./_sltzmVWM.js`),[]))},{id:`tsx`,name:`TSX`,import:(()=>T(()=>import(`./_D-97toYv.js`).then(e=>e.n),__vite__mapDeps([20,1,2,3,4,5,6,7])))},{id:`turtle`,name:`Turtle`,import:(()=>T(()=>import(`./_ByJddavk.js`),[]))},{id:`twig`,name:`Twig`,import:(()=>T(()=>import(`./_AiyczSWt.js`),__vite__mapDeps([118,9,1,2,3,4,5,6,7,10,12,28,41,8,14,15,23,26,32,33,34,36,42,43,18,20,44,45,46,94,16])))},{id:`typescript`,name:`TypeScript`,aliases:[`ts`,`cts`,`mts`],import:(()=>T(()=>import(`./_BdDLH1XV.js`).then(e=>e.n),__vite__mapDeps([18,1,2,3,4,5,6,7])))},{id:`typespec`,name:`TypeSpec`,aliases:[`tsp`],import:(()=>T(()=>import(`./_BRdr0IET.js`),[]))},{id:`typst`,name:`Typst`,aliases:[`typ`],import:(()=>T(()=>import(`./_BOc-526n.js`),__vite__mapDeps([119,9,1,2,3,4,5,6,7,10,8,12,15,14,16,18,20,120,121,23,26,28,84,31,33,32,34,36,85,86,56,87,38,45,46,41,42,43,44,48,47,51,55,57,88,89,61,90,122,70,69,72,73,74,77,123,91,92,94,95,96,97,98,100,124,101,125,126,118,127])))},{id:`v`,name:`V`,import:(()=>T(()=>import(`./_DBj4K9d_.js`),[]))},{id:`vala`,name:`Vala`,import:(()=>T(()=>import(`./_zf12oZj6.js`),[]))},{id:`vb`,name:`Visual Basic`,import:(()=>T(()=>import(`./_DOwzaHZ0.js`),[]))},{id:`verilog`,name:`Verilog`,import:(()=>T(()=>import(`./_B2gwz-sJ.js`),[]))},{id:`vhdl`,name:`VHDL`,import:(()=>T(()=>import(`./_BroJfC0k.js`),[]))},{id:`viml`,name:`Vim Script`,aliases:[`vim`,`vimscript`],import:(()=>T(()=>import(`./_DvXPmvsu.js`),[]))},{id:`vue`,name:`Vue`,import:(()=>T(()=>import(`./_W5nLbLR0.js`),__vite__mapDeps([128,9,1,2,3,4,5,6,7,10,8,16,18,22])))},{id:`vue-html`,name:`Vue HTML`,import:(()=>T(()=>import(`./_DG3lNhs6.js`),__vite__mapDeps([129,9,1,2,3,4,5,6,7])))},{id:`vue-vine`,name:`Vue Vine`,import:(()=>T(()=>import(`./_DOgiz2sq.js`),__vite__mapDeps([130,9,1,2,3,4,5,6,7,10,12,19,77,131])))},{id:`vyper`,name:`Vyper`,aliases:[`vy`],import:(()=>T(()=>import(`./_CgoNMtux.js`),[]))},{id:`wasm`,name:`WebAssembly`,import:(()=>T(()=>import(`./_ByWQv1Qj.js`),[]))},{id:`wenyan`,name:`Wenyan`,aliases:[`文言`],import:(()=>T(()=>import(`./_C8pVoKbM.js`),[]))},{id:`wgsl`,name:`WGSL`,import:(()=>T(()=>import(`./_BsKzXJz4.js`),[]))},{id:`wikitext`,name:`Wikitext`,aliases:[`mediawiki`,`wiki`],import:(()=>T(()=>import(`./_ClFFjSW2.js`),[]))},{id:`wit`,name:`WebAssembly Interface Types`,import:(()=>T(()=>import(`./_DdvCle-K.js`),[]))},{id:`wolfram`,name:`Wolfram`,aliases:[`wl`],import:(()=>T(()=>import(`./_DLL8P-h_.js`),[]))},{id:`xml`,name:`XML`,import:(()=>T(()=>import(`./_De3Bqgjq.js`).then(e=>e.n),__vite__mapDeps([14,1,2,3,4,5,6,7,15])))},{id:`xsl`,name:`XSL`,import:(()=>T(()=>import(`./_C4mnN_oZ.js`),__vite__mapDeps([100,14,1,2,3,4,5,6,7,15])))},{id:`yaml`,name:`YAML`,aliases:[`yml`],import:(()=>T(()=>import(`./_BlzNrz3K.js`).then(e=>e.n),__vite__mapDeps([46,1,2,3,4,5,6,7])))},{id:`zenscript`,name:`ZenScript`,import:(()=>T(()=>import(`./_BnlCZFoB.js`),[]))},{id:`zig`,name:`Zig`,import:(()=>T(()=>import(`./_CMLA9XwU.js`),[]))}],kt=Object.fromEntries(Ot.map(e=>[e.id,e.import])),At=Object.fromEntries(Ot.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),jt={...kt,...At},Mt=Object.fromEntries([{id:`andromeeda`,displayName:`Andromeeda`,type:`dark`,import:(()=>T(()=>import(`./_vGVdxbeo.js`),[]))},{id:`aurora-x`,displayName:`Aurora X`,type:`dark`,import:(()=>T(()=>import(`./_CDeNXAV0.js`),[]))},{id:`ayu-dark`,displayName:`Ayu Dark`,type:`dark`,import:(()=>T(()=>import(`./_DluEY0Gj.js`),[]))},{id:`ayu-light`,displayName:`Ayu Light`,type:`light`,import:(()=>T(()=>import(`./_C3h-C4tm.js`),[]))},{id:`ayu-mirage`,displayName:`Ayu Mirage`,type:`dark`,import:(()=>T(()=>import(`./_Bqwy1Gya.js`),[]))},{id:`catppuccin-frappe`,displayName:`Catppuccin Frappé`,type:`dark`,import:(()=>T(()=>import(`./_C9Q5zVZY.js`),[]))},{id:`catppuccin-latte`,displayName:`Catppuccin Latte`,type:`light`,import:(()=>T(()=>import(`./_CtsyrtPq.js`),[]))},{id:`catppuccin-macchiato`,displayName:`Catppuccin Macchiato`,type:`dark`,import:(()=>T(()=>import(`./_R8nAf1vR.js`),[]))},{id:`catppuccin-mocha`,displayName:`Catppuccin Mocha`,type:`dark`,import:(()=>T(()=>import(`./_DjuaAJKi.js`),[]))},{id:`dark-plus`,displayName:`Dark Plus`,type:`dark`,import:(()=>T(()=>import(`./_Cs2F2srj.js`),[]))},{id:`dracula`,displayName:`Dracula Theme`,type:`dark`,import:(()=>T(()=>import(`./_BHWKrbxM.js`),[]))},{id:`dracula-soft`,displayName:`Dracula Theme Soft`,type:`dark`,import:(()=>T(()=>import(`./_5eyTD99u.js`),[]))},{id:`everforest-dark`,displayName:`Everforest Dark`,type:`dark`,import:(()=>T(()=>import(`./_sB-x3p7T.js`),[]))},{id:`everforest-light`,displayName:`Everforest Light`,type:`light`,import:(()=>T(()=>import(`./_Df2xbC6M.js`),[]))},{id:`github-dark`,displayName:`GitHub Dark`,type:`dark`,import:(()=>T(()=>import(`./_C-LZuMrd.js`),[]))},{id:`github-dark-default`,displayName:`GitHub Dark Default`,type:`dark`,import:(()=>T(()=>import(`./_DXG-b-1a.js`),[]))},{id:`github-dark-dimmed`,displayName:`GitHub Dark Dimmed`,type:`dark`,import:(()=>T(()=>import(`./_Bx1FflLF.js`),[]))},{id:`github-dark-high-contrast`,displayName:`GitHub Dark High Contrast`,type:`dark`,import:(()=>T(()=>import(`./_B_tTalzw.js`),[]))},{id:`github-light`,displayName:`GitHub Light`,type:`light`,import:(()=>T(()=>import(`./_EUqPIrTm.js`),[]))},{id:`github-light-default`,displayName:`GitHub Light Default`,type:`light`,import:(()=>T(()=>import(`./_BXViO-2h.js`),[]))},{id:`github-light-high-contrast`,displayName:`GitHub Light High Contrast`,type:`light`,import:(()=>T(()=>import(`./_B68TUdTA.js`),[]))},{id:`gruvbox-dark-hard`,displayName:`Gruvbox Dark Hard`,type:`dark`,import:(()=>T(()=>import(`./_C820rvS2.js`),[]))},{id:`gruvbox-dark-medium`,displayName:`Gruvbox Dark Medium`,type:`dark`,import:(()=>T(()=>import(`./_BPjhmG05.js`),[]))},{id:`gruvbox-dark-soft`,displayName:`Gruvbox Dark Soft`,type:`dark`,import:(()=>T(()=>import(`./_MrdJrrXF.js`),[]))},{id:`gruvbox-light-hard`,displayName:`Gruvbox Light Hard`,type:`light`,import:(()=>T(()=>import(`./_BC_s9l72.js`),[]))},{id:`gruvbox-light-medium`,displayName:`Gruvbox Light Medium`,type:`light`,import:(()=>T(()=>import(`./_BAWPOn9u.js`),[]))},{id:`gruvbox-light-soft`,displayName:`Gruvbox Light Soft`,type:`light`,import:(()=>T(()=>import(`./_BSMLrYjP.js`),[]))},{id:`horizon`,displayName:`Horizon`,type:`dark`,import:(()=>T(()=>import(`./_CE9ld1lL.js`),[]))},{id:`horizon-bright`,displayName:`Horizon Bright`,type:`light`,import:(()=>T(()=>import(`./_DSNQnXHK.js`),[]))},{id:`houston`,displayName:`Houston`,type:`dark`,import:(()=>T(()=>import(`./_CsvMBhTu.js`),[]))},{id:`kanagawa-dragon`,displayName:`Kanagawa Dragon`,type:`dark`,import:(()=>T(()=>import(`./_Bozd7klA.js`),[]))},{id:`kanagawa-lotus`,displayName:`Kanagawa Lotus`,type:`light`,import:(()=>T(()=>import(`./_BmuOG9ZW.js`),[]))},{id:`kanagawa-wave`,displayName:`Kanagawa Wave`,type:`dark`,import:(()=>T(()=>import(`./_BML5mF2J.js`),[]))},{id:`laserwave`,displayName:`LaserWave`,type:`dark`,import:(()=>T(()=>import(`./_C_8bwKvT.js`),[]))},{id:`light-plus`,displayName:`Light Plus`,type:`light`,import:(()=>T(()=>import(`./_DVQuIRkW.js`),[]))},{id:`material-theme`,displayName:`Material Theme`,type:`dark`,import:(()=>T(()=>import(`./_Bm3Qr25_.js`),[]))},{id:`material-theme-darker`,displayName:`Material Theme Darker`,type:`dark`,import:(()=>T(()=>import(`./_2IIEA8gg.js`),[]))},{id:`material-theme-lighter`,displayName:`Material Theme Lighter`,type:`light`,import:(()=>T(()=>import(`./_uhdI0v04.js`),[]))},{id:`material-theme-ocean`,displayName:`Material Theme Ocean`,type:`dark`,import:(()=>T(()=>import(`./_CHQ94UKr.js`),[]))},{id:`material-theme-palenight`,displayName:`Material Theme Palenight`,type:`dark`,import:(()=>T(()=>import(`./_B5W6OYN7.js`),[]))},{id:`min-dark`,displayName:`Min Dark`,type:`dark`,import:(()=>T(()=>import(`./_BSWPekZh.js`),[]))},{id:`min-light`,displayName:`Min Light`,type:`light`,import:(()=>T(()=>import(`./_DDpmG2fV.js`),[]))},{id:`monokai`,displayName:`Monokai`,type:`dark`,import:(()=>T(()=>import(`./_B_bV9PQ9.js`),[]))},{id:`night-owl`,displayName:`Night Owl`,type:`dark`,import:(()=>T(()=>import(`./_DhmEMT88.js`),[]))},{id:`night-owl-light`,displayName:`Night Owl Light`,type:`light`,import:(()=>T(()=>import(`./_eJ-hLW7d.js`),[]))},{id:`nord`,displayName:`Nord`,type:`dark`,import:(()=>T(()=>import(`./_Cb4Vim4T.js`),[]))},{id:`one-dark-pro`,displayName:`One Dark Pro`,type:`dark`,import:(()=>T(()=>import(`./_CLwyXe_n.js`),[]))},{id:`one-light`,displayName:`One Light`,type:`light`,import:(()=>T(()=>import(`./_D7Lr4KcI.js`),[]))},{id:`plastic`,displayName:`Plastic`,type:`dark`,import:(()=>T(()=>import(`./_DQwYfKfQ.js`),[]))},{id:`poimandres`,displayName:`Poimandres`,type:`dark`,import:(()=>T(()=>import(`./_DRFjx7u4.js`),[]))},{id:`red`,displayName:`Red`,type:`dark`,import:(()=>T(()=>import(`./_DX1BQOs8.js`),[]))},{id:`rose-pine`,displayName:`Rosé Pine`,type:`dark`,import:(()=>T(()=>import(`./_aMsaMD1D.js`),[]))},{id:`rose-pine-dawn`,displayName:`Rosé Pine Dawn`,type:`light`,import:(()=>T(()=>import(`./_8PwUyIlP.js`),[]))},{id:`rose-pine-moon`,displayName:`Rosé Pine Moon`,type:`dark`,import:(()=>T(()=>import(`./_DO-qXg-I.js`),[]))},{id:`slack-dark`,displayName:`Slack Dark`,type:`dark`,import:(()=>T(()=>import(`./_DnToyrRv.js`),[]))},{id:`slack-ochin`,displayName:`Slack Ochin`,type:`light`,import:(()=>T(()=>import(`./_B2OO5cIa.js`),[]))},{id:`snazzy-light`,displayName:`Snazzy Light`,type:`light`,import:(()=>T(()=>import(`./_4G7pJPwS.js`),[]))},{id:`solarized-dark`,displayName:`Solarized Dark`,type:`dark`,import:(()=>T(()=>import(`./_UdsmMDCL.js`),[]))},{id:`solarized-light`,displayName:`Solarized Light`,type:`light`,import:(()=>T(()=>import(`./_C1IUL_tW.js`),[]))},{id:`synthwave-84`,displayName:`Synthwave '84`,type:`dark`,import:(()=>T(()=>import(`./_nFMaYfgc.js`),[]))},{id:`tokyo-night`,displayName:`Tokyo Night`,type:`dark`,import:(()=>T(()=>import(`./_oM2G3aXe.js`),[]))},{id:`vesper`,displayName:`Vesper`,type:`dark`,import:(()=>T(()=>import(`./_DdrHHSXu.js`),[]))},{id:`vitesse-black`,displayName:`Vitesse Black`,type:`dark`,import:(()=>T(()=>import(`./_fwtXNY1n.js`),[]))},{id:`vitesse-dark`,displayName:`Vitesse Dark`,type:`dark`,import:(()=>T(()=>import(`./_BZCL-v6S.js`),[]))},{id:`vitesse-light`,displayName:`Vitesse Light`,type:`light`,import:(()=>T(()=>import(`./_VbXTXTou.js`),[]))}].map(e=>[e.id,e.import])),Nt=t({createOnigurumaEngine:()=>sn,getDefaultWasmLoader:()=>on,loadWasm:()=>$t,setDefaultWasmLoader:()=>an}),Pt=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function Ft(){return 2147483648}function It(){return typeof performance<`u`?performance.now():Date.now()}var Lt=(e,t)=>e+(t-e%t)%t;async function Rt(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=Ft();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,Lt(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:It,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 zt=Object.defineProperty,Bt=(e,t,n)=>t in e?zt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Vt=(e,t,n)=>Bt(e,typeof t==`symbol`?t:t+``,n),R=null;function Ht(e){throw new Pt(e.UTF8ToString(e.getLastOnigError()))}var Ut=class e{constructor(t){Vt(this,`utf16Length`),Vt(this,`utf8Length`),Vt(this,`utf16Value`),Vt(this,`utf8Value`),Vt(this,`utf16OffsetToUtf8`),Vt(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}},Wt=class e{constructor(t){if(Vt(this,`id`,++e.LAST_ID),Vt(this,`_onigBinding`),Vt(this,`content`),Vt(this,`utf16Length`),Vt(this,`utf8Length`),Vt(this,`utf16OffsetToUtf8`),Vt(this,`utf8OffsetToUtf16`),Vt(this,`ptr`),!R)throw new Pt(`Must invoke loadWasm first.`);this._onigBinding=R,this.content=t;let n=new Ut(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||=R.omalloc(1e4),e._sharedPtrInUse=!0,R.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString(R)}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)}};Vt(Wt,`LAST_ID`,0),Vt(Wt,`_sharedPtr`,0),Vt(Wt,`_sharedPtrInUse`,!1);var Gt=Wt,Kt=class{constructor(e){if(Vt(this,`_onigBinding`),Vt(this,`_ptr`),!R)throw new Pt(`Must invoke loadWasm first.`);let t=[],n=[];for(let r=0,i=e.length;r<i;r++){let i=new Ut(e[r]);t[r]=i.createString(R),n[r]=i.utf8Length}let r=R.omalloc(4*e.length);R.HEAPU32.set(t,r/4);let i=R.omalloc(4*e.length);R.HEAPU32.set(n,i/4);let a=R.createOnigScanner(r,i,e.length);for(let n=0,r=e.length;n<r;n++)R.ofree(t[n]);R.ofree(i),R.ofree(r),a===0&&Ht(R),this._onigBinding=R,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 Gt(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 qt(e){return typeof e.instantiator==`function`}function Jt(e){return typeof e.default==`function`}function Yt(e){return e.data!==void 0}function Xt(e){return typeof Response<`u`&&e instanceof Response}function Zt(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 Qt;function $t(e){if(Qt)return Qt;async function t(){R=await Rt(async t=>{let n=e;return n=await n,typeof n==`function`&&(n=await n(t)),typeof n==`function`&&(n=await n(t)),qt(n)?n=await n.instantiator(t):Jt(n)?n=await n.default(t):(Yt(n)&&(n=n.data),Xt(n)?n=typeof WebAssembly.instantiateStreaming==`function`?await tn(n)(t):await nn(n)(t):Zt(n)||n instanceof WebAssembly.Module?n=await en(n)(t):`default`in n&&n.default instanceof WebAssembly.Module&&(n=await en(n.default)(t))),`instance`in n&&(n=n.instance),`exports`in n&&(n=n.exports),n})}return Qt=t(),Qt}function en(e){return t=>WebAssembly.instantiate(e,t)}function tn(e){return t=>WebAssembly.instantiateStreaming(e,t)}function nn(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}var rn;function an(e){rn=e}function on(){return rn}async function sn(e){return e&&await $t(e),{createScanner(e){return new Kt(e.map(e=>typeof e==`string`?e:e.source))},createString(e){return new Gt(e)}}}var cn=Tt({});Dt(cn,Nt);var z=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function ln(e){return un(e)}function un(e){return Array.isArray(e)?dn(e):e instanceof RegExp?e:typeof e==`object`?fn(e):e}function dn(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=un(e[n]);return t}function fn(e){let t={};for(let n in e)t[n]=un(e[n]);return t}function pn(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function mn(e){let t=~e.lastIndexOf(`/`)||~e.lastIndexOf(`\\`);return t===0?e:~t===e.length-1?mn(e.substring(0,e.length-1)):e.substr(~t+1)}var hn=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,gn=class{static hasCaptures(e){return e!==null&&(hn.lastIndex=0,hn.test(e))}static replaceCaptures(e,t,n){return e.replace(hn,(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 _n(e,t){return e<t?-1:+(e>t)}function vn(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=_n(e[r],t[r]);if(n!==0)return n}return 0}return n-r}function yn(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 bn(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,`\\$&`)}var xn=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}},Sn=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(Dn(e),t)}static createFromParsedTheme(e,t){return An(e,t)}_cachedMatchRoot=new xn(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=>wn(e.parent,t.parentScopes));return n?new En(n.fontStyle,n.foreground,n.background):null}},Cn=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 wn(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&&!Tn(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function Tn(e,t){return t===e||e.startsWith(t)&&e[t.length]===`.`}var En=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function Dn(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`&&yn(i.settings.foreground)&&(s=i.settings.foreground);let c=null;typeof i.settings.background==`string`&&yn(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 On(l,u,e,o,s,c)}}return n}var On=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}},kn=(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))(kn||{});function An(e,t){e.sort((e,t)=>{let n=_n(e.scope,t.scope);return n!==0||(n=vn(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 jn(t),o=new En(n,a.getId(r),a.getId(i)),s=new Pn(new Nn(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 Sn(a,o,s)}var jn=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)}},Mn=Object.freeze([]),Nn=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||Mn,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)}},Pn=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(),Nn.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(vn(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 Nn(e,t,n,r,i))}},Fn=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=Ln(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 In(e){return e}function Ln(e){return e}function Rn(e,t){let n=[],r=Bn(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(zn(i)){let e=[];do e.push(i),i=r.next();while(zn(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 zn(e){return!!e&&!!e.match(/[\w\.:]+/)}function Bn(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 Vn(e){typeof e.dispose==`function`&&e.dispose()}var Hn=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},Un=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},Wn=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))}},Gn=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Hn(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new Wn;for(let n of e)Kn(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof Hn){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 Kn(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 Hn?Jn({baseGrammar:a,selfGrammar:i},r):qn(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 Hn(e))}function qn(e,t,n){if(t.repository&&t.repository[e]){let r=t.repository[e];Yn([r],t,n)}}function Jn(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&Yn(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&Yn(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function Yn(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?pn({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&Yn(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let a=tr(i);switch(a.kind){case 0:Jn({...t,selfGrammar:t.baseGrammar},n);break;case 1:Jn(t,n);break;case 2:qn(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?qn(a.ruleName,i,n):Jn(i,n)}else a.kind===4?n.add(new Un(a.scopeName,a.ruleName)):n.add(new Hn(a.scopeName))}}}var Xn=class{kind=0},Zn=class{kind=1},Qn=class{constructor(e){this.ruleName=e}kind=2},$n=class{constructor(e){this.scopeName=e}kind=3},er=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function tr(e){if(e===`$base`)return new Xn;if(e===`$self`)return new Zn;let t=e.indexOf(`#`);return t===-1?new $n(e):t===0?new Qn(e.substring(1)):new er(e.substring(0,t),e.substring(t+1))}var nr=/\\(\d+)/,rr=/\\(\d+)/g,ir=-1,ar=-2;function or(e){return e}function sr(e){return e}var cr=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=gn.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=gn.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${mn(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:gn.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:gn.replaceCaptures(this._contentName,e,t)}},lr=class extends cr{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!`)}},ur=class extends cr{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new hr(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 gr,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},dr=class extends cr{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 gr,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},fr=class extends cr{_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 hr(i,this.id),this.beginCaptures=a,this._end=new hr(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 gr;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}},pr=class extends cr{_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 hr(i,this.id),this.beginCaptures=a,this.whileCaptures=s,this._while=new hr(o,ar),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 gr;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 gr,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||``),this._cachedCompiledWhilePatterns}},mr=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new lr(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new ur(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(t.begin===void 0){t.repository&&(r=pn({},r,t.repository));let i=t.patterns;return i===void 0&&t.include&&(i=[{include:t.include}]),new dr(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new pr(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 fr(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=tr(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 dr||e instanceof fr||e instanceof pr)&&e.hasMissingPatterns&&e.patterns.length===0&&(t=!0),t)continue;i.push(s)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},hr=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`&&nr.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 rr.lastIndex=0,this.source.replace(rr,(e,t)=>bn(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}},gr=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 _r(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 _r(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},_r=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(`
|
|
3
3
|
`)}findNextMatchSync(e,t,n){let r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},vr=class{constructor(e,t){this.languageId=e,this.tokenType=t}},yr=class e{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,t){this._defaultAttributes=new vr(e,8),this._embeddedLanguagesMatcher=new br(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 vr(0,0);_getBasicScopeAttributes=new xn(e=>new vr(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/},br=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])=>bn(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 xr=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function Sr(e,t,n,r,i,a,o,s){let c=t.content.length,l=!1,u=-1;if(o){let o=Cr(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 xr(i,!0);f()}return new xr(i,!1);function f(){let o=wr(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===ir){let o=i.getRule(e);a.produce(i,s[0].start),i=i.withContentNameScopesList(i.nameScopesList),kr(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 fr){let r=o;kr(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 pr){let r=o;kr(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(kr(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 Cr(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 pr&&s.push({rule:n,stack:t})}for(let c=s.pop();c;c=s.pop()){let{ruleScanner:s,findOptions:l}=Or(c.rule,e,c.stack.endRule,n,r===o),u=s.findNextMatchSync(t,r,l);if(u){if(u.ruleId!==ar){i=c.stack.pop();break}u.captureIndices&&u.captureIndices.length&&(a.produce(c.stack,u.captureIndices[0].start),kr(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 wr(e,t,n,r,i,a){let o=Tr(e,t,n,r,i,a),s=e.getInjections();if(s.length===0)return o;let c=Er(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 Tr(e,t,n,r,i,a){let{ruleScanner:o,findOptions:s}=Dr(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 Er(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}=Dr(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 Dr(e,t,n,r,i){return{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function Or(e,t,n,r,i){return{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function kr(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));Sr(e,p,n&&d.start===0,d.start,f,i,!1,0),Vn(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 Ar(t,d.end))}}for(;l.length>0;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop()}var Ar=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function jr(e,t,n,r,i,a,o,s){return new Fr(e,t,n,r,i,a,o,s)}function Mr(e,t,n,r,i){let a=Rn(t,Nr),o=mr.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 Nr(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(Pr(t[r],e))return n=r+1,!0;return!1})}function Pr(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 Fr=class{constructor(e,t,n,r,i,a,o,s){if(this._rootScopeName=e,this.balancedBracketSelectors=a,this._onigLib=s,this._basicScopeAttributesProvider=new yr(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=Ir(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(let e of Object.keys(i)){let t=Rn(e,Nr);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)Mr(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&&Mr(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(or(t));return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[sr(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]=Ir(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=mr.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===Rr.NULL){i=!0;let e=this._basicScopeAttributesProvider.getDefaultAttributes(),n=this.themeProvider.getDefaults(),r=Fn.set(0,e.languageId,e.tokenType,null,n.fontStyle,n.foregroundId,n.backgroundId),a=this.getRule(this._rootId).getName(null,null),o;o=a?Lr.createRootAndLookUpScopeName(a,r,this):Lr.createRoot(`unknown`,r),t=new Rr(null,this._rootId,-1,-1,!1,null,o,o)}else i=!1,t.reset();e+=`
|
|
4
4
|
`;let a=this.createOnigString(e),o=a.content.length,s=new Br(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),c=Sr(this,a,i,0,t,s,!0,r);return Vn(a),{lineLength:o,lineTokens:s,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function Ir(e,t){return e=ln(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 Lr=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=Cn.push(i,t.scopeNames),r=new e(r,i,t.encodedTokenAttributes);return r}static createRoot(t,n){return new e(null,new Cn(null,t),n)}static createRootAndLookUpScopeName(t,n,r){let i=r.getMetadataForScope(t),a=new Cn(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(1)}static mergeAttributes(e,t,n){let r=-1,i=0,a=0;return n!==null&&(r=n.fontStyle,i=n.foregroundId,a=n.backgroundId),Fn.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}},Rr=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)?Lr.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(1)}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:sr(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=Lr.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new e(t,or(n.ruleId),n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,Lr.fromExtension(r,n.contentNameScopesList))}},zr=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(e=>e===`*`?(this.allowAny=!0,[]):Rn(e,Nr).map(e=>e.matcher)),this.unbalancedBracketScopes=t.flatMap(e=>Rn(e,Nr).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}},Br=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=Fn.set(n,0,In(e.type),null,-1,0,0));this.balancedBracketSelectors&&(r=this.balancedBracketSelectors.match(t))}if(r&&(n=Fn.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}},Vr=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,jr(e,a,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},Hr=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new Vr(Sn.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(Sn.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 zr(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,r,i){let a=new Gn(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)}},Ur=Rr.NULL;function Wr(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 Gr(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function Kr(e){return Array.isArray(e)?e:[e]}async function qr(e){return Promise.resolve(typeof e==`function`?e():e).then(e=>e.default||e)}function Jr(e){return!e||[`plaintext`,`txt`,`text`,`plain`].includes(e)}function Yr(e){return e===`ansi`||Jr(e)}function Xr(e){return e===`none`}function Zr(e){return Xr(e)}var Qr=/(\r?\n)/g;function $r(e,t=!1){if(e.length===0)return[[``,0]];let n=e.split(Qr),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 ei={light:`#333333`,dark:`#bbbbbb`},ti={light:`#fffffe`,dark:`#1e1e1e`},ni=`__shiki_resolved`;function ri(e){if(e?.[ni])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`?ei.light:ei.dark,n||=t.type===`light`?ti.light:ti.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,ni,{enumerable:!1,writable:!1,value:!0}),t}async function ii(e){return[...new Set((await Promise.all(e.filter(e=>!Yr(e)).map(async e=>await qr(e).then(e=>Array.isArray(e)?e:[e])))).flat())]}async function ai(e){return(await Promise.all(e.map(async e=>Zr(e)?null:ri(await qr(e))))).filter(e=>!!e)}function oi(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 z(`Circular alias \`${[...n].join(` -> `)} -> ${e}\``);n.add(e)}}return e}var si=class extends Hr{_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=ri(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=Sn.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=oi(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 z(`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))}},ci=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}},li=0;function ui(e){li+=1,e.warnings!==!1&&li>=10&&li%10==0&&console.warn(`[Shiki] ${li} 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 z("`engine` option is required for synchronous mode");let n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(ri),i=new si(new ci(e.engine,n),r,n,e.langAlias),a;function o(t){return oi(t,e.langAlias)}function s(e){g();let t=i.getGrammar(typeof e==`string`?e:e.name);if(!t)throw new z(`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 z(`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 ii(e))}function m(...e){g();for(let t of e.flat(1))i.loadTheme(t)}async function h(...e){return g(),m(await ai(e))}function g(){if(t)throw new z(`Shiki instance has been disposed`)}function _(){t||(t=!0,i.dispose(),--li)}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 di(e){e.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,n,r]=await Promise.all([ai(e.themes||[]),ii(e.langs||[]),e.engine]);return ui({...e,themes:t,langs:n,engine:r})}var fi=new WeakMap;function pi(e,t){fi.set(e,t)}function mi(e){return fi.get(e)}var hi=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(Kr(n).map(e=>[e,Ur])),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 gi(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function gi(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 _i(e,t){if(!(e instanceof hi))throw new z(`Invalid grammar state`);return e.getInternalStack(t)}var vi=/,/,yi=/ /;function bi(e,t,n={}){let{theme:r=e.getLoadedThemes()[0]}=n;if(Jr(e.resolveLangAlias(n.lang||`text`))||Xr(r))return $r(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 z(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${o.name}"`);if(!n.grammarState.themes.includes(i.name))throw new z(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${i.name}"`)}return Si(t,o,i,a,n)}function xi(...e){if(e.length===2)return mi(e[1]);let[t,n,r={}]=e,{lang:i=`text`,theme:a=t.getLoadedThemes()[0]}=r;if(Jr(i)||Xr(a))throw new z(`Plain language does not have grammar state`);if(i===`ansi`)throw new z(`ANSI language does not have grammar state`);let{theme:o,colorMap:s}=t.setTheme(a),c=t.getLanguage(i);return new hi(Ci(n,c,o,s,r).stateStack,c.name,o.name)}function Si(e,t,n,r,i){let a=Ci(e,t,n,r,i),o=new hi(a.stateStack,t.name,n.name);return pi(a.tokens,o),a.tokens}function Ci(e,t,n,r,i){let a=Wr(n,i),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:s=500,includeExplanation:c=!1}=i,l=$r(e),u=i.grammarState?_i(i.grammarState,n.name)??Ur:i.grammarContextCode==null?Ur:Ci(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=Gr(r[Fn.getForeground(s)],a),u=Fn.getFontStyle(s),f={content:i.substring(t,o),offset:p+t,color:l,fontStyle:u};if(c===`tokenType`)f.type=Fn.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(vi).map(e=>e.trim());break;case`object`:n=t.scope;break;default:continue}e.push({settings:t,selectors:n.map(e=>e.split(yi))})}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`?wi(t.scopes):Ti(e,t.scopes)}),g+=1}}d.push(f)}f.push(d),d=[],u=_.ruleStack}return{tokens:f,stateStack:u}}function wi(e){return e.map(e=>({scopeName:e}))}function Ti(e,t){let n=[];for(let r=0,i=t.length;r<i;r++){let i=t[r];n[r]={scopeName:i,themeMatches:Oi(e,i,t.slice(0,r))}}return n}function Ei(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]===`.`}function Di(e,t,n){if(!Ei(e.at(-1),t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)Ei(e[r],n[i])&&--r,--i;return r===-1}function Oi(e,t,n){let r=[];for(let{selectors:i,settings:a}of e)for(let e of i)if(Di(e,t,n)){r.push(a);break}return r}function ki(e,t,n,r=bi){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:mi(a),theme:typeof i.theme==`string`?i.theme:i.theme.name}}),o=Ai(...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 hi(Object.fromEntries(a.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),a[0].state.lang):void 0;return c&&pi(s,c),s}function Ai(...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 ji=[`area`,`base`,`basefont`,`bgsound`,`br`,`col`,`command`,`embed`,`frame`,`hr`,`image`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`],Mi=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};Mi.prototype.normal={},Mi.prototype.property={},Mi.prototype.space=void 0;function Ni(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new Mi(n,r,t)}function Pi(e){return e.toLowerCase()}var Fi=class{constructor(e,t){this.attribute=t,this.property=e}};Fi.prototype.attribute=``,Fi.prototype.booleanish=!1,Fi.prototype.boolean=!1,Fi.prototype.commaOrSpaceSeparated=!1,Fi.prototype.commaSeparated=!1,Fi.prototype.defined=!1,Fi.prototype.mustUseProperty=!1,Fi.prototype.number=!1,Fi.prototype.overloadedBoolean=!1,Fi.prototype.property=``,Fi.prototype.spaceSeparated=!1,Fi.prototype.space=void 0;var Ii=t({boolean:()=>B,booleanish:()=>Ri,commaOrSpaceSeparated:()=>Vi,commaSeparated:()=>Bi,number:()=>V,overloadedBoolean:()=>zi,spaceSeparated:()=>H}),Li=0,B=Hi(),Ri=Hi(),zi=Hi(),V=Hi(),H=Hi(),Bi=Hi(),Vi=Hi();function Hi(){return 2**++Li}var Ui=Object.keys(Ii),Wi=class extends Fi{constructor(e,t,n,r){let i=-1;if(super(e,t),Gi(this,`space`,r),typeof n==`number`)for(;++i<Ui.length;){let e=Ui[i];Gi(this,Ui[i],(n&Ii[e])===Ii[e])}}};Wi.prototype.defined=!0;function Gi(e,t,n){n&&(e[t]=n)}function Ki(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new Wi(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Pi(r)]=r,n[Pi(a.attribute)]=r}return new Mi(t,n,e.space)}var qi=Ki({properties:{ariaActiveDescendant:null,ariaAtomic:Ri,ariaAutoComplete:null,ariaBusy:Ri,ariaChecked:Ri,ariaColCount:V,ariaColIndex:V,ariaColSpan:V,ariaControls:H,ariaCurrent:null,ariaDescribedBy:H,ariaDetails:null,ariaDisabled:Ri,ariaDropEffect:H,ariaErrorMessage:null,ariaExpanded:Ri,ariaFlowTo:H,ariaGrabbed:Ri,ariaHasPopup:null,ariaHidden:Ri,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:H,ariaLevel:V,ariaLive:null,ariaModal:Ri,ariaMultiLine:Ri,ariaMultiSelectable:Ri,ariaOrientation:null,ariaOwns:H,ariaPlaceholder:null,ariaPosInSet:V,ariaPressed:Ri,ariaReadOnly:Ri,ariaRelevant:null,ariaRequired:Ri,ariaRoleDescription:H,ariaRowCount:V,ariaRowIndex:V,ariaRowSpan:V,ariaSelected:Ri,ariaSetSize:V,ariaSort:null,ariaValueMax:V,ariaValueMin:V,ariaValueNow:V,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function Ji(e,t){return t in e?e[t]:t}function Yi(e,t){return Ji(e,t.toLowerCase())}var Xi=Ki({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:Bi,acceptCharset:H,accessKey:H,action:null,allow:null,allowFullScreen:B,allowPaymentRequest:B,allowUserMedia:B,alpha:B,alt:null,as:null,async:B,autoCapitalize:null,autoComplete:H,autoFocus:B,autoPlay:B,blocking:H,capture:null,charSet:null,checked:B,cite:null,className:H,closedBy:null,colorSpace:null,cols:V,colSpan:V,command:null,commandFor:null,content:null,contentEditable:Ri,controls:B,controlsList:H,coords:V|Bi,crossOrigin:null,data:null,dateTime:null,decoding:null,default:B,defer:B,dir:null,dirName:null,disabled:B,download:zi,draggable:Ri,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:B,formTarget:null,headers:H,height:V,hidden:zi,high:V,href:null,hrefLang:null,htmlFor:H,httpEquiv:H,id:null,imageSizes:null,imageSrcSet:null,inert:B,inputMode:null,integrity:null,is:null,isMap:B,itemId:null,itemProp:H,itemRef:H,itemScope:B,itemType:H,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:B,low:V,manifest:null,max:null,maxLength:V,media:null,method:null,min:null,minLength:V,multiple:B,muted:B,name:null,nonce:null,noModule:B,noValidate:B,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:B,optimum:V,pattern:null,ping:H,placeholder:null,playsInline:B,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:B,referrerPolicy:null,rel:H,required:B,reversed:B,rows:V,rowSpan:V,sandbox:H,scope:null,scoped:B,seamless:B,selected:B,shadowRootClonable:B,shadowRootCustomElementRegistry:B,shadowRootDelegatesFocus:B,shadowRootMode:null,shadowRootSerializable:B,shape:null,size:V,sizes:null,slot:null,span:V,spellCheck:Ri,src:null,srcDoc:null,srcLang:null,srcSet:null,start:V,step:null,style:null,tabIndex:V,target:null,title:null,translate:null,type:null,typeMustMatch:B,useMap:null,value:Ri,width:V,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:H,axis:null,background:null,bgColor:null,border:V,borderColor:null,bottomMargin:V,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:B,declare:B,event:null,face:null,frame:null,frameBorder:null,hSpace:V,leftMargin:V,link:null,longDesc:null,lowSrc:null,marginHeight:V,marginWidth:V,noResize:B,noHref:B,noShade:B,noWrap:B,object:null,profile:null,prompt:null,rev:null,rightMargin:V,rules:null,scheme:null,scrolling:Ri,standby:null,summary:null,text:null,topMargin:V,valueType:null,version:null,vAlign:null,vLink:null,vSpace:V,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:B,disablePictureInPicture:B,disableRemotePlayback:B,exportParts:Bi,part:H,prefix:null,property:null,results:V,security:null,unselectable:null},space:`html`,transform:Yi}),Zi=Ki({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,maskType:`mask-type`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:Vi,accentHeight:V,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:V,amplitude:V,arabicForm:null,ascent:V,attributeName:null,attributeType:null,azimuth:V,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:V,by:null,calcMode:null,capHeight:V,className:H,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:V,diffuseConstant:V,direction:null,display:null,dur:null,divisor:V,dominantBaseline:null,download:B,dx:null,dy:null,edgeMode:null,editable:null,elevation:V,enableBackground:null,end:null,event:null,exponent:V,externalResourcesRequired:null,fill:null,fillOpacity:V,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Bi,g2:Bi,glyphName:Bi,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:V,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:V,horizOriginX:V,horizOriginY:V,id:null,ideographic:V,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:V,k:V,k1:V,k2:V,k3:V,k4:V,kernelMatrix:Vi,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:V,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:V,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:V,overlineThickness:V,paintOrder:null,panose1:null,path:null,pathLength:V,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:H,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:V,pointsAtY:V,pointsAtZ:V,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Vi,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Vi,rev:Vi,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Vi,requiredFeatures:Vi,requiredFonts:Vi,requiredFormats:Vi,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:V,specularExponent:V,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:V,strikethroughThickness:V,string:null,stroke:null,strokeDashArray:Vi,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:V,strokeOpacity:V,strokeWidth:null,style:null,surfaceScale:V,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Vi,tabIndex:V,tableValues:null,target:null,targetX:V,targetY:V,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Vi,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:V,underlineThickness:V,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:V,values:null,vAlphabetic:V,vMathematical:V,vectorEffect:null,vHanging:V,vIdeographic:V,version:null,vertAdvY:V,vertOriginX:V,vertOriginY:V,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:V,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:Ji}),Qi=Ki({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),$i=Ki({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:Yi}),ea=Ki({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),ta=/[A-Z]/g,na=/-[a-z]/g,ra=/^data[-\w.:]+$/i;function ia(e,t){let n=Pi(t),r=t,i=Fi;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&ra.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(na,oa);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!na.test(e)){let n=e.replace(ta,aa);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=Wi}return new i(r,t)}function aa(e){return`-`+e.toLowerCase()}function oa(e){return e.charAt(1).toUpperCase()}var sa=Ni([qi,Xi,Qi,$i,ea],`html`),ca=Ni([qi,Zi,Qi,$i,ea],`svg`),la={}.hasOwnProperty;function ua(e,t){let n=t||{};function r(t,...n){let i=r.invalid,a=r.handlers;if(t&&la.call(t,e)){let n=String(t[e]);i=la.call(a,n)?a[n]:r.unknown}if(i)return i.call(this,t,...n)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}var da=/["&'<>`]/g,fa=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,pa=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,ma=/[|\\{}()[\]^$+*?.]/g,ha=new WeakMap;function ga(e,t){return e=e.replace(t.subset?_a(t.subset):da,r),t.subset||t.escapeOnly?e:e.replace(fa,n).replace(pa,r);function n(e,n,r){return t.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,r.charCodeAt(n+2),t)}function r(e,n,r){return t.format(e.charCodeAt(0),r.charCodeAt(n+1),t)}}function _a(e){let t=ha.get(e);return t||(t=va(e),ha.set(e,t)),t}function va(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(ma,`\\$&`));return RegExp(`(?:`+t.join(`|`)+`)`,`g`)}var ya=/[\dA-Fa-f]/;function ba(e,t,n){let r=`&#x`+e.toString(16).toUpperCase();return n&&t&&!ya.test(String.fromCharCode(t))?r:r+`;`}var xa=/\d/;function Sa(e,t,n){let r=`&#`+String(e);return n&&t&&!xa.test(String.fromCharCode(t))?r:r+`;`}var Ca=`AElig.AMP.Aacute.Acirc.Agrave.Aring.Atilde.Auml.COPY.Ccedil.ETH.Eacute.Ecirc.Egrave.Euml.GT.Iacute.Icirc.Igrave.Iuml.LT.Ntilde.Oacute.Ocirc.Ograve.Oslash.Otilde.Ouml.QUOT.REG.THORN.Uacute.Ucirc.Ugrave.Uuml.Yacute.aacute.acirc.acute.aelig.agrave.amp.aring.atilde.auml.brvbar.ccedil.cedil.cent.copy.curren.deg.divide.eacute.ecirc.egrave.eth.euml.frac12.frac14.frac34.gt.iacute.icirc.iexcl.igrave.iquest.iuml.laquo.lt.macr.micro.middot.nbsp.not.ntilde.oacute.ocirc.ograve.ordf.ordm.oslash.otilde.ouml.para.plusmn.pound.quot.raquo.reg.sect.shy.sup1.sup2.sup3.szlig.thorn.times.uacute.ucirc.ugrave.uml.uuml.yacute.yen.yuml`.split(`.`),wa={nbsp:`\xA0`,iexcl:`¡`,cent:`¢`,pound:`£`,curren:`¤`,yen:`¥`,brvbar:`¦`,sect:`§`,uml:`¨`,copy:`©`,ordf:`ª`,laquo:`«`,not:`¬`,shy:``,reg:`®`,macr:`¯`,deg:`°`,plusmn:`±`,sup2:`²`,sup3:`³`,acute:`´`,micro:`µ`,para:`¶`,middot:`·`,cedil:`¸`,sup1:`¹`,ordm:`º`,raquo:`»`,frac14:`¼`,frac12:`½`,frac34:`¾`,iquest:`¿`,Agrave:`À`,Aacute:`Á`,Acirc:`Â`,Atilde:`Ã`,Auml:`Ä`,Aring:`Å`,AElig:`Æ`,Ccedil:`Ç`,Egrave:`È`,Eacute:`É`,Ecirc:`Ê`,Euml:`Ë`,Igrave:`Ì`,Iacute:`Í`,Icirc:`Î`,Iuml:`Ï`,ETH:`Ð`,Ntilde:`Ñ`,Ograve:`Ò`,Oacute:`Ó`,Ocirc:`Ô`,Otilde:`Õ`,Ouml:`Ö`,times:`×`,Oslash:`Ø`,Ugrave:`Ù`,Uacute:`Ú`,Ucirc:`Û`,Uuml:`Ü`,Yacute:`Ý`,THORN:`Þ`,szlig:`ß`,agrave:`à`,aacute:`á`,acirc:`â`,atilde:`ã`,auml:`ä`,aring:`å`,aelig:`æ`,ccedil:`ç`,egrave:`è`,eacute:`é`,ecirc:`ê`,euml:`ë`,igrave:`ì`,iacute:`í`,icirc:`î`,iuml:`ï`,eth:`ð`,ntilde:`ñ`,ograve:`ò`,oacute:`ó`,ocirc:`ô`,otilde:`õ`,ouml:`ö`,divide:`÷`,oslash:`ø`,ugrave:`ù`,uacute:`ú`,ucirc:`û`,uuml:`ü`,yacute:`ý`,thorn:`þ`,yuml:`ÿ`,fnof:`ƒ`,Alpha:`Α`,Beta:`Β`,Gamma:`Γ`,Delta:`Δ`,Epsilon:`Ε`,Zeta:`Ζ`,Eta:`Η`,Theta:`Θ`,Iota:`Ι`,Kappa:`Κ`,Lambda:`Λ`,Mu:`Μ`,Nu:`Ν`,Xi:`Ξ`,Omicron:`Ο`,Pi:`Π`,Rho:`Ρ`,Sigma:`Σ`,Tau:`Τ`,Upsilon:`Υ`,Phi:`Φ`,Chi:`Χ`,Psi:`Ψ`,Omega:`Ω`,alpha:`α`,beta:`β`,gamma:`γ`,delta:`δ`,epsilon:`ε`,zeta:`ζ`,eta:`η`,theta:`θ`,iota:`ι`,kappa:`κ`,lambda:`λ`,mu:`μ`,nu:`ν`,xi:`ξ`,omicron:`ο`,pi:`π`,rho:`ρ`,sigmaf:`ς`,sigma:`σ`,tau:`τ`,upsilon:`υ`,phi:`φ`,chi:`χ`,psi:`ψ`,omega:`ω`,thetasym:`ϑ`,upsih:`ϒ`,piv:`ϖ`,bull:`•`,hellip:`…`,prime:`′`,Prime:`″`,oline:`‾`,frasl:`⁄`,weierp:`℘`,image:`ℑ`,real:`ℜ`,trade:`™`,alefsym:`ℵ`,larr:`←`,uarr:`↑`,rarr:`→`,darr:`↓`,harr:`↔`,crarr:`↵`,lArr:`⇐`,uArr:`⇑`,rArr:`⇒`,dArr:`⇓`,hArr:`⇔`,forall:`∀`,part:`∂`,exist:`∃`,empty:`∅`,nabla:`∇`,isin:`∈`,notin:`∉`,ni:`∋`,prod:`∏`,sum:`∑`,minus:`−`,lowast:`∗`,radic:`√`,prop:`∝`,infin:`∞`,ang:`∠`,and:`∧`,or:`∨`,cap:`∩`,cup:`∪`,int:`∫`,there4:`∴`,sim:`∼`,cong:`≅`,asymp:`≈`,ne:`≠`,equiv:`≡`,le:`≤`,ge:`≥`,sub:`⊂`,sup:`⊃`,nsub:`⊄`,sube:`⊆`,supe:`⊇`,oplus:`⊕`,otimes:`⊗`,perp:`⊥`,sdot:`⋅`,lceil:`⌈`,rceil:`⌉`,lfloor:`⌊`,rfloor:`⌋`,lang:`〈`,rang:`〉`,loz:`◊`,spades:`♠`,clubs:`♣`,hearts:`♥`,diams:`♦`,quot:`"`,amp:`&`,lt:`<`,gt:`>`,OElig:`Œ`,oelig:`œ`,Scaron:`Š`,scaron:`š`,Yuml:`Ÿ`,circ:`ˆ`,tilde:`˜`,ensp:` `,emsp:` `,thinsp:` `,zwnj:``,zwj:``,lrm:``,rlm:``,ndash:`–`,mdash:`—`,lsquo:`‘`,rsquo:`’`,sbquo:`‚`,ldquo:`“`,rdquo:`”`,bdquo:`„`,dagger:`†`,Dagger:`‡`,permil:`‰`,lsaquo:`‹`,rsaquo:`›`,euro:`€`},Ta=[`cent`,`copy`,`divide`,`gt`,`lt`,`not`,`para`,`times`],Ea={}.hasOwnProperty,Da={},Oa;for(Oa in wa)Ea.call(wa,Oa)&&(Da[wa[Oa]]=Oa);var ka=/[^\dA-Za-z]/;function Aa(e,t,n,r){let i=String.fromCharCode(e);if(Ea.call(Da,i)){let e=Da[i],a=`&`+e;return n&&Ca.includes(e)&&!Ta.includes(e)&&(!r||t&&t!==61&&ka.test(String.fromCharCode(t)))?a:a+`;`}return``}function ja(e,t,n){let r=ba(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=Aa(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){let i=Sa(e,t,n.omitOptionalSemicolons);i.length<r.length&&(r=i)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function Ma(e,t){return ga(e,Object.assign({format:ja},t))}var Na=/^>|^->|<!--|-->|--!>|<!-$/g,Pa=[`>`],Fa=[`<`,`>`];function Ia(e,t,n,r){return r.settings.bogusComments?`<?`+Ma(e.value,Object.assign({},r.settings.characterReferences,{subset:Pa}))+`>`:`<!--`+e.value.replace(Na,i)+`-->`;function i(e){return Ma(e,Object.assign({},r.settings.characterReferences,{subset:Fa}))}}function La(e,t,n,r){return`<!`+(r.settings.upperDoctype?`DOCTYPE`:`doctype`)+(r.settings.tightDoctype?``:` `)+`html>`}function Ra(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function za(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}function Ba(e){return e.join(` `).trim()}var Va=/[ \t\n\f\r]/g;function Ha(e){return typeof e==`object`?e.type===`text`&&Ua(e.value):Ua(e)}function Ua(e){return e.replace(Va,``)===``}var Wa=qa(1),Ga=qa(-1),Ka=[];function qa(e){return t;function t(t,n,r){let i=t?t.children:Ka,a=(n||0)+e,o=i[a];if(!r)for(;o&&Ha(o);)a+=e,o=i[a];return o}}var Ja={}.hasOwnProperty;function Ya(e){return t;function t(t,n,r){return Ja.call(e,t.tagName)&&e[t.tagName](t,n,r)}}var Xa=Ya({body:$a,caption:Za,colgroup:Za,dd:ro,dt:no,head:Za,html:Qa,li:to,optgroup:ao,option:oo,p:eo,rp:io,rt:io,tbody:co,td:fo,tfoot:lo,th:fo,thead:so,tr:uo});function Za(e,t,n){let r=Wa(n,t,!0);return!r||r.type!==`comment`&&!(r.type===`text`&&Ha(r.value.charAt(0)))}function Qa(e,t,n){let r=Wa(n,t);return!r||r.type!==`comment`}function $a(e,t,n){let r=Wa(n,t);return!r||r.type!==`comment`}function eo(e,t,n){let r=Wa(n,t);return r?r.type===`element`&&(r.tagName===`address`||r.tagName===`article`||r.tagName===`aside`||r.tagName===`blockquote`||r.tagName===`details`||r.tagName===`div`||r.tagName===`dl`||r.tagName===`fieldset`||r.tagName===`figcaption`||r.tagName===`figure`||r.tagName===`footer`||r.tagName===`form`||r.tagName===`h1`||r.tagName===`h2`||r.tagName===`h3`||r.tagName===`h4`||r.tagName===`h5`||r.tagName===`h6`||r.tagName===`header`||r.tagName===`hgroup`||r.tagName===`hr`||r.tagName===`main`||r.tagName===`menu`||r.tagName===`nav`||r.tagName===`ol`||r.tagName===`p`||r.tagName===`pre`||r.tagName===`section`||r.tagName===`table`||r.tagName===`ul`):!n||n.type!==`element`||n.tagName!==`a`&&n.tagName!==`audio`&&n.tagName!==`del`&&n.tagName!==`ins`&&n.tagName!==`map`&&n.tagName!==`noscript`&&n.tagName!==`video`}function to(e,t,n){let r=Wa(n,t);return!r||r.type===`element`&&r.tagName===`li`}function no(e,t,n){let r=Wa(n,t);return!(!r||r.type!==`element`||r.tagName!==`dt`&&r.tagName!==`dd`)}function ro(e,t,n){let r=Wa(n,t);return!r||r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`)}function io(e,t,n){let r=Wa(n,t);return!r||r.type===`element`&&(r.tagName===`rp`||r.tagName===`rt`)}function ao(e,t,n){let r=Wa(n,t);return!r||r.type===`element`&&r.tagName===`optgroup`}function oo(e,t,n){let r=Wa(n,t);return!r||r.type===`element`&&(r.tagName===`option`||r.tagName===`optgroup`)}function so(e,t,n){let r=Wa(n,t);return!(!r||r.type!==`element`||r.tagName!==`tbody`&&r.tagName!==`tfoot`)}function co(e,t,n){let r=Wa(n,t);return!r||r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`)}function lo(e,t,n){return!Wa(n,t)}function uo(e,t,n){let r=Wa(n,t);return!r||r.type===`element`&&r.tagName===`tr`}function fo(e,t,n){let r=Wa(n,t);return!r||r.type===`element`&&(r.tagName===`td`||r.tagName===`th`)}var po=Ya({body:go,colgroup:_o,head:ho,html:mo,tbody:vo});function mo(e){let t=Wa(e,-1);return!t||t.type!==`comment`}function ho(e){let t=new Set;for(let n of e.children)if(n.type===`element`&&(n.tagName===`base`||n.tagName===`title`)){if(t.has(n.tagName))return!1;t.add(n.tagName)}let n=e.children[0];return!n||n.type===`element`}function go(e){let t=Wa(e,-1,!0);return!t||t.type!==`comment`&&!(t.type===`text`&&Ha(t.value.charAt(0)))&&(t.type!==`element`||t.tagName!==`meta`&&t.tagName!==`link`&&t.tagName!==`script`&&t.tagName!==`style`&&t.tagName!==`template`)}function _o(e,t,n){let r=Ga(n,t),i=Wa(e,-1,!0);return n&&r&&r.type===`element`&&r.tagName===`colgroup`&&Xa(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`col`)}function vo(e,t,n){let r=Ga(n,t),i=Wa(e,-1);return n&&r&&r.type===`element`&&(r.tagName===`thead`||r.tagName===`tbody`)&&Xa(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`tr`)}var yo={name:[[`
|
|
5
5
|
\f\r &/=>`.split(``),`
|
|
@@ -1533,7 +1533,7 @@ diff --git`)}function mg(e,t){if(e.length===0)return[``];let n=`\n${t}`,r=e.star
|
|
|
1533
1533
|
`),a=Math.max(1,t-mb),o=Math.min(i.length,n+mb),s=r===`deletions`?`-`:r===`file`?`>`:`+`,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(`
|
|
1534
1534
|
`)}function wb(e){let t=3,n=/`+/g,r;for(;r=n.exec(e);)t=Math.max(t,r[0].length+1);return"`".repeat(t)}function Tb(e){return e.split(/[@#]/)[0]}function Eb(e){return e.split(`
|
|
1535
1535
|
`).filter(e=>e[0]===`+`||e[0]===`-`||e[0]===`>`).map(e=>e.slice(1)).join(`
|
|
1536
|
-
`)}function Db(e){if(e.length<=1)return null;let t=document.createElement(`select`);t.setAttribute(`aria-label`,`Send to session`),t.className=`_kB`;for(let n of e){let e=document.createElement(`option`);e.value=n.id,e.textContent=r(n),t.append(e)}return t}var Ob=(e,t)=>e?.value||t[0]?.id||null;function kb(e,t,n){for(let r of e)r.disabled=t,n&&r.dataset.role===`send`&&(r.textContent=t?`Sending…`:n)}function Ab(e,t){let n=document.createElement(`button`);return n.type=`button`,n.textContent=e,n.className=t,n}function jb(e,t,n,i){if(!t){e.className=`_r ${i?le:``} _s`,e.textContent=`Send`;let t=n[0];return t&&(e.title=`Send to ${r(t)}`),e}let a=document.createElement(`span`);return a.className=`_kz ${i?`_kL`:``}`,e.className=`_s _kA`,e.textContent=`Send to`,a.append(e,t),a}function Mb(e,t,n){e.onkeydown=e=>{e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),t()),e.key===`Escape`&&(e.preventDefault(),n())}}function Nb(e,t,n){let r=document.createElement(`div`);r.className=`_kH`;let i=document.createElement(`div`),a=document.createElement(`div`);a.className=`_kK`;let o=()=>{i.replaceChildren(),a.replaceChildren();let r=document.createElement(`p`);r.className=`_kI`,r.textContent=e.text;let o=Ab(`Remove`,`_r ${le}`);o.onclick=()=>n.onDelete(e.id);let c=Ab(`Edit`,`_r ${le}`);c.hidden=!n.onEdit,c.onclick=()=>s();let l=t.sessions(),u=l.length>0&&!!n.onSend,d=Ab(`Send`,``);d.dataset.role=`send`,d.hidden=!u;let f=u?Db(l):null,p=f?`Send to`:`Send`;if(d.onclick=()=>{(async()=>{let t=Ob(f,l);if(t&&!d.disabled){kb([o,c,d],!0,p);try{await n.onSend?.(e.id,t)}finally{kb([o,c,d],!1,p)}}})()},a.append(c,o),u&&a.append(jb(d,f,l,!0)),n.drifted){let e=document.createElement(`span`);e.className=`_9 ${_e.warn} _kM`,e.textContent=`changed since`,e.title=`These lines changed since the comment; the agent gets them as they were`,a.append(e)}i.append(r)},s=()=>{i.replaceChildren(),a.replaceChildren();let t=document.createElement(`textarea`);t.value=e.text,t.rows=3,t.className=`_bj _kJ`;let r=Ab(`Save`,`_r _s`),s=Ab(`Cancel`,`_r`),c=()=>{let i=t.value.trim();if(!i||i===e.text){o();return}(async()=>{kb([r,s],!0);try{await n.onEdit?.(e.id,i),e.text=i,o()}catch{kb([r,s],!1)}})()};r.onclick=c,s.onclick=()=>o(),Mb(t,c,o),a.append(r,s),i.append(t),setTimeout(()=>{t.focus({preventScroll:!0}),t.setSelectionRange(t.value.length,t.value.length)},0)};return o(),r.append(i,a),r}function Pb(e,t){let n=document.createElement(`div`);n.className=`_kH`;let r=document.createElement(`textarea`);r.placeholder=`Add a comment…`,r.rows=3,r.className=`_bj _kJ`;let i=Ab(`Add`,`_r`),a=Ab(`Send`,``);a.dataset.role=`send`;let o=Ab(`Cancel`,`_r`),s=e.sessions(),c=s.length>0&&!!t.onSend;a.hidden=!c;let l=c?Db(s):null,u=c?jb(a,l,s,!1):a,d=a.textContent,f=()=>{r.value.trim()&&t.onSave(r.value)},p=()=>{(async()=>{let e=r.value.trim(),n=Ob(l,s);if(e&&n&&!a.disabled){kb([i,a,o],!0,d);try{await t.onSend?.(e,n)}finally{kb([i,a,o],!1,d)}}})()};i.onclick=f,a.onclick=p,o.onclick=()=>t.onCancel(),Mb(r,c?p:f,()=>t.onCancel());let m=document.createElement(`div`);m.className=`_kK`,m.append(i),c&&m.append(u),m.append(o),n.append(r,m),r.addEventListener(`focus`,()=>{let t=window.visualViewport;if(!t)return;let i=()=>e.reveal(n,!0);t.addEventListener(`resize`,i),r.addEventListener(`blur`,()=>t.removeEventListener(`resize`,i),{once:!0})});let h=(e=0)=>{if(!r.isConnected||!r.getClientRects().length){e<120&&requestAnimationFrame(()=>h(e+1));return}r.focus({preventScroll:!0})};return setTimeout(h,0),n}var Fb=e=>`/api/workspaces/${e}/review`;async function Ib(e){return(await ce(Fb(e))).comments||[]}function Lb(e,t){return se(Fb(e),{action:`comment`,...t})}function Rb(e,t,n){return se(`${Fb(e)}/${t}`,{text:n},`PATCH`)}function zb(e,t){return t===`all`?se(Fb(e),{action:`clear`}):Promise.all(t.map(t=>ce(`${Fb(e)}/${t}`,{method:`DELETE`})))}function Bb(e,t,n){fetch(Fb(e),{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({action:`seen`,heads:t,dirty:n}),keepalive:!0}).catch(()=>{})}var Vb=`search-mark`,Hb=`mark.${Vb}`,Ub=`mark.${Vb}{display:inline;background:#ffd24a;color:#1a1408;-webkit-text-fill-color:#1a1408;border-radius:3px;padding:0 2px}mark.${Vb} *,mark.${Vb} *::before,mark.${Vb} *::after{color:inherit!important;-webkit-text-fill-color:inherit!important;background:transparent!important}mark.${Vb}.active{background:#ffb000;box-shadow:0 0 0 1px #c98400}`,Wb={query:``,hit:null,keys:null},Gb=new Map,Kb=new WeakMap,qb=(e,t)=>t?`${e}\n${t.line}\n${t.side||``}`:e;function Jb(e,t,n){Wb.query=e,Wb.hit=t,Wb.keys=n?new Set(n):null;for(let[e,t]of Gb)$b(e,t,!1);t&&Yb(t)}function Yb(e,t=0){requestAnimationFrame(()=>{requestAnimationFrame(()=>{let n=!1;for(let[r,i]of Gb)if(i===e.key&&(n=!0,Qb(r,e)||t>=40))return;t>=40||(!n||t<12)&&setTimeout(()=>Yb(e,t+1),n?32:48)})})}function Xb(e,t){if(e.scrollWidth<=e.clientWidth+1)return;let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=Math.min(24,n.width/8);if(r.left>=n.left+i&&r.right<=n.right-i)return;let a=r.left-n.left+e.scrollLeft-(n.width/2-r.width/2),o=Math.max(0,e.scrollWidth-e.clientWidth);e.scrollTo({left:Math.max(0,Math.min(a,o))})}function Zb(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 Qb(e,t){let n=e.shadowRoot??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=>rx(e)===r)??e[0]??null})();if(!r)return!1;let i=r.getBoundingClientRect();if(i.height===0&&i.width===0)return!1;let a=Zb(r,e);return a&&Xb(a,r),!0}function $b(e,t,n=!0){let r=t&&Wb.hit?.key===t?Wb.hit:null,i=Wb.query.trim(),a=!!i&&!!Wb.keys&&!!t&&!Wb.keys.has(t),o=a?``:qb(i,r),s=Kb.get(e)!==o;(n||s)&&(Kb.set(e,o),lx(e,a?``:i,r),r&&s&&Yb(r))}function ex(e,t){return Gb.set(e,t),$b(e,t),()=>{Gb.delete(e),Kb.delete(e)}}function tx(e){$b(e,Gb.get(e))}function nx(e){let t=e.querySelectorAll(Hb);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 rx(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 ix(e){let t=document.createTreeWalker(e,NodeFilter.SHOW_TEXT),n=[];for(let e=t.nextNode();e;e=t.nextNode())e.parentElement?.closest(Hb)||n.push(e);return n}function ax(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 ox(e,t,n,r,i){let a=ax(e,t,n),o=ax(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 sx(e,t,n,r){let i=ix(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=ux(e,r)?`${Vb} active`:Vb;for(let e=c.length-1;e>=0;e--)ox(i,a,c[e][0],c[e][1],l)}var cx=new WeakMap;function lx(e,t,n){let r=[e],i=e.shadowRoot??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(!s){nx(e);continue}for(let t of e.querySelectorAll(`[data-code] [data-line]`)){let e=t.textContent||``,r=(o?e:e.toLowerCase()).includes(s),i=r?`${o?`s`:`i`}${s}\n${t.getAttribute(`data-line`)}\n${+!!ux(t,n)}`:``,a=!!t.querySelector(Hb);i!==(a?cx.get(t):``)&&(a&&nx(t),cx.set(t,i),r&&sx(t,s,o,n))}}}function ux(e,t){return!!t&&t.line===Number(e.getAttribute(`data-line`))&&(t.side||`additions`)===rx(e)}var dx=n(e(((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`),px=1e4,mx=class extends Error{constructor(){super(`WorkerPoolManager: operation canceled because the pool terminated`)}},hx=class extends Error{constructor(){super(`WorkerPoolManager: operation canceled before the task completed`)}},gx=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=P,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 dx.default.LRUMap(e.totalASTLRUCacheSize??100),this.diffCache=new dx.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??P,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()||e_(a,this.renderOptions))return;let o=hd(e),c=[];if(pf(a.theme,this.renderOptions.theme)||(c=rp(o)?db(o):await pb(o)),!s())return;if(this.highlighter!=null)kd(c,this.highlighter);else{let e=await tf({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 mx||!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);yx(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=hd(this.renderOptions.theme),i=[];if(i=rp(r)?db(r):await pb(r),!this.isCurrentLifecycle(t)){n();return}let a=[];if(a=lb(e)?cb(e):await ub(e),!this.isCurrentLifecycle(t)){n();return}let[o]=await Promise.all([tf({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 mx||!this.isCurrentLifecycle(t)){n();return}this.initialized=!1,this.workersFailed=!0,this.cancelActiveWorkerTasks(),this.terminateWorkers(),this.activeTaskById.clear();for(let t of this.queuedTasks)this.rejectRenderTaskCallbacks(t,xx(e));this.queueBroadcastStateChanges(),r(e)}})()}),this.queueBroadcastStateChanges()}else return this.initialized}}async initializeWorkers(e,t){this.workersFailed=!1;let n=[],r=_p(),i=r>0?vp():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=>this.handleWorkerError(o,e)),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()};o.pendingSetupRequestId=s,this.activeTaskById.set(s,c),this.executeTask(o,c)}))}let a=this.options.workerInitializationTimeout??px,o;try{await Promise.race([Promise.all(n),new Promise((e,t)=>{o=setTimeout(()=>{t(Error(`WorkerPoolManager: worker initialization timed out after ${a}ms`))},a)})])}finally{o!=null&&clearTimeout(o)}}handleWorkerError(e,t){console.error(`Worker error:`,t,e);let{pendingSetupRequestId:n}=e;if(n==null)return;let r=this.activeTaskById.get(n);r?.type===`initialize`&&(r.reject(xx(t)),this.cleanWorkerAndTask(e,r))}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=vx(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);mm(t)||n!=null&&ip(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||mm(e)||t!=null&&ip(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 im(e,this.highlighter,this.renderOptions,{forcePlainText:!0,startingLine:t,totalLines:n,lines:r})}highlightDiffAST(e,t){let n=this.getDiffResultCache(t);Ev(t)||n!=null&&e_(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||Ev(e)||t!=null&&e_(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:A_(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 mx;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 mx;for(let t of this.activeTaskById.values())`reject`in t?t.reject(e):yx(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(e=>!L(e));r.length>0&&tf({themes:hd(this.renderOptions.theme),langs:[`text`,...r],preferredHighlighter:this.preferredHighlighter}).catch(e=>{console.error(e)});let i=n.filter(t=>!e.langs.has(t));if(i.length>0&&(lb(i)?t.request.resolvedLanguages=cb(i):t.request.resolvedLanguages=await ub(i)),!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,xx(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(yx(n))this.notifyHighlightError(n,e),this.rejectRenderTaskCallbacks(n,e);else throw Error(`handleWorkerMessage: unknown task type`);throw e}if(yx(n))for(let{name:t}of n.request.resolvedLanguages??[])e.langs.add(t);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)||!ip(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)||!e_(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,yx(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&&(yx(t)&&(this.rejectRenderTaskCallbacks(t,new hx),this.clearInstanceRequests(t),this.clearHighlightKey(t)),this.activeTaskById.delete(t.id))}executeTask(e,t){_x(t.request)&&this.maybeAttachCustomExtensions(e,t.request),this.activeTaskById.has(t.id)||this.assignWorkerToTask(t,e);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),yx(t)?(this.notifyHighlightError(t,n),this.rejectRenderTaskCallbacks(t,xx(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=_p();e.customExtensionsVersion>=n||(t.customExtensionsVersion=n,t.customExtensionMap=vp())}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 bx(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 hx),this.clearQueuedInstanceRequests(e),this.clearHighlightKey(e)}removeActiveTask(e){this.rejectRenderTaskCallbacks(e,new hx),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()))yx(e)&&e.renderOptionsVersion!==this.renderOptionsVersion&&this.removeActiveTask(e)}clearQueuedInstanceRequests(e){for(let t of bx(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 bx(e))this.activeRequestByInstance.set(t,e.id)}clearInstanceRequests(e){for(let t of bx(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 bx(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)&&gh(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)&&G(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())yx(e)&&(yield e)}generateRequestId(){return`req_${++this.nextRequestId}`}};function _x(e){return e.type===`initialize`||e.type===`file`||e.type===`diff`}function vx(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??gp(e.request.file.name));break;case`diff`:t.add(e.request.diff.lang??gp(e.request.diff.name)),t.add(e.request.diff.lang??gp(e.request.diff.prevName??`-`))}return t.delete(`text`),Array.from(t)}function yx(e){return e?.type===`file`||e?.type===`diff`}function bx(e){return e.instances}function xx(e){if(e instanceof Error)return e;if(typeof e==`object`&&e){if(`error`in e&&e.error instanceof Error)return e.error;if(`message`in e&&typeof e.message==`string`)return Error(e.message)}return Error(String(e))}var Sx;function Cx({poolOptions:e,highlighterOptions:t}){return Sx??=new gx(e,t),Sx}var wx=`/assets/worker-BK3lyuKh.js`,Tx={dark:`work-dark`,light:`work-light`};function Ex(e,t){let n=(t,n)=>Se(e.colors?.[t]??``)??Se(n),r=n(`editor.background`,e.bg??(t?`#000`:`#fff`)),i=n(`gitDecoration.addedResourceForeground`,t?`#5ecc71`:`#0dbe4e`),a=n(`gitDecoration.deletedResourceForeground`,t?`#ff6762`:`#ff2e3f`),o=t?.2:.12,s=t?.2:.15,c=Ee(r,i,o),l=Ee(r,a,o);return[r,c,l,Ee(c,i,s),Ee(l,a,s)]}function Dx(e,t){let n=e.type===`dark`,r=Ex(e,n),i=n?xe:Te,a=new Map,o=e=>{let t=a.get(e);if(t===void 0){let n=Se(e);t=n?we(be(n,i,r)):e,a.set(e,t)}return t},[s,c,l]=r,u={...e.colors};for(let[e,t]of[[`gitDecoration.addedResourceForeground`,c],[`gitDecoration.deletedResourceForeground`,l],[`gitDecoration.modifiedResourceForeground`,s]]){let n=Se(u[e]??``);n&&(u[e]=we(be(n,i,[s,t])))}return{...e,name:t,colors:u,settings:e.settings?.map(e=>e.settings?.foreground?{...e,settings:{...e.settings,foreground:o(e.settings.foreground)}}:e),semanticTokenColors:e.semanticTokenColors&&Object.fromEntries(Object.entries(e.semanticTokenColors).map(([e,t])=>[e,o(t)]))}}fb(Tx.light,async()=>Dx(await Qd(`pierre-light`),Tx.light)),fb(Tx.dark,async()=>Dx(await Qd(`pierre-dark`),Tx.dark));var Ox;function kx(){return Ox??=Cx({poolOptions:{workerFactory:()=>new Worker(wx,{type:`module`}),poolSize:Math.min(2,navigator.hardwareConcurrency||2),totalASTLRUCacheSize:32},highlighterOptions:{theme:Tx}})}var Ax={apng:`image/apng`,avif:`image/avif`,bmp:`image/bmp`,gif:`image/gif`,ico:`image/x-icon`,jpeg:`image/jpeg`,jpg:`image/jpeg`,png:`image/png`,svg:`image/svg+xml`,webp:`image/webp`,pdf:`application/pdf`};function jx(e){let t=e.lastIndexOf(`.`),n=Ax[t<0?``:e.slice(t+1).toLowerCase()];return n?{kind:n===`application/pdf`?`pdf`:`image`,type:n}:null}var Mx=`_gQ _bp _m`,Nx=`<h1> </h1><nav aria-label="Review views"><a title="What changed">Changes</a><a title="Every file in the workspace">Files</a></nav>`,Px=` D l D b l`;function Fx(e){y(e.a,`_Q`),y(e.c,[`_bB`,`_jJ`])}var Ix=(e,t)=>{c(e.b,t===`files`?`Files`:`Review`),y(e.d,[`_bD`,t===`changes`&&`_bC`]),C(e.d,`aria-current`,t===`changes`?`page`:void 0),y(e.e,[`_bD`,t===`files`&&`_bC`]),C(e.e,`aria-current`,t===`files`?`page`:void 0)},Lx=(e,t)=>C(e.d,`href`,t),Rx=(e,t)=>C(e.e,`href`,t),zx=te,Bx=(e=>`/${e}&`)(ee);function Vx(e){A(e.a,M)}var Hx=(e,t)=>ge(e.a,t),Ux=(e,t)=>j(e.a,t),Wx=((e,t)=>`<div role=group><span>${e}<span aria-hidden=true> </span></span>${t}<!></div>`)(zx,He),Gx=((e,t)=>` D D/${e}& D m/${t}&%l`)(Bx,Be),Kx=(e,t)=>C(e.a,`value`,t),qx=(e,t)=>{c(e.b,r(t)),Kx(e,t?.id)},Jx=(e,t)=>qx(e,t[0]),Yx=b(25,e=>{C(e.b,`disabled`,e._._.o),C(e.c,`disabled`,e._._.o)},e=>e._._),Xx=v(`r2`,e=>{k(e.b,`click`,function(){let t=e.c;typeof t.showPicker==`function`?t.showPicker():t.focus()}),w(e,`c`)}),Zx=e=>{Yx(e),$x(e),eS(e),y(e.a,`_kx`),y(e.b,[`_ku`,`_kv`,`_ky`]),y(e.c,`_T`),Xx(e)},Qx=m(2,`<option> </option>`,` D `,0,Jx),$x=b(26,e=>Qx(e,[e._._.q,`id`]),e=>e._._),eS=b(29,e=>S(e,`c`,e._._.v,IS(e)),e=>e._._),tS=b(25,e=>c(e.a,e._._.o?`Sending…`:`Send`),e=>e._._),nS=tS,rS=o(4,e=>c(e.b,e._._.o?`Sending…`:`Send to ${r(e._._.t)}`)),iS=b(25,e=>{c(e.d,e._._.o?`Sending…`:`Send`),rS(e)},e=>e._._),aS=e=>{iS(e),oS(e),y(e.a,[`_kw`,`_S`]),y(e.c,`_R`)},oS=b(28,rS,e=>e._._),sS=o(2,e=>C(e.a,`disabled`,e._.o||!e._.k)),cS=s(6,0,sS),lS=v(`r3`,e=>k(e.a,`click`,function(){e._.x()})),uS=e=>{cS._(e),dS._(e),mS._(e),hS._(e),y(e.a,[`_ku`,`_kv`]),lS(e)},dS=s(6,0,sS),fS=h(0,`<span> </span><span> </span>`,` D l D `,aS,` `,` `,nS),pS=h(1,`<span><button type=button aria-label="Choose session"></button><select aria-label="Send to session" tabindex=-1></select></span>`,` D b `,Zx),mS=s(6,0,e=>{fS(e,e._.s>1?0:1),pS(e,e._.s>1?0:1)}),hS=s(6,0,e=>C(e.a,`title`,`Send to ${r(e._.t)}`)),gS=D(23),_S=o(20,e=>gS(e,LS(e)),2),vS=O(iS,tS,Yx),yS=u(14,e=>{_S(e),dS(e),vS(e)}),bS=h(6,`<button type=button></button><!><!>`,` b%`,uS),xS=O(oS),SS=D(19,e=>{AS(e,e.t?.id),bS(e,+!e.t),_S(e),hS(e),xS(e)}),CS=o(17,e=>SS(e,e.q.find(t=>t.id===e.p)??e.q[0]??null)),wS=u(15,CS);function TS(e){y(e.b,[`_w`,`_ks`]),Vx(e.c),Hx(e.c,18),Ux(e.c,`_x`),y(e.d,[ie,`_kt`]),Ve(e.f),yS(e,!1),wS(e,null)}var ES=O($x),DS=D(16,e=>{OS(e,e.q.length),CS(e),ES(e)}),OS=D(18,mS),kS=(e,t)=>DS(e,t||[]),AS=D(21,O(eS)),jS=(e,t)=>{C(e.a,`aria-label`,t),C(e.b,`title`,t)},MS=o(13,e=>Ue(e.f,{class:`_ku`,text:e.m,label:`Copy comments`,disabled:!e.k})),NS=D(10,e=>{y(e.a,[`_kq`,!e.k&&`_kr`]),c(e.e,e.k>99?`99+`:e.k),jS(e,`${Ce(e.k,`comment`)}`),MS(e),cS(e)}),PS=D(11,_S),FS=D(12,MS),IS=e=>function(t){wS(e._._,t)},LS=e=>()=>{(async()=>{if(e.t&&!e.o){yS(e,!0);try{await e.l(e.t?.id)}finally{yS(e,!1)}}})()};l.r0=IS,l.r1=LS;var RS=`<svg data-icon-sprite aria-hidden="true" width="0" height="0">
|
|
1536
|
+
`)}function Db(e){if(e.length<=1)return null;let t=document.createElement(`select`);t.setAttribute(`aria-label`,`Send to session`),t.className=`_kq`;for(let n of e){let e=document.createElement(`option`);e.value=n.id,e.textContent=r(n),t.append(e)}return t}var Ob=(e,t)=>e?.value||t[0]?.id||null;function kb(e,t,n){for(let r of e)r.disabled=t,n&&r.dataset.role===`send`&&(r.textContent=t?`Sending…`:n)}function Ab(e,t){let n=document.createElement(`button`);return n.type=`button`,n.textContent=e,n.className=t,n}function jb(e,t,n,i){if(!t){e.className=`_r ${i?le:``} _s`,e.textContent=`Send`;let t=n[0];return t&&(e.title=`Send to ${r(t)}`),e}let a=document.createElement(`span`);return a.className=`_ko ${i?`_kv`:``}`,e.className=`_s _kp`,e.textContent=`Send to`,a.append(e,t),a}function Mb(e,t,n){e.onkeydown=e=>{e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),t()),e.key===`Escape`&&(e.preventDefault(),n())}}function Nb(e,t,n){let r=document.createElement(`div`);r.className=`_kr`;let i=document.createElement(`div`),a=document.createElement(`div`);a.className=`_ku`;let o=()=>{i.replaceChildren(),a.replaceChildren();let r=document.createElement(`p`);r.className=`_ks`,r.textContent=e.text;let o=Ab(`Remove`,`_r ${le}`);o.onclick=()=>n.onDelete(e.id);let c=Ab(`Edit`,`_r ${le}`);c.hidden=!n.onEdit,c.onclick=()=>s();let l=t.sessions(),u=l.length>0&&!!n.onSend,d=Ab(`Send`,``);d.dataset.role=`send`,d.hidden=!u;let f=u?Db(l):null,p=f?`Send to`:`Send`;if(d.onclick=()=>{(async()=>{let t=Ob(f,l);if(t&&!d.disabled){kb([o,c,d],!0,p);try{await n.onSend?.(e.id,t)}finally{kb([o,c,d],!1,p)}}})()},a.append(c,o),u&&a.append(jb(d,f,l,!0)),n.drifted){let e=document.createElement(`span`);e.className=`_9 ${_e.warn} _kw`,e.textContent=`changed since`,e.title=`These lines changed since the comment; the agent gets them as they were`,a.append(e)}i.append(r)},s=()=>{i.replaceChildren(),a.replaceChildren();let t=document.createElement(`textarea`);t.value=e.text,t.rows=3,t.className=`_bj _kt`;let r=Ab(`Save`,`_r _s`),s=Ab(`Cancel`,`_r`),c=()=>{let i=t.value.trim();if(!i||i===e.text){o();return}(async()=>{kb([r,s],!0);try{await n.onEdit?.(e.id,i),e.text=i,o()}catch{kb([r,s],!1)}})()};r.onclick=c,s.onclick=()=>o(),Mb(t,c,o),a.append(r,s),i.append(t),setTimeout(()=>{t.focus({preventScroll:!0}),t.setSelectionRange(t.value.length,t.value.length)},0)};return o(),r.append(i,a),r}function Pb(e,t){let n=document.createElement(`div`);n.className=`_kr`;let r=document.createElement(`textarea`);r.placeholder=`Add a comment…`,r.rows=3,r.className=`_bj _kt`;let i=Ab(`Add`,`_r`),a=Ab(`Send`,``);a.dataset.role=`send`;let o=Ab(`Cancel`,`_r`),s=e.sessions(),c=s.length>0&&!!t.onSend;a.hidden=!c;let l=c?Db(s):null,u=c?jb(a,l,s,!1):a,d=a.textContent,f=()=>{r.value.trim()&&t.onSave(r.value)},p=()=>{(async()=>{let e=r.value.trim(),n=Ob(l,s);if(e&&n&&!a.disabled){kb([i,a,o],!0,d);try{await t.onSend?.(e,n)}finally{kb([i,a,o],!1,d)}}})()};i.onclick=f,a.onclick=p,o.onclick=()=>t.onCancel(),Mb(r,c?p:f,()=>t.onCancel());let m=document.createElement(`div`);m.className=`_ku`,m.append(i),c&&m.append(u),m.append(o),n.append(r,m),r.addEventListener(`focus`,()=>{let t=window.visualViewport;if(!t)return;let i=()=>e.reveal(n,!0);t.addEventListener(`resize`,i),r.addEventListener(`blur`,()=>t.removeEventListener(`resize`,i),{once:!0})});let h=(e=0)=>{if(!r.isConnected||!r.getClientRects().length){e<120&&requestAnimationFrame(()=>h(e+1));return}r.focus({preventScroll:!0})};return setTimeout(h,0),n}var Fb=e=>`/api/workspaces/${e}/review`;async function Ib(e){return(await ce(Fb(e))).comments||[]}function Lb(e,t){return se(Fb(e),{action:`comment`,...t})}function Rb(e,t,n){return se(`${Fb(e)}/${t}`,{text:n},`PATCH`)}function zb(e,t){return t===`all`?se(Fb(e),{action:`clear`}):Promise.all(t.map(t=>ce(`${Fb(e)}/${t}`,{method:`DELETE`})))}function Bb(e,t,n){fetch(Fb(e),{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({action:`seen`,heads:t,dirty:n}),keepalive:!0}).catch(()=>{})}var Vb=`search-mark`,Hb=`mark.${Vb}`,Ub=`mark.${Vb}{display:inline;background:#ffd24a;color:#1a1408;-webkit-text-fill-color:#1a1408;border-radius:3px;padding:0 2px}mark.${Vb} *,mark.${Vb} *::before,mark.${Vb} *::after{color:inherit!important;-webkit-text-fill-color:inherit!important;background:transparent!important}mark.${Vb}.active{background:#ffb000;box-shadow:0 0 0 1px #c98400}`,Wb={query:``,hit:null,keys:null},Gb=new Map,Kb=new WeakMap,qb=(e,t)=>t?`${e}\n${t.line}\n${t.side||``}`:e;function Jb(e,t,n){Wb.query=e,Wb.hit=t,Wb.keys=n?new Set(n):null;for(let[e,t]of Gb)$b(e,t,!1);t&&Yb(t)}function Yb(e,t=0){requestAnimationFrame(()=>{requestAnimationFrame(()=>{let n=!1;for(let[r,i]of Gb)if(i===e.key&&(n=!0,Qb(r,e)||t>=40))return;t>=40||(!n||t<12)&&setTimeout(()=>Yb(e,t+1),n?32:48)})})}function Xb(e,t){if(e.scrollWidth<=e.clientWidth+1)return;let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=Math.min(24,n.width/8);if(r.left>=n.left+i&&r.right<=n.right-i)return;let a=r.left-n.left+e.scrollLeft-(n.width/2-r.width/2),o=Math.max(0,e.scrollWidth-e.clientWidth);e.scrollTo({left:Math.max(0,Math.min(a,o))})}function Zb(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 Qb(e,t){let n=e.shadowRoot??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=>rx(e)===r)??e[0]??null})();if(!r)return!1;let i=r.getBoundingClientRect();if(i.height===0&&i.width===0)return!1;let a=Zb(r,e);return a&&Xb(a,r),!0}function $b(e,t,n=!0){let r=t&&Wb.hit?.key===t?Wb.hit:null,i=Wb.query.trim(),a=!!i&&!!Wb.keys&&!!t&&!Wb.keys.has(t),o=a?``:qb(i,r),s=Kb.get(e)!==o;(n||s)&&(Kb.set(e,o),lx(e,a?``:i,r),r&&s&&Yb(r))}function ex(e,t){return Gb.set(e,t),$b(e,t),()=>{Gb.delete(e),Kb.delete(e)}}function tx(e){$b(e,Gb.get(e))}function nx(e){let t=e.querySelectorAll(Hb);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 rx(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 ix(e){let t=document.createTreeWalker(e,NodeFilter.SHOW_TEXT),n=[];for(let e=t.nextNode();e;e=t.nextNode())e.parentElement?.closest(Hb)||n.push(e);return n}function ax(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 ox(e,t,n,r,i){let a=ax(e,t,n),o=ax(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 sx(e,t,n,r){let i=ix(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=ux(e,r)?`${Vb} active`:Vb;for(let e=c.length-1;e>=0;e--)ox(i,a,c[e][0],c[e][1],l)}var cx=new WeakMap;function lx(e,t,n){let r=[e],i=e.shadowRoot??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(!s){nx(e);continue}for(let t of e.querySelectorAll(`[data-code] [data-line]`)){let e=t.textContent||``,r=(o?e:e.toLowerCase()).includes(s),i=r?`${o?`s`:`i`}${s}\n${t.getAttribute(`data-line`)}\n${+!!ux(t,n)}`:``,a=!!t.querySelector(Hb);i!==(a?cx.get(t):``)&&(a&&nx(t),cx.set(t,i),r&&sx(t,s,o,n))}}}function ux(e,t){return!!t&&t.line===Number(e.getAttribute(`data-line`))&&(t.side||`additions`)===rx(e)}var dx=n(e(((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`),px=1e4,mx=class extends Error{constructor(){super(`WorkerPoolManager: operation canceled because the pool terminated`)}},hx=class extends Error{constructor(){super(`WorkerPoolManager: operation canceled before the task completed`)}},gx=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=P,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 dx.default.LRUMap(e.totalASTLRUCacheSize??100),this.diffCache=new dx.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??P,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()||e_(a,this.renderOptions))return;let o=hd(e),c=[];if(pf(a.theme,this.renderOptions.theme)||(c=rp(o)?db(o):await pb(o)),!s())return;if(this.highlighter!=null)kd(c,this.highlighter);else{let e=await tf({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 mx||!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);yx(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=hd(this.renderOptions.theme),i=[];if(i=rp(r)?db(r):await pb(r),!this.isCurrentLifecycle(t)){n();return}let a=[];if(a=lb(e)?cb(e):await ub(e),!this.isCurrentLifecycle(t)){n();return}let[o]=await Promise.all([tf({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 mx||!this.isCurrentLifecycle(t)){n();return}this.initialized=!1,this.workersFailed=!0,this.cancelActiveWorkerTasks(),this.terminateWorkers(),this.activeTaskById.clear();for(let t of this.queuedTasks)this.rejectRenderTaskCallbacks(t,xx(e));this.queueBroadcastStateChanges(),r(e)}})()}),this.queueBroadcastStateChanges()}else return this.initialized}}async initializeWorkers(e,t){this.workersFailed=!1;let n=[],r=_p(),i=r>0?vp():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=>this.handleWorkerError(o,e)),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()};o.pendingSetupRequestId=s,this.activeTaskById.set(s,c),this.executeTask(o,c)}))}let a=this.options.workerInitializationTimeout??px,o;try{await Promise.race([Promise.all(n),new Promise((e,t)=>{o=setTimeout(()=>{t(Error(`WorkerPoolManager: worker initialization timed out after ${a}ms`))},a)})])}finally{o!=null&&clearTimeout(o)}}handleWorkerError(e,t){console.error(`Worker error:`,t,e);let{pendingSetupRequestId:n}=e;if(n==null)return;let r=this.activeTaskById.get(n);r?.type===`initialize`&&(r.reject(xx(t)),this.cleanWorkerAndTask(e,r))}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=vx(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);mm(t)||n!=null&&ip(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||mm(e)||t!=null&&ip(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 im(e,this.highlighter,this.renderOptions,{forcePlainText:!0,startingLine:t,totalLines:n,lines:r})}highlightDiffAST(e,t){let n=this.getDiffResultCache(t);Ev(t)||n!=null&&e_(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||Ev(e)||t!=null&&e_(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:A_(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 mx;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 mx;for(let t of this.activeTaskById.values())`reject`in t?t.reject(e):yx(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(e=>!L(e));r.length>0&&tf({themes:hd(this.renderOptions.theme),langs:[`text`,...r],preferredHighlighter:this.preferredHighlighter}).catch(e=>{console.error(e)});let i=n.filter(t=>!e.langs.has(t));if(i.length>0&&(lb(i)?t.request.resolvedLanguages=cb(i):t.request.resolvedLanguages=await ub(i)),!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,xx(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(yx(n))this.notifyHighlightError(n,e),this.rejectRenderTaskCallbacks(n,e);else throw Error(`handleWorkerMessage: unknown task type`);throw e}if(yx(n))for(let{name:t}of n.request.resolvedLanguages??[])e.langs.add(t);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)||!ip(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)||!e_(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,yx(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&&(yx(t)&&(this.rejectRenderTaskCallbacks(t,new hx),this.clearInstanceRequests(t),this.clearHighlightKey(t)),this.activeTaskById.delete(t.id))}executeTask(e,t){_x(t.request)&&this.maybeAttachCustomExtensions(e,t.request),this.activeTaskById.has(t.id)||this.assignWorkerToTask(t,e);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),yx(t)?(this.notifyHighlightError(t,n),this.rejectRenderTaskCallbacks(t,xx(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=_p();e.customExtensionsVersion>=n||(t.customExtensionsVersion=n,t.customExtensionMap=vp())}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 bx(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 hx),this.clearQueuedInstanceRequests(e),this.clearHighlightKey(e)}removeActiveTask(e){this.rejectRenderTaskCallbacks(e,new hx),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()))yx(e)&&e.renderOptionsVersion!==this.renderOptionsVersion&&this.removeActiveTask(e)}clearQueuedInstanceRequests(e){for(let t of bx(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 bx(e))this.activeRequestByInstance.set(t,e.id)}clearInstanceRequests(e){for(let t of bx(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 bx(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)&&gh(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)&&G(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())yx(e)&&(yield e)}generateRequestId(){return`req_${++this.nextRequestId}`}};function _x(e){return e.type===`initialize`||e.type===`file`||e.type===`diff`}function vx(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??gp(e.request.file.name));break;case`diff`:t.add(e.request.diff.lang??gp(e.request.diff.name)),t.add(e.request.diff.lang??gp(e.request.diff.prevName??`-`))}return t.delete(`text`),Array.from(t)}function yx(e){return e?.type===`file`||e?.type===`diff`}function bx(e){return e.instances}function xx(e){if(e instanceof Error)return e;if(typeof e==`object`&&e){if(`error`in e&&e.error instanceof Error)return e.error;if(`message`in e&&typeof e.message==`string`)return Error(e.message)}return Error(String(e))}var Sx;function Cx({poolOptions:e,highlighterOptions:t}){return Sx??=new gx(e,t),Sx}var wx=`/assets/worker-BK3lyuKh.js`,Tx={dark:`work-dark`,light:`work-light`};function Ex(e,t){let n=(t,n)=>Se(e.colors?.[t]??``)??Se(n),r=n(`editor.background`,e.bg??(t?`#000`:`#fff`)),i=n(`gitDecoration.addedResourceForeground`,t?`#5ecc71`:`#0dbe4e`),a=n(`gitDecoration.deletedResourceForeground`,t?`#ff6762`:`#ff2e3f`),o=t?.2:.12,s=t?.2:.15,c=Ee(r,i,o),l=Ee(r,a,o);return[r,c,l,Ee(c,i,s),Ee(l,a,s)]}function Dx(e,t){let n=e.type===`dark`,r=Ex(e,n),i=n?xe:Te,a=new Map,o=e=>{let t=a.get(e);if(t===void 0){let n=Se(e);t=n?we(be(n,i,r)):e,a.set(e,t)}return t},[s,c,l]=r,u={...e.colors};for(let[e,t]of[[`gitDecoration.addedResourceForeground`,c],[`gitDecoration.deletedResourceForeground`,l],[`gitDecoration.modifiedResourceForeground`,s]]){let n=Se(u[e]??``);n&&(u[e]=we(be(n,i,[s,t])))}return{...e,name:t,colors:u,settings:e.settings?.map(e=>e.settings?.foreground?{...e,settings:{...e.settings,foreground:o(e.settings.foreground)}}:e),semanticTokenColors:e.semanticTokenColors&&Object.fromEntries(Object.entries(e.semanticTokenColors).map(([e,t])=>[e,o(t)]))}}fb(Tx.light,async()=>Dx(await Qd(`pierre-light`),Tx.light)),fb(Tx.dark,async()=>Dx(await Qd(`pierre-dark`),Tx.dark));var Ox;function kx(){return Ox??=Cx({poolOptions:{workerFactory:()=>new Worker(wx,{type:`module`}),poolSize:Math.min(2,navigator.hardwareConcurrency||2),totalASTLRUCacheSize:32},highlighterOptions:{theme:Tx}})}var Ax={apng:`image/apng`,avif:`image/avif`,bmp:`image/bmp`,gif:`image/gif`,ico:`image/x-icon`,jpeg:`image/jpeg`,jpg:`image/jpeg`,png:`image/png`,svg:`image/svg+xml`,webp:`image/webp`,pdf:`application/pdf`};function jx(e){let t=e.lastIndexOf(`.`),n=Ax[t<0?``:e.slice(t+1).toLowerCase()];return n?{kind:n===`application/pdf`?`pdf`:`image`,type:n}:null}var Mx=`_gQ _bp _m`,Nx=`<h1> </h1><nav aria-label="Review views"><a title="What changed">Changes</a><a title="Every file in the workspace">Files</a></nav>`,Px=` D l D b l`;function Fx(e){y(e.a,`_Q`),y(e.c,[`_bB`,`_je`])}var Ix=(e,t)=>{c(e.b,t===`files`?`Files`:`Review`),y(e.d,[`_bD`,t===`changes`&&`_bC`]),C(e.d,`aria-current`,t===`changes`?`page`:void 0),y(e.e,[`_bD`,t===`files`&&`_bC`]),C(e.e,`aria-current`,t===`files`?`page`:void 0)},Lx=(e,t)=>C(e.d,`href`,t),Rx=(e,t)=>C(e.e,`href`,t),zx=te,Bx=(e=>`/${e}&`)(ee);function Vx(e){A(e.a,M)}var Hx=(e,t)=>ge(e.a,t),Ux=(e,t)=>j(e.a,t),Wx=((e,t)=>`<div role=group><span>${e}<span aria-hidden=true> </span></span>${t}<!></div>`)(zx,He),Gx=((e,t)=>` D D/${e}& D m/${t}&%l`)(Bx,Be),Kx=(e,t)=>C(e.a,`value`,t),qx=(e,t)=>{c(e.b,r(t)),Kx(e,t?.id)},Jx=(e,t)=>qx(e,t[0]),Yx=b(25,e=>{C(e.b,`disabled`,e._._.o),C(e.c,`disabled`,e._._.o)},e=>e._._),Xx=v(`r2`,e=>{k(e.b,`click`,function(){let t=e.c;typeof t.showPicker==`function`?t.showPicker():t.focus()}),w(e,`c`)}),Zx=e=>{Yx(e),$x(e),eS(e),y(e.a,`_km`),y(e.b,[`_kj`,`_kk`,`_kn`]),y(e.c,`_T`),Xx(e)},Qx=m(2,`<option> </option>`,` D `,0,Jx),$x=b(26,e=>Qx(e,[e._._.q,`id`]),e=>e._._),eS=b(29,e=>S(e,`c`,e._._.v,IS(e)),e=>e._._),tS=b(25,e=>c(e.a,e._._.o?`Sending…`:`Send`),e=>e._._),nS=tS,rS=o(4,e=>c(e.b,e._._.o?`Sending…`:`Send to ${r(e._._.t)}`)),iS=b(25,e=>{c(e.d,e._._.o?`Sending…`:`Send`),rS(e)},e=>e._._),aS=e=>{iS(e),oS(e),y(e.a,[`_kl`,`_S`]),y(e.c,`_R`)},oS=b(28,rS,e=>e._._),sS=o(2,e=>C(e.a,`disabled`,e._.o||!e._.k)),cS=s(6,0,sS),lS=v(`r3`,e=>k(e.a,`click`,function(){e._.x()})),uS=e=>{cS._(e),dS._(e),mS._(e),hS._(e),y(e.a,[`_kj`,`_kk`]),lS(e)},dS=s(6,0,sS),fS=h(0,`<span> </span><span> </span>`,` D l D `,aS,` `,` `,nS),pS=h(1,`<span><button type=button aria-label="Choose session"></button><select aria-label="Send to session" tabindex=-1></select></span>`,` D b `,Zx),mS=s(6,0,e=>{fS(e,e._.s>1?0:1),pS(e,e._.s>1?0:1)}),hS=s(6,0,e=>C(e.a,`title`,`Send to ${r(e._.t)}`)),gS=D(23),_S=o(20,e=>gS(e,LS(e)),2),vS=O(iS,tS,Yx),yS=u(14,e=>{_S(e),dS(e),vS(e)}),bS=h(6,`<button type=button></button><!><!>`,` b%`,uS),xS=O(oS),SS=D(19,e=>{AS(e,e.t?.id),bS(e,+!e.t),_S(e),hS(e),xS(e)}),CS=o(17,e=>SS(e,e.q.find(t=>t.id===e.p)??e.q[0]??null)),wS=u(15,CS);function TS(e){y(e.b,[`_w`,`_kh`]),Vx(e.c),Hx(e.c,18),Ux(e.c,`_x`),y(e.d,[ie,`_ki`]),Ve(e.f),yS(e,!1),wS(e,null)}var ES=O($x),DS=D(16,e=>{OS(e,e.q.length),CS(e),ES(e)}),OS=D(18,mS),kS=(e,t)=>DS(e,t||[]),AS=D(21,O(eS)),jS=(e,t)=>{C(e.a,`aria-label`,t),C(e.b,`title`,t)},MS=o(13,e=>Ue(e.f,{class:`_kj`,text:e.m,label:`Copy comments`,disabled:!e.k})),NS=D(10,e=>{y(e.a,[`_kf`,!e.k&&`_kg`]),c(e.e,e.k>99?`99+`:e.k),jS(e,`${Ce(e.k,`comment`)}`),MS(e),cS(e)}),PS=D(11,_S),FS=D(12,MS),IS=e=>function(t){wS(e._._,t)},LS=e=>()=>{(async()=>{if(e.t&&!e.o){yS(e,!0);try{await e.l(e.t?.id)}finally{yS(e,!1)}}})()};l.r0=IS,l.r1=LS;var RS=`<svg data-icon-sprite aria-hidden="true" width="0" height="0">
|
|
1537
1537
|
<symbol id="file-tree-icon-chevron" viewBox="0 0 16 16">
|
|
1538
1538
|
<path d="M12.4697 5.46973C12.7626 5.17684 13.2374 5.17684 13.5303 5.46973C13.8232 5.76262 13.8232 6.23738 13.5303 6.53028L8.53028 11.5303C8.23738 11.8232 7.76262 11.8232 7.46973 11.5303L2.46973 6.53028C2.17684 6.23738 2.17684 5.76262 2.46973 5.46973C2.76262 5.17684 3.23738 5.17684 3.53028 5.46973L8 9.93946L12.4697 5.46973Z" fill="currentcolor"/>
|
|
1539
1539
|
</symbol>
|
|
@@ -2798,4 +2798,4 @@ diff --git`)}function mg(e,t){if(e.length===0)return[``];let n=`\n${t}`,r=e.star
|
|
|
2798
2798
|
}`}function ZD(e){return`${YD}
|
|
2799
2799
|
@layer unsafe {
|
|
2800
2800
|
${e}
|
|
2801
|
-
}`}var QD=new WeakMap;function $D(e){let t=QD.get(e);if(t!=null)return t;let n=document.createElement(`div`);n.setAttribute(ew,`true`);let r=document.createElement(`div`);r.style.position=`relative`,r.style.height=`200%`,n.appendChild(r),e.appendChild(n);let i=Math.max(n.offsetWidth-n.clientWidth,0);return n.remove(),QD.set(e,i),i}function eO(e,t){if(!e.isConnected)return;let n=$D(t);if(n==null)return;let r=t.querySelector(`style[${tw}]`),i=r instanceof HTMLStyleElement?r:document.createElement(`style`);r instanceof HTMLStyleElement||(i.setAttribute(tw,``),t.appendChild(i)),i.textContent=`:host { ${nw}: ${n}px; }`}var tO;function nO(e){if(typeof CSSStyleSheet<`u`&&typeof CSSStyleSheet.prototype.replaceSync==`function`&&`adoptedStyleSheets`in e){tO??(tO=new CSSStyleSheet,tO.replaceSync(XD(JD)));let t=!1;try{e.adoptedStyleSheets=[tO],t=!0}catch{}if(t){e.querySelector(`style[${QC}]`)?.remove();return}}if(e.querySelector(`style[data-file-tree-style]`)==null){let t=document.createElement(`style`);t.setAttribute(QC,``),t.textContent=XD(JD),e.prepend(t)}}function rO(e,t){iO(e,t),nO(t),eO(e,t)}function iO(e,t){let n=e.querySelector(`template[shadowrootmode="open"], template[data-file-tree-shadowrootmode="open"]`);n instanceof HTMLTemplateElement&&(t.childNodes.length>0||(t.appendChild(n.content.cloneNode(!0)),n.hasAttribute(`shadowrootmode`)&&n.remove()))}if(typeof HTMLElement<`u`&&customElements.get(`file-tree-container`)==null){class e extends HTMLElement{constructor(){super()}connectedCallback(){let e=this.shadowRoot??this.attachShadow({mode:`open`});rO(this,e)}}if(customElements.define(ZC,e),typeof document<`u`)for(let e of Array.from(document.querySelectorAll(ZC)))e instanceof HTMLElement&&rO(e,e.shadowRoot??e.attachShadow({mode:`open`}))}var aO=e=>e.startsWith(`f::`)?e.slice(3):e;function oO(e){let t=e.lastIndexOf(`/`);return t<0?{parentPath:``,baseName:e}:{parentPath:e.slice(0,t),baseName:e.slice(t+1)}}function sO(e,t){return e===``?t:`${e}/${t}`}function cO({files:e,path:t,isFolder:n,nextBasename:r}){let i=aO(t),a=r.trim();if(a.length===0)return{error:`Name cannot be empty.`};if(a.includes(`/`))return{error:`Name cannot include "/".`};let{parentPath:o,baseName:s}=oO(i);if(a===s)return{nextFiles:e,sourcePath:i,destinationPath:i,isFolder:n};let c=sO(o,a),l=Array(e.length),u=new Set;if(!n){let t=`${c}/`,r=!1;for(let n=0;n<e.length;n++){let a=e[n];if(a!==i&&a.startsWith(t))return{error:`"${c}" already exists.`};let o=a===i?c:a;if(u.has(o))return{error:`"${c}" already exists.`};u.add(o),l[n]=o,a===i&&(r=!0)}return r?{nextFiles:l,sourcePath:i,destinationPath:c,isFolder:n}:{error:`Could not find the selected file to rename.`}}let d=`${i}/`,f=`${c}/`,p=0;for(let t=0;t<e.length;t++){let n=e[t],r=n===i||n.startsWith(d);if(!r&&(n===c||n.startsWith(f)))return{error:`"${c}" already exists.`};let a=r?`${c}${n.slice(i.length)}`:n;if(u.has(a))return{error:`"${c}" already exists.`};u.add(a),l[t]=a,r&&p++}return p===0?{error:`Could not find the selected folder to rename.`}:{nextFiles:l,sourcePath:i,destinationPath:c,isFolder:n}}function lO(e){return e.endsWith(`/`)}function uO(e){let t=e.endsWith(`/`)?e.slice(0,-1):e,n=t.lastIndexOf(`/`),r=n<0?t:t.slice(n+1);return e.endsWith(`/`)?`${r}/`:r}function dO(e){let t=[],n=new Set;for(let r of e)n.has(r)||(n.add(r),t.push(r));let r=new Set;for(let e of t.toSorted((e,t)=>e.length===t.length?e.localeCompare(t):e.length-t.length)){let t=(e.endsWith(`/`)?e.slice(0,-1):e).split(`/`),n=!1;for(let e=0;e<t.length-1;e+=1){let i=`${t.slice(0,e+1).join(`/`)}/`;if(r.has(i)){n=!0;break}}n||r.add(e)}return t.filter(e=>r.has(e))}function fO(e,t){return t.includes(e)?dO(t):[e]}function pO(e,t){return e===t?!0:e==null||t==null?!1:e.kind===t.kind&&e.directoryPath===t.directoryPath&&e.flattenedSegmentPath===t.flattenedSegmentPath&&e.hoveredPath===t.hoveredPath}function mO(e,t){return{draggedPaths:e,target:t}}function hO(e,t){if(t.kind!==`directory`||t.directoryPath==null)return!1;for(let n of e)if(lO(n)&&(t.directoryPath===n||t.directoryPath.startsWith(n)))return!0;return!1}function gO(e,t){return t.kind===`root`||t.directoryPath==null?uO(e):t.directoryPath}function _O(e,t){let n=e.map(e=>{let n=gO(e,t);return n===e?null:{from:e,to:n,type:`move`}}).filter(e=>e!=null);return n.length===0?null:{operations:n,result:{draggedPaths:e,operation:n.length===1?`move`:`batch`,target:t}}}function vO(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1)if(e[n]!==t[n])return!1;return!0}function yO(e,t,n){let{paths:r,preparedInput:i}=e;if(i==null){if(r==null)throw Error(`FileTree requires paths or preparedInput`);return{paths:r,preparedInput:void 0}}let a=i.paths;if(r==null)return{paths:a,preparedInput:i};if(!vO(UD.preparePaths(r,n==null?{}:{sort:n}),a))throw Error(`FileTree ${t} received paths and preparedInput for different path lists`);return{paths:a,preparedInput:i}}function bO(e){return e.operation===`add`||e.operation===`remove`||e.operation===`move`||e.operation===`batch`}function xO(e,t,n){if(e===t)return n;let r=t.endsWith(`/`)?t:`${t}/`;return e.startsWith(r)?`${n.endsWith(`/`)?n:`${n}/`}${e.slice(r.length)}`:e}function SO(e,t){if(e===t)return!0;let n=t.endsWith(`/`)?t:`${t}/`;return e.startsWith(n)}function CO(e,t,n=!1){if(e==null)return null;switch(t.operation){case`add`:case`expand`:case`collapse`:case`mark-directory-unloaded`:case`begin-child-load`:case`apply-child-patch`:case`complete-child-load`:case`fail-child-load`:case`cleanup`:return e;case`remove`:return SO(e,t.path)?n?e:null:e;case`move`:return xO(e,t.from,t.to);case`batch`:{let r=e;for(let e of t.events)if(r=CO(r,e,n),r==null)return null;return r}}}function wO(e){return{canonicalChanged:e.canonicalChanged,projectionChanged:e.projectionChanged,visibleCountDelta:e.visibleCountDelta}}function TO(e){switch(e.operation){case`add`:return{...wO(e),operation:`add`,path:e.path};case`remove`:return{...wO(e),operation:`remove`,path:e.path,recursive:e.recursive};case`move`:return{...wO(e),from:e.from,operation:`move`,to:e.to}}}function EO(e){return{...wO(e),events:e.events.filter(e=>e.operation===`add`||e.operation===`remove`||e.operation===`move`).map(e=>TO(e)),operation:`batch`}}function DO(e){switch(e.operation){case`add`:case`remove`:case`move`:return TO(e);case`batch`:return EO(e);default:return null}}function OO(e,t){if(e.size!==t.length)return!1;for(let n of t)if(!e.has(n))return!1;return!0}function kO(e){let t=e.endsWith(`/`)?e.slice(0,-1):e;if(t.length===0)return[];let n=t.split(`/`);return n.slice(0,-1).map((e,t)=>`${n.slice(0,t+1).join(`/`)}/`)}function AO(e){return kO(e).at(-1)??null}function jO(e,t){return t==null?e:e.startsWith(t)?e.slice(t.length):e}function MO(e){return e.endsWith(`/`)}var NO=e=>e.toLowerCase();function PO(e){let t=e.endsWith(`/`)?e.slice(0,-1):e,n=t.lastIndexOf(`/`);return n<0?t:t.slice(n+1)}function FO(e){return e.endsWith(`/`)?e.slice(0,-1):e}function IO(e,t){return t&&!e.endsWith(`/`)?`${e}/`:e}var LO=e=>{let t=e.trim();return t.length===0?``:(t.includes(`\\`)?t.replaceAll(`\\`,`/`):t).toLowerCase()},RO=Symbol(`FILE_TREE_RENAME_VIEW`),zO=512,BO=512;function VO(e){return e===`top`||e===`center`?e:`nearest`}function HO(e,t,n){if(e===0)return-1;if(n!=null){let e=t(n);if(e!=null)return e;let r=kO(n);for(let e=r.length-1;e>=0;--e){let n=r[e];if(n==null)continue;let i=t(n);if(i!=null)return i}}return 0}function UO(e,t,n){if(e.paths.length===0)return{focusedIndex:-1,getParentIndex:e.getParentIndex,paths:e.paths,posInSetByIndex:e.posInSetByIndex,setSizeByIndex:e.setSizeByIndex};if(t==null)return{focusedIndex:0,getParentIndex:e.getParentIndex,paths:e.paths,posInSetByIndex:e.posInSetByIndex,setSizeByIndex:e.setSizeByIndex};let r=n??(t=>e.visibleIndexByPath.get(t)??null);return{focusedIndex:HO(e.paths.length,r,t),getParentIndex:e.getParentIndex,paths:e.paths,posInSetByIndex:e.posInSetByIndex,setSizeByIndex:e.setSizeByIndex}}var WO=class e{static{Object.defineProperty(e.prototype,RO,{configurable:!0,value(){return{cancel:()=>{this.#q()},commit:()=>{this.#J()},getPath:()=>this.#T,getValue:()=>this.#E,isActive:()=>this.#T!=null,setValue:e=>{this.#Y(e)}}},writable:!0})}#e;#t=new Set;#n=new Map;#r=null;#i=null;#a=new Map;#o=new Map;#s=-1;#c=null;#l=!1;#u=e=>-1;#d=new Map;#f=null;#p=null;#m=null;#h=null;#g=null;#_;#v;#y;#b=[];#x=new Int32Array;#S=new Int32Array;#C=void 0;#w=!1;#T=null;#E=``;#D=!1;#O=new Set;#k=[];#A;#j=null;#M=null;#N=null;#P=null;#F=null;#I=null;#L=null;#R=0;#z=null;#B=new Set;#V=0;#H;#U=0;#W=!1;#G=0;#K;constructor(e){let{dragAndDrop:t,fileTreeSearchMode:n,initialSearchQuery:r,initialSelectedPaths:i,renaming:a,onSearchChange:o,paths:s,preparedInput:c,...l}=e,u=yO({paths:s,preparedInput:c},`constructor`,l.sort);this.#e=l,t!=null&&t!==!1&&(this.#r=t===!0?{}:t),this.#w=a!=null&&a!==!1,a!=null&&a!==!1&&a!==!0&&(this.#C=a.canRename,this.#v=a.onError,this.#_=a.onRename),this.#y=o,this.#A=n??`hide-non-matches`,this.#H=this.#le(u.paths,u.preparedInput);let d=i?.map(e=>this.#Ne(e)).filter(e=>e!=null)??[],f=d.at(-1)??null;d.length>0&&(this.#B=new Set(d),this.#z=f,this.#V=1),this.#je(f,!1),r!=null&&this.#Te(r,!1),this.#K=this.#Re()}destroy(){this.#K?.(),this.#K=null,this.#n.clear(),this.#t.clear(),this.#d.clear(),this.#i=null,this.#he()}focusFirstItem(){this.#be().length>0&&this.#Fe(0)}focusLastItem(){this.#G<=0||(this.#Ie(),this.#Fe(this.#G-1))}focusNextItem(){this.#Ae(1)}focusParentItem(){if(this.#c==null)return;let e=AO(this.#c);if(e==null)return;let t=this.#Z(e);t>=0&&this.#Fe(t)}focusPath(e){let t=this.#H.getPathInfo(e)?.path??null;if(t==null)return;this.#Ie();let n=this.#Z(t);n>=0&&this.#Fe(n)}scrollToPath(e,t){let n=this.#H.getPathInfo(e)?.path??null;if(n==null)return;this.#Ie();let r=this.#xe(n);r<0||this.#Me(r)!=null&&(t?.focus!==!1&&this.#Fe(r,!1),this.#L={id:this.#R+=1,offset:VO(t?.offset),visibleIndex:r},this.#De())}focusMountedPathFromInput(e){let t=this.#H.getPathInfo(e)?.path??null;if(t==null)return;let n=this.#Z(t);n>=0&&this.#Fe(n)}focusNearestPath(e){let t=this.resolveNearestVisiblePath(e);if(t==null)return null;let n=this.#Z(t);return n>=0?(this.#Fe(n),this.#be()[n]??t):null}focusPreviousItem(){this.#Ae(-1)}getFocusedIndex(){return this.#s}getFocusedItem(){return this.#c==null?null:this.#Q(this.#c)}getFocusedPath(){return this.#c}getScrollRequest(){return this.#L}clearScrollRequest(e){this.#L?.id===e&&(this.#L=null)}resolveNearestVisiblePath(e){let t=this.#be();if(this.#G===0)return null;if(e==null)return this.#c??t[0]??null;let n=this.#H.getPathInfo(e)?.path??e,r=this.#Z(n);return r>=0?t[r]??n:this.#X(n)??this.#c??t[0]??null}getSelectedPaths(){return[...this.#B]}getSelectionVersion(){return this.#V}getVisibleCount(){return this.#G}getVisibleRows(e,t){if(t<e||this.#G===0)return[];let n=Math.max(0,e),r=Math.min(this.#G-1,t);if(r<n)return[];let i=r-n+1;if(this.#F==null&&!this.#l&&r>=this.#b.length&&i<=BO){let e=[];for(let t=n;t<=r;t+=1){let n=this.#H.getVisibleRowContext(t);if(n==null)break;e.push(this.#ee(n))}return e}if(!this.#l&&r>=this.#b.length&&this.#Ie(),this.#F!=null){let e=Array.from({length:r-n+1},(e,t)=>this.#Se(n+t)),t=new Map,i=e[0]??-1,a=i;for(let n=1;n<=e.length;n+=1){let r=e[n];if(r!=null&&r===a+1){a=r;continue}if(i>=0&&this.#H.getVisibleSlice(i,a).forEach((e,n)=>{t.set(i+n,e)}),r==null){i=-1,a=-1;continue}i=r,a=r}return Array.from({length:r-n+1},(e,r)=>{let i=n+r,a=this.#Se(i),o=t.get(a),s=this.#b[a];if(o==null||s==null)throw Error(`Missing projection row for filtered visible index ${String(i)}`);return this.#$(o,i,a,{ancestorPaths:this.#re(a),path:s})})}return this.#H.getVisibleSlice(n,r).map((e,t)=>{let r=n+t,i=this.#b[r];if(i==null)throw Error(`Missing projection path for visible index ${String(r)}`);return this.#$(e,r,r,{ancestorPaths:this.#re(r),path:i})})}getStickyRowCandidates(e,t){if(this.#F!=null)return null;if(this.#G===0||e<=0||t<=0)return[];let n=[];for(let r=0;r<this.#G;r+=1){let i=e+r*t,a=Math.min(this.#G-1,Math.floor(i/t)),o=this.#te(a,r)??(a>0?this.#te(a-1,r):void 0);if(o==null)break;n.push({row:this.#ee(o),subtreeEndIndex:o.subtreeEndIndex})}return n}getItem(e){let t=this.#H.getPathInfo(e);return t==null?null:this.#Q(t.path,t)}resolveMountedDirectoryPathFromInput(e){let t=this.#H.getPathInfo(e);return t?.kind===`directory`?t.path:null}toggleMountedDirectoryFromInput(e){let t=this.resolveMountedDirectoryPathFromInput(e);t!=null&&this.#ze(t)}selectAllVisiblePaths(){this.#Ie();let e=[...this.#be()];this.#ae(e,this.#c??this.#z)}selectOnlyPath(e){let t=this.#Ne(e);t!=null&&this.#ae([t],t)}selectOnlyMountedPathFromInput(e){this.#ae([e],e)}selectPath(e){let t=this.#Ne(e);t==null||this.#B.has(t)||this.#ae([...this.#B,t])}deselectPath(e){let t=this.#Ne(e);t!=null&&this.#B.has(t)&&this.#ae([...this.#B].filter(e=>e!==t))}toggleFocusedSelection(){this.#c!=null&&this.togglePathSelectionFromInput(this.#c)}togglePathSelection(e){let t=this.#Ne(e);if(t!=null){if(this.#B.has(t)){this.deselectPath(t);return}this.selectPath(t)}}togglePathSelectionFromInput(e){let t=this.#Ne(e);if(t!=null){if(this.#B.has(t)){this.#ae([...this.#B].filter(e=>e!==t),t);return}this.#ae([...this.#B,t],t)}}selectPathRange(e,t){let n=this.#Ne(e);if(n==null)return;this.#Ie();let r=this.#z,i=r==null?-1:this.#Ce(r),a=this.#Ce(n);if(i===-1||a===-1){let e=t?[...this.#B,n]:[n];this.#ae(e,n);return}let[o,s]=i<=a?[i,a]:[a,i],c=this.#be().slice(o,s+1),l=t?[...this.#B,...c]:c;this.#ae(l,r)}extendSelectionFromFocused(e){if(this.#c==null)return;let t=this.#s;if(t===-1)return;let n=Math.min(this.#G-1,Math.max(0,t+e));if(n===t)return;!this.#l&&n>=this.#b.length&&this.#Ie();let r=this.#be(),i=r[t]??null,a=r[n]??null;if(i==null||a==null)return;let o=new Set(this.#B);o.has(i)&&o.has(a)?o.delete(i):o.add(a),this.#ae([...o],this.#z??i,!1),this.#Fe(n)}getDragAndDropConfig(){return this.#r}isDragAndDropEnabled(){return this.#r!=null}getDragSession(){return this.#i==null?null:{draggedPaths:[...this.#i.draggedPaths],primaryPath:this.#i.primaryPath,target:this.#i.target==null?null:{...this.#i.target}}}startDrag(e){if(this.#r==null)return!1;let t=this.#Ne(e);if(t==null||this.#M!=null&&this.#M.length>0)return!1;let n=this.getSelectedPaths(),r=fO(t,n);return this.#r.canDrag?.(r)!==!1&&(n.includes(t)||this.#ae([t],t,!1),this.#Pe(t),this.#i={draggedPaths:r,primaryPath:t,target:null},this.#De(),!0)}setDragTarget(e){let t=this.#i;if(t==null)return;let n=e;if(n!=null){let e=mO(t.draggedPaths,n);(hO(t.draggedPaths,n)||this.#r?.canDrop?.(e)===!1)&&(n=null)}pO(t.target,n)||(this.#i={...t,target:n},this.#De())}cancelDrag(){this.#i!=null&&(this.#i=null,this.#De())}completeDrag(){let e=this.#i;if(e==null)return!1;this.#i=null;let t=e.target==null?null:{...e.target};if(t==null)return this.#De(),!1;let n=mO(e.draggedPaths,t);if(hO(e.draggedPaths,t)||this.#r?.canDrop?.(n)===!1)return this.#De(),!1;let r=_O(e.draggedPaths,t);if(r==null)return this.#De(),!1;try{if(r.operations.length===1){let e=r.operations[0];if(e==null||e.type!==`move`)throw Error(`Expected a single move operation for one-item drops`);this.#H.move(e.from,e.to,{collision:e.collision})}else this.#ce(r.operations),this.#H.batch(r.operations)}catch(e){return this.#De(),this.#r?.onDropError?.(e instanceof Error?e.message:String(e),n),!1}return this.#r?.onDropComplete?.(r.result),!0}subscribe(e){return this.#t.add(e),e(),()=>{this.#t.delete(e)}}add(e){this.#H.add(e)}remove(e,t={}){this.#H.remove(e,t)}move(e,t,n={}){this.#H.move(e,t,n)}batch(e){this.#H.batch(e)}onMutation(e,t){let n=e,r=t,i=this.#n.get(n);return i??(i=new Set,this.#n.set(n,i)),i.add(r),()=>{let e=this.#n.get(n);e?.delete(r),e?.size===0&&this.#n.delete(n)}}setSearch(e){this.#Te(e,!0)}openSearch(e=``){this.#Te(e,!0)}closeSearch(){this.#Te(null,!0)}isSearchOpen(){return this.#M!==null}getSearchValue(){return this.#M??``}getSearchMatchingPaths(){return this.#k}focusNextSearchMatch(){this.#we(1)}focusPreviousSearchMatch(){this.#we(-1)}startRenaming(e=this.#c??``,t={}){if(!this.#w)return!1;let n=this.#H.getPathInfo(e);if(n==null)return!1;let r=n.path,i=MO(r),a=FO(r);if(this.#C?.({isFolder:i,path:a})===!1)return!1;for(let e of kO(r))this.#H.isExpanded(e)||this.#H.expand(e);return this.#ae([r],r,!1),this.#M!=null&&(this.#Te(null,!1),this.#y?.(this.#M)),this.#Pe(r),this.#T=r,this.#E=PO(r),this.#D=t.removeIfCanceled??!1,this.#De(),!0}#q(){if(this.#T==null)return;let e=this.#T,t=this.#D;if(this.#T=null,this.#E=``,this.#D=!1,t){this.remove(e,MO(e)?{recursive:!0}:void 0);return}this.#Pe(e),this.#De()}#J(){let e=this.#T;if(e==null)return;if(this.#D&&this.#E.trim().length===0){this.#T=null,this.#E=``,this.#D=!1,this.remove(e,MO(e)?{recursive:!0}:void 0);return}let t=MO(e),n=cO({files:this.#H.list(),isFolder:t,nextBasename:this.#E,path:FO(e)});if(this.#T=null,this.#E=``,this.#D=!1,`error`in n){this.#Pe(e),this.#v?.(n.error),this.#De();return}if(n.sourcePath===n.destinationPath){this.#Pe(e),this.#De();return}this.#_?.({destinationPath:n.destinationPath,isFolder:n.isFolder,sourcePath:n.sourcePath}),this.move(IO(n.sourcePath,t),IO(n.destinationPath,t))}#Y(e){this.#T!=null&&this.#E!==e&&(this.#E=e,this.#De())}resetPaths(e,t={}){let n=!Array.isArray(e),r=n?void 0:e,i=n?e:t,a=this.#H.list().length,o=this.#G,s=yO({paths:r,preparedInput:i.preparedInput},`resetPaths`,this.#e.sort),c=this.#le(s.paths,s.preparedInput,i.initialExpandedPaths),l=this.#c,u=this.#T,d=this.getSelectedPaths(),f=this.#z;this.#K?.(),this.#H=c,this.#d.clear(),this.#he();let p=d.map(e=>c.getPathInfo(e)?.path??null).filter(e=>e!=null),m=!OO(this.#B,p);this.#B=new Set(p),m&&(this.#V+=1),this.#z=f==null?null:c.getPathInfo(f)?.path??null,this.#T=u==null?null:c.getPathInfo(u)?.path??null,this.#T??(this.#E=``,this.#D=!1),this.#je(l,l!=null||p.length>0||this.#z!=null),this.#K=this.#Re(),this.#De(),this.#Oe({canonicalChanged:!0,operation:`reset`,pathCountAfter:s.paths.length,pathCountBefore:a,projectionChanged:!0,usedPreparedInput:i.preparedInput!=null,visibleCountDelta:this.#G-o})}#X(e){this.#Ie();let t=AO(e),n=jO(e,t),r=null,i=null;for(let e of this.#be()){if(AO(e)!==t)continue;let a=jO(e,t);if(a<n){r=e;continue}if(a>n){i=e;break}}return r??i}#Z(e){let t=this.#Ce(e);if(t!==-1)return t;let n=kO(e);for(let e=n.length-1;e>=0;--e){let t=n[e];if(t==null)continue;let r=this.#Ce(t);if(r!==-1)return r}return this.#be().length>0?0:-1}#Q(e,t){let n=this.#d.get(e);if(n!=null)return n;let r=t??this.#H.getPathInfo(e);if(r==null)return null;let i=r.kind===`directory`?this.#oe(r.path):this.#se(r.path);return this.#d.set(r.path,i),i}#$(e,t,n,r){return{ancestorPaths:r.ancestorPaths,depth:e.depth,flattenedSegments:e.flattenedSegments?.map(e=>({isTerminal:e.isTerminal,name:e.name,path:e.path})),hasChildren:e.hasChildren,index:t,isExpanded:e.isExpanded,isFlattened:e.isFlattened,isFocused:r.path===this.#c,isSelected:this.#B.has(r.path),kind:e.kind,level:e.depth,name:e.name,path:r.path,posInSet:r.posInSet??this.#x[n]??0,setSize:r.setSize??this.#S[n]??0}}#ee(e){return this.#$(e.row,e.index,e.index,{ancestorPaths:e.ancestorPaths,path:e.row.path,posInSet:e.posInSet,setSize:e.setSize})}#te(e,t){let n=this.#H.getVisibleRowContext(e);return n==null?void 0:n.ancestorRows[t]??(t===n.ancestorRows.length&&n.row.kind===`directory`&&n.row.isExpanded?n:void 0)}#ne(e){let t=this.#a.get(e);if(t!=null)return t;let n=this.#u(e),r=n<0?[]:[...this.#ne(n),n];return this.#a.set(e,r),r}#re(e){let t=this.#o.get(e);if(t!=null)return t;let n=this.#ne(e).map(e=>this.#b[e]??``).filter(e=>e!==``);return this.#o.set(e,n),n}#ie(e){this.#H.collapse(e)}#ae(e,t=this.#z,n=!0){let r=[...new Set(e)],i=!OO(this.#B,r),a=this.#z!==t;(i||a)&&(this.#B=new Set(r),this.#z=t,i&&(this.#V+=1),n&&this.#De())}#oe(e){return{collapse:()=>{this.#ie(e)},deselect:()=>{this.deselectPath(e)},expand:()=>{this.#ke(e)},focus:()=>{this.focusPath(e)},getPath:()=>e,isDirectory:()=>!0,isExpanded:()=>this.#H.isExpanded(e),isFocused:()=>this.#c===e,isSelected:()=>this.#B.has(e),select:()=>{this.selectPath(e)},toggleSelect:()=>{this.togglePathSelection(e)},toggle:()=>{this.#ze(e)}}}#se(e){return{deselect:()=>{this.deselectPath(e)},focus:()=>{this.focusPath(e)},getPath:()=>e,isDirectory:()=>!1,isFocused:()=>this.#c===e,isSelected:()=>this.#B.has(e),select:()=>{this.selectPath(e)},toggleSelect:()=>{this.togglePathSelection(e)}}}#ce(e){let t=this.#H.list();this.#le(t).batch(e)}#le(e,t,n){return new UD({...this.#e,paths:e,preparedInput:t??void 0,...n===void 0?{}:{initialExpandedPaths:n}})}#ue(){return this.#h??=this.#H.list(),this.#h}#de(){if(this.#m!=null)return this.#m;let e=new Set;for(let t of this.#ue()){e.add(t);for(let n of kO(t))e.add(n)}return this.#m=[...e].sort(),this.#m}#fe(){return this.#g??=this.#ue().map(NO),this.#g}#pe(){return this.#f??=this.#de().filter(e=>e.endsWith(`/`)),this.#f}#me(){return this.#p??=this.#pe().map(NO),this.#p}#he(){this.#f=null,this.#p=null,this.#m=null,this.#h=null,this.#g=null}#ge(){return this.#pe().filter(e=>this.#H.isExpanded(e))}#_e(e){let t=new Set(this.#j??[]);if(e)for(let e of this.#B)for(let n of kO(e))t.add(n);this.#ve(t)}#ve(e){this.#W=!0;try{for(let t of this.#pe()){let n=e.has(t),r=this.#H.isExpanded(t);n&&!r?this.#H.expand(t):!n&&r&&this.#H.collapse(t)}}finally{this.#W=!1}}#ye(){if(this.#M==null||this.#M.length===0){this.#k=[],this.#F=null,this.#I=null,this.#P=null,this.#G=this.#U;return}let e=this.#b;if(this.#k=e.filter(e=>this.#O.has(e)),this.#A!==`hide-non-matches`||this.#O.size===0){this.#F=null,this.#I=null,this.#P=null,this.#G=this.#U;return}let t=[],n=[],r=new Map;for(let[i,a]of e.entries())this.#N?.has(a)===!0&&(r.set(a,n.length),t.push(i),n.push(a));this.#F=t,this.#I=n,this.#P=r,this.#G=n.length}#be(){return this.#I??this.#b}#xe(e){return this.#I==null?this.#H.getVisibleIndex(e)??-1:this.#P?.get(e)??-1}#Se(e){return this.#F?.[e]??e}#Ce(e){return this.#P?.get(e)??this.#H.getVisibleIndex(e)??-1}#we(e){let t=this.#k;if(t.length===0)return;let n=this.#c,r=n==null?-1:t.indexOf(n),i=t[r<0?e>0?0:t.length-1:Math.min(t.length-1,Math.max(0,r+e))];i!=null&&this.focusPath(i)}#Te(e,t){let n=e==null?null:LO(e),r=this.#M;if(r!==n){if(r==null&&n!=null&&(this.#j=this.#ge()),this.#M=n,n==null)this.#_e(!0),this.#j=null,this.#O.clear(),this.#N=null,this.#je(this.#c,!0);else if(n.length===0)this.#_e(!1),this.#O.clear(),this.#N=null,this.#je(this.#c,!0);else{let e=this.#Ee();this.#je(e,!0)}t&&(this.#y?.(this.#M),this.#De())}}#Ee(){if(this.#M==null||this.#M.length===0)return this.#O.clear(),this.#c;let e=this.#M,t=this.#ue(),n=this.#fe(),r=[],i=new Set,a=null;for(let o=0;o<t.length;o+=1){if(!n[o].includes(e))continue;let s=t[o];r.push(s),i.add(s),a??=s}let o=this.#pe(),s=this.#me();for(let t=0;t<o.length;t+=1){if(!s[t].includes(e))continue;let n=o[t];i.has(n)||(r.push(n),i.add(n),a??=n)}this.#O=i;let c=this.#A===`hide-non-matches`&&r.length>0?new Set:null;this.#N=c;let l=this.#A===`expand-matches`?new Set(this.#j??[]):new Set;for(let e of r){c?.add(e),e.endsWith(`/`)&&l.add(e);for(let t of kO(e))l.add(t),c?.add(t)}return this.#ve(l),a??this.#c}#De(){for(let e of this.#t)e()}#Oe(e){this.#n.get(e.operation)?.forEach(t=>{t(e)}),this.#n.get(`*`)?.forEach(t=>{t(e)})}#ke(e){for(let t of kO(e))this.#H.isExpanded(t)||this.#H.expand(t);this.#H.isExpanded(e)||this.#H.expand(e)}#Ae(e){let t=this.#G;if(t===0)return;let n=this.#s===-1?0:this.#s,r=Math.min(t-1,Math.max(0,n+e));(r!==n||this.#s===-1)&&(!this.#l&&this.#F==null&&r>=this.#b.length&&this.#Ie(),this.#Fe(r))}#je(e,t=!0){let n=this.#H.getVisibleCount();this.#U=n;let r=UO(this.#H.getVisibleTreeProjectionData(t?void 0:Math.min(n,zO)),e,t?e=>this.#H.getVisibleIndex(e):void 0);this.#a.clear(),this.#o.clear(),this.#l=r.paths.length>=n,this.#u=r.getParentIndex,this.#b=r.paths,this.#x=r.posInSetByIndex,this.#S=r.setSizeByIndex,this.#ye(),this.#s=e==null?this.#be().length>0?0:-1:this.#Z(e),this.#c=this.#s<0?null:this.#Me(this.#s)}#Me(e){return this.#be()[e]??(this.#F==null?this.#H.getVisibleRowContext(e)?.row.path??null:null)}#Ne(e){return this.#H.getPathInfo(e)?.path??null}#Pe(e){if(e==null)return;let t=this.#Z(e);t>=0&&this.#Fe(t,!1)}#Fe(e,t=!0){let n=this.#Me(e);n!=null&&(this.#s!==e||this.#c!==n)&&(this.#s=e,this.#c=n,t&&this.#De())}#Ie(){this.#l||this.#je(this.#c,!0)}#Le(e){let t=CO(this.#T,e);t==null&&this.#T!=null&&(this.#E=``),this.#T=t;let n=CO(this.#c,e,!0),r=[...this.#B].map(t=>CO(t,e)).filter(e=>e!=null).map(e=>this.#H.getPathInfo(e)?.path??null).filter(e=>e!=null),i=CO(this.#z,e),a=i==null?null:this.#H.getPathInfo(i)?.path??null,o=[...new Set(r)];return OO(this.#B,o)||(this.#B=new Set(o),this.#V+=1),this.#z=a,n}#Re(){return this.#H.on(`*`,e=>{if(this.#W)return;e.canonicalChanged&&(this.#d.clear(),this.#he()),this.#i!=null&&bO(e)&&(this.#i=null);let t=bO(e)?this.#Le(e):this.#c,n=this.#M!=null&&this.#M.length>0?this.#Ee():this.#M===``?this.#c:t,r=this.#M!=null||e.operation!==`expand`&&e.operation!==`collapse`;this.#je(n,r),this.#De();let i=DO(e);i!=null&&this.#Oe(i)})}#ze(e){if(this.#H.isExpanded(e)){this.#ie(e);return}this.#ke(e)}},GO=e=>{if(e==null||e.length===0)return`0`;let t=`${e.length}`;for(let n of e)t+=`\0${n.path}\0${n.status}`;return t};function KO(e){let t=e.endsWith(`/`),n=``,r=-1;for(let t=0;t<=e.length;t+=1){if(e[t]!==`/`&&t!==e.length){r===-1&&(r=t);continue}r!==-1&&(n!==``&&(n+=`/`),n+=e.slice(r,t),r=-1)}return n===``?null:{isDirectory:t,path:n}}function qO(e){let t=e.endsWith(`/`)?e.slice(0,-1):e;if(t.length===0)return[];let n=[],r=0;for(;;){let e=t.indexOf(`/`,r);if(e===-1)break;n.push(t.slice(0,e+1)),r=e+1}return n}function JO(e,t){return t?`${e}/`:e}function YO(e,t=null){let n=GO(e==null?void 0:[...e]);if(n===`0`)return null;if(t?.signature===n)return t;let r=new Map,i=new Set,a=new Set,o=new Map;for(let t of e??[]){let e=ZO(t);e!=null&&ek({canonicalPath:e.canonicalPath,changeCountByDirectoryPath:o,directoriesWithChanges:i,ignoredDirectoryPaths:a,isDirectory:e.isDirectory,status:t.status,statusByPath:r})}return r.size===0?null:{changeCountByDirectoryPath:o,directoriesWithChanges:i,ignoredDirectoryPaths:a,signature:n,statusByPath:r}}function XO(e,t){let n=t?.remove??[],r=t?.set??[];if(n.length===0&&r.length===0)return e;let i=new Map(e?.statusByPath),a=new Set(e?.directoriesWithChanges),o=new Set(e?.ignoredDirectoryPaths),s=new Map(e?.changeCountByDirectoryPath),c=!1;for(let e of n){let t=QO(e);t!=null&&(c=$O({canonicalPath:t.canonicalPath,changeCountByDirectoryPath:s,directoriesWithChanges:a,ignoredDirectoryPaths:o,statusByPath:i})||c)}for(let e of r){let t=ZO(e);t!=null&&(c=ek({canonicalPath:t.canonicalPath,changeCountByDirectoryPath:s,directoriesWithChanges:a,ignoredDirectoryPaths:o,isDirectory:t.isDirectory,status:e.status,statusByPath:i})||c)}return c?i.size===0?null:{changeCountByDirectoryPath:s,directoriesWithChanges:a,ignoredDirectoryPaths:o,signature:rk(i),statusByPath:i}:e}function ZO(e){return QO(e.path)}function QO(e){let t=KO(e);if(t!=null)return{canonicalPath:JO(t.path,t.isDirectory),isDirectory:t.isDirectory}}function $O({canonicalPath:e,changeCountByDirectoryPath:t,directoriesWithChanges:n,ignoredDirectoryPaths:r,statusByPath:i}){let a=i.get(e);return a!=null&&(i.delete(e),a===`ignored`&&e.endsWith(`/`)&&r.delete(e),nk(t,n,e),!0)}function ek({canonicalPath:e,changeCountByDirectoryPath:t,directoriesWithChanges:n,ignoredDirectoryPaths:r,isDirectory:i,status:a,statusByPath:o}){let s=o.get(e);return s!==a&&(s??tk(t,n,e),o.set(e,a),a===`ignored`&&i?r.add(e):i&&r.delete(e),!0)}function tk(e,t,n){for(let r of qO(n))e.set(r,(e.get(r)??0)+1),t.add(r)}function nk(e,t,n){for(let r of qO(n)){let n=(e.get(r)??0)-1;n>0?e.set(r,n):(e.delete(r),t.delete(r))}}function rk(e){let t=`${e.size}`;for(let[n,r]of e)t+=`\0${n}\0${r}`;return t}var Z,ik,ak,ok,sk,ck,lk,uk,dk,fk,pk={},mk=[],hk=Array.isArray,gk=mk.slice,_k=Object.assign;function vk(e){e&&e.parentNode&&e.remove()}function yk(e,t,n){var r,i,a,o={};for(a in t)a==`key`?r=t[a]:a==`ref`&&typeof e!=`function`?i=t[a]:o[a]=t[a];return arguments.length>2&&(o.children=arguments.length>3?gk.call(arguments,2):n),bk(e,o,r,i,null)}function bk(e,t,n,r,i){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++ik,__i:-1,__u:0};return i==null&&Z.vnode!=null&&Z.vnode(a),a}function xk(e){return e.children}function Sk(e,t){this.props=e,this.context=t,this.__g=0}function Ck(e,t){if(t==null)return e.__?Ck(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type==`function`?Ck(e):null}function wk(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=n.__e;break}return wk(e)}}function Tk(e){(8&e.__g||!(e.__g|=8)||!ak.push(e)||sk++)&&ok==Z.debounceRendering||((ok=Z.debounceRendering)||queueMicrotask)(Ek)}function Ek(){for(var e,t,n,r,i,a,o,s,c=1;ak.length;)ak.length>c&&ak.sort(ck),e=ak.shift(),c=ak.length,8&e.__g&&(n=void 0,i=(r=(t=e).__v).__e,a=[],o=[],(s=t.__P)&&((n=_k({},r)).__v=r.__v+1,Z.vnode&&Z.vnode(n),Pk(s,n,r,t.__n,s.namespaceURI,32&r.__u?[i]:null,a,i??Ck(r),!!(32&r.__u),o,s.ownerDocument),n.__v=r.__v,n.__.__k[n.__i]=n,Ik(a,n,o),n.__e!=i&&wk(n)));sk=0}function Dk(e,t,n,r,i,a,o,s,c,l,u,d){var f,p,m,h,g,_,v,y=r&&r.__k||mk,b=t.length;for(c=Ok(n,t,y,c,b),f=0;f<b;f++)(m=n.__k[f])!=null&&(p=m.__i==-1?pk:y[m.__i]||pk,m.__i=f,_=Pk(e,m,p,i,a,o,s,c,l,u,d),h=m.__e,m.ref&&p.ref!=m.ref&&(p.ref&&zk(p.ref,null,m),u.push(m.ref,m.__c||h,m)),g==null&&h!=null&&(g=h),(v=!!(4&m.__u))||p.__k===m.__k?c=kk(m,c,e,v):typeof m.type==`function`&&_!==void 0?c=_:h&&(c=h.nextSibling),m.__u&=-7);return n.__e=g,c}function Ok(e,t,n,r,i){var a,o,s,c,l,u=n.length,d=u,f=0;for(e.__k=Array(i),a=0;a<i;a++)(o=t[a])!=null&&typeof o!=`boolean`&&typeof o!=`function`?(c=a+f,(o=e.__k[a]=typeof o==`string`||typeof o==`number`||typeof o==`bigint`||o.constructor==String?bk(null,o,null,null,null):hk(o)?bk(xk,{children:o},null,null,null):o.constructor==null&&o.__b>0?bk(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o).__=e,o.__b=e.__b+1,s=null,(l=o.__i=Ak(o,n,c,d))!=-1&&(d--,(s=n[l])&&(s.__u|=2)),s==null||s.__v==null?(l==-1&&(i>u?f--:i<u&&f++),typeof o.type!=`function`&&(o.__u|=4)):l!=c&&(l==c-1?f--:l==c+1?f++:(l>c?f--:f++,o.__u|=4))):e.__k[a]=null;if(d)for(a=0;a<u;a++)(s=n[a])!=null&&!(2&s.__u)&&(s.__e==r&&(r=Ck(s)),Bk(s,s));return r}function kk(e,t,n,r){var i,a;if(typeof e.type==`function`){for(i=e.__k,a=0;i&&a<i.length;a++)i[a]&&(i[a].__=e,t=kk(i[a],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=Ck(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do t&&=t.nextSibling;while(t!=null&&t.nodeType==8);return t}function Ak(e,t,n,r){var i,a,o,s=e.key,c=e.type,l=t[n],u=l!=null&&!(2&l.__u);if(l===null&&e.key==null||u&&s==l.key&&c==l.type)return n;if(r>+!!u){for(i=n-1,a=n+1;i>=0||a<t.length;)if((l=t[o=i>=0?i--:a++])!=null&&!(2&l.__u)&&s==l.key&&c==l.type)return o}return-1}function jk(e,t,n){t[0]==`-`?e.setProperty(t,n??``):e[t]=n??``}function Mk(e,t,n,r,i){var a;n:if(t==`style`){if(typeof n==`string`)e.style.cssText=n;else{if(typeof r==`string`&&(e.style.cssText=r=``),r)for(t in r)n&&t in n||jk(e.style,t,``);if(n)for(t in n)r&&n[t]==r[t]||jk(e.style,t,n[t])}}else if(t[0]==`o`&&t[1]==`n`)a=t!=(t=t.replace(lk,`$1`)),(t=t.slice(2))[0].toLowerCase()!=t[0]&&(t=t.toLowerCase()),e.__l||={},e.__l[t+a]=n,n?r?n.l=r.l:(n.l=uk,e.addEventListener(t,a?fk:dk,a)):e.removeEventListener(t,a?fk:dk,a);else{if(i==`http://www.w3.org/2000/svg`)t=t.replace(/xlink(H|:h)/,`h`).replace(/sName$/,`s`);else if(t!=`width`&&t!=`height`&&t!=`href`&&t!=`list`&&t!=`form`&&t!=`tabIndex`&&t!=`download`&&t!=`rowSpan`&&t!=`colSpan`&&t!=`role`&&t!=`popover`&&t in e)try{e[t]=n??``;break n}catch{}typeof n==`function`||(n==null||!1===n&&t[4]!=`-`?e.removeAttribute(t):e.setAttribute(t,t==`popover`&&n==1?``:n))}}function Nk(e){return function(t){if(this.__l){var n=this.__l[t.type+e];if(t.u==null)t.u=uk++;else if(t.u<n.l)return;return n(Z.event?Z.event(t):t)}}}function Pk(e,t,n,r,i,a,o,s,c,l,u){var d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k,A,ee,j=t.type;if(t.constructor!=null)return null;128&n.__u&&(c=!!(32&n.__u),n.__c.__z&&(s=t.__e=n.__e=(a=n.__c.__z)[0],n.__c.__z=null)),(d=Z.__b)&&d(t);n:if(typeof j==`function`)try{if(v=t.props,y=`prototype`in j&&j.prototype.render,b=(d=j.contextType)&&r[d.__c],x=d?b?b.props.value:d.__:r,n.__c?2&(f=t.__c=n.__c).__g&&(f.__g|=1,_=!0):(y?t.__c=f=new j(v,x):(t.__c=f=new Sk(v,x),f.constructor=j,f.render=Vk),b&&b.sub(f),f.props=v,f.state||(f.state={}),f.context=x,f.__n=r,p=!0,f.__g|=8,f.__h=[],f._sb=[]),y&&f.__s==null&&(f.__s=f.state),y&&j.getDerivedStateFromProps!=null&&(f.__s==f.state&&(f.__s=_k({},f.__s)),_k(f.__s,j.getDerivedStateFromProps(v,f.__s))),m=f.props,h=f.state,f.__v=t,p)y&&j.getDerivedStateFromProps==null&&f.componentWillMount!=null&&f.componentWillMount(),y&&f.componentDidMount!=null&&f.__h.push(f.componentDidMount);else{if(y&&j.getDerivedStateFromProps==null&&v!==m&&f.componentWillReceiveProps!=null&&f.componentWillReceiveProps(v,x),!(4&f.__g)&&f.shouldComponentUpdate!=null&&!1===f.shouldComponentUpdate(v,f.__s,x)||t.__v==n.__v){for(t.__v!=n.__v&&(f.props=v,f.state=f.__s,f.__g&=-9),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(e){e&&(e.__=t)}),S=0;S<f._sb.length;S++)f.__h.push(f._sb[S]);f._sb=[],f.__h.length&&o.push(f);break n}f.componentWillUpdate!=null&&f.componentWillUpdate(v,f.__s,x),y&&f.componentDidUpdate!=null&&f.__h.push(function(){f.componentDidUpdate(m,h,g)})}if(f.context=x,f.props=v,f.__P=e,f.__g&=-5,C=Z.__r,w=0,y){for(f.state=f.__s,f.__g&=-9,C&&C(t),d=f.render(f.props,f.state,f.context),T=0;T<f._sb.length;T++)f.__h.push(f._sb[T]);f._sb=[]}else do f.__g&=-9,C&&C(t),d=f.render(f.props,f.state,f.context),f.state=f.__s;while(8&f.__g&&++w<25);f.state=f.__s,f.getChildContext!=null&&(r=_k({},r,f.getChildContext())),y&&!p&&f.getSnapshotBeforeUpdate!=null&&(g=f.getSnapshotBeforeUpdate(m,h)),E=d,d!=null&&d.type===xk&&d.key==null&&(E=Lk(d.props.children)),s=Dk(e,hk(E)?E:[E],t,n,r,i,a,o,s,c,l,u),t.__u&=-161,f.__h.length&&o.push(f),_&&(f.__g&=-4)}catch(e){if(t.__v=null,c||a!=null){if(e.then){for(D=0,O=!1,t.__u|=c?160:128,t.__c.__z=[],k=0;k<a.length;k++)(A=a[k])==null||O||(A.nodeType==8&&A.data==`$s`?(D>0&&t.__c.__z.push(A),D++,a[k]=null):A.nodeType==8&&A.data==`/$s`?(--D>0&&t.__c.__z.push(A),O=D===0,s=a[k],a[k]=null):D>0&&(t.__c.__z.push(A),a[k]=null));if(!O){for(;s&&s.nodeType==8&&s.nextSibling;)s=s.nextSibling;a[a.indexOf(s)]=null,t.__c.__z=[s]}t.__e=s}else{for(ee=a.length;ee--;)vk(a[ee]);Fk(t)}}else t.__e=n.__e,t.__k=n.__k,e.then||Fk(t);Z.__e(e,t,n)}else s=t.__e=Rk(n.__e,t,n,r,i,a,o,c,l,u);return(d=Z.diffed)&&d(t),128&t.__u?void 0:s}function Fk(e){e&&e.__c&&(e.__c.__g|=4),e&&e.__k&&e.__k.forEach(Fk)}function Ik(e,t,n){for(var r=0;r<n.length;r++)zk(n[r],n[++r],n[++r]);Z.__c&&Z.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){Z.__e(e,t.__v)}})}function Lk(e){return typeof e!=`object`||!e||e.__b&&e.__b>0?e:hk(e)?e.map(Lk):_k({},e)}function Rk(e,t,n,r,i,a,o,s,c,l){var u,d,f,p,m,h,g,_,v=n.props,y=t.props,b=t.type;if(b==`svg`?i=`http://www.w3.org/2000/svg`:b==`math`?i=`http://www.w3.org/1998/Math/MathML`:i||=`http://www.w3.org/1999/xhtml`,a!=null){for(u=0;u<a.length;u++)if((m=a[u])&&`setAttribute`in m==!!b&&(b?m.localName==b:m.nodeType==3)){e=m,a[u]=null;break}}if(e==null){if(b==null)return l.createTextNode(y);e=l.createElementNS(i,b,y.is&&y),s&&=(Z.__m&&Z.__m(t,a),!1),a=null}if(b==null)v===y||s&&e.data==y||(e.data=y);else{if(a&&=gk.call(e.childNodes),v=n.props||pk,!s&&a!=null)for(v={},u=0;u<e.attributes.length;u++)v[(m=e.attributes[u]).name]=m.value;for(u in v)if(m=v[u],u!=`children`){if(u==`dangerouslySetInnerHTML`)f=m;else if(!(u in y)){if(u==`value`&&`defaultValue`in y||u==`checked`&&`defaultChecked`in y)continue;Mk(e,u,null,m,i)}}for(u in _=1&n.__u,y)m=y[u],u==`children`?p=m:u==`dangerouslySetInnerHTML`?d=m:u==`value`?h=m:u==`checked`?g=m:s&&typeof m!=`function`||v[u]===m&&!_||Mk(e,u,m,v[u],i);if(d)s||f&&(d.__html==f.__html||d.__html==e.innerHTML)||(e.innerHTML=d.__html),t.__k=[];else if(f&&(e.innerHTML=``),Dk(b==`template`?e.content:e,hk(p)?p:[p],t,n,r,b==`foreignObject`?`http://www.w3.org/1999/xhtml`:i,a,o,a?a[0]:n.__k&&Ck(n,0),s,c,l),a!=null)for(u=a.length;u--;)vk(a[u]);s||(u=`value`,b==`progress`&&h==null?e.removeAttribute(`value`):h==null||h===e[u]&&(b!==`progress`||h)||Mk(e,u,h,v[u],i),u=`checked`,g!=null&&g!=e[u]&&Mk(e,u,g,v[u],i))}return e}function zk(e,t,n){try{if(typeof e==`function`){var r=typeof e.__u==`function`;r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(e){Z.__e(e,n)}}function Bk(e,t,n){var r,i;if(Z.unmount&&Z.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||zk(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){Z.__e(e,t)}r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&Bk(r[i],t,n||typeof e.type!=`function`);n||vk(e.__e),e.__e&&e.__e.__l&&(e.__e.__l=null),e.__e=e.__c=e.__=null}function Vk(e,t,n){return this.constructor(e,n)}function Hk(e,t){var n,r,i,a;t==document&&(t=document.documentElement),Z.__&&Z.__(e,t),r=(n=!!(e&&32&e.__u))?null:t.__k,e=t.__k=yk(xk,null,[e]),i=[],a=[],Pk(t,e,r||pk,pk,t.namespaceURI,r?null:t.firstChild?gk.call(t.childNodes):null,i,r?r.__e:t.firstChild,n,a,t.ownerDocument),Ik(i,e,a)}function Uk(e,t){e.__u|=32,Hk(e,t)}Z={__e:function(e,t,n,r){for(var i,a,o;t=t.__;)if((i=t.__c)&&!(1&i.__g)){i.__g|=4;try{if((a=i.constructor)&&a.getDerivedStateFromError!=null&&(i.setState(a.getDerivedStateFromError(e)),o=8&i.__g),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),o=8&i.__g),o)return void(i.__g|=2)}catch(t){e=t}}throw sk=0,e}},ik=0,Sk.prototype.setState=function(e,t){var n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=_k({},this.state);typeof e==`function`&&(e=e(_k({},n),this.props)),e&&_k(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),Tk(this))},Sk.prototype.forceUpdate=function(e){this.__v&&(this.__g|=4,e&&this.__h.push(e),Tk(this))},Sk.prototype.render=xk,ak=[],sk=0,ck=function(e,t){return e.__v.__b-t.__v.__b},lk=/(PointerCapture)$|Capture$/i,uk=0,dk=Nk(!1),fk=Nk(!0);var Wk=0;Array.isArray;function Q(e,t,n,r,i,a){t||={};var o,s,c=t;if(`ref`in c&&typeof e!=`function`)for(s in c={},t)s==`ref`?o=t[s]:c[s]=t[s];var l={type:e,props:c,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Wk,__i:-1,__u:0,__source:i,__self:a};return Z.vnode&&Z.vnode(l),l}var Gk=16,Kk=16,qk={};function Jk({name:e,remappedFrom:t,token:n,width:r,height:i,viewBox:a,label:o,alignCapitals:s=!1}){"use no memo";let c=`#${e.replace(/^#/,``)}`,{width:l,height:u,viewBox:d}=qk[e]??{width:Gk,height:Kk},f=r??l,p=i??u,m=a??d??`0 0 ${l} ${u}`;return Q(`svg`,{"data-icon-name":t??e,"data-icon-token":n,"data-align-capitals":s,...o==null?{"aria-hidden":!0}:{"aria-label":o,role:`img`},viewBox:m,width:f,height:p,children:Q(`use`,{href:c})})}var Yk=e=>e!==void 0&&/\s/.test(e),Xk=(e,t)=>{let n=t=>Yk(e[t-1])||Yk(e[t]);if(!n(t))return t;for(let r=1;r<e.length;r++){let i=t-r;if(i>0&&!n(i))return i;let a=t+r;if(a<e.length&&!n(a))return a}return t},Zk=e=>Xk(e,Math.ceil(e.length/2)),Qk=e=>{if(e.length<2)return[e,``];let t=Zk(e);return[e.slice(0,t),e.slice(t)]},$k=e=>{if(e.length<4)return[e,``];let t=e.lastIndexOf(`.`)+1,n=e.length-t>10,r=t>=1&&!n?t:Zk(e);return[e.slice(0,r),e.slice(r)]},eA=e=>{if(e.length<4)return[e,``];let t=e.lastIndexOf(`/`)+1,n=e.length-t>25,r=t>=1&&!n?t:Math.ceil(e.length/2);return[e.slice(0,r),e.slice(r)]},tA=(e,{splitIndex:t}={})=>{if(typeof t!=`number`){let t=Math.ceil(e.length/2);return[e.slice(0,t),e.slice(t)]}return[e.slice(0,t),e.slice(t)]},nA=(e,{splitOffset:t}={})=>{if(typeof t!=`number`||t<=0||t>=e.length){let t=Math.ceil(e.length/2);return[e.slice(0,t),e.slice(t)]}let n=e.length-t;return[e.slice(0,n),e.slice(n)]},rA=(e,{splitOffset:t}={})=>{if(typeof t!=`number`||t<=0||t>=e.length){let t=Math.ceil(e.length/2);return[e.slice(0,t),e.slice(t)]}let n=t;return[e.slice(0,n),e.slice(n)]};function iA({children:e,marker:t,variant:n=`default`}){"use no memo";return Q(`div`,{"aria-hidden":!0,"data-truncate-marker-cell":!0,children:Q(`div`,{"data-truncate-marker":!0,children:typeof t==`function`?t({children:e}):n===`fade`?Q(`span`,{"data-truncate-fade":!0}):t})})}function aA(e){"use no memo";let{mode:t,children:n}=e;return Q(`div`,{children:[Q(`div`,{"data-truncate-content":`visible`,children:t===`fruncate`?Q(`span`,{children:n}):n}),Q(`div`,{"data-truncate-content":`overflow`,"aria-hidden":!0,children:t===`fruncate`?Q(`span`,{children:n}):n})]})}function oA({children:e,mode:t=`truncate`,marker:n=`…`,variant:r=`default`,...i}){"use no memo";let a=Q(aA,{mode:t,children:e},`content`),o=Q(iA,{marker:n,mode:t,variant:r},`marker`),s=Q(`div`,{"data-truncate-fill":!0},`fill`);return Q(`div`,{"data-truncate-container":t,"data-truncate-variant":r,...i,children:Q(`div`,{"data-truncate-grid":!0,children:t===`truncate`?[a,o]:[o,a,s]})})}function sA({children:e,...t}){"use no memo";return Q(oA,{mode:`truncate`,...t,children:e})}function cA({children:e,...t}){"use no memo";return Q(oA,{mode:`fruncate`,...t,children:e})}function lA({children:e,contents:t,priority:n=`end`,split:r=`center`,minimumLength:i=12,className:a,style:o,...s}){"use no memo";let c=null,l=null;if(Array.isArray(t)){if(t.length!==2)return console.error(`MiddleTruncate: contents must be an array of two items`),null;c=Q(sA,{...s,children:t[0]}),l=Q(cA,{...s,children:t[1]})}else{if(typeof e!=`string`)return console.error(`MiddleTruncate: children must be a string`),null;if(e.length===0)return Q(`div`,{className:a,style:o});if(e.length<i)return Q(n===`end`?cA:sA,{...s,className:a,style:o,children:e});let t=null,u=null,d=null;if(typeof r==`string`)r===`center`?t=Qk:r===`extension`?t=$k:r===`leaf-path`&&(t=eA);else if(typeof r==`number`)t=tA,u=r;else if(Array.isArray(r)){let[e,n]=r;d=n,e===`last`?t=nA:e===`first`&&(t=rA)}else typeof r==`function`&&(t=r);t??=Qk;let[f,p]=t(e,{priority:n,variant:s.variant,splitIndex:typeof u==`number`?u:void 0,splitOffset:typeof d==`number`?d:void 0}),m=f.length>=p.length,h=n===`equal`&&!m,g=n===`equal`&&m,_={},v={};h&&(_.marker=``),g&&(v.marker=``),c=Q(sA,{...s,..._,children:f}),l=Q(cA,{...s,...v,children:p})}return Q(`div`,{"data-truncate-group-container":`middle`,className:a,style:o,children:[Q(`div`,{"data-truncate-segment-priority":n===`start`||n===`equal`?`1`:`2`,children:c}),Q(`div`,{"data-truncate-segment-priority":n===`end`||n===`equal`?`1`:`2`,children:l})]})}var uA={endIndex:-1,startIndex:-1};function dA(e,t,n){return Math.min(Math.max(e,t),n)}function fA(e,t){return e<0||t<e?uA:{endIndex:t,startIndex:e}}function pA(e){return e.startIndex<0||e.endIndex<e.startIndex}function mA(e,t){return pA(e)?0:(e.endIndex-e.startIndex+1)*t}function hA(e,t,n){if(t<=0)return-1;let r=t*n;return e<=0?0:e>=r?t:Math.floor(e/n)}function gA(e,t,n){return t<=0||e<=0?-1:e>=t*n?t-1:Math.ceil(e/n)-1}function _A(e){let t=new Map;return e.forEach((e,n)=>{if(e.kind!==`directory`||!e.isExpanded)return;let r=e.ancestorPaths.length,i=t.get(r);if(i==null){t.set(r,[n]);return}i.push(n)}),t}function vA(e,t){let n=0,r=e.length-1,i=-1;for(;n<=r;){let a=Math.floor((n+r)/2),o=e[a];if(o==null)break;if(o<=t){i=a,n=a+1;continue}r=a-1}return i}function yA(e){let t=new Map,n=[];for(let r=0;r<e.length;r+=1){let i=e[r];if(i==null)continue;let a=i.kind===`directory`&&i.isExpanded?[...i.ancestorPaths,i.path]:i.ancestorPaths,o=0;for(;o<n.length&&o<a.length&&n[o]===a[o];)o+=1;for(let e=n.length-1;e>=o;--e){let i=n[e];i!=null&&t.set(i,r-1)}n.length=o;for(let e=o;e<a.length;e+=1){let t=a[e];t!=null&&n.push(t)}}let r=e.length-1;for(let e of n)t.set(e,r);return t}function bA(e,t,n){if(e.length===0||t<=0)return[];let r=yA(e),i=_A(e),a=[];for(let r=0;r<e.length;r+=1){let o=i.get(r);if(o==null||o.length===0)break;let s=t+r*n,c=vA(o,Math.min(e.length-1,Math.floor(s/n))),l=null;for(;c>=0;){let t=o[c],n=t==null?null:e[t]??null;if(n!=null&&(r===0||n.ancestorPaths[r-1]===a[r-1]?.path)){l=n;break}--c}if(l==null)break;a.push(l)}return a.map((i,a)=>{let o=a*n,s=(r.get(i.path)??e.length-1)+1;if(s>=e.length)return{row:i,top:o};let c=s*n-t;return{row:i,top:Math.min(o,c-n)}}).filter(e=>e.top+n>0)}function xA(e,t){let n=t.totalRowCount??e.length,r=n*t.itemHeight,i=Math.max(0,t.viewportHeight),a=Math.max(0,Math.floor(t.overscan)),o=Math.max(0,r-i),s=dA(t.scrollTop,0,o),c=t.stickyRows??bA(e,s,t.itemHeight),l=c.reduce((e,n)=>Math.max(e,n.top+t.itemHeight),0),u=Math.min(r,s+l),d=Math.max(0,i-l),f=Math.max(0,r-u),p=hA(s,n,t.itemHeight),m=hA(u,n,t.itemHeight),h=l<=0||p<0||p>=n?-1:p,g=h===-1?-1:Math.min(n-1,m-1),_=h===-1||g<h?0:g-h+1,v=d<=0||m>=n?uA:fA(m,gA(u+d,n,t.itemHeight)),y=g+1,b=pA(v)?uA:fA(Math.max(y,v.startIndex-a),Math.min(n-1,v.endIndex+a)),x=mA(b,t.itemHeight);return{occlusion:{firstOccludedIndex:h,lastOccludedIndex:g,occludedCount:_},physical:{itemHeight:t.itemHeight,maxScrollTop:o,overscan:a,scrollTop:s,totalHeight:r,totalRowCount:n,viewportHeight:i},projected:{contentHeight:f,paneHeight:d,paneTop:u},sticky:{height:l,rows:c},visible:v,window:{endIndex:b.endIndex,height:x,offsetTop:pA(b)?0:b.startIndex*t.itemHeight,startIndex:b.startIndex}}}var SA={added:`A`,deleted:`D`,ignored:null,modified:`M`,renamed:`R`,untracked:`U`},CA={added:`Git status: added`,deleted:`Git status: deleted`,ignored:`Git status: ignored`,modified:`Git status: modified`,renamed:`Git status: renamed`,untracked:`Git status: untracked`},wA=`Contains git status items`;function TA(e){return e.current?!0:(e.current=!0,!1)}function EA(e){let{currentScrollTop:t,focusedIndex:n,itemHeight:r,topInset:i=0,viewportHeight:a}=e;if(n<0)return null;let o=Math.max(0,i),s=n*r,c=s+r;if(s<t+o){let e=Math.max(0,s-o);return e===t?null:e}if(c>t+a){let e=c-a;return e===t?null:e}return null}function DA(e){let{currentScrollTop:t,focusedIndex:n,itemHeight:r,offset:i,topInset:a=0,totalHeight:o,viewportHeight:s}=e;if(i===`nearest`)return EA({currentScrollTop:t,focusedIndex:n,itemHeight:r,topInset:a,viewportHeight:s});if(n<0)return null;let c=Math.max(0,a),l=n*r,u=Math.max(0,s-c),d=i===`center`?c+Math.max(0,(u-r)/2):c,f=Math.max(0,o-s),p=Math.max(0,Math.min(l-d,f));return p===t?null:p}function OA(e){let{currentScrollTop:t,focusedIndex:n,itemHeight:r,targetViewportOffset:i,totalHeight:a,viewportHeight:o}=e;if(n<0)return null;let s=Math.max(0,i),c=n*r,l=c+r,u=t+s,d=t+o;if(c>=u&&l<=d)return null;let f=Math.max(0,a-o),p=Math.max(0,Math.min(c-s,f));return p===t?null:p}function kA(e){if(e==null||!e.isConnected||e===document.body||e===document.documentElement)return!1;e.focus({preventScroll:!0});let t=e.getRootNode();return t instanceof ShadowRoot?t.activeElement===e:document.activeElement===e}function AA(e){let t=e.getRootNode();if(t instanceof ShadowRoot){let e=t.activeElement;return e instanceof HTMLElement?e:null}let n=document.activeElement;return n instanceof HTMLElement&&e.contains(n)?n:null}function jA(e,t){if(e==null)return t;let n=e.getBoundingClientRect().height;return n>0?n:e.clientHeight>0?e.clientHeight:t}function MA(e,t){return e!=null&&e>0?e:t}function NA(e){let t=e.borderBoxSize,n=Array.isArray(t)?t[0]:t;return n!=null&&Number.isFinite(n.blockSize)&&n.blockSize>0?n.blockSize:e.contentRect.height>0?e.contentRect.height:null}function PA(e,t,n,r,i=0){let a=EA({currentScrollTop:e.scrollTop,focusedIndex:t,itemHeight:n,topInset:i,viewportHeight:r});return a!=null&&(e.scrollTop=a,!0)}function FA(e,t,n,r,i,a,o=0){let s=DA({currentScrollTop:e.scrollTop,focusedIndex:t,itemHeight:n,offset:a,topInset:o,totalHeight:i,viewportHeight:r});return s!=null&&(e.scrollTop=s,!0)}function IA(e,t,n,r,i,a){let o=OA({currentScrollTop:e.scrollTop,focusedIndex:t,itemHeight:n,targetViewportOffset:a,totalHeight:i,viewportHeight:r});return o!=null&&(e.scrollTop=o,!0)}function LA(e,t,n,r){return n.end<n.start?null:e<n.start?-t:e>n.end?r:null}function RA(e){let{renamingPath:t,previousRenamingPath:n,hasRenderedInput:r}=e;return t==null?`reset`:r?n===t?`ignore`:`focus-input`:`reveal-canonical`}function zA({ariaLabel:e,isFlattened:t=!1,ref:n,value:r,onBlur:i,onInput:a}){return Q(`input`,{ref:n,"data-item-rename-input":!0,...t?{"data-item-flattened-rename-input":!0}:{},"aria-label":e,value:r,onBlur:i,onInput:a,onClick:e=>e.stopPropagation(),onMouseDown:e=>e.stopPropagation(),onPointerDown:e=>e.stopPropagation()})}function BA(e){let{row:t,mode:n,targetPath:r,ariaLabel:i,domId:a,isParked:o,itemHeight:s,features:c,state:l,extraStyle:u}=e,d=n===`sticky`,f=t.ancestorPaths.at(-1)??``,p={};return l.isFocusRinged&&(p[`data-item-focused`]=!0),t.isSelected&&(p[`data-item-selected`]=!0),l.isContextHovered&&(p[`data-item-context-hover`]=`true`),l.isDragTarget&&(p[`data-item-drag-target`]=!0),l.isDragging&&(p[`data-item-dragging`]=!0),l.effectiveGitStatus!=null&&(p[`data-item-git-status`]=l.effectiveGitStatus),l.containsGitChange&&(p[`data-item-contains-git-change`]=`true`),{"aria-expanded":!d&&t.kind===`directory`?t.isExpanded:void 0,"aria-haspopup":c.contextMenuEnabled?`menu`:void 0,"aria-label":i,"aria-level":d?void 0:t.level+1,"aria-posinset":d?void 0:t.posInSet+1,"aria-selected":d?void 0:t.isSelected?`true`:`false`,"aria-setsize":d?void 0:t.setSize,"data-file-tree-sticky-path":d?r:void 0,"data-file-tree-sticky-row":d?`true`:void 0,"data-item-context-menu-button-visibility":c.actionLaneEnabled?c.contextMenuButtonVisibility:void 0,"data-item-context-menu-trigger-mode":c.contextMenuEnabled?c.contextMenuTriggerMode:void 0,"data-item-has-context-menu-action-lane":c.actionLaneEnabled?`true`:void 0,"data-item-has-git-lane":c.gitLaneActive?`true`:void 0,"data-item-parent-path":f.length>0?f:void 0,"data-item-parked":o?`true`:void 0,"data-item-path":r,"data-item-type":t.kind===`directory`?`folder`:`file`,"data-type":`item`,id:d?void 0:a,role:d?void 0:`treeitem`,style:{minHeight:`${s}px`,...u},tabIndex:!d&&t.isFocused?0:-1,...p}}function VA(e){let{event:t,mode:n,isSearchOpen:r,isDirectory:i}=e,a=t.ctrlKey||t.metaKey,o=t.shiftKey||a,s=t.shiftKey?{additive:a,kind:`range`}:a?{kind:`toggle`}:{kind:`single`};return{closeSearch:r,revealCanonical:n===`sticky`,selection:s,toggleDirectory:!o&&i}}var HA,UA,WA,GA,KA=Object.is,qA=0,JA=[],YA=Z,XA=YA.__b,ZA=YA.__r,QA=YA.diffed,$A=YA.__c,ej=YA.unmount,tj=YA.__;function nj(e,t){YA.__h&&YA.__h(UA,e,qA||t),qA=0;var n=UA.__H||(UA.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function rj(e){return qA=1,ij(hj,e)}function ij(e,t,n){var r=nj(HA++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):hj(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);KA(t,n)||(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=UA,!UA.__f)){var i=function(e,t,n){if(!r.__c.__H)return!0;var i=r.__c.__H.__.filter(function(e){return!!e.__c});if(i.every(function(e){return!e.__N}))return!a||a.call(this,e,t,n);var o=r.__c.props!==e;return i.forEach(function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,KA(t,e.__[0])||(o=!0)}}),a&&a.call(this,e,t,n)||o};UA.__f=!0;var a=UA.shouldComponentUpdate,o=UA.componentWillUpdate;UA.componentWillUpdate=function(e,t,n){if(4&this.__g){var r=a;a=void 0,i(e,t,n),a=r}o&&o.call(this,e,t,n)},UA.shouldComponentUpdate=i}return r.__N||r.__}function aj(e,t){var n=nj(HA++,3);!YA.__s&&mj(n.__H,t)&&(n.__=e,n.u=t,UA.__H.__h.push(n))}function oj(e,t){var n=nj(HA++,4);!YA.__s&&mj(n.__H,t)&&(n.__=e,n.u=t,UA.__h.push(n))}function $(e){return qA=5,sj(function(){return{current:e}},[])}function sj(e,t){var n=nj(HA++,7);return mj(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function cj(e,t){return qA=8,sj(function(){return e},t)}function lj(){for(var e;e=JA.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(fj),e.__H.__h.forEach(pj),e.__H.__h=[]}catch(t){e.__H.__h=[],YA.__e(t,e.__v)}}YA.__b=function(e){UA=null,XA&&XA(e)},YA.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),tj&&tj(e,t)},YA.__r=function(e){ZA&&ZA(e),HA=0;var t=(UA=e.__c).__H;t&&(WA===UA?(t.__h=[],UA.__h=[],t.__.forEach(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.forEach(fj),t.__h.forEach(pj),t.__h=[],HA=0)),WA=UA},YA.diffed=function(e){QA&&QA(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(JA.push(t)!==1&&GA===YA.requestAnimationFrame||((GA=YA.requestAnimationFrame)||dj)(lj)),t.__H.__.forEach(function(e){e.u&&(e.__H=e.u),e.u=void 0})),WA=UA=null},YA.__c=function(e,t){t.some(function(e){try{e.__h.forEach(fj),e.__h=e.__h.filter(function(e){return!e.__||pj(e)})}catch(n){t.some(function(e){e.__h&&=[]}),t=[],YA.__e(n,e.__v)}}),$A&&$A(e,t)},YA.unmount=function(e){ej&&ej(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(e){try{fj(e)}catch(e){t=e}}),n.__H=void 0,t&&YA.__e(t,n.__v))};var uj=typeof requestAnimationFrame==`function`;function dj(e){var t,n=function(){clearTimeout(r),uj&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);uj&&(t=requestAnimationFrame(n))}function fj(e){var t=UA,n=e.__c;typeof n==`function`&&(e.__c=void 0,n()),UA=t}function pj(e){var t=UA;e.__c=e.__(),UA=t}function mj(e,t){return!e||e.length!==t.length||t.some(function(t,n){return!KA(t,e[n])})}function hj(e,t){return typeof t==`function`?t(e):t}function gj(e,t=null,n=null){"use no memo";let r=e.flattenedSegments;return r==null||r.length===0?t??e.name:Q(`span`,{"data-item-flattened-subitems":!0,children:r.map((e,i)=>{let a=i===r.length-1;return Q(xk,{children:[Q(`span`,{"data-item-flattened-subitem":e.path,"data-item-flattened-subitem-drag-target":n===e.path?`true`:void 0,children:a&&t!=null?t:Q(sA,{children:e.name})}),i<r.length-1?` / `:``]},e.path)})})}function _j(e){return e.isFlattened?e.flattenedSegments?.findLast(e=>e.isTerminal)?.path??e.path:e.path}function vj(e){let t=e.flattenedSegments;return t==null||t.length===0?e.name:t.map(e=>e.name).join(` / `)}function yj(e,t,n,r){return e.map((e,i)=>{let a=i*n,o=e.subtreeEndIndex+1;if(o>=r)return{row:e.row,top:a};let s=o*n-t;return{row:e.row,top:Math.min(a,s-n)}}).filter(e=>e.top+n>0)}function bj({controller:e,itemHeight:t,overscan:n,scrollTop:r,stickyFolders:i,viewportHeight:a}){let o=e.getVisibleCount(),s=i&&o>0?e.getStickyRowCandidates(r,t):[],c=s==null&&i&&o>0?e.getVisibleRows(0,o-1):[],l=xA(c,{itemHeight:t,overscan:n,scrollTop:r,stickyRows:s==null?void 0:yj(s,r,t,o),totalRowCount:o,viewportHeight:a}),u=i&&r<=0&&o>0?e.getStickyRowCandidates(1,t):[],d=u!=null&&r<=0?yj(u,1,t,o):i&&r<=0&&c.length>0?bA(c,1,t):l.sticky.rows;return{overlayHeight:d.reduce((e,n)=>Math.max(e,n.top+t),0),overlayRows:d,snapshot:l,visibleRows:c}}var xj=400,Sj=40,Cj=18;function wj(e,t,n){let r=e,i=document.elementFromPoint?.bind(document)??null,a=r.elementFromPoint?.(t,n)??i?.(t,n)??null;return e instanceof ShadowRoot&&(a==null||!e.contains(a))?Tj(e,t,n):a instanceof HTMLElement?a:null}function Tj(e,t,n){let r=Array.from(e.querySelectorAll(`[data-type="item"], [data-item-flattened-subitem]`));for(let e=r.length-1;e>=0;e--){let i=r[e],a=i.getBoundingClientRect();if(t>=a.left&&t<=a.right&&n>=a.top&&n<=a.bottom)return i}return null}function Ej(e){let t=e?.closest?.(`[data-type="item"]`);if(!(t instanceof HTMLElement))return null;let n=t.dataset.itemPath??null;if(n==null)return null;let r=e?.closest?.(`[data-item-flattened-subitem]`),i=r instanceof HTMLElement?r.getAttribute(`data-item-flattened-subitem`)??null:null;if(i!=null&&i.endsWith(`/`))return{directoryPath:i,flattenedSegmentPath:i,hoveredPath:n,kind:`directory`};if(t.dataset.itemType===`folder`)return{directoryPath:n,flattenedSegmentPath:null,hoveredPath:n,kind:`directory`};let a=t.dataset.itemParentPath??null;return a==null||a.length===0?{directoryPath:null,flattenedSegmentPath:null,hoveredPath:n,kind:`root`}:{directoryPath:a,flattenedSegmentPath:null,hoveredPath:n,kind:`directory`}}function Dj(e){let t=e.cloneNode(!0);return t.removeAttribute(`id`),t.dataset.fileTreeDragPreview=`true`,t.setAttribute(`aria-hidden`,`true`),t.tabIndex=-1,Object.assign(t.style,{boxShadow:`0 4px 12px rgba(0, 0, 0, 0.15)`,left:`0px`,margin:`0`,pointerEvents:`none`,position:`fixed`,top:`0px`,willChange:`transform`,zIndex:`10000`}),t}function Oj(){return navigator.vendor!==`Apple Computer, Inc.`}function kj(e,t){let n=e-t.top;if(n<Sj)return-Math.ceil((Sj-Math.max(0,n))/Sj*Cj);let r=t.bottom-e;return r<Sj?Math.ceil((Sj-Math.max(0,r))/Sj*Cj):0}function Aj(e,t){if(e!=null){let t=SA[e];return t==null?null:{text:t,title:CA[e]}}return t?{icon:{name:`file-tree-icon-dot`,width:6,height:6},title:wA}:null}function jj(e,t,n){if(t==null||t.size===0)return null;let r=[];for(let i=e.length-1;i>=0;--i){let a=e[i],o=n.get(a);if(o!=null){for(let e of r)n.set(e,o);return o?`ignored`:null}if(t.has(a)){n.set(a,!0);for(let e of r)n.set(e,!0);return`ignored`}r.push(a)}for(let e of r)n.set(e,!1);return null}function Mj(e){return e!=null&&`toggle`in e}function Nj(e){return e.code===`Space`||e.key===` `||e.key===`Spacebar`}function Pj(e){return e.key.length===1&&/^[\p{L}\p{N}]$/u.test(e.key)&&!e.ctrlKey&&!e.metaKey&&!e.altKey}function Fj(e){return e==null?``:`[data-item-section="spacing-item"][data-ancestor-path="${e.replaceAll(`\\`,`\\\\`).replaceAll(`"`,`\\"`)}"] { opacity: 1; }`}function Ij(e){return e.shiftKey&&e.key===`F10`||e.key===`ContextMenu`}function Lj(e,t){return t&&Ij(e)||(e.ctrlKey||e.metaKey)&&Nj(e)?!0:e.key===`ArrowDown`||e.key===`ArrowLeft`||e.key===`ArrowRight`||e.key===`ArrowUp`}var Rj=new Set([`ArrowDown`,`ArrowLeft`,`ArrowRight`,`ArrowUp`,`End`,`Home`,`PageDown`,`PageUp`]);function zj(e){for(let t of e.composedPath())if(t instanceof HTMLElement&&(t.dataset.fileTreeContextMenuRoot===`true`||t.dataset.type===`context-menu-anchor`||t.dataset.type===`context-menu-trigger`||t.getAttribute(`slot`)===`context-menu`))return!0;return!1}function Bj(e){return{bottom:e.bottom,height:e.height,left:e.left,right:e.right,top:e.top,width:e.width,x:e.x,y:e.y}}function Vj(e,t){return{bottom:t,height:0,left:e,right:e,top:t,width:0,x:e,y:t}}function Hj(e,t){if(e==null)return t.offsetTop;let n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return n.top-r.top}function Uj(e,t,n){if(n==null){e.delete(t);return}e.set(t,n)}function Wj(e,t,n){if(e==null)return null;let r=t.get(e)??null;if(r!=null)return r;let i=n.get(e)??null;return i?.dataset.itemParked===`true`?null:i}function Gj(e){if(e==null)return[];let t=[];for(let n of e.querySelectorAll(`button[data-file-tree-sticky-row="true"]`)){if(!(n instanceof HTMLElement))continue;let e=n.dataset.fileTreeStickyPath;e!=null&&t.push(e)}return t}function Kj(e,t){if(e==null||t==null)return null;for(let n of e.querySelectorAll(`button[data-item-focused="true"][data-item-parked="true"]`))if(n instanceof HTMLElement&&n.dataset.itemPath===t)return n;return null}function qj(e,t,n,r,i,a,o){let s=Math.max(0,a-i),c=t?.getBoundingClientRect()??null,l=c==null||n==null?null:n.getBoundingClientRect().top-c.top,u=Kj(e,r),d=c==null||u==null?null:u.getBoundingClientRect().top-c.top;return Math.max(0,Math.min(d??Math.max(l??0,s),Math.max(0,o-i)))}function Jj(e,t){return{kind:e.kind,name:vj(e),path:t}}function Yj(e){return e==null?void 0:`${e}__tree`}function Xj(e,t,n){if(e!=null)return`${e}__focused-item-${encodeURIComponent(t)}${n?`__parked`:``}`}function Zj(e){return e===`file-tree-icon-chevron`||e===`file-tree-icon-dot`||e===`file-tree-icon-file`||e===`file-tree-icon-lock`}function Qj(e,t){if(e==null)return null;if(`text`in e)return e.parts==null?Q(`span`,{title:e.title,children:e.text}):Q(`span`,{title:e.title,children:e.parts.map((e,t)=>Q(`span`,{style:{color:e.color},children:e.text},t))});let n=typeof e.icon==`string`?Zj(e.icon)?t(e.icon):{name:e.icon}:Zj(e.icon.name)?(()=>{let n=t(e.icon.name),{name:r,...i}=e.icon;return{...n,...i}})():e.icon;return Q(`span`,{title:e.title,children:Q(Jk,{...n})})}function $j(e){e!=null&&kA(e.querySelector([`button:not([disabled])`,`[href]`,`input:not([disabled])`,`select:not([disabled])`,`textarea:not([disabled])`,`[tabindex]:not([tabindex="-1"])`].join(`, `))??e)}function eM(e,t,{actionLaneEnabled:n=!1,customDecoration:r=null,decorationLaneEnabled:i=!1,dragTargetFlattenedSegmentPath:a=null,gitDecoration:o=null,gitLaneActive:s=!1,renameInput:c=null,showDecorativeActionAffordance:l=!1}={}){let u=_j(e);return Q(xk,{children:[e.depth>0?Q(`div`,{"data-item-section":`spacing`,children:Array.from({length:e.depth}).map((t,n)=>Q(`div`,{"data-item-section":`spacing-item`,"data-ancestor-path":e.ancestorPaths[n]},n))}):null,Q(`div`,{"data-item-section":`icon`,children:e.kind===`directory`?Q(Jk,{...t(`file-tree-icon-chevron`)}):Q(Jk,{...t(`file-tree-icon-file`,u)})}),Q(`div`,{"data-item-section":`content`,children:e.isFlattened?gj(e,c,a):c??Q(lA,{minimumLength:5,split:`extension`,children:e.name})}),i?Q(`div`,{"data-item-section":`decoration`,children:r==null?null:Qj(r,t)}):null,s?Q(`div`,{"data-item-section":`git`,children:Qj(o,t)}):null,n?Q(`div`,{"data-item-section":`action`,children:l?Q(`span`,{"aria-hidden":`true`,"data-item-action-affordance":`decorative`,children:Q(Jk,{...t(`file-tree-icon-ellipsis`)})}):null}):null]})}function tM(e,t,n,r={}){let{controller:i,renameView:a,visualFocusPath:o,contextHoverPath:s,draggedPathSet:c,dragTarget:l,dragAndDropEnabled:u,shouldSuppressContextMenu:d,handleRowDragStart:f,handleRowDragEnd:p,handleRowTouchStart:m,instanceId:h,itemHeight:g,gitStatusByPath:_,ignoredGitDirectories:v,ignoredInheritanceCache:y,directoriesWithGitChanges:b,gitLaneActive:x,contextMenuEnabled:S,contextMenuTriggerMode:C,contextMenuButtonTriggerEnabled:w,contextMenuButtonVisibility:T,contextMenuRightClickEnabled:E,registerRenameInput:D,registerButton:O,resolveIcon:k,renderDecorationForRow:A,openContextMenuForRow:ee,onRowClick:j,onKeyDown:te}=e,M=_j(t),{isParked:ne=!1,mode:re=`flow`,style:ie}=r,ae=re===`sticky`,oe=_?.get(M)??null??jj(t.ancestorPaths,v,y),se=t.kind===`directory`&&(b?.has(M)??!1),ce=A(t,M),le=Aj(oe,se),ue=S&&w,de=ce!=null||x||ue,fe=ue&&T===`always`,pe=a.getPath()===M,me=pe?a.getValue():``,he=ae||!pe?null:Q(zA,{ref:D,ariaLabel:`Rename ${vj(t)}`,isFlattened:t.isFlattened,value:me,onBlur:()=>{a.commit()},onInput:e=>{a.setValue(e.currentTarget.value)}}),ge=eM(t,k,{actionLaneEnabled:ue,customDecoration:ce,decorationLaneEnabled:de,dragTargetFlattenedSegmentPath:l?.flattenedSegmentPath??null,gitDecoration:le,gitLaneActive:x,renameInput:he,showDecorativeActionAffordance:fe}),_e={...BA({ariaLabel:vj(t),domId:t.isFocused?Xj(h,M,ne):void 0,extraStyle:ie,features:{actionLaneEnabled:ue,contextMenuButtonVisibility:ue?T:null,contextMenuEnabled:S,contextMenuTriggerMode:S?C:null,gitLaneActive:x},isParked:ne,itemHeight:g,mode:re,row:t,state:{containsGitChange:se,effectiveGitStatus:oe,isContextHovered:s===M,isDragTarget:l?.kind===`directory`&&l.directoryPath===M,isDragging:c?.has(M)===!0,isFocusRinged:t.isFocused&&o===M},targetPath:M}),key:n,onContextMenu:S||u?e=>{if(d()){e.preventDefault();return}S&&(e.preventDefault(),E&&(i.focusMountedPathFromInput(M),ee(t,M,{anchorRect:Vj(e.clientX,e.clientY),source:`right-click`})))}:void 0,onFocus:ae?void 0:()=>{i.focusMountedPathFromInput(M)},onKeyDown:ae?void 0:te,ref:e=>{O(M,e)}};return!ae&&pe?Q(`div`,{..._e,children:ge}):Q(`button`,{..._e,type:`button`,draggable:u&&!ne,onDragEnd:u&&!ne?p:void 0,onDragStart:u&&!ne?e=>{f(e,t,M)}:void 0,onMouseDown:e=>{if(ae){e.preventDefault();return}i.isSearchOpen()&&e.preventDefault()},onTouchStart:u&&!ne?e=>{m(e,t,M)}:void 0,onClick:e=>{j(e,t,M,re)},children:ge})}function nM(e,t,n){return t.end<t.start?[]:e.controller.getVisibleRows(t.start,t.end).filter(e=>!n.has(_j(e))).map((n,r)=>tM(e,n,t.start+r))}function rM({composition:e,controller:t,gitStatusByPath:n,ignoredGitDirectories:r,directoriesWithGitChanges:i,icons:a,instanceId:o,itemHeight:s=qD,overscan:c=10,renamingEnabled:l=!1,renderRowDecoration:u,searchBlurBehavior:d=`close`,searchEnabled:f=!1,searchFakeFocus:p=!1,slotHost:m,stickyFolders:h=!1,initialViewportHeight:g=420}){"use no memo";let _=$(null),v=$(null),y=$(!1),b=$(null),x=$(null),S=$(null),C=$(null),w=$(null),T=$(new Map),E=$(new Map),D=$(()=>{}),O=$(null),k=$(0),A=$(!1),ee=$(null);ee.current!==t&&(A.current=!1,ee.current=t);let j=$(!1),te=$(null),M=$(null),ne=$(!1),re=$(null),ie=$(null),ae=$(null),oe=$(null),se=$(null),ce=$(null),le=$(null),ue=$(null),de=$(!1),fe=$(null),pe=$(null),me=$(null),he=$(null),ge=sj(()=>new Map,[]),[,_e]=rj(0),ve=$(!1),[ye,be]=rj(null),[xe,Se]=rj(null),[Ce,we]=rj(null),[Te,Ee]=rj(null),[De,Oe]=rj(0),[N,ke]=rj(null),Ae=$(N);Ae.current=N;let je=$(null),Me=$(null),Ne=$(null),Pe=$(null),Fe=$(null),Ie=$(!1),Le=()=>{Me.current=null,Ne.current=null,Pe.current=null},Re=(e,t)=>{Me.current=e,Ne.current=null,Pe.current=t==null?null:{path:e,scrollTop:t}},ze=(e,t)=>{Me.current=null,Ne.current={path:e,viewportOffset:t},Pe.current=null},Be=$(d===`retain`&&t.isSearchOpen()),[Ve,He]=rj(p);aj(()=>{p||He(!1)},[p]);let Ue=$(!1),We=cj(()=>{Ue.current=!0,He(e=>e&&!1)},[]),[Ge,Ke]=rj(()=>bj({controller:t,itemHeight:s,overscan:c,scrollTop:0,stickyFolders:h,viewportHeight:g})),[qe,Je]=rj(!1);aj(()=>{Je(!0)},[]);let Ye=e?.contextMenu?.enabled===!0||e?.contextMenu?.render!=null||e?.contextMenu?.onOpen!=null||e?.contextMenu?.onClose!=null,Xe=e?.contextMenu?.triggerMode??(Ye?`right-click`:`both`),Ze=Xe===`both`||Xe===`button`,Qe=e?.contextMenu?.buttonVisibility??`when-needed`,$e=Xe===`both`||Xe===`right-click`;oj(()=>{let e=S.current;if(e==null)return;let t=e=>{if(!(e instanceof CustomEvent))return;let t=e.detail?.path??null;Fe.current=t,Se(t),Ee(t==null?null:`pointer`)},n=e=>{e instanceof CustomEvent&&(Ie.current=e.detail?.disabled===!0)};return e.addEventListener(`file-tree-debug-set-context-menu-trigger`,t),e.addEventListener(`file-tree-debug-set-scroll-suppression`,n),()=>{e.removeEventListener(`file-tree-debug-set-context-menu-trigger`,t),e.removeEventListener(`file-tree-debug-set-scroll-suppression`,n)}},[]);let et=cj((e,t)=>{Uj(T.current,e,t)},[]),tt=cj((e,t)=>{Uj(E.current,e,t)},[]),nt=cj(e=>{x.current=e},[]),P=cj(e=>Wj(e,E.current,T.current),[]),rt=n!=null||r!=null||i!=null,{resolveIcon:it}=sj(()=>fw(a),[a]),at=t[RO](),ot=at.getPath(),st=ot!=null,ct=t.isSearchOpen(),lt=t.getSearchValue(),F=t.getFocusedPath(),I=t.getFocusedIndex(),ut=t.getScrollRequest(),dt=t.isDragAndDropEnabled(),ft=t.getDragSession(),pt=sj(()=>ft==null?null:new Set(ft.draggedPaths),[ft]),mt=ft?.target??null,ht=ft?.primaryPath??null,gt=Yj(o),{overlayHeight:_t,overlayRows:vt,snapshot:L,visibleRows:yt}=Ge,bt=L.physical.viewportHeight,xt=sj(()=>({end:L.window.endIndex,start:L.window.startIndex}),[L.window.endIndex,L.window.startIndex]),St=vt,Ct=L.sticky.rows,wt=L.physical.totalHeight,Tt=L.sticky.height,Et=sj(()=>new Set(Ct.map(e=>_j(e.row))),[Ct]),Dt=I>=0&&I>=xt.start&&I<=xt.end,Ot=cj((e,t)=>u?.({item:Jj(e,t),row:e})??null,[u]),kt=cj(e=>kA(e==null?null:T.current.get(e)??null)?!0:kA(S.current),[]),At=cj(e=>{kt(t.focusNearestPath(e))},[t,kt]),jt=$(At);jt.current=At;let Mt=$(!0),Nt=$(()=>{}),Pt=cj((t=!0)=>{let n=Ae.current;n!=null&&(Mt.current=Mt.current&&t,ke(null),e?.contextMenu?.onClose?.(),Mt.current&&At(n.path))},[e?.contextMenu,At]);Nt.current=Pt;let Ft=cj(e=>{let t=e==null?null:Hj(S.current,e);we(e=>e===t?e:t)},[]),It=cj((e,n,r)=>{let i=t.getItem(n);if(i==null)return;let a=P(n);if(a?.dataset.fileTreeStickyRow===`true`){let e=C.current;Re(n,e?.scrollTop??null),j.current=!0,be(e=>e===n?e:n)}i.focus(),Ft(a),Mt.current=!0,ke({anchorRect:r?.anchorRect??null,item:Jj(e,n),path:n,source:r?.source??`keyboard`})},[t,P,Ft]),Lt=cj(e=>{if(l){if(t.isSearchOpen()){let e=C.current,t=jA(e,bt);re.current=I<0||e==null?null:Math.max(0,Math.min(I*s-e.scrollTop,Math.max(0,t-s))),ne.current=!0}t.startRenaming(e)!==!1&&(Ee(`focus`),_e(e=>e+1))}},[t,I,s,l,bt]),Rt=cj((e,{restoreTreeFocus:n=!0,targetOffset:r=`live-overlay`}={})=>{let i=C.current;if(i==null)return!1;t.focusPath(e);let a=t.getFocusedIndex();if(a<0)return!1;let o=t.getVisibleRows(a,a)[0]??null;if(o==null)return!1;let l=jA(i,bt),u=t.getVisibleCount()*s,d=r===`sticky-parents`?o.ancestorPaths.length*s:bj({controller:t,itemHeight:s,overscan:c,scrollTop:i.scrollTop,stickyFolders:h,viewportHeight:l}).snapshot.sticky.height;return j.current=!0,IA(i,a,s,l,u,d),D.current(),je.current=n?e:null,!0},[t,s,c,bt,h]),zt=()=>y.current===!0||he.current!=null||de.current===!0,Bt=e=>typeof window.requestAnimationFrame==`function`?window.requestAnimationFrame(()=>{e()}):window.setTimeout(e,16),Vt=e=>{if(e!=null){if(typeof window.cancelAnimationFrame==`function`){window.cancelAnimationFrame(e);return}window.clearTimeout(e)}},R=()=>{oe.current!=null&&(clearTimeout(oe.current),oe.current=null),ae.current=null},Ht=()=>{ce.current?.remove(),ce.current=null},Ut=()=>{Vt(ie.current),ie.current=null,se.current=null},Wt=e=>{let t=S.current?.getRootNode();if(t instanceof ShadowRoot){t.append(e);return}document.body.append(e)},Gt=()=>{ue.current?.(),ue.current=null,he.current!=null&&(clearTimeout(he.current),he.current=null),de.current=!1,fe.current=null,me.current=null,pe.current!=null&&(pe.current.setAttribute(`draggable`,`true`),pe.current.style.removeProperty(`touch-action`),pe.current=null),Ht(),R(),Ut(),le.current=null},Kt=(e,n)=>{let r=S.current?.getRootNode(),i=Ej(wj(r instanceof ShadowRoot?r:document,e,n));return t.setDragTarget(i),t.getDragSession()?.target??null},qt=e=>{let n=t.getDragAndDropConfig()?.openOnDropDelay??800;if(e==null||e.kind!==`directory`||e.directoryPath==null||n<=0){R();return}let r=t.getItem(e.directoryPath),i=Mj(r)?r:null;if(i==null||i.isExpanded()){R();return}let a=`${e.directoryPath}::${e.flattenedSegmentPath??``}`;ae.current!==a&&(R(),ae.current=a,oe.current=setTimeout(()=>{let n=t.getDragSession()?.target;n?.kind===`directory`&&n.directoryPath===e.directoryPath&&n.flattenedSegmentPath===e.flattenedSegmentPath&&i.expand()},n))},Jt=()=>{ie.current=null;let e=se.current,n=C.current;if(e==null||n==null||t.getDragSession()==null)return;let r=n.getBoundingClientRect(),i=kj(e.clientY,r);if(i===0)return;let a=Math.max(0,n.scrollHeight-n.clientHeight),o=Math.max(0,Math.min(a,n.scrollTop+i));o!==n.scrollTop&&(n.scrollTop=o,D.current()),qt(Kt(e.clientX,e.clientY)),ie.current=Bt(Jt)},Yt=(e,t)=>{se.current={clientX:e,clientY:t},ie.current??=Bt(Jt)},Xt=(e,n,r)=>{let i=e.currentTarget;if(i!=null){if(Gt(),Ht(),R(),Ut(),t.startDrag(r)===!1){e.preventDefault();return}if(le.current=n,e.dataTransfer!=null&&(e.dataTransfer.effectAllowed=`move`,e.dataTransfer.dropEffect=`move`,e.dataTransfer.setData(`text/plain`,r),Oj())){let t=Dj(i),n=i.getBoundingClientRect();Object.assign(t.style,{height:`${n.height}px`,opacity:`0.85`,transform:`translate3d(-9999px, 0px, 0)`,width:`${n.width}px`}),Wt(t),ce.current=t,e.dataTransfer.setDragImage(t,Math.max(0,e.clientX-n.left),Math.max(0,e.clientY-n.top))}}},Zt=()=>{Ht(),R(),Ut(),le.current=null,t.cancelDrag()},Qt=(e,n,r)=>{if(he.current!=null||de.current)return;let i=e.touches[0],a=e.currentTarget;if(i==null||a==null)return;me.current={clientX:i.clientX,clientY:i.clientY},pe.current=a,a.setAttribute(`draggable`,`false`);let o=(e={})=>{let t=e.restoreNativeDraggable??!de.current;he.current!=null&&(clearTimeout(he.current),he.current=null),document.removeEventListener(`touchmove`,s),document.removeEventListener(`touchend`,c),document.removeEventListener(`touchcancel`,c),ue.current===o&&(ue.current=null),t&&(a.setAttribute(`draggable`,`true`),pe.current===a&&(pe.current=null),me.current=null)},s=e=>{let t=e.touches[0],n=me.current;if(t==null||n==null)return;let r=t.clientX-n.clientX,i=t.clientY-n.clientY;r*r+i*i<=100||o()},c=()=>{o()};document.addEventListener(`touchmove`,s,{passive:!0}),document.addEventListener(`touchend`,c),document.addEventListener(`touchcancel`,c),ue.current=o,he.current=setTimeout(()=>{if(o({restoreNativeDraggable:!1}),t.startDrag(r)===!1){a.setAttribute(`draggable`,`true`),pe.current===a&&(pe.current=null),me.current=null;return}de.current=!0,pe.current=a,a.setAttribute(`draggable`,`false`),a.style.setProperty(`touch-action`,`none`),le.current=n;let e=a.getBoundingClientRect(),s=Dj(a);Object.assign(s.style,{height:`${e.height}px`,opacity:`0.85`,transform:`translate3d(${e.left}px, ${e.top}px, 0)`,width:`${e.width}px`}),Wt(s),ce.current=s,fe.current={x:i.clientX-e.left,y:i.clientY-e.top};let c=e=>{let t=e.touches[0];if(t==null)return;e.preventDefault();let n=fe.current;n!=null&&ce.current!=null&&(ce.current.style.transform=`translate3d(${t.clientX-n.x}px, ${t.clientY-n.y}px, 0)`),qt(Kt(t.clientX,t.clientY)),Yt(t.clientX,t.clientY)},l=e=>{let n=e.changedTouches[0];n!=null&&Kt(n.clientX,n.clientY),t.completeDrag(),Gt()},u=()=>{t.cancelDrag(),Gt()};ue.current=()=>{document.removeEventListener(`touchmove`,c),document.removeEventListener(`touchend`,l),document.removeEventListener(`touchcancel`,u)},document.addEventListener(`touchmove`,c,{passive:!1}),document.addEventListener(`touchend`,l),document.addEventListener(`touchcancel`,u)},xj)},$t=e=>{if(N!=null){if(e.key===`Escape`){Pt(),e.preventDefault(),e.stopPropagation();return}Rj.has(e.key)&&(e.preventDefault(),e.stopPropagation());return}if(at.isActive()){if(e.isComposing||e.keyCode===229)return;if(e.key===`Escape`)at.cancel();else if(e.key===`Enter`)at.commit();else return;Ee(`focus`),_e(e=>e+1),e.preventDefault(),e.stopPropagation();return}if(l&&e.key===`F2`){Lt(F??void 0),e.preventDefault(),e.stopPropagation();return}if(ct){if(e.key===`Escape`)ne.current=!1,re.current=null,t.closeSearch();else if(e.key===`Enter`){let e=t.getFocusedPath();e!=null&&t.selectOnlyPath(e);let n=C.current,r=jA(n,bt);re.current=I<0||n==null?null:Math.max(0,Math.min(I*s-n.scrollTop,Math.max(0,r-s))),ne.current=!0,t.closeSearch()}else if(e.key===`ArrowDown`)t.focusNextSearchMatch();else if(e.key===`ArrowUp`)t.focusPreviousSearchMatch();else return;Ee(`focus`),_e(e=>e+1),e.preventDefault(),e.stopPropagation();return}if(f&&Pj(e)){t.openSearch(e.key),_e(e=>e+1),e.preventDefault(),e.stopPropagation();return}let n=Ye&&Ij(e),r=Lj(e,Ye),i=r&&S.current!=null?AA(S.current):null,a=r?new Set(Gj(S.current)):new Set,o=i?.dataset.fileTreeStickyPath??null,c=i?.dataset.fileTreeStickyRow===`true`&&o!=null;if(c&&o!==F&&a.has(o)){let e=C.current;Re(o,e?.scrollTop??null),t.focusPath(o)}let u=t.getFocusedPath(),d=t.getFocusedIndex(),p=t.getFocusedItem();if(p==null)return;let m=Mj(p)?p:null,h=u!=null&&(Et.has(u)||c&&o===u&&a.has(u)),g=e.key===`ArrowDown`||e.key===`ArrowUp`||e.key===`ArrowRight`&&m!=null&&m.isExpanded(),_=e.key===`ArrowLeft`&&h&&m!=null&&m.isExpanded(),v=C.current,y=!0;if(e.shiftKey&&e.key===`ArrowDown`)t.extendSelectionFromFocused(1);else if(e.shiftKey&&e.key===`ArrowUp`)t.extendSelectionFromFocused(-1);else if(n&&u!=null&&d>=0){let e=t.getVisibleRows(d,d)[0]??null,n=Wj(u,E.current,T.current);e==null||n==null?y=!1:It(e,u)}else if((e.ctrlKey||e.metaKey)&&Nj(e))t.toggleFocusedSelection();else if((e.ctrlKey||e.metaKey)&&e.key.toLowerCase()===`a`)t.selectAllVisiblePaths();else switch(e.key){case`ArrowDown`:t.focusNextItem();break;case`ArrowUp`:t.focusPreviousItem();break;case`ArrowRight`:m==null||m.isExpanded()?t.focusNextItem():m.expand();break;case`ArrowLeft`:m!=null&&m.isExpanded()?m.collapse():t.focusParentItem();break;case`Home`:t.focusFirstItem();break;case`End`:t.focusLastItem();break;default:y=!1}if(!y)return;Ee(`focus`);let b=t.getFocusedPath(),x=b!=null&&(Et.has(b)||a.has(b)),w=g&&b!==u,D=n&&c&&o===u&&b===u;if((h||D)&&b!=null&&(w&&x||D))Re(b,v?.scrollTop??null),j.current=!0,be(e=>e===b?e:b);else{let t=e.key===`ArrowUp`&&h&&b!==u;b!=null&&(t||_&&b===u)?(ze(b,qj(S.current,v,i,u,s,Tt,bt)),j.current=!0,be(e=>e===b?e:b)):Le()}_e(e=>e+1),e.preventDefault(),e.stopPropagation()};oj(()=>{if(f&&ct){if(Be.current){Be.current=!1;return}kA(w.current)}},[ct,f]),oj(()=>{let e=x.current;switch(RA({hasRenderedInput:e!=null,previousRenamingPath:M.current,renamingPath:ot})){case`reset`:M.current=null;return;case`reveal-canonical`:ot!=null&&Rt(ot,{restoreTreeFocus:!1,targetOffset:`live-overlay`});return;case`ignore`:return;case`focus-input`:e!=null&&(je.current=null,M.current=ot,kA(e),e.select());return}},[xt.end,xt.start,ot,Rt,Et]),oj(()=>{let e=S.current;if(e==null)return;let t=null,n=()=>{t!=null&&(clearTimeout(t),t=null)},r=()=>{let t=AA(e)?.dataset.itemPath??null;be(e=>e===t?e:t)},i=()=>{n(),j.current=!0,r()},a=i=>{let a=i.relatedTarget;if(a==null){n(),t=setTimeout(()=>{if(t=null,AA(e)!=null){r();return}j.current=!1,be(null)},0);return}if(!(a instanceof Node)||!e.contains(a)){n(),j.current=!1,be(null);return}let o=a instanceof HTMLElement?a.dataset.itemPath??null:null;be(e=>e===o?e:o)};return e.addEventListener(`focusin`,i),e.addEventListener(`focusout`,a),()=>{n(),e.removeEventListener(`focusin`,i),e.removeEventListener(`focusout`,a)}},[]),oj(()=>{let e=S.current;e!=null&&(L.physical.scrollTop<=0?e.dataset.scrollAtTop=`true`:delete e.dataset.scrollAtTop)},[L.physical.scrollTop]),oj(()=>{let e=null,n=C.current,r=b.current,i=S.current;if(n==null)return;O.current=jA(n,g);let a=()=>{let e=t.getVisibleCount(),r=MA(O.current,g),i=Math.max(0,e*s-r);n.scrollTop>i&&(n.scrollTop=i),Ke(bj({controller:t,itemHeight:s,overscan:c,scrollTop:Math.min(n.scrollTop,i),stickyFolders:h,viewportHeight:r}))};if(!A.current){A.current=!0;let e=t.getFocusedIndex();if(e>=0){let r=MA(O.current,g),i=t.getVisibleRows(e,e)[0]??null;PA(n,e,s,r,h&&i!=null?Math.max(0,Math.min(i.ancestorPaths.length*s,Math.max(0,r-s))):0)}}D.current=a;let o=t.subscribe(()=>{TA(ve)&&_e(e=>e+1),a()}),l=()=>{Ie.current!==!0&&(r!=null&&(r.dataset.isScrolling??=``),i!=null&&(i.dataset.isScrolling??=``),y.current=!0,e!=null&&clearTimeout(e),e=setTimeout(()=>{r!=null&&delete r.dataset.isScrolling,i!=null&&delete i.dataset.isScrolling,y.current=!1,Oe(e=>e+1),e=null},50))},u=null,d=()=>{i!=null&&delete i.dataset.overlayReveal,u!=null&&(clearTimeout(u),u=null)},f=()=>{i!=null&&Ie.current!==!0&&(n.scrollTop>0||(i.dataset.overlayReveal=`true`,u!=null&&clearTimeout(u),u=setTimeout(()=>{d()},200)))},p=()=>{if(a(),n.scrollTop>0&&d(),Ae.current!=null&&y.current&&Nt.current(),Ie.current===!0){y.current=!1;return}Se(e=>e==null?e:null),l()},m=()=>{l(),f()},_=new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`PageUp`,`PageDown`,`Home`,`End`,` `,`Spacebar`]),v=e=>{_.has(e.key)&&m()};n.addEventListener(`scroll`,p,{passive:!0}),n.addEventListener(`wheel`,m,{passive:!0}),n.addEventListener(`touchmove`,m,{passive:!0}),n.addEventListener(`keydown`,v);let x=typeof ResizeObserver<`u`?new ResizeObserver(e=>{O.current=(e[0]==null?null:NA(e[0]))??jA(n,g),a()}):null;return x?.observe(n),()=>{D.current=()=>{},o(),n.removeEventListener(`scroll`,p),n.removeEventListener(`wheel`,m),n.removeEventListener(`touchmove`,m),n.removeEventListener(`keydown`,v),e!=null&&clearTimeout(e),u!=null&&clearTimeout(u),r!=null&&delete r.dataset.isScrolling,i!=null&&(delete i.dataset.isScrolling,delete i.dataset.overlayReveal),y.current=!1,O.current=null,x?.disconnect()}},[t,g,s,c,h]),oj(()=>{Ye||N==null||Pt(!1)},[Pt,Ye,N]);let en=sj(()=>N==null?null:`${N.path}::${N.source}`,[N]);oj(()=>{if(en==null){m?.clearSlotContent(iw);return}let t=Ae.current;if(t==null)return;let n=v.current??_.current;if(n==null)return;let r={anchorElement:n,anchorRect:t.anchorRect??Bj(n.getBoundingClientRect()),close:e=>{Nt.current(e?.restoreFocus??!0)},restoreFocus:()=>{Mt.current&&jt.current(Ae.current?.path??null)}},i=e?.contextMenu?.render?.(t.item,r)??null;return m?.setSlotContent(iw,i),e?.contextMenu?.onOpen?.(t.item,r),$j(i),queueMicrotask(()=>{i!=null&&i.isConnected&&document.activeElement===i&&$j(i)}),()=>{m?.clearSlotContent(iw)}},[en,e?.contextMenu,m]),oj(()=>{N!=null&&t.getItem(N.path)==null&&Pt()},[Pt,N,t]),oj(()=>{if(N==null)return;let e=S.current?.getRootNode(),t=e instanceof ShadowRoot?e.host:S.current,n=e=>{let n=e.target;n instanceof Node&&(zj(e)||_.current?.contains(n)!==!0&&t?.contains(n)!==!0&&Pt())},r=e=>{e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),Pt())};return document.addEventListener(`mousedown`,n,!0),document.addEventListener(`keydown`,r,!0),()=>{document.removeEventListener(`mousedown`,n,!0),document.removeEventListener(`keydown`,r,!0)}},[Pt,N]),oj(()=>{let e=C.current,n=S.current;if(e==null||n==null){te.current=F;return}let r=F==null?null:T.current.get(F)??null,i=AA(n),a=i?.dataset.itemPath??null,o=st&&x.current===i,c=f&&w.current===i,l=ne.current&&!ct,u=re.current??0,d=je.current,p=Me.current,m=Ne.current,g=Pe.current,_=i!=null,v=j.current||_,y=te.current!==F,b=p!=null&&p===F&&F!=null,E=!1,O=!1;if(ut!=null&&ut.id!==k.current){k.current=ut.id;let n=ut.visibleIndex,r=t.getVisibleRows(n,n)[0]??null;if(r!=null){let t=h?Math.max(0,Math.min(r.ancestorPaths.length*s,Math.max(0,bt-s))):Tt;E=!0,O=FA(e,n,s,bt,wt,ut.offset,t)}t.clearScrollRequest(ut.id)}let A=!E&&l&&IA(e,I,s,bt,wt,u),ee=!E&&d!=null&&d===F&&IA(e,I,s,bt,wt,Tt),M=!E&&m!=null&&m.path===F&&IA(e,I,s,bt,wt,m.viewportOffset),ie=!E&&g!=null&&g.path===F&&e.scrollTop!==g.scrollTop;if(ie&&(e.scrollTop=g.scrollTop),(ie||O||ee||M||A||v&&y&&d!==F&&!b&&PA(e,I,s,bt,Tt))&&D.current(),E){te.current=F;return}if(!v){te.current=F;return}if(o){te.current=F;return}if(c&&!l){te.current=F;return}if(r==null){l&&I>=0&&(IA(e,I,s,bt,wt,u),D.current()),te.current=F;return}(y||l||d===F||p===F||m?.path===F||g?.path===F||a==null||a!==F)&&(kA(r),d===F&&(je.current=null),p===F&&(Me.current=null),m?.path===F&&(Ne.current=null),g?.path===F&&(Pe.current=null),ne.current=!1,re.current=null),te.current=F},[t,I,F,Dt,s,st,ct,xt,bt,f,ut,h,Tt,wt,yt]);let tn=I>=0&&I>=L.visible.startIndex&&I<=L.visible.endIndex,nn=F!=null&&St.some(e=>_j(e.row)===F),rn=tn||nn,an=Ze&&j.current===!0&&rn?F:null,on=Te===`pointer`?xe:null,sn=N?.path??Fe.current??on??an??xe,cn=N?.source===`right-click`;oj(()=>{y.current&&N==null||Ft(P(sn))},[N,P,xt,bt,De,St,sn,Ft,yt]);let z=cj(e=>{if(y.current||zj(e))return;let t=e.target;if(!(t instanceof HTMLElement)||t.closest?.(`[data-type="context-menu-trigger"]`)!=null)return;let n=t.closest?.(`[data-file-tree-sticky-row="true"]`),r=t.closest?.(`[data-type="item"]`),i=n instanceof HTMLElement?n.dataset.fileTreeStickyPath??null:r instanceof HTMLElement?r.dataset.itemPath??null:null;i!=null&&Ee(e=>e===`pointer`?e:`pointer`),Se(e=>e===i?e:i)},[]),ln=cj(()=>{Se(null)},[]);oj(()=>{if(!dt)return;let e=()=>{Gt(),t.cancelDrag()};return window.addEventListener(`dragend`,e),()=>{window.removeEventListener(`dragend`,e),Gt(),t.cancelDrag()}},[t,dt]);let un=e=>{if(!dt||t.getDragSession()==null||de.current)return;let n=Ej(e.target instanceof HTMLElement?e.target:null);t.setDragTarget(n),qt(t.getDragSession()?.target??null),Yt(e.clientX,e.clientY),e.dataTransfer!=null&&(e.dataTransfer.dropEffect=`move`),e.preventDefault()},dn=e=>{if(!dt||t.getDragSession()==null||de.current)return;let n=e.relatedTarget;n instanceof Node&&S.current?.contains(n)===!0||(R(),Ut(),t.setDragTarget(null))},fn=e=>{dt&&t.getDragSession()!=null&&!de.current&&(e.preventDefault(),Kt(e.clientX,e.clientY),t.completeDrag(),Ht(),R(),Ut(),le.current=null)},pn=L.window.height,mn=L.window.offsetTop,hn=Math.min(0,bt-pn),gn=Math.min(0,bt-pn-Tt),_n=ye===F||ne.current,vn=F!=null&&_n&&!Dt&&I>=0?yt[I]??t.getVisibleRows(I,I)[0]??null:null,yn=vn==null?null:LA(I,s,xt,pn),bn=le.current,xn=ht!=null&&bn!=null&&bn.path===ht&&bn.index>=xt.start&&bn.index<=xt.end,Sn=ht!=null&&bn!=null&&bn.path===ht&&!xn&&bn.path!==vn?.path?bn:null,Cn=Sn==null?null:LA(Sn.index,s,xt,pn),wn=Fj((I>=0?yt[I]??t.getVisibleRows(I,I)[0]??null:null)?.ancestorPaths.at(-1)??null),Tn=ct&&F!=null?Xj(o,F,!Dt):void 0,En=N?.path??(ct?F:ye),Dn=N?.path??xe,On=P(sn),kn=Ye&&Ze&&!cn&&!st&&On!=null&&Ce!=null&&sn!=null,An=Ye&&(kn||N!=null),jn=N?.anchorRect,Mn=jn==null&&On!=null&&Ce!=null&&(N!=null||kn)?Ce:null,Nn=jn==null?Mn==null?void 0:{top:`${Mn}px`}:{left:`${jn.left}px`,position:`fixed`,right:`auto`,top:`${jn.top}px`},Pn=cn?{opacity:`0`}:void 0,Fn=cj((e,n,r,i)=>{let a=VA({event:{ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey},isDirectory:n.kind===`directory`,isSearchOpen:ct,mode:i}),o=a.toggleDirectory&&n.kind===`directory`,s=o?t.resolveMountedDirectoryPathFromInput(r):null;if(o&&s==null)return;let c=s??r;switch(a.selection.kind){case`range`:t.selectPathRange(c,a.selection.additive);break;case`toggle`:t.togglePathSelectionFromInput(c);break;case`single`:t.selectOnlyMountedPathFromInput(c)}let l=e.currentTarget instanceof HTMLElement?e.currentTarget:null,u=n.index>=L.visible.startIndex&&n.index<=L.visible.endIndex,d=i===`flow`&&u&&l!=null&&l.dataset.itemParked!==`true`;t.focusMountedPathFromInput(c),d&&(j.current=!0,be(e=>e===c?e:c),Ee(`focus`)),o&&t.toggleMountedDirectoryFromInput(c),a.closeSearch&&t.closeSearch(),a.revealCanonical&&Rt(c,{targetOffset:`sticky-parents`})},[t,ct,L.visible.endIndex,L.visible.startIndex,Rt]),In=()=>{if(y.current||!Ze||sn==null||On==null)return;let e=t.getItem(sn);e!=null&&(Ft(On),Mt.current=!0,ke({anchorRect:null,item:{kind:e.isDirectory()?`directory`:`file`,name:On.getAttribute(`aria-label`)??sn,path:e.getPath()},path:e.getPath(),source:`button`}))},Ln={contextHoverPath:Dn,contextMenuButtonTriggerEnabled:Ze,contextMenuButtonVisibility:Qe,contextMenuEnabled:Ye,contextMenuRightClickEnabled:$e,contextMenuTriggerMode:Xe,controller:t,directoriesWithGitChanges:i,dragAndDropEnabled:dt,draggedPathSet:pt,dragTarget:mt,gitLaneActive:rt,gitStatusByPath:n,handleRowDragEnd:Zt,handleRowDragStart:Xt,handleRowTouchStart:Qt,ignoredGitDirectories:r,ignoredInheritanceCache:ge,instanceId:o,itemHeight:s,onKeyDown:$t,onRowClick:Fn,openContextMenuForRow:It,registerButton:et,registerRenameInput:nt,renameView:at,renderDecorationForRow:Ot,resolveIcon:it,shouldSuppressContextMenu:zt,visualFocusPath:En},Rn={...Ln,registerButton:tt};return Q(`div`,{ref:S,id:gt,"data-file-tree-context-menu-button-visibility":Ye&&Ze?Qe:void 0,"data-file-tree-context-menu-trigger-mode":Ye?Xe:void 0,"data-file-tree-has-context-menu-action-lane":Ye&&Ze?`true`:void 0,"data-file-tree-has-git-lane":rt?`true`:void 0,"data-file-tree-virtualized-root":`true`,onDragLeave:dt?dn:void 0,onDragOver:dt?un:void 0,onDrop:dt?fn:void 0,onKeyDown:$t,onPointerLeave:Ye?ln:void 0,onPointerOver:Ye?z:void 0,role:`tree`,tabIndex:-1,style:{outline:`none`,position:`relative`},children:[Q(`style`,{"data-file-tree-guide-style":`true`,dangerouslySetInnerHTML:{__html:wn}}),Q(`slot`,{name:rw,"data-type":`header-slot`}),f?Q(`div`,{"data-file-tree-search-container":!0,"data-open":ct?`true`:`false`,children:Q(`input`,{ref:w,"aria-activedescendant":Tn,"aria-controls":gt,placeholder:`Search…`,"data-file-tree-search-input":!0,"data-file-tree-search-input-fake-focus":Ve?`true`:void 0,value:lt,onBlur:()=>{(d!==`retain`||Ue.current)&&t.closeSearch()},onFocus:We,onPointerDown:We,onInput:e=>{We();let n=e.currentTarget;t.setSearch(n.value)}})}):null,Q(`div`,{ref:C,"data-file-tree-virtualized-scroll":`true`,children:[h&&qe&&St.length>0?Q(`div`,{"aria-hidden":`true`,"data-file-tree-sticky-overlay":`true`,children:Q(`div`,{"data-file-tree-sticky-overlay-content":`true`,style:{height:`${_t}px`},children:St.map((e,t)=>tM(Rn,e.row,`sticky:${_j(e.row)}`,{mode:`sticky`,style:{left:`0`,position:`absolute`,right:`0`,top:`${e.top}px`,zIndex:`${St.length-t}`}}))})}):null,Q(`div`,{ref:b,"data-file-tree-virtualized-list":`true`,style:{height:`${wt}px`},children:[Q(`div`,{"data-file-tree-virtualized-sticky-offset":`true`,"aria-hidden":`true`,style:{height:`${mn}px`}}),Q(`div`,{"data-file-tree-virtualized-sticky":`true`,style:{height:`${pn}px`,top:`${hn}px`,bottom:`${gn}px`},children:[nM(Ln,xt,Et),vn!=null&&yn!=null?tM(Ln,vn,`parked:${vn.path}`,{isParked:!0,style:{left:`0`,opacity:`0`,pointerEvents:ht===vn.path?`none`:void 0,position:`absolute`,right:`0`,top:`${yn}px`}}):null,Sn!=null&&Cn!=null?tM(Ln,Sn,`parked-drag:${Sn.path}`,{isParked:!0,style:{left:`0`,opacity:`0`,pointerEvents:`none`,position:`absolute`,right:`0`,top:`${Cn}px`}}):null]})]})]}),Ye?Q(`div`,{ref:_,"data-type":`context-menu-anchor`,"data-visible":An?`true`:`false`,style:Nn,children:[Q(`button`,{ref:v,type:`button`,"data-type":aw,"aria-label":`Options`,"aria-haspopup":`menu`,"aria-expanded":N==null?`false`:`true`,"data-visible":kn?`true`:`false`,onMouseDown:e=>{e.preventDefault()},onClick:e=>{if(e.preventDefault(),e.stopPropagation(),N!=null){Pt();return}In()},tabIndex:-1,style:Pn,children:Q(Jk,{...it(`file-tree-icon-ellipsis`)})}),N==null?null:Q(`slot`,{name:iw})]}):null,N==null?null:Q(`div`,{"data-type":`context-menu-wash`,"aria-hidden":`true`,onMouseDownCapture:e=>{e.preventDefault(),Pt()},onTouchStartCapture:e=>{e.preventDefault(),e.stopPropagation(),Pt()},onTouchMoveCapture:e=>{e.preventDefault(),e.stopPropagation()},onWheelCapture:e=>{e.preventDefault(),e.stopPropagation()}})]})}var iM={hydrateRoot:(e,t)=>{Uk(yk(rM,t),e)},renderRoot:(e,t)=>{Hk(yk(rM,t),e)},unmountRoot:e=>{Hk(null,e)}};function aM(e,t){iM.renderRoot(e,t)}function oM(e,t){iM.hydrateRoot(e,t)}function sM(e){iM.unmountRoot(e)}var cM=class{#e=new Map;#t=null;clearAll(){for(let e of this.#e.values())e.remove();this.#e.clear()}clearSlotContent(e){let t=this.#n(e);t!=null&&(t.remove(),this.#e.delete(e))}setHost(e){if(this.#t=e,e!=null){this.#i(e);for(let[e,t]of this.#e)this.#r(e,t)}}setSlotContent(e,t){let n=this.#n(e);if(n===t){t!=null&&(this.#e.set(e,t),this.#r(e,t));return}if(n?.remove(),t==null){this.#e.delete(e);return}this.#e.set(e,t),this.#r(e,t)}setSlotHtml(e,t){let n=t?.trim()??``;if(n.length===0){this.setSlotContent(e,null);return}let r=this.#n(e);if(r!=null&&r.innerHTML===n){this.#e.set(e,r),this.#r(e,r);return}let i=document.createElement(`div`);i.innerHTML=n,this.setSlotContent(e,i)}#n(e){let t=this.#e.get(e)??null;if(t!=null)return t;let n=this.#t;if(n==null)return null;for(let t of Array.from(n.children))if(t instanceof HTMLElement&&t.dataset.fileTreeManagedSlot===e)return t;return null}#r(e,t){t.slot=e,t.dataset.fileTreeManagedSlot=e,this.#t!=null&&t.parentNode!==this.#t&&this.#t.appendChild(t)}#i(e){for(let t of Array.from(e.children)){if(!(t instanceof HTMLElement))continue;let e=t.dataset.fileTreeManagedSlot;e==null||this.#e.has(e)||this.#e.set(e,t)}}};function lM(e,t,n){if(!e.s){if(n instanceof uM){if(!n.s)return void(n.o=lM.bind(null,e,t));1&t&&(t=n.s),n=n.v}if(n&&n.then)return void n.then(lM.bind(null,e,t),lM.bind(null,e,2));e.s=t,e.v=n;let r=e.o;r&&r(e)}}var uM=function(){function e(){}return e.prototype.then=function(t,n){var r=new e,i=this.s;if(i){var a=1&i?t:n;if(a){try{lM(r,1,a(this.v))}catch(e){lM(r,2,e)}return r}return this}return this.o=function(e){try{var i=e.v;1&e.s?lM(r,1,t?t(i):i):n?lM(r,1,n(i)):lM(r,2,i)}catch(e){lM(r,2,e)}},r},e}();Array.isArray;var dM=0;function fM(e){return e!=null&&e.length>0?e:(dM+=1,`pst_ft_${dM}`)}function pM({initialVisibleRowCount:e,itemHeight:t}){return e==null?420:Math.max(0,e)*(t??qD)}function mM(e){if(typeof document>`u`)return;let t=document.createElement(`div`);t.innerHTML=e;let n=t.querySelector(`svg`);return n instanceof SVGElement?n:void 0}function hM(e){return e.querySelector(`#file-tree-icon-chevron`)instanceof SVGElement&&e.querySelector(`#file-tree-icon-file`)instanceof SVGElement&&e.querySelector(`#file-tree-icon-dot`)instanceof SVGElement&&e.querySelector(`#file-tree-icon-lock`)instanceof SVGElement}function gM(e){return Array.from(e.children).filter(e=>e instanceof SVGElement)}var _M=class{static LoadedCustomComponent=!0;#e;#t;#n;#r;#i;#a;#o;#s;#c;#l=new cM;#u;#d;#f;#p;#m;#h;#g;#_;#v;#y=null;#b;#x=!1;#S=!1;constructor(e){let{composition:t,density:n,fileTreeSearchMode:r,gitStatus:i,id:a,initialSearchQuery:o,icons:s,itemHeight:c,onSearchChange:l,onSelectionChange:u,overscan:d,renderRowDecoration:f,renaming:p,search:m,searchBlurBehavior:h,searchFakeFocus:g,stickyFolders:_,unsafeCSS:v,initialVisibleRowCount:y,...b}=e;this.#e=t,this.#n=fM(a),this.#p=YO(i),this.#m=s,this.#h=v,this.#r=u,this.#i=f,this.#a=p!=null&&p!==!1,this.#o=h,this.#s=m===!0,this.#c=g===!0,this.#u=KD(n,c),this.#d={itemHeight:this.#u.itemHeight,overscan:d,stickyFolders:_,initialVisibleRowCount:y},this.#t=new WO({...b,fileTreeSearchMode:r,initialSearchQuery:o,onSearchChange:l,renaming:p}),this.#v=this.#t.getSelectionVersion(),this.#y=this.#r==null?null:this.subscribe(()=>{this.#D()})}unmount(){this.#b!=null&&(sM(this.#b),delete this.#b.dataset.fileTreeVirtualizedWrapper,this.#b=void 0),this.#l.clearAll(),this.#l.setHost(null),this.#f!=null&&(delete this.#f.dataset.fileTreeVirtualized,this.#I(this.#f),this.#f=void 0)}cleanUp(){this.unmount(),this.#y?.(),this.#y=null,this.#t.destroy()}getFileTreeContainer(){return this.#f}getItem(e){return this.#t.getItem(e)}getFocusedItem(){return this.#t.getFocusedItem()}getFocusedPath(){return this.#t.getFocusedPath()}getFocusedIndex(){return this.#t.getFocusedIndex()}getVisibleCount(){return this.#t.getVisibleCount()}getVisibleRows(e,t){return this.#t.getVisibleRows(e,t)}getSelectedPaths(){return this.#t.getSelectedPaths()}getComposition(){return this.#e}getItemHeight(){return this.#u.itemHeight}getDensityFactor(){return this.#u.factor}subscribe(e){let t=!1;return this.#t.subscribe(()=>{if(!t){t=!0;return}e()})}focusPath(e){this.#t.focusPath(e)}focusFirstItem(){this.#t.focusFirstItem()}focusLastItem(){this.#t.focusLastItem()}focusNextItem(){this.#t.focusNextItem()}focusPreviousItem(){this.#t.focusPreviousItem()}focusParentItem(){this.#t.focusParentItem()}scrollToPath(e,t){this.#t.scrollToPath(e,t)}focusNearestPath(e){return this.#t.focusNearestPath(e)}add(e){this.#t.add(e)}batch(e){this.#t.batch(e)}applyGitStatusPatch(e){let t=XO(this.#p,e);if(t===this.#p)return;this.#p=t;let n=this.#T();n!=null&&aM(n.wrapper,this.#w())}move(e,t,n){this.#t.move(e,t,n)}onMutation(e,t){return this.#t.onMutation(e,t)}setSearch(e){this.#t.setSearch(e)}openSearch(e){this.#t.openSearch(e)}closeSearch(){this.#t.closeSearch()}isSearchOpen(){return this.#t.isSearchOpen()}getSearchValue(){return this.#t.getSearchValue()}getSearchMatchingPaths(){return this.#t.getSearchMatchingPaths()}focusNextSearchMatch(){this.#t.focusNextSearchMatch()}focusPreviousSearchMatch(){this.#t.focusPreviousSearchMatch()}startRenaming(e,t){return this.#t.startRenaming(e,t)}remove(e,t){this.#t.remove(e,t)}resetPaths(e,t){Array.isArray(e)?this.#t.resetPaths(e,t):this.#t.resetPaths(e)}setComposition(e){this.#e=e;let t=this.#T();t!=null&&(this.#O(),aM(t.wrapper,this.#w()))}setGitStatus(e){let t=YO(e,this.#p);if(t===this.#p)return;this.#p=t;let n=this.#T();n!=null&&aM(n.wrapper,this.#w())}setIcons(e){this.#m=e;let t=this.#T();t!=null&&(this.#E(t.host,t.wrapper),aM(t.wrapper,this.#w()))}hydrate({fileTreeContainer:e}){let t=this.#P(e),n=this.#N(t);this.#O(),oM(n,this.#w())}render({containerWrapper:e,fileTreeContainer:t}){let n=this.#P(t??this.#f,e),r=this.#N(n);this.#O(),aM(r,this.#w())}#C(){return{initialViewportHeight:pM({initialVisibleRowCount:this.#d.initialVisibleRowCount,itemHeight:this.#d.itemHeight}),itemHeight:this.#d.itemHeight,overscan:this.#d.overscan,stickyFolders:this.#d.stickyFolders}}#w(){return{composition:this.#e,controller:this.#t,gitStatusByPath:this.#p?.statusByPath,ignoredGitDirectories:this.#p?.ignoredDirectoryPaths,directoriesWithGitChanges:this.#p?.directoriesWithChanges,icons:this.#m,instanceId:this.#n,renamingEnabled:this.#a,renderRowDecoration:this.#i,searchBlurBehavior:this.#o,searchEnabled:this.#s,searchFakeFocus:this.#c,slotHost:this.#l,...this.#C()}}#T(){let e=this.#f,t=this.#b;return e==null||t==null?null:{host:e,wrapper:t}}#E(e,t){let n=e.shadowRoot;n!=null&&(this.#k(n),this.#A(n)),this.#j(t)}#D(){let e=this.#r;if(e==null)return;let t=this.#t.getSelectionVersion();t!==this.#v&&(this.#v=t,e(this.#t.getSelectedPaths()))}#O(){let e=this.#e?.header?.render;if(e!=null){this.#l.setSlotContent(rw,e());return}this.#l.setSlotHtml(rw,this.#e?.header?.html??null)}#k(e){let t=gM(e).find(e=>hM(e)),n=mM(qC(sw(this.#m).set));n!=null&&(t==null||t.outerHTML!==n.outerHTML)&&(t==null?e.prepend(n):t.replaceWith(n))}#A(e){let t=gM(e),n=t.find(e=>hM(e)),r=t.filter(e=>e!==n),i=sw(this.#m).spriteSheet?.trim()??``;if(i.length===0){for(let e of r)e.remove();return}let a=mM(i);if(a==null){for(let e of r)e.remove();return}if(r.length!==1||r[0].outerHTML!==a.outerHTML){for(let e of r)e.remove();e.appendChild(a)}}#j(e){let t=sw(this.#m);t.colored&&YC(t.set)?e.dataset.fileTreeColoredIcons=`true`:delete e.dataset.fileTreeColoredIcons}#M(e){let t=e.querySelector(`style[${$C}]`);if(this.#g==null&&t instanceof HTMLStyleElement&&(this.#g=t),this.#h==null||this.#h===``){this.#g?.remove(),this.#g=void 0,this.#_=void 0;return}(this.#g?.parentNode!==e||this.#_!==this.#h)&&(this.#g??=document.createElement(`style`),this.#g.setAttribute($C,``),this.#g.parentNode!==e&&e.appendChild(this.#g),this.#g.textContent=ZD(this.#h),this.#_=this.#h)}#N(e){if(this.#b!=null)return this.#b;let t=e.shadowRoot;if(t==null)throw Error(`FileTree requires a shadow root`);let n=Array.from(t.children).filter(e=>e instanceof HTMLDivElement&&typeof e.dataset.fileTreeId==`string`&&e.dataset.fileTreeId.length>0),r=n.find(e=>e.dataset.fileTreeId===this.#n)??n[0];return r!=null&&(this.#n=r.dataset.fileTreeId??this.#n),this.#b=r??document.createElement(`div`),this.#b.dataset.fileTreeId=this.#n,this.#b.dataset.fileTreeVirtualizedWrapper=`true`,this.#E(e,this.#b),this.#b.parentNode!==t&&t.appendChild(this.#b),this.#b}#P(e,t){let n=e??this.#f??document.createElement(`file-tree-container`);t!=null&&n.parentNode!==t&&t.appendChild(n);let r=n.shadowRoot??n.attachShadow({mode:`open`});return rO(n,r),this.#M(r),n.dataset.fileTreeVirtualized=`true`,n.style.display=`flex`,this.#F(n),this.#l.setHost(n),this.#f=n,n}#F(e){e.style.getPropertyValue(`--trees-item-height`)===``&&(e.style.setProperty(`--trees-item-height`,`${String(this.#u.itemHeight)}px`),this.#x=!0),e.style.getPropertyValue(`--trees-density-override`)===``&&(e.style.setProperty(`--trees-density-override`,String(this.#u.factor)),this.#S=!0)}#I(e){this.#x&&=(e.style.removeProperty(`--trees-item-height`),!1),this.#S&&=(e.style.removeProperty(`--trees-density-override`),!1)}};function vM(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(yM(i))}return e=>!n.some(t=>t(e))&&t.every(t=>t(e))}function yM(e){if(!/[*?]/.test(e))return t=>ze(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=>ze(e,t)}}function bM(e){let t=new Set;for(let n of e)for(let e=n.indexOf(`/`);e!==-1;e=n.indexOf(`/`,e+1))t.add(n.slice(0,e+1));return t}function xM(e){let t=e.lastIndexOf(`/`,e.length-2);return t===-1?``:e.slice(0,t+1)}function SM(e,t){let n=new Set(e),r=new Set(t),i=bM(t),a=new Set([...bM(e)].filter(e=>!i.has(e))),o=[];for(let e of a)a.has(xM(e))||o.push({type:`remove`,path:e,recursive:!0});for(let t of e)!r.has(t)&&!a.has(xM(t))&&o.push({type:`remove`,path:t});for(let e of t)n.has(e)||o.push({type:`add`,path:e});return o}var CM=`_lz _o`,wM=te,TM=(e=>`/${e}&`)(ee);function EM(e){A(e.a,ne)}var DM=(e,t)=>ge(e.a,t),OM=(e,t)=>j(e.a,t),kM=(e=>`<label>${e}<input type=search placeholder="Filter files…" aria-label="Filter files"></label>`)(wM),AM=(e=>` D/${e}& l`)(TM),jM=o(21,e=>E(e,`c`,e.o,XM(e))),MM=D(14,jM),NM=o(13,e=>MM(e,(e.m??e.k)||``)),PM=D(20,jM),FM=o(19,e=>PM(e,ZM(e))),IM=D(18,FM),LM=o(17,e=>IM(e,QM(e)),2),RM=f(10,e=>{NM(e),LM(e)}),zM=o(7,e=>RM(e,e.f,e.g)),BM=D(5,zM),VM=D(6,zM),HM=u(12,e=>{NM(e),LM(e)}),UM=(e,t)=>KM(e,t.timer),WM=v(`t4`,e=>{x(e,`c`),k(e.c,`keydown`,function(t){t.key===`Enter`&&(e.s(),e.i?.()),t.key===`Escape`&&(e.o?(t.preventDefault(),e.u(``)):e.i&&(t.preventDefault(),e.i()))}),k(e.c,`blur`,function(){e.i&&(e.s(),e.i())})});function GM(e){y(e.a,[`_bl`,`_ly`]),EM(e.b),DM(e.b,14),OM(e.b,`_bm`),y(e.c,[`_bn`,CM]),HM(e,null),UM(e,{timer:0}),WM(e)}var KM=D(16,e=>{LM(e),FM(e)}),qM=v(`t3`,e=>g(e,{onMount:function(){e.j&&e.c.focus()}})),JM=D(9,qM),YM=D(8),XM=e=>function(t){e.u(t)},ZM=e=>t=>{if(e.q&&clearTimeout(e.q),!t){e.q=0,HM(e,null),RM(e,``);return}HM(e,t),e.q=setTimeout(e.s,150)},QM=e=>()=>{e.q&&=(clearTimeout(e.q),0);let t=e.m===null?e.k||``:e.m;HM(e,null),RM(e,t)};l.t0=XM,l.t2=ZM,l.t1=QM;var $M=new Set([`/`,`.`,`-`,`_`,` `]);function eN(e,t){if(t===0)return!0;let n=e[t-1];if($M.has(n))return!0;let r=e[t];return r!==r.toLowerCase()&&n===n.toLowerCase()}function tN(e,t,n){let r=0;for(let i=0;i<t.length;i++){let a=t[i];r+=1,eN(e,a)&&(r+=8),i&&t[i-1]===a-1?r+=6:i&&(r-=Math.min(4,a-t[i-1]-1)),a>=n&&(r+=3),a===n&&(r+=6)}return r}function nN(e,t,n){let r=0,i=-1;for(let a=n;a<t.length;a++)if(t[a]===e[r]&&++r===e.length){i=a;break}if(i<0)return null;let a=[];r=e.length-1;for(let o=i;o>=n&&r>=0;o--)t[o]===e[r]&&(a.push(o),r--);return a.reverse()}function rN(e,t,n,r){let i=[],a=r;for(let r=0;r<e.length;r++){let o=i[i.length-1];if(o!=null&&n[o+1]===e[r]){i.push(o+1);continue}let s=a;for(;s<n.length&&!(n[s]===e[r]&&eN(t,s));)s++;if(s>=n.length)return null;i.push(s),a=s+1}return i}function iN(e,t,n,r,i){let a=nN(e,n,r);if(!a)return null;let o=rN(e,t,n,r),s=tN(t,a,i),c=o?tN(t,o,i):-1/0;return c>s?{score:c,hits:o}:{score:s,hits:a}}function aN(e,t,n,r){for(let i=t.indexOf(n,r);i!==-1;i=t.indexOf(n,i+1))if(eN(e,i))return!0;return!1}function oN(e,t){let n=e.split(/\s+/).filter(Boolean);if(!n.length)return{score:0,hits:[]};let r=t.toLowerCase(),i=t.lastIndexOf(`/`)+1,a=0,o=new Set;for(let e of n){let n=e.toLowerCase(),s=iN(n,t,r,i,i),c=s??iN(n,t,r,0,i);if(!c)return null;s&&aN(t,r,n,i)&&(a+=20),r.slice(i)===n&&(a+=30),a+=c.score;for(let e of c.hits)o.add(e)}return a-=t.length/100,{score:a,hits:[...o].sort((e,t)=>e-t)}}function sN(e){let t=e.match(/^(.*?):(\d+)(?::\d+)?\s*$/);return t?{query:t[1],line:Number(t[2])}:{query:e,line:0}}function cN(e,t,n,r){let i=[];for(let r of e){let e=oN(n,t(r));e&&i.push({item:r,match:e})}return i.sort((e,n)=>n.match.score-e.match.score||t(e.item).localeCompare(t(n.item))),i.slice(0,r)}var lN=`_kp _9 _M`,uN=Pe,dN=(e=>`/${e}&`)(` b`),fN=60;function pN(e,t,n,r){let i=[],a=new Set(t);for(let t=n;t<r;t++){let n=a.has(t),r=i[i.length-1];r&&r.hit===n?r.text+=e[t]:i.push({text:e[t],hit:n})}return i}var mN=s(0,1,e=>c(e.a,e._.e)),hN=mN,gN=s(0,0,e=>c(e.b,e._.e)),_N=h(0,`<mark> </mark>`,` D `,e=>{gN._(e),y(e.a,`_kn`)},` `,` `,hN),vN=(e,t)=>_N(e,+!t),yN=(e,t)=>{vN(e,t[0]?.hit),bN(e,t[0]?.text)},bN=D(4,e=>{gN(e),mN(e)}),xN=s(0,1,e=>c(e.a,e._.e)),SN=xN,CN=s(0,0,e=>c(e.b,e._.e)),wN=h(0,`<mark> </mark>`,` D `,e=>{CN._(e),y(e.a,`_kn`)},` `,` `,SN),TN=(e,t)=>wN(e,+!t),EN=(e,t)=>{TN(e,t[0]?.hit),DN(e,t[0]?.text)},DN=D(4,e=>{CN(e),xN(e)}),ON=e=>y(e.a,i),kN=s(5,0,e=>c(e.b,e._.n)),AN=e=>{kN._(e),y(e.a,lN)},jN=b(34,e=>c(e.b,e._._._._.u),e=>e._._._._),MN=e=>{jN(e),y(e.a,`_ko`)},NN=o(2,e=>c(e.b,e._._._.l?`Loading files…`:e._._._.s?`No file matches “${d(e._._._.s)}”.`:`Type part of a file's name. Add :42 to open it at line 42.`)),PN=b(29,NN,e=>e._._._),FN=e=>{PN(e),IN(e),y(e.a,`_df`)},IN=b(33,NN,e=>e._._._),LN=b(28,e=>c(e.b,e._._._._.k),e=>e._._._._),RN=h(0,`<li role=presentation>Recently opened</li>`,` `,ON,`<li role=presentation> </li>`,` D `,e=>{LN(e),y(e.a,i)}),zN=o(17,e=>RN(e,!e._._._.s&&e.o===0?0:e.j&&(e.o===0||!e._._._.v[e.o-1].more)?1:2),3),BN=b(33,zN,e=>e._._._),VN=v(`J4`,e=>{k(e.c,`mousemove`,function(){e._._._.p!==e.o&&OP(e._._._,e.o)}),k(e.c,`click`,function(){e._._._.a1(e.o)})}),HN=e=>{BN(e),GN(e),KN(e),JN(e),y(e.d,`_kl`),y(e.e,`_km`),VN(e)},UN=h(6,`<span>:<!></span>`,` Db%`,MN),WN=o(16,e=>UN(e,e._._._.u&&e.o===e._._._.y?0:1),2),GN=b(34,WN,e=>e._._._),KN=b(35,zN,e=>e._._._),qN=o(15,e=>{C(e.b,`aria-selected`,e.o===e._._._.y?`true`:`false`),y(e.c,[`_da`,e.o===e._._._.y&&`_c_`])}),JN=b(37,e=>{qN(e),WN(e)},e=>e._._._),YN=D(9,zN),XN=D(14,e=>{zN(e),qN(e),WN(e)}),ZN=m(3,`<!><!><!>`,`b%`,0,EN),QN=m(4,`<!><!><!>`,`b%`,0,yN),$N=o(20,e=>{ZN(e,[pN(e.s,e.m,e.t,e.s?.length)]),QN(e,[pN(e.s,e.m,0,Math.max(0,e.t-1))])},2),eP=D(19,$N),tP=D(18,e=>{C(e.c,`title`,e.s),eP(e,e.s.lastIndexOf(`/`)+1),$N(e)}),nP=D(12,$N),rP=h(5,`<span> </span>`,` D `,AN),iP=D(13,e=>{rP(e,+!e.n),kN(e)}),aP=(e,t)=>{YN(e,t[0]?.more),tP(e,t[0]?.item?.path),iP(e,t[0]?.item?.hint),nP(e,t[0]?.hits),XN(e,t[1])},oP=b(31,e=>E(e,`c`,e._._.o,YP(e)),e=>e._._),sP=v(`J6`,e=>{x(e,`c`),k(e.d,`click`,function(){e._._.z()})}),cP=e=>{oP(e),lP(e),dP(e),mP(e),y(e.a,`_c5`),fe(e.b),de(e.b,14),pe(e.b),y(e.c,a),y(e.d,[he,`_c7`]),ye(e.e),me(e.e,16),re(e.e),y(e.f,`_c8`),sP(e)},lP=b(32,e=>{C(e.c,`aria-controls`,e._._.q),C(e.f,`id`,e._._.q)},e=>e._._),uP=m(5,`<!><!><li role=option><button type=button><span></span><span></span><!><!></button></li>`,`b%b D D b b%b%`,HN,aP),dP=b(35,e=>uP(e,[e._._.v,e=>`${e.more?`+`:``}${e.item.key}`]),e=>e._._),fP=h(6,`<p> </p>`,` D `,FN),pP=v(`J5`,e=>k(e.c,`keydown`,function(t){if(t.key===`ArrowDown`||t.key===`ArrowUp`){t.preventDefault();let n=e._._.w;n&&OP(e._._,(e._._.y+(t.key===`ArrowDown`?1:-1)+n)%n)}else t.key===`Enter`&&(t.preventDefault(),e._._.a1(e._._.y))})),mP=b(36,e=>{fP(e,+!!e._._.w),pP(e)},e=>e._._),hP=h(0,((e,t)=>`<div>${e}<input type=search autofocus autocomplete=off placeholder="Go to file (name:42 for a line)" aria-label="Go to file" role=combobox aria-expanded=true><button type=button title=Close aria-label=Close>${t}</button></div><ul role=listbox></ul><!><!>`)(ue,oe),((e,t)=>` D/${e}& b D/${t}&m b%c`)(ae,ve),cP),gP=b(30,e=>hP(e,+!e._.m)),_P=_(`J7`,`<!><!><!>`,`b%`,gP),vP=O(gP),yP=f(12,e=>{je(e.a,e.m),vP(e)}),bP=o(5,e=>yP(e,e.d,e.e)),xP=D(3,bP),SP=D(4,bP),CP=(e,t)=>{RP(e,t?.query),BP(e,t?.line)},wP=O(oP),TP=u(14,e=>{CP(e,sN(e.o.trim())),wP(e)}),EP=D(24,O(JN)),DP=o(23,e=>EP(e,Math.min(e.p,Math.max(0,e.w-1)))),OP=u(15,DP),kP=D(16),AP=D(27),jP=o(26,e=>AP(e,XP(e)),3),MP=D(25,jP);function NP(e){ke(e.a),Le(e.a,_P(e)),N(e.a,`Go to file`),De(e.a,[`_bU`,`_c4`]),Re(e.a,QP(e)),Ie(e.a,!0),Ae(e.a),Ne(e.a),Oe(e.a),Me(e.a),Fe(e.a,{}),TP(e,``),OP(e,0),kP(e,p(e)),MP(e,ZP(e))}var PP=O(dP,KN),FP=D(21,e=>{HP(e,e.v?.length),jP(e),PP(e)}),IP=o(19,e=>FP(e,(()=>{let t=e.s;if(!t){let t=new Map(e.g.map(e=>[e.key,e]));return(e.h||[]).map(e=>t.get(e)).filter(e=>!!e).map(e=>({item:e,hits:[],more:!1}))}let n=cN(e.g,e=>e.path,t,fN).map(e=>({item:e.item,hits:e.match.hits,more:!1})),r=e.i?cN(e.i.items,e=>e.path,t,fN).map(e=>({item:e.item,hits:e.match.hits,more:!0})):[];return[...n,...r]})()),3),LP=O(BN,IN),RP=D(18,e=>{IP(e),LP(e)}),zP=O(GN,jN),BP=D(20,e=>{jP(e),zP(e)}),VP=O(mP),HP=D(22,e=>{DP(e),VP(e)}),UP=D(6,IP),WP=D(7,IP),GP=D(8,e=>{qP(e,e.i?.label),IP(e)}),KP=D(9,jP),qP=D(10,O(LN)),JP=D(11,O(PN)),YP=e=>function(t){TP(e._._,t),OP(e._._,0)},XP=e=>t=>{let n=e.v[t];if(!n)return;let r=e.u;e.z(),e.j(n.item.key,r,n.more)},ZP=e=>()=>{yP(e,!1),TP(e,``),OP(e,0)},QP=e=>t=>{yP(e,t)};l.J0=YP,l.J2=XP,l.J1=ZP,l.J3=QP;export{zb as $,kS as A,Rx as B,bM as C,NS as D,_M as E,Hx as F,Mx as G,Fx as H,Vx as I,Tx as J,jx as K,zx as L,Wx as M,Gx as N,FS as O,Ux as P,Jb as Q,Bx as R,TM as S,vM as T,Nx as U,Ix as V,Px as W,tx as X,Ub as Y,ex as Z,AM as _,xP as a,Pb as at,EM as b,NP as c,hb as ct,JM as d,Xy as dt,Ib as et,YM as f,Qh as ft,kM as g,GM as h,KP as i,Nb as it,TS as j,PS as k,uN as l,Cb as lt,VM as m,JP as n,Lb as nt,SP as o,Tb as ot,BM as p,kx as q,GP as r,Bb as rt,WP as s,Eb as st,UP as t,Rb as tt,dN as u,Sb as ut,OM as v,SM as w,wM as x,DM as y,Lx as z};
|
|
2801
|
+
}`}var QD=new WeakMap;function $D(e){let t=QD.get(e);if(t!=null)return t;let n=document.createElement(`div`);n.setAttribute(ew,`true`);let r=document.createElement(`div`);r.style.position=`relative`,r.style.height=`200%`,n.appendChild(r),e.appendChild(n);let i=Math.max(n.offsetWidth-n.clientWidth,0);return n.remove(),QD.set(e,i),i}function eO(e,t){if(!e.isConnected)return;let n=$D(t);if(n==null)return;let r=t.querySelector(`style[${tw}]`),i=r instanceof HTMLStyleElement?r:document.createElement(`style`);r instanceof HTMLStyleElement||(i.setAttribute(tw,``),t.appendChild(i)),i.textContent=`:host { ${nw}: ${n}px; }`}var tO;function nO(e){if(typeof CSSStyleSheet<`u`&&typeof CSSStyleSheet.prototype.replaceSync==`function`&&`adoptedStyleSheets`in e){tO??(tO=new CSSStyleSheet,tO.replaceSync(XD(JD)));let t=!1;try{e.adoptedStyleSheets=[tO],t=!0}catch{}if(t){e.querySelector(`style[${QC}]`)?.remove();return}}if(e.querySelector(`style[data-file-tree-style]`)==null){let t=document.createElement(`style`);t.setAttribute(QC,``),t.textContent=XD(JD),e.prepend(t)}}function rO(e,t){iO(e,t),nO(t),eO(e,t)}function iO(e,t){let n=e.querySelector(`template[shadowrootmode="open"], template[data-file-tree-shadowrootmode="open"]`);n instanceof HTMLTemplateElement&&(t.childNodes.length>0||(t.appendChild(n.content.cloneNode(!0)),n.hasAttribute(`shadowrootmode`)&&n.remove()))}if(typeof HTMLElement<`u`&&customElements.get(`file-tree-container`)==null){class e extends HTMLElement{constructor(){super()}connectedCallback(){let e=this.shadowRoot??this.attachShadow({mode:`open`});rO(this,e)}}if(customElements.define(ZC,e),typeof document<`u`)for(let e of Array.from(document.querySelectorAll(ZC)))e instanceof HTMLElement&&rO(e,e.shadowRoot??e.attachShadow({mode:`open`}))}var aO=e=>e.startsWith(`f::`)?e.slice(3):e;function oO(e){let t=e.lastIndexOf(`/`);return t<0?{parentPath:``,baseName:e}:{parentPath:e.slice(0,t),baseName:e.slice(t+1)}}function sO(e,t){return e===``?t:`${e}/${t}`}function cO({files:e,path:t,isFolder:n,nextBasename:r}){let i=aO(t),a=r.trim();if(a.length===0)return{error:`Name cannot be empty.`};if(a.includes(`/`))return{error:`Name cannot include "/".`};let{parentPath:o,baseName:s}=oO(i);if(a===s)return{nextFiles:e,sourcePath:i,destinationPath:i,isFolder:n};let c=sO(o,a),l=Array(e.length),u=new Set;if(!n){let t=`${c}/`,r=!1;for(let n=0;n<e.length;n++){let a=e[n];if(a!==i&&a.startsWith(t))return{error:`"${c}" already exists.`};let o=a===i?c:a;if(u.has(o))return{error:`"${c}" already exists.`};u.add(o),l[n]=o,a===i&&(r=!0)}return r?{nextFiles:l,sourcePath:i,destinationPath:c,isFolder:n}:{error:`Could not find the selected file to rename.`}}let d=`${i}/`,f=`${c}/`,p=0;for(let t=0;t<e.length;t++){let n=e[t],r=n===i||n.startsWith(d);if(!r&&(n===c||n.startsWith(f)))return{error:`"${c}" already exists.`};let a=r?`${c}${n.slice(i.length)}`:n;if(u.has(a))return{error:`"${c}" already exists.`};u.add(a),l[t]=a,r&&p++}return p===0?{error:`Could not find the selected folder to rename.`}:{nextFiles:l,sourcePath:i,destinationPath:c,isFolder:n}}function lO(e){return e.endsWith(`/`)}function uO(e){let t=e.endsWith(`/`)?e.slice(0,-1):e,n=t.lastIndexOf(`/`),r=n<0?t:t.slice(n+1);return e.endsWith(`/`)?`${r}/`:r}function dO(e){let t=[],n=new Set;for(let r of e)n.has(r)||(n.add(r),t.push(r));let r=new Set;for(let e of t.toSorted((e,t)=>e.length===t.length?e.localeCompare(t):e.length-t.length)){let t=(e.endsWith(`/`)?e.slice(0,-1):e).split(`/`),n=!1;for(let e=0;e<t.length-1;e+=1){let i=`${t.slice(0,e+1).join(`/`)}/`;if(r.has(i)){n=!0;break}}n||r.add(e)}return t.filter(e=>r.has(e))}function fO(e,t){return t.includes(e)?dO(t):[e]}function pO(e,t){return e===t?!0:e==null||t==null?!1:e.kind===t.kind&&e.directoryPath===t.directoryPath&&e.flattenedSegmentPath===t.flattenedSegmentPath&&e.hoveredPath===t.hoveredPath}function mO(e,t){return{draggedPaths:e,target:t}}function hO(e,t){if(t.kind!==`directory`||t.directoryPath==null)return!1;for(let n of e)if(lO(n)&&(t.directoryPath===n||t.directoryPath.startsWith(n)))return!0;return!1}function gO(e,t){return t.kind===`root`||t.directoryPath==null?uO(e):t.directoryPath}function _O(e,t){let n=e.map(e=>{let n=gO(e,t);return n===e?null:{from:e,to:n,type:`move`}}).filter(e=>e!=null);return n.length===0?null:{operations:n,result:{draggedPaths:e,operation:n.length===1?`move`:`batch`,target:t}}}function vO(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1)if(e[n]!==t[n])return!1;return!0}function yO(e,t,n){let{paths:r,preparedInput:i}=e;if(i==null){if(r==null)throw Error(`FileTree requires paths or preparedInput`);return{paths:r,preparedInput:void 0}}let a=i.paths;if(r==null)return{paths:a,preparedInput:i};if(!vO(UD.preparePaths(r,n==null?{}:{sort:n}),a))throw Error(`FileTree ${t} received paths and preparedInput for different path lists`);return{paths:a,preparedInput:i}}function bO(e){return e.operation===`add`||e.operation===`remove`||e.operation===`move`||e.operation===`batch`}function xO(e,t,n){if(e===t)return n;let r=t.endsWith(`/`)?t:`${t}/`;return e.startsWith(r)?`${n.endsWith(`/`)?n:`${n}/`}${e.slice(r.length)}`:e}function SO(e,t){if(e===t)return!0;let n=t.endsWith(`/`)?t:`${t}/`;return e.startsWith(n)}function CO(e,t,n=!1){if(e==null)return null;switch(t.operation){case`add`:case`expand`:case`collapse`:case`mark-directory-unloaded`:case`begin-child-load`:case`apply-child-patch`:case`complete-child-load`:case`fail-child-load`:case`cleanup`:return e;case`remove`:return SO(e,t.path)?n?e:null:e;case`move`:return xO(e,t.from,t.to);case`batch`:{let r=e;for(let e of t.events)if(r=CO(r,e,n),r==null)return null;return r}}}function wO(e){return{canonicalChanged:e.canonicalChanged,projectionChanged:e.projectionChanged,visibleCountDelta:e.visibleCountDelta}}function TO(e){switch(e.operation){case`add`:return{...wO(e),operation:`add`,path:e.path};case`remove`:return{...wO(e),operation:`remove`,path:e.path,recursive:e.recursive};case`move`:return{...wO(e),from:e.from,operation:`move`,to:e.to}}}function EO(e){return{...wO(e),events:e.events.filter(e=>e.operation===`add`||e.operation===`remove`||e.operation===`move`).map(e=>TO(e)),operation:`batch`}}function DO(e){switch(e.operation){case`add`:case`remove`:case`move`:return TO(e);case`batch`:return EO(e);default:return null}}function OO(e,t){if(e.size!==t.length)return!1;for(let n of t)if(!e.has(n))return!1;return!0}function kO(e){let t=e.endsWith(`/`)?e.slice(0,-1):e;if(t.length===0)return[];let n=t.split(`/`);return n.slice(0,-1).map((e,t)=>`${n.slice(0,t+1).join(`/`)}/`)}function AO(e){return kO(e).at(-1)??null}function jO(e,t){return t==null?e:e.startsWith(t)?e.slice(t.length):e}function MO(e){return e.endsWith(`/`)}var NO=e=>e.toLowerCase();function PO(e){let t=e.endsWith(`/`)?e.slice(0,-1):e,n=t.lastIndexOf(`/`);return n<0?t:t.slice(n+1)}function FO(e){return e.endsWith(`/`)?e.slice(0,-1):e}function IO(e,t){return t&&!e.endsWith(`/`)?`${e}/`:e}var LO=e=>{let t=e.trim();return t.length===0?``:(t.includes(`\\`)?t.replaceAll(`\\`,`/`):t).toLowerCase()},RO=Symbol(`FILE_TREE_RENAME_VIEW`),zO=512,BO=512;function VO(e){return e===`top`||e===`center`?e:`nearest`}function HO(e,t,n){if(e===0)return-1;if(n!=null){let e=t(n);if(e!=null)return e;let r=kO(n);for(let e=r.length-1;e>=0;--e){let n=r[e];if(n==null)continue;let i=t(n);if(i!=null)return i}}return 0}function UO(e,t,n){if(e.paths.length===0)return{focusedIndex:-1,getParentIndex:e.getParentIndex,paths:e.paths,posInSetByIndex:e.posInSetByIndex,setSizeByIndex:e.setSizeByIndex};if(t==null)return{focusedIndex:0,getParentIndex:e.getParentIndex,paths:e.paths,posInSetByIndex:e.posInSetByIndex,setSizeByIndex:e.setSizeByIndex};let r=n??(t=>e.visibleIndexByPath.get(t)??null);return{focusedIndex:HO(e.paths.length,r,t),getParentIndex:e.getParentIndex,paths:e.paths,posInSetByIndex:e.posInSetByIndex,setSizeByIndex:e.setSizeByIndex}}var WO=class e{static{Object.defineProperty(e.prototype,RO,{configurable:!0,value(){return{cancel:()=>{this.#q()},commit:()=>{this.#J()},getPath:()=>this.#T,getValue:()=>this.#E,isActive:()=>this.#T!=null,setValue:e=>{this.#Y(e)}}},writable:!0})}#e;#t=new Set;#n=new Map;#r=null;#i=null;#a=new Map;#o=new Map;#s=-1;#c=null;#l=!1;#u=e=>-1;#d=new Map;#f=null;#p=null;#m=null;#h=null;#g=null;#_;#v;#y;#b=[];#x=new Int32Array;#S=new Int32Array;#C=void 0;#w=!1;#T=null;#E=``;#D=!1;#O=new Set;#k=[];#A;#j=null;#M=null;#N=null;#P=null;#F=null;#I=null;#L=null;#R=0;#z=null;#B=new Set;#V=0;#H;#U=0;#W=!1;#G=0;#K;constructor(e){let{dragAndDrop:t,fileTreeSearchMode:n,initialSearchQuery:r,initialSelectedPaths:i,renaming:a,onSearchChange:o,paths:s,preparedInput:c,...l}=e,u=yO({paths:s,preparedInput:c},`constructor`,l.sort);this.#e=l,t!=null&&t!==!1&&(this.#r=t===!0?{}:t),this.#w=a!=null&&a!==!1,a!=null&&a!==!1&&a!==!0&&(this.#C=a.canRename,this.#v=a.onError,this.#_=a.onRename),this.#y=o,this.#A=n??`hide-non-matches`,this.#H=this.#le(u.paths,u.preparedInput);let d=i?.map(e=>this.#Ne(e)).filter(e=>e!=null)??[],f=d.at(-1)??null;d.length>0&&(this.#B=new Set(d),this.#z=f,this.#V=1),this.#je(f,!1),r!=null&&this.#Te(r,!1),this.#K=this.#Re()}destroy(){this.#K?.(),this.#K=null,this.#n.clear(),this.#t.clear(),this.#d.clear(),this.#i=null,this.#he()}focusFirstItem(){this.#be().length>0&&this.#Fe(0)}focusLastItem(){this.#G<=0||(this.#Ie(),this.#Fe(this.#G-1))}focusNextItem(){this.#Ae(1)}focusParentItem(){if(this.#c==null)return;let e=AO(this.#c);if(e==null)return;let t=this.#Z(e);t>=0&&this.#Fe(t)}focusPath(e){let t=this.#H.getPathInfo(e)?.path??null;if(t==null)return;this.#Ie();let n=this.#Z(t);n>=0&&this.#Fe(n)}scrollToPath(e,t){let n=this.#H.getPathInfo(e)?.path??null;if(n==null)return;this.#Ie();let r=this.#xe(n);r<0||this.#Me(r)!=null&&(t?.focus!==!1&&this.#Fe(r,!1),this.#L={id:this.#R+=1,offset:VO(t?.offset),visibleIndex:r},this.#De())}focusMountedPathFromInput(e){let t=this.#H.getPathInfo(e)?.path??null;if(t==null)return;let n=this.#Z(t);n>=0&&this.#Fe(n)}focusNearestPath(e){let t=this.resolveNearestVisiblePath(e);if(t==null)return null;let n=this.#Z(t);return n>=0?(this.#Fe(n),this.#be()[n]??t):null}focusPreviousItem(){this.#Ae(-1)}getFocusedIndex(){return this.#s}getFocusedItem(){return this.#c==null?null:this.#Q(this.#c)}getFocusedPath(){return this.#c}getScrollRequest(){return this.#L}clearScrollRequest(e){this.#L?.id===e&&(this.#L=null)}resolveNearestVisiblePath(e){let t=this.#be();if(this.#G===0)return null;if(e==null)return this.#c??t[0]??null;let n=this.#H.getPathInfo(e)?.path??e,r=this.#Z(n);return r>=0?t[r]??n:this.#X(n)??this.#c??t[0]??null}getSelectedPaths(){return[...this.#B]}getSelectionVersion(){return this.#V}getVisibleCount(){return this.#G}getVisibleRows(e,t){if(t<e||this.#G===0)return[];let n=Math.max(0,e),r=Math.min(this.#G-1,t);if(r<n)return[];let i=r-n+1;if(this.#F==null&&!this.#l&&r>=this.#b.length&&i<=BO){let e=[];for(let t=n;t<=r;t+=1){let n=this.#H.getVisibleRowContext(t);if(n==null)break;e.push(this.#ee(n))}return e}if(!this.#l&&r>=this.#b.length&&this.#Ie(),this.#F!=null){let e=Array.from({length:r-n+1},(e,t)=>this.#Se(n+t)),t=new Map,i=e[0]??-1,a=i;for(let n=1;n<=e.length;n+=1){let r=e[n];if(r!=null&&r===a+1){a=r;continue}if(i>=0&&this.#H.getVisibleSlice(i,a).forEach((e,n)=>{t.set(i+n,e)}),r==null){i=-1,a=-1;continue}i=r,a=r}return Array.from({length:r-n+1},(e,r)=>{let i=n+r,a=this.#Se(i),o=t.get(a),s=this.#b[a];if(o==null||s==null)throw Error(`Missing projection row for filtered visible index ${String(i)}`);return this.#$(o,i,a,{ancestorPaths:this.#re(a),path:s})})}return this.#H.getVisibleSlice(n,r).map((e,t)=>{let r=n+t,i=this.#b[r];if(i==null)throw Error(`Missing projection path for visible index ${String(r)}`);return this.#$(e,r,r,{ancestorPaths:this.#re(r),path:i})})}getStickyRowCandidates(e,t){if(this.#F!=null)return null;if(this.#G===0||e<=0||t<=0)return[];let n=[];for(let r=0;r<this.#G;r+=1){let i=e+r*t,a=Math.min(this.#G-1,Math.floor(i/t)),o=this.#te(a,r)??(a>0?this.#te(a-1,r):void 0);if(o==null)break;n.push({row:this.#ee(o),subtreeEndIndex:o.subtreeEndIndex})}return n}getItem(e){let t=this.#H.getPathInfo(e);return t==null?null:this.#Q(t.path,t)}resolveMountedDirectoryPathFromInput(e){let t=this.#H.getPathInfo(e);return t?.kind===`directory`?t.path:null}toggleMountedDirectoryFromInput(e){let t=this.resolveMountedDirectoryPathFromInput(e);t!=null&&this.#ze(t)}selectAllVisiblePaths(){this.#Ie();let e=[...this.#be()];this.#ae(e,this.#c??this.#z)}selectOnlyPath(e){let t=this.#Ne(e);t!=null&&this.#ae([t],t)}selectOnlyMountedPathFromInput(e){this.#ae([e],e)}selectPath(e){let t=this.#Ne(e);t==null||this.#B.has(t)||this.#ae([...this.#B,t])}deselectPath(e){let t=this.#Ne(e);t!=null&&this.#B.has(t)&&this.#ae([...this.#B].filter(e=>e!==t))}toggleFocusedSelection(){this.#c!=null&&this.togglePathSelectionFromInput(this.#c)}togglePathSelection(e){let t=this.#Ne(e);if(t!=null){if(this.#B.has(t)){this.deselectPath(t);return}this.selectPath(t)}}togglePathSelectionFromInput(e){let t=this.#Ne(e);if(t!=null){if(this.#B.has(t)){this.#ae([...this.#B].filter(e=>e!==t),t);return}this.#ae([...this.#B,t],t)}}selectPathRange(e,t){let n=this.#Ne(e);if(n==null)return;this.#Ie();let r=this.#z,i=r==null?-1:this.#Ce(r),a=this.#Ce(n);if(i===-1||a===-1){let e=t?[...this.#B,n]:[n];this.#ae(e,n);return}let[o,s]=i<=a?[i,a]:[a,i],c=this.#be().slice(o,s+1),l=t?[...this.#B,...c]:c;this.#ae(l,r)}extendSelectionFromFocused(e){if(this.#c==null)return;let t=this.#s;if(t===-1)return;let n=Math.min(this.#G-1,Math.max(0,t+e));if(n===t)return;!this.#l&&n>=this.#b.length&&this.#Ie();let r=this.#be(),i=r[t]??null,a=r[n]??null;if(i==null||a==null)return;let o=new Set(this.#B);o.has(i)&&o.has(a)?o.delete(i):o.add(a),this.#ae([...o],this.#z??i,!1),this.#Fe(n)}getDragAndDropConfig(){return this.#r}isDragAndDropEnabled(){return this.#r!=null}getDragSession(){return this.#i==null?null:{draggedPaths:[...this.#i.draggedPaths],primaryPath:this.#i.primaryPath,target:this.#i.target==null?null:{...this.#i.target}}}startDrag(e){if(this.#r==null)return!1;let t=this.#Ne(e);if(t==null||this.#M!=null&&this.#M.length>0)return!1;let n=this.getSelectedPaths(),r=fO(t,n);return this.#r.canDrag?.(r)!==!1&&(n.includes(t)||this.#ae([t],t,!1),this.#Pe(t),this.#i={draggedPaths:r,primaryPath:t,target:null},this.#De(),!0)}setDragTarget(e){let t=this.#i;if(t==null)return;let n=e;if(n!=null){let e=mO(t.draggedPaths,n);(hO(t.draggedPaths,n)||this.#r?.canDrop?.(e)===!1)&&(n=null)}pO(t.target,n)||(this.#i={...t,target:n},this.#De())}cancelDrag(){this.#i!=null&&(this.#i=null,this.#De())}completeDrag(){let e=this.#i;if(e==null)return!1;this.#i=null;let t=e.target==null?null:{...e.target};if(t==null)return this.#De(),!1;let n=mO(e.draggedPaths,t);if(hO(e.draggedPaths,t)||this.#r?.canDrop?.(n)===!1)return this.#De(),!1;let r=_O(e.draggedPaths,t);if(r==null)return this.#De(),!1;try{if(r.operations.length===1){let e=r.operations[0];if(e==null||e.type!==`move`)throw Error(`Expected a single move operation for one-item drops`);this.#H.move(e.from,e.to,{collision:e.collision})}else this.#ce(r.operations),this.#H.batch(r.operations)}catch(e){return this.#De(),this.#r?.onDropError?.(e instanceof Error?e.message:String(e),n),!1}return this.#r?.onDropComplete?.(r.result),!0}subscribe(e){return this.#t.add(e),e(),()=>{this.#t.delete(e)}}add(e){this.#H.add(e)}remove(e,t={}){this.#H.remove(e,t)}move(e,t,n={}){this.#H.move(e,t,n)}batch(e){this.#H.batch(e)}onMutation(e,t){let n=e,r=t,i=this.#n.get(n);return i??(i=new Set,this.#n.set(n,i)),i.add(r),()=>{let e=this.#n.get(n);e?.delete(r),e?.size===0&&this.#n.delete(n)}}setSearch(e){this.#Te(e,!0)}openSearch(e=``){this.#Te(e,!0)}closeSearch(){this.#Te(null,!0)}isSearchOpen(){return this.#M!==null}getSearchValue(){return this.#M??``}getSearchMatchingPaths(){return this.#k}focusNextSearchMatch(){this.#we(1)}focusPreviousSearchMatch(){this.#we(-1)}startRenaming(e=this.#c??``,t={}){if(!this.#w)return!1;let n=this.#H.getPathInfo(e);if(n==null)return!1;let r=n.path,i=MO(r),a=FO(r);if(this.#C?.({isFolder:i,path:a})===!1)return!1;for(let e of kO(r))this.#H.isExpanded(e)||this.#H.expand(e);return this.#ae([r],r,!1),this.#M!=null&&(this.#Te(null,!1),this.#y?.(this.#M)),this.#Pe(r),this.#T=r,this.#E=PO(r),this.#D=t.removeIfCanceled??!1,this.#De(),!0}#q(){if(this.#T==null)return;let e=this.#T,t=this.#D;if(this.#T=null,this.#E=``,this.#D=!1,t){this.remove(e,MO(e)?{recursive:!0}:void 0);return}this.#Pe(e),this.#De()}#J(){let e=this.#T;if(e==null)return;if(this.#D&&this.#E.trim().length===0){this.#T=null,this.#E=``,this.#D=!1,this.remove(e,MO(e)?{recursive:!0}:void 0);return}let t=MO(e),n=cO({files:this.#H.list(),isFolder:t,nextBasename:this.#E,path:FO(e)});if(this.#T=null,this.#E=``,this.#D=!1,`error`in n){this.#Pe(e),this.#v?.(n.error),this.#De();return}if(n.sourcePath===n.destinationPath){this.#Pe(e),this.#De();return}this.#_?.({destinationPath:n.destinationPath,isFolder:n.isFolder,sourcePath:n.sourcePath}),this.move(IO(n.sourcePath,t),IO(n.destinationPath,t))}#Y(e){this.#T!=null&&this.#E!==e&&(this.#E=e,this.#De())}resetPaths(e,t={}){let n=!Array.isArray(e),r=n?void 0:e,i=n?e:t,a=this.#H.list().length,o=this.#G,s=yO({paths:r,preparedInput:i.preparedInput},`resetPaths`,this.#e.sort),c=this.#le(s.paths,s.preparedInput,i.initialExpandedPaths),l=this.#c,u=this.#T,d=this.getSelectedPaths(),f=this.#z;this.#K?.(),this.#H=c,this.#d.clear(),this.#he();let p=d.map(e=>c.getPathInfo(e)?.path??null).filter(e=>e!=null),m=!OO(this.#B,p);this.#B=new Set(p),m&&(this.#V+=1),this.#z=f==null?null:c.getPathInfo(f)?.path??null,this.#T=u==null?null:c.getPathInfo(u)?.path??null,this.#T??(this.#E=``,this.#D=!1),this.#je(l,l!=null||p.length>0||this.#z!=null),this.#K=this.#Re(),this.#De(),this.#Oe({canonicalChanged:!0,operation:`reset`,pathCountAfter:s.paths.length,pathCountBefore:a,projectionChanged:!0,usedPreparedInput:i.preparedInput!=null,visibleCountDelta:this.#G-o})}#X(e){this.#Ie();let t=AO(e),n=jO(e,t),r=null,i=null;for(let e of this.#be()){if(AO(e)!==t)continue;let a=jO(e,t);if(a<n){r=e;continue}if(a>n){i=e;break}}return r??i}#Z(e){let t=this.#Ce(e);if(t!==-1)return t;let n=kO(e);for(let e=n.length-1;e>=0;--e){let t=n[e];if(t==null)continue;let r=this.#Ce(t);if(r!==-1)return r}return this.#be().length>0?0:-1}#Q(e,t){let n=this.#d.get(e);if(n!=null)return n;let r=t??this.#H.getPathInfo(e);if(r==null)return null;let i=r.kind===`directory`?this.#oe(r.path):this.#se(r.path);return this.#d.set(r.path,i),i}#$(e,t,n,r){return{ancestorPaths:r.ancestorPaths,depth:e.depth,flattenedSegments:e.flattenedSegments?.map(e=>({isTerminal:e.isTerminal,name:e.name,path:e.path})),hasChildren:e.hasChildren,index:t,isExpanded:e.isExpanded,isFlattened:e.isFlattened,isFocused:r.path===this.#c,isSelected:this.#B.has(r.path),kind:e.kind,level:e.depth,name:e.name,path:r.path,posInSet:r.posInSet??this.#x[n]??0,setSize:r.setSize??this.#S[n]??0}}#ee(e){return this.#$(e.row,e.index,e.index,{ancestorPaths:e.ancestorPaths,path:e.row.path,posInSet:e.posInSet,setSize:e.setSize})}#te(e,t){let n=this.#H.getVisibleRowContext(e);return n==null?void 0:n.ancestorRows[t]??(t===n.ancestorRows.length&&n.row.kind===`directory`&&n.row.isExpanded?n:void 0)}#ne(e){let t=this.#a.get(e);if(t!=null)return t;let n=this.#u(e),r=n<0?[]:[...this.#ne(n),n];return this.#a.set(e,r),r}#re(e){let t=this.#o.get(e);if(t!=null)return t;let n=this.#ne(e).map(e=>this.#b[e]??``).filter(e=>e!==``);return this.#o.set(e,n),n}#ie(e){this.#H.collapse(e)}#ae(e,t=this.#z,n=!0){let r=[...new Set(e)],i=!OO(this.#B,r),a=this.#z!==t;(i||a)&&(this.#B=new Set(r),this.#z=t,i&&(this.#V+=1),n&&this.#De())}#oe(e){return{collapse:()=>{this.#ie(e)},deselect:()=>{this.deselectPath(e)},expand:()=>{this.#ke(e)},focus:()=>{this.focusPath(e)},getPath:()=>e,isDirectory:()=>!0,isExpanded:()=>this.#H.isExpanded(e),isFocused:()=>this.#c===e,isSelected:()=>this.#B.has(e),select:()=>{this.selectPath(e)},toggleSelect:()=>{this.togglePathSelection(e)},toggle:()=>{this.#ze(e)}}}#se(e){return{deselect:()=>{this.deselectPath(e)},focus:()=>{this.focusPath(e)},getPath:()=>e,isDirectory:()=>!1,isFocused:()=>this.#c===e,isSelected:()=>this.#B.has(e),select:()=>{this.selectPath(e)},toggleSelect:()=>{this.togglePathSelection(e)}}}#ce(e){let t=this.#H.list();this.#le(t).batch(e)}#le(e,t,n){return new UD({...this.#e,paths:e,preparedInput:t??void 0,...n===void 0?{}:{initialExpandedPaths:n}})}#ue(){return this.#h??=this.#H.list(),this.#h}#de(){if(this.#m!=null)return this.#m;let e=new Set;for(let t of this.#ue()){e.add(t);for(let n of kO(t))e.add(n)}return this.#m=[...e].sort(),this.#m}#fe(){return this.#g??=this.#ue().map(NO),this.#g}#pe(){return this.#f??=this.#de().filter(e=>e.endsWith(`/`)),this.#f}#me(){return this.#p??=this.#pe().map(NO),this.#p}#he(){this.#f=null,this.#p=null,this.#m=null,this.#h=null,this.#g=null}#ge(){return this.#pe().filter(e=>this.#H.isExpanded(e))}#_e(e){let t=new Set(this.#j??[]);if(e)for(let e of this.#B)for(let n of kO(e))t.add(n);this.#ve(t)}#ve(e){this.#W=!0;try{for(let t of this.#pe()){let n=e.has(t),r=this.#H.isExpanded(t);n&&!r?this.#H.expand(t):!n&&r&&this.#H.collapse(t)}}finally{this.#W=!1}}#ye(){if(this.#M==null||this.#M.length===0){this.#k=[],this.#F=null,this.#I=null,this.#P=null,this.#G=this.#U;return}let e=this.#b;if(this.#k=e.filter(e=>this.#O.has(e)),this.#A!==`hide-non-matches`||this.#O.size===0){this.#F=null,this.#I=null,this.#P=null,this.#G=this.#U;return}let t=[],n=[],r=new Map;for(let[i,a]of e.entries())this.#N?.has(a)===!0&&(r.set(a,n.length),t.push(i),n.push(a));this.#F=t,this.#I=n,this.#P=r,this.#G=n.length}#be(){return this.#I??this.#b}#xe(e){return this.#I==null?this.#H.getVisibleIndex(e)??-1:this.#P?.get(e)??-1}#Se(e){return this.#F?.[e]??e}#Ce(e){return this.#P?.get(e)??this.#H.getVisibleIndex(e)??-1}#we(e){let t=this.#k;if(t.length===0)return;let n=this.#c,r=n==null?-1:t.indexOf(n),i=t[r<0?e>0?0:t.length-1:Math.min(t.length-1,Math.max(0,r+e))];i!=null&&this.focusPath(i)}#Te(e,t){let n=e==null?null:LO(e),r=this.#M;if(r!==n){if(r==null&&n!=null&&(this.#j=this.#ge()),this.#M=n,n==null)this.#_e(!0),this.#j=null,this.#O.clear(),this.#N=null,this.#je(this.#c,!0);else if(n.length===0)this.#_e(!1),this.#O.clear(),this.#N=null,this.#je(this.#c,!0);else{let e=this.#Ee();this.#je(e,!0)}t&&(this.#y?.(this.#M),this.#De())}}#Ee(){if(this.#M==null||this.#M.length===0)return this.#O.clear(),this.#c;let e=this.#M,t=this.#ue(),n=this.#fe(),r=[],i=new Set,a=null;for(let o=0;o<t.length;o+=1){if(!n[o].includes(e))continue;let s=t[o];r.push(s),i.add(s),a??=s}let o=this.#pe(),s=this.#me();for(let t=0;t<o.length;t+=1){if(!s[t].includes(e))continue;let n=o[t];i.has(n)||(r.push(n),i.add(n),a??=n)}this.#O=i;let c=this.#A===`hide-non-matches`&&r.length>0?new Set:null;this.#N=c;let l=this.#A===`expand-matches`?new Set(this.#j??[]):new Set;for(let e of r){c?.add(e),e.endsWith(`/`)&&l.add(e);for(let t of kO(e))l.add(t),c?.add(t)}return this.#ve(l),a??this.#c}#De(){for(let e of this.#t)e()}#Oe(e){this.#n.get(e.operation)?.forEach(t=>{t(e)}),this.#n.get(`*`)?.forEach(t=>{t(e)})}#ke(e){for(let t of kO(e))this.#H.isExpanded(t)||this.#H.expand(t);this.#H.isExpanded(e)||this.#H.expand(e)}#Ae(e){let t=this.#G;if(t===0)return;let n=this.#s===-1?0:this.#s,r=Math.min(t-1,Math.max(0,n+e));(r!==n||this.#s===-1)&&(!this.#l&&this.#F==null&&r>=this.#b.length&&this.#Ie(),this.#Fe(r))}#je(e,t=!0){let n=this.#H.getVisibleCount();this.#U=n;let r=UO(this.#H.getVisibleTreeProjectionData(t?void 0:Math.min(n,zO)),e,t?e=>this.#H.getVisibleIndex(e):void 0);this.#a.clear(),this.#o.clear(),this.#l=r.paths.length>=n,this.#u=r.getParentIndex,this.#b=r.paths,this.#x=r.posInSetByIndex,this.#S=r.setSizeByIndex,this.#ye(),this.#s=e==null?this.#be().length>0?0:-1:this.#Z(e),this.#c=this.#s<0?null:this.#Me(this.#s)}#Me(e){return this.#be()[e]??(this.#F==null?this.#H.getVisibleRowContext(e)?.row.path??null:null)}#Ne(e){return this.#H.getPathInfo(e)?.path??null}#Pe(e){if(e==null)return;let t=this.#Z(e);t>=0&&this.#Fe(t,!1)}#Fe(e,t=!0){let n=this.#Me(e);n!=null&&(this.#s!==e||this.#c!==n)&&(this.#s=e,this.#c=n,t&&this.#De())}#Ie(){this.#l||this.#je(this.#c,!0)}#Le(e){let t=CO(this.#T,e);t==null&&this.#T!=null&&(this.#E=``),this.#T=t;let n=CO(this.#c,e,!0),r=[...this.#B].map(t=>CO(t,e)).filter(e=>e!=null).map(e=>this.#H.getPathInfo(e)?.path??null).filter(e=>e!=null),i=CO(this.#z,e),a=i==null?null:this.#H.getPathInfo(i)?.path??null,o=[...new Set(r)];return OO(this.#B,o)||(this.#B=new Set(o),this.#V+=1),this.#z=a,n}#Re(){return this.#H.on(`*`,e=>{if(this.#W)return;e.canonicalChanged&&(this.#d.clear(),this.#he()),this.#i!=null&&bO(e)&&(this.#i=null);let t=bO(e)?this.#Le(e):this.#c,n=this.#M!=null&&this.#M.length>0?this.#Ee():this.#M===``?this.#c:t,r=this.#M!=null||e.operation!==`expand`&&e.operation!==`collapse`;this.#je(n,r),this.#De();let i=DO(e);i!=null&&this.#Oe(i)})}#ze(e){if(this.#H.isExpanded(e)){this.#ie(e);return}this.#ke(e)}},GO=e=>{if(e==null||e.length===0)return`0`;let t=`${e.length}`;for(let n of e)t+=`\0${n.path}\0${n.status}`;return t};function KO(e){let t=e.endsWith(`/`),n=``,r=-1;for(let t=0;t<=e.length;t+=1){if(e[t]!==`/`&&t!==e.length){r===-1&&(r=t);continue}r!==-1&&(n!==``&&(n+=`/`),n+=e.slice(r,t),r=-1)}return n===``?null:{isDirectory:t,path:n}}function qO(e){let t=e.endsWith(`/`)?e.slice(0,-1):e;if(t.length===0)return[];let n=[],r=0;for(;;){let e=t.indexOf(`/`,r);if(e===-1)break;n.push(t.slice(0,e+1)),r=e+1}return n}function JO(e,t){return t?`${e}/`:e}function YO(e,t=null){let n=GO(e==null?void 0:[...e]);if(n===`0`)return null;if(t?.signature===n)return t;let r=new Map,i=new Set,a=new Set,o=new Map;for(let t of e??[]){let e=ZO(t);e!=null&&ek({canonicalPath:e.canonicalPath,changeCountByDirectoryPath:o,directoriesWithChanges:i,ignoredDirectoryPaths:a,isDirectory:e.isDirectory,status:t.status,statusByPath:r})}return r.size===0?null:{changeCountByDirectoryPath:o,directoriesWithChanges:i,ignoredDirectoryPaths:a,signature:n,statusByPath:r}}function XO(e,t){let n=t?.remove??[],r=t?.set??[];if(n.length===0&&r.length===0)return e;let i=new Map(e?.statusByPath),a=new Set(e?.directoriesWithChanges),o=new Set(e?.ignoredDirectoryPaths),s=new Map(e?.changeCountByDirectoryPath),c=!1;for(let e of n){let t=QO(e);t!=null&&(c=$O({canonicalPath:t.canonicalPath,changeCountByDirectoryPath:s,directoriesWithChanges:a,ignoredDirectoryPaths:o,statusByPath:i})||c)}for(let e of r){let t=ZO(e);t!=null&&(c=ek({canonicalPath:t.canonicalPath,changeCountByDirectoryPath:s,directoriesWithChanges:a,ignoredDirectoryPaths:o,isDirectory:t.isDirectory,status:e.status,statusByPath:i})||c)}return c?i.size===0?null:{changeCountByDirectoryPath:s,directoriesWithChanges:a,ignoredDirectoryPaths:o,signature:rk(i),statusByPath:i}:e}function ZO(e){return QO(e.path)}function QO(e){let t=KO(e);if(t!=null)return{canonicalPath:JO(t.path,t.isDirectory),isDirectory:t.isDirectory}}function $O({canonicalPath:e,changeCountByDirectoryPath:t,directoriesWithChanges:n,ignoredDirectoryPaths:r,statusByPath:i}){let a=i.get(e);return a!=null&&(i.delete(e),a===`ignored`&&e.endsWith(`/`)&&r.delete(e),nk(t,n,e),!0)}function ek({canonicalPath:e,changeCountByDirectoryPath:t,directoriesWithChanges:n,ignoredDirectoryPaths:r,isDirectory:i,status:a,statusByPath:o}){let s=o.get(e);return s!==a&&(s??tk(t,n,e),o.set(e,a),a===`ignored`&&i?r.add(e):i&&r.delete(e),!0)}function tk(e,t,n){for(let r of qO(n))e.set(r,(e.get(r)??0)+1),t.add(r)}function nk(e,t,n){for(let r of qO(n)){let n=(e.get(r)??0)-1;n>0?e.set(r,n):(e.delete(r),t.delete(r))}}function rk(e){let t=`${e.size}`;for(let[n,r]of e)t+=`\0${n}\0${r}`;return t}var Z,ik,ak,ok,sk,ck,lk,uk,dk,fk,pk={},mk=[],hk=Array.isArray,gk=mk.slice,_k=Object.assign;function vk(e){e&&e.parentNode&&e.remove()}function yk(e,t,n){var r,i,a,o={};for(a in t)a==`key`?r=t[a]:a==`ref`&&typeof e!=`function`?i=t[a]:o[a]=t[a];return arguments.length>2&&(o.children=arguments.length>3?gk.call(arguments,2):n),bk(e,o,r,i,null)}function bk(e,t,n,r,i){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++ik,__i:-1,__u:0};return i==null&&Z.vnode!=null&&Z.vnode(a),a}function xk(e){return e.children}function Sk(e,t){this.props=e,this.context=t,this.__g=0}function Ck(e,t){if(t==null)return e.__?Ck(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type==`function`?Ck(e):null}function wk(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=n.__e;break}return wk(e)}}function Tk(e){(8&e.__g||!(e.__g|=8)||!ak.push(e)||sk++)&&ok==Z.debounceRendering||((ok=Z.debounceRendering)||queueMicrotask)(Ek)}function Ek(){for(var e,t,n,r,i,a,o,s,c=1;ak.length;)ak.length>c&&ak.sort(ck),e=ak.shift(),c=ak.length,8&e.__g&&(n=void 0,i=(r=(t=e).__v).__e,a=[],o=[],(s=t.__P)&&((n=_k({},r)).__v=r.__v+1,Z.vnode&&Z.vnode(n),Pk(s,n,r,t.__n,s.namespaceURI,32&r.__u?[i]:null,a,i??Ck(r),!!(32&r.__u),o,s.ownerDocument),n.__v=r.__v,n.__.__k[n.__i]=n,Ik(a,n,o),n.__e!=i&&wk(n)));sk=0}function Dk(e,t,n,r,i,a,o,s,c,l,u,d){var f,p,m,h,g,_,v,y=r&&r.__k||mk,b=t.length;for(c=Ok(n,t,y,c,b),f=0;f<b;f++)(m=n.__k[f])!=null&&(p=m.__i==-1?pk:y[m.__i]||pk,m.__i=f,_=Pk(e,m,p,i,a,o,s,c,l,u,d),h=m.__e,m.ref&&p.ref!=m.ref&&(p.ref&&zk(p.ref,null,m),u.push(m.ref,m.__c||h,m)),g==null&&h!=null&&(g=h),(v=!!(4&m.__u))||p.__k===m.__k?c=kk(m,c,e,v):typeof m.type==`function`&&_!==void 0?c=_:h&&(c=h.nextSibling),m.__u&=-7);return n.__e=g,c}function Ok(e,t,n,r,i){var a,o,s,c,l,u=n.length,d=u,f=0;for(e.__k=Array(i),a=0;a<i;a++)(o=t[a])!=null&&typeof o!=`boolean`&&typeof o!=`function`?(c=a+f,(o=e.__k[a]=typeof o==`string`||typeof o==`number`||typeof o==`bigint`||o.constructor==String?bk(null,o,null,null,null):hk(o)?bk(xk,{children:o},null,null,null):o.constructor==null&&o.__b>0?bk(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o).__=e,o.__b=e.__b+1,s=null,(l=o.__i=Ak(o,n,c,d))!=-1&&(d--,(s=n[l])&&(s.__u|=2)),s==null||s.__v==null?(l==-1&&(i>u?f--:i<u&&f++),typeof o.type!=`function`&&(o.__u|=4)):l!=c&&(l==c-1?f--:l==c+1?f++:(l>c?f--:f++,o.__u|=4))):e.__k[a]=null;if(d)for(a=0;a<u;a++)(s=n[a])!=null&&!(2&s.__u)&&(s.__e==r&&(r=Ck(s)),Bk(s,s));return r}function kk(e,t,n,r){var i,a;if(typeof e.type==`function`){for(i=e.__k,a=0;i&&a<i.length;a++)i[a]&&(i[a].__=e,t=kk(i[a],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=Ck(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do t&&=t.nextSibling;while(t!=null&&t.nodeType==8);return t}function Ak(e,t,n,r){var i,a,o,s=e.key,c=e.type,l=t[n],u=l!=null&&!(2&l.__u);if(l===null&&e.key==null||u&&s==l.key&&c==l.type)return n;if(r>+!!u){for(i=n-1,a=n+1;i>=0||a<t.length;)if((l=t[o=i>=0?i--:a++])!=null&&!(2&l.__u)&&s==l.key&&c==l.type)return o}return-1}function jk(e,t,n){t[0]==`-`?e.setProperty(t,n??``):e[t]=n??``}function Mk(e,t,n,r,i){var a;n:if(t==`style`){if(typeof n==`string`)e.style.cssText=n;else{if(typeof r==`string`&&(e.style.cssText=r=``),r)for(t in r)n&&t in n||jk(e.style,t,``);if(n)for(t in n)r&&n[t]==r[t]||jk(e.style,t,n[t])}}else if(t[0]==`o`&&t[1]==`n`)a=t!=(t=t.replace(lk,`$1`)),(t=t.slice(2))[0].toLowerCase()!=t[0]&&(t=t.toLowerCase()),e.__l||={},e.__l[t+a]=n,n?r?n.l=r.l:(n.l=uk,e.addEventListener(t,a?fk:dk,a)):e.removeEventListener(t,a?fk:dk,a);else{if(i==`http://www.w3.org/2000/svg`)t=t.replace(/xlink(H|:h)/,`h`).replace(/sName$/,`s`);else if(t!=`width`&&t!=`height`&&t!=`href`&&t!=`list`&&t!=`form`&&t!=`tabIndex`&&t!=`download`&&t!=`rowSpan`&&t!=`colSpan`&&t!=`role`&&t!=`popover`&&t in e)try{e[t]=n??``;break n}catch{}typeof n==`function`||(n==null||!1===n&&t[4]!=`-`?e.removeAttribute(t):e.setAttribute(t,t==`popover`&&n==1?``:n))}}function Nk(e){return function(t){if(this.__l){var n=this.__l[t.type+e];if(t.u==null)t.u=uk++;else if(t.u<n.l)return;return n(Z.event?Z.event(t):t)}}}function Pk(e,t,n,r,i,a,o,s,c,l,u){var d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k,A,ee,j=t.type;if(t.constructor!=null)return null;128&n.__u&&(c=!!(32&n.__u),n.__c.__z&&(s=t.__e=n.__e=(a=n.__c.__z)[0],n.__c.__z=null)),(d=Z.__b)&&d(t);n:if(typeof j==`function`)try{if(v=t.props,y=`prototype`in j&&j.prototype.render,b=(d=j.contextType)&&r[d.__c],x=d?b?b.props.value:d.__:r,n.__c?2&(f=t.__c=n.__c).__g&&(f.__g|=1,_=!0):(y?t.__c=f=new j(v,x):(t.__c=f=new Sk(v,x),f.constructor=j,f.render=Vk),b&&b.sub(f),f.props=v,f.state||(f.state={}),f.context=x,f.__n=r,p=!0,f.__g|=8,f.__h=[],f._sb=[]),y&&f.__s==null&&(f.__s=f.state),y&&j.getDerivedStateFromProps!=null&&(f.__s==f.state&&(f.__s=_k({},f.__s)),_k(f.__s,j.getDerivedStateFromProps(v,f.__s))),m=f.props,h=f.state,f.__v=t,p)y&&j.getDerivedStateFromProps==null&&f.componentWillMount!=null&&f.componentWillMount(),y&&f.componentDidMount!=null&&f.__h.push(f.componentDidMount);else{if(y&&j.getDerivedStateFromProps==null&&v!==m&&f.componentWillReceiveProps!=null&&f.componentWillReceiveProps(v,x),!(4&f.__g)&&f.shouldComponentUpdate!=null&&!1===f.shouldComponentUpdate(v,f.__s,x)||t.__v==n.__v){for(t.__v!=n.__v&&(f.props=v,f.state=f.__s,f.__g&=-9),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(e){e&&(e.__=t)}),S=0;S<f._sb.length;S++)f.__h.push(f._sb[S]);f._sb=[],f.__h.length&&o.push(f);break n}f.componentWillUpdate!=null&&f.componentWillUpdate(v,f.__s,x),y&&f.componentDidUpdate!=null&&f.__h.push(function(){f.componentDidUpdate(m,h,g)})}if(f.context=x,f.props=v,f.__P=e,f.__g&=-5,C=Z.__r,w=0,y){for(f.state=f.__s,f.__g&=-9,C&&C(t),d=f.render(f.props,f.state,f.context),T=0;T<f._sb.length;T++)f.__h.push(f._sb[T]);f._sb=[]}else do f.__g&=-9,C&&C(t),d=f.render(f.props,f.state,f.context),f.state=f.__s;while(8&f.__g&&++w<25);f.state=f.__s,f.getChildContext!=null&&(r=_k({},r,f.getChildContext())),y&&!p&&f.getSnapshotBeforeUpdate!=null&&(g=f.getSnapshotBeforeUpdate(m,h)),E=d,d!=null&&d.type===xk&&d.key==null&&(E=Lk(d.props.children)),s=Dk(e,hk(E)?E:[E],t,n,r,i,a,o,s,c,l,u),t.__u&=-161,f.__h.length&&o.push(f),_&&(f.__g&=-4)}catch(e){if(t.__v=null,c||a!=null){if(e.then){for(D=0,O=!1,t.__u|=c?160:128,t.__c.__z=[],k=0;k<a.length;k++)(A=a[k])==null||O||(A.nodeType==8&&A.data==`$s`?(D>0&&t.__c.__z.push(A),D++,a[k]=null):A.nodeType==8&&A.data==`/$s`?(--D>0&&t.__c.__z.push(A),O=D===0,s=a[k],a[k]=null):D>0&&(t.__c.__z.push(A),a[k]=null));if(!O){for(;s&&s.nodeType==8&&s.nextSibling;)s=s.nextSibling;a[a.indexOf(s)]=null,t.__c.__z=[s]}t.__e=s}else{for(ee=a.length;ee--;)vk(a[ee]);Fk(t)}}else t.__e=n.__e,t.__k=n.__k,e.then||Fk(t);Z.__e(e,t,n)}else s=t.__e=Rk(n.__e,t,n,r,i,a,o,c,l,u);return(d=Z.diffed)&&d(t),128&t.__u?void 0:s}function Fk(e){e&&e.__c&&(e.__c.__g|=4),e&&e.__k&&e.__k.forEach(Fk)}function Ik(e,t,n){for(var r=0;r<n.length;r++)zk(n[r],n[++r],n[++r]);Z.__c&&Z.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){Z.__e(e,t.__v)}})}function Lk(e){return typeof e!=`object`||!e||e.__b&&e.__b>0?e:hk(e)?e.map(Lk):_k({},e)}function Rk(e,t,n,r,i,a,o,s,c,l){var u,d,f,p,m,h,g,_,v=n.props,y=t.props,b=t.type;if(b==`svg`?i=`http://www.w3.org/2000/svg`:b==`math`?i=`http://www.w3.org/1998/Math/MathML`:i||=`http://www.w3.org/1999/xhtml`,a!=null){for(u=0;u<a.length;u++)if((m=a[u])&&`setAttribute`in m==!!b&&(b?m.localName==b:m.nodeType==3)){e=m,a[u]=null;break}}if(e==null){if(b==null)return l.createTextNode(y);e=l.createElementNS(i,b,y.is&&y),s&&=(Z.__m&&Z.__m(t,a),!1),a=null}if(b==null)v===y||s&&e.data==y||(e.data=y);else{if(a&&=gk.call(e.childNodes),v=n.props||pk,!s&&a!=null)for(v={},u=0;u<e.attributes.length;u++)v[(m=e.attributes[u]).name]=m.value;for(u in v)if(m=v[u],u!=`children`){if(u==`dangerouslySetInnerHTML`)f=m;else if(!(u in y)){if(u==`value`&&`defaultValue`in y||u==`checked`&&`defaultChecked`in y)continue;Mk(e,u,null,m,i)}}for(u in _=1&n.__u,y)m=y[u],u==`children`?p=m:u==`dangerouslySetInnerHTML`?d=m:u==`value`?h=m:u==`checked`?g=m:s&&typeof m!=`function`||v[u]===m&&!_||Mk(e,u,m,v[u],i);if(d)s||f&&(d.__html==f.__html||d.__html==e.innerHTML)||(e.innerHTML=d.__html),t.__k=[];else if(f&&(e.innerHTML=``),Dk(b==`template`?e.content:e,hk(p)?p:[p],t,n,r,b==`foreignObject`?`http://www.w3.org/1999/xhtml`:i,a,o,a?a[0]:n.__k&&Ck(n,0),s,c,l),a!=null)for(u=a.length;u--;)vk(a[u]);s||(u=`value`,b==`progress`&&h==null?e.removeAttribute(`value`):h==null||h===e[u]&&(b!==`progress`||h)||Mk(e,u,h,v[u],i),u=`checked`,g!=null&&g!=e[u]&&Mk(e,u,g,v[u],i))}return e}function zk(e,t,n){try{if(typeof e==`function`){var r=typeof e.__u==`function`;r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(e){Z.__e(e,n)}}function Bk(e,t,n){var r,i;if(Z.unmount&&Z.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||zk(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){Z.__e(e,t)}r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&Bk(r[i],t,n||typeof e.type!=`function`);n||vk(e.__e),e.__e&&e.__e.__l&&(e.__e.__l=null),e.__e=e.__c=e.__=null}function Vk(e,t,n){return this.constructor(e,n)}function Hk(e,t){var n,r,i,a;t==document&&(t=document.documentElement),Z.__&&Z.__(e,t),r=(n=!!(e&&32&e.__u))?null:t.__k,e=t.__k=yk(xk,null,[e]),i=[],a=[],Pk(t,e,r||pk,pk,t.namespaceURI,r?null:t.firstChild?gk.call(t.childNodes):null,i,r?r.__e:t.firstChild,n,a,t.ownerDocument),Ik(i,e,a)}function Uk(e,t){e.__u|=32,Hk(e,t)}Z={__e:function(e,t,n,r){for(var i,a,o;t=t.__;)if((i=t.__c)&&!(1&i.__g)){i.__g|=4;try{if((a=i.constructor)&&a.getDerivedStateFromError!=null&&(i.setState(a.getDerivedStateFromError(e)),o=8&i.__g),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),o=8&i.__g),o)return void(i.__g|=2)}catch(t){e=t}}throw sk=0,e}},ik=0,Sk.prototype.setState=function(e,t){var n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=_k({},this.state);typeof e==`function`&&(e=e(_k({},n),this.props)),e&&_k(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),Tk(this))},Sk.prototype.forceUpdate=function(e){this.__v&&(this.__g|=4,e&&this.__h.push(e),Tk(this))},Sk.prototype.render=xk,ak=[],sk=0,ck=function(e,t){return e.__v.__b-t.__v.__b},lk=/(PointerCapture)$|Capture$/i,uk=0,dk=Nk(!1),fk=Nk(!0);var Wk=0;Array.isArray;function Q(e,t,n,r,i,a){t||={};var o,s,c=t;if(`ref`in c&&typeof e!=`function`)for(s in c={},t)s==`ref`?o=t[s]:c[s]=t[s];var l={type:e,props:c,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Wk,__i:-1,__u:0,__source:i,__self:a};return Z.vnode&&Z.vnode(l),l}var Gk=16,Kk=16,qk={};function Jk({name:e,remappedFrom:t,token:n,width:r,height:i,viewBox:a,label:o,alignCapitals:s=!1}){"use no memo";let c=`#${e.replace(/^#/,``)}`,{width:l,height:u,viewBox:d}=qk[e]??{width:Gk,height:Kk},f=r??l,p=i??u,m=a??d??`0 0 ${l} ${u}`;return Q(`svg`,{"data-icon-name":t??e,"data-icon-token":n,"data-align-capitals":s,...o==null?{"aria-hidden":!0}:{"aria-label":o,role:`img`},viewBox:m,width:f,height:p,children:Q(`use`,{href:c})})}var Yk=e=>e!==void 0&&/\s/.test(e),Xk=(e,t)=>{let n=t=>Yk(e[t-1])||Yk(e[t]);if(!n(t))return t;for(let r=1;r<e.length;r++){let i=t-r;if(i>0&&!n(i))return i;let a=t+r;if(a<e.length&&!n(a))return a}return t},Zk=e=>Xk(e,Math.ceil(e.length/2)),Qk=e=>{if(e.length<2)return[e,``];let t=Zk(e);return[e.slice(0,t),e.slice(t)]},$k=e=>{if(e.length<4)return[e,``];let t=e.lastIndexOf(`.`)+1,n=e.length-t>10,r=t>=1&&!n?t:Zk(e);return[e.slice(0,r),e.slice(r)]},eA=e=>{if(e.length<4)return[e,``];let t=e.lastIndexOf(`/`)+1,n=e.length-t>25,r=t>=1&&!n?t:Math.ceil(e.length/2);return[e.slice(0,r),e.slice(r)]},tA=(e,{splitIndex:t}={})=>{if(typeof t!=`number`){let t=Math.ceil(e.length/2);return[e.slice(0,t),e.slice(t)]}return[e.slice(0,t),e.slice(t)]},nA=(e,{splitOffset:t}={})=>{if(typeof t!=`number`||t<=0||t>=e.length){let t=Math.ceil(e.length/2);return[e.slice(0,t),e.slice(t)]}let n=e.length-t;return[e.slice(0,n),e.slice(n)]},rA=(e,{splitOffset:t}={})=>{if(typeof t!=`number`||t<=0||t>=e.length){let t=Math.ceil(e.length/2);return[e.slice(0,t),e.slice(t)]}let n=t;return[e.slice(0,n),e.slice(n)]};function iA({children:e,marker:t,variant:n=`default`}){"use no memo";return Q(`div`,{"aria-hidden":!0,"data-truncate-marker-cell":!0,children:Q(`div`,{"data-truncate-marker":!0,children:typeof t==`function`?t({children:e}):n===`fade`?Q(`span`,{"data-truncate-fade":!0}):t})})}function aA(e){"use no memo";let{mode:t,children:n}=e;return Q(`div`,{children:[Q(`div`,{"data-truncate-content":`visible`,children:t===`fruncate`?Q(`span`,{children:n}):n}),Q(`div`,{"data-truncate-content":`overflow`,"aria-hidden":!0,children:t===`fruncate`?Q(`span`,{children:n}):n})]})}function oA({children:e,mode:t=`truncate`,marker:n=`…`,variant:r=`default`,...i}){"use no memo";let a=Q(aA,{mode:t,children:e},`content`),o=Q(iA,{marker:n,mode:t,variant:r},`marker`),s=Q(`div`,{"data-truncate-fill":!0},`fill`);return Q(`div`,{"data-truncate-container":t,"data-truncate-variant":r,...i,children:Q(`div`,{"data-truncate-grid":!0,children:t===`truncate`?[a,o]:[o,a,s]})})}function sA({children:e,...t}){"use no memo";return Q(oA,{mode:`truncate`,...t,children:e})}function cA({children:e,...t}){"use no memo";return Q(oA,{mode:`fruncate`,...t,children:e})}function lA({children:e,contents:t,priority:n=`end`,split:r=`center`,minimumLength:i=12,className:a,style:o,...s}){"use no memo";let c=null,l=null;if(Array.isArray(t)){if(t.length!==2)return console.error(`MiddleTruncate: contents must be an array of two items`),null;c=Q(sA,{...s,children:t[0]}),l=Q(cA,{...s,children:t[1]})}else{if(typeof e!=`string`)return console.error(`MiddleTruncate: children must be a string`),null;if(e.length===0)return Q(`div`,{className:a,style:o});if(e.length<i)return Q(n===`end`?cA:sA,{...s,className:a,style:o,children:e});let t=null,u=null,d=null;if(typeof r==`string`)r===`center`?t=Qk:r===`extension`?t=$k:r===`leaf-path`&&(t=eA);else if(typeof r==`number`)t=tA,u=r;else if(Array.isArray(r)){let[e,n]=r;d=n,e===`last`?t=nA:e===`first`&&(t=rA)}else typeof r==`function`&&(t=r);t??=Qk;let[f,p]=t(e,{priority:n,variant:s.variant,splitIndex:typeof u==`number`?u:void 0,splitOffset:typeof d==`number`?d:void 0}),m=f.length>=p.length,h=n===`equal`&&!m,g=n===`equal`&&m,_={},v={};h&&(_.marker=``),g&&(v.marker=``),c=Q(sA,{...s,..._,children:f}),l=Q(cA,{...s,...v,children:p})}return Q(`div`,{"data-truncate-group-container":`middle`,className:a,style:o,children:[Q(`div`,{"data-truncate-segment-priority":n===`start`||n===`equal`?`1`:`2`,children:c}),Q(`div`,{"data-truncate-segment-priority":n===`end`||n===`equal`?`1`:`2`,children:l})]})}var uA={endIndex:-1,startIndex:-1};function dA(e,t,n){return Math.min(Math.max(e,t),n)}function fA(e,t){return e<0||t<e?uA:{endIndex:t,startIndex:e}}function pA(e){return e.startIndex<0||e.endIndex<e.startIndex}function mA(e,t){return pA(e)?0:(e.endIndex-e.startIndex+1)*t}function hA(e,t,n){if(t<=0)return-1;let r=t*n;return e<=0?0:e>=r?t:Math.floor(e/n)}function gA(e,t,n){return t<=0||e<=0?-1:e>=t*n?t-1:Math.ceil(e/n)-1}function _A(e){let t=new Map;return e.forEach((e,n)=>{if(e.kind!==`directory`||!e.isExpanded)return;let r=e.ancestorPaths.length,i=t.get(r);if(i==null){t.set(r,[n]);return}i.push(n)}),t}function vA(e,t){let n=0,r=e.length-1,i=-1;for(;n<=r;){let a=Math.floor((n+r)/2),o=e[a];if(o==null)break;if(o<=t){i=a,n=a+1;continue}r=a-1}return i}function yA(e){let t=new Map,n=[];for(let r=0;r<e.length;r+=1){let i=e[r];if(i==null)continue;let a=i.kind===`directory`&&i.isExpanded?[...i.ancestorPaths,i.path]:i.ancestorPaths,o=0;for(;o<n.length&&o<a.length&&n[o]===a[o];)o+=1;for(let e=n.length-1;e>=o;--e){let i=n[e];i!=null&&t.set(i,r-1)}n.length=o;for(let e=o;e<a.length;e+=1){let t=a[e];t!=null&&n.push(t)}}let r=e.length-1;for(let e of n)t.set(e,r);return t}function bA(e,t,n){if(e.length===0||t<=0)return[];let r=yA(e),i=_A(e),a=[];for(let r=0;r<e.length;r+=1){let o=i.get(r);if(o==null||o.length===0)break;let s=t+r*n,c=vA(o,Math.min(e.length-1,Math.floor(s/n))),l=null;for(;c>=0;){let t=o[c],n=t==null?null:e[t]??null;if(n!=null&&(r===0||n.ancestorPaths[r-1]===a[r-1]?.path)){l=n;break}--c}if(l==null)break;a.push(l)}return a.map((i,a)=>{let o=a*n,s=(r.get(i.path)??e.length-1)+1;if(s>=e.length)return{row:i,top:o};let c=s*n-t;return{row:i,top:Math.min(o,c-n)}}).filter(e=>e.top+n>0)}function xA(e,t){let n=t.totalRowCount??e.length,r=n*t.itemHeight,i=Math.max(0,t.viewportHeight),a=Math.max(0,Math.floor(t.overscan)),o=Math.max(0,r-i),s=dA(t.scrollTop,0,o),c=t.stickyRows??bA(e,s,t.itemHeight),l=c.reduce((e,n)=>Math.max(e,n.top+t.itemHeight),0),u=Math.min(r,s+l),d=Math.max(0,i-l),f=Math.max(0,r-u),p=hA(s,n,t.itemHeight),m=hA(u,n,t.itemHeight),h=l<=0||p<0||p>=n?-1:p,g=h===-1?-1:Math.min(n-1,m-1),_=h===-1||g<h?0:g-h+1,v=d<=0||m>=n?uA:fA(m,gA(u+d,n,t.itemHeight)),y=g+1,b=pA(v)?uA:fA(Math.max(y,v.startIndex-a),Math.min(n-1,v.endIndex+a)),x=mA(b,t.itemHeight);return{occlusion:{firstOccludedIndex:h,lastOccludedIndex:g,occludedCount:_},physical:{itemHeight:t.itemHeight,maxScrollTop:o,overscan:a,scrollTop:s,totalHeight:r,totalRowCount:n,viewportHeight:i},projected:{contentHeight:f,paneHeight:d,paneTop:u},sticky:{height:l,rows:c},visible:v,window:{endIndex:b.endIndex,height:x,offsetTop:pA(b)?0:b.startIndex*t.itemHeight,startIndex:b.startIndex}}}var SA={added:`A`,deleted:`D`,ignored:null,modified:`M`,renamed:`R`,untracked:`U`},CA={added:`Git status: added`,deleted:`Git status: deleted`,ignored:`Git status: ignored`,modified:`Git status: modified`,renamed:`Git status: renamed`,untracked:`Git status: untracked`},wA=`Contains git status items`;function TA(e){return e.current?!0:(e.current=!0,!1)}function EA(e){let{currentScrollTop:t,focusedIndex:n,itemHeight:r,topInset:i=0,viewportHeight:a}=e;if(n<0)return null;let o=Math.max(0,i),s=n*r,c=s+r;if(s<t+o){let e=Math.max(0,s-o);return e===t?null:e}if(c>t+a){let e=c-a;return e===t?null:e}return null}function DA(e){let{currentScrollTop:t,focusedIndex:n,itemHeight:r,offset:i,topInset:a=0,totalHeight:o,viewportHeight:s}=e;if(i===`nearest`)return EA({currentScrollTop:t,focusedIndex:n,itemHeight:r,topInset:a,viewportHeight:s});if(n<0)return null;let c=Math.max(0,a),l=n*r,u=Math.max(0,s-c),d=i===`center`?c+Math.max(0,(u-r)/2):c,f=Math.max(0,o-s),p=Math.max(0,Math.min(l-d,f));return p===t?null:p}function OA(e){let{currentScrollTop:t,focusedIndex:n,itemHeight:r,targetViewportOffset:i,totalHeight:a,viewportHeight:o}=e;if(n<0)return null;let s=Math.max(0,i),c=n*r,l=c+r,u=t+s,d=t+o;if(c>=u&&l<=d)return null;let f=Math.max(0,a-o),p=Math.max(0,Math.min(c-s,f));return p===t?null:p}function kA(e){if(e==null||!e.isConnected||e===document.body||e===document.documentElement)return!1;e.focus({preventScroll:!0});let t=e.getRootNode();return t instanceof ShadowRoot?t.activeElement===e:document.activeElement===e}function AA(e){let t=e.getRootNode();if(t instanceof ShadowRoot){let e=t.activeElement;return e instanceof HTMLElement?e:null}let n=document.activeElement;return n instanceof HTMLElement&&e.contains(n)?n:null}function jA(e,t){if(e==null)return t;let n=e.getBoundingClientRect().height;return n>0?n:e.clientHeight>0?e.clientHeight:t}function MA(e,t){return e!=null&&e>0?e:t}function NA(e){let t=e.borderBoxSize,n=Array.isArray(t)?t[0]:t;return n!=null&&Number.isFinite(n.blockSize)&&n.blockSize>0?n.blockSize:e.contentRect.height>0?e.contentRect.height:null}function PA(e,t,n,r,i=0){let a=EA({currentScrollTop:e.scrollTop,focusedIndex:t,itemHeight:n,topInset:i,viewportHeight:r});return a!=null&&(e.scrollTop=a,!0)}function FA(e,t,n,r,i,a,o=0){let s=DA({currentScrollTop:e.scrollTop,focusedIndex:t,itemHeight:n,offset:a,topInset:o,totalHeight:i,viewportHeight:r});return s!=null&&(e.scrollTop=s,!0)}function IA(e,t,n,r,i,a){let o=OA({currentScrollTop:e.scrollTop,focusedIndex:t,itemHeight:n,targetViewportOffset:a,totalHeight:i,viewportHeight:r});return o!=null&&(e.scrollTop=o,!0)}function LA(e,t,n,r){return n.end<n.start?null:e<n.start?-t:e>n.end?r:null}function RA(e){let{renamingPath:t,previousRenamingPath:n,hasRenderedInput:r}=e;return t==null?`reset`:r?n===t?`ignore`:`focus-input`:`reveal-canonical`}function zA({ariaLabel:e,isFlattened:t=!1,ref:n,value:r,onBlur:i,onInput:a}){return Q(`input`,{ref:n,"data-item-rename-input":!0,...t?{"data-item-flattened-rename-input":!0}:{},"aria-label":e,value:r,onBlur:i,onInput:a,onClick:e=>e.stopPropagation(),onMouseDown:e=>e.stopPropagation(),onPointerDown:e=>e.stopPropagation()})}function BA(e){let{row:t,mode:n,targetPath:r,ariaLabel:i,domId:a,isParked:o,itemHeight:s,features:c,state:l,extraStyle:u}=e,d=n===`sticky`,f=t.ancestorPaths.at(-1)??``,p={};return l.isFocusRinged&&(p[`data-item-focused`]=!0),t.isSelected&&(p[`data-item-selected`]=!0),l.isContextHovered&&(p[`data-item-context-hover`]=`true`),l.isDragTarget&&(p[`data-item-drag-target`]=!0),l.isDragging&&(p[`data-item-dragging`]=!0),l.effectiveGitStatus!=null&&(p[`data-item-git-status`]=l.effectiveGitStatus),l.containsGitChange&&(p[`data-item-contains-git-change`]=`true`),{"aria-expanded":!d&&t.kind===`directory`?t.isExpanded:void 0,"aria-haspopup":c.contextMenuEnabled?`menu`:void 0,"aria-label":i,"aria-level":d?void 0:t.level+1,"aria-posinset":d?void 0:t.posInSet+1,"aria-selected":d?void 0:t.isSelected?`true`:`false`,"aria-setsize":d?void 0:t.setSize,"data-file-tree-sticky-path":d?r:void 0,"data-file-tree-sticky-row":d?`true`:void 0,"data-item-context-menu-button-visibility":c.actionLaneEnabled?c.contextMenuButtonVisibility:void 0,"data-item-context-menu-trigger-mode":c.contextMenuEnabled?c.contextMenuTriggerMode:void 0,"data-item-has-context-menu-action-lane":c.actionLaneEnabled?`true`:void 0,"data-item-has-git-lane":c.gitLaneActive?`true`:void 0,"data-item-parent-path":f.length>0?f:void 0,"data-item-parked":o?`true`:void 0,"data-item-path":r,"data-item-type":t.kind===`directory`?`folder`:`file`,"data-type":`item`,id:d?void 0:a,role:d?void 0:`treeitem`,style:{minHeight:`${s}px`,...u},tabIndex:!d&&t.isFocused?0:-1,...p}}function VA(e){let{event:t,mode:n,isSearchOpen:r,isDirectory:i}=e,a=t.ctrlKey||t.metaKey,o=t.shiftKey||a,s=t.shiftKey?{additive:a,kind:`range`}:a?{kind:`toggle`}:{kind:`single`};return{closeSearch:r,revealCanonical:n===`sticky`,selection:s,toggleDirectory:!o&&i}}var HA,UA,WA,GA,KA=Object.is,qA=0,JA=[],YA=Z,XA=YA.__b,ZA=YA.__r,QA=YA.diffed,$A=YA.__c,ej=YA.unmount,tj=YA.__;function nj(e,t){YA.__h&&YA.__h(UA,e,qA||t),qA=0;var n=UA.__H||(UA.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function rj(e){return qA=1,ij(hj,e)}function ij(e,t,n){var r=nj(HA++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):hj(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);KA(t,n)||(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=UA,!UA.__f)){var i=function(e,t,n){if(!r.__c.__H)return!0;var i=r.__c.__H.__.filter(function(e){return!!e.__c});if(i.every(function(e){return!e.__N}))return!a||a.call(this,e,t,n);var o=r.__c.props!==e;return i.forEach(function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,KA(t,e.__[0])||(o=!0)}}),a&&a.call(this,e,t,n)||o};UA.__f=!0;var a=UA.shouldComponentUpdate,o=UA.componentWillUpdate;UA.componentWillUpdate=function(e,t,n){if(4&this.__g){var r=a;a=void 0,i(e,t,n),a=r}o&&o.call(this,e,t,n)},UA.shouldComponentUpdate=i}return r.__N||r.__}function aj(e,t){var n=nj(HA++,3);!YA.__s&&mj(n.__H,t)&&(n.__=e,n.u=t,UA.__H.__h.push(n))}function oj(e,t){var n=nj(HA++,4);!YA.__s&&mj(n.__H,t)&&(n.__=e,n.u=t,UA.__h.push(n))}function $(e){return qA=5,sj(function(){return{current:e}},[])}function sj(e,t){var n=nj(HA++,7);return mj(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function cj(e,t){return qA=8,sj(function(){return e},t)}function lj(){for(var e;e=JA.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(fj),e.__H.__h.forEach(pj),e.__H.__h=[]}catch(t){e.__H.__h=[],YA.__e(t,e.__v)}}YA.__b=function(e){UA=null,XA&&XA(e)},YA.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),tj&&tj(e,t)},YA.__r=function(e){ZA&&ZA(e),HA=0;var t=(UA=e.__c).__H;t&&(WA===UA?(t.__h=[],UA.__h=[],t.__.forEach(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.forEach(fj),t.__h.forEach(pj),t.__h=[],HA=0)),WA=UA},YA.diffed=function(e){QA&&QA(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(JA.push(t)!==1&&GA===YA.requestAnimationFrame||((GA=YA.requestAnimationFrame)||dj)(lj)),t.__H.__.forEach(function(e){e.u&&(e.__H=e.u),e.u=void 0})),WA=UA=null},YA.__c=function(e,t){t.some(function(e){try{e.__h.forEach(fj),e.__h=e.__h.filter(function(e){return!e.__||pj(e)})}catch(n){t.some(function(e){e.__h&&=[]}),t=[],YA.__e(n,e.__v)}}),$A&&$A(e,t)},YA.unmount=function(e){ej&&ej(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(e){try{fj(e)}catch(e){t=e}}),n.__H=void 0,t&&YA.__e(t,n.__v))};var uj=typeof requestAnimationFrame==`function`;function dj(e){var t,n=function(){clearTimeout(r),uj&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);uj&&(t=requestAnimationFrame(n))}function fj(e){var t=UA,n=e.__c;typeof n==`function`&&(e.__c=void 0,n()),UA=t}function pj(e){var t=UA;e.__c=e.__(),UA=t}function mj(e,t){return!e||e.length!==t.length||t.some(function(t,n){return!KA(t,e[n])})}function hj(e,t){return typeof t==`function`?t(e):t}function gj(e,t=null,n=null){"use no memo";let r=e.flattenedSegments;return r==null||r.length===0?t??e.name:Q(`span`,{"data-item-flattened-subitems":!0,children:r.map((e,i)=>{let a=i===r.length-1;return Q(xk,{children:[Q(`span`,{"data-item-flattened-subitem":e.path,"data-item-flattened-subitem-drag-target":n===e.path?`true`:void 0,children:a&&t!=null?t:Q(sA,{children:e.name})}),i<r.length-1?` / `:``]},e.path)})})}function _j(e){return e.isFlattened?e.flattenedSegments?.findLast(e=>e.isTerminal)?.path??e.path:e.path}function vj(e){let t=e.flattenedSegments;return t==null||t.length===0?e.name:t.map(e=>e.name).join(` / `)}function yj(e,t,n,r){return e.map((e,i)=>{let a=i*n,o=e.subtreeEndIndex+1;if(o>=r)return{row:e.row,top:a};let s=o*n-t;return{row:e.row,top:Math.min(a,s-n)}}).filter(e=>e.top+n>0)}function bj({controller:e,itemHeight:t,overscan:n,scrollTop:r,stickyFolders:i,viewportHeight:a}){let o=e.getVisibleCount(),s=i&&o>0?e.getStickyRowCandidates(r,t):[],c=s==null&&i&&o>0?e.getVisibleRows(0,o-1):[],l=xA(c,{itemHeight:t,overscan:n,scrollTop:r,stickyRows:s==null?void 0:yj(s,r,t,o),totalRowCount:o,viewportHeight:a}),u=i&&r<=0&&o>0?e.getStickyRowCandidates(1,t):[],d=u!=null&&r<=0?yj(u,1,t,o):i&&r<=0&&c.length>0?bA(c,1,t):l.sticky.rows;return{overlayHeight:d.reduce((e,n)=>Math.max(e,n.top+t),0),overlayRows:d,snapshot:l,visibleRows:c}}var xj=400,Sj=40,Cj=18;function wj(e,t,n){let r=e,i=document.elementFromPoint?.bind(document)??null,a=r.elementFromPoint?.(t,n)??i?.(t,n)??null;return e instanceof ShadowRoot&&(a==null||!e.contains(a))?Tj(e,t,n):a instanceof HTMLElement?a:null}function Tj(e,t,n){let r=Array.from(e.querySelectorAll(`[data-type="item"], [data-item-flattened-subitem]`));for(let e=r.length-1;e>=0;e--){let i=r[e],a=i.getBoundingClientRect();if(t>=a.left&&t<=a.right&&n>=a.top&&n<=a.bottom)return i}return null}function Ej(e){let t=e?.closest?.(`[data-type="item"]`);if(!(t instanceof HTMLElement))return null;let n=t.dataset.itemPath??null;if(n==null)return null;let r=e?.closest?.(`[data-item-flattened-subitem]`),i=r instanceof HTMLElement?r.getAttribute(`data-item-flattened-subitem`)??null:null;if(i!=null&&i.endsWith(`/`))return{directoryPath:i,flattenedSegmentPath:i,hoveredPath:n,kind:`directory`};if(t.dataset.itemType===`folder`)return{directoryPath:n,flattenedSegmentPath:null,hoveredPath:n,kind:`directory`};let a=t.dataset.itemParentPath??null;return a==null||a.length===0?{directoryPath:null,flattenedSegmentPath:null,hoveredPath:n,kind:`root`}:{directoryPath:a,flattenedSegmentPath:null,hoveredPath:n,kind:`directory`}}function Dj(e){let t=e.cloneNode(!0);return t.removeAttribute(`id`),t.dataset.fileTreeDragPreview=`true`,t.setAttribute(`aria-hidden`,`true`),t.tabIndex=-1,Object.assign(t.style,{boxShadow:`0 4px 12px rgba(0, 0, 0, 0.15)`,left:`0px`,margin:`0`,pointerEvents:`none`,position:`fixed`,top:`0px`,willChange:`transform`,zIndex:`10000`}),t}function Oj(){return navigator.vendor!==`Apple Computer, Inc.`}function kj(e,t){let n=e-t.top;if(n<Sj)return-Math.ceil((Sj-Math.max(0,n))/Sj*Cj);let r=t.bottom-e;return r<Sj?Math.ceil((Sj-Math.max(0,r))/Sj*Cj):0}function Aj(e,t){if(e!=null){let t=SA[e];return t==null?null:{text:t,title:CA[e]}}return t?{icon:{name:`file-tree-icon-dot`,width:6,height:6},title:wA}:null}function jj(e,t,n){if(t==null||t.size===0)return null;let r=[];for(let i=e.length-1;i>=0;--i){let a=e[i],o=n.get(a);if(o!=null){for(let e of r)n.set(e,o);return o?`ignored`:null}if(t.has(a)){n.set(a,!0);for(let e of r)n.set(e,!0);return`ignored`}r.push(a)}for(let e of r)n.set(e,!1);return null}function Mj(e){return e!=null&&`toggle`in e}function Nj(e){return e.code===`Space`||e.key===` `||e.key===`Spacebar`}function Pj(e){return e.key.length===1&&/^[\p{L}\p{N}]$/u.test(e.key)&&!e.ctrlKey&&!e.metaKey&&!e.altKey}function Fj(e){return e==null?``:`[data-item-section="spacing-item"][data-ancestor-path="${e.replaceAll(`\\`,`\\\\`).replaceAll(`"`,`\\"`)}"] { opacity: 1; }`}function Ij(e){return e.shiftKey&&e.key===`F10`||e.key===`ContextMenu`}function Lj(e,t){return t&&Ij(e)||(e.ctrlKey||e.metaKey)&&Nj(e)?!0:e.key===`ArrowDown`||e.key===`ArrowLeft`||e.key===`ArrowRight`||e.key===`ArrowUp`}var Rj=new Set([`ArrowDown`,`ArrowLeft`,`ArrowRight`,`ArrowUp`,`End`,`Home`,`PageDown`,`PageUp`]);function zj(e){for(let t of e.composedPath())if(t instanceof HTMLElement&&(t.dataset.fileTreeContextMenuRoot===`true`||t.dataset.type===`context-menu-anchor`||t.dataset.type===`context-menu-trigger`||t.getAttribute(`slot`)===`context-menu`))return!0;return!1}function Bj(e){return{bottom:e.bottom,height:e.height,left:e.left,right:e.right,top:e.top,width:e.width,x:e.x,y:e.y}}function Vj(e,t){return{bottom:t,height:0,left:e,right:e,top:t,width:0,x:e,y:t}}function Hj(e,t){if(e==null)return t.offsetTop;let n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return n.top-r.top}function Uj(e,t,n){if(n==null){e.delete(t);return}e.set(t,n)}function Wj(e,t,n){if(e==null)return null;let r=t.get(e)??null;if(r!=null)return r;let i=n.get(e)??null;return i?.dataset.itemParked===`true`?null:i}function Gj(e){if(e==null)return[];let t=[];for(let n of e.querySelectorAll(`button[data-file-tree-sticky-row="true"]`)){if(!(n instanceof HTMLElement))continue;let e=n.dataset.fileTreeStickyPath;e!=null&&t.push(e)}return t}function Kj(e,t){if(e==null||t==null)return null;for(let n of e.querySelectorAll(`button[data-item-focused="true"][data-item-parked="true"]`))if(n instanceof HTMLElement&&n.dataset.itemPath===t)return n;return null}function qj(e,t,n,r,i,a,o){let s=Math.max(0,a-i),c=t?.getBoundingClientRect()??null,l=c==null||n==null?null:n.getBoundingClientRect().top-c.top,u=Kj(e,r),d=c==null||u==null?null:u.getBoundingClientRect().top-c.top;return Math.max(0,Math.min(d??Math.max(l??0,s),Math.max(0,o-i)))}function Jj(e,t){return{kind:e.kind,name:vj(e),path:t}}function Yj(e){return e==null?void 0:`${e}__tree`}function Xj(e,t,n){if(e!=null)return`${e}__focused-item-${encodeURIComponent(t)}${n?`__parked`:``}`}function Zj(e){return e===`file-tree-icon-chevron`||e===`file-tree-icon-dot`||e===`file-tree-icon-file`||e===`file-tree-icon-lock`}function Qj(e,t){if(e==null)return null;if(`text`in e)return e.parts==null?Q(`span`,{title:e.title,children:e.text}):Q(`span`,{title:e.title,children:e.parts.map((e,t)=>Q(`span`,{style:{color:e.color},children:e.text},t))});let n=typeof e.icon==`string`?Zj(e.icon)?t(e.icon):{name:e.icon}:Zj(e.icon.name)?(()=>{let n=t(e.icon.name),{name:r,...i}=e.icon;return{...n,...i}})():e.icon;return Q(`span`,{title:e.title,children:Q(Jk,{...n})})}function $j(e){e!=null&&kA(e.querySelector([`button:not([disabled])`,`[href]`,`input:not([disabled])`,`select:not([disabled])`,`textarea:not([disabled])`,`[tabindex]:not([tabindex="-1"])`].join(`, `))??e)}function eM(e,t,{actionLaneEnabled:n=!1,customDecoration:r=null,decorationLaneEnabled:i=!1,dragTargetFlattenedSegmentPath:a=null,gitDecoration:o=null,gitLaneActive:s=!1,renameInput:c=null,showDecorativeActionAffordance:l=!1}={}){let u=_j(e);return Q(xk,{children:[e.depth>0?Q(`div`,{"data-item-section":`spacing`,children:Array.from({length:e.depth}).map((t,n)=>Q(`div`,{"data-item-section":`spacing-item`,"data-ancestor-path":e.ancestorPaths[n]},n))}):null,Q(`div`,{"data-item-section":`icon`,children:e.kind===`directory`?Q(Jk,{...t(`file-tree-icon-chevron`)}):Q(Jk,{...t(`file-tree-icon-file`,u)})}),Q(`div`,{"data-item-section":`content`,children:e.isFlattened?gj(e,c,a):c??Q(lA,{minimumLength:5,split:`extension`,children:e.name})}),i?Q(`div`,{"data-item-section":`decoration`,children:r==null?null:Qj(r,t)}):null,s?Q(`div`,{"data-item-section":`git`,children:Qj(o,t)}):null,n?Q(`div`,{"data-item-section":`action`,children:l?Q(`span`,{"aria-hidden":`true`,"data-item-action-affordance":`decorative`,children:Q(Jk,{...t(`file-tree-icon-ellipsis`)})}):null}):null]})}function tM(e,t,n,r={}){let{controller:i,renameView:a,visualFocusPath:o,contextHoverPath:s,draggedPathSet:c,dragTarget:l,dragAndDropEnabled:u,shouldSuppressContextMenu:d,handleRowDragStart:f,handleRowDragEnd:p,handleRowTouchStart:m,instanceId:h,itemHeight:g,gitStatusByPath:_,ignoredGitDirectories:v,ignoredInheritanceCache:y,directoriesWithGitChanges:b,gitLaneActive:x,contextMenuEnabled:S,contextMenuTriggerMode:C,contextMenuButtonTriggerEnabled:w,contextMenuButtonVisibility:T,contextMenuRightClickEnabled:E,registerRenameInput:D,registerButton:O,resolveIcon:k,renderDecorationForRow:A,openContextMenuForRow:ee,onRowClick:j,onKeyDown:te}=e,M=_j(t),{isParked:ne=!1,mode:re=`flow`,style:ie}=r,ae=re===`sticky`,oe=_?.get(M)??null??jj(t.ancestorPaths,v,y),se=t.kind===`directory`&&(b?.has(M)??!1),ce=A(t,M),le=Aj(oe,se),ue=S&&w,de=ce!=null||x||ue,fe=ue&&T===`always`,pe=a.getPath()===M,me=pe?a.getValue():``,he=ae||!pe?null:Q(zA,{ref:D,ariaLabel:`Rename ${vj(t)}`,isFlattened:t.isFlattened,value:me,onBlur:()=>{a.commit()},onInput:e=>{a.setValue(e.currentTarget.value)}}),ge=eM(t,k,{actionLaneEnabled:ue,customDecoration:ce,decorationLaneEnabled:de,dragTargetFlattenedSegmentPath:l?.flattenedSegmentPath??null,gitDecoration:le,gitLaneActive:x,renameInput:he,showDecorativeActionAffordance:fe}),_e={...BA({ariaLabel:vj(t),domId:t.isFocused?Xj(h,M,ne):void 0,extraStyle:ie,features:{actionLaneEnabled:ue,contextMenuButtonVisibility:ue?T:null,contextMenuEnabled:S,contextMenuTriggerMode:S?C:null,gitLaneActive:x},isParked:ne,itemHeight:g,mode:re,row:t,state:{containsGitChange:se,effectiveGitStatus:oe,isContextHovered:s===M,isDragTarget:l?.kind===`directory`&&l.directoryPath===M,isDragging:c?.has(M)===!0,isFocusRinged:t.isFocused&&o===M},targetPath:M}),key:n,onContextMenu:S||u?e=>{if(d()){e.preventDefault();return}S&&(e.preventDefault(),E&&(i.focusMountedPathFromInput(M),ee(t,M,{anchorRect:Vj(e.clientX,e.clientY),source:`right-click`})))}:void 0,onFocus:ae?void 0:()=>{i.focusMountedPathFromInput(M)},onKeyDown:ae?void 0:te,ref:e=>{O(M,e)}};return!ae&&pe?Q(`div`,{..._e,children:ge}):Q(`button`,{..._e,type:`button`,draggable:u&&!ne,onDragEnd:u&&!ne?p:void 0,onDragStart:u&&!ne?e=>{f(e,t,M)}:void 0,onMouseDown:e=>{if(ae){e.preventDefault();return}i.isSearchOpen()&&e.preventDefault()},onTouchStart:u&&!ne?e=>{m(e,t,M)}:void 0,onClick:e=>{j(e,t,M,re)},children:ge})}function nM(e,t,n){return t.end<t.start?[]:e.controller.getVisibleRows(t.start,t.end).filter(e=>!n.has(_j(e))).map((n,r)=>tM(e,n,t.start+r))}function rM({composition:e,controller:t,gitStatusByPath:n,ignoredGitDirectories:r,directoriesWithGitChanges:i,icons:a,instanceId:o,itemHeight:s=qD,overscan:c=10,renamingEnabled:l=!1,renderRowDecoration:u,searchBlurBehavior:d=`close`,searchEnabled:f=!1,searchFakeFocus:p=!1,slotHost:m,stickyFolders:h=!1,initialViewportHeight:g=420}){"use no memo";let _=$(null),v=$(null),y=$(!1),b=$(null),x=$(null),S=$(null),C=$(null),w=$(null),T=$(new Map),E=$(new Map),D=$(()=>{}),O=$(null),k=$(0),A=$(!1),ee=$(null);ee.current!==t&&(A.current=!1,ee.current=t);let j=$(!1),te=$(null),M=$(null),ne=$(!1),re=$(null),ie=$(null),ae=$(null),oe=$(null),se=$(null),ce=$(null),le=$(null),ue=$(null),de=$(!1),fe=$(null),pe=$(null),me=$(null),he=$(null),ge=sj(()=>new Map,[]),[,_e]=rj(0),ve=$(!1),[ye,be]=rj(null),[xe,Se]=rj(null),[Ce,we]=rj(null),[Te,Ee]=rj(null),[De,Oe]=rj(0),[N,ke]=rj(null),Ae=$(N);Ae.current=N;let je=$(null),Me=$(null),Ne=$(null),Pe=$(null),Fe=$(null),Ie=$(!1),Le=()=>{Me.current=null,Ne.current=null,Pe.current=null},Re=(e,t)=>{Me.current=e,Ne.current=null,Pe.current=t==null?null:{path:e,scrollTop:t}},ze=(e,t)=>{Me.current=null,Ne.current={path:e,viewportOffset:t},Pe.current=null},Be=$(d===`retain`&&t.isSearchOpen()),[Ve,He]=rj(p);aj(()=>{p||He(!1)},[p]);let Ue=$(!1),We=cj(()=>{Ue.current=!0,He(e=>e&&!1)},[]),[Ge,Ke]=rj(()=>bj({controller:t,itemHeight:s,overscan:c,scrollTop:0,stickyFolders:h,viewportHeight:g})),[qe,Je]=rj(!1);aj(()=>{Je(!0)},[]);let Ye=e?.contextMenu?.enabled===!0||e?.contextMenu?.render!=null||e?.contextMenu?.onOpen!=null||e?.contextMenu?.onClose!=null,Xe=e?.contextMenu?.triggerMode??(Ye?`right-click`:`both`),Ze=Xe===`both`||Xe===`button`,Qe=e?.contextMenu?.buttonVisibility??`when-needed`,$e=Xe===`both`||Xe===`right-click`;oj(()=>{let e=S.current;if(e==null)return;let t=e=>{if(!(e instanceof CustomEvent))return;let t=e.detail?.path??null;Fe.current=t,Se(t),Ee(t==null?null:`pointer`)},n=e=>{e instanceof CustomEvent&&(Ie.current=e.detail?.disabled===!0)};return e.addEventListener(`file-tree-debug-set-context-menu-trigger`,t),e.addEventListener(`file-tree-debug-set-scroll-suppression`,n),()=>{e.removeEventListener(`file-tree-debug-set-context-menu-trigger`,t),e.removeEventListener(`file-tree-debug-set-scroll-suppression`,n)}},[]);let et=cj((e,t)=>{Uj(T.current,e,t)},[]),tt=cj((e,t)=>{Uj(E.current,e,t)},[]),nt=cj(e=>{x.current=e},[]),P=cj(e=>Wj(e,E.current,T.current),[]),rt=n!=null||r!=null||i!=null,{resolveIcon:it}=sj(()=>fw(a),[a]),at=t[RO](),ot=at.getPath(),st=ot!=null,ct=t.isSearchOpen(),lt=t.getSearchValue(),F=t.getFocusedPath(),I=t.getFocusedIndex(),ut=t.getScrollRequest(),dt=t.isDragAndDropEnabled(),ft=t.getDragSession(),pt=sj(()=>ft==null?null:new Set(ft.draggedPaths),[ft]),mt=ft?.target??null,ht=ft?.primaryPath??null,gt=Yj(o),{overlayHeight:_t,overlayRows:vt,snapshot:L,visibleRows:yt}=Ge,bt=L.physical.viewportHeight,xt=sj(()=>({end:L.window.endIndex,start:L.window.startIndex}),[L.window.endIndex,L.window.startIndex]),St=vt,Ct=L.sticky.rows,wt=L.physical.totalHeight,Tt=L.sticky.height,Et=sj(()=>new Set(Ct.map(e=>_j(e.row))),[Ct]),Dt=I>=0&&I>=xt.start&&I<=xt.end,Ot=cj((e,t)=>u?.({item:Jj(e,t),row:e})??null,[u]),kt=cj(e=>kA(e==null?null:T.current.get(e)??null)?!0:kA(S.current),[]),At=cj(e=>{kt(t.focusNearestPath(e))},[t,kt]),jt=$(At);jt.current=At;let Mt=$(!0),Nt=$(()=>{}),Pt=cj((t=!0)=>{let n=Ae.current;n!=null&&(Mt.current=Mt.current&&t,ke(null),e?.contextMenu?.onClose?.(),Mt.current&&At(n.path))},[e?.contextMenu,At]);Nt.current=Pt;let Ft=cj(e=>{let t=e==null?null:Hj(S.current,e);we(e=>e===t?e:t)},[]),It=cj((e,n,r)=>{let i=t.getItem(n);if(i==null)return;let a=P(n);if(a?.dataset.fileTreeStickyRow===`true`){let e=C.current;Re(n,e?.scrollTop??null),j.current=!0,be(e=>e===n?e:n)}i.focus(),Ft(a),Mt.current=!0,ke({anchorRect:r?.anchorRect??null,item:Jj(e,n),path:n,source:r?.source??`keyboard`})},[t,P,Ft]),Lt=cj(e=>{if(l){if(t.isSearchOpen()){let e=C.current,t=jA(e,bt);re.current=I<0||e==null?null:Math.max(0,Math.min(I*s-e.scrollTop,Math.max(0,t-s))),ne.current=!0}t.startRenaming(e)!==!1&&(Ee(`focus`),_e(e=>e+1))}},[t,I,s,l,bt]),Rt=cj((e,{restoreTreeFocus:n=!0,targetOffset:r=`live-overlay`}={})=>{let i=C.current;if(i==null)return!1;t.focusPath(e);let a=t.getFocusedIndex();if(a<0)return!1;let o=t.getVisibleRows(a,a)[0]??null;if(o==null)return!1;let l=jA(i,bt),u=t.getVisibleCount()*s,d=r===`sticky-parents`?o.ancestorPaths.length*s:bj({controller:t,itemHeight:s,overscan:c,scrollTop:i.scrollTop,stickyFolders:h,viewportHeight:l}).snapshot.sticky.height;return j.current=!0,IA(i,a,s,l,u,d),D.current(),je.current=n?e:null,!0},[t,s,c,bt,h]),zt=()=>y.current===!0||he.current!=null||de.current===!0,Bt=e=>typeof window.requestAnimationFrame==`function`?window.requestAnimationFrame(()=>{e()}):window.setTimeout(e,16),Vt=e=>{if(e!=null){if(typeof window.cancelAnimationFrame==`function`){window.cancelAnimationFrame(e);return}window.clearTimeout(e)}},R=()=>{oe.current!=null&&(clearTimeout(oe.current),oe.current=null),ae.current=null},Ht=()=>{ce.current?.remove(),ce.current=null},Ut=()=>{Vt(ie.current),ie.current=null,se.current=null},Wt=e=>{let t=S.current?.getRootNode();if(t instanceof ShadowRoot){t.append(e);return}document.body.append(e)},Gt=()=>{ue.current?.(),ue.current=null,he.current!=null&&(clearTimeout(he.current),he.current=null),de.current=!1,fe.current=null,me.current=null,pe.current!=null&&(pe.current.setAttribute(`draggable`,`true`),pe.current.style.removeProperty(`touch-action`),pe.current=null),Ht(),R(),Ut(),le.current=null},Kt=(e,n)=>{let r=S.current?.getRootNode(),i=Ej(wj(r instanceof ShadowRoot?r:document,e,n));return t.setDragTarget(i),t.getDragSession()?.target??null},qt=e=>{let n=t.getDragAndDropConfig()?.openOnDropDelay??800;if(e==null||e.kind!==`directory`||e.directoryPath==null||n<=0){R();return}let r=t.getItem(e.directoryPath),i=Mj(r)?r:null;if(i==null||i.isExpanded()){R();return}let a=`${e.directoryPath}::${e.flattenedSegmentPath??``}`;ae.current!==a&&(R(),ae.current=a,oe.current=setTimeout(()=>{let n=t.getDragSession()?.target;n?.kind===`directory`&&n.directoryPath===e.directoryPath&&n.flattenedSegmentPath===e.flattenedSegmentPath&&i.expand()},n))},Jt=()=>{ie.current=null;let e=se.current,n=C.current;if(e==null||n==null||t.getDragSession()==null)return;let r=n.getBoundingClientRect(),i=kj(e.clientY,r);if(i===0)return;let a=Math.max(0,n.scrollHeight-n.clientHeight),o=Math.max(0,Math.min(a,n.scrollTop+i));o!==n.scrollTop&&(n.scrollTop=o,D.current()),qt(Kt(e.clientX,e.clientY)),ie.current=Bt(Jt)},Yt=(e,t)=>{se.current={clientX:e,clientY:t},ie.current??=Bt(Jt)},Xt=(e,n,r)=>{let i=e.currentTarget;if(i!=null){if(Gt(),Ht(),R(),Ut(),t.startDrag(r)===!1){e.preventDefault();return}if(le.current=n,e.dataTransfer!=null&&(e.dataTransfer.effectAllowed=`move`,e.dataTransfer.dropEffect=`move`,e.dataTransfer.setData(`text/plain`,r),Oj())){let t=Dj(i),n=i.getBoundingClientRect();Object.assign(t.style,{height:`${n.height}px`,opacity:`0.85`,transform:`translate3d(-9999px, 0px, 0)`,width:`${n.width}px`}),Wt(t),ce.current=t,e.dataTransfer.setDragImage(t,Math.max(0,e.clientX-n.left),Math.max(0,e.clientY-n.top))}}},Zt=()=>{Ht(),R(),Ut(),le.current=null,t.cancelDrag()},Qt=(e,n,r)=>{if(he.current!=null||de.current)return;let i=e.touches[0],a=e.currentTarget;if(i==null||a==null)return;me.current={clientX:i.clientX,clientY:i.clientY},pe.current=a,a.setAttribute(`draggable`,`false`);let o=(e={})=>{let t=e.restoreNativeDraggable??!de.current;he.current!=null&&(clearTimeout(he.current),he.current=null),document.removeEventListener(`touchmove`,s),document.removeEventListener(`touchend`,c),document.removeEventListener(`touchcancel`,c),ue.current===o&&(ue.current=null),t&&(a.setAttribute(`draggable`,`true`),pe.current===a&&(pe.current=null),me.current=null)},s=e=>{let t=e.touches[0],n=me.current;if(t==null||n==null)return;let r=t.clientX-n.clientX,i=t.clientY-n.clientY;r*r+i*i<=100||o()},c=()=>{o()};document.addEventListener(`touchmove`,s,{passive:!0}),document.addEventListener(`touchend`,c),document.addEventListener(`touchcancel`,c),ue.current=o,he.current=setTimeout(()=>{if(o({restoreNativeDraggable:!1}),t.startDrag(r)===!1){a.setAttribute(`draggable`,`true`),pe.current===a&&(pe.current=null),me.current=null;return}de.current=!0,pe.current=a,a.setAttribute(`draggable`,`false`),a.style.setProperty(`touch-action`,`none`),le.current=n;let e=a.getBoundingClientRect(),s=Dj(a);Object.assign(s.style,{height:`${e.height}px`,opacity:`0.85`,transform:`translate3d(${e.left}px, ${e.top}px, 0)`,width:`${e.width}px`}),Wt(s),ce.current=s,fe.current={x:i.clientX-e.left,y:i.clientY-e.top};let c=e=>{let t=e.touches[0];if(t==null)return;e.preventDefault();let n=fe.current;n!=null&&ce.current!=null&&(ce.current.style.transform=`translate3d(${t.clientX-n.x}px, ${t.clientY-n.y}px, 0)`),qt(Kt(t.clientX,t.clientY)),Yt(t.clientX,t.clientY)},l=e=>{let n=e.changedTouches[0];n!=null&&Kt(n.clientX,n.clientY),t.completeDrag(),Gt()},u=()=>{t.cancelDrag(),Gt()};ue.current=()=>{document.removeEventListener(`touchmove`,c),document.removeEventListener(`touchend`,l),document.removeEventListener(`touchcancel`,u)},document.addEventListener(`touchmove`,c,{passive:!1}),document.addEventListener(`touchend`,l),document.addEventListener(`touchcancel`,u)},xj)},$t=e=>{if(N!=null){if(e.key===`Escape`){Pt(),e.preventDefault(),e.stopPropagation();return}Rj.has(e.key)&&(e.preventDefault(),e.stopPropagation());return}if(at.isActive()){if(e.isComposing||e.keyCode===229)return;if(e.key===`Escape`)at.cancel();else if(e.key===`Enter`)at.commit();else return;Ee(`focus`),_e(e=>e+1),e.preventDefault(),e.stopPropagation();return}if(l&&e.key===`F2`){Lt(F??void 0),e.preventDefault(),e.stopPropagation();return}if(ct){if(e.key===`Escape`)ne.current=!1,re.current=null,t.closeSearch();else if(e.key===`Enter`){let e=t.getFocusedPath();e!=null&&t.selectOnlyPath(e);let n=C.current,r=jA(n,bt);re.current=I<0||n==null?null:Math.max(0,Math.min(I*s-n.scrollTop,Math.max(0,r-s))),ne.current=!0,t.closeSearch()}else if(e.key===`ArrowDown`)t.focusNextSearchMatch();else if(e.key===`ArrowUp`)t.focusPreviousSearchMatch();else return;Ee(`focus`),_e(e=>e+1),e.preventDefault(),e.stopPropagation();return}if(f&&Pj(e)){t.openSearch(e.key),_e(e=>e+1),e.preventDefault(),e.stopPropagation();return}let n=Ye&&Ij(e),r=Lj(e,Ye),i=r&&S.current!=null?AA(S.current):null,a=r?new Set(Gj(S.current)):new Set,o=i?.dataset.fileTreeStickyPath??null,c=i?.dataset.fileTreeStickyRow===`true`&&o!=null;if(c&&o!==F&&a.has(o)){let e=C.current;Re(o,e?.scrollTop??null),t.focusPath(o)}let u=t.getFocusedPath(),d=t.getFocusedIndex(),p=t.getFocusedItem();if(p==null)return;let m=Mj(p)?p:null,h=u!=null&&(Et.has(u)||c&&o===u&&a.has(u)),g=e.key===`ArrowDown`||e.key===`ArrowUp`||e.key===`ArrowRight`&&m!=null&&m.isExpanded(),_=e.key===`ArrowLeft`&&h&&m!=null&&m.isExpanded(),v=C.current,y=!0;if(e.shiftKey&&e.key===`ArrowDown`)t.extendSelectionFromFocused(1);else if(e.shiftKey&&e.key===`ArrowUp`)t.extendSelectionFromFocused(-1);else if(n&&u!=null&&d>=0){let e=t.getVisibleRows(d,d)[0]??null,n=Wj(u,E.current,T.current);e==null||n==null?y=!1:It(e,u)}else if((e.ctrlKey||e.metaKey)&&Nj(e))t.toggleFocusedSelection();else if((e.ctrlKey||e.metaKey)&&e.key.toLowerCase()===`a`)t.selectAllVisiblePaths();else switch(e.key){case`ArrowDown`:t.focusNextItem();break;case`ArrowUp`:t.focusPreviousItem();break;case`ArrowRight`:m==null||m.isExpanded()?t.focusNextItem():m.expand();break;case`ArrowLeft`:m!=null&&m.isExpanded()?m.collapse():t.focusParentItem();break;case`Home`:t.focusFirstItem();break;case`End`:t.focusLastItem();break;default:y=!1}if(!y)return;Ee(`focus`);let b=t.getFocusedPath(),x=b!=null&&(Et.has(b)||a.has(b)),w=g&&b!==u,D=n&&c&&o===u&&b===u;if((h||D)&&b!=null&&(w&&x||D))Re(b,v?.scrollTop??null),j.current=!0,be(e=>e===b?e:b);else{let t=e.key===`ArrowUp`&&h&&b!==u;b!=null&&(t||_&&b===u)?(ze(b,qj(S.current,v,i,u,s,Tt,bt)),j.current=!0,be(e=>e===b?e:b)):Le()}_e(e=>e+1),e.preventDefault(),e.stopPropagation()};oj(()=>{if(f&&ct){if(Be.current){Be.current=!1;return}kA(w.current)}},[ct,f]),oj(()=>{let e=x.current;switch(RA({hasRenderedInput:e!=null,previousRenamingPath:M.current,renamingPath:ot})){case`reset`:M.current=null;return;case`reveal-canonical`:ot!=null&&Rt(ot,{restoreTreeFocus:!1,targetOffset:`live-overlay`});return;case`ignore`:return;case`focus-input`:e!=null&&(je.current=null,M.current=ot,kA(e),e.select());return}},[xt.end,xt.start,ot,Rt,Et]),oj(()=>{let e=S.current;if(e==null)return;let t=null,n=()=>{t!=null&&(clearTimeout(t),t=null)},r=()=>{let t=AA(e)?.dataset.itemPath??null;be(e=>e===t?e:t)},i=()=>{n(),j.current=!0,r()},a=i=>{let a=i.relatedTarget;if(a==null){n(),t=setTimeout(()=>{if(t=null,AA(e)!=null){r();return}j.current=!1,be(null)},0);return}if(!(a instanceof Node)||!e.contains(a)){n(),j.current=!1,be(null);return}let o=a instanceof HTMLElement?a.dataset.itemPath??null:null;be(e=>e===o?e:o)};return e.addEventListener(`focusin`,i),e.addEventListener(`focusout`,a),()=>{n(),e.removeEventListener(`focusin`,i),e.removeEventListener(`focusout`,a)}},[]),oj(()=>{let e=S.current;e!=null&&(L.physical.scrollTop<=0?e.dataset.scrollAtTop=`true`:delete e.dataset.scrollAtTop)},[L.physical.scrollTop]),oj(()=>{let e=null,n=C.current,r=b.current,i=S.current;if(n==null)return;O.current=jA(n,g);let a=()=>{let e=t.getVisibleCount(),r=MA(O.current,g),i=Math.max(0,e*s-r);n.scrollTop>i&&(n.scrollTop=i),Ke(bj({controller:t,itemHeight:s,overscan:c,scrollTop:Math.min(n.scrollTop,i),stickyFolders:h,viewportHeight:r}))};if(!A.current){A.current=!0;let e=t.getFocusedIndex();if(e>=0){let r=MA(O.current,g),i=t.getVisibleRows(e,e)[0]??null;PA(n,e,s,r,h&&i!=null?Math.max(0,Math.min(i.ancestorPaths.length*s,Math.max(0,r-s))):0)}}D.current=a;let o=t.subscribe(()=>{TA(ve)&&_e(e=>e+1),a()}),l=()=>{Ie.current!==!0&&(r!=null&&(r.dataset.isScrolling??=``),i!=null&&(i.dataset.isScrolling??=``),y.current=!0,e!=null&&clearTimeout(e),e=setTimeout(()=>{r!=null&&delete r.dataset.isScrolling,i!=null&&delete i.dataset.isScrolling,y.current=!1,Oe(e=>e+1),e=null},50))},u=null,d=()=>{i!=null&&delete i.dataset.overlayReveal,u!=null&&(clearTimeout(u),u=null)},f=()=>{i!=null&&Ie.current!==!0&&(n.scrollTop>0||(i.dataset.overlayReveal=`true`,u!=null&&clearTimeout(u),u=setTimeout(()=>{d()},200)))},p=()=>{if(a(),n.scrollTop>0&&d(),Ae.current!=null&&y.current&&Nt.current(),Ie.current===!0){y.current=!1;return}Se(e=>e==null?e:null),l()},m=()=>{l(),f()},_=new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`PageUp`,`PageDown`,`Home`,`End`,` `,`Spacebar`]),v=e=>{_.has(e.key)&&m()};n.addEventListener(`scroll`,p,{passive:!0}),n.addEventListener(`wheel`,m,{passive:!0}),n.addEventListener(`touchmove`,m,{passive:!0}),n.addEventListener(`keydown`,v);let x=typeof ResizeObserver<`u`?new ResizeObserver(e=>{O.current=(e[0]==null?null:NA(e[0]))??jA(n,g),a()}):null;return x?.observe(n),()=>{D.current=()=>{},o(),n.removeEventListener(`scroll`,p),n.removeEventListener(`wheel`,m),n.removeEventListener(`touchmove`,m),n.removeEventListener(`keydown`,v),e!=null&&clearTimeout(e),u!=null&&clearTimeout(u),r!=null&&delete r.dataset.isScrolling,i!=null&&(delete i.dataset.isScrolling,delete i.dataset.overlayReveal),y.current=!1,O.current=null,x?.disconnect()}},[t,g,s,c,h]),oj(()=>{Ye||N==null||Pt(!1)},[Pt,Ye,N]);let en=sj(()=>N==null?null:`${N.path}::${N.source}`,[N]);oj(()=>{if(en==null){m?.clearSlotContent(iw);return}let t=Ae.current;if(t==null)return;let n=v.current??_.current;if(n==null)return;let r={anchorElement:n,anchorRect:t.anchorRect??Bj(n.getBoundingClientRect()),close:e=>{Nt.current(e?.restoreFocus??!0)},restoreFocus:()=>{Mt.current&&jt.current(Ae.current?.path??null)}},i=e?.contextMenu?.render?.(t.item,r)??null;return m?.setSlotContent(iw,i),e?.contextMenu?.onOpen?.(t.item,r),$j(i),queueMicrotask(()=>{i!=null&&i.isConnected&&document.activeElement===i&&$j(i)}),()=>{m?.clearSlotContent(iw)}},[en,e?.contextMenu,m]),oj(()=>{N!=null&&t.getItem(N.path)==null&&Pt()},[Pt,N,t]),oj(()=>{if(N==null)return;let e=S.current?.getRootNode(),t=e instanceof ShadowRoot?e.host:S.current,n=e=>{let n=e.target;n instanceof Node&&(zj(e)||_.current?.contains(n)!==!0&&t?.contains(n)!==!0&&Pt())},r=e=>{e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),Pt())};return document.addEventListener(`mousedown`,n,!0),document.addEventListener(`keydown`,r,!0),()=>{document.removeEventListener(`mousedown`,n,!0),document.removeEventListener(`keydown`,r,!0)}},[Pt,N]),oj(()=>{let e=C.current,n=S.current;if(e==null||n==null){te.current=F;return}let r=F==null?null:T.current.get(F)??null,i=AA(n),a=i?.dataset.itemPath??null,o=st&&x.current===i,c=f&&w.current===i,l=ne.current&&!ct,u=re.current??0,d=je.current,p=Me.current,m=Ne.current,g=Pe.current,_=i!=null,v=j.current||_,y=te.current!==F,b=p!=null&&p===F&&F!=null,E=!1,O=!1;if(ut!=null&&ut.id!==k.current){k.current=ut.id;let n=ut.visibleIndex,r=t.getVisibleRows(n,n)[0]??null;if(r!=null){let t=h?Math.max(0,Math.min(r.ancestorPaths.length*s,Math.max(0,bt-s))):Tt;E=!0,O=FA(e,n,s,bt,wt,ut.offset,t)}t.clearScrollRequest(ut.id)}let A=!E&&l&&IA(e,I,s,bt,wt,u),ee=!E&&d!=null&&d===F&&IA(e,I,s,bt,wt,Tt),M=!E&&m!=null&&m.path===F&&IA(e,I,s,bt,wt,m.viewportOffset),ie=!E&&g!=null&&g.path===F&&e.scrollTop!==g.scrollTop;if(ie&&(e.scrollTop=g.scrollTop),(ie||O||ee||M||A||v&&y&&d!==F&&!b&&PA(e,I,s,bt,Tt))&&D.current(),E){te.current=F;return}if(!v){te.current=F;return}if(o){te.current=F;return}if(c&&!l){te.current=F;return}if(r==null){l&&I>=0&&(IA(e,I,s,bt,wt,u),D.current()),te.current=F;return}(y||l||d===F||p===F||m?.path===F||g?.path===F||a==null||a!==F)&&(kA(r),d===F&&(je.current=null),p===F&&(Me.current=null),m?.path===F&&(Ne.current=null),g?.path===F&&(Pe.current=null),ne.current=!1,re.current=null),te.current=F},[t,I,F,Dt,s,st,ct,xt,bt,f,ut,h,Tt,wt,yt]);let tn=I>=0&&I>=L.visible.startIndex&&I<=L.visible.endIndex,nn=F!=null&&St.some(e=>_j(e.row)===F),rn=tn||nn,an=Ze&&j.current===!0&&rn?F:null,on=Te===`pointer`?xe:null,sn=N?.path??Fe.current??on??an??xe,cn=N?.source===`right-click`;oj(()=>{y.current&&N==null||Ft(P(sn))},[N,P,xt,bt,De,St,sn,Ft,yt]);let z=cj(e=>{if(y.current||zj(e))return;let t=e.target;if(!(t instanceof HTMLElement)||t.closest?.(`[data-type="context-menu-trigger"]`)!=null)return;let n=t.closest?.(`[data-file-tree-sticky-row="true"]`),r=t.closest?.(`[data-type="item"]`),i=n instanceof HTMLElement?n.dataset.fileTreeStickyPath??null:r instanceof HTMLElement?r.dataset.itemPath??null:null;i!=null&&Ee(e=>e===`pointer`?e:`pointer`),Se(e=>e===i?e:i)},[]),ln=cj(()=>{Se(null)},[]);oj(()=>{if(!dt)return;let e=()=>{Gt(),t.cancelDrag()};return window.addEventListener(`dragend`,e),()=>{window.removeEventListener(`dragend`,e),Gt(),t.cancelDrag()}},[t,dt]);let un=e=>{if(!dt||t.getDragSession()==null||de.current)return;let n=Ej(e.target instanceof HTMLElement?e.target:null);t.setDragTarget(n),qt(t.getDragSession()?.target??null),Yt(e.clientX,e.clientY),e.dataTransfer!=null&&(e.dataTransfer.dropEffect=`move`),e.preventDefault()},dn=e=>{if(!dt||t.getDragSession()==null||de.current)return;let n=e.relatedTarget;n instanceof Node&&S.current?.contains(n)===!0||(R(),Ut(),t.setDragTarget(null))},fn=e=>{dt&&t.getDragSession()!=null&&!de.current&&(e.preventDefault(),Kt(e.clientX,e.clientY),t.completeDrag(),Ht(),R(),Ut(),le.current=null)},pn=L.window.height,mn=L.window.offsetTop,hn=Math.min(0,bt-pn),gn=Math.min(0,bt-pn-Tt),_n=ye===F||ne.current,vn=F!=null&&_n&&!Dt&&I>=0?yt[I]??t.getVisibleRows(I,I)[0]??null:null,yn=vn==null?null:LA(I,s,xt,pn),bn=le.current,xn=ht!=null&&bn!=null&&bn.path===ht&&bn.index>=xt.start&&bn.index<=xt.end,Sn=ht!=null&&bn!=null&&bn.path===ht&&!xn&&bn.path!==vn?.path?bn:null,Cn=Sn==null?null:LA(Sn.index,s,xt,pn),wn=Fj((I>=0?yt[I]??t.getVisibleRows(I,I)[0]??null:null)?.ancestorPaths.at(-1)??null),Tn=ct&&F!=null?Xj(o,F,!Dt):void 0,En=N?.path??(ct?F:ye),Dn=N?.path??xe,On=P(sn),kn=Ye&&Ze&&!cn&&!st&&On!=null&&Ce!=null&&sn!=null,An=Ye&&(kn||N!=null),jn=N?.anchorRect,Mn=jn==null&&On!=null&&Ce!=null&&(N!=null||kn)?Ce:null,Nn=jn==null?Mn==null?void 0:{top:`${Mn}px`}:{left:`${jn.left}px`,position:`fixed`,right:`auto`,top:`${jn.top}px`},Pn=cn?{opacity:`0`}:void 0,Fn=cj((e,n,r,i)=>{let a=VA({event:{ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey},isDirectory:n.kind===`directory`,isSearchOpen:ct,mode:i}),o=a.toggleDirectory&&n.kind===`directory`,s=o?t.resolveMountedDirectoryPathFromInput(r):null;if(o&&s==null)return;let c=s??r;switch(a.selection.kind){case`range`:t.selectPathRange(c,a.selection.additive);break;case`toggle`:t.togglePathSelectionFromInput(c);break;case`single`:t.selectOnlyMountedPathFromInput(c)}let l=e.currentTarget instanceof HTMLElement?e.currentTarget:null,u=n.index>=L.visible.startIndex&&n.index<=L.visible.endIndex,d=i===`flow`&&u&&l!=null&&l.dataset.itemParked!==`true`;t.focusMountedPathFromInput(c),d&&(j.current=!0,be(e=>e===c?e:c),Ee(`focus`)),o&&t.toggleMountedDirectoryFromInput(c),a.closeSearch&&t.closeSearch(),a.revealCanonical&&Rt(c,{targetOffset:`sticky-parents`})},[t,ct,L.visible.endIndex,L.visible.startIndex,Rt]),In=()=>{if(y.current||!Ze||sn==null||On==null)return;let e=t.getItem(sn);e!=null&&(Ft(On),Mt.current=!0,ke({anchorRect:null,item:{kind:e.isDirectory()?`directory`:`file`,name:On.getAttribute(`aria-label`)??sn,path:e.getPath()},path:e.getPath(),source:`button`}))},Ln={contextHoverPath:Dn,contextMenuButtonTriggerEnabled:Ze,contextMenuButtonVisibility:Qe,contextMenuEnabled:Ye,contextMenuRightClickEnabled:$e,contextMenuTriggerMode:Xe,controller:t,directoriesWithGitChanges:i,dragAndDropEnabled:dt,draggedPathSet:pt,dragTarget:mt,gitLaneActive:rt,gitStatusByPath:n,handleRowDragEnd:Zt,handleRowDragStart:Xt,handleRowTouchStart:Qt,ignoredGitDirectories:r,ignoredInheritanceCache:ge,instanceId:o,itemHeight:s,onKeyDown:$t,onRowClick:Fn,openContextMenuForRow:It,registerButton:et,registerRenameInput:nt,renameView:at,renderDecorationForRow:Ot,resolveIcon:it,shouldSuppressContextMenu:zt,visualFocusPath:En},Rn={...Ln,registerButton:tt};return Q(`div`,{ref:S,id:gt,"data-file-tree-context-menu-button-visibility":Ye&&Ze?Qe:void 0,"data-file-tree-context-menu-trigger-mode":Ye?Xe:void 0,"data-file-tree-has-context-menu-action-lane":Ye&&Ze?`true`:void 0,"data-file-tree-has-git-lane":rt?`true`:void 0,"data-file-tree-virtualized-root":`true`,onDragLeave:dt?dn:void 0,onDragOver:dt?un:void 0,onDrop:dt?fn:void 0,onKeyDown:$t,onPointerLeave:Ye?ln:void 0,onPointerOver:Ye?z:void 0,role:`tree`,tabIndex:-1,style:{outline:`none`,position:`relative`},children:[Q(`style`,{"data-file-tree-guide-style":`true`,dangerouslySetInnerHTML:{__html:wn}}),Q(`slot`,{name:rw,"data-type":`header-slot`}),f?Q(`div`,{"data-file-tree-search-container":!0,"data-open":ct?`true`:`false`,children:Q(`input`,{ref:w,"aria-activedescendant":Tn,"aria-controls":gt,placeholder:`Search…`,"data-file-tree-search-input":!0,"data-file-tree-search-input-fake-focus":Ve?`true`:void 0,value:lt,onBlur:()=>{(d!==`retain`||Ue.current)&&t.closeSearch()},onFocus:We,onPointerDown:We,onInput:e=>{We();let n=e.currentTarget;t.setSearch(n.value)}})}):null,Q(`div`,{ref:C,"data-file-tree-virtualized-scroll":`true`,children:[h&&qe&&St.length>0?Q(`div`,{"aria-hidden":`true`,"data-file-tree-sticky-overlay":`true`,children:Q(`div`,{"data-file-tree-sticky-overlay-content":`true`,style:{height:`${_t}px`},children:St.map((e,t)=>tM(Rn,e.row,`sticky:${_j(e.row)}`,{mode:`sticky`,style:{left:`0`,position:`absolute`,right:`0`,top:`${e.top}px`,zIndex:`${St.length-t}`}}))})}):null,Q(`div`,{ref:b,"data-file-tree-virtualized-list":`true`,style:{height:`${wt}px`},children:[Q(`div`,{"data-file-tree-virtualized-sticky-offset":`true`,"aria-hidden":`true`,style:{height:`${mn}px`}}),Q(`div`,{"data-file-tree-virtualized-sticky":`true`,style:{height:`${pn}px`,top:`${hn}px`,bottom:`${gn}px`},children:[nM(Ln,xt,Et),vn!=null&&yn!=null?tM(Ln,vn,`parked:${vn.path}`,{isParked:!0,style:{left:`0`,opacity:`0`,pointerEvents:ht===vn.path?`none`:void 0,position:`absolute`,right:`0`,top:`${yn}px`}}):null,Sn!=null&&Cn!=null?tM(Ln,Sn,`parked-drag:${Sn.path}`,{isParked:!0,style:{left:`0`,opacity:`0`,pointerEvents:`none`,position:`absolute`,right:`0`,top:`${Cn}px`}}):null]})]})]}),Ye?Q(`div`,{ref:_,"data-type":`context-menu-anchor`,"data-visible":An?`true`:`false`,style:Nn,children:[Q(`button`,{ref:v,type:`button`,"data-type":aw,"aria-label":`Options`,"aria-haspopup":`menu`,"aria-expanded":N==null?`false`:`true`,"data-visible":kn?`true`:`false`,onMouseDown:e=>{e.preventDefault()},onClick:e=>{if(e.preventDefault(),e.stopPropagation(),N!=null){Pt();return}In()},tabIndex:-1,style:Pn,children:Q(Jk,{...it(`file-tree-icon-ellipsis`)})}),N==null?null:Q(`slot`,{name:iw})]}):null,N==null?null:Q(`div`,{"data-type":`context-menu-wash`,"aria-hidden":`true`,onMouseDownCapture:e=>{e.preventDefault(),Pt()},onTouchStartCapture:e=>{e.preventDefault(),e.stopPropagation(),Pt()},onTouchMoveCapture:e=>{e.preventDefault(),e.stopPropagation()},onWheelCapture:e=>{e.preventDefault(),e.stopPropagation()}})]})}var iM={hydrateRoot:(e,t)=>{Uk(yk(rM,t),e)},renderRoot:(e,t)=>{Hk(yk(rM,t),e)},unmountRoot:e=>{Hk(null,e)}};function aM(e,t){iM.renderRoot(e,t)}function oM(e,t){iM.hydrateRoot(e,t)}function sM(e){iM.unmountRoot(e)}var cM=class{#e=new Map;#t=null;clearAll(){for(let e of this.#e.values())e.remove();this.#e.clear()}clearSlotContent(e){let t=this.#n(e);t!=null&&(t.remove(),this.#e.delete(e))}setHost(e){if(this.#t=e,e!=null){this.#i(e);for(let[e,t]of this.#e)this.#r(e,t)}}setSlotContent(e,t){let n=this.#n(e);if(n===t){t!=null&&(this.#e.set(e,t),this.#r(e,t));return}if(n?.remove(),t==null){this.#e.delete(e);return}this.#e.set(e,t),this.#r(e,t)}setSlotHtml(e,t){let n=t?.trim()??``;if(n.length===0){this.setSlotContent(e,null);return}let r=this.#n(e);if(r!=null&&r.innerHTML===n){this.#e.set(e,r),this.#r(e,r);return}let i=document.createElement(`div`);i.innerHTML=n,this.setSlotContent(e,i)}#n(e){let t=this.#e.get(e)??null;if(t!=null)return t;let n=this.#t;if(n==null)return null;for(let t of Array.from(n.children))if(t instanceof HTMLElement&&t.dataset.fileTreeManagedSlot===e)return t;return null}#r(e,t){t.slot=e,t.dataset.fileTreeManagedSlot=e,this.#t!=null&&t.parentNode!==this.#t&&this.#t.appendChild(t)}#i(e){for(let t of Array.from(e.children)){if(!(t instanceof HTMLElement))continue;let e=t.dataset.fileTreeManagedSlot;e==null||this.#e.has(e)||this.#e.set(e,t)}}};function lM(e,t,n){if(!e.s){if(n instanceof uM){if(!n.s)return void(n.o=lM.bind(null,e,t));1&t&&(t=n.s),n=n.v}if(n&&n.then)return void n.then(lM.bind(null,e,t),lM.bind(null,e,2));e.s=t,e.v=n;let r=e.o;r&&r(e)}}var uM=function(){function e(){}return e.prototype.then=function(t,n){var r=new e,i=this.s;if(i){var a=1&i?t:n;if(a){try{lM(r,1,a(this.v))}catch(e){lM(r,2,e)}return r}return this}return this.o=function(e){try{var i=e.v;1&e.s?lM(r,1,t?t(i):i):n?lM(r,1,n(i)):lM(r,2,i)}catch(e){lM(r,2,e)}},r},e}();Array.isArray;var dM=0;function fM(e){return e!=null&&e.length>0?e:(dM+=1,`pst_ft_${dM}`)}function pM({initialVisibleRowCount:e,itemHeight:t}){return e==null?420:Math.max(0,e)*(t??qD)}function mM(e){if(typeof document>`u`)return;let t=document.createElement(`div`);t.innerHTML=e;let n=t.querySelector(`svg`);return n instanceof SVGElement?n:void 0}function hM(e){return e.querySelector(`#file-tree-icon-chevron`)instanceof SVGElement&&e.querySelector(`#file-tree-icon-file`)instanceof SVGElement&&e.querySelector(`#file-tree-icon-dot`)instanceof SVGElement&&e.querySelector(`#file-tree-icon-lock`)instanceof SVGElement}function gM(e){return Array.from(e.children).filter(e=>e instanceof SVGElement)}var _M=class{static LoadedCustomComponent=!0;#e;#t;#n;#r;#i;#a;#o;#s;#c;#l=new cM;#u;#d;#f;#p;#m;#h;#g;#_;#v;#y=null;#b;#x=!1;#S=!1;constructor(e){let{composition:t,density:n,fileTreeSearchMode:r,gitStatus:i,id:a,initialSearchQuery:o,icons:s,itemHeight:c,onSearchChange:l,onSelectionChange:u,overscan:d,renderRowDecoration:f,renaming:p,search:m,searchBlurBehavior:h,searchFakeFocus:g,stickyFolders:_,unsafeCSS:v,initialVisibleRowCount:y,...b}=e;this.#e=t,this.#n=fM(a),this.#p=YO(i),this.#m=s,this.#h=v,this.#r=u,this.#i=f,this.#a=p!=null&&p!==!1,this.#o=h,this.#s=m===!0,this.#c=g===!0,this.#u=KD(n,c),this.#d={itemHeight:this.#u.itemHeight,overscan:d,stickyFolders:_,initialVisibleRowCount:y},this.#t=new WO({...b,fileTreeSearchMode:r,initialSearchQuery:o,onSearchChange:l,renaming:p}),this.#v=this.#t.getSelectionVersion(),this.#y=this.#r==null?null:this.subscribe(()=>{this.#D()})}unmount(){this.#b!=null&&(sM(this.#b),delete this.#b.dataset.fileTreeVirtualizedWrapper,this.#b=void 0),this.#l.clearAll(),this.#l.setHost(null),this.#f!=null&&(delete this.#f.dataset.fileTreeVirtualized,this.#I(this.#f),this.#f=void 0)}cleanUp(){this.unmount(),this.#y?.(),this.#y=null,this.#t.destroy()}getFileTreeContainer(){return this.#f}getItem(e){return this.#t.getItem(e)}getFocusedItem(){return this.#t.getFocusedItem()}getFocusedPath(){return this.#t.getFocusedPath()}getFocusedIndex(){return this.#t.getFocusedIndex()}getVisibleCount(){return this.#t.getVisibleCount()}getVisibleRows(e,t){return this.#t.getVisibleRows(e,t)}getSelectedPaths(){return this.#t.getSelectedPaths()}getComposition(){return this.#e}getItemHeight(){return this.#u.itemHeight}getDensityFactor(){return this.#u.factor}subscribe(e){let t=!1;return this.#t.subscribe(()=>{if(!t){t=!0;return}e()})}focusPath(e){this.#t.focusPath(e)}focusFirstItem(){this.#t.focusFirstItem()}focusLastItem(){this.#t.focusLastItem()}focusNextItem(){this.#t.focusNextItem()}focusPreviousItem(){this.#t.focusPreviousItem()}focusParentItem(){this.#t.focusParentItem()}scrollToPath(e,t){this.#t.scrollToPath(e,t)}focusNearestPath(e){return this.#t.focusNearestPath(e)}add(e){this.#t.add(e)}batch(e){this.#t.batch(e)}applyGitStatusPatch(e){let t=XO(this.#p,e);if(t===this.#p)return;this.#p=t;let n=this.#T();n!=null&&aM(n.wrapper,this.#w())}move(e,t,n){this.#t.move(e,t,n)}onMutation(e,t){return this.#t.onMutation(e,t)}setSearch(e){this.#t.setSearch(e)}openSearch(e){this.#t.openSearch(e)}closeSearch(){this.#t.closeSearch()}isSearchOpen(){return this.#t.isSearchOpen()}getSearchValue(){return this.#t.getSearchValue()}getSearchMatchingPaths(){return this.#t.getSearchMatchingPaths()}focusNextSearchMatch(){this.#t.focusNextSearchMatch()}focusPreviousSearchMatch(){this.#t.focusPreviousSearchMatch()}startRenaming(e,t){return this.#t.startRenaming(e,t)}remove(e,t){this.#t.remove(e,t)}resetPaths(e,t){Array.isArray(e)?this.#t.resetPaths(e,t):this.#t.resetPaths(e)}setComposition(e){this.#e=e;let t=this.#T();t!=null&&(this.#O(),aM(t.wrapper,this.#w()))}setGitStatus(e){let t=YO(e,this.#p);if(t===this.#p)return;this.#p=t;let n=this.#T();n!=null&&aM(n.wrapper,this.#w())}setIcons(e){this.#m=e;let t=this.#T();t!=null&&(this.#E(t.host,t.wrapper),aM(t.wrapper,this.#w()))}hydrate({fileTreeContainer:e}){let t=this.#P(e),n=this.#N(t);this.#O(),oM(n,this.#w())}render({containerWrapper:e,fileTreeContainer:t}){let n=this.#P(t??this.#f,e),r=this.#N(n);this.#O(),aM(r,this.#w())}#C(){return{initialViewportHeight:pM({initialVisibleRowCount:this.#d.initialVisibleRowCount,itemHeight:this.#d.itemHeight}),itemHeight:this.#d.itemHeight,overscan:this.#d.overscan,stickyFolders:this.#d.stickyFolders}}#w(){return{composition:this.#e,controller:this.#t,gitStatusByPath:this.#p?.statusByPath,ignoredGitDirectories:this.#p?.ignoredDirectoryPaths,directoriesWithGitChanges:this.#p?.directoriesWithChanges,icons:this.#m,instanceId:this.#n,renamingEnabled:this.#a,renderRowDecoration:this.#i,searchBlurBehavior:this.#o,searchEnabled:this.#s,searchFakeFocus:this.#c,slotHost:this.#l,...this.#C()}}#T(){let e=this.#f,t=this.#b;return e==null||t==null?null:{host:e,wrapper:t}}#E(e,t){let n=e.shadowRoot;n!=null&&(this.#k(n),this.#A(n)),this.#j(t)}#D(){let e=this.#r;if(e==null)return;let t=this.#t.getSelectionVersion();t!==this.#v&&(this.#v=t,e(this.#t.getSelectedPaths()))}#O(){let e=this.#e?.header?.render;if(e!=null){this.#l.setSlotContent(rw,e());return}this.#l.setSlotHtml(rw,this.#e?.header?.html??null)}#k(e){let t=gM(e).find(e=>hM(e)),n=mM(qC(sw(this.#m).set));n!=null&&(t==null||t.outerHTML!==n.outerHTML)&&(t==null?e.prepend(n):t.replaceWith(n))}#A(e){let t=gM(e),n=t.find(e=>hM(e)),r=t.filter(e=>e!==n),i=sw(this.#m).spriteSheet?.trim()??``;if(i.length===0){for(let e of r)e.remove();return}let a=mM(i);if(a==null){for(let e of r)e.remove();return}if(r.length!==1||r[0].outerHTML!==a.outerHTML){for(let e of r)e.remove();e.appendChild(a)}}#j(e){let t=sw(this.#m);t.colored&&YC(t.set)?e.dataset.fileTreeColoredIcons=`true`:delete e.dataset.fileTreeColoredIcons}#M(e){let t=e.querySelector(`style[${$C}]`);if(this.#g==null&&t instanceof HTMLStyleElement&&(this.#g=t),this.#h==null||this.#h===``){this.#g?.remove(),this.#g=void 0,this.#_=void 0;return}(this.#g?.parentNode!==e||this.#_!==this.#h)&&(this.#g??=document.createElement(`style`),this.#g.setAttribute($C,``),this.#g.parentNode!==e&&e.appendChild(this.#g),this.#g.textContent=ZD(this.#h),this.#_=this.#h)}#N(e){if(this.#b!=null)return this.#b;let t=e.shadowRoot;if(t==null)throw Error(`FileTree requires a shadow root`);let n=Array.from(t.children).filter(e=>e instanceof HTMLDivElement&&typeof e.dataset.fileTreeId==`string`&&e.dataset.fileTreeId.length>0),r=n.find(e=>e.dataset.fileTreeId===this.#n)??n[0];return r!=null&&(this.#n=r.dataset.fileTreeId??this.#n),this.#b=r??document.createElement(`div`),this.#b.dataset.fileTreeId=this.#n,this.#b.dataset.fileTreeVirtualizedWrapper=`true`,this.#E(e,this.#b),this.#b.parentNode!==t&&t.appendChild(this.#b),this.#b}#P(e,t){let n=e??this.#f??document.createElement(`file-tree-container`);t!=null&&n.parentNode!==t&&t.appendChild(n);let r=n.shadowRoot??n.attachShadow({mode:`open`});return rO(n,r),this.#M(r),n.dataset.fileTreeVirtualized=`true`,n.style.display=`flex`,this.#F(n),this.#l.setHost(n),this.#f=n,n}#F(e){e.style.getPropertyValue(`--trees-item-height`)===``&&(e.style.setProperty(`--trees-item-height`,`${String(this.#u.itemHeight)}px`),this.#x=!0),e.style.getPropertyValue(`--trees-density-override`)===``&&(e.style.setProperty(`--trees-density-override`,String(this.#u.factor)),this.#S=!0)}#I(e){this.#x&&=(e.style.removeProperty(`--trees-item-height`),!1),this.#S&&=(e.style.removeProperty(`--trees-density-override`),!1)}};function vM(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(yM(i))}return e=>!n.some(t=>t(e))&&t.every(t=>t(e))}function yM(e){if(!/[*?]/.test(e))return t=>ze(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=>ze(e,t)}}function bM(e){let t=new Set;for(let n of e)for(let e=n.indexOf(`/`);e!==-1;e=n.indexOf(`/`,e+1))t.add(n.slice(0,e+1));return t}function xM(e){let t=e.lastIndexOf(`/`,e.length-2);return t===-1?``:e.slice(0,t+1)}function SM(e,t){let n=new Set(e),r=new Set(t),i=bM(t),a=new Set([...bM(e)].filter(e=>!i.has(e))),o=[];for(let e of a)a.has(xM(e))||o.push({type:`remove`,path:e,recursive:!0});for(let t of e)!r.has(t)&&!a.has(xM(t))&&o.push({type:`remove`,path:t});for(let e of t)n.has(e)||o.push({type:`add`,path:e});return o}var CM=`_lw _o`,wM=te,TM=(e=>`/${e}&`)(ee);function EM(e){A(e.a,ne)}var DM=(e,t)=>ge(e.a,t),OM=(e,t)=>j(e.a,t),kM=(e=>`<label>${e}<input type=search placeholder="Filter files…" aria-label="Filter files"></label>`)(wM),AM=(e=>` D/${e}& l`)(TM),jM=o(21,e=>E(e,`c`,e.o,XM(e))),MM=D(14,jM),NM=o(13,e=>MM(e,(e.m??e.k)||``)),PM=D(20,jM),FM=o(19,e=>PM(e,ZM(e))),IM=D(18,FM),LM=o(17,e=>IM(e,QM(e)),2),RM=f(10,e=>{NM(e),LM(e)}),zM=o(7,e=>RM(e,e.f,e.g)),BM=D(5,zM),VM=D(6,zM),HM=u(12,e=>{NM(e),LM(e)}),UM=(e,t)=>KM(e,t.timer),WM=v(`t4`,e=>{x(e,`c`),k(e.c,`keydown`,function(t){t.key===`Enter`&&(e.s(),e.i?.()),t.key===`Escape`&&(e.o?(t.preventDefault(),e.u(``)):e.i&&(t.preventDefault(),e.i()))}),k(e.c,`blur`,function(){e.i&&(e.s(),e.i())})});function GM(e){y(e.a,[`_bl`,`_lv`]),EM(e.b),DM(e.b,14),OM(e.b,`_bm`),y(e.c,[`_bn`,CM]),HM(e,null),UM(e,{timer:0}),WM(e)}var KM=D(16,e=>{LM(e),FM(e)}),qM=v(`t3`,e=>g(e,{onMount:function(){e.j&&e.c.focus()}})),JM=D(9,qM),YM=D(8),XM=e=>function(t){e.u(t)},ZM=e=>t=>{if(e.q&&clearTimeout(e.q),!t){e.q=0,HM(e,null),RM(e,``);return}HM(e,t),e.q=setTimeout(e.s,150)},QM=e=>()=>{e.q&&=(clearTimeout(e.q),0);let t=e.m===null?e.k||``:e.m;HM(e,null),RM(e,t)};l.t0=XM,l.t2=ZM,l.t1=QM;var $M=new Set([`/`,`.`,`-`,`_`,` `]);function eN(e,t){if(t===0)return!0;let n=e[t-1];if($M.has(n))return!0;let r=e[t];return r!==r.toLowerCase()&&n===n.toLowerCase()}function tN(e,t,n){let r=0;for(let i=0;i<t.length;i++){let a=t[i];r+=1,eN(e,a)&&(r+=8),i&&t[i-1]===a-1?r+=6:i&&(r-=Math.min(4,a-t[i-1]-1)),a>=n&&(r+=3),a===n&&(r+=6)}return r}function nN(e,t,n){let r=0,i=-1;for(let a=n;a<t.length;a++)if(t[a]===e[r]&&++r===e.length){i=a;break}if(i<0)return null;let a=[];r=e.length-1;for(let o=i;o>=n&&r>=0;o--)t[o]===e[r]&&(a.push(o),r--);return a.reverse()}function rN(e,t,n,r){let i=[],a=r;for(let r=0;r<e.length;r++){let o=i[i.length-1];if(o!=null&&n[o+1]===e[r]){i.push(o+1);continue}let s=a;for(;s<n.length&&!(n[s]===e[r]&&eN(t,s));)s++;if(s>=n.length)return null;i.push(s),a=s+1}return i}function iN(e,t,n,r,i){let a=nN(e,n,r);if(!a)return null;let o=rN(e,t,n,r),s=tN(t,a,i),c=o?tN(t,o,i):-1/0;return c>s?{score:c,hits:o}:{score:s,hits:a}}function aN(e,t,n,r){for(let i=t.indexOf(n,r);i!==-1;i=t.indexOf(n,i+1))if(eN(e,i))return!0;return!1}function oN(e,t){let n=e.split(/\s+/).filter(Boolean);if(!n.length)return{score:0,hits:[]};let r=t.toLowerCase(),i=t.lastIndexOf(`/`)+1,a=0,o=new Set;for(let e of n){let n=e.toLowerCase(),s=iN(n,t,r,i,i),c=s??iN(n,t,r,0,i);if(!c)return null;s&&aN(t,r,n,i)&&(a+=20),r.slice(i)===n&&(a+=30),a+=c.score;for(let e of c.hits)o.add(e)}return a-=t.length/100,{score:a,hits:[...o].sort((e,t)=>e-t)}}function sN(e){let t=e.match(/^(.*?):(\d+)(?::\d+)?\s*$/);return t?{query:t[1],line:Number(t[2])}:{query:e,line:0}}function cN(e,t,n,r){let i=[];for(let r of e){let e=oN(n,t(r));e&&i.push({item:r,match:e})}return i.sort((e,n)=>n.match.score-e.match.score||t(e.item).localeCompare(t(n.item))),i.slice(0,r)}var lN=`_kM _9 _M`,uN=Pe,dN=(e=>`/${e}&`)(` b`),fN=60;function pN(e,t,n,r){let i=[],a=new Set(t);for(let t=n;t<r;t++){let n=a.has(t),r=i[i.length-1];r&&r.hit===n?r.text+=e[t]:i.push({text:e[t],hit:n})}return i}var mN=s(0,1,e=>c(e.a,e._.e)),hN=mN,gN=s(0,0,e=>c(e.b,e._.e)),_N=h(0,`<mark> </mark>`,` D `,e=>{gN._(e),y(e.a,`_kK`)},` `,` `,hN),vN=(e,t)=>_N(e,+!t),yN=(e,t)=>{vN(e,t[0]?.hit),bN(e,t[0]?.text)},bN=D(4,e=>{gN(e),mN(e)}),xN=s(0,1,e=>c(e.a,e._.e)),SN=xN,CN=s(0,0,e=>c(e.b,e._.e)),wN=h(0,`<mark> </mark>`,` D `,e=>{CN._(e),y(e.a,`_kK`)},` `,` `,SN),TN=(e,t)=>wN(e,+!t),EN=(e,t)=>{TN(e,t[0]?.hit),DN(e,t[0]?.text)},DN=D(4,e=>{CN(e),xN(e)}),ON=e=>y(e.a,i),kN=s(5,0,e=>c(e.b,e._.n)),AN=e=>{kN._(e),y(e.a,lN)},jN=b(34,e=>c(e.b,e._._._._.u),e=>e._._._._),MN=e=>{jN(e),y(e.a,`_kL`)},NN=o(2,e=>c(e.b,e._._._.l?`Loading files…`:e._._._.s?`No file matches “${d(e._._._.s)}”.`:`Type part of a file's name. Add :42 to open it at line 42.`)),PN=b(29,NN,e=>e._._._),FN=e=>{PN(e),IN(e),y(e.a,`_dB`)},IN=b(33,NN,e=>e._._._),LN=b(28,e=>c(e.b,e._._._._.k),e=>e._._._._),RN=h(0,`<li role=presentation>Recently opened</li>`,` `,ON,`<li role=presentation> </li>`,` D `,e=>{LN(e),y(e.a,i)}),zN=o(17,e=>RN(e,!e._._._.s&&e.o===0?0:e.j&&(e.o===0||!e._._._.v[e.o-1].more)?1:2),3),BN=b(33,zN,e=>e._._._),VN=v(`J4`,e=>{k(e.c,`mousemove`,function(){e._._._.p!==e.o&&OP(e._._._,e.o)}),k(e.c,`click`,function(){e._._._.a1(e.o)})}),HN=e=>{BN(e),GN(e),KN(e),JN(e),y(e.d,`_kI`),y(e.e,`_kJ`),VN(e)},UN=h(6,`<span>:<!></span>`,` Db%`,MN),WN=o(16,e=>UN(e,e._._._.u&&e.o===e._._._.y?0:1),2),GN=b(34,WN,e=>e._._._),KN=b(35,zN,e=>e._._._),qN=o(15,e=>{C(e.b,`aria-selected`,e.o===e._._._.y?`true`:`false`),y(e.c,[`_dw`,e.o===e._._._.y&&`_dv`])}),JN=b(37,e=>{qN(e),WN(e)},e=>e._._._),YN=D(9,zN),XN=D(14,e=>{zN(e),qN(e),WN(e)}),ZN=m(3,`<!><!><!>`,`b%`,0,EN),QN=m(4,`<!><!><!>`,`b%`,0,yN),$N=o(20,e=>{ZN(e,[pN(e.s,e.m,e.t,e.s?.length)]),QN(e,[pN(e.s,e.m,0,Math.max(0,e.t-1))])},2),eP=D(19,$N),tP=D(18,e=>{C(e.c,`title`,e.s),eP(e,e.s.lastIndexOf(`/`)+1),$N(e)}),nP=D(12,$N),rP=h(5,`<span> </span>`,` D `,AN),iP=D(13,e=>{rP(e,+!e.n),kN(e)}),aP=(e,t)=>{YN(e,t[0]?.more),tP(e,t[0]?.item?.path),iP(e,t[0]?.item?.hint),nP(e,t[0]?.hits),XN(e,t[1])},oP=b(31,e=>E(e,`c`,e._._.o,YP(e)),e=>e._._),sP=v(`J6`,e=>{x(e,`c`),k(e.d,`click`,function(){e._._.z()})}),cP=e=>{oP(e),lP(e),dP(e),mP(e),y(e.a,`_dq`),fe(e.b),de(e.b,14),pe(e.b),y(e.c,a),y(e.d,[he,`_ds`]),ye(e.e),me(e.e,16),re(e.e),y(e.f,`_dt`),sP(e)},lP=b(32,e=>{C(e.c,`aria-controls`,e._._.q),C(e.f,`id`,e._._.q)},e=>e._._),uP=m(5,`<!><!><li role=option><button type=button><span></span><span></span><!><!></button></li>`,`b%b D D b b%b%`,HN,aP),dP=b(35,e=>uP(e,[e._._.v,e=>`${e.more?`+`:``}${e.item.key}`]),e=>e._._),fP=h(6,`<p> </p>`,` D `,FN),pP=v(`J5`,e=>k(e.c,`keydown`,function(t){if(t.key===`ArrowDown`||t.key===`ArrowUp`){t.preventDefault();let n=e._._.w;n&&OP(e._._,(e._._.y+(t.key===`ArrowDown`?1:-1)+n)%n)}else t.key===`Enter`&&(t.preventDefault(),e._._.a1(e._._.y))})),mP=b(36,e=>{fP(e,+!!e._._.w),pP(e)},e=>e._._),hP=h(0,((e,t)=>`<div>${e}<input type=search autofocus autocomplete=off placeholder="Go to file (name:42 for a line)" aria-label="Go to file" role=combobox aria-expanded=true><button type=button title=Close aria-label=Close>${t}</button></div><ul role=listbox></ul><!><!>`)(ue,oe),((e,t)=>` D/${e}& b D/${t}&m b%c`)(ae,ve),cP),gP=b(30,e=>hP(e,+!e._.m)),_P=_(`J7`,`<!><!><!>`,`b%`,gP),vP=O(gP),yP=f(12,e=>{je(e.a,e.m),vP(e)}),bP=o(5,e=>yP(e,e.d,e.e)),xP=D(3,bP),SP=D(4,bP),CP=(e,t)=>{RP(e,t?.query),BP(e,t?.line)},wP=O(oP),TP=u(14,e=>{CP(e,sN(e.o.trim())),wP(e)}),EP=D(24,O(JN)),DP=o(23,e=>EP(e,Math.min(e.p,Math.max(0,e.w-1)))),OP=u(15,DP),kP=D(16),AP=D(27),jP=o(26,e=>AP(e,XP(e)),3),MP=D(25,jP);function NP(e){ke(e.a),Le(e.a,_P(e)),N(e.a,`Go to file`),De(e.a,[`_bH`,`_dp`]),Re(e.a,QP(e)),Ie(e.a,!0),Ae(e.a),Ne(e.a),Oe(e.a),Me(e.a),Fe(e.a,{}),TP(e,``),OP(e,0),kP(e,p(e)),MP(e,ZP(e))}var PP=O(dP,KN),FP=D(21,e=>{HP(e,e.v?.length),jP(e),PP(e)}),IP=o(19,e=>FP(e,(()=>{let t=e.s;if(!t){let t=new Map(e.g.map(e=>[e.key,e]));return(e.h||[]).map(e=>t.get(e)).filter(e=>!!e).map(e=>({item:e,hits:[],more:!1}))}let n=cN(e.g,e=>e.path,t,fN).map(e=>({item:e.item,hits:e.match.hits,more:!1})),r=e.i?cN(e.i.items,e=>e.path,t,fN).map(e=>({item:e.item,hits:e.match.hits,more:!0})):[];return[...n,...r]})()),3),LP=O(BN,IN),RP=D(18,e=>{IP(e),LP(e)}),zP=O(GN,jN),BP=D(20,e=>{jP(e),zP(e)}),VP=O(mP),HP=D(22,e=>{DP(e),VP(e)}),UP=D(6,IP),WP=D(7,IP),GP=D(8,e=>{qP(e,e.i?.label),IP(e)}),KP=D(9,jP),qP=D(10,O(LN)),JP=D(11,O(PN)),YP=e=>function(t){TP(e._._,t),OP(e._._,0)},XP=e=>t=>{let n=e.v[t];if(!n)return;let r=e.u;e.z(),e.j(n.item.key,r,n.more)},ZP=e=>()=>{yP(e,!1),TP(e,``),OP(e,0)},QP=e=>t=>{yP(e,t)};l.J0=YP,l.J2=XP,l.J1=ZP,l.J3=QP;export{zb as $,kS as A,Rx as B,bM as C,NS as D,_M as E,Hx as F,Mx as G,Fx as H,Vx as I,Tx as J,jx as K,zx as L,Wx as M,Gx as N,FS as O,Ux as P,Jb as Q,Bx as R,TM as S,vM as T,Nx as U,Ix as V,Px as W,tx as X,Ub as Y,ex as Z,AM as _,xP as a,Pb as at,EM as b,NP as c,hb as ct,JM as d,Xy as dt,Ib as et,YM as f,Qh as ft,kM as g,GM as h,KP as i,Nb as it,TS as j,PS as k,uN as l,Cb as lt,VM as m,JP as n,Lb as nt,SP as o,Tb as ot,BM as p,kx as q,GP as r,Bb as rt,WP as s,Eb as st,UP as t,Rb as tt,dN as u,Sb as ut,OM as v,SM as w,wM as x,DM as y,Lx as z};
|