@intent-hq/web 2.344.0 → 2.345.1
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/package.json +1 -1
- package/web/app/immutable/chunks/{CPi3hzpu.js → -6JGlnE4.js} +1 -1
- package/web/app/immutable/chunks/{4GiF-64P.js → -7ARPWgR.js} +1 -1
- package/web/app/immutable/chunks/{DHP1DFPI.js → -SwunqO3.js} +1 -1
- package/web/app/immutable/chunks/{C-3coqYU.js → 34C5M9lk.js} +1 -1
- package/web/app/immutable/chunks/{DEnfRYcH.js → 3G6kqi6m.js} +1 -1
- package/web/app/immutable/chunks/{D6-Slo8_.js → 4UXIq5lZ.js} +5 -5
- package/web/app/immutable/chunks/{oYQw_s1S.js → 5MLUIYhU.js} +1 -1
- package/web/app/immutable/chunks/{DukOM-92.js → 7Zs8wY6y.js} +1 -1
- package/web/app/immutable/chunks/{CFLZAMP_.js → 8XhHIJcn.js} +1 -1
- package/web/app/immutable/chunks/{BW73Ve1a.js → 9HNwwiNt.js} +1 -1
- package/web/app/immutable/chunks/{CicdOSYm.js → A0r9TbR7.js} +2 -2
- package/web/app/immutable/chunks/{DWQSi293.js → A34-FDia.js} +1 -1
- package/web/app/immutable/chunks/{BycXuHIq.js → A8JjhnEv.js} +1 -1
- package/web/app/immutable/chunks/{UtZBgRek.js → AzoskYOh.js} +1 -1
- package/web/app/immutable/chunks/{Gobu28zb.js → B-jmn73b.js} +2 -2
- package/web/app/immutable/chunks/{CPYWKVyq.js → B0biUQQF.js} +1 -1
- package/web/app/immutable/chunks/{lI7T5mqw.js → B1C_jfbV.js} +1 -1
- package/web/app/immutable/chunks/{BYg2F-3D.js → B1Zj1zGG.js} +1 -1
- package/web/app/immutable/chunks/{CiTK-_b6.js → B203wRvP.js} +1 -1
- package/web/app/immutable/chunks/{Bev5K0J8.js → B39Mxie0.js} +4 -4
- package/web/app/immutable/chunks/{C91dOInA.js → B5tGFpkq.js} +1 -1
- package/web/app/immutable/chunks/{jbKFYOOg.js → B65N3w4u.js} +1 -1
- package/web/app/immutable/chunks/{Bo4mc4_O.js → B6iA2dvO.js} +1 -1
- package/web/app/immutable/chunks/{BnZrTj7m.js → B7o4NziF.js} +1 -1
- package/web/app/immutable/chunks/{CGXahRhf.js → BBasLmtQ.js} +1 -1
- package/web/app/immutable/chunks/{CJSrEfR4.js → BDACnpyW.js} +1 -1
- package/web/app/immutable/chunks/{Br0dSiCW.js → BESEELLz.js} +1 -1
- package/web/app/immutable/chunks/{BXbF11Gp.js → BFp6vZSQ.js} +1 -1
- package/web/app/immutable/chunks/{tcxAslUm.js → BI7MYBTt.js} +1 -1
- package/web/app/immutable/chunks/{DaaneYTG.js → BIEvH8pu.js} +1 -1
- package/web/app/immutable/chunks/{BSpir4qY.js → BIlaJXMS.js} +1 -1
- package/web/app/immutable/chunks/{ei2mFcvT.js → BIoLrYT0.js} +1 -1
- package/web/app/immutable/chunks/{BmB6-2Ft.js → BL8tUtYB.js} +1 -1
- package/web/app/immutable/chunks/{Cs-BSsj3.js → BL8utEbB.js} +1 -1
- package/web/app/immutable/chunks/{BkUAKnVY.js → BLR6m4ri.js} +1 -1
- package/web/app/immutable/chunks/{CI-nVEa_.js → BMaybjSV.js} +1 -1
- package/web/app/immutable/chunks/{CnJe4S2a.js → BMm9sGZ6.js} +1 -1
- package/web/app/immutable/chunks/{D6cqwcO2.js → BNuo4lAs.js} +1 -1
- package/web/app/immutable/chunks/{BdUSoBxL.js → BO67r0G6.js} +2 -2
- package/web/app/immutable/chunks/{KJX0Kw6L.js → BP5uyQTv.js} +3 -3
- package/web/app/immutable/chunks/{DGYr0_ON.js → BP7CI4Qx.js} +1 -1
- package/web/app/immutable/chunks/BPvruhgT.js +13 -0
- package/web/app/immutable/chunks/{Dp_2W12t.js → BQEszNiH.js} +1 -1
- package/web/app/immutable/chunks/{BmT6wRR1.js → BRww0MVx.js} +1 -1
- package/web/app/immutable/chunks/{D9ajM8uP.js → BVPvh88-.js} +1 -1
- package/web/app/immutable/chunks/{DAYo95RN.js → BVt_T8ao.js} +1 -1
- package/web/app/immutable/chunks/{quYX3pdL.js → BVviSubD.js} +1 -1
- package/web/app/immutable/chunks/{fCEIPyv5.js → BXeiKdwz.js} +1 -1
- package/web/app/immutable/chunks/{ixz6jb_3.js → BY-x4QLt.js} +1 -1
- package/web/app/immutable/chunks/{B_frQYKx.js → BYFJ74nm.js} +1 -1
- package/web/app/immutable/chunks/{DBSA3jai.js → BYMNRS4c.js} +1 -1
- package/web/app/immutable/chunks/{Dyra2UkJ.js → BZLRqiW7.js} +1 -1
- package/web/app/immutable/chunks/{B7_gjxTl.js → BZcpShp8.js} +1 -1
- package/web/app/immutable/chunks/{juQAMcx2.js → BZr7mr7Q.js} +1 -1
- package/web/app/immutable/chunks/{B1Hn0_Hu.js → BbNk8c_P.js} +1 -1
- package/web/app/immutable/chunks/{Wsz69q6g.js → BdD2ADMz.js} +1 -1
- package/web/app/immutable/chunks/{ClTZNeVO.js → BdkEw9JP.js} +1 -1
- package/web/app/immutable/chunks/{BPk8wgKn.js → BecPnSy0.js} +3 -3
- package/web/app/immutable/chunks/{DIHT0C7u.js → BgX4ALX_.js} +3 -3
- package/web/app/immutable/chunks/{BgN4cuBh.js → BhMsVKL2.js} +1 -1
- package/web/app/immutable/chunks/{2XZtwznc.js → BiRT6AoP.js} +4 -4
- package/web/app/immutable/chunks/{Cj2EKBCH.js → Bk8EDJRq.js} +1 -1
- package/web/app/immutable/chunks/BlZYlbA9.js +1 -0
- package/web/app/immutable/chunks/{nmrokYzj.js → BmP1Wws6.js} +1 -1
- package/web/app/immutable/chunks/{4NM3BVdw.js → BoCZH6mk.js} +1 -1
- package/web/app/immutable/chunks/{kHCC2X2-.js → BqQiAH0O.js} +1 -1
- package/web/app/immutable/chunks/{Bv5I7YDM.js → BqRoJfH0.js} +1 -1
- package/web/app/immutable/chunks/{BM1KP-FJ.js → BqqN40AD.js} +1 -1
- package/web/app/immutable/chunks/{B4yyNCE8.js → BrTyn-oU.js} +1 -1
- package/web/app/immutable/chunks/{BLHhhsG2.js → BsRwjCPo.js} +1 -1
- package/web/app/immutable/chunks/{HIyZggkg.js → BtXLgEvw.js} +4 -4
- package/web/app/immutable/chunks/{DcFwDOMt.js → BwSA3fCS.js} +1 -1
- package/web/app/immutable/chunks/{Ca3YR8yw.js → BxuxDWAX.js} +1 -1
- package/web/app/immutable/chunks/{XvLHDIL-.js → ByCIOkhM.js} +1 -1
- package/web/app/immutable/chunks/{Dq9eeDUE.js → BzbcgIXt.js} +1 -1
- package/web/app/immutable/chunks/{RNDWAc1K.js → BzzDMYz_.js} +6 -6
- package/web/app/immutable/chunks/{Cn3xolhp.js → C-M7eh_Z.js} +1 -1
- package/web/app/immutable/chunks/{CDFRnJ8k.js → C1nHAGLu.js} +1 -1
- package/web/app/immutable/chunks/{DN71oh5l.js → C3SYquhf.js} +1 -1
- package/web/app/immutable/chunks/C4dCVzfY.js +2 -0
- package/web/app/immutable/chunks/{BvSNOyzW.js → C4pN30lR.js} +2 -2
- package/web/app/immutable/chunks/{DIumxlqP.js → C52Qm4vO.js} +1 -1
- package/web/app/immutable/chunks/{CdN2Ihv_.js → C5AlgdZ0.js} +1 -1
- package/web/app/immutable/chunks/{iwClg1fT.js → C7tPYy06.js} +3 -3
- package/web/app/immutable/chunks/{CjZIABEV.js → C8BVjzNA.js} +1 -1
- package/web/app/immutable/chunks/{g9G7tvrf.js → C8dU7SM3.js} +2 -2
- package/web/app/immutable/chunks/{uPiYeMwS.js → CCwwkuT-.js} +1 -1
- package/web/app/immutable/chunks/{BSo5IXuX.js → CD-XXU5z.js} +1 -1
- package/web/app/immutable/chunks/{CClqWu60.js → CDQzU1Fp.js} +1 -1
- package/web/app/immutable/chunks/{BAR7XkP3.js → CEQZVenN.js} +1 -1
- package/web/app/immutable/chunks/{C46XexX0.js → CFduDdmx.js} +1 -1
- package/web/app/immutable/chunks/{_RGinDCt.js → CKzqOQI8.js} +1 -1
- package/web/app/immutable/chunks/{Cn19T3na.js → CL2hu5s-.js} +1 -1
- package/web/app/immutable/chunks/{DhtvToBX.js → CMxRuwYt.js} +1 -1
- package/web/app/immutable/chunks/{BjcX_fOv.js → CN-2rfdx.js} +1 -1
- package/web/app/immutable/chunks/{BRhVB6Sv.js → COrK0goa.js} +1 -1
- package/web/app/immutable/chunks/{DuIazAmY.js → CRQGIXhv.js} +1 -1
- package/web/app/immutable/chunks/{Bk2hJ8Ly.js → CSdIXJpO.js} +1 -1
- package/web/app/immutable/chunks/{C3MZ_izG.js → CVYjvOCP.js} +1 -1
- package/web/app/immutable/chunks/{DWiPdXwB.js → CW13jkE8.js} +1 -1
- package/web/app/immutable/chunks/{DTBnd4hM.js → CW41MFVu.js} +1 -1
- package/web/app/immutable/chunks/{BA55iEBB.js → CWE4oREl.js} +1 -1
- package/web/app/immutable/chunks/{BQAjCr1w.js → CWQrbZgx.js} +1 -1
- package/web/app/immutable/chunks/{CzQCBVm9.js → CW_fORnH.js} +1 -1
- package/web/app/immutable/chunks/{fI_J_To4.js → CWmsRWEf.js} +1 -1
- package/web/app/immutable/chunks/{BW1LTGV1.js → CYf2hryc.js} +1 -1
- package/web/app/immutable/chunks/{BrysY2Ec.js → Ca05Jmq3.js} +1 -1
- package/web/app/immutable/chunks/{B1SJZtm3.js → CaGwo1Kh.js} +1 -1
- package/web/app/immutable/chunks/{BEyWfhqM.js → CaxyE6o_.js} +1 -1
- package/web/app/immutable/chunks/{CWIcIgSm.js → CbCgON3R.js} +1 -1
- package/web/app/immutable/chunks/{sEcTUaec.js → CcPTLJNE.js} +1 -1
- package/web/app/immutable/chunks/{L30ES58t.js → CcXuSxXv.js} +1 -1
- package/web/app/immutable/chunks/{D8YFvJ64.js → Cc_BIXdP.js} +1 -1
- package/web/app/immutable/chunks/{D61HjMue.js → CcuS-fLp.js} +1 -1
- package/web/app/immutable/chunks/{BOa-AN22.js → CcvLGgrc.js} +1 -1
- package/web/app/immutable/chunks/{DAPhb2nP.js → CdZRK319.js} +45 -45
- package/web/app/immutable/chunks/{CwRpBR2e.js → CeswpNyE.js} +1 -1
- package/web/app/immutable/chunks/{CadpuSEK.js → Cf09_YLr.js} +1 -1
- package/web/app/immutable/chunks/{B461Cu-8.js → Cfj3Lc6y.js} +1 -1
- package/web/app/immutable/chunks/{DwSYIDzZ.js → CgQ2Q_uI.js} +1 -1
- package/web/app/immutable/chunks/{yl6pDKiQ.js → CgW9XFcu.js} +1 -1
- package/web/app/immutable/chunks/{D37kdZVn.js → Ch8P3vqn.js} +1 -1
- package/web/app/immutable/chunks/{BjnZ1Xf3.js → Ck9ZyE1n.js} +1 -1
- package/web/app/immutable/chunks/{BvrMTALy.js → ClTbUKJh.js} +1 -1
- package/web/app/immutable/chunks/{CrH1YN9o.js → CoDSLIZp.js} +1 -1
- package/web/app/immutable/chunks/{By0eqGj-.js → CoLl8pQb.js} +1 -1
- package/web/app/immutable/chunks/{BMs7t3_m.js → CoXBdOLx.js} +1 -1
- package/web/app/immutable/chunks/{C9gix5Ke.js → CpHZSST_.js} +1 -1
- package/web/app/immutable/chunks/{DA3kI_Ir.js → Cq0XJSNB.js} +1 -1
- package/web/app/immutable/chunks/{Ck9j_FHl.js → Cr_Liz2C.js} +1 -1
- package/web/app/immutable/chunks/{CxLPEkg7.js → CuhrgDBI.js} +1 -1
- package/web/app/immutable/chunks/{DxBvyCwr.js → CvGYkRzD.js} +1 -1
- package/web/app/immutable/chunks/{BgzyvwGo.js → CvWyDJGm.js} +1 -1
- package/web/app/immutable/chunks/{DkvJR80T.js → Cv_J2c72.js} +1 -1
- package/web/app/immutable/chunks/{DHApIXYn.js → CwqpuMd6.js} +1 -1
- package/web/app/immutable/chunks/{BtBKKn81.js → CxdrVCtW.js} +1 -1
- package/web/app/immutable/chunks/{DZmMN74z.js → D3mUsAm9.js} +1 -1
- package/web/app/immutable/chunks/D5jO2tMO.js +1 -0
- package/web/app/immutable/chunks/{D1uFLIU4.js → D6YDmdhV.js} +2 -2
- package/web/app/immutable/chunks/{B9dU3-fa.js → D6qSHwEu.js} +1 -1
- package/web/app/immutable/chunks/{PDh5csw9.js → DATvyyct.js} +1 -1
- package/web/app/immutable/chunks/{CgWXj0YG.js → DBN9LmpO.js} +2 -2
- package/web/app/immutable/chunks/{MioiZpXB.js → DC_750GV.js} +1 -1
- package/web/app/immutable/chunks/{BuFMu57Q.js → DEGVinbl.js} +1 -1
- package/web/app/immutable/chunks/{D8FYgRYk.js → DHNidPtN.js} +1 -1
- package/web/app/immutable/chunks/{DOrgOYHc.js → DKBMY4SO.js} +2 -2
- package/web/app/immutable/chunks/{CDRWYo_y.js → DLQToZFF.js} +1 -1
- package/web/app/immutable/chunks/{hX9Crt6i.js → DLqztIqC.js} +1 -1
- package/web/app/immutable/chunks/{BUUYjiKy.js → DOca_73f.js} +1 -1
- package/web/app/immutable/chunks/{NTeezaZ2.js → DOo17E8X.js} +1 -1
- package/web/app/immutable/chunks/{-IITeht6.js → DPHzX3VR.js} +1 -1
- package/web/app/immutable/chunks/{X4o7hGKf.js → DPLUjB3C.js} +4 -4
- package/web/app/immutable/chunks/{C59ujSMF.js → DSbO2mrE.js} +1 -1
- package/web/app/immutable/chunks/{DVH2puba.js → DSf8k2cE.js} +1 -1
- package/web/app/immutable/chunks/DTQYcznv.js +1 -0
- package/web/app/immutable/chunks/{TKg6aZ2_.js → DTXLkH8c.js} +1 -1
- package/web/app/immutable/chunks/{CMO4ot9F.js → DU8kuP6M.js} +1 -1
- package/web/app/immutable/chunks/{CdqlgErf.js → DXCE75Ih.js} +1 -1
- package/web/app/immutable/chunks/{BwScowY6.js → DXDMhDlS.js} +1 -1
- package/web/app/immutable/chunks/{zWI60sec.js → DYmPPjiq.js} +1 -1
- package/web/app/immutable/chunks/{DT4LiP7Y.js → DZNLst19.js} +1 -1
- package/web/app/immutable/chunks/{BBC8ZwBc.js → DZmwTozc.js} +1 -1
- package/web/app/immutable/chunks/{xBFqBq1j.js → D_2_kcuU.js} +1 -1
- package/web/app/immutable/chunks/{Cyfw6OkG.js → D_uYvQAH.js} +1 -1
- package/web/app/immutable/chunks/{DVsRM1tQ.js → DbGgneou.js} +2 -2
- package/web/app/immutable/chunks/{CgLCO0VS.js → DbK3CxeL.js} +1 -1
- package/web/app/immutable/chunks/DbSsu2ZZ.js +2 -0
- package/web/app/immutable/chunks/{CmSDhJgU.js → Dc64E_SR.js} +1 -1
- package/web/app/immutable/chunks/{BnrnoFjd.js → DdSX2jjJ.js} +1 -1
- package/web/app/immutable/chunks/{HLKPZgVy.js → Ddw98WmY.js} +1 -1
- package/web/app/immutable/chunks/{BpIeTy9w.js → DdxviGOy.js} +2 -2
- package/web/app/immutable/chunks/{gsElU_36.js → De4z9gHo.js} +1 -1
- package/web/app/immutable/chunks/{f5lTIPHi.js → DeBWJfUF.js} +1 -1
- package/web/app/immutable/chunks/{D8DQsqlL.js → DeBZgR-l.js} +1 -1
- package/web/app/immutable/chunks/{BdHmsKvO.js → Dj_XMlva.js} +1 -1
- package/web/app/immutable/chunks/{ozzjQyCh.js → Dk6iNNLu.js} +1 -1
- package/web/app/immutable/chunks/{CThb3iAk.js → DlN76n90.js} +1 -1
- package/web/app/immutable/chunks/{WyTFZ_7I.js → DlxIHej5.js} +1 -1
- package/web/app/immutable/chunks/{BZm5iyKH.js → DnpnDt-B.js} +1 -1
- package/web/app/immutable/chunks/{DhUtJEn_.js → Dnr9ynjr.js} +1 -1
- package/web/app/immutable/chunks/{SEJ8ae0u.js → DoBQR8Vx.js} +2 -2
- package/web/app/immutable/chunks/{DVYqzV0n.js → DpMTpLDQ.js} +1 -1
- package/web/app/immutable/chunks/{D__R5V-4.js → Drt5qRI8.js} +1 -1
- package/web/app/immutable/chunks/{D-J8Mlcm.js → DtTm3-vx.js} +2 -2
- package/web/app/immutable/chunks/{pAYxBetQ.js → Dt_vOHph.js} +1 -1
- package/web/app/immutable/chunks/DtftInpc.js +1 -0
- package/web/app/immutable/chunks/{DLykoDqY.js → DuLyqtXH.js} +1 -1
- package/web/app/immutable/chunks/{DTrgzOIA.js → Duypuh1W.js} +1 -1
- package/web/app/immutable/chunks/{C62A1TLT.js → DvCoPCgB.js} +2 -2
- package/web/app/immutable/chunks/{COMJNvT3.js → DxMV_lzZ.js} +1 -1
- package/web/app/immutable/chunks/{DjCFWz1t.js → DyASeQ3m.js} +2 -2
- package/web/app/immutable/chunks/{l6o3Xx95.js → Dz4sFk1c.js} +1 -1
- package/web/app/immutable/chunks/{tHDPdTwr.js → Ek5W6pp5.js} +1 -1
- package/web/app/immutable/chunks/{C8b2UIVX.js → FBAcw4MJ.js} +1 -1
- package/web/app/immutable/chunks/{DNM32kqo.js → H60Tbroe.js} +1 -1
- package/web/app/immutable/chunks/{Dl7ZwNmB.js → HKs3jfWW.js} +1 -1
- package/web/app/immutable/chunks/{SxNmK2GR.js → HvBMlLJP.js} +3 -3
- package/web/app/immutable/chunks/{D4pwA7AS.js → I2ER02OI.js} +2 -2
- package/web/app/immutable/chunks/JzAjTSJP.js +1 -0
- package/web/app/immutable/chunks/{DzX5UiFd.js → LeKgig9P.js} +1 -1
- package/web/app/immutable/chunks/{Cxz3q_28.js → PqUcZw1l.js} +1 -1
- package/web/app/immutable/chunks/{YRBYMsQ5.js → PrJr0a2j.js} +1 -1
- package/web/app/immutable/chunks/{bJswqAg7.js → Q-Oe5gQg.js} +1 -1
- package/web/app/immutable/chunks/{CqhKSPXA.js → QE-hjQtm.js} +1 -1
- package/web/app/immutable/chunks/{CztRrCMq.js → RL06_5hJ.js} +1 -1
- package/web/app/immutable/chunks/{CfaMHdWP.js → RvvsGyv8.js} +1 -1
- package/web/app/immutable/chunks/S3l_n0fN.js +1 -0
- package/web/app/immutable/chunks/{BhzRZYY1.js → SopK520R.js} +2 -2
- package/web/app/immutable/chunks/{CerTrxRJ.js → UYKGMt9K.js} +1 -1
- package/web/app/immutable/chunks/{_VCQMG81.js → VD4zAAAW.js} +1 -1
- package/web/app/immutable/chunks/{gsD5Xe0D.js → Vk-IHNCU.js} +4 -4
- package/web/app/immutable/chunks/{9cPLPH_O.js → WQwO_6NF.js} +1 -1
- package/web/app/immutable/chunks/{CjXLe_MO.js → X8W_BfF4.js} +1 -1
- package/web/app/immutable/chunks/{Ct8owPqN.js → XIXbmV8F.js} +1 -1
- package/web/app/immutable/chunks/{CIX0DuRO.js → XzMpMF29.js} +1 -1
- package/web/app/immutable/chunks/{BdNiI0PS.js → Z8gQAmFb.js} +4 -4
- package/web/app/immutable/chunks/{CVikHxT_.js → Z9xsSWyS.js} +3 -3
- package/web/app/immutable/chunks/{CoTJDQuc.js → _6kx8oz-.js} +1 -1
- package/web/app/immutable/chunks/{BUY1W-f0.js → _xNtAuSN.js} +1 -1
- package/web/app/immutable/chunks/{CTXbgIPd.js → dEUeoghd.js} +41 -41
- package/web/app/immutable/chunks/{Cfd0oFGI.js → dR3YHGeF.js} +1 -1
- package/web/app/immutable/chunks/{CHukbU1Q.js → domP6Duj.js} +1 -1
- package/web/app/immutable/chunks/{BIG4edn9.js → elYeRxWm.js} +1 -1
- package/web/app/immutable/chunks/{CdjPYGHf.js → exKuue_y.js} +1 -1
- package/web/app/immutable/chunks/{B10JrSzM.js → finAdq6c.js} +1 -1
- package/web/app/immutable/chunks/{C4Jo6GXP.js → gURPJ1oX.js} +1 -1
- package/web/app/immutable/chunks/{BnjfAdW_.js → h4-gUr-R.js} +1 -1
- package/web/app/immutable/chunks/{gJDgmD_2.js → hTzIX9qo.js} +1 -1
- package/web/app/immutable/chunks/{nLXSdbN2.js → hY1hM8g2.js} +1 -1
- package/web/app/immutable/chunks/{DhDeMWX_.js → jn3Rypn_.js} +1 -1
- package/web/app/immutable/chunks/{DGySvVDu.js → kjMhmnu9.js} +1 -1
- package/web/app/immutable/chunks/{DIyuJ_GU.js → m3ndyWcI.js} +1 -1
- package/web/app/immutable/chunks/{BIY2S7K4.js → n58mTCVv.js} +1 -1
- package/web/app/immutable/chunks/{BYRfWsRg.js → oPIupn-5.js} +1 -1
- package/web/app/immutable/chunks/{CHFUz5Rr.js → oilydQC6.js} +1 -1
- package/web/app/immutable/chunks/{Ba7k-40o.js → p3fN-Vr3.js} +1 -1
- package/web/app/immutable/chunks/{CnhilOhJ.js → rWjPMnbJ.js} +1 -1
- package/web/app/immutable/chunks/{C-s9_soQ.js → s_GzTTEG.js} +1 -1
- package/web/app/immutable/chunks/{DqWTOCbK.js → uo2kAWaz.js} +1 -1
- package/web/app/immutable/entry/{app.DfuiYuem.js → app.B3U21m46.js} +3 -3
- package/web/app/immutable/entry/start.BmptZn82.js +1 -0
- package/web/app/immutable/nodes/{0.D56mBX7M.js → 0.CWw0htIy.js} +1 -1
- package/web/app/immutable/nodes/{1.az7hmVZE.js → 1.CwxWqCh2.js} +1 -1
- package/web/app/immutable/nodes/{10.ijh736ED.js → 10.DsQSJA4U.js} +1 -1
- package/web/app/immutable/nodes/{11.CPz1gfx7.js → 11.C9N9_Xb9.js} +1 -1
- package/web/app/immutable/nodes/{12.IWuvbIEt.js → 12.CqRfopX4.js} +1 -1
- package/web/app/immutable/nodes/{13.K9ySk2sQ.js → 13.CscEwLVK.js} +3 -3
- package/web/app/immutable/nodes/{14.BvEshoLb.js → 14.CGbyYvxu.js} +1 -1
- package/web/app/immutable/nodes/{15.MdkxIvV5.js → 15.BWtoiI44.js} +1 -1
- package/web/app/immutable/nodes/{16.CKCeF79S.js → 16.Cfgb0nOQ.js} +1 -1
- package/web/app/immutable/nodes/{17.DnoEG3fq.js → 17.DFAwhIn_.js} +2 -2
- package/web/app/immutable/nodes/{2.B4faJzFv.js → 2.DTAk55p0.js} +11 -11
- package/web/app/immutable/nodes/{3.CXkOfW97.js → 3.DGPBblLK.js} +1 -1
- package/web/app/immutable/nodes/4.ReQ1u5-M.js +1 -0
- package/web/app/immutable/nodes/{5.DE5jTHSS.js → 5.Dp2B2lHQ.js} +2 -2
- package/web/app/immutable/nodes/{6.DhIYx_bX.js → 6.BpkWHnQJ.js} +1 -1
- package/web/app/immutable/nodes/{7.CqVh2822.js → 7.C7_Pil7L.js} +1 -1
- package/web/app/immutable/nodes/{8.CtwSJYpI.js → 8.bG-TRaEn.js} +12 -12
- package/web/app/immutable/nodes/{9.RM7Dv9Cl.js → 9.CBynOn0l.js} +20 -20
- package/web/app/version.json +1 -1
- package/web/generated/paraglide.js +9 -9
- package/web/index.html +19 -19
- package/web/app/immutable/chunks/7V9sfwkG.js +0 -1
- package/web/app/immutable/chunks/B5lHtLmV.js +0 -13
- package/web/app/immutable/chunks/CGWRZzdk.js +0 -1
- package/web/app/immutable/chunks/CsF8OjbK.js +0 -1
- package/web/app/immutable/chunks/DWBLeVMU.js +0 -1
- package/web/app/immutable/chunks/D_aUnmwC.js +0 -1
- package/web/app/immutable/chunks/DnzNFOP-.js +0 -1
- package/web/app/immutable/chunks/Dx9ju3Oy.js +0 -2
- package/web/app/immutable/chunks/PXetJRrh.js +0 -2
- package/web/app/immutable/entry/start.DDUK339f.js +0 -1
- package/web/app/immutable/nodes/4.DAQzul95.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{bp as y,t as wt,br as H,a_ as D,bz as
|
|
1
|
+
import{bp as y,t as wt,br as H,a_ as D,bz as Tt,bt as xt,b as kt,bv as N}from"./DTQYcznv.js";import{bs as It,ca as Q,aD as t,a7 as At,ay as X,W as w,bn as Pt,bS as F,c9 as f,aA as J,aB as x,a5 as I,bA as A,bl as P,b_ as L,bO as S}from"./DYhIMPy1.js";import{G as St}from"./-SwunqO3.js";import{c as Wt}from"./BmP1Wws6.js";import{C as V}from"./DypB-Dwi.js";import{L as $t}from"./CSiaiLHL.js";import"./hTzIX9qo.js";import"./Ck9ZyE1n.js";import"./CaxyE6o_.js";import{bc as Dt}from"./CoLl8pQb.js";import"./BP5uyQTv.js";import"./BO67r0G6.js";import{Iz as B,J4 as Nt,Jl as Ft,J9 as Lt,uR as Bt}from"./A0r9TbR7.js";import{T as Et}from"./BZr7mr7Q.js";import{g as Ut}from"./DfN8_dcw.js";import{dr as Ot}from"./B0biUQQF.js";import{bR as jt,bL as Rt,b6 as Ht}from"./dEUeoghd.js";import"./BXeiKdwz.js";import{M as Jt}from"./C52Qm4vO.js";import{V as Mt}from"./DU8kuP6M.js";import{O as Vt}from"./CcvLGgrc.js";import{c as zt}from"./ChTqQfQN.js";import{i as Gt}from"./H2jLkRRS.js";const T=new $t({category:"change-converters"});function M(e,n){return e.path||e.file||e.filePath||e.relativePath||n?.filePath}function Y(e,n){return{additions:e.additions??n?.additions??0,deletions:e.deletions??n?.deletions??0,binary:e.binary??!1}}function qt(e,n){if(n.actor?.type==="agent"&&n.actor.id){const r=n.actor;return{agentId:r.id,agentName:r.name||y.fileTracking_changeTimeline_agent_fallback(),sessionId:r.sessionId||e.sessionId||"",turnNumber:r.turnNumber??e.turnNumber??0,messageId:r.messageId,timestamp:new Date(n.timestamp).getTime()}}if(e.agentId)return{agentId:e.agentId,agentName:e.agentName||y.fileTracking_changeTimeline_agent_fallback(),sessionId:e.sessionId||"",turnNumber:e.turnNumber||0,timestamp:new Date(n.timestamp).getTime()}}function Z(e,n){return{timestamp:new Date(e.timestamp).getTime(),manual:e.actor?.type==="user",agent:qt(n,e)}}function tt(e,n){return{oldContent:n?.oldContent??e.oldContent,newContent:n?.newContent??e.newContent,diff:e.diff??n?.diff}}function et(e,n,r){return r!==void 0?`${e}-${n}-${r}`:`${e}-${n}`}function Kt(e){try{const n=e.data||{},r=e.codeChange;T.debug("Converting event to TrackedChange",{eventType:e.type,eventId:e.id,hasData:!!n,hasCodeChange:!!r});const c=M(n,r);if(e.type.startsWith("file:")&&c){const d=Y(n,r);return T.debug("Creating TrackedChange for file event",{filePath:c,stats:d,hasDiff:!!(n.diff||r?.diff)}),[{id:et("event",e.id),file:c,relativePath:c,stage:V.Unstaged,stats:d,attribution:Z(e,n),content:tt(n,r)}]}return(e.type==="agent:completed"||e.type.startsWith("agent:"))&&n.fileChanges&&Array.isArray(n.fileChanges)?(T.debug("Creating TrackedChanges for agent event",{eventType:e.type,fileChangesCount:n.fileChanges.length,agentId:n.agentId}),n.fileChanges.filter(d=>M(d)?!0:(T.warn("Skipping file change without path",{change:d}),!1)).map((d,s)=>{const v=M(d);if(!v)throw new Error("file change without path");return{id:et("event",e.id,s),file:v,relativePath:v,stage:V.Unstaged,stats:Y(d),attribution:Z(e,n),content:tt(d)}})):(T.debug("No TrackedChanges created for event",{eventType:e.type,eventId:e.id,hasFilePath:!!c,hasFileChanges:!!(n.fileChanges&&Array.isArray(n.fileChanges))}),[])}catch(n){return T.error("Error converting event to TrackedChange",n instanceof Error?n:new Error(String(n)),{eventType:e.type,eventId:e.id}),[]}}function Qt(e){if(!e)return{oldContent:"",newContent:""};const n=[],r=[],c=e.split(`
|
|
2
2
|
`);c.length>0&&c[c.length-1]===""&&c.pop();let d=!1;for(const s of c)if(!(s.startsWith("diff --git")||s.startsWith("index ")||s.startsWith("--- ")||s.startsWith("+++ ")||s.startsWith("\"))){if(s.startsWith("@@")){d=!0;continue}d&&(s.startsWith("+")?r.push(s.slice(1)):s.startsWith("-")?n.push(s.slice(1)):s.startsWith(" ")?(n.push(s.slice(1)),r.push(s.slice(1))):s===""&&(n.push(""),r.push("")))}return{oldContent:n.join(`
|
|
3
3
|
`),newContent:r.join(`
|
|
4
|
-
`)}}var Xt=
|
|
4
|
+
`)}}var Xt=x("<!> <!>",1),Yt=x('<div class="flex items-center gap-1.5 px-3 py-1.5 text-xs text-subtle bg-muted/50 border-b border-border"><span> </span></div>'),Zt=x('<div class="flex flex-col h-full"><!> <div class="flex-1 min-h-0"><!></div></div>'),te=x('<div class="flex flex-col items-center justify-center h-full text-subtle gap-4"><p class="text-sm"> </p> <p class="text-xs opacity-70"> </p></div>'),ee=x('<p class="text-xs opacity-70"> </p>'),ne=x('<div class="flex flex-col items-center justify-center h-full text-subtle gap-4"><p class="text-sm"> </p> <!></div>');function ae(e,n){if(new.target)return wt({component:ae,...e});It(n,!0);const r=()=>N(lt,"$workspace",v),c=()=>N(st,"$foldUnchanged",v),d=()=>N(rt,"$lineWrapping",v),s=()=>N(ot,"$diffSideBySide",v),[v,nt]=xt(),at=a=>{Mt(a,{embedded:!0,get foldEnabled(){return c()},onToggleFold:()=>B.dispatch(Lt()),get wrapEnabled(){return d()},onToggleWrap:()=>B.dispatch(Ft()),get splitEnabled(){return s()},onToggleSplit:()=>B.dispatch(Nt())})},it=a=>{var i=Xt(),g=X(i);{let m=f(()=>y.layout_diffHeader_goToFile_tooltip());Wt(g,()=>Jt,(l,h)=>{h(l,{get icon(){return Dt},get label(){return t(m)},onclick:$=>ut()})})}var C=F(g,2);{var b=m=>{Vt(m,{get filePath(){return t(G)},get workspaceId(){return _()},isDirectory:!1,embedded:!0,get workspaceFolderPath(){return t(O)}})};D(C,m=>{t(G)&&m(b)})}w(a,i)},rt=jt(),st=Rt(),ot=Ht(),dt=zt("ActivityChangesTabType");let E=H(n,"tab",7),_=H(n,"workspaceId",7),U=H(n,"isActive",7);const z=Ut(),lt=Ot(_()),O=f(()=>r()?.worktreePath||r()?.repositoryPath||void 0),o=f(()=>E().data?.event),ct=f(()=>t(o)?Kt(t(o)):[]),u=f(()=>t(ct)[0]),p=f(()=>t(u)?.relativePath||t(u)?.file||null),G=f(()=>t(p)&&t(O)?Gt(t(p))?t(p):`${t(O)}/${t(p)}`:null),j=f(()=>()=>{if(!t(o))return null;const a=t(o).data,i=t(o).codeChange;return a?.diff||i?.diff||t(u)?.content?.diff||null}),q=f(()=>()=>t(u)?.content?!!(t(u).content.oldContent&&t(u).content.newContent):!1);function ft(a){if(!a)return;const i=a.match(/@@ -(\d+)/);return i?parseInt(i[1],10):void 0}const k=f(()=>{if(t(q)()&&t(u)?.content)return{oldContent:t(u).content.oldContent??"",newContent:t(u).content.newContent??""};const a=t(j)();return a?Qt(a):null}),W=f(()=>ft(t(j)())),pt=f(()=>t(W)!==void 0&&t(W)>1),gt=f(()=>{const a=t(p)||"",i=t(o)?.data||{};return{id:`activity-${t(o)?.id||"unknown"}-${a}`,file:a,relativePath:a,stage:V.Committed,status:t(u)?.status||"modified",stats:{additions:i?.additions||t(u)?.stats?.additions||0,deletions:i?.deletions||t(u)?.stats?.deletions||0},attribution:{timestamp:t(o)?.timestamp?new Date(t(o).timestamp).getTime():Date.now()},content:t(k)?{oldContent:t(k).oldContent,newContent:t(k).newContent}:void 0}});function ut(a){if(!t(p))return;const g={type:"file",title:t(p).split("/").pop()||t(p),closable:!0,filePath:t(p),workspaceId:_()};B.dispatch(Bt(_(),g))}Q(()=>{!z||!U()||z.registerActions({display:at,actions:it})}),Q(()=>{if(t(o)){const a=t(o).data;dt.debug("Activity event diff info",{eventType:t(o).type,eventId:t(o).id,filePath:t(p),hasDiffString:!!t(j)(),hasOldNewContent:t(q)(),hasDiffContents:!!t(k),dataAdditions:a?.additions,dataDeletions:a?.deletions})}});var ht={get tab(){return E()},set tab(a){E(a),J()},get workspaceId(){return _()},set workspaceId(a){_(a),J()},get isActive(){return U()},set isActive(a){U(a),J()},$set:Tt,$on:(a,i)=>kt(n,a,i)},K=At(),mt=X(K);{var vt=a=>{var i=Zt(),g=I(i);{var C=l=>{var h=Yt(),$=I(h),R=P($,!0);A(h),L(_t=>S(R,_t),[()=>y.layout_activityChanges_partialDiff_label({line:t(W)??0})]),w(l,h)};D(g,l=>{t(pt)&&l(C)})}var b=F(g,2),m=I(b);St(m,()=>`${t(o)?.id}-${t(p)}`,l=>{{let h=f(()=>s()?"split":"unified");Et(l,{get change(){return t(gt)},get workspaceId(){return _()},get viewMode(){return t(h)},get foldUnchanged(){return c()},get lineWrapping(){return d()},get lineOffset(){return t(W)}})}}),A(b),A(i),w(a,i)},Ct=a=>{var i=te(),g=I(i),C=P(g,!0),b=F(g,2),m=P(b,!0);A(i),L((l,h)=>{S(C,l),S(m,h)},[()=>y.layout_activityChanges_noDiffStored_label(),()=>y.layout_activityChanges_diffNotCaptured_description()]),w(a,i)},bt=a=>{var i=ne(),g=I(i),C=P(g,!0),b=F(g,2);{var m=l=>{var h=ee(),$=P(h,!0);L(R=>S($,R),[()=>y.layout_activityChanges_eventType_label({type:t(o).type})]),w(l,h)};D(b,l=>{t(o)&&l(m)})}A(i),L(l=>S(C,l),[()=>y.layout_activityChanges_noChanges_label()]),w(a,i)};D(mt,a=>{t(p)&&t(k)?a(vt):t(p)?a(Ct,1):a(bt,-1)})}w(e,K);var yt=Pt(ht);return nt(),yt}export{ae as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aG as a,bI as l}from"./DYhIMPy1.js";import{
|
|
1
|
+
import{aG as a,bI as l}from"./DYhIMPy1.js";import{Iz as t}from"./A0r9TbR7.js";const s=Symbol("static-overlay");function n(e){l(s,e)}function b(){return a(s)??(()=>!1)}const r=["border-rose-500/30 bg-rose-500/15 text-rose-700 dark:text-rose-300","border-amber-500/30 bg-amber-500/15 text-amber-700 dark:text-amber-300","border-yellow-500/30 bg-yellow-500/15 text-yellow-700 dark:text-yellow-300","border-emerald-500/30 bg-emerald-500/15 text-emerald-700 dark:text-emerald-300","border-sky-500/30 bg-sky-500/15 text-sky-700 dark:text-sky-300","border-violet-500/30 bg-violet-500/15 text-violet-700 dark:text-violet-300"],o=["hover:bg-rose-500/25","hover:bg-amber-500/25","hover:bg-yellow-500/25","hover:bg-emerald-500/25","hover:bg-sky-500/25","hover:bg-violet-500/25"];function h(e){return r[e%r.length]}function d(e){return o[e%o.length]}const u=t.createSelector(e=>e.theme.preference),v=t.createSelector(e=>e.theme.name==="dark"),S=t.createSelector(e=>e.theme.hasCustomTheme),i=t.createSelector(e=>e.theme.customThemeName),g=t.createSelector(e=>e.theme.activePresetId),x=t.createSelector(e=>e.theme.error);export{i as a,S as b,v as c,x as d,u as e,h as f,d as g,n as p,g as s,b as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as g,br as h,bp as v,bz as w,b as C}from"./
|
|
1
|
+
import{t as g,br as h,bp as v,bz as w,b as C}from"./DTQYcznv.js";import{bs as T,a5 as u,bl as l,bS as _,bA as c,b_ as A,bO as p,W as O,bn as S,aA as j,aB as z}from"./DYhIMPy1.js";var B=z('<div class="flex flex-col items-center justify-center h-full text-subtle gap-4"><div class="text-center"><p class="text-lg font-medium text-foreground"> </p> <p class="text-sm"> </p> <p class="text-xs mt-4 text-subtle"> </p></div></div>');function I(n,a){if(new.target)return g({component:I,...n});T(a,!0);let e=h(a,"tab",7);var m={get tab(){return e()},set tab(t){e(t),j()},$set:w,$on:(t,r)=>C(a,t,r)},s=B(),o=u(s),b=u(o),d=l(b,!0),i=_(b,2),x=l(i,!0),f=_(i,2),y=l(f,!0);return c(o),c(s),A((t,r)=>{p(d,e().title),p(x,t),p(y,r)},[()=>v.layout_panelContent_typeLabel({type:e().type}),()=>v.layout_overviewTab_notImplemented_label()]),O(n,s),S(m)}export{I as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t as zt,br as ee,_ as Jr,a_ as Q,bz as Lt,bv as ce,bt as ir,b as At,bp as c}from"./CGWRZzdk.js";import{bs as Wt,ca as pe,aD as e,bH as f,a5 as T,bA as x,W as l,bn as Nt,bV as N,c9 as n,aA as te,c6 as Ut,ay as ne,be as Ze,b$ as tt,b_ as k,bO as g,bS as p,bl as F,aB as P,bj as Xr,aw as rt,ai as Yr,c5 as rr,a as yr,a7 as je,aj as gt,cd as Gr,br as Zr}from"./DYhIMPy1.js";import{G as Pr,H as Qr}from"./DHP1DFPI.js";import{u as at,w as It,v as fr,n as Ct}from"./BjnZ1Xf3.js";import{c as Rt}from"./nmrokYzj.js";import{b as $r}from"./BaIAhI85.js";import{Ix as j,nw as kr,vy as Ir,vx as Cr,KM as ea,KN as ta,et as ra,eu as aa,Kc as vr,lI as Gt,BD as pr,s1 as gr,nU as oa,ze as ia,a5 as mr,J1 as na,Jj as sa,n7 as la,iE as da,ny as ca,u$ as ua,zB as fa,Kb as va}from"./CicdOSYm.js";import{g as pa}from"./DfN8_dcw.js";import{a as ga,h as ma,j as _a,c as ha,d as wa,i as ba,e as xa,f as _r,g as ya,b as Zt}from"./B_frQYKx.js";import{bA as Pa,bN as $a,dr as ka}from"./CPYWKVyq.js";import{w as hr,d as Ia}from"./L30ES58t.js";import{f as Ca}from"./CnJe4S2a.js";import{k as Qt}from"./CxLPEkg7.js";import{f as Ce,ax as Fa}from"./KJX0Kw6L.js";import"./BEyWfhqM.js";import{F as et,a8 as Sa,aq as Da,aV as Ta,a$ as jt,co as Ea,cp as Ra,bi as Ma,cN as Ua,c4 as ja}from"./By0eqGj-.js";import{d as Va,f as za,t as wr}from"./HLKPZgVy.js";import{c as La}from"./ChTqQfQN.js";import"./DVYqzV0n.js";import{$ as Aa}from"./DAPhb2nP.js";import{i as er,b as Wa,a as Na}from"./H2jLkRRS.js";import{C as ar,p as Ba}from"./DNM32kqo.js";import{M as Oa}from"./HIyZggkg.js";import{t as tr,u as Fr}from"./BM1KP-FJ.js";import"./BRhVB6Sv.js";import"./fCEIPyv5.js";import{M as Mt}from"./DIumxlqP.js";import{V as Ha}from"./CMO4ot9F.js";import{bR as qa,b5 as Ka}from"./CTXbgIPd.js";import{ap as Ja}from"./2XZtwznc.js";import{g as Xa,W as Ya}from"./CClqWu60.js";import{r as Ga,p as Za}from"./BhzRZYY1.js";import{l as Qa}from"./C9gix5Ke.js";const Sr=j.createSelector((X,w)=>kr(X.pdfPreview.previews,w));var eo=P('<div class="flex shrink-0 flex-wrap items-center justify-center gap-2 border-b border-border p-2"><!> <span aria-live="polite"> </span> <!> <!> <span> </span> <!></div> <div class="min-h-0 flex-1 overflow-auto p-4"><canvas class="mx-auto block" role="img"></canvas></div>',1),to=P('<div class="flex h-full min-h-0 flex-col" data-testid="pdf-viewer"><!></div>');function or(X,w){if(new.target)return zt({component:or,...X});Wt(w,!0);const ye=()=>ce(we,"$preview",ot),[ot,re]=ir();let y=ee(w,"workspaceId",7),ae=ee(w,"filePath",7),Pe=ee(w,"gitRootId",7);const Fe=crypto.randomUUID(),we=Sr(Fe),ge=new WeakMap;let G=N(null),Je=N(void 0),z=N(1),B=N(1),se=N(!0),me=N(!1),Se=N(null),A=N(0);const be=n(()=>ye()?.error??e(Se)),De=n(()=>e(be)==="missing"?c.file_pdf_missing_error():e(be)==="large"?c.file_pdf_large_error():e(be)==="invalid"?c.file_pdf_invalid_error():e(be)==="password"?c.file_pdf_password_error():c.file_pdf_load_error());pe(()=>{const d=y(),I=ae();e(A);const b=crypto.randomUUID();return j.dispatch(Ir(Fe,b,d,I,...Pe()?[{gitRootId:Pe()}]:[])),()=>{j.dispatch(Cr(Fe,b))}}),pe(()=>{const d=ye()?.url;let I=!1,b;if(f(G,null),f(Se,null),f(se,!0),f(z,1),f(B,1),!!d)return(async()=>{try{const{loadPdfDocument:W}=await Jr(async()=>{const{loadPdfDocument:_e}=await import("./cb1JHFKl.js");return{loadPdfDocument:_e}},[],import.meta.url);if(I)return;b=W(d);const M=await b.promise;I||f(G,M)}catch(W){if(I)return;f(Se,W instanceof Error&&W.name==="PasswordException"?"password":W instanceof Error&&W.name==="InvalidPDFException"?"invalid":"load",!0)}finally{I||f(se,!1)}})(),()=>{I=!0,b?.destroy()}}),pe(()=>{const d=e(G),I=e(Je),b=e(z),W=e(B);if(!d||!I)return;let M=!1,_e,E;const oe=()=>{if(!E)return;const J=(ge.get(E)??1)-1;J?ge.set(E,J):(ge.delete(E),E.cleanup()),E=void 0};return f(me,!0),(async()=>{try{if(E=await d.getPage(b),ge.set(E,(ge.get(E)??0)+1),M){oe();return}const J=E.getViewport({scale:W}),Z=Math.min(window.devicePixelRatio||1,2,Math.sqrt(16e6/(J.width*J.height)));I.width=Math.ceil(J.width*Z),I.height=Math.ceil(J.height*Z),I.style.width=`${J.width}px`,I.style.height=`${J.height}px`,_e=E.render({canvas:I,viewport:J,transform:[Z,0,0,Z,0,0]}),await _e.promise}catch{M||f(Se,"invalid")}finally{M||f(me,!1)}})(),()=>{M=!0,_e?.cancel(),_e?_e.promise.then(oe,oe):oe()}});var Ne={get workspaceId(){return y()},set workspaceId(d){y(d),te()},get filePath(){return ae()},set filePath(d){ae(d),te()},get gitRootId(){return Pe()},set gitRootId(d){Pe(d),te()},$set:Lt,$on:(d,I)=>At(w,d,I)},Ve=to(),Be=T(Ve);{var o=d=>{{const I=W=>{Ze();var M=tt();k(()=>g(M,e(De))),l(W,M)};let b=n(()=>c.ui_combobox_retry_label());Va(d,{onRetry:()=>Ut(A),get retryLabel(){return e(b)},class:"m-auto",message:I,$$slots:{message:!0}})}},i=d=>{{let I=n(()=>c.file_pdf_loading_label());za(d,{get label(){return e(I)},count:1,class:"p-4"})}},S=d=>{var I=eo(),b=ne(I),W=T(b);{let ue=n(()=>e(z)<=1);Ce(W,{variant:"ghost",size:"compact",get disabled(){return e(ue)},onclick:()=>Ut(z,-1),children:(Ee,ze)=>{Ze();var fe=tt();k(Le=>g(fe,Le),[()=>c.file_pdf_previous_label()]),l(Ee,fe)},$$slots:{default:!0}})}var M=p(W,2),_e=F(M,!0),E=p(M,2);{let ue=n(()=>e(z)>=e(G).numPages);Ce(E,{variant:"ghost",size:"compact",get disabled(){return e(ue)},onclick:()=>Ut(z),children:(Ee,ze)=>{Ze();var fe=tt();k(Le=>g(fe,Le),[()=>c.file_pdf_next_label()]),l(Ee,fe)},$$slots:{default:!0}})}var oe=p(E,2);{let ue=n(()=>e(B)<=.25);Ce(oe,{variant:"ghost",size:"compact",get disabled(){return e(ue)},onclick:()=>f(B,Math.max(.25,e(B)-.25),!0),children:(Ee,ze)=>{Ze();var fe=tt();k(Le=>g(fe,Le),[()=>c.editor_fileViewer_zoomOut_tooltip()]),l(Ee,fe)},$$slots:{default:!0}})}var J=p(oe,2),Z=F(J,!0),it=p(J,2);{let ue=n(()=>e(B)>=3);Ce(it,{variant:"ghost",size:"compact",get disabled(){return e(ue)},onclick:()=>f(B,Math.min(3,e(B)+.25),!0),children:(Ee,ze)=>{Ze();var fe=tt();k(Le=>g(fe,Le),[()=>c.editor_fileViewer_zoomIn_tooltip()]),l(Ee,fe)},$$slots:{default:!0}})}x(b);var nt=p(b,2),st=T(nt);let ut;$r(st,ue=>f(Je,ue),()=>e(Je)),x(nt),k((ue,Ee,ze)=>{g(_e,ue),g(Z,Ee),at(nt,"aria-busy",e(me)),at(st,"aria-label",ze),ut=It(st,"",ut,{visibility:e(me)?"hidden":"visible"})},[()=>c.file_pdf_page_label({page:tr(e(z)),total:tr(e(G).numPages)}),()=>Fr(e(B),{style:"percent"}),()=>c.file_pdf_canvas_ariaLabel({name:ae(),page:tr(e(z))})]),l(d,I)};Q(Be,d=>{e(be)?d(o):e(se)||ye()?.status==="loading"?d(i,1):e(G)&&d(S,2)})}x(Ve),l(X,Ve);var Te=Nt(Ne);return re(),Te}const ro=j.createSelector((X,w)=>kr(X.videoPreview.previews,w));var ao=P('<p role="status"> </p>'),oo=P('<p role="alert"> </p>'),io=P('<div class="flex flex-col items-center gap-3 p-6 text-center text-sm text-subtle"><p class="break-all"> </p> <!> <!></div>'),no=P('<video controls="" preload="metadata" playsinline="" class="max-w-full max-h-full" data-testid="file-video"> </video>',2),so=P('<div class="min-h-0 flex-1 flex items-center justify-center bg-background"><!></div>');function Dr(X,w){if(new.target)return zt({component:Dr,...X});Wt(w,!0);const ye=()=>ce(Je,"$preview",ot),[ot,re]=ir();let y=ee(w,"sourceUrl",7),ae=ee(w,"fileName",7),Pe=ee(w,"allowDownload",7),Fe=ee(w,"downloading",7),we=ee(w,"onDownload",7),ge=N(null);const G=crypto.randomUUID(),Je=ro(G),z=n(()=>ye()?.status==="loading"),B=n(()=>e(ge)??ye()?.error);let se=!1,me=!1;Xr(()=>{me=!0,j.dispatch(ea(G))});function Se(){if(me||e(z))return;const i=y().startsWith("workspace-file://")?new URL(y()):null;if(se||!i||!i.pathname.toLowerCase().endsWith(".mp4")){f(ge,"unsupported");return}se=!0,i.searchParams.set("preview","h264"),j.dispatch(ta(G,i.hostname,i.toString()))}function A(i){if(me)return;const S=i.currentTarget.error?.code;S===2?f(ge,"network"):S!==1&&Se()}var be={get sourceUrl(){return y()},set sourceUrl(i){y(i),te()},get fileName(){return ae()},set fileName(i){ae(i),te()},get allowDownload(){return Pe()},set allowDownload(i){Pe(i),te()},get downloading(){return Fe()},set downloading(i){Fe(i),te()},get onDownload(){return we()},set onDownload(i){we(i),te()},$set:Lt,$on:(i,S)=>At(w,i,S)},De=so(),Ne=T(De);{var Ve=i=>{var S=io(),Te=T(S),d=F(Te,!0),I=p(Te,2);{var b=E=>{var oe=ao(),J=F(oe,!0);k(Z=>g(J,Z),[()=>c.editor_fileViewer_videoPreparing_label()]),l(E,oe)},W=E=>{var oe=oo(),J=F(oe,!0);k(Z=>g(J,Z),[()=>e(B)==="network"?c.editor_fileViewer_videoLoad_error():c.editor_fileViewer_videoUnsupported_label()]),l(E,oe)};Q(I,E=>{e(z)?E(b):E(W,-1)})}var M=p(I,2);{var _e=E=>{Ce(E,{variant:"secondary",size:"sm",get onclick(){return we()},get disabled(){return Fe()},children:(oe,J)=>{Ze();var Z=tt();k(it=>g(Z,it),[()=>c.layout_fileTab_downloadFile_label()]),l(oe,Z)},$$slots:{default:!0}})};Q(M,E=>{Pe()&&E(_e)})}x(S),k(()=>g(d,ae())),l(i,S)},Be=i=>{var S=no(),Te=F(S,!0);k(d=>{at(S,"src",ye()?.url??y()),g(Te,d)},[()=>c.editor_fileViewer_videoUnsupported_label()]),rt("error",S,A),rt("loadedmetadata",S,d=>{d.currentTarget.videoWidth===0&&Se()}),l(i,S)};Q(Ne,i=>{e(B)||e(z)?i(Ve):i(Be,-1)})}x(De),l(X,De);var o=Nt(be);return re(),o}var lo=P('<!> <span class="text-xs text-subtle min-w-[50px] text-center"> </span> <!> <div class="w-px h-5 bg-border mx-1"></div>',1),co=P('<div class="min-h-0 flex-1 flex flex-col"><div class="flex items-center gap-2 p-2 border-b border-border bg-muted/30"><!> <!> <div class="w-px h-5 bg-border mx-1"></div> <!> <!> <div class="ml-auto text-xs text-subtle"> </div></div> <div><img draggable="false" class="max-w-full max-h-full object-contain"/></div></div>'),uo=P('<div class="min-h-0 flex-1 flex flex-col"><div class="flex items-center gap-2 p-2 border-b border-border bg-muted/30"><!> <!> <div class="ml-auto text-xs text-subtle"> </div></div> <div><img draggable="false" class="max-w-full max-h-full object-contain"/></div></div>'),fo=P('<div class="flex-1 flex flex-col items-center justify-center p-8"><div class="text-subtle mb-4"><svg class="w-24 h-24" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 19V6l12-3v13M9 19c0 1.105-1.343 2-3 2s-3-.895-3-2 1.343-2 3-2 3 .895 3 2zm12-3c0 1.105-1.343 2-3 2s-3-.895-3-2 1.343-2 3-2 3 .895 3 2zM9 10l12-3"></path></svg></div> <div class="text-sm text-subtle mb-4"> </div> <audio controls="" class="w-full max-w-md"><source/> </audio></div>'),vo=P("<!> ",1),po=P('<div class="flex-1 flex flex-col items-center justify-center p-8"><div class="text-subtle mb-4"><svg class="w-24 h-24" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg></div> <p class="text-sm text-subtle mb-4"> </p> <!></div>'),go=P('<th class="border border-border px-2 py-1 text-left text-xs font-medium bg-muted"> </th>'),mo=P('<td class="border border-border px-2 py-1 text-xs"> </td>'),_o=P("<tr></tr>"),ho=P('<div class="flex-1 overflow-auto p-4"><table class="w-full border-collapse"><thead><tr></tr></thead><tbody></tbody></table></div>'),wo=P('<div class="flex-1 flex flex-col items-center justify-center p-8"><div class="text-subtle mb-4"><svg class="w-24 h-24" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M20 13V6a2 2 0 00-2-2H6a2 2 0 00-2 2v7m16 0v5a2 2 0 01-2 2H6a2 2 0 01-2-2v-5m16 0h-2.586a1 1 0 00-.707.293l-2.414 2.414a1 1 0 01-.707.293h-3.172a1 1 0 01-.707-.293l-2.414-2.414A1 1 0 006.586 13H4"></path></svg></div> <p class="text-sm text-subtle mb-2"> </p> <p class="text-xs text-subtle"> </p></div>'),bo=P('<div class="flex-1 flex flex-col items-center justify-center p-8"><div class="text-subtle mb-4"><svg class="w-24 h-24" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 3v2m6-2v2M9 19v2m6-2v2M5 9H3m2 6H3m18-6h-2m2 6h-2M7 19h10a2 2 0 002-2V7a2 2 0 00-2-2H7a2 2 0 00-2 2v10a2 2 0 002 2zM9 9h6v6H9V9z"></path></svg></div> <p class="text-sm text-subtle mb-2"> </p> <p class="text-xs text-subtle"> </p></div>'),xo=P('<div class="h-full flex flex-col"><!></div>');function Vt(X,w){if(new.target)return zt({component:Vt,...X});Wt(w,!0);const ye=t=>{var a=lo(),u=ne(a);{let O=n(()=>c.editor_fileViewer_zoomOut_tooltip());Ce(u,{size:"icon",variant:"ghost",class:"h-7 w-7",onclick:oe,get title(){return e(O)},children:(D,V)=>{et(D,{get icon(){return Ea},size:"sm"})},$$slots:{default:!0}})}var m=p(u,2),h=F(m,!0),R=p(m,2);{let O=n(()=>c.editor_fileViewer_zoomIn_tooltip());Ce(R,{size:"icon",variant:"ghost",class:"h-7 w-7",onclick:E,get title(){return e(O)},children:(D,V)=>{et(D,{get icon(){return Ra},size:"sm"})},$$slots:{default:!0}})}Ze(2),k(()=>g(h,e(Se))),l(t,a)},ot=La("FileViewer");let re=ee(w,"filePath",7),y=ee(w,"fileContent",7,""),ae=ee(w,"sourceUrl",7),Pe=ee(w,"language",7),Fe=ee(w,"isBinary",7),we=ee(w,"allowDownload",7,!0),ge=ee(w,"onDownload",7),G=ee(w,"downloading",7,!1);const Je=t=>{const a=t.split(".").pop()?.toLowerCase()||"";return["png","jpg","jpeg","gif","webp","bmp","ico","avif"].includes(a)?"image":a==="svg"?"svg":["mp4","webm","ogg","mov","avi"].includes(a)?"video":["mp3","wav","ogg","m4a","flac"].includes(a)?"audio":a==="pdf"?"pdf":["md","markdown"].includes(a)?"markdown":a==="json"?"json":a==="csv"?"csv":["yaml","yml"].includes(a)?"yaml":a==="xml"?"xml":["zip","tar","gz","rar","7z","bz2"].includes(a)?"archive":["exe","dll","so","dylib","wasm"].includes(a)?"binary":"text"},z=n(()=>Je(re())),B=n(()=>re().split("/").pop()||c.editor_fileViewer_unknown_fallback());let se=N(100),me=N(0);const Se=n(()=>Fr(e(se)/100,{style:"percent",maximumFractionDigits:0}));let A=N(!1),be=N(0),De=N(0),Ne=N(0),Ve=N(0),Be=N(!1),o=null;function i(){const t=o;o=null,f(Be,!1),t?.viewport.hasPointerCapture(t.pointerId)&&t.viewport.releasePointerCapture(t.pointerId)}function S(t){if(t.button!==0||!t.isPrimary||o)return;const a=t.currentTarget;a.setPointerCapture(t.pointerId),o={pointerId:t.pointerId,x:t.clientX,y:t.clientY,viewport:a},f(Be,!0),t.preventDefault()}function Te(t){if(!(!o||t.pointerId!==o.pointerId)){if((t.buttons&1)===0){i();return}f(Ne,o.viewport.scrollLeft,!0),f(Ve,o.viewport.scrollTop,!0),f(be,e(be)+(t.clientX-o.x)),f(De,e(De)+(t.clientY-o.y)),o.x=t.clientX,o.y=t.clientY}}function d(t){t.pointerId===o?.pointerId&&i()}pe(()=>{re(),ae(),e(se),e(me),f(Ne,0),f(Ve,0)}),pe(()=>(re(),ae(),rr(()=>{i(),f(be,0),f(De,0)}),i));const I=t=>{const a=t.split(".").pop()?.toLowerCase();return a==="jpg"||a==="jpeg"?"image/jpeg":a==="png"?"image/png":a==="gif"?"image/gif":a==="webp"?"image/webp":"application/octet-stream"},b=t=>{const a=t.split(".").pop()?.toLowerCase();if(a==="mp4")return"video/mp4";if(a==="webm")return"video/webm"},W=()=>{if(ae())return ae();if(typeof y()=="string")return y().startsWith("data:")||y().startsWith("http")?y():Fe()?`data:${I(re())};base64,${y()}`:`data:${I(re())};base64,${y()}`;if(y()instanceof ArrayBuffer){const a=new Uint8Array(y()).reduce((m,h)=>m+String.fromCharCode(h),""),u=btoa(a);return`data:${I(re())};base64,${u}`}return""},M=()=>{if(ae())return ae();const t=b(re());if(!t)return"";if(typeof y()=="string")return y().startsWith("data:")||y().startsWith("http")?y():`data:${t};base64,${y()}`;const a=new Uint8Array(y()),u=[],m=32768;for(let h=0;h<a.length;h+=m)u.push(String.fromCharCode(...a.subarray(h,h+m)));return`data:${t};base64,${btoa(u.join(""))}`},_e=()=>{const t=typeof y()=="string"?new TextEncoder().encode(y()):new Uint8Array(y()),a=[],u=32768;for(let m=0;m<t.length;m+=u)a.push(String.fromCharCode(...t.subarray(m,m+u)));return`data:image/svg+xml;base64,${btoa(a.join(""))}`},E=()=>{f(se,Math.min(e(se)+25,500),!0)},oe=()=>{f(se,Math.max(e(se)-25,25),!0)},J=()=>{f(me,(e(me)+90)%360)},Z=()=>{if(!we()||G())return;if(ge()){ge()();return}const t=document.createElement("a");t.href=e(z)==="video"?M():e(z)==="svg"?_e():W(),t.download=e(B),t.click()},it=async()=>{try{const t=W(),a=new Image;a.crossOrigin="anonymous";const u=await new Promise((m,h)=>{a.onload=()=>{const R=document.createElement("canvas");R.width=a.naturalWidth,R.height=a.naturalHeight;const O=R.getContext("2d");if(!O){h(new Error("Failed to get canvas context"));return}O.drawImage(a,0,0),R.toBlob(D=>{D?m(D):h(new Error("Failed to create blob from canvas"))},"image/png",1)},a.onerror=()=>h(new Error("Failed to load image")),a.src=t});await navigator.clipboard.write([new ClipboardItem({"image/png":u})]),f(A,!0),setTimeout(()=>f(A,!1),2e3)}catch(t){ot.error("Failed to copy image:",t)}},nt=t=>{try{const a=JSON.parse(t);return JSON.stringify(a,null,2)}catch{return t}},st=t=>t.split(`
|
|
2
|
-
`).map(u=>u.split(",").map(m=>m.trim()));var ut={get filePath(){return re()},set filePath(t){re(t),te()},get fileContent(){return y()},set fileContent(t=""){y(t),te()},get sourceUrl(){return ae()},set sourceUrl(t){ae(t),te()},get language(){return Pe()},set language(t){Pe(t),te()},get isBinary(){return Fe()},set isBinary(t){Fe(t),te()},get allowDownload(){return we()},set allowDownload(t=!0){we(t),te()},get onDownload(){return ge()},set onDownload(t){ge(t),te()},get downloading(){return G()},set downloading(t=!1){G(t),te()},$set:Lt,$on:(t,a)=>At(w,t,a)},ue=xo();rt("blur",yr,i);var Ee=T(ue);{var ze=t=>{var a=co(),u=T(a),m=T(u);ye(m);var h=p(m,2);{let he=n(()=>c.editor_fileViewer_rotate_tooltip());Ce(h,{size:"icon",variant:"ghost",class:"h-7 w-7",onclick:J,get title(){return e(he)},children:($e,He)=>{et($e,{get icon(){return Sa},size:"sm"})},$$slots:{default:!0}})}var R=p(h,4);{let he=n(()=>c.editor_fileViewer_copyImage_tooltip());Ce(R,{size:"icon",variant:"ghost",class:"h-7 w-7",onclick:it,get title(){return e(he)},children:($e,He)=>{var ke=je(),St=ne(ke);{var Dt=Ie=>{et(Ie,{get icon(){return Da},size:"sm",class:"text-green-500"})},Ye=Ie=>{et(Ie,{get icon(){return Ta},size:"sm"})};Q(St,Ie=>{e(A)?Ie(Dt):Ie(Ye,-1)})}l($e,ke)},$$slots:{default:!0}})}var O=p(R,2);{let he=n(()=>!we()||G()),$e=n(()=>c.editor_fileViewer_download_tooltip());Ce(O,{size:"icon",variant:"ghost",class:"h-7 w-7",onclick:Z,get disabled(){return e(he)},get title(){return e($e)},children:(He,ke)=>{et(He,{get icon(){return jt},size:"sm"})},$$slots:{default:!0}})}var D=p(O,2),V=F(D,!0);x(u);var H=p(u,2),xe=F(H);x(a),k(he=>{g(V,e(B)),fr(H,1,`relative min-h-0 flex-1 overflow-auto bg-checkered flex items-center justify-center p-4 select-none ${e(Be)?"cursor-grabbing":"cursor-grab"}`,"svelte-1uj35xu"),It(H,`--pan-scroll-x: ${e(Ne)??""}px; --pan-scroll-y: ${e(Ve)??""}px;`),at(xe,"src",he),at(xe,"alt",e(B)),It(xe,`translate: ${e(be)??""}px ${e(De)??""}px; transform: scale(${e(se)/100}) rotate(${e(me)??""}deg); transition: transform 0.2s;`)},[()=>W()]),gt("pointerdown",H,S),gt("pointermove",H,Te),gt("pointerup",H,d),rt("pointercancel",H,d),rt("lostpointercapture",H,d),l(t,a)},fe=t=>{var a=uo(),u=T(a),m=T(u);ye(m);var h=p(m,2);{let H=n(()=>!we()||G()),xe=n(()=>c.editor_fileViewer_download_tooltip());Ce(h,{size:"icon",variant:"ghost",class:"h-7 w-7",onclick:Z,get disabled(){return e(H)},get title(){return e(xe)},children:(he,$e)=>{et(he,{get icon(){return jt},size:"sm"})},$$slots:{default:!0}})}var R=p(h,2),O=F(R,!0);x(u);var D=p(u,2),V=F(D);x(a),k(H=>{g(O,e(B)),fr(D,1,`relative min-h-0 flex-1 overflow-auto bg-checkered flex items-center justify-center p-4 select-none ${e(Be)?"cursor-grabbing":"cursor-grab"}`,"svelte-1uj35xu"),It(D,`--pan-scroll-x: ${e(Ne)??""}px; --pan-scroll-y: ${e(Ve)??""}px;`),at(V,"src",H),at(V,"alt",e(B)),It(V,`translate: ${e(be)??""}px ${e(De)??""}px; transform: scale(${e(se)/100});`)},[()=>_e()]),gt("pointerdown",D,S),gt("pointermove",D,Te),gt("pointerup",D,d),rt("pointercancel",D,d),rt("lostpointercapture",D,d),l(t,a)},Le=t=>{const a=n(M);var u=je(),m=ne(u);Pr(m,()=>re()+e(a),h=>{Dr(h,{get sourceUrl(){return e(a)},get fileName(){return e(B)},get allowDownload(){return we()},get downloading(){return G()},onDownload:Z})}),l(t,u)},mt=t=>{var a=fo(),u=p(T(a),2),m=F(u,!0),h=p(u,2),R=T(h),O=p(R);x(h),x(a),k((D,V)=>{g(m,e(B)),at(R,"src",D),g(O,` ${V??""}`)},[()=>W(),()=>c.editor_fileViewer_audioUnsupported_label()]),l(t,a)},Bt=t=>{var a=po(),u=p(T(a),2),m=F(u,!0),h=p(u,2);{let R=n(()=>!we()||G());Ce(h,{size:"sm",variant:"secondary",onclick:Z,get disabled(){return e(R)},children:(O,D)=>{var V=vo(),H=ne(V);et(H,{get icon(){return jt},size:"sm",class:"mr-2"});var xe=p(H);k(he=>g(xe,` ${he??""}`),[()=>c.editor_fileViewer_downloadPdf_label()]),l(O,V)},$$slots:{default:!0}})}x(a),k(R=>g(m,R),[()=>c.editor_fileViewer_pdfUnavailable_label()]),l(t,a)},Ot=t=>{{let a=n(()=>nt(y().toString()));ar(t,{get value(){return e(a)},language:"json",get fileName(){return re()},lineNumbers:!0,readOnly:!0})}},Oe=t=>{const a=n(()=>st(y().toString()));var u=ho(),m=T(u),h=T(m),R=T(h);Ct(R,23,()=>e(a)[0]||[],(D,V)=>`header-${V}-${D}`,(D,V)=>{var H=go(),xe=F(H,!0);k(()=>g(xe,e(V))),l(D,H)}),x(R),x(h);var O=p(h);Ct(O,23,()=>e(a).slice(1),(D,V)=>`row-${V}`,(D,V,H)=>{var xe=_o();Ct(xe,23,()=>e(V),(he,$e)=>`cell-${e(H)}-${$e}`,(he,$e)=>{var He=mo(),ke=F(He,!0);k(()=>g(ke,e($e))),l(he,He)}),x(xe),l(D,xe)}),x(O),x(m),x(u),l(t,u)},Xe=t=>{var a=wo(),u=p(T(a),2),m=F(u,!0),h=p(u,2),R=F(h,!0);x(a),k(O=>{g(m,e(B)),g(R,O)},[()=>c.editor_fileViewer_archive_label()]),l(t,a)},Ht=t=>{var a=bo(),u=p(T(a),2),m=F(u,!0),h=p(u,2),R=F(h,!0);x(a),k(O=>{g(m,e(B)),g(R,O)},[()=>c.editor_fileViewer_binary_label()]),l(t,a)},Ft=t=>{{let a=n(()=>y().toString());ar(t,{get value(){return e(a)},get language(){return Pe()},get fileName(){return re()},lineNumbers:!0,highlightActiveLine:!0})}};Q(Ee,t=>{e(z)==="image"?t(ze):e(z)==="svg"?t(fe,1):e(z)==="video"?t(Le,2):e(z)==="audio"?t(mt,3):e(z)==="pdf"?t(Bt,4):e(z)==="json"?t(Ot,5):e(z)==="csv"?t(Oe,6):e(z)==="archive"?t(Xe,7):e(z)==="binary"?t(Ht,8):t(Ft,-1)})}return x(ue),l(X,ue),Nt(ut)}Yr(["pointerdown","pointermove","pointerup"]);const yo=/access denied|permission denied|outside (?:the )?workspace/i,Po=/file not found|no such file or directory/i;function $o(X){return yo.test(X)?"access-denied":X===c.files_read_notFound_error()||Po.test(X)?"not-found":"generic"}function ko(X){switch(X){case"access-denied":return c.layout_fileTab_errorAccessDenied_label();case"not-found":return c.layout_fileTab_errorNotFound_label();case"generic":return c.layout_fileTab_errorGeneric_label()}}var Io=P("<!> <!>",1),Co=P("<!> <!> <!>",1),Fo=P('<div class="flex flex-col items-center justify-center h-full text-subtle gap-2"><p> </p> <p class="text-xs"> </p></div>'),br=P('<div class="flex h-full items-center justify-center p-4 text-subtle"><p role="alert"> </p></div>'),So=P('<div class="flex h-full items-center justify-center text-subtle"><p> </p></div>'),xr=P('<div class="flex items-center justify-center h-full text-subtle"><p> </p></div>'),Do=P('<div class="flex items-center gap-3"><!> <!></div>'),To=P('<div class="flex flex-col h-full"><div class="flex-1 p-4 space-y-2"></div></div>'),Eo=P('<p class="text-xs"> </p>'),Ro=P("<li><!></li>"),Mo=P('<p class="text-xs mt-2"> </p> <ul class="flex flex-col items-center gap-1"></ul>',1),Uo=P('<div class="flex flex-col items-center justify-center h-full text-subtle gap-2"><p class="text-danger" role="alert"> </p> <p class="text-xs font-mono"> </p> <!> <!></div>'),jo=P('<div class="flex flex-col items-center justify-center h-full text-subtle gap-3 p-4"><p> </p> <p class="text-xs break-all"> </p> <!></div>'),Vo=P('<div class="h-full overflow-auto p-4"><!></div>');function zo(X,w){if(new.target)return zt({component:zo,...X});Wt(w,!0);const ye=()=>ce(Ot,"$workspace",A),ot=()=>ce(_e,"$fileContentStore",A),re=()=>ce(E,"$fileLoadingStore",A),y=()=>ce(oe,"$fileSavingStore",A),ae=()=>ce(J,"$fileErrorStore",A),Pe=()=>ce(Z,"$fileErrorInfoStore",A),Fe=()=>ce(it,"$homeView$",A),we=()=>ce(nt,"$fileNotFoundCandidatesStore",A),ge=()=>ce(st,"$isFileBinaryStore",A),G=()=>ce(ut,"$isFileDirtyStore",A),Je=()=>ce(ue,"$fileLastUpdatedStore",A),z=()=>ce(Ee,"$ftChanges$",A),B=()=>ce(Bt,"$gutterRead$",A),se=()=>ce(Ve,"$lineWrapping",A),me=()=>ce(Be,"$diffIndicators",A),Se=()=>ce(Le,"$rootMediaPreview",A),[A,be]=ir(),De=r=>{var s=Io(),$=ne(s);{var C=de=>{var Ae=je(),qe=ne(Ae);Rt(qe,()=>Mt,(pt,xt)=>{xt(pt,{get icon(){return Ma},get label(){return e(he)},disabled:!0})}),l(de,Ae)};Q($,de=>{!e(_t)&&!e(b)&&!e(V)&&de(C)})}var le=p($,2);{var Re=de=>{{let Ae=n(()=>!e(Tt)||!e(Ye)),qe=n(()=>!e(b)&&(!e(Tt)||!e(Ye)));Ha(de,{embedded:!0,showFold:!1,showSplit:!1,get showPreview(){return e(Tt)},get previewEnabled(){return e(Ye)},onTogglePreview:()=>f(Ye,!e(Ye)),get showWrap(){return e(Ae)},get wrapEnabled(){return se()},onToggleWrap:()=>j.dispatch(sa()),get showDiff(){return e(qe)},get diffEnabled(){return me()},onToggleDiff:()=>j.dispatch(na())})}};Q(le,de=>{o().filePath&&!e(_t)&&!e(V)&&de(Re)})}l(r,s)},Ne=r=>{var s=je(),$=ne(s);{var C=le=>{var Re=Co(),de=ne(Re);{var Ae=We=>{var Ge=je(),dt=ne(Ge);{let yt=n(()=>c.layout_fileTab_goToChanges_tooltip());Rt(dt,()=>Mt,(Pt,$t)=>{$t(Pt,{get icon(){return ja},get label(){return e(yt)},onclick:Lr})})}l(We,Ge)};Q(de,We=>{e(Rr)&&We(Ae)})}var qe=p(de,2);{var pt=We=>{var Ge=je(),dt=ne(Ge);{let yt=n(()=>c.layout_fileTab_downloadFile_label()),Pt=n(()=>!e(wt)||e(lt));Rt(dt,()=>Mt,($t,Jt)=>{Jt($t,{get icon(){return jt},get label(){return e(yt)},onclick:Et,get disabled(){return e(Pt)}})})}l(We,Ge)};Q(qe,We=>{e(Qe)&&We(pt)})}var xt=p(qe,2);{let We=n(()=>c.layout_fileTab_deleteFile_tooltip());Rt(xt,()=>Mt,(Ge,dt)=>{dt(Ge,{get icon(){return Ua},get label(){return e(We)},onclick:Ar,destructive:!0})})}l(le,Re)};Q($,le=>{o().filePath&&!e(_t)&&!e(b)&&le(C)})}l(r,s)},Ve=qa(),Be=Ka();let o=ee(w,"tab",7),i=ee(w,"workspaceId",7),S=ee(w,"isActive",7),Te=ee(w,"isPanelFocused",7);pe(()=>{const r=i();if(!(!S()||!r||e(d)))return j.dispatch(ra(r,"files")),()=>j.dispatch(aa(r,"files"))});const d=n(()=>typeof o().data?.gitRootId=="string"?o().data.gitRootId:void 0),I=n(()=>typeof o().data?.gitRootPath=="string"?o().data.gitRootPath:void 0),b=n(()=>!!e(d)),W=n(()=>o().filePath?Ca(o().filePath,e(d)):o().filePath),M=Gr(e(W));pe(()=>{M.set(e(W))});const _e=ga(i(),M),E=ma(i(),M),oe=_a(i(),M),J=ha(i(),M),Z=wa(i(),M),it=Qa(i()),nt=ba(i(),M),st=xa(i(),M),ut=_r(i(),M),ue=ya(i(),M),Ee=Pa(i()),ze=pa(),fe=crypto.randomUUID(),Le=Sr(fe),mt=`file-gutter:${crypto.randomUUID()}`,Bt=$a(i(),mt),Ot=ka(i()),Oe=n(()=>ye()?.worktreePath||ye()?.repositoryPath||ye()?.path||null),Xe=n(ot),Ht=Xa();pe(()=>{e(Xe)!==null&&e(Xe)!==void 0&&Ht?.markContentLoaded()});const Ft=n(re),t=n(y),a=n(ae),u=n(()=>e(a)?$o(e(a)):"generic"),m=n(()=>e(a)?Ga(Pe()):null);let h=N(0),R=!1;pe(()=>{const r=Fe();if(!r||r.unavailable){R=!1;return}e(m)&&!R&&(R=!0,rr(()=>Ut(h)))});const O=5,D=n(()=>(we()??[]).slice(0,O)),V=n(ge),H=n(G),xe=n(Je),he=n(()=>e(t)?c.ui_saveIndicator_saving_tooltip():e(H)?c.ui_saveIndicator_autoSaving_tooltip():c.ui_saveIndicator_saved_tooltip());let $e=N(null),He=N(Zr([])),ke=N(null),St=N(void 0),Dt=N(void 0),Ye=N(!0);pe(()=>{const r=o().data?.line,s=o().data?.jumpTimestamp;!r||s!==void 0&&s===e(Dt)||(f(Dt,s,!0),f(St,{line:r},!0),f(Ye,!1))});const Ie=n(()=>e(d)?hr(o().filePath,e(I)):null),_t=n(()=>e(d)?!e(Ie):!!(o().filePath&&(Wa(o().filePath)||e(Oe)&&Na(o().filePath,e(Oe))))),ht=n(()=>o().filePath&&e(Oe)?er(o().filePath)?o().filePath:`${e(Oe)}/${o().filePath}`:null),ft=n(()=>!!o().filePath&&/\.pdf$/i.test(o().filePath)),vt=n(()=>!!o().filePath&&/\.(?:png|jpe?g|gif|webp|mp4|webm)$/i.test(o().filePath)),Qe=n(()=>i()&&/^[A-Za-z0-9._-]+$/.test(i())?hr(o().filePath,e(Oe)):null),Tr=n(()=>!e(d)&&e(Qe)?e(Qe).split("/").slice(0,-1).join("/"):void 0),qt=n(()=>e(ft)||e(vt)?e(Qe):null),nr=n(()=>e(d)&&e(vt)?{png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",webp:"image/webp",mp4:"video/mp4",webm:"video/webm"}[o().filePath?.split(".").pop()?.toLowerCase()??""]:void 0);pe(()=>{if(!S()||!e(d)||!e(Ie)||!e(nr))return;const r=crypto.randomUUID();return j.dispatch(Ir(fe,r,i(),e(Ie),{gitRootId:e(d),mimeType:e(nr)})),()=>j.dispatch(Cr(fe,r))});let lt=N(!1);const wt=n(()=>!!e(Qe)&&!e(Ft)&&(!e(vt)||e(ke)===e(Qe))),sr=n(()=>e(ke)&&i()?`workspace-file://${i()}/${e(ke).split("/").map(encodeURIComponent).join("/")}`:null),Kt=n(()=>o().filePath?ca(o().filePath):"plaintext"),Tt=n(()=>e(Kt)==="markdown");pe(()=>{if(!S()||e(ft)||e(d))return;const r=e(qt),s=o().filePath,$=i(),C=o().id;if(f(ke,null),!r||!s||!$)return;let le=!1;const Re=()=>!le&&i()===$&&o().id===C&&o().filePath===s;return(async()=>{let de=!1;try{de=(await Fa("file.stat",{workspaceId:$,path:r}))?.isFile===!0}catch{}if(!Re())return;if(de){f(ke,r,!0);return}if(!/\.(?:png|jpe?g|gif|webp|mp4|webm)$/i.test(r)){f(ke,r,!0);return}const{candidates:Ae,truncated:qe}=await Aa($,r);if(Re()){if(!qe&&Ae.length===1){j.dispatch(vr($,s,Ae[0],C));return}f(ke,r,!0)}})(),()=>{le=!0}});function Er(r,s){return!!(r.file===s||r.relativePath===s||r.relativePath&&s.endsWith("/"+r.relativePath)||r.file&&s.endsWith("/"+r.file)||r.relativePath&&r.relativePath.endsWith("/"+s)||r.file&&r.file.endsWith("/"+s))}const bt=n(()=>e(b)||!o().filePath?null:z().find(r=>Er(r,o().filePath))??null),Rr=n(()=>!!e(bt));pe(()=>{if(e(b))return;const r=i(),s=o().filePath,$=e(Oe);return()=>{if(!r||!s)return;const C=Zt.select(j.state,r,s);if(C?.kind!=="editable-text")return;const le=Gt(C.localContent),Re=_r.select(j.state,r,s),de=er(s)?s:$?`${$}/${s}`:null;Re&&de&&j.dispatch(pr(r,s,de,le))}}),pe(()=>{const r=o().filePath,s=e(ht),$=i();if(e(h),!S())return;const C=!e(d)&&!!r&&er(r)&&!e(Oe);r&&$&&!e(_t)&&!e(vt)&&!e(ft)&&!C&&(e(d)&&e(Ie)&&e(W)?j.dispatch(gr($,e(W),s??r,{gitRoot:{id:e(d),relativePath:e(Ie)}})):j.dispatch(gr($,r,s??r)))});function Mr(){return e(Xe)??""}function Ur(r){e(b)||e(V)||!o().filePath||!i()||!e(ht)||j.dispatch(va(i(),o().filePath,Gt(r)))}function jr(){if(e(b)||e(V)||!o().filePath||!e(ht)||e(Xe)===null||e(t))return;const r=Zt.select(j.state,i(),o().filePath);r?.kind==="editable-text"&&j.dispatch(pr(i(),o().filePath,e(ht),Gt(r.localContent)))}function Vr(r){const s=o().filePath;!s||!i()||(j.dispatch(fa(i(),s)),j.dispatch(vr(i(),s,r,o().id)))}pe(()=>{const r=o().filePath,s=e(bt);if(!r||!s){f(He,[],!0);return}if(!S())return;const $=i(),C=crypto.randomUUID();return j.dispatch(oa($,mt,C,{kind:"diffs",path:r,staged:s.stage==="staged"})),()=>{j.dispatch(ia($,mt,C))}}),pe(()=>{const r=B(),s=r?.result?.kind==="diffs"?r.result.chunks:[],$=s.find(C=>C.file===o().filePath)??s[0];f(He,$?Ba($.chunks.map(C=>({oldStart:C.oldStart,oldLines:C.oldLines,newStart:C.newStart,newLines:C.newLines,lines:C.lines.map(le=>(le.type===mr.Addition?"+":le.type===mr.Deletion?"-":" ")+le.content)}))):[],!0)});function zr(r){const s=/Mac|iPhone|iPad|iPod/.test(navigator.userAgent),$=Re=>Qr(r,Ja(Re),s);if($("editor.save")){r.preventDefault(),e(H)&&!e(t)&&jr();return}const C=$("editor.undo")?"undo":$("editor.redo")?"redo":$("editor.toggle-task-list")?"toggle-task-list":$("editor.copy")?"copy":$("editor.select-all")?"select-all":null;if(!C||e(b)&&C!=="copy"&&C!=="select-all")return;C!=="toggle-task-list"&&e($e)?.runShortcut(C)&&r.preventDefault()}function Lr(r){if(!o().filePath||!e(bt))return;const s=r?.metaKey||r?.ctrlKey||!1,C=r?.target?.closest("[data-panel-id]")?.getAttribute("data-panel-id")??void 0;j.dispatch(ua(i(),e(bt),{filePath:o().filePath,changeId:e(bt).id,openInAdjacentPanel:s,sourcePanelId:C}))}async function Et(){const r=e(Qe);if(!(e(b)||!r||!i()||!e(wt)||e(lt))){f(lt,!0);try{const s=await Ia(i(),r,e(Oe));!s?.success&&!s?.canceled&&Qt.error(s?.error?.message||c.layout_fileTab_downloadFailed_error())}catch{Qt.error(c.layout_fileTab_downloadFailed_error())}finally{f(lt,!1)}}}function Ar(){const r=e(ht);if(e(b)||!o().filePath||!i()||!r)return;const s=la(Zt.select(j.state,i(),o().filePath));if(!s){Qt.error(c.ui_reversibleActions_failed_error({message:c.fileExplorer_tree_undoUnavailable_error()}));return}j.dispatch(da(i(),o().filePath,{absolutePath:r,tabId:o().id,snapshot:s}))}pe(()=>{if(!ze||!S())return;const r={isDirty:!e(b)&&e(H),isSaving:!e(b)&&e(t)};rr(()=>{ze.registerActions({display:De,actions:Ne}),ze.registerState(r)})});var Wr={get tab(){return o()},set tab(r){o(r),te()},get workspaceId(){return i()},set workspaceId(r){i(r),te()},get isActive(){return S()},set isActive(r){S(r),te()},get isPanelFocused(){return Te()},set isPanelFocused(r){Te(r),te()},$set:Lt,$on:(r,s)=>At(w,r,s)},lr=je();rt("keydown",yr,r=>S()&&zr(r));var Nr=ne(lr);{var Br=r=>{var s=je(),$=ne(s);Pr($,()=>o().filePath,C=>{var le=je(),Re=ne(le);{var de=_=>{var v=Fo(),U=T(v),q=F(U,!0),L=p(U,2),Me=F(L,!0);x(v),k(Y=>{g(q,Y),g(Me,o().filePath)},[()=>c.layout_fileTab_outsideWorkspace_label()]),l(_,v)},Ae=_=>{var v=je(),U=ne(v);{var q=L=>{or(L,{get workspaceId(){return i()},get filePath(){return e(Ie)},get gitRootId(){return e(d)}})};Q(U,L=>{S()&&L(q)})}l(_,v)},qe=_=>{var v=je(),U=ne(v);{var q=Y=>{var K=br(),ie=T(K),Ue=F(ie,!0);x(K),k(ve=>g(Ue,ve),[()=>c.layout_fileTab_errorLoading_label()]),l(Y,K)},L=Y=>{Vt(Y,{get filePath(){return o().filePath},get sourceUrl(){return Se().url},allowDownload:!1})},Me=Y=>{var K=So(),ie=T(K),Ue=F(ie,!0);x(K),k(ve=>g(Ue,ve),[()=>c.layout_fileTab_preparing_label()]),l(Y,K)};Q(U,Y=>{Se()?.error?Y(q):Se()?.url?Y(L,1):Y(Me,-1)})}l(_,v)},pt=_=>{var v=je(),U=ne(v);{var q=L=>{or(L,{get workspaceId(){return i()},get filePath(){return e(qt)}})};Q(U,L=>{S()&&L(q)})}l(_,v)},xt=_=>{var v=br(),U=T(v),q=F(U,!0);x(v),k(L=>g(q,L),[()=>c.file_pdf_load_error()]),l(_,v)},We=_=>{{let v=n(()=>e(ke)??o().filePath),U=n(()=>!e(b)&&e(wt));Vt(_,{get filePath(){return e(v)},get sourceUrl(){return e(sr)},onDownload:Et,get allowDownload(){return e(U)},get downloading(){return e(lt)}})}},Ge=_=>{var v=xr(),U=T(v),q=F(U,!0);x(v),k(L=>g(q,L),[()=>c.layout_fileTab_preparing_label()]),l(_,v)},dt=_=>{var v=To(),U=T(v);Ct(U,20,()=>[...Array(20).keys()],q=>q,(q,L)=>{var Me=Do(),Y=T(Me);wr(Y,{class:"h-3 w-8 shrink-0"});var K=p(Y,2);wr(K,{class:"h-3",style:`width: ${30+Math.random()*60}%`}),x(Me),l(q,Me)}),x(U),x(v),l(_,v)},yt=_=>{{let v=n(()=>Za(e(m)));Ya(_,{get view(){return e(v)}})}},Pt=_=>{var v=Uo(),U=T(v),q=F(U,!0),L=p(U,2),Me=F(L,!0),Y=p(L,2);{var K=ve=>{var Ke=Eo(),ct=F(Ke,!0);k(()=>g(ct,e(a))),l(ve,Ke)};Q(Y,ve=>{e(u)==="generic"&&ve(K)})}var ie=p(Y,2);{var Ue=ve=>{var Ke=Mo(),ct=ne(Ke),Xt=F(ct,!0),dr=p(ct,2);Ct(dr,20,()=>e(D),kt=>kt,(kt,cr)=>{var Yt=Ro(),qr=T(Yt);Ce(qr,{variant:"link",size:"compact",class:"h-auto p-0 font-mono text-xs",onclick:()=>Vr(cr),children:(Kr,Lo)=>{Ze();var ur=tt();k(()=>g(ur,cr)),l(Kr,ur)},$$slots:{default:!0}}),x(Yt),l(kt,Yt)}),x(dr),k(kt=>g(Xt,kt),[()=>c.layout_fileTab_didYouMean_label()]),l(ve,Ke)};Q(ie,ve=>{e(D).length>0&&ve(Ue)})}x(v),k(ve=>{g(q,ve),g(Me,o().filePath)},[()=>ko(e(u))]),l(_,v)},$t=_=>{var v=jo(),U=T(v),q=F(U,!0),L=p(U,2),Me=F(L,!0),Y=p(L,2);{var K=ie=>{{let Ue=n(()=>!e(wt)||e(lt));Ce(ie,{variant:"secondary",size:"sm",onclick:Et,get disabled(){return e(Ue)},children:(ve,Ke)=>{Ze();var ct=tt();k(Xt=>g(ct,Xt),[()=>c.layout_fileTab_downloadFile_label()]),l(ve,ct)},$$slots:{default:!0}})}};Q(Y,ie=>{!e(b)&&e(Qe)&&ie(K)})}x(v),k(ie=>{g(q,ie),g(Me,o().filePath)},[()=>c.editor_fileViewer_binary_label()]),l(_,v)},Jt=_=>{const v=n(()=>o().filePath?.toLowerCase().endsWith(".svg"));var U=je(),q=ne(U);{var L=K=>{{let ie=n(()=>o().filePath||""),Ue=n(()=>!e(b)&&e(wt));Vt(K,{get filePath(){return e(ie)},get fileContent(){return e(Xe)},get language(){return e(Kt)},get isBinary(){return e(V)},onDownload:Et,get allowDownload(){return e(Ue)},get downloading(){return e(lt)}})}},Me=K=>{var ie=Vo(),Ue=T(ie);Oa(Ue,{get content(){return e(Xe)},get workspaceId(){return i()},get relativeMediaBase(){return e(Tr)},renderRichFencesAsCode:!0,renderDiagrams:!0}),x(ie),l(K,ie)},Y=K=>{var ie=Mr,Ue=Ur;{let ve=n(()=>me()?e(He):[]);$r(ar(K,{get value(){return ie()},set value(Ke){Ue(Ke)},get language(){return e(Kt)},get readOnly(){return e(b)},get fileName(){return o().filePath},get workspaceId(){return i()},get filePath(){return o().filePath},get lineWrapping(){return se()},get lineChanges(){return e(ve)},get jumpTo(){return e(St)},get externalContentVersion(){return e(xe)},get isPanelFocused(){return Te()}}),Ke=>f($e,Ke,!0),()=>e($e))}};Q(q,K=>{e(v)?K(L):e(Tt)&&e(Ye)?K(Me,1):K(Y,-1)})}l(_,U)},Hr=_=>{var v=xr(),U=T(v),q=F(U,!0);x(v),k(L=>g(q,L),[()=>c.layout_fileTab_preparing_label()]),l(_,v)};Q(Re,_=>{e(_t)?_(de):e(d)&&e(ft)&&e(Ie)?_(Ae,1):e(d)&&e(vt)?_(qe,2):e(ft)&&e(qt)?_(pt,3):e(ft)?_(xt,4):e(sr)?_(We,5):e(vt)?_(Ge,6):e(Ft)?_(dt,7):e(m)?_(yt,8):e(a)?_(Pt,9):e(V)?_($t,10):e(Xe)!==null?_(Jt,11):_(Hr,-1)})}l(C,le)}),l(r,s)};Q(Nr,r=>{o().filePath&&r(Br)})}l(X,lr);var Or=Nt(Wr);return be(),Or}export{zo as default};
|
|
1
|
+
import{t as Vt,br as ee,_ as Jr,a_ as Q,bz as Lt,bv as ce,bt as ir,b as At,bp as c}from"./DTQYcznv.js";import{bs as Wt,ca as pe,aD as e,bH as f,a5 as T,bA as x,W as l,bn as Nt,bV as N,c9 as n,aA as te,c6 as Mt,ay as ne,be as Ze,b$ as tt,b_ as k,bO as g,bS as p,bl as F,aB as P,bj as Xr,aw as rt,ai as Yr,c5 as rr,a as yr,a7 as je,aj as gt,cd as Gr,br as Zr}from"./DYhIMPy1.js";import{G as Pr,H as Qr}from"./-SwunqO3.js";import{u as at,w as It,v as fr,n as Ct}from"./Ck9ZyE1n.js";import{c as Rt}from"./BmP1Wws6.js";import{b as $r}from"./BaIAhI85.js";import{Iz as j,nw as kr,vy as Ir,vx as Cr,KO as ea,KP as ta,et as ra,eu as aa,Ke as vr,lI as Gt,BF as pr,s1 as gr,nU as oa,zg as ia,a5 as mr,J3 as na,Jl as sa,n7 as la,iE as da,ny as ca,u$ as ua,zD as fa,Kd as va}from"./A0r9TbR7.js";import{g as pa}from"./DfN8_dcw.js";import{a as ga,h as ma,j as _a,c as ha,d as wa,i as ba,e as xa,f as _r,g as ya,b as Zt}from"./BYFJ74nm.js";import{bA as Pa,bN as $a,dr as ka}from"./B0biUQQF.js";import{w as hr,d as Ia}from"./CcXuSxXv.js";import{f as Ca}from"./BMm9sGZ6.js";import{k as Qt}from"./CuhrgDBI.js";import{f as Ce,ax as Fa}from"./BP5uyQTv.js";import"./CaxyE6o_.js";import{F as et,a8 as Sa,aq as Da,aV as Ta,a$ as jt,co as Ea,cp as Ra,bi as Ua,cN as Ma,c4 as ja}from"./CoLl8pQb.js";import{d as za,f as Va,t as wr}from"./Ddw98WmY.js";import{c as La}from"./ChTqQfQN.js";import"./DpMTpLDQ.js";import{$ as Aa}from"./CdZRK319.js";import{i as er,b as Wa,a as Na}from"./H2jLkRRS.js";import{C as ar,p as Ba}from"./H60Tbroe.js";import{M as Oa}from"./BtXLgEvw.js";import{t as tr,u as Fr}from"./BqqN40AD.js";import"./COrK0goa.js";import"./BXeiKdwz.js";import{M as Ut}from"./C52Qm4vO.js";import{V as Ha}from"./DU8kuP6M.js";import{bR as qa,b5 as Ka}from"./dEUeoghd.js";import{ap as Ja}from"./BiRT6AoP.js";import{g as Xa,W as Ya}from"./CDQzU1Fp.js";import{r as Ga,p as Za}from"./SopK520R.js";import{l as Qa}from"./CpHZSST_.js";const Sr=j.createSelector((X,w)=>kr(X.pdfPreview.previews,w));var eo=P('<div class="flex shrink-0 flex-wrap items-center justify-center gap-2 border-b border-border p-2"><!> <span aria-live="polite"> </span> <!> <!> <span> </span> <!></div> <div class="min-h-0 flex-1 overflow-auto p-4"><canvas class="mx-auto block" role="img"></canvas></div>',1),to=P('<div class="flex h-full min-h-0 flex-col" data-testid="pdf-viewer"><!></div>');function or(X,w){if(new.target)return Vt({component:or,...X});Wt(w,!0);const ye=()=>ce(we,"$preview",ot),[ot,re]=ir();let y=ee(w,"workspaceId",7),ae=ee(w,"filePath",7),Pe=ee(w,"gitRootId",7);const Fe=crypto.randomUUID(),we=Sr(Fe),ge=new WeakMap;let G=N(null),Je=N(void 0),V=N(1),B=N(1),se=N(!0),me=N(!1),Se=N(null),A=N(0);const be=n(()=>ye()?.error??e(Se)),De=n(()=>e(be)==="missing"?c.file_pdf_missing_error():e(be)==="large"?c.file_pdf_large_error():e(be)==="invalid"?c.file_pdf_invalid_error():e(be)==="password"?c.file_pdf_password_error():c.file_pdf_load_error());pe(()=>{const d=y(),I=ae();e(A);const b=crypto.randomUUID();return j.dispatch(Ir(Fe,b,d,I,...Pe()?[{gitRootId:Pe()}]:[])),()=>{j.dispatch(Cr(Fe,b))}}),pe(()=>{const d=ye()?.url;let I=!1,b;if(f(G,null),f(Se,null),f(se,!0),f(V,1),f(B,1),!!d)return(async()=>{try{const{loadPdfDocument:W}=await Jr(async()=>{const{loadPdfDocument:_e}=await import("./cb1JHFKl.js");return{loadPdfDocument:_e}},[],import.meta.url);if(I)return;b=W(d);const U=await b.promise;I||f(G,U)}catch(W){if(I)return;f(Se,W instanceof Error&&W.name==="PasswordException"?"password":W instanceof Error&&W.name==="InvalidPDFException"?"invalid":"load",!0)}finally{I||f(se,!1)}})(),()=>{I=!0,b?.destroy()}}),pe(()=>{const d=e(G),I=e(Je),b=e(V),W=e(B);if(!d||!I)return;let U=!1,_e,E;const oe=()=>{if(!E)return;const J=(ge.get(E)??1)-1;J?ge.set(E,J):(ge.delete(E),E.cleanup()),E=void 0};return f(me,!0),(async()=>{try{if(E=await d.getPage(b),ge.set(E,(ge.get(E)??0)+1),U){oe();return}const J=E.getViewport({scale:W}),Z=Math.min(window.devicePixelRatio||1,2,Math.sqrt(16e6/(J.width*J.height)));I.width=Math.ceil(J.width*Z),I.height=Math.ceil(J.height*Z),I.style.width=`${J.width}px`,I.style.height=`${J.height}px`,_e=E.render({canvas:I,viewport:J,transform:[Z,0,0,Z,0,0]}),await _e.promise}catch{U||f(Se,"invalid")}finally{U||f(me,!1)}})(),()=>{U=!0,_e?.cancel(),_e?_e.promise.then(oe,oe):oe()}});var Ne={get workspaceId(){return y()},set workspaceId(d){y(d),te()},get filePath(){return ae()},set filePath(d){ae(d),te()},get gitRootId(){return Pe()},set gitRootId(d){Pe(d),te()},$set:Lt,$on:(d,I)=>At(w,d,I)},ze=to(),Be=T(ze);{var o=d=>{{const I=W=>{Ze();var U=tt();k(()=>g(U,e(De))),l(W,U)};let b=n(()=>c.ui_combobox_retry_label());za(d,{onRetry:()=>Mt(A),get retryLabel(){return e(b)},class:"m-auto",message:I,$$slots:{message:!0}})}},i=d=>{{let I=n(()=>c.file_pdf_loading_label());Va(d,{get label(){return e(I)},count:1,class:"p-4"})}},S=d=>{var I=eo(),b=ne(I),W=T(b);{let ue=n(()=>e(V)<=1);Ce(W,{variant:"ghost",size:"compact",get disabled(){return e(ue)},onclick:()=>Mt(V,-1),children:(Ee,Ve)=>{Ze();var fe=tt();k(Le=>g(fe,Le),[()=>c.file_pdf_previous_label()]),l(Ee,fe)},$$slots:{default:!0}})}var U=p(W,2),_e=F(U,!0),E=p(U,2);{let ue=n(()=>e(V)>=e(G).numPages);Ce(E,{variant:"ghost",size:"compact",get disabled(){return e(ue)},onclick:()=>Mt(V),children:(Ee,Ve)=>{Ze();var fe=tt();k(Le=>g(fe,Le),[()=>c.file_pdf_next_label()]),l(Ee,fe)},$$slots:{default:!0}})}var oe=p(E,2);{let ue=n(()=>e(B)<=.25);Ce(oe,{variant:"ghost",size:"compact",get disabled(){return e(ue)},onclick:()=>f(B,Math.max(.25,e(B)-.25),!0),children:(Ee,Ve)=>{Ze();var fe=tt();k(Le=>g(fe,Le),[()=>c.editor_fileViewer_zoomOut_tooltip()]),l(Ee,fe)},$$slots:{default:!0}})}var J=p(oe,2),Z=F(J,!0),it=p(J,2);{let ue=n(()=>e(B)>=3);Ce(it,{variant:"ghost",size:"compact",get disabled(){return e(ue)},onclick:()=>f(B,Math.min(3,e(B)+.25),!0),children:(Ee,Ve)=>{Ze();var fe=tt();k(Le=>g(fe,Le),[()=>c.editor_fileViewer_zoomIn_tooltip()]),l(Ee,fe)},$$slots:{default:!0}})}x(b);var nt=p(b,2),st=T(nt);let ut;$r(st,ue=>f(Je,ue),()=>e(Je)),x(nt),k((ue,Ee,Ve)=>{g(_e,ue),g(Z,Ee),at(nt,"aria-busy",e(me)),at(st,"aria-label",Ve),ut=It(st,"",ut,{visibility:e(me)?"hidden":"visible"})},[()=>c.file_pdf_page_label({page:tr(e(V)),total:tr(e(G).numPages)}),()=>Fr(e(B),{style:"percent"}),()=>c.file_pdf_canvas_ariaLabel({name:ae(),page:tr(e(V))})]),l(d,I)};Q(Be,d=>{e(be)?d(o):e(se)||ye()?.status==="loading"?d(i,1):e(G)&&d(S,2)})}x(ze),l(X,ze);var Te=Nt(Ne);return re(),Te}const ro=j.createSelector((X,w)=>kr(X.videoPreview.previews,w));var ao=P('<p role="status"> </p>'),oo=P('<p role="alert"> </p>'),io=P('<div class="flex flex-col items-center gap-3 p-6 text-center text-sm text-subtle"><p class="break-all"> </p> <!> <!></div>'),no=P('<video controls="" preload="metadata" playsinline="" class="max-w-full max-h-full" data-testid="file-video"> </video>',2),so=P('<div class="min-h-0 flex-1 flex items-center justify-center bg-background"><!></div>');function Dr(X,w){if(new.target)return Vt({component:Dr,...X});Wt(w,!0);const ye=()=>ce(Je,"$preview",ot),[ot,re]=ir();let y=ee(w,"sourceUrl",7),ae=ee(w,"fileName",7),Pe=ee(w,"allowDownload",7),Fe=ee(w,"downloading",7),we=ee(w,"onDownload",7),ge=N(null);const G=crypto.randomUUID(),Je=ro(G),V=n(()=>ye()?.status==="loading"),B=n(()=>e(ge)??ye()?.error);let se=!1,me=!1;Xr(()=>{me=!0,j.dispatch(ea(G))});function Se(){if(me||e(V))return;const i=y().startsWith("workspace-file://")?new URL(y()):null;if(se||!i||!i.pathname.toLowerCase().endsWith(".mp4")){f(ge,"unsupported");return}se=!0,i.searchParams.set("preview","h264"),j.dispatch(ta(G,i.hostname,i.toString()))}function A(i){if(me)return;const S=i.currentTarget.error?.code;S===2?f(ge,"network"):S!==1&&Se()}var be={get sourceUrl(){return y()},set sourceUrl(i){y(i),te()},get fileName(){return ae()},set fileName(i){ae(i),te()},get allowDownload(){return Pe()},set allowDownload(i){Pe(i),te()},get downloading(){return Fe()},set downloading(i){Fe(i),te()},get onDownload(){return we()},set onDownload(i){we(i),te()},$set:Lt,$on:(i,S)=>At(w,i,S)},De=so(),Ne=T(De);{var ze=i=>{var S=io(),Te=T(S),d=F(Te,!0),I=p(Te,2);{var b=E=>{var oe=ao(),J=F(oe,!0);k(Z=>g(J,Z),[()=>c.editor_fileViewer_videoPreparing_label()]),l(E,oe)},W=E=>{var oe=oo(),J=F(oe,!0);k(Z=>g(J,Z),[()=>e(B)==="network"?c.editor_fileViewer_videoLoad_error():c.editor_fileViewer_videoUnsupported_label()]),l(E,oe)};Q(I,E=>{e(V)?E(b):E(W,-1)})}var U=p(I,2);{var _e=E=>{Ce(E,{variant:"secondary",size:"sm",get onclick(){return we()},get disabled(){return Fe()},children:(oe,J)=>{Ze();var Z=tt();k(it=>g(Z,it),[()=>c.layout_fileTab_downloadFile_label()]),l(oe,Z)},$$slots:{default:!0}})};Q(U,E=>{Pe()&&E(_e)})}x(S),k(()=>g(d,ae())),l(i,S)},Be=i=>{var S=no(),Te=F(S,!0);k(d=>{at(S,"src",ye()?.url??y()),g(Te,d)},[()=>c.editor_fileViewer_videoUnsupported_label()]),rt("error",S,A),rt("loadedmetadata",S,d=>{d.currentTarget.videoWidth===0&&Se()}),l(i,S)};Q(Ne,i=>{e(B)||e(V)?i(ze):i(Be,-1)})}x(De),l(X,De);var o=Nt(be);return re(),o}var lo=P('<!> <span class="text-xs text-subtle min-w-[50px] text-center"> </span> <!> <div class="w-px h-5 bg-border mx-1"></div>',1),co=P('<div class="min-h-0 flex-1 flex flex-col"><div class="flex items-center gap-2 p-2 border-b border-border bg-muted/30"><!> <!> <div class="w-px h-5 bg-border mx-1"></div> <!> <!> <div class="ml-auto text-xs text-subtle"> </div></div> <div><img draggable="false" class="max-w-full max-h-full object-contain"/></div></div>'),uo=P('<div class="min-h-0 flex-1 flex flex-col"><div class="flex items-center gap-2 p-2 border-b border-border bg-muted/30"><!> <!> <div class="ml-auto text-xs text-subtle"> </div></div> <div><img draggable="false" class="max-w-full max-h-full object-contain"/></div></div>'),fo=P('<div class="flex-1 flex flex-col items-center justify-center p-8"><div class="text-subtle mb-4"><svg class="w-24 h-24" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 19V6l12-3v13M9 19c0 1.105-1.343 2-3 2s-3-.895-3-2 1.343-2 3-2 3 .895 3 2zm12-3c0 1.105-1.343 2-3 2s-3-.895-3-2 1.343-2 3-2 3 .895 3 2zM9 10l12-3"></path></svg></div> <div class="text-sm text-subtle mb-4"> </div> <audio controls="" class="w-full max-w-md"><source/> </audio></div>'),vo=P("<!> ",1),po=P('<div class="flex-1 flex flex-col items-center justify-center p-8"><div class="text-subtle mb-4"><svg class="w-24 h-24" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg></div> <p class="text-sm text-subtle mb-4"> </p> <!></div>'),go=P('<th class="border border-border px-2 py-1 text-left text-xs font-medium bg-muted"> </th>'),mo=P('<td class="border border-border px-2 py-1 text-xs"> </td>'),_o=P("<tr></tr>"),ho=P('<div class="flex-1 overflow-auto p-4"><table class="w-full border-collapse"><thead><tr></tr></thead><tbody></tbody></table></div>'),wo=P('<div class="flex-1 flex flex-col items-center justify-center p-8"><div class="text-subtle mb-4"><svg class="w-24 h-24" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M20 13V6a2 2 0 00-2-2H6a2 2 0 00-2 2v7m16 0v5a2 2 0 01-2 2H6a2 2 0 01-2-2v-5m16 0h-2.586a1 1 0 00-.707.293l-2.414 2.414a1 1 0 01-.707.293h-3.172a1 1 0 01-.707-.293l-2.414-2.414A1 1 0 006.586 13H4"></path></svg></div> <p class="text-sm text-subtle mb-2"> </p> <p class="text-xs text-subtle"> </p></div>'),bo=P('<div class="flex-1 flex flex-col items-center justify-center p-8"><div class="text-subtle mb-4"><svg class="w-24 h-24" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 3v2m6-2v2M9 19v2m6-2v2M5 9H3m2 6H3m18-6h-2m2 6h-2M7 19h10a2 2 0 002-2V7a2 2 0 00-2-2H7a2 2 0 00-2 2v10a2 2 0 002 2zM9 9h6v6H9V9z"></path></svg></div> <p class="text-sm text-subtle mb-2"> </p> <p class="text-xs text-subtle"> </p></div>'),xo=P('<div class="h-full flex flex-col"><!></div>');function zt(X,w){if(new.target)return Vt({component:zt,...X});Wt(w,!0);const ye=t=>{var a=lo(),u=ne(a);{let O=n(()=>c.editor_fileViewer_zoomOut_tooltip());Ce(u,{size:"icon",variant:"ghost",class:"h-7 w-7",onclick:oe,get title(){return e(O)},children:(D,z)=>{et(D,{get icon(){return Ea},size:"sm"})},$$slots:{default:!0}})}var m=p(u,2),h=F(m,!0),R=p(m,2);{let O=n(()=>c.editor_fileViewer_zoomIn_tooltip());Ce(R,{size:"icon",variant:"ghost",class:"h-7 w-7",onclick:E,get title(){return e(O)},children:(D,z)=>{et(D,{get icon(){return Ra},size:"sm"})},$$slots:{default:!0}})}Ze(2),k(()=>g(h,e(Se))),l(t,a)},ot=La("FileViewer");let re=ee(w,"filePath",7),y=ee(w,"fileContent",7,""),ae=ee(w,"sourceUrl",7),Pe=ee(w,"language",7),Fe=ee(w,"isBinary",7),we=ee(w,"allowDownload",7,!0),ge=ee(w,"onDownload",7),G=ee(w,"downloading",7,!1);const Je=t=>{const a=t.split(".").pop()?.toLowerCase()||"";return["png","jpg","jpeg","gif","webp","bmp","ico","avif"].includes(a)?"image":a==="svg"?"svg":["mp4","webm","ogg","mov","avi"].includes(a)?"video":["mp3","wav","ogg","m4a","flac"].includes(a)?"audio":a==="pdf"?"pdf":["md","markdown"].includes(a)?"markdown":a==="json"?"json":a==="csv"?"csv":["yaml","yml"].includes(a)?"yaml":a==="xml"?"xml":["zip","tar","gz","rar","7z","bz2"].includes(a)?"archive":["exe","dll","so","dylib","wasm"].includes(a)?"binary":"text"},V=n(()=>Je(re())),B=n(()=>re().split("/").pop()||c.editor_fileViewer_unknown_fallback());let se=N(100),me=N(0);const Se=n(()=>Fr(e(se)/100,{style:"percent",maximumFractionDigits:0}));let A=N(!1),be=N(0),De=N(0),Ne=N(0),ze=N(0),Be=N(!1),o=null;function i(){const t=o;o=null,f(Be,!1),t?.viewport.hasPointerCapture(t.pointerId)&&t.viewport.releasePointerCapture(t.pointerId)}function S(t){if(t.button!==0||!t.isPrimary||o)return;const a=t.currentTarget;a.setPointerCapture(t.pointerId),o={pointerId:t.pointerId,x:t.clientX,y:t.clientY,viewport:a},f(Be,!0),t.preventDefault()}function Te(t){if(!(!o||t.pointerId!==o.pointerId)){if((t.buttons&1)===0){i();return}f(Ne,o.viewport.scrollLeft,!0),f(ze,o.viewport.scrollTop,!0),f(be,e(be)+(t.clientX-o.x)),f(De,e(De)+(t.clientY-o.y)),o.x=t.clientX,o.y=t.clientY}}function d(t){t.pointerId===o?.pointerId&&i()}pe(()=>{re(),ae(),e(se),e(me),f(Ne,0),f(ze,0)}),pe(()=>(re(),ae(),rr(()=>{i(),f(be,0),f(De,0)}),i));const I=t=>{const a=t.split(".").pop()?.toLowerCase();return a==="jpg"||a==="jpeg"?"image/jpeg":a==="png"?"image/png":a==="gif"?"image/gif":a==="webp"?"image/webp":"application/octet-stream"},b=t=>{const a=t.split(".").pop()?.toLowerCase();if(a==="mp4")return"video/mp4";if(a==="webm")return"video/webm"},W=()=>{if(ae())return ae();if(typeof y()=="string")return y().startsWith("data:")||y().startsWith("http")?y():Fe()?`data:${I(re())};base64,${y()}`:`data:${I(re())};base64,${y()}`;if(y()instanceof ArrayBuffer){const a=new Uint8Array(y()).reduce((m,h)=>m+String.fromCharCode(h),""),u=btoa(a);return`data:${I(re())};base64,${u}`}return""},U=()=>{if(ae())return ae();const t=b(re());if(!t)return"";if(typeof y()=="string")return y().startsWith("data:")||y().startsWith("http")?y():`data:${t};base64,${y()}`;const a=new Uint8Array(y()),u=[],m=32768;for(let h=0;h<a.length;h+=m)u.push(String.fromCharCode(...a.subarray(h,h+m)));return`data:${t};base64,${btoa(u.join(""))}`},_e=()=>{const t=typeof y()=="string"?new TextEncoder().encode(y()):new Uint8Array(y()),a=[],u=32768;for(let m=0;m<t.length;m+=u)a.push(String.fromCharCode(...t.subarray(m,m+u)));return`data:image/svg+xml;base64,${btoa(a.join(""))}`},E=()=>{f(se,Math.min(e(se)+25,500),!0)},oe=()=>{f(se,Math.max(e(se)-25,25),!0)},J=()=>{f(me,(e(me)+90)%360)},Z=()=>{if(!we()||G())return;if(ge()){ge()();return}const t=document.createElement("a");t.href=e(V)==="video"?U():e(V)==="svg"?_e():W(),t.download=e(B),t.click()},it=async()=>{try{const t=W(),a=new Image;a.crossOrigin="anonymous";const u=await new Promise((m,h)=>{a.onload=()=>{const R=document.createElement("canvas");R.width=a.naturalWidth,R.height=a.naturalHeight;const O=R.getContext("2d");if(!O){h(new Error("Failed to get canvas context"));return}O.drawImage(a,0,0),R.toBlob(D=>{D?m(D):h(new Error("Failed to create blob from canvas"))},"image/png",1)},a.onerror=()=>h(new Error("Failed to load image")),a.src=t});await navigator.clipboard.write([new ClipboardItem({"image/png":u})]),f(A,!0),setTimeout(()=>f(A,!1),2e3)}catch(t){ot.error("Failed to copy image:",t)}},nt=t=>{try{const a=JSON.parse(t);return JSON.stringify(a,null,2)}catch{return t}},st=t=>t.split(`
|
|
2
|
+
`).map(u=>u.split(",").map(m=>m.trim()));var ut={get filePath(){return re()},set filePath(t){re(t),te()},get fileContent(){return y()},set fileContent(t=""){y(t),te()},get sourceUrl(){return ae()},set sourceUrl(t){ae(t),te()},get language(){return Pe()},set language(t){Pe(t),te()},get isBinary(){return Fe()},set isBinary(t){Fe(t),te()},get allowDownload(){return we()},set allowDownload(t=!0){we(t),te()},get onDownload(){return ge()},set onDownload(t){ge(t),te()},get downloading(){return G()},set downloading(t=!1){G(t),te()},$set:Lt,$on:(t,a)=>At(w,t,a)},ue=xo();rt("blur",yr,i);var Ee=T(ue);{var Ve=t=>{var a=co(),u=T(a),m=T(u);ye(m);var h=p(m,2);{let he=n(()=>c.editor_fileViewer_rotate_tooltip());Ce(h,{size:"icon",variant:"ghost",class:"h-7 w-7",onclick:J,get title(){return e(he)},children:($e,He)=>{et($e,{get icon(){return Sa},size:"sm"})},$$slots:{default:!0}})}var R=p(h,4);{let he=n(()=>c.editor_fileViewer_copyImage_tooltip());Ce(R,{size:"icon",variant:"ghost",class:"h-7 w-7",onclick:it,get title(){return e(he)},children:($e,He)=>{var ke=je(),St=ne(ke);{var Dt=Ie=>{et(Ie,{get icon(){return Da},size:"sm",class:"text-green-500"})},Ye=Ie=>{et(Ie,{get icon(){return Ta},size:"sm"})};Q(St,Ie=>{e(A)?Ie(Dt):Ie(Ye,-1)})}l($e,ke)},$$slots:{default:!0}})}var O=p(R,2);{let he=n(()=>!we()||G()),$e=n(()=>c.editor_fileViewer_download_tooltip());Ce(O,{size:"icon",variant:"ghost",class:"h-7 w-7",onclick:Z,get disabled(){return e(he)},get title(){return e($e)},children:(He,ke)=>{et(He,{get icon(){return jt},size:"sm"})},$$slots:{default:!0}})}var D=p(O,2),z=F(D,!0);x(u);var H=p(u,2),xe=F(H);x(a),k(he=>{g(z,e(B)),fr(H,1,`relative min-h-0 flex-1 overflow-auto bg-checkered flex items-center justify-center p-4 select-none ${e(Be)?"cursor-grabbing":"cursor-grab"}`,"svelte-1uj35xu"),It(H,`--pan-scroll-x: ${e(Ne)??""}px; --pan-scroll-y: ${e(ze)??""}px;`),at(xe,"src",he),at(xe,"alt",e(B)),It(xe,`translate: ${e(be)??""}px ${e(De)??""}px; transform: scale(${e(se)/100}) rotate(${e(me)??""}deg); transition: transform 0.2s;`)},[()=>W()]),gt("pointerdown",H,S),gt("pointermove",H,Te),gt("pointerup",H,d),rt("pointercancel",H,d),rt("lostpointercapture",H,d),l(t,a)},fe=t=>{var a=uo(),u=T(a),m=T(u);ye(m);var h=p(m,2);{let H=n(()=>!we()||G()),xe=n(()=>c.editor_fileViewer_download_tooltip());Ce(h,{size:"icon",variant:"ghost",class:"h-7 w-7",onclick:Z,get disabled(){return e(H)},get title(){return e(xe)},children:(he,$e)=>{et(he,{get icon(){return jt},size:"sm"})},$$slots:{default:!0}})}var R=p(h,2),O=F(R,!0);x(u);var D=p(u,2),z=F(D);x(a),k(H=>{g(O,e(B)),fr(D,1,`relative min-h-0 flex-1 overflow-auto bg-checkered flex items-center justify-center p-4 select-none ${e(Be)?"cursor-grabbing":"cursor-grab"}`,"svelte-1uj35xu"),It(D,`--pan-scroll-x: ${e(Ne)??""}px; --pan-scroll-y: ${e(ze)??""}px;`),at(z,"src",H),at(z,"alt",e(B)),It(z,`translate: ${e(be)??""}px ${e(De)??""}px; transform: scale(${e(se)/100});`)},[()=>_e()]),gt("pointerdown",D,S),gt("pointermove",D,Te),gt("pointerup",D,d),rt("pointercancel",D,d),rt("lostpointercapture",D,d),l(t,a)},Le=t=>{const a=n(U);var u=je(),m=ne(u);Pr(m,()=>re()+e(a),h=>{Dr(h,{get sourceUrl(){return e(a)},get fileName(){return e(B)},get allowDownload(){return we()},get downloading(){return G()},onDownload:Z})}),l(t,u)},mt=t=>{var a=fo(),u=p(T(a),2),m=F(u,!0),h=p(u,2),R=T(h),O=p(R);x(h),x(a),k((D,z)=>{g(m,e(B)),at(R,"src",D),g(O,` ${z??""}`)},[()=>W(),()=>c.editor_fileViewer_audioUnsupported_label()]),l(t,a)},Bt=t=>{var a=po(),u=p(T(a),2),m=F(u,!0),h=p(u,2);{let R=n(()=>!we()||G());Ce(h,{size:"sm",variant:"secondary",onclick:Z,get disabled(){return e(R)},children:(O,D)=>{var z=vo(),H=ne(z);et(H,{get icon(){return jt},size:"sm",class:"mr-2"});var xe=p(H);k(he=>g(xe,` ${he??""}`),[()=>c.editor_fileViewer_downloadPdf_label()]),l(O,z)},$$slots:{default:!0}})}x(a),k(R=>g(m,R),[()=>c.editor_fileViewer_pdfUnavailable_label()]),l(t,a)},Ot=t=>{{let a=n(()=>nt(y().toString()));ar(t,{get value(){return e(a)},language:"json",get fileName(){return re()},lineNumbers:!0,readOnly:!0})}},Oe=t=>{const a=n(()=>st(y().toString()));var u=ho(),m=T(u),h=T(m),R=T(h);Ct(R,23,()=>e(a)[0]||[],(D,z)=>`header-${z}-${D}`,(D,z)=>{var H=go(),xe=F(H,!0);k(()=>g(xe,e(z))),l(D,H)}),x(R),x(h);var O=p(h);Ct(O,23,()=>e(a).slice(1),(D,z)=>`row-${z}`,(D,z,H)=>{var xe=_o();Ct(xe,23,()=>e(z),(he,$e)=>`cell-${e(H)}-${$e}`,(he,$e)=>{var He=mo(),ke=F(He,!0);k(()=>g(ke,e($e))),l(he,He)}),x(xe),l(D,xe)}),x(O),x(m),x(u),l(t,u)},Xe=t=>{var a=wo(),u=p(T(a),2),m=F(u,!0),h=p(u,2),R=F(h,!0);x(a),k(O=>{g(m,e(B)),g(R,O)},[()=>c.editor_fileViewer_archive_label()]),l(t,a)},Ht=t=>{var a=bo(),u=p(T(a),2),m=F(u,!0),h=p(u,2),R=F(h,!0);x(a),k(O=>{g(m,e(B)),g(R,O)},[()=>c.editor_fileViewer_binary_label()]),l(t,a)},Ft=t=>{{let a=n(()=>y().toString());ar(t,{get value(){return e(a)},get language(){return Pe()},get fileName(){return re()},lineNumbers:!0,highlightActiveLine:!0})}};Q(Ee,t=>{e(V)==="image"?t(Ve):e(V)==="svg"?t(fe,1):e(V)==="video"?t(Le,2):e(V)==="audio"?t(mt,3):e(V)==="pdf"?t(Bt,4):e(V)==="json"?t(Ot,5):e(V)==="csv"?t(Oe,6):e(V)==="archive"?t(Xe,7):e(V)==="binary"?t(Ht,8):t(Ft,-1)})}return x(ue),l(X,ue),Nt(ut)}Yr(["pointerdown","pointermove","pointerup"]);const yo=/access denied|permission denied|outside (?:the )?workspace/i,Po=/file not found|no such file or directory/i;function $o(X){return yo.test(X)?"access-denied":X===c.files_read_notFound_error()||Po.test(X)?"not-found":"generic"}function ko(X){switch(X){case"access-denied":return c.layout_fileTab_errorAccessDenied_label();case"not-found":return c.layout_fileTab_errorNotFound_label();case"generic":return c.layout_fileTab_errorGeneric_label()}}var Io=P("<!> <!>",1),Co=P("<!> <!> <!>",1),Fo=P('<div class="flex flex-col items-center justify-center h-full text-subtle gap-2"><p> </p> <p class="text-xs"> </p></div>'),br=P('<div class="flex h-full items-center justify-center p-4 text-subtle"><p role="alert"> </p></div>'),So=P('<div class="flex h-full items-center justify-center text-subtle"><p> </p></div>'),xr=P('<div class="flex items-center justify-center h-full text-subtle"><p> </p></div>'),Do=P('<div class="flex items-center gap-3"><!> <!></div>'),To=P('<div class="flex flex-col h-full"><div class="flex-1 p-4 space-y-2"></div></div>'),Eo=P('<p class="text-xs"> </p>'),Ro=P("<li><!></li>"),Uo=P('<p class="text-xs mt-2"> </p> <ul class="flex flex-col items-center gap-1"></ul>',1),Mo=P('<div class="flex flex-col items-center justify-center h-full text-subtle gap-2"><p class="text-danger" role="alert"> </p> <p class="text-xs font-mono"> </p> <!> <!></div>'),jo=P('<div class="flex flex-col items-center justify-center h-full text-subtle gap-3 p-4"><p> </p> <p class="text-xs break-all"> </p> <!></div>'),zo=P('<div class="h-full overflow-auto p-4"><!></div>');function Vo(X,w){if(new.target)return Vt({component:Vo,...X});Wt(w,!0);const ye=()=>ce(Ot,"$workspace",A),ot=()=>ce(_e,"$fileContentStore",A),re=()=>ce(E,"$fileLoadingStore",A),y=()=>ce(oe,"$fileSavingStore",A),ae=()=>ce(J,"$fileErrorStore",A),Pe=()=>ce(Z,"$fileErrorInfoStore",A),Fe=()=>ce(it,"$homeView$",A),we=()=>ce(nt,"$fileNotFoundCandidatesStore",A),ge=()=>ce(st,"$isFileBinaryStore",A),G=()=>ce(ut,"$isFileDirtyStore",A),Je=()=>ce(ue,"$fileLastUpdatedStore",A),V=()=>ce(Ee,"$ftChanges$",A),B=()=>ce(Bt,"$gutterRead$",A),se=()=>ce(ze,"$lineWrapping",A),me=()=>ce(Be,"$diffIndicators",A),Se=()=>ce(Le,"$rootMediaPreview",A),[A,be]=ir(),De=r=>{var s=Io(),$=ne(s);{var C=de=>{var Ae=je(),qe=ne(Ae);Rt(qe,()=>Ut,(pt,xt)=>{xt(pt,{get icon(){return Ua},get label(){return e(he)},disabled:!0})}),l(de,Ae)};Q($,de=>{!e(_t)&&!e(b)&&!e(z)&&de(C)})}var le=p($,2);{var Re=de=>{{let Ae=n(()=>!e(Tt)||!e(Ye)),qe=n(()=>!e(b)&&(!e(Tt)||!e(Ye)));Ha(de,{embedded:!0,showFold:!1,showSplit:!1,get showPreview(){return e(Tt)},get previewEnabled(){return e(Ye)},onTogglePreview:()=>f(Ye,!e(Ye)),get showWrap(){return e(Ae)},get wrapEnabled(){return se()},onToggleWrap:()=>j.dispatch(sa()),get showDiff(){return e(qe)},get diffEnabled(){return me()},onToggleDiff:()=>j.dispatch(na())})}};Q(le,de=>{o().filePath&&!e(_t)&&!e(z)&&de(Re)})}l(r,s)},Ne=r=>{var s=je(),$=ne(s);{var C=le=>{var Re=Co(),de=ne(Re);{var Ae=We=>{var Ge=je(),dt=ne(Ge);{let yt=n(()=>c.layout_fileTab_goToChanges_tooltip());Rt(dt,()=>Ut,(Pt,$t)=>{$t(Pt,{get icon(){return ja},get label(){return e(yt)},onclick:Lr})})}l(We,Ge)};Q(de,We=>{e(Rr)&&We(Ae)})}var qe=p(de,2);{var pt=We=>{var Ge=je(),dt=ne(Ge);{let yt=n(()=>c.layout_fileTab_downloadFile_label()),Pt=n(()=>!e(wt)||e(lt));Rt(dt,()=>Ut,($t,Jt)=>{Jt($t,{get icon(){return jt},get label(){return e(yt)},onclick:Et,get disabled(){return e(Pt)}})})}l(We,Ge)};Q(qe,We=>{e(Qe)&&We(pt)})}var xt=p(qe,2);{let We=n(()=>c.layout_fileTab_deleteFile_tooltip());Rt(xt,()=>Ut,(Ge,dt)=>{dt(Ge,{get icon(){return Ma},get label(){return e(We)},onclick:Ar,destructive:!0})})}l(le,Re)};Q($,le=>{o().filePath&&!e(_t)&&!e(b)&&le(C)})}l(r,s)},ze=qa(),Be=Ka();let o=ee(w,"tab",7),i=ee(w,"workspaceId",7),S=ee(w,"isActive",7),Te=ee(w,"isPanelFocused",7);pe(()=>{const r=i();if(!(!S()||!r||e(d)))return j.dispatch(ra(r,"files")),()=>j.dispatch(aa(r,"files"))});const d=n(()=>typeof o().data?.gitRootId=="string"?o().data.gitRootId:void 0),I=n(()=>typeof o().data?.gitRootPath=="string"?o().data.gitRootPath:void 0),b=n(()=>!!e(d)),W=n(()=>o().filePath?Ca(o().filePath,e(d)):o().filePath),U=Gr(e(W));pe(()=>{U.set(e(W))});const _e=ga(i(),U),E=ma(i(),U),oe=_a(i(),U),J=ha(i(),U),Z=wa(i(),U),it=Qa(i()),nt=ba(i(),U),st=xa(i(),U),ut=_r(i(),U),ue=ya(i(),U),Ee=Pa(i()),Ve=pa(),fe=crypto.randomUUID(),Le=Sr(fe),mt=`file-gutter:${crypto.randomUUID()}`,Bt=$a(i(),mt),Ot=ka(i()),Oe=n(()=>ye()?.worktreePath||ye()?.repositoryPath||ye()?.path||null),Xe=n(ot),Ht=Xa();pe(()=>{e(Xe)!==null&&e(Xe)!==void 0&&Ht?.markContentLoaded()});const Ft=n(re),t=n(y),a=n(ae),u=n(()=>e(a)?$o(e(a)):"generic"),m=n(()=>e(a)?Ga(Pe()):null);let h=N(0),R=!1;pe(()=>{const r=Fe();if(!r||r.unavailable){R=!1;return}e(m)&&!R&&(R=!0,rr(()=>Mt(h)))});const O=5,D=n(()=>(we()??[]).slice(0,O)),z=n(ge),H=n(G),xe=n(Je),he=n(()=>e(t)?c.ui_saveIndicator_saving_tooltip():e(H)?c.ui_saveIndicator_autoSaving_tooltip():c.ui_saveIndicator_saved_tooltip());let $e=N(null),He=N(Zr([])),ke=N(null),St=N(void 0),Dt=N(void 0),Ye=N(!0);pe(()=>{const r=o().data?.line,s=o().data?.jumpTimestamp;!r||s!==void 0&&s===e(Dt)||(f(Dt,s,!0),f(St,{line:r},!0),f(Ye,!1))});const Ie=n(()=>e(d)?hr(o().filePath,e(I)):null),_t=n(()=>e(d)?!e(Ie):!!(o().filePath&&(Wa(o().filePath)||e(Oe)&&Na(o().filePath,e(Oe))))),ht=n(()=>o().filePath&&e(Oe)?er(o().filePath)?o().filePath:`${e(Oe)}/${o().filePath}`:null),ft=n(()=>!!o().filePath&&/\.pdf$/i.test(o().filePath)),vt=n(()=>!!o().filePath&&/\.(?:png|jpe?g|gif|webp|mp4|webm)$/i.test(o().filePath)),Qe=n(()=>i()&&/^[A-Za-z0-9._-]+$/.test(i())?hr(o().filePath,e(Oe)):null),Tr=n(()=>!e(d)&&e(Qe)?e(Qe).split("/").slice(0,-1).join("/"):void 0),qt=n(()=>e(ft)||e(vt)?e(Qe):null),nr=n(()=>e(d)&&e(vt)?{png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",webp:"image/webp",mp4:"video/mp4",webm:"video/webm"}[o().filePath?.split(".").pop()?.toLowerCase()??""]:void 0);pe(()=>{if(!S()||!e(d)||!e(Ie)||!e(nr))return;const r=crypto.randomUUID();return j.dispatch(Ir(fe,r,i(),e(Ie),{gitRootId:e(d),mimeType:e(nr)})),()=>j.dispatch(Cr(fe,r))});let lt=N(!1);const wt=n(()=>!!e(Qe)&&!e(Ft)&&(!e(vt)||e(ke)===e(Qe))),sr=n(()=>e(ke)&&i()?`workspace-file://${i()}/${e(ke).split("/").map(encodeURIComponent).join("/")}`:null),Kt=n(()=>o().filePath?ca(o().filePath):"plaintext"),Tt=n(()=>e(Kt)==="markdown");pe(()=>{if(!S()||e(ft)||e(d))return;const r=e(qt),s=o().filePath,$=i(),C=o().id;if(f(ke,null),!r||!s||!$)return;let le=!1;const Re=()=>!le&&i()===$&&o().id===C&&o().filePath===s;return(async()=>{let de=!1;try{de=(await Fa("file.stat",{workspaceId:$,path:r}))?.isFile===!0}catch{}if(!Re())return;if(de){f(ke,r,!0);return}if(!/\.(?:png|jpe?g|gif|webp|mp4|webm)$/i.test(r)){f(ke,r,!0);return}const{candidates:Ae,truncated:qe}=await Aa($,r);if(Re()){if(!qe&&Ae.length===1){j.dispatch(vr($,s,Ae[0],C));return}f(ke,r,!0)}})(),()=>{le=!0}});function Er(r,s){return!!(r.file===s||r.relativePath===s||r.relativePath&&s.endsWith("/"+r.relativePath)||r.file&&s.endsWith("/"+r.file)||r.relativePath&&r.relativePath.endsWith("/"+s)||r.file&&r.file.endsWith("/"+s))}const bt=n(()=>e(b)||!o().filePath?null:V().find(r=>Er(r,o().filePath))??null),Rr=n(()=>!!e(bt));pe(()=>{if(e(b))return;const r=i(),s=o().filePath,$=e(Oe);return()=>{if(!r||!s)return;const C=Zt.select(j.state,r,s);if(C?.kind!=="editable-text")return;const le=Gt(C.localContent),Re=_r.select(j.state,r,s),de=er(s)?s:$?`${$}/${s}`:null;Re&&de&&j.dispatch(pr(r,s,de,le))}}),pe(()=>{const r=o().filePath,s=e(ht),$=i();if(e(h),!S())return;const C=!e(d)&&!!r&&er(r)&&!e(Oe);r&&$&&!e(_t)&&!e(vt)&&!e(ft)&&!C&&(e(d)&&e(Ie)&&e(W)?j.dispatch(gr($,e(W),s??r,{gitRoot:{id:e(d),relativePath:e(Ie)}})):j.dispatch(gr($,r,s??r)))});function Ur(){return e(Xe)??""}function Mr(r){e(b)||e(z)||!o().filePath||!i()||!e(ht)||j.dispatch(va(i(),o().filePath,Gt(r)))}function jr(){if(e(b)||e(z)||!o().filePath||!e(ht)||e(Xe)===null||e(t))return;const r=Zt.select(j.state,i(),o().filePath);r?.kind==="editable-text"&&j.dispatch(pr(i(),o().filePath,e(ht),Gt(r.localContent)))}function zr(r){const s=o().filePath;!s||!i()||(j.dispatch(fa(i(),s)),j.dispatch(vr(i(),s,r,o().id)))}pe(()=>{const r=o().filePath,s=e(bt);if(!r||!s){f(He,[],!0);return}if(!S())return;const $=i(),C=crypto.randomUUID();return j.dispatch(oa($,mt,C,{kind:"diffs",path:r,staged:s.stage==="staged"})),()=>{j.dispatch(ia($,mt,C))}}),pe(()=>{const r=B(),s=r?.result?.kind==="diffs"?r.result.chunks:[],$=s.find(C=>C.file===o().filePath)??s[0];f(He,$?Ba($.chunks.map(C=>({oldStart:C.oldStart,oldLines:C.oldLines,newStart:C.newStart,newLines:C.newLines,lines:C.lines.map(le=>(le.type===mr.Addition?"+":le.type===mr.Deletion?"-":" ")+le.content)}))):[],!0)});function Vr(r){const s=/Mac|iPhone|iPad|iPod/.test(navigator.userAgent),$=Re=>Qr(r,Ja(Re),s);if($("editor.save")){r.preventDefault(),e(H)&&!e(t)&&jr();return}const C=$("editor.undo")?"undo":$("editor.redo")?"redo":$("editor.toggle-task-list")?"toggle-task-list":$("editor.copy")?"copy":$("editor.select-all")?"select-all":null;if(!C||e(b)&&C!=="copy"&&C!=="select-all")return;C!=="toggle-task-list"&&e($e)?.runShortcut(C)&&r.preventDefault()}function Lr(r){if(!o().filePath||!e(bt))return;const s=r?.metaKey||r?.ctrlKey||!1,C=r?.target?.closest("[data-panel-id]")?.getAttribute("data-panel-id")??void 0;j.dispatch(ua(i(),e(bt),{filePath:o().filePath,changeId:e(bt).id,openInAdjacentPanel:s,sourcePanelId:C}))}async function Et(){const r=e(Qe);if(!(e(b)||!r||!i()||!e(wt)||e(lt))){f(lt,!0);try{const s=await Ia(i(),r,e(Oe));!s?.success&&!s?.canceled&&Qt.error(s?.error?.message||c.layout_fileTab_downloadFailed_error())}catch{Qt.error(c.layout_fileTab_downloadFailed_error())}finally{f(lt,!1)}}}function Ar(){const r=e(ht);if(e(b)||!o().filePath||!i()||!r)return;const s=la(Zt.select(j.state,i(),o().filePath));if(!s){Qt.error(c.ui_reversibleActions_failed_error({message:c.fileExplorer_tree_undoUnavailable_error()}));return}j.dispatch(da(i(),o().filePath,{absolutePath:r,tabId:o().id,snapshot:s}))}pe(()=>{if(!Ve||!S())return;const r={isDirty:!e(b)&&e(H),isSaving:!e(b)&&e(t)};rr(()=>{Ve.registerActions({display:De,actions:Ne}),Ve.registerState(r)})});var Wr={get tab(){return o()},set tab(r){o(r),te()},get workspaceId(){return i()},set workspaceId(r){i(r),te()},get isActive(){return S()},set isActive(r){S(r),te()},get isPanelFocused(){return Te()},set isPanelFocused(r){Te(r),te()},$set:Lt,$on:(r,s)=>At(w,r,s)},lr=je();rt("keydown",yr,r=>S()&&Vr(r));var Nr=ne(lr);{var Br=r=>{var s=je(),$=ne(s);Pr($,()=>o().filePath,C=>{var le=je(),Re=ne(le);{var de=_=>{var v=Fo(),M=T(v),q=F(M,!0),L=p(M,2),Ue=F(L,!0);x(v),k(Y=>{g(q,Y),g(Ue,o().filePath)},[()=>c.layout_fileTab_outsideWorkspace_label()]),l(_,v)},Ae=_=>{var v=je(),M=ne(v);{var q=L=>{or(L,{get workspaceId(){return i()},get filePath(){return e(Ie)},get gitRootId(){return e(d)}})};Q(M,L=>{S()&&L(q)})}l(_,v)},qe=_=>{var v=je(),M=ne(v);{var q=Y=>{var K=br(),ie=T(K),Me=F(ie,!0);x(K),k(ve=>g(Me,ve),[()=>c.layout_fileTab_errorLoading_label()]),l(Y,K)},L=Y=>{zt(Y,{get filePath(){return o().filePath},get sourceUrl(){return Se().url},allowDownload:!1})},Ue=Y=>{var K=So(),ie=T(K),Me=F(ie,!0);x(K),k(ve=>g(Me,ve),[()=>c.layout_fileTab_preparing_label()]),l(Y,K)};Q(M,Y=>{Se()?.error?Y(q):Se()?.url?Y(L,1):Y(Ue,-1)})}l(_,v)},pt=_=>{var v=je(),M=ne(v);{var q=L=>{or(L,{get workspaceId(){return i()},get filePath(){return e(qt)}})};Q(M,L=>{S()&&L(q)})}l(_,v)},xt=_=>{var v=br(),M=T(v),q=F(M,!0);x(v),k(L=>g(q,L),[()=>c.file_pdf_load_error()]),l(_,v)},We=_=>{{let v=n(()=>e(ke)??o().filePath),M=n(()=>!e(b)&&e(wt));zt(_,{get filePath(){return e(v)},get sourceUrl(){return e(sr)},onDownload:Et,get allowDownload(){return e(M)},get downloading(){return e(lt)}})}},Ge=_=>{var v=xr(),M=T(v),q=F(M,!0);x(v),k(L=>g(q,L),[()=>c.layout_fileTab_preparing_label()]),l(_,v)},dt=_=>{var v=To(),M=T(v);Ct(M,20,()=>[...Array(20).keys()],q=>q,(q,L)=>{var Ue=Do(),Y=T(Ue);wr(Y,{class:"h-3 w-8 shrink-0"});var K=p(Y,2);wr(K,{class:"h-3",style:`width: ${30+Math.random()*60}%`}),x(Ue),l(q,Ue)}),x(M),x(v),l(_,v)},yt=_=>{{let v=n(()=>Za(e(m)));Ya(_,{get view(){return e(v)}})}},Pt=_=>{var v=Mo(),M=T(v),q=F(M,!0),L=p(M,2),Ue=F(L,!0),Y=p(L,2);{var K=ve=>{var Ke=Eo(),ct=F(Ke,!0);k(()=>g(ct,e(a))),l(ve,Ke)};Q(Y,ve=>{e(u)==="generic"&&ve(K)})}var ie=p(Y,2);{var Me=ve=>{var Ke=Uo(),ct=ne(Ke),Xt=F(ct,!0),dr=p(ct,2);Ct(dr,20,()=>e(D),kt=>kt,(kt,cr)=>{var Yt=Ro(),qr=T(Yt);Ce(qr,{variant:"link",size:"compact",class:"h-auto p-0 font-mono text-xs",onclick:()=>zr(cr),children:(Kr,Lo)=>{Ze();var ur=tt();k(()=>g(ur,cr)),l(Kr,ur)},$$slots:{default:!0}}),x(Yt),l(kt,Yt)}),x(dr),k(kt=>g(Xt,kt),[()=>c.layout_fileTab_didYouMean_label()]),l(ve,Ke)};Q(ie,ve=>{e(D).length>0&&ve(Me)})}x(v),k(ve=>{g(q,ve),g(Ue,o().filePath)},[()=>ko(e(u))]),l(_,v)},$t=_=>{var v=jo(),M=T(v),q=F(M,!0),L=p(M,2),Ue=F(L,!0),Y=p(L,2);{var K=ie=>{{let Me=n(()=>!e(wt)||e(lt));Ce(ie,{variant:"secondary",size:"sm",onclick:Et,get disabled(){return e(Me)},children:(ve,Ke)=>{Ze();var ct=tt();k(Xt=>g(ct,Xt),[()=>c.layout_fileTab_downloadFile_label()]),l(ve,ct)},$$slots:{default:!0}})}};Q(Y,ie=>{!e(b)&&e(Qe)&&ie(K)})}x(v),k(ie=>{g(q,ie),g(Ue,o().filePath)},[()=>c.editor_fileViewer_binary_label()]),l(_,v)},Jt=_=>{const v=n(()=>o().filePath?.toLowerCase().endsWith(".svg"));var M=je(),q=ne(M);{var L=K=>{{let ie=n(()=>o().filePath||""),Me=n(()=>!e(b)&&e(wt));zt(K,{get filePath(){return e(ie)},get fileContent(){return e(Xe)},get language(){return e(Kt)},get isBinary(){return e(z)},onDownload:Et,get allowDownload(){return e(Me)},get downloading(){return e(lt)}})}},Ue=K=>{var ie=zo(),Me=T(ie);Oa(Me,{get content(){return e(Xe)},get workspaceId(){return i()},get relativeMediaBase(){return e(Tr)},renderRichFencesAsCode:!0,renderDiagrams:!0}),x(ie),l(K,ie)},Y=K=>{var ie=Ur,Me=Mr;{let ve=n(()=>me()?e(He):[]);$r(ar(K,{get value(){return ie()},set value(Ke){Me(Ke)},get language(){return e(Kt)},get readOnly(){return e(b)},get fileName(){return o().filePath},get workspaceId(){return i()},get filePath(){return o().filePath},get lineWrapping(){return se()},get lineChanges(){return e(ve)},get jumpTo(){return e(St)},get externalContentVersion(){return e(xe)},get isPanelFocused(){return Te()}}),Ke=>f($e,Ke,!0),()=>e($e))}};Q(q,K=>{e(v)?K(L):e(Tt)&&e(Ye)?K(Ue,1):K(Y,-1)})}l(_,M)},Hr=_=>{var v=xr(),M=T(v),q=F(M,!0);x(v),k(L=>g(q,L),[()=>c.layout_fileTab_preparing_label()]),l(_,v)};Q(Re,_=>{e(_t)?_(de):e(d)&&e(ft)&&e(Ie)?_(Ae,1):e(d)&&e(vt)?_(qe,2):e(ft)&&e(qt)?_(pt,3):e(ft)?_(xt,4):e(sr)?_(We,5):e(vt)?_(Ge,6):e(Ft)?_(dt,7):e(m)?_(yt,8):e(a)?_(Pt,9):e(z)?_($t,10):e(Xe)!==null?_(Jt,11):_(Hr,-1)})}l(C,le)}),l(r,s)};Q(Nr,r=>{o().filePath&&r(Br)})}l(X,lr);var Or=Nt(Wr);return be(),Or}export{Vo as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{k as qa,s as fa}from"./
|
|
1
|
+
import{k as qa,s as fa}from"./Dj_XMlva.js";import{s as va,n as Ct,u as q,w as en,v as me,I as Wa,X as Ka,i as Ga,g as Nn}from"./Ck9ZyE1n.js";import{Z as Qa,cT as Ya,A as Va,aY as xn,bX as Xa,v as Ja}from"./dEUeoghd.js";import{bp as c,t as Pt,br as w,a_ as M,bz as Tt,b as Rt,bt as qn,bv as Re,bu as Za}from"./DTQYcznv.js";import{bo as Wn,bs as Ot,a5 as O,bl as U,bS as b,bA as $,b_ as x,aD as e,W as l,ay as H,a7 as Oe,bO as L,bn as Lt,c9 as u,aA as k,aB as _,ca as Fe,bH as h,b$ as Kt,bV as le,cd as Mt,br as ma,be as un,c5 as er,bi as En,bj as tr,bf as hn,am as ta,ax as na,ai as nr,aj as ar,c0 as rr}from"./DYhIMPy1.js";import{s as _a}from"./CaxyE6o_.js";import{e as sr}from"./DYmPPjiq.js";import{t as Wt,k as or,a as ir,I as ha}from"./BqqN40AD.js";import{r as lr,o as dr,A as aa,L as ur}from"./DyASeQ3m.js";import{S as bn,t as Dn}from"./De4z9gHo.js";import{R as ra}from"./CuhrgDBI.js";import{I as ba}from"./Cfj3Lc6y.js";import"./s_GzTTEG.js";import{aC as wn,cz as cr,al as pr,aA as gr,ct as fr,cu as vr,ah as mr,aj as _r,aq as hr,aw as br,l as wr,G as kr,dS as xr,M as yr,ck as $r,bS as Ar}from"./B0biUQQF.js";import{Iz as J,cc as Fn,ca as wa,cd as kn,qS as Sr,D0 as Ir,fE as ka,D5 as Cr,br as Pr,zh as Tr,mp as sa,tM as Rr,cg as Or,uk as oa,nj as Lr,CM as Nr,D3 as Er,b_ as Dr}from"./A0r9TbR7.js";import{K as Mr,A as zr,at as Fr,ao as Br,T as jr}from"./BiRT6AoP.js";import{y as Hr}from"./-SwunqO3.js";import{l as Ur}from"./C4dCVzfY.js";import{f as ia}from"./QE-hjQtm.js";import{h as qr,g as Wr}from"./n58mTCVv.js";import"./CW_fORnH.js";import{ax as Kr,am as Gr,ap as Qr,f as Mn,a5 as Yr,bc as la}from"./BP5uyQTv.js";import"./BdkEw9JP.js";import{c as Vr,o as Xr,n as Jr,m as Zr,E as es}from"./Ddw98WmY.js";import{c as Bn,b as da,d as jn,a as Hn,A as xa,j as ts,l as ns,P as as}from"./BO67r0G6.js";import{c as de}from"./BmP1Wws6.js";import{F as rs,j as ss,bx as os,i as is,bK as ls}from"./Ca05Jmq3.js";import{D as ds,b as us}from"./CbCgON3R.js";import{T as cs}from"./CvWyDJGm.js";import"./CN-2rfdx.js";import{cg as ya,cK as ps,cJ as gs,bN as fs,x as vs,F as yn,b1 as ms,aq as _s,aG as hs,aC as bs,cO as ws,ba as ks,aw as xs,aH as ys,aZ as $s,ad as ua,a4 as As,c1 as Ss,ac as Is,cA as Cs,aj as Ps,cN as Ts,az as Rs}from"./CoLl8pQb.js";import{b as Os}from"./BaIAhI85.js";import"./BXeiKdwz.js";import"./COrK0goa.js";import{f as Ls}from"./CSdIXJpO.js";const Ns=80,Es=10,Ds=new Qa(Ya,{renderer:{html({text:a}){return Va(a)},image({tokens:a}){return this.parser.parseInline(a)}}});function Kn(a){const n=document.createElement("template");n.innerHTML=Ds.parseInline(a,{async:!1});for(const o of n.content.querySelectorAll("br"))o.replaceWith(" ");return(n.content.textContent??"").replace(/\s+/g," ").trim()}function zt(a){return a.replace(/!\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/\[([^\]]+)\]\([^)]*\)/g,"$1").replace(/`+([^`]*?)`+/g,"$1").replace(/<[^>]+>/g,"").replace(/\\([\\`*_[\]{}()#+\-.!>])/g,"$1").replace(/[*~]/g,"").replace(/(^|[^A-Za-z0-9])_+/g,"$1").replace(/_+([^A-Za-z0-9]|$)/g,"$1").replace(/\s+/g," ").trim()}function Un(a,n){return a.slice(n).replace(/^(?:[ \t]*(?:\r\n|\n|\r))+/,"")}function Sn(a,n){return!n||n.length>Ns||n.split(/\s+/).length>Es||/[.!?;]$/.test(n)?!1:!/^[ \t]*(?:[-+*][ \t]+|\d+[.)][ \t]+|>|```|~~~|\|)/.test(a)}function Ui(a){const o=a.trim().match(/^\*\*([^\r\n]+)\*\*$/);if(!o)return null;const i=zt(o[1]);return Sn(o[0],i)?i:null}function Gn(a,n=!1,o=!0){const i=a.match(/^(?:[ \t]*(?:\r\n|\n|\r))*/)?.[0]??"",r=a.slice(i.length).match(/^\*\*([^\r\n]+)\*\*[ \t]*(?:(?:\r\n|\n|\r)|$)/);if(!r)return null;if(n){const m=r[1],f=m.match(/\\+$/)?.[0].length??0;if(m!==m.trim()||m.includes("**")||m.startsWith("*")||m.endsWith("*")||f%2!==0)return null}const p=zt(r[1]);return Sn(r[0],p)?{title:n&&o?Kn(r[1]):p,body:Un(a,i.length+r[0].length)}:null}function ca(a){const n=[];let o=a;for(;o.trim();){const i=Qn(o,!0),d=i.heading?{body:i.body}:Gn(o,!0,!1);if(!d)return null;n.push(o.slice(0,o.length-d.body.length)),o=d.body}return n.length?n:null}function qi(a){const n=[];let o=a;for(;o.trim();){const i=Qn(o,!0,Kn),d=i.heading?{title:i.heading,body:i.body}:Gn(o,!0);if(!d)return null;n.push(d.title),o=d.body}return n.length?n:null}function Wi(a){const n=zs(a),o=[];let i=a;for(n.heading&&(o.push({title:n.heading,body:""}),i=n.body);i;){const d=Gn(i);if(!d||d.body.length>=i.length)break;o.push({title:d.title,body:""}),i=d.body}if(o.length===0){const d=a.trim(),r=zt(d);return!d.includes(`
|
|
2
2
|
`)&&Sn(d,r)?[{title:r,body:""}]:d?[{title:null,body:d}]:[]}return o[o.length-1].body=i.trim(),o}function Ms(a){const n=a.replace(/^ {0,3}/,"");return!/^(?:\s|>|`{3}|~{3}|(?:[-+*]|\d+[.)])(?:[ \t]|$)|#{1,6}(?:[ \t]|$)|<|\[[^\]]*\]:)/.test(n)&&!/^(?:(?:\*[ \t]*){3,}|(?:_[ \t]*){3,}|(?:-[ \t]*){3,})$/.test(n)}function Qn(a,n=!1,o=zt){const i=a.match(/^(?:\uFEFF)?(?:[ \t]*(?:\r\n|\n|\r))*/)?.[0]??"",d=a.slice(i.length);if(n&&/^(?: {4}| {0,3}\t)/.test(d))return{heading:null,body:a};const r=d.match(/^[ \t]{0,3}#{1,6}[ \t]+([^\r\n]*?)(?:[ \t]+#+)?[ \t]*(?:\r\n|\n|\r|$)/);if(r&&zt(r[1]))return{heading:o(r[1]),body:Un(a,i.length+r[0].length)};const p=d.match(/^([^\r\n]+)(?:\r\n|\n|\r)([ \t]{0,3})(?:=+|-+)[ \t]*(?:\r\n|\n|\r|$)/);return p&&(!n||Ms(p[1])&&!p[2].includes(" "))&&zt(p[1])?{heading:o(p[1]),body:Un(a,i.length+p[0].length)}:{heading:null,body:a}}function zs(a,{preserveInlineText:n=!1}={}){const o=n?Kn:zt,i=Qn(a,!1,o);if(i.heading)return i;const d=a.match(/^(?:\uFEFF)?(?:[ \t]*(?:\r\n|\n|\r))*/)?.[0]??"",p=a.slice(d.length).match(/^([^\r\n]+)(?:\r\n|\n|\r)(?:[ \t]*(?:\r\n|\n|\r))+/);if(p){const m=zt(p[1]),f=a.slice(d.length+p[0].length);if(f.trim()&&Sn(p[1],m))return{heading:o(p[1]),body:f}}return{heading:null,body:a}}const Gt="[--operational-row-inline-padding:var(--chat-operational-row-inline-padding,0.5rem)] [--operational-leading-slot-size:1.25rem] [--operational-leading-half-slot-size:0.625rem] [--operational-leading-gap:var(--chat-operational-leading-gap,0.5rem)]",Ki="type-body font-family-child font-normal text-muted-foreground",Gi=`${Gt} min-w-0 max-w-full pl-[calc(var(--operational-row-inline-padding)+var(--operational-leading-slot-size)+var(--operational-leading-gap))]`,Qi=`${Gt} min-w-0 max-w-full pl-[calc(var(--operational-row-inline-padding)+var(--operational-leading-slot-size)+var(--operational-leading-gap))] pt-1.5`,Yi=`${Gt} min-w-0 max-w-full pl-[calc(var(--operational-row-inline-padding)+var(--operational-leading-slot-size)+var(--operational-leading-gap))] pt-1`,Vi=`${Gt} relative min-w-0 max-w-full`,Xi=`${Gt} min-w-0 max-w-full pl-[calc(var(--operational-row-inline-padding)+var(--operational-leading-slot-size)+var(--operational-leading-gap))]`,Ji=`${Gt} operational-group-child-row ml-2 min-w-0 w-[calc(100%-0.5rem)] max-w-[calc(100%-0.5rem)]`,Zi="pt-6",el="text-muted-foreground",tl="text-muted-foreground",$a="font-normal text-muted-foreground",nl="tool-call-container group relative block w-full min-w-0 max-w-full overflow-hidden type-body font-family-child font-normal text-muted-foreground",al="h-[16px]! w-[16px]! shrink-0",rl=`${Gt} relative grid h-7 w-full min-w-0 max-w-full grid-cols-[var(--operational-leading-slot-size)_minmax(0,1fr)_auto] items-center gap-[var(--operational-leading-gap)] overflow-hidden rounded-md px-[var(--operational-row-inline-padding)] type-body transition-colors duration-[var(--motion-fast)] motion-reduce:transition-none`,sl=`a11y-ignore pointer-events-none flex size-[var(--operational-leading-slot-size)] min-w-[var(--operational-leading-slot-size)] shrink-0 items-center justify-center [&_svg]:size-[16px]! ${$a}`,ol=`type-body block min-w-0 max-w-full truncate overflow-hidden text-ellipsis whitespace-nowrap border-0 bg-transparent p-0 text-left ${$a}`,il="type-body flex min-w-0 shrink-0 items-center gap-1 whitespace-nowrap",ll="h-[16px]! w-[16px]! shrink-0 opacity-60 transition-transform duration-[var(--motion-fast)] motion-reduce:transition-none";function dl(a){return qa(a,{axis:"y",duration:va()?0:150})}function cn(a){return a.type==="thinking"||a.type==="tool_use"||a.type==="content_group"}function ul(a){const n=a?.[0];return!n||cn(n)?"":"pt-4"}function cl(a,n,o=()=>!0){const i=a[n];if(!i||!o(i)||!cn(i))return!1;let d=n-1;for(;d>=0&&!o(a[d]);)d-=1;return d>=0&&cn(a[d])}function pl(a,n,o=()=>!0,i=!1){const d=a[n];if(!d||!o(d))return"";let r=n-1;for(;r>=0&&!o(a[r]);)r-=1;if(r<0)return"";const p=a[r];if(p.type==="thinking"&&d.type==="thinking")return i||ca(p.text??p.content??"")!==null&&ca(d.text??d.content??"")!==null?"":"pt-14";const m=cn(p),f=cn(d);return m&&f?"":p.type==="thinking"&&!f?"pt-6":m||f?"pt-4":"pt-1"}const gl="shrink-0 whitespace-nowrap text-ui text-subtle focus-visible:outline-none focus-visible:text-foreground";function Fs(a){if(a?.status==="halted")return c.agent_node_halted_label();if(a?.status==="resuming")return c.agent_node_resuming_label();if(a?.placement?.target==="remote"||Hr(a?.placement?.target)){if(a.placementError)return c.remoteAgent_status_failed();if(a.cloudStart)return c.remoteAgent_status_starting();if(a.effectiveIsolation==="pending")return a.setup?.state==="pending"?c.remoteAgent_status_preparingCheckout():a.setup?.state==="running"?c.remoteAgent_status_runningSetup():c.remoteAgent_status_starting()}if(a?.placement&&a.effectiveIsolation==="pending")return c.agent_node_provisioning_label()}var Bs=_('<span class="owner-fill block h-full svelte-sxf8s9"></span>'),js=_('<span class="shrink-0 text-xs text-muted-foreground"> </span>'),Hs=_('<span class="flex items-center gap-2"><span class="group-key size-1.5 shrink-0 rounded-full svelte-sxf8s9"></span> <span class="min-w-0 flex-1"> </span> <!> <span> </span></span>'),Us=_('<dd class="col-span-2 pl-[1.125rem] text-xs text-muted-foreground wrap-anywhere"> </dd>'),qs=_(`<div class="grid grid-cols-[1fr_auto] items-baseline gap-x-3 py-0.5 text-sm"><dt class="relative min-w-0 pl-[1.125rem] wrap-anywhere before:absolute before:top-2 before:left-0 before:size-1 before:rounded-full before:bg-muted-foreground before:content-['']"> </dt> <dd> </dd> <!></div>`),Ws=_('<dl class="ml-3.5 text-foreground"></dl>'),zn=_("<!> <!>",1),Ks=_('<span class="flex items-center gap-2"><span class="min-w-0 flex-1"> </span> <span class="shrink-0 tabular-nums text-muted-foreground"> </span></span>'),Gs=_('<div class="min-w-0"><dt class="truncate text-sm text-foreground"> </dt> <dd class="text-xs text-muted-foreground wrap-anywhere"> </dd></div>'),Qs=_('<dl class="ml-3.5 flex flex-col gap-2"></dl>'),Ys=_('<section class="min-w-0" data-testid="prompt-breakdown"><div class="mb-3 flex items-baseline justify-between gap-3"><h3 class="text-sm font-medium"> </h3> <span class="shrink-0 text-sm tabular-nums text-muted-foreground"> </span></div> <div class="owner-strip mb-2 flex h-1.5 w-full overflow-hidden svelte-sxf8s9" role="img"></div> <!></section>');function Aa(a,n){const o=Wn();if(new.target)return Pt({component:Aa,...a});Ot(n,!0);let i=w(n,"breakdown",7);const d="type-body font-normal text-foreground data-[state=open]:font-normal";function r(T){return or(T,{maximumFractionDigits:T<1e4?1:0})}function p(T){return T==="native"?c.agent_contextBreakdown_owner_native_label():T==="intent"?c.agent_contextBreakdown_owner_intent_label():c.agent_contextBreakdown_owner_user_label()}const m=u(()=>i().owners.map(T=>c.agent_contextBreakdown_ownerShare_label({owner:p(T.owner),tokens:r(T.estTokens)})).join(", "));var f={get breakdown(){return i()},set breakdown(T){i(T),k()},$set:Tt,$on:(T,v)=>Rt(n,T,v)},S=Ys(),y=O(S),g=O(y),E=U(g,!0),z=b(g,2),Ce=U(z,!0);$(y);var D=b(y,2);Ct(D,21,()=>i().owners,T=>T.owner,(T,v)=>{var ve=Bs();let ue;x(()=>{q(ve,"data-owner",e(v).owner),ue=en(ve,"",ue,{"flex-grow":e(v).share})}),l(T,ve)}),$(D);var P=b(D,2);return de(P,()=>xa,(T,v)=>{v(T,{type:"multiple",children:(ve,ue)=>{var R=zn(),_e=H(R);Ct(_e,17,()=>i().groups,pe=>pe.kind,(pe,Q)=>{var W=Oe(),ne=H(W);de(ne,()=>Bn,(ge,ze)=>{ze(ge,{get value(){return e(Q).kind},get"data-prompt-group"(){return e(Q).kind},children:(ot,G)=>{var I=zn(),ae=H(I);de(ae,()=>da,(he,N)=>{N(he,{level:4,children:(Le,X)=>{var K=Oe(),Z=H(K);de(Z,()=>jn,(Y,oe)=>{oe(Y,{inset:!1,class:d,children:(ee,Ne)=>{var be=Hs(),je=O(be),et=b(je,2),ut=U(et,!0),tt=b(et,2);{var at=ct=>{var Nt=js(),yt=U(Nt,!0);x(V=>L(yt,V),[()=>c.agent_contextBreakdown_notCounted_label()]),l(ct,Nt)};M(tt,ct=>{e(Q).kind==="native"&&ct(at)})}var Ee=b(tt,2),Qt=U(Ee,!0);$(be),x((ct,Nt)=>{q(je,"data-kind",e(Q).kind),L(ut,ct),me(Ee,1,`shrink-0 tabular-nums ${e(Q).kind==="native"?"text-muted-foreground":""}`),L(Qt,Nt)},[()=>p(e(Q).kind),()=>r(e(Q).estTokens)]),l(ee,be)},$$slots:{default:!0}})}),l(Le,K)},$$slots:{default:!0}})});var Be=b(ae,2);de(Be,()=>Hn,(he,N)=>{N(he,{inset:!1,children:(Le,X)=>{var K=Ws();Ct(K,21,()=>e(Q).rows,Z=>Z.key,(Z,Y)=>{var oe=qs(),ee=O(oe),Ne=U(ee,!0),be=b(ee,2),je=U(be,!0),et=b(be,2);{var ut=tt=>{var at=Us(),Ee=U(at,!0);x(()=>L(Ee,e(Y).hint)),l(tt,at)};M(et,tt=>{e(Y).hint&&tt(ut)})}$(oe),x(tt=>{L(Ne,e(Y).label),me(be,1,`tabular-nums ${e(Y).counted?"":"text-muted-foreground"}`),L(je,tt)},[()=>r(e(Y).estTokens)]),l(Z,oe)}),$(K),l(Le,K)},$$slots:{default:!0}})}),l(ot,I)},$$slots:{default:!0}})}),l(pe,W)});var ce=b(_e,2);{var xe=pe=>{var Q=Oe(),W=H(Q);de(W,()=>Bn,(ne,ge)=>{ge(ne,{value:"hidden-skills",class:"mt-1",children:(ze,ot)=>{var G=zn(),I=H(G);de(I,()=>da,(Be,he)=>{he(Be,{level:4,children:(N,Le)=>{var X=Oe(),K=H(X);de(K,()=>jn,(Z,Y)=>{Y(Z,{inset:!1,class:d,children:(oe,ee)=>{var Ne=Ks(),be=O(Ne),je=U(be,!0),et=b(be,2),ut=U(et,!0);$(Ne),x((tt,at)=>{L(je,tt),L(ut,at)},[()=>c.agent_contextBreakdown_hiddenSkills_title(),()=>Wt(i().hiddenSkills.length)]),l(oe,Ne)},$$slots:{default:!0}})}),l(N,X)},$$slots:{default:!0}})});var ae=b(I,2);de(ae,()=>Hn,(Be,he)=>{he(Be,{inset:!1,children:(N,Le)=>{var X=Qs();Ct(X,21,()=>i().hiddenSkills,K=>K.name,(K,Z)=>{var Y=Gs(),oe=O(Y),ee=U(oe,!0),Ne=b(oe,2),be=U(Ne,!0);$(Y),x(je=>{L(ee,e(Z).name),L(be,je)},[()=>[e(Z).detail,e(Z).fix].filter(Boolean).join(" · ")]),l(K,Y)}),$(X),l(N,X)},$$slots:{default:!0}})}),l(ze,G)},$$slots:{default:!0}})}),l(pe,Q)};M(ce,pe=>{i().hiddenSkills.length>0&&pe(xe)})}l(ve,R)},$$slots:{default:!0}})}),$(S),x((T,v)=>{q(S,"aria-labelledby",`${o}-title`),q(g,"id",`${o}-title`),L(E,T),L(Ce,v),q(D,"aria-label",e(m))},[()=>c.agent_contextBreakdown_title(),()=>c.agent_contextBreakdown_tokens_label({tokens:r(i().estTokens)})]),l(a,S),Lt(f)}const Vs=["intent","user"],Xs=["systemPrompt","toolDescription","provider"],Js=["native","user","intent"],$n=a=>typeof a=="object"&&a!==null&&!Array.isArray(a),An=a=>typeof a=="number"&&Number.isFinite(a)&&a>=0,Zs=a=>a==="intent"||a==="user";function eo(a,n){if(!$n(a))return null;const{id:o,label:i,owner:d,location:r,chars:p,estTokens:m,controlHint:f}=a;if(typeof o!="string"||typeof i!="string"||!Zs(d)||typeof r!="string"||!Xs.includes(r)||!An(p)||!An(m))return null;const S=$n(f)&&typeof f.text=="string"&&f.text;return{key:`${n}:${o}`,id:o,label:i,owner:d,chars:p,estTokens:m,counted:r!=="provider",...S?{hint:S}:{}}}function to(a){if(!$n(a))return null;const{name:n,reason:o,detail:i,fix:d}=a;return[n,o,i,d].some(r=>typeof r!="string")?null:{name:n,reason:o,detail:i,fix:d}}function no(a){if(!$n(a)||a.available!==!0)return null;const{totalChars:n,estTokens:o,sections:i,hiddenSkills:d}=a;if(!An(n)||!An(o)||!Array.isArray(i)||!Array.isArray(d))return null;const r=i.map(eo).filter(f=>f!==null).sort((f,S)=>S.chars-f.chars),p=Vs.map(f=>{const S=r.filter(g=>g.counted&&g.owner===f),y=S.reduce((g,E)=>g+E.chars,0);return{owner:f,chars:y,estTokens:S.reduce((g,E)=>g+E.estTokens,0),share:n>0?y/n:0}}).filter(f=>f.chars>0),m=Js.map(f=>{const S=r.filter(y=>f==="native"?!y.counted:y.counted&&y.owner===f);return{kind:f,chars:S.reduce((y,g)=>y+g.chars,0),estTokens:S.reduce((y,g)=>y+g.estTokens,0),rows:S}}).filter(f=>f.rows.length>0);return{totalChars:n,estTokens:o,rows:r,groups:m,owners:p,hiddenSkills:d.map(to).filter(f=>f!==null)}}async function ao(a){try{const n=await Kr("agent.getSession",{agentId:a});return no(n?.session?.promptBreakdown)}catch{return null}}const pa=rs.map(a=>({key:a.path.replace(/^agentFeatures\./,""),label:a.label,description:a.description}));function ro(a){const n=a.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[_-]+/g," ").toLowerCase().trim();return n.charAt(0).toUpperCase()+n.slice(1)}function so(a){const n=a??{},o=pa.map(r=>({key:r.key,label:r.label(),description:r.description(),enabled:n[r.key]===!0,known:!0})),i=new Set(pa.map(r=>r.key)),d=[];for(const[r,p]of Object.entries(n))i.has(r)||d.push({key:r,label:ro(r),description:null,enabled:p===!0,known:!1});return d.sort((r,p)=>r.label.localeCompare(p.label)),o.concat(d)}var oo=_('<div class="mb-6 border-b border-border pb-6"><!></div>'),io=_("<span> </span>"),lo=_('<!> <span class="sr-only"> </span>',1),uo=_('<div role="listitem" class="text-xs text-subtle" aria-hidden="true">—</div>'),co=_('<section class="min-w-0"><h4 class="text-sm font-medium mb-3"> </h4> <div role="list" class="space-y-2"></div></section>'),po=_('<div class="@container"><!> <section><h3 class="text-sm font-medium"> </h3> <p class="mb-4 mt-1 text-sm text-muted-foreground"> </p> <div class="grid grid-cols-1 gap-6 @min-[28rem]:grid-cols-2" data-testid="harness-features-list"></div></section></div>');function Sa(a,n){const o=Wn();if(new.target)return Pt({component:Sa,...a});Ot(n,!0);let i=w(n,"open",15,!1),d=w(n,"static",7,!1),r=w(n,"version",7),p=w(n,"features",7,null),m=w(n,"agentId",7),f=w(n,"breakdown",7),S=le(null);const y=u(()=>f()===void 0&&!!m());Fe(()=>{if(!i()||!e(y)||!m())return;const D=m();let P=!0;return ao(D).then(T=>{P&&h(S,{agentId:D,view:T},!0)}),()=>{P=!1}});const g=u(()=>f()!==void 0?f():e(y)&&e(S)&&e(S).agentId===m()?e(S).view:null),E=u(()=>so(p())),z=u(()=>[{enabled:!0,label:c.chat_shared_valueOn_label(),rows:e(E).filter(D=>D.enabled)},{enabled:!1,label:c.chat_shared_valueOff_label(),rows:e(E).filter(D=>!D.enabled)}]);var Ce={get open(){return i()},set open(D=!1){i(D),k()},get static(){return d()},set static(D=!1){d(D),k()},get version(){return r()},set version(D){r(D),k()},get features(){return p()},set features(D=null){p(D),k()},get agentId(){return m()},set agentId(D){m(D),k()},get breakdown(){return f()},set breakdown(D){f(D),k()},$set:Tt,$on:(D,P)=>Rt(n,D,P)};{let D=u(()=>c.chat_harnessFeaturesModal_title({version:r()}));Vr(a,{get static(){return d()},get title(){return e(D)},size:"wide",get open(){return i()},set open(P){i(P)},children:(P,T)=>{var v=po(),ve=O(v);{var ue=W=>{var ne=oo(),ge=O(ne);Aa(ge,{get breakdown(){return e(g)}}),$(ne),l(W,ne)};M(ve,W=>{e(g)&&W(ue)})}var R=b(ve,2),_e=O(R),ce=U(_e,!0),xe=b(_e,2),pe=U(xe,!0),Q=b(xe,2);Ct(Q,21,()=>e(z),W=>W.enabled,(W,ne)=>{var ge=co(),ze=O(ge),ot=U(ze,!0),G=b(ze,2);Ct(G,21,()=>e(ne).rows,I=>I.key,(I,ae)=>{ts(I,{role:"listitem",class:"min-h-0 px-0 py-0 [&_.truncate]:whitespace-normal","data-testid":"harness-feature-state",get"data-feature"(){return e(ae).key},get"data-enabled"(){return e(ae).enabled},title:he=>{var N=Oe(),Le=H(N);{var X=Z=>{var Y=lo(),oe=H(Y);Gr(oe,{get content(){return e(ae).description},side:"top",size:"sm",children:(be,je)=>{var et=io(),ut=U(et,!0);x(()=>L(ut,e(ae).label)),l(be,et)},$$slots:{default:!0}});var ee=b(oe,2),Ne=U(ee,!0);x(()=>L(Ne,e(ae).description)),l(Z,Y)},K=Z=>{var Y=Kt();x(()=>L(Y,e(ae).label)),l(Z,Y)};M(Le,Z=>{e(ae).description?Z(X):Z(K,-1)})}l(he,N)},$$slots:{title:!0}})},I=>{var ae=uo();l(I,ae)}),$(G),$(ge),x(()=>{q(ge,"aria-label",e(ne).label),L(ot,e(ne).label)}),l(W,ge)}),$(Q),$(R),$(v),x((W,ne)=>{q(R,"aria-labelledby",`${o}-capabilities`),q(_e,"id",`${o}-capabilities`),L(ce,W),L(pe,ne)},[()=>c.chat_harnessFeaturesModal_capabilities_title(),()=>c.chat_harnessFeaturesModal_description()]),l(P,v)},$$slots:{default:!0}})}return Lt(Ce)}var go=_('<p role="alert" class="type-body text-danger"> </p>');function Ia(a,n){if(new.target)return Pt({component:Ia,...a});Ot(n,!0);const o=()=>Re(g,"$outcome$",i),[i,d]=qn();let r=w(n,"open",15,!1),p=w(n,"agentName",7),m=w(n,"workspaceId",7),f=w(n,"agentId",7);const S=crypto.randomUUID(),y=Mt(""),g=xn(y,S),E=u(()=>o()?.workspaceId===m()&&o().agentId===f()?o():void 0),z=u(()=>e(E)?.status==="pending"),Ce=u(()=>e(E)?.status==="failed"?e(E).error:"");Fe(()=>{const v=m();return f(),y.set(v),()=>J.dispatch(Fn(v,S))}),Fe(()=>{e(E)?.status==="succeeded"&&(r(!1),J.dispatch(wa(m(),S,e(E).requestId)))});function D(){const v=xn.select(J.state,m(),S);v?.agentId===f()&&v.status==="pending"||J.dispatch(kn(m(),S,crypto.randomUUID(),f(),{kind:"retire"}))}var P={get open(){return r()},set open(v=!1){r(v),k()},get agentName(){return p()},set agentName(v){p(v),k()},get workspaceId(){return m()},set workspaceId(v){m(v),k()},get agentId(){return f()},set agentId(v){f(v),k()},$set:Tt,$on:(v,ve)=>Rt(n,v,ve)};{const v=ce=>{var xe=Oe(),pe=H(xe);{var Q=W=>{var ne=go(),ge=U(ne,!0);x(()=>L(ge,e(Ce))),l(W,ne)};M(pe,W=>{e(Ce)&&W(Q)})}l(ce,xe)};let ve=u(()=>c.modals_retireAgent_title()),ue=u(()=>c.modals_retireAgent_description({name:p()})),R=u(()=>c.modals_retireAgent_confirm_label()),_e=u(()=>c.modals_bulkActionConfirm_cancel_label());ds(a,{get title(){return e(ve)},get description(){return e(ue)},get confirmLabel(){return e(R)},get cancelLabel(){return e(_e)},focusSubmit:!1,focusCancel:!0,get busy(){return e(z)},onConfirm:D,get open(){return r()},set open(ce){r(ce)},details:v,$$slots:{details:!0}})}var T=Lt(P);return d(),T}function fo({agentName:a,specialist:n}){const o=n?`{ topLevel: true, specialist: ${JSON.stringify(n)} }`:"{ topLevel: true }",i=n?`and keep the same specialist (${JSON.stringify(n)})`:"and, if you were created with a specialist, pass that exact same `specialist` value in the options";return`Please replace yourself with a fresh top-level agent and run a gradual, coordinated hand-off:
|
|
3
3
|
|
|
4
4
|
1. Create your replacement now: call \`ws.agent.create(${JSON.stringify(a)}, kickoffMessage, ${o})\`. The first argument must be your EXACT current name (${JSON.stringify(a)}) ${i}. Write the kickoff message as a thorough context hand-off: the overall goal, the current state of the work, key notes and files, decisions already made, and open threads.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as mt,br as w,a_ as D,bz as dt,bt as ut,b as ft,bv as _,bp as T}from"./DTQYcznv.js";import{bs as gt,ca as A,aD as e,bj as vt,a7 as b,ay as m,W as d,bn as _t,c9 as c,cd as M,aA as k,bS as bt,aB as $t}from"./DYhIMPy1.js";import{G as O}from"./-SwunqO3.js";import{c as j}from"./BmP1Wws6.js";import{as as It,cN as St}from"./CoLl8pQb.js";import{dl as ht,dK as wt}from"./B0biUQQF.js";import{S as kt,c as Ct}from"./DbSsu2ZZ.js";import{selectScriptById as yt,selectCanDeleteScript as xt}from"./BL8utEbB.js";import"./Ck9ZyE1n.js";import"./CaxyE6o_.js";import"./BP5uyQTv.js";import"./BXeiKdwz.js";import{M as E}from"./C52Qm4vO.js";import{g as Dt}from"./DfN8_dcw.js";import{T as Tt}from"./B39Mxie0.js";import{l as At,d as Bt}from"./CpHZSST_.js";import{Iz as B,CE as Vt,uS as Wt,gK as Rt}from"./A0r9TbR7.js";var zt=$t("<!> <!>",1);function Ht(V,i){if(new.target)return mt({component:Ht,...V});gt(i,!0);const $=()=>_(J,"$fullContext$",u),G=()=>_(U,"$canDeleteScript$",u),N=()=>_(L,"$scriptContext$",u),P=()=>_(Q,"$script$",u),W=()=>_(X,"$homeView$",u),[u,q]=ut(),F=t=>{var r=b(),n=m(r);{var f=g=>{var S=zt(),K=m(S);{let v=c(()=>T.workspace_shell_showInBottomBar_tooltip());j(K,()=>E,(h,x)=>{x(h,{get icon(){return It},get label(){return e(v)},onclick:Z,"data-move-to-bottom-bar":!0})})}var ot=bt(K,2);{var nt=v=>{var h=b(),x=m(h);{let ct=c(()=>T.scripts_delete_label()),it=c(()=>G()?void 0:T.scripts_delete_disabled_description());j(x,()=>E,(lt,pt)=>{pt(lt,{get icon(){return St},get label(){return e(ct)},destructive:!0,get disabledReason(){return e(it)},onclick:Y})})}d(v,h)};D(ot,v=>{e(s)&&v(nt)})}d(g,S)};D(n,g=>{$()&&g(f)})}d(t,r)};let o=w(i,"tab",7),a=w(i,"workspaceId",7),C=w(i,"layoutId",7),l=w(i,"isActive",7);const I=c(()=>o().terminalId),s=c(()=>o().scriptId),R=Dt(),p=M(""),y=M("");A(()=>p.set(a())),A(()=>y.set(e(s)??""));const J=ht(p),L=wt(p),Q=yt(p,y),U=xt(p,y),X=At(p);let z=!0;vt(()=>{z=!1});function Y(){if(!e(s))return;const t=a(),r=e(s),n=o().id;return Ct(t,r,()=>z&&l()&&a()===t&&e(s)===r&&o().id===n)}function Z(){$()&&(e(s)&&B.dispatch(Vt(a(),e(s))),B.dispatch(Wt(a(),e(I))),B.dispatch(Rt(C()??a(),o().id)))}A(()=>{if(!(!R||!l()))return R.registerActions({actions:F})});var tt={get tab(){return o()},set tab(t){o(t),k()},get workspaceId(){return a()},set workspaceId(t){a(t),k()},get layoutId(){return C()},set layoutId(t){C(t),k()},get isActive(){return l()},set isActive(t){l(t),k()},$set:dt,$on:(t,r)=>ft(i,t,r)},H=b(),et=m(H);{var rt=t=>{var r=b(),n=m(r);O(n,()=>e(s),f=>{{let g=c(()=>W()?.unavailable===!0),S=c(()=>Bt(W()));kt(f,{get scriptId(){return e(s)},get workspaceId(){return a()},class:"h-full",get runDisabled(){return e(g)},get runDisabledReason(){return e(S)}})}}),d(t,r)},at=t=>{var r=b(),n=m(r);O(n,()=>e(I),f=>{Tt(f,{get terminalId(){return e(I)},get workspaceId(){return a()},class:"h-full"})}),d(t,r)};D(et,t=>{e(s)&&l()&&N()&&($()||P())?t(rt):e(I)&&l()&&$()&&t(at,1)})}d(V,H);var st=_t(tt);return q(),st}export{Ht as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{I as le}from"./D8YFvJ64.js";import{p as he}from"./DT4LiP7Y.js";import{Y as $e,b0 as fe,aZ as ge,U as ue,V as ye,a_ as xe,b as h,W as J,ay as w,aW as me,X as P,bh as pe,b4 as be,r as we,z as B,q as ke,O as ve,aM as Ce}from"./BdNiI0PS.js";import{p as Ee}from"./DkvJR80T.js";var m={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Be=ve.gitGraph,S=h(()=>ke({...Be,...J().gitGraph}),"getConfig"),d=new le(()=>{const e=S(),r=e.mainBranchName,t=e.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:t}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function Y(){return Ce({length:7})}h(Y,"getID");function te(e,r){const t=Object.create(null);return e.reduce((s,o)=>{const i=r(o);return t[i]||(t[i]=!0,s.push(o)),s},[])}h(te,"uniqBy");var Te=h(function(e){d.records.direction=e},"setDirection"),Le=h(function(e){w.debug("options str",e),e=e?.trim(),e=e||"{}";try{d.records.options=JSON.parse(e)}catch(r){w.error("error while parsing gitGraph options",r.message)}},"setOptions"),Me=h(function(){return d.records.options},"getOptions"),Re=h(function(e){let r=e.msg,t=e.id;const s=e.type;let o=e.tags;w.info("commit",r,t,s,o),w.debug("Entering commit:",r,t,s,o);const i=S();t=B.sanitizeText(t,i),r=B.sanitizeText(r,i),o=o?.map(a=>B.sanitizeText(a,i));const n={id:t||d.records.seq+"-"+Y(),message:r,seq:d.records.seq++,type:s??m.NORMAL,tags:o??[],parents:d.records.head==null?[]:[d.records.head.id],branch:d.records.currBranch};d.records.head=n,w.info("main branch",i.mainBranchName),d.records.commits.has(n.id)&&w.warn(`Commit ID ${n.id} already exists`),d.records.commits.set(n.id,n),d.records.branches.set(d.records.currBranch,n.id),w.debug("in pushCommit "+n.id)},"commit"),Ie=h(function(e){let r=e.name;const t=e.order;if(r=B.sanitizeText(r,S()),d.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);d.records.branches.set(r,d.records.head!=null?d.records.head.id:null),d.records.branchConfig.set(r,{name:r,order:t}),ae(r),w.debug("in createBranch")},"branch"),Oe=h(e=>{let r=e.branch,t=e.id;const s=e.type,o=e.tags,i=S();r=B.sanitizeText(r,i),t&&(t=B.sanitizeText(t,i));const n=d.records.branches.get(d.records.currBranch),a=d.records.branches.get(r),l=n?d.records.commits.get(n):void 0,f=a?d.records.commits.get(a):void 0;if(l&&f&&l.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(d.records.currBranch===r){const c=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(l===void 0||!l){const c=new Error(`Incorrect usage of "merge". Current branch (${d.records.currBranch})has no commits`);throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},c}if(!d.records.branches.has(r)){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},c}if(f===void 0||!f){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},c}if(l===f){const c=new Error('Incorrect usage of "merge". Both branches have same head');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(t&&d.records.commits.has(t)){const c=new Error('Incorrect usage of "merge". Commit with id:'+t+" already exists, use different custom id");throw c.hash={text:`merge ${r} ${t} ${s} ${o?.join(" ")}`,token:`merge ${r} ${t} ${s} ${o?.join(" ")}`,expected:[`merge ${r} ${t}_UNIQUE ${s} ${o?.join(" ")}`]},c}const g=a||"",$={id:t||`${d.records.seq}-${Y()}`,message:`merged branch ${r} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,g],branch:d.records.currBranch,type:m.MERGE,customType:s,customId:!!t,tags:o??[]};d.records.head=$,d.records.commits.set($.id,$),d.records.branches.set(d.records.currBranch,$.id),w.debug(d.records.branches),w.debug("in mergeBranch")},"merge"),_e=h(function(e){let r=e.id,t=e.targetId,s=e.tags,o=e.parent;w.debug("Entering cherryPick:",r,t,s);const i=S();if(r=B.sanitizeText(r,i),t=B.sanitizeText(t,i),s=s?.map(l=>B.sanitizeText(l,i)),o=B.sanitizeText(o,i),!r||!d.records.commits.has(r)){const l=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw l.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},l}const n=d.records.commits.get(r);if(n===void 0||!n)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(o&&!(Array.isArray(n.parents)&&n.parents.includes(o)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const a=n.branch;if(n.type===m.MERGE&&!o)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!t||!d.records.commits.has(t)){if(a===d.records.currBranch){const $=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const l=d.records.branches.get(d.records.currBranch);if(l===void 0||!l){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const f=d.records.commits.get(l);if(f===void 0||!f){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const g={id:d.records.seq+"-"+Y(),message:`cherry-picked ${n?.message} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,n.id],branch:d.records.currBranch,type:m.CHERRY_PICK,tags:s?s.filter(Boolean):[`cherry-pick:${n.id}${n.type===m.MERGE?`|parent:${o}`:""}`]};d.records.head=g,d.records.commits.set(g.id,g),d.records.branches.set(d.records.currBranch,g.id),w.debug(d.records.branches),w.debug("in cherryPick")}},"cherryPick"),ae=h(function(e){if(e=B.sanitizeText(e,S()),d.records.branches.has(e)){d.records.currBranch=e;const r=d.records.branches.get(d.records.currBranch);r===void 0||!r?d.records.head=null:d.records.head=d.records.commits.get(r)??null}else{const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw r.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},r}},"checkout");function V(e,r,t){const s=e.indexOf(r);s===-1?e.push(t):e.splice(s,1,t)}h(V,"upsert");function Q(e){const r=e.reduce((o,i)=>o.seq>i.seq?o:i,e[0]);let t="";e.forEach(function(o){o===r?t+=" *":t+=" |"});const s=[t,r.id,r.seq];for(const o in d.records.branches)d.records.branches.get(o)===r.id&&s.push(o);if(w.debug(s.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){const o=d.records.commits.get(r.parents[0]);V(e,r,o),r.parents[1]&&e.push(d.records.commits.get(r.parents[1]))}else{if(r.parents.length==0)return;if(r.parents[0]){const o=d.records.commits.get(r.parents[0]);V(e,r,o)}}e=te(e,o=>o.id),Q(e)}h(Q,"prettyPrintCommitHistory");var Ge=h(function(){w.debug(d.records.commits);const e=ne()[0];Q([e])},"prettyPrint"),He=h(function(){d.reset(),we()},"clear"),Se=h(function(){return[...d.records.branchConfig.values()].map((r,t)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${t}`)}).sort((r,t)=>(r.order??0)-(t.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),Ae=h(function(){return d.records.branches},"getBranches"),We=h(function(){return d.records.commits},"getCommits"),ne=h(function(){const e=[...d.records.commits.values()];return e.forEach(function(r){w.debug(r.id)}),e.sort((r,t)=>r.seq-t.seq),e},"getCommitsArray"),De=h(function(){return d.records.currBranch},"getCurrentBranch"),qe=h(function(){return d.records.direction},"getDirection"),Pe=h(function(){return d.records.head},"getHead"),se={commitType:m,getConfig:S,setDirection:Te,setOptions:Le,getOptions:Me,commit:Re,branch:Ie,merge:Oe,cherryPick:_e,checkout:ae,prettyPrint:Ge,clear:He,getBranchesAsObjArray:Se,getBranches:Ae,getCommits:We,getCommitsArray:ne,getCurrentBranch:De,getDirection:qe,getHead:Pe,setAccTitle:xe,getAccTitle:ye,getAccDescription:ue,setAccDescription:ge,setDiagramTitle:fe,getDiagramTitle:$e},Ne=h((e,r)=>{he(e,r),e.dir&&r.setDirection(e.dir);for(const t of e.statements)Fe(t,r)},"populate"),Fe=h((e,r)=>{const s={Commit:h(o=>r.commit(ze(o)),"Commit"),Branch:h(o=>r.branch(Ye(o)),"Branch"),Merge:h(o=>r.merge(je(o)),"Merge"),Checkout:h(o=>r.checkout(Ue(o)),"Checkout"),CherryPicking:h(o=>r.cherryPick(Ke(o)),"CherryPicking")}[e.$type];s?s(e):w.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),ze=h(e=>({id:e.id,msg:e.message??"",type:e.type!==void 0?m[e.type]:m.NORMAL,tags:e.tags??void 0}),"parseCommit"),Ye=h(e=>({name:e.name,order:e.order??0}),"parseBranch"),je=h(e=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?m[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),Ue=h(e=>e.branch,"parseCheckout"),Ke=h(e=>({id:e.id,targetId:"",tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),"parseCherryPicking"),Ve={parse:h(async e=>{const r=await Ee("gitGraph",e);w.debug(r),Ne(r,se)},"parse")},O=10,_=40,L=4,R=2,G=8,j=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),X=12,Z=new Set(["redux-color","redux-dark-color"]),Xe=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),H=h((e,r,t=!1)=>t&&e>0?(e-1)%(r-1)+1:e%r,"calcColorIndex"),C=new Map,E=new Map,F=30,D=new Map,z=[],I=0,y="LR",Je=h(()=>{C.clear(),E.clear(),D.clear(),I=0,z=[],y="LR"},"clear"),oe=h(e=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e=="string"?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach(s=>{const o=document.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),o.setAttribute("dy","1em"),o.setAttribute("x","0"),o.setAttribute("class","row"),o.textContent=s.trim(),r.appendChild(o)}),r},"drawText"),ce=h(e=>{let r,t,s;return y==="BT"?(t=h((o,i)=>o<=i,"comparisonFunc"),s=1/0):(t=h((o,i)=>o>=i,"comparisonFunc"),s=0),e.forEach(o=>{const i=y==="TB"||y=="BT"?E.get(o)?.y:E.get(o)?.x;i!==void 0&&t(i,s)&&(r=o,s=i)}),r},"findClosestParent"),Qe=h(e=>{let r="",t=1/0;return e.forEach(s=>{const o=E.get(s).y;o<=t&&(r=s,t=o)}),r||void 0},"findClosestParentBT"),Ze=h((e,r,t)=>{let s=t,o=t;const i=[];e.forEach(n=>{const a=r.get(n);if(!a)throw new Error(`Commit not found for key ${n}`);a.parents.length?(s=rr(a),o=Math.max(s,o)):i.push(a),tr(a,s)}),s=o,i.forEach(n=>{ar(n,s,t)}),e.forEach(n=>{const a=r.get(n);if(a?.parents.length){const l=Qe(a.parents);s=E.get(l).y-_,s<=o&&(o=s);const f=C.get(a.branch).pos,g=s-O;E.set(a.id,{x:f,y:g})}})},"setParallelBTPos"),er=h(e=>{const r=ce(e.parents.filter(s=>s!==null));if(!r)throw new Error(`Closest parent not found for commit ${e.id}`);const t=E.get(r)?.y;if(t===void 0)throw new Error(`Closest parent position not found for commit ${e.id}`);return t},"findClosestParentPos"),rr=h(e=>er(e)+_,"calculateCommitPosition"),tr=h((e,r)=>{const t=C.get(e.branch);if(!t)throw new Error(`Branch not found for commit ${e.id}`);const s=t.pos,o=r+O;return E.set(e.id,{x:s,y:o}),{x:s,y:o}},"setCommitPosition"),ar=h((e,r,t)=>{const s=C.get(e.branch);if(!s)throw new Error(`Branch not found for commit ${e.id}`);const o=r+t,i=s.pos;E.set(e.id,{x:i,y:o})},"setRootPosition"),nr=h((e,r,t,s,o,i)=>{const{theme:n}=P(),a=j.has(n??""),l=Z.has(n??""),f=Xe.has(n??"");if(i===m.HIGHLIGHT)e.append("rect").attr("x",t.x-10+(a?3:0)).attr("y",t.y-10+(a?3:0)).attr("width",a?14:20).attr("height",a?14:20).attr("class",`commit ${r.id} commit-highlight${H(o,G,l)} ${s}-outer`),e.append("rect").attr("x",t.x-6+(a?2:0)).attr("y",t.y-6+(a?2:0)).attr("width",a?8:12).attr("height",a?8:12).attr("class",`commit ${r.id} commit${H(o,G,l)} ${s}-inner`);else if(i===m.CHERRY_PICK)e.append("circle").attr("cx",t.x).attr("cy",t.y).attr("r",a?7:10).attr("class",`commit ${r.id} ${s}`),e.append("circle").attr("cx",t.x-3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("circle").attr("cx",t.x+3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("line").attr("x1",t.x+3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("line").attr("x1",t.x-3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`);else{const g=e.append("circle");if(g.attr("cx",t.x),g.attr("cy",t.y),g.attr("r",a?7:10),g.attr("class",`commit ${r.id} commit${H(o,G,l)}`),i===m.MERGE){const $=e.append("circle");$.attr("cx",t.x),$.attr("cy",t.y),$.attr("r",a?5:6),$.attr("class",`commit ${s} ${r.id} commit${H(o,G,l)}`)}if(i===m.REVERSE){const $=e.append("path"),c=a?4:5;$.attr("d",`M ${t.x-c},${t.y-c}L${t.x+c},${t.y+c}M${t.x-c},${t.y+c}L${t.x+c},${t.y-c}`).attr("class",`commit ${s} ${r.id} commit${H(o,G,l)}`)}}},"drawCommitBullet"),sr=h((e,r,t,s,o)=>{if(r.type!==m.CHERRY_PICK&&(r.customId&&r.type===m.MERGE||r.type!==m.MERGE)&&o.showCommitLabel){const i=e.append("g"),n=i.insert("rect").attr("class","commit-label-bkg"),a=i.append("text").attr("x",s).attr("y",t.y+25).attr("class","commit-label").text(r.id),l=a.node()?.getBBox();if(l&&(n.attr("x",t.posWithOffset-l.width/2-R).attr("y",t.y+13.5).attr("width",l.width+2*R).attr("height",l.height+2*R),y==="TB"||y==="BT"?(n.attr("x",t.x-(l.width+4*L+5)).attr("y",t.y-12),a.attr("x",t.x-(l.width+4*L)).attr("y",t.y+l.height-12)):a.attr("x",t.posWithOffset-l.width/2),o.rotateCommitLabel))if(y==="TB"||y==="BT")a.attr("transform","rotate(-45, "+t.x+", "+t.y+")"),n.attr("transform","rotate(-45, "+t.x+", "+t.y+")");else{const f=-7.5-(l.width+10)/25*9.5,g=10+l.width/25*8.5;i.attr("transform","translate("+f+", "+g+") rotate(-45, "+s+", "+t.y+")")}}},"drawCommitLabel"),or=h((e,r,t,s)=>{if(r.tags.length>0){let o=0,i=0,n=0;const a=[];for(const l of r.tags.reverse()){const f=e.insert("polygon"),g=e.append("circle"),$=e.append("text").attr("y",t.y-16-o).attr("class","tag-label").text(l),c=$.node()?.getBBox();if(!c)throw new Error("Tag bbox not found");i=Math.max(i,c.width),n=Math.max(n,c.height),$.attr("x",t.posWithOffset-c.width/2),a.push({tag:$,hole:g,rect:f,yOffset:o}),o+=20}for(const{tag:l,hole:f,rect:g,yOffset:$}of a){const c=n/2,x=t.y-19.2-$;if(g.attr("class","tag-label-bkg").attr("points",`
|
|
1
|
+
import{I as le}from"./Cc_BIXdP.js";import{p as he}from"./DZNLst19.js";import{Y as $e,b0 as fe,aZ as ge,U as ue,V as ye,a_ as xe,b as h,W as J,ay as w,aW as me,X as P,bh as pe,b4 as be,r as we,z as B,q as ke,O as ve,aM as Ce}from"./Z8gQAmFb.js";import{p as Ee}from"./Cv_J2c72.js";var m={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Be=ve.gitGraph,S=h(()=>ke({...Be,...J().gitGraph}),"getConfig"),d=new le(()=>{const e=S(),r=e.mainBranchName,t=e.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:t}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function Y(){return Ce({length:7})}h(Y,"getID");function te(e,r){const t=Object.create(null);return e.reduce((s,o)=>{const i=r(o);return t[i]||(t[i]=!0,s.push(o)),s},[])}h(te,"uniqBy");var Te=h(function(e){d.records.direction=e},"setDirection"),Le=h(function(e){w.debug("options str",e),e=e?.trim(),e=e||"{}";try{d.records.options=JSON.parse(e)}catch(r){w.error("error while parsing gitGraph options",r.message)}},"setOptions"),Me=h(function(){return d.records.options},"getOptions"),Re=h(function(e){let r=e.msg,t=e.id;const s=e.type;let o=e.tags;w.info("commit",r,t,s,o),w.debug("Entering commit:",r,t,s,o);const i=S();t=B.sanitizeText(t,i),r=B.sanitizeText(r,i),o=o?.map(a=>B.sanitizeText(a,i));const n={id:t||d.records.seq+"-"+Y(),message:r,seq:d.records.seq++,type:s??m.NORMAL,tags:o??[],parents:d.records.head==null?[]:[d.records.head.id],branch:d.records.currBranch};d.records.head=n,w.info("main branch",i.mainBranchName),d.records.commits.has(n.id)&&w.warn(`Commit ID ${n.id} already exists`),d.records.commits.set(n.id,n),d.records.branches.set(d.records.currBranch,n.id),w.debug("in pushCommit "+n.id)},"commit"),Ie=h(function(e){let r=e.name;const t=e.order;if(r=B.sanitizeText(r,S()),d.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);d.records.branches.set(r,d.records.head!=null?d.records.head.id:null),d.records.branchConfig.set(r,{name:r,order:t}),ae(r),w.debug("in createBranch")},"branch"),Oe=h(e=>{let r=e.branch,t=e.id;const s=e.type,o=e.tags,i=S();r=B.sanitizeText(r,i),t&&(t=B.sanitizeText(t,i));const n=d.records.branches.get(d.records.currBranch),a=d.records.branches.get(r),l=n?d.records.commits.get(n):void 0,f=a?d.records.commits.get(a):void 0;if(l&&f&&l.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(d.records.currBranch===r){const c=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(l===void 0||!l){const c=new Error(`Incorrect usage of "merge". Current branch (${d.records.currBranch})has no commits`);throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},c}if(!d.records.branches.has(r)){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},c}if(f===void 0||!f){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},c}if(l===f){const c=new Error('Incorrect usage of "merge". Both branches have same head');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(t&&d.records.commits.has(t)){const c=new Error('Incorrect usage of "merge". Commit with id:'+t+" already exists, use different custom id");throw c.hash={text:`merge ${r} ${t} ${s} ${o?.join(" ")}`,token:`merge ${r} ${t} ${s} ${o?.join(" ")}`,expected:[`merge ${r} ${t}_UNIQUE ${s} ${o?.join(" ")}`]},c}const g=a||"",$={id:t||`${d.records.seq}-${Y()}`,message:`merged branch ${r} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,g],branch:d.records.currBranch,type:m.MERGE,customType:s,customId:!!t,tags:o??[]};d.records.head=$,d.records.commits.set($.id,$),d.records.branches.set(d.records.currBranch,$.id),w.debug(d.records.branches),w.debug("in mergeBranch")},"merge"),_e=h(function(e){let r=e.id,t=e.targetId,s=e.tags,o=e.parent;w.debug("Entering cherryPick:",r,t,s);const i=S();if(r=B.sanitizeText(r,i),t=B.sanitizeText(t,i),s=s?.map(l=>B.sanitizeText(l,i)),o=B.sanitizeText(o,i),!r||!d.records.commits.has(r)){const l=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw l.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},l}const n=d.records.commits.get(r);if(n===void 0||!n)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(o&&!(Array.isArray(n.parents)&&n.parents.includes(o)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const a=n.branch;if(n.type===m.MERGE&&!o)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!t||!d.records.commits.has(t)){if(a===d.records.currBranch){const $=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const l=d.records.branches.get(d.records.currBranch);if(l===void 0||!l){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const f=d.records.commits.get(l);if(f===void 0||!f){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const g={id:d.records.seq+"-"+Y(),message:`cherry-picked ${n?.message} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,n.id],branch:d.records.currBranch,type:m.CHERRY_PICK,tags:s?s.filter(Boolean):[`cherry-pick:${n.id}${n.type===m.MERGE?`|parent:${o}`:""}`]};d.records.head=g,d.records.commits.set(g.id,g),d.records.branches.set(d.records.currBranch,g.id),w.debug(d.records.branches),w.debug("in cherryPick")}},"cherryPick"),ae=h(function(e){if(e=B.sanitizeText(e,S()),d.records.branches.has(e)){d.records.currBranch=e;const r=d.records.branches.get(d.records.currBranch);r===void 0||!r?d.records.head=null:d.records.head=d.records.commits.get(r)??null}else{const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw r.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},r}},"checkout");function V(e,r,t){const s=e.indexOf(r);s===-1?e.push(t):e.splice(s,1,t)}h(V,"upsert");function Q(e){const r=e.reduce((o,i)=>o.seq>i.seq?o:i,e[0]);let t="";e.forEach(function(o){o===r?t+=" *":t+=" |"});const s=[t,r.id,r.seq];for(const o in d.records.branches)d.records.branches.get(o)===r.id&&s.push(o);if(w.debug(s.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){const o=d.records.commits.get(r.parents[0]);V(e,r,o),r.parents[1]&&e.push(d.records.commits.get(r.parents[1]))}else{if(r.parents.length==0)return;if(r.parents[0]){const o=d.records.commits.get(r.parents[0]);V(e,r,o)}}e=te(e,o=>o.id),Q(e)}h(Q,"prettyPrintCommitHistory");var Ge=h(function(){w.debug(d.records.commits);const e=ne()[0];Q([e])},"prettyPrint"),He=h(function(){d.reset(),we()},"clear"),Se=h(function(){return[...d.records.branchConfig.values()].map((r,t)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${t}`)}).sort((r,t)=>(r.order??0)-(t.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),Ae=h(function(){return d.records.branches},"getBranches"),We=h(function(){return d.records.commits},"getCommits"),ne=h(function(){const e=[...d.records.commits.values()];return e.forEach(function(r){w.debug(r.id)}),e.sort((r,t)=>r.seq-t.seq),e},"getCommitsArray"),De=h(function(){return d.records.currBranch},"getCurrentBranch"),qe=h(function(){return d.records.direction},"getDirection"),Pe=h(function(){return d.records.head},"getHead"),se={commitType:m,getConfig:S,setDirection:Te,setOptions:Le,getOptions:Me,commit:Re,branch:Ie,merge:Oe,cherryPick:_e,checkout:ae,prettyPrint:Ge,clear:He,getBranchesAsObjArray:Se,getBranches:Ae,getCommits:We,getCommitsArray:ne,getCurrentBranch:De,getDirection:qe,getHead:Pe,setAccTitle:xe,getAccTitle:ye,getAccDescription:ue,setAccDescription:ge,setDiagramTitle:fe,getDiagramTitle:$e},Ne=h((e,r)=>{he(e,r),e.dir&&r.setDirection(e.dir);for(const t of e.statements)Fe(t,r)},"populate"),Fe=h((e,r)=>{const s={Commit:h(o=>r.commit(ze(o)),"Commit"),Branch:h(o=>r.branch(Ye(o)),"Branch"),Merge:h(o=>r.merge(je(o)),"Merge"),Checkout:h(o=>r.checkout(Ue(o)),"Checkout"),CherryPicking:h(o=>r.cherryPick(Ke(o)),"CherryPicking")}[e.$type];s?s(e):w.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),ze=h(e=>({id:e.id,msg:e.message??"",type:e.type!==void 0?m[e.type]:m.NORMAL,tags:e.tags??void 0}),"parseCommit"),Ye=h(e=>({name:e.name,order:e.order??0}),"parseBranch"),je=h(e=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?m[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),Ue=h(e=>e.branch,"parseCheckout"),Ke=h(e=>({id:e.id,targetId:"",tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),"parseCherryPicking"),Ve={parse:h(async e=>{const r=await Ee("gitGraph",e);w.debug(r),Ne(r,se)},"parse")},O=10,_=40,L=4,R=2,G=8,j=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),X=12,Z=new Set(["redux-color","redux-dark-color"]),Xe=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),H=h((e,r,t=!1)=>t&&e>0?(e-1)%(r-1)+1:e%r,"calcColorIndex"),C=new Map,E=new Map,F=30,D=new Map,z=[],I=0,y="LR",Je=h(()=>{C.clear(),E.clear(),D.clear(),I=0,z=[],y="LR"},"clear"),oe=h(e=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e=="string"?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach(s=>{const o=document.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),o.setAttribute("dy","1em"),o.setAttribute("x","0"),o.setAttribute("class","row"),o.textContent=s.trim(),r.appendChild(o)}),r},"drawText"),ce=h(e=>{let r,t,s;return y==="BT"?(t=h((o,i)=>o<=i,"comparisonFunc"),s=1/0):(t=h((o,i)=>o>=i,"comparisonFunc"),s=0),e.forEach(o=>{const i=y==="TB"||y=="BT"?E.get(o)?.y:E.get(o)?.x;i!==void 0&&t(i,s)&&(r=o,s=i)}),r},"findClosestParent"),Qe=h(e=>{let r="",t=1/0;return e.forEach(s=>{const o=E.get(s).y;o<=t&&(r=s,t=o)}),r||void 0},"findClosestParentBT"),Ze=h((e,r,t)=>{let s=t,o=t;const i=[];e.forEach(n=>{const a=r.get(n);if(!a)throw new Error(`Commit not found for key ${n}`);a.parents.length?(s=rr(a),o=Math.max(s,o)):i.push(a),tr(a,s)}),s=o,i.forEach(n=>{ar(n,s,t)}),e.forEach(n=>{const a=r.get(n);if(a?.parents.length){const l=Qe(a.parents);s=E.get(l).y-_,s<=o&&(o=s);const f=C.get(a.branch).pos,g=s-O;E.set(a.id,{x:f,y:g})}})},"setParallelBTPos"),er=h(e=>{const r=ce(e.parents.filter(s=>s!==null));if(!r)throw new Error(`Closest parent not found for commit ${e.id}`);const t=E.get(r)?.y;if(t===void 0)throw new Error(`Closest parent position not found for commit ${e.id}`);return t},"findClosestParentPos"),rr=h(e=>er(e)+_,"calculateCommitPosition"),tr=h((e,r)=>{const t=C.get(e.branch);if(!t)throw new Error(`Branch not found for commit ${e.id}`);const s=t.pos,o=r+O;return E.set(e.id,{x:s,y:o}),{x:s,y:o}},"setCommitPosition"),ar=h((e,r,t)=>{const s=C.get(e.branch);if(!s)throw new Error(`Branch not found for commit ${e.id}`);const o=r+t,i=s.pos;E.set(e.id,{x:i,y:o})},"setRootPosition"),nr=h((e,r,t,s,o,i)=>{const{theme:n}=P(),a=j.has(n??""),l=Z.has(n??""),f=Xe.has(n??"");if(i===m.HIGHLIGHT)e.append("rect").attr("x",t.x-10+(a?3:0)).attr("y",t.y-10+(a?3:0)).attr("width",a?14:20).attr("height",a?14:20).attr("class",`commit ${r.id} commit-highlight${H(o,G,l)} ${s}-outer`),e.append("rect").attr("x",t.x-6+(a?2:0)).attr("y",t.y-6+(a?2:0)).attr("width",a?8:12).attr("height",a?8:12).attr("class",`commit ${r.id} commit${H(o,G,l)} ${s}-inner`);else if(i===m.CHERRY_PICK)e.append("circle").attr("cx",t.x).attr("cy",t.y).attr("r",a?7:10).attr("class",`commit ${r.id} ${s}`),e.append("circle").attr("cx",t.x-3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("circle").attr("cx",t.x+3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("line").attr("x1",t.x+3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("line").attr("x1",t.x-3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`);else{const g=e.append("circle");if(g.attr("cx",t.x),g.attr("cy",t.y),g.attr("r",a?7:10),g.attr("class",`commit ${r.id} commit${H(o,G,l)}`),i===m.MERGE){const $=e.append("circle");$.attr("cx",t.x),$.attr("cy",t.y),$.attr("r",a?5:6),$.attr("class",`commit ${s} ${r.id} commit${H(o,G,l)}`)}if(i===m.REVERSE){const $=e.append("path"),c=a?4:5;$.attr("d",`M ${t.x-c},${t.y-c}L${t.x+c},${t.y+c}M${t.x-c},${t.y+c}L${t.x+c},${t.y-c}`).attr("class",`commit ${s} ${r.id} commit${H(o,G,l)}`)}}},"drawCommitBullet"),sr=h((e,r,t,s,o)=>{if(r.type!==m.CHERRY_PICK&&(r.customId&&r.type===m.MERGE||r.type!==m.MERGE)&&o.showCommitLabel){const i=e.append("g"),n=i.insert("rect").attr("class","commit-label-bkg"),a=i.append("text").attr("x",s).attr("y",t.y+25).attr("class","commit-label").text(r.id),l=a.node()?.getBBox();if(l&&(n.attr("x",t.posWithOffset-l.width/2-R).attr("y",t.y+13.5).attr("width",l.width+2*R).attr("height",l.height+2*R),y==="TB"||y==="BT"?(n.attr("x",t.x-(l.width+4*L+5)).attr("y",t.y-12),a.attr("x",t.x-(l.width+4*L)).attr("y",t.y+l.height-12)):a.attr("x",t.posWithOffset-l.width/2),o.rotateCommitLabel))if(y==="TB"||y==="BT")a.attr("transform","rotate(-45, "+t.x+", "+t.y+")"),n.attr("transform","rotate(-45, "+t.x+", "+t.y+")");else{const f=-7.5-(l.width+10)/25*9.5,g=10+l.width/25*8.5;i.attr("transform","translate("+f+", "+g+") rotate(-45, "+s+", "+t.y+")")}}},"drawCommitLabel"),or=h((e,r,t,s)=>{if(r.tags.length>0){let o=0,i=0,n=0;const a=[];for(const l of r.tags.reverse()){const f=e.insert("polygon"),g=e.append("circle"),$=e.append("text").attr("y",t.y-16-o).attr("class","tag-label").text(l),c=$.node()?.getBBox();if(!c)throw new Error("Tag bbox not found");i=Math.max(i,c.width),n=Math.max(n,c.height),$.attr("x",t.posWithOffset-c.width/2),a.push({tag:$,hole:g,rect:f,yOffset:o}),o+=20}for(const{tag:l,hole:f,rect:g,yOffset:$}of a){const c=n/2,x=t.y-19.2-$;if(g.attr("class","tag-label-bkg").attr("points",`
|
|
2
2
|
${s-i/2-L/2},${x+R}
|
|
3
3
|
${s-i/2-L/2},${x-R}
|
|
4
4
|
${t.posWithOffset-i/2-L},${x-c-R}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as l,r as m,d as a}from"./
|
|
1
|
+
import{g as l,r as m,d as a}from"./Cf09_YLr.js";import{p}from"./DZNLst19.js";import{b as t,ay as o}from"./Z8gQAmFb.js";import{M as u,b as c}from"./Cv_J2c72.js";var f=c().RailroadPeg.parser.LangiumParser,i=t(e=>{const r=e.alternatives.map(d);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformOrderedChoice"),d=t(e=>{const r=e.elements.map(P);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformSequence"),P=t(e=>{const r=g(e.suffix);return e.operator?{type:"special",text:e.operator==="&"?`&${s(r)}`:`!${s(r)}`}:r},"transformPrefix"),s=t(e=>{switch(e.type){case"terminal":return`"${e.value}"`;case"nonterminal":return e.name;case"special":return e.text;default:return"(...)"}},"nodeToLabel"),g=t(e=>{const r=y(e.primary);if(!e.operator)return r;switch(e.operator){case"?":return{type:"optional",element:r};case"*":return{type:"repetition",element:r,min:0,max:1/0};case"+":return{type:"repetition",element:r,min:1,max:1/0};default:throw new Error(`Unsupported PEG suffix operator: ${e.operator}`)}},"transformSuffix"),y=t(e=>{switch(e.$type){case"PegLiteral":return{type:"terminal",value:e.value};case"PegIdentifier":return{type:"nonterminal",name:e.name};case"PegGroup":return i(e.element);case"PegAny":return{type:"special",text:e.dot};default:throw new Error(`Unsupported PEG primary node: ${e.$type}`)}},"transformPrimary"),v=t(e=>({name:e.name,definition:i(e.definition)}),"transformRule"),h=t(e=>{p(e,a),e.title&&a.setTitle(e.title),e.rules.map(r=>a.addRule(v(r)))},"populateDb"),b={parse:t(e=>{a.clear(),o.debug("[PEG Parser] Starting Langium parse");const r=f.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new u(r);const n=r.value;o.debug("[PEG Parser] Parsed rules:",n.rules.length),h(n),o.debug("[PEG Parser] Parse complete")},"parse"),parser:{yy:a}},$={parser:b,db:a,renderer:m,styles:l};export{$ as diagram};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/
|
|
2
|
-
import{_ as i}from"./
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/B-jmn73b.js","/app/immutable/chunks/DTQYcznv.js","/app/immutable/chunks/DYhIMPy1.js","/app/immutable/chunks/A0r9TbR7.js","/app/immutable/chunks/WFvSJ9zU.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/DLqztIqC.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/CaxyE6o_.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/chunks/-SwunqO3.js","/app/immutable/chunks/CEQZVenN.js","/app/immutable/chunks/BvFAWM27.js","/app/immutable/chunks/BP5uyQTv.js","/app/immutable/chunks/Ck9ZyE1n.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/BaIAhI85.js","/app/immutable/chunks/BmP1Wws6.js","/app/immutable/chunks/finAdq6c.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/B5tGFpkq.js","/app/immutable/chunks/BVt_T8ao.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/CeswpNyE.js","/app/immutable/chunks/C4pN30lR.js","/app/immutable/chunks/CuhrgDBI.js","/app/immutable/chunks/BqqN40AD.js","/app/immutable/chunks/DpMTpLDQ.js","/app/immutable/chunks/DfxQWSVU.js","/app/immutable/chunks/CoLl8pQb.js","/app/immutable/chunks/BWYr8u9e.js","/app/immutable/chunks/XJv96NUg.js","/app/immutable/assets/notify.BeL_JB6L.css","/app/immutable/chunks/B0biUQQF.js","/app/immutable/chunks/BIEvH8pu.js","/app/immutable/chunks/BMm9sGZ6.js","/app/immutable/chunks/D6YDmdhV.js","/app/immutable/chunks/-7ARPWgR.js","/app/immutable/chunks/CMiilI_P.js","/app/immutable/chunks/_xNtAuSN.js","/app/immutable/chunks/BzzDMYz_.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as i}from"./DTQYcznv.js";import{c as m}from"./ChTqQfQN.js";function d(){return typeof window<"u"&&window.location.pathname.startsWith("/hud")}let _=0;function f(){_+=1}function E(){return _}const h=m("Navigation"),w="settings-previous-path";function r(t){return/^\/settings(?:[/?#]|$)/.test(t)}async function l(t,a={}){if(d()||typeof window<"u"&&/^\/dock(?:\/|$)/.test(window.location.pathname)){h.debug("Ignoring navigation in auxiliary window",{route:t});return}const c=a.assistantContent||t.startsWith("intent://")||/^https?:\/\//.test(t);if(c||f(),c){const{showAssistantContent:n}=await i(async()=>{const{showAssistantContent:e}=await import("./B-jmn73b.js");return{showAssistantContent:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38]),import.meta.url);if(await n(t,{preserveFocus:!0,background:a.assistantContent===!0,agentId:a.assistantAgentId})){if(a.assistantContent)return;const{openPanel:e}=await i(async()=>{const{openPanel:o}=await import("./A0r9TbR7.js").then(s=>s.I7);return{openPanel:o}},__vite__mapDeps([3,4,2,5,6,7,8,1,9,10,11]),import.meta.url),{store:g}=await i(async()=>{const{store:o}=await import("./-7ARPWgR.js");return{store:o}},__vite__mapDeps([39,3,4,2,5,6,7,8,1,9,10,11,40,41]),import.meta.url);g.dispatch(e("chief"));const{goto:p}=await i(async()=>{const{goto:o}=await import("./BzzDMYz_.js").then(s=>s.n);return{goto:o}},__vite__mapDeps([42,2]),import.meta.url);window.location.pathname!=="/"&&await p("/");return}}if(r(t)&&typeof window<"u"&&typeof sessionStorage<"u"&&!r(window.location.pathname)){const n=new URL(window.location.href);sessionStorage.setItem(w,n.pathname+n.search+n.hash)}const{goto:u}=await i(async()=>{const{goto:n}=await import("./BzzDMYz_.js").then(e=>e.n);return{goto:n}},__vite__mapDeps([42,2]),import.meta.url);return a.state?u(t,{state:a.state}):u(t)}const I=Object.freeze(Object.defineProperty({__proto__:null,SETTINGS_PREV_PATH_KEY:w,isHudWindowRenderer:d,isSettingsRoute:r,navigateToRoute:l},Symbol.toStringTag,{value:"Module"}));export{w as S,r as a,f as b,E as c,I as d,d as i,l as n};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{aZ as Ae,U as ke,Y as ae,b0 as Fe,V as Pe,a_ as ve,b as o,X as Vt,ay as bt,aW as Lt,B as Ce,r as Le,O as V,aV as Ee,a6 as De}from"./
|
|
1
|
+
import{aZ as Ae,U as ke,Y as ae,b0 as Fe,V as Pe,a_ as ve,b as o,X as Vt,ay as bt,aW as Lt,B as Ce,r as Le,O as V,aV as Ee,a6 as De}from"./Z8gQAmFb.js";import{l as ie}from"./BMaybjSV.js";var Et=(function(){var t=o(function(Y,r,l,x){for(l=l||{},x=Y.length;x--;l[Y[x]]=r);return l},"o"),n=[1,3],f=[1,4],d=[1,5],h=[1,6],p=[1,7],y=[1,4,5,10,12,13,14,15,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],_=[1,4,5,10,12,13,14,15,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],a=[55,56,57],k=[2,36],u=[1,37],T=[1,36],q=[1,38],m=[1,35],b=[1,43],g=[1,41],A=[1,45],ht=[1,14],xt=[1,23],ft=[1,18],gt=[1,19],ct=[1,20],_t=[1,21],dt=[1,22],i=[1,24],zt=[1,25],It=[1,26],wt=[1,27],Bt=[1,28],Rt=[1,29],U=[1,32],Q=[1,33],F=[1,34],P=[1,39],v=[1,40],C=[1,42],L=[1,44],X=[1,63],H=[1,62],E=[4,5,8,10,12,13,14,15,18,44,47,49,55,56,57,63,64,65,66,67],Nt=[1,66],Wt=[1,67],Ut=[1,68],Qt=[1,69],Ot=[1,70],Xt=[1,71],Ht=[1,72],Mt=[1,73],Yt=[1,74],jt=[1,75],Gt=[1,76],Kt=[1,77],w=[4,5,6,7,8,9,10,11,12,13,14,15,18],K=[1,91],Z=[1,92],J=[1,93],$=[1,100],tt=[1,94],et=[1,97],it=[1,95],at=[1,96],nt=[1,98],st=[1,99],At=[1,103],Zt=[10,55,56,57],N=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],kt={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:"error",4:"ALPHA",5:"NUM",6:"NODE_STRING",7:"DOWN",8:"MINUS",9:"DEFAULT",10:"COMMA",11:"COLON",12:"AMP",13:"BRKT",14:"MULT",15:"UNICODE_TEXT",17:"UNIT",18:"SPACE",19:"STYLE",20:"PCT",25:"CLASSDEF",28:"QUADRANT",35:"title",36:"title_value",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"section",44:"point_start",45:"point_x",46:"point_y",47:"class_name",48:"X-AXIS",49:"AXIS-TEXT-DELIMITER",50:"Y-AXIS",51:"QUADRANT_1",52:"QUADRANT_2",53:"QUADRANT_3",54:"QUADRANT_4",55:"NEWLINE",56:"SEMI",57:"EOF",60:"STR",61:"MD_STR",63:"PUNCTUATION",64:"PLUS",65:"EQUALS",66:"DOT",67:"UNDERSCORE"},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:o(function(r,l,x,c,S,e,ut){var s=e.length-1;switch(S){case 23:this.$=e[s];break;case 24:this.$=e[s-1]+""+e[s];break;case 26:this.$=e[s-1]+e[s];break;case 27:this.$=[e[s].trim()];break;case 28:e[s-2].push(e[s].trim()),this.$=e[s-2];break;case 29:this.$=e[s-4],c.addClass(e[s-2],e[s]);break;case 37:this.$=[];break;case 42:this.$=e[s].trim(),c.setDiagramTitle(this.$);break;case 43:this.$=e[s].trim(),c.setAccTitle(this.$);break;case 44:case 45:this.$=e[s].trim(),c.setAccDescription(this.$);break;case 46:c.addSection(e[s].substr(8)),this.$=e[s].substr(8);break;case 47:c.addPoint(e[s-3],"",e[s-1],e[s],[]);break;case 48:c.addPoint(e[s-4],e[s-3],e[s-1],e[s],[]);break;case 49:c.addPoint(e[s-4],"",e[s-2],e[s-1],e[s]);break;case 50:c.addPoint(e[s-5],e[s-4],e[s-2],e[s-1],e[s]);break;case 51:c.setXAxisLeftText(e[s-2]),c.setXAxisRightText(e[s]);break;case 52:e[s-1].text+=" ⟶ ",c.setXAxisLeftText(e[s-1]);break;case 53:c.setXAxisLeftText(e[s]);break;case 54:c.setYAxisBottomText(e[s-2]),c.setYAxisTopText(e[s]);break;case 55:e[s-1].text+=" ⟶ ",c.setYAxisBottomText(e[s-1]);break;case 56:c.setYAxisBottomText(e[s]);break;case 57:c.setQuadrant1Text(e[s]);break;case 58:c.setQuadrant2Text(e[s]);break;case 59:c.setQuadrant3Text(e[s]);break;case 60:c.setQuadrant4Text(e[s]);break;case 64:this.$={text:e[s],type:"text"};break;case 65:this.$={text:e[s-1].text+""+e[s],type:e[s-1].type};break;case 66:this.$={text:e[s],type:"text"};break;case 67:this.$={text:e[s],type:"markdown"};break;case 68:this.$=e[s];break;case 69:this.$=e[s-1]+""+e[s];break}},"anonymous"),table:[{18:n,26:1,27:2,28:f,55:d,56:h,57:p},{1:[3]},{18:n,26:8,27:2,28:f,55:d,56:h,57:p},{18:n,26:9,27:2,28:f,55:d,56:h,57:p},t(y,[2,33],{29:10}),t(_,[2,61]),t(_,[2,62]),t(_,[2,63]),{1:[2,30]},{1:[2,31]},t(a,k,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:u,5:T,10:q,12:m,13:b,14:g,15:A,18:ht,25:xt,35:ft,37:gt,39:ct,41:_t,42:dt,48:i,50:zt,51:It,52:wt,53:Bt,54:Rt,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),t(y,[2,34]),{27:46,55:d,56:h,57:p},t(a,[2,37]),t(a,k,{24:13,32:15,33:16,34:17,43:30,58:31,31:47,4:u,5:T,10:q,12:m,13:b,14:g,15:A,18:ht,25:xt,35:ft,37:gt,39:ct,41:_t,42:dt,48:i,50:zt,51:It,52:wt,53:Bt,54:Rt,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),t(a,[2,39]),t(a,[2,40]),t(a,[2,41]),{36:[1,48]},{38:[1,49]},{40:[1,50]},t(a,[2,45]),t(a,[2,46]),{18:[1,51]},{4:u,5:T,10:q,12:m,13:b,14:g,15:A,43:52,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:u,5:T,10:q,12:m,13:b,14:g,15:A,43:53,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:u,5:T,10:q,12:m,13:b,14:g,15:A,43:54,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:u,5:T,10:q,12:m,13:b,14:g,15:A,43:55,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:u,5:T,10:q,12:m,13:b,14:g,15:A,43:56,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:u,5:T,10:q,12:m,13:b,14:g,15:A,43:57,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:u,5:T,8:X,10:q,12:m,13:b,14:g,15:A,18:H,44:[1,58],47:[1,59],58:61,59:60,63:F,64:P,65:v,66:C,67:L},t(E,[2,64]),t(E,[2,66]),t(E,[2,67]),t(E,[2,70]),t(E,[2,71]),t(E,[2,72]),t(E,[2,73]),t(E,[2,74]),t(E,[2,75]),t(E,[2,76]),t(E,[2,77]),t(E,[2,78]),t(E,[2,79]),t(E,[2,80]),t(E,[2,81]),t(y,[2,35]),t(a,[2,38]),t(a,[2,42]),t(a,[2,43]),t(a,[2,44]),{3:65,4:Nt,5:Wt,6:Ut,7:Qt,8:Ot,9:Xt,10:Ht,11:Mt,12:Yt,13:jt,14:Gt,15:Kt,21:64},t(a,[2,53],{59:60,58:61,4:u,5:T,8:X,10:q,12:m,13:b,14:g,15:A,18:H,49:[1,78],63:F,64:P,65:v,66:C,67:L}),t(a,[2,56],{59:60,58:61,4:u,5:T,8:X,10:q,12:m,13:b,14:g,15:A,18:H,49:[1,79],63:F,64:P,65:v,66:C,67:L}),t(a,[2,57],{59:60,58:61,4:u,5:T,8:X,10:q,12:m,13:b,14:g,15:A,18:H,63:F,64:P,65:v,66:C,67:L}),t(a,[2,58],{59:60,58:61,4:u,5:T,8:X,10:q,12:m,13:b,14:g,15:A,18:H,63:F,64:P,65:v,66:C,67:L}),t(a,[2,59],{59:60,58:61,4:u,5:T,8:X,10:q,12:m,13:b,14:g,15:A,18:H,63:F,64:P,65:v,66:C,67:L}),t(a,[2,60],{59:60,58:61,4:u,5:T,8:X,10:q,12:m,13:b,14:g,15:A,18:H,63:F,64:P,65:v,66:C,67:L}),{45:[1,80]},{44:[1,81]},t(E,[2,65]),t(E,[2,82]),t(E,[2,83]),t(E,[2,84]),{3:83,4:Nt,5:Wt,6:Ut,7:Qt,8:Ot,9:Xt,10:Ht,11:Mt,12:Yt,13:jt,14:Gt,15:Kt,18:[1,82]},t(w,[2,23]),t(w,[2,1]),t(w,[2,2]),t(w,[2,3]),t(w,[2,4]),t(w,[2,5]),t(w,[2,6]),t(w,[2,7]),t(w,[2,8]),t(w,[2,9]),t(w,[2,10]),t(w,[2,11]),t(w,[2,12]),t(a,[2,52],{58:31,43:84,4:u,5:T,10:q,12:m,13:b,14:g,15:A,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),t(a,[2,55],{58:31,43:85,4:u,5:T,10:q,12:m,13:b,14:g,15:A,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),{46:[1,86]},{45:[1,87]},{4:K,5:Z,6:J,8:$,11:tt,13:et,16:90,17:it,18:at,19:nt,20:st,22:89,23:88},t(w,[2,24]),t(a,[2,51],{59:60,58:61,4:u,5:T,8:X,10:q,12:m,13:b,14:g,15:A,18:H,63:F,64:P,65:v,66:C,67:L}),t(a,[2,54],{59:60,58:61,4:u,5:T,8:X,10:q,12:m,13:b,14:g,15:A,18:H,63:F,64:P,65:v,66:C,67:L}),t(a,[2,47],{22:89,16:90,23:101,4:K,5:Z,6:J,8:$,11:tt,13:et,17:it,18:at,19:nt,20:st}),{46:[1,102]},t(a,[2,29],{10:At}),t(Zt,[2,27],{16:104,4:K,5:Z,6:J,8:$,11:tt,13:et,17:it,18:at,19:nt,20:st}),t(N,[2,25]),t(N,[2,13]),t(N,[2,14]),t(N,[2,15]),t(N,[2,16]),t(N,[2,17]),t(N,[2,18]),t(N,[2,19]),t(N,[2,20]),t(N,[2,21]),t(N,[2,22]),t(a,[2,49],{10:At}),t(a,[2,48],{22:89,16:90,23:105,4:K,5:Z,6:J,8:$,11:tt,13:et,17:it,18:at,19:nt,20:st}),{4:K,5:Z,6:J,8:$,11:tt,13:et,16:90,17:it,18:at,19:nt,20:st,22:106},t(N,[2,26]),t(a,[2,50],{10:At}),t(Zt,[2,28],{16:104,4:K,5:Z,6:J,8:$,11:tt,13:et,17:it,18:at,19:nt,20:st})],defaultActions:{8:[2,30],9:[2,31]},parseError:o(function(r,l){if(l.recoverable)this.trace(r);else{var x=new Error(r);throw x.hash=l,x}},"parseError"),parse:o(function(r){var l=this,x=[0],c=[],S=[null],e=[],ut=this.table,s="",yt=0,Jt=0,me=2,$t=1,be=e.slice.call(arguments,1),D=Object.create(this.lexer),j={yy:{}};for(var Ft in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ft)&&(j.yy[Ft]=this.yy[Ft]);D.setInput(r,j.yy),j.yy.lexer=D,j.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var Pt=D.yylloc;e.push(Pt);var Se=D.options&&D.options.ranges;typeof j.yy.parseError=="function"?this.parseError=j.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function _e(R){x.length=x.length-2*R,S.length=S.length-R,e.length=e.length-R}o(_e,"popStack");function te(){var R;return R=c.pop()||D.lex()||$t,typeof R!="number"&&(R instanceof Array&&(c=R,R=c.pop()),R=l.symbols_[R]||R),R}o(te,"lex");for(var B,G,W,vt,rt={},Tt,M,ee,qt;;){if(G=x[x.length-1],this.defaultActions[G]?W=this.defaultActions[G]:((B===null||typeof B>"u")&&(B=te()),W=ut[G]&&ut[G][B]),typeof W>"u"||!W.length||!W[0]){var Ct="";qt=[];for(Tt in ut[G])this.terminals_[Tt]&&Tt>me&&qt.push("'"+this.terminals_[Tt]+"'");D.showPosition?Ct="Parse error on line "+(yt+1)+`:
|
|
2
2
|
`+D.showPosition()+`
|
|
3
3
|
Expecting `+qt.join(", ")+", got '"+(this.terminals_[B]||B)+"'":Ct="Parse error on line "+(yt+1)+": Unexpected "+(B==$t?"end of input":"'"+(this.terminals_[B]||B)+"'"),this.parseError(Ct,{text:D.match,token:this.terminals_[B]||B,line:D.yylineno,loc:Pt,expected:qt})}if(W[0]instanceof Array&&W.length>1)throw new Error("Parse Error: multiple actions possible at state: "+G+", token: "+B);switch(W[0]){case 1:x.push(B),S.push(D.yytext),e.push(D.yylloc),x.push(W[1]),B=null,Jt=D.yyleng,s=D.yytext,yt=D.yylineno,Pt=D.yylloc;break;case 2:if(M=this.productions_[W[1]][1],rt.$=S[S.length-M],rt._$={first_line:e[e.length-(M||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(M||1)].first_column,last_column:e[e.length-1].last_column},Se&&(rt._$.range=[e[e.length-(M||1)].range[0],e[e.length-1].range[1]]),vt=this.performAction.apply(rt,[s,Jt,yt,j.yy,W[1],S,e].concat(be)),typeof vt<"u")return vt;M&&(x=x.slice(0,-1*M*2),S=S.slice(0,-1*M),e=e.slice(0,-1*M)),x.push(this.productions_[W[1]][0]),S.push(rt.$),e.push(rt._$),ee=ut[x[x.length-2]][x[x.length-1]],x.push(ee);break;case 3:return!0}}return!0},"parse")},qe=(function(){var Y={EOF:1,parseError:o(function(l,x){if(this.yy.parser)this.yy.parser.parseError(l,x);else throw new Error(l)},"parseError"),setInput:o(function(r,l){return this.yy=l||this.yy||{},this._input=r,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:o(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var l=r.match(/(?:\r\n?|\n).*/g);return l?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:o(function(r){var l=r.length,x=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;var c=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),x.length-1&&(this.yylineno-=x.length-1);var S=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:x?(x.length===c.length?this.yylloc.first_column:0)+c[c.length-x.length].length-x[0].length:this.yylloc.first_column-l},this.options.ranges&&(this.yylloc.range=[S[0],S[0]+this.yyleng-l]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:o(function(r){this.unput(this.match.slice(r))},"less"),pastInput:o(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var r=this.pastInput(),l=new Array(r.length+1).join("-");return r+this.upcomingInput()+`
|