claude-mux 0.30.13 → 0.30.14
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/CLAUDE.md +14 -3
- package/dist/fleet-places.d.ts +7 -1
- package/dist/fleet-places.d.ts.map +1 -1
- package/dist/fleet-places.js +14 -1
- package/dist/fleet-places.js.map +1 -1
- package/dist/server/dictation-marks.d.ts.map +1 -1
- package/dist/server/dictation-marks.js +23 -1
- package/dist/server/dictation-marks.js.map +1 -1
- package/dist/transcript/parser.d.ts +7 -0
- package/dist/transcript/parser.d.ts.map +1 -1
- package/dist/transcript/parser.js +19 -3
- package/dist/transcript/parser.js.map +1 -1
- package/dist/transcript/past-sessions.d.ts.map +1 -1
- package/dist/transcript/past-sessions.js +4 -1
- package/dist/transcript/past-sessions.js.map +1 -1
- package/dist/utils/version.d.ts +1 -1
- package/dist/utils/version.js +1 -1
- package/dist/web/client/_app/immutable/chunks/{sULMfRFG.js → B4FaHfAQ.js} +2 -2
- package/dist/web/client/_app/immutable/chunks/{sULMfRFG.js.map → B4FaHfAQ.js.map} +1 -1
- package/dist/web/client/_app/immutable/chunks/{W5_HMZ5E.js → B5Hkb2u5.js} +2 -2
- package/dist/web/client/_app/immutable/chunks/{W5_HMZ5E.js.map → B5Hkb2u5.js.map} +1 -1
- package/{web/.svelte-kit/output/client/_app/immutable/chunks/BQzv8cqz.js → dist/web/client/_app/immutable/chunks/BOpEbBRb.js} +2 -2
- package/{web/.svelte-kit/output/client/_app/immutable/chunks/BQzv8cqz.js.map → dist/web/client/_app/immutable/chunks/BOpEbBRb.js.map} +1 -1
- package/dist/web/client/_app/immutable/chunks/{Q5yhzux8.js → BeYjnogg.js} +2 -2
- package/{web/.svelte-kit/output/client/_app/immutable/chunks/Q5yhzux8.js.map → dist/web/client/_app/immutable/chunks/BeYjnogg.js.map} +1 -1
- package/dist/web/client/_app/immutable/chunks/{VceCNUd7.js → C00rm3mY.js} +2 -2
- package/{web/.svelte-kit/output/client/_app/immutable/chunks/VceCNUd7.js.map → dist/web/client/_app/immutable/chunks/C00rm3mY.js.map} +1 -1
- package/dist/web/client/_app/immutable/chunks/{CtjkAirr.js → CKg7gbPm.js} +9 -9
- package/dist/web/client/_app/immutable/chunks/CKg7gbPm.js.map +1 -0
- package/dist/web/client/_app/immutable/chunks/CPEphjdk.js +4 -0
- package/dist/web/client/_app/immutable/chunks/CPEphjdk.js.map +1 -0
- package/dist/web/client/_app/immutable/chunks/{BQQ3-rqs.js → CPlFo88J.js} +2 -2
- package/dist/web/client/_app/immutable/chunks/{BQQ3-rqs.js.map → CPlFo88J.js.map} +1 -1
- package/dist/web/client/_app/immutable/chunks/{BvX4FYxp.js → CtnjySwS.js} +2 -2
- package/dist/web/client/_app/immutable/chunks/{BvX4FYxp.js.map → CtnjySwS.js.map} +1 -1
- package/dist/web/client/_app/immutable/chunks/{XgSsj0QY.js → D3EW0jRH.js} +2 -2
- package/{web/.svelte-kit/output/client/_app/immutable/chunks/XgSsj0QY.js.map → dist/web/client/_app/immutable/chunks/D3EW0jRH.js.map} +1 -1
- package/dist/web/client/_app/immutable/chunks/{CtlIfY1C.js → D3umr-Qr.js} +2 -2
- package/{web/.svelte-kit/output/client/_app/immutable/chunks/CtlIfY1C.js.map → dist/web/client/_app/immutable/chunks/D3umr-Qr.js.map} +1 -1
- package/dist/web/client/_app/immutable/chunks/{CM0CI9GL.js → D8-_Y-M6.js} +3 -3
- package/dist/web/client/_app/immutable/chunks/{CM0CI9GL.js.map → D8-_Y-M6.js.map} +1 -1
- package/dist/web/client/_app/immutable/chunks/{cvsGFvDx.js → DDvK7Qo9.js} +2 -2
- package/{web/.svelte-kit/output/client/_app/immutable/chunks/cvsGFvDx.js.map → dist/web/client/_app/immutable/chunks/DDvK7Qo9.js.map} +1 -1
- package/dist/web/client/_app/immutable/chunks/{CiU8KBun.js → _VFi-7U7.js} +2 -2
- package/dist/web/client/_app/immutable/chunks/{CiU8KBun.js.map → _VFi-7U7.js.map} +1 -1
- package/dist/web/client/_app/immutable/chunks/{DlENCZqZ.js → mQ6hkLuy.js} +2 -2
- package/dist/web/client/_app/immutable/chunks/{DlENCZqZ.js.map → mQ6hkLuy.js.map} +1 -1
- package/dist/web/client/_app/immutable/entry/{app.BwTbN8wB.js → app.CTFza_OS.js} +3 -3
- package/{web/.svelte-kit/output/client/_app/immutable/entry/app.BwTbN8wB.js.map → dist/web/client/_app/immutable/entry/app.CTFza_OS.js.map} +1 -1
- package/dist/web/client/_app/immutable/entry/start.B-zlkyrt.js +2 -0
- package/dist/web/client/_app/immutable/entry/start.B-zlkyrt.js.map +1 -0
- package/{web/.svelte-kit/output/client/_app/immutable/nodes/0.BnHV-ElR.js → dist/web/client/_app/immutable/nodes/0.Cztuq8Ih.js} +2 -2
- package/dist/web/client/_app/immutable/nodes/{0.BnHV-ElR.js.map → 0.Cztuq8Ih.js.map} +1 -1
- package/dist/web/client/_app/immutable/nodes/{1.Dc3ryOCf.js → 1.BOOL0V7K.js} +2 -2
- package/dist/web/client/_app/immutable/nodes/{1.Dc3ryOCf.js.map → 1.BOOL0V7K.js.map} +1 -1
- package/dist/web/client/_app/immutable/nodes/{2.DUrpAceY.js → 2.CArUpZNe.js} +2 -2
- package/dist/web/client/_app/immutable/nodes/{2.DUrpAceY.js.map → 2.CArUpZNe.js.map} +1 -1
- package/dist/web/client/_app/immutable/nodes/{3.BaCofjAn.js → 3.DSvIWalA.js} +2 -2
- package/dist/web/client/_app/immutable/nodes/{3.BaCofjAn.js.map → 3.DSvIWalA.js.map} +1 -1
- package/dist/web/client/_app/immutable/nodes/{4.v1wYkrvS.js → 4.H6RMG_cy.js} +2 -2
- package/dist/web/client/_app/immutable/nodes/{4.v1wYkrvS.js.map → 4.H6RMG_cy.js.map} +1 -1
- package/dist/web/client/_app/immutable/nodes/{5.Bn4A77jK.js → 5.BHSt0Suo.js} +2 -2
- package/dist/web/client/_app/immutable/nodes/{5.Bn4A77jK.js.map → 5.BHSt0Suo.js.map} +1 -1
- package/dist/web/client/_app/immutable/nodes/{6.C2hEoITj.js → 6.CzLoA0w7.js} +2 -2
- package/dist/web/client/_app/immutable/nodes/{6.C2hEoITj.js.map → 6.CzLoA0w7.js.map} +1 -1
- package/dist/web/client/_app/immutable/nodes/{7.BcHOjWdp.js → 7.fqq2vVa9.js} +2 -2
- package/dist/web/client/_app/immutable/nodes/{7.BcHOjWdp.js.map → 7.fqq2vVa9.js.map} +1 -1
- package/dist/web/client/_app/immutable/nodes/{8.D7NtqIYy.js → 8.DNFFjTla.js} +2 -2
- package/dist/web/client/_app/immutable/nodes/{8.D7NtqIYy.js.map → 8.DNFFjTla.js.map} +1 -1
- package/dist/web/client/_app/immutable/nodes/{9.D-211z9-.js → 9.0kMPrp2-.js} +2 -2
- package/dist/web/client/_app/immutable/nodes/{9.D-211z9-.js.map → 9.0kMPrp2-.js.map} +1 -1
- package/dist/web/client/_app/version.json +1 -1
- package/dist/web/server/chunks/{0-CvglVGCY.js → 0-B_KxXX-N.js} +14 -14
- package/dist/web/server/chunks/{0-CvglVGCY.js.map → 0-B_KxXX-N.js.map} +1 -1
- package/dist/web/server/chunks/{1-D-gJDFrG.js → 1-BmEKuUDK.js} +4 -4
- package/dist/web/server/chunks/{1-D-gJDFrG.js.map → 1-BmEKuUDK.js.map} +1 -1
- package/dist/web/server/chunks/{2-BCmEU5Qq.js → 2-BJ3dzws2.js} +13 -13
- package/dist/web/server/chunks/{2-BCmEU5Qq.js.map → 2-BJ3dzws2.js.map} +1 -1
- package/dist/web/server/chunks/{3-CHn5Kw-T.js → 3-CLYKGzT3.js} +10 -10
- package/dist/web/server/chunks/{3-CHn5Kw-T.js.map → 3-CLYKGzT3.js.map} +1 -1
- package/dist/web/server/chunks/{4-Cxg7VcZ7.js → 4-CsoWHVgX.js} +12 -12
- package/dist/web/server/chunks/{4-Cxg7VcZ7.js.map → 4-CsoWHVgX.js.map} +1 -1
- package/dist/web/server/chunks/{5-DSgvnHF_.js → 5-oPM6ncgT.js} +9 -9
- package/dist/web/server/chunks/{5-DSgvnHF_.js.map → 5-oPM6ncgT.js.map} +1 -1
- package/dist/web/server/chunks/{6-B0rymWRR.js → 6-gvgju2ZN.js} +5 -5
- package/dist/web/server/chunks/{6-B0rymWRR.js.map → 6-gvgju2ZN.js.map} +1 -1
- package/dist/web/server/chunks/{7-CNomBJux.js → 7-D8hylKrz.js} +10 -10
- package/dist/web/server/chunks/{7-CNomBJux.js.map → 7-D8hylKrz.js.map} +1 -1
- package/dist/web/server/chunks/{8-TYbX-1bO.js → 8-Br4hTtby.js} +12 -12
- package/dist/web/server/chunks/{8-TYbX-1bO.js.map → 8-Br4hTtby.js.map} +1 -1
- package/dist/web/server/chunks/{9-XGQQvTLc.js → 9-9uvmfsEs.js} +9 -9
- package/dist/web/server/chunks/{9-XGQQvTLc.js.map → 9-9uvmfsEs.js.map} +1 -1
- package/dist/web/server/chunks/{_layout.svelte-yrPX5VFm.js → _layout.svelte-DamAAFpK.js} +58 -37
- package/dist/web/server/chunks/_layout.svelte-DamAAFpK.js.map +1 -0
- package/dist/web/server/chunks/{_page.svelte-C_kFA0Lq.js → _page.svelte-DFE4jmT9.js} +4 -4
- package/dist/web/server/chunks/{_page.svelte-C_kFA0Lq.js.map → _page.svelte-DFE4jmT9.js.map} +1 -1
- package/dist/web/server/chunks/{_page.svelte-DvxpwsgS.js → _page.svelte-DHPGbCS1.js} +6 -6
- package/dist/web/server/chunks/{_page.svelte-DvxpwsgS.js.map → _page.svelte-DHPGbCS1.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-Dz01Gvhk.js → _server.ts-0RT4n9LX.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-Dz01Gvhk.js.map → _server.ts-0RT4n9LX.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-D2Tvcncu.js → _server.ts-3kbpguQ1.js} +3 -3
- package/dist/web/server/chunks/{_server.ts-D2Tvcncu.js.map → _server.ts-3kbpguQ1.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-TN_Ka6cR.js → _server.ts-4m17ESHV.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-TN_Ka6cR.js.map → _server.ts-4m17ESHV.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-Bj1Eewby.js → _server.ts-8Bs2jUgD.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-Bj1Eewby.js.map → _server.ts-8Bs2jUgD.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-BWVtnpJh.js → _server.ts-95cbXKdT.js} +3 -3
- package/dist/web/server/chunks/{_server.ts-BWVtnpJh.js.map → _server.ts-95cbXKdT.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-CyOA1rOq.js → _server.ts-B56-XF-Z.js} +3 -3
- package/dist/web/server/chunks/{_server.ts-CyOA1rOq.js.map → _server.ts-B56-XF-Z.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-1ZhqL5o8.js → _server.ts-BAC_No-1.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-1ZhqL5o8.js.map → _server.ts-BAC_No-1.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-ji7L8HUR.js → _server.ts-BCpfYsYw.js} +3 -3
- package/dist/web/server/chunks/{_server.ts-ji7L8HUR.js.map → _server.ts-BCpfYsYw.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-9iRpDv9e.js → _server.ts-BGToJuLp.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-9iRpDv9e.js.map → _server.ts-BGToJuLp.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-DQJ-tygD.js → _server.ts-BW87LYkE.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-DQJ-tygD.js.map → _server.ts-BW87LYkE.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-VgbTPrqV.js → _server.ts-BXjUy61V.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-VgbTPrqV.js.map → _server.ts-BXjUy61V.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-FoPsfjo3.js → _server.ts-BYyaN7ik.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-FoPsfjo3.js.map → _server.ts-BYyaN7ik.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-CNBy2p2U.js → _server.ts-Bjzi1JAu.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-CNBy2p2U.js.map → _server.ts-Bjzi1JAu.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-CSK1ReRS.js → _server.ts-CBU5vhD8.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-CSK1ReRS.js.map → _server.ts-CBU5vhD8.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-Cv8SUkC5.js → _server.ts-CG-7TORV.js} +3 -3
- package/dist/web/server/chunks/{_server.ts-Cv8SUkC5.js.map → _server.ts-CG-7TORV.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-DPctaiWC.js → _server.ts-COCrEIiW.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-DPctaiWC.js.map → _server.ts-COCrEIiW.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-C7uhdF7Y.js → _server.ts-CPCsEz_B.js} +4 -4
- package/dist/web/server/chunks/{_server.ts-C7uhdF7Y.js.map → _server.ts-CPCsEz_B.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-DsyqZudf.js → _server.ts-CPGa_LDW.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-DsyqZudf.js.map → _server.ts-CPGa_LDW.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-B9RfKfyc.js → _server.ts-CT1m86tm.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-B9RfKfyc.js.map → _server.ts-CT1m86tm.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-CwFbAWCg.js → _server.ts-CXzAFIps.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-CwFbAWCg.js.map → _server.ts-CXzAFIps.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-DHuyjZQx.js → _server.ts-C_H2gKKu.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-DHuyjZQx.js.map → _server.ts-C_H2gKKu.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-DVgdt6Zu.js → _server.ts-CjH9MxGk.js} +3 -3
- package/dist/web/server/chunks/{_server.ts-DVgdt6Zu.js.map → _server.ts-CjH9MxGk.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-DrFiP32b.js → _server.ts-CrQk3PtI.js} +3 -3
- package/dist/web/server/chunks/{_server.ts-DrFiP32b.js.map → _server.ts-CrQk3PtI.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-CA8nszPb.js → _server.ts-Cy5Matw4.js} +3 -3
- package/dist/web/server/chunks/{_server.ts-CA8nszPb.js.map → _server.ts-Cy5Matw4.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-CovkmnvY.js → _server.ts-D9PPu5p4.js} +3 -3
- package/dist/web/server/chunks/{_server.ts-CovkmnvY.js.map → _server.ts-D9PPu5p4.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-vhti5VvF.js → _server.ts-DGvNQ4Mq.js} +3 -3
- package/dist/web/server/chunks/{_server.ts-vhti5VvF.js.map → _server.ts-DGvNQ4Mq.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-iK8ih9Bi.js → _server.ts-DJOSnwXV.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-iK8ih9Bi.js.map → _server.ts-DJOSnwXV.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-DK-6ddNq.js → _server.ts-DPoluZc6.js} +3 -3
- package/dist/web/server/chunks/{_server.ts-DK-6ddNq.js.map → _server.ts-DPoluZc6.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-BozsVs8t.js → _server.ts-DS6kibxL.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-BozsVs8t.js.map → _server.ts-DS6kibxL.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-DozhhYwq.js → _server.ts-DUl0ucUP.js} +3 -3
- package/dist/web/server/chunks/{_server.ts-DozhhYwq.js.map → _server.ts-DUl0ucUP.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-78nODRDJ.js → _server.ts-DWj22oj9.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-78nODRDJ.js.map → _server.ts-DWj22oj9.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-CA1j9wWk.js → _server.ts-DZrVaelC.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-CA1j9wWk.js.map → _server.ts-DZrVaelC.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-CzcknkWq.js → _server.ts-DrG3j6Ao.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-CzcknkWq.js.map → _server.ts-DrG3j6Ao.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-AAllMdwT.js → _server.ts-Dwy38J9J.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-AAllMdwT.js.map → _server.ts-Dwy38J9J.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-CgChlIKq.js → _server.ts-DxGjRezI.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-CgChlIKq.js.map → _server.ts-DxGjRezI.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-KbQyErIR.js → _server.ts-XMUjHO61.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-KbQyErIR.js.map → _server.ts-XMUjHO61.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-DGTSZoLn.js → _server.ts-dvT2bXEB.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-DGTSZoLn.js.map → _server.ts-dvT2bXEB.js.map} +1 -1
- package/dist/web/server/chunks/{_server.ts-BxscGs8D.js → _server.ts-m835uDm6.js} +2 -2
- package/dist/web/server/chunks/{_server.ts-BxscGs8D.js.map → _server.ts-m835uDm6.js.map} +1 -1
- package/dist/web/server/chunks/{checkbox-DiJTAtHi.js → checkbox-BYzlWW56.js} +2 -2
- package/dist/web/server/chunks/{checkbox-DiJTAtHi.js.map → checkbox-BYzlWW56.js.map} +1 -1
- package/dist/web/server/chunks/{create-id-DpoSQWrl.js → create-id-s6T_m-1j.js} +3 -3
- package/dist/web/server/chunks/{create-id-DpoSQWrl.js.map → create-id-s6T_m-1j.js.map} +1 -1
- package/dist/web/server/chunks/{discover-DjR28OqK.js → discover-DykzHz0t.js} +2 -2
- package/dist/web/server/chunks/{discover-DjR28OqK.js.map → discover-DykzHz0t.js.map} +1 -1
- package/dist/web/server/chunks/{drafts.svelte-DsFAtH-s.js → drafts.svelte-c94J-DBB.js} +3 -3
- package/dist/web/server/chunks/{drafts.svelte-DsFAtH-s.js.map → drafts.svelte-c94J-DBB.js.map} +1 -1
- package/dist/web/server/chunks/{end-session-BbBa9yD0.js → end-session-Czy_WW42.js} +2 -2
- package/dist/web/server/chunks/{end-session-BbBa9yD0.js.map → end-session-Czy_WW42.js.map} +1 -1
- package/dist/web/server/chunks/{files-4i3igWea.js → files-DNH191y7.js} +2 -2
- package/dist/web/server/chunks/{files-4i3igWea.js.map → files-DNH191y7.js.map} +1 -1
- package/dist/web/server/chunks/{fleet-DZJSFWuH.js → fleet-CWHlZjSd.js} +4 -4
- package/dist/web/server/chunks/{fleet-DZJSFWuH.js.map → fleet-CWHlZjSd.js.map} +1 -1
- package/dist/web/server/chunks/{git-D9dLEKUF.js → git-CHO9UIOQ.js} +13 -5
- package/dist/web/server/chunks/git-CHO9UIOQ.js.map +1 -0
- package/dist/web/server/chunks/{git-history-De9t0yF-.js → git-history-CxyH4jQb.js} +2 -2
- package/dist/web/server/chunks/{git-history-De9t0yF-.js.map → git-history-CxyH4jQb.js.map} +1 -1
- package/dist/web/server/chunks/{hooks.server-C3Uglne7.js → hooks.server-DgHxEf6H.js} +6 -6
- package/dist/web/server/chunks/{hooks.server-C3Uglne7.js.map → hooks.server-DgHxEf6H.js.map} +1 -1
- package/dist/web/server/chunks/{message-queue-sFcJCRjz.js → message-queue-DhLshpoF.js} +13 -2
- package/dist/web/server/chunks/message-queue-DhLshpoF.js.map +1 -0
- package/dist/web/server/chunks/{project-CbPa8Mu7.js → project-CBPdIh2n.js} +2 -2
- package/dist/web/server/chunks/{project-CbPa8Mu7.js.map → project-CBPdIh2n.js.map} +1 -1
- package/dist/web/server/chunks/{project-icons-CSb1bfT9.js → project-icons-bWhaFSVy.js} +4 -4
- package/dist/web/server/chunks/{project-icons-CSb1bfT9.js.map → project-icons-bWhaFSVy.js.map} +1 -1
- package/dist/web/server/chunks/{push-BJ7P9DGd.js → push-LMlCp4Lc.js} +5 -5
- package/dist/web/server/chunks/{push-BJ7P9DGd.js.map → push-LMlCp4Lc.js.map} +1 -1
- package/dist/web/server/chunks/{remote-control-C1d9R3w4.js → remote-control-BvYkVDhx.js} +2 -2
- package/dist/web/server/chunks/{remote-control-C1d9R3w4.js.map → remote-control-BvYkVDhx.js.map} +1 -1
- package/dist/web/server/chunks/{start-session-CKbupnLS.js → start-session-HljgutDe.js} +3 -3
- package/dist/web/server/chunks/{start-session-CKbupnLS.js.map → start-session-HljgutDe.js.map} +1 -1
- package/dist/web/server/chunks/{version-BqEJmw2g.js → version-ox9yLZ0P.js} +2 -2
- package/dist/web/server/chunks/version-ox9yLZ0P.js.map +1 -0
- package/dist/web/server/chunks/{web-preview-Bi5fjydK.js → web-preview-H5eiWlBD.js} +2 -2
- package/dist/web/server/chunks/{web-preview-Bi5fjydK.js.map → web-preview-H5eiWlBD.js.map} +1 -1
- package/dist/web/server/chunks/{ws-handlers-zemeJ8Si.js → ws-handlers-k_sOue-0.js} +6 -5
- package/dist/web/server/chunks/ws-handlers-k_sOue-0.js.map +1 -0
- package/dist/web/server/chunks/{ws-managers-C5VXKb_r.js → ws-managers-D2qC6Gla.js} +2 -2
- package/dist/web/server/chunks/{ws-managers-C5VXKb_r.js.map → ws-managers-D2qC6Gla.js.map} +1 -1
- package/dist/web/server/chunks/{ws-messages-jOSwT1Yq.js → ws-messages-B81v2RXg.js} +7 -2
- package/dist/web/server/chunks/ws-messages-B81v2RXg.js.map +1 -0
- package/dist/web/server/index.js +2 -2
- package/dist/web/server/index.js.map +1 -1
- package/dist/web/server/manifest.js +53 -53
- package/dist/web/server/manifest.js.map +1 -1
- package/package.json +1 -1
- package/src/fleet-places.ts +17 -1
- package/src/server/dictation-marks.ts +24 -1
- package/src/transcript/parser.ts +20 -3
- package/src/transcript/past-sessions.ts +3 -1
- package/src/utils/version.ts +1 -1
- package/tests/fleet-places.test.ts +20 -0
- package/tests/server/dictation-marks.test.ts +16 -0
- package/tests/transcript/parser.test.ts +34 -0
- package/tests/transcript/past-sessions.test.ts +5 -0
- package/web/.svelte-kit/adapter-bun/chunks/git.js +13 -4
- package/web/.svelte-kit/adapter-bun/chunks/git.js.map +1 -1
- package/web/.svelte-kit/adapter-bun/chunks/internal2.js +1 -1
- package/web/.svelte-kit/adapter-bun/chunks/internal2.js.map +1 -1
- package/web/.svelte-kit/adapter-bun/chunks/message-queue.js +14 -1
- package/web/.svelte-kit/adapter-bun/chunks/message-queue.js.map +1 -1
- package/web/.svelte-kit/adapter-bun/chunks/version.js +1 -1
- package/web/.svelte-kit/adapter-bun/chunks/version.js.map +1 -1
- package/web/.svelte-kit/adapter-bun/chunks/ws-handlers.js +2 -1
- package/web/.svelte-kit/adapter-bun/chunks/ws-handlers.js.map +1 -1
- package/web/.svelte-kit/adapter-bun/chunks/ws-messages.js +6 -1
- package/web/.svelte-kit/adapter-bun/chunks/ws-messages.js.map +1 -1
- package/web/.svelte-kit/adapter-bun/entries/pages/_layout.svelte.js +72 -45
- package/web/.svelte-kit/adapter-bun/entries/pages/_layout.svelte.js.map +1 -1
- package/web/.svelte-kit/adapter-bun/manifest-full.js +1 -1
- package/web/.svelte-kit/adapter-bun/manifest.js +1 -1
- package/web/.svelte-kit/adapter-bun/nodes/0.js +1 -1
- package/web/.svelte-kit/adapter-bun/nodes/1.js +1 -1
- package/web/.svelte-kit/adapter-bun/nodes/2.js +1 -1
- package/web/.svelte-kit/adapter-bun/nodes/3.js +1 -1
- package/web/.svelte-kit/adapter-bun/nodes/4.js +1 -1
- package/web/.svelte-kit/adapter-bun/nodes/5.js +1 -1
- package/web/.svelte-kit/adapter-bun/nodes/6.js +1 -1
- package/web/.svelte-kit/adapter-bun/nodes/7.js +1 -1
- package/web/.svelte-kit/adapter-bun/nodes/8.js +1 -1
- package/web/.svelte-kit/adapter-bun/nodes/9.js +1 -1
- package/web/.svelte-kit/generated/server/internal.js +1 -1
- package/web/.svelte-kit/output/client/.vite/manifest.json +237 -237
- package/web/.svelte-kit/output/client/_app/immutable/chunks/{sULMfRFG.js → B4FaHfAQ.js} +2 -2
- package/web/.svelte-kit/output/client/_app/immutable/chunks/{sULMfRFG.js.map → B4FaHfAQ.js.map} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/chunks/{W5_HMZ5E.js → B5Hkb2u5.js} +2 -2
- package/web/.svelte-kit/output/client/_app/immutable/chunks/{W5_HMZ5E.js.map → B5Hkb2u5.js.map} +1 -1
- package/{dist/web/client/_app/immutable/chunks/BQzv8cqz.js → web/.svelte-kit/output/client/_app/immutable/chunks/BOpEbBRb.js} +2 -2
- package/{dist/web/client/_app/immutable/chunks/BQzv8cqz.js.map → web/.svelte-kit/output/client/_app/immutable/chunks/BOpEbBRb.js.map} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/chunks/{Q5yhzux8.js → BeYjnogg.js} +2 -2
- package/{dist/web/client/_app/immutable/chunks/Q5yhzux8.js.map → web/.svelte-kit/output/client/_app/immutable/chunks/BeYjnogg.js.map} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/chunks/{VceCNUd7.js → C00rm3mY.js} +2 -2
- package/{dist/web/client/_app/immutable/chunks/VceCNUd7.js.map → web/.svelte-kit/output/client/_app/immutable/chunks/C00rm3mY.js.map} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/chunks/{CtjkAirr.js → CKg7gbPm.js} +9 -9
- package/web/.svelte-kit/output/client/_app/immutable/chunks/CKg7gbPm.js.map +1 -0
- package/web/.svelte-kit/output/client/_app/immutable/chunks/CPEphjdk.js +4 -0
- package/web/.svelte-kit/output/client/_app/immutable/chunks/CPEphjdk.js.map +1 -0
- package/web/.svelte-kit/output/client/_app/immutable/chunks/{BQQ3-rqs.js → CPlFo88J.js} +2 -2
- package/web/.svelte-kit/output/client/_app/immutable/chunks/{BQQ3-rqs.js.map → CPlFo88J.js.map} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/chunks/{BvX4FYxp.js → CtnjySwS.js} +2 -2
- package/web/.svelte-kit/output/client/_app/immutable/chunks/{BvX4FYxp.js.map → CtnjySwS.js.map} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/chunks/{XgSsj0QY.js → D3EW0jRH.js} +2 -2
- package/{dist/web/client/_app/immutable/chunks/XgSsj0QY.js.map → web/.svelte-kit/output/client/_app/immutable/chunks/D3EW0jRH.js.map} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/chunks/{CtlIfY1C.js → D3umr-Qr.js} +2 -2
- package/{dist/web/client/_app/immutable/chunks/CtlIfY1C.js.map → web/.svelte-kit/output/client/_app/immutable/chunks/D3umr-Qr.js.map} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/chunks/{CM0CI9GL.js → D8-_Y-M6.js} +3 -3
- package/web/.svelte-kit/output/client/_app/immutable/chunks/{CM0CI9GL.js.map → D8-_Y-M6.js.map} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/chunks/{cvsGFvDx.js → DDvK7Qo9.js} +2 -2
- package/{dist/web/client/_app/immutable/chunks/cvsGFvDx.js.map → web/.svelte-kit/output/client/_app/immutable/chunks/DDvK7Qo9.js.map} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/chunks/{CiU8KBun.js → _VFi-7U7.js} +2 -2
- package/web/.svelte-kit/output/client/_app/immutable/chunks/{CiU8KBun.js.map → _VFi-7U7.js.map} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/chunks/{DlENCZqZ.js → mQ6hkLuy.js} +2 -2
- package/web/.svelte-kit/output/client/_app/immutable/chunks/{DlENCZqZ.js.map → mQ6hkLuy.js.map} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/entry/{app.BwTbN8wB.js → app.CTFza_OS.js} +3 -3
- package/{dist/web/client/_app/immutable/entry/app.BwTbN8wB.js.map → web/.svelte-kit/output/client/_app/immutable/entry/app.CTFza_OS.js.map} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/entry/start.B-zlkyrt.js +2 -0
- package/web/.svelte-kit/output/client/_app/immutable/entry/start.B-zlkyrt.js.map +1 -0
- package/{dist/web/client/_app/immutable/nodes/0.BnHV-ElR.js → web/.svelte-kit/output/client/_app/immutable/nodes/0.Cztuq8Ih.js} +2 -2
- package/web/.svelte-kit/output/client/_app/immutable/nodes/{0.BnHV-ElR.js.map → 0.Cztuq8Ih.js.map} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/nodes/{1.Dc3ryOCf.js → 1.BOOL0V7K.js} +2 -2
- package/web/.svelte-kit/output/client/_app/immutable/nodes/{1.Dc3ryOCf.js.map → 1.BOOL0V7K.js.map} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/nodes/{2.DUrpAceY.js → 2.CArUpZNe.js} +2 -2
- package/web/.svelte-kit/output/client/_app/immutable/nodes/{2.DUrpAceY.js.map → 2.CArUpZNe.js.map} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/nodes/{3.BaCofjAn.js → 3.DSvIWalA.js} +2 -2
- package/web/.svelte-kit/output/client/_app/immutable/nodes/{3.BaCofjAn.js.map → 3.DSvIWalA.js.map} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/nodes/4.H6RMG_cy.js +2 -0
- package/web/.svelte-kit/output/client/_app/immutable/nodes/{4.v1wYkrvS.js.map → 4.H6RMG_cy.js.map} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/nodes/5.BHSt0Suo.js +2 -0
- package/web/.svelte-kit/output/client/_app/immutable/nodes/{5.Bn4A77jK.js.map → 5.BHSt0Suo.js.map} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/nodes/{6.C2hEoITj.js → 6.CzLoA0w7.js} +2 -2
- package/web/.svelte-kit/output/client/_app/immutable/nodes/{6.C2hEoITj.js.map → 6.CzLoA0w7.js.map} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/nodes/{7.BcHOjWdp.js → 7.fqq2vVa9.js} +2 -2
- package/web/.svelte-kit/output/client/_app/immutable/nodes/{7.BcHOjWdp.js.map → 7.fqq2vVa9.js.map} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/nodes/8.DNFFjTla.js +2 -0
- package/web/.svelte-kit/output/client/_app/immutable/nodes/{8.D7NtqIYy.js.map → 8.DNFFjTla.js.map} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/nodes/9.0kMPrp2-.js +2 -0
- package/web/.svelte-kit/output/client/_app/immutable/nodes/{9.D-211z9-.js.map → 9.0kMPrp2-.js.map} +1 -1
- package/web/.svelte-kit/output/client/_app/version.json +1 -1
- package/web/.svelte-kit/output/server/chunks/git.js +13 -4
- package/web/.svelte-kit/output/server/chunks/git.js.map +1 -1
- package/web/.svelte-kit/output/server/chunks/internal2.js +1 -1
- package/web/.svelte-kit/output/server/chunks/internal2.js.map +1 -1
- package/web/.svelte-kit/output/server/chunks/message-queue.js +14 -1
- package/web/.svelte-kit/output/server/chunks/message-queue.js.map +1 -1
- package/web/.svelte-kit/output/server/chunks/version.js +1 -1
- package/web/.svelte-kit/output/server/chunks/version.js.map +1 -1
- package/web/.svelte-kit/output/server/chunks/ws-handlers.js +2 -1
- package/web/.svelte-kit/output/server/chunks/ws-handlers.js.map +1 -1
- package/web/.svelte-kit/output/server/chunks/ws-messages.js +6 -1
- package/web/.svelte-kit/output/server/chunks/ws-messages.js.map +1 -1
- package/web/.svelte-kit/output/server/entries/pages/_layout.svelte.js +72 -45
- package/web/.svelte-kit/output/server/entries/pages/_layout.svelte.js.map +1 -1
- package/web/.svelte-kit/output/server/manifest-full.js +1 -1
- package/web/.svelte-kit/output/server/manifest.js +1 -1
- package/web/.svelte-kit/output/server/nodes/0.js +1 -1
- package/web/.svelte-kit/output/server/nodes/1.js +1 -1
- package/web/.svelte-kit/output/server/nodes/2.js +1 -1
- package/web/.svelte-kit/output/server/nodes/3.js +1 -1
- package/web/.svelte-kit/output/server/nodes/4.js +1 -1
- package/web/.svelte-kit/output/server/nodes/5.js +1 -1
- package/web/.svelte-kit/output/server/nodes/6.js +1 -1
- package/web/.svelte-kit/output/server/nodes/7.js +1 -1
- package/web/.svelte-kit/output/server/nodes/8.js +1 -1
- package/web/.svelte-kit/output/server/nodes/9.js +1 -1
- package/web/src/lib/components/AllSessionsPanel.svelte +9 -1
- package/web/src/lib/components/FolderPicker.svelte +49 -21
- package/dist/web/client/_app/immutable/chunks/CtjkAirr.js.map +0 -1
- package/dist/web/client/_app/immutable/chunks/Dck--FBb.js +0 -4
- package/dist/web/client/_app/immutable/chunks/Dck--FBb.js.map +0 -1
- package/dist/web/client/_app/immutable/entry/start.B2ZPizAt.js +0 -2
- package/dist/web/client/_app/immutable/entry/start.B2ZPizAt.js.map +0 -1
- package/dist/web/server/chunks/_layout.svelte-yrPX5VFm.js.map +0 -1
- package/dist/web/server/chunks/git-D9dLEKUF.js.map +0 -1
- package/dist/web/server/chunks/message-queue-sFcJCRjz.js.map +0 -1
- package/dist/web/server/chunks/version-BqEJmw2g.js.map +0 -1
- package/dist/web/server/chunks/ws-handlers-zemeJ8Si.js.map +0 -1
- package/dist/web/server/chunks/ws-messages-jOSwT1Yq.js.map +0 -1
- package/web/.svelte-kit/output/client/_app/immutable/chunks/CtjkAirr.js.map +0 -1
- package/web/.svelte-kit/output/client/_app/immutable/chunks/Dck--FBb.js +0 -4
- package/web/.svelte-kit/output/client/_app/immutable/chunks/Dck--FBb.js.map +0 -1
- package/web/.svelte-kit/output/client/_app/immutable/entry/start.B2ZPizAt.js +0 -2
- package/web/.svelte-kit/output/client/_app/immutable/entry/start.B2ZPizAt.js.map +0 -1
- package/web/.svelte-kit/output/client/_app/immutable/nodes/4.v1wYkrvS.js +0 -2
- package/web/.svelte-kit/output/client/_app/immutable/nodes/5.Bn4A77jK.js +0 -2
- package/web/.svelte-kit/output/client/_app/immutable/nodes/8.D7NtqIYy.js +0 -2
- package/web/.svelte-kit/output/client/_app/immutable/nodes/9.D-211z9-.js +0 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./CBRkCSvA.js","./Ji-H285c.js","./Dbx-oyS0.js","./C9TwCTc4.js","./MNLx6FrE.js","./BJ0HdUGh.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import"./DxJTiTth.js";import{g as q,h as on,i as e,j as v,L as Bn,z as h,be as _n,p as Ye,x as fe,f as R,a,b as $e,A as k,ac as Nt,B as b,c as u,w as Be,I as zt,bB as no,s as c,o as L,t as C,d as S,G as Kt,bg as ro,V as Ln,W as ot,J as fn,bl as ks,F as ht,bC as Ps,bf as _r,C as so}from"./BeqCgGI7.js";import{p as B,i as I,r as Et,c as Ft,b as mn}from"./Cjnj9mVX.js";import{o as rn,b as ue,e as Bt,a as ke,i as hr,s as Te,g as Yt,f as Ts,k as oo}from"./VDVYssW5.js";import{c as gr,au as ao,av as io,ap as lo,M as be,aw as co,ax as uo,ay as vo,az as fo,aA as Qn,aB as br,aC as yr,aD as er,aE as Ss,I as An,aF as Es,A as hn,C as nr,z as En,D as wr,E as Cs,F as Dn,R as Gn,G as xr,Q as Is,J as kr,L as gn,N as St,K as sn,aG as ho,aH as po,aI as mo,al as _o,a8 as go,a9 as Kn,aJ as bo,am as yo,aK as wo,P as vn,ah as Sn,at as xo,B as pn,e as $n,a as Ms,U as ko,W as Os}from"./CtjkAirr.js";import{c as Qe}from"./BgY8YOrV.js";import{P as As,H as Tn,n as Zt,J as Po,K as rr,L as Pr,M as To,N as So,O as Eo,o as Ls,Q as Kr,R as Ds,v as Co,x as Io,u as Rs,y as Mo,z as Oo,A as Hr,U as Ao,F as Lo,E as Do,D as Ro,T as No,S as Wr,a as Ns,V as jo,h as Un,W as qo,X as zo,c as Hn,s as js,e as ar,Y as Fo,Z as qn,_ as Bo,$ as Ko,a0 as Ur,I as Vn,i as qs,a1 as ir,j as zs,r as Tr,G as Fs,k as Bs,B as Ho,a2 as Wo,a3 as lr,a4 as Uo,a5 as zn,a6 as Vo,a7 as Go,b as Xo,a8 as Yo,a9 as $o,aa as Jo,ab as Zo,ac as Qo}from"./Q5yhzux8.js";import{_ as Ne}from"./CSBAZGsW.js";import{s as cr,d as Vr,r as ea,I as ta}from"./BQzv8cqz.js";import{i as na,j as ra,k as sa,h as oa,D as aa,l as ia}from"./cvsGFvDx.js";const xn=gr("claude-mux-preferences",{terminalTheming:!0,keepAwake:!1,notificationMode:"off",inAppToasts:!0,fileExplorerOpen:!0,fileWordWrap:!1});class la{#e=q(on(xn.load()));get prefs(){return e(this.#e)}set prefs(t){v(this.#e,t,!0)}get terminalTheming(){return this.prefs.terminalTheming}set terminalTheming(t){this.prefs.terminalTheming!==t&&(this.prefs.terminalTheming=t,xn.save(this.prefs))}get keepAwake(){return this.prefs.keepAwake}set keepAwake(t){this.prefs.keepAwake!==t&&(this.prefs.keepAwake=t,xn.save(this.prefs))}get notificationMode(){return this.prefs.notificationMode}set notificationMode(t){this.prefs.notificationMode!==t&&(this.prefs.notificationMode=t,xn.save(this.prefs))}get inAppToasts(){return this.prefs.inAppToasts}set inAppToasts(t){this.prefs.inAppToasts!==t&&(this.prefs.inAppToasts=t,xn.save(this.prefs))}toggle(t){typeof this.prefs[t]=="boolean"&&(this.prefs[t]=!this.prefs[t],xn.save(this.prefs))}get fileExplorerOpen(){return this.prefs.fileExplorerOpen??!0}set fileExplorerOpen(t){this.prefs.fileExplorerOpen=t,xn.save(this.prefs)}get fileWordWrap(){return this.prefs.fileWordWrap??!1}set fileWordWrap(t){this.prefs.fileWordWrap=t,xn.save(this.prefs)}}const ln=new la;function In(r){let t=q(on(r));return{[io]:!0,[ao]:!0,get current(){return e(t)},set current(n){v(t,n,!0)}}}In.from=lo;In.with=be;In.flatten=co;In.readonly=uo;In.isBox=vo;In.isWritableBox=fo;function ca(r){return window.getComputedStyle(r).getPropertyValue("direction")}function ua(r="ltr",t="horizontal"){return{horizontal:r==="rtl"?yr:br,vertical:er}[t]}function da(r="ltr",t="horizontal"){return{horizontal:r==="rtl"?br:yr,vertical:Qn}[t]}function va(r="ltr",t="horizontal"){return["ltr","rtl"].includes(r)||(r="ltr"),["horizontal","vertical"].includes(t)||(t="horizontal"),{nextKey:ua(r,t),prevKey:da(r,t)}}class fa{#e;#t=In(null);constructor(t){this.#e=t}getCandidateNodes(){if(!this.#e.rootNode.current)return[];if(this.#e.candidateSelector){const t=Array.from(this.#e.rootNode.current.querySelectorAll(this.#e.candidateSelector));return this.#n(this.#e.rootNode.current,t)}else if(this.#e.candidateAttr){const t=Array.from(this.#e.rootNode.current.querySelectorAll(`[${this.#e.candidateAttr}]:not([data-disabled])`));return this.#n(this.#e.rootNode.current,t)}return[]}#n(t,n){const s=this.#e.rootAttr;if(!s)return n;const o=`[${s}]`;return n.filter(i=>i.closest(o)===t)}focusFirstCandidate(){const t=this.getCandidateNodes();t.length&&t[0]?.focus()}handleKeydown(t,n,s=!1){const o=this.#e.rootNode.current;if(!o||!t)return;const i=this.getCandidateNodes();if(!i.length)return;const l=i.indexOf(t),d=ca(o),{nextKey:g,prevKey:P}=va(d,this.#e.orientation.current),E=this.#e.loop.current,O={[g]:l+1,[P]:l-1,[Es]:0,[Ss]:i.length-1};if(s){const K=g===er?br:er,p=P===Qn?yr:Qn;O[K]=l+1,O[p]=l-1}let A=O[n.key];if(A===void 0)return;n.preventDefault(),A<0&&E?A=i.length-1:A===i.length&&E&&(A=0);const M=i[A];if(M)return M.focus(),this.#t.current=M.id,this.#e.onCandidateFocus?.(M),M}getTabIndex(t){const n=this.getCandidateNodes(),s=this.#t.current!==null;return t&&!s&&n[0]===t?(this.#t.current=t.id,0):t?.id===this.#t.current?0:-1}setCurrentTabStopId(t){this.#t.current=t}focusCurrentTabStop(){const t=this.#t.current;if(!t)return;const n=this.#e.rootNode.current?.querySelector(`#${t}`);!n||!An(n)||n.focus()}}const pr={animationName:"none",transitionDuration:"0s"};class ha{#e=q(!1);constructor(t){v(this.#e,t(),!0),hn.pre(t,()=>{v(this.#e,!1)},{lazy:!0})}get style(){return e(this.#e)?pr:void 0}}function pa(r){const{animationName:t,transitionDuration:n}=r.style;r.style.animationName=pr.animationName,r.style.transitionDuration=pr.transitionDuration;const s=r.getBoundingClientRect();return r.style.animationName=t,r.style.transitionDuration=n,s}class ma{eventName;options;constructor(t,n={bubbles:!0,cancelable:!0}){this.eventName=t,this.options=n}createEvent(t){return new CustomEvent(this.eventName,{...this.options,detail:t})}dispatch(t,n){const s=this.createEvent(n);return t.dispatchEvent(s),s}listen(t,n,s){const o=i=>{n(i)};return Bn(t,this.eventName,o,s)}}function Ks(r,t,n){const s=t.toLowerCase();if(s.endsWith(" ")){const O=s.slice(0,-1);if(r.filter(p=>p.toLowerCase().startsWith(O)).length<=1)return Ks(r,O,n);const M=n?.toLowerCase();if(M&&M.startsWith(O)&&M.charAt(O.length)===" "&&t.trim()===O)return n;const K=r.filter(p=>p.toLowerCase().startsWith(s));if(K.length>0){const p=n?r.indexOf(n):-1;return Gr(K,Math.max(p,0)).find(te=>te!==n)||n}}const i=t.length>1&&Array.from(t).every(O=>O===t[0])?t[0]:t,l=i.toLowerCase(),d=n?r.indexOf(n):-1;let g=Gr(r,Math.max(d,0));i.length===1&&(g=g.filter(O=>O!==n));const E=g.find(O=>O?.toLowerCase().startsWith(l));return E!==n?E:void 0}function Gr(r,t){return r.map((n,s)=>r[(t+s)%r.length])}const Sr=kr({component:"collapsible",parts:["root","content","trigger"]}),Er=new nr("Collapsible.Root");class Cr{static create(t){return Er.set(new Cr(t))}opts;attachment;#e=q(null);get contentNode(){return e(this.#e)}set contentNode(t){v(this.#e,t,!0)}contentPresence;#t=q(void 0);get contentId(){return e(this.#t)}set contentId(t){v(this.#t,t,!0)}constructor(t){this.opts=t,this.toggleOpen=this.toggleOpen.bind(this),this.attachment=En(this.opts.ref),this.contentPresence=new As({ref:be(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}})}toggleOpen(){this.opts.open.current=!this.opts.open.current}#n=h(()=>({id:this.opts.id.current,"data-state":Gn(this.opts.open.current),"data-disabled":Dn(this.opts.disabled.current),[Sr.root]:"",...this.attachment}));get props(){return e(this.#n)}set props(t){v(this.#n,t)}}class Ir{static create(t){return new Ir(t,Er.get())}opts;root;attachment;#e=h(()=>this.opts.hiddenUntilFound.current?this.root.opts.open.current:this.opts.forceMount.current||this.root.opts.open.current);get present(){return e(this.#e)}set present(t){v(this.#e,t)}#t;#n=q(0);#r=q(0);constructor(t,n){this.opts=t,this.root=n,this.#t=new ha(()=>this.root.opts.open.current),this.root.contentId=this.opts.id.current,this.attachment=En(this.opts.ref,s=>this.root.contentNode=s),hn.pre(()=>this.opts.id.current,s=>{this.root.contentId=s}),hn.pre([()=>this.opts.ref.current,()=>this.opts.hiddenUntilFound.current],([s,o])=>!s||!o?void 0:Bn(s,"beforematch",()=>{this.root.opts.open.current||requestAnimationFrame(()=>{this.root.opts.open.current=!0})})),hn([()=>this.opts.ref.current,()=>this.present],([s])=>{if(!s)return;let o=!0;return Tn(()=>{if(!o||!this.opts.ref.current)return;const i=pa(s);v(this.#r,i.height,!0),v(this.#n,i.width,!0)}),()=>{o=!1}})}get shouldRender(){return this.root.contentPresence.shouldRender}#s=h(()=>({open:this.root.opts.open.current}));get snippetProps(){return e(this.#s)}set snippetProps(t){v(this.#s,t)}#a=h(()=>({id:this.opts.id.current,style:{"--bits-collapsible-content-height":e(this.#r)?`${e(this.#r)}px`:void 0,"--bits-collapsible-content-width":e(this.#n)?`${e(this.#n)}px`:void 0,...this.#t.style},hidden:this.opts.hiddenUntilFound.current&&!this.root.opts.open.current?"until-found":void 0,"data-state":Gn(this.root.opts.open.current),...Is(this.root.contentPresence.transitionStatus),"data-disabled":Dn(this.root.opts.disabled.current),[Sr.content]:"",...this.opts.hiddenUntilFound.current&&!this.shouldRender?{}:{hidden:this.opts.hiddenUntilFound.current?!this.shouldRender:this.opts.forceMount.current?void 0:!this.shouldRender},...this.attachment}));get props(){return e(this.#a)}set props(t){v(this.#a,t)}}class Mr{static create(t){return new Mr(t,Er.get())}opts;root;attachment;#e=h(()=>this.opts.disabled.current||this.root.opts.disabled.current);constructor(t,n){this.opts=t,this.root=n,this.attachment=En(this.opts.ref),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}onclick(t){if(!e(this.#e)){if(t.button!==0)return t.preventDefault();this.root.toggleOpen()}}onkeydown(t){e(this.#e)||(t.key===wr||t.key===Cs)&&(t.preventDefault(),this.root.toggleOpen())}#t=h(()=>({id:this.opts.id.current,type:"button",disabled:e(this.#e),"aria-controls":this.root.contentId,"aria-expanded":xr(this.root.opts.open.current),"data-state":Gn(this.root.opts.open.current),"data-disabled":Dn(e(this.#e)),[Sr.trigger]:"",onclick:this.onclick,onkeydown:this.onkeydown,...this.attachment}));get props(){return e(this.#t)}set props(t){v(this.#t,t)}}var _a=new Set(["$$slots","$$events","$$legacy","children","child","id","ref","open","disabled","onOpenChange","onOpenChangeComplete"]),ga=u("<div><!></div>");function ba(r,t){const n=_n();Ye(t,!0);let s=B(t,"id",19,()=>gn(n)),o=B(t,"ref",15,null),i=B(t,"open",15,!1),l=B(t,"disabled",3,!1),d=B(t,"onOpenChange",3,Zt),g=B(t,"onOpenChangeComplete",3,Zt),P=Et(t,_a);const E=Cr.create({open:be(()=>i(),m=>{i(m),d()(m)}),disabled:be(()=>l()),id:be(()=>s()),ref:be(()=>o(),m=>o(m)),onOpenChangeComplete:be(()=>g())}),O=h(()=>sn(P,E.props));var A=fe(),M=R(A);{var K=m=>{var j=fe(),te=R(j);St(te,()=>t.child,()=>({props:e(O)})),a(m,j)},p=m=>{var j=ga();rn(j,()=>({...e(O)}));var te=k(j);St(te,()=>t.children??Nt),b(j),a(m,j)};I(M,m=>{t.child?m(K):m(p,-1)})}a(r,A),$e()}var ya=new Set(["$$slots","$$events","$$legacy","child","ref","forceMount","hiddenUntilFound","children","id"]),wa=u("<div><!></div>");function xa(r,t){const n=_n();Ye(t,!0);let s=B(t,"ref",15,null),o=B(t,"forceMount",3,!1),i=B(t,"hiddenUntilFound",3,!1),l=B(t,"id",19,()=>gn(n)),d=Et(t,ya);const g=Ir.create({id:be(()=>l()),forceMount:be(()=>o()),hiddenUntilFound:be(()=>i()),ref:be(()=>s(),K=>s(K))}),P=h(()=>sn(d,g.props));var E=fe(),O=R(E);{var A=K=>{var p=fe(),m=R(p);{let j=h(()=>({...g.snippetProps,props:e(P)}));St(m,()=>t.child,()=>e(j))}a(K,p)},M=K=>{var p=wa();rn(p,()=>({...e(P)}));var m=k(p);St(m,()=>t.children??Nt),b(p),a(K,p)};I(O,K=>{t.child?K(A):K(M,-1)})}a(r,E),$e()}var ka=new Set(["$$slots","$$events","$$legacy","children","child","ref","id","disabled"]),Pa=u("<button><!></button>");function Ta(r,t){const n=_n();Ye(t,!0);let s=B(t,"ref",15,null),o=B(t,"id",19,()=>gn(n)),i=B(t,"disabled",3,!1),l=Et(t,ka);const d=Mr.create({id:be(()=>o()),ref:be(()=>s(),M=>s(M)),disabled:be(()=>i())}),g=h(()=>sn(l,d.props));var P=fe(),E=R(P);{var O=M=>{var K=fe(),p=R(K);St(p,()=>t.child,()=>({props:e(g)})),a(M,K)},A=M=>{var K=Pa();rn(K,()=>({...e(g)}));var p=k(K);St(p,()=>t.children??Nt),b(K),a(M,K)};I(E,M=>{t.child?M(O):M(A,-1)})}a(r,P),$e()}const Sa={afterMs:1e4,onChange:Zt};function Ea(r,t){const{afterMs:n,onChange:s,getWindow:o}={...Sa,...t};let i=null,l=q(on(r));function d(){return o().setTimeout(()=>{v(l,r,!0),s?.(r)},n)}return Be(()=>()=>{i&&o().clearTimeout(i)}),be(()=>e(l),g=>{v(l,g,!0),s?.(g),i&&o().clearTimeout(i),i=d()})}class Ca{#e;#t;#n=h(()=>this.#e.onMatch?this.#e.onMatch:t=>t.focus());#r=h(()=>this.#e.getCurrentItem?this.#e.getCurrentItem:this.#e.getActiveElement);constructor(t){this.#e=t,this.#t=Ea("",{afterMs:1e3,getWindow:t.getWindow}),this.handleTypeaheadSearch=this.handleTypeaheadSearch.bind(this),this.resetTypeahead=this.resetTypeahead.bind(this)}handleTypeaheadSearch(t,n){if(!n.length)return;this.#t.current=this.#t.current+t;const s=e(this.#r)(),o=n.find(g=>g===s)?.textContent?.trim()??"",i=n.map(g=>g.textContent?.trim()??""),l=Ks(i,this.#t.current,o),d=n.find(g=>g.textContent?.trim()===l);return d&&e(this.#n)(d),d}resetTypeahead(){this.#t.current=""}get search(){return this.#t.current}}function Hs(r,t){Ye(t,!0);let n=B(t,"tooltip",3,!1);Po.create({id:be(()=>t.id),virtualEl:be(()=>t.virtualEl),ref:zt(()=>t.ref)},zt(()=>n()));var s=fe(),o=R(s);St(o,()=>t.children??Nt),a(r,s),$e()}const Ia=[Cs,wr],Ma=[er,ho,Es],Ws=[Qn,po,Ss],Oa=[...Ma,...Ws];function cn(r){return r.pointerType==="mouse"}function Aa(r,{select:t=!1}={}){if(!r||!r.focus)return;const n=rr(r);if(n.activeElement===r)return;const s=n.activeElement;r.focus({preventScroll:!0}),r!==s&&mo(r)&&t&&r.select()}function La(r,{select:t=!1}={},n){const s=n();for(const o of r)if(Aa(o,{select:t}),n()!==s)return!0}let On=q(!1);class Pn{static _refs=0;static _cleanup;constructor(){Be(()=>(Pn._refs===0&&(Pn._cleanup=no(()=>{const t=[],n=o=>{v(On,!1)},s=o=>{v(On,!0)};return t.push(Bn(document,"pointerdown",n,{capture:!0}),Bn(document,"keydown",s,{capture:!0})),Be(()=>{if(e(On))return Bn(document,"pointermove",n,{capture:!0})}),_o(...t)})),Pn._refs++,()=>{Pn._refs--,Pn._refs===0&&(v(On,!1),Pn._cleanup?.())}))}get current(){return e(On)}set current(t){v(On,t,!0)}}function Wn(){return{getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"}}function Da(r,t){if(!Pr(r,Wn()))return Ra(r,t);const n=rr(r),s=To(n.body,Wn());t==="prev"&&s.reverse();const o=s.indexOf(r);return o===-1?n.body:s.slice(o+1)[0]}function Ra(r,t){const n=rr(r);if(!So(r,Wn()))return n.body;const s=Eo(n.body,Wn());t==="prev"&&s.reverse();const o=s.indexOf(r);return o===-1?n.body:s.slice(o+1).find(l=>Pr(l,Wn()))??n.body}const Us=new nr("Menu.Root"),Or=new nr("Menu.Root | Menu.Sub"),Vs=new nr("Menu.Content"),Na=new ma("bitsmenuopen",{bubbles:!1,cancelable:!0}),ja=kr({component:"menu",parts:["trigger","content","sub-trigger","item","group","group-heading","checkbox-group","checkbox-item","radio-group","radio-item","separator","sub-content","arrow"]});class qa{#e;#t=null;#n=null;#r=!1;#s=null;#a=null;#o=null;#l=null;constructor(t){this.#e=t,hn([t.triggerNode,t.contentNode,t.enabled],([n,s,o])=>{if(this.#p(),!n||!s||!o)return;const i=O=>{cn(O)&&(this.#l={x:O.clientX,y:O.clientY},this.#r||this.#y(O,"content"))},l=O=>{cn(O)&&this.#w(O,"content")},d=O=>{cn(O)&&(this.#r||this.#y(O,"trigger"))},g=O=>{if(cn(O)){if(Kn(O.relatedTarget)){const A=this.#e.subContentSelector(),M=O.relatedTarget.closest(A);if(M&&M!==s&&M.id&&!!s.querySelector(`[aria-controls="${M.id}"]`))return}this.#w(O,"trigger")}},P=O=>{cn(O)&&this.#v()},E=O=>{cn(O)&&this.#v()};return n.addEventListener("pointermove",i),n.addEventListener("pointerleave",l),n.addEventListener("pointerenter",P),s.addEventListener("pointermove",d),s.addEventListener("pointerleave",g),s.addEventListener("pointerenter",E),()=>{n.removeEventListener("pointermove",i),n.removeEventListener("pointerleave",l),n.removeEventListener("pointerenter",P),s.removeEventListener("pointermove",d),s.removeEventListener("pointerleave",g),s.removeEventListener("pointerenter",E),this.#p()}}),Ls(()=>{this.#p()})}#d(){const t=this.#e.parentContentNode();return t?t.getBoundingClientRect():this.#e.triggerNode()?.getBoundingClientRect()??null}#i(t,n){const s=this.#e.triggerNode(),o=this.#e.contentNode();if(!s||!o)return null;const i=s.getBoundingClientRect(),l=o.getBoundingClientRect(),d=Fa(i,l);let g,P,E;return n==="content"?(g=this.#r?this.#a??t:t,P=l):(g=this.#l??t,P=this.#d()??i,E=l),this.#a=g,{corridor:Ba(i,l,d),intent:Ka(g,P,d,n,E),targetRect:P,side:d}}#b(t,n,s){return Xr(t,n)||Xr(t,s)}#y(t,n){const s={x:t.clientX,y:t.clientY};this.#i(s,n)&&(this.#s=n,this.#o=s)}#w(t,n){if(!this.#e.enabled())return;const s=this.#e.triggerNode(),o=this.#e.contentNode();if(!s||!o)return;const i=t.relatedTarget;if(Kn(i)&&(n==="content"&&o.contains(i)||n==="trigger"&&s.contains(i)))return;const l={x:t.clientX,y:t.clientY},d=this.#i(l,n);if(d){if(!Yr(l,d.targetRect)&&!this.#b(l,d.corridor,d.intent)){this.#g();return}this.#r=!0,this.#s=n,this.#o=l,this.#e.setIsPointerInTransit(!0),this.#P(),this.#_()}}#c=null;#v(){if(!this.#r)return;const t=this.#s==="trigger";this.#m(),this.#u(),this.#r=!1,this.#g(),t?(this.#h(),this.#c=setTimeout(()=>{this.#c=null,this.#e.setIsPointerInTransit(!1)},100)):this.#e.setIsPointerInTransit(!1)}#h(){this.#c!==null&&(clearTimeout(this.#c),this.#c=null)}#f(){const t=this.#o;this.#m(),this.#u(),this.#h(),this.#r=!1,this.#e.setIsPointerInTransit(!1),this.#g(),this.#e.onIntentExit(t)}#p(){this.#m(),this.#u(),this.#h(),this.#r&&this.#e.setIsPointerInTransit(!1),this.#r=!1,this.#s=null,this.#a=null,this.#o=null,this.#l=null}#k(t){const n=this.#e.contentNode();if(!n)return!1;const o=n.ownerDocument.elementFromPoint(t.x,t.y);if(!o)return!1;const i=this.#e.subContentSelector(),l=o.closest(i);return!l||l===n?!1:l.id?!!n.querySelector(`[aria-controls="${l.id}"]`):!1}#x=t=>{if(!this.#r||!this.#s||!cn(t))return;const n=this.#e.triggerNode(),s=this.#e.contentNode();if(!n||!s){this.#f();return}this.#u();const o={x:t.clientX,y:t.clientY};this.#o=o;const i=n.getBoundingClientRect(),l=s.getBoundingClientRect();if(this.#s==="content"&&Yr(o,l)){this.#v();return}if(this.#s==="trigger"&&za(o,i,4)){this.#v();return}if(this.#k(o)){this.#_();return}const d=this.#i(o,this.#s);if(!d){this.#f();return}if(this.#b(o,d.corridor,d.intent)){this.#_();return}this.#f()};#P(){if(this.#t)return;const t=rr(this.#e.triggerNode()??this.#e.contentNode());t&&(t.addEventListener("pointermove",this.#x,!0),this.#t=()=>{t.removeEventListener("pointermove",this.#x,!0),this.#t=null})}#m(){this.#t?.()}#_(){this.#u(),this.#n=setTimeout(()=>{this.#n=null,this.#r&&this.#f()},500)}#u(){this.#n!==null&&(clearTimeout(this.#n),this.#n=null)}#g(){this.#s=null,this.#a=null,this.#o=null}}function Xr(r,t){const{x:n,y:s}=r;let o=!1;for(let i=0,l=t.length-1;i<t.length;l=i++){const d=t[i].x,g=t[i].y,P=t[l].x,E=t[l].y;g>s!=E>s&&n<(P-d)*(s-g)/(E-g)+d&&(o=!o)}return o}function Yr(r,t){return r.x>=t.left&&r.x<=t.right&&r.y>=t.top&&r.y<=t.bottom}function za(r,t,n){return r.x>=t.left+n&&r.x<=t.right-n&&r.y>=t.top+n&&r.y<=t.bottom-n}function Fa(r,t){const n=r.left+r.width/2,s=r.top+r.height/2,o=t.left+t.width/2,i=t.top+t.height/2,l=o-n,d=i-s;return Math.abs(l)>Math.abs(d)?l>0?"right":"left":d>0?"bottom":"top"}function Ba(r,t,n){switch(n){case"top":return[{x:Math.min(r.left,t.left)-2,y:r.top},{x:Math.min(r.left,t.left)-2,y:t.bottom},{x:Math.max(r.right,t.right)+2,y:t.bottom},{x:Math.max(r.right,t.right)+2,y:r.top}];case"bottom":return[{x:Math.min(r.left,t.left)-2,y:r.bottom},{x:Math.min(r.left,t.left)-2,y:t.top},{x:Math.max(r.right,t.right)+2,y:t.top},{x:Math.max(r.right,t.right)+2,y:r.bottom}];case"left":return[{x:r.left,y:Math.min(r.top,t.top)-2},{x:t.right,y:Math.min(r.top,t.top)-2},{x:t.right,y:Math.max(r.bottom,t.bottom)+2},{x:r.left,y:Math.max(r.bottom,t.bottom)+2}];case"right":return[{x:r.right,y:Math.min(r.top,t.top)-2},{x:t.left,y:Math.min(r.top,t.top)-2},{x:t.left,y:Math.max(r.bottom,t.bottom)+2},{x:r.right,y:Math.max(r.bottom,t.bottom)+2}]}}function Ka(r,t,n,s,o){const l=s==="trigger"?Ha(n):n,d=o?Math.min(t.top,o.top)-8:t.top-8,g=o?Math.max(t.bottom,o.bottom)+8:t.bottom+8,P=o?Math.min(t.left,o.left)-8:t.left-8,E=o?Math.max(t.right,o.right)+8:t.right+8;switch(l){case"right":return[r,{x:t.left,y:d},{x:t.left,y:g}];case"left":return[r,{x:t.right,y:d},{x:t.right,y:g}];case"bottom":return[r,{x:P,y:t.top},{x:E,y:t.top}];case"top":return[r,{x:P,y:t.bottom},{x:E,y:t.bottom}]}}function Ha(r){switch(r){case"top":return"bottom";case"bottom":return"top";case"left":return"right";case"right":return"left"}}class Ar{static create(t){const n=new Ar(t);return Us.set(n)}opts;isUsingKeyboard=new Pn;#e=q(!1);get ignoreCloseAutoFocus(){return e(this.#e)}set ignoreCloseAutoFocus(t){v(this.#e,t,!0)}#t=q(!1);get isPointerInTransit(){return e(this.#t)}set isPointerInTransit(t){v(this.#t,t,!0)}constructor(t){this.opts=t}getBitsAttr=t=>ja.getAttr(t,this.opts.variant.current)}class Lr{static create(t,n){return Or.set(new Lr(t,n,null))}opts;root;parentMenu;#e=q(be(()=>""));get contentId(){return e(this.#e)}set contentId(t){v(this.#e,t)}#t=q(null);get contentNode(){return e(this.#t)}set contentNode(t){v(this.#t,t,!0)}contentPresence;#n=q(null);get triggerNode(){return e(this.#n)}set triggerNode(t){v(this.#n,t,!0)}constructor(t,n,s){this.opts=t,this.root=n,this.parentMenu=s,this.contentPresence=new As({ref:be(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)},shouldSkipExitAnimation:()=>this.root.opts.variant.current!=="menubar"||this.parentMenu!==null?!1:this.root.opts.shouldSkipExitAnimation?.()??!1}),s&&hn(()=>s.opts.open.current,()=>{s.opts.open.current||(this.opts.open.current=!1)})}toggleOpen(){this.opts.open.current=!this.opts.open.current}onOpen(){this.opts.open.current=!0}onClose(){this.opts.open.current=!1}}class Dr{static create(t){return Vs.set(new Dr(t,Or.get()))}opts;parentMenu;rovingFocusGroup;domContext;attachment;#e=q("");get search(){return e(this.#e)}set search(t){v(this.#e,t,!0)}#t=0;#n;#r=q(!1);get mounted(){return e(this.#r)}set mounted(t){v(this.#r,t,!0)}pressedItem=null;#s;constructor(t,n){this.opts=t,this.parentMenu=n,this.domContext=new Co(t.ref),this.attachment=En(this.opts.ref,s=>{this.parentMenu.contentNode!==s&&(this.parentMenu.contentNode=s)}),n.contentId=t.id,this.#s=t.isSub??!1,this.onkeydown=this.onkeydown.bind(this),this.onblur=this.onblur.bind(this),this.onfocus=this.onfocus.bind(this),this.handleInteractOutside=this.handleInteractOutside.bind(this),new qa({contentNode:()=>this.parentMenu.contentNode,triggerNode:()=>this.parentMenu.triggerNode,parentContentNode:()=>this.parentMenu.parentMenu?.contentNode??null,subContentSelector:()=>`[${this.parentMenu.root.getBitsAttr("sub-content")}]`,enabled:()=>this.parentMenu.opts.open.current&&!!this.parentMenu.triggerNode?.hasAttribute(this.parentMenu.root.getBitsAttr("sub-trigger")),onIntentExit:s=>{this.parentMenu.opts.open.current=!1,this.#l(s)},setIsPointerInTransit:s=>{this.parentMenu.root.isPointerInTransit=s}}),this.#n=new Ca({getActiveElement:()=>this.domContext.getActiveElement(),getWindow:()=>this.domContext.getWindow()}).handleTypeaheadSearch,this.rovingFocusGroup=new fa({rootNode:be(()=>this.parentMenu.contentNode),candidateAttr:this.parentMenu.root.getBitsAttr("item"),loop:this.opts.loop,orientation:be(()=>"vertical")}),hn(()=>this.parentMenu.contentNode,s=>{if(!s)return;const o=()=>{Tn(()=>{this.parentMenu.root.isUsingKeyboard.current&&this.rovingFocusGroup.focusFirstCandidate()})};return Na.listen(s,o)}),Be(()=>{this.parentMenu.opts.open.current||(this.domContext.getWindow().clearTimeout(this.#t),this.clearPressedItem())})}#a(){const t=this.parentMenu.contentNode;return t?Array.from(t.querySelectorAll(`[${this.parentMenu.root.getBitsAttr("item")}]:not([data-disabled])`)):[]}#o(){return this.parentMenu.root.isPointerInTransit}#l(t){if(!t)return;const n=this.parentMenu.parentMenu?.contentNode;if(!n)return;const s=this.domContext.getDocument().elementFromPoint(t.x,t.y);if(!Kn(s))return;const o=s.closest(`[${this.parentMenu.root.getBitsAttr("sub-trigger")}]`);!o||!n.contains(o)||o!==this.parentMenu.triggerNode&&o.dispatchEvent(new PointerEvent("pointermove",{bubbles:!0,cancelable:!0,pointerType:"mouse",clientX:t.x,clientY:t.y}))}onCloseAutoFocus=t=>{if(this.opts.onCloseAutoFocus.current?.(t),!(t.defaultPrevented||this.#s)){if(this.parentMenu.root.ignoreCloseAutoFocus){t.preventDefault();return}this.parentMenu.triggerNode&&Pr(this.parentMenu.triggerNode)&&(t.preventDefault(),this.parentMenu.triggerNode.focus())}};handleTabKeyDown(t){let n=this.parentMenu;for(;n.parentMenu!==null;)n=n.parentMenu;if(!n.triggerNode)return;t.preventDefault();const s=Da(n.triggerNode,t.shiftKey?"prev":"next");s?(this.parentMenu.root.ignoreCloseAutoFocus=!0,n.onClose(),Tn(()=>{s.focus(),Tn(()=>{this.parentMenu.root.ignoreCloseAutoFocus=!1})})):this.domContext.getDocument().body.focus()}onkeydown(t){if(t.defaultPrevented)return;if(t.key===bo){this.handleTabKeyDown(t);return}const n=t.target,s=t.currentTarget;if(!An(n)||!An(s))return;const o=n.closest(`[${this.parentMenu.root.getBitsAttr("content")}]`)?.id===this.parentMenu.contentId.current,i=t.ctrlKey||t.altKey||t.metaKey,l=t.key.length===1;if(this.rovingFocusGroup.handleKeydown(n,t)||t.code==="Space")return;const g=this.#a();o&&!i&&l&&this.#n(t.key,g),t.target?.id===this.parentMenu.contentId.current&&Oa.includes(t.key)&&(t.preventDefault(),Ws.includes(t.key)&&g.reverse(),La(g,{select:!1},()=>this.domContext.getActiveElement()))}onblur(t){Kn(t.currentTarget)&&Kn(t.target)&&(t.currentTarget.contains?.(t.target)||(this.domContext.getWindow().clearTimeout(this.#t),this.search=""))}onfocus(t){this.parentMenu.root.isUsingKeyboard.current&&Tn(()=>this.rovingFocusGroup.focusFirstCandidate())}onItemEnter(){return this.#o()}onItemLeave(t){if(t.currentTarget.hasAttribute(this.parentMenu.root.getBitsAttr("sub-trigger"))||this.#o()||this.parentMenu.root.isUsingKeyboard.current)return;this.parentMenu.contentNode?.focus({preventScroll:!0}),this.rovingFocusGroup.setCurrentTabStopId("")}onTriggerLeave(){return!!this.#o()}handleInteractOutside(t){if(!yo(t.target))return;const n=this.parentMenu.triggerNode?.id;if(t.target.id===n){t.preventDefault();return}if(t.target.closest(`#${n}`)){t.preventDefault();return}this.parentMenu.root.ignoreCloseAutoFocus=!0,Tn(()=>{this.parentMenu.root.ignoreCloseAutoFocus=!1})}clearPressedItem=()=>{this.pressedItem=null};get shouldRender(){return this.parentMenu.contentPresence.shouldRender}#d=h(()=>({open:this.parentMenu.opts.open.current}));get snippetProps(){return e(this.#d)}set snippetProps(t){v(this.#d,t)}#i=h(()=>({id:this.opts.id.current,role:"menu","aria-orientation":"vertical",[this.parentMenu.root.getBitsAttr("content")]:"","data-state":Gn(this.parentMenu.opts.open.current),...Is(this.parentMenu.contentPresence.transitionStatus),onkeydown:this.onkeydown,onblur:this.onblur,onfocus:this.onfocus,onpointerdowncapture:this.clearPressedItem,dir:this.parentMenu.root.opts.dir.current,style:{pointerEvents:"auto",contain:"layout style"},...this.attachment}));get props(){return e(this.#i)}set props(t){v(this.#i,t)}popperProps={onCloseAutoFocus:t=>this.onCloseAutoFocus(t)}}class Wa{opts;content;attachment;#e=q(!1);constructor(t,n){this.opts=t,this.content=n,this.attachment=En(this.opts.ref),this.onpointermove=this.onpointermove.bind(this),this.onpointerleave=this.onpointerleave.bind(this),this.onfocus=this.onfocus.bind(this),this.onblur=this.onblur.bind(this)}onpointermove(t){if(!t.defaultPrevented&&cn(t))if(this.opts.disabled.current)this.content.onItemLeave(t);else{if(this.content.onItemEnter())return;const s=t.currentTarget;if(!An(s))return;s.focus({preventScroll:!0})}}onpointerleave(t){t.defaultPrevented||cn(t)&&this.content.onItemLeave(t)}onfocus(t){Tn(()=>{t.defaultPrevented||this.opts.disabled.current||v(this.#e,!0)})}onblur(t){Tn(()=>{t.defaultPrevented||v(this.#e,!1)})}#t=h(()=>({id:this.opts.id.current,tabindex:-1,role:"menuitem","aria-disabled":xr(this.opts.disabled.current),"data-disabled":Dn(this.opts.disabled.current),"data-highlighted":e(this.#e)?"":void 0,[this.content.parentMenu.root.getBitsAttr("item")]:"",onpointermove:this.onpointermove,onpointerleave:this.onpointerleave,onfocus:this.onfocus,onblur:this.onblur,...this.attachment}));get props(){return e(this.#t)}set props(t){v(this.#t,t)}}class Rr{static create(t){const n=new Wa(t,Vs.get());return new Rr(t,n)}opts;item;root;constructor(t,n){this.opts=t,this.item=n,this.root=n.content.parentMenu.root,this.onkeydown=this.onkeydown.bind(this),this.onclick=this.onclick.bind(this),this.onpointerdown=this.onpointerdown.bind(this),this.onpointerup=this.onpointerup.bind(this)}#e(){if(this.item.opts.disabled.current)return;const t=new CustomEvent("menuitemselect",{bubbles:!0,cancelable:!0});if(this.opts.onSelect.current(t),t.defaultPrevented){this.item.content.parentMenu.root.isUsingKeyboard.current=!1;return}this.opts.closeOnSelect.current&&this.item.content.parentMenu.root.opts.onClose()}onkeydown(t){const n=this.item.content.search!=="";if(!(this.item.opts.disabled.current||n&&t.key===wr)&&Ia.includes(t.key)){if(!An(t.currentTarget))return;t.currentTarget.click(),t.preventDefault()}}onclick(t){this.item.opts.disabled.current||this.#e()}onpointerup(t){const n=this.item.content,s=n.pressedItem;if(n.pressedItem=null,t.defaultPrevented||s?.item===this)return;const o=s&&Math.hypot(t.clientX-s.x,t.clientY-s.y)<4?s.item.item.opts.ref.current:t.currentTarget;An(o)&&o.click()}onpointerdown(t){this.item.content.pressedItem={item:this,x:t.clientX,y:t.clientY}}#t=h(()=>sn(this.item.props,{onclick:this.onclick,onpointerdown:this.onpointerdown,onpointerup:this.onpointerup,onkeydown:this.onkeydown}));get props(){return e(this.#t)}set props(t){v(this.#t,t)}}class Nr{static create(t){return new Nr(t,Us.get())}opts;root;attachment;constructor(t,n){this.opts=t,this.root=n,this.attachment=En(this.opts.ref)}#e=h(()=>({id:this.opts.id.current,role:"separator",[this.root.getBitsAttr("separator")]:"",...this.attachment}));get props(){return e(this.#e)}set props(t){v(this.#e,t)}}class jr{static create(t){return new jr(t,Or.get())}opts;parentMenu;attachment;#e=q(on({x:0,y:0}));virtualElement=go({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...e(this.#e)})});#t=null;constructor(t,n){this.opts=t,this.parentMenu=n,this.attachment=En(this.opts.ref,s=>this.parentMenu.triggerNode=s),this.oncontextmenu=this.oncontextmenu.bind(this),this.onpointerdown=this.onpointerdown.bind(this),this.onpointermove=this.onpointermove.bind(this),this.onpointercancel=this.onpointercancel.bind(this),this.onpointerup=this.onpointerup.bind(this),hn(()=>e(this.#e),s=>{this.virtualElement.current={getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...s})}}),hn(()=>this.opts.disabled.current,s=>{s&&this.#n()}),Ls(()=>this.#n())}#n(){this.#t!==null&&Kr(this.opts.ref.current).clearTimeout(this.#t)}#r(t){v(this.#e,{x:t.clientX,y:t.clientY},!0),this.parentMenu.onOpen()}oncontextmenu(t){t.defaultPrevented||this.opts.disabled.current||(this.#n(),this.#r(t),t.preventDefault(),this.parentMenu.contentNode?.focus())}onpointerdown(t){this.opts.disabled.current||cn(t)||(this.#n(),this.#t=Kr(this.opts.ref.current).setTimeout(()=>this.#r(t),700))}onpointermove(t){this.opts.disabled.current||cn(t)||this.#n()}onpointercancel(t){this.opts.disabled.current||cn(t)||this.#n()}onpointerup(t){this.opts.disabled.current||cn(t)||this.#n()}#s=h(()=>({id:this.opts.id.current,disabled:this.opts.disabled.current,"data-disabled":Dn(this.opts.disabled.current),"data-state":Gn(this.parentMenu.opts.open.current),[Ds]:"",tabindex:-1,onpointerdown:this.onpointerdown,onpointermove:this.onpointermove,onpointercancel:this.onpointercancel,onpointerup:this.onpointerup,oncontextmenu:this.oncontextmenu,...this.attachment}));get props(){return e(this.#s)}set props(t){v(this.#s,t)}}function Ua(r,t){Ye(t,!0);let n=B(t,"open",15,!1),s=B(t,"dir",3,"ltr"),o=B(t,"onOpenChange",3,Zt),i=B(t,"onOpenChangeComplete",3,Zt);const l=Ar.create({variant:be(()=>"context-menu"),dir:be(()=>s()),onClose:()=>{n(!1),o()?.(!1)}});Lr.create({open:be(()=>n(),d=>{n(d),o()(d)}),onOpenChangeComplete:be(()=>i())},l),Io(r,{children:(d,g)=>{var P=fe(),E=R(P);St(E,()=>t.children??Nt),a(d,P)},$$slots:{default:!0}}),$e()}var Va=new Set(["$$slots","$$events","$$legacy","child","children","ref","id","disabled","onSelect","closeOnSelect"]),Ga=u("<div><!></div>");function Xa(r,t){const n=_n();Ye(t,!0);let s=B(t,"ref",15,null),o=B(t,"id",19,()=>gn(n)),i=B(t,"disabled",3,!1),l=B(t,"onSelect",3,Zt),d=B(t,"closeOnSelect",3,!0),g=Et(t,Va);const P=Rr.create({id:be(()=>o()),disabled:be(()=>i()),onSelect:be(()=>l()),ref:be(()=>s(),p=>s(p)),closeOnSelect:be(()=>d())}),E=h(()=>sn(g,P.props));var O=fe(),A=R(O);{var M=p=>{var m=fe(),j=R(m);St(j,()=>t.child,()=>({props:e(E)})),a(p,m)},K=p=>{var m=Ga();rn(m,()=>({...e(E)}));var j=k(m);St(j,()=>t.children??Nt),b(m),a(p,m)};I(A,p=>{t.child?p(M):p(K,-1)})}a(r,O),$e()}var Ya=new Set(["$$slots","$$events","$$legacy","id","child","children","ref","loop","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","preventScroll","side","sideOffset","align","onEscapeKeydown","forceMount","trapFocus","style"]),$r=u("<div><div><!></div></div>");function $a(r,t){Ye(t,!0);let n=B(t,"id",19,Rs),s=B(t,"ref",15,null),o=B(t,"loop",3,!0),i=B(t,"onInteractOutside",3,Zt),l=B(t,"onCloseAutoFocus",3,Zt),d=B(t,"onOpenAutoFocus",3,Zt),g=B(t,"preventScroll",3,!0),P=B(t,"side",3,"right"),E=B(t,"sideOffset",3,2),O=B(t,"align",3,"start"),A=B(t,"onEscapeKeydown",3,Zt),M=B(t,"forceMount",3,!1),K=B(t,"trapFocus",3,!1),p=Et(t,Ya);const m=Dr.create({id:be(()=>n()),loop:be(()=>o()),ref:be(()=>s(),X=>s(X)),onCloseAutoFocus:be(()=>l())}),j=h(()=>sn(p,m.props,{side:P(),sideOffset:E(),align:O(),onOpenAutoFocus:d(),isValidEvent:Ce,trapFocus:K(),loop:o(),id:n(),ref:m.opts.ref,preventScroll:g(),onInteractOutside:te,onEscapeKeydown:G,shouldRender:m.shouldRender}));function te(X){if(i()(X),!X.defaultPrevented){if(X.target&&X.target instanceof Element){const Ie=`[${m.parentMenu.root.getBitsAttr("sub-content")}]`;if(X.target.closest(Ie))return}m.parentMenu.onClose()}}function G(X){A()(X),!X.defaultPrevented&&m.parentMenu.onClose()}function Ce(X){if("button"in X&&X.button===2){const Ie=X.target;return Ie?Ie.closest(`[${Ds}]`)!==m.parentMenu.triggerNode:!1}return!1}var ae=fe(),Le=R(ae);{var ce=X=>{Mo(X,Ft(()=>e(j),()=>m.popperProps,{get enabled(){return m.parentMenu.opts.open.current},popper:(qe,at)=>{let kt=()=>(at?.()).props,ut=()=>(at?.()).wrapperProps;const se=h(()=>sn(kt(),{style:Hr("context-menu")},{style:t.style}));var V=fe(),z=R(V);{var he=Me=>{var ye=fe(),de=R(ye);{let Ve=h(()=>({props:e(se),wrapperProps:ut(),...m.snippetProps}));St(de,()=>t.child,()=>e(Ve))}a(Me,ye)},Ee=Me=>{var ye=$r();rn(ye,()=>({...ut()}));var de=k(ye);rn(de,()=>({...e(se)}));var Ve=k(de);St(Ve,()=>t.children??Nt),b(de),b(ye),a(Me,ye)};I(z,Me=>{t.child?Me(he):Me(Ee,-1)})}a(qe,V)},$$slots:{popper:!0}}))},$=X=>{Oo(X,Ft(()=>e(j),()=>m.popperProps,{get open(){return m.parentMenu.opts.open.current},popper:(qe,at)=>{let kt=()=>(at?.()).props,ut=()=>(at?.()).wrapperProps;const se=h(()=>sn(kt(),{style:Hr("context-menu")},{style:t.style}));var V=fe(),z=R(V);{var he=Me=>{var ye=fe(),de=R(ye);{let Ve=h(()=>({props:e(se),wrapperProps:ut(),...m.snippetProps}));St(de,()=>t.child,()=>e(Ve))}a(Me,ye)},Ee=Me=>{var ye=$r();rn(ye,()=>({...ut()}));var de=k(ye);rn(de,()=>({...e(se)}));var Ve=k(de);St(Ve,()=>t.children??Nt),b(de),b(ye),a(Me,ye)};I(z,Me=>{t.child?Me(he):Me(Ee,-1)})}a(qe,V)},$$slots:{popper:!0}}))};I(Le,X=>{M()?X(ce):M()||X($,1)})}a(r,ae),$e()}var Ja=new Set(["$$slots","$$events","$$legacy","id","ref","child","children","disabled"]),Za=u("<div><!></div>");function Qa(r,t){Ye(t,!0);let n=B(t,"id",19,Rs),s=B(t,"ref",15,null),o=B(t,"disabled",3,!1),i=Et(t,Ja);const l=jr.create({id:be(()=>n()),disabled:be(()=>o()),ref:be(()=>s(),E=>s(E))}),d=h(()=>sn(i,l.props,{style:{pointerEvents:"auto"}},{style:t.style,tabindex:t.tabindex}));var g=fe(),P=R(g);Qe(P,()=>Hs,(E,O)=>{O(E,{get id(){return n()},get virtualEl(){return l.virtualElement},get ref(){return l.opts.ref},children:(A,M)=>{var K=fe(),p=R(K);{var m=te=>{var G=fe(),Ce=R(G);St(Ce,()=>t.child,()=>({props:e(d)})),a(te,G)},j=te=>{var G=Za();rn(G,()=>({...e(d)}));var Ce=k(G);St(Ce,()=>t.children??Nt),b(G),a(te,G)};I(p,te=>{t.child?te(m):te(j,-1)})}a(A,K)},$$slots:{default:!0}})}),a(r,g),$e()}var ei=new Set(["$$slots","$$events","$$legacy","ref","id","child","children"]),ti=u("<div><!></div>");function ni(r,t){const n=_n();Ye(t,!0);let s=B(t,"ref",15,null),o=B(t,"id",19,()=>gn(n)),i=Et(t,ei);const l=Nr.create({id:be(()=>o()),ref:be(()=>s(),A=>s(A))}),d=h(()=>sn(i,l.props));var g=fe(),P=R(g);{var E=A=>{var M=fe(),K=R(M);St(K,()=>t.child,()=>({props:e(d)})),a(A,M)},O=A=>{var M=ti();rn(M,()=>({...e(d)}));var K=k(M);St(K,()=>t.children??Nt),b(M),a(A,M)};I(P,A=>{t.child?A(E):A(O,-1)})}a(r,g),$e()}var ri=new Set(["$$slots","$$events","$$legacy","children","child","id","ref","type","disabled","openOnHover","openDelay","closeDelay"]),si=u("<button><!></button>");function oi(r,t){const n=_n();Ye(t,!0);let s=B(t,"id",19,()=>gn(n)),o=B(t,"ref",15,null),i=B(t,"type",3,"button"),l=B(t,"disabled",3,!1),d=B(t,"openOnHover",3,!1),g=B(t,"openDelay",3,700),P=B(t,"closeDelay",3,300),E=Et(t,ri);const O=Ao.create({id:be(()=>s()),ref:be(()=>o(),M=>o(M)),disabled:be(()=>!!l()),openOnHover:be(()=>d()),openDelay:be(()=>g()),closeDelay:be(()=>P())}),A=h(()=>sn(E,O.props,{type:i()}));Hs(r,{get id(){return s()},get ref(){return O.opts.ref},children:(M,K)=>{var p=fe(),m=R(p);{var j=G=>{var Ce=fe(),ae=R(Ce);St(ae,()=>t.child,()=>({props:e(A)})),a(G,Ce)},te=G=>{var Ce=si();rn(Ce,()=>({...e(A)}));var ae=k(Ce);St(ae,()=>t.children??Nt),b(Ce),a(G,Ce)};I(m,G=>{t.child?G(j):G(te,-1)})}a(M,p)},$$slots:{default:!0}}),$e()}function ai(r,t){Ye(t,!0);let n=B(t,"open",15,!1),s=B(t,"onOpenChange",3,Zt),o=B(t,"onOpenChangeComplete",3,Zt);na.create({variant:be(()=>"dialog"),open:be(()=>n(),d=>{n(d),s()(d)}),onOpenChangeComplete:be(()=>o())});var i=fe(),l=R(i);St(l,()=>t.children??Nt),a(r,i),$e()}var ii=new Set(["$$slots","$$events","$$legacy","children","child","id","ref","disabled"]),li=u("<button><!></button>");function ci(r,t){const n=_n();Ye(t,!0);let s=B(t,"id",19,()=>gn(n)),o=B(t,"ref",15,null),i=B(t,"disabled",3,!1),l=Et(t,ii);const d=ra.create({variant:be(()=>"close"),id:be(()=>s()),ref:be(()=>o(),M=>o(M)),disabled:be(()=>!!i())}),g=h(()=>sn(l,d.props));var P=fe(),E=R(P);{var O=M=>{var K=fe(),p=R(K);St(p,()=>t.child,()=>({props:e(g)})),a(M,K)},A=M=>{var K=li();rn(K,()=>({...e(g)}));var p=k(K);St(p,()=>t.children??Nt),b(K),a(M,K)};I(E,M=>{t.child?M(O):M(A,-1)})}a(r,P),$e()}var ui=new Set(["$$slots","$$events","$$legacy","id","children","child","ref","forceMount","onCloseAutoFocus","onOpenAutoFocus","onEscapeKeydown","onInteractOutside","trapFocus","preventScroll","preventOverflowTextSelection","restoreScrollDelay"]),di=u("<!> <!>",1),vi=u("<!> <div><!></div>",1);function fi(r,t){const n=_n();Ye(t,!0);let s=B(t,"id",19,()=>gn(n)),o=B(t,"ref",15,null),i=B(t,"forceMount",3,!1),l=B(t,"onCloseAutoFocus",3,Zt),d=B(t,"onOpenAutoFocus",3,Zt),g=B(t,"onEscapeKeydown",3,Zt),P=B(t,"onInteractOutside",3,Zt),E=B(t,"trapFocus",3,!0),O=B(t,"preventScroll",3,!0),A=B(t,"preventOverflowTextSelection",3,!0),M=B(t,"restoreScrollDelay",3,null),K=Et(t,ui);const p=sa.create({id:be(()=>s()),ref:be(()=>o(),Ce=>o(Ce))}),m=h(()=>sn(K,p.props));var j=fe(),te=R(j);{var G=Ce=>{Lo(Ce,{get ref(){return p.opts.ref},loop:!0,get trapFocus(){return E()},get enabled(){return p.root.opts.open.current},get onOpenAutoFocus(){return d()},get onCloseAutoFocus(){return l()},focusScope:(Le,ce)=>{let $=()=>(ce?.()).props;Do(Le,Ft(()=>e(m),{get enabled(){return p.root.opts.open.current},get ref(){return p.opts.ref},onEscapeKeydown:X=>{g()(X),!X.defaultPrevented&&p.root.handleClose()},children:(X,Ie)=>{Ro(X,Ft(()=>e(m),{get ref(){return p.opts.ref},get enabled(){return p.root.opts.open.current},onInteractOutside:qe=>{P()(qe),!qe.defaultPrevented&&p.root.handleClose()},children:(qe,at)=>{No(qe,Ft(()=>e(m),{get preventOverflowTextSelection(){return A()},get ref(){return p.opts.ref},get enabled(){return p.root.opts.open.current},children:(kt,ut)=>{var se=fe(),V=R(se);{var z=Ee=>{var Me=di(),ye=R(Me);{var de=et=>{Wr(et,{get preventScroll(){return O()},get restoreScrollDelay(){return M()}})};I(ye,et=>{p.root.opts.open.current&&et(de)})}var Ve=c(ye,2);{let et=h(()=>({props:sn(e(m),$()),...p.snippetProps}));St(Ve,()=>t.child,()=>e(et))}a(Ee,Me)},he=Ee=>{var Me=vi(),ye=R(Me);Wr(ye,{get preventScroll(){return O()}});var de=c(ye,2);rn(de,et=>({...et}),[()=>sn(e(m),$())]);var Ve=k(de);St(Ve,()=>t.children??Nt),b(de),a(Ee,Me)};I(V,Ee=>{t.child?Ee(z):Ee(he,-1)})}a(kt,se)},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{focusScope:!0}})};I(te,Ce=>{(p.shouldRender||i())&&Ce(G)})}a(r,j),$e()}const hi=kr({component:"toggle",parts:["root"]});class qr{static create(t){return new qr(t)}opts;attachment;constructor(t){this.opts=t,this.attachment=En(this.opts.ref),this.onclick=this.onclick.bind(this)}onclick(t){this.opts.disabled.current||(this.opts.pressed.current=!this.opts.pressed.current)}#e=h(()=>({pressed:this.opts.pressed.current}));get snippetProps(){return e(this.#e)}set snippetProps(t){v(this.#e,t)}#t=h(()=>({[hi.root]:"",id:this.opts.id.current,"data-disabled":Dn(this.opts.disabled.current),"aria-pressed":xr(this.opts.pressed.current),"data-state":pi(this.opts.pressed.current),disabled:wo(this.opts.disabled.current),onclick:this.onclick,...this.attachment}));get props(){return e(this.#t)}set props(t){v(this.#t,t)}}function pi(r){return r?"on":"off"}var mi=new Set(["$$slots","$$events","$$legacy","ref","id","pressed","onPressedChange","disabled","type","children","child"]),_i=u("<button><!></button>");function gi(r,t){const n=_n();Ye(t,!0);let s=B(t,"ref",15,null),o=B(t,"id",19,()=>gn(n)),i=B(t,"pressed",15,!1),l=B(t,"onPressedChange",3,Zt),d=B(t,"disabled",3,!1),g=B(t,"type",3,"button"),P=Et(t,mi);const E=qr.create({pressed:be(()=>i(),m=>{i(m),l()(m)}),disabled:be(()=>d()??!1),id:be(()=>o()),ref:be(()=>s(),m=>s(m))}),O=h(()=>sn(P,E.props,{type:g()}));var A=fe(),M=R(A);{var K=m=>{var j=fe(),te=R(j);{let G=h(()=>({props:e(O),...E.snippetProps}));St(te,()=>t.child,()=>e(G))}a(m,j)},p=m=>{var j=_i();rn(j,()=>({...e(O)}));var te=k(j);St(te,()=>t.children??Nt,()=>E.snippetProps),b(j),a(m,j)};I(M,m=>{t.child?m(K):m(p,-1)})}a(r,A),$e()}var bi=new Set(["$$slots","$$events","$$legacy"]);function yi(r,t){let n=Et(t,bi);var s=fe(),o=R(s);Qe(o,()=>Ns,(i,l)=>{l(i,Ft(()=>n))}),a(r,s)}var wi=new Set(["$$slots","$$events","$$legacy","ref","portalProps","class"]);function xi(r,t){Ye(t,!0);let n=B(t,"ref",15,null),s=Et(t,wi);yi(r,Ft(()=>t.portalProps,{children:(o,i)=>{var l=fe(),d=R(l);{let g=h(()=>vn("data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-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 ring-foreground/10 bg-popover text-popover-foreground min-w-36 rounded-lg p-1 shadow-md ring-1 duration-100 z-(--z-floating) max-h-(--bits-context-menu-content-available-height) origin-(--bits-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto",t.class));Qe(d,()=>$a,(P,E)=>{E(P,Ft({"data-slot":"context-menu-content",get class(){return e(g)}},()=>s,{get ref(){return n()},set ref(O){n(O)}}))})}a(o,l)},$$slots:{default:!0}})),$e()}var ki=new Set(["$$slots","$$events","$$legacy","ref","class","inset","variant"]);function Fn(r,t){Ye(t,!0);let n=B(t,"ref",15,null),s=B(t,"variant",3,"default"),o=Et(t,ki);var i=fe(),l=R(i);{let d=h(()=>vn("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:text-destructive focus:*:[svg]:text-accent-foreground gap-1.5 rounded-md px-1.5 py-1 text-sm data-inset:pl-7 [&_svg:not([class*='size-'])]:size-4 group/context-menu-item relative flex cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",t.class));Qe(l,()=>Xa,(g,P)=>{P(g,Ft({"data-slot":"context-menu-item",get"data-inset"(){return t.inset},get"data-variant"(){return s()},get class(){return e(d)}},()=>o,{get ref(){return n()},set ref(E){n(E)}}))})}a(r,i),$e()}var Pi=new Set(["$$slots","$$events","$$legacy","ref","class"]);function Ti(r,t){Ye(t,!0);let n=B(t,"ref",15,null),s=Et(t,Pi);var o=fe(),i=R(o);{let l=h(()=>vn("bg-border -mx-1 my-1 h-px",t.class));Qe(i,()=>ni,(d,g)=>{g(d,Ft({"data-slot":"context-menu-separator",get class(){return e(l)}},()=>s,{get ref(){return n()},set ref(P){n(P)}}))})}a(r,o),$e()}var Si=new Set(["$$slots","$$events","$$legacy","ref","class"]);function Ei(r,t){Ye(t,!0);let n=B(t,"ref",15,null),s=Et(t,Si);var o=fe(),i=R(o);{let l=h(()=>vn("select-none",t.class));Qe(i,()=>Qa,(d,g)=>{g(d,Ft({"data-slot":"context-menu-trigger",get class(){return e(l)}},()=>s,{get ref(){return n()},set ref(P){n(P)}}))})}a(r,o),$e()}var Ci=new Set(["$$slots","$$events","$$legacy","open"]);function Ii(r,t){Ye(t,!0);let n=B(t,"open",15,!1),s=Et(t,Ci);var o=fe(),i=R(o);Qe(i,()=>Ua,(l,d)=>{d(l,Ft(()=>s,{get open(){return n()},set open(g){n(g)}}))}),a(r,o),$e()}var Mi=u('<span class="diff svelte-yz18w2"><span class="add svelte-yz18w2"> </span> <span class="del svelte-yz18w2"> </span></span>');function tv(r,t){Ye(t,!0);var n=fe(),s=R(n);{var o=i=>{var l=Mi(),d=k(l),g=L(d),P=c(d,2),E=L(P);b(l),C(()=>{ue(l,"title",`${t.changes.files??""} ${t.changes.files===1?"file":"files"} changed (${t.changes.source==="git"?"git":"this session"})`),S(g,`+${t.changes.additions??""}`),S(E,`−${t.changes.deletions??""}`)}),a(i,l)};I(s,i=>{t.changes&&(t.changes.additions>0||t.changes.deletions>0)&&i(o)})}a(r,n),$e()}var Oi=u('<p class="err svelte-furisw"> </p>'),Ai=u('<p class="dim svelte-furisw">Loading…</p>'),Li=u('<span class="dim svelte-furisw">detached HEAD</span>'),Di=u('<span class="dim svelte-furisw">not a git repository</span>'),Ri=u('<li class="svelte-furisw"><span class="name svelte-furisw"> </span> <a class="mono svelte-furisw" target="_blank" rel="noopener noreferrer"> </a></li>'),Ni=u('<ul class="svelte-furisw"></ul>'),ji=u('<span class="err svelte-furisw"> </span>'),qi=u('<span class="dim svelte-furisw">None. Commit a <code class="svelte-furisw">.claude-mux.json</code> at the root to name them:</span> <pre class="svelte-furisw"></pre>',1),zi=u('<dl class="svelte-furisw"><dt class="svelte-furisw"> </dt> <dd class="mono svelte-furisw"> </dd> <dt class="svelte-furisw">Branch</dt> <dd class="mono svelte-furisw"><!></dd> <dt class="svelte-furisw">URLs</dt> <dd class="svelte-furisw"><!></dd></dl>'),Fi=u('<div class="project svelte-furisw"><!></div>');function Bi(r,t){Ye(t,!0);let n=q(null),s=q(null),o=q(!1),i=0;async function l(p){const m=++i;v(o,!0),v(s,null);try{const j=await fetch(`${Sn(t.base,p)}/project`),te=await j.json();if(!j.ok)throw new Error(te.error??`HTTP ${j.status}`);m===i&&v(n,te,!0)}catch(j){m===i&&v(s,j instanceof Error?j.message:String(j),!0)}finally{m===i&&v(o,!1)}}const d=h(()=>t.session?.id??null),g=h(()=>t.session?.cwd??null);Be(()=>{e(d)&&e(g)&&t.active&&l(e(d))}),Be(()=>{t.setActions([{icon:"mdi:refresh",label:"Reload",disabled:!e(d)||e(o),run:()=>e(d)&&void l(e(d))}])});const P=h(()=>Object.entries(e(n)?.config?.urls??{}));var E=Fi(),O=k(E);{var A=p=>{var m=Oi(),j=L(m,!0);C(()=>S(j,e(s))),a(p,m)},M=p=>{var m=Ai();a(p,m)},K=p=>{var m=zi(),j=k(m),te=L(j,!0),G=c(j,2),Ce=L(G,!0),ae=c(G,4),Le=k(ae);{var ce=se=>{var V=Kt();C(()=>S(V,e(n).branch)),a(se,V)},$=se=>{var V=Li();a(se,V)},X=se=>{var V=Di();a(se,V)};I(Le,se=>{e(n).branch?se(ce):e(n).repo?se($,1):se(X,-1)})}b(ae);var Ie=c(ae,4),qe=k(Ie);{var at=se=>{var V=Ni();Bt(V,21,()=>e(P),([z,he])=>z,(z,he)=>{var Ee=h(()=>ro(e(he),2));let Me=()=>e(Ee)[0],ye=()=>e(Ee)[1];var de=Ri(),Ve=k(de),et=L(Ve,!0),jt=c(Ve,2),Wt=L(jt,!0);b(de),C(()=>{S(et,Me()),ue(jt,"href",ye()),S(Wt,ye())}),a(z,de)}),b(V),a(se,V)},kt=se=>{var V=ji(),z=L(V);C(()=>S(z,`.claude-mux.json: ${e(n).configError??""}`)),a(se,V)},ut=se=>{var V=qi(),z=c(R(V),2);z.textContent='{ "urls": { "prod": "https://…", "dev": "http://localhost:5173" } }',a(se,V)};I(qe,se=>{e(P).length>0?se(at):e(n).configError?se(kt,1):se(ut,-1)})}b(Ie),b(m),C(()=>{S(te,e(n).repo?"Repository":"Directory"),ue(G,"title",e(n).root),S(Ce,e(n).root)}),a(p,m)};I(O,p=>{e(s)?p(A):e(n)?p(K,-1):p(M,1)})}b(E),a(r,E),$e()}const Ki=xo({base:"hover:text-foreground aria-pressed:bg-muted focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[state=on]:bg-muted gap-1 rounded-lg text-sm font-medium transition-all [&_svg:not([class*='size-'])]:size-4 group/toggle inline-flex items-center justify-center whitespace-nowrap outline-none hover:bg-muted focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",variants:{variant:{default:"bg-transparent",outline:"border-input hover:bg-muted border bg-transparent"},size:{default:"h-8 min-w-8 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",sm:"h-7 min-w-7 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",xs:"h-6 min-w-6 rounded-md px-1.5 text-[11px] [&_svg:not([class*='size-'])]:size-3",lg:"h-9 min-w-9 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2"}},defaultVariants:{variant:"default",size:"default"}});var Hi=new Set(["$$slots","$$events","$$legacy","ref","pressed","class","size","variant"]);function un(r,t){Ye(t,!0);let n=B(t,"ref",15,null),s=B(t,"pressed",15,!1),o=B(t,"size",3,"default"),i=B(t,"variant",3,"default"),l=Et(t,Hi);var d=fe(),g=R(d);{let P=h(()=>vn(Ki({variant:i(),size:o()}),t.class));Qe(g,()=>gi,(E,O)=>{O(E,Ft({"data-slot":"toggle",get class(){return e(P)}},()=>l,{get ref(){return n()},set ref(A){n(A)},get pressed(){return s()},set pressed(A){s(A)}}))})}a(r,d),$e()}let Wi=null;const Jr={typescript:()=>Ne(()=>import("./fBVCKtta.js"),[],import.meta.url),javascript:()=>Ne(()=>import("./OJuCLi7D.js"),[],import.meta.url),xml:()=>Ne(()=>import("./iid4EIlO.js"),[],import.meta.url),css:()=>Ne(()=>import("./Cx__LlXj.js"),[],import.meta.url),scss:()=>Ne(()=>import("./-6NKjX1p.js"),[],import.meta.url),json:()=>Ne(()=>import("./D8A5dS0c.js"),[],import.meta.url),markdown:()=>Ne(()=>import("./CtazcGce.js"),[],import.meta.url),python:()=>Ne(()=>import("./Dao3OHeO.js"),[],import.meta.url),bash:()=>Ne(()=>import("./7CVK93dn.js"),[],import.meta.url),yaml:()=>Ne(()=>import("./Dub36DKV.js"),[],import.meta.url),ini:()=>Ne(()=>import("./DeXdrrNj.js"),[],import.meta.url),rust:()=>Ne(()=>import("./z4KEymWr.js"),[],import.meta.url),go:()=>Ne(()=>import("./DqPOB59-.js"),[],import.meta.url),sql:()=>Ne(()=>import("./C2FXm1pY.js"),[],import.meta.url),java:()=>Ne(()=>import("./DWfSB6l0.js"),[],import.meta.url),kotlin:()=>Ne(()=>import("./D-nmzn_X.js"),[],import.meta.url),c:()=>Ne(()=>import("./CSDwiUoT.js"),[],import.meta.url),cpp:()=>Ne(()=>import("./CUcZ5oLU.js"),[],import.meta.url),ruby:()=>Ne(()=>import("./B9vqUFHD.js"),[],import.meta.url),php:()=>Ne(()=>import("./JSbtpXK4.js"),[],import.meta.url),swift:()=>Ne(()=>import("./CYlYM-_s.js"),[],import.meta.url),lua:()=>Ne(()=>import("./BXsJF5rx.js"),[],import.meta.url),dockerfile:()=>Ne(()=>import("./r_U6Fv7l.js"),[],import.meta.url),makefile:()=>Ne(()=>import("./YX8jeUAS.js"),[],import.meta.url)},Ui=()=>Wi??=Ne(()=>import("./D8FegVtD.js"),[],import.meta.url).then(r=>r.default);async function Vi(r,t){if(!t||!Jr[t])return null;const n=Jr[t],s=await Ui();return s.getLanguage(t)||s.registerLanguage(t,(await n()).default),r.map(o=>s.highlight(o,{language:t,ignoreIllegals:!0}).value)}var Gi=u('<div class="hunk svelte-1r1jcbf"> </div>'),Zr=u('<button type="button" class="svelte-1r1jcbf"><iconify-icon></iconify-icon></button>',2),Xi=u('<button type="button" class="all svelte-1r1jcbf" title="Show all of these lines"><!></button>'),Yi=u("<span> </span>"),$i=u('<div class="gap svelte-1r1jcbf"><!> <!> <!></div>'),Ji=u('<div><span class="no svelte-1r1jcbf"> </span><span class="no svelte-1r1jcbf"> </span><span class="sign svelte-1r1jcbf"> </span><span class="code svelte-1r1jcbf"><!></span></div>'),Zi=u('<div class="lines svelte-1r1jcbf"></div>');function Gs(r,t){Ye(t,!0);const n=20;let s=q(null),o=q(!1),i=q(on({}));const l=h(()=>t.loadText!==void 0&&e(s)!==!1),d=h(()=>qo(t.hunks,{tail:t.loadText!==void 0})),g=h(()=>{const K=[],p=e(d).filter(m=>m.type==="gap");for(const m of e(d)){if(m.type!=="gap"){K.push(m);continue}const j=e(s)||null,te=m.count??(j?Math.max(0,j.length-m.from+1):null),G=e(i)[m.from]??{top:0,bottom:0},Ce=te===null?G.top:Math.min(G.top,te),ae=te===null?0:Math.min(G.bottom,te-Ce),Le=$=>({type:"context",old:m.old+($-m.from),new:$,text:j?.[$-1]??""});for(let $=0;$<Ce;$++)K.push(Le(m.from+$));const ce=te===null?null:te-Ce-ae;if((ce===null?e(l):ce>0)&&K.push({type:"hidden",gap:m,left:ce,first:m===p[0]&&m.from===1,last:m.count===null}),te!==null)for(let $=ae;$>0;$--)K.push(Le(m.from+te-$))}return K});async function P(K,p){if(e(s)===null&&t.loadText&&!e(o)){v(o,!0);try{const j=await t.loadText();v(s,j===null?!1:j.replace(/\n$/,"").split(`
|
|
2
|
+
import"./DxJTiTth.js";import{g as q,h as on,i as e,j as v,L as Bn,z as h,be as _n,p as Ye,x as fe,f as R,a,b as $e,A as k,ac as Nt,B as b,c as u,w as Be,I as zt,bB as no,s as c,o as L,t as C,d as S,G as Kt,bg as ro,V as Ln,W as ot,J as fn,bl as ks,F as ht,bC as Ps,bf as _r,C as so}from"./BeqCgGI7.js";import{p as B,i as I,r as Et,c as Ft,b as mn}from"./Cjnj9mVX.js";import{o as rn,b as ue,e as Bt,a as ke,i as hr,s as Te,g as Yt,f as Ts,k as oo}from"./VDVYssW5.js";import{c as gr,au as ao,av as io,ap as lo,M as be,aw as co,ax as uo,ay as vo,az as fo,aA as Qn,aB as br,aC as yr,aD as er,aE as Ss,I as An,aF as Es,A as hn,C as nr,z as En,D as wr,E as Cs,F as Dn,R as Gn,G as xr,Q as Is,J as kr,L as gn,N as St,K as sn,aG as ho,aH as po,aI as mo,al as _o,a8 as go,a9 as Kn,aJ as bo,am as yo,aK as wo,P as vn,ah as Sn,at as xo,B as pn,e as $n,a as Ms,U as ko,W as Os}from"./CKg7gbPm.js";import{c as Qe}from"./BgY8YOrV.js";import{P as As,H as Tn,n as Zt,J as Po,K as rr,L as Pr,M as To,N as So,O as Eo,o as Ls,Q as Kr,R as Ds,v as Co,x as Io,u as Rs,y as Mo,z as Oo,A as Hr,U as Ao,F as Lo,E as Do,D as Ro,T as No,S as Wr,a as Ns,V as jo,h as Un,W as qo,X as zo,c as Hn,s as js,e as ar,Y as Fo,Z as qn,_ as Bo,$ as Ko,a0 as Ur,I as Vn,i as qs,a1 as ir,j as zs,r as Tr,G as Fs,k as Bs,B as Ho,a2 as Wo,a3 as lr,a4 as Uo,a5 as zn,a6 as Vo,a7 as Go,b as Xo,a8 as Yo,a9 as $o,aa as Jo,ab as Zo,ac as Qo}from"./BeYjnogg.js";import{_ as Ne}from"./CSBAZGsW.js";import{s as cr,d as Vr,r as ea,I as ta}from"./BOpEbBRb.js";import{i as na,j as ra,k as sa,h as oa,D as aa,l as ia}from"./DDvK7Qo9.js";const xn=gr("claude-mux-preferences",{terminalTheming:!0,keepAwake:!1,notificationMode:"off",inAppToasts:!0,fileExplorerOpen:!0,fileWordWrap:!1});class la{#e=q(on(xn.load()));get prefs(){return e(this.#e)}set prefs(t){v(this.#e,t,!0)}get terminalTheming(){return this.prefs.terminalTheming}set terminalTheming(t){this.prefs.terminalTheming!==t&&(this.prefs.terminalTheming=t,xn.save(this.prefs))}get keepAwake(){return this.prefs.keepAwake}set keepAwake(t){this.prefs.keepAwake!==t&&(this.prefs.keepAwake=t,xn.save(this.prefs))}get notificationMode(){return this.prefs.notificationMode}set notificationMode(t){this.prefs.notificationMode!==t&&(this.prefs.notificationMode=t,xn.save(this.prefs))}get inAppToasts(){return this.prefs.inAppToasts}set inAppToasts(t){this.prefs.inAppToasts!==t&&(this.prefs.inAppToasts=t,xn.save(this.prefs))}toggle(t){typeof this.prefs[t]=="boolean"&&(this.prefs[t]=!this.prefs[t],xn.save(this.prefs))}get fileExplorerOpen(){return this.prefs.fileExplorerOpen??!0}set fileExplorerOpen(t){this.prefs.fileExplorerOpen=t,xn.save(this.prefs)}get fileWordWrap(){return this.prefs.fileWordWrap??!1}set fileWordWrap(t){this.prefs.fileWordWrap=t,xn.save(this.prefs)}}const ln=new la;function In(r){let t=q(on(r));return{[io]:!0,[ao]:!0,get current(){return e(t)},set current(n){v(t,n,!0)}}}In.from=lo;In.with=be;In.flatten=co;In.readonly=uo;In.isBox=vo;In.isWritableBox=fo;function ca(r){return window.getComputedStyle(r).getPropertyValue("direction")}function ua(r="ltr",t="horizontal"){return{horizontal:r==="rtl"?yr:br,vertical:er}[t]}function da(r="ltr",t="horizontal"){return{horizontal:r==="rtl"?br:yr,vertical:Qn}[t]}function va(r="ltr",t="horizontal"){return["ltr","rtl"].includes(r)||(r="ltr"),["horizontal","vertical"].includes(t)||(t="horizontal"),{nextKey:ua(r,t),prevKey:da(r,t)}}class fa{#e;#t=In(null);constructor(t){this.#e=t}getCandidateNodes(){if(!this.#e.rootNode.current)return[];if(this.#e.candidateSelector){const t=Array.from(this.#e.rootNode.current.querySelectorAll(this.#e.candidateSelector));return this.#n(this.#e.rootNode.current,t)}else if(this.#e.candidateAttr){const t=Array.from(this.#e.rootNode.current.querySelectorAll(`[${this.#e.candidateAttr}]:not([data-disabled])`));return this.#n(this.#e.rootNode.current,t)}return[]}#n(t,n){const s=this.#e.rootAttr;if(!s)return n;const o=`[${s}]`;return n.filter(i=>i.closest(o)===t)}focusFirstCandidate(){const t=this.getCandidateNodes();t.length&&t[0]?.focus()}handleKeydown(t,n,s=!1){const o=this.#e.rootNode.current;if(!o||!t)return;const i=this.getCandidateNodes();if(!i.length)return;const l=i.indexOf(t),d=ca(o),{nextKey:g,prevKey:P}=va(d,this.#e.orientation.current),E=this.#e.loop.current,O={[g]:l+1,[P]:l-1,[Es]:0,[Ss]:i.length-1};if(s){const K=g===er?br:er,p=P===Qn?yr:Qn;O[K]=l+1,O[p]=l-1}let A=O[n.key];if(A===void 0)return;n.preventDefault(),A<0&&E?A=i.length-1:A===i.length&&E&&(A=0);const M=i[A];if(M)return M.focus(),this.#t.current=M.id,this.#e.onCandidateFocus?.(M),M}getTabIndex(t){const n=this.getCandidateNodes(),s=this.#t.current!==null;return t&&!s&&n[0]===t?(this.#t.current=t.id,0):t?.id===this.#t.current?0:-1}setCurrentTabStopId(t){this.#t.current=t}focusCurrentTabStop(){const t=this.#t.current;if(!t)return;const n=this.#e.rootNode.current?.querySelector(`#${t}`);!n||!An(n)||n.focus()}}const pr={animationName:"none",transitionDuration:"0s"};class ha{#e=q(!1);constructor(t){v(this.#e,t(),!0),hn.pre(t,()=>{v(this.#e,!1)},{lazy:!0})}get style(){return e(this.#e)?pr:void 0}}function pa(r){const{animationName:t,transitionDuration:n}=r.style;r.style.animationName=pr.animationName,r.style.transitionDuration=pr.transitionDuration;const s=r.getBoundingClientRect();return r.style.animationName=t,r.style.transitionDuration=n,s}class ma{eventName;options;constructor(t,n={bubbles:!0,cancelable:!0}){this.eventName=t,this.options=n}createEvent(t){return new CustomEvent(this.eventName,{...this.options,detail:t})}dispatch(t,n){const s=this.createEvent(n);return t.dispatchEvent(s),s}listen(t,n,s){const o=i=>{n(i)};return Bn(t,this.eventName,o,s)}}function Ks(r,t,n){const s=t.toLowerCase();if(s.endsWith(" ")){const O=s.slice(0,-1);if(r.filter(p=>p.toLowerCase().startsWith(O)).length<=1)return Ks(r,O,n);const M=n?.toLowerCase();if(M&&M.startsWith(O)&&M.charAt(O.length)===" "&&t.trim()===O)return n;const K=r.filter(p=>p.toLowerCase().startsWith(s));if(K.length>0){const p=n?r.indexOf(n):-1;return Gr(K,Math.max(p,0)).find(te=>te!==n)||n}}const i=t.length>1&&Array.from(t).every(O=>O===t[0])?t[0]:t,l=i.toLowerCase(),d=n?r.indexOf(n):-1;let g=Gr(r,Math.max(d,0));i.length===1&&(g=g.filter(O=>O!==n));const E=g.find(O=>O?.toLowerCase().startsWith(l));return E!==n?E:void 0}function Gr(r,t){return r.map((n,s)=>r[(t+s)%r.length])}const Sr=kr({component:"collapsible",parts:["root","content","trigger"]}),Er=new nr("Collapsible.Root");class Cr{static create(t){return Er.set(new Cr(t))}opts;attachment;#e=q(null);get contentNode(){return e(this.#e)}set contentNode(t){v(this.#e,t,!0)}contentPresence;#t=q(void 0);get contentId(){return e(this.#t)}set contentId(t){v(this.#t,t,!0)}constructor(t){this.opts=t,this.toggleOpen=this.toggleOpen.bind(this),this.attachment=En(this.opts.ref),this.contentPresence=new As({ref:be(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}})}toggleOpen(){this.opts.open.current=!this.opts.open.current}#n=h(()=>({id:this.opts.id.current,"data-state":Gn(this.opts.open.current),"data-disabled":Dn(this.opts.disabled.current),[Sr.root]:"",...this.attachment}));get props(){return e(this.#n)}set props(t){v(this.#n,t)}}class Ir{static create(t){return new Ir(t,Er.get())}opts;root;attachment;#e=h(()=>this.opts.hiddenUntilFound.current?this.root.opts.open.current:this.opts.forceMount.current||this.root.opts.open.current);get present(){return e(this.#e)}set present(t){v(this.#e,t)}#t;#n=q(0);#r=q(0);constructor(t,n){this.opts=t,this.root=n,this.#t=new ha(()=>this.root.opts.open.current),this.root.contentId=this.opts.id.current,this.attachment=En(this.opts.ref,s=>this.root.contentNode=s),hn.pre(()=>this.opts.id.current,s=>{this.root.contentId=s}),hn.pre([()=>this.opts.ref.current,()=>this.opts.hiddenUntilFound.current],([s,o])=>!s||!o?void 0:Bn(s,"beforematch",()=>{this.root.opts.open.current||requestAnimationFrame(()=>{this.root.opts.open.current=!0})})),hn([()=>this.opts.ref.current,()=>this.present],([s])=>{if(!s)return;let o=!0;return Tn(()=>{if(!o||!this.opts.ref.current)return;const i=pa(s);v(this.#r,i.height,!0),v(this.#n,i.width,!0)}),()=>{o=!1}})}get shouldRender(){return this.root.contentPresence.shouldRender}#s=h(()=>({open:this.root.opts.open.current}));get snippetProps(){return e(this.#s)}set snippetProps(t){v(this.#s,t)}#a=h(()=>({id:this.opts.id.current,style:{"--bits-collapsible-content-height":e(this.#r)?`${e(this.#r)}px`:void 0,"--bits-collapsible-content-width":e(this.#n)?`${e(this.#n)}px`:void 0,...this.#t.style},hidden:this.opts.hiddenUntilFound.current&&!this.root.opts.open.current?"until-found":void 0,"data-state":Gn(this.root.opts.open.current),...Is(this.root.contentPresence.transitionStatus),"data-disabled":Dn(this.root.opts.disabled.current),[Sr.content]:"",...this.opts.hiddenUntilFound.current&&!this.shouldRender?{}:{hidden:this.opts.hiddenUntilFound.current?!this.shouldRender:this.opts.forceMount.current?void 0:!this.shouldRender},...this.attachment}));get props(){return e(this.#a)}set props(t){v(this.#a,t)}}class Mr{static create(t){return new Mr(t,Er.get())}opts;root;attachment;#e=h(()=>this.opts.disabled.current||this.root.opts.disabled.current);constructor(t,n){this.opts=t,this.root=n,this.attachment=En(this.opts.ref),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}onclick(t){if(!e(this.#e)){if(t.button!==0)return t.preventDefault();this.root.toggleOpen()}}onkeydown(t){e(this.#e)||(t.key===wr||t.key===Cs)&&(t.preventDefault(),this.root.toggleOpen())}#t=h(()=>({id:this.opts.id.current,type:"button",disabled:e(this.#e),"aria-controls":this.root.contentId,"aria-expanded":xr(this.root.opts.open.current),"data-state":Gn(this.root.opts.open.current),"data-disabled":Dn(e(this.#e)),[Sr.trigger]:"",onclick:this.onclick,onkeydown:this.onkeydown,...this.attachment}));get props(){return e(this.#t)}set props(t){v(this.#t,t)}}var _a=new Set(["$$slots","$$events","$$legacy","children","child","id","ref","open","disabled","onOpenChange","onOpenChangeComplete"]),ga=u("<div><!></div>");function ba(r,t){const n=_n();Ye(t,!0);let s=B(t,"id",19,()=>gn(n)),o=B(t,"ref",15,null),i=B(t,"open",15,!1),l=B(t,"disabled",3,!1),d=B(t,"onOpenChange",3,Zt),g=B(t,"onOpenChangeComplete",3,Zt),P=Et(t,_a);const E=Cr.create({open:be(()=>i(),m=>{i(m),d()(m)}),disabled:be(()=>l()),id:be(()=>s()),ref:be(()=>o(),m=>o(m)),onOpenChangeComplete:be(()=>g())}),O=h(()=>sn(P,E.props));var A=fe(),M=R(A);{var K=m=>{var j=fe(),te=R(j);St(te,()=>t.child,()=>({props:e(O)})),a(m,j)},p=m=>{var j=ga();rn(j,()=>({...e(O)}));var te=k(j);St(te,()=>t.children??Nt),b(j),a(m,j)};I(M,m=>{t.child?m(K):m(p,-1)})}a(r,A),$e()}var ya=new Set(["$$slots","$$events","$$legacy","child","ref","forceMount","hiddenUntilFound","children","id"]),wa=u("<div><!></div>");function xa(r,t){const n=_n();Ye(t,!0);let s=B(t,"ref",15,null),o=B(t,"forceMount",3,!1),i=B(t,"hiddenUntilFound",3,!1),l=B(t,"id",19,()=>gn(n)),d=Et(t,ya);const g=Ir.create({id:be(()=>l()),forceMount:be(()=>o()),hiddenUntilFound:be(()=>i()),ref:be(()=>s(),K=>s(K))}),P=h(()=>sn(d,g.props));var E=fe(),O=R(E);{var A=K=>{var p=fe(),m=R(p);{let j=h(()=>({...g.snippetProps,props:e(P)}));St(m,()=>t.child,()=>e(j))}a(K,p)},M=K=>{var p=wa();rn(p,()=>({...e(P)}));var m=k(p);St(m,()=>t.children??Nt),b(p),a(K,p)};I(O,K=>{t.child?K(A):K(M,-1)})}a(r,E),$e()}var ka=new Set(["$$slots","$$events","$$legacy","children","child","ref","id","disabled"]),Pa=u("<button><!></button>");function Ta(r,t){const n=_n();Ye(t,!0);let s=B(t,"ref",15,null),o=B(t,"id",19,()=>gn(n)),i=B(t,"disabled",3,!1),l=Et(t,ka);const d=Mr.create({id:be(()=>o()),ref:be(()=>s(),M=>s(M)),disabled:be(()=>i())}),g=h(()=>sn(l,d.props));var P=fe(),E=R(P);{var O=M=>{var K=fe(),p=R(K);St(p,()=>t.child,()=>({props:e(g)})),a(M,K)},A=M=>{var K=Pa();rn(K,()=>({...e(g)}));var p=k(K);St(p,()=>t.children??Nt),b(K),a(M,K)};I(E,M=>{t.child?M(O):M(A,-1)})}a(r,P),$e()}const Sa={afterMs:1e4,onChange:Zt};function Ea(r,t){const{afterMs:n,onChange:s,getWindow:o}={...Sa,...t};let i=null,l=q(on(r));function d(){return o().setTimeout(()=>{v(l,r,!0),s?.(r)},n)}return Be(()=>()=>{i&&o().clearTimeout(i)}),be(()=>e(l),g=>{v(l,g,!0),s?.(g),i&&o().clearTimeout(i),i=d()})}class Ca{#e;#t;#n=h(()=>this.#e.onMatch?this.#e.onMatch:t=>t.focus());#r=h(()=>this.#e.getCurrentItem?this.#e.getCurrentItem:this.#e.getActiveElement);constructor(t){this.#e=t,this.#t=Ea("",{afterMs:1e3,getWindow:t.getWindow}),this.handleTypeaheadSearch=this.handleTypeaheadSearch.bind(this),this.resetTypeahead=this.resetTypeahead.bind(this)}handleTypeaheadSearch(t,n){if(!n.length)return;this.#t.current=this.#t.current+t;const s=e(this.#r)(),o=n.find(g=>g===s)?.textContent?.trim()??"",i=n.map(g=>g.textContent?.trim()??""),l=Ks(i,this.#t.current,o),d=n.find(g=>g.textContent?.trim()===l);return d&&e(this.#n)(d),d}resetTypeahead(){this.#t.current=""}get search(){return this.#t.current}}function Hs(r,t){Ye(t,!0);let n=B(t,"tooltip",3,!1);Po.create({id:be(()=>t.id),virtualEl:be(()=>t.virtualEl),ref:zt(()=>t.ref)},zt(()=>n()));var s=fe(),o=R(s);St(o,()=>t.children??Nt),a(r,s),$e()}const Ia=[Cs,wr],Ma=[er,ho,Es],Ws=[Qn,po,Ss],Oa=[...Ma,...Ws];function cn(r){return r.pointerType==="mouse"}function Aa(r,{select:t=!1}={}){if(!r||!r.focus)return;const n=rr(r);if(n.activeElement===r)return;const s=n.activeElement;r.focus({preventScroll:!0}),r!==s&&mo(r)&&t&&r.select()}function La(r,{select:t=!1}={},n){const s=n();for(const o of r)if(Aa(o,{select:t}),n()!==s)return!0}let On=q(!1);class Pn{static _refs=0;static _cleanup;constructor(){Be(()=>(Pn._refs===0&&(Pn._cleanup=no(()=>{const t=[],n=o=>{v(On,!1)},s=o=>{v(On,!0)};return t.push(Bn(document,"pointerdown",n,{capture:!0}),Bn(document,"keydown",s,{capture:!0})),Be(()=>{if(e(On))return Bn(document,"pointermove",n,{capture:!0})}),_o(...t)})),Pn._refs++,()=>{Pn._refs--,Pn._refs===0&&(v(On,!1),Pn._cleanup?.())}))}get current(){return e(On)}set current(t){v(On,t,!0)}}function Wn(){return{getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"}}function Da(r,t){if(!Pr(r,Wn()))return Ra(r,t);const n=rr(r),s=To(n.body,Wn());t==="prev"&&s.reverse();const o=s.indexOf(r);return o===-1?n.body:s.slice(o+1)[0]}function Ra(r,t){const n=rr(r);if(!So(r,Wn()))return n.body;const s=Eo(n.body,Wn());t==="prev"&&s.reverse();const o=s.indexOf(r);return o===-1?n.body:s.slice(o+1).find(l=>Pr(l,Wn()))??n.body}const Us=new nr("Menu.Root"),Or=new nr("Menu.Root | Menu.Sub"),Vs=new nr("Menu.Content"),Na=new ma("bitsmenuopen",{bubbles:!1,cancelable:!0}),ja=kr({component:"menu",parts:["trigger","content","sub-trigger","item","group","group-heading","checkbox-group","checkbox-item","radio-group","radio-item","separator","sub-content","arrow"]});class qa{#e;#t=null;#n=null;#r=!1;#s=null;#a=null;#o=null;#l=null;constructor(t){this.#e=t,hn([t.triggerNode,t.contentNode,t.enabled],([n,s,o])=>{if(this.#p(),!n||!s||!o)return;const i=O=>{cn(O)&&(this.#l={x:O.clientX,y:O.clientY},this.#r||this.#y(O,"content"))},l=O=>{cn(O)&&this.#w(O,"content")},d=O=>{cn(O)&&(this.#r||this.#y(O,"trigger"))},g=O=>{if(cn(O)){if(Kn(O.relatedTarget)){const A=this.#e.subContentSelector(),M=O.relatedTarget.closest(A);if(M&&M!==s&&M.id&&!!s.querySelector(`[aria-controls="${M.id}"]`))return}this.#w(O,"trigger")}},P=O=>{cn(O)&&this.#v()},E=O=>{cn(O)&&this.#v()};return n.addEventListener("pointermove",i),n.addEventListener("pointerleave",l),n.addEventListener("pointerenter",P),s.addEventListener("pointermove",d),s.addEventListener("pointerleave",g),s.addEventListener("pointerenter",E),()=>{n.removeEventListener("pointermove",i),n.removeEventListener("pointerleave",l),n.removeEventListener("pointerenter",P),s.removeEventListener("pointermove",d),s.removeEventListener("pointerleave",g),s.removeEventListener("pointerenter",E),this.#p()}}),Ls(()=>{this.#p()})}#d(){const t=this.#e.parentContentNode();return t?t.getBoundingClientRect():this.#e.triggerNode()?.getBoundingClientRect()??null}#i(t,n){const s=this.#e.triggerNode(),o=this.#e.contentNode();if(!s||!o)return null;const i=s.getBoundingClientRect(),l=o.getBoundingClientRect(),d=Fa(i,l);let g,P,E;return n==="content"?(g=this.#r?this.#a??t:t,P=l):(g=this.#l??t,P=this.#d()??i,E=l),this.#a=g,{corridor:Ba(i,l,d),intent:Ka(g,P,d,n,E),targetRect:P,side:d}}#b(t,n,s){return Xr(t,n)||Xr(t,s)}#y(t,n){const s={x:t.clientX,y:t.clientY};this.#i(s,n)&&(this.#s=n,this.#o=s)}#w(t,n){if(!this.#e.enabled())return;const s=this.#e.triggerNode(),o=this.#e.contentNode();if(!s||!o)return;const i=t.relatedTarget;if(Kn(i)&&(n==="content"&&o.contains(i)||n==="trigger"&&s.contains(i)))return;const l={x:t.clientX,y:t.clientY},d=this.#i(l,n);if(d){if(!Yr(l,d.targetRect)&&!this.#b(l,d.corridor,d.intent)){this.#g();return}this.#r=!0,this.#s=n,this.#o=l,this.#e.setIsPointerInTransit(!0),this.#P(),this.#_()}}#c=null;#v(){if(!this.#r)return;const t=this.#s==="trigger";this.#m(),this.#u(),this.#r=!1,this.#g(),t?(this.#h(),this.#c=setTimeout(()=>{this.#c=null,this.#e.setIsPointerInTransit(!1)},100)):this.#e.setIsPointerInTransit(!1)}#h(){this.#c!==null&&(clearTimeout(this.#c),this.#c=null)}#f(){const t=this.#o;this.#m(),this.#u(),this.#h(),this.#r=!1,this.#e.setIsPointerInTransit(!1),this.#g(),this.#e.onIntentExit(t)}#p(){this.#m(),this.#u(),this.#h(),this.#r&&this.#e.setIsPointerInTransit(!1),this.#r=!1,this.#s=null,this.#a=null,this.#o=null,this.#l=null}#k(t){const n=this.#e.contentNode();if(!n)return!1;const o=n.ownerDocument.elementFromPoint(t.x,t.y);if(!o)return!1;const i=this.#e.subContentSelector(),l=o.closest(i);return!l||l===n?!1:l.id?!!n.querySelector(`[aria-controls="${l.id}"]`):!1}#x=t=>{if(!this.#r||!this.#s||!cn(t))return;const n=this.#e.triggerNode(),s=this.#e.contentNode();if(!n||!s){this.#f();return}this.#u();const o={x:t.clientX,y:t.clientY};this.#o=o;const i=n.getBoundingClientRect(),l=s.getBoundingClientRect();if(this.#s==="content"&&Yr(o,l)){this.#v();return}if(this.#s==="trigger"&&za(o,i,4)){this.#v();return}if(this.#k(o)){this.#_();return}const d=this.#i(o,this.#s);if(!d){this.#f();return}if(this.#b(o,d.corridor,d.intent)){this.#_();return}this.#f()};#P(){if(this.#t)return;const t=rr(this.#e.triggerNode()??this.#e.contentNode());t&&(t.addEventListener("pointermove",this.#x,!0),this.#t=()=>{t.removeEventListener("pointermove",this.#x,!0),this.#t=null})}#m(){this.#t?.()}#_(){this.#u(),this.#n=setTimeout(()=>{this.#n=null,this.#r&&this.#f()},500)}#u(){this.#n!==null&&(clearTimeout(this.#n),this.#n=null)}#g(){this.#s=null,this.#a=null,this.#o=null}}function Xr(r,t){const{x:n,y:s}=r;let o=!1;for(let i=0,l=t.length-1;i<t.length;l=i++){const d=t[i].x,g=t[i].y,P=t[l].x,E=t[l].y;g>s!=E>s&&n<(P-d)*(s-g)/(E-g)+d&&(o=!o)}return o}function Yr(r,t){return r.x>=t.left&&r.x<=t.right&&r.y>=t.top&&r.y<=t.bottom}function za(r,t,n){return r.x>=t.left+n&&r.x<=t.right-n&&r.y>=t.top+n&&r.y<=t.bottom-n}function Fa(r,t){const n=r.left+r.width/2,s=r.top+r.height/2,o=t.left+t.width/2,i=t.top+t.height/2,l=o-n,d=i-s;return Math.abs(l)>Math.abs(d)?l>0?"right":"left":d>0?"bottom":"top"}function Ba(r,t,n){switch(n){case"top":return[{x:Math.min(r.left,t.left)-2,y:r.top},{x:Math.min(r.left,t.left)-2,y:t.bottom},{x:Math.max(r.right,t.right)+2,y:t.bottom},{x:Math.max(r.right,t.right)+2,y:r.top}];case"bottom":return[{x:Math.min(r.left,t.left)-2,y:r.bottom},{x:Math.min(r.left,t.left)-2,y:t.top},{x:Math.max(r.right,t.right)+2,y:t.top},{x:Math.max(r.right,t.right)+2,y:r.bottom}];case"left":return[{x:r.left,y:Math.min(r.top,t.top)-2},{x:t.right,y:Math.min(r.top,t.top)-2},{x:t.right,y:Math.max(r.bottom,t.bottom)+2},{x:r.left,y:Math.max(r.bottom,t.bottom)+2}];case"right":return[{x:r.right,y:Math.min(r.top,t.top)-2},{x:t.left,y:Math.min(r.top,t.top)-2},{x:t.left,y:Math.max(r.bottom,t.bottom)+2},{x:r.right,y:Math.max(r.bottom,t.bottom)+2}]}}function Ka(r,t,n,s,o){const l=s==="trigger"?Ha(n):n,d=o?Math.min(t.top,o.top)-8:t.top-8,g=o?Math.max(t.bottom,o.bottom)+8:t.bottom+8,P=o?Math.min(t.left,o.left)-8:t.left-8,E=o?Math.max(t.right,o.right)+8:t.right+8;switch(l){case"right":return[r,{x:t.left,y:d},{x:t.left,y:g}];case"left":return[r,{x:t.right,y:d},{x:t.right,y:g}];case"bottom":return[r,{x:P,y:t.top},{x:E,y:t.top}];case"top":return[r,{x:P,y:t.bottom},{x:E,y:t.bottom}]}}function Ha(r){switch(r){case"top":return"bottom";case"bottom":return"top";case"left":return"right";case"right":return"left"}}class Ar{static create(t){const n=new Ar(t);return Us.set(n)}opts;isUsingKeyboard=new Pn;#e=q(!1);get ignoreCloseAutoFocus(){return e(this.#e)}set ignoreCloseAutoFocus(t){v(this.#e,t,!0)}#t=q(!1);get isPointerInTransit(){return e(this.#t)}set isPointerInTransit(t){v(this.#t,t,!0)}constructor(t){this.opts=t}getBitsAttr=t=>ja.getAttr(t,this.opts.variant.current)}class Lr{static create(t,n){return Or.set(new Lr(t,n,null))}opts;root;parentMenu;#e=q(be(()=>""));get contentId(){return e(this.#e)}set contentId(t){v(this.#e,t)}#t=q(null);get contentNode(){return e(this.#t)}set contentNode(t){v(this.#t,t,!0)}contentPresence;#n=q(null);get triggerNode(){return e(this.#n)}set triggerNode(t){v(this.#n,t,!0)}constructor(t,n,s){this.opts=t,this.root=n,this.parentMenu=s,this.contentPresence=new As({ref:be(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)},shouldSkipExitAnimation:()=>this.root.opts.variant.current!=="menubar"||this.parentMenu!==null?!1:this.root.opts.shouldSkipExitAnimation?.()??!1}),s&&hn(()=>s.opts.open.current,()=>{s.opts.open.current||(this.opts.open.current=!1)})}toggleOpen(){this.opts.open.current=!this.opts.open.current}onOpen(){this.opts.open.current=!0}onClose(){this.opts.open.current=!1}}class Dr{static create(t){return Vs.set(new Dr(t,Or.get()))}opts;parentMenu;rovingFocusGroup;domContext;attachment;#e=q("");get search(){return e(this.#e)}set search(t){v(this.#e,t,!0)}#t=0;#n;#r=q(!1);get mounted(){return e(this.#r)}set mounted(t){v(this.#r,t,!0)}pressedItem=null;#s;constructor(t,n){this.opts=t,this.parentMenu=n,this.domContext=new Co(t.ref),this.attachment=En(this.opts.ref,s=>{this.parentMenu.contentNode!==s&&(this.parentMenu.contentNode=s)}),n.contentId=t.id,this.#s=t.isSub??!1,this.onkeydown=this.onkeydown.bind(this),this.onblur=this.onblur.bind(this),this.onfocus=this.onfocus.bind(this),this.handleInteractOutside=this.handleInteractOutside.bind(this),new qa({contentNode:()=>this.parentMenu.contentNode,triggerNode:()=>this.parentMenu.triggerNode,parentContentNode:()=>this.parentMenu.parentMenu?.contentNode??null,subContentSelector:()=>`[${this.parentMenu.root.getBitsAttr("sub-content")}]`,enabled:()=>this.parentMenu.opts.open.current&&!!this.parentMenu.triggerNode?.hasAttribute(this.parentMenu.root.getBitsAttr("sub-trigger")),onIntentExit:s=>{this.parentMenu.opts.open.current=!1,this.#l(s)},setIsPointerInTransit:s=>{this.parentMenu.root.isPointerInTransit=s}}),this.#n=new Ca({getActiveElement:()=>this.domContext.getActiveElement(),getWindow:()=>this.domContext.getWindow()}).handleTypeaheadSearch,this.rovingFocusGroup=new fa({rootNode:be(()=>this.parentMenu.contentNode),candidateAttr:this.parentMenu.root.getBitsAttr("item"),loop:this.opts.loop,orientation:be(()=>"vertical")}),hn(()=>this.parentMenu.contentNode,s=>{if(!s)return;const o=()=>{Tn(()=>{this.parentMenu.root.isUsingKeyboard.current&&this.rovingFocusGroup.focusFirstCandidate()})};return Na.listen(s,o)}),Be(()=>{this.parentMenu.opts.open.current||(this.domContext.getWindow().clearTimeout(this.#t),this.clearPressedItem())})}#a(){const t=this.parentMenu.contentNode;return t?Array.from(t.querySelectorAll(`[${this.parentMenu.root.getBitsAttr("item")}]:not([data-disabled])`)):[]}#o(){return this.parentMenu.root.isPointerInTransit}#l(t){if(!t)return;const n=this.parentMenu.parentMenu?.contentNode;if(!n)return;const s=this.domContext.getDocument().elementFromPoint(t.x,t.y);if(!Kn(s))return;const o=s.closest(`[${this.parentMenu.root.getBitsAttr("sub-trigger")}]`);!o||!n.contains(o)||o!==this.parentMenu.triggerNode&&o.dispatchEvent(new PointerEvent("pointermove",{bubbles:!0,cancelable:!0,pointerType:"mouse",clientX:t.x,clientY:t.y}))}onCloseAutoFocus=t=>{if(this.opts.onCloseAutoFocus.current?.(t),!(t.defaultPrevented||this.#s)){if(this.parentMenu.root.ignoreCloseAutoFocus){t.preventDefault();return}this.parentMenu.triggerNode&&Pr(this.parentMenu.triggerNode)&&(t.preventDefault(),this.parentMenu.triggerNode.focus())}};handleTabKeyDown(t){let n=this.parentMenu;for(;n.parentMenu!==null;)n=n.parentMenu;if(!n.triggerNode)return;t.preventDefault();const s=Da(n.triggerNode,t.shiftKey?"prev":"next");s?(this.parentMenu.root.ignoreCloseAutoFocus=!0,n.onClose(),Tn(()=>{s.focus(),Tn(()=>{this.parentMenu.root.ignoreCloseAutoFocus=!1})})):this.domContext.getDocument().body.focus()}onkeydown(t){if(t.defaultPrevented)return;if(t.key===bo){this.handleTabKeyDown(t);return}const n=t.target,s=t.currentTarget;if(!An(n)||!An(s))return;const o=n.closest(`[${this.parentMenu.root.getBitsAttr("content")}]`)?.id===this.parentMenu.contentId.current,i=t.ctrlKey||t.altKey||t.metaKey,l=t.key.length===1;if(this.rovingFocusGroup.handleKeydown(n,t)||t.code==="Space")return;const g=this.#a();o&&!i&&l&&this.#n(t.key,g),t.target?.id===this.parentMenu.contentId.current&&Oa.includes(t.key)&&(t.preventDefault(),Ws.includes(t.key)&&g.reverse(),La(g,{select:!1},()=>this.domContext.getActiveElement()))}onblur(t){Kn(t.currentTarget)&&Kn(t.target)&&(t.currentTarget.contains?.(t.target)||(this.domContext.getWindow().clearTimeout(this.#t),this.search=""))}onfocus(t){this.parentMenu.root.isUsingKeyboard.current&&Tn(()=>this.rovingFocusGroup.focusFirstCandidate())}onItemEnter(){return this.#o()}onItemLeave(t){if(t.currentTarget.hasAttribute(this.parentMenu.root.getBitsAttr("sub-trigger"))||this.#o()||this.parentMenu.root.isUsingKeyboard.current)return;this.parentMenu.contentNode?.focus({preventScroll:!0}),this.rovingFocusGroup.setCurrentTabStopId("")}onTriggerLeave(){return!!this.#o()}handleInteractOutside(t){if(!yo(t.target))return;const n=this.parentMenu.triggerNode?.id;if(t.target.id===n){t.preventDefault();return}if(t.target.closest(`#${n}`)){t.preventDefault();return}this.parentMenu.root.ignoreCloseAutoFocus=!0,Tn(()=>{this.parentMenu.root.ignoreCloseAutoFocus=!1})}clearPressedItem=()=>{this.pressedItem=null};get shouldRender(){return this.parentMenu.contentPresence.shouldRender}#d=h(()=>({open:this.parentMenu.opts.open.current}));get snippetProps(){return e(this.#d)}set snippetProps(t){v(this.#d,t)}#i=h(()=>({id:this.opts.id.current,role:"menu","aria-orientation":"vertical",[this.parentMenu.root.getBitsAttr("content")]:"","data-state":Gn(this.parentMenu.opts.open.current),...Is(this.parentMenu.contentPresence.transitionStatus),onkeydown:this.onkeydown,onblur:this.onblur,onfocus:this.onfocus,onpointerdowncapture:this.clearPressedItem,dir:this.parentMenu.root.opts.dir.current,style:{pointerEvents:"auto",contain:"layout style"},...this.attachment}));get props(){return e(this.#i)}set props(t){v(this.#i,t)}popperProps={onCloseAutoFocus:t=>this.onCloseAutoFocus(t)}}class Wa{opts;content;attachment;#e=q(!1);constructor(t,n){this.opts=t,this.content=n,this.attachment=En(this.opts.ref),this.onpointermove=this.onpointermove.bind(this),this.onpointerleave=this.onpointerleave.bind(this),this.onfocus=this.onfocus.bind(this),this.onblur=this.onblur.bind(this)}onpointermove(t){if(!t.defaultPrevented&&cn(t))if(this.opts.disabled.current)this.content.onItemLeave(t);else{if(this.content.onItemEnter())return;const s=t.currentTarget;if(!An(s))return;s.focus({preventScroll:!0})}}onpointerleave(t){t.defaultPrevented||cn(t)&&this.content.onItemLeave(t)}onfocus(t){Tn(()=>{t.defaultPrevented||this.opts.disabled.current||v(this.#e,!0)})}onblur(t){Tn(()=>{t.defaultPrevented||v(this.#e,!1)})}#t=h(()=>({id:this.opts.id.current,tabindex:-1,role:"menuitem","aria-disabled":xr(this.opts.disabled.current),"data-disabled":Dn(this.opts.disabled.current),"data-highlighted":e(this.#e)?"":void 0,[this.content.parentMenu.root.getBitsAttr("item")]:"",onpointermove:this.onpointermove,onpointerleave:this.onpointerleave,onfocus:this.onfocus,onblur:this.onblur,...this.attachment}));get props(){return e(this.#t)}set props(t){v(this.#t,t)}}class Rr{static create(t){const n=new Wa(t,Vs.get());return new Rr(t,n)}opts;item;root;constructor(t,n){this.opts=t,this.item=n,this.root=n.content.parentMenu.root,this.onkeydown=this.onkeydown.bind(this),this.onclick=this.onclick.bind(this),this.onpointerdown=this.onpointerdown.bind(this),this.onpointerup=this.onpointerup.bind(this)}#e(){if(this.item.opts.disabled.current)return;const t=new CustomEvent("menuitemselect",{bubbles:!0,cancelable:!0});if(this.opts.onSelect.current(t),t.defaultPrevented){this.item.content.parentMenu.root.isUsingKeyboard.current=!1;return}this.opts.closeOnSelect.current&&this.item.content.parentMenu.root.opts.onClose()}onkeydown(t){const n=this.item.content.search!=="";if(!(this.item.opts.disabled.current||n&&t.key===wr)&&Ia.includes(t.key)){if(!An(t.currentTarget))return;t.currentTarget.click(),t.preventDefault()}}onclick(t){this.item.opts.disabled.current||this.#e()}onpointerup(t){const n=this.item.content,s=n.pressedItem;if(n.pressedItem=null,t.defaultPrevented||s?.item===this)return;const o=s&&Math.hypot(t.clientX-s.x,t.clientY-s.y)<4?s.item.item.opts.ref.current:t.currentTarget;An(o)&&o.click()}onpointerdown(t){this.item.content.pressedItem={item:this,x:t.clientX,y:t.clientY}}#t=h(()=>sn(this.item.props,{onclick:this.onclick,onpointerdown:this.onpointerdown,onpointerup:this.onpointerup,onkeydown:this.onkeydown}));get props(){return e(this.#t)}set props(t){v(this.#t,t)}}class Nr{static create(t){return new Nr(t,Us.get())}opts;root;attachment;constructor(t,n){this.opts=t,this.root=n,this.attachment=En(this.opts.ref)}#e=h(()=>({id:this.opts.id.current,role:"separator",[this.root.getBitsAttr("separator")]:"",...this.attachment}));get props(){return e(this.#e)}set props(t){v(this.#e,t)}}class jr{static create(t){return new jr(t,Or.get())}opts;parentMenu;attachment;#e=q(on({x:0,y:0}));virtualElement=go({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...e(this.#e)})});#t=null;constructor(t,n){this.opts=t,this.parentMenu=n,this.attachment=En(this.opts.ref,s=>this.parentMenu.triggerNode=s),this.oncontextmenu=this.oncontextmenu.bind(this),this.onpointerdown=this.onpointerdown.bind(this),this.onpointermove=this.onpointermove.bind(this),this.onpointercancel=this.onpointercancel.bind(this),this.onpointerup=this.onpointerup.bind(this),hn(()=>e(this.#e),s=>{this.virtualElement.current={getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...s})}}),hn(()=>this.opts.disabled.current,s=>{s&&this.#n()}),Ls(()=>this.#n())}#n(){this.#t!==null&&Kr(this.opts.ref.current).clearTimeout(this.#t)}#r(t){v(this.#e,{x:t.clientX,y:t.clientY},!0),this.parentMenu.onOpen()}oncontextmenu(t){t.defaultPrevented||this.opts.disabled.current||(this.#n(),this.#r(t),t.preventDefault(),this.parentMenu.contentNode?.focus())}onpointerdown(t){this.opts.disabled.current||cn(t)||(this.#n(),this.#t=Kr(this.opts.ref.current).setTimeout(()=>this.#r(t),700))}onpointermove(t){this.opts.disabled.current||cn(t)||this.#n()}onpointercancel(t){this.opts.disabled.current||cn(t)||this.#n()}onpointerup(t){this.opts.disabled.current||cn(t)||this.#n()}#s=h(()=>({id:this.opts.id.current,disabled:this.opts.disabled.current,"data-disabled":Dn(this.opts.disabled.current),"data-state":Gn(this.parentMenu.opts.open.current),[Ds]:"",tabindex:-1,onpointerdown:this.onpointerdown,onpointermove:this.onpointermove,onpointercancel:this.onpointercancel,onpointerup:this.onpointerup,oncontextmenu:this.oncontextmenu,...this.attachment}));get props(){return e(this.#s)}set props(t){v(this.#s,t)}}function Ua(r,t){Ye(t,!0);let n=B(t,"open",15,!1),s=B(t,"dir",3,"ltr"),o=B(t,"onOpenChange",3,Zt),i=B(t,"onOpenChangeComplete",3,Zt);const l=Ar.create({variant:be(()=>"context-menu"),dir:be(()=>s()),onClose:()=>{n(!1),o()?.(!1)}});Lr.create({open:be(()=>n(),d=>{n(d),o()(d)}),onOpenChangeComplete:be(()=>i())},l),Io(r,{children:(d,g)=>{var P=fe(),E=R(P);St(E,()=>t.children??Nt),a(d,P)},$$slots:{default:!0}}),$e()}var Va=new Set(["$$slots","$$events","$$legacy","child","children","ref","id","disabled","onSelect","closeOnSelect"]),Ga=u("<div><!></div>");function Xa(r,t){const n=_n();Ye(t,!0);let s=B(t,"ref",15,null),o=B(t,"id",19,()=>gn(n)),i=B(t,"disabled",3,!1),l=B(t,"onSelect",3,Zt),d=B(t,"closeOnSelect",3,!0),g=Et(t,Va);const P=Rr.create({id:be(()=>o()),disabled:be(()=>i()),onSelect:be(()=>l()),ref:be(()=>s(),p=>s(p)),closeOnSelect:be(()=>d())}),E=h(()=>sn(g,P.props));var O=fe(),A=R(O);{var M=p=>{var m=fe(),j=R(m);St(j,()=>t.child,()=>({props:e(E)})),a(p,m)},K=p=>{var m=Ga();rn(m,()=>({...e(E)}));var j=k(m);St(j,()=>t.children??Nt),b(m),a(p,m)};I(A,p=>{t.child?p(M):p(K,-1)})}a(r,O),$e()}var Ya=new Set(["$$slots","$$events","$$legacy","id","child","children","ref","loop","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","preventScroll","side","sideOffset","align","onEscapeKeydown","forceMount","trapFocus","style"]),$r=u("<div><div><!></div></div>");function $a(r,t){Ye(t,!0);let n=B(t,"id",19,Rs),s=B(t,"ref",15,null),o=B(t,"loop",3,!0),i=B(t,"onInteractOutside",3,Zt),l=B(t,"onCloseAutoFocus",3,Zt),d=B(t,"onOpenAutoFocus",3,Zt),g=B(t,"preventScroll",3,!0),P=B(t,"side",3,"right"),E=B(t,"sideOffset",3,2),O=B(t,"align",3,"start"),A=B(t,"onEscapeKeydown",3,Zt),M=B(t,"forceMount",3,!1),K=B(t,"trapFocus",3,!1),p=Et(t,Ya);const m=Dr.create({id:be(()=>n()),loop:be(()=>o()),ref:be(()=>s(),X=>s(X)),onCloseAutoFocus:be(()=>l())}),j=h(()=>sn(p,m.props,{side:P(),sideOffset:E(),align:O(),onOpenAutoFocus:d(),isValidEvent:Ce,trapFocus:K(),loop:o(),id:n(),ref:m.opts.ref,preventScroll:g(),onInteractOutside:te,onEscapeKeydown:G,shouldRender:m.shouldRender}));function te(X){if(i()(X),!X.defaultPrevented){if(X.target&&X.target instanceof Element){const Ie=`[${m.parentMenu.root.getBitsAttr("sub-content")}]`;if(X.target.closest(Ie))return}m.parentMenu.onClose()}}function G(X){A()(X),!X.defaultPrevented&&m.parentMenu.onClose()}function Ce(X){if("button"in X&&X.button===2){const Ie=X.target;return Ie?Ie.closest(`[${Ds}]`)!==m.parentMenu.triggerNode:!1}return!1}var ae=fe(),Le=R(ae);{var ce=X=>{Mo(X,Ft(()=>e(j),()=>m.popperProps,{get enabled(){return m.parentMenu.opts.open.current},popper:(qe,at)=>{let kt=()=>(at?.()).props,ut=()=>(at?.()).wrapperProps;const se=h(()=>sn(kt(),{style:Hr("context-menu")},{style:t.style}));var V=fe(),z=R(V);{var he=Me=>{var ye=fe(),de=R(ye);{let Ve=h(()=>({props:e(se),wrapperProps:ut(),...m.snippetProps}));St(de,()=>t.child,()=>e(Ve))}a(Me,ye)},Ee=Me=>{var ye=$r();rn(ye,()=>({...ut()}));var de=k(ye);rn(de,()=>({...e(se)}));var Ve=k(de);St(Ve,()=>t.children??Nt),b(de),b(ye),a(Me,ye)};I(z,Me=>{t.child?Me(he):Me(Ee,-1)})}a(qe,V)},$$slots:{popper:!0}}))},$=X=>{Oo(X,Ft(()=>e(j),()=>m.popperProps,{get open(){return m.parentMenu.opts.open.current},popper:(qe,at)=>{let kt=()=>(at?.()).props,ut=()=>(at?.()).wrapperProps;const se=h(()=>sn(kt(),{style:Hr("context-menu")},{style:t.style}));var V=fe(),z=R(V);{var he=Me=>{var ye=fe(),de=R(ye);{let Ve=h(()=>({props:e(se),wrapperProps:ut(),...m.snippetProps}));St(de,()=>t.child,()=>e(Ve))}a(Me,ye)},Ee=Me=>{var ye=$r();rn(ye,()=>({...ut()}));var de=k(ye);rn(de,()=>({...e(se)}));var Ve=k(de);St(Ve,()=>t.children??Nt),b(de),b(ye),a(Me,ye)};I(z,Me=>{t.child?Me(he):Me(Ee,-1)})}a(qe,V)},$$slots:{popper:!0}}))};I(Le,X=>{M()?X(ce):M()||X($,1)})}a(r,ae),$e()}var Ja=new Set(["$$slots","$$events","$$legacy","id","ref","child","children","disabled"]),Za=u("<div><!></div>");function Qa(r,t){Ye(t,!0);let n=B(t,"id",19,Rs),s=B(t,"ref",15,null),o=B(t,"disabled",3,!1),i=Et(t,Ja);const l=jr.create({id:be(()=>n()),disabled:be(()=>o()),ref:be(()=>s(),E=>s(E))}),d=h(()=>sn(i,l.props,{style:{pointerEvents:"auto"}},{style:t.style,tabindex:t.tabindex}));var g=fe(),P=R(g);Qe(P,()=>Hs,(E,O)=>{O(E,{get id(){return n()},get virtualEl(){return l.virtualElement},get ref(){return l.opts.ref},children:(A,M)=>{var K=fe(),p=R(K);{var m=te=>{var G=fe(),Ce=R(G);St(Ce,()=>t.child,()=>({props:e(d)})),a(te,G)},j=te=>{var G=Za();rn(G,()=>({...e(d)}));var Ce=k(G);St(Ce,()=>t.children??Nt),b(G),a(te,G)};I(p,te=>{t.child?te(m):te(j,-1)})}a(A,K)},$$slots:{default:!0}})}),a(r,g),$e()}var ei=new Set(["$$slots","$$events","$$legacy","ref","id","child","children"]),ti=u("<div><!></div>");function ni(r,t){const n=_n();Ye(t,!0);let s=B(t,"ref",15,null),o=B(t,"id",19,()=>gn(n)),i=Et(t,ei);const l=Nr.create({id:be(()=>o()),ref:be(()=>s(),A=>s(A))}),d=h(()=>sn(i,l.props));var g=fe(),P=R(g);{var E=A=>{var M=fe(),K=R(M);St(K,()=>t.child,()=>({props:e(d)})),a(A,M)},O=A=>{var M=ti();rn(M,()=>({...e(d)}));var K=k(M);St(K,()=>t.children??Nt),b(M),a(A,M)};I(P,A=>{t.child?A(E):A(O,-1)})}a(r,g),$e()}var ri=new Set(["$$slots","$$events","$$legacy","children","child","id","ref","type","disabled","openOnHover","openDelay","closeDelay"]),si=u("<button><!></button>");function oi(r,t){const n=_n();Ye(t,!0);let s=B(t,"id",19,()=>gn(n)),o=B(t,"ref",15,null),i=B(t,"type",3,"button"),l=B(t,"disabled",3,!1),d=B(t,"openOnHover",3,!1),g=B(t,"openDelay",3,700),P=B(t,"closeDelay",3,300),E=Et(t,ri);const O=Ao.create({id:be(()=>s()),ref:be(()=>o(),M=>o(M)),disabled:be(()=>!!l()),openOnHover:be(()=>d()),openDelay:be(()=>g()),closeDelay:be(()=>P())}),A=h(()=>sn(E,O.props,{type:i()}));Hs(r,{get id(){return s()},get ref(){return O.opts.ref},children:(M,K)=>{var p=fe(),m=R(p);{var j=G=>{var Ce=fe(),ae=R(Ce);St(ae,()=>t.child,()=>({props:e(A)})),a(G,Ce)},te=G=>{var Ce=si();rn(Ce,()=>({...e(A)}));var ae=k(Ce);St(ae,()=>t.children??Nt),b(Ce),a(G,Ce)};I(m,G=>{t.child?G(j):G(te,-1)})}a(M,p)},$$slots:{default:!0}}),$e()}function ai(r,t){Ye(t,!0);let n=B(t,"open",15,!1),s=B(t,"onOpenChange",3,Zt),o=B(t,"onOpenChangeComplete",3,Zt);na.create({variant:be(()=>"dialog"),open:be(()=>n(),d=>{n(d),s()(d)}),onOpenChangeComplete:be(()=>o())});var i=fe(),l=R(i);St(l,()=>t.children??Nt),a(r,i),$e()}var ii=new Set(["$$slots","$$events","$$legacy","children","child","id","ref","disabled"]),li=u("<button><!></button>");function ci(r,t){const n=_n();Ye(t,!0);let s=B(t,"id",19,()=>gn(n)),o=B(t,"ref",15,null),i=B(t,"disabled",3,!1),l=Et(t,ii);const d=ra.create({variant:be(()=>"close"),id:be(()=>s()),ref:be(()=>o(),M=>o(M)),disabled:be(()=>!!i())}),g=h(()=>sn(l,d.props));var P=fe(),E=R(P);{var O=M=>{var K=fe(),p=R(K);St(p,()=>t.child,()=>({props:e(g)})),a(M,K)},A=M=>{var K=li();rn(K,()=>({...e(g)}));var p=k(K);St(p,()=>t.children??Nt),b(K),a(M,K)};I(E,M=>{t.child?M(O):M(A,-1)})}a(r,P),$e()}var ui=new Set(["$$slots","$$events","$$legacy","id","children","child","ref","forceMount","onCloseAutoFocus","onOpenAutoFocus","onEscapeKeydown","onInteractOutside","trapFocus","preventScroll","preventOverflowTextSelection","restoreScrollDelay"]),di=u("<!> <!>",1),vi=u("<!> <div><!></div>",1);function fi(r,t){const n=_n();Ye(t,!0);let s=B(t,"id",19,()=>gn(n)),o=B(t,"ref",15,null),i=B(t,"forceMount",3,!1),l=B(t,"onCloseAutoFocus",3,Zt),d=B(t,"onOpenAutoFocus",3,Zt),g=B(t,"onEscapeKeydown",3,Zt),P=B(t,"onInteractOutside",3,Zt),E=B(t,"trapFocus",3,!0),O=B(t,"preventScroll",3,!0),A=B(t,"preventOverflowTextSelection",3,!0),M=B(t,"restoreScrollDelay",3,null),K=Et(t,ui);const p=sa.create({id:be(()=>s()),ref:be(()=>o(),Ce=>o(Ce))}),m=h(()=>sn(K,p.props));var j=fe(),te=R(j);{var G=Ce=>{Lo(Ce,{get ref(){return p.opts.ref},loop:!0,get trapFocus(){return E()},get enabled(){return p.root.opts.open.current},get onOpenAutoFocus(){return d()},get onCloseAutoFocus(){return l()},focusScope:(Le,ce)=>{let $=()=>(ce?.()).props;Do(Le,Ft(()=>e(m),{get enabled(){return p.root.opts.open.current},get ref(){return p.opts.ref},onEscapeKeydown:X=>{g()(X),!X.defaultPrevented&&p.root.handleClose()},children:(X,Ie)=>{Ro(X,Ft(()=>e(m),{get ref(){return p.opts.ref},get enabled(){return p.root.opts.open.current},onInteractOutside:qe=>{P()(qe),!qe.defaultPrevented&&p.root.handleClose()},children:(qe,at)=>{No(qe,Ft(()=>e(m),{get preventOverflowTextSelection(){return A()},get ref(){return p.opts.ref},get enabled(){return p.root.opts.open.current},children:(kt,ut)=>{var se=fe(),V=R(se);{var z=Ee=>{var Me=di(),ye=R(Me);{var de=et=>{Wr(et,{get preventScroll(){return O()},get restoreScrollDelay(){return M()}})};I(ye,et=>{p.root.opts.open.current&&et(de)})}var Ve=c(ye,2);{let et=h(()=>({props:sn(e(m),$()),...p.snippetProps}));St(Ve,()=>t.child,()=>e(et))}a(Ee,Me)},he=Ee=>{var Me=vi(),ye=R(Me);Wr(ye,{get preventScroll(){return O()}});var de=c(ye,2);rn(de,et=>({...et}),[()=>sn(e(m),$())]);var Ve=k(de);St(Ve,()=>t.children??Nt),b(de),a(Ee,Me)};I(V,Ee=>{t.child?Ee(z):Ee(he,-1)})}a(kt,se)},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{focusScope:!0}})};I(te,Ce=>{(p.shouldRender||i())&&Ce(G)})}a(r,j),$e()}const hi=kr({component:"toggle",parts:["root"]});class qr{static create(t){return new qr(t)}opts;attachment;constructor(t){this.opts=t,this.attachment=En(this.opts.ref),this.onclick=this.onclick.bind(this)}onclick(t){this.opts.disabled.current||(this.opts.pressed.current=!this.opts.pressed.current)}#e=h(()=>({pressed:this.opts.pressed.current}));get snippetProps(){return e(this.#e)}set snippetProps(t){v(this.#e,t)}#t=h(()=>({[hi.root]:"",id:this.opts.id.current,"data-disabled":Dn(this.opts.disabled.current),"aria-pressed":xr(this.opts.pressed.current),"data-state":pi(this.opts.pressed.current),disabled:wo(this.opts.disabled.current),onclick:this.onclick,...this.attachment}));get props(){return e(this.#t)}set props(t){v(this.#t,t)}}function pi(r){return r?"on":"off"}var mi=new Set(["$$slots","$$events","$$legacy","ref","id","pressed","onPressedChange","disabled","type","children","child"]),_i=u("<button><!></button>");function gi(r,t){const n=_n();Ye(t,!0);let s=B(t,"ref",15,null),o=B(t,"id",19,()=>gn(n)),i=B(t,"pressed",15,!1),l=B(t,"onPressedChange",3,Zt),d=B(t,"disabled",3,!1),g=B(t,"type",3,"button"),P=Et(t,mi);const E=qr.create({pressed:be(()=>i(),m=>{i(m),l()(m)}),disabled:be(()=>d()??!1),id:be(()=>o()),ref:be(()=>s(),m=>s(m))}),O=h(()=>sn(P,E.props,{type:g()}));var A=fe(),M=R(A);{var K=m=>{var j=fe(),te=R(j);{let G=h(()=>({props:e(O),...E.snippetProps}));St(te,()=>t.child,()=>e(G))}a(m,j)},p=m=>{var j=_i();rn(j,()=>({...e(O)}));var te=k(j);St(te,()=>t.children??Nt,()=>E.snippetProps),b(j),a(m,j)};I(M,m=>{t.child?m(K):m(p,-1)})}a(r,A),$e()}var bi=new Set(["$$slots","$$events","$$legacy"]);function yi(r,t){let n=Et(t,bi);var s=fe(),o=R(s);Qe(o,()=>Ns,(i,l)=>{l(i,Ft(()=>n))}),a(r,s)}var wi=new Set(["$$slots","$$events","$$legacy","ref","portalProps","class"]);function xi(r,t){Ye(t,!0);let n=B(t,"ref",15,null),s=Et(t,wi);yi(r,Ft(()=>t.portalProps,{children:(o,i)=>{var l=fe(),d=R(l);{let g=h(()=>vn("data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-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 ring-foreground/10 bg-popover text-popover-foreground min-w-36 rounded-lg p-1 shadow-md ring-1 duration-100 z-(--z-floating) max-h-(--bits-context-menu-content-available-height) origin-(--bits-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto",t.class));Qe(d,()=>$a,(P,E)=>{E(P,Ft({"data-slot":"context-menu-content",get class(){return e(g)}},()=>s,{get ref(){return n()},set ref(O){n(O)}}))})}a(o,l)},$$slots:{default:!0}})),$e()}var ki=new Set(["$$slots","$$events","$$legacy","ref","class","inset","variant"]);function Fn(r,t){Ye(t,!0);let n=B(t,"ref",15,null),s=B(t,"variant",3,"default"),o=Et(t,ki);var i=fe(),l=R(i);{let d=h(()=>vn("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:text-destructive focus:*:[svg]:text-accent-foreground gap-1.5 rounded-md px-1.5 py-1 text-sm data-inset:pl-7 [&_svg:not([class*='size-'])]:size-4 group/context-menu-item relative flex cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",t.class));Qe(l,()=>Xa,(g,P)=>{P(g,Ft({"data-slot":"context-menu-item",get"data-inset"(){return t.inset},get"data-variant"(){return s()},get class(){return e(d)}},()=>o,{get ref(){return n()},set ref(E){n(E)}}))})}a(r,i),$e()}var Pi=new Set(["$$slots","$$events","$$legacy","ref","class"]);function Ti(r,t){Ye(t,!0);let n=B(t,"ref",15,null),s=Et(t,Pi);var o=fe(),i=R(o);{let l=h(()=>vn("bg-border -mx-1 my-1 h-px",t.class));Qe(i,()=>ni,(d,g)=>{g(d,Ft({"data-slot":"context-menu-separator",get class(){return e(l)}},()=>s,{get ref(){return n()},set ref(P){n(P)}}))})}a(r,o),$e()}var Si=new Set(["$$slots","$$events","$$legacy","ref","class"]);function Ei(r,t){Ye(t,!0);let n=B(t,"ref",15,null),s=Et(t,Si);var o=fe(),i=R(o);{let l=h(()=>vn("select-none",t.class));Qe(i,()=>Qa,(d,g)=>{g(d,Ft({"data-slot":"context-menu-trigger",get class(){return e(l)}},()=>s,{get ref(){return n()},set ref(P){n(P)}}))})}a(r,o),$e()}var Ci=new Set(["$$slots","$$events","$$legacy","open"]);function Ii(r,t){Ye(t,!0);let n=B(t,"open",15,!1),s=Et(t,Ci);var o=fe(),i=R(o);Qe(i,()=>Ua,(l,d)=>{d(l,Ft(()=>s,{get open(){return n()},set open(g){n(g)}}))}),a(r,o),$e()}var Mi=u('<span class="diff svelte-yz18w2"><span class="add svelte-yz18w2"> </span> <span class="del svelte-yz18w2"> </span></span>');function tv(r,t){Ye(t,!0);var n=fe(),s=R(n);{var o=i=>{var l=Mi(),d=k(l),g=L(d),P=c(d,2),E=L(P);b(l),C(()=>{ue(l,"title",`${t.changes.files??""} ${t.changes.files===1?"file":"files"} changed (${t.changes.source==="git"?"git":"this session"})`),S(g,`+${t.changes.additions??""}`),S(E,`−${t.changes.deletions??""}`)}),a(i,l)};I(s,i=>{t.changes&&(t.changes.additions>0||t.changes.deletions>0)&&i(o)})}a(r,n),$e()}var Oi=u('<p class="err svelte-furisw"> </p>'),Ai=u('<p class="dim svelte-furisw">Loading…</p>'),Li=u('<span class="dim svelte-furisw">detached HEAD</span>'),Di=u('<span class="dim svelte-furisw">not a git repository</span>'),Ri=u('<li class="svelte-furisw"><span class="name svelte-furisw"> </span> <a class="mono svelte-furisw" target="_blank" rel="noopener noreferrer"> </a></li>'),Ni=u('<ul class="svelte-furisw"></ul>'),ji=u('<span class="err svelte-furisw"> </span>'),qi=u('<span class="dim svelte-furisw">None. Commit a <code class="svelte-furisw">.claude-mux.json</code> at the root to name them:</span> <pre class="svelte-furisw"></pre>',1),zi=u('<dl class="svelte-furisw"><dt class="svelte-furisw"> </dt> <dd class="mono svelte-furisw"> </dd> <dt class="svelte-furisw">Branch</dt> <dd class="mono svelte-furisw"><!></dd> <dt class="svelte-furisw">URLs</dt> <dd class="svelte-furisw"><!></dd></dl>'),Fi=u('<div class="project svelte-furisw"><!></div>');function Bi(r,t){Ye(t,!0);let n=q(null),s=q(null),o=q(!1),i=0;async function l(p){const m=++i;v(o,!0),v(s,null);try{const j=await fetch(`${Sn(t.base,p)}/project`),te=await j.json();if(!j.ok)throw new Error(te.error??`HTTP ${j.status}`);m===i&&v(n,te,!0)}catch(j){m===i&&v(s,j instanceof Error?j.message:String(j),!0)}finally{m===i&&v(o,!1)}}const d=h(()=>t.session?.id??null),g=h(()=>t.session?.cwd??null);Be(()=>{e(d)&&e(g)&&t.active&&l(e(d))}),Be(()=>{t.setActions([{icon:"mdi:refresh",label:"Reload",disabled:!e(d)||e(o),run:()=>e(d)&&void l(e(d))}])});const P=h(()=>Object.entries(e(n)?.config?.urls??{}));var E=Fi(),O=k(E);{var A=p=>{var m=Oi(),j=L(m,!0);C(()=>S(j,e(s))),a(p,m)},M=p=>{var m=Ai();a(p,m)},K=p=>{var m=zi(),j=k(m),te=L(j,!0),G=c(j,2),Ce=L(G,!0),ae=c(G,4),Le=k(ae);{var ce=se=>{var V=Kt();C(()=>S(V,e(n).branch)),a(se,V)},$=se=>{var V=Li();a(se,V)},X=se=>{var V=Di();a(se,V)};I(Le,se=>{e(n).branch?se(ce):e(n).repo?se($,1):se(X,-1)})}b(ae);var Ie=c(ae,4),qe=k(Ie);{var at=se=>{var V=Ni();Bt(V,21,()=>e(P),([z,he])=>z,(z,he)=>{var Ee=h(()=>ro(e(he),2));let Me=()=>e(Ee)[0],ye=()=>e(Ee)[1];var de=Ri(),Ve=k(de),et=L(Ve,!0),jt=c(Ve,2),Wt=L(jt,!0);b(de),C(()=>{S(et,Me()),ue(jt,"href",ye()),S(Wt,ye())}),a(z,de)}),b(V),a(se,V)},kt=se=>{var V=ji(),z=L(V);C(()=>S(z,`.claude-mux.json: ${e(n).configError??""}`)),a(se,V)},ut=se=>{var V=qi(),z=c(R(V),2);z.textContent='{ "urls": { "prod": "https://…", "dev": "http://localhost:5173" } }',a(se,V)};I(qe,se=>{e(P).length>0?se(at):e(n).configError?se(kt,1):se(ut,-1)})}b(Ie),b(m),C(()=>{S(te,e(n).repo?"Repository":"Directory"),ue(G,"title",e(n).root),S(Ce,e(n).root)}),a(p,m)};I(O,p=>{e(s)?p(A):e(n)?p(K,-1):p(M,1)})}b(E),a(r,E),$e()}const Ki=xo({base:"hover:text-foreground aria-pressed:bg-muted focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[state=on]:bg-muted gap-1 rounded-lg text-sm font-medium transition-all [&_svg:not([class*='size-'])]:size-4 group/toggle inline-flex items-center justify-center whitespace-nowrap outline-none hover:bg-muted focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",variants:{variant:{default:"bg-transparent",outline:"border-input hover:bg-muted border bg-transparent"},size:{default:"h-8 min-w-8 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",sm:"h-7 min-w-7 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",xs:"h-6 min-w-6 rounded-md px-1.5 text-[11px] [&_svg:not([class*='size-'])]:size-3",lg:"h-9 min-w-9 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2"}},defaultVariants:{variant:"default",size:"default"}});var Hi=new Set(["$$slots","$$events","$$legacy","ref","pressed","class","size","variant"]);function un(r,t){Ye(t,!0);let n=B(t,"ref",15,null),s=B(t,"pressed",15,!1),o=B(t,"size",3,"default"),i=B(t,"variant",3,"default"),l=Et(t,Hi);var d=fe(),g=R(d);{let P=h(()=>vn(Ki({variant:i(),size:o()}),t.class));Qe(g,()=>gi,(E,O)=>{O(E,Ft({"data-slot":"toggle",get class(){return e(P)}},()=>l,{get ref(){return n()},set ref(A){n(A)},get pressed(){return s()},set pressed(A){s(A)}}))})}a(r,d),$e()}let Wi=null;const Jr={typescript:()=>Ne(()=>import("./fBVCKtta.js"),[],import.meta.url),javascript:()=>Ne(()=>import("./OJuCLi7D.js"),[],import.meta.url),xml:()=>Ne(()=>import("./iid4EIlO.js"),[],import.meta.url),css:()=>Ne(()=>import("./Cx__LlXj.js"),[],import.meta.url),scss:()=>Ne(()=>import("./-6NKjX1p.js"),[],import.meta.url),json:()=>Ne(()=>import("./D8A5dS0c.js"),[],import.meta.url),markdown:()=>Ne(()=>import("./CtazcGce.js"),[],import.meta.url),python:()=>Ne(()=>import("./Dao3OHeO.js"),[],import.meta.url),bash:()=>Ne(()=>import("./7CVK93dn.js"),[],import.meta.url),yaml:()=>Ne(()=>import("./Dub36DKV.js"),[],import.meta.url),ini:()=>Ne(()=>import("./DeXdrrNj.js"),[],import.meta.url),rust:()=>Ne(()=>import("./z4KEymWr.js"),[],import.meta.url),go:()=>Ne(()=>import("./DqPOB59-.js"),[],import.meta.url),sql:()=>Ne(()=>import("./C2FXm1pY.js"),[],import.meta.url),java:()=>Ne(()=>import("./DWfSB6l0.js"),[],import.meta.url),kotlin:()=>Ne(()=>import("./D-nmzn_X.js"),[],import.meta.url),c:()=>Ne(()=>import("./CSDwiUoT.js"),[],import.meta.url),cpp:()=>Ne(()=>import("./CUcZ5oLU.js"),[],import.meta.url),ruby:()=>Ne(()=>import("./B9vqUFHD.js"),[],import.meta.url),php:()=>Ne(()=>import("./JSbtpXK4.js"),[],import.meta.url),swift:()=>Ne(()=>import("./CYlYM-_s.js"),[],import.meta.url),lua:()=>Ne(()=>import("./BXsJF5rx.js"),[],import.meta.url),dockerfile:()=>Ne(()=>import("./r_U6Fv7l.js"),[],import.meta.url),makefile:()=>Ne(()=>import("./YX8jeUAS.js"),[],import.meta.url)},Ui=()=>Wi??=Ne(()=>import("./D8FegVtD.js"),[],import.meta.url).then(r=>r.default);async function Vi(r,t){if(!t||!Jr[t])return null;const n=Jr[t],s=await Ui();return s.getLanguage(t)||s.registerLanguage(t,(await n()).default),r.map(o=>s.highlight(o,{language:t,ignoreIllegals:!0}).value)}var Gi=u('<div class="hunk svelte-1r1jcbf"> </div>'),Zr=u('<button type="button" class="svelte-1r1jcbf"><iconify-icon></iconify-icon></button>',2),Xi=u('<button type="button" class="all svelte-1r1jcbf" title="Show all of these lines"><!></button>'),Yi=u("<span> </span>"),$i=u('<div class="gap svelte-1r1jcbf"><!> <!> <!></div>'),Ji=u('<div><span class="no svelte-1r1jcbf"> </span><span class="no svelte-1r1jcbf"> </span><span class="sign svelte-1r1jcbf"> </span><span class="code svelte-1r1jcbf"><!></span></div>'),Zi=u('<div class="lines svelte-1r1jcbf"></div>');function Gs(r,t){Ye(t,!0);const n=20;let s=q(null),o=q(!1),i=q(on({}));const l=h(()=>t.loadText!==void 0&&e(s)!==!1),d=h(()=>qo(t.hunks,{tail:t.loadText!==void 0})),g=h(()=>{const K=[],p=e(d).filter(m=>m.type==="gap");for(const m of e(d)){if(m.type!=="gap"){K.push(m);continue}const j=e(s)||null,te=m.count??(j?Math.max(0,j.length-m.from+1):null),G=e(i)[m.from]??{top:0,bottom:0},Ce=te===null?G.top:Math.min(G.top,te),ae=te===null?0:Math.min(G.bottom,te-Ce),Le=$=>({type:"context",old:m.old+($-m.from),new:$,text:j?.[$-1]??""});for(let $=0;$<Ce;$++)K.push(Le(m.from+$));const ce=te===null?null:te-Ce-ae;if((ce===null?e(l):ce>0)&&K.push({type:"hidden",gap:m,left:ce,first:m===p[0]&&m.from===1,last:m.count===null}),te!==null)for(let $=ae;$>0;$--)K.push(Le(m.from+te-$))}return K});async function P(K,p){if(e(s)===null&&t.loadText&&!e(o)){v(o,!0);try{const j=await t.loadText();v(s,j===null?!1:j.replace(/\n$/,"").split(`
|
|
3
3
|
`),!0)}catch{v(s,!1)}finally{v(o,!1)}}if(!e(s))return;const m=e(i)[K.from]??{top:0,bottom:0};e(i)[K.from]=p==="all"?{top:1/0,bottom:0}:{...m,[p]:m[p]+n}}Be(()=>{t.file,zt(()=>{v(s,null),v(i,{},!0)})});const E={add:"+",del:"−",context:" "},O=4e3;let A=q(null);Be(()=>{if(v(A,null),e(g).length===0||e(g).length>O)return;const K=e(g).map(j=>"text"in j?j.text:""),p=zt(()=>jo(t.file));let m=!1;return Vi(K,p).then(j=>{!m&&j&&v(A,j,!0)}),()=>m=!0});var M=Zi();Bt(M,21,()=>e(g),hr,(K,p,m)=>{var j=fe(),te=R(j);{var G=Le=>{var ce=Gi(),$=L(ce,!0);C(()=>S($,e(p).header)),a(Le,ce)},Ce=Le=>{const ce=h(()=>e(p).left===null||e(p).left>n);var $=$i(),X=k($);{var Ie=V=>{var z=Zr();ue(z,"title","Show 20 more lines below"),ue(z,"aria-label","Show 20 more lines below");var he=k(z);Te(he,"icon","mdi:arrow-expand-down"),ke(he,1,"svelte-1r1jcbf"),b(z),ot("click",z,()=>{P(e(p).gap,"top")}),a(V,z)};I(X,V=>{e(l)&&e(ce)&&!e(p).first&&V(Ie)})}var qe=c(X,2);{var at=V=>{var z=Xi(),he=k(z);{var Ee=ye=>{var de=Kt();C(()=>S(de,e(o)?"Reading…":"the rest of the file")),a(ye,de)},Me=ye=>{var de=Kt();C(()=>S(de,`${e(p).left??""} unchanged ${e(p).left===1?"line":"lines"}`)),a(ye,de)};I(he,ye=>{e(p).left===null?ye(Ee):ye(Me,-1)})}b(z),ot("click",z,()=>{P(e(p).gap,"all")}),a(V,z)},kt=V=>{var z=Yi(),he=L(z);C(()=>S(he,`⋯ ${e(p).left??""} unchanged ${e(p).left===1?"line":"lines"} ⋯`)),a(V,z)};I(qe,V=>{e(l)?V(at):V(kt,-1)})}var ut=c(qe,2);{var se=V=>{var z=Zr();ue(z,"title","Show 20 more lines above"),ue(z,"aria-label","Show 20 more lines above");var he=k(z);Te(he,"icon","mdi:arrow-expand-up"),ke(he,1,"svelte-1r1jcbf"),b(z),ot("click",z,()=>{P(e(p).gap,"bottom")}),a(V,z)};I(ut,V=>{e(l)&&e(ce)&&!e(p).last&&V(se)})}b($),a(Le,$)},ae=Le=>{var ce=Ji(),$=k(ce),X=L($,!0),Ie=c($),qe=L(Ie,!0),at=c(Ie),kt=L(at,!0),ut=c(at),se=k(ut);{var V=he=>{var Ee=fe(),Me=R(Ee);Un(Me,()=>e(A)[m]),a(he,Ee)},z=he=>{var Ee=Kt();C(()=>S(Ee,e(p).text)),a(he,Ee)};I(se,he=>{e(A)?.[m]!=null?he(V):he(z,-1)})}b(ut),b(ce),C(()=>{ke(ce,1,`ln ${e(p).type??""}`,"svelte-1r1jcbf"),S(X,e(p).old??""),S(qe,e(p).new??""),S(kt,E[e(p).type])}),a(Le,ce)};I(te,Le=>{e(p).type==="hunk"?Le(G):e(p).type==="hidden"?Le(Ce,1):Le(ae,-1)})}a(K,j)}),b(M),a(r,M),$e()}Ln(["click"]);var Qi=u('<span class="mono svelte-szf9n8"><span class="add svelte-szf9n8"> </span> <span class="del svelte-szf9n8"> </span></span>'),el=u(" <!>",1),Qr=u('<span class="add svelte-szf9n8"> </span>'),es=u('<span class="del svelte-szf9n8"> </span>'),tl=u(" <!> <!>",1),nl=u('<div class="turn-note svelte-szf9n8"><span class="prompt svelte-szf9n8"> </span> <!></div>'),rl=u('<div class="turns svelte-szf9n8" role="group" aria-label="Turn"><!> <!></div> <!>',1),ts=u('<p class="msg err svelte-szf9n8"> </p>'),sl=u('<p class="msg svelte-szf9n8">Loading…</p>'),ol=u('<p class="msg svelte-szf9n8"> </p>'),al=u('<span class="dim svelte-szf9n8">bin</span>'),il=u("<!> <!>",1),ll=u('<button type="button"><span> </span> <span class="path svelte-szf9n8"><bdi> </bdi></span> <!></button>'),cl=u('<span class="dim svelte-szf9n8"> </span>'),ul=u('<button type="button" class="tofiles svelte-szf9n8" title="Open this file in the Files pane" aria-label="Open in Files"><iconify-icon></iconify-icon></button>',2),dl=u('<p class="msg svelte-szf9n8">Binary file; no text diff.</p>'),vl=u('<p class="msg svelte-szf9n8">No line changes.</p>'),fl=u('<div class="diff-head svelte-szf9n8"><button type="button" class="back svelte-szf9n8" aria-label="Back to files"><iconify-icon></iconify-icon></button> <span class="path svelte-szf9n8"> </span> <span class="sp svelte-szf9n8"></span> <!> <!></div> <!>',3),hl=u('<p class="msg svelte-szf9n8">That file has no change here.</p>'),pl=u('<div class="split svelte-szf9n8"><nav aria-label="Changed files" class="svelte-szf9n8"><!> <!></nav> <section class="diff svelte-szf9n8" aria-label="Diff"><!></section></div>'),ml=u('<div><div class="bar svelte-szf9n8"><span class="title svelte-szf9n8"><!></span> <span class="sp svelte-szf9n8"></span> <div class="seg svelte-szf9n8" role="group" aria-label="Source"><!> <!></div></div> <!> <!> <div class="foot svelte-szf9n8"><kbd class="svelte-szf9n8">j</kbd>/<kbd class="svelte-szf9n8">k</kbd> next / previous file</div></div>');function _l(r,t){Ye(t,!0);const n=h(()=>t.session?.id??null),s=h(()=>!!t.session?.git_root||t.session?.changes?.source==="git");let o=q(!1);const i=h(()=>t.params.source==="session"||t.params.source==="git"?t.params.source:e(s)?"git":"session"),l=h(()=>e(o)&&e(i)==="git"?"session":e(i));let d=q(null),g=q(null),P=q(!1),E=q(0),O=0,A=null;async function M(y,N){if(e(P)){A={id:y,src:N};return}const Z=++O;v(P,!0);try{const _e=await fetch(`${Sn(t.base,y)}/changes?source=${N}`),Je=await _e.json();if(Z!==O)return;if(_e.status===404&&N==="git"){v(o,!0);return}if(!_e.ok)throw new Error(Je.error??`HTTP ${_e.status}`);v(d,Je,!0),Ps(E),v(g,null)}catch(_e){Z===O&&v(g,_e instanceof Error?_e.message:String(_e),!0)}finally{Z===O&&v(P,!1);const _e=A;A=null,_e&&M(_e.id,_e.src)}}const K=h(()=>`${t.session?.last_update??0}:${t.session?.changes?.additions??0}:${t.session?.changes?.deletions??0}:${t.session?.changes?.files??0}`);Be(()=>{e(K);const y=e(n),N=e(l);y&&t.active&&zt(()=>{M(y,N)})});const p=h(()=>e(d)?.source===e(l)?e(d):null),m=h(()=>e(p)?.turns??[]),j=h(()=>e(l)==="session"&&t.params.turn!==void 0?e(m).find(y=>String(y.n)===t.params.turn)??null:null),te=h(()=>e(j)?e(j).files:e(p)?.files??[]),G=h(()=>e(p)?.root??t.session?.git_root??t.session?.cwd??null),Ce=h(()=>e(j)?ar(e(te)):e(p)?.totals??ar(e(te))),ae=h(()=>e(m).map(y=>({...y,...ar(y.files)})).reverse());let Le=q(!1);const ce=h(()=>{const y=[],N=[];for(const Z of e(te))(zo(Hn(Z.file,e(G)))?y:N).push(Z);return{generated:y,kept:N}}),$=h(()=>e(Le)?e(te):e(ce).kept),X=h(()=>e(te).find(y=>y.file===t.params.file)??(t.params.file?null:e($)[0]??null));function Ie(y){t.setParams({file:y})}function qe(y){y!==e(l)&&t.setParams({source:y,turn:null,file:null})}function at(y){t.setParams({turn:y===null?null:String(y),file:null})}const kt="Before the first prompt";function ut(y){window.dispatchEvent(new CustomEvent("claude-mux:reveal-entry",{detail:{id:y}}))}let se=q(null),V=q(null),z=0,he=null;async function Ee(y,N,Z,_e){const Je=++z,nt=new URLSearchParams({source:N,file:Z});_e!==void 0&&nt.set("turn",_e??"");try{const Se=await fetch(`${Sn(t.base,y)}/changes/diff?${nt}`),rt=await Se.text();if(Je!==z)return;if(!Se.ok)throw new Error(JSON.parse(rt).error??`HTTP ${Se.status}`);rt!==he&&(he=rt,v(se,JSON.parse(rt),!0)),v(V,null)}catch(Se){Je===z&&(he=null,v(se,null),v(V,{file:Z,message:Se instanceof Error?Se.message:String(Se)},!0))}}const Me=h(()=>e(X)?`${e(l)}\0${e(X).file}\0${e(j)?`t${e(j).n}`:""}\0${e(E)}`:null);Be(()=>{if(!e(Me)||!e(n)||!t.active)return;const y=e(n);zt(()=>{Ee(y,e(l),e(X).file,e(j)?e(j).id:void 0)})});async function ye(y){if(!e(n))return null;const N=await fetch(`${Sn(t.base,e(n))}/files/read?${new URLSearchParams({path:y})}`);if(!N.ok)return null;const Z=await N.json();return Z.kind==="text"?Z.text??null:null}const de=h(()=>e(se)&&e(se).file===e(X)?.file?e(se):null),Ve=h(()=>e(V)?.file===e(X)?.file?e(V).message:null),et=h(()=>e(de)?.hunks.length??0);Be(()=>{t.setActions([{icon:"mdi:refresh",label:"Reload",disabled:!e(n)||e(P),run:()=>e(n)&&void M(e(n),e(l))}])});function jt(y){if(!t.active||y.defaultPrevented||y.ctrlKey||y.metaKey||y.altKey||y.key!=="j"&&y.key!=="k"||y.target?.closest('input, textarea, select, [contenteditable=""], [contenteditable="true"]')||e($).length===0)return;const Z=e(X)?e($).findIndex(Je=>Je.file===e(X).file):-1,_e=y.key==="j"?Math.min(Z+1,e($).length-1):Math.max(Z-1,0);y.preventDefault(),Ie(e($)[_e].file),document.querySelector(`[data-change-file="${CSS.escape(e($)[_e].file)}"]`)?.scrollIntoView({block:"nearest"})}var Wt=ml();fn("keydown",ks,jt);let Qt;var Xt=k(Wt),en=k(Xt),pe=k(en);{var tt=y=>{var N=el(),Z=R(N),_e=c(Z);{var Je=nt=>{var Se=Qi(),rt=k(Se),wt=L(rt),f=c(rt,2),w=L(f);b(Se),C(()=>{S(wt,`+${e(Ce).additions??""}`),S(w,`−${e(Ce).deletions??""}`)}),a(nt,Se)};I(_e,nt=>{(e(Ce).additions||e(Ce).deletions)&&nt(Je)})}C(()=>S(Z,`${e(te).length??""} ${e(te).length===1?"file":"files"} changed `)),a(y,N)},vt=y=>{var N=Kt("Changes");a(y,N)};I(pe,y=>{e(p)?y(tt):y(vt,-1)})}b(en);var bt=c(en,4),Ct=k(bt),$t=()=>e(l)==="git",tn=y=>y&&qe("git");{let y=h(()=>e(o)?"Not a git repository":"What git sees in the working tree now");un(Ct,{size:"sm",get pressed(){return $t()},set pressed(N){tn(N)},get disabled(){return e(o)},get title(){return e(y)},children:(N,Z)=>{ht();var _e=Kt("Current · git");a(N,_e)},$$slots:{default:!0}})}var nn=c(Ct,2),F=()=>e(l)==="session",ie=y=>y&&qe("session");un(nn,{size:"sm",get pressed(){return F()},set pressed(y){ie(y)},title:"The edits this session's tools made",children:(y,N)=>{ht();var Z=Kt("Session");a(y,Z)},$$slots:{default:!0}}),b(bt),b(Xt);var Oe=c(Xt,2);{var yt=y=>{var N=rl(),Z=R(N),_e=k(Z),Je=()=>!e(j),nt=f=>f&&at(null);un(_e,{variant:"outline",size:"sm",class:"chip",get pressed(){return Je()},set pressed(f){nt(f)},children:(f,w)=>{ht();var T=Kt("All turns");a(f,T)},$$slots:{default:!0}});var Se=c(_e,2);Bt(Se,17,()=>e(ae),f=>f.n,(f,w)=>{var T=()=>e(j)?.n===e(w).n,Ae=W=>W&&at(e(w).n);{let W=h(()=>e(w).prompt||kt);un(f,{variant:"outline",size:"sm",class:"chip",get title(){return e(W)},get pressed(){return T()},set pressed(Ge){Ae(Ge)},children:(Ge,Fe)=>{ht();var it=tl(),Ot=R(it),Ht=c(Ot);{var _=oe=>{var me=Qr(),We=L(me);C(()=>S(We,`+${e(w).additions??""}`)),a(oe,me)};I(Ht,oe=>{e(w).additions&&oe(_)})}var D=c(Ht,2);{var ne=oe=>{var me=es(),We=L(me);C(()=>S(We,`−${e(w).deletions??""}`)),a(oe,me)};I(D,oe=>{e(w).deletions&&oe(ne)})}C(()=>S(Ot,`${e(w).n===0?"Start":`Turn ${e(w).n}`} `)),a(Ge,it)},$$slots:{default:!0}})}}),b(Z);var rt=c(Z,2);{var wt=f=>{var w=nl(),T=k(w),Ae=L(T,!0),W=c(T,2);{var Ge=Fe=>{const it=h(()=>e(j).id);pn(Fe,{variant:"link",size:"sm",class:"link",onclick:()=>ut(e(it)),children:(Ot,Ht)=>{ht();var _=Kt("Show in transcript");a(Ot,_)},$$slots:{default:!0}})};I(W,Fe=>{e(j).id&&Fe(Ge)})}b(w),C(()=>{ue(T,"title",e(j).prompt),S(Ae,e(j).prompt||kt)}),a(f,w)};I(rt,f=>{e(j)&&f(wt)})}a(y,N)};I(Oe,y=>{e(l)==="session"&&e(m).length>0&&y(yt)})}var Mt=c(Oe,2);{var Tt=y=>{var N=ts(),Z=L(N,!0);C(()=>S(Z,e(g))),a(y,N)},we=y=>{var N=sl();a(y,N)},x=y=>{var N=ol(),Z=L(N,!0);C(()=>S(Z,e(l)==="git"?"The working tree is clean.":"This session has not edited any files yet.")),a(y,N)},U=y=>{var N=pl(),Z=k(N),_e=k(Z);Bt(_e,17,()=>e($),w=>w.file,(w,T)=>{const Ae=h(()=>js(e(T)));var W=ll();let Ge;var Fe=k(W),it=L(Fe,!0),Ot=c(Fe,2),Ht=k(Ot),_=L(Ht,!0);b(Ot);var D=c(Ot,2);{var ne=me=>{var We=al();a(me,We)},oe=me=>{var We=il(),Pt=R(We);{var Q=xe=>{var je=Qr(),pt=L(je);C(()=>S(pt,`+${e(T).additions??""}`)),a(xe,je)};I(Pt,xe=>{e(T).additions&&xe(Q)})}var Y=c(Pt,2);{var ge=xe=>{var je=es(),pt=L(je);C(()=>S(pt,`−${e(T).deletions??""}`)),a(xe,je)};I(Y,xe=>{e(T).deletions&&xe(ge)})}a(me,We)};I(D,me=>{e(T).binary?me(ne):me(oe,-1)})}b(W),C((me,We)=>{Ge=ke(W,1,"file svelte-szf9n8",null,Ge,{on:e(X)?.file===e(T).file,untracked:e(T).untracked}),ue(W,"aria-current",e(X)?.file===e(T).file?"true":void 0),ue(W,"data-change-file",e(T).file),ue(W,"title",e(T).oldPath?`${e(T).oldPath} → ${e(T).file}`:e(T).file),ke(Fe,1,`st st-${me??""}`,"svelte-szf9n8"),S(it,e(Ae)),S(_,We)},[()=>e(Ae)==="?"?"u":e(Ae).toLowerCase(),()=>Hn(e(T).file,e(G))]),ot("click",W,()=>Ie(e(T).file)),a(w,W)});var Je=c(_e,2);{var nt=w=>{pn(w,{variant:"ghost",size:"sm",class:"more",onclick:()=>v(Le,!e(Le)),children:(T,Ae)=>{ht();var W=Kt();C(()=>S(W,e(Le)?"Hide generated":`+ ${e(ce).generated.length} generated (show)`)),a(T,W)},$$slots:{default:!0}})};I(Je,w=>{e(ce).generated.length>0&&w(nt)})}b(Z);var Se=c(Z,2),rt=k(Se);{var wt=w=>{var T=fl(),Ae=R(T),W=k(Ae),Ge=k(W);Te(Ge,"icon","mdi:arrow-left"),b(W);var Fe=c(W,2),it=L(Fe,!0),Ot=c(Fe,4);{var Ht=Q=>{var Y=cl(),ge=L(Y);C(()=>S(ge,`${e(et)??""} ${e(et)===1?"hunk":"hunks"}`)),a(Q,Y)};I(Ot,Q=>{e(et)&&Q(Ht)})}var _=c(Ot,2);{var D=Q=>{var Y=ul(),ge=k(Y);Te(ge,"icon","mdi:file-tree-outline"),b(Y),ot("click",Y,()=>t.openPane("files",{file:e(X).file,line:null})),a(Q,Y)};I(_,Q=>{e(X).kind!=="deleted"&&Q(D)})}b(Ae);var ne=c(Ae,2);{var oe=Q=>{var Y=ts(),ge=L(Y,!0);C(()=>S(ge,e(Ve))),a(Q,Y)},me=Q=>{var Y=dl();a(Q,Y)},We=Q=>{{let Y=h(()=>e(l)==="git"&&e(X).kind!=="deleted"?()=>ye(e(X).file):void 0);Gs(Q,{get hunks(){return e(de).hunks},get file(){return e(X).file},get loadText(){return e(Y)}})}},Pt=Q=>{var Y=vl();a(Q,Y)};I(ne,Q=>{e(Ve)?Q(oe):e(de)?.binary?Q(me,1):e(de)&&e(de).hunks.length>0?Q(We,2):e(se)&&Q(Pt,3)})}C(Q=>{ue(Fe,"title",e(X).file),S(it,Q)},[()=>Hn(e(X).file,e(G))]),ot("click",W,()=>t.setParams({file:null})),a(w,T)},f=w=>{var T=hl();a(w,T)};I(rt,w=>{e(X)?w(wt):w(f,-1)})}b(Se),b(N),a(y,N)};I(Mt,y=>{e(g)&&!e(p)?y(Tt):e(p)?e(te).length===0?y(x,2):y(U,-1):y(we,1)})}ht(2),b(Wt),C(()=>Qt=ke(Wt,1,"changes svelte-szf9n8",null,Qt,{picked:!!t.params.file})),a(r,Wt),$e()}Ln(["click"]);var gl=new Set(["$$slots","$$events","$$legacy","ref","class"]);function Xs(r,t){Ye(t,!0);let n=B(t,"ref",15,null),s=Et(t,gl);var o=fe(),i=R(o);{let l=h(()=>vn("",t.class));Qe(i,()=>oi,(d,g)=>{g(d,Ft({"data-slot":"popover-trigger",get class(){return e(l)}},()=>s,{get ref(){return n()},set ref(P){n(P)}}))})}a(r,o),$e()}const ns={typescript:()=>Ne(()=>import("./Dbx-oyS0.js"),[],import.meta.url),tsx:()=>Ne(()=>import("./BQnJUjz2.js"),[],import.meta.url),javascript:()=>Ne(()=>import("./Ji-H285c.js"),[],import.meta.url),jsx:()=>Ne(()=>import("./BlQ1UG0R.js"),[],import.meta.url),svelte:()=>Ne(()=>import("./CBRkCSvA.js"),__vite__mapDeps([0,1,2,3]),import.meta.url),html:()=>Ne(()=>import("./MNLx6FrE.js"),__vite__mapDeps([4,1,3]),import.meta.url),xml:()=>Ne(()=>import("./DLFvZgXc.js"),[],import.meta.url),css:()=>Ne(()=>import("./C9TwCTc4.js"),[],import.meta.url),scss:()=>Ne(()=>import("./BJ0HdUGh.js"),__vite__mapDeps([5,3]),import.meta.url),json:()=>Ne(()=>import("./tZkMM2EB.js"),[],import.meta.url),jsonc:()=>Ne(()=>import("./D-GAEckT.js"),[],import.meta.url),markdown:()=>Ne(()=>import("./C6WAMWTc.js"),[],import.meta.url),python:()=>Ne(()=>import("./DuwBc7XB.js"),[],import.meta.url),shellscript:()=>Ne(()=>import("./BRQzRcuD.js"),[],import.meta.url),yaml:()=>Ne(()=>import("./oKro5jzl.js"),[],import.meta.url),toml:()=>Ne(()=>import("./DYgJhmfZ.js"),[],import.meta.url),rust:()=>Ne(()=>import("./DimeEahd.js"),[],import.meta.url),go:()=>Ne(()=>import("./CNoOkTbs.js"),[],import.meta.url),sql:()=>Ne(()=>import("./DfFunl5w.js"),[],import.meta.url),diff:()=>Ne(()=>import("./DV3JLNCH.js"),[],import.meta.url),docker:()=>Ne(()=>import("./KC0Ld365.js"),[],import.meta.url),make:()=>Ne(()=>import("./dnQpAf0F.js"),[],import.meta.url)},bl="github-dark-default",yl=4e5;let wl=null;function xl(){return wl??=(async()=>{const[{createHighlighterCore:r},{createJavaScriptRegexEngine:t},n]=await Promise.all([Ne(()=>import("./BHxvUj5j.js"),[],import.meta.url),Ne(()=>import("./BsehiHPC.js"),[],import.meta.url),Ne(()=>import("./CQdFRjq_.js"),[],import.meta.url)]);return r({themes:[n.default],langs:[],engine:t()})})()}async function kl(r,t){if(!t||!ns[t]||r.length>yl)return null;const n=await xl();return n.getLoadedLanguages().includes(t)||await n.loadLanguage((await ns[t]()).default),n.codeToTokens(r,{lang:t,theme:bl}).tokens}const rs=gr("claude-mux-files-pane",{});class Pl{#e=q(on(rs.load()));get state(){return e(this.#e)}set state(t){v(this.#e,t,!0)}get(t){return t&&this.state[t]||{}}update(t,n){t&&(this.state[t]={...this.state[t],...n},rs.save(this.state))}}const kn=new Pl;function nv(...r){return r.filter(Boolean).join(" ")}const Tl=typeof document<"u";let Sl=0;function ss(r){return typeof r?.id=="number"||typeof r?.id=="string"&&r.id.length>0?r.id:Sl++}class El{#e=q(on([]));get toasts(){return e(this.#e)}set toasts(t){v(this.#e,t,!0)}#t=q(on([]));get heights(){return e(this.#t)}set heights(t){v(this.#t,t,!0)}#n=new Map;#r=t=>{const n=this.toasts.findIndex(s=>s.id===t);return n===-1?null:n};#s=t=>this.heights.findIndex(n=>n.toastId===t);addToast=t=>{Tl&&this.toasts.unshift(t)};updateToast=({id:t,data:n,type:s,message:o})=>{const i=this.toasts.findIndex(d=>d.id===t),l=this.toasts[i];this.toasts[i]={...l,...n,id:t,title:o,type:s,dismiss:!1,delete:!1,updated:!0}};markDismissed=t=>{const n=this.#r(t);if(n===null)return;const s=this.toasts[n];s&&(!s.dismiss||!s.delete)&&(this.toasts[n]={...s,dismiss:!0,delete:!0})};scheduleRemoval=(t,n)=>{this.cancelRemoval(t),this.#n.set(t,setTimeout(()=>{this.#n.delete(t),this.remove(t)},n))};cancelRemoval=t=>{const n=this.#n.get(t);n!==void 0&&(clearTimeout(n),this.#n.delete(t))};create=t=>{const{message:n,...s}=t,o=ss(t),i=t.dismissible!==void 0?t.dismissible:t.dismissable!==void 0?t.dismissable:!0,l=t.type===void 0?"default":t.type;return zt(()=>{this.cancelRemoval(o);const d=this.toasts.find(g=>g.id===o);d?.dismiss||d?.delete?(this.remove(o),this.addToast({...s,id:o,title:n,dismissible:i,type:l,updated:!0})):d?this.updateToast({id:o,data:t,type:l,message:n,dismissible:i}):this.addToast({...s,id:o,title:n,dismissible:i,type:l})}),o};dismiss=t=>(zt(()=>{if(t===void 0){this.toasts=this.toasts.map(s=>s.dismiss?s:{...s,dismiss:!0});return}const n=this.toasts.findIndex(s=>s.id===t);this.toasts[n]&&(this.toasts[n]={...this.toasts[n],dismiss:!0})}),t);remove=t=>{if(t===void 0){this.toasts=[];return}const n=this.#r(t);if(n!==null)return this.toasts.splice(n,1),t};message=(t,n)=>this.create({...n,type:"default",message:t});error=(t,n)=>this.create({...n,type:"error",message:t});success=(t,n)=>this.create({...n,type:"success",message:t});info=(t,n)=>this.create({...n,type:"info",message:t});warning=(t,n)=>this.create({...n,type:"warning",message:t});loading=(t,n)=>this.create({...n,type:"loading",message:t});promise=(t,n)=>{if(!n)return;let s;n.loading!==void 0&&(s=this.create({...n,promise:t,type:"loading",message:typeof n.loading=="string"?n.loading:n.loading()}));const o=t instanceof Promise?t:t();let i=s!==void 0;return o.then(l=>{if(typeof l=="object"&&l&&"ok"in l&&typeof l.ok=="boolean"&&!l.ok){i=!1;const d=Cl(l);this.create({id:s,type:"error",message:d})}else if(n.success!==void 0){i=!1;const d=typeof n.success=="function"?n.success(l):n.success;this.create({id:s,type:"success",message:d})}}).catch(l=>{if(n.error!==void 0){i=!1;const d=typeof n.error=="function"?n.error(l):n.error;this.create({id:s,type:"error",message:d})}}).finally(()=>{i&&(this.dismiss(s),s=void 0),n.finally?.()}),s};custom=(t,n)=>{const s=ss(n);return this.create({component:t,...n,id:s}),s};removeHeight=t=>{this.heights=this.heights.filter(n=>n.toastId!==t)};setHeight=t=>{zt(()=>{const n=this.#s(t.toastId);if(n!==-1){this.heights[n]=t;return}const s=new Map(this.toasts.map((l,d)=>[l.id,d])),o=s.get(t.toastId)??-1,i=this.heights.findIndex(l=>(s.get(l.toastId)??1/0)>o);i===-1?this.heights.push(t):this.heights.splice(i,0,t)})};reset=()=>{this.toasts=[],this.heights=[],this.#n.forEach(t=>clearTimeout(t)),this.#n.clear()}}function Cl(r){return r&&typeof r=="object"&&"status"in r?`HTTP error! Status: ${r.status}`:`Error! ${r}`}const dn=new El;function Il(r,t){return dn.message(r,t)}class rv{#e=h(()=>dn.toasts.filter(t=>!t.dismiss));get toasts(){return e(this.#e)}}const Ml=Il,tr=Object.assign(Ml,{success:dn.success,info:dn.info,warning:dn.warning,error:dn.error,custom:dn.custom,message:dn.message,promise:dn.promise,dismiss:dn.dismiss,loading:dn.loading,getActiveToasts:()=>dn.toasts.filter(r=>!r.dismiss)});async function zr(r,t="Copied"){try{await navigator.clipboard.writeText(r),tr.success(t,{description:r})}catch{tr.error("Could not copy")}}var os=u('<div class="note svelte-unol26">Loading…</div>'),as=u('<div class="note err svelte-unol26"> </div>'),Ol=u('<div class="note svelte-unol26"> </div>'),Yn=u("<!> <!>",1),ur=u("<iconify-icon></iconify-icon>",2),Al=u('<button type="button" data-type="dir" draggable="true"><iconify-icon></iconify-icon> <iconify-icon></iconify-icon> <span class="name svelte-unol26"> </span> <!></button> <!>',3),Ll=u('<button type="button" data-type="file" draggable="true"><span class="chev svelte-unol26"></span> <iconify-icon></iconify-icon> <span class="name svelte-unol26"> </span> <!></button>',2),Dl=u('<button type="button" class="flex min-h-8 items-center gap-1.5 rounded px-2 text-left text-stone-400 hover:bg-[#262626]"><iconify-icon></iconify-icon> </button>',2),Rl=u('<div class="px-2 py-1.5 text-stone-500"> </div>'),Nl=u('<button type="button"><iconify-icon></iconify-icon> <span class="min-w-0 flex-1 truncate"> </span> <!></button>',2),jl=u('<div class="px-2 py-1.5 text-stone-500">Empty</div>'),ql=u('<div class="flex max-h-72 flex-col overflow-y-auto font-mono text-xs"><!> <!></div>'),zl=u('<div class="search svelte-unol26"><iconify-icon></iconify-icon> <!></div>',2),Fl=u('<div class="note svelte-unol26">No file matches.</div>'),Bl=u('<button type="button"><span class="name svelte-unol26"> </span> <span class="dirname svelte-unol26"><bdi> </bdi></span></button>'),Kl=u('<div class="root svelte-unol26"> </div>'),Hl=u("<iconify-icon></iconify-icon> Open",3),Wl=u("<iconify-icon></iconify-icon> ",3),Ul=u("<iconify-icon></iconify-icon> Add to chat",3),Vl=u("<iconify-icon></iconify-icon> Copy path",3),Gl=u("<iconify-icon></iconify-icon> Copy absolute path",3),Xl=u("<!> <!> <!> <!> <!>",1),Yl=u('<button type="button" class="more svelte-unol26"> </button>'),$l=u("<!> <!> <!>",1),Jl=u("<iconify-icon></iconify-icon> <!>",3),Zl=u('<span class="dim size svelte-unol26"> </span>'),Ql=u('<div class="seg svelte-unol26" role="group" aria-label="Markdown view"><!> <!></div>'),ec=u('<button type="button"><iconify-icon></iconify-icon></button>',2),tc=u('<div class="banner svelte-unol26"> </div>'),nc=u('<p class="msg svelte-unol26">Loading…</p>'),rc=u("<p> </p>"),sc=u('<div class="image svelte-unol26"><img class="svelte-unol26"/></div>'),oc=u('<div class="md markdown svelte-unol26"></div>'),ac=u('<p class="msg svelte-unol26">Empty file.</p>'),ic=u("<span> </span>"),lc=u('<div><button type="button" class="no svelte-unol26" tabindex="-1"> </button> <span class="src svelte-unol26"><!></span></div>'),cc=u('<div class="chunk svelte-unol26"></div>'),uc=u("<div></div>"),dc=u('<section class="viewer svelte-unol26" aria-label="File"><div class="vhead svelte-unol26"><button type="button" class="icon back svelte-unol26" aria-label="Back to files"><iconify-icon></iconify-icon></button> <div class="crumbs svelte-unol26"><!> <!> <iconify-icon></iconify-icon> <span class="leaf svelte-unol26"> </span></div> <!> <!> <button type="button" class="icon svelte-unol26" title="Copy path" aria-label="Copy path"><iconify-icon></iconify-icon></button> <button type="button" class="icon svelte-unol26" title="Mention in composer" aria-label="Mention in composer"><iconify-icon></iconify-icon></button> <!> <button type="button"><iconify-icon></iconify-icon></button> <button type="button" class="icon wide-only svelte-unol26" title="Close file" aria-label="Close file"><iconify-icon></iconify-icon></button></div> <!> <!></section>',2),vc=u('<div><nav aria-label="Project files" class="svelte-unol26"><!> <div class="list svelte-unol26"><!></div></nav> <!></div>');function fc(r,t){Ye(t,!0);const n=(_,D=Nt,ne=Nt)=>{const oe=h(()=>e(E)[D()]);var me=fe(),We=R(me);{var Pt=ge=>{var xe=os();let je;C(()=>je=Yt(xe,"",je,{"--depth":ne()})),a(ge,xe)},Q=ge=>{var xe=as();let je;var pt=L(xe,!0);C(()=>{je=Yt(xe,"",je,{"--depth":ne()}),S(pt,e(oe).error)}),a(ge,xe)},Y=ge=>{var xe=Yn(),je=R(xe);Bt(je,17,()=>e(oe).entries,ft=>ft.path,(ft,_t)=>{s(ft,()=>e(_t),ne)});var pt=c(je,2);{var mt=ft=>{var _t=Ol();let xt;var Ke=L(_t,!0);C(()=>{xt=Yt(_t,"",xt,{"--depth":ne()}),S(Ke,e(oe).hidden?`${e(oe).hidden} ignored`:"Empty")}),a(ft,_t)};I(pt,ft=>{e(oe).entries.length===0&&ft(mt)})}a(ge,xe)};I(We,ge=>{e(oe)==="loading"||e(oe)===void 0?ge(Pt):"error"in e(oe)?ge(Q,1):ge(Y,-1)})}a(_,me)},s=(_,D=Nt,ne=Nt)=>{var oe=fe(),me=R(oe);{var We=Q=>{const Y=h(()=>e(P).has(D().path));var ge=Al(),xe=R(ge);let je,pt;var mt=k(xe);let ft;Te(mt,"icon","mdi:chevron-right");var _t=c(mt,2);ke(_t,1,"ico svelte-unol26"),C(()=>Te(_t,"icon",e(Y)?"mdi:folder-open-outline":"mdi:folder-outline"));var xt=c(_t,2),Ke=L(xt,!0),dt=c(xt,2);{var It=H=>{var ee=ur();ke(ee,1,"link svelte-unol26"),Te(ee,"icon","mdi:link-variant"),a(H,ee)};I(dt,H=>{D().link&&H(It)})}b(xe);var Xe=c(xe,2);{var At=H=>{n(H,()=>D().path,()=>ne()+1)};I(Xe,H=>{e(Y)&&H(At)})}C(()=>{je=ke(xe,1,"item dir svelte-unol26",null,je,{ignored:D().ignored}),ue(xe,"aria-expanded",e(Y)),ue(xe,"title",D().path),ue(xe,"data-path",D().path),pt=Yt(xe,"",pt,{"--depth":ne()}),ft=ke(mt,1,"chev svelte-unol26",null,ft,{open:e(Y)}),S(Ke,D().name)}),fn("dragstart",xe,H=>tn(H,D().path)),ot("click",xe,()=>G(D().path,!e(Y))),a(Q,ge)},Pt=Q=>{var Y=Ll();let ge,xe;var je=c(k(Y),2);ke(je,1,"ico svelte-unol26"),Te(je,"icon","mdi:file-outline");var pt=c(je,2),mt=L(pt,!0),ft=c(pt,2);{var _t=xt=>{var Ke=ur();ke(Ke,1,"link svelte-unol26"),Te(Ke,"icon","mdi:link-variant"),a(xt,Ke)};I(ft,xt=>{D().link&&xt(_t)})}b(Y),C(()=>{ge=ke(Y,1,"item file svelte-unol26",null,ge,{ignored:D().ignored,on:e(he)===D().path}),ue(Y,"aria-current",e(he)===D().path?"true":void 0),ue(Y,"title",D().path),ue(Y,"data-path",D().path),xe=Yt(Y,"",xe,{"--depth":ne()}),S(mt,D().name)}),fn("dragstart",Y,xt=>tn(xt,D().path)),ot("click",Y,()=>Ee(D().path)),a(Q,Y)};I(me,Q=>{D().type==="dir"?Q(We):Q(Pt,-1)})}a(_,oe)},o=(_,D=Nt,ne=Nt)=>{var oe=fe(),me=R(oe),We=()=>e(nn)===D(),Pt=Q=>{v(nn,Q?D():null,!0),Q&&ie(D())};Qe(me,()=>zs,(Q,Y)=>{Y(Q,{get open(){return We()},set open(ge){Pt(ge)},children:(ge,xe)=>{var je=Yn(),pt=R(je);Qe(pt,()=>Xs,(ft,_t)=>{_t(ft,{class:"shrink-0 cursor-pointer rounded px-1 py-0.5 font-mono text-xs text-stone-400 hover:bg-[#1f1f1f] hover:text-stone-100",children:(xt,Ke)=>{ht();var dt=Kt();C(()=>S(dt,ne())),a(xt,dt)},$$slots:{default:!0}})});var mt=c(pt,2);Qe(mt,()=>qs,(ft,_t)=>{_t(ft,{align:"start",class:"w-64 max-w-[80vw] border-[#333] bg-[#1a1a1a] p-1",children:(xt,Ke)=>{const dt=h(()=>K(e(F)));var It=ql(),Xe=k(It);{var At=J=>{var re=Dl(),Pe=k(re);Te(Pe,"icon","mdi:arrow-left");var lt=c(Pe);b(re),C(Ze=>S(lt,` Back to ${Ze??""}`),[()=>qn(ir(e(F)))||e(yt)]),ot("click",re,()=>ie(ir(e(F)))),a(J,re)};I(Xe,J=>{e(F)!==D()&&J(At)})}var H=c(Xe,2);{var ee=J=>{var re=Rl(),Pe=L(re,!0);C(()=>S(Pe,e(E)[e(F)]&&e(E)[e(F)]!=="loading"?"Could not read this folder":"Loading…")),a(J,re)},He=J=>{var re=Yn(),Pe=R(re);Bt(Pe,17,()=>e(dt).entries,ct=>ct.path,(ct,st)=>{var Ue=Nl(),gt=k(Ue);C(()=>Te(gt,"icon",e(st).type==="dir"?"mdi:folder-outline":"mdi:file-outline"));var Dt=c(gt,2),le=L(Dt,!0),ve=c(Dt,2);{var ze=De=>{var Re=ur();Te(Re,"icon","mdi:chevron-right"),a(De,Re)};I(ve,De=>{e(st).type==="dir"&&De(ze)})}b(Ue),C(()=>{ke(Ue,1,`flex min-h-8 items-center gap-1.5 rounded px-2 text-left text-stone-200 hover:bg-[#262626] ${e(st).path===e(he)?"bg-[#262626]":""} ${e(st).ignored?"text-stone-500":""}`),S(le,e(st).name)}),ot("click",Ue,()=>{if(e(st).type==="dir")return ie(e(st).path);v(nn,null),Ee(e(st).path)}),a(ct,Ue)});var lt=c(Pe,2);{var Ze=ct=>{var st=jl();a(ct,st)};I(lt,ct=>{e(dt).entries.length===0&&ct(Ze)})}a(J,re)};I(H,J=>{e(dt)?J(He,-1):J(ee)})}b(It),a(xt,It)},$$slots:{default:!0}})}),a(ge,je)},$$slots:{default:!0}})}),a(_,oe)},i=h(()=>t.session?.id??null),l=h(()=>e(i)?`${Sn(t.base,e(i))}/files`:null),d=h(()=>kn.get(e(i))),g=h(()=>e(d).showIgnored===!0),P=h(()=>new Set((e(d).expanded??[]).filter(_=>_&&!_.startsWith("/"))));let E=q(on({})),O=0;async function A(_){if(!e(l))return;const D=O;e(E)[_]="loading";const ne=new URLSearchParams({dir:_});e(g)&&ne.set("ignored","1");try{const oe=await fetch(`${e(l)}/tree?${ne}`),me=await oe.json();if(D!==O)return;e(E)[_]=oe.ok?me:{error:me.error??`HTTP ${oe.status}`}}catch(oe){D===O&&(e(E)[_]={error:oe instanceof Error?oe.message:String(oe)})}}function M(){O++,v(E,{},!0),A("");for(const _ of e(P))A(_)}function K(_){const D=e(E)[_];return D&&D!=="loading"&&"entries"in D?D:null}const p=h(()=>K("")),m=h(()=>e(p)?.root??null),j=h(()=>e(p)?.repo??!1);let te=null;Be(()=>{const _=`${e(l)}\0${e(g)}`;!t.active||!e(l)||_===te||(te=_,zt(M))});function G(_,D){const ne=new Set(e(P));D?ne.add(_):ne.delete(_),kn.update(e(i),{expanded:[...ne]}),D&&!e(E)[_]&&A(_)}const Ce=400;async function ae(){const _=[];let D=[""];for(;D.length>0&&_.length<Ce;){const ne=[];await Promise.all(D.filter(oe=>!K(oe)).map(A));for(const oe of D)for(const me of K(oe)?.entries??[])me.type==="dir"&&!me.ignored&&!me.link&&ne.push(me.path);_.push(...ne),D=ne}kn.update(e(i),{expanded:_.slice(0,Ce)})}function Le(){kn.update(e(i),{expanded:[]})}function ce(){kn.update(e(i),{showIgnored:!e(g)})}const $=h(()=>t.params.file?Hn(t.params.file,e(m)):null),X=h(()=>{const _=Number(t.params.line);return Number.isInteger(_)&&_>0?_:null});let Ie=!1;Be(()=>{if(!t.active||Ie)return;Ie=!0;const _=zt(()=>e(d).file);!t.params.file&&_&&t.setParams({file:_})});let qe=q(null),at=0;async function kt(_){if(!e(l))return;const D=++at;try{const ne=await fetch(`${e(l)}/read?${new URLSearchParams({path:_,locate:"1"})}`),oe=await ne.json();if(D!==at)return;if(!ne.ok){v(qe,{path:_,error:oe.error??`HTTP ${ne.status}`,binary:oe.binary===!0},!0);return}const me=oe;v(qe,{path:_,read:me},!0),me.path!==_&&(ut=`${me.path}\0${t.params.line??""}`,t.setParams({file:me.path})),se(me.path),kn.update(e(i),{file:me.path})}catch(ne){D===at&&v(qe,{path:_,error:ne instanceof Error?ne.message:String(ne)},!0)}}let ut=null;Be(()=>{const _=e($);if(!_||!t.active)return;const D=`${_}\0${t.params.line??""}`;D!==ut&&(ut=D,zt(()=>{kt(_)}))});function se(_){const D=Ur(_).filter(ne=>!e(P).has(ne));if(D.length!==0){kn.update(e(i),{expanded:[...e(P),...D]});for(const ne of D)e(E)[ne]||A(ne)}}const V=h(()=>e(qe)&&e($)&&(e(qe).path===e($)||"read"in e(qe)&&e(qe).read.path===e($))?e(qe):null),z=h(()=>e(V)&&"read"in e(V)?e(V).read:null),he=h(()=>e(z)?.path??e($));function Ee(_,D){t.setParams({file:_,line:null},{push:!0})}function Me(){kn.update(e(i),{file:void 0}),t.setParams({file:null,line:null})}let ye=q(!1);const de=h(()=>e(z)?.kind==="text"&&Bo(e(z).path)),Ve=h(()=>e(de)&&!e(ye)&&e(X)===null),et=h(()=>e(z)?.kind==="text"?e(z).text.replace(/\n$/,"").split(`
|
|
4
4
|
`):[]);let jt=q(null);Be(()=>{if(v(jt,null),e(z)?.kind!=="text"||e(Ve))return;const{text:_,path:D}=e(z);let ne=!1;return kl(_,Fo(D)).then(oe=>{ne||v(jt,oe,!0)}),()=>ne=!0});const Wt=200,Qt=h(()=>Array.from({length:Math.ceil(e(et).length/Wt)},(_,D)=>D*Wt));let Xt=q(null);Be(()=>{const _=e(X);!_||!e(Xt)||e(et).length===0||(e(jt),requestAnimationFrame(()=>e(Xt)?.querySelector(`[data-line="${_}"]`)?.scrollIntoView({block:"center"})))});function en(_){t.setParams({line:e(X)===_?null:String(_)})}const pe=_=>zr(_,"Path copied");function tt(){e(he)&&pe(e(X)?`${e(he)}:${e(X)}`:e(he))}function vt(_){if(!e(m))return null;const D=t.session?.cwd??e(m);return`@${D===e(m)?_:Hn(`${e(m)}/${_}`,D)}`}function bt(_){const D=_&&vt(_);D&&t.mention(D)}let Ct=q(null);function $t(_){const D=_.target?.closest("[data-path]"),ne=D?.dataset.path;if(!ne)return _.stopPropagation();v(Ct,{path:ne,dir:D.dataset.type==="dir"},!0)}function tn(_,D){_.dataTransfer&&(_.dataTransfer.setData("text/plain",`${vt(D)??D} `),_.dataTransfer.effectAllowed="copy")}let nn=q(null),F=q("");function ie(_){v(F,_,!0),e(E)[_]||A(_)}const Oe=h(()=>e(he)?Ur(e(he)):[]),yt=h(()=>e(m)&&qn(e(m))||"root"),Mt=h(()=>ln.fileExplorerOpen?"Hide file explorer":"Show file explorer");let Tt=q(null);Be(()=>{e(he),e(yt),e(z),e(de),ln.fileExplorerOpen;const _=e(Tt);_&&requestAnimationFrame(()=>_.scrollLeft=_.scrollWidth)});function we(_){return _<1024?`${_} B`:_<1024*1024?`${(_/1024).toFixed(1)} KB`:`${(_/1024/1024).toFixed(1)} MB`}let x=q(""),U=q(null),y=q(null),N=!1,Z=q(0);async function _e(){if(!(e(U)||N||!e(l))){N=!0,v(y,null);try{const _=await fetch(`${e(l)}/list`),D=await _.json();if(!_.ok)throw new Error(D.error??`HTTP ${_.status}`);v(U,D.files,!0)}catch(_){v(y,_ instanceof Error?_.message:String(_),!0)}finally{N=!1}}}const Je=h(()=>e(x).trim()&&e(U)?Ko(e(x),e(U)):[]);Be(()=>{e(Je),v(Z,0)});function nt(_){v(x,""),Ee(_)}function Se(_){if(_.key==="ArrowDown"||_.key==="ArrowUp"){_.preventDefault();const D=e(Je).length;D&&v(Z,(e(Z)+(_.key==="ArrowDown"?1:D-1))%D),document.querySelector(`[data-result="${e(Z)}"]`)?.scrollIntoView({block:"nearest"})}else _.key==="Enter"&&e(Je)[e(Z)]?(_.preventDefault(),nt(e(Je)[e(Z)])):_.key==="Escape"&&e(x)&&(_.preventDefault(),_.stopPropagation(),v(x,""))}Be(()=>{t.setActions([...e(j)?[{icon:e(g)?"mdi:eye-outline":"mdi:eye-off-outline",label:e(g)?"Hide ignored files":"Show ignored files",pressed:e(g),run:ce}]:[],e(P).size>0?{icon:"mdi:unfold-less-horizontal",label:"Collapse all folders",run:Le}:{icon:"mdi:unfold-more-horizontal",label:"Expand all folders",run:()=>{ae()}},{icon:"mdi:refresh",label:"Reload",disabled:!e(i),run:()=>{v(U,null),e(x).trim()&&_e(),M(),e($)&&kt(e($))}}])});var rt=vc();let wt;var f=k(rt),w=k(f);{var T=_=>{var D=zl(),ne=k(D);Te(ne,"icon","mdi:magnify");var oe=c(ne,2);Vn(oe,{type:"search",placeholder:"Go to file…","aria-label":"Go to file",autocomplete:"off",spellcheck:!1,onfocus:_e,onkeydown:Se,get value(){return e(x)},set value(me){v(x,me,!0)}}),b(D),a(_,D)};I(w,_=>{e(j)&&_(T)})}var Ae=c(w,2),W=k(Ae);{var Ge=_=>{var D=fe(),ne=R(D);{var oe=Q=>{var Y=as(),ge=L(Y,!0);C(()=>S(ge,e(y))),a(Q,Y)},me=Q=>{var Y=os();a(Q,Y)},We=Q=>{var Y=Fl();a(Q,Y)},Pt=Q=>{var Y=fe(),ge=R(Y);Bt(ge,18,()=>e(Je),xe=>xe,(xe,je,pt)=>{var mt=Bl();let ft;var _t=k(mt),xt=L(_t,!0),Ke=c(_t,2),dt=k(Ke),It=L(dt,!0);b(Ke),b(mt),C((Xe,At)=>{ft=ke(mt,1,"item result svelte-unol26",null,ft,{on:e(pt)===e(Z)}),ue(mt,"data-result",e(pt)),ue(mt,"title",je),S(xt,Xe),S(It,At)},[()=>qn(je),()=>ir(je)]),ot("click",mt,()=>nt(je)),a(xe,mt)}),a(Q,Y)};I(ne,Q=>{e(y)?Q(oe):e(U)?e(Je).length===0?Q(We,2):Q(Pt,-1):Q(me,1)})}a(_,D)},Fe=h(()=>e(x).trim()),it=_=>{var D=$l(),ne=R(D);{var oe=Q=>{var Y=Kl(),ge=L(Y,!0);C(()=>{ue(Y,"title",e(m)),S(ge,e(yt))}),a(Q,Y)};I(ne,Q=>{e(m)&&Q(oe)})}var me=c(ne,2);Qe(me,()=>Ii,(Q,Y)=>{Y(Q,{children:(ge,xe)=>{var je=Yn(),pt=R(je);Qe(pt,()=>Ei,(ft,_t)=>{_t(ft,{children:(xt,Ke)=>{n(xt,()=>"",()=>0)},$$slots:{default:!0}})});var mt=c(pt,2);Qe(mt,()=>xi,(ft,_t)=>{_t(ft,{class:"min-w-44",children:(xt,Ke)=>{var dt=fe(),It=R(dt);{var Xe=At=>{const H=h(()=>e(Ct));var ee=Xl(),He=R(ee);{var J=Ue=>{var gt=fe(),Dt=R(gt);Qe(Dt,()=>Fn,(le,ve)=>{ve(le,{onSelect:()=>Ee(e(H).path),children:(ze,De)=>{var Re=Hl(),Rt=R(Re);Te(Rt,"icon","mdi:file-eye-outline"),ht(),a(ze,Re)},$$slots:{default:!0}})}),a(Ue,gt)},re=Ue=>{var gt=fe(),Dt=R(gt);Qe(Dt,()=>Fn,(le,ve)=>{ve(le,{onSelect:()=>G(e(H).path,!e(P).has(e(H).path)),children:(ze,De)=>{var Re=Wl(),Rt=R(Re);C(Jt=>Te(Rt,"icon",Jt),[()=>e(P).has(e(H).path)?"mdi:folder-outline":"mdi:folder-open-outline"]);var Vt=c(Rt);C(Jt=>S(Vt,` ${Jt??""}`),[()=>e(P).has(e(H).path)?"Collapse":"Expand"]),a(ze,Re)},$$slots:{default:!0}})}),a(Ue,gt)};I(He,Ue=>{e(H).dir?Ue(re,-1):Ue(J)})}var Pe=c(He,2);Qe(Pe,()=>Fn,(Ue,gt)=>{gt(Ue,{onSelect:()=>bt(e(H).path),children:(Dt,le)=>{var ve=Ul(),ze=R(ve);Te(ze,"icon","mdi:at"),ht(),a(Dt,ve)},$$slots:{default:!0}})});var lt=c(Pe,2);Qe(lt,()=>Ti,(Ue,gt)=>{gt(Ue,{})});var Ze=c(lt,2);Qe(Ze,()=>Fn,(Ue,gt)=>{gt(Ue,{onSelect:()=>{pe(e(H).path)},children:(Dt,le)=>{var ve=Vl(),ze=R(ve);Te(ze,"icon","mdi:content-copy"),ht(),a(Dt,ve)},$$slots:{default:!0}})});var ct=c(Ze,2);{var st=Ue=>{var gt=fe(),Dt=R(gt);Qe(Dt,()=>Fn,(le,ve)=>{ve(le,{onSelect:()=>{pe(`${e(m)}/${e(H).path}`)},children:(ze,De)=>{var Re=Gl(),Rt=R(Re);Te(Rt,"icon","mdi:content-copy"),ht(),a(ze,Re)},$$slots:{default:!0}})}),a(Ue,gt)};I(ct,Ue=>{e(m)&&Ue(st)})}a(At,ee)};I(It,At=>{e(Ct)&&At(Xe)})}a(xt,dt)},$$slots:{default:!0}})}),a(ge,je)},$$slots:{default:!0}})});var We=c(me,2);{var Pt=Q=>{var Y=Yl(),ge=L(Y);C(()=>S(ge,`+ ${e(p).hidden??""} ignored at the top level (show)`)),ot("click",Y,ce),a(Q,Y)};I(We,Q=>{e(p)&&!e(g)&&e(p).hidden>0&&Q(Pt)})}a(_,D)};I(W,_=>{e(Fe)?_(Ge):_(it,-1)})}b(Ae),b(f);var Ot=c(f,2);{var Ht=_=>{var D=dc(),ne=k(D),oe=k(ne),me=k(oe);Te(me,"icon","mdi:arrow-left"),b(oe);var We=c(oe,2),Pt=k(We);o(Pt,()=>"",()=>e(yt));var Q=c(Pt,2);Bt(Q,16,()=>e(Oe),le=>le,(le,ve)=>{var ze=Jl(),De=R(ze);ke(De,1,"sep svelte-unol26"),Te(De,"icon","mdi:chevron-right");var Re=c(De,2);{let Rt=h(()=>qn(ve));o(Re,()=>ve,()=>e(Rt))}a(le,ze)});var Y=c(Q,2);ke(Y,1,"sep svelte-unol26"),Te(Y,"icon","mdi:chevron-right");var ge=c(Y,2),xe=L(ge,!0);b(We),mn(We,le=>v(Tt,le),()=>e(Tt));var je=c(We,2);{var pt=le=>{var ve=Zl(),ze=L(ve,!0);C(De=>S(ze,De),[()=>we(e(z).size)]),a(le,ve)};I(je,le=>{e(z)&&le(pt)})}var mt=c(je,2);{var ft=le=>{var ve=Ql(),ze=k(ve),De=()=>e(Ve),Re=Lt=>{Lt&&(v(ye,!1),t.setParams({line:null}))};un(ze,{size:"sm",get pressed(){return De()},set pressed(Lt){Re(Lt)},children:(Lt,Ut)=>{ht();var an=Kt("Preview");a(Lt,an)},$$slots:{default:!0}});var Rt=c(ze,2),Vt=()=>!e(Ve),Jt=Lt=>Lt&&v(ye,!0);un(Rt,{size:"sm",get pressed(){return Vt()},set pressed(Lt){Jt(Lt)},children:(Lt,Ut)=>{ht();var an=Kt("Source");a(Lt,an)},$$slots:{default:!0}}),b(ve),a(le,ve)};I(mt,le=>{e(de)&&le(ft)})}var _t=c(mt,2),xt=k(_t);Te(xt,"icon","mdi:content-copy"),b(_t);var Ke=c(_t,2),dt=k(Ke);Te(dt,"icon","mdi:at"),b(Ke);var It=c(Ke,2);{var Xe=le=>{const ve=h(()=>ln.fileWordWrap?"Let long lines scroll":"Wrap long lines");var ze=ec();let De;var Re=k(ze);Te(Re,"icon","mdi:wrap"),b(ze),C(()=>{De=ke(ze,1,"icon svelte-unol26",null,De,{on:ln.fileWordWrap}),ue(ze,"aria-pressed",ln.fileWordWrap),ue(ze,"title",e(ve)),ue(ze,"aria-label",e(ve))}),ot("click",ze,()=>ln.fileWordWrap=!ln.fileWordWrap),a(le,ze)};I(It,le=>{e(z)?.kind==="text"&&!e(Ve)&&le(Xe)})}var At=c(It,2);let H;var ee=k(At);Te(ee,"icon","mdi:file-tree"),b(At);var He=c(At,2),J=k(He);Te(J,"icon","mdi:close"),b(He),b(ne);var re=c(ne,2);{var Pe=le=>{var ve=tc(),ze=L(ve);C((De,Re)=>S(ze,`Truncated at 1 MB: showing the first ${De??""} of ${Re??""}.`),[()=>we(e(z).shown),()=>we(e(z).size)]),a(le,ve)};I(re,le=>{e(z)?.kind==="text"&&e(z).truncated&&le(Pe)})}var lt=c(re,2);{var Ze=le=>{var ve=nc();a(le,ve)},ct=le=>{var ve=rc();let ze;var De=L(ve,!0);C(()=>{ze=ke(ve,1,"msg svelte-unol26",null,ze,{err:!e(V).binary}),S(De,e(V).binary?"Binary file; not shown.":e(V).error)}),a(le,ve)},st=le=>{var ve=sc(),ze=L(ve);C(()=>{ue(ze,"src",`${e(l)??""}/read?${new URLSearchParams({path:e(z).path,raw:"1"})??""}`),ue(ze,"alt",e(z).path)}),a(le,ve)},Ue=le=>{var ve=oc();Un(ve,()=>Tr(e(z).text),!0),b(ve),a(le,ve)},gt=le=>{var ve=ac();a(le,ve)},Dt=le=>{var ve=uc();let ze,De;Bt(ve,20,()=>e(Qt),Re=>Re,(Re,Rt)=>{var Vt=cc();let Jt;Bt(Vt,21,()=>e(et).slice(Rt,Rt+Wt),hr,(Lt,Ut,an)=>{const qt=h(()=>Rt+an+1);var Gt=lc();let bn;var Cn=k(Gt),Rn=L(Cn,!0),Xn=c(Cn,2),yn=k(Xn);{var wn=Mn=>{var jn=fe(),Qs=R(jn);Bt(Qs,17,()=>e(jt)[e(qt)-1],hr,(eo,Fr)=>{var or=ic();let Br;var to=L(or,!0);C(()=>{Br=Yt(or,"",Br,{color:e(Fr).color}),S(to,e(Fr).content)}),a(eo,or)}),a(Mn,jn)},Nn=Mn=>{var jn=Kt();C(()=>S(jn,e(Ut))),a(Mn,jn)};I(yn,Mn=>{e(jt)?.[e(qt)-1]?Mn(wn):Mn(Nn,-1)})}b(Xn),b(Gt),C(()=>{bn=ke(Gt,1,"ln svelte-unol26",null,bn,{hl:e(X)===e(qt)}),ue(Gt,"data-line",e(qt)),S(Rn,e(qt))}),ot("click",Cn,()=>en(e(qt))),a(Lt,Gt)}),b(Vt),C(Lt=>Jt=Yt(Vt,"",Jt,{"--rows":Lt}),[()=>Math.min(Wt,e(et).length-Rt)]),a(Re,Vt)}),b(ve),mn(ve,Re=>v(Xt,Re),()=>e(Xt)),C(Re=>{ze=ke(ve,1,"code svelte-unol26",null,ze,{wrap:ln.fileWordWrap}),De=Yt(ve,"",De,{"--gutter":Re})},[()=>`${String(e(et).length).length+1}ch`]),a(le,ve)};I(lt,le=>{e(V)?"error"in e(V)?le(ct,1):e(z)?.kind==="image"?le(st,2):e(Ve)&&e(z)?.kind==="text"?le(Ue,3):e(et).length===0?le(gt,4):le(Dt,-1):le(Ze)})}b(D),C(le=>{ue(We,"title",e(he)),S(xe,le),H=ke(At,1,"icon wide-only svelte-unol26",null,H,{on:ln.fileExplorerOpen}),ue(At,"aria-pressed",ln.fileExplorerOpen),ue(At,"title",e(Mt)),ue(At,"aria-label",e(Mt))},[()=>e(he)?qn(e(he)):""]),ot("click",oe,Me),ot("click",_t,tt),ot("click",Ke,()=>bt(e(he))),ot("click",At,()=>ln.fileExplorerOpen=!ln.fileExplorerOpen),ot("click",He,Me),a(_,D)};I(Ot,_=>{e($)&&_(Ht)})}b(rt),C(()=>wt=ke(rt,1,"files svelte-unol26",null,wt,{picked:!!e($),"tree-off":!ln.fileExplorerOpen})),fn("contextmenu",Ae,$t,!0),a(r,rt),$e()}Ln(["click"]);function hc(r){const t=new Set(r.map(l=>l.hash)),n=[],s=()=>{const l=n.indexOf(null);return l===-1?n.length:l},o=[];let i=0;for(const l of r){const d=[];n.forEach((A,M)=>{A===l.hash&&d.push(M)});const g=d[0]??s(),P=[];n.forEach((A,M)=>{A!==null&&A!==l.hash&&P.push(M)});for(const A of d)n[A]=null;n[g]=null;const E=[];for(l.parents.filter(A=>t.has(A)).forEach((A,M)=>{let K=M===0?g:n.indexOf(A);K===-1&&(K=s()),n[K]=A,E.includes(K)||E.push(K)});n.length>0&&n[n.length-1]===null;)n.pop();i=Math.max(i,g+1,...P.map(A=>A+1),...E.map(A=>A+1)),o.push({lane:g,into:d,through:P,out:E})}return{rows:o,width:i}}var pc=u('<span class="chip local svelte-1j3e5vb" title="Commits no remote branch has yet"> </span>'),dr=u('<p class="msg err svelte-1j3e5vb"> </p>'),vr=u('<p class="msg svelte-1j3e5vb">Loading…</p>'),mc=u('<p class="msg svelte-1j3e5vb">No commits yet.</p>'),_c=u('<div class="day svelte-1j3e5vb"> </div>'),fr=_r('<path class="svelte-1j3e5vb"></path>'),gc=_r('<rect class="dot tag svelte-1j3e5vb" width="8" height="8"></rect>'),bc=_r('<circle r="4"></circle>'),yc=u("<span> </span>"),wc=u('<span class="chip mine svelte-1j3e5vb" title="Made by this session">this session</span>'),xc=u('<span class="chip local svelte-1j3e5vb" title="No remote branch has this commit yet">local</span>'),is=u('<span class="nums svelte-1j3e5vb"><span class="add svelte-1j3e5vb"> </span> <span class="del svelte-1j3e5vb"> </span></span>'),kc=u('<!> <button type="button"><svg class="rail svelte-1j3e5vb" aria-hidden="true"><!><!><!><!></svg> <span class="what svelte-1j3e5vb"><span class="subject svelte-1j3e5vb"> </span> <span class="meta svelte-1j3e5vb"><span> </span> <span> </span> <!> <!> <!></span></span> <!></button>',1),Pc=u('<p class="more svelte-1j3e5vb">Older commits are not listed.</p>'),Tc=u('<button type="button" class="act svelte-1j3e5vb" title="Show the turn of the conversation that made this commit"><iconify-icon></iconify-icon> Go to turn</button>',2),Sc=u('<p class="msg svelte-1j3e5vb">This commit changed no files.</p>'),Ec=u('<span class="dim svelte-1j3e5vb">bin</span>'),Cc=u('<button type="button" class="tofiles svelte-1j3e5vb" title="Open in Files, as the file is on disk now"><iconify-icon></iconify-icon></button>',2),Ic=u('<p class="msg svelte-1j3e5vb">Binary file; no text diff.</p>'),Mc=u('<p class="msg svelte-1j3e5vb">No line changes.</p>'),Oc=u('<div class="diff svelte-1j3e5vb"><!></div>'),Ac=u('<div><button type="button" class="file svelte-1j3e5vb"><span> </span> <span class="path svelte-1j3e5vb"><bdi> </bdi></span> <!></button> <!></div> <!>',1),Lc=u('<div class="files svelte-1j3e5vb"></div>'),Dc=u('<div class="head svelte-1j3e5vb"><button type="button" class="back svelte-1j3e5vb" aria-label="Back to commits"><iconify-icon></iconify-icon></button> <div class="title svelte-1j3e5vb"><h3 class="svelte-1j3e5vb"></h3> <p class="who svelte-1j3e5vb"><span> </span> <span> </span> <span> </span></p></div></div> <div class="acts svelte-1j3e5vb"><button type="button" class="act svelte-1j3e5vb"><iconify-icon></iconify-icon> Add to chat</button> <button type="button" class="act svelte-1j3e5vb"><iconify-icon></iconify-icon> Copy hash</button> <!></div> <!>',3),Rc=u('<p class="msg svelte-1j3e5vb">Pick a commit to see what it changed.</p>'),Nc=u('<div class="split svelte-1j3e5vb"><nav aria-label="Commits" class="svelte-1j3e5vb"><!> <!></nav> <!> <section class="detail svelte-1j3e5vb" aria-label="Commit"><!></section></div>'),jc=u('<div><div class="bar svelte-1j3e5vb"><span class="branch svelte-1j3e5vb"><iconify-icon></iconify-icon> </span> <!> <span class="sp svelte-1j3e5vb"></span> <div class="seg svelte-1j3e5vb" role="group" aria-label="How the commits are shown"><!> <!></div></div> <!></div>',2);function qc(r,t){Ye(t,!0);const n=h(()=>t.session?.id??null),s=h(()=>e(n)?`${Sn(t.base,e(n))}/history`:null),o=h(()=>t.params.view==="graph");let i=q(null);function l(x){return Tr(x.replace(/[\\`*_[\]<>]/g,"\\$&"),{github:{bare:!0}}).trim().replace(/^<p>([\s\S]*)<\/p>$/,"$1")}let d=q(null),g=q(null),P=q(!1),E=0;async function O(x,U){const y=++E;v(P,!0);try{const N=await fetch(`${x}?scope=${U?"all":"branch"}`),Z=await N.json();if(y!==E)return;if(!N.ok)throw new Error(Z.error??`HTTP ${N.status}`);v(d,Z,!0),v(g,null)}catch(N){y===E&&v(g,N instanceof Error?N.message:String(N),!0)}finally{y===E&&v(P,!1)}}const A=h(()=>`${t.session?.turn_completed_at??0}:${t.session?.changes?.files??0}`);Be(()=>{e(A);const x=e(s),U=e(o);x&&t.active&&zt(()=>{O(x,U)})});const M=h(()=>e(d)?.commits??[]),K=h(()=>hc(e(M))),p=h(()=>e(M).filter(x=>!x.pushed).length),m=h(()=>new Set((e(d)?.tips??[]).flatMap(x=>x.branch?[x.branch]:[])));function j(x){const U=e(d)?.tips.find(N=>N.branch===x),y=U&&Ms.sessions.find(N=>N.git_root===U.path&&N.maestro_issue!=null);return y?y.issue?`#${y.maestro_issue} ${y.issue.title}`:`#${y.maestro_issue}`:null}const te=44,G=14,Ce=11,ae=["#a8a29e","#a78bfa","#2dd4bf","#7dd3fc","#fbbf24","#f9a8d4"],Le=x=>Ce+x*G,ce=x=>ae[x%ae.length],$=h(()=>Ce*2+Math.max(0,e(K).width-1)*G);function X(x,U,y){const N=Le(x),Z=Le(U.lane),_e=y?0:te,Je=te/2;return N===Z?`M${N} ${_e} L${Z} ${Je}`:`M${N} ${_e} C${N} ${(_e+Je)/2} ${Z} ${(_e+Je)/2} ${Z} ${Je}`}const Ie=h(()=>e(M).find(x=>x.hash===t.params.commit)??null);let qe=q(null),at=q(null),kt=0;async function ut(x,U){const y=++kt;try{const N=await fetch(`${x}/commit?hash=${U}`),Z=await N.json();if(y!==kt)return;if(!N.ok)throw new Error(Z.error??`HTTP ${N.status}`);v(qe,Z,!0),v(at,null)}catch(N){y===kt&&v(at,N instanceof Error?N.message:String(N),!0)}}Be(()=>{const x=e(s),U=t.params.commit;x&&U&&t.active&&zt(()=>{ut(x,U)})});const se=h(()=>e(qe)&&e(qe).hash===t.params.commit?e(qe).files:null);let V=q(null),z=q(null),he=0;async function Ee(x,U,y){const N=++he;try{const Z=await fetch(`${x}/diff?${new URLSearchParams({hash:U,file:y})}`),_e=await Z.json();if(N!==he)return;if(!Z.ok)throw new Error(_e.error??`HTTP ${Z.status}`);v(V,{hash:U,diff:_e},!0),v(z,null)}catch(Z){N===he&&v(z,Z instanceof Error?Z.message:String(Z),!0)}}Be(()=>{const x=e(s),U=t.params.commit,y=t.params.file;x&&U&&y&&t.active&&zt(()=>{Ee(x,U,y)})});const Me=h(()=>e(V)&&e(V).hash===t.params.commit&&e(V).diff.file===t.params.file?e(V).diff:null);async function ye(x,U){if(!e(s))return null;const y=await fetch(`${e(s)}/file?${new URLSearchParams({hash:x,file:U})}`);return y.ok?(await y.json()).text:null}function de(x){t.setParams({commit:x,file:null},{push:!0})}function Ve(x){window.dispatchEvent(new CustomEvent("claude-mux:reveal-entry",{detail:{id:x}}))}Be(()=>{t.setActions([{icon:"mdi:refresh",label:"Reload",disabled:!e(s)||e(P),run:()=>e(s)&&void O(e(s),e(o))}])});function et(x){if(!t.active||x.defaultPrevented||x.ctrlKey||x.metaKey||x.altKey||x.key!=="j"&&x.key!=="k"||x.target?.closest('input, textarea, select, [contenteditable=""], [contenteditable="true"]')||e(M).length===0)return;const y=e(Ie)?e(M).indexOf(e(Ie)):-1,N=e(M)[x.key==="j"?Math.min(y+1,e(M).length-1):Math.max(y-1,0)];x.preventDefault(),t.setParams({commit:N.hash,file:null}),document.querySelector(`[data-commit="${N.hash}"]`)?.scrollIntoView({block:"nearest"})}var jt=jc();fn("keydown",ks,et);let Wt;var Qt=k(jt),Xt=k(Qt),en=k(Xt);Te(en,"icon","mdi:source-branch");var pe=c(en);b(Xt);var tt=c(Xt,2);{var vt=x=>{var U=pc(),y=L(U);C(()=>S(y,`${e(p)??""} to push`)),a(x,U)};I(tt,x=>{e(p)>0&&x(vt)})}var bt=c(tt,4),Ct=k(bt),$t=()=>!e(o),tn=x=>x&&t.setParams({view:null});un(Ct,{size:"sm",get pressed(){return $t()},set pressed(x){tn(x)},title:"The checked-out branch, by day",children:(x,U)=>{ht();var y=Kt("List");a(x,y)},$$slots:{default:!0}});var nn=c(Ct,2),F=()=>e(o),ie=x=>x&&t.setParams({view:"graph"});un(nn,{size:"sm",get pressed(){return F()},set pressed(x){ie(x)},title:"Every worktree's branch and the upstream, a lane each",children:(x,U)=>{ht();var y=Kt("Graph");a(x,y)},$$slots:{default:!0}}),b(bt),b(Qt);var Oe=c(Qt,2);{var yt=x=>{var U=dr(),y=L(U,!0);C(()=>S(y,e(g))),a(x,U)},Mt=x=>{var U=vr();a(x,U)},Tt=x=>{var U=mc();a(x,U)},we=x=>{var U=Nc(),y=k(U),N=k(y);Bt(N,19,()=>e(M),w=>w.hash,(w,T,Ae)=>{const W=h(()=>e(K).rows[e(Ae)]),Ge=h(()=>Vr(e(T).at,$n.now));var Fe=kc(),it=R(Fe);{var Ot=J=>{var re=_c();let Pe;var lt=L(re,!0);C(()=>{Pe=Yt(re,"",Pe,{"padding-left":`${e($)+6}px`}),S(lt,e(Ge))}),a(J,re)},Ht=h(()=>!e(o)&&(e(Ae)===0||e(Ge)!==Vr(e(M)[e(Ae)-1].at,$n.now)));I(it,J=>{e(Ht)&&J(Ot)})}var _=c(it,2);let D;var ne=k(_);ue(ne,"height",te);var oe=k(ne);Bt(oe,16,()=>e(W).through,J=>J,(J,re)=>{var Pe=fr();C((lt,Ze,ct)=>{ue(Pe,"d",`M${lt??""} 0 L${Ze??""} 44`),ue(Pe,"stroke",ct)},[()=>Le(re),()=>Le(re),()=>ce(re)]),a(J,Pe)});var me=c(oe);Bt(me,16,()=>e(W).into,J=>J,(J,re)=>{var Pe=fr();C((lt,Ze)=>{ue(Pe,"d",lt),ue(Pe,"stroke",Ze)},[()=>X(re,e(W),!0),()=>ce(re)]),a(J,Pe)});var We=c(me);Bt(We,16,()=>e(W).out,J=>J,(J,re)=>{var Pe=fr();C((lt,Ze)=>{ue(Pe,"d",lt),ue(Pe,"stroke",Ze)},[()=>X(re,e(W),!1),()=>ce(re)]),a(J,Pe)});var Pt=c(We);{var Q=J=>{var re=gc();ue(re,"y",te/2-4),C((Pe,lt)=>{ue(re,"x",Pe),ue(re,"transform",`rotate(45 ${lt??""} 22)`)},[()=>Le(e(W).lane)-4,()=>Le(e(W).lane)]),a(J,re)},Y=h(()=>e(T).refs.some(J=>J.startsWith("tag: "))),ge=J=>{var re=bc();let Pe;ue(re,"cy",te/2),C((lt,Ze)=>{Pe=ke(re,0,"dot svelte-1j3e5vb",null,Pe,{mine:e(T).mine}),ue(re,"cx",lt),ue(re,"stroke",Ze)},[()=>Le(e(W).lane),()=>e(T).mine?void 0:ce(e(W).lane)]),a(J,re)};I(Pt,J=>{e(Y)?J(Q):J(ge,-1)})}b(ne);var xe=c(ne,2),je=k(xe),pt=L(je,!0),mt=c(je,2),ft=k(mt),_t=L(ft,!0),xt=c(ft,2),Ke=L(xt,!0),dt=c(xt,2);Bt(dt,16,()=>e(T).refs,J=>J,(J,re)=>{const Pe=h(()=>ea(re,e(m))),lt=h(()=>e(Pe).kind==="branch"?j(e(Pe).name):null);var Ze=yc(),ct=L(Ze,!0);C(()=>{ke(Ze,1,`chip ${(e(lt)?"worker":e(Pe).kind)??""}`,"svelte-1j3e5vb"),ue(Ze,"title",e(lt)?`${e(Pe).name}, where this worker runs`:re),S(ct,e(lt)??e(Pe).name)}),a(J,Ze)});var It=c(dt,2);{var Xe=J=>{var re=wc();a(J,re)};I(It,J=>{e(T).mine&&J(Xe)})}var At=c(It,2);{var H=J=>{var re=xc();a(J,re)};I(At,J=>{e(T).pushed||J(H)})}b(mt),b(xe);var ee=c(xe,2);{var He=J=>{var re=is(),Pe=k(re),lt=L(Pe),Ze=c(Pe,2),ct=L(Ze);b(re),C(()=>{S(lt,`+${e(T).additions??""}`),S(ct,`−${e(T).deletions??""}`)}),a(J,re)};I(ee,J=>{(e(T).additions||e(T).deletions)&&J(He)})}b(_),C((J,re)=>{D=ke(_,1,"commit svelte-1j3e5vb",null,D,{on:e(T).hash===t.params.commit}),ue(_,"aria-current",e(T).hash===t.params.commit?"true":void 0),ue(_,"data-commit",e(T).hash),ue(ne,"width",e($)),ue(ne,"viewBox",`0 0 ${e($)??""} 44`),S(pt,e(T).subject),S(_t,J),S(Ke,re)},[()=>cr(e(T).hash),()=>Ts(e(T).at,$n.now)]),ot("click",_,()=>de(e(T).hash)),a(w,Fe)});var Z=c(N,2);{var _e=w=>{var T=Pc();a(w,T)};I(Z,w=>{e(d).truncated&&w(_e)})}b(y);var Je=c(y,2);{var nt=w=>{Fs(w,{get root(){return e(i)},get session(){return e(n)},get base(){return t.base},onOpen:T=>t.openPane("github",{ref:T})})};I(Je,w=>{e(i)&&e(n)&&w(nt)})}var Se=c(Je,2),rt=k(Se);{var wt=w=>{var T=Dc(),Ae=R(T),W=k(Ae),Ge=k(W);Te(Ge,"icon","mdi:arrow-left"),b(W);var Fe=c(W,2),it=k(Fe);Un(it,()=>l(e(Ie).subject),!0),b(it),mn(it,Ke=>v(i,Ke),()=>e(i));var Ot=c(it,2),Ht=k(Ot),_=L(Ht,!0),D=c(Ht,2),ne=L(D,!0),oe=c(D,2),me=L(oe,!0);b(Ot),b(Fe),b(Ae);var We=c(Ae,2),Pt=k(We),Q=k(Pt);Te(Q,"icon","mdi:at"),ht(),b(Pt);var Y=c(Pt,2),ge=k(Y);Te(ge,"icon","mdi:content-copy"),ht(),b(Y);var xe=c(Y,2);{var je=Ke=>{const dt=h(()=>e(Ie).turn);var It=Tc(),Xe=k(It);Te(Xe,"icon","mdi:message-arrow-left-outline"),ht(),b(It),ot("click",It,()=>Ve(e(dt))),a(Ke,It)};I(xe,Ke=>{e(Ie).turn&&Ke(je)})}b(We);var pt=c(We,2);{var mt=Ke=>{var dt=dr(),It=L(dt,!0);C(()=>S(It,e(at))),a(Ke,dt)},ft=Ke=>{var dt=vr();a(Ke,dt)},_t=Ke=>{var dt=Sc();a(Ke,dt)},xt=Ke=>{var dt=Lc();Bt(dt,21,()=>e(se),It=>It.file,(It,Xe)=>{const At=h(()=>e(Xe).file===t.params.file);var H=Ac(),ee=R(H);let He;var J=k(ee),re=k(J),Pe=L(re,!0),lt=c(re,2),Ze=k(lt),ct=L(Ze,!0);b(lt);var st=c(lt,2);{var Ue=De=>{var Re=Ec();a(De,Re)},gt=De=>{var Re=is(),Rt=k(Re),Vt=L(Rt),Jt=c(Rt,2),Lt=L(Jt);b(Re),C(()=>{S(Vt,`+${e(Xe).additions??""}`),S(Lt,`−${e(Xe).deletions??""}`)}),a(De,Re)};I(st,De=>{e(Xe).binary?De(Ue):De(gt,-1)})}b(J);var Dt=c(J,2);{var le=De=>{var Re=Cc(),Rt=k(Re);Te(Rt,"icon","mdi:file-tree-outline"),b(Re),C(()=>ue(Re,"aria-label",`Open ${e(Xe).file??""} in Files`)),ot("click",Re,()=>t.openPane("files",{file:e(Xe).file,line:null})),a(De,Re)};I(Dt,De=>{e(Xe).kind!=="deleted"&&De(le)})}b(ee);var ve=c(ee,2);{var ze=De=>{var Re=Oc(),Rt=k(Re);{var Vt=qt=>{var Gt=dr(),bn=L(Gt,!0);C(()=>S(bn,e(z))),a(qt,Gt)},Jt=qt=>{var Gt=vr();a(qt,Gt)},Lt=qt=>{var Gt=Ic();a(qt,Gt)},Ut=qt=>{var Gt=Mc();a(qt,Gt)},an=qt=>{var Gt=fe(),bn=R(Gt);Bs(bn,()=>`${e(Ie).hash}\0${e(Xe).file}`,Cn=>{{let Rn=h(()=>e(Xe).kind==="deleted"?void 0:()=>ye(e(Ie).hash,e(Xe).file));Gs(Cn,{get hunks(){return e(Me).hunks},get file(){return e(Xe).file},get loadText(){return e(Rn)}})}}),a(qt,Gt)};I(Rt,qt=>{e(z)?qt(Vt):e(Me)?e(Me).binary?qt(Lt,2):e(Me).hunks.length===0?qt(Ut,3):qt(an,-1):qt(Jt,1)})}b(Re),a(De,Re)};I(ve,De=>{e(At)&&De(ze)})}C(De=>{He=ke(ee,1,"filerow svelte-1j3e5vb",null,He,{on:e(At)}),ue(J,"aria-expanded",e(At)),ue(J,"title",e(Xe).oldPath?`${e(Xe).oldPath} → ${e(Xe).file}`:e(Xe).file),ke(re,1,`st ${e(Xe).kind??""}`,"svelte-1j3e5vb"),S(Pe,De),S(ct,e(Xe).file)},[()=>js(e(Xe))]),ot("click",J,()=>t.setParams({file:e(At)?null:e(Xe).file})),a(It,H)}),b(dt),a(Ke,dt)};I(pt,Ke=>{e(at)?Ke(mt):e(se)?e(se).length===0?Ke(_t,2):Ke(xt,-1):Ke(ft,1)})}C((Ke,dt)=>{S(_,Ke),S(ne,e(Ie).author),S(me,dt)},[()=>cr(e(Ie).hash),()=>new Date(e(Ie).at).toLocaleString()]),ot("click",W,()=>t.setParams({commit:null,file:null})),ot("click",Pt,()=>t.mention(cr(e(Ie).hash))),ot("click",Y,()=>{zr(e(Ie).hash,"Hash copied")}),a(w,T)},f=w=>{var T=Rc();a(w,T)};I(rt,w=>{e(Ie)?w(wt):w(f,-1)})}b(Se),b(U),a(x,U)};I(Oe,x=>{e(g)?x(yt):e(d)?e(M).length===0?x(Tt,2):x(we,-1):x(Mt,1)})}b(jt),C(()=>{Wt=ke(jt,1,"history svelte-1j3e5vb",null,Wt,{picked:!!t.params.commit}),S(pe,` ${e(d)?.branch??(e(d)?"detached HEAD":"History")??""}`)}),a(r,jt),$e()}Ln(["click"]);function Ys(r){const t=r.replace(/^\[|\]$/g,"").toLowerCase();return t==="localhost"||t.endsWith(".localhost")||t==="::1"||/^(::ffff:)?127\./.test(t)}function ls(r,t){return r==="prod"?t?.urls.prod??null:r==="dev"?t?.urls.dev??t?.detected[0]?.url??null:r}function cs(r){const t=r.trim();if(!t)return null;const n=/^[a-z][a-z0-9+.-]*:\/\//i.test(t);try{let s=new URL(n?t:`http://${t}`);return!n&&!$s(s)&&(s=new URL(`https://${t}`)),s.protocol==="http:"||s.protocol==="https:"?s.href:null}catch{return null}}function $s(r){return Ys(r.hostname)||r.hostname==="0.0.0.0"}function zc(r){return Number(r.port||(r.protocol==="https:"?443:80))}function Fc(r,t){const n=new URL(r),s=t.page.protocol==="https:";if(!$s(n))return s&&n.protocol==="http:"?{kind:"card",reason:"This page is served over HTTPS, and browsers will not frame a plain-HTTP page inside it.",open:n.href}:{kind:"frame",src:n.href};const o=zc(n),i=t.serves[o];if(i)return{kind:"frame",src:`${i}${n.pathname}${n.search}${n.hash}`};if(!t.machine&&Ys(t.page.hostname))return{kind:"frame",src:n.href.replace("//0.0.0.0","//localhost")};const l=new URL(n.href);l.hostname=t.machine||t.page.hostname;const d={kind:"card",open:l.href,command:`tailscale serve --bg --https=${o} http://localhost:${o}`},g=t.machine?` Run it on ${t.machine.split(".")[0]}.`:"",P=t.machine?t.machine.split(".")[0]:"this machine";return t.detected.find(E=>E.port===o)?.loopbackOnly?{...d,reason:`The server on port ${o} listens on 127.0.0.1 only, so nothing off ${P} reaches it. Map it with tailscale serve, or restart it bound to 0.0.0.0.${g}`}:s&&l.protocol==="http:"?{...d,reason:`Port ${o} has no tailscale serve HTTPS mapping on ${P}, and this page, served over HTTPS, cannot frame plain HTTP.${g}`}:{kind:"frame",src:l.href}}const mr="browser";function Bc(r,t,n,s){const o=(i,l,d,g)=>d>0?Math.round(Math.min(Math.max((i-l)/d,0),1)*g):0;return{x:o(r,n.left,n.width,s.width),y:o(t,n.top,n.height,s.height)}}const us={scale:1,x:0,y:0},Kc=8;function Hc(r,t,n,s,o,i=o){const l=Math.min(Math.max(r.scale*s,1),Kc),d=o.left+o.width/2,g=o.top+o.height/2,P=(E,O,A,M,K,p)=>{const m=Math.max(0,(l*K-p)/2),j=(E-A-M)/r.scale;return Math.min(Math.max(O-A-l*j,-m),m)};return{scale:l,x:P(t.x,n.x,d,r.x,o.width,i.width),y:P(t.y,n.y,g,r.y,o.height,i.height)}}function Jn(r){return(r.altKey?1:0)|(r.ctrlKey?2:0)|(r.metaKey?4:0)|(r.shiftKey?8:0)}const Wc=["left","middle","right","back","forward"];function Uc(r){return Wc[r]??"none"}function Vc(r){return r&1?"left":r&2?"right":r&4?"middle":"none"}function ds(r,t){if(r.altKey&&r.shiftKey)return null;const n=r.ctrlKey||r.metaKey;if(n&&r.key.toLowerCase()==="v")return null;const s={type:"key",event:t,key:r.key,code:r.code,keyCode:r.keyCode,modifiers:Jn(r)};return t==="down"&&!n&&(r.key==="Enter"?s.text="\r":[...r.key].length===1&&(s.text=r.key)),s}function Gc(r,t){const n=[...r],s=[...t];let o=0;for(;o<n.length&&o<s.length&&n[o]===s[o];)o++;return{backspaces:n.length-o,insert:s.slice(o).join("")}}function Xc(r,t,n=null){if(!r)return null;const s=o=>o?r.tabs.find(i=>i.id===o):void 0;return s(t)??s(n)??s(r.preferred)??r.tabs[0]??null}function Yc(r,t){const n=t.toLowerCase().split(/\s+/).filter(Boolean);return n.length===0?r:r.filter(s=>{const o=`${s.title} ${s.url}`.toLowerCase();return n.every(i=>o.includes(i))})}async function $c(r){try{const t=await fetch(`${r}/api/browser/tabs`);if(!t.ok)return!1;const n=await t.json();return!!n.name&&!n.error}catch{return!1}}async function Jc(r,t){try{const n=await fetch(`${r}/api/browser/open`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({url:t})}),s=await n.json().catch(()=>null);return n.ok&&typeof s?.tab=="string"?{tab:s.tab}:{error:typeof s?.error=="string"?s.error:`HTTP ${n.status}`}}catch(n){return{error:`Could not reach claude-mux: ${n}`}}}const vs=gr("claude-mux-web-pane",{});class Zc{#e=q(on(vs.load()));get state(){return e(this.#e)}set state(t){v(this.#e,t,!0)}get(t){return t&&this.state[t]||null}set(t,n){!t||this.state[t]===n||(this.state[t]=n,vs.save(this.state))}}const fs=new Zc;class Qc extends ko{#e=q(null);get closedReason(){return e(this.#e)}set closedReason(t){v(this.#e,t,!0)}#t=q(null);get url(){return e(this.#t)}set url(t){v(this.#t,t,!0)}onFrame=null;tabId=null;base="";open(t,n,s=!1){this.tabId===t&&this.base===n&&!s&&this.closedReason===null||(this.doDisconnect(),this.tabId=t,this.base=n,this.closedReason=null,this.url=null,this.resetReceived(),this.doConnect())}close(){this.tabId=null,this.doDisconnect()}input(t){this.send(JSON.stringify(t))}getWsUrl(){return`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}${this.base}/api/browser/${encodeURIComponent(this.tabId)}/stream`}getLogPrefix(){return"[browser]"}shouldReconnect(){return this.tabId!==null&&this.closedReason===null}handleMessage(t){let n;try{n=JSON.parse(t.data)}catch{return}n.type==="frame"?this.onFrame?.(n):n.type==="nav"?this.url=n.url:n.type==="closed"&&(this.closedReason=n.reason)}}var eu=u("<iconify-icon></iconify-icon> Try again",3),tu=u('<div class="empty svelte-1wn4w5u"><iconify-icon></iconify-icon> <h3 class="svelte-1wn4w5u"> </h3> <p class="svelte-1wn4w5u"> </p> <!></div>',2),nu=u('<span></span> <span class="title svelte-1wn4w5u"> </span> <span class="count svelte-1wn4w5u"> </span> <iconify-icon></iconify-icon>',3),ru=u('<li><button type="button"><span class="row1 svelte-1wn4w5u"><span class="t svelte-1wn4w5u"> </span> <!></span> <span class="u svelte-1wn4w5u"> </span></button></li>'),su=u('<li class="none svelte-1wn4w5u"> </li>'),ou=u('<!> <ul class="svelte-1wn4w5u"></ul>',1),au=u("<!> <!>",1),iu=u("<iconify-icon></iconify-icon>",2),lu=u('<div class="strip svelte-1wn4w5u"><!> <!></div>'),cu=u(`<p class="msg dim svelte-1wn4w5u">Looking for the browser's tabs…</p>`),uu=u('<div class="empty svelte-1wn4w5u"><iconify-icon></iconify-icon> <h3 class="svelte-1wn4w5u">No remote browser set up</h3> <p class="svelte-1wn4w5u">This shows the browser a session drives through an MCP server started with <code class="svelte-1wn4w5u">--browserUrl</code>. None is listed in <code class="svelte-1wn4w5u">~/.claude.json</code>.</p></div>',2),du=u('<div class="empty svelte-1wn4w5u"><iconify-icon></iconify-icon> <h3 class="svelte-1wn4w5u">No tabs open</h3> <p class="svelte-1wn4w5u"> </p></div>',2),vu=u('<p class="msg dim waiting svelte-1wn4w5u"> </p>'),fu=u('<!> <canvas tabindex="0"></canvas>',1),hu=u("<iconify-icon></iconify-icon> Enter",3),pu=u('<form class="typing svelte-1wn4w5u"><!> <!></form>'),mu=u('<div class="browser svelte-1wn4w5u"><!> <div class="stage svelte-1wn4w5u"><!></div> <!></div>');function _u(r,t){Ye(t,!0);const n=(f,w=Nt,T=Nt,Ae=Nt)=>{var W=tu(),Ge=k(W);C(()=>Te(Ge,"icon",w())),ke(Ge,1,"svelte-1wn4w5u");var Fe=c(Ge,2),it=L(Fe,!0),Ot=c(Fe,2),Ht=L(Ot,!0),_=c(Ot,2);pn(_,{size:"sm",onclick:kt,get disabled(){return e(g)},children:(D,ne)=>{var oe=eu(),me=R(oe);Te(me,"icon","mdi:refresh"),ke(me,1,"svelte-1wn4w5u"),ht(),a(D,oe)},$$slots:{default:!0}}),b(W),C(()=>{S(it,T()),S(Ht,Ae())}),a(f,W)},s=5e3,o=500,i=6,l=40;let d=q(null),g=q(!1),P=0;async function E(){const f=++P;v(g,!0);try{const w=t.sessionId?`?session=${encodeURIComponent(t.sessionId)}`:"",T=await fetch(`${t.base}/api/browser/tabs${w}`),Ae=await T.json();if(f!==P)return;if(!T.ok)throw new Error(`HTTP ${T.status}`);Ae.preferred&&Ae.preferred!==K&&(K=Ae.preferred,v(M,null)),v(d,Ae,!0)}catch(w){if(f!==P)return;v(d,{name:e(d)?.name??"the browser",error:`Could not ask claude-mux for the tabs: ${w}`,tabs:[],preferred:null},!0)}finally{f===P&&v(g,!1)}}Be(()=>{if(t.sessionId,!t.active)return;zt(()=>{E()});const f=setInterval(()=>{document.visibilityState==="visible"&&E()},s);return()=>clearInterval(f)});let O=q(null),A=null;Be(()=>{const f=t.tab;!t.active||!f||!e(d)||f===A||e(d).tabs.some(w=>w.id===f)||(A=f,v(O,f,!0),zt(()=>{E().finally(()=>v(O,null))}))});let M=q(null),K=null;const p=h(()=>e(O)&&e(O)===t.tab?null:Xc(e(d),t.tab,e(M))),m=h(()=>e(p)?.id??null);Be(()=>{e(m)&&v(M,e(m),!0)});let j=q(!1),te=q("");const G=h(()=>Yc(e(d)?.tabs??[],e(te)));function Ce(f){t.onPick(f===e(d)?.preferred?null:f),v(M,f,!0),v(j,!1),v(te,"")}function ae(f){try{return new URL(f).host||f}catch{return f}}const Le=f=>f.title||ae(f.url)||"Untitled",ce=new Qc;let $=q(null),X=q(null),Ie=0,qe=0;ce.onFrame=f=>{const w=++Ie,T=new Image;T.onload=()=>{w<qe||!e($)||(qe=w,(e($).width!==T.naturalWidth||e($).height!==T.naturalHeight)&&(e($).width=T.naturalWidth,e($).height=T.naturalHeight),e($).getContext("2d")?.drawImage(T,0,0),(e(X)?.width!==f.width||e(X)?.height!==f.height)&&v(X,{width:f.width,height:f.height},!0))},T.src=`data:image/jpeg;base64,${f.data}`},Be(()=>{const f=e(m),w=t.base;t.active&&f?zt(()=>ce.open(f,w)):zt(()=>{ce.close(),v(X,null)})}),Be(()=>{e(m),zt(()=>{v(X,null),qe=Ie+1,v(z,us,!0),V.clear(),Ee=null,de=null,Oe()})}),Be(()=>{ce.closedReason!==null&&v(X,null)}),so(()=>ce.close()),Be(()=>{t.onUrl(ce.url??e(p)?.url??null)});function at(){if(!e(m)||ce.closedReason!==null||e(d)?.error)return kt();ce.input({type:"reload"})}function kt(){E().then(()=>{t.active&&e(m)&&ce.open(e(m),t.base,!0)})}function ut(f){return e($)&&e(X)?Bc(f.clientX,f.clientY,e($).getBoundingClientRect(),e(X)):null}let se={at:0,x:0,y:0,count:0,button:0};const V=new Map;let z=q(on(us)),he=q(null),Ee=null;function Me(f,w,T,Ae){if(!e($)||!e(he))return f;const W=e(he).getBoundingClientRect(),Ge=e($).offsetWidth,Fe=e($).offsetHeight,it={left:W.left+(W.width-Ge)/2,top:W.top+(W.height-Fe)/2,width:Ge,height:Fe};return Hc(f,w,T,Ae,it,W)}function ye(){const[f,w]=[...V.values()];return{mid:{x:(f.sx+w.sx)/2,y:(f.sy+w.sy)/2},span:Math.hypot(f.sx-w.sx,f.sy-w.sy)||1}}let de=null;function Ve(){de&&ce.input(de),de=null}function et(f){de||requestAnimationFrame(Ve),de=f}function jt(f,w){V.set(f.pointerId,{...w,sx:f.clientX,sy:f.clientY})}function Wt(f,w,T){ce.input({type:"mouse",event:f,...T,button:Uc(w.type==="pointercancel"?se.button:w.button),buttons:w.buttons,clickCount:se.count,modifiers:Jn(w)})}function Qt(f){return{type:"touch",event:f,points:[...V].map(([w,T])=>({id:w,x:T.x,y:T.y}))}}function Xt(f){const w=ut(f);if(!w)return;e($)?.focus({preventScroll:!0});try{e($)?.setPointerCapture(f.pointerId)}catch{}if(Ve(),f.pointerType==="touch"){V.size===1&&!Ee&&ce.input({type:"touch",event:"cancel",points:[]}),jt(f,w),V.size===1&&!Ee?ce.input(Qt("start")):V.size===2&&(Ee={view:e(z),...ye()});return}f.preventDefault();const T=f.timeStamp-se.at<o&&Math.abs(f.clientX-se.x)<i&&Math.abs(f.clientY-se.y)<i;se={at:f.timeStamp,x:f.clientX,y:f.clientY,count:T?se.count%3+1:1,button:f.button},Wt("down",f,w)}function en(f){const w=ut(f);if(w){if(f.pointerType==="touch"){if(!V.has(f.pointerId))return;if(jt(f,w),!Ee)return et(Qt("move"));if(V.size===2){const T=ye();v(z,Me(Ee.view,Ee.mid,T.mid,T.span/Ee.span),!0)}return}et({type:"mouse",event:"move",...w,button:Vc(f.buttons),buttons:f.buttons,modifiers:Jn(f)})}}function pe(f){if(Ve(),f.pointerType==="touch"){if(!V.delete(f.pointerId))return;if(Ee){V.size===0&&(Ee=null);return}ce.input(Qt(f.type==="pointercancel"?"cancel":"end"));return}const w=ut(f);w&&Wt("up",f,w)}Be(()=>{const f=e($);if(!f)return;const w=T=>{const Ae=ut(T);if(!Ae)return;if(T.preventDefault(),T.ctrlKey){const Ge={x:T.clientX,y:T.clientY};v(z,Me(e(z),Ge,Ge,Math.exp(-T.deltaY*.01)),!0);return}const W=T.deltaMode===WheelEvent.DOM_DELTA_LINE?l:1;ce.input({type:"wheel",...Ae,deltaX:T.deltaX*W,deltaY:T.deltaY*W,modifiers:Jn(T)})};return f.addEventListener("wheel",w,{passive:!1}),()=>f.removeEventListener("wheel",w)});function tt(f){const w=ds(f,f.type==="keyup"?"up":"down");w&&(f.preventDefault(),ce.input(w))}function vt(f){const w=f.clipboardData?.getData("text/plain");w&&(f.preventDefault(),ce.input({type:"text",text:w}))}function bt(f,w){const T={key:f,code:f,keyCode:w,altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1};for(const Ae of["down","up"]){const W=ds(T,Ae);W&&ce.input(W)}}let Ct=q(!1),$t=q(""),tn="",nn=q(null);function F(){const{backspaces:f,insert:w}=Gc(tn,e($t));for(let T=0;T<f;T++)bt("Backspace",8);w&&ce.input({type:"text",text:w}),tn=e($t)}function ie(f){f.isComposing||(f.key==="Enter"?(f.preventDefault(),yt()):f.key==="Backspace"&&e($t)===""?bt("Backspace",8):f.key==="Tab"&&(f.preventDefault(),bt("Tab",9),Oe()))}function Oe(){v($t,tn="",!0)}function yt(){bt("Enter",13),Oe(),e(nn)?.focus()}Be(()=>{e(Ct)&&e(nn)?.focus()});var Mt={reload:at},Tt=mu(),we=k(Tt);{var x=f=>{var w=lu(),T=k(w);Qe(T,()=>zs,(W,Ge)=>{Ge(W,{get open(){return e(j)},set open(Fe){v(j,Fe,!0)},children:(Fe,it)=>{var Ot=au(),Ht=R(Ot);Qe(Ht,()=>Xs,(D,ne)=>{ne(D,{class:"tab-trigger","aria-label":"Choose a tab",children:(oe,me)=>{var We=nu(),Pt=R(We);let Q;var Y=c(Pt,2),ge=L(Y,!0),xe=c(Y,2),je=L(xe),pt=c(xe,2);Te(pt,"icon","mdi:chevron-down"),C(mt=>{Q=ke(Pt,1,"live svelte-1wn4w5u",null,Q,{on:ce.connected&&e(X)!==null}),S(ge,mt),S(je,`${e(d).tabs.length??""} tabs`)},[()=>e(p)?Le(e(p)):"Untitled"]),a(oe,We)},$$slots:{default:!0}})});var _=c(Ht,2);Qe(_,()=>qs,(D,ne)=>{ne(D,{class:"tab-picker",align:"start",sideOffset:4,children:(oe,me)=>{var We=ou(),Pt=R(We);Vn(Pt,{class:"filter",type:"search",placeholder:"Find a tab…","aria-label":"Find a tab",autocomplete:"off",get value(){return e(te)},set value(Y){v(te,Y,!0)}});var Q=c(Pt,2);Bt(Q,21,()=>e(G),Y=>Y.id,(Y,ge)=>{var xe=ru(),je=k(xe);let pt;var mt=k(je),ft=k(mt),_t=L(ft,!0),xt=c(ft,2);{var Ke=Xe=>{Ho(Xe,{variant:"secondary",title:"The tab this session last opened or selected",children:(At,H)=>{ht();var ee=Kt("Session");a(At,ee)},$$slots:{default:!0}})};I(xt,Xe=>{e(ge).id===e(d).preferred&&Xe(Ke)})}b(mt);var dt=c(mt,2),It=L(dt,!0);b(je),b(xe),C(Xe=>{pt=ke(je,1,"svelte-1wn4w5u",null,pt,{current:e(ge).id===e(m)}),S(_t,Xe),S(It,e(ge).url)},[()=>Le(e(ge))]),ot("click",je,()=>Ce(e(ge).id)),a(Y,xe)},Y=>{var ge=su(),xe=L(ge);C(()=>S(xe,`No tab matches “${e(te)??""}”.`)),a(Y,ge)}),b(Q),a(oe,We)},$$slots:{default:!0}})}),a(Fe,Ot)},$$slots:{default:!0}})});var Ae=c(T,2);un(Ae,{class:"kbd",size:"sm",variant:"outline",title:"Type into the page","aria-label":"Type into the page",get pressed(){return e(Ct)},set pressed(W){v(Ct,W,!0)},children:(W,Ge)=>{var Fe=iu();Te(Fe,"icon","mdi:keyboard-outline"),a(W,Fe)},$$slots:{default:!0}}),b(w),a(f,w)};I(we,f=>{e(d)?.name&&!e(d).error&&e(d).tabs.length>0&&f(x)})}var U=c(we,2),y=k(U);{var N=f=>{var w=cu();a(f,w)},Z=f=>{var w=uu(),T=k(w);Te(T,"icon","mdi:monitor-off"),ke(T,1,"svelte-1wn4w5u"),ht(4),b(w),a(f,w)},_e=f=>{n(f,()=>"mdi:lan-disconnect",()=>"Can't reach the browser",()=>e(d).error)},Je=f=>{var w=du(),T=k(w);Te(T,"icon","mdi:tab-unselected"),ke(T,1,"svelte-1wn4w5u");var Ae=c(T,4),W=L(Ae);b(w),C(()=>S(W,`The browser behind ${e(d).name??""} is running with no page to show.`)),a(f,w)},nt=f=>{n(f,()=>"mdi:tab-remove",()=>"The view ended",()=>ce.closedReason)},Se=f=>{var w=fu(),T=R(w);{var Ae=it=>{var Ot=vu(),Ht=L(Ot);C(_=>S(Ht,`Connecting to ${_??""}…`),[()=>ae(e(p).url)]),a(it,Ot)};I(T,it=>{e(X)||it(Ae)})}var W=c(T,2);let Ge,Fe;mn(W,it=>v($,it),()=>e($)),C(()=>{ue(W,"aria-label",`Live view of ${e(p).title||e(p).url}`),Ge=ke(W,1,"svelte-1wn4w5u",null,Ge,{blank:!e(X)}),Fe=Yt(W,"",Fe,{"--ratio":e(X)?e(X).width/e(X).height:1.6,transform:e(z).scale===1?null:`translate(${e(z).x}px, ${e(z).y}px) scale(${e(z).scale})`})}),ot("pointerdown",W,Xt),ot("pointermove",W,en),ot("pointerup",W,pe),fn("pointercancel",W,pe),ot("contextmenu",W,it=>it.preventDefault()),ot("keydown",W,tt),ot("keyup",W,tt),fn("paste",W,vt),a(f,w)};I(y,f=>{e(d)?e(d).name?e(d).error?f(_e,2):e(p)?ce.closedReason?f(nt,4):f(Se,-1):f(Je,3):f(Z,1):f(N)})}b(U),mn(U,f=>v(he,f),()=>e(he));var rt=c(U,2);{var wt=f=>{var w=pu(),T=k(w);Vn(T,{oninput:F,onkeydown:ie,class:"field",type:"text",placeholder:"Tap a field in the page, then type here","aria-label":"Type into the page",autocomplete:"off",autocapitalize:"off",autocorrect:"off",spellcheck:!1,enterkeyhint:"enter",get ref(){return e(nn)},set ref(W){v(nn,W,!0)},get value(){return e($t)},set value(W){v($t,W,!0)}});var Ae=c(T,2);pn(Ae,{type:"submit",size:"sm",variant:"secondary",title:"Press Enter in the page",children:(W,Ge)=>{var Fe=hu(),it=R(Fe);Te(it,"icon","mdi:keyboard-return"),ht(),a(W,Fe)},$$slots:{default:!0}}),b(w),fn("submit",w,W=>{W.preventDefault(),yt()}),a(f,w)};I(rt,f=>{e(Ct)&&e(p)&&!e(d)?.error&&f(wt)})}return b(Tt),a(r,Tt),$e(Mt)}Ln(["click","pointerdown","pointermove","pointerup","contextmenu","keydown","keyup"]);var hs=u("<iconify-icon></iconify-icon>",2),gu=u('<span class="dot svelte-1epl13d"></span> <span class="proc svelte-1epl13d"> </span> <!>',1),bu=u('<div class="detected svelte-1epl13d"><span class="label svelte-1epl13d">Detected dev servers</span> <!></div>'),ps=u('<p class="msg err svelte-1epl13d"> </p>'),yu=u(`<p class="msg dim svelte-1epl13d">Looking for the project's URLs…</p>`),wu=u('<h3 class="svelte-1epl13d">No prod URL</h3> <p class="svelte-1epl13d">Name one as <code class="svelte-1epl13d">urls.prod</code> in <code class="svelte-1epl13d">.claude-mux.json</code> at the repo root.</p>',1),xu=u('<h3 class="svelte-1epl13d">No dev server running</h3> <p class="svelte-1epl13d">Nothing inside <code class="svelte-1epl13d"> </code> is serving HTML. Start the dev server, or name one as <code class="svelte-1epl13d">urls.dev</code> in <code class="svelte-1epl13d">.claude-mux.json</code>.</p>',1),ku=u('<h3 class="svelte-1epl13d">Nothing to show yet</h3> <p class="svelte-1epl13d">Type a URL above, start a dev server in the project, or commit a <code class="svelte-1epl13d">.claude-mux.json</code>:</p> <pre class="svelte-1epl13d"></pre>',1),Pu=u('<p class="err svelte-1epl13d"> </p>'),Tu=u('<div class="empty svelte-1epl13d"><iconify-icon></iconify-icon> <!> <!></div>',2),ms=u('<p class="msg dim svelte-1epl13d"> </p>'),Su=u("<iconify-icon></iconify-icon> Open in new tab",3),Eu=u('<p class="dim svelte-1epl13d">To show it here, map the port over HTTPS on this machine:</p> <div class="cmd svelte-1epl13d"><code class="svelte-1epl13d"> </code> <!></div>',1),Cu=u('<div class="empty card svelte-1epl13d"><iconify-icon></iconify-icon> <h3 class="svelte-1epl13d"> </h3> <p class="svelte-1epl13d"> </p> <!> <!></div>',2),Iu=u('<iframe title="Web preview" allow="clipboard-read; clipboard-write; fullscreen" class="svelte-1epl13d"></iframe>'),Mu=u('<!> <div class="view svelte-1epl13d"><!></div>',1),Ou=u('<div class="web svelte-1epl13d"><form class="bar svelte-1epl13d"><div class="seg svelte-1epl13d" role="group" aria-label="Site"><!> <!> <!></div> <!></form> <!></div>');function Au(r,t){Ye(t,!0);const n=5e3,s=h(()=>t.session?.id??null);let o=q(null),i=q(null),l=0;async function d(pe){const tt=++l;try{const vt=await fetch(`${Sn(t.base,pe)}/web`),bt=await vt.json();if(tt!==l)return;if(!vt.ok)throw new Error(bt.error??`HTTP ${vt.status}`);v(o,bt,!0),v(i,null)}catch(vt){tt===l&&v(i,vt instanceof Error?vt.message:String(vt),!0)}}Be(()=>{const pe=e(s);if(!pe||!t.active)return;zt(()=>{d(pe)});const tt=setInterval(()=>{document.visibilityState==="visible"&&d(pe)},n);return()=>clearInterval(tt)});const g=h(()=>!!e(o)?.urls.dev),P=h(()=>e(g)||e(o)?.detected.length?"dev":e(o)?.urls.prod?"prod":null),E=h(()=>t.params.url??e(P)),O=h(()=>e(E)===mr),A=h(()=>e(E)&&!e(O)?ls(e(E),e(o)):null);let M=q(null),K=q(null),p=!1;Be(()=>{if(!t.active||p||!e(s))return;p=!0;const pe=zt(()=>fs.get(e(s)));!t.params.url&&pe&&t.setParams({url:pe})}),Be(()=>{t.params.url&&fs.set(e(s),t.params.url)});let m=q(on([]));function j(pe){pe!==e(E)&&(e(E)&&v(m,[...e(m),e(E)],!0),t.setParams({url:pe,tab:null}))}function te(){const pe=e(m).at(-1);pe&&(v(m,e(m).slice(0,-1),!0),t.setParams({url:pe,tab:null}))}let G=q("");Be(()=>{v(G,(e(O)?e(K):e(A))??"",!0)});function Ce(pe){if(pe.preventDefault(),e(O))return;const tt=cs(e(G));if(!tt){tr.error("Not an http(s) URL",{description:e(G)});return}const vt=["prod","dev"].find(bt=>{const Ct=ls(bt,e(o));return Ct!==null&&cs(Ct)===tt});j(vt??tt)}const ae=h(()=>{if(!e(A)||!e(o))return null;try{return Fc(e(A),{page:location,machine:t.machineHost,serves:e(o).serves,detected:e(o).detected})}catch{return"invalid"}}),Le=h(()=>e(ae)!=="invalid"&&e(ae)?.kind==="frame"?e(ae).src:null),ce=h(()=>e(O)?e(K):e(ae)==="invalid"?null:e(ae)?e(ae).kind==="frame"?e(ae).src:e(ae).open:e(A));let $=q(null);Be(()=>{const pe=e(Le);if(!pe)return;let tt=!1;const vt=new URLSearchParams({url:pe,origin:location.origin});return fetch(`${t.base}/api/web/frame?${vt}`).then(bt=>bt.json()).catch(bt=>({embeddable:null,reason:String(bt)})).then(bt=>{tt||v($,{src:pe,result:bt},!0)}),()=>tt=!0});const X=h(()=>e($)&&e($).src===e(Le)?e($).result:null),Ie=h(()=>e(ae)==="invalid"?null:e(ae)?.kind==="card"?e(ae):e(ae)&&e(X)?.embeddable===!1?{reason:`The site forbids framing. ${e(X).reason}`,open:e(ae).src}:null);let qe=q(0);function at(){e(O)&&e(M)?.reload(),e(Le)&&Ps(qe),e(s)&&d(e(s))}const kt=pe=>zr(pe);Be(()=>{t.setActions([{icon:"mdi:arrow-left",label:"Back",disabled:e(m).length===0,run:te},{icon:"mdi:refresh",label:"Reload",disabled:!e(s),run:at},{icon:"mdi:open-in-new",label:"Open in new tab",disabled:!e(ce),run:()=>e(ce)&&window.open(e(ce),"_blank","noopener,noreferrer")}])});function ut(pe){try{return new URL(pe).host}catch{return pe}}var se=Ou(),V=k(se),z=k(V),he=k(z),Ee=()=>e(E)==="prod",Me=pe=>pe&&j("prod");{let pe=h(()=>!e(o)?.urls.prod),tt=h(()=>e(o)?.urls.prod??"No prod URL in .claude-mux.json");un(he,{size:"sm",get disabled(){return e(pe)},get title(){return e(tt)},get pressed(){return Ee()},set pressed(vt){Me(vt)},children:(vt,bt)=>{ht();var Ct=Kt("Prod");a(vt,Ct)},$$slots:{default:!0}})}var ye=c(he,2),de=()=>e(E)==="dev"||!e(g)&&!!e(o)?.detected.some(pe=>pe.url===e(E)),Ve=pe=>pe&&j("dev");{let pe=h(()=>!e(g)&&!e(o)?.detected.length),tt=h(()=>e(o)?.urls.dev??(e(o)?.detected.length?"A dev server found running in the project":"No dev server found"));un(ye,{size:"sm",get disabled(){return e(pe)},get title(){return e(tt)},get pressed(){return de()},set pressed(vt){Ve(vt)},children:(vt,bt)=>{ht();var Ct=Kt("Dev");a(vt,Ct)},$$slots:{default:!0}})}var et=c(ye,2);{var jt=pe=>{var tt=()=>e(O),vt=bt=>bt&&j(mr);{let bt=h(()=>`The browser sessions drive through ${e(o).browser}, live`);un(pe,{size:"sm",get title(){return e(bt)},get pressed(){return tt()},set pressed(Ct){vt(Ct)},children:(Ct,$t)=>{ht();var tn=Kt("Browser");a(Ct,tn)},$$slots:{default:!0}})}};I(et,pe=>{e(o)?.browser&&pe(jt)})}b(z);var Wt=c(z,2);Vn(Wt,{class:"url",type:"text",inputmode:"url",placeholder:"Type a URL…","aria-label":"URL",get readonly(){return e(O)},autocomplete:"off",spellcheck:!1,get value(){return e(G)},set value(pe){v(G,pe,!0)}}),b(V);var Qt=c(V,2);{var Xt=pe=>{mn(_u(pe,{get sessionId(){return e(s)},get base(){return t.base},get active(){return t.active},get tab(){return t.params.tab},onPick:tt=>t.setParams({tab:tt}),onUrl:tt=>v(K,tt,!0)}),tt=>v(M,tt,!0),()=>e(M))},en=pe=>{var tt=Mu(),vt=R(tt);{var bt=we=>{var x=bu(),U=c(k(x),2);Bt(U,19,()=>e(o).detected,y=>y.port,(y,N,Z)=>{var _e=()=>e(A)===e(N).url,Je=nt=>nt&&j(e(Z)===0?"dev":e(N).url);{let nt=h(()=>`${e(N).process} (pid ${e(N).pid}) · ${e(N).url}`);un(y,{variant:"outline",size:"sm",class:"chip",get title(){return e(nt)},get pressed(){return _e()},set pressed(Se){Je(Se)},children:(Se,rt)=>{var wt=gu(),f=c(R(wt)),w=c(f),T=L(w,!0),Ae=c(w,2);{var W=Ge=>{var Fe=hs();Te(Fe,"icon","mdi:lock-outline"),Te(Fe,"title","127.0.0.1 only"),a(Ge,Fe)};I(Ae,Ge=>{e(N).loopbackOnly&&Ge(W)})}C(()=>{S(f,`:${e(N).port??""} `),S(T,e(N).process)}),a(Se,wt)},$$slots:{default:!0}})}}),b(x),a(we,x)};I(vt,we=>{e(o)&&!e(g)&&e(o).detected.length>0&&we(bt)})}var Ct=c(vt,2),$t=k(Ct);{var tn=we=>{var x=ps(),U=L(x,!0);C(()=>S(U,e(i))),a(we,x)},nn=we=>{var x=yu();a(we,x)},F=we=>{var x=Tu(),U=k(x);Te(U,"icon","mdi:web-off"),ke(U,1,"svelte-1epl13d");var y=c(U,2);{var N=Se=>{var rt=wu();ht(2),a(Se,rt)},Z=Se=>{var rt=xu(),wt=c(R(rt),2),f=c(k(wt)),w=L(f,!0);ht(5),b(wt),C(()=>S(w,e(o)?.root)),a(Se,rt)},_e=Se=>{var rt=ku(),wt=c(R(rt),4);wt.textContent='{ "urls": { "prod": "https://…", "dev": "http://localhost:5173" } }',a(Se,rt)};I(y,Se=>{e(E)==="prod"?Se(N):e(E)==="dev"?Se(Z,1):Se(_e,-1)})}var Je=c(y,2);{var nt=Se=>{var rt=Pu(),wt=L(rt);C(()=>S(wt,`.claude-mux.json: ${e(o).configError??""}`)),a(Se,rt)};I(Je,Se=>{e(o)?.configError&&Se(nt)})}b(x),a(we,x)},ie=we=>{var x=ps(),U=L(x);C(()=>S(U,`Not a URL: ${e(A)??""}`)),a(we,x)},Oe=we=>{var x=ms(),U=L(x);C(()=>S(U,`Resolving ${e(A)??""}…`)),a(we,x)},yt=we=>{const x=h(()=>e(Ie).command);var U=Cu(),y=k(U);Te(y,"icon","mdi:application-brackets-outline"),ke(y,1,"svelte-1epl13d");var N=c(y,2),Z=L(N),_e=c(N,2),Je=L(_e,!0),nt=c(_e,2);pn(nt,{get href(){return e(Ie).open},target:"_blank",rel:"noopener noreferrer",size:"sm",children:(wt,f)=>{var w=Su(),T=R(w);Te(T,"icon","mdi:open-in-new"),ke(T,1,"svelte-1epl13d"),ht(),a(wt,w)},$$slots:{default:!0}});var Se=c(nt,2);{var rt=wt=>{var f=Eu(),w=c(R(f),2),T=k(w),Ae=L(T,!0),W=c(T,2);pn(W,{variant:"ghost",size:"icon-sm",title:"Copy command","aria-label":"Copy command",onclick:()=>kt(e(x)),children:(Ge,Fe)=>{var it=hs();Te(it,"icon","mdi:content-copy"),a(Ge,it)},$$slots:{default:!0}}),b(w),C(()=>S(Ae,e(x))),a(wt,f)};I(Se,wt=>{e(x)&&wt(rt)})}b(U),C(wt=>{S(Z,`Can't show ${wt??""} here`),S(Je,e(Ie).reason)},[()=>ut(e(Ie).open)]),a(we,U)},Mt=we=>{var x=ms(),U=L(x);C(y=>S(U,`Checking ${y??""}…`),[()=>ut(e(Le))]),a(we,x)},Tt=we=>{var x=fe(),U=R(x);Bs(U,()=>`${e(Le)}\0${e(qe)}`,y=>{var N=Iu();C(()=>ue(N,"src",e(Le))),a(y,N)}),a(we,x)};I($t,we=>{e(i)&&!e(o)?we(tn):!e(o)&&!t.params.url?we(nn,1):e(A)?e(ae)==="invalid"?we(ie,3):e(ae)?e(Ie)?we(yt,5):e(Le)&&!e(X)?we(Mt,6):e(Le)&&we(Tt,7):we(Oe,4):we(F,2)})}b(Ct),a(pe,tt)};I(Qt,pe=>{e(O)?pe(Xt):pe(en,-1)})}b(se),fn("submit",V,Ce),a(r,se),$e()}var Lu=u('<button type="button"><iconify-icon></iconify-icon> <span class="svelte-oq17no"> </span></button>',2),Du=u('<nav class="refs svelte-oq17no" aria-label="Pull requests and issues"></nav>'),Ru=u(`<p class="svelte-oq17no">Looking for this session's pull request…</p>`),Nu=u('<p class="svelte-oq17no">This session is not in a GitHub repo.</p>'),ju=u('<p class="svelte-oq17no">No pull request for this branch yet. Click a link to an issue or pull request in the conversation to open it here.</p>'),qu=u('<div class="empty svelte-oq17no"><iconify-icon></iconify-icon> <!></div>',2),zu=u(`<p class="svelte-oq17no">The GitHub CLI is not signed in on this session's machine. Run <code class="svelte-oq17no">gh auth login</code> there to read it here.</p>`),_s=u('<p class="svelte-oq17no"> </p>'),Fu=u('<div class="empty svelte-oq17no"><iconify-icon></iconify-icon> <!> <a class="out svelte-oq17no" target="_blank" rel="noopener">Open on github.com <iconify-icon></iconify-icon></a></div>',2),Bu=u('<div class="ghost svelte-oq17no" aria-busy="true" aria-label="Loading"><span class="svelte-oq17no"></span> <span class="svelte-oq17no"></span> <span class="svelte-oq17no"></span> <span class="gap svelte-oq17no"></span> <span class="svelte-oq17no"></span> <span class="svelte-oq17no"></span></div>'),Ku=u('<span class="stale svelte-oq17no" title="GitHub did not answer the last read; this is the one before">not current</span>'),Hu=u('<span class="mini svelte-oq17no"><span class="add svelte-oq17no"> </span> <span class="del svelte-oq17no"> </span></span>'),Wu=u('<span class="who svelte-oq17no"> </span>'),Uu=u('<span class="svelte-oq17no"> </span>'),Vu=u('<p class="branch svelte-oq17no"><span class="names svelte-oq17no"><span class="b svelte-oq17no"> </span> <iconify-icon></iconify-icon> <span class="b svelte-oq17no"> </span></span> <span class="nums svelte-oq17no"><span class="add svelte-oq17no"> </span> <span class="del svelte-oq17no"> </span> <span class="svelte-oq17no"> </span></span></p>',2),Gu=u('<span class="label svelte-oq17no"> </span>'),Xu=u('<p class="labels svelte-oq17no"></p>'),Yu=u('<span class="when svelte-oq17no"> </span>'),$u=u('<div><iconify-icon></iconify-icon> <span class="who svelte-oq17no"> </span> <span class="word svelte-oq17no"> </span> <!></div>',2),Ju=u('<div class="fact quiet svelte-oq17no"><iconify-icon></iconify-icon> <span class="word svelte-oq17no"> </span></div>',2),Zu=u('<a target="_blank" rel="noopener" class="svelte-oq17no"> </a>'),Qu=u('<span class="name svelte-oq17no"> </span>'),ed=u('<li><iconify-icon></iconify-icon> <!> <span class="status svelte-oq17no"> </span></li>',2),gs=u('<button type="button" class="more svelte-oq17no"> </button>'),td=u('<ul class="checklist svelte-oq17no"></ul> <!>',1),nd=u('<button type="button"><iconify-icon></iconify-icon> <span class="word svelte-oq17no"> </span> <iconify-icon></iconify-icon></button> <!>',3),rd=u('<section class="facts svelte-oq17no" aria-label="Reviews and checks"><!> <!> <!></section>'),sd=u('<p class="none svelte-oq17no">No description.</p>'),od=u('<p class="none svelte-oq17no">The comments could not be read.</p>'),ad=u('<a class="when svelte-oq17no" target="_blank" rel="noopener"> </a>'),id=u('<div><p class="c-head svelte-oq17no"><span class="who svelte-oq17no"> </span> <!></p> <div></div> <button type="button" class="more showmore svelte-oq17no"> </button></div>'),ld=u('<button type="button" class="more older svelte-oq17no"> </button>'),cd=u('<a class="more older svelte-oq17no" target="_blank" rel="noopener"> </a>'),ud=u('<header><div class="line1 svelte-oq17no"><span class="state svelte-oq17no"><iconify-icon></iconify-icon> </span> <a class="num svelte-oq17no" target="_blank" rel="noopener" title="Open on GitHub"> </a> <!> <!></div> <h2 class="svelte-oq17no"> </h2> <div class="fold svelte-oq17no"><div class="fold-in svelte-oq17no"><p class="meta svelte-oq17no"><!> <!></p> <!> <!></div></div></header> <div class="scroll svelte-oq17no"><!> <article class="body markdown svelte-oq17no"><!></article> <section class="talk svelte-oq17no" aria-label="Comments"><div class="talk-head svelte-oq17no"><span class="svelte-oq17no"> </span> <!></div> <!> <!> <!></section></div> <!>',3),dd=u('<div class="gh svelte-oq17no"><!> <!></div>');function vd(r,t){Ye(t,!0);const n=6e4,s=10,o=6;let i=q(null);const l=h(()=>t.session?.id??null);Be(()=>{const F=e(l);if(!F||!t.active)return;const ie=Sn(t.base,F);zt(()=>{e(i)||Wo(ie).then(Oe=>{e(l)===F&&v(i,Oe,!0)})})});const d=h(()=>lr(t.params.ref)),g=h(()=>{if(!e(i)?.repo)return null;const F=e(i).pull??e(i).issue;return F?{repo:e(i).repo,number:F}:null}),P=h(()=>e(d)??e(g)),E=h(()=>e(P)?zn(e(P).repo,e(P).number):null);function O(F){F!==t.params.ref&&t.setParams({ref:F},{push:!0})}const A=h(()=>`gh-pane-recent:${t.base}|${t.target}`);let M=q(on([]));Be(()=>{const F=e(A);try{const ie=JSON.parse(localStorage.getItem(F)??"[]");v(M,Array.isArray(ie)?ie.filter(Oe=>typeof Oe=="string"&&lr(Oe)):[],!0)}catch{v(M,[],!0)}}),Be(()=>{const F=e(E);F&&zt(()=>{if(e(M)[0]!==F){v(M,[F,...e(M).filter(ie=>ie!==F)].slice(0,o),!0);try{localStorage.setItem(e(A),JSON.stringify(e(M)))}catch{}}})});const K=h(()=>{const F=[],ie=e(i)?.repo;ie&&e(i)?.pull&&F.push({ref:zn(ie,e(i).pull),label:`#${e(i).pull}`,icon:"mdi:source-branch",hint:"This branch's pull request"}),ie&&e(i)?.issue&&F.push({ref:zn(ie,e(i).issue),label:`#${e(i).issue}`,icon:"mdi:account-hard-hat-outline",hint:"The issue this worker owns"});for(const Oe of e(M)){if(F.some(Tt=>Tt.ref===Oe))continue;const yt=lr(Oe),Mt=yt.repo.toLowerCase()===ie?.toLowerCase();F.push({ref:Oe,label:Mt?`#${yt.number}`:Oe,icon:"mdi:history",hint:`Opened lately: ${Oe}`})}return F});let p=q(null),m=q(!1),j=0;async function te(F,ie,Oe=!1){const yt=++j;v(m,!0);const Mt=await Vo(t.base,F,ie,Oe);yt===j&&((Mt.item||!e(p)?.item||zn(e(p).item.repo,e(p).item.number)!==zn(F,ie))&&v(p,Mt,!0),v(m,!1))}Be(()=>{const F=e(P);F&&zt(()=>{const ie=Uo(t.base,F.repo,F.number);v(p,ie,!0),v(Ee,0),v(Me,!1),v(se,!1),v(V,!1),v(ye,new Set,!0),e(at)?.scrollTo({top:0}),te(F.repo,F.number)})}),Be(()=>{const F=e(P);if(!F||!t.active)return;const ie=setInterval(()=>{te(F.repo,F.number)},n);return()=>clearInterval(ie)});const G=h(()=>e(p)?.item??null),Ce=h(()=>e(G)&&Go(e(G))),ae=h(()=>e(G)?.pull??null),Le=3e4;let ce=q(!1),$=q(!1);const X=h(()=>!!e(P));Be(()=>{const F=t.base;if(v(ce,!1),!t.active||!e(X))return;const ie=()=>{$c(F).then(yt=>t.base===F&&v(ce,yt,!0))};ie();const Oe=setInterval(()=>document.visibilityState==="visible"&&ie(),Le);return()=>clearInterval(Oe)});async function Ie(F){const ie={base:t.base,ref:e(E)};v($,!0);const Oe=await Jc(t.base,F);v($,!1),!(!t.active||t.base!==ie.base||e(E)!==ie.ref)&&("tab"in Oe?t.openPane("web",{url:mr,tab:Oe.tab}):tr.error("Could not open it in the browser",{description:Oe.error}))}Be(()=>{const F=e(P);if(!F){t.setActions([]);return}const ie=e(G)?.url??qe(F.repo,F.number);t.setActions([{icon:"mdi:refresh",label:"Read again",run:()=>{te(F.repo,F.number,!0)},disabled:e(m)},...e(ce)?[{icon:"mdi:monitor-share",label:"Open in Browser",run:()=>{Ie(ie)},disabled:e($)}]:[],{icon:"mdi:open-in-new",label:"Open on GitHub",run:()=>window.open(ie,"_blank","noopener")}])});function qe(F,ie){return`https://github.com/${F}/issues/${ie}`}let at=q(null),kt=q(!1);const ut={approved:{icon:"mdi:check-circle",word:"Approved",tone:"good"},changes_requested:{icon:"mdi:file-document-edit-outline",word:"Changes requested",tone:"bad"},commented:{icon:"mdi:comment-outline",word:"Commented",tone:"quiet"}};let se=q(!1),V=q(!1);const z=h(()=>e(ae)?Zo(e(ae).checks):null),he=h(()=>e(z)?e(z).failing.length?"bad":e(z).running.length?"busy":"good":"quiet");let Ee=q(0),Me=q(!1),ye=q(on(new Set));const de=h(()=>e(G)?.comments?Yo(e(G).comments):null),Ve=h(()=>e(de)?[...e(Me)?[...e(de).people,...e(de).bots].sort((ie,Oe)=>(ie.at??0)-(Oe.at??0)):e(de).people].reverse():[]),et=h(()=>e(Ve).slice(0,s+e(Ee))),jt=h(()=>e(G)?Math.max(0,e(G).comments_total-(e(G).comments?.length??0)):0);function Wt(F){return Tr(F,{github:{bare:!0},githubBody:{media:$o(t.base)}})}function Qt(F){const ie=()=>F.classList.toggle("long",F.scrollHeight>F.clientHeight+24),Oe=new ResizeObserver(ie);return Oe.observe(F),ie(),{destroy:()=>Oe.disconnect()}}function Xt(F){const ie=new Set(e(ye));ie.has(F.id)?ie.delete(F.id):ie.add(F.id),v(ye,ie,!0)}function en(F){if(!F)return"";const ie=Ts(F,$n.now);return ie==="now"?"just now":`${ie} ago`}function pe(F){return`--label: ${/^[0-9a-f]{6}$/i.test(F)?`#${F}`:"#78716c"}`}var tt=dd(),vt=k(tt);{var bt=F=>{var ie=Du();Bt(ie,21,()=>e(K),Oe=>Oe.ref,(Oe,yt)=>{var Mt=Lu();let Tt;var we=k(Mt);C(()=>Te(we,"icon",e(yt).icon)),ke(we,1,"svelte-oq17no");var x=c(we,2),U=L(x,!0);b(Mt),C(()=>{Tt=ke(Mt,1,"ref svelte-oq17no",null,Tt,{on:e(yt).ref===e(E)}),ue(Mt,"title",e(yt).hint),S(U,e(yt).label)}),ot("click",Mt,()=>O(e(yt).ref)),a(Oe,Mt)}),b(ie),a(F,ie)};I(vt,F=>{e(K).length>0&&F(bt)})}var Ct=c(vt,2);{var $t=F=>{var ie=qu(),Oe=k(ie);Te(Oe,"icon","mdi:github"),ke(Oe,1,"svelte-oq17no");var yt=c(Oe,2);{var Mt=x=>{var U=Ru();a(x,U)},Tt=x=>{var U=Nu();a(x,U)},we=x=>{var U=ju();a(x,U)};I(yt,x=>{e(i)?e(i).repo?x(we,-1):x(Tt,1):x(Mt)})}b(ie),a(F,ie)},tn=F=>{var ie=fe(),Oe=R(ie);{var yt=Tt=>{var we=Fu(),x=k(we);Te(x,"icon","mdi:github"),ke(x,1,"svelte-oq17no");var U=c(x,2);{var y=nt=>{var Se=zu();a(nt,Se)},N=nt=>{var Se=_s(),rt=L(Se);C(()=>S(rt,`GitHub has no ${e(P).repo??""}#${e(P).number??""}, or this machine cannot see it.`)),a(nt,Se)},Z=nt=>{var Se=_s(),rt=L(Se);C(()=>S(rt,`GitHub did not answer for ${e(P).repo??""}#${e(P).number??""}.`)),a(nt,Se)};I(U,nt=>{e(p).error==="no-gh"?nt(y):e(p).error==="not-found"?nt(N,1):nt(Z,-1)})}var _e=c(U,2),Je=c(k(_e));Te(Je,"icon","mdi:open-in-new"),ke(Je,1,"svelte-oq17no"),b(_e),b(we),C(nt=>ue(_e,"href",nt),[()=>qe(e(P).repo,e(P).number)]),a(Tt,we)},Mt=Tt=>{var we=Bu(),x=k(we);Yt(x,"",{},{width:"40%"});var U=c(x,2);Yt(U,"",{},{width:"85%"});var y=c(U,2);Yt(y,"",{},{width:"60%"});var N=c(y,2);Yt(N,"",{},{width:"100%"});var Z=c(N,2);Yt(Z,"",{},{width:"92%"});var _e=c(Z,2);Yt(_e,"",{},{width:"70%"}),b(we),a(Tt,we)};I(Oe,Tt=>{e(p)?.error?Tt(yt):Tt(Mt,-1)})}a(F,ie)},nn=F=>{var ie=ud(),Oe=R(ie);let yt,Mt;var Tt=k(Oe),we=k(Tt),x=k(we);C(()=>Te(x,"icon",e(Ce).icon)),ke(x,1,"svelte-oq17no");var U=c(x);b(we);var y=c(we,2),N=L(y),Z=c(y,2);{var _e=H=>{var ee=Ku();a(H,ee)};I(Z,H=>{e(p)?.stale&&H(_e)})}var Je=c(Z,2);{var nt=H=>{var ee=Hu(),He=k(ee),J=L(He),re=c(He,2),Pe=L(re);b(ee),C(()=>{S(J,`+${e(ae).additions??""}`),S(Pe,`−${e(ae).deletions??""}`)}),a(H,ee)};I(Je,H=>{e(kt)&&e(ae)&&H(nt)})}b(Tt);var Se=c(Tt,2),rt=L(Se,!0),wt=c(Se,2),f=k(wt),w=k(f),T=k(w);{var Ae=H=>{var ee=Wu(),He=L(ee,!0);C(()=>S(He,e(G).author)),a(H,ee)};I(T,H=>{e(G).author&&H(Ae)})}var W=c(T,2);{var Ge=H=>{var ee=Uu(),He=L(ee);C((J,re)=>{ue(ee,"title",J),S(He,`updated ${re??""}`)},[()=>new Date(e(G).updated_at).toLocaleString(),()=>en(e(G).updated_at)]),a(H,ee)};I(W,H=>{e(G).updated_at&&H(Ge)})}b(w);var Fe=c(w,2);{var it=H=>{var ee=Vu(),He=k(ee),J=k(He),re=L(J,!0),Pe=c(J,2);Te(Pe,"icon","mdi:arrow-left"),ke(Pe,1,"svelte-oq17no");var lt=c(Pe,2),Ze=L(lt,!0);b(He);var ct=c(He,2),st=k(ct),Ue=L(st),gt=c(st,2),Dt=L(gt),le=c(gt,2),ve=L(le);b(ct),b(ee),C(()=>{ue(He,"title",`${e(ae).base??""} ← ${e(ae).head??""}`),S(re,e(ae).base),S(Ze,e(ae).head),S(Ue,`+${e(ae).additions??""}`),S(Dt,`−${e(ae).deletions??""}`),S(ve,`${e(ae).files??""} ${e(ae).files===1?"file":"files"}`)}),a(H,ee)};I(Fe,H=>{e(ae)&&H(it)})}var Ot=c(Fe,2);{var Ht=H=>{var ee=Xu();Bt(ee,21,()=>e(G).labels,He=>He.name,(He,J)=>{var re=Gu(),Pe=L(re,!0);C(lt=>{Yt(re,lt),S(Pe,e(J).name)},[()=>pe(e(J).color)]),a(He,re)}),b(ee),a(H,ee)};I(Ot,H=>{e(G).labels.length&&H(Ht)})}b(f),b(wt),b(Oe);var _=c(Oe,2),D=k(_);{var ne=H=>{var ee=rd(),He=k(ee);Bt(He,17,()=>e(ae).reviews,Ze=>Ze.author,(Ze,ct)=>{const st=h(()=>ut[e(ct).verdict]);var Ue=$u();let gt;var Dt=k(Ue);C(()=>Te(Dt,"icon",e(st).icon)),ke(Dt,1,"svelte-oq17no");var le=c(Dt,2),ve=L(le,!0),ze=c(le,2),De=L(ze,!0),Re=c(ze,2);{var Rt=Vt=>{var Jt=Yu(),Lt=L(Jt,!0);C(Ut=>S(Lt,Ut),[()=>en(e(ct).at)]),a(Vt,Jt)};I(Re,Vt=>{e(ct).at&&Vt(Rt)})}b(Ue),C(Vt=>{gt=ke(Ue,1,`fact ${e(st).tone??""}`,"svelte-oq17no",gt,{old:e(ct).stale}),ue(Ue,"title",e(ct).stale?"Given before the latest commit":void 0),S(ve,e(ct).author),S(De,Vt)},[()=>e(st).word.toLowerCase()]),a(Ze,Ue)});var J=c(He,2);{var re=Ze=>{var ct=Ju(),st=k(ct);Te(st,"icon","mdi:account-clock-outline"),ke(st,1,"svelte-oq17no");var Ue=c(st,2),gt=L(Ue);b(ct),C(Dt=>S(gt,`Waiting on ${Dt??""}`),[()=>e(ae).requested.join(", ")]),a(Ze,ct)};I(J,Ze=>{e(ae).requested.length&&Ze(re)})}var Pe=c(J,2);{var lt=Ze=>{var ct=nd(),st=R(ct),Ue=k(st);C(()=>Te(Ue,"icon",e(he)==="bad"?"mdi:close-circle":e(he)==="busy"?"mdi:progress-clock":"mdi:check-circle")),ke(Ue,1,"svelte-oq17no");var gt=c(Ue,2),Dt=L(gt,!0),le=c(gt,2);ke(le,1,"chev svelte-oq17no"),C(()=>Te(le,"icon",e(se)?"mdi:chevron-up":"mdi:chevron-down")),b(st);var ve=c(st,2);{var ze=De=>{var Re=td(),Rt=R(Re);Bt(Rt,23,()=>[...e(z).failing,...e(z).running,...e(V)||!e(z).failing.length&&!e(z).running.length?e(z).passing:[]],(Lt,Ut)=>`${Lt.name}:${Ut}`,(Lt,Ut)=>{var an=ed(),qt=k(an);C(()=>Te(qt,"icon",e(Ut).bucket==="failing"?"mdi:close-circle":e(Ut).bucket==="running"?"mdi:progress-clock":"mdi:check-circle")),ke(qt,1,"svelte-oq17no");var Gt=c(qt,2);{var bn=yn=>{var wn=Zu(),Nn=L(wn,!0);C(()=>{ue(wn,"href",e(Ut).url),S(Nn,e(Ut).name)}),a(yn,wn)},Cn=yn=>{var wn=Qu(),Nn=L(wn,!0);C(()=>S(Nn,e(Ut).name)),a(yn,wn)};I(Gt,yn=>{e(Ut).url?yn(bn):yn(Cn,-1)})}var Rn=c(Gt,2),Xn=L(Rn,!0);b(an),C(()=>{ke(an,1,oo(e(Ut).bucket),"svelte-oq17no"),S(Xn,e(Ut).status)}),a(Lt,an)}),b(Rt);var Vt=c(Rt,2);{var Jt=Lt=>{var Ut=gs(),an=L(Ut);C(()=>S(an,`Show ${e(z).passing.length??""} passing`)),ot("click",Ut,()=>v(V,!0)),a(Lt,Ut)};I(Vt,Lt=>{!e(V)&&e(z).passing.length&&(e(z).failing.length||e(z).running.length)&&Lt(Jt)})}a(De,Re)};I(ve,De=>{e(se)&&De(ze)})}C(De=>{ke(st,1,`fact checks ${e(he)??""}`,"svelte-oq17no"),ue(st,"aria-expanded",e(se)),S(Dt,De)},[()=>Qo(e(ae).checks)]),ot("click",st,()=>v(se,!e(se))),a(Ze,ct)};I(Pe,Ze=>{e(z)&&e(ae).checks.length&&Ze(lt)})}b(ee),a(H,ee)};I(D,H=>{e(ae)&&(e(ae).reviews.length||e(ae).requested.length||e(ae).checks.length)&&H(ne)})}var oe=c(D,2),me=k(oe);{var We=H=>{var ee=fe(),He=R(ee);Un(He,()=>Wt(e(G).body)),a(H,ee)},Pt=h(()=>Jo(e(G).body)),Q=H=>{var ee=sd();a(H,ee)};I(me,H=>{e(Pt)?H(We):H(Q,-1)})}b(oe);var Y=c(oe,2),ge=k(Y),xe=k(ge),je=L(xe),pt=c(xe,2);{var mt=H=>{var ee=gs(),He=L(ee,!0);C(()=>{ue(ee,"aria-pressed",e(Me)),S(He,e(Me)?`Hide ${e(de).bots.length} from bots`:`${e(de).bots.length} from bots hidden`)}),ot("click",ee,()=>v(Me,!e(Me))),a(H,ee)};I(pt,H=>{e(de)?.bots.length&&H(mt)})}b(ge);var ft=c(ge,2);{var _t=H=>{var ee=od();a(H,ee)};I(ft,H=>{e(G).comments===null&&H(_t)})}var xt=c(ft,2);Bt(xt,17,()=>e(et),H=>H.id,(H,ee)=>{var He=id();let J;var re=k(He),Pe=k(re),lt=L(Pe,!0),Ze=c(Pe,2);{var ct=le=>{var ve=ad(),ze=L(ve,!0);C((De,Re)=>{ue(ve,"href",e(ee).url),ue(ve,"title",De),S(ze,Re)},[()=>new Date(e(ee).at).toLocaleString(),()=>en(e(ee).at)]),a(le,ve)};I(Ze,le=>{e(ee).at&&le(ct)})}b(re);var st=c(re,2);let Ue;Un(st,()=>Wt(e(ee).body),!0),b(st),Xo(st,le=>Qt?.(le));var gt=c(st,2),Dt=L(gt,!0);b(He),C((le,ve)=>{J=ke(He,1,"comment svelte-oq17no",null,J,{bot:e(ee).bot}),S(lt,e(ee).author),Ue=ke(st,1,"c-body markdown svelte-oq17no",null,Ue,{open:le}),S(Dt,ve)},[()=>e(ye).has(e(ee).id),()=>e(ye).has(e(ee).id)?"Show less":"Show more"]),ot("click",gt,()=>Xt(e(ee))),a(H,He)});var Ke=c(xt,2);{var dt=H=>{var ee=ld(),He=L(ee);C(()=>S(He,`Show older (${e(Ve).length-e(et).length} more)`)),ot("click",ee,()=>v(Ee,e(Ee)+s)),a(H,ee)},It=H=>{var ee=cd(),He=L(ee);C(()=>{ue(ee,"href",e(G).url),S(He,`${e(jt)??""} older on GitHub`)}),a(H,ee)};I(Ke,H=>{e(Ve).length>e(et).length?H(dt):e(jt)&&H(It,1)})}b(Y),b(_),mn(_,H=>v(at,H),()=>e(at));var Xe=c(_,2);{var At=H=>{Fs(H,{get root(){return e(at)},get repo(){return e(G).repo},get base(){return t.base},onOpen:O})};I(Xe,H=>{e(at)&&H(At)})}C(H=>{yt=ke(Oe,1,"head svelte-oq17no",null,yt,{folded:e(kt)}),Mt=Yt(Oe,"",Mt,{"--state":e(Ce).color}),S(U,` ${e(Ce).label??""}`),ue(y,"href",e(G).url),S(N,`${H??""}#${e(G).number??""}`),ue(Se,"title",e(G).title),S(rt,e(G).title),S(je,`${e(G).comments_total??""} ${e(G).comments_total===1?"comment":"comments"}`)},[()=>e(G).repo.toLowerCase()===e(i)?.repo?.toLowerCase()?"":e(G).repo]),fn("scroll",_,H=>v(kt,H.currentTarget.scrollTop>24)),a(F,ie)};I(Ct,F=>{e(P)?e(G)?e(Ce)&&F(nn,2):F(tn,1):F($t)})}b(tt),a(r,tt),$e()}Ln(["click"]);const sr=[{kind:"changes",label:"Changes",icon:"mdi:plus-minus-variant",key:"C",params:["file","turn","source"],body:_l,unavailable:r=>r?null:"Not a Claude session",count:r=>r?.changes??null},{kind:"history",label:"History",icon:"mdi:source-commit",key:"H",params:["commit","file","view"],body:qc,unavailable:r=>r?null:"Not a Claude session"},{kind:"files",label:"Files",icon:"mdi:file-tree-outline",key:"F",params:["file","line"],body:fc,unavailable:r=>r?null:"Not a Claude session"},{kind:"web",label:"Web",icon:"mdi:web",key:"W",params:["url","tab"],body:Au,unavailable:r=>r?null:"Not a Claude session"},{kind:"github",label:"GitHub",icon:"mdi:github",key:"G",params:["ref"],body:vd,unavailable:r=>r?null:"Not a Claude session"},{kind:"project",label:"Project",icon:"mdi:folder-information-outline",key:"P",params:[],body:Bi,unavailable:r=>r?null:"Not a Claude session"}],sv=sr.map(r=>r.kind),ov=[...new Set(sr.flatMap(r=>r.params))];function av(r){return sr.find(t=>t.kind===r)??null}function Js(r){return Os?`⌥⇧${r}`:`Alt Shift ${r}`}function iv(r){return Js(r.key)}const Zs="M",lv=Js(Zs),cv=Os?"⌘\\":"Ctrl \\";function uv(r){return(r.ctrlKey||r.metaKey)&&!r.altKey&&!r.shiftKey&&r.code==="Backslash"?"toggle":!r.altKey||!r.shiftKey||r.ctrlKey||r.metaKey?null:r.code===`Key${Zs}`?"maximize":sr.find(t=>r.code===`Key${t.key}`)??null}const bs=[];function ys(r){r.abort?.abort(),r.thumb&&URL.revokeObjectURL(r.thumb)}class fd{#e=q(on({}));get state(){return e(this.#e)}set state(t){v(this.#e,t,!0)}get(t){return t?this.state[t]??bs:bs}count(t){return this.get(t).length}add(t,n){t&&(this.state[t]=[...this.get(t),n])}patch(t,n,s){const o=this.state[t];o?.some(i=>i.localId===n)&&(this.state[t]=o.map(i=>i.localId===n?{...i,...s}:i))}remove(t,n){const s=t?this.state[t]:void 0,o=s?.find(l=>l.localId===n);if(!t||!s||!o)return;ys(o);const i=s.filter(l=>l.localId!==n);return i.length?this.state[t]=i:delete this.state[t],o}clear(t){const n=t?this.state[t]:void 0;!t||!n||(n.forEach(ys),delete this.state[t])}}const dv=new fd;var hd=new Set(["$$slots","$$events","$$legacy","open"]);function pd(r,t){Ye(t,!0);let n=B(t,"open",15,!1),s=Et(t,hd);var o=fe(),i=R(o);Qe(i,()=>ai,(l,d)=>{d(l,Ft(()=>s,{get open(){return n()},set open(g){n(g)}}))}),a(r,o),$e()}var md=new Set(["$$slots","$$events","$$legacy"]);function _d(r,t){let n=Et(t,md);var s=fe(),o=R(s);Qe(o,()=>Ns,(i,l)=>{l(i,Ft(()=>n))}),a(r,s)}var gd=new Set(["$$slots","$$events","$$legacy","ref","class"]);function bd(r,t){Ye(t,!0);let n=B(t,"ref",15,null),s=Et(t,gd);var o=fe(),i=R(o);{let l=h(()=>vn("text-lg leading-none font-semibold",t.class));Qe(i,()=>oa,(d,g)=>{g(d,Ft({"data-slot":"dialog-title",get class(){return e(l)}},()=>s,{get ref(){return n()},set ref(P){n(P)}}))})}a(r,o),$e()}var yd=new Set(["$$slots","$$events","$$legacy","ref","class","children"]),wd=u("<div><!></div>");function xd(r,t){Ye(t,!0);let n=B(t,"ref",15,null),s=Et(t,yd);var o=wd();rn(o,l=>({"data-slot":"dialog-footer",class:l,...s}),[()=>vn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t.class)]);var i=k(o);St(i,()=>t.children??Nt),b(o),mn(o,l=>n(l),()=>n()),a(r,o),$e()}var kd=new Set(["$$slots","$$events","$$legacy","ref","class","children"]),Pd=u("<div><!></div>");function Td(r,t){Ye(t,!0);let n=B(t,"ref",15,null),s=Et(t,kd);var o=Pd();rn(o,l=>({"data-slot":"dialog-header",class:l,...s}),[()=>vn("flex flex-col gap-2 text-center sm:text-start",t.class)]);var i=k(o);St(i,()=>t.children??Nt),b(o),mn(o,l=>n(l),()=>n()),a(r,o),$e()}var Sd=new Set(["$$slots","$$events","$$legacy","ref","class"]);function Ed(r,t){Ye(t,!0);let n=B(t,"ref",15,null),s=Et(t,Sd);var o=fe(),i=R(o);{let l=h(()=>vn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-(--z-modal) bg-black/50",t.class));Qe(i,()=>aa,(d,g)=>{g(d,Ft({"data-slot":"dialog-overlay",get class(){return e(l)}},()=>s,{get ref(){return n()},set ref(P){n(P)}}))})}a(r,o),$e()}var Cd=new Set(["$$slots","$$events","$$legacy"]);function Id(r,t){Ye(t,!0);let n=Et(t,Cd);const s=[["path",{d:"M18 6 6 18"}],["path",{d:"m6 6 12 12"}]];ta(r,Ft({name:"x"},()=>n,{get iconNode(){return s},children:(o,i)=>{var l=fe(),d=R(l);St(d,()=>t.children??Nt),a(o,l)},$$slots:{default:!0}})),$e()}var Md=new Set(["$$slots","$$events","$$legacy","ref","class","portalProps","children","showCloseButton"]),Od=u('<!> <span class="sr-only">Close</span>',1),ws=u("<!> <!>",1);function Ad(r,t){Ye(t,!0);let n=B(t,"ref",15,null),s=B(t,"showCloseButton",3,!0),o=Et(t,Md);_d(r,Ft(()=>t.portalProps,{children:(i,l)=>{var d=ws(),g=R(d);Qe(g,()=>Ed,(E,O)=>{O(E,{})});var P=c(g,2);{let E=h(()=>vn("bg-background 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 fixed top-[50%] left-[50%] z-(--z-modal) grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",t.class));Qe(P,()=>fi,(O,A)=>{A(O,Ft({"data-slot":"dialog-content",get class(){return e(E)}},()=>o,{get ref(){return n()},set ref(M){n(M)},children:(M,K)=>{var p=ws(),m=R(p);St(m,()=>t.children??Nt);var j=c(m,2);{var te=G=>{var Ce=fe(),ae=R(Ce);Qe(ae,()=>ci,(Le,ce)=>{ce(Le,{class:"ring-offset-background focus:ring-ring absolute end-4 top-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:($,X)=>{var Ie=Od(),qe=R(Ie);Id(qe,{}),ht(2),a($,Ie)},$$slots:{default:!0}})}),a(G,Ce)};I(j,G=>{s()&&G(te)})}a(M,p)},$$slots:{default:!0}}))})}a(i,d)},$$slots:{default:!0}})),$e()}var Ld=new Set(["$$slots","$$events","$$legacy","ref","class"]);function Dd(r,t){Ye(t,!0);let n=B(t,"ref",15,null),s=Et(t,Ld);var o=fe(),i=R(o);{let l=h(()=>vn("text-muted-foreground text-sm",t.class));Qe(i,()=>ia,(d,g)=>{g(d,Ft({"data-slot":"dialog-description",get class(){return e(l)}},()=>s,{get ref(){return n()},set ref(P){n(P)}}))})}a(r,o),$e()}var Rd=u(`Also sent to the agent as <code>/rename</code>, once its pane is back at a prompt. Leave
|
|
5
5
|
blank to fall back to the tmux target.`,1),Nd=u("<!> <!>",1),xs=u("<!> <!> <!>",1);function vv(r,t){Ye(t,!0);let n=B(t,"base",3,"");const s=h(()=>t.sessionId?t.sessions?t.sessions.find(p=>p.id===t.sessionId)??null:Ms.sessionById.get(t.sessionId)??null:null);let o=q(""),i=q(null),l=q(!1);Be(()=>{t.sessionId&&(v(o,zt(()=>e(s)?.display_name??""),!0),v(l,!1))});const d=16,g=.75;let P=q(void 0);Be(()=>{const p=window.visualViewport;if(!t.sessionId||!p)return;const m=()=>{v(P,p.height<window.innerHeight*g?`top: ${p.offsetTop+d}px; translate: -50% 0;`:void 0,!0)};return m(),p.addEventListener("resize",m),p.addEventListener("scroll",m),()=>{p.removeEventListener("resize",m),p.removeEventListener("scroll",m),v(P,void 0)}});async function E(){const p=e(s),m=e(o).trim();if(t.onClose(),!(!p||m===(p.display_name??"")))try{await fetch(`${n()}/api/sessions/${encodeURIComponent(p.id)}/rename`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:m||null})})}catch{}}async function O(){const p=e(s);if(p){if(!e(l)){v(l,!0);return}t.onClose();try{await fetch(`${n()}/api/sessions/${encodeURIComponent(p.id)}/kill`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({pid:p.pid,tmux_target:p.tmux_target})})}catch{}}}function A(p){p.key==="Enter"&&(p.preventDefault(),E())}var M=fe(),K=R(M);{let p=h(()=>e(s)!==null);Qe(K,()=>pd,(m,j)=>{j(m,{get open(){return e(p)},onOpenChange:te=>{te||t.onClose()},children:(te,G)=>{var Ce=fe(),ae=R(Ce);Qe(ae,()=>Ad,(Le,ce)=>{ce(Le,{class:"max-w-sm",get style(){return e(P)},onOpenAutoFocus:$=>{$.preventDefault(),e(i)?.focus(),e(i)?.select()},children:($,X)=>{var Ie=xs(),qe=R(Ie);Qe(qe,()=>Td,(ut,se)=>{se(ut,{children:(V,z)=>{var he=Nd(),Ee=R(he);Qe(Ee,()=>bd,(ye,de)=>{de(ye,{children:(Ve,et)=>{ht();var jt=Kt("Rename session");a(Ve,jt)},$$slots:{default:!0}})});var Me=c(Ee,2);Qe(Me,()=>Dd,(ye,de)=>{de(ye,{children:(Ve,et)=>{ht();var jt=Rd();ht(2),a(Ve,jt)},$$slots:{default:!0}})}),a(V,he)},$$slots:{default:!0}})});var at=c(qe,2);{let ut=h(()=>e(s)?.tmux_target??e(s)?.id??"session name");Vn(at,{onkeydown:A,class:"font-mono",type:"text",get placeholder(){return e(ut)},"aria-label":"Session name",autocomplete:"off",autocapitalize:"off",spellcheck:"false",enterkeyhint:"done",maxlength:120,get ref(){return e(i)},set ref(se){v(i,se,!0)},get value(){return e(o)},set value(se){v(o,se,!0)}})}var kt=c(at,2);Qe(kt,()=>xd,(ut,se)=>{se(ut,{children:(V,z)=>{var he=xs(),Ee=R(he);pn(Ee,{variant:"ghost",class:"min-h-11 text-destructive hover:text-destructive sm:mr-auto",onclick:O,children:(de,Ve)=>{ht();var et=Kt();C(()=>S(et,e(l)?"Confirm kill":"Kill session")),a(de,et)},$$slots:{default:!0}});var Me=c(Ee,2);pn(Me,{variant:"ghost",class:"min-h-11",get onclick(){return t.onClose},children:(de,Ve)=>{ht();var et=Kt("Cancel");a(de,et)},$$slots:{default:!0}});var ye=c(Me,2);pn(ye,{class:"min-h-11",onclick:E,children:(de,Ve)=>{ht();var et=Kt("Rename");a(de,et)},$$slots:{default:!0}}),a(V,he)},$$slots:{default:!0}})}),a($,Ie)},$$slots:{default:!0}})}),a(te,Ce)},$$slots:{default:!0}})})}a(r,M),$e()}function jd(r,t,n=!0){if(!t)return{score:0,positions:[]};const s=r.toLowerCase(),o=t.toLowerCase(),i=s.indexOf(o);if(i!==-1){const E=n?Array.from({length:o.length},(O,A)=>i+A):[];return{score:1e3-i*5-s.length,positions:E}}const l=[];let d=0,g=0,P=-2;for(let E=0;E<o.length;E++){const O=o[E],A=s.indexOf(O,g);if(A===-1)return null;d+=A===P+1?10:1,(A===0||/[^a-z0-9]/.test(s[A-1]??""))&&(d+=5),n&&l.push(A),P=A,g=A+1}return{score:d-s.length*.1,positions:l}}function qd(r,t){return jd(r,t,!1)?.score??null}function fv(r,t){if(t.length===0)return[{text:r,hit:!1}];const n=[];let s=0;for(let o=0;o<t.length;){const i=t[o];let l=i;for(;o+1<t.length&&t[o+1]===l+1;)l=t[++o];o++,i>s&&n.push({text:r.slice(s,i),hit:!1}),n.push({text:r.slice(i,l+1),hit:!0}),s=l+1}return s<r.length&&n.push({text:r.slice(s),hit:!1}),n}function hv(r,t){const n=qd(r.name,t);if(n!=null)return n+500;const s=t?r.description.toLowerCase().indexOf(t.toLowerCase()):-1;return s===-1?null:100-s*.5}const Zn="panel";function pv(r,t){const n=r.get(Zn);return n&&t.includes(n)?n:null}function mv(r,t){const n={};for(const s of t){const o=r.get(s);o!==null&&(n[s]=o)}return n}function zd(r,t,n,s={}){const o=new URLSearchParams(r);if(t===null||o.get(Zn)!==t)for(const i of n)o.delete(i);if(t===null)return o.delete(Zn),o;o.set(Zn,t);for(const[i,l]of Object.entries(s))l===null?o.delete(i):o.set(i,l);return o}function _v(r,t,n){return/^(?:\/m\/[^/]+)?\/session\/[^/]+\/?$/.test(r.pathname)?`${r.pathname}?${zd(r.searchParams,"github",n,{ref:t})}`:null}var Fd=new Set(["$$slots","$$events","$$legacy","ref"]);function gv(r,t){Ye(t,!0);let n=B(t,"ref",15,null),s=Et(t,Fd);var o=fe(),i=R(o);Qe(i,()=>xa,(l,d)=>{d(l,Ft({"data-slot":"collapsible-content"},()=>s,{get ref(){return n()},set ref(g){n(g)}}))}),a(r,o),$e()}var Bd=new Set(["$$slots","$$events","$$legacy","ref"]);function bv(r,t){Ye(t,!0);let n=B(t,"ref",15,null),s=Et(t,Bd);var o=fe(),i=R(o);Qe(i,()=>Ta,(l,d)=>{d(l,Ft({"data-slot":"collapsible-trigger"},()=>s,{get ref(){return n()},set ref(g){n(g)}}))}),a(r,o),$e()}var Kd=new Set(["$$slots","$$events","$$legacy","ref","open"]);function yv(r,t){Ye(t,!0);let n=B(t,"ref",15,null),s=B(t,"open",15,!1),o=Et(t,Kd);var i=fe(),l=R(i);Qe(l,()=>ba,(d,g)=>{g(d,Ft({"data-slot":"collapsible"},()=>o,{get ref(){return n()},set ref(P){n(P)},get open(){return s()},set open(P){s(P)}}))}),a(r,i),$e()}function Hd(r,t){if(r.length!==t.length)return!1;for(let n=0;n<r.length;n++){const s=r[n],o=t[n];if(s.label!==o.label||s.icon!==o.icon||s.danger!==o.danger||s.variant!==o.variant||s.flashing!==o.flashing)return!1}return!0}class Wd{#e=q(on([]));get actions(){return e(this.#e)}set actions(t){v(this.#e,t,!0)}set(t){Hd(this.actions,t)||(this.actions=t)}clear(){this.actions.length!==0&&(this.actions=[])}}const wv=new Wd;export{ov as A,fa as B,bv as C,pd as D,Ei as E,xi as F,Fn as G,Ii as H,jd as I,fv as J,_v as K,Td as L,lv as M,Xs as P,vv as R,rv as S,un as T,Id as X,tr as a,gv as b,nv as c,yv as d,Ad as e,bd as f,Dd as g,fi as h,ci as i,ai as j,tv as k,iv as l,sr as m,cv as n,wv as o,ln as p,pv as q,mv as r,hv as s,dn as t,av as u,zd as v,zr as w,dv as x,sv as y,uv as z};
|
|
6
|
-
//# sourceMappingURL=
|
|
6
|
+
//# sourceMappingURL=C00rm3mY.js.map
|