@inkeep/open-knowledge 0.3.0 → 0.4.0-beta.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/THIRD_PARTY_NOTICES.md +658 -0
- package/dist/alias-JE7RI5QX-Bia4gLMF.mjs +1 -0
- package/dist/assets/skills/open-knowledge/SKILL.md +145 -52
- package/dist/awk2-POPGKRAI-DDrFV-7v.mjs +1 -0
- package/dist/{banner-BxI1wnW9.mjs → banner-DdbR6AZr.mjs} +2 -2
- package/dist/base64-4YMZCVJ5-DDKKOjMm.mjs +1 -0
- package/dist/basename-AA2KJYZQ-BK5zVs3W.mjs +1 -0
- package/dist/bash-IJWYRKFO-B9r1a0X9.mjs +1 -0
- package/dist/build-B6buVrsB.mjs +2 -0
- package/dist/cat-RDUMLXKC-CeNrSElK.mjs +1 -0
- package/dist/chmod-SYMGL4JA-DFJ4ylQU.mjs +1 -0
- package/dist/{chokidar-CblsKfnx.mjs → chokidar-CxU7f6JW.mjs} +1 -1
- package/dist/{chunk-24IMIIXA-Bz7rlZT3.mjs → chunk-24IMIIXA-B6yIPkk2.mjs} +2 -2
- package/dist/{chunk-3THT3N7L-klp8GP84.mjs → chunk-3THT3N7L-DztAF386.mjs} +1 -1
- package/dist/{chunk-3ZUFRYJ4-C93H8j0V.mjs → chunk-3ZUFRYJ4-qsYuZX7b.mjs} +1 -1
- package/dist/{chunk-44UOCSGV-BUBpWxXm.mjs → chunk-44UOCSGV-CaFxJDHm.mjs} +1 -1
- package/dist/{chunk-4GTNDTRF-_OVmXcJ-.mjs → chunk-4GTNDTRF-PuLVuVJW.mjs} +2 -2
- package/dist/{chunk-4HHKTUW3-Dm69hDaZ.mjs → chunk-4HHKTUW3-CQ53AiA_.mjs} +1 -1
- package/dist/{chunk-4Q4SM6WR-DDQRsilN.mjs → chunk-4Q4SM6WR-BlQvqCag.mjs} +2 -2
- package/dist/{chunk-55VFSPNA-DVZfQAzN.mjs → chunk-55VFSPNA-DLwfww5b.mjs} +2 -2
- package/dist/{chunk-5QMZ5MUS-DWTkM0vM.mjs → chunk-5QMZ5MUS-CAp625aG.mjs} +2 -2
- package/dist/{chunk-5QVNJEHU-BvsipSFW.mjs → chunk-5QVNJEHU-dbrKfPGl.mjs} +2 -2
- package/dist/{chunk-5V6VZH6T-BCr5_GDF.mjs → chunk-5V6VZH6T-DMPvCPbn.mjs} +2 -2
- package/dist/{chunk-62RKD26F-D-luOa0m.mjs → chunk-62RKD26F-B9la0pfD.mjs} +2 -2
- package/dist/{chunk-64BAICW3-CTJNEx4Q.mjs → chunk-64BAICW3-D92CLSK-.mjs} +2 -2
- package/dist/{chunk-74CEPOFO-D1bzz49u.mjs → chunk-74CEPOFO-BcZUJMO1.mjs} +1 -1
- package/dist/{chunk-7L36YK2X-RiPZFKaV.mjs → chunk-7L36YK2X-D7Z_Qw_C.mjs} +1 -1
- package/dist/{chunk-7TSDKFEO-a-GUGBTu.mjs → chunk-7TSDKFEO-DUQhJkDy.mjs} +1 -1
- package/dist/{chunk-A4HU7SVR-hefV_YmW.mjs → chunk-A4HU7SVR-DKLaJeys.mjs} +1 -1
- package/dist/{chunk-A4JSPFCI-U-xWmMMC.mjs → chunk-A4JSPFCI-CEm2r8SB.mjs} +2 -2
- package/dist/{chunk-A5O5YHGN-C7BVq0eF.mjs → chunk-A5O5YHGN-DvJz5Cpw.mjs} +2 -2
- package/dist/{chunk-A65PWWJC-D7J5l9eq.mjs → chunk-A65PWWJC-DV6RO_es.mjs} +2 -2
- package/dist/{chunk-A7A2DBEE-PLfkXLI4.mjs → chunk-A7A2DBEE-dTNL-45u.mjs} +1 -1
- package/dist/{chunk-A7ICOL4V-Drb3XsEL.mjs → chunk-A7ICOL4V-BvXPAaHu.mjs} +2 -2
- package/dist/{chunk-ALLTKNUZ-BMiTDN50.mjs → chunk-ALLTKNUZ-Cu6JFoC4.mjs} +2 -2
- package/dist/{chunk-APT7OOP2-CXHnSuct.mjs → chunk-APT7OOP2-DmUrFuRy.mjs} +2 -2
- package/dist/{chunk-BBXLRYSX-DURjrblE.mjs → chunk-BBXLRYSX-K758HlCs.mjs} +2 -2
- package/dist/{chunk-BRGMQKJV-CdrkqzRA.mjs → chunk-BRGMQKJV-BXc-9Cgj.mjs} +3 -3
- package/dist/{chunk-CR5AFCPT-ROmyDFrB.mjs → chunk-CR5AFCPT-DxNsgM0M.mjs} +2 -2
- package/dist/{chunk-CWQS3NFK-DFdwmFxJ.mjs → chunk-CWQS3NFK-Co4ALolT.mjs} +1 -1
- package/dist/{chunk-D4J545R4-C8nMOauR.mjs → chunk-D4J545R4-DkHLjHX6.mjs} +2 -2
- package/dist/{chunk-D6CWQ5DW-B-J4LN9N.mjs → chunk-D6CWQ5DW-7lvT8dGP.mjs} +2 -2
- package/dist/{chunk-D7MEQ3VN-Csvth_Ss.mjs → chunk-D7MEQ3VN-D8jJZr4A.mjs} +2 -2
- package/dist/{chunk-DCAAORBQ-BdrR5ttw.mjs → chunk-DCAAORBQ-C3s1D8OY.mjs} +2 -2
- package/dist/{chunk-DXB73IDG-C774okS0.mjs → chunk-DXB73IDG-DIKSLkPq.mjs} +1 -1
- package/dist/{chunk-EEXR5ZDP-C5AJH114.mjs → chunk-EEXR5ZDP-CETL3_Uw.mjs} +1 -1
- package/dist/{chunk-EIZGF4BS-8bsVXqW0.mjs → chunk-EIZGF4BS-DOoQW9jQ.mjs} +2 -2
- package/dist/{chunk-F23WWYKW-DST0dB7V.mjs → chunk-F23WWYKW-BK2tpXPf.mjs} +2 -2
- package/dist/{chunk-F55TLFGB-DqkrAMO5.mjs → chunk-F55TLFGB-Vy5RU2P3.mjs} +2 -2
- package/dist/{chunk-FEIOJCZD-C4x0A4rb.mjs → chunk-FEIOJCZD-C25Und0M.mjs} +2 -2
- package/dist/{chunk-GCTKCWKD-Deqi1D_N.mjs → chunk-GCTKCWKD-Di-RB9Qt.mjs} +1 -1
- package/dist/{chunk-GFQRA5P5-1fzItQ8F.mjs → chunk-GFQRA5P5-DnjwTqP3.mjs} +1 -1
- package/dist/{chunk-GOV5EKKI-PN17n-Z0.mjs → chunk-GOV5EKKI-CKV9jOGv.mjs} +2 -2
- package/dist/{chunk-GXVXFKBA-993FoPmq.mjs → chunk-GXVXFKBA-CUKDClxt.mjs} +2 -2
- package/dist/{chunk-HDQ56CKY-pGV4pOJA.mjs → chunk-HDQ56CKY-MTQ75a8z.mjs} +2 -2
- package/dist/{chunk-HJQJAYMS-Ci3vsKQW.mjs → chunk-HJQJAYMS-D-8Vc6Zb.mjs} +1 -1
- package/dist/{chunk-HJWBQKYG-UZig4wUt.mjs → chunk-HJWBQKYG-XrOcsn2f.mjs} +2 -2
- package/dist/{chunk-HWBSOZZR-Dikp87Ww.mjs → chunk-HWBSOZZR-BZF8XsyZ.mjs} +2 -2
- package/dist/{chunk-HWKDQ44K-CPSjqtR_.mjs → chunk-HWKDQ44K-wgmyck2O.mjs} +2 -2
- package/dist/{chunk-I57KEIP3-B1DoH8rp.mjs → chunk-I57KEIP3-DipCOPKf.mjs} +2 -2
- package/dist/{chunk-IPJHKYVM-BbWncVr2.mjs → chunk-IPJHKYVM-C3IodQq7.mjs} +1 -1
- package/dist/{chunk-J642UCRS-DB77Y2Wt.mjs → chunk-J642UCRS-YiNealfn.mjs} +2 -2
- package/dist/{chunk-JVPRLUMK-DnQCNjpq.mjs → chunk-JVPRLUMK-VMFWXimu.mjs} +2 -2
- package/dist/{chunk-KMEYNNUA-DfdK88O_.mjs → chunk-KMEYNNUA-pRogdye4.mjs} +2 -2
- package/dist/{chunk-LL3S3NLB-DxXgE3kY.mjs → chunk-LL3S3NLB-ByBS5IDP.mjs} +2 -2
- package/dist/{chunk-LPQPILI2-BXfU9TgM.mjs → chunk-LPQPILI2-FRQB9gt5.mjs} +2 -2
- package/dist/{chunk-LTZRCH7N-GAjTFNwG.mjs → chunk-LTZRCH7N-46S7WKw8.mjs} +2 -2
- package/dist/{chunk-LWEGUNWT-BALY4RLC.mjs → chunk-LWEGUNWT-DdGmM3wr.mjs} +2 -2
- package/dist/{chunk-MDDMCKUK-D6GWoJsI.mjs → chunk-MDDMCKUK-CuRdI1Uv.mjs} +2 -2
- package/dist/{chunk-MDLLFABN-oBQf6bGE.mjs → chunk-MDLLFABN-Wd1iVjXi.mjs} +2 -2
- package/dist/{chunk-MHTUABJP-dKmK6Hw7.mjs → chunk-MHTUABJP-BWrqic3t.mjs} +1 -1
- package/dist/{chunk-MIZPJHVH-z-geAni9.mjs → chunk-MIZPJHVH-DWdPvcYR.mjs} +2 -2
- package/dist/{chunk-MLXIYONF-DB-C8Hx8.mjs → chunk-MLXIYONF-CiCzoeGt.mjs} +2 -2
- package/dist/{chunk-MYE6AGBJ-B4pRo9ma.mjs → chunk-MYE6AGBJ-DJo74dVC.mjs} +2 -2
- package/dist/{chunk-NAERJDUW-CX0lf-xx.mjs → chunk-NAERJDUW-CIHrNgJB.mjs} +2 -2
- package/dist/{chunk-NCNPKYJZ-BFGan4lR.mjs → chunk-NCNPKYJZ-BVljycUZ.mjs} +2 -2
- package/dist/{chunk-NUYSJFDK-D2NXm2ND.mjs → chunk-NUYSJFDK-BTseBdxv.mjs} +2 -2
- package/dist/{chunk-NYQYO467-Degkom4D.mjs → chunk-NYQYO467-BgXuDHUQ.mjs} +2 -2
- package/dist/{chunk-OARHFVLG-CY8D2Qov.mjs → chunk-OARHFVLG-Cr0x3Si_.mjs} +2 -2
- package/dist/{chunk-OCLXQMOG-BMsyLQhm.mjs → chunk-OCLXQMOG-BW6rwyzS.mjs} +2 -2
- package/dist/{chunk-OCS6LSEM-BHslttnj.mjs → chunk-OCS6LSEM-D7VAOziZ.mjs} +2 -2
- package/dist/{chunk-OJDRYQWQ-BV5MVRVg.mjs → chunk-OJDRYQWQ-ikvLWpfV.mjs} +1 -1
- package/dist/{chunk-OL3S66CO-Bmgu4tW4.mjs → chunk-OL3S66CO-CQnF8cPH.mjs} +2 -2
- package/dist/{chunk-PBXLG62G-lGjqkk78.mjs → chunk-PBXLG62G-CgbPJTiw.mjs} +2 -2
- package/dist/{chunk-PP6PSHAB-DMC_XCfO.mjs → chunk-PP6PSHAB-CO4MYU__.mjs} +1 -1
- package/dist/{chunk-PYSFUGCK-CY7pclEB.mjs → chunk-PYSFUGCK-DsRn64Ef.mjs} +2 -2
- package/dist/{chunk-QCDB2VPH-D1RuXtOm.mjs → chunk-QCDB2VPH-BUMOhlW7.mjs} +2 -2
- package/dist/{chunk-QJ7O6ZN3-BH67tCjg.mjs → chunk-QJ7O6ZN3-F0_rcDPM.mjs} +2 -2
- package/dist/{chunk-R6QSAL5T-CtbJTvt9.mjs → chunk-R6QSAL5T-CeW6f7-x.mjs} +1 -1
- package/dist/{chunk-R6VWJ2ZL-B0CcMPyK.mjs → chunk-R6VWJ2ZL-FwG_Za20.mjs} +1 -1
- package/dist/{chunk-RPNGRAAP-BughPjdR.mjs → chunk-RPNGRAAP-BmkapBPD.mjs} +2 -2
- package/dist/{chunk-SDNKECQQ-C3GEf3VZ.mjs → chunk-SDNKECQQ-DkebEzkd.mjs} +2 -2
- package/dist/{chunk-SYMJJMQ4-CWTh95-4.mjs → chunk-SYMJJMQ4-DOZMaECk.mjs} +2 -2
- package/dist/{chunk-T56QNPHK-DlKQeuXU.mjs → chunk-T56QNPHK-DPXaSSfC.mjs} +2 -2
- package/dist/{chunk-TLSUDHID-B8UnqY4U.mjs → chunk-TLSUDHID-BovZg0r1.mjs} +2 -2
- package/dist/{chunk-TOMNU26N-BcdbBQ2p.mjs → chunk-TOMNU26N-AAglMy4J.mjs} +2 -2
- package/dist/{chunk-TXBZCHCQ-l48TczF5.mjs → chunk-TXBZCHCQ-WeVWfqYv.mjs} +2 -2
- package/dist/{chunk-UNYNJIFU-DwPQMz0F.mjs → chunk-UNYNJIFU-CqGlXAg7.mjs} +3 -3
- package/dist/{chunk-V7TAPXDL-CnKUp2df.mjs → chunk-V7TAPXDL-DQgGPvBY.mjs} +2 -2
- package/dist/{chunk-VJFXDYWH-IiUXkKX0.mjs → chunk-VJFXDYWH-DIo0Ia0_.mjs} +2 -2
- package/dist/{chunk-VLGZJRPG-D4NVKJYL.mjs → chunk-VLGZJRPG-DymOu90-.mjs} +2 -2
- package/dist/{chunk-VOBGTVA6-BT7gUxqf.mjs → chunk-VOBGTVA6-Bfa1NTzt.mjs} +2 -2
- package/dist/{chunk-VYOJP4TV-BvibOnKG.mjs → chunk-VYOJP4TV-PBsHe2md.mjs} +2 -2
- package/dist/{chunk-WKFATFPP-DCZdrA8x.mjs → chunk-WKFATFPP-KO2zkfs2.mjs} +2 -2
- package/dist/{chunk-X2AJGDEF-BaH6i1Rq.mjs → chunk-X2AJGDEF-D5w6wtaX.mjs} +1 -1
- package/dist/{chunk-XHM67O4N-Cg35xc6b.mjs → chunk-XHM67O4N-akBjDPaR.mjs} +1 -1
- package/dist/{chunk-XKQRETAK-cVWA9gEB.mjs → chunk-XKQRETAK-RHzVmuiF.mjs} +2 -2
- package/dist/{chunk-XORM457F-CRToN1RQ.mjs → chunk-XORM457F-wr_DBBnV.mjs} +2 -2
- package/dist/{chunk-XVDPCNWR-CtK-Xs2O.mjs → chunk-XVDPCNWR-DxaG1FfA.mjs} +2 -2
- package/dist/{chunk-YCFVLTST-Ox9Z0Nk6.mjs → chunk-YCFVLTST-Dzwevuc3.mjs} +2 -2
- package/dist/{chunk-YFG2CMIF-Csgr05KV.mjs → chunk-YFG2CMIF-BoZQym0L.mjs} +2 -2
- package/dist/{chunk-YNYSPYQ5-BpP11HXS.mjs → chunk-YNYSPYQ5-DesxOVHh.mjs} +1 -1
- package/dist/{chunk-YS3AZT3J-BEZxz_aQ.mjs → chunk-YS3AZT3J-CBc9LHIy.mjs} +2 -2
- package/dist/{chunk-YTNYSM6T-DuBR2-TM.mjs → chunk-YTNYSM6T-WMIf3AF8.mjs} +2 -2
- package/dist/{chunk-Z6LRHWXI-DbRghyzT.mjs → chunk-Z6LRHWXI-DGTVoTuf.mjs} +2 -2
- package/dist/{chunk-Z7JVV2SM-BzR-yvwK.mjs → chunk-Z7JVV2SM-Cb4YKOCM.mjs} +2 -2
- package/dist/clear-5CZ5X4YR-CadVxKrq.mjs +1 -0
- package/dist/cli.mjs +58 -1400
- package/dist/colors-BNufdynn.mjs +2 -0
- package/dist/colors-T3xmlXQT.mjs +1 -0
- package/dist/column-WLPMMSTS-6o4DDsDk.mjs +1 -0
- package/dist/comm-5SLSESQG-C2GatHU6.mjs +1 -0
- package/dist/config-schema.json +87 -0
- package/dist/config.project-local.schema.json +30 -0
- package/dist/config.project.schema.json +59 -0
- package/dist/config.user.schema.json +58 -0
- package/dist/constants-B1fw1n69.mjs +2 -0
- package/dist/cp-XOYR4ABJ-DmS6dER-.mjs +1 -0
- package/dist/{curl-47BFPSFW-Kn_Na_aU.mjs → curl-47BFPSFW-C2kRcGkX.mjs} +2 -2
- package/dist/cut-OPC3VAGB-s4tQWhL5.mjs +1 -0
- package/dist/date-DD7FVA2V-Dubgjr6a.mjs +1 -0
- package/dist/diff-HJF2MPDN-DjGBLQph.mjs +1 -0
- package/dist/dirname-LEMTZZFS-B477CImE.mjs +1 -0
- package/dist/dist-BToVkFhc.mjs +1 -0
- package/dist/dist-DVM7wH81.mjs +359 -0
- package/dist/dist-ou5qina8.mjs +1609 -0
- package/dist/du-WO2ENHXQ-C4c5wweW.mjs +1 -0
- package/dist/echo-O45JWWI2-TudodhHR.mjs +1 -0
- package/dist/env-5EPCWSXR-CTcNEMpy.mjs +1 -0
- package/dist/{esm-BFkWzFey.mjs → esm-BbkJd7ro.mjs} +1 -1
- package/dist/{esm-wByiX8MO.mjs → esm-CEs3LWY3.mjs} +2 -2
- package/dist/{execAsync-0jii24p9.mjs → execAsync-CulVJBMN.mjs} +1 -1
- package/dist/{execAsync-Czqc-yAz.mjs → execAsync-CzW9fUYQ.mjs} +1 -1
- package/dist/{execAsync-DgmLXmTx.mjs → execAsync-DuQoqWaW.mjs} +1 -1
- package/dist/expand-DTNXU4LQ-BT6M2Tdc.mjs +1 -0
- package/dist/expansion-ENLSRCXJ-Cy7j--Iy.mjs +1 -0
- package/dist/expr-5T3UU5KE-D2Kr5nuJ.mjs +1 -0
- package/dist/file-ZIGAJ4YS-BH3jYcuM.mjs +1 -0
- package/dist/find-TPUOAIUQ-RFxkUcGN.mjs +1 -0
- package/dist/flag-coverage-QT4N2Z44--nNG-HLV.mjs +2 -0
- package/dist/fold-LDSORVYE-CfKQmrJ1.mjs +1 -0
- package/dist/{getMachineId-bsd-C1M346yz.mjs → getMachineId-bsd-DAmB-Ym0.mjs} +2 -2
- package/dist/{getMachineId-bsd-CPESl3L6.mjs → getMachineId-bsd-FYDP9w5Q.mjs} +2 -2
- package/dist/{getMachineId-bsd-DEUypOXJ.mjs → getMachineId-bsd-mPrX3ckm.mjs} +2 -2
- package/dist/{getMachineId-darwin-0hBTy7c8.mjs → getMachineId-darwin-B0Qw-MTj.mjs} +2 -2
- package/dist/{getMachineId-darwin-CJK3eX9q.mjs → getMachineId-darwin-C79HtyON.mjs} +2 -2
- package/dist/{getMachineId-darwin-Vupnt-kR.mjs → getMachineId-darwin-Co8Jnu5v.mjs} +2 -2
- package/dist/{getMachineId-linux-BGQn48cN.mjs → getMachineId-linux-BBORs2cS.mjs} +2 -2
- package/dist/{getMachineId-linux-CIp07XEX.mjs → getMachineId-linux-BizmCjYq.mjs} +2 -2
- package/dist/{getMachineId-linux-B2nkqMir.mjs → getMachineId-linux-BvLCCmKQ.mjs} +2 -2
- package/dist/{getMachineId-unsupported-CH1Q20xN.mjs → getMachineId-unsupported-Bgp-Es9j.mjs} +2 -2
- package/dist/{getMachineId-unsupported-DfSmC7Gy.mjs → getMachineId-unsupported-CbR45h2D.mjs} +2 -2
- package/dist/{getMachineId-unsupported-BnsanXR2.mjs → getMachineId-unsupported-DbGFOAw1.mjs} +2 -2
- package/dist/{getMachineId-win-BmmB_8yL.mjs → getMachineId-win-CT_Y5i_4.mjs} +2 -2
- package/dist/{getMachineId-win-DlPRChXs.mjs → getMachineId-win-Cy0XHq4X.mjs} +2 -2
- package/dist/{getMachineId-win-JnMJbIaW.mjs → getMachineId-win-D5gDnBHa.mjs} +2 -2
- package/dist/{git-handle-BhGnmvTB-BMB_49Sb.mjs → git-handle-DwfYp_z--CfyPz4Dz.mjs} +2 -2
- package/dist/git-handle-DwfYp_z--DreW3fNC.mjs +1 -0
- package/dist/grep-3AIAIJVR-DgQJLmW0.mjs +1 -0
- package/dist/gzip-AQXSGOVS-yXjpnIVd.mjs +1 -0
- package/dist/head-HT2B6D2J-BR4RHRTk.mjs +1 -0
- package/dist/help-VVWX7SA5-M6C6klSC.mjs +1 -0
- package/dist/history-J4QRNGRO-C1r7-kvT.mjs +1 -0
- package/dist/hostname-BK6HG2DE-BBBcRrtV.mjs +1 -0
- package/dist/html-to-markdown-TFCECAGV-B9oYuMVf.mjs +1 -0
- package/dist/index.d.mts +9 -2278
- package/dist/index.mjs +1 -1
- package/dist/init-BZSwVuuW.mjs +1 -0
- package/dist/init-CUXehDND.mjs +397 -0
- package/dist/{is-object-BNVklKxg.mjs → is-object-DF0ZeuvD.mjs} +1 -1
- package/dist/join-GG2LDHE5-xeTE0Mi4.mjs +1 -0
- package/dist/jq-ODXZBPLY-C5v6qNu_.mjs +1 -0
- package/dist/{js-exec-M6UR76J5-DSk5_wnx.mjs → js-exec-M6UR76J5-IyD-lpzv.mjs} +3 -3
- package/dist/{lib-Dl2j2VNl.mjs → lib-BOCdCkg7.mjs} +1 -1
- package/dist/{libesm-DC4M2SkF.mjs → libesm-YL3Bqolr.mjs} +1 -1
- package/dist/ln-4TRFBYAT-4XMTO1OQ.mjs +1 -0
- package/dist/loader-CkZHH0EN.mjs +4 -0
- package/dist/loader-DlIwgUOY.mjs +1 -0
- package/dist/ls-KSXFZCWH-Bw_Cf-VY.mjs +1 -0
- package/dist/{lzma-0LJzVZpl.mjs → lzma-vr8hBkhz.mjs} +2 -2
- package/dist/md5sum-INMIK4DX-CAIH4ZVI.mjs +1 -0
- package/dist/mkdir-TDEMSB6C-D1oUG8Jf.mjs +1 -0
- package/dist/mrmime-C2W7cgq2.mjs +2 -0
- package/dist/mv-Z6MORUFL-CN471qcL.mjs +1 -0
- package/dist/nl-U5YJDM32-CFzXKze3.mjs +1 -0
- package/dist/od-VJEF2UR5-C2R4Accu.mjs +1 -0
- package/dist/{open-browser-BzMQ6cLf.mjs → open-browser-BZZK_gJj.mjs} +1 -1
- package/dist/paste-7N6AFSDS-bUl2Dwz3.mjs +1 -0
- package/dist/preview-1aNziE5D.mjs +1 -0
- package/dist/preview-BK6QYYA7.mjs +3 -0
- package/dist/printf-CX64KX2P-Ce--gWAq.mjs +1 -0
- package/dist/public/assets/ActivityModeContent-1ymqlcHI.js +2 -0
- package/dist/public/assets/{ActivityPanelDiffView-D-EUyEh6.js → ActivityPanelDiffView-DoHWP1ak.js} +1 -1
- package/dist/public/assets/DocumentContext-bvfr7pL2.js +37 -0
- package/dist/public/assets/GraphPanel-DdVygxYk.js +46 -0
- package/dist/public/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
- package/dist/public/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
- package/dist/public/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
- package/dist/public/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
- package/dist/public/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
- package/dist/public/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
- package/dist/public/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
- package/dist/public/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
- package/dist/public/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
- package/dist/public/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
- package/dist/public/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
- package/dist/public/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
- package/dist/public/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
- package/dist/public/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
- package/dist/public/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
- package/dist/public/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
- package/dist/public/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
- package/dist/public/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
- package/dist/public/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
- package/dist/public/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
- package/dist/public/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
- package/dist/public/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
- package/dist/public/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
- package/dist/public/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
- package/dist/public/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
- package/dist/public/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
- package/dist/public/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
- package/dist/public/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
- package/dist/public/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
- package/dist/public/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
- package/dist/public/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
- package/dist/public/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
- package/dist/public/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
- package/dist/public/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
- package/dist/public/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
- package/dist/public/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
- package/dist/public/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
- package/dist/public/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
- package/dist/public/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
- package/dist/public/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
- package/dist/public/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
- package/dist/public/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
- package/dist/public/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
- package/dist/public/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
- package/dist/public/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
- package/dist/public/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
- package/dist/public/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
- package/dist/public/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
- package/dist/public/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
- package/dist/public/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
- package/dist/public/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
- package/dist/public/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
- package/dist/public/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
- package/dist/public/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
- package/dist/public/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
- package/dist/public/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
- package/dist/public/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
- package/dist/public/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
- package/dist/public/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
- package/dist/public/assets/McpConsentDialogBody-CJwPf_uv.js +1 -0
- package/dist/public/assets/OutlinePanel-dumodx-h.js +2 -0
- package/dist/public/assets/SettingsPane-CtgbQZxP.js +6 -0
- package/dist/public/assets/SourceEditor-CR_7DOAH.js +2 -0
- package/dist/public/assets/__vite-browser-external-FEGw1XPd.js +1 -0
- package/dist/public/assets/_baseFor-CX8dsZbW.js +1 -0
- package/dist/public/assets/{agent-presence-BXsx4eTl.js → agent-presence-Ds2n3U5P.js} +1 -1
- package/dist/public/assets/arc-BL_OKZmE.js +1 -0
- package/dist/public/assets/architecture-YZFGNWBL-DVxNz-zn.js +1 -0
- package/dist/public/assets/architectureDiagram-Q4EWVU46-BKKtWWhU.js +36 -0
- package/dist/public/assets/array-X0JlPOfd.js +1 -0
- package/dist/public/assets/blockDiagram-DXYQGD6D-fzO4vZye.js +132 -0
- package/dist/public/assets/{button-BPXuMr5W.js → button-BsFpqlpT.js} +1 -1
- package/dist/public/assets/c4Diagram-AHTNJAMY-BkXqEjiP.js +10 -0
- package/dist/public/assets/channel-CR-xJel6.js +1 -0
- package/dist/public/assets/chunk-2KRD3SAO-DQj0pw3H.js +1 -0
- package/dist/public/assets/chunk-336JU56O-CBajDulv.js +2 -0
- package/dist/public/assets/chunk-426QAEUC-BoBKbVmN.js +1 -0
- package/dist/public/assets/chunk-4BX2VUAB-D8pbSOlJ.js +1 -0
- package/dist/public/assets/chunk-4TB4RGXK-mA6CujZO.js +206 -0
- package/dist/public/assets/chunk-55IACEB6-CqVyNzhX.js +1 -0
- package/dist/public/assets/chunk-5FUZZQ4R-BVDLgFg2.js +62 -0
- package/dist/public/assets/chunk-5PVQY5BW-Cxi5d3lT.js +2 -0
- package/dist/public/assets/chunk-67CJDMHE-CdrAY8qZ.js +1 -0
- package/dist/public/assets/chunk-7N4EOEYR-CJ3HBg3c.js +1 -0
- package/dist/public/assets/chunk-AA7GKIK3-D0ckJAXt.js +1 -0
- package/dist/public/assets/chunk-BSJP7CBP-D4bNhKd7.js +1 -0
- package/dist/public/assets/chunk-CFjPhJqf.js +1 -0
- package/dist/public/assets/chunk-CIAEETIT-D1Fpp2md.js +1 -0
- package/dist/public/assets/chunk-EDXVE4YY-ChhT3Iyo.js +1 -0
- package/dist/public/assets/chunk-ENJZ2VHE-Bby39so4.js +10 -0
- package/dist/public/assets/chunk-FMBD7UC4-pRkDIOZn.js +15 -0
- package/dist/public/assets/chunk-FOC6F5B3-BsB4oTj4.js +1 -0
- package/dist/public/assets/chunk-ICPOFSXX-CrnuSfeJ.js +122 -0
- package/dist/public/assets/chunk-K5T4RW27-CtREah_n.js +94 -0
- package/dist/public/assets/chunk-KGLVRYIC-DtDxSfKu.js +1 -0
- package/dist/public/assets/chunk-LIHQZDEY-D63TRk6j.js +1 -0
- package/dist/public/assets/chunk-ORNJ4GCN-Dv2PvYVu.js +1 -0
- package/dist/public/assets/chunk-OYMX7WX6-BhfqKepC.js +231 -0
- package/dist/public/assets/chunk-QZHKN3VN-DBRWHtgj.js +1 -0
- package/dist/public/assets/chunk-U2HBQHQK-6BAKH95D.js +70 -0
- package/dist/public/assets/chunk-X2U36JSP-Cqpkx90-.js +1 -0
- package/dist/public/assets/chunk-XPW4576I-DSytTnq4.js +32 -0
- package/dist/public/assets/chunk-YZCP3GAM-Dt9awjVh.js +1 -0
- package/dist/public/assets/chunk-ZZ45TVLE-JGFITgiO.js +1 -0
- package/dist/public/assets/classDiagram-6PBFFD2Q-oopM_Z0m.js +1 -0
- package/dist/public/assets/classDiagram-v2-HSJHXN6E-ZAL74u9S.js +1 -0
- package/dist/public/assets/clone-C5y6xhRJ.js +1 -0
- package/dist/public/assets/colors-XIJoz9Bd.js +1 -0
- package/dist/public/assets/{compiler-runtime-Y11fyRVL.js → compiler-runtime-CVnuRdak.js} +1 -1
- package/dist/public/assets/config-validation-events-BvuBj41U.js +1 -0
- package/dist/public/assets/cose-bilkent-S5V4N54A-B9nG-SHi.js +1 -0
- package/dist/public/assets/cytoscape.esm-BkjNfcSF.js +321 -0
- package/dist/public/assets/dagre-BEdPLXba.js +1 -0
- package/dist/public/assets/dagre-KV5264BT-DKn5nGCC.js +4 -0
- package/dist/public/assets/defaultLocale-ZxyFnXCb.js +1 -0
- package/dist/public/assets/diagram-5BDNPKRD-BQuwYEd0.js +10 -0
- package/dist/public/assets/diagram-G4DWMVQ6-BmzIMyV5.js +24 -0
- package/dist/public/assets/diagram-MMDJMWI5-CI5eJfgr.js +43 -0
- package/dist/public/assets/diagram-TYMM5635-Cc8TJ7v3.js +24 -0
- package/dist/public/assets/dialog-Cv1qneWl.js +45 -0
- package/dist/public/assets/{dist-DR1MrLJC.js → dist-B4kUko7n.js} +1 -1
- package/dist/public/assets/{dist-BqO6NfD-.js → dist-BH1b1nWB.js} +1 -1
- package/dist/public/assets/{dist-DlS42TIP.js → dist-BOapDt7N.js} +1 -1
- package/dist/public/assets/dist-CIRuNcH5.js +1 -0
- package/dist/public/assets/{dist-GlH2KPqY.js → dist-D08h1pJc.js} +1 -1
- package/dist/public/assets/{dist-D2wwoXzm.js → dist-S8LJmtzL.js} +1 -1
- package/dist/public/assets/{dist-DeDgmJv2.js → dist-VyzSEzD4.js} +1 -1
- package/dist/public/assets/{dist-CgLbXgrr.js → dist-nPpvoMNC.js} +1 -1
- package/dist/public/assets/doc-hash-Q6dTjwu5.js +421 -0
- package/dist/public/assets/erDiagram-SMLLAGMA-BkrhGWMT.js +85 -0
- package/dist/public/assets/flatten-UmyAv3V9.js +1 -0
- package/dist/public/assets/flowDiagram-DWJPFMVM-qh62fanI.js +162 -0
- package/dist/public/assets/ganttDiagram-T4ZO3ILL-DXuCeCk6.js +292 -0
- package/dist/public/assets/gitGraph-7Q5UKJZL-CYhZlmk3.js +1 -0
- package/dist/public/assets/gitGraphDiagram-UUTBAWPF-BbcuenPj.js +106 -0
- package/dist/public/assets/graphlib-CasrTmMJ.js +1 -0
- package/dist/public/assets/image-preview-BJSGEOo4.png +0 -0
- package/dist/public/assets/index-BBbaN3Kd.js +1858 -0
- package/dist/public/assets/index-DOkkqO-8.css +1 -0
- package/dist/public/assets/info-OMHHGYJF-BslcKZhH.js +1 -0
- package/dist/public/assets/infoDiagram-42DDH7IO-WFAMbO2S.js +2 -0
- package/dist/public/assets/init-CBj3ecIW.js +1 -0
- package/dist/public/assets/isEmpty-DWJlzxR1.js +1 -0
- package/dist/public/assets/isObjectLike-AdQZ65l0.js +1 -0
- package/dist/public/assets/isSymbol-BP7IOIqG.js +1 -0
- package/dist/public/assets/ishikawaDiagram-UXIWVN3A-BJBiReWg.js +70 -0
- package/dist/public/assets/journeyDiagram-VCZTEJTY-Boq77pl6.js +139 -0
- package/dist/public/assets/kanban-definition-6JOO6SKY-DYMSr18F.js +89 -0
- package/dist/public/assets/katex-qwlL5fSd.js +257 -0
- package/dist/public/assets/line-_p5Px7MV.js +1 -0
- package/dist/public/assets/linear-DwuDS4qT.js +1 -0
- package/dist/public/assets/mcp-consent-store-BBTXqzE6.js +1 -0
- package/dist/public/assets/mermaid-parser.core-BcBb_Ows.js +4 -0
- package/dist/public/assets/mermaid.core-ZLTnLqVQ.js +11 -0
- package/dist/public/assets/min-HKuGSUqa.js +1 -0
- package/dist/public/assets/mindmap-definition-QFDTVHPH-BSxM4djR.js +96 -0
- package/dist/public/assets/now-BBH4UqDm.js +1 -0
- package/dist/public/assets/ordinal-CeOFUmRv.js +1 -0
- package/dist/public/assets/packet-4T2RLAQJ-QVnYA304.js +1 -0
- package/dist/public/assets/{panel-BCRdtBla.js → panel-BgMqDESF.js} +1 -1
- package/dist/public/assets/path-rUlDLHdA.js +1 -0
- package/dist/public/assets/pdf-a35ddrIO.js +54 -0
- package/dist/public/assets/pdf.worker-B1D2UnXD.mjs +63133 -0
- package/dist/public/assets/pdf.worker-CM-zAFN-.js +1 -0
- package/dist/public/assets/pie-ZZUOXDRM-C61c5byc.js +1 -0
- package/dist/public/assets/pieDiagram-DEJITSTG-CHRE_Jie.js +30 -0
- package/dist/public/assets/preload-helper-2ej06EnG.js +1 -0
- package/dist/public/assets/propagation-api-qAYD7s-v.js +1 -0
- package/dist/public/assets/quadrantDiagram-34T5L4WZ-CQkE5TwH.js +7 -0
- package/dist/public/assets/radar-PYXPWWZC-CMxjRtd8.js +1 -0
- package/dist/public/assets/reduce-DotyoGA7.js +1 -0
- package/dist/public/assets/requirementDiagram-MS252O5E-DHK98tKS.js +84 -0
- package/dist/public/assets/rough.esm-BFJ-MgcB.js +1 -0
- package/dist/public/assets/sankeyDiagram-XADWPNL6-BIXaStZh.js +10 -0
- package/dist/public/assets/sequenceDiagram-FGHM5R23-BCNH3kJo.js +157 -0
- package/dist/public/assets/src-C9jsS3p4.js +1 -0
- package/dist/public/assets/src-zyMpT2LE.js +1 -0
- package/dist/public/assets/stateDiagram-FHFEXIEX-BC5mjB6x.js +1 -0
- package/dist/public/assets/stateDiagram-v2-QKLJ7IA2-B8L3BBt1.js +1 -0
- package/dist/public/assets/stex-BKMR5xQj.js +1 -0
- package/dist/public/assets/target-navigation-intent-BfGOumP6.js +1 -0
- package/dist/public/assets/telemetry-impl-CMeDUVKn.js +2 -0
- package/dist/public/assets/timeline-definition-GMOUNBTQ-VNxUGgXp.js +120 -0
- package/dist/public/assets/tooltip-CBGDOTMI.js +1 -0
- package/dist/public/assets/trace-api-DPMyR1_m.js +1 -0
- package/dist/public/assets/treeView-SZITEDCU-DfSa_Oiv.js +1 -0
- package/dist/public/assets/treemap-W4RFUUIX-Cp0s5wEq.js +1 -0
- package/dist/public/assets/vennDiagram-DHZGUBPP-DV2Y2j0r.js +34 -0
- package/dist/public/assets/video-preview-vLovc_Vy.png +0 -0
- package/dist/public/assets/wardley-RL74JXVD-CXcBKCuj.js +1 -0
- package/dist/public/assets/wardleyDiagram-NUSXRM2D-C1mMZ3kx.js +20 -0
- package/dist/public/assets/xychartDiagram-5P7HB3ND-CxFcwN2X.js +7 -0
- package/dist/public/index.html +43 -18
- package/dist/pwd-D4OZ7N27-C18XewhV.mjs +1 -0
- package/dist/{python3-AUFTPCU6-MeZyx8_A.mjs → python3-AUFTPCU6-BaJugIdp.mjs} +2 -2
- package/dist/readlink-MI4GCHJF-CHvs7DDT.mjs +1 -0
- package/dist/rev-XOSYPP45-2mnFFZWW.mjs +1 -0
- package/dist/rg-FOQSCCX3-BJahNfSe.mjs +1 -0
- package/dist/rm-RTZG23RL-D9-0WGRY.mjs +1 -0
- package/dist/rmdir-XTQXT7RK-Br7eH9kL.mjs +1 -0
- package/dist/{rolldown-runtime-wcPFST8Q-BB0WpHs3.mjs → rolldown-runtime-twds-ZHy-Dxr-RWJs.mjs} +1 -1
- package/dist/schemas/v0/config.project-local.schema.json +30 -0
- package/dist/schemas/v0/config.project.schema.json +59 -0
- package/dist/schemas/v0/config.user.schema.json +58 -0
- package/dist/sed-VFTTATXJ-mYhAmixc.mjs +1 -0
- package/dist/seq-RN5ZUASB-CKf5MNNO.mjs +1 -0
- package/dist/server-lock-D7DXNVql-B5nINglj.mjs +1 -0
- package/dist/server-lock-D7DXNVql-BRVVzA6T.mjs +2 -0
- package/dist/sha1sum-VJPNLNU6-DuOHap1X.mjs +1 -0
- package/dist/sha256sum-PI32XWXY-D9fEipQ7.mjs +1 -0
- package/dist/sleep-VZFPZFWA-B1fSoYuO.mjs +1 -0
- package/dist/sort-DCNRDA7U-DDCY4JZu.mjs +1 -0
- package/dist/split-SITCSYCZ-b9hfEJw7.mjs +1 -0
- package/dist/sqlite3-56UMWEY3-BQEx5i3P.mjs +1 -0
- package/dist/src-DyJycG37.mjs +1 -0
- package/dist/start-BAIlolZU.mjs +3 -0
- package/dist/start-C7apYJ7u.mjs +1 -0
- package/dist/stat-BT5A227F-Dzp4sgau.mjs +1 -0
- package/dist/strings-7PLOGTPD-DT41jX9d.mjs +1 -0
- package/dist/tac-SJGXQ4T2-BpdVoP8b.mjs +1 -0
- package/dist/tail-S5ULNTJU-0-sYrYik.mjs +1 -0
- package/dist/tar-ANUBEFJY-Wh3na_NU.mjs +1 -0
- package/dist/tee-O7VXZDCO-CwnGG0go.mjs +1 -0
- package/dist/time-DEUO3QV2-DzkqaQ1k.mjs +1 -0
- package/dist/timeout-VRKMCG72-BtPBpIRq.mjs +1 -0
- package/dist/touch-DX2IJOQ4-KW0Ui-lB.mjs +1 -0
- package/dist/tr-2HXZRDSW-C6Kf0M8T.mjs +1 -0
- package/dist/tree-LYXBS7DC-BN1FBqvM.mjs +1 -0
- package/dist/true-WHJNXCHG-DxCMVdqj.mjs +1 -0
- package/dist/unexpand-RGTMIGZM-DZ4Kf6Xq.mjs +1 -0
- package/dist/uniq-SUNANL47-Ceg51JdA.mjs +1 -0
- package/dist/wc-TQB3VNOX-BzWNq0MY.mjs +1 -0
- package/dist/which-XZHEH76L-DH_U2-Cj.mjs +1 -0
- package/dist/whoami-DGKU3D2X-BholYNPM.mjs +1 -0
- package/dist/xan-BXDXYEIB-b1eAtgch.mjs +1 -0
- package/dist/xan-view-ECQUO7AJ-DWDC57b_.mjs +1 -0
- package/dist/xargs-I6EZUCYF-Cov-i7kW.mjs +1 -0
- package/dist/yq-MJMAR36V-1r29nH4p.mjs +1 -0
- package/package.json +12 -15
- package/scripts/build-config-schema.mjs +69 -0
- package/scripts/postinstall.mjs +0 -20
- package/scripts/probe-exec.ts +7 -10
- package/scripts/probe-read-document.ts +1 -13
- package/dist/alias-JE7RI5QX-TirEebNy.mjs +0 -1
- package/dist/awk2-POPGKRAI-DigGXYmO.mjs +0 -1
- package/dist/base64-4YMZCVJ5-B4GnvJtR.mjs +0 -1
- package/dist/basename-AA2KJYZQ-DlZHEU5f.mjs +0 -1
- package/dist/bash-IJWYRKFO-BA1gxmDh.mjs +0 -1
- package/dist/build-D4l8tfO0.mjs +0 -2
- package/dist/cat-RDUMLXKC-CAQOzqfy.mjs +0 -1
- package/dist/chmod-SYMGL4JA-BC2VVHCa.mjs +0 -1
- package/dist/clear-5CZ5X4YR-B5oRhK00.mjs +0 -1
- package/dist/colors-BnZ-i-vb.mjs +0 -1
- package/dist/colors-DoPZvo1q.mjs +0 -2
- package/dist/column-WLPMMSTS-fFssyAvW.mjs +0 -1
- package/dist/comm-5SLSESQG-DRcwK9Gt.mjs +0 -1
- package/dist/constants-ekUaxW9F.mjs +0 -2
- package/dist/cp-XOYR4ABJ-BUZu7KNi.mjs +0 -1
- package/dist/cut-OPC3VAGB-BIRZEN2Y.mjs +0 -1
- package/dist/date-DD7FVA2V-DRxppxbV.mjs +0 -1
- package/dist/diff-HJF2MPDN-Yo3lE_58.mjs +0 -1
- package/dist/dirname-LEMTZZFS-2cTXnmQf.mjs +0 -1
- package/dist/dist-0qFIeeXA.mjs +0 -142
- package/dist/dist-BCyi1oM7.mjs +0 -116
- package/dist/dist-CXdg7KnM.mjs +0 -199
- package/dist/dist-Ct-gJ7iD.mjs +0 -1
- package/dist/du-WO2ENHXQ-B5uda2-L.mjs +0 -1
- package/dist/echo-O45JWWI2-B9QCpaZR.mjs +0 -1
- package/dist/env-5EPCWSXR--4eujSrM.mjs +0 -1
- package/dist/expand-DTNXU4LQ-BWwDphsm.mjs +0 -1
- package/dist/expansion-ENLSRCXJ-BBTiIHJS.mjs +0 -1
- package/dist/expr-5T3UU5KE-D5OdgUlD.mjs +0 -1
- package/dist/file-ZIGAJ4YS-zZfB3nws.mjs +0 -1
- package/dist/find-TPUOAIUQ-DaW1-9Vm.mjs +0 -1
- package/dist/flag-coverage-QT4N2Z44-B8zntJyb.mjs +0 -2
- package/dist/fold-LDSORVYE-CAfX9d8n.mjs +0 -1
- package/dist/git-handle-BhGnmvTB-Di8EsrYa.mjs +0 -1
- package/dist/grep-3AIAIJVR-C9A_aSMK.mjs +0 -1
- package/dist/gzip-AQXSGOVS-CL228lzk.mjs +0 -1
- package/dist/head-HT2B6D2J-DyNkF3aY.mjs +0 -1
- package/dist/help-VVWX7SA5-D5WzpTIY.mjs +0 -1
- package/dist/history-J4QRNGRO-DUTsR2Sf.mjs +0 -1
- package/dist/hostname-BK6HG2DE-zmNkhqtV.mjs +0 -1
- package/dist/html-to-markdown-TFCECAGV-Ux5cbjMV.mjs +0 -1
- package/dist/init-Ccjx3YjD.mjs +0 -1
- package/dist/init-DOTyF3_B.mjs +0 -1
- package/dist/init-Dc2dCgGt.mjs +0 -255
- package/dist/init-DeV-MdCs.mjs +0 -120
- package/dist/join-GG2LDHE5-B6C3-ghI.mjs +0 -1
- package/dist/jq-ODXZBPLY-Uj_VahOC.mjs +0 -1
- package/dist/keepalive-CZzB5k1h.mjs +0 -2
- package/dist/ln-4TRFBYAT-DiYK6FgR.mjs +0 -1
- package/dist/loader-Bveym9GJ.mjs +0 -1
- package/dist/loader-C3jzK-Dy.mjs +0 -3
- package/dist/ls-KSXFZCWH-B0la1Q-P.mjs +0 -1
- package/dist/md5sum-INMIK4DX-DAG8dmoX.mjs +0 -1
- package/dist/mkdir-TDEMSB6C-CRMB4_AE.mjs +0 -1
- package/dist/mv-Z6MORUFL-1iTO8NY5.mjs +0 -1
- package/dist/nl-U5YJDM32-IRiMqQcZ.mjs +0 -1
- package/dist/od-VJEF2UR5-PasvdXXR.mjs +0 -1
- package/dist/paste-7N6AFSDS-C3M5_YM6.mjs +0 -1
- package/dist/paths-BA1xev5m.mjs +0 -1
- package/dist/paths-DtQI2_ER.mjs +0 -2
- package/dist/preview-BTFflPaA.mjs +0 -1
- package/dist/preview-BuXqi6nl.mjs +0 -3
- package/dist/printf-CX64KX2P-uTOF6Zpa.mjs +0 -1
- package/dist/public/assets/ActivityModeContent-Ccu_n0bV.js +0 -2
- package/dist/public/assets/DocumentContext-C1msvcHp.js +0 -5
- package/dist/public/assets/GraphPanel-CJ_U3W3L.js +0 -46
- package/dist/public/assets/McpConsentDialogBody-Csjet19t.js +0 -1
- package/dist/public/assets/PageListContext-B5SWnlyE.js +0 -278
- package/dist/public/assets/SourceEditor-OFesfBB2.js +0 -3
- package/dist/public/assets/__vite-browser-external-Dz2JgTKm.js +0 -1
- package/dist/public/assets/chunk-DECur_0Z.js +0 -1
- package/dist/public/assets/clipboard-DAcKCHl1.js +0 -32
- package/dist/public/assets/dialog-CtSN0d2b.js +0 -45
- package/dist/public/assets/index-CwFTGDhe.js +0 -1843
- package/dist/public/assets/index-DjR45Lon.css +0 -1
- package/dist/public/assets/propagation-api-Bugyj7xy.js +0 -1
- package/dist/public/assets/telemetry-impl-D8K_lJGH.js +0 -2
- package/dist/public/assets/toggle-group-LDOO6zaV.js +0 -1
- package/dist/public/assets/tooltip-D0MnQ7ZX.js +0 -1
- package/dist/pwd-D4OZ7N27-DNkGMjtD.mjs +0 -1
- package/dist/readlink-MI4GCHJF-DRVZBAvY.mjs +0 -1
- package/dist/rev-XOSYPP45-q2MQLs41.mjs +0 -1
- package/dist/rg-FOQSCCX3-Cssz8GNh.mjs +0 -1
- package/dist/rm-RTZG23RL-fjvVauiI.mjs +0 -1
- package/dist/rmdir-XTQXT7RK-C13HY1h7.mjs +0 -1
- package/dist/sed-VFTTATXJ-DO49xc40.mjs +0 -1
- package/dist/seq-RN5ZUASB-D9r6kc_Z.mjs +0 -1
- package/dist/server-lock-n3Y5JWNv-3o7br8XE.mjs +0 -2
- package/dist/server-lock-n3Y5JWNv-DXpg9_eU.mjs +0 -1
- package/dist/sha1sum-VJPNLNU6-4uBt63v6.mjs +0 -1
- package/dist/sha256sum-PI32XWXY-_uaXSgBK.mjs +0 -1
- package/dist/sleep-VZFPZFWA-CS7jDpXp.mjs +0 -1
- package/dist/sort-DCNRDA7U-Dmp_2ZoH.mjs +0 -1
- package/dist/split-SITCSYCZ-Cu9ifXuc.mjs +0 -1
- package/dist/sqlite3-56UMWEY3-D1Xq8d4g.mjs +0 -1
- package/dist/src-CCtbSzLe.mjs +0 -1
- package/dist/start-D7mCFrVn.mjs +0 -1
- package/dist/start-RnYkhoRl.mjs +0 -2
- package/dist/stat-BT5A227F-Dqepjl-k.mjs +0 -1
- package/dist/strings-7PLOGTPD-g6FhPS64.mjs +0 -1
- package/dist/tac-SJGXQ4T2-DczI7HKk.mjs +0 -1
- package/dist/tail-S5ULNTJU-Bk22kVUG.mjs +0 -1
- package/dist/tar-ANUBEFJY-1lwT6ndQ.mjs +0 -1
- package/dist/tee-O7VXZDCO-Ftqr8Jad.mjs +0 -1
- package/dist/time-DEUO3QV2-BtzQ0nVf.mjs +0 -1
- package/dist/timeout-VRKMCG72-Cpzi9cz-.mjs +0 -1
- package/dist/touch-DX2IJOQ4-ewCHfbB3.mjs +0 -1
- package/dist/tr-2HXZRDSW-DrrobhxR.mjs +0 -1
- package/dist/tree-LYXBS7DC-DZnTMKSh.mjs +0 -1
- package/dist/true-WHJNXCHG-BaLssNp9.mjs +0 -1
- package/dist/unexpand-RGTMIGZM-BOmSL08U.mjs +0 -1
- package/dist/uniq-SUNANL47-Cn_JDmUJ.mjs +0 -1
- package/dist/wc-TQB3VNOX-DkOBrQlr.mjs +0 -1
- package/dist/which-XZHEH76L-DxZJ58G5.mjs +0 -1
- package/dist/whoami-DGKU3D2X-Bn1LP0m_.mjs +0 -1
- package/dist/wrapper-BTT6637Z.mjs +0 -7
- package/dist/xan-BXDXYEIB-_Vtao535.mjs +0 -1
- package/dist/xan-view-ECQUO7AJ-6vlhfSF-.mjs +0 -1
- package/dist/xargs-I6EZUCYF-dHdg4qaj.mjs +0 -1
- package/dist/yq-MJMAR36V-pRBq87Ya.mjs +0 -1
- /package/dist/public/assets/{go-DatQmDtN.js → go-a33xvodr.js} +0 -0
- /package/dist/public/assets/{shell-7yok6dsz.js → shell-40VLet8r.js} +0 -0
- /package/dist/public/assets/{w3c-keyname-CSlwavrd.js → w3c-keyname-Dfj2imOv.js} +0 -0
|
@@ -1,1843 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./telemetry-impl-D8K_lJGH.js","./chunk-DECur_0Z.js","./propagation-api-Bugyj7xy.js","./ActivityPanelDiffView-D-EUyEh6.js","./compiler-runtime-Y11fyRVL.js","./ActivityPanelDiffView-legcy4jI.css","./GraphPanel-CJ_U3W3L.js","./PageListContext-B5SWnlyE.js","./w3c-keyname-CSlwavrd.js","./tooltip-D0MnQ7ZX.js","./button-BPXuMr5W.js","./toggle-group-LDOO6zaV.js","./panel-BCRdtBla.js","./ActivityModeContent-Ccu_n0bV.js","./DocumentContext-C1msvcHp.js","./dialog-CtSN0d2b.js","./agent-presence-BXsx4eTl.js","./SourceEditor-OFesfBB2.js","./clipboard-DAcKCHl1.js","./dist-D2wwoXzm.js","./dist-CgLbXgrr.js","./dist-GlH2KPqY.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{r as e,t}from"./chunk-DECur_0Z.js";import{d as n}from"./propagation-api-Bugyj7xy.js";import{n as r,r as i,t as a}from"./compiler-runtime-Y11fyRVL.js";import{A as o,C as s,D as c,E as l,M as u,O as d,S as f,T as p,_ as m,a as h,b as g,c as _,d as v,f as y,g as b,h as x,i as S,j as C,k as w,l as T,m as E,n as D,o as O,p as k,r as A,s as j,t as M,u as N,v as P,w as F,x as I,y as L}from"./panel-BCRdtBla.js";import{S as R,a as z,b as B,c as V,f as H,g as U,h as ee,i as W,m as te,n as G,o as ne,p as K,r as re,s as ie,t as q,u as J,v as ae,x as Y,y as oe}from"./button-BPXuMr5W.js";import{a as se,c as ce,d as le,f as ue,g as de,h as fe,i as pe,l as me,m as he,n as ge,o as _e,p as ve,r as ye,s as be,t as xe,u as Se}from"./agent-presence-BXsx4eTl.js";import{a as Ce,c as we,d as Te,f as Ee,i as De,l as Oe,n as ke,o as Ae,r as je,s as Me,t as Ne,u as Pe}from"./toggle-group-LDOO6zaV.js";import{A as Fe,B as Ie,C as Le,F as Re,L as ze,M as Be,N as Ve,R as He,S as Ue,T as We,U as Ge,V as Ke,_t as qe,a as Je,at as Ye,b as Xe,c as Ze,ct as Qe,d as $e,dt as et,f as tt,ft as nt,gt as rt,ht as it,i as at,it as ot,j as st,l as ct,lt,m as ut,mt as dt,n as ft,nt as pt,o as mt,ot as ht,p as gt,pt as _t,r as vt,rt as yt,s as bt,st as xt,t as St,tt as Ct,u as wt,ut as Tt,vt as Et,w as Dt,x as Ot,y as kt,z as At}from"./DocumentContext-C1msvcHp.js";import{S as jt,_ as Mt,a as Nt,b as Pt,c as Ft,f as It,g as Lt,h as Rt,i as zt,l as Bt,m as Vt,n as Ht,o as Ut,p as Wt,r as Gt,s as Kt,t as qt,u as Jt,v as Yt,x as Xt,y as Zt}from"./dialog-CtSN0d2b.js";import{a as Qt,c as $t,i as en,l as tn,n as nn,o as rn,r as an,s as on,t as sn,u as cn}from"./tooltip-D0MnQ7ZX.js";import{$t as ln,C as un,Ct as dn,D as fn,Et as pn,F as mn,Ft as hn,Gt as gn,H as _n,I as vn,J as yn,Jt as bn,K as xn,Kt as Sn,L as Cn,Nt as wn,Ot as Tn,P as En,Pt as Dn,Q as On,Qt as kn,S as An,St as jn,U as Mn,Ut as Nn,W as Pn,Wt as Fn,X as In,Yt as Ln,Zt as Rn,c as zn,d as Bn,et as Vn,ft as Hn,h as Un,ht as Wn,i as Gn,j as Kn,m as qn,mt as Jn,n as Yn,ot as Xn,pt as Zn,q as Qn,qt as $n,r as er,s as tr,st as nr,t as rr,u as ir}from"./PageListContext-B5SWnlyE.js";import{a as ar,d as or,i as sr,l as cr,n as lr,o as ur,r as dr,s as fr,u as pr,y as mr}from"./clipboard-DAcKCHl1.js";import{At as hr,C as gr,Dt as _r,Et as vr,F as yr,Ft as br,Nt as xr,O as Sr,Pt as Cr,Q as wr,St as Tr,X as Er,Y as Dr,Z as Or,it as kr,jt as Ar,kt as jr,q as Mr,wt as Nr,yt as Pr}from"./dist-CgLbXgrr.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();function Fr(){({BASE_URL:`./`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1})?.VITE_OTEL_ENABLED===`true`&&n(()=>import(`./telemetry-impl-D8K_lJGH.js`).then(e=>e.install()),__vite__mapDeps([0,1,2]),import.meta.url)}function Ir(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{P(e,()=>t.signal,()=>n=!0)},u=I(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject();if(r==null&&e.pages.length)return Promise.resolve(e);let a=await u((()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})()),{maxPages:o}=t.options,s=i?g:L;return{pages:s(e.pages,a,o),pageParams:s(e.pageParams,r,o)}};if(i&&a.length){let e=i===`backward`,t=e?Rr:Lr,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:Lr(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=l}}}function Lr(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Rr(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var zr=class extends E{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||Br(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=x({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});let r=this.state.status===`pending`,i=!this.#r.canStart();try{if(r)t();else{this.#i({type:`pending`,variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:i})}let a=await this.#r.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#i({type:`success`,data:a}),a}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#n.runNext(this)}}#i(e){this.state=(t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}})(this.state),m.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function Br(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var Vr=class extends u{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){let r=new zr({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=Hr(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=Hr(e);if(typeof t==`string`){let n=this.#t.get(t);if(n)if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=Hr(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}else return!0}runNext(e){let t=Hr(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){m.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>p(t,e))}findAll(e={}){return this.getAll().filter(t=>p(e,t))}notify(e){m.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return m.batch(()=>Promise.all(e.map(e=>e.continue().catch(c))))}};function Hr(e){return e.options.scope?.id}var Ur=class extends u{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let r=t.queryKey,i=t.queryHash??F(r,t),a=this.get(i);return a||(a=new k({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){m.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>l(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>l(e,t)):t}notify(e){m.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){m.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){m.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Wr=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new Ur,this.#t=e.mutationCache||new Vr,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=C.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=b.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(w(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=f(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return m.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;m.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return m.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=m.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(c).catch(c)}invalidateQueries(e,t={}){return m.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=m.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(c)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(c)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(w(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(c).catch(c)}fetchInfiniteQuery(e){return e.behavior=Ir(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(c).catch(c)}ensureInfiniteQueryData(e){return e.behavior=Ir(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return b.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(s(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{d(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(s(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{d(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=F(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===o&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},Gr=t((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),Kr=t(((e,t)=>{t.exports=Gr()})),qr=t((e=>{var t=Kr(),n=r(),i=R();function a(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function o(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function s(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function c(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function u(e){if(s(e)!==e)throw Error(a(188))}function d(e){var t=e.alternate;if(!t){if(t=s(e),t===null)throw Error(a(188));return t===e?e:null}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return u(i),e;if(o===r)return u(i),t;o=o.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=o;else{for(var c=!1,l=i.child;l;){if(l===n){c=!0,n=i,r=o;break}if(l===r){c=!0,r=i,n=o;break}l=l.sibling}if(!c){for(l=o.child;l;){if(l===n){c=!0,n=o,r=i;break}if(l===r){c=!0,r=o,n=i;break}l=l.sibling}if(!c)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(n.tag!==3)throw Error(a(188));return n.stateNode.current===n?e:t}function f(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=f(e),t!==null)return t;e=e.sibling}return null}var p=Object.assign,m=Symbol.for(`react.element`),h=Symbol.for(`react.transitional.element`),g=Symbol.for(`react.portal`),_=Symbol.for(`react.fragment`),v=Symbol.for(`react.strict_mode`),y=Symbol.for(`react.profiler`),b=Symbol.for(`react.consumer`),x=Symbol.for(`react.context`),S=Symbol.for(`react.forward_ref`),C=Symbol.for(`react.suspense`),w=Symbol.for(`react.suspense_list`),T=Symbol.for(`react.memo`),E=Symbol.for(`react.lazy`),D=Symbol.for(`react.activity`),O=Symbol.for(`react.memo_cache_sentinel`),k=Symbol.iterator;function A(e){return typeof e!=`object`||!e?null:(e=k&&e[k]||e[`@@iterator`],typeof e==`function`?e:null)}var j=Symbol.for(`react.client.reference`);function M(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===j?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case _:return`Fragment`;case y:return`Profiler`;case v:return`StrictMode`;case C:return`Suspense`;case w:return`SuspenseList`;case D:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case g:return`Portal`;case x:return e.displayName||`Context`;case b:return(e._context.displayName||`Context`)+`.Consumer`;case S:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case T:return t=e.displayName||null,t===null?M(e.type)||`Memo`:t;case E:t=e._payload,e=e._init;try{return M(e(t))}catch{}}return null}var N=Array.isArray,P=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I={pending:!1,data:null,method:null,action:null},L=[],z=-1;function B(e){return{current:e}}function V(e){0>z||(e.current=L[z],L[z]=null,z--)}function H(e,t){z++,L[z]=e.current,e.current=t}var U=B(null),ee=B(null),W=B(null),te=B(null);function G(e,t){switch(H(W,t),H(ee,e),H(U,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Hd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Hd(t),e=Ud(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}V(U),H(U,e)}function ne(){V(U),V(ee),V(W)}function K(e){e.memoizedState!==null&&H(te,e);var t=U.current,n=Ud(t,e.type);t!==n&&(H(ee,e),H(U,n))}function re(e){ee.current===e&&(V(U),V(ee)),te.current===e&&(V(te),$f._currentValue=I)}var ie,q;function J(e){if(ie===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);ie=t&&t[1]||``,q=-1<e.stack.indexOf(`
|
|
3
|
-
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
4
|
-
`+ie+e+q}var ae=!1;function Y(e,t){if(!e||ae)return``;ae=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,`props`,{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,`name`,{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
|
|
5
|
-
`),l=s.split(`
|
|
6
|
-
`);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
|
|
7
|
-
`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{ae=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?J(n):``}function oe(e,t){switch(e.tag){case 26:case 27:case 5:return J(e.type);case 16:return J(`Lazy`);case 13:return e.child!==t&&t!==null?J(`Suspense Fallback`):J(`Suspense`);case 19:return J(`SuspenseList`);case 0:case 15:return Y(e.type,!1);case 11:return Y(e.type.render,!1);case 1:return Y(e.type,!0);case 31:return J(`Activity`);default:return``}}function se(e){try{var t=``,n=null;do t+=oe(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
|
8
|
-
Error generating stack: `+e.message+`
|
|
9
|
-
`+e.stack}}var ce=Object.prototype.hasOwnProperty,le=t.unstable_scheduleCallback,ue=t.unstable_cancelCallback,de=t.unstable_shouldYield,fe=t.unstable_requestPaint,pe=t.unstable_now,me=t.unstable_getCurrentPriorityLevel,he=t.unstable_ImmediatePriority,ge=t.unstable_UserBlockingPriority,_e=t.unstable_NormalPriority,ve=t.unstable_LowPriority,ye=t.unstable_IdlePriority,be=t.log,xe=t.unstable_setDisableYieldValue,Se=null,Ce=null;function we(e){if(typeof be==`function`&&xe(e),Ce&&typeof Ce.setStrictMode==`function`)try{Ce.setStrictMode(Se,e)}catch{}}var Te=Math.clz32?Math.clz32:Oe,Ee=Math.log,De=Math.LN2;function Oe(e){return e>>>=0,e===0?32:31-(Ee(e)/De|0)|0}var ke=256,Ae=262144,je=4194304;function Me(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ne(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Me(n))):i=Me(o):i=Me(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Me(n))):i=Me(o)):i=Me(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Pe(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Fe(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ie(){var e=je;return je<<=1,!(je&62914560)&&(je=4194304),e}function Le(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Re(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ze(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Te(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&Be(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function Be(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Te(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function Ve(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Te(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function He(e,t){var n=t&-t;return n=n&42?1:Ue(n),(n&(e.suspendedLanes|t))===0?n:0}function Ue(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function We(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function Ge(){var e=F.p;return e===0?(e=window.event,e===void 0?32:hp(e.type)):e}function Ke(e,t){var n=F.p;try{return F.p=e,t()}finally{F.p=n}}var qe=Math.random().toString(36).slice(2),Je=`__reactFiber$`+qe,Ye=`__reactProps$`+qe,Xe=`__reactContainer$`+qe,Ze=`__reactEvents$`+qe,Qe=`__reactListeners$`+qe,$e=`__reactHandles$`+qe,et=`__reactResources$`+qe,tt=`__reactMarker$`+qe;function nt(e){delete e[Je],delete e[Ye],delete e[Ze],delete e[Qe],delete e[$e]}function rt(e){var t=e[Je];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Xe]||n[Je]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=ff(e);e!==null;){if(n=e[Je])return n;e=ff(e)}return t}e=n,n=e.parentNode}return null}function it(e){if(e=e[Je]||e[Xe]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function at(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(a(33))}function ot(e){var t=e[et];return t||=e[et]={hoistableStyles:new Map,hoistableScripts:new Map},t}function st(e){e[tt]=!0}var ct=new Set,lt={};function ut(e,t){dt(e,t),dt(e+`Capture`,t)}function dt(e,t){for(lt[e]=t,e=0;e<t.length;e++)ct.add(t[e])}var ft=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),pt={},mt={};function ht(e){return ce.call(mt,e)?!0:ce.call(pt,e)?!1:ft.test(e)?mt[e]=!0:(pt[e]=!0,!1)}function gt(e,t,n){if(ht(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function _t(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function vt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function yt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function bt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function xt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function St(e){if(!e._valueTracker){var t=bt(e)?`checked`:`value`;e._valueTracker=xt(e,t,``+e[t])}}function Ct(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=bt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function wt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var Tt=/[\n"\\]/g;function Et(e){return e.replace(Tt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Dt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+yt(t)):e.value!==``+yt(t)&&(e.value=``+yt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):kt(e,o,yt(n)):kt(e,o,yt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+yt(s):e.removeAttribute(`name`)}function Ot(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){St(e);return}n=n==null?``:``+yt(n),t=t==null?n:``+yt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),St(e)}function kt(e,t,n){t===`number`&&wt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function At(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+yt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function jt(e,t,n){if(t!=null&&(t=``+yt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+yt(n)}function Mt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(a(92));if(N(r)){if(1<r.length)throw Error(a(93));r=r[0]}n=r}n??=``,t=n}n=yt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),St(e)}function Nt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Pt=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function Ft(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||Pt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function It(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(a(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var i in t)r=t[i],t.hasOwnProperty(i)&&n[i]!==r&&Ft(e,i,r)}else for(var o in t)t.hasOwnProperty(o)&&Ft(e,o,t[o])}function Lt(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var Rt=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`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`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`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`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`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`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),zt=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Bt(e){return zt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function Vt(){}var Ht=null;function Ut(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Wt=null,Gt=null;function Kt(e){var t=it(e);if(t&&(e=t.stateNode)){var n=e[Ye]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Dt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+Et(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=r[Ye]||null;if(!i)throw Error(a(90));Dt(r,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Ct(r)}break a;case`textarea`:jt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&At(e,!!n.multiple,t,!1)}}}var qt=!1;function Jt(e,t,n){if(qt)return e(t,n);qt=!0;try{return e(t)}finally{if(qt=!1,(Wt!==null||Gt!==null)&&(vu(),Wt&&(t=Wt,e=Gt,Gt=Wt=null,Kt(t),e)))for(t=0;t<e.length;t++)Kt(e[t])}}function Yt(e,t){var n=e.stateNode;if(n===null)return null;var r=n[Ye]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(a(231,t,typeof n));return n}var Xt=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),Zt=!1;if(Xt)try{var Qt={};Object.defineProperty(Qt,`passive`,{get:function(){Zt=!0}}),window.addEventListener(`test`,Qt,Qt),window.removeEventListener(`test`,Qt,Qt)}catch{Zt=!1}var $t=null,en=null,tn=null;function nn(){if(tn)return tn;var e,t=en,n=t.length,r,i=`value`in $t?$t.value:$t.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return tn=i.slice(e,1<r?1-r:void 0)}function rn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function an(){return!0}function on(){return!1}function sn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?an:on,this.isPropagationStopped=on,this}return p(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=an)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=an)},persist:function(){},isPersistent:an}),t}var cn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ln=sn(cn),un=p({},cn,{view:0,detail:0}),dn=sn(un),fn,pn,mn,hn=p({},un,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:En,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==mn&&(mn&&e.type===`mousemove`?(fn=e.screenX-mn.screenX,pn=e.screenY-mn.screenY):pn=fn=0,mn=e),fn)},movementY:function(e){return`movementY`in e?e.movementY:pn}}),gn=sn(hn),_n=sn(p({},hn,{dataTransfer:0})),vn=sn(p({},un,{relatedTarget:0})),yn=sn(p({},cn,{animationName:0,elapsedTime:0,pseudoElement:0})),bn=sn(p({},cn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),xn=sn(p({},cn,{data:0})),Sn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Cn={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},wn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Tn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=wn[e])?!!t[e]:!1}function En(){return Tn}var Dn=sn(p({},un,{key:function(e){if(e.key){var t=Sn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=rn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Cn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:En,charCode:function(e){return e.type===`keypress`?rn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?rn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),On=sn(p({},hn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),kn=sn(p({},un,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:En})),An=sn(p({},cn,{propertyName:0,elapsedTime:0,pseudoElement:0})),jn=sn(p({},hn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),Mn=sn(p({},cn,{newState:0,oldState:0})),Nn=[9,13,27,32],Pn=Xt&&`CompositionEvent`in window,Fn=null;Xt&&`documentMode`in document&&(Fn=document.documentMode);var In=Xt&&`TextEvent`in window&&!Fn,Ln=Xt&&(!Pn||Fn&&8<Fn&&11>=Fn),Rn=` `,zn=!1;function Bn(e,t){switch(e){case`keyup`:return Nn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Vn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Hn=!1;function Un(e,t){switch(e){case`compositionend`:return Vn(t);case`keypress`:return t.which===32?(zn=!0,Rn):null;case`textInput`:return e=t.data,e===Rn&&zn?null:e;default:return null}}function Wn(e,t){if(Hn)return e===`compositionend`||!Pn&&Bn(e,t)?(e=nn(),tn=en=$t=null,Hn=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return Ln&&t.locale!==`ko`?null:t.data;default:return null}}var Gn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Kn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!Gn[e.type]:t===`textarea`}function qn(e,t,n,r){Wt?Gt?Gt.push(r):Gt=[r]:Wt=r,t=Ed(t,`onChange`),0<t.length&&(n=new ln(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var Jn=null,Yn=null;function Xn(e){vd(e,0)}function Zn(e){if(Ct(at(e)))return e}function Qn(e,t){if(e===`change`)return t}var $n=!1;if(Xt){var er;if(Xt){var tr=`oninput`in document;if(!tr){var nr=document.createElement(`div`);nr.setAttribute(`oninput`,`return;`),tr=typeof nr.oninput==`function`}er=tr}else er=!1;$n=er&&(!document.documentMode||9<document.documentMode)}function rr(){Jn&&(Jn.detachEvent(`onpropertychange`,ir),Yn=Jn=null)}function ir(e){if(e.propertyName===`value`&&Zn(Yn)){var t=[];qn(t,Yn,e,Ut(e)),Jt(Xn,t)}}function ar(e,t,n){e===`focusin`?(rr(),Jn=t,Yn=n,Jn.attachEvent(`onpropertychange`,ir)):e===`focusout`&&rr()}function or(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return Zn(Yn)}function sr(e,t){if(e===`click`)return Zn(t)}function cr(e,t){if(e===`input`||e===`change`)return Zn(t)}function lr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var ur=typeof Object.is==`function`?Object.is:lr;function dr(e,t){if(ur(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!ce.call(t,i)||!ur(e[i],t[i]))return!1}return!0}function fr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function pr(e,t){var n=fr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=fr(n)}}function mr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?mr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function hr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=wt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=wt(e.document)}return t}function gr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var _r=Xt&&`documentMode`in document&&11>=document.documentMode,vr=null,yr=null,br=null,xr=!1;function Sr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;xr||vr==null||vr!==wt(r)||(r=vr,`selectionStart`in r&&gr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),br&&dr(br,r)||(br=r,r=Ed(yr,`onSelect`),0<r.length&&(t=new ln(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=vr)))}function Cr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var wr={animationend:Cr(`Animation`,`AnimationEnd`),animationiteration:Cr(`Animation`,`AnimationIteration`),animationstart:Cr(`Animation`,`AnimationStart`),transitionrun:Cr(`Transition`,`TransitionRun`),transitionstart:Cr(`Transition`,`TransitionStart`),transitioncancel:Cr(`Transition`,`TransitionCancel`),transitionend:Cr(`Transition`,`TransitionEnd`)},Tr={},Er={};Xt&&(Er=document.createElement(`div`).style,`AnimationEvent`in window||(delete wr.animationend.animation,delete wr.animationiteration.animation,delete wr.animationstart.animation),`TransitionEvent`in window||delete wr.transitionend.transition);function Dr(e){if(Tr[e])return Tr[e];if(!wr[e])return e;var t=wr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Er)return Tr[e]=t[n];return e}var Or=Dr(`animationend`),kr=Dr(`animationiteration`),Ar=Dr(`animationstart`),jr=Dr(`transitionrun`),Mr=Dr(`transitionstart`),Nr=Dr(`transitioncancel`),Pr=Dr(`transitionend`),Fr=new Map,Ir=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);Ir.push(`scrollEnd`);function Lr(e,t){Fr.set(e,t),ut(t,[e])}var Rr=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},zr=[],Br=0,Vr=0;function Hr(){for(var e=Br,t=Vr=Br=0;t<e;){var n=zr[t];zr[t++]=null;var r=zr[t];zr[t++]=null;var i=zr[t];zr[t++]=null;var a=zr[t];if(zr[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&qr(n,i,a)}}function Ur(e,t,n,r){zr[Br++]=e,zr[Br++]=t,zr[Br++]=n,zr[Br++]=r,Vr|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Wr(e,t,n,r){return Ur(e,t,n,r),Jr(e)}function Gr(e,t){return Ur(e,null,null,t),Jr(e)}function qr(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Te(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function Jr(e){if(50<lu)throw lu=0,uu=null,Error(a(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Yr={};function Xr(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Zr(e,t,n,r){return new Xr(e,t,n,r)}function Qr(e){return e=e.prototype,!(!e||!e.isReactComponent)}function $r(e,t){var n=e.alternate;return n===null?(n=Zr(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function ei(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function ti(e,t,n,r,i,o){var s=0;if(r=e,typeof e==`function`)Qr(e)&&(s=1);else if(typeof e==`string`)s=Wf(e,n,U.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case D:return e=Zr(31,n,t,i),e.elementType=D,e.lanes=o,e;case _:return ni(n.children,i,o,t);case v:s=8,i|=24;break;case y:return e=Zr(12,n,t,i|2),e.elementType=y,e.lanes=o,e;case C:return e=Zr(13,n,t,i),e.elementType=C,e.lanes=o,e;case w:return e=Zr(19,n,t,i),e.elementType=w,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case x:s=10;break a;case b:s=9;break a;case S:s=11;break a;case T:s=14;break a;case E:s=16,r=null;break a}s=29,n=Error(a(130,e===null?`null`:typeof e,``)),r=null}return t=Zr(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function ni(e,t,n,r){return e=Zr(7,e,r,t),e.lanes=n,e}function X(e,t,n){return e=Zr(6,e,null,t),e.lanes=n,e}function Z(e){var t=Zr(18,null,null,0);return t.stateNode=e,t}function ri(e,t,n){return t=Zr(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var ii=new WeakMap;function Q(e,t){if(typeof e==`object`&&e){var n=ii.get(e);return n===void 0?(t={value:e,source:t,stack:se(t)},ii.set(e,t),t):n}return{value:e,source:t,stack:se(t)}}var ai=[],oi=0,si=null,ci=0,li=[],ui=0,di=null,fi=1,pi=``;function mi(e,t){ai[oi++]=ci,ai[oi++]=si,si=e,ci=t}function hi(e,t,n){li[ui++]=fi,li[ui++]=pi,li[ui++]=di,di=e;var r=fi;e=pi;var i=32-Te(r)-1;r&=~(1<<i),n+=1;var a=32-Te(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,fi=1<<32-Te(t)+i|n<<i|r,pi=a+e}else fi=1<<a|n<<i|r,pi=e}function gi(e){e.return!==null&&(mi(e,1),hi(e,1,0))}function _i(e){for(;e===si;)si=ai[--oi],ai[oi]=null,ci=ai[--oi],ai[oi]=null;for(;e===di;)di=li[--ui],li[ui]=null,pi=li[--ui],li[ui]=null,fi=li[--ui],li[ui]=null}function vi(e,t){li[ui++]=fi,li[ui++]=pi,li[ui++]=di,fi=t.id,pi=t.overflow,di=e}var yi=null,bi=null,xi=!1,Si=null,Ci=!1,wi=Error(a(519));function Ti(e){throw ji(Q(Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),wi}function Ei(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[Je]=e,t[Ye]=r,n){case`dialog`:yd(`cancel`,t),yd(`close`,t);break;case`iframe`:case`object`:case`embed`:yd(`load`,t);break;case`video`:case`audio`:for(n=0;n<gd.length;n++)yd(gd[n],t);break;case`source`:yd(`error`,t);break;case`img`:case`image`:case`link`:yd(`error`,t),yd(`load`,t);break;case`details`:yd(`toggle`,t);break;case`input`:yd(`invalid`,t),Ot(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:yd(`invalid`,t);break;case`textarea`:yd(`invalid`,t),Mt(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Md(t.textContent,n)?(r.popover!=null&&(yd(`beforetoggle`,t),yd(`toggle`,t)),r.onScroll!=null&&yd(`scroll`,t),r.onScrollEnd!=null&&yd(`scrollend`,t),r.onClick!=null&&(t.onclick=Vt),t=!0):t=!1,t||Ti(e,!0)}function Di(e){for(yi=e.return;yi;)switch(yi.tag){case 5:case 31:case 13:Ci=!1;return;case 27:case 3:Ci=!0;return;default:yi=yi.return}}function Oi(e){if(e!==yi)return!1;if(!xi)return Di(e),xi=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Wd(e.type,e.memoizedProps)),n=!n),n&&bi&&Ti(e),Di(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(317));bi=df(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(317));bi=df(e)}else t===27?(t=bi,Qd(e.type)?(e=uf,uf=null,bi=e):bi=t):bi=yi?lf(e.stateNode.nextSibling):null;return!0}function ki(){bi=yi=null,xi=!1}function Ai(){var e=Si;return e!==null&&(Yl===null?Yl=e:Yl.push.apply(Yl,e),Si=null),e}function ji(e){Si===null?Si=[e]:Si.push(e)}var Mi=B(null),Ni=null,Pi=null;function Fi(e,t,n){H(Mi,t._currentValue),t._currentValue=n}function Ii(e){e._currentValue=Mi.current,V(Mi)}function Li(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function Ri(e,t,n,r){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var o=i.dependencies;if(o!==null){var s=i.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=i;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),Li(o.return,n,e),r||(s=null);break a}o=c.next}}else if(i.tag===18){if(s=i.return,s===null)throw Error(a(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),Li(s,n,e),s=null}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===e){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}}function zi(e,t,n,r){e=null;for(var i=t,o=!1;i!==null;){if(!o){if(i.flags&524288)o=!0;else if(i.flags&262144)break}if(i.tag===10){var s=i.alternate;if(s===null)throw Error(a(387));if(s=s.memoizedProps,s!==null){var c=i.type;ur(i.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(i===te.current){if(s=i.alternate,s===null)throw Error(a(387));s.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e===null?e=[$f]:e.push($f))}i=i.return}e!==null&&Ri(t,e,n,r),t.flags|=262144}function Bi(e){for(e=e.firstContext;e!==null;){if(!ur(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Vi(e){Ni=e,Pi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Hi(e){return Wi(Ni,e)}function Ui(e,t){return Ni===null&&Vi(e),Wi(e,t)}function Wi(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Pi===null){if(e===null)throw Error(a(308));Pi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Pi=Pi.next=t;return n}var Gi=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},Ki=t.unstable_scheduleCallback,qi=t.unstable_NormalPriority,Ji={$$typeof:x,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Yi(){return{controller:new Gi,data:new Map,refCount:0}}function Xi(e){e.refCount--,e.refCount===0&&Ki(qi,function(){e.controller.abort()})}var Zi=null,Qi=0,$i=0,ea=null;function ta(e,t){if(Zi===null){var n=Zi=[];Qi=0,$i=ud(),ea={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return Qi++,t.then(na,na),t}function na(){if(--Qi===0&&Zi!==null){ea!==null&&(ea.status=`fulfilled`);var e=Zi;Zi=null,$i=0,ea=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ra(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var ia=P.S;P.S=function(e,t){Ql=pe(),typeof t==`object`&&t&&typeof t.then==`function`&&ta(e,t),ia!==null&&ia(e,t)};var aa=B(null);function oa(){var e=aa.current;return e===null?Nl.pooledCache:e}function sa(e,t){t===null?H(aa,aa.current):H(aa,t.pool)}function ca(){var e=oa();return e===null?null:{parent:Ji._currentValue,pool:e}}var la=Error(a(460)),ua=Error(a(474)),da=Error(a(542)),fa={then:function(){}};function pa(e){return e=e.status,e===`fulfilled`||e===`rejected`}function ma(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Vt,Vt),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,va(e),e;default:if(typeof t.status==`string`)t.then(Vt,Vt);else{if(e=Nl,e!==null&&100<e.shellSuspendCounter)throw Error(a(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,va(e),e}throw ga=t,la}}function ha(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(ga=e,la):e}}var ga=null;function _a(){if(ga===null)throw Error(a(459));var e=ga;return ga=null,e}function va(e){if(e===la||e===da)throw Error(a(483))}var ya=null,ba=0;function xa(e){var t=ba;return ba+=1,ya===null&&(ya=[]),ma(ya,e,t)}function Sa(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Ca(e,t){throw t.$$typeof===m?Error(a(525)):(e=Object.prototype.toString.call(t),Error(a(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function wa(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function i(e,t){return e=$r(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=X(n,e.mode,r),t.return=e,t):(t=i(t,n),t.return=e,t)}function l(e,t,n,r){var a=n.type;return a===_?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===a||typeof a==`object`&&a&&a.$$typeof===E&&ha(a)===t.type)?(t=i(t,n.props),Sa(t,n),t.return=e,t):(t=ti(n.type,n.key,n.props,null,e.mode,r),Sa(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=ri(n,e.mode,r),t.return=e,t):(t=i(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,a){return t===null||t.tag!==7?(t=ni(n,e.mode,r,a),t.return=e,t):(t=i(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=X(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case h:return n=ti(t.type,t.key,t.props,null,e.mode,n),Sa(n,t),n.return=e,n;case g:return t=ri(t,e.mode,n),t.return=e,t;case E:return t=ha(t),f(e,t,n)}if(N(t)||A(t))return t=ni(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,xa(t),n);if(t.$$typeof===x)return f(e,Ui(e,t),n);Ca(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case h:return n.key===i?l(e,t,n,r):null;case g:return n.key===i?u(e,t,n,r):null;case E:return n=ha(n),p(e,t,n,r)}if(N(n)||A(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,xa(n),r);if(n.$$typeof===x)return p(e,t,Ui(e,n),r);Ca(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case h:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case g:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case E:return r=ha(r),m(e,t,n,r,i)}if(N(r)||A(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,xa(r),i);if(r.$$typeof===x)return m(e,t,n,Ui(t,r),i);Ca(t,r)}return null}function v(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),xi&&mi(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return xi&&mi(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),xi&&mi(i,h),l}function y(i,s,c,l){if(c==null)throw Error(a(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(i,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(i,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(i,h),xi&&mi(i,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(i,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return xi&&mi(i,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,i,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(i,e)}),xi&&mi(i,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===_&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case h:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===_){if(r.tag===7){n(e,r.sibling),c=i(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===E&&ha(l)===r.type){n(e,r.sibling),c=i(r,o.props),Sa(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===_?(c=ni(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=ti(o.type,o.key,o.props,null,e.mode,c),Sa(c,o),c.return=e,e=c)}return s(e);case g:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=i(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=ri(o,e.mode,c),c.return=e,e=c}return s(e);case E:return o=ha(o),b(e,r,o,c)}if(N(o))return v(e,r,o,c);if(A(o)){if(l=A(o),typeof l!=`function`)throw Error(a(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,xa(o),c);if(o.$$typeof===x)return b(e,r,Ui(e,o),c);Ca(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=i(r,o),c.return=e,e=c):(n(e,r),c=X(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{ba=0;var i=b(e,t,n,r);return ya=null,i}catch(t){if(t===la||t===da)throw t;var a=Zr(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Ta=wa(!0),Ea=wa(!1),Da=!1;function Oa(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ka(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Aa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ja(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Ml&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Jr(e),qr(e,null,n),t}return Ur(e,r,t,n),Jr(e)}function Ma(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ve(e,n)}}function Na(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Pa=!1;function Fa(){if(Pa){var e=ea;if(e!==null)throw e}}function Ia(e,t,n,r){Pa=!1;var i=e.updateQueue;Da=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,m=f!==s.lane;if(m?(Fl&f)===f:(r&f)===f){f!==0&&f===$i&&(Pa=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,f);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,f=typeof h==`function`?h.call(_,d,f):h,f==null)break a;d=p({},d,f);break a;case 2:Da=!0}}f=s.callback,f!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[f]:m.push(f))}else m={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Ul|=o,e.lanes=o,e.memoizedState=d}}function La(e,t){if(typeof e!=`function`)throw Error(a(191,e));e.call(t)}function Ra(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)La(n[e],t)}var za=B(null),Ba=B(0);function Va(e,t){e=Vl,H(Ba,e),H(za,t),Vl=e|t.baseLanes}function Ha(){H(Ba,Vl),H(za,za.current)}function Ua(){Vl=Ba.current,V(za),V(Ba)}var Wa=B(null),Ga=null;function Ka(e){var t=e.alternate;H(Za,Za.current&1),H(Wa,e),Ga===null&&(t===null||za.current!==null||t.memoizedState!==null)&&(Ga=e)}function qa(e){H(Za,Za.current),H(Wa,e),Ga===null&&(Ga=e)}function Ja(e){e.tag===22?(H(Za,Za.current),H(Wa,e),Ga===null&&(Ga=e)):Ya(e)}function Ya(){H(Za,Za.current),H(Wa,Wa.current)}function Xa(e){V(Wa),Ga===e&&(Ga=null),V(Za)}var Za=B(0);function Qa(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||of(n)||sf(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var $a=0,eo=null,to=null,no=null,ro=!1,io=!1,ao=!1,oo=0,so=0,co=null,lo=0;function uo(){throw Error(a(321))}function fo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!ur(e[n],t[n]))return!1;return!0}function po(e,t,n,r,i,a){return $a=a,eo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,P.H=e===null||e.memoizedState===null?As:js,ao=!1,a=n(r,i),ao=!1,io&&(a=ho(t,n,r,i)),mo(e),a}function mo(e){P.H=ks;var t=to!==null&&to.next!==null;if($a=0,no=to=eo=null,ro=!1,so=0,co=null,t)throw Error(a(300));e===null||Js||(e=e.dependencies,e!==null&&Bi(e)&&(Js=!0))}function ho(e,t,n,r){eo=e;var i=0;do{if(io&&(co=null),so=0,io=!1,25<=i)throw Error(a(301));if(i+=1,no=to=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}P.H=Ms,o=t(n,r)}while(io);return o}function go(){var e=P.H,t=e.useState()[0];return t=typeof t.then==`function`?Co(t):t,e=e.useState()[0],(to===null?null:to.memoizedState)!==e&&(eo.flags|=1024),t}function _o(){var e=oo!==0;return oo=0,e}function vo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function yo(e){if(ro){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}ro=!1}$a=0,no=to=eo=null,io=!1,so=oo=0,co=null}function bo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return no===null?eo.memoizedState=no=e:no=no.next=e,no}function xo(){if(to===null){var e=eo.alternate;e=e===null?null:e.memoizedState}else e=to.next;var t=no===null?eo.memoizedState:no.next;if(t!==null)no=t,to=e;else{if(e===null)throw eo.alternate===null?Error(a(467)):Error(a(310));to=e,e={memoizedState:to.memoizedState,baseState:to.baseState,baseQueue:to.baseQueue,queue:to.queue,next:null},no===null?eo.memoizedState=no=e:no=no.next=e}return no}function So(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Co(e){var t=so;return so+=1,co===null&&(co=[]),e=ma(co,e,t),t=eo,(no===null?t.memoizedState:no.next)===null&&(t=t.alternate,P.H=t===null||t.memoizedState===null?As:js),e}function wo(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Co(e);if(e.$$typeof===x)return Hi(e)}throw Error(a(438,String(e)))}function To(e){var t=null,n=eo.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=eo.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=So(),eo.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=O;return t.index++,n}function Eo(e,t){return typeof t==`function`?t(e):t}function Do(e){return Oo(xo(),to,e)}function Oo(e,t,n){var r=e.queue;if(r===null)throw Error(a(311));r.lastRenderedReducer=n;var i=e.baseQueue,o=r.pending;if(o!==null){if(i!==null){var s=i.next;i.next=o.next,o.next=s}t.baseQueue=i=o,r.pending=null}if(o=e.baseState,i===null)e.memoizedState=o;else{t=i.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?($a&f)===f:(Fl&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===$i&&(d=!0);else if(($a&p)===p){u=u.next,p===$i&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,eo.lanes|=p,Ul|=p;f=u.action,ao&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,eo.lanes|=f,Ul|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!ur(o,e.memoizedState)&&(Js=!0,d&&(n=ea,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return i===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function ko(e){var t=xo(),n=t.queue;if(n===null)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(i!==null){n.pending=null;var s=i=i.next;do o=e(o,s.action),s=s.next;while(s!==i);ur(o,t.memoizedState)||(Js=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Ao(e,t,n){var r=eo,i=xo(),o=xi;if(o){if(n===void 0)throw Error(a(407));n=n()}else n=t();var s=!ur((to||i).memoizedState,n);if(s&&(i.memoizedState=n,Js=!0),i=i.queue,ts(No.bind(null,r,i,e),[e]),i.getSnapshot!==t||s||no!==null&&no.memoizedState.tag&1){if(r.flags|=2048,Xo(9,{destroy:void 0},Mo.bind(null,r,i,n,t),null),Nl===null)throw Error(a(349));o||$a&127||jo(r,t,n)}return n}function jo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=eo.updateQueue,t===null?(t=So(),eo.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Mo(e,t,n,r){t.value=n,t.getSnapshot=r,Po(t)&&Fo(e)}function No(e,t,n){return n(function(){Po(t)&&Fo(e)})}function Po(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!ur(e,n)}catch{return!0}}function Fo(e){var t=Gr(e,2);t!==null&&pu(t,e,2)}function Io(e){var t=bo();if(typeof e==`function`){var n=e;if(e=n(),ao){we(!0);try{n()}finally{we(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Eo,lastRenderedState:e},t}function Lo(e,t,n,r){return e.baseState=n,Oo(e,to,typeof r==`function`?r:Eo)}function Ro(e,t,n,r,i){if(Es(e))throw Error(a(485));if(e=t.action,e!==null){var o={payload:i,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};P.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,zo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function zo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=P.T,o={};P.T=o;try{var s=n(i,r),c=P.S;c!==null&&c(o,s),Bo(e,t,s)}catch(n){Ho(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),P.T=a}}else try{a=n(i,r),Bo(e,t,a)}catch(n){Ho(e,t,n)}}function Bo(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Vo(e,t,n)},function(n){return Ho(e,t,n)}):Vo(e,t,n)}function Vo(e,t,n){t.status=`fulfilled`,t.value=n,Uo(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,zo(e,n)))}function Ho(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Uo(t),t=t.next;while(t!==r)}e.action=null}function Uo(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Wo(e,t){return t}function Go(e,t){if(xi){var n=Nl.formState;if(n!==null){a:{var r=eo;if(xi){if(bi){b:{for(var i=bi,a=Ci;i.nodeType!==8;){if(!a){i=null;break b}if(i=lf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){bi=lf(i.nextSibling),r=i.data===`F!`;break a}}Ti(r)}r=!1}r&&(t=n[0])}}return n=bo(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wo,lastRenderedState:t},n.queue=r,n=Cs.bind(null,eo,r),r.dispatch=n,r=Io(!1),a=Ts.bind(null,eo,!1,r.queue),r=bo(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Ro.bind(null,eo,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function Ko(e){return qo(xo(),to,e)}function qo(e,t,n){if(t=Oo(e,t,Wo)[0],e=Do(Eo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Co(t)}catch(e){throw e===la?da:e}else r=t;t=xo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(eo.flags|=2048,Xo(9,{destroy:void 0},Jo.bind(null,i,n),null)),[r,a,e]}function Jo(e,t){e.action=t}function Yo(e){var t=xo(),n=to;if(n!==null)return qo(t,n,e);xo(),t=t.memoizedState,n=xo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Xo(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=eo.updateQueue,t===null&&(t=So(),eo.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Zo(){return xo().memoizedState}function Qo(e,t,n,r){var i=bo();eo.flags|=e,i.memoizedState=Xo(1|t,{destroy:void 0},n,r===void 0?null:r)}function $o(e,t,n,r){var i=xo();r=r===void 0?null:r;var a=i.memoizedState.inst;to!==null&&r!==null&&fo(r,to.memoizedState.deps)?i.memoizedState=Xo(t,a,n,r):(eo.flags|=e,i.memoizedState=Xo(1|t,a,n,r))}function es(e,t){Qo(8390656,8,e,t)}function ts(e,t){$o(2048,8,e,t)}function ns(e){eo.flags|=4;var t=eo.updateQueue;if(t===null)t=So(),eo.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function rs(e){var t=xo().memoizedState;return ns({ref:t,nextImpl:e}),function(){if(Ml&2)throw Error(a(440));return t.impl.apply(void 0,arguments)}}function is(e,t){return $o(4,2,e,t)}function as(e,t){return $o(4,4,e,t)}function os(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function ss(e,t,n){n=n==null?null:n.concat([e]),$o(4,4,os.bind(null,t,e),n)}function cs(){}function ls(e,t){var n=xo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&fo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function us(e,t){var n=xo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&fo(t,r[1]))return r[0];if(r=e(),ao){we(!0);try{e()}finally{we(!1)}}return n.memoizedState=[r,t],r}function ds(e,t,n){return n===void 0||$a&1073741824&&!(Fl&261930)?e.memoizedState=t:(e.memoizedState=n,e=fu(),eo.lanes|=e,Ul|=e,n)}function fs(e,t,n,r){return ur(n,t)?n:za.current===null?!($a&42)||$a&1073741824&&!(Fl&261930)?(Js=!0,e.memoizedState=n):(e=fu(),eo.lanes|=e,Ul|=e,t):(e=ds(e,n,r),ur(e,t)||(Js=!0),e)}function ps(e,t,n,r,i){var a=F.p;F.p=a!==0&&8>a?a:8;var o=P.T,s={};P.T=s,Ts(e,!1,t,n);try{var c=i(),l=P.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?ws(e,t,ra(c,r),du(e)):ws(e,t,r,du(e))}catch(n){ws(e,t,{then:function(){},status:`rejected`,reason:n},du())}finally{F.p=a,o!==null&&s.types!==null&&(o.types=s.types),P.T=o}}function ms(){}function hs(e,t,n,r){if(e.tag!==5)throw Error(a(476));var i=gs(e).queue;ps(e,i,t,I,n===null?ms:function(){return _s(e),n(r)})}function gs(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:I,baseState:I,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Eo,lastRenderedState:I},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Eo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function _s(e){var t=gs(e);t.next===null&&(t=e.alternate.memoizedState),ws(e,t.next.queue,{},du())}function vs(){return Hi($f)}function ys(){return xo().memoizedState}function bs(){return xo().memoizedState}function xs(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=du();e=Aa(n);var r=ja(t,e,n);r!==null&&(pu(r,t,n),Ma(r,t,n)),t={cache:Yi()},e.payload=t;return}t=t.return}}function Ss(e,t,n){var r=du();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Es(e)?Ds(t,n):(n=Wr(e,t,n,r),n!==null&&(pu(n,e,r),Os(n,t,r)))}function Cs(e,t,n){ws(e,t,n,du())}function ws(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Es(e))Ds(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,ur(s,o))return Ur(e,t,i,0),Nl===null&&Hr(),!1}catch{}if(n=Wr(e,t,i,r),n!==null)return pu(n,e,r),Os(n,t,r),!0}return!1}function Ts(e,t,n,r){if(r={lane:2,revertLane:ud(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Es(e)){if(t)throw Error(a(479))}else t=Wr(e,n,r,2),t!==null&&pu(t,e,2)}function Es(e){var t=e.alternate;return e===eo||t!==null&&t===eo}function Ds(e,t){io=ro=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Os(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ve(e,n)}}var ks={readContext:Hi,use:wo,useCallback:uo,useContext:uo,useEffect:uo,useImperativeHandle:uo,useLayoutEffect:uo,useInsertionEffect:uo,useMemo:uo,useReducer:uo,useRef:uo,useState:uo,useDebugValue:uo,useDeferredValue:uo,useTransition:uo,useSyncExternalStore:uo,useId:uo,useHostTransitionStatus:uo,useFormState:uo,useActionState:uo,useOptimistic:uo,useMemoCache:uo,useCacheRefresh:uo};ks.useEffectEvent=uo;var As={readContext:Hi,use:wo,useCallback:function(e,t){return bo().memoizedState=[e,t===void 0?null:t],e},useContext:Hi,useEffect:es,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),Qo(4194308,4,os.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Qo(4194308,4,e,t)},useInsertionEffect:function(e,t){Qo(4,2,e,t)},useMemo:function(e,t){var n=bo();t=t===void 0?null:t;var r=e();if(ao){we(!0);try{e()}finally{we(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=bo();if(n!==void 0){var i=n(t);if(ao){we(!0);try{n(t)}finally{we(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Ss.bind(null,eo,e),[r.memoizedState,e]},useRef:function(e){var t=bo();return e={current:e},t.memoizedState=e},useState:function(e){e=Io(e);var t=e.queue,n=Cs.bind(null,eo,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:cs,useDeferredValue:function(e,t){return ds(bo(),e,t)},useTransition:function(){var e=Io(!1);return e=ps.bind(null,eo,e.queue,!0,!1),bo().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=eo,i=bo();if(xi){if(n===void 0)throw Error(a(407));n=n()}else{if(n=t(),Nl===null)throw Error(a(349));Fl&127||jo(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,es(No.bind(null,r,o,e),[e]),r.flags|=2048,Xo(9,{destroy:void 0},Mo.bind(null,r,o,n,t),null),n},useId:function(){var e=bo(),t=Nl.identifierPrefix;if(xi){var n=pi,r=fi;n=(r&~(1<<32-Te(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=oo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=lo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:vs,useFormState:Go,useActionState:Go,useOptimistic:function(e){var t=bo();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Ts.bind(null,eo,!0,n),n.dispatch=t,[e,t]},useMemoCache:To,useCacheRefresh:function(){return bo().memoizedState=xs.bind(null,eo)},useEffectEvent:function(e){var t=bo(),n={impl:e};return t.memoizedState=n,function(){if(Ml&2)throw Error(a(440));return n.impl.apply(void 0,arguments)}}},js={readContext:Hi,use:wo,useCallback:ls,useContext:Hi,useEffect:ts,useImperativeHandle:ss,useInsertionEffect:is,useLayoutEffect:as,useMemo:us,useReducer:Do,useRef:Zo,useState:function(){return Do(Eo)},useDebugValue:cs,useDeferredValue:function(e,t){return fs(xo(),to.memoizedState,e,t)},useTransition:function(){var e=Do(Eo)[0],t=xo().memoizedState;return[typeof e==`boolean`?e:Co(e),t]},useSyncExternalStore:Ao,useId:ys,useHostTransitionStatus:vs,useFormState:Ko,useActionState:Ko,useOptimistic:function(e,t){return Lo(xo(),to,e,t)},useMemoCache:To,useCacheRefresh:bs};js.useEffectEvent=rs;var Ms={readContext:Hi,use:wo,useCallback:ls,useContext:Hi,useEffect:ts,useImperativeHandle:ss,useInsertionEffect:is,useLayoutEffect:as,useMemo:us,useReducer:ko,useRef:Zo,useState:function(){return ko(Eo)},useDebugValue:cs,useDeferredValue:function(e,t){var n=xo();return to===null?ds(n,e,t):fs(n,to.memoizedState,e,t)},useTransition:function(){var e=ko(Eo)[0],t=xo().memoizedState;return[typeof e==`boolean`?e:Co(e),t]},useSyncExternalStore:Ao,useId:ys,useHostTransitionStatus:vs,useFormState:Yo,useActionState:Yo,useOptimistic:function(e,t){var n=xo();return to===null?(n.baseState=e,[e,n.queue.dispatch]):Lo(n,to,e,t)},useMemoCache:To,useCacheRefresh:bs};Ms.useEffectEvent=rs;function Ns(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:p({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ps={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=du(),i=Aa(r);i.payload=t,n!=null&&(i.callback=n),t=ja(e,i,r),t!==null&&(pu(t,e,r),Ma(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=du(),i=Aa(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=ja(e,i,r),t!==null&&(pu(t,e,r),Ma(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=du(),r=Aa(n);r.tag=2,t!=null&&(r.callback=t),t=ja(e,r,n),t!==null&&(pu(t,e,n),Ma(t,e,n))}};function Fs(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!dr(n,r)||!dr(i,a):!0}function Is(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Ps.enqueueReplaceState(t,t.state,null)}function Ls(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=p({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Rs(e){Rr(e)}function zs(e){console.error(e)}function Bs(e){Rr(e)}function Vs(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Hs(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Us(e,t,n){return n=Aa(n),n.tag=3,n.payload={element:null},n.callback=function(){Vs(e,t)},n}function Ws(e){return e=Aa(e),e.tag=3,e}function Gs(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Hs(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Hs(t,n,r),typeof i!=`function`&&(tu===null?tu=new Set([this]):tu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function Ks(e,t,n,r,i){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&zi(t,n,i,!0),n=Wa.current,n!==null){switch(n.tag){case 31:case 13:return Ga===null?Tu():n.alternate===null&&Hl===0&&(Hl=3),n.flags&=-257,n.flags|=65536,n.lanes=i,r===fa?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Wu(e,r,i)),!1;case 22:return n.flags|=65536,r===fa?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Wu(e,r,i)),!1}throw Error(a(435,n.tag))}return Wu(e,r,i),Tu(),!1}if(xi)return t=Wa.current,t===null?(r!==wi&&(t=Error(a(423),{cause:r}),ji(Q(t,n))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,r=Q(r,n),i=Us(e.stateNode,r,i),Na(e,i),Hl!==4&&(Hl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=i,r!==wi&&(e=Error(a(422),{cause:r}),ji(Q(e,n)))),!1;var o=Error(a(520),{cause:r});if(o=Q(o,n),Jl===null?Jl=[o]:Jl.push(o),Hl!==4&&(Hl=2),t===null)return!0;r=Q(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,e=Us(n.stateNode,r,e),Na(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(tu===null||!tu.has(o))))return n.flags|=65536,i&=-i,n.lanes|=i,i=Ws(i),Gs(i,e,n,r),Na(n,i),!1}n=n.return}while(n!==null);return!1}var qs=Error(a(461)),Js=!1;function Ys(e,t,n,r){t.child=e===null?Ea(t,null,n,r):Ta(t,e.child,n,r)}function Xs(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return Vi(t),r=po(e,t,n,o,a,i),s=_o(),e!==null&&!Js?(vo(e,t,i),bc(e,t,i)):(xi&&s&&gi(t),t.flags|=1,Ys(e,t,r,i),t.child)}function Zs(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!Qr(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,Qs(e,t,a,r,i)):(e=ti(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!xc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?dr:n,n(o,r)&&e.ref===t.ref)return bc(e,t,i)}return t.flags|=1,e=$r(a,r),e.ref=t.ref,e.return=t,t.child=e}function Qs(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(dr(a,r)&&e.ref===t.ref)if(Js=!1,t.pendingProps=r=a,xc(e,i))e.flags&131072&&(Js=!0);else return t.lanes=e.lanes,bc(e,t,i)}return oc(e,t,n,r,i)}function $s(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return tc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&sa(t,a===null?null:a.cachePool),a===null?Ha():Va(t,a),Ja(t);else return r=t.lanes=536870912,tc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&sa(t,null),Ha(),Ya(t)):(sa(t,a.cachePool),Va(t,a),Ya(t),t.memoizedState=null);return Ys(e,t,i,n),t.child}function ec(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function tc(e,t,n,r,i){var a=oa();return a=a===null?null:{parent:Ji._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&sa(t,null),Ha(),Ja(t),e!==null&&zi(e,t,r,!0),t.childLanes=i,null}function nc(e,t){return t=hc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function rc(e,t,n){return Ta(t,e.child,null,n),e=nc(t,t.pendingProps),e.flags|=2,Xa(t),t.memoizedState=null,e}function ic(e,t,n){var r=t.pendingProps,i=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(xi){if(r.mode===`hidden`)return e=nc(t,r),t.lanes=536870912,ec(null,e);if(qa(t),(e=bi)?(e=af(e,Ci),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:di===null?null:{id:fi,overflow:pi},retryLane:536870912,hydrationErrors:null},n=Z(e),n.return=t,t.child=n,yi=t,bi=null)):e=null,e===null)throw Ti(t);return t.lanes=536870912,null}return nc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(qa(t),i)if(t.flags&256)t.flags&=-257,t=rc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(a(558));else if(Js||zi(e,t,n,!1),i=(n&e.childLanes)!==0,Js||i){if(r=Nl,r!==null&&(s=He(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,Gr(e,s),pu(r,e,s),qs;Tu(),t=rc(e,t,n)}else e=o.treeContext,bi=lf(s.nextSibling),yi=t,xi=!0,Si=null,Ci=!1,e!==null&&vi(t,e),t=nc(t,r),t.flags|=4096;return t}return e=$r(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function ac(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(a(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function oc(e,t,n,r,i){return Vi(t),n=po(e,t,n,r,void 0,i),r=_o(),e!==null&&!Js?(vo(e,t,i),bc(e,t,i)):(xi&&r&&gi(t),t.flags|=1,Ys(e,t,n,i),t.child)}function sc(e,t,n,r,i,a){return Vi(t),t.updateQueue=null,n=ho(t,r,n,i),mo(e),r=_o(),e!==null&&!Js?(vo(e,t,a),bc(e,t,a)):(xi&&r&&gi(t),t.flags|=1,Ys(e,t,n,a),t.child)}function cc(e,t,n,r,i){if(Vi(t),t.stateNode===null){var a=Yr,o=n.contextType;typeof o==`object`&&o&&(a=Hi(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Ps,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Oa(t),o=n.contextType,a.context=typeof o==`object`&&o?Hi(o):Yr,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Ns(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Ps.enqueueReplaceState(a,a.state,null),Ia(t,r,a,i),Fa(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Ls(n,s);a.props=c;var l=a.context,u=n.contextType;o=Yr,typeof u==`object`&&u&&(o=Hi(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Is(t,a,r,o),Da=!1;var f=t.memoizedState;a.state=f,Ia(t,r,a,i),Fa(),l=t.memoizedState,s||f!==l||Da?(typeof d==`function`&&(Ns(t,n,d,r),l=t.memoizedState),(c=Da||Fs(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,ka(e,t),o=t.memoizedProps,u=Ls(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=Yr,typeof l==`object`&&l&&(c=Hi(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Is(t,a,r,c),Da=!1,f=t.memoizedState,a.state=f,Ia(t,r,a,i),Fa();var p=t.memoizedState;o!==d||f!==p||Da||e!==null&&e.dependencies!==null&&Bi(e.dependencies)?(typeof s==`function`&&(Ns(t,n,s,r),p=t.memoizedState),(u=Da||Fs(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Bi(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,ac(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Ta(t,e.child,null,i),t.child=Ta(t,null,n,i)):Ys(e,t,n,i),t.memoizedState=a.state,e=t.child):e=bc(e,t,i),e}function lc(e,t,n,r){return ki(),t.flags|=256,Ys(e,t,n,r),t.child}var uc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function dc(e){return{baseLanes:e,cachePool:ca()}}function fc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Kl),e}function pc(e,t,n){var r=t.pendingProps,i=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(Za.current&2)!=0),s&&(i=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(xi){if(i?Ka(t):Ya(t),(e=bi)?(e=af(e,Ci),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:di===null?null:{id:fi,overflow:pi},retryLane:536870912,hydrationErrors:null},n=Z(e),n.return=t,t.child=n,yi=t,bi=null)):e=null,e===null)throw Ti(t);return sf(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,i?(Ya(t),i=t.mode,c=hc({mode:`hidden`,children:c},i),r=ni(r,i,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=dc(n),r.childLanes=fc(e,s,n),t.memoizedState=uc,ec(null,r)):(Ka(t),mc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(Ka(t),t.flags&=-257,t=gc(e,t,n)):t.memoizedState===null?(Ya(t),c=r.fallback,i=t.mode,r=hc({mode:`visible`,children:r.children},i),c=ni(c,i,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Ta(t,e.child,null,n),r=t.child,r.memoizedState=dc(n),r.childLanes=fc(e,s,n),t.memoizedState=uc,t=ec(null,r)):(Ya(t),t.child=e.child,t.flags|=128,t=null);else if(Ka(t),sf(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(a(419)),r.stack=``,r.digest=s,ji({value:r,source:null,stack:null}),t=gc(e,t,n)}else if(Js||zi(e,t,n,!1),s=(n&e.childLanes)!==0,Js||s){if(s=Nl,s!==null&&(r=He(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,Gr(e,r),pu(s,e,r),qs;of(c)||Tu(),t=gc(e,t,n)}else of(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,bi=lf(c.nextSibling),yi=t,xi=!0,Si=null,Ci=!1,e!==null&&vi(t,e),t=mc(t,r.children),t.flags|=4096);return t}return i?(Ya(t),c=r.fallback,i=t.mode,l=e.child,u=l.sibling,r=$r(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=ni(c,i,n,null),c.flags|=2):c=$r(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,ec(null,r),r=t.child,c=e.child.memoizedState,c===null?c=dc(n):(i=c.cachePool,i===null?i=ca():(l=Ji._currentValue,i=i.parent===l?i:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:i}),r.memoizedState=c,r.childLanes=fc(e,s,n),t.memoizedState=uc,ec(e.child,r)):(Ka(t),n=e.child,e=n.sibling,n=$r(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function mc(e,t){return t=hc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function hc(e,t){return e=Zr(22,e,null,t),e.lanes=0,e}function gc(e,t,n){return Ta(t,e.child,null,n),e=mc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function _c(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Li(e.return,t,n)}function vc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function yc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=Za.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,H(Za,o),Ys(e,t,r,n),r=xi?ci:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&_c(e,n,t);else if(e.tag===19)_c(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Qa(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),vc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Qa(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}vc(t,!0,n,null,a,r);break;case`together`:vc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function bc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ul|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(zi(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(a(153));if(t.child!==null){for(e=t.child,n=$r(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=$r(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function xc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&Bi(e))):!0}function Sc(e,t,n){switch(t.tag){case 3:G(t,t.stateNode.containerInfo),Fi(t,Ji,e.memoizedState.cache),ki();break;case 27:case 5:K(t);break;case 4:G(t,t.stateNode.containerInfo);break;case 10:Fi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,qa(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(Ka(t),e=bc(e,t,n),e===null?null:e.sibling):pc(e,t,n):(Ka(t),t.flags|=128,null);Ka(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(zi(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return yc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),H(Za,Za.current),r)break;return null;case 22:return t.lanes=0,$s(e,t,n,t.pendingProps);case 24:Fi(t,Ji,e.memoizedState.cache)}return bc(e,t,n)}function Cc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)Js=!0;else{if(!xc(e,n)&&!(t.flags&128))return Js=!1,Sc(e,t,n);Js=!!(e.flags&131072)}else Js=!1,xi&&t.flags&1048576&&hi(t,ci,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=ha(t.elementType),t.type=e,typeof e==`function`)Qr(e)?(r=Ls(e,r),t.tag=1,t=cc(null,t,e,r,n)):(t.tag=0,t=oc(null,t,e,r,n));else{if(e!=null){var i=e.$$typeof;if(i===S){t.tag=11,t=Xs(null,t,e,r,n);break a}else if(i===T){t.tag=14,t=Zs(null,t,e,r,n);break a}}throw t=M(e)||e,Error(a(306,t,``))}}return t;case 0:return oc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,i=Ls(r,t.pendingProps),cc(e,t,r,i,n);case 3:a:{if(G(t,t.stateNode.containerInfo),e===null)throw Error(a(387));r=t.pendingProps;var o=t.memoizedState;i=o.element,ka(e,t),Ia(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Fi(t,Ji,r),r!==o.cache&&Ri(t,[Ji],n,!0),Fa(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=lc(e,t,r,n);break a}else if(r!==i){i=Q(Error(a(424)),t),ji(i),t=lc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(bi=lf(e.firstChild),yi=t,xi=!0,Si=null,Ci=!0,n=Ea(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(ki(),r===i){t=bc(e,t,n);break a}Ys(e,t,r,n)}t=t.child}return t;case 26:return ac(e,t),e===null?(n=Af(t.type,null,t.pendingProps,null))?t.memoizedState=n:xi||(n=t.type,e=t.pendingProps,r=Vd(W.current).createElement(n),r[Je]=t,r[Ye]=e,Fd(r,n,e),st(r),t.stateNode=r):t.memoizedState=Af(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return K(t),e===null&&xi&&(r=t.stateNode=pf(t.type,t.pendingProps,W.current),yi=t,Ci=!0,i=bi,Qd(t.type)?(uf=i,bi=lf(r.firstChild)):bi=i),Ys(e,t,t.pendingProps.children,n),ac(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&xi&&((i=r=bi)&&(r=nf(r,t.type,t.pendingProps,Ci),r===null?i=!1:(t.stateNode=r,yi=t,bi=lf(r.firstChild),Ci=!1,i=!0)),i||Ti(t)),K(t),i=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Wd(i,o)?r=null:s!==null&&Wd(i,s)&&(t.flags|=32),t.memoizedState!==null&&(i=po(e,t,go,null,null,n),$f._currentValue=i),ac(e,t),Ys(e,t,r,n),t.child;case 6:return e===null&&xi&&((e=n=bi)&&(n=rf(n,t.pendingProps,Ci),n===null?e=!1:(t.stateNode=n,yi=t,bi=null,e=!0)),e||Ti(t)),null;case 13:return pc(e,t,n);case 4:return G(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ta(t,null,r,n):Ys(e,t,r,n),t.child;case 11:return Xs(e,t,t.type,t.pendingProps,n);case 7:return Ys(e,t,t.pendingProps,n),t.child;case 8:return Ys(e,t,t.pendingProps.children,n),t.child;case 12:return Ys(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Fi(t,t.type,r.value),Ys(e,t,r.children,n),t.child;case 9:return i=t.type._context,r=t.pendingProps.children,Vi(t),i=Hi(i),r=r(i),t.flags|=1,Ys(e,t,r,n),t.child;case 14:return Zs(e,t,t.type,t.pendingProps,n);case 15:return Qs(e,t,t.type,t.pendingProps,n);case 19:return yc(e,t,n);case 31:return ic(e,t,n);case 22:return $s(e,t,n,t.pendingProps);case 24:return Vi(t),r=Hi(Ji),e===null?(i=oa(),i===null&&(i=Nl,o=Yi(),i.pooledCache=o,o.refCount++,o!==null&&(i.pooledCacheLanes|=n),i=o),t.memoizedState={parent:r,cache:i},Oa(t),Fi(t,Ji,i)):((e.lanes&n)!==0&&(ka(e,t),Ia(t,null,null,n),Fa()),i=e.memoizedState,o=t.memoizedState,i.parent===r?(r=o.cache,Fi(t,Ji,r),r!==i.cache&&Ri(t,[Ji],n,!0)):(i={parent:r,cache:r},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),Fi(t,Ji,r))),Ys(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(a(156,t.tag))}function wc(e){e.flags|=4}function Tc(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Su())e.flags|=8192;else throw ga=fa,ua}else e.flags&=-16777217}function Ec(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Gf(t))if(Su())e.flags|=8192;else throw ga=fa,ua}function Dc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Ie(),e.lanes|=t,ql|=t)}function Oc(e,t){if(!xi)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function kc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Ac(e,t,n){var r=t.pendingProps;switch(_i(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return kc(t),null;case 1:return kc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Ii(Ji),ne(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Oi(t)?wc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ai())),kc(t),null;case 26:var i=t.type,o=t.memoizedState;return e===null?(wc(t),o===null?(kc(t),Tc(t,i,null,r,n)):(kc(t),Ec(t,o))):o?o===e.memoizedState?(kc(t),t.flags&=-16777217):(wc(t),kc(t),Ec(t,o)):(e=e.memoizedProps,e!==r&&wc(t),kc(t),Tc(t,i,e,r,n)),null;case 27:if(re(t),n=W.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&wc(t);else{if(!r){if(t.stateNode===null)throw Error(a(166));return kc(t),null}e=U.current,Oi(t)?Ei(t,e):(e=pf(i,r,n),t.stateNode=e,wc(t))}return kc(t),null;case 5:if(re(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&wc(t);else{if(!r){if(t.stateNode===null)throw Error(a(166));return kc(t),null}if(o=U.current,Oi(t))Ei(t,o);else{var s=Vd(W.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,i);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,i);break;default:switch(i){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,i);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,i);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(i,{is:r.is}):s.createElement(i)}}o[Je]=t,o[Ye]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Fd(o,i,r),i){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&wc(t)}}return kc(t),Tc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&wc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(a(166));if(e=W.current,Oi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,i=yi,i!==null)switch(i.tag){case 27:case 5:r=i.memoizedProps}e[Je]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Md(e.nodeValue,n)),e||Ti(t,!0)}else e=Vd(e).createTextNode(r),e[Je]=t,t.stateNode=e}return kc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Oi(t),n!==null){if(e===null){if(!r)throw Error(a(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(557));e[Je]=t}else ki(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;kc(t),e=!1}else n=Ai(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Xa(t),t):(Xa(t),null);if(t.flags&128)throw Error(a(558))}return kc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Oi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(a(318));if(i=t.memoizedState,i=i===null?null:i.dehydrated,!i)throw Error(a(317));i[Je]=t}else ki(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;kc(t),i=!1}else i=Ai(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(Xa(t),t):(Xa(t),null)}return Xa(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,i=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(i=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==i&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Dc(t,t.updateQueue),kc(t),null);case 4:return ne(),e===null&&Sd(t.stateNode.containerInfo),kc(t),null;case 10:return Ii(t.type),kc(t),null;case 19:if(V(Za),r=t.memoizedState,r===null)return kc(t),null;if(i=(t.flags&128)!=0,o=r.rendering,o===null)if(i)Oc(r,!1);else{if(Hl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Qa(e),o!==null){for(t.flags|=128,Oc(r,!1),e=o.updateQueue,t.updateQueue=e,Dc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)ei(n,e),n=n.sibling;return H(Za,Za.current&1|2),xi&&mi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&pe()>$l&&(t.flags|=128,i=!0,Oc(r,!1),t.lanes=4194304)}else{if(!i)if(e=Qa(o),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,Dc(t,e),Oc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!xi)return kc(t),null}else 2*pe()-r.renderingStartTime>$l&&n!==536870912&&(t.flags|=128,i=!0,Oc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(kc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=pe(),e.sibling=null,n=Za.current,H(Za,i?n&1|2:n&1),xi&&mi(t,r.treeForkCount),e);case 22:case 23:return Xa(t),Ua(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(kc(t),t.subtreeFlags&6&&(t.flags|=8192)):kc(t),n=t.updateQueue,n!==null&&Dc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&V(aa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Ii(Ji),kc(t),null;case 25:return null;case 30:return null}throw Error(a(156,t.tag))}function jc(e,t){switch(_i(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ii(Ji),ne(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return re(t),null;case 31:if(t.memoizedState!==null){if(Xa(t),t.alternate===null)throw Error(a(340));ki()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Xa(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(a(340));ki()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return V(Za),null;case 4:return ne(),null;case 10:return Ii(t.type),null;case 22:case 23:return Xa(t),Ua(),e!==null&&V(aa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ii(Ji),null;case 25:return null;default:return null}}function Mc(e,t){switch(_i(t),t.tag){case 3:Ii(Ji),ne();break;case 26:case 27:case 5:re(t);break;case 4:ne();break;case 31:t.memoizedState!==null&&Xa(t);break;case 13:Xa(t);break;case 19:V(Za);break;case 10:Ii(t.type);break;case 22:case 23:Xa(t),Ua(),e!==null&&V(aa);break;case 24:Ii(Ji)}}function Nc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Uu(t,t.return,e)}}function Pc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Uu(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Uu(t,t.return,e)}}function Fc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Ra(t,n)}catch(t){Uu(e,e.return,t)}}}function Ic(e,t,n){n.props=Ls(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Uu(e,t,n)}}function Lc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Uu(e,t,n)}}function Rc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Uu(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Uu(e,t,n)}else n.current=null}function zc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Uu(e,e.return,t)}}function Bc(e,t,n){try{var r=e.stateNode;Id(r,e.type,n,t),r[Ye]=t}catch(t){Uu(e,e.return,t)}}function Vc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Qd(e.type)||e.tag===4}function Hc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Vc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Qd(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Uc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Vt));else if(r!==4&&(r===27&&Qd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Uc(e,t,n),e=e.sibling;e!==null;)Uc(e,t,n),e=e.sibling}function Wc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&Qd(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Wc(e,t,n),e=e.sibling;e!==null;)Wc(e,t,n),e=e.sibling}function Gc(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Fd(t,r,n),t[Je]=e,t[Ye]=n}catch(t){Uu(e,e.return,t)}}var Kc=!1,qc=!1,Jc=!1,Yc=typeof WeakSet==`function`?WeakSet:Set,Xc=null;function Zc(e,t){if(e=e.containerInfo,zd=cp,e=hr(e),gr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||i!==0&&f.nodeType!==3||(c=s+i),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===i&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Bd={focusedElem:e,selectionRange:n},cp=!1,Xc=t;Xc!==null;)if(t=Xc,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,Xc=e;else for(;Xc!==null;){switch(t=Xc,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)i=e[n],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,i=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Ls(n.type,i);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Uu(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)tf(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:tf(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(a(163))}if(e=t.sibling,e!==null){e.return=t.return,Xc=e;break}Xc=t.return}}function Qc(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:pl(e,n),r&4&&Nc(5,n);break;case 1:if(pl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Uu(n,n.return,e)}else{var i=Ls(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Uu(n,n.return,e)}}r&64&&Fc(n),r&512&&Lc(n,n.return);break;case 3:if(pl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Ra(e,t)}catch(e){Uu(n,n.return,e)}}break;case 27:t===null&&r&4&&Gc(n);case 26:case 5:pl(e,n),t===null&&r&4&&zc(n),r&512&&Lc(n,n.return);break;case 12:pl(e,n);break;case 31:pl(e,n),r&4&&il(e,n);break;case 13:pl(e,n),r&4&&al(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=qu.bind(null,n),cf(e,n))));break;case 22:if(r=n.memoizedState!==null||Kc,!r){t=t!==null&&t.memoizedState!==null||qc,i=Kc;var a=qc;Kc=r,(qc=t)&&!a?hl(e,n,(n.subtreeFlags&8772)!=0):pl(e,n),Kc=i,qc=a}break;case 30:break;default:pl(e,n)}}function $c(e){var t=e.alternate;t!==null&&(e.alternate=null,$c(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&nt(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var el=null,tl=!1;function nl(e,t,n){for(n=n.child;n!==null;)rl(e,t,n),n=n.sibling}function rl(e,t,n){if(Ce&&typeof Ce.onCommitFiberUnmount==`function`)try{Ce.onCommitFiberUnmount(Se,n)}catch{}switch(n.tag){case 26:qc||Rc(n,t),nl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:qc||Rc(n,t);var r=el,i=tl;Qd(n.type)&&(el=n.stateNode,tl=!1),nl(e,t,n),mf(n.stateNode),el=r,tl=i;break;case 5:qc||Rc(n,t);case 6:if(r=el,i=tl,el=null,nl(e,t,n),el=r,tl=i,el!==null)if(tl)try{(el.nodeType===9?el.body:el.nodeName===`HTML`?el.ownerDocument.body:el).removeChild(n.stateNode)}catch(e){Uu(n,t,e)}else try{el.removeChild(n.stateNode)}catch(e){Uu(n,t,e)}break;case 18:el!==null&&(tl?(e=el,$d(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Pp(e)):$d(el,n.stateNode));break;case 4:r=el,i=tl,el=n.stateNode.containerInfo,tl=!0,nl(e,t,n),el=r,tl=i;break;case 0:case 11:case 14:case 15:Pc(2,n,t),qc||Pc(4,n,t),nl(e,t,n);break;case 1:qc||(Rc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Ic(n,t,r)),nl(e,t,n);break;case 21:nl(e,t,n);break;case 22:qc=(r=qc)||n.memoizedState!==null,nl(e,t,n),qc=r;break;default:nl(e,t,n)}}function il(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Pp(e)}catch(e){Uu(t,t.return,e)}}}function al(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Pp(e)}catch(e){Uu(t,t.return,e)}}function ol(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Yc),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Yc),t;default:throw Error(a(435,e.tag))}}function sl(e,t){var n=ol(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Ju.bind(null,e,t);t.then(r,r)}})}function cl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(Qd(c.type)){el=c.stateNode,tl=!1;break a}break;case 5:el=c.stateNode,tl=!1;break a;case 3:case 4:el=c.stateNode.containerInfo,tl=!0;break a}c=c.return}if(el===null)throw Error(a(160));rl(o,s,i),el=null,tl=!1,o=i.alternate,o!==null&&(o.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)ul(t,e),t=t.sibling}var ll=null;function ul(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:cl(t,e),dl(e),r&4&&(Pc(3,e,e.return),Nc(3,e),Pc(5,e,e.return));break;case 1:cl(t,e),dl(e),r&512&&(qc||n===null||Rc(n,n.return)),r&64&&Kc&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var i=ll;if(cl(t,e),dl(e),r&512&&(qc||n===null||Rc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,i=i.ownerDocument||i;b:switch(r){case`title`:o=i.getElementsByTagName(`title`)[0],(!o||o[tt]||o[Je]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=i.createElement(r),i.head.insertBefore(o,i.querySelector(`head > title`))),Fd(o,r,n),o[Je]=e,st(o),r=o;break a;case`link`:var s=Hf(`link`,`href`,i).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=i.createElement(r),Fd(o,r,n),i.head.appendChild(o);break;case`meta`:if(s=Hf(`meta`,`content`,i).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=i.createElement(r),Fd(o,r,n),i.head.appendChild(o);break;default:throw Error(a(468,r))}o[Je]=e,st(o),r=o}e.stateNode=r}else Uf(i,e.type,e.stateNode);else e.stateNode=Lf(i,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&Bc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Uf(i,e.type,e.stateNode):Lf(i,r,e.memoizedProps))}break;case 27:cl(t,e),dl(e),r&512&&(qc||n===null||Rc(n,n.return)),n!==null&&r&4&&Bc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(cl(t,e),dl(e),r&512&&(qc||n===null||Rc(n,n.return)),e.flags&32){i=e.stateNode;try{Nt(i,``)}catch(t){Uu(e,e.return,t)}}r&4&&e.stateNode!=null&&(i=e.memoizedProps,Bc(e,i,n===null?i:n.memoizedProps)),r&1024&&(Jc=!0);break;case 6:if(cl(t,e),dl(e),r&4){if(e.stateNode===null)throw Error(a(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Uu(e,e.return,t)}}break;case 3:if(Vf=null,i=ll,ll=_f(t.containerInfo),cl(t,e),ll=i,dl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Pp(t.containerInfo)}catch(t){Uu(e,e.return,t)}Jc&&(Jc=!1,fl(e));break;case 4:r=ll,ll=_f(e.stateNode.containerInfo),cl(t,e),dl(e),ll=r;break;case 12:cl(t,e),dl(e);break;case 31:cl(t,e),dl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,sl(e,r)));break;case 13:cl(t,e),dl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Zl=pe()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,sl(e,r)));break;case 22:i=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=Kc,d=qc;if(Kc=u||i,qc=d||l,cl(t,e),qc=d,Kc=u,dl(e),r&8192)a:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(n===null||l||Kc||qc||ml(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,i)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){Uu(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=i?``:l.memoizedProps}catch(e){Uu(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;i?ef(m,!0):ef(l.stateNode,!1)}catch(e){Uu(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,sl(e,n))));break;case 19:cl(t,e),dl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,sl(e,r)));break;case 30:break;case 21:break;default:cl(t,e),dl(e)}}function dl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Vc(r)){n=r;break}r=r.return}if(n==null)throw Error(a(160));switch(n.tag){case 27:var i=n.stateNode;Wc(e,Hc(e),i);break;case 5:var o=n.stateNode;n.flags&32&&(Nt(o,``),n.flags&=-33),Wc(e,Hc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;Uc(e,Hc(e),s);break;default:throw Error(a(161))}}catch(t){Uu(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function fl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;fl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function pl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Qc(e,t.alternate,t),t=t.sibling}function ml(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Pc(4,t,t.return),ml(t);break;case 1:Rc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Ic(t,t.return,n),ml(t);break;case 27:mf(t.stateNode);case 26:case 5:Rc(t,t.return),ml(t);break;case 22:t.memoizedState===null&&ml(t);break;case 30:ml(t);break;default:ml(t)}e=e.sibling}}function hl(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:hl(i,a,n),Nc(4,a);break;case 1:if(hl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Uu(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)La(c[i],s)}catch(e){Uu(r,r.return,e)}}n&&o&64&&Fc(a),Lc(a,a.return);break;case 27:Gc(a);case 26:case 5:hl(i,a,n),n&&r===null&&o&4&&zc(a),Lc(a,a.return);break;case 12:hl(i,a,n);break;case 31:hl(i,a,n),n&&o&4&&il(i,a);break;case 13:hl(i,a,n),n&&o&4&&al(i,a);break;case 22:a.memoizedState===null&&hl(i,a,n),Lc(a,a.return);break;case 30:break;default:hl(i,a,n)}t=t.sibling}}function gl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Xi(n))}function _l(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Xi(e))}function vl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)yl(e,t,n,r),t=t.sibling}function yl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:vl(e,t,n,r),i&2048&&Nc(9,t);break;case 1:vl(e,t,n,r);break;case 3:vl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Xi(e)));break;case 12:if(i&2048){vl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){Uu(t,t.return,e)}}else vl(e,t,n,r);break;case 31:vl(e,t,n,r);break;case 13:vl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?vl(e,t,n,r):(a._visibility|=2,bl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?vl(e,t,n,r):xl(e,t),i&2048&&gl(o,t);break;case 24:vl(e,t,n,r),i&2048&&_l(t.alternate,t);break;default:vl(e,t,n,r)}}function bl(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:bl(a,o,s,c,i),Nc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,bl(a,o,s,c,i)):u._visibility&2?bl(a,o,s,c,i):xl(a,o),i&&l&2048&&gl(o.alternate,o);break;case 24:bl(a,o,s,c,i),i&&l&2048&&_l(o.alternate,o);break;default:bl(a,o,s,c,i)}t=t.sibling}}function xl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:xl(n,r),i&2048&&gl(r.alternate,r);break;case 24:xl(n,r),i&2048&&_l(r.alternate,r);break;default:xl(n,r)}t=t.sibling}}var Sl=8192;function Cl(e,t,n){if(e.subtreeFlags&Sl)for(e=e.child;e!==null;)wl(e,t,n),e=e.sibling}function wl(e,t,n){switch(e.tag){case 26:Cl(e,t,n),e.flags&Sl&&e.memoizedState!==null&&Kf(n,ll,e.memoizedState,e.memoizedProps);break;case 5:Cl(e,t,n);break;case 3:case 4:var r=ll;ll=_f(e.stateNode.containerInfo),Cl(e,t,n),ll=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Sl,Sl=16777216,Cl(e,t,n),Sl=r):Cl(e,t,n));break;default:Cl(e,t,n)}}function Tl(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function El(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];Xc=r,kl(r,e)}Tl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Dl(e),e=e.sibling}function Dl(e){switch(e.tag){case 0:case 11:case 15:El(e),e.flags&2048&&Pc(9,e,e.return);break;case 3:El(e);break;case 12:El(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ol(e)):El(e);break;default:El(e)}}function Ol(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];Xc=r,kl(r,e)}Tl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Pc(8,t,t.return),Ol(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Ol(t));break;default:Ol(t)}e=e.sibling}}function kl(e,t){for(;Xc!==null;){var n=Xc;switch(n.tag){case 0:case 11:case 15:Pc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:Xi(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,Xc=r;else a:for(n=e;Xc!==null;){r=Xc;var i=r.sibling,a=r.return;if($c(r),r===n){Xc=null;break a}if(i!==null){i.return=a,Xc=i;break a}Xc=a}}}var Al={getCacheForType:function(e){var t=Hi(Ji),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Hi(Ji).controller.signal}},jl=typeof WeakMap==`function`?WeakMap:Map,Ml=0,Nl=null,Pl=null,Fl=0,Il=0,Ll=null,Rl=!1,zl=!1,Bl=!1,Vl=0,Hl=0,Ul=0,Wl=0,Gl=0,Kl=0,ql=0,Jl=null,Yl=null,Xl=!1,Zl=0,Ql=0,$l=1/0,eu=null,tu=null,nu=0,ru=null,iu=null,au=0,ou=0,su=null,cu=null,lu=0,uu=null;function du(){return Ml&2&&Fl!==0?Fl&-Fl:P.T===null?Ge():ud()}function fu(){if(Kl===0)if(!(Fl&536870912)||xi){var e=Ae;Ae<<=1,!(Ae&3932160)&&(Ae=262144),Kl=e}else Kl=536870912;return e=Wa.current,e!==null&&(e.flags|=32),Kl}function pu(e,t,n){(e===Nl&&(Il===2||Il===9)||e.cancelPendingCommit!==null)&&(bu(e,0),_u(e,Fl,Kl,!1)),Re(e,n),(!(Ml&2)||e!==Nl)&&(e===Nl&&(!(Ml&2)&&(Wl|=n),Hl===4&&_u(e,Fl,Kl,!1)),nd(e))}function mu(e,t,n){if(Ml&6)throw Error(a(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||Pe(e,t),i=r?Ou(e,t):Eu(e,t,!0),o=r;do{if(i===0){zl&&!r&&_u(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!gu(n)){i=Eu(e,t,!1),o=!1;continue}if(i===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;i=Jl;var l=c.current.memoizedState.isDehydrated;if(l&&(bu(c,s).flags|=256),s=Eu(c,s,!1),s!==2){if(Bl&&!l){c.errorRecoveryDisabledLanes|=o,Wl|=o,i=4;break a}o=Yl,Yl=i,o!==null&&(Yl===null?Yl=o:Yl.push.apply(Yl,o))}i=s}if(o=!1,i!==2)continue}}if(i===1){bu(e,0),_u(e,t,0,!0);break}a:{switch(r=e,o=i,o){case 0:case 1:throw Error(a(345));case 4:if((t&4194048)!==t)break;case 6:_u(r,t,Kl,!Rl);break a;case 2:Yl=null;break;case 3:case 5:break;default:throw Error(a(329))}if((t&62914560)===t&&(i=Zl+300-pe(),10<i)){if(_u(r,t,Kl,!Rl),Ne(r,0,!0)!==0)break a;au=t,r.timeoutHandle=qd(hu.bind(null,r,n,Yl,eu,Xl,t,Kl,Wl,ql,Rl,o,`Throttled`,-0,0),i);break a}hu(r,n,Yl,eu,Xl,t,Kl,Wl,ql,Rl,o,null,-0,0)}}break}while(1);nd(e)}function hu(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Vt},wl(t,a,d);var m=(a&62914560)===a?Zl-pe():(a&4194048)===a?Ql-pe():0;if(m=Jf(d,m),m!==null){au=a,e.cancelPendingCommit=m(Fu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),_u(e,a,o,!l);return}}Fu(e,t,a,n,r,i,o,s,c)}function gu(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!ur(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function _u(e,t,n,r){t&=~Gl,t&=~Wl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Te(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&Be(e,n,t)}function vu(){return Ml&6?!0:(rd(0,!1),!1)}function yu(){if(Pl!==null){if(Il===0)var e=Pl.return;else e=Pl,Pi=Ni=null,yo(e),ya=null,ba=0,e=Pl;for(;e!==null;)Mc(e.alternate,e),e=e.return;Pl=null}}function bu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,Jd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),au=0,yu(),Nl=e,Pl=n=$r(e.current,null),Fl=t,Il=0,Ll=null,Rl=!1,zl=Pe(e,t),Bl=!1,ql=Kl=Gl=Wl=Ul=Hl=0,Yl=Jl=null,Xl=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Te(r),a=1<<i;t|=e[i],r&=~a}return Vl=t,Hr(),n}function xu(e,t){eo=null,P.H=ks,t===la||t===da?(t=_a(),Il=3):t===ua?(t=_a(),Il=4):Il=t===qs?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Ll=t,Pl===null&&(Hl=1,Vs(e,Q(t,e.current)))}function Su(){var e=Wa.current;return e===null?!0:(Fl&4194048)===Fl?Ga===null:(Fl&62914560)===Fl||Fl&536870912?e===Ga:!1}function Cu(){var e=P.H;return P.H=ks,e===null?ks:e}function wu(){var e=P.A;return P.A=Al,e}function Tu(){Hl=4,Rl||(Fl&4194048)!==Fl&&Wa.current!==null||(zl=!0),!(Ul&134217727)&&!(Wl&134217727)||Nl===null||_u(Nl,Fl,Kl,!1)}function Eu(e,t,n){var r=Ml;Ml|=2;var i=Cu(),a=wu();(Nl!==e||Fl!==t)&&(eu=null,bu(e,t)),t=!1;var o=Hl;a:do try{if(Il!==0&&Pl!==null){var s=Pl,c=Ll;switch(Il){case 8:yu(),o=6;break a;case 3:case 2:case 9:case 6:Wa.current===null&&(t=!0);var l=Il;if(Il=0,Ll=null,Mu(e,s,c,l),n&&zl){o=0;break a}break;default:l=Il,Il=0,Ll=null,Mu(e,s,c,l)}}Du(),o=Hl;break}catch(t){xu(e,t)}while(1);return t&&e.shellSuspendCounter++,Pi=Ni=null,Ml=r,P.H=i,P.A=a,Pl===null&&(Nl=null,Fl=0,Hr()),o}function Du(){for(;Pl!==null;)Au(Pl)}function Ou(e,t){var n=Ml;Ml|=2;var r=Cu(),i=wu();Nl!==e||Fl!==t?(eu=null,$l=pe()+500,bu(e,t)):zl=Pe(e,t);a:do try{if(Il!==0&&Pl!==null){t=Pl;var o=Ll;b:switch(Il){case 1:Il=0,Ll=null,Mu(e,t,o,1);break;case 2:case 9:if(pa(o)){Il=0,Ll=null,ju(t);break}t=function(){Il!==2&&Il!==9||Nl!==e||(Il=7),nd(e)},o.then(t,t);break a;case 3:Il=7;break a;case 4:Il=5;break a;case 7:pa(o)?(Il=0,Ll=null,ju(t)):(Il=0,Ll=null,Mu(e,t,o,7));break;case 5:var s=null;switch(Pl.tag){case 26:s=Pl.memoizedState;case 5:case 27:var c=Pl;if(s?Gf(s):c.stateNode.complete){Il=0,Ll=null;var l=c.sibling;if(l!==null)Pl=l;else{var u=c.return;u===null?Pl=null:(Pl=u,Nu(u))}break b}}Il=0,Ll=null,Mu(e,t,o,5);break;case 6:Il=0,Ll=null,Mu(e,t,o,6);break;case 8:yu(),Hl=6;break a;default:throw Error(a(462))}}ku();break}catch(t){xu(e,t)}while(1);return Pi=Ni=null,P.H=r,P.A=i,Ml=n,Pl===null?(Nl=null,Fl=0,Hr(),Hl):0}function ku(){for(;Pl!==null&&!de();)Au(Pl)}function Au(e){var t=Cc(e.alternate,e,Vl);e.memoizedProps=e.pendingProps,t===null?Nu(e):Pl=t}function ju(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=sc(n,t,t.pendingProps,t.type,void 0,Fl);break;case 11:t=sc(n,t,t.pendingProps,t.type.render,t.ref,Fl);break;case 5:yo(t);default:Mc(n,t),t=Pl=ei(t,Vl),t=Cc(n,t,Vl)}e.memoizedProps=e.pendingProps,t===null?Nu(e):Pl=t}function Mu(e,t,n,r){Pi=Ni=null,yo(t),ya=null,ba=0;var i=t.return;try{if(Ks(e,i,t,n,Fl)){Hl=1,Vs(e,Q(n,e.current)),Pl=null;return}}catch(t){if(i!==null)throw Pl=i,t;Hl=1,Vs(e,Q(n,e.current)),Pl=null;return}t.flags&32768?(xi||r===1?e=!0:zl||Fl&536870912?e=!1:(Rl=e=!0,(r===2||r===9||r===3||r===6)&&(r=Wa.current,r!==null&&r.tag===13&&(r.flags|=16384))),Pu(t,e)):Nu(t)}function Nu(e){var t=e;do{if(t.flags&32768){Pu(t,Rl);return}e=t.return;var n=Ac(t.alternate,t,Vl);if(n!==null){Pl=n;return}if(t=t.sibling,t!==null){Pl=t;return}Pl=t=e}while(t!==null);Hl===0&&(Hl=5)}function Pu(e,t){do{var n=jc(e.alternate,e);if(n!==null){n.flags&=32767,Pl=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Pl=e;return}Pl=e=n}while(e!==null);Hl=6,Pl=null}function Fu(e,t,n,r,i,o,s,c,l){e.cancelPendingCommit=null;do Bu();while(nu!==0);if(Ml&6)throw Error(a(327));if(t!==null){if(t===e.current)throw Error(a(177));if(o=t.lanes|t.childLanes,o|=Vr,ze(e,n,o,s,c,l),e===Nl&&(Pl=Nl=null,Fl=0),iu=t,ru=e,au=n,ou=o,su=i,cu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Yu(_e,function(){return Vu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=P.T,P.T=null,i=F.p,F.p=2,s=Ml,Ml|=4;try{Zc(e,t,n)}finally{Ml=s,F.p=i,P.T=r}}nu=1,Iu(),Lu(),Ru()}}function Iu(){if(nu===1){nu=0;var e=ru,t=iu,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=P.T,P.T=null;var r=F.p;F.p=2;var i=Ml;Ml|=4;try{ul(t,e);var a=Bd,o=hr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&mr(s.ownerDocument.documentElement,s)){if(c!==null&&gr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=pr(s,h),v=pr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}cp=!!zd,Bd=zd=null}finally{Ml=i,F.p=r,P.T=n}}e.current=t,nu=2}}function Lu(){if(nu===2){nu=0;var e=ru,t=iu,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=P.T,P.T=null;var r=F.p;F.p=2;var i=Ml;Ml|=4;try{Qc(e,t.alternate,t)}finally{Ml=i,F.p=r,P.T=n}}nu=3}}function Ru(){if(nu===4||nu===3){nu=0,fe();var e=ru,t=iu,n=au,r=cu;t.subtreeFlags&10256||t.flags&10256?nu=5:(nu=0,iu=ru=null,zu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(tu=null),We(n),t=t.stateNode,Ce&&typeof Ce.onCommitFiberRoot==`function`)try{Ce.onCommitFiberRoot(Se,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=P.T,i=F.p,F.p=2,P.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{P.T=t,F.p=i}}au&3&&Bu(),nd(e),i=e.pendingLanes,n&261930&&i&42?e===uu?lu++:(lu=0,uu=e):lu=0,rd(0,!1)}}function zu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Xi(t)))}function Bu(){return Iu(),Lu(),Ru(),Vu()}function Vu(){if(nu!==5)return!1;var e=ru,t=ou;ou=0;var n=We(au),r=P.T,i=F.p;try{F.p=32>n?32:n,P.T=null,n=su,su=null;var o=ru,s=au;if(nu=0,iu=ru=null,au=0,Ml&6)throw Error(a(331));var c=Ml;if(Ml|=4,Dl(o.current),yl(o,o.current,s,n),Ml=c,rd(0,!1),Ce&&typeof Ce.onPostCommitFiberRoot==`function`)try{Ce.onPostCommitFiberRoot(Se,o)}catch{}return!0}finally{F.p=i,P.T=r,zu(e,t)}}function Hu(e,t,n){t=Q(n,t),t=Us(e.stateNode,t,2),e=ja(e,t,2),e!==null&&(Re(e,2),nd(e))}function Uu(e,t,n){if(e.tag===3)Hu(e,e,n);else for(;t!==null;){if(t.tag===3){Hu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(tu===null||!tu.has(r))){e=Q(n,e),n=Ws(2),r=ja(t,n,2),r!==null&&(Gs(n,r,t,e),Re(r,2),nd(r));break}}t=t.return}}function Wu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new jl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Bl=!0,i.add(n),e=Gu.bind(null,e,t,n),t.then(e,e))}function Gu(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Nl===e&&(Fl&n)===n&&(Hl===4||Hl===3&&(Fl&62914560)===Fl&&300>pe()-Zl?!(Ml&2)&&bu(e,0):Gl|=n,ql===Fl&&(ql=0)),nd(e)}function Ku(e,t){t===0&&(t=Ie()),e=Gr(e,t),e!==null&&(Re(e,t),nd(e))}function qu(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ku(e,n)}function Ju(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(a(314))}r!==null&&r.delete(t),Ku(e,n)}function Yu(e,t){return le(e,t)}var Xu=null,Zu=null,Qu=!1,$u=!1,ed=!1,td=0;function nd(e){e!==Zu&&e.next===null&&(Zu===null?Xu=Zu=e:Zu=Zu.next=e),$u=!0,Qu||(Qu=!0,ld())}function rd(e,t){if(!ed&&$u){ed=!0;do for(var n=!1,r=Xu;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Te(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,cd(r,a))}else a=Fl,a=Ne(r,r===Nl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Pe(r,a)||(n=!0,cd(r,a));r=r.next}while(n);ed=!1}}function id(){ad()}function ad(){$u=Qu=!1;var e=0;td!==0&&Kd()&&(e=td);for(var t=pe(),n=null,r=Xu;r!==null;){var i=r.next,a=od(r,t);a===0?(r.next=null,n===null?Xu=i:n.next=i,i===null&&(Zu=n)):(n=r,(e!==0||a&3)&&($u=!0)),r=i}nu!==0&&nu!==5||rd(e,!1),td!==0&&(td=0)}function od(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Te(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Fe(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Nl,n=Fl,n=Ne(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Il===2||Il===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&ue(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Pe(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&ue(r),We(n)){case 2:case 8:n=ge;break;case 32:n=_e;break;case 268435456:n=ye;break;default:n=_e}return r=sd.bind(null,e),n=le(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&ue(r),e.callbackPriority=2,e.callbackNode=null,2}function sd(e,t){if(nu!==0&&nu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Bu()&&e.callbackNode!==n)return null;var r=Fl;return r=Ne(e,e===Nl?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(mu(e,r,t),od(e,pe()),e.callbackNode!=null&&e.callbackNode===n?sd.bind(null,e):null)}function cd(e,t){if(Bu())return null;mu(e,t,!0)}function ld(){Xd(function(){Ml&6?le(he,id):ad()})}function ud(){if(td===0){var e=$i;e===0&&(e=ke,ke<<=1,!(ke&261888)&&(ke=256)),td=e}return td}function dd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:Bt(``+e)}function fd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function pd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=dd((i[Ye]||null).action),o=r.submitter;o&&(t=(t=o[Ye]||null)?dd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new ln(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(td!==0){var e=o?fd(i,o):new FormData(i);hs(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?fd(i,o):new FormData(i),hs(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var md=0;md<Ir.length;md++){var hd=Ir[md];Lr(hd.toLowerCase(),`on`+(hd[0].toUpperCase()+hd.slice(1)))}Lr(Or,`onAnimationEnd`),Lr(kr,`onAnimationIteration`),Lr(Ar,`onAnimationStart`),Lr(`dblclick`,`onDoubleClick`),Lr(`focusin`,`onFocus`),Lr(`focusout`,`onBlur`),Lr(jr,`onTransitionRun`),Lr(Mr,`onTransitionStart`),Lr(Nr,`onTransitionCancel`),Lr(Pr,`onTransitionEnd`),dt(`onMouseEnter`,[`mouseout`,`mouseover`]),dt(`onMouseLeave`,[`mouseout`,`mouseover`]),dt(`onPointerEnter`,[`pointerout`,`pointerover`]),dt(`onPointerLeave`,[`pointerout`,`pointerover`]),ut(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),ut(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),ut(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),ut(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),ut(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),ut(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var gd=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),_d=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(gd));function vd(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Rr(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Rr(e)}i.currentTarget=null,a=c}}}}function yd(e,t){var n=t[Ze];n===void 0&&(n=t[Ze]=new Set);var r=e+`__bubble`;n.has(r)||(Cd(t,e,2,!1),n.add(r))}function bd(e,t,n){var r=0;t&&(r|=4),Cd(n,e,r,t)}var xd=`_reactListening`+Math.random().toString(36).slice(2);function Sd(e){if(!e[xd]){e[xd]=!0,ct.forEach(function(t){t!==`selectionchange`&&(_d.has(t)||bd(t,!1,e),bd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[xd]||(t[xd]=!0,bd(`selectionchange`,!1,t))}}function Cd(e,t,n,r){switch(hp(t)){case 2:var i=lp;break;case 8:i=up;break;default:i=dp}n=i.bind(null,t,n,e),i=void 0,!Zt||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function wd(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var c=r.stateNode.containerInfo;if(c===i)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&o.stateNode.containerInfo===i)return;o=o.return}for(;c!==null;){if(o=rt(c),o===null)return;if(l=o.tag,l===5||l===6||l===26||l===27){r=a=o;continue a}c=c.parentNode}}r=r.return}Jt(function(){var r=a,i=Ut(n),o=[];a:{var c=Fr.get(e);if(c!==void 0){var l=ln,u=e;switch(e){case`keypress`:if(rn(n)===0)break a;case`keydown`:case`keyup`:l=Dn;break;case`focusin`:u=`focus`,l=vn;break;case`focusout`:u=`blur`,l=vn;break;case`beforeblur`:case`afterblur`:l=vn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=gn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=_n;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=kn;break;case Or:case kr:case Ar:l=yn;break;case Pr:l=An;break;case`scroll`:case`scrollend`:l=dn;break;case`wheel`:l=jn;break;case`copy`:case`cut`:case`paste`:l=bn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=On;break;case`toggle`:case`beforetoggle`:l=Mn}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=Yt(m,p),g!=null&&d.push(Td(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),o.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==Ht&&(u=n.relatedTarget||n.fromElement)&&(rt(u)||u[Xe]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?rt(u):null,u!==null&&(f=s(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=gn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=On,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:at(l),h=u==null?c:at(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,rt(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Dd,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Od(o,c,l,d,!1),u!==null&&f!==null&&Od(o,f,u,d,!0)}}a:{if(c=r?at(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=Qn;else if(Kn(c))if($n)v=cr;else{v=or;var y=ar}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Lt(r.elementType)&&(v=Qn):v=sr;if(v&&=v(e,r)){qn(o,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&kt(c,`number`,c.value)}switch(y=r?at(r):window,e){case`focusin`:(Kn(y)||y.contentEditable===`true`)&&(vr=y,yr=r,br=null);break;case`focusout`:br=yr=vr=null;break;case`mousedown`:xr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:xr=!1,Sr(o,n,i);break;case`selectionchange`:if(_r)break;case`keydown`:case`keyup`:Sr(o,n,i)}var b;if(Pn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else Hn?Bn(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Ln&&n.locale!==`ko`&&(Hn||x!==`onCompositionStart`?x===`onCompositionEnd`&&Hn&&(b=nn()):($t=i,en=`value`in $t?$t.value:$t.textContent,Hn=!0)),y=Ed(r,x),0<y.length&&(x=new xn(x,e,null,n,i),o.push({event:x,listeners:y}),b?x.data=b:(b=Vn(n),b!==null&&(x.data=b)))),(b=In?Un(e,n):Wn(e,n))&&(x=Ed(r,`onBeforeInput`),0<x.length&&(y=new xn(`onBeforeInput`,`beforeinput`,null,n,i),o.push({event:y,listeners:x}),y.data=b)),pd(o,e,r,n,i)}vd(o,t)})}function Td(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ed(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=Yt(e,n),i!=null&&r.unshift(Td(e,i,a)),i=Yt(e,t),i!=null&&r.push(Td(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Dd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Od(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=Yt(n,a),l!=null&&o.unshift(Td(n,l,c))):i||(l=Yt(n,a),l!=null&&o.push(Td(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var kd=/\r\n?/g,Ad=/\u0000|\uFFFD/g;function jd(e){return(typeof e==`string`?e:``+e).replace(kd,`
|
|
10
|
-
`).replace(Ad,``)}function Md(e,t){return t=jd(t),jd(e)===t}function Nd(e,t,n,r,i,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Nt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Nt(e,``+r);break;case`className`:_t(e,`class`,r);break;case`tabIndex`:_t(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:_t(e,n,r);break;case`style`:It(e,r,o);break;case`data`:if(t!==`object`){_t(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Bt(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}else typeof o==`function`&&(n===`formAction`?(t!==`input`&&Nd(e,t,`name`,i.name,i,null),Nd(e,t,`formEncType`,i.formEncType,i,null),Nd(e,t,`formMethod`,i.formMethod,i,null),Nd(e,t,`formTarget`,i.formTarget,i,null)):(Nd(e,t,`encType`,i.encType,i,null),Nd(e,t,`method`,i.method,i,null),Nd(e,t,`target`,i.target,i,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Bt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Vt);break;case`onScroll`:r!=null&&yd(`scroll`,e);break;case`onScrollEnd`:r!=null&&yd(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(a(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(a(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=Bt(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:yd(`beforetoggle`,e),yd(`toggle`,e),gt(e,`popover`,r);break;case`xlinkActuate`:vt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:vt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:vt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:vt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:vt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:vt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:vt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:vt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:vt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:gt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=Rt.get(n)||n,gt(e,n,r))}}function Pd(e,t,n,r,i,o){switch(n){case`style`:It(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(a(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(a(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Nt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Nt(e,``+r);break;case`onScroll`:r!=null&&yd(`scroll`,e);break;case`onScrollEnd`:r!=null&&yd(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=Vt);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!lt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(i=n.endsWith(`Capture`),t=n.slice(2,i?n.length-7:void 0),o=e[Ye]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,i),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,i);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):gt(e,n,r)}}}function Fd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:yd(`error`,e),yd(`load`,e);var r=!1,i=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:i=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(a(137,t));default:Nd(e,t,o,s,n,null)}}i&&Nd(e,t,`srcSet`,n.srcSet,n,null),r&&Nd(e,t,`src`,n.src,n,null);return;case`input`:yd(`invalid`,e);var c=o=s=i=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:i=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(a(137,t));break;default:Nd(e,t,r,d,n,null)}}Ot(e,o,c,l,u,s,i,!1);return;case`select`:for(i in yd(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(i)&&(c=n[i],c!=null))switch(i){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Nd(e,t,i,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&At(e,!!r,n,!0):At(e,!!r,t,!1);return;case`textarea`:for(s in yd(`invalid`,e),o=i=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:i=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(a(91));break;default:Nd(e,t,s,c,n,null)}Mt(e,r,i,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Nd(e,t,l,r,n,null)}return;case`dialog`:yd(`beforetoggle`,e),yd(`toggle`,e),yd(`cancel`,e),yd(`close`,e);break;case`iframe`:case`object`:yd(`load`,e);break;case`video`:case`audio`:for(r=0;r<gd.length;r++)yd(gd[r],e);break;case`image`:yd(`error`,e),yd(`load`,e);break;case`details`:yd(`toggle`,e);break;case`embed`:case`source`:case`link`:yd(`error`,e),yd(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(a(137,t));default:Nd(e,t,u,r,n,null)}return;default:if(Lt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Pd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Nd(e,t,c,r,n,null))}function Id(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var i=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Nd(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:i=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(a(137,t));break;default:m!==f&&Nd(e,t,p,m,r,f)}}Dt(e,s,c,l,u,d,o,i);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Nd(e,t,o,null,r,l)}for(i in r)if(o=r[i],l=n[i],r.hasOwnProperty(i)&&(o!=null||l!=null))switch(i){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Nd(e,t,i,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?At(e,!!n,n?[]:``,!1):At(e,!!n,t,!0)):At(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(i=n[c],n.hasOwnProperty(c)&&i!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Nd(e,t,c,null,r,i)}for(s in r)if(i=r[s],o=n[s],r.hasOwnProperty(s)&&(i!=null||o!=null))switch(s){case`value`:p=i;break;case`defaultValue`:m=i;break;case`children`:break;case`dangerouslySetInnerHTML`:if(i!=null)throw Error(a(91));break;default:i!==o&&Nd(e,t,s,i,r,o)}jt(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Nd(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Nd(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Nd(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(a(137,t));break;default:Nd(e,t,u,p,r,m)}return;default:if(Lt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Pd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Pd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Nd(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Nd(e,t,f,p,r,m)}function Ld(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Rd(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Ld(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Ld(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var zd=null,Bd=null;function Vd(e){return e.nodeType===9?e:e.ownerDocument}function Hd(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function Ud(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function Wd(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Gd=null;function Kd(){var e=window.event;return e&&e.type===`popstate`?e===Gd?!1:(Gd=e,!0):(Gd=null,!1)}var qd=typeof setTimeout==`function`?setTimeout:void 0,Jd=typeof clearTimeout==`function`?clearTimeout:void 0,Yd=typeof Promise==`function`?Promise:void 0,Xd=typeof queueMicrotask==`function`?queueMicrotask:Yd===void 0?qd:function(e){return Yd.resolve(null).then(e).catch(Zd)};function Zd(e){setTimeout(function(){throw e})}function Qd(e){return e===`head`}function $d(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Pp(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)mf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,mf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[tt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&mf(e.ownerDocument.body);n=i}while(n);Pp(t)}function ef(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function tf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:tf(n),nt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function nf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[tt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=lf(e.nextSibling),e===null)break}return null}function rf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=lf(e.nextSibling),e===null))return null;return e}function af(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=lf(e.nextSibling),e===null))return null;return e}function of(e){return e.data===`$?`||e.data===`$~`}function sf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function cf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function lf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var uf=null;function df(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return lf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function ff(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function pf(e,t,n){switch(t=Vd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(a(452));return e;case`head`:if(e=t.head,!e)throw Error(a(453));return e;case`body`:if(e=t.body,!e)throw Error(a(454));return e;default:throw Error(a(451))}}function mf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);nt(e)}var hf=new Map,gf=new Set;function _f(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var vf=F.d;F.d={f:yf,r:bf,D:Cf,C:wf,L:Tf,m:Ef,X:Of,S:Df,M:kf};function yf(){var e=vf.f(),t=vu();return e||t}function bf(e){var t=it(e);t!==null&&t.tag===5&&t.type===`form`?_s(t):vf.r(e)}var xf=typeof document>`u`?null:document;function Sf(e,t,n){var r=xf;if(r&&typeof t==`string`&&t){var i=Et(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),gf.has(i)||(gf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Fd(t,`link`,e),st(t),r.head.appendChild(t)))}}function Cf(e){vf.D(e),Sf(`dns-prefetch`,e,null)}function wf(e,t){vf.C(e,t),Sf(`preconnect`,e,t)}function Tf(e,t,n){vf.L(e,t,n);var r=xf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Et(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Et(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Et(n.imageSizes)+`"]`)):i+=`[href="`+Et(e)+`"]`;var a=i;switch(t){case`style`:a=jf(e);break;case`script`:a=Ff(e)}hf.has(a)||(e=p({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),hf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Mf(a))||t===`script`&&r.querySelector(If(a))||(t=r.createElement(`link`),Fd(t,`link`,e),st(t),r.head.appendChild(t)))}}function Ef(e,t){vf.m(e,t);var n=xf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Et(r)+`"][href="`+Et(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Ff(e)}if(!hf.has(a)&&(e=p({rel:`modulepreload`,href:e},t),hf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(If(a)))return}r=n.createElement(`link`),Fd(r,`link`,e),st(r),n.head.appendChild(r)}}}function Df(e,t,n){vf.S(e,t,n);var r=xf;if(r&&e){var i=ot(r).hoistableStyles,a=jf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Mf(a)))s.loading=5;else{e=p({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=hf.get(a))&&zf(e,n);var c=o=r.createElement(`link`);st(c),Fd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Rf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Of(e,t){vf.X(e,t);var n=xf;if(n&&e){var r=ot(n).hoistableScripts,i=Ff(e),a=r.get(i);a||(a=n.querySelector(If(i)),a||(e=p({src:e,async:!0},t),(t=hf.get(i))&&Bf(e,t),a=n.createElement(`script`),st(a),Fd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t){vf.M(e,t);var n=xf;if(n&&e){var r=ot(n).hoistableScripts,i=Ff(e),a=r.get(i);a||(a=n.querySelector(If(i)),a||(e=p({src:e,async:!0,type:`module`},t),(t=hf.get(i))&&Bf(e,t),a=n.createElement(`script`),st(a),Fd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Af(e,t,n,r){var i=(i=W.current)?_f(i):null;if(!i)throw Error(a(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=jf(n.href),n=ot(i).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=jf(n.href);var o=ot(i).hoistableStyles,s=o.get(e);if(s||(i=i.ownerDocument||i,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=i.querySelector(Mf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),hf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},hf.set(e,n),o||Pf(i,e,n,s.state))),t&&r===null)throw Error(a(528,``));return s}if(t&&r!==null)throw Error(a(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Ff(n),n=ot(i).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(a(444,e))}}function jf(e){return`href="`+Et(e)+`"`}function Mf(e){return`link[rel="stylesheet"][`+e+`]`}function Nf(e){return p({},e,{"data-precedence":e.precedence,precedence:null})}function Pf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Fd(t,`link`,n),st(t),e.head.appendChild(t))}function Ff(e){return`[src="`+Et(e)+`"]`}function If(e){return`script[async]`+e}function Lf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Et(n.href)+`"]`);if(r)return t.instance=r,st(r),r;var i=p({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),st(r),Fd(r,`style`,i),Rf(r,n.precedence,e),t.instance=r;case`stylesheet`:i=jf(n.href);var o=e.querySelector(Mf(i));if(o)return t.state.loading|=4,t.instance=o,st(o),o;r=Nf(n),(i=hf.get(i))&&zf(r,i),o=(e.ownerDocument||e).createElement(`link`),st(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Fd(o,`link`,r),t.state.loading|=4,Rf(o,n.precedence,e),t.instance=o;case`script`:return o=Ff(n.src),(i=e.querySelector(If(o)))?(t.instance=i,st(i),i):(r=n,(i=hf.get(o))&&(r=p({},n),Bf(r,i)),e=e.ownerDocument||e,i=e.createElement(`script`),st(i),Fd(i,`link`,r),e.head.appendChild(i),t.instance=i);case`void`:return null;default:throw Error(a(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Rf(r,n.precedence,e));return t.instance}function Rf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function zf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Bf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Vf=null;function Hf(e,t,n){if(Vf===null){var r=new Map,i=Vf=new Map;i.set(n,r)}else i=Vf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[tt]||a[Je]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Uf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Wf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Gf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Kf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=jf(r.href),a=t.querySelector(Mf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Yf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,st(a);return}a=t.ownerDocument||t,r=Nf(r),(i=hf.get(i))&&zf(r,i),a=a.createElement(`link`),st(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Fd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Yf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var qf=0;function Jf(e,t){return e.stylesheets&&e.count===0&&Zf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Zf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&qf===0&&(qf=62500*Rd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Zf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>qf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Yf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Zf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Xf=null;function Zf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Xf=new Map,t.forEach(Qf,e),Xf=null,Yf.call(e))}function Qf(e,t){if(!(t.state.loading&4)){var n=Xf.get(e);if(n)var r=n.get(null);else{n=new Map,Xf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=Yf.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var $f={$$typeof:x,Provider:null,Consumer:null,_currentValue:I,_currentValue2:I,_threadCount:0};function ep(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Le(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Le(0),this.hiddenUpdates=Le(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function tp(e,t,n,r,i,a,o,s,c,l,u,d){return e=new ep(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=Zr(3,null,null,t),e.current=a,a.stateNode=e,t=Yi(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Oa(a),e}function np(e){return e?(e=Yr,e):Yr}function rp(e,t,n,r,i,a){i=np(i),r.context===null?r.context=i:r.pendingContext=i,r=Aa(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=ja(e,r,t),n!==null&&(pu(n,e,t),Ma(n,e,t))}function ip(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ap(e,t){ip(e,t),(e=e.alternate)&&ip(e,t)}function op(e){if(e.tag===13||e.tag===31){var t=Gr(e,67108864);t!==null&&pu(t,e,67108864),ap(e,67108864)}}function sp(e){if(e.tag===13||e.tag===31){var t=du();t=Ue(t);var n=Gr(e,t);n!==null&&pu(n,e,t),ap(e,t)}}var cp=!0;function lp(e,t,n,r){var i=P.T;P.T=null;var a=F.p;try{F.p=2,dp(e,t,n,r)}finally{F.p=a,P.T=i}}function up(e,t,n,r){var i=P.T;P.T=null;var a=F.p;try{F.p=8,dp(e,t,n,r)}finally{F.p=a,P.T=i}}function dp(e,t,n,r){if(cp){var i=fp(r);if(i===null)wd(e,t,r,pp,n),wp(e,r);else if(Ep(i,e,t,n,r))r.stopPropagation();else if(wp(e,r),t&4&&-1<Cp.indexOf(e)){for(;i!==null;){var a=it(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Me(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Te(o);s.entanglements[1]|=c,o&=~c}nd(a),!(Ml&6)&&($l=pe()+500,rd(0,!1))}}break;case 31:case 13:s=Gr(a,2),s!==null&&pu(s,a,2),vu(),ap(a,2)}if(a=fp(r),a===null&&wd(e,t,r,pp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else wd(e,t,r,null,n)}}function fp(e){return e=Ut(e),mp(e)}var pp=null;function mp(e){if(pp=null,e=rt(e),e!==null){var t=s(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=c(t),e!==null)return e;e=null}else if(n===31){if(e=l(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return pp=e,null}function hp(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(me()){case he:return 2;case ge:return 8;case _e:case ve:return 32;case ye:return 268435456;default:return 32}default:return 32}}var gp=!1,_p=null,vp=null,yp=null,bp=new Map,xp=new Map,Sp=[],Cp=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function wp(e,t){switch(e){case`focusin`:case`focusout`:_p=null;break;case`dragenter`:case`dragleave`:vp=null;break;case`mouseover`:case`mouseout`:yp=null;break;case`pointerover`:case`pointerout`:bp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:xp.delete(t.pointerId)}}function Tp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=it(t),t!==null&&op(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Ep(e,t,n,r,i){switch(t){case`focusin`:return _p=Tp(_p,e,t,n,r,i),!0;case`dragenter`:return vp=Tp(vp,e,t,n,r,i),!0;case`mouseover`:return yp=Tp(yp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return bp.set(a,Tp(bp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,xp.set(a,Tp(xp.get(a)||null,e,t,n,r,i)),!0}return!1}function Dp(e){var t=rt(e.target);if(t!==null){var n=s(t);if(n!==null){if(t=n.tag,t===13){if(t=c(n),t!==null){e.blockedOn=t,Ke(e.priority,function(){sp(n)});return}}else if(t===31){if(t=l(n),t!==null){e.blockedOn=t,Ke(e.priority,function(){sp(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Op(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=fp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Ht=r,n.target.dispatchEvent(r),Ht=null}else return t=it(n),t!==null&&op(t),e.blockedOn=n,!1;t.shift()}return!0}function kp(e,t,n){Op(e)&&n.delete(t)}function Ap(){gp=!1,_p!==null&&Op(_p)&&(_p=null),vp!==null&&Op(vp)&&(vp=null),yp!==null&&Op(yp)&&(yp=null),bp.forEach(kp),xp.forEach(kp)}function jp(e,n){e.blockedOn===n&&(e.blockedOn=null,gp||(gp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Ap)))}var Mp=null;function Np(e){Mp!==e&&(Mp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Mp===e&&(Mp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(mp(r||n)===null)continue;break}var a=it(n);a!==null&&(e.splice(t,3),t-=3,hs(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Pp(e){function t(t){return jp(t,e)}_p!==null&&jp(_p,e),vp!==null&&jp(vp,e),yp!==null&&jp(yp,e),bp.forEach(t),xp.forEach(t);for(var n=0;n<Sp.length;n++){var r=Sp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Sp.length&&(n=Sp[0],n.blockedOn===null);)Dp(n),n.blockedOn===null&&Sp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[Ye]||null;if(typeof a==`function`)o||Np(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[Ye]||null)s=o.formAction;else if(mp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Np(n)}}}function Fp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Ip(e){this._internalRoot=e}Lp.prototype.render=Ip.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(a(409));var n=t.current;rp(n,du(),e,t,null,null)},Lp.prototype.unmount=Ip.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;rp(e.current,2,null,e,null,null),vu(),t[Xe]=null}};function Lp(e){this._internalRoot=e}Lp.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ge();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Sp.length&&t!==0&&t<Sp[n].priority;n++);Sp.splice(n,0,e),n===0&&Dp(e)}};var Rp=n.version;if(Rp!==`19.2.5`)throw Error(a(527,Rp,`19.2.5`));F.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(a(188)):(e=Object.keys(e).join(`,`),Error(a(268,e)));return e=d(t),e=e===null?null:f(e),e=e===null?null:e.stateNode,e};var zp={bundleType:0,version:`19.2.5`,rendererPackageName:`react-dom`,currentDispatcherRef:P,reconcilerVersion:`19.2.5`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Bp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Bp.isDisabled&&Bp.supportsFiber)try{Se=Bp.inject(zp),Ce=Bp}catch{}}e.createRoot=function(e,t){if(!o(e))throw Error(a(299));var n=!1,r=``,i=Rs,s=zs,c=Bs;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=tp(e,1,!1,null,null,n,r,null,i,s,c,Fp),e[Xe]=t.current,Sd(e),new Ip(t)}})),Jr=t(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=qr()})),Yr=Y(`arrow-down-to-line`,[[`path`,{d:`M12 17V3`,key:`1cwfxf`}],[`path`,{d:`m6 11 6 6 6-6`,key:`12ii2o`}],[`path`,{d:`M19 21H5`,key:`150jfl`}]]),Xr=Y(`arrow-down`,[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]),Zr=Y(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),Qr=Y(`arrow-up-down`,[[`path`,{d:`m21 16-4 4-4-4`,key:`f6ql7i`}],[`path`,{d:`M17 20V4`,key:`1ejh1v`}],[`path`,{d:`m3 8 4-4 4 4`,key:`11wl7u`}],[`path`,{d:`M7 4v16`,key:`1glfcx`}]]),$r=Y(`arrow-up`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]),ei=Y(`bird`,[[`path`,{d:`M16 7h.01`,key:`1kdx03`}],[`path`,{d:`M3.4 18H12a8 8 0 0 0 8-8V7a4 4 0 0 0-7.28-2.3L2 20`,key:`oj1oa8`}],[`path`,{d:`m20 7 2 .5-2 .5`,key:`12nv4d`}],[`path`,{d:`M10 18v3`,key:`1yea0a`}],[`path`,{d:`M14 17.75V21`,key:`1pymcb`}],[`path`,{d:`M7 18a6 6 0 0 0 3.84-10.61`,key:`1npnn0`}]]),ti=Y(`bold`,[[`path`,{d:`M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8`,key:`mg9rjx`}]]),ni=Y(`book-open`,[[`path`,{d:`M12 7v14`,key:`1akyts`}],[`path`,{d:`M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z`,key:`ruj8y`}]]),X=i(),Z=e(r(),1),ri=e(R(),1),ii=Jr(),Q=a(),ai=[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]];Y(`bot`,ai);var oi=Y(`cat`,[[`path`,{d:`M12 5c.67 0 1.35.09 2 .26 1.78-2 5.03-2.84 6.42-2.26 1.4.58-.42 7-.42 7 .57 1.07 1 2.24 1 3.44C21 17.9 16.97 21 12 21s-9-3-9-7.56c0-1.25.5-2.4 1-3.44 0 0-1.89-6.42-.5-7 1.39-.58 4.72.23 6.5 2.23A9.04 9.04 0 0 1 12 5Z`,key:`x6xyqk`}],[`path`,{d:`M8 14v.5`,key:`1nzgdb`}],[`path`,{d:`M16 14v.5`,key:`1lajdz`}],[`path`,{d:`M11.25 16.25h1.5L12 17l-.75-.75Z`,key:`12kq1m`}]]),si=Y(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),ci=Y(`chevrons-up-down`,[[`path`,{d:`m7 15 5 5 5-5`,key:`1hf1tw`}],[`path`,{d:`m7 9 5-5 5 5`,key:`sgt6xg`}]]),li=Y(`circle-question-mark`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),ui=Y(`clock`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]),di=Y(`cloud-off`,[[`path`,{d:`M10.94 5.274A7 7 0 0 1 15.71 10h1.79a4.5 4.5 0 0 1 4.222 6.057`,key:`1uxyv8`}],[`path`,{d:`M18.796 18.81A4.5 4.5 0 0 1 17.5 19H9A7 7 0 0 1 5.79 5.78`,key:`99tcn7`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),fi=Y(`cloud`,[[`path`,{d:`M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z`,key:`p7xjir`}]]),pi=Y(`code`,[[`path`,{d:`m16 18 6-6-6-6`,key:`eg8j8`}],[`path`,{d:`m8 6-6 6 6 6`,key:`ppft3o`}]]),mi=Y(`columns-2`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M12 3v18`,key:`108xh3`}]]),hi=Y(`columns-3`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}]]),gi=Y(`contrast`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 18a6 6 0 0 0 0-12v12z`,key:`j4l70d`}]]),_i=Y(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),vi=Y(`corner-down-left`,[[`path`,{d:`M20 4v7a4 4 0 0 1-4 4H4`,key:`6o5b7l`}],[`path`,{d:`m9 10-5 5 5 5`,key:`1kshq7`}]]),yi=Y(`corner-up-right`,[[`path`,{d:`m15 14 5-5-5-5`,key:`12vg1m`}],[`path`,{d:`M4 20v-7a4 4 0 0 1 4-4h12`,key:`1lu4f8`}]]),bi=Y(`diamond`,[[`path`,{d:`M2.7 10.3a2.41 2.41 0 0 0 0 3.41l7.59 7.59a2.41 2.41 0 0 0 3.41 0l7.59-7.59a2.41 2.41 0 0 0 0-3.41l-7.59-7.59a2.41 2.41 0 0 0-3.41 0Z`,key:`1f1r0c`}]]),xi=Y(`dog`,[[`path`,{d:`M11.25 16.25h1.5L12 17z`,key:`w7jh35`}],[`path`,{d:`M16 14v.5`,key:`1lajdz`}],[`path`,{d:`M4.42 11.247A13.152 13.152 0 0 0 4 14.556C4 18.728 7.582 21 12 21s8-2.272 8-6.444a11.702 11.702 0 0 0-.493-3.309`,key:`u7s9ue`}],[`path`,{d:`M8 14v.5`,key:`1nzgdb`}],[`path`,{d:`M8.5 8.5c-.384 1.05-1.083 2.028-2.344 2.5-1.931.722-3.576-.297-3.656-1-.113-.994 1.177-6.53 4-7 1.923-.321 3.651.845 3.651 2.235A7.497 7.497 0 0 1 14 5.277c0-1.39 1.844-2.598 3.767-2.277 2.823.47 4.113 6.006 4 7-.08.703-1.725 1.722-3.656 1-1.261-.472-1.855-1.45-2.239-2.5`,key:`v8hric`}]]),Si=Y(`download`,[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]),Ci=Y(`file-archive`,[[`path`,{d:`M13.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v11.5`,key:`4pqfef`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M8 12v-1`,key:`1ej8lb`}],[`path`,{d:`M8 18v-2`,key:`qcmpov`}],[`path`,{d:`M8 7V6`,key:`1nbb54`}],[`circle`,{cx:`8`,cy:`20`,r:`2`,key:`ckkr5m`}]]),wi=Y(`file-cog`,[[`path`,{d:`M15 8a1 1 0 0 1-1-1V2a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8z`,key:`1ckgky`}],[`path`,{d:`M20 8v12a2 2 0 0 1-2 2h-4.182`,key:`1726p0`}],[`path`,{d:`m3.305 19.53.923-.382`,key:`ao1pio`}],[`path`,{d:`M4 10.592V4a2 2 0 0 1 2-2h8`,key:`1foop0`}],[`path`,{d:`m4.228 16.852-.924-.383`,key:`1fv9zy`}],[`path`,{d:`m5.852 15.228-.383-.923`,key:`1a9hc2`}],[`path`,{d:`m5.852 20.772-.383.924`,key:`1sh9ke`}],[`path`,{d:`m8.148 15.228.383-.923`,key:`4yu6lf`}],[`path`,{d:`m8.53 21.696-.382-.924`,key:`18b0s9`}],[`path`,{d:`m9.773 16.852.922-.383`,key:`ti6xop`}],[`path`,{d:`m9.773 19.148.922.383`,key:`rws47d`}],[`circle`,{cx:`7`,cy:`18`,r:`3`,key:`lvkj7j`}]]),Ti=Y(`file-text`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]),Ei=Y(`fish`,[[`path`,{d:`M6.5 12c.94-3.46 4.94-6 8.5-6 3.56 0 6.06 2.54 7 6-.94 3.47-3.44 6-7 6s-7.56-2.53-8.5-6Z`,key:`15baut`}],[`path`,{d:`M18 12v.5`,key:`18hhni`}],[`path`,{d:`M16 17.93a9.77 9.77 0 0 1 0-11.86`,key:`16dt7o`}],[`path`,{d:`M7 10.67C7 8 5.58 5.97 2.73 5.5c-1 1.5-1 5 .23 6.5-1.24 1.5-1.24 5-.23 6.5C5.58 18.03 7 16 7 13.33`,key:`l9di03`}],[`path`,{d:`M10.46 7.26C10.2 5.88 9.17 4.24 8 3h5.8a2 2 0 0 1 1.98 1.67l.23 1.4`,key:`1kjonw`}],[`path`,{d:`m16.01 17.93-.23 1.4A2 2 0 0 1 13.8 21H9.5a5.96 5.96 0 0 0 1.49-3.98`,key:`1zlm23`}]]),Di=Y(`fold-vertical`,[[`path`,{d:`M12 22v-6`,key:`6o8u61`}],[`path`,{d:`M12 8V2`,key:`1wkif3`}],[`path`,{d:`M4 12H2`,key:`rhcxmi`}],[`path`,{d:`M10 12H8`,key:`s88cx1`}],[`path`,{d:`M16 12h-2`,key:`10asgb`}],[`path`,{d:`M22 12h-2`,key:`14jgyd`}],[`path`,{d:`m15 19-3-3-3 3`,key:`e37ymu`}],[`path`,{d:`m15 5-3 3-3-3`,key:`19d6lf`}]]),Oi=Y(`folder-plus`,[[`path`,{d:`M12 10v6`,key:`1bos4e`}],[`path`,{d:`M9 13h6`,key:`1uhe8q`}],[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),ki=Y(`folder`,[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),Ai=Y(`git-branch`,[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`,key:`1cii5b`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}]]),ji=Y(`git-fork`,[[`circle`,{cx:`12`,cy:`18`,r:`3`,key:`1mpf1b`}],[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`path`,{d:`M18 9v2c0 .6-.4 1-1 1H7c-.6 0-1-.4-1-1V9`,key:`1uq4wg`}],[`path`,{d:`M12 12v3`,key:`158kv8`}]]),Mi=Y(`grid-2x2-x`,[[`path`,{d:`M12 3v17a1 1 0 0 1-1 1H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v6a1 1 0 0 1-1 1H3`,key:`11za1p`}],[`path`,{d:`m16 16 5 5`,key:`8tpb07`}],[`path`,{d:`m16 21 5-5`,key:`193jll`}]]),Ni=Y(`hard-drive`,[[`path`,{d:`M10 16h.01`,key:`1bzywj`}],[`path`,{d:`M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z`,key:`18tbho`}],[`path`,{d:`M21.946 12.013H2.054`,key:`zqlbp7`}],[`path`,{d:`M6 16h.01`,key:`1pmjb7`}]]),Pi=Y(`highlighter`,[[`path`,{d:`m9 11-6 6v3h9l3-3`,key:`1a3l36`}],[`path`,{d:`m22 12-4.6 4.6a2 2 0 0 1-2.8 0l-5.2-5.2a2 2 0 0 1 0-2.8L14 4`,key:`14a9rk`}]]),Fi=Y(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),Ii=Y(`italic`,[[`line`,{x1:`19`,x2:`10`,y1:`4`,y2:`4`,key:`15jd3p`}],[`line`,{x1:`14`,x2:`5`,y1:`20`,y2:`20`,key:`bu0au3`}],[`line`,{x1:`15`,x2:`9`,y1:`4`,y2:`20`,key:`uljnxc`}]]),Li=Y(`layout-grid`,[[`rect`,{width:`7`,height:`7`,x:`3`,y:`3`,rx:`1`,key:`1g98yp`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`3`,rx:`1`,key:`6d4xhi`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`14`,rx:`1`,key:`nxv5o0`}],[`rect`,{width:`7`,height:`7`,x:`3`,y:`14`,rx:`1`,key:`1bb6yr`}]]),Ri=[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7h2`,key:`8i5ue5`}],[`path`,{d:`M15 7h2a5 5 0 1 1 0 10h-2`,key:`1b9ql8`}],[`line`,{x1:`8`,x2:`16`,y1:`12`,y2:`12`,key:`1jonct`}]];Y(`link-2`,Ri);var zi=Y(`link`,[[`path`,{d:`M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71`,key:`1cjeqo`}],[`path`,{d:`M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71`,key:`19qd67`}]]),Bi=Y(`list-collapse`,[[`path`,{d:`M10 5h11`,key:`1hkqpe`}],[`path`,{d:`M10 12h11`,key:`6m4ad9`}],[`path`,{d:`M10 19h11`,key:`14g2nv`}],[`path`,{d:`m3 10 3-3-3-3`,key:`i7pm08`}],[`path`,{d:`m3 20 3-3-3-3`,key:`20gx1n`}]]),Vi=Y(`list-tree`,[[`path`,{d:`M8 5h13`,key:`1pao27`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`M3 10a2 2 0 0 0 2 2h3`,key:`1npucw`}],[`path`,{d:`M3 5v12a2 2 0 0 0 2 2h3`,key:`x1gjn2`}]]),Hi=Y(`log-in`,[[`path`,{d:`m10 17 5-5-5-5`,key:`1bsop3`}],[`path`,{d:`M15 12H3`,key:`6jk70r`}],[`path`,{d:`M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4`,key:`u53s6r`}]]),Ui=Y(`moon`,[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]),Wi=Y(`move-up-right`,[[`path`,{d:`M13 5H19V11`,key:`1n1gyv`}],[`path`,{d:`M19 5L5 19`,key:`72u4yj`}]]),Gi=Y(`network`,[[`rect`,{x:`16`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`4q2zg0`}],[`rect`,{x:`2`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`8cvhb9`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`6`,rx:`1`,key:`1egb70`}],[`path`,{d:`M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3`,key:`1jsf9p`}],[`path`,{d:`M12 12V8`,key:`2874zd`}]]),Ki=Y(`octagon-x`,[[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z`,key:`2d38gg`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]]),qi=Y(`panel-left`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}]]),Ji=Y(`panel-right-close`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}],[`path`,{d:`m8 9 3 3-3 3`,key:`12hl5m`}]]),Yi=Y(`panel-right-open`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}],[`path`,{d:`m10 15-3-3 3-3`,key:`1pgupc`}]]),Xi=Y(`pilcrow`,[[`path`,{d:`M13 4v16`,key:`8vvj80`}],[`path`,{d:`M17 4v16`,key:`7dpous`}],[`path`,{d:`M19 4H9.5a4.5 4.5 0 0 0 0 9H13`,key:`sh4n9v`}]]),Zi=Y(`pin-off`,[[`path`,{d:`M12 17v5`,key:`bb1du9`}],[`path`,{d:`M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89`,key:`znwnzq`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11`,key:`c9qhm2`}]]),Qi=Y(`pin`,[[`path`,{d:`M12 17v5`,key:`bb1du9`}],[`path`,{d:`M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z`,key:`1nkz8b`}]]),$i=Y(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),ea=Y(`rabbit`,[[`path`,{d:`M13 16a3 3 0 0 1 2.24 5`,key:`1epib5`}],[`path`,{d:`M18 12h.01`,key:`yjnet6`}],[`path`,{d:`M18 21h-8a4 4 0 0 1-4-4 7 7 0 0 1 7-7h.2L9.6 6.4a1 1 0 1 1 2.8-2.8L15.8 7h.2c3.3 0 6 2.7 6 6v1a2 2 0 0 1-2 2h-1a3 3 0 0 0-3 3`,key:`ue9ozu`}],[`path`,{d:`M20 8.54V4a2 2 0 1 0-4 0v3`,key:`49iql8`}],[`path`,{d:`M7.612 12.524a3 3 0 1 0-1.6 4.3`,key:`1e33i0`}]]),ta=Y(`rat`,[[`path`,{d:`M13 22H4a2 2 0 0 1 0-4h12`,key:`bt3f23`}],[`path`,{d:`M13.236 18a3 3 0 0 0-2.2-5`,key:`1tbvmo`}],[`path`,{d:`M16 9h.01`,key:`1bdo4e`}],[`path`,{d:`M16.82 3.94a3 3 0 1 1 3.237 4.868l1.815 2.587a1.5 1.5 0 0 1-1.5 2.1l-2.872-.453a3 3 0 0 0-3.5 3`,key:`9ch7kn`}],[`path`,{d:`M17 4.988a3 3 0 1 0-5.2 2.052A7 7 0 0 0 4 14.015 4 4 0 0 0 8 18`,key:`3s7e9i`}]]),na=Y(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),ra=Y(`rows-2`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M3 12h18`,key:`1i2n21`}]]),ia=Y(`save`,[[`path`,{d:`M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z`,key:`1c8476`}],[`path`,{d:`M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7`,key:`1ydtos`}],[`path`,{d:`M7 3v4a1 1 0 0 0 1 1h7`,key:`t51u73`}]]),aa=Y(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),oa=Y(`shrimp`,[[`path`,{d:`M11 12h.01`,key:`1lr4k6`}],[`path`,{d:`M13 22c.5-.5 1.12-1 2.5-1-1.38 0-2-.5-2.5-1`,key:`fatpdi`}],[`path`,{d:`M14 2a3.28 3.28 0 0 1-3.227 1.798l-6.17-.561A2.387 2.387 0 1 0 4.387 8H15.5a1 1 0 0 1 0 13 1 1 0 0 0 0-5H12a7 7 0 0 1-7-7V8`,key:`kehrqe`}],[`path`,{d:`M14 8a8.5 8.5 0 0 1 0 8`,key:`1imjx2`}],[`path`,{d:`M16 16c2 0 4.5-4 4-6`,key:`z0nejz`}]]),sa=Y(`snail`,[[`path`,{d:`M2 13a6 6 0 1 0 12 0 4 4 0 1 0-8 0 2 2 0 0 0 4 0`,key:`hneq2s`}],[`circle`,{cx:`10`,cy:`13`,r:`8`,key:`194lz3`}],[`path`,{d:`M2 21h12c4.4 0 8-3.6 8-8V7a2 2 0 1 0-4 0v6`,key:`ixqyt7`}],[`path`,{d:`M18 3 19.1 5.2`,key:`9tjm43`}],[`path`,{d:`M22 3 20.9 5.2`,key:`j3odrs`}]]),ca=Y(`square-code`,[[`path`,{d:`m10 9-3 3 3 3`,key:`1oro0q`}],[`path`,{d:`m14 15 3-3-3-3`,key:`bz13h7`}],[`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,key:`h1oib`}]]),la=Y(`square-pen`,[[`path`,{d:`M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7`,key:`1m0v6g`}],[`path`,{d:`M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z`,key:`ohrbg2`}]]),ua=Y(`squirrel`,[[`path`,{d:`M15.236 22a3 3 0 0 0-2.2-5`,key:`21bitc`}],[`path`,{d:`M16 20a3 3 0 0 1 3-3h1a2 2 0 0 0 2-2v-2a4 4 0 0 0-4-4V4`,key:`oh0fg0`}],[`path`,{d:`M18 13h.01`,key:`9veqaj`}],[`path`,{d:`M18 6a4 4 0 0 0-4 4 7 7 0 0 0-7 7c0-5 4-5 4-10.5a4.5 4.5 0 1 0-9 0 2.5 2.5 0 0 0 5 0C7 10 3 11 3 17c0 2.8 2.2 5 5 5h10`,key:`980v8a`}]]),da=Y(`strikethrough`,[[`path`,{d:`M16 4H9a3 3 0 0 0-2.83 4`,key:`43sutm`}],[`path`,{d:`M14 12a4 4 0 0 1 0 8H6`,key:`nlfj13`}],[`line`,{x1:`4`,x2:`20`,y1:`12`,y2:`12`,key:`1e0a9i`}]]),fa=Y(`sun`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]),pa=Y(`table-properties`,[[`path`,{d:`M15 3v18`,key:`14nvp0`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M21 9H3`,key:`1338ky`}],[`path`,{d:`M21 15H3`,key:`9uk58r`}]]),ma=Y(`turtle`,[[`path`,{d:`m12 10 2 4v3a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-3a8 8 0 1 0-16 0v3a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-3l2-4h4Z`,key:`1lbbv7`}],[`path`,{d:`M4.82 7.9 8 10`,key:`m9wose`}],[`path`,{d:`M15.18 7.9 12 10`,key:`p8dp2u`}],[`path`,{d:`M16.93 10H20a2 2 0 0 1 0 4H2`,key:`12nsm7`}]]),ha=Y(`underline`,[[`path`,{d:`M6 4v6a6 6 0 0 0 12 0V4`,key:`9kb039`}],[`line`,{x1:`4`,x2:`20`,y1:`20`,y2:`20`,key:`nun2al`}]]),ga=Y(`unfold-vertical`,[[`path`,{d:`M12 22v-6`,key:`6o8u61`}],[`path`,{d:`M12 8V2`,key:`1wkif3`}],[`path`,{d:`M4 12H2`,key:`rhcxmi`}],[`path`,{d:`M10 12H8`,key:`s88cx1`}],[`path`,{d:`M16 12h-2`,key:`10asgb`}],[`path`,{d:`M22 12h-2`,key:`14jgyd`}],[`path`,{d:`m15 19-3 3-3-3`,key:`11eu04`}],[`path`,{d:`m15 5-3-3-3 3`,key:`itvq4r`}]]),_a=Y(`user-cog`,[[`path`,{d:`M10 15H6a4 4 0 0 0-4 4v2`,key:`1nfge6`}],[`path`,{d:`m14.305 16.53.923-.382`,key:`1itpsq`}],[`path`,{d:`m15.228 13.852-.923-.383`,key:`eplpkm`}],[`path`,{d:`m16.852 12.228-.383-.923`,key:`13v3q0`}],[`path`,{d:`m16.852 17.772-.383.924`,key:`1i8mnm`}],[`path`,{d:`m19.148 12.228.383-.923`,key:`1q8j1v`}],[`path`,{d:`m19.53 18.696-.382-.924`,key:`vk1qj3`}],[`path`,{d:`m20.772 13.852.924-.383`,key:`n880s0`}],[`path`,{d:`m20.772 16.148.924.383`,key:`1g6xey`}],[`circle`,{cx:`18`,cy:`15`,r:`3`,key:`gjjjvw`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]),va=Y(`user`,[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`,key:`975kel`}],[`circle`,{cx:`12`,cy:`7`,r:`4`,key:`17ys0d`}]]);function ya(e,t){return e instanceof Error&&e.message?e.message:t}async function ba(e,t,n,r=`action`){try{n(null),await e()}catch(e){console.error(`[${r}] action failed:`,e),n(ya(e,t))}}async function xa(e,t,n=Xt,r=`action`){await ba(e,t,e=>{e!==null&&n.error(e)},r)}function Sa(e){let t=(0,Q.c)(4),n,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,X.jsx)(`title`,{children:`GitHub`}),r=(0,X.jsx)(`path`,{d:`M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12`}),t[0]=n,t[1]=r):(n=t[0],r=t[1]);let i;return t[2]===e?i=t[3]:(i=(0,X.jsxs)(`svg`,{role:`img`,fill:`currentColor`,height:24,width:24,viewBox:`0 0 24 24`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[n,r]}),t[2]=e,t[3]=i),i}function Ca(e){let t=(0,Q.c)(5),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,X.jsx)(`title`,{children:`Open Knowledge icon`}),t[0]=n):n=t[0];let r;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,X.jsxs)(`g`,{filter:`url(#filter0_d_ok)`,children:[(0,X.jsx)(`path`,{d:`M66.8902 16.1017C58.2694 3.86669 46.1739 -0.690239 29.9182 2.17749C21.3995 3.67813 13.4602 9.555 8.67934 17.9009C3.93974 26.1701 2.98514 35.6533 6.05714 43.9166C9.31574 52.6868 16.7168 58.4752 24.2299 63.4231C25.7973 64.4562 26.1351 65.7172 26.3551 68.9896C26.5221 71.4625 26.799 75.6011 30.6842 77.7204C31.8176 78.3372 33.0648 78.6515 34.3946 78.6515C37.0796 78.6515 39.4033 77.3649 40.5189 76.7482C47.1049 73.1046 68.8878 59.7147 72.6453 40.4027C74.3444 31.6679 70.9797 21.9019 66.8922 16.1017H66.8902Z`,fill:`white`}),(0,X.jsx)(`path`,{d:`M37.4214 71.154C28.7888 75.929 36.787 64.0397 27.7458 58.0843C21.6372 54.0616 14.788 49.0568 12.0499 41.6911C6.74463 27.4192 17.5438 10.8473 31.028 8.47262C45.1977 5.97613 54.6946 9.8947 61.6635 19.7844C65.2089 24.8167 67.6013 32.8365 66.3658 39.1828C63.6906 52.9341 49.073 64.7075 37.4214 71.154Z`,fill:`#69A3FF`}),(0,X.jsx)(`path`,{d:`M52.7244 29.2638C53.4665 28.5217 54.6697 28.5217 55.4119 29.2638V29.2638C56.154 30.0059 56.154 31.2091 55.4119 31.9513L49.2589 38.1042L46.5715 35.4167L52.7244 29.2638Z`,fill:`#D5E5FF`}),(0,X.jsx)(`path`,{d:`M55.4119 38.8821C56.154 39.6242 56.154 40.8274 55.4119 41.5696V41.5696C54.6698 42.3117 53.4665 42.3117 52.7244 41.5696L46.5715 35.4166L49.259 32.7292L55.4119 38.8821Z`,fill:`#D5E5FF`})]}),t[1]=r):r=t[1];let i;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,X.jsx)(`defs`,{children:(0,X.jsxs)(`filter`,{id:`filter0_d_ok`,x:`-9.53674e-07`,y:`-0.0799994`,width:`77.3817`,height:`85.8743`,filterUnits:`userSpaceOnUse`,colorInterpolationFilters:`sRGB`,children:[(0,X.jsx)(`feFlood`,{floodOpacity:`0`,result:`BackgroundImageFix`}),(0,X.jsx)(`feColorMatrix`,{in:`SourceAlpha`,type:`matrix`,values:`0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0`,result:`hardAlpha`}),(0,X.jsx)(`feOffset`,{dy:`2.85714`}),(0,X.jsx)(`feGaussianBlur`,{stdDeviation:`2.14286`}),(0,X.jsx)(`feComposite`,{in2:`hardAlpha`,operator:`out`}),(0,X.jsx)(`feColorMatrix`,{type:`matrix`,values:`0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0`}),(0,X.jsx)(`feBlend`,{mode:`normal`,in2:`BackgroundImageFix`,result:`effect1_dropShadow_ok`}),(0,X.jsx)(`feBlend`,{mode:`normal`,in:`SourceGraphic`,in2:`effect1_dropShadow_ok`,result:`shape`})]})}),t[2]=i):i=t[2];let a;return t[3]===e?a=t[4]:(a=(0,X.jsxs)(`svg`,{role:`img`,"aria-label":`Open Knowledge icon`,fill:`none`,height:24,width:24,viewBox:`0 0 78 80`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[n,r,i]}),t[3]=e,t[4]=a),a}function wa(){let e=null,t=null,n=new Set,r=!1,i=null;function a(){for(let e of n)e()}function o(){e!==null&&(e=null,a())}return{install({bridge:n}){if(n)return r?i??void 0:(r=!0,t=n,i=n.mcpWiring.onShow(t=>{e=t,a()}),n.mcpWiring.signalReady(),()=>{i?.(),i=null,r=!1,t=null,o()})},getSnapshot(){return e},subscribe(e){return n.add(e),()=>{n.delete(e)}},async confirm(e){let n=t;if(!n)return{ok:!1,error:`Not attached to desktop bridge`};try{let t=await n.mcpWiring.confirm(e);return t.ok&&o(),t}catch(e){return{ok:!1,error:e instanceof Error?e.message:`Unknown error`}}},async skip(){let e=t;if(!e)return{ok:!1,error:`Not attached to desktop bridge`};try{let t=await e.mcpWiring.skip();return t.ok&&o(),t}catch(e){return{ok:!1,error:e instanceof Error?e.message:`Unknown error`}}},dismiss(){o()}}}var Ta=wa();function Ea(e){return Ta.install(e)}function Da(e){let t=Z.useRef({value:e,previous:e});return Z.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Oa=[`Enter`,` `],ka=[`ArrowDown`,`PageUp`,`Home`],Aa=[`ArrowUp`,`PageDown`,`End`],ja=[...ka,...Aa],Ma={ltr:[...Oa,`ArrowRight`],rtl:[...Oa,`ArrowLeft`]},Na={ltr:[`ArrowLeft`],rtl:[`ArrowRight`]},Pa=`Menu`,[Fa,Ia,La]=we(Pa),[Ra,za]=H(Pa,[La,tn,Ae]),Ba=tn(),Va=Ae(),[Ha,Ua]=Ra(Pa),[Wa,Ga]=Ra(Pa),Ka=e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=Ba(t),[c,l]=Z.useState(null),u=Z.useRef(!1),d=z(a),f=Me(i);return Z.useEffect(()=>{let e=()=>{u.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},t=()=>u.current=!1;return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),(0,X.jsx)($t,{...s,children:(0,X.jsx)(Ha,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:l,children:(0,X.jsx)(Wa,{scope:t,onClose:Z.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:f,modal:o,children:r})})})};Ka.displayName=Pa;var qa=`MenuAnchor`,Ja=Z.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=Ba(n);return(0,X.jsx)(Qt,{...i,...r,ref:t})});Ja.displayName=qa;var Ya=`MenuPortal`,[Xa,Za]=Ra(Ya,{forceMount:void 0}),Qa=e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=Ua(Ya,t);return(0,X.jsx)(Xa,{scope:t,forceMount:n,children:(0,X.jsx)(ie,{present:n||a.open,children:(0,X.jsx)(re,{asChild:!0,container:i,children:r})})})};Qa.displayName=Ya;var $a=`MenuContent`,[eo,to]=Ra($a),no=Z.forwardRef((e,t)=>{let n=Za($a,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=Ua($a,e.__scopeMenu),o=Ga($a,e.__scopeMenu);return(0,X.jsx)(Fa.Provider,{scope:e.__scopeMenu,children:(0,X.jsx)(ie,{present:r||a.open,children:(0,X.jsx)(Fa.Slot,{scope:e.__scopeMenu,children:o.modal?(0,X.jsx)(ro,{...i,ref:t}):(0,X.jsx)(io,{...i,ref:t})})})})}),ro=Z.forwardRef((e,t)=>{let n=Ua($a,e.__scopeMenu),r=Z.useRef(null),i=oe(t,r);return Z.useEffect(()=>{let e=r.current;if(e)return Lt(e)},[]),(0,X.jsx)(oo,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:J(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),io=Z.forwardRef((e,t)=>{let n=Ua($a,e.__scopeMenu);return(0,X.jsx)(oo,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),ao=U(`MenuContent.ScrollLock`),oo=Z.forwardRef((e,t)=>{let{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:m,...h}=e,g=Ua($a,n),_=Ga($a,n),v=Ba(n),y=Va(n),b=Ia(n),[x,S]=Z.useState(null),C=Z.useRef(null),w=oe(t,C,g.onContentChange),T=Z.useRef(0),E=Z.useRef(``),D=Z.useRef(0),O=Z.useRef(null),k=Z.useRef(`right`),A=Z.useRef(0),j=m?Mt:Z.Fragment,M=m?{as:ao,allowPinchZoom:!0}:void 0,N=e=>{let t=E.current+e,n=b().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=Go(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;(function e(t){E.current=t,window.clearTimeout(T.current),t!==``&&(T.current=window.setTimeout(()=>e(``),1e3))})(t),o&&setTimeout(()=>o.focus())};Z.useEffect(()=>()=>window.clearTimeout(T.current),[]),Yt();let P=Z.useCallback(e=>k.current===O.current?.side&&qo(e,O.current?.area),[]);return(0,X.jsx)(eo,{scope:n,searchRef:E,onItemEnter:Z.useCallback(e=>{P(e)&&e.preventDefault()},[P]),onItemLeave:Z.useCallback(e=>{P(e)||(C.current?.focus(),S(null))},[P]),onTriggerLeave:Z.useCallback(e=>{P(e)&&e.preventDefault()},[P]),pointerGraceTimerRef:D,onPointerGraceIntentChange:Z.useCallback(e=>{O.current=e},[]),children:(0,X.jsx)(j,{...M,children:(0,X.jsx)(Zt,{asChild:!0,trapped:i,onMountAutoFocus:J(a,e=>{e.preventDefault(),C.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:(0,X.jsx)(W,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:(0,X.jsx)(Ce,{asChild:!0,...y,dir:_.dir,orientation:`vertical`,loop:r,currentTabStopId:x,onCurrentTabStopIdChange:S,onEntryFocus:J(c,e=>{_.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,X.jsx)(on,{role:`menu`,"aria-orientation":`vertical`,"data-state":Bo(g.open),"data-radix-menu-content":``,dir:_.dir,...v,...h,ref:w,style:{outline:`none`,...h.style},onKeyDown:J(h.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&N(e.key));let i=C.current;if(e.target!==i||!ja.includes(e.key))return;e.preventDefault();let a=b().filter(e=>!e.disabled).map(e=>e.ref.current);Aa.includes(e.key)&&a.reverse(),Uo(a)}),onBlur:J(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(T.current),E.current=``)}),onPointerMove:J(e.onPointerMove,Jo(e=>{let t=e.target,n=A.current!==e.clientX;e.currentTarget.contains(t)&&n&&(k.current=e.clientX>A.current?`right`:`left`,A.current=e.clientX)}))})})})})})})});no.displayName=$a;var so=`MenuGroup`,co=Z.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,X.jsx)(K.div,{role:`group`,...r,ref:t})});co.displayName=so;var lo=`MenuLabel`,uo=Z.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,X.jsx)(K.div,{...r,ref:t})});uo.displayName=lo;var fo=`MenuItem`,po=`menu.itemSelect`,mo=Z.forwardRef((e,t)=>{let{disabled:n=!1,onSelect:r,...i}=e,a=Z.useRef(null),o=Ga(fo,e.__scopeMenu),s=to(fo,e.__scopeMenu),c=oe(t,a),l=Z.useRef(!1),u=()=>{let e=a.current;if(!n&&e){let t=new CustomEvent(po,{bubbles:!0,cancelable:!0});e.addEventListener(po,e=>r?.(e),{once:!0}),te(e,t),t.defaultPrevented?l.current=!1:o.onClose()}};return(0,X.jsx)(ho,{...i,ref:c,disabled:n,onClick:J(e.onClick,u),onPointerDown:t=>{e.onPointerDown?.(t),l.current=!0},onPointerUp:J(e.onPointerUp,e=>{l.current||e.currentTarget?.click()}),onKeyDown:J(e.onKeyDown,e=>{let t=s.searchRef.current!==``;n||t&&e.key===` `||Oa.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});mo.displayName=fo;var ho=Z.forwardRef((e,t)=>{let{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=to(fo,n),s=Va(n),c=Z.useRef(null),l=oe(t,c),[u,d]=Z.useState(!1),[f,p]=Z.useState(``);return Z.useEffect(()=>{let e=c.current;e&&p((e.textContent??``).trim())},[a.children]),(0,X.jsx)(Fa.ItemSlot,{scope:n,disabled:r,textValue:i??f,children:(0,X.jsx)(De,{asChild:!0,...s,focusable:!r,children:(0,X.jsx)(K.div,{role:`menuitem`,"data-highlighted":u?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...a,ref:l,onPointerMove:J(e.onPointerMove,Jo(e=>{r?o.onItemLeave(e):(o.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:J(e.onPointerLeave,Jo(e=>o.onItemLeave(e))),onFocus:J(e.onFocus,()=>d(!0)),onBlur:J(e.onBlur,()=>d(!1))})})})}),go=`MenuCheckboxItem`,_o=Z.forwardRef((e,t)=>{let{checked:n=!1,onCheckedChange:r,...i}=e;return(0,X.jsx)(To,{scope:e.__scopeMenu,checked:n,children:(0,X.jsx)(mo,{role:`menuitemcheckbox`,"aria-checked":Vo(n)?`mixed`:n,...i,ref:t,"data-state":Ho(n),onSelect:J(i.onSelect,()=>r?.(Vo(n)?!0:!n),{checkForDefaultPrevented:!1})})})});_o.displayName=go;var vo=`MenuRadioGroup`,[yo,bo]=Ra(vo,{value:void 0,onValueChange:()=>{}}),xo=Z.forwardRef((e,t)=>{let{value:n,onValueChange:r,...i}=e,a=z(r);return(0,X.jsx)(yo,{scope:e.__scopeMenu,value:n,onValueChange:a,children:(0,X.jsx)(co,{...i,ref:t})})});xo.displayName=vo;var So=`MenuRadioItem`,Co=Z.forwardRef((e,t)=>{let{value:n,...r}=e,i=bo(So,e.__scopeMenu),a=n===i.value;return(0,X.jsx)(To,{scope:e.__scopeMenu,checked:a,children:(0,X.jsx)(mo,{role:`menuitemradio`,"aria-checked":a,...r,ref:t,"data-state":Ho(a),onSelect:J(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});Co.displayName=So;var wo=`MenuItemIndicator`,[To,Eo]=Ra(wo,{checked:!1}),Do=Z.forwardRef((e,t)=>{let{__scopeMenu:n,forceMount:r,...i}=e,a=Eo(wo,n);return(0,X.jsx)(ie,{present:r||Vo(a.checked)||a.checked===!0,children:(0,X.jsx)(K.span,{...i,ref:t,"data-state":Ho(a.checked)})})});Do.displayName=wo;var Oo=`MenuSeparator`,ko=Z.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,X.jsx)(K.div,{role:`separator`,"aria-orientation":`horizontal`,...r,ref:t})});ko.displayName=Oo;var Ao=`MenuArrow`,jo=Z.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=Ba(n);return(0,X.jsx)(rn,{...i,...r,ref:t})});jo.displayName=Ao;var Mo=`MenuSub`,[No,Po]=Ra(Mo),Fo=e=>{let{__scopeMenu:t,children:n,open:r=!1,onOpenChange:i}=e,a=Ua(Mo,t),o=Ba(t),[s,c]=Z.useState(null),[l,u]=Z.useState(null),d=z(i);return Z.useEffect(()=>(a.open===!1&&d(!1),()=>d(!1)),[a.open,d]),(0,X.jsx)($t,{...o,children:(0,X.jsx)(Ha,{scope:t,open:r,onOpenChange:d,content:l,onContentChange:u,children:(0,X.jsx)(No,{scope:t,contentId:ne(),triggerId:ne(),trigger:s,onTriggerChange:c,children:n})})})};Fo.displayName=Mo;var Io=`MenuSubTrigger`,Lo=Z.forwardRef((e,t)=>{let n=Ua(Io,e.__scopeMenu),r=Ga(Io,e.__scopeMenu),i=Po(Io,e.__scopeMenu),a=to(Io,e.__scopeMenu),o=Z.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:c}=a,l={__scopeMenu:e.__scopeMenu},u=Z.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return Z.useEffect(()=>u,[u]),Z.useEffect(()=>{let e=s.current;return()=>{window.clearTimeout(e),c(null)}},[s,c]),(0,X.jsx)(Ja,{asChild:!0,...l,children:(0,X.jsx)(ho,{id:i.triggerId,"aria-haspopup":`menu`,"aria-expanded":n.open,"aria-controls":i.contentId,"data-state":Bo(n.open),...e,ref:ae(t,i.onTriggerChange),onClick:t=>{e.onClick?.(t),!(e.disabled||t.defaultPrevented)&&(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:J(e.onPointerMove,Jo(t=>{a.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!n.open&&!o.current&&(a.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),u()},100))})),onPointerLeave:J(e.onPointerLeave,Jo(e=>{u();let t=n.content?.getBoundingClientRect();if(t){let r=n.content?.dataset.side,i=r===`right`,o=i?-5:5,c=t[i?`left`:`right`],l=t[i?`right`:`left`];a.onPointerGraceIntentChange({area:[{x:e.clientX+o,y:e.clientY},{x:c,y:t.top},{x:l,y:t.top},{x:l,y:t.bottom},{x:c,y:t.bottom}],side:r}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(e),e.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:J(e.onKeyDown,t=>{let i=a.searchRef.current!==``;e.disabled||i&&t.key===` `||Ma[r.dir].includes(t.key)&&(n.onOpenChange(!0),n.content?.focus(),t.preventDefault())})})})});Lo.displayName=Io;var Ro=`MenuSubContent`,zo=Z.forwardRef((e,t)=>{let n=Za($a,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=Ua($a,e.__scopeMenu),o=Ga($a,e.__scopeMenu),s=Po(Ro,e.__scopeMenu),c=Z.useRef(null),l=oe(t,c);return(0,X.jsx)(Fa.Provider,{scope:e.__scopeMenu,children:(0,X.jsx)(ie,{present:r||a.open,children:(0,X.jsx)(Fa.Slot,{scope:e.__scopeMenu,children:(0,X.jsx)(oo,{id:s.contentId,"aria-labelledby":s.triggerId,...i,ref:l,align:`start`,side:o.dir===`rtl`?`left`:`right`,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{o.isUsingKeyboardRef.current&&c.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:J(e.onFocusOutside,e=>{e.target!==s.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:J(e.onEscapeKeyDown,e=>{o.onClose(),e.preventDefault()}),onKeyDown:J(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=Na[o.dir].includes(e.key);t&&n&&(a.onOpenChange(!1),s.trigger?.focus(),e.preventDefault())})})})})})});zo.displayName=Ro;function Bo(e){return e?`open`:`closed`}function Vo(e){return e===`indeterminate`}function Ho(e){return Vo(e)?`indeterminate`:e?`checked`:`unchecked`}function Uo(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Wo(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Go(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=Wo(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function Ko(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function qo(e,t){return t?Ko({x:e.clientX,y:e.clientY},t):!1}function Jo(e){return t=>t.pointerType===`mouse`?e(t):void 0}var Yo=Ka,Xo=Ja,Zo=Qa,Qo=no,$o=co,es=uo,ts=mo,ns=_o,rs=xo,is=Co,as=Do,os=ko,ss=jo,cs=Fo,ls=Lo,us=zo,ds=`DropdownMenu`,[fs,ps]=H(ds,[za]),ms=za(),[hs,gs]=fs(ds),_s=e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=ms(t),l=Z.useRef(null),[u,d]=V({prop:i,defaultProp:a??!1,onChange:o,caller:ds});return(0,X.jsx)(hs,{scope:t,triggerId:ne(),triggerRef:l,contentId:ne(),open:u,onOpenChange:d,onOpenToggle:Z.useCallback(()=>d(e=>!e),[d]),modal:s,children:(0,X.jsx)(Yo,{...c,open:u,onOpenChange:d,dir:r,modal:s,children:n})})};_s.displayName=ds;var vs=`DropdownMenuTrigger`,ys=Z.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=gs(vs,n),o=ms(n);return(0,X.jsx)(Xo,{asChild:!0,...o,children:(0,X.jsx)(K.button,{type:`button`,id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...i,ref:ae(t,a.triggerRef),onPointerDown:J(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:J(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&a.onOpenToggle(),e.key===`ArrowDown`&&a.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})});ys.displayName=vs;var bs=`DropdownMenuPortal`,xs=e=>{let{__scopeDropdownMenu:t,...n}=e,r=ms(t);return(0,X.jsx)(Zo,{...r,...n})};xs.displayName=bs;var Ss=`DropdownMenuContent`,Cs=Z.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=gs(Ss,n),a=ms(n),o=Z.useRef(!1);return(0,X.jsx)(Qo,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:J(e.onCloseAutoFocus,e=>{o.current||i.triggerRef.current?.focus(),o.current=!1,e.preventDefault()}),onInteractOutside:J(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!i.modal||r)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});Cs.displayName=Ss;var ws=`DropdownMenuGroup`,Ts=Z.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=ms(n);return(0,X.jsx)($o,{...i,...r,ref:t})});Ts.displayName=ws;var Es=`DropdownMenuLabel`,Ds=Z.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=ms(n);return(0,X.jsx)(es,{...i,...r,ref:t})});Ds.displayName=Es;var Os=`DropdownMenuItem`,ks=Z.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=ms(n);return(0,X.jsx)(ts,{...i,...r,ref:t})});ks.displayName=Os;var As=`DropdownMenuCheckboxItem`,js=Z.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=ms(n);return(0,X.jsx)(ns,{...i,...r,ref:t})});js.displayName=As;var Ms=`DropdownMenuRadioGroup`,Ns=Z.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=ms(n);return(0,X.jsx)(rs,{...i,...r,ref:t})});Ns.displayName=Ms;var Ps=`DropdownMenuRadioItem`,Fs=Z.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=ms(n);return(0,X.jsx)(is,{...i,...r,ref:t})});Fs.displayName=Ps;var Is=`DropdownMenuItemIndicator`,Ls=Z.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=ms(n);return(0,X.jsx)(as,{...i,...r,ref:t})});Ls.displayName=Is;var Rs=`DropdownMenuSeparator`,zs=Z.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=ms(n);return(0,X.jsx)(os,{...i,...r,ref:t})});zs.displayName=Rs;var Bs=`DropdownMenuArrow`,Vs=Z.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=ms(n);return(0,X.jsx)(ss,{...i,...r,ref:t})});Vs.displayName=Bs;var Hs=e=>{let{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:i,defaultOpen:a}=e,o=ms(t),[s,c]=V({prop:r,defaultProp:a??!1,onChange:i,caller:`DropdownMenuSub`});return(0,X.jsx)(cs,{...o,open:s,onOpenChange:c,children:n})},Us=`DropdownMenuSubTrigger`,Ws=Z.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=ms(n);return(0,X.jsx)(ls,{...i,...r,ref:t})});Ws.displayName=Us;var Gs=`DropdownMenuSubContent`,Ks=Z.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=ms(n);return(0,X.jsx)(us,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});Ks.displayName=Gs;var qs=_s,Js=ys,Ys=xs,Xs=Cs,Zs=Ds,Qs=ks,$s=Ns,ec=Fs,tc=Ls,nc=zs,rc=Hs,ic=Ws,ac=Ks,oc=`Label`,sc=Z.forwardRef((e,t)=>(0,X.jsx)(K.label,{...e,ref:t,onMouseDown:t=>{t.target.closest(`button, input, select, textarea`)||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));sc.displayName=oc;var cc=sc,lc=`Popover`,[uc,dc]=H(lc,[tn]),fc=tn(),[pc,mc]=uc(lc),hc=e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=fc(t),c=Z.useRef(null),[l,u]=Z.useState(!1),[d,f]=V({prop:r,defaultProp:i??!1,onChange:a,caller:lc});return(0,X.jsx)($t,{...s,children:(0,X.jsx)(pc,{scope:t,contentId:ne(),triggerRef:c,open:d,onOpenChange:f,onOpenToggle:Z.useCallback(()=>f(e=>!e),[f]),hasCustomAnchor:l,onCustomAnchorAdd:Z.useCallback(()=>u(!0),[]),onCustomAnchorRemove:Z.useCallback(()=>u(!1),[]),modal:o,children:n})})};hc.displayName=lc;var gc=`PopoverAnchor`,_c=Z.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=mc(gc,n),a=fc(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:s}=i;return Z.useEffect(()=>(o(),()=>s()),[o,s]),(0,X.jsx)(Qt,{...a,...r,ref:t})});_c.displayName=gc;var vc=`PopoverTrigger`,yc=Z.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=mc(vc,n),a=fc(n),o=oe(t,i.triggerRef),s=(0,X.jsx)(K.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.contentId,"data-state":Pc(i.open),...r,ref:o,onClick:J(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:(0,X.jsx)(Qt,{asChild:!0,...a,children:s})});yc.displayName=vc;var bc=`PopoverPortal`,[xc,Sc]=uc(bc,{forceMount:void 0}),Cc=e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=mc(bc,t);return(0,X.jsx)(xc,{scope:t,forceMount:n,children:(0,X.jsx)(ie,{present:n||a.open,children:(0,X.jsx)(re,{asChild:!0,container:i,children:r})})})};Cc.displayName=bc;var wc=`PopoverContent`,Tc=Z.forwardRef((e,t)=>{let n=Sc(wc,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=mc(wc,e.__scopePopover);return(0,X.jsx)(ie,{present:r||a.open,children:a.modal?(0,X.jsx)(Dc,{...i,ref:t}):(0,X.jsx)(Oc,{...i,ref:t})})});Tc.displayName=wc;var Ec=U(`PopoverContent.RemoveScroll`),Dc=Z.forwardRef((e,t)=>{let n=mc(wc,e.__scopePopover),r=Z.useRef(null),i=oe(t,r),a=Z.useRef(!1);return Z.useEffect(()=>{let e=r.current;if(e)return Lt(e)},[]),(0,X.jsx)(Mt,{as:Ec,allowPinchZoom:!0,children:(0,X.jsx)(kc,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:J(e.onCloseAutoFocus,e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:J(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;a.current=t.button===2||n},{checkForDefaultPrevented:!1}),onFocusOutside:J(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),Oc=Z.forwardRef((e,t)=>{let n=mc(wc,e.__scopePopover),r=Z.useRef(!1),i=Z.useRef(!1);return(0,X.jsx)(kc,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),kc=Z.forwardRef((e,t)=>{let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,...d}=e,f=mc(wc,n),p=fc(n);return Yt(),(0,X.jsx)(Zt,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,X.jsx)(W,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>f.onOpenChange(!1),children:(0,X.jsx)(on,{"data-state":Pc(f.open),role:`dialog`,id:f.contentId,...p,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-popover-content-available-width":`var(--radix-popper-available-width)`,"--radix-popover-content-available-height":`var(--radix-popper-available-height)`,"--radix-popover-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-popover-trigger-height":`var(--radix-popper-anchor-height)`}})})})}),Ac=`PopoverClose`,jc=Z.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=mc(Ac,n);return(0,X.jsx)(K.button,{type:`button`,...r,ref:t,onClick:J(e.onClick,()=>i.onOpenChange(!1))})});jc.displayName=Ac;var Mc=`PopoverArrow`,Nc=Z.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=fc(n);return(0,X.jsx)(rn,{...i,...r,ref:t})});Nc.displayName=Mc;function Pc(e){return e?`open`:`closed`}var Fc=hc,Ic=yc,Lc=Cc,Rc=Tc,zc=`Radio`,[Bc,Vc]=H(zc),[Hc,Uc]=Bc(zc),Wc=Z.forwardRef((e,t)=>{let{__scopeRadio:n,name:r,checked:i=!1,required:a,disabled:o,value:s=`on`,onCheck:c,form:l,...u}=e,[d,f]=Z.useState(null),p=oe(t,e=>f(e)),m=Z.useRef(!1),h=d?l||!!d.closest(`form`):!0;return(0,X.jsxs)(Hc,{scope:n,checked:i,disabled:o,children:[(0,X.jsx)(K.button,{type:`button`,role:`radio`,"aria-checked":i,"data-state":Yc(i),"data-disabled":o?``:void 0,disabled:o,value:s,...u,ref:p,onClick:J(e.onClick,e=>{i||c?.(),h&&(m.current=e.isPropagationStopped(),m.current||e.stopPropagation())})}),h&&(0,X.jsx)(Jc,{control:d,bubbles:!m.current,name:r,value:s,checked:i,required:a,disabled:o,form:l,style:{transform:`translateX(-100%)`}})]})});Wc.displayName=zc;var Gc=`RadioIndicator`,Kc=Z.forwardRef((e,t)=>{let{__scopeRadio:n,forceMount:r,...i}=e,a=Uc(Gc,n);return(0,X.jsx)(ie,{present:r||a.checked,children:(0,X.jsx)(K.span,{"data-state":Yc(a.checked),"data-disabled":a.disabled?``:void 0,...i,ref:t})})});Kc.displayName=Gc;var qc=`RadioBubbleInput`,Jc=Z.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...i},a)=>{let o=Z.useRef(null),s=oe(o,a),c=Da(n),l=cn(t);return Z.useEffect(()=>{let e=o.current;if(!e)return;let t=window.HTMLInputElement.prototype,i=Object.getOwnPropertyDescriptor(t,`checked`).set;if(c!==n&&i){let t=new Event(`click`,{bubbles:r});i.call(e,n),e.dispatchEvent(t)}},[c,n,r]),(0,X.jsx)(K.input,{type:`radio`,"aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:s,style:{...i.style,...l,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0}})});Jc.displayName=qc;function Yc(e){return e?`checked`:`unchecked`}var Xc=[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`],Zc=`RadioGroup`,[Qc,$c]=H(Zc,[Ae,Vc]),el=Ae(),tl=Vc(),[nl,rl]=Qc(Zc),il=Z.forwardRef((e,t)=>{let{__scopeRadioGroup:n,name:r,defaultValue:i,value:a,required:o=!1,disabled:s=!1,orientation:c,dir:l,loop:u=!0,onValueChange:d,...f}=e,p=el(n),m=Me(l),[h,g]=V({prop:a,defaultProp:i??null,onChange:d,caller:Zc});return(0,X.jsx)(nl,{scope:n,name:r,required:o,disabled:s,value:h,onValueChange:g,children:(0,X.jsx)(Ce,{asChild:!0,...p,orientation:c,dir:m,loop:u,children:(0,X.jsx)(K.div,{role:`radiogroup`,"aria-required":o,"aria-orientation":c,"data-disabled":s?``:void 0,dir:m,...f,ref:t})})})});il.displayName=Zc;var al=`RadioGroupItem`,ol=Z.forwardRef((e,t)=>{let{__scopeRadioGroup:n,disabled:r,...i}=e,a=rl(al,n),o=a.disabled||r,s=el(n),c=tl(n),l=Z.useRef(null),u=oe(t,l),d=a.value===i.value,f=Z.useRef(!1);return Z.useEffect(()=>{let e=e=>{Xc.includes(e.key)&&(f.current=!0)},t=()=>f.current=!1;return document.addEventListener(`keydown`,e),document.addEventListener(`keyup`,t),()=>{document.removeEventListener(`keydown`,e),document.removeEventListener(`keyup`,t)}},[]),(0,X.jsx)(De,{asChild:!0,...s,focusable:!o,active:d,children:(0,X.jsx)(Wc,{disabled:o,required:a.required,checked:d,...c,...i,name:a.name,ref:u,onCheck:()=>a.onValueChange(i.value),onKeyDown:J(e=>{e.key===`Enter`&&e.preventDefault()}),onFocus:J(i.onFocus,()=>{f.current&&l.current?.click()})})})});ol.displayName=al;var sl=`RadioGroupIndicator`,cl=Z.forwardRef((e,t)=>{let{__scopeRadioGroup:n,...r}=e;return(0,X.jsx)(Kc,{...tl(n),...r,ref:t})});cl.displayName=sl;var ll=il,ul=ol,dl=cl,fl=`Separator`,pl=`horizontal`,ml=[`horizontal`,`vertical`],hl=Z.forwardRef((e,t)=>{let{decorative:n,orientation:r=pl,...i}=e,a=gl(r)?r:pl,o=n?{role:`none`}:{"aria-orientation":a===`vertical`?a:void 0,role:`separator`};return(0,X.jsx)(K.div,{"data-orientation":a,...o,...i,ref:t})});hl.displayName=fl;function gl(e){return ml.includes(e)}var _l=hl,vl=`Switch`,[yl,bl]=H(vl),[xl,Sl]=yl(vl),Cl=Z.forwardRef((e,t)=>{let{__scopeSwitch:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c=`on`,onCheckedChange:l,form:u,...d}=e,[f,p]=Z.useState(null),m=oe(t,e=>p(e)),h=Z.useRef(!1),g=f?u||!!f.closest(`form`):!0,[_,v]=V({prop:i,defaultProp:a??!1,onChange:l,caller:vl});return(0,X.jsxs)(xl,{scope:n,checked:_,disabled:s,children:[(0,X.jsx)(K.button,{type:`button`,role:`switch`,"aria-checked":_,"aria-required":o,"data-state":Ol(_),"data-disabled":s?``:void 0,disabled:s,value:c,...d,ref:m,onClick:J(e.onClick,e=>{v(e=>!e),g&&(h.current=e.isPropagationStopped(),h.current||e.stopPropagation())})}),g&&(0,X.jsx)(Dl,{control:f,bubbles:!h.current,name:r,value:c,checked:_,required:o,disabled:s,form:u,style:{transform:`translateX(-100%)`}})]})});Cl.displayName=vl;var wl=`SwitchThumb`,Tl=Z.forwardRef((e,t)=>{let{__scopeSwitch:n,...r}=e,i=Sl(wl,n);return(0,X.jsx)(K.span,{"data-state":Ol(i.checked),"data-disabled":i.disabled?``:void 0,...r,ref:t})});Tl.displayName=wl;var El=`SwitchBubbleInput`,Dl=Z.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...i},a)=>{let o=Z.useRef(null),s=oe(o,a),c=Da(n),l=cn(t);return Z.useEffect(()=>{let e=o.current;if(!e)return;let t=window.HTMLInputElement.prototype,i=Object.getOwnPropertyDescriptor(t,`checked`).set;if(c!==n&&i){let t=new Event(`click`,{bubbles:r});i.call(e,n),e.dispatchEvent(t)}},[c,n,r]),(0,X.jsx)(`input`,{type:`checkbox`,"aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:s,style:{...i.style,...l,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0}})});Dl.displayName=El;function Ol(e){return e?`checked`:`unchecked`}var kl=Cl,Al=Tl;function jl(e){let t=new Set;for(let n of e)n.detected&&t.add(n.id);return t}function Ml(e,t){let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n}function Nl(e,t){let n=[];for(let r of t)e.has(r.id)&&n.push(r.id);return n}var Pl={error:e=>Xt.error(e)};function Fl(e){let t=(0,Q.c)(9),n;t[0]===e?n=t[1]:(n=e===void 0?{}:e,t[0]=e,t[1]=n);let{store:r,toast:i,payload:a}=n,o=r===void 0?Ta:r,s=i===void 0?Pl:i,c;t[2]!==a||t[3]!==o?(c=a??o.getSnapshot(),t[2]=a,t[3]=o,t[4]=c):c=t[4];let l=c;if(!l)return null;let u;return t[5]!==l||t[6]!==o||t[7]!==s?(u=(0,X.jsx)(Il,{payload:l,store:o,toast:s}),t[5]=l,t[6]=o,t[7]=s,t[8]=u):u=t[8],u}function Il(e){let t=(0,Q.c)(44),{payload:n,store:r,toast:i}=e,a=n.detectedEditors,o;t[0]===a?o=t[1]:(o=()=>jl(a),t[0]=a,t[1]=o);let[s,c]=(0,Z.useState)(o),[l,u]=(0,Z.useState)(!1),d;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(d=function(e){c(t=>Ml(t,e))},t[2]=d):d=t[2];let f=d,p;t[3]!==a||t[4]!==s||t[5]!==r||t[6]!==i?(p=async function(){u(!0);let e=await r.confirm(Nl(s,a));e.ok||(i.error(e.error),u(!1))},t[3]=a,t[4]=s,t[5]=r,t[6]=i,t[7]=p):p=t[7];let m=p,h;t[8]!==r||t[9]!==i?(h=async function(){u(!0);let e=await r.skip();e.ok||(i.error(e.error),u(!1))},t[8]=r,t[9]=i,t[10]=h):h=t[10];let g=h,_;t[11]!==l||t[12]!==g?(_=function(e){!e&&!l&&g()},t[11]=l,t[12]=g,t[13]=_):_=t[13];let v=_,y;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,X.jsxs)(Kt,{children:[(0,X.jsx)(Ft,{children:`Add Open Knowledge to your AI tools`}),(0,X.jsx)(Nt,{children:`Connect Open Knowledge to your AI tools so they can read and write your notes. Once added, asking Claude to summarize or update a page works without copy-paste. Detected editors are preselected — you can toggle any row.`})]}),t[14]=y):y=t[14];let b;if(t[15]!==l||t[16]!==a||t[17]!==s){let e;t[19]!==l||t[20]!==s?(e=e=>{let t=s.has(e.id),n=e.willReplace?`Will replace existing Open Knowledge entry`:e.detected?`Detected on this machine`:`Not detected`,r=e.willReplace?`text-xs text-amber-600 dark:text-amber-400`:`text-xs text-muted-foreground`;return(0,X.jsx)(`li`,{children:(0,X.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-2.5 px-3 py-2.5 text-sm hover:bg-accent`,children:[(0,X.jsx)(`input`,{type:`checkbox`,checked:t,disabled:l,onChange:()=>f(e.id),className:`size-4 shrink-0 rounded accent-primary`,"data-testid":`mcp-consent-checkbox-${e.id}`}),(0,X.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[(0,X.jsx)(`span`,{className:`font-medium text-foreground`,children:e.label}),(0,X.jsx)(`span`,{className:r,"data-testid":`mcp-consent-status-${e.id}`,children:n})]})]})},e.id)},t[19]=l,t[20]=s,t[21]=e):e=t[21],b=a.map(e),t[15]=l,t[16]=a,t[17]=s,t[18]=b}else b=t[18];let x;t[22]===b?x=t[23]:(x=(0,X.jsx)(Ht,{children:(0,X.jsx)(`ul`,{className:`rounded-md border border-border bg-card/50 divide-y divide-border`,children:b})}),t[22]=b,t[23]=x);let S;t[24]===g?S=t[25]:(S=()=>void g(),t[24]=g,t[25]=S);let C;t[26]!==l||t[27]!==S?(C=(0,X.jsx)(q,{variant:`outline`,className:`font-mono uppercase`,onClick:S,disabled:l,"data-testid":`mcp-consent-skip`,children:`Skip`}),t[26]=l,t[27]=S,t[28]=C):C=t[28];let w;t[29]===m?w=t[30]:(w=()=>void m(),t[29]=m,t[30]=w);let T=l||s.size===0,E=l?`Working...`:`Add`,D;t[31]!==w||t[32]!==T||t[33]!==E?(D=(0,X.jsx)(q,{onClick:w,disabled:T,"data-testid":`mcp-consent-add`,children:E}),t[31]=w,t[32]=T,t[33]=E,t[34]=D):D=t[34];let O;t[35]!==C||t[36]!==D?(O=(0,X.jsxs)(Ut,{children:[C,D]}),t[35]=C,t[36]=D,t[37]=O):O=t[37];let k;t[38]!==O||t[39]!==x?(k=(0,X.jsxs)(zt,{className:`sm:max-w-md`,children:[y,x,O]}),t[38]=O,t[39]=x,t[40]=k):k=t[40];let A;return t[41]!==v||t[42]!==k?(A=(0,X.jsx)(qt,{open:!0,onOpenChange:v,children:k}),t[41]=v,t[42]=k,t[43]=A):A=t[43],A}var Ll=(0,Z.lazy)(()=>n(()=>import(`./McpConsentDialogBody-Csjet19t.js`),[],import.meta.url));function Rl(){let e=(0,Q.c)(1);if(!(0,Z.useSyncExternalStore)(Ta.subscribe,Bl,zl))return null;let t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,X.jsx)(Z.Suspense,{fallback:null,children:(0,X.jsx)(Ll,{})}),e[0]=t):t=e[0],t}function zl(){return!1}function Bl(){return Ta.getSnapshot()!==null}var Vl=B(`group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3! font-mono uppercase`,{variants:{variant:{default:`bg-primary text-primary-foreground [a]:hover:bg-primary/80`,secondary:`bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80`,warning:`bg-yellow-500/10 text-yellow-600 [a]:hover:bg-yellow-500/20`,destructive:`bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20`,outline:`border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground`,ghost:`hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50`,link:`text-primary underline-offset-4 hover:underline`,dashed:`border-dashed border-border text-muted-foreground rounded-sm`}},defaultVariants:{variant:`default`}});function Hl(e){let t=(0,Q.c)(13),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:n,variant:i,asChild:a,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=i===void 0?`default`:i,s=a!==void 0&&a?ee:`span`,c;t[5]!==n||t[6]!==o?(c=G(Vl({variant:o}),n),t[5]=n,t[6]=o,t[7]=c):c=t[7];let l;return t[8]!==s||t[9]!==r||t[10]!==c||t[11]!==o?(l=(0,X.jsx)(s,{"data-slot":`badge`,"data-variant":o,className:c,...r}),t[8]=s,t[9]=r,t[10]=c,t[11]=o,t[12]=l):l=t[12],l}var Ul=(e,t,n)=>ba(e,t,n,`NavigatorApp`);function Wl(e){let t=(0,Q.c)(41),{bridge:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=[],t[0]=r):r=t[0];let[i,a]=(0,Z.useState)(r),[o,s]=(0,Z.useState)(!0),[c,l]=(0,Z.useState)(null),u;t[1]===n.project?u=t[2]:(u=()=>{let e=!1;return n.project.listRecent().then(t=>{e||a(t)}).catch(t=>{console.error(`[NavigatorApp] listRecent failed:`,t),e||l(t instanceof Error?t.message:`Failed to load recent projects.`)}).finally(()=>{e||s(!1)}),()=>{e=!0}},t[1]=n.project,t[2]=u);let d;t[3]===n?d=t[4]:(d=[n],t[3]=n,t[4]=d),(0,Z.useEffect)(u,d);let f;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(f=(e,t)=>Ul(e,t,l),t[5]=f):f=t[5];let p=f,m;t[6]===n?m=t[7]:(m=()=>p(async()=>{let e=await n.dialog.openFolder();e&&await ql(n,e)},`Failed to clone from GitHub.`),t[6]=n,t[7]=m);let h=m,g;t[8]===n?g=t[9]:(g=()=>p(async()=>{let e=await n.dialog.openFolder();e&&await ql(n,e)},`Failed to open folder.`),t[8]=n,t[9]=g);let _=g,v;t[10]===n?v=t[11]:(v=()=>p(async()=>{let e=await n.dialog.createFolder();e&&await ql(n,e)},`Failed to create project folder.`),t[10]=n,t[11]=v);let y=v,b;t[12]===n?b=t[13]:(b=e=>p(async()=>{await ql(n,e)},`Failed to open project.`),t[12]=n,t[13]=b);let x=b,S=`flex h-screen w-screen flex-col overflow-hidden bg-primary-foreground dark:bg-background p-12 pb-2 text-foreground max-w-5xl space-y-10 mx-auto ${!o&&i.length===0?`justify-center`:``}`,C;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,X.jsx)(Ca,{className:`size-12 shrink-0`}),t[14]=C):C=t[14];let w;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,X.jsx)(`h1`,{className:`font-medium text-xl tracking-tight`,children:`Open Knowledge`}),t[15]=w):w=t[15];let T;t[16]===n.appVersion?T=t[17]:(T=(0,X.jsxs)(`header`,{className:`shrink-0 flex-wrap flex items-center gap-2.5`,children:[C,(0,X.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[w,(0,X.jsxs)(`p`,{className:`text-muted-foreground text-xs font-mono`,children:[`v`,n.appVersion]})]})]}),t[16]=n.appVersion,t[17]=T);let E;t[18]===h?E=t[19]:(E=(0,X.jsx)(Gl,{title:`Clone from GitHub`,description:`Bring a remote repository onto this machine.`,onClick:h,dataTestId:`nav-clone`,Icon:Sa}),t[18]=h,t[19]=E);let D;t[20]===_?D=t[21]:(D=(0,X.jsx)(Gl,{title:`Open folder on disk`,description:`Open an existing folder as a project.`,onClick:_,dataTestId:`nav-open`,Icon:rt}),t[20]=_,t[21]=D);let O;t[22]===y?O=t[23]:(O=(0,X.jsx)(Gl,{title:`Start fresh`,description:`Create a new folder for a brand-new project.`,onClick:y,dataTestId:`nav-fresh`,Icon:$i}),t[22]=y,t[23]=O);let k;t[24]!==E||t[25]!==D||t[26]!==O?(k=(0,X.jsxs)(`section`,{className:`grid shrink-0 sm:grid-cols-3 gap-3`,children:[E,D,O]}),t[24]=E,t[25]=D,t[26]=O,t[27]=k):k=t[27];let A;t[28]===c?A=t[29]:(A=c===null?null:(0,X.jsxs)(`div`,{className:`mb-3 flex shrink-0 items-start justify-between gap-3 rounded-md border border-red-500/30 bg-red-500/10 px-3 py-2`,"data-testid":`nav-error-banner`,role:`alert`,children:[(0,X.jsx)(`span`,{className:`text-red-700 text-xs dark:text-red-300`,children:c}),(0,X.jsx)(`button`,{type:`button`,onClick:()=>l(null),className:`text-red-700 text-xs underline hover:no-underline dark:text-red-300`,"data-testid":`nav-error-dismiss`,children:`Dismiss`})]}),t[28]=c,t[29]=A);let j;t[30]!==o||t[31]!==x||t[32]!==i?(j=o?(0,X.jsx)(`section`,{className:`flex min-h-0 flex-1 flex-col`,children:(0,X.jsx)(`div`,{className:`flex items-center justify-center h-full`,children:(0,X.jsx)(lt,{className:`size-4 animate-spin text-muted-foreground/60`})})}):i.length>0?(0,X.jsxs)(`section`,{className:`flex min-h-0 flex-1 flex-col`,children:[(0,X.jsx)(`h2`,{className:`mb-2 shrink-0 font-medium text-muted-foreground font-mono text-xs uppercase tracking-wide`,children:`Recent`}),(0,X.jsx)(`ul`,{className:`min-h-0 flex-1 subtle-scrollbar overflow-y-auto space-y-0.5 -mx-4`,"data-testid":`nav-recent-list`,children:i.map(e=>(0,X.jsx)(Kl,{project:e,onOpen:()=>x(e.path)},e.path))})]}):null,t[30]=o,t[31]=x,t[32]=i,t[33]=j):j=t[33];let M;t[34]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,X.jsx)(Rl,{}),t[34]=M):M=t[34];let N;return t[35]!==T||t[36]!==k||t[37]!==A||t[38]!==j||t[39]!==S?(N=(0,X.jsxs)(`div`,{className:S,children:[T,k,A,j,M]}),t[35]=T,t[36]=k,t[37]=A,t[38]=j,t[39]=S,t[40]=N):N=t[40],N}function Gl(e){let t=(0,Q.c)(14),{title:n,description:r,onClick:i,dataTestId:a,Icon:o}=e,s;t[0]===o?s=t[1]:(s=o?(0,X.jsx)(o,{className:`size-4 shrink-0 text-muted-foreground`}):null,t[0]=o,t[1]=s);let c;t[2]===n?c=t[3]:(c=(0,X.jsx)(`span`,{className:`font-medium text-gray-700 dark:text-foreground text-sm`,children:n}),t[2]=n,t[3]=c);let l;t[4]!==s||t[5]!==c?(l=(0,X.jsxs)(`div`,{className:`flex items-center gap-2`,children:[s,c]}),t[4]=s,t[5]=c,t[6]=l):l=t[6];let u;t[7]===r?u=t[8]:(u=(0,X.jsx)(`span`,{className:`text-muted-foreground text-xs leading-snug`,children:r}),t[7]=r,t[8]=u);let d;return t[9]!==a||t[10]!==i||t[11]!==l||t[12]!==u?(d=(0,X.jsxs)(`button`,{type:`button`,onClick:i,"data-testid":a,className:`flex flex-col items-start gap-1.5 rounded-lg border border-border bg-card py-3.5 px-4 text-left transition-colors hover:bg-accent`,children:[l,u]}),t[9]=a,t[10]=i,t[11]=l,t[12]=u,t[13]=d):d=t[13],d}function Kl(e){let t=(0,Q.c)(17),{project:n,onOpen:r}=e,i=`flex items-center justify-between ${n.missing?`opacity-50`:``}`,a;t[0]===n.name?a=t[1]:(a=(0,X.jsx)(`span`,{className:`font-medium text-sm text-gray-700 dark:text-foreground`,children:n.name}),t[0]=n.name,t[1]=a);let o;t[2]===n.path?o=t[3]:(o=(0,X.jsx)(`span`,{className:`truncate w-full text-muted-foreground text-xs`,children:n.path}),t[2]=n.path,t[3]=o);let s;t[4]!==a||t[5]!==o?(s=(0,X.jsxs)(`div`,{className:`flex flex-col gap-1 truncate`,children:[a,o]}),t[4]=a,t[5]=o,t[6]=s):s=t[6];let c;t[7]===n.missing?c=t[8]:(c=n.missing?(0,X.jsx)(Hl,{className:`text-2xs rounded-sm`,variant:`warning`,children:`Missing`}):null,t[7]=n.missing,t[8]=c);let l;t[9]!==r||t[10]!==n.missing||t[11]!==s||t[12]!==c?(l=(0,X.jsxs)(`button`,{type:`button`,onClick:r,disabled:n.missing,className:`flex min-w-0 flex-1 items-center text-left disabled:cursor-not-allowed py-3.5 px-4 hover:bg-accent rounded-lg gap-2 justify-between`,children:[s,c]}),t[9]=r,t[10]=n.missing,t[11]=s,t[12]=c,t[13]=l):l=t[13];let u;return t[14]!==i||t[15]!==l?(u=(0,X.jsx)(`li`,{className:i,children:l}),t[14]=i,t[15]=l,t[16]=u):u=t[16],u}async function ql(e,t){await e.project.open({path:t,target:`new-window`})}var Jl=e=>{let t=(0,Q.c)(8),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let{theme:r}=T(),i=r===void 0?`system`:r,a,o;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(a={success:(0,X.jsx)(Te,{className:`size-4`}),info:(0,X.jsx)(Fi,{className:`size-4`}),warning:(0,X.jsx)(Oe,{className:`size-4`}),error:(0,X.jsx)(Ki,{className:`size-4`}),loading:(0,X.jsx)(lt,{className:`size-4 animate-spin`})},o={"--normal-bg":`var(--popover)`,"--normal-text":`var(--popover-foreground)`,"--normal-border":`var(--border)`,"--border-radius":`var(--radius)`},t[2]=a,t[3]=o):(a=t[2],o=t[3]);let s;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(s={classNames:{toast:`cn-toast`}},t[4]=s):s=t[4];let c;return t[5]!==n||t[6]!==i?(c=(0,X.jsx)(Pt,{theme:i,className:`toaster group`,icons:a,style:o,toastOptions:s,...n}),t[5]=n,t[6]=i,t[7]=c):c=t[7],c};function Yl(e){let{apiOrigin:t}=e;if(!t)return;let n=Symbol.for(`ok.desktop.fetchRewrite`);if(window.fetch[n])return;let r=window.fetch.bind(window),i=((e,n)=>{if(typeof e==`string`)return r(Xl(e,t),n);if(e instanceof URL)return e.pathname.startsWith(`/api/`)&&(e.origin===window.location.origin||e.protocol===`file:`)?r(t+(e.pathname+e.search+e.hash),n):r(e,n);try{let i=new URL(e.url,window.location.origin);if(i.pathname.startsWith(`/api/`)){let a=i.pathname+i.search+i.hash;return r(new Request(t+a,e),n)}}catch{}return r(e,n)});i[n]=!0,window.fetch=i}function Xl(e,t){return e.startsWith(`/api/`)?t+e:e}function Zl(e){return`#/${encodeURIComponent(e)}`}function Ql(e){let t=e.bridge;if(!t)return;let n=e.setHash??(e=>{window.location.hash=e});return t.onDeepLink(e=>{n(Zl(e.doc))})}function $l(e){let t=e.bridge;if(!t)return;let n=e.toastImpl??(e=>Xt.info(e));return t.onGitInitNotice(e=>{n(`Initialized git repo at ${e.gitDir}`)})}var eu=`Update ready`,tu=`Relaunch`,nu=`Release notes`,ru=`Updates paused`,iu=`Download`,au=`Relaunch failed — please restart manually`;function ou(e){return`Updated to v${e}`}var su=0,cu=1,lu=2,uu=3;function du(e,t,n=()=>{}){let r=[];return r.push(e.onUpdateDownloaded(({version:r})=>{let i=`update-downloaded-${r}`;t({id:i,body:eu,priority:lu,action:{label:tu,onClick:()=>{e.update.relaunchNow().then(()=>{n(i)},()=>{t({id:`relaunch-error-${r}`,body:au,variant:`error`,priority:cu})})}}})})),r.push(e.onWhatsNew(({version:n,releaseUrl:r})=>{t({id:`whats-new-${n}`,body:ou(n),priority:uu,action:{label:nu,onClick:()=>{e.shell.openExternal(r)}}})})),r.push(e.onUpdateStuckHint(({downloadUrl:n})=>{t({id:`update-stuck-hint`,body:ru,priority:su,action:{label:iu,onClick:()=>{e.shell.openExternal(n)}}})})),()=>{for(let e of r)e()}}var fu=[],pu=new Set,mu=!1;function hu(){for(let e of pu)e()}function gu(e){let t=fu.findIndex(t=>t.id===e.id);if(t===-1)fu=[...fu,e];else{let n=fu.slice();n[t]=e,fu=n}hu()}function _u(e){let t=fu.filter(t=>t.id!==e);t.length!==fu.length&&(fu=t,hu())}function vu(){return fu}function yu(e){return pu.add(e),()=>{pu.delete(e)}}function bu(){if(mu||typeof window>`u`)return;let e=window.okDesktop;e&&(mu=!0,du(e,gu,_u))}var xu=1,Su=.9,Cu=.8,wu=.17,Tu=.1,Eu=.999,Du=.9999,Ou=.99,ku=/[\\\/_+.#"@\[\(\{&]/,Au=/[\\\/_+.#"@\[\(\{&]/g,ju=/[\s-]/,Mu=/[\s-]/g;function Nu(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?xu:Ou;var s=`${i},${a}`;if(o[s]!==void 0)return o[s];for(var c=r.charAt(a),l=n.indexOf(c,i),u=0,d,f,p,m;l>=0;)d=Nu(e,t,n,r,l+1,a+1,o),d>u&&(l===i?d*=xu:ku.test(e.charAt(l-1))?(d*=Cu,p=e.slice(i,l-1).match(Au),p&&i>0&&(d*=Eu**+p.length)):ju.test(e.charAt(l-1))?(d*=Su,m=e.slice(i,l-1).match(Mu),m&&i>0&&(d*=Eu**+m.length)):(d*=wu,i>0&&(d*=Eu**+(l-i))),e.charAt(l)!==t.charAt(a)&&(d*=Du)),(d<Tu&&n.charAt(l-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(l-1)!==r.charAt(a))&&(f=Nu(e,t,n,r,l+1,a+2,o),f*Tu>d&&(d=f*Tu)),d>u&&(u=d),l=n.indexOf(c,l+1);return o[s]=u,u}function Pu(e){return e.toLowerCase().replace(Mu,` `)}function Fu(e,t,n){return e=n&&n.length>0?`${e+` `+n.join(` `)}`:e,Nu(e,t,Pu(e),Pu(t),0,0,{})}var Iu=`[cmdk-group=""]`,Lu=`[cmdk-group-items=""]`,Ru=`[cmdk-group-heading=""]`,zu=`[cmdk-item=""]`,Bu=`${zu}:not([aria-disabled="true"])`,Vu=`cmdk-item-select`,Hu=`data-value`,Uu=(e,t,n)=>Fu(e,t,n),Wu=Z.createContext(void 0),Gu=()=>Z.useContext(Wu),Ku=Z.createContext(void 0),qu=()=>Z.useContext(Ku),Ju=Z.createContext(void 0),Yu=Z.forwardRef((e,t)=>{let n=ld(()=>({search:``,value:e.value??e.defaultValue??``,selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}})),r=ld(()=>new Set),i=ld(()=>new Map),a=ld(()=>new Map),o=ld(()=>new Set),s=sd(e),{label:c,children:l,value:u,onValueChange:d,filter:f,shouldFilter:p,loop:m,disablePointerSelection:h=!1,vimBindings:g=!0,..._}=e,v=ne(),y=ne(),b=ne(),x=Z.useRef(null),S=fd();cd(()=>{if(u!==void 0){let e=u.trim();n.current.value=e,C.emit()}},[u]),cd(()=>{S(6,k)},[]);let C=Z.useMemo(()=>({subscribe:e=>(o.current.add(e),()=>o.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var i,a,o;if(!Object.is(n.current[e],t)){if(n.current[e]=t,e===`search`)O(),E(),S(1,D);else if(e===`value`){if(document.activeElement.hasAttribute(`cmdk-input`)||document.activeElement.hasAttribute(`cmdk-root`)){let e=document.getElementById(b);e?e.focus():(i=document.getElementById(v))==null||i.focus()}if(S(7,()=>{n.current.selectedItemId=A()?.id,C.emit()}),r||S(5,k),s.current?.value!==void 0){let e=t??``;(o=(a=s.current).onValueChange)==null||o.call(a,e);return}}C.emit()}},emit:()=>{o.current.forEach(e=>e())}}),[]),w=Z.useMemo(()=>({value:(e,t,r)=>{t!==a.current.get(e)?.value&&(a.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,T(t,r)),S(2,()=>{E(),C.emit()}))},item:(e,t)=>(r.current.add(e),t&&(i.current.has(t)?i.current.get(t).add(e):i.current.set(t,new Set([e]))),S(3,()=>{O(),E(),n.current.value||D(),C.emit()}),()=>{a.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=A();S(4,()=>{O(),t?.getAttribute(`id`)===e&&D(),C.emit()})}),group:e=>(i.current.has(e)||i.current.set(e,new Set),()=>{a.current.delete(e),i.current.delete(e)}),filter:()=>s.current.shouldFilter,label:c||e[`aria-label`],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:v,inputId:b,labelId:y,listInnerRef:x}),[]);function T(e,t){let r=s.current?.filter??Uu;return e?r(e,n.current.search,t):0}function E(){if(!n.current.search||s.current.shouldFilter===!1)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach(n=>{let r=i.current.get(n),a=0;r.forEach(t=>{let n=e.get(t);a=Math.max(n,a)}),t.push([n,a])});let r=x.current;j().sort((t,n)=>{let r=t.getAttribute(`id`),i=n.getAttribute(`id`);return(e.get(i)??0)-(e.get(r)??0)}).forEach(e=>{let t=e.closest(Lu);t?t.appendChild(e.parentElement===t?e:e.closest(`${Lu} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${Lu} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{let t=x.current?.querySelector(`${Iu}[${Hu}="${encodeURIComponent(e[0])}"]`);t?.parentElement.appendChild(t)})}function D(){let e=j().find(e=>e.getAttribute(`aria-disabled`)!==`true`)?.getAttribute(Hu);C.setState(`value`,e||void 0)}function O(){if(!n.current.search||s.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let e=0;for(let t of r.current){let r=T(a.current.get(t)?.value??``,a.current.get(t)?.keywords??[]);n.current.filtered.items.set(t,r),r>0&&e++}for(let[e,t]of i.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=e}function k(){var e;let t=A();t&&(t.parentElement?.firstChild===t&&((e=t.closest(Iu)?.querySelector(Ru))==null||e.scrollIntoView({block:`nearest`})),t.scrollIntoView({block:`nearest`}))}function A(){return x.current?.querySelector(`${zu}[aria-selected="true"]`)}function j(){return Array.from(x.current?.querySelectorAll(Bu)||[])}function M(e){let t=j()[e];t&&C.setState(`value`,t.getAttribute(Hu))}function N(e){var t;let n=A(),r=j(),i=r.findIndex(e=>e===n),a=r[i+e];(t=s.current)!=null&&t.loop&&(a=i+e<0?r[r.length-1]:i+e===r.length?r[0]:r[i+e]),a&&C.setState(`value`,a.getAttribute(Hu))}function P(e){let t=A()?.closest(Iu),n;for(;t&&!n;)t=e>0?ad(t,Iu):od(t,Iu),n=t?.querySelector(Bu);n?C.setState(`value`,n.getAttribute(Hu)):N(e)}let F=()=>M(j().length-1),I=e=>{e.preventDefault(),e.metaKey?F():e.altKey?P(1):N(1)},L=e=>{e.preventDefault(),e.metaKey?M(0):e.altKey?P(-1):N(-1)};return Z.createElement(K.div,{ref:t,tabIndex:-1,..._,"cmdk-root":``,onKeyDown:e=>{var t;(t=_.onKeyDown)==null||t.call(_,e);let n=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||n))switch(e.key){case`n`:case`j`:g&&e.ctrlKey&&I(e);break;case`ArrowDown`:I(e);break;case`p`:case`k`:g&&e.ctrlKey&&L(e);break;case`ArrowUp`:L(e);break;case`Home`:e.preventDefault(),M(0);break;case`End`:e.preventDefault(),F();break;case`Enter`:{e.preventDefault();let t=A();if(t){let e=new Event(Vu);t.dispatchEvent(e)}}}}},Z.createElement(`label`,{"cmdk-label":``,htmlFor:w.inputId,id:w.labelId,style:hd},c),md(e,e=>Z.createElement(Ku.Provider,{value:C},Z.createElement(Wu.Provider,{value:w},e))))}),Xu=Z.forwardRef((e,t)=>{let n=ne(),r=Z.useRef(null),i=Z.useContext(Ju),a=Gu(),o=sd(e),s=o.current?.forceMount??i?.forceMount;cd(()=>{if(!s)return a.item(n,i?.id)},[s]);let c=dd(n,r,[e.value,e.children,r],e.keywords),l=qu(),u=ud(e=>e.value&&e.value===c.current),d=ud(e=>s||a.filter()===!1?!0:e.search?e.filtered.items.get(n)>0:!0);Z.useEffect(()=>{let t=r.current;if(!(!t||e.disabled))return t.addEventListener(Vu,f),()=>t.removeEventListener(Vu,f)},[d,e.onSelect,e.disabled]);function f(){var e,t;p(),(t=(e=o.current).onSelect)==null||t.call(e,c.current)}function p(){l.setState(`value`,c.current,!0)}if(!d)return null;let{disabled:m,value:h,onSelect:g,forceMount:_,keywords:v,...y}=e;return Z.createElement(K.div,{ref:ae(r,t),...y,id:n,"cmdk-item":``,role:`option`,"aria-disabled":!!m,"aria-selected":!!u,"data-disabled":!!m,"data-selected":!!u,onPointerMove:m||a.getDisablePointerSelection()?void 0:p,onClick:m?void 0:f},e.children)}),Zu=Z.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...a}=e,o=ne(),s=Z.useRef(null),c=Z.useRef(null),l=ne(),u=Gu(),d=ud(e=>i||u.filter()===!1?!0:e.search?e.filtered.groups.has(o):!0);cd(()=>u.group(o),[]),dd(o,s,[e.value,e.heading,c]);let f=Z.useMemo(()=>({id:o,forceMount:i}),[i]);return Z.createElement(K.div,{ref:ae(s,t),...a,"cmdk-group":``,role:`presentation`,hidden:d?void 0:!0},n&&Z.createElement(`div`,{ref:c,"cmdk-group-heading":``,"aria-hidden":!0,id:l},n),md(e,e=>Z.createElement(`div`,{"cmdk-group-items":``,role:`group`,"aria-labelledby":n?l:void 0},Z.createElement(Ju.Provider,{value:f},e))))}),Qu=Z.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=Z.useRef(null),a=ud(e=>!e.search);return!n&&!a?null:Z.createElement(K.div,{ref:ae(i,t),...r,"cmdk-separator":``,role:`separator`})}),$u=Z.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,a=qu(),o=ud(e=>e.search),s=ud(e=>e.selectedItemId),c=Gu();return Z.useEffect(()=>{e.value!=null&&a.setState(`search`,e.value)},[e.value]),Z.createElement(K.input,{ref:t,...r,"cmdk-input":``,autoComplete:`off`,autoCorrect:`off`,spellCheck:!1,"aria-autocomplete":`list`,role:`combobox`,"aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":s,id:c.inputId,type:`text`,value:i?e.value:o,onChange:e=>{i||a.setState(`search`,e.target.value),n?.(e.target.value)}})}),ed=Z.forwardRef((e,t)=>{let{children:n,label:r=`Suggestions`,...i}=e,a=Z.useRef(null),o=Z.useRef(null),s=ud(e=>e.selectedItemId),c=Gu();return Z.useEffect(()=>{if(o.current&&a.current){let e=o.current,t=a.current,n,r=new ResizeObserver(()=>{n=requestAnimationFrame(()=>{let n=e.offsetHeight;t.style.setProperty(`--cmdk-list-height`,n.toFixed(1)+`px`)})});return r.observe(e),()=>{cancelAnimationFrame(n),r.unobserve(e)}}},[]),Z.createElement(K.div,{ref:ae(a,t),...i,"cmdk-list":``,role:`listbox`,tabIndex:-1,"aria-activedescendant":s,"aria-label":r,id:c.listId},md(e,e=>Z.createElement(`div`,{ref:ae(o,c.listInnerRef),"cmdk-list-sizer":``},e)))}),td=Z.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:a,container:o,...s}=e;return Z.createElement(Vt,{open:n,onOpenChange:r},Z.createElement(Wt,{container:o},Z.createElement(It,{"cmdk-overlay":``,className:i}),Z.createElement(Jt,{"aria-label":e.label,"cmdk-dialog":``,className:a},Z.createElement(Yu,{ref:t,...s}))))}),nd=Z.forwardRef((e,t)=>ud(e=>e.filtered.count===0)?Z.createElement(K.div,{ref:t,...e,"cmdk-empty":``,role:`presentation`}):null),rd=Z.forwardRef((e,t)=>{let{progress:n,children:r,label:i=`Loading...`,...a}=e;return Z.createElement(K.div,{ref:t,...a,"cmdk-loading":``,role:`progressbar`,"aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},md(e,e=>Z.createElement(`div`,{"aria-hidden":!0},e)))}),id=Object.assign(Yu,{List:ed,Item:Xu,Input:$u,Group:Zu,Separator:Qu,Dialog:td,Empty:nd,Loading:rd});function ad(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function od(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function sd(e){let t=Z.useRef(e);return cd(()=>{t.current=e}),t}var cd=typeof window>`u`?Z.useEffect:Z.useLayoutEffect;function ld(e){let t=Z.useRef();return t.current===void 0&&(t.current=e()),t}function ud(e){let t=qu(),n=()=>e(t.snapshot());return Z.useSyncExternalStore(t.subscribe,n,n)}function dd(e,t,n,r=[]){let i=Z.useRef(),a=Gu();return cd(()=>{var o;let s=(()=>{for(let e of n){if(typeof e==`string`)return e.trim();if(typeof e==`object`&&`current`in e)return e.current?e.current.textContent?.trim():i.current}})(),c=r.map(e=>e.trim());a.value(e,s,c),(o=t.current)==null||o.setAttribute(Hu,s),i.current=s}),i}var fd=()=>{let[e,t]=Z.useState(),n=ld(()=>new Map);return cd(()=>{n.current.forEach(e=>e()),n.current=new Map},[e]),(e,r)=>{n.current.set(e,r),t({})}};function pd(e){let t=e.type;return typeof t==`function`?t(e.props):`render`in t?t.render(e.props):e}function md({asChild:e,children:t},n){return e&&Z.isValidElement(t)?Z.cloneElement(pd(t),{ref:t.ref},n(t.props.children)):n(t)}var hd={position:`absolute`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`};function gd(e){let t=(0,Q.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=G(`flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,X.jsx)(id,{"data-slot":`command`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function _d(e){let t=(0,Q.c)(26),n,r,i,a,o,s;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6]):({title:a,description:o,children:n,className:r,showCloseButton:s,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s);let c=a===void 0?`Command Palette`:a,l=o===void 0?`Search for a command to run…`:o,u=s===void 0?!0:s,d;t[7]===c?d=t[8]:(d=(0,X.jsx)(Ft,{children:c}),t[7]=c,t[8]=d);let f;t[9]===l?f=t[10]:(f=(0,X.jsx)(Nt,{children:l}),t[9]=l,t[10]=f);let p;t[11]!==d||t[12]!==f?(p=(0,X.jsxs)(Kt,{className:`sr-only`,children:[d,f]}),t[11]=d,t[12]=f,t[13]=p):p=t[13];let m;t[14]===r?m=t[15]:(m=G(`overflow-hidden p-0`,r),t[14]=r,t[15]=m);let h;t[16]===n?h=t[17]:(h=(0,X.jsx)(gd,{className:`[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5`,children:n}),t[16]=n,t[17]=h);let g;t[18]!==u||t[19]!==m||t[20]!==h?(g=(0,X.jsx)(zt,{className:m,showCloseButton:u,children:h}),t[18]=u,t[19]=m,t[20]=h,t[21]=g):g=t[21];let _;return t[22]!==i||t[23]!==p||t[24]!==g?(_=(0,X.jsxs)(qt,{...i,children:[p,g]}),t[22]=i,t[23]=p,t[24]=g,t[25]=_):_=t[25],_}function vd(e){let t=(0,Q.c)(9),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,X.jsx)(aa,{className:`size-4 shrink-0 opacity-50`}),t[3]=i):i=t[3];let a;t[4]===n?a=t[5]:(a=G(`flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50`,n),t[4]=n,t[5]=a);let o;return t[6]!==r||t[7]!==a?(o=(0,X.jsxs)(`div`,{"data-slot":`command-input-wrapper`,className:`flex h-9 items-center gap-2 border-b px-3`,children:[i,(0,X.jsx)(id.Input,{"data-slot":`command-input`,className:a,...r})]}),t[6]=r,t[7]=a,t[8]=o):o=t[8],o}function yd(e){let t=(0,Q.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=G(`max-h-[300px] scroll-py-1 overflow-y-auto overflow-x-hidden`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,X.jsx)(id.List,{"data-slot":`command-list`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function bd(e){let t=(0,Q.c)(2),n;return t[0]===e?n=t[1]:(n=(0,X.jsx)(id.Empty,{"data-slot":`command-empty`,className:`py-6 text-center text-sm`,...e}),t[0]=e,t[1]=n),n}function xd(e){let t=(0,Q.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=G(`overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:text-xs`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,X.jsx)(id.Group,{"data-slot":`command-group`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Sd(e){let t=(0,Q.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=G(`-mx-1 h-px bg-border`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,X.jsx)(id.Separator,{"data-slot":`command-separator`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Cd(e){let t=(0,Q.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=G(`relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none data-disabled:pointer-events-none data-disabled:opacity-50 data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 [&_svg:not([class*='text-'])]:text-muted-foreground`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,X.jsx)(id.Item,{"data-slot":`command-item`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function wd(e){let t=(0,Q.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=G(`ml-auto text-muted-foreground text-xs tracking-widest`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,X.jsx)(`span`,{"data-slot":`command-shortcut`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var Td=`Switch Project…`,Ed=[{id:`claude-cowork`,displayName:`Claude Cowork`,appBrandName:`Claude Desktop`,schemes:[`claude:`],installUrl:`https://claude.com/download`,hasWebFallback:!0},{id:`claude-code`,displayName:`Claude Code`,appBrandName:`Claude Desktop`,schemes:[`claude:`],installUrl:`https://claude.com/download`,hasWebFallback:!0},{id:`codex`,displayName:`Codex`,appBrandName:`Codex Desktop`,schemes:[`codex:`],installUrl:`https://openai.com/codex`},{id:`cursor`,displayName:`Cursor`,schemes:[`cursor:`],installUrl:`https://cursor.com/`}];function Dd(){let e=(0,Q.c)(3),[t,n]=(0,Z.useState)(Ad),r,i;return e[0]===t?(r=e[1],i=e[2]):(r=()=>{if(t!==null||typeof window>`u`||window.okDesktop)return;let e=!0;return fetch(`/api/workspace`).then(async t=>{let r=await t.json().catch(kd);e&&t.ok&&r?.ok&&typeof r.contentDir==`string`&&(r.pathSeparator===`/`||r.pathSeparator===`\\`)&&n({contentDir:r.contentDir,pathSeparator:r.pathSeparator})}).catch(Od),()=>{e=!1}},i=[t],e[0]=t,e[1]=r,e[2]=i),(0,Z.useEffect)(r,i),t}function Od(e){console.warn(`[useWorkspace] /api/workspace fetch failed:`,e)}function kd(){return null}function Ad(){return jd()}function jd(e=typeof window>`u`?void 0:window){if(!e)return null;let t=e.okDesktop;return t?{contentDir:t.config.projectPath,pathSeparator:t.platform===`win32`?`\\`:`/`}:null}async function Md(e,t={}){let n=t.okDesktop??(typeof window<`u`?window.okDesktop:void 0);if(n?.shell?.openExternal)try{return await n.shell.openExternal(e),{ok:!0}}catch(e){return{ok:!1,reason:`dispatch-error`,detail:Nd(e)}}let r=t.doc??(typeof document<`u`?document:void 0);if(!r)return{ok:!1,reason:`dispatch-error`,detail:`no DOM available`};try{let t=r.createElement(`a`);return t.href=e,t.rel=`noopener noreferrer`,/^https?:/i.test(e)&&(t.target=`_blank`),r.body.appendChild(t),t.click(),t.remove(),{ok:!0}}catch(e){return{ok:!1,reason:`dispatch-error`,detail:Nd(e)}}}function Nd(e){if(e instanceof Error)return e.message;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}var Pd=1e3,Fd=1500;function Id(e){return new Promise(t=>setTimeout(t,e))}async function Ld(e,t={}){let n=t.spawnCursor??(typeof window<`u`?window.okDesktop?.shell.spawnCursor:void 0);if(!n)return{ok:!1,reason:`web-host-cursor-unsupported`};let r=await n(e.projectDir);if(!r.ok)return Rd(r.reason);let i=t.isCursorRunning&&await t.isCursorRunning().catch(()=>!1)?Pd:Fd;return await(t.sleep??Id)(i),Md(Cn(e),t.openExternalDeps)}function Rd(e){switch(e){case`not-installed`:return{ok:!1,reason:`not-installed`,detail:`cursor binary not found`};case`invalid-path`:return{ok:!1,reason:`invalid-payload`,detail:`cursor spawn: invalid path`};case`timeout`:return{ok:!1,reason:`dispatch-error`,detail:`cursor spawn: timeout`};case`spawn-error`:return{ok:!1,reason:`dispatch-error`,detail:`cursor spawn: spawn-error`};default:return{ok:!1,reason:`dispatch-error`,detail:`cursor spawn: ${String(e)}`}}}async function zd(e,t={}){switch(e.target){case`claude-cowork`:return Md(mn({mode:`cowork`},e),t.openExternalDeps);case`claude-code`:return Md(mn({mode:`code`},e),t.openExternalDeps);case`codex`:return Md(vn(e),t.openExternalDeps);case`cursor`:return Ld(e,{...t.cursorDeps,openExternalDeps:t.cursorDeps?.openExternalDeps??t.openExternalDeps});default:{let t=e.target;return{ok:!1,reason:`invalid-payload`,detail:`unknown target: ${String(t)}`}}}}async function Bd(e,t={}){let n=t.okDesktop??(typeof window<`u`?window.okDesktop:void 0);if(n?.shell?.recordHandoff)try{await n.shell.recordHandoff(e)}catch(e){(t.warn??(e=>console.warn(e)))(`[handoff] recordHandoff IPC rejected (telemetry skipped): ${e instanceof Error?e.message:String(e)}`)}}function Vd(e,t,n){let r=n===`\\`?t.replaceAll(`/`,`\\`):t;return`${e.endsWith(n)?e.slice(0,-1):e}${n}${r}`}function Hd(e){return`${e}.md`}function Ud(e){if(!e.docName||!e.workspace)return null;let t=Hd(e.docName),{contentDir:n,pathSeparator:r}=e.workspace;return{docContext:{relativePath:t},projectDir:n,docPath:Vd(n,t,r)}}function Wd(e){return`Opened in ${e}.`}function Gd(e,t=1){return t>=3?`Couldn't reach ${e} — please try again later.`:t===2?`Still couldn't reach ${e} — try one more time?`:`Couldn't reach ${e} — try again?`}function Kd(e){return e>=3?null:e===2?`Try one more time`:`Retry`}function qd(e,t,n,r){return t.ok?{target:e,host:n,outcome:`ok`,ts:r}:{target:e,host:n,outcome:`error`,ts:r,reason:t.reason}}async function Jd(e,t,n,r=1){let i={target:e,projectDir:t.projectDir,docPath:t.docPath,prompt:Mn(t.docContext)},a=await n.dispatchHandoff(i),o=qd(e,a,n.isElectronHost()?`electron`:`web`,n.now().toISOString());await n.recordHandoff(o);let s=n.getDisplayName(e);if(a.ok)n.toast.success(Wd(s));else{let i=Kd(r),a=Gd(s,r);i===null?n.toast.error(a):n.toast.error(a,{action:{label:i,onClick:()=>{Jd(e,t,n,r+1)}}})}return a}function Yd(e){return Ed.find(t=>t.id===e)?.displayName??e}function Xd(e=typeof window<`u`?window:void 0){return e?.okDesktop!=null}function Zd(){return{dispatchHandoff:zd,recordHandoff:Bd,toast:{success:e=>{Xt.success(e)},error:(e,t)=>{Xt.error(e,t?{action:t.action}:void 0)}},now:()=>new Date,isElectronHost:()=>Xd(),getDisplayName:Yd}}function Qd(){return{dispatch:(e,t)=>Jd(e,t,Zd())}}var $d=[...new Set(Ed.flatMap(e=>e.schemes))];function ef(e,t){let n=t.now?.()??Date.now(),r={};for(let i of Ed){if(!t.isElectronHost&&i.id===`cursor`){r[i.id]={installed:!1,lastChecked:n};continue}let a=i.schemes[0],o=a===void 0?void 0:e[a];if(!o){r[i.id]={installed:null};continue}r[i.id]={installed:o.installed,...o.displayName===void 0?{}:{displayName:o.displayName},lastChecked:n}}return r}function tf(e){return ef({},e)}async function nf(e){let t=e.schemes??$d,n=await Promise.all(t.map(async t=>{let n=t.replace(/:$/,``);try{return[t,await e.detectProtocol(n)]}catch{return[t,{installed:!1}]}}));return Object.fromEntries(n)}var rf=Object.fromEntries($d.map(e=>[e,{installed:!1}]));async function af(e){let t;try{t=await e.fetch(`/api/installed-agents`,{signal:e.signal,headers:{Accept:`application/json`}})}catch(e){if(e.name===`AbortError`)throw e;return rf}if(!t.ok)return rf;let n;try{n=await t.json()}catch{return rf}if(typeof n!=`object`||!n||Array.isArray(n))return rf;let r=n,i={};for(let e of $d)i[e]={installed:r[e.replace(/:$/,``)]===!0};return i}function of(e,t){let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n){let n=e[r],i=t[r];if(!n||!i||n.installed!==i.installed||n.displayName!==i.displayName)return!1}return!0}function sf(e){let t=e.throttleMs??1e4,n=!1,r=null,i=null,a={},o=tf({isElectronHost:e.isElectronHost(),now:e.now}),s=new Set,c=()=>{if(!n)for(let e of s)e(o)},l=()=>{o=ef(a,{isElectronHost:e.isElectronHost(),now:e.now})};return{probe:async()=>{if(n)return;if(i)return i;if(r!==null&&e.now()-r<t)return;let o=(async()=>{try{let t=await e.probe();if(n)return;let i=!of(a,t);a=t,i&&(l(),c()),r=e.now()}catch{}finally{i=null}})();return i=o,o},getTargetStates:()=>o,subscribe:e=>(s.add(e),()=>{s.delete(e)}),cancel:()=>{n=!0,s.clear()}}}function cf(e=typeof window<`u`?window:void 0){return e?.okDesktop!=null}function lf(){let e=typeof window<`u`?window.okDesktop:void 0;if(e){let t=t=>e.shell.detectProtocol(t);return{probe:()=>nf({detectProtocol:t}),isElectronHost:()=>!0,now:Date.now}}let t=globalThis.fetch.bind(globalThis);return{probe:()=>af({fetch:t}),isElectronHost:()=>!1,now:Date.now}}function uf(){let e=(0,Q.c)(5),[t,n]=(0,Z.useState)(df),r=(0,Z.useRef)(null),i,a;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=()=>{let e=sf(lf());r.current=e;let t=e.subscribe(n);return e.probe(),()=>{t(),e.cancel(),r.current=null}},a=[],e[0]=i,e[1]=a):(i=e[0],a=e[1]),(0,Z.useEffect)(i,a);let o;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=()=>r.current?.probe()??Promise.resolve(),e[2]=o):o=e[2];let s;return e[3]===t?s=e[4]:(s={states:t,refresh:o},e[3]=t,e[4]=s),s}function df(){return tf({isElectronHost:cf(),now:Date.now})}var ff=(e,t,n)=>xa(e,t,n,`CommandPalette`);function pf(e){let t=(0,Q.c)(47),{bridge:n}=e,[r,i]=(0,Z.useState)(!1),a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=[],t[0]=a):a=t[0];let[o,s]=(0,Z.useState)(a),{activeDocName:c}=ft(),l=Dd(),{states:u,refresh:d}=uf(),{dispatch:f}=Qd(),p=Ud({docName:c,workspace:l}),m;t[1]!==n.project||t[2]!==r||t[3]!==d?(m=()=>{if(!r)return;let e=!1;return ff(async()=>{let t=await n.project.listRecent();e||s(t)},`Failed to load recent projects.`),d(),()=>{e=!0}},t[1]=n.project,t[2]=r,t[3]=d,t[4]=m):m=t[4];let h;t[5]!==n||t[6]!==r||t[7]!==d?(h=[r,n,d],t[5]=n,t[6]=r,t[7]=d,t[8]=h):h=t[8],(0,Z.useEffect)(m,h);let g,_;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(g=()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&(e.key===`k`||e.key===`K`)&&(e.preventDefault(),i(mf))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},_=[],t[9]=g,t[10]=_):(g=t[9],_=t[10]),(0,Z.useEffect)(g,_);let v;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(v=(e,t)=>{let n=t===void 0?`Command failed.`:t;i(!1),ff(async()=>{await e()},n)},t[11]=v):v=t[11];let y=v,b=n.config.projectPath,x;t[12]===b?x=t[13]:(x=e=>e.path!==b,t[12]=b,t[13]=x);let S=o.filter(x),C=_d,w;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,X.jsx)(vd,{placeholder:`Type a command or search recent projects…`}),t[14]=w):w=t[14];let T=yd,E;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,X.jsx)(bd,{children:`No matching commands.`}),t[15]=E):E=t[15];let D;t[16]!==n.dialog||t[17]!==n.project?(D=()=>y(async()=>{let e=await n.dialog.openFolder();e&&await n.project.open({path:e,target:`new-window`})}),t[16]=n.dialog,t[17]=n.project,t[18]=D):D=t[18];let O,k,A;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,X.jsx)(rt,{}),k=(0,X.jsx)(`span`,{children:`Open folder on disk…`}),A=(0,X.jsx)(wd,{children:`⌘O`}),t[19]=O,t[20]=k,t[21]=A):(O=t[19],k=t[20],A=t[21]);let j;t[22]===D?j=t[23]:(j=(0,X.jsxs)(Cd,{onSelect:D,"data-testid":`command-palette-open-folder`,children:[O,k,A]}),t[22]=D,t[23]=j);let M;t[24]===n.navigator?M=t[25]:(M=()=>y(()=>n.navigator.open(),`Failed to open Project Navigator.`),t[24]=n.navigator,t[25]=M);let N,P,F;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,X.jsx)(Li,{}),P=(0,X.jsx)(`span`,{children:Td}),F=(0,X.jsx)(wd,{children:`⌘⇧N`}),t[26]=N,t[27]=P,t[28]=F):(N=t[26],P=t[27],F=t[28]);let I;t[29]===M?I=t[30]:(I=(0,X.jsxs)(Cd,{value:`switch-project navigator projects`,onSelect:M,"data-testid":`command-palette-switch-project`,children:[N,P,F]}),t[29]=M,t[30]=I);let L;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(L=()=>{i(!1),window.location.hash=`#install-claude-desktop`},t[31]=L):L=t[31];let R;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,X.jsxs)(Cd,{onSelect:L,"data-testid":`command-palette-install-claude-desktop`,children:[(0,X.jsx)(Si,{}),(0,X.jsx)(`span`,{children:`Install for Claude Chat & Cowork (Desktop App)…`})]}),t[32]=R):R=t[32];let z;t[33]!==j||t[34]!==I?(z=(0,X.jsxs)(xd,{heading:`Project`,children:[j,I,R]}),t[33]=j,t[34]=I,t[35]=z):z=t[35];let B=c?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(Sd,{}),(0,X.jsx)(xd,{heading:`Open in agent`,children:Ed.map(e=>{let t=u[e.id],n=t.installed===!0&&p!==null,r=t.installed===null?`Detecting…`:t.installed===!1?`Not installed`:p===null?`No active doc`:null,a=r?`Open in ${e.displayName}, ${r}`:`Open in ${e.displayName}`;return(0,X.jsxs)(Cd,{value:`open-in-agent ${e.id} ${e.displayName}`,disabled:!n,onSelect:()=>{!n||!p||(i(!1),f(e.id,p))},"data-testid":`command-palette-open-in-${e.id}`,"aria-label":a,children:[(0,X.jsxs)(`span`,{className:`flex-1`,children:[`Open in `,e.displayName]}),r?(0,X.jsx)(`span`,{"aria-hidden":`true`,className:`ml-auto text-muted-foreground text-xs`,children:r}):null]},e.id)})})]}):null,V=S.length>0?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(Sd,{}),(0,X.jsx)(xd,{heading:`Recent projects`,children:S.slice(0,10).map(e=>(0,X.jsxs)(Cd,{value:`${e.name} ${e.path}`,disabled:e.missing,onSelect:()=>y(()=>n.project.open({path:e.path,target:`new-window`})),"data-testid":`command-palette-recent-${e.path}`,children:[(0,X.jsx)(ve,{}),(0,X.jsxs)(`div`,{className:`flex min-w-0 flex-col`,children:[(0,X.jsx)(`span`,{className:`truncate font-medium`,children:e.name}),(0,X.jsxs)(`span`,{className:`truncate text-muted-foreground text-xs`,children:[e.path,e.missing?` (missing)`:``]})]})]},e.path))})]}):null,H;t[36]!==T||t[37]!==E||t[38]!==z||t[39]!==B||t[40]!==V?(H=(0,X.jsxs)(T,{className:`subtle-scrollbar`,children:[E,z,B,V]}),t[36]=T,t[37]=E,t[38]=z,t[39]=B,t[40]=V,t[41]=H):H=t[41];let U;return t[42]!==C||t[43]!==r||t[44]!==w||t[45]!==H?(U=(0,X.jsxs)(C,{open:r,onOpenChange:i,title:`Project Command Palette`,description:`Open a folder, switch to a recent project, or open the Project Navigator.`,children:[w,H]}),t[42]=C,t[43]=r,t[44]=w,t[45]=H,t[46]=U):U=t[46],U}function mf(e){return!e}var hf=500;function gf(e,t,n){return t?`terminal`:e===null&&n?`retrying`:`hidden`}function _f(e){return e===null?`no response`:e.kind===`null-collab`?`ok ui responded but server.lock has no port yet`:e.code===`network`?"network error (is `ok ui` running?)":e.code===`invalid-body`?`/api/config returned a malformed body`:`/api/config returned HTTP ${e.code}`}function vf(){let e=(0,Q.c)(16),{collabUrl:t,collabTerminal:n,collabLastError:r,retryCollab:i}=ft(),[a,o]=(0,Z.useState)(!1),s,c;e[0]!==n||e[1]!==t?(s=()=>{if(t!==null||n){o(!1);return}let e=setTimeout(()=>o(!0),hf);return()=>clearTimeout(e)},c=[t,n],e[0]=n,e[1]=t,e[2]=s,e[3]=c):(s=e[2],c=e[3]),(0,Z.useEffect)(s,c);let l=gf(t,n,a);if(l===`hidden`)return null;if(l===`terminal`){let t;e[4]===r?t=e[5]:(t=_f(r),e[4]=r,e[5]=t);let n;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,X.jsx)(`code`,{className:`bg-red-100/60 px-1 rounded`,children:`ok status`}),e[6]=n):n=e[6];let a;e[7]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,X.jsx)(`code`,{className:`bg-red-100/60 px-1 rounded`,children:`.open-knowledge/last-spawn-error.log`}),e[7]=a):a=e[7];let o;e[8]===t?o=e[9]:(o=(0,X.jsxs)(`span`,{children:[`Couldn't reach collab server — `,t,`. Try`,` `,n,` or check`,` `,a,`.`]}),e[8]=t,e[9]=o);let s;e[10]===i?s=e[11]:(s=(0,X.jsx)(`button`,{type:`button`,onClick:i,className:`bg-red-950 text-red-50 px-2 py-0.5 rounded text-xs font-medium hover:bg-red-900`,children:`Retry`}),e[10]=i,e[11]=s);let c;return e[12]!==o||e[13]!==s?(c=(0,X.jsxs)(`div`,{role:`alert`,"aria-live":`assertive`,className:`fixed top-0 inset-x-0 z-50 bg-red-500/95 text-red-950 text-sm text-center py-2 px-4 shadow-md flex items-center justify-center gap-3 flex-wrap`,children:[o,s]}),e[12]=o,e[13]=s,e[14]=c):c=e[14],c}let u;return e[15]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,X.jsx)(`div`,{role:`status`,"aria-live":`polite`,className:`fixed top-0 inset-x-0 z-50 bg-amber-500/95 text-amber-950 text-sm text-center py-2 px-4 shadow-md`,children:`Connecting — waiting for collab server…`}),e[15]=u):u=e[15],u}var yf=`ok-editor-mode-v1`,bf=[`wysiwyg`,`source`],xf=`wysiwyg`;function Sf(e){return bf.includes(e)}function Cf(e=localStorage){try{let t=e.getItem(yf);if(t===null)return xf;if(Sf(t))return t;console.warn(`[editor-mode] invalid persisted value, falling back to default`,{raw:t})}catch{}return xf}function wf(e=window,t=localStorage){let n=e.__OK_EDITOR_MODE__;return Sf(n)?n:Cf(t)}function Tf(e,t=localStorage){try{return t.setItem(yf,e),!0}catch(e){return console.warn(`[editor-mode] persist failed`,e),!1}}function Ef(){let e=(0,Q.c)(3),[t,n]=(0,Z.useState)(wf),r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=function(e){n(e),Tf(e)},e[0]=r):r=e[0];let i=r,a;return e[1]===t?a=e[2]:(a=[t,i],e[1]=t,e[2]=a),a}async function Df(){try{let e=await fetch(`/api/sync/status`);return e.ok?{status:await e.json()}:{status:null,error:`server`}}catch{return{status:null,error:`network`}}}function Of(){return kf().status}function kf(){let e=(0,Q.c)(8),[t,n]=(0,Z.useState)(null),[r,i]=(0,Z.useState)(null),a;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=function(){Df().then(e=>{let{status:t,error:r}=e;i(r??null),t&&n(t)})},e[0]=a):a=e[0];let o=a,s,c;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(s=()=>{o()},c=[],e[1]=s,e[2]=c):(s=e[1],c=e[2]),(0,Z.useEffect)(s,c);let l,u;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(l=()=>Gn(e=>{e.includes(`sync-status`)&&o()}),u=[],e[3]=l,e[4]=u):(l=e[3],u=e[4]),(0,Z.useEffect)(l,u);let d;return e[5]!==r||e[6]!==t?(d={status:t,fetchError:r},e[5]=r,e[6]=t,e[7]=d):d=e[7],d}async function Af(e,t){let n=e.getReader(),r=new TextDecoder,i=``;for(;;){let{done:e,value:a}=await n.read();if(e)return i+=r.decode(),!!(i.trim()&&t(i)===`terminal`);i+=r.decode(a,{stream:!0});let o=i.split(`
|
|
11
|
-
`);i=o.pop()??``;for(let e of o)if(e.trim()&&t(e)===`terminal`)return!0}}async function jf(e){try{await navigator.clipboard.writeText(e)}catch{}}var Mf=120*1e3;function Nf(e){let t=(0,Q.c)(25),{onSuccess:n,onCancel:r}=e,[i,a]=(0,Z.useState)(null),[o,s]=(0,Z.useState)(`https://github.com/login/device`),[c,l]=(0,Z.useState)(!1),[u,d]=(0,Z.useState)(null),[f,p]=(0,Z.useState)(!1),[m,h]=(0,Z.useState)(Mf),g=(0,Z.useRef)(null),_=(0,Z.useRef)(null),v;t[0]===n?v=t[1]:(v=async function(e){d(null),p(!0);try{let t=await fetch(`/api/local-op/auth/login`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({json:!0}),signal:e.signal});if(!t.ok||!t.body){d(`Failed to start sign-in — try again`),p(!1);return}await Af(t.body,e=>{try{let t=JSON.parse(e);if(t.type===`verification`)a(t.user_code),s(t.verification_uri),h(t.expires_in*1e3),jf(t.user_code).then(()=>{l(!0),setTimeout(()=>l(!1),2e3)});else if(t.type===`complete`)return p(!1),n({login:t.login,name:t.name,email:t.email,avatarUrl:t.avatarUrl}),`terminal`;else if(t.type===`error`)return d(t.message),p(!1),`terminal`}catch{}return`continue`})||(d(`Sign-in stream ended without confirmation — please try again`),p(!1))}catch(e){let t=e;t instanceof Error&&t.name!==`AbortError`&&d(`Connection error — try again`),p(!1)}},t[0]=n,t[1]=v);let y=v,b;t[2]===y?b=t[3]:(b=()=>{let e=new AbortController;return g.current=e,y(e),()=>{e.abort(),_.current&&clearInterval(_.current)}},t[2]=y,t[3]=b);let x;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(x=[],t[4]=x):x=t[4],(0,Z.useEffect)(b,x);let S,C;t[5]===i?(S=t[6],C=t[7]):(S=()=>{if(!i)return;let e=Date.now();return _.current=setInterval(()=>{let t=Mf-(Date.now()-e);t<=0?(h(0),_.current&&clearInterval(_.current),d(`Code expired — please try again`)):h(t)},1e3),()=>{_.current&&clearInterval(_.current)}},C=[i],t[5]=i,t[6]=S,t[7]=C),(0,Z.useEffect)(S,C);let w=Math.floor(m/6e4),T=Math.floor(m%6e4/1e3),E;t[8]===T?E=t[9]:(E=T.toString().padStart(2,`0`),t[8]=T,t[9]=E);let D=`${w}:${E}`,O;t[10]!==c||t[11]!==u||t[12]!==D||t[13]!==i||t[14]!==o?(O=i?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Open`,` `,(0,X.jsx)(`a`,{href:o,target:`_blank`,rel:`noreferrer`,className:`underline underline-offset-2`,children:o}),` `,`and enter this code:`]}),(0,X.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,X.jsx)(`code`,{className:`flex-1 text-center text-2xl font-mono font-bold tracking-widest border rounded-md py-3 bg-muted`,children:i}),(0,X.jsx)(q,{variant:`outline`,size:`sm`,onClick:()=>void jf(i).then(()=>{l(!0),setTimeout(()=>l(!1),2e3)}),children:c?`Copied!`:`Copy`})]}),(0,X.jsxs)(`div`,{className:`flex items-center justify-between text-xs text-muted-foreground`,children:[(0,X.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,X.jsx)(`span`,{className:`size-1.5 rounded-full bg-amber-500 animate-pulse`}),`Waiting for authorization…`]}),(0,X.jsxs)(`span`,{children:[`Expires in `,D]})]})]}):(0,X.jsx)(`div`,{className:`flex items-center justify-center py-6 text-sm text-muted-foreground`,children:u?null:`Starting sign-in flow…`}),t[10]=c,t[11]=u,t[12]=D,t[13]=i,t[14]=o,t[15]=O):O=t[15];let k;t[16]===u?k=t[17]:(k=u&&(0,X.jsx)(`p`,{className:`text-sm text-destructive`,children:u}),t[16]=u,t[17]=k);let A;t[18]!==r||t[19]!==f?(A=f&&(0,X.jsx)(q,{variant:`ghost`,size:`sm`,onClick:r,children:`Cancel`}),t[18]=r,t[19]=f,t[20]=A):A=t[20];let j;return t[21]!==O||t[22]!==k||t[23]!==A?(j=(0,X.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[O,k,A]}),t[21]=O,t[22]=k,t[23]=A,t[24]=j):j=t[24],j}function Pf(e){let t=(0,Q.c)(32),{onSuccess:n,onCancel:r}=e,[i,a]=(0,Z.useState)(``),[o,s]=(0,Z.useState)(!1),[c,l]=(0,Z.useState)(null),u=(0,Z.useRef)(null),d,f;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(d=()=>()=>{u.current?.abort()},f=[],t[0]=d,t[1]=f):(d=t[0],f=t[1]),(0,Z.useEffect)(d,f);let p;t[2]!==n||t[3]!==i?(p=async function(){if(!i.trim()){l(`Paste a personal access token`);return}u.current?.abort();let e=new AbortController;u.current=e,s(!0),l(null);try{let t=await fetch(`/api/local-op/auth/pat`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({pat:i.trim()}),signal:e.signal});if(!t.ok||!t.body){l(`Invalid token — check that it has repo scope`),s(!1);return}await Af(t.body,e=>{try{let t=JSON.parse(e);if(t.type===`complete`)return n({login:t.login,name:t.name,email:t.email}),s(!1),`terminal`;if(t.type===`error`)return l(t.message),s(!1),`terminal`}catch{}return`continue`})||l(`No response — try again`)}catch(e){let t=e;t instanceof Error&&t.name!==`AbortError`&&l(`Connection error — try again`)}s(!1)},t[2]=n,t[3]=i,t[4]=p):p=t[4];let m=p,h;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,X.jsx)(`a`,{href:`https://github.com/settings/tokens`,target:`_blank`,rel:`noreferrer`,className:`underline underline-offset-2`,children:`github.com/settings/tokens`}),t[5]=h):h=t[5];let g;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,X.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Create a token at`,` `,h,` `,`with `,(0,X.jsx)(`code`,{className:`text-xs bg-muted px-1 rounded`,children:`repo`}),` scope.`]}),t[6]=g):g=t[6];let _;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(_=e=>a(e.target.value),t[7]=_):_=t[7];let v;t[8]===m?v=t[9]:(v=e=>{e.key===`Enter`&&m()},t[8]=m,t[9]=v);let y;t[10]!==o||t[11]!==i||t[12]!==v?(y=(0,X.jsx)(Le,{type:`password`,"aria-label":`Personal access token`,placeholder:`ghp_…`,value:i,onChange:_,disabled:o,onKeyDown:v}),t[10]=o,t[11]=i,t[12]=v,t[13]=y):y=t[13];let b;t[14]===c?b=t[15]:(b=c&&(0,X.jsx)(`p`,{className:`text-sm text-destructive`,children:c}),t[14]=c,t[15]=b);let x;t[16]===m?x=t[17]:(x=()=>void m(),t[16]=m,t[17]=x);let S=o?`Validating…`:`Add token`,C;t[18]!==o||t[19]!==x||t[20]!==S?(C=(0,X.jsx)(q,{className:`flex-1`,onClick:x,disabled:o,children:S}),t[18]=o,t[19]=x,t[20]=S,t[21]=C):C=t[21];let w;t[22]!==o||t[23]!==r?(w=(0,X.jsx)(q,{variant:`ghost`,onClick:r,disabled:o,children:`Cancel`}),t[22]=o,t[23]=r,t[24]=w):w=t[24];let T;t[25]!==C||t[26]!==w?(T=(0,X.jsxs)(`div`,{className:`flex gap-2`,children:[C,w]}),t[25]=C,t[26]=w,t[27]=T):T=t[27];let E;return t[28]!==T||t[29]!==y||t[30]!==b?(E=(0,X.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[g,y,b,T]}),t[28]=T,t[29]=y,t[30]=b,t[31]=E):E=t[31],E}function Ff(e){let t=(0,Q.c)(27),{login:n,onSave:r,onSkip:i}=e,[a,o]=(0,Z.useState)(``),[s,c]=(0,Z.useState)(``),l;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,X.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Before syncing, set your identity for git commits:`}),t[0]=l):l=t[0];let u=`Name (e.g. ${n})`,d;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(d=e=>o(e.target.value),t[1]=d):d=t[1];let f;t[2]!==a||t[3]!==u?(f=(0,X.jsx)(Le,{"aria-label":`Name`,placeholder:u,value:a,onChange:d}),t[2]=a,t[3]=u,t[4]=f):f=t[4];let p;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(p=e=>c(e.target.value),t[5]=p):p=t[5];let m;t[6]===s?m=t[7]:(m=(0,X.jsx)(Le,{type:`email`,"aria-label":`Email`,placeholder:`Email`,value:s,onChange:p}),t[6]=s,t[7]=m);let h;t[8]!==s||t[9]!==a||t[10]!==r?(h=()=>r(a.trim(),s.trim()),t[8]=s,t[9]=a,t[10]=r,t[11]=h):h=t[11];let g;t[12]!==s||t[13]!==a?(g=!a.trim()||!s.trim(),t[12]=s,t[13]=a,t[14]=g):g=t[14];let _;t[15]!==h||t[16]!==g?(_=(0,X.jsx)(q,{className:`flex-1`,onClick:h,disabled:g,children:`Save`}),t[15]=h,t[16]=g,t[17]=_):_=t[17];let v;t[18]===i?v=t[19]:(v=(0,X.jsx)(q,{variant:`ghost`,onClick:i,children:`Skip`}),t[18]=i,t[19]=v);let y;t[20]!==v||t[21]!==_?(y=(0,X.jsxs)(`div`,{className:`flex gap-2`,children:[_,v]}),t[20]=v,t[21]=_,t[22]=y):y=t[22];let b;return t[23]!==y||t[24]!==f||t[25]!==m?(b=(0,X.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[l,f,m,y]}),t[23]=y,t[24]=f,t[25]=m,t[26]=b):b=t[26],b}function If(e){let t=(0,Q.c)(39),{open:n,onOpenChange:r,onSuccess:i,identityPrompt:a,reauth:o}=e,[s,c]=(0,Z.useState)(`device`),[l,u]=(0,Z.useState)(`auth`),[d,f]=(0,Z.useState)(null),p,m;t[0]===n?(p=t[1],m=t[2]):(p=()=>{n&&(c(`device`),u(`auth`),f(null))},m=[n],t[0]=n,t[1]=p,t[2]=m),(0,Z.useEffect)(p,m);let h;t[3]!==a||t[4]!==r||t[5]!==i?(h=function(e){f(e),a&&(!e.name||!e.email)?u(`identity`):(u(`done`),i?.(e),r(!1),Xt.success(`Signed in as @${e.login}`))},t[3]=a,t[4]=r,t[5]=i,t[6]=h):h=t[6];let g=h,_;t[7]!==d||t[8]!==r||t[9]!==i?(_=function(e,t){fetch(`/api/local-op/auth/status`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({setIdentity:{name:e,email:t}})}).catch(Lf);let n={...d??{login:``},name:e,email:t};u(`done`),i?.(n),r(!1),Xt.success(`Signed in as @${n.login}`)},t[7]=d,t[8]=r,t[9]=i,t[10]=_):_=t[10];let v=_,y;t[11]!==d||t[12]!==r||t[13]!==i?(y=function(){d&&(u(`done`),i?.(d),r(!1),Xt.success(`Signed in as @${d.login}`))},t[11]=d,t[12]=r,t[13]=i,t[14]=y):y=t[14];let b=y,x;t[15]===r?x=t[16]:(x=function(){r(!1)},t[15]=r,t[16]=x);let S=x,C=o?`Re-authenticate with GitHub`:`Sign in to GitHub`,w;t[17]===C?w=t[18]:(w=(0,X.jsx)(Kt,{children:(0,X.jsx)(Ft,{children:C})}),t[17]=C,t[18]=w);let T;t[19]!==g||t[20]!==S||t[21]!==l||t[22]!==s?(T=l===`auth`&&(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(`div`,{className:`flex gap-1 border-b pb-2 mb-1`,children:[(0,X.jsx)(q,{variant:s===`device`?`secondary`:`ghost`,size:`sm`,onClick:()=>c(`device`),children:`GitHub App`}),(0,X.jsx)(q,{variant:s===`pat`?`secondary`:`ghost`,size:`sm`,onClick:()=>c(`pat`),children:`Token`})]}),s===`device`?(0,X.jsx)(Nf,{onSuccess:g,onCancel:S}):(0,X.jsx)(Pf,{onSuccess:g,onCancel:S})]}),t[19]=g,t[20]=S,t[21]=l,t[22]=s,t[23]=T):T=t[23];let E;t[24]!==d||t[25]!==v||t[26]!==b||t[27]!==l?(E=l===`identity`&&d&&(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(`p`,{className:`text-sm font-medium`,children:[`Signed in as @`,d.login]}),(0,X.jsx)(Ff,{login:d.login,onSave:v,onSkip:b})]}),t[24]=d,t[25]=v,t[26]=b,t[27]=l,t[28]=E):E=t[28];let D;t[29]!==T||t[30]!==E?(D=(0,X.jsxs)(Ht,{children:[T,E]}),t[29]=T,t[30]=E,t[31]=D):D=t[31];let O;t[32]!==D||t[33]!==w?(O=(0,X.jsxs)(zt,{className:`sm:max-w-md`,children:[w,D]}),t[32]=D,t[33]=w,t[34]=O):O=t[34];let k;return t[35]!==r||t[36]!==n||t[37]!==O?(k=(0,X.jsx)(qt,{open:n,onOpenChange:r,children:O}),t[35]=r,t[36]=n,t[37]=O,t[38]=k):k=t[38],k}function Lf(){}function Rf(e){let t=(0,Q.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=G(`animate-pulse rounded-md bg-muted`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,X.jsx)(`div`,{"data-slot":`skeleton`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function zf(e){switch(e){case`receiving`:return`Receiving objects`;case`resolving`:return`Resolving deltas`;case`checking`:return`Checking out files`;case`init`:return`Initializing project`;case`done`:return`Complete`;default:return`Cloning`}}function Bf(e){let t=e.trim();if(/^[\w.-]+\/[\w.-]+$/.test(t))return t.split(`/`)[1];try{return new URL(t.replace(/^git@([^:]+):/,`https://$1/`)).pathname.replace(/\.git$/,``).split(`/`).pop()??`repo`}catch{return t.split(`/`).pop()?.replace(/\.git$/,``)??`repo`}}function Vf(e){let t=(0,Q.c)(78),{open:n,onOpenChange:r,onSignIn:i}=e,[a,o]=(0,Z.useState)(``),[s,c]=(0,Z.useState)(``),[l,u]=(0,Z.useState)(null),[d,f]=(0,Z.useState)(!1),[p,m]=(0,Z.useState)(``),[h,g]=(0,Z.useState)(!1),[_,v]=(0,Z.useState)(!1),[y,b]=(0,Z.useState)(null),x=(0,Z.useRef)(null),S,C;t[0]===n?(S=t[1],C=t[2]):(S=()=>{n&&fetch(`/api/local-op/auth/status`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({})}).then(Hf).then(e=>{g(!!e.authenticated)}).catch(()=>g(!1))},C=[n],t[0]=n,t[1]=S,t[2]=C),(0,Z.useEffect)(S,C);let w;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(w=async function(e){f(!0);let t=[],n=!1;try{let n=await fetch(`/api/local-op/auth/repos`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({}),signal:e}),r=n.ok?n.body?.getReader():null;if(r){let e=new TextDecoder,n=``;for(;;){let{done:i,value:a}=await r.read();if(i)break;n+=e.decode(a,{stream:!0});for(let e of n.split(`
|
|
12
|
-
`))if(e.trim())try{let n=JSON.parse(e);n.repos&&t.push(...n.repos)}catch{}n=n.slice(n.lastIndexOf(`
|
|
13
|
-
`)+1)}}}catch(e){let r=e;r instanceof Error&&r.name===`AbortError`?n=!0:t=[]}n||e.aborted||(u(t),f(!1))},t[3]=w):w=t[3];let T=w,E,D;t[4]!==h||t[5]!==n?(E=()=>{if(!h||!n)return;let e=new AbortController;return T(e.signal),()=>e.abort()},D=[h,n],t[4]=h,t[5]=n,t[6]=E,t[7]=D):(E=t[6],D=t[7]),(0,Z.useEffect)(E,D);let O;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(O=function(e){o(e);let t=Bf(e);t&&c(`~/Documents/${t}`)},t[8]=O):O=t[8];let k=O,A;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(A=function(e){o(e.clone_url);let t=e.full_name.split(`/`)[1];c(`~/Documents/${t}`)},t[9]=A):A=t[9];let j=A,M;t[10]!==s||t[11]!==r||t[12]!==a?(M=async function(){if(!a.trim()){Xt.error(`Enter a repository URL or owner/repo`);return}let e=new AbortController;b(e),v(!0);let t=Xt.loading(`Starting clone…`,{duration:1/0});x.current=t;try{let n=await fetch(`/api/local-op/clone`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({url:a.trim(),dir:s||void 0}),signal:e.signal});if(!n.ok||!n.body){Xt.error(`Clone failed — check the URL and try again`,{id:t}),v(!1),b(null);return}let i=n.body.getReader(),o=new TextDecoder,c=``;for(;;){let{done:e,value:n}=await i.read();if(e)break;c+=o.decode(n,{stream:!0});let a=c.split(`
|
|
14
|
-
`);c=a.pop()??``;for(let e of a)if(e.trim())try{let n=JSON.parse(e);if(n.type===`progress`)Xt.loading(`${zf(n.phase)} — ${n.pct}%`,{id:t});else if(n.type===`complete`){Xt.success(`Clone complete — opening project`,{id:t}),r(!1),v(!1),b(null),window.location.href=`http://localhost:${n.port}`;return}else if(n.type===`error`){Xt.error(`Clone failed: ${n.message}`,{id:t}),v(!1),b(null);return}}catch{}}Xt.error(`Clone stream ended unexpectedly — check if the clone completed`,{id:t}),v(!1),b(null)}catch(e){let n=e;n instanceof Error&&n.name===`AbortError`?Xt.dismiss(x.current??void 0):Xt.error(`Clone failed — connection error`,{id:t}),v(!1),b(null)}},t[10]=s,t[11]=r,t[12]=a,t[13]=M):M=t[13];let N=M,P;t[14]===y?P=t[15]:(P=function(){y?.abort(),v(!1),b(null),Xt.dismiss(x.current??void 0)},t[14]=y,t[15]=P);let F=P,I;t[16]!==_||t[17]!==r?(I=function(e){_||(r(e),e||(o(``),c(``),m(``)))},t[16]=_,t[17]=r,t[18]=I):I=t[18];let L=I,R,z,B,V,H,U,ee,W,te,G;if(t[19]!==_||t[20]!==L||t[21]!==h||t[22]!==d||t[23]!==n||t[24]!==p||t[25]!==l||t[26]!==a){let e=l?.filter(e=>e.full_name.toLowerCase().includes(p.toLowerCase()));B=qt,te=n,G=L,z=zt,ee=`sm:max-w-lg`,t[37]===Symbol.for(`react.memo_cache_sentinel`)?(W=(0,X.jsx)(Kt,{children:(0,X.jsx)(Ft,{children:`Clone from GitHub`})}),t[37]=W):W=t[37],R=Ht,V=`flex flex-col gap-4`;let r;t[38]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,X.jsx)(`label`,{htmlFor:`clone-url`,className:`text-sm font-medium`,children:`Repository URL or owner/repo`}),t[38]=r):r=t[38];let i;t[39]===Symbol.for(`react.memo_cache_sentinel`)?(i=e=>k(e.target.value),t[39]=i):i=t[39],t[40]!==_||t[41]!==a?(H=(0,X.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[r,(0,X.jsx)(Le,{id:`clone-url`,placeholder:`https://github.com/owner/repo or owner/repo`,value:a,onChange:i,disabled:_})]}),t[40]=_,t[41]=a,t[42]=H):H=t[42],U=h&&(0,X.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,X.jsx)(`label`,{htmlFor:`repo-filter`,className:`text-sm font-medium`,children:`Your repositories`}),(0,X.jsx)(Le,{id:`repo-filter`,"aria-label":`Filter repositories`,placeholder:`Filter repositories…`,value:p,onChange:e=>m(e.target.value),disabled:_||d&&l===null}),(0,X.jsx)(`div`,{className:`border rounded-md max-h-40 overflow-y-auto subtle-scrollbar`,"aria-busy":d&&l===null,children:d&&l===null?(0,X.jsxs)(`output`,{className:`flex flex-col gap-1.5 px-3 py-2`,"aria-label":`Loading repositories`,children:[(0,X.jsx)(Rf,{className:`h-4 w-2/3`}),(0,X.jsx)(Rf,{className:`h-4 w-1/2`}),(0,X.jsx)(Rf,{className:`h-4 w-3/4`}),(0,X.jsx)(Rf,{className:`h-4 w-2/5`}),(0,X.jsx)(Rf,{className:`h-4 w-3/5`})]}):e?.length===0?(0,X.jsx)(`p`,{className:`px-3 py-2 text-xs text-muted-foreground`,children:l?.length===0?`No repositories found.`:`No matches.`}):e?.map(e=>(0,X.jsxs)(`button`,{type:`button`,className:`w-full text-left px-3 py-1.5 text-sm hover:bg-muted flex items-center gap-2 truncate disabled:opacity-50`,onClick:()=>j(e),disabled:_,children:[e.private&&(0,X.jsx)(`span`,{className:`text-xs text-muted-foreground shrink-0`,children:`🔒`}),e.full_name]},e.full_name))})]}),t[19]=_,t[20]=L,t[21]=h,t[22]=d,t[23]=n,t[24]=p,t[25]=l,t[26]=a,t[27]=R,t[28]=z,t[29]=B,t[30]=V,t[31]=H,t[32]=U,t[33]=ee,t[34]=W,t[35]=te,t[36]=G}else R=t[27],z=t[28],B=t[29],V=t[30],H=t[31],U=t[32],ee=t[33],W=t[34],te=t[35],G=t[36];let ne;t[43]!==_||t[44]!==h||t[45]!==i?(ne=!h&&(0,X.jsxs)(`div`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,children:[(0,X.jsx)(`span`,{children:`Browse your repos:`}),(0,X.jsx)(q,{variant:`link`,size:`sm`,className:`h-auto p-0`,onClick:()=>i?.(),disabled:_,children:`Sign in to GitHub`})]}),t[43]=_,t[44]=h,t[45]=i,t[46]=ne):ne=t[46];let K;t[47]===Symbol.for(`react.memo_cache_sentinel`)?(K=(0,X.jsx)(`label`,{htmlFor:`clone-path`,className:`text-sm font-medium`,children:`Local path`}),t[47]=K):K=t[47];let re;t[48]===Symbol.for(`react.memo_cache_sentinel`)?(re=e=>c(e.target.value),t[48]=re):re=t[48];let ie;t[49]!==_||t[50]!==s?(ie=(0,X.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[K,(0,X.jsx)(Le,{id:`clone-path`,placeholder:`~/Documents/repo-name`,value:s,onChange:re,disabled:_})]}),t[49]=_,t[50]=s,t[51]=ie):ie=t[51];let J;t[52]!==V||t[53]!==H||t[54]!==U||t[55]!==ne||t[56]!==ie?(J=(0,X.jsxs)(`div`,{className:V,children:[H,U,ne,ie]}),t[52]=V,t[53]=H,t[54]=U,t[55]=ne,t[56]=ie,t[57]=J):J=t[57];let ae;t[58]!==R||t[59]!==J?(ae=(0,X.jsx)(R,{children:J}),t[58]=R,t[59]=J,t[60]=ae):ae=t[60];let Y;t[61]!==_||t[62]!==F||t[63]!==N||t[64]!==L||t[65]!==a?(Y=(0,X.jsx)(Ut,{children:_?(0,X.jsx)(q,{variant:`outline`,className:`font-mono uppercase`,onClick:F,children:`Cancel`}):(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(q,{variant:`outline`,className:`font-mono uppercase`,onClick:()=>L(!1),children:`Cancel`}),(0,X.jsx)(q,{onClick:()=>void N(),disabled:!a.trim(),children:`Clone`})]})}),t[61]=_,t[62]=F,t[63]=N,t[64]=L,t[65]=a,t[66]=Y):Y=t[66];let oe;t[67]!==z||t[68]!==ee||t[69]!==W||t[70]!==ae||t[71]!==Y?(oe=(0,X.jsxs)(z,{className:ee,children:[W,ae,Y]}),t[67]=z,t[68]=ee,t[69]=W,t[70]=ae,t[71]=Y,t[72]=oe):oe=t[72];let se;return t[73]!==B||t[74]!==te||t[75]!==G||t[76]!==oe?(se=(0,X.jsx)(B,{open:te,onOpenChange:G,children:oe}),t[73]=B,t[74]=te,t[75]=G,t[76]=oe,t[77]=se):se=t[77],se}function Hf(e){return e.json()}function Uf(e){let t=(0,Q.c)(9),{onOpenResolver:n}=e,r=Of();if(!r||r.state!==`conflict`)return null;let i=r.conflictCount,a=i>0?`${i} page${i===1?``:`s`}`:`Some pages`,o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,X.jsx)(Oe,{className:`size-4 shrink-0`}),t[0]=o):o=t[0];let s=i===1?`has`:`have`,c;t[1]!==a||t[2]!==s?(c=(0,X.jsxs)(`span`,{className:`flex-1`,children:[a,` `,s,` conflicting changes.`]}),t[1]=a,t[2]=s,t[3]=c):c=t[3];let l;t[4]===n?l=t[5]:(l=(0,X.jsx)(q,{variant:`outline`,size:`xs`,className:`shrink-0 border-amber-400 dark:border-amber-700 text-amber-800 dark:text-amber-300 hover:bg-amber-100 dark:hover:bg-amber-900/50`,onClick:n,children:`Review and resolve`}),t[4]=n,t[5]=l);let u;return t[6]!==c||t[7]!==l?(u=(0,X.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-2 text-sm border-b bg-amber-50 dark:bg-amber-950/30 text-amber-800 dark:text-amber-300 shrink-0`,children:[o,c,l]}),t[6]=c,t[7]=l,t[8]=u):u=t[8],u}var Wf=class e{constructor(e,t,n,r){this.fromA=e,this.toA=t,this.fromB=n,this.toB=r}offset(t,n=t){return new e(this.fromA+t,this.toA+t,this.fromB+n,this.toB+n)}};function Gf(e,t,n,r,i,a){if(e==r)return[];let o=tp(e,t,n,r,i,a),s=np(e,t+o,n,r,i+o,a);t+=o,n-=s,i+=o,a-=s;let c=n-t,l=a-i;if(!c||!l)return[new Wf(t,n,i,a)];if(c>l){let o=e.slice(t,n).indexOf(r.slice(i,a));if(o>-1)return[new Wf(t,t+o,i,i),new Wf(t+o+l,n,a,a)]}else if(l>c){let o=r.slice(i,a).indexOf(e.slice(t,n));if(o>-1)return[new Wf(t,t,i,i+o),new Wf(n,n,i+o+c,a)]}if(c==1||l==1)return[new Wf(t,n,i,a)];let u=ip(e,t,n,r,i,a);if(u){let[o,s,c]=u;return Gf(e,t,o,r,i,s).concat(Gf(e,o+c,n,r,s+c,a))}return Yf(e,t,n,r,i,a)}var Kf=1e9,qf=0,Jf=!1;function Yf(e,t,n,r,i,a){let o=n-t,s=a-i;if(Kf<1e9&&Math.min(o,s)>Kf*16||qf>0&&Date.now()>qf)return Math.min(o,s)>Kf*64?[new Wf(t,n,i,a)]:ap(e,t,n,r,i,a);let c=Math.ceil((o+s)/2);Zf.reset(c),Qf.reset(c);let l=(n,a)=>e.charCodeAt(t+n)==r.charCodeAt(i+a),u=(t,i)=>e.charCodeAt(n-t-1)==r.charCodeAt(a-i-1),d=(o-s)%2==0?null:Qf,f=d?null:Zf;for(let p=0;p<c;p++){if(p>Kf||qf>0&&!(p&63)&&Date.now()>qf)return ap(e,t,n,r,i,a);let m=Zf.advance(p,o,s,c,d,!1,l)||Qf.advance(p,o,s,c,f,!0,u);if(m)return $f(e,t,n,t+m[0],r,i,a,i+m[1])}return[new Wf(t,n,i,a)]}var Xf=class{constructor(){this.vec=[]}reset(e){this.len=e<<1;for(let e=0;e<this.len;e++)this.vec[e]=-1;this.vec[e+1]=0,this.start=this.end=0}advance(e,t,n,r,i,a,o){for(let s=-e+this.start;s<=e-this.end;s+=2){let c=r+s,l=s==-e||s!=e&&this.vec[c-1]<this.vec[c+1]?this.vec[c+1]:this.vec[c-1]+1,u=l-s;for(;l<t&&u<n&&o(l,u);)l++,u++;if(this.vec[c]=l,l>t)this.end+=2;else if(u>n)this.start+=2;else if(i){let e=r+(t-n)-s;if(e>=0&&e<this.len&&i.vec[e]!=-1)if(a){let n=i.vec[e];if(n>=t-l)return[n,r+n-e]}else{let n=t-i.vec[e];if(l>=n)return[l,u]}}}return null}},Zf=new Xf,Qf=new Xf;function $f(e,t,n,r,i,a,o,s){let c=!1;return!bp(e,r)&&++r==n&&(c=!0),!bp(i,s)&&++s==o&&(c=!0),c?[new Wf(t,n,a,o)]:Gf(e,t,r,i,a,s).concat(Gf(e,r,n,i,s,o))}function ep(e,t){let n=1,r=Math.min(e,t);for(;n<r;)n<<=1;return n}function tp(e,t,n,r,i,a){if(t==n||t==a||e.charCodeAt(t)!=r.charCodeAt(i))return 0;let o=ep(n-t,a-i);for(let s=t,c=i;;){let i=s+o,l=c+o;if(i>n||l>a||e.slice(s,i)!=r.slice(c,l)){if(o==1)return s-t-+!bp(e,s);o>>=1}else if(i==n||l==a)return i-t;else s=i,c=l}}function np(e,t,n,r,i,a){if(t==n||i==a||e.charCodeAt(n-1)!=r.charCodeAt(a-1))return 0;let o=ep(n-t,a-i);for(let s=n,c=a;;){let a=s-o,l=c-o;if(a<t||l<i||e.slice(a,s)!=r.slice(l,c)){if(o==1)return n-s-+!bp(e,s);o>>=1}else if(a==t||l==i)return n-a;else s=a,c=l}}function rp(e,t,n,r,i,a,o,s){let c=r.slice(i,a),l=null;for(;;){if(l||o<s)return l;for(let s=t+o;;){bp(e,s)||s++;let u=s+o;if(bp(e,u)||(u+=u==s+1?1:-1),u>=n)break;let d=e.slice(s,u),f=-1;for(;(f=c.indexOf(d,f+1))!=-1;){let o=tp(e,u,n,r,i+f+d.length,a),c=np(e,t,s,r,i,i+f),p=d.length+o+c;(!l||l[2]<p)&&(l=[s-c,i+f-c,p])}s=u}if(s<0)return l;o>>=1}}function ip(e,t,n,r,i,a){let o=n-t,s=a-i;if(o<s){let o=ip(r,i,a,e,t,n);return o&&[o[1],o[0],o[2]]}return o<4||s*2<o?null:rp(e,t,n,r,i,a,Math.floor(o/4),-1)}function ap(e,t,n,r,i,a){Jf=!0;let o=n-t,s=a-i,c;if(o<s){let s=rp(r,i,a,e,t,n,Math.floor(o/6),50);c=s&&[s[1],s[0],s[2]]}else c=rp(e,t,n,r,i,a,Math.floor(s/6),50);if(!c)return[new Wf(t,n,i,a)];let[l,u,d]=c;return Gf(e,t,l,r,i,u).concat(Gf(e,l+d,n,r,u+d,a))}function op(e,t){for(let n=1;n<e.length;n++){let r=e[n-1],i=e[n];r.toA>i.fromA-t&&r.toB>i.fromB-t&&(e[n-1]=new Wf(r.fromA,i.toA,r.fromB,i.toB),e.splice(n--,1))}}function sp(e,t,n){for(;;){op(n,1);let r=!1;for(let i=0;i<n.length;i++){let a=n[i],o,s;(o=tp(e,a.fromA,a.toA,t,a.fromB,a.toB))&&(a=n[i]=new Wf(a.fromA+o,a.toA,a.fromB+o,a.toB)),(s=np(e,a.fromA,a.toA,t,a.fromB,a.toB))&&(a=n[i]=new Wf(a.fromA,a.toA-s,a.fromB,a.toB-s));let c=a.toA-a.fromA,l=a.toB-a.fromB;if(c&&l)continue;let u=a.fromA-(i?n[i-1].toA:0),d=(i<n.length-1?n[i+1].fromA:e.length)-a.toA;if(!u||!d)continue;let f=c?e.slice(a.fromA,a.toA):t.slice(a.fromB,a.toB);u<=f.length&&e.slice(a.fromA-u,a.fromA)==f.slice(f.length-u)?(n[i]=new Wf(a.fromA-u,a.toA-u,a.fromB-u,a.toB-u),r=!0):d<=f.length&&e.slice(a.toA,a.toA+d)==f.slice(0,d)&&(n[i]=new Wf(a.fromA+d,a.toA+d,a.fromB+d,a.toB+d),r=!0)}if(!r)break}return n}function cp(e,t,n){for(let r=0,i=0;i<e.length;i++){let a=e[i],o=a.toA-a.fromA,s=a.toB-a.fromB;if(o&&s||o>3||s>3){let c=i==e.length-1?t.length:e[i+1].fromA,l=a.fromA-r,u=c-a.toA,d=hp(t,a.fromA,l),f=mp(t,a.toA,u),p=a.fromA-d,m=f-a.toA;if((!o||!s)&&p&&m){let l=Math.max(o,s),[u,h,g]=o?[t,a.fromA,a.toA]:[n,a.fromB,a.toB];l>p&&t.slice(d,a.fromA)==u.slice(g-p,g)?(a=e[i]=new Wf(d,d+o,a.fromB-p,a.toB-p),d=a.fromA,f=mp(t,a.toA,c-a.toA)):l>m&&t.slice(a.toA,f)==u.slice(h,h+m)&&(a=e[i]=new Wf(f-o,f,a.fromB+m,a.toB+m),f=a.toA,d=hp(t,a.fromA,a.fromA-r)),p=a.fromA-d,m=f-a.toA}if(p||m)a=e[i]=new Wf(a.fromA-p,a.toA+m,a.fromB-p,a.toB+m);else if(!o){let t=_p(n,a.fromB,a.toB),r,o=t<0?-1:gp(n,a.toB,a.fromB);t>-1&&(r=t-a.fromB)<=u&&n.slice(a.fromB,t)==n.slice(a.toB,a.toB+r)?a=e[i]=a.offset(r):o>-1&&(r=a.toB-o)<=l&&n.slice(a.fromB-r,a.fromB)==n.slice(o,a.toB)&&(a=e[i]=a.offset(-r))}else if(!s){let n=_p(t,a.fromA,a.toA),r,o=n<0?-1:gp(t,a.toA,a.fromA);n>-1&&(r=n-a.fromA)<=u&&t.slice(a.fromA,n)==t.slice(a.toA,a.toA+r)?a=e[i]=a.offset(r):o>-1&&(r=a.toA-o)<=l&&t.slice(a.fromA-r,a.fromA)==t.slice(o,a.toA)&&(a=e[i]=a.offset(-r))}}r=a.toA}return op(e,3),e}var lp;try{lp=RegExp(`[\\p{Alphabetic}\\p{Number}]`,`u`)}catch{}function up(e){return e>48&&e<58||e>64&&e<91||e>96&&e<123}function dp(e,t){if(t==e.length)return 0;let n=e.charCodeAt(t);return n<192?+!!up(n):lp?!vp(n)||t==e.length-1?+!!lp.test(String.fromCharCode(n)):lp.test(e.slice(t,t+2))?2:0:0}function fp(e,t){if(!t)return 0;let n=e.charCodeAt(t-1);return n<192?+!!up(n):lp?!yp(n)||t==1?+!!lp.test(String.fromCharCode(n)):lp.test(e.slice(t-2,t))?2:0:0}var pp=8;function mp(e,t,n){if(t==e.length||!fp(e,t))return t;for(let r=t,i=t+n,a=0;a<pp;a++){let t=dp(e,r);if(!t||r+t>i)return r;r+=t}return t}function hp(e,t,n){if(!t||!dp(e,t))return t;for(let r=t,i=t-n,a=0;a<pp;a++){let t=fp(e,r);if(!t||r-t<i)return r;r-=t}return t}function gp(e,t,n){for(;t!=n;t--)if(e.charCodeAt(t-1)==10)return t;return-1}function _p(e,t,n){for(;t!=n;t++)if(e.charCodeAt(t)==10)return t;return-1}var vp=e=>e>=55296&&e<=56319,yp=e=>e>=56320&&e<=57343;function bp(e,t){return!t||t==e.length||!vp(e.charCodeAt(t-1))||!yp(e.charCodeAt(t))}function xp(e,t,n){let r=n?.override;return r?r(e,t):(Kf=(n?.scanLimit??1e9)>>1,qf=n?.timeout?Date.now()+n.timeout:0,Jf=!1,sp(e,t,Gf(e,0,e.length,t,0,t.length)))}function Sp(){return!Jf}function Cp(e,t,n){return cp(xp(e,t,n),e,t)}var wp=_r.define({combine:e=>e[0]}),Tp=xr.define(),Ep=_r.define(),Dp=Cr.define({create(e){return null},update(e,t){for(let n of t.effects)n.is(Tp)&&(e=n.value);for(let n of t.state.facet(Ep))e=n(e,t);return e}});function Op(e){let t=e.field(Dp,!1);if(!t)return null;let n=e.facet(wp);return{chunks:t,side:n?n.side:null}}var kp=class e{constructor(e,t,n,r,i,a=!0){this.changes=e,this.fromA=t,this.toA=n,this.fromB=r,this.toB=i,this.precise=a}offset(t,n){return t||n?new e(this.changes,this.fromA+t,this.toA+t,this.fromB+n,this.toB+n,this.precise):this}get endA(){return Math.max(this.fromA,this.toA-1)}get endB(){return Math.max(this.fromB,this.toB-1)}static build(e,t,n){return Mp(Cp(e.toString(),t.toString(),n),e,t,0,0,Sp())}static updateA(e,t,n,r,i){return Ip(Fp(e,r,!0,n.length),e,t,n,i)}static updateB(e,t,n,r,i){return Ip(Fp(e,r,!1,t.length),e,t,n,i)}};function Ap(e,t,n,r){let i=n.lineAt(e),a=r.lineAt(t);return i.to==e&&a.to==t&&e<n.length&&t<r.length?[e+1,t+1]:[i.from,a.from]}function jp(e,t,n,r){let i=n.lineAt(e),a=r.lineAt(t);return i.from==e&&a.from==t?[e,t]:[i.to+1,a.to+1]}function Mp(e,t,n,r,i,a){let o=[];for(let s=0;s<e.length;s++){let c=e[s],[l,u]=Ap(c.fromA+r,c.fromB+i,t,n),[d,f]=jp(c.toA+r,c.toB+i,t,n),p=[c.offset(-l+r,-u+i)];for(;s<e.length-1;){let a=e[s+1],[o,c]=Ap(a.fromA+r,a.fromB+i,t,n);if(o>d+1&&c>f+1)break;p.push(a.offset(-l+r,-u+i)),[d,f]=jp(a.toA+r,a.toB+i,t,n),s++}o.push(new kp(p,l,Math.max(l,d),u,Math.max(u,f),a))}return o}var Np=1e3;function Pp(e,t,n,r){let i=0,a=e.length;for(;;){if(i==a){let r=0,a=0;i&&({toA:r,toB:a}=e[i-1]);let o=t-(n?r:a);return[r+o,a+o]}let o=i+a>>1,s=e[o],[c,l]=n?[s.fromA,s.toA]:[s.fromB,s.toB];if(c>t)a=o;else if(l<=t)i=o+1;else return r?[s.fromA,s.fromB]:[s.toA,s.toB]}}function Fp(e,t,n,r){let i=[];return t.iterChangedRanges((a,o,s,c)=>{let l=0,u=n?t.length:r,d=0,f=n?r:t.length;a>Np&&([l,d]=Pp(e,a-Np,n,!0)),o<t.length-Np&&([u,f]=Pp(e,o+Np,n,!1));let p=c-s-(o-a),m,[h,g]=n?[p,0]:[0,p];i.length&&(m=i[i.length-1]).toA>=l?i[i.length-1]={fromA:m.fromA,fromB:m.fromB,toA:u,toB:f,diffA:m.diffA+h,diffB:m.diffB+g}:i.push({fromA:l,toA:u,fromB:d,toB:f,diffA:h,diffB:g})}),i}function Ip(e,t,n,r,i){if(!e.length)return t;let a=[];for(let o=0,s=0,c=0,l=0;;o++){let u=o==e.length?null:e[o],d=u?u.fromA+s:n.length,f=u?u.fromB+c:r.length;for(;l<t.length;){let e=t[l];if(u&&(e.toA+s>d||e.toB+c>f))break;a.push(e.offset(s,c)),l++}if(!u)break;let p=u.toA+s+u.diffA,m=u.toB+c+u.diffB,h=Cp(n.sliceString(d,p),r.sliceString(f,m),i);for(let e of Mp(h,n,r,d,f,Sp()))a.push(e);for(s+=u.diffA,c+=u.diffB;l<t.length;){let e=t[l];if(e.fromA+s>p&&e.fromB+c>m)break;l++}}return a}var Lp={scanLimit:500},Rp=Or.fromClass(class{constructor(e){({deco:this.deco,gutter:this.gutter}=Jp(e))}update(e){(e.docChanged||e.viewportChanged||Bp(e.startState,e.state)||Vp(e.startState,e.state))&&({deco:this.deco,gutter:this.gutter}=Jp(e.view))}},{decorations:e=>e.deco}),zp=jr.low(kr({class:`cm-changeGutter`,markers:e=>e.plugin(Rp)?.gutter||hr.empty}));function Bp(e,t){return e.field(Dp,!1)!=t.field(Dp,!1)}function Vp(e,t){return e.facet(wp)!=t.facet(wp)}var Hp=Mr.line({class:`cm-changedLine`}),Up=Mr.mark({class:`cm-changedText`}),Wp=Mr.mark({tagName:`ins`,class:`cm-insertedLine`}),Gp=Mr.mark({tagName:`del`,class:`cm-deletedLine`}),Kp=new class extends Er{constructor(){super(...arguments),this.elementClass=`cm-changedLineGutter`}};function qp(e,t,n,r,i,a){let o=n?e.fromA:e.fromB,s=n?e.toA:e.toB,c=0;if(o!=s){i.add(o,o,Hp),i.add(o,s,n?Gp:Wp),a&&a.add(o,o,Kp);for(let l=t.iterRange(o,s-1),u=o;!l.next().done;){if(l.lineBreak){u++,i.add(u,u,Hp),a&&a.add(u,u,Kp);continue}let t=u+l.value.length;if(r)for(;c<e.changes.length;){let r=e.changes[c],a=o+(n?r.fromA:r.fromB),s=o+(n?r.toA:r.toB),l=Math.max(u,a),d=Math.min(t,s);if(l<d&&i.add(l,d,Up),s<t)c++;else break}u=t}}}function Jp(e){let t=e.state.field(Dp),{side:n,highlightChanges:r,markGutter:i,overrideChunk:a}=e.state.facet(wp),o=n==`a`,s=new Ar,c=i?new Ar:null,{from:l,to:u}=e.viewport;for(let n of t){if((o?n.fromA:n.fromB)>=u)break;(o?n.toA:n.toB)>l&&(!a||!a(e.state,n,s,c))&&qp(n,e.state.doc,o,r,s,c)}return{deco:s.finish(),gutter:c&&c.finish()}}var Yp=class extends wr{constructor(e){super(),this.height=e}eq(e){return this.height==e.height}toDOM(){let e=document.createElement(`div`);return e.className=`cm-mergeSpacer`,e.style.height=this.height+`px`,e}updateDOM(e){return e.style.height=this.height+`px`,!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}},Xp=xr.define({map:(e,t)=>e.map(t)}),Zp=Cr.define({create:()=>Mr.none,update:(e,t)=>{for(let e of t.effects)if(e.is(Xp))return e.value;return e.map(t.changes)},provide:e=>Dr.decorations.from(e)}),Qp=.01;function $p(e,t){if(e.size!=t.size)return!1;let n=e.iter(),r=t.iter();for(;n.value;){if(n.from!=r.from||Math.abs(n.value.spec.widget.height-r.value.spec.widget.height)>1)return!1;n.next(),r.next()}return!0}function em(e,t,n){let r=new Ar,i=new Ar,a=e.state.field(Zp).iter(),o=t.state.field(Zp).iter(),s=0,c=0,l=0,u=0,d=e.viewport,f=t.viewport;for(let p=0;;p++){let m=p<n.length?n[p]:null,h=m?m.fromA:e.state.doc.length,g=m?m.fromB:t.state.doc.length;if(s<h){let n=e.lineBlockAt(s).top+l-(t.lineBlockAt(c).top+u);n<-Qp?(l-=n,r.add(s,s,Mr.widget({widget:new Yp(-n),block:!0,side:-1}))):n>Qp&&(u+=n,i.add(c,c,Mr.widget({widget:new Yp(n),block:!0,side:-1})))}if(h>s+1e3&&s<d.from&&h>d.from&&c<f.from&&g>f.from){let e=Math.min(d.from-s,f.from-c);s+=e,c+=e,p--}else if(m)s=m.toA,c=m.toB;else break;for(;a.value&&a.from<s;)l-=a.value.spec.widget.height,a.next();for(;o.value&&o.from<c;)u-=o.value.spec.widget.height,o.next()}for(;a.value;)l-=a.value.spec.widget.height,a.next();for(;o.value;)u-=o.value.spec.widget.height,o.next();let p=e.contentHeight+l-(t.contentHeight+u);p<Qp?r.add(e.state.doc.length,e.state.doc.length,Mr.widget({widget:new Yp(-p),block:!0,side:1})):p>Qp&&i.add(t.state.doc.length,t.state.doc.length,Mr.widget({widget:new Yp(p),block:!0,side:1}));let m=r.finish(),h=i.finish();$p(m,e.state.field(Zp))||e.dispatch({effects:Xp.of(m)}),$p(h,t.state.field(Zp))||t.dispatch({effects:Xp.of(h)})}var tm=xr.define({map:(e,t)=>t.mapPos(e)}),nm=class extends wr{constructor(e){super(),this.lines=e}eq(e){return this.lines==e.lines}toDOM(e){let t=document.createElement(`div`);return t.className=`cm-collapsedLines`,t.textContent=e.state.phrase(`$ unchanged lines`,this.lines),t.addEventListener(`click`,t=>{let n=e.posAtDOM(t.target);e.dispatch({effects:tm.of(n)});let{side:r,sibling:i}=e.state.facet(wp);i&&i().dispatch({effects:tm.of(rm(n,e.state.field(Dp),r==`a`))})}),t}ignoreEvent(e){return e instanceof MouseEvent}get estimatedHeight(){return 27}get type(){return`collapsed-unchanged-code`}};function rm(e,t,n){let r=0,i=0;for(let a=0;;a++){let o=a<t.length?t[a]:null;if(!o||(n?o.fromA:o.fromB)>=e)return i+(e-r);[r,i]=n?[o.toA,o.toB]:[o.toB,o.toA]}}var im=Cr.define({create(e){return Mr.none},update(e,t){e=e.map(t.changes);for(let n of t.effects)n.is(tm)&&(e=e.update({filter:e=>e!=n.value}));return e},provide:e=>Dr.decorations.from(e)});function am({margin:e=3,minSize:t=4}){return im.init(n=>om(n,e,t))}function om(e,t,n){let r=new Ar,i=e.facet(wp).side==`a`,a=e.field(Dp),o=1;for(let s=0;;s++){let c=s<a.length?a[s]:null,l=s?o+t:1,u=c?e.doc.lineAt(i?c.fromA:c.fromB).number-1-t:e.doc.lines,d=u-l+1;if(d>=n&&r.add(e.doc.line(l).from,e.doc.line(u).to,Mr.replace({widget:new nm(d),block:!0})),!c)break;o=e.doc.lineAt(Math.min(e.doc.length,i?c.toA:c.toB)).number}return r.finish()}var sm=Dr.styleModule.of(new Pr({".cm-mergeView":{overflowY:`auto`},".cm-mergeViewEditors":{display:`flex`,alignItems:`stretch`},".cm-mergeViewEditor":{flexGrow:1,flexBasis:0,overflow:`hidden`},".cm-merge-revert":{width:`1.6em`,flexGrow:0,flexShrink:0,position:`relative`},".cm-merge-revert button":{position:`absolute`,display:`block`,width:`100%`,boxSizing:`border-box`,textAlign:`center`,background:`none`,border:`none`,font:`inherit`,cursor:`pointer`}})),cm=Dr.baseTheme({".cm-mergeView & .cm-scroller, .cm-mergeView &":{height:`auto !important`,overflowY:`visible !important`},"&.cm-merge-a .cm-changedLine, .cm-deletedChunk":{backgroundColor:`rgba(160, 128, 100, .08)`},"&.cm-merge-b .cm-changedLine, .cm-inlineChangedLine":{backgroundColor:`rgba(100, 160, 128, .08)`},"&light.cm-merge-a .cm-changedText, &light .cm-deletedChunk .cm-deletedText":{background:`linear-gradient(#ee443366, #ee443366) bottom/100% 2px no-repeat`},"&dark.cm-merge-a .cm-changedText, &dark .cm-deletedChunk .cm-deletedText":{background:`linear-gradient(#ffaa9966, #ffaa9966) bottom/100% 2px no-repeat`},"&light.cm-merge-b .cm-changedText":{background:`linear-gradient(#22bb22aa, #22bb22aa) bottom/100% 2px no-repeat`},"&dark.cm-merge-b .cm-changedText":{background:`linear-gradient(#88ff88aa, #88ff88aa) bottom/100% 2px no-repeat`},"&.cm-merge-b .cm-deletedText":{background:`#ff000033`},".cm-insertedLine, .cm-deletedLine, .cm-deletedLine del":{textDecoration:`none`},".cm-deletedChunk":{paddingLeft:`6px`,"& .cm-chunkButtons":{position:`absolute`,insetInlineEnd:`5px`},"& button":{border:`none`,cursor:`pointer`,color:`white`,margin:`0 2px`,borderRadius:`3px`,"&[name=accept]":{background:`#2a2`},"&[name=reject]":{background:`#d43`}}},".cm-collapsedLines":{padding:`5px 5px 5px 10px`,cursor:`pointer`,"&:before":{content:`"⦚"`,marginInlineEnd:`7px`},"&:after":{content:`"⦚"`,marginInlineStart:`7px`}},"&light .cm-collapsedLines":{color:`#444`,background:`linear-gradient(to bottom, transparent 0, #f3f3f3 30%, #f3f3f3 70%, transparent 100%)`},"&dark .cm-collapsedLines":{color:`#ddd`,background:`linear-gradient(to bottom, transparent 0, #222 30%, #222 70%, transparent 100%)`},".cm-changeGutter":{width:`3px`,paddingLeft:`1px`},"&light.cm-merge-a .cm-changedLineGutter, &light .cm-deletedLineGutter":{background:`#e43`},"&dark.cm-merge-a .cm-changedLineGutter, &dark .cm-deletedLineGutter":{background:`#fa9`},"&light.cm-merge-b .cm-changedLineGutter":{background:`#2b2`},"&dark.cm-merge-b .cm-changedLineGutter":{background:`#8f8`},".cm-inlineChangedLineGutter":{background:`#75d`}}),lm=new Nr,um=new Nr,dm=class{constructor(e){this.revertDOM=null,this.revertToA=!1,this.revertToLeft=!1,this.measuring=-1,this.diffConf=e.diffConfig||Lp;let t=[jr.low(Rp),cm,sm,Zp,Dr.updateListener.of(e=>{this.measuring<0&&(e.heightChanged||e.viewportChanged)&&!e.transactions.some(e=>e.effects.some(e=>e.is(Xp)))&&this.measure()})],n=[wp.of({side:`a`,sibling:()=>this.b,highlightChanges:e.highlightChanges!==!1,markGutter:e.gutter!==!1})];e.gutter!==!1&&n.push(zp);let r=vr.create({doc:e.a.doc,selection:e.a.selection,extensions:[e.a.extensions||[],Dr.editorAttributes.of({class:`cm-merge-a`}),um.of(n),t]}),i=[wp.of({side:`b`,sibling:()=>this.a,highlightChanges:e.highlightChanges!==!1,markGutter:e.gutter!==!1})];e.gutter!==!1&&i.push(zp);let a=vr.create({doc:e.b.doc,selection:e.b.selection,extensions:[e.b.extensions||[],Dr.editorAttributes.of({class:`cm-merge-b`}),um.of(i),t]});this.chunks=kp.build(r.doc,a.doc,this.diffConf);let o=[Dp.init(()=>this.chunks),lm.of(e.collapseUnchanged?am(e.collapseUnchanged):[])];r=r.update({effects:xr.appendConfig.of(o)}).state,a=a.update({effects:xr.appendConfig.of(o)}).state,this.dom=document.createElement(`div`),this.dom.className=`cm-mergeView`,this.editorDOM=this.dom.appendChild(document.createElement(`div`)),this.editorDOM.className=`cm-mergeViewEditors`;let s=e.orientation||`a-b`,c=document.createElement(`div`);c.className=`cm-mergeViewEditor`;let l=document.createElement(`div`);l.className=`cm-mergeViewEditor`,this.editorDOM.appendChild(s==`a-b`?c:l),this.editorDOM.appendChild(s==`a-b`?l:c),this.a=new Dr({state:r,parent:c,root:e.root,dispatchTransactions:e=>this.dispatch(e,this.a)}),this.b=new Dr({state:a,parent:l,root:e.root,dispatchTransactions:e=>this.dispatch(e,this.b)}),this.setupRevertControls(!!e.revertControls,e.revertControls==`b-to-a`,e.renderRevertControl),e.parent&&e.parent.appendChild(this.dom),this.scheduleMeasure()}dispatch(e,t){if(e.some(e=>e.docChanged)){let n=e[e.length-1],r=e.reduce((e,t)=>e.compose(t.changes),Tr.empty(e[0].startState.doc.length));this.chunks=t==this.a?kp.updateA(this.chunks,n.newDoc,this.b.state.doc,r,this.diffConf):kp.updateB(this.chunks,this.a.state.doc,n.newDoc,r,this.diffConf),t.update([...e,n.state.update({effects:Tp.of(this.chunks)})]);let i=t==this.a?this.b:this.a;i.update([i.state.update({effects:Tp.of(this.chunks)})]),this.scheduleMeasure()}else t.update(e)}reconfigure(e){if(`diffConfig`in e&&(this.diffConf=e.diffConfig),`orientation`in e){let t=e.orientation!=`b-a`;if(t!=(this.editorDOM.firstChild==this.a.dom.parentNode)){let e=this.a.dom.parentNode,n=this.b.dom.parentNode;e.remove(),n.remove(),this.editorDOM.insertBefore(t?e:n,this.editorDOM.firstChild),this.editorDOM.appendChild(t?n:e),this.revertToLeft=!this.revertToLeft,this.revertDOM&&(this.revertDOM.textContent=``)}}if(`revertControls`in e||`renderRevertControl`in e){let t=!!this.revertDOM,n=this.revertToA,r=this.renderRevert;`revertControls`in e&&(t=!!e.revertControls,n=e.revertControls==`b-to-a`),`renderRevertControl`in e&&(r=e.renderRevertControl),this.setupRevertControls(t,n,r)}let t=`highlightChanges`in e,n=`gutter`in e,r=`collapseUnchanged`in e;if(t||n||r){let i=[],a=[];if(t||n){let r=this.a.state.facet(wp),o=n?e.gutter!==!1:r.markGutter,s=t?e.highlightChanges!==!1:r.highlightChanges;i.push(um.reconfigure([wp.of({side:`a`,sibling:()=>this.b,highlightChanges:s,markGutter:o}),o?zp:[]])),a.push(um.reconfigure([wp.of({side:`b`,sibling:()=>this.a,highlightChanges:s,markGutter:o}),o?zp:[]]))}if(r){let t=lm.reconfigure(e.collapseUnchanged?am(e.collapseUnchanged):[]);i.push(t),a.push(t)}this.a.dispatch({effects:i}),this.b.dispatch({effects:a})}this.scheduleMeasure()}setupRevertControls(e,t,n){this.revertToA=t,this.revertToLeft=this.revertToA==(this.editorDOM.firstChild==this.a.dom.parentNode),this.renderRevert=n,!e&&this.revertDOM?(this.revertDOM.remove(),this.revertDOM=null):e&&!this.revertDOM?(this.revertDOM=this.editorDOM.insertBefore(document.createElement(`div`),this.editorDOM.firstChild.nextSibling),this.revertDOM.addEventListener(`mousedown`,e=>this.revertClicked(e)),this.revertDOM.className=`cm-merge-revert`):this.revertDOM&&(this.revertDOM.textContent=``)}scheduleMeasure(){this.measuring<0&&(this.measuring=(this.dom.ownerDocument.defaultView||window).requestAnimationFrame(()=>{this.measuring=-1,this.measure()}))}measure(){em(this.a,this.b,this.chunks),this.revertDOM&&this.updateRevertButtons()}updateRevertButtons(){let e=this.revertDOM,t=e.firstChild,n=this.a.viewport,r=this.b.viewport;for(let i=0;i<this.chunks.length;i++){let a=this.chunks[i];if(a.fromA>n.to||a.fromB>r.to)break;if(a.fromA<n.from||a.fromB<r.from)continue;let o=this.a.lineBlockAt(a.fromA).top+`px`;for(;t&&+t.dataset.chunk<i;)t=fm(t);t&&t.dataset.chunk==String(i)?(t.style.top!=o&&(t.style.top=o),t=t.nextSibling):e.insertBefore(this.renderRevertButton(o,i),t)}for(;t;)t=fm(t)}renderRevertButton(e,t){let n;if(this.renderRevert)n=this.renderRevert();else{n=document.createElement(`button`);let e=this.a.state.phrase(`Revert this chunk`);n.setAttribute(`aria-label`,e),n.setAttribute(`title`,e),n.textContent=this.revertToLeft?`⇜`:`⇝`}return n.style.top=e,n.setAttribute(`data-chunk`,String(t)),n}revertClicked(e){let t=e.target,n;for(;t&&t.parentNode!=this.revertDOM;)t=t.parentNode;if(t&&(n=this.chunks[t.dataset.chunk])){let[t,r,i,a,o,s]=this.revertToA?[this.b,this.a,n.fromB,n.toB,n.fromA,n.toA]:[this.a,this.b,n.fromA,n.toA,n.fromB,n.toB],c=t.state.sliceDoc(i,Math.max(i,a-1));i!=a&&s<=r.state.doc.length&&(c+=t.state.lineBreak),r.dispatch({changes:{from:o,to:Math.min(r.state.doc.length,s),insert:c},userEvent:`revert`}),e.preventDefault()}}destroy(){this.a.destroy(),this.b.destroy(),this.measuring>-1&&(this.dom.ownerDocument.defaultView||window).cancelAnimationFrame(this.measuring),this.dom.remove()}};function fm(e){let t=e.nextSibling;return e.remove(),t}var pm=new class extends Er{constructor(){super(...arguments),this.elementClass=`cm-deletedLineGutter`}},mm=jr.low(kr({class:`cm-changeGutter`,markers:e=>e.plugin(Rp)?.gutter||hr.empty,widgetMarker:(e,t)=>t instanceof ym?pm:null}));function hm(e){let t=typeof e.original==`string`?br.of(e.original.split(/\r?\n/)):e.original,n=e.diffConfig||Lp;return[jr.low(Rp),wm,cm,Dr.editorAttributes.of({class:`cm-merge-b`}),Ep.of((e,t)=>{let r=t.effects.find(e=>e.is(gm));return r&&(e=kp.updateA(e,r.value.doc,t.startState.doc,r.value.changes,n)),t.docChanged&&(e=kp.updateB(e,t.state.field(_m),t.newDoc,t.changes,n)),e}),wp.of({highlightChanges:e.highlightChanges!==!1,markGutter:e.gutter!==!1,syntaxHighlightDeletions:e.syntaxHighlightDeletions!==!1,syntaxHighlightDeletionsMaxLength:3e3,mergeControls:e.mergeControls??!0,overrideChunk:e.allowInlineDiffs?Am:void 0,side:`b`}),_m.init(()=>t),e.gutter===!1?[]:mm,e.collapseUnchanged?am(e.collapseUnchanged):[],Dp.init(e=>kp.build(t,e.doc,n))]}var gm=xr.define(),_m=Cr.define({create:()=>br.empty,update(e,t){for(let n of t.effects)n.is(gm)&&(e=n.value.doc);return e}}),vm=new WeakMap,ym=class extends wr{constructor(e){super(),this.buildDOM=e,this.dom=null}eq(e){return this.dom==e.dom}toDOM(e){return this.dom||=this.buildDOM(e)}};function bm(e,t,n){let r=vm.get(t.changes);if(r)return r;let i=Mr.widget({block:!0,side:-1,widget:new ym(r=>{let{highlightChanges:i,syntaxHighlightDeletions:a,syntaxHighlightDeletionsMaxLength:o,mergeControls:s}=e.facet(wp),c=document.createElement(`div`);if(c.className=`cm-deletedChunk`,s){let t=c.appendChild(document.createElement(`div`));t.className=`cm-chunkButtons`;let n=e=>{e.preventDefault(),xm(r,r.posAtDOM(c))},i=e=>{e.preventDefault(),Sm(r,r.posAtDOM(c))};if(typeof s==`function`)t.appendChild(s(`accept`,n)),t.appendChild(s(`reject`,i));else{let r=t.appendChild(document.createElement(`button`));r.name=`accept`,r.textContent=e.phrase(`Accept`),r.onmousedown=n;let a=t.appendChild(document.createElement(`button`));a.name=`reject`,a.textContent=e.phrase(`Reject`),a.onmousedown=i}}if(n||t.fromA>=t.toA)return c;let l=r.state.field(_m).sliceString(t.fromA,t.endA),u=a&&e.facet(Sr),d=h(),f=t.changes,p=0,m=!1;function h(){let e=c.appendChild(document.createElement(`div`));return e.className=`cm-deletedLine`,e.appendChild(document.createElement(`del`))}function g(e,t,n){for(let r=e;r<t;){if(l.charAt(r)==`
|
|
15
|
-
`){d.firstChild||d.appendChild(document.createElement(`br`)),d=h(),r++;continue}let e=t,a=n+(m?` cm-deletedText`:``),o=!1,s=l.indexOf(`
|
|
16
|
-
`,r);if(s>-1&&s<t&&(e=s),i&&p<f.length){let t=Math.max(0,m?f[p].toA:f[p].fromA);t<=e&&(e=t,m&&p++,o=!0)}if(e>r){let t=document.createTextNode(l.slice(r,e));if(a){let e=d.appendChild(document.createElement(`span`));e.className=a,e.appendChild(t)}else d.appendChild(t);r=e}o&&(m=!m)}}if(u&&t.toA-t.fromA<=o){let t=u.parser.parse(l),n=0;yr(t,{style:t=>gr(e,t)},(e,t,r)=>{e>n&&g(n,e,``),g(e,t,r),n=t}),g(n,l.length,``)}else g(0,l.length,``);return d.firstChild||d.appendChild(document.createElement(`br`)),c})});return vm.set(t.changes,i),i}function xm(e,t){let{state:n}=e,r=t??n.selection.main.head,i=e.state.field(Dp).find(e=>e.fromB<=r&&e.endB>=r);if(!i)return!1;let a=e.state.sliceDoc(i.fromB,Math.max(i.fromB,i.toB-1)),o=e.state.field(_m);i.fromB!=i.toB&&i.toA<=o.length&&(a+=e.state.lineBreak);let s=Tr.of({from:i.fromA,to:Math.min(o.length,i.toA),insert:a},o.length);return e.dispatch({effects:gm.of({doc:s.apply(o),changes:s}),userEvent:`accept`}),!0}function Sm(e,t){let{state:n}=e,r=t??n.selection.main.head,i=n.field(Dp).find(e=>e.fromB<=r&&e.endB>=r);if(!i)return!1;let a=n.field(_m).sliceString(i.fromA,Math.max(i.fromA,i.toA-1));return i.fromA!=i.toA&&i.toB<=n.doc.length&&(a+=n.lineBreak),e.dispatch({changes:{from:i.fromB,to:Math.min(n.doc.length,i.toB),insert:a},userEvent:`revert`}),!0}function Cm(e){let t=new Ar;for(let n of e.field(Dp)){let r=e.facet(wp).overrideChunk&&Em(e,n);t.add(n.fromB,n.fromB,bm(e,n,!!r))}return t.finish()}var wm=Cr.define({create:e=>Cm(e),update(e,t){return t.state.field(Dp,!1)==t.startState.field(Dp,!1)?e:Cm(t.state)},provide:e=>Dr.decorations.from(e)}),Tm=new WeakMap;function Em(e,t){let n=Tm.get(t);if(n!==void 0)return n;n=null;let r=e.field(_m),i=e.doc,a=r.lineAt(t.endA).number-r.lineAt(t.fromA).number+1,o=i.lineAt(t.endB).number-i.lineAt(t.fromB).number+1;abort:if(a==o&&a<10){let e=[],i=0,o=t.fromA,s=t.fromB;for(let n of t.changes){if(n.fromA<n.toA){i+=n.toA-n.fromA;let t=r.sliceString(o+n.fromA,o+n.toA);if(/\n/.test(t))break abort;e.push(Mr.widget({widget:new Dm(t),side:-1}).range(s+n.fromB))}n.fromB<n.toB&&e.push(Up.range(s+n.fromB,s+n.toB))}i<t.endA-t.fromA-a*2&&(n=e)}return Tm.set(t,n),n}var Dm=class extends wr{constructor(e){super(),this.text=e}eq(e){return this.text==e.text}toDOM(e){let t=document.createElement(`del`);return t.className=`cm-deletedText`,t.textContent=this.text,t}},Om=new class extends Er{constructor(){super(...arguments),this.elementClass=`cm-inlineChangedLineGutter`}},km=Mr.line({class:`cm-inlineChangedLine`});function Am(e,t,n,r){let i=Em(e,t),a=0;if(!i)return!1;for(let o=e.doc.lineAt(t.fromB);;){for(r&&r.add(o.from,o.from,Om),n.add(o.from,o.from,km);a<i.length&&i[a].to<=o.to;){let e=i[a++];n.add(e.from,e.to,e.value)}if(o.to>=t.endB)break;o=e.doc.lineAt(o.to+1)}return!0}var jm=pr({settings:{background:`var(--background)`,gutterBackground:`var(--muted)`}}),Mm=cr({settings:{background:`var(--background)`,gutterBackground:`var(--muted)`}});function Nm(e){let t=(0,Q.c)(20),{oldContent:n,newContent:r,layout:i,conflictMode:a,onResolve:o,onAbort:s}=e,c=(0,Z.useRef)(null),l=(0,Z.useRef)(null),{resolvedTheme:u}=T(),d=(0,Z.useRef)(o),f=(0,Z.useRef)(s),[p,m]=(0,Z.useState)(null),h;t[0]!==s||t[1]!==o?(h=()=>{d.current=o,f.current=s},t[0]=s,t[1]=o,t[2]=h):h=t[2],(0,Z.useEffect)(h);let g,_;t[3]!==a||t[4]!==i||t[5]!==r||t[6]!==n||t[7]!==u?(g=()=>{if(!c.current)return;let e=u===`dark`?jm:Mm,t=[Dr.editable.of(!1),vr.readOnly.of(!0)],o=[fr,or(),...t,e,Dr.lineWrapping];if(l.current&&=(l.current.destroy(),null),a){let t=new Dr({doc:r,extensions:[fr,or(),Dr.editable.of(!1),e,Dr.lineWrapping,hm({original:n,highlightChanges:!0,gutter:!0,mergeControls:!0,collapseUnchanged:{margin:3,minSize:4}}),Dr.updateListener.of(e=>{let t=Op(e.state);m(t?t.chunks.length:0)})],parent:c.current});l.current=t;let i=Op(t.state);m(i?i.chunks.length:0)}else i===`split`?l.current=new dm({a:{doc:n,extensions:o},b:{doc:r,extensions:o},parent:c.current,highlightChanges:!0,gutter:!0,collapseUnchanged:{margin:3,minSize:4}}):l.current=new Dr({doc:r,extensions:[...o,hm({original:n,highlightChanges:!0,gutter:!0,mergeControls:!1,collapseUnchanged:{margin:3,minSize:4}})],parent:c.current});return()=>{l.current&&=(l.current.destroy(),null)}},_=[n,r,i,u,a],t[3]=a,t[4]=i,t[5]=r,t[6]=n,t[7]=u,t[8]=g,t[9]=_):(g=t[8],_=t[9]),(0,Z.useEffect)(g,_);let v;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(v=function(){let e=l.current;!e||!(e instanceof Dr)||d.current?.(e.state.doc.toString())},t[10]=v):v=t[10];let y=v,b=p===0,x=p===null?``:p===0?`All hunks resolved`:`${p} unresolved hunk${p===1?``:`s`}`,S;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,X.jsx)(`div`,{ref:c,className:`diff-view min-h-0 flex-1 overflow-y-auto subtle-scrollbar`}),t[11]=S):S=t[11];let C;t[12]!==b||t[13]!==a||t[14]!==x||t[15]!==s||t[16]!==o?(C=a&&(0,X.jsxs)(`div`,{className:`flex items-center justify-between gap-2 px-3 py-2 border-t shrink-0`,children:[(0,X.jsx)(`span`,{className:`text-xs ${b?`text-emerald-600 dark:text-emerald-400`:`text-muted-foreground`}`,children:x}),(0,X.jsxs)(`div`,{className:`flex items-center gap-2`,children:[s&&(0,X.jsx)(q,{variant:`ghost`,size:`sm`,onClick:s,children:`Exit merge`}),o&&(0,X.jsx)(q,{variant:`default`,size:`sm`,disabled:!b,onClick:y,children:`Save resolution`})]})]}),t[12]=b,t[13]=a,t[14]=x,t[15]=s,t[16]=o,t[17]=C):C=t[17];let w;return t[18]===C?w=t[19]:(w=(0,X.jsxs)(`div`,{className:`flex flex-col h-full`,children:[S,C]}),t[18]=C,t[19]=w),w}function Pm(e){let t=(0,Q.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,X.jsx)(Vt,{"data-slot":`sheet`,...n}),t[2]=n,t[3]=r),r}function Fm(e){let t=(0,Q.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,X.jsx)(Wt,{"data-slot":`sheet-portal`,...n}),t[2]=n,t[3]=r),r}function Im(e){let t=(0,Q.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=G(`fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,X.jsx)(It,{"data-slot":`sheet-overlay`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Lm(e){let t=(0,Q.c)(17),n,r,i,a,o;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5]):({className:r,children:n,side:a,showCloseButton:o,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o);let s=a===void 0?`right`:a,c=o===void 0?!0:o,l;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,X.jsx)(Im,{}),t[6]=l):l=t[6];let u;t[7]===r?u=t[8]:(u=G(`fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-[side=bottom]:data-open:slide-in-from-bottom-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:animate-out data-closed:fade-out-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=right]:data-closed:slide-out-to-right-10 data-[side=top]:data-closed:slide-out-to-top-10`,r),t[7]=r,t[8]=u);let d;t[9]===c?d=t[10]:(d=c&&(0,X.jsx)(Bt,{"data-slot":`sheet-close`,asChild:!0,children:(0,X.jsxs)(q,{variant:`ghost`,className:`absolute top-3 right-3`,size:`icon-sm`,children:[(0,X.jsx)(jt,{}),(0,X.jsx)(`span`,{className:`sr-only`,children:`Close`})]})}),t[9]=c,t[10]=d);let f;return t[11]!==n||t[12]!==i||t[13]!==s||t[14]!==u||t[15]!==d?(f=(0,X.jsxs)(Fm,{children:[l,(0,X.jsxs)(Jt,{"data-slot":`sheet-content`,"data-side":s,className:u,...i,children:[n,d]})]}),t[11]=n,t[12]=i,t[13]=s,t[14]=u,t[15]=d,t[16]=f):f=t[16],f}function Rm(e){let t=(0,Q.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=G(`flex flex-col gap-0.5 p-4`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,X.jsx)(`div`,{"data-slot":`sheet-header`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function zm(e){let t=(0,Q.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=G(`font-heading text-base font-medium text-foreground`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,X.jsx)(Rt,{"data-slot":`sheet-title`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}async function Bm(){try{let e=await fetch(`/api/sync/conflicts`);return e.ok?{conflicts:(await e.json()).conflicts??[]}:{conflicts:[],error:`server`}}catch{return{conflicts:[],error:`network`}}}async function Vm(e){try{let t=await fetch(`/api/sync/conflict-content?file=${encodeURIComponent(e)}`);if(!t.ok)return{ours:``,theirs:``,base:``};let n=await t.json();return{ours:n.ours??``,theirs:n.theirs??``,base:n.base??``}}catch{return{ours:``,theirs:``,base:``}}}async function Hm(e,t,n){try{let r={file:e,strategy:t};return n!==void 0&&(r.content=n),(await fetch(`/api/sync/resolve-conflict`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(r)})).ok}catch{return!1}}var Um=`w-[98vw] !max-w-[98vw] h-[96vh] flex flex-col gap-0 sm:!max-w-[98vw]`;function Wm(e){let t=(0,Q.c)(31),{file:n,onResolve:r,onAbort:i}=e,[a,o]=(0,Z.useState)(null),s,c;if(t[0]===n?(s=t[1],c=t[2]):(s=()=>{let e=!1;return Vm(n).then(t=>{e||o(t)}),()=>{e=!0}},c=[n],t[0]=n,t[1]=s,t[2]=c),(0,Z.useEffect)(s,c),a===null){let e;t[3]===i?e=t[4]:(e=e=>!e&&i(),t[3]=i,t[4]=e);let r;t[5]===n?r=t[6]:(r=(0,X.jsx)(Kt,{className:`shrink-0`,children:(0,X.jsxs)(Ft,{children:[`Resolving: `,n]})}),t[5]=n,t[6]=r);let a;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,X.jsx)(`div`,{className:`flex-1 flex items-center justify-center text-sm text-muted-foreground`,children:`Loading…`}),t[7]=a):a=t[7];let o;t[8]===r?o=t[9]:(o=(0,X.jsxs)(zt,{className:Um,children:[r,a]}),t[8]=r,t[9]=o);let s;return t[10]!==e||t[11]!==o?(s=(0,X.jsx)(qt,{open:!0,onOpenChange:e,children:o}),t[10]=e,t[11]=o,t[12]=s):s=t[12],s}let l;t[13]===i?l=t[14]:(l=e=>!e&&i(),t[13]=i,t[14]=l);let u;t[15]===n?u=t[16]:(u=(0,X.jsxs)(Ft,{className:`text-sm font-medium`,children:[`Resolving: `,n]}),t[15]=n,t[16]=u);let d;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,X.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Red = your version (ours). Green = team's version (theirs). Accept each hunk to take theirs, reject to keep yours, then save.`}),t[17]=d):d=t[17];let f;t[18]===u?f=t[19]:(f=(0,X.jsxs)(Kt,{className:`px-4 pt-4 pb-2 shrink-0`,children:[u,d]}),t[18]=u,t[19]=f);let p;t[20]!==i||t[21]!==r||t[22]!==a.ours||t[23]!==a.theirs?(p=(0,X.jsx)(`div`,{className:`flex-1 min-h-0 overflow-hidden`,children:(0,X.jsx)(Nm,{oldContent:a.ours,newContent:a.theirs,layout:`unified`,conflictMode:!0,onResolve:r,onAbort:i})}),t[20]=i,t[21]=r,t[22]=a.ours,t[23]=a.theirs,t[24]=p):p=t[24];let m;t[25]!==f||t[26]!==p?(m=(0,X.jsxs)(zt,{className:`${Um} p-0`,children:[f,p]}),t[25]=f,t[26]=p,t[27]=m):m=t[27];let h;return t[28]!==l||t[29]!==m?(h=(0,X.jsx)(qt,{open:!0,onOpenChange:l,children:m}),t[28]=l,t[29]=m,t[30]=h):h=t[30],h}function Gm(e){let t=(0,Q.c)(50),{open:n,onOpenChange:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=[],t[0]=i):i=t[0];let[a,o]=(0,Z.useState)(i),[s,c]=(0,Z.useState)(null),l;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(l=new Set,t[1]=l):l=t[1];let[u,d]=(0,Z.useState)(l),f;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(f=new Set,t[2]=f):f=t[2];let[p,m]=(0,Z.useState)(f),[h,g]=(0,Z.useState)(null),_;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(_=function(){Bm().then(e=>{let{conflicts:t,error:n}=e;c(n??null),o(t),d(e=>{let n=new Set(t.map(Km));return new Set([...e].filter(e=>!n.has(e)))})})},t[3]=_):_=t[3];let v=_,y,b;t[4]===n?(y=t[5],b=t[6]):(y=()=>{n&&v()},b=[n],t[4]=n,t[5]=y,t[6]=b),(0,Z.useEffect)(y,b);let x,S;t[7]===n?(x=t[8],S=t[9]):(x=()=>Gn(e=>{e.includes(`sync-status`)&&n&&v()}),S=[n],t[7]=n,t[8]=x,t[9]=S),(0,Z.useEffect)(x,S);let C,w;t[10]!==a.length||t[11]!==r||t[12]!==n||t[13]!==u.size?(w=()=>{n&&a.length>0&&u.size>=a.length&&(Xt.success(`All conflicts resolved — sync resuming`),r(!1),d(new Set))},C=[n,a.length,u.size,r],t[10]=a.length,t[11]=r,t[12]=n,t[13]=u.size,t[14]=C,t[15]=w):(C=t[14],w=t[15]),(0,Z.useEffect)(w,C);let T;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(T=async function(e,t,n){m(t=>new Set([...t,e]));let r=await Hm(e,t,n);m(t=>{let n=new Set(t);return n.delete(e),n}),r?d(t=>new Set([...t,e])):Xt.error(`Failed to resolve ${e}`)},t[16]=T):T=t[16];let E=T,D;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(D=function(e){g(e)},t[17]=D):D=t[17];let O=D,k;t[18]===h?k=t[19]:(k=async function(e){if(!h)return;let t=h;g(null),await E(t,`content`,e)},t[18]=h,t[19]=k);let A=k,j;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(j=function(){g(null)},t[20]=j):j=t[20];let M=j,N;t[21]===r?N=t[22]:(N=async function(){try{(await fetch(`/api/sync/abort-merge`,{method:`POST`})).ok?Xt.info(`Merge aborted — sync paused`):Xt.error(`Failed to abort merge`)}catch{Xt.error(`Failed to abort merge — connection error`)}r(!1),d(new Set)},t[21]=r,t[22]=N);let P=N,F=a.length,I=u.size,L;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,X.jsx)(zm,{className:`text-sm font-medium`,children:`Resolve conflicts`}),t[23]=L):L=t[23];let R;t[24]!==I||t[25]!==F?(R=F>0&&(0,X.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[I,` of `,F,` resolved`]}),t[24]=I,t[25]=F,t[26]=R):R=t[26];let z;t[27]===R?z=t[28]:(z=(0,X.jsxs)(Rm,{className:`px-4 py-3 border-b shrink-0`,children:[L,R]}),t[27]=R,t[28]=z);let B;t[29]!==a||t[30]!==s||t[31]!==u||t[32]!==p?(B=(0,X.jsx)(`div`,{className:`flex-1 overflow-y-auto subtle-scrollbar`,children:s?(0,X.jsxs)(`div`,{className:`px-4 py-6 text-sm text-center space-y-2`,children:[(0,X.jsx)(`p`,{className:`text-destructive`,children:s===`network`?`Could not reach the sync server — check your connection.`:`Sync server error — try again in a moment.`}),(0,X.jsx)(q,{variant:`outline`,size:`sm`,onClick:v,children:`Retry`})]}):a.length===0?(0,X.jsx)(`p`,{className:`px-4 py-6 text-sm text-muted-foreground text-center`,children:`No conflicts found.`}):(0,X.jsx)(`ul`,{className:`divide-y`,children:a.map(e=>{let t=u.has(e.file),n=p.has(e.file),r=e.file.split(`/`).pop()??e.file;return(0,X.jsxs)(`li`,{className:`px-4 py-3 ${t?`opacity-50`:``}`,children:[(0,X.jsxs)(`p`,{className:`text-sm font-medium truncate mb-2`,title:e.file,children:[t?`✓ `:``,r]}),!t&&(0,X.jsxs)(`div`,{className:`flex flex-wrap gap-1`,children:[(0,X.jsx)(q,{variant:`outline`,size:`xs`,disabled:n,onClick:()=>void E(e.file,`mine`),children:`Keep my version`}),(0,X.jsx)(q,{variant:`outline`,size:`xs`,disabled:n,onClick:()=>void E(e.file,`theirs`),children:`Keep team's version`}),(0,X.jsx)(q,{variant:`ghost`,size:`xs`,disabled:n,onClick:()=>O(e.file),children:`Resolve manually`})]})]},e.file)})})}),t[29]=a,t[30]=s,t[31]=u,t[32]=p,t[33]=B):B=t[33];let V;t[34]===P?V=t[35]:(V=(0,X.jsx)(`div`,{className:`px-4 py-3 border-t shrink-0`,children:(0,X.jsx)(q,{variant:`ghost`,size:`sm`,className:`w-full`,onClick:P,children:`Exit merge`})}),t[34]=P,t[35]=V);let H;t[36]!==z||t[37]!==B||t[38]!==V?(H=(0,X.jsxs)(Lm,{side:`right`,className:`w-80 sm:w-96 flex flex-col gap-0 p-0`,children:[z,B,V]}),t[36]=z,t[37]=B,t[38]=V,t[39]=H):H=t[39];let U;t[40]!==r||t[41]!==n||t[42]!==H?(U=(0,X.jsx)(Pm,{open:n,onOpenChange:r,children:H}),t[40]=r,t[41]=n,t[42]=H,t[43]=U):U=t[43];let ee;t[44]!==A||t[45]!==h?(ee=h&&(0,X.jsx)(Wm,{file:h,onResolve:e=>void A(e),onAbort:M}),t[44]=A,t[45]=h,t[46]=ee):ee=t[46];let W;return t[47]!==U||t[48]!==ee?(W=(0,X.jsxs)(X.Fragment,{children:[U,ee]}),t[47]=U,t[48]=ee,t[49]=W):W=t[49],W}function Km(e){return e.file}async function qm(e){let t=await fetch(`/api/backlinks?docName=${encodeURIComponent(e)}`);if(!t.ok)throw Error(`Server error: ${t.status} ${t.statusText}`);let n=await t.json();if(!n.ok)throw Error(n.error??`Failed to load backlinks`);return n.backlinks??[]}function Jm(e){let t=(0,Q.c)(32),{docName:n,className:r}=e,i=r===void 0?``:r,{folderPaths:a,pages:o,loading:s}=Yn(),c,l;t[0]===n?(c=t[1],l=t[2]):(c=[`backlinks`,n],l=()=>qm(n),t[0]=n,t[1]=c,t[2]=l);let u;t[3]!==n||t[4]!==s||t[5]!==o?(u=!s&&o.has(n),t[3]=n,t[4]=s,t[5]=o,t[6]=u):u=t[6];let d;t[7]!==c||t[8]!==l||t[9]!==u?(d={queryKey:c,queryFn:l,enabled:u},t[7]=c,t[8]=l,t[9]=u,t[10]=d):d=t[10];let{data:f,isLoading:p,error:m}=N(d),g;t[11]===f?g=t[12]:(g=f===void 0?[]:f,t[11]=f,t[12]=g);let _=g,v;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,X.jsx)(j,{children:`Backlinks`}),t[13]=v):v=t[13];let y;t[14]!==_||t[15]!==p?(y=!p&&(0,X.jsx)(A,{children:_.length}),t[14]=_,t[15]=p,t[16]=y):y=t[16];let b;t[17]===y?b=t[18]:(b=(0,X.jsxs)(O,{children:[v,y]}),t[17]=y,t[18]=b);let x;t[19]!==_||t[20]!==m||t[21]!==a||t[22]!==p||t[23]!==o?(x=m?(0,X.jsx)(h,{children:m instanceof Error?m.message:`Failed to load backlinks`}):_.length===0&&!p?(0,X.jsx)(S,{children:`No pages link here yet.`}):(0,X.jsx)(`div`,{className:`flex flex-col gap-2`,children:_.map((e,t)=>(0,X.jsxs)(`button`,{type:`button`,className:`block w-full rounded-lg border border-border bg-background/80 px-3 py-2 text-left transition-colors hover:bg-accent hover:text-accent-foreground`,onClick:()=>{let t=je(e.source,{pages:o,folderPaths:a});window.location.assign(zn(t.hashDocName,e.anchor))},children:[(0,X.jsx)(`div`,{className:`truncate text-sm font-medium`,children:e.title}),(0,X.jsx)(`div`,{className:`truncate text-xs text-muted-foreground`,children:e.source}),e.snippet?(0,X.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:e.snippet}):null]},`${e.source}-${t}`))}),t[19]=_,t[20]=m,t[21]=a,t[22]=p,t[23]=o,t[24]=x):x=t[24];let C;t[25]!==p||t[26]!==x?(C=(0,X.jsx)(D,{"aria-busy":p,children:x}),t[25]=p,t[26]=x,t[27]=C):C=t[27];let w;return t[28]!==i||t[29]!==b||t[30]!==C?(w=(0,X.jsxs)(M,{className:i,children:[b,C]}),t[28]=i,t[29]=b,t[30]=C,t[31]=w):w=t[31],w}function Ym(e){let t=e.split(`/`);return t.length<=2?e:`…/${t.slice(-2).join(`/`)}`}async function Xm(e){let t=await fetch(`/api/forward-links?docName=${encodeURIComponent(e)}`);if(!t.ok)throw Error(`Server error: ${t.status} ${t.statusText}`);let n=await t.json();if(!n.ok)throw Error(n.error??`Failed to load outgoing links`);return n.forwardLinks??[]}function Zm(e){let t=(0,Q.c)(50),{docName:n,className:r}=e,i=r===void 0?``:r,{folderPaths:a,pages:o,loading:s}=Yn(),c,l;t[0]===n?(c=t[1],l=t[2]):(c=[`forward-links`,n],l=()=>Xm(n),t[0]=n,t[1]=c,t[2]=l);let u;t[3]!==n||t[4]!==o||t[5]!==s?(u=!s&&o.has(n),t[3]=n,t[4]=o,t[5]=s,t[6]=u):u=t[6];let d;t[7]!==c||t[8]!==l||t[9]!==u?(d={queryKey:c,queryFn:l,enabled:u},t[7]=c,t[8]=l,t[9]=u,t[10]=d):d=t[10];let{data:f,isLoading:p,error:m}=N(d),g;t[11]===f?g=t[12]:(g=f===void 0?[]:f,t[11]=f,t[12]=g);let _=g,[v,y]=(0,Z.useState)(null),b;if(t[13]!==v||t[14]!==a||t[15]!==o){let e=v===null?null:We(v.docName,{pages:o,folderPaths:a});b=e===null?null:e.kind===`create`?{initialDir:e.initialDir,suggestedName:e.suggestedName}:Dt(e),t[13]=v,t[14]=a,t[15]=o,t[16]=b}else b=t[16];let x=b,C;t[17]!==a||t[18]!==o||t[19]!==s?(C=function(e){if(e.kind===`external`){window.open(e.url,`_blank`,`noopener,noreferrer`);return}let t=We(e.docName,{pages:o,folderPaths:a});if(!s&&t.kind===`create`){y(e);return}let n=t.kind===`navigate`?t.hashDocName:e.docName;window.location.assign(zn(n,e.anchor))},t[17]=a,t[18]=o,t[19]=s,t[20]=C):C=t[20];let w=C,T;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,X.jsx)(j,{children:`Outgoing Links`}),t[21]=T):T=t[21];let E;t[22]!==p||t[23]!==_?(E=!p&&(0,X.jsx)(A,{children:_.length}),t[22]=p,t[23]=_,t[24]=E):E=t[24];let k;t[25]===E?k=t[26]:(k=(0,X.jsxs)(O,{children:[T,E]}),t[25]=E,t[26]=k);let P;t[27]!==m||t[28]!==a||t[29]!==w||t[30]!==p||t[31]!==_||t[32]!==o||t[33]!==s?(P=m?(0,X.jsx)(h,{children:m instanceof Error?m.message:`Failed to load outgoing links`}):_.length===0&&!p?(0,X.jsx)(S,{children:`This page doesn't link to anything yet.`}):(0,X.jsx)(`div`,{className:`flex flex-col gap-2`,children:_.map(e=>{let t=e.kind===`doc`?We(e.docName,{pages:o,folderPaths:a}):null,n=e.kind===`doc`&&!s&&t?.kind===`create`,r=e.kind===`doc`&&!s&&t?.kind===`navigate`&&t.displayState===`folder`,i=e.kind===`doc`?Ym(e.docName):e.url,c=e.kind===`doc`&&e.title===e.docName?i:e.title,l=e.kind===`doc`?`doc:${e.docName}:${e.anchor??``}`:`ext:${e.url}`;return(0,X.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,X.jsx)(q,{variant:`outline`,className:G(`h-auto w-full items-start justify-start whitespace-normal px-3 py-2 text-left`,n&&`border-amber-300 bg-amber-50/70 text-amber-950 hover:bg-amber-100 dark:border-amber-900 dark:bg-amber-950/20 dark:text-amber-200 dark:hover:bg-amber-950/35`,r&&`border-sky-300 bg-sky-50/70 text-sky-950 hover:bg-sky-100 dark:border-sky-900 dark:bg-sky-950/20 dark:text-sky-100 dark:hover:bg-sky-950/35`),onClick:()=>w(e),children:(0,X.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,X.jsx)(`div`,{className:`truncate text-sm font-medium`,title:e.kind===`doc`&&e.title===e.docName?e.docName:e.kind===`external`?e.url:void 0,children:(0,X.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[(0,X.jsx)(`span`,{children:c}),e.kind===`external`?(0,X.jsx)(Ee,{className:`size-3.5 shrink-0 text-muted-foreground`,"aria-hidden":`true`}):null]})}),e.kind===`doc`&&e.title!==e.docName?(0,X.jsx)(`div`,{className:`truncate font-mono text-xs text-muted-foreground`,title:e.docName,children:i}):null,e.kind===`external`?(0,X.jsx)(`div`,{className:`mt-0.5 truncate font-mono text-xs text-muted-foreground`,children:e.url}):null,n?(0,X.jsxs)(`div`,{className:`mt-0.5 flex items-center gap-1.5 text-xs text-amber-700 dark:text-amber-300`,children:[(0,X.jsx)(Et,{className:`size-3 shrink-0`,"aria-hidden":`true`}),(0,X.jsx)(`span`,{children:`Missing page. Click to create.`})]}):null,r?(0,X.jsxs)(`div`,{className:`mt-0.5 flex items-center gap-1.5 text-xs text-sky-700 dark:text-sky-300`,children:[(0,X.jsx)(rt,{className:`size-3 shrink-0`,"aria-hidden":`true`}),(0,X.jsx)(`span`,{children:`Folder target. Click to open the overview.`})]}):null,e.snippet?(0,X.jsx)(`p`,{className:`mt-1 break-words text-sm text-muted-foreground`,children:e.snippet}):null]})}),r?(0,X.jsxs)(q,{variant:`outline`,size:`sm`,className:`self-start`,onClick:()=>y(e),children:[(0,X.jsx)(Et,{className:`size-3.5`}),`Create index note`]}):null]},l)})}),t[27]=m,t[28]=a,t[29]=w,t[30]=p,t[31]=_,t[32]=o,t[33]=s,t[34]=P):P=t[34];let F;t[35]!==p||t[36]!==P?(F=(0,X.jsx)(D,{"aria-busy":p,children:P}),t[35]=p,t[36]=P,t[37]=F):F=t[37];let I;t[38]!==i||t[39]!==k||t[40]!==F?(I=(0,X.jsxs)(M,{className:i,children:[k,F]}),t[38]=i,t[39]=k,t[40]=F,t[41]=I):I=t[41];let L=v!==null,R=x?.initialDir??``,z=x?.suggestedName,B;t[42]===Symbol.for(`react.memo_cache_sentinel`)?(B=e=>{e||y(null)},t[42]=B):B=t[42];let V;t[43]!==L||t[44]!==R||t[45]!==z?(V=(0,X.jsx)(Ot,{open:L,kind:`file`,initialDir:R,suggestedName:z,onOpenChange:B}),t[43]=L,t[44]=R,t[45]=z,t[46]=V):V=t[46];let H;return t[47]!==I||t[48]!==V?(H=(0,X.jsxs)(X.Fragment,{children:[I,V]}),t[47]=I,t[48]=V,t[49]=H):H=t[49],H}var Qm=class{diff(e,t,n={}){let r;typeof n==`function`?(r=n,n={}):`callback`in n&&(r=n.callback);let i=this.castInput(e,n),a=this.castInput(t,n),o=this.removeEmpty(this.tokenize(i,n)),s=this.removeEmpty(this.tokenize(a,n));return this.diffWithOptionsObj(o,s,n,r)}diffWithOptionsObj(e,t,n,r){let i=e=>{if(e=this.postProcess(e,n),r){setTimeout(function(){r(e)},0);return}else return e},a=t.length,o=e.length,s=1,c=a+o;n.maxEditLength!=null&&(c=Math.min(c,n.maxEditLength));let l=n.timeout??1/0,u=Date.now()+l,d=[{oldPos:-1,lastComponent:void 0}],f=this.extractCommon(d[0],t,e,0,n);if(d[0].oldPos+1>=o&&f+1>=a)return i(this.buildValues(d[0].lastComponent,t,e));let p=-1/0,m=1/0,h=()=>{for(let r=Math.max(p,-s);r<=Math.min(m,s);r+=2){let s,c=d[r-1],l=d[r+1];c&&(d[r-1]=void 0);let u=!1;if(l){let e=l.oldPos-r;u=l&&0<=e&&e<a}let h=c&&c.oldPos+1<o;if(!u&&!h){d[r]=void 0;continue}if(s=!h||u&&c.oldPos<l.oldPos?this.addToPath(l,!0,!1,0,n):this.addToPath(c,!1,!0,1,n),f=this.extractCommon(s,t,e,r,n),s.oldPos+1>=o&&f+1>=a)return i(this.buildValues(s.lastComponent,t,e))||!0;d[r]=s,s.oldPos+1>=o&&(m=Math.min(m,r-1)),f+1>=a&&(p=Math.max(p,r+1))}s++};if(r)(function e(){setTimeout(function(){if(s>c||Date.now()>u)return r(void 0);h()||e()},0)})();else for(;s<=c&&Date.now()<=u;){let e=h();if(e)return e}}addToPath(e,t,n,r,i){let a=e.lastComponent;return a&&!i.oneChangePerToken&&a.added===t&&a.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:a.count+1,added:t,removed:n,previousComponent:a.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:n,previousComponent:a}}}extractCommon(e,t,n,r,i){let a=t.length,o=n.length,s=e.oldPos,c=s-r,l=0;for(;c+1<a&&s+1<o&&this.equals(n[s+1],t[c+1],i);)c++,s++,l++,i.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return l&&!i.oneChangePerToken&&(e.lastComponent={count:l,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=s,c}equals(e,t,n){return n.comparator?n.comparator(e,t):e===t||!!n.ignoreCase&&e.toLowerCase()===t.toLowerCase()}removeEmpty(e){let t=[];for(let n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t}castInput(e,t){return e}tokenize(e,t){return Array.from(e)}join(e){return e.join(``)}postProcess(e,t){return e}get useLongestToken(){return!1}buildValues(e,t,n){let r=[],i;for(;e;)r.push(e),i=e.previousComponent,delete e.previousComponent,e=i;r.reverse();let a=r.length,o=0,s=0,c=0;for(;o<a;o++){let e=r[o];if(e.removed)e.value=this.join(n.slice(c,c+e.count)),c+=e.count;else{if(!e.added&&this.useLongestToken){let r=t.slice(s,s+e.count);r=r.map(function(e,t){let r=n[c+t];return r.length>e.length?r:e}),e.value=this.join(r)}else e.value=this.join(t.slice(s,s+e.count));s+=e.count,e.added||(c+=e.count)}}return r}};new class extends Qm{};function $m(e,t){let n;for(n=0;n<e.length&&n<t.length;n++)if(e[n]!=t[n])return e.slice(0,n);return e.slice(0,n)}function eh(e,t){let n;if(!e||!t||e[e.length-1]!=t[t.length-1])return``;for(n=0;n<e.length&&n<t.length;n++)if(e[e.length-(n+1)]!=t[t.length-(n+1)])return e.slice(-n);return e.slice(-n)}function th(e,t,n){if(e.slice(0,t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't start with prefix ${JSON.stringify(t)}; this is a bug`);return n+e.slice(t.length)}function nh(e,t,n){if(!t)return e+n;if(e.slice(-t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't end with suffix ${JSON.stringify(t)}; this is a bug`);return e.slice(0,-t.length)+n}function rh(e,t){return th(e,t,``)}function ih(e,t){return nh(e,t,``)}function ah(e,t){return t.slice(0,oh(e,t))}function oh(e,t){let n=0;e.length>t.length&&(n=e.length-t.length);let r=t.length;e.length<t.length&&(r=e.length);let i=Array(r),a=0;i[0]=0;for(let e=1;e<r;e++){for(t[e]==t[a]?i[e]=i[a]:i[e]=a;a>0&&t[e]!=t[a];)a=i[a];t[e]==t[a]&&a++}a=0;for(let r=n;r<e.length;r++){for(;a>0&&e[r]!=t[a];)a=i[a];e[r]==t[a]&&a++}return a}function sh(e,t){let n=[];for(let r of Array.from(t.segment(e))){let e=r.segment;n.length&&/\s/.test(n[n.length-1])&&/\s/.test(e)?n[n.length-1]+=e:n.push(e)}return n}function ch(e,t){if(t)return uh(e,t)[1];let n;for(n=e.length-1;n>=0&&e[n].match(/\s/);n--);return e.substring(n+1)}function lh(e,t){if(t)return uh(e,t)[0];let n=e.match(/^\s*/);return n?n[0]:``}function uh(e,t){if(!t)return[lh(e),ch(e)];if(t.resolvedOptions().granularity!=`word`)throw Error(`The segmenter passed must have a granularity of "word"`);let n=sh(e,t),r=n[0],i=n[n.length-1];return[/\s/.test(r)?r:``,/\s/.test(i)?i:``]}var dh=`a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}`,fh=RegExp(`[${dh}]+|\\s+|[^${dh}]`,`ug`);new class extends Qm{equals(e,t,n){return n.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e.trim()===t.trim()}tokenize(e,t={}){let n;if(t.intlSegmenter){let r=t.intlSegmenter;if(r.resolvedOptions().granularity!=`word`)throw Error(`The segmenter passed must have a granularity of "word"`);n=sh(e,r)}else n=e.match(fh)||[];let r=[],i=null;return n.forEach(e=>{/\s/.test(e)?i==null?r.push(e):r.push(r.pop()+e):i!=null&&/\s/.test(i)?r[r.length-1]==i?r.push(r.pop()+e):r.push(i+e):r.push(e),i=e}),r}join(e){return e.map((e,t)=>t==0?e:e.replace(/^\s+/,``)).join(``)}postProcess(e,t){if(!e||t.oneChangePerToken)return e;let n=null,r=null,i=null;return e.forEach(e=>{e.added?r=e:e.removed?i=e:((r||i)&&ph(n,i,r,e,t.intlSegmenter),n=e,r=null,i=null)}),(r||i)&&ph(n,i,r,null,t.intlSegmenter),e}};function ph(e,t,n,r,i){if(t&&n){let[a,o]=uh(t.value,i),[s,c]=uh(n.value,i);if(e){let r=$m(a,s);e.value=nh(e.value,s,r),t.value=rh(t.value,r),n.value=rh(n.value,r)}if(r){let e=eh(o,c);r.value=th(r.value,c,e),t.value=ih(t.value,e),n.value=ih(n.value,e)}}else if(n){if(e){let e=lh(n.value,i);n.value=n.value.substring(e.length)}if(r){let e=lh(r.value,i);r.value=r.value.substring(e.length)}}else if(e&&r){let n=lh(r.value,i),[a,o]=uh(t.value,i),s=$m(n,a);t.value=rh(t.value,s);let c=eh(rh(n,s),o);t.value=ih(t.value,c),r.value=th(r.value,n,c),e.value=nh(e.value,n,n.slice(0,n.length-c.length))}else if(r){let e=lh(r.value,i),n=ah(ch(t.value,i),e);t.value=ih(t.value,n)}else if(e){let n=ah(ch(e.value,i),lh(t.value,i));t.value=rh(t.value,n)}}new class extends Qm{tokenize(e){let t=RegExp(`(\\r?\\n)|[${dh}]+|[^\\S\\n\\r]+|[^${dh}]`,`ug`);return e.match(t)||[]}};var mh=new class extends Qm{constructor(){super(...arguments),this.tokenize=gh}equals(e,t,n){return n.ignoreWhitespace?((!n.newlineIsToken||!e.includes(`
|
|
17
|
-
`))&&(e=e.trim()),(!n.newlineIsToken||!t.includes(`
|
|
18
|
-
`))&&(t=t.trim())):n.ignoreNewlineAtEof&&!n.newlineIsToken&&(e.endsWith(`
|
|
19
|
-
`)&&(e=e.slice(0,-1)),t.endsWith(`
|
|
20
|
-
`)&&(t=t.slice(0,-1))),super.equals(e,t,n)}};function hh(e,t,n){return mh.diff(e,t,n)}function gh(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,`
|
|
21
|
-
`));let n=[],r=e.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(let e=0;e<r.length;e++){let i=r[e];e%2&&!t.newlineIsToken?n[n.length-1]+=i:n.push(i)}return n}function _h(e){return e==`.`||e==`!`||e==`?`}new class extends Qm{tokenize(e){let t=[],n=0;for(let r=0;r<e.length;r++){if(r==e.length-1){t.push(e.slice(n));break}if(_h(e[r])&&e[r+1].match(/\s/)){for(t.push(e.slice(n,r+1)),r=n=r+1;e[r+1]?.match(/\s/);)r++;t.push(e.slice(n,r+1)),n=r+1}}return t}},new class extends Qm{tokenize(e){return e.split(/([{}:;,]|\s+)/)}},new class extends Qm{constructor(){super(...arguments),this.tokenize=gh}get useLongestToken(){return!0}castInput(e,t){let{undefinedReplacement:n,stringifyReplacer:r=(e,t)=>t===void 0?n:t}=t;return typeof e==`string`?e:JSON.stringify(vh(e,null,null,r),null,` `)}equals(e,t,n){return super.equals(e.replace(/,([\r\n])/g,`$1`),t.replace(/,([\r\n])/g,`$1`),n)}};function vh(e,t,n,r,i){t||=[],n||=[],r&&(e=r(i===void 0?``:i,e));let a;for(a=0;a<t.length;a+=1)if(t[a]===e)return n[a];let o;if(Object.prototype.toString.call(e)===`[object Array]`){for(t.push(e),o=Array(e.length),n.push(o),a=0;a<e.length;a+=1)o[a]=vh(e[a],t,n,r,String(a));return t.pop(),n.pop(),o}if(e&&e.toJSON&&(e=e.toJSON()),typeof e==`object`&&e){t.push(e),o={},n.push(o);let i=[],s;for(s in e)Object.prototype.hasOwnProperty.call(e,s)&&i.push(s);for(i.sort(),a=0;a<i.length;a+=1)s=i[a],o[s]=vh(e[s],t,n,r,s);t.pop(),n.pop()}else o=e;return o}new class extends Qm{tokenize(e){return e.slice()}join(e){return e}removeEmpty(e){return e}};var yh={includeIndex:!0,includeUnderline:!0,includeFileHeaders:!0};function bh(e,t,n,r,i,a,o){let s;s=o?typeof o==`function`?{callback:o}:o:{},s.context===void 0&&(s.context=4);let c=s.context;if(s.newlineIsToken)throw Error(`newlineIsToken may not be used with patch-generation functions, only with diffing functions`);if(s.callback){let{callback:e}=s;hh(n,r,Object.assign(Object.assign({},s),{callback:t=>{e(l(t))}}))}else return l(hh(n,r,s));function l(n){if(!n)return;n.push({value:``,lines:[]});function r(e){return e.map(function(e){return` `+e})}let o=[],s=0,l=0,u=[],d=1,f=1;for(let e=0;e<n.length;e++){let t=n[e],i=t.lines||wh(t.value);if(t.lines=i,t.added||t.removed){if(!s){let t=n[e-1];s=d,l=f,t&&(u=c>0?r(t.lines.slice(-c)):[],s-=u.length,l-=u.length)}for(let e of i)u.push((t.added?`+`:`-`)+e);t.added?f+=i.length:d+=i.length}else{if(s)if(i.length<=c*2&&e<n.length-2)for(let e of r(i))u.push(e);else{let e=Math.min(i.length,c);for(let t of r(i.slice(0,e)))u.push(t);let t={oldStart:s,oldLines:d-s+e,newStart:l,newLines:f-l+e,lines:u};o.push(t),s=0,l=0,u=[]}d+=i.length,f+=i.length}}for(let e of o)for(let t=0;t<e.lines.length;t++)e.lines[t].endsWith(`
|
|
22
|
-
`)?e.lines[t]=e.lines[t].slice(0,-1):(e.lines.splice(t+1,0,`\`),t++);return{oldFileName:e,newFileName:t,oldHeader:i,newHeader:a,hunks:o}}}function xh(e,t){if(t||=yh,Array.isArray(e)){if(e.length>1&&!t.includeFileHeaders)throw Error(`Cannot omit file headers on a multi-file patch. (The result would be unparseable; how would a tool trying to apply the patch know which changes are to which file?)`);return e.map(e=>xh(e,t)).join(`
|
|
23
|
-
`)}let n=[];t.includeIndex&&e.oldFileName==e.newFileName&&n.push(`Index: `+e.oldFileName),t.includeUnderline&&n.push(`===================================================================`),t.includeFileHeaders&&(n.push(`--- `+e.oldFileName+(e.oldHeader===void 0?``:` `+e.oldHeader)),n.push(`+++ `+e.newFileName+(e.newHeader===void 0?``:` `+e.newHeader)));for(let t=0;t<e.hunks.length;t++){let r=e.hunks[t];r.oldLines===0&&--r.oldStart,r.newLines===0&&--r.newStart,n.push(`@@ -`+r.oldStart+`,`+r.oldLines+` +`+r.newStart+`,`+r.newLines+` @@`);for(let e of r.lines)n.push(e)}return n.join(`
|
|
24
|
-
`)+`
|
|
25
|
-
`}function Sh(e,t,n,r,i,a,o){if(typeof o==`function`&&(o={callback:o}),o?.callback){let{callback:s}=o;bh(e,t,n,r,i,a,Object.assign(Object.assign({},o),{callback:e=>{s(e?xh(e,o.headerOptions):void 0)}}))}else{let s=bh(e,t,n,r,i,a,o);return s?xh(s,o?.headerOptions):void 0}}function Ch(e,t,n,r,i,a){return Sh(e,e,t,n,r,i,a)}function wh(e){let t=e.endsWith(`
|
|
26
|
-
`),n=e.split(`
|
|
27
|
-
`).map(e=>e+`
|
|
28
|
-
`);return t?n.pop():n.push(n.pop().slice(0,-1)),n}function Th(e,t){return`${e}\u0000${t}`}function Eh(e,t,n){let r=nr(e).body,i=nr(t).body;return r===i?``:Ch(n,r,i,``,``,{context:3})}function Dh(e,t,n){let r=(0,Q.c)(8),{activeProvider:i}=ft(),a;r[0]===Symbol.for(`react.memo_cache_sentinel`)?(a={status:`idle`,diff:null},r[0]=a):a=r[0];let[o,s]=(0,Z.useState)(a),c=(0,Z.useRef)(i),l;r[1]===i?l=r[2]:(l=()=>{c.current=i},r[1]=i,r[2]=l),(0,Z.useEffect)(l);let u,d;return r[3]!==n||r[4]!==t||r[5]!==e?(u=()=>{if(!e){s({status:`idle`,diff:null});return}let r=e,i=!1;return s({status:`loading`,diff:null}),(async function(){try{let e=Th(t,r),a=n.get(e);if(a===void 0){let o=await fetch(`/api/history/${r}?docName=${encodeURIComponent(t)}`);if(i)return;if(!o.ok){s({status:`error`,diff:null});return}let c=await o.json();if(i)return;a=c.content??``,n.set(e,a)}if(i)return;let o=c.current?.document.getText(`source`).toString()??``,l=Eh(a,o,t);if(i)return;s({status:`ready`,diff:l})}catch(e){i||(console.error(`[timeline-diff] failed to load entry diff`,{sha:r,docName:t,err:e}),s({status:`error`,diff:null}))}})(),()=>{i=!0}},d=[e,t,n],r[3]=n,r[4]=t,r[5]=e,r[6]=u,r[7]=d):(u=r[6],d=r[7]),(0,Z.useEffect)(u,d),o}var Oh=(0,Z.lazy)(async()=>({default:(await n(()=>import(`./ActivityPanelDiffView-D-EUyEh6.js`),__vite__mapDeps([3,1,4,5]),import.meta.url)).ActivityPanelDiffView}));function kh(e){let t=new Date(e),n=new Date().getTime()-t.getTime(),r=Math.floor(n/1e3);if(r<60)return`just now`;if(r<3600)return`${Math.floor(r/60)} min ago`;if(r<86400)return`${Math.floor(r/3600)}h ago`;if(r<86400*2)return`yesterday`;let i=Math.floor(r/86400);return i<7?`${i} days ago`:t.toLocaleDateString()}function Ah(e){return new Date(e).toLocaleString(void 0,{month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`})}function jh(e){return e.slice(0,7)}function Mh(e){return e.type===`upstream`?`Upstream sync`:e.contributors.length===1?e.contributors[0].name:e.contributors.length>1?e.contributors.map(e=>e.name).join(`, `):e.author===`openknowledge-server`||e.author===`server`?`Auto-save`:e.author}function Nh(e){let t=(0,Q.c)(17),n,r;if(t[0]===e?(n=t[1],r=t[2]):({icon:n,...r}=e,t[0]=e,t[1]=n,t[2]=r),n===`claude`){let e;return t[3]===r?e=t[4]:(e=(0,X.jsx)(le,{...r}),t[3]=r,t[4]=e),e}if(n===`cursor`){let e;return t[5]===r?e=t[6]:(e=(0,X.jsx)(_e,{...r}),t[5]=r,t[6]=e),e}if(n===`windsurf`){let e;return t[7]===r?e=t[8]:(e=(0,X.jsx)(se,{...r}),t[7]=r,t[8]=e),e}if(n===`openai`){let e;return t[9]===r?e=t[10]:(e=(0,X.jsx)(me,{...r}),t[9]=r,t[10]=e),e}if(n===`cline`){let e;return t[11]===r?e=t[12]:(e=(0,X.jsx)(Se,{...r}),t[11]=r,t[12]=e),e}if(n===`github`){let e;return t[13]===r?e=t[14]:(e=(0,X.jsx)(be,{...r}),t[13]=r,t[14]=e),e}let i=r,a;return t[15]===i?a=t[16]:(a=(0,X.jsx)(ve,{strokeWidth:1.5,...i}),t[15]=i,t[16]=a),a}function Ph(e){let t=(0,Q.c)(17),{entry:n,isDark:r}=e;if(n.type===`upstream`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,X.jsx)(Ai,{className:`size-3.5 shrink-0 text-muted-foreground`}),t[0]=e):e=t[0],e}if(n.contributors.length>0){let e=n.contributors[0],i=e.colorSeed??e.name,a;t[1]===i?a=t[2]:(a=Vn(i),t[1]=i,t[2]=a);let o=a,s=r?Un[o]??qn[o]:qn[o],c;t[3]!==s||t[4]!==i?(c=s??_n(i),t[3]=s,t[4]=i,t[5]=c):c=t[5];let l=c;if(o!==`bot`){let e;t[6]===l?e=t[7]:(e={color:l},t[6]=l,t[7]=e);let n;return t[8]!==o||t[9]!==e?(n=(0,X.jsx)(Nh,{icon:o,width:14,height:14,className:`shrink-0`,style:e}),t[8]=o,t[9]=e,t[10]=n):n=t[10],n}if(e.name===`File System`){let e;return t[11]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,X.jsx)(Ni,{className:`size-3.5 shrink-0 text-muted-foreground`}),t[11]=e):e=t[11],e}if(e.name===`Open Knowledge (service)`||e.name===`Git (upstream)`){let e;return t[12]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,X.jsx)(Yr,{className:`size-3.5 shrink-0 text-muted-foreground`}),t[12]=e):e=t[12],e}let u;return t[13]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,X.jsx)(va,{className:`size-3.5 shrink-0 text-muted-foreground`}),t[13]=u):u=t[13],u}if(n.authorEmail.includes(`agent`)||n.author.includes(`agent`)||n.authorEmail.includes(`cursor`)||n.authorEmail.includes(`claude`)){let e;return t[14]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,X.jsx)(ve,{className:`size-3.5 shrink-0 text-muted-foreground`}),t[14]=e):e=t[14],e}if(n.author===`openknowledge-server`||n.author===`server`){let e;return t[15]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,X.jsx)(Yr,{className:`size-3.5 shrink-0 text-muted-foreground`}),t[15]=e):e=t[15],e}let i;return t[16]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,X.jsx)(va,{className:`size-3.5 shrink-0 text-muted-foreground`}),t[16]=i):i=t[16],i}function Fh(){let e=(0,Q.c)(2),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,X.jsx)(`div`,{className:`flex items-center justify-center w-3.5 h-3.5`,children:(0,X.jsx)(`span`,{className:`inline-block size-2 rounded-full bg-emerald-500 shrink-0`})}),e[0]=t):t=e[0];let n;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,X.jsxs)(`div`,{className:`flex w-full items-center gap-3 rounded-lg px-3 py-2.5`,children:[t,(0,X.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,X.jsx)(`p`,{className:`text-xs font-medium text-foreground`,children:`Current version`})})]}),e[1]=n):n=e[1],n}function Ih(e){let t=(0,Q.c)(20),{entries:n,defaultExpanded:r,isDark:i,diffLayout:a,cache:o,docName:s,expandedShas:c,onToggleExpanded:l,onRestoreSuccess:u}=e,[d,f]=(0,Z.useState)(r);if(n.length===0)return null;let p;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(p=()=>f(Lh),t[0]=p):p=t[0];let m;t[1]===d?m=t[2]:(m=d?(0,X.jsx)(fe,{className:`size-3`}):(0,X.jsx)(he,{className:`size-3`}),t[1]=d,t[2]=m);let h=d?`Hide ${n.length} auto-save${n.length>1?`s`:``}`:`Show ${n.length} auto-save${n.length>1?`s`:``}`,g;t[3]!==d||t[4]!==m||t[5]!==h?(g=(0,X.jsxs)(`button`,{type:`button`,"aria-expanded":d,className:`flex items-center gap-1.5 rounded-lg px-3 py-2 text-xs text-muted-foreground hover:text-foreground hover:bg-muted/50 transition-colors text-left`,onClick:p,children:[m,h]}),t[3]=d,t[4]=m,t[5]=h,t[6]=g):g=t[6];let _;t[7]!==o||t[8]!==a||t[9]!==s||t[10]!==n||t[11]!==d||t[12]!==c||t[13]!==i||t[14]!==u||t[15]!==l?(_=d&&n.map(e=>(0,X.jsx)(Zh,{entry:e,isDark:i,diffLayout:a,cache:o,docName:s,expanded:c.has(e.sha),onToggleExpanded:l,onRestoreSuccess:u},e.sha)),t[7]=o,t[8]=a,t[9]=s,t[10]=n,t[11]=d,t[12]=c,t[13]=i,t[14]=u,t[15]=l,t[16]=_):_=t[16];let v;return t[17]!==g||t[18]!==_?(v=(0,X.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[g,_]}),t[17]=g,t[18]=_,t[19]=v):v=t[19],v}function Lh(e){return!e}function Rh(e){return e.checkpoint?e.checkpoint.kind:`save`}function zh(e){let t=Rh(e);if(t===`save`)return`Save Version`;let n=e.checkpoint?.size??null,r=n!=null&&n>0?` (${Bh(n)})`:``;return t===`bridge-merge-loss`?`Auto-saved before a concurrent edit${r}`:`Recovered from an external change${r}`}function Bh(e){return e<1024?`${e} B`:e<1024*1024?`${Math.round(e/102.4)/10} KB`:`${Math.round(e/104857.6)/10} MB`}function Vh(e){return e.type===`checkpoint`?Rh(e)===`save`?`version`:`auto-save`:`wip`}var Hh={version:`Restore this version`,"auto-save":`Restore this auto-save`,wip:`Restore to this point`},Uh={version:`Restore this version?`,"auto-save":`Restore this auto-save?`,wip:`Restore to this point?`};function Wh(e){return Hh[Vh(e)]}function Gh(e){return Uh[Vh(e)]}function Kh(e){let t=[];for(let n of e.contributors)if(n.summaries)for(let e of n.summaries)t.push(e);return t}function qh(e){let t=(0,Q.c)(20),{summaries:n}=e,[r,i]=(0,Z.useState)(!1),a=(0,Z.useId)();if(n.length===0)return null;let o,s;t[0]===n?(o=t[1],s=t[2]):([o,...s]=n,t[0]=n,t[1]=o,t[2]=s);let c;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,X.jsx)(`span`,{"aria-hidden":`true`,children:`• `}),t[3]=c):c=t[3];let l;t[4]===o?l=t[5]:(l=(0,X.jsxs)(`li`,{className:`text-xs text-foreground/90`,children:[c,o]}),t[4]=o,t[5]=l);let u;t[6]!==r||t[7]!==s?(u=r&&s.map(Yh),t[6]=r,t[7]=s,t[8]=u):u=t[8];let d;t[9]!==a||t[10]!==l||t[11]!==u?(d=(0,X.jsxs)(`ul`,{id:a,className:`list-none`,children:[l,u]}),t[9]=a,t[10]=l,t[11]=u,t[12]=d):d=t[12];let f;t[13]!==r||t[14]!==a||t[15]!==s.length?(f=s.length>0&&(0,X.jsxs)(`button`,{type:`button`,"aria-expanded":r,"aria-controls":a,className:`inline-flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors cursor-pointer`,onClick:e=>{e.stopPropagation(),i(Jh)},children:[r?(0,X.jsx)(fe,{className:`size-3`}):(0,X.jsx)(he,{className:`size-3`}),r?`Hide ${s.length} more`:`Show ${s.length} more`]}),t[13]=r,t[14]=a,t[15]=s.length,t[16]=f):f=t[16];let p;return t[17]!==d||t[18]!==f?(p=(0,X.jsxs)(`div`,{className:`mt-0.5`,children:[d,f]}),t[17]=d,t[18]=f,t[19]=p):p=t[19],p}function Jh(e){return!e}function Yh(e,t){return(0,X.jsxs)(`li`,{className:`text-xs text-foreground/90`,children:[(0,X.jsx)(`span`,{"aria-hidden":`true`,children:`• `}),e]},`${t}-${e}`)}function Xh(e){let t=(0,Q.c)(13),{sha:n,docName:r,cache:i,diffLayout:a,panelId:o}=e,s=Dh(n,r,i),c;t[0]===s.status?c=t[1]:(c=s.status===`loading`&&(0,X.jsxs)(`div`,{className:`flex items-center gap-2 py-2 text-xs text-muted-foreground`,children:[(0,X.jsx)(lt,{className:`size-3 animate-spin`}),`Loading diff…`]}),t[0]=s.status,t[1]=c);let l;t[2]===s.status?l=t[3]:(l=s.status===`error`&&(0,X.jsx)(`p`,{className:`py-2 text-xs text-destructive`,children:`Diff unavailable`}),t[2]=s.status,t[3]=l);let u;t[4]!==a||t[5]!==s.diff||t[6]!==s.status?(u=s.status===`ready`&&(0,X.jsx)(Z.Suspense,{fallback:(0,X.jsxs)(`div`,{className:`flex items-center gap-2 py-2 text-xs text-muted-foreground`,children:[(0,X.jsx)(lt,{className:`size-3 animate-spin`}),`Loading diff renderer…`]}),children:(0,X.jsx)(Oh,{diff:s.diff,viewType:a})}),t[4]=a,t[5]=s.diff,t[6]=s.status,t[7]=u):u=t[7];let d;return t[8]!==o||t[9]!==c||t[10]!==l||t[11]!==u?(d=(0,X.jsxs)(`div`,{id:o,className:`px-3 pb-2`,"data-testid":`timeline-entry-diff`,children:[c,l,u]}),t[8]=o,t[9]=c,t[10]=l,t[11]=u,t[12]=d):d=t[12],d}function Zh(e){let t=(0,Q.c)(128),{entry:n,prominent:r,isDark:i,diffLayout:a,cache:o,docName:s,expanded:c,onToggleExpanded:l,onRestoreSuccess:u}=e,d=r===void 0?!1:r,f;t[0]===n.timestamp?f=t[1]:(f=kh(n.timestamp),t[0]=n.timestamp,t[1]=f);let p=f,m;t[2]===n?m=t[3]:(m=Mh(n),t[2]=n,t[3]=m);let h=m,g=n.contributors.flatMap(Qh),_;t[4]===n?_=t[5]:(_=Kh(n),t[4]=n,t[5]=_);let v=_,[y,b]=(0,Z.useState)(!1),[x,S]=(0,Z.useState)(!1),C=(0,Z.useRef)(null),w=(0,Z.useId)(),T,E;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(T=()=>()=>C.current?.abort(),E=[],t[6]=T,t[7]=E):(T=t[6],E=t[7]),(0,Z.useEffect)(T,E);let D;t[8]!==n.sha||t[9]!==l?(D=()=>l(n.sha),t[8]=n.sha,t[9]=l,t[10]=D):D=t[10];let O=D,k;t[11]===b?k=t[12]:(k=function(){C.current?.abort(),C.current=null,S(!1),b(!1)},t[11]=b,t[12]=k);let A=k,j;t[13]!==s||t[14]!==n.sha||t[15]!==u||t[16]!==b?(j=async function(){S(!0);let e=new AbortController;C.current=e;let t=function(){e.signal.aborted||S(!1),C.current===e&&(C.current=null)},r;try{r=await fetch(`/api/rollback`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({docName:s,commitSha:n.sha}),signal:e.signal})}catch(r){let i=r;!e.signal.aborted&&!(i instanceof DOMException&&i.name===`AbortError`)&&(console.error(`[timeline] rollback fetch failed`,{docName:s,sha:n.sha,err:i}),Xt.error(`Restore failed — document unchanged`,{duration:4e3})),t();return}if(e.signal.aborted){t();return}if(r.ok)b(!1),u();else{let e=`HTTP ${r.status}`;try{let t=await r.json();t.error&&(e=t.error)}catch{}console.error(`[timeline] rollback failed`,{docName:s,sha:n.sha,status:r.status,detail:e}),Xt.error(`Restore failed`,{description:e,duration:6e3})}t()},t[13]=s,t[14]=n.sha,t[15]=u,t[16]=b,t[17]=j):j=t[17];let M=j,N;t[18]!==n||t[19]!==i||t[20]!==d?(N=d?(()=>{let e=Rh(n);return e===`bridge-merge-loss`?(0,X.jsx)(Oe,{className:`size-3.5 shrink-0 text-amber-600 dark:text-amber-400`,"aria-hidden":`true`}):e===`external-change-rescue`?(0,X.jsx)(Ci,{className:`size-3.5 shrink-0 text-sky-600 dark:text-sky-400`,"aria-hidden":`true`}):(0,X.jsx)(bi,{className:`size-3.5 shrink-0 text-muted-foreground`})})():(0,X.jsx)(Ph,{entry:n,isDark:i}),t[18]=n,t[19]=i,t[20]=d,t[21]=N):N=t[21];let P=N,F=c?w:void 0,I=c?`bg-muted`:`hover:bg-muted/50`,L;t[22]===I?L=t[23]:(L=[`group flex w-full items-start gap-3 rounded-lg px-3 py-2.5 text-left transition-colors cursor-pointer outline-none focus-visible:ring-2 focus-visible:ring-ring`,I],t[22]=I,t[23]=L);let R=L.join(` `),z;t[24]===O?z=t[25]:(z=e=>{e.target===e.currentTarget&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),O())},t[24]=O,t[25]=z);let B;t[26]===P?B=t[27]:(B=(0,X.jsx)(`span`,{className:`mt-0.5 shrink-0`,children:P}),t[26]=P,t[27]=B);let V;t[28]!==h||t[29]!==n||t[30]!==d?(V=d?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`span`,{className:`text-xs text-foreground truncate`,children:zh(n)}),(0,X.jsx)(`span`,{className:`text-xs text-muted-foreground/50`,children:`·`}),(0,X.jsx)(`span`,{className:`truncate text-xs text-muted-foreground`,children:h})]}):(0,X.jsx)(`span`,{className:`truncate text-xs text-foreground`,children:h}),t[28]=h,t[29]=n,t[30]=d,t[31]=V):V=t[31];let H;t[32]!==n.timestamp||t[33]!==p?(H=(0,X.jsx)(`time`,{className:`ml-auto shrink-0 text-xs text-muted-foreground/80`,dateTime:n.timestamp,title:n.timestamp,children:p}),t[32]=n.timestamp,t[33]=p,t[34]=H):H=t[34];let U;t[35]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,X.jsx)(`span`,{"aria-hidden":`true`,className:`h-3 w-px shrink-0 bg-border`}),t[35]=U):U=t[35];let ee;t[36]===n?ee=t[37]:(ee=Wh(n),t[36]=n,t[37]=ee);let W;t[38]===b?W=t[39]:(W=e=>{e.stopPropagation(),b(!0)},t[38]=b,t[39]=W);let te;t[40]===x?te=t[41]:(te=x?(0,X.jsx)(lt,{className:`size-3 animate-spin`}):(0,X.jsx)(ue,{className:`size-3`}),t[40]=x,t[41]=te);let G;t[42]!==x||t[43]!==ee||t[44]!==W||t[45]!==te?(G=(0,X.jsx)(en,{asChild:!0,children:(0,X.jsx)(q,{variant:`ghost`,size:`icon`,className:`size-5 shrink-0 text-muted-foreground hover:text-destructive`,"data-testid":`timeline-entry-restore`,"aria-label":ee,disabled:x,onClick:W,children:te})}),t[42]=x,t[43]=ee,t[44]=W,t[45]=te,t[46]=G):G=t[46];let ne;t[47]===n?ne=t[48]:(ne=Wh(n),t[47]=n,t[48]=ne);let K;t[49]===ne?K=t[50]:(K=(0,X.jsx)(nn,{side:`top`,children:ne}),t[49]=ne,t[50]=K);let re;t[51]!==G||t[52]!==K?(re=(0,X.jsxs)(sn,{children:[G,K]}),t[51]=G,t[52]=K,t[53]=re):re=t[53];let ie;t[54]!==V||t[55]!==H||t[56]!==re?(ie=(0,X.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[V,H,U,re]}),t[54]=V,t[55]=H,t[56]=re,t[57]=ie):ie=t[57];let J;t[58]===v?J=t[59]:(J=v.length>0&&(0,X.jsx)(qh,{summaries:v}),t[58]=v,t[59]=J);let ae=g.length>0?(0,X.jsx)(`p`,{className:`truncate text-xs text-muted-foreground`,title:g.join(`, `),children:g.join(`, `)}):(0,X.jsx)(`p`,{className:`truncate text-xs text-muted-foreground`,title:n.message,children:n.message}),Y;t[60]!==ie||t[61]!==J||t[62]!==ae?(Y=(0,X.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-0.5`,children:[ie,J,ae]}),t[60]=ie,t[61]=J,t[62]=ae,t[63]=Y):Y=t[63];let oe;t[64]!==c||t[65]!==O||t[66]!==F||t[67]!==R||t[68]!==z||t[69]!==B||t[70]!==Y?(oe=(0,X.jsxs)(`div`,{role:`button`,tabIndex:0,"aria-expanded":c,"aria-controls":F,"data-testid":`timeline-entry-expand`,className:R,onClick:O,onKeyDown:z,children:[B,Y]}),t[64]=c,t[65]=O,t[66]=F,t[67]=R,t[68]=z,t[69]=B,t[70]=Y,t[71]=oe):oe=t[71];let se;t[72]!==o||t[73]!==a||t[74]!==w||t[75]!==s||t[76]!==n.sha||t[77]!==c?(se=c&&(0,X.jsx)(Xh,{sha:n.sha,docName:s,cache:o,diffLayout:a,panelId:w}),t[72]=o,t[73]=a,t[74]=w,t[75]=s,t[76]=n.sha,t[77]=c,t[78]=se):se=t[78];let ce;t[79]!==oe||t[80]!==se?(ce=(0,X.jsxs)(`div`,{className:`flex flex-col rounded-lg`,children:[oe,se]}),t[79]=oe,t[80]=se,t[81]=ce):ce=t[81];let le;t[82]!==A||t[83]!==b?(le=e=>{e?b(!0):A()},t[82]=A,t[83]=b,t[84]=le):le=t[84];let de;t[85]===n?de=t[86]:(de=Gh(n),t[85]=n,t[86]=de);let fe;t[87]===de?fe=t[88]:(fe=(0,X.jsx)(Ft,{children:de}),t[87]=de,t[88]=fe);let pe;t[89]===n.timestamp?pe=t[90]:(pe=Ah(n.timestamp),t[89]=n.timestamp,t[90]=pe);let me;t[91]===n.sha?me=t[92]:(me=jh(n.sha),t[91]=n.sha,t[92]=me);let he;t[93]!==p||t[94]!==pe||t[95]!==me?(he=(0,X.jsxs)(`span`,{className:`font-medium text-foreground`,children:[p,` (`,pe,`, `,me,`)`]}),t[93]=p,t[94]=pe,t[95]=me,t[96]=he):he=t[96];let ge;t[97]===h?ge=t[98]:(ge=(0,X.jsx)(`span`,{className:`font-medium text-foreground`,children:h}),t[97]=h,t[98]=ge);let _e;t[99]!==he||t[100]!==ge?(_e=(0,X.jsxs)(Nt,{children:[`This will replace the current document content with the version from`,` `,he,` `,`by `,ge,`. Your current content is already saved in the timeline — you can restore it anytime.`]}),t[99]=he,t[100]=ge,t[101]=_e):_e=t[101];let ve;t[102]!==fe||t[103]!==_e?(ve=(0,X.jsxs)(Kt,{children:[fe,_e]}),t[102]=fe,t[103]=_e,t[104]=ve):ve=t[104];let ye;t[105]===A?ye=t[106]:(ye=(0,X.jsx)(q,{variant:`outline`,"data-testid":`timeline-entry-restore-cancel`,onClick:A,children:`Cancel`}),t[105]=A,t[106]=ye);let be;t[107]===M?be=t[108]:(be=()=>M(),t[107]=M,t[108]=be);let xe;t[109]===x?xe=t[110]:(xe=x?(0,X.jsx)(lt,{className:`mr-2 size-4 animate-spin`}):null,t[109]=x,t[110]=xe);let Se;t[111]!==x||t[112]!==be||t[113]!==xe?(Se=(0,X.jsxs)(q,{variant:`destructive`,"data-testid":`timeline-entry-restore-confirm`,disabled:x,onClick:be,children:[xe,`Restore`]}),t[111]=x,t[112]=be,t[113]=xe,t[114]=Se):Se=t[114];let Ce;t[115]!==ye||t[116]!==Se?(Ce=(0,X.jsxs)(Ut,{children:[ye,Se]}),t[115]=ye,t[116]=Se,t[117]=Ce):Ce=t[117];let we;t[118]!==ve||t[119]!==Ce?(we=(0,X.jsxs)(zt,{children:[ve,Ce]}),t[118]=ve,t[119]=Ce,t[120]=we):we=t[120];let Te;t[121]!==y||t[122]!==le||t[123]!==we?(Te=(0,X.jsx)(qt,{open:y,onOpenChange:le,children:we}),t[121]=y,t[122]=le,t[123]=we,t[124]=Te):Te=t[124];let Ee;return t[125]!==ce||t[126]!==Te?(Ee=(0,X.jsxs)(X.Fragment,{children:[ce,Te]}),t[125]=ce,t[126]=Te,t[127]=Ee):Ee=t[127],Ee}function Qh(e){return e.docs}function $h(e){let t=(0,Q.c)(56),{docName:n,diffLayout:r}=e,{resolvedTheme:i}=T(),a=i===`dark`,o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=[],t[0]=o):o=t[0];let[s,c]=(0,Z.useState)(o),[l,u]=(0,Z.useState)(!1),[d,f]=(0,Z.useState)(null),p=(0,Z.useRef)(null),[m]=(0,Z.useState)(rg),[h,g]=(0,Z.useState)(ng),_;t[1]===m?_=t[2]:(_=()=>{g(new Set),m.clear()},t[1]=m,t[2]=_);let v;t[3]===n?v=t[4]:(v=[n],t[3]=n,t[4]=v),(0,Z.useEffect)(_,v);let y;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(y=function(e){g(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},t[5]=y):y=t[5];let b=y,x;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(x=function(){g(new Set)},t[6]=x):x=t[6];let S=x,C,w;t[7]===n?(C=t[8],w=t[9]):(C=()=>{if(!n){c([]);return}let e=!1,t=async function(){if(n)try{let t=await fetch(`/api/history?docName=${encodeURIComponent(n)}&limit=100`);if(e)return;if(!t.ok){f(`History unavailable`);return}let r=await t.json();if(e)return;c(r.entries??[]),f(null)}catch(t){let n=t;if(e)return;f(`History unavailable`),console.error(`[timeline]`,n)}};return u(!0),t().finally(()=>{e||u(!1)}),p.current=setInterval(t,1e4),()=>{e=!0,p.current&&clearInterval(p.current)}},w=[n],t[7]=n,t[8]=C,t[9]=w),(0,Z.useEffect)(C,w);let E,D,O,k,A,j,M;if(t[10]!==m||t[11]!==r||t[12]!==n||t[13]!==s||t[14]!==d||t[15]!==h||t[16]!==a||t[17]!==l){let e=[],i=[],o=!1;for(let t of s)t.type===`checkpoint`?(i.length>0&&(e.push({kind:`wip-group`,entries:i,isPreCheckpoint:!o}),i=[]),e.push({kind:`checkpoint`,entry:t}),o=!0):i.push(t);i.length>0&&e.push({kind:`wip-group`,entries:i,isPreCheckpoint:!o});let c;t[25]===s?c=t[26]:(c=s.some(tg),t[25]=s,t[26]=c);let u=!c;A=`flex h-full flex-col`,j=`flex-1 overflow-y-auto subtle-scrollbar`,t[27]===l?M=t[28]:(M=l&&(0,X.jsx)(`div`,{className:`flex flex-col gap-1 p-2`,role:`status`,"aria-busy":`true`,"aria-label":`Loading timeline history`,children:[1,2,3].map(eg)}),t[27]=l,t[28]=M),t[29]!==d||t[30]!==l?(E=!l&&d&&(0,X.jsx)(`div`,{className:`px-4 py-3`,children:(0,X.jsx)(`p`,{className:`text-xs text-destructive`,children:d})}),t[29]=d,t[30]=l,t[31]=E):E=t[31],t[32]!==s.length||t[33]!==d||t[34]!==l?(D=!l&&!d&&s.length===0&&(0,X.jsx)(`div`,{className:`px-4 py-8 text-center`,children:(0,X.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No history yet`})}),t[32]=s.length,t[33]=d,t[34]=l,t[35]=D):D=t[35],t[36]!==m||t[37]!==r||t[38]!==n||t[39]!==s||t[40]!==d||t[41]!==h||t[42]!==u||t[43]!==a||t[44]!==l?(O=!l&&!d&&u&&s.length>0&&(0,X.jsxs)(`div`,{className:`flex flex-col gap-1 p-2`,children:[(0,X.jsx)(Fh,{}),s.map(e=>(0,X.jsx)(Zh,{entry:e,isDark:a,diffLayout:r,cache:m,docName:n,expanded:h.has(e.sha),onToggleExpanded:b,onRestoreSuccess:S},e.sha))]}),t[36]=m,t[37]=r,t[38]=n,t[39]=s,t[40]=d,t[41]=h,t[42]=u,t[43]=a,t[44]=l,t[45]=O):O=t[45],k=!l&&!d&&!u&&(0,X.jsxs)(`div`,{className:`flex flex-col gap-1 p-2`,children:[(0,X.jsx)(Fh,{}),e.map((e,t)=>e.kind===`checkpoint`?(0,X.jsx)(Zh,{entry:e.entry,prominent:!0,isDark:a,diffLayout:r,cache:m,docName:n,expanded:h.has(e.entry.sha),onToggleExpanded:b,onRestoreSuccess:S},e.entry.sha):(0,X.jsx)(Ih,{entries:e.entries,defaultExpanded:e.isPreCheckpoint,isDark:a,diffLayout:r,cache:m,docName:n,expandedShas:h,onToggleExpanded:b,onRestoreSuccess:S},e.entries[0]?.sha??`wip-${t}`))]}),t[10]=m,t[11]=r,t[12]=n,t[13]=s,t[14]=d,t[15]=h,t[16]=a,t[17]=l,t[18]=E,t[19]=D,t[20]=O,t[21]=k,t[22]=A,t[23]=j,t[24]=M}else E=t[18],D=t[19],O=t[20],k=t[21],A=t[22],j=t[23],M=t[24];let N;t[46]!==E||t[47]!==D||t[48]!==O||t[49]!==k||t[50]!==j||t[51]!==M?(N=(0,X.jsxs)(`div`,{className:j,children:[M,E,D,O,k]}),t[46]=E,t[47]=D,t[48]=O,t[49]=k,t[50]=j,t[51]=M,t[52]=N):N=t[52];let P;return t[53]!==A||t[54]!==N?(P=(0,X.jsx)(`div`,{className:A,children:N}),t[53]=A,t[54]=N,t[55]=P):P=t[55],P}function eg(e){return(0,X.jsxs)(`div`,{className:`flex items-start gap-3 rounded-lg px-3 py-2.5`,children:[(0,X.jsx)(Rf,{className:`size-3.5 rounded mt-0.5 shrink-0`}),(0,X.jsxs)(`div`,{className:`flex-1 space-y-1.5`,children:[(0,X.jsx)(Rf,{className:`h-3 w-28`}),(0,X.jsx)(Rf,{className:`h-3 w-40`})]})]},e)}function tg(e){return e.type===`checkpoint`}function ng(){return new Set}function rg(){return new pe(32)}var ig=[{id:`outline`,label:`Outline`,icon:Vi},{id:`backlinks`,label:`Backlinks`,icon:vi},{id:`forward-links`,label:`Outgoing Links`,icon:yi},{id:`graph`,label:`Graph`,icon:Gi},{id:`timeline`,label:`Timeline`,icon:ui}];function ag(){return n(()=>import(`./GraphPanel-CJ_U3W3L.js`),__vite__mapDeps([6,1,7,4,8,9,10,11,12]),import.meta.url)}var og=(0,Z.lazy)(async()=>({default:(await ag()).GraphPanel})),sg=(0,Z.lazy)(async()=>({default:(await n(()=>import(`./ActivityModeContent-Ccu_n0bV.js`),__vite__mapDeps([13,1,2,7,4,8,9,10,14,15,16]),import.meta.url)).ActivityModeContent}));function cg(e){let t=(0,Q.c)(13),{docName:n,isSourceMode:r,activeTab:i,onActiveTabChange:a,diffLayout:o,mode:s}=e,c;t[0]!==i||t[1]!==s||t[2]!==a?(c=s===`doc`?(0,X.jsx)(`div`,{className:`flex flex-row items-center justify-center gap-3 border-b border-border/60 p-2`,children:(0,X.jsx)(Ne,{type:`single`,variant:`outline`,value:i,onValueChange:e=>{e&&a(e)},"aria-label":`Document panels`,children:ig.map(lg)})}):null,t[0]=i,t[1]=s,t[2]=a,t[3]=c):c=t[3];let l;t[4]!==i||t[5]!==o||t[6]!==n||t[7]!==r||t[8]!==s?(l=s===`doc`?(0,X.jsxs)(`div`,{role:`tabpanel`,id:`panel-${i}`,"aria-labelledby":`tab-${i}`,className:`min-h-0 flex-1`,children:[i===`outline`&&(0,X.jsx)(ur,{docName:n,isSourceMode:r}),i===`backlinks`&&(0,X.jsx)(Jm,{docName:n}),i===`forward-links`&&(0,X.jsx)(Zm,{docName:n}),i===`graph`&&(0,X.jsx)(Z.Suspense,{fallback:(0,X.jsx)(`div`,{className:`flex h-full items-center justify-center text-sm text-muted-foreground`,children:`Loading graph…`}),children:(0,X.jsx)(og,{activeDocName:n})}),i===`timeline`&&(0,X.jsx)($h,{docName:n,diffLayout:o??`unified`})]}):(0,X.jsx)(`div`,{className:`min-h-0 flex-1`,children:(0,X.jsx)(Z.Suspense,{fallback:(0,X.jsx)(`div`,{className:`flex h-full items-center justify-center text-sm text-muted-foreground`,children:`Loading agent activity…`}),children:(0,X.jsx)(sg,{})})}),t[4]=i,t[5]=o,t[6]=n,t[7]=r,t[8]=s,t[9]=l):l=t[9];let u;return t[10]!==c||t[11]!==l?(u=(0,X.jsxs)(X.Fragment,{children:[c,l]}),t[10]=c,t[11]=l,t[12]=u):u=t[12],u}function lg(e){let{id:t,label:n,icon:r}=e;return(0,X.jsxs)(sn,{children:[(0,X.jsx)(ke,{value:t,role:`tab`,id:`tab-${t}`,"aria-controls":`panel-${t}`,"aria-label":n,asChild:!0,children:(0,X.jsx)(en,{children:(0,X.jsx)(r,{})})}),(0,X.jsx)(nn,{side:`bottom`,children:n})]},t)}function ug(e,t){let n=getComputedStyle(e);return t*parseFloat(n.fontSize)}function dg(e,t){let n=getComputedStyle(e.ownerDocument.body);return t*parseFloat(n.fontSize)}function fg(e){return e/100*window.innerHeight}function pg(e){return e/100*window.innerWidth}function mg(e){switch(typeof e){case`number`:return[e,`px`];case`string`:{let t=parseFloat(e);return e.endsWith(`%`)?[t,`%`]:e.endsWith(`px`)?[t,`px`]:e.endsWith(`rem`)?[t,`rem`]:e.endsWith(`em`)?[t,`em`]:e.endsWith(`vh`)?[t,`vh`]:e.endsWith(`vw`)?[t,`vw`]:[t,`%`]}}}function hg({groupSize:e,panelElement:t,styleProp:n}){let r,[i,a]=mg(n);switch(a){case`%`:r=i/100*e;break;case`px`:r=i;break;case`rem`:r=dg(t,i);break;case`em`:r=ug(t,i);break;case`vh`:r=fg(i);break;case`vw`:r=pg(i);break}return r}function gg(e){return parseFloat(e.toFixed(3))}function _g({group:e}){let{orientation:t,panels:n}=e;return n.reduce((e,n)=>(e+=t===`horizontal`?n.element.offsetWidth:n.element.offsetHeight,e),0)}function vg(e){let{panels:t}=e,n=_g({group:e});return n===0?t.map(e=>({groupResizeBehavior:e.panelConstraints.groupResizeBehavior,collapsedSize:0,collapsible:e.panelConstraints.collapsible===!0,defaultSize:void 0,disabled:e.panelConstraints.disabled,minSize:0,maxSize:100,panelId:e.id})):t.map(e=>{let{element:t,panelConstraints:r}=e,i=0;r.collapsedSize!==void 0&&(i=gg(hg({groupSize:n,panelElement:t,styleProp:r.collapsedSize})/n*100));let a;r.defaultSize!==void 0&&(a=gg(hg({groupSize:n,panelElement:t,styleProp:r.defaultSize})/n*100));let o=0;r.minSize!==void 0&&(o=gg(hg({groupSize:n,panelElement:t,styleProp:r.minSize})/n*100));let s=100;return r.maxSize!==void 0&&(s=gg(hg({groupSize:n,panelElement:t,styleProp:r.maxSize})/n*100)),{groupResizeBehavior:r.groupResizeBehavior,collapsedSize:i,collapsible:r.collapsible===!0,defaultSize:a,disabled:r.disabled,minSize:o,maxSize:s,panelId:e.id}})}function yg(e,t=`Assertion error`){if(!e)throw Error(t)}function bg(e,t){return Array.from(t).sort(e===`horizontal`?xg:Sg)}function xg(e,t){let n=e.element.offsetLeft-t.element.offsetLeft;return n===0?e.element.offsetWidth-t.element.offsetWidth:n}function Sg(e,t){let n=e.element.offsetTop-t.element.offsetTop;return n===0?e.element.offsetHeight-t.element.offsetHeight:n}function Cg(e){return typeof e==`object`&&!!e&&`nodeType`in e&&e.nodeType===Node.ELEMENT_NODE}function wg(e,t){return{x:e.x>=t.left&&e.x<=t.right?0:Math.min(Math.abs(e.x-t.left),Math.abs(e.x-t.right)),y:e.y>=t.top&&e.y<=t.bottom?0:Math.min(Math.abs(e.y-t.top),Math.abs(e.y-t.bottom))}}function Tg({orientation:e,rects:t,targetRect:n}){let r={x:n.x+n.width/2,y:n.y+n.height/2},i,a=Number.MAX_VALUE;for(let n of t){let{x:t,y:o}=wg(r,n),s=e===`horizontal`?t:o;s<a&&(a=s,i=n)}return yg(i,`No rect found`),i}var Eg;function Dg(){return Eg===void 0&&(Eg=typeof matchMedia==`function`?!!matchMedia(`(pointer:coarse)`).matches:!1),Eg}function Og(e){let{element:t,orientation:n,panels:r,separators:i}=e,a=bg(n,Array.from(t.children).filter(Cg).map(e=>({element:e}))).map(({element:e})=>e),o=[],s=!1,c=!1,l=-1,u=-1,d=0,f,p=[];{let e=-1;for(let t of a)t.hasAttribute(`data-panel`)&&(e++,t.hasAttribute(`data-disabled`)||(d++,l===-1&&(l=e),u=e))}if(d>1){let t=-1;for(let d of a)if(d.hasAttribute(`data-panel`)){t++;let i=r.find(e=>e.element===d);if(i){if(f){let r=f.element.getBoundingClientRect(),a=d.getBoundingClientRect(),m;if(c){let e=n===`horizontal`?new DOMRect(r.right,r.top,0,r.height):new DOMRect(r.left,r.bottom,r.width,0),t=n===`horizontal`?new DOMRect(a.left,a.top,0,a.height):new DOMRect(a.left,a.top,a.width,0);switch(p.length){case 0:m=[e,t];break;case 1:{let i=p[0];m=[i,Tg({orientation:n,rects:[r,a],targetRect:i.element.getBoundingClientRect()})===r?t:e];break}default:m=p;break}}else m=p.length?p:[n===`horizontal`?new DOMRect(r.right,a.top,a.left-r.right,a.height):new DOMRect(a.left,r.bottom,a.width,a.top-r.bottom)];for(let n of m){let r=`width`in n?n:n.element.getBoundingClientRect(),a=Dg()?e.resizeTargetMinimumSize.coarse:e.resizeTargetMinimumSize.fine;if(r.width<a){let e=a-r.width;r=new DOMRect(r.x-e/2,r.y,r.width+e,r.height)}if(r.height<a){let e=a-r.height;r=new DOMRect(r.x,r.y-e/2,r.width,r.height+e)}!s&&!(t<=l||t>u)&&o.push({group:e,groupSize:_g({group:e}),panels:[f,i],separator:`width`in n?void 0:n,rect:r}),s=!1}}c=!1,f=i,p=[]}}else if(d.hasAttribute(`data-separator`)){d.ariaDisabled!==null&&(s=!0);let e=i.find(e=>e.element===d);e?p.push(e):(f=void 0,p=[])}else c=!0}return o}var kg=class{#e={};addListener(e,t){let n=this.#e[e];return n===void 0?this.#e[e]=[t]:n.includes(t)||n.push(t),()=>{this.removeListener(e,t)}}emit(e,t){let n=this.#e[e];if(n!==void 0)if(n.length===1)n[0].call(null,t);else{let e=!1,r=null,i=Array.from(n);for(let n=0;n<i.length;n++){let a=i[n];try{a.call(null,t)}catch(t){r===null&&(e=!0,r=t)}}if(e)throw r}}removeAllListeners(){this.#e={}}removeListener(e,t){let n=this.#e[e];if(n!==void 0){let e=n.indexOf(t);e>=0&&n.splice(e,1)}}},Ag=new Map,jg=new kg;function Mg(e){Ag=new Map(Ag),Ag.delete(e)}function Ng(e,t){for(let[t]of Ag)if(t.id===e)return t}function Pg(e,t){for(let[t,n]of Ag)if(t.id===e)return n;if(t)throw Error(`Could not find data for Group with id ${e}`)}function Fg(){return Ag}function Ig(e,t){return jg.addListener(`groupChange`,n=>{n.group.id===e&&t(n)})}function Lg(e,t){let n=Ag.get(e);Ag=new Map(Ag),Ag.set(e,t),jg.emit(`groupChange`,{group:e,prev:n,next:t})}function Rg(e,t,n){let r,i={x:1/0,y:1/0};for(let a of t){let t=wg(n,a.rect);switch(e){case`horizontal`:t.x<=i.x&&(r=a,i=t);break;case`vertical`:t.y<=i.y&&(r=a,i=t);break}}return r?{distance:i,hitRegion:r}:void 0}function zg(e){return typeof e==`object`&&!!e&&`nodeType`in e&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE}function Bg(e,t){if(e===t)throw Error(`Cannot compare node with itself`);let n={a:Kg(e),b:Kg(t)},r;for(;n.a.at(-1)===n.b.at(-1);)r=n.a.pop(),n.b.pop();yg(r,`Stacking order can only be calculated for elements with a common ancestor`);let i={a:Gg(Wg(n.a)),b:Gg(Wg(n.b))};if(i.a===i.b){let e=r.childNodes,t={a:n.a.at(-1),b:n.b.at(-1)},i=e.length;for(;i--;){let n=e[i];if(n===t.a)return 1;if(n===t.b)return-1}}return Math.sign(i.a-i.b)}var Vg=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function Hg(e){let t=getComputedStyle(qg(e)??e).display;return t===`flex`||t===`inline-flex`}function Ug(e){let t=getComputedStyle(e);return!!(t.position===`fixed`||t.zIndex!==`auto`&&(t.position!==`static`||Hg(e))||+t.opacity<1||`transform`in t&&t.transform!==`none`||`webkitTransform`in t&&t.webkitTransform!==`none`||`mixBlendMode`in t&&t.mixBlendMode!==`normal`||`filter`in t&&t.filter!==`none`||`webkitFilter`in t&&t.webkitFilter!==`none`||`isolation`in t&&t.isolation===`isolate`||Vg.test(t.willChange)||t.webkitOverflowScrolling===`touch`)}function Wg(e){let t=e.length;for(;t--;){let n=e[t];if(yg(n,`Missing node`),Ug(n))return n}return null}function Gg(e){return e&&Number(getComputedStyle(e).zIndex)||0}function Kg(e){let t=[];for(;e;)t.push(e),e=qg(e);return t}function qg(e){let{parentNode:t}=e;return zg(t)?t.host:t}function Jg(e,t){return e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y}function Yg({groupElement:e,hitRegion:t,pointerEventTarget:n}){if(!Cg(n)||n.contains(e)||e.contains(n))return!0;if(Bg(n,e)>0){let r=n;for(;r;){if(r.contains(e))return!0;if(Jg(r.getBoundingClientRect(),t))return!1;r=r.parentElement}}return!0}function Xg(e,t){let n=[];return t.forEach((t,r)=>{if(r.disabled)return;let i=Og(r),a=Rg(r.orientation,i,{x:e.clientX,y:e.clientY});a&&a.distance.x<=0&&a.distance.y<=0&&Yg({groupElement:r.element,hitRegion:a.hitRegion.rect,pointerEventTarget:e.target})&&n.push(a.hitRegion)}),n}function Zg(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function Qg(e,t,n=0){return Math.abs(gg(e)-gg(t))<=n}function $g(e,t){return Qg(e,t)?0:e>t?1:-1}function e_({overrideDisabledPanels:e,panelConstraints:t,prevSize:n,size:r}){let{collapsedSize:i=0,collapsible:a,disabled:o,maxSize:s=100,minSize:c=0}=t;if(o&&!e)return n;if($g(r,c)<0)if(a){let e=(i+c)/2;r=$g(r,e)<0?i:c}else r=c;return r=Math.min(s,r),r=gg(r),r}function t_({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:r,prevLayout:i,trigger:a}){if(Qg(e,0))return t;let o=a===`imperative-api`,s=Object.values(t),c=Object.values(i),l=[...s],[u,d]=r;yg(u!=null,`Invalid first pivot index`),yg(d!=null,`Invalid second pivot index`);let f=0;switch(a){case`keyboard`:{let t=e<0?d:u,r=n[t];yg(r,`Panel constraints not found for index ${t}`);let{collapsedSize:i=0,collapsible:a,minSize:o=0}=r;if(a){let n=s[t];if(yg(n!=null,`Previous layout not found for panel index ${t}`),Qg(n,i)){let t=o-n;$g(t,Math.abs(e))>0&&(e=e<0?0-t:t)}}}{let t=e<0?u:d,r=n[t];yg(r,`No panel constraints found for index ${t}`);let{collapsedSize:i=0,collapsible:a,minSize:o=0}=r;if(a){let n=s[t];if(yg(n!=null,`Previous layout not found for panel index ${t}`),Qg(n,o)){let t=n-i;$g(t,Math.abs(e))>0&&(e=e<0?0-t:t)}}}break;default:{let t=e<0?d:u,r=n[t];yg(r,`Panel constraints not found for index ${t}`);let i=s[t],{collapsible:a,collapsedSize:o,minSize:c}=r;if(a&&$g(i,c)<0)if(e>0){let t=c-o,n=t/2;$g(i+e,c)<0&&(e=$g(e,n)<=0?0:t)}else{let t=c-o,n=100-t/2;$g(i-e,c)<0&&(e=$g(100+e,n)>0?0:-t)}break}}{let t=e<0?1:-1,r=e<0?d:u,i=0;for(;;){let e=s[r];yg(e!=null,`Previous layout not found for panel index ${r}`);let a=e_({overrideDisabledPanels:o,panelConstraints:n[r],prevSize:e,size:100})-e;if(i+=a,r+=t,r<0||r>=n.length)break}let a=Math.min(Math.abs(e),Math.abs(i));e=e<0?0-a:a}{let t=e<0?u:d;for(;t>=0&&t<n.length;){let r=Math.abs(e)-Math.abs(f),i=s[t];yg(i!=null,`Previous layout not found for panel index ${t}`);let a=i-r,c=e_({overrideDisabledPanels:o,panelConstraints:n[t],prevSize:i,size:a});if(!Qg(i,c)&&(f+=i-c,l[t]=c,f.toFixed(3).localeCompare(Math.abs(e).toFixed(3),void 0,{numeric:!0})>=0))break;e<0?t--:t++}}if(Zg(c,l))return i;{let t=e<0?d:u,r=s[t];yg(r!=null,`Previous layout not found for panel index ${t}`);let i=r+f,a=e_({overrideDisabledPanels:o,panelConstraints:n[t],prevSize:r,size:i});if(l[t]=a,!Qg(a,i)){let t=i-a,r=e<0?d:u;for(;r>=0&&r<n.length;){let i=l[r];yg(i!=null,`Previous layout not found for panel index ${r}`);let a=i+t,s=e_({overrideDisabledPanels:o,panelConstraints:n[r],prevSize:i,size:a});if(Qg(i,s)||(t-=s-i,l[r]=s),Qg(t,0))break;e>0?r--:r++}}}if(!Qg(Object.values(l).reduce((e,t)=>t+e,0),100,.1))return i;let p=Object.keys(i);return l.reduce((e,t,n)=>(e[p[n]]=t,e),{})}function n_(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(t[n]===void 0||$g(e[n],t[n])!==0)return!1;return!0}function r_({layout:e,panelConstraints:t}){let n=Object.values(e),r=[...n],i=r.reduce((e,t)=>e+t,0);if(r.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${r.map(e=>`${e}%`).join(`, `)}`);if(!Qg(i,100)&&r.length>0)for(let e=0;e<t.length;e++){let t=r[e];yg(t!=null,`No layout data found for index ${e}`),r[e]=100/i*t}let a=0;for(let e=0;e<t.length;e++){let i=n[e];yg(i!=null,`No layout data found for index ${e}`);let o=r[e];yg(o!=null,`No layout data found for index ${e}`);let s=e_({overrideDisabledPanels:!0,panelConstraints:t[e],prevSize:i,size:o});o!=s&&(a+=o-s,r[e]=s)}if(!Qg(a,0))for(let e=0;e<t.length;e++){let n=r[e];yg(n!=null,`No layout data found for index ${e}`);let i=n+a,o=e_({overrideDisabledPanels:!0,panelConstraints:t[e],prevSize:n,size:i});if(n!==o&&(a-=o-n,r[e]=o,Qg(a,0)))break}let o=Object.keys(e);return r.reduce((e,t,n)=>(e[o[n]]=t,e),{})}function i_({groupId:e,panelId:t}){let n=()=>{let t=Fg();for(let[n,{defaultLayoutDeferred:r,derivedPanelConstraints:i,layout:a,groupSize:o,separatorToPanels:s}]of t)if(n.id===e)return{defaultLayoutDeferred:r,derivedPanelConstraints:i,group:n,groupSize:o,layout:a,separatorToPanels:s};throw Error(`Group ${e} not found`)},r=()=>{let e=n().derivedPanelConstraints.find(e=>e.panelId===t);if(e!==void 0)return e;throw Error(`Panel constraints not found for Panel ${t}`)},i=()=>{let e=n().group.panels.find(e=>e.id===t);if(e!==void 0)return e;throw Error(`Layout not found for Panel ${t}`)},a=()=>{let e=n().layout[t];if(e!==void 0)return e;throw Error(`Layout not found for Panel ${t}`)},o=e=>{let r=a();if(e===r)return;let{defaultLayoutDeferred:i,derivedPanelConstraints:o,group:s,groupSize:c,layout:l,separatorToPanels:u}=n(),d=s.panels.findIndex(e=>e.id===t),f=d===s.panels.length-1,p=r_({layout:t_({delta:f?r-e:e-r,initialLayout:l,panelConstraints:o,pivotIndices:f?[d-1,d]:[d,d+1],prevLayout:l,trigger:`imperative-api`}),panelConstraints:o});n_(l,p)||Lg(s,{defaultLayoutDeferred:i,derivedPanelConstraints:o,groupSize:c,layout:p,separatorToPanels:u})};return{collapse:()=>{let{collapsible:e,collapsedSize:t}=r(),{mutableValues:n}=i(),s=a();e&&s!==t&&(n.expandToSize=s,o(t))},expand:()=>{let{collapsible:e,collapsedSize:t,minSize:n}=r(),{mutableValues:s}=i(),c=a();if(e&&c===t){let e=s.expandToSize??n;e===0&&(e=1),o(e)}},getSize:()=>{let{group:e}=n(),t=a(),{element:r}=i();return{asPercentage:t,inPixels:e.orientation===`horizontal`?r.offsetWidth:r.offsetHeight}},isCollapsed:()=>{let{collapsible:e,collapsedSize:t}=r(),n=a();return e&&Qg(t,n)},resize:e=>{let{group:t}=n(),{element:r}=i(),a=_g({group:t});o(gg(hg({groupSize:a,panelElement:r,styleProp:e})/a*100))}}}function a_(e){e.defaultPrevented||Xg(e,Fg()).forEach(t=>{if(t.separator&&!t.separator.disableDoubleClick){let n=t.panels.find(e=>e.panelConstraints.defaultSize!==void 0);if(n){let r=n.panelConstraints.defaultSize,i=i_({groupId:t.group.id,panelId:n.id});i&&r!==void 0&&(i.resize(r),e.preventDefault())}}})}function o_(e){let t=Fg();for(let[n]of t)if(n.separators.some(t=>t.element===e))return n;throw Error(`Could not find parent Group for separator element`)}function s_({groupId:e}){let t=()=>{let t=Fg();for(let[n,r]of t)if(n.id===e)return{group:n,...r};throw Error(`Could not find Group with id "${e}"`)};return{getLayout(){let{defaultLayoutDeferred:e,layout:n}=t();return e?{}:n},setLayout(e){let{defaultLayoutDeferred:n,derivedPanelConstraints:r,group:i,groupSize:a,layout:o,separatorToPanels:s}=t(),c=r_({layout:e,panelConstraints:r});return n?o:(n_(o,c)||Lg(i,{defaultLayoutDeferred:n,derivedPanelConstraints:r,groupSize:a,layout:c,separatorToPanels:s}),c)}}}function c_(e,t){let n=o_(e),r=Pg(n.id,!0),i=n.separators.find(t=>t.element===e);yg(i,`Matching separator not found`);let a=r.separatorToPanels.get(i);yg(a,`Matching panels not found`);let o=a.map(e=>n.panels.indexOf(e)),s=s_({groupId:n.id}).getLayout(),c=r_({layout:t_({delta:t,initialLayout:s,panelConstraints:r.derivedPanelConstraints,pivotIndices:o,prevLayout:s,trigger:`keyboard`}),panelConstraints:r.derivedPanelConstraints});n_(s,c)||Lg(n,{defaultLayoutDeferred:r.defaultLayoutDeferred,derivedPanelConstraints:r.derivedPanelConstraints,groupSize:r.groupSize,layout:c,separatorToPanels:r.separatorToPanels})}function l_(e){if(e.defaultPrevented)return;let t=e.currentTarget,n=o_(t);if(!n.disabled)switch(e.key){case`ArrowDown`:e.preventDefault(),n.orientation===`vertical`&&c_(t,5);break;case`ArrowLeft`:e.preventDefault(),n.orientation===`horizontal`&&c_(t,-5);break;case`ArrowRight`:e.preventDefault(),n.orientation===`horizontal`&&c_(t,5);break;case`ArrowUp`:e.preventDefault(),n.orientation===`vertical`&&c_(t,-5);break;case`End`:e.preventDefault(),c_(t,100);break;case`Enter`:{e.preventDefault();let n=o_(t),{derivedPanelConstraints:r,layout:i,separatorToPanels:a}=Pg(n.id,!0),o=n.separators.find(e=>e.element===t);yg(o,`Matching separator not found`);let s=a.get(o);yg(s,`Matching panels not found`);let c=s[0],l=r.find(e=>e.panelId===c.id);if(yg(l,`Panel metadata not found`),l.collapsible){let e=i[c.id];c_(t,(l.collapsedSize===e?n.mutableState.expandedPanelSizes[c.id]??l.minSize:l.collapsedSize)-e)}break}case`F6`:{e.preventDefault();let n=o_(t).separators.map(e=>e.element),r=Array.from(n).findIndex(t=>t===e.currentTarget);yg(r!==null,`Index not found`),n[e.shiftKey?r>0?r-1:n.length-1:r+1<n.length?r+1:0].focus({preventScroll:!0});break}case`Home`:e.preventDefault(),c_(t,-100);break}}var u_={cursorFlags:0,state:`inactive`},d_=new kg;function f_(){return u_}function p_(e){return d_.addListener(`change`,e)}function m_(e){let t=u_,n={...u_};n.cursorFlags=e,u_=n,d_.emit(`change`,{prev:t,next:n})}function h_(e){let t=u_;u_=e,d_.emit(`change`,{prev:t,next:e})}function g_(e){if(e.defaultPrevented||e.pointerType===`mouse`&&e.button>0)return;let t=Fg(),n=Xg(e,t),r=new Map,i=!1;n.forEach(e=>{e.separator&&(i||(i=!0,e.separator.element.focus({preventScroll:!0})));let n=t.get(e.group);n&&r.set(e.group,n.layout)}),h_({cursorFlags:0,hitRegions:n,initialLayoutMap:r,pointerDownAtPoint:{x:e.clientX,y:e.clientY},state:`active`}),n.length&&e.preventDefault()}var __=e=>e,v_=()=>{},y_=1,b_=2,x_=4,S_=8,C_=3,w_=12,T_;function E_(){return T_===void 0&&(T_=!1,typeof window<`u`&&(window.navigator.userAgent.includes(`Chrome`)||window.navigator.userAgent.includes(`Firefox`))&&(T_=!0)),T_}function D_({cursorFlags:e,groups:t,state:n}){let r=0,i=0;switch(n){case`active`:case`hover`:t.forEach(e=>{if(!e.mutableState.disableCursor)switch(e.orientation){case`horizontal`:r++;break;case`vertical`:i++;break}})}if(!(r===0&&i===0)){switch(n){case`active`:if(e&&E_()){let t=(e&y_)!==0,n=(e&b_)!==0,r=(e&x_)!==0,i=(e&S_)!==0;if(t)return r?`se-resize`:i?`ne-resize`:`e-resize`;if(n)return r?`sw-resize`:i?`nw-resize`:`w-resize`;if(r)return`s-resize`;if(i)return`n-resize`}break}return E_()?r>0&&i>0?`move`:r>0?`ew-resize`:`ns-resize`:r>0&&i>0?`grab`:r>0?`col-resize`:`row-resize`}}var O_=new WeakMap;function k_(e){if(e.defaultView===null||e.defaultView===void 0)return;let{prevStyle:t,styleSheet:n}=O_.get(e)??{};n===void 0&&(n=new e.defaultView.CSSStyleSheet,e.adoptedStyleSheets&&e.adoptedStyleSheets.push(n));let r=f_();switch(r.state){case`active`:case`hover`:{let e=D_({cursorFlags:r.cursorFlags,groups:r.hitRegions.map(e=>e.group),state:r.state}),i=`*, *:hover {cursor: ${e} !important; }`;if(t===i)return;t=i,e?n.cssRules.length===0?n.insertRule(i):n.replaceSync(i):n.cssRules.length===1&&n.deleteRule(0);break}case`inactive`:t=void 0,n.cssRules.length===1&&n.deleteRule(0);break}O_.set(e,{prevStyle:t,styleSheet:n})}function A_({document:e,event:t,hitRegions:n,initialLayoutMap:r,mountedGroups:i,pointerDownAtPoint:a,prevCursorFlags:o}){let s=0;n.forEach(e=>{let{group:n,groupSize:o}=e,{orientation:c,panels:l}=n,{disableCursor:u}=n.mutableState,d=0;d=a?c===`horizontal`?(t.clientX-a.x)/o*100:(t.clientY-a.y)/o*100:c===`horizontal`?t.clientX<0?-100:100:t.clientY<0?-100:100;let f=r.get(n),p=i.get(n);if(!f||!p)return;let{defaultLayoutDeferred:m,derivedPanelConstraints:h,groupSize:g,layout:_,separatorToPanels:v}=p;if(h&&_&&v){let t=t_({delta:d,initialLayout:f,panelConstraints:h,pivotIndices:e.panels.map(e=>l.indexOf(e)),prevLayout:_,trigger:`mouse-or-touch`});if(n_(t,_)){if(d!==0&&!u)switch(c){case`horizontal`:s|=d<0?y_:b_;break;case`vertical`:s|=d<0?x_:S_;break}}else Lg(e.group,{defaultLayoutDeferred:m,derivedPanelConstraints:h,groupSize:g,layout:t,separatorToPanels:v})}});let c=0;t.movementX===0?c|=o&C_:c|=s&C_,t.movementY===0?c|=o&w_:c|=s&w_,m_(c),k_(e)}function j_(e){let t=Fg(),n=f_();switch(n.state){case`active`:A_({document:e.currentTarget,event:e,hitRegions:n.hitRegions,initialLayoutMap:n.initialLayoutMap,mountedGroups:t,prevCursorFlags:n.cursorFlags})}}function M_(e){if(e.defaultPrevented)return;let t=f_(),n=Fg();switch(t.state){case`active`:if(e.buttons===0){h_({cursorFlags:0,state:`inactive`}),t.hitRegions.forEach(e=>{let t=Pg(e.group.id,!0);Lg(e.group,t)});return}for(let n of t.hitRegions)if(n.separator){let{element:t}=n.separator;t.hasPointerCapture?.(e.pointerId)||t.setPointerCapture?.(e.pointerId)}A_({document:e.currentTarget,event:e,hitRegions:t.hitRegions,initialLayoutMap:t.initialLayoutMap,mountedGroups:n,pointerDownAtPoint:t.pointerDownAtPoint,prevCursorFlags:t.cursorFlags});break;default:{let r=Xg(e,n);r.length===0?t.state!==`inactive`&&h_({cursorFlags:0,state:`inactive`}):h_({cursorFlags:0,hitRegions:r,state:`hover`}),k_(e.currentTarget);break}}}function N_(e){if(e.relatedTarget instanceof HTMLIFrameElement)switch(f_().state){case`hover`:h_({cursorFlags:0,state:`inactive`})}}function P_(e){if(e.defaultPrevented||e.pointerType===`mouse`&&e.button>0)return;let t=f_();switch(t.state){case`active`:h_({cursorFlags:0,state:`inactive`}),t.hitRegions.length>0&&(k_(e.currentTarget),t.hitRegions.forEach(e=>{let t=Pg(e.group.id,!0);Lg(e.group,t)}),e.preventDefault())}}function F_(e){let t=0,n=0,r={};for(let i of e)if(i.defaultSize!==void 0){t++;let e=gg(i.defaultSize);n+=e,r[i.panelId]=e}else r[i.panelId]=void 0;let i=e.length-t;if(i!==0){let t=gg((100-n)/i);for(let n of e)n.defaultSize===void 0&&(r[n.panelId]=t)}return r}function I_(e,t,n){if(!n[0])return;let r=e.panels.find(e=>e.element===t);if(!r||!r.onResize)return;let i=_g({group:e}),a=e.orientation===`horizontal`?r.element.offsetWidth:r.element.offsetHeight,o=r.mutableValues.prevSize,s={asPercentage:gg(a/i*100),inPixels:a};r.mutableValues.prevSize=s,r.onResize(s,r.id,o)}function L_(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function R_({group:e,nextGroupSize:t,prevGroupSize:n,prevLayout:r}){if(n<=0||t<=0||n===t)return r;let i=0,a=0,o=!1,s=new Map,c=[];for(let l of e.panels){let e=r[l.id]??0;switch(l.panelConstraints.groupResizeBehavior){case`preserve-pixel-size`:{o=!0;let r=gg(e/100*n/t*100);s.set(l.id,r),i+=r;break}default:c.push(l.id),a+=e;break}}if(!o||c.length===0)return r;let l=100-i,u={...r};if(s.forEach((e,t)=>{u[t]=e}),a>0)for(let e of c)u[e]=gg((r[e]??0)/a*l);else{let e=gg(l/c.length);for(let t of c)u[t]=e}return u}function z_(e,t){let n=e.map(e=>e.id),r=Object.keys(t);if(n.length!==r.length)return!1;for(let e of n)if(!r.includes(e))return!1;return!0}var B_=new Map;function V_(e){let t=!0;yg(e.element.ownerDocument.defaultView,`Cannot register an unmounted Group`);let n=e.element.ownerDocument.defaultView.ResizeObserver,r=new Set,i=new Set,a=new n(n=>{for(let r of n){let{borderBoxSize:n,target:i}=r;if(i===e.element){if(t){let t=_g({group:e});if(t===0)return;let n=Pg(e.id);if(!n)return;let r=vg(e),i=n.defaultLayoutDeferred?F_(r):n.layout,a=r_({layout:R_({group:e,nextGroupSize:t,prevGroupSize:n.groupSize,prevLayout:i}),panelConstraints:r});if(!n.defaultLayoutDeferred&&n_(n.layout,a)&&L_(n.derivedPanelConstraints,r)&&n.groupSize===t)return;Lg(e,{defaultLayoutDeferred:!1,derivedPanelConstraints:r,groupSize:t,layout:a,separatorToPanels:n.separatorToPanels})}}else I_(e,i,n)}});a.observe(e.element),e.panels.forEach(e=>{yg(!r.has(e.id),`Panel ids must be unique; id "${e.id}" was used more than once`),r.add(e.id),e.onResize&&a.observe(e.element)});let o=_g({group:e}),s=vg(e),c=e.panels.map(({id:e})=>e).join(`,`),l=e.mutableState.defaultLayout;l&&(z_(e.panels,l)||(l=void 0));let u=r_({layout:e.mutableState.layouts[c]??l??F_(s),panelConstraints:s}),d=e.element.ownerDocument;B_.set(d,(B_.get(d)??0)+1);let f=new Map;return Og(e).forEach(e=>{e.separator&&f.set(e.separator,e.panels)}),Lg(e,{defaultLayoutDeferred:o===0,derivedPanelConstraints:s,groupSize:o,layout:u,separatorToPanels:f}),e.separators.forEach(e=>{yg(!i.has(e.id),`Separator ids must be unique; id "${e.id}" was used more than once`),i.add(e.id),e.element.addEventListener(`keydown`,l_)}),B_.get(d)===1&&(d.addEventListener(`dblclick`,a_,!0),d.addEventListener(`pointerdown`,g_,!0),d.addEventListener(`pointerleave`,j_),d.addEventListener(`pointermove`,M_),d.addEventListener(`pointerout`,N_),d.addEventListener(`pointerup`,P_,!0)),function(){t=!1,B_.set(d,Math.max(0,(B_.get(d)??0)-1)),Mg(e),e.separators.forEach(e=>{e.element.removeEventListener(`keydown`,l_)}),B_.get(d)||(d.removeEventListener(`dblclick`,a_,!0),d.removeEventListener(`pointerdown`,g_,!0),d.removeEventListener(`pointerleave`,j_),d.removeEventListener(`pointermove`,M_),d.removeEventListener(`pointerout`,N_),d.removeEventListener(`pointerup`,P_,!0)),a.disconnect()}}function H_(){let[e,t]=(0,Z.useState)({});return[e,(0,Z.useCallback)(()=>t({}),[])]}function U_(e){let t=(0,Z.useId)();return`${e??t}`}var W_=typeof window<`u`?Z.useLayoutEffect:Z.useEffect;function G_(e){let t=(0,Z.useRef)(e);return W_(()=>{t.current=e},[e]),(0,Z.useCallback)((...e)=>t.current?.(...e),[t])}function K_(...e){return G_(t=>{e.forEach(e=>{if(e)switch(typeof e){case`function`:e(t);break;case`object`:e.current=t;break}})})}function q_(e){let t=(0,Z.useRef)({...e});return W_(()=>{for(let n in e)t.current[n]=e[n]},[e]),t.current}var J_=(0,Z.createContext)(null);function Y_(e,t){let n=(0,Z.useRef)({getLayout:()=>({}),setLayout:__});(0,Z.useImperativeHandle)(t,()=>n.current,[]),W_(()=>{Object.assign(n.current,s_({groupId:e}))})}function X_({children:e,className:t,defaultLayout:n,disableCursor:r,disabled:i,elementRef:a,groupRef:o,id:s,onLayoutChange:c,onLayoutChanged:l,orientation:u=`horizontal`,resizeTargetMinimumSize:d={coarse:20,fine:10},style:f,...p}){let m=(0,Z.useRef)({onLayoutChange:{},onLayoutChanged:{}}),h=G_(e=>{n_(m.current.onLayoutChange,e)||(m.current.onLayoutChange=e,c?.(e))}),g=G_(e=>{n_(m.current.onLayoutChanged,e)||(m.current.onLayoutChanged=e,l?.(e))}),_=U_(s),v=(0,Z.useRef)(null),[y,b]=H_(),x=(0,Z.useRef)({lastExpandedPanelSizes:{},layouts:{},panels:[],resizeTargetMinimumSize:d,separators:[]}),S=K_(v,a);Y_(_,o);let C=G_((e,t)=>{let r=f_(),i=Ng(e),a=Pg(e);if(a){let e=!1;switch(r.state){case`active`:e=r.hitRegions.some(e=>e.group===i);break}return{flexGrow:a.layout[t]??1,pointerEvents:e?`none`:void 0}}if(n?.[t])return{flexGrow:n?.[t]}}),w=q_({defaultLayout:n,disableCursor:r}),T=(0,Z.useMemo)(()=>({get disableCursor(){return!!w.disableCursor},getPanelStyles:C,id:_,orientation:u,registerPanel:e=>{let t=x.current;return t.panels=bg(u,[...t.panels,e]),b(),()=>{t.panels=t.panels.filter(t=>t!==e),b()}},registerSeparator:e=>{let t=x.current;return t.separators=bg(u,[...t.separators,e]),b(),()=>{t.separators=t.separators.filter(t=>t!==e),b()}},updatePanelProps:(e,{disabled:t})=>{let n=x.current.panels.find(t=>t.id===e);n&&(n.panelConstraints.disabled=t);let r=Ng(_),i=Pg(_);r&&i&&Lg(r,{...i,derivedPanelConstraints:vg(r)})},updateSeparatorProps:(e,{disabled:t,disableDoubleClick:n})=>{let r=x.current.separators.find(t=>t.id===e);r&&(r.disabled=t,r.disableDoubleClick=n)}}),[C,_,b,u,w]),E=(0,Z.useRef)(null);return W_(()=>{let e=v.current;if(e===null)return;let t=x.current,n;if(w.defaultLayout!==void 0&&Object.keys(w.defaultLayout).length===t.panels.length){n={};for(let e of t.panels){let t=w.defaultLayout[e.id];t!==void 0&&(n[e.id]=t)}}let r={disabled:!!i,element:e,id:_,mutableState:{defaultLayout:n,disableCursor:!!w.disableCursor,expandedPanelSizes:x.current.lastExpandedPanelSizes,layouts:x.current.layouts},orientation:u,panels:t.panels,resizeTargetMinimumSize:t.resizeTargetMinimumSize,separators:t.separators};E.current=r;let a=V_(r),{defaultLayoutDeferred:o,derivedPanelConstraints:s,layout:c}=Pg(r.id,!0);!o&&s.length>0&&(h(c),g(c));let l=Ig(_,e=>{let{defaultLayoutDeferred:t,derivedPanelConstraints:n,layout:i}=e.next;if(t||n.length===0)return;let a=r.panels.map(({id:e})=>e).join(`,`);r.mutableState.layouts[a]=i,n.forEach(t=>{if(t.collapsible){let{layout:n}=e.prev??{};if(n){let e=Qg(t.collapsedSize,i[t.panelId]),a=Qg(t.collapsedSize,n[t.panelId]);e&&!a&&(r.mutableState.expandedPanelSizes[t.panelId]=n[t.panelId])}}});let o=f_().state!==`active`;h(i),o&&g(i)});return()=>{E.current=null,a(),l()}},[i,_,g,h,u,y,w]),(0,Z.useEffect)(()=>{let e=E.current;e&&(e.mutableState.defaultLayout=n,e.mutableState.disableCursor=!!r)}),(0,X.jsx)(J_.Provider,{value:T,children:(0,X.jsx)(`div`,{...p,className:t,"data-group":!0,"data-testid":_,id:_,ref:S,style:{height:`100%`,width:`100%`,overflow:`hidden`,...f,display:`flex`,flexDirection:u===`horizontal`?`row`:`column`,flexWrap:`nowrap`,touchAction:u===`horizontal`?`pan-y`:`pan-x`},children:e})})}X_.displayName=`Group`;function Z_(){let e=(0,Z.useContext)(J_);return yg(e,`Group Context not found; did you render a Panel or Separator outside of a Group?`),e}function Q_(e,t){let{id:n}=Z_(),r=(0,Z.useRef)({collapse:v_,expand:v_,getSize:()=>({asPercentage:0,inPixels:0}),isCollapsed:()=>!1,resize:v_});(0,Z.useImperativeHandle)(t,()=>r.current,[]),W_(()=>{Object.assign(r.current,i_({groupId:n,panelId:e}))})}function $_({children:e,className:t,collapsedSize:n=`0%`,collapsible:r=!1,defaultSize:i,disabled:a,elementRef:o,groupResizeBehavior:s=`preserve-relative-size`,id:c,maxSize:l=`100%`,minSize:u=`0%`,onResize:d,panelRef:f,style:p,...m}){let h=!!c,g=U_(c),_=q_({disabled:a}),v=(0,Z.useRef)(null),y=K_(v,o),{getPanelStyles:b,id:x,orientation:S,registerPanel:C,updatePanelProps:w}=Z_(),T=d!==null,E=G_((e,t,n)=>{d?.(e,c,n)});W_(()=>{let e=v.current;if(e!==null)return C({element:e,id:g,idIsStable:h,mutableValues:{expandToSize:void 0,prevSize:void 0},onResize:T?E:void 0,panelConstraints:{groupResizeBehavior:s,collapsedSize:n,collapsible:r,defaultSize:i,disabled:_.disabled,maxSize:l,minSize:u}})},[s,n,r,i,T,g,h,l,u,E,C,_]),(0,Z.useEffect)(()=>{w(g,{disabled:a})},[a,g,w]),Q_(g,f);let D=()=>{let e=b(x,g);if(e)return JSON.stringify(e)},O=(0,Z.useSyncExternalStore)(e=>Ig(x,e),D,D),k;return k=O?JSON.parse(O):i?{flexGrow:void 0,flexShrink:void 0,flexBasis:i}:{flexGrow:1},(0,X.jsx)(`div`,{...m,"data-disabled":a||void 0,"data-panel":!0,"data-testid":g,id:g,ref:y,style:{...ev,display:`flex`,flexBasis:0,flexShrink:1,overflow:`visible`,...k},children:(0,X.jsx)(`div`,{className:t,style:{maxHeight:`100%`,maxWidth:`100%`,flexGrow:1,overflow:`auto`,...p,touchAction:S===`horizontal`?`pan-y`:`pan-x`},children:e})})}$_.displayName=`Panel`;var ev={minHeight:0,maxHeight:`100%`,height:`auto`,minWidth:0,maxWidth:`100%`,width:`auto`,border:`none`,borderWidth:0,padding:0,margin:0};function tv(){return(0,Z.useRef)(null)}function nv({layout:e,panelConstraints:t,panelId:n,panelIndex:r}){let i,a,o=e[n],s=t.find(e=>e.panelId===n);if(s){let c=s.maxSize,l=s.collapsible?s.collapsedSize:s.minSize,u=[r,r+1];a=r_({layout:t_({delta:l-o,initialLayout:e,panelConstraints:t,pivotIndices:u,prevLayout:e}),panelConstraints:t})[n],i=r_({layout:t_({delta:c-o,initialLayout:e,panelConstraints:t,pivotIndices:u,prevLayout:e}),panelConstraints:t})[n]}return{valueControls:n,valueMax:i,valueMin:a,valueNow:o}}function rv({children:e,className:t,disabled:n,disableDoubleClick:r,elementRef:i,id:a,style:o,...s}){let c=U_(a),l=q_({disabled:n,disableDoubleClick:r}),[u,d]=(0,Z.useState)({}),[f,p]=(0,Z.useState)(`inactive`),m=(0,Z.useRef)(null),h=K_(m,i),{disableCursor:g,id:_,orientation:v,registerSeparator:y,updateSeparatorProps:b}=Z_(),x=v===`horizontal`?`vertical`:`horizontal`;W_(()=>{let e=m.current;if(e!==null){let t={disabled:l.disabled,disableDoubleClick:l.disableDoubleClick,element:e,id:c},n=y(t),r=p_(e=>{p(e.next.state!==`inactive`&&e.next.hitRegions.some(e=>e.separator===t)?e.next.state:`inactive`)}),i=Ig(_,e=>{let{derivedPanelConstraints:n,layout:r,separatorToPanels:i}=e.next,a=i.get(t);if(a){let e=a[0],t=a.indexOf(e);d(nv({layout:r,panelConstraints:n,panelId:e.id,panelIndex:t}))}});return()=>{r(),i(),n()}}},[_,c,y,l]),(0,Z.useEffect)(()=>{b(c,{disabled:n,disableDoubleClick:r})},[n,r,c,b]);let S;return n&&!g&&(S=`not-allowed`),(0,X.jsx)(`div`,{...s,"aria-controls":u.valueControls,"aria-disabled":n||void 0,"aria-orientation":x,"aria-valuemax":u.valueMax,"aria-valuemin":u.valueMin,"aria-valuenow":u.valueNow,children:e,className:t,"data-separator":n?`disabled`:f,"data-testid":c,id:c,ref:h,role:`separator`,style:{flexBasis:`auto`,cursor:S,...o,flexGrow:0,flexShrink:0,touchAction:`none`},tabIndex:n?void 0:0})}rv.displayName=`Separator`;function iv(){let e=(0,Q.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,X.jsx)(`div`,{className:`tiptap-editor pt-10`,role:`status`,"aria-busy":`true`,"aria-label":`Loading document`,children:(0,X.jsxs)(`div`,{className:`space-y-3`,children:[(0,X.jsx)(Rf,{className:`h-9 w-2/5 mt-6 mb-5`}),(0,X.jsx)(Rf,{className:`h-4 w-full`}),(0,X.jsx)(Rf,{className:`h-4 w-3/4`})]})}),e[0]=t):t=e[0],t}var av=1700,ov=3;function sv(e,t,n){let r=n?.windowMs??600,i=n?.maxLevel??ov;if(e===0||t>=r)return 1;let a=e+1;return a>i?i:a}var cv={0:{count:0,startRadius:0,baseDistance:0,distanceVariance:0,sizeMin:0,sizeMax:0,maxDelay:0,durationMin:0,durationMax:0},1:{count:0,startRadius:0,baseDistance:0,distanceVariance:0,sizeMin:0,sizeMax:0,maxDelay:0,durationMin:0,durationMax:0},2:{count:0,startRadius:0,baseDistance:0,distanceVariance:0,sizeMin:0,sizeMax:0,maxDelay:0,durationMin:0,durationMax:0},3:{count:16,startRadius:11,baseDistance:7,distanceVariance:3,sizeMin:.45,sizeMax:1.2,maxDelay:250,durationMin:620,durationMax:1400}},lv=[`var(--color-azure-blue)`,`var(--color-sky-blue)`,`var(--color-violet-300)`,`var(--color-orange-light)`,`var(--color-crystal-blue)`,`var(--color-white-cream)`];function uv(e,t={}){let n=t.rng??Math.random,r=t.colors??lv,i=cv[e];if(i.count===0||r.length===0)return[];let a=[],o=Math.PI*2/i.count;for(let e=0;e<i.count;e++){let t=e*o+(n()-.5)*o*.7,s=i.baseDistance+(n()-.5)*2*i.distanceVariance,c=i.sizeMin+n()*(i.sizeMax-i.sizeMin),l=n()*i.maxDelay,u=i.durationMin+n()*(i.durationMax-i.durationMin),d=Math.floor(n()*r.length),f=Math.cos(t),p=Math.sin(t);a.push({id:e,dx:f*s,dy:p*s,originDx:f*i.startRadius,originDy:p*i.startRadius,size:c,color:r[d]??`currentColor`,delay:l,duration:u})}return a}var dv=1.8,fv=90,pv=16,mv=380,hv=.025,gv=.1,_v=.18,vv=400,yv=9.2736,bv=18.1799,xv=14.5244,Sv={1:{halfWidth:1.5,apexLift:2.2},2:{halfWidth:1.4,apexLift:2.6},3:{halfWidth:1.25,apexLift:3}};function Cv(e,t){let{halfWidth:n,apexLift:r}=Sv[t];return`M${e-n} ${xv+.3} Q${e} ${xv-r}, ${e+n} ${xv+.3}`}function wv(e){let t=1.5,n=.3;return`M${e-t} ${xv-n} Q${e} ${xv+1.4}, ${e+t} ${xv-n}`}var Tv=15,Ev=15;function Dv(e){return{fill:e.color,"--fx-tx":`${e.dx}px`,"--fx-ty":`${e.dy}px`,"--fx-delay":`${e.delay}ms`,"--fx-duration":`${e.duration}ms`}}function Ov(e){let t=(0,Q.c)(71),{size:n,className:r,trackMouse:i,variant:a,celebrateSignal:o}=e,s=n===void 0?48:n,c=i===void 0?!0:i,l=a===void 0?`default`:a,u=o===void 0?0:o,d=(0,Z.useRef)(null),f=(0,Z.useRef)(null),p=(0,Z.useRef)(null),m;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(m={x:0,y:0},t[0]=m):m=t[0];let h=(0,Z.useRef)(m),[g,_]=(0,Z.useState)(0),[v,y]=(0,Z.useState)(0),b;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(b=[],t[1]=b):b=t[1];let[x,S]=(0,Z.useState)(b),C=(0,Z.useRef)(0),w=(0,Z.useRef)(void 0),T=l===`sleeping`,E;t[2]!==g||t[3]!==T?(E=function(){if(T)return;let e=typeof performance<`u`&&typeof performance.now==`function`?performance.now():Date.now(),t=C.current===0?1/0:e-C.current;C.current=e;let n=sv(g,t);_(n),y(Mv),S(uv(n)),clearTimeout(w.current),w.current=setTimeout(()=>{_(0),S([])},av)},t[2]=g,t[3]=T,t[4]=E):E=t[4];let D=E,O,k;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(O=()=>()=>clearTimeout(w.current),k=[],t[5]=O,t[6]=k):(O=t[5],k=t[6]),(0,Z.useEffect)(O,k);let A,j;t[7]!==u||t[8]!==T?(A=()=>{u===0||T||(_(3),y(jv),S(uv(3)),clearTimeout(w.current),w.current=setTimeout(()=>{_(0),S([])},av))},j=[u,T],t[7]=u,t[8]=T,t[9]=A,t[10]=j):(A=t[9],j=t[10]),(0,Z.useEffect)(A,j);let M,N;t[11]!==T||t[12]!==c?(M=()=>{if(!c||T||window.matchMedia(`(prefers-reduced-motion: reduce)`).matches)return;let e=0,t=0,n=!1,r=0,i=0,a=0,o=0,s=0,l=function(r){e=r.clientX,t=r.clientY,n=!0};function u(){if(s=requestAnimationFrame(u),!n)return;let c=f.current,l=d.current;if(!c||!l)return;let m=c.getBoundingClientRect(),g=m.left+m.width/2,_=m.top+m.height*.48,v=e-g,y=t-_,b=Math.hypot(v,y),x=Math.max(-1,Math.min(1,v/mv)),S=Math.max(-1,Math.min(1,y/mv)),C=x*pv,w=-S*pv;r+=(w-r)*gv,i+=(C-i)*gv,l.style.transform=`perspective(${vv}px) rotateX(${r.toFixed(3)}deg) rotateY(${i.toFixed(3)}deg)`;let T=0,E=0;if(b>=1){let e=Math.min(b/fv,1)*dv;T=v/b*e,E=y/b*e}a+=(T-a)*_v,o+=(E-o)*_v;let D=i*hv,O=-r*hv,k=a+D,A=o+O;h.current.x=k,h.current.y=A,p.current?.setAttribute(`transform`,`translate(${k.toFixed(3)} ${A.toFixed(3)})`)}return document.addEventListener(`mousemove`,l,{passive:!0}),s=requestAnimationFrame(u),()=>{document.removeEventListener(`mousemove`,l),cancelAnimationFrame(s),d.current&&(d.current.style.transform=``),h.current={x:0,y:0},p.current?.removeAttribute(`transform`)}},N=[c,T],t[11]=T,t[12]=c,t[13]=M,t[14]=N):(M=t[13],N=t[14]),(0,Z.useEffect)(M,N);let P;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(P=()=>{let e=p.current;if(!e)return;let{x:t,y:n}=h.current;e.setAttribute(`transform`,`translate(${t.toFixed(3)} ${n.toFixed(3)})`)},t[15]=P):P=t[15],(0,Z.useLayoutEffect)(P);let F=g>0,I=F?g:1,L=F?`ok-blob-clicked-${g}`:null,R;t[16]===r?R=t[17]:(R=G(`ok-blob-3d-wrapper`,r),t[16]=r,t[17]=R);let z=T?`cursor-default`:`cursor-pointer`,B=`body-${v}`,V=T&&`ok-blob-sleeping`,H;t[18]!==L||t[19]!==V?(H=G(`ok-blob-group`,V,L),t[18]=L,t[19]=V,t[20]=H):H=t[20];let U;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,X.jsx)(`path`,{d:`M25.2339 6.78134C25.5199 7.35734 25.8179 8.47234 26.0179 9.07834C26.0189 9.08234 26.0209 9.08634 26.0219 9.09134C26.0229 9.09534 26.0249 9.10034 26.0259 9.10434C26.0539 9.19734 26.0949 9.29533 26.1519 9.41633C26.2919 9.71133 26.5269 10.1173 27.1299 11.1683C27.3259 11.4643 27.5209 11.7693 27.7119 12.0903C29.9739 15.1623 29.3259 20.1913 27.0469 22.9153C26.7779 23.2953 26.4869 23.6043 26.1889 23.8863C26.1519 23.9253 26.1129 23.9643 26.0729 24.0033C25.3159 24.7543 24.2949 25.4673 23.6129 25.8323C22.7469 26.2983 22.1349 26.5483 21.6299 26.7463C20.3649 27.3063 19.0609 27.7733 17.6569 28.0423C15.9649 28.3513 14.1939 28.4433 12.4569 28.1373C11.4779 27.9663 10.5119 27.6663 9.60891 27.2493C8.77491 26.8663 7.99192 26.3853 7.26992 25.8403C6.83592 25.5393 6.43893 25.2343 6.08093 24.9383C5.57893 24.5223 5.15993 24.1263 4.83493 23.7793C4.04993 22.9443 3.31593 21.8893 2.80893 21.0953C2.72593 20.9663 2.64792 20.8433 2.57592 20.7293C2.56192 20.7093 2.54793 20.6893 2.53393 20.6703C2.08593 20.0263 1.71892 19.3293 1.43792 18.5993C1.42892 18.5453 1.42093 18.4903 1.41293 18.4353C1.32093 17.7443 1.08292 16.9423 1.01092 15.6333C0.984921 15.0653 0.998928 14.4013 1.12393 13.6353C1.20693 13.1413 1.31993 12.9023 1.40893 12.7113C1.43593 12.6543 1.46193 12.6023 1.48593 12.5483C1.56793 12.3653 1.59392 12.1563 1.63592 11.9083C1.68992 11.5883 1.76992 11.1943 2.04592 10.7553C2.94392 9.37934 3.36792 8.81934 3.66592 8.33934C3.75592 8.20334 3.84292 8.08134 3.94192 7.96634C4.21592 7.64634 4.67693 7.29534 5.10293 7.05734C5.16693 7.02234 5.23093 6.98834 5.29193 6.95534C5.62993 6.77834 6.22592 6.30135 6.66992 5.92035C6.83692 5.77635 7.08193 5.60735 7.37393 5.40935C7.67393 5.20535 8.02593 4.96934 8.39193 4.70234C9.32093 4.02634 9.84091 3.69134 10.2599 3.42334C10.3799 3.34734 10.4919 3.27734 10.6049 3.20834C10.9609 2.98834 11.4149 2.73034 11.8869 2.48634C12.4519 2.19334 13.0469 1.92133 13.5089 1.72233C14.7399 1.30233 16.0539 1.01333 17.4169 1.00033C18.1169 0.991333 18.7939 1.16534 19.2389 1.43034C19.6869 1.69534 19.8689 2.00335 19.8039 2.23935C19.7379 2.47835 19.4399 2.63634 19.0109 2.74734C18.5789 2.85634 18.0469 2.92035 17.4889 2.96135C16.3639 3.04235 15.2399 3.36435 14.1499 3.80835C12.8199 4.35135 11.5379 5.07133 10.2719 5.84733C9.38691 6.39133 8.51192 6.97334 7.63592 7.56834C7.54492 7.63034 7.45492 7.69135 7.36492 7.75235C6.97392 8.06635 6.58293 8.38134 6.22293 8.66334C5.97893 8.85734 5.76793 9.04834 5.59393 9.21434C5.26893 9.52334 5.02393 9.74334 4.81893 9.93934C4.67793 10.0753 4.55793 10.2013 4.45593 10.3443C4.40093 10.4213 4.32992 10.5273 4.24792 10.6593C3.90492 11.1933 3.44493 12.1693 3.15393 13.1173C3.01893 13.5363 2.87991 14.0343 2.79391 14.5253C2.66591 15.2253 2.65594 15.9053 2.71994 16.2373C2.82794 16.8193 2.95593 17.4833 3.14093 18.0553C3.31293 18.6003 3.52991 19.0583 3.70791 19.2823C3.81591 19.4183 3.90394 19.5473 3.99594 19.6913C4.09394 19.8413 4.19191 20.0073 4.31091 20.2033C4.47891 20.4803 4.68592 20.8163 5.00192 21.2493C5.36492 21.7463 5.61793 22.1043 5.83493 22.4023C6.14493 22.8243 6.38591 23.1343 6.83691 23.5033C7.33891 23.9113 7.86593 24.3113 8.26693 24.6393C8.44893 24.7883 8.66993 24.9443 8.90493 25.0963C9.21593 25.2963 9.55192 25.4893 9.85592 25.6703C10.1059 25.8203 10.3059 25.9633 10.4869 26.0863C10.5429 26.1243 10.5979 26.1603 10.6519 26.1943C10.8699 26.2803 11.0929 26.3593 11.3159 26.4283C11.3539 26.4323 11.3949 26.4353 11.4369 26.4393C11.6509 26.4573 11.9089 26.4733 12.2209 26.5133C12.7169 26.5753 13.1399 26.6603 13.6019 26.7243C13.9589 26.7733 14.3409 26.8083 14.7729 26.7893C15.0729 26.7753 15.4069 26.7353 15.7389 26.6813C16.2349 26.6023 16.7179 26.4943 17.0569 26.4473C17.1499 26.4343 17.2359 26.4343 17.3209 26.4373C17.3489 26.4393 17.3799 26.4413 17.4109 26.4433C17.4119 26.4433 17.4119 26.4433 17.4129 26.4433C17.4199 26.4433 17.4279 26.4443 17.4349 26.4443C18.2329 26.2413 19.0259 25.9433 19.7959 25.5983C19.8609 25.5633 19.9259 25.5273 19.9899 25.4913C20.3059 25.3173 20.6049 25.1383 20.7869 24.9943C20.9829 24.8393 21.5189 24.5373 22.0579 24.1853C22.4109 23.9553 22.7649 23.7053 23.0369 23.4833C23.1949 23.3553 23.3689 23.2693 23.5479 23.1773C23.7129 23.0923 23.8809 23.0013 24.0349 22.8653C24.1109 22.7983 24.1869 22.7173 24.2639 22.6303C24.3309 22.5563 24.4039 22.4723 24.4759 22.3923C24.5459 22.3153 24.7199 22.1723 24.9139 21.9793C25.0079 21.8863 25.1059 21.7783 25.1909 21.6713C25.2199 21.6323 25.2489 21.5943 25.2769 21.5553C25.5919 21.0403 25.8779 20.5003 26.1019 19.9653C26.1299 19.8403 26.1379 19.7293 26.1279 19.6373C26.1199 19.5703 26.1029 19.5113 26.0839 19.4503C26.0599 19.3643 26.0329 19.2773 26.0239 19.1723C26.0169 19.0893 26.0309 19.0043 26.0629 18.9543C26.0779 18.9323 26.0969 18.9143 26.1129 18.8993C26.1329 18.8823 26.1499 18.8673 26.1569 18.8443C26.1609 18.8273 26.1579 18.8073 26.1529 18.7833C26.1459 18.7443 26.1369 18.6943 26.1539 18.6293C26.2189 18.3853 26.2869 18.1103 26.3319 17.8383C26.3829 17.5393 26.4049 17.2433 26.3949 17.0123C26.3849 16.7493 26.3909 16.3823 26.3469 16.0003C26.3179 15.7343 26.2659 15.4663 26.1979 15.2383C26.1319 15.0143 26.0219 14.7913 25.9039 14.5783C25.7629 14.3223 25.6119 14.0783 25.5169 13.8453C25.4969 13.7983 25.4999 13.7263 25.4999 13.6323C25.5009 13.5673 25.4999 13.4913 25.4919 13.4083C25.3239 13.1243 25.1459 12.8423 24.9589 12.5483C24.9479 12.5413 24.9369 12.5333 24.9249 12.5263C24.6689 12.3503 24.3139 12.1173 24.0769 11.5503C24.0179 11.4063 24.0069 11.2983 23.9969 11.1993C23.9859 11.1013 23.9799 11.0183 23.9289 10.9093C23.8709 10.7853 23.7759 10.6583 23.6709 10.4993C23.5849 10.3703 23.4899 10.2133 23.4199 10.0423C23.3819 9.95134 23.3509 9.85734 23.3329 9.75934C23.3299 9.74334 23.3269 9.72534 23.3229 9.70634C23.2899 9.52734 23.2439 9.26534 23.2409 8.98634C23.0209 8.24434 22.8339 7.48833 22.6519 6.77633C22.3429 5.57133 22.0519 4.54234 21.3329 3.95434C20.9839 3.65334 20.5689 3.35433 20.2459 3.05433C19.9259 2.75633 19.7449 2.47534 19.8019 2.23834C19.8639 2.00634 20.1589 1.82934 20.6659 1.80534C21.1699 1.78334 21.8699 1.93235 22.5209 2.39235C23.6159 3.14235 24.2029 4.38334 24.5599 5.35734C24.5829 5.40834 24.6049 5.46034 24.6259 5.51234C24.7849 5.89434 24.9529 6.22834 25.1199 6.55534C25.1579 6.63034 25.1969 6.70834 25.2339 6.78134Z`,className:`ok-blob-body`}),t[21]=U):U=t[21];let ee=(F||T)&&`ok-blob-eye-hidden`,W;t[22]===ee?W=t[23]:(W=G(`ok-blob-eye`,ee),t[22]=ee,t[23]=W);let te;t[24]===W?te=t[25]:(te=(0,X.jsx)(`ellipse`,{cx:yv,cy:xv,rx:1.2722,ry:1.9083,className:W}),t[24]=W,t[25]=te);let ne=(F||T)&&`ok-blob-eye-hidden`,K;t[26]===ne?K=t[27]:(K=G(`ok-blob-eye ok-blob-eye-right`,ne),t[26]=ne,t[27]=K);let re;t[28]===K?re=t[29]:(re=(0,X.jsx)(`ellipse`,{cx:bv,cy:xv,rx:1.2722,ry:1.9083,className:K}),t[28]=K,t[29]=re);let ie;t[30]===I?ie=t[31]:(ie=Cv(yv,I),t[30]=I,t[31]=ie);let q=(!F||T)&&`ok-blob-eye-hidden`,J;t[32]===q?J=t[33]:(J=G(`ok-blob-happy-eye`,q),t[32]=q,t[33]=J);let ae;t[34]!==ie||t[35]!==J?(ae=(0,X.jsx)(`path`,{d:ie,strokeWidth:`1.2`,strokeLinecap:`round`,fill:`none`,className:J}),t[34]=ie,t[35]=J,t[36]=ae):ae=t[36];let Y;t[37]===I?Y=t[38]:(Y=Cv(bv,I),t[37]=I,t[38]=Y);let oe=(!F||T)&&`ok-blob-eye-hidden`,se;t[39]===oe?se=t[40]:(se=G(`ok-blob-happy-eye`,oe),t[39]=oe,t[40]=se);let ce;t[41]!==Y||t[42]!==se?(ce=(0,X.jsx)(`path`,{d:Y,strokeWidth:`1.2`,strokeLinecap:`round`,fill:`none`,className:se}),t[41]=Y,t[42]=se,t[43]=ce):ce=t[43];let le;t[44]===T?le=t[45]:(le=T?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`path`,{d:wv(yv),strokeWidth:`1.2`,strokeLinecap:`round`,fill:`none`,className:`ok-blob-sleeping-eye`}),(0,X.jsx)(`path`,{d:wv(bv),strokeWidth:`1.2`,strokeLinecap:`round`,fill:`none`,className:`ok-blob-sleeping-eye`})]}):null,t[44]=T,t[45]=le);let ue;t[46]!==te||t[47]!==re||t[48]!==ae||t[49]!==ce||t[50]!==le?(ue=(0,X.jsxs)(`g`,{ref:p,children:[te,re,ae,ce,le]}),t[46]=te,t[47]=re,t[48]=ae,t[49]=ce,t[50]=le,t[51]=ue):ue=t[51];let de;t[52]!==B||t[53]!==H||t[54]!==ue?(de=(0,X.jsxs)(`g`,{className:H,children:[U,ue]},B),t[52]=B,t[53]=H,t[54]=ue,t[55]=de):de=t[55];let fe;t[56]===T?fe=t[57]:(fe=T?(0,X.jsxs)(`g`,{children:[(0,X.jsx)(`text`,{x:21,y:7,className:`ok-blob-z ok-blob-z-1`,children:`z`}),(0,X.jsx)(`text`,{x:26,y:2,className:`ok-blob-z ok-blob-z-2`,children:`z`})]}):null,t[56]=T,t[57]=fe);let pe;t[58]!==v||t[59]!==x?(pe=x.length>0&&(0,X.jsx)(`g`,{children:x.map(kv)},`firework-${v}`),t[58]=v,t[59]=x,t[60]=pe):pe=t[60];let me;t[61]!==D||t[62]!==s||t[63]!==z||t[64]!==de||t[65]!==fe||t[66]!==pe?(me=(0,X.jsxs)(`svg`,{ref:f,width:s,height:s,viewBox:`0 0 30 30`,fill:`none`,overflow:`visible`,xmlns:`http://www.w3.org/2000/svg`,className:z,"aria-hidden":`true`,onClick:D,onMouseDown:Av,children:[de,fe,pe]}),t[61]=D,t[62]=s,t[63]=z,t[64]=de,t[65]=fe,t[66]=pe,t[67]=me):me=t[67];let he;return t[68]!==R||t[69]!==me?(he=(0,X.jsx)(`span`,{ref:d,className:R,children:me}),t[68]=R,t[69]=me,t[70]=he):he=t[70],he}function kv(e){return(0,X.jsx)(`circle`,{cx:Tv+e.originDx,cy:Ev+e.originDy,r:e.size,className:`ok-blob-firework`,style:Dv(e)},e.id)}function Av(e){return e.preventDefault()}function jv(e){return e+1}function Mv(e){return e+1}function Nv(e){let t=(0,Q.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=G(`flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,X.jsx)(cc,{"data-slot":`label`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Pv(e){let t=(0,Q.c)(12),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:n,orientation:i,decorative:a,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=i===void 0?`horizontal`:i,s=a===void 0?!0:a,c;t[5]===n?c=t[6]:(c=G(`shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch`,n),t[5]=n,t[6]=c);let l;return t[7]!==s||t[8]!==o||t[9]!==r||t[10]!==c?(l=(0,X.jsx)(_l,{"data-slot":`separator`,decorative:s,orientation:o,className:c,...r}),t[7]=s,t[8]=o,t[9]=r,t[10]=c,t[11]=l):l=t[11],l}var Fv=B(`group/field flex w-full gap-2 data-[invalid=true]:text-destructive`,{variants:{orientation:{vertical:`flex-col *:w-full [&>.sr-only]:w-auto`,horizontal:`flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`,responsive:`flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`}},defaultVariants:{orientation:`vertical`}});function Iv(e){let t=(0,Q.c)(11),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,orientation:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=i===void 0?`vertical`:i,o;t[4]!==n||t[5]!==a?(o=G(Fv({orientation:a}),n),t[4]=n,t[5]=a,t[6]=o):o=t[6];let s;return t[7]!==a||t[8]!==r||t[9]!==o?(s=(0,X.jsx)(`div`,{role:`group`,"data-slot":`field`,"data-orientation":a,className:o,...r}),t[7]=a,t[8]=r,t[9]=o,t[10]=s):s=t[10],s}function Lv(e){let t=(0,Q.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=G(`group/field-content flex flex-1 flex-col gap-0.5 leading-snug`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,X.jsx)(`div`,{"data-slot":`field-content`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Rv(e){let t=(0,Q.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=G(`group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border *:data-[slot=field]:p-2.5 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10`,`has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,X.jsx)(Nv,{"data-slot":`field-label`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function zv(e){let t=(0,Q.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=G(`flex w-fit items-center gap-2 text-sm font-medium group-data-[disabled=true]/field:opacity-50`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,X.jsx)(`div`,{"data-slot":`field-title`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Bv(e){let t=(0,Q.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=G(`text-left text-sm leading-normal font-normal text-muted-foreground group-has-data-horizontal/field:text-balance [[data-variant=legend]+&]:-mt-1.5`,`last:mt-0 nth-last-2:-mt-1`,`[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,X.jsx)(`p`,{"data-slot":`field-description`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Vv(e){let t=(0,Q.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=G(`grid w-full gap-2`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,X.jsx)(ll,{"data-slot":`radio-group`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Hv(e){let t=(0,Q.c)(9),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=G(`group/radio-group-item peer relative flex aspect-square size-4 shrink-0 rounded-full border border-input outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary`,n),t[3]=n,t[4]=i);let a;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,X.jsx)(dl,{"data-slot":`radio-group-indicator`,className:`flex size-4 items-center justify-center`,children:(0,X.jsx)(`span`,{className:`absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-primary-foreground`})}),t[5]=a):a=t[5];let o;return t[6]!==r||t[7]!==i?(o=(0,X.jsx)(ul,{"data-slot":`radio-group-item`,className:i,...r,children:a}),t[6]=r,t[7]=i,t[8]=o):o=t[8],o}function Uv(){let e=typeof window<`u`?window.okDesktop:void 0;return e?.seed?{plan:t=>e.seed.plan(t),apply:t=>e.seed.apply(t)}:{plan:async e=>{let t=e?`?rootDir=${encodeURIComponent(e)}`:``;return await(await fetch(`/api/seed/plan${t}`)).json()},apply:async e=>await(await fetch(`/api/seed/apply`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({plan:e})})).json()}}function Wv(e){let t=(0,Q.c)(45),{open:n,onOpenChange:r,onSeedApplied:i}=e,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a={kind:`loading`},t[0]=a):a=t[0];let[o,s]=(0,Z.useState)(a),[c,l]=(0,Z.useState)(`project-root`),[u,d]=(0,Z.useState)(`brain`),f=(0,Z.useRef)(!0),p,m;t[1]===n?(p=t[2],m=t[3]):(p=()=>{n&&(l(`project-root`),d(`brain`),f.current=!0)},m=[n],t[1]=n,t[2]=p,t[3]=m),(0,Z.useEffect)(p,m);let h;t[4]===u?h=t[5]:(h=u.trim(),t[4]=u,t[5]=h);let g=h,_=c===`subfolder`&&g===``,v,y;t[6]!==n||t[7]!==c||t[8]!==_||t[9]!==g?(v=()=>{if(!n)return;if(_){s({kind:`error`,message:`Enter a folder name (e.g. brain).`});return}let e=c===`project-root`?void 0:g,t=f.current?0:200;f.current=!1;let r=!1,i=setTimeout(()=>{r||(s(Gv),Uv().plan(e).then(e=>{if(!r){if(!e.ok){s({kind:`error`,message:e.error.message});return}s(e.plan.created.length>0||e.plan.configEdits.length>0?{kind:`plan`,plan:e.plan}:{kind:`already-seeded`,plan:e.plan})}}).catch(e=>{r||s({kind:`error`,message:e instanceof Error?e.message:String(e)})}))},t);return()=>{r=!0,clearTimeout(i)}},y=[n,c,g,_],t[6]=n,t[7]=c,t[8]=_,t[9]=g,t[10]=v,t[11]=y):(v=t[10],y=t[11]),(0,Z.useEffect)(v,y);let b;t[12]!==r||t[13]!==i||t[14]!==o.kind||t[15]!==o.plan?(b=async function(){if(o.kind!==`plan`)return;s({kind:`applying`,plan:o.plan});let e=await Uv().apply(o.plan);e.ok?(Xt.success(`LLM brain initialized (${e.result.applied} ${e.result.applied===1?`entry`:`entries`})`),i?.(),r(!1)):(Xt.error(`Initialize failed: ${e.error.message}`),s({kind:`error`,message:e.error.message}))},t[12]=r,t[13]=i,t[14]=o.kind,t[15]=o.plan,t[16]=b):b=t[16];let x=b,S;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,X.jsxs)(Kt,{children:[(0,X.jsxs)(Ft,{className:`flex items-center gap-2`,children:[(0,X.jsx)(ve,{"aria-hidden":`true`,className:`h-4 w-4 text-foreground opacity-70`}),`Initialize LLM brain`]}),(0,X.jsx)(Nt,{children:`Three layers designed so AI agents can navigate naturally: raw sources, working drafts, and canonical articles.`})]}),t[17]=S):S=t[17];let C;t[18]!==c||t[19]!==u?(C=(0,X.jsx)(Kv,{choice:c,subfolder:u,onChoiceChange:l,onSubfolderChange:d}),t[18]=c,t[19]=u,t[20]=C):C=t[20];let w;t[21]===o?w=t[22]:(w=(0,X.jsx)(qv,{phase:o}),t[21]=o,t[22]=w);let T;t[23]!==w||t[24]!==C?(T=(0,X.jsxs)(Ht,{className:`space-y-6`,children:[C,w]}),t[23]=w,t[24]=C,t[25]=T):T=t[25];let E;t[26]===r?E=t[27]:(E=()=>r(!1),t[26]=r,t[27]=E);let D=o.kind===`already-seeded`||o.kind===`error`?`Close`:`Cancel`,O;t[28]!==E||t[29]!==D?(O=(0,X.jsx)(q,{className:`uppercase font-mono`,variant:`ghost`,onClick:E,children:D}),t[28]=E,t[29]=D,t[30]=O):O=t[30];let k;t[31]!==x||t[32]!==o.kind||t[33]!==_?(k=o.kind===`plan`?(0,X.jsx)(q,{onClick:x,disabled:_,children:`Initialize`}):o.kind===`applying`?(0,X.jsxs)(q,{disabled:!0,children:[(0,X.jsx)(lt,{"aria-hidden":`true`,className:`h-4 w-4 animate-spin`}),`Setting up…`]}):null,t[31]=x,t[32]=o.kind,t[33]=_,t[34]=k):k=t[34];let A;t[35]!==O||t[36]!==k?(A=(0,X.jsxs)(Ut,{children:[O,k]}),t[35]=O,t[36]=k,t[37]=A):A=t[37];let j;t[38]!==T||t[39]!==A?(j=(0,X.jsxs)(zt,{className:`sm:max-w-2xl`,"data-ok-layer-spawned":``,children:[S,T,A]}),t[38]=T,t[39]=A,t[40]=j):j=t[40];let M;return t[41]!==r||t[42]!==n||t[43]!==j?(M=(0,X.jsx)(qt,{open:n,onOpenChange:r,children:j}),t[41]=r,t[42]=n,t[43]=j,t[44]=M):M=t[44],M}function Gv(e){return e.kind===`plan`||e.kind===`already-seeded`?e:{kind:`loading`}}function Kv(e){let t=(0,Q.c)(21),{choice:n,subfolder:r,onChoiceChange:i,onSubfolderChange:a}=e,o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,X.jsx)(`p`,{className:`text-sm font-medium`,children:`Where should the brain live?`}),t[0]=o):o=t[0];let s;t[1]===i?s=t[2]:(s=e=>i(e),t[1]=i,t[2]=s);let c;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,X.jsx)(Rv,{htmlFor:`seed-root-project-root`,children:(0,X.jsxs)(Iv,{orientation:`horizontal`,children:[(0,X.jsxs)(Lv,{children:[(0,X.jsx)(zv,{children:`Project root`}),(0,X.jsx)(Bv,{children:`Scaffold the three folders directly under this project.`})]}),(0,X.jsx)(Hv,{value:`project-root`,id:`seed-root-project-root`})]})}),t[3]=c):c=t[3];let l,u;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,X.jsx)(zv,{children:`In a subfolder`}),u=(0,X.jsx)(Bv,{className:`nth-last-2:mt-0`,children:`Created if missing. Reuses the folder if it already exists.`}),t[4]=l,t[5]=u):(l=t[4],u=t[5]);let d;t[6]===a?d=t[7]:(d=e=>a(e.target.value),t[6]=a,t[7]=d);let f;t[8]===i?f=t[9]:(f=()=>i(`subfolder`),t[8]=i,t[9]=f);let p;t[10]!==r||t[11]!==d||t[12]!==f?(p=(0,X.jsxs)(Lv,{children:[l,u,(0,X.jsx)(Le,{value:r,onChange:d,onFocus:f,placeholder:`brain`,spellCheck:!1,autoCapitalize:`off`,autoCorrect:`off`,className:`mt-1.5 font-mono text-xs bg-background`})]}),t[10]=r,t[11]=d,t[12]=f,t[13]=p):p=t[13];let m;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,X.jsx)(Hv,{value:`subfolder`,id:`seed-root-subfolder`}),t[14]=m):m=t[14];let h;t[15]===p?h=t[16]:(h=(0,X.jsx)(Rv,{htmlFor:`seed-root-subfolder`,children:(0,X.jsxs)(Iv,{orientation:`horizontal`,children:[p,m]})}),t[15]=p,t[16]=h);let g;return t[17]!==n||t[18]!==h||t[19]!==s?(g=(0,X.jsxs)(`div`,{className:`space-y-2 py-1`,children:[o,(0,X.jsxs)(Vv,{className:`sm:flex`,value:n,onValueChange:s,children:[c,h]})]}),t[17]=n,t[18]=h,t[19]=s,t[20]=g):g=t[20],g}function qv(e){let t=(0,Q.c)(11),{phase:n}=e;if(n.kind===`loading`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,X.jsxs)(`div`,{className:`flex items-center gap-2 py-4 text-sm text-muted-foreground`,children:[(0,X.jsx)(lt,{"aria-hidden":`true`,className:`h-4 w-4 animate-spin`}),`Computing scaffold plan…`]}),t[0]=e):e=t[0],e}if(n.kind===`error`){let e;return t[1]===n.message?e=t[2]:(e=(0,X.jsx)(`div`,{className:`rounded-md bg-destructive/10 p-3 text-sm text-destructive`,children:n.message}),t[1]=n.message,t[2]=e),e}if(n.kind===`already-seeded`){let e;return t[3]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,X.jsxs)(`div`,{className:`py-2 text-sm`,children:[(0,X.jsx)(`p`,{className:`font-medium`,children:`This LLM brain is already set up.`}),(0,X.jsx)(`p`,{className:`text-muted-foreground`,children:`The three-layer structure is in place — there's nothing left to scaffold.`})]}),t[3]=e):e=t[3],e}let r=n.plan,i;t[4]===r?i=t[5]:(i=(0,X.jsx)($v,{plan:r}),t[4]=r,t[5]=i);let a;t[6]===r.warnings?a=t[7]:(a=r.warnings.length>0?(0,X.jsx)(`div`,{className:`rounded-md bg-warning/10 p-3 text-xs text-warning-foreground`,children:r.warnings.map(Jv)}):null,t[6]=r.warnings,t[7]=a);let o;return t[8]!==i||t[9]!==a?(o=(0,X.jsxs)(`div`,{className:`space-y-6 py-1 text-sm`,children:[i,a]}),t[8]=i,t[9]=a,t[10]=o):o=t[10],o}function Jv(e){return(0,X.jsx)(`p`,{children:e},e)}var Yv=[{name:`external-sources`,blurb:`Raw sources saved verbatim — full text of URLs and PDFs, not just citations. Every claim traces back to preserved evidence.`},{name:`research`,blurb:`Provisional analysis synthesizing sources. Every claim cites a doc; promotes to articles/ once the team trusts the findings.`},{name:`articles`,blurb:`Canonical decisions. Each links back through research/ to its sources — no dead links, full evidence chain in repo.`}],Xv={"log.md":`Append-only timeline`};function Zv(e){return e.split(`/`).pop()??e}function Qv(e){let t=new Map(Yv.map(e=>[e.name,e.blurb])),n=e.created.filter(e=>e.kind===`folder`).map(e=>({kind:`folder`,name:`${e.path}/`,description:t.get(Zv(e.path))??``})),r=e.created.filter(e=>e.kind===`file`).map(e=>({kind:`file`,name:e.path,description:Xv[Zv(e.path)]??``})),i=e.configEdits.length>0?[{kind:`config`,name:`.open-knowledge/config.yml`,description:`Folder descriptions for AI agents`}]:[];return[...n,...r,...i]}function $v(e){let t=(0,Q.c)(13),{plan:n}=e,r,i,a,o;if(t[0]!==n){let e=Qv(n);a=`space-y-3`,t[5]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,X.jsxs)(`h3`,{className:`flex items-center gap-1.5 text-xs font-semibold uppercase font-mono tracking-wider text-primary`,children:[(0,X.jsx)(`span`,{"aria-hidden":`true`,className:`flex items-center justify-center`,children:`◇`}),`What gets created`]}),t[5]=o):o=t[5],r=`space-y-3 overflow-y-auto subtle-scrollbar max-h-full`,i=e.map(ey),t[0]=n,t[1]=r,t[2]=i,t[3]=a,t[4]=o}else r=t[1],i=t[2],a=t[3],o=t[4];let s;t[6]!==r||t[7]!==i?(s=(0,X.jsx)(`ul`,{className:r,children:i}),t[6]=r,t[7]=i,t[8]=s):s=t[8];let c;return t[9]!==a||t[10]!==o||t[11]!==s?(c=(0,X.jsxs)(`section`,{className:a,children:[o,s]}),t[9]=a,t[10]=o,t[11]=s,t[12]=c):c=t[12],c}function ey(e){return(0,X.jsxs)(`li`,{className:`flex items-start gap-3 rounded-md border border-border/60 bg-muted/20 p-3`,children:[e.kind===`folder`?(0,X.jsx)(ki,{"aria-hidden":`true`,className:`mt-1 h-4 w-4 shrink-0 text-muted-foreground`,strokeWidth:1.5}):e.kind===`config`?(0,X.jsx)(wi,{"aria-hidden":`true`,className:`mt-0.5 h-4 w-4 shrink-0 text-muted-foreground`,strokeWidth:1.5}):(0,X.jsx)(Ti,{"aria-hidden":`true`,className:`mt-0.5 h-4 w-4 shrink-0 text-muted-foreground`,strokeWidth:1.5}),(0,X.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-0.5`,children:[(0,X.jsx)(`code`,{className:`font-mono text-1sm`,children:e.name}),e.description?(0,X.jsx)(`p`,{className:`text-1sm text-muted-foreground`,children:e.description}):null]})]},e.name)}function ty(){let e=(0,Q.c)(15),[t,n]=(0,Z.useState)(!1),[r,i]=(0,Z.useState)(null),[a,o]=(0,Z.useState)(`loading`),[s,c]=(0,Z.useState)(0),l=(0,Z.useRef)(!1),u=(0,Z.useRef)(void 0),d,f;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(d=()=>{let e=!1,t=async function(){let t=fetch(`/api/documents`).then(async t=>{let n=await t.json().catch(oy);e||(t.ok&&n?.ok&&Array.isArray(n.documents)?(i(n.documents.length),l.current=!0):l.current||=(i(1),!0))}).catch(()=>{!e&&!l.current&&(i(1),l.current=!0)}),n=(async()=>{let t=typeof window<`u`?window.okDesktop:void 0;try{let n=t?.seed?await t.seed.plan():await fetch(`/api/seed/plan`).then(ay);if(e)return;if(!n?.ok){o(`error`);return}o(n.plan.created.length>0||n.plan.configEdits.length>0?`has-work`:`seeded`)}catch{e||o(`error`)}})();await Promise.all([t,n])};t();let n=Gn(e=>{e.includes(`files`)&&t()});return()=>{e=!0,n(),clearTimeout(u.current)}},f=[],e[0]=d,e[1]=f):(d=e[0],f=e[1]),(0,Z.useEffect)(d,f);let p;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(p=function(){clearTimeout(u.current),u.current=setTimeout(()=>c(iy),250),o(`seeded`),fetch(`/api/documents`).then(async e=>{let t=await e.json().catch(ry);e.ok&&t?.ok&&Array.isArray(t.documents)&&i(t.documents.length)}).catch(ny)},e[2]=p):p=e[2];let m=p,h=a===`has-work`,g=r!==null&&a!==`loading`,_=r===0,v;e[3]===s?v=e[4]:(v=(0,X.jsx)(Ov,{size:80,celebrateSignal:s}),e[3]=s,e[4]=v);let y;e[5]!==_||e[6]!==g||e[7]!==h?(y=g?_?(0,X.jsx)(sy,{onCtaClick:()=>n(!0),showCta:h}):(0,X.jsx)(cy,{onCtaClick:()=>n(!0),showCta:h}):null,e[5]=_,e[6]=g,e[7]=h,e[8]=y):y=e[8];let b;e[9]===t?b=e[10]:(b=(0,X.jsx)(Wv,{open:t,onOpenChange:n,onSeedApplied:m}),e[9]=t,e[10]=b);let x;return e[11]!==v||e[12]!==y||e[13]!==b?(x=(0,X.jsxs)(`div`,{className:`flex flex-1 flex-col items-center justify-center gap-6 px-6`,children:[v,y,b]}),e[11]=v,e[12]=y,e[13]=b,e[14]=x):x=e[14],x}function ny(){}function ry(){return null}function iy(e){return e+1}function ay(e){return e.json()}function oy(){return null}function sy(e){let t=(0,Q.c)(7),{onCtaClick:n,showCta:r}=e,i,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,X.jsx)(`h2`,{className:`text-base font-medium`,children:`Welcome to your LLM brain`}),a=(0,X.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`A space for working with AI agents. Start with a curated layer structure — or create your own files in the sidebar.`}),t[0]=i,t[1]=a):(i=t[0],a=t[1]);let o;t[2]!==n||t[3]!==r?(o=r?(0,X.jsxs)(q,{className:`mt-1`,onClick:n,children:[(0,X.jsx)(ve,{"aria-hidden":`true`,className:`h-4 w-4`}),`Initialize LLM brain`]}):null,t[2]=n,t[3]=r,t[4]=o):o=t[4];let s;return t[5]===o?s=t[6]:(s=(0,X.jsxs)(`div`,{className:`flex max-w-sm flex-col items-center gap-3 text-center`,children:[i,a,o]}),t[5]=o,t[6]=s),s}function cy(e){let t=(0,Q.c)(6),{onCtaClick:n,showCta:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,X.jsx)(`span`,{className:`select-none text-sm text-muted-foreground`,children:`Select a document to edit`}),t[0]=i):i=t[0];let a;t[1]!==n||t[2]!==r?(a=r?(0,X.jsxs)(q,{variant:`ghost`,size:`sm`,className:`uppercase font-mono text-xs`,onClick:n,children:[(0,X.jsx)(ve,{"aria-hidden":`true`,className:`h-3.5 w-3.5`}),`Initialize LLM brain`]}):null,t[1]=n,t[2]=r,t[3]=a):a=t[3];let o;return t[4]===a?o=t[5]:(o=(0,X.jsxs)(`div`,{className:`flex flex-col items-center gap-3`,children:[i,a]}),t[4]=a,t[5]=o),o}function ly(e){let t=e.split(`/`).pop();return t?`${e}/${t}`:null}function uy(e,t){let n=t.get(`${e}/index`);if(n)return n;let r=ly(e);if(r){let e=t.get(r);if(e)return e}return e.split(`/`).pop()??e}function dy(e,t,n){let r=n.get(e);return r&&r!==e?r:t}function fy(e,t){let n=`${e}/`,r=[...t.folderPaths].filter(e=>e.startsWith(n)).map(e=>({path:e,rel:e.slice(n.length)})).filter(e=>e.rel.length>0&&!e.rel.includes(`/`)).map(({path:e,rel:n})=>({kind:`folder`,path:e,name:n,title:uy(e,t.pageTitles)})),i=[...t.pages].filter(e=>e.startsWith(n)).map(e=>({docName:e,rel:e.slice(n.length)})).filter(e=>e.rel.length>0&&!e.rel.includes(`/`)).map(({docName:e,rel:n})=>{let r=t.pageMeta.get(e);return{kind:`file`,path:e,name:n,title:dy(e,n,t.pageTitles),size:r?.size??0,modified:r?.modified??``}}),a=[...r,...i].sort((e,t)=>e.kind===t.kind?e.title.localeCompare(t.title)||e.name.localeCompare(t.name):e.kind===`folder`?-1:1);return{title:uy(e,t.pageTitles),children:a}}function py(e){let t=(0,Q.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,X.jsx)(qs,{"data-slot":`dropdown-menu`,...n}),t[2]=n,t[3]=r),r}function my(e){let t=(0,Q.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,X.jsx)(Js,{"data-slot":`dropdown-menu-trigger`,...n}),t[2]=n,t[3]=r),r}function hy(e){let t=(0,Q.c)(12),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:n,align:i,sideOffset:a,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=i===void 0?`start`:i,s=a===void 0?4:a,c;t[5]===n?c=t[6]:(c=G(`z-50 max-h-(--radix-dropdown-menu-content-available-height) w-(--radix-dropdown-menu-trigger-width) min-w-32 origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:overflow-hidden data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,n),t[5]=n,t[6]=c);let l;return t[7]!==o||t[8]!==r||t[9]!==s||t[10]!==c?(l=(0,X.jsx)(Ys,{children:(0,X.jsx)(Xs,{"data-slot":`dropdown-menu-content`,sideOffset:s,align:o,className:c,...r})}),t[7]=o,t[8]=r,t[9]=s,t[10]=c,t[11]=l):l=t[11],l}function gy(e){let t=(0,Q.c)(12),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:n,inset:r,variant:a,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=a===void 0?`default`:a,s;t[5]===n?s=t[6]:(s=G(`group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive`,n),t[5]=n,t[6]=s);let c;return t[7]!==r||t[8]!==i||t[9]!==s||t[10]!==o?(c=(0,X.jsx)(Qs,{"data-slot":`dropdown-menu-item`,"data-inset":r,"data-variant":o,className:s,...i}),t[7]=r,t[8]=i,t[9]=s,t[10]=o,t[11]=c):c=t[11],c}function _y(e){let t=(0,Q.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,X.jsx)($s,{"data-slot":`dropdown-menu-radio-group`,...n}),t[2]=n,t[3]=r),r}function vy(e){let t=(0,Q.c)(13),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:r,children:n,inset:i,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o;t[5]===r?o=t[6]:(o=G(`relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,r),t[5]=r,t[6]=o);let s;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,X.jsx)(`span`,{className:`pointer-events-none absolute right-2 flex items-center justify-center`,"data-slot":`dropdown-menu-radio-item-indicator`,children:(0,X.jsx)(tc,{children:(0,X.jsx)(si,{})})}),t[7]=s):s=t[7];let c;return t[8]!==n||t[9]!==i||t[10]!==a||t[11]!==o?(c=(0,X.jsxs)(ec,{"data-slot":`dropdown-menu-radio-item`,"data-inset":i,className:o,...a,children:[s,n]}),t[8]=n,t[9]=i,t[10]=a,t[11]=o,t[12]=c):c=t[12],c}function yy(e){let t=(0,Q.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,inset:r,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]===n?a=t[5]:(a=G(`px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7`,n),t[4]=n,t[5]=a);let o;return t[6]!==r||t[7]!==i||t[8]!==a?(o=(0,X.jsx)(Zs,{"data-slot":`dropdown-menu-label`,"data-inset":r,className:a,...i}),t[6]=r,t[7]=i,t[8]=a,t[9]=o):o=t[9],o}function by(e){let t=(0,Q.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=G(`-mx-1 my-1 h-px bg-border`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,X.jsx)(nc,{"data-slot":`dropdown-menu-separator`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function xy(e){let t=(0,Q.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,X.jsx)(rc,{"data-slot":`dropdown-menu-sub`,...n}),t[2]=n,t[3]=r),r}function Sy(e){let t=(0,Q.c)(13),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:r,inset:i,children:n,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o;t[5]===r?o=t[6]:(o=G(`flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,r),t[5]=r,t[6]=o);let s;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,X.jsx)(he,{className:`ml-auto`}),t[7]=s):s=t[7];let c;return t[8]!==n||t[9]!==i||t[10]!==a||t[11]!==o?(c=(0,X.jsxs)(ic,{"data-slot":`dropdown-menu-sub-trigger`,"data-inset":i,className:o,...a,children:[n,s]}),t[8]=n,t[9]=i,t[10]=a,t[11]=o,t[12]=c):c=t[12],c}function Cy(e){let t=(0,Q.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=G(`z-50 min-w-[96px] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-lg bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,X.jsx)(ac,{"data-slot":`dropdown-menu-sub-content`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function wy(e){let t=(0,Q.c)(14),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,containerClassName:r,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]===r?a=t[5]:(a=G(`relative w-full overflow-x-auto subtle-scrollbar`,r),t[4]=r,t[5]=a);let o;t[6]===n?o=t[7]:(o=G(`w-full caption-bottom text-sm`,n),t[6]=n,t[7]=o);let s;t[8]!==i||t[9]!==o?(s=(0,X.jsx)(`table`,{"data-slot":`table`,className:o,...i}),t[8]=i,t[9]=o,t[10]=s):s=t[10];let c;return t[11]!==a||t[12]!==s?(c=(0,X.jsx)(`div`,{"data-slot":`table-container`,className:a,children:s}),t[11]=a,t[12]=s,t[13]=c):c=t[13],c}function Ty(e){let t=(0,Q.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=G(`[&_tr]:border-b`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,X.jsx)(`thead`,{"data-slot":`table-header`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Ey(e){let t=(0,Q.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=G(`[&_tr:last-child]:border-0`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,X.jsx)(`tbody`,{"data-slot":`table-body`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Dy(e){let t=(0,Q.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,noHover:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=(i===void 0?!1:i)&&`hover:bg-transparent`,o;t[4]!==n||t[5]!==a?(o=G(`hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors`,a,n),t[4]=n,t[5]=a,t[6]=o):o=t[6];let s;return t[7]!==r||t[8]!==o?(s=(0,X.jsx)(`tr`,{"data-slot":`table-row`,className:o,...r}),t[7]=r,t[8]=o,t[9]=s):s=t[9],s}function Oy(e){let t=(0,Q.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,scope:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=i===void 0?`col`:i,o;t[4]===n?o=t[5]:(o=G(`font-mono uppercase text-xs text-muted-foreground h-10 px-4 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]`,n),t[4]=n,t[5]=o);let s;return t[6]!==r||t[7]!==a||t[8]!==o?(s=(0,X.jsx)(`th`,{"data-slot":`table-head`,scope:a,className:o,...r}),t[6]=r,t[7]=a,t[8]=o,t[9]=s):s=t[9],s}function ky(e){let t=(0,Q.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=G(`py-3 px-4 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,X.jsx)(`td`,{"data-slot":`table-cell`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Ay(e){if(!e)return`—`;let t=new Date(e),n=new Date().getTime()-t.getTime(),r=Math.floor(n/6e4);if(r<1)return`just now`;if(r<60)return`${r}m ago`;let i=Math.floor(r/60);if(i<24)return`${i}h ago`;let a=Math.floor(i/24);return a<30?`${a}d ago`:t.toLocaleDateString(void 0,{month:`short`,day:`numeric`,year:`numeric`})}function jy(e,t,n){return[...e].sort((e,r)=>{if(e.kind!==r.kind)return e.kind===`folder`?-1:1;let i=0;switch(t){case`name`:i=e.title.localeCompare(r.title)||e.name.localeCompare(r.name);break;case`modified`:{let t=e.kind===`file`?e.modified:``,n=r.kind===`file`?r.modified:``;i=t.localeCompare(n);break}}return n===`asc`?i:-i})}function My(e){let t=(0,Q.c)(10),{label:n,sortKey:r,activeKey:i,activeDir:a,onSort:o}=e,s=i===r,c;t[0]!==o||t[1]!==r?(c=()=>o(r),t[0]=o,t[1]=r,t[2]=c):c=t[2];let l;t[3]!==a||t[4]!==s?(l=s?a===`asc`?(0,X.jsx)($r,{className:`ml-1 size-3`}):(0,X.jsx)(Xr,{className:`ml-1 size-3`}):(0,X.jsx)(Qr,{className:`ml-1 size-3 text-muted-foreground/50`}),t[3]=a,t[4]=s,t[5]=l):l=t[5];let u;return t[6]!==n||t[7]!==c||t[8]!==l?(u=(0,X.jsxs)(q,{variant:`ghost`,size:`sm`,className:`-ml-3 h-8 uppercase font-mono`,onClick:c,children:[n,l]}),t[6]=n,t[7]=c,t[8]=l,t[9]=u):u=t[9],u}function Ny(e){let t=(0,Q.c)(87),{folderPath:n}=e,{addPage:r,folderPaths:i,loading:a,pages:o,pageTitles:s,pageMeta:c}=Yn(),[l,u]=(0,Z.useState)(!1),[d,f]=(0,Z.useState)(!1),[p,m]=(0,Z.useState)(null),[h,g]=(0,Z.useState)(`name`),[_,v]=(0,Z.useState)(`asc`);if(a){let e;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,X.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,X.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,X.jsx)(Rf,{className:`size-5 rounded`}),(0,X.jsx)(Rf,{className:`h-7 w-48`})]}),(0,X.jsx)(Rf,{className:`h-9 w-20 rounded-md`})]}),t[0]=e):e=t[0];let n;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,X.jsx)(Rf,{className:`h-4 w-16`}),t[1]=n):n=t[1];let r;return t[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,X.jsx)(`div`,{className:`flex min-h-0 flex-1 items-start overflow-y-auto subtle-scrollbar`,role:`status`,"aria-busy":`true`,"aria-label":`Loading folder contents`,children:(0,X.jsxs)(`div`,{className:`mx-auto flex w-full max-w-4xl flex-col gap-6 px-6 py-8`,children:[e,(0,X.jsxs)(`div`,{className:`rounded-lg border`,children:[(0,X.jsxs)(`div`,{className:`flex items-center gap-4 border-b px-4 py-3`,children:[n,(0,X.jsx)(`div`,{className:`ml-auto`,children:(0,X.jsx)(Rf,{className:`h-4 w-20`})})]}),[`a`,`b`,`c`,`d`].map(Ly)]})]})}),t[2]=r):r=t[2],r}let y,b,x,S,C,w,T,E;if(t[3]!==r||t[4]!==p||t[5]!==d||t[6]!==n||t[7]!==i||t[8]!==c||t[9]!==s||t[10]!==o||t[11]!==_||t[12]!==h){let e=fy(n,{pages:o,pageTitles:s,pageMeta:c,folderPaths:i}),a=jy(e.children,h,_),l;t[21]===h?l=t[22]:(l=function(e){e===h?v(Iy):(g(e),v(`asc`))},t[21]=h,t[22]=l);let D=l,O;t[23]!==r||t[24]!==n?(O=async function(){f(!0),m(null);try{let e=`${n}/index.md`,t=await fetch(`/api/create-page`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({path:e})}),i=await t.json().catch(Fy);if(!t.ok||!i?.ok){m(i?.error??`Server error (HTTP ${t.status})`),f(!1);return}let a=i.docName??`${n}/index`;r(a),er([`files`,`backlinks`,`graph`]),window.location.hash=zn(a)}catch(e){console.warn(`[FolderOverview] create index note failed:`,e),m(`Network error — please try again`)}f(!1)},t[23]=r,t[24]=n,t[25]=O):O=t[25];let k=O;E=`flex min-h-0 flex-1 items-start overflow-y-auto subtle-scrollbar`,w=`mx-auto flex w-full max-w-4xl flex-col gap-6 px-6 py-8`;let A;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,X.jsx)(rt,{className:`size-5 text-muted-foreground`}),t[26]=A):A=t[26];let j=(0,X.jsxs)(`div`,{className:`flex items-center gap-2`,children:[A,(0,X.jsx)(`h1`,{className:`text-2xl font-semibold tracking-tight`,children:e.title})]}),M;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,X.jsx)($i,{className:`size-4`}),t[27]=M):M=t[27];let N;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,X.jsx)(my,{asChild:!0,children:(0,X.jsxs)(q,{children:[M,`New`,(0,X.jsx)(fe,{className:`size-3`})]})}),t[28]=N):N=t[28];let P;t[29]===k?P=t[30]:(P=()=>void k(),t[29]=k,t[30]=P);let F;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`div`,{className:`font-medium`,children:`Index note`}),(0,X.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:`Landing page for this folder`})]}),t[31]=F):F=t[31];let I;t[32]!==d||t[33]!==P?(I=(0,X.jsx)(gy,{disabled:d,onSelect:P,children:F}),t[32]=d,t[33]=P,t[34]=I):I=t[34];let L;t[35]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,X.jsx)(gy,{onSelect:()=>u(!0),children:(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`div`,{className:`font-medium`,children:`Note`}),(0,X.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:`New note inside this folder`})]})}),t[35]=L):L=t[35];let R;t[36]===I?R=t[37]:(R=(0,X.jsxs)(py,{children:[N,(0,X.jsxs)(hy,{align:`end`,children:[I,L]})]}),t[36]=I,t[37]=R);let z;t[38]!==j||t[39]!==R?(z=(0,X.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-3`,children:[j,R]}),t[38]=j,t[39]=R,t[40]=z):z=t[40];let B;t[41]===Symbol.for(`react.memo_cache_sentinel`)?(B=(0,X.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`This folder has no landing note yet. Choose an explicit action to add one or open a note inside the folder.`}),t[41]=B):B=t[41];let V;t[42]===p?V=t[43]:(V=p?(0,X.jsx)(`span`,{role:`alert`,className:`text-sm text-destructive`,children:p}):null,t[42]=p,t[43]=V),t[44]!==z||t[45]!==V?(T=(0,X.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[z,B,V]}),t[44]=z,t[45]=V,t[46]=T):T=t[46],C=`rounded-lg border`,b=wy;let H=h===`name`?_===`asc`?`ascending`:`descending`:`none`,U;t[47]!==D||t[48]!==_||t[49]!==h?(U=(0,X.jsx)(My,{label:`Name`,sortKey:`name`,activeKey:h,activeDir:_,onSort:D}),t[47]=D,t[48]=_,t[49]=h,t[50]=U):U=t[50];let ee;t[51]!==H||t[52]!==U?(ee=(0,X.jsx)(Oy,{"aria-sort":H,children:U}),t[51]=H,t[52]=U,t[53]=ee):ee=t[53];let W=h===`modified`?_===`asc`?`ascending`:`descending`:`none`,te;t[54]!==D||t[55]!==_||t[56]!==h?(te=(0,X.jsx)(My,{label:`Modified`,sortKey:`modified`,activeKey:h,activeDir:_,onSort:D}),t[54]=D,t[55]=_,t[56]=h,t[57]=te):te=t[57];let G;t[58]!==W||t[59]!==te?(G=(0,X.jsx)(Oy,{className:`w-32`,"aria-sort":W,children:te}),t[58]=W,t[59]=te,t[60]=G):G=t[60],t[61]!==ee||t[62]!==G?(S=(0,X.jsx)(Ty,{children:(0,X.jsxs)(Dy,{children:[ee,G]})}),t[61]=ee,t[62]=G,t[63]=S):S=t[63],y=Ey,x=a.length?a.map(Py):(0,X.jsx)(Dy,{children:(0,X.jsx)(ky,{colSpan:2,className:`h-24 text-center text-muted-foreground`,children:`This folder is empty.`})}),t[3]=r,t[4]=p,t[5]=d,t[6]=n,t[7]=i,t[8]=c,t[9]=s,t[10]=o,t[11]=_,t[12]=h,t[13]=y,t[14]=b,t[15]=x,t[16]=S,t[17]=C,t[18]=w,t[19]=T,t[20]=E}else y=t[13],b=t[14],x=t[15],S=t[16],C=t[17],w=t[18],T=t[19],E=t[20];let D;t[64]!==y||t[65]!==x?(D=(0,X.jsx)(y,{children:x}),t[64]=y,t[65]=x,t[66]=D):D=t[66];let O;t[67]!==b||t[68]!==S||t[69]!==D?(O=(0,X.jsxs)(b,{children:[S,D]}),t[67]=b,t[68]=S,t[69]=D,t[70]=O):O=t[70];let k;t[71]!==C||t[72]!==O?(k=(0,X.jsx)(`div`,{className:C,children:O}),t[71]=C,t[72]=O,t[73]=k):k=t[73];let A;t[74]!==w||t[75]!==T||t[76]!==k?(A=(0,X.jsxs)(`div`,{className:w,children:[T,k]}),t[74]=w,t[75]=T,t[76]=k,t[77]=A):A=t[77];let j;t[78]!==A||t[79]!==E?(j=(0,X.jsx)(`div`,{className:E,children:A}),t[78]=A,t[79]=E,t[80]=j):j=t[80];let M;t[81]!==l||t[82]!==n?(M=(0,X.jsx)(Ot,{open:l,onOpenChange:u,kind:`file`,initialDir:n}),t[81]=l,t[82]=n,t[83]=M):M=t[83];let N;return t[84]!==j||t[85]!==M?(N=(0,X.jsxs)(X.Fragment,{children:[j,M]}),t[84]=j,t[85]=M,t[86]=N):N=t[86],N}function Py(e){return(0,X.jsxs)(Dy,{children:[(0,X.jsx)(ky,{children:(0,X.jsxs)(`a`,{href:zn(e.path),className:`flex items-center gap-2 rounded-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`,children:[e.kind===`folder`?(0,X.jsx)(ki,{className:`size-4 shrink-0 text-muted-foreground`}):(0,X.jsx)(qe,{className:`size-4 shrink-0 text-muted-foreground`}),(0,X.jsx)(`span`,{className:`truncate`,children:e.title})]})}),(0,X.jsx)(ky,{className:`text-muted-foreground`,children:e.kind===`file`?Ay(e.modified):`—`})]},e.path)}function Fy(){return null}function Iy(e){return e===`asc`?`desc`:`asc`}function Ly(e){return(0,X.jsxs)(`div`,{className:`flex items-center gap-3 border-b px-4 py-3 last:border-b-0`,children:[(0,X.jsx)(Rf,{className:`size-4 rounded`}),(0,X.jsx)(Rf,{className:`h-4 w-40`}),(0,X.jsx)(`div`,{className:`ml-auto`,children:(0,X.jsx)(Rf,{className:`h-4 w-16`})})]},e)}function Ry(e){let t=(0,Q.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=G(`flex h-full w-full aria-[orientation=vertical]:flex-col`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,X.jsx)(X_,{"data-slot":`resizable-panel-group`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function zy(e){let t=(0,Q.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,X.jsx)($_,{"data-slot":`resizable-panel`,...n}),t[2]=n,t[3]=r),r}function By(e){let t=(0,Q.c)(12),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({withHandle:i,className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]===n?a=t[5]:(a=G(`relative flex w-px items-center justify-center bg-border ring-offset-background after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-hidden aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2 [&[aria-orientation=horizontal]>div]:rotate-90`,n),t[4]=n,t[5]=a);let o;t[6]===i?o=t[7]:(o=i&&(0,X.jsx)(`div`,{className:`z-10 flex h-6 w-1 shrink-0 rounded-lg bg-border`}),t[6]=i,t[7]=o);let s;return t[8]!==r||t[9]!==a||t[10]!==o?(s=(0,X.jsx)(rv,{"data-slot":`resizable-handle`,className:a,...r,children:o}),t[8]=r,t[9]=a,t[10]=o,t[11]=s):s=t[11],s}var Vy=960,Hy=1024;function Uy(){let e=(0,Q.c)(5),[t,n]=(0,Z.useState)(Gy),[r,i]=(0,Z.useState)(Wy),a,o;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=()=>{let e=window.matchMedia(`(max-width: ${Vy-1}px)`),t=window.matchMedia(`(max-width: ${Hy-1}px)`),r=()=>{let r=e.matches;n(r?`sheet`:`panel`),i(!r&&t.matches)};return e.addEventListener(`change`,r),t.addEventListener(`change`,r),()=>{e.removeEventListener(`change`,r),t.removeEventListener(`change`,r)}},o=[],e[0]=a,e[1]=o):(a=e[0],o=e[1]),(0,Z.useEffect)(a,o);let s;return e[2]!==r||e[3]!==t?(s={layout:t,autoCollapse:r},e[2]=r,e[3]=t,e[4]=s):s=e[4],s}function Wy(){return window.innerWidth>=Vy&&window.innerWidth<Hy}function Gy(){return window.innerWidth<Vy?`sheet`:`panel`}var Ky={words:0,chars:0,tokens:0},qy=/[ -〿-ゟ゠-ヿ㐀-䶿一-鿿豈---ក-]/,Jy=/[\p{L}\p{N}]/u;function Yy(e){if(!e)return 0;let t=0;for(let n of e.split(/\s+/))Jy.test(n)&&t++;return t}function Xy(e){let t=globalThis.Intl.Segmenter;if(!t)return Yy(e);let n=new t(void 0,{granularity:`word`}),r=0;for(let t of n.segment(e))t.isWordLike&&r++;return r}function Zy(e){let t=qy.test(e)?1.5:4;return Math.ceil(e.length/t)}function Qy(e){if(!e)return{words:0,chars:0,tokens:0};let{body:t}=nr(e),n=t.trim();return n?{words:qy.test(n)?Xy(n):Yy(n),chars:n.length,tokens:Zy(n)}:{words:0,chars:0,tokens:0}}var $y=300;function eb(e,t){let n=(0,Q.c)(4),[r,i]=(0,Z.useState)(Ky),a,o;return n[0]!==t||n[1]!==e?(a=()=>{if(!e||!t){i(Ky);return}let n=e.document.getText(`source`),r=!1,a=null,o=function(){r||i(Qy(n.toString()))};o();let s=function(){a&&clearTimeout(a),a=setTimeout(o,$y)};return n.observe(s),()=>{r=!0,n.unobserve(s),a&&clearTimeout(a)}},o=[e,t],n[0]=t,n[1]=e,n[2]=a,n[3]=o):(a=n[2],o=n[3]),(0,Z.useEffect)(a,o),r}var tb=Hn;function nb(){let[e]=(0,Z.useState)(In);return e}function rb({principal:e,identity:t}){return e&&e.source===`git-config`?{type:`human`,name:yn(e.display_name),color:_n(e.id,un),coeditor:t.coeditor,tabId:t.tabId,principalId:e.id}:e&&e.source===`synthesized`?{type:`human`,name:t.name,color:_n(e.id,un),coeditor:t.coeditor,tabId:t.tabId}:{type:`human`,name:t.name,color:t.color,coeditor:t.coeditor,tabId:t.tabId}}function ib(e,t){let n=Math.min(e.top,t.top),r=Math.max(e.bottom,t.bottom),i=Math.min(e.left,t.left),a=Math.max(e.right,t.right)-i,o=r-n;return new DOMRect(i,n,a,o)}var ab=class{constructor({editor:e,element:t,view:n,pluginKey:r=`bubbleMenu`,updateDelay:i=250,resizeDelay:a=60,shouldShow:o,appendTo:s,getReferencedVirtualElement:c,options:l}){this.preventHide=!1,this.isVisible=!1,this.scrollTarget=window,this.floatingUIOptions={strategy:`absolute`,placement:`top`,offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1,onShow:void 0,onHide:void 0,onUpdate:void 0,onDestroy:void 0},this.shouldShow=({view:e,state:t,from:n,to:r})=>{let{doc:i,selection:a}=t,{empty:o}=a,s=!i.textBetween(n,r).length&&pn(t.selection),c=this.element.contains(document.activeElement);return!(!(e.hasFocus()||c)||o||s||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.resizeHandler=()=>{this.resizeDebounceTimer&&clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=window.setTimeout(()=>{this.updatePosition()},this.resizeDelay)},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:e})=>{if(this.editor.isDestroyed){this.destroy();return}if(this.preventHide){this.preventHide=!1;return}e?.relatedTarget&&this.element.parentNode?.contains(e.relatedTarget)||e?.relatedTarget!==this.editor.view.dom&&this.hide()},this.handleDebouncedUpdate=(e,t)=>{let n=!t?.selection.eq(e.state.selection),r=!t?.doc.eq(e.state.doc);!n&&!r||(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(e,n,r,t)},this.updateDelay))},this.updateHandler=(e,t,n,r)=>{let{composing:i}=e;if(!(i||!t&&!n)){if(!this.getShouldShow(r)){this.hide();return}this.show(),this.updatePosition()}},this.transactionHandler=({transaction:e})=>{let t=e.getMeta(this.pluginKey);t===`updatePosition`?this.updatePosition():t&&typeof t==`object`&&t.type===`updateOptions`?this.updateOptions(t.options):t===`hide`?this.hide():t===`show`&&(this.updatePosition(),this.show())},this.editor=e,this.element=t,this.view=n,this.pluginKey=r,this.updateDelay=i,this.resizeDelay=a,this.appendTo=s,this.scrollTarget=l?.scrollTarget??window,this.getReferencedVirtualElement=c,this.floatingUIOptions={...this.floatingUIOptions,...l},this.element.tabIndex=0,o&&(this.shouldShow=o),this.element.addEventListener(`mousedown`,this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener(`dragstart`,this.dragstartHandler),this.editor.on(`focus`,this.focusHandler),this.editor.on(`blur`,this.blurHandler),this.editor.on(`transaction`,this.transactionHandler),window.addEventListener(`resize`,this.resizeHandler),this.scrollTarget.addEventListener(`scroll`,this.resizeHandler),this.update(n,n.state),this.getShouldShow()&&(this.show(),this.updatePosition())}get middlewares(){let e=[];return this.floatingUIOptions.flip&&e.push($n(typeof this.floatingUIOptions.flip==`boolean`?void 0:this.floatingUIOptions.flip)),this.floatingUIOptions.shift&&e.push(kn(typeof this.floatingUIOptions.shift==`boolean`?void 0:this.floatingUIOptions.shift)),this.floatingUIOptions.offset&&e.push(Rn(typeof this.floatingUIOptions.offset==`boolean`?void 0:this.floatingUIOptions.offset)),this.floatingUIOptions.arrow&&e.push(Nn(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&e.push(ln(typeof this.floatingUIOptions.size==`boolean`?void 0:this.floatingUIOptions.size)),this.floatingUIOptions.autoPlacement&&e.push(Fn(typeof this.floatingUIOptions.autoPlacement==`boolean`?void 0:this.floatingUIOptions.autoPlacement)),this.floatingUIOptions.hide&&e.push(bn(typeof this.floatingUIOptions.hide==`boolean`?void 0:this.floatingUIOptions.hide)),this.floatingUIOptions.inline&&e.push(Ln(typeof this.floatingUIOptions.inline==`boolean`?void 0:this.floatingUIOptions.inline)),e}get virtualElement(){let{selection:e}=this.editor.state,t=this.getReferencedVirtualElement?.call(this);if(t)return t;if(!this.view?.dom?.parentNode)return;let n=Tn(this.view,e.from,e.to),r={getBoundingClientRect:()=>n,getClientRects:()=>[n]};if(e instanceof wn){let t=this.view.nodeDOM(e.from),n=t.dataset.nodeViewWrapper?t:t.querySelector(`[data-node-view-wrapper]`);n&&(t=n),t&&(r={getBoundingClientRect:()=>t.getBoundingClientRect(),getClientRects:()=>[t.getBoundingClientRect()]})}if(e instanceof Zn){let{$anchorCell:t,$headCell:n}=e,i=t?t.pos:n.pos,a=n?n.pos:t.pos,o=this.view.nodeDOM(i),s=this.view.nodeDOM(a);if(!o||!s)return;let c=o===s?o.getBoundingClientRect():ib(o.getBoundingClientRect(),s.getBoundingClientRect());r={getBoundingClientRect:()=>c,getClientRects:()=>[c]}}return r}updatePosition(){if(!this.isVisible)return;let e=this.virtualElement;e&&Sn(e,this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:e,y:t,strategy:n,middlewareData:r})=>{if(!(!this.isVisible||this.editor.isDestroyed||!this.element.isConnected)){if(r.hide?.referenceHidden||r.hide?.escaped){this.element.style.visibility=`hidden`;return}this.element.style.visibility=`visible`,this.element.style.width=`max-content`,this.element.style.position=n,this.element.style.left=`${e}px`,this.element.style.top=`${t}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()}})}update(e,t){let{state:n}=e,r=n.selection.from!==n.selection.to;if(this.updateDelay>0&&r){this.handleDebouncedUpdate(e,t);return}let i=!t?.selection.eq(e.state.selection),a=!t?.doc.eq(e.state.doc);this.updateHandler(e,i,a,t)}getShouldShow(e){let{state:t}=this.view,{selection:n}=t,{ranges:r}=n,i=Math.min(...r.map(e=>e.$from.pos)),a=Math.max(...r.map(e=>e.$to.pos));return this.shouldShow?.call(this,{editor:this.editor,element:this.element,view:this.view,state:t,oldState:e,from:i,to:a})||!1}show(){var e;this.isVisible||(this.element.style.visibility=`visible`,this.element.style.opacity=`1`,(e=(typeof this.appendTo==`function`?this.appendTo():this.appendTo)??this.view.dom.parentElement)==null||e.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0)}hide(){this.isVisible&&=(this.element.style.visibility=`hidden`,this.element.style.opacity=`0`,this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),!1)}updateOptions(e){if(e.updateDelay!==void 0&&(this.updateDelay=e.updateDelay),e.resizeDelay!==void 0&&(this.resizeDelay=e.resizeDelay),e.appendTo!==void 0&&(this.appendTo=e.appendTo),e.getReferencedVirtualElement!==void 0&&(this.getReferencedVirtualElement=e.getReferencedVirtualElement),e.shouldShow!==void 0&&e.shouldShow&&(this.shouldShow=e.shouldShow),e.options!==void 0){let t=e.options.scrollTarget??window;t!==this.scrollTarget&&(this.scrollTarget.removeEventListener(`scroll`,this.resizeHandler),this.scrollTarget=t,this.scrollTarget.addEventListener(`scroll`,this.resizeHandler)),this.floatingUIOptions={...this.floatingUIOptions,...e.options}}}destroy(){this.hide(),this.element.removeEventListener(`mousedown`,this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener(`dragstart`,this.dragstartHandler),window.removeEventListener(`resize`,this.resizeHandler),this.scrollTarget.removeEventListener(`scroll`,this.resizeHandler),this.editor.off(`focus`,this.focusHandler),this.editor.off(`blur`,this.blurHandler),this.editor.off(`transaction`,this.transactionHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}},ob=e=>new Dn({key:typeof e.pluginKey==`string`?new hn(e.pluginKey):e.pluginKey,view:t=>new ab({view:t,...e})});Wn.create({name:`bubbleMenu`,addOptions(){return{element:null,pluginKey:`bubbleMenu`,updateDelay:void 0,appendTo:void 0,shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[ob({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,updateDelay:this.options.updateDelay,options:this.options.options,appendTo:this.options.appendTo,getReferencedVirtualElement:this.options.getReferencedVirtualElement,shouldShow:this.options.shouldShow})]:[]}});var sb=class{constructor({editor:e,element:t,view:n,pluginKey:r=`floatingMenu`,updateDelay:i=250,resizeDelay:a=60,options:o,appendTo:s,shouldShow:c}){this.preventHide=!1,this.isVisible=!1,this.scrollTarget=window,this.shouldShow=({view:e,state:t})=>{let{selection:n}=t,{$anchor:r,empty:i}=n,a=r.depth===1,o=r.parent.isTextblock&&!r.parent.type.spec.code&&!r.parent.textContent&&r.parent.childCount===0&&!this.getTextContent(r.parent);return!(!e.hasFocus()||!i||!a||!o||!this.editor.isEditable)},this.floatingUIOptions={strategy:`absolute`,placement:`right`,offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1},this.updateHandler=(e,t,n,r)=>{let{composing:i}=e;if(!(i||!t&&!n)){if(!this.getShouldShow(r)){this.hide();return}this.updatePosition(),this.show()}},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:e})=>{if(this.preventHide){this.preventHide=!1;return}e?.relatedTarget&&this.element.parentNode?.contains(e.relatedTarget)||e?.relatedTarget!==this.editor.view.dom&&this.hide()},this.transactionHandler=({transaction:e})=>{let t=e.getMeta(this.pluginKey);t===`updatePosition`?this.updatePosition():t&&typeof t==`object`&&t.type===`updateOptions`?this.updateOptions(t.options):t===`hide`?this.hide():t===`show`&&(this.updatePosition(),this.show())},this.resizeHandler=()=>{this.resizeDebounceTimer&&clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=window.setTimeout(()=>{this.updatePosition()},this.resizeDelay)},this.editor=e,this.element=t,this.view=n,this.pluginKey=r,this.updateDelay=i,this.resizeDelay=a,this.appendTo=s,this.scrollTarget=o?.scrollTarget??window,this.floatingUIOptions={...this.floatingUIOptions,...o},this.element.tabIndex=0,c&&(this.shouldShow=c),this.element.addEventListener(`mousedown`,this.mousedownHandler,{capture:!0}),this.editor.on(`focus`,this.focusHandler),this.editor.on(`blur`,this.blurHandler),this.editor.on(`transaction`,this.transactionHandler),window.addEventListener(`resize`,this.resizeHandler),this.scrollTarget.addEventListener(`scroll`,this.resizeHandler),this.update(n,n.state),this.getShouldShow()&&(this.show(),this.updatePosition())}getTextContent(e){return jn(e,{textSerializers:dn(this.editor.schema)})}get middlewares(){let e=[];return this.floatingUIOptions.flip&&e.push($n(typeof this.floatingUIOptions.flip==`boolean`?void 0:this.floatingUIOptions.flip)),this.floatingUIOptions.shift&&e.push(kn(typeof this.floatingUIOptions.shift==`boolean`?void 0:this.floatingUIOptions.shift)),this.floatingUIOptions.offset&&e.push(Rn(typeof this.floatingUIOptions.offset==`boolean`?void 0:this.floatingUIOptions.offset)),this.floatingUIOptions.arrow&&e.push(Nn(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&e.push(ln(typeof this.floatingUIOptions.size==`boolean`?void 0:this.floatingUIOptions.size)),this.floatingUIOptions.autoPlacement&&e.push(Fn(typeof this.floatingUIOptions.autoPlacement==`boolean`?void 0:this.floatingUIOptions.autoPlacement)),this.floatingUIOptions.hide&&e.push(bn(typeof this.floatingUIOptions.hide==`boolean`?void 0:this.floatingUIOptions.hide)),this.floatingUIOptions.inline&&e.push(Ln(typeof this.floatingUIOptions.inline==`boolean`?void 0:this.floatingUIOptions.inline)),e}getShouldShow(e){let{state:t}=this.view,{selection:n}=t,{ranges:r}=n,i=Math.min(...r.map(e=>e.$from.pos)),a=Math.max(...r.map(e=>e.$to.pos));return this.shouldShow?.call(this,{editor:this.editor,view:this.view,state:t,oldState:e,from:i,to:a})}updateOptions(e){if(e.updateDelay!==void 0&&(this.updateDelay=e.updateDelay),e.resizeDelay!==void 0&&(this.resizeDelay=e.resizeDelay),e.appendTo!==void 0&&(this.appendTo=e.appendTo),e.shouldShow!==void 0&&e.shouldShow&&(this.shouldShow=e.shouldShow),e.options!==void 0){let t=e.options.scrollTarget??window;t!==this.scrollTarget&&(this.scrollTarget.removeEventListener(`scroll`,this.resizeHandler),this.scrollTarget=t,this.scrollTarget.addEventListener(`scroll`,this.resizeHandler)),this.floatingUIOptions={...this.floatingUIOptions,...e.options}}}updatePosition(){let{selection:e}=this.editor.state,t=Tn(this.view,e.from,e.to);Sn({getBoundingClientRect:()=>t,getClientRects:()=>[t]},this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:e,y:t,strategy:n,middlewareData:r})=>{if(r.hide?.referenceHidden||r.hide?.escaped){this.element.style.visibility=`hidden`;return}this.element.style.visibility=`visible`,this.element.style.width=`max-content`,this.element.style.position=n,this.element.style.left=`${e}px`,this.element.style.top=`${t}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()})}update(e,t){let n=!t?.selection.eq(e.state.selection),r=!t?.doc.eq(e.state.doc);this.updateHandler(e,n,r,t)}show(){var e;this.isVisible||(this.element.style.visibility=`visible`,this.element.style.opacity=`1`,(e=(typeof this.appendTo==`function`?this.appendTo():this.appendTo)??this.view.dom.parentElement)==null||e.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0)}hide(){this.isVisible&&=(this.element.style.visibility=`hidden`,this.element.style.opacity=`0`,this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),!1)}destroy(){this.hide(),this.element.removeEventListener(`mousedown`,this.mousedownHandler,{capture:!0}),window.removeEventListener(`resize`,this.resizeHandler),this.scrollTarget.removeEventListener(`scroll`,this.resizeHandler),this.editor.off(`focus`,this.focusHandler),this.editor.off(`blur`,this.blurHandler),this.editor.off(`transaction`,this.transactionHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}},cb=e=>new Dn({key:typeof e.pluginKey==`string`?new hn(e.pluginKey):e.pluginKey,view:t=>new sb({view:t,...e})});Wn.create({name:`floatingMenu`,addOptions(){return{element:null,options:{},pluginKey:`floatingMenu`,updateDelay:void 0,resizeDelay:void 0,appendTo:void 0,shouldShow:null}},addCommands(){return{updateFloatingMenuPosition:()=>({tr:e,dispatch:t})=>(t&&e.setMeta(this.options.pluginKey,`updatePosition`),!0)}},addProseMirrorPlugins(){return this.options.element?[cb({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,updateDelay:this.options.updateDelay,resizeDelay:this.options.resizeDelay,options:this.options.options,appendTo:this.options.appendTo,shouldShow:this.options.shouldShow})]:[]}});function lb(e,t){return e??new hn(t)}var ub=typeof window<`u`?Z.useLayoutEffect:Z.useEffect,db=new Set([`left`,`opacity`,`position`,`top`,`visibility`,`width`]),fb=new Set(`animationIterationCount.aspectRatio.borderImageOutset.borderImageSlice.borderImageWidth.columnCount.columns.fillOpacity.flex.flexGrow.flexShrink.fontWeight.gridArea.gridColumn.gridColumnEnd.gridColumnStart.gridRow.gridRowEnd.gridRowStart.lineClamp.lineHeight.opacity.order.orphans.scale.stopOpacity.strokeDasharray.strokeDashoffset.strokeMiterlimit.strokeOpacity.strokeWidth.tabSize.widows.zIndex.zoom`.split(`.`)),pb=new Set([`children`,`className`,`style`]),mb=new Set([`tabIndex`]),hb=new Set([`accessKey`,`autoCapitalize`,`contentEditable`,`contextMenu`,`dir`,`draggable`,`enterKeyHint`,`hidden`,`id`,`lang`,`nonce`,`role`,`slot`,`spellCheck`,`tabIndex`,`title`,`translate`]),gb={Blur:`focusout`,DoubleClick:`dblclick`,Focus:`focusin`,MouseEnter:`mouseenter`,MouseLeave:`mouseleave`};function _b(e,t){return/^on[A-Z]/.test(e)&&typeof t==`function`}function vb(e){return e.startsWith(`aria-`)||e.startsWith(`data-`),e}function yb(e){return e.startsWith(`aria-`)||e.startsWith(`data-`)||hb.has(e)}function bb(e){return e.startsWith(`--`)?e:e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function xb(e){let t=e.endsWith(`Capture`),n=(t?e.slice(0,-7):e).slice(2);return{eventName:gb[n]??n.toLowerCase(),options:t?{capture:!0}:void 0}}function Sb(e,t){let n=t.defaultPrevented,r=!1,i=Object.create(t);return Object.defineProperties(i,{nativeEvent:{value:t},currentTarget:{value:e},target:{value:t.target},persist:{value:()=>void 0},isDefaultPrevented:{value:()=>n},isPropagationStopped:{value:()=>r},preventDefault:{value:()=>{n=!0,t.preventDefault()}},stopPropagation:{value:()=>{r=!0,t.stopPropagation()}}}),i}function Cb(e){return mb.has(e)}function wb(e,t,n){if(t===`tabIndex`){e.tabIndex=Number(n);return}e[t]=n}function Tb(e,t){if(t===`tabIndex`){e.removeAttribute(`tabindex`);return}let n=e[t];if(typeof n==`boolean`){e[t]=!1;return}if(typeof n==`number`){e[t]=0;return}e[t]=``}function Eb(e,t){return typeof t!=`number`||t===0||e.startsWith(`--`)||fb.has(e)?String(t):`${t}px`}function Db(e,t){db.has(t)||e.style.removeProperty(bb(t))}function Ob(e,t,n){db.has(t)||e.style.setProperty(bb(t),Eb(t,n))}function kb(e,t,n){new Set([...Object.keys(t),...Object.keys(n)]).forEach(r=>{if(pb.has(r)||!yb(r)||_b(r,t[r])||_b(r,n[r]))return;let i=t[r],a=n[r];if(i===a)return;let o=vb(r);if(a==null||a===!1){Cb(r)&&Tb(e,r),e.removeAttribute(o);return}if(a===!0){Cb(r)&&wb(e,r,!0),e.setAttribute(o,``);return}if(Cb(r)){wb(e,r,a);return}e.setAttribute(o,String(a))})}function Ab(e,t,n){if(t!==n){if(n){e.className=n;return}e.removeAttribute(`class`)}}function jb(e,t,n){let r=t??{},i=n??{};new Set([...Object.keys(r),...Object.keys(i)]).forEach(t=>{let n=r[t],a=i[t];if(n!==a){if(a==null){Db(e,t);return}Ob(e,t,a)}})}function Mb(e,t,n){t.forEach(({eventName:t,listener:n,options:r})=>{e.removeEventListener(t,n,r)});let r=[];return Object.entries(n).forEach(([t,n])=>{if(!_b(t,n))return;let{eventName:i,options:a}=xb(t),o=t=>{n(Sb(e,t))};e.addEventListener(i,o,a),r.push({eventName:i,listener:o,options:a})}),r}function Nb(e,t){let n=(0,Z.useRef)({}),r=(0,Z.useRef)([]);ub(()=>{let i=n.current;return Ab(e,i.className,t.className),jb(e,i.style,t.style),kb(e,i,t),r.current=Mb(e,r.current,t),n.current=t,()=>{r.current.forEach(({eventName:t,listener:n,options:r})=>{e.removeEventListener(t,n,r)}),r.current=[]}},[e,t])}var Pb=Z.forwardRef(({pluginKey:e,editor:t,updateDelay:n,resizeDelay:r,appendTo:i,shouldShow:a=null,getReferencedVirtualElement:o,options:s,children:c,...l},u)=>{let d=(0,Z.useRef)(document.createElement(`div`)),f=(0,Z.useRef)(lb(e,`bubbleMenu`)).current;Nb(d.current,l),typeof u==`function`?u(d.current):u&&(u.current=d.current);let{editor:p}=pt(),m=t||p,h={updateDelay:n,resizeDelay:r,appendTo:i,pluginKey:f,shouldShow:a,getReferencedVirtualElement:o,options:s},g=(0,Z.useRef)(h);g.current=h;let[_,v]=(0,Z.useState)(!1),y=(0,Z.useRef)(!0);return(0,Z.useEffect)(()=>{if(m?.isDestroyed)return;if(!m){console.warn(`BubbleMenu component is not rendered inside of an editor component or does not have editor prop.`);return}let e=d.current;e.style.visibility=`hidden`,e.style.position=`absolute`;let t=ob({...g.current,editor:m,element:e});m.registerPlugin(t);let n=g.current.pluginKey;return y.current=!0,v(!0),()=>{v(!1),m.unregisterPlugin(n),window.requestAnimationFrame(()=>{e.parentNode&&e.parentNode.removeChild(e)})}},[m]),(0,Z.useEffect)(()=>{if(!(!_||!m||m.isDestroyed)){if(y.current){y.current=!1;return}m.view.dispatch(m.state.tr.setMeta(f,{type:`updateOptions`,options:g.current}))}},[_,m,n,r,a,s,i,o,f]),(0,ri.createPortal)(c,d.current)});Z.forwardRef(({pluginKey:e,editor:t,updateDelay:n,resizeDelay:r,appendTo:i,shouldShow:a=null,options:o,children:s,...c},l)=>{let u=(0,Z.useRef)(document.createElement(`div`)),d=(0,Z.useRef)(lb(e,`floatingMenu`)).current;Nb(u.current,c),typeof l==`function`?l(u.current):l&&(l.current=u.current);let{editor:f}=pt(),p=t||f,m={updateDelay:n,resizeDelay:r,appendTo:i,pluginKey:d,shouldShow:a,options:o},h=(0,Z.useRef)(m);h.current=m;let[g,_]=(0,Z.useState)(!1),v=(0,Z.useRef)(!0);return(0,Z.useEffect)(()=>{if(p?.isDestroyed)return;if(!p){console.warn(`FloatingMenu component is not rendered inside of an editor component or does not have editor prop.`);return}let e=u.current;e.style.visibility=`hidden`,e.style.position=`absolute`;let t=cb({...h.current,editor:p,element:e});p.registerPlugin(t);let n=h.current.pluginKey;return v.current=!0,_(!0),()=>{_(!1),p.unregisterPlugin(n),window.requestAnimationFrame(()=>{e.parentNode&&e.parentNode.removeChild(e)})}},[p]),(0,Z.useEffect)(()=>{if(!(!g||!p||p.isDestroyed)){if(v.current){v.current=!1;return}p.view.dispatch(p.state.tr.setMeta(d,{type:`updateOptions`,options:h.current}))}},[g,p,n,r,a,o,i,d]),(0,ri.createPortal)(s,u.current)});var Fb=[{name:`paragraph`,label:`Text`,icon:Xi,isActive:e=>e.isActive(`paragraph`)&&!e.isActive(`list`),command:e=>e.chain().focus().setParagraph().run()},{name:`heading1`,label:`Heading 1`,icon:it,isActive:e=>e.isActive(`heading`,{level:1}),command:e=>e.chain().focus().toggleHeading({level:1}).run()},{name:`heading2`,label:`Heading 2`,icon:dt,isActive:e=>e.isActive(`heading`,{level:2}),command:e=>e.chain().focus().toggleHeading({level:2}).run()},{name:`heading3`,label:`Heading 3`,icon:_t,isActive:e=>e.isActive(`heading`,{level:3}),command:e=>e.chain().focus().toggleHeading({level:3}).run()},{name:`bulletList`,label:`Bullet List`,icon:Tt,isActive:e=>e.isActive(`list`,{ordered:!1})&&!e.isActive(`listItem`,{checked:!0})&&!e.isActive(`listItem`,{checked:!1}),command:e=>e.chain().focus().toggleBulletList().run()},{name:`orderedList`,label:`Ordered List`,icon:nt,isActive:e=>e.isActive(`list`,{ordered:!0}),command:e=>e.chain().focus().toggleOrderedList().run()},{name:`taskList`,label:`Task List`,icon:et,isActive:e=>e.isActive(`listItem`,{checked:!0})||e.isActive(`listItem`,{checked:!1}),command:e=>e.chain().focus().toggleTaskList().run()},{name:`blockquote`,label:`Quote`,icon:xt,isActive:e=>e.isActive(`blockquote`),command:e=>e.chain().focus().toggleBlockquote().run()},{name:`codeBlock`,label:`Code Block`,icon:ca,isActive:e=>e.isActive(`codeBlock`),command:e=>e.chain().focus().toggleCodeBlock().run()}];function Ib(e){let t=(0,Q.c)(18),{editor:n}=e,r;t[0]===n?r=t[1]:(r={editor:n,selector:Lb},t[0]=n,t[1]=r);let{current:i,activeStates:a}=yt(r),o=i.icon,s;t[2]===o?s=t[3]:(s=(0,X.jsx)(o,{className:`size-3.5`}),t[2]=o,t[3]=s);let c;t[4]===i.label?c=t[5]:(c=(0,X.jsx)(`span`,{children:i.label}),t[4]=i.label,t[5]=c);let l;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,X.jsx)(fe,{className:`size-3 opacity-50`}),t[6]=l):l=t[6];let u;t[7]!==s||t[8]!==c?(u=(0,X.jsx)(my,{asChild:!0,children:(0,X.jsxs)(q,{variant:`ghost`,size:`sm`,className:`gap-1 px-2 text-sm font-medium text-accent-foreground/80`,children:[s,c,l]})}),t[7]=s,t[8]=c,t[9]=u):u=t[9];let d;t[10]!==a||t[11]!==n?(d=Fb.map(e=>{let t=e.icon,r=a[e.name];return(0,X.jsxs)(gy,{className:r?`bg-accent text-accent-foreground`:``,onSelect:()=>{e.command(n)},children:[(0,X.jsx)(t,{className:`size-4`}),(0,X.jsx)(`span`,{children:e.label})]},e.name)}),t[10]=a,t[11]=n,t[12]=d):d=t[12];let f;t[13]===d?f=t[14]:(f=(0,X.jsx)(hy,{align:`start`,sideOffset:8,className:`w-44 max-h-(--radix-dropdown-menu-content-available-height) overflow-y-auto subtle-scrollbar`,children:d}),t[13]=d,t[14]=f);let p;return t[15]!==u||t[16]!==f?(p=(0,X.jsxs)(py,{children:[u,f]}),t[15]=u,t[16]=f,t[17]=p):p=t[17],p}function Lb(e){let t=Object.fromEntries(Fb.map(t=>[t.name,t.isActive(e.editor)]));return{current:Fb.find(e=>t[e.name])??Fb[0],activeStates:t}}var Rb=[{name:`bold`,icon:ti,command:e=>e.chain().focus().toggleBold().run(),isActive:e=>e.isActive(`strong`),shortcut:`⌘B`},{name:`italic`,icon:Ii,command:e=>e.chain().focus().toggleItalic().run(),isActive:e=>e.isActive(`emphasis`),shortcut:`⌘I`},{name:`underline`,icon:ha,command:e=>e.chain().focus().toggleUnderline().run(),isActive:e=>e.isActive(`underline`),shortcut:`⌘U`},{name:`strikethrough`,icon:da,command:e=>e.chain().focus().toggleStrike().run(),isActive:e=>e.isActive(`strike`),shortcut:`⌘⇧X`},{name:`code`,icon:pi,command:e=>e.chain().focus().toggleCode().run(),isActive:e=>e.isActive(`code`),shortcut:`⌘E`},{name:`highlight`,icon:Pi,command:e=>e.chain().focus().toggleHighlight().run(),isActive:e=>e.isActive(`highlight`),shortcut:`⌘⇧H`}];function zb(e){let t=(0,Q.c)(7),{editor:n}=e,r;t[0]===n?r=t[1]:(r={editor:n,selector:Bb},t[0]=n,t[1]=r);let i=yt(r),a;t[2]!==i||t[3]!==n?(a=Rb.map(e=>{let t=e.icon,r=i[e.name];return(0,X.jsxs)(sn,{children:[(0,X.jsx)(en,{asChild:!0,children:(0,X.jsx)(q,{variant:`ghost`,size:`icon-xs`,"aria-label":e.name,className:r?`bg-accent text-primary`:`text-accent-foreground`,onMouseDown:t=>{t.preventDefault(),e.command(n)},children:(0,X.jsx)(t,{className:`size-3.5`})})}),(0,X.jsxs)(nn,{side:`bottom`,sideOffset:8,children:[(0,X.jsx)(`span`,{className:`capitalize`,children:e.name}),(0,X.jsx)(`kbd`,{className:`ml-1.5 text-[10px] opacity-60`,children:e.shortcut})]})]},e.name)}),t[2]=i,t[3]=n,t[4]=a):a=t[4];let o;return t[5]===a?o=t[6]:(o=(0,X.jsx)(`div`,{className:`flex items-center gap-0.5`,children:a}),t[5]=a,t[6]=o),o}function Bb(e){return Object.fromEntries(Rb.map(t=>[t.name,t.isActive(e.editor)]))}function Vb(e){let t=(0,Q.c)(46),{editor:n}=e,[r,i]=(0,Z.useState)(!1),[a,o]=(0,Z.useState)(``),s=(0,Z.useRef)(null),c;t[0]===n?c=t[1]:(c=n.isActive(`link`),t[0]=n,t[1]=c);let l=c,u;t[2]===n?u=t[3]:(u=n.getAttributes(`link`).href??``,t[2]=n,t[3]=u);let d=u,f,p;t[4]===n?(f=t[5],p=t[6]):(f=()=>{let e=function(){n.state.selection.empty&&i(!1)};return n.on(`selectionUpdate`,e),()=>{n.off(`selectionUpdate`,e)}},p=[n],t[4]=n,t[5]=f,t[6]=p),(0,Z.useEffect)(f,p);let m,h;t[7]!==d||t[8]!==r?(m=()=>{r&&(o(d),requestAnimationFrame(()=>s.current?.focus()))},h=[r,d],t[7]=d,t[8]=r,t[9]=m,t[10]=h):(m=t[9],h=t[10]),(0,Z.useEffect)(m,h);let g;t[11]!==n||t[12]!==l||t[13]!==a?(g=function(){a.trim()?n.chain().focus().setLink({href:a.trim()}).run():l&&n.chain().focus().unsetLink().run(),i(!1)},t[11]=n,t[12]=l,t[13]=a,t[14]=g):g=t[14];let _=g,v;t[15]===n?v=t[16]:(v=function(){n.chain().focus().unsetLink().run(),i(!1)},t[15]=n,t[16]=v);let y=v,b;t[17]!==_||t[18]!==n?(b=function(e){e.key===`Enter`&&(e.preventDefault(),_()),e.key===`Escape`&&(e.preventDefault(),i(!1),n.chain().focus().run())},t[17]=_,t[18]=n,t[19]=b):b=t[19];let x=b;if(r){let e;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(e=e=>o(e.target.value),t[20]=e):e=t[20];let n;t[21]!==x||t[22]!==a?(n=(0,X.jsx)(`input`,{ref:s,type:`url`,placeholder:`Paste link...`,value:a,onChange:e,onKeyDown:x,"aria-label":`Link URL`,className:`h-5 w-44 bg-transparent text-sm border-none outline-none placeholder:text-muted-foreground`}),t[21]=x,t[22]=a,t[23]=n):n=t[23];let r;t[24]===_?r=t[25]:(r=()=>{_()},t[24]=_,t[25]=r);let i;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,X.jsx)(vi,{className:`size-3.5 shrink-0 text-muted-foreground`}),t[26]=i):i=t[26];let c;t[27]===r?c=t[28]:(c=(0,X.jsx)(q,{variant:`ghost`,size:`icon-xs`,"aria-label":`Apply link`,onClick:r,children:i}),t[27]=r,t[28]=c);let u;t[29]!==n||t[30]!==c?(u=(0,X.jsxs)(`div`,{className:`flex items-center gap-1.5 rounded-md border bg-background px-2 py-1`,children:[n,c]}),t[29]=n,t[30]=c,t[31]=u):u=t[31];let f;t[32]!==d||t[33]!==l||t[34]!==y?(f=l&&(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(sn,{children:[(0,X.jsx)(en,{asChild:!0,children:(0,X.jsx)(q,{variant:`ghost`,size:`icon-xs`,"aria-label":`Open link in new tab`,onMouseDown:e=>{e.preventDefault(),window.open(d,`_blank`,`noopener,noreferrer`)},children:(0,X.jsx)(Ee,{className:`size-3.5`})})}),(0,X.jsx)(nn,{side:`bottom`,sideOffset:8,children:`Open link in new tab`})]}),(0,X.jsxs)(sn,{children:[(0,X.jsx)(en,{asChild:!0,children:(0,X.jsx)(q,{variant:`ghost`,size:`icon-xs`,"aria-label":`Remove link`,onMouseDown:e=>{e.preventDefault(),y()},children:(0,X.jsx)(ht,{className:`size-3.5`})})}),(0,X.jsx)(nn,{side:`bottom`,sideOffset:8,children:`Remove link`})]})]}),t[32]=d,t[33]=l,t[34]=y,t[35]=f):f=t[35];let p;return t[36]!==u||t[37]!==f?(p=(0,X.jsxs)(`div`,{className:`flex items-center gap-0.5`,children:[u,f]}),t[36]=u,t[37]=f,t[38]=p):p=t[38],p}let S=l?`bg-accent text-primary`:`text-accent-foreground`,C,w;t[39]===Symbol.for(`react.memo_cache_sentinel`)?(C=e=>{e.preventDefault(),i(!0)},w=(0,X.jsx)(zi,{className:`size-3.5`}),t[39]=C,t[40]=w):(C=t[39],w=t[40]);let T;t[41]===S?T=t[42]:(T=(0,X.jsx)(en,{asChild:!0,children:(0,X.jsx)(q,{variant:`ghost`,size:`icon-xs`,"aria-label":`Insert link`,className:S,onMouseDown:C,children:w})}),t[41]=S,t[42]=T);let E;t[43]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,X.jsxs)(nn,{side:`bottom`,sideOffset:8,children:[`Link`,(0,X.jsx)(`kbd`,{className:`ml-1.5 text-[10px] opacity-60`,children:`⌘K`})]}),t[43]=E):E=t[43];let D;return t[44]===T?D=t[45]:(D=(0,X.jsxs)(sn,{children:[T,E]}),t[44]=T,t[45]=D),D}function Hb({editor:e}){if(e.state.selection.empty||e.isActive(`codeBlock`))return!1;let{from:t,to:n}=e.state.selection;return!!e.state.doc.textBetween(t,n,` `).trim()}function Ub(e){let t=(0,Q.c)(25),{editor:n}=e,r=(0,Z.useRef)(null),[i,a]=(0,Z.useState)(0),o=(0,Z.useRef)(null),s;t[0]!==n.state||t[1]!==n.view?(s=()=>{try{let{from:e,to:t}=n.state.selection;return Tn(n.view,e,t)}catch{return new DOMRect}},t[0]=n.state,t[1]=n.view,t[2]=s):s=t[2];let c;if(t[3]!==n.view.dom||t[4]!==s){let e={getBoundingClientRect:s,contextElement:n.view.dom};c=()=>{let t=r.current;t&&(o.current?.(),o.current=gn(e,t,()=>{Sn(e,t,{placement:`top`,strategy:`fixed`,middleware:[Rn(8),$n(),kn({padding:8})]}).then(e=>{let{x:n,y:r}=e;t.isConnected&&(t.style.position=`fixed`,t.style.left=`${n}px`,t.style.top=`${r}px`)}).catch(Kb)}))},t[3]=n.view.dom,t[4]=s,t[5]=c}else c=t[5];let l=c,u;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(u=()=>{o.current?.(),o.current=null,a(Gb)},t[6]=u):u=t[6];let d=u,f;t[7]===l?f=t[8]:(f={onShow:l,onHide:d,strategy:`fixed`},t[7]=l,t[8]=f);let p;t[9]===n?p=t[10]:(p=(0,X.jsx)(Ib,{editor:n}),t[9]=n,t[10]=p);let m;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,X.jsx)(Pv,{orientation:`vertical`,className:`mx-0.5 h-5 data-vertical:self-center`}),t[11]=m):m=t[11];let h;t[12]!==n||t[13]!==i?(h=(0,X.jsx)(zb,{editor:n},i),t[12]=n,t[13]=i,t[14]=h):h=t[14];let g;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,X.jsx)(Pv,{orientation:`vertical`,className:`mx-0.5 h-5 data-vertical:self-center`}),t[15]=g):g=t[15];let _=`${i}-link`,v;t[16]!==n||t[17]!==_?(v=(0,X.jsx)(Vb,{editor:n},_),t[16]=n,t[17]=_,t[18]=v):v=t[18];let y;return t[19]!==n||t[20]!==v||t[21]!==f||t[22]!==p||t[23]!==h?(y=(0,X.jsxs)(Pb,{ref:r,editor:n,appendTo:Wb,shouldShow:Hb,updateDelay:250,options:f,className:`z-50 flex items-center gap-0.5 rounded-lg border bg-background p-1 shadow-md`,children:[p,m,h,g,v]}),t[19]=n,t[20]=v,t[21]=f,t[22]=p,t[23]=h,t[24]=y):y=t[24],y}function Wb(){return document.body}function Gb(e){return e+1}function Kb(){}var qb=[{name:`addRowBefore`,icon:$r,label:`Add row above`,command:e=>e.chain().focus().addRowBefore().run()},{name:`addRowAfter`,icon:Xr,label:`Add row below`,command:e=>e.chain().focus().addRowAfter().run()},{name:`deleteRow`,icon:ht,label:`Delete row`,command:e=>e.chain().focus().deleteRow().run()}],Jb=[{name:`addColumnBefore`,icon:de,label:`Add column left`,command:e=>e.chain().focus().addColumnBefore().run()},{name:`addColumnAfter`,icon:Zr,label:`Add column right`,command:e=>e.chain().focus().addColumnAfter().run()},{name:`deleteColumn`,icon:ht,label:`Delete column`,command:e=>e.chain().focus().deleteColumn().run()}],Yb=[{name:`toggleHeaderRow`,icon:pa,label:`Toggle header row`,command:e=>e.chain().focus().toggleHeaderRow().run()},{name:`toggleHeaderColumn`,icon:hi,label:`Toggle header column`,command:e=>e.chain().focus().toggleHeaderColumn().run()},{name:`deleteTable`,icon:Mi,label:`Delete table`,command:e=>e.chain().focus().deleteTable().run()}];function Xb({editor:e}){return e.isActive(`table`)}function Zb(e){let t=(0,Q.c)(14),{action:n,editor:r}=e,i=n.icon,a;t[0]!==n||t[1]!==r?(a=e=>{e.preventDefault(),n.command(r)},t[0]=n,t[1]=r,t[2]=a):a=t[2];let o;t[3]===i?o=t[4]:(o=(0,X.jsx)(i,{className:`size-3.5`}),t[3]=i,t[4]=o);let s;t[5]!==n.label||t[6]!==a||t[7]!==o?(s=(0,X.jsx)(en,{asChild:!0,children:(0,X.jsx)(q,{variant:`ghost`,size:`icon-xs`,"aria-label":n.label,className:`text-muted-foreground`,onMouseDown:a,children:o})}),t[5]=n.label,t[6]=a,t[7]=o,t[8]=s):s=t[8];let c;t[9]===n.label?c=t[10]:(c=(0,X.jsx)(nn,{side:`bottom`,sideOffset:8,children:n.label}),t[9]=n.label,t[10]=c);let l;return t[11]!==s||t[12]!==c?(l=(0,X.jsxs)(sn,{children:[s,c]}),t[11]=s,t[12]=c,t[13]=l):l=t[13],l}function Qb(e){let t=(0,Q.c)(13),{editor:n}=e,r;t[0]===n?r=t[1]:(r=qb.map(e=>(0,X.jsx)(Zb,{action:e,editor:n},e.name)),t[0]=n,t[1]=r);let i;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,X.jsx)(Pv,{orientation:`vertical`,className:`mx-0.5 h-5 data-vertical:self-center`}),t[2]=i):i=t[2];let a;t[3]===n?a=t[4]:(a=Jb.map(e=>(0,X.jsx)(Zb,{action:e,editor:n},e.name)),t[3]=n,t[4]=a);let o;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,X.jsx)(Pv,{orientation:`vertical`,className:`mx-0.5 h-5 data-vertical:self-center`}),t[5]=o):o=t[5];let s;t[6]===n?s=t[7]:(s=Yb.map(e=>(0,X.jsx)(Zb,{action:e,editor:n},e.name)),t[6]=n,t[7]=s);let c;return t[8]!==n||t[9]!==r||t[10]!==a||t[11]!==s?(c=(0,X.jsxs)(Pb,{editor:n,shouldShow:Xb,updateDelay:100,className:`flex items-center gap-0.5 rounded-lg border bg-background p-1 shadow-md`,children:[r,i,a,o,s]}),t[8]=n,t[9]=r,t[10]=a,t[11]=s,t[12]=c):c=t[12],c}var $b=new WeakMap;function ex(e){let t=document.createElement(`span`);t.classList.add(`collaboration-cursor__caret`),t.style.borderColor=e.color;let n=document.createElement(`div`);return n.classList.add(`collaboration-cursor__label`),n.style.backgroundColor=e.color,n.style.color=xn(e.color),n.textContent=e.name,t.append(n),t}var tx={state:`idle`,count:0,lastFiredAt:null,position:`append`,lastAgentId:null},nx=e=>{let t=(0,Q.c)(61),{provider:n,placeholder:r,isSourceMode:i}=e,a=(0,Z.useRef)(``),o=(0,Z.useRef)(null),s=(0,Z.useRef)(tx),c=nb(),{principal:l,activeDocName:u}=ft(),d=n.configuration.name??``,[f]=(0,Z.useState)(rx),[p,m]=(0,Z.useState)(null),[h,g]=(0,Z.useState)(null);if(h)throw h;let _=(0,Z.useRef)(null),v;t[0]!==f||t[1]!==d||t[2]!==r||t[3]!==n?(v=()=>{let e;try{let t={viewCount:0,bytes:n.document.getText(`source`).length};e=Re({docName:d,container:document.createElement(`div`),sizeStats:t,factory:e=>{let t=performance.now();return{editor:new Jn({element:e,onBeforeCreate:e=>{let{editor:n}=e;$b.set(n,t)},onCreate:e=>{let{editor:t}=e,r=$b.get(t);if($b.delete(t),r==null)return;let i=performance.now();Ye(`ok/editor/create-tiptap`,{docName:n.configuration.name??`unknown`,ytextLength:n.document.getText(`source`).length},{startTime:r,duration:Math.max(0,i-r)})},editorProps:{attributes:{class:`pt-10 pb-16 h-full`},clipboardTextParser:(e,t,n,r)=>{let i=f.mdManager.parse(e);return r.state.schema.nodeFromJSON(i).content},clipboardTextSerializer:(e,t)=>f.text(e,t),clipboardSerializer:f.html,handlePaste:(e,t)=>f.paste(e,t)},extensions:[...gt.map(e=>e.name===`link`?e.configure({docName:n.configuration.name??``}):e),tb.configure({placeholder:r??`Type '/' for commands`,showOnlyCurrent:!0}),Fe.configure({document:n.document}),Wn.create({name:`imageUploadDecoration`,addProseMirrorPlugins(){return[Be]}}),Wn.create({name:`collaborationCursor`,addProseMirrorPlugins(){let e=n.awareness;if(!e)throw Error(`[TiptapEditor] HocuspocusProvider has no awareness instance — cursor plugin cannot initialize`);return[Ke(e,{cursorBuilder:ex})]}})]}),ydoc:n.document,ytext:n.document.getText(`source`),provider:n}}}),_.current=e,m(e.editor)}catch(e){let t=e;console.error(`[TiptapEditor] mountTiptapEditor failed`,t),_.current=null,m(null),g(t instanceof Error?t:Error(String(t)))}return()=>{let e=_.current;e&&ze(e),_.current=null,m(null)}},t[0]=f,t[1]=d,t[2]=r,t[3]=n,t[4]=v):v=t[4];let y;t[5]!==f||t[6]!==d||t[7]!==n?(y=[d,n,f],t[5]=f,t[6]=d,t[7]=n,t[8]=y):y=t[8],(0,Z.useEffect)(v,y);let b;t[9]===n.configuration.name?b=t[10]:(b=()=>{let e=n.configuration.name;return st(e??null),ix},t[9]=n.configuration.name,t[10]=b);let x;t[11]===n?x=t[12]:(x=[n],t[11]=n,t[12]=x),(0,Z.useEffect)(b,x);let S;t[13]!==p||t[14]!==n.configuration.name?(S=()=>{},t[13]=p,t[14]=n.configuration.name,t[15]=S):S=t[15];let C;t[16]!==p||t[17]!==n?(C=[p,n],t[16]=p,t[17]=n,t[18]=C):C=t[18],(0,Z.useEffect)(S,C);let w,T;t[19]===p?(w=t[20],T=t[21]):(w=()=>{if(!p)return;let e=ax,t=null,n=()=>{t||!p||p.isDestroyed||(t=p.view.dom,t.addEventListener(`keydown`,e),t.addEventListener(`paste`,e),t.addEventListener(`drop`,e),t.addEventListener(`cut`,e))},r=()=>{t&&=(t.removeEventListener(`keydown`,e),t.removeEventListener(`paste`,e),t.removeEventListener(`drop`,e),t.removeEventListener(`cut`,e),null)};return p.editorView?n():p.on(`create`,n),()=>{p.off(`create`,n),r()}},T=[p],t[19]=p,t[20]=w,t[21]=T),(0,Z.useEffect)(w,T);let E,D;t[22]!==p||t[23]!==n.document?(D=()=>{if(!p)return;let e=n.document.getMap(`agent-flash`),t=Date.now(),r=0,i=null,a=null,c=null,l=()=>{let t=null;for(let[,n]of e.entries()){let e=n;e.timestamp&&(!t||e.timestamp>t.timestamp)&&(t={agentId:e.agentId??`unknown`,timestamp:e.timestamp,type:e.type??`insert`,description:e.description})}return t},u=e=>{s.current=e;let t=o.current;t&&(t.setAttribute(`data-agent-flash-state`,e.state),t.setAttribute(`data-agent-flash-count`,String(e.count)),t.setAttribute(`data-agent-flash-position`,e.position),t.setAttribute(`data-agent-flash-agent-id`,e.lastAgentId??``))},d=()=>{let e=l(),t=e?.description?.toLowerCase().includes(`prepend`)?`prepend`:`append`,n={state:`editing`,count:(s.current?.count??0)+1,lastFiredAt:Date.now(),position:t,lastAgentId:e?.agentId??null};u(n),document.dispatchEvent(new CustomEvent(`agent-flash`,{detail:n})),a&&clearTimeout(a),c&&clearTimeout(c),a=window.setTimeout(()=>{let e={...n,state:`settled`};u(e),document.dispatchEvent(new CustomEvent(`agent-flash-end`,{detail:e})),c=window.setTimeout(()=>{u({...e,state:`idle`})},300)},An)};u(tx);let f=()=>{if(Qn(e),!On(e,t)||document.visibilityState!==`visible`)return;let n=Date.now();if(t=n,n-r<500){if(!i){let e=500-(n-r);i=window.setTimeout(()=>{i=null,r=Date.now(),d()},e)}return}r=n,d()};e.observe(f);let m=()=>{document.visibilityState===`visible`?On(e,t)&&(t=Date.now(),r=Date.now(),d()):t=Date.now()};return document.addEventListener(`visibilitychange`,m),()=>{e.unobserve(f),document.removeEventListener(`visibilitychange`,m),i&&clearTimeout(i),a&&clearTimeout(a),c&&clearTimeout(c)}},E=[p,n.document],t[22]=p,t[23]=n.document,t[24]=E,t[25]=D):(E=t[24],D=t[25]),(0,Z.useEffect)(D,E);let O,k;t[26]===n?(O=t[27],k=t[28]):(O=()=>{let e=window.location.hash,t=e.indexOf(`?`),r=t>=0?new URLSearchParams(e.slice(t+1)).get(`anchor`):null;if(!r)return;let i=r,a=0,o,s=!1;function c(){if(s)return;let e=document.getElementById(i);e?(e.scrollIntoView({behavior:`smooth`,block:`start`}),s=!0,n.off(`synced`,c)):a<20&&(a+=1,o=window.setTimeout(c,100))}return c(),n.on(`synced`,c),()=>{o!==void 0&&clearTimeout(o),n.off(`synced`,c)}},k=[n],t[26]=n,t[27]=O,t[28]=k),(0,Z.useEffect)(O,k);let A,j;t[29]===p?(A=t[30],j=t[31]):(A=()=>{if(!p)return;let e=function(e){let t=e.detail;if(!t||t.mode!==`wysiwyg`||!p||p.isDestroyed)return;let n=p.editorView;if(!n)return;let r=n.dom.querySelectorAll(`h1, h2, h3, h4, h5, h6`)[t.index];r&&r.scrollIntoView({behavior:`smooth`,block:`start`})};return window.addEventListener(ar,e),()=>window.removeEventListener(ar,e)},j=[p],t[29]=p,t[30]=A,t[31]=j),(0,Z.useEffect)(A,j);let M,N;t[32]===n.document?(M=t[33],N=t[34]):(M=()=>{let e=n.document.getMap(`metadata`),t=e.get(`frontmatter`);typeof t==`string`&&t&&(a.current=t);let r=()=>{let t=e.get(`frontmatter`);typeof t==`string`&&(a.current=t)};return e.observe(r),()=>e.unobserve(r)},N=[n.document],t[32]=n.document,t[33]=M,t[34]=N),(0,Z.useEffect)(M,N);let P;t[35]!==u||t[36]!==d||t[37]!==c||t[38]!==i||t[39]!==l||t[40]!==n.awareness?(P=()=>{let e=n.awareness;if(e){if(d!==u){e.setLocalState(null);return}e.setLocalState({user:rb({principal:l,identity:c}),mode:i?`source`:`wysiwyg`})}},t[35]=u,t[36]=d,t[37]=c,t[38]=i,t[39]=l,t[40]=n.awareness,t[41]=P):P=t[41];let F;t[42]!==u||t[43]!==d||t[44]!==c||t[45]!==i||t[46]!==l||t[47]!==n?(F=[n,d,u,c,l,i],t[42]=u,t[43]=d,t[44]=c,t[45]=i,t[46]=l,t[47]=n,t[48]=F):F=t[48],(0,Z.useEffect)(P,F);let I;t[49]===p?I=t[50]:(I=p&&(0,X.jsx)(Ub,{editor:p}),t[49]=p,t[50]=I);let L;t[51]===p?L=t[52]:(L=p&&(0,X.jsx)(Qb,{editor:p}),t[51]=p,t[52]=L);let R,z;t[53]===p?(R=t[54],z=t[55]):(R=(0,X.jsx)(Ct,{editor:p,className:`h-full`}),z=p&&(0,X.jsx)(Xe,{store:kt(p).store}),t[53]=p,t[54]=R,t[55]=z);let B;return t[56]!==I||t[57]!==L||t[58]!==R||t[59]!==z?(B=(0,X.jsxs)(`div`,{ref:o,className:`tiptap-editor h-full`,"data-agent-flash-state":`idle`,"data-agent-flash-count":`0`,"data-agent-flash-position":`append`,"data-agent-flash-agent-id":``,children:[I,L,R,z]}),t[56]=I,t[57]=L,t[58]=R,t[59]=z,t[60]=B):B=t[60],B};function rx(){let e=new fn({extensions:Xn});return{mdManager:e,text:dr({mdManager:e}),html:lr({mdManager:e}),paste:sr({mdManager:e})}}function ix(){return st(null)}function ax(){return $e()}function ox(e){let t=(0,Q.c)(2),{docName:n,provider:r,children:i}=e;(0,Z.use)(wt(n,r));let a;return t[0]===i?a=t[1]:(a=(0,X.jsx)(X.Fragment,{children:i}),t[0]=i,t[1]=a),a}var sx=(0,Z.createContext)(null),cx={didCatch:!1,error:null},lx=class extends Z.Component{constructor(e){super(e),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=cx}static getDerivedStateFromError(e){return{didCatch:!0,error:e}}resetErrorBoundary(...e){let{error:t}=this.state;t!==null&&(this.props.onReset?.({args:e,reason:`imperative-api`}),this.setState(cx))}componentDidCatch(e,t){this.props.onError?.(e,t)}componentDidUpdate(e,t){let{didCatch:n}=this.state,{resetKeys:r}=this.props;n&&t.error!==null&&ux(e.resetKeys,r)&&(this.props.onReset?.({next:r,prev:e.resetKeys,reason:`keys`}),this.setState(cx))}render(){let{children:e,fallbackRender:t,FallbackComponent:n,fallback:r}=this.props,{didCatch:i,error:a}=this.state,o=e;if(i){let e={error:a,resetErrorBoundary:this.resetErrorBoundary};if(typeof t==`function`)o=t(e);else if(n)o=(0,Z.createElement)(n,e);else if(r!==void 0)o=r;else throw a}return(0,Z.createElement)(sx.Provider,{value:{didCatch:i,error:a,resetErrorBoundary:this.resetErrorBoundary}},o)}};function ux(e=[],t=[]){return e.length!==t.length||e.some((e,n)=>!Object.is(e,t[n]))}var dx=`__back-nav__`;function fx(e){return e instanceof Ze||e instanceof mt||e instanceof Je||e instanceof at||e instanceof bt?e.docName:null}function px(e){return e instanceof Ze?{title:`Couldn't load document`,summary:`"${e.docName}" took too long. Check your connection.`}:e instanceof mt?{title:`Connection dropped`,summary:`Lost connection to "${e.docName}".`}:e instanceof Je?{title:`Document not found`,summary:`"${e.docName}" doesn't exist.`}:e instanceof at?{title:`Couldn't open document`,summary:`Something went wrong opening "${e.docName}".`}:e instanceof bt?{title:`Server can't open documents`,summary:`This project's running server doesn't support live editing. Restart Open Knowledge to fix.`}:{title:`Unknown error`,summary:e instanceof Error&&e.message?e.message:`An unexpected error occurred.`}}function mx(e){let t=(0,Q.c)(27),{error:n,resetErrorBoundary:r,activeDocName:i,previousDocName:a,onNavigateBack:o}=e,s;t[0]===n?s=t[1]:(s=px(n),t[0]=n,t[1]=s);let{title:c,summary:l}=s,u=!!a&&!!o,d=(0,Z.useRef)(null),f,p;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(f=()=>{d.current?.focus()},p=[],t[2]=f,t[3]=p):(f=t[2],p=t[3]),(0,Z.useEffect)(f,p);let m;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,X.jsx)(Ov,{size:80,variant:`sleeping`}),t[4]=m):m=t[4];let h;t[5]===c?h=t[6]:(h=(0,X.jsx)(`h2`,{id:`document-error-title`,className:`text-lg font-medium`,children:c}),t[5]=c,t[6]=h);let g;t[7]===l?g=t[8]:(g=(0,X.jsx)(`p`,{className:`max-w-sm text-sm text-muted-foreground`,children:l}),t[7]=l,t[8]=g);let _;t[9]!==h||t[10]!==g?(_=(0,X.jsxs)(`div`,{className:`flex flex-col items-center gap-1`,children:[h,g]}),t[9]=h,t[10]=g,t[11]=_):_=t[11];let v;t[12]===r?v=t[13]:(v=(0,X.jsx)(q,{ref:d,variant:`default`,onClick:r,children:`Try again`}),t[12]=r,t[13]=v);let y;t[14]!==i||t[15]!==u||t[16]!==n||t[17]!==o||t[18]!==a||t[19]!==r?(y=u?(0,X.jsx)(q,{variant:`ghost`,className:`font-mono uppercase`,onClick:()=>{!a||!o||(ct(fx(n)??i),o(a),r(dx))},children:`Go back`}):null,t[14]=i,t[15]=u,t[16]=n,t[17]=o,t[18]=a,t[19]=r,t[20]=y):y=t[20];let b;t[21]!==v||t[22]!==y?(b=(0,X.jsxs)(`div`,{className:`mt-1 flex gap-2`,children:[v,y]}),t[21]=v,t[22]=y,t[23]=b):b=t[23];let x;return t[24]!==b||t[25]!==_?(x=(0,X.jsxs)(`div`,{role:`alert`,"aria-labelledby":`document-error-title`,"data-slot":`document-error-boundary`,className:`flex h-full flex-col items-center justify-center gap-8 p-8 text-center`,children:[m,_,b]}),t[24]=b,t[25]=_,t[26]=x):x=t[26],x}function hx(e){let t=(0,Q.c)(17),{activeDocName:n,previousDocName:r,onNavigateBack:i,onRecycle:a,children:o}=e,s;t[0]!==n||t[1]!==i||t[2]!==r?(s=e=>(0,X.jsx)(mx,{...e,activeDocName:n,previousDocName:r,onNavigateBack:i}),t[0]=n,t[1]=i,t[2]=r,t[3]=s):s=t[3];let c;t[4]===n?c=t[5]:(c=[n],t[4]=n,t[5]=c);let l;t[6]!==n||t[7]!==a?(l=e=>{if(e.reason===`imperative-api`){if(Array.isArray(e.args)&&e.args[0]===dx){console.warn(`[DocumentErrorBoundary] back-nav reset (no recycle)`);return}a(n),console.warn(`[DocumentErrorBoundary] retry recycled ${n}`)}else console.warn(`[DocumentErrorBoundary] reset by key change (${e.prev?.[0]} → ${e.next?.[0]})`)},t[6]=n,t[7]=a,t[8]=l):l=t[8];let u;t[9]===n?u=t[10]:(u=e=>{console.warn(`[DocumentErrorBoundary] rendered fallback for ${n}: ${px(e).title}`)},t[9]=n,t[10]=u);let d;return t[11]!==o||t[12]!==s||t[13]!==c||t[14]!==l||t[15]!==u?(d=(0,X.jsx)(lx,{fallbackRender:s,resetKeys:c,onReset:l,onError:u,children:o}),t[11]=o,t[12]=s,t[13]=c,t[14]=l,t[15]=u,t[16]=d):d=t[16],d}function gx(e){let t=e.threshold??5e5;return e.ytextLength>t?{renderSource:e.isSourceMode||e.visitedSource,renderVisual:!e.isSourceMode||e.visitedVisual,isLarge:!0}:{renderSource:!0,renderVisual:!0,isLarge:!1}}function _x(){return n(()=>import(`./SourceEditor-OFesfBB2.js`),__vite__mapDeps([17,1,2,18,19,20,8,7,4,14,10,15,21,12]),import.meta.url)}var vx=(0,Z.lazy)(async()=>({default:(await _x()).SourceEditor}));function yx(e,t,n){if(n<=0)return[];let r=e.filter(e=>!tt(e.docName)),i=[...r].sort((e,t)=>t.lastAccessedAt-e.lastAccessedAt).slice(0,n);if(t===null||i.some(e=>e.docName===t))return i;let a=r.find(e=>e.docName===t);return a?[...i.slice(0,n-1),a]:i}function bx(e){let t=(0,Q.c)(2),n;return t[0]===e?n=t[1]:(n=(0,X.jsx)(ot,{name:`activity-pool`,children:(0,X.jsx)(xx,{...e})}),t[0]=e,t[1]=n),n}function xx(e){let t=(0,Q.c)(11),{activeDocName:n,isSourceMode:r,editorPlaceholder:i,previousDocName:a,onNavigateBack:o,onRecycle:s}=e,{poolEntries:c}=ft(),{pages:l,loading:u}=Yn(),d=yx(c,n,3),f=(0,Z.useRef)(``),p=d.map(Sx).join(`,`);(0,Z.useLayoutEffect)(()=>{if(f.current===p)return;let e=f.current?f.current.split(`,`):[],t=p?p.split(`,`):[];Ye(`ok/activity/mount-list-change`,{active:n,mounted:t,evicted:e.filter(e=>!t.includes(e))}),f.current=p,He(t)},[p,n]);let m;t[0]!==n||t[1]!==i||t[2]!==r||t[3]!==u||t[4]!==o||t[5]!==s||t[6]!==l||t[7]!==a?(m=e=>(0,X.jsx)(Tx,{entry:e,isActive:e.docName===n,isSourceMode:r,editorPlaceholder:i,isNewDoc:!u&&!l.has(e.docName),previousDocName:a,onNavigateBack:o,onRecycle:s},e.docName),t[0]=n,t[1]=i,t[2]=r,t[3]=u,t[4]=o,t[5]=s,t[6]=l,t[7]=a,t[8]=m):m=t[8];let h=d.map(m),g;return t[9]===h?g=t[10]:(g=(0,X.jsx)(X.Fragment,{children:h}),t[9]=h,t[10]=g),g}function Sx(e){return e.docName}function Cx(e){let t=(0,Q.c)(8),{isActive:n,children:r}=e,i=(0,Z.useRef)(null),a=(0,Z.useRef)(0),o,s;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=()=>{let e=i.current;if(!e)return;let t=()=>{e.scrollTop>0&&(a.current=e.scrollTop)};return e.addEventListener(`scroll`,t,{passive:!0}),()=>e.removeEventListener(`scroll`,t)},s=[],t[0]=o,t[1]=s):(o=t[0],s=t[1]),(0,Z.useEffect)(o,s);let c,l;t[2]===n?(c=t[3],l=t[4]):(c=()=>{if(!n)return;let e=i.current;if(!e)return;let t=a.current;if(t===0||(e.scrollTop=t,e.scrollTop===t))return;let r=!1,o=()=>{r||(r=!0,s.disconnect(),clearTimeout(c))},s=new ResizeObserver(()=>{r||!e||e.scrollHeight>t&&(e.scrollTop=t,e.scrollTop===t&&o())});s.observe(e);let c=setTimeout(o,500);return o},l=[n],t[2]=n,t[3]=c,t[4]=l),(0,Z.useLayoutEffect)(c,l);let u;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(u={overflowAnchor:`auto`},t[5]=u):u=t[5];let d;return t[6]===r?d=t[7]:(d=(0,X.jsx)(`div`,{ref:i,className:`subtle-scrollbar h-full overflow-y-auto`,style:u,children:r}),t[6]=r,t[7]=d),d}function wx(e){let t=(0,Q.c)(12),{entry:n,isActive:r,isSourceMode:i,editorPlaceholder:a}=e,o=r&&i,[s,c]=(0,Z.useState)(o),l,u;if(t[0]===o?(l=t[1],u=t[2]):(l=()=>{o&&c(!0)},u=[o],t[0]=o,t[1]=l,t[2]=u),(0,Z.useEffect)(l,u),!s&&!o)return null;let d;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,X.jsx)(iv,{}),t[3]=d):d=t[3];let f=n.docName,p;t[4]===n.provider.document?p=t[5]:(p=n.provider.document.getText(`source`),t[4]=n.provider.document,t[5]=p);let m;return t[6]!==a||t[7]!==n.docName||t[8]!==n.provider||t[9]!==o||t[10]!==p?(m=(0,X.jsx)(Z.Suspense,{fallback:d,children:(0,X.jsx)(vx,{docName:f,ytext:p,provider:n.provider,placeholder:a,isSourceModeActive:o})}),t[6]=a,t[7]=n.docName,t[8]=n.provider,t[9]=o,t[10]=p,t[11]=m):m=t[11],m}function Tx(e){let t=(0,Q.c)(48),{entry:n,isActive:r,isSourceMode:i,editorPlaceholder:a,isNewDoc:o,previousDocName:s,onNavigateBack:c,onRecycle:l}=e,u=n.provider.document.getText(`source`).length,[d,f]=(0,Z.useState)(i),[p,m]=(0,Z.useState)(!i),h,g;t[0]!==i||t[1]!==d||t[2]!==p?(h=()=>{i&&!d?f(!0):!i&&!p&&m(!0)},g=[i,d,p],t[0]=i,t[1]=d,t[2]=p,t[3]=h,t[4]=g):(h=t[3],g=t[4]),(0,Z.useEffect)(h,g);let _=gx({ytextLength:u,isSourceMode:i,visitedSource:d,visitedVisual:p}),v=(0,Z.useRef)(``),y=`${_.isLarge}-${_.renderSource}-${_.renderVisual}`,b,x;t[5]!==n.docName||t[6]!==_.isLarge||t[7]!==_.renderSource||t[8]!==_.renderVisual||t[9]!==y||t[10]!==i||t[11]!==u?(b=()=>{v.current!==y&&(v.current=y,_.isLarge&&Ye(`ok/activity/defer-mount`,{docName:n.docName,ytextLength:u,isSourceMode:i,renderSource:_.renderSource,renderVisual:_.renderVisual}))},x=[y,_.isLarge,_.renderSource,_.renderVisual,n.docName,u,i],t[5]=n.docName,t[6]=_.isLarge,t[7]=_.renderSource,t[8]=_.renderVisual,t[9]=y,t[10]=i,t[11]=u,t[12]=b,t[13]=x):(b=t[12],x=t[13]),(0,Z.useEffect)(b,x);let S=r?`visible`:`hidden`,C=`editor:${n.docName}`,w;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,X.jsx)(iv,{}),t[14]=w):w=t[14];let T;t[15]!==a||t[16]!==n||t[17]!==_.renderSource||t[18]!==r||t[19]!==i?(T=_.renderSource?(0,X.jsx)(`div`,{className:i?`h-full`:`ok-mode-hidden h-full`,children:(0,X.jsx)(wx,{entry:n,isActive:r,isSourceMode:i,editorPlaceholder:a})}):null,t[15]=a,t[16]=n,t[17]=_.renderSource,t[18]=r,t[19]=i,t[20]=T):T=t[20];let E;t[21]!==a||t[22]!==n.docName||t[23]!==n.provider||t[24]!==_.renderVisual||t[25]!==o||t[26]!==i?(E=_.renderVisual?(0,X.jsx)(`div`,{className:i?`ok-mode-hidden h-full`:`h-full`,children:(0,X.jsx)(nx,{provider:n.provider,placeholder:a,isSourceMode:i},`${n.docName}-${String(o)}`)}):null,t[21]=a,t[22]=n.docName,t[23]=n.provider,t[24]=_.renderVisual,t[25]=o,t[26]=i,t[27]=E):E=t[27];let D;t[28]!==T||t[29]!==E?(D=(0,X.jsxs)(`div`,{className:`relative h-full`,children:[T,E]}),t[28]=T,t[29]=E,t[30]=D):D=t[30];let O;t[31]!==n.docName||t[32]!==n.provider||t[33]!==D?(O=(0,X.jsx)(Z.Suspense,{fallback:w,children:(0,X.jsx)(ox,{docName:n.docName,provider:n.provider,children:D})}),t[31]=n.docName,t[32]=n.provider,t[33]=D,t[34]=O):O=t[34];let k;t[35]!==n.docName||t[36]!==c||t[37]!==l||t[38]!==s||t[39]!==O?(k=(0,X.jsx)(hx,{activeDocName:n.docName,previousDocName:s,onNavigateBack:c,onRecycle:l,children:O}),t[35]=n.docName,t[36]=c,t[37]=l,t[38]=s,t[39]=O,t[40]=k):k=t[40];let A;t[41]!==r||t[42]!==k?(A=(0,X.jsx)(Cx,{isActive:r,children:k}),t[41]=r,t[42]=k,t[43]=A):A=t[43];let j;return t[44]!==A||t[45]!==S||t[46]!==C?(j=(0,X.jsx)(Z.Activity,{mode:S,name:C,children:A}),t[44]=A,t[45]=S,t[46]=C,t[47]=j):j=t[47],j}function Ex(e){let t=(0,Q.c)(26),{stats:n}=e,r;t[0]===n.words?r=t[1]:(r=n.words.toLocaleString(),t[0]=n.words,t[1]=r);let i;t[2]===r?i=t[3]:(i=(0,X.jsx)(`span`,{className:`tabular-nums`,children:r}),t[2]=r,t[3]=i);let a=n.words===1?`word`:`words`,o;t[4]!==i||t[5]!==a?(o=(0,X.jsxs)(`span`,{children:[i,` `,a]}),t[4]=i,t[5]=a,t[6]=o):o=t[6];let s;t[7]===n.chars?s=t[8]:(s=n.chars.toLocaleString(),t[7]=n.chars,t[8]=s);let c;t[9]===s?c=t[10]:(c=(0,X.jsx)(`span`,{className:`tabular-nums`,children:s}),t[9]=s,t[10]=c);let l=n.chars===1?`char`:`chars`,u;t[11]!==c||t[12]!==l?(u=(0,X.jsxs)(`span`,{children:[c,` `,l]}),t[11]=c,t[12]=l,t[13]=u):u=t[13];let d=n.tokens>0?`~`:``,f;t[14]===n.tokens?f=t[15]:(f=n.tokens.toLocaleString(),t[14]=n.tokens,t[15]=f);let p;t[16]===f?p=t[17]:(p=(0,X.jsx)(`span`,{className:`tabular-nums`,children:f}),t[16]=f,t[17]=p);let m=n.tokens===1?`token`:`tokens`,h;t[18]!==p||t[19]!==m||t[20]!==d?(h=(0,X.jsxs)(`span`,{children:[d,p,` `,m]}),t[18]=p,t[19]=m,t[20]=d,t[21]=h):h=t[21];let g;return t[22]!==h||t[23]!==o||t[24]!==u?(g=(0,X.jsxs)(`section`,{"aria-label":`Document statistics`,className:`flex h-6 shrink-0 items-center justify-end gap-3 px-3 text-2xs text-muted-foreground`,children:[o,u,h]}),t[22]=h,t[23]=o,t[24]=u,t[25]=g):g=t[25],g}function Dx(e){let t=(0,Q.c)(2),n;return t[0]===e?n=t[1]:(n=(0,X.jsx)(ot,{name:`editor-area`,children:(0,X.jsx)(Ox,{...e})}),t[0]=e,t[1]=n),n}function Ox(e){let t=(0,Q.c)(89),{editorMode:n,diffLayout:r,activeTab:i,onActiveTabChange:a}=e,{activeDocName:o,activeProvider:s,activeTarget:c,recycleDocument:l,docPanelMode:u,docPanelExpandSignal:d}=ft(),{openDocumentTransition:f}=vt(),p=eb(s,o),m=(0,Z.useDeferredValue)(o),h=c?.kind===`missing`,g=!!o&&c?.kind!==`folder`,_=h?`Start writing to create this page…`:void 0,v=tv(),[y,b]=(0,Z.useState)(!1),{layout:x,autoCollapse:S}=Uy(),C=x===`sheet`,[w,T]=(0,Z.useState)(!1),E=(0,Z.useRef)(!1),D,O;t[0]!==S||t[1]!==x||t[2]!==v?(D=()=>{x===`panel`&&(S?(E.current=!1,v.current?.collapse()):E.current||v.current?.expand())},O=[S,x,v],t[0]=S,t[1]=x,t[2]=v,t[3]=D,t[4]=O):(D=t[3],O=t[4]),(0,Z.useEffect)(D,O);let k,A;t[5]!==d||t[6]!==C||t[7]!==v?(k=()=>{d!==0&&(C?T(!0):(E.current=!1,v.current?.expand()))},A=[d,C,v],t[5]=d,t[6]=C,t[7]=v,t[8]=k,t[9]=A):(k=t[8],A=t[9]),(0,Z.useEffect)(k,A);let j=(0,Z.useRef)(null),[M,N]=(0,Z.useState)(null),P,F;if(t[10]===o?(P=t[11],F=t[12]):(P=()=>{if(o&&o!==j.current){let e=j.current;j.current=o,N(e)}},F=[o],t[10]=o,t[11]=P,t[12]=F),(0,Z.useEffect)(P,F),c?.kind===`folder`){let e;return t[13]===c.folderPath?e=t[14]:(e=(0,X.jsx)(Ny,{folderPath:c.folderPath}),t[13]=c.folderPath,t[14]=e),e}if(!s||!o){if((typeof window<`u`?tr(window.location.hash):null)!==null){let e;return t[15]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,X.jsx)(iv,{}),t[15]=e):e=t[15],e}let e;return t[16]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,X.jsx)(ty,{}),t[16]=e):e=t[16],e}let I=n===`source`,L=C?!w:y,R;t[17]!==y||t[18]!==C||t[19]!==v?(R=()=>{C?T(kx):y?(E.current=!1,v.current?.expand()):(E.current=!0,v.current?.collapse())},t[17]=y,t[18]=C,t[19]=v,t[20]=R):R=t[20];let z=L?`Show document panel`:`Hide document panel`,B;t[21]===L?B=t[22]:(B=L?(0,X.jsx)(Yi,{className:`size-4`}):(0,X.jsx)(Ji,{className:`size-4`}),t[21]=L,t[22]=B);let V;t[23]!==R||t[24]!==z||t[25]!==B?(V=(0,X.jsx)(en,{asChild:!0,children:(0,X.jsx)(q,{variant:`ghost`,size:`icon`,onClick:R,"aria-label":z,className:`text-muted-foreground`,children:B})}),t[23]=R,t[24]=z,t[25]=B,t[26]=V):V=t[26];let H=L?`Show panel`:`Hide panel`,U;t[27]===H?U=t[28]:(U=(0,X.jsx)(nn,{side:`left`,children:H}),t[27]=H,t[28]=U);let ee;t[29]!==V||t[30]!==U?(ee=(0,X.jsx)(`div`,{className:`absolute top-2 right-2 z-10`,children:(0,X.jsxs)(sn,{children:[V,U]})}),t[29]=V,t[30]=U,t[31]=ee):ee=t[31];let W=ee,te=m??o,G=M??void 0,ne;t[32]===f?ne=t[33]:(ne=e=>{let t=zn(e);window.location.hash===t?f(e):window.location.hash=t},t[32]=f,t[33]=ne);let K;t[34]!==_||t[35]!==I||t[36]!==l||t[37]!==te||t[38]!==G||t[39]!==ne?(K=(0,X.jsx)(bx,{activeDocName:te,isSourceMode:I,editorPlaceholder:_,previousDocName:G,onNavigateBack:ne,onRecycle:l}),t[34]=_,t[35]=I,t[36]=l,t[37]=te,t[38]=G,t[39]=ne,t[40]=K):K=t[40];let re;t[41]!==o||t[42]!==m?(re=o&&o!==m?(0,X.jsx)(`div`,{className:`absolute inset-0 z-10 bg-background`,children:(0,X.jsx)(iv,{})}):null,t[41]=o,t[42]=m,t[43]=re):re=t[43];let ie;t[44]!==K||t[45]!==re?(ie=(0,X.jsxs)(`div`,{className:`relative h-full`,children:[K,re]}),t[44]=K,t[45]=re,t[46]=ie):ie=t[46];let J;t[47]!==ie||t[48]!==W?(J=(0,X.jsxs)(`div`,{className:`relative min-h-0 flex-1`,children:[ie,W]}),t[47]=ie,t[48]=W,t[49]=J):J=t[49];let ae;t[50]!==g||t[51]!==p?(ae=g&&(0,X.jsx)(Ex,{stats:p}),t[50]=g,t[51]=p,t[52]=ae):ae=t[52];let Y;t[53]!==J||t[54]!==ae?(Y=(0,X.jsxs)(`div`,{className:`relative flex h-full flex-col`,children:[J,ae]}),t[53]=J,t[54]=ae,t[55]=Y):Y=t[55];let oe=Y;if(C){let e;t[56]===oe?e=t[57]:(e=(0,X.jsx)(`div`,{className:`min-w-0 flex-1`,children:oe}),t[56]=oe,t[57]=e);let n;t[58]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,X.jsx)(Rm,{className:`sr-only`,children:(0,X.jsx)(zm,{children:`Document panel`})}),t[58]=n):n=t[58];let s;t[59]!==o||t[60]!==i||t[61]!==r||t[62]!==u||t[63]!==I||t[64]!==a?(s=(0,X.jsxs)(Lm,{side:`right`,className:`flex w-80 sm:w-96 flex-col gap-0 p-0`,children:[n,(0,X.jsx)(cg,{docName:o,isSourceMode:I,activeTab:i,onActiveTabChange:a,diffLayout:r,mode:u})]}),t[59]=o,t[60]=i,t[61]=r,t[62]=u,t[63]=I,t[64]=a,t[65]=s):s=t[65];let c;t[66]!==w||t[67]!==s?(c=(0,X.jsx)(Pm,{open:w,onOpenChange:T,children:s}),t[66]=w,t[67]=s,t[68]=c):c=t[68];let l;return t[69]!==e||t[70]!==c?(l=(0,X.jsxs)(`div`,{className:`flex min-h-0 flex-1`,children:[e,c]}),t[69]=e,t[70]=c,t[71]=l):l=t[71],l}let se;t[72]===oe?se=t[73]:(se=(0,X.jsx)(zy,{minSize:`30%`,defaultSize:`75%`,children:oe}),t[72]=oe,t[73]=se);let ce;t[74]===Symbol.for(`react.memo_cache_sentinel`)?(ce=(0,X.jsx)(By,{withHandle:!0}),t[74]=ce):ce=t[74];let le;t[75]===Symbol.for(`react.memo_cache_sentinel`)?(le=e=>b(e.asPercentage===0),t[75]=le):le=t[75];let ue;t[76]!==o||t[77]!==i||t[78]!==r||t[79]!==u||t[80]!==I||t[81]!==a?(ue=(0,X.jsx)(cg,{docName:o,isSourceMode:I,activeTab:i,onActiveTabChange:a,diffLayout:r,mode:u}),t[76]=o,t[77]=i,t[78]=r,t[79]=u,t[80]=I,t[81]=a,t[82]=ue):ue=t[82];let de;t[83]!==v||t[84]!==ue?(de=(0,X.jsx)(zy,{panelRef:v,defaultSize:`25%`,minSize:`300px`,maxSize:`40%`,collapsible:!0,collapsedSize:0,onResize:le,className:`flex flex-col bg-muted/20`,children:ue}),t[83]=v,t[84]=ue,t[85]=de):de=t[85];let fe;return t[86]!==se||t[87]!==de?(fe=(0,X.jsx)(`div`,{className:`flex min-h-0 flex-1`,children:(0,X.jsxs)(Ry,{orientation:`horizontal`,children:[se,ce,de]})}),t[86]=se,t[87]=de,t[88]=fe):fe=t[88],fe}function kx(e){return!e}function Ax(e,t){let n=t.trim();return e===`file`?n.replace(/\.md$/i,``):n}function jx(e){return![``,`.`,`..`].includes(e)&&!e.includes(`/`)&&!e.includes(`\\`)&&!e.includes(`\0`)}function Mx(e,t){let n=Ax(e.kind,t),r=e.path.split(`/`);return r[r.length-1]=n,r.join(`/`)}function Nx(e,t){if(t.length===0)return e;let n=new Map(t.map(e=>[e.fromDocName,e.toDocName]));return e.map(e=>({...e,docName:n.get(e.docName)??e.docName}))}function Px(e,t){if(t.length===0)return e;let n=new Set(t);return e.filter(e=>!n.has(e.docName))}function Fx(e,t){return e?t.find(t=>t.fromDocName===e)?.toDocName??e:null}var Ix=1280;function Lx(){let e=(0,Q.c)(2),[t,n]=(0,Z.useState)(Rx),r,i;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>{let e=window.matchMedia(`(max-width: ${Ix-1}px)`),t=()=>{n(window.innerWidth<Ix)};return e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t)},i=[],e[0]=r,e[1]=i):(r=e[0],i=e[1]),(0,Z.useEffect)(r,i),t}function Rx(){return window.innerWidth<Ix}function zx(e){let t=e.endsWith(`rem`)?`rem`:`px`;return{value:Number.parseFloat(e),unit:t}}function Bx(e){let{value:t,unit:n}=zx(e);return n===`rem`?t*16:t}function Vx(e,t){return`${t===`rem`?e.toFixed(1):Math.round(e)}${t}`}var Hx=3600*24*7;function Ux(e){let t=(0,Q.c)(28),{direction:n,currentWidth:r,onResize:i,onToggle:a,isCollapsed:o,minResizeWidth:s,maxResizeWidth:c,enableToggle:l,enableAutoCollapse:u,autoCollapseThreshold:d,expandThreshold:f,enableDrag:p,setIsDraggingRail:m,widthCookieName:h,widthCookieMaxAge:g,isNested:_}=e,v=n===void 0?`right`:n,y=o===void 0?!1:o,b=s===void 0?`14rem`:s,x=c===void 0?`24rem`:c,S=l===void 0?!0:l,C=u===void 0?!0:u,w=d===void 0?1.5:d,T=f===void 0?.2:f,E=p===void 0?!0:p,D=m===void 0?Wx:m,O=g===void 0?Hx:g,k=_===void 0?!1:_,A=(0,Z.useRef)(null),j=(0,Z.useRef)(0),M=(0,Z.useRef)(0),N=(0,Z.useRef)(!1),P=(0,Z.useRef)(!1),F=(0,Z.useRef)(null),I=(0,Z.useRef)(0),L=(0,Z.useRef)(!1),R=(0,Z.useRef)(0),z=(0,Z.useRef)(0),B=(0,Z.useRef)(null),V=(0,Z.useRef)(r),H=(0,Z.useRef)(y),U,ee;t[0]===r?(U=t[1],ee=t[2]):(U=()=>{V.current=r},ee=[r],t[0]=r,t[1]=U,t[2]=ee),(0,Z.useEffect)(U,ee);let W,te;t[3]===y?(W=t[4],te=t[5]):(W=()=>{H.current=y},te=[y],t[3]=y,t[4]=W,t[5]=te),(0,Z.useEffect)(W,te);let G=Bx(b),ne;t[6]===x?ne=t[7]:(ne=Bx(x),t[6]=x,t[7]=ne);let K=ne,re;t[8]!==E||t[9]!==k?(re=function(e){P.current=!0,E&&(j.current=H.current?0:Bx(V.current),M.current=e.clientX,I.current=e.clientX,F.current=null,L.current=!1,R.current=0,z.current=0,B.current=k&&A.current?A.current.getBoundingClientRect():null,e.preventDefault())},t[8]=E,t[9]=k,t[10]=re):re=t[10];let ie=re,q,J;t[11]!==w||t[12]!==v||t[13]!==C||t[14]!==S||t[15]!==T||t[16]!==k||t[17]!==K||t[18]!==G||t[19]!==i||t[20]!==a||t[21]!==D||t[22]!==O||t[23]!==h?(q=()=>{let e=function(e){h&&(document.cookie=`${h}=${e}; path=/; max-age=${O}`)},t=function(e,t){return v===`left`?e<t:e>t},n=function(e,t,n,r){if(k&&r){let r=e.clientX-t;return v===`left`?n-r:n+r}return v===`left`?window.innerWidth-e.clientX:e.clientX},r=function(r){if(!P.current)return;let o=Math.abs(r.clientX-M.current);if(!N.current&&o>5&&(N.current=!0,D(!0)),N.current){let{unit:o}=zx(V.current),s=B.current;k&&A.current&&(s=A.current.getBoundingClientRect());let c=t(r.clientX,I.current)?`expand`:`collapse`;F.current!==c&&(F.current=c),z.current=Math.abs(r.clientX-I.current);let l=Date.now();if(L.current&&l-R.current>200&&(L.current=!1),!L.current){if(C&&a&&!H.current){let e=n(r,M.current,j.current,s),t=!1;if(w<=1)t=e<=G*w;else if(e<=G){let n=G*(w-1);t=G-e>=n}if(c===`collapse`&&t){a(),I.current=r.clientX,L.current=!0,R.current=l;return}}if(a&&H.current&&c===`expand`&&z.current>G*T){a();let t=n(r,M.current,j.current,s),c=Math.max(G,Math.min(K,t)),u=Vx(o===`rem`?c/16:c,o);i(u),e(u),I.current=r.clientX,L.current=!0,R.current=l;return}}if(H.current)return;let u=n(r,M.current,j.current,s),d=Math.max(G,Math.min(K,u)),f=Vx(o===`rem`?d/16:d,o);i(f),e(f)}},o=function(){P.current&&(!N.current&&a&&S&&a(),N.current=!1,P.current=!1,F.current=null,I.current=0,L.current=!1,R.current=0,z.current=0,B.current=null,D(!1))};return document.addEventListener(`mousemove`,r),document.addEventListener(`mouseup`,o),()=>{document.removeEventListener(`mousemove`,r),document.removeEventListener(`mouseup`,o)}},J=[i,a,D,G,K,k,C,w,T,S,h,O,v],t[11]=w,t[12]=v,t[13]=C,t[14]=S,t[15]=T,t[16]=k,t[17]=K,t[18]=G,t[19]=i,t[20]=a,t[21]=D,t[22]=O,t[23]=h,t[24]=q,t[25]=J):(q=t[24],J=t[25]),(0,Z.useEffect)(q,J);let ae;return t[26]===ie?ae=t[27]:(ae={dragRef:A,isDragging:N,handleMouseDown:ie},t[26]=ie,t[27]=ae),ae}function Wx(){}var Gx=`sidebar_state`,Kx=3600*24*7,qx=`18rem`,Jx=`3rem`,Yx=`\\`,Xx=`app-file-sidebar`,Zx=`14rem`,Qx=`22rem`,$x=`sidebar_width`,eS=/^\d+(?:\.\d+)?(?:rem|px)$/,tS=Z.createContext(null);function nS(e){if(typeof document>`u`)return e;let t=document.cookie.split(`; `).find(e=>e.startsWith(`${$x}=`))?.split(`=`)[1];if(!t)return e;let n=decodeURIComponent(t);return eS.test(n)?n:e}function rS(){let e=Z.use(tS);if(!e)throw Error(`useSidebar must be used within a SidebarProvider.`);return e}function iS(e){let t=(0,Q.c)(55),n,r,i,a,o,s,c,l;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7],l=t[8]):({defaultOpen:c,open:i,onOpenChange:o,className:r,style:s,children:n,defaultWidth:l,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c,t[8]=l);let u=c===void 0?!0:c,d=l===void 0?qx:l,f=Lx(),p;t[9]===d?p=t[10]:(p=()=>nS(d),t[9]=d,t[10]=p);let[m,h]=Z.useState(p),[g,_]=Z.useState(!1),[v,y]=Z.useState(!1),[b,x]=Z.useState(!1),[S,C]=Z.useState(u),w=i??S,T;t[11]!==w||t[12]!==o?(T=e=>{let t=typeof e==`function`?e(w):e;o?o(t):C(t),document.cookie=`${Gx}=${t}; path=/; max-age=${Kx}`},t[11]=w,t[12]=o,t[13]=T):T=t[13];let E=T,D;t[14]!==f||t[15]!==E?(D=function(){return f?_(oS):E(aS)},t[14]=f,t[15]=E,t[16]=D):D=t[16];let O=D,k;t[17]!==f||t[18]!==g?(k=function(){!f||!g||window.matchMedia(`(prefers-reduced-motion: reduce)`).matches||x(!0)},t[17]=f,t[18]=g,t[19]=k):k=t[19];let A=k,j,M;t[20]===O?(j=t[21],M=t[22]):(j=()=>{let e=e=>{e.key===Yx&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),O())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},M=[O],t[20]=O,t[21]=j,t[22]=M),Z.useEffect(j,M);let N,P;t[23]!==f||t[24]!==g?(P=()=>{if(!f||!g)return;let e=e=>{e.key===`Escape`&&(document.querySelector(`[data-state="open"][role="dialog"], [data-state="open"][role="alertdialog"], [data-state="open"][role="menu"], [data-state="open"][role="listbox"], [data-radix-popper-content-wrapper] [data-state="open"]`)||_(!1))};return window.addEventListener(`keydown`,e,{capture:!0}),()=>window.removeEventListener(`keydown`,e,{capture:!0})},N=[f,g],t[23]=f,t[24]=g,t[25]=N,t[26]=P):(N=t[25],P=t[26]),Z.useEffect(P,N);let F=Z.useRef(f),I,L;t[27]!==f||t[28]!==w?(I=()=>{!F.current&&f&&_(w),F.current=f},L=[f,w],t[27]=f,t[28]=w,t[29]=I,t[30]=L):(I=t[29],L=t[30]),Z.useEffect(I,L);let R=f?g?`expanded`:`collapsed`:w?`expanded`:`collapsed`,z;t[31]!==v||t[32]!==f||t[33]!==A||t[34]!==w||t[35]!==g||t[36]!==E||t[37]!==b||t[38]!==R||t[39]!==O||t[40]!==m?(z={state:R,open:w,setOpen:E,isMobile:f,openMobile:g,setOpenMobile:_,toggleSidebar:O,width:m,setWidth:h,isDraggingRail:v,setIsDraggingRail:y,showPushPulse:b,setShowPushPulse:x,notifySidebarFileSelected:A},t[31]=v,t[32]=f,t[33]=A,t[34]=w,t[35]=g,t[36]=E,t[37]=b,t[38]=R,t[39]=O,t[40]=m,t[41]=z):z=t[41];let B;t[42]!==s||t[43]!==m?(B={"--sidebar-width":m,"--sidebar-width-icon":Jx,...s},t[42]=s,t[43]=m,t[44]=B):B=t[44];let V=B,H;t[45]===r?H=t[46]:(H=G(`group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar`,r),t[45]=r,t[46]=H);let U;t[47]!==n||t[48]!==a||t[49]!==V||t[50]!==H?(U=(0,X.jsx)(`div`,{"data-slot":`sidebar-wrapper`,style:V,className:H,...a,children:n}),t[47]=n,t[48]=a,t[49]=V,t[50]=H,t[51]=U):U=t[51];let ee;return t[52]!==z||t[53]!==U?(ee=(0,X.jsx)(tS.Provider,{value:z,children:U}),t[52]=z,t[53]=U,t[54]=ee):ee=t[54],ee}function aS(e){return!e}function oS(e){return!e}function sS(e){let t=(0,Q.c)(51),n,r,i,a,o,s;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6]):({side:a,variant:o,collapsible:s,className:r,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s);let c=a===void 0?`left`:a,l=o===void 0?`sidebar`:o,u=s===void 0?`offcanvas`:s,{isMobile:d,state:f,openMobile:p,isDraggingRail:m}=rS();if(u===`none`){let e;t[7]===r?e=t[8]:(e=G(`flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground`,r),t[7]=r,t[8]=e);let a;return t[9]!==n||t[10]!==i||t[11]!==e||t[12]!==l?(a=(0,X.jsx)(`div`,{"data-slot":`sidebar`,"data-variant":l,className:e,...i,children:n}),t[9]=n,t[10]=i,t[11]=e,t[12]=l,t[13]=a):a=t[13],a}if(d){let e=p?`expanded`:`collapsed`,a=l===`floating`||l===`inset`?`p-2`:``,o;t[14]!==r||t[15]!==a?(o=G(`fixed inset-y-0 z-30 flex h-svh w-(--sidebar-width)`,`transition-transform duration-200 ease-linear motion-reduce:transition-none`,`data-[side=left]:left-0 data-[side=right]:right-0`,`group-data-[state=collapsed]:data-[side=left]:-translate-x-full`,`group-data-[state=collapsed]:data-[side=right]:translate-x-full`,a,r),t[14]=r,t[15]=a,t[16]=o):o=t[16];let s;t[17]===n?s=t[18]:(s=(0,X.jsx)(`div`,{"data-sidebar":`sidebar`,"data-slot":`sidebar-inner`,className:`flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border`,children:n}),t[17]=n,t[18]=s);let u;t[19]!==i||t[20]!==c||t[21]!==o||t[22]!==s?(u=(0,X.jsx)(`nav`,{id:Xx,"aria-label":`File sidebar`,"data-slot":`sidebar-container`,"data-side":c,className:o,...i,children:s}),t[19]=i,t[20]=c,t[21]=o,t[22]=s,t[23]=u):u=t[23];let d;return t[24]!==e||t[25]!==c||t[26]!==u||t[27]!==l?(d=(0,X.jsx)(`div`,{className:`group peer text-sidebar-foreground`,"data-state":e,"data-variant":l,"data-side":c,"data-slot":`sidebar`,"data-mobile":`true`,children:u}),t[24]=e,t[25]=c,t[26]=u,t[27]=l,t[28]=d):d=t[28],d}let h=f===`collapsed`?u:``,g=l===`floating`||l===`inset`?`group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon)`,_;t[29]===g?_=t[30]:(_=G(`relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear`,`group-data-[collapsible=offcanvas]:w-0`,`group-data-[side=right]:rotate-180`,g,`group-data-[dragging=true]:duration-0! group-data-[dragging=true]_*:!duration-0`),t[29]=g,t[30]=_);let v;t[31]===_?v=t[32]:(v=(0,X.jsx)(`div`,{"data-slot":`sidebar-gap`,className:_}),t[31]=_,t[32]=v);let y=l===`floating`||l===`inset`?`p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l`,b;t[33]!==r||t[34]!==y?(b=G(`fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex`,y,`group-data-[dragging=true]:duration-0! group-data-[dragging=true]_*:!duration-0`,r),t[33]=r,t[34]=y,t[35]=b):b=t[35];let x;t[36]===n?x=t[37]:(x=(0,X.jsx)(`div`,{"data-sidebar":`sidebar`,"data-slot":`sidebar-inner`,className:`flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border`,children:n}),t[36]=n,t[37]=x);let S;t[38]!==i||t[39]!==c||t[40]!==x||t[41]!==b?(S=(0,X.jsx)(`div`,{"data-slot":`sidebar-container`,"data-side":c,className:b,...i,children:x}),t[38]=i,t[39]=c,t[40]=x,t[41]=b,t[42]=S):S=t[42];let C;return t[43]!==m||t[44]!==c||t[45]!==f||t[46]!==S||t[47]!==h||t[48]!==v||t[49]!==l?(C=(0,X.jsxs)(`div`,{className:`group peer hidden text-sidebar-foreground md:block`,"data-state":f,"data-collapsible":h,"data-variant":l,"data-side":c,"data-slot":`sidebar`,"data-dragging":m,children:[v,S]}),t[43]=m,t[44]=c,t[45]=f,t[46]=S,t[47]=h,t[48]=v,t[49]=l,t[50]=C):C=t[50],C}function cS(e){let t=(0,Q.c)(16),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,onClick:r,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let{toggleSidebar:a,state:o}=rS(),s=o===`expanded`,c;t[4]===n?c=t[5]:(c=G(n),t[4]=n,t[5]=c);let l;t[6]!==r||t[7]!==a?(l=e=>{r?.(e),a()},t[6]=r,t[7]=a,t[8]=l):l=t[8];let u,d;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,X.jsx)(qi,{}),d=(0,X.jsx)(`span`,{className:`sr-only`,children:`Toggle Sidebar`}),t[9]=u,t[10]=d):(u=t[9],d=t[10]);let f;return t[11]!==i||t[12]!==s||t[13]!==c||t[14]!==l?(f=(0,X.jsxs)(q,{"data-sidebar":`trigger`,"data-slot":`sidebar-trigger`,variant:`ghost`,size:`icon-sm`,"aria-expanded":s,"aria-controls":Xx,className:c,onClick:l,...i,children:[u,d]}),t[11]=i,t[12]=s,t[13]=c,t[14]=l,t[15]=f):f=t[15],f}function lS(e){let t=(0,Q.c)(22),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:n,enableDrag:a,onMouseDown:r,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=a===void 0?!0:a,{toggleSidebar:s,setWidth:c,state:l,width:u,setIsDraggingRail:d}=rS(),f=l===`collapsed`,p;t[5]!==o||t[6]!==d||t[7]!==c||t[8]!==f||t[9]!==s||t[10]!==u?(p={direction:`right`,enableDrag:o,onResize:c,onToggle:s,currentWidth:u,isCollapsed:f,minResizeWidth:Zx,maxResizeWidth:Qx,setIsDraggingRail:d,widthCookieName:$x,widthCookieMaxAge:Kx},t[5]=o,t[6]=d,t[7]=c,t[8]=f,t[9]=s,t[10]=u,t[11]=p):p=t[11];let{dragRef:m,handleMouseDown:h}=Ux(p),g;t[12]!==h||t[13]!==r?(g=e=>{r?.(e),e.defaultPrevented||h(e)},t[12]=h,t[13]=r,t[14]=g):g=t[14];let _;t[15]===n?_=t[16]:(_=G(`absolute inset-y-0 z-20 hidden w-4 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:start-1/2 after:w-[2px] hover:after:bg-sidebar-border sm:flex ltr:-translate-x-1/2 rtl:-translate-x-1/2`,`in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize`,`[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize`,`group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full hover:group-data-[collapsible=offcanvas]:bg-sidebar`,`[[data-side=left][data-collapsible=offcanvas]_&]:-right-2`,`[[data-side=right][data-collapsible=offcanvas]_&]:-left-2`,n),t[15]=n,t[16]=_);let v;return t[17]!==m||t[18]!==i||t[19]!==g||t[20]!==_?(v=(0,X.jsx)(`button`,{ref:m,"data-sidebar":`rail`,"data-slot":`sidebar-rail`,"aria-label":`Toggle Sidebar`,tabIndex:-1,onMouseDown:g,title:`Toggle Sidebar`,className:_,...i}),t[17]=m,t[18]=i,t[19]=g,t[20]=_,t[21]=v):v=t[21],v}function uS(e){let t=(0,Q.c)(21),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:n,onClick:i,onAnimationEnd:r,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let{isMobile:o,openMobile:s,setOpenMobile:c,showPushPulse:l,setShowPushPulse:u}=rS(),d;t[5]!==o||t[6]!==i||t[7]!==s||t[8]!==c?(d=e=>{i?.(e),!e.defaultPrevented&&(!o||!s||e.target?.closest(`[data-sidebar="trigger"]`)||c(!1))},t[5]=o,t[6]=i,t[7]=s,t[8]=c,t[9]=d):d=t[9];let f=d,p;t[10]!==r||t[11]!==u?(p=e=>{r?.(e),e.animationName===`sidebar-push-pulse`&&u(!1)},t[10]=r,t[11]=u,t[12]=p):p=t[12];let m=p,h=l?``:void 0,g;t[13]===n?g=t[14]:(g=G(`relative flex w-full flex-1 flex-col bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2`,`transition-transform duration-200 ease-linear motion-reduce:transition-none`,`peer-data-[mobile=true]:peer-data-[state=expanded]:translate-x-(--sidebar-width)`,n),t[13]=n,t[14]=g);let _;return t[15]!==m||t[16]!==f||t[17]!==a||t[18]!==h||t[19]!==g?(_=(0,X.jsx)(`main`,{"data-slot":`sidebar-inset`,"data-push-pulse":h,onClick:f,onAnimationEnd:m,className:g,...a}),t[15]=m,t[16]=f,t[17]=a,t[18]=h,t[19]=g,t[20]=_):_=t[20],_}function dS(e){let t=(0,Q.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=G(`flex flex-col gap-2 p-2`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,X.jsx)(`div`,{"data-slot":`sidebar-header`,"data-sidebar":`header`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function fS(e){let t=(0,Q.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=G(`flex flex-col gap-2 p-2`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,X.jsx)(`div`,{"data-slot":`sidebar-footer`,"data-sidebar":`footer`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function pS(e){let t=(0,Q.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=G(`no-scrollbar flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,X.jsx)(`div`,{"data-slot":`sidebar-content`,"data-sidebar":`content`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function mS(e){let t=(0,Q.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=G(`flex w-full min-w-0 flex-col gap-0`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,X.jsx)(`ul`,{"data-slot":`sidebar-menu`,"data-sidebar":`menu`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function hS(e){let t=(0,Q.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=G(`group/menu-item relative`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,X.jsx)(`li`,{"data-slot":`sidebar-menu-item`,"data-sidebar":`menu-item`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var gS=B(`peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-hover hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-hover active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-hover data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground data-active:hover:bg-sidebar-accent [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate`,{variants:{variant:{default:`hover:bg-sidebar-hover hover:text-sidebar-accent-foreground`,outline:`bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-hover hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]`},size:{default:`h-8 text-sm`,sm:`h-7 text-xs`,lg:`h-12 text-sm group-data-[collapsible=icon]:p-0!`}},defaultVariants:{variant:`default`,size:`default`}});function _S(e){let t=(0,Q.c)(28),n,r,i,a,o,s,c;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7]):({asChild:i,isActive:a,variant:o,size:s,tooltip:c,className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c);let l=i===void 0?!1:i,u=a===void 0?!1:a,d=o===void 0?`default`:o,f=s===void 0?`default`:s,p=l?ee:`button`,{isMobile:m,state:h}=rS(),g;t[8]!==n||t[9]!==f||t[10]!==d?(g=G(gS({variant:d,size:f}),n),t[8]=n,t[9]=f,t[10]=d,t[11]=g):g=t[11];let _;t[12]!==p||t[13]!==u||t[14]!==r||t[15]!==f||t[16]!==g?(_=(0,X.jsx)(p,{"data-slot":`sidebar-menu-button`,"data-sidebar":`menu-button`,"data-size":f,"data-active":u,className:g,...r}),t[12]=p,t[13]=u,t[14]=r,t[15]=f,t[16]=g,t[17]=_):_=t[17];let v=_;if(!c)return v;if(typeof c==`string`){let e;t[18]===c?e=t[19]:(e={children:c},t[18]=c,t[19]=e),c=e}let y;t[20]===v?y=t[21]:(y=(0,X.jsx)(en,{asChild:!0,children:v}),t[20]=v,t[21]=y);let b=h!==`collapsed`||m,x;t[22]!==b||t[23]!==c?(x=(0,X.jsx)(nn,{side:`right`,align:`center`,hidden:b,...c}),t[22]=b,t[23]=c,t[24]=x):x=t[24];let S;return t[25]!==y||t[26]!==x?(S=(0,X.jsxs)(sn,{children:[y,x]}),t[25]=y,t[26]=x,t[27]=S):S=t[27],S}function vS(e){let t=(0,Q.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,X.jsx)(Fc,{"data-slot":`popover`,...n}),t[2]=n,t[3]=r),r}function yS(e){let t=(0,Q.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,X.jsx)(Ic,{"data-slot":`popover-trigger`,...n}),t[2]=n,t[3]=r),r}function bS(e){let t=(0,Q.c)(12),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:n,align:i,sideOffset:a,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=i===void 0?`center`:i,s=a===void 0?4:a,c;t[5]===n?c=t[6]:(c=G(`z-50 w-72 rounded-lg border bg-popover p-4 text-popover-foreground shadow-md outline-hidden data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`,n),t[5]=n,t[6]=c);let l;return t[7]!==o||t[8]!==r||t[9]!==s||t[10]!==c?(l=(0,X.jsx)(Lc,{children:(0,X.jsx)(Rc,{"data-slot":`popover-content`,align:o,sideOffset:s,className:c,...r})}),t[7]=o,t[8]=r,t[9]=s,t[10]=c,t[11]=l):l=t[11],l}function xS(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(r.kind!==i.kind)return!1;if(r.kind===`human`&&i.kind===`human`){if(r.clientId!==i.clientId||r.mode!==i.mode||r.tabCount!==i.tabCount)return!1;let e=r.user,t=i.user;if(e.name!==t.name||e.color!==t.color||e.icon!==t.icon)return!1}else if(r.kind===`agent`&&i.kind===`agent`){if(r.agentId!==i.agentId)return!1;let e=r.presence,t=i.presence;if(e.displayName!==t.displayName||e.icon!==t.icon||e.color!==t.color||e.currentDoc!==t.currentDoc||e.mode!==t.mode)return!1}}return!0}function SS(e){let t=new Map;for(let n of e){let e=n.user.principalId;if(typeof e==`string`&&e.length>0){let r=t.get(e);r?r.push(n):t.set(e,[n])}}let n=new Map;for(let[e,r]of t){let t=r.reduce((e,t)=>Math.min(e,t.clientId),1/0);n.set(e,{repClientId:t,count:r.length})}let r=[];for(let t of e){let e=t.user.principalId;if(typeof e==`string`&&e.length>0){let i=n.get(e);i&&i.repClientId===t.clientId&&r.push({...t,tabCount:i.count})}else r.push({...t,tabCount:1})}return r}var CS=1e3,wS=!1;function TS(e,t,n){let r=(0,Q.c)(9),i;r[0]===Symbol.for(`react.memo_cache_sentinel`)?(i={current:[],crossDoc:[]},r[0]=i):i=r[0];let[a,o]=(0,Z.useState)(i),s;r[1]!==n||r[2]!==e?.awareness||r[3]!==t?.awareness?(s=()=>{let r=e?.awareness,i=t?.awareness,a;i==null?a=void 0:xe(i)?a=i:(a=void 0,wS||(wS=!0,console.warn(`[agent-presence] __system__ provider awareness missing getStates() — presence bar will render without agent peers`)));let s=()=>{let e=[];if(r)for(let[t,n]of r.getStates().entries()){let r=n;if(!r.user||typeof r.user!=`object`)continue;let i=r.user;i.type===`human`&&e.push({kind:`human`,clientId:t,user:i,mode:r.mode??`wysiwyg`,tabCount:1})}let t=SS(e),{current:i,crossDoc:s}=a?ge(a,n,Date.now()):{current:[],crossDoc:[]},c=ES,l=i.map(c),u=s.map(c),d=[...t,...l],f=u;o(e=>xS(e.current,d)&&xS(e.crossDoc,f)?e:{current:d,crossDoc:f})};s();let c=()=>s(),l=()=>s();r?.on(`change`,c),t?.awareness?.on(`change`,l);let u=setInterval(s,CS);return()=>{r?.off(`change`,c),t?.awareness?.off(`change`,l),clearInterval(u)}},r[1]=n,r[2]=e?.awareness,r[3]=t?.awareness,r[4]=s):s=r[4];let c;return r[5]!==n||r[6]!==e||r[7]!==t?(c=[e,t,n],r[5]=n,r[6]=e,r[7]=t,r[8]=c):c=r[8],(0,Z.useEffect)(s,c),a}function ES(e){let{agentId:t,entry:n}=e;return{kind:`agent`,agentId:t,presence:n}}function DS(e){let t=(0,Q.c)(3),[n,r]=(0,Z.useState)(`connecting`),i,a;return t[0]===e?(i=t[1],a=t[2]):(i=()=>{if(!e){r(`connecting`);return}let t=e.configuration.websocketProvider.status;e.isSynced?r(`synced`):r(t===`connected`?`connected`:t===`disconnected`?`disconnected`:`connecting`);let n=e=>{let{status:t}=e;r(t===`connected`?OS:t===`disconnected`?`disconnected`:`connecting`)},i=e=>{let{state:t}=e;r(t?`synced`:`connected`)},a=()=>r(`disconnected`);return e.on(`status`,n),e.on(`synced`,i),e.on(`disconnect`,a),()=>{e.off(`status`,n),e.off(`synced`,i),e.off(`disconnect`,a)}},a=[e],t[0]=e,t[1]=i,t[2]=a),(0,Z.useEffect)(i,a),n}function OS(e){return e===`synced`?`synced`:`connected`}var kS=`sync-status`;function AS(e,t){let n=(0,Q.c)(4),r=(0,Z.useRef)(!1),i=(0,Z.useRef)(!1),a=(0,Z.useRef)(t),o,s;n[0]!==t||n[1]!==e?(o=()=>{a.current!==t&&(a.current=t,r.current=!1,i.current=!1),t&&(e===`synced`&&(r.current=!0),e===`disconnected`&&r.current?(i.current=!0,Xt.warning(`Connection lost — keep this tab open, your edits will sync when reconnected`,{id:kS,duration:1/0})):i.current&&e===`synced`&&(i.current=!1,Xt.success(`Reconnected`,{id:kS,duration:3e3})))},s=[e,t],n[0]=t,n[1]=e,n[2]=o,n[3]=s):(o=n[2],s=n[3]),(0,Z.useEffect)(o,s)}var jS=4,MS=3,NS={Bird:ei,Cat:oi,Dog:xi,Fish:Ei,Mouse:ta,Rabbit:ea,Shrimp:oa,Snail:sa,Squirrel:ua,Turtle:ma};Object.freeze([...Object.keys(NS)]);function PS(e){if(typeof e.principalId==`string`&&e.principalId.length>0)return{kind:`initials`};let t=e.name.split(` `)[1];return t&&Object.hasOwn(NS,t)?{kind:`animal`,animal:t}:{kind:`initials`}}var FS={claude:`Claude`,cursor:`Cursor`,windsurf:`Windsurf`,openai:`Codex`,github:`Copilot`,cline:`Cline`,bot:`Agent`};function IS(e){let t=(0,Q.c)(20),{user:n,mode:r,tabCount:i}=e,a=PS(n),o=a.kind===`animal`?NS[a.animal]:void 0,s;t[0]===n.name?s=t[1]:(s=Pn(n.name),t[0]=n.name,t[1]=s);let c=s,l;t[2]===n.color?l=t[3]:(l=xn(n.color),t[2]=n.color,t[3]=l);let u=l,d=i>1?`${n.name} · ${i} tabs`:n.name,f=i>1?`${n.name}, ${i} concurrent tabs`:n.name,p;t[4]===n.color?p=t[5]:(p={backgroundColor:n.color},t[4]=n.color,t[5]=p);let m;t[6]!==o||t[7]!==u||t[8]!==c?(m=o?(0,X.jsx)(o,{size:18,color:u,strokeWidth:1.5}):(0,X.jsx)(`span`,{className:`font-mono text-2xs font-semibold leading-none`,style:{color:u},children:c}),t[6]=o,t[7]=u,t[8]=c,t[9]=m):m=t[9];let h;t[10]!==f||t[11]!==r||t[12]!==p||t[13]!==m?(h=(0,X.jsx)(en,{asChild:!0,children:(0,X.jsx)(`div`,{"data-presence-badge":`human`,"data-presence-mode":r,role:`img`,"aria-label":f,className:`inline-flex size-7 shrink-0 cursor-default items-center justify-center rounded-full ring-2 ring-background`,style:p,children:m})}),t[10]=f,t[11]=r,t[12]=p,t[13]=m,t[14]=h):h=t[14];let g;t[15]===d?g=t[16]:(g=(0,X.jsx)(nn,{children:d}),t[15]=d,t[16]=g);let _;return t[17]!==h||t[18]!==g?(_=(0,X.jsxs)(sn,{children:[h,g]}),t[17]=h,t[18]=g,t[19]=_):_=t[19],_}function LS(e){let t=FS[e.icon];return e.displayName||t||`Agent`}function RS(e){let t=(0,Q.c)(3),[n,r]=(0,Z.useState)(e===`writing`),i=(0,Z.useRef)(null),a,o;return t[0]===e?(a=t[1],o=t[2]):(a=()=>{if(e===`writing`){i.current!==null&&(clearTimeout(i.current),i.current=null),r(!0);return}return i.current!==null&&clearTimeout(i.current),i.current=setTimeout(()=>{i.current=null,r(!1)},600),()=>{i.current!==null&&(clearTimeout(i.current),i.current=null)}},o=[e],t[0]=e,t[1]=a,t[2]=o),(0,Z.useEffect)(a,o),n}function zS(e){let t=(0,Q.c)(36),{participant:n,crossDoc:r,scoped:i,onClickAgent:a}=e,{presence:o,agentId:s}=n,c;t[0]===o?c=t[1]:(c=LS(o),t[0]=o,t[1]=c);let l=c,u=RS(o.mode),d=!r&&u,f=i?`ring-primary ring-offset-2 ring-offset-background`:`ring-background`,p=d&&!i?`ring-primary/40 animate-pulse`:``,m;t[2]!==f||t[3]!==p?(m=[`inline-flex size-7 shrink-0 items-center justify-center rounded-full ring-2 cursor-pointer`,f,p].filter(Boolean),t[2]=f,t[3]=p,t[4]=m):m=t[4];let h=m.join(` `),g=r?`true`:void 0,_=i?`true`:void 0,v;t[5]!==o.mode||t[6]!==g||t[7]!==_?(v={"data-presence-badge":`agent`,"data-presence-mode":o.mode,"data-presence-crossdoc":g,"data-presence-scoped":_},t[5]=o.mode,t[6]=g,t[7]=_,t[8]=v):v=t[8];let y=v,b=r&&o.currentDoc?`Open activity panel for ${l}, editing ${o.currentDoc}`:`Open activity panel for ${l}`,x;t[9]===o.color?x=t[10]:(x={backgroundColor:o.color},t[9]=o.color,t[10]=x);let S;t[11]!==s||t[12]!==a?(S=()=>a(s),t[11]=s,t[12]=a,t[13]=S):S=t[13];let C;t[14]===o.icon?C=t[15]:(C=(0,X.jsx)(ye,{icon:o.icon,width:16,height:16,className:`text-white`}),t[14]=o.icon,t[15]=C);let w;t[16]!==b||t[17]!==y||t[18]!==h||t[19]!==C||t[20]!==x||t[21]!==S?(w=(0,X.jsx)(`button`,{type:`button`,...y,"aria-label":b,className:h,style:x,onClick:S,children:C}),t[16]=b,t[17]=y,t[18]=h,t[19]=C,t[20]=x,t[21]=S,t[22]=w):w=t[22];let T=w,E;t[23]===T?E=t[24]:(E=(0,X.jsx)(en,{asChild:!0,children:T}),t[23]=T,t[24]=E);let D;t[25]===l?D=t[26]:(D=(0,X.jsx)(`span`,{className:`font-medium`,children:l}),t[25]=l,t[26]=D);let O;t[27]!==r||t[28]!==o.currentDoc?(O=r&&o.currentDoc?(0,X.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[`editing [[`,o.currentDoc,`]]`]}):null,t[27]=r,t[28]=o.currentDoc,t[29]=O):O=t[29];let k;t[30]!==D||t[31]!==O?(k=(0,X.jsxs)(nn,{className:`flex flex-col gap-0.5`,children:[D,O]}),t[30]=D,t[31]=O,t[32]=k):k=t[32];let A;return t[33]!==E||t[34]!==k?(A=(0,X.jsxs)(sn,{children:[E,k]}),t[33]=E,t[34]=k,t[35]=A):A=t[35],A}function BS(e){let t=(0,Q.c)(18),{count:n,remainder:r,crossDoc:i,scopedAgentId:a,onClickAgent:o}=e,s=i?`true`:void 0,c=`${n} more ${i?`cross-doc `:``}${n===1?`participant`:`participants`}`,l;t[0]!==n||t[1]!==s||t[2]!==c?(l=(0,X.jsx)(yS,{asChild:!0,children:(0,X.jsxs)(`button`,{type:`button`,"data-slot":`presence-overflow`,"data-presence-crossdoc":s,className:`inline-flex size-7 shrink-0 cursor-pointer items-center justify-center rounded-full bg-muted font-medium text-muted-foreground text-xs ring-2 ring-background hover:bg-muted/80`,"aria-label":c,children:[`+`,n]})}),t[0]=n,t[1]=s,t[2]=c,t[3]=l):l=t[3];let u;if(t[4]!==i||t[5]!==o||t[6]!==r||t[7]!==a){let e;t[9]!==i||t[10]!==o||t[11]!==a?(e=e=>e.kind===`human`?(0,X.jsx)(IS,{user:e.user,mode:e.mode,tabCount:e.tabCount},e.clientId):(0,X.jsx)(zS,{participant:e,crossDoc:i,scoped:a===e.agentId,onClickAgent:o},e.agentId),t[9]=i,t[10]=o,t[11]=a,t[12]=e):e=t[12],u=r.map(e),t[4]=i,t[5]=o,t[6]=r,t[7]=a,t[8]=u}else u=t[8];let d;t[13]===u?d=t[14]:(d=(0,X.jsx)(bS,{align:`end`,className:`w-auto max-w-xs p-2`,children:(0,X.jsx)(`div`,{className:`flex flex-wrap items-center gap-1.5`,children:u})}),t[13]=u,t[14]=d);let f;return t[15]!==l||t[16]!==d?(f=(0,X.jsxs)(vS,{children:[l,d]}),t[15]=l,t[16]=d,t[17]=f):f=t[17],f}function VS(e,t,n,r){return e.kind===`human`?(0,X.jsx)(IS,{user:e.user,mode:e.mode,tabCount:e.tabCount},e.clientId):(0,X.jsx)(zS,{participant:e,crossDoc:n,scoped:r===e.agentId,onClickAgent:t},e.agentId)}function HS(){let e=(0,Q.c)(20),{activeProvider:t,activeDocName:n,systemProvider:r,openActivityPanel:i,docPanelMode:a,docPanelAgentId:o}=ft(),{current:s,crossDoc:c}=TS(t,r,n);AS(DS(t),n);let l;if(e[0]!==c||e[1]!==s||e[2]!==o||e[3]!==a||e[4]!==i){let t=s.slice(0,jS),n;e[6]===s?n=e[7]:(n=s.slice(jS),e[6]=s,e[7]=n);let r=n,u=c.slice(0,MS),d;e[8]===c?d=e[9]:(d=c.slice(MS),e[8]=c,e[9]=d);let f=d,p=i,m=a===`agent`?o:null,h;e[10]!==p||e[11]!==m?(h=e=>VS(e,p,!1,m),e[10]=p,e[11]=m,e[12]=h):h=e[12];let g=t.map(h),_;e[13]!==r||e[14]!==p||e[15]!==m?(_=r.length>0?(0,X.jsx)(BS,{count:r.length,remainder:r,crossDoc:!1,scopedAgentId:m,onClickAgent:p}):null,e[13]=r,e[14]=p,e[15]=m,e[16]=_):_=e[16];let v;e[17]!==g||e[18]!==_?(v=(0,X.jsxs)(`div`,{className:`flex items-center gap-1.5`,"data-presence-section":`current`,children:[g,_]}),e[17]=g,e[18]=_,e[19]=v):v=e[19],l=(0,X.jsxs)(`div`,{"data-slot":`presence-bar`,className:`flex items-center px-1 py-1.5`,children:[v,c.length>0?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`div`,{className:`mx-2 h-4 w-px bg-border`,"aria-hidden":!0,"data-slot":`presence-divider`}),(0,X.jsxs)(`div`,{className:`flex items-center gap-1.5 opacity-60 grayscale`,"data-presence-section":`crossdoc`,children:[u.map(e=>VS(e,p,!0,m)),f.length>0?(0,X.jsx)(BS,{count:f.length,remainder:f,crossDoc:!0,scopedAgentId:m,onClickAgent:p}):null]})]}):null]}),e[0]=c,e[1]=s,e[2]=o,e[3]=a,e[4]=i,e[5]=l}else l=e[5];return l}var US=`npx @inkeep/open-knowledge install-skill`,WS=`https://inkeep.github.io/open-knowledge/guides/install-claude-cowork`;function GS(){return typeof window<`u`&&typeof window.okDesktop?.skill==`object`}function KS(e){let t=(0,Q.c)(2),{children:n}=e,r;return t[0]===n?r=t[1]:(r=(0,X.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 font-mono text-[0.85em]`,children:n}),t[0]=n,t[1]=r),r}function qS(e){let t=(0,Q.c)(5),{children:n,className:r}=e,i;t[0]===r?i=t[1]:(i=G(`font-mono tracking-wide uppercase text-primary font-medium text-xs`,r),t[0]=r,t[1]=i);let a;return t[2]!==n||t[3]!==i?(a=(0,X.jsx)(`p`,{className:i,children:n}),t[2]=n,t[3]=i,t[4]=a):a=t[4],a}function JS(e){let t=(0,Q.c)(4),{n}=e,r;t[0]===n?r=t[1]:(r=n.toString().padStart(2,`0`),t[0]=n,t[1]=r);let i;return t[2]===r?i=t[3]:(i=(0,X.jsx)(`span`,{"aria-hidden":`true`,className:`flex h-5 w-5 shrink-0 items-center justify-center text-xs font-medium text-muted-foreground font-mono tabular-nums`,children:r}),t[2]=r,t[3]=i),i}function YS(){let e=(0,Q.c)(17),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,X.jsx)(qS,{children:`In the Claude Desktop App`}),e[0]=t):t=e[0];let n;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,X.jsx)(JS,{n:1}),e[1]=n):n=e[1];let r;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,X.jsx)(`strong`,{className:`font-medium`,children:`Customize`}),e[2]=r):r=e[2];let i;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,X.jsx)(Zr,{"aria-hidden":`true`,className:`inline h-3 w-3 text-muted-foreground`}),e[3]=i):i=e[3];let a;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,X.jsxs)(`li`,{className:`flex gap-3`,children:[n,(0,X.jsxs)(`span`,{children:[`Open `,r,` in the sidebar`,` `,i,` `,(0,X.jsx)(`strong`,{className:`font-medium`,children:`Skills`}),`.`]})]}),e[4]=a):a=e[4];let o;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,X.jsx)(JS,{n:2}),e[5]=o):o=e[5];let s;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,X.jsx)(`span`,{className:`inline-flex items-center justify-center font-medium border h-5 w-5 rounded-md text-xs`,children:`+`}),e[6]=s):s=e[6];let c;e[7]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,X.jsx)(Zr,{"aria-hidden":`true`,className:`inline h-3 w-3 text-muted-foreground`}),e[7]=c):c=e[7];let l;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,X.jsx)(`strong`,{className:`font-medium`,children:`Create skill`}),e[8]=l):l=e[8];let u;e[9]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,X.jsx)(Zr,{"aria-hidden":`true`,className:`inline h-3 w-3 text-muted-foreground`}),e[9]=u):u=e[9];let d;e[10]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,X.jsxs)(`li`,{className:`flex gap-3`,children:[o,(0,X.jsxs)(`span`,{children:[`Click`,` `,s,` `,c,` `,l,` `,u,` `,(0,X.jsx)(`strong`,{className:`font-medium`,children:`Upload skill`}),`.`]})]}),e[10]=d):d=e[10];let f;e[11]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,X.jsx)(JS,{n:3}),e[11]=f):f=e[11];let p;e[12]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,X.jsx)(KS,{children:`openknowledge.skill`}),e[12]=p):p=e[12];let m;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,X.jsxs)(`ol`,{className:`flex flex-col gap-4 text-sm`,children:[a,d,(0,X.jsxs)(`li`,{className:`flex gap-3`,children:[f,(0,X.jsxs)(`span`,{children:[`Pick `,p,` from your`,` `,(0,X.jsx)(`strong`,{className:`font-medium`,children:`Downloads`}),` folder. It enables automatically.`]})]})]}),e[13]=m):m=e[13];let h;e[14]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,X.jsx)(`strong`,{className:`font-medium`,children:`Skills`}),e[14]=h):h=e[14];let g;e[15]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,X.jsx)(Zr,{"aria-hidden":`true`,className:`inline h-3 w-3 text-muted-foreground`}),e[15]=g):g=e[15];let _;return e[16]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,X.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[t,m,(0,X.jsxs)(`p`,{className:`text-xs text-muted-foreground mt-4`,children:[`Don't see `,h,`? Enable`,` `,(0,X.jsxs)(`strong`,{className:`font-medium`,children:[`Settings`,` `,g,` `,`Capabilities`,` `,(0,X.jsx)(Zr,{"aria-hidden":`true`,className:`inline h-3 w-3 text-muted-foreground`}),` Code execution and file creation`]}),` `,`first.`]})]}),e[16]=_):_=e[16],_}function XS(e){let t=(0,Q.c)(61),{open:n,onOpenChange:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i={kind:`idle`},t[0]=i):i=t[0];let[a,o]=(0,Z.useState)(i),[s,c]=(0,Z.useState)(!1),l,u;t[1]===n?(l=t[2],u=t[3]):(l=()=>{n||(o({kind:`idle`}),c(!1))},u=[n],t[1]=n,t[2]=l,t[3]=u),(0,Z.useEffect)(l,u);let d;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(d=async function(){o({kind:`downloading`});let e=window.okDesktop?.skill;if(!e){o({kind:`error`,message:`Electron bridge unavailable. Refresh and try again.`});return}let t=await e.buildAndOpen();if(t.ok)o({kind:`handed-off`,path:t.path});else{let e=t.message??t.reason;Xt.error(`Install handoff failed: ${e}`),o({kind:`error`,message:t.reason===`open-failed`?`The Claude Desktop App didn't open the file. Is it installed? (${e})`:`${t.reason}: ${e}`})}},t[4]=d):d=t[4];let f=d,p;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(p=async function(){try{await navigator.clipboard.writeText(US),c(!0),setTimeout(()=>c(!1),2e3)}catch(e){let t=e;Xt.error(`Couldn't copy: ${t instanceof Error?t.message:String(t)}`)}},t[5]=p):p=t[5];let m=p,h;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(h=GS(),t[6]=h):h=t[6];let g=h,_;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,X.jsxs)(Ft,{className:`flex items-center gap-2`,children:[(0,X.jsx)(Si,{"aria-hidden":`true`,className:`h-4 w-4`}),`Install for Claude Chat & Cowork`]}),t[7]=_):_=t[7];let v;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,X.jsxs)(Kt,{children:[_,(0,X.jsxs)(Nt,{children:[`Adds the Open Knowledge skill to the`,` `,(0,X.jsx)(`strong`,{className:`font-medium text-foreground`,children:`Claude Desktop App`}),` so it's available in Chat and Cowork sessions.`]})]}),t[8]=v):v=t[8];let y;t[9]===a.kind?y=t[10]:(y=a.kind===`idle`&&g&&(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,X.jsx)(qS,{className:`text-muted-foreground`,children:`Automatic`}),(0,X.jsxs)(`p`,{className:`text-sm`,children:[`We'll build `,(0,X.jsx)(KS,{children:`openknowledge.skill`}),`, save it to`,` `,(0,X.jsx)(KS,{children:`~/Downloads`}),`, and open the Claude Desktop App for you.`]})]}),(0,X.jsx)(YS,{})]}),t[9]=a.kind,t[10]=y);let b;t[11]!==s||t[12]!==a.kind?(b=a.kind===`idle`&&!g&&(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,X.jsx)(qS,{children:`Run this in your terminal`}),(0,X.jsxs)(`div`,{className:`flex items-center gap-2 rounded-md border bg-muted/40 p-2`,children:[(0,X.jsx)(`code`,{className:`flex-1 font-mono text-xs`,children:US}),(0,X.jsx)(q,{variant:`ghost`,size:`sm`,onClick:m,"aria-label":`Copy command`,className:`h-7 gap-1`,children:s?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(Te,{"aria-hidden":`true`,className:`h-3 w-3`}),`Copied`]}):(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(_i,{"aria-hidden":`true`,className:`h-3 w-3`}),`Copy`]})})]}),(0,X.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Saves the file to `,(0,X.jsx)(KS,{children:`~/Downloads/openknowledge.skill`}),` and opens the Claude Desktop App. Requires Node.js or Bun on your PATH.`]})]}),(0,X.jsx)(YS,{})]}),t[11]=s,t[12]=a.kind,t[13]=b):b=t[13];let x;t[14]===a.kind?x=t[15]:(x=a.kind===`downloading`&&(0,X.jsxs)(`div`,{className:`flex items-center gap-2 text-sm`,children:[(0,X.jsx)(lt,{"aria-hidden":`true`,className:`h-4 w-4 animate-spin`}),`Building `,(0,X.jsx)(KS,{children:`openknowledge.skill`}),` and opening the Claude Desktop App…`]}),t[14]=a.kind,t[15]=x);let S;t[16]!==a.kind||t[17]!==a.path?(S=a.kind===`handed-off`&&g&&(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(`div`,{className:`flex items-start gap-2 rounded-md border border-primary/30 bg-primary/5 px-3 py-2`,children:[(0,X.jsx)(Te,{"aria-hidden":`true`,className:`mt-0.5 h-4 w-4 text-primary`}),(0,X.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[(0,X.jsx)(`span`,{className:`text-sm font-medium text-foreground`,children:`File saved & Claude Desktop App opened`}),(0,X.jsx)(`code`,{className:`font-mono text-xs text-muted-foreground`,children:a.path??`~/Downloads/openknowledge.skill`})]})]}),(0,X.jsx)(YS,{})]}),t[16]=a.kind,t[17]=a.path,t[18]=S):S=t[18];let C;t[19]===a.kind?C=t[20]:(C=a.kind===`handed-off`&&!g&&(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(`div`,{className:`flex items-start gap-2 rounded-md border border-primary/30 bg-primary/5 px-3 py-2`,children:[(0,X.jsx)(Te,{"aria-hidden":`true`,className:`mt-0.5 h-4 w-4 text-primary`}),(0,X.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[(0,X.jsx)(`span`,{className:`text-sm font-medium text-foreground`,children:`Download started`}),(0,X.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[`File saves to `,(0,X.jsx)(KS,{children:`~/Downloads/openknowledge.skill`}),`.`]})]})]}),(0,X.jsx)(YS,{})]}),t[19]=a.kind,t[20]=C);let w;t[21]!==a.kind||t[22]!==a.message?(w=a.kind===`error`&&(0,X.jsxs)(`div`,{className:`flex flex-col gap-2 text-sm`,children:[(0,X.jsx)(`span`,{className:`text-destructive`,children:a.message}),(0,X.jsx)(`a`,{href:WS,target:`_blank`,rel:`noopener noreferrer`,className:`text-xs underline underline-offset-2 hover:text-foreground`,children:`See the full install guide`})]}),t[21]=a.kind,t[22]=a.message,t[23]=w):w=t[23];let T;t[24]!==b||t[25]!==x||t[26]!==S||t[27]!==C||t[28]!==w||t[29]!==y?(T=(0,X.jsx)(Ht,{children:(0,X.jsxs)(`div`,{className:`flex flex-col gap-6 py-2`,children:[y,b,x,S,C,w]})}),t[24]=b,t[25]=x,t[26]=S,t[27]=C,t[28]=w,t[29]=y,t[30]=T):T=t[30];let E;t[31]===a.kind?E=t[32]:(E=a.kind!==`error`&&(0,X.jsxs)(`a`,{href:WS,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-1 self-center text-xs text-muted-foreground underline underline-offset-2 hover:text-foreground sm:mr-auto font-mono tracking-wide uppercase`,children:[`Full guide`,(0,X.jsx)(Wi,{"aria-hidden":`true`,className:`h-3 w-3`})]}),t[31]=a.kind,t[32]=E);let D;t[33]!==r||t[34]!==a.kind?(D=a.kind===`idle`&&g&&(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(q,{className:`uppercase font-mono`,variant:`ghost`,onClick:()=>r(!1),children:`Cancel`}),(0,X.jsxs)(q,{onClick:f,children:[(0,X.jsx)(Si,{"aria-hidden":`true`,className:`h-4 w-4`}),`Install`]})]}),t[33]=r,t[34]=a.kind,t[35]=D):D=t[35];let O;t[36]!==r||t[37]!==a.kind?(O=a.kind===`idle`&&!g&&(0,X.jsx)(q,{className:`uppercase font-mono`,variant:`ghost`,onClick:()=>r(!1),children:`Close`}),t[36]=r,t[37]=a.kind,t[38]=O):O=t[38];let k;t[39]!==r||t[40]!==a.kind?(k=a.kind===`error`&&g&&(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(q,{className:`uppercase font-mono`,variant:`ghost`,onClick:()=>r(!1),children:`Cancel`}),(0,X.jsxs)(q,{onClick:f,children:[(0,X.jsx)(Si,{"aria-hidden":`true`,className:`h-4 w-4`}),`Try again`]})]}),t[39]=r,t[40]=a.kind,t[41]=k):k=t[41];let A;t[42]===a.kind?A=t[43]:(A=a.kind===`downloading`&&(0,X.jsxs)(q,{disabled:!0,children:[(0,X.jsx)(lt,{"aria-hidden":`true`,className:`h-4 w-4 animate-spin`}),`Installing…`]}),t[42]=a.kind,t[43]=A);let j;t[44]!==r||t[45]!==a.kind?(j=a.kind===`handed-off`&&(0,X.jsx)(q,{onClick:()=>r(!1),children:`Done`}),t[44]=r,t[45]=a.kind,t[46]=j):j=t[46];let M;t[47]!==E||t[48]!==D||t[49]!==O||t[50]!==k||t[51]!==A||t[52]!==j?(M=(0,X.jsxs)(Ut,{children:[E,D,O,k,A,j]}),t[47]=E,t[48]=D,t[49]=O,t[50]=k,t[51]=A,t[52]=j,t[53]=M):M=t[53];let N;t[54]!==T||t[55]!==M?(N=(0,X.jsxs)(zt,{className:`sm:max-w-lg`,"data-ok-layer-spawned":``,children:[v,T,M]}),t[54]=T,t[55]=M,t[56]=N):N=t[56];let P;return t[57]!==r||t[58]!==n||t[59]!==N?(P=(0,X.jsx)(qt,{open:n,onOpenChange:r,children:N}),t[57]=r,t[58]=n,t[59]=N,t[60]=P):P=t[60],P}function ZS(e){let t=(0,Q.c)(4),n,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,X.jsx)(`title`,{children:`LinkedIn`}),r=(0,X.jsx)(`path`,{d:`M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z`}),t[0]=n,t[1]=r):(n=t[0],r=t[1]);let i;return t[2]===e?i=t[3]:(i=(0,X.jsxs)(`svg`,{role:`img`,fill:`currentColor`,height:24,width:24,viewBox:`0 0 24 24`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[n,r]}),t[2]=e,t[3]=i),i}function QS(e){let t=(0,Q.c)(4),n,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,X.jsx)(`title`,{children:`X (Twitter)`}),r=(0,X.jsx)(`path`,{d:`M18.901 1.153h3.68l-8.04 9.19L24 22.846h-7.406l-5.8-7.584-6.638 7.584H.474l8.6-9.83L0 1.154h7.594l5.243 6.932ZM17.61 20.644h2.039L6.486 3.24H4.298Z`}),t[0]=n,t[1]=r):(n=t[0],r=t[1]);let i;return t[2]===e?i=t[3]:(i=(0,X.jsxs)(`svg`,{role:`img`,fill:`currentColor`,height:24,width:24,viewBox:`0 0 24 24`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[n,r]}),t[2]=e,t[3]=i),i}var $S=[{label:`Documentation`,href:`https://openknowledge.ai/docs`,icon:ni},{label:`Homepage`,href:`https://openknowledge.ai/`,icon:Pe},{label:`Twitter / X`,href:`https://x.com/inkeep`,icon:QS},{label:`LinkedIn`,href:`https://www.linkedin.com/company/inkeep/`,icon:ZS}],eC=()=>{let e=(0,Q.c)(13),[t,n]=(0,Z.useState)(!1),[r,i]=(0,Z.useState)(!1),a;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,X.jsxs)(sn,{children:[(0,X.jsx)(en,{asChild:!0,children:(0,X.jsx)(yS,{asChild:!0,children:(0,X.jsxs)(q,{variant:`ghost`,size:`icon`,className:`size-7 hover:bg-accent text-muted-foreground`,children:[(0,X.jsx)(li,{className:`size-4`}),(0,X.jsx)(`span`,{className:`sr-only`,children:`Help & resources`})]})})}),(0,X.jsx)(nn,{children:`Help & resources`})]}),e[0]=a):a=e[0];let o;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,X.jsx)(`p`,{className:`font-mono tracking-wide uppercase text-muted-foreground text-xs mb-1`,children:`Setup`}),e[1]=o):o=e[1];let s;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(s=()=>{i(!1),n(!0)},e[2]=s):s=e[2];let c,l;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,X.jsx)(`ul`,{className:`mb-3 space-y-0.5`,children:(0,X.jsx)(`li`,{children:(0,X.jsxs)(`button`,{type:`button`,onClick:s,className:`flex w-full items-center gap-2.5 rounded-md px-2 py-1.5 text-left text-sm text-muted-foreground transition-colors hover:bg-azure-900/5 dark:hover:bg-white/20 hover:text-primary`,children:[(0,X.jsx)(Si,{"aria-hidden":`true`,className:`size-4 shrink-0`}),(0,X.jsx)(`span`,{children:`Install for Claude Chat & Cowork…`})]})})}),l=(0,X.jsx)(`p`,{className:`font-mono tracking-wide uppercase text-muted-foreground text-xs mb-1`,children:`Resources`}),e[3]=c,e[4]=l):(c=e[3],l=e[4]);let u;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,X.jsxs)(bS,{align:`end`,className:`w-64 p-3`,children:[o,c,l,(0,X.jsx)(`nav`,{"aria-label":`Help and resources`,children:(0,X.jsx)(`ul`,{className:`space-y-0.5`,children:$S.map(tC)})})]}),e[5]=u):u=e[5];let d;e[6]===r?d=e[7]:(d=(0,X.jsxs)(vS,{open:r,onOpenChange:i,children:[a,u]}),e[6]=r,e[7]=d);let f;e[8]===t?f=e[9]:(f=(0,X.jsx)(XS,{open:t,onOpenChange:n}),e[8]=t,e[9]=f);let p;return e[10]!==d||e[11]!==f?(p=(0,X.jsxs)(X.Fragment,{children:[d,f]}),e[10]=d,e[11]=f,e[12]=p):p=e[12],p};function tC(e){let{label:t,href:n,icon:r}=e;return(0,X.jsx)(`li`,{children:(0,X.jsxs)(`a`,{href:n,target:`_blank`,rel:`noopener noreferrer`,className:`flex items-center gap-2.5 rounded-md px-2 py-1.5 text-sm text-muted-foreground transition-colors hover:bg-azure-900/5 dark:hover:bg-white/20 hover:text-primary`,children:[(0,X.jsx)(r,{"aria-hidden":`true`,className:`size-4 shrink-0`}),t]})},n)}var nC={"claude-cowork":`claude`,"claude-code":`claude`,codex:`openai`,cursor:`cursor`};function rC(e){let t=(0,Q.c)(23),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({id:r,style:a,className:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let{resolvedTheme:o}=T(),s=nC[r],c=s?(o===`dark`?Un[s]:void 0)??qn[s]:void 0,l;t[5]!==c||t[6]!==a?(l=c?{...a,"--ok-brand-color":c}:a,t[5]=c,t[6]=a,t[7]=l):l=t[7];let u=l,d=c&&`[&_*]:![color:var(--ok-brand-color)]`,f;t[8]!==n||t[9]!==d?(f=G(d,n),t[8]=n,t[9]=d,t[10]=f):f=t[10];let p=f;if(r===`claude-cowork`||r===`claude-code`){let e;return t[11]!==p||t[12]!==u||t[13]!==i?(e=(0,X.jsx)(le,{style:u,className:p,...i}),t[11]=p,t[12]=u,t[13]=i,t[14]=e):e=t[14],e}if(r===`codex`){let e;return t[15]!==p||t[16]!==u||t[17]!==i?(e=(0,X.jsx)(ce,{style:u,className:p,...i}),t[15]=p,t[16]=u,t[17]=i,t[18]=e):e=t[18],e}if(r===`cursor`){let e;return t[19]!==p||t[20]!==u||t[21]!==i?(e=(0,X.jsx)(_e,{style:u,className:p,...i}),t[19]=p,t[20]=u,t[21]=i,t[22]=e):e=t[22],e}return null}var iC=`https://github.com/inkeep/open-knowledge/releases`;function aC(e){let{target:t,installState:n,isElectronHost:r}=e;return t.id===`cursor`&&!r?`Desktop only`:n.installed===null?`Detecting…`:n.installed===!1?`Not installed`:null}function oC(e){let{target:t,installState:n,isElectronHost:r}=e;if(t.id===`cursor`&&!r)return{enabled:!1,tooltip:{message:`Cursor handoff requires the desktop build.`,installAction:{label:`Install the Open Knowledge desktop app →`,url:iC}}};if(n.installed===null)return{enabled:!1,tooltip:null};if(n.installed===!1){let e=t.appBrandName??t.displayName;return{enabled:!1,tooltip:{message:`Requires ${e}.`,installAction:{label:`Install ${e} →`,url:t.installUrl},...t.hasWebFallback?{webFallback:{label:`Open in claude.ai →`,url:``}}:{}}}}return{enabled:!0,tooltip:null}}function sC(e){return En(e)}function cC(e){return`Opened ${e} in your browser.`}function lC(e){let t=(0,Q.c)(73),{target:n,installState:r,isElectronHost:i,prompt:a,onSelect:o}=e,s=e.openExternal??Md,c=e.onWebFallbackSuccess??dC,l=e.onWebFallbackError??uC,u;t[0]!==r||t[1]!==i||t[2]!==n?(u=oC({target:n,installState:r,isElectronHost:i}),t[0]=r,t[1]=i,t[2]=n,t[3]=u):u=t[3];let d=u,f;t[4]!==r||t[5]!==i||t[6]!==n?(f=aC({target:n,installState:r,isElectronHost:i}),t[4]=r,t[5]=i,t[6]=n,t[7]=f):f=t[7];let p=f,m;t[8]!==s||t[9]!==d.tooltip?(m=()=>{d.tooltip&&s(d.tooltip.installAction.url)},t[8]=s,t[9]=d.tooltip,t[10]=m):m=t[10];let h=m,g;t[11]!==l||t[12]!==c||t[13]!==s||t[14]!==a||t[15]!==n?(g=()=>{(async()=>{let e=await s(sC(a));e.ok?c(n):l(n,e.detail??e.reason)})()},t[11]=l,t[12]=c,t[13]=s,t[14]=a,t[15]=n,t[16]=g):g=t[16];let _=g;if(d.enabled){let e=`open-in-agent-item-${n.id}`,r=`Open in ${n.displayName}`,i;t[17]===n.id?i=t[18]:(i=(0,X.jsx)(rC,{id:n.id,"aria-hidden":`true`}),t[17]=n.id,t[18]=i);let a;t[19]===n.displayName?a=t[20]:(a=(0,X.jsx)(`span`,{children:n.displayName}),t[19]=n.displayName,t[20]=a);let s;return t[21]!==o||t[22]!==e||t[23]!==r||t[24]!==i||t[25]!==a?(s=(0,X.jsxs)(gy,{onSelect:o,"data-testid":e,"aria-label":r,children:[i,a]}),t[21]=o,t[22]=e,t[23]=r,t[24]=i,t[25]=a,t[26]=s):s=t[26],s}if(!d.tooltip){let e=p?`Open in ${n.displayName}, ${p}`:`Open in ${n.displayName}`,r=`open-in-agent-item-${n.id}`,i;t[27]===n.id?i=t[28]:(i=(0,X.jsx)(rC,{id:n.id,"aria-hidden":`true`}),t[27]=n.id,t[28]=i);let a;t[29]===n.displayName?a=t[30]:(a=(0,X.jsx)(`span`,{className:`flex-1`,children:n.displayName}),t[29]=n.displayName,t[30]=a);let o;t[31]===p?o=t[32]:(o=p?(0,X.jsx)(`span`,{"aria-hidden":`true`,className:`ml-2 text-muted-foreground text-xs`,children:p}):null,t[31]=p,t[32]=o);let s;return t[33]!==e||t[34]!==r||t[35]!==i||t[36]!==a||t[37]!==o?(s=(0,X.jsxs)(gy,{disabled:!0,"data-testid":r,"aria-label":e,children:[i,a,o]}),t[33]=e,t[34]=r,t[35]=i,t[36]=a,t[37]=o,t[38]=s):s=t[38],s}let v=p?`Open in ${n.displayName}, ${p}`:`Open in ${n.displayName}`,y=`open-in-agent-item-${n.id}`,b;t[39]===n.id?b=t[40]:(b=(0,X.jsx)(rC,{id:n.id,"aria-hidden":`true`,className:`mr-2`}),t[39]=n.id,t[40]=b);let x;t[41]===n.displayName?x=t[42]:(x=(0,X.jsx)(`span`,{className:`flex-1`,children:n.displayName}),t[41]=n.displayName,t[42]=x);let S;t[43]===p?S=t[44]:(S=p?(0,X.jsx)(`span`,{"aria-hidden":`true`,className:`ml-2 text-muted-foreground text-xs`,children:p}):null,t[43]=p,t[44]=S);let C;t[45]!==v||t[46]!==y||t[47]!==b||t[48]!==x||t[49]!==S?(C=(0,X.jsxs)(Sy,{"data-testid":y,"data-row-disabled":``,"aria-label":v,children:[b,x,S]}),t[45]=v,t[46]=y,t[47]=b,t[48]=x,t[49]=S,t[50]=C):C=t[50];let w=`open-in-agent-submenu-${n.id}`,T=`open-in-agent-message-${n.id}`,E;t[51]!==d.tooltip.message||t[52]!==T?(E=(0,X.jsx)(yy,{className:`font-normal text-muted-foreground text-xs`,"data-testid":T,children:d.tooltip.message}),t[51]=d.tooltip.message,t[52]=T,t[53]=E):E=t[53];let D;t[54]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,X.jsx)(by,{}),t[54]=D):D=t[54];let O=`open-in-agent-install-${n.id}`,k;t[55]===d.tooltip.installAction.label?k=t[56]:(k=(0,X.jsx)(`span`,{children:d.tooltip.installAction.label}),t[55]=d.tooltip.installAction.label,t[56]=k);let A;t[57]!==h||t[58]!==O||t[59]!==k?(A=(0,X.jsx)(gy,{onSelect:h,"data-testid":O,children:k}),t[57]=h,t[58]=O,t[59]=k,t[60]=A):A=t[60];let j;t[61]!==_||t[62]!==d.tooltip.webFallback||t[63]!==n.id?(j=d.tooltip.webFallback?(0,X.jsxs)(gy,{onSelect:_,"data-testid":`open-in-agent-web-fallback-${n.id}`,"aria-label":`${d.tooltip.webFallback.label}, opens in browser with prompt pre-filled`,children:[(0,X.jsx)(`span`,{className:`flex-1`,children:d.tooltip.webFallback.label}),(0,X.jsx)(`span`,{"aria-hidden":`true`,className:`ml-2 text-muted-foreground text-xs`,children:`opens in browser with prompt pre-filled`})]}):null,t[61]=_,t[62]=d.tooltip.webFallback,t[63]=n.id,t[64]=j):j=t[64];let M;t[65]!==E||t[66]!==A||t[67]!==j||t[68]!==w?(M=(0,X.jsxs)(Cy,{className:`min-w-[260px]`,"data-testid":w,children:[E,D,A,j]}),t[65]=E,t[66]=A,t[67]=j,t[68]=w,t[69]=M):M=t[69];let N;return t[70]!==M||t[71]!==C?(N=(0,X.jsxs)(xy,{children:[C,M]}),t[70]=M,t[71]=C,t[72]=N):N=t[72],N}function uC(){}function dC(){}function fC(e){let t=(0,Q.c)(25),{input:n}=e,{states:r,refresh:i}=uf(),{dispatch:a}=Qd(),[o,s]=(0,Z.useState)(!1),c=typeof window<`u`&&window.okDesktop!=null,l=mC,u=pC,d;t[0]===i?d=t[1]:(d=e=>{s(e),e&&i()},t[0]=i,t[1]=d);let f=d,p=n===null,m;t[2]===n?m=t[3]:(m=n===null?``:Mn(n.docContext),t[2]=n,t[3]=m);let h=m,g;t[4]!==a||t[5]!==n?(g=e=>{n!==null&&a(e.id,n)},t[4]=a,t[5]=n,t[6]=g):g=t[6];let _=g,v;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,X.jsx)(ve,{className:`size-4`}),t[7]=v):v=t[7];let y;t[8]===p?y=t[9]:(y=(0,X.jsx)(en,{asChild:!0,children:(0,X.jsx)(my,{asChild:!0,children:(0,X.jsx)(q,{variant:`ghost`,size:`icon-sm`,"aria-label":`Edit with AI`,disabled:p,className:`text-muted-foreground`,"data-testid":`open-in-agent-trigger`,children:v})})}),t[8]=p,t[9]=y);let b;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,X.jsx)(nn,{children:`Edit with AI`}),t[10]=b):b=t[10];let x;t[11]===y?x=t[12]:(x=(0,X.jsxs)(sn,{children:[y,b]}),t[11]=y,t[12]=x);let S;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,X.jsx)(yy,{className:`font-mono font-normal tracking-wide uppercase text-muted-foreground text-xs`,children:`Open in…`}),t[13]=S):S=t[13];let C;t[14]!==_||t[15]!==h||t[16]!==r?(C=Ed.map(e=>{let t=r[e.id];return(0,X.jsx)(lC,{target:e,installState:t,isElectronHost:c,prompt:h,onSelect:()=>_(e),onWebFallbackSuccess:l,onWebFallbackError:u},e.id)}),t[14]=_,t[15]=h,t[16]=r,t[17]=C):C=t[17];let w;t[18]===C?w=t[19]:(w=(0,X.jsxs)(hy,{align:`end`,className:`min-w-[220px]`,"data-testid":`open-in-agent-menu`,children:[S,C]}),t[18]=C,t[19]=w);let T;return t[20]!==f||t[21]!==o||t[22]!==w||t[23]!==x?(T=(0,X.jsxs)(py,{open:o,onOpenChange:f,children:[x,w]}),t[20]=f,t[21]=o,t[22]=w,t[23]=x,t[24]=T):T=t[24],T}function pC(e){Xt.error(`Couldn't open ${e.displayName} in your browser.`)}function mC(e){Xt.success(cC(e.displayName))}var hC={fill:`none`,height:24,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,viewBox:`0 0 24 24`,width:24,xmlns:`http://www.w3.org/2000/svg`},gC=e=>{let t=(0,Q.c)(15),n,r,i,a,o,s,c;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7]):({color:a,size:o,strokeWidth:s,absoluteStrokeWidth:n,className:c,children:r,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c);let l=a===void 0?`currentColor`:a,u=o===void 0?24:o,d=s===void 0?2:s,f=c===void 0?``:c,p=n?Number(d)*24/Number(u):d,m;return t[8]!==r||t[9]!==f||t[10]!==l||t[11]!==i||t[12]!==u||t[13]!==p?(m=(0,X.jsx)(`svg`,{"aria-hidden":`true`,...hC,className:f,height:u,stroke:l,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:p,width:u,...i,children:r}),t[8]=r,t[9]=f,t[10]=l,t[11]=i,t[12]=u,t[13]=p,t[14]=m):m=t[14],m},_C=e=>{let t=(0,Q.c)(4),n,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,X.jsx)(`title`,{children:`Markdown`}),r=(0,X.jsx)(`path`,{d:`M232,48H24A16,16,0,0,0,8,64V192a16,16,0,0,0,16,16H232a16,16,0,0,0,16-16V64A16,16,0,0,0,232,48Zm0,144H24V64H232V192ZM128,104v48a8,8,0,0,1-16,0V123.31L93.66,141.66a8,8,0,0,1-11.32,0L64,123.31V152a8,8,0,0,1-16,0V104a8,8,0,0,1,13.66-5.66L88,124.69l26.34-26.35A8,8,0,0,1,128,104Zm77.66,18.34a8,8,0,0,1,0,11.32l-24,24a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L168,132.69V104a8,8,0,0,1,16,0v28.69l10.34-10.35A8,8,0,0,1,205.66,122.34Z`}),t[0]=n,t[1]=r):(n=t[0],r=t[1]);let i;return t[2]===e?i=t[3]:(i=(0,X.jsxs)(gC,{...e,viewBox:`0 0 256 256`,fill:`currentColor`,children:[n,r]}),t[2]=e,t[3]=i),i},vC=e=>{let t=(0,Q.c)(4),n,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,X.jsx)(`title`,{children:`Textbox`}),r=(0,X.jsx)(`path`,{d:`M112,40a8,8,0,0,0-8,8V64H24A16,16,0,0,0,8,80v96a16,16,0,0,0,16,16h80v16a8,8,0,0,0,16,0V48A8,8,0,0,0,112,40ZM24,176V80h80v96ZM248,80v96a16,16,0,0,1-16,16H144a8,8,0,0,1,0-16h88V80H144a8,8,0,0,1,0-16h88A16,16,0,0,1,248,80ZM88,112a8,8,0,0,1-8,8H72v24a8,8,0,0,1-16,0V120H48a8,8,0,0,1,0-16H80A8,8,0,0,1,88,112Z`}),t[0]=n,t[1]=r):(n=t[0],r=t[1]);let i;return t[2]===e?i=t[3]:(i=(0,X.jsxs)(gC,{...e,viewBox:`0 0 256 256`,fill:`currentColor`,children:[n,r]}),t[2]=e,t[3]=i),i};function yC(e){let t=(0,Q.c)(11),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,size:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=i===void 0?`default`:i,o;t[4]===n?o=t[5]:(o=G(`peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50`,n),t[4]=n,t[5]=o);let s;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,X.jsx)(Al,{"data-slot":`switch-thumb`,className:`pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] dark:data-checked:bg-primary-foreground group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 dark:data-unchecked:bg-foreground`}),t[6]=s):s=t[6];let c;return t[7]!==r||t[8]!==a||t[9]!==o?(c=(0,X.jsx)(kl,{"data-slot":`switch`,"data-size":a,className:o,...r,children:s}),t[7]=r,t[8]=a,t[9]=o,t[10]=c):c=t[10],c}function bC(e){if(!e)return`never`;let t=Date.now()-new Date(e).getTime();return t<6e4?`just now`:t<36e5?`${Math.floor(t/6e4)} min ago`:t<864e5?`${Math.floor(t/36e5)}h ago`:new Date(e).toLocaleDateString()}async function xC(e){await fetch(`/api/sync/trigger`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({op:e})})}async function SC(e){let t=await fetch(`/api/sync/set-enabled`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({enabled:e})});if(!t.ok)throw Error(`set-enabled failed: HTTP ${t.status}`)}function CC(e){let t=(0,Q.c)(9),{status:n}=e;switch(n.state){case`dormant`:{let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,X.jsx)(fi,{className:`size-3.5 text-muted-foreground`}),t[0]=e):e=t[0],e}case`idle`:{if(n.ahead>0||n.behind>0){let e;return t[1]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,X.jsx)(na,{className:`size-3.5 text-muted-foreground`}),t[1]=e):e=t[1],e}let e;return t[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,X.jsx)(fi,{className:`size-3.5 text-emerald-500`}),t[2]=e):e=t[2],e}case`fetching`:case`pulling`:case`pushing`:{let e;return t[3]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,X.jsx)(na,{className:`size-3.5 text-muted-foreground animate-spin`}),t[3]=e):e=t[3],e}case`conflict`:{let e;return t[4]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,X.jsx)(Oe,{className:`size-3.5 text-amber-500`}),t[4]=e):e=t[4],e}case`offline`:{let e;return t[5]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,X.jsx)(di,{className:`size-3.5 text-muted-foreground`}),t[5]=e):e=t[5],e}case`auth-error`:{let e;return t[6]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,X.jsx)(Hi,{className:`size-3.5 text-destructive`}),t[6]=e):e=t[6],e}case`disabled`:{let e;return t[7]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,X.jsx)(di,{className:`size-3.5 text-muted-foreground`}),t[7]=e):e=t[7],e}default:{let e;return t[8]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,X.jsx)(fi,{className:`size-3.5 text-muted-foreground`}),t[8]=e):e=t[8],e}}}function wC(e){switch(e.state){case`idle`:return e.ahead>0?`↑${e.ahead}`:e.behind>0?`↓${e.behind}`:``;case`fetching`:case`pulling`:case`pushing`:return``;case`conflict`:return e.conflictCount>0?`${e.conflictCount}`:``;case`offline`:return``;case`auth-error`:return``;case`disabled`:return``;default:return``}}function TC(e){switch(e){case`dormant`:return`No git remote`;case`idle`:return`Synced`;case`fetching`:return`Fetching…`;case`pulling`:return`Pulling…`;case`pushing`:return`Pushing…`;case`conflict`:return`Conflict`;case`offline`:return`Offline`;case`auth-error`:return`Sign in required`;case`disabled`:return`Sync disabled`;default:return e}}function EC(e){switch(e){case`external-changes-pending`:return`External changes pending`;case`dirty-tree`:return`Working tree has uncommitted changes`;case`detached-head`:return`Detached HEAD — checkout a branch to resume`;case`auth-error`:return`Sign in required`;case`protected-branch`:return`Protected branch — cannot push`;default:return e}}function DC(e){return e.syncEnabled?e.state===`idle`?e.ahead>0&&e.behind>0?`${e.ahead} ahead, ${e.behind} behind`:e.ahead>0?`${e.ahead} ahead`:e.behind>0?`${e.behind} behind`:`Synced`:e.state===`conflict`&&e.conflictCount>0?`${e.conflictCount} conflict${e.conflictCount===1?``:`s`}`:TC(e.state):`Sync off`}function OC(e){let t=(0,Q.c)(72),{status:n,onSignIn:r,onOpenConflictResolver:i,onSetIdentity:a}=e,[o,s]=(0,Z.useState)(!1),c=n.syncEnabled,l;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(l=async function(e){s(!0);try{await SC(e)}catch(t){console.error(`[sync] toggle failed`,t),Xt.error(`Failed to ${e?`enable`:`disable`} sync — try again`)}s(!1)},t[0]=l):l=t[0];let u=l,d;t[1]===n?d=t[2]:(d=(0,X.jsx)(CC,{status:n}),t[1]=n,t[2]=d);let f;t[3]===n.state?f=t[4]:(f=TC(n.state),t[3]=n.state,t[4]=f);let p;t[5]===f?p=t[6]:(p=(0,X.jsx)(`span`,{className:`text-sm font-medium truncate`,children:f}),t[5]=f,t[6]=p);let m;t[7]!==d||t[8]!==p?(m=(0,X.jsxs)(`div`,{className:`flex items-center gap-2 min-w-0`,children:[d,p]}),t[7]=d,t[8]=p,t[9]=m):m=t[9];let h;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(h=e=>void u(e),t[10]=h):h=t[10];let g=c?`Disable sync`:`Enable sync`,_;t[11]!==c||t[12]!==g||t[13]!==o?(_=(0,X.jsx)(yC,{checked:c,disabled:o,onCheckedChange:h,"aria-label":g}),t[11]=c,t[12]=g,t[13]=o,t[14]=_):_=t[14];let v;t[15]!==m||t[16]!==_?(v=(0,X.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[m,_]}),t[15]=m,t[16]=_,t[17]=v):v=t[17];let y;t[18]===n.error?y=t[19]:(y=n.error&&(0,X.jsx)(`p`,{className:`text-xs text-destructive`,children:n.error}),t[18]=n.error,t[19]=y);let b;t[20]===n.pausedReason?b=t[21]:(b=n.pausedReason&&(0,X.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:EC(n.pausedReason)}),t[20]=n.pausedReason,t[21]=b);let x;t[22]===n.state?x=t[23]:(x=n.state===`conflict`&&(0,X.jsx)(`p`,{className:`text-xs text-amber-700 dark:text-amber-400`,children:`Sync paused — resolve conflicts to resume.`}),t[22]=n.state,t[23]=x);let S;t[24]!==c||t[25]!==n.lastSyncUtc||t[26]!==n.state?(S=c&&n.state!==`dormant`&&(0,X.jsxs)(`div`,{children:[`Last synced: `,bC(n.lastSyncUtc)]}),t[24]=c,t[25]=n.lastSyncUtc,t[26]=n.state,t[27]=S):S=t[27];let C;t[28]===n.ahead?C=t[29]:(C=n.ahead>0&&(0,X.jsxs)(`div`,{children:[n.ahead,` commit`,n.ahead===1?``:`s`,` ahead`]}),t[28]=n.ahead,t[29]=C);let w;t[30]===n.behind?w=t[31]:(w=n.behind>0&&(0,X.jsxs)(`div`,{children:[n.behind,` commit`,n.behind===1?``:`s`,` behind`]}),t[30]=n.behind,t[31]=w);let T;t[32]===n.conflictCount?T=t[33]:(T=n.conflictCount>0&&(0,X.jsxs)(`div`,{children:[n.conflictCount,` file`,n.conflictCount===1?``:`s`,` conflicted`]}),t[32]=n.conflictCount,t[33]=T);let E;t[34]===c?E=t[35]:(E=!c&&(0,X.jsx)(`div`,{children:`Sync is off — your edits will not sync to the remote repository.`}),t[34]=c,t[35]=E);let D;t[36]!==S||t[37]!==C||t[38]!==w||t[39]!==T||t[40]!==E?(D=(0,X.jsxs)(`div`,{className:`text-xs text-muted-foreground space-y-0.5`,children:[S,C,w,T,E]}),t[36]=S,t[37]=C,t[38]=w,t[39]=T,t[40]=E,t[41]=D):D=t[41];let O;t[42]!==a||t[43]!==n.identityUnresolved?(O=n.identityUnresolved&&a&&(0,X.jsxs)(`div`,{className:`flex items-start gap-2 rounded-md border border-dashed p-2`,children:[(0,X.jsx)(_a,{className:`size-3.5 mt-0.5 text-muted-foreground shrink-0`}),(0,X.jsxs)(`div`,{className:`flex flex-col gap-1.5 min-w-0`,children:[(0,X.jsx)(`p`,{className:`text-xs text-muted-foreground leading-snug`,children:`Git identity isn't set — commits use a default author. Set yours so teammates see your name.`}),(0,X.jsx)(q,{variant:`outline`,size:`xs`,className:`self-start`,onClick:a,children:`Set identity`})]})]}),t[42]=a,t[43]=n.identityUnresolved,t[44]=O):O=t[44];let k;t[45]!==c||t[46]!==n.state?(k=c&&n.state!==`dormant`&&n.state!==`disabled`&&n.state!==`auth-error`&&n.state!==`conflict`&&(0,X.jsx)(q,{variant:`outline`,size:`xs`,onClick:AC,children:`Sync now`}),t[45]=c,t[46]=n.state,t[47]=k):k=t[47];let A;t[48]!==c||t[49]!==r||t[50]!==n.state?(A=c&&n.state===`auth-error`&&(0,X.jsx)(q,{variant:`outline`,size:`xs`,onClick:r,children:`Sign in`}),t[48]=c,t[49]=r,t[50]=n.state,t[51]=A):A=t[51];let j;t[52]!==c||t[53]!==n.state?(j=c&&n.state===`offline`&&(0,X.jsx)(q,{variant:`outline`,size:`xs`,onClick:kC,children:`Retry`}),t[52]=c,t[53]=n.state,t[54]=j):j=t[54];let M;t[55]!==c||t[56]!==i||t[57]!==n.state?(M=c&&n.state===`conflict`&&i&&(0,X.jsx)(q,{variant:`outline`,size:`xs`,onClick:i,children:`Review conflicts`}),t[55]=c,t[56]=i,t[57]=n.state,t[58]=M):M=t[58];let N;t[59]!==k||t[60]!==A||t[61]!==j||t[62]!==M?(N=(0,X.jsxs)(`div`,{className:`flex flex-wrap gap-1 pt-1`,children:[k,A,j,M]}),t[59]=k,t[60]=A,t[61]=j,t[62]=M,t[63]=N):N=t[63];let P;return t[64]!==y||t[65]!==b||t[66]!==x||t[67]!==D||t[68]!==O||t[69]!==N||t[70]!==v?(P=(0,X.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[v,y,b,x,D,O,N]}),t[64]=y,t[65]=b,t[66]=x,t[67]=D,t[68]=O,t[69]=N,t[70]=v,t[71]=P):P=t[71],P}function kC(){xC(`sync`)}function AC(){xC(`sync`)}function jC(e){let t=(0,Q.c)(36),n;t[0]===e?n=t[1]:(n=e===void 0?{}:e,t[0]=e,t[1]=n);let{onSignIn:r,onOpenConflictResolver:i,onSetIdentity:a}=n,{status:o,fetchError:s}=kf();if(!o){if(s){let e;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,X.jsx)(en,{asChild:!0,children:(0,X.jsx)(q,{variant:`ghost`,size:`icon-sm`,className:`text-muted-foreground`,"aria-label":`Sync status unavailable`,disabled:!0,children:(0,X.jsx)(di,{className:`size-3.5`})})}),t[2]=e):e=t[2];let n=s===`network`?`Sync status unavailable — server unreachable.`:`Sync status unavailable — server error.`,r;return t[3]===n?r=t[4]:(r=(0,X.jsxs)(sn,{children:[e,(0,X.jsx)(nn,{children:n})]}),t[3]=n,t[4]=r),r}return null}if(o.state===`dormant`&&!o.hasRemote)return null;let c;t[5]===o?c=t[6]:(c=wC(o),t[5]=o,t[6]=c);let l=c,u=!!o.identityUnresolved,d;t[7]===o.state?d=t[8]:(d=TC(o.state),t[7]=o.state,t[8]=d);let f=`Sync status: ${d}${u?` — git identity unset`:``}`,p;t[9]===o?p=t[10]:(p=(0,X.jsx)(CC,{status:o}),t[9]=o,t[10]=p);let m;t[11]===l?m=t[12]:(m=l&&(0,X.jsx)(`span`,{className:`absolute -top-0.5 -right-0.5 text-[9px] leading-none font-medium bg-background border rounded-full px-0.5`,children:l}),t[11]=l,t[12]=m);let h;t[13]!==l||t[14]!==u?(h=!l&&u&&(0,X.jsx)(`span`,{className:`absolute -top-0.5 -right-0.5 size-1.5 rounded-full bg-amber-500 ring-2 ring-background`,"aria-hidden":!0}),t[13]=l,t[14]=u,t[15]=h):h=t[15];let g;t[16]!==f||t[17]!==p||t[18]!==m||t[19]!==h?(g=(0,X.jsx)(en,{asChild:!0,children:(0,X.jsx)(yS,{asChild:!0,children:(0,X.jsxs)(q,{variant:`ghost`,size:`icon-sm`,className:`text-muted-foreground relative`,"aria-label":f,children:[p,m,h]})})}),t[16]=f,t[17]=p,t[18]=m,t[19]=h,t[20]=g):g=t[20];let _;t[21]===o?_=t[22]:(_=DC(o),t[21]=o,t[22]=_);let v;t[23]===_?v=t[24]:(v=(0,X.jsx)(nn,{children:_}),t[23]=_,t[24]=v);let y;t[25]!==v||t[26]!==g?(y=(0,X.jsxs)(sn,{children:[g,v]}),t[25]=v,t[26]=g,t[27]=y):y=t[27];let b;t[28]!==i||t[29]!==a||t[30]!==r||t[31]!==o?(b=(0,X.jsx)(bS,{align:`end`,className:`w-64 p-3`,children:(0,X.jsx)(OC,{status:o,onSignIn:r,onOpenConflictResolver:i,onSetIdentity:a})}),t[28]=i,t[29]=a,t[30]=r,t[31]=o,t[32]=b):b=t[32];let x;return t[33]!==y||t[34]!==b?(x=(0,X.jsxs)(vS,{children:[y,b]}),t[33]=y,t[34]=b,t[35]=x):x=t[35],x}var MC=[{value:`light`,label:`Light`,icon:fa},{value:`dark`,label:`Dark`,icon:Ui},{value:`system`,label:`System`,icon:gi}],NC=()=>{let e=(0,Q.c)(14),{theme:t,setTheme:n}=T(),r=t===`system`?gi:t===`dark`?Ui:fa,i;e[0]===r?i=e[1]:(i=(0,X.jsx)(r,{}),e[0]=r,e[1]=i);let a=t??`system`,o;e[2]===a?o=e[3]:(o=(0,X.jsxs)(`span`,{className:`sr-only`,children:[`Toggle theme (current: `,a,`)`]}),e[2]=a,e[3]=o);let s;e[4]!==i||e[5]!==o?(s=(0,X.jsx)(my,{asChild:!0,children:(0,X.jsxs)(q,{variant:`ghost`,size:`icon`,className:`size-7 hover:bg-accent text-muted-foreground`,children:[i,o]})}),e[4]=i,e[5]=o,e[6]=s):s=e[6];let c;e[7]===Symbol.for(`react.memo_cache_sentinel`)?(c=MC.map(PC),e[7]=c):c=e[7];let l;e[8]!==n||e[9]!==t?(l=(0,X.jsx)(hy,{align:`end`,children:(0,X.jsx)(_y,{value:t,onValueChange:n,children:c})}),e[8]=n,e[9]=t,e[10]=l):l=e[10];let u;return e[11]!==s||e[12]!==l?(u=(0,X.jsxs)(py,{children:[s,l]}),e[11]=s,e[12]=l,e[13]=u):u=e[13],u};function PC(e){let{value:t,label:n,icon:r}=e;return(0,X.jsxs)(vy,{value:t,className:`capitalize`,children:[(0,X.jsx)(r,{className:`text-muted-foreground`}),n]},t)}function FC(e){return typeof e==`object`&&!!e&&typeof e.fromDocName==`string`&&typeof e.toDocName==`string`}function IC(e){if(typeof e!=`object`||!e)return!1;let t=e;return t.ok===!0?Array.isArray(t.renamed)&&t.renamed.every(FC)&&Array.isArray(t.rewrittenDocs):t.ok===!1?typeof t.error==`string`:!1}function LC(e){let t=(0,Q.c)(92),{editorMode:n,onModeChange:r,onSaveVersion:i,saving:a,activeTab:o,diffLayout:s,onDiffLayoutChange:c,onSignIn:l,onSetIdentity:u,onOpenConflictResolver:d,onOpenClone:f}=e,{activeDocName:p,activeProvider:m,activeTarget:h,closeDocument:g,pinnedDoc:_,pin:v,unpin:y}=ft(),{state:b}=rS(),x=Dd(),S=DS(m),C;t[0]!==p||t[1]!==x?(C=Ud({docName:p,workspace:x}),t[0]=p,t[1]=x,t[2]=C):C=t[2];let w=C,T=!p||!(S===`connected`||S===`synced`),E=h?.kind===`folder`,D=h?.kind===`missing`,O=E?`${h.folderPath}/`:p?`${p}.md`:``,k;t[3]===p?k=t[4]:(k=p?.lastIndexOf(`/`)??-1,t[3]=p,t[4]=k);let A=k,j;t[5]!==p||t[6]!==A?(j=p&&A!==-1?`${p.substring(0,A+1)}`:``,t[5]=p,t[6]=A,t[7]=j):j=t[7];let M=j,N;t[8]!==p||t[9]!==A?(N=p?p.substring(A+1):``,t[8]=p,t[9]=A,t[10]=N):N=t[10];let P=N,F=_!==null,I;t[11]!==p||t[12]!==F||t[13]!==v||t[14]!==y?(I=function(){p&&(F?y():v(p))},t[11]=p,t[12]=F,t[13]=v,t[14]=y,t[15]=I):I=t[15];let L=I,[R,z]=(0,Z.useState)(!1),[B,V]=(0,Z.useState)(``),[H,U]=(0,Z.useState)(null),[ee,W]=(0,Z.useState)(!1),te=(0,Z.useRef)(null),G=(0,Z.useRef)(!1),ne=(0,Z.useRef)(!1),K=(0,Z.useRef)(null),re=(0,Z.useRef)(null),ie;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(ie=()=>{ne.current=!0,K.current=null,re.current=null,z(!1),U(null)},t[16]=ie):ie=t[16];let J;t[17]===p?J=t[18]:(J=[p],t[17]=p,t[18]=J),(0,Z.useEffect)(ie,J);let ae,Y;t[19]===R?(ae=t[20],Y=t[21]):(ae=()=>{if(R){let e=setTimeout(()=>{let e=te.current;e&&(e.focus(),e.select())},0);return()=>clearTimeout(e)}},Y=[R],t[19]=R,t[20]=ae,t[21]=Y),(0,Z.useEffect)(ae,Y);let oe;t[22]!==p||t[23]!==E?(oe=function(){if(!p||E)return;let e=p.split(`/`);ne.current=!1,K.current=p,V(e[e.length-1]),U(null),re.current=null,z(!0)},t[22]=p,t[23]=E,t[24]=oe):oe=t[24];let se=oe,ce;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(ce=function(){ne.current=!0,K.current=null,re.current=null,z(!1),V(``),U(null)},t[25]=ce):ce=t[25];let le=ce,ue;t[26]!==g||t[27]!==B?(ue=async function(){if(ne.current){ne.current=!1;return}if(G.current)return;let e=K.current;if(!e){le();return}let t=Ax(`file`,B),n=e.split(`/`),r=n[n.length-1];if(t===r){le();return}if(t===re.current)return;if(!jx(t)){U(`Name can’t be empty, ".", "..", or contain / or \\`);return}let i=Mx({kind:`file`,path:e,name:r},t);G.current=!0,W(!0),U(null);try{let n=await fetch(`/api/rename`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({docName:e,newDocName:i})});if(ne.current){W(!1),G.current=!1;return}let r;try{r=await n.json()}catch(r){console.warn(`[EditorHeader] rename response JSON parse failed`,{parseErr:r,status:n.status,docName:e,newDocName:i}),U(`Server error (HTTP ${n.status})`),W(!1),G.current=!1,re.current=t;return}if(!n.ok||!IC(r)){let a=r;console.warn(`[EditorHeader] rename failed`,{status:n.status,docName:e,newDocName:i}),U(a?.error||`Server error (HTTP ${n.status})`),W(!1),G.current=!1,re.current=t;return}if(!r.ok){U(r.error||`Failed to rename path`),W(!1),G.current=!1,re.current=t;return}let a=r.renamed,o=Fx(e,a);for(let e of a)g(e.fromDocName);er([`files`,`backlinks`,`graph`]),z(!1),V(``),W(!1),G.current=!1,re.current=null,K.current=null,o&&o!==e&&(window.location.hash=zn(o))}catch(n){console.warn(`[EditorHeader] rename failed`,{err:n,docName:e,newDocName:i,normalized:t}),U(`Network error — please try again`),W(!1),G.current=!1,re.current=t}},t[26]=g,t[27]=B,t[28]=ue):ue=t[28];let de=ue,fe;t[29]===Symbol.for(`react.memo_cache_sentinel`)?(fe=(0,X.jsx)(en,{asChild:!0,children:(0,X.jsx)(cS,{className:`-ml-1 shrink-0 text-muted-foreground`})}),t[29]=fe):fe=t[29];let pe=b===`expanded`?`Hide Files`:`Show Files`,me;t[30]===pe?me=t[31]:(me=(0,X.jsxs)(sn,{children:[fe,(0,X.jsx)(nn,{children:pe})]}),t[30]=pe,t[31]=me);let he;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(he=(0,X.jsx)(Pv,{orientation:`vertical`,className:`mr-1 h-4 shrink-0 data-vertical:self-center`}),t[32]=he):he=t[32];let ge;t[33]!==p||t[34]!==de||t[35]!==O||t[36]!==se||t[37]!==P||t[38]!==E||t[39]!==ee||t[40]!==R||t[41]!==M||t[42]!==H||t[43]!==B?(ge=E?(0,X.jsxs)(`span`,{className:`inline-flex min-w-0 items-center gap-2 text-sm text-muted-foreground`,children:[(0,X.jsx)(rt,{className:`size-4 shrink-0`}),(0,X.jsx)(`span`,{className:`truncate`,children:O})]}):p?(0,X.jsxs)(`div`,{className:`flex min-w-0 items-center overflow-hidden`,children:[M&&(0,X.jsxs)(`span`,{className:`flex shrink items-center overflow-hidden text-sm text-muted-foreground/60 transition-[max-width,opacity] duration-200 ease-in-out`,style:R?{maxWidth:0,opacity:0}:{maxWidth:`20rem`,opacity:1},children:[(0,X.jsx)(`span`,{className:`truncate`,children:M.slice(0,-1)}),(0,X.jsx)(`span`,{className:`shrink-0 pl-2`,children:`/`})]}),R?(0,X.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col`,children:[(0,X.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,X.jsx)(Le,{ref:te,value:B,disabled:ee,"aria-label":`Rename ${p}`,"aria-invalid":H?!0:void 0,"aria-describedby":H?`editor-header-rename-error`:void 0,"aria-busy":ee||void 0,onChange:e=>{V(e.target.value),U(null),re.current=null},onKeyDown:e=>{e.key===`Enter`?(e.preventDefault(),de()):e.key===`Escape`&&(e.preventDefault(),le())},onBlur:()=>void de(),className:`h-7 min-w-0 flex-1 border-none bg-background text-sm shadow-none focus-visible:ring-0`}),(0,X.jsx)(`span`,{"aria-hidden":`true`,className:`shrink-0 text-xs text-muted-foreground/40`,children:`.md`})]}),H&&(0,X.jsx)(`span`,{id:`editor-header-rename-error`,role:`alert`,className:`text-xs text-destructive mt-0.5`,children:H})]}):(0,X.jsxs)(q,{variant:`ghost`,size:`sm`,onClick:se,className:`h-7 shrink-0 px-2 text-sm font-normal text-muted-foreground hover:text-foreground`,children:[P,`.md`]})]}):(0,X.jsx)(`span`,{className:`text-sm text-muted-foreground truncate min-w-0`,children:O}),t[33]=p,t[34]=de,t[35]=O,t[36]=se,t[37]=P,t[38]=E,t[39]=ee,t[40]=R,t[41]=M,t[42]=H,t[43]=B,t[44]=ge):ge=t[44];let _e;t[45]!==p||t[46]!==F||t[47]!==L?(_e=p&&(0,X.jsxs)(sn,{children:[(0,X.jsx)(en,{asChild:!0,children:(0,X.jsx)(q,{variant:`ghost`,size:`sm`,className:`h-7 w-7 p-0 shrink-0 text-muted-foreground`,onClick:L,"aria-label":F?`Unpin — resume following agent`:`Pin this doc — stop following agent`,"aria-pressed":F,"data-pinned":F?`true`:`false`,children:F?(0,X.jsx)(Qi,{className:`size-4 text-foreground`,fill:`currentColor`}):(0,X.jsx)(Zi,{className:`size-4`})})}),(0,X.jsx)(nn,{children:F?`Pinned — click to resume following agent navigation`:`Pin to stay on this doc — browser won’t auto-navigate to the agent’s current focus`})]}),t[45]=p,t[46]=F,t[47]=L,t[48]=_e):_e=t[48];let ve;t[49]===D?ve=t[50]:(ve=D&&(0,X.jsx)(Hl,{variant:`dashed`,children:`New file`}),t[49]=D,t[50]=ve);let ye;t[51]!==me||t[52]!==ge||t[53]!==_e||t[54]!==ve?(ye=(0,X.jsxs)(`div`,{className:`flex flex-1 items-center gap-1 px-3 min-w-0`,children:[me,he,ge,_e,ve]}),t[51]=me,t[52]=ge,t[53]=_e,t[54]=ve,t[55]=ye):ye=t[55];let be;t[56]!==p||t[57]!==n||t[58]!==r||t[59]!==T?(be=p&&(0,X.jsxs)(Ne,{type:`single`,value:n===`source`?`source`:`visual`,onValueChange:e=>{e&&r(e===`source`?`source`:`wysiwyg`)},"aria-label":`Editor mode`,variant:`segmented`,size:`sm`,spacing:1,className:`bg-muted dark:bg-background p-0.5 rounded-lg shrink-0`,disabled:!p,children:[(0,X.jsxs)(sn,{children:[(0,X.jsx)(en,{asChild:!0,children:(0,X.jsx)(`span`,{children:(0,X.jsxs)(ke,{value:`visual`,"aria-label":`Visual editor`,className:`gap-1.5 text-xs`,children:[(0,X.jsx)(vC,{className:`size-4 text-muted-foreground`}),(0,X.jsx)(`span`,{className:`hidden md:inline`,children:`Visual`})]})})}),(0,X.jsx)(nn,{className:`md:hidden`,children:`Visual`})]}),(0,X.jsxs)(sn,{children:[(0,X.jsx)(en,{asChild:!0,children:(0,X.jsx)(`span`,{tabIndex:T?0:void 0,children:(0,X.jsxs)(ke,{value:`source`,"aria-label":`Markdown source`,className:`gap-1.5 text-xs`,disabled:T,children:[(0,X.jsx)(_C,{className:`size-4 text-muted-foreground`}),(0,X.jsx)(`span`,{className:`hidden md:inline`,children:`Markdown`})]})})}),T&&!p?null:T?(0,X.jsx)(nn,{children:`Source mode requires a live connection — your edits are saved and will appear when you reconnect.`}):(0,X.jsx)(nn,{className:`md:hidden`,children:`Markdown`})]})]}),t[56]=p,t[57]=n,t[58]=r,t[59]=T,t[60]=be):be=t[60];let xe;t[61]!==o||t[62]!==s||t[63]!==c?(xe=o===`timeline`&&(0,X.jsx)(`div`,{className:`flex items-center gap-2 shrink-0`,children:(0,X.jsxs)(sn,{children:[(0,X.jsx)(en,{asChild:!0,children:(0,X.jsxs)(Ne,{type:`single`,value:s,onValueChange:e=>{e&&c(e)},"aria-label":`Diff layout`,variant:`segmented`,size:`sm`,spacing:1,className:`bg-muted dark:bg-background p-0.5 rounded-lg shrink-0`,children:[(0,X.jsxs)(ke,{value:`unified`,"aria-label":`Unified diff`,className:`gap-1 text-xs px-2`,children:[(0,X.jsx)(ra,{className:`size-3.5`}),(0,X.jsx)(`span`,{className:`hidden md:inline`,children:`Unified`})]}),(0,X.jsxs)(ke,{value:`split`,"aria-label":`Split diff`,className:`gap-1 text-xs px-2`,children:[(0,X.jsx)(mi,{className:`size-3.5`}),(0,X.jsx)(`span`,{className:`hidden md:inline`,children:`Split`})]})]})}),(0,X.jsx)(nn,{children:`Layout for expanded Timeline diffs`})]})}),t[61]=o,t[62]=s,t[63]=c,t[64]=xe):xe=t[64];let Se;t[65]===f?Se=t[66]:(Se=f&&(0,X.jsxs)(sn,{children:[(0,X.jsx)(en,{asChild:!0,children:(0,X.jsx)(q,{variant:`ghost`,size:`icon-sm`,"aria-label":`Clone from GitHub`,onClick:f,className:`text-muted-foreground`,children:(0,X.jsx)(ji,{className:`size-3.5`})})}),(0,X.jsx)(nn,{children:`Clone from GitHub…`})]}),t[65]=f,t[66]=Se);let Ce;t[67]!==p||t[68]!==i||t[69]!==a?(Ce=p&&(0,X.jsxs)(sn,{children:[(0,X.jsx)(en,{asChild:!0,children:(0,X.jsx)(q,{variant:`ghost`,size:`icon-sm`,"aria-label":`Checkpoint version`,onClick:i,disabled:a,className:`text-muted-foreground`,children:(0,X.jsx)(ia,{className:`size-3.5`})})}),(0,X.jsx)(nn,{children:a?`Saving…`:`Checkpoint version`})]}),t[67]=p,t[68]=i,t[69]=a,t[70]=Ce):Ce=t[70];let we;t[71]!==p||t[72]!==w?(we=p&&(0,X.jsx)(fC,{input:w}),t[71]=p,t[72]=w,t[73]=we):we=t[73];let Te;t[74]!==d||t[75]!==u||t[76]!==l?(Te=(0,X.jsx)(jC,{onSignIn:l,onSetIdentity:u,onOpenConflictResolver:d}),t[74]=d,t[75]=u,t[76]=l,t[77]=Te):Te=t[77];let Ee,De,Oe,Ae;t[78]===Symbol.for(`react.memo_cache_sentinel`)?(Ee=(0,X.jsx)(HS,{}),De=(0,X.jsx)(Pv,{orientation:`vertical`,className:`h-4 shrink-0 data-vertical:self-center`}),Oe=(0,X.jsx)(eC,{}),Ae=(0,X.jsx)(NC,{}),t[78]=Ee,t[79]=De,t[80]=Oe,t[81]=Ae):(Ee=t[78],De=t[79],Oe=t[80],Ae=t[81]);let je;t[82]!==Se||t[83]!==Ce||t[84]!==we||t[85]!==Te?(je=(0,X.jsxs)(`div`,{className:`flex flex-1 items-center justify-end gap-2 px-3`,children:[Se,Ce,we,Te,Ee,De,Oe,Ae]}),t[82]=Se,t[83]=Ce,t[84]=we,t[85]=Te,t[86]=je):je=t[86];let Me;return t[87]!==ye||t[88]!==be||t[89]!==xe||t[90]!==je?(Me=(0,X.jsxs)(`header`,{className:`flex h-12 shrink-0 items-center border-b`,children:[ye,be,xe,je]}),t[87]=ye,t[88]=be,t[89]=xe,t[90]=je,t[91]=Me):Me=t[91],Me}function RC(){let e=(0,Q.c)(44),[t,n]=Ef(),[r,i]=(0,Z.useState)(t),[a,o]=(0,Z.useState)(!1),[s,c]=(0,Z.useState)(!1),[l,u]=(0,Z.useState)(`auth`),[d,f]=(0,Z.useState)(!1),[p,m]=(0,Z.useState)(!1),[h,g]=(0,Z.useState)(`unified`),[_,v]=(0,Z.useState)(ig[0].id),[y,b]=(0,Z.useState)(!1),x=(0,Z.useRef)(!1),S=Of(),{activeDocName:C}=ft(),w,T;e[0]===C?(w=e[1],T=e[2]):(w=()=>{let e=function(e){let t=e.detail;t&&C&&mr(C,{kind:`raw-mdx`,detail:t}),i(`source`)};return window.addEventListener(ut,e),()=>window.removeEventListener(ut,e)},T=[C],e[0]=C,e[1]=w,e[2]=T),(0,Z.useEffect)(w,T);let E;e[3]===S?E=e[4]:(E=()=>{!x.current&&S?.state===`dormant`&&S.hasRemote&&(x.current=!0,Xt.info(`This project has a GitHub remote.`,{description:`Sign in to enable automatic sync with your team.`,duration:8e3,action:{label:`Sign in`,onClick:()=>c(!0)}}))},e[3]=S,e[4]=E);let D=S?.state,O=S?.hasRemote,k;e[5]!==D||e[6]!==O?(k=[D,O],e[5]=D,e[6]=O,e[7]=k):k=e[7],(0,Z.useEffect)(E,k);let A;e[8]===n?A=e[9]:(A=function(e){i(e),n(e)},e[8]=n,e[9]=A);let j=A,M;e[10]===Symbol.for(`react.memo_cache_sentinel`)?(M=async function(){b(!0);try{let e=await fetch(`/api/save-version`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({})});e.ok?Xt.success(`Checkpoint saved`):(console.error(`[save-version] failed:`,await e.text()),Xt.error(`Checkpoint failed — try again`))}catch(e){console.error(`[save-version] failed:`,e),Xt.error(`Checkpoint failed — try again`)}b(!1)},e[10]=M):M=e[10];let N=M,P;e[11]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,X.jsx)(Uf,{onOpenResolver:()=>o(!0)}),e[11]=P):P=e[11];let F,I,L,R;e[12]===Symbol.for(`react.memo_cache_sentinel`)?(R=()=>{u(`auth`),c(!0)},F=()=>{u(`identity`),c(!0)},I=()=>o(!0),L=()=>f(!0),e[12]=F,e[13]=I,e[14]=L,e[15]=R):(F=e[12],I=e[13],L=e[14],R=e[15]);let z;e[16]!==_||e[17]!==h||e[18]!==r||e[19]!==j||e[20]!==y?(z=(0,X.jsx)(LC,{editorMode:r,onModeChange:j,onSaveVersion:N,saving:y,activeTab:_,diffLayout:h,onDiffLayoutChange:g,onSignIn:R,onSetIdentity:F,onOpenConflictResolver:I,onOpenClone:L}),e[16]=_,e[17]=h,e[18]=r,e[19]=j,e[20]=y,e[21]=z):z=e[21];let B;e[22]!==_||e[23]!==h||e[24]!==r?(B=(0,X.jsx)(Dx,{editorMode:r,diffLayout:h,activeTab:_,onActiveTabChange:v}),e[22]=_,e[23]=h,e[24]=r,e[25]=B):B=e[25];let V;e[26]===a?V=e[27]:(V=(0,X.jsx)(Gm,{open:a,onOpenChange:o}),e[26]=a,e[27]=V);let H;e[28]===Symbol.for(`react.memo_cache_sentinel`)?(H=e=>{c(e),e||m(!1)},e[28]=H):H=e[28];let U=l===`identity`,ee;e[29]===p?ee=e[30]:(ee=()=>{c(!1),p&&(m(!1),f(!0))},e[29]=p,e[30]=ee);let W;e[31]!==s||e[32]!==U||e[33]!==ee?(W=(0,X.jsx)(If,{open:s,onOpenChange:H,identityPrompt:U,onSuccess:ee}),e[31]=s,e[32]=U,e[33]=ee,e[34]=W):W=e[34];let te;e[35]===Symbol.for(`react.memo_cache_sentinel`)?(te=()=>{f(!1),u(`auth`),m(!0),c(!0)},e[35]=te):te=e[35];let G;e[36]===d?G=e[37]:(G=(0,X.jsx)(Vf,{open:d,onOpenChange:f,onSignIn:te}),e[36]=d,e[37]=G);let ne;return e[38]!==z||e[39]!==B||e[40]!==V||e[41]!==W||e[42]!==G?(ne=(0,X.jsxs)(X.Fragment,{children:[P,z,B,V,W,G]}),e[38]=z,e[39]=B,e[40]=V,e[41]=W,e[42]=G,e[43]=ne):ne=e[43],ne}var zC=`<svg data-icon-sprite aria-hidden="true" width="0" height="0">
|
|
29
|
-
<symbol id="file-tree-icon-chevron" viewBox="0 0 16 16">
|
|
30
|
-
<path d="M3.47 5.47a.75.75 0 0 1 1.06 0L8 8.94l3.47-3.47a.75.75 0 1 1 1.06 1.06l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 0 1 0-1.06" fill="currentcolor"/>
|
|
31
|
-
</symbol>
|
|
32
|
-
<symbol id="file-tree-icon-dot" viewBox="0 0 6 6">
|
|
33
|
-
<circle cx="3" cy="3" r="3" />
|
|
34
|
-
</symbol>
|
|
35
|
-
<symbol id="file-tree-icon-file" viewBox="0 0 16 16">
|
|
36
|
-
<path fill="currentColor" d="M8 1v3a3 3 0 0 0 3 3h3v5.5a2.5 2.5 0 0 1-2.5 2.5h-7A2.5 2.5 0 0 1 2 12.5v-9A2.5 2.5 0 0 1 4.5 1z" class="bg" opacity=".5"/>
|
|
37
|
-
<path fill="currentColor" d="M9.5 1a.5.5 0 0 1 .354.146l4 4A.5.5 0 0 1 14 5.5V6h-3a2 2 0 0 1-2-2V1z" class="fg"/>
|
|
38
|
-
</symbol>
|
|
39
|
-
<symbol id="file-tree-icon-lock" viewBox="0 0 16 16">
|
|
40
|
-
<path fill="currentcolor" d="M4 5.336V4a4 4 0 1 1 8 0v1.336c1.586.54 2 1.843 2 4.664v1c0 4.118-.883 5-5 5H7c-4.117 0-5-.883-5-5v-1c0-2.821.414-4.124 2-4.664M5.5 4v1.054Q6.166 4.998 7 5h2q.834-.002 1.5.054V4a2.5 2.5 0 0 0-5 0m-2 6v1c0 .995.055 1.692.167 2.193.107.483.246.686.35.79s.307.243.79.35c.5.112 1.198.167 2.193.167h2c.995 0 1.692-.055 2.193-.166.483-.108.686-.247.79-.35.104-.105.243-.308.35-.791.112-.5.167-1.198.167-2.193v-1c0-.995-.055-1.692-.166-2.193-.108-.483-.247-.686-.35-.79-.105-.104-.308-.243-.791-.35C10.693 6.555 9.995 6.5 9 6.5H7c-.995 0-1.692.055-2.193.167-.483.107-.686.246-.79.35s-.243.307-.35.79C3.555 8.307 3.5 9.005 3.5 10" />
|
|
41
|
-
</symbol>
|
|
42
|
-
<symbol id="file-tree-icon-ellipsis" viewBox="0 0 16 16">
|
|
43
|
-
<path d="M5 8.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0M9.5 8.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0M14 8.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0" />
|
|
44
|
-
</symbol>
|
|
45
|
-
</svg>`,BC=`<symbol id="file-tree-builtin-astro" viewBox="0 0 16 16">
|
|
46
|
-
<path fill="currentColor" d="M6.08 13.92c-.63-.57-.81-1.79-.55-2.67.45.56 1.08.73 1.73.83 1 .15 1.99.1 2.92-.37l.32-.19q.13.38.08.78a2.1 2.1 0 0 1-.9 1.5q-.3.24-.61.43c-.64.44-.81.95-.57 1.69l.02.08a1.7 1.7 0 0 1-.74-.64 2 2 0 0 1-.3-.98q0-.27-.02-.52-.07-.61-.61-.62a.7.7 0 0 0-.75.6z" class="bg" opacity=".6"/>
|
|
47
|
-
<path fill="currentColor" d="M2.5 11.1s1.86-.9 3.72-.9l1.4-4.39c.05-.21.2-.36.38-.36s.33.15.38.36l1.4 4.38c2.2 0 3.72.92 3.72.92l-3.16-8.69q-.13-.4-.45-.42H6.11q-.3.02-.45.42z" class="fg"/>
|
|
48
|
-
</symbol>`,VC=`<symbol id="file-tree-builtin-babel" viewBox="0 0 16 16">
|
|
49
|
-
<path fill="currentColor" fill-rule="evenodd" d="M9.49.5q1.92.05 2.66.54 1.27.6 1.35 1.52v.23a4 4 0 0 1-.53 1.9l-1.38 1.24q-.74.38-.72.63c.77.82 1.33 1.29.85 2.42q-.47 1.1-2.04 2.28c-.5.32-1.88 1.35-2.96 1.86-1.64.77-3.1 1.4-4.65 1.89-.51.16-1.5.16-1.5.16L.5 15A76 76 0 0 0 5.76 3.49q-.1-.08-.1-.2.1 0 .32-.35l-.03-.09q-1.17.39-2.38 1.3l-.13.03q0-.1-.21-.16-.46.31-.82.7l-.13-.19.16-.06-.03-.16-.34.29L2 4.5q.36-.48.72-.54l.04-.1V3.8q.16 0 .15-.06l.13-.06a6 6 0 0 0 1.13-.9v-.03H4.1l-.12.07q0-.1-.1-.1l-.15.07-.04-.1q.93-.52 1.63-1.05Q7.89.65 9.5.5M8.46 7.83l-.32.04c-1.31.54-2.31.82-2.91.88a71 71 0 0 0-2.2 4.54h.07q.58-.04 3.04-1.42.13 0 1.66-1.05L9.18 9.7v.03q.45-.2.81-1.3v-.2q-.5-.46-1.53-.4m.28-5.75c-.5.1-.75.19-.72.38l-1.16 2.6q-.17.1-.34.95-.3.48-.25.77v.1l.22.05A15 15 0 0 1 8.86 6c1.1-.71 2.12-1.38 2.8-2.54q.24-.33.21-.54-.02-.33-.4-.54c-.54 0-1.07-.34-1.63-.28l-.94-.03z" clip-rule="evenodd"/>
|
|
50
|
-
</symbol>`,HC=`<symbol id="file-tree-builtin-bash" viewBox="0 0 16 16">
|
|
51
|
-
<path fill="currentColor" d="M8 1C2.24 1 1 2.24 1 8s1.24 7 7 7 7-1.24 7-7-1.24-7-7-7" class="bg" opacity=".2"/>
|
|
52
|
-
<path fill="currentColor" d="M11.5 11a.5.5 0 0 1 0 1h-3a.5.5 0 0 1 0-1zM7 6.75C7 6.42 6.64 6 6 6s-1 .42-1 .75q-.01.25.22.41.26.21.89.35.74.14 1.28.53c.37.29.61.7.61 1.21 0 .87-.68 1.5-1.5 1.7v.55a.5.5 0 0 1-1 0v-.56c-.82-.18-1.5-.82-1.5-1.69a.5.5 0 0 1 1 0c0 .33.36.75 1 .75s1-.42 1-.75q.01-.25-.22-.41a2 2 0 0 0-.89-.35q-.74-.14-1.28-.53A1.5 1.5 0 0 1 4 6.75c0-.87.68-1.5 1.5-1.7V4.5a.5.5 0 0 1 1 0v.56c.82.18 1.5.82 1.5 1.69a.5.5 0 0 1-1 0" class="fg-stroke"/>
|
|
53
|
-
</symbol>`,UC=`<symbol id="file-tree-builtin-biome" viewBox="0 0 16 16">
|
|
54
|
-
<path fill="currentColor" d="M8 2 4.88 7.35a7 7 0 0 1 3.7-.13l1.04.25-.99 4.16-1.05-.25a2.7 2.7 0 0 0-3.07 1.45l-.98-.47a4 4 0 0 1 1.07-1.31 3.8 3.8 0 0 1 3.23-.71l.5-2.08a6 6 0 0 0-5.07 1.12A5.9 5.9 0 0 0 1 14h14z"/>
|
|
55
|
-
</symbol>`,WC=`<symbol id="file-tree-builtin-bootstrap" viewBox="0 0 16 16">
|
|
56
|
-
<path fill="currentColor" fill-rule="evenodd" d="M11.72 1.5A2.5 2.5 0 0 1 14.2 4q.02 1.08.3 2.09c.22.73.56 1.24 1.08 1.45.22.08.4.27.4.5s-.18.43-.4.51q-.76.34-1.08 1.45c-.2.65-.27 1.32-.3 2a2.5 2.5 0 0 1-2.48 2.5H4.25A2.6 2.6 0 0 1 1.7 12c-.04-.85-.1-1.68-.22-2.04C1.26 9.23.92 8.7.4 8.5.18 8.42 0 8.23 0 8s.18-.42.4-.5q.77-.35 1.09-1.46c.1-.36.17-1.19.2-2.04a2.6 2.6 0 0 1 2.56-2.5z" class="bg" clip-rule="evenodd" opacity=".2"/>
|
|
57
|
-
<path fill="currentColor" fill-rule="evenodd" d="M8.47 4.54c1.23 0 2.04.68 2.04 1.73 0 .73-.55 1.39-1.24 1.5v.04c.94.1 1.58.77 1.58 1.7 0 1.2-.9 1.95-2.37 1.95H5.97a.3.3 0 0 1-.2-.08.3.3 0 0 1-.08-.2V4.82a.3.3 0 0 1 .08-.2.3.3 0 0 1 .2-.08zm-1.7 6.04h1.49q1.47-.01 1.49-1.15Q9.74 8.31 8.2 8.3H6.77zm0-5.16v2.06h1.21c.93 0 1.45-.38 1.45-1.06 0-.65-.44-1-1.22-1z" class="fg" clip-rule="evenodd"/>
|
|
58
|
-
</symbol>`,GC=`<symbol id="file-tree-builtin-browserslist" viewBox="0 0 16 16">
|
|
59
|
-
<path fill="currentColor" d="M8.88 6.96c0 3.82 3.72 4.7 5.7 3.74-.23.9-1.04 1.67-2.35 1.93-.02.4.42 1.28.82 1.63-.9.35-1.94-.12-2.51-.48a5 5 0 0 0-.32 1.87c-.68 0-1.57-1-1.8-1.37-.3.18-.85 1.15-.96 1.72a2.4 2.4 0 0 1-.81-.86 2.4 2.4 0 0 1-.3-1.15c-.38.27-1.48.95-1.99 1.18-.25-.58-.15-1.3 0-2.06-.21.12-1.8.27-2.43.12.32-.36.75-1.19.94-1.57A4.5 4.5 0 0 1 .44 10.6c.48-.22.97-.53 1.49-1.06C1.26 9.17.24 8.64 0 7.7a6 6 0 0 0 1.79-.32C1.28 7.08.44 6.15.6 5.01c.42.21 1.3.37 1.73.3a3.4 3.4 0 0 1-.25-2.75 5 5 0 0 0 1.48 1c-.08-.8.3-2.31.8-2.71.2.46.73 1.21 1.08 1.4.09-.61.87-2.06 1.57-2.25 0 .5.27 1.4.5 1.67.51-.54 2.25-1.44 3.64-1.13-.43.45-.75.61-.86.98 1.05 0 2.78.34 4.27 1.93-2.34-.89-5.69.56-5.69 3.5" class="bg" opacity=".5"/>
|
|
60
|
-
<path fill="currentColor" d="M11.21 3.59a4.1 4.1 0 0 0 2.47 2.89c.24-.22.61-.38.95-.19.76.44.2 1.26-.34 1.66l-.07.06a13 13 0 0 1-4.49 1.61l-.3-.43a10.5 10.5 0 0 0 4.13-1.31 1 1 0 0 0 .23-.25.5.5 0 0 0-.21-.69l-.15-.06a4.5 4.5 0 0 1-1.77-1.31 4.5 4.5 0 0 1-.88-1.77q.2-.12.43-.21"/>
|
|
61
|
-
<path fill="currentColor" d="M10.36 5.18a.4.4 0 0 0-.03.38c.09.2.3.3.46.23s.24-.3.15-.5l-.01-.02q.23.13.34.39a.83.83 0 0 1-.43 1.08.8.8 0 0 1-1.08-.43.83.83 0 0 1 .6-1.13"/>
|
|
62
|
-
</symbol>`,KC=`<symbol id="file-tree-builtin-bun" viewBox="0 0 16 16">
|
|
63
|
-
<path fill="currentColor" d="M8 14c3.87 0 7-2.46 7-5.49 0-1.88-1.2-3.53-3.04-4.52q-1.1-.61-1.84-1.07C9.2 2.35 8.64 2 8 2s-1.36.45-2.31 1.03A29 29 0 0 1 4.04 4C2.2 4.98 1 6.63 1 8.51 1 11.54 4.13 14 8 14M7.18 3.88q.3-.66.3-1.37c0-.08.11-.1.13-.01.38 1.57-.53 2.35-1.2 2.61-.08.03-.12-.07-.06-.12a3 3 0 0 0 .83-1.12m1.2-.05a3 3 0 0 0-.45-1.3V2.5c-.04-.07.05-.15.1-.1 1.15 1.2.77 2.3.33 2.87-.05.05-.13 0-.11-.08q.21-.67.13-1.37m1.04-.32a3 3 0 0 0-.94-1.02v-.01c-.06-.05-.01-.16.07-.12 1.51.61 1.61 1.8 1.43 2.5l-.03.03a.07.07 0 0 1-.1-.06 3 3 0 0 0-.43-1.32m-2.97.32c-.36.3-.74.43-1.2.56q-.11 0-.1-.1a3.5 3.5 0 0 0 1.76-1.57s.09-.07.1.04c0 .18-.2.76-.56 1.07m2.89 6.36q-.13.52-.55.88a1.3 1.3 0 0 1-.75.35 1.3 1.3 0 0 1-.77-.35 1.7 1.7 0 0 1-.54-.88.13.13 0 0 1 .15-.15h2.31a.14.14 0 0 1 .15.15M6.15 8.95a1.1 1.1 0 0 1-1.39-.14A1.1 1.1 0 0 1 5.12 7a1.1 1.1 0 0 1 1.2.25 1.1 1.1 0 0 1-.17 1.69m4.96 0a1.1 1.1 0 0 1-1.4-.14 1.1 1.1 0 0 1 .37-1.8 1.1 1.1 0 0 1 1.2.25 1.1 1.1 0 0 1 .24 1.2 1 1 0 0 1-.41.5"/>
|
|
64
|
-
</symbol>`,qC=`<symbol id="file-tree-builtin-claude" viewBox="0 0 16 16">
|
|
65
|
-
<path fill="currentColor" d="M3.75 10.31 6.5 8.77l.04-.14-.04-.07h-.14l-.46-.03-1.57-.04-1.38-.07-1.33-.07-.34-.07L1 7.86l.03-.21.28-.18.4.03.89.07 1.33.08.97.06 1.43.16h.22l.03-.1-.07-.05-.06-.06-1.39-.92-1.48-.98-.79-.57-.42-.28-.2-.28-.1-.6.39-.41.52.04.12.03.52.4 1.12.86L6.2 6.04l.2.17.09-.06.01-.04-.1-.15-.76-1.46-.85-1.46-.37-.6-.1-.36a1 1 0 0 1-.06-.42l.42-.59.25-.07.6.08.22.2.36.84.58 1.3.9 1.77.29.53.14.47.04.14h.1v-.07l.07-1 .14-1.22.14-1.57.04-.45.23-.53.42-.28.36.15.28.41-.04.25-.16 1.08-.36 1.7-.21 1.14h.12l.14-.15.58-.76.97-1.2.42-.5.5-.51.32-.25h.6l.44.66-.2.68-.61.79-.52.65-.74 1-.45.8.04.05h.1l1.68-.36.9-.16 1.06-.18.5.23.05.22-.2.48-1.15.28-1.34.28-2 .46-.04.01.03.04.9.09.4.03h.94l1.77.14.46.28.27.37-.04.28-.72.37-.95-.23-2.24-.53-.76-.18h-.11v.06l.64.63L12 10.86l1.48 1.35.07.34-.18.28-.2-.03-1.29-.98-.5-.42-1.12-.95h-.07v.1l.25.38 1.37 2.05.07.63-.1.2-.36.14-.38-.08-.8-1.12-.85-1.26-.66-1.15-.07.05-.4 4.23-.19.21-.42.17-.35-.28-.2-.42.2-.87.23-1.12.18-.9.17-1.1.1-.36v-.03h-.1l-.84 1.16-1.27 1.72-1 1.07-.24.1-.42-.22.04-.39.22-.32 1.4-1.8.84-1.1.57-.64-.02-.07h-.04l-3.7 2.4-.66.09-.28-.28.03-.42.14-.14 1.12-.77z"/>
|
|
66
|
-
</symbol>`,JC=`<symbol id="file-tree-builtin-css" viewBox="0 0 16 16">
|
|
67
|
-
<path fill="currentColor" d="M8 15c-5.76 0-7-1.24-7-7V2a1 1 0 0 1 1-1h6c5.77 0 7 1.24 7 7s-1.24 7-7 7" class="vector" opacity=".2"/>
|
|
68
|
-
<path fill="currentColor" d="M10.1 9.19h.73c.03.49.22.6 1 .6.76 0 .93-.12.93-.68 0-.52-.17-.67-.94-.85-1.38-.3-1.68-.56-1.68-1.47 0-1.05.3-1.29 1.67-1.29 1.29 0 1.57.2 1.6 1.13h-.74c-.01-.34-.17-.42-.85-.42-.77 0-.94.1-.94.58 0 .42.17.55.96.73 1.36.3 1.66.58 1.66 1.59 0 1.14-.31 1.39-1.73 1.39-1.39 0-1.69-.24-1.67-1.31m-3.9 0h.74c.03.49.21.6.99.6.76 0 .93-.12.93-.68 0-.52-.17-.67-.93-.85-1.39-.3-1.69-.56-1.69-1.47 0-1.05.3-1.29 1.67-1.29 1.3 0 1.58.2 1.6 1.13h-.73c-.02-.34-.18-.42-.85-.42-.78 0-.95.1-.95.58 0 .42.17.55.96.73 1.37.3 1.67.58 1.67 1.59 0 1.14-.32 1.39-1.74 1.39-1.38 0-1.68-.24-1.66-1.31m-1.22 0h.75c-.09 1.07-.37 1.31-1.56 1.31-1.37 0-1.68-.45-1.68-2.5 0-1.96.36-2.5 1.68-2.5 1.16 0 1.44.25 1.52 1.35h-.76c-.08-.52-.22-.64-.76-.64-.74 0-.9.33-.9 1.78 0 1.47.16 1.8.9 1.8.58 0 .74-.11.8-.6"/>
|
|
69
|
-
</symbol>`,YC=`<symbol id="file-tree-builtin-database" viewBox="0 0 16 16">
|
|
70
|
-
<path fill="currentColor" d="M14.953 9.733a12.4 12.4 0 0 1-.244 1.936c-.207.933-.532 1.58-.996 2.044s-1.11.789-2.044.996C10.73 14.918 9.533 15 8 15s-2.73-.082-3.669-.291c-.933-.207-1.58-.532-2.044-.996s-.789-1.11-.996-2.044c-.122-.547-.2-1.182-.244-1.92q.23.364.532.667c.64.639 1.482 1.031 2.533 1.265 1.046.232 2.33.315 3.884.315 1.555 0 2.838-.083 3.884-.315 1.051-.234 1.893-.626 2.532-1.265a4 4 0 0 0 .541-.683"/>
|
|
71
|
-
<path fill="currentColor" d="M14.93 5.924c-.046.663-.118 1.24-.23 1.743-.207.932-.532 1.579-.995 2.042s-1.11.789-2.042.996c-.938.209-2.135.291-3.667.291-1.531 0-2.729-.082-3.667-.29-.932-.208-1.579-.534-2.042-.997s-.789-1.11-.996-2.042a12 12 0 0 1-.227-1.683l.016-.188a4 4 0 0 0 .5.62c.638.639 1.48 1.031 2.532 1.265 1.046.232 2.33.315 3.884.315 1.555 0 2.838-.083 3.884-.315 1.051-.234 1.893-.626 2.532-1.265.192-.192.357-.404.506-.633z"/>
|
|
72
|
-
<path fill="currentColor" d="M8 1c1.533 0 2.73.082 3.669.291.933.207 1.58.533 2.044.996.403.404.904.944.91 1.695.004.764-.509 1.318-.918 1.727-.463.463-1.11.789-2.042.996-.938.209-2.135.291-3.667.291-1.531 0-2.729-.082-3.667-.29-.932-.208-1.579-.534-2.042-.997-.406-.406-.915-.953-.915-1.71 0-.758.509-1.305.915-1.712.464-.463 1.11-.789 2.044-.996C5.27 1.082 6.467 1 8 1"/>
|
|
73
|
-
</symbol>`,XC=`<symbol id="file-tree-builtin-default" viewBox="0 0 16 16">
|
|
74
|
-
<path fill="currentColor" d="M8 1v3a3 3 0 0 0 3 3h3v5.5a2.5 2.5 0 0 1-2.5 2.5h-7A2.5 2.5 0 0 1 2 12.5v-9A2.5 2.5 0 0 1 4.5 1z" class="bg" opacity=".4"/>
|
|
75
|
-
<path fill="currentColor" d="M9.5 1a.5.5 0 0 1 .354.146l4 4A.5.5 0 0 1 14 5.5V6h-3a2 2 0 0 1-2-2V1z" class="fg"/>
|
|
76
|
-
</symbol>`,ZC=`<symbol id="file-tree-builtin-docker" viewBox="0 0 16 16">
|
|
77
|
-
<path fill="currentColor" d="M15.85 6.54c-.05-.04-.45-.36-1.31-.36q-.34 0-.68.06a2.7 2.7 0 0 0-1.14-1.79l-.23-.14-.15.23a3 3 0 0 0-.4 1q-.24 1.01.26 1.84c-.4.24-1.03.3-1.17.3H.5a.5.5 0 0 0-.5.52q-.01 1.46.46 2.83.55 1.5 1.6 2.18c.79.5 2.08.79 3.54.79q.96 0 1.94-.18a8 8 0 0 0 2.55-.97 7 7 0 0 0 1.73-1.5 10 10 0 0 0 1.7-3.06h.15a2.4 2.4 0 0 0 1.8-.7 2 2 0 0 0 .47-.74l.06-.2z"/>
|
|
78
|
-
<path fill="currentColor" d="M1.48 7.36h1.4a.14.14 0 0 0 .14-.13V5.91q-.01-.12-.13-.14H1.48a.13.13 0 0 0-.13.14v1.32q.02.13.13.13m1.94 0h1.41a.14.14 0 0 0 .13-.13V5.91q-.01-.12-.13-.14h-1.4a.13.13 0 0 0-.13.14v1.32q0 .13.12.13m1.98 0h1.4q.13 0 .14-.13V5.91a.13.13 0 0 0-.14-.14H5.4q-.1.01-.12.14v1.32q0 .13.12.13m1.95 0h1.42q.1 0 .12-.13V5.91q0-.12-.12-.14H7.35q-.1.01-.12.14v1.32q.01.13.12.13M3.42 5.5h1.41c.07 0 .13-.08.13-.15V4.03a.13.13 0 0 0-.13-.14h-1.4q-.12 0-.13.14v1.31q0 .13.12.15m1.98 0h1.4c.08 0 .14-.08.14-.15V4.03q0-.13-.14-.14H5.4q-.1 0-.12.14v1.31q0 .13.12.15m1.95 0h1.42c.06 0 .12-.08.12-.15V4.03q-.01-.13-.12-.14H7.35q-.1 0-.12.14v1.31q.01.13.12.15m0-1.9h1.42q.1-.02.12-.14v-1.3Q8.88 2 8.77 2H7.35q-.1 0-.12.14v1.3q.01.13.12.14m1.97 3.78h1.4a.13.13 0 0 0 .14-.13V5.91q-.01-.12-.13-.14H9.32q-.1.01-.12.14v1.32q.01.13.12.13" opacity=".5"/>
|
|
79
|
-
</symbol>`,QC=`<symbol id="file-tree-builtin-eslint" viewBox="0 0 16 16">
|
|
80
|
-
<path fill="currentColor" d="M11.16 6.1 8.12 4.35a.3.3 0 0 0-.24 0L4.84 6.1a.3.3 0 0 0-.12.2v3.5q0 .14.12.22l3.04 1.74q.12.08.24 0l3.04-1.74a.2.2 0 0 0 .13-.22V6.3a.3.3 0 0 0-.13-.2" opacity=".5"/>
|
|
81
|
-
<path fill="currentColor" d="m.1 7.69 3.63-6.3A.8.8 0 0 1 4.37 1h7.26c.26 0 .5.17.64.4l3.63 6.27a.8.8 0 0 1 0 .75l-3.63 6.24a.7.7 0 0 1-.64.34H4.37a.7.7 0 0 1-.64-.34L.1 8.41a.7.7 0 0 1 0-.72m3 3.02q.01.15.14.23l4.63 2.66q.13.06.26 0l4.63-2.66a.3.3 0 0 0 .14-.23V5.4a.3.3 0 0 0-.14-.23L8.13 2.52a.3.3 0 0 0-.26 0L3.24 5.17a.3.3 0 0 0-.14.23z"/>
|
|
82
|
-
</symbol>`,$C=`<symbol id="file-tree-builtin-font" viewBox="0 0 16 16">
|
|
83
|
-
<path fill="currentColor" d="M12.3 13c-1.59 0-2.68-.99-2.68-2.5 0-1.43 1-2.34 2.88-2.35h2.16v-.83c0-1.08-.62-1.68-1.73-1.68-1.05 0-1.66.54-1.73 1.36H9.93c.09-1.43 1.06-2.48 3.05-2.48 1.75 0 3.02.95 3.02 2.68v5.66h-1.29v-1.02h-.04c-.41.66-1.16 1.16-2.37 1.16m.36-1.12c1.14 0 2-.72 2-1.74v-.96H12.6c-1.12 0-1.6.54-1.6 1.28 0 .97.8 1.42 1.66 1.42m-11.24.98H0L3.8 2h1.39l3.8 10.86H7.54l-1.08-3.2H2.5zm3.09-9.25h-.04l-1.6 4.95H6.1z"/>
|
|
84
|
-
</symbol>`,ew=`<symbol id="file-tree-builtin-git" viewBox="0 0 16 16">
|
|
85
|
-
<path fill="currentColor" d="M14.74 7.38 8.62 1.26a.9.9 0 0 0-1.27 0L6.08 2.53l1.61 1.61a1.07 1.07 0 0 1 1.36 1.37l1.55 1.55a1.07 1.07 0 0 1 1.1 1.77 1.07 1.07 0 0 1-1.74-1.16L8.5 6.22v3.8a1.07 1.07 0 1 1-.89-.02V6.15a1.07 1.07 0 0 1-.58-1.4l-1.58-1.6-4.2 4.2a.9.9 0 0 0 0 1.27l6.12 6.12a.9.9 0 0 0 1.27 0l6.09-6.09a.9.9 0 0 0 0-1.27"/>
|
|
86
|
-
</symbol>`,tw=`<symbol id="file-tree-builtin-go" viewBox="0 0 16 16">
|
|
87
|
-
<path fill="currentColor" fill-rule="evenodd" d="M4.41 4.57A3.2 3.2 0 0 1 6.87 5q.74.49 1.08 1.29.08.12-.1.16l-1.55.4c-.14.03-.15.04-.27-.1a1 1 0 0 0-.44-.34 1.6 1.6 0 0 0-1.68.14q-.95.61-.94 1.73c0 .73.52 1.33 1.25 1.43q.95.1 1.58-.6l.25-.34h-1.8c-.19 0-.24-.12-.17-.27.12-.28.34-.76.47-1a.3.3 0 0 1 .24-.14h2.98a4 4 0 0 1 .64-1.19 4 4 0 0 1 2.6-1.52 3.5 3.5 0 0 1 2.64.46q1.13.73 1.31 2.04a3.5 3.5 0 0 1-1.06 3.09q-.93.92-2.23 1.17l-.74.08a3.5 3.5 0 0 1-2.27-.8 3 3 0 0 1-.93-1.42 4 4 0 0 1-.39.61 4 4 0 0 1-2.64 1.56 3.3 3.3 0 0 1-2.5-.6 3 3 0 0 1-1.18-2.03 3.5 3.5 0 0 1 .8-2.67 4 4 0 0 1 2.6-1.58M13.1 7.5a1.53 1.53 0 0 0-1.9-1.21q-1.3.3-1.62 1.59a1.5 1.5 0 0 0 .85 1.72q.77.33 1.52-.05a2 2 0 0 0 1.18-1.74q0-.17-.03-.3" clip-rule="evenodd"/>
|
|
88
|
-
</symbol>`,nw=`<symbol id="file-tree-builtin-graphql" viewBox="0 0 16 16">
|
|
89
|
-
<path fill="currentColor" fill-rule="evenodd" d="M8 1a1.25 1.25 0 0 1 1.18 1.65l2.8 1.61q.33-.25.77-.26a1.25 1.25 0 0 1 .48 2.4v3.2a1.25 1.25 0 1 1-1.25 2.13l-2.8 1.62A1.25 1.25 0 0 1 8 15a1.25 1.25 0 0 1-1.18-1.65l-2.8-1.62q-.33.26-.77.27a1.25 1.25 0 0 1-.48-2.4V6.4a1.25 1.25 0 1 1 1.25-2.14l2.8-1.61A1.25 1.25 0 0 1 8 1M4.44 11.14l-.06.13 2.75 1.58a1.25 1.25 0 0 1 1.74 0l2.74-1.58-.05-.13zm3.89-7.68a1.3 1.3 0 0 1-.66 0L4.03 9.77q.37.3.45.78h7.04q.08-.48.45-.78zM4.38 4.73a1.24 1.24 0 0 1-1.02 1.76v3.02l.13.01 3.67-6.35-.03-.02zm4.46-1.56 3.67 6.35.13-.01V6.49a1.25 1.25 0 0 1-1.03-1.76L8.87 3.15z" clip-rule="evenodd"/>
|
|
90
|
-
</symbol>`,rw=`<symbol id="file-tree-builtin-html" viewBox="0 0 16 16">
|
|
91
|
-
<path fill="currentColor" d="M8 1C2.24 1 1 2.24 1 8s1.24 7 7 7 7-1.24 7-7-1.24-7-7-7" class="bg" opacity=".2"/>
|
|
92
|
-
<path fill="currentColor" d="M10.48 3.76a.5.5 0 0 1 .4.58L10.6 5.8h1.14a.5.5 0 0 1 0 1h-1.32L10 9.2h1.08a.5.5 0 0 1 0 1H9.8l-.3 1.64a.5.5 0 1 1-.98-.18l.27-1.46H6.4l-.3 1.64a.5.5 0 1 1-.98-.18l.27-1.46H4.25a.5.5 0 0 1 0-1h1.32L6 6.8H4.93a.5.5 0 0 1 0-1H6.2l.3-1.64a.5.5 0 1 1 .98.18L7.2 5.8h2.4l.3-1.64a.5.5 0 0 1 .58-.4M6.58 9.2h2.4l.44-2.4h-2.4z" class="fg"/>
|
|
93
|
-
</symbol>`,iw=`<symbol id="file-tree-builtin-image" viewBox="0 0 16 16">
|
|
94
|
-
<path fill="currentColor" d="M12.5 2A2.5 2.5 0 0 1 15 4.5v4.67l-4.05-3.54-4.08 4.08-3-2L1 10.6V4.5A2.5 2.5 0 0 1 3.5 2z" opacity=".3"/>
|
|
95
|
-
<path fill="currentColor" d="M15 10.5v1a2.5 2.5 0 0 1-2.5 2.5h-9a2.5 2.5 0 0 1-2.46-2.04L4 9l3 2 4-4zm-7-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0"/>
|
|
96
|
-
</symbol>`,aw=`<symbol id="file-tree-builtin-javascript" viewBox="0 0 16 16">
|
|
97
|
-
<path fill="currentColor" d="M8 1C2.24 1 1 2.24 1 8s1.24 7 7 7 7-1.24 7-7-1.24-7-7-7" class="bg" opacity=".2"/>
|
|
98
|
-
<path fill="currentColor" d="M8.1 9.64h.95c.04.62.28.76 1.28.76s1.2-.14 1.2-.85c0-.66-.2-.85-1.2-1.07-1.79-.38-2.18-.7-2.18-1.86C8.15 5.3 8.54 5 10.31 5c1.67 0 2.04.26 2.07 1.42h-.95c-.02-.43-.23-.53-1.1-.53-1 0-1.22.14-1.22.74 0 .52.22.7 1.24.92 1.76.38 2.15.73 2.15 2 0 1.44-.4 1.75-2.24 1.75-1.8 0-2.18-.3-2.15-1.66M3.5 9.5h.98c0 .76.15.92.85.92.77 0 .94-.18.94-1.02V5.1h1v4.34c0 1.54-.35 1.87-1.92 1.87-1.55 0-1.89-.32-1.86-1.8"/>
|
|
99
|
-
</symbol>`,ow=`<symbol id="file-tree-builtin-json" viewBox="0 0 16 16">
|
|
100
|
-
<path fill="currentColor" d="M13.25 11.5V9.75a.5.5 0 0 1 .36-.48l.55-.15a1.16 1.16 0 0 0 0-2.24l-.55-.15a.5.5 0 0 1-.36-.48V4.5a2.5 2.5 0 0 0-2.5-2.5h-.25a.5.5 0 0 0 0 1h.25a1.5 1.5 0 0 1 1.5 1.5v1.75a1.5 1.5 0 0 0 1.09 1.44l.54.15a.16.16 0 0 1 0 .32l-.54.15a1.5 1.5 0 0 0-1.09 1.44v1.75a1.5 1.5 0 0 1-1.5 1.5h-.25a.5.5 0 0 0 0 1h.25a2.5 2.5 0 0 0 2.5-2.5m-10.5 0V9.75a.5.5 0 0 0-.36-.48l-.55-.15a1.16 1.16 0 0 1 0-2.24l.55-.15a.5.5 0 0 0 .36-.48V4.5A2.5 2.5 0 0 1 5.25 2h.25a.5.5 0 0 1 0 1h-.25a1.5 1.5 0 0 0-1.5 1.5v1.75a1.5 1.5 0 0 1-1.09 1.44l-.54.15a.16.16 0 0 0 0 .32l.54.15a1.5 1.5 0 0 1 1.09 1.45v1.74a1.5 1.5 0 0 0 1.5 1.5h.25a.5.5 0 0 1 0 1h-.25a2.5 2.5 0 0 1-2.5-2.5"/>
|
|
101
|
-
</symbol>`,sw=`<symbol id="file-tree-builtin-markdown" viewBox="0 0 16 16">
|
|
102
|
-
<path fill="currentColor" d="M1 12V4h2l2 2.5L7 4h2v8H7V7.5l-2 2-2-2V12zm9-3 3 3.5L16 9h-2V4h-2v5z"/>
|
|
103
|
-
</symbol>`,cw=`<symbol id="file-tree-builtin-mcp" viewBox="0 0 16 16">
|
|
104
|
-
<path fill="currentColor" d="M9.26-.04a3 3 0 0 1 2 .82 2.8 2.8 0 0 1 .8 2.35 2.9 2.9 0 0 1 2.41.8l.03.02a2.74 2.74 0 0 1 0 3.94l-5.8 5.69-.04.06-.02.07q0 .04.02.07.01.04.04.06l1.2 1.17a.55.55 0 0 1 0 .79.6.6 0 0 1-.81 0l-1.2-1.17a1.3 1.3 0 0 1 0-1.84L13.7 7.1a1.65 1.65 0 0 0 .37-1.82 2 2 0 0 0-.37-.54l-.03-.03a1.73 1.73 0 0 0-2.4 0L6.47 9.4l-.07.06a.58.58 0 0 1-.92-.18.6.6 0 0 1 .12-.6l4.85-4.76a1.65 1.65 0 0 0 0-2.36 1.73 1.73 0 0 0-2.4 0l-6.43 6.3a.6.6 0 0 1-.8 0 .55.55 0 0 1 0-.8L7.25.79a3 3 0 0 1 2-.82"/>
|
|
105
|
-
<path fill="currentColor" d="M9.26 2.19a.6.6 0 0 1 .52.34.6.6 0 0 1 0 .43l-.12.18L4.9 7.79a1.65 1.65 0 0 0 0 2.36 1.73 1.73 0 0 0 2.4 0l4.75-4.66a.58.58 0 0 1 .93.18.6.6 0 0 1-.12.61l-4.75 4.66a2.9 2.9 0 0 1-4.01 0 2.75 2.75 0 0 1-.62-3.04A3 3 0 0 1 4.1 7l4.74-4.65a.6.6 0 0 1 .4-.16"/>
|
|
106
|
-
</symbol>`,lw=`<symbol id="file-tree-builtin-nextjs" viewBox="0 0 16 16">
|
|
107
|
-
<defs>
|
|
108
|
-
<linearGradient id="a" x1="4.522" x2="14" y1="3.943" y2="16" gradientUnits="userSpaceOnUse">
|
|
109
|
-
<stop stop-color="currentColor"/>
|
|
110
|
-
<stop offset="1" stop-color="currentColor" stop-opacity="0"/>
|
|
111
|
-
</linearGradient>
|
|
112
|
-
</defs>
|
|
113
|
-
<path fill="currentColor" d="M3 2h1.522v9.09H3z"/>
|
|
114
|
-
<path fill="url(#a)" d="M4.903 2 15 15.075q-.565.5-1.195.925L4.522 3.943z"/>
|
|
115
|
-
<path fill="currentColor" d="M12.172 2h-1.508v9.094h1.508z"/>
|
|
116
|
-
</symbol>`,uw=`<symbol id="file-tree-builtin-npm" viewBox="0 0 16 16">
|
|
117
|
-
<path fill="currentColor" d="M2 1a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1z" class="vector" opacity=".2"/>
|
|
118
|
-
<path fill="currentColor" d="M10.5 13H13V3H3v10h5V5.5h2.5z"/>
|
|
119
|
-
</symbol>`,dw=`<symbol id="file-tree-builtin-oxc" viewBox="0 0 16 16">
|
|
120
|
-
<path fill="currentColor" d="M9.5 1a.5.5 0 0 1 .5.5V3h3.5a.5.5 0 0 1 .38.83L10.5 7.69v1.44q.41.04.95-.16a4 4 0 0 0 .72-.35l.04-.03h.01a.5.5 0 0 1 .67.1l2 2.5a.5.5 0 0 1 0 .62c-.76.96-3.14 2.69-6.89 2.69s-6.13-1.73-6.89-2.69a.5.5 0 0 1 0-.62l2-2.5a.5.5 0 0 1 .67-.1l.05.03.16.09q.22.13.56.26.54.2.95.16V7.69L2.12 3.83A.5.5 0 0 1 2.5 3H6V1.5a.5.5 0 0 1 .5-.5zM7 3.5a.5.5 0 0 1-.5.5H3.6l2.78 3.17a.5.5 0 0 1 .12.33v2a.5.5 0 0 1-.28.45c-.7.35-1.5.15-2.02-.05a5 5 0 0 1-.58-.26l-1.46 1.84c.82.78 2.8 2.02 5.84 2.02s5.02-1.24 5.84-2.02l-1.46-1.83a5 5 0 0 1-.58.26c-.52.2-1.33.39-2.02.04a.5.5 0 0 1-.28-.45v-2a.5.5 0 0 1 .12-.33L12.4 4H9.5a.5.5 0 0 1-.5-.5V2H7z"/>
|
|
121
|
-
</symbol>`,fw=`<symbol id="file-tree-builtin-postcss" viewBox="0 0 16 16">
|
|
122
|
-
<path fill="currentColor" d="M14.5 8a6.5 6.5 0 0 0-5.9-6.47l5.42 8.93A7 7 0 0 0 14.5 8M2.88 12A6.5 6.5 0 0 0 8 14.5c2.08 0 3.93-.98 5.12-2.5zm8.62-1h1.68L11.5 8.24zm-1-.55a4 4 0 0 1-.7.55h.7zM8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5M5.5 11h.7a4 4 0 0 1-.7-.55zm-2.68 0H4.5V8.24zm3.76-6.2A4 4 0 0 1 8 4.5q.76 0 1.42.3L8 2.46zM1.5 8q0 1.31.48 2.46L7.4 1.53A6.5 6.5 0 0 0 1.5 8m14 0a7.5 7.5 0 0 1-.99 3.72l-.01.03-.02.03A7.5 7.5 0 0 1 8 15.5a7.5 7.5 0 0 1-6.5-3.75l-.01-.03A7.5 7.5 0 1 1 15.5 8"/>
|
|
123
|
-
</symbol>`,pw=`<symbol id="file-tree-builtin-prettier" viewBox="0 0 16 16">
|
|
124
|
-
<path fill="currentColor" d="M6 12v1H4.93v-1zm1-2v1H2v-1zm6-4v1h-3V6zm-1-4v1H9V2z"/>
|
|
125
|
-
<path fill="currentColor" d="M11.5 10v1H8v-1zM5 6v1H2V6zm5-2v1H9V4z" opacity=".8"/>
|
|
126
|
-
<path fill="currentColor" d="M6 14v1H2v-1zm-.5-6v1H2V8zM13 4v1h-3V4zM4.93 2v1H2V2z" opacity=".6"/>
|
|
127
|
-
<path fill="currentColor" d="M4.93 12v1H2v-1zM13 8v1H9V8zM5.5 4v1H2V4zM9 2v1H4.93V2z" opacity=".4"/>
|
|
128
|
-
</symbol>`,mw=`<symbol id="file-tree-builtin-python" viewBox="0 0 16 16">
|
|
129
|
-
<path fill="currentColor" d="M8.33 8.4H10c1.16 0 1.9-.73 1.9-1.86V5.08q0-.24.25-.24h.74c.75 0 1.33.32 1.66.97q.4.73.41 1.46c.09.9.09 1.78-.24 2.67-.25.73-.75 1.3-1.58 1.46h-4.8c-.08 0-.25 0-.25.08v.4s.17.09.25.09h2.82q.34-.02.33.32v1.06c0 .56-.25.97-.75 1.13-.41.16-.83.33-1.24.4a7 7 0 0 1-2.98-.07 3 3 0 0 1-1.16-.49c-.33-.32-.58-.65-.5-1.14v-2.91c0-1.13.67-1.78 1.82-1.78q.89-.1 1.66-.08m2.32 4.86a.65.65 0 0 0-.66-.65c-.34 0-.67.33-.67.65s.33.57.67.65a.65.65 0 0 0 .66-.65" class="bg" opacity=".8"/>
|
|
130
|
-
<path fill="currentColor" d="M7.67 7.6H6c-1.16 0-1.9.73-1.9 1.86v1.46q0 .24-.25.24h-.74c-.75 0-1.33-.32-1.66-.97a3 3 0 0 1-.41-1.46 6 6 0 0 1 .24-2.67c.25-.73.75-1.3 1.58-1.46h4.8c.08 0 .25 0 .25-.08v-.4s-.17-.09-.25-.09H4.85c-.24 0-.33-.08-.33-.32V2.65c0-.56.25-.97.75-1.13.41-.16.83-.33 1.24-.4a7 7 0 0 1 2.98.07c.41.09.83.25 1.16.49.33.32.58.65.5 1.13v2.92c0 1.14-.67 1.78-1.82 1.78-.58.08-1.16.08-1.66.08M5.35 2.73c0 .33.25.65.66.65.33 0 .66-.32.66-.65 0-.32-.33-.56-.66-.64a.65.65 0 0 0-.66.64" class="fg"/>
|
|
131
|
-
</symbol>`,hw=`<symbol id="file-tree-builtin-react" viewBox="0 0 16 16">
|
|
132
|
-
<path fill="currentColor" d="M8 6.65c.73 0 1.31.6 1.31 1.35S8.73 9.35 8 9.35 6.69 8.75 6.69 8 7.27 6.65 8 6.65"/>
|
|
133
|
-
<path fill="currentColor" fill-rule="evenodd" d="M8 2.55c1.3-.99 2.59-1.34 3.5-.8.92.55 1.27 1.87 1.08 3.53C14.06 5.94 15 6.9 15 8s-.94 2.06-2.42 2.72c.19 1.65-.16 2.98-1.08 3.52-.91.55-2.2.2-3.5-.8-1.3 1-2.58 1.35-3.5.8-.91-.54-1.27-1.87-1.08-3.52C1.94 10.06 1 9.1 1 8s.94-2.06 2.42-2.72c-.19-1.66.17-2.98 1.08-3.52s2.2-.2 3.5.8M4.26 11.2c-.08 1.34.28 2.03.68 2.26s1.15.22 2.25-.52l.11-.09a12 12 0 0 1-1.24-1.39 11 11 0 0 1-1.8-.41zm7.47-.15q-.83.27-1.79.41-.6.8-1.24 1.4l.11.08c1.1.74 1.86.76 2.25.52.4-.23.76-.92.68-2.26zm-3.04.54a14 14 0 0 1-1.38 0q.34.38.69.7.35-.32.7-.7M8 5.29q-.76 0-1.47.1A13 13 0 0 0 5.07 8a14 14 0 0 0 1.46 2.62 13 13 0 0 0 2.94 0A13 13 0 0 0 10.93 8a14 14 0 0 0-1.46-2.62A13 13 0 0 0 8 5.3M4.64 9.18q-.15.5-.25.96.44.16.94.27a15 15 0 0 1-.7-1.23m6.73 0a15 15 0 0 1-.7 1.23q.5-.11.95-.27a10 10 0 0 0-.25-.96M3.44 6.26C2.27 6.86 1.87 7.53 1.87 8s.4 1.14 1.57 1.74l.13.07q.18-.88.55-1.81a12 12 0 0 1-.55-1.8q-.07.02-.13.06m8.99-.07A12 12 0 0 1 11.88 8q.36.94.55 1.8l.13-.06c1.17-.6 1.56-1.27 1.56-1.74s-.39-1.14-1.56-1.74zm-7.1-.6q-.5.11-.94.27.1.46.25.96a15 15 0 0 1 .69-1.23m5.34 0a15 15 0 0 1 .7 1.23q.14-.5.24-.96-.44-.15-.94-.27M7.18 3.06c-1.09-.74-1.85-.76-2.24-.52s-.76.92-.69 2.26l.01.15a11 11 0 0 1 1.8-.41q.6-.8 1.24-1.4zm3.88-.52c-.4-.24-1.15-.22-2.25.52l-.12.08q.65.6 1.25 1.4.96.15 1.8.41v-.14c.08-1.35-.28-2.04-.68-2.27M8 3.7a10 10 0 0 0-.7.7 14 14 0 0 1 1.4 0 10 10 0 0 0-.7-.7" clip-rule="evenodd"/>
|
|
134
|
-
</symbol>`,gw=`<symbol id="file-tree-builtin-ruby" viewBox="0 0 16 16">
|
|
135
|
-
<path fill="currentColor" fill-rule="evenodd" d="M11.04 2c.48 0 .92.23 1.18.6l2.54 3.65c.37.52.3 1.23-.15 1.69l-5.58 5.64a1.47 1.47 0 0 1-2.06 0L1.39 7.94a1.3 1.3 0 0 1-.15-1.7l2.54-3.63q.2-.3.5-.45.33-.16.68-.16zm.84 2.17a.5.5 0 0 0-.7-.05L8 6.84 4.83 4.12a.5.5 0 0 0-.65.76L6.65 7H3.5a.5.5 0 0 0 0 1h9a.5.5 0 0 0 0-1H9.35l2.48-2.12a.5.5 0 0 0 .05-.7" clip-rule="evenodd"/>
|
|
136
|
-
</symbol>`,_w=`<symbol id="file-tree-builtin-rust" viewBox="0 0 16 16">
|
|
137
|
-
<path fill="currentColor" fill-rule="evenodd" d="M8 .8a.2.2 0 0 1 .18.1l.38.6.16.02.5-.53.01-.01a.2.2 0 0 1 .33.08l.25.68.16.05.59-.43h.02a.2.2 0 0 1 .3.14l.12.71.15.08.65-.3a.2.2 0 0 1 .2.02.2.2 0 0 1 .1.18l-.03.72.12.1.71-.16a.2.2 0 0 1 .25.25l-.17.7q.06.06.1.13l.73-.03A.2.2 0 0 1 14 4a.2.2 0 0 1 .02.2l-.3.66.08.14.71.12a.2.2 0 0 1 .14.32l-.43.59.05.16.68.25a.2.2 0 0 1 .07.35l-.53.49.01.16.62.38a.2.2 0 0 1 0 .36l-.62.38-.01.16.53.5a.2.2 0 0 1-.07.34l-.68.25-.05.16.43.59a.2.2 0 0 1-.14.32l-.72.12-.07.15.3.65a.2.2 0 0 1-.02.2.2.2 0 0 1-.18.1l-.72-.03-.1.13.16.7a.2.2 0 0 1-.25.25l-.7-.17-.13.1.03.73a.2.2 0 0 1-.1.18.2.2 0 0 1-.2.02l-.66-.3-.14.08-.12.71a.2.2 0 0 1-.32.14l-.59-.43-.16.05-.25.68a.2.2 0 0 1-.34.07l-.5-.53-.16.01-.38.62a.2.2 0 0 1-.36 0l-.38-.62-.16-.01-.5.53a.2.2 0 0 1-.34-.07l-.25-.68-.16-.05-.59.43a.2.2 0 0 1-.32-.14L5 13.78l-.15-.07-.65.3a.2.2 0 0 1-.2-.02.2.2 0 0 1-.1-.18l.03-.72-.13-.1-.7.16a.2.2 0 0 1-.25-.25l.17-.7-.1-.13-.73.03a.2.2 0 0 1-.2-.3l.3-.66-.08-.14-.71-.12a.2.2 0 0 1-.14-.32l.43-.59-.05-.16-.68-.25A.2.2 0 0 1 1 9.22l.53-.5-.02-.16-.6-.38A.2.2 0 0 1 .8 8a.2.2 0 0 1 .1-.18l.6-.38.02-.16-.53-.5a.2.2 0 0 1 .07-.34l.68-.25.05-.16-.43-.59a.2.2 0 0 1 .14-.32L2.2 5l.08-.15L2 4.2a.2.2 0 0 1 .2-.3l.72.03.1-.13-.16-.7a.2.2 0 0 1 .25-.25l.7.16.13-.1-.03-.72A.2.2 0 0 1 4 2a.2.2 0 0 1 .2-.02l.65.3L5 2.2l.12-.71v-.03a.2.2 0 0 1 .32-.1l.59.41.16-.04.25-.68.01-.02A.2.2 0 0 1 6.8.99l.49.53.16-.02.38-.61.02-.02A.2.2 0 0 1 8 .79M6.8 9.45h1.26l.06.01q.03.01.03.05v1.52q0 .07-.09.06h-4.5A5.4 5.4 0 0 0 8 13.42a5.4 5.4 0 0 0 4.45-2.33h-2.42c-.36 0-.68-.5-.77-.75-.08-.22-.2-.91-.25-1.12-.15-.61-.59-.71-.78-.73H6.8zM8 2.58a5.4 5.4 0 0 0-4.07 1.85h5.74l.17.02c.23.03.6.12.96.35.34.23.83.68.83 1.4 0 .66-.55 1.16-1.08 1.5.42.33.7.53.86 1.44.04.17.34.32.62.29.29-.03.62-.16.62-.75v-.24q0-.1.07-.1h.68A5.43 5.43 0 0 0 8 2.59M2.96 6.03a5.4 5.4 0 0 0-.19 3.37h1.66V6.03zM6.8 7.06h1.66c.35 0 .77-.12.77-.47 0-.42-.55-.53-.65-.53H6.8z" clip-rule="evenodd"/>
|
|
138
|
-
</symbol>`,vw=`<symbol id="file-tree-builtin-sass" viewBox="0 0 16 16">
|
|
139
|
-
<path fill="currentColor" fill-rule="evenodd" d="M8.08 1.44c2.41-.91 4.96-.37 5.35 1.27.39 1.62-.92 3.56-2.6 4.25a5 5 0 0 1-3.26.35c-.58-.2-.92-.62-1-.85-.03-.09-.09-.24 0-.3.05-.03.08-.02.22.15s.7.6 1.75.48c2.78-.34 4.45-2.64 3.92-3.88-.37-.87-2.5-1.26-5.18.16C4.03 4.81 3.85 6.24 3.82 6.8c-.08 1.5 1.73 2.28 2.7 3.4q.04.03.07.08c.3-.12.7-.19 1.35-.2 1.58-.03 2.47 1.08 2.43 2.08-.03.78-.7 1.1-.82 1.13-.1.01-.14.02-.15-.06q-.03-.06.13-.15c.16-.09.42-.3.48-.72.05-.43-.24-1.44-1.76-1.63a3 3 0 0 0-1.33.08c.27.62.32 1.87-.29 2.83-.63 1-1.8 1.61-2.93 1.27-.37-.1-.93-.92-.45-2.05.46-1.07 2.4-2.12 2.66-2.26-.9-.83-3.08-1.95-3.4-3.65-.08-.49.13-1.65 1.46-2.98a12 12 0 0 1 4.11-2.52m-1.88 9.7c-.01.01-.9.47-1.52 1.17-.59.66-.75 1.48-.43 1.69.3.18 1-.04 1.51-.62a3 3 0 0 0 .5-.9q.2-.64.02-1.39z" clip-rule="evenodd"/>
|
|
140
|
-
</symbol>`,yw=`<symbol id="file-tree-builtin-stylelint" viewBox="0 0 16 16">
|
|
141
|
-
<path fill="currentColor" d="M4 3v3.5l1.5-1L7 15 .5 6l1-1.5L0 3l2.5-2h1zm12 0-1.5 1.5 1 1.5L9 15l1.5-9.5 1.5 1V3l.5-2h1zm-8 8.5a.5.5 0 1 1 0 1 .5.5 0 0 1 0-1m0-3a.5.5 0 1 1 0 1 .5.5 0 0 1 0-1m0-3a.5.5 0 1 1 0 1 .5.5 0 0 1 0-1"/>
|
|
142
|
-
<path fill="currentColor" d="M6.5 2.5V4l-2 1.5v-4zm5 3L9.5 4V2.5l2-1zM9 4H7V2.5h2z"/>
|
|
143
|
-
</symbol>`,bw=`<symbol id="file-tree-builtin-svelte" viewBox="0 0 16 16">
|
|
144
|
-
<path fill="currentColor" d="m3.98 3.7 3.36-2.08a4.5 4.5 0 0 1 5.9 1.23 4 4 0 0 1 .7 3.02q-.16.75-.58 1.4c.42.77.56 1.66.4 2.52a3.7 3.7 0 0 1-1.57 2.4l-.17.1-3.36 2.09a4.5 4.5 0 0 1-5.9-1.23 4 4 0 0 1-.66-1.44 4 4 0 0 1-.04-1.58 4 4 0 0 1 .58-1.4 4 4 0 0 1-.4-2.52 3.7 3.7 0 0 1 1.57-2.4zl3.36-2.08zm7.87 0a2.7 2.7 0 0 0-1.26-.95 2.7 2.7 0 0 0-1.6-.07 3 3 0 0 0-.52.2l-.16.09-3.36 2.08a2 2 0 0 0-.69.64 2 2 0 0 0-.36.86 2.3 2.3 0 0 0 .42 1.81A2.7 2.7 0 0 0 7.18 9.4q.28-.06.53-.2l.16-.09 1.28-.79.2-.09a.8.8 0 0 1 .87.31.7.7 0 0 1 .13.55.7.7 0 0 1-.24.4l-.08.05-3.36 2.08-.2.09a1 1 0 0 1-.49-.02 1 1 0 0 1-.38-.3 1 1 0 0 1-.13-.37v-.1l.01-.13-.13-.03a4 4 0 0 1-1.1-.5l-.2-.14-.18-.12-.07.18-.08.3a2.3 2.3 0 0 0 .43 1.82q.45.64 1.19.93.73.28 1.51.14l.16-.04q.27-.07.52-.2l.16-.09 3.36-2.08q.4-.25.69-.64.27-.4.36-.86a2.3 2.3 0 0 0-.42-1.82 2.7 2.7 0 0 0-1.27-.95 2.7 2.7 0 0 0-1.6-.08q-.27.07-.52.2l-.16.1-1.28.79-.2.09a1 1 0 0 1-.49-.03 1 1 0 0 1-.38-.29.7.7 0 0 1-.13-.54.7.7 0 0 1 .24-.4l.08-.06L9.33 4.4l.2-.1a.8.8 0 0 1 .87.32 1 1 0 0 1 .13.38v.22l.11.04q.6.18 1.12.5l.2.14.17.12.06-.19.08-.3a2.3 2.3 0 0 0-.42-1.81z"/>
|
|
145
|
-
</symbol>`,xw=`<symbol id="file-tree-builtin-svg" viewBox="0 0 16 16">
|
|
146
|
-
<path fill="currentColor" d="M5 7a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2z"/>
|
|
147
|
-
<path fill="currentColor" d="M6 1a5 5 0 0 1 4.58 3H7a3 3 0 0 0-3 3v3.58A5 5 0 0 1 6 1" opacity=".5"/>
|
|
148
|
-
</symbol>`,Sw=`<symbol id="file-tree-builtin-svgo" viewBox="0 0 16 16">
|
|
149
|
-
<path fill="currentColor" d="M9.43 4.8A.6.6 0 1 1 9.19 6l-.56.96a1.2 1.2 0 0 1 .32 1.58l.7.53a.89.89 0 1 1-.17.22l-.7-.52a1.2 1.2 0 0 1-1.4.25l-.56.87a.75.75 0 1 1-.57-.2 1 1 0 0 1 .32.05l.56-.87a1.2 1.2 0 0 1-.4-1.24l-1.2-.47a.56.56 0 1 1 .1-.28v.02l1.2.47a1.2 1.2 0 0 1 1.56-.55l.56-.97a.6.6 0 0 1-.15-.64.6.6 0 0 1 .63-.4"/>
|
|
150
|
-
<path fill="currentColor" fill-rule="evenodd" d="M9.17 1q.16.63.27 1.26a6 6 0 0 1 1.61.67q.52-.38 1.08-.71l1.65 1.64q-.32.56-.68 1.05.48.78.72 1.67.6.09 1.18.25v2.32q-.55.15-1.11.24a6 6 0 0 1-.7 1.82q.31.44.59.91l-1.65 1.65-.85-.55a6 6 0 0 1-1.9.83q-.08.47-.2.95H6.84q-.12-.46-.2-.93a6 6 0 0 1-1.96-.81q-.39.27-.8.51l-1.65-1.65q.25-.43.53-.84a6 6 0 0 1-.75-1.9L1 9.16V6.83q.54-.14 1.09-.24a6 6 0 0 1 .77-1.74q-.33-.47-.63-.98l1.65-1.65q.54.32 1.03.68a6 6 0 0 1 1.66-.66q.1-.61.26-1.24zM7.96 3.73a4 4 0 0 0-1.74.36 4.5 4.5 0 0 0-2.3 2.3 4.4 4.4 0 0 0-.1 3.29l.03.06a4.4 4.4 0 0 0 2.4 2.47 4.4 4.4 0 0 0 3.48-.02l.03-.02a4.4 4.4 0 0 0 2.3-2.42l.06-.14a4.4 4.4 0 0 0-.2-3.4 4.4 4.4 0 0 0-2.13-2.07L9.47 4a4 4 0 0 0-1.51-.27" clip-rule="evenodd"/>
|
|
151
|
-
</symbol>`,Cw=`<symbol id="file-tree-builtin-swift" viewBox="0 0 16 16">
|
|
152
|
-
<path fill="currentColor" d="M9.63 1c6.15 4.35 4.16 9.15 4.16 9.15s1.75 2.05 1.04 3.85c0 0-.72-1.26-1.93-1.26-1.17 0-1.85 1.26-4.2 1.26C3.47 14 1 9.46 1 9.46c4.71 3.22 7.93.94 7.93.94C6.8 9.12 2.29 3 2.29 3c3.93 3.47 5.63 4.39 5.63 4.39-1.01-.87-3.86-5.13-3.86-5.13C6.34 4.66 10.86 8 10.86 8c1.28-3.7-1.23-7-1.23-7"/>
|
|
153
|
-
</symbol>`,ww=`<symbol id="file-tree-builtin-table" viewBox="0 0 16 16">
|
|
154
|
-
<path fill="currentColor" d="M8 4a3 3 0 0 0 3 3h3v5.5a2.5 2.5 0 0 1-2.5 2.5h-7A2.5 2.5 0 0 1 2 12.5v-9A2.5 2.5 0 0 1 4.5 1H8z" class="bg" opacity=".4"/>
|
|
155
|
-
<path fill="currentColor" d="M11.5 8a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-.5.5h-7a.5.5 0 0 1-.5-.5v-4a.5.5 0 0 1 .5-.5zM5 12h2.5v-1H5zm3.5 0H11v-1H8.5zM5 10h2.5V9H5zm3.5 0H11V9H8.5zm1-9a.5.5 0 0 1 .354.146l4 4A.5.5 0 0 1 14 5.5V6h-3a2 2 0 0 1-2-2V1z" class="fg"/>
|
|
156
|
-
</symbol>`,Tw=`<symbol id="file-tree-builtin-tailwind" viewBox="0 0 16 16">
|
|
157
|
-
<path fill="currentColor" fill-rule="evenodd" d="M8 4Q5.2 4 4.5 6.67q1.05-1.34 2.45-1c.53.12.91.5 1.33.9C8.98 7.23 9.77 8 11.5 8q2.8 0 3.5-2.67-1.05 1.34-2.45 1c-.53-.12-.91-.5-1.33-.9C10.52 4.77 9.73 4 8 4M4.5 8Q1.7 8 1 10.67q1.05-1.34 2.45-1c.53.12.91.5 1.33.9C5.48 11.23 6.26 12 8 12q2.8 0 3.5-2.67-1.05 1.34-2.45 1c-.53-.12-.91-.5-1.33-.9C7.02 8.77 6.24 8 4.5 8" clip-rule="evenodd"/>
|
|
158
|
-
</symbol>`,Ew=`<symbol id="file-tree-builtin-terraform" viewBox="0 0 16 16">
|
|
159
|
-
<path fill="currentColor" d="M1 0v5.05l4.35 2.53V2.53zm9.18 5.34L5.83 2.82v5.05l4.35 2.53zm.47 5.06V5.34L15 2.82v5.05zm-.48 5.6-4.35-2.53V8.42l4.35 2.53z"/>
|
|
160
|
-
</symbol>`,Dw=`<symbol id="file-tree-builtin-text" viewBox="0 0 16 16">
|
|
161
|
-
<path fill="currentColor" fill-rule="evenodd" d="M8 4a3 3 0 0 0 3 3h3v5.5a2.5 2.5 0 0 1-2.5 2.5h-7A2.5 2.5 0 0 1 2 12.5v-9A2.5 2.5 0 0 1 4.5 1H8z" class="bg" clip-rule="evenodd" opacity=".4"/>
|
|
162
|
-
<path fill="currentColor" d="M8.5 11a.5.5 0 0 1 0 1h-3a.5.5 0 0 1 0-1zm2-2a.5.5 0 0 1 0 1h-5a.5.5 0 0 1 0-1zm-1-8a.5.5 0 0 1 .354.146l4 4A.5.5 0 0 1 14 5.5V6h-3a2 2 0 0 1-2-2V1z"/>
|
|
163
|
-
</symbol>`,Ow=`<symbol id="file-tree-builtin-typescript" viewBox="0 0 16 16">
|
|
164
|
-
<path fill="currentColor" d="M8 1C2.24 1 1 2.24 1 8s1.24 7 7 7 7-1.24 7-7-1.24-7-7-7" class="bg" opacity=".2"/>
|
|
165
|
-
<path fill="currentColor" d="M8.1 9.64h.95c.04.62.28.76 1.28.76s1.2-.14 1.2-.85c0-.66-.2-.85-1.2-1.07-1.79-.38-2.18-.7-2.18-1.86C8.15 5.3 8.54 5 10.31 5c1.67 0 2.04.26 2.07 1.42h-.95c-.02-.43-.23-.53-1.1-.53-1 0-1.22.14-1.22.74 0 .52.22.7 1.24.92 1.76.38 2.15.73 2.15 2 0 1.44-.4 1.75-2.24 1.75-1.8 0-2.18-.3-2.15-1.66m-3 1.57V5.99H3.5v-.9h4.21v.9H6.1v5.22z"/>
|
|
166
|
-
</symbol>`,kw=`<symbol id="file-tree-builtin-vite" viewBox="0 0 16 16">
|
|
167
|
-
<path fill="currentColor" d="M8.57 14.87c-.18.26-.55.11-.55-.22v-3.18l-.05-.27-.13-.22-.2-.15-.24-.06H4.29c-.26 0-.4-.32-.26-.55L6.08 7c.3-.46 0-1.1-.5-1.1H1.8c-.25 0-.4-.32-.25-.56l2.65-4.2A.3.3 0 0 1 4.46 1h7.9c.26 0 .4.32.26.55l-2.05 3.23c-.29.46 0 1.1.5 1.1h3.12c.26 0 .4.34.24.57z"/>
|
|
168
|
-
</symbol>`,Aw=`<symbol id="file-tree-builtin-vscode" viewBox="0 0 16 16">
|
|
169
|
-
<path fill="currentColor" d="m5.11 9.68-2.4 1.84a.6.6 0 0 1-.75-.04l-.77-.7a.6.6 0 0 1 0-.87L3.28 8zm5.52-8.42a.51.51 0 0 1 .87.36V4.8L7.32 8 5.1 6.32z" opacity=".75"/>
|
|
170
|
-
<path fill="currentColor" d="M11.1 14.99h.03zM1.96 4.52a.6.6 0 0 1 .75-.04l8.8 6.71v3.19a.51.51 0 0 1-.88.36L1.19 6.1a.6.6 0 0 1 0-.87z" opacity=".65"/>
|
|
171
|
-
<path fill="currentColor" d="M11.62 14.91a.9.9 0 0 1-1-.17.51.51 0 0 0 .88-.36V1.62a.51.51 0 0 0-.87-.36.9.9 0 0 1 1-.17l2.87 1.39a.9.9 0 0 1 .5.8v9.44a.9.9 0 0 1-.5.8z"/>
|
|
172
|
-
</symbol>`,jw=`<symbol id="file-tree-builtin-vue" viewBox="0 0 16 16">
|
|
173
|
-
<path fill="currentColor" d="M9.62 2.25 8 5.02 6.38 2.25H1l7 12 7-12z" opacity=".5"/>
|
|
174
|
-
<path fill="currentColor" d="M9.54 2.25 8 4.95l-1.54-2.7H4l4 7 4-7z"/>
|
|
175
|
-
</symbol>`,Mw=`<symbol id="file-tree-builtin-wasm" viewBox="0 0 16 16">
|
|
176
|
-
<path fill="currentColor" d="M13 1a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h3a2 2 0 1 0 4 0z" class="subtract" opacity=".2"/>
|
|
177
|
-
<path fill="currentColor" d="M4.64 11.4h.02l.8-3.4h.91l.73 3.45L7.88 8h.96l-1.25 5h-.97L5.9 9.6 5.1 13h-1L3 8h.98z"/>
|
|
178
|
-
<path fill="currentColor" fill-rule="evenodd" d="M13 13h-1.02l-.33-1.11H9.9L9.64 13h-.97l1.26-5h1.54zm-2.49-3.77-.42 1.84h1.32l-.49-1.84z" clip-rule="evenodd"/>
|
|
179
|
-
</symbol>`,Nw=`<symbol id="file-tree-builtin-webpack" viewBox="0 0 16 16">
|
|
180
|
-
<path fill="currentColor" d="M14.1 11.79 8.26 15v-2.5l3.64-1.94zm.4-.35V4.73l-2.14 1.2v4.3zm-12.6.35L7.74 15v-2.5L4.1 10.56zm-.4-.35V4.73l2.14 1.2v4.3zm.25-7.15 6-3.29v2.42L3.9 5.47l-.03.01zm12.5 0L8.25 1v2.42l3.85 2.05.03.01z" class="bg" opacity=".4"/>
|
|
181
|
-
<path fill="currentColor" d="m7.74 11.93-3.59-1.92v-3.8l3.6 2.02zm.52 0 3.59-1.92v-3.8l-3.6 2.02zM4.4 5.77 8 3.85l3.6 1.93L8 7.8z" class="fg"/>
|
|
182
|
-
</symbol>`,Pw=`<symbol id="file-tree-builtin-yml" viewBox="0 0 16 16">
|
|
183
|
-
<path fill="currentColor" d="M7.5 2A1.5 1.5 0 0 1 9 3.5v3A1.5 1.5 0 0 1 7.5 8h-2v2A1.5 1.5 0 0 0 7 11.5v-1A1.5 1.5 0 0 1 8.5 9h5a1.5 1.5 0 0 1 1.5 1.5v3a1.5 1.5 0 0 1-1.5 1.5h-5A1.5 1.5 0 0 1 7 13.5v-1A2.5 2.5 0 0 1 4.5 10V8h-2A1.5 1.5 0 0 1 1 6.5v-3A1.5 1.5 0 0 1 2.5 2zm1 8a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h5a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-.5-.5zm-6-7a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h5a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-.5-.5z"/>
|
|
184
|
-
</symbol>`,Fw=`<symbol id="file-tree-builtin-zig" viewBox="0 0 16 16">
|
|
185
|
-
<path fill="currentColor" d="m14.73 1.5-7.29 8.82h4.17l-1.73 2.04H5.76L1.27 14.5l7.3-8.91H4.39l1.73-2.05h4.12z"/>
|
|
186
|
-
<path fill="currentColor" d="M5.21 3.54 3.56 5.6h-.55v4.73h.83L2.1 12.36H1V3.54zm9.79 0v8.82h-4.3l1.74-2.04h.55V5.68h-.83l1.74-2.14z"/>
|
|
187
|
-
</symbol>`,Iw=[HC,JC,YC,XC,$C,ew,tw,rw,iw,aw,ow,sw,cw,mw,gw,_w,Cw,ww,Dw,Ow,`<symbol id="file-tree-builtin-zip" viewBox="0 0 16 16">
|
|
188
|
-
<path fill="currentColor" d="M4.585 2a2 2 0 0 1 1.028.285l1.788 1.072a1 1 0 0 0 .514.143H12A2 2 0 0 1 13.935 5H0V4a2 2 0 0 1 2-2z" class="bg" opacity=".5"/>
|
|
189
|
-
<path fill="currentColor" fill-rule="evenodd" d="M14 12a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2v-1.25h1v-1H0V6h14zM9.9 8.25c-.883 0-1.9.5-1.9.5H7v1h1v1s1.017.5 1.9.5c.884 0 1.6-.672 1.6-1.5s-.716-1.5-1.6-1.5M2 9.75v1h1v-1zm2 0v1h1v-1zm2 0v1h1v-1zm-5-1v1h1v-1zm2 0v1h1v-1zm2 0v1h1v-1z" class="fg" clip-rule="evenodd"/>
|
|
190
|
-
</symbol>`],Lw=[BC,VC,UC,WC,GC,KC,qC,ZC,QC,nw,lw,uw,dw,fw,pw,hw,vw,yw,bw,xw,Sw,Tw,Ew,kw,Aw,jw,Mw,Nw,Pw,Fw];function Rw(e,t){return t.length===0?e:e.replace(`</svg>`,`\n ${t.join(`
|
|
191
|
-
`)}\n</svg>`)}var zw=Rw(zC,Iw),Bw={minimal:zC,standard:zw,complete:Rw(zw,Lw)},Vw={".babelrc":`babel`,".babelrc.json":`babel`,".bash_profile":`bash`,".bashrc":`bash`,".browserslistrc":`browserslist`,".dockerignore":`docker`,".eslintignore":`eslint`,".eslintrc":`eslint`,".eslintrc.cjs":`eslint`,".eslintrc.js":`eslint`,".eslintrc.json":`eslint`,".eslintrc.yaml":`eslint`,".eslintrc.yml":`eslint`,".gitattributes":`git`,".gitignore":`git`,".gitkeep":`git`,".gitmodules":`git`,".oxlintrc.json":`oxc`,".postcssrc":`postcss`,".postcssrc.json":`postcss`,".postcssrc.yaml":`postcss`,".postcssrc.yml":`postcss`,".prettierignore":`prettier`,".prettierrc":`prettier`,".prettierrc.cjs":`prettier`,".prettierrc.js":`prettier`,".prettierrc.json":`prettier`,".prettierrc.mjs":`prettier`,".prettierrc.toml":`prettier`,".prettierrc.yaml":`prettier`,".prettierrc.yml":`prettier`,".stylelintignore":`stylelint`,".stylelintrc":`stylelint`,".stylelintrc.cjs":`stylelint`,".stylelintrc.js":`stylelint`,".stylelintrc.json":`stylelint`,".stylelintrc.mjs":`stylelint`,".stylelintrc.yaml":`stylelint`,".stylelintrc.yml":`stylelint`,".terraform.lock.hcl":`terraform`,".zprofile":`bash`,".zshenv":`bash`,".zshrc":`bash`,"babel.config.cjs":`babel`,"babel.config.js":`babel`,"babel.config.json":`babel`,"babel.config.mjs":`babel`,"biome.json":`biome`,"biome.jsonc":`biome`,"bootstrap.bundle.js":`bootstrap`,"bootstrap.bundle.min.js":`bootstrap`,"bootstrap.css":`bootstrap`,"bootstrap.js":`bootstrap`,"bootstrap.min.css":`bootstrap`,"bootstrap.min.js":`bootstrap`,"bun.lock":`bun`,"bun.lockb":`bun`,"bunfig.toml":`bun`,"claude.md":`claude`,"compose.yaml":`docker`,"compose.yml":`docker`,"docker-compose.override.yml":`docker`,"docker-compose.yaml":`docker`,"docker-compose.yml":`docker`,dockerfile:`docker`,"eslint.config.cjs":`eslint`,"eslint.config.js":`eslint`,"eslint.config.mjs":`eslint`,"eslint.config.mts":`eslint`,"eslint.config.ts":`eslint`,gemfile:`ruby`,"next.config.js":`nextjs`,"next.config.mjs":`nextjs`,"next.config.mts":`nextjs`,"next.config.ts":`nextjs`,"postcss.config.cjs":`postcss`,"postcss.config.js":`postcss`,"postcss.config.mjs":`postcss`,"postcss.config.ts":`postcss`,"prettier.config.cjs":`prettier`,"prettier.config.js":`prettier`,"prettier.config.mjs":`prettier`,rakefile:`ruby`,"readme.md":`markdown`,"stylelint.config.cjs":`stylelint`,"stylelint.config.js":`stylelint`,"stylelint.config.mjs":`stylelint`,"svgo.config.cjs":`svgo`,"svgo.config.js":`svgo`,"svgo.config.mjs":`svgo`,"svgo.config.ts":`svgo`,"tailwind.config.cjs":`tailwind`,"tailwind.config.js":`tailwind`,"tailwind.config.mjs":`tailwind`,"tailwind.config.ts":`tailwind`,"vite.config.js":`vite`,"vite.config.mjs":`vite`,"vite.config.mts":`vite`,"vite.config.ts":`vite`,"webpack.config.babel.js":`webpack`,"webpack.config.cjs":`webpack`,"webpack.config.js":`webpack`,"webpack.config.mjs":`webpack`,"webpack.config.ts":`webpack`},Hw={"7z":`zip`,astro:`astro`,AUTHORS:`text`,avif:`image`,bash:`bash`,bmp:`image`,bz2:`zip`,cfg:`text`,CHANGELOG:`text`,cjs:`javascript`,"code-workspace":`vscode`,conf:`text`,CONTRIBUTORS:`text`,csh:`bash`,css:`css`,csv:`table`,cts:`typescript`,db:`database`,editorconfig:`text`,env:`text`,"env.development":`text`,"env.local":`text`,"env.production":`text`,eot:`font`,erb:`ruby`,fish:`bash`,gemspec:`ruby`,gif:`image`,go:`go`,gql:`graphql`,graphql:`graphql`,gz:`zip`,htm:`html`,html:`html`,icns:`image`,ico:`image`,ini:`text`,jar:`zip`,jpeg:`image`,jpg:`image`,js:`javascript`,json:`json`,json5:`json`,jsonc:`json`,jsonl:`json`,jsx:`javascript`,ksh:`bash`,less:`css`,LICENSE:`text`,log:`text`,markdown:`markdown`,mcp:`mcp`,md:`markdown`,mdx:`markdown`,"mdx.tsx":`markdown`,mjs:`javascript`,mts:`typescript`,ods:`table`,otf:`font`,png:`image`,postcss:`css`,py:`python`,pyi:`python`,pyw:`python`,pyx:`python`,rake:`ruby`,rar:`zip`,rb:`ruby`,rs:`rust`,rst:`text`,rtf:`text`,sass:`css`,scss:`css`,sh:`bash`,sql:`database`,sqlite:`database`,sqlite3:`database`,styl:`css`,svelte:`svelte`,svg:`svg`,swift:`swift`,tar:`zip`,tf:`terraform`,tfstate:`terraform`,tfvars:`terraform`,tgz:`zip`,tif:`image`,tiff:`image`,ts:`typescript`,tsv:`table`,tsx:`typescript`,ttf:`font`,txt:`text`,vue:`vue`,war:`zip`,wasm:`wasm`,wast:`wasm`,wat:`wasm`,webp:`image`,woff:`font`,woff2:`font`,xhtml:`html`,xls:`table`,xlsx:`table`,xz:`zip`,yaml:`yml`,yml:`yml`,zig:`zig`,zip:`zip`,zsh:`bash`},Uw={jsx:`react`,sass:`sass`,scss:`sass`,tsx:`react`},Ww=new Set([`bash`,`css`,`database`,`default`,`font`,`git`,`go`,`html`,`image`,`javascript`,`json`,`markdown`,`mcp`,`python`,`ruby`,`rust`,`swift`,`table`,`text`,`typescript`,`zip`]),Gw=new Set([`complete`]);function Kw(e){return Bw[e===`none`?`minimal`:e]}function qw(e){return`file-tree-builtin-${e}`}function Jw(e){return e!==`none`&&Gw.has(e)}function Yw(e,t,n){if(e===`minimal`||e===`none`)return;let r=e===`complete`,i=Vw[t.toLowerCase()];if(i!=null&&(r||Ww.has(i)))return i;for(let e of n){if(r){let t=Uw[e];if(t!=null)return t}let t=Hw[e];if(t!=null&&(r||Ww.has(t)))return t}return`default`}var Xw=`file-tree-container`,Zw=`data-file-tree-style`,Qw=`data-file-tree-unsafe-css`,$w=`data-file-tree-scrollbar-measure`,eT=`data-file-tree-scrollbar-gutter-measured`,tT=`--trees-scrollbar-gutter-measured`,nT=`header`,rT=`context-menu`,iT=`context-menu-trigger`;function aT(e){return e.spriteSheet!=null||e.remap!=null||e.byFileName!=null||e.byFileExtension!=null||e.byFileNameContains!=null}function oT(e){return e==null?{set:`complete`,colored:!0}:typeof e==`string`?{set:e,colored:!0}:{...e,set:e.set??(aT(e)?`none`:`complete`),colored:e.colored??!0}}var sT=e=>e.trim().toLowerCase(),cT=e=>e.split(`/`).at(-1)??e,lT=e=>{let t=e.toLowerCase().split(`.`),n=[];for(let e=1;e<t.length;e+=1)n.push(t.slice(e).join(`.`));return n};function uT(e,t){return typeof e==`string`?{name:e,remappedFrom:t}:{...e,remappedFrom:t}}function dT(e){let t=oT(e),n=t.remap,r=new Map;for(let[e,n]of Object.entries(t.byFileName??{}))r.set(e.toLowerCase(),n);let i=new Map;for(let[e,n]of Object.entries(t.byFileExtension??{}))i.set(sT(e),n);let a=Object.entries(t.byFileNameContains??{}).map(([e,t])=>[e.toLowerCase(),t]);return{resolveIcon:(e,o)=>{if(e===`file-tree-icon-file`&&o!=null){let n=cT(o),s=n.toLowerCase(),c=r.get(s);if(c!=null)return uT(c,e);for(let[t,n]of a)if(s.includes(t))return uT(n,e);let l=lT(n);for(let t of l){let n=i.get(t);if(n!=null)return uT(n,e)}let u=Yw(t.set,n,l);if(u!=null&&t.set!==`none`)return{name:qw(u),remappedFrom:e,token:u}}let s=n?.[e];return s==null?{name:e}:uT(s,e)}}}var fT=/^#(?:[0-9a-f]{3}0|[0-9a-f]{6}00)$/i,pT=/^0(?:\.0+)?%?$/;function mT(e){let t=e.indexOf(`(`);if(t<=0||!e.endsWith(`)`))return;let n=e.slice(0,t).trim();if(!/^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch|color)$/i.test(n))return;let r=e.slice(t+1,-1).trim();if(r.length===0)return;let i=r.lastIndexOf(`/`);if(i!==-1)return r.slice(i+1).trim();if(/^(?:rgba|hsla)$/i.test(n)){let e=r.split(`,`);if(e.length===4)return e[3]?.trim()}}function hT(e){if(e==null)return!1;let t=e.trim().toLowerCase();if(t===`transparent`||fT.test(t))return!0;let n=mT(t);return n!=null&&pT.test(n)}function gT(e){return hT(e)?void 0:e}function _T(e){let t=e.colors??{},n=t[`sideBar.background`]??t[`editor.background`]??e.bg,r=t[`sideBar.foreground`]??t[`editor.foreground`]??e.fg,i=t[`sideBar.border`],a=t[`list.activeSelectionForeground`]??t[`sideBar.foreground`],o=n?.toLowerCase(),s=t[`list.hoverBackground`],c=s?.toLowerCase()===o?void 0:s,l=t[`list.activeSelectionBackground`],u=l?.toLowerCase()===o?t[`list.focusBackground`]??t[`editor.selectionBackground`]:l??t[`editor.selectionBackground`],d=gT(t[`list.focusOutline`])??gT(t.focusBorder),f=t[`input.background`]??n,p=t[`input.border`],m=t[`scrollbarSlider.background`],h=t[`sideBarSectionHeader.foreground`]??r,g=t[`gitDecoration.addedResourceForeground`]??t[`terminal.ansiGreen`]??t[`editorGutter.addedBackground`],_=t[`gitDecoration.modifiedResourceForeground`]??t[`terminal.ansiBlue`]??t[`editorGutter.modifiedBackground`],v=t[`gitDecoration.deletedResourceForeground`]??t[`terminal.ansiRed`]??t[`editorGutter.deletedBackground`],y=e.type===`dark`,b={colorScheme:y?`dark`:`light`,backgroundColor:n??``,color:r??``,borderColor:`var(--trees-theme-sidebar-border, light-dark(oklch(0% 0 0 / 0.15), oklch(100% 0 0 / 0.15)))`,"--trees-theme-sidebar-bg":n??``,"--trees-theme-sidebar-fg":r??``,"--trees-theme-sidebar-header-fg":h??``,"--trees-theme-list-active-selection-fg":a??r??``,"--trees-theme-list-hover-bg":c??(y?`rgba(255,255,255,0.08)`:`rgba(0,0,0,0.06)`),"--trees-theme-list-active-selection-bg":u??`transparent`,"--trees-theme-focus-ring":d??r??``,"--trees-theme-input-bg":f??``};return i!=null&&i!==``&&(b[`--trees-theme-sidebar-border`]=i),p!=null&&p!==``&&(b[`--trees-theme-input-border`]=p),m!=null&&m!==``&&(b[`--trees-theme-scrollbar-thumb`]=m),g!=null&&g!==``&&(b[`--trees-theme-git-added-fg`]=g),_!=null&&_!==``&&(b[`--trees-theme-git-modified-fg`]=_),v!=null&&v!==``&&(b[`--trees-theme-git-deleted-fg`]=v),b}var vT=5,yT=1<<vT,bT=yT*4;function xT(){return{childIdByNameId:new Map,childIds:[],childPositionById:new Map,childVisibleChunkSums:null,totalChildSubtreeNodeCount:0,totalChildVisibleSubtreeCount:0}}function ST(){return{childIdByNameId:null,childIds:[],childPositionById:null,childVisibleChunkSums:null,totalChildSubtreeNodeCount:0,totalChildVisibleSubtreeCount:0}}function CT(e,t){if(t.childIdByNameId!=null)return t.childIdByNameId;let n=new Map;for(let r of t.childIds){let t=e[r];t!=null&&n.set(t.nameId,r)}return t.childIdByNameId=n,n}function wT(e){if(e.childPositionById!=null)return e.childPositionById;let t=new Map;for(let n=0;n<e.childIds.length;n++){let r=e.childIds[n];r!=null&&t.set(r,n)}return e.childPositionById=t,t}function TT(e,t){e.childPositionById!=null&&e.childPositionById.set(t,e.childIds.length),e.childIds.push(t)}function ET(e,t){if(e.childPositionById!=null)for(let n=t;n<e.childIds.length;n++){let t=e.childIds[n];t!=null&&e.childPositionById.set(t,n)}}function DT(e,t){let n=0,r=0;for(let i of t.childIds){let t=e[i];t!=null&&(n+=t.subtreeNodeCount,r+=t.visibleSubtreeCount)}t.totalChildSubtreeNodeCount=n,t.totalChildVisibleSubtreeCount=r,jT(e,t)}function OT(e,t,n,r){if(e.totalChildSubtreeNodeCount+=n,e.totalChildVisibleSubtreeCount+=r,e.childVisibleChunkSums==null||r===0)return;let i=wT(e).get(t);if(i===void 0)return;let a=i>>vT;e.childVisibleChunkSums[a]+=r}function kT(e,t,n){let r=t.childVisibleChunkSums;if(r!=null){let i=n,a=0;for(let o of r){if(i<o){let r=MT(e,t,a,i);return{...r,childVisibleIndex:n-r.localVisibleIndex}}i-=o,a+=yT}throw Error(`Visible child index ${String(n)} is out of range`)}let i=n;for(let r=0;r<t.childIds.length;r++){let a=t.childIds[r];if(a==null)continue;let o=e[a];if(o!=null){if(i<o.visibleSubtreeCount)return{childIndex:r,childVisibleIndex:n-i,localVisibleIndex:i};i-=o.visibleSubtreeCount}}throw Error(`Visible child index ${String(n)} is out of range`)}function AT(e,t,n){let r=0,i=t.childVisibleChunkSums,a=0;if(i!=null){let e=n>>vT;for(let t=0;t<e;t+=1)r+=i[t]??0;a=e<<vT}for(let i=a;i<n;i+=1){let n=t.childIds[i];if(n==null)continue;let a=e[n];a!=null&&(r+=a.visibleSubtreeCount)}return r}function jT(e,t){if(t.childIds.length<bT){t.childVisibleChunkSums=null;return}let n=Math.ceil(t.childIds.length/yT),r=new Int32Array(n);for(let n=0;n<t.childIds.length;n++){let i=t.childIds[n];if(i==null)continue;let a=e[i];a!=null&&(r[n>>vT]+=a.visibleSubtreeCount)}t.childVisibleChunkSums=r}function MT(e,t,n,r){let i=Math.min(t.childIds.length,n+yT),a=r;for(let r=n;r<i;r++){let n=t.childIds[r];if(n==null)continue;let i=e[n];if(i!=null){if(a<i.visibleSubtreeCount)return{childIndex:r,localVisibleIndex:a};a-=i.visibleSubtreeCount}}throw Error(`Visible child index ${String(r)} is out of range`)}var NT=7,PT=3,FT=1<<PT,IT=4;function LT(e,t,n=0){return e<<IT|n<<PT|t}function RT(e){return e.depthAndFlags>>>IT}function zT(e){return(e.depthAndFlags&FT)>>PT}function BT(e){return(e.depthAndFlags&FT)!==0}function VT(e){return e.depthAndFlags&NT}function HT(e,t){return(VT(e)&t)!==0}function UT(e,t){e.depthAndFlags|=t}function WT(e,t){e.depthAndFlags=LT(t,VT(e),zT(e))}var GT=Symbol(`benchmarkInstrumentation`);function KT(e,t){return t==null||Object.defineProperty(e,GT,{configurable:!0,enumerable:!1,value:t,writable:!1}),e}function qT(e){return e==null?null:e[GT]??null}function JT(e,t,n){return e==null?n():e.measurePhase(t,n)}function YT(e,t,n){!Number.isFinite(n)||e==null||e.setCounter(t,n)}function XT(e){return e>=48&&e<=57}function ZT(e){let t=[],n=0,r=0;for(;r<e.length;){for(;r<e.length&&!XT(e.charCodeAt(r));)r+=1;if(r>=e.length)break;r>n&&t.push(e.slice(n,r));let i=0;for(;r<e.length&&XT(e.charCodeAt(r));)i=i*10+(e.charCodeAt(r)-48),r+=1;t.push(i),n=r}return(n<e.length||t.length===0)&&t.push(e.slice(n)),t}function QT(e){let t=e.toLowerCase();return{lowerValue:t,tokens:ZT(t)}}function $T(e,t){let n=Math.min(e.length,t.length);for(let r=0;r<n;r++){let n=e[r],i=t[r];if(n===i)continue;if(typeof n==`number`&&typeof i==`number`)return n<i?-1:1;let a=String(n),o=String(i);if(a!==o)return a<o?-1:1}return e.length===t.length?0:e.length<t.length?-1:1}function eE(e,t){if(e.tokens.length===1&&t.tokens.length===1&&typeof e.tokens[0]==`string`&&typeof t.tokens[0]==`string`)return e.lowerValue===t.lowerValue?0:e.lowerValue<t.lowerValue?-1:1;let n=$T(e.tokens,t.tokens);return n===0?e.lowerValue===t.lowerValue?0:e.lowerValue<t.lowerValue?-1:1:n}function tE(e,t,n){let r=eE(n(e),n(t));return r===0?e===t?0:e<t?-1:1:r}function nE(e,t){return tE(e,t,QT)}function rE(e,t){return t===e.segments.length-1?+!!e.isDirectory:1}function iE(e,t){let n=Math.min(e.segments.length,t.segments.length);for(let r=0;r<n;r++){let n=e.segments[r],i=t.segments[r];if(n===i)continue;let a=rE(e,r);return a===rE(t,r)?nE(n,i):a===1?-1:1}return e.segments.length===t.segments.length?e.isDirectory===t.isDirectory?0:e.isDirectory?-1:1:e.segments.length<t.segments.length?-1:1}function aE(e,t){return iE(e,t)}function oE(e,t,n){let r=e=>{let t=n.get(e);if(t!=null)return t;let r=QT(e);return n.set(e,r),r},i=Math.min(e.segments.length,t.segments.length);for(let n=0;n<i;n++){let i=e.segments[n],a=t.segments[n];if(i===a)continue;let o=rE(e,n);return o===rE(t,n)?tE(i,a,r):o===1?-1:1}return e.segments.length===t.segments.length?e.isDirectory===t.isDirectory?0:e.isDirectory?-1:1:e.segments.length<t.segments.length?-1:1}function sE(e,t){let n=e.sortKeyById[t];if(n!==void 0)return n;let r=e.valueById[t],i=QT(r);return e.sortKeyById[t]=i,i}function cE(e={}){return{flattenEmptyDirectories:e.flattenEmptyDirectories!==!1,sort:e.sort??`default`}}function lE(e){let t=e.length>0&&e.charCodeAt(e.length-1)===47,n=t?e.length-1:e.length,r=[],i=0;for(let t=0;t<n;t++)e.charCodeAt(t)===47&&(r.push(e.slice(i,t)),i=t+1);return r.push(e.slice(i,n)),{hasTrailingSlash:t,segments:r}}function uE(e){let{hasTrailingSlash:t,segments:n}=lE(e);return{basename:n[n.length-1]??``,isDirectory:t,path:e,segments:n}}function dE(e){if(e.length===0)return{requiresDirectory:!1,segments:[]};let{hasTrailingSlash:t,segments:n}=lE(e);return{requiresDirectory:t,segments:n}}var fE=``;function pE(){let e=new Map;return e.set(fE,0),{idByValue:e,valueById:[fE],sortKeyById:[QT(fE)]}}function mE(e,t){let n=e.idByValue.get(t);if(n!==void 0)return n;let r=e.valueById.length;return e.idByValue.set(t,r),e.valueById.push(t),r}function hE(e,t){let n=e.valueById[t];if(n===void 0)throw Error(`Unknown segment ID: ${String(t)}`);return n}var gE=Symbol(`pathStorePreparedInputKind`);function _E(e,t){return e[gE]=t,e}function vE(e){return{basename:e.basename,depth:e.segments.length,isDirectory:e.isDirectory,path:e.path,segments:e.segments}}function yE(e,t,n){return n===`default`?aE(e,t):n(vE(e),vE(t))}function bE(){return{depthAndFlags:LT(0,3,1),nameId:0,parentId:0,subtreeNodeCount:1,visibleSubtreeCount:1}}function xE(e,t){let n=Math.min(e.length,t.length);for(let r=0;r<n;r++)if(e[r]!==t[r])return r;return n}function SE(e){return e.isDirectory?e.segments.length:e.segments.length-1}function CE(e){return Array.isArray(e)&&e.every(e=>typeof e==`object`&&!!e&&typeof e.path==`string`&&Array.isArray(e.segments)&&typeof e.basename==`string`&&typeof e.isDirectory==`boolean`)}function wE(e){return Array.isArray(e)&&e.every(e=>typeof e==`string`)}function TE(e,t={}){return jE(e,t).map(e=>e.path)}function EE(e,t={}){let n=jE(e,t);return _E({paths:n.map(e=>e.path),preparedPaths:n},`prepared`)}function DE(e){let t=e.length,n=!1;for(let r=0;r<t;r+=1){let t=e[r];if(t.length>0&&t.charCodeAt(t.length-1)===47){n=!0;break}}return _E({paths:e,presortedPaths:e,presortedPathsContainDirectories:n},`presorted`)}function OE(e){let t=e,n=t.preparedPaths;if(t[gE]===`prepared`&&n!=null)return n;if(!CE(n))throw Error(`preparedInput must come from PathStore.prepareInput()`);return n}function kE(e){let t=e;return t[gE]===`presorted`&&t.presortedPaths!=null||wE(t.presortedPaths)?t.presortedPaths:null}function AE(e){let t=e;return typeof t.presortedPathsContainDirectories==`boolean`?t.presortedPathsContainDirectories:null}function jE(e,t={}){let n=cE(t),r=qT(t);YT(r,`workload.inputFiles`,e.length);let i=JT(r,`store.preparePathEntries.parse`,()=>e.map(e=>uE(e)));return JT(r,`store.preparePathEntries.sort`,()=>i.sort((e,t)=>yE(e,t,n.sort))),i}var ME=class{directories=new Map;directoryStack=[0];presortedDirectoryNodeIds=[];initialExpandedPathSet;createdDirectoriesAllExpanded=!1;createdDirectoryCount=0;lastPreparedPath=null;nodes=[bE()];options;instrumentation;segmentSortKeyCache=new Map;segmentTable=pE();hasDeferredDirectoryIndexes=!1;constructor(e={}){this.instrumentation=qT(e),this.options=cE(e);let t=e.initialExpandedPaths??null;if(t==null||t.length===0)this.initialExpandedPathSet=null;else{let e=new Set,n=t.length;for(let r=0;r<n;r+=1){let n=t[r],i=n.length;e.add(i>0&&n.charCodeAt(i-1)===47?n.slice(0,i-1):n)}this.initialExpandedPathSet=e,this.createdDirectoriesAllExpanded=!0}this.directories.set(0,xT())}appendPaths(e){return JT(this.instrumentation,`store.builder.appendPaths.parse`,()=>this.appendPreparedPaths(e.map(e=>uE(e))))}appendPreparedPaths(e,t=!0){return this.createdDirectoriesAllExpanded=!1,JT(this.instrumentation,`store.builder.appendPreparedPaths`,()=>{for(let n of e)this.appendPreparedPath(n,t)}),this}appendPresortedPaths(e,t=null){return JT(this.instrumentation,`store.builder.appendPresortedPaths`,()=>{if(t===!1){this.appendPresortedFilePaths(e);return}this.createdDirectoriesAllExpanded=!1;let n=null,r=0,i=this.nodes,a=this.segmentTable,o=a.idByValue,s=a.valueById,c=this.directoryStack,l=0,u=``,d=0;for(let t of e){if(n===t)throw Error(`Duplicate path: "${t}"`);let e=t.length>0&&t.charCodeAt(t.length-1)===47,a=e?t.length-1:t.length,f=0,p=0;if(n!=null)if(u.length>0&&t.length>u.length&&t.startsWith(u))f=d,p=u.length;else{let r=Math.min(a,n.length),i=!0;for(let e=0;e<r;e++){let r=t.charCodeAt(e);if(r!==n.charCodeAt(e)){i=!1;break}r===47&&(f++,p=e+1)}i&&e&&r===a&&n.length>a&&n.charCodeAt(a)===47&&(f++,p=a+1)}l=f,r=f;let m=p,h=t.indexOf(`/`,m);for(;h>=0&&h<a;){let e=c[l];if(e===void 0)throw Error(`Directory stack underflow while building the path store`);r++;let n=t.slice(m,h),a=o.get(n);a===void 0&&(a=s.length,o.set(n,a),s.push(n));let u=i.length;i.push({depthAndFlags:LT(r,0,1),nameId:a,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),this.recordCreatedDirectoryPath(t.slice(0,h)),l++,c[l]=u,m=h+1,h=t.indexOf(`/`,m)}if(e){if(m<a){let e=c[l];if(e===void 0)throw Error(`Unable to resolve directory parent for "${t}"`);r++;let n=t.slice(m,a),u=o.get(n);u===void 0&&(u=s.length,o.set(n,u),s.push(n));let d=i.length;i.push({depthAndFlags:LT(r,0,1),nameId:u,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),l++,c[l]=d}let e=c[l];if(e===void 0)throw Error(`Unable to resolve directory node for "${t}"`);this.promoteDirectoryToExplicit(e,t)}else{let e=c[l];if(e===void 0)throw Error(`Unable to resolve file parent for "${t}"`);let n=t.slice(m),a=o.get(n);a===void 0&&(a=s.length,o.set(n,a),s.push(n)),i.push({depthAndFlags:LT(r+1,0),nameId:a,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1})}m!==u.length&&(u=t.substring(0,m),d=r),n=t}c.length=l+1,n!=null&&(this.lastPreparedPath=uE(n)),this.hasDeferredDirectoryIndexes=!0}),this}appendPresortedFilePaths(e){let t=null,n=0,r=this.nodes,i=this.segmentTable,a=i.idByValue,o=i.valueById,s=this.directoryStack,c=0,l=``,u=0;for(let i of e){if(t===i)throw Error(`Duplicate path: "${i}"`);let e=i.length,d=0,f=0;if(t!=null)if(l.length>0&&i.length>l.length&&i.startsWith(l))d=u,f=l.length;else{let n=Math.min(e,t.length);for(let e=0;e<n;e++){let n=i.charCodeAt(e);if(n!==t.charCodeAt(e))break;n===47&&(d++,f=e+1)}}c=d,n=d;let p=f,m=i.indexOf(`/`,p);for(;m>=0;){let e=s[c];if(e===void 0)throw Error(`Directory stack underflow while building the path store`);n++;let t=i.slice(p,m),l=a.get(t);l===void 0&&(l=o.length,a.set(t,l),o.push(t));let u=r.length;r.push({depthAndFlags:LT(n,0,1),nameId:l,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),this.recordCreatedDirectoryPath(i.slice(0,m)),this.presortedDirectoryNodeIds.push(u),c++,s[c]=u,p=m+1,m=i.indexOf(`/`,p)}let h=s[c];if(h===void 0)throw Error(`Unable to resolve file parent for "${i}"`);let g=i.slice(p),_=a.get(g);_===void 0&&(_=o.length,a.set(g,_),o.push(g)),r.push({depthAndFlags:LT(n+1,0),nameId:_,parentId:h,subtreeNodeCount:1,visibleSubtreeCount:1}),p!==l.length&&(l=i.substring(0,p),u=n),t=i}s.length=c+1,t!=null&&(this.lastPreparedPath=uE(t)),this.hasDeferredDirectoryIndexes=!0}finish(e={}){let t=e.skipSubtreeCountPass===!0;return this.hasDeferredDirectoryIndexes?(JT(this.instrumentation,`store.builder.buildDirectoryIndexes`,()=>this.buildPresortedFinish(t)),this.hasDeferredDirectoryIndexes=!1):t||JT(this.instrumentation,`store.builder.computeSubtreeCounts`,()=>this.computeSubtreeCounts(0)),{directories:this.directories,nodes:this.nodes,options:this.options,rootId:0,segmentTable:this.segmentTable,presortedDirectoryNodeIds:this.presortedDirectoryNodeIds.length>0?this.presortedDirectoryNodeIds:null}}didMatchAllInitialExpandedPaths(){return this.createdDirectoriesAllExpanded&&this.initialExpandedPathSet!=null&&this.createdDirectoryCount===this.initialExpandedPathSet.size}appendPreparedPath(e,t){if(this.hasDeferredDirectoryIndexes&&=(this.buildDirectoryIndexes(),!1),this.lastPreparedPath!=null){if(e.path===this.lastPreparedPath.path)throw Error(`Duplicate path: "${e.path}"`);if(t&&(this.options.sort===`default`?oE(this.lastPreparedPath,e,this.segmentSortKeyCache):yE(this.lastPreparedPath,e,this.options.sort))>0)throw Error(`Builder input must be sorted before appendPaths(): "${e.path}"`)}let n=this.lastPreparedPath,r=SE(e),i=n==null?0:SE(n),a=n==null?0:xE(n.segments,e.segments),o=Math.min(a,r,i);this.directoryStack.length=o+1;for(let n=o;n<r;n++){let r=this.directoryStack[this.directoryStack.length-1];if(r===void 0)throw Error(`Directory stack underflow while building the path store`);let i=t?this.getOrCreateDirectoryChild(r,e.segments[n]):this.createDirectoryChild(r,e.segments[n]);this.directoryStack.push(i)}if(e.isDirectory){let t=this.directoryStack[this.directoryStack.length-1];if(t===void 0)throw Error(`Unable to resolve directory node for "${e.path}"`);this.promoteDirectoryToExplicit(t,e.path),this.lastPreparedPath=e;return}let s=this.directoryStack[this.directoryStack.length-1];if(s===void 0)throw Error(`Unable to resolve file parent for "${e.path}"`);t?this.createFileChild(s,e.basename,e.path):this.createFileChildUnchecked(s,e.basename),this.lastPreparedPath=e}recordCreatedDirectoryPath(e){!this.createdDirectoriesAllExpanded||this.initialExpandedPathSet==null||(this.createdDirectoryCount+=1,this.initialExpandedPathSet.has(e)||(this.createdDirectoriesAllExpanded=!1))}createFileChild(e,t,n){let r=mE(this.segmentTable,t),i=this.getDirectoryIndex(e),a=i.childIdByNameId;if(a!=null&&a.get(r)!==void 0)throw Error(`Path collides with an existing entry: "${n}"`);let o=this.nodes[e];if(o===void 0)throw Error(`Unknown parent node ID: ${String(e)}`);let s=this.nodes.length;return this.nodes.push({depthAndFlags:LT(RT(o)+1,0),nameId:r,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),a?.set(r,s),TT(i,s),s}createFileChildUnchecked(e,t){let n=mE(this.segmentTable,t),r=this.getDirectoryIndex(e),i=this.nodes[e];if(i===void 0)throw Error(`Unknown parent node ID: ${String(e)}`);let a=this.nodes.length;return this.nodes.push({depthAndFlags:LT(RT(i)+1,0),nameId:n,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),r.childIdByNameId!=null&&r.childIdByNameId.set(n,a),TT(r,a),a}getOrCreateDirectoryChild(e,t){let n=mE(this.segmentTable,t),r=this.getDirectoryIndex(e);if(r.childIdByNameId!=null){let e=r.childIdByNameId.get(n);if(e!==void 0){let n=this.nodes[e];if(n!=null&&!BT(n))throw Error(`Path collides with an existing file while creating directory "${t}"`);return e}}let i=this.nodes[e];if(i===void 0)throw Error(`Unknown parent node ID: ${String(e)}`);let a=this.nodes.length;return this.nodes.push({depthAndFlags:LT(RT(i)+1,0,1),nameId:n,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),r.childIdByNameId!=null&&r.childIdByNameId.set(n,a),TT(r,a),this.directories.set(a,xT()),a}createDirectoryChild(e,t){let n=mE(this.segmentTable,t),r=this.getDirectoryIndex(e),i=this.nodes[e];if(i===void 0)throw Error(`Unknown parent node ID: ${String(e)}`);let a=this.nodes.length;return this.nodes.push({depthAndFlags:LT(RT(i)+1,0,1),nameId:n,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),r.childIdByNameId!=null&&r.childIdByNameId.set(n,a),TT(r,a),this.directories.set(a,xT()),a}promoteDirectoryToExplicit(e,t){let n=this.nodes[e];if(n===void 0)throw Error(`Unknown directory node ID: ${String(e)}`);if(!BT(n))throw Error(`Path is not a directory: "${t}"`);if(HT(n,1))throw Error(`Duplicate path: "${t}"`);UT(n,1)}getDirectoryIndex(e){let t=this.directories.get(e);if(t!==void 0)return t;throw Error(`Unknown directory child index for node ${String(e)}`)}buildPresortedFinish(e){let t=this.nodes,n=this.directories;n.set(0,ST());let r=-1,i=null;for(let e=1;e<t.length;e++){let a=t[e];if(a==null)continue;if(BT(a)){let t=ST();n.set(e,t),r=e,i=t}let o;a.parentId===r?o=i:(o=n.get(a.parentId),r=a.parentId,i=o??null),o?.childIds.push(e)}if(!e)for(let e=t.length-1;e>=1;e--){let n=t[e];if(n==null)continue;let r=t[n.parentId];r!=null&&(r.subtreeNodeCount+=n.subtreeNodeCount,r.visibleSubtreeCount+=n.visibleSubtreeCount)}}buildDirectoryIndexes(){let e=this.nodes;for(let t=1;t<e.length;t++){let n=e[t];if(n==null)continue;BT(n)&&this.directories.set(t,xT());let r=this.directories.get(n.parentId);r!=null&&(r.childIdByNameId!=null&&r.childIdByNameId.set(n.nameId,t),TT(r,t))}}computeSubtreeCounts(e){let t=this.nodes[e];if(t===void 0)throw Error(`Unknown node ID: ${String(e)}`);if(!BT(t))return t.subtreeNodeCount=1,t.visibleSubtreeCount=1,1;let n=this.getDirectoryIndex(e),r=1;for(let e of n.childIds)r+=this.computeSubtreeCounts(e);return DT(this.nodes,n),t.subtreeNodeCount=r,t.visibleSubtreeCount=r,r}};function NE(e,t=`closed`,n=null){let r=FE(t);return{activeNodeCount:e.nodes.length-1,collapsedDirectoryIds:new Set,collapseNewDirectoriesByDefault:!1,defaultExpansion:r,directoriesOpenByDefault:r===`open`,hasCollapsedDirectoryOverrides:!1,directoryLoadInfoById:new Map,expandedDirectoryIds:new Set,instrumentation:n,listeners:new Map,pathCacheByNodeId:new Map([[e.rootId,{path:``,version:0}]]),pathCacheVersion:0,snapshot:e,transactionStack:[]}}function PE(){return{affectedAncestorIds:new Set,affectedNodeIds:new Set,events:[]}}function FE(e){if(typeof e!=`number`)return e;if(!Number.isInteger(e)||e<0)throw Error(`initialExpansion must be "open", "closed", or a non-negative integer depth. Received: ${String(e)}`);return e}function IE(e,t){return HT(t,2)||e.defaultExpansion===`open`?!0:e.defaultExpansion===`closed`?!1:RT(t)<=e.defaultExpansion}function LE(e,t,n=e.snapshot.nodes[t]){return n==null||!BT(n)?!1:e.directoriesOpenByDefault&&!e.hasCollapsedDirectoryOverrides?!0:e.collapsedDirectoryIds.has(t)?!1:e.expandedDirectoryIds.has(t)?!0:IE(e,n)}function RE(e,t,n,r=e.snapshot.nodes[t]){if(r==null||!BT(r))return;let i=IE(e,r);if(n){if(i){e.collapsedDirectoryIds.delete(t),e.hasCollapsedDirectoryOverrides=e.collapsedDirectoryIds.size>0;return}e.expandedDirectoryIds.add(t);return}if(i){e.collapsedDirectoryIds.add(t),e.hasCollapsedDirectoryOverrides=!0;return}e.expandedDirectoryIds.delete(t)}function zE(e,t){let n=e.directoryLoadInfoById.get(t);if(n!=null)return n;let r={activeAttemptId:null,errorMessage:null,nextAttemptId:1,state:`loaded`};return e.directoryLoadInfoById.set(t,r),r}function BE(e,t){return e.directoryLoadInfoById.get(t)?.state??`loaded`}function VE(e,t){let n=zE(e,t);if(n.state===`loading`&&n.activeAttemptId!=null)return{attemptId:n.activeAttemptId,nodeId:t,reused:!0};let r=n.nextAttemptId;return n.activeAttemptId=r,n.errorMessage=null,n.nextAttemptId+=1,n.state=`loading`,{attemptId:r,nodeId:t,reused:!1}}function HE(e,t){let n=zE(e,t);n.activeAttemptId=null,n.errorMessage=null,n.state=`unloaded`}function UE(e,t,n){let r=e.directoryLoadInfoById.get(t);return r==null||r.activeAttemptId!==n?!1:(r.activeAttemptId=null,r.errorMessage=null,r.state=`loaded`,!0)}function WE(e,t,n){return e.directoryLoadInfoById.get(t)?.activeAttemptId===n}function GE(e,t,n,r){let i=e.directoryLoadInfoById.get(t);return i==null||i.activeAttemptId!==n?!1:(i.activeAttemptId=null,i.errorMessage=r??null,i.state=`error`,!0)}function KE(e,t){e.directoryLoadInfoById.delete(t)}function qE(e,t,n){let r=n,i=e.listeners.get(t);return i==null?e.listeners.set(t,new Set([r])):i.add(r),()=>{let n=e.listeners.get(t);n!=null&&(n.delete(r),n.size===0&&e.listeners.delete(t))}}function JE(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!0,operation:`add`,path:e.path,projectionChanged:e.projectionChanged,visibleCountDelta:null}}function YE(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!0,operation:`remove`,path:e.path,projectionChanged:e.projectionChanged,recursive:e.recursive,visibleCountDelta:null}}function XE(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!0,from:e.from,operation:`move`,projectionChanged:e.projectionChanged,to:e.to,visibleCountDelta:null}}function ZE(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!1,operation:`expand`,path:e.path,projectionChanged:!0,visibleCountDelta:null}}function QE(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!1,operation:`collapse`,path:e.path,projectionChanged:!0,visibleCountDelta:null}}function $E(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!1,operation:`mark-directory-unloaded`,path:e.path,projectionChanged:e.projectionChanged,visibleCountDelta:null}}function eD(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],attemptId:e.attemptId,canonicalChanged:!1,operation:`begin-child-load`,path:e.path,projectionChanged:e.projectionChanged,reused:e.reused,visibleCountDelta:null}}function tD(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],attemptId:e.attemptId,canonicalChanged:e.childEvents.some(e=>e.canonicalChanged),childEvents:e.childEvents,operation:`apply-child-patch`,path:e.path,projectionChanged:e.projectionChanged,visibleCountDelta:null}}function nD(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],attemptId:e.attemptId,canonicalChanged:!1,operation:`complete-child-load`,path:e.path,projectionChanged:e.projectionChanged,stale:e.stale,visibleCountDelta:null}}function rD(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],attemptId:e.attemptId,canonicalChanged:!1,errorMessage:e.errorMessage,operation:`fail-child-load`,path:e.path,projectionChanged:e.projectionChanged,stale:e.stale,visibleCountDelta:null}}function iD(e){return{activeNodeCountAfter:e.activeNodeCountAfter,activeNodeCountBefore:e.activeNodeCountBefore,affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],cachedPathEntryCountAfter:e.cachedPathEntryCountAfter,cachedPathEntryCountBefore:e.cachedPathEntryCountBefore,canonicalChanged:!1,idsPreserved:e.idsPreserved,loadInfoEntryCountAfter:e.loadInfoEntryCountAfter,loadInfoEntryCountBefore:e.loadInfoEntryCountBefore,mode:e.mode,operation:`cleanup`,projectionChanged:e.projectionChanged,reclaimedCachedPathEntryCount:e.reclaimedCachedPathEntryCount,reclaimedLoadInfoEntryCount:e.reclaimedLoadInfoEntryCount,reclaimedNodeSlotCount:e.reclaimedNodeSlotCount,reclaimedSegmentCount:e.reclaimedSegmentCount,segmentCountAfter:e.segmentCountAfter,segmentCountBefore:e.segmentCountBefore,totalNodeSlotCountAfter:e.totalNodeSlotCountAfter,totalNodeSlotCountBefore:e.totalNodeSlotCountBefore,visibleCountDelta:null}}function aD(e,t,n){return{...n,visibleCountDelta:gD(e)-t}}function oD(e,t){let n=gD(e),r=PE();e.transactionStack.push(r);try{t()}catch(t){throw lD(e,r,!1),t}lD(e,r,!0,gD(e)-n)}function sD(e,t){let n=e.instrumentation;if(n==null){cD(e,t);return}JT(n,`store.events.record`,()=>cD(e,t))}function cD(e,t){let n=e.transactionStack[e.transactionStack.length-1]??null;if(n==null){mD(e,t);return}n.events.push(t),pD(n,t)}function lD(e,t,n,r=null){if(e.transactionStack.pop()!==t)throw Error(`Transaction stack underflow`);if(!n)return;let i=e.transactionStack[e.transactionStack.length-1]??null;if(i!=null){let n=e.instrumentation;n==null?fD(i,t):JT(n,`store.events.batch.merge`,()=>fD(i,t));return}let a=uD(t,r),o=e.instrumentation;if(o==null){mD(e,a);return}JT(o,`store.events.batch.commit`,()=>mD(e,a))}function uD(e,t){return{affectedAncestorIds:[...e.affectedAncestorIds],affectedNodeIds:[...e.affectedNodeIds],canonicalChanged:e.events.some(e=>e.canonicalChanged),events:[...e.events],operation:`batch`,projectionChanged:e.events.some(e=>e.projectionChanged),visibleCountDelta:t}}function dD(e,t){for(let n of t.affectedAncestorIds)e.affectedAncestorIds.add(n);for(let n of t.affectedNodeIds)e.affectedNodeIds.add(n)}function fD(e,t){for(let n of t.events)e.events.push(n);dD(e,t)}function pD(e,t){for(let n of t.affectedNodeIds)e.affectedNodeIds.add(n);for(let n of t.affectedAncestorIds)e.affectedAncestorIds.add(n)}function mD(e,t){let n=e.instrumentation;if(n==null){hD(e,t);return}JT(n,`store.events.emit`,()=>hD(e,t))}function hD(e,t){e.listeners.get(t.operation)?.forEach(e=>e(t)),e.listeners.get(`*`)?.forEach(e=>e(t))}function gD(e){return e.snapshot.nodes[e.snapshot.rootId]?.visibleSubtreeCount??0}function _D(e,t){if(e.snapshot.options.flattenEmptyDirectories!==!0)return null;let n=e.snapshot.nodes[t];if(n==null||!BT(n)||HT(n,2))return null;let r=e.snapshot.directories.get(t);if(r==null||r.childIds.length!==1)return null;let i=r.childIds[0];if(i==null)return null;let a=e.snapshot.nodes[i];return a==null||!BT(a)?null:i}function vD(e,t){let n=t;for(;;){let t=_D(e,n);if(t==null)return n;n=t}}function yD(e,t){let n=[t],r=t;for(;;){let t=_D(e,r);if(t==null)return n;n.push(t),r=t}}function bD(e,t){let n=t==null?e.snapshot.rootId:AD(e,t);return n==null?[]:PD(e,n)}function xD(e,t){let n=uE(t),r=n.isDirectory?n.segments:n.segments.slice(0,-1),i=YD(e,JD(e,r)),{createdNodeIds:a,directoryId:o}=FD(e,r),s=new Set(a),c=o;if(n.isDirectory){let n=ND(e,o);if(HT(n,1))throw Error(`Path already exists: "${t}"`);UT(n,1),e.pathCacheByNodeId.set(o,{path:t,version:e.pathCacheVersion}),s.add(o)}else c=LD(e,o,n.basename),s.add(c);DD(e,o);let l=YD(e,o);return JE({affectedAncestorIds:kD(e,c),affectedNodeIds:[...s],path:t,projectionChanged:XD(i,l)})}function SD(e,t,n){let r=AD(e,t);if(r==null)throw Error(`Path does not exist: "${t}"`);let i=ND(e,r);if(HT(i,2))throw Error(`The root node cannot be removed`);if(BT(i)&&MD(e,r).childIds.length>0&&n.recursive!==!0)throw Error(`Cannot remove a non-empty directory without recursive: "${t}"`);let a=i.parentId,o=YD(e,a),s=KD(e,r);BD(e,a,r,i.nameId),qD(e,a),DD(e,a);let c=YD(e,a);return YE({affectedAncestorIds:kD(e,a),affectedNodeIds:s,path:t,projectionChanged:XD(o,c),recursive:n.recursive===!0})}function CD(e,t,n,r){let i=AD(e,t);if(i==null)throw Error(`Source path does not exist: "${t}"`);let a=ND(e,i);if(HT(a,2))throw Error(`The root node cannot be moved`);let o=r.collision??`error`,s=WD(e,i,n),c=YD(e,a.parentId),l=YD(e,s.parentId),u=hE(e.snapshot.segmentTable,a.nameId),d=mE(e.snapshot.segmentTable,s.basename);if(s.parentId===a.parentId&&u===s.basename)return null;if(BT(a)&&eO(e,i,s.parentId))throw Error(`Cannot move a directory into one of its descendants`);let f=CT(e.snapshot.nodes,MD(e,s.parentId)).get(d),p=s.existingNodeId??f??null;if(p!=null&&p!==i&&GD(e,p,o,zT(a))===`skip`)return null;let m=a.parentId;BD(e,m,i,a.nameId),a.parentId=s.parentId,a.nameId=d,e.pathCacheByNodeId.delete(i),$D(e,i),zD(e,s.parentId,i),qD(e,m),e.pathCacheVersion++,DD(e,m),s.parentId!==m&&DD(e,s.parentId);let h=YD(e,m),g=YD(e,s.parentId);return XE({affectedAncestorIds:[...new Set([...kD(e,m),...kD(e,s.parentId)])],affectedNodeIds:[i],from:t,projectionChanged:ZD([c,l],[h,g]),to:ED(e,i)})}function wD(e,t){let n=e.pathCacheByNodeId.get(t);return n!=null&&n.version===e.pathCacheVersion?n.path:null}function TD(e,t,n){return e.pathCacheByNodeId.set(t,{path:n,version:e.pathCacheVersion}),n}function ED(e,t){let n=ND(e,t),r=wD(e,t);if(r!=null)return r;if(HT(n,2))return TD(e,t,``);let i=ED(e,n.parentId),a=hE(e.snapshot.segmentTable,n.nameId),o=i.length===0?a:`${i}${a}`;return TD(e,t,BT(n)?`${o}/`:o)}function DD(e,t){let n=e.instrumentation;if(n==null){nO(e,t);return}JT(n,`store.recomputeCountsUpwardFrom`,()=>nO(e,t))}function OD(e,t){let n=[[t,0]],{nodes:r,directories:i}=e.snapshot;for(;n.length>0;){let t=n[n.length-1],a=t[0],o=r[a];if(o==null||!BT(o)){tO(e,a,o,!0),n.pop();continue}let s=i.get(a);if(s==null||t[1]>=s.childIds.length){tO(e,a,o,!0),n.pop();continue}let c=s.childIds[t[1]++];n.push([c,0])}}function kD(e,t){let n=[],r=t;for(;r!=null;){let t=ND(e,r);if(n.push(r),r===e.snapshot.rootId)break;r=t.parentId}return n}function AD(e,t){if(t.length===0)return e.snapshot.rootId;let n=dE(t);return jD(e,n.segments,n.requiresDirectory)}function jD(e,t,n){let r=e.snapshot.rootId;for(let n of t){let t=e.snapshot.segmentTable.idByValue.get(n);if(t===void 0)return null;let i=MD(e,r),a=CT(e.snapshot.nodes,i).get(t);if(a===void 0)return null;r=a}let i=ND(e,r);return n&&!BT(i)?null:r}function MD(e,t){let n=e.snapshot.directories.get(t);if(n===void 0)throw Error(`Unknown directory child index for node ${String(t)}`);return n}function ND(e,t){let n=e.snapshot.nodes[t];if(n===void 0||HT(n,4))throw Error(`Unknown node ID: ${String(t)}`);return n}function PD(e,t){let n=e.snapshot.nodes[t];if(n===void 0||HT(n,4))return[];if(!BT(n))return[ED(e,t)];if(MD(e,t).childIds.length===0)return HT(n,1)&&!HT(n,2)?[ED(e,t)]:[];let r=[],i=[{childIndex:0,nodeId:t}];for(;i.length>0;){let t=i[i.length-1];if(t==null)break;let n=e.snapshot.nodes[t.nodeId];if(n===void 0||HT(n,4)){i.pop();continue}if(!BT(n)){r.push(ED(e,t.nodeId)),i.pop();continue}let a=MD(e,t.nodeId);if(a.childIds.length===0){HT(n,1)&&!HT(n,2)&&r.push(ED(e,t.nodeId)),i.pop();continue}let o=a.childIds[t.childIndex];if(o==null){i.pop();continue}t.childIndex++,i.push({childIndex:0,nodeId:o})}return r}function FD(e,t){let n=[],r=e.snapshot.rootId;for(let i of t){let t=mE(e.snapshot.segmentTable,i),a=MD(e,r),o=CT(e.snapshot.nodes,a).get(t);if(o!==void 0){if(!BT(ND(e,o)))throw Error(`Cannot create a directory that collides with an existing file: "${i}"`);r=o;continue}r=ID(e,r,t),n.push(r)}return{createdNodeIds:n,directoryId:r}}function ID(e,t,n){let r=ND(e,t),i=e.snapshot.nodes.length;return e.snapshot.nodes.push({depthAndFlags:LT(RT(r)+1,0,1),nameId:n,parentId:t,subtreeNodeCount:1,visibleSubtreeCount:1}),e.snapshot.directories.set(i,xT()),zD(e,t,i),e.collapseNewDirectoriesByDefault&&(e.collapsedDirectoryIds.add(i),e.hasCollapsedDirectoryOverrides=!0),e.activeNodeCount++,i}function LD(e,t,n){let r=mE(e.snapshot.segmentTable,n),i=MD(e,t);if(CT(e.snapshot.nodes,i).has(r))throw Error(`Path already exists: "${iO(e,t,n)}"`);let a=ND(e,t),o=e.snapshot.nodes.length;return e.snapshot.nodes.push({depthAndFlags:LT(RT(a)+1,0),nameId:r,parentId:t,subtreeNodeCount:1,visibleSubtreeCount:1}),zD(e,t,o),e.activeNodeCount++,o}function RD(e,t,n){let r=0,i=t.childIds.length;for(;r<i;){let a=r+i>>>1,o=t.childIds[a];if(o==null){i=a;continue}VD(e,n,o)<0?i=a:r=a+1}return r}function zD(e,t,n){let r=MD(e,t),i=ND(e,n);CT(e.snapshot.nodes,r).set(i.nameId,n),OT(r,n,i.subtreeNodeCount,i.visibleSubtreeCount);let a=RD(e,r,n);r.childIds.splice(a,0,n),ET(r,a),jT(e.snapshot.nodes,r)}function BD(e,t,n,r){let i=MD(e,t),a=wT(i),o=a.get(n)??-1;CT(e.snapshot.nodes,i).delete(r),a.delete(n);let s=e.snapshot.nodes[n];s!=null&&OT(i,n,-s.subtreeNodeCount,-s.visibleSubtreeCount),o>=0&&(i.childIds.splice(o,1),ET(i,o),jT(e.snapshot.nodes,i))}function VD(e,t,n){let r=e.snapshot.options.sort;return r===`default`?HD(e,t,n):r(UD(e,t),UD(e,n))}function HD(e,t,n){let r=ND(e,t),i=ND(e,n),a=BT(r);if(a!==BT(i))return a?-1:1;let o=eE(sE(e.snapshot.segmentTable,r.nameId),sE(e.snapshot.segmentTable,i.nameId));if(o!==0)return o;let s=hE(e.snapshot.segmentTable,r.nameId),c=hE(e.snapshot.segmentTable,i.nameId);return s===c?t<n?-1:1:s<c?-1:1}function UD(e,t){let n=ND(e,t),r=ED(e,t),i=BT(n),a=i?r.slice(0,-1):r;return{basename:hE(e.snapshot.segmentTable,n.nameId),depth:RT(n),isDirectory:i,path:r,segments:a.length===0?[]:a.split(`/`)}}function WD(e,t,n){let r=ND(e,t),i=AD(e,n);if(i!=null){let t=ND(e,i);if(BT(t))return{basename:hE(e.snapshot.segmentTable,r.nameId),existingNodeId:null,parentId:i};let a=dE(n).segments;return{basename:a[a.length-1]??``,existingNodeId:i,parentId:t.parentId}}let a=dE(n),o=a.segments[a.segments.length-1]??``,s=a.segments.slice(0,-1),c=s.length===0?e.snapshot.rootId:jD(e,s,!0);if(c==null)throw Error(`Destination parent does not exist: "${n}"`);return{basename:o,existingNodeId:null,parentId:c}}function GD(e,t,n,r){if(n===`skip`)return`skip`;if(n===`error`)throw Error(`Destination already exists: "${ED(e,t)}"`);let i=ND(e,t);if(zT(i)!==r)throw Error(`replace collision requires the same source and destination kinds`);if(BT(i)&&MD(e,t).childIds.length>0)throw Error(`replace collision does not support non-empty directories`);let a=i.parentId,o=i.nameId;return KD(e,t),BD(e,a,t,o),qD(e,a),DD(e,a),`handled`}function KD(e,t){let n=[],r=[{nodeId:t,visitedChildren:!1}];for(;r.length>0;){let t=r.pop();if(t==null)break;let i=ND(e,t.nodeId);if(t.visitedChildren||!BT(i)){BT(i)&&e.snapshot.directories.delete(t.nodeId),UT(i,4),e.pathCacheByNodeId.delete(t.nodeId),e.collapsedDirectoryIds.delete(t.nodeId)&&(e.hasCollapsedDirectoryOverrides=e.collapsedDirectoryIds.size>0),e.expandedDirectoryIds.delete(t.nodeId),KE(e,t.nodeId),e.activeNodeCount--,n.push(t.nodeId);continue}r.push({nodeId:t.nodeId,visitedChildren:!0});let a=MD(e,t.nodeId);for(let e=a.childIds.length-1;e>=0;e--){let t=a.childIds[e];t!=null&&r.push({nodeId:t,visitedChildren:!1})}}return n}function qD(e,t){let n=t;for(;n!=null;){let t=ND(e,n);if(!BT(t)||HT(t,2)||MD(e,n).childIds.length>0)return;UT(t,1),n=t.parentId===n?null:t.parentId}}function JD(e,t){let n=e.snapshot.rootId;for(let r of t){let t=e.snapshot.segmentTable.idByValue.get(r);if(t==null)break;let i=CT(e.snapshot.nodes,MD(e,n)).get(t);if(i==null||!BT(ND(e,i)))break;n=i}return n}function YD(e,t){let n=QD(e,t);if(n==null)return null;let r=vD(e,n),i=ND(e,r),a=n===r?null:yD(e,n).map(t=>ED(e,t));return JSON.stringify({flattenedSegmentPaths:a,hasChildren:MD(e,r).childIds.length>0,path:ED(e,r),terminalKind:zT(i)})}function XD(e,t){return ZD([e],[t])}function ZD(e,t){for(let n=0;n<e.length;n+=1){let r=e[n],i=t[n];if(r==null||i==null||r!==i)return!0}return!1}function QD(e,t){let n=t;for(;n!=null;){let t=ND(e,n);if(!BT(t)||HT(t,2))return null;if(!LE(e,n,t))return n;n=t.parentId}return null}function $D(e,t){let n=ND(e,t);if(WT(n,(t===e.snapshot.rootId?-1:RT(ND(e,n.parentId)))+1),!BT(n))return;let r=MD(e,t);for(let t of r.childIds)$D(e,t)}function eO(e,t,n){let r=n;for(;r!=null;){if(r===t)return!0;let n=ND(e,r);if(r===e.snapshot.rootId)return!1;r=n.parentId}return!1}function tO(e,t,n=ND(e,t),r=!1){let i=e.instrumentation;if(i==null){rO(e,t,n,r);return}JT(i,`store.recomputeNodeCounts`,()=>rO(e,t,n,r))}function nO(e,t){let n=t;for(;n!=null;){let t=ND(e,n),r=t.subtreeNodeCount,i=t.visibleSubtreeCount;if(tO(e,n,t),n===e.snapshot.rootId)return;let a=t.subtreeNodeCount-r,o=t.visibleSubtreeCount-i,s=t.parentId;(a!==0||o!==0)&&OT(MD(e,s),n,a,o),n=s}}function rO(e,t,n,r){if(!BT(n)){n.subtreeNodeCount=1,n.visibleSubtreeCount=1;return}let i=MD(e,t);if(r){let t=e.instrumentation;t==null?DT(e.snapshot.nodes,i):JT(t,`store.recomputeNodeCounts.rebuildChildAggregates`,()=>DT(e.snapshot.nodes,i))}let a=1+i.totalChildSubtreeNodeCount,o=i.totalChildVisibleSubtreeCount;if(n.subtreeNodeCount=a,HT(n,2)){n.visibleSubtreeCount=o;return}n.visibleSubtreeCount=_D(e,t)==null?LE(e,t,n)?1+o:1:o}function iO(e,t,n){let r=ED(e,t);return r.length===0?n:`${r}${n}`}function aO(e){return e!=null&&!HT(e,4)}function oO(e,t){let n=e.snapshot.nodes[t];return!aO(n)||!BT(n)||HT(n,2)?null:n}function sO(e){let t=0;for(let[n,r]of e.pathCacheByNodeId)r.version===e.pathCacheVersion&&aO(e.snapshot.nodes[n])&&(t+=1);return t}function cO(e){return Math.max(0,e.valueById.length-1)}function lO(e){return{activeNodeCount:e.activeNodeCount,cachedPathEntryCount:sO(e),loadInfoEntryCount:e.directoryLoadInfoById.size,segmentCount:cO(e.snapshot.segmentTable),totalNodeSlotCount:Math.max(0,e.snapshot.nodes.length-1)}}function uO(e,t,n,r){return{activeNodeCountAfter:r.activeNodeCount,activeNodeCountBefore:n.activeNodeCount,cachedPathEntryCountAfter:r.cachedPathEntryCount,cachedPathEntryCountBefore:n.cachedPathEntryCount,idsPreserved:t,loadInfoEntryCountAfter:r.loadInfoEntryCount,loadInfoEntryCountBefore:n.loadInfoEntryCount,mode:e,reclaimedCachedPathEntryCount:n.cachedPathEntryCount-r.cachedPathEntryCount,reclaimedLoadInfoEntryCount:n.loadInfoEntryCount-r.loadInfoEntryCount,reclaimedNodeSlotCount:n.totalNodeSlotCount-r.totalNodeSlotCount,reclaimedSegmentCount:n.segmentCount-r.segmentCount,segmentCountAfter:r.segmentCount,segmentCountBefore:n.segmentCount,totalNodeSlotCountAfter:r.totalNodeSlotCount,totalNodeSlotCountBefore:n.totalNodeSlotCount}}function dO(e){let t=[],n=[];for(let n of e.collapsedDirectoryIds)oO(e,n)!=null&&t.push(ED(e,n));for(let t of e.expandedDirectoryIds)oO(e,t)!=null&&n.push(ED(e,t));return{collapsedPaths:t,expandedPaths:n}}function fO(e){let t=[];for(let[n,r]of e.directoryLoadInfoById)oO(e,n)==null||BE(e,n)===`loaded`||t.push({info:{activeAttemptId:null,errorMessage:r.errorMessage,nextAttemptId:r.nextAttemptId,state:r.state},path:ED(e,n)});return t}function pO(e,t){e.collapsedDirectoryIds.clear(),e.hasCollapsedDirectoryOverrides=!1,e.expandedDirectoryIds.clear();for(let n of t.expandedPaths){let t=AD(e,n);t!=null&&RE(e,t,!0,ND(e,t))}for(let n of t.collapsedPaths){let t=AD(e,n);t!=null&&RE(e,t,!1,ND(e,t))}}function mO(e,t){e.directoryLoadInfoById.clear();for(let n of t){let t=AD(e,n.path);t!=null&&oO(e,t)!=null&&e.directoryLoadInfoById.set(t,{activeAttemptId:null,errorMessage:n.info.errorMessage,nextAttemptId:n.info.nextAttemptId,state:n.info.state})}}function hO(e){e.pathCacheVersion+=1,e.pathCacheByNodeId.clear(),e.pathCacheByNodeId.set(e.snapshot.rootId,{path:``,version:e.pathCacheVersion})}function gO(e){let t=e.snapshot.segmentTable,n=pE();for(let r of e.snapshot.nodes)if(aO(r)){if(HT(r,2)){r.nameId=0;continue}r.nameId=mE(n,hE(t,r.nameId))}e.snapshot.segmentTable=n}function _O(e){for(let[t,n]of e.snapshot.directories){let r=e.snapshot.nodes[t];if(!aO(r)||!BT(r)){e.snapshot.directories.delete(t);continue}let i=n.childIds.filter(n=>{let r=e.snapshot.nodes[n];return aO(r)&&r.parentId===t});n.childIds=i,n.childIdByNameId=new Map(i.map(t=>[ND(e,t).nameId,t])),n.childPositionById=new Map(i.map((e,t)=>[e,t])),DT(e.snapshot.nodes,n)}}function vO(e){let t=e.snapshot.nodes.length-1;for(;t>e.snapshot.rootId;){let n=e.snapshot.nodes[t];if(aO(n))break;--t}e.snapshot.nodes.length=t+1}function yO(e){let t=dO(e),n=fO(e);JT(e.instrumentation,`store.cleanup.stable.clearPathCaches`,()=>hO(e)),JT(e.instrumentation,`store.cleanup.stable.rebuildSegmentTable`,()=>gO(e)),JT(e.instrumentation,`store.cleanup.stable.rebuildDirectoryIndexes`,()=>_O(e)),JT(e.instrumentation,`store.cleanup.stable.trimTrailingRemovedNodeSlots`,()=>vO(e)),JT(e.instrumentation,`store.cleanup.stable.restoreExpansionOverrides`,()=>pO(e,t)),JT(e.instrumentation,`store.cleanup.stable.restoreDirectoryLoadInfos`,()=>mO(e,n)),JT(e.instrumentation,`store.cleanup.stable.recomputeCounts`,()=>OD(e,e.snapshot.rootId))}function bO(e){let t=dO(e),n=fO(e),r=JT(e.instrumentation,`store.cleanup.aggressive.listPaths`,()=>bD(e)),i=KT({...e.snapshot.options},e.instrumentation),a=JT(e.instrumentation,`store.cleanup.aggressive.rebuildSnapshot`,()=>{let e=new ME(i);return e.appendPaths(r),e.finish()});e.snapshot=a,e.activeNodeCount=a.nodes.length-1,e.pathCacheByNodeId=new Map([[a.rootId,{path:``,version:0}]]),e.pathCacheVersion=0,JT(e.instrumentation,`store.cleanup.aggressive.restoreExpansionOverrides`,()=>pO(e,t)),JT(e.instrumentation,`store.cleanup.aggressive.restoreDirectoryLoadInfos`,()=>mO(e,n)),JT(e.instrumentation,`store.cleanup.aggressive.recomputeCounts`,()=>OD(e,e.snapshot.rootId))}function xO(e){for(let t of e.directoryLoadInfoById.values())if(t.state===`loading`&&t.activeAttemptId!=null)return!0;return!1}function SO(e,t){let n=lO(e);t===`stable`?JT(e.instrumentation,`store.cleanup.stable`,()=>yO(e)):JT(e.instrumentation,`store.cleanup.aggressive`,()=>bO(e));let r=lO(e);return uO(t,t===`stable`,n,r)}var CO=64;function wO(e,t){let n=t+2;if(n<=e.length)return e;let r=e.length;for(;r<n;)r*=2;let i=new Int32Array(r);return i.fill(-1),i.set(e),i}function TO(e){return ND(e,e.snapshot.rootId).visibleSubtreeCount}function EO(e,t,n,r){let i=ND(e,t.terminalNodeId),a=Math.max(1,i.visibleSubtreeCount);return Math.min(r-1,n+a-1)}function DO(e,t,n,r){return{ancestorPaths:r,index:t.index,posInSet:t.posInSet,row:KO(e,t.cursor),setSize:t.setSize,subtreeEndIndex:EO(e,t.cursor,t.index,n)}}function OO(e,t,n,r,i,a){let o=MD(e,t),{childIndex:s,childVisibleIndex:c,localVisibleIndex:l}=kT(e.snapshot.nodes,o,n),u=o.childIds[s];if(u==null)throw Error(`Visible index ${String(n)} is out of range`);return kO(e,u,l,r+c,i+1,s,o.childIds.length,a)}function kO(e,t,n,r,i,a,o,s){if(!BT(ND(e,t))){if(n===0)return{ancestors:s,cursor:{headNodeId:t,terminalNodeId:t,visibleDepth:i},index:r,posInSet:a,setSize:o};throw Error(`Visible index ${String(n)} is out of range for file`)}let c=BO(e,t,i);if(n===0)return{ancestors:s,cursor:c,index:r,posInSet:a,setSize:o};let l=ND(e,c.terminalNodeId);if(!BT(l)||!LE(e,c.terminalNodeId,l))throw Error(`Visible index ${String(n)} is out of range for collapsed directory`);return OO(e,c.terminalNodeId,n-1,r+1,c.visibleDepth,[...s,{cursor:c,index:r,posInSet:a,setSize:o}])}function AO(e,t){let n=TO(e);if(t<0||t>=n)return null;let r=OO(e,e.snapshot.rootId,t,0,-1,[]),i=r.ancestors.map(t=>ED(e,t.cursor.terminalNodeId)),a=null;return{ancestorPaths:i,get ancestorRows(){if(a!=null)return a;let t=[],i=[];for(let a of r.ancestors){let r=DO(e,a,n,[...i]);t.push(r),i.push(r.row.path)}return a=t,a},index:r.index,posInSet:r.posInSet,row:KO(e,r.cursor),setSize:r.setSize,subtreeEndIndex:EO(e,r.cursor,r.index,n)}}function jO(e,t,n){let r=e.instrumentation,i=TO(e);if(i<=0||n<t)return[];let a=Math.max(0,Math.min(t,i-1)),o=Math.max(a,Math.min(n,i-1));if(r==null){if(a===0)return GO(e,o+1);let t=[],n=LO(e,a);for(let r=a;r<=o&&n!=null;r++){let r=KO(e,n);t.push(r),n=HO(e,n)}return t}let s=[],c=0,l=0,u=JT(r,`store.getVisibleSlice.selectFirstRow`,()=>LO(e,a));for(let t=a;t<=o&&u!=null;t++){let t=JT(r,`store.getVisibleSlice.materializeRow`,()=>KO(e,u));s.push(t),t.isFlattened&&(c++,l+=t.flattenedSegments?.length??0),u=JT(r,`store.getVisibleSlice.advanceCursor`,()=>HO(e,u))}return YT(r,`workload.visibleRowsRead`,s.length),YT(r,`workload.flattenedRowsRead`,c),YT(r,`workload.flattenedSegmentsRead`,l),s}function MO(e,t=TO(e)){let n=e.instrumentation;return n==null?WO(e,t):JT(n,`store.getVisibleTreeProjection`,()=>WO(e,t))}function NO(e){return UO(MO(e))}function PO(e,t){let n=AD(e,t);if(n==null||n===e.snapshot.rootId||BT(ND(e,n))&&vD(e,n)!==n)return null;let r=0,i=n,{nodes:a,rootId:o}=e.snapshot;for(;i!==o;){let t=ND(e,i).parentId,n=MD(e,t),s=wT(n).get(i);if(s==null)throw Error(`Child ${String(i)} was not found in its parent index`);if(r+=AT(a,n,s),t!==o){let n=ND(e,t),a=_D(e,t);if(!LE(e,t,n)&&a!==i)return null;vD(e,t)===t&&(r+=1)}i=t}return r}function FO(e,t){let n=AD(e,t);if(n==null)throw Error(`Path does not exist: "${t}"`);let r=ND(e,n);if(!BT(r))throw Error(`Path is not a directory: "${t}"`);return LE(e,n,r)?null:(RE(e,n,!0,r),DD(e,n),ZE({affectedAncestorIds:kD(e,n),affectedNodeIds:[n],path:t,projectionChanged:!0}))}function IO(e,t){let n=AD(e,t);if(n==null)throw Error(`Path does not exist: "${t}"`);let r=ND(e,n);if(!BT(r))throw Error(`Path is not a directory: "${t}"`);return LE(e,n,r)?(RE(e,n,!1,r),DD(e,n),QE({affectedAncestorIds:kD(e,n),affectedNodeIds:[n],path:t,projectionChanged:!0})):null}function LO(e,t){return t<0||t>=TO(e)?null:RO(e,e.snapshot.rootId,t,-1)}function RO(e,t,n,r){let i=MD(e,t),a=e.instrumentation,{childIndex:o,localVisibleIndex:s}=a==null?kT(e.snapshot.nodes,i,n):JT(a,`store.getVisibleSlice.selectChildIndex`,()=>kT(e.snapshot.nodes,i,n)),c=i.childIds[o];if(c!=null)return zO(e,c,s,r+1);throw Error(`Visible index ${String(n)} is out of range`)}function zO(e,t,n,r){if(!BT(ND(e,t))){if(n===0)return{headNodeId:t,terminalNodeId:t,visibleDepth:r};throw Error(`Visible index ${String(n)} is out of range for file`)}let i=BO(e,t,r);if(n===0)return i;let a=ND(e,i.terminalNodeId);if(!BT(a)||!LE(e,i.terminalNodeId,a))throw Error(`Visible index ${String(n)} is out of range for collapsed directory`);return RO(e,i.terminalNodeId,n-1,i.visibleDepth)}function BO(e,t,n){return BT(ND(e,t))?e.instrumentation==null?{headNodeId:t,terminalNodeId:vD(e,t),visibleDepth:n}:{headNodeId:t,terminalNodeId:JT(e.instrumentation,`store.getVisibleSlice.flatten.resolveTerminalDirectory`,()=>vD(e,t)),visibleDepth:n}:{headNodeId:t,terminalNodeId:t,visibleDepth:n}}function VO(e,t){let n=ND(e,t);if(!BT(n))return!0;let r=n.parentId;return r===e.snapshot.rootId?!0:_D(e,r)!==t}function HO(e,t){let n=ND(e,t.terminalNodeId);if(BT(n)){let r=MD(e,t.terminalNodeId);if(LE(e,t.terminalNodeId,n)&&r.childIds.length>0){let n=r.childIds[0];return n==null?null:zO(e,n,0,t.visibleDepth+1)}}let r=t.terminalNodeId,i=t.visibleDepth;for(;;){let t=ND(e,r);if(r===e.snapshot.rootId)return null;let n=t.parentId,a=MD(e,n),o=wT(a).get(r)??-1;if(o<0)throw Error(`Child ${String(r)} was not found in its parent index`);let s=a.childIds[o+1]??null;if(s!=null)return zO(e,s,0,i);VO(e,r)&&i--,r=n}}function UO(e){let t=e.paths.length,n=Array(t);for(let r=0;r<t;r+=1){let t=e.getParentIndex(r);n[r]={index:r,parentPath:t>=0?e.paths[t]??null:null,path:e.paths[r]??``,posInSet:e.posInSetByIndex[r]??0,setSize:e.setSizeByIndex[r]??0}}return{getParentIndex:e.getParentIndex,rows:n,get visibleIndexByPath(){return e.visibleIndexByPath}}}function WO(e,t){let n=Array(t),r=new Int32Array(t),i=new Int32Array(t),a=new Int32Array(t),o=new Int32Array(CO);o.fill(-1);let s=0,{nodes:c,directories:l,segmentTable:u}=e.snapshot,d=[[l.get(e.snapshot.rootId),0,-1,``]],f=e.snapshot.options.flattenEmptyDirectories,p=e.pathCacheByNodeId,m=e.pathCacheVersion,h=u.valueById;for(;d.length>0&&s<t;){let t=d[d.length-1],u=t[0];if(t[1]>=u.childIds.length){d.pop();continue}let g=t[1],_=u.childIds[t[1]++],v=c[_],y=t[2]+1,b=t[3];o=wO(o,y);let x,S=_;if(BT(v))S=f?vD(e,_):_,x=S===_?`${b}${h[v.nameId]}/`:ED(e,S);else{let e=p.get(_);x=e!=null&&e.version===m?e.path:`${b}${h[v.nameId]}`}r[s]=o[y],n[s]=x,i[s]=g,a[s]=u.childIds.length,o[y+1]=s,s+=1;let C=c[S];C!=null&&BT(C)&&LE(e,S,C)&&d.push([l.get(S),0,y,x])}s<t&&(n.length=s);let g=r.subarray(0,s),_=i.subarray(0,s),v=a.subarray(0,s),y=null;return{getParentIndex(e){return e<0||e>=s?-1:g[e]??-1},paths:n,posInSetByIndex:_,setSizeByIndex:v,get visibleIndexByPath(){if(y==null){y=new Map;for(let e=0;e<s;e+=1)y.set(n[e]??``,e)}return y}}}function GO(e,t){let n=Array(t),r=0,{nodes:i,directories:a,segmentTable:o}=e.snapshot,s=[[a.get(e.snapshot.rootId),0,-1]],c=o.valueById,l=e.snapshot.options.flattenEmptyDirectories,u=e.pathCacheByNodeId,d=e.pathCacheVersion;for(;s.length>0&&r<t;){let t=s[s.length-1],o=t[0];if(t[1]>=o.childIds.length){s.pop();continue}let f=o.childIds[t[1]++],p=i[f],m=t[2]+1;if(!BT(p)){let t=u.get(f);n[r++]={depth:m,flattenedSegments:void 0,hasChildren:!1,id:f,isExpanded:!1,isFlattened:!1,isLoading:!1,kind:`file`,loadState:void 0,name:c[p.nameId],path:t!=null&&t.version===d?t.path:ED(e,f)};continue}let h=l?vD(e,f):f,g={headNodeId:f,terminalNodeId:h,visibleDepth:m};n[r++]=KO(e,g);let _=i[h];_!=null&&BT(_)&&LE(e,h,_)&&s.push([a.get(h),0,m])}return r<t&&(n.length=r),n}function KO(e,t){let n=ND(e,t.terminalNodeId),r=BT(n)?qO(e,t):null,i=ED(e,t.terminalNodeId),a=hE(e.snapshot.segmentTable,n.nameId),o=BT(n)&&MD(e,t.terminalNodeId).childIds.length>0,s=t.headNodeId!==t.terminalNodeId,c=e.instrumentation,l=s?c==null?yD(e,t.headNodeId).map(n=>{let r=ND(e,n);return{isTerminal:n===t.terminalNodeId,name:hE(e.snapshot.segmentTable,r.nameId),nodeId:n,path:ED(e,n)}}):JT(c,`store.getVisibleSlice.flatten.collectSegments`,()=>yD(e,t.headNodeId).map(n=>{let r=ND(e,n);return{isTerminal:n===t.terminalNodeId,name:hE(e.snapshot.segmentTable,r.nameId),nodeId:n,path:ED(e,n)}})):void 0;return{depth:t.visibleDepth,flattenedSegments:l,hasChildren:o,id:t.terminalNodeId,isExpanded:BT(n)&&LE(e,t.terminalNodeId,n),isFlattened:s,isLoading:r===`loading`,kind:BT(n)?`directory`:`file`,loadState:r==null||r===`loaded`?void 0:r,name:a,path:i}}function qO(e,t){if(t.headNodeId===t.terminalNodeId)return BE(e,t.terminalNodeId);let n=yD(e,t.headNodeId),r=!1,i=!1;for(let t of n){let n=BE(e,t);if(n===`loading`)return`loading`;if(n===`error`){i=!0;continue}n===`unloaded`&&(r=!0)}return i?`error`:r?`unloaded`:`loaded`}function JO(e){let{directories:t,nodes:n,options:r,rootId:i,presortedDirectoryNodeIds:a}=e.snapshot,o=r.flattenEmptyDirectories===!0,s=e=>{let r=n[e];if(r==null||!BT(r))return;let i=t.get(e);if(i==null)throw Error(`Unknown directory child index for node ${String(e)}`);let a=i.childIds,s=a.length,c=0,l=0;for(let e=0;e<s;e++){let t=a[e];if(t==null)continue;let r=n[t];c+=r.subtreeNodeCount,l+=r.visibleSubtreeCount}i.totalChildSubtreeNodeCount=c,i.totalChildVisibleSubtreeCount=l,s>=128&&jT(n,i),r.subtreeNodeCount=1+c;let u;if(o&&s===1){let e=n[a[0]];u=e!=null&&BT(e)?l:1+l}else u=1+l;r.visibleSubtreeCount=u};if(a!=null)for(let e=a.length-1;e>=0;e--)s(a[e]);else for(let e=n.length-1;e>=1;e--)s(e);let c=n[i],l=t.get(i);if(c==null||l==null)return;let u=l.childIds,d=0,f=0;for(let e=0;e<u.length;e++){let t=u[e];if(t==null)continue;let r=n[t];d+=r.subtreeNodeCount,f+=r.visibleSubtreeCount}l.totalChildSubtreeNodeCount=d,l.totalChildVisibleSubtreeCount=f,jT(n,l),c.subtreeNodeCount=1+d,c.visibleSubtreeCount=f}function YO(e){return e.initialExpansion===`open`&&(e.initialExpandedPaths==null||e.initialExpandedPaths.length===0)}var XO=class e{#e;constructor(e={}){let t=qT(e),n=JT(t,`store.builder.create`,()=>new ME(e));if(e.preparedInput!=null){let t=kE(e.preparedInput);t==null?n.appendPreparedPaths(OE(e.preparedInput),!1):n.appendPresortedPaths(t,AE(e.preparedInput))}else{let r=e.paths??[];e.presorted===!0?n.appendPaths(r):n.appendPreparedPaths(JT(t,`store.preparePathEntries`,()=>jE(r,e)))}let r=JT(t,`store.builder.finish`,()=>n.finish({skipSubtreeCountPass:!0})),i=JT(t,`store.state.detectAllDirectoriesExpanded`,()=>(e.initialExpansion??`closed`)===`closed`&&n.didMatchAllInitialExpandedPaths());this.#e=JT(t,`store.state.create`,()=>NE(r,i?`open`:e.initialExpansion??`closed`,t)),i&&(this.#e.collapseNewDirectoriesByDefault=!0);let a=i?this.#e.snapshot.directories.size-1:JT(t,`store.state.initializeExpandedPaths`,()=>this.initializeExpandedPaths(e.initialExpandedPaths));i||YO(e)||(e.initialExpansion??`closed`)===`closed`&&a===this.#e.snapshot.directories.size-1||(e.initialExpandedPaths?.length??0)>0&&JT(t,`store.state.checkAllDirectoriesExpanded`,()=>this.hasAllDirectoriesExpanded())?JT(t,`store.state.initializeOpenVisibleCounts`,()=>JO(this.#e)):JT(t,`store.state.recomputeCounts`,()=>OD(this.#e,this.#e.snapshot.rootId))}static preparePaths(e,t={}){return TE(e,t)}static prepareInput(e,t={}){return EE(e,t)}static preparePresortedInput(e){return DE(e)}list(e){return JT(this.#e.instrumentation,`store.list`,()=>bD(this.#e,e))}add(e){JT(this.#e.instrumentation,`store.add`,()=>{let t=TO(this.#e);sD(this.#e,aD(this.#e,t,xD(this.#e,e)))})}remove(e,t={}){JT(this.#e.instrumentation,`store.remove`,()=>{let n=TO(this.#e);sD(this.#e,aD(this.#e,n,SD(this.#e,e,t)))})}move(e,t,n={}){JT(this.#e.instrumentation,`store.move`,()=>{let r=TO(this.#e),i=CD(this.#e,e,t,n);i!=null&&sD(this.#e,aD(this.#e,r,i))})}batch(e){oD(this.#e,()=>{if(typeof e==`function`){e(this);return}for(let t of e)switch(t.type){case`add`:this.add(t.path);break;case`remove`:this.remove(t.path,{recursive:t.recursive});break;case`move`:this.move(t.from,t.to,{collision:t.collision});break}})}getVisibleCount(){return JT(this.#e.instrumentation,`store.getVisibleCount`,()=>TO(this.#e))}getVisibleSlice(e,t){return JT(this.#e.instrumentation,`store.getVisibleSlice`,()=>jO(this.#e,e,t))}getVisibleRowContext(e){return JT(this.#e.instrumentation,`store.getVisibleRowContext`,()=>AO(this.#e,e))}getVisibleTreeProjection(){return NO(this.#e)}getVisibleTreeProjectionData(e){return MO(this.#e,e)}getVisibleIndex(e){return JT(this.#e.instrumentation,`store.getVisibleIndex`,()=>PO(this.#e,e))}getPathInfo(e){return JT(this.#e.instrumentation,`store.getPathInfo`,()=>{let t=AD(this.#e,e);if(t==null)return null;let n=ND(this.#e,t);return{depth:RT(n),kind:BT(n)?`directory`:`file`,path:ED(this.#e,t)}})}isExpanded(e){return JT(this.#e.instrumentation,`store.isExpanded`,()=>{let t=this.requireDirectoryNodeId(e),n=ND(this.#e,t);return LE(this.#e,t,n)})}expand(e){JT(this.#e.instrumentation,`store.expand`,()=>{let t=TO(this.#e),n=FO(this.#e,e);n!=null&&sD(this.#e,aD(this.#e,t,n))})}collapse(e){JT(this.#e.instrumentation,`store.collapse`,()=>{let t=TO(this.#e),n=IO(this.#e,e);n!=null&&sD(this.#e,aD(this.#e,t,n))})}on(e,t){return qE(this.#e,e,t)}getDirectoryLoadState(e){let t=this.requireDirectoryNodeId(e);return BE(this.#e,t)}markDirectoryUnloaded(e){JT(this.#e.instrumentation,`store.markDirectoryUnloaded`,()=>{let t=this.requireDirectoryNodeId(e);if(MD(this.#e,t).childIds.length>0)throw Error(`Cannot mark a directory with known children as unloaded: "${e}"`);let n=TO(this.#e);HE(this.#e,t),sD(this.#e,aD(this.#e,n,$E({affectedAncestorIds:kD(this.#e,t),affectedNodeIds:[t],path:e,projectionChanged:this.isDirectoryProjectionVisible(t)})))})}beginChildLoad(e){return JT(this.#e.instrumentation,`store.beginChildLoad`,()=>{let t=this.requireDirectoryNodeId(e),n=TO(this.#e),r=VE(this.#e,t);return sD(this.#e,aD(this.#e,n,eD({affectedAncestorIds:kD(this.#e,t),affectedNodeIds:[t],attemptId:r.attemptId,path:e,projectionChanged:this.isDirectoryProjectionVisible(t),reused:r.reused}))),r})}applyChildPatch(e,t){return JT(this.#e.instrumentation,`store.applyChildPatch`,()=>{let n=this.resolveActiveDirectoryNodeId(e.nodeId);if(n==null||BE(this.#e,n)!==`loading`||!WE(this.#e,n,e.attemptId))return!1;let r=ED(this.#e,n);this.validateChildPatch(r,t);let i=TO(this.#e),a=[];for(let e of t.operations){ZO(r,e);let t=TO(this.#e);switch(e.type){case`add`:a.push(aD(this.#e,t,xD(this.#e,e.path)));break;case`remove`:a.push(aD(this.#e,t,SD(this.#e,e.path,{recursive:e.recursive})));break;case`move`:{let n=CD(this.#e,e.from,e.to,{collision:e.collision});n!=null&&a.push(aD(this.#e,t,n));break}}}let o=a.some(e=>e.projectionChanged)||this.isDirectoryProjectionVisible(n);return sD(this.#e,aD(this.#e,i,tD({affectedAncestorIds:kD(this.#e,n),affectedNodeIds:[n],attemptId:e.attemptId,childEvents:a,path:ED(this.#e,n),projectionChanged:o}))),!0})}completeChildLoad(e){return JT(this.#e.instrumentation,`store.completeChildLoad`,()=>{let t=this.resolveActiveDirectoryNodeId(e.nodeId);if(t==null)return!1;let n=TO(this.#e),r=UE(this.#e,t,e.attemptId);return sD(this.#e,aD(this.#e,n,nD({affectedAncestorIds:kD(this.#e,t),affectedNodeIds:[t],attemptId:e.attemptId,path:ED(this.#e,t),projectionChanged:this.isDirectoryProjectionVisible(t),stale:!r}))),r})}failChildLoad(e,t){return JT(this.#e.instrumentation,`store.failChildLoad`,()=>{let n=this.resolveActiveDirectoryNodeId(e.nodeId);if(n==null)return!1;let r=TO(this.#e),i=GE(this.#e,n,e.attemptId,t);return sD(this.#e,aD(this.#e,r,rD({affectedAncestorIds:kD(this.#e,n),affectedNodeIds:[n],attemptId:e.attemptId,errorMessage:t,path:ED(this.#e,n),projectionChanged:this.isDirectoryProjectionVisible(n),stale:!i}))),i})}cleanup(e={}){return JT(this.#e.instrumentation,`store.cleanup`,()=>{if(this.#e.transactionStack.length>0)throw Error(`Cleanup cannot run during an open batch or transaction.`);if(xO(this.#e))throw Error(`Cleanup cannot run while directory loads are active.`);let t=TO(this.#e),n=SO(this.#e,e.mode??`stable`);return sD(this.#e,aD(this.#e,t,iD({...n,affectedAncestorIds:[],affectedNodeIds:[],projectionChanged:n.idsPreserved===!1}))),n})}getNodeCount(){return this.#e.activeNodeCount}initializeExpandedPaths(e){if(e==null||e.length===0)return 0;let t=0,n=[],r=[],i=0,a=null,o=this.#e.snapshot.segmentTable,s=o.valueById,c=this.#e.snapshot.nodes,l=new Map;for(let u of e){a!=null&&u<a&&(a=null,i=0,n.length=0,r.length=0);let e=u.length>0&&u.charCodeAt(u.length-1)===47?u.length-1:u.length;if(e===0){a=u,i=e,n.length=0,r.length=0;continue}let d=0,f=0;if(a!=null){let t=Math.min(e,i),n=!0;for(let e=0;e<t;e+=1){let t=u.charCodeAt(e);if(t!==a.charCodeAt(e)){n=!1;break}t===47&&(d+=1,f=e+1)}n&&(t===i&&e>t&&u.charCodeAt(t)===47?(d+=1,f=t+1):t===e&&i>t&&a.charCodeAt(t)===47&&(d+=1,f=e+1)),d=Math.min(d,r.length)}let p=d===0?this.#e.snapshot.rootId:r[d-1]??this.#e.snapshot.rootId,m=d,h=!0,g=f;for(;g<=e;){let t=u.indexOf(`/`,g),i=t===-1||t>e?e:t,a=u.slice(g,i),f=MD(this.#e,p).childIds,_=m===d?n[m]??0:0,v=_,y,b=l.get(a)??QT(a);l.set(a,b);let x=(e,t)=>{for(v=e;v<t;v+=1){let e=f[v],t=c[e],n=s[t.nameId];if(n===a)return y=e,!0;let r=eE(sE(o,t.nameId),b);if(r>0||r===0&&n>a)return!1}return!1};if(!x(_,f.length)&&_>0&&x(0,_),y===void 0){h=!1;break}if(!BT(ND(this.#e,y))){h=!1;break}if(n[m]=v,r[m]=y,p=y,m+=1,i===e)break;g=i+1}if(a=u,i=e,n.length=m,r.length=m,!h){a=null,i=0,n.length=0,r.length=0;continue}for(let e=d;e<m;e+=1){let n=r[e];if(n==null)continue;let i=ND(this.#e,n);LE(this.#e,n,i)||(RE(this.#e,n,!0,i),t+=1)}}return t}hasAllDirectoriesExpanded(){for(let e of this.#e.snapshot.directories.keys()){if(e===this.#e.snapshot.rootId)continue;let t=ND(this.#e,e);if(!LE(this.#e,e,t))return!1}return!0}requireDirectoryNodeId(e){let t=AD(this.#e,e);if(t==null)throw Error(`Path does not exist: "${e}"`);if(!BT(ND(this.#e,t)))throw Error(`Path is not a directory: "${e}"`);return t}resolveActiveDirectoryNodeId(e){try{if(!BT(ND(this.#e,e)))throw Error(`Node is not a directory: ${String(e)}`);return e}catch{return null}}isDirectoryProjectionVisible(e){let t=e;for(;t!==this.#e.snapshot.rootId;){let e=ND(this.#e,t).parentId;if(e!==this.#e.snapshot.rootId){let n=ND(this.#e,e),r=_D(this.#e,e);if(!LE(this.#e,e,n)&&r!==t)return!1}t=e}return!0}validateChildPatch(t,n){new e({paths:this.list(t),presorted:!0,sort:this.#e.snapshot.options.sort}).batch(n.operations)}};function ZO(e,t){switch(t.type){case`add`:case`remove`:if(!t.path.startsWith(e)||t.path===e)throw Error(`Child patch operation must stay within ${e}: "${t.path}"`);break;case`move`:if(!t.from.startsWith(e)||!t.to.startsWith(e)||t.from===e||t.to===e)throw Error(`Child patch move must stay within ${e}: "${t.from}" -> "${t.to}"`);break}}var QO={compact:{itemHeight:24,factor:.8},default:{itemHeight:30,factor:1},relaxed:{itemHeight:36,factor:1.2}};function $O(e,t){if(typeof e==`number`)return{itemHeight:t??QO.default.itemHeight,factor:e};let n=QO[e??`default`];return{itemHeight:t??n.itemHeight,factor:n.factor}}var ek=QO.default.itemHeight,tk=`@layer base, theme, unsafe;
|
|
192
|
-
|
|
193
|
-
@layer base {
|
|
194
|
-
:host {
|
|
195
|
-
/*
|
|
196
|
-
CSS variables use a fallback stack to ensure user and theme colors slot
|
|
197
|
-
in with ease. User colors take precedence over theme colors, which take
|
|
198
|
-
precedence over defaults.
|
|
199
|
-
|
|
200
|
-
Fallback order:
|
|
201
|
-
|
|
202
|
-
1. --trees-*-override (explicit)
|
|
203
|
-
2. --trees-theme-* (e.g. Shiki/VS Code tokens)
|
|
204
|
-
3. defaults
|
|
205
|
-
|
|
206
|
-
Theme variable names mirror Shiki/VS Code theme file JSON tokens.
|
|
207
|
-
|
|
208
|
-
// Available CSS Color Overrides
|
|
209
|
-
--trees-fg-override
|
|
210
|
-
--trees-fg-muted-override
|
|
211
|
-
--trees-bg-override
|
|
212
|
-
--trees-bg-muted-override
|
|
213
|
-
--trees-accent-override
|
|
214
|
-
--trees-border-color-override
|
|
215
|
-
|
|
216
|
-
--trees-focus-ring-color-override
|
|
217
|
-
--trees-focus-ring-width-override
|
|
218
|
-
--trees-focus-ring-offset-override
|
|
219
|
-
|
|
220
|
-
--trees-search-fg-override
|
|
221
|
-
--trees-search-font-weight-override
|
|
222
|
-
--trees-search-bg-override
|
|
223
|
-
|
|
224
|
-
--trees-selected-fg-override
|
|
225
|
-
--trees-selected-bg-override
|
|
226
|
-
--trees-selected-focused-border-color-override
|
|
227
|
-
|
|
228
|
-
// Git Status Color Overrides
|
|
229
|
-
--trees-status-added-override
|
|
230
|
-
--trees-status-ignored-override
|
|
231
|
-
--trees-status-modified-override
|
|
232
|
-
--trees-status-renamed-override
|
|
233
|
-
--trees-status-untracked-override
|
|
234
|
-
--trees-status-deleted-override
|
|
235
|
-
--trees-git-added-color-override
|
|
236
|
-
--trees-git-ignored-color-override
|
|
237
|
-
--trees-git-modified-color-override
|
|
238
|
-
--trees-git-renamed-color-override
|
|
239
|
-
--trees-git-untracked-color-override
|
|
240
|
-
--trees-git-deleted-color-override
|
|
241
|
-
|
|
242
|
-
// Built-in File Icon Color Overrides
|
|
243
|
-
--trees-file-icon-color
|
|
244
|
-
--trees-file-icon-color-astro
|
|
245
|
-
--trees-file-icon-color-babel
|
|
246
|
-
--trees-file-icon-color-bash
|
|
247
|
-
--trees-file-icon-color-biome
|
|
248
|
-
--trees-file-icon-color-bootstrap
|
|
249
|
-
--trees-file-icon-color-browserslist
|
|
250
|
-
--trees-file-icon-color-bun
|
|
251
|
-
--trees-file-icon-color-claude
|
|
252
|
-
--trees-file-icon-color-css
|
|
253
|
-
--trees-file-icon-color-database
|
|
254
|
-
--trees-file-icon-color-default
|
|
255
|
-
--trees-file-icon-color-docker
|
|
256
|
-
--trees-file-icon-color-eslint
|
|
257
|
-
--trees-file-icon-color-git
|
|
258
|
-
--trees-file-icon-color-go
|
|
259
|
-
--trees-file-icon-color-graphql
|
|
260
|
-
--trees-file-icon-color-html
|
|
261
|
-
--trees-file-icon-color-image
|
|
262
|
-
--trees-file-icon-color-javascript
|
|
263
|
-
--trees-file-icon-color-json
|
|
264
|
-
--trees-file-icon-color-markdown
|
|
265
|
-
--trees-file-icon-color-mcp
|
|
266
|
-
--trees-file-icon-color-npm
|
|
267
|
-
--trees-file-icon-color-oxc
|
|
268
|
-
--trees-file-icon-color-postcss
|
|
269
|
-
--trees-file-icon-color-prettier
|
|
270
|
-
--trees-file-icon-color-python
|
|
271
|
-
--trees-file-icon-color-react
|
|
272
|
-
--trees-file-icon-color-ruby
|
|
273
|
-
--trees-file-icon-color-rust
|
|
274
|
-
--trees-file-icon-color-sass
|
|
275
|
-
--trees-file-icon-color-svg
|
|
276
|
-
--trees-file-icon-color-svelte
|
|
277
|
-
--trees-file-icon-color-svgo
|
|
278
|
-
--trees-file-icon-color-swift
|
|
279
|
-
--trees-file-icon-color-table
|
|
280
|
-
--trees-file-icon-color-text
|
|
281
|
-
--trees-file-icon-color-tailwind
|
|
282
|
-
--trees-file-icon-color-terraform
|
|
283
|
-
--trees-file-icon-color-typescript
|
|
284
|
-
--trees-file-icon-color-vite
|
|
285
|
-
--trees-file-icon-color-vscode
|
|
286
|
-
--trees-file-icon-color-vue
|
|
287
|
-
--trees-file-icon-color-wasm
|
|
288
|
-
--trees-file-icon-color-webpack
|
|
289
|
-
--trees-file-icon-color-yml
|
|
290
|
-
--trees-file-icon-color-zig
|
|
291
|
-
--trees-file-icon-color-zip
|
|
292
|
-
|
|
293
|
-
// Density
|
|
294
|
-
//
|
|
295
|
-
// A unitless scale factor for padding, gaps, and indentation. Usually
|
|
296
|
-
// set via \`density\` on useFileTree. Individual overrides take precedence.
|
|
297
|
-
//
|
|
298
|
-
// Compact: 0.8
|
|
299
|
-
// Default: 1
|
|
300
|
-
// Relaxed: 1.2
|
|
301
|
-
//
|
|
302
|
-
--trees-density-override
|
|
303
|
-
|
|
304
|
-
// Available CSS Layout Overrides
|
|
305
|
-
--trees-gap-override
|
|
306
|
-
--trees-border-radius-override
|
|
307
|
-
--trees-font-family-override
|
|
308
|
-
--trees-font-size-override
|
|
309
|
-
--trees-font-weight-regular-override
|
|
310
|
-
--trees-font-weight-semibold-override
|
|
311
|
-
--trees-level-gap-override
|
|
312
|
-
--trees-item-padding-x-override
|
|
313
|
-
--trees-item-margin-x-override
|
|
314
|
-
--trees-item-row-gap-override
|
|
315
|
-
--trees-icon-width-override
|
|
316
|
-
--trees-icon-nudge-override
|
|
317
|
-
--trees-scrollbar-gutter-override
|
|
318
|
-
--trees-padding-inline-override
|
|
319
|
-
*/
|
|
320
|
-
|
|
321
|
-
--trees-accent: var(--trees-accent-override, #009fff);
|
|
322
|
-
--trees-fg: var(
|
|
323
|
-
--trees-fg-override,
|
|
324
|
-
var(--trees-theme-sidebar-fg, light-dark(#6c6c71, #adadb1))
|
|
325
|
-
);
|
|
326
|
-
--trees-fg-muted: var(
|
|
327
|
-
--trees-fg-muted-override,
|
|
328
|
-
var(--trees-theme-sidebar-header-fg, light-dark(#84848a, #84848a))
|
|
329
|
-
);
|
|
330
|
-
--trees-bg: var(
|
|
331
|
-
--trees-bg-override,
|
|
332
|
-
var(--trees-theme-sidebar-bg, light-dark(#f8f8f8, #141415))
|
|
333
|
-
);
|
|
334
|
-
/* var(--trees-theme-list-hover-bg, light-dark(#dfebff59, #19283c59)) */
|
|
335
|
-
--trees-bg-muted: var(
|
|
336
|
-
--trees-bg-muted-override,
|
|
337
|
-
var(
|
|
338
|
-
--trees-theme-list-hover-bg,
|
|
339
|
-
light-dark(
|
|
340
|
-
color-mix(
|
|
341
|
-
in lab,
|
|
342
|
-
var(--trees-accent) var(--trees-bg-alpha-light, 8%),
|
|
343
|
-
var(--trees-bg)
|
|
344
|
-
),
|
|
345
|
-
color-mix(
|
|
346
|
-
in lab,
|
|
347
|
-
var(--trees-accent) var(--trees-bg-alpha-dark, 10%),
|
|
348
|
-
var(--trees-bg)
|
|
349
|
-
)
|
|
350
|
-
)
|
|
351
|
-
)
|
|
352
|
-
);
|
|
353
|
-
--trees-input-bg: var(
|
|
354
|
-
--trees-input-bg-override,
|
|
355
|
-
light-dark(#f8f8f8, #070707)
|
|
356
|
-
);
|
|
357
|
-
|
|
358
|
-
--trees-added-light: #16a994;
|
|
359
|
-
--trees-added-dark: #00cab1;
|
|
360
|
-
--trees-ignored-light: #adadb1;
|
|
361
|
-
--trees-ignored-dark: #4a4a4e;
|
|
362
|
-
--trees-modified-light: #1ca1c7;
|
|
363
|
-
--trees-modified-dark: #08c0ef;
|
|
364
|
-
--trees-renamed-light: #d5a910;
|
|
365
|
-
--trees-renamed-dark: #ffd452;
|
|
366
|
-
--trees-untracked-light: #16a994;
|
|
367
|
-
--trees-untracked-dark: #00cab1;
|
|
368
|
-
--trees-deleted-light: #ff2e3f;
|
|
369
|
-
--trees-deleted-dark: #ff6762;
|
|
370
|
-
|
|
371
|
-
--trees-border-color: var(
|
|
372
|
-
--trees-border-color-override,
|
|
373
|
-
var(--trees-theme-sidebar-border, light-dark(#eeeeef, #070707))
|
|
374
|
-
);
|
|
375
|
-
--trees-indent-guide-bg: var(
|
|
376
|
-
--trees-indent-guide-bg-override,
|
|
377
|
-
color-mix(in lab, var(--trees-fg-muted) 25%, transparent)
|
|
378
|
-
);
|
|
379
|
-
--trees-density: var(--trees-density-override, 1);
|
|
380
|
-
--trees-border-radius: var(
|
|
381
|
-
--trees-border-radius-override,
|
|
382
|
-
calc(6px * var(--trees-density))
|
|
383
|
-
);
|
|
384
|
-
|
|
385
|
-
--trees-font-family: var(--trees-font-family-override, system-ui);
|
|
386
|
-
--trees-font-size: var(--trees-font-size-override, 13px);
|
|
387
|
-
--trees-font-weight-regular: var(--trees-font-weight-regular-override, 400);
|
|
388
|
-
--trees-font-weight-semibold: var(
|
|
389
|
-
--trees-font-weight-semibold-override,
|
|
390
|
-
600
|
|
391
|
-
);
|
|
392
|
-
|
|
393
|
-
--trees-focus-ring-color: var(
|
|
394
|
-
--trees-focus-ring-color-override,
|
|
395
|
-
var(--trees-theme-focus-ring, var(--trees-accent))
|
|
396
|
-
);
|
|
397
|
-
--trees-focus-ring-width: var(--trees-focus-ring-width-override, 1px);
|
|
398
|
-
--trees-focus-ring-offset: var(--trees-focus-ring-offset-override, -1px);
|
|
399
|
-
|
|
400
|
-
--trees-search-fg: var(
|
|
401
|
-
--trees-search-fg-override,
|
|
402
|
-
var(--trees-theme-input-fg, var(--trees-fg))
|
|
403
|
-
);
|
|
404
|
-
--trees-search-font-weight: var(--trees-search-font-weight-override, 600);
|
|
405
|
-
--trees-search-bg: var(
|
|
406
|
-
--trees-search-bg-override,
|
|
407
|
-
var(--trees-theme-input-bg, var(--trees-input-bg))
|
|
408
|
-
);
|
|
409
|
-
|
|
410
|
-
--trees-scrollbar-thumb: var(
|
|
411
|
-
--trees-scrollbar-thumb-override,
|
|
412
|
-
var(
|
|
413
|
-
--trees-theme-scrollbar-thumb,
|
|
414
|
-
color-mix(in lab, var(--trees-fg) 25%, var(--trees-bg))
|
|
415
|
-
)
|
|
416
|
-
);
|
|
417
|
-
|
|
418
|
-
--trees-selected-fg: var(
|
|
419
|
-
--trees-selected-fg-override,
|
|
420
|
-
var(--trees-theme-list-active-selection-fg, var(--trees-fg))
|
|
421
|
-
);
|
|
422
|
-
--trees-selected-bg: var(
|
|
423
|
-
--trees-selected-bg-override,
|
|
424
|
-
var(
|
|
425
|
-
--trees-theme-list-active-selection-bg,
|
|
426
|
-
light-dark(
|
|
427
|
-
color-mix(in lab, var(--trees-accent) 12%, var(--trees-bg)),
|
|
428
|
-
color-mix(in lab, var(--trees-accent) 15%, var(--trees-bg))
|
|
429
|
-
)
|
|
430
|
-
)
|
|
431
|
-
);
|
|
432
|
-
--trees-selected-focused-border-color: var(
|
|
433
|
-
--trees-selected-focused-border-color-override,
|
|
434
|
-
var(--trees-theme-focus-ring, var(--trees-accent))
|
|
435
|
-
);
|
|
436
|
-
|
|
437
|
-
/* Git status (e.g. from Shiki theme gitDecoration.*) */
|
|
438
|
-
--trees-status-added: var(
|
|
439
|
-
--trees-status-added-override,
|
|
440
|
-
var(
|
|
441
|
-
--trees-theme-git-added-fg,
|
|
442
|
-
light-dark(var(--trees-added-light), var(--trees-added-dark))
|
|
443
|
-
)
|
|
444
|
-
);
|
|
445
|
-
--trees-status-ignored: var(
|
|
446
|
-
--trees-status-ignored-override,
|
|
447
|
-
var(
|
|
448
|
-
--trees-theme-git-ignored-fg,
|
|
449
|
-
light-dark(var(--trees-ignored-light), var(--trees-ignored-dark))
|
|
450
|
-
)
|
|
451
|
-
);
|
|
452
|
-
--trees-status-modified: var(
|
|
453
|
-
--trees-status-modified-override,
|
|
454
|
-
var(
|
|
455
|
-
--trees-theme-git-modified-fg,
|
|
456
|
-
light-dark(var(--trees-modified-light), var(--trees-modified-dark))
|
|
457
|
-
)
|
|
458
|
-
);
|
|
459
|
-
--trees-status-renamed: var(
|
|
460
|
-
--trees-status-renamed-override,
|
|
461
|
-
var(
|
|
462
|
-
--trees-theme-git-renamed-fg,
|
|
463
|
-
light-dark(var(--trees-renamed-light), var(--trees-renamed-dark))
|
|
464
|
-
)
|
|
465
|
-
);
|
|
466
|
-
--trees-status-untracked: var(
|
|
467
|
-
--trees-status-untracked-override,
|
|
468
|
-
var(
|
|
469
|
-
--trees-theme-git-untracked-fg,
|
|
470
|
-
light-dark(var(--trees-untracked-light), var(--trees-untracked-dark))
|
|
471
|
-
)
|
|
472
|
-
);
|
|
473
|
-
--trees-status-deleted: var(
|
|
474
|
-
--trees-status-deleted-override,
|
|
475
|
-
var(
|
|
476
|
-
--trees-theme-git-deleted-fg,
|
|
477
|
-
light-dark(var(--trees-deleted-light), var(--trees-deleted-dark))
|
|
478
|
-
)
|
|
479
|
-
);
|
|
480
|
-
--trees-git-modified-color: var(
|
|
481
|
-
--trees-git-modified-color-override,
|
|
482
|
-
var(--trees-status-modified)
|
|
483
|
-
);
|
|
484
|
-
--trees-git-added-color: var(
|
|
485
|
-
--trees-git-added-color-override,
|
|
486
|
-
var(--trees-status-added)
|
|
487
|
-
);
|
|
488
|
-
--trees-git-ignored-color: var(
|
|
489
|
-
--trees-git-ignored-color-override,
|
|
490
|
-
var(--trees-status-ignored)
|
|
491
|
-
);
|
|
492
|
-
--trees-git-deleted-color: var(
|
|
493
|
-
--trees-git-deleted-color-override,
|
|
494
|
-
var(--trees-status-deleted)
|
|
495
|
-
);
|
|
496
|
-
--trees-git-renamed-color: var(
|
|
497
|
-
--trees-git-renamed-color-override,
|
|
498
|
-
var(--trees-status-renamed)
|
|
499
|
-
);
|
|
500
|
-
--trees-git-untracked-color: var(
|
|
501
|
-
--trees-git-untracked-color-override,
|
|
502
|
-
var(--trees-status-untracked)
|
|
503
|
-
);
|
|
504
|
-
|
|
505
|
-
--trees-icon-gray: light-dark(#84848a, #adadb1);
|
|
506
|
-
--trees-icon-red: light-dark(#d52c36, #ff6762);
|
|
507
|
-
--trees-icon-vermilion: light-dark(#ff8c5b, #d5512f);
|
|
508
|
-
--trees-icon-orange: light-dark(#d47628, #ffa359);
|
|
509
|
-
--trees-icon-yellow: light-dark(#d5a910, #ffd452);
|
|
510
|
-
--trees-icon-green: light-dark(#199f43, #5ecc71);
|
|
511
|
-
--trees-icon-teal: light-dark(#17a5af, #64d1db);
|
|
512
|
-
--trees-icon-cyan: light-dark(#1ca1c7, #68cdf2);
|
|
513
|
-
--trees-icon-blue: light-dark(#1a85d4, #69b1ff);
|
|
514
|
-
--trees-icon-indigo: light-dark(#693acf, #9d6afb);
|
|
515
|
-
--trees-icon-purple: light-dark(#a631be, #d568ea);
|
|
516
|
-
--trees-icon-pink: light-dark(#d32a61, #ff678d);
|
|
517
|
-
--trees-icon-mauve: light-dark(#594c5b, #79697b);
|
|
518
|
-
|
|
519
|
-
--trees-file-icon-color-default: var(
|
|
520
|
-
--trees-file-icon-color,
|
|
521
|
-
var(--trees-icon-gray)
|
|
522
|
-
);
|
|
523
|
-
--trees-file-icon-color-astro: var(
|
|
524
|
-
--trees-file-icon-color,
|
|
525
|
-
var(--trees-icon-purple)
|
|
526
|
-
);
|
|
527
|
-
--trees-file-icon-color-babel: var(
|
|
528
|
-
--trees-file-icon-color,
|
|
529
|
-
var(--trees-icon-yellow)
|
|
530
|
-
);
|
|
531
|
-
--trees-file-icon-color-bash: var(
|
|
532
|
-
--trees-file-icon-color,
|
|
533
|
-
var(--trees-icon-green)
|
|
534
|
-
);
|
|
535
|
-
--trees-file-icon-color-biome: var(
|
|
536
|
-
--trees-file-icon-color,
|
|
537
|
-
var(--trees-icon-blue)
|
|
538
|
-
);
|
|
539
|
-
--trees-file-icon-color-bootstrap: var(
|
|
540
|
-
--trees-file-icon-color,
|
|
541
|
-
var(--trees-icon-indigo)
|
|
542
|
-
);
|
|
543
|
-
--trees-file-icon-color-browserslist: var(
|
|
544
|
-
--trees-file-icon-color,
|
|
545
|
-
var(--trees-icon-yellow)
|
|
546
|
-
);
|
|
547
|
-
--trees-file-icon-color-bun: var(
|
|
548
|
-
--trees-file-icon-color,
|
|
549
|
-
var(--trees-icon-mauve)
|
|
550
|
-
);
|
|
551
|
-
--trees-file-icon-color-claude: var(
|
|
552
|
-
--trees-file-icon-color,
|
|
553
|
-
var(--trees-icon-orange)
|
|
554
|
-
);
|
|
555
|
-
--trees-file-icon-color-css: var(
|
|
556
|
-
--trees-file-icon-color,
|
|
557
|
-
var(--trees-icon-indigo)
|
|
558
|
-
);
|
|
559
|
-
--trees-file-icon-color-database: var(
|
|
560
|
-
--trees-file-icon-color,
|
|
561
|
-
var(--trees-icon-purple)
|
|
562
|
-
);
|
|
563
|
-
--trees-file-icon-color-docker: var(
|
|
564
|
-
--trees-file-icon-color,
|
|
565
|
-
var(--trees-icon-blue)
|
|
566
|
-
);
|
|
567
|
-
--trees-file-icon-color-eslint: var(
|
|
568
|
-
--trees-file-icon-color,
|
|
569
|
-
var(--trees-icon-indigo)
|
|
570
|
-
);
|
|
571
|
-
--trees-file-icon-color-git: var(
|
|
572
|
-
--trees-file-icon-vermilion,
|
|
573
|
-
var(--trees-icon-vermilion)
|
|
574
|
-
);
|
|
575
|
-
--trees-file-icon-color-go: var(
|
|
576
|
-
--trees-file-icon-color,
|
|
577
|
-
var(--trees-icon-cyan)
|
|
578
|
-
);
|
|
579
|
-
--trees-file-icon-color-graphql: var(
|
|
580
|
-
--trees-file-icon-color,
|
|
581
|
-
var(--trees-icon-pink)
|
|
582
|
-
);
|
|
583
|
-
--trees-file-icon-color-html: var(
|
|
584
|
-
--trees-file-icon-color,
|
|
585
|
-
var(--trees-icon-orange)
|
|
586
|
-
);
|
|
587
|
-
--trees-file-icon-color-image: var(
|
|
588
|
-
--trees-file-icon-color,
|
|
589
|
-
var(--trees-icon-pink)
|
|
590
|
-
);
|
|
591
|
-
--trees-file-icon-color-javascript: var(
|
|
592
|
-
--trees-file-icon-color,
|
|
593
|
-
var(--trees-icon-yellow)
|
|
594
|
-
);
|
|
595
|
-
--trees-file-icon-color-json: var(
|
|
596
|
-
--trees-file-icon-color,
|
|
597
|
-
var(--trees-icon-orange)
|
|
598
|
-
);
|
|
599
|
-
--trees-file-icon-color-markdown: var(
|
|
600
|
-
--trees-file-icon-color,
|
|
601
|
-
var(--trees-icon-green)
|
|
602
|
-
);
|
|
603
|
-
--trees-file-icon-color-mcp: var(
|
|
604
|
-
--trees-file-icon-color,
|
|
605
|
-
var(--trees-icon-teal)
|
|
606
|
-
);
|
|
607
|
-
--trees-file-icon-color-npm: var(
|
|
608
|
-
--trees-file-icon-color,
|
|
609
|
-
var(--trees-icon-red)
|
|
610
|
-
);
|
|
611
|
-
--trees-file-icon-color-oxc: var(
|
|
612
|
-
--trees-file-icon-cyan,
|
|
613
|
-
var(--trees-icon-cyan)
|
|
614
|
-
);
|
|
615
|
-
--trees-file-icon-color-postcss: var(
|
|
616
|
-
--trees-file-icon-color,
|
|
617
|
-
var(--trees-icon-red)
|
|
618
|
-
);
|
|
619
|
-
--trees-file-icon-color-prettier: var(
|
|
620
|
-
--trees-file-icon-color,
|
|
621
|
-
var(--trees-icon-teal)
|
|
622
|
-
);
|
|
623
|
-
--trees-file-icon-color-python: var(
|
|
624
|
-
--trees-file-icon-color,
|
|
625
|
-
var(--trees-icon-blue)
|
|
626
|
-
);
|
|
627
|
-
--trees-file-icon-color-react: var(
|
|
628
|
-
--trees-file-icon-color,
|
|
629
|
-
var(--trees-icon-cyan)
|
|
630
|
-
);
|
|
631
|
-
--trees-file-icon-color-ruby: var(
|
|
632
|
-
--trees-file-icon-color,
|
|
633
|
-
var(--trees-icon-red)
|
|
634
|
-
);
|
|
635
|
-
--trees-file-icon-color-rust: var(
|
|
636
|
-
--trees-file-icon-color,
|
|
637
|
-
var(--trees-icon-orange)
|
|
638
|
-
);
|
|
639
|
-
--trees-file-icon-color-sass: var(
|
|
640
|
-
--trees-file-icon-color,
|
|
641
|
-
var(--trees-icon-pink)
|
|
642
|
-
);
|
|
643
|
-
--trees-file-icon-color-svg: var(
|
|
644
|
-
--trees-file-icon-color,
|
|
645
|
-
var(--trees-icon-orange)
|
|
646
|
-
);
|
|
647
|
-
--trees-file-icon-color-svelte: var(
|
|
648
|
-
--trees-file-icon-color,
|
|
649
|
-
var(--trees-icon-red)
|
|
650
|
-
);
|
|
651
|
-
--trees-file-icon-color-svgo: var(
|
|
652
|
-
--trees-file-icon-color,
|
|
653
|
-
var(--trees-icon-green)
|
|
654
|
-
);
|
|
655
|
-
--trees-file-icon-color-swift: var(
|
|
656
|
-
--trees-file-icon-color,
|
|
657
|
-
var(--trees-icon-orange)
|
|
658
|
-
);
|
|
659
|
-
--trees-file-icon-color-table: var(
|
|
660
|
-
--trees-file-icon-color,
|
|
661
|
-
var(--trees-icon-teal)
|
|
662
|
-
);
|
|
663
|
-
--trees-file-icon-color-text: var(
|
|
664
|
-
--trees-file-icon-color,
|
|
665
|
-
var(--trees-icon-gray)
|
|
666
|
-
);
|
|
667
|
-
--trees-file-icon-color-tailwind: var(
|
|
668
|
-
--trees-file-icon-color,
|
|
669
|
-
var(--trees-icon-cyan)
|
|
670
|
-
);
|
|
671
|
-
--trees-file-icon-color-terraform: var(
|
|
672
|
-
--trees-file-icon-color,
|
|
673
|
-
var(--trees-icon-indigo)
|
|
674
|
-
);
|
|
675
|
-
--trees-file-icon-color-typescript: var(
|
|
676
|
-
--trees-file-icon-color,
|
|
677
|
-
var(--trees-icon-blue)
|
|
678
|
-
);
|
|
679
|
-
--trees-file-icon-color-vite: var(
|
|
680
|
-
--trees-file-icon-color,
|
|
681
|
-
var(--trees-icon-purple)
|
|
682
|
-
);
|
|
683
|
-
--trees-file-icon-color-vscode: var(
|
|
684
|
-
--trees-file-icon-color,
|
|
685
|
-
var(--trees-icon-blue)
|
|
686
|
-
);
|
|
687
|
-
--trees-file-icon-color-vue: var(
|
|
688
|
-
--trees-file-icon-color,
|
|
689
|
-
var(--trees-icon-green)
|
|
690
|
-
);
|
|
691
|
-
--trees-file-icon-color-wasm: var(
|
|
692
|
-
--trees-file-icon-color,
|
|
693
|
-
var(--trees-icon-indigo)
|
|
694
|
-
);
|
|
695
|
-
--trees-file-icon-color-webpack: var(
|
|
696
|
-
--trees-file-icon-color,
|
|
697
|
-
var(--trees-icon-blue)
|
|
698
|
-
);
|
|
699
|
-
--trees-file-icon-color-yml: var(
|
|
700
|
-
--trees-file-icon-color,
|
|
701
|
-
var(--trees-icon-red)
|
|
702
|
-
);
|
|
703
|
-
--trees-file-icon-color-zig: var(
|
|
704
|
-
--trees-file-icon-color,
|
|
705
|
-
var(--trees-icon-orange)
|
|
706
|
-
);
|
|
707
|
-
--trees-file-icon-color-zip: var(
|
|
708
|
-
--trees-file-icon-color,
|
|
709
|
-
var(--trees-icon-orange)
|
|
710
|
-
);
|
|
711
|
-
|
|
712
|
-
--trees-level-gap: var(
|
|
713
|
-
--trees-level-gap-override,
|
|
714
|
-
calc(8px * var(--trees-density))
|
|
715
|
-
);
|
|
716
|
-
--trees-item-padding-x: var(
|
|
717
|
-
--trees-item-padding-x-override,
|
|
718
|
-
calc(8px * var(--trees-density))
|
|
719
|
-
);
|
|
720
|
-
--trees-item-margin-x: var(
|
|
721
|
-
--trees-item-margin-x-override,
|
|
722
|
-
calc(2px * var(--trees-density))
|
|
723
|
-
);
|
|
724
|
-
--trees-item-row-gap: var(
|
|
725
|
-
--trees-item-row-gap-override,
|
|
726
|
-
calc(6px * var(--trees-density))
|
|
727
|
-
);
|
|
728
|
-
--trees-icon-width: var(--trees-icon-width-override, 16px);
|
|
729
|
-
--trees-icon-nudge: var(
|
|
730
|
-
--trees-icon-nudge-override,
|
|
731
|
-
calc(1px * var(--trees-density))
|
|
732
|
-
);
|
|
733
|
-
--trees-row-height: var(--trees-item-height, 30px);
|
|
734
|
-
--trees-git-lane-width: var(--trees-git-lane-width-override, 12px);
|
|
735
|
-
--trees-action-lane-width: var(
|
|
736
|
-
--trees-action-lane-width-override,
|
|
737
|
-
calc(var(--trees-icon-width) + 2px)
|
|
738
|
-
);
|
|
739
|
-
/* Keep the floating trigger aligned with the row's action lane. Going in
|
|
740
|
-
from the root's right edge: the scroll container reserves
|
|
741
|
-
\`--trees-padding-inline\` of effective inset on each side (its asymmetric
|
|
742
|
-
padding formula cancels the scrollbar gutter on the right), the row
|
|
743
|
-
sits inside that inset, and its trailing \`--trees-item-padding-x\` is the
|
|
744
|
-
action lane itself. The trigger's own focus-ring margin then trims one
|
|
745
|
-
pixel back so the button's visible right edge lines up with the lane. */
|
|
746
|
-
--trees-context-menu-trigger-inline-offset: calc(
|
|
747
|
-
var(--trees-padding-inline) + var(--trees-item-padding-x) -
|
|
748
|
-
var(--trees-focus-ring-width)
|
|
749
|
-
);
|
|
750
|
-
|
|
751
|
-
--trees-scrollbar-gutter: var(--trees-scrollbar-gutter-override, 6px);
|
|
752
|
-
--trees-padding-inline: var(--trees-padding-inline-override, 16px);
|
|
753
|
-
|
|
754
|
-
color-scheme: light dark;
|
|
755
|
-
display: flex;
|
|
756
|
-
flex-direction: column;
|
|
757
|
-
font-size: var(--trees-font-size);
|
|
758
|
-
color: var(--trees-fg);
|
|
759
|
-
background-color: var(--trees-bg);
|
|
760
|
-
--truncate-marker-background-color: var(--trees-bg);
|
|
761
|
-
--truncate-marker-background-overlay-color: transparent;
|
|
762
|
-
font-family: var(--trees-font-family);
|
|
763
|
-
font-weight: var(--trees-font-weight-regular);
|
|
764
|
-
}
|
|
765
|
-
|
|
766
|
-
:host([data-file-tree-virtualized='true']) {
|
|
767
|
-
height: 100%;
|
|
768
|
-
overflow: hidden;
|
|
769
|
-
}
|
|
770
|
-
|
|
771
|
-
[data-file-tree-virtualized-wrapper='true'] {
|
|
772
|
-
height: 100%;
|
|
773
|
-
overflow: hidden;
|
|
774
|
-
display: flex;
|
|
775
|
-
flex-direction: column;
|
|
776
|
-
}
|
|
777
|
-
|
|
778
|
-
[data-file-tree-virtualized-root='true'] {
|
|
779
|
-
height: 100%;
|
|
780
|
-
display: flex;
|
|
781
|
-
flex-direction: column;
|
|
782
|
-
overflow: hidden;
|
|
783
|
-
}
|
|
784
|
-
|
|
785
|
-
[data-file-tree-virtualized-scroll='true'],
|
|
786
|
-
[data-file-tree-scrollbar-measure='true'] {
|
|
787
|
-
overflow-y: auto;
|
|
788
|
-
scrollbar-gutter: stable;
|
|
789
|
-
|
|
790
|
-
&::-webkit-scrollbar {
|
|
791
|
-
width: var(--trees-scrollbar-gutter);
|
|
792
|
-
height: var(--trees-scrollbar-gutter);
|
|
793
|
-
}
|
|
794
|
-
|
|
795
|
-
&::-webkit-scrollbar-track {
|
|
796
|
-
background: transparent;
|
|
797
|
-
}
|
|
798
|
-
|
|
799
|
-
&::-webkit-scrollbar-thumb {
|
|
800
|
-
background-color: var(--trees-scrollbar-thumb);
|
|
801
|
-
border: 1px solid transparent;
|
|
802
|
-
background-clip: content-box;
|
|
803
|
-
border-radius: calc(var(--trees-scrollbar-gutter) / 2);
|
|
804
|
-
}
|
|
805
|
-
|
|
806
|
-
&::-webkit-scrollbar-corner {
|
|
807
|
-
background-color: transparent;
|
|
808
|
-
}
|
|
809
|
-
}
|
|
810
|
-
|
|
811
|
-
/* These are styles for a temporarily generated element to measure the size
|
|
812
|
-
* of the scrollbar. It's intended to be somewhat similar in scrollbar style
|
|
813
|
-
* scope to the scrollable tree so \`--trees-scrollbar-gutter-measured\` is an
|
|
814
|
-
* accurate reflection of the size the scrollbar gutter takes up. */
|
|
815
|
-
[data-file-tree-scrollbar-measure='true'] {
|
|
816
|
-
position: absolute;
|
|
817
|
-
top: 0;
|
|
818
|
-
left: 0;
|
|
819
|
-
visibility: hidden;
|
|
820
|
-
pointer-events: none;
|
|
821
|
-
width: 100px;
|
|
822
|
-
height: 100px;
|
|
823
|
-
}
|
|
824
|
-
|
|
825
|
-
@supports (-moz-appearance: none) {
|
|
826
|
-
[data-file-tree-virtualized-scroll='true'],
|
|
827
|
-
[data-file-tree-scrollbar-measure='true'] {
|
|
828
|
-
scrollbar-width: thin;
|
|
829
|
-
scrollbar-color: var(--trees-scrollbar-thumb) transparent;
|
|
830
|
-
}
|
|
831
|
-
}
|
|
832
|
-
|
|
833
|
-
[data-file-tree-virtualized-scroll='true'] {
|
|
834
|
-
position: relative;
|
|
835
|
-
overflow-y: auto;
|
|
836
|
-
flex: 1 1 0;
|
|
837
|
-
min-height: 0;
|
|
838
|
-
padding-inline: max(
|
|
839
|
-
calc(var(--trees-padding-inline) - var(--trees-item-margin-x)),
|
|
840
|
-
0px
|
|
841
|
-
)
|
|
842
|
-
/* NOTE(amadeus): We can assume that all Webkit based browser gutters
|
|
843
|
-
* will align to the value of '--trees-scrollbar-gutter', however if not, then
|
|
844
|
-
* \`--trees-scrollbar-gutter-measured\` should correct it. Mostly we are
|
|
845
|
-
* hoping to avoid SSR alignment jumps if possible. In non-SSR'd environments
|
|
846
|
-
* \`--trees-scrollbar-gutter-measured\` should always be immediately available.
|
|
847
|
-
*/
|
|
848
|
-
max(
|
|
849
|
-
calc(
|
|
850
|
-
var(--trees-padding-inline) - var(--trees-item-margin-x) -
|
|
851
|
-
var(
|
|
852
|
-
--trees-scrollbar-gutter-measured,
|
|
853
|
-
var(--trees-scrollbar-gutter)
|
|
854
|
-
)
|
|
855
|
-
),
|
|
856
|
-
0px
|
|
857
|
-
);
|
|
858
|
-
}
|
|
859
|
-
|
|
860
|
-
@supports (-moz-appearance: none) {
|
|
861
|
-
[data-file-tree-virtualized-scroll='true'] {
|
|
862
|
-
padding-inline: max(
|
|
863
|
-
calc(var(--trees-padding-inline) - var(--trees-item-margin-x)),
|
|
864
|
-
0px
|
|
865
|
-
)
|
|
866
|
-
/* NOTE(amadeus): However on Firefox it can vary a little bit, but most
|
|
867
|
-
* likely the majority of cases will default to a 0px width scrollbar lets
|
|
868
|
-
* inherit that first to avoid SSR jumps. In non-SSR'd environments
|
|
869
|
-
* \`--trees-scrollbar-gutter-measured\` should always be immediately available.
|
|
870
|
-
*/
|
|
871
|
-
max(
|
|
872
|
-
calc(
|
|
873
|
-
var(--trees-padding-inline) - var(--trees-item-margin-x) -
|
|
874
|
-
var(--trees-scrollbar-gutter-measured, 0px)
|
|
875
|
-
),
|
|
876
|
-
0px
|
|
877
|
-
);
|
|
878
|
-
}
|
|
879
|
-
}
|
|
880
|
-
|
|
881
|
-
[data-file-tree-sticky-overlay='true'] {
|
|
882
|
-
position: sticky;
|
|
883
|
-
top: 0;
|
|
884
|
-
height: 0;
|
|
885
|
-
z-index: 4;
|
|
886
|
-
overflow: visible;
|
|
887
|
-
pointer-events: none;
|
|
888
|
-
}
|
|
889
|
-
|
|
890
|
-
/* The overlay DOM is kept populated even at scrollTop=0 so the browser has
|
|
891
|
-
* the rendered rows on hand the moment scrolling begins — otherwise the
|
|
892
|
-
* compositor paints a scrolled frame before React can mount the overlay,
|
|
893
|
-
* and the topmost sticky folder jumps up by a couple of pixels before it
|
|
894
|
-
* "snaps" into its pinned position. We hide it via CSS whenever the scroll
|
|
895
|
-
* is at the top and no scroll is in progress, so the preview doesn't leak
|
|
896
|
-
* through at rest. \`data-overlay-reveal\` is stamped on the root only when
|
|
897
|
-
* the user initiates a scroll while already at the top — exactly the case
|
|
898
|
-
* where we need the pre-mounted overlay to be visible through the first
|
|
899
|
-
* compositor frame. It is deliberately distinct from the general
|
|
900
|
-
* \`data-is-scrolling\` flag so a scroll that ends at the top (e.g. ArrowUp
|
|
901
|
-
* navigation) re-hides the overlay the instant the scroll lands, rather
|
|
902
|
-
* than waiting for the hover-suppression timer to elapse. */
|
|
903
|
-
[data-file-tree-virtualized-root='true'][data-scroll-at-top='true']:not(
|
|
904
|
-
[data-overlay-reveal]
|
|
905
|
-
)
|
|
906
|
-
[data-file-tree-sticky-overlay='true'] {
|
|
907
|
-
visibility: hidden;
|
|
908
|
-
}
|
|
909
|
-
|
|
910
|
-
[data-file-tree-sticky-overlay-content='true'] {
|
|
911
|
-
background-color: var(--trees-bg);
|
|
912
|
-
position: relative;
|
|
913
|
-
pointer-events: none;
|
|
914
|
-
}
|
|
915
|
-
|
|
916
|
-
[data-file-tree-virtualized-list='true'] {
|
|
917
|
-
background-color: var(--trees-bg);
|
|
918
|
-
position: relative;
|
|
919
|
-
min-height: 100%;
|
|
920
|
-
width: 100%;
|
|
921
|
-
overflow-anchor: none;
|
|
922
|
-
|
|
923
|
-
&[data-is-scrolling] {
|
|
924
|
-
pointer-events: none;
|
|
925
|
-
}
|
|
926
|
-
}
|
|
927
|
-
|
|
928
|
-
[data-file-tree-virtualized-sticky-offset='true'] {
|
|
929
|
-
contain: layout size;
|
|
930
|
-
}
|
|
931
|
-
|
|
932
|
-
[data-file-tree-virtualized-sticky='true'] {
|
|
933
|
-
position: sticky;
|
|
934
|
-
top: 0;
|
|
935
|
-
width: 100%;
|
|
936
|
-
display: flex;
|
|
937
|
-
flex-direction: column;
|
|
938
|
-
isolation: isolate;
|
|
939
|
-
/* Promote to its own compositor layer so text inside the window is
|
|
940
|
-
* rasterized once and GPU-translated during scroll. Without this, the
|
|
941
|
-
* browser re-paints the window (and its text) at every scroll frame,
|
|
942
|
-
* which produces visible 1px shake / character tearing. */
|
|
943
|
-
will-change: transform;
|
|
944
|
-
}
|
|
945
|
-
|
|
946
|
-
[data-file-tree-search-container] {
|
|
947
|
-
display: flex;
|
|
948
|
-
padding: 0;
|
|
949
|
-
padding-inline: var(--trees-padding-inline);
|
|
950
|
-
margin-bottom: var(--trees-item-row-gap);
|
|
951
|
-
}
|
|
952
|
-
|
|
953
|
-
[data-file-tree-search-input] {
|
|
954
|
-
--trees-focus-ring-width: 2px;
|
|
955
|
-
font-family: var(--trees-font-family);
|
|
956
|
-
font-size: var(--trees-font-size);
|
|
957
|
-
flex: 1;
|
|
958
|
-
height: var(--trees-row-height);
|
|
959
|
-
/* 1px breathing room so the focus-visible outline isn't clipped when the
|
|
960
|
-
* input sits flush against the top of the scroll container. */
|
|
961
|
-
margin-block: 1px;
|
|
962
|
-
padding-inline: var(--trees-item-padding-x);
|
|
963
|
-
line-height: var(--trees-row-height);
|
|
964
|
-
color: var(--trees-search-fg);
|
|
965
|
-
background-color: var(--trees-search-bg);
|
|
966
|
-
border: 1px solid var(--trees-border-color);
|
|
967
|
-
border-radius: var(--trees-border-radius);
|
|
968
|
-
outline: none;
|
|
969
|
-
|
|
970
|
-
&::placeholder {
|
|
971
|
-
color: color-mix(
|
|
972
|
-
in lab,
|
|
973
|
-
var(--trees-search-fg) 65%,
|
|
974
|
-
var(--trees-search-bg)
|
|
975
|
-
);
|
|
976
|
-
}
|
|
977
|
-
|
|
978
|
-
&:focus-visible,
|
|
979
|
-
&[data-file-tree-search-input-fake-focus='true'] {
|
|
980
|
-
outline: var(--trees-focus-ring-width) solid var(--trees-focus-ring-color);
|
|
981
|
-
outline-offset: var(--trees-focus-ring-offset);
|
|
982
|
-
}
|
|
983
|
-
}
|
|
984
|
-
|
|
985
|
-
/* The wrapper for the tree items */
|
|
986
|
-
[role='tree'] {
|
|
987
|
-
position: relative;
|
|
988
|
-
display: flex;
|
|
989
|
-
flex-direction: column;
|
|
990
|
-
gap: var(--trees-gap-override, 0);
|
|
991
|
-
}
|
|
992
|
-
|
|
993
|
-
/* LIST ITEM */
|
|
994
|
-
[data-type='item'] {
|
|
995
|
-
color: inherit;
|
|
996
|
-
font-family: var(--trees-font-family);
|
|
997
|
-
font-size: var(--trees-font-size);
|
|
998
|
-
text-align: start;
|
|
999
|
-
outline: none;
|
|
1000
|
-
background-color: var(--trees-bg);
|
|
1001
|
-
border: none;
|
|
1002
|
-
position: relative;
|
|
1003
|
-
|
|
1004
|
-
padding: 0 var(--trees-item-padding-x);
|
|
1005
|
-
margin: 0 var(--trees-item-margin-x);
|
|
1006
|
-
cursor: pointer;
|
|
1007
|
-
-webkit-user-select: none;
|
|
1008
|
-
user-select: none;
|
|
1009
|
-
-webkit-touch-callout: none;
|
|
1010
|
-
touch-action: manipulation;
|
|
1011
|
-
display: flex;
|
|
1012
|
-
flex: 0 0 var(--trees-row-height);
|
|
1013
|
-
align-items: center;
|
|
1014
|
-
height: var(--trees-row-height);
|
|
1015
|
-
line-height: var(--trees-row-height);
|
|
1016
|
-
gap: var(--trees-item-row-gap);
|
|
1017
|
-
border-radius: var(--trees-border-radius);
|
|
1018
|
-
/* Row states may be translucent, so markers paint the tree background first
|
|
1019
|
-
* and then the state color on top to avoid compositing the same alpha twice. */
|
|
1020
|
-
--truncate-marker-background-color: var(--trees-bg);
|
|
1021
|
-
--truncate-marker-background-overlay-color: transparent;
|
|
1022
|
-
--truncate-marker-block-inset: 0px;
|
|
1023
|
-
|
|
1024
|
-
&:hover,
|
|
1025
|
-
&[data-item-context-hover='true'] {
|
|
1026
|
-
background-color: var(--trees-bg-muted);
|
|
1027
|
-
--truncate-marker-background-overlay-color: var(--trees-bg-muted);
|
|
1028
|
-
}
|
|
1029
|
-
|
|
1030
|
-
&[data-item-focused='true'],
|
|
1031
|
-
&:focus-visible {
|
|
1032
|
-
z-index: 2;
|
|
1033
|
-
|
|
1034
|
-
/* Flattened segment markers sit high enough to cover the row outline unless
|
|
1035
|
-
* their painted background is inset by the focus ring width. */
|
|
1036
|
-
[data-item-flattened-subitems] {
|
|
1037
|
-
--truncate-marker-block-inset: var(--trees-focus-ring-width);
|
|
1038
|
-
}
|
|
1039
|
-
|
|
1040
|
-
&::before {
|
|
1041
|
-
position: absolute;
|
|
1042
|
-
inset: 0;
|
|
1043
|
-
content: '';
|
|
1044
|
-
display: block;
|
|
1045
|
-
border-radius: var(--trees-border-radius);
|
|
1046
|
-
outline: var(--trees-focus-ring-width) solid
|
|
1047
|
-
var(--trees-focus-ring-color);
|
|
1048
|
-
outline-offset: var(--trees-focus-ring-offset);
|
|
1049
|
-
pointer-events: none;
|
|
1050
|
-
}
|
|
1051
|
-
|
|
1052
|
-
&[data-item-selected='true']::before {
|
|
1053
|
-
outline-color: var(--trees-selected-focused-border-color);
|
|
1054
|
-
}
|
|
1055
|
-
}
|
|
1056
|
-
|
|
1057
|
-
&[data-item-selected='true'] {
|
|
1058
|
-
color: var(--trees-selected-fg);
|
|
1059
|
-
background-color: var(--trees-selected-bg);
|
|
1060
|
-
--truncate-marker-background-overlay-color: var(--trees-selected-bg);
|
|
1061
|
-
z-index: 3;
|
|
1062
|
-
|
|
1063
|
-
[data-item-section='icon'] {
|
|
1064
|
-
color: var(--trees-selected-fg);
|
|
1065
|
-
}
|
|
1066
|
-
}
|
|
1067
|
-
|
|
1068
|
-
&[data-item-search-match='true'] {
|
|
1069
|
-
font-weight: var(--trees-search-font-weight);
|
|
1070
|
-
}
|
|
1071
|
-
}
|
|
1072
|
-
|
|
1073
|
-
[data-type='item'][data-file-tree-sticky-row='true'] {
|
|
1074
|
-
pointer-events: auto;
|
|
1075
|
-
}
|
|
1076
|
-
|
|
1077
|
-
/* Sticky rows opt back into pointer events because the overlay wrapper is
|
|
1078
|
-
* inert. During scroll, put them back under the same hover suppression as
|
|
1079
|
-
* the virtualized list so translucent hover states and menu triggers do not
|
|
1080
|
-
* paint over rows moving beneath the sticky stack. */
|
|
1081
|
-
[data-file-tree-virtualized-root='true'][data-is-scrolling]
|
|
1082
|
-
[data-type='item'][data-file-tree-sticky-row='true'] {
|
|
1083
|
-
pointer-events: none;
|
|
1084
|
-
}
|
|
1085
|
-
|
|
1086
|
-
[data-file-tree-virtualized-root='true'][data-is-scrolling]
|
|
1087
|
-
[data-type='item'][data-file-tree-sticky-row='true']:hover:not(
|
|
1088
|
-
[data-item-selected='true']
|
|
1089
|
-
),
|
|
1090
|
-
[data-file-tree-virtualized-root='true'][data-is-scrolling]
|
|
1091
|
-
[data-type='item'][data-file-tree-sticky-row='true'][data-item-context-hover='true']:not(
|
|
1092
|
-
[data-item-selected='true']
|
|
1093
|
-
) {
|
|
1094
|
-
background-color: var(--trees-bg);
|
|
1095
|
-
--truncate-marker-background-overlay-color: transparent;
|
|
1096
|
-
}
|
|
1097
|
-
|
|
1098
|
-
[data-item-selected='true']:has(+ [data-item-selected='true']) {
|
|
1099
|
-
border-bottom-left-radius: 0;
|
|
1100
|
-
border-bottom-right-radius: 0;
|
|
1101
|
-
}
|
|
1102
|
-
|
|
1103
|
-
[data-item-selected='true'] + [data-item-selected='true'] {
|
|
1104
|
-
border-top-left-radius: 0;
|
|
1105
|
-
border-top-right-radius: 0;
|
|
1106
|
-
}
|
|
1107
|
-
|
|
1108
|
-
/* Flattened Directory Parts */
|
|
1109
|
-
[data-item-flattened-subitems] {
|
|
1110
|
-
display: inline-flex;
|
|
1111
|
-
align-items: center;
|
|
1112
|
-
gap: 2px;
|
|
1113
|
-
}
|
|
1114
|
-
[data-item-flattened-subitem]:hover,
|
|
1115
|
-
[data-item-flattened-subitem-drag-target='true'] {
|
|
1116
|
-
text-decoration: underline;
|
|
1117
|
-
}
|
|
1118
|
-
|
|
1119
|
-
/* Icon for each item */
|
|
1120
|
-
[data-item-section='icon'] {
|
|
1121
|
-
flex-shrink: 0;
|
|
1122
|
-
display: flex;
|
|
1123
|
-
align-items: center;
|
|
1124
|
-
justify-content: center;
|
|
1125
|
-
color: var(--trees-fg-muted);
|
|
1126
|
-
fill: currentColor;
|
|
1127
|
-
width: var(--trees-icon-width);
|
|
1128
|
-
}
|
|
1129
|
-
|
|
1130
|
-
:where([data-item-section='icon'] > [data-icon-token]) {
|
|
1131
|
-
color: var(--trees-fg-muted);
|
|
1132
|
-
}
|
|
1133
|
-
|
|
1134
|
-
[data-file-tree-colored-icons='true'] {
|
|
1135
|
-
[data-icon-token='astro'] {
|
|
1136
|
-
color: var(--trees-file-icon-color-astro);
|
|
1137
|
-
}
|
|
1138
|
-
[data-icon-token='babel'] {
|
|
1139
|
-
color: var(--trees-file-icon-color-babel);
|
|
1140
|
-
}
|
|
1141
|
-
[data-icon-token='bash'] {
|
|
1142
|
-
color: var(--trees-file-icon-color-bash);
|
|
1143
|
-
}
|
|
1144
|
-
[data-icon-token='biome'] {
|
|
1145
|
-
color: var(--trees-file-icon-color-biome);
|
|
1146
|
-
}
|
|
1147
|
-
[data-icon-token='bootstrap'] {
|
|
1148
|
-
color: var(--trees-file-icon-color-bootstrap);
|
|
1149
|
-
}
|
|
1150
|
-
[data-icon-token='browserslist'] {
|
|
1151
|
-
color: var(--trees-file-icon-color-browserslist);
|
|
1152
|
-
}
|
|
1153
|
-
[data-icon-token='bun'] {
|
|
1154
|
-
color: var(--trees-file-icon-color-bun);
|
|
1155
|
-
}
|
|
1156
|
-
[data-icon-token='claude'] {
|
|
1157
|
-
color: var(--trees-file-icon-color-claude);
|
|
1158
|
-
}
|
|
1159
|
-
[data-icon-token='css'] {
|
|
1160
|
-
color: var(--trees-file-icon-color-css);
|
|
1161
|
-
}
|
|
1162
|
-
[data-icon-token='database'] {
|
|
1163
|
-
color: var(--trees-file-icon-color-database);
|
|
1164
|
-
}
|
|
1165
|
-
[data-icon-token='default'] {
|
|
1166
|
-
color: var(--trees-file-icon-color-default);
|
|
1167
|
-
}
|
|
1168
|
-
[data-icon-token='docker'] {
|
|
1169
|
-
color: var(--trees-file-icon-color-docker);
|
|
1170
|
-
}
|
|
1171
|
-
[data-icon-token='eslint'] {
|
|
1172
|
-
color: var(--trees-file-icon-color-eslint);
|
|
1173
|
-
}
|
|
1174
|
-
[data-icon-token='git'] {
|
|
1175
|
-
color: var(--trees-file-icon-color-git);
|
|
1176
|
-
}
|
|
1177
|
-
[data-icon-token='go'] {
|
|
1178
|
-
color: var(--trees-file-icon-color-go);
|
|
1179
|
-
}
|
|
1180
|
-
[data-icon-token='graphql'] {
|
|
1181
|
-
color: var(--trees-file-icon-color-graphql);
|
|
1182
|
-
}
|
|
1183
|
-
[data-icon-token='html'] {
|
|
1184
|
-
color: var(--trees-file-icon-color-html);
|
|
1185
|
-
}
|
|
1186
|
-
[data-icon-token='image'] {
|
|
1187
|
-
color: var(--trees-file-icon-color-image);
|
|
1188
|
-
}
|
|
1189
|
-
[data-icon-token='javascript'] {
|
|
1190
|
-
color: var(--trees-file-icon-color-javascript);
|
|
1191
|
-
}
|
|
1192
|
-
[data-icon-token='json'] {
|
|
1193
|
-
color: var(--trees-file-icon-color-json);
|
|
1194
|
-
}
|
|
1195
|
-
[data-icon-token='markdown'] {
|
|
1196
|
-
color: var(--trees-file-icon-color-markdown);
|
|
1197
|
-
}
|
|
1198
|
-
[data-icon-token='mcp'] {
|
|
1199
|
-
color: var(--trees-file-icon-color-mcp);
|
|
1200
|
-
}
|
|
1201
|
-
[data-icon-token='npm'] {
|
|
1202
|
-
color: var(--trees-file-icon-color-npm);
|
|
1203
|
-
}
|
|
1204
|
-
[data-icon-token='oxc'] {
|
|
1205
|
-
color: var(--trees-file-icon-color-oxc);
|
|
1206
|
-
}
|
|
1207
|
-
[data-icon-token='postcss'] {
|
|
1208
|
-
color: var(--trees-file-icon-color-postcss);
|
|
1209
|
-
}
|
|
1210
|
-
[data-icon-token='prettier'] {
|
|
1211
|
-
color: var(--trees-file-icon-color-prettier);
|
|
1212
|
-
}
|
|
1213
|
-
[data-icon-token='python'] {
|
|
1214
|
-
color: var(--trees-file-icon-color-python);
|
|
1215
|
-
}
|
|
1216
|
-
[data-icon-token='react'] {
|
|
1217
|
-
color: var(--trees-file-icon-color-react);
|
|
1218
|
-
}
|
|
1219
|
-
[data-icon-token='ruby'] {
|
|
1220
|
-
color: var(--trees-file-icon-color-ruby);
|
|
1221
|
-
}
|
|
1222
|
-
[data-icon-token='rust'] {
|
|
1223
|
-
color: var(--trees-file-icon-color-rust);
|
|
1224
|
-
}
|
|
1225
|
-
[data-icon-token='sass'] {
|
|
1226
|
-
color: var(--trees-file-icon-color-sass);
|
|
1227
|
-
}
|
|
1228
|
-
[data-icon-token='svg'] {
|
|
1229
|
-
color: var(--trees-file-icon-color-svg);
|
|
1230
|
-
}
|
|
1231
|
-
[data-icon-token='svelte'] {
|
|
1232
|
-
color: var(--trees-file-icon-color-svelte);
|
|
1233
|
-
}
|
|
1234
|
-
[data-icon-token='svgo'] {
|
|
1235
|
-
color: var(--trees-file-icon-color-svgo);
|
|
1236
|
-
}
|
|
1237
|
-
[data-icon-token='swift'] {
|
|
1238
|
-
color: var(--trees-file-icon-color-swift);
|
|
1239
|
-
}
|
|
1240
|
-
[data-icon-token='table'] {
|
|
1241
|
-
color: var(--trees-file-icon-color-table);
|
|
1242
|
-
}
|
|
1243
|
-
[data-icon-token='text'] {
|
|
1244
|
-
color: var(--trees-file-icon-color-text);
|
|
1245
|
-
}
|
|
1246
|
-
[data-icon-token='tailwind'] {
|
|
1247
|
-
color: var(--trees-file-icon-color-tailwind);
|
|
1248
|
-
}
|
|
1249
|
-
[data-icon-token='terraform'] {
|
|
1250
|
-
color: var(--trees-file-icon-color-terraform);
|
|
1251
|
-
}
|
|
1252
|
-
[data-icon-token='typescript'] {
|
|
1253
|
-
color: var(--trees-file-icon-color-typescript);
|
|
1254
|
-
}
|
|
1255
|
-
[data-icon-token='vite'] {
|
|
1256
|
-
color: var(--trees-file-icon-color-vite);
|
|
1257
|
-
}
|
|
1258
|
-
[data-icon-token='vscode'] {
|
|
1259
|
-
color: var(--trees-file-icon-color-vscode);
|
|
1260
|
-
}
|
|
1261
|
-
[data-icon-token='vue'] {
|
|
1262
|
-
color: var(--trees-file-icon-color-vue);
|
|
1263
|
-
}
|
|
1264
|
-
[data-icon-token='wasm'] {
|
|
1265
|
-
color: var(--trees-file-icon-color-wasm);
|
|
1266
|
-
}
|
|
1267
|
-
[data-icon-token='webpack'] {
|
|
1268
|
-
color: var(--trees-file-icon-color-webpack);
|
|
1269
|
-
}
|
|
1270
|
-
[data-icon-token='yml'] {
|
|
1271
|
-
color: var(--trees-file-icon-color-yml);
|
|
1272
|
-
}
|
|
1273
|
-
[data-icon-token='zig'] {
|
|
1274
|
-
color: var(--trees-file-icon-color-zig);
|
|
1275
|
-
}
|
|
1276
|
-
[data-icon-token='zip'] {
|
|
1277
|
-
color: var(--trees-file-icon-color-zip);
|
|
1278
|
-
}
|
|
1279
|
-
}
|
|
1280
|
-
|
|
1281
|
-
/* Chevron rotation and visual alignment */
|
|
1282
|
-
/* Chevron pointing down */
|
|
1283
|
-
[data-icon-name='file-tree-icon-chevron'] {
|
|
1284
|
-
&[data-align-capitals='false'] {
|
|
1285
|
-
transform: translate(0, var(--trees-icon-nudge));
|
|
1286
|
-
}
|
|
1287
|
-
&[data-align-capitals='true'] {
|
|
1288
|
-
transform: translate(0, 0);
|
|
1289
|
-
}
|
|
1290
|
-
}
|
|
1291
|
-
|
|
1292
|
-
[data-item-section='content'] {
|
|
1293
|
-
flex: 0 1 auto;
|
|
1294
|
-
text-align: start;
|
|
1295
|
-
min-width: 0;
|
|
1296
|
-
max-width: 100%;
|
|
1297
|
-
overflow: hidden;
|
|
1298
|
-
text-overflow: ellipsis;
|
|
1299
|
-
/* Breaks middle truncate component to also set this */
|
|
1300
|
-
/* white-space: nowrap; */
|
|
1301
|
-
}
|
|
1302
|
-
|
|
1303
|
-
[data-item-section='decoration'] {
|
|
1304
|
-
flex: 1 1 0;
|
|
1305
|
-
min-width: 0;
|
|
1306
|
-
display: flex;
|
|
1307
|
-
justify-content: flex-end;
|
|
1308
|
-
text-align: end;
|
|
1309
|
-
overflow: hidden;
|
|
1310
|
-
color: var(--trees-fg-muted);
|
|
1311
|
-
}
|
|
1312
|
-
|
|
1313
|
-
[data-item-section='decoration'] > span {
|
|
1314
|
-
min-width: 0;
|
|
1315
|
-
max-width: 100%;
|
|
1316
|
-
display: inline-flex;
|
|
1317
|
-
align-items: center;
|
|
1318
|
-
justify-content: flex-end;
|
|
1319
|
-
overflow: hidden;
|
|
1320
|
-
text-overflow: ellipsis;
|
|
1321
|
-
white-space: nowrap;
|
|
1322
|
-
}
|
|
1323
|
-
|
|
1324
|
-
[data-item-section='git'],
|
|
1325
|
-
[data-item-section='action'] {
|
|
1326
|
-
flex: 0 0 auto;
|
|
1327
|
-
display: flex;
|
|
1328
|
-
align-items: center;
|
|
1329
|
-
justify-content: center;
|
|
1330
|
-
}
|
|
1331
|
-
|
|
1332
|
-
[data-item-section='git'] {
|
|
1333
|
-
width: var(--trees-git-lane-width);
|
|
1334
|
-
}
|
|
1335
|
-
|
|
1336
|
-
[data-item-section='action'] {
|
|
1337
|
-
width: var(--trees-action-lane-width);
|
|
1338
|
-
color: var(--trees-fg-muted);
|
|
1339
|
-
fill: currentColor;
|
|
1340
|
-
pointer-events: none;
|
|
1341
|
-
}
|
|
1342
|
-
|
|
1343
|
-
[data-item-section='git'] > span,
|
|
1344
|
-
[data-item-section='action'] > span {
|
|
1345
|
-
width: 100%;
|
|
1346
|
-
display: inline-flex;
|
|
1347
|
-
align-items: center;
|
|
1348
|
-
justify-content: center;
|
|
1349
|
-
}
|
|
1350
|
-
|
|
1351
|
-
[data-item-action-affordance='decorative'] {
|
|
1352
|
-
opacity: 0.85;
|
|
1353
|
-
}
|
|
1354
|
-
|
|
1355
|
-
[data-item-rename-input] {
|
|
1356
|
-
appearance: none;
|
|
1357
|
-
width: 100%;
|
|
1358
|
-
min-width: 0;
|
|
1359
|
-
height: calc(var(--trees-row-height) - 4px);
|
|
1360
|
-
font-family: inherit;
|
|
1361
|
-
font-size: inherit;
|
|
1362
|
-
/* line-height: calc(var(--trees-row-height) - 8px); */
|
|
1363
|
-
color: inherit;
|
|
1364
|
-
background-color: transparent;
|
|
1365
|
-
border: 0;
|
|
1366
|
-
padding-inline: 6px;
|
|
1367
|
-
outline: none;
|
|
1368
|
-
box-sizing: border-box;
|
|
1369
|
-
}
|
|
1370
|
-
|
|
1371
|
-
[data-item-section='content']:has([data-item-rename-input])
|
|
1372
|
-
~ [data-item-section='action'],
|
|
1373
|
-
[data-item-section='content']:has([data-item-rename-input])
|
|
1374
|
-
~ [data-item-section='decoration'] {
|
|
1375
|
-
display: none;
|
|
1376
|
-
}
|
|
1377
|
-
|
|
1378
|
-
/* Chevron pointing right */
|
|
1379
|
-
[aria-expanded='false'][data-item-type='folder']
|
|
1380
|
-
> [data-item-section='icon']
|
|
1381
|
-
> [data-icon-name='file-tree-icon-chevron'] {
|
|
1382
|
-
&[data-align-capitals='true'] {
|
|
1383
|
-
transform: rotate(-90deg)
|
|
1384
|
-
translate(
|
|
1385
|
-
calc(var(--trees-icon-nudge) / 2),
|
|
1386
|
-
calc(var(--trees-icon-nudge) / 2)
|
|
1387
|
-
);
|
|
1388
|
-
}
|
|
1389
|
-
&[data-align-capitals='false'] {
|
|
1390
|
-
transform: rotate(-90deg)
|
|
1391
|
-
translate(
|
|
1392
|
-
calc(var(--trees-icon-nudge) / 2 * -1),
|
|
1393
|
-
calc(var(--trees-icon-nudge) / 2)
|
|
1394
|
-
);
|
|
1395
|
-
}
|
|
1396
|
-
}
|
|
1397
|
-
|
|
1398
|
-
/* LIST IDENTATION */
|
|
1399
|
-
/* Spacing container */
|
|
1400
|
-
[data-item-section='spacing'] {
|
|
1401
|
-
display: flex;
|
|
1402
|
-
flex-direction: row;
|
|
1403
|
-
align-items: center;
|
|
1404
|
-
justify-content: center;
|
|
1405
|
-
height: var(--trees-row-height);
|
|
1406
|
-
padding-left: calc(calc(var(--trees-icon-width) / 2) - 0.5px);
|
|
1407
|
-
|
|
1408
|
-
&:empty {
|
|
1409
|
-
padding-left: 0;
|
|
1410
|
-
}
|
|
1411
|
-
}
|
|
1412
|
-
|
|
1413
|
-
/* Spacing per level */
|
|
1414
|
-
[data-item-section='spacing-item'] {
|
|
1415
|
-
transform: translateX(-0.25px);
|
|
1416
|
-
display: inline-block;
|
|
1417
|
-
border-left: 1px solid var(--trees-indent-guide-bg);
|
|
1418
|
-
height: 100%;
|
|
1419
|
-
margin-right: calc(var(--trees-level-gap) - 1px);
|
|
1420
|
-
opacity: 0;
|
|
1421
|
-
transition: opacity 150ms ease;
|
|
1422
|
-
|
|
1423
|
-
& + & {
|
|
1424
|
-
margin-left: calc(
|
|
1425
|
-
var(--trees-item-row-gap) + calc(var(--trees-icon-width) / 2) - 0.5px
|
|
1426
|
-
);
|
|
1427
|
-
}
|
|
1428
|
-
}
|
|
1429
|
-
|
|
1430
|
-
:host(:hover) [data-item-section='spacing-item'] {
|
|
1431
|
-
opacity: 0.75;
|
|
1432
|
-
}
|
|
1433
|
-
|
|
1434
|
-
/* Git status indicator */
|
|
1435
|
-
|
|
1436
|
-
/* This is a folder that contains a git change */
|
|
1437
|
-
[data-item-contains-git-change='true'] > [data-item-section='git'] {
|
|
1438
|
-
color: var(--trees-git-modified-color);
|
|
1439
|
-
opacity: 0.5;
|
|
1440
|
-
fill: currentColor;
|
|
1441
|
-
}
|
|
1442
|
-
|
|
1443
|
-
/* These are files that have a git change */
|
|
1444
|
-
[data-item-git-status] {
|
|
1445
|
-
&
|
|
1446
|
-
> :where([data-item-section='icon'])
|
|
1447
|
-
> :where(:not([data-icon-name='file-tree-icon-chevron'])) {
|
|
1448
|
-
color: var(--trees-item-git-status-color);
|
|
1449
|
-
}
|
|
1450
|
-
& > [data-item-section='content'] {
|
|
1451
|
-
color: var(--trees-item-git-status-color);
|
|
1452
|
-
}
|
|
1453
|
-
& > [data-item-section='git'] {
|
|
1454
|
-
color: var(--trees-item-git-status-color);
|
|
1455
|
-
font-weight: var(--trees-font-weight-semibold);
|
|
1456
|
-
}
|
|
1457
|
-
}
|
|
1458
|
-
|
|
1459
|
-
[data-item-git-status='added'] {
|
|
1460
|
-
--trees-item-git-status-color: var(--trees-git-added-color);
|
|
1461
|
-
}
|
|
1462
|
-
|
|
1463
|
-
[data-item-git-status='deleted'] {
|
|
1464
|
-
--trees-item-git-status-color: var(--trees-git-deleted-color);
|
|
1465
|
-
}
|
|
1466
|
-
|
|
1467
|
-
[data-item-git-status='ignored'] {
|
|
1468
|
-
--trees-item-git-status-color: var(--trees-git-ignored-color);
|
|
1469
|
-
|
|
1470
|
-
& > [data-item-section='icon'] {
|
|
1471
|
-
opacity: 0.5;
|
|
1472
|
-
}
|
|
1473
|
-
}
|
|
1474
|
-
|
|
1475
|
-
[data-item-section='git'] [data-icon-name='file-tree-icon-dot'] {
|
|
1476
|
-
/* this is a nudge to align the dot with the likely lowercase text. it's slightly
|
|
1477
|
-
generalizable, but other fonts are gonna need other nudges i assume */
|
|
1478
|
-
transform: translateY(calc(0.65ex - 50%));
|
|
1479
|
-
}
|
|
1480
|
-
|
|
1481
|
-
[data-item-git-status='modified'] {
|
|
1482
|
-
--trees-item-git-status-color: var(--trees-git-modified-color);
|
|
1483
|
-
}
|
|
1484
|
-
|
|
1485
|
-
[data-item-git-status='renamed'] {
|
|
1486
|
-
--trees-item-git-status-color: var(--trees-git-renamed-color);
|
|
1487
|
-
}
|
|
1488
|
-
|
|
1489
|
-
[data-item-git-status='untracked'] {
|
|
1490
|
-
--trees-item-git-status-color: var(--trees-git-untracked-color);
|
|
1491
|
-
}
|
|
1492
|
-
|
|
1493
|
-
/* Drag and drop */
|
|
1494
|
-
[data-item-drag-target='true'] {
|
|
1495
|
-
background-color: var(--trees-selected-bg);
|
|
1496
|
-
}
|
|
1497
|
-
|
|
1498
|
-
[data-item-dragging='true'] {
|
|
1499
|
-
opacity: 0.5;
|
|
1500
|
-
}
|
|
1501
|
-
|
|
1502
|
-
/* Lock icon for locked paths (sibling of content) */
|
|
1503
|
-
[data-item-section='lock'] {
|
|
1504
|
-
flex: 0 0 auto;
|
|
1505
|
-
margin-left: auto;
|
|
1506
|
-
display: flex;
|
|
1507
|
-
align-items: center;
|
|
1508
|
-
color: var(--trees-fg-muted);
|
|
1509
|
-
}
|
|
1510
|
-
[data-item-section='lock'] svg {
|
|
1511
|
-
display: block;
|
|
1512
|
-
}
|
|
1513
|
-
|
|
1514
|
-
[data-type='header-slot'] {
|
|
1515
|
-
display: block;
|
|
1516
|
-
flex: 0 0 auto;
|
|
1517
|
-
}
|
|
1518
|
-
|
|
1519
|
-
[data-type='context-menu-wash'] {
|
|
1520
|
-
position: absolute;
|
|
1521
|
-
inset: 0;
|
|
1522
|
-
z-index: 3;
|
|
1523
|
-
background-color: transparent;
|
|
1524
|
-
touch-action: none;
|
|
1525
|
-
}
|
|
1526
|
-
|
|
1527
|
-
[data-type='context-menu-anchor'] {
|
|
1528
|
-
position: absolute;
|
|
1529
|
-
top: 0;
|
|
1530
|
-
right: var(--trees-context-menu-trigger-inline-offset);
|
|
1531
|
-
z-index: 4;
|
|
1532
|
-
display: none;
|
|
1533
|
-
align-items: center;
|
|
1534
|
-
|
|
1535
|
-
&[data-visible='true'] {
|
|
1536
|
-
display: flex;
|
|
1537
|
-
}
|
|
1538
|
-
}
|
|
1539
|
-
|
|
1540
|
-
/* Hide the floating trigger while the scroll container is actively moving.
|
|
1541
|
-
* The anchor is positioned against the root, not the scroll content, so its
|
|
1542
|
-
* \`top\` follows the row via a React state update — one frame behind the
|
|
1543
|
-
* compositor. That delay is visible as the trigger hovering over the wrong
|
|
1544
|
-
* row during the first frame of a scroll. The \`data-is-scrolling\` flag on
|
|
1545
|
-
* the root is flipped synchronously on \`wheel\`/\`touchmove\`/\`keydown\` before
|
|
1546
|
-
* the compositor commits the next paint, so this selector hides the anchor
|
|
1547
|
-
* in the same frame the scroll begins. */
|
|
1548
|
-
[data-file-tree-virtualized-root='true'][data-is-scrolling]
|
|
1549
|
-
[data-type='context-menu-anchor'] {
|
|
1550
|
-
display: none;
|
|
1551
|
-
}
|
|
1552
|
-
|
|
1553
|
-
[data-type='context-menu-anchor'] > slot[name='context-menu'] {
|
|
1554
|
-
display: block;
|
|
1555
|
-
width: 0;
|
|
1556
|
-
min-width: 0;
|
|
1557
|
-
flex: 0 0 0;
|
|
1558
|
-
overflow: visible;
|
|
1559
|
-
}
|
|
1560
|
-
|
|
1561
|
-
/* Single floating context menu trigger */
|
|
1562
|
-
[data-type='context-menu-trigger'] {
|
|
1563
|
-
all: unset;
|
|
1564
|
-
align-items: center;
|
|
1565
|
-
justify-content: center;
|
|
1566
|
-
width: var(--trees-action-lane-width);
|
|
1567
|
-
color: var(--trees-fg-muted);
|
|
1568
|
-
fill: currentColor;
|
|
1569
|
-
cursor: pointer;
|
|
1570
|
-
font-family: var(--trees-font-family);
|
|
1571
|
-
font-size: var(--trees-font-size);
|
|
1572
|
-
border-top-right-radius: var(--trees-border-radius);
|
|
1573
|
-
border-bottom-right-radius: var(--trees-border-radius);
|
|
1574
|
-
margin: var(--trees-focus-ring-width);
|
|
1575
|
-
height: calc(var(--trees-row-height) - var(--trees-focus-ring-width) * 2);
|
|
1576
|
-
border-width: 0;
|
|
1577
|
-
transition: color 120ms ease;
|
|
1578
|
-
|
|
1579
|
-
display: flex;
|
|
1580
|
-
}
|
|
1581
|
-
|
|
1582
|
-
[data-type='context-menu-trigger']:hover,
|
|
1583
|
-
[data-type='context-menu-trigger'][aria-expanded='true'] {
|
|
1584
|
-
color: var(--trees-fg);
|
|
1585
|
-
}
|
|
1586
|
-
|
|
1587
|
-
/** @pierre/truncate css here, manually copy pasted for now */
|
|
1588
|
-
[data-truncate-container] {
|
|
1589
|
-
/* CUSTOM TO TREES, TO SUPPORT THE OUTLINE */
|
|
1590
|
-
margin-top: -1px;
|
|
1591
|
-
margin-bottom: -1px;
|
|
1592
|
-
|
|
1593
|
-
/* Width of the fade from default marker to text */
|
|
1594
|
-
--truncate-internal-marker-fade-width: var(
|
|
1595
|
-
--truncate-marker-fade-width,
|
|
1596
|
-
2px
|
|
1597
|
-
);
|
|
1598
|
-
/* Width of the solid color between the fade from the default marker to the text */
|
|
1599
|
-
--truncate-internal-marker-gap: var(--truncate-marker-gap, 0px);
|
|
1600
|
-
/* Opacity of the marker 'color' property, not of the element itself */
|
|
1601
|
-
--truncate-internal-marker-opacity: var(--truncate-marker-opacity, 50%);
|
|
1602
|
-
/* Opacity of the marker 'color' property specifically for the middle truncate, not opacity of the element itself */
|
|
1603
|
-
--truncate-internal-middle-marker-opacity: var(
|
|
1604
|
-
--truncate-middle-marker-opacity,
|
|
1605
|
-
80%
|
|
1606
|
-
);
|
|
1607
|
-
/* Background color of the default marker */
|
|
1608
|
-
--truncate-internal-marker-background-color: var(
|
|
1609
|
-
--truncate-marker-background-color,
|
|
1610
|
-
light-dark(white, black)
|
|
1611
|
-
);
|
|
1612
|
-
--truncate-internal-marker-background-overlay-color: var(
|
|
1613
|
-
--truncate-marker-background-overlay-color,
|
|
1614
|
-
transparent
|
|
1615
|
-
);
|
|
1616
|
-
--truncate-internal-marker-block-inset: var(
|
|
1617
|
-
--truncate-marker-block-inset,
|
|
1618
|
-
0px
|
|
1619
|
-
);
|
|
1620
|
-
/* Duration of the fade out animation for the marker */
|
|
1621
|
-
--truncate-internal-marker-fade-out-duration: var(
|
|
1622
|
-
--truncate-marker-fade-out-duration,
|
|
1623
|
-
0ms
|
|
1624
|
-
);
|
|
1625
|
-
/* Duration of the fade in animation for the marker */
|
|
1626
|
-
--truncate-internal-marker-fade-in-duration: var(
|
|
1627
|
-
--truncate-marker-fade-in-duration,
|
|
1628
|
-
100ms
|
|
1629
|
-
);
|
|
1630
|
-
|
|
1631
|
-
/* FADE Variant specifics */
|
|
1632
|
-
--truncate-internal-fade-marker-color: var(
|
|
1633
|
-
--truncate-fade-marker-color,
|
|
1634
|
-
#000
|
|
1635
|
-
);
|
|
1636
|
-
--truncate-internal-fade-marker-width: var(
|
|
1637
|
-
--truncate-fade-marker-width,
|
|
1638
|
-
0.2lh
|
|
1639
|
-
);
|
|
1640
|
-
|
|
1641
|
-
/*
|
|
1642
|
-
In some special cases people might be adding spacing in other ways
|
|
1643
|
-
that would benefit from being able to override this, however the container
|
|
1644
|
-
query below can't use this and would need to be redeclared with the overridden
|
|
1645
|
-
value. It's a bad time, but better than nothing.
|
|
1646
|
-
*/
|
|
1647
|
-
--truncate-internal-single-line-height: 1lh;
|
|
1648
|
-
|
|
1649
|
-
height: var(--truncate-internal-single-line-height);
|
|
1650
|
-
min-width: 0;
|
|
1651
|
-
overflow: hidden;
|
|
1652
|
-
}
|
|
1653
|
-
|
|
1654
|
-
[data-truncate-marker] {
|
|
1655
|
-
display: flex;
|
|
1656
|
-
position: absolute;
|
|
1657
|
-
height: var(--truncate-internal-single-line-height);
|
|
1658
|
-
padding-block: var(--truncate-internal-marker-block-inset);
|
|
1659
|
-
box-sizing: border-box;
|
|
1660
|
-
align-items: center;
|
|
1661
|
-
background-clip: content-box;
|
|
1662
|
-
z-index: 2;
|
|
1663
|
-
color: color-mix(
|
|
1664
|
-
in srgb,
|
|
1665
|
-
currentColor var(--truncate-internal-marker-opacity),
|
|
1666
|
-
transparent
|
|
1667
|
-
);
|
|
1668
|
-
|
|
1669
|
-
/* Core trick for hiding the marker until overflow occurs */
|
|
1670
|
-
opacity: 0;
|
|
1671
|
-
transition: opacity var(--truncate-internal-marker-fade-out-duration)
|
|
1672
|
-
ease-in-out;
|
|
1673
|
-
}
|
|
1674
|
-
|
|
1675
|
-
@container measure (height > 1lh) {
|
|
1676
|
-
[data-truncate-marker] {
|
|
1677
|
-
opacity: 1;
|
|
1678
|
-
transition: opacity var(--truncate-internal-marker-fade-in-duration)
|
|
1679
|
-
ease-in-out;
|
|
1680
|
-
}
|
|
1681
|
-
}
|
|
1682
|
-
|
|
1683
|
-
[data-truncate-grid] {
|
|
1684
|
-
display: grid;
|
|
1685
|
-
position: relative;
|
|
1686
|
-
}
|
|
1687
|
-
|
|
1688
|
-
[data-truncate-content='visible'] {
|
|
1689
|
-
white-space: nowrap;
|
|
1690
|
-
}
|
|
1691
|
-
|
|
1692
|
-
[data-truncate-content='overflow'] {
|
|
1693
|
-
opacity: 0;
|
|
1694
|
-
pointer-events: none;
|
|
1695
|
-
-webkit-user-select: none;
|
|
1696
|
-
user-select: none;
|
|
1697
|
-
word-break: break-all;
|
|
1698
|
-
margin-top: calc(-1 * var(--truncate-internal-single-line-height));
|
|
1699
|
-
}
|
|
1700
|
-
|
|
1701
|
-
[data-truncate-marker-cell] {
|
|
1702
|
-
container: measure / size;
|
|
1703
|
-
overflow: visible;
|
|
1704
|
-
-webkit-user-select: none;
|
|
1705
|
-
user-select: none;
|
|
1706
|
-
pointer-events: none;
|
|
1707
|
-
}
|
|
1708
|
-
|
|
1709
|
-
[data-truncate-container='truncate'] {
|
|
1710
|
-
& [data-truncate-grid] {
|
|
1711
|
-
grid-template-columns: minmax(0, max-content) 0;
|
|
1712
|
-
}
|
|
1713
|
-
& [data-truncate-marker] {
|
|
1714
|
-
right: 0;
|
|
1715
|
-
}
|
|
1716
|
-
& [data-truncate-fade] {
|
|
1717
|
-
margin-right: calc(-2 * var(--truncate-internal-fade-marker-width));
|
|
1718
|
-
}
|
|
1719
|
-
}
|
|
1720
|
-
|
|
1721
|
-
[data-truncate-container='fruncate'] {
|
|
1722
|
-
& [data-truncate-grid] {
|
|
1723
|
-
grid-template-columns: 0 minmax(0, max-content) auto;
|
|
1724
|
-
}
|
|
1725
|
-
& [data-truncate-content] {
|
|
1726
|
-
direction: rtl;
|
|
1727
|
-
}
|
|
1728
|
-
& [data-truncate-content] > span {
|
|
1729
|
-
unicode-bidi: plaintext;
|
|
1730
|
-
}
|
|
1731
|
-
& [data-truncate-fade] {
|
|
1732
|
-
margin-left: calc(-2 * var(--truncate-internal-fade-marker-width));
|
|
1733
|
-
}
|
|
1734
|
-
}
|
|
1735
|
-
|
|
1736
|
-
[data-truncate-variant='default'] {
|
|
1737
|
-
& [data-truncate-marker] {
|
|
1738
|
-
background-color: var(--truncate-internal-marker-background-color);
|
|
1739
|
-
background-image: linear-gradient(
|
|
1740
|
-
var(--truncate-internal-marker-background-overlay-color),
|
|
1741
|
-
var(--truncate-internal-marker-background-overlay-color)
|
|
1742
|
-
);
|
|
1743
|
-
}
|
|
1744
|
-
& [data-truncate-marker]::after,
|
|
1745
|
-
& [data-truncate-marker]::before {
|
|
1746
|
-
content: '';
|
|
1747
|
-
position: absolute;
|
|
1748
|
-
width: calc(
|
|
1749
|
-
var(--truncate-internal-marker-fade-width) +
|
|
1750
|
-
var(--truncate-internal-marker-gap)
|
|
1751
|
-
);
|
|
1752
|
-
inset-block-start: var(--truncate-internal-marker-block-inset);
|
|
1753
|
-
height: max(
|
|
1754
|
-
0px,
|
|
1755
|
-
calc(
|
|
1756
|
-
var(--truncate-internal-single-line-height) -
|
|
1757
|
-
var(--truncate-internal-marker-block-inset) * 2
|
|
1758
|
-
)
|
|
1759
|
-
);
|
|
1760
|
-
background-color: var(--truncate-internal-marker-background-color);
|
|
1761
|
-
background-image: linear-gradient(
|
|
1762
|
-
var(--truncate-internal-marker-background-overlay-color),
|
|
1763
|
-
var(--truncate-internal-marker-background-overlay-color)
|
|
1764
|
-
);
|
|
1765
|
-
mask-image: linear-gradient(
|
|
1766
|
-
var(--truncate-internal-fade-dir),
|
|
1767
|
-
#000 0%,
|
|
1768
|
-
#000 var(--truncate-internal-marker-gap),
|
|
1769
|
-
transparent 100%
|
|
1770
|
-
);
|
|
1771
|
-
}
|
|
1772
|
-
& [data-truncate-marker]::after {
|
|
1773
|
-
--truncate-internal-fade-dir: to right;
|
|
1774
|
-
right: calc(
|
|
1775
|
-
-1 *
|
|
1776
|
-
(
|
|
1777
|
-
var(--truncate-internal-marker-fade-width) +
|
|
1778
|
-
var(--truncate-internal-marker-gap)
|
|
1779
|
-
)
|
|
1780
|
-
);
|
|
1781
|
-
}
|
|
1782
|
-
& [data-truncate-marker]::before {
|
|
1783
|
-
--truncate-internal-fade-dir: to left;
|
|
1784
|
-
left: calc(
|
|
1785
|
-
-1 *
|
|
1786
|
-
(
|
|
1787
|
-
var(--truncate-internal-marker-fade-width) +
|
|
1788
|
-
var(--truncate-internal-marker-gap)
|
|
1789
|
-
)
|
|
1790
|
-
);
|
|
1791
|
-
}
|
|
1792
|
-
}
|
|
1793
|
-
|
|
1794
|
-
[data-truncate-variant='fade'] {
|
|
1795
|
-
& [data-truncate-marker] {
|
|
1796
|
-
background: transparent;
|
|
1797
|
-
}
|
|
1798
|
-
}
|
|
1799
|
-
|
|
1800
|
-
[data-truncate-fade] {
|
|
1801
|
-
box-shadow:
|
|
1802
|
-
0 0 calc(var(--truncate-internal-fade-marker-width) / 2)
|
|
1803
|
-
var(--truncate-internal-fade-marker-color),
|
|
1804
|
-
0 0 var(--truncate-internal-fade-marker-width)
|
|
1805
|
-
var(--truncate-internal-fade-marker-color);
|
|
1806
|
-
width: calc(var(--truncate-internal-fade-marker-width) * 2);
|
|
1807
|
-
height: calc(
|
|
1808
|
-
var(--truncate-internal-single-line-height) -
|
|
1809
|
-
(var(--truncate-internal-fade-marker-width) * 2)
|
|
1810
|
-
);
|
|
1811
|
-
margin: var(--truncate-internal-fade-marker-width) 0;
|
|
1812
|
-
}
|
|
1813
|
-
|
|
1814
|
-
[data-truncate-group-container='middle'] {
|
|
1815
|
-
& [data-truncate-container] {
|
|
1816
|
-
--truncate-marker-opacity: var(--truncate-internal-middle-marker-opacity);
|
|
1817
|
-
}
|
|
1818
|
-
|
|
1819
|
-
display: flex;
|
|
1820
|
-
min-width: 0;
|
|
1821
|
-
|
|
1822
|
-
& > div {
|
|
1823
|
-
min-width: 0;
|
|
1824
|
-
}
|
|
1825
|
-
|
|
1826
|
-
& > div[data-truncate-segment-priority='1'] {
|
|
1827
|
-
flex: 0 1 max-content;
|
|
1828
|
-
}
|
|
1829
|
-
& > div[data-truncate-segment-priority='2'] {
|
|
1830
|
-
flex: 0 999999 max-content;
|
|
1831
|
-
}
|
|
1832
|
-
}
|
|
1833
|
-
}
|
|
1834
|
-
`,nk=`@layer base, unsafe;`;function rk(e){return`${nk}
|
|
1835
|
-
@layer base {
|
|
1836
|
-
${e}
|
|
1837
|
-
}`}function ik(e){return`${nk}
|
|
1838
|
-
@layer unsafe {
|
|
1839
|
-
${e}
|
|
1840
|
-
}`}var ak=new WeakMap;function ok(e){let t=ak.get(e);if(t!=null)return t;let n=document.createElement(`div`);n.setAttribute($w,`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(),ak.set(e,i),i}function sk(e,t){if(!e.isConnected)return;let n=ok(t);if(n==null)return;let r=t.querySelector(`style[${eT}]`),i=r instanceof HTMLStyleElement?r:document.createElement(`style`);r instanceof HTMLStyleElement||(i.setAttribute(eT,``),t.appendChild(i)),i.textContent=`:host { ${tT}: ${n}px; }`}var ck;function lk(e){if(typeof CSSStyleSheet<`u`&&typeof CSSStyleSheet.prototype.replaceSync==`function`&&`adoptedStyleSheets`in e){ck??(ck=new CSSStyleSheet,ck.replaceSync(rk(tk)));let t=!1;try{e.adoptedStyleSheets=[ck],t=!0}catch{}if(t){e.querySelector(`style[${Zw}]`)?.remove();return}}if(e.querySelector(`style[data-file-tree-style]`)==null){let t=document.createElement(`style`);t.setAttribute(Zw,``),t.textContent=rk(tk),e.prepend(t)}}function uk(e,t){dk(e,t),lk(t),sk(e,t)}function dk(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`});uk(this,e)}}if(customElements.define(Xw,e),typeof document<`u`)for(let e of Array.from(document.querySelectorAll(Xw)))e instanceof HTMLElement&&uk(e,e.shadowRoot??e.attachShadow({mode:`open`}))}var fk=e=>e.startsWith(`f::`)?e.slice(3):e;function pk(e){let t=e.lastIndexOf(`/`);return t<0?{parentPath:``,baseName:e}:{parentPath:e.slice(0,t),baseName:e.slice(t+1)}}function mk(e,t){return e===``?t:`${e}/${t}`}function hk({files:e,path:t,isFolder:n,nextBasename:r}){let i=fk(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}=pk(i);if(a===s)return{nextFiles:e,sourcePath:i,destinationPath:i,isFolder:n};let c=mk(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 gk(e){return e.endsWith(`/`)}function _k(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 vk(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 yk(e,t){return t.includes(e)?vk(t):[e]}function bk(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 xk(e,t){return{draggedPaths:e,target:t}}function Sk(e,t){if(t.kind!==`directory`||t.directoryPath==null)return!1;for(let n of e)if(gk(n)&&(t.directoryPath===n||t.directoryPath.startsWith(n)))return!0;return!1}function Ck(e,t){return t.kind===`root`||t.directoryPath==null?_k(e):t.directoryPath}function wk(e,t){let n=e.map(e=>{let n=Ck(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}}}var Tk=Symbol(`FILE_TREE_RENAME_VIEW`);function Ek(e){return e.operation===`add`||e.operation===`remove`||e.operation===`move`||e.operation===`batch`}var Dk=512,Ok=512;function kk(e,t){if(e.size!==t.length)return!1;for(let n of t)if(!e.has(n))return!1;return!0}function Ak(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 jk(e){return Ak(e).at(-1)??null}function Mk(e,t){return t==null?e:e.startsWith(t)?e.slice(t.length):e}var Nk=e=>{let t=e.trim();return t.length===0?``:(t.includes(`\\`)?t.replaceAll(`\\`,`/`):t).toLowerCase()},Pk=e=>e.toLowerCase();function Fk(e){return e.endsWith(`/`)}function Ik(e){let t=e.endsWith(`/`)?e.slice(0,-1):e,n=t.lastIndexOf(`/`);return n<0?t:t.slice(n+1)}function Lk(e){return e.endsWith(`/`)?e.slice(0,-1):e}function Rk(e,t){return t&&!e.endsWith(`/`)?`${e}/`:e}function zk(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 Bk(e,t){if(e===t)return!0;let n=t.endsWith(`/`)?t:`${t}/`;return e.startsWith(n)}function Vk(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 Bk(e,t.path)?n?e:null:e;case`move`:return zk(e,t.from,t.to);case`batch`:{let r=e;for(let e of t.events)if(r=Vk(r,e,n),r==null)return null;return r}}}function Hk(e){return{canonicalChanged:e.canonicalChanged,projectionChanged:e.projectionChanged,visibleCountDelta:e.visibleCountDelta}}function Uk(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 Wk(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(!Uk(XO.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 Gk(e){switch(e.operation){case`add`:return{...Hk(e),operation:`add`,path:e.path};case`remove`:return{...Hk(e),operation:`remove`,path:e.path,recursive:e.recursive};case`move`:return{...Hk(e),from:e.from,operation:`move`,to:e.to}}}function Kk(e){return{...Hk(e),events:e.events.filter(e=>e.operation===`add`||e.operation===`remove`||e.operation===`move`).map(e=>Gk(e)),operation:`batch`}}function qk(e){switch(e.operation){case`add`:case`remove`:case`move`:return Gk(e);case`batch`:return Kk(e);default:return null}}function Jk(e,t,n){if(e===0)return-1;if(n!=null){let e=t(n);if(e!=null)return e;let r=Ak(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 Yk(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:Jk(e.paths.length,r,t),getParentIndex:e.getParentIndex,paths:e.paths,posInSetByIndex:e.posInSetByIndex,setSizeByIndex:e.setSizeByIndex}}var Xk=class{#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=new Set;#z=0;#B;#V=0;#H=!1;#U=0;#W;constructor(e){let{dragAndDrop:t,fileTreeSearchMode:n,initialSearchQuery:r,initialSelectedPaths:i,renaming:a,onSearchChange:o,paths:s,preparedInput:c,...l}=e,u=Wk({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.#B=this.#se(u.paths,u.preparedInput);let d=i?.map(e=>this.#Ae(e)).filter(e=>e!=null)??[],f=d.at(-1)??null;d.length>0&&(this.#R=new Set(d),this.#L=f,this.#z=1),this.#Oe(f,!1),r!=null&&this.#Se(r,!1),this.#W=this.#Fe()}destroy(){this.#W?.(),this.#W=null,this.#n.clear(),this.#t.clear(),this.#d.clear(),this.#i=null,this.#pe()}focusFirstItem(){this.#ve().length>0&&this.#Me(0)}focusLastItem(){this.#U<=0||(this.#Ne(),this.#Me(this.#U-1))}focusNextItem(){this.#De(1)}focusParentItem(){if(this.#c==null)return;let e=jk(this.#c);if(e==null)return;let t=this.#Y(e);t>=0&&this.#Me(t)}focusPath(e){let t=this.#B.getPathInfo(e)?.path??null;if(t==null)return;this.#Ne();let n=this.#Y(t);n>=0&&this.#Me(n)}focusNearestPath(e){let t=this.resolveNearestVisiblePath(e);if(t==null)return null;let n=this.#Y(t);return n>=0?(this.#Me(n),this.#ve()[n]??t):null}focusPreviousItem(){this.#De(-1)}getFocusedIndex(){return this.#s}getFocusedItem(){return this.#c==null?null:this.#X(this.#c)}getFocusedPath(){return this.#c}resolveNearestVisiblePath(e){let t=this.#ve();if(this.#U===0)return null;if(e==null)return this.#c??t[0]??null;let n=this.#B.getPathInfo(e)?.path??e,r=this.#Y(n);return r>=0?t[r]??n:this.#J(n)??this.#c??t[0]??null}getSelectedPaths(){return[...this.#R]}getSelectionVersion(){return this.#z}getVisibleCount(){return this.#U}getVisibleRows(e,t){if(t<e||this.#U===0)return[];let n=Math.max(0,e),r=Math.min(this.#U-1,t);if(r<n)return[];let i=r-n+1;if(this.#F==null&&!this.#l&&r>=this.#b.length&&i<=Ok){let e=[];for(let t=n;t<=r;t+=1){let n=this.#B.getVisibleRowContext(t);if(n==null)break;e.push(this.#Q(n))}return e}if(!this.#l&&r>=this.#b.length&&this.#Ne(),this.#F!=null){let e=Array.from({length:r-n+1},(e,t)=>this.#ye(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.#B.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.#ye(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.#Z(o,i,a,{ancestorPaths:this.#te(a),path:s})})}return this.#B.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.#Z(e,r,r,{ancestorPaths:this.#te(r),path:i})})}getStickyRowCandidates(e,t){if(this.#F!=null)return null;if(this.#U===0||e<=0||t<=0)return[];let n=[];for(let r=0;r<this.#U;r+=1){let i=e+r*t,a=Math.min(this.#U-1,Math.floor(i/t)),o=this.#$(a,r)??(a>0?this.#$(a-1,r):void 0);if(o==null)break;n.push({row:this.#Q(o),subtreeEndIndex:o.subtreeEndIndex})}return n}getItem(e){let t=this.#B.getPathInfo(e);return t==null?null:this.#X(t.path,t)}selectAllVisiblePaths(){this.#Ne();let e=[...this.#ve()];this.#re(e,this.#c??this.#L)}selectOnlyPath(e){let t=this.#Ae(e);t!=null&&this.#re([t],t)}selectPath(e){let t=this.#Ae(e);t==null||this.#R.has(t)||this.#re([...this.#R,t])}deselectPath(e){let t=this.#Ae(e);t==null||!this.#R.has(t)||this.#re([...this.#R].filter(e=>e!==t))}toggleFocusedSelection(){this.#c!=null&&this.togglePathSelectionFromInput(this.#c)}togglePathSelection(e){let t=this.#Ae(e);if(t!=null){if(this.#R.has(t)){this.deselectPath(t);return}this.selectPath(t)}}togglePathSelectionFromInput(e){let t=this.#Ae(e);if(t!=null){if(this.#R.has(t)){this.#re([...this.#R].filter(e=>e!==t),t);return}this.#re([...this.#R,t],t)}}selectPathRange(e,t){let n=this.#Ae(e);if(n==null)return;this.#Ne();let r=this.#L,i=r==null?-1:this.#be(r),a=this.#be(n);if(i===-1||a===-1){let e=t?[...this.#R,n]:[n];this.#re(e,n);return}let[o,s]=i<=a?[i,a]:[a,i],c=this.#ve().slice(o,s+1),l=t?[...this.#R,...c]:c;this.#re(l,r)}extendSelectionFromFocused(e){if(this.#c==null)return;let t=this.#s;if(t===-1)return;let n=Math.min(this.#U-1,Math.max(0,t+e));if(n===t)return;!this.#l&&n>=this.#b.length&&this.#Ne();let r=this.#ve(),i=r[t]??null,a=r[n]??null;if(i==null||a==null)return;let o=new Set(this.#R);o.has(i)&&o.has(a)?o.delete(i):o.add(a),this.#re([...o],this.#L??i,!1),this.#Me(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.#Ae(e);if(t==null||this.#M!=null&&this.#M.length>0)return!1;let n=this.getSelectedPaths(),r=yk(t,n);return this.#r.canDrag?.(r)===!1?!1:(n.includes(t)||this.#re([t],t,!1),this.#je(t),this.#i={draggedPaths:r,primaryPath:t,target:null},this.#we(),!0)}setDragTarget(e){let t=this.#i;if(t==null)return;let n=e;if(n!=null){let e=xk(t.draggedPaths,n);(Sk(t.draggedPaths,n)||this.#r?.canDrop?.(e)===!1)&&(n=null)}bk(t.target,n)||(this.#i={...t,target:n},this.#we())}cancelDrag(){this.#i!=null&&(this.#i=null,this.#we())}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.#we(),!1;let n=xk(e.draggedPaths,t);if(Sk(e.draggedPaths,t)||this.#r?.canDrop?.(n)===!1)return this.#we(),!1;let r=wk(e.draggedPaths,t);if(r==null)return this.#we(),!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.#B.move(e.from,e.to,{collision:e.collision})}else this.#oe(r.operations),this.#B.batch(r.operations)}catch(e){return this.#we(),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.#B.add(e)}remove(e,t={}){this.#B.remove(e,t)}move(e,t,n={}){this.#B.move(e,t,n)}batch(e){this.#B.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.#Se(e,!0)}openSearch(e=``){this.#Se(e,!0)}closeSearch(){this.#Se(null,!0)}isSearchOpen(){return this.#M!==null}getSearchValue(){return this.#M??``}getSearchMatchingPaths(){return this.#k}focusNextSearchMatch(){this.#xe(1)}focusPreviousSearchMatch(){this.#xe(-1)}startRenaming(e=this.#c??``,t={}){if(!this.#w)return!1;let n=this.#B.getPathInfo(e);if(n==null)return!1;let r=n.path,i=Fk(r),a=Lk(r);if(this.#C?.({isFolder:i,path:a})===!1)return!1;for(let e of Ak(r))this.#B.isExpanded(e)||this.#B.expand(e);return this.#re([r],r,!1),this.#M!=null&&(this.#Se(null,!1),this.#y?.(this.#M)),this.#je(r),this.#T=r,this.#E=Ik(r),this.#D=t.removeIfCanceled??!1,this.#we(),!0}[Tk](){return{cancel:()=>{this.#G()},commit:()=>{this.#K()},getPath:()=>this.#T,getValue:()=>this.#E,isActive:()=>this.#T!=null,setValue:e=>{this.#q(e)}}}#G(){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,Fk(e)?{recursive:!0}:void 0);return}this.#je(e),this.#we()}#K(){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,Fk(e)?{recursive:!0}:void 0);return}let t=Fk(e),n=hk({files:this.#B.list(),isFolder:t,nextBasename:this.#E,path:Lk(e)});if(this.#T=null,this.#E=``,this.#D=!1,`error`in n){this.#je(e),this.#v?.(n.error),this.#we();return}if(n.sourcePath===n.destinationPath){this.#je(e),this.#we();return}this.#_?.({destinationPath:n.destinationPath,isFolder:n.isFolder,sourcePath:n.sourcePath}),this.move(Rk(n.sourcePath,t),Rk(n.destinationPath,t))}#q(e){this.#T==null||this.#E===e||(this.#E=e,this.#we())}resetPaths(e,t={}){let n=this.#B.list().length,r=this.#U,i=Wk({paths:e,preparedInput:t.preparedInput},`resetPaths`,this.#e.sort),a=this.#se(i.paths,i.preparedInput,t.initialExpandedPaths),o=this.#c,s=this.#T,c=this.getSelectedPaths(),l=this.#L;this.#W?.(),this.#B=a,this.#d.clear(),this.#pe();let u=c.map(e=>a.getPathInfo(e)?.path??null).filter(e=>e!=null),d=!kk(this.#R,u);this.#R=new Set(u),d&&(this.#z+=1),this.#L=l==null?null:a.getPathInfo(l)?.path??null,this.#T=s==null?null:a.getPathInfo(s)?.path??null,this.#T??(this.#E=``,this.#D=!1),this.#Oe(o,o!=null||u.length>0||this.#L!=null),this.#W=this.#Fe(),this.#we(),this.#Te({canonicalChanged:!0,operation:`reset`,pathCountAfter:i.paths.length,pathCountBefore:n,projectionChanged:!0,usedPreparedInput:t.preparedInput!=null,visibleCountDelta:this.#U-r})}#J(e){this.#Ne();let t=jk(e),n=Mk(e,t),r=null,i=null;for(let e of this.#ve()){if(jk(e)!==t)continue;let a=Mk(e,t);if(a<n){r=e;continue}if(a>n){i=e;break}}return r??i}#Y(e){let t=this.#be(e);if(t!==-1)return t;let n=Ak(e);for(let e=n.length-1;e>=0;--e){let t=n[e];if(t==null)continue;let r=this.#be(t);if(r!==-1)return r}return this.#ve().length>0?0:-1}#X(e,t){let n=this.#d.get(e);if(n!=null)return n;let r=t??this.#B.getPathInfo(e);if(r==null)return null;let i=r.kind===`directory`?this.#ie(r.path):this.#ae(r.path);return this.#d.set(r.path,i),i}#Z(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.#R.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}}#Q(e){return this.#Z(e.row,e.index,e.index,{ancestorPaths:e.ancestorPaths,path:e.row.path,posInSet:e.posInSet,setSize:e.setSize})}#$(e,t){let n=this.#B.getVisibleRowContext(e);return n==null?void 0:n.ancestorRows[t]??(t===n.ancestorRows.length&&n.row.kind===`directory`&&n.row.isExpanded?n:void 0)}#ee(e){let t=this.#a.get(e);if(t!=null)return t;let n=this.#u(e),r=n<0?[]:[...this.#ee(n),n];return this.#a.set(e,r),r}#te(e){let t=this.#o.get(e);if(t!=null)return t;let n=this.#ee(e).map(e=>this.#b[e]??``).filter(e=>e!==``);return this.#o.set(e,n),n}#ne(e){this.#B.collapse(e)}#re(e,t=this.#L,n=!0){let r=[...new Set(e)],i=!kk(this.#R,r),a=this.#L!==t;!i&&!a||(this.#R=new Set(r),this.#L=t,i&&(this.#z+=1),n&&this.#we())}#ie(e){return{collapse:()=>{this.#ne(e)},deselect:()=>{this.deselectPath(e)},expand:()=>{this.#Ee(e)},focus:()=>{this.focusPath(e)},getPath:()=>e,isDirectory:()=>!0,isExpanded:()=>this.#B.isExpanded(e),isFocused:()=>this.#c===e,isSelected:()=>this.#R.has(e),select:()=>{this.selectPath(e)},toggleSelect:()=>{this.togglePathSelection(e)},toggle:()=>{this.#Ie(e)}}}#ae(e){return{deselect:()=>{this.deselectPath(e)},focus:()=>{this.focusPath(e)},getPath:()=>e,isDirectory:()=>!1,isFocused:()=>this.#c===e,isSelected:()=>this.#R.has(e),select:()=>{this.selectPath(e)},toggleSelect:()=>{this.togglePathSelection(e)}}}#oe(e){let t=this.#B.list();this.#se(t).batch(e)}#se(e,t,n){return new XO({...this.#e,paths:e,preparedInput:t??void 0,...n===void 0?{}:{initialExpandedPaths:n}})}#ce(){return this.#h??=this.#B.list(),this.#h}#le(){if(this.#m!=null)return this.#m;let e=new Set;for(let t of this.#ce()){e.add(t);for(let n of Ak(t))e.add(n)}return this.#m=[...e].sort(),this.#m}#ue(){return this.#g??=this.#ce().map(Pk),this.#g}#de(){return this.#f??=this.#le().filter(e=>e.endsWith(`/`)),this.#f}#fe(){return this.#p??=this.#de().map(Pk),this.#p}#pe(){this.#f=null,this.#p=null,this.#m=null,this.#h=null,this.#g=null}#me(){return this.#de().filter(e=>this.#B.isExpanded(e))}#he(e){let t=new Set(this.#j??[]);if(e)for(let e of this.#R)for(let n of Ak(e))t.add(n);this.#ge(t)}#ge(e){this.#H=!0;try{for(let t of this.#de()){let n=e.has(t),r=this.#B.isExpanded(t);n&&!r?this.#B.expand(t):!n&&r&&this.#B.collapse(t)}}finally{this.#H=!1}}#_e(){let e=this.#b;if(this.#k=e.filter(e=>this.#O.has(e)),this.#M==null||this.#M.length===0||this.#A!==`hide-non-matches`||this.#O.size===0){this.#F=null,this.#I=null,this.#P=null,this.#U=this.#V;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.#U=n.length}#ve(){return this.#I??this.#b}#ye(e){return this.#F?.[e]??e}#be(e){return this.#P?.get(e)??this.#B.getVisibleIndex(e)??-1}#xe(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)}#Se(e,t){let n=e==null?null:Nk(e),r=this.#M;if(r!==n){if(r==null&&n!=null&&(this.#j=this.#me()),this.#M=n,n==null)this.#he(!0),this.#j=null,this.#O.clear(),this.#N=null,this.#Oe(this.#c,!0);else if(n.length===0)this.#he(!1),this.#O.clear(),this.#N=null,this.#Oe(this.#c,!0);else{let e=this.#Ce();this.#Oe(e,!0)}t&&(this.#y?.(this.#M),this.#we())}}#Ce(){if(this.#M==null||this.#M.length===0)return this.#O.clear(),this.#c;let e=this.#M,t=this.#ce(),n=this.#ue(),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.#de(),s=this.#fe();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 Ak(e))l.add(t),c?.add(t)}return this.#ge(l),a??this.#c}#we(){for(let e of this.#t)e()}#Te(e){this.#n.get(e.operation)?.forEach(t=>{t(e)}),this.#n.get(`*`)?.forEach(t=>{t(e)})}#Ee(e){for(let t of Ak(e))this.#B.isExpanded(t)||this.#B.expand(t);this.#B.isExpanded(e)||this.#B.expand(e)}#De(e){let t=this.#U;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.#Ne(),this.#Me(r))}#Oe(e,t=!0){let n=this.#B.getVisibleCount();this.#V=n;let r=Yk(this.#B.getVisibleTreeProjectionData(t?void 0:Math.min(n,Dk)),e,t?e=>this.#B.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.#_e(),this.#s=e==null?this.#ve().length>0?0:-1:this.#Y(e),this.#c=this.#s<0?null:this.#ke(this.#s)}#ke(e){return this.#ve()[e]??(this.#F==null?this.#B.getVisibleRowContext(e)?.row.path??null:null)}#Ae(e){return this.#B.getPathInfo(e)?.path??null}#je(e){if(e==null)return;let t=this.#Y(e);t>=0&&this.#Me(t,!1)}#Me(e,t=!0){let n=this.#ke(e);n!=null&&(this.#s===e&&this.#c===n||(this.#s=e,this.#c=n,t&&this.#we()))}#Ne(){this.#l||this.#Oe(this.#c,!0)}#Pe(e){let t=Vk(this.#T,e);t==null&&this.#T!=null&&(this.#E=``),this.#T=t;let n=Vk(this.#c,e,!0),r=[...this.#R].map(t=>Vk(t,e)).filter(e=>e!=null).map(e=>this.#B.getPathInfo(e)?.path??null).filter(e=>e!=null),i=Vk(this.#L,e),a=i==null?null:this.#B.getPathInfo(i)?.path??null,o=[...new Set(r)];return kk(this.#R,o)||(this.#R=new Set(o),this.#z+=1),this.#L=a,n}#Fe(){return this.#B.on(`*`,e=>{if(this.#H)return;e.canonicalChanged&&(this.#d.clear(),this.#pe()),this.#i!=null&&Ek(e)&&(this.#i=null);let t=Ek(e)?this.#Pe(e):this.#c,n=this.#M!=null&&this.#M.length>0?this.#Ce():this.#M===``?this.#c:t,r=this.#M!=null||e.operation!==`expand`&&e.operation!==`collapse`;this.#Oe(n,r),this.#we();let i=qk(e);i!=null&&this.#Te(i)})}#Ie(e){if(this.#B.isExpanded(e)){this.#ne(e);return}this.#Ee(e)}},Zk=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 Qk(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 $k(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 eA(e,t){return t?`${e}/`:e}function tA(e,t=null){let n=Zk(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;for(let t of e??[]){let e=Qk(t.path);if(e==null)continue;let n=eA(e.path,e.isDirectory);r.set(n,t.status),t.status===`ignored`&&e.isDirectory?a.add(n):e.isDirectory&&a.delete(n);for(let t of $k(e.path))i.add(t)}return{directoriesWithChanges:i,ignoredDirectoryPaths:a,signature:n,statusByPath:r}}var nA,rA,iA,aA,oA,sA,cA,lA,uA,dA,fA={},pA=[],mA=Array.isArray,hA=pA.slice,gA=Object.assign;function _A(e){e&&e.parentNode&&e.remove()}function vA(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?hA.call(arguments,2):n),yA(e,o,r,i,null)}function yA(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??++rA,__i:-1,__u:0};return i==null&&nA.vnode!=null&&nA.vnode(a),a}function bA(e){return e.children}function xA(e,t){this.props=e,this.context=t,this.__g=0}function SA(e,t){if(t==null)return e.__?SA(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`?SA(e):null}function CA(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 CA(e)}}function wA(e){(8&e.__g||!(e.__g|=8)||!iA.push(e)||oA++)&&aA==nA.debounceRendering||((aA=nA.debounceRendering)||queueMicrotask)(TA)}function TA(){for(var e,t,n,r,i,a,o,s,c=1;iA.length;)iA.length>c&&iA.sort(sA),e=iA.shift(),c=iA.length,8&e.__g&&(n=void 0,i=(r=(t=e).__v).__e,a=[],o=[],(s=t.__P)&&((n=gA({},r)).__v=r.__v+1,nA.vnode&&nA.vnode(n),NA(s,n,r,t.__n,s.namespaceURI,32&r.__u?[i]:null,a,i??SA(r),!!(32&r.__u),o,s.ownerDocument),n.__v=r.__v,n.__.__k[n.__i]=n,FA(a,n,o),n.__e!=i&&CA(n)));oA=0}function EA(e,t,n,r,i,a,o,s,c,l,u,d){var f,p,m,h,g,_,v,y=r&&r.__k||pA,b=t.length;for(c=DA(n,t,y,c,b),f=0;f<b;f++)(m=n.__k[f])!=null&&(p=m.__i==-1?fA:y[m.__i]||fA,m.__i=f,_=NA(e,m,p,i,a,o,s,c,l,u,d),h=m.__e,m.ref&&p.ref!=m.ref&&(p.ref&&RA(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=OA(m,c,e,v):typeof m.type==`function`&&_!==void 0?c=_:h&&(c=h.nextSibling),m.__u&=-7);return n.__e=g,c}function DA(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?yA(null,o,null,null,null):mA(o)?yA(bA,{children:o},null,null,null):o.constructor==null&&o.__b>0?yA(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=kA(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=SA(s)),zA(s,s));return r}function OA(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=OA(i[a],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=SA(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do t&&=t.nextSibling;while(t!=null&&t.nodeType==8);return t}function kA(e,t,n,r){var i,a,o,s=e.key,c=e.type,l=t[n],u=l!=null&&(2&l.__u)==0;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 AA(e,t,n){t[0]==`-`?e.setProperty(t,n??``):e[t]=n??``}function jA(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||AA(e.style,t,``);if(n)for(t in n)r&&n[t]==r[t]||AA(e.style,t,n[t])}else if(t[0]==`o`&&t[1]==`n`)a=t!=(t=t.replace(cA,`$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=lA,e.addEventListener(t,a?dA:uA,a)):e.removeEventListener(t,a?dA:uA,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 MA(e){return function(t){if(this.__l){var n=this.__l[t.type+e];if(t.u==null)t.u=lA++;else if(t.u<n.l)return;return n(nA.event?nA.event(t):t)}}}function NA(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,j,M=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=nA.__b)&&d(t);n:if(typeof M==`function`)try{if(v=t.props,y=`prototype`in M&&M.prototype.render,b=(d=M.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 M(v,x):(t.__c=f=new xA(v,x),f.constructor=M,f.render=BA),b&&b.sub(f),f.props=v,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&&M.getDerivedStateFromProps!=null&&(f.__s==f.state&&(f.__s=gA({},f.__s)),gA(f.__s,M.getDerivedStateFromProps(v,f.__s))),m=f.props,h=f.state,f.__v=t,p)y&&M.getDerivedStateFromProps==null&&f.componentWillMount!=null&&f.componentWillMount(),y&&f.componentDidMount!=null&&f.__h.push(f.componentDidMount);else{if(y&&M.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=nA.__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=gA({},r,f.getChildContext())),y&&!p&&f.getSnapshotBeforeUpdate!=null&&(g=f.getSnapshotBeforeUpdate(m,h)),E=d,d!=null&&d.type===bA&&d.key==null&&(E=IA(d.props.children)),s=EA(e,mA(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(j=a.length;j--;)_A(a[j]);PA(t)}else t.__e=n.__e,t.__k=n.__k,e.then||PA(t);nA.__e(e,t,n)}else s=t.__e=LA(n.__e,t,n,r,i,a,o,c,l,u);return(d=nA.diffed)&&d(t),128&t.__u?void 0:s}function PA(e){e&&e.__c&&(e.__c.__g|=4),e&&e.__k&&e.__k.forEach(PA)}function FA(e,t,n){for(var r=0;r<n.length;r++)RA(n[r],n[++r],n[++r]);nA.__c&&nA.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){nA.__e(e,t.__v)}})}function IA(e){return typeof e!=`object`||!e||e.__b&&e.__b>0?e:mA(e)?e.map(IA):gA({},e)}function LA(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&&=(nA.__m&&nA.__m(t,a),!1),a=null}if(b==null)v===y||s&&e.data==y||(e.data=y);else{if(a&&=hA.call(e.childNodes),v=n.props||fA,!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;jA(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&&!_||jA(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=``),EA(b==`template`?e.content:e,mA(p)?p:[p],t,n,r,b==`foreignObject`?`http://www.w3.org/1999/xhtml`:i,a,o,a?a[0]:n.__k&&SA(n,0),s,c,l),a!=null)for(u=a.length;u--;)_A(a[u]);s||(u=`value`,b==`progress`&&h==null?e.removeAttribute(`value`):h==null||h===e[u]&&(b!==`progress`||h)||jA(e,u,h,v[u],i),u=`checked`,g!=null&&g!=e[u]&&jA(e,u,g,v[u],i))}return e}function RA(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){nA.__e(e,n)}}function zA(e,t,n){var r,i;if(nA.unmount&&nA.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||RA(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){nA.__e(e,t)}r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&zA(r[i],t,n||typeof e.type!=`function`);n||_A(e.__e),e.__e&&e.__e.__l&&(e.__e.__l=null),e.__e=e.__c=e.__=null}function BA(e,t,n){return this.constructor(e,n)}function VA(e,t){var n,r,i,a;t==document&&(t=document.documentElement),nA.__&&nA.__(e,t),r=(n=!!(e&&32&e.__u))?null:t.__k,e=t.__k=vA(bA,null,[e]),i=[],a=[],NA(t,e,r||fA,fA,t.namespaceURI,r?null:t.firstChild?hA.call(t.childNodes):null,i,r?r.__e:t.firstChild,n,a,t.ownerDocument),FA(i,e,a)}function HA(e,t){e.__u|=32,VA(e,t)}nA={__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 oA=0,e}},rA=0,xA.prototype.setState=function(e,t){var n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=gA({},this.state);typeof e==`function`&&(e=e(gA({},n),this.props)),e&&gA(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),wA(this))},xA.prototype.forceUpdate=function(e){this.__v&&(this.__g|=4,e&&this.__h.push(e),wA(this))},xA.prototype.render=bA,iA=[],oA=0,sA=function(e,t){return e.__v.__b-t.__v.__b},cA=/(PointerCapture)$|Capture$/i,lA=0,uA=MA(!1),dA=MA(!0);var UA=0;Array.isArray;function $(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:--UA,__i:-1,__u:0,__source:i,__self:a};return nA.vnode&&nA.vnode(l),l}var WA=16,GA=16,KA={};function qA({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}=KA[e]??{width:WA,height:GA},f=r??l,p=i??u,m=a??d??`0 0 ${l} ${u}`;return $(`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:$(`use`,{href:c})})}var JA=e=>{if(e.length<2)return[e,``];let t=Math.ceil(e.length/2);return[e.slice(0,t),e.slice(t)]},YA=e=>{if(e.length<4)return[e,``];let t=e.lastIndexOf(`.`)+1,n=e.length-t>10,r=t>=1&&!n?t:Math.ceil(e.length/2);return[e.slice(0,r),e.slice(r)]},XA=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)]},ZA=(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)]},QA=(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)]},$A=(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 ej({children:e,marker:t,variant:n=`default`}){"use no memo";return $(`div`,{"aria-hidden":!0,"data-truncate-marker-cell":!0,children:$(`div`,{"data-truncate-marker":!0,children:typeof t==`function`?t({children:e}):n===`fade`?$(`span`,{"data-truncate-fade":!0}):t})})}function tj(e){"use no memo";let{mode:t,children:n}=e;return $(`div`,{children:[$(`div`,{"data-truncate-content":`visible`,children:t===`fruncate`?$(`span`,{children:n}):n}),$(`div`,{"data-truncate-content":`overflow`,"aria-hidden":!0,children:t===`fruncate`?$(`span`,{children:n}):n})]})}function nj({children:e,mode:t=`truncate`,marker:n=`…`,variant:r=`default`,...i}){"use no memo";let a=$(tj,{mode:t,children:e},`content`),o=$(ej,{marker:n,mode:t,variant:r},`marker`),s=$(`div`,{"data-truncate-fill":!0},`fill`);return $(`div`,{"data-truncate-container":t,"data-truncate-variant":r,...i,children:$(`div`,{"data-truncate-grid":!0,children:t===`truncate`?[a,o]:[o,a,s]})})}function rj({children:e,...t}){"use no memo";return $(nj,{mode:`truncate`,...t,children:e})}function ij({children:e,...t}){"use no memo";return $(nj,{mode:`fruncate`,...t,children:e})}function aj({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=$(rj,{...s,children:t[0]}),l=$(ij,{...s,children:t[1]})}else{if(typeof e!=`string`)return console.error(`MiddleTruncate: children must be a string`),null;if(e.length===0)return $(`div`,{className:a,style:o});if(e.length<i)return $(n===`end`?ij:rj,{...s,className:a,style:o,children:e});let t=null,u=null,d=null;if(typeof r==`string`)r===`center`?t=JA:r===`extension`?t=YA:r===`leaf-path`&&(t=XA);else if(typeof r==`number`)t=ZA,u=r;else if(Array.isArray(r)){let[e,n]=r;d=n,e===`last`?t=QA:e===`first`&&(t=$A)}else typeof r==`function`&&(t=r);t??=JA;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=$(rj,{...s,..._,children:f}),l=$(ij,{...s,...v,children:p})}return $(`div`,{"data-truncate-group-container":`middle`,className:a,style:o,children:[$(`div`,{"data-truncate-segment-priority":n===`start`||n===`equal`?`1`:`2`,children:c}),$(`div`,{"data-truncate-segment-priority":n===`end`||n===`equal`?`1`:`2`,children:l})]})}var oj={endIndex:-1,startIndex:-1};function sj(e,t,n){return Math.min(Math.max(e,t),n)}function cj(e,t){return e<0||t<e?oj:{endIndex:t,startIndex:e}}function lj(e){return e.startIndex<0||e.endIndex<e.startIndex}function uj(e,t){return lj(e)?0:(e.endIndex-e.startIndex+1)*t}function dj(e,t,n){if(t<=0)return-1;let r=t*n;return e<=0?0:e>=r?t:Math.floor(e/n)}function fj(e,t,n){return t<=0||e<=0?-1:e>=t*n?t-1:Math.ceil(e/n)-1}function pj(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 mj(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 hj(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 gj(e,t,n){if(e.length===0||t<=0)return[];let r=hj(e),i=pj(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=mj(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 _j(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=sj(t.scrollTop,0,o),c=t.stickyRows??gj(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=dj(s,n,t.itemHeight),m=dj(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?oj:cj(m,fj(u+d,n,t.itemHeight)),y=g+1,b=lj(v)?oj:cj(Math.max(y,v.startIndex-a),Math.min(n-1,v.endIndex+a)),x=uj(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:lj(b)?0:b.startIndex*t.itemHeight,startIndex:b.startIndex}}}var vj={added:`A`,deleted:`D`,ignored:null,modified:`M`,renamed:`R`,untracked:`U`},yj={added:`Git status: added`,deleted:`Git status: deleted`,ignored:`Git status: ignored`,modified:`Git status: modified`,renamed:`Git status: renamed`,untracked:`Git status: untracked`},bj=`Contains git status items`;function xj(e){let{renamingPath:t,previousRenamingPath:n,hasRenderedInput:r}=e;return t==null?`reset`:r?n===t?`ignore`:`focus-input`:`reveal-canonical`}function Sj(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 Cj(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}}function wj(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 Tj(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}var Ej,Dj,Oj,kj,Aj=Object.is,jj=0,Mj=[],Nj=nA,Pj=Nj.__b,Fj=Nj.__r,Ij=Nj.diffed,Lj=Nj.__c,Rj=Nj.unmount,zj=Nj.__;function Bj(e,t){Nj.__h&&Nj.__h(Dj,e,jj||t),jj=0;var n=Dj.__H||={__:[],__h:[]};return e>=n.__.length&&n.__.push({}),n.__[e]}function Vj(e){return jj=1,Hj(eM,e)}function Hj(e,t,n){var r=Bj(Ej++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):eM(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);Aj(t,n)||(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=Dj,!Dj.__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,Aj(t,e.__[0])||(o=!0)}}),a&&a.call(this,e,t,n)||o};Dj.__f=!0;var a=Dj.shouldComponentUpdate,o=Dj.componentWillUpdate;Dj.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)},Dj.shouldComponentUpdate=i}return r.__N||r.__}function Uj(e,t){var n=Bj(Ej++,3);!Nj.__s&&$j(n.__H,t)&&(n.__=e,n.u=t,Dj.__H.__h.push(n))}function Wj(e,t){var n=Bj(Ej++,4);!Nj.__s&&$j(n.__H,t)&&(n.__=e,n.u=t,Dj.__h.push(n))}function Gj(e){return jj=5,Kj(function(){return{current:e}},[])}function Kj(e,t){var n=Bj(Ej++,7);return $j(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function qj(e,t){return jj=8,Kj(function(){return e},t)}function Jj(){for(var e;e=Mj.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Zj),e.__H.__h.forEach(Qj),e.__H.__h=[]}catch(t){e.__H.__h=[],Nj.__e(t,e.__v)}}Nj.__b=function(e){Dj=null,Pj&&Pj(e)},Nj.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),zj&&zj(e,t)},Nj.__r=function(e){Fj&&Fj(e),Ej=0;var t=(Dj=e.__c).__H;t&&(Oj===Dj?(t.__h=[],Dj.__h=[],t.__.forEach(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.forEach(Zj),t.__h.forEach(Qj),t.__h=[],Ej=0)),Oj=Dj},Nj.diffed=function(e){Ij&&Ij(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Mj.push(t)!==1&&kj===Nj.requestAnimationFrame||((kj=Nj.requestAnimationFrame)||Xj)(Jj)),t.__H.__.forEach(function(e){e.u&&(e.__H=e.u),e.u=void 0})),Oj=Dj=null},Nj.__c=function(e,t){t.some(function(e){try{e.__h.forEach(Zj),e.__h=e.__h.filter(function(e){return!e.__||Qj(e)})}catch(n){t.some(function(e){e.__h&&=[]}),t=[],Nj.__e(n,e.__v)}}),Lj&&Lj(e,t)},Nj.unmount=function(e){Rj&&Rj(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(e){try{Zj(e)}catch(e){t=e}}),n.__H=void 0,t&&Nj.__e(t,n.__v))};var Yj=typeof requestAnimationFrame==`function`;function Xj(e){var t,n=function(){clearTimeout(r),Yj&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);Yj&&(t=requestAnimationFrame(n))}function Zj(e){var t=Dj,n=e.__c;typeof n==`function`&&(e.__c=void 0,n()),Dj=t}function Qj(e){var t=Dj;e.__c=e.__(),Dj=t}function $j(e,t){return!e||e.length!==t.length||t.some(function(t,n){return!Aj(t,e[n])})}function eM(e,t){return typeof t==`function`?t(e):t}function tM(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 nM(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 rM({ariaLabel:e,isFlattened:t=!1,ref:n,value:r,onBlur:i,onInput:a}){return $(`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 iM(e,t=null,n=null){"use no memo";let r=e.flattenedSegments;return r==null||r.length===0?t??e.name:$(`span`,{"data-item-flattened-subitems":!0,children:r.map((e,i)=>{let a=i===r.length-1;return $(bA,{children:[$(`span`,{"data-item-flattened-subitem":e.path,"data-item-flattened-subitem-drag-target":n===e.path?`true`:void 0,children:a&&t!=null?t:$(rj,{children:e.name})}),i<r.length-1?` / `:``]},e.path)})})}function aM(e){return e.isFlattened?e.flattenedSegments?.findLast(e=>e.isTerminal)?.path??e.path:e.path}function oM(e){let t=e.flattenedSegments;return t==null||t.length===0?e.name:t.map(e=>e.name).join(` / `)}function sM(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 cM({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=_j(c,{itemHeight:t,overscan:n,scrollTop:r,stickyRows:s==null?void 0:sM(s,r,t,o),totalRowCount:o,viewportHeight:a}),u=i&&r<=0&&o>0?e.getStickyRowCandidates(1,t):[],d=u!=null&&r<=0?sM(u,1,t,o):i&&r<=0&&c.length>0?gj(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 lM=400,uM=10,dM=40,fM=18;function pM(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))?mM(e,t,n):a instanceof HTMLElement?a:null}function mM(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 hM(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 gM(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 _M(){return navigator.vendor!==`Apple Computer, Inc.`}function vM(e,t){let n=e-t.top;if(n<dM)return-Math.ceil((dM-Math.max(0,n))/dM*fM);let r=t.bottom-e;return r<dM?Math.ceil((dM-Math.max(0,r))/dM*fM):0}function yM(e,t){if(e!=null){let t=vj[e];return t==null?null:{text:t,title:yj[e]}}return t?{icon:{name:`file-tree-icon-dot`,width:6,height:6},title:bj}:null}function bM(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 xM(e){return e!=null&&`toggle`in e}function SM(e){return e.code===`Space`||e.key===` `||e.key===`Spacebar`}function CM(e){return e.key.length===1&&/^[\p{L}\p{N}]$/u.test(e.key)&&!e.ctrlKey&&!e.metaKey&&!e.altKey}function wM(e,t){if(e==null)return t;let n=e.getBoundingClientRect().height;return n>0?n:e.clientHeight>0?e.clientHeight:t}function TM(e,t){return e!=null&&e>0?e:t}function EM(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 DM(e,t,n,r,i=0){let a=wj({currentScrollTop:e.scrollTop,focusedIndex:t,itemHeight:n,topInset:i,viewportHeight:r});return a==null?!1:(e.scrollTop=a,!0)}function OM(e,t,n,r,i,a){let o=Tj({currentScrollTop:e.scrollTop,focusedIndex:t,itemHeight:n,targetViewportOffset:a,totalHeight:i,viewportHeight:r});return o==null?!1:(e.scrollTop=o,!0)}function kM(e,t,n,r){return n.end<n.start?null:e<n.start?-t:e>n.end?r:null}function AM(e){return e==null?``:`[data-item-section="spacing-item"][data-ancestor-path="${e.replaceAll(`\\`,`\\\\`).replaceAll(`"`,`\\"`)}"] { opacity: 1; }`}function jM(e){return e.shiftKey&&e.key===`F10`||e.key===`ContextMenu`}function MM(e,t){return t&&jM(e)||(e.ctrlKey||e.metaKey)&&SM(e)?!0:e.key===`ArrowDown`||e.key===`ArrowLeft`||e.key===`ArrowRight`||e.key===`ArrowUp`}var NM=new Set([`ArrowDown`,`ArrowLeft`,`ArrowRight`,`ArrowUp`,`End`,`Home`,`PageDown`,`PageUp`]);function PM(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 FM(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 IM(e,t){return{bottom:t,height:0,left:e,right:e,top:t,width:0,x:e,y:t}}function LM(e,t){if(e==null)return t.offsetTop;let n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return n.top-r.top}function RM(e,t,n){if(n==null){e.delete(t);return}e.set(t,n)}function zM(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 BM(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 VM(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 HM(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=VM(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 UM(e,t){return{kind:e.kind,name:oM(e),path:t}}function WM(e){return e==null?void 0:`${e}__tree`}function GM(e,t,n){if(e!=null)return`${e}__focused-item-${encodeURIComponent(t)}${n?`__parked`:``}`}function KM(e){return e===`file-tree-icon-chevron`||e===`file-tree-icon-dot`||e===`file-tree-icon-file`||e===`file-tree-icon-lock`}function qM(e,t){if(e==null)return null;if(`text`in e)return $(`span`,{title:e.title,children:e.text});let n=typeof e.icon==`string`?KM(e.icon)?t(e.icon):{name:e.icon}:KM(e.icon.name)?(()=>{let n=t(e.icon.name),{name:r,...i}=e.icon;return{...n,...i}})():e.icon;return $(`span`,{title:e.title,children:$(qA,{...n})})}function JM(e){e!=null&&tM(e.querySelector([`button:not([disabled])`,`[href]`,`input:not([disabled])`,`select:not([disabled])`,`textarea:not([disabled])`,`[tabindex]:not([tabindex="-1"])`].join(`, `))??e)}function YM(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=aM(e);return $(bA,{children:[e.depth>0?$(`div`,{"data-item-section":`spacing`,children:Array.from({length:e.depth}).map((t,n)=>$(`div`,{"data-item-section":`spacing-item`,"data-ancestor-path":e.ancestorPaths[n]},n))}):null,$(`div`,{"data-item-section":`icon`,children:e.kind===`directory`?$(qA,{...t(`file-tree-icon-chevron`)}):$(qA,{...t(`file-tree-icon-file`,u)})}),$(`div`,{"data-item-section":`content`,children:e.isFlattened?iM(e,c,a):c??$(aj,{minimumLength:5,split:`extension`,children:e.name})}),i?$(`div`,{"data-item-section":`decoration`,children:r==null?null:qM(r,t)}):null,s?$(`div`,{"data-item-section":`git`,children:qM(o,t)}):null,n?$(`div`,{"data-item-section":`action`,children:l?$(`span`,{"aria-hidden":`true`,"data-item-action-affordance":`decorative`,children:$(qA,{...t(`file-tree-icon-ellipsis`)})}):null}):null]})}function XM(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:j,onRowClick:M,onKeyDown:N}=e,P=aM(t),{isParked:F=!1,mode:I=`flow`,style:L}=r,R=I===`sticky`,z=_?.get(P)??null??bM(t.ancestorPaths,v,y),B=t.kind===`directory`&&(b?.has(P)??!1),V=A(t,P),H=yM(z,B),U=S&&w,ee=V!=null||x||U,W=U&&T===`always`,te=a.getPath()===P,G=te?a.getValue():``,ne=R||!te?null:$(rM,{ref:D,ariaLabel:`Rename ${oM(t)}`,isFlattened:t.isFlattened,value:G,onBlur:()=>{a.commit()},onInput:e=>{a.setValue(e.currentTarget.value)}}),K=YM(t,k,{actionLaneEnabled:U,customDecoration:V,decorationLaneEnabled:ee,dragTargetFlattenedSegmentPath:l?.flattenedSegmentPath??null,gitDecoration:H,gitLaneActive:x,renameInput:ne,showDecorativeActionAffordance:W}),re={...Sj({ariaLabel:oM(t),domId:t.isFocused?GM(h,P,F):void 0,extraStyle:L,features:{actionLaneEnabled:U,contextMenuButtonVisibility:U?T:null,contextMenuEnabled:S,contextMenuTriggerMode:S?C:null,gitLaneActive:x},isParked:F,itemHeight:g,mode:I,row:t,state:{containsGitChange:B,effectiveGitStatus:z,isContextHovered:s===P,isDragTarget:l?.kind===`directory`&&l.directoryPath===P,isDragging:c?.has(P)===!0,isFocusRinged:t.isFocused&&o===P},targetPath:P}),key:n,onContextMenu:S||u?e=>{if(d()){e.preventDefault();return}S&&(e.preventDefault(),E&&(i.focusPath(P),j(t,P,{anchorRect:IM(e.clientX,e.clientY),source:`right-click`})))}:void 0,onFocus:R?void 0:()=>{i.focusPath(P)},onKeyDown:R?void 0:N,ref:e=>{O(P,e)}};return!R&&te?$(`div`,{...re,children:K}):$(`button`,{...re,type:`button`,draggable:u&&!F,onDragEnd:u&&!F?p:void 0,onDragStart:u&&!F?e=>{f(e,t,P)}:void 0,onMouseDown:e=>{if(R){e.preventDefault();return}i.isSearchOpen()&&e.preventDefault()},onTouchStart:u&&!F?e=>{m(e,t,P)}:void 0,onClick:e=>{M(e,t,P,I)},children:K})}function ZM(e,t,n){return t.end<t.start?[]:e.controller.getVisibleRows(t.start,t.end).filter(e=>!n.has(aM(e))).map((n,r)=>XM(e,n,t.start+r))}function QM({composition:e,controller:t,gitStatusByPath:n,ignoredGitDirectories:r,directoriesWithGitChanges:i,icons:a,instanceId:o,itemHeight:s=ek,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 _=Gj(null),v=Gj(null),y=Gj(!1),b=Gj(null),x=Gj(null),S=Gj(null),C=Gj(null),w=Gj(null),T=Gj(new Map),E=Gj(new Map),D=Gj(()=>{}),O=Gj(null),k=Gj(!1),A=Gj(null),j=Gj(null),M=Gj(!1),N=Gj(null),P=Gj(null),F=Gj(null),I=Gj(null),L=Gj(null),R=Gj(null),z=Gj(null),B=Gj(null),V=Gj(!1),H=Gj(null),U=Gj(null),ee=Gj(null),W=Gj(null),te=Kj(()=>new Map,[]),[,G]=Vj(0),[ne,K]=Vj(null),[re,ie]=Vj(null),[q,J]=Vj(null),[ae,Y]=Vj(null),[oe,se]=Vj(0),[ce,le]=Vj(null),ue=Gj(ce);ue.current=ce;let de=Gj(null),fe=Gj(null),pe=Gj(null),me=Gj(null),he=Gj(null),ge=Gj(!1),_e=()=>{fe.current=null,pe.current=null,me.current=null},ve=(e,t)=>{fe.current=e,pe.current=null,me.current=t==null?null:{path:e,scrollTop:t}},ye=(e,t)=>{fe.current=null,pe.current={path:e,viewportOffset:t},me.current=null},be=Gj(d===`retain`&&t.isSearchOpen()),[xe,Se]=Vj(p);Uj(()=>{p||Se(!1)},[p]);let Ce=Gj(!1),we=qj(()=>{Ce.current=!0,Se(e=>e&&!1)},[]),[Te,Ee]=Vj(()=>cM({controller:t,itemHeight:s,overscan:c,scrollTop:0,stickyFolders:h,viewportHeight:g})),[De,Oe]=Vj(!1);Uj(()=>{Oe(!0)},[]);let ke=e?.contextMenu?.enabled===!0||e?.contextMenu?.render!=null||e?.contextMenu?.onOpen!=null||e?.contextMenu?.onClose!=null,Ae=e?.contextMenu?.triggerMode??(ke?`right-click`:`both`),je=Ae===`both`||Ae===`button`,Me=e?.contextMenu?.buttonVisibility??`when-needed`,Ne=Ae===`both`||Ae===`right-click`;Wj(()=>{let e=S.current;if(e==null)return;let t=e=>{if(!(e instanceof CustomEvent))return;let t=e.detail?.path??null;he.current=t,ie(t),Y(t==null?null:`pointer`)},n=e=>{e instanceof CustomEvent&&(ge.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 Pe=qj((e,t)=>{RM(T.current,e,t)},[]),Fe=qj((e,t)=>{RM(E.current,e,t)},[]),Ie=qj(e=>{x.current=e},[]),Le=qj(e=>zM(e,E.current,T.current),[]),Re=n!=null||r!=null||i!=null,{resolveIcon:ze}=Kj(()=>dT(a),[a]),Be=t[Tk](),Ve=Be.getPath(),He=Ve!=null,Ue=t.isSearchOpen(),We=t.getSearchValue(),Ge=t.getFocusedPath(),Ke=t.getFocusedIndex(),qe=t.isDragAndDropEnabled(),Je=t.getDragSession(),Ye=Kj(()=>Je==null?null:new Set(Je.draggedPaths),[Je]),Xe=Je?.target??null,Ze=Je?.primaryPath??null,Qe=WM(o),{overlayHeight:$e,overlayRows:et,snapshot:tt,visibleRows:nt}=Te,rt=tt.physical.viewportHeight,it=Kj(()=>({end:tt.window.endIndex,start:tt.window.startIndex}),[tt.window.endIndex,tt.window.startIndex]),at=et,ot=tt.sticky.rows,st=tt.physical.totalHeight,ct=tt.sticky.height,lt=Kj(()=>new Set(ot.map(e=>aM(e.row))),[ot]),ut=Ke>=0&&Ke>=it.start&&Ke<=it.end,dt=qj((e,t)=>u?.({item:UM(e,t),row:e})??null,[u]),ft=qj(e=>tM(e==null?null:T.current.get(e)??null)?!0:tM(S.current),[]),pt=qj(e=>{ft(t.focusNearestPath(e))},[t,ft]),mt=Gj(pt);mt.current=pt;let ht=Gj(!0),gt=Gj(()=>{}),_t=qj((t=!0)=>{let n=ue.current;n!=null&&(ht.current=ht.current&&t,le(null),e?.contextMenu?.onClose?.(),ht.current&&pt(n.path))},[e?.contextMenu,pt]);gt.current=_t;let vt=qj(e=>{let t=e==null?null:LM(S.current,e);J(e=>e===t?e:t)},[]),yt=qj((e,n,r)=>{let i=t.getItem(n);if(i==null)return;let a=Le(n);if(a?.dataset.fileTreeStickyRow===`true`){let e=C.current;ve(n,e?.scrollTop??null),k.current=!0,K(e=>e===n?e:n)}i.focus(),vt(a),ht.current=!0,le({anchorRect:r?.anchorRect??null,item:UM(e,n),path:n,source:r?.source??`keyboard`})},[t,Le,vt]),bt=qj(e=>{if(l){if(t.isSearchOpen()){let e=C.current,t=wM(e,rt);N.current=Ke<0||e==null?null:Math.max(0,Math.min(Ke*s-e.scrollTop,Math.max(0,t-s))),M.current=!0}t.startRenaming(e)!==!1&&(Y(`focus`),G(e=>e+1))}},[t,Ke,s,l,rt]),xt=qj((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=wM(i,rt),u=t.getVisibleCount()*s,d=r===`sticky-parents`?o.ancestorPaths.length*s:cM({controller:t,itemHeight:s,overscan:c,scrollTop:i.scrollTop,stickyFolders:h,viewportHeight:l}).snapshot.sticky.height;return k.current=!0,OM(i,a,s,l,u,d),D.current(),de.current=n?e:null,!0},[t,s,c,rt,h]),St=()=>y.current===!0||W.current!=null||V.current===!0,Ct=e=>typeof window.requestAnimationFrame==`function`?window.requestAnimationFrame(()=>{e()}):window.setTimeout(e,16),wt=e=>{if(e!=null){if(typeof window.cancelAnimationFrame==`function`){window.cancelAnimationFrame(e);return}window.clearTimeout(e)}},Tt=()=>{I.current!=null&&(clearTimeout(I.current),I.current=null),F.current=null},Et=()=>{R.current?.remove(),R.current=null},Dt=()=>{wt(P.current),P.current=null,L.current=null},Ot=e=>{let t=S.current?.getRootNode();if(t instanceof ShadowRoot){t.append(e);return}document.body.append(e)},kt=()=>{B.current?.(),B.current=null,W.current!=null&&(clearTimeout(W.current),W.current=null),V.current=!1,H.current=null,ee.current=null,U.current!=null&&(U.current.setAttribute(`draggable`,`true`),U.current.style.removeProperty(`touch-action`),U.current=null),Et(),Tt(),Dt(),z.current=null},At=(e,n)=>{let r=S.current?.getRootNode(),i=hM(pM(r instanceof ShadowRoot?r:document,e,n));return t.setDragTarget(i),t.getDragSession()?.target??null},jt=e=>{let n=t.getDragAndDropConfig()?.openOnDropDelay??800;if(e==null||e.kind!==`directory`||e.directoryPath==null||n<=0){Tt();return}let r=t.getItem(e.directoryPath),i=xM(r)?r:null;if(i==null||i.isExpanded()){Tt();return}let a=`${e.directoryPath}::${e.flattenedSegmentPath??``}`;F.current!==a&&(Tt(),F.current=a,I.current=setTimeout(()=>{let n=t.getDragSession()?.target;n?.kind!==`directory`||n.directoryPath!==e.directoryPath||n.flattenedSegmentPath!==e.flattenedSegmentPath||i.expand()},n))},Mt=()=>{P.current=null;let e=L.current,n=C.current;if(e==null||n==null||t.getDragSession()==null)return;let r=n.getBoundingClientRect(),i=vM(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()),jt(At(e.clientX,e.clientY)),P.current=Ct(Mt)},Nt=(e,t)=>{L.current={clientX:e,clientY:t},P.current??=Ct(Mt)},Pt=(e,n,r)=>{let i=e.currentTarget;if(i!=null){if(kt(),Et(),Tt(),Dt(),t.startDrag(r)===!1){e.preventDefault();return}if(z.current=n,e.dataTransfer!=null&&(e.dataTransfer.effectAllowed=`move`,e.dataTransfer.dropEffect=`move`,e.dataTransfer.setData(`text/plain`,r),_M())){let t=gM(i),n=i.getBoundingClientRect();Object.assign(t.style,{height:`${n.height}px`,opacity:`0.85`,transform:`translate3d(-9999px, 0px, 0)`,width:`${n.width}px`}),Ot(t),R.current=t,e.dataTransfer.setDragImage(t,Math.max(0,e.clientX-n.left),Math.max(0,e.clientY-n.top))}}},Ft=()=>{Et(),Tt(),Dt(),z.current=null,t.cancelDrag()},It=(e,n,r)=>{if(W.current!=null||V.current)return;let i=e.touches[0],a=e.currentTarget;if(i==null||a==null)return;ee.current={clientX:i.clientX,clientY:i.clientY},U.current=a,a.setAttribute(`draggable`,`false`);let o=(e={})=>{let t=e.restoreNativeDraggable??!V.current;W.current!=null&&(clearTimeout(W.current),W.current=null),document.removeEventListener(`touchmove`,s),document.removeEventListener(`touchend`,c),document.removeEventListener(`touchcancel`,c),B.current===o&&(B.current=null),t&&(a.setAttribute(`draggable`,`true`),U.current===a&&(U.current=null),ee.current=null)},s=e=>{let t=e.touches[0],n=ee.current;if(t==null||n==null)return;let r=t.clientX-n.clientX,i=t.clientY-n.clientY;r*r+i*i<=uM*uM||o()},c=()=>{o()};document.addEventListener(`touchmove`,s,{passive:!0}),document.addEventListener(`touchend`,c),document.addEventListener(`touchcancel`,c),B.current=o,W.current=setTimeout(()=>{if(o({restoreNativeDraggable:!1}),t.startDrag(r)===!1){a.setAttribute(`draggable`,`true`),U.current===a&&(U.current=null),ee.current=null;return}V.current=!0,U.current=a,a.setAttribute(`draggable`,`false`),a.style.setProperty(`touch-action`,`none`),z.current=n;let e=a.getBoundingClientRect(),s=gM(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`}),Ot(s),R.current=s,H.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=H.current;n!=null&&R.current!=null&&(R.current.style.transform=`translate3d(${t.clientX-n.x}px, ${t.clientY-n.y}px, 0)`),jt(At(t.clientX,t.clientY)),Nt(t.clientX,t.clientY)},l=e=>{let n=e.changedTouches[0];n!=null&&At(n.clientX,n.clientY),t.completeDrag(),kt()},u=()=>{t.cancelDrag(),kt()};B.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)},lM)},Lt=e=>{if(ce!=null){if(e.key===`Escape`){_t(),e.preventDefault(),e.stopPropagation();return}NM.has(e.key)&&(e.preventDefault(),e.stopPropagation());return}if(Be.isActive()){if(e.key===`Escape`)Be.cancel();else if(e.key===`Enter`)Be.commit();else return;Y(`focus`),G(e=>e+1),e.preventDefault(),e.stopPropagation();return}if(l&&e.key===`F2`){bt(Ge??void 0),e.preventDefault(),e.stopPropagation();return}if(Ue){if(e.key===`Escape`)M.current=!1,N.current=null,t.closeSearch();else if(e.key===`Enter`){let e=t.getFocusedPath();e!=null&&t.selectOnlyPath(e);let n=C.current,r=wM(n,rt);N.current=Ke<0||n==null?null:Math.max(0,Math.min(Ke*s-n.scrollTop,Math.max(0,r-s))),M.current=!0,t.closeSearch()}else if(e.key===`ArrowDown`)t.focusNextSearchMatch();else if(e.key===`ArrowUp`)t.focusPreviousSearchMatch();else return;Y(`focus`),G(e=>e+1),e.preventDefault(),e.stopPropagation();return}if(f&&CM(e)){t.openSearch(e.key),G(e=>e+1),e.preventDefault(),e.stopPropagation();return}let n=ke&&jM(e),r=MM(e,ke),i=r&&S.current!=null?nM(S.current):null,a=r?new Set(BM(S.current)):new Set,o=i?.dataset.fileTreeStickyPath??null,c=i?.dataset.fileTreeStickyRow===`true`&&o!=null;if(c&&o!==Ge&&a.has(o)){let e=C.current;ve(o,e?.scrollTop??null),t.focusPath(o)}let u=t.getFocusedPath(),d=t.getFocusedIndex(),p=t.getFocusedItem();if(p==null)return;let m=xM(p)?p:null,h=u!=null&&(lt.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=zM(u,E.current,T.current);e==null||n==null?y=!1:yt(e,u)}else if((e.ctrlKey||e.metaKey)&&SM(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;Y(`focus`);let b=t.getFocusedPath(),x=b!=null&&(lt.has(b)||a.has(b)),w=g&&b!==u,D=n&&c&&o===u&&b===u;if((h||D)&&b!=null&&(w&&x||D))ve(b,v?.scrollTop??null),k.current=!0,K(e=>e===b?e:b);else{let t=e.key===`ArrowUp`&&h&&b!==u;b!=null&&(t||_&&b===u)?(ye(b,HM(S.current,v,i,u,s,ct,rt)),k.current=!0,K(e=>e===b?e:b)):_e()}G(e=>e+1),e.preventDefault(),e.stopPropagation()};Wj(()=>{if(!(!f||!Ue)){if(be.current){be.current=!1;return}tM(w.current)}},[Ue,f]),Wj(()=>{let e=x.current;switch(xj({hasRenderedInput:e!=null,previousRenamingPath:j.current,renamingPath:Ve})){case`reset`:j.current=null;return;case`reveal-canonical`:Ve!=null&&xt(Ve,{restoreTreeFocus:!1,targetOffset:`live-overlay`});return;case`ignore`:return;case`focus-input`:e!=null&&(de.current=null,j.current=Ve,tM(e),e.select());return}},[it.end,it.start,Ve,xt,lt]),Wj(()=>{let e=S.current;if(e==null)return;let t=null,n=()=>{t!=null&&(clearTimeout(t),t=null)},r=()=>{let t=nM(e)?.dataset.itemPath??null;K(e=>e===t?e:t)},i=()=>{n(),k.current=!0,r()},a=i=>{let a=i.relatedTarget;if(a==null){n(),t=setTimeout(()=>{if(t=null,nM(e)!=null){r();return}k.current=!1,K(null)},0);return}if(!(a instanceof Node)||!e.contains(a)){n(),k.current=!1,K(null);return}let o=a instanceof HTMLElement?a.dataset.itemPath??null:null;K(e=>e===o?e:o)};return e.addEventListener(`focusin`,i),e.addEventListener(`focusout`,a),()=>{n(),e.removeEventListener(`focusin`,i),e.removeEventListener(`focusout`,a)}},[]),Wj(()=>{let e=S.current;e!=null&&(tt.physical.scrollTop<=0?e.dataset.scrollAtTop=`true`:delete e.dataset.scrollAtTop)},[tt.physical.scrollTop]),Wj(()=>{let e=null,n=C.current,r=b.current,i=S.current;if(n==null)return;O.current=wM(n,g);let a=()=>{let e=t.getVisibleCount(),r=TM(O.current,g),i=Math.max(0,e*s-r);n.scrollTop>i&&(n.scrollTop=i),Ee(cM({controller:t,itemHeight:s,overscan:c,scrollTop:Math.min(n.scrollTop,i),stickyFolders:h,viewportHeight:r}))};D.current=a;let o=!1,l=t.subscribe(()=>{o?G(e=>e+1):o=!0,a()}),u=()=>{ge.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,se(e=>e+1),e=null},50))},d=null,f=()=>{i!=null&&delete i.dataset.overlayReveal,d!=null&&(clearTimeout(d),d=null)},p=()=>{i==null||ge.current===!0||n.scrollTop>0||(i.dataset.overlayReveal=`true`,d!=null&&clearTimeout(d),d=setTimeout(()=>{f()},200))},m=()=>{if(a(),n.scrollTop>0&&f(),ue.current!=null&&y.current&>.current(),ge.current===!0){y.current=!1;return}ie(e=>e==null?e:null),u()},_=()=>{u(),p()},v=new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`PageUp`,`PageDown`,`Home`,`End`,` `,`Spacebar`]),x=e=>{v.has(e.key)&&_()};n.addEventListener(`scroll`,m,{passive:!0}),n.addEventListener(`wheel`,_,{passive:!0}),n.addEventListener(`touchmove`,_,{passive:!0}),n.addEventListener(`keydown`,x);let w=typeof ResizeObserver<`u`?new ResizeObserver(e=>{O.current=(e[0]==null?null:EM(e[0]))??wM(n,g),a()}):null;return w?.observe(n),()=>{D.current=()=>{},l(),n.removeEventListener(`scroll`,m),n.removeEventListener(`wheel`,_),n.removeEventListener(`touchmove`,_),n.removeEventListener(`keydown`,x),e!=null&&clearTimeout(e),d!=null&&clearTimeout(d),r!=null&&delete r.dataset.isScrolling,i!=null&&(delete i.dataset.isScrolling,delete i.dataset.overlayReveal),y.current=!1,O.current=null,w?.disconnect()}},[t,g,s,c,h]),Wj(()=>{ke||ce==null||_t(!1)},[_t,ke,ce]);let Rt=Kj(()=>ce==null?null:`${ce.path}::${ce.source}`,[ce]);Wj(()=>{if(Rt==null){m?.clearSlotContent(rT);return}let t=ue.current;if(t==null)return;let n=v.current??_.current;if(n==null)return;let r={anchorElement:n,anchorRect:t.anchorRect??FM(n.getBoundingClientRect()),close:e=>{gt.current(e?.restoreFocus??!0)},restoreFocus:()=>{ht.current&&mt.current(ue.current?.path??null)}},i=e?.contextMenu?.render?.(t.item,r)??null;return m?.setSlotContent(rT,i),e?.contextMenu?.onOpen?.(t.item,r),JM(i),queueMicrotask(()=>{i==null||!i.isConnected||document.activeElement===i&&JM(i)}),()=>{m?.clearSlotContent(rT)}},[Rt,e?.contextMenu,m]),Wj(()=>{ce!=null&&t.getItem(ce.path)==null&&_t()},[_t,ce,t]),Wj(()=>{if(ce==null)return;let e=S.current?.getRootNode(),t=e instanceof ShadowRoot?e.host:S.current,n=e=>{let n=e.target;n instanceof Node&&(PM(e)||_.current?.contains(n)!==!0&&t?.contains(n)!==!0&&_t())},r=e=>{e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),_t())};return document.addEventListener(`mousedown`,n,!0),document.addEventListener(`keydown`,r,!0),()=>{document.removeEventListener(`mousedown`,n,!0),document.removeEventListener(`keydown`,r,!0)}},[_t,ce]),Wj(()=>{let e=C.current,t=S.current;if(e==null||t==null){A.current=Ge;return}let n=Ge==null?null:T.current.get(Ge)??null,r=nM(t),i=r?.dataset.itemPath??null,a=He&&x.current===r,o=f&&w.current===r,c=M.current&&!Ue,l=N.current??0,u=de.current,d=fe.current,p=pe.current,m=me.current,h=r!=null,g=k.current||h,_=A.current!==Ge,v=d!=null&&d===Ge&&Ge!=null,y=c&&OM(e,Ke,s,rt,st,l),b=u!=null&&u===Ge&&OM(e,Ke,s,rt,st,ct),E=p!=null&&p.path===Ge&&OM(e,Ke,s,rt,st,p.viewportOffset),O=m!=null&&m.path===Ge&&e.scrollTop!==m.scrollTop;if(O&&(e.scrollTop=m.scrollTop),(O||b||E||y||g&&_&&u!==Ge&&!v&&DM(e,Ke,s,rt,ct))&&D.current(),!g){A.current=Ge;return}if(a){A.current=Ge;return}if(o&&!c){A.current=Ge;return}if(n==null){c&&Ke>=0&&(OM(e,Ke,s,rt,st,l),D.current()),A.current=Ge;return}(_||c||u===Ge||d===Ge||p?.path===Ge||m?.path===Ge||i==null||i!==Ge)&&(tM(n),u===Ge&&(de.current=null),d===Ge&&(fe.current=null),p?.path===Ge&&(pe.current=null),m?.path===Ge&&(me.current=null),M.current=!1,N.current=null),A.current=Ge},[t,Ke,Ge,ut,s,He,Ue,it,rt,f,ct,st,nt]);let zt=Ke>=0&&Ke>=tt.visible.startIndex&&Ke<=tt.visible.endIndex,Bt=Ge!=null&&at.some(e=>aM(e.row)===Ge),Vt=zt||Bt,Ht=je&&k.current===!0&&Vt?Ge:null,Ut=ae===`pointer`?re:null,Wt=ce?.path??he.current??Ut??Ht??re,Gt=ce?.source===`right-click`;Wj(()=>{y.current&&ce==null||vt(Le(Wt))},[ce,Le,it,rt,oe,at,Wt,vt,nt]);let Kt=qj(e=>{if(y.current||PM(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&&Y(e=>e===`pointer`?e:`pointer`),ie(e=>e===i?e:i)},[]),qt=qj(()=>{ie(null)},[]);Wj(()=>{if(!qe)return;let e=()=>{kt(),t.cancelDrag()};return window.addEventListener(`dragend`,e),()=>{window.removeEventListener(`dragend`,e),kt(),t.cancelDrag()}},[t,qe]);let Jt=e=>{if(!qe||t.getDragSession()==null||V.current)return;let n=hM(e.target instanceof HTMLElement?e.target:null);t.setDragTarget(n),jt(t.getDragSession()?.target??null),Nt(e.clientX,e.clientY),e.dataTransfer!=null&&(e.dataTransfer.dropEffect=`move`),e.preventDefault()},Yt=e=>{if(!qe||t.getDragSession()==null||V.current)return;let n=e.relatedTarget;n instanceof Node&&S.current?.contains(n)===!0||(Tt(),Dt(),t.setDragTarget(null))},Xt=e=>{!qe||t.getDragSession()==null||V.current||(e.preventDefault(),At(e.clientX,e.clientY),t.completeDrag(),Et(),Tt(),Dt(),z.current=null)},Zt=tt.window.height,Qt=tt.window.offsetTop,$t=Math.min(0,rt-Zt-ct),en=ne===Ge||M.current,tn=Ge!=null&&en&&!ut&&Ke>=0?nt[Ke]??t.getVisibleRows(Ke,Ke)[0]??null:null,nn=tn==null?null:kM(Ke,s,it,Zt),rn=z.current,an=Ze!=null&&rn!=null&&rn.path===Ze&&rn.index>=it.start&&rn.index<=it.end,on=Ze!=null&&rn!=null&&rn.path===Ze&&!an&&rn.path!==tn?.path?rn:null,sn=on==null?null:kM(on.index,s,it,Zt),cn=AM((Ke>=0?nt[Ke]??t.getVisibleRows(Ke,Ke)[0]??null:null)?.ancestorPaths.at(-1)??null),ln=Ue&&Ge!=null?GM(o,Ge,!ut):void 0,un=ce?.path??(Ue?Ge:ne),dn=ce?.path??re,fn=Le(Wt),pn=ke&&je&&!Gt&&!He&&fn!=null&&q!=null&&Wt!=null,mn=ke&&(pn||ce!=null),hn=ce?.anchorRect,gn=hn==null&&fn!=null&&q!=null&&(ce!=null||pn)?q:null,_n=hn==null?gn==null?void 0:{top:`${gn}px`}:{left:`${hn.left}px`,position:`fixed`,right:`auto`,top:`${hn.top}px`},vn=Gt?{opacity:`0`}:void 0,yn=qj((e,n,r,i)=>{let a=t.getItem(r),o=Cj({event:{ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey},isDirectory:n.kind===`directory`,isSearchOpen:t.isSearchOpen(),mode:i});switch(o.selection.kind){case`range`:t.selectPathRange(r,o.selection.additive);break;case`toggle`:t.togglePathSelectionFromInput(r);break;case`single`:t.selectOnlyPath(r);break}let s=e.currentTarget instanceof HTMLElement?e.currentTarget:null,c=n.index>=tt.visible.startIndex&&n.index<=tt.visible.endIndex,l=i===`flow`&&c&&s!=null&&s.dataset.itemParked!==`true`;a?.focus(),l&&(k.current=!0,K(e=>e===r?e:r),Y(`focus`)),o.toggleDirectory&&xM(a)&&a.toggle(),o.closeSearch&&t.closeSearch(),o.revealCanonical&&xt(r,{targetOffset:`sticky-parents`})},[t,tt.visible.endIndex,tt.visible.startIndex,xt]),bn=()=>{if(y.current||!je||Wt==null||fn==null)return;let e=t.getItem(Wt);e!=null&&(vt(fn),ht.current=!0,le({anchorRect:null,item:{kind:e.isDirectory()?`directory`:`file`,name:fn.getAttribute(`aria-label`)??Wt,path:e.getPath()},path:e.getPath(),source:`button`}))},xn={contextHoverPath:dn,contextMenuButtonTriggerEnabled:je,contextMenuButtonVisibility:Me,contextMenuEnabled:ke,contextMenuRightClickEnabled:Ne,contextMenuTriggerMode:Ae,controller:t,directoriesWithGitChanges:i,dragAndDropEnabled:qe,draggedPathSet:Ye,dragTarget:Xe,gitLaneActive:Re,gitStatusByPath:n,handleRowDragEnd:Ft,handleRowDragStart:Pt,handleRowTouchStart:It,ignoredGitDirectories:r,ignoredInheritanceCache:te,instanceId:o,itemHeight:s,onKeyDown:Lt,onRowClick:yn,openContextMenuForRow:yt,registerButton:Pe,registerRenameInput:Ie,renameView:Be,renderDecorationForRow:dt,resolveIcon:ze,shouldSuppressContextMenu:St,visualFocusPath:un},Sn={...xn,registerButton:Fe};return $(`div`,{ref:S,id:Qe,"data-file-tree-context-menu-button-visibility":ke&&je?Me:void 0,"data-file-tree-context-menu-trigger-mode":ke?Ae:void 0,"data-file-tree-has-context-menu-action-lane":ke&&je?`true`:void 0,"data-file-tree-has-git-lane":Re?`true`:void 0,"data-file-tree-virtualized-root":`true`,onDragLeave:qe?Yt:void 0,onDragOver:qe?Jt:void 0,onDrop:qe?Xt:void 0,onKeyDown:Lt,onPointerLeave:ke?qt:void 0,onPointerOver:ke?Kt:void 0,role:`tree`,tabIndex:-1,style:{outline:`none`,position:`relative`},children:[$(`style`,{"data-file-tree-guide-style":`true`,dangerouslySetInnerHTML:{__html:cn}}),$(`slot`,{name:nT,"data-type":`header-slot`}),f?$(`div`,{"data-file-tree-search-container":!0,"data-open":Ue?`true`:`false`,children:$(`input`,{ref:w,"aria-activedescendant":ln,"aria-controls":Qe,placeholder:`Search…`,"data-file-tree-search-input":!0,"data-file-tree-search-input-fake-focus":xe?`true`:void 0,value:We,onBlur:()=>{d===`retain`&&!Ce.current||t.closeSearch()},onFocus:we,onPointerDown:we,onInput:e=>{we();let n=e.currentTarget;t.setSearch(n.value)}})}):null,$(`div`,{ref:C,"data-file-tree-virtualized-scroll":`true`,children:[h&&De&&at.length>0?$(`div`,{"aria-hidden":`true`,"data-file-tree-sticky-overlay":`true`,children:$(`div`,{"data-file-tree-sticky-overlay-content":`true`,style:{height:`${$e}px`},children:at.map((e,t)=>XM(Sn,e.row,`sticky:${aM(e.row)}`,{mode:`sticky`,style:{left:`0`,position:`absolute`,right:`0`,top:`${e.top}px`,zIndex:`${at.length-t}`}}))})}):null,$(`div`,{ref:b,"data-file-tree-virtualized-list":`true`,style:{height:`${st}px`},children:[$(`div`,{"data-file-tree-virtualized-sticky-offset":`true`,"aria-hidden":`true`,style:{height:`${Qt}px`}}),$(`div`,{"data-file-tree-virtualized-sticky":`true`,style:{height:`${Zt}px`,top:`${$t}px`,bottom:`${$t}px`},children:[ZM(xn,it,lt),tn!=null&&nn!=null?XM(xn,tn,`parked:${tn.path}`,{isParked:!0,style:{left:`0`,opacity:`0`,pointerEvents:Ze===tn.path?`none`:void 0,position:`absolute`,right:`0`,top:`${nn}px`}}):null,on!=null&&sn!=null?XM(xn,on,`parked-drag:${on.path}`,{isParked:!0,style:{left:`0`,opacity:`0`,pointerEvents:`none`,position:`absolute`,right:`0`,top:`${sn}px`}}):null]})]})]}),ke?$(`div`,{ref:_,"data-type":`context-menu-anchor`,"data-visible":mn?`true`:`false`,style:_n,children:[$(`button`,{ref:v,type:`button`,"data-type":iT,"aria-label":`Options`,"aria-haspopup":`menu`,"aria-expanded":ce==null?`false`:`true`,"data-visible":pn?`true`:`false`,onMouseDown:e=>{e.preventDefault()},onClick:e=>{if(e.preventDefault(),e.stopPropagation(),ce!=null){_t();return}bn()},tabIndex:-1,style:vn,children:$(qA,{...ze(`file-tree-icon-ellipsis`)})}),ce==null?null:$(`slot`,{name:rT})]}):null,ce==null?null:$(`div`,{"data-type":`context-menu-wash`,"aria-hidden":`true`,onMouseDownCapture:e=>{e.preventDefault(),_t()},onTouchStartCapture:e=>{e.preventDefault(),e.stopPropagation(),_t()},onTouchMoveCapture:e=>{e.preventDefault(),e.stopPropagation()},onWheelCapture:e=>{e.preventDefault(),e.stopPropagation()}})]})}var $M={hydrateRoot:(e,t)=>{HA(vA(QM,t),e)},renderRoot:(e,t)=>{VA(vA(QM,t),e)},unmountRoot:e=>{VA(null,e)}};function eN(e,t){$M.renderRoot(e,t)}function tN(e,t){$M.hydrateRoot(e,t)}function nN(e){$M.unmountRoot(e)}var rN=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)}}},iN=`__c`,aN=`__k`,oN=`__d`,sN=`__s`,cN=/[\s\n\\/='"\0<>]/,lN=/^(xlink|xmlns|xml)([A-Z])/,uN=/^(?:accessK|auto[A-Z]|cell|ch|col|cont|cross|dateT|encT|form[A-Z]|frame|hrefL|inputM|maxL|minL|noV|playsI|popoverT|readO|rowS|src[A-Z]|tabI|useM|item[A-Z])/,dN=/^ac|^ali|arabic|basel|cap|clipPath$|clipRule$|color|dominant|enable|fill|flood|font|glyph[^R]|horiz|image|letter|lighting|marker[^WUH]|overline|panose|pointe|paint|rendering|shape|stop|strikethrough|stroke|text[^L]|transform|underline|unicode|units|^v[^i]|^w|^xH/,fN=new Set([`draggable`,`spellcheck`]);function pN(e){e.__g===void 0?e[oN]=!0:e.__g|=8}function mN(e){e.__g===void 0?e[oN]=!1:e.__g&=-9}function hN(e){return e.__g===void 0?!0===e[oN]:!!(8&e.__g)}var gN=/["&<]/;function _N(e){if(e.length===0||!1===gN.test(e))return e;for(var t=0,n=0,r=``,i=``;n<e.length;n++){switch(e.charCodeAt(n)){case 34:i=`"`;break;case 38:i=`&`;break;case 60:i=`<`;break;default:continue}n!==t&&(r+=e.slice(t,n)),r+=i,t=n+1}return n!==t&&(r+=e.slice(t,n)),r}var vN={},yN=new Set(`animation-iteration-count.border-image-outset.border-image-slice.border-image-width.box-flex.box-flex-group.box-ordinal-group.column-count.fill-opacity.flex.flex-grow.flex-negative.flex-order.flex-positive.flex-shrink.flood-opacity.font-weight.grid-column.grid-row.line-clamp.line-height.opacity.order.orphans.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-miterlimit.stroke-opacity.stroke-width.tab-size.widows.z-index.zoom`.split(`.`)),bN=/[A-Z]/g;function xN(e){var t=``;for(var n in e){var r=e[n];if(r!=null&&r!==``){var i=n[0]==`-`?n:vN[n]||(vN[n]=n.replace(bN,`-$&`).toLowerCase()),a=`;`;typeof r!=`number`||i.startsWith(`--`)||yN.has(i)||(a=`px;`),t=t+i+`:`+r+a}}return t||void 0}function SN(){this.__d=!0}function CN(e,t){return{__v:e,context:t,props:e.props,setState:SN,forceUpdate:SN,__d:!0,__h:[]}}function wN(e,t,n){if(!e.s){if(n instanceof TN){if(!n.s)return void(n.o=wN.bind(null,e,t));1&t&&(t=n.s),n=n.v}if(n&&n.then)return void n.then(wN.bind(null,e,t),wN.bind(null,e,2));e.s=t,e.v=n;let r=e.o;r&&r(e)}}var TN=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{wN(r,1,a(this.v))}catch(e){wN(r,2,e)}return r}return this}return this.o=function(e){try{var i=e.v;1&e.s?wN(r,1,t?t(i):i):n?wN(r,1,n(i)):wN(r,2,i)}catch(e){wN(r,2,e)}},r},e}(),EN,DN,ON,kN,AN={},jN=Array.isArray,MN=Object.assign,NN=``,PN=`<!--$s-->`,FN=`<!--/$s-->`;function IN(e,t){var n,r=e.type,i=!0;return e[iN]?(i=!1,(n=e[iN]).state=n[sN]):n=new r(e.props,t),e[iN]=n,n.__v=e,n.props=e.props,n.context=t,pN(n),n.state??=AN,n[sN]??(n[sN]=n.state),r.getDerivedStateFromProps?n.state=MN({},n.state,r.getDerivedStateFromProps(n.props,n.state)):i&&n.componentWillMount?(n.componentWillMount(),n.state=n[sN]===n.state?n.state:n[sN]):!i&&n.componentWillUpdate&&n.componentWillUpdate(),ON&&ON(e),n.render(n.props,n.state,t)}function LN(e,t,n,r,i,a,o){if(e==null||!0===e||!1===e||e===NN)return NN;var s=typeof e;if(s!=`object`)return s==`function`?NN:s==`string`?_N(e):e+NN;if(jN(e)){var c,l=NN;i[aN]=e;for(var u=e.length,d=0;d<u;d++){var f=e[d];if(f!=null&&typeof f!=`boolean`){var p,m=LN(f,t,n,r,i,a,o);typeof m==`string`?l+=m:(c||=Array(u),l&&c.push(l),l=NN,jN(m)?(p=c).push.apply(p,m):c.push(m))}}return c?(l&&c.push(l),c):l}if(e.constructor!==void 0)return NN;e.__=i,EN&&EN(e);var h=e.type,g=e.props;if(typeof h==`function`){var _,v,y,b=t;if(h===bA){if(`tpl`in g){for(var x=NN,S=0;S<g.tpl.length;S++)if(x+=g.tpl[S],g.exprs&&S<g.exprs.length){var C=g.exprs[S];if(C==null)continue;typeof C!=`object`||C.constructor!==void 0&&!jN(C)?x+=C:x+=LN(C,t,n,r,e,a,o)}return x}if(`UNSTABLE_comment`in g)return`<!--`+_N(g.UNSTABLE_comment)+`-->`;v=g.children}else{if((_=h.contextType)!=null){var w=t[_.__c];b=w?w.props.value:_.__}var T=h.prototype&&typeof h.prototype.render==`function`;if(T)v=IN(e,b),y=e[iN];else{e[iN]=y=CN(e,b);for(var E=0;hN(y)&&E++<25;){mN(y),ON&&ON(e);try{v=h.call(y,g,b)}catch(t){throw a&&t&&typeof t.then==`function`&&(e._suspended=!0),t}}pN(y)}if(y.getChildContext!=null&&(t=MN({},t,y.getChildContext())),T&&nA.errorBoundaries&&(h.getDerivedStateFromError||y.componentDidCatch)){v=v!=null&&v.type===bA&&v.key==null&&v.props.tpl==null?v.props.children:v;try{return LN(v,t,n,r,e,a,!1)}catch(i){return h.getDerivedStateFromError&&(y[sN]=h.getDerivedStateFromError(i)),y.componentDidCatch&&y.componentDidCatch(i,AN),hN(y)?(v=IN(e,t),(y=e[iN]).getChildContext!=null&&(t=MN({},t,y.getChildContext())),LN(v=v!=null&&v.type===bA&&v.key==null&&v.props.tpl==null?v.props.children:v,t,n,r,e,a,o)):NN}finally{DN&&DN(e),kN&&kN(e)}}}v=v!=null&&v.type===bA&&v.key==null&&v.props.tpl==null?v.props.children:v;try{var D=LN(v,t,n,r,e,a,o);return DN&&DN(e),nA.unmount&&nA.unmount(e),e._suspended?typeof D==`string`?PN+D+FN:jN(D)?(D.unshift(PN),D.push(FN),D):D.then(function(e){return PN+e+FN}):D}catch(i){if(!a&&o&&o.onError){var O=function i(s){return o.onError(s,e,function(e,s){try{return LN(e,t,n,r,s,a,o)}catch(e){return i(e)}})}(i);if(O!==void 0)return O;var k=nA.__e;return k&&k(i,e),NN}if(!a||!i||typeof i.then!=`function`)throw i;return i.then(function i(){try{var s=LN(v,t,n,r,e,a,o);return e._suspended?PN+s+FN:s}catch(e){if(!e||typeof e.then!=`function`)throw e;return e.then(i)}})}}var A,j=`<`+h,M=NN;for(var N in g){var P=g[N];if(typeof(P=zN(P)?P.value:P)!=`function`||N===`class`||N===`className`){switch(N){case`children`:A=P;continue;case`key`:case`ref`:case`__self`:case`__source`:continue;case`htmlFor`:if(`for`in g)continue;N=`for`;break;case`className`:if(`class`in g)continue;N=`class`;break;case`defaultChecked`:N=`checked`;break;case`defaultSelected`:N=`selected`;break;case`defaultValue`:case`value`:switch(N=`value`,h){case`textarea`:A=P;continue;case`select`:r=P;continue;case`option`:r!=P||`selected`in g||(j+=` selected`)}break;case`dangerouslySetInnerHTML`:M=P&&P.__html;continue;case`style`:typeof P==`object`&&(P=xN(P));break;case`acceptCharset`:N=`accept-charset`;break;case`httpEquiv`:N=`http-equiv`;break;default:if(lN.test(N))N=N.replace(lN,`$1:$2`).toLowerCase();else{if(cN.test(N))continue;N[4]!==`-`&&!fN.has(N)||P==null?n?dN.test(N)&&(N=N===`panose1`?`panose-1`:N.replace(/([A-Z])/g,`-$1`).toLowerCase()):uN.test(N)&&(N=N.toLowerCase()):P+=NN}}P!=null&&!1!==P&&(j=!0===P||P===NN?j+` `+N:j+` `+N+`="`+(typeof P==`string`?_N(P):P+NN)+`"`)}}if(cN.test(h))throw Error(h+` is not a valid HTML tag name in `+j+`>`);if(M||(typeof A==`string`?M=_N(A):A!=null&&!1!==A&&!0!==A&&(M=LN(A,t,h===`svg`||h!==`foreignObject`&&n,r,e,a,o))),DN&&DN(e),kN&&kN(e),!M&&RN.has(h))return j+`/>`;var F=`</`+h+`>`,I=j+`>`;return jN(M)?[I].concat(M,[F]):typeof M==`string`?I+M+F:[I,M,F]}var RN=new Set([`area`,`base`,`br`,`col`,`command`,`embed`,`hr`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`]);function zN(e){return typeof e==`object`&&!!e&&typeof e.peek==`function`&&`value`in e}var BN=0;function VN(e){return e!=null&&e.length>0?e:(BN+=1,`pst_ft_${BN}`)}function HN({initialVisibleRowCount:e,itemHeight:t}){return e==null?420:Math.max(0,e)*(t??ek)}function UN(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 WN(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 GN(e){return Array.from(e.children).filter(e=>e instanceof SVGElement)}var KN=class{static LoadedCustomComponent=!0;#e;#t;#n;#r;#i;#a;#o;#s;#c;#l=new rN;#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=VN(a),this.#p=tA(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=$O(n,c),this.#d={itemHeight:this.#u.itemHeight,overscan:d,stickyFolders:_,initialVisibleRowCount:y},this.#t=new Xk({...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&&(nN(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()}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)}focusNearestPath(e){return this.#t.focusNearestPath(e)}add(e){this.#t.add(e)}batch(e){this.#t.batch(e)}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){this.#t.resetPaths(e,t)}setComposition(e){this.#e=e;let t=this.#T();t!=null&&(this.#O(),eN(t.wrapper,this.#w()))}setGitStatus(e){this.#p=tA(e,this.#p);let t=this.#T();t!=null&&eN(t.wrapper,this.#w())}setIcons(e){this.#m=e;let t=this.#T();t!=null&&(this.#E(t.host,t.wrapper),eN(t.wrapper,this.#w()))}hydrate({fileTreeContainer:e}){let t=this.#P(e),n=this.#N(t);this.#O(),tN(n,this.#w())}render({containerWrapper:e,fileTreeContainer:t}){let n=this.#P(t??this.#f,e),r=this.#N(n);this.#O(),eN(r,this.#w())}#C(){return{initialViewportHeight:HN({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(nT,e());return}this.#l.setSlotHtml(nT,this.#e?.header?.html??null)}#k(e){let t=GN(e).find(e=>WN(e)),n=UN(Kw(oT(this.#m).set));n!=null&&(t!=null&&t.outerHTML===n.outerHTML||(t==null?e.prepend(n):t.replaceWith(n)))}#A(e){let t=GN(e),n=t.find(e=>WN(e)),r=t.filter(e=>e!==n),i=oT(this.#m).spriteSheet?.trim()??``;if(i.length===0){for(let e of r)e.remove();return}let a=UN(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=oT(this.#m);t.colored&&Jw(t.set)?e.dataset.fileTreeColoredIcons=`true`:delete e.dataset.fileTreeColoredIcons}#M(e){let t=e.querySelector(`style[${Qw}]`);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(Qw,``),this.#g.parentNode!==e&&e.appendChild(this.#g),this.#g.textContent=ik(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 uk(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)}},qN=typeof window>`u`?Z.useEffect:Z.useLayoutEffect;function JN(e,t,n){let r=e==null?null:(0,X.jsx)(`div`,{slot:nT,children:e}),i=t!=null&&n!=null?(0,X.jsx)(`div`,{slot:rT,children:t(n.item,n.context)}):null;return r==null&&i==null?null:(0,X.jsxs)(X.Fragment,{children:[r,i]})}function YN(e,t){return typeof window>`u`&&t!=null?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`template`,{shadowrootmode:`open`,dangerouslySetInnerHTML:{__html:t.shadowHtml}}),e]}):(0,X.jsx)(X.Fragment,{children:e})}function XN(e){let t=e.shadowRoot;return t?.querySelector(`[data-file-tree-id]`)instanceof HTMLElement||t?.querySelector(`[data-file-tree-id]`)instanceof SVGElement?!0:e.querySelector(`template[shadowrootmode="open"]`)instanceof HTMLTemplateElement}function ZN(e,t,n,r,i){let a={...e??{}};if(t!=null&&delete a.header,n){let t=e?.contextMenu,n=t?.onClose,o=t?.onOpen;a.contextMenu={...t??{},enabled:!0,onClose:()=>{n?.(),r()},onOpen:(e,t)=>{i(e,t),o?.(e,t)}},delete a.contextMenu.render}return a.header!=null||a.contextMenu!=null?a:void 0}function QN({header:e,id:t,model:n,preloadedData:r,renderContextMenu:i,...a}){let[o,s]=(0,Z.useState)(null),[c,l]=(0,Z.useState)(null),u=(0,Z.useRef)(n.getComposition()),d=(0,Z.useRef)(n);d.current!==n&&(d.current=n,u.current=n.getComposition());let f=i!=null,p=(0,Z.useCallback)(()=>{s(null)},[]),m=(0,Z.useCallback)((e,t)=>{s({context:t,item:e})},[]),h=u.current,g=(0,Z.useMemo)(()=>ZN(h,e,f,p,m),[h,p,m,f,e]),_=(0,Z.useCallback)(e=>{l(e)},[]);(0,Z.useEffect)(()=>{f||s(null)},[f]),qN(()=>{n.setComposition(g)},[g,n]),qN(()=>{if(c!=null)return r!=null&&XN(c)?n.hydrate({fileTreeContainer:c}):n.render({fileTreeContainer:c}),()=>{n.unmount(),n.setComposition(h)}},[h,c,n,r]);let v=YN(JN(e,i,o),r),y=t??r?.id,b={"--trees-item-height":`${String(n.getItemHeight())}px`,"--trees-density-override":n.getDensityFactor(),...a.style};return(0,X.jsx)(Xw,{...a,id:y,ref:_,style:b,suppressHydrationWarning:r!=null,children:v})}function $N(e){let t=(0,Z.useRef)(null);return t.current??=new KN(e),(0,Z.useEffect)(()=>{let e=t.current;return()=>{e?.cleanUp(),t.current=null}},[]),{model:t.current}}function eP(e){let t=(0,Q.c)(22),{itemName:n,isSubmitting:r,onDelete:i,customTitle:a,customDescription:o,children:s}=e,c=n===void 0?`this item`:n,l=a??`Delete ${c}`,u;t[0]===l?u=t[1]:(u=(0,X.jsx)(Ft,{children:l}),t[0]=l,t[1]=u);let d=o??`Are you sure you want to delete ${c}? This action cannot be undone.`,f;t[2]===d?f=t[3]:(f=(0,X.jsx)(Nt,{className:`whitespace-pre-wrap`,children:d}),t[2]=d,t[3]=f);let p;t[4]===s?p=t[5]:(p=s?(0,X.jsx)(Ht,{children:s}):null,t[4]=s,t[5]=p);let m;t[6]===r?m=t[7]:(m=(0,X.jsx)(Gt,{asChild:!0,children:(0,X.jsx)(q,{variant:`outline`,disabled:r,children:`Cancel`})}),t[6]=r,t[7]=m);let h;t[8]===r?h=t[9]:(h=r?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(lt,{className:`size-4 animate-spin`}),` Deleting...`]}):`Delete`,t[8]=r,t[9]=h);let g;t[10]!==r||t[11]!==i||t[12]!==h?(g=(0,X.jsx)(q,{variant:`destructive`,onClick:i,disabled:r,children:h}),t[10]=r,t[11]=i,t[12]=h,t[13]=g):g=t[13];let _;t[14]!==m||t[15]!==g?(_=(0,X.jsxs)(Ut,{children:[m,g]}),t[14]=m,t[15]=g,t[16]=_):_=t[16];let v;return t[17]!==_||t[18]!==u||t[19]!==f||t[20]!==p?(v=(0,X.jsxs)(zt,{children:[u,f,p,_]}),t[17]=_,t[18]=u,t[19]=f,t[20]=p,t[21]=v):v=t[21],v}var tP=`.md`;function nP(e){return`${e}${tP}`}function rP(e){return yP(e).replace(/\.md$/i,``)}function iP(e){return yP(e)}function aP(e){let t=yP(e.trim());return t?`${t}/`:``}function oP(e){return e.endsWith(`/`)?iP(e):rP(e)}function sP(e){return e.map(e=>nP(e.docName))}function cP(e){return[...e].sort().join(`\0`)}function lP(e){return cP(sP(e))}function uP(e){let t=new Set;for(let n of e){let e=n.docName.split(`/`).filter(Boolean);for(let n=1;n<e.length;n++)t.add(`${e.slice(0,n).join(`/`)}/`)}return[...t].sort()}function dP(e){if(!e)return[];let t=yP(e.replace(/\.md$/i,``)).split(`/`).filter(Boolean),n=[],r=e.endsWith(`/`)?t.length:t.length-1;for(let e=1;e<=r;e++)n.push(`${t.slice(0,e).join(`/`)}/`);return n}function fP(e){let t=e.kind===`directory`,n=t?iP(e.path):rP(e.path);return{kind:t?`folder`:`file`,name:yP(vP(e.path)).replace(/\.md$/i,``),path:n,treePath:mP(e.path,t)}}function pP(e){return e.kind===`directory`?iP(e.path):e.path}function mP(e,t){return t?aP(e):e.endsWith(tP)?e:`${e}${tP}`}function hP(e,t,n){let r=aP(t),i=new Set(n);for(let t=0;t<100;t++){let n=t===0?``:` ${t+1}`;if(e===`file`){let e=`${r}Untitled${n}${tP}`;if(!i.has(e))return{addPath:e,renamePath:e};continue}let a=`${r}New Folder${n}/`,o=`${a}index${tP}`;if(!i.has(o)&&!i.has(a))return{addPath:o,renamePath:a}}throw Error(`Could not allocate a unique tree placeholder`)}function gP(e,t){return e===`file`?mP(t,!1):`${iP(t)}/index${tP}`}function _P(e,t){return t.kind===`root`||t.directoryPath==null?vP(e):`${t.directoryPath}${vP(e)}`}function vP(e){let t=yP(e),n=t.lastIndexOf(`/`),r=n===-1?t:t.slice(n+1);return e.endsWith(`/`)?`${r}/`:r}function yP(e){return e.endsWith(`/`)?e.slice(0,-1):e}function bP(e,t){if(!e)return{selectedFilePath:t,selectedFolderPath:null,navigationPath:t};switch(e.kind){case`doc`:return{selectedFilePath:e.docName,selectedFolderPath:null,navigationPath:e.docName};case`folder`:case`folder-index`:return{selectedFilePath:null,selectedFolderPath:e.folderPath,navigationPath:e.folderPath};case`missing`:return{selectedFilePath:null,selectedFolderPath:null,navigationPath:null}}}function xP(e){let t=!1,n=!1,r=!1;async function i(){if(!r){t=!0;try{await e()}finally{t=!1,r?n=!1:n&&(n=!1,i())}}}return{request(){if(!r){if(t){n=!0;return}i()}},dispose(){r=!0,n=!1}}}function SP(e,t,n,r){return e.id===`cursor`&&!n?`Desktop only`:t.installed===null?`Detecting…`:t.installed===!1?`Not installed`:r?`No workspace`:null}function CP(e){let t=(0,Q.c)(8),{input:n,installStates:r,isElectronHost:i,dispatch:a}=e,o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,X.jsxs)(Sy,{children:[(0,X.jsx)(ve,{"aria-hidden":`true`}),`Open in…`]}),t[0]=o):o=t[0];let s;t[1]!==a||t[2]!==n||t[3]!==r||t[4]!==i?(s=Ed.map(e=>{let t=r[e.id],o=oC({target:e,installState:t,isElectronHost:i}),s=n===null,c=o.enabled&&!s,l=SP(e,t,i,s),u=l?`Open in ${e.displayName}, ${l}`:`Open in ${e.displayName}`;return(0,X.jsxs)(gy,{disabled:!c,onSelect:()=>{!c||!n||a(e.id,n)},"data-testid":`file-tree-open-in-${e.id}`,"aria-label":u,children:[(0,X.jsx)(rC,{id:e.id,"aria-hidden":`true`}),(0,X.jsx)(`span`,{className:`flex-1`,children:e.displayName}),l?(0,X.jsx)(`span`,{"aria-hidden":`true`,className:`ml-2 text-muted-foreground text-xs`,children:l}):null]},e.id)}),t[1]=a,t[2]=n,t[3]=r,t[4]=i,t[5]=s):s=t[5];let c;return t[6]===s?c=t[7]:(c=(0,X.jsxs)(xy,{children:[o,(0,X.jsx)(Cy,{children:s})]}),t[6]=s,t[7]=c),c}var wP=80,TP=3,EP=20,DP=new Map,OP=new Set,kP=[],AP=new Map;function jP(e){for(AP.delete(e),AP.set(e,!0);AP.size>EP;){let e=AP.keys().next().value;if(e===void 0)break;AP.delete(e)}}function MP(e){OP.delete(e),NP()}function NP(){for(;OP.size<TP&&kP.length>0;){let e=kP.shift();if(!e)break;if(!AP.has(e.docName)){OP.add(e.docName),jP(e.docName);try{e.prewarm(e.docName)}catch(t){Ye(`ok/sidebar/prewarm-failed`,{docName:e.docName,message:t instanceof Error?t.message:String(t)})}finally{MP(e.docName)}}}}function PP(e,t){if(tt(e)||AP.has(e))return;let n=DP.get(e);n&&clearTimeout(n.timer);let r=setTimeout(()=>{if(DP.delete(e),OP.size>=TP){kP.push({docName:e,prewarm:t});return}jP(e),OP.add(e);try{t(e)}catch(t){Ye(`ok/sidebar/prewarm-failed`,{docName:e,message:t instanceof Error?t.message:String(t)})}finally{MP(e)}},wP);DP.set(e,{timer:r,prewarm:t})}function FP(e){let t=DP.get(e);t&&(clearTimeout(t.timer),DP.delete(e))}function IP(e){window.location.hash=zn(e)}async function LP(e,t){try{await navigator.clipboard.writeText(e),Xt.success(`Copied ${t}`,{description:e})}catch(e){console.warn(`[FileTree] clipboard write failed:`,e),Xt.error(`Could not copy ${t}`)}}var RP=new Set([`agents`,`agent`,`claude`,`skill`]),zP=`ok-file-tree-link-decoration`,BP=`ok-file-tree-agent-decoration`;function VP(e){return e.map(([e,{key:t,...n}])=>`<${e} ${Object.entries(n).map(([e,t])=>`${e}="${t}"`).join(` `)} />`).join(``)}function HP(e,t){return`<symbol id="${e}" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">${VP(t)}</symbol>`}var UP=`<svg data-icon-sprite aria-hidden="true" width="0" height="0">
|
|
1841
|
-
${HP(zP,Ri)}
|
|
1842
|
-
${HP(BP,ai)}
|
|
1843
|
-
</svg>`;function WP(e){return{..._T({type:e===`dark`?`dark`:`light`,colors:{"sideBar.background":`var(--sidebar)`,"sideBar.foreground":`var(--sidebar-foreground)`,"sideBar.border":`var(--sidebar-border)`,"list.activeSelectionBackground":`var(--sidebar-accent)`,"list.activeSelectionForeground":`var(--sidebar-accent-foreground)`,"list.hoverBackground":`var(--sidebar-hover)`,focusBorder:`var(--color-primary)`,"input.background":`var(--input)`,"input.border":`var(--border)`}}),"--trees-font-family-override":`var(--font-sans)`,"--trees-font-size-override":`0.875rem`,"--trees-item-padding-x-override":`0.5rem`,"--trees-padding-inline-override":`0.5rem`,"--trees-border-radius-override":`0.375rem`,"--trees-selected-fg":`var(--color-primary)`,"--truncate-marker-fade-in-duration":`0s`}}function GP(e){let t=e.split(`/`).pop()?.replace(/\.md$/i,``).toLowerCase();return!!t&&RP.has(t)}function KP(e){return e===`darwin`?`Reveal in Finder`:e===`win32`?`Reveal in File Explorer`:`Open Containing Folder`}function qP(e){let t=(0,Q.c)(14),{item:n,workspace:r,onClose:i}=e,a=typeof window<`u`?window.okDesktop:void 0;if(!a)return null;let o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=KP(a.platform),t[0]=o):o=t[0];let s=o,c=r?null:`No workspace`,l=!r,u;t[1]!==n||t[2]!==i||t[3]!==r?(u=()=>{if(!r)return;i();let e=Vd(r.contentDir,pP(n),r.pathSeparator);a.shell.showItemInFolder(e)},t[1]=n,t[2]=i,t[3]=r,t[4]=u):u=t[4];let d=c?`${s}, ${c}`:s,f,p;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,X.jsx)(rt,{"aria-hidden":`true`}),p=(0,X.jsx)(`span`,{className:`flex-1`,children:s}),t[5]=f,t[6]=p):(f=t[5],p=t[6]);let m;t[7]===c?m=t[8]:(m=c?(0,X.jsx)(`span`,{"aria-hidden":`true`,className:`ml-2 text-muted-foreground text-xs`,children:c}):null,t[7]=c,t[8]=m);let h;return t[9]!==l||t[10]!==u||t[11]!==d||t[12]!==m?(h=(0,X.jsxs)(gy,{disabled:l,onSelect:u,"aria-label":d,children:[f,p,m]}),t[9]=l,t[10]=u,t[11]=d,t[12]=m,t[13]=h):h=t[13],h}function JP(e){return e?.isDirectory()?e:null}function YP(e){let t=(0,Q.c)(72),{item:n,context:r,anyActionBusy:i,workspace:a,handoff:o,model:s,onStartCreating:c,onDelete:l,onExpandSubtree:u,onCollapseSubtree:d}=e,f;t[0]===n?f=t[1]:(f=fP(n),t[0]=n,t[1]=f);let p=f,m=n.kind===`directory`,h;t[2]!==m||t[3]!==n.path||t[4]!==a?(h=m?null:Ud({docName:rP(n.path),workspace:a}),t[2]=m,t[3]=n.path,t[4]=a,t[5]=h):h=t[5];let g=h,_;t[6]===r?_=t[7]:(_=()=>r.close({restoreFocus:!1}),t[6]=r,t[7]=_);let v=_,y;t[8]===r?y=t[9]:(y=()=>r.close(),t[8]=r,t[9]=y);let b=y,x;t[10]===b?x=t[11]:(x=e=>{e||b()},t[10]=b,t[11]=x);let S;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,X.jsx)(my,{asChild:!0,children:(0,X.jsx)(`span`,{"aria-hidden":`true`,"data-file-tree-context-menu-root":`true`,className:`block size-px`})}),t[12]=S):S=t[12];let C;t[13]!==i||t[14]!==b||t[15]!==v||t[16]!==m||t[17]!==n.path||t[18]!==d||t[19]!==u||t[20]!==c?(C=m?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(gy,{disabled:i,onSelect:()=>{v(),c(`file`,iP(n.path))},children:[(0,X.jsx)(la,{"aria-hidden":`true`}),`New File`]}),(0,X.jsxs)(gy,{disabled:i,onSelect:()=>{v(),c(`folder`,iP(n.path))},children:[(0,X.jsx)(Oi,{"aria-hidden":`true`}),`New Folder`]}),(0,X.jsx)(by,{}),(0,X.jsxs)(gy,{onSelect:()=>{b(),u(n.path)},children:[(0,X.jsx)(ga,{"aria-hidden":`true`}),`Expand All`]}),(0,X.jsxs)(gy,{onSelect:()=>{b(),d(n.path)},children:[(0,X.jsx)(Di,{"aria-hidden":`true`}),`Collapse All`]}),(0,X.jsx)(by,{})]}):null,t[13]=i,t[14]=b,t[15]=v,t[16]=m,t[17]=n.path,t[18]=d,t[19]=u,t[20]=c,t[21]=C):C=t[21];let w;t[22]!==v||t[23]!==n.path||t[24]!==s?(w=()=>{v(),s.startRenaming(n.path)},t[22]=v,t[23]=n.path,t[24]=s,t[25]=w):w=t[25];let T;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,X.jsx)(Qe,{"aria-hidden":`true`}),t[26]=T):T=t[26];let E;t[27]!==i||t[28]!==w?(E=(0,X.jsxs)(gy,{disabled:i,onSelect:w,children:[T,`Rename`]}),t[27]=i,t[28]=w,t[29]=E):E=t[29];let D;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,X.jsxs)(Sy,{children:[(0,X.jsx)(_i,{"aria-hidden":`true`}),`Copy Path`]}),t[30]=D):D=t[30];let O=!a,k;t[31]!==b||t[32]!==n||t[33]!==a?(k=()=>{a&&(b(),LP(Vd(a.contentDir,pP(n),a.pathSeparator),`full path`))},t[31]=b,t[32]=n,t[33]=a,t[34]=k):k=t[34];let A;t[35]!==O||t[36]!==k?(A=(0,X.jsx)(gy,{disabled:O,onSelect:k,children:`Full Path`}),t[35]=O,t[36]=k,t[37]=A):A=t[37];let j;t[38]!==b||t[39]!==n?(j=(0,X.jsx)(gy,{onSelect:()=>{b(),LP(pP(n),`relative path`)},children:`Relative Path`}),t[38]=b,t[39]=n,t[40]=j):j=t[40];let M;t[41]!==A||t[42]!==j?(M=(0,X.jsxs)(xy,{children:[D,(0,X.jsxs)(Cy,{children:[A,j]})]}),t[41]=A,t[42]=j,t[43]=M):M=t[43];let N;t[44]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,X.jsx)(by,{}),t[44]=N):N=t[44];let P;t[45]!==b||t[46]!==n||t[47]!==a?(P=(0,X.jsx)(qP,{item:n,workspace:a,onClose:b}),t[45]=b,t[46]=n,t[47]=a,t[48]=P):P=t[48];let F;t[49]!==o||t[50]!==g||t[51]!==m?(F=!m&&(0,X.jsx)(CP,{input:g,installStates:o.installStates,isElectronHost:o.isElectronHost,dispatch:o.dispatch}),t[49]=o,t[50]=g,t[51]=m,t[52]=F):F=t[52];let I;t[53]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,X.jsx)(by,{}),t[53]=I):I=t[53];let L;t[54]!==b||t[55]!==l||t[56]!==p?(L=()=>{b(),l(p)},t[54]=b,t[55]=l,t[56]=p,t[57]=L):L=t[57];let R;t[58]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,X.jsx)(ht,{"aria-hidden":`true`}),t[58]=R):R=t[58];let z;t[59]!==i||t[60]!==L?(z=(0,X.jsxs)(gy,{variant:`destructive`,disabled:i,onSelect:L,children:[R,`Delete`]}),t[59]=i,t[60]=L,t[61]=z):z=t[61];let B;t[62]!==E||t[63]!==M||t[64]!==P||t[65]!==F||t[66]!==z||t[67]!==C?(B=(0,X.jsxs)(hy,{sideOffset:0,align:`start`,"data-file-tree-context-menu-root":`true`,className:`min-w-52`,children:[C,E,M,N,P,F,I,z]}),t[62]=E,t[63]=M,t[64]=P,t[65]=F,t[66]=z,t[67]=C,t[68]=B):B=t[68];let V;return t[69]!==B||t[70]!==x?(V=(0,X.jsxs)(py,{open:!0,modal:!1,onOpenChange:x,children:[S,B]}),t[69]=B,t[70]=x,t[71]=V):V=t[71],V}function XP(e){let t=(0,Q.c)(105),{ref:n}=e,{activeDocName:r,activeTarget:i,closeDocument:a,prewarm:o}=ft(),{notifySidebarFileSelected:s}=rS(),{resolvedTheme:c}=T(),l;t[0]===s?l=t[1]:(l=function(e){IP(e),s()},t[0]=s,t[1]=l);let u=l,d;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(d=[],t[2]=d):d=t[2];let[f,p]=(0,Z.useState)(d),[m,h]=(0,Z.useState)(!0),[g,_]=(0,Z.useState)(null),[v,y]=(0,Z.useState)(null),[b,x]=(0,Z.useState)(null),[S,C]=(0,Z.useState)(null),w=(0,Z.useRef)(f),E=(0,Z.useRef)(r),D;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(D=[],t[3]=D):D=t[3];let O=(0,Z.useRef)(D),k=(0,Z.useRef)(null),A=(0,Z.useRef)(null),j=(0,Z.useRef)(null),M=(0,Z.useRef)(!1),N=(0,Z.useRef)(null),P=(0,Z.useRef)(aF),F=(0,Z.useRef)(iF),I=(0,Z.useRef)(rF),{selectedFilePath:L,selectedFolderPath:R,navigationPath:z}=bP(i,r),B=L?nP(L):R?aP(R):null,V=uf().states,{dispatch:H}=Qd(),U;t[4]!==H||t[5]!==V?(U={installStates:V,isElectronHost:typeof window<`u`&&window.okDesktop!=null,dispatch:H},t[4]=H,t[5]=V,t[6]=U):U=t[6];let ee=U,W;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(W=[],t[7]=W):W=t[7];let te;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(te={paths:W,flattenEmptyDirectories:!1,initialExpansion:`closed`,search:!0,searchBlurBehavior:`retain`,fileTreeSearchMode:`hide-non-matches`,initialVisibleRowCount:18,stickyFolders:!0,icons:{set:`complete`,spriteSheet:UP},composition:{contextMenu:{enabled:!0,triggerMode:`both`,buttonVisibility:`when-needed`}},dragAndDrop:{canDrag:()=>N.current===null,canDrop:()=>N.current===null,onDropComplete:e=>I.current(e),onDropError:nF},renaming:{canRename:()=>N.current===null,onRename:e=>F.current(e),onError:Xt.error},onSelectionChange:e=>P.current(e),renderRowDecoration:e=>{let{item:t}=e;if(t.kind!==`file`)return null;let n=w.current.find(e=>nP(e.docName)===t.path);return n?.isSymlink?{icon:zP,title:n.targetPath?`Symlink to ${n.targetPath}`:`Symlink`}:GP(t.path)?{icon:BP,title:`Agent configuration file`}:null}},t[8]=te):te=t[8];let{model:G}=$N(te),ne,K;t[9]===f?(ne=t[10],K=t[11]):(K=sP(f),ne=cP(K),t[9]=f,t[10]=ne,t[11]=K);let re=ne,ie=(0,Z.useRef)(K),J;t[12]===f?J=t[13]:(J=uP(f),t[12]=f,t[13]=J);let ae=J,Y=(0,Z.useRef)(ae),oe=R?dP(aP(R)).slice(0,-1):dP(B??z),se=oe.join(`\0`),ce;t[14]===G?ce=t[15]:(ce=e=>{let t=sP(e??w.current);G.resetPaths(t,{initialExpandedPaths:O.current})},t[14]=G,t[15]=ce);let le=ce,ue;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(ue=e=>{A.current=lP(e)},t[16]=ue):ue=t[16];let de=ue,fe,pe;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(fe=()=>{let e=!0,t=xP(async function(){try{let t=await fetch(`/api/documents`),n=await t.json().catch(tF);if(!e)return;t.ok&&n?.ok?(p(n.documents),_(null)):_(n?.error??`Server error (HTTP ${t.status})`)}catch(t){let n=t;e&&_(`Could not reach server`),console.warn(`[FileTree] fetch failed:`,n)}e&&h(!1)});t.request();let n=()=>{document.visibilityState===`visible`&&t.request()};window.addEventListener(`focus`,n),window.addEventListener(`visibilitychange`,n);let r=Gn(e=>{e.includes(`files`)&&t.request()});return()=>{e=!1,t.dispose(),window.removeEventListener(`focus`,n),window.removeEventListener(`visibilitychange`,n),r()}},pe=[],t[17]=fe,t[18]=pe):(fe=t[17],pe=t[18]),(0,Z.useEffect)(fe,pe);let me,he;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(me=()=>{let e=!0;return fetch(`/api/workspace`).then(async t=>{let n=await t.json().catch(eF);e&&t.ok&&n?.ok&&typeof n.contentDir==`string`&&(n.pathSeparator===`/`||n.pathSeparator===`\\`)&&C({contentDir:n.contentDir,pathSeparator:n.pathSeparator})}).catch($P),()=>{e=!1}},he=[],t[19]=me,t[20]=he):(me=t[19],he=t[20]),(0,Z.useEffect)(me,he);let ge,_e;t[21]!==G||t[22]!==re?(ge=()=>{if(A.current===re){A.current=null;return}G.resetPaths(ie.current,{initialExpandedPaths:O.current})},_e=[G,re],t[21]=G,t[22]=re,t[23]=ge,t[24]=_e):(ge=t[23],_e=t[24]),(0,Z.useEffect)(ge,_e);let ve,ye;t[25]!==se||t[26]!==B||t[27]!==G?(ve=()=>{if(!B)return;let e=se?se.split(`\0`):[];for(let t of e){let e=JP(G.getItem(t));e&&!e.isExpanded()&&e.expand()}let t=G.getItem(B);t&&(M.current=!0,t.select(),t.focus(),queueMicrotask(()=>{M.current=!1}))},ye=[se,B,G],t[25]=se,t[26]=B,t[27]=G,t[28]=ve,t[29]=ye):(ve=t[28],ye=t[29]),(0,Z.useEffect)(ve,ye);let be,xe;t[30]===G?(be=t[31],xe=t[32]):(be=()=>G.subscribe(()=>{if(!G.isSearchOpen())for(let e of O.current){let t=JP(G.getItem(e));t&&!t.isExpanded()&&t.expand()}}),xe=[G],t[30]=G,t[31]=be,t[32]=xe),(0,Z.useEffect)(be,xe);let Se;t[33]===a?Se=t[34]:(Se=e=>{let t=E.current,n=Fx(t,e);for(let t of e)a(t.fromDocName);p(t=>{let n=Nx(t,e);return de(n),n}),er([`files`,`backlinks`,`graph`]),t&&n!==t&&(window.location.hash=`#/${n}`)},t[33]=a,t[34]=Se);let Ce=Se,we;t[35]!==Ce||t[36]!==le?(we=async function(e){let t=e.isFolder?`folder`:`file`,n=mP(e.sourcePath,e.isFolder),r=mP(e.destinationPath,e.isFolder),i=k.current;y(n),_(null);try{if(i?.renamePath===n){let e=gP(t,r),n=await fetch(`/api/create-page`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({path:e})}),i=await n.json().catch(QP);if(!n.ok||!i?.ok){let e=i?.error??`Failed to create ${t}`;Xt.error(e),_(e),le(),k.current=null,y(null);return}let a=i.docName??e.replace(/\.md$/i,``);p(e=>{if(e.some(e=>e.docName===a))return e;let t=[...e,{docName:a,modified:new Date().toISOString(),size:0}];return de(t),t}),IP(a),er([`files`,`backlinks`,`graph`]),k.current=null,y(null);return}let a=e.isFolder?`/api/rename-path`:`/api/rename`,o=e.isFolder?{kind:`folder`,fromPath:iP(n),toPath:iP(r)}:{docName:rP(n),newDocName:rP(r)},s=await fetch(a,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(o)}),c=await s.json();if(!s.ok||!c.ok){let e=c.error??`Failed to rename path`;Xt.error(e),_(e),le(),k.current=null,y(null);return}Ce(Array.isArray(c.renamed)?c.renamed:[]),k.current=null,y(null)}catch(e){console.warn(`[FileTree] rename failed:`,e),Xt.error(`Network error — please try again`),_(`Network error — please try again`),le(),k.current=null,y(null)}},t[35]=Ce,t[36]=le,t[37]=we):we=t[37];let Te=we,Ee;t[38]!==Ce||t[39]!==le?(Ee=async function(e){let t=e.draggedPaths.map(t=>{let n=_P(t,e.target);return t===n?null:{sourcePath:t,destinationTreePath:n}}).filter(ZP);if(t.length!==0){y(t[0]?.sourcePath??null),_(null);try{let e=[];for(let n of t){let t=n.sourcePath.endsWith(`/`),r=t?`/api/rename-path`:`/api/rename`,i=t?{kind:`folder`,fromPath:iP(n.sourcePath),toPath:iP(n.destinationTreePath)}:{docName:rP(n.sourcePath),newDocName:rP(n.destinationTreePath)},a=await fetch(r,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(i)}),o=await a.json();if(!a.ok||!o.ok){let e=o.error??`Failed to move`;Xt.error(e),_(e),le(),y(null);return}e=e.concat(Array.isArray(o.renamed)?o.renamed:[])}Ce(e),y(null)}catch(e){console.warn(`[FileTree] move failed:`,e),Xt.error(`Network error — please try again`),le(),y(null)}}},t[38]=Ce,t[39]=le,t[40]=Ee):Ee=t[40];let De=Ee,Oe;t[41]!==G||t[42]!==K?(Oe=function(e,t){try{let n=hP(e,t,[...K,...Y.current]);k.current={kind:e,renamePath:n.renamePath},G.add(n.addPath),G.startRenaming(n.renamePath,{removeIfCanceled:!0})}catch(e){console.warn(`[FileTree] create placeholder failed:`,e),Xt.error(`Could not start creating a new item`)}},t[41]=G,t[42]=K,t[43]=Oe):Oe=t[43];let ke=Oe,Ae;t[44]===G?Ae=t[45]:(Ae=function(e){let t=aP(e);(0,Z.startTransition)(()=>{for(let e of Y.current)if(e===t||e.startsWith(t)){let t=JP(G.getItem(e));t&&t.expand()}})},t[44]=G,t[45]=Ae);let je=Ae,Me;t[46]===G?Me=t[47]:(Me=function(e){let t=aP(e),n=new Set(O.current);(0,Z.startTransition)(()=>{for(let e of[...Y.current].reverse())if((e===t||e.startsWith(t))&&!n.has(e)){let t=JP(G.getItem(e));t&&t.collapse()}})},t[46]=G,t[47]=Me);let Ne=Me,Pe;t[48]!==oe||t[49]!==r||t[50]!==v||t[51]!==f||t[52]!==ae||t[53]!==De||t[54]!==Te||t[55]!==u||t[56]!==K?(Pe=()=>{w.current=f,E.current=r,N.current=v,ie.current=K,Y.current=ae,O.current=oe,P.current=e=>{if(M.current)return;let t=e[0];t&&u(oP(t))},F.current=Te,I.current=De},t[48]=oe,t[49]=r,t[50]=v,t[51]=f,t[52]=ae,t[53]=De,t[54]=Te,t[55]=u,t[56]=K,t[57]=Pe):Pe=t[57],(0,Z.useLayoutEffect)(Pe);let Fe;t[58]!==G||t[59]!==ke?(Fe=()=>({startCreating:ke,expandAll(){(0,Z.startTransition)(()=>{for(let e of Y.current){let t=JP(G.getItem(e));t&&t.expand()}})},collapseAll(){let e=new Set(O.current);(0,Z.startTransition)(()=>{for(let t of[...Y.current].reverse()){if(e.has(t))continue;let n=JP(G.getItem(t));n&&n.collapse()}})}}),t[58]=G,t[59]=ke,t[60]=Fe):Fe=t[60],(0,Z.useImperativeHandle)(n,Fe);let Ie;t[61]!==a||t[62]!==G||t[63]!==le?(Ie=async function(e){y(e.path),x(null);try{let t=e.kind===`folder`?aP(e.path):nP(e.path),n=await fetch(`/api/delete-path`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({kind:e.kind,path:e.path})}),r=await n.json();if(!n.ok||!r.ok){Xt.error(r.error??`Failed to delete path`),y(null);return}let i=Array.isArray(r.deletedDocNames)?r.deletedDocNames:[],o=new Set(i);for(let e of o)a(e);G.getItem(t)&&G.remove(t,e.kind===`folder`?{recursive:!0}:void 0),p(e=>{let t=Px(e,i);return de(t),t}),er([`files`,`backlinks`,`graph`]);let s=E.current;s&&o.has(s)&&(window.location.hash=``),y(null)}catch(e){console.warn(`[FileTree] delete failed:`,e),Xt.error(`Network error — please try again`),y(null),le()}},t[61]=a,t[62]=G,t[63]=le,t[64]=Ie):Ie=t[64];let Le=Ie,Re;t[65]===Symbol.for(`react.memo_cache_sentinel`)?(Re=function(){let e=j.current;e&&FP(e),j.current=null},t[65]=Re):Re=t[65];let ze=Re,Be;t[66]===o?Be=t[67]:(Be=function(e){let t=oF(e.nativeEvent);if(!t||t.endsWith(`/`)){ze();return}let n=rP(t);j.current!==n&&(ze(),j.current=n,PP(n,e=>{o(e)}))},t[66]=o,t[67]=Be);let Ve=Be;if(m){let e;return t[68]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,X.jsx)(`div`,{className:`flex flex-1 items-center justify-center py-8`,children:(0,X.jsx)(`span`,{className:`select-none text-sidebar-foreground/30 text-sm`,children:`Loading...`})}),t[68]=e):e=t[68],e}if(f.length===0){if(g){let e;return t[69]===g?e=t[70]:(e=(0,X.jsx)(`div`,{className:`flex flex-1 items-center justify-center py-8`,children:(0,X.jsx)(`span`,{className:`select-none text-sidebar-foreground/50 text-sm`,children:g})}),t[69]=g,t[70]=e),e}let e;t[71]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,X.jsx)(`span`,{className:`select-none text-sidebar-foreground/30 text-sm`,children:`No files yet.`}),t[71]=e):e=t[71];let n;return t[72]===ke?n=t[73]:(n=(0,X.jsxs)(`div`,{className:`flex flex-1 flex-col items-center justify-center gap-3 py-8`,children:[e,(0,X.jsx)(q,{variant:`link`,size:`sm`,className:`font-mono uppercase`,onClick:()=>ke(`file`,``),children:`Create your first file`})]}),t[72]=ke,t[73]=n),n}let He=v!==null,Ue;t[74]===g?Ue=t[75]:(Ue=g&&(0,X.jsx)(`span`,{role:`alert`,className:`px-3 pb-1 text-destructive text-xs`,children:g}),t[74]=g,t[75]=Ue);let We;t[76]===c?We=t[77]:(We=WP(c),t[76]=c,t[77]=We);let Ge;t[78]!==He||t[79]!==Ne||t[80]!==je||t[81]!==ee||t[82]!==G||t[83]!==ke||t[84]!==S?(Ge=(e,t)=>(0,X.jsx)(YP,{item:e,context:t,anyActionBusy:He,workspace:S,handoff:ee,model:G,onStartCreating:ke,onDelete:x,onExpandSubtree:je,onCollapseSubtree:Ne}),t[78]=He,t[79]=Ne,t[80]=je,t[81]=ee,t[82]=G,t[83]=ke,t[84]=S,t[85]=Ge):Ge=t[85];let Ke;t[86]!==Ve||t[87]!==G||t[88]!==Ue||t[89]!==We||t[90]!==Ge?(Ke=(0,X.jsx)(QN,{header:Ue,model:G,style:We,onMouseMove:Ve,onMouseLeave:ze,renderContextMenu:Ge}),t[86]=Ve,t[87]=G,t[88]=Ue,t[89]=We,t[90]=Ge,t[91]=Ke):Ke=t[91];let qe=!!b,Je;t[92]===v?Je=t[93]:(Je=e=>{!e&&!v&&x(null)},t[92]=v,t[93]=Je);let Ye;t[94]!==v||t[95]!==b||t[96]!==Le?(Ye=b&&(0,X.jsx)(eP,{itemName:`${b.name}${b.kind===`file`?`.md`:`/`}`,isSubmitting:v===b.path,onDelete:()=>Le(b),customDescription:b.kind===`folder`?`Are you sure you want to delete ${b.name}/ and all files inside? This action cannot be undone.`:void 0}),t[94]=v,t[95]=b,t[96]=Le,t[97]=Ye):Ye=t[97];let Xe;t[98]!==qe||t[99]!==Je||t[100]!==Ye?(Xe=(0,X.jsx)(qt,{open:qe,onOpenChange:Je,children:Ye}),t[98]=qe,t[99]=Je,t[100]=Ye,t[101]=Xe):Xe=t[101];let Ze;return t[102]!==Ke||t[103]!==Xe?(Ze=(0,X.jsxs)(X.Fragment,{children:[Ke,Xe]}),t[102]=Ke,t[103]=Xe,t[104]=Ze):Ze=t[104],Ze}function ZP(e){return!!e}function QP(){return null}function $P(e){console.warn(`[FileTree] /api/workspace fetch failed:`,e)}function eF(){return null}function tF(){return null}function nF(e){Xt.error(e)}function rF(){}function iF(){}function aF(){}function oF(e){for(let t of e.composedPath())if(t instanceof HTMLElement&&t.dataset.itemPath)return t.dataset.itemPath;return null}var sF=(e,t,n)=>xa(e,t,n,`ProjectSwitcher`);function cF(e){let t=(0,Q.c)(59),{bridge:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=[],t[0]=r):r=t[0];let[i,a]=(0,Z.useState)(r),[o,s]=(0,Z.useState)(!1),c;t[1]!==n.project||t[2]!==o?(c=()=>{if(!o)return;let e=!1;return sF(async()=>{let t=await n.project.listRecent();e||a(t)},`Failed to load recent projects.`),()=>{e=!0}},t[1]=n.project,t[2]=o,t[3]=c):c=t[3];let l;t[4]!==n||t[5]!==o?(l=[o,n],t[4]=n,t[5]=o,t[6]=l):l=t[6],(0,Z.useEffect)(c,l);let u;t[7]===n.project?u=t[8]:(u=e=>{s(!1),sF(()=>n.project.open({path:e,target:`new-window`}),`Failed to open project.`)},t[7]=n.project,t[8]=u);let d=u,f;t[9]!==n.dialog||t[10]!==n.project?(f=()=>{s(!1),sF(async()=>{let e=await n.dialog.openFolder();e&&await n.project.open({path:e,target:`new-window`})},`Failed to open folder.`)},t[9]=n.dialog,t[10]=n.project,t[11]=f):f=t[11];let p=f,m;t[12]===n.navigator?m=t[13]:(m=()=>{s(!1),sF(()=>n.navigator.open(),`Failed to open Project Navigator.`)},t[12]=n.navigator,t[13]=m);let h=m,g=n.config.projectPath,_,v,y,b,x,S,C,w,T,E,D;if(t[14]!==n.config.projectName||t[15]!==g||t[16]!==o||t[17]!==d||t[18]!==i){let e;t[30]===g?e=t[31]:(e=e=>e.path!==g,t[30]=g,t[31]=e);let r=i.filter(e);v=py,S=o,C=s;let a;t[32]===n.config.projectName?a=t[33]:(a=(0,X.jsx)(`span`,{className:`truncate`,children:n.config.projectName}),t[32]=n.config.projectName,t[33]=a);let c;t[34]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,X.jsx)(ci,{"aria-hidden":`true`,className:`opacity-60`}),t[34]=c):c=t[34],t[35]===a?w=t[36]:(w=(0,X.jsx)(my,{asChild:!0,children:(0,X.jsxs)(_S,{className:`justify-between text-sidebar-foreground/70`,"data-testid":`project-switcher-trigger`,title:`Open project menu`,children:[a,c]})}),t[35]=a,t[36]=w),_=hy,T=`start`,E=`top`,D=`min-w-[260px]`,y=`project-switcher-menu`,t[37]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,X.jsx)(yy,{className:`font-mono font-normal tracking-wide uppercase text-muted-foreground text-xs`,children:`Recent projects`}),t[37]=b):b=t[37],x=r.length===0?(0,X.jsx)(yy,{className:`font-normal text-muted-foreground text-xs`,children:`No other recent projects.`}):r.slice(0,10).map(e=>(0,X.jsxs)(gy,{disabled:e.missing,onSelect:()=>d(e.path),className:`flex flex-col items-start gap-0.5`,"data-testid":`project-switcher-recent-${e.path}`,children:[(0,X.jsx)(`span`,{className:`font-medium text-sm`,children:e.name}),(0,X.jsxs)(`span`,{className:`max-w-[240px] truncate text-muted-foreground text-xs`,children:[e.path,e.missing?` (missing)`:``]})]},e.path)),t[14]=n.config.projectName,t[15]=g,t[16]=o,t[17]=d,t[18]=i,t[19]=_,t[20]=v,t[21]=y,t[22]=b,t[23]=x,t[24]=S,t[25]=C,t[26]=w,t[27]=T,t[28]=E,t[29]=D}else _=t[19],v=t[20],y=t[21],b=t[22],x=t[23],S=t[24],C=t[25],w=t[26],T=t[27],E=t[28],D=t[29];let O;t[38]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,X.jsx)(by,{}),t[38]=O):O=t[38];let k;t[39]===p?k=t[40]:(k=(0,X.jsx)(gy,{onSelect:p,"data-testid":`project-switcher-open-folder`,children:`Open folder…`}),t[39]=p,t[40]=k);let A;t[41]===h?A=t[42]:(A=(0,X.jsx)(gy,{onSelect:h,"data-testid":`project-switcher-switch-project`,children:Td}),t[41]=h,t[42]=A);let j;t[43]!==_||t[44]!==y||t[45]!==b||t[46]!==x||t[47]!==k||t[48]!==A||t[49]!==T||t[50]!==E||t[51]!==D?(j=(0,X.jsxs)(_,{align:T,side:E,className:D,"data-testid":y,children:[b,x,O,k,A]}),t[43]=_,t[44]=y,t[45]=b,t[46]=x,t[47]=k,t[48]=A,t[49]=T,t[50]=E,t[51]=D,t[52]=j):j=t[52];let M;return t[53]!==v||t[54]!==S||t[55]!==C||t[56]!==w||t[57]!==j?(M=(0,X.jsxs)(v,{open:S,onOpenChange:C,children:[w,j]}),t[53]=v,t[54]=S,t[55]=C,t[56]=w,t[57]=j,t[58]=M):M=t[58],M}function lF(e){let t=(0,Q.c)(13),{notice:n,onDismiss:r}=e,i=n.variant===`error`?`border-destructive/60`:`border-sidebar-border`,a=`update-notice-${n.id}`,o=`flex items-center gap-2 rounded-md border bg-sidebar-accent/30 px-2 py-1.5 text-xs text-muted-foreground ${i}`,s;t[0]===n.body?s=t[1]:(s=(0,X.jsx)(`span`,{className:`flex-1 leading-snug`,children:n.body}),t[0]=n.body,t[1]=s);let c;t[2]===n.action?c=t[3]:(c=n.action?(0,X.jsx)(`button`,{type:`button`,className:`shrink-0 text-xs font-medium underline underline-offset-2 decoration-muted-foreground/40 hover:text-sidebar-foreground hover:decoration-sidebar-foreground`,onClick:()=>{n.action?.onClick()},children:n.action.label}):null,t[2]=n.action,t[3]=c);let l;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,X.jsx)(jt,{"aria-hidden":`true`,className:`size-3`}),t[4]=l):l=t[4];let u;t[5]===r?u=t[6]:(u=(0,X.jsx)(q,{variant:`ghost`,size:`icon`,className:`size-5 shrink-0 text-muted-foreground hover:text-sidebar-foreground`,"aria-label":`Dismiss notice`,onClick:r,children:l}),t[5]=r,t[6]=u);let d;return t[7]!==a||t[8]!==o||t[9]!==s||t[10]!==c||t[11]!==u?(d=(0,X.jsxs)(`div`,{role:`status`,"aria-live":`polite`,"data-testid":a,className:o,children:[s,c,u]}),t[7]=a,t[8]=o,t[9]=s,t[10]=c,t[11]=u,t[12]=d):d=t[12],d}function uF(e){if(e.length===0)return null;let t=e[0];if(!t)return null;for(let n=1;n<e.length;n++){let r=e[n];r&&r.priority<t.priority&&(t=r)}return t}function dF(){let e=(0,Q.c)(7),t=(0,Z.useSyncExternalStore)(yu,vu,vu),n;e[0]===t?n=e[1]:(n=uF(t),e[0]=t,e[1]=n);let r=n;if(!r)return null;let i;e[2]===r.id?i=e[3]:(i=()=>{_u(r.id)},e[2]=r.id,e[3]=i);let a;return e[4]!==r||e[5]!==i?(a=(0,X.jsx)(`div`,{"data-testid":`update-notices-list`,children:(0,X.jsx)(lF,{notice:r,onDismiss:i})}),e[4]=r,e[5]=i,e[6]=a):a=e[6],a}function fF(){let e=(0,Q.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,X.jsx)(ot,{name:`file-sidebar`,children:(0,X.jsx)(pF,{})}),e[0]=t):t=e[0],t}function pF(){let e=(0,Q.c)(8),t=(0,Z.useRef)(null),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,X.jsx)(`span`,{className:`font-mono text-sm uppercase tracking-wider text-sidebar-foreground/50`,children:`Files`}),e[0]=n):n=e[0];let r;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,X.jsxs)(sn,{children:[(0,X.jsx)(en,{asChild:!0,children:(0,X.jsx)(my,{asChild:!0,children:(0,X.jsx)(q,{variant:`ghost`,size:`icon-sm`,"aria-label":`Tree view options`,children:(0,X.jsx)(Bi,{"aria-hidden":`true`})})})}),(0,X.jsx)(nn,{children:`Tree view options`})]}),e[1]=r):r=e[1];let i;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,X.jsxs)(gy,{onSelect:()=>t.current?.expandAll(),children:[(0,X.jsx)(ga,{"aria-hidden":`true`}),`Expand All`]}),e[2]=i):i=e[2];let a;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,X.jsxs)(py,{children:[r,(0,X.jsxs)(hy,{align:`end`,children:[i,(0,X.jsxs)(gy,{onSelect:()=>t.current?.collapseAll(),children:[(0,X.jsx)(Di,{"aria-hidden":`true`}),`Collapse All`]})]})]}),e[3]=a):a=e[3];let o;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,X.jsxs)(sn,{children:[(0,X.jsx)(en,{asChild:!0,children:(0,X.jsx)(q,{variant:`ghost`,size:`icon-sm`,"aria-label":`New file`,onClick:()=>t.current?.startCreating(`file`,``),children:(0,X.jsx)(la,{"aria-hidden":`true`})})}),(0,X.jsx)(nn,{children:`New File`})]}),e[4]=o):o=e[4];let s;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,X.jsxs)(dS,{className:`flex-row items-center justify-between`,children:[n,(0,X.jsxs)(`div`,{className:`flex items-center gap-1`,children:[a,o,(0,X.jsxs)(sn,{children:[(0,X.jsx)(en,{asChild:!0,children:(0,X.jsx)(q,{variant:`ghost`,size:`icon-sm`,"aria-label":`New folder`,onClick:()=>t.current?.startCreating(`folder`,``),children:(0,X.jsx)(Oi,{"aria-hidden":`true`})})}),(0,X.jsx)(nn,{children:`New Folder`})]})]})]}),e[5]=s):s=e[5];let c;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,X.jsx)(pS,{children:(0,X.jsx)(XP,{ref:t})}),e[6]=c):c=e[6];let l;return e[7]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,X.jsxs)(sS,{variant:`inset`,children:[s,c,(0,X.jsxs)(fS,{className:`px-0`,children:[typeof window<`u`&&window.okDesktop?(0,X.jsx)(mS,{children:(0,X.jsx)(hS,{children:(0,X.jsx)(cF,{bridge:window.okDesktop})})}):null,(0,X.jsx)(dF,{})]}),(0,X.jsx)(lS,{})]}),e[7]=l):l=e[7],l}function mF(){let e=(0,Q.c)(17),t=y(),{collabUrl:n,setSystemProvider:r,updateServerInstanceId:i,onBranchSwitched:a,observeBranch:o,observeDiskAck:s,refreshServerInfo:c}=ft(),l;e[0]!==o||e[1]!==s||e[2]!==a||e[3]!==c||e[4]!==i?(l={updateServerInstanceId:i,onBranchSwitched:a,observeBranch:o,observeDiskAck:s,refreshServerInfo:c},e[0]=o,e[1]=s,e[2]=a,e[3]=c,e[4]=i,e[5]=l):l=e[5];let u=(0,Z.useRef)(l),d;e[6]!==o||e[7]!==s||e[8]!==a||e[9]!==c||e[10]!==i?(d=()=>{u.current={updateServerInstanceId:i,onBranchSwitched:a,observeBranch:o,observeDiskAck:s,refreshServerInfo:c}},e[6]=o,e[7]=s,e[8]=a,e[9]=c,e[10]=i,e[11]=d):d=e[11],(0,Z.useEffect)(d);let f,p;return e[12]!==n||e[13]!==t||e[14]!==r?(f=()=>{if(n===null)return;let e=new Ge,i=new Ve({url:n,name:Kn,document:e,onStateless:e=>{let{payload:t}=e;At(t,{onServerInfo:e=>{u.current.updateServerInstanceId(e.serverInstanceId),e.currentBranch!==void 0&&u.current.observeBranch(e.currentBranch)},onBranchSwitched:e=>{u.current.onBranchSwitched(e.branch)},onDiskAck:e=>{u.current.observeDiskAck(e.docName,e.sv)},onDerivedView:vF,onUnknown:_F})},onClose:gF,onDisconnect:hF}),a=Gn(e=>{(e.includes(`files`)||e.includes(`backlinks`))&&(t.invalidateQueries({queryKey:[`backlinks`]}),t.invalidateQueries({queryKey:[`forward-links`]})),(e.includes(`files`)||e.includes(`graph`))&&(t.invalidateQueries({queryKey:[`orphans`]}),t.invalidateQueries({queryKey:[`hubs`]}))}),o=Ie(()=>{u.current.refreshServerInfo()});i.on(`synced`,()=>{er([`files`,`backlinks`,`graph`]),o()});let s=new Set,c=()=>{if(i.awareness)for(let[e,t]of i.awareness.getStates().entries())s.has(e)||t.user?.type===`agent`&&(s.add(e),console.warn(`[agent-presence] observed stale AwarenessUser.type === 'agent' from clientID ${e} — probably a stale bundled client`))};return i.awareness?.on(`change`,c),r(i),()=>{a(),i.awareness?.off(`change`,c),r(null),i.destroy(),e.destroy()}},p=[t,n,r],e[12]=n,e[13]=t,e[14]=r,e[15]=f,e[16]=p):(f=e[15],p=e[16]),(0,Z.useEffect)(f,p),null}function hF(){console.warn(`[CC1] __system__ disconnected - derived views may be stale`)}function gF(e){let{event:t}=e;console.warn(`[CC1] __system__ connection closed:`,t.code,t.reason)}function _F(e){console.warn(`[CC1] Unparseable stateless payload, skipping:`,e.slice(0,100))}function vF(e){er([e.ch])}function yF(){let e=(0,Q.c)(7),{clearTarget:t}=ft(),{openTargetTransition:n}=vt(),{folderPaths:r,loading:i,pages:a}=Yn(),o,s;return e[0]!==t||e[1]!==r||e[2]!==i||e[3]!==n||e[4]!==a?(o=()=>{e();function e(){let e=tr(window.location.hash);if(!e){Ye(`ok/nav/hash-change`,{docName:null,kind:`clear`}),t();return}if(i){Ye(`ok/nav/hash-change`,{docName:e,kind:`deferred-loading`});return}let o=ir(e,{pages:a,folderPaths:r});Ye(`ok/nav/hash-change`,{docName:e,kind:o.kind}),n(o)}return window.addEventListener(`hashchange`,e),()=>window.removeEventListener(`hashchange`,e)},s=[t,r,i,n,a],e[0]=t,e[1]=r,e[2]=i,e[3]=n,e[4]=a,e[5]=o,e[6]=s):(o=e[5],s=e[6]),(0,Z.useEffect)(o,s),null}var bF=`#install-claude-desktop`;function xF(){let e=(0,Q.c)(5),[t,n]=(0,Z.useState)(typeof window<`u`&&window.location.hash===bF),r,i;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>{let e=function(){window.location.hash===bF&&n(!0)};return window.addEventListener(`hashchange`,e),()=>window.removeEventListener(`hashchange`,e)},i=[],e[0]=r,e[1]=i):(r=e[0],i=e[1]),(0,Z.useEffect)(r,i);let a;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=function(e){if(n(e),!e&&window.location.hash===bF){let{pathname:e,search:t}=window.location;window.history.replaceState(null,``,`${e}${t}`)}},e[2]=a):a=e[2];let o=a,s;return e[3]===t?s=e[4]:(s=(0,X.jsx)(XS,{open:t,onOpenChange:o}),e[3]=t,e[4]=s),s}function SF(){let e=(0,Q.c)(8),{activeDocName:t,activeTarget:n}=ft(),[r,i]=(0,Z.useState)(!1),a;e[0]!==t||e[1]!==n?(a=n?.kind===`folder`?n.folderPath:Bn(t),e[0]=t,e[1]=n,e[2]=a):a=e[2];let o=a,s,c;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(s=()=>{let e=function(e){let t=e.target;Ue({target:t,metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey,key:e.key})&&(e.preventDefault(),i(!0))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},c=[],e[3]=s,e[4]=c):(s=e[3],c=e[4]),(0,Z.useEffect)(s,c);let l;return e[5]!==r||e[6]!==o?(l=(0,X.jsx)(Ot,{open:r,onOpenChange:i,kind:`file`,initialDir:o}),e[5]=r,e[6]=o,e[7]=l):l=e[7],l}function CF(){let e=(0,Q.c)(9),t=typeof window<`u`?window.okDesktop??null:null,n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,X.jsx)(vf,{}),e[0]=n):n=e[0];let r,i,a,o,s,c;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,X.jsx)(mF,{}),i=(0,X.jsx)(yF,{}),a=(0,X.jsx)(SF,{}),o=(0,X.jsx)(xF,{}),s=(0,X.jsx)(Rl,{}),c=t?(0,X.jsx)(pf,{bridge:t}):null,e[1]=r,e[2]=i,e[3]=a,e[4]=o,e[5]=s,e[6]=c):(r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],c=e[6]);let l;e[7]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,X.jsx)(fF,{}),e[7]=l):l=e[7];let u;return e[8]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,X.jsx)(ot,{name:`app`,children:(0,X.jsxs)(St,{children:[n,(0,X.jsxs)(rr,{children:[r,i,a,o,s,c,(0,X.jsxs)(iS,{className:`h-screen overflow-hidden`,children:[l,(0,X.jsx)(uS,{className:`overflow-hidden h-[calc(100vh-var(--layout-inset-offset))]`,children:(0,X.jsx)(RC,{})})]})]})]})}),e[8]=u):u=e[8],u}Fr(),typeof window<`u`&&window.okDesktop?.config.apiOrigin&&Yl({apiOrigin:window.okDesktop.config.apiOrigin}),typeof window<`u`&&$l({bridge:window.okDesktop}),bu(),typeof window<`u`&&Ql({bridge:window.okDesktop}),typeof window<`u`&&Ea({bridge:window.okDesktop});var wF=new Wr({defaultOptions:{queries:{retry:1,staleTime:1e4}}}),TF=document.getElementById(`root`);if(!TF)throw Error(`Root element not found`);var EF=typeof window<`u`&&window.okDesktop?.config.mode===`navigator`;(0,ii.createRoot)(TF).render((0,X.jsx)(Z.StrictMode,{children:(0,X.jsx)(v,{client:wF,children:(0,X.jsxs)(_,{attribute:`class`,defaultTheme:`system`,enableSystem:!0,disableTransitionOnChange:!0,storageKey:`ok-theme-v1`,children:[(0,X.jsx)(an,{children:EF&&window.okDesktop?(0,X.jsx)(Wl,{bridge:window.okDesktop}):(0,X.jsx)(CF,{})}),(0,X.jsx)(Jl,{richColors:!0})]})})}));export{Ml as i,jl as n,Nl as r,Fl as t};
|