@intent-hq/web 2.310.1 → 2.310.2
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/assets/{DiagramPresentation.fimBl1wP.css → DiagramPresentation.Bfi3xHm0.css} +1 -1
- package/web/app/immutable/chunks/-xK_vQQs.js +1 -0
- package/web/app/immutable/chunks/{CQe4IdgR.js → 189zCzpy.js} +1 -1
- package/web/app/immutable/chunks/6XLvYn_R.js +4 -0
- package/web/app/immutable/chunks/{BIxkRFIj.js → 7LPFBi2V.js} +2 -2
- package/web/app/immutable/chunks/{D81gRUjY.js → 9Al7uANH.js} +1 -1
- package/web/app/immutable/chunks/{xMirTl3q.js → 9Ax53qRD.js} +2 -2
- package/web/app/immutable/chunks/{DQEBW0YT.js → 9U2m-KE4.js} +1 -1
- package/web/app/immutable/chunks/{t9id1Dgw.js → B08PB3d6.js} +1 -1
- package/web/app/immutable/chunks/B1wLVJWc.js +7 -0
- package/web/app/immutable/chunks/B1zCpBoo.js +217 -0
- package/web/app/immutable/chunks/{CsYRAdgB.js → B2-LFLJm.js} +1 -1
- package/web/app/immutable/chunks/{B4dTn6xv.js → B3NZDdp-.js} +1 -1
- package/web/app/immutable/chunks/{r1_PrlQL.js → B3u9yhMd.js} +1 -1
- package/web/app/immutable/chunks/{DzvQOT8_.js → B6ACa1PM.js} +1 -1
- package/web/app/immutable/chunks/{DXOCO_oS.js → B7VxeONz.js} +1 -1
- package/web/app/immutable/chunks/{CEdLQlJ6.js → BGOzArFr.js} +6 -6
- package/web/app/immutable/chunks/{Bfkn2BGM.js → BGSgFd0R.js} +1 -1
- package/web/app/immutable/chunks/{C7oH1dbI.js → BHMk19Fd.js} +1 -1
- package/web/app/immutable/chunks/{DUkegami.js → BRp0P9cF.js} +1 -1
- package/web/app/immutable/chunks/{BtHVXttl.js → BS3KKa6i.js} +5 -5
- package/web/app/immutable/chunks/{Bhcwd2SW.js → BSN7-Qxa.js} +4 -4
- package/web/app/immutable/chunks/{CnmCWFKQ.js → BU1SD4F5.js} +2 -2
- package/web/app/immutable/chunks/BUvLOETw.js +8 -0
- package/web/app/immutable/chunks/{CwH3s3Sg.js → B_CxKeY9.js} +1 -1
- package/web/app/immutable/chunks/{CsASRGy9.js → B_F8B07u.js} +5 -5
- package/web/app/immutable/chunks/{D-9LH0ah.js → B_u6ph9g.js} +1 -1
- package/web/app/immutable/chunks/{CHH2PtZ7.js → BbajLcMi.js} +1 -1
- package/web/app/immutable/chunks/{TQIai6Ne.js → BcGA_XKM.js} +79 -79
- package/web/app/immutable/chunks/Bdj20t_M.js +200 -0
- package/web/app/immutable/chunks/{Si43_nYW.js → BfVF2I5Q.js} +3 -3
- package/web/app/immutable/chunks/{B20hJMKp.js → BgjzIHmr.js} +2 -2
- package/web/app/immutable/chunks/BhFdeIZl.js +1 -0
- package/web/app/immutable/chunks/{CeEeQIAV.js → BjS3bCVA.js} +1 -1
- package/web/app/immutable/chunks/Bl1SUWQK.js +1 -0
- package/web/app/immutable/chunks/BtFywNMt.js +40 -0
- package/web/app/immutable/chunks/{B_D0NLtg.js → BwThkZnv.js} +1 -1
- package/web/app/immutable/chunks/ByGoYv9M.js +1 -0
- package/web/app/immutable/chunks/Bz2AaX7v.js +38 -0
- package/web/app/immutable/chunks/{j0ThtFJc.js → BzqKIdEP.js} +1 -1
- package/web/app/immutable/chunks/{BV9p4X5I.js → C-27EQSK.js} +6 -6
- package/web/app/immutable/chunks/C2FKcF8a.js +99 -0
- package/web/app/immutable/chunks/{D04E4MVv.js → C2ypXh8V.js} +4 -4
- package/web/app/immutable/chunks/{DaEQgqyy.js → C5bjHjx4.js} +1 -1
- package/web/app/immutable/chunks/{C-Mmob1s.js → C64YVcCh.js} +1 -1
- package/web/app/immutable/chunks/{BV7dztYI.js → C7-VQsLR.js} +1 -1
- package/web/app/immutable/chunks/C7ldC6zu.js +41 -0
- package/web/app/immutable/chunks/{CgAIOmc3.js → C7xfOFNZ.js} +4 -4
- package/web/app/immutable/chunks/{phowbgF-.js → CAt8c0ls.js} +1 -1
- package/web/app/immutable/chunks/CC-vc0Sh.js +2 -0
- package/web/app/immutable/chunks/{DjEB6QMF.js → CDmxeAFz.js} +1 -1
- package/web/app/immutable/chunks/{DevHtnbn.js → CLUug_7o.js} +1 -1
- package/web/app/immutable/chunks/{CPvhRhlk.js → CLyqqizl.js} +11 -11
- package/web/app/immutable/chunks/{DQulsXJ7.js → CO5Qz17e.js} +1 -1
- package/web/app/immutable/chunks/{B9r0JXjW.js → COBtdbv4.js} +1 -1
- package/web/app/immutable/chunks/COZ8XMYr.js +2 -0
- package/web/app/immutable/chunks/{qMHHnffV.js → CQK97B3l.js} +1 -1
- package/web/app/immutable/chunks/{CQf-fH5v.js → CYTBw0CY.js} +1 -1
- package/web/app/immutable/chunks/{CUvX4uDB.js → CZLMJ41d.js} +3 -3
- package/web/app/immutable/chunks/{Cuozo7M1.js → CZqaUHhn.js} +1 -1
- package/web/app/immutable/chunks/CeVWos-t.js +1 -0
- package/web/app/immutable/chunks/CepoDpYW.js +1 -0
- package/web/app/immutable/chunks/{DdAxykhC.js → CiBABzvX.js} +1 -1
- package/web/app/immutable/chunks/{D8SVxzqF.js → CjcP6chv.js} +1 -1
- package/web/app/immutable/chunks/{EZw3rvya.js → CkactGV1.js} +30 -30
- package/web/app/immutable/chunks/ClebXGIM.js +141 -0
- package/web/app/immutable/chunks/{BCm8Gasf.js → CnfDI0G9.js} +1 -1
- package/web/app/immutable/chunks/{BEhoKnQT.js → CoiqgZqV.js} +1 -1
- package/web/app/immutable/chunks/{DRMT9vvq.js → CpQksukT.js} +1 -1
- package/web/app/immutable/chunks/CrX2GQl1.js +1 -0
- package/web/app/immutable/chunks/{DCeW9_0X.js → CtDXgUYh.js} +2 -2
- package/web/app/immutable/chunks/CvEzUeZj.js +39 -0
- package/web/app/immutable/chunks/{CCIGQjYf.js → CxP8jrn2.js} +1 -1
- package/web/app/immutable/chunks/{D411lQkp.js → D2XAsGw-.js} +1 -1
- package/web/app/immutable/chunks/D3in5AGo.js +34 -0
- package/web/app/immutable/chunks/D3ma4MWK.js +84 -0
- package/web/app/immutable/chunks/{_F3xl3RI.js → D3p4HGPq.js} +1 -1
- package/web/app/immutable/chunks/D57k4GEE.js +344 -0
- package/web/app/immutable/chunks/{BUSwtV99.js → D5mZ2XGM.js} +1 -1
- package/web/app/immutable/chunks/{D_9AVJm5.js → DE1vhlzN.js} +1 -1
- package/web/app/immutable/chunks/{CWyh7Yhz.js → DI-WSiIl.js} +1 -1
- package/web/app/immutable/chunks/DMfS3QUv.js +213 -0
- package/web/app/immutable/chunks/DMmGJ3th.js +140 -0
- package/web/app/immutable/chunks/DPADHNob.js +3 -0
- package/web/app/immutable/chunks/DPcySxOl.js +24 -0
- package/web/app/immutable/chunks/{ejL3HmTG.js → DQNwUygY.js} +3 -3
- package/web/app/immutable/chunks/{BGLkcG6I.js → DR3ukAe9.js} +2 -2
- package/web/app/immutable/chunks/{BmDskjjc.js → DRKyy5zo.js} +1 -1
- package/web/app/immutable/chunks/DTpCNXVX.js +62 -0
- package/web/app/immutable/chunks/DW02E8JU.js +291 -0
- package/web/app/immutable/chunks/{BKY64haD.js → DbnaPZDp.js} +6 -6
- package/web/app/immutable/chunks/Dhhgf7-r.js +36 -0
- package/web/app/immutable/chunks/{C8CCN24q.js → DjaKy3j_.js} +1 -1
- package/web/app/immutable/chunks/{C0DDaBnV.js → Dk4znOdW.js} +1 -1
- package/web/app/immutable/chunks/{R7gFhaG_.js → Dl1xcl6N.js} +1 -1
- package/web/app/immutable/chunks/Dmv_LV6R.js +106 -0
- package/web/app/immutable/chunks/{BNg3GOxL.js → Dr28se2A.js} +2 -2
- package/web/app/immutable/chunks/Dr_BXnmT.js +169 -0
- package/web/app/immutable/chunks/{ByGsJxdn.js → Dvt2xumc.js} +1 -1
- package/web/app/immutable/chunks/DxHqMweQ.js +27 -0
- package/web/app/immutable/chunks/Dyv7eW7r.js +1 -0
- package/web/app/immutable/chunks/{CBHPIqXg.js → DzDnAGVP.js} +1 -1
- package/web/app/immutable/chunks/{C0Yks_oS.js → IIWxUL8F.js} +1 -1
- package/web/app/immutable/chunks/IjQ_akx8.js +24 -0
- package/web/app/immutable/chunks/{DeopB2f-.js → JFNcUgqI.js} +3 -3
- package/web/app/immutable/chunks/{dtB9lR1B.js → JvGvDA7z.js} +1 -1
- package/web/app/immutable/chunks/{BsP5G0Fo.js → LXPDKlyI.js} +1 -1
- package/web/app/immutable/chunks/{zXW6V5sa.js → M5rEGvXZ.js} +1 -1
- package/web/app/immutable/chunks/{DOVnLHFz.js → O55LMojB.js} +1 -1
- package/web/app/immutable/chunks/{t3bi-ExW.js → O86272iX.js} +2 -2
- package/web/app/immutable/chunks/{D-o9b0Cd.js → PW60rHG1.js} +2 -2
- package/web/app/immutable/chunks/{fULl8IO9.js → UzQ5fjmd.js} +7 -7
- package/web/app/immutable/chunks/VmPClZ6P.js +98 -0
- package/web/app/immutable/chunks/WKN7DEK1.js +292 -0
- package/web/app/immutable/chunks/{7KTbkf4W.js → YuniekLU.js} +2 -2
- package/web/app/immutable/chunks/{DxlwMmI8.js → _Q4NEhG2.js} +1 -1
- package/web/app/immutable/chunks/{DMGAuSgb.js → _sFm91KN.js} +4 -4
- package/web/app/immutable/chunks/{Drg52kVf.js → cF0DaKkd.js} +1 -1
- package/web/app/immutable/chunks/{DOHtPCK9.js → d9OF_ecy.js} +1 -1
- package/web/app/immutable/chunks/eHLf0w_s.js +1 -0
- package/web/app/immutable/chunks/ey5Fwige.js +1 -0
- package/web/app/immutable/chunks/gq2RHuUM.js +120 -0
- package/web/app/immutable/chunks/{BKGPkCRs.js → hJG5qV93.js} +1 -1
- package/web/app/immutable/chunks/jfltPaLX.js +370 -0
- package/web/app/immutable/chunks/{BBTS8ZOM.js → l0v05b1J.js} +3 -3
- package/web/app/immutable/chunks/{CnszEr0a.js → le8iLKoG.js} +1 -1
- package/web/app/immutable/chunks/{CoeuT-m3.js → mCGfnSaU.js} +1 -1
- package/web/app/immutable/chunks/{B0X6Qy4e.js → mNrkfPcL.js} +1 -1
- package/web/app/immutable/chunks/{DLm51UIm.js → tzNFwvLY.js} +1 -1
- package/web/app/immutable/chunks/{Coy9jSf1.js → xL2Hl8pt.js} +1 -1
- package/web/app/immutable/chunks/{qOCErwrn.js → yEkT96At.js} +1 -1
- package/web/app/immutable/chunks/{DhdMM_zt.js → yGxUPrAb.js} +14 -14
- package/web/app/immutable/entry/{app.DlF41taB.js → app.CWgSMPHo.js} +2 -2
- package/web/app/immutable/entry/start.DRM4Ek1S.js +1 -0
- package/web/app/immutable/nodes/{0.BLjNhnkb.js → 0.DsHcmAxw.js} +1 -1
- package/web/app/immutable/nodes/{1.DaghOy3j.js → 1.CkY-7ake.js} +1 -1
- package/web/app/immutable/nodes/{10.CbV_flkh.js → 10.CdTsXOpX.js} +1 -1
- package/web/app/immutable/nodes/{14.N_oC1pv5.js → 14.juvATfIp.js} +1 -1
- package/web/app/immutable/nodes/{16.Cn0uYbJe.js → 16.DuXLhJX1.js} +2 -2
- package/web/app/immutable/nodes/{2.CMERPJYK.js → 2.DL0H4Ehj.js} +8 -8
- package/web/app/immutable/nodes/{3.Dk5w9XeG.js → 3.CsarMzm8.js} +1 -1
- package/web/app/immutable/nodes/{4.CvLiKH0B.js → 4.DOKXGcKD.js} +1 -1
- package/web/app/immutable/nodes/{5.BL5oLCOi.js → 5.5nmYhZgy.js} +1 -1
- package/web/app/immutable/nodes/{6.DiKzgiKt.js → 6.BMO8vjvw.js} +1 -1
- package/web/app/immutable/nodes/{7.CM-hNW3A.js → 7.Rmoc-ypk.js} +1 -1
- package/web/app/immutable/nodes/{8.BThIGSQR.js → 8.Dy5AT1iw.js} +2 -2
- package/web/app/immutable/nodes/{9.D70tN3NX.js → 9.Dtv2dSUT.js} +18 -18
- package/web/app/version.json +1 -1
- package/web/index.html +9 -9
- package/web/app/immutable/chunks/-SL67XKV.js +0 -1
- package/web/app/immutable/chunks/351KaJp_.js +0 -24
- package/web/app/immutable/chunks/7Iuyw4Ow.js +0 -106
- package/web/app/immutable/chunks/9ySBq1wF.js +0 -36
- package/web/app/immutable/chunks/B2safKX4.js +0 -1
- package/web/app/immutable/chunks/B8QrskMI.js +0 -139
- package/web/app/immutable/chunks/BCO4VeSA.js +0 -1
- package/web/app/immutable/chunks/BCaDoF8Y.js +0 -1
- package/web/app/immutable/chunks/BEdJCn-8.js +0 -1
- package/web/app/immutable/chunks/BGBb6fI-.js +0 -120
- package/web/app/immutable/chunks/BGQ3htf5.js +0 -1
- package/web/app/immutable/chunks/BKLEAopb.js +0 -7
- package/web/app/immutable/chunks/BKSgn5w-.js +0 -1
- package/web/app/immutable/chunks/BOXqfDS_.js +0 -40
- package/web/app/immutable/chunks/BP_ooGOd.js +0 -24
- package/web/app/immutable/chunks/BQApP15C.js +0 -99
- package/web/app/immutable/chunks/BS6cE8e9.js +0 -231
- package/web/app/immutable/chunks/BTXk2yGf.js +0 -96
- package/web/app/immutable/chunks/BVrOGXf1.js +0 -78
- package/web/app/immutable/chunks/BZoKWA-r.js +0 -96
- package/web/app/immutable/chunks/BbiXTFqz.js +0 -1
- package/web/app/immutable/chunks/BgmKjqUX.js +0 -1
- package/web/app/immutable/chunks/Bk7xBWHf.js +0 -34
- package/web/app/immutable/chunks/BoiNnj2h.js +0 -1
- package/web/app/immutable/chunks/BrVvVCxw.js +0 -1
- package/web/app/immutable/chunks/ByM2DIOs.js +0 -1
- package/web/app/immutable/chunks/ByzYvvQp.js +0 -70
- package/web/app/immutable/chunks/Bz0SnIMO.js +0 -1
- package/web/app/immutable/chunks/C1IwSyrV.js +0 -99
- package/web/app/immutable/chunks/C9gL5x04.js +0 -39
- package/web/app/immutable/chunks/C9nyJoiB.js +0 -41
- package/web/app/immutable/chunks/CBV2Z_QZ.js +0 -89
- package/web/app/immutable/chunks/CDHds8o_.js +0 -3
- package/web/app/immutable/chunks/CHIHAnR-.js +0 -1
- package/web/app/immutable/chunks/CHj2oCmD.js +0 -39
- package/web/app/immutable/chunks/CIXNMjfT.js +0 -206
- package/web/app/immutable/chunks/CKFDW9cI.js +0 -24
- package/web/app/immutable/chunks/CKQlE_M1.js +0 -88
- package/web/app/immutable/chunks/CSBhPNbN.js +0 -206
- package/web/app/immutable/chunks/CSLTsum9.js +0 -38
- package/web/app/immutable/chunks/CSbiiZpm.js +0 -354
- package/web/app/immutable/chunks/CToDhNW4.js +0 -1
- package/web/app/immutable/chunks/CYFK9YEX.js +0 -168
- package/web/app/immutable/chunks/CcGF51wP.js +0 -1
- package/web/app/immutable/chunks/Cd5vVJw4.js +0 -292
- package/web/app/immutable/chunks/CgjSMAIJ.js +0 -120
- package/web/app/immutable/chunks/Ck7B90Kr.js +0 -38
- package/web/app/immutable/chunks/CkAILno9.js +0 -62
- package/web/app/immutable/chunks/CkawHIFZ.js +0 -1
- package/web/app/immutable/chunks/ClXr1b-t.js +0 -8
- package/web/app/immutable/chunks/CmWBRPmR.js +0 -24
- package/web/app/immutable/chunks/Cmo-9vFV.js +0 -1
- package/web/app/immutable/chunks/CoFCa7Mb.js +0 -231
- package/web/app/immutable/chunks/CrcLvVto.js +0 -84
- package/web/app/immutable/chunks/Cs_Q6mos.js +0 -1
- package/web/app/immutable/chunks/CsnLwu9F.js +0 -2
- package/web/app/immutable/chunks/CuYeKLE8.js +0 -8
- package/web/app/immutable/chunks/CvOaoHrI.js +0 -1
- package/web/app/immutable/chunks/CvYzv8kf.js +0 -1
- package/web/app/immutable/chunks/CxRm1vYn.js +0 -342
- package/web/app/immutable/chunks/CyfBUrNA.js +0 -1
- package/web/app/immutable/chunks/D1QKDDLH.js +0 -1
- package/web/app/immutable/chunks/D61DwhDw.js +0 -3
- package/web/app/immutable/chunks/DBAJPVI_.js +0 -1
- package/web/app/immutable/chunks/DBt8jmEX.js +0 -40
- package/web/app/immutable/chunks/DD-T_Om0.js +0 -178
- package/web/app/immutable/chunks/DEOiJZFa.js +0 -168
- package/web/app/immutable/chunks/DHW4IXFj.js +0 -36
- package/web/app/immutable/chunks/DJ0w8Oax.js +0 -129
- package/web/app/immutable/chunks/DJ52BT20.js +0 -1
- package/web/app/immutable/chunks/DK1048Bw.js +0 -129
- package/web/app/immutable/chunks/DZ0nrC9W.js +0 -162
- package/web/app/immutable/chunks/DeRneTJF.js +0 -106
- package/web/app/immutable/chunks/Df6EnPla.js +0 -4
- package/web/app/immutable/chunks/DfMKUxMU.js +0 -30
- package/web/app/immutable/chunks/DkH3yb1j.js +0 -34
- package/web/app/immutable/chunks/Doxgswr3.js +0 -4
- package/web/app/immutable/chunks/Dt53cexP.js +0 -1
- package/web/app/immutable/chunks/Dx6eBL0x.js +0 -1
- package/web/app/immutable/chunks/HP7Asd0t.js +0 -2
- package/web/app/immutable/chunks/HP8lGamR.js +0 -257
- package/web/app/immutable/chunks/HzpfURmp.js +0 -84
- package/web/app/immutable/chunks/PJfe_iA1.js +0 -1
- package/web/app/immutable/chunks/PXMyYXQv.js +0 -1
- package/web/app/immutable/chunks/Qi3HrsAm.js +0 -1
- package/web/app/immutable/chunks/S1FanOB0.js +0 -162
- package/web/app/immutable/chunks/SuMU9B9i.js +0 -1
- package/web/app/immutable/chunks/UaGv-ChR.js +0 -257
- package/web/app/immutable/chunks/YqyEOqRv.js +0 -178
- package/web/app/immutable/chunks/_MGNV7ZN.js +0 -338
- package/web/app/immutable/chunks/_lZu5Dth.js +0 -292
- package/web/app/immutable/chunks/gzjZWAx8.js +0 -62
- package/web/app/immutable/chunks/hqSEunOk.js +0 -15
- package/web/app/immutable/chunks/nGCCQCpO.js +0 -1
- package/web/app/immutable/chunks/o-kBqlaj.js +0 -7
- package/web/app/immutable/chunks/opO2fBQB.js +0 -1
- package/web/app/immutable/chunks/pdFamTTi.js +0 -7
- package/web/app/immutable/chunks/rEI8JpP3.js +0 -1
- package/web/app/immutable/chunks/s5P9UVzf.js +0 -1
- package/web/app/immutable/chunks/sIHUXgeh.js +0 -41
- package/web/app/immutable/entry/start.CCtO40vu.js +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
var $s=Object.defineProperty;var Fs=(f,r,l)=>r in f?$s(f,r,{enumerable:!0,configurable:!0,writable:!0,value:l}):f[r]=l;var q=(f,r,l)=>Fs(f,typeof r!="symbol"?r+"":r,l);import{t as dn,bq as C,a_ as M,bo as P,by as un,bs as On,b as hn,bu as je}from"./7rNOGHzs.js";import{ai as xr,bs as gn,ca as Be,aD as e,bH as m,a5 as N,bA as L,b_ as z,aw as sn,aj as ln,W as w,bn as fn,bV as Y,aA as x,ay as ne,bS as S,bl as de,bO as K,aB as T,c9 as u,a7 as nt,br as tt,bj as sr,c5 as gt,c0 as Hn,a as Us,be as Tt,b$ as ft,bf as or}from"./B8o4lNgr.js";import{k as En,s as Ve,h as Pt,i as Ln,I as ir,a as ar,l as lr}from"./DmsDslNo.js";import{H as cn,E as Ws,c as Bs,t as Rt}from"./DzMmhJrp.js";import{b as on}from"./D2g8BuR1.js";import{Hq as Me,eD as Vs,eu as Ks,ev as js,o8 as qs,mY as Vt,n0 as cr,m$ as In,ex as Gs,u6 as Qs,u7 as Xs,u9 as Ys,FD as Js,Hv as Zs,qJ as eo,eC as to}from"./CRwmdgt6.js";import{c as no}from"./BEJX9KVN.js";import{F as Ne,a0 as ro,a7 as An,av as dr,aw as ur,bP as so,aN as oo,c9 as hr,bW as gr,cl as fr}from"./CFejQM6t.js";import{dl as io,bc as ao,L as lo,aB as mr,h as co}from"./KQTrHxko.js";import{L as pr}from"./Cek5DjPu.js";import{C as an}from"./DypB-Dwi.js";import{b5 as kr,bK as uo,bN as ho}from"./TQIai6Ne.js";import{q as $e,d as go,g as fo}from"./DQEBW0YT.js";import"./CQ4a5a4v.js";import{f as ke}from"./Bgegixo2.js";import{e as mo}from"./t3bi-ExW.js";import{T as Pr}from"./CnszEr0a.js";import{g as Nn}from"./DsNWmyox.js";import{C as po}from"./BGspgxWf.js";import{C as vo}from"./lfJ8pseq.js";import{s as vr}from"./_F3xl3RI.js";import{w as Dt}from"./DSjRkndX.js";import{P as _o,l as _r}from"./EZw3rvya.js";import{g as wo}from"./DCj0DpxQ.js";import{a2 as bo,S as yo}from"./B4dTn6xv.js";import{ar as So}from"./BBTS8ZOM.js";import{s as wr}from"./DjEB6QMF.js";import{a6 as Co,a5 as xo,a7 as ko}from"./BV9p4X5I.js";function br({scrollTop:f,scrollHeight:r,height:l,fitPerfectly:a=!1,fitPerfectlyOverscroll:c=0,overscrollSize:p}){const b=l+p*2,y=a?l+c*2:b;if(r=Math.max(r,y),b>=r||a){const G=Math.max(f-c,0),h=Math.min(f+y,r);return{top:G,bottom:Math.max(h,G)}}let A=f+l/2-b/2,F=A+b;return A<0&&(A=0),F>r&&(F=r),A=Math.floor(Math.max(A,0)),{top:A,bottom:Math.ceil(Math.max(Math.min(F,r),A))}}function Po(f,r){return f==null||r==null?f===r:f.top===r.top&&f.bottom===r.bottom}const Rr=1e3,Ro=Rr*4,Ho=[0,1e-6,.99999,1],Lo={overscrollSize:Rr,intersectionObserverMargin:Ro,resizeDebugging:!1};let rn=0,Io=-1;var Pe,Ao=(Pe=class{constructor(r){q(this,"__id",`virtualizer-${++Io}`);q(this,"config");q(this,"type","simple");q(this,"intersectionObserver");q(this,"scrollTop",0);q(this,"height",0);q(this,"scrollHeight",0);q(this,"windowSpecs",{top:0,bottom:0});q(this,"root");q(this,"contentContainer");q(this,"resizeObserver");q(this,"observers",new Map);q(this,"visibleInstances",new Map);q(this,"visibleInstancesDirty",!1);q(this,"instancesChanged",new Set);q(this,"reconcileQueue",new Set);q(this,"scrollDirty",!0);q(this,"heightDirty",!0);q(this,"scrollHeightDirty",!0);q(this,"renderedObservers",0);q(this,"connectQueue",new Map);q(this,"handleContainerResize",r=>{if(this.root==null)return;let l=!1;for(const a of r){const c=a.borderBoxSize[0].blockSize;this.root instanceof Document?c!==this.scrollHeight&&(this.scrollHeightDirty=!0,l=!0,this.config.resizeDebugging&&(console.log("Virtualizer: content size change",this.__id,{sizeChange:c-rn,newSize:c}),rn=c)):a.target===this.root?c!==this.height&&(this.heightDirty=!0,l=!0):a.target===this.contentContainer&&(this.scrollHeightDirty=!0,l=!0,this.config.resizeDebugging&&(console.log("Virtualizer: scroller size change",this.__id,{sizeChange:c-rn,newSize:c}),rn=c))}l&&$e(this.computeRenderRangeAndEmit)});q(this,"handleWindowResize",()=>{Pe.__STOP||window.innerHeight===this.height||(this.heightDirty=!0,$e(this.computeRenderRangeAndEmit))});q(this,"handleWindowScroll",()=>{Pe.__STOP||this.root==null||!(this.root instanceof Document)||(this.scrollDirty=!0,$e(this.computeRenderRangeAndEmit))});q(this,"handleElementScroll",()=>{Pe.__STOP||this.root==null||this.root instanceof Document||(this.scrollDirty=!0,$e(this.computeRenderRangeAndEmit))});q(this,"computeRenderRangeAndEmit",()=>{if(Pe.__STOP)return;const r=this.heightDirty||this.scrollHeightDirty;let l=this.instancesChanged.size>0;if(this.instancesChanged.size===0){const p=br({scrollTop:this.getScrollTop(),height:this.getHeight(),scrollHeight:this.getScrollHeight(),overscrollSize:this.config.overscrollSize});if(!r&&Po(this.windowSpecs,p)&&this.renderedObservers===this.observers.size&&!this.visibleInstancesDirty&&this.reconcileQueue.size===0)return;this.windowSpecs=p}this.visibleInstancesDirty=!1,this.renderedObservers=this.observers.size;const a=this.getScrollAnchor(this.height),c=new Set;for(const p of r?this.observers.values():this.visibleInstances.values())p.onRender(r)&&c.add(p);for(const p of this.instancesChanged)c.has(p)||p.onRender(r)&&c.add(p);this.scrollFix(a);for(const p of c)this.reconcileQueue.delete(p),p.reconcileHeights();for(const p of this.reconcileQueue)p.reconcileHeights()&&(l=!0);this.reconcileQueue.clear(),l||=this.instancesChanged.size>0,l&&this.markDOMDirty(),(l||r)&&$e(this.computeRenderRangeAndEmit),c.clear(),this.instancesChanged.clear()});q(this,"handleIntersectionChange",r=>{this.scrollDirty=!0;for(const{target:l,isIntersecting:a}of r){if(!(l instanceof HTMLElement))throw new Error("Virtualizer.handleIntersectionChange: target not an HTMLElement");const c=this.observers.get(l);c!=null&&(a&&!this.visibleInstances.has(l)?(c.setVisibility(!0),this.visibleInstances.set(l,c),this.visibleInstancesDirty=!0):!a&&this.visibleInstances.has(l)&&(c.setVisibility(!1),this.visibleInstances.delete(l),this.visibleInstancesDirty=!0))}this.visibleInstancesDirty&&$e(this.computeRenderRangeAndEmit)});this.config={...Lo,...r}}setup(r,l){if(this.root==null){this.root=r,this.resizeObserver=new ResizeObserver(this.handleContainerResize),this.intersectionObserver=new IntersectionObserver(this.handleIntersectionChange,{root:this.root,threshold:Ho,rootMargin:`${this.config.intersectionObserverMargin}px 0px ${this.config.intersectionObserverMargin}px 0px`}),r instanceof Document?this.setupWindow():this.setupElement(l),window.__INSTANCE=this,window.__TOGGLE=()=>{Pe.__STOP?(Pe.__STOP=!1,(this.getScrollContainerElement()??window).scrollTo({top:Pe.__lastScrollPosition}),$e(this.computeRenderRangeAndEmit)):(Pe.__lastScrollPosition=this.getScrollTop(),Pe.__STOP=!0)};for(const[a,c]of this.connectQueue.entries())this.connect(a,c);this.connectQueue.clear(),this.markDOMDirty(),$e(this.computeRenderRangeAndEmit)}}instanceChanged(r,l){this.instancesChanged.add(r),l&&this.markDOMDirty(),$e(this.computeRenderRangeAndEmit)}requestHeightReconcile(r){this.reconcileQueue.add(r),$e(this.computeRenderRangeAndEmit)}getWindowSpecs(){return this.windowSpecs.top===0&&this.windowSpecs.bottom===0&&(this.windowSpecs=br({scrollTop:this.getScrollTop(),height:this.getHeight(),scrollHeight:this.getScrollHeight(),overscrollSize:this.config.overscrollSize})),this.windowSpecs}getRoot(){return this.root}isInstanceVisible(r,l){const a=this.getScrollTop(),c=this.getHeight(),p=this.config.intersectionObserverMargin,b=a-p,y=a+c+p;return!(r<b-l||r>y)}setupWindow(){if(this.root==null||!(this.root instanceof Document))throw new Error("Virtualizer.setupWindow: Invalid setup method");window.addEventListener("scroll",this.handleWindowScroll,{passive:!0}),window.addEventListener("resize",this.handleWindowResize,{passive:!0}),this.resizeObserver?.observe(this.root.documentElement)}setupElement(r){if(this.root==null||this.root instanceof Document)throw new Error("Virtualizer.setupElement: Invalid setup method");this.root.addEventListener("scroll",this.handleElementScroll,{passive:!0}),this.resizeObserver?.observe(this.root),r??=this.root.firstElementChild??void 0,r instanceof HTMLElement&&(this.contentContainer=r,this.resizeObserver?.observe(r))}cleanUp(){go(this.computeRenderRangeAndEmit),this.resizeObserver?.disconnect(),this.resizeObserver=void 0,this.intersectionObserver?.disconnect(),this.intersectionObserver=void 0,this.root?.removeEventListener("scroll",this.handleElementScroll),window.removeEventListener("scroll",this.handleWindowScroll),window.removeEventListener("resize",this.handleWindowResize),this.root=void 0,this.contentContainer=void 0,this.observers.clear(),this.visibleInstances.clear(),this.instancesChanged.clear(),this.reconcileQueue.clear(),this.connectQueue.clear(),this.visibleInstancesDirty=!1,this.windowSpecs={top:0,bottom:0},this.scrollTop=0,this.height=0,this.scrollHeight=0,this.scrollDirty=!0,this.heightDirty=!0,this.scrollHeightDirty=!0}getOffsetInScrollContainer(r){return this.getScrollTop()+Kt(r,this.getScrollContainerElement())}connect(r,l){if(this.observers.has(r))throw new Error("Virtualizer.connect: instance is already connected...");return this.intersectionObserver==null?this.connectQueue.set(r,l):(this.intersectionObserver.observe(r),this.observers.set(r,l),this.instancesChanged.add(l),this.markDOMDirty(),$e(this.computeRenderRangeAndEmit)),()=>this.disconnect(r)}disconnect(r){const l=this.observers.get(r);this.connectQueue.delete(r),l!=null&&(this.intersectionObserver?.unobserve(r),this.observers.delete(r),this.instancesChanged.delete(l),this.reconcileQueue.delete(l),this.visibleInstances.delete(r)&&(this.visibleInstancesDirty=!0),this.markDOMDirty(),$e(this.computeRenderRangeAndEmit))}scrollFix(r){if(r==null)return;const l=this.getScrollContainerElement(),{lineIndex:a,lineOffset:c,fileElement:p,fileOffset:b,fileTypeOffset:y}=r;if(a!=null&&c!=null){const F=p.shadowRoot?.querySelector(`[data-line][data-line-index="${a}"]`);if(F instanceof HTMLElement){const G=Kt(F,l);if(G!==c){const h=G-c;this.applyScrollFix(h)}return}}const A=Kt(p,l);if(y==="top")A!==b&&this.applyScrollFix(A-b);else{const F=A+p.getBoundingClientRect().height;F!==b&&this.applyScrollFix(F-b)}}applyScrollFix(r){this.root==null||this.root instanceof Document?window.scrollTo({top:window.scrollY+r,behavior:"instant"}):this.root.scrollTo({top:this.root.scrollTop+r,behavior:"instant"}),this.markDOMDirty()}getScrollAnchor(r){const l=this.getScrollContainerElement();let a;for(const[c]of this.visibleInstances.entries()){const p=Kt(c,l),b=p+c.offsetHeight;let y,A;b<=0?(y=b,A="bottom"):(y=p,A="top");let F,G;if(b>0&&p<r)for(const oe of c.shadowRoot?.querySelectorAll("[data-line][data-line-index]")??[]){if(!(oe instanceof HTMLElement))continue;const Te=oe.dataset.lineIndex;if(Te==null)continue;const ue=Kt(oe,l);if(!(ue<0)){F=Te,G=ue;break}}if(a?.lineOffset!=null&&G==null)continue;let h=!1;(a==null||G!=null&&(a.lineOffset==null||G<a.lineOffset)||G==null&&a.lineOffset==null&&(y>=0&&(a.fileOffset<0||y<a.fileOffset)||y<0&&a.fileOffset<0&&y>a.fileOffset))&&(h=!0),h&&(a={fileElement:c,fileTypeOffset:A,fileOffset:y,lineIndex:F,lineOffset:G})}return a}getScrollTop(){if(!this.scrollDirty)return this.scrollTop;this.scrollDirty=!1;let r=this.root==null?0:this.root instanceof Document?window.scrollY:this.root.scrollTop;return r=this.clampScrollTop(r),this.scrollTop=r,r}scrollTo({top:r,behavior:l="auto"}){const{root:a}=this;if(a==null)return;const c=this.clampScrollTop(r);a instanceof Document?window.scrollTo({top:c,behavior:l}):a.scrollTo({top:c,behavior:l}),this.scrollDirty=!0,$e(this.computeRenderRangeAndEmit)}clampScrollTop(r){return Math.max(0,Math.min(r,this.getScrollHeight()-this.getHeight()))}getScrollHeight(){return this.scrollHeightDirty?(this.scrollHeightDirty=!1,this.scrollHeight=this.root==null?0:this.root instanceof Document?this.root.documentElement.scrollHeight:this.root.scrollHeight,this.scrollHeight):this.scrollHeight}getHeight(){return this.heightDirty?(this.heightDirty=!1,this.height=this.root==null?0:this.root instanceof Document?globalThis.innerHeight:this.root.getBoundingClientRect().height,this.height):this.height}markDOMDirty(){this.scrollDirty=!0,this.scrollHeightDirty=!0,this.heightDirty=!0}getScrollContainerElement(){return this.root==null||this.root instanceof Document?void 0:this.root}},q(Pe,"__STOP",!1),q(Pe,"__lastScrollPosition",0),Pe);function Kt(f,r){const l=f.getBoundingClientRect(),a=r?.getBoundingClientRect().top??0;return l.top-a}var Eo=T('<div class="absolute inset-0 flex items-center justify-center rounded-lg bg-background/60 backdrop-blur-[2px] transition-opacity duration-spring-moderate ease-spring-moderate motion-reduce:transition-none z-10 pointer-events-none"><div class="flex items-center gap-2 rounded-lg border border-border bg-card px-3 py-2 text-xs font-medium text-subtle shadow-lg"><!> </div></div>'),Oo=T("<!> <!>",1),No=T('<div class="flex h-24 items-center justify-start text-left text-subtle"> </div>'),To=T('<div role="region"><!></div>');function Hr(f,r){if(new.target)return dn({component:Hr,...f});gn(r,!0);const l=()=>je(ve,"$sideBySide",a),[a,c]=On(),p=Nn()?.workspaceId??void 0;let b=C(r,"change",7),y=C(r,"foldUnchanged",7,!0),A=C(r,"allowHeadReads",7,!0),F=C(r,"canReadHeadFiles",7),G=C(r,"lineWrapping",7,!1),h=C(r,"scrollToLine",7),oe=C(r,"isAggregate",7,!1),Te=C(r,"showScrollHint",7,!1),ue=C(r,"onStageHunk",7),Q=C(r,"onUnstageHunk",7),at=C(r,"onOpenCommit",7),pt=C(r,"virtualizer",7),vt=C(r,"gitRootId",7,void 0),_t=C(r,"gitRootPath",7,void 0);const ve=kr();let Re=Y(!1),ye=Y(!1),Fe=Y(!1),Ue=Y(0),qe=Y(void 0);const $=80;function ie(){m(ye,!0)}function De(){m(ye,!1),m(Fe,!1),m(Ue,0)}function He(v){!e(ye)||e(Re)||(m(Ue,e(Ue)+Math.abs(v.deltaY)),e(Ue)>=$&&!e(Fe)&&m(Fe,!0))}function jt(){m(Re,!0),m(Fe,!1),m(Ue,0)}function qt(v){e(qe)&&!e(qe).contains(v.relatedTarget)&&m(Re,!1)}Be(()=>{(e(Re)||!e(ye))&&(m(Fe,!1),m(Ue,0))});let Ht=u(()=>{const{toolCallId:v,filePath:_e,additions:Qe,deletions:yt,oldContent:re,newContent:Xe}=b(),rt="staged"in b()&&b().staged===!0,Ke="category"in b()?b().category:void 0,At="commitHash"in b()?b().commitHash:void 0,zt="gitlink"in b()?b().gitlink:void 0,Mt="isFullFileContent"in b()?b().isFullFileContent:!1;let St;return Ke==="committed"?St=an.Committed:rt?St=an.Staged:St=an.Unstaged,{id:v,file:_e,relativePath:_e,stage:St,commitHash:At,gitlink:zt,stats:{additions:Qe,deletions:yt},attribution:{timestamp:0},content:re!==void 0||Xe!==void 0?{oldContent:re??"",newContent:Xe??"",isFullFileContent:Mt}:void 0}});const D=u(()=>b().isFullFileContent?1:("chunks"in b()?b().chunks?.[0]?.newStart:void 0)??b().startLineNumber??1);var Lt={get change(){return b()},set change(v){b(v),x()},get foldUnchanged(){return y()},set foldUnchanged(v=!0){y(v),x()},get allowHeadReads(){return A()},set allowHeadReads(v=!0){A(v),x()},get canReadHeadFiles(){return F()},set canReadHeadFiles(v){F(v),x()},get lineWrapping(){return G()},set lineWrapping(v=!1){G(v),x()},get scrollToLine(){return h()},set scrollToLine(v){h(v),x()},get isAggregate(){return oe()},set isAggregate(v=!1){oe(v),x()},get showScrollHint(){return Te()},set showScrollHint(v=!1){Te(v),x()},get onStageHunk(){return ue()},set onStageHunk(v){ue(v),x()},get onUnstageHunk(){return Q()},set onUnstageHunk(v){Q(v),x()},get onOpenCommit(){return at()},set onOpenCommit(v){at(v),x()},get virtualizer(){return pt()},set virtualizer(v){pt(v),x()},get gitRootId(){return vt()},set gitRootId(v=void 0){vt(v),x()},get gitRootPath(){return _t()},set gitRootPath(v=void 0){_t(v),x()},$set:un,$on:(v,_e)=>hn(r,v,_e)},Le=To();let wt;var It=N(Le);{var Ge=v=>{var _e=Oo(),Qe=ne(_e);{let Xe=u(()=>l()?"split":"unified");Pr(Qe,{get change(){return e(Ht)},get workspaceId(){return p},get viewMode(){return e(Xe)},get foldUnchanged(){return y()},get lineWrapping(){return G()},get onStageHunk(){return ue()},get onUnstageHunk(){return Q()},useProvidedContent:!0,get allowHeadReads(){return A()},get canReadHeadFiles(){return F()},get lineOffset(){return e(D)},get virtualizer(){return pt()},get gitRootId(){return vt()},get gitRootPath(){return _t()}})}var yt=S(Qe,2);{var re=Xe=>{var rt=Eo(),Ke=N(rt),At=N(Ke);Ne(At,{get icon(){return ro},class:"w-3 h-3"});var zt=S(At);L(Ke),L(rt),z(Mt=>K(zt,` ${Mt??""}`),[()=>P.chat_inlineDiffItem_clickToScroll_label()]),cn(1,rt,()=>Ws,()=>({tier:"fast",y:0,scale:1})),cn(2,rt,()=>Bs,()=>({tier:"fast"})),w(Xe,rt)};M(yt,Xe=>{Te()&&e(Fe)&&Xe(re)})}w(v,_e)},bt=v=>{var _e=No(),Qe=de(_e,!0);z(yt=>K(Qe,yt),[()=>P.chat_inlineDiffItem_noWorkspace_label()]),w(v,_e)};M(It,v=>{p?v(Ge):v(bt,-1)})}L(Le),on(Le,v=>m(qe,v),()=>e(qe)),z(v=>{wt=En(Le,1,"inline-diff-container relative",null,wt,{focused:e(Re)}),Ve(Le,"aria-label",v)},[()=>P.chat_inlineDiffItem_viewer_ariaLabel()]),sn("mouseenter",Le,ie),sn("mouseleave",Le,De),sn("wheel",Le,He),ln("focusin",Le,jt),ln("focusout",Le,qt),w(f,Le);var mn=fn(Lt);return c(),mn}xr(["focusin","focusout"]);function yr(f){return[f.stage,f.type,f.oldLineNumber??"",f.newLineNumber??"",f.content].join("\0")}function Do(f){let r=f.oldStart,l=f.newStart;return f.lines.map(a=>{const c={...a,oldLineNumber:a.oldLineNumber??a.oldNumber,newLineNumber:a.newLineNumber??a.newNumber};return c.oldLineNumber===void 0&&c.newLineNumber===void 0?a.type==="Context"?(c.oldLineNumber=r++,c.newLineNumber=l++):a.type==="Deletion"?c.oldLineNumber=r++:a.type==="Addition"&&(c.newLineNumber=l++):a.type==="Context"?(r=(c.oldLineNumber??r)+1,l=(c.newLineNumber??l)+1):a.type==="Deletion"?r=(c.oldLineNumber??r)+1:a.type==="Addition"&&(l=(c.newLineNumber??l)+1),c})}function zo(f,r){const l=f?f.split(`
|
|
1
|
+
var $s=Object.defineProperty;var Fs=(f,r,l)=>r in f?$s(f,r,{enumerable:!0,configurable:!0,writable:!0,value:l}):f[r]=l;var q=(f,r,l)=>Fs(f,typeof r!="symbol"?r+"":r,l);import{t as dn,bq as C,a_ as M,bo as P,by as un,bs as On,b as hn,bu as je}from"./7rNOGHzs.js";import{ai as xr,bs as gn,ca as Be,aD as e,bH as m,a5 as N,bA as H,b_ as z,aw as sn,aj as ln,W as w,bn as fn,bV as Y,aA as x,ay as ne,bS as S,bl as de,bO as K,aB as T,c9 as u,a7 as nt,br as tt,bj as sr,c5 as gt,c0 as Ln,a as Us,be as Tt,b$ as ft,bf as or}from"./B8o4lNgr.js";import{k as En,s as Ve,h as Pt,i as Hn,I as ir,a as ar,l as lr}from"./DmsDslNo.js";import{H as cn,E as Ws,c as Bs,t as Rt}from"./DzMmhJrp.js";import{b as on}from"./D2g8BuR1.js";import{Hq as Me,eD as Vs,eu as Ks,ev as js,o8 as qs,mY as Vt,n0 as cr,m$ as In,ex as Gs,u6 as Qs,u7 as Xs,u9 as Ys,FD as Js,Hv as Zs,qJ as eo,eC as to}from"./CRwmdgt6.js";import{c as no}from"./BEJX9KVN.js";import{F as Ne,a0 as ro,a7 as An,av as dr,aw as ur,bP as so,aN as oo,c9 as hr,bW as gr,cl as fr}from"./CFejQM6t.js";import{dl as io,bc as ao,L as lo,aB as mr,h as co}from"./KQTrHxko.js";import{L as pr}from"./Cek5DjPu.js";import{C as an}from"./DypB-Dwi.js";import{b6 as kr,bL as uo,bO as ho}from"./BcGA_XKM.js";import{q as $e,d as go,g as fo}from"./9U2m-KE4.js";import"./CQ4a5a4v.js";import{f as ke}from"./Bgegixo2.js";import{e as mo}from"./O86272iX.js";import{T as Pr}from"./le8iLKoG.js";import{g as Nn}from"./DsNWmyox.js";import{C as po}from"./BGspgxWf.js";import{C as vo}from"./lfJ8pseq.js";import{s as vr}from"./D3p4HGPq.js";import{w as Dt}from"./DSjRkndX.js";import{P as _o,l as _r}from"./CkactGV1.js";import{g as wo}from"./DCj0DpxQ.js";import{a2 as bo,S as yo}from"./B3NZDdp-.js";import{ar as So}from"./l0v05b1J.js";import{s as wr}from"./CDmxeAFz.js";import{a6 as Co,a5 as xo,a7 as ko}from"./C-27EQSK.js";function br({scrollTop:f,scrollHeight:r,height:l,fitPerfectly:a=!1,fitPerfectlyOverscroll:c=0,overscrollSize:p}){const b=l+p*2,y=a?l+c*2:b;if(r=Math.max(r,y),b>=r||a){const G=Math.max(f-c,0),h=Math.min(f+y,r);return{top:G,bottom:Math.max(h,G)}}let A=f+l/2-b/2,F=A+b;return A<0&&(A=0),F>r&&(F=r),A=Math.floor(Math.max(A,0)),{top:A,bottom:Math.ceil(Math.max(Math.min(F,r),A))}}function Po(f,r){return f==null||r==null?f===r:f.top===r.top&&f.bottom===r.bottom}const Rr=1e3,Ro=Rr*4,Lo=[0,1e-6,.99999,1],Ho={overscrollSize:Rr,intersectionObserverMargin:Ro,resizeDebugging:!1};let rn=0,Io=-1;var Pe,Ao=(Pe=class{constructor(r){q(this,"__id",`virtualizer-${++Io}`);q(this,"config");q(this,"type","simple");q(this,"intersectionObserver");q(this,"scrollTop",0);q(this,"height",0);q(this,"scrollHeight",0);q(this,"windowSpecs",{top:0,bottom:0});q(this,"root");q(this,"contentContainer");q(this,"resizeObserver");q(this,"observers",new Map);q(this,"visibleInstances",new Map);q(this,"visibleInstancesDirty",!1);q(this,"instancesChanged",new Set);q(this,"reconcileQueue",new Set);q(this,"scrollDirty",!0);q(this,"heightDirty",!0);q(this,"scrollHeightDirty",!0);q(this,"renderedObservers",0);q(this,"connectQueue",new Map);q(this,"handleContainerResize",r=>{if(this.root==null)return;let l=!1;for(const a of r){const c=a.borderBoxSize[0].blockSize;this.root instanceof Document?c!==this.scrollHeight&&(this.scrollHeightDirty=!0,l=!0,this.config.resizeDebugging&&(console.log("Virtualizer: content size change",this.__id,{sizeChange:c-rn,newSize:c}),rn=c)):a.target===this.root?c!==this.height&&(this.heightDirty=!0,l=!0):a.target===this.contentContainer&&(this.scrollHeightDirty=!0,l=!0,this.config.resizeDebugging&&(console.log("Virtualizer: scroller size change",this.__id,{sizeChange:c-rn,newSize:c}),rn=c))}l&&$e(this.computeRenderRangeAndEmit)});q(this,"handleWindowResize",()=>{Pe.__STOP||window.innerHeight===this.height||(this.heightDirty=!0,$e(this.computeRenderRangeAndEmit))});q(this,"handleWindowScroll",()=>{Pe.__STOP||this.root==null||!(this.root instanceof Document)||(this.scrollDirty=!0,$e(this.computeRenderRangeAndEmit))});q(this,"handleElementScroll",()=>{Pe.__STOP||this.root==null||this.root instanceof Document||(this.scrollDirty=!0,$e(this.computeRenderRangeAndEmit))});q(this,"computeRenderRangeAndEmit",()=>{if(Pe.__STOP)return;const r=this.heightDirty||this.scrollHeightDirty;let l=this.instancesChanged.size>0;if(this.instancesChanged.size===0){const p=br({scrollTop:this.getScrollTop(),height:this.getHeight(),scrollHeight:this.getScrollHeight(),overscrollSize:this.config.overscrollSize});if(!r&&Po(this.windowSpecs,p)&&this.renderedObservers===this.observers.size&&!this.visibleInstancesDirty&&this.reconcileQueue.size===0)return;this.windowSpecs=p}this.visibleInstancesDirty=!1,this.renderedObservers=this.observers.size;const a=this.getScrollAnchor(this.height),c=new Set;for(const p of r?this.observers.values():this.visibleInstances.values())p.onRender(r)&&c.add(p);for(const p of this.instancesChanged)c.has(p)||p.onRender(r)&&c.add(p);this.scrollFix(a);for(const p of c)this.reconcileQueue.delete(p),p.reconcileHeights();for(const p of this.reconcileQueue)p.reconcileHeights()&&(l=!0);this.reconcileQueue.clear(),l||=this.instancesChanged.size>0,l&&this.markDOMDirty(),(l||r)&&$e(this.computeRenderRangeAndEmit),c.clear(),this.instancesChanged.clear()});q(this,"handleIntersectionChange",r=>{this.scrollDirty=!0;for(const{target:l,isIntersecting:a}of r){if(!(l instanceof HTMLElement))throw new Error("Virtualizer.handleIntersectionChange: target not an HTMLElement");const c=this.observers.get(l);c!=null&&(a&&!this.visibleInstances.has(l)?(c.setVisibility(!0),this.visibleInstances.set(l,c),this.visibleInstancesDirty=!0):!a&&this.visibleInstances.has(l)&&(c.setVisibility(!1),this.visibleInstances.delete(l),this.visibleInstancesDirty=!0))}this.visibleInstancesDirty&&$e(this.computeRenderRangeAndEmit)});this.config={...Ho,...r}}setup(r,l){if(this.root==null){this.root=r,this.resizeObserver=new ResizeObserver(this.handleContainerResize),this.intersectionObserver=new IntersectionObserver(this.handleIntersectionChange,{root:this.root,threshold:Lo,rootMargin:`${this.config.intersectionObserverMargin}px 0px ${this.config.intersectionObserverMargin}px 0px`}),r instanceof Document?this.setupWindow():this.setupElement(l),window.__INSTANCE=this,window.__TOGGLE=()=>{Pe.__STOP?(Pe.__STOP=!1,(this.getScrollContainerElement()??window).scrollTo({top:Pe.__lastScrollPosition}),$e(this.computeRenderRangeAndEmit)):(Pe.__lastScrollPosition=this.getScrollTop(),Pe.__STOP=!0)};for(const[a,c]of this.connectQueue.entries())this.connect(a,c);this.connectQueue.clear(),this.markDOMDirty(),$e(this.computeRenderRangeAndEmit)}}instanceChanged(r,l){this.instancesChanged.add(r),l&&this.markDOMDirty(),$e(this.computeRenderRangeAndEmit)}requestHeightReconcile(r){this.reconcileQueue.add(r),$e(this.computeRenderRangeAndEmit)}getWindowSpecs(){return this.windowSpecs.top===0&&this.windowSpecs.bottom===0&&(this.windowSpecs=br({scrollTop:this.getScrollTop(),height:this.getHeight(),scrollHeight:this.getScrollHeight(),overscrollSize:this.config.overscrollSize})),this.windowSpecs}getRoot(){return this.root}isInstanceVisible(r,l){const a=this.getScrollTop(),c=this.getHeight(),p=this.config.intersectionObserverMargin,b=a-p,y=a+c+p;return!(r<b-l||r>y)}setupWindow(){if(this.root==null||!(this.root instanceof Document))throw new Error("Virtualizer.setupWindow: Invalid setup method");window.addEventListener("scroll",this.handleWindowScroll,{passive:!0}),window.addEventListener("resize",this.handleWindowResize,{passive:!0}),this.resizeObserver?.observe(this.root.documentElement)}setupElement(r){if(this.root==null||this.root instanceof Document)throw new Error("Virtualizer.setupElement: Invalid setup method");this.root.addEventListener("scroll",this.handleElementScroll,{passive:!0}),this.resizeObserver?.observe(this.root),r??=this.root.firstElementChild??void 0,r instanceof HTMLElement&&(this.contentContainer=r,this.resizeObserver?.observe(r))}cleanUp(){go(this.computeRenderRangeAndEmit),this.resizeObserver?.disconnect(),this.resizeObserver=void 0,this.intersectionObserver?.disconnect(),this.intersectionObserver=void 0,this.root?.removeEventListener("scroll",this.handleElementScroll),window.removeEventListener("scroll",this.handleWindowScroll),window.removeEventListener("resize",this.handleWindowResize),this.root=void 0,this.contentContainer=void 0,this.observers.clear(),this.visibleInstances.clear(),this.instancesChanged.clear(),this.reconcileQueue.clear(),this.connectQueue.clear(),this.visibleInstancesDirty=!1,this.windowSpecs={top:0,bottom:0},this.scrollTop=0,this.height=0,this.scrollHeight=0,this.scrollDirty=!0,this.heightDirty=!0,this.scrollHeightDirty=!0}getOffsetInScrollContainer(r){return this.getScrollTop()+Kt(r,this.getScrollContainerElement())}connect(r,l){if(this.observers.has(r))throw new Error("Virtualizer.connect: instance is already connected...");return this.intersectionObserver==null?this.connectQueue.set(r,l):(this.intersectionObserver.observe(r),this.observers.set(r,l),this.instancesChanged.add(l),this.markDOMDirty(),$e(this.computeRenderRangeAndEmit)),()=>this.disconnect(r)}disconnect(r){const l=this.observers.get(r);this.connectQueue.delete(r),l!=null&&(this.intersectionObserver?.unobserve(r),this.observers.delete(r),this.instancesChanged.delete(l),this.reconcileQueue.delete(l),this.visibleInstances.delete(r)&&(this.visibleInstancesDirty=!0),this.markDOMDirty(),$e(this.computeRenderRangeAndEmit))}scrollFix(r){if(r==null)return;const l=this.getScrollContainerElement(),{lineIndex:a,lineOffset:c,fileElement:p,fileOffset:b,fileTypeOffset:y}=r;if(a!=null&&c!=null){const F=p.shadowRoot?.querySelector(`[data-line][data-line-index="${a}"]`);if(F instanceof HTMLElement){const G=Kt(F,l);if(G!==c){const h=G-c;this.applyScrollFix(h)}return}}const A=Kt(p,l);if(y==="top")A!==b&&this.applyScrollFix(A-b);else{const F=A+p.getBoundingClientRect().height;F!==b&&this.applyScrollFix(F-b)}}applyScrollFix(r){this.root==null||this.root instanceof Document?window.scrollTo({top:window.scrollY+r,behavior:"instant"}):this.root.scrollTo({top:this.root.scrollTop+r,behavior:"instant"}),this.markDOMDirty()}getScrollAnchor(r){const l=this.getScrollContainerElement();let a;for(const[c]of this.visibleInstances.entries()){const p=Kt(c,l),b=p+c.offsetHeight;let y,A;b<=0?(y=b,A="bottom"):(y=p,A="top");let F,G;if(b>0&&p<r)for(const oe of c.shadowRoot?.querySelectorAll("[data-line][data-line-index]")??[]){if(!(oe instanceof HTMLElement))continue;const Te=oe.dataset.lineIndex;if(Te==null)continue;const ue=Kt(oe,l);if(!(ue<0)){F=Te,G=ue;break}}if(a?.lineOffset!=null&&G==null)continue;let h=!1;(a==null||G!=null&&(a.lineOffset==null||G<a.lineOffset)||G==null&&a.lineOffset==null&&(y>=0&&(a.fileOffset<0||y<a.fileOffset)||y<0&&a.fileOffset<0&&y>a.fileOffset))&&(h=!0),h&&(a={fileElement:c,fileTypeOffset:A,fileOffset:y,lineIndex:F,lineOffset:G})}return a}getScrollTop(){if(!this.scrollDirty)return this.scrollTop;this.scrollDirty=!1;let r=this.root==null?0:this.root instanceof Document?window.scrollY:this.root.scrollTop;return r=this.clampScrollTop(r),this.scrollTop=r,r}scrollTo({top:r,behavior:l="auto"}){const{root:a}=this;if(a==null)return;const c=this.clampScrollTop(r);a instanceof Document?window.scrollTo({top:c,behavior:l}):a.scrollTo({top:c,behavior:l}),this.scrollDirty=!0,$e(this.computeRenderRangeAndEmit)}clampScrollTop(r){return Math.max(0,Math.min(r,this.getScrollHeight()-this.getHeight()))}getScrollHeight(){return this.scrollHeightDirty?(this.scrollHeightDirty=!1,this.scrollHeight=this.root==null?0:this.root instanceof Document?this.root.documentElement.scrollHeight:this.root.scrollHeight,this.scrollHeight):this.scrollHeight}getHeight(){return this.heightDirty?(this.heightDirty=!1,this.height=this.root==null?0:this.root instanceof Document?globalThis.innerHeight:this.root.getBoundingClientRect().height,this.height):this.height}markDOMDirty(){this.scrollDirty=!0,this.scrollHeightDirty=!0,this.heightDirty=!0}getScrollContainerElement(){return this.root==null||this.root instanceof Document?void 0:this.root}},q(Pe,"__STOP",!1),q(Pe,"__lastScrollPosition",0),Pe);function Kt(f,r){const l=f.getBoundingClientRect(),a=r?.getBoundingClientRect().top??0;return l.top-a}var Eo=T('<div class="absolute inset-0 flex items-center justify-center rounded-lg bg-background/60 backdrop-blur-[2px] transition-opacity duration-spring-moderate ease-spring-moderate motion-reduce:transition-none z-10 pointer-events-none"><div class="flex items-center gap-2 rounded-lg border border-border bg-card px-3 py-2 text-xs font-medium text-subtle shadow-lg"><!> </div></div>'),Oo=T("<!> <!>",1),No=T('<div class="flex h-24 items-center justify-start text-left text-subtle"> </div>'),To=T('<div role="region"><!></div>');function Lr(f,r){if(new.target)return dn({component:Lr,...f});gn(r,!0);const l=()=>je(ve,"$sideBySide",a),[a,c]=On(),p=Nn()?.workspaceId??void 0;let b=C(r,"change",7),y=C(r,"foldUnchanged",7,!0),A=C(r,"allowHeadReads",7,!0),F=C(r,"canReadHeadFiles",7),G=C(r,"lineWrapping",7,!1),h=C(r,"scrollToLine",7),oe=C(r,"isAggregate",7,!1),Te=C(r,"showScrollHint",7,!1),ue=C(r,"onStageHunk",7),Q=C(r,"onUnstageHunk",7),at=C(r,"onOpenCommit",7),pt=C(r,"virtualizer",7),vt=C(r,"gitRootId",7,void 0),_t=C(r,"gitRootPath",7,void 0);const ve=kr();let Re=Y(!1),ye=Y(!1),Fe=Y(!1),Ue=Y(0),qe=Y(void 0);const $=80;function ie(){m(ye,!0)}function De(){m(ye,!1),m(Fe,!1),m(Ue,0)}function Le(v){!e(ye)||e(Re)||(m(Ue,e(Ue)+Math.abs(v.deltaY)),e(Ue)>=$&&!e(Fe)&&m(Fe,!0))}function jt(){m(Re,!0),m(Fe,!1),m(Ue,0)}function qt(v){e(qe)&&!e(qe).contains(v.relatedTarget)&&m(Re,!1)}Be(()=>{(e(Re)||!e(ye))&&(m(Fe,!1),m(Ue,0))});let Lt=u(()=>{const{toolCallId:v,filePath:_e,additions:Qe,deletions:yt,oldContent:re,newContent:Xe}=b(),rt="staged"in b()&&b().staged===!0,Ke="category"in b()?b().category:void 0,At="commitHash"in b()?b().commitHash:void 0,zt="gitlink"in b()?b().gitlink:void 0,Mt="isFullFileContent"in b()?b().isFullFileContent:!1;let St;return Ke==="committed"?St=an.Committed:rt?St=an.Staged:St=an.Unstaged,{id:v,file:_e,relativePath:_e,stage:St,commitHash:At,gitlink:zt,stats:{additions:Qe,deletions:yt},attribution:{timestamp:0},content:re!==void 0||Xe!==void 0?{oldContent:re??"",newContent:Xe??"",isFullFileContent:Mt}:void 0}});const D=u(()=>b().isFullFileContent?1:("chunks"in b()?b().chunks?.[0]?.newStart:void 0)??b().startLineNumber??1);var Ht={get change(){return b()},set change(v){b(v),x()},get foldUnchanged(){return y()},set foldUnchanged(v=!0){y(v),x()},get allowHeadReads(){return A()},set allowHeadReads(v=!0){A(v),x()},get canReadHeadFiles(){return F()},set canReadHeadFiles(v){F(v),x()},get lineWrapping(){return G()},set lineWrapping(v=!1){G(v),x()},get scrollToLine(){return h()},set scrollToLine(v){h(v),x()},get isAggregate(){return oe()},set isAggregate(v=!1){oe(v),x()},get showScrollHint(){return Te()},set showScrollHint(v=!1){Te(v),x()},get onStageHunk(){return ue()},set onStageHunk(v){ue(v),x()},get onUnstageHunk(){return Q()},set onUnstageHunk(v){Q(v),x()},get onOpenCommit(){return at()},set onOpenCommit(v){at(v),x()},get virtualizer(){return pt()},set virtualizer(v){pt(v),x()},get gitRootId(){return vt()},set gitRootId(v=void 0){vt(v),x()},get gitRootPath(){return _t()},set gitRootPath(v=void 0){_t(v),x()},$set:un,$on:(v,_e)=>hn(r,v,_e)},He=To();let wt;var It=N(He);{var Ge=v=>{var _e=Oo(),Qe=ne(_e);{let Xe=u(()=>l()?"split":"unified");Pr(Qe,{get change(){return e(Lt)},get workspaceId(){return p},get viewMode(){return e(Xe)},get foldUnchanged(){return y()},get lineWrapping(){return G()},get onStageHunk(){return ue()},get onUnstageHunk(){return Q()},useProvidedContent:!0,get allowHeadReads(){return A()},get canReadHeadFiles(){return F()},get lineOffset(){return e(D)},get virtualizer(){return pt()},get gitRootId(){return vt()},get gitRootPath(){return _t()}})}var yt=S(Qe,2);{var re=Xe=>{var rt=Eo(),Ke=N(rt),At=N(Ke);Ne(At,{get icon(){return ro},class:"w-3 h-3"});var zt=S(At);H(Ke),H(rt),z(Mt=>K(zt,` ${Mt??""}`),[()=>P.chat_inlineDiffItem_clickToScroll_label()]),cn(1,rt,()=>Ws,()=>({tier:"fast",y:0,scale:1})),cn(2,rt,()=>Bs,()=>({tier:"fast"})),w(Xe,rt)};M(yt,Xe=>{Te()&&e(Fe)&&Xe(re)})}w(v,_e)},bt=v=>{var _e=No(),Qe=de(_e,!0);z(yt=>K(Qe,yt),[()=>P.chat_inlineDiffItem_noWorkspace_label()]),w(v,_e)};M(It,v=>{p?v(Ge):v(bt,-1)})}H(He),on(He,v=>m(qe,v),()=>e(qe)),z(v=>{wt=En(He,1,"inline-diff-container relative",null,wt,{focused:e(Re)}),Ve(He,"aria-label",v)},[()=>P.chat_inlineDiffItem_viewer_ariaLabel()]),sn("mouseenter",He,ie),sn("mouseleave",He,De),sn("wheel",He,Le),ln("focusin",He,jt),ln("focusout",He,qt),w(f,He);var mn=fn(Ht);return c(),mn}xr(["focusin","focusout"]);function yr(f){return[f.stage,f.type,f.oldLineNumber??"",f.newLineNumber??"",f.content].join("\0")}function Do(f){let r=f.oldStart,l=f.newStart;return f.lines.map(a=>{const c={...a,oldLineNumber:a.oldLineNumber??a.oldNumber,newLineNumber:a.newLineNumber??a.newNumber};return c.oldLineNumber===void 0&&c.newLineNumber===void 0?a.type==="Context"?(c.oldLineNumber=r++,c.newLineNumber=l++):a.type==="Deletion"?c.oldLineNumber=r++:a.type==="Addition"&&(c.newLineNumber=l++):a.type==="Context"?(r=(c.oldLineNumber??r)+1,l=(c.newLineNumber??l)+1):a.type==="Deletion"?r=(c.oldLineNumber??r)+1:a.type==="Addition"&&(l=(c.newLineNumber??l)+1),c})}function zo(f,r){const l=f?f.split(`
|
|
2
2
|
`):[],a=r?r.split(`
|
|
3
3
|
`):[];if(l.length===0&&a.length===0)return[];const c=[];for(const p of l)c.push({type:"Deletion",content:p});for(const p of a)c.push({type:"Addition",content:p});return[{oldStart:1,oldLines:l.length,newStart:1,newLines:a.length,lines:c}]}function Mo(f){if(!f||f.length===0)return[];const r=[];for(const a of f){let c=a.change.chunks||[];c.length===0&&(a.change.oldContent!=null||a.change.newContent!=null)&&(c=zo(a.change.oldContent??"",a.change.newContent??"")),c.forEach((p,b)=>{r.push({hunk:p,stage:a.category,part:a,hunkIndex:b})})}if(r.length===0)return[];r.sort((a,c)=>a.hunk.newStart-c.hunk.newStart);const l=[];for(const{hunk:a,stage:c,hunkIndex:p}of r){const y=Do(a).map(A=>({type:A.type,content:A.content,oldLineNumber:A.oldLineNumber,newLineNumber:A.newLineNumber,stage:c,hunkIndex:p}));l.push({headStart:a.oldStart,headLines:a.oldLines,wtStart:a.newStart,wtLines:a.newLines,lines:y,stages:new Set([c])})}return $o(l)}function $o(f){if(f.length<=1)return f;const r=[];let l=f[0];for(let a=1;a<f.length;a++){const c=f[a],p=l.wtStart+l.wtLines;c.wtStart<=p+3?l=Fo(l,c):(r.push(l),l=c)}return r.push(l),r}function Fo(f,r){const l=new Map,a=new Map,c=new Set;for(const h of f.lines)c.add(yr(h)),h.newLineNumber!==void 0&&l.set(h.newLineNumber,h),h.oldLineNumber!==void 0&&h.type!=="Addition"&&a.set(h.oldLineNumber,h);const p=[...f.lines];for(const h of r.lines){const oe=yr(h);if(!c.has(oe)){if(h.type==="Context"){const Te=h.newLineNumber!==void 0?l.get(h.newLineNumber):void 0,ue=h.oldLineNumber!==void 0?a.get(h.oldLineNumber):void 0;if(Te?.type==="Context"||ue?.type==="Context"){c.add(oe);continue}}p.push(h),c.add(oe),h.newLineNumber!==void 0&&l.set(h.newLineNumber,h),h.oldLineNumber!==void 0&&h.type!=="Addition"&&a.set(h.oldLineNumber,h)}}p.sort((h,oe)=>{const Te=h.newLineNumber??h.oldLineNumber??0,ue=oe.newLineNumber??oe.oldLineNumber??0;return Te-ue});const b=new Set([...f.stages,...r.stages]),y=Math.min(f.headStart,r.headStart),A=Math.min(f.wtStart,r.wtStart),F=Math.max(f.headStart+f.headLines,r.headStart+r.headLines),G=Math.max(f.wtStart+f.wtLines,r.wtStart+r.wtLines);return{headStart:y,headLines:F-y,wtStart:A,wtLines:G-A,lines:p,stages:b}}function Uo(f){const r=[],l=[];let a=f[0]?.headStart??1,c=f[0]?.wtStart??1;const p=(b,y,A)=>{let F=y;for(;F<A;)b.push(""),F++;return F};for(const b of f){a=p(r,a,b.headStart),c=p(l,c,b.wtStart);for(const y of b.lines)y.type==="Context"?(y.oldLineNumber!==void 0&&(a=p(r,a,y.oldLineNumber)),y.newLineNumber!==void 0&&(c=p(l,c,y.newLineNumber)),r.push(y.content),l.push(y.content),a++,c++):y.type==="Deletion"?(y.oldLineNumber!==void 0&&(a=p(r,a,y.oldLineNumber)),r.push(y.content),a++):y.type==="Addition"&&(y.newLineNumber!==void 0&&(c=p(l,c,y.newLineNumber)),l.push(y.content),c++)}return{oldContent:r.join(`
|
|
4
4
|
`),newContent:l.join(`
|
|
5
|
-
`)}}var Wo=T('<div class="flex items-center justify-start py-8 text-left text-sm text-subtle"> </div>'),Bo=T('<div class="unified-multi-stage-diff svelte-16i1ho7"><!></div>'),Vo=T('<div class="flex h-24 items-center justify-start text-left text-subtle"> </div>');function
|
|
5
|
+
`)}}var Wo=T('<div class="flex items-center justify-start py-8 text-left text-sm text-subtle"> </div>'),Bo=T('<div class="unified-multi-stage-diff svelte-16i1ho7"><!></div>'),Vo=T('<div class="flex h-24 items-center justify-start text-left text-subtle"> </div>');function Hr(f,r){if(new.target)return dn({component:Hr,...f});gn(r,!0);const l=()=>je(Te,"$sideBySide",a),[a,c]=On(),p=Nn()?.workspaceId??void 0;let b=C(r,"parts",7),y=C(r,"foldUnchanged",7,!0),A=C(r,"lineWrapping",7,!1),F=C(r,"onStageHunk",7),G=C(r,"onUnstageHunk",7),h=C(r,"onOpenCommit",7),oe=C(r,"virtualizer",7);h();const Te=kr(),ue=u(()=>Mo(b())),Q=u(()=>Uo(e(ue))),at=u(()=>b()[0]?.change.filePath||P.chat_toolClassifier_file_subject()),pt=u(()=>e(ue)[0]?.wtStart??1),vt=u(()=>{let $=0,ie=0;for(const De of e(ue))for(const Le of De.lines)Le.type==="Addition"?$++:Le.type==="Deletion"&&ie++;return{id:`merged-${e(at)}`,file:e(at),relativePath:e(at),stage:an.Unstaged,stats:{additions:$,deletions:ie},attribution:{timestamp:0},content:{oldContent:e(Q).oldContent,newContent:e(Q).newContent}}});var _t={get parts(){return b()},set parts($){b($),x()},get foldUnchanged(){return y()},set foldUnchanged($=!0){y($),x()},get lineWrapping(){return A()},set lineWrapping($=!1){A($),x()},get onStageHunk(){return F()},set onStageHunk($){F($),x()},get onUnstageHunk(){return G()},set onUnstageHunk($){G($),x()},get onOpenCommit(){return h()},set onOpenCommit($){h($),x()},get virtualizer(){return oe()},set virtualizer($){oe($),x()},$set:un,$on:($,ie)=>hn(r,$,ie)},ve=nt(),Re=ne(ve);{var ye=$=>{var ie=Wo(),De=de(ie,!0);z(Le=>K(De,Le),[()=>P.chat_unifiedMultiStageDiff_noChanges_label()]),w($,ie)},Fe=$=>{var ie=Bo(),De=N(ie);{let Le=u(()=>l()?"split":"unified");Pr(De,{get change(){return e(vt)},get workspaceId(){return p},get viewMode(){return e(Le)},get foldUnchanged(){return y()},get lineWrapping(){return A()},get onStageHunk(){return F()},get onUnstageHunk(){return G()},useProvidedContent:!0,get lineOffset(){return e(pt)},get virtualizer(){return oe()}})}H(ie),w($,ie)},Ue=$=>{var ie=Vo(),De=de(ie,!0);z(Le=>K(De,Le),[()=>P.chat_unifiedMultiStageDiff_noWorkspace_label()]),w($,ie)};M(Re,$=>{e(ue).length===0?$(ye):p?$(Fe,1):$(Ue,-1)})}w(f,ve);var qe=fn(_t);return c(),qe}function Ir(f,r){if(new.target)return dn({component:Ir,...f});gn(r,!0);let l=C(r,"parts",7),a=C(r,"foldUnchanged",7,!0),c=C(r,"lineWrapping",7,!1),p=C(r,"isAggregate",7,!1),b=C(r,"onStageHunk",7),y=C(r,"onUnstageHunk",7),A=C(r,"onOpenCommit",7),F=C(r,"virtualizer",7);p();var G={get parts(){return l()},set parts(h){l(h),x()},get foldUnchanged(){return a()},set foldUnchanged(h=!0){a(h),x()},get lineWrapping(){return c()},set lineWrapping(h=!1){c(h),x()},get isAggregate(){return p()},set isAggregate(h=!1){p(h),x()},get onStageHunk(){return b()},set onStageHunk(h){b(h),x()},get onUnstageHunk(){return y()},set onUnstageHunk(h){y(h),x()},get onOpenCommit(){return A()},set onOpenCommit(h){A(h),x()},get virtualizer(){return F()},set virtualizer(h){F(h),x()},$set:un,$on:(h,oe)=>hn(r,h,oe)};return Hr(f,{get parts(){return l()},get foldUnchanged(){return a()},get lineWrapping(){return c()},get onStageHunk(){return b()},get onUnstageHunk(){return y()},get onOpenCommit(){return A()},get virtualizer(){return F()}}),fn(G)}function mt(){return P.chat_changesPanel_lockedFile_tooltip()}var Ko=T(" <!>",1),jo=T('<p class="text-sm font-medium text-foreground leading-snug"> </p>'),Sr=T("<span> </span>"),qo=T('<span class="text-ghost">·</span> <span> </span>',1),Go=T('<span class="text-ghost">·</span> <span class="inline-flex items-center gap-0.5 font-mono"> <!></span>',1),Qo=T('<p class="text-xs text-subtle whitespace-pre-wrap leading-relaxed pt-0.5"> </p>'),Xo=T('<span class="shrink-0"><!></span> <span class="truncate"> </span>',1),Yo=T('<!> <span class="truncate"> </span>',1),Jo=T('<div class="flex items-center gap-2.5 min-w-0"><!> <!></div>'),Zo=T('<div class="mb-3"><div class="flex items-center gap-2.5 py-2"><div class="flex-1 min-w-0 space-y-1"><!> <div class="flex items-center gap-1.5 text-ui text-subtle flex-wrap"><!> <!> <!></div> <!> <!></div> <div class="shrink-0 w-7 h-7 rounded-full bg-muted-foreground/15 flex items-center justify-center text-ui font-medium text-subtle select-none overflow-hidden"><!></div></div></div>'),Cr=T('<mark class="rounded-sm bg-warning/10 px-0.5 text-foreground"> </mark>'),ei=T('<span class="text-xs text-subtle truncate hidden sm:inline shrink-6"></span>'),ti=T('<span role="img"><!></span>'),ni=T('<span class="text-sm truncate shrink-0 max-w-full"></span> <!> <!> <!> <!> <!>',1),ri=T("<!> <!> <!>",1),si=T("<!> <!>",1),oi=T('<div class="flex h-[300px] items-center justify-start text-left text-subtle"><!> </div>'),ii=T('<div class="border-t border-border [&_.tracked-change-diff-viewer]:overflow-visible!"><!></div>'),ai=T('<div><div><!> <div class="absolute right-2 flex items-center gap-px"><div class="flex items-center gap-px bg-background opacity-0 group-hover:opacity-100 transition-opacity"><!> <!> <!></div> <label class="shrink-0 flex items-center gap-1.5 cursor-pointer ml-1"><!> <span class="text-xs text-subtle"> </span></label></div></div> <!></div>'),li=T('<p class="px-5 py-2 text-xs text-muted-foreground" role="status"> </p>'),ci=T('<div class="rounded-lg border border-border bg-card p-4"><div class="flex items-center justify-between mb-3"><div class="flex items-center gap-2 flex-1"><!> <!></div> <!></div> <div class="space-y-2"><!> <!> <!></div></div>'),di=T('<div class="flex flex-col gap-3 py-6"></div>'),ui=T('<div class="flex h-full items-center justify-start py-6 text-left text-subtle"> </div>'),hi=T('<span class="text-subtle">·</span> <span> </span>',1),gi=T('<div class="flex items-center gap-0.5 rounded-md border border-border bg-muted/50 p-0.5 -my-1"><!> <!></div>'),fi=T('<!> <div class="shrink-0 w-5 h-5 rounded-full bg-muted-foreground/15 flex items-center justify-center text-ui font-medium text-subtle select-none overflow-hidden"><!></div> <span class="text-sm font-medium text-foreground truncate flex-1 min-w-0"> </span>',1),mi=T('<span> </span> <span class="text-ghost">·</span>',1),pi=T('<div class="flex flex-col gap-2 mt-2 mx-2"></div>'),vi=T('<div class="mb-2"><div class="sticky top-[31.5px] z-[11] bg-background rounded-md"><div class="flex items-center gap-2 w-full px-3 py-2 rounded-md bg-muted/30"><!> <span class="text-ui text-subtle shrink-0 flex items-center gap-1.5"><!> <span> </span></span> <!></div></div> <!></div>'),_i=T('<div class="sticky top-0 z-20 -mx-5 px-5"><div class="flex items-center justify-between py-2 bg-background border-b border-border"><div class="flex items-center justify-start gap-1.5 whitespace-nowrap text-left text-xs font-medium text-subtle"><span> </span> <!> <!> <!></div> <div class="flex items-center gap-2"><!></div></div></div> <div class="flex flex-col gap-2 py-6"><!></div>',1),wi=T('<div class="h-full w-full flex flex-col overflow-hidden relative" tabindex="-1"><!> <!> <div class="h-full overflow-auto p-5 pt-0"><div><!> <!></div></div></div>');function bi(f,r){if(new.target)return dn({component:bi,...f});gn(r,!0);const l=()=>je(e(mn),"$agentSession$",h),a=()=>je(vt,"$workspace$",h),c=()=>je(_t,"$lockedFilePaths$",h),p=()=>je(zt,"$changes$",h),b=()=>je(At,"$consumer$",h),y=()=>je(Mt,"$refreshingPaths$",h),A=()=>je(Xe,"$ftCommits$",h),F=()=>je(at,"$foldUnchanged",h),G=()=>je(pt,"$lineWrapping",h),[h,oe]=On(),Te=t=>{const n=u(()=>Zn(D()?.authorEmail));var s=Zo(),i=N(s),o=N(i),d=N(o);{var g=_=>{{let R=u(()=>P.chat_changesPanel_openOnGitHub_title());ke(_,{type:"button",variant:"link",class:"h-auto justify-start px-0 text-sm font-medium text-foreground hover:text-accent-foreground hover:underline underline-offset-2 text-left cursor-pointer transition-colors leading-snug",onclick:Ss,get title(){return e(R)},children:(O,X)=>{Tt();var J=Ko(),I=ne(J),E=S(I);Ne(E,{get icon(){return An},class:"inline-block w-2.5 h-2.5 ml-1 opacity-40"}),z(V=>K(I,`${V??""} `),[()=>D()?.message?.split(`
|
|
6
6
|
`)[0]||P.chat_changesPanel_untitledCommit_fallback()]),w(O,J)},$$slots:{default:!0}})}},k=u(()=>e(Cs)()),W=_=>{var R=jo(),O=de(R,!0);z(X=>K(O,X),[()=>D()?.message?.split(`
|
|
7
|
-
`)[0]||P.chat_changesPanel_untitledCommit_fallback()]),w(_,R)};M(d,_=>{e(k)?_(g):_(W,-1)})}var
|
|
7
|
+
`)[0]||P.chat_changesPanel_untitledCommit_fallback()]),w(_,R)};M(d,_=>{e(k)?_(g):_(W,-1)})}var L=S(d,2),se=N(L);{var Ce=_=>{var R=Sr(),O=de(R,!0);z(()=>K(O,D().author)),w(_,R)};M(se,_=>{D()?.author&&_(Ce)})}var ae=S(se,2);{var ze=_=>{var R=qo(),O=S(ne(R),2),X=de(O,!0);z(J=>{Ve(O,"title",D().date),K(X,J)},[()=>wr(D().date)]),w(_,R)};M(ae,_=>{D()?.date&&_(ze)})}var Je=S(ae,2);{var kt=_=>{var R=Go(),O=S(ne(R),2),X=N(O),J=S(X);{let I=u(()=>P.chat_changesPanel_copyFullSha_title());vo(J,{get text(){return D().hash},get label(){return e(I)},class:"size-5 text-muted-foreground"})}H(O),z(I=>K(X,`${I??""} `),[()=>D().hash.substring(0,7)]),w(_,R)};M(Je,_=>{D()?.hash&&_(kt)})}H(L);var Ot=S(L,2);{var ht=_=>{const R=u(()=>D().message.split(`
|
|
8
8
|
`).slice(1).join(`
|
|
9
9
|
`).trim());var O=nt(),X=ne(O);{var J=I=>{var E=Qo(),V=de(E,!0);z(()=>K(V,e(R))),w(I,E)};M(X,I=>{e(R)&&I(J)})}w(_,O)},Nt=u(()=>D()?.message&&D().message.includes(`
|
|
10
|
-
`));M(Ot,_=>{e(Nt)&&_(ht)})}var te=S(Ot,2);{var he=_=>{var R=Jo(),O=N(R);{var X=E=>{const V=u(()=>D()?.agentId||ye()),ge=u(()=>Me.state),fe=u(()=>Q),U=u(()=>e(V)&&e(fe)?mr.select(e(ge),e(V)):void 0),Z=u(()=>e(U)?.name&&e(U).name!=="New Workspace Agent"?e(U).name:P.chat_shared_agentName_fallback());{let Ie=u(()=>P.chat_changesPanel_openAgent_title());ke(E,{type:"button",variant:"plain",class:"flex items-center gap-1 text-ui text-muted-foreground hover:text-foreground transition-colors cursor-pointer min-w-0",onclick:ee=>ys(ee),get title(){return e(Ie)},children:(ee,ce)=>{var Ae=Xo(),Ee=ne(Ae),Ze=N(Ee);{let pe=u(()=>e(V)??void 0);mo(Ze,{get agentId(){return e(pe)},size:14})}L(Ee);var me=S(Ee,2),le=de(me,!0);z(()=>K(le,e(Z))),w(ee,Ae)},$$slots:{default:!0}})}};M(O,E=>{(D()?.agentId||ye())&&E(X)})}var J=S(O,2);{var I=E=>{const V=u(()=>yo.select(Me.state,Q,D().linkedNoteId)),ge=u(()=>e(V)?.title||P.chat_changesPanel_note_fallback());{let fe=u(()=>P.chat_changesPanel_openLinkedNote_title());ke(E,{type:"button",variant:"plain",class:"flex items-center gap-1 text-ui text-muted-foreground hover:text-foreground transition-colors cursor-pointer min-w-0",onclick:U=>Lt()?.(D()?.linkedNoteId,U),get title(){return e(fe)},children:(U,Z)=>{var Ie=Yo(),ee=ne(Ie);Ne(ee,{get icon(){return co},class:"w-2.5 h-2.5 shrink-0"});var ce=S(ee,2),Ae=de(ce,!0);z(()=>K(Ae,e(ge))),w(U,Ie)},$$slots:{default:!0}})}};M(J,E=>{D()?.linkedNoteId&&Lt()&&E(I)})}L(R),w(_,R)};M(te,_=>{(D()?.agentId||ye()||D()?.linkedNoteId)&&_(he)})}L(o);var xe=S(o,2),be=N(xe);{var B=_=>{{const R=X=>{Tt();var J=ft();z(I=>K(J,I),[()=>tn(D()?.author)]),w(X,J)};let O=u(()=>D()?.author||"");_r(_,{get identity(){return e(n)},get alt(){return e(O)},size:28,class:"w-full h-full object-cover",fallback:R,$$slots:{fallback:!0}})}},j=_=>{var R=ft();z(O=>K(R,O),[()=>tn(D()?.author)]),w(_,R)};M(be,_=>{e(n)?_(B):_(j,-1)})}L(xe),L(i),L(s),z(()=>Ve(xe,"title",D()?.author||"")),w(t,s)},ue=(t,n=or,s=or)=>{const i=u(()=>Tr(n().filePath)),o=u(()=>ve(n())),d=u(()=>e(Ct).has(n().filePath)),g=u(()=>rt(n().filePath)),k=u(()=>s()?"64px":"31.5px");var W=ai(),H=N(W),se=N(H);ke(se,{variant:"plain",onclick:()=>Gr(e(o)),class:"flex min-w-0 flex-1 shrink cursor-pointer items-center justify-start gap-2 text-left",children:(j,_)=>{var R=ni(),O=ne(R);Pt(O,21,()=>Xn(cr(e(i))),Ln,(ee,ce)=>{var Ae=nt(),Ee=ne(Ae);{var Ze=le=>{var pe=Cr(),Oe=de(pe,!0);z(()=>K(Oe,e(ce).text)),w(le,pe)},me=le=>{var pe=ft();z(()=>K(pe,e(ce).text)),w(le,pe)};M(Ee,le=>{e(ce).isMatch?le(Ze):le(me,-1)})}w(ee,Ae)}),L(O);var X=S(O,2);{let ee=u(()=>e(Se).has(e(o))?dr:ur);Ne(X,{get icon(){return e(ee)},class:"text-subtle w-2.5! h-2.5! shrink-0"})}var J=S(X,2);{var I=ee=>{var ce=ei();Pt(ce,21,()=>Xn(In(e(i))),Ln,(Ae,Ee)=>{var Ze=nt(),me=ne(Ze);{var le=Oe=>{var We=Cr(),Pn=de(We,!0);z(()=>K(Pn,e(Ee).text)),w(Oe,We)},pe=Oe=>{var We=ft();z(()=>K(We,e(Ee).text)),w(Oe,We)};M(me,Oe=>{e(Ee).isMatch?Oe(le):Oe(pe,-1)})}w(Ae,Ze)}),L(ce),w(ee,ce)},E=u(()=>In(e(i)));M(J,ee=>{e(E)&&ee(I)})}var V=S(J,2);pr(V,{get additions(){return n().additions},get deletions(){return n().deletions},size:"xs"});var ge=S(V,2);{var fe=ee=>{var ce=ti(),Ae=N(ce);Ne(Ae,{get icon(){return so},class:"w-2.5 h-2.5 text-subtle shrink-0"}),L(ce),z((Ee,Ze)=>{Ve(ce,"aria-label",Ee),Ve(ce,"title",Ze)},[()=>mt(),()=>mt()]),w(ee,ce)};M(ge,ee=>{e(g)&&ee(fe)})}var U=S(ge,2);{var Z=ee=>{ir(ee,{size:12,class:"text-ghost shrink-0"})},Ie=u(()=>e(Ar).has(n().filePath));M(U,ee=>{e(Ie)&&ee(Z)})}z(()=>Ve(O,"title",e(i))),w(j,R)},$$slots:{default:!0}});var Ce=S(se,2),ae=N(Ce),ze=N(ae);{var Je=j=>{var _=nt(),R=ne(_);{var O=I=>{var E=ri(),V=ne(E);{let U=u(()=>e(g)?mt():P.chat_changesPanel_stageUnstaged_tooltip());ke(V,{variant:"ghost-light",size:"icon-xs",get tooltip(){return e(U)},get disabled(){return e(g)},onclick:Z=>{Z.stopPropagation(),ie()?.(n().filePath)},children:(Z,Ie)=>{Ne(Z,{get icon(){return hr},class:"w-3 h-3"})},$$slots:{default:!0}})}var ge=S(V,2);{let U=u(()=>e(g)?mt():P.chat_changesPanel_unstageStaged_tooltip());ke(ge,{variant:"ghost-light",size:"icon-xs",get tooltip(){return e(U)},get disabled(){return e(g)},onclick:Z=>{Z.stopPropagation(),De()?.(n().filePath)},children:(Z,Ie)=>{Ne(Z,{get icon(){return gr},class:"w-3 h-3"})},$$slots:{default:!0}})}var fe=S(ge,2);{let U=u(()=>e(g)?mt():P.chat_changesPanel_revertUnstaged_tooltip());ke(fe,{variant:"ghost-light",size:"icon-xs",get tooltip(){return e(U)},get disabled(){return e(g)},onclick:Z=>{Z.stopPropagation(),He()?.(n().filePath)},children:(Z,Ie)=>{Ne(Z,{get icon(){return fr},class:"w-3 h-3"})},$$slots:{default:!0}})}w(I,E)},X=I=>{{let E=u(()=>e(g)?mt():P.chat_changesPanel_unstageFile_tooltip());ke(I,{variant:"ghost-light",size:"icon-xs",get tooltip(){return e(E)},get disabled(){return e(g)},onclick:V=>{V.stopPropagation(),De()?.(n().filePath)},children:(V,ge)=>{Ne(V,{get icon(){return gr},class:"w-3 h-3"})},$$slots:{default:!0}})}},J=I=>{var E=si(),V=ne(E);{let fe=u(()=>e(g)?mt():P.chat_changesPanel_stageFile_tooltip());ke(V,{variant:"ghost-light",size:"icon-xs",get tooltip(){return e(fe)},get disabled(){return e(g)},onclick:U=>{U.stopPropagation(),ie()?.(n().filePath)},children:(U,Z)=>{Ne(U,{get icon(){return hr},class:"w-3 h-3"})},$$slots:{default:!0}})}var ge=S(V,2);{let fe=u(()=>e(g)?mt():P.chat_changesPanel_revertChanges_tooltip());ke(ge,{variant:"ghost-light",size:"icon-xs",get tooltip(){return e(fe)},get disabled(){return e(g)},onclick:U=>{U.stopPropagation(),He()?.(n().filePath)},children:(U,Z)=>{Ne(U,{get icon(){return fr},class:"w-3 h-3"})},$$slots:{default:!0}})}w(I,E)};M(R,I=>{n().isMerged?I(O):n().staged?I(X,1):n().category!=="committed"&&I(J,2)})}w(j,_)};M(ze,j=>{e(_e)&&j(Je)})}var kt=S(ze,2);{let j=u(()=>P.chat_changesPanel_viewCurrentDiff_tooltip());ke(kt,{variant:"ghost-light",size:"icon-xs",get disabled(){return e(v)},get tooltip(){return e(j)},onclick:_=>{_.stopPropagation(),jr(n().filePath,_)},children:(_,R)=>{Ne(_,{get icon(){return oo},class:"w-3 h-3"})},$$slots:{default:!0}})}var Ot=S(kt,2);{let j=u(()=>P.chat_changesPanel_openFile_tooltip());ke(Ot,{variant:"ghost-light",size:"icon-xs",get disabled(){return e(v)},get tooltip(){return e(j)},onclick:_=>{_.stopPropagation(),qr(n().filePath,_)},children:(_,R)=>{Ne(_,{get icon(){return An},class:"w-3 h-3"})},$$slots:{default:!0}})}L(ae);var ht=S(ae,2),Nt=N(ht);{let j=u(()=>e(d)?P.chat_changesPanel_markNotViewed_title():P.chat_changesPanel_markViewed_title());po(Nt,{get checked(){return e(d)},onCheckedChange:()=>ts(n().filePath,e(o)),size:"sm",get ariaLabel(){return e(j)}})}var te=S(Nt,2),he=de(te,!0);L(ht),L(Ce),L(H),ar(H,j=>Kr?.(j));var xe=S(H,2);{var be=j=>{var _=ii(),R=N(_);{var O=I=>{var E=nt(),V=ne(E);{var ge=U=>{{let Z=u(()=>e(_e)&&!e(g)?Un:void 0),Ie=u(()=>e(_e)&&!e(g)?Wn:void 0);Ir(U,{get parts(){return n().allParts},get foldUnchanged(){return F()},get lineWrapping(){return G()},get isAggregate(){return e(Qe)},get onStageHunk(){return e(Z)},get onUnstageHunk(){return e(Ie)},onOpenCommit:yn,get virtualizer(){return e(Ft)}})}},fe=U=>{const Z=u(()=>Vt(n()));{let Ie=u(()=>!e(v)),ee=u(()=>e(Vn)?.filePath===n().filePath?e(Vn)?.lineNumber:void 0),ce=u(()=>e(_e)&&!e(g)&&e(Z)==="unstaged"?Un:void 0),Ae=u(()=>e(_e)&&!e(g)&&e(Z)==="staged"?Wn:void 0),Ee=u(()=>e(Z)==="committed"?yn:void 0);Hr(U,{get allowHeadReads(){return e(Ie)},canReadHeadFiles:()=>no(Me.state,ye()),get change(){return n()},get foldUnchanged(){return F()},get lineWrapping(){return G()},get scrollToLine(){return e(ee)},get isAggregate(){return e(Qe)},get onStageHunk(){return e(ce)},get onUnstageHunk(){return e(Ae)},get onOpenCommit(){return e(Ee)},get virtualizer(){return e(Ft)},get gitRootId(){return Ge()},get gitRootPath(){return bt()}})}};M(V,U=>{n().isMerged&&n().allParts&&n().allParts.length>1?U(ge):U(fe,-1)})}w(I,E)},X=u(()=>e(st).has(e(o))),J=I=>{var E=oi(),V=N(E);ir(V,{size:16,class:"mr-2"});var ge=S(V);L(E),z(fe=>K(ge,` ${fe??""}`),[()=>P.chat_changesPanel_loadingDiff_label()]),w(I,E)};M(R,I=>{e(X)?I(O):I(J,-1)})}L(_),ar(_,(I,E)=>Vr?.(I,E),()=>e(o)),cn(3,_,()=>vr,()=>({tier:"moderate"})),w(j,_)},B=u(()=>e(Se).has(e(o)));M(xe,j=>{e(B)&&j(be)})}L(W),z((j,_,R,O)=>{En(W,1,`mb-4 bg-sidebar border border-border rounded-lg overflow-clip transition-all duration-spring-slow ease-spring-slow motion-reduce:transition-none ${e(d)?"opacity-50":""}`),lr(W,`overflow-anchor: none; --change-file-sticky-top: ${e(k)??""};`),Ve(W,"data-change-card-key",e(o)),En(H,1,`flex items-center gap-2 px-0 py-1.5 group relative sticky z-10 bg-sidebar ${j??""} ${e(Zt)===e(o)?"ring-2 ring-blue-400/70 bg-blue-500/10":""}`),lr(H,`top: ${e(k)??""}; border-bottom: 1px solid ${_??""}`),Ve(H,"data-change-header-key",e(o)),Ve(H,"data-change-sticky-top",e(k)),Ve(H,"data-change-search-text",e(i)),Ve(ht,"title",R),K(he,O)},[()=>e(Jt).has(e(o))?"ring-1 ring-warning/30 bg-warning/10":"",()=>e(Se).has(e(o))?"var(--border)":"transparent",()=>e(d)?P.chat_changesPanel_markNotViewed_title():P.chat_changesPanel_markViewed_title(),()=>P.chat_changesPanel_viewed_label()]),ln("click",ht,j=>j.stopPropagation()),w(t,W)},Q=Nn()?.workspaceId??"",at=uo(),pt=ho(),vt=io(Q),_t=So(Q);function ve(t){return e(re)&&t.commitHash?`${t.filePath}-${t.commitHash}`:t.filePath}let Re=C(r,"changes",7),ye=C(r,"agentId",7,null),Fe=C(r,"isAggregate",7,!1),Ue=C(r,"onOpenAgent",7),qe=C(r,"showStagingControls",7,!1),$=C(r,"showCategoryFilter",7,!1),ie=C(r,"onStage",7),De=C(r,"onUnstage",7),He=C(r,"onRevert",7),jt=C(r,"onStageAll",7),qt=C(r,"onUnstageAll",7),Ht=C(r,"isLoading",7,!1),D=C(r,"commitInfo",7,null),Lt=C(r,"onOpenNote",7),Le=C(r,"groupByCommit",7,!1),wt=C(r,"branchBaseRef",7,null),It=C(r,"branchBaseCommitSha",7,null),Ge=C(r,"gitRootId",7,void 0),bt=C(r,"gitRootPath",7,void 0);const mn=u(()=>mr(ye()??"")),v=u(()=>!!ye()&&(!l()||qs(l()))),_e=u(()=>qe()&&!e(v)&&!lo(a())),Qe=u(()=>Fe()&&!e(v)),yt=u(()=>e(v)&&l()?.nodeState==="offline");let re=Y(tt(Le()));const Xe=ao(Q);function rt(t){const n=a(),s=n?.worktreePath||n?.repositoryPath;return eo(c(),t,s)}const Ke=crypto.randomUUID(),At=Co(Q,Ke),zt=xo(Q,Ke),Mt=ko(Q,Ke),St=u(()=>e(v)?Re():p()),Tn=u(()=>b()?.status==="pending"),Ar=u(()=>new Set(y()));Be(()=>{Me.dispatch(Vs(Q,Ke,crypto.randomUUID(),{changes:Re(),agentId:ye(),showStagingControls:e(_e),isAggregate:e(Qe),groupByCommit:e(re),nodeOwnedPaths:e(v),branchBaseRef:wt()??void 0,branchBaseCommitSha:It()??void 0,gitRootId:Ge(),gitRootPath:bt()}))}),sr(()=>Me.dispatch(Gs(Q,Ke)));function Er(){return Q?bo.select(Me.state,Q):{}}function Dn(t){return e(_n).filter(s=>s.filePath===t&&s.commitHash).map(s=>s.commitHash).sort().join(",")}let pn=!1;Be(()=>{const t=e(we);if(!Q||t.length===0||pn)return;const s=Er();if(Object.keys(s).length===0){pn=!0;return}const i=new Set;for(const[o,d]of Object.entries(s))Dn(o)===d&&i.add(o);if(pn=!0,i.size>0){m(Ct,i,!0);const o=new Set(e(Se));for(const d of e(we))i.has(d.filePath)&&o.delete(ve(d));m(Se,o,!0)}});let vn=Y(!1);Be(()=>{if(e(vn))return;const t=e(Tn),n=gt(()=>e(we).length>0);!Ht()&&!t&&n&&m(vn,!0)});const Or=u(()=>(Ht()||e(Tn))&&!e(vn));let Nr=Y(tt(new Set(["unstaged","staged","committed"]))),Gt=Y(tt({unstaged:0,staged:0,committed:0}));Be(()=>{let t=0,n=0,s=0;for(const i of e(we))if(i.isMerged&&i.allParts)for(const o of i.allParts)o.category==="unstaged"?t++:o.category==="staged"?n++:o.category==="committed"&&s++;else{const o=i.category||(i.staged?"staged":"unstaged");o==="unstaged"?t++:o==="staged"?n++:o==="committed"&&s++}(t!==e(Gt).unstaged||n!==e(Gt).staged||s!==e(Gt).committed)&&m(Gt,{unstaged:t,staged:n,committed:s},!0)});function Tr(t){const n=a(),s=n?.worktreePath||n?.repositoryPath;if(s){const i=Zs(t,s);if(i!==t)return i||t}if(t.startsWith("/")){const i=["/src/","/lib/","/app/","/components/","/features/","/routes/"];for(const o of i){const d=t.indexOf(o);if(d!==-1)return t.slice(d+1)}return t.split("/").pop()||t}return t}let Dr=u(()=>$()?e(St).filter(t=>e(Nr).has(Vt(t))):e(St));function zn(t){if(!t)return{filename:"",directory:""};const n=t.replace(/\/+$/,""),s=n.lastIndexOf("/");return s===-1?{filename:n,directory:""}:{filename:n.substring(s+1),directory:n.substring(0,s)}}function zr(t){return[...t].sort((n,s)=>{const i=zn(n.filePath),o=zn(s.filePath);return i.directory!==o.directory?i.directory.localeCompare(o.directory):i.filename.localeCompare(o.filename)})}let _n=u(()=>e(Dr));function Mr(t){const n=new Map;for(const i of t){const o=Vt(i),d=n.get(i.filePath)||{};o==="committed"?(d.committed||(d.committed=[]),d.committed.push(i)):o==="staged"?d.staged=i:d.unstaged=i,n.set(i.filePath,d)}const s=[];for(const[i,o]of n){const d=[];if(o.staged&&d.push({change:o.staged,category:"staged"}),o.unstaged&&d.push({change:o.unstaged,category:"unstaged"}),o.committed)for(const H of o.committed)d.push({change:H,category:"committed"});let g=0,k=0;for(const H of d)g+=H.change.additions||0,k+=H.change.deletions||0;const W=o.staged||o.unstaged;if(W&&d.length>1){const H=o.unstaged||o.staged||o.committed?.[0];H&&s.push({...H,filePath:i,isMerged:!0,stagedPart:o.staged,unstagedPart:o.unstaged,allParts:d,additions:g,deletions:k,category:void 0,staged:void 0})}else if(d.length===1)s.push(d[0].change);else if(!W&&o.committed&&o.committed.length>0)if(e(re))for(const H of o.committed)s.push(H);else if(o.committed.length===1)s.push(o.committed[0]);else{const H=o.committed[0];s.push({...H,filePath:i,isMerged:!0,allParts:d,additions:g,deletions:k,category:void 0,staged:void 0})}}return s}let Mn="",we=Y(tt([]));Be(()=>{const t=zr(e(_e)?Mr(e(_n)):e(_n)),n=`gbc:${e(re)}::`+t.map(s=>{const i=s.gitlink?`|gl:${s.gitlink.oldSha||""}:${s.gitlink.newSha||""}`:"",o=`${s.filePath}|${s.category||s.staged}|${s.isMerged||!1}|${s.additions||0}|${s.deletions||0}${i}`;if(s.isMerged){const d=s.stagedPart?`${s.stagedPart.additions||0}:${s.stagedPart.deletions||0}`:"none",g=s.unstagedPart?`${s.unstagedPart.additions||0}:${s.unstagedPart.deletions||0}`:"none";return`${o}|s:${d}|u:${g}`}return o}).join(";;");!e(v)&&n===Mn||(Mn=n,m(we,t,!0))});const $r=30,Fr=10;let Se=Y(tt(new Set)),wn=Y(null),st=Y(tt(new Set)),Ct=Y(tt(new Set)),$n=u(()=>e(Ct).size),bn=u(()=>new Set(e(we).map(t=>t.filePath)).size),Ur=u(()=>e(we).reduce((t,n)=>t+(n.additions??0),0)),Wr=u(()=>e(we).reduce((t,n)=>t+(n.deletions??0),0)),Br=u(()=>Re().some(t=>Vt(t)==="committed")),Qt=u(()=>{const t=new Set;for(const n of Re())n.commitHash&&t.add(n.commitHash);return t.size}),ot=Y(tt(new Set)),lt=u(()=>{if(!e(re))return null;const t=[],n=new Map,s=A()||[];for(const i of e(we))if(i.commitHash){const o=n.get(i.commitHash);if(o!==void 0)t[o].changes.push(i);else{const d=s.find(g=>g.hash===i.commitHash);n.set(i.commitHash,t.length),t.push({hash:i.commitHash,message:i.commitMessage||i.commitHash.substring(0,7),author:d?.author,authorEmail:d?.authorEmail,date:d?.date,agentId:d?.agentId,linkedNoteId:d?.linkedNoteId,changes:[i]})}}else{const o=t.length>0?t[t.length-1]:null;o&&o.hash===""?o.changes.push(i):t.push({hash:"",message:P.chat_changesPanel_workingChanges_label(),changes:[i]})}return t});Be(()=>{if(e(lt)){const t=gt(()=>e(ot)),n=e(lt).find(s=>s.hash);n&&!t.has(n.hash)&&m(ot,new Set([...t,n.hash]),!0)}}),Be(()=>{const t=new Set(e(we).map(o=>ve(o))),n=gt(()=>e(wn)),s=gt(()=>e(Se)),i=[...s].some(o=>t.has(o));if(t.size>0&&!i)if(n==="collapsed")m(Se,new Set,!0),m(st,new Set,!0);else{const o=gt(()=>e(ot)),d=e(re)&&o.size>0?e(we).filter(k=>k.commitHash&&o.has(k.commitHash)):e(we);if(n==="expanded"||n==null&&t.size<=$r)m(Se,new Set(d.map(k=>ve(k))),!0);else{const k=gt(()=>e(Ct)),W=new Set;for(const H of d){if(W.size>=Fr)break;k.has(H.filePath)||W.add(ve(H))}m(Se,W,!0)}m(st,new Set,!0)}else{const o=gt(()=>e(st)),d=new Set;for(const k of s)t.has(k)&&d.add(k);d.size!==s.size&&m(Se,d,!0);const g=new Set;for(const k of o)t.has(k)&&g.add(k);g.size!==o.size&&m(st,g,!0)}});function Vr(t,n){if(e(st).has(n))return{destroy(){}};const s=new IntersectionObserver(i=>{for(const o of i)o.isIntersecting&&(m(st,new Set([...e(st),n]),!0),s.disconnect())},{root:null,rootMargin:"400px",threshold:0});return s.observe(t),{destroy(){s.disconnect()}}}function Kr(t){const n=t.parentElement;if(!n)return{};const s=()=>n.style.setProperty("--change-file-header-height",`${t.offsetHeight}px`),i=new ResizeObserver(s);return i.observe(t),s(),{destroy(){i.disconnect()}}}function jr(t,n){if(e(v))return;const s=Re().find(H=>H.filePath===t),i=n?.metaKey||n?.ctrlKey||!1,d=(n?.target?n.target?.closest("[data-panel-id]"):null)?.getAttribute("data-panel-id")??void 0,g=Q;if(!g)return;const k=s?Vt(s):void 0,W=s?{id:`chat-change-${t}`,file:t,relativePath:t,type:"modified",stage:k==="committed"?"committed":s.staged?"staged":"unstaged",stats:s?{additions:s.additions,deletions:s.deletions}:{additions:0,deletions:0},attribution:{manual:!0,timestamp:Date.now()}}:void 0;W&&Me.dispatch(Xs(g,W,{changeId:`chat-change-${t}`,filePath:t,openInAdjacentPanel:i,sourcePanelId:d,branchBaseRef:wt()??void 0,branchBaseCommitSha:It()??void 0,gitRootId:Ge(),gitRootPath:bt()}))}function qr(t,n){if(e(v))return;const s=n?.metaKey||n?.ctrlKey||!1,o=(n?.target?n.target?.closest("[data-panel-id]"):null)?.getAttribute("data-panel-id")??void 0,d=Q;d&&Me.dispatch(Ys(d,t,{openInAdjacentPanel:s,sourcePanelId:o}))}let $t;function Fn(t,n,s){const i=crypto.randomUUID();$t={requestId:i,top:e(ct)?.scrollTop??0},Me.dispatch(to(Q,Ke,i,t,n,s))}function Un(t,n){Fn("stageHunk",t,n)}function Wn(t,n){Fn("unstageHunk",t,n)}Be(()=>{const t=b()?.completedMutationRequestId;if(!$t||$t.requestId!==t)return;const n=$t.top;$t=void 0;const s=requestAnimationFrame(()=>{e(ct)&&(e(ct).scrollTop=n)});return()=>cancelAnimationFrame(s)});function yn(t){const n=Q;n&&Me.dispatch(Qs(n,t,void 0,Ge()?{gitRootId:Ge()}:void 0))}function Gr(t){const n=new Set(e(Se));n.has(t)?n.delete(t):n.add(t),m(Se,n,!0)}function Qr(t){const n=new Set(e(ot));n.has(t)?n.delete(t):n.add(t),m(ot,n,!0)}const Xr=230;function Yr(){if(e(re)&&e(lt)){const t=[];for(const n of e(lt))n.hash&&!e(ot).has(n.hash)||t.push(...n.changes.map(s=>ve(s)));return t}return e(we).map(t=>ve(t))}function Jr(t){const n=Yr(),s=n.indexOf(t);return s>=0?n[s+1]??t:t}function Zr(t){const n=e(Et);if(!n)return null;for(const s of n.querySelectorAll("[data-change-header-key]"))if(s.dataset.changeHeaderKey===t)return s;return null}function Bn(t){const n=e(ct),s=Zr(t);if(!n||!s)return;const i=n.getBoundingClientRect(),o=s.getBoundingClientRect(),d=Number.parseFloat(s.dataset.changeStickyTop??"0")||0,g=Math.max(0,n.scrollHeight-n.clientHeight),k=n.scrollTop+o.top-i.top-d;n.scrollTo({top:Math.min(g,Math.max(0,k)),behavior:"auto"})}function es(t){const n=Jr(t);Hn().then(()=>{requestAnimationFrame(()=>{Bn(n),window.setTimeout(()=>{Bn(n)},Xr)})})}function ts(t,n){const s=new Set(e(Ct)),i=new Set(e(Se)),o=s.has(t),d=!o&&i.has(n);if(o)s.delete(t),i.add(n);else{s.add(t);for(const g of e(we))g.filePath===t&&i.delete(ve(g))}if(m(Ct,s,!0),m(Se,i,!0),d&&es(n),Q){const g={};for(const k of s)g[k]=Dn(k);Me.dispatch(Js(Q,g))}}function ns(){m(wn,"expanded"),m(Se,new Set(e(we).filter(t=>!e(Ct).has(t.filePath)).map(t=>ve(t))),!0)}function rs(){m(wn,"collapsed"),m(Se,new Set,!0)}function ss(t){m(re,t,!0)}let Vn=Y(null),xt=Y(null),ct=Y(null),Et=Y(null),Ft=Y(void 0);Be(()=>{const t=e(ct),n=e(Et);if(!t||!n)return;const s=new Ao;return s.setup(t,n),m(Ft,s,!0),()=>{s.cleanUp(),e(Ft)===s&&m(Ft,void 0)}});const os=["[data-column-content]","[data-content] [data-line]","[data-content] [data-no-newline]","pre [data-line]"].join(","),Kn="rgba(255, 213, 0, 0.4)",is="rgba(59, 130, 246, 0.5)",Xt=16,as=150;let dt=Y(!1),ut=Y(""),it=Y(tt([])),Ye=Y(0),Yt=Y(null),Jt=Y(tt(new Set)),Zt=Y(null),Ut=null,ls=u(()=>{const t=e(re)&&e(lt)?e(lt).filter(n=>!n.hash||e(ot).has(n.hash)).flatMap(n=>n.changes.map(s=>ve(s))):e(we).map(n=>ve(n));return[e(re)?"grouped":"combined",t.join("|"),[...e(Se)].join("|"),[...e(st)].join("|")].join("::")});function jn(){const t=e(Et);return t?Array.from(t.querySelectorAll("diffs-container")).map(n=>n.shadowRoot).filter(n=>n!=null):[]}function cs(){const t=fo(e(xt),{extraRoots:jn()});t&&(m(ut,t,!0),m(Ye,0)),m(dt,!0),Hn().then(()=>{e(Yt)?.focus(),e(Yt)?.select()})}function qn(){en(),m(dt,!1),m(ut,""),Sn()}function Sn(){Gn(),m(it,[],!0),m(Ye,0),m(Jt,new Set,!0),m(Zt,null)}function en(){Ut!==null&&(clearTimeout(Ut),Ut=null)}function ds(t){if(en(),m(Ye,0),!e(dt)||!t.trim()){Sn();return}Ut=setTimeout(()=>{Ut=null,e(dt)&&e(ut).trim()&&us(e(ut))},as)}sr(en);function Gn(){const t=jn();for(const n of t)n.querySelectorAll(".all-changes-search-highlight").forEach(s=>{const i=s.parentNode;if(i){for(;s.firstChild;)i.insertBefore(s.firstChild,s);i.removeChild(s),i.normalize()}})}function us(t){Gn(),m(it,[],!0),m(Jt,new Set,!0),m(Zt,null),m(Ye,0);const n=t.trim(),s=e(Et);if(!n||!s)return;const i=[],o=new Set,d=n.toLowerCase();s.querySelectorAll("[data-change-card-key]").forEach(g=>{const k=g.querySelector("[data-change-header-key]"),W=k?.dataset.changeHeaderKey,H=k?.dataset.changeSearchText??"";k&&W&&vs(H,d)&&(o.add(W),i.push({element:k,headerKey:W})),g.querySelectorAll("diffs-container").forEach(se=>{const Ce=se.shadowRoot;Ce&&(hs(Ce).forEach(ae=>{gs(ae,n)}),Ce.querySelectorAll(".all-changes-search-highlight").forEach(ae=>{fs(ae)&&i.push({element:ae})}))})}),m(Jt,o,!0),m(it,i,!0),i.length>0&&Wt(0)}function hs(t){const n=Array.from(t.querySelectorAll(os)),s=[];for(const i of n)s.some(o=>o.contains(i))||s.push(i);return s}function gs(t,n){const s=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,{acceptNode(se){return se.textContent?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}}),i=[],o=n.toLowerCase();let d="",g;for(;g=s.nextNode();){const se=g.textContent||"";i.push({node:g,start:d.length,end:d.length+se.length}),d+=se}const k=d.toLowerCase(),W=[];let H=0;for(;(H=k.indexOf(o,H))!==-1;)W.push({start:H,end:H+n.length}),H+=n.length;for(let se=W.length-1;se>=0;se--){const Ce=Qn(i,W[se].start,!1),ae=Qn(i,W[se].end,!0);if(!Ce||!ae)continue;const ze=document.createRange();ze.setStart(Ce.node,Ce.offset),ze.setEnd(ae.node,ae.offset);const Je=document.createElement("span");Je.className="all-changes-search-highlight",Je.style.backgroundColor=Kn,Je.appendChild(ze.extractContents()),ze.insertNode(Je)}}function Qn(t,n,s){const i=s?[...t].reverse():t;for(const o of i)if(s?n>o.start&&n<=o.end:n>=o.start&&n<o.end)return{node:o.node,offset:n-o.start};return null}function fs(t){return Array.from(t.getClientRects()).some(n=>n.width>0&&n.height>0)}function Wt(t){if(e(it).length===0)return;e(it).forEach(s=>{s.element.classList.remove("all-changes-search-current"),s.headerKey||(s.element.style.backgroundColor=Kn)}),t<0&&(t=e(it).length-1),t>=e(it).length&&(t=0),m(Ye,t,!0);const n=e(it)[t];m(Zt,n.headerKey??null,!0),n.element.classList.add("all-changes-search-current"),n.headerKey||(n.element.style.backgroundColor=is),ms(n.element)}function ms(t){const n=e(ct);if(!n){t.scrollIntoView?.({behavior:"smooth",block:"center",inline:"nearest"});return}ps(t,n)}function ps(t,n){const s=t.getBoundingClientRect(),i=n.getBoundingClientRect(),o=s.top-i.top+n.scrollTop,d=s.left-i.left+n.scrollLeft,g=Math.max(0,o-n.clientHeight/2+s.height/2);let k=n.scrollLeft;s.left<i.left+Xt?k=Math.max(0,d-Xt):s.right>i.right-Xt&&(k=Math.max(0,d-n.clientWidth+s.width+Xt)),n.scrollTo({top:g,left:k,behavior:"smooth"})}function Xn(t){const n=e(dt)?e(ut).trim():"";if(!n)return[{text:t,isMatch:!1}];const s=t.toLowerCase(),i=n.toLowerCase(),o=[];let d=0,g=0;for(;(g=s.indexOf(i,d))!==-1;)g>d&&o.push({text:t.slice(d,g),isMatch:!1}),o.push({text:t.slice(g,g+n.length),isMatch:!0}),d=g+n.length;return d<t.length&&o.push({text:t.slice(d),isMatch:!1}),o.length>0?o:[{text:t,isMatch:!1}]}function vs(t,n){return[cr(t),In(t)].filter(Boolean).some(s=>s.toLowerCase().includes(n))}function Yn(t){if(!e(xt)||!t)return!1;if(e(xt).contains(t))return!0;const n=t.getRootNode();return n instanceof ShadowRoot&&e(xt).contains(n.host)}function Jn(t){return t.defaultPrevented?!1:t.composedPath().some(n=>n instanceof Node&&Yn(n))?!0:Yn(document.activeElement)}function _s(t){if((t.metaKey||t.ctrlKey)&&t.key==="f"){Jn(t)&&(t.preventDefault(),cs());return}e(dt)&&t.key==="Escape"&&Jn(t)&&(t.preventDefault(),qn())}function ws(t){(t.key==="F3"||t.key==="g"&&(t.ctrlKey||t.metaKey))&&(t.preventDefault(),t.shiftKey?Wt(e(Ye)-1):Wt(e(Ye)+1))}function bs(t){t.defaultPrevented||t.button!==0||t.target?.closest('button, input, textarea, select, a, [contenteditable="true"], diffs-container')||e(xt)?.focus({preventScroll:!0})}let Cn=0;Be(()=>{const t=e(dt),n=e(ut);e(ls),gt(()=>{if(!t||!n.trim()){Cn++,en(),Sn();return}const s=++Cn;Hn().then(()=>{s===Cn&&ds(n)})})});function ys(t){const n=D()?.agentId||ye();n&&Ue()?.(n,t)}function Ss(){if(!D()?.hash)return;const t=a(),n=t?.repositoryOwner,s=t?.repositoryName,i=t?.id;if(n&&s&&i){const o=`https://github.com/${n}/${s}/commit/${D().hash}`;wo(i).openTab({type:"browser",title:`${D().hash.substring(0,7)} · ${s}`,closable:!0,browserUrl:o,workspaceId:i})}}const Cs=u(()=>()=>{const t=a();return!!(D()?.hash&&t?.repositoryOwner&&t?.repositoryName)});function Zn(t){if(!t)return null;const n=t.match(/(?:\d+\+)?([^@]+)@users\.noreply\.github\.com/);return n?n[1]:null}function tn(t){if(!t)return"?";const n=t.trim().split(/\s+/);return n.length>=2?(n[0][0]+n[n.length-1][0]).toUpperCase():t[0]?.toUpperCase()||"?"}Be(()=>{const t=Q;if(!(!t||!(e(re)&&!Ge()&&!e(v))))return Me.dispatch(Ks(t,"history")),()=>Me.dispatch(js(t,"history"))});var xs={expandAll:ns,collapseAll:rs,setGroupByCommit:ss,get changes(){return Re()},set changes(t){Re(t),x()},get agentId(){return ye()},set agentId(t=null){ye(t),x()},get isAggregate(){return Fe()},set isAggregate(t=!1){Fe(t),x()},get onOpenAgent(){return Ue()},set onOpenAgent(t){Ue(t),x()},get showStagingControls(){return qe()},set showStagingControls(t=!1){qe(t),x()},get showCategoryFilter(){return $()},set showCategoryFilter(t=!1){$(t),x()},get onStage(){return ie()},set onStage(t){ie(t),x()},get onUnstage(){return De()},set onUnstage(t){De(t),x()},get onRevert(){return He()},set onRevert(t){He(t),x()},get onStageAll(){return jt()},set onStageAll(t){jt(t),x()},get onUnstageAll(){return qt()},set onUnstageAll(t){qt(t),x()},get isLoading(){return Ht()},set isLoading(t=!1){Ht(t),x()},get commitInfo(){return D()},set commitInfo(t=null){D(t),x()},get onOpenNote(){return Lt()},set onOpenNote(t){Lt(t),x()},get groupByCommit(){return Le()},set groupByCommit(t=!1){Le(t),x()},get branchBaseRef(){return wt()},set branchBaseRef(t=null){wt(t),x()},get branchBaseCommitSha(){return It()},set branchBaseCommitSha(t=null){It(t),x()},get gitRootId(){return Ge()},set gitRootId(t=void 0){Ge(t),x()},get gitRootPath(){return bt()},set gitRootPath(t=void 0){bt(t),x()},$set:un,$on:(t,n)=>hn(r,t,n)},Bt=wi();sn("keydown",Us,_s);var er=N(Bt);{var ks=t=>{var n=li(),s=de(n);z((i,o)=>K(s,`${i??""}
|
|
11
|
-
${o??""}`),[()=>l()?.checkpoint?P.agent_node_checkpoint_available({time:l().checkpoint.capturedAt}):P.agent_node_checkpoint_unavailable(),()=>P.agent_node_transcript_diff_notice()]),w(t,n)};M(er,t=>{e(yt)&&t(ks)})}var tr=S(er,2);{var Ps=t=>{{let n=u(()=>P.chat_changesPanel_findInChanges_placeholder());_o(t,{get placeholder(){return e(n)},get currentMatchIndex(){return e(Ye)},get totalMatches(){return e(it).length},emptyResultText:"No results",resultVariant:"muted",inputClass:"w-48",onKeydown:ws,onPrevious:()=>Wt(e(Ye)-1),onNext:()=>Wt(e(Ye)+1),onClose:qn,get query(){return e(ut)},set query(s){m(ut,s,!0)},get inputRef(){return e(Yt)},set inputRef(s){m(Yt,s,!0)}})}};M(tr,t=>{e(dt)&&t(Ps)})}var xn=S(tr,2),kn=N(xn),nr=N(kn);{var Rs=t=>{Te(t)};M(nr,t=>{D()&&t(Rs)})}var
|
|
12
|
-
`)[0]]),w(me,pe)},$$slots:{default:!0}});var fe=S(ge,2),U=N(fe);{var Z=me=>{var le=mi(),pe=ne(le),Oe=de(pe,!0);Tt(2),z(We=>K(Oe,We),[()=>wr(e(B).date)]),w(me,le)};M(U,me=>{e(B).date&&me(Z)})}var Ie=S(U,2),ee=de(Ie,!0);
|
|
10
|
+
`));M(Ot,_=>{e(Nt)&&_(ht)})}var te=S(Ot,2);{var he=_=>{var R=Jo(),O=N(R);{var X=E=>{const V=u(()=>D()?.agentId||ye()),ge=u(()=>Me.state),fe=u(()=>Q),U=u(()=>e(V)&&e(fe)?mr.select(e(ge),e(V)):void 0),Z=u(()=>e(U)?.name&&e(U).name!=="New Workspace Agent"?e(U).name:P.chat_shared_agentName_fallback());{let Ie=u(()=>P.chat_changesPanel_openAgent_title());ke(E,{type:"button",variant:"plain",class:"flex items-center gap-1 text-ui text-muted-foreground hover:text-foreground transition-colors cursor-pointer min-w-0",onclick:ee=>ys(ee),get title(){return e(Ie)},children:(ee,ce)=>{var Ae=Xo(),Ee=ne(Ae),Ze=N(Ee);{let pe=u(()=>e(V)??void 0);mo(Ze,{get agentId(){return e(pe)},size:14})}H(Ee);var me=S(Ee,2),le=de(me,!0);z(()=>K(le,e(Z))),w(ee,Ae)},$$slots:{default:!0}})}};M(O,E=>{(D()?.agentId||ye())&&E(X)})}var J=S(O,2);{var I=E=>{const V=u(()=>yo.select(Me.state,Q,D().linkedNoteId)),ge=u(()=>e(V)?.title||P.chat_changesPanel_note_fallback());{let fe=u(()=>P.chat_changesPanel_openLinkedNote_title());ke(E,{type:"button",variant:"plain",class:"flex items-center gap-1 text-ui text-muted-foreground hover:text-foreground transition-colors cursor-pointer min-w-0",onclick:U=>Ht()?.(D()?.linkedNoteId,U),get title(){return e(fe)},children:(U,Z)=>{var Ie=Yo(),ee=ne(Ie);Ne(ee,{get icon(){return co},class:"w-2.5 h-2.5 shrink-0"});var ce=S(ee,2),Ae=de(ce,!0);z(()=>K(Ae,e(ge))),w(U,Ie)},$$slots:{default:!0}})}};M(J,E=>{D()?.linkedNoteId&&Ht()&&E(I)})}H(R),w(_,R)};M(te,_=>{(D()?.agentId||ye()||D()?.linkedNoteId)&&_(he)})}H(o);var xe=S(o,2),be=N(xe);{var B=_=>{{const R=X=>{Tt();var J=ft();z(I=>K(J,I),[()=>tn(D()?.author)]),w(X,J)};let O=u(()=>D()?.author||"");_r(_,{get identity(){return e(n)},get alt(){return e(O)},size:28,class:"w-full h-full object-cover",fallback:R,$$slots:{fallback:!0}})}},j=_=>{var R=ft();z(O=>K(R,O),[()=>tn(D()?.author)]),w(_,R)};M(be,_=>{e(n)?_(B):_(j,-1)})}H(xe),H(i),H(s),z(()=>Ve(xe,"title",D()?.author||"")),w(t,s)},ue=(t,n=or,s=or)=>{const i=u(()=>Tr(n().filePath)),o=u(()=>ve(n())),d=u(()=>e(Ct).has(n().filePath)),g=u(()=>rt(n().filePath)),k=u(()=>s()?"64px":"31.5px");var W=ai(),L=N(W),se=N(L);ke(se,{variant:"plain",onclick:()=>Gr(e(o)),class:"flex min-w-0 flex-1 shrink cursor-pointer items-center justify-start gap-2 text-left",children:(j,_)=>{var R=ni(),O=ne(R);Pt(O,21,()=>Xn(cr(e(i))),Hn,(ee,ce)=>{var Ae=nt(),Ee=ne(Ae);{var Ze=le=>{var pe=Cr(),Oe=de(pe,!0);z(()=>K(Oe,e(ce).text)),w(le,pe)},me=le=>{var pe=ft();z(()=>K(pe,e(ce).text)),w(le,pe)};M(Ee,le=>{e(ce).isMatch?le(Ze):le(me,-1)})}w(ee,Ae)}),H(O);var X=S(O,2);{let ee=u(()=>e(Se).has(e(o))?dr:ur);Ne(X,{get icon(){return e(ee)},class:"text-subtle w-2.5! h-2.5! shrink-0"})}var J=S(X,2);{var I=ee=>{var ce=ei();Pt(ce,21,()=>Xn(In(e(i))),Hn,(Ae,Ee)=>{var Ze=nt(),me=ne(Ze);{var le=Oe=>{var We=Cr(),Pn=de(We,!0);z(()=>K(Pn,e(Ee).text)),w(Oe,We)},pe=Oe=>{var We=ft();z(()=>K(We,e(Ee).text)),w(Oe,We)};M(me,Oe=>{e(Ee).isMatch?Oe(le):Oe(pe,-1)})}w(Ae,Ze)}),H(ce),w(ee,ce)},E=u(()=>In(e(i)));M(J,ee=>{e(E)&&ee(I)})}var V=S(J,2);pr(V,{get additions(){return n().additions},get deletions(){return n().deletions},size:"xs"});var ge=S(V,2);{var fe=ee=>{var ce=ti(),Ae=N(ce);Ne(Ae,{get icon(){return so},class:"w-2.5 h-2.5 text-subtle shrink-0"}),H(ce),z((Ee,Ze)=>{Ve(ce,"aria-label",Ee),Ve(ce,"title",Ze)},[()=>mt(),()=>mt()]),w(ee,ce)};M(ge,ee=>{e(g)&&ee(fe)})}var U=S(ge,2);{var Z=ee=>{ir(ee,{size:12,class:"text-ghost shrink-0"})},Ie=u(()=>e(Ar).has(n().filePath));M(U,ee=>{e(Ie)&&ee(Z)})}z(()=>Ve(O,"title",e(i))),w(j,R)},$$slots:{default:!0}});var Ce=S(se,2),ae=N(Ce),ze=N(ae);{var Je=j=>{var _=nt(),R=ne(_);{var O=I=>{var E=ri(),V=ne(E);{let U=u(()=>e(g)?mt():P.chat_changesPanel_stageUnstaged_tooltip());ke(V,{variant:"ghost-light",size:"icon-xs",get tooltip(){return e(U)},get disabled(){return e(g)},onclick:Z=>{Z.stopPropagation(),ie()?.(n().filePath)},children:(Z,Ie)=>{Ne(Z,{get icon(){return hr},class:"w-3 h-3"})},$$slots:{default:!0}})}var ge=S(V,2);{let U=u(()=>e(g)?mt():P.chat_changesPanel_unstageStaged_tooltip());ke(ge,{variant:"ghost-light",size:"icon-xs",get tooltip(){return e(U)},get disabled(){return e(g)},onclick:Z=>{Z.stopPropagation(),De()?.(n().filePath)},children:(Z,Ie)=>{Ne(Z,{get icon(){return gr},class:"w-3 h-3"})},$$slots:{default:!0}})}var fe=S(ge,2);{let U=u(()=>e(g)?mt():P.chat_changesPanel_revertUnstaged_tooltip());ke(fe,{variant:"ghost-light",size:"icon-xs",get tooltip(){return e(U)},get disabled(){return e(g)},onclick:Z=>{Z.stopPropagation(),Le()?.(n().filePath)},children:(Z,Ie)=>{Ne(Z,{get icon(){return fr},class:"w-3 h-3"})},$$slots:{default:!0}})}w(I,E)},X=I=>{{let E=u(()=>e(g)?mt():P.chat_changesPanel_unstageFile_tooltip());ke(I,{variant:"ghost-light",size:"icon-xs",get tooltip(){return e(E)},get disabled(){return e(g)},onclick:V=>{V.stopPropagation(),De()?.(n().filePath)},children:(V,ge)=>{Ne(V,{get icon(){return gr},class:"w-3 h-3"})},$$slots:{default:!0}})}},J=I=>{var E=si(),V=ne(E);{let fe=u(()=>e(g)?mt():P.chat_changesPanel_stageFile_tooltip());ke(V,{variant:"ghost-light",size:"icon-xs",get tooltip(){return e(fe)},get disabled(){return e(g)},onclick:U=>{U.stopPropagation(),ie()?.(n().filePath)},children:(U,Z)=>{Ne(U,{get icon(){return hr},class:"w-3 h-3"})},$$slots:{default:!0}})}var ge=S(V,2);{let fe=u(()=>e(g)?mt():P.chat_changesPanel_revertChanges_tooltip());ke(ge,{variant:"ghost-light",size:"icon-xs",get tooltip(){return e(fe)},get disabled(){return e(g)},onclick:U=>{U.stopPropagation(),Le()?.(n().filePath)},children:(U,Z)=>{Ne(U,{get icon(){return fr},class:"w-3 h-3"})},$$slots:{default:!0}})}w(I,E)};M(R,I=>{n().isMerged?I(O):n().staged?I(X,1):n().category!=="committed"&&I(J,2)})}w(j,_)};M(ze,j=>{e(_e)&&j(Je)})}var kt=S(ze,2);{let j=u(()=>P.chat_changesPanel_viewCurrentDiff_tooltip());ke(kt,{variant:"ghost-light",size:"icon-xs",get disabled(){return e(v)},get tooltip(){return e(j)},onclick:_=>{_.stopPropagation(),jr(n().filePath,_)},children:(_,R)=>{Ne(_,{get icon(){return oo},class:"w-3 h-3"})},$$slots:{default:!0}})}var Ot=S(kt,2);{let j=u(()=>P.chat_changesPanel_openFile_tooltip());ke(Ot,{variant:"ghost-light",size:"icon-xs",get disabled(){return e(v)},get tooltip(){return e(j)},onclick:_=>{_.stopPropagation(),qr(n().filePath,_)},children:(_,R)=>{Ne(_,{get icon(){return An},class:"w-3 h-3"})},$$slots:{default:!0}})}H(ae);var ht=S(ae,2),Nt=N(ht);{let j=u(()=>e(d)?P.chat_changesPanel_markNotViewed_title():P.chat_changesPanel_markViewed_title());po(Nt,{get checked(){return e(d)},onCheckedChange:()=>ts(n().filePath,e(o)),size:"sm",get ariaLabel(){return e(j)}})}var te=S(Nt,2),he=de(te,!0);H(ht),H(Ce),H(L),ar(L,j=>Kr?.(j));var xe=S(L,2);{var be=j=>{var _=ii(),R=N(_);{var O=I=>{var E=nt(),V=ne(E);{var ge=U=>{{let Z=u(()=>e(_e)&&!e(g)?Un:void 0),Ie=u(()=>e(_e)&&!e(g)?Wn:void 0);Ir(U,{get parts(){return n().allParts},get foldUnchanged(){return F()},get lineWrapping(){return G()},get isAggregate(){return e(Qe)},get onStageHunk(){return e(Z)},get onUnstageHunk(){return e(Ie)},onOpenCommit:yn,get virtualizer(){return e(Ft)}})}},fe=U=>{const Z=u(()=>Vt(n()));{let Ie=u(()=>!e(v)),ee=u(()=>e(Vn)?.filePath===n().filePath?e(Vn)?.lineNumber:void 0),ce=u(()=>e(_e)&&!e(g)&&e(Z)==="unstaged"?Un:void 0),Ae=u(()=>e(_e)&&!e(g)&&e(Z)==="staged"?Wn:void 0),Ee=u(()=>e(Z)==="committed"?yn:void 0);Lr(U,{get allowHeadReads(){return e(Ie)},canReadHeadFiles:()=>no(Me.state,ye()),get change(){return n()},get foldUnchanged(){return F()},get lineWrapping(){return G()},get scrollToLine(){return e(ee)},get isAggregate(){return e(Qe)},get onStageHunk(){return e(ce)},get onUnstageHunk(){return e(Ae)},get onOpenCommit(){return e(Ee)},get virtualizer(){return e(Ft)},get gitRootId(){return Ge()},get gitRootPath(){return bt()}})}};M(V,U=>{n().isMerged&&n().allParts&&n().allParts.length>1?U(ge):U(fe,-1)})}w(I,E)},X=u(()=>e(st).has(e(o))),J=I=>{var E=oi(),V=N(E);ir(V,{size:16,class:"mr-2"});var ge=S(V);H(E),z(fe=>K(ge,` ${fe??""}`),[()=>P.chat_changesPanel_loadingDiff_label()]),w(I,E)};M(R,I=>{e(X)?I(O):I(J,-1)})}H(_),ar(_,(I,E)=>Vr?.(I,E),()=>e(o)),cn(3,_,()=>vr,()=>({tier:"moderate"})),w(j,_)},B=u(()=>e(Se).has(e(o)));M(xe,j=>{e(B)&&j(be)})}H(W),z((j,_,R,O)=>{En(W,1,`mb-4 bg-sidebar border border-border rounded-lg overflow-clip transition-all duration-spring-slow ease-spring-slow motion-reduce:transition-none ${e(d)?"opacity-50":""}`),lr(W,`overflow-anchor: none; --change-file-sticky-top: ${e(k)??""};`),Ve(W,"data-change-card-key",e(o)),En(L,1,`flex items-center gap-2 px-0 py-1.5 group relative sticky z-10 bg-sidebar ${j??""} ${e(Zt)===e(o)?"ring-2 ring-blue-400/70 bg-blue-500/10":""}`),lr(L,`top: ${e(k)??""}; border-bottom: 1px solid ${_??""}`),Ve(L,"data-change-header-key",e(o)),Ve(L,"data-change-sticky-top",e(k)),Ve(L,"data-change-search-text",e(i)),Ve(ht,"title",R),K(he,O)},[()=>e(Jt).has(e(o))?"ring-1 ring-warning/30 bg-warning/10":"",()=>e(Se).has(e(o))?"var(--border)":"transparent",()=>e(d)?P.chat_changesPanel_markNotViewed_title():P.chat_changesPanel_markViewed_title(),()=>P.chat_changesPanel_viewed_label()]),ln("click",ht,j=>j.stopPropagation()),w(t,W)},Q=Nn()?.workspaceId??"",at=uo(),pt=ho(),vt=io(Q),_t=So(Q);function ve(t){return e(re)&&t.commitHash?`${t.filePath}-${t.commitHash}`:t.filePath}let Re=C(r,"changes",7),ye=C(r,"agentId",7,null),Fe=C(r,"isAggregate",7,!1),Ue=C(r,"onOpenAgent",7),qe=C(r,"showStagingControls",7,!1),$=C(r,"showCategoryFilter",7,!1),ie=C(r,"onStage",7),De=C(r,"onUnstage",7),Le=C(r,"onRevert",7),jt=C(r,"onStageAll",7),qt=C(r,"onUnstageAll",7),Lt=C(r,"isLoading",7,!1),D=C(r,"commitInfo",7,null),Ht=C(r,"onOpenNote",7),He=C(r,"groupByCommit",7,!1),wt=C(r,"branchBaseRef",7,null),It=C(r,"branchBaseCommitSha",7,null),Ge=C(r,"gitRootId",7,void 0),bt=C(r,"gitRootPath",7,void 0);const mn=u(()=>mr(ye()??"")),v=u(()=>!!ye()&&(!l()||qs(l()))),_e=u(()=>qe()&&!e(v)&&!lo(a())),Qe=u(()=>Fe()&&!e(v)),yt=u(()=>e(v)&&l()?.nodeState==="offline");let re=Y(tt(He()));const Xe=ao(Q);function rt(t){const n=a(),s=n?.worktreePath||n?.repositoryPath;return eo(c(),t,s)}const Ke=crypto.randomUUID(),At=Co(Q,Ke),zt=xo(Q,Ke),Mt=ko(Q,Ke),St=u(()=>e(v)?Re():p()),Tn=u(()=>b()?.status==="pending"),Ar=u(()=>new Set(y()));Be(()=>{Me.dispatch(Vs(Q,Ke,crypto.randomUUID(),{changes:Re(),agentId:ye(),showStagingControls:e(_e),isAggregate:e(Qe),groupByCommit:e(re),nodeOwnedPaths:e(v),branchBaseRef:wt()??void 0,branchBaseCommitSha:It()??void 0,gitRootId:Ge(),gitRootPath:bt()}))}),sr(()=>Me.dispatch(Gs(Q,Ke)));function Er(){return Q?bo.select(Me.state,Q):{}}function Dn(t){return e(_n).filter(s=>s.filePath===t&&s.commitHash).map(s=>s.commitHash).sort().join(",")}let pn=!1;Be(()=>{const t=e(we);if(!Q||t.length===0||pn)return;const s=Er();if(Object.keys(s).length===0){pn=!0;return}const i=new Set;for(const[o,d]of Object.entries(s))Dn(o)===d&&i.add(o);if(pn=!0,i.size>0){m(Ct,i,!0);const o=new Set(e(Se));for(const d of e(we))i.has(d.filePath)&&o.delete(ve(d));m(Se,o,!0)}});let vn=Y(!1);Be(()=>{if(e(vn))return;const t=e(Tn),n=gt(()=>e(we).length>0);!Lt()&&!t&&n&&m(vn,!0)});const Or=u(()=>(Lt()||e(Tn))&&!e(vn));let Nr=Y(tt(new Set(["unstaged","staged","committed"]))),Gt=Y(tt({unstaged:0,staged:0,committed:0}));Be(()=>{let t=0,n=0,s=0;for(const i of e(we))if(i.isMerged&&i.allParts)for(const o of i.allParts)o.category==="unstaged"?t++:o.category==="staged"?n++:o.category==="committed"&&s++;else{const o=i.category||(i.staged?"staged":"unstaged");o==="unstaged"?t++:o==="staged"?n++:o==="committed"&&s++}(t!==e(Gt).unstaged||n!==e(Gt).staged||s!==e(Gt).committed)&&m(Gt,{unstaged:t,staged:n,committed:s},!0)});function Tr(t){const n=a(),s=n?.worktreePath||n?.repositoryPath;if(s){const i=Zs(t,s);if(i!==t)return i||t}if(t.startsWith("/")){const i=["/src/","/lib/","/app/","/components/","/features/","/routes/"];for(const o of i){const d=t.indexOf(o);if(d!==-1)return t.slice(d+1)}return t.split("/").pop()||t}return t}let Dr=u(()=>$()?e(St).filter(t=>e(Nr).has(Vt(t))):e(St));function zn(t){if(!t)return{filename:"",directory:""};const n=t.replace(/\/+$/,""),s=n.lastIndexOf("/");return s===-1?{filename:n,directory:""}:{filename:n.substring(s+1),directory:n.substring(0,s)}}function zr(t){return[...t].sort((n,s)=>{const i=zn(n.filePath),o=zn(s.filePath);return i.directory!==o.directory?i.directory.localeCompare(o.directory):i.filename.localeCompare(o.filename)})}let _n=u(()=>e(Dr));function Mr(t){const n=new Map;for(const i of t){const o=Vt(i),d=n.get(i.filePath)||{};o==="committed"?(d.committed||(d.committed=[]),d.committed.push(i)):o==="staged"?d.staged=i:d.unstaged=i,n.set(i.filePath,d)}const s=[];for(const[i,o]of n){const d=[];if(o.staged&&d.push({change:o.staged,category:"staged"}),o.unstaged&&d.push({change:o.unstaged,category:"unstaged"}),o.committed)for(const L of o.committed)d.push({change:L,category:"committed"});let g=0,k=0;for(const L of d)g+=L.change.additions||0,k+=L.change.deletions||0;const W=o.staged||o.unstaged;if(W&&d.length>1){const L=o.unstaged||o.staged||o.committed?.[0];L&&s.push({...L,filePath:i,isMerged:!0,stagedPart:o.staged,unstagedPart:o.unstaged,allParts:d,additions:g,deletions:k,category:void 0,staged:void 0})}else if(d.length===1)s.push(d[0].change);else if(!W&&o.committed&&o.committed.length>0)if(e(re))for(const L of o.committed)s.push(L);else if(o.committed.length===1)s.push(o.committed[0]);else{const L=o.committed[0];s.push({...L,filePath:i,isMerged:!0,allParts:d,additions:g,deletions:k,category:void 0,staged:void 0})}}return s}let Mn="",we=Y(tt([]));Be(()=>{const t=zr(e(_e)?Mr(e(_n)):e(_n)),n=`gbc:${e(re)}::`+t.map(s=>{const i=s.gitlink?`|gl:${s.gitlink.oldSha||""}:${s.gitlink.newSha||""}`:"",o=`${s.filePath}|${s.category||s.staged}|${s.isMerged||!1}|${s.additions||0}|${s.deletions||0}${i}`;if(s.isMerged){const d=s.stagedPart?`${s.stagedPart.additions||0}:${s.stagedPart.deletions||0}`:"none",g=s.unstagedPart?`${s.unstagedPart.additions||0}:${s.unstagedPart.deletions||0}`:"none";return`${o}|s:${d}|u:${g}`}return o}).join(";;");!e(v)&&n===Mn||(Mn=n,m(we,t,!0))});const $r=30,Fr=10;let Se=Y(tt(new Set)),wn=Y(null),st=Y(tt(new Set)),Ct=Y(tt(new Set)),$n=u(()=>e(Ct).size),bn=u(()=>new Set(e(we).map(t=>t.filePath)).size),Ur=u(()=>e(we).reduce((t,n)=>t+(n.additions??0),0)),Wr=u(()=>e(we).reduce((t,n)=>t+(n.deletions??0),0)),Br=u(()=>Re().some(t=>Vt(t)==="committed")),Qt=u(()=>{const t=new Set;for(const n of Re())n.commitHash&&t.add(n.commitHash);return t.size}),ot=Y(tt(new Set)),lt=u(()=>{if(!e(re))return null;const t=[],n=new Map,s=A()||[];for(const i of e(we))if(i.commitHash){const o=n.get(i.commitHash);if(o!==void 0)t[o].changes.push(i);else{const d=s.find(g=>g.hash===i.commitHash);n.set(i.commitHash,t.length),t.push({hash:i.commitHash,message:i.commitMessage||i.commitHash.substring(0,7),author:d?.author,authorEmail:d?.authorEmail,date:d?.date,agentId:d?.agentId,linkedNoteId:d?.linkedNoteId,changes:[i]})}}else{const o=t.length>0?t[t.length-1]:null;o&&o.hash===""?o.changes.push(i):t.push({hash:"",message:P.chat_changesPanel_workingChanges_label(),changes:[i]})}return t});Be(()=>{if(e(lt)){const t=gt(()=>e(ot)),n=e(lt).find(s=>s.hash);n&&!t.has(n.hash)&&m(ot,new Set([...t,n.hash]),!0)}}),Be(()=>{const t=new Set(e(we).map(o=>ve(o))),n=gt(()=>e(wn)),s=gt(()=>e(Se)),i=[...s].some(o=>t.has(o));if(t.size>0&&!i)if(n==="collapsed")m(Se,new Set,!0),m(st,new Set,!0);else{const o=gt(()=>e(ot)),d=e(re)&&o.size>0?e(we).filter(k=>k.commitHash&&o.has(k.commitHash)):e(we);if(n==="expanded"||n==null&&t.size<=$r)m(Se,new Set(d.map(k=>ve(k))),!0);else{const k=gt(()=>e(Ct)),W=new Set;for(const L of d){if(W.size>=Fr)break;k.has(L.filePath)||W.add(ve(L))}m(Se,W,!0)}m(st,new Set,!0)}else{const o=gt(()=>e(st)),d=new Set;for(const k of s)t.has(k)&&d.add(k);d.size!==s.size&&m(Se,d,!0);const g=new Set;for(const k of o)t.has(k)&&g.add(k);g.size!==o.size&&m(st,g,!0)}});function Vr(t,n){if(e(st).has(n))return{destroy(){}};const s=new IntersectionObserver(i=>{for(const o of i)o.isIntersecting&&(m(st,new Set([...e(st),n]),!0),s.disconnect())},{root:null,rootMargin:"400px",threshold:0});return s.observe(t),{destroy(){s.disconnect()}}}function Kr(t){const n=t.parentElement;if(!n)return{};const s=()=>n.style.setProperty("--change-file-header-height",`${t.offsetHeight}px`),i=new ResizeObserver(s);return i.observe(t),s(),{destroy(){i.disconnect()}}}function jr(t,n){if(e(v))return;const s=Re().find(L=>L.filePath===t),i=n?.metaKey||n?.ctrlKey||!1,d=(n?.target?n.target?.closest("[data-panel-id]"):null)?.getAttribute("data-panel-id")??void 0,g=Q;if(!g)return;const k=s?Vt(s):void 0,W=s?{id:`chat-change-${t}`,file:t,relativePath:t,type:"modified",stage:k==="committed"?"committed":s.staged?"staged":"unstaged",stats:s?{additions:s.additions,deletions:s.deletions}:{additions:0,deletions:0},attribution:{manual:!0,timestamp:Date.now()}}:void 0;W&&Me.dispatch(Xs(g,W,{changeId:`chat-change-${t}`,filePath:t,openInAdjacentPanel:i,sourcePanelId:d,branchBaseRef:wt()??void 0,branchBaseCommitSha:It()??void 0,gitRootId:Ge(),gitRootPath:bt()}))}function qr(t,n){if(e(v))return;const s=n?.metaKey||n?.ctrlKey||!1,o=(n?.target?n.target?.closest("[data-panel-id]"):null)?.getAttribute("data-panel-id")??void 0,d=Q;d&&Me.dispatch(Ys(d,t,{openInAdjacentPanel:s,sourcePanelId:o}))}let $t;function Fn(t,n,s){const i=crypto.randomUUID();$t={requestId:i,top:e(ct)?.scrollTop??0},Me.dispatch(to(Q,Ke,i,t,n,s))}function Un(t,n){Fn("stageHunk",t,n)}function Wn(t,n){Fn("unstageHunk",t,n)}Be(()=>{const t=b()?.completedMutationRequestId;if(!$t||$t.requestId!==t)return;const n=$t.top;$t=void 0;const s=requestAnimationFrame(()=>{e(ct)&&(e(ct).scrollTop=n)});return()=>cancelAnimationFrame(s)});function yn(t){const n=Q;n&&Me.dispatch(Qs(n,t,void 0,Ge()?{gitRootId:Ge()}:void 0))}function Gr(t){const n=new Set(e(Se));n.has(t)?n.delete(t):n.add(t),m(Se,n,!0)}function Qr(t){const n=new Set(e(ot));n.has(t)?n.delete(t):n.add(t),m(ot,n,!0)}const Xr=230;function Yr(){if(e(re)&&e(lt)){const t=[];for(const n of e(lt))n.hash&&!e(ot).has(n.hash)||t.push(...n.changes.map(s=>ve(s)));return t}return e(we).map(t=>ve(t))}function Jr(t){const n=Yr(),s=n.indexOf(t);return s>=0?n[s+1]??t:t}function Zr(t){const n=e(Et);if(!n)return null;for(const s of n.querySelectorAll("[data-change-header-key]"))if(s.dataset.changeHeaderKey===t)return s;return null}function Bn(t){const n=e(ct),s=Zr(t);if(!n||!s)return;const i=n.getBoundingClientRect(),o=s.getBoundingClientRect(),d=Number.parseFloat(s.dataset.changeStickyTop??"0")||0,g=Math.max(0,n.scrollHeight-n.clientHeight),k=n.scrollTop+o.top-i.top-d;n.scrollTo({top:Math.min(g,Math.max(0,k)),behavior:"auto"})}function es(t){const n=Jr(t);Ln().then(()=>{requestAnimationFrame(()=>{Bn(n),window.setTimeout(()=>{Bn(n)},Xr)})})}function ts(t,n){const s=new Set(e(Ct)),i=new Set(e(Se)),o=s.has(t),d=!o&&i.has(n);if(o)s.delete(t),i.add(n);else{s.add(t);for(const g of e(we))g.filePath===t&&i.delete(ve(g))}if(m(Ct,s,!0),m(Se,i,!0),d&&es(n),Q){const g={};for(const k of s)g[k]=Dn(k);Me.dispatch(Js(Q,g))}}function ns(){m(wn,"expanded"),m(Se,new Set(e(we).filter(t=>!e(Ct).has(t.filePath)).map(t=>ve(t))),!0)}function rs(){m(wn,"collapsed"),m(Se,new Set,!0)}function ss(t){m(re,t,!0)}let Vn=Y(null),xt=Y(null),ct=Y(null),Et=Y(null),Ft=Y(void 0);Be(()=>{const t=e(ct),n=e(Et);if(!t||!n)return;const s=new Ao;return s.setup(t,n),m(Ft,s,!0),()=>{s.cleanUp(),e(Ft)===s&&m(Ft,void 0)}});const os=["[data-column-content]","[data-content] [data-line]","[data-content] [data-no-newline]","pre [data-line]"].join(","),Kn="rgba(255, 213, 0, 0.4)",is="rgba(59, 130, 246, 0.5)",Xt=16,as=150;let dt=Y(!1),ut=Y(""),it=Y(tt([])),Ye=Y(0),Yt=Y(null),Jt=Y(tt(new Set)),Zt=Y(null),Ut=null,ls=u(()=>{const t=e(re)&&e(lt)?e(lt).filter(n=>!n.hash||e(ot).has(n.hash)).flatMap(n=>n.changes.map(s=>ve(s))):e(we).map(n=>ve(n));return[e(re)?"grouped":"combined",t.join("|"),[...e(Se)].join("|"),[...e(st)].join("|")].join("::")});function jn(){const t=e(Et);return t?Array.from(t.querySelectorAll("diffs-container")).map(n=>n.shadowRoot).filter(n=>n!=null):[]}function cs(){const t=fo(e(xt),{extraRoots:jn()});t&&(m(ut,t,!0),m(Ye,0)),m(dt,!0),Ln().then(()=>{e(Yt)?.focus(),e(Yt)?.select()})}function qn(){en(),m(dt,!1),m(ut,""),Sn()}function Sn(){Gn(),m(it,[],!0),m(Ye,0),m(Jt,new Set,!0),m(Zt,null)}function en(){Ut!==null&&(clearTimeout(Ut),Ut=null)}function ds(t){if(en(),m(Ye,0),!e(dt)||!t.trim()){Sn();return}Ut=setTimeout(()=>{Ut=null,e(dt)&&e(ut).trim()&&us(e(ut))},as)}sr(en);function Gn(){const t=jn();for(const n of t)n.querySelectorAll(".all-changes-search-highlight").forEach(s=>{const i=s.parentNode;if(i){for(;s.firstChild;)i.insertBefore(s.firstChild,s);i.removeChild(s),i.normalize()}})}function us(t){Gn(),m(it,[],!0),m(Jt,new Set,!0),m(Zt,null),m(Ye,0);const n=t.trim(),s=e(Et);if(!n||!s)return;const i=[],o=new Set,d=n.toLowerCase();s.querySelectorAll("[data-change-card-key]").forEach(g=>{const k=g.querySelector("[data-change-header-key]"),W=k?.dataset.changeHeaderKey,L=k?.dataset.changeSearchText??"";k&&W&&vs(L,d)&&(o.add(W),i.push({element:k,headerKey:W})),g.querySelectorAll("diffs-container").forEach(se=>{const Ce=se.shadowRoot;Ce&&(hs(Ce).forEach(ae=>{gs(ae,n)}),Ce.querySelectorAll(".all-changes-search-highlight").forEach(ae=>{fs(ae)&&i.push({element:ae})}))})}),m(Jt,o,!0),m(it,i,!0),i.length>0&&Wt(0)}function hs(t){const n=Array.from(t.querySelectorAll(os)),s=[];for(const i of n)s.some(o=>o.contains(i))||s.push(i);return s}function gs(t,n){const s=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,{acceptNode(se){return se.textContent?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}}),i=[],o=n.toLowerCase();let d="",g;for(;g=s.nextNode();){const se=g.textContent||"";i.push({node:g,start:d.length,end:d.length+se.length}),d+=se}const k=d.toLowerCase(),W=[];let L=0;for(;(L=k.indexOf(o,L))!==-1;)W.push({start:L,end:L+n.length}),L+=n.length;for(let se=W.length-1;se>=0;se--){const Ce=Qn(i,W[se].start,!1),ae=Qn(i,W[se].end,!0);if(!Ce||!ae)continue;const ze=document.createRange();ze.setStart(Ce.node,Ce.offset),ze.setEnd(ae.node,ae.offset);const Je=document.createElement("span");Je.className="all-changes-search-highlight",Je.style.backgroundColor=Kn,Je.appendChild(ze.extractContents()),ze.insertNode(Je)}}function Qn(t,n,s){const i=s?[...t].reverse():t;for(const o of i)if(s?n>o.start&&n<=o.end:n>=o.start&&n<o.end)return{node:o.node,offset:n-o.start};return null}function fs(t){return Array.from(t.getClientRects()).some(n=>n.width>0&&n.height>0)}function Wt(t){if(e(it).length===0)return;e(it).forEach(s=>{s.element.classList.remove("all-changes-search-current"),s.headerKey||(s.element.style.backgroundColor=Kn)}),t<0&&(t=e(it).length-1),t>=e(it).length&&(t=0),m(Ye,t,!0);const n=e(it)[t];m(Zt,n.headerKey??null,!0),n.element.classList.add("all-changes-search-current"),n.headerKey||(n.element.style.backgroundColor=is),ms(n.element)}function ms(t){const n=e(ct);if(!n){t.scrollIntoView?.({behavior:"smooth",block:"center",inline:"nearest"});return}ps(t,n)}function ps(t,n){const s=t.getBoundingClientRect(),i=n.getBoundingClientRect(),o=s.top-i.top+n.scrollTop,d=s.left-i.left+n.scrollLeft,g=Math.max(0,o-n.clientHeight/2+s.height/2);let k=n.scrollLeft;s.left<i.left+Xt?k=Math.max(0,d-Xt):s.right>i.right-Xt&&(k=Math.max(0,d-n.clientWidth+s.width+Xt)),n.scrollTo({top:g,left:k,behavior:"smooth"})}function Xn(t){const n=e(dt)?e(ut).trim():"";if(!n)return[{text:t,isMatch:!1}];const s=t.toLowerCase(),i=n.toLowerCase(),o=[];let d=0,g=0;for(;(g=s.indexOf(i,d))!==-1;)g>d&&o.push({text:t.slice(d,g),isMatch:!1}),o.push({text:t.slice(g,g+n.length),isMatch:!0}),d=g+n.length;return d<t.length&&o.push({text:t.slice(d),isMatch:!1}),o.length>0?o:[{text:t,isMatch:!1}]}function vs(t,n){return[cr(t),In(t)].filter(Boolean).some(s=>s.toLowerCase().includes(n))}function Yn(t){if(!e(xt)||!t)return!1;if(e(xt).contains(t))return!0;const n=t.getRootNode();return n instanceof ShadowRoot&&e(xt).contains(n.host)}function Jn(t){return t.defaultPrevented?!1:t.composedPath().some(n=>n instanceof Node&&Yn(n))?!0:Yn(document.activeElement)}function _s(t){if((t.metaKey||t.ctrlKey)&&t.key==="f"){Jn(t)&&(t.preventDefault(),cs());return}e(dt)&&t.key==="Escape"&&Jn(t)&&(t.preventDefault(),qn())}function ws(t){(t.key==="F3"||t.key==="g"&&(t.ctrlKey||t.metaKey))&&(t.preventDefault(),t.shiftKey?Wt(e(Ye)-1):Wt(e(Ye)+1))}function bs(t){t.defaultPrevented||t.button!==0||t.target?.closest('button, input, textarea, select, a, [contenteditable="true"], diffs-container')||e(xt)?.focus({preventScroll:!0})}let Cn=0;Be(()=>{const t=e(dt),n=e(ut);e(ls),gt(()=>{if(!t||!n.trim()){Cn++,en(),Sn();return}const s=++Cn;Ln().then(()=>{s===Cn&&ds(n)})})});function ys(t){const n=D()?.agentId||ye();n&&Ue()?.(n,t)}function Ss(){if(!D()?.hash)return;const t=a(),n=t?.repositoryOwner,s=t?.repositoryName,i=t?.id;if(n&&s&&i){const o=`https://github.com/${n}/${s}/commit/${D().hash}`;wo(i).openTab({type:"browser",title:`${D().hash.substring(0,7)} · ${s}`,closable:!0,browserUrl:o,workspaceId:i})}}const Cs=u(()=>()=>{const t=a();return!!(D()?.hash&&t?.repositoryOwner&&t?.repositoryName)});function Zn(t){if(!t)return null;const n=t.match(/(?:\d+\+)?([^@]+)@users\.noreply\.github\.com/);return n?n[1]:null}function tn(t){if(!t)return"?";const n=t.trim().split(/\s+/);return n.length>=2?(n[0][0]+n[n.length-1][0]).toUpperCase():t[0]?.toUpperCase()||"?"}Be(()=>{const t=Q;if(!(!t||!(e(re)&&!Ge()&&!e(v))))return Me.dispatch(Ks(t,"history")),()=>Me.dispatch(js(t,"history"))});var xs={expandAll:ns,collapseAll:rs,setGroupByCommit:ss,get changes(){return Re()},set changes(t){Re(t),x()},get agentId(){return ye()},set agentId(t=null){ye(t),x()},get isAggregate(){return Fe()},set isAggregate(t=!1){Fe(t),x()},get onOpenAgent(){return Ue()},set onOpenAgent(t){Ue(t),x()},get showStagingControls(){return qe()},set showStagingControls(t=!1){qe(t),x()},get showCategoryFilter(){return $()},set showCategoryFilter(t=!1){$(t),x()},get onStage(){return ie()},set onStage(t){ie(t),x()},get onUnstage(){return De()},set onUnstage(t){De(t),x()},get onRevert(){return Le()},set onRevert(t){Le(t),x()},get onStageAll(){return jt()},set onStageAll(t){jt(t),x()},get onUnstageAll(){return qt()},set onUnstageAll(t){qt(t),x()},get isLoading(){return Lt()},set isLoading(t=!1){Lt(t),x()},get commitInfo(){return D()},set commitInfo(t=null){D(t),x()},get onOpenNote(){return Ht()},set onOpenNote(t){Ht(t),x()},get groupByCommit(){return He()},set groupByCommit(t=!1){He(t),x()},get branchBaseRef(){return wt()},set branchBaseRef(t=null){wt(t),x()},get branchBaseCommitSha(){return It()},set branchBaseCommitSha(t=null){It(t),x()},get gitRootId(){return Ge()},set gitRootId(t=void 0){Ge(t),x()},get gitRootPath(){return bt()},set gitRootPath(t=void 0){bt(t),x()},$set:un,$on:(t,n)=>hn(r,t,n)},Bt=wi();sn("keydown",Us,_s);var er=N(Bt);{var ks=t=>{var n=li(),s=de(n);z((i,o)=>K(s,`${i??""}
|
|
11
|
+
${o??""}`),[()=>l()?.checkpoint?P.agent_node_checkpoint_available({time:l().checkpoint.capturedAt}):P.agent_node_checkpoint_unavailable(),()=>P.agent_node_transcript_diff_notice()]),w(t,n)};M(er,t=>{e(yt)&&t(ks)})}var tr=S(er,2);{var Ps=t=>{{let n=u(()=>P.chat_changesPanel_findInChanges_placeholder());_o(t,{get placeholder(){return e(n)},get currentMatchIndex(){return e(Ye)},get totalMatches(){return e(it).length},emptyResultText:"No results",resultVariant:"muted",inputClass:"w-48",onKeydown:ws,onPrevious:()=>Wt(e(Ye)-1),onNext:()=>Wt(e(Ye)+1),onClose:qn,get query(){return e(ut)},set query(s){m(ut,s,!0)},get inputRef(){return e(Yt)},set inputRef(s){m(Yt,s,!0)}})}};M(tr,t=>{e(dt)&&t(Ps)})}var xn=S(tr,2),kn=N(xn),nr=N(kn);{var Rs=t=>{Te(t)};M(nr,t=>{D()&&t(Rs)})}var Ls=S(nr,2);{var Hs=t=>{var n=di();Pt(n,20,()=>Array(4),Hn,(s,i)=>{var o=ci(),d=N(o),g=N(d),k=N(g);Dt(k,{class:"h-4 w-4 rounded"});var W=S(k,2);Dt(W,{class:"h-4 w-48"}),H(g);var L=S(g,2);Dt(L,{class:"h-5 w-16 rounded-full"}),H(d);var se=S(d,2),Ce=N(se);Dt(Ce,{class:"h-3 w-full"});var ae=S(Ce,2);Dt(ae,{class:"h-3 w-5/6"});var ze=S(ae,2);Dt(ze,{class:"h-3 w-4/6"}),H(se),H(o),w(s,o)}),H(n),w(t,n)},Is=t=>{var n=ui(),s=de(n,!0);z(i=>K(s,i),[()=>P.chat_changesPanel_noChanges_label()]),w(t,n)},As=t=>{var n=_i(),s=ne(n),i=N(s),o=N(i),d=N(o),g=de(d,!0),k=S(d,2);pr(k,{get additions(){return e(Ur)},get deletions(){return e(Wr)},size:"xs",class:"opacity-80"});var W=S(k,2);{var L=te=>{var he=Sr(),xe=de(he,!0);z(be=>K(xe,be),[()=>e(Qt)===1?P.chat_changesPanel_commitCount_one({count:Rt(e(Qt))}):P.chat_changesPanel_commitCount_many({count:Rt(e(Qt))})]),w(te,he)};M(W,te=>{e(re)&&e(Qt)>0&&te(L)})}var se=S(W,2);{var Ce=te=>{var he=hi(),xe=S(ne(he),2),be=de(xe,!0);z(B=>K(be,B),[()=>P.chat_changesPanel_viewedCount_label({count:Rt(e($n))})]),w(te,he)};M(se,te=>{e($n)>0&&te(Ce)})}H(o);var ae=S(o,2),ze=N(ae);{var Je=te=>{var he=gi(),xe=N(he);{let B=u(()=>e(re)?"text-muted-foreground hover:text-foreground":"bg-background text-foreground shadow-sm");ke(xe,{type:"button",variant:"plain",get class(){return`px-2 py-0.5 text-xs rounded cursor-pointer transition-colors ${e(B)??""}`},onclick:()=>m(re,!1),children:(j,_)=>{Tt();var R=ft();z(O=>K(R,O),[()=>P.chat_changesPanel_combined_label()]),w(j,R)},$$slots:{default:!0}})}var be=S(xe,2);{let B=u(()=>e(re)?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground");ke(be,{type:"button",variant:"plain",get class(){return`px-2 py-0.5 text-xs rounded cursor-pointer transition-colors ${e(B)??""}`},onclick:()=>m(re,!0),children:(j,_)=>{Tt();var R=ft();z(O=>K(R,O),[()=>P.chat_changesPanel_byCommit_label()]),w(j,R)},$$slots:{default:!0}})}H(he),w(te,he)};M(ze,te=>{e(Br)&&!D()&&te(Je)})}H(ae),H(i),H(s);var kt=S(s,2),Ot=N(kt);{var ht=te=>{var he=nt(),xe=ne(he);Pt(xe,19,()=>e(lt),(be,B)=>be.hash||"working-"+B,(be,B)=>{var j=nt(),_=ne(j);{var R=X=>{const J=u(()=>Zn(e(B).authorEmail));var I=vi(),E=N(I),V=N(E),ge=N(V);ke(ge,{type:"button",variant:"plain",class:"flex items-center gap-2 flex-1 min-w-0 text-left cursor-pointer",onclick:()=>Qr(e(B).hash),children:(me,le)=>{var pe=fi(),Oe=ne(pe);{let et=u(()=>e(ot).has(e(B).hash)?dr:ur);Ne(Oe,{get icon(){return e(et)},class:"text-subtle w-2.5! h-2.5! shrink-0"})}var We=S(Oe,2),Pn=N(We);{var Os=et=>{{const nn=zs=>{Tt();var rr=ft();z(Ms=>K(rr,Ms),[()=>tn(e(B).author)]),w(zs,rr)};let Rn=u(()=>e(B).author||"");_r(et,{get identity(){return e(J)},get alt(){return e(Rn)},size:20,class:"w-full h-full object-cover",fallback:nn,$$slots:{fallback:!0}})}},Ns=et=>{var nn=ft();z(Rn=>K(nn,Rn),[()=>tn(e(B).author)]),w(et,nn)};M(Pn,et=>{e(J)?et(Os):et(Ns,-1)})}H(We);var Ts=S(We,2),Ds=de(Ts,!0);z(et=>{Ve(We,"title",e(B).author||""),K(Ds,et)},[()=>e(B).message.split(`
|
|
12
|
+
`)[0]]),w(me,pe)},$$slots:{default:!0}});var fe=S(ge,2),U=N(fe);{var Z=me=>{var le=mi(),pe=ne(le),Oe=de(pe,!0);Tt(2),z(We=>K(Oe,We),[()=>wr(e(B).date)]),w(me,le)};M(U,me=>{e(B).date&&me(Z)})}var Ie=S(U,2),ee=de(Ie,!0);H(fe);var ce=S(fe,2);{let me=u(()=>P.chat_changesPanel_openCommit_title());ke(ce,{type:"button",variant:"ghost-light",size:"icon-xs",iconOnly:!0,class:"text-ui text-muted-foreground hover:text-foreground transition-colors cursor-pointer shrink-0",onclick:()=>yn(e(B).hash),get title(){return e(me)},children:(le,pe)=>{Ne(le,{get icon(){return An},class:"w-2.5 h-2.5"})},$$slots:{default:!0}})}H(V),H(E);var Ae=S(E,2);{var Ee=me=>{var le=pi();Pt(le,21,()=>e(B).changes,pe=>ve(pe),(pe,Oe)=>{ue(pe,()=>e(Oe),()=>!0)}),H(le),cn(3,le,()=>vr,()=>({tier:"fast"})),w(me,le)},Ze=u(()=>e(ot).has(e(B).hash));M(Ae,me=>{e(Ze)&&me(Ee)})}H(I),z(me=>K(ee,me),[()=>e(B).changes.length===1?P.chat_changesPanel_fileCount_one({count:Rt(e(B).changes.length)}):P.chat_changesPanel_fileCount_many({count:Rt(e(B).changes.length)})]),w(X,I)},O=X=>{var J=nt(),I=ne(J);Pt(I,17,()=>e(B).changes,E=>ve(E),(E,V)=>{ue(E,()=>e(V),()=>!1)}),w(X,J)};M(_,X=>{e(B).hash?X(R):X(O,-1)})}w(be,j)}),w(te,he)},Nt=te=>{var he=nt(),xe=ne(he);Pt(xe,17,()=>e(we),be=>be.filePath+"-"+(be.commitHash||"working"),(be,B)=>{ue(be,()=>e(B))}),w(te,he)};M(Ot,te=>{e(re)&&e(lt)?te(ht):te(Nt,-1)})}H(kt),z(te=>K(g,te),[()=>e(bn)===1?P.chat_changesPanel_filesChanged_one({count:Rt(e(bn))}):P.chat_changesPanel_filesChanged_many({count:Rt(e(bn))})]),w(t,n)};M(Ls,t=>{e(Or)?t(Hs):e(we).length===0?t(Is,1):t(As,-1)})}H(kn),on(kn,t=>m(Et,t),()=>e(Et)),H(xn),on(xn,t=>m(ct,t),()=>e(ct)),H(Bt),on(Bt,t=>m(xt,t),()=>e(xt)),ln("pointerdown",Bt,bs),w(f,Bt);var Es=fn(xs);return oe(),Es}xr(["click","pointerdown"]);export{bi as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as _t,bq as _,a_ as D,by as mt,bs as gt,b as vt,bo as x,bu as be,bt as Te}from"./7rNOGHzs.js";import{bs as ht,cd as yt,ca as wt,bk as xt,a7 as N,ay as m,W as r,bn as kt,aA as g,aD as t,bS as z,a5 as _e,bH as Le,bA as me,b_ as M,aB as E,c9 as o,bf as It,bl as oe,bO as ae,bV as Ct}from"./B8o4lNgr.js";import{k as $t,h as Pt,s as Be,c as At}from"./DmsDslNo.js";import{s as Me}from"./CQ4a5a4v.js";import{c as S}from"./CiENRH6A.js";import{cF as Et,bl as Ot,aK as Ft,F as ne,aX as Tt,aL as Lt,bm as Bt,a7 as qe,av as Dt}from"./CFejQM6t.js";import{W as Nt,T as zt,G as St,C as Rt,X as Ht,J as Wt,V as Mt}from"./CuLyvgLV.js";import{f as ge}from"./Bgegixo2.js";import{i as qt}from"./t3bi-ExW.js";import{n as Vt,R as Gt,r as jt,q as Kt,p as Xt,o as Ve}from"./DSjRkndX.js";import{n as ve}from"./lfJ8pseq.js";import{c as Jt}from"./ChTqQfQN.js";import"./D-cnPaTJ.js";import{Hq as Ge,mq as Ut,Ef as Yt}from"./CRwmdgt6.js";import{v as Qt}from"./DCaHy20k.js";import{i as J}from"./BkBdyRjM.js";import{bn as Zt,b4 as er,b2 as tr}from"./DUkegami.js";import{ck as rr}from"./KQTrHxko.js";import{t as or}from"./H2jLkRRS.js";const ar={cursor:Rt,ghostty:St,terminal:zt,warp:Nt},nr={vscode:Mt,jetbrains:Wt,xcode:Ht};function sr(O){return ar[O.id]??nr[O.handlerType]??null}function je(O){return O==="terminal"?Et:O==="finder"?Ot:Ft}const ir="shrink-0 text-muted-foreground hover:text-foreground focus-visible:text-foreground [&_svg]:size-4",De="finder",lr={id:De,name:"Finder",shortLabel:"Finder",appName:"Finder",category:"finder",handlerType:"finder",installed:!0,priority:0};function cr(O,s=[]){const se=new Set(s),U=O.filter(({installed:Y,id:ye})=>Y&&!se.has(ye));return U.some(({id:Y})=>Y===De)||se.has(De)?U:[...U,lr]}var dr=E('<img alt="" class="size-4"/>'),ur=E('<kbd class="type-caption ml-4 text-muted-foreground" aria-hidden="true"> </kbd>'),pr=E('<span class="min-w-0 flex-1 truncate"> </span> <!>',1),fr=E("<span> </span>"),he=E("<!> <!>",1),br=E("<span><!></span>"),_r=E('<img class="w-4 h-4"/>'),mr=E('<!> <span class="text-muted-foreground"> </span>',1),gr=E('<div class="inline-flex items-stretch rounded-md border border-border" data-open-combo-control=""><!> <!></div>'),vr=E('<div class="type-caption px-2 py-1.5 text-subtle"> </div>'),hr=E('<div class="w-60 max-w-full"><!> <!> <!></div>'),yr=E("<div><!></div>");function wr(O,s){if(new.target)return _t({component:wr,...O});ht(s,!0);const se=()=>be(Je,"$installedEditors$",ie),U=()=>be(Ue,"$hiddenEditorIds$",ie),Y=()=>be(Ye,"$isWorkspaceHostLocal$",ie),ye=()=>be(Xe,"$openAction",ie),[ie,Ke]=gt(),le=(e,d=It)=>{var u=N(),p=m(u);S(p,()=>Gt,(te,G)=>{G(te,{get value(){return t(v).id},children:(F,B)=>{var I=N(),T=m(I);Pt(T,17,d,C=>C.id,(C,c)=>{var j=N(),h=m(j);{const $=a=>{var i=N(),y=m(i);{var H=l=>{var A=dr();M(()=>Be(A,"src",`data:image/png;base64,${t(c).iconBase64??""}`)),r(l,A)},b=l=>{const A=o(()=>t(c).icon);var W=N(),L=m(W);S(L,()=>t(A),(K,re)=>{re(K,{size:16})}),r(l,W)},P=l=>{{let A=o(()=>t(c).faIcon??je(t(c).category));ne(l,{get icon(){return t(A)},class:"size-4 text-muted-foreground"})}};D(y,l=>{t(c).iconBase64?l(H):t(c).icon?l(b,1):l(P,-1)})}r(a,i)};let n=o(()=>!k());S(h,()=>Vt,(a,i)=>{i(a,{get value(){return t(c).id},closeOnSelect:!0,get disabled(){return t(n)},onSelect:()=>tt(t(c).id),get textValue(){return t(c).label},leading:$,children:(y,H)=>{var b=pr(),P=m(b),l=oe(P,!0),A=z(P,2);{var W=L=>{var K=ur(),re=oe(K,!0);M(()=>ae(re,t(c).shortcut)),r(L,K)};D(A,L=>{t(c).shortcut&&L(W)})}M(()=>ae(l,t(c).label)),r(y,b)},$$slots:{leading:!0,default:!0}})})}r(C,j)}),r(F,I)},$$slots:{default:!0}})}),r(e,u)},Ne=Jt("OpenComboButton");let k=_(s,"filePath",7),ce=_(s,"workspaceId",7,""),de=_(s,"isDirectory",7,!0),we=_(s,"workspaceFolderPath",7),xe=_(s,"class",7,""),ue=_(s,"headerText",7),ke=_(s,"usePortal",7,!0),Ie=_(s,"side",7,"bottom"),q=_(s,"variant",7,"default"),Q=_(s,"branchName",7),Ce=_(s,"compact",7,!1),$e=_(s,"embedded",7,!1),Z=_(s,"inline",7,!1),V=_(s,"iconOnly",7,!1),R=_(s,"children",7,void 0);const ze=o(()=>q()==="sidebar"?"bg-sidebar hover:bg-sidebar/80":"bg-background hover:bg-muted"),Pe=yt(ce());wt(()=>{Pe.set(ce())});const Xe=Zt(),Je=er(Pe),Ue=tr(),Ye=rr(Pe);let ee=Ct(!1);xt(()=>{Ge.dispatch(Ut())});function Qe(e){return{id:e.id,label:e.name,shortLabel:e.shortLabel,icon:sr(e),shortcut:e.shortcut,handlerType:e.handlerType,appName:e.appName,category:e.category,iconBase64:e.iconBase64}}const Ze=Qt("externalEditors");let f=o(()=>{const e=se(),d=cr(e,U()).map(Qe),u={id:"other",label:x.ui_openCombo_other_label(),shortLabel:x.ui_openCombo_other_label(),icon:null,faIcon:Bt,handlerType:"generic"},p=[{id:"copy",label:x.ui_openCombo_copyPath_label(),shortLabel:x.ui_openCombo_copy_shortLabel(),icon:null,faIcon:Tt},...Q()?[{id:"copy-branch",label:x.ui_openCombo_copyBranch_label(),shortLabel:x.ui_openCombo_copyBranch_shortLabel(),icon:null,faIcon:Lt}]:[]];return!Ze||!Y()?p:[...d,u,...p]});const pe=o(()=>t(f).some(e=>e.id!=="copy"&&e.id!=="copy-branch")),fe=o(()=>t(f).filter(e=>e.id!=="copy"&&e.id!=="copy-branch")),Se=o(()=>t(f).filter(e=>e.id==="copy"||e.id==="copy-branch")),v=o(()=>t(pe)?t(f).find(e=>e.id===ye())||t(f)[0]:t(f).find(e=>e.id==="copy")||t(f)[0]),Ae=o(()=>t(pe)?x.ui_openCombo_openIn_tooltip({name:t(v).label}):t(v).label);function Ee(){if(de())return k();const e=we()||k().substring(0,k().lastIndexOf("/"));return e?{folder:e,file:k()}:k()}async function Oe(e){if(!k())return;const d=de()?k():k().substring(0,k().lastIndexOf("/"));try{if(e==="copy"){await navigator.clipboard.writeText(or(k())),ve.success(x.ui_openCombo_pathCopied_label());return}if(e==="copy-branch"){Q()&&(await navigator.clipboard.writeText(Q()),ve.success(x.ui_openCombo_branchCopied_label()));return}if(e==="other"){const p=await J("external-editors:open-with-other",{path:d});p?.success?Le(ee,!1):p?.error&&p.error!=="No application selected"&&ve.error(p.error);return}const u=t(f).find(p=>p.id===e);if(!u){Ne.warn(`Unknown action: ${e}`);return}switch(u.handlerType){case"finder":await J("shell:showItemInFolder",{path:d});break;case"vscode":await J("vscode:open",Ee());break;case"jetbrains":await J("jetbrains:open",Ee());break;case"xcode":await J("xcode:open",Ee());break;case"generic":default:{await J("external-editors:open",{editorId:u.id,path:d});break}}}catch(u){Ne.error(`Failed to execute action ${e}:`,u),ve.error(u instanceof Error?u.message:x.ui_openCombo_openFailed_error({name:e}))}}function Fe(e){e.stopPropagation(),Oe(t(v).id)}function et(e){e.key!=="Enter"&&e.key!==" "||(e.preventDefault(),e.stopPropagation(),Oe(t(v).id))}function Re(e){e.stopPropagation()}function tt(e){Ge.dispatch(Yt(e)),Oe(e),Le(ee,!1)}var rt={get filePath(){return k()},set filePath(e){k(e),g()},get workspaceId(){return ce()},set workspaceId(e=""){ce(e),g()},get isDirectory(){return de()},set isDirectory(e=!0){de(e),g()},get workspaceFolderPath(){return we()},set workspaceFolderPath(e){we(e),g()},get class(){return xe()},set class(e=""){xe(e),g()},get headerText(){return ue()},set headerText(e){ue(e),g()},get usePortal(){return ke()},set usePortal(e=!0){ke(e),g()},get side(){return Ie()},set side(e="bottom"){Ie(e),g()},get variant(){return q()},set variant(e="default"){q(e),g()},get branchName(){return Q()},set branchName(e){Q(e),g()},get compact(){return Ce()},set compact(e=!1){Ce(e),g()},get embedded(){return $e()},set embedded(e=!1){$e(e),g()},get inline(){return Z()},set inline(e=!1){Z(e),g()},get iconOnly(){return V()},set iconOnly(e=!1){V(e),g()},get children(){return R()},set children(e=void 0){R(e),g()},$set:mt,$on:(e,d)=>vt(s,e,d)},He=N(),ot=m(He);{var at=e=>{var d=he(),u=m(d);{var p=G=>{var F=he(),B=m(F);S(B,()=>Xt,(T,C)=>{C(T,{children:(c,j)=>{var h=he(),$=m(h);S($,()=>jt,(a,i)=>{i(a,{get icon(){return qe},children:(y,H)=>{var b=fr(),P=oe(b,!0);M(l=>ae(P,l),[()=>x.ui_openCombo_openInApp_tooltip()]),r(y,b)},$$slots:{default:!0}})});var n=z($,2);S(n,()=>Kt,(a,i)=>{i(a,{class:"w-60",children:(y,H)=>{le(y,()=>t(fe))},$$slots:{default:!0}})}),r(c,h)},$$slots:{default:!0}})});var I=z(B,2);S(I,()=>Ve,(T,C)=>{C(T,{})}),r(G,F)};D(u,G=>{t(fe).length&&G(p)})}var te=z(u,2);le(te,()=>t(Se)),r(e,d)},nt=e=>{var d=yr(),u=_e(d);{const p=(F,B)=>{let I=()=>(B?.()).props;var T=N(),C=m(T);{var c=n=>{var a=br();At(a,()=>({role:"button",tabindex:"0",onclick:t(f).length>1?void 0:Fe,onkeydown:t(f).length>1?void 0:et,...t(f).length>1?I():{},class:"cursor-pointer break-words rounded-sm text-inherit underline decoration-muted-foreground/20 underline-offset-2 hover:decoration-current focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",title:t(Ae)}));var i=_e(a);Me(i,R),me(a),r(n,a)},j=n=>{{let a=o(()=>t(f).length>1?void 0:Fe),i=o(()=>V()&&q()!=="sidebar"?"plain":"ghost"),y=o(()=>V()?q()==="sidebar"?"icon-compact":"icon-sm":void 0),H=o(()=>V()&&q()==="sidebar"&&t(ee)),b=o(()=>!V()),P=o(()=>V()?q()==="sidebar"?ir:"cursor-pointer text-muted-foreground hover:text-foreground focus-visible:text-foreground":"cursor-pointer");ge(n,Te({type:"button",get onclick(){return t(a)}},()=>t(f).length>1?I():{},{get variant(){return t(i)},get size(){return t(y)},get active(){return t(H)},get wrapContent(){return t(b)},get class(){return t(P)},get title(){return t(Ae)},children:(l,A)=>{var W=N(),L=m(W);Me(L,R),r(l,W)},$$slots:{default:!0}}))}},h=n=>{{let a=o(()=>x.ui_openCombo_openInApp_tooltip());ge(n,Te(I,{variant:"ghost-light",size:"icon-xs",get tooltip(){return t(a)},tooltipSide:"bottom",children:(i,y)=>{ne(i,{get icon(){return qe},size:"xs"})},$$slots:{default:!0}}))}},$=n=>{var a=gr(),i=_e(a);{let b=o(()=>t(f).length>1?"rounded-r-none":""),P=o(()=>t(ze)),l=o(()=>t(pe)?t(Ae):void 0);ge(i,{type:"button",variant:"ghost",size:"sm",get class(){return`gap-1.5 px-2 ${t(b)??""} ${t(P)??""}`},onpointerdown:Re,onkeydown:Re,onclick:Fe,get title(){return t(l)},children:(A,W)=>{var L=mr(),K=m(L);{var re=w=>{var X=_r();M(()=>{Be(X,"src",`data:image/png;base64,${t(v).iconBase64??""}`),Be(X,"alt",t(v).label)}),r(w,X)},it=w=>{const X=o(()=>t(v).icon);var We=N(),pt=m(We);S(pt,()=>t(X),(ft,bt)=>{bt(ft,{size:14})}),r(w,We)},lt=w=>{ne(w,{get icon(){return t(v).faIcon},class:"w-3.5 h-3.5 opacity-60"})},ct=w=>{{let X=o(()=>je(t(v).category));ne(w,{get icon(){return t(X)},class:"w-3.5 h-3.5 opacity-60"})}};D(K,w=>{t(v).iconBase64?w(re):t(v).icon?w(it,1):t(v).faIcon?w(lt,2):w(ct,-1)})}var dt=z(K,2),ut=oe(dt,!0);M(w=>ae(ut,w),[()=>t(pe)?x.ui_openCombo_open_label():t(v).label]),r(A,L)},$$slots:{default:!0}})}var y=z(i,2);{var H=b=>{{let P=o(()=>x.ui_openCombo_openInApp_tooltip());ge(b,Te(I,{type:"button",variant:"ghost",size:"icon-sm",get"aria-label"(){return t(P)},get class(){return`rounded-l-none border-l border-border ${t(ze)??""}`},children:(l,A)=>{ne(l,{get icon(){return Dt},class:"size-3! text-muted-foreground"})},$$slots:{default:!0}}))}};D(y,b=>{t(f).length>1&&b(H)})}me(a),r(n,a)};D(C,n=>{Z()&&R()?n(c):R()?n(j,1):Ce()?n(h,2):n($,-1)})}r(F,T)},te=F=>{var B=hr(),I=_e(B);{var T=h=>{var $=vr(),n=oe($,!0);M(()=>ae(n,ue())),r(h,$)};D(I,h=>{ue()&&h(T)})}var C=z(I,2);{var c=h=>{var $=he(),n=m($);le(n,()=>t(fe));var a=z(n,2);S(a,()=>Ve,(i,y)=>{y(i,{})}),r(h,$)};D(C,h=>{t(fe).length&&h(c)})}var j=z(C,2);le(j,()=>t(Se)),me(B),r(F,B)};let G=o(()=>Z()&&R()?"contents!":"");qt(u,{align:"end",get portal(){return ke()},get side(){return Ie()},get class(){return t(G)},get open(){return t(ee)},set open(F){Le(ee,F,!0)},trigger:p,content:te,$$slots:{trigger:!0,content:!0}})}me(d),M(()=>$t(d,1,`${Z()&&R()?"contents":"inline-flex items-center"} ${xe()??""}`)),r(e,d)};D(ot,e=>{$e()?e(at):e(nt,-1)})}r(O,He);var st=kt(rt);return Ke(),st}export{wr as O,sr as a,je as r,ir as s};
|
|
1
|
+
import{t as _t,bq as _,a_ as D,by as mt,bs as gt,b as vt,bo as x,bu as be,bt as Te}from"./7rNOGHzs.js";import{bs as ht,cd as yt,ca as wt,bk as xt,a7 as N,ay as m,W as r,bn as kt,aA as g,aD as t,bS as z,a5 as _e,bH as Le,bA as me,b_ as M,aB as E,c9 as o,bf as It,bl as oe,bO as ae,bV as Ct}from"./B8o4lNgr.js";import{k as $t,h as Pt,s as Be,c as At}from"./DmsDslNo.js";import{s as Me}from"./CQ4a5a4v.js";import{c as S}from"./CiENRH6A.js";import{cF as Et,bl as Ot,aK as Ft,F as ne,aX as Tt,aL as Lt,bm as Bt,a7 as qe,av as Dt}from"./CFejQM6t.js";import{W as Nt,T as zt,G as St,C as Rt,X as Ht,J as Wt,V as Mt}from"./CuLyvgLV.js";import{f as ge}from"./Bgegixo2.js";import{i as qt}from"./O86272iX.js";import{n as Vt,R as Gt,r as jt,q as Kt,p as Xt,o as Ve}from"./DSjRkndX.js";import{n as ve}from"./lfJ8pseq.js";import{c as Jt}from"./ChTqQfQN.js";import"./D-cnPaTJ.js";import{Hq as Ge,mq as Ut,Ef as Yt}from"./CRwmdgt6.js";import{v as Qt}from"./DCaHy20k.js";import{i as J}from"./BkBdyRjM.js";import{bn as Zt,b4 as er,b2 as tr}from"./BRp0P9cF.js";import{ck as rr}from"./KQTrHxko.js";import{t as or}from"./H2jLkRRS.js";const ar={cursor:Rt,ghostty:St,terminal:zt,warp:Nt},nr={vscode:Mt,jetbrains:Wt,xcode:Ht};function sr(O){return ar[O.id]??nr[O.handlerType]??null}function je(O){return O==="terminal"?Et:O==="finder"?Ot:Ft}const ir="shrink-0 text-muted-foreground hover:text-foreground focus-visible:text-foreground [&_svg]:size-4",De="finder",lr={id:De,name:"Finder",shortLabel:"Finder",appName:"Finder",category:"finder",handlerType:"finder",installed:!0,priority:0};function cr(O,s=[]){const se=new Set(s),U=O.filter(({installed:Y,id:ye})=>Y&&!se.has(ye));return U.some(({id:Y})=>Y===De)||se.has(De)?U:[...U,lr]}var dr=E('<img alt="" class="size-4"/>'),ur=E('<kbd class="type-caption ml-4 text-muted-foreground" aria-hidden="true"> </kbd>'),pr=E('<span class="min-w-0 flex-1 truncate"> </span> <!>',1),fr=E("<span> </span>"),he=E("<!> <!>",1),br=E("<span><!></span>"),_r=E('<img class="w-4 h-4"/>'),mr=E('<!> <span class="text-muted-foreground"> </span>',1),gr=E('<div class="inline-flex items-stretch rounded-md border border-border" data-open-combo-control=""><!> <!></div>'),vr=E('<div class="type-caption px-2 py-1.5 text-subtle"> </div>'),hr=E('<div class="w-60 max-w-full"><!> <!> <!></div>'),yr=E("<div><!></div>");function wr(O,s){if(new.target)return _t({component:wr,...O});ht(s,!0);const se=()=>be(Je,"$installedEditors$",ie),U=()=>be(Ue,"$hiddenEditorIds$",ie),Y=()=>be(Ye,"$isWorkspaceHostLocal$",ie),ye=()=>be(Xe,"$openAction",ie),[ie,Ke]=gt(),le=(e,d=It)=>{var u=N(),p=m(u);S(p,()=>Gt,(te,G)=>{G(te,{get value(){return t(v).id},children:(F,B)=>{var I=N(),T=m(I);Pt(T,17,d,C=>C.id,(C,c)=>{var j=N(),h=m(j);{const $=a=>{var i=N(),y=m(i);{var H=l=>{var A=dr();M(()=>Be(A,"src",`data:image/png;base64,${t(c).iconBase64??""}`)),r(l,A)},b=l=>{const A=o(()=>t(c).icon);var W=N(),L=m(W);S(L,()=>t(A),(K,re)=>{re(K,{size:16})}),r(l,W)},P=l=>{{let A=o(()=>t(c).faIcon??je(t(c).category));ne(l,{get icon(){return t(A)},class:"size-4 text-muted-foreground"})}};D(y,l=>{t(c).iconBase64?l(H):t(c).icon?l(b,1):l(P,-1)})}r(a,i)};let n=o(()=>!k());S(h,()=>Vt,(a,i)=>{i(a,{get value(){return t(c).id},closeOnSelect:!0,get disabled(){return t(n)},onSelect:()=>tt(t(c).id),get textValue(){return t(c).label},leading:$,children:(y,H)=>{var b=pr(),P=m(b),l=oe(P,!0),A=z(P,2);{var W=L=>{var K=ur(),re=oe(K,!0);M(()=>ae(re,t(c).shortcut)),r(L,K)};D(A,L=>{t(c).shortcut&&L(W)})}M(()=>ae(l,t(c).label)),r(y,b)},$$slots:{leading:!0,default:!0}})})}r(C,j)}),r(F,I)},$$slots:{default:!0}})}),r(e,u)},Ne=Jt("OpenComboButton");let k=_(s,"filePath",7),ce=_(s,"workspaceId",7,""),de=_(s,"isDirectory",7,!0),we=_(s,"workspaceFolderPath",7),xe=_(s,"class",7,""),ue=_(s,"headerText",7),ke=_(s,"usePortal",7,!0),Ie=_(s,"side",7,"bottom"),q=_(s,"variant",7,"default"),Q=_(s,"branchName",7),Ce=_(s,"compact",7,!1),$e=_(s,"embedded",7,!1),Z=_(s,"inline",7,!1),V=_(s,"iconOnly",7,!1),R=_(s,"children",7,void 0);const ze=o(()=>q()==="sidebar"?"bg-sidebar hover:bg-sidebar/80":"bg-background hover:bg-muted"),Pe=yt(ce());wt(()=>{Pe.set(ce())});const Xe=Zt(),Je=er(Pe),Ue=tr(),Ye=rr(Pe);let ee=Ct(!1);xt(()=>{Ge.dispatch(Ut())});function Qe(e){return{id:e.id,label:e.name,shortLabel:e.shortLabel,icon:sr(e),shortcut:e.shortcut,handlerType:e.handlerType,appName:e.appName,category:e.category,iconBase64:e.iconBase64}}const Ze=Qt("externalEditors");let f=o(()=>{const e=se(),d=cr(e,U()).map(Qe),u={id:"other",label:x.ui_openCombo_other_label(),shortLabel:x.ui_openCombo_other_label(),icon:null,faIcon:Bt,handlerType:"generic"},p=[{id:"copy",label:x.ui_openCombo_copyPath_label(),shortLabel:x.ui_openCombo_copy_shortLabel(),icon:null,faIcon:Tt},...Q()?[{id:"copy-branch",label:x.ui_openCombo_copyBranch_label(),shortLabel:x.ui_openCombo_copyBranch_shortLabel(),icon:null,faIcon:Lt}]:[]];return!Ze||!Y()?p:[...d,u,...p]});const pe=o(()=>t(f).some(e=>e.id!=="copy"&&e.id!=="copy-branch")),fe=o(()=>t(f).filter(e=>e.id!=="copy"&&e.id!=="copy-branch")),Se=o(()=>t(f).filter(e=>e.id==="copy"||e.id==="copy-branch")),v=o(()=>t(pe)?t(f).find(e=>e.id===ye())||t(f)[0]:t(f).find(e=>e.id==="copy")||t(f)[0]),Ae=o(()=>t(pe)?x.ui_openCombo_openIn_tooltip({name:t(v).label}):t(v).label);function Ee(){if(de())return k();const e=we()||k().substring(0,k().lastIndexOf("/"));return e?{folder:e,file:k()}:k()}async function Oe(e){if(!k())return;const d=de()?k():k().substring(0,k().lastIndexOf("/"));try{if(e==="copy"){await navigator.clipboard.writeText(or(k())),ve.success(x.ui_openCombo_pathCopied_label());return}if(e==="copy-branch"){Q()&&(await navigator.clipboard.writeText(Q()),ve.success(x.ui_openCombo_branchCopied_label()));return}if(e==="other"){const p=await J("external-editors:open-with-other",{path:d});p?.success?Le(ee,!1):p?.error&&p.error!=="No application selected"&&ve.error(p.error);return}const u=t(f).find(p=>p.id===e);if(!u){Ne.warn(`Unknown action: ${e}`);return}switch(u.handlerType){case"finder":await J("shell:showItemInFolder",{path:d});break;case"vscode":await J("vscode:open",Ee());break;case"jetbrains":await J("jetbrains:open",Ee());break;case"xcode":await J("xcode:open",Ee());break;case"generic":default:{await J("external-editors:open",{editorId:u.id,path:d});break}}}catch(u){Ne.error(`Failed to execute action ${e}:`,u),ve.error(u instanceof Error?u.message:x.ui_openCombo_openFailed_error({name:e}))}}function Fe(e){e.stopPropagation(),Oe(t(v).id)}function et(e){e.key!=="Enter"&&e.key!==" "||(e.preventDefault(),e.stopPropagation(),Oe(t(v).id))}function Re(e){e.stopPropagation()}function tt(e){Ge.dispatch(Yt(e)),Oe(e),Le(ee,!1)}var rt={get filePath(){return k()},set filePath(e){k(e),g()},get workspaceId(){return ce()},set workspaceId(e=""){ce(e),g()},get isDirectory(){return de()},set isDirectory(e=!0){de(e),g()},get workspaceFolderPath(){return we()},set workspaceFolderPath(e){we(e),g()},get class(){return xe()},set class(e=""){xe(e),g()},get headerText(){return ue()},set headerText(e){ue(e),g()},get usePortal(){return ke()},set usePortal(e=!0){ke(e),g()},get side(){return Ie()},set side(e="bottom"){Ie(e),g()},get variant(){return q()},set variant(e="default"){q(e),g()},get branchName(){return Q()},set branchName(e){Q(e),g()},get compact(){return Ce()},set compact(e=!1){Ce(e),g()},get embedded(){return $e()},set embedded(e=!1){$e(e),g()},get inline(){return Z()},set inline(e=!1){Z(e),g()},get iconOnly(){return V()},set iconOnly(e=!1){V(e),g()},get children(){return R()},set children(e=void 0){R(e),g()},$set:mt,$on:(e,d)=>vt(s,e,d)},He=N(),ot=m(He);{var at=e=>{var d=he(),u=m(d);{var p=G=>{var F=he(),B=m(F);S(B,()=>Xt,(T,C)=>{C(T,{children:(c,j)=>{var h=he(),$=m(h);S($,()=>jt,(a,i)=>{i(a,{get icon(){return qe},children:(y,H)=>{var b=fr(),P=oe(b,!0);M(l=>ae(P,l),[()=>x.ui_openCombo_openInApp_tooltip()]),r(y,b)},$$slots:{default:!0}})});var n=z($,2);S(n,()=>Kt,(a,i)=>{i(a,{class:"w-60",children:(y,H)=>{le(y,()=>t(fe))},$$slots:{default:!0}})}),r(c,h)},$$slots:{default:!0}})});var I=z(B,2);S(I,()=>Ve,(T,C)=>{C(T,{})}),r(G,F)};D(u,G=>{t(fe).length&&G(p)})}var te=z(u,2);le(te,()=>t(Se)),r(e,d)},nt=e=>{var d=yr(),u=_e(d);{const p=(F,B)=>{let I=()=>(B?.()).props;var T=N(),C=m(T);{var c=n=>{var a=br();At(a,()=>({role:"button",tabindex:"0",onclick:t(f).length>1?void 0:Fe,onkeydown:t(f).length>1?void 0:et,...t(f).length>1?I():{},class:"cursor-pointer break-words rounded-sm text-inherit underline decoration-muted-foreground/20 underline-offset-2 hover:decoration-current focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",title:t(Ae)}));var i=_e(a);Me(i,R),me(a),r(n,a)},j=n=>{{let a=o(()=>t(f).length>1?void 0:Fe),i=o(()=>V()&&q()!=="sidebar"?"plain":"ghost"),y=o(()=>V()?q()==="sidebar"?"icon-compact":"icon-sm":void 0),H=o(()=>V()&&q()==="sidebar"&&t(ee)),b=o(()=>!V()),P=o(()=>V()?q()==="sidebar"?ir:"cursor-pointer text-muted-foreground hover:text-foreground focus-visible:text-foreground":"cursor-pointer");ge(n,Te({type:"button",get onclick(){return t(a)}},()=>t(f).length>1?I():{},{get variant(){return t(i)},get size(){return t(y)},get active(){return t(H)},get wrapContent(){return t(b)},get class(){return t(P)},get title(){return t(Ae)},children:(l,A)=>{var W=N(),L=m(W);Me(L,R),r(l,W)},$$slots:{default:!0}}))}},h=n=>{{let a=o(()=>x.ui_openCombo_openInApp_tooltip());ge(n,Te(I,{variant:"ghost-light",size:"icon-xs",get tooltip(){return t(a)},tooltipSide:"bottom",children:(i,y)=>{ne(i,{get icon(){return qe},size:"xs"})},$$slots:{default:!0}}))}},$=n=>{var a=gr(),i=_e(a);{let b=o(()=>t(f).length>1?"rounded-r-none":""),P=o(()=>t(ze)),l=o(()=>t(pe)?t(Ae):void 0);ge(i,{type:"button",variant:"ghost",size:"sm",get class(){return`gap-1.5 px-2 ${t(b)??""} ${t(P)??""}`},onpointerdown:Re,onkeydown:Re,onclick:Fe,get title(){return t(l)},children:(A,W)=>{var L=mr(),K=m(L);{var re=w=>{var X=_r();M(()=>{Be(X,"src",`data:image/png;base64,${t(v).iconBase64??""}`),Be(X,"alt",t(v).label)}),r(w,X)},it=w=>{const X=o(()=>t(v).icon);var We=N(),pt=m(We);S(pt,()=>t(X),(ft,bt)=>{bt(ft,{size:14})}),r(w,We)},lt=w=>{ne(w,{get icon(){return t(v).faIcon},class:"w-3.5 h-3.5 opacity-60"})},ct=w=>{{let X=o(()=>je(t(v).category));ne(w,{get icon(){return t(X)},class:"w-3.5 h-3.5 opacity-60"})}};D(K,w=>{t(v).iconBase64?w(re):t(v).icon?w(it,1):t(v).faIcon?w(lt,2):w(ct,-1)})}var dt=z(K,2),ut=oe(dt,!0);M(w=>ae(ut,w),[()=>t(pe)?x.ui_openCombo_open_label():t(v).label]),r(A,L)},$$slots:{default:!0}})}var y=z(i,2);{var H=b=>{{let P=o(()=>x.ui_openCombo_openInApp_tooltip());ge(b,Te(I,{type:"button",variant:"ghost",size:"icon-sm",get"aria-label"(){return t(P)},get class(){return`rounded-l-none border-l border-border ${t(ze)??""}`},children:(l,A)=>{ne(l,{get icon(){return Dt},class:"size-3! text-muted-foreground"})},$$slots:{default:!0}}))}};D(y,b=>{t(f).length>1&&b(H)})}me(a),r(n,a)};D(C,n=>{Z()&&R()?n(c):R()?n(j,1):Ce()?n(h,2):n($,-1)})}r(F,T)},te=F=>{var B=hr(),I=_e(B);{var T=h=>{var $=vr(),n=oe($,!0);M(()=>ae(n,ue())),r(h,$)};D(I,h=>{ue()&&h(T)})}var C=z(I,2);{var c=h=>{var $=he(),n=m($);le(n,()=>t(fe));var a=z(n,2);S(a,()=>Ve,(i,y)=>{y(i,{})}),r(h,$)};D(C,h=>{t(fe).length&&h(c)})}var j=z(C,2);le(j,()=>t(Se)),me(B),r(F,B)};let G=o(()=>Z()&&R()?"contents!":"");qt(u,{align:"end",get portal(){return ke()},get side(){return Ie()},get class(){return t(G)},get open(){return t(ee)},set open(F){Le(ee,F,!0)},trigger:p,content:te,$$slots:{trigger:!0,content:!0}})}me(d),M(()=>$t(d,1,`${Z()&&R()?"contents":"inline-flex items-center"} ${xe()??""}`)),r(e,d)};D(ot,e=>{$e()?e(at):e(nt,-1)})}r(O,He);var st=kt(rt);return Ke(),st}export{wr as O,sr as a,je as r,ir as s};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/DCj0DpxQ.js","/app/immutable/chunks/CRwmdgt6.js","/app/immutable/chunks/CjSUqH7t.js","/app/immutable/chunks/B8o4lNgr.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/D5B1sycf.js","/app/immutable/chunks/BlOn95cv.js","/app/immutable/chunks/UyBYtOpv.js","/app/immutable/chunks/CQ4a5a4v.js","/app/immutable/chunks/7rNOGHzs.js","/app/immutable/chunks/DCaHy20k.js","/app/immutable/chunks/CPQdU3ZA.js","/app/immutable/chunks/DNen9YXB.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{t as Kt,bq as Y,a_ as D,by as Gt,bu as q,bs as Nt,b as Qt,bo as i,_ as Jt}from"./7rNOGHzs.js";import{bs as Yt,ca as A,bH as z,c5 as ft,aD as Z,bj as Zt,a5 as F,bS as p,bA as C,b_ as y,W as g,bn as te,cd as tt,bV as _t,c9 as ee,aA as et,bl as T,bO as k,ay as vt,aB as w}from"./B8o4lNgr.js";import{k as xt,l as re}from"./DmsDslNo.js";import{b as se}from"./D2g8BuR1.js";import{b as ae}from"./Bsxt04FP.js";import{Hq as u,Bh as ne,B7 as ie,B6 as oe,Hk as le,AU as ce,ic as ue,iD as de}from"./CRwmdgt6.js";import{a as pe,T as me,D as fe,L as _e,o as ve}from"./B2KJmqK3.js";import{F as rt,c_ as xe,c7 as he,cW as ge}from"./CFejQM6t.js";import{f as ht}from"./Bgegixo2.js";import{n as G}from"./lfJ8pseq.js";import"./CQ4a5a4v.js";import"./ChTqQfQN.js";import"./D-cnPaTJ.js";import{r as be}from"./0IF8_goK.js";import{selectScriptById as st,selectScriptRuntime as ye,selectScriptOutput as gt,selectScriptRetainedOutput as ke,selectCanDeleteScript as bt}from"./
|
|
2
|
+
import{t as Kt,bq as Y,a_ as D,by as Gt,bu as q,bs as Nt,b as Qt,bo as i,_ as Jt}from"./7rNOGHzs.js";import{bs as Yt,ca as A,bH as z,c5 as ft,aD as Z,bj as Zt,a5 as F,bS as p,bA as C,b_ as y,W as g,bn as te,cd as tt,bV as _t,c9 as ee,aA as et,bl as T,bO as k,ay as vt,aB as w}from"./B8o4lNgr.js";import{k as xt,l as re}from"./DmsDslNo.js";import{b as se}from"./D2g8BuR1.js";import{b as ae}from"./Bsxt04FP.js";import{Hq as u,Bh as ne,B7 as ie,B6 as oe,Hk as le,AU as ce,ic as ue,iD as de}from"./CRwmdgt6.js";import{a as pe,T as me,D as fe,L as _e,o as ve}from"./B2KJmqK3.js";import{F as rt,c_ as xe,c7 as he,cW as ge}from"./CFejQM6t.js";import{f as ht}from"./Bgegixo2.js";import{n as G}from"./lfJ8pseq.js";import"./CQ4a5a4v.js";import"./ChTqQfQN.js";import"./D-cnPaTJ.js";import{r as be}from"./0IF8_goK.js";import{selectScriptById as st,selectScriptRuntime as ye,selectScriptOutput as gt,selectScriptRetainedOutput as ke,selectCanDeleteScript as bt}from"./M5rEGvXZ.js";import{g as we}from"./C_n9DeKj.js";import{bQ as Se,dG as $e,dh as yt}from"./KQTrHxko.js";import"./DbAK3Zju.js";import"./CB-g50lR.js";import"./CKEqC8_B.js";import{c as Ae}from"./Cw4or5mV.js";import{B as kt}from"./BRp0P9cF.js";var wt=w("<!> ",1),Fe=w('<div class="bg-danger-background/20 border-y border-danger/20 px-3 py-1.5 flex items-center justify-between"><div class="flex items-center gap-2 text-sm text-danger font-medium"><div class="w-4 h-4 rounded-full bg-danger-background flex items-center justify-center"><!></div> <span> </span></div> <!></div>'),Ce=w('<pre class="retained-text px-3 pb-3 text-xs svelte-115p4sl"> </pre>'),Oe=w('<p class="px-3 pb-3 text-xs text-muted-foreground" role="status"> </p>'),Le=w('<details class="retained-output border-b border-border svelte-115p4sl"><summary class="cursor-pointer px-3 py-2 text-xs text-muted-foreground"> </summary> <p class="px-3 pb-2 text-xs text-muted-foreground"> </p> <!></details>'),Re=w('<div class="px-3 py-1 text-xs text-muted-foreground"> </div>'),Be=w('<code class="text-muted-foreground font-mono text-xs"> </code>'),Ie=w('<div class="flex-1 flex items-center justify-center px-4 py-8"><div class="flex items-center gap-3 text-sm"><span class="text-subtle font-mono">$</span> <!> <!></div></div>'),De=w('<div><!> <!> <!> <!> <div><div class="xterm-output svelte-115p4sl"></div></div></div>');function qe(_,m){if(new.target)return Kt({component:qe,..._});Yt(m,!0);const H=()=>q(Bt,"$outputAuthority",O),o=()=>q(Ft,"$runtime$",O),v=()=>q(Ct,"$output$",O),E=()=>q(Rt,"$codeFontFamilyCSS",O),f=()=>q(Ot,"$retainedOutput$",O),St=()=>q(Lt,"$hidesAgentLifecycleActions$",O),at=()=>q(At,"$script$",O),[O,$t]=Nt();let S=Y(m,"scriptId",7),x=Y(m,"workspaceId",7),N=Y(m,"class",7,"");const L=tt(""),M=tt(""),nt=tt("");let Q=_t(!1);A(()=>L.set(x())),A(()=>M.set(S()));let R,n=null,P=null,V=null,U=null,B=null,j=null;const At=st(L,M),Ft=ye(L,M),Ct=gt(L,M),Ot=ke(L,M,nt),Lt=Se(L),Rt=we(),Bt=$e(L),it=crypto.randomUUID();A(()=>{const t=x();return S(),()=>{t&&u.dispatch(ne(t,it))}}),A(()=>{const t=x(),e=S(),s=H(),r=o();if(!s||!t||!e)return;r.status,r.startedAt;const l=crypto.randomUUID();return nt.set(l),z(Q,ft(()=>v().chunks.length===0),!0),u.dispatch(ie(t,e,l)),()=>u.dispatch(oe(t,e,l))});let X=_t(0);const It=ee(()=>o().status==="exited"&&o().exitCode!=null&&o().exitCode!==0&&o().exitCode<128);function Dt(){if(!R||n)return;U=new me(R);const t=U.getCurrentTheme();n=new fe({allowProposedApi:!0,fontFamily:E(),fontSize:13,lineHeight:1.2,letterSpacing:0,cursorBlink:!1,cursorStyle:"underline",cursorWidth:1,scrollback:1e4,allowTransparency:!0,convertEol:!0,disableStdin:!0,drawBoldTextInBrightColors:!0,theme:t}),n.attachCustomKeyEventHandler(s=>{const r=s.metaKey||s.ctrlKey;return!(r&&s.key==="`"||r&&s.key==="j"||r&&s.key==="k")}),P=new ve,n.loadAddon(P);const e=new _e((s,r)=>{try{const l=new URL(r);l.hostname==="localhost"||l.hostname==="127.0.0.1"?be(r).then(b=>{Jt(async()=>{const{getPanelLayoutManager:c}=await import("./DCj0DpxQ.js").then(h=>h.p);return{getPanelLayoutManager:c}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12]),import.meta.url).then(({getPanelLayoutManager:c})=>{c(x()).openBrowserPanel(b.url,void 0,void 0,b.requestedUrl)}).catch(()=>{window.open(b.url,"_blank")})}):window.open(r,"_blank")}catch{window.open(r,"_blank")}});n.loadAddon(e),n.open(R),U.applyTheme(n),j=requestAnimationFrame(()=>{j=null,P?.fit()}),V=new ResizeObserver(()=>{P?.fit()}),V.observe(R),qt()}function qt(){if(!n)return;const t=gt.select(u.state,x(),S());t.chunks.length>0&&n.write(t.chunks.map(e=>e.text).join("")),z(X,t.dropped+t.chunks.length)}function ot(){B!==null&&(cancelAnimationFrame(B),B=null),j!==null&&(cancelAnimationFrame(j),j=null),V?.disconnect(),V=null,U?.dispose(),U=null;const t=n;n=null,P=null,z(X,0),t&&pe(t)}A(()=>{const t=v(),e=ft(()=>Z(X)),s=t.dropped+t.chunks.length;if(!n||s<=e)return;const r=Math.max(e-t.dropped,0);n.write(t.chunks.slice(r).map(l=>l.text).join("")),z(X,s)}),A(()=>{const t=E();n&&n.options.fontFamily!==t&&(n.options.fontFamily=t)});function Tt(){u.dispatch(le(x(),S()))}function Et(){if(!x()){G.error(i.terminal_scriptOutput_noWorkspace_error());return}u.dispatch(ue(x(),S(),f()?.text,it))}A(()=>{o().status==="idle"&&v().chunks.length===0&&ot()}),A(()=>{!(o().status==="idle"&&v().chunks.length===0)&&R&&!n&&(B!==null&&cancelAnimationFrame(B),B=requestAnimationFrame(()=>{B=null,Dt()}))}),Zt(()=>{ot()});var Wt={get scriptId(){return S()},set scriptId(t){S(t),et()},get workspaceId(){return x()},set workspaceId(t){x(t),et()},get class(){return N()},set class(t=""){N(t),et()},$set:Gt,$on:(t,e)=>Qt(m,t,e)},K=De(),lt=F(K);{var Mt=t=>{var e=Fe(),s=F(e),r=F(s),l=F(r);rt(l,{get icon(){return xe},size:"xs"}),C(r);var b=p(r,2),c=T(b,!0);C(s);var h=p(s,2);{var $=a=>{ht(a,{variant:"outline",size:"sm",class:"h-7 text-xs bg-background border border-border text-danger",onclick:Et,children:(d,I)=>{var W=wt(),mt=vt(W);rt(mt,{get icon(){return ge},size:"sm",class:"mr-1.5"});var Vt=p(mt);y(Xt=>k(Vt,` ${Xt??""}`),[()=>i.terminal_scriptOutput_askAiToFix_label()]),g(d,W)},$$slots:{default:!0}})};D(h,a=>{St()||a($)})}C(e),y(a=>k(c,a),[()=>i.terminal_scriptOutput_buildFailed_label({exitCode:o().exitCode??0})]),g(t,e)};D(lt,t=>{Z(It)&&t(Mt)})}var ct=p(lt,2);{var Pt=t=>{var e=Le(),s=F(e),r=T(s,!0),l=p(s,2),b=T(l,!0),c=p(l,2);{var h=a=>{var d=Ce();let I;var W=T(d,!0);y(()=>{I=re(d,"",I,{"font-family":E()}),k(W,f().text)}),g(a,d)},$=a=>{var d=Oe(),I=T(d,!0);y(W=>k(I,W),[()=>f().status==="loading"?i.terminal_scriptOutput_retainedLoading_label():i.terminal_scriptOutput_retainedUnavailable_label()]),g(a,d)};D(c,a=>{f().status==="available"?a(h):a($,-1)})}C(e),y((a,d)=>{k(r,a),k(b,d)},[()=>i.terminal_scriptOutput_retained_label(),()=>i.terminal_scriptOutput_retained_description()]),ae("open","toggle",e,a=>z(Q,a),()=>Z(Q)),g(t,e)};D(ct,t=>{f()&&t(Pt)})}var ut=p(ct,2);{var Ut=t=>{var e=Re(),s=T(e,!0);y(r=>k(s,r),[()=>i.terminal_scriptOutput_live_label()]),g(t,e)};D(ut,t=>{v().chunks.length>0&&f()&&t(Ut)})}var dt=p(ut,2);{var jt=t=>{var e=Ie(),s=F(e),r=p(F(s),2);{var l=c=>{var h=Be(),$=T(h,!0);y(a=>k($,a),[()=>ce(at())]),g(c,h)};D(r,c=>{at()&&c(l)})}var b=p(r,2);ht(b,{variant:"ghost",size:"xs",onclick:Tt,class:"text-muted-foreground hover:text-foreground",children:(c,h)=>{var $=wt(),a=vt($);rt(a,{get icon(){return he},class:"h-3 w-3 mr-1"});var d=p(a);y(I=>k(d,` ${I??""}`),[()=>i.terminal_scriptOutput_run_label()]),g(c,$)},$$slots:{default:!0}}),C(s),C(e),g(t,e)};D(dt,t=>{o().status==="idle"&&v().chunks.length===0&&t(jt)})}var J=p(dt,2);let pt;var zt=F(J);se(zt,t=>R=t,()=>R),C(J),C(K),y(()=>{xt(K,1,`script-output-viewer ${N()??""}`,"svelte-115p4sl"),pt=xt(J,1,"flex-1 relative overflow-hidden",null,pt,{hidden:o().status==="idle"&&v().chunks.length===0})}),g(_,K);var Ht=te(Wt);return $t(),Ht}async function ar(_,m,H){const o=st.select(u.state,_,m);if(!o||!H()||!bt.select(u.state,_,m))return;const v=kt(o.runtime?.status),E=yt.select(u.state,_);if(!E){G.error(i.workspace_client_accessChanged_error());return}if(!await Ae({title:i.scripts_delete_title({name:o.name}),description:v?i.scripts_delete_running_description():i.scripts_delete_description(),confirmLabel:i.scripts_delete_label(),destructive:!0}))return;if(E!==yt.select(u.state,_)){G.error(i.workspace_client_accessChanged_error());return}const f=st.select(u.state,_,m);if(!H()||!f||f.createdAt!==o.createdAt||f.name!==o.name||!v&&kt(f.runtime?.status)||!bt.select(u.state,_,m)){G.error(i.scripts_delete_changed_error());return}u.dispatch(de(_,m,i.terminal_quakeOverlay_deleteScriptFailed_error()))}export{qe as S,ar as c};
|