@intent-hq/web 2.320.1 → 2.321.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/web/app/immutable/chunks/{4o1DPfmL.js → -x_SoK5J.js} +1 -1
- package/web/app/immutable/chunks/{DJbnWCnN.js → 0Orrh1Id.js} +6 -6
- package/web/app/immutable/chunks/{Wm9WFHAU.js → 0TFOtiMK.js} +1 -1
- package/web/app/immutable/chunks/{DgvFQ5ps.js → 0x0gscua.js} +1 -1
- package/web/app/immutable/chunks/{D2Hsf4lo.js → 45y_L1a9.js} +1 -1
- package/web/app/immutable/chunks/{CVQvxrRM.js → 4iRc0E9v.js} +1 -1
- package/web/app/immutable/chunks/{CcjhvQaU.js → 5MGYaOe_.js} +1 -1
- package/web/app/immutable/chunks/{D7hkdi6r.js → 5QXDo1_h.js} +1 -1
- package/web/app/immutable/chunks/{VlQJw7Mt.js → 6cxhz2FS.js} +1 -1
- package/web/app/immutable/chunks/{B-NH8jPK.js → 7fl6VDRo.js} +1 -1
- package/web/app/immutable/chunks/{BIzCpN2r.js → 8OpKoiOO.js} +1 -1
- package/web/app/immutable/chunks/{Byh9jXBr.js → 8biy-UQv.js} +1 -1
- package/web/app/immutable/chunks/{Ck3dkN4B.js → Ab2YxsyL.js} +1 -1
- package/web/app/immutable/chunks/{CAoY2-K6.js → B-WefpDP.js} +1 -1
- package/web/app/immutable/chunks/{CQX4KubR.js → B0FM877X.js} +1 -1
- package/web/app/immutable/chunks/{C23Piy_l.js → B0FYEeEw.js} +1 -1
- package/web/app/immutable/chunks/{CpEHCOut.js → B0JWnOsx.js} +1 -1
- package/web/app/immutable/chunks/{C0Eg_x6y.js → B0pgN3Jj.js} +1 -1
- package/web/app/immutable/chunks/{BJfH3e03.js → B1WyTcs2.js} +3 -3
- package/web/app/immutable/chunks/{C-r1nQ0P.js → B2c_0_UD.js} +2 -2
- package/web/app/immutable/chunks/{BtxYdCDO.js → B2yYgkwz.js} +1 -1
- package/web/app/immutable/chunks/{DnIfn_Q5.js → B5nbjbRb.js} +1 -1
- package/web/app/immutable/chunks/{Cmsg1-Jz.js → B6DUgu-2.js} +1 -1
- package/web/app/immutable/chunks/{BpzYGtC7.js → B7BTR3Z_.js} +1 -1
- package/web/app/immutable/chunks/{eeOO6ePS.js → B9MBednq.js} +1 -1
- package/web/app/immutable/chunks/{GzyujEXJ.js → BBZiE97y.js} +1 -1
- package/web/app/immutable/chunks/{CjOd6IrN.js → BBeErNG6.js} +1 -1
- package/web/app/immutable/chunks/{CwKQMp5y.js → BC1v75_H.js} +1 -1
- package/web/app/immutable/chunks/{D02FkLBh.js → BD8I8FK1.js} +1 -1
- package/web/app/immutable/chunks/{gV7ZxrZ2.js → BDgfVkJh.js} +1 -1
- package/web/app/immutable/chunks/{DBEuoua2.js → BEQ_aNVt.js} +2 -2
- package/web/app/immutable/chunks/{C-_w8CdN.js → BG-UHIO1.js} +2 -2
- package/web/app/immutable/chunks/{BtA94G-4.js → BGFrQA7m.js} +1 -1
- package/web/app/immutable/chunks/{CW_i4yzi.js → BGiTQR4x.js} +1 -1
- package/web/app/immutable/chunks/{O4y88_QN.js → BLhWzQz2.js} +1 -1
- package/web/app/immutable/chunks/{BRqOyyER.js → BM51eWC-.js} +1 -1
- package/web/app/immutable/chunks/{VE9Tc-Fm.js → BMH4mbSd.js} +2 -2
- package/web/app/immutable/chunks/{CpnH3je1.js → BMc6OzJ-.js} +2 -2
- package/web/app/immutable/chunks/{Dkt7Tsgw.js → BMvbnoDk.js} +1 -1
- package/web/app/immutable/chunks/{DAgho_P-.js → BOaNSc_1.js} +1 -1
- package/web/app/immutable/chunks/{BZrP_BN5.js → BOrghaSd.js} +2 -2
- package/web/app/immutable/chunks/{DDRNgELR.js → BPp7FHiR.js} +1 -1
- package/web/app/immutable/chunks/{C0HDG-tg.js → BS5yagDq.js} +1 -1
- package/web/app/immutable/chunks/{4EPU-1_C.js → BWHu0fap.js} +1 -1
- package/web/app/immutable/chunks/{CT5WLLvq.js → BX-dt_Uh.js} +1 -1
- package/web/app/immutable/chunks/{DnWPcgvb.js → BXPwex0u.js} +1 -1
- package/web/app/immutable/chunks/{CDFwOYFZ.js → BXean12D.js} +1 -1
- package/web/app/immutable/chunks/{BTVnc-yD.js → BZyfa8QR.js} +1 -1
- package/web/app/immutable/chunks/{DcQGtdYG.js → BbCn81lZ.js} +1 -1
- package/web/app/immutable/chunks/{D2MFHl3c.js → Bc-CUZMV.js} +1 -1
- package/web/app/immutable/chunks/{49Xcxy9Z.js → Bcc7Bzbg.js} +1 -1
- package/web/app/immutable/chunks/{DQSz8rIC.js → BcpqnYRX.js} +5 -5
- package/web/app/immutable/chunks/{H5XG0yyu.js → BdWpSBC4.js} +2 -2
- package/web/app/immutable/chunks/{BxxQ5pIU.js → BeqbwVaJ.js} +1 -1
- package/web/app/immutable/chunks/{DgDI47Tl.js → BflC9e-C.js} +1 -1
- package/web/app/immutable/chunks/{DSP3ClFU.js → Bgw4M5Hc.js} +1 -1
- package/web/app/immutable/chunks/{lzfQOUtM.js → Bi4OiJD3.js} +1 -1
- package/web/app/immutable/chunks/{CIH3mb7Y.js → BkR5Qiti.js} +1 -1
- package/web/app/immutable/chunks/{BMJ3_jM1.js → Bknqawxe.js} +1 -1
- package/web/app/immutable/chunks/{2d9ARddo.js → Bm_1OUSw.js} +1 -1
- package/web/app/immutable/chunks/{DVX1HL-4.js → Bmmshx2M.js} +1 -1
- package/web/app/immutable/chunks/{DYepVMa7.js → Bo4s1kgI.js} +3 -3
- package/web/app/immutable/chunks/{D_FHOcPH.js → Bok30zBH.js} +1 -1
- package/web/app/immutable/chunks/{DsQHEEWt.js → BsB3ty-n.js} +1 -1
- package/web/app/immutable/chunks/{BsCDeyle.js → BtTBXjdJ.js} +1 -1
- package/web/app/immutable/chunks/{r2I2bB7k.js → BtWwzwrf.js} +1 -1
- package/web/app/immutable/chunks/{D8UQMJEh.js → BvkV35-O.js} +1 -1
- package/web/app/immutable/chunks/{fUyHJpWx.js → BwICfRz9.js} +1 -1
- package/web/app/immutable/chunks/{CfpYQrWa.js → BwYRCP9e.js} +1 -1
- package/web/app/immutable/chunks/{C9Az19Q-.js → ByKL05wN.js} +1 -1
- package/web/app/immutable/chunks/{u-Ou3zHY.js → Byv2GcxJ.js} +2 -2
- package/web/app/immutable/chunks/{D-NAfI6p.js → BziQ6zwo.js} +1 -1
- package/web/app/immutable/chunks/{SrOLwB5L.js → C-RJDuZ9.js} +1 -1
- package/web/app/immutable/chunks/{IsZuHG2a.js → C-neqscP.js} +1 -1
- package/web/app/immutable/chunks/{CtNKFf3W.js → C06rhFz-.js} +1 -1
- package/web/app/immutable/chunks/{VKc1-U2z.js → C0VXEpDj.js} +1 -1
- package/web/app/immutable/chunks/{ivVGXMNS.js → C0mBOV7w.js} +1 -1
- package/web/app/immutable/chunks/{B9MzVcgv.js → C11XjPnf.js} +3 -3
- package/web/app/immutable/chunks/{55B_mQC6.js → C3AKbypo.js} +6 -6
- package/web/app/immutable/chunks/{ChV6OcuF.js → C3lgqjB4.js} +1 -1
- package/web/app/immutable/chunks/{DFRP5ruh.js → C5aeZ3Yo.js} +2 -2
- package/web/app/immutable/chunks/{Bk4gFCP5.js → C6-BVYMv.js} +1 -1
- package/web/app/immutable/chunks/C76-jvlr.js +19 -0
- package/web/app/immutable/chunks/{DlUfd75E.js → C7JWgw8J.js} +3 -3
- package/web/app/immutable/chunks/{DjWen1vr.js → C804xHCz.js} +1 -1
- package/web/app/immutable/chunks/{DdteGby8.js → C8xPpxcv.js} +1 -1
- package/web/app/immutable/chunks/{BoUhyyfU.js → C8zzua9V.js} +1 -1
- package/web/app/immutable/chunks/{CuTNRxpo.js → CAgY0H5Q.js} +1 -1
- package/web/app/immutable/chunks/{ApbPdiAE.js → CBxbaIvA.js} +1 -1
- package/web/app/immutable/chunks/CCaX_DIa.js +1 -0
- package/web/app/immutable/chunks/{7z2H_RtS.js → CCnP87Jb.js} +1 -1
- package/web/app/immutable/chunks/{CrkvePNd.js → CCsRc7xx.js} +1 -1
- package/web/app/immutable/chunks/{CXux1NAJ.js → CDsY8gY8.js} +1 -1
- package/web/app/immutable/chunks/{DMu4mjpX.js → CEFpGNTq.js} +1 -1
- package/web/app/immutable/chunks/{V4Dt-iuy.js → CEj75uMJ.js} +1 -1
- package/web/app/immutable/chunks/{Le4YFzxz.js → CG9qWr93.js} +3 -3
- package/web/app/immutable/chunks/{DjfcjPFA.js → CGBBhq8k.js} +1 -1
- package/web/app/immutable/chunks/{DU9iEtZ1.js → CGIf2jXM.js} +1 -1
- package/web/app/immutable/chunks/{BS3L5ssG.js → CGVJO4eq.js} +1 -1
- package/web/app/immutable/chunks/{ipFV2AXr.js → CHM5tGJ6.js} +1 -1
- package/web/app/immutable/chunks/CHRkLzGl.js +1 -0
- package/web/app/immutable/chunks/{D5BYjywr.js → CHZAzCO9.js} +2 -2
- package/web/app/immutable/chunks/{Dby-RtfB.js → CIh8Ybhq.js} +1 -1
- package/web/app/immutable/chunks/{BnY6qa9O.js → CKO4faLg.js} +1 -1
- package/web/app/immutable/chunks/{Cm-Ux8AK.js → CKwPlZ66.js} +1 -1
- package/web/app/immutable/chunks/{5BaUgoc7.js → CLmrIbfi.js} +1 -1
- package/web/app/immutable/chunks/{DeFnstZp.js → CM7Hb3PZ.js} +1 -1
- package/web/app/immutable/chunks/{JwXVdNK9.js → CN70DRE5.js} +1 -1
- package/web/app/immutable/chunks/{Dbcyn1sm.js → CPKLysog.js} +1 -1
- package/web/app/immutable/chunks/CRyHSgI1.js +1 -0
- package/web/app/immutable/chunks/{Bv7Cc181.js → CS7dHtKw.js} +1 -1
- package/web/app/immutable/chunks/{XL81JlY3.js → CTlGDL05.js} +1 -1
- package/web/app/immutable/chunks/{DkrIcKd4.js → CVjlpAWj.js} +3 -3
- package/web/app/immutable/chunks/{vnFqKiHP.js → CVrH3Neh.js} +1 -1
- package/web/app/immutable/chunks/{D7ZBvVv7.js → CXIZuwd7.js} +1 -1
- package/web/app/immutable/chunks/{IYLMGQxr.js → CY9IKMQG.js} +1 -1
- package/web/app/immutable/chunks/{CKiOztob.js → CYOvUFvY.js} +1 -1
- package/web/app/immutable/chunks/{DOxrGs5l.js → CZEWv-Gf.js} +1 -1
- package/web/app/immutable/chunks/{jiIr1QvR.js → C_Vz3LCC.js} +1 -1
- package/web/app/immutable/chunks/{sOHh4EMg.js → Cb3FWEmc.js} +1 -1
- package/web/app/immutable/chunks/{BvO0zD3q.js → Cbqk5Mud.js} +1 -1
- package/web/app/immutable/chunks/{BkH6TsO0.js → CchM71Qw.js} +1 -1
- package/web/app/immutable/chunks/{zl8Sz0Gx.js → CdGIN-T1.js} +3 -3
- package/web/app/immutable/chunks/{V_BIwIYH.js → CdVKa6AF.js} +2 -2
- package/web/app/immutable/chunks/{CMcfEzCt.js → Ced26xBL.js} +1 -1
- package/web/app/immutable/chunks/{DukwQosN.js → Ci959ZOg.js} +1 -1
- package/web/app/immutable/chunks/{DDhu5Shq.js → Cja4W1Zb.js} +4 -4
- package/web/app/immutable/chunks/{DtL3mwiX.js → CmAVmm3T.js} +1 -1
- package/web/app/immutable/chunks/CmYXfe7_.js +1 -0
- package/web/app/immutable/chunks/{BoAwi0I6.js → CoUfnBeR.js} +1 -1
- package/web/app/immutable/chunks/{COuKp8NZ.js → Cq6ekj5I.js} +1 -1
- package/web/app/immutable/chunks/{CrF5hjNA.js → CqGkRJXi.js} +1 -1
- package/web/app/immutable/chunks/{CGVZRNqq.js → Cqay3Iio.js} +1 -1
- package/web/app/immutable/chunks/{D8l-pxCs.js → CsqvO7xN.js} +1 -1
- package/web/app/immutable/chunks/{DQhHyGm2.js → Ctggj9Y1.js} +1 -1
- package/web/app/immutable/chunks/{CTIoKRdg.js → Cts399i7.js} +1 -1
- package/web/app/immutable/chunks/{TRcwahzR.js → CulY8r4s.js} +1 -1
- package/web/app/immutable/chunks/{3TX-_riq.js → CvBuWqyP.js} +4 -4
- package/web/app/immutable/chunks/{DB531Hr_.js → CvegPRPp.js} +2 -2
- package/web/app/immutable/chunks/{Do2QepJk.js → Cwv7iryQ.js} +1 -1
- package/web/app/immutable/chunks/{CYvGLw1Y.js → CxQ0SCX2.js} +1 -1
- package/web/app/immutable/chunks/{DZxiqmZj.js → CxZuxrAL.js} +1 -1
- package/web/app/immutable/chunks/{sWFJeG75.js → Cz8iOYm8.js} +1 -1
- package/web/app/immutable/chunks/{DUW0BlH5.js → CztKENY4.js} +1 -1
- package/web/app/immutable/chunks/{XWXuV5J_.js → D26IPp5S.js} +1 -1
- package/web/app/immutable/chunks/{mEKKjA-u.js → D2iCI9dn.js} +1 -1
- package/web/app/immutable/chunks/{CZFJH8pA.js → D2zJp5fS.js} +29 -29
- package/web/app/immutable/chunks/{Bv-JB2Uu.js → D4e2w8TP.js} +1 -1
- package/web/app/immutable/chunks/{BmGPu7Nl.js → D5lr7eae.js} +2 -2
- package/web/app/immutable/chunks/{9Lm8k_8r.js → D6dCvfQe.js} +1 -1
- package/web/app/immutable/chunks/{CMeoq2YD.js → D7q-DSVP.js} +1 -1
- package/web/app/immutable/chunks/{Btkc4GhJ.js → D84A4J8d.js} +1 -1
- package/web/app/immutable/chunks/{Df_CcsUd.js → DDdLPEvL.js} +1 -1
- package/web/app/immutable/chunks/{DU9yd1xn.js → DDnwQoVq.js} +1 -1
- package/web/app/immutable/chunks/{MJGmlCLu.js → DFcwI6Rh.js} +1 -1
- package/web/app/immutable/chunks/{BQKHJuv8.js → DFyBaL9d.js} +1 -1
- package/web/app/immutable/chunks/{CCmXROuj.js → DI4wCe7O.js} +1 -1
- package/web/app/immutable/chunks/{DSbw-nyW.js → DJKXcaw9.js} +1 -1
- package/web/app/immutable/chunks/{B524kvVw.js → DMRQ6CDd.js} +2 -2
- package/web/app/immutable/chunks/{i3h2CX4F.js → DMvfzQWM.js} +1 -1
- package/web/app/immutable/chunks/{KJelEqX3.js → DNFHGDC9.js} +1 -1
- package/web/app/immutable/chunks/{R6dAjEem.js → DNNMwmDG.js} +1 -1
- package/web/app/immutable/chunks/{CZ5Pr0zI.js → DOzF5uE-.js} +1 -1
- package/web/app/immutable/chunks/{DDdEHmdT.js → DPoarPZL.js} +1 -1
- package/web/app/immutable/chunks/{273-ejOd.js → DR4i54x0.js} +1 -1
- package/web/app/immutable/chunks/{CCVg2HgS.js → DRpDjwRs.js} +1 -1
- package/web/app/immutable/chunks/{Dy4G53ce.js → DS2Q5gr9.js} +1 -1
- package/web/app/immutable/chunks/{B-ukGsyU.js → DSdY0J1g.js} +1 -1
- package/web/app/immutable/chunks/{DgvGDMI5.js → DXySew1R.js} +1 -1
- package/web/app/immutable/chunks/{C72zM9oE.js → DYfBNrOV.js} +1 -1
- package/web/app/immutable/chunks/{CCghBHzC.js → DYhpST_X.js} +1 -1
- package/web/app/immutable/chunks/{QeTaV4Op.js → DZAWjsA4.js} +1 -1
- package/web/app/immutable/chunks/{CBE9bOjQ.js → DZtstCLQ.js} +1 -1
- package/web/app/immutable/chunks/{B1892jNy.js → D_HysCp7.js} +1 -1
- package/web/app/immutable/chunks/{BOypJjQg.js → Dd0rdLMI.js} +1 -1
- package/web/app/immutable/chunks/{CwSP6heW.js → Dd7A9glX.js} +1 -1
- package/web/app/immutable/chunks/{C2pLxq9N.js → Dgqdx3pd.js} +1 -1
- package/web/app/immutable/chunks/{Ca0VZzWN.js → DhtKWu39.js} +1 -1
- package/web/app/immutable/chunks/{BBvT7Bb8.js → Dix9BiYu.js} +1 -1
- package/web/app/immutable/chunks/{CK2xtMaJ.js → DjqPgoUP.js} +1 -1
- package/web/app/immutable/chunks/DlBxdhh5.js +2 -0
- package/web/app/immutable/chunks/{CgQiyraX.js → DlZzAKZ2.js} +1 -1
- package/web/app/immutable/chunks/{CW_MTCOu.js → DnfX8iZ_.js} +1 -1
- package/web/app/immutable/chunks/Dritbi2C.js +6 -0
- package/web/app/immutable/chunks/{cYktK7bI.js → DsRLPs6I.js} +10 -10
- package/web/app/immutable/chunks/{DVijqcE1.js → Du7yAEgM.js} +1 -1
- package/web/app/immutable/chunks/{oB6nSTCC.js → DuMlpvYZ.js} +1 -1
- package/web/app/immutable/chunks/{DbSP_yi5.js → DwNzQjT_.js} +1 -1
- package/web/app/immutable/chunks/{DWcUEP_3.js → DwsRDnkS.js} +4 -4
- package/web/app/immutable/chunks/{T2aO1XPv.js → DyVNmy1r.js} +1 -1
- package/web/app/immutable/chunks/{IwQXvQKq.js → I0eHZGMz.js} +1 -1
- package/web/app/immutable/chunks/{DLme1vI4.js → JfyBNQs2.js} +1 -1
- package/web/app/immutable/chunks/{YGDnq71P.js → NeHKo0ZG.js} +1 -1
- package/web/app/immutable/chunks/{CAhuuwZ9.js → O0CxvO89.js} +1 -1
- package/web/app/immutable/chunks/{DudXAl_N.js → Ob5NWDgS.js} +1 -1
- package/web/app/immutable/chunks/{Dczc0YMo.js → PUalo3UE.js} +1 -1
- package/web/app/immutable/chunks/{DXjHY2hF.js → QGE3iD8D.js} +1 -1
- package/web/app/immutable/chunks/{_p09hiud.js → QSR6vsk4.js} +1 -1
- package/web/app/immutable/chunks/{9tzjcklF.js → QjpXu0Du.js} +1 -1
- package/web/app/immutable/chunks/{CPObUSo8.js → UEd-gngc.js} +1 -1
- package/web/app/immutable/chunks/VEkj47bo.js +1 -0
- package/web/app/immutable/chunks/{Cx547a39.js → VeIqG7dc.js} +4 -4
- package/web/app/immutable/chunks/{j3QkolT-.js → XF_IbTR1.js} +3 -3
- package/web/app/immutable/chunks/{CcVvQKcJ.js → XV0T3w4n.js} +1 -1
- package/web/app/immutable/chunks/{Dk1FwKDL.js → YO4PhogQ.js} +1 -1
- package/web/app/immutable/chunks/{BLl4jbbs.js → aLZSbque.js} +2 -2
- package/web/app/immutable/chunks/{DKBox7Ew.js → csuWDYc9.js} +1 -1
- package/web/app/immutable/chunks/{CnlzKY2y.js → dmSYAakE.js} +1 -1
- package/web/app/immutable/chunks/eK7OULll.js +1 -0
- package/web/app/immutable/chunks/{Cugknw1m.js → gCXIPBa3.js} +1 -1
- package/web/app/immutable/chunks/{CJhkZF1l.js → hxIWaKu8.js} +1 -1
- package/web/app/immutable/chunks/{C3lmZVdU.js → jMKjj8ae.js} +1 -1
- package/web/app/immutable/chunks/{Dpk7e0gp.js → jvHJQ-Xz.js} +1 -1
- package/web/app/immutable/chunks/{BB6TPLRQ.js → k4eU_FWk.js} +1 -1
- package/web/app/immutable/chunks/{BigdBsL9.js → nLw8YrmA.js} +1 -1
- package/web/app/immutable/chunks/{mk8wN9pR.js → nR16njgN.js} +1 -1
- package/web/app/immutable/chunks/{Dld3dCA-.js → o5rEX9Xy.js} +1 -1
- package/web/app/immutable/chunks/{B30Ssr1r.js → p5gLe3PS.js} +1 -1
- package/web/app/immutable/chunks/{VKC6gzws.js → pnKMO5U0.js} +53 -53
- package/web/app/immutable/chunks/{CGTFiYKr.js → reR1kPlm.js} +1 -1
- package/web/app/immutable/chunks/{BwfkZxtl.js → tGqA6xQ9.js} +1 -1
- package/web/app/immutable/chunks/uLB4Kp9c.js +1 -0
- package/web/app/immutable/chunks/{CI-U2zwu.js → ubLEbEcV.js} +1 -1
- package/web/app/immutable/chunks/{Dtei9o3U.js → uyOfKmty.js} +3 -3
- package/web/app/immutable/chunks/{DVRDTT5s.js → vUGF5JqJ.js} +1 -1
- package/web/app/immutable/chunks/{DamIfQPR.js → vzGm0J_h.js} +1 -1
- package/web/app/immutable/chunks/{Dlalsrb2.js → w6mFE4SD.js} +1 -1
- package/web/app/immutable/chunks/{OvSKCwS-.js → z3QVK190.js} +2 -2
- package/web/app/immutable/entry/{app.DnikQ4I9.js → app.PHHlgSoZ.js} +3 -3
- package/web/app/immutable/entry/start.Cltn4m6a.js +1 -0
- package/web/app/immutable/nodes/{0.C7A1xQm9.js → 0.D7bJjS_y.js} +1 -1
- package/web/app/immutable/nodes/{1.D3O5lTcl.js → 1.B3gH8FG5.js} +1 -1
- package/web/app/immutable/nodes/{10.BaLN4VIK.js → 10.NQcSgQgq.js} +4 -4
- package/web/app/immutable/nodes/{11.DNy1N3E_.js → 11.Drfz7PRj.js} +1 -1
- package/web/app/immutable/nodes/{12.CkJqJXDQ.js → 12.gXokqM9g.js} +1 -1
- package/web/app/immutable/nodes/{13.BQO-XqRU.js → 13.DFxxGy6Y.js} +3 -3
- package/web/app/immutable/nodes/{14.BycEEfsq.js → 14.7T2ChNl_.js} +1 -1
- package/web/app/immutable/nodes/{15.Cul5GEsK.js → 15.CgEeXtgJ.js} +1 -1
- package/web/app/immutable/nodes/{16.BjrtGDLp.js → 16.CWrHY2VB.js} +2 -2
- package/web/app/immutable/nodes/{2.Cfk2c4l0.js → 2.DQ6QcB9c.js} +8 -8
- package/web/app/immutable/nodes/{3.Dp8QGgRH.js → 3.Fjkgohv2.js} +1 -1
- package/web/app/immutable/nodes/{4.D3m3OUdj.js → 4.D1BNF_ep.js} +1 -1
- package/web/app/immutable/nodes/{5.BMBYYbKi.js → 5.C5OySrRk.js} +2 -2
- package/web/app/immutable/nodes/{6.BIo4yUgT.js → 6.BrxG9qCf.js} +1 -1
- package/web/app/immutable/nodes/{7.DdNd4GXX.js → 7.CvdabbdY.js} +1 -1
- package/web/app/immutable/nodes/8.BSQtFfFS.js +15 -0
- package/web/app/immutable/nodes/{9.kCWJBZ1N.js → 9.D6DS9Z9f.js} +5 -5
- package/web/app/version.json +1 -1
- package/web/generated/paraglide.js +49 -49
- package/web/index.html +18 -18
- package/web/app/immutable/chunks/4Qt-u50Z.js +0 -1
- package/web/app/immutable/chunks/B--T3tY0.js +0 -19
- package/web/app/immutable/chunks/BJzlL5VK.js +0 -1
- package/web/app/immutable/chunks/C7-4lB53.js +0 -6
- package/web/app/immutable/chunks/CR8nwpLC.js +0 -1
- package/web/app/immutable/chunks/CduK2Osu.js +0 -1
- package/web/app/immutable/chunks/CmTfIBH2.js +0 -2
- package/web/app/immutable/chunks/DakbBhJV.js +0 -1
- package/web/app/immutable/chunks/DclJ6-AA.js +0 -1
- package/web/app/immutable/chunks/DozYGPQ1.js +0 -1
- package/web/app/immutable/entry/start.DW0TPq6E.js +0 -1
- package/web/app/immutable/nodes/8.Cp6GdAVQ.js +0 -15
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{bo as b,t as wt,bq as
|
|
1
|
+
import{bo as b,t as wt,bq as M,a_ as D,by as Tt,bs as xt,b as kt,bu as N}from"./eK7OULll.js";import{bs as It,ca as Q,aD as t,a7 as At,ay as X,W as w,bn as Pt,bS as F,c9 as f,aA as R,aB as x,a5 as I,bA as A,bl as P,b_ as B,bO as S}from"./DYhIMPy1.js";import{F as St}from"./Dix9BiYu.js";import{c as Wt}from"./DFcwI6Rh.js";import{C as q}from"./DypB-Dwi.js";import{L as $t}from"./D8dE5NKO.js";import"./BM51eWC-.js";import"./DZtstCLQ.js";import"./p5gLe3PS.js";import{be as Dt}from"./B0JWnOsx.js";import"./CVjlpAWj.js";import"./BdWpSBC4.js";import{HR as E,Im as Nt,IC as Ft,Ir as Bt,ug as Et}from"./Bo4s1kgI.js";import{T as Lt}from"./0Orrh1Id.js";import{g as Ut}from"./DfN8_dcw.js";import{dm as Ot}from"./C-RJDuZ9.js";import{bN as jt,bK as Ht,b5 as Mt}from"./C0VXEpDj.js";import"./Bok30zBH.js";import{M as Rt}from"./nLw8YrmA.js";import{V as Vt}from"./D7q-DSVP.js";import{O as qt}from"./BS5yagDq.js";import{c as Gt}from"./ChTqQfQN.js";import{i as Kt}from"./H2jLkRRS.js";const T=new $t({category:"change-converters"});function V(e,n){return e.path||e.file||e.filePath||e.relativePath||n?.filePath}function Y(e,n){return{additions:e.additions??n?.additions??0,deletions:e.deletions??n?.deletions??0,binary:e.binary??!1}}function zt(e,n){if(n.actor?.type==="agent"&&n.actor.id){const r=n.actor;return{agentId:r.id,agentName:r.name||b.fileTracking_changeTimeline_agent_fallback(),sessionId:r.sessionId||e.sessionId||"",turnNumber:r.turnNumber??e.turnNumber??0,messageId:r.messageId,timestamp:new Date(n.timestamp).getTime()}}if(e.agentId)return{agentId:e.agentId,agentName:e.agentName||b.fileTracking_changeTimeline_agent_fallback(),sessionId:e.sessionId||"",turnNumber:e.turnNumber||0,timestamp:new Date(n.timestamp).getTime()}}function Z(e,n){return{timestamp:new Date(e.timestamp).getTime(),manual:e.actor?.type==="user",agent:zt(n,e)}}function tt(e,n){return{oldContent:n?.oldContent??e.oldContent,newContent:n?.newContent??e.newContent,diff:e.diff??n?.diff}}function et(e,n,r){return r!==void 0?`${e}-${n}-${r}`:`${e}-${n}`}function Jt(e){try{const n=e.data||{},r=e.codeChange;T.debug("Converting event to TrackedChange",{eventType:e.type,eventId:e.id,hasData:!!n,hasCodeChange:!!r});const c=V(n,r);if(e.type.startsWith("file:")&&c){const d=Y(n,r);return T.debug("Creating TrackedChange for file event",{filePath:c,stats:d,hasDiff:!!(n.diff||r?.diff)}),[{id:et("event",e.id),file:c,relativePath:c,stage:q.Unstaged,stats:d,attribution:Z(e,n),content:tt(n,r)}]}return(e.type==="agent:completed"||e.type.startsWith("agent:"))&&n.fileChanges&&Array.isArray(n.fileChanges)?(T.debug("Creating TrackedChanges for agent event",{eventType:e.type,fileChangesCount:n.fileChanges.length,agentId:n.agentId}),n.fileChanges.filter(d=>V(d)?!0:(T.warn("Skipping file change without path",{change:d}),!1)).map((d,s)=>{const v=V(d);if(!v)throw new Error("file change without path");return{id:et("event",e.id,s),file:v,relativePath:v,stage:q.Unstaged,stats:Y(d),attribution:Z(e,n),content:tt(d)}})):(T.debug("No TrackedChanges created for event",{eventType:e.type,eventId:e.id,hasFilePath:!!c,hasFileChanges:!!(n.fileChanges&&Array.isArray(n.fileChanges))}),[])}catch(n){return T.error("Error converting event to TrackedChange",n instanceof Error?n:new Error(String(n)),{eventType:e.type,eventId:e.id}),[]}}function Qt(e){if(!e)return{oldContent:"",newContent:""};const n=[],r=[],c=e.split(`
|
|
2
2
|
`);c.length>0&&c[c.length-1]===""&&c.pop();let d=!1;for(const s of c)if(!(s.startsWith("diff --git")||s.startsWith("index ")||s.startsWith("--- ")||s.startsWith("+++ ")||s.startsWith("\"))){if(s.startsWith("@@")){d=!0;continue}d&&(s.startsWith("+")?r.push(s.slice(1)):s.startsWith("-")?n.push(s.slice(1)):s.startsWith(" ")?(n.push(s.slice(1)),r.push(s.slice(1))):s===""&&(n.push(""),r.push("")))}return{oldContent:n.join(`
|
|
3
3
|
`),newContent:r.join(`
|
|
4
|
-
`)}}var Xt=x("<!> <!>",1),Yt=x('<div class="flex items-center gap-1.5 px-3 py-1.5 text-xs text-subtle bg-muted/50 border-b border-border"><span> </span></div>'),Zt=x('<div class="flex flex-col h-full"><!> <div class="flex-1 min-h-0"><!></div></div>'),te=x('<div class="flex flex-col items-center justify-center h-full text-subtle gap-4"><p class="text-sm"> </p> <p class="text-xs opacity-70"> </p></div>'),ee=x('<p class="text-xs opacity-70"> </p>'),ne=x('<div class="flex flex-col items-center justify-center h-full text-subtle gap-4"><p class="text-sm"> </p> <!></div>');function ae(e,n){if(new.target)return wt({component:ae,...e});It(n,!0);const r=()=>N(lt,"$workspace",v),c=()=>N(st,"$foldUnchanged",v),d=()=>N(rt,"$lineWrapping",v),s=()=>N(ot,"$diffSideBySide",v),[v,nt]=xt(),at=a=>{Vt(a,{embedded:!0,get foldEnabled(){return c()},onToggleFold:()=>E.dispatch(Bt()),get wrapEnabled(){return d()},onToggleWrap:()=>E.dispatch(Ft()),get splitEnabled(){return s()},onToggleSplit:()=>E.dispatch(Nt())})},it=a=>{var i=Xt(),g=X(i);{let m=f(()=>b.layout_diffHeader_goToFile_tooltip());Wt(g,()=>
|
|
4
|
+
`)}}var Xt=x("<!> <!>",1),Yt=x('<div class="flex items-center gap-1.5 px-3 py-1.5 text-xs text-subtle bg-muted/50 border-b border-border"><span> </span></div>'),Zt=x('<div class="flex flex-col h-full"><!> <div class="flex-1 min-h-0"><!></div></div>'),te=x('<div class="flex flex-col items-center justify-center h-full text-subtle gap-4"><p class="text-sm"> </p> <p class="text-xs opacity-70"> </p></div>'),ee=x('<p class="text-xs opacity-70"> </p>'),ne=x('<div class="flex flex-col items-center justify-center h-full text-subtle gap-4"><p class="text-sm"> </p> <!></div>');function ae(e,n){if(new.target)return wt({component:ae,...e});It(n,!0);const r=()=>N(lt,"$workspace",v),c=()=>N(st,"$foldUnchanged",v),d=()=>N(rt,"$lineWrapping",v),s=()=>N(ot,"$diffSideBySide",v),[v,nt]=xt(),at=a=>{Vt(a,{embedded:!0,get foldEnabled(){return c()},onToggleFold:()=>E.dispatch(Bt()),get wrapEnabled(){return d()},onToggleWrap:()=>E.dispatch(Ft()),get splitEnabled(){return s()},onToggleSplit:()=>E.dispatch(Nt())})},it=a=>{var i=Xt(),g=X(i);{let m=f(()=>b.layout_diffHeader_goToFile_tooltip());Wt(g,()=>Rt,(l,h)=>{h(l,{get icon(){return Dt},get label(){return t(m)},onclick:$=>ut()})})}var C=F(g,2);{var y=m=>{qt(m,{get filePath(){return t(K)},get workspaceId(){return _()},isDirectory:!1,embedded:!0,get workspaceFolderPath(){return t(O)}})};D(C,m=>{t(K)&&m(y)})}w(a,i)},rt=jt(),st=Ht(),ot=Mt(),dt=Gt("ActivityChangesTabType");let L=M(n,"tab",7),_=M(n,"workspaceId",7),U=M(n,"isActive",7);const G=Ut(),lt=Ot(_()),O=f(()=>r()?.worktreePath||r()?.repositoryPath||void 0),o=f(()=>L().data?.event),ct=f(()=>t(o)?Jt(t(o)):[]),u=f(()=>t(ct)[0]),p=f(()=>t(u)?.relativePath||t(u)?.file||null),K=f(()=>t(p)&&t(O)?Kt(t(p))?t(p):`${t(O)}/${t(p)}`:null),j=f(()=>()=>{if(!t(o))return null;const a=t(o).data,i=t(o).codeChange;return a?.diff||i?.diff||t(u)?.content?.diff||null}),z=f(()=>()=>t(u)?.content?!!(t(u).content.oldContent&&t(u).content.newContent):!1);function ft(a){if(!a)return;const i=a.match(/@@ -(\d+)/);return i?parseInt(i[1],10):void 0}const k=f(()=>{if(t(z)()&&t(u)?.content)return{oldContent:t(u).content.oldContent??"",newContent:t(u).content.newContent??""};const a=t(j)();return a?Qt(a):null}),W=f(()=>ft(t(j)())),pt=f(()=>t(W)!==void 0&&t(W)>1),gt=f(()=>{const a=t(p)||"",i=t(o)?.data||{};return{id:`activity-${t(o)?.id||"unknown"}-${a}`,file:a,relativePath:a,stage:q.Committed,status:t(u)?.status||"modified",stats:{additions:i?.additions||t(u)?.stats?.additions||0,deletions:i?.deletions||t(u)?.stats?.deletions||0},attribution:{timestamp:t(o)?.timestamp?new Date(t(o).timestamp).getTime():Date.now()},content:t(k)?{oldContent:t(k).oldContent,newContent:t(k).newContent}:void 0}});function ut(a){if(!t(p))return;const g={type:"file",title:t(p).split("/").pop()||t(p),closable:!0,filePath:t(p),workspaceId:_()};E.dispatch(Et(_(),g))}Q(()=>{!G||!U()||G.registerActions({display:at,actions:it})}),Q(()=>{if(t(o)){const a=t(o).data;dt.debug("Activity event diff info",{eventType:t(o).type,eventId:t(o).id,filePath:t(p),hasDiffString:!!t(j)(),hasOldNewContent:t(z)(),hasDiffContents:!!t(k),dataAdditions:a?.additions,dataDeletions:a?.deletions})}});var ht={get tab(){return L()},set tab(a){L(a),R()},get workspaceId(){return _()},set workspaceId(a){_(a),R()},get isActive(){return U()},set isActive(a){U(a),R()},$set:Tt,$on:(a,i)=>kt(n,a,i)},J=At(),mt=X(J);{var vt=a=>{var i=Zt(),g=I(i);{var C=l=>{var h=Yt(),$=I(h),H=P($,!0);A(h),B(_t=>S(H,_t),[()=>b.layout_activityChanges_partialDiff_label({line:t(W)??0})]),w(l,h)};D(g,l=>{t(pt)&&l(C)})}var y=F(g,2),m=I(y);St(m,()=>`${t(o)?.id}-${t(p)}`,l=>{{let h=f(()=>s()?"split":"unified");Lt(l,{get change(){return t(gt)},get workspaceId(){return _()},get viewMode(){return t(h)},get foldUnchanged(){return c()},get lineWrapping(){return d()},get lineOffset(){return t(W)}})}}),A(y),A(i),w(a,i)},Ct=a=>{var i=te(),g=I(i),C=P(g,!0),y=F(g,2),m=P(y,!0);A(i),B((l,h)=>{S(C,l),S(m,h)},[()=>b.layout_activityChanges_noDiffStored_label(),()=>b.layout_activityChanges_diffNotCaptured_description()]),w(a,i)},yt=a=>{var i=ne(),g=I(i),C=P(g,!0),y=F(g,2);{var m=l=>{var h=ee(),$=P(h,!0);B(H=>S($,H),[()=>b.layout_activityChanges_eventType_label({type:t(o).type})]),w(l,h)};D(y,l=>{t(o)&&l(m)})}A(i),B(l=>S(C,l),[()=>b.layout_activityChanges_noChanges_label()]),w(a,i)};D(mt,a=>{t(p)&&t(k)?a(vt):t(p)?a(Ct,1):a(yt,-1)})}w(e,J);var bt=Pt(ht);return nt(),bt}export{ae as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as ze}from"./DeFnstZp.js";import{s as Xe}from"./CI-U2zwu.js";import{b as m,W as Be,a_ as Je,V as Ze,aZ as et,U as tt,b0 as st,Y as it,X as Ne,ay as qe,r as rt,am as nt,aU as at,ab as lt,aG as ct,_ as ot,a1 as ht,aP as ut,bh as ft}from"./DWcUEP_3.js";var Ce=(function(){var e=m(function($,i,n,o){for(n=n||{},o=$.length;o--;n[$[o]]=i);return n},"o"),r=[1,3],u=[1,4],h=[1,5],f=[1,6],a=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],c=[1,22],S=[2,7],d=[1,26],_=[1,27],b=[1,28],q=[1,29],C=[1,33],A=[1,34],V=[1,35],v=[1,36],L=[1,37],x=[1,38],w=[1,24],D=[1,31],O=[1,32],M=[1,30],R=[1,39],g=[1,40],p=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],P=[1,61],X=[89,90],Ae=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],Ee=[27,29],Ve=[1,70],ve=[1,71],Le=[1,72],xe=[1,73],we=[1,74],De=[1,75],Oe=[1,76],ee=[1,83],U=[1,80],te=[1,84],se=[1,85],ie=[1,86],re=[1,87],ne=[1,88],ae=[1,89],le=[1,90],ce=[1,91],oe=[1,92],pe=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],Y=[63,64],Me=[1,101],Fe=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],T=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],B=[1,110],Q=[1,106],H=[1,107],K=[1,108],W=[1,109],j=[1,111],he=[1,116],ue=[1,117],fe=[1,114],me=[1,115],Se={trace:m(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:m(function(i,n,o,s,E,t,de){var l=t.length-1;switch(E){case 4:this.$=t[l].trim(),s.setAccTitle(this.$);break;case 5:case 6:this.$=t[l].trim(),s.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:s.setDirection("TB");break;case 18:s.setDirection("BT");break;case 19:s.setDirection("RL");break;case 20:s.setDirection("LR");break;case 21:s.addRequirement(t[l-3],t[l-4]);break;case 22:s.addRequirement(t[l-5],t[l-6]),s.setClass([t[l-5]],t[l-3]);break;case 23:s.setNewReqId(t[l-2]);break;case 24:s.setNewReqText(t[l-2]);break;case 25:s.setNewReqRisk(t[l-2]);break;case 26:s.setNewReqVerifyMethod(t[l-2]);break;case 29:this.$=s.RequirementType.REQUIREMENT;break;case 30:this.$=s.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=s.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=s.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=s.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=s.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=s.RiskLevel.LOW_RISK;break;case 36:this.$=s.RiskLevel.MED_RISK;break;case 37:this.$=s.RiskLevel.HIGH_RISK;break;case 38:this.$=s.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=s.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=s.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=s.VerifyType.VERIFY_TEST;break;case 42:s.addElement(t[l-3]);break;case 43:s.addElement(t[l-5]),s.setClass([t[l-5]],t[l-3]);break;case 44:s.setNewElementType(t[l-2]);break;case 45:s.setNewElementDocRef(t[l-2]);break;case 48:s.addRelationship(t[l-2],t[l],t[l-4]);break;case 49:s.addRelationship(t[l-2],t[l-4],t[l]);break;case 50:this.$=s.Relationships.CONTAINS;break;case 51:this.$=s.Relationships.COPIES;break;case 52:this.$=s.Relationships.DERIVES;break;case 53:this.$=s.Relationships.SATISFIES;break;case 54:this.$=s.Relationships.VERIFIES;break;case 55:this.$=s.Relationships.REFINES;break;case 56:this.$=s.Relationships.TRACES;break;case 57:this.$=t[l-2],s.defineClass(t[l-1],t[l]);break;case 58:s.setClass(t[l-1],t[l]);break;case 59:s.setClass([t[l-2]],t[l]);break;case 60:case 62:this.$=[t[l]];break;case 61:case 63:this.$=t[l-2].concat([t[l]]);break;case 64:this.$=t[l-2],s.setCssStyle(t[l-1],t[l]);break;case 65:this.$=[t[l]];break;case 66:t[l-2].push(t[l]),this.$=t[l-2];break;case 68:this.$=t[l-1]+t[l];break}},"anonymous"),table:[{3:1,4:2,6:r,9:u,11:h,13:f},{1:[3]},{3:8,4:2,5:[1,7],6:r,9:u,11:h,13:f},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(a,[2,6]),{3:12,4:2,6:r,9:u,11:h,13:f},{1:[2,2]},{4:17,5:c,7:13,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},e(a,[2,4]),e(a,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:c,7:42,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},{4:17,5:c,7:43,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},{4:17,5:c,7:44,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},{4:17,5:c,7:45,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},{4:17,5:c,7:46,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},{4:17,5:c,7:47,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},{4:17,5:c,7:48,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},{4:17,5:c,7:49,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},{4:17,5:c,7:50,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},e(p,[2,17]),e(p,[2,18]),e(p,[2,19]),e(p,[2,20]),{30:60,33:62,75:P,89:R,90:g},{30:63,33:62,75:P,89:R,90:g},{30:64,33:62,75:P,89:R,90:g},e(X,[2,29]),e(X,[2,30]),e(X,[2,31]),e(X,[2,32]),e(X,[2,33]),e(X,[2,34]),e(Ae,[2,81]),e(Ae,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},e(Ee,[2,79]),e(Ee,[2,80]),{27:[1,67],29:[1,68]},e(Ee,[2,85]),e(Ee,[2,86]),{62:69,65:Ve,66:ve,67:Le,68:xe,69:we,70:De,71:Oe},{62:77,65:Ve,66:ve,67:Le,68:xe,69:we,70:De,71:Oe},{30:78,33:62,75:P,89:R,90:g},{73:79,75:ee,76:U,78:81,79:82,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe},e(pe,[2,60]),e(pe,[2,62]),{73:93,75:ee,76:U,78:81,79:82,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe},{30:94,33:62,75:P,76:U,89:R,90:g},{5:[1,95]},{30:96,33:62,75:P,89:R,90:g},{5:[1,97]},{30:98,33:62,75:P,89:R,90:g},{63:[1,99]},e(Y,[2,50]),e(Y,[2,51]),e(Y,[2,52]),e(Y,[2,53]),e(Y,[2,54]),e(Y,[2,55]),e(Y,[2,56]),{64:[1,100]},e(p,[2,59],{76:U}),e(p,[2,64],{76:Me}),{33:103,75:[1,102],89:R,90:g},e(Fe,[2,65],{79:104,75:ee,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe}),e(T,[2,67]),e(T,[2,69]),e(T,[2,70]),e(T,[2,71]),e(T,[2,72]),e(T,[2,73]),e(T,[2,74]),e(T,[2,75]),e(T,[2,76]),e(T,[2,77]),e(T,[2,78]),e(p,[2,57],{76:Me}),e(p,[2,58],{76:U}),{5:B,28:105,31:Q,34:H,36:K,38:W,40:j},{27:[1,112],76:U},{5:he,40:ue,56:113,57:fe,59:me},{27:[1,118],76:U},{33:119,89:R,90:g},{33:120,89:R,90:g},{75:ee,78:121,79:82,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe},e(pe,[2,61]),e(pe,[2,63]),e(T,[2,68]),e(p,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:B,28:126,31:Q,34:H,36:K,38:W,40:j},e(p,[2,28]),{5:[1,127]},e(p,[2,42]),{32:[1,128]},{32:[1,129]},{5:he,40:ue,56:130,57:fe,59:me},e(p,[2,47]),{5:[1,131]},e(p,[2,48]),e(p,[2,49]),e(Fe,[2,66],{79:104,75:ee,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe}),{33:132,89:R,90:g},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},e(p,[2,27]),{5:B,28:145,31:Q,34:H,36:K,38:W,40:j},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(p,[2,46]),{5:he,40:ue,56:152,57:fe,59:me},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},e(p,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(p,[2,43]),{5:B,28:159,31:Q,34:H,36:K,38:W,40:j},{5:B,28:160,31:Q,34:H,36:K,38:W,40:j},{5:B,28:161,31:Q,34:H,36:K,38:W,40:j},{5:B,28:162,31:Q,34:H,36:K,38:W,40:j},{5:he,40:ue,56:163,57:fe,59:me},{5:he,40:ue,56:164,57:fe,59:me},e(p,[2,23]),e(p,[2,24]),e(p,[2,25]),e(p,[2,26]),e(p,[2,44]),e(p,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:m(function(i,n){if(n.recoverable)this.trace(i);else{var o=new Error(i);throw o.hash=n,o}},"parseError"),parse:m(function(i){var n=this,o=[0],s=[],E=[null],t=[],de=this.table,l="",ge=0,$e=0,Ke=2,Pe=1,We=t.slice.call(arguments,1),y=Object.create(this.lexer),G={yy:{}};for(var be in this.yy)Object.prototype.hasOwnProperty.call(this.yy,be)&&(G.yy[be]=this.yy[be]);y.setInput(i,G.yy),G.yy.lexer=y,G.yy.parser=this,typeof y.yylloc>"u"&&(y.yylloc={});var Ie=y.yylloc;t.push(Ie);var je=y.options&&y.options.ranges;typeof G.yy.parseError=="function"?this.parseError=G.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ge(k){o.length=o.length-2*k,E.length=E.length-k,t.length=t.length-k}m(Ge,"popStack");function Ue(){var k;return k=s.pop()||y.lex()||Pe,typeof k!="number"&&(k instanceof Array&&(s=k,k=s.pop()),k=n.symbols_[k]||k),k}m(Ue,"lex");for(var I,z,N,ke,J={},ye,F,Ye,_e;;){if(z=o[o.length-1],this.defaultActions[z]?N=this.defaultActions[z]:((I===null||typeof I>"u")&&(I=Ue()),N=de[z]&&de[z][I]),typeof N>"u"||!N.length||!N[0]){var Te="";_e=[];for(ye in de[z])this.terminals_[ye]&&ye>Ke&&_e.push("'"+this.terminals_[ye]+"'");y.showPosition?Te="Parse error on line "+(ge+1)+`:
|
|
1
|
+
import{g as ze}from"./CM7Hb3PZ.js";import{s as Xe}from"./ubLEbEcV.js";import{b as m,W as Be,a_ as Je,V as Ze,aZ as et,U as tt,b0 as st,Y as it,X as Ne,ay as qe,r as rt,am as nt,aU as at,ab as lt,aG as ct,_ as ot,a1 as ht,aP as ut,bh as ft}from"./DwsRDnkS.js";var Ce=(function(){var e=m(function($,i,n,o){for(n=n||{},o=$.length;o--;n[$[o]]=i);return n},"o"),r=[1,3],u=[1,4],h=[1,5],f=[1,6],a=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],c=[1,22],S=[2,7],d=[1,26],_=[1,27],b=[1,28],q=[1,29],C=[1,33],A=[1,34],V=[1,35],v=[1,36],L=[1,37],x=[1,38],w=[1,24],D=[1,31],O=[1,32],M=[1,30],R=[1,39],g=[1,40],p=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],P=[1,61],X=[89,90],Ae=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],Ee=[27,29],Ve=[1,70],ve=[1,71],Le=[1,72],xe=[1,73],we=[1,74],De=[1,75],Oe=[1,76],ee=[1,83],U=[1,80],te=[1,84],se=[1,85],ie=[1,86],re=[1,87],ne=[1,88],ae=[1,89],le=[1,90],ce=[1,91],oe=[1,92],pe=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],Y=[63,64],Me=[1,101],Fe=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],T=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],B=[1,110],Q=[1,106],H=[1,107],K=[1,108],W=[1,109],j=[1,111],he=[1,116],ue=[1,117],fe=[1,114],me=[1,115],Se={trace:m(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:m(function(i,n,o,s,E,t,de){var l=t.length-1;switch(E){case 4:this.$=t[l].trim(),s.setAccTitle(this.$);break;case 5:case 6:this.$=t[l].trim(),s.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:s.setDirection("TB");break;case 18:s.setDirection("BT");break;case 19:s.setDirection("RL");break;case 20:s.setDirection("LR");break;case 21:s.addRequirement(t[l-3],t[l-4]);break;case 22:s.addRequirement(t[l-5],t[l-6]),s.setClass([t[l-5]],t[l-3]);break;case 23:s.setNewReqId(t[l-2]);break;case 24:s.setNewReqText(t[l-2]);break;case 25:s.setNewReqRisk(t[l-2]);break;case 26:s.setNewReqVerifyMethod(t[l-2]);break;case 29:this.$=s.RequirementType.REQUIREMENT;break;case 30:this.$=s.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=s.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=s.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=s.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=s.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=s.RiskLevel.LOW_RISK;break;case 36:this.$=s.RiskLevel.MED_RISK;break;case 37:this.$=s.RiskLevel.HIGH_RISK;break;case 38:this.$=s.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=s.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=s.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=s.VerifyType.VERIFY_TEST;break;case 42:s.addElement(t[l-3]);break;case 43:s.addElement(t[l-5]),s.setClass([t[l-5]],t[l-3]);break;case 44:s.setNewElementType(t[l-2]);break;case 45:s.setNewElementDocRef(t[l-2]);break;case 48:s.addRelationship(t[l-2],t[l],t[l-4]);break;case 49:s.addRelationship(t[l-2],t[l-4],t[l]);break;case 50:this.$=s.Relationships.CONTAINS;break;case 51:this.$=s.Relationships.COPIES;break;case 52:this.$=s.Relationships.DERIVES;break;case 53:this.$=s.Relationships.SATISFIES;break;case 54:this.$=s.Relationships.VERIFIES;break;case 55:this.$=s.Relationships.REFINES;break;case 56:this.$=s.Relationships.TRACES;break;case 57:this.$=t[l-2],s.defineClass(t[l-1],t[l]);break;case 58:s.setClass(t[l-1],t[l]);break;case 59:s.setClass([t[l-2]],t[l]);break;case 60:case 62:this.$=[t[l]];break;case 61:case 63:this.$=t[l-2].concat([t[l]]);break;case 64:this.$=t[l-2],s.setCssStyle(t[l-1],t[l]);break;case 65:this.$=[t[l]];break;case 66:t[l-2].push(t[l]),this.$=t[l-2];break;case 68:this.$=t[l-1]+t[l];break}},"anonymous"),table:[{3:1,4:2,6:r,9:u,11:h,13:f},{1:[3]},{3:8,4:2,5:[1,7],6:r,9:u,11:h,13:f},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(a,[2,6]),{3:12,4:2,6:r,9:u,11:h,13:f},{1:[2,2]},{4:17,5:c,7:13,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},e(a,[2,4]),e(a,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:c,7:42,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},{4:17,5:c,7:43,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},{4:17,5:c,7:44,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},{4:17,5:c,7:45,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},{4:17,5:c,7:46,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},{4:17,5:c,7:47,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},{4:17,5:c,7:48,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},{4:17,5:c,7:49,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},{4:17,5:c,7:50,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},e(p,[2,17]),e(p,[2,18]),e(p,[2,19]),e(p,[2,20]),{30:60,33:62,75:P,89:R,90:g},{30:63,33:62,75:P,89:R,90:g},{30:64,33:62,75:P,89:R,90:g},e(X,[2,29]),e(X,[2,30]),e(X,[2,31]),e(X,[2,32]),e(X,[2,33]),e(X,[2,34]),e(Ae,[2,81]),e(Ae,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},e(Ee,[2,79]),e(Ee,[2,80]),{27:[1,67],29:[1,68]},e(Ee,[2,85]),e(Ee,[2,86]),{62:69,65:Ve,66:ve,67:Le,68:xe,69:we,70:De,71:Oe},{62:77,65:Ve,66:ve,67:Le,68:xe,69:we,70:De,71:Oe},{30:78,33:62,75:P,89:R,90:g},{73:79,75:ee,76:U,78:81,79:82,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe},e(pe,[2,60]),e(pe,[2,62]),{73:93,75:ee,76:U,78:81,79:82,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe},{30:94,33:62,75:P,76:U,89:R,90:g},{5:[1,95]},{30:96,33:62,75:P,89:R,90:g},{5:[1,97]},{30:98,33:62,75:P,89:R,90:g},{63:[1,99]},e(Y,[2,50]),e(Y,[2,51]),e(Y,[2,52]),e(Y,[2,53]),e(Y,[2,54]),e(Y,[2,55]),e(Y,[2,56]),{64:[1,100]},e(p,[2,59],{76:U}),e(p,[2,64],{76:Me}),{33:103,75:[1,102],89:R,90:g},e(Fe,[2,65],{79:104,75:ee,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe}),e(T,[2,67]),e(T,[2,69]),e(T,[2,70]),e(T,[2,71]),e(T,[2,72]),e(T,[2,73]),e(T,[2,74]),e(T,[2,75]),e(T,[2,76]),e(T,[2,77]),e(T,[2,78]),e(p,[2,57],{76:Me}),e(p,[2,58],{76:U}),{5:B,28:105,31:Q,34:H,36:K,38:W,40:j},{27:[1,112],76:U},{5:he,40:ue,56:113,57:fe,59:me},{27:[1,118],76:U},{33:119,89:R,90:g},{33:120,89:R,90:g},{75:ee,78:121,79:82,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe},e(pe,[2,61]),e(pe,[2,63]),e(T,[2,68]),e(p,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:B,28:126,31:Q,34:H,36:K,38:W,40:j},e(p,[2,28]),{5:[1,127]},e(p,[2,42]),{32:[1,128]},{32:[1,129]},{5:he,40:ue,56:130,57:fe,59:me},e(p,[2,47]),{5:[1,131]},e(p,[2,48]),e(p,[2,49]),e(Fe,[2,66],{79:104,75:ee,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe}),{33:132,89:R,90:g},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},e(p,[2,27]),{5:B,28:145,31:Q,34:H,36:K,38:W,40:j},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(p,[2,46]),{5:he,40:ue,56:152,57:fe,59:me},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},e(p,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(p,[2,43]),{5:B,28:159,31:Q,34:H,36:K,38:W,40:j},{5:B,28:160,31:Q,34:H,36:K,38:W,40:j},{5:B,28:161,31:Q,34:H,36:K,38:W,40:j},{5:B,28:162,31:Q,34:H,36:K,38:W,40:j},{5:he,40:ue,56:163,57:fe,59:me},{5:he,40:ue,56:164,57:fe,59:me},e(p,[2,23]),e(p,[2,24]),e(p,[2,25]),e(p,[2,26]),e(p,[2,44]),e(p,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:m(function(i,n){if(n.recoverable)this.trace(i);else{var o=new Error(i);throw o.hash=n,o}},"parseError"),parse:m(function(i){var n=this,o=[0],s=[],E=[null],t=[],de=this.table,l="",ge=0,$e=0,Ke=2,Pe=1,We=t.slice.call(arguments,1),y=Object.create(this.lexer),G={yy:{}};for(var be in this.yy)Object.prototype.hasOwnProperty.call(this.yy,be)&&(G.yy[be]=this.yy[be]);y.setInput(i,G.yy),G.yy.lexer=y,G.yy.parser=this,typeof y.yylloc>"u"&&(y.yylloc={});var Ie=y.yylloc;t.push(Ie);var je=y.options&&y.options.ranges;typeof G.yy.parseError=="function"?this.parseError=G.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ge(k){o.length=o.length-2*k,E.length=E.length-k,t.length=t.length-k}m(Ge,"popStack");function Ue(){var k;return k=s.pop()||y.lex()||Pe,typeof k!="number"&&(k instanceof Array&&(s=k,k=s.pop()),k=n.symbols_[k]||k),k}m(Ue,"lex");for(var I,z,N,ke,J={},ye,F,Ye,_e;;){if(z=o[o.length-1],this.defaultActions[z]?N=this.defaultActions[z]:((I===null||typeof I>"u")&&(I=Ue()),N=de[z]&&de[z][I]),typeof N>"u"||!N.length||!N[0]){var Te="";_e=[];for(ye in de[z])this.terminals_[ye]&&ye>Ke&&_e.push("'"+this.terminals_[ye]+"'");y.showPosition?Te="Parse error on line "+(ge+1)+`:
|
|
2
2
|
`+y.showPosition()+`
|
|
3
3
|
Expecting `+_e.join(", ")+", got '"+(this.terminals_[I]||I)+"'":Te="Parse error on line "+(ge+1)+": Unexpected "+(I==Pe?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError(Te,{text:y.match,token:this.terminals_[I]||I,line:y.yylineno,loc:Ie,expected:_e})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+z+", token: "+I);switch(N[0]){case 1:o.push(I),E.push(y.yytext),t.push(y.yylloc),o.push(N[1]),I=null,$e=y.yyleng,l=y.yytext,ge=y.yylineno,Ie=y.yylloc;break;case 2:if(F=this.productions_[N[1]][1],J.$=E[E.length-F],J._$={first_line:t[t.length-(F||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(F||1)].first_column,last_column:t[t.length-1].last_column},je&&(J._$.range=[t[t.length-(F||1)].range[0],t[t.length-1].range[1]]),ke=this.performAction.apply(J,[l,$e,ge,G.yy,N[1],E,t].concat(We)),typeof ke<"u")return ke;F&&(o=o.slice(0,-1*F*2),E=E.slice(0,-1*F),t=t.slice(0,-1*F)),o.push(this.productions_[N[1]][0]),E.push(J.$),t.push(J._$),Ye=de[o[o.length-2]][o[o.length-1]],o.push(Ye);break;case 3:return!0}}return!0},"parse")},He=(function(){var $={EOF:1,parseError:m(function(n,o){if(this.yy.parser)this.yy.parser.parseError(n,o);else throw new Error(n)},"parseError"),setInput:m(function(i,n){return this.yy=n||this.yy||{},this._input=i,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:m(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var n=i.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},"input"),unput:m(function(i){var n=i.length,o=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var s=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),o.length-1&&(this.yylineno-=o.length-1);var E=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:o?(o.length===s.length?this.yylloc.first_column:0)+s[s.length-o.length].length-o[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:m(function(){return this._more=!0,this},"more"),reject:m(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:m(function(i){this.unput(this.match.slice(i))},"less"),pastInput:m(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:m(function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:m(function(){var i=this.pastInput(),n=new Array(i.length+1).join("-");return i+this.upcomingInput()+`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ni as P,nt as g,
|
|
1
|
+
import{ni as P,nt as g,HR as h,ub as d,ug as p,ud as y,gS as v,gt as f,gU as m,gT as A,zy as u,zx as L,Cq as S,C0 as F,C3 as z,zA as C,sO as O,Az as M,sL as B,sP as x,sQ as R,gK as J,gV as _,gw as H,gv as j,JO as D,JM as V,JN as E,Jv as U,n1 as q,HE as G,gM as N,sM as K,JJ as Q,JL as W,Ap as Z,Ip as X,Ah as Y,d4 as $,o1 as ss,o3 as es,o2 as ts,o4 as as,Da as is,hZ as os,y7 as rs,g6 as T,id as cs,i7 as hs,qd as ls}from"./Bo4s1kgI.js";import{bo as ns}from"./eK7OULll.js";import{F as ds,e as ps,z as us,p as I,v as Is,G as b,J as bs}from"./BXean12D.js";function ws(i,s,e,t){const a=s?.activeTabId;if(!s||!a||!s.tabs.some(r=>r.id===a))return null;const o=t?P(t).map(g):i.map(r=>[r]),c=o.findIndex(r=>r.includes(s.id));if(c<0)return null;const n=o[c+(e==="next"?1:-1)]?.[0];return n?{kind:"neighbor",tabId:a,targetPanelId:n}:o.length>=4||s.tabs.length<2&&o[c].length<2?null:{kind:"edge",tabId:a,position:e==="next"?"after":"before"}}class k{constructor(s){this.workspaceId=s}get state(){return h.state}dispatch(s){h.dispatch(s)}getPanelIds(){return ds.select(this.state,this.workspaceId)}getAllTabs(){return ps.select(this.state,this.workspaceId)}getPanel(s){return us.select(this.state,this.workspaceId,s)??null}getOtherPanelId(){const s=this.getPanelIds();if(s.length<2)return null;const e=I.select(this.state,this.workspaceId);return s.find(t=>t!==e)??null}openTab(s,e){if(e){this.dispatch(d(this.workspaceId,s,e));return}this.dispatch(p(this.workspaceId,s))}openUserTab(s,e){const t=e??I.select(this.state,this.workspaceId)??void 0;if(t){this.dispatch(d(this.workspaceId,s,t,void 0,!0));return}this.dispatch(p(this.workspaceId,s,{force:!0}))}openTabInAdjacentOrSplit(s,e,t){this.dispatch(y(this.workspaceId,s,e,t))}openBrowserPanel(s,e,t,a){const o={type:"browser",title:ns.layout_tabTypes_browser_title(),browserUrl:s??"about:blank",...a===void 0?{}:{browserRequestedUrl:a},contextItemId:e,closable:!0};this.openTabInAdjacentOrSplit(o,t)}closeTab(s,e){this.dispatch(v(this.workspaceId,s,e))}closeActiveTab(s){this.dispatch(f(this.workspaceId,s))}closeTabsByType(s,e,t){this.dispatch(m(this.workspaceId,s,e,t))}closeTabsByAgentId(s){this.dispatch(A(this.workspaceId,s))}reopenClosedTab(s,e){this.dispatch(u(this.workspaceId,void 0,s,e))}reopenLastClosed(){const s=Is.select(this.state,this.workspaceId);s?.kind==="column"?this.dispatch(L(this.workspaceId)):s?.kind==="tab"&&this.dispatch(u(this.workspaceId))}setActiveTab(s,e){this.dispatch(S(this.workspaceId,s,e))}selectNextTab(s){this.dispatch(F(this.workspaceId,s))}selectPreviousTab(s){this.dispatch(z(this.workspaceId,s))}reorderTabs(s,e,t){this.dispatch(C(this.workspaceId,s,e,t))}moveTabToPanel(s,e,t,a){this.dispatch(O(this.workspaceId,s,e,t,a))}moveActivePaneToColumn(s,e){const t=ws(this.getPanelIds(),this.getPanel(s),e,b.select(this.state,this.workspaceId));return t?(t.kind==="neighbor"?this.moveTabToPanel(t.tabId,s,t.targetPanelId):this.moveTabToSplitLevel(t.tabId,s,[],t.position,"horizontal"),!0):!1}canMoveActivePaneVertically(s,e){return M(b.select(this.state,this.workspaceId),this.getPanel(s),e)!==null}moveActivePaneVertically(s,e){return this.canMoveActivePaneVertically(s,e)?(this.dispatch(B(this.workspaceId,s,e)),!0):!1}moveTabToSplit(s,e,t,a){this.dispatch(x(this.workspaceId,s,e,t,a))}moveTabToSplitLevel(s,e,t,a,o){this.dispatch(R(this.workspaceId,s,e,t,a,o))}closeOtherTabs(s,e){this.dispatch(J(this.workspaceId,s,e))}closeTabsToRight(s,e){this.dispatch(_(this.workspaceId,s,e))}closeAllTabs(s){this.dispatch(H(this.workspaceId,s))}closeAllOthersEverywhere(s,e){this.dispatch(j(this.workspaceId,s,e))}updateTabTitle(s,e){this.dispatch(D(this.workspaceId,s,e))}updateTabBrowserUrl(s,e){this.dispatch(V(this.workspaceId,s,e))}updateTabFavicon(s,e){this.dispatch(E(this.workspaceId,s,e))}updateFileTabPath(s,e){this.dispatch(U(this.workspaceId,s,e))}focusPanel(s){this.dispatch(q(this.workspaceId,s))}splitPanel(s,e,t){this.dispatch(G(this.workspaceId,s,e,t))}closePanel(s){this.dispatch(N(this.workspaceId,s))}movePanel(s,e,t){this.dispatch(K(this.workspaceId,s,e,t))}updateSizes(s,e){this.dispatch(Q(this.workspaceId,s,e))}updateSplitSizes(s,e){this.dispatch(W(this.workspaceId,s,e))}resizeRootDivider(s,e){this.dispatch(Z(this.workspaceId,s,e))}toggleExpandPanel(s){this.dispatch(X(this.workspaceId,s))}resetLayout(){this.dispatch(Y(this.workspaceId))}applyPreset(s){this.dispatch($(this.workspaceId,s))}goBack(){this.dispatch(ss(this.workspaceId))}goForward(){this.dispatch(es(this.workspaceId))}goBackInFocusHistory(){this.dispatch(ts(this.workspaceId))}goForwardInFocusHistory(){this.dispatch(as(this.workspaceId))}setDeferSpecTab(s){this.dispatch(is(this.workspaceId,s))}consumePendingFocus(s){this.dispatch(os(this.workspaceId,s))}reconcileStaleAgentTabs(s,e,t){const a=Array.isArray(s)?s:Array.from(s);this.dispatch(rs(this.workspaceId,a,e,t))}clearLayout(){this.dispatch(T(this.workspaceId))}createGridLayout(s){return this.dispatch(cs(this.workspaceId,s)),this.getPanelIds()}batchMutations(s){return s()}initializeLayout(s){const e=s??hs();this.dispatch(ls(this.workspaceId,e))}cyclePresets(){const s=bs.select(this.state,this.workspaceId),e=Object.keys(s).length;e<=1?this.applyPreset("split-horizontal"):e===2?this.applyPreset("three-column"):this.applyPreset("single")}}const l=new Map;function Ts(i){let s=l.get(i);return s||(s=new k(i),l.set(i,s)),s}function ks(i){return!0}function Ps(i){l.delete(i)}function w(i){h.dispatch(T(i))}const fs=Object.freeze(Object.defineProperty({__proto__:null,PanelLayoutAdapter:k,clearPanelLayoutAdapter:Ps,clearPanelLayoutFn:w,clearPanelLayoutForWorkspace:w,getPanelLayoutManager:Ts,hasPanelLayoutManager:ks},Symbol.toStringTag,{value:"Module"}));export{Ps as c,Ts as g,ks as h,fs as p,ws as r};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/
|
|
2
|
-
var za=Object.defineProperty;var Ba=(a,t,r)=>t in a?za(a,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):a[t]=r;var lt=(a,t,r)=>Ba(a,typeof t!="symbol"?t+"":t,r);import{bo as A,t as tt,bq as I,a_ as ie,by as at,b as rt,bs as Va,bu as Xt,_ as ka}from"./DozYGPQ1.js";import{bs as nt,a5 as N,aD as e,bA as L,b_ as Z,W as H,bn as st,c9 as E,aA as M,aB as z,ca as kt,bk as ya,c6 as Ka,cd as Wt,bV as ne,bS as q,ay as Fe,bl as me,bO as ge,ai as xa,a7 as Ut,c0 as ja,bf as Nt,bH as O,aw as He,aj as Ae,be as Ga,c3 as ut,bb as Mt,aF as Qa,br as Ya,bj as Xa}from"./DYhIMPy1.js";import{d as $a,f as Ja,k as Oe,l as Ct,s as $,a as Ze,h as zt,i as Za}from"./CBE9bOjQ.js";import{aN as er,cV as tr,L as ar,av as rr,dj as nr,V as sr,dm as Aa,B as or,$ as ir}from"./SrOLwB5L.js";import{t as Bt}from"./D_FHOcPH.js";import{a7 as cr,ak as lr,A as dr,o as ur,a4 as Ia,s as Vt,a3 as Kt,aB as yt,aY as Ma,n as fr,aD as pr,aX as mr}from"./CZFJH8pA.js";import{l as $t}from"./cYktK7bI.js";import{bU as gr,bR as vr,bS as Jt,aA as hr}from"./BLl4jbbs.js";import{w as dt,P as br}from"./Dlalsrb2.js";import{f as jt,bc as Ht}from"./DkrIcKd4.js";import{t as qe,v as wr,H as It,E as Zt,c as ea}from"./C72zM9oE.js";import{rb as Ca,HQ as ve,mc as _r,fK as kr,n7 as yr,tK as xr,a as Ar,vn as Ir,su as Mr,qV as Cr,g as Sr,bi as ta,us as Rr,sh as Er,uu as Pr}from"./DYepVMa7.js";import{c as Tr,l as ht}from"./ChTqQfQN.js";import{o as Fr}from"./KJelEqX3.js";import{aP as Lr,aQ as aa,bz as Wr,aA as Nr,by as Hr,aE as Or,c_ as qr,cO as Dr,F as bt,ax as ra,bH as Ur,bC as zr}from"./CpEHCOut.js";import{l as Br}from"./CDFwOYFZ.js";import{p as Vr,cV as wt,cU as na,an as Kr,cX as Sa,a7 as St,aD as Ra,aU as jr,av as Gr,a6 as sa,r as Qr,aL as Yr,aQ as Xr,F as $r}from"./VKc1-U2z.js";import{s as Ot}from"./B30Ssr1r.js";import{b as et}from"./BaIAhI85.js";import{s as Jr}from"./CZ5Pr0zI.js";import{c as Zr,u as en,s as tn,a as an}from"./DfxQWSVU.js";import{N as oa,J as ia}from"./H5XG0yyu.js";import{g as ca}from"./DSbw-nyW.js";import{X as la}from"./C7-4lB53.js";const rn=new Set(["failed","blocked","needs_attention","in_progress"]),nn={failed:{visual:"icon",icon:Dr,className:"text-foreground"},blocked:{visual:"icon",icon:qr,className:"text-danger"},needs_attention:{visual:"icon",icon:Or,className:"text-warning-ink"},in_progress:{visual:"dot",icon:null,className:"workspace-status-color-active"},waiting:{visual:"icon",icon:Hr,className:"text-muted-foreground"},unread:{visual:"dot",icon:null,className:"workspace-status-color-unread"},not_started:{visual:"dot",icon:null,className:"text-muted-foreground/35"},idle:{visual:"dot",icon:null,className:"text-muted-foreground/35"},complete:{visual:"icon",icon:Nr,className:"text-success"},pr_queued:{visual:"icon",icon:Wr,className:"text-info"},pr_ready:{visual:"icon",icon:aa,className:"text-success"},pr_open:{visual:"icon",icon:aa,className:"text-info"},pr_merged:{visual:"icon",icon:Lr,className:"text-purple-500"}};function sn(a){switch(a){case"failed":return A.workspace_statusIcon_failed_label();case"blocked":return A.workspace_statusIcon_blocked_label();case"needs_attention":return A.workspace_statusIcon_needsAttention_label();case"in_progress":return A.workspace_statusIcon_inProgress_label();case"waiting":return A.workspace_taskStatus_waiting_label();case"unread":return A.layout_activeCard_unread_header();case"not_started":return A.workspace_statusIcon_notStarted_label();case"idle":return A.workspace_statusIcon_idle_label();case"complete":return A.workspace_statusIcon_complete_label();case"pr_queued":return A.workspace_statusIcon_prQueued_label();case"pr_ready":return A.workspace_statusIcon_prReady_label();case"pr_open":return A.workspace_statusIcon_prOpen_label();case"pr_merged":return A.workspace_statusIcon_prMerged_label()}}function on(a){const t=Ca(a.displayStatus)?a.displayStatus:"not_started";return rn.has(t)?t:a.attention==="unread"?"unread":a.waiting===!0?"waiting":t}function Ea(a){const t=a==="waiting"||a==="unread"||Ca(a)?a:"not_started",r=sn(t);return{state:t,...nn[t],label:r,tooltip:r,accessibleName:r}}var cn=z('<span class="workspace-status-dot svelte-14zk5l0" data-workspace-status-dot=""></span>'),ln=z("<span><!></span>");function Pa(a,t){if(new.target)return tt({component:Pa,...a});nt(t,!0);let r=I(t,"status",7),l=I(t,"size",7,14),c=I(t,"decorative",7,!1),u=I(t,"class",7);const s=E(()=>Ea(r()));var o={get status(){return r()},set status(m){r(m),M()},get size(){return l()},set size(m=14){l(m),M()},get decorative(){return c()},set decorative(m=!1){c(m),M()},get class(){return u()},set class(m){u(m),M()},$set:at,$on:(m,k)=>rt(t,m,k)},g=ln(),x=N(g);{var b=m=>{var k=cn();H(m,k)},w=m=>{bt(m,{get icon(){return e(s).icon},class:"size-full!"})};ie(x,m=>{e(s).visual==="dot"?m(b):e(s).icon&&m(w,1)})}return L(g),Z(m=>{Oe(g,1,m,"svelte-14zk5l0"),Ct(g,`width: ${l()??""}px; height: ${l()??""}px;`),$(g,"role",c()?void 0:"img"),$(g,"aria-label",c()?void 0:e(s).accessibleName),$(g,"aria-hidden",c()?"true":void 0),$(g,"title",c()?void 0:e(s).tooltip),$(g,"data-workspace-status",e(s).state),$(g,"data-workspace-status-visual",e(s).visual),$(g,"data-workspace-status-icon",e(s).icon?.iconName)},[()=>$a(Ja("workspace-status-icon inline-flex shrink-0 items-center justify-center forced-colors:text-[CanvasText]",e(s).className,u()))]),H(a,g),st(o)}const Gt=6e4,Qt=60*Gt,Yt=24*Qt,da=30*Yt;function dn(a,t=new Date){if(a==null)return null;const r=a instanceof Date?a:new Date(a),l=r.getTime(),c=t.getTime();if(!Number.isFinite(l)||!Number.isFinite(c))return null;const u=Math.max(0,c-l);let s;u<Gt?s="<1m":u<Qt?s=`${qe(Math.floor(u/Gt))}m`:u<Yt?s=`${qe(Math.floor(u/Qt))}h`:u<da?s=`${qe(Math.floor(u/Yt))}d`:s=`${qe(Math.floor(u/da))}mo`;const o=l>c?t:r,g=wr(o,{now:t});return g?{compact:s,accessible:g,dateTime:r.toISOString()}:null}var un=z('<div><div class="grid gap-0.5 px-5 pt-4"><div class="flex min-w-0 items-center justify-between gap-3"><!> <!></div> <!> <!></div> <div class="my-3 border-t border-border" data-workspace-hover-card-divider=""></div> <div class="body-grid grid min-w-0 grid-cols-1 items-stretch gap-3 px-5 pb-4" data-workspace-hover-card-columns=""><div class="grid" data-workspace-hover-card-activity=""><!></div> <div class="pull-requests grid" data-workspace-hover-card-pr-column=""><!></div></div></div>'),fn=z('<p class="type-caption mt-1 min-w-0 line-clamp-3 text-muted-foreground" data-workspace-hover-card-summary=""> </p>'),pn=z('<span class="shrink-0 text-muted-foreground" data-workspace-hover-card-question-meta=""><span aria-hidden="true"> </span></span>'),mn=z('<span class="row-span-2 flex h-(--text-caption-line-height) items-center" aria-hidden="true"><!></span><span class="type-caption min-w-0 truncate text-foreground" data-workspace-hover-card-agent-name=""> </span><time class="type-caption whitespace-nowrap text-muted-foreground" data-workspace-hover-card-agent-time=""> </time> <span class="agent-detail type-caption flex min-w-0 items-start gap-1.5 text-muted-foreground svelte-1vax087" data-workspace-hover-card-agent-detail=""><span class="min-w-0 truncate" data-workspace-hover-card-agent-context=""> </span><!></span>',1),ua=z('<div role="listitem"><!></div>'),gn=z('<div class="type-caption mt-3 flex items-center justify-between text-muted-foreground" data-workspace-hover-card-overflow=""><span> </span> <!></div>'),vn=z('<section class="activity min-w-0" data-workspace-hover-card-activity="" data-workspace-hover-card-agent-table=""><div class="-mx-2 grid gap-2" role="list"></div> <!></section>'),hn=z('<!> <span class="type-caption min-w-0 truncate text-foreground" data-workspace-hover-card-pr-title=""> </span> <span class="type-caption shrink-0 text-muted-foreground" data-workspace-hover-card-pr-status=""> </span> <span class="type-caption shrink-0 text-muted-foreground" data-workspace-hover-card-pr-number=""> </span>',1),bn=z('<div class="grid w-full min-w-0 grid-cols-[1rem_minmax(0,1fr)_auto_auto] items-center gap-x-2 rounded-sm px-2 py-0 text-left" data-workspace-hover-card-pr-row=""><!></div>'),wn=z('<div class="type-caption mt-3 flex items-center justify-between text-muted-foreground" data-workspace-hover-card-pr-overflow=""><span> </span> <!></div>'),_n=z('<section class="pull-requests min-w-0" data-workspace-hover-card-pr-column=""><div class="-mx-2 grid min-w-0 gap-2" role="list" data-workspace-hover-card-pr-list=""></div> <!></section>'),kn=z('<div class="my-3 border-t border-border" data-workspace-hover-card-divider=""></div> <div class="body-grid grid min-w-0 grid-cols-1 items-stretch gap-3 px-5 pb-4" data-workspace-hover-card-columns=""><!> <!></div>',1),yn=z('<header data-workspace-hover-card-header=""><div class="min-w-0" data-workspace-hover-card-identity=""><div class="flex min-w-0 items-center justify-between gap-3"><h2 class="type-body min-w-0 truncate font-medium text-foreground" data-workspace-hover-card-title=""> </h2> <span class="type-caption flex shrink-0 items-center gap-1.5 text-muted-foreground" data-workspace-hover-card-status=""><span class="truncate" data-workspace-hover-card-status-label=""> </span><!></span></div> <div class="type-caption mt-0.5 min-w-0 truncate text-muted-foreground" data-workspace-hover-card-repo=""> </div> <!></div></header> <!>',1),xn=z('<section class="workspace-hover-card shrink-0 overflow-hidden rounded-md bg-background text-left text-foreground shadow-(--elevation-overlay) ring-1 ring-border svelte-1vax087" data-workspace-hover-card="" data-workspace-hover-card-layout="landscape"><!></section>');function An(a,t){if(new.target)return tt({component:An,...a});nt(t,!0);const r=()=>Xt(T,"$workspaceAgents$",c),l=()=>Xt(i,"$prMonitors$",c),[c,u]=Va(),s=Tr("WorkspaceHoverCard");let o=I(t,"workspace",7),g=I(t,"isLoading",7,!1),x=I(t,"activeAgentIds",23,()=>[]),b=I(t,"loadAgentSessions",7,!0),w=I(t,"onkeydown",7),m=I(t,"staticData",7,!1);const k=Wt("");function U(){return m()?Wt([]):er(k)}function B(){return m()?Wt([]):tr(k)}const T=U(),i=B();kt(()=>k.set(o()?.id??""));let p=ne(0);ya(()=>$t.subscribe(()=>Ka(p)));let _=E(()=>o()?.agentSummary?.agentIds??[]),P=E(()=>(e(p),o()?$t.getStreamingAgentIdsForWorkspace(o().id):[])),D=null,Q=new Set;kt(()=>{if(!o()||!b())return;const d=String(o().id);D!==d&&(D=d,Q=new Set);for(const C of new Set([...e(_).slice(0,6),...x(),...e(P)]))Q.has(C)||(ve.dispatch(_r(d,C)),Q.add(C))});function se(d){return[d.name,d.context,d.questionMeta?.accessible,d.updated.accessible].filter(Boolean).join(". ")}function Ce(d){return d?d.kind==="attention"?d.attention.reason?.trim()||null:"text"in d&&d.text.trim()||null:null}function le(d){return dn(d.lastActivity||d.updatedAt||d.createdAt)??{compact:"—",accessible:A.workspace_hoverCard_noRecentActivity_label()}}function y(d){const C=String(d.status).toLowerCase(),F=yr(d),X=lr(d),be=X==="question"?gr(d):null,pe=Ce(rr.select(ve.state,String(d.id)));let we,Ee,_e,n,f,W,S=!1;if(X==="question"){we="attention",Ee="question",_e=be?.questions[0]?.question.trim()||pe||A.workspace_hoverCard_question_label(),n="question",f=1;const K=be?.questions.length??0;K>1&&(W={compact:`${qe(1)}/${qe(K)}`,accessible:A.chat_questionWizard_stepCounter_label({current:1,total:K})})}else if(X==="attention-discussion")we="attention",Ee="discussion",_e=F?.reason?.trim()||A.chat_agentCard_attentionDiscussion_label(),n="attention-discussion",f=1;else if(X==="attention-blocker"||C==="blocked")we="attention",Ee="blocker",_e=F?.reason?.trim()||A.chat_agentCard_attentionBlocker_label(),n="attention-blocker",f=0;else if(d.hasUnread)we="attention",Ee="unread",_e=pe||A.chat_newMessagesDivider_label(),S=!!pe,n="unread",f=2;else if(d.isStreaming||d.isProcessing||x().includes(String(d.id))||e(P).includes(String(d.id))||["active","busy","processing","responding","running","streaming","in_progress"].includes(C))we="active",_e=pe||A.workspace_devScripts_running_label(),S=!!pe,n=d.isProcessing?"responding":"running",f=3;else if(["waiting","pending","queued","starting"].includes(C))we="waiting",_e=pe||A.workspace_taskStatus_waiting_label(),S=!!pe,n="waiting",f=4;else return null;const j=d.agentMetadata??d.metadata;return{id:String(d.id),name:d.name?.trim()||A.workspace_fileChanges_agent_label(),group:we,attentionKind:Ee,avatarState:n,specialist:j?.specialist,context:_e,questionMeta:W,contextIsPreview:S,updated:le(d),priority:f}}let Y=E(()=>{const d=o()?.agentSummary,C=new Map;if(Array.isArray(d?.agents))for(const F of d.agents)F&&typeof F=="object"&&typeof F.id=="string"&&C.set(F.id,F.parentAgentId);return r().filter(F=>{const X=C.get(String(F.id));return!(kr(F)!=="topLevel"||typeof X=="string"&&X||F.pendingDeleteAt||F.retiredAt||String(F.status).toLowerCase()==="deleted")})}),oe=E(()=>e(Y).map(y).filter(d=>d!==null).sort((d,C)=>d.priority-C.priority)),Le=E(()=>e(oe).slice(0,6)),Me=E(()=>Math.max(0,e(oe).length-6)),fe=E(()=>o()?.repositoryName?o().repositoryOwner?`${o().repositoryOwner} / ${o().repositoryName}`:o().repositoryName:A.workspace_hoverCard_localRepository_label()),Ve=E(()=>on(o()??{})),ke=E(()=>Ea(e(Ve))),ee=E(()=>o()?.statusMessage?.trim()||"");function Se(d){if(!d)return null;const C=d.activePullRequest??d.pullRequests?.[0]??null;return C||(d.prStatus?{id:`legacy-pr-${d.prNumber??"workspace"}`,number:d.prNumber??0,url:d.prUrl??"",title:A.workspace_hoverCard_pullRequest_label(),status:d.prStatus,createdAt:d.updatedAt,updatedAt:d.updatedAt}:null)}let ft=E(()=>o()?m()?Se(o()):nr.select(ve.state,o().id)??Se(o()):null),Ie=E(()=>{if(!o()||ar(o()))return[];const d=o().repositoryOwner&&o().repositoryName?`${o().repositoryOwner}/${o().repositoryName}`:void 0;return cr({workspacePRs:o().pullRequests,activePR:e(ft),monitors:l(),workspaceRepo:d,buildPrUrl:(C,F)=>Vr(C,o().repositoryOwner,o().repositoryName,F),getDisplayTitle:C=>C.title})}),ot=E(()=>e(Ie).slice(0,3)),De=E(()=>Math.max(0,e(Ie).length-3)),ce=E(()=>e(oe).length>0),Ke=E(()=>e(Ie).length>0),v=E(()=>e(ce)||e(Ke));function h(d){const C=d.resource?.repository.provider==="gitlab"?`${d.repo} !${d.number}`:d.repo?A.workspace_card_prBadge_repoLine_tooltip({repo:d.repo,number:d.number}):A.workspace_card_prBadge_label({number:` #${d.number}`});return[sr(C,d),d.title,d.details].filter(Boolean).join(`
|
|
3
|
-
`)}function ae(d,C){if(d.stopPropagation(),!o()||!b())return;const F=o().id;Br.select(ve.state)!==F&&Fr(F).catch(X=>{s.warn("Failed to switch workspace for hover-card agent",{agentId:C,error:X})}),ve.dispatch(xr(F,{agentId:C}))}function V(d,C){if(d.stopPropagation(),!o()||!C.url)return;const F=o().id;ka(async()=>{const{handleLink:X}=await import("./H5XG0yyu.js").then(be=>be.Q);return{handleLink:X}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56]),import.meta.url).then(({handleLink:X})=>X(C.url,{workspaceId:F,event:d}))}var te={get workspace(){return o()},set workspace(d){o(d),M()},get isLoading(){return g()},set isLoading(d=!1){g(d),M()},get activeAgentIds(){return x()},set activeAgentIds(d=[]){x(d),M()},get loadAgentSessions(){return b()},set loadAgentSessions(d=!0){b(d),M()},get onkeydown(){return w()},set onkeydown(d){w(d),M()},get staticData(){return m()},set staticData(d=!1){m(d),M()},$set:at,$on:(d,C)=>rt(t,d,C)},he=xn(),re=N(he);{var Re=d=>{var C=un(),F=N(C),X=N(F),be=N(X);dt(be,{class:"h-7 min-w-0 max-w-64 flex-1"});var pe=q(be,2);dt(pe,{class:"h-5 w-20 shrink-0"}),L(X);var we=q(X,2);dt(we,{class:"h-4 w-40"});var Ee=q(we,2);dt(Ee,{class:"mt-2 h-10 w-full"}),L(F);var _e=q(F,4),n=N(_e),f=N(n);dt(f,{class:"h-10 w-full"}),L(n);var W=q(n,2),S=N(W);dt(S,{class:"h-10 w-full"}),L(W),L(_e),L(C),H(d,C)},Ue=d=>{var C=yn(),F=Fe(C);let X;var be=N(F),pe=N(be),we=N(pe),Ee=me(we,!0),_e=q(we,2),n=N(_e),f=me(n,!0),W=q(n);Pa(W,{get status(){return e(Ve)},size:16,decorative:!0}),L(_e),L(pe);var S=q(pe,2),j=me(S,!0),K=q(S,2);{var J=ue=>{var We=fn(),xt=me(We,!0);Ze(We,(At,Rt)=>Bt?.(At,Rt),()=>e(ee)),Z(()=>ge(xt,e(ee))),H(ue,We)};ie(K,ue=>{e(ee)&&ue(J)})}L(be),L(F);var Pe=q(F,2);{var de=ue=>{var We=kn(),xt=q(Fe(We),2),At=N(xt);{var Rt=Qe=>{var ze=vn(),Ge=N(ze);zt(Ge,21,()=>e(Le),G=>G.id,(G,R)=>{var ye=ua(),Ye=N(ye);{let Xe=E(()=>se(e(R)));jt(Ye,{variant:"plain",wrapContent:!1,class:"grid h-auto! min-h-8 w-full min-w-0 cursor-pointer grid-cols-[1rem_minmax(0,1fr)_auto] items-start justify-normal gap-x-2 gap-y-0 whitespace-normal rounded-sm border-0! px-2! py-0! text-left font-normal transition-colors hover:bg-muted/50 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",get"aria-label"(){return e(Xe)},"data-workspace-hover-card-agent-row":!0,get"data-agent-group-row"(){return e(R).group},get"data-attention-kind"(){return e(R).attentionKind},get onkeydown(){return w()},onclick:Be=>ae(Be,e(R).id),children:(Be,pt)=>{var Te=mn(),xe=Fe(Te),Ne=N(xe);{let Je=E(()=>e(R).specialist??null);dr(Ne,{get agentId(){return e(R).id},variant:"compact",get state(){return e(R).avatarState},get specialist(){return e(Je)}})}L(xe);var it=q(xe),Tt=me(it,!0),$e=q(it),Ft=me($e,!0),mt=q($e,2),gt=N(mt),Lt=me(gt,!0);Ze(gt,(Je,ct)=>Bt?.(Je,ct),()=>e(R).context);var Oa=q(gt);{var qa=Je=>{var ct=pn(),Da=N(ct),Ua=me(Da,!0);L(ct),Z(()=>{$(ct,"aria-label",e(R).questionMeta.accessible),ge(Ua,e(R).questionMeta.compact)}),H(Je,ct)};ie(Oa,Je=>{e(R).questionMeta&&Je(qa)})}L(mt),Z(()=>{ge(Tt,e(R).name),$($e,"datetime",e(R).updated.dateTime),$($e,"aria-label",e(R).updated.accessible),ge(Ft,e(R).updated.compact),$(mt,"data-workspace-hover-card-agent-preview",e(R).contextIsPreview||void 0),ge(Lt,e(R).context)}),H(Be,Te)},$$slots:{default:!0}})}L(ye),H(G,ye)}),L(Ge);var Et=q(Ge,2);{var Pt=G=>{var R=gn(),ye=N(R),Ye=me(ye,!0),Xe=q(ye,2);bt(Xe,{get icon(){return ra},size:10}),L(R),Z(Be=>ge(Ye,Be),[()=>A.workspace_hoverCard_moreAgents_label({count:qe(e(Me))})]),H(G,R)};ie(Et,G=>{e(Me)&&G(Pt)})}L(ze),Z(G=>$(ze,"aria-label",G),[()=>A.workspace_multiSelectSidebar_agentsTab_label()]),H(Qe,ze)};ie(At,Qe=>{e(ce)&&Qe(Rt)})}var Na=q(At,2);{var Ha=Qe=>{var ze=_n(),Ge=N(ze);zt(Ge,21,()=>e(ot),G=>G.identity,(G,R)=>{var ye=ua();{const pt=Te=>{var xe=hn(),Ne=Fe(xe);bt(Ne,{get icon(){return e(R).statusIcon},size:16,get class(){return`shrink-0 justify-self-start ${e(R).foregroundClass??""}`}});var it=q(Ne,2),Tt=me(it,!0),$e=q(it,2),Ft=me($e,!0),mt=q($e,2),gt=me(mt,!0);Z(Lt=>{ge(Tt,Lt),ge(Ft,e(R).accessibleStateLabel),ge(gt,e(R).numberLabel??`#${e(R).number}`)},[()=>e(R).title||(e(R).resource?.repository.provider==="gitlab"?A.workspace_hoverCard_mergeRequest_label():A.workspace_hoverCard_pullRequest_label())]),H(Te,xe)};var Ye=N(ye);{var Xe=Te=>{{let xe=E(()=>h(e(R)));jt(Te,{variant:"plain",wrapContent:!1,class:"grid h-auto! w-full min-w-0 grid-cols-[1rem_minmax(0,1fr)_auto_auto] items-center justify-normal gap-x-2 whitespace-normal rounded-sm border-0! px-2! py-0! text-left font-normal transition-colors hover:bg-muted/50 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",get"aria-label"(){return e(xe)},"data-workspace-hover-card-pr-row":!0,get"data-pr-identity"(){return e(R).identity},get"data-pr-status"(){return e(R).status},get onkeydown(){return w()},onclick:Ne=>V(Ne,e(R)),children:(Ne,it)=>{pt(Ne)},$$slots:{default:!0}})}},Be=Te=>{var xe=bn(),Ne=N(xe);pt(Ne),L(xe),Z(()=>{$(xe,"data-pr-identity",e(R).identity),$(xe,"data-pr-status",e(R).status)}),H(Te,xe)};ie(Ye,Te=>{e(R).url?Te(Xe):Te(Be,-1)})}L(ye)}Z(pt=>$(ye,"aria-label",pt),[()=>e(R).url?void 0:h(e(R))]),H(G,ye)}),L(Ge);var Et=q(Ge,2);{var Pt=G=>{var R=wn(),ye=N(R),Ye=me(ye,!0),Xe=q(ye,2);bt(Xe,{get icon(){return ra},size:10}),L(R),Z(Be=>ge(Ye,Be),[()=>A.workspace_hoverCard_moreItems_label({count:qe(e(De))})]),H(G,R)};ie(Et,G=>{e(De)&&G(Pt)})}L(ze),Z((G,R)=>{$(ze,"aria-label",G),$(Ge,"aria-label",R)},[()=>e(Ie).every(G=>G.resource?.repository.provider==="gitlab")?A.workspace_hoverCard_mergeRequests_label():e(Ie).some(G=>G.resource?.repository.provider==="gitlab")?A.workspace_hoverCard_reviews_label():A.workspace_hoverCard_pullRequests_label(),()=>e(Ie).every(G=>G.resource?.repository.provider==="gitlab")?A.workspace_hoverCard_mergeRequests_label():e(Ie).some(G=>G.resource?.repository.provider==="gitlab")?A.workspace_hoverCard_reviews_label():A.workspace_hoverCard_pullRequests_label()]),H(Qe,ze)};ie(Na,Qe=>{e(Ke)&&Qe(Ha)})}L(xt),H(ue,We)};ie(Pe,ue=>{e(v)&&ue(de)})}Z(ue=>{X=Oe(F,1,"min-w-0 px-5 pt-4",null,X,{"pb-4":!e(v)}),ge(Ee,ue),ge(f,e(ke).label),ge(j,e(fe))},[()=>o().title||A.workspace_links_untitled_label()]),H(d,C)};ie(re,d=>{g()||!o()?d(Re):d(Ue,-1)})}L(he),H(a,he);var je=st(te);return u(),je}const fa=800,Ss=175,In=300;function Mn(){let a=0,t=null;const r=new Set,l=new Set;function c(){return a>0||t!==null?0:fa}function u(){const o=c();r.forEach(g=>g(o))}function s(){t!==null&&(clearTimeout(t),t=null)}return{get currentOpenDelay(){return c()},subscribe(o){return r.add(o),o(c()),()=>r.delete(o)},notifyOpened(){const o=a===0&&t===null;s(),a+=1,o&&u()},notifyClosed(){a!==0&&(a-=1,!(a>0)&&(s(),t=setTimeout(()=>{t=null,u()},In)))},deferClose(o){return l.add(o),()=>l.delete(o)},settleDeferredCloses(){const o=[...l];l.clear(),o.forEach(g=>g())},reset(){const o=c()!==fa;s(),a=0,l.clear(),o&&u()}}}const Rs=Mn();function qt(a){const t=Aa.select(ve.state,a);return t!==void 0&&Cr(t)}function Cn(a,t){if(!qt(a))return[];const r=vr.select(ve.state,a),l=Jt.select(ve.state,a),c=hr.select(ve.state),u=[];for(let s=0;s<Ar;s+=1){const o=c[s],g=o&&o!==a?Aa.select(ve.state,o):void 0;u.push({id:`assign-micro-key-${s+1}`,label:g?A.workspace_card_assignOccupiedMicroKey_label({number:qe(s+1),title:g.title}):A.workspace_card_assignMicroKeyNumber_label({number:qe(s+1)}),checked:r===s,closeOnSelect:!0,onClick:()=>{qt(a)&&ve.dispatch(Ir(s,a)),t()}})}return l!==null&&(u.push({type:"separator"}),u.push({id:"unassign-micro-key",label:A.workspace_card_unassignMicroKey_label(),onClick:()=>{qt(a)&&Jt.select(ve.state,a)===l&&ve.dispatch(Mr(l)),t()}})),u}function Es(a,{connected:t,onClose:r}){if(!t)return[];const l=Cn(a,r);if(l.length===0)return[];const c=l.filter(s=>"id"in s&&s.id!=="unassign-micro-key"),u=l.find(s=>"id"in s&&s.id==="unassign-micro-key");return[{id:"assign-micro-key",label:A.workspace_card_assignMicroKey_label(),icon:Ur,onClick:()=>{},selection:"single",submenu:c},...u?[u]:[]]}var Sn=z('<div data-static-position="" role="tooltip"><!></div>'),pa=z('<div role="tooltip"><!></div>');function Rn(a,t){if(new.target)return tt({component:Rn,...a});nt(t,!0);let r=I(t,"id",7),l=I(t,"anchor",7),c=I(t,"position",7,"right"),u=I(t,"absolute",7,!1),s=I(t,"anchorElement",7,null),o=I(t,"staticPosition",7,!1),g=I(t,"class",7,""),x=I(t,"children",7),b=I(t,"onmouseenter",7),w=I(t,"onmouseleave",7),m=I(t,"onfocusin",7),k=I(t,"onfocusout",7);const U=Zr(en()+2);tn(U);const B=an(U),T=8,i=4;let p=ne(null),_=ne(""),P=ne(void 0);const D=E(()=>c()==="bottom-right"||c()==="bottom-left"),Q=E(()=>c()==="top"),se=E(()=>o()?"relative":u()?"absolute":"fixed"),Ce=E(()=>c()==="right"?{x:-4,y:0}:c()==="bottom"?{x:4,y:0}:e(Q)?{x:0,y:4}:{x:0,y:-4});function le(v,h,ae){return Math.max(h,Math.min(ae,v))}let y=null,Y=null;function oe(){return!y?.isConnected||Y!==l()?!1:y.style.getPropertyValue("anchor-name").includes(l())||getComputedStyle(y).getPropertyValue("anchor-name").includes(l())}function Le(){return s()?s():(oe()||(y=Array.from(document.querySelectorAll('[style*="anchor-name"]')).find(v=>{const h=v.style.getPropertyValue("anchor-name"),ae=getComputedStyle(v).getPropertyValue("anchor-name");return h.includes(l())||ae.includes(l())})??null,Y=y?l():null),y)}function Me(){if(o()||u()||!e(p))return;const v=Le();if(!v)return;const h=v.getBoundingClientRect(),ae=e(p).getBoundingClientRect(),V=window.innerWidth||document.documentElement.clientWidth,te=window.innerHeight||document.documentElement.clientHeight,he=ae.width||e(p).offsetWidth,re=ae.height||e(p).offsetHeight,Re=Math.max(0,h.top-i-T),Ue=Math.max(0,te-h.bottom-i-T),je=e(Q)?!(Re<re&&Ue>Re):e(D)&&Ue<re&&Re>Ue;let d=h.left,C=h.bottom+i,F=je?Re:Ue;if(c()==="right"){const X=h.left-i-T,be=V-h.right-i-T;d=be>=he||be>=X?h.right+i:h.left-he-i,C=h.top,F=Math.max(0,te-T*2)}else c()==="bottom"?(d=h.left-he-i,C=h.bottom-re):(e(Q)||e(D))&&(c()==="bottom-left"?d=h.right-he:e(Q)&&(d=h.left+h.width/2-he/2),C=je?h.top-Math.min(re,F)-i:h.bottom+i);d=le(d,T,Math.max(T,V-he-T)),C=le(C,T,Math.max(T,te-Math.min(re,F)-T)),O(P,`${F}px`),O(_,`left: ${d}px; top: ${C}px;`)}let fe=!1;async function Ve(){fe||(fe=!0,await ja(),fe=!1,Me())}let ke=null;function ee(){ke||(ke=Jr(()=>{ke=null,Me()}))}function Se(v){const h=s()??(oe()?y:null);h&&v.target instanceof Node&&!v.target.contains(h)||ee()}kt(()=>{const v=e(p),h=s();o()||u()||!v||!h||Ve()}),ya(()=>{if(o())return;let v=null;return Ve().then(()=>{if(!u()&&typeof ResizeObserver<"u"){v=new ResizeObserver(ee),e(p)&&v.observe(e(p));const h=Le();h&&v.observe(h)}}),window.addEventListener("resize",ee),window.addEventListener("scroll",Se,!0),()=>{v?.disconnect(),window.removeEventListener("resize",ee),window.removeEventListener("scroll",Se,!0),ke?.(),ke=null}});var ft={get id(){return r()},set id(v){r(v),M()},get anchor(){return l()},set anchor(v){l(v),M()},get position(){return c()},set position(v="right"){c(v),M()},get absolute(){return u()},set absolute(v=!1){u(v),M()},get anchorElement(){return s()},set anchorElement(v=null){s(v),M()},get staticPosition(){return o()},set staticPosition(v=!1){o(v),M()},get class(){return g()},set class(v=""){g(v),M()},get children(){return x()},set children(v){x(v),M()},get onmouseenter(){return b()},set onmouseenter(v){b(v),M()},get onmouseleave(){return w()},set onmouseleave(v){w(v),M()},get onfocusin(){return m()},set onfocusin(v){m(v),M()},get onfocusout(){return k()},set onfocusout(v){k(v),M()},$set:at,$on:(v,h)=>rt(t,v,h)},Ie=Ut(),ot=Fe(Ie);{var De=v=>{var h=Sn(),ae=N(h);Ot(ae,()=>x()??Nt),L(h),et(h,V=>O(p,V),()=>e(p)),Z(()=>{$(h,"id",r()),Oe(h,1,e(se)+` z-50 w-64 flex flex-col overflow-y-auto border border-border pointer-events-auto ${B} `+g()),$(h,"data-surface-level",U)}),H(v,h)},ce=v=>{var h=pa();let ae;var V=N(h);Ot(V,()=>x()??Nt),L(h),et(h,te=>O(p,te),()=>e(p)),Z(()=>{$(h,"id",r()),Oe(h,1,e(se)+` z-50 w-64 flex flex-col border border-border pointer-events-none ${B} `+g()),$(h,"data-surface-level",U),ae=Ct(h,"",ae,{"position-anchor":l(),right:c()==="bottom"?"anchor(left)":void 0,left:c()==="right"?"anchor(right)":e(D)?"anchor(left)":e(Q)?"anchor(center)":void 0,top:c()==="right"?"anchor(top)":e(D)?"anchor(bottom)":void 0,bottom:c()==="bottom"?"anchor(bottom)":e(Q)?"anchor(top)":void 0,"margin-right":c()==="bottom"?"8px":void 0,"margin-left":c()==="right"?"8px":void 0,"margin-top":e(D)?"4px":void 0,"margin-bottom":e(Q)?"4px":void 0,translate:e(Q)?"-50% 0":void 0})}),He("mouseenter",h,function(...te){b()?.apply(this,te)}),He("mouseleave",h,function(...te){w()?.apply(this,te)}),Ae("focusin",h,function(...te){m()?.apply(this,te)}),Ae("focusout",h,function(...te){k()?.apply(this,te)}),It(1,h,()=>Zt,()=>({tier:"fast",...e(Ce),scale:.96})),It(2,h,()=>ea,()=>({tier:"fast"})),H(v,h)},Ke=v=>{br(v,{zIndex:50,children:(h,ae)=>{var V=pa();let te;var he=N(V);Ot(he,()=>x()??Nt),L(V),et(V,re=>O(p,re),()=>e(p)),Z(()=>{$(V,"id",r()),Oe(V,1,e(se)+` z-50 w-64 flex flex-col overflow-y-auto border border-border pointer-events-auto ${B} `+g()),$(V,"data-surface-level",U),te=Ct(V,e(_),te,{"max-height":e(P)})}),He("mouseenter",V,function(...re){b()?.apply(this,re)}),He("mouseleave",V,function(...re){w()?.apply(this,re)}),Ae("focusin",V,function(...re){m()?.apply(this,re)}),Ae("focusout",V,function(...re){k()?.apply(this,re)}),It(1,V,()=>Zt,()=>({tier:"fast",...e(Ce),scale:.96})),It(2,V,()=>ea,()=>({tier:"fast"})),H(h,V)},$$slots:{default:!0}})};ie(ot,v=>{o()?v(De):u()?v(ce,1):v(Ke,-1)})}return H(a,Ie),st(ft)}xa(["focusin","focusout"]);function _t(a,t){return t||/^(?:https?:|data:|blob:|workspace-asset:)/i.test(a.trim())}function En(a,t){if(t||!a)return a;const r=document.createElement("template");r.innerHTML=a;for(const l of r.content.querySelectorAll("img, video")){const c=l.getAttribute("src")||l.getAttribute("data-media-src")||"",u=[...l.querySelectorAll("source")];if(!_t(c,!1)||u.some(o=>!_t(o.getAttribute("src")||"",!1))){const o=document.createElement("img");o.setAttribute("alt",l.getAttribute("alt")||l.getAttribute("data-name")||""),o.setAttribute("data-media-unavailable","node-owned"),l.replaceWith(o);continue}l.removeAttribute("srcset");const s=l.getAttribute("poster");s&&!_t(s,!1)&&l.removeAttribute("poster")}return r.innerHTML}const Pn=[/(^|[^\\])\$(?!\$)(?=\S)(?:\\.|[^\\$\n])+?\$(?!\$)/,/(^|[^\\])\\\((?:\\.|[^\\\n])*?\\\)/,/^(?: {0,3})(?:\$\$|\\\[)/m,/^\s*[-*]\s*\[[ x]\]/m,/```/,/`[^`]+`/,/\|.*\|/,/\[.*\]\(.*\)/,/!\[.*\]\(.*\)/,/<[a-z][\s\S]*>/i,/^#{1,6}\s/m,/^\s*>\s/m,/\*\*[^*]+\*\*/,/\*[^*]+\*/,/_[^_]+_/,/~~[^~]+~~/,/^[-*_]{3,}\s*$/m,/^\s*[-*+]\s/m,/^\s*\d+\.\s/m];function Tn(a){return a&&(Pn.some(t=>t.test(a))||or(a,"markdown"))?"static":"simple"}var Fn=z("<!> <!>",1);function Ta(a,t){if(new.target)return tt({component:Ta,...a});nt(t,!0);let r=I(t,"workspaceId",7),l=I(t,"canUseMedia",7),c=ne(null),u=ne(null),s=ne(!1),o=ne(!1);function g(_){O(c,{url:_.getAttribute("src")||"",name:_.getAttribute("alt")||void 0,opener:_},!0),O(s,!0)}function x(_){const P=na(_.getAttribute("href")||"",r());return P&&l()(P)?(O(c,{url:P,name:_.textContent?.trim()||void 0,opener:_,assetLink:!0},!0),O(s,!0),!0):b(_)}function b(_){const P=wt(_.getAttribute("href")||"",r());return!P||!l()(P.url)?!1:(O(u,{url:P.url,mimeType:P.mimeType,name:_.textContent?.trim()||void 0,opener:_},!0),O(o,!0),!0)}kt(()=>{e(u)&&!wt(e(u).url,r())&&(O(o,!1),O(u,null)),e(c)?.assetLink&&!na(e(c).url,r())&&(O(s,!1),O(c,null))});var w={openImage:g,openAsset:x,get workspaceId(){return r()},set workspaceId(_){r(_),M()},get canUseMedia(){return l()},set canUseMedia(_){l(_),M()},$set:at,$on:(_,P)=>rt(t,_,P)},m=Fn(),k=Fe(m);{var U=_=>{ur(_,{get imageUrl(){return e(c).url},get imageName(){return e(c).name},get openerElement(){return e(c).opener},showActionsMenu:!0,get open(){return e(s)},set open(P){O(s,P,!0)}})},B=E(()=>e(c)&&l()(e(c).url));ie(k,_=>{e(B)&&_(U)})}var T=q(k,2);{var i=_=>{Ia(_,{get videoUrl(){return e(u).url},get videoName(){return e(u).name},get mimeType(){return e(u).mimeType},sourceKind:"workspace",get openerElement(){return e(u).opener},get open(){return e(o)},set open(P){O(o,P,!0)}})},p=E(()=>e(u)&&wt(e(u).url,r())&&l()(e(u).url));ie(T,_=>{e(p)&&_(i)})}return H(a,m),st(w)}var Ln=z('<div class="flex items-center gap-2"><!> <!></div>'),Wn=z('<div class="absolute inset-0 flex items-center justify-center bg-muted text-muted-foreground" aria-hidden="true"><svg viewBox="0 0 24 24" class="size-10" fill="none"><rect x="3" y="5" width="18" height="14" rx="2" stroke="currentColor"></rect><path d="m10 9 5 3-5 3V9Z" fill="currentColor"></path></svg></div> <video preload="metadata" playsinline="" tabindex="-1" aria-hidden="true"></video> <span class="absolute inset-0 flex items-center justify-center bg-black/10 transition-colors group-hover:bg-black/20 motion-reduce:transition-none forced-colors:bg-transparent" aria-hidden="true"><span class="flex size-11 items-center justify-center rounded-full border border-white/70 bg-black/60 text-white shadow-(--elevation-raised) forced-colors:border forced-colors:bg-[Canvas] forced-colors:text-[CanvasText]"><svg viewBox="0 0 20 20" class="ml-0.5 size-5" fill="currentColor"><path d="m7 5 7 5-7 5V5Z"></path></svg></span></span>',3),Nn=z('<div class="group relative aspect-video w-full max-h-40 max-w-2xl" style="width: min(100%, calc(10rem * 16 / 9));"><!> <!></div>'),Hn=z('<div class="my-2 min-w-0 max-w-2xl" data-chat-video=""><!></div> <!>',1);function Fa(a,t){if(new.target)return tt({component:Fa,...a});nt(t,!0);let r=I(t,"source",7),l=I(t,"name",23,()=>A.chat_videoBlock_fromAgent_label()),c=I(t,"poster",7),u=I(t,"allowFileMedia",7,!0),s=I(t,"canOpenFile",7),o=ne(!1),g=ne(!1),x=ne(!1),b=ne(null);const w=E(()=>r().kind==="inline"?`data:${r().mimeType};base64,${r().data}`:r().url);function m(y){return _t(y,u()&&s()?.()!==!1)}const k=E(()=>!m(e(w))),U=E(()=>yt(e(w))),B=E(()=>{if(!(!c()||!m(c()))){if(/^data:image\/(?:gif|jpeg|png|webp);base64,[a-z0-9+/=]+$/i.test(c()))return c();try{const y=new URL(c());return(y.protocol==="https:"||y.protocol==="workspace-file:")&&!y.username&&!y.password?c():void 0}catch{return}}});function T(){O(g,!0),O(x,!1)}var i={get source(){return r()},set source(y){r(y),M()},get name(){return l()},set name(y=A.chat_videoBlock_fromAgent_label()){l(y),M()},get poster(){return c()},set poster(y){c(y),M()},get allowFileMedia(){return u()},set allowFileMedia(y=!0){u(y),M()},get canOpenFile(){return s()},set canOpenFile(y){s(y),M()},$set:at,$on:(y,Y)=>rt(t,y,Y)},p=Hn(),_=Fe(p),P=N(_);{var D=y=>{Vt(y,{get name(){return l()},reason:"load-failed"})},Q=y=>{var Y=Ln(),oe=N(Y);{let Me=E(()=>e(U)?.path),fe=E(()=>e(U)?.workspaceId);Vt(oe,{get name(){return l()},reason:"load-failed",get path(){return e(Me)},get workspaceId(){return e(fe)}})}var Le=q(oe,2);Kt(Le,{get videoUrl(){return e(w)},get videoName(){return l()},get sourceKind(){return r().kind},get mimeType(){return r().mimeType}}),L(Y),H(y,Y)},se=y=>{var Y=Nn(),oe=N(Y);{let Me=E(()=>A.chat_videoBlock_play_ariaLabel({name:l()}));jt(oe,{type:"button",variant:"ghost",size:"default",class:"relative block size-full cursor-pointer overflow-hidden rounded-lg border border-border bg-muted/40 p-0 shadow-(--elevation-raised) focus-visible:border-ring focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 forced-colors:border",get"aria-label"(){return e(Me)},"data-testid":"chat-video-snapshot",onclick:()=>{m(e(w))&&O(o,!0)},get ref(){return e(b)},set ref(fe){O(b,fe,!0)},children:(fe,Ve)=>{var ke=Wn(),ee=q(Fe(ke),2);ee.muted=!0,Ga(2),Z(()=>{$(ee,"src",e(w)),$(ee,"poster",e(B)),Oe(ee,1,`pointer-events-none absolute inset-0 size-full object-contain transition-opacity motion-reduce:transition-none ${e(B)||e(g)&&!e(x)?"opacity-100":"opacity-0"}`)}),He("loadeddata",ee,T),He("error",ee,()=>O(x,!0)),H(fe,ke)},$$slots:{default:!0}})}var Le=q(oe,2);Kt(Le,{get videoUrl(){return e(w)},get videoName(){return l()},get sourceKind(){return r().kind},get mimeType(){return r().mimeType},triggerClass:"absolute right-1.5 top-1.5 opacity-0 transition-opacity focus-visible:opacity-100 group-focus-within:opacity-100 group-hover:opacity-100 data-[state=open]:opacity-100"}),L(Y),H(y,Y)};ie(P,y=>{e(k)?y(D):e(x)?y(Q,1):y(se,-1)})}L(_);var Ce=q(_,2);{var le=y=>{Ia(y,{get videoUrl(){return e(w)},get videoName(){return l()},get poster(){return e(B)},get sourceKind(){return r().kind},get mimeType(){return r().mimeType},get openerElement(){return e(b)},get open(){return e(o)},set open(Y){O(o,Y,!0)}})};ie(Ce,y=>{!e(x)&&!e(k)&&y(le)})}return H(a,p),st(i)}const On=/^\s*!\[([^\]\n]*)\]\((?:<)?((?:intent:\/\/local\/|workspace-file:\/\/|workspace-asset:\/\/)[^)\s>]+)(?:>)?\)\s*$/,qn=/^ {0,3}(`{3,}|~{3,})(.*)$/;function ma(a,t){if(typeof a!="string"||!a||a!==a.trim())return null;if(a.startsWith("workspace-asset://"))return wt(a,t);if(a.startsWith("workspace-file://")){const l=yt(a);if(!l||l.workspaceId!==t)return null;const c=Sa(a);return c?la(c,t):null}const r=a.startsWith("intent://")?a:`intent://local/file/${a}`;return la(r,t)}function Dn(a,t){if(a.startsWith("workspace-file://")){const r=yt(a);if(!r||r.workspaceId!==t)return!1;const l=Sa(a);return!!l&&!!St(l,t)}return!!St(a,t,{readOnly:!0})}function Un(a,t){return(t===0||!a[t-1].trim())&&(t===a.length-1||!a[t+1].trim())}function zn(a,t,r){const l=r[0];return a.findIndex((c,u)=>{if(u<=t)return!1;const s=c.trim();return s.length>=r.length&&s.split("").every(o=>o===l)})}function Bn(a,t){const r=a.split(`
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/BdWpSBC4.js","/app/immutable/chunks/DYhIMPy1.js","/app/immutable/chunks/eK7OULll.js","/app/immutable/chunks/p5gLe3PS.js","/app/immutable/chunks/DJKXcaw9.js","/app/immutable/chunks/DYfBNrOV.js","/app/immutable/chunks/DZtstCLQ.js","/app/immutable/chunks/UyBYtOpv.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/CVjlpAWj.js","/app/immutable/chunks/BaIAhI85.js","/app/immutable/chunks/DFcwI6Rh.js","/app/immutable/chunks/Dix9BiYu.js","/app/immutable/chunks/XV0T3w4n.js","/app/immutable/chunks/BlOn95cv.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/DOzF5uE-.js","/app/immutable/chunks/jMKjj8ae.js","/app/immutable/chunks/Bo4s1kgI.js","/app/immutable/chunks/WFvSJ9zU.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/D5B1sycf.js","/app/immutable/chunks/w6mFE4SD.js","/app/immutable/chunks/Bok30zBH.js","/app/immutable/chunks/B0JWnOsx.js","/app/immutable/chunks/DfxQWSVU.js","/app/immutable/chunks/DhtKWu39.js","/app/immutable/assets/dialog.BtQTVchw.css","/app/immutable/assets/observe-overflow.CJJmE3_P.css","/app/immutable/chunks/aLZSbque.js","/app/immutable/chunks/BXean12D.js","/app/immutable/chunks/B-WefpDP.js","/app/immutable/chunks/C-RJDuZ9.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/NeHKo0ZG.js","/app/immutable/chunks/BvFAWM27.js","/app/immutable/chunks/dmSYAakE.js","/app/immutable/assets/pending-agent-deletions.UE5obH5A.css","/app/immutable/chunks/BWYr8u9e.js","/app/immutable/chunks/BeP4UORy.js","/app/immutable/chunks/D6dCvfQe.js","/app/immutable/assets/SettingsPage.D8u26cHZ.css","/app/immutable/chunks/BD8I8FK1.js","/app/immutable/chunks/-x_SoK5J.js","/app/immutable/assets/notify.BeL_JB6L.css","/app/immutable/chunks/Bmmshx2M.js","/app/immutable/chunks/BJzHxIyr.js","/app/immutable/chunks/z3QVK190.js","/app/immutable/chunks/CCnP87Jb.js","/app/immutable/chunks/4iRc0E9v.js","/app/immutable/chunks/CHZAzCO9.js","/app/immutable/chunks/Bknqawxe.js","/app/immutable/chunks/C3AKbypo.js","/app/immutable/chunks/Bcc7Bzbg.js","/app/immutable/chunks/B0Z-1lwJ.js","/app/immutable/chunks/DNFHGDC9.js","/app/immutable/assets/directory-picker-service.CzNEA6Ot.css","/app/immutable/chunks/BMc6OzJ-.js","/app/immutable/chunks/DwsRDnkS.js","/app/immutable/chunks/C0VXEpDj.js","/app/immutable/chunks/Dritbi2C.js","/app/immutable/chunks/D2zJp5fS.js","/app/immutable/chunks/CMiilI_P.js","/app/immutable/chunks/lkH5RFQO.js","/app/immutable/chunks/BziQ6zwo.js","/app/immutable/assets/AttachmentPreview.BCSCCZGm.css","/app/immutable/assets/DiagramPresentation.Bfi3xHm0.css","/app/immutable/chunks/CYOvUFvY.js","/app/immutable/assets/StreamingDiagramRenderer.BShsSvPz.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
var za=Object.defineProperty;var Ba=(a,t,r)=>t in a?za(a,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):a[t]=r;var lt=(a,t,r)=>Ba(a,typeof t!="symbol"?t+"":t,r);import{bo as A,t as tt,bq as I,a_ as ie,by as at,b as rt,bs as Va,bu as Xt,_ as ka}from"./eK7OULll.js";import{bs as nt,a5 as N,aD as e,bA as L,b_ as Z,W as H,bn as st,c9 as E,aA as M,aB as z,ca as kt,bk as ya,c6 as Ka,cd as Wt,bV as ne,bS as q,ay as Fe,bl as me,bO as ge,ai as xa,a7 as Ut,c0 as ja,bf as Nt,bH as O,aw as He,aj as Ae,be as Ga,c3 as ut,bb as Mt,aF as Ya,br as Qa,bj as Xa}from"./DYhIMPy1.js";import{d as $a,f as Ja,k as Oe,l as Ct,s as $,a as Ze,h as zt,i as Za}from"./DZtstCLQ.js";import{aN as er,cV as tr,L as ar,av as rr,dj as nr,V as sr,dm as Aa,B as or,$ as ir}from"./C-RJDuZ9.js";import{t as Bt}from"./Bok30zBH.js";import{a7 as cr,ak as lr,A as dr,o as ur,a4 as Ia,s as Vt,a3 as Kt,aB as yt,aY as Ma,n as fr,aD as pr,aX as mr}from"./D2zJp5fS.js";import{l as $t}from"./DsRLPs6I.js";import{bU as gr,bR as vr,bS as Jt,aA as hr}from"./aLZSbque.js";import{w as dt,P as br}from"./w6mFE4SD.js";import{f as jt,bc as Ht}from"./CVjlpAWj.js";import{t as qe,v as wr,H as It,E as Zt,c as ea}from"./DYfBNrOV.js";import{rb as Ca,HR as ve,mc as _r,fK as kr,n7 as yr,tK as xr,a as Ar,vn as Ir,su as Mr,qV as Cr,g as Sr,bi as ta,us as Rr,sh as Er,uu as Pr}from"./Bo4s1kgI.js";import{c as Tr,l as ht}from"./ChTqQfQN.js";import{o as Fr}from"./DNFHGDC9.js";import{aP as Lr,aQ as aa,bz as Wr,aA as Nr,by as Hr,aE as Or,c_ as qr,cO as Dr,F as bt,ax as ra,bH as Ur,bC as zr}from"./B0JWnOsx.js";import{l as Br}from"./BXean12D.js";import{p as Vr,cV as wt,cU as na,an as Kr,cX as Sa,a7 as St,aD as Ra,aU as jr,av as Gr,a6 as sa,r as Yr,aL as Qr,aQ as Xr,F as $r}from"./C0VXEpDj.js";import{s as Ot}from"./p5gLe3PS.js";import{b as et}from"./BaIAhI85.js";import{s as Jr}from"./DOzF5uE-.js";import{c as Zr,u as en,s as tn,a as an}from"./DfxQWSVU.js";import{N as oa,J as ia}from"./BdWpSBC4.js";import{g as ca}from"./DJKXcaw9.js";import{X as la}from"./Dritbi2C.js";const rn=new Set(["failed","blocked","needs_attention","in_progress"]),nn={failed:{visual:"icon",icon:Dr,className:"text-foreground"},blocked:{visual:"icon",icon:qr,className:"text-danger"},needs_attention:{visual:"icon",icon:Or,className:"text-warning-ink"},in_progress:{visual:"dot",icon:null,className:"workspace-status-color-active"},waiting:{visual:"icon",icon:Hr,className:"text-muted-foreground"},unread:{visual:"dot",icon:null,className:"workspace-status-color-unread"},not_started:{visual:"dot",icon:null,className:"text-muted-foreground/35"},idle:{visual:"dot",icon:null,className:"text-muted-foreground/35"},complete:{visual:"icon",icon:Nr,className:"text-success"},pr_queued:{visual:"icon",icon:Wr,className:"text-info"},pr_ready:{visual:"icon",icon:aa,className:"text-success"},pr_open:{visual:"icon",icon:aa,className:"text-info"},pr_merged:{visual:"icon",icon:Lr,className:"text-purple-500"}};function sn(a){switch(a){case"failed":return A.workspace_statusIcon_failed_label();case"blocked":return A.workspace_statusIcon_blocked_label();case"needs_attention":return A.workspace_statusIcon_needsAttention_label();case"in_progress":return A.workspace_statusIcon_inProgress_label();case"waiting":return A.workspace_taskStatus_waiting_label();case"unread":return A.layout_activeCard_unread_header();case"not_started":return A.workspace_statusIcon_notStarted_label();case"idle":return A.workspace_statusIcon_idle_label();case"complete":return A.workspace_statusIcon_complete_label();case"pr_queued":return A.workspace_statusIcon_prQueued_label();case"pr_ready":return A.workspace_statusIcon_prReady_label();case"pr_open":return A.workspace_statusIcon_prOpen_label();case"pr_merged":return A.workspace_statusIcon_prMerged_label()}}function on(a){const t=Ca(a.displayStatus)?a.displayStatus:"not_started";return rn.has(t)?t:a.attention==="unread"?"unread":a.waiting===!0?"waiting":t}function Ea(a){const t=a==="waiting"||a==="unread"||Ca(a)?a:"not_started",r=sn(t);return{state:t,...nn[t],label:r,tooltip:r,accessibleName:r}}var cn=z('<span class="workspace-status-dot svelte-14zk5l0" data-workspace-status-dot=""></span>'),ln=z("<span><!></span>");function Pa(a,t){if(new.target)return tt({component:Pa,...a});nt(t,!0);let r=I(t,"status",7),l=I(t,"size",7,14),c=I(t,"decorative",7,!1),u=I(t,"class",7);const s=E(()=>Ea(r()));var o={get status(){return r()},set status(m){r(m),M()},get size(){return l()},set size(m=14){l(m),M()},get decorative(){return c()},set decorative(m=!1){c(m),M()},get class(){return u()},set class(m){u(m),M()},$set:at,$on:(m,k)=>rt(t,m,k)},g=ln(),x=N(g);{var b=m=>{var k=cn();H(m,k)},w=m=>{bt(m,{get icon(){return e(s).icon},class:"size-full!"})};ie(x,m=>{e(s).visual==="dot"?m(b):e(s).icon&&m(w,1)})}return L(g),Z(m=>{Oe(g,1,m,"svelte-14zk5l0"),Ct(g,`width: ${l()??""}px; height: ${l()??""}px;`),$(g,"role",c()?void 0:"img"),$(g,"aria-label",c()?void 0:e(s).accessibleName),$(g,"aria-hidden",c()?"true":void 0),$(g,"title",c()?void 0:e(s).tooltip),$(g,"data-workspace-status",e(s).state),$(g,"data-workspace-status-visual",e(s).visual),$(g,"data-workspace-status-icon",e(s).icon?.iconName)},[()=>$a(Ja("workspace-status-icon inline-flex shrink-0 items-center justify-center forced-colors:text-[CanvasText]",e(s).className,u()))]),H(a,g),st(o)}const Gt=6e4,Yt=60*Gt,Qt=24*Yt,da=30*Qt;function dn(a,t=new Date){if(a==null)return null;const r=a instanceof Date?a:new Date(a),l=r.getTime(),c=t.getTime();if(!Number.isFinite(l)||!Number.isFinite(c))return null;const u=Math.max(0,c-l);let s;u<Gt?s="<1m":u<Yt?s=`${qe(Math.floor(u/Gt))}m`:u<Qt?s=`${qe(Math.floor(u/Yt))}h`:u<da?s=`${qe(Math.floor(u/Qt))}d`:s=`${qe(Math.floor(u/da))}mo`;const o=l>c?t:r,g=wr(o,{now:t});return g?{compact:s,accessible:g,dateTime:r.toISOString()}:null}var un=z('<div><div class="grid gap-0.5 px-5 pt-4"><div class="flex min-w-0 items-center justify-between gap-3"><!> <!></div> <!> <!></div> <div class="my-3 border-t border-border" data-workspace-hover-card-divider=""></div> <div class="body-grid grid min-w-0 grid-cols-1 items-stretch gap-3 px-5 pb-4" data-workspace-hover-card-columns=""><div class="grid" data-workspace-hover-card-activity=""><!></div> <div class="pull-requests grid" data-workspace-hover-card-pr-column=""><!></div></div></div>'),fn=z('<p class="type-caption mt-1 min-w-0 line-clamp-3 text-muted-foreground" data-workspace-hover-card-summary=""> </p>'),pn=z('<span class="shrink-0 text-muted-foreground" data-workspace-hover-card-question-meta=""><span aria-hidden="true"> </span></span>'),mn=z('<span class="row-span-2 flex h-(--text-caption-line-height) items-center" aria-hidden="true"><!></span><span class="type-caption min-w-0 truncate text-foreground" data-workspace-hover-card-agent-name=""> </span><time class="type-caption whitespace-nowrap text-muted-foreground" data-workspace-hover-card-agent-time=""> </time> <span class="agent-detail type-caption flex min-w-0 items-start gap-1.5 text-muted-foreground svelte-1vax087" data-workspace-hover-card-agent-detail=""><span class="min-w-0 truncate" data-workspace-hover-card-agent-context=""> </span><!></span>',1),ua=z('<div role="listitem"><!></div>'),gn=z('<div class="type-caption mt-3 flex items-center justify-between text-muted-foreground" data-workspace-hover-card-overflow=""><span> </span> <!></div>'),vn=z('<section class="activity min-w-0" data-workspace-hover-card-activity="" data-workspace-hover-card-agent-table=""><div class="-mx-2 grid gap-2" role="list"></div> <!></section>'),hn=z('<!> <span class="type-caption min-w-0 truncate text-foreground" data-workspace-hover-card-pr-title=""> </span> <span class="type-caption shrink-0 text-muted-foreground" data-workspace-hover-card-pr-status=""> </span> <span class="type-caption shrink-0 text-muted-foreground" data-workspace-hover-card-pr-number=""> </span>',1),bn=z('<div class="grid w-full min-w-0 grid-cols-[1rem_minmax(0,1fr)_auto_auto] items-center gap-x-2 rounded-sm px-2 py-0 text-left" data-workspace-hover-card-pr-row=""><!></div>'),wn=z('<div class="type-caption mt-3 flex items-center justify-between text-muted-foreground" data-workspace-hover-card-pr-overflow=""><span> </span> <!></div>'),_n=z('<section class="pull-requests min-w-0" data-workspace-hover-card-pr-column=""><div class="-mx-2 grid min-w-0 gap-2" role="list" data-workspace-hover-card-pr-list=""></div> <!></section>'),kn=z('<div class="my-3 border-t border-border" data-workspace-hover-card-divider=""></div> <div class="body-grid grid min-w-0 grid-cols-1 items-stretch gap-3 px-5 pb-4" data-workspace-hover-card-columns=""><!> <!></div>',1),yn=z('<header data-workspace-hover-card-header=""><div class="min-w-0" data-workspace-hover-card-identity=""><div class="flex min-w-0 items-center justify-between gap-3"><h2 class="type-body min-w-0 truncate font-medium text-foreground" data-workspace-hover-card-title=""> </h2> <span class="type-caption flex shrink-0 items-center gap-1.5 text-muted-foreground" data-workspace-hover-card-status=""><span class="truncate" data-workspace-hover-card-status-label=""> </span><!></span></div> <div class="type-caption mt-0.5 min-w-0 truncate text-muted-foreground" data-workspace-hover-card-repo=""> </div> <!></div></header> <!>',1),xn=z('<section class="workspace-hover-card shrink-0 overflow-hidden rounded-md bg-background text-left text-foreground shadow-(--elevation-overlay) ring-1 ring-border svelte-1vax087" data-workspace-hover-card="" data-workspace-hover-card-layout="landscape"><!></section>');function An(a,t){if(new.target)return tt({component:An,...a});nt(t,!0);const r=()=>Xt(T,"$workspaceAgents$",c),l=()=>Xt(i,"$prMonitors$",c),[c,u]=Va(),s=Tr("WorkspaceHoverCard");let o=I(t,"workspace",7),g=I(t,"isLoading",7,!1),x=I(t,"activeAgentIds",23,()=>[]),b=I(t,"loadAgentSessions",7,!0),w=I(t,"onkeydown",7),m=I(t,"staticData",7,!1);const k=Wt("");function U(){return m()?Wt([]):er(k)}function B(){return m()?Wt([]):tr(k)}const T=U(),i=B();kt(()=>k.set(o()?.id??""));let p=ne(0);ya(()=>$t.subscribe(()=>Ka(p)));let _=E(()=>o()?.agentSummary?.agentIds??[]),P=E(()=>(e(p),o()?$t.getStreamingAgentIdsForWorkspace(o().id):[])),D=null,Y=new Set;kt(()=>{if(!o()||!b())return;const d=String(o().id);D!==d&&(D=d,Y=new Set);for(const C of new Set([...e(_).slice(0,6),...x(),...e(P)]))Y.has(C)||(ve.dispatch(_r(d,C)),Y.add(C))});function se(d){return[d.name,d.context,d.questionMeta?.accessible,d.updated.accessible].filter(Boolean).join(". ")}function Ce(d){return d?d.kind==="attention"?d.attention.reason?.trim()||null:"text"in d&&d.text.trim()||null:null}function le(d){return dn(d.lastActivity||d.updatedAt||d.createdAt)??{compact:"—",accessible:A.workspace_hoverCard_noRecentActivity_label()}}function y(d){const C=String(d.status).toLowerCase(),F=yr(d),X=lr(d),be=X==="question"?gr(d):null,pe=Ce(rr.select(ve.state,String(d.id)));let we,Ee,_e,n,f,W,S=!1;if(X==="question"){we="attention",Ee="question",_e=be?.questions[0]?.question.trim()||pe||A.workspace_hoverCard_question_label(),n="question",f=1;const K=be?.questions.length??0;K>1&&(W={compact:`${qe(1)}/${qe(K)}`,accessible:A.chat_questionWizard_stepCounter_label({current:1,total:K})})}else if(X==="attention-discussion")we="attention",Ee="discussion",_e=F?.reason?.trim()||A.chat_agentCard_attentionDiscussion_label(),n="attention-discussion",f=1;else if(X==="attention-blocker"||C==="blocked")we="attention",Ee="blocker",_e=F?.reason?.trim()||A.chat_agentCard_attentionBlocker_label(),n="attention-blocker",f=0;else if(d.hasUnread)we="attention",Ee="unread",_e=pe||A.chat_newMessagesDivider_label(),S=!!pe,n="unread",f=2;else if(d.isStreaming||d.isProcessing||x().includes(String(d.id))||e(P).includes(String(d.id))||["active","busy","processing","responding","running","streaming","in_progress"].includes(C))we="active",_e=pe||A.workspace_devScripts_running_label(),S=!!pe,n=d.isProcessing?"responding":"running",f=3;else if(["waiting","pending","queued","starting"].includes(C))we="waiting",_e=pe||A.workspace_taskStatus_waiting_label(),S=!!pe,n="waiting",f=4;else return null;const j=d.agentMetadata??d.metadata;return{id:String(d.id),name:d.name?.trim()||A.workspace_fileChanges_agent_label(),group:we,attentionKind:Ee,avatarState:n,specialist:j?.specialist,context:_e,questionMeta:W,contextIsPreview:S,updated:le(d),priority:f}}let Q=E(()=>{const d=o()?.agentSummary,C=new Map;if(Array.isArray(d?.agents))for(const F of d.agents)F&&typeof F=="object"&&typeof F.id=="string"&&C.set(F.id,F.parentAgentId);return r().filter(F=>{const X=C.get(String(F.id));return!(kr(F)!=="topLevel"||typeof X=="string"&&X||F.pendingDeleteAt||F.retiredAt||String(F.status).toLowerCase()==="deleted")})}),oe=E(()=>e(Q).map(y).filter(d=>d!==null).sort((d,C)=>d.priority-C.priority)),Le=E(()=>e(oe).slice(0,6)),Me=E(()=>Math.max(0,e(oe).length-6)),fe=E(()=>o()?.repositoryName?o().repositoryOwner?`${o().repositoryOwner} / ${o().repositoryName}`:o().repositoryName:A.workspace_hoverCard_localRepository_label()),Ve=E(()=>on(o()??{})),ke=E(()=>Ea(e(Ve))),ee=E(()=>o()?.statusMessage?.trim()||"");function Se(d){if(!d)return null;const C=d.activePullRequest??d.pullRequests?.[0]??null;return C||(d.prStatus?{id:`legacy-pr-${d.prNumber??"workspace"}`,number:d.prNumber??0,url:d.prUrl??"",title:A.workspace_hoverCard_pullRequest_label(),status:d.prStatus,createdAt:d.updatedAt,updatedAt:d.updatedAt}:null)}let ft=E(()=>o()?m()?Se(o()):nr.select(ve.state,o().id)??Se(o()):null),Ie=E(()=>{if(!o()||ar(o()))return[];const d=o().repositoryOwner&&o().repositoryName?`${o().repositoryOwner}/${o().repositoryName}`:void 0;return cr({workspacePRs:o().pullRequests,activePR:e(ft),monitors:l(),workspaceRepo:d,buildPrUrl:(C,F)=>Vr(C,o().repositoryOwner,o().repositoryName,F),getDisplayTitle:C=>C.title})}),ot=E(()=>e(Ie).slice(0,3)),De=E(()=>Math.max(0,e(Ie).length-3)),ce=E(()=>e(oe).length>0),Ke=E(()=>e(Ie).length>0),v=E(()=>e(ce)||e(Ke));function h(d){const C=d.resource?.repository.provider==="gitlab"?`${d.repo} !${d.number}`:d.repo?A.workspace_card_prBadge_repoLine_tooltip({repo:d.repo,number:d.number}):A.workspace_card_prBadge_label({number:` #${d.number}`});return[sr(C,d),d.title,d.details].filter(Boolean).join(`
|
|
3
|
+
`)}function ae(d,C){if(d.stopPropagation(),!o()||!b())return;const F=o().id;Br.select(ve.state)!==F&&Fr(F).catch(X=>{s.warn("Failed to switch workspace for hover-card agent",{agentId:C,error:X})}),ve.dispatch(xr(F,{agentId:C}))}function V(d,C){if(d.stopPropagation(),!o()||!C.url)return;const F=o().id;ka(async()=>{const{handleLink:X}=await import("./BdWpSBC4.js").then(be=>be.Q);return{handleLink:X}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56]),import.meta.url).then(({handleLink:X})=>X(C.url,{workspaceId:F,event:d}))}var te={get workspace(){return o()},set workspace(d){o(d),M()},get isLoading(){return g()},set isLoading(d=!1){g(d),M()},get activeAgentIds(){return x()},set activeAgentIds(d=[]){x(d),M()},get loadAgentSessions(){return b()},set loadAgentSessions(d=!0){b(d),M()},get onkeydown(){return w()},set onkeydown(d){w(d),M()},get staticData(){return m()},set staticData(d=!1){m(d),M()},$set:at,$on:(d,C)=>rt(t,d,C)},he=xn(),re=N(he);{var Re=d=>{var C=un(),F=N(C),X=N(F),be=N(X);dt(be,{class:"h-7 min-w-0 max-w-64 flex-1"});var pe=q(be,2);dt(pe,{class:"h-5 w-20 shrink-0"}),L(X);var we=q(X,2);dt(we,{class:"h-4 w-40"});var Ee=q(we,2);dt(Ee,{class:"mt-2 h-10 w-full"}),L(F);var _e=q(F,4),n=N(_e),f=N(n);dt(f,{class:"h-10 w-full"}),L(n);var W=q(n,2),S=N(W);dt(S,{class:"h-10 w-full"}),L(W),L(_e),L(C),H(d,C)},Ue=d=>{var C=yn(),F=Fe(C);let X;var be=N(F),pe=N(be),we=N(pe),Ee=me(we,!0),_e=q(we,2),n=N(_e),f=me(n,!0),W=q(n);Pa(W,{get status(){return e(Ve)},size:16,decorative:!0}),L(_e),L(pe);var S=q(pe,2),j=me(S,!0),K=q(S,2);{var J=ue=>{var We=fn(),xt=me(We,!0);Ze(We,(At,Rt)=>Bt?.(At,Rt),()=>e(ee)),Z(()=>ge(xt,e(ee))),H(ue,We)};ie(K,ue=>{e(ee)&&ue(J)})}L(be),L(F);var Pe=q(F,2);{var de=ue=>{var We=kn(),xt=q(Fe(We),2),At=N(xt);{var Rt=Ye=>{var ze=vn(),Ge=N(ze);zt(Ge,21,()=>e(Le),G=>G.id,(G,R)=>{var ye=ua(),Qe=N(ye);{let Xe=E(()=>se(e(R)));jt(Qe,{variant:"plain",wrapContent:!1,class:"grid h-auto! min-h-8 w-full min-w-0 cursor-pointer grid-cols-[1rem_minmax(0,1fr)_auto] items-start justify-normal gap-x-2 gap-y-0 whitespace-normal rounded-sm border-0! px-2! py-0! text-left font-normal transition-colors hover:bg-muted/50 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",get"aria-label"(){return e(Xe)},"data-workspace-hover-card-agent-row":!0,get"data-agent-group-row"(){return e(R).group},get"data-attention-kind"(){return e(R).attentionKind},get onkeydown(){return w()},onclick:Be=>ae(Be,e(R).id),children:(Be,pt)=>{var Te=mn(),xe=Fe(Te),Ne=N(xe);{let Je=E(()=>e(R).specialist??null);dr(Ne,{get agentId(){return e(R).id},variant:"compact",get state(){return e(R).avatarState},get specialist(){return e(Je)}})}L(xe);var it=q(xe),Tt=me(it,!0),$e=q(it),Ft=me($e,!0),mt=q($e,2),gt=N(mt),Lt=me(gt,!0);Ze(gt,(Je,ct)=>Bt?.(Je,ct),()=>e(R).context);var Oa=q(gt);{var qa=Je=>{var ct=pn(),Da=N(ct),Ua=me(Da,!0);L(ct),Z(()=>{$(ct,"aria-label",e(R).questionMeta.accessible),ge(Ua,e(R).questionMeta.compact)}),H(Je,ct)};ie(Oa,Je=>{e(R).questionMeta&&Je(qa)})}L(mt),Z(()=>{ge(Tt,e(R).name),$($e,"datetime",e(R).updated.dateTime),$($e,"aria-label",e(R).updated.accessible),ge(Ft,e(R).updated.compact),$(mt,"data-workspace-hover-card-agent-preview",e(R).contextIsPreview||void 0),ge(Lt,e(R).context)}),H(Be,Te)},$$slots:{default:!0}})}L(ye),H(G,ye)}),L(Ge);var Et=q(Ge,2);{var Pt=G=>{var R=gn(),ye=N(R),Qe=me(ye,!0),Xe=q(ye,2);bt(Xe,{get icon(){return ra},size:10}),L(R),Z(Be=>ge(Qe,Be),[()=>A.workspace_hoverCard_moreAgents_label({count:qe(e(Me))})]),H(G,R)};ie(Et,G=>{e(Me)&&G(Pt)})}L(ze),Z(G=>$(ze,"aria-label",G),[()=>A.workspace_multiSelectSidebar_agentsTab_label()]),H(Ye,ze)};ie(At,Ye=>{e(ce)&&Ye(Rt)})}var Na=q(At,2);{var Ha=Ye=>{var ze=_n(),Ge=N(ze);zt(Ge,21,()=>e(ot),G=>G.identity,(G,R)=>{var ye=ua();{const pt=Te=>{var xe=hn(),Ne=Fe(xe);bt(Ne,{get icon(){return e(R).statusIcon},size:16,get class(){return`shrink-0 justify-self-start ${e(R).foregroundClass??""}`}});var it=q(Ne,2),Tt=me(it,!0),$e=q(it,2),Ft=me($e,!0),mt=q($e,2),gt=me(mt,!0);Z(Lt=>{ge(Tt,Lt),ge(Ft,e(R).accessibleStateLabel),ge(gt,e(R).numberLabel??`#${e(R).number}`)},[()=>e(R).title||(e(R).resource?.repository.provider==="gitlab"?A.workspace_hoverCard_mergeRequest_label():A.workspace_hoverCard_pullRequest_label())]),H(Te,xe)};var Qe=N(ye);{var Xe=Te=>{{let xe=E(()=>h(e(R)));jt(Te,{variant:"plain",wrapContent:!1,class:"grid h-auto! w-full min-w-0 grid-cols-[1rem_minmax(0,1fr)_auto_auto] items-center justify-normal gap-x-2 whitespace-normal rounded-sm border-0! px-2! py-0! text-left font-normal transition-colors hover:bg-muted/50 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",get"aria-label"(){return e(xe)},"data-workspace-hover-card-pr-row":!0,get"data-pr-identity"(){return e(R).identity},get"data-pr-status"(){return e(R).status},get onkeydown(){return w()},onclick:Ne=>V(Ne,e(R)),children:(Ne,it)=>{pt(Ne)},$$slots:{default:!0}})}},Be=Te=>{var xe=bn(),Ne=N(xe);pt(Ne),L(xe),Z(()=>{$(xe,"data-pr-identity",e(R).identity),$(xe,"data-pr-status",e(R).status)}),H(Te,xe)};ie(Qe,Te=>{e(R).url?Te(Xe):Te(Be,-1)})}L(ye)}Z(pt=>$(ye,"aria-label",pt),[()=>e(R).url?void 0:h(e(R))]),H(G,ye)}),L(Ge);var Et=q(Ge,2);{var Pt=G=>{var R=wn(),ye=N(R),Qe=me(ye,!0),Xe=q(ye,2);bt(Xe,{get icon(){return ra},size:10}),L(R),Z(Be=>ge(Qe,Be),[()=>A.workspace_hoverCard_moreItems_label({count:qe(e(De))})]),H(G,R)};ie(Et,G=>{e(De)&&G(Pt)})}L(ze),Z((G,R)=>{$(ze,"aria-label",G),$(Ge,"aria-label",R)},[()=>e(Ie).every(G=>G.resource?.repository.provider==="gitlab")?A.workspace_hoverCard_mergeRequests_label():e(Ie).some(G=>G.resource?.repository.provider==="gitlab")?A.workspace_hoverCard_reviews_label():A.workspace_hoverCard_pullRequests_label(),()=>e(Ie).every(G=>G.resource?.repository.provider==="gitlab")?A.workspace_hoverCard_mergeRequests_label():e(Ie).some(G=>G.resource?.repository.provider==="gitlab")?A.workspace_hoverCard_reviews_label():A.workspace_hoverCard_pullRequests_label()]),H(Ye,ze)};ie(Na,Ye=>{e(Ke)&&Ye(Ha)})}L(xt),H(ue,We)};ie(Pe,ue=>{e(v)&&ue(de)})}Z(ue=>{X=Oe(F,1,"min-w-0 px-5 pt-4",null,X,{"pb-4":!e(v)}),ge(Ee,ue),ge(f,e(ke).label),ge(j,e(fe))},[()=>o().title||A.workspace_links_untitled_label()]),H(d,C)};ie(re,d=>{g()||!o()?d(Re):d(Ue,-1)})}L(he),H(a,he);var je=st(te);return u(),je}const fa=800,Ss=175,In=300;function Mn(){let a=0,t=null;const r=new Set,l=new Set;function c(){return a>0||t!==null?0:fa}function u(){const o=c();r.forEach(g=>g(o))}function s(){t!==null&&(clearTimeout(t),t=null)}return{get currentOpenDelay(){return c()},subscribe(o){return r.add(o),o(c()),()=>r.delete(o)},notifyOpened(){const o=a===0&&t===null;s(),a+=1,o&&u()},notifyClosed(){a!==0&&(a-=1,!(a>0)&&(s(),t=setTimeout(()=>{t=null,u()},In)))},deferClose(o){return l.add(o),()=>l.delete(o)},settleDeferredCloses(){const o=[...l];l.clear(),o.forEach(g=>g())},reset(){const o=c()!==fa;s(),a=0,l.clear(),o&&u()}}}const Rs=Mn();function qt(a){const t=Aa.select(ve.state,a);return t!==void 0&&Cr(t)}function Cn(a,t){if(!qt(a))return[];const r=vr.select(ve.state,a),l=Jt.select(ve.state,a),c=hr.select(ve.state),u=[];for(let s=0;s<Ar;s+=1){const o=c[s],g=o&&o!==a?Aa.select(ve.state,o):void 0;u.push({id:`assign-micro-key-${s+1}`,label:g?A.workspace_card_assignOccupiedMicroKey_label({number:qe(s+1),title:g.title}):A.workspace_card_assignMicroKeyNumber_label({number:qe(s+1)}),checked:r===s,closeOnSelect:!0,onClick:()=>{qt(a)&&ve.dispatch(Ir(s,a)),t()}})}return l!==null&&(u.push({type:"separator"}),u.push({id:"unassign-micro-key",label:A.workspace_card_unassignMicroKey_label(),onClick:()=>{qt(a)&&Jt.select(ve.state,a)===l&&ve.dispatch(Mr(l)),t()}})),u}function Es(a,{connected:t,onClose:r}){if(!t)return[];const l=Cn(a,r);if(l.length===0)return[];const c=l.filter(s=>"id"in s&&s.id!=="unassign-micro-key"),u=l.find(s=>"id"in s&&s.id==="unassign-micro-key");return[{id:"assign-micro-key",label:A.workspace_card_assignMicroKey_label(),icon:Ur,onClick:()=>{},selection:"single",submenu:c},...u?[u]:[]]}var Sn=z('<div data-static-position="" role="tooltip"><!></div>'),pa=z('<div role="tooltip"><!></div>');function Rn(a,t){if(new.target)return tt({component:Rn,...a});nt(t,!0);let r=I(t,"id",7),l=I(t,"anchor",7),c=I(t,"position",7,"right"),u=I(t,"absolute",7,!1),s=I(t,"anchorElement",7,null),o=I(t,"staticPosition",7,!1),g=I(t,"class",7,""),x=I(t,"children",7),b=I(t,"onmouseenter",7),w=I(t,"onmouseleave",7),m=I(t,"onfocusin",7),k=I(t,"onfocusout",7);const U=Zr(en()+2);tn(U);const B=an(U),T=8,i=4;let p=ne(null),_=ne(""),P=ne(void 0);const D=E(()=>c()==="bottom-right"||c()==="bottom-left"),Y=E(()=>c()==="top"),se=E(()=>o()?"relative":u()?"absolute":"fixed"),Ce=E(()=>c()==="right"?{x:-4,y:0}:c()==="bottom"?{x:4,y:0}:e(Y)?{x:0,y:4}:{x:0,y:-4});function le(v,h,ae){return Math.max(h,Math.min(ae,v))}let y=null,Q=null;function oe(){return!y?.isConnected||Q!==l()?!1:y.style.getPropertyValue("anchor-name").includes(l())||getComputedStyle(y).getPropertyValue("anchor-name").includes(l())}function Le(){return s()?s():(oe()||(y=Array.from(document.querySelectorAll('[style*="anchor-name"]')).find(v=>{const h=v.style.getPropertyValue("anchor-name"),ae=getComputedStyle(v).getPropertyValue("anchor-name");return h.includes(l())||ae.includes(l())})??null,Q=y?l():null),y)}function Me(){if(o()||u()||!e(p))return;const v=Le();if(!v)return;const h=v.getBoundingClientRect(),ae=e(p).getBoundingClientRect(),V=window.innerWidth||document.documentElement.clientWidth,te=window.innerHeight||document.documentElement.clientHeight,he=ae.width||e(p).offsetWidth,re=ae.height||e(p).offsetHeight,Re=Math.max(0,h.top-i-T),Ue=Math.max(0,te-h.bottom-i-T),je=e(Y)?!(Re<re&&Ue>Re):e(D)&&Ue<re&&Re>Ue;let d=h.left,C=h.bottom+i,F=je?Re:Ue;if(c()==="right"){const X=h.left-i-T,be=V-h.right-i-T;d=be>=he||be>=X?h.right+i:h.left-he-i,C=h.top,F=Math.max(0,te-T*2)}else c()==="bottom"?(d=h.left-he-i,C=h.bottom-re):(e(Y)||e(D))&&(c()==="bottom-left"?d=h.right-he:e(Y)&&(d=h.left+h.width/2-he/2),C=je?h.top-Math.min(re,F)-i:h.bottom+i);d=le(d,T,Math.max(T,V-he-T)),C=le(C,T,Math.max(T,te-Math.min(re,F)-T)),O(P,`${F}px`),O(_,`left: ${d}px; top: ${C}px;`)}let fe=!1;async function Ve(){fe||(fe=!0,await ja(),fe=!1,Me())}let ke=null;function ee(){ke||(ke=Jr(()=>{ke=null,Me()}))}function Se(v){const h=s()??(oe()?y:null);h&&v.target instanceof Node&&!v.target.contains(h)||ee()}kt(()=>{const v=e(p),h=s();o()||u()||!v||!h||Ve()}),ya(()=>{if(o())return;let v=null;return Ve().then(()=>{if(!u()&&typeof ResizeObserver<"u"){v=new ResizeObserver(ee),e(p)&&v.observe(e(p));const h=Le();h&&v.observe(h)}}),window.addEventListener("resize",ee),window.addEventListener("scroll",Se,!0),()=>{v?.disconnect(),window.removeEventListener("resize",ee),window.removeEventListener("scroll",Se,!0),ke?.(),ke=null}});var ft={get id(){return r()},set id(v){r(v),M()},get anchor(){return l()},set anchor(v){l(v),M()},get position(){return c()},set position(v="right"){c(v),M()},get absolute(){return u()},set absolute(v=!1){u(v),M()},get anchorElement(){return s()},set anchorElement(v=null){s(v),M()},get staticPosition(){return o()},set staticPosition(v=!1){o(v),M()},get class(){return g()},set class(v=""){g(v),M()},get children(){return x()},set children(v){x(v),M()},get onmouseenter(){return b()},set onmouseenter(v){b(v),M()},get onmouseleave(){return w()},set onmouseleave(v){w(v),M()},get onfocusin(){return m()},set onfocusin(v){m(v),M()},get onfocusout(){return k()},set onfocusout(v){k(v),M()},$set:at,$on:(v,h)=>rt(t,v,h)},Ie=Ut(),ot=Fe(Ie);{var De=v=>{var h=Sn(),ae=N(h);Ot(ae,()=>x()??Nt),L(h),et(h,V=>O(p,V),()=>e(p)),Z(()=>{$(h,"id",r()),Oe(h,1,e(se)+` z-50 w-64 flex flex-col overflow-y-auto border border-border pointer-events-auto ${B} `+g()),$(h,"data-surface-level",U)}),H(v,h)},ce=v=>{var h=pa();let ae;var V=N(h);Ot(V,()=>x()??Nt),L(h),et(h,te=>O(p,te),()=>e(p)),Z(()=>{$(h,"id",r()),Oe(h,1,e(se)+` z-50 w-64 flex flex-col border border-border pointer-events-none ${B} `+g()),$(h,"data-surface-level",U),ae=Ct(h,"",ae,{"position-anchor":l(),right:c()==="bottom"?"anchor(left)":void 0,left:c()==="right"?"anchor(right)":e(D)?"anchor(left)":e(Y)?"anchor(center)":void 0,top:c()==="right"?"anchor(top)":e(D)?"anchor(bottom)":void 0,bottom:c()==="bottom"?"anchor(bottom)":e(Y)?"anchor(top)":void 0,"margin-right":c()==="bottom"?"8px":void 0,"margin-left":c()==="right"?"8px":void 0,"margin-top":e(D)?"4px":void 0,"margin-bottom":e(Y)?"4px":void 0,translate:e(Y)?"-50% 0":void 0})}),He("mouseenter",h,function(...te){b()?.apply(this,te)}),He("mouseleave",h,function(...te){w()?.apply(this,te)}),Ae("focusin",h,function(...te){m()?.apply(this,te)}),Ae("focusout",h,function(...te){k()?.apply(this,te)}),It(1,h,()=>Zt,()=>({tier:"fast",...e(Ce),scale:.96})),It(2,h,()=>ea,()=>({tier:"fast"})),H(v,h)},Ke=v=>{br(v,{zIndex:50,children:(h,ae)=>{var V=pa();let te;var he=N(V);Ot(he,()=>x()??Nt),L(V),et(V,re=>O(p,re),()=>e(p)),Z(()=>{$(V,"id",r()),Oe(V,1,e(se)+` z-50 w-64 flex flex-col overflow-y-auto border border-border pointer-events-auto ${B} `+g()),$(V,"data-surface-level",U),te=Ct(V,e(_),te,{"max-height":e(P)})}),He("mouseenter",V,function(...re){b()?.apply(this,re)}),He("mouseleave",V,function(...re){w()?.apply(this,re)}),Ae("focusin",V,function(...re){m()?.apply(this,re)}),Ae("focusout",V,function(...re){k()?.apply(this,re)}),It(1,V,()=>Zt,()=>({tier:"fast",...e(Ce),scale:.96})),It(2,V,()=>ea,()=>({tier:"fast"})),H(h,V)},$$slots:{default:!0}})};ie(ot,v=>{o()?v(De):u()?v(ce,1):v(Ke,-1)})}return H(a,Ie),st(ft)}xa(["focusin","focusout"]);function _t(a,t){return t||/^(?:https?:|data:|blob:|workspace-asset:)/i.test(a.trim())}function En(a,t){if(t||!a)return a;const r=document.createElement("template");r.innerHTML=a;for(const l of r.content.querySelectorAll("img, video")){const c=l.getAttribute("src")||l.getAttribute("data-media-src")||"",u=[...l.querySelectorAll("source")];if(!_t(c,!1)||u.some(o=>!_t(o.getAttribute("src")||"",!1))){const o=document.createElement("img");o.setAttribute("alt",l.getAttribute("alt")||l.getAttribute("data-name")||""),o.setAttribute("data-media-unavailable","node-owned"),l.replaceWith(o);continue}l.removeAttribute("srcset");const s=l.getAttribute("poster");s&&!_t(s,!1)&&l.removeAttribute("poster")}return r.innerHTML}const Pn=[/(^|[^\\])\$(?!\$)(?=\S)(?:\\.|[^\\$\n])+?\$(?!\$)/,/(^|[^\\])\\\((?:\\.|[^\\\n])*?\\\)/,/^(?: {0,3})(?:\$\$|\\\[)/m,/^\s*[-*]\s*\[[ x]\]/m,/```/,/`[^`]+`/,/\|.*\|/,/\[.*\]\(.*\)/,/!\[.*\]\(.*\)/,/<[a-z][\s\S]*>/i,/^#{1,6}\s/m,/^\s*>\s/m,/\*\*[^*]+\*\*/,/\*[^*]+\*/,/_[^_]+_/,/~~[^~]+~~/,/^[-*_]{3,}\s*$/m,/^\s*[-*+]\s/m,/^\s*\d+\.\s/m];function Tn(a){return a&&(Pn.some(t=>t.test(a))||or(a,"markdown"))?"static":"simple"}var Fn=z("<!> <!>",1);function Ta(a,t){if(new.target)return tt({component:Ta,...a});nt(t,!0);let r=I(t,"workspaceId",7),l=I(t,"canUseMedia",7),c=ne(null),u=ne(null),s=ne(!1),o=ne(!1);function g(_){O(c,{url:_.getAttribute("src")||"",name:_.getAttribute("alt")||void 0,opener:_},!0),O(s,!0)}function x(_){const P=na(_.getAttribute("href")||"",r());return P&&l()(P)?(O(c,{url:P,name:_.textContent?.trim()||void 0,opener:_,assetLink:!0},!0),O(s,!0),!0):b(_)}function b(_){const P=wt(_.getAttribute("href")||"",r());return!P||!l()(P.url)?!1:(O(u,{url:P.url,mimeType:P.mimeType,name:_.textContent?.trim()||void 0,opener:_},!0),O(o,!0),!0)}kt(()=>{e(u)&&!wt(e(u).url,r())&&(O(o,!1),O(u,null)),e(c)?.assetLink&&!na(e(c).url,r())&&(O(s,!1),O(c,null))});var w={openImage:g,openAsset:x,get workspaceId(){return r()},set workspaceId(_){r(_),M()},get canUseMedia(){return l()},set canUseMedia(_){l(_),M()},$set:at,$on:(_,P)=>rt(t,_,P)},m=Fn(),k=Fe(m);{var U=_=>{ur(_,{get imageUrl(){return e(c).url},get imageName(){return e(c).name},get openerElement(){return e(c).opener},showActionsMenu:!0,get open(){return e(s)},set open(P){O(s,P,!0)}})},B=E(()=>e(c)&&l()(e(c).url));ie(k,_=>{e(B)&&_(U)})}var T=q(k,2);{var i=_=>{Ia(_,{get videoUrl(){return e(u).url},get videoName(){return e(u).name},get mimeType(){return e(u).mimeType},sourceKind:"workspace",get openerElement(){return e(u).opener},get open(){return e(o)},set open(P){O(o,P,!0)}})},p=E(()=>e(u)&&wt(e(u).url,r())&&l()(e(u).url));ie(T,_=>{e(p)&&_(i)})}return H(a,m),st(w)}var Ln=z('<div class="flex items-center gap-2"><!> <!></div>'),Wn=z('<div class="absolute inset-0 flex items-center justify-center bg-muted text-muted-foreground" aria-hidden="true"><svg viewBox="0 0 24 24" class="size-10" fill="none"><rect x="3" y="5" width="18" height="14" rx="2" stroke="currentColor"></rect><path d="m10 9 5 3-5 3V9Z" fill="currentColor"></path></svg></div> <video preload="metadata" playsinline="" tabindex="-1" aria-hidden="true"></video> <span class="absolute inset-0 flex items-center justify-center bg-black/10 transition-colors group-hover:bg-black/20 motion-reduce:transition-none forced-colors:bg-transparent" aria-hidden="true"><span class="flex size-11 items-center justify-center rounded-full border border-white/70 bg-black/60 text-white shadow-(--elevation-raised) forced-colors:border forced-colors:bg-[Canvas] forced-colors:text-[CanvasText]"><svg viewBox="0 0 20 20" class="ml-0.5 size-5" fill="currentColor"><path d="m7 5 7 5-7 5V5Z"></path></svg></span></span>',3),Nn=z('<div class="group relative aspect-video w-full max-h-40 max-w-2xl" style="width: min(100%, calc(10rem * 16 / 9));"><!> <!></div>'),Hn=z('<div class="my-2 min-w-0 max-w-2xl" data-chat-video=""><!></div> <!>',1);function Fa(a,t){if(new.target)return tt({component:Fa,...a});nt(t,!0);let r=I(t,"source",7),l=I(t,"name",23,()=>A.chat_videoBlock_fromAgent_label()),c=I(t,"poster",7),u=I(t,"allowFileMedia",7,!0),s=I(t,"canOpenFile",7),o=ne(!1),g=ne(!1),x=ne(!1),b=ne(null);const w=E(()=>r().kind==="inline"?`data:${r().mimeType};base64,${r().data}`:r().url);function m(y){return _t(y,u()&&s()?.()!==!1)}const k=E(()=>!m(e(w))),U=E(()=>yt(e(w))),B=E(()=>{if(!(!c()||!m(c()))){if(/^data:image\/(?:gif|jpeg|png|webp);base64,[a-z0-9+/=]+$/i.test(c()))return c();try{const y=new URL(c());return(y.protocol==="https:"||y.protocol==="workspace-file:")&&!y.username&&!y.password?c():void 0}catch{return}}});function T(){O(g,!0),O(x,!1)}var i={get source(){return r()},set source(y){r(y),M()},get name(){return l()},set name(y=A.chat_videoBlock_fromAgent_label()){l(y),M()},get poster(){return c()},set poster(y){c(y),M()},get allowFileMedia(){return u()},set allowFileMedia(y=!0){u(y),M()},get canOpenFile(){return s()},set canOpenFile(y){s(y),M()},$set:at,$on:(y,Q)=>rt(t,y,Q)},p=Hn(),_=Fe(p),P=N(_);{var D=y=>{Vt(y,{get name(){return l()},reason:"load-failed"})},Y=y=>{var Q=Ln(),oe=N(Q);{let Me=E(()=>e(U)?.path),fe=E(()=>e(U)?.workspaceId);Vt(oe,{get name(){return l()},reason:"load-failed",get path(){return e(Me)},get workspaceId(){return e(fe)}})}var Le=q(oe,2);Kt(Le,{get videoUrl(){return e(w)},get videoName(){return l()},get sourceKind(){return r().kind},get mimeType(){return r().mimeType}}),L(Q),H(y,Q)},se=y=>{var Q=Nn(),oe=N(Q);{let Me=E(()=>A.chat_videoBlock_play_ariaLabel({name:l()}));jt(oe,{type:"button",variant:"ghost",size:"default",class:"relative block size-full cursor-pointer overflow-hidden rounded-lg border border-border bg-muted/40 p-0 shadow-(--elevation-raised) focus-visible:border-ring focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 forced-colors:border",get"aria-label"(){return e(Me)},"data-testid":"chat-video-snapshot",onclick:()=>{m(e(w))&&O(o,!0)},get ref(){return e(b)},set ref(fe){O(b,fe,!0)},children:(fe,Ve)=>{var ke=Wn(),ee=q(Fe(ke),2);ee.muted=!0,Ga(2),Z(()=>{$(ee,"src",e(w)),$(ee,"poster",e(B)),Oe(ee,1,`pointer-events-none absolute inset-0 size-full object-contain transition-opacity motion-reduce:transition-none ${e(B)||e(g)&&!e(x)?"opacity-100":"opacity-0"}`)}),He("loadeddata",ee,T),He("error",ee,()=>O(x,!0)),H(fe,ke)},$$slots:{default:!0}})}var Le=q(oe,2);Kt(Le,{get videoUrl(){return e(w)},get videoName(){return l()},get sourceKind(){return r().kind},get mimeType(){return r().mimeType},triggerClass:"absolute right-1.5 top-1.5 opacity-0 transition-opacity focus-visible:opacity-100 group-focus-within:opacity-100 group-hover:opacity-100 data-[state=open]:opacity-100"}),L(Q),H(y,Q)};ie(P,y=>{e(k)?y(D):e(x)?y(Y,1):y(se,-1)})}L(_);var Ce=q(_,2);{var le=y=>{Ia(y,{get videoUrl(){return e(w)},get videoName(){return l()},get poster(){return e(B)},get sourceKind(){return r().kind},get mimeType(){return r().mimeType},get openerElement(){return e(b)},get open(){return e(o)},set open(Q){O(o,Q,!0)}})};ie(Ce,y=>{!e(x)&&!e(k)&&y(le)})}return H(a,p),st(i)}const On=/^\s*!\[([^\]\n]*)\]\((?:<)?((?:intent:\/\/local\/|workspace-file:\/\/|workspace-asset:\/\/)[^)\s>]+)(?:>)?\)\s*$/,qn=/^ {0,3}(`{3,}|~{3,})(.*)$/;function ma(a,t){if(typeof a!="string"||!a||a!==a.trim())return null;if(a.startsWith("workspace-asset://"))return wt(a,t);if(a.startsWith("workspace-file://")){const l=yt(a);if(!l||l.workspaceId!==t)return null;const c=Sa(a);return c?la(c,t):null}const r=a.startsWith("intent://")?a:`intent://local/file/${a}`;return la(r,t)}function Dn(a,t){if(a.startsWith("workspace-file://")){const r=yt(a);if(!r||r.workspaceId!==t)return!1;const l=Sa(a);return!!l&&!!St(l,t)}return!!St(a,t,{readOnly:!0})}function Un(a,t){return(t===0||!a[t-1].trim())&&(t===a.length-1||!a[t+1].trim())}function zn(a,t,r){const l=r[0];return a.findIndex((c,u)=>{if(u<=t)return!1;const s=c.trim();return s.length>=r.length&&s.split("").every(o=>o===l)})}function Bn(a,t){const r=a.split(`
|
|
4
4
|
`),l=[];let c=[];const u=()=>{const s=c.join(`
|
|
5
5
|
`);s.trim()&&l.push({type:"markdown",content:s}),c=[]};for(let s=0;s<r.length;s+=1){const o=r[s].match(qn);if(o){const k=zn(r,s,o[1]);if(k>s){const U=r.slice(s,k+1);if(o[2].trim()==="ws-block:video")try{const B=JSON.parse(r.slice(s+1,k).join(`
|
|
6
|
-
`)),T=ma(B?.path,t);if(T){u(),l.push({type:"video",source:T,name:typeof B.path=="string"?B.path:void 0,poster:typeof B.poster=="string"?B.poster:void 0}),s=k;continue}}catch{}c.push(...U),s=k;continue}c.push(...r.slice(s));break}const x=!/^(?: {4}|\t)/.test(r[s])&&Un(r,s)?r[s].match(On):null;if(!x){c.push(r[s]);continue}const[,b,w]=x,m=ma(w,t);m?(u(),l.push({type:"video",source:m,name:b||void 0})):w.startsWith("workspace-asset://")&&!Kr(w)||Dn(w,t)?c.push(r[s]):c.push(`[${b}](${w})`)}return u(),l}function vt(a){return Ma(a.getAttribute("src")||"")}function Dt(a){return a instanceof HTMLImageElement?a:a instanceof HTMLAnchorElement?a.querySelector("img"):null}function Vn(a,t){const r=a.getBoundingClientRect(),l=t.getBoundingClientRect();return{top:r.top-l.top+6,right:l.right-r.right+6}}function ga(a,t){const r=document.activeElement;return!!(r&&(r===a||r===a?.closest("a")||t?.contains(r)))}function Kn(a,t){const r=a.getAttribute("src")||"",l=yt(r)?.path??Ra(r,t)?.path;if(l)return l;if(r.startsWith("workspace-asset://")){const c=r.split(/[?#]/)[0].split("/").pop();if(c)return c}if(r&&!/^[a-z][a-z0-9+.-]*:/i.test(r)&&!r.startsWith("//"))try{return decodeURI(r)}catch{return r}return a.getAttribute("alt")||void 0}const La="data-image-sized",va=a=>typeof a=="number"&&Number.isInteger(a)&&a>0;function jn(a){try{return encodeURI(a).replace(/%25/g,"%")}catch{return null}}function Gn(a){return a.startsWith("workspace-file://")?a.split(/[?#]/)[0]:a}function Qn(a,t,r){const l=new Map;for(const[c,u]of Object.entries(a)){if(!u||!va(u.width)||!va(u.height))continue;const s={width:u.width,height:u.height},o=new Set([c]),g=jn(c);g&&o.add(g);for(const x of[...o]){const b=St(x,t);if(b&&o.add(b),r!==void 0){const w=jr(x,r);if(w){const m=St(`intent://local/file/${w.split("/").map(encodeURIComponent).join("/")}`,t);m&&o.add(m)}}}for(const x of o)l.has(x)||l.set(x,s)}return l}function Yn(a,t,r,l){if(!t||!a.includes("<img"))return a;const c=Qn(t,r,l);return c.size===0?a:a.replace(/<img\b(?:[^>"']|"[^"]*"|'[^']*')*>/gi,u=>{if(/\s(?:width|height)="/i.test(u))return u;const s=/\ssrc="([^"]*)"/i.exec(u);if(!s)return u;const o=Gn(s[1].replace(/&/g,"&")),g=c.get(o);return g?u.replace(/\s*\/?>$/,` width="${g.width}" height="${g.height}" ${La}="">`):u})}function ha(a,t){let r=t,l,c=!1,u=!1;const s=new Map;function o(){for(const[b,{component:w,source:m}]of s)ut(w),a.contains(b)&&b.replaceWith(m);s.clear()}function g(){if(!u){for(const[b,{component:w}]of s)a.contains(b)||(ut(w),s.delete(b));if(r.enabled)for(const b of a.querySelectorAll("pre > code")){if(b.closest("[data-markdown-diagram]"))continue;const w=[...b.classList].find(T=>T.startsWith("language-"))?.slice(9);let m;if(w==="mermaid")m="mermaid";else if(w==="diagram"||w==="ws-block:diagram")m="diagram";else if(w==="ws-block")try{if(JSON.parse(b.textContent??"").type!=="diagram")continue;m="diagram"}catch{continue}else continue;const k=b.parentElement;if(!k)continue;if(!l){c||(c=!0,ka(()=>import("./CpnH3je1.js"),__vite__mapDeps([57,2,1,58,46,59,32,14,7,18,19,20,21,3,12,24,11,6,8,33,9,10,13,15,34,5,47,48,49,50,29,30,31,35,36,37,60,0,4,16,17,22,23,25,26,27,28,38,39,40,41,42,43,44,45,51,52,53,54,55,56,61,62,63,64,65,66,67,68]),import.meta.url).then(T=>{l=T.default,c=!1,g()}).catch(T=>{c=!1,ht.error("Failed to load the Markdown diagram renderer",{error:T})}));return}const U=document.createElement("div");U.dataset.markdownDiagram=m,k.replaceWith(U);const B=Mt(l,{target:U,context:r.context,props:{kind:m,source:b.textContent??"",workspaceId:r.workspaceId}});s.set(U,{component:B,source:k})}}}const x=new MutationObserver(g);return x.observe(a,{childList:!0,subtree:!0}),queueMicrotask(g),{update(b){(r.enabled!==b.enabled||r.workspaceId!==b.workspaceId)&&o(),r=b,g()},destroy(){u=!0,x.disconnect(),o()}}}var Xn=z('<span class="min-w-0 max-w-full truncate"> </span>'),$n=z('<span class="type-caption flex min-w-0 max-w-full items-start gap-2 whitespace-normal py-1 text-muted-foreground" role="status" data-testid="media-loading-placeholder"><span class="first-line-icon" aria-hidden="true"><!></span> <span class="flex min-w-0 flex-wrap items-baseline gap-x-1.5"><span> </span> <!></span></span>');function Wa(a,t){if(new.target)return tt({component:Wa,...a});nt(t,!0);let r=I(t,"name",7);var l={get name(){return r()},set name(m){r(m),M()},$set:at,$on:(m,k)=>rt(t,m,k)},c=$n(),u=N(c),s=N(u);bt(s,{get icon(){return zr},class:"size-3.5"}),L(u);var o=q(u,2),g=N(o),x=me(g,!0),b=q(g,2);{var w=m=>{var k=Xn(),U=me(k,!0);Ze(k,(B,T)=>Bt?.(B,T),r),Z(()=>ge(U,r())),H(m,k)};ie(b,m=>{r()&&m(w)})}return L(o),L(c),Z(m=>ge(x,m),[()=>A.ui_mediaLoadingPlaceholder_title_label()]),H(a,c),st(l)}const ba="markdown-image-frame";function Jn(a,t){const r=new Map,l=new Map,c=new Map,u=[300,1e3];let s=!1;function o(i){let p=l.get(i);return p||(p={source:i.getAttribute("src")||"",workspaceId:t.getWorkspaceId(),retries:0,failureHandled:!1},l.set(i,p)),p}function g(i){const p=o(i);return!s&&a.contains(p.fallbackHost??i)&&p.workspaceId===t.getWorkspaceId()&&t.canUseMedia(p.source)&&!i.hasAttribute("data-media-unavailable")&&!i.hasAttribute("data-media-unsupported")&&sa(p.source)!==null}function x(i,p=!1){if(!g(i))return;const _=o(i),P=sa(_.source);if(!P)return;const D=_.fallbackHost,Q=D?.contains(document.activeElement)??!1;if(_.failureHandled=!1,_.fallbackHost=void 0,p&&(_.retries=0),i.removeAttribute("src"),i.setAttribute("src",P),D){const se=r.get(D);se&&ut(se),r.delete(D),D.replaceWith(i),U(),Q&&a.contains(i)&&i.focus()}}function b(i){const p=o(i);s||!a.contains(i)||p.failureHandled||(p.failureHandled=!0,g(i)&&p.retries<u.length?p.timer=setTimeout(()=>{p.timer=void 0,x(i)},u[p.retries++]):k(i,"load-failed"))}function w(i){const p=i.parentElement;return p?.classList.contains(ba)?p:null}function m(i){const p=Number(i.getAttribute("width")),_=Number(i.getAttribute("height"));if(!(p>0&&_>0))return;const P=document.createElement("span");P.className=ba,P.style.aspectRatio=`${p} / ${_}`,P.style.setProperty("--image-aspect-ratio",`${p} / ${_}`),P.style.width=`min(${p}px, 100%)`,P.dataset.loaded="false",i.replaceWith(P),P.appendChild(i);const D=P.appendChild(document.createElement("span"));D.className="markdown-image-frame-placeholder",r.set(D,Mt(Wa,{target:D,props:{name:Kn(i,t.getWorkspaceId())}}));const Q=()=>{if(c.delete(i),s||!a.contains(P))return;P.dataset.loaded="true";const se=r.get(D);se&&(ut(se),r.delete(D)),D.remove()};i.complete&&i.naturalWidth>0?Q():(c.set(i,Q),i.addEventListener("load",Q,{once:!0}))}function k(i,p){const _=i.getAttribute("src")||i.getAttribute("data-media-src")||"",P=yt(_),D=Ra(_,t.getWorkspaceId()),Q=P?.path??D?.path,se=P?.workspaceId??D?.workspaceId,Ce=i.getAttribute("data-name")||i.getAttribute("alt")||Q?.split("/").pop()||void 0,le=document.createElement(i instanceof HTMLVideoElement?"div":"span");le.className="media-unavailable-host",(w(i)??i).replaceWith(le),t.onMediaRemoved(i);let y;if(i instanceof HTMLImageElement&&p==="load-failed"){const oe=o(i);oe.fallbackHost=le,g(i)&&(y=()=>x(i,!0))}const Y=Mt(Vt,{target:le,props:{name:Ce,reason:p,path:Q,workspaceId:se,onRetry:y}});if(r.set(le,Y),i instanceof HTMLVideoElement){le.classList.add("flex","items-center","gap-2");const oe=le.appendChild(document.createElement("span"));r.set(oe,Mt(Kt,{target:oe,props:{videoUrl:_,videoName:Ce,sourceKind:"workspace",mimeType:wt(_,t.getWorkspaceId())?.mimeType}}))}}function U(){if(!s){for(const i of a.querySelectorAll("img"))vt(i)&&!i.closest("a")&&(i.tabIndex=0,i.setAttribute("role","button")),!(i.hasAttribute("data-media-unsupported")||i.hasAttribute("data-media-unavailable"))&&(o(i),i.hasAttribute(La)&&!w(i)&&m(i),i.getAttribute("src")&&i.complete&&i.naturalWidth===0&&b(i));for(const i of a.querySelectorAll("[data-media-unsupported]"))k(i,"unsupported");for(const i of a.querySelectorAll("[data-media-unavailable]"))k(i,Gr(i));for(const[i,p]of l)a.contains(p.fallbackHost??i)||(p.timer!==void 0&&clearTimeout(p.timer),l.delete(i));for(const[i,p]of c)a.contains(i)||(i.removeEventListener("load",p),c.delete(i));for(const[i,p]of r)a.contains(i)||(ut(p),r.delete(i))}}function B(i){const p=i.target;(p instanceof HTMLImageElement||p instanceof HTMLVideoElement)&&(p instanceof HTMLImageElement?b(p):k(p,"load-failed"))}const T=new MutationObserver(U);return T.observe(a,{childList:!0,subtree:!0}),a.addEventListener("error",B,!0),queueMicrotask(U),{destroy(){s=!0,T.disconnect();for(const i of l.values())i.timer!==void 0&&clearTimeout(i.timer);l.clear();for(const[i,p]of c)i.removeEventListener("load",p);c.clear(),a.removeEventListener("error",B,!0);for(const i of r.values())ut(i);r.clear()}}}var Zn=z('<div class="image-actions-overlay absolute z-10 svelte-nzvuq5" data-testid="markdown-image-actions-overlay"><!></div>'),es=z("<div></div>"),wa=z('<div role="group"><!> <!></div>'),ts=z('<div><p class="whitespace-pre-wrap svelte-nzvuq5"> </p></div>'),as=z("<!> <!>",1);function _a(a,t){if(new.target)return tt({component:_a,...a});nt(t,!0);const r=n=>{var f=Ut(),W=Fe(f);{var S=K=>{var J=Zn(),Pe=N(J);{let de=E(()=>e(ce).getAttribute("src")||""),ue=E(()=>e(ce).getAttribute("alt")||void 0);et(fr(Pe,{get imageUrl(){return e(de)},get imageName(){return e(ue)},get open(){return e(v)},set open(We){O(v,We,!0)}}),We=>O(h,We,!0),()=>e(h))}L(J),et(J,de=>O(ae,de),()=>e(ae)),Z(()=>Ct(J,`top: ${e(Ke).top??""}px; right: ${e(Ke).right??""}px;`)),H(K,J)},j=E(()=>e(ce)&&Y(e(ce).getAttribute("src")||""));ie(W,K=>{e(j)&&K(S)})}H(n,f)};let l=I(t,"content",7),c=I(t,"isStreaming",7,!1),u=I(t,"className",7,""),s=I(t,"workspaceId",23,()=>ca()?.workspaceId??void 0),o=I(t,"relativeMediaBase",7),g=I(t,"onCodeBlockAction",7),x=I(t,"onFileClick",7),b=I(t,"canOpenFile",7),w=I(t,"allowFileMedia",7,!0),m=I(t,"taskBlockRenderMode",7,"placeholder"),k=I(t,"chatImageThumbnails",7,!1),U=I(t,"forceExternalLinks",7,!1),B=I(t,"renderRichFencesAsCode",7,!1),T=I(t,"renderDiagrams",7,!1),i=I(t,"allowSanitizedHtml",7,!1),p=I(t,"media",7);const _=Qr(),P=Qa(),D=E(()=>Bn(l(),s())),Q=E(()=>e(D).some(n=>n.type==="video")),se=E(()=>!e(Q)&&e(D).length===1&&e(D)[0].type==="markdown"?e(D)[0].content:l()),Ce=E(()=>Tn(e(se)));let le=ne(null),y=ne("");function Y(n){return _t(n,w()&&b()?.()!==!1)}const oe=E(()=>En(e(y),w()&&b()?.()!==!1)),Le=E(()=>pr(e(oe),s(),mr)),Me=E(()=>`<div class="markdown-content">${e(Le)}</div>`);let fe=0;const Ve=150;let ke=-1/0,ee=null,Se=null;async function ft(n,f,W,S){try{const j=await Yr(n,{...f,readOnly:!0});if(S!==fe)return;O(y,Yn(j,W,f?.workspaceId,f?.relativeMediaBase),!0)}catch(j){if(S!==fe)return;ht.error("Failed to process markdown:",j);const K=n.replace(/[&<>"']/g,J=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[J]||J);O(y,`<p>${K}</p>`)}}function Ie(){if(!Se)return;const n=Ve-(performance.now()-ke);if(n>0){ee=setTimeout(()=>{ee=null,Ie()},n);return}const f=Se;Se=null,ke=performance.now(),f()}function ot(){ee!==null&&(clearTimeout(ee),ee=null),Se=null,ke=-1/0}kt(()=>{const n=e(se),f={allowEmpty:!0,skipIfHTML:!1,preserveAnchors:!0,taskBlockRenderMode:m(),workspaceId:s(),relativeMediaBase:o()??(s()&&s()!==Sr?"":void 0),renderRichFencesAsCode:B()||T(),processPrimitives:!T(),allowSanitizedHtml:i(),renderMath:!c(),workspaceFileVersion:_},W=p(),S=++fe,j=()=>void ft(n,f,W,S);c()?(Se=j,ee===null&&Ie()):(ot(),j())});let De=ne(void 0),ce=ne(null),Ke=ne(Ya({top:0,right:0})),v=ne(!1),h=ne(void 0),ae=ne(null);function V(n){if(n.type==="mouseover"&&ga(e(ce),e(ae)))return;const f=n.target,W=Dt(f);if(W&&vt(W)&&Y(W.getAttribute("src")||"")){if(e(ce)===W)return;O(ce,W,!0),O(Ke,Vn(W,n.currentTarget),!0)}else if(e(ce)&&!e(v)){if(f instanceof Node&&e(ae)?.contains(f))return;O(ce,null)}}function te(){!e(v)&&!ga(e(ce),e(ae))&&O(ce,null)}function he(n){const f=Dt(n.target);!f||!vt(f)||!Y(f.getAttribute("src")||"")||(n.preventDefault(),n.stopPropagation(),V(n),O(v,!0))}function re(n){return Jn(n,{getWorkspaceId:()=>s(),canUseMedia:Y,onMediaRemoved:f=>{e(ce)===f&&O(ce,null)}})}function Re(n){const f=n.target,W=f.closest("a");if(!W&&f instanceof HTMLImageElement){const j=f.getAttribute("src")||"";if(Ma(j)&&Y(j)){n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation(),e(De)?.openImage(f);return}}if(W?.href){if(n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation(),e(De)?.openAsset(W))return;const j=d(n),K=s()?ta(s()):void 0;ia(W.href,{workspaceId:K,canOpenFile:b(),sourcePanelId:j,event:n,rawHref:W.getAttribute("href")??void 0,...U()?{forceExternal:!0}:{}});return}const S=Xr(f.closest("[data-mention]"));if(S){const{type:j,meta:K}=S;if(j==="file"&&S.filePath){if(b()?.()===!1)return;n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation();const J=S.filePath;ht.debug("[MarkdownViewer] File mention clicked",{filePath:J,meta:K});const Pe=d(n),de=Ht({event:n});if(x())x()(J,{line:S.line,openInAdjacentPanel:de,sourcePanelId:Pe});else{const ue=s();ue&&ve.dispatch(Rr(ue,J,{line:S.line,openInAdjacentPanel:de,sourcePanelId:Pe}))}}else if(S.folderPath!==void 0){if(b()?.()===!1||!s())return;n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation(),ve.dispatch(Er(s(),$r(S.folderPath)))}else if(j==="note"&&S.note){n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation();const J=S.note.id;ht.debug("[MarkdownViewer] Note mention clicked",{noteId:J,meta:K});const Pe=d(n),de=Ht({event:n});if(S.note.workspaceId&&S.note.workspaceId!==s()){ia(ir(J,S.note.workspaceId),{workspaceId:s()?ta(s()):void 0,sourcePanelId:Pe,event:n});return}const ue=s();ue&&ve.dispatch(Pr(ue,J,{openInAdjacentPanel:de,sourcePanelId:Pe}))}}}function Ue(n){if(je(n),!n.defaultPrevented){if(n.target instanceof HTMLImageElement&&vt(n.target)&&(n.key==="Enter"||n.key===" ")){Re(n);return}n.key!=="Enter"||!Ht({event:n})||Re(n)}}function je(n){const f=Dt(n.target);!f||!vt(f)||!Y(f.getAttribute("src")||"")||e(h)?.handleCopy(n,f.getAttribute("src")||"")}function d(n){const f=n.target;if(f instanceof HTMLElement)return f.closest("[data-panel-id]")?.dataset.panelId}Xa(()=>{fe+=1,ot()});var C={get content(){return l()},set content(n){l(n),M()},get isStreaming(){return c()},set isStreaming(n=!1){c(n),M()},get className(){return u()},set className(n=""){u(n),M()},get workspaceId(){return s()},set workspaceId(n=ca()?.workspaceId??void 0){s(n),M()},get relativeMediaBase(){return o()},set relativeMediaBase(n){o(n),M()},get onCodeBlockAction(){return g()},set onCodeBlockAction(n){g(n),M()},get onFileClick(){return x()},set onFileClick(n){x(n),M()},get canOpenFile(){return b()},set canOpenFile(n){b(n),M()},get allowFileMedia(){return w()},set allowFileMedia(n=!0){w(n),M()},get taskBlockRenderMode(){return m()},set taskBlockRenderMode(n="placeholder"){m(n),M()},get chatImageThumbnails(){return k()},set chatImageThumbnails(n=!1){k(n),M()},get forceExternalLinks(){return U()},set forceExternalLinks(n=!1){U(n),M()},get renderRichFencesAsCode(){return B()},set renderRichFencesAsCode(n=!1){B(n),M()},get renderDiagrams(){return T()},set renderDiagrams(n=!1){T(n),M()},get allowSanitizedHtml(){return i()},set allowSanitizedHtml(n=!1){i(n),M()},get media(){return p()},set media(n){p(n),M()},$set:at,$on:(n,f)=>rt(t,n,f)},F=as(),X=Fe(F);{var be=n=>{var f=es();zt(f,21,()=>e(D),Za,(W,S)=>{var j=Ut(),K=Fe(j);{var J=de=>{Fa(de,{get allowFileMedia(){return w()},get canOpenFile(){return b()},get source(){return e(S).source},get name(){return e(S).name},get poster(){return e(S).poster}})},Pe=de=>{_a(de,{get content(){return e(S).content},get isStreaming(){return c()},get workspaceId(){return s()},get relativeMediaBase(){return o()},get onCodeBlockAction(){return g()},get onFileClick(){return x()},get canOpenFile(){return b()},get allowFileMedia(){return w()},get taskBlockRenderMode(){return m()},get chatImageThumbnails(){return k()},get forceExternalLinks(){return U()},get renderRichFencesAsCode(){return B()},get renderDiagrams(){return T()},get allowSanitizedHtml(){return i()},get media(){return p()}})};ie(K,de=>{e(S).type==="video"?de(J):de(Pe,-1)})}H(W,j)}),L(f),Z(()=>Oe(f,1,`markdown-video-segments ${u()??""}`,"svelte-nzvuq5")),H(n,f)},pe=n=>{var f=wa();let W;var S=N(f);oa(S,()=>e(Me));var j=q(S,2);r(j),L(f),Ze(f,K=>re?.(K)),Ze(f,(K,J)=>ha?.(K,J),()=>({enabled:T(),workspaceId:s(),context:P})),Z(()=>W=Oe(f,1,`markdown-viewer streaming-content ${u()??""}`,"svelte-nzvuq5",W,{"chat-image-thumbnails":k()})),Ae("click",f,Re),Ae("keydown",f,Ue),He("copy",f,je),Ae("contextmenu",f,he),Ae("mouseover",f,V),Ae("focusin",f,V),He("mouseleave",f,te),H(n,f)},we=n=>{var f=ts(),W=N(f),S=me(W,!0);L(f),Z(()=>{Oe(f,1,`markdown-viewer simple-content ${u()??""}`,"svelte-nzvuq5"),ge(S,e(se))}),H(n,f)},Ee=n=>{var f=wa();let W;var S=N(f);oa(S,()=>e(Me));var j=q(S,2);r(j),L(f),et(f,K=>O(le,K),()=>e(le)),Ze(f,K=>re?.(K)),Ze(f,(K,J)=>ha?.(K,J),()=>({enabled:T(),workspaceId:s(),context:P})),Z(()=>W=Oe(f,1,`markdown-viewer static-content ${u()??""}`,"svelte-nzvuq5",W,{"chat-image-thumbnails":k()})),Ae("click",f,Re),Ae("keydown",f,Ue),He("copy",f,je),Ae("contextmenu",f,he),Ae("mouseover",f,V),Ae("focusin",f,V),He("mouseleave",f,te),H(n,f)};ie(X,n=>{e(Q)?n(be):c()?n(pe,1):e(Ce)==="simple"&&!i()?n(we,2):n(Ee,-1)})}var _e=q(X,2);return et(Ta(_e,{get workspaceId(){return s()},canUseMedia:Y}),n=>O(De,n,!0),()=>e(De)),H(a,F),st(C)}xa(["click","keydown","contextmenu","mouseover","focusin"]);class Ps{constructor(t){lt(this,"container");lt(this,"previousFocus",null);lt(this,"firstFocusable",null);lt(this,"lastFocusable",null);lt(this,"handleKeyDown");this.container=t,this.handleKeyDown=this.onKeyDown.bind(this)}activate(){this.previousFocus=document.activeElement;const t=this.container.querySelectorAll('a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])');t.length>0&&(this.firstFocusable=t[0],this.lastFocusable=t[t.length-1],this.firstFocusable.focus()),document.addEventListener("keydown",this.handleKeyDown)}deactivate(){document.removeEventListener("keydown",this.handleKeyDown),this.previousFocus&&this.previousFocus.focus()}onKeyDown(t){t.key==="Tab"&&(!this.firstFocusable||!this.lastFocusable||(t.shiftKey?document.activeElement===this.firstFocusable&&(t.preventDefault(),this.lastFocusable.focus()):document.activeElement===this.lastFocusable&&(t.preventDefault(),this.firstFocusable.focus())))}}function Ts(a,t){const r=x=>{const b=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(x);return b?{r:parseInt(b[1],16),g:parseInt(b[2],16),b:parseInt(b[3],16)}:null},l=x=>{const[b,w,m]=[x.r,x.g,x.b].map(k=>(k=k/255,k<=.03928?k/12.92:Math.pow((k+.055)/1.055,2.4)));return .2126*b+.7152*w+.0722*m},c=r(a),u=r(t);if(!c||!u)return ht.warn("Invalid color values for contrast check",{foreground:a,background:t}),{ratio:0,passes:{aa:!1,aaa:!1}};const s=l(c),o=l(u),g=(Math.max(s,o)+.05)/(Math.min(s,o)+.05);return{ratio:g,passes:{aa:g>=4.5,aaa:g>=7}}}export{Fa as C,Ps as F,Rn as H,_a as M,Ss as W,Wa as a,fa as b,An as c,Pa as d,Ts as e,Cn as f,Es as g,Ea as h,on as r,Bn as s,Rs as w};
|
|
6
|
+
`)),T=ma(B?.path,t);if(T){u(),l.push({type:"video",source:T,name:typeof B.path=="string"?B.path:void 0,poster:typeof B.poster=="string"?B.poster:void 0}),s=k;continue}}catch{}c.push(...U),s=k;continue}c.push(...r.slice(s));break}const x=!/^(?: {4}|\t)/.test(r[s])&&Un(r,s)?r[s].match(On):null;if(!x){c.push(r[s]);continue}const[,b,w]=x,m=ma(w,t);m?(u(),l.push({type:"video",source:m,name:b||void 0})):w.startsWith("workspace-asset://")&&!Kr(w)||Dn(w,t)?c.push(r[s]):c.push(`[${b}](${w})`)}return u(),l}function vt(a){return Ma(a.getAttribute("src")||"")}function Dt(a){return a instanceof HTMLImageElement?a:a instanceof HTMLAnchorElement?a.querySelector("img"):null}function Vn(a,t){const r=a.getBoundingClientRect(),l=t.getBoundingClientRect();return{top:r.top-l.top+6,right:l.right-r.right+6}}function ga(a,t){const r=document.activeElement;return!!(r&&(r===a||r===a?.closest("a")||t?.contains(r)))}function Kn(a,t){const r=a.getAttribute("src")||"",l=yt(r)?.path??Ra(r,t)?.path;if(l)return l;if(r.startsWith("workspace-asset://")){const c=r.split(/[?#]/)[0].split("/").pop();if(c)return c}if(r&&!/^[a-z][a-z0-9+.-]*:/i.test(r)&&!r.startsWith("//"))try{return decodeURI(r)}catch{return r}return a.getAttribute("alt")||void 0}const La="data-image-sized",va=a=>typeof a=="number"&&Number.isInteger(a)&&a>0;function jn(a){try{return encodeURI(a).replace(/%25/g,"%")}catch{return null}}function Gn(a){return a.startsWith("workspace-file://")?a.split(/[?#]/)[0]:a}function Yn(a,t,r){const l=new Map;for(const[c,u]of Object.entries(a)){if(!u||!va(u.width)||!va(u.height))continue;const s={width:u.width,height:u.height},o=new Set([c]),g=jn(c);g&&o.add(g);for(const x of[...o]){const b=St(x,t);if(b&&o.add(b),r!==void 0){const w=jr(x,r);if(w){const m=St(`intent://local/file/${w.split("/").map(encodeURIComponent).join("/")}`,t);m&&o.add(m)}}}for(const x of o)l.has(x)||l.set(x,s)}return l}function Qn(a,t,r,l){if(!t||!a.includes("<img"))return a;const c=Yn(t,r,l);return c.size===0?a:a.replace(/<img\b(?:[^>"']|"[^"]*"|'[^']*')*>/gi,u=>{if(/\s(?:width|height)="/i.test(u))return u;const s=/\ssrc="([^"]*)"/i.exec(u);if(!s)return u;const o=Gn(s[1].replace(/&/g,"&")),g=c.get(o);return g?u.replace(/\s*\/?>$/,` width="${g.width}" height="${g.height}" ${La}="">`):u})}function ha(a,t){let r=t,l,c=!1,u=!1;const s=new Map;function o(){for(const[b,{component:w,source:m}]of s)ut(w),a.contains(b)&&b.replaceWith(m);s.clear()}function g(){if(!u){for(const[b,{component:w}]of s)a.contains(b)||(ut(w),s.delete(b));if(r.enabled)for(const b of a.querySelectorAll("pre > code")){if(b.closest("[data-markdown-diagram]"))continue;const w=[...b.classList].find(T=>T.startsWith("language-"))?.slice(9);let m;if(w==="mermaid")m="mermaid";else if(w==="diagram"||w==="ws-block:diagram")m="diagram";else if(w==="ws-block")try{if(JSON.parse(b.textContent??"").type!=="diagram")continue;m="diagram"}catch{continue}else continue;const k=b.parentElement;if(!k)continue;if(!l){c||(c=!0,ka(()=>import("./BMc6OzJ-.js"),__vite__mapDeps([57,2,1,58,46,59,32,14,7,18,19,20,21,3,12,24,11,6,8,33,9,10,13,15,34,5,47,48,49,50,29,30,31,35,36,37,60,0,4,16,17,22,23,25,26,27,28,38,39,40,41,42,43,44,45,51,52,53,54,55,56,61,62,63,64,65,66,67,68]),import.meta.url).then(T=>{l=T.default,c=!1,g()}).catch(T=>{c=!1,ht.error("Failed to load the Markdown diagram renderer",{error:T})}));return}const U=document.createElement("div");U.dataset.markdownDiagram=m,k.replaceWith(U);const B=Mt(l,{target:U,context:r.context,props:{kind:m,source:b.textContent??"",workspaceId:r.workspaceId}});s.set(U,{component:B,source:k})}}}const x=new MutationObserver(g);return x.observe(a,{childList:!0,subtree:!0}),queueMicrotask(g),{update(b){(r.enabled!==b.enabled||r.workspaceId!==b.workspaceId)&&o(),r=b,g()},destroy(){u=!0,x.disconnect(),o()}}}var Xn=z('<span class="min-w-0 max-w-full truncate"> </span>'),$n=z('<span class="type-caption flex min-w-0 max-w-full items-start gap-2 whitespace-normal py-1 text-muted-foreground" role="status" data-testid="media-loading-placeholder"><span class="first-line-icon" aria-hidden="true"><!></span> <span class="flex min-w-0 flex-wrap items-baseline gap-x-1.5"><span> </span> <!></span></span>');function Wa(a,t){if(new.target)return tt({component:Wa,...a});nt(t,!0);let r=I(t,"name",7);var l={get name(){return r()},set name(m){r(m),M()},$set:at,$on:(m,k)=>rt(t,m,k)},c=$n(),u=N(c),s=N(u);bt(s,{get icon(){return zr},class:"size-3.5"}),L(u);var o=q(u,2),g=N(o),x=me(g,!0),b=q(g,2);{var w=m=>{var k=Xn(),U=me(k,!0);Ze(k,(B,T)=>Bt?.(B,T),r),Z(()=>ge(U,r())),H(m,k)};ie(b,m=>{r()&&m(w)})}return L(o),L(c),Z(m=>ge(x,m),[()=>A.ui_mediaLoadingPlaceholder_title_label()]),H(a,c),st(l)}const ba="markdown-image-frame";function Jn(a,t){const r=new Map,l=new Map,c=new Map,u=[300,1e3];let s=!1;function o(i){let p=l.get(i);return p||(p={source:i.getAttribute("src")||"",workspaceId:t.getWorkspaceId(),retries:0,failureHandled:!1},l.set(i,p)),p}function g(i){const p=o(i);return!s&&a.contains(p.fallbackHost??i)&&p.workspaceId===t.getWorkspaceId()&&t.canUseMedia(p.source)&&!i.hasAttribute("data-media-unavailable")&&!i.hasAttribute("data-media-unsupported")&&sa(p.source)!==null}function x(i,p=!1){if(!g(i))return;const _=o(i),P=sa(_.source);if(!P)return;const D=_.fallbackHost,Y=D?.contains(document.activeElement)??!1;if(_.failureHandled=!1,_.fallbackHost=void 0,p&&(_.retries=0),i.removeAttribute("src"),i.setAttribute("src",P),D){const se=r.get(D);se&&ut(se),r.delete(D),D.replaceWith(i),U(),Y&&a.contains(i)&&i.focus()}}function b(i){const p=o(i);s||!a.contains(i)||p.failureHandled||(p.failureHandled=!0,g(i)&&p.retries<u.length?p.timer=setTimeout(()=>{p.timer=void 0,x(i)},u[p.retries++]):k(i,"load-failed"))}function w(i){const p=i.parentElement;return p?.classList.contains(ba)?p:null}function m(i){const p=Number(i.getAttribute("width")),_=Number(i.getAttribute("height"));if(!(p>0&&_>0))return;const P=document.createElement("span");P.className=ba,P.style.aspectRatio=`${p} / ${_}`,P.style.setProperty("--image-aspect-ratio",`${p} / ${_}`),P.style.width=`min(${p}px, 100%)`,P.dataset.loaded="false",i.replaceWith(P),P.appendChild(i);const D=P.appendChild(document.createElement("span"));D.className="markdown-image-frame-placeholder",r.set(D,Mt(Wa,{target:D,props:{name:Kn(i,t.getWorkspaceId())}}));const Y=()=>{if(c.delete(i),s||!a.contains(P))return;P.dataset.loaded="true";const se=r.get(D);se&&(ut(se),r.delete(D)),D.remove()};i.complete&&i.naturalWidth>0?Y():(c.set(i,Y),i.addEventListener("load",Y,{once:!0}))}function k(i,p){const _=i.getAttribute("src")||i.getAttribute("data-media-src")||"",P=yt(_),D=Ra(_,t.getWorkspaceId()),Y=P?.path??D?.path,se=P?.workspaceId??D?.workspaceId,Ce=i.getAttribute("data-name")||i.getAttribute("alt")||Y?.split("/").pop()||void 0,le=document.createElement(i instanceof HTMLVideoElement?"div":"span");le.className="media-unavailable-host",(w(i)??i).replaceWith(le),t.onMediaRemoved(i);let y;if(i instanceof HTMLImageElement&&p==="load-failed"){const oe=o(i);oe.fallbackHost=le,g(i)&&(y=()=>x(i,!0))}const Q=Mt(Vt,{target:le,props:{name:Ce,reason:p,path:Y,workspaceId:se,onRetry:y}});if(r.set(le,Q),i instanceof HTMLVideoElement){le.classList.add("flex","items-center","gap-2");const oe=le.appendChild(document.createElement("span"));r.set(oe,Mt(Kt,{target:oe,props:{videoUrl:_,videoName:Ce,sourceKind:"workspace",mimeType:wt(_,t.getWorkspaceId())?.mimeType}}))}}function U(){if(!s){for(const i of a.querySelectorAll("img"))vt(i)&&!i.closest("a")&&(i.tabIndex=0,i.setAttribute("role","button")),!(i.hasAttribute("data-media-unsupported")||i.hasAttribute("data-media-unavailable"))&&(o(i),i.hasAttribute(La)&&!w(i)&&m(i),i.getAttribute("src")&&i.complete&&i.naturalWidth===0&&b(i));for(const i of a.querySelectorAll("[data-media-unsupported]"))k(i,"unsupported");for(const i of a.querySelectorAll("[data-media-unavailable]"))k(i,Gr(i));for(const[i,p]of l)a.contains(p.fallbackHost??i)||(p.timer!==void 0&&clearTimeout(p.timer),l.delete(i));for(const[i,p]of c)a.contains(i)||(i.removeEventListener("load",p),c.delete(i));for(const[i,p]of r)a.contains(i)||(ut(p),r.delete(i))}}function B(i){const p=i.target;(p instanceof HTMLImageElement||p instanceof HTMLVideoElement)&&(p instanceof HTMLImageElement?b(p):k(p,"load-failed"))}const T=new MutationObserver(U);return T.observe(a,{childList:!0,subtree:!0}),a.addEventListener("error",B,!0),queueMicrotask(U),{destroy(){s=!0,T.disconnect();for(const i of l.values())i.timer!==void 0&&clearTimeout(i.timer);l.clear();for(const[i,p]of c)i.removeEventListener("load",p);c.clear(),a.removeEventListener("error",B,!0);for(const i of r.values())ut(i);r.clear()}}}var Zn=z('<div class="image-actions-overlay absolute z-10 svelte-nzvuq5" data-testid="markdown-image-actions-overlay"><!></div>'),es=z("<div></div>"),wa=z('<div role="group"><!> <!></div>'),ts=z('<div><p class="whitespace-pre-wrap svelte-nzvuq5"> </p></div>'),as=z("<!> <!>",1);function _a(a,t){if(new.target)return tt({component:_a,...a});nt(t,!0);const r=n=>{var f=Ut(),W=Fe(f);{var S=K=>{var J=Zn(),Pe=N(J);{let de=E(()=>e(ce).getAttribute("src")||""),ue=E(()=>e(ce).getAttribute("alt")||void 0);et(fr(Pe,{get imageUrl(){return e(de)},get imageName(){return e(ue)},get open(){return e(v)},set open(We){O(v,We,!0)}}),We=>O(h,We,!0),()=>e(h))}L(J),et(J,de=>O(ae,de),()=>e(ae)),Z(()=>Ct(J,`top: ${e(Ke).top??""}px; right: ${e(Ke).right??""}px;`)),H(K,J)},j=E(()=>e(ce)&&Q(e(ce).getAttribute("src")||""));ie(W,K=>{e(j)&&K(S)})}H(n,f)};let l=I(t,"content",7),c=I(t,"isStreaming",7,!1),u=I(t,"className",7,""),s=I(t,"workspaceId",23,()=>ca()?.workspaceId??void 0),o=I(t,"relativeMediaBase",7),g=I(t,"onCodeBlockAction",7),x=I(t,"onFileClick",7),b=I(t,"canOpenFile",7),w=I(t,"allowFileMedia",7,!0),m=I(t,"taskBlockRenderMode",7,"placeholder"),k=I(t,"chatImageThumbnails",7,!1),U=I(t,"forceExternalLinks",7,!1),B=I(t,"renderRichFencesAsCode",7,!1),T=I(t,"renderDiagrams",7,!1),i=I(t,"allowSanitizedHtml",7,!1),p=I(t,"media",7);const _=Yr(),P=Ya(),D=E(()=>Bn(l(),s())),Y=E(()=>e(D).some(n=>n.type==="video")),se=E(()=>!e(Y)&&e(D).length===1&&e(D)[0].type==="markdown"?e(D)[0].content:l()),Ce=E(()=>Tn(e(se)));let le=ne(null),y=ne("");function Q(n){return _t(n,w()&&b()?.()!==!1)}const oe=E(()=>En(e(y),w()&&b()?.()!==!1)),Le=E(()=>pr(e(oe),s(),mr)),Me=E(()=>`<div class="markdown-content">${e(Le)}</div>`);let fe=0;const Ve=150;let ke=-1/0,ee=null,Se=null;async function ft(n,f,W,S){try{const j=await Qr(n,{...f,readOnly:!0});if(S!==fe)return;O(y,Qn(j,W,f?.workspaceId,f?.relativeMediaBase),!0)}catch(j){if(S!==fe)return;ht.error("Failed to process markdown:",j);const K=n.replace(/[&<>"']/g,J=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[J]||J);O(y,`<p>${K}</p>`)}}function Ie(){if(!Se)return;const n=Ve-(performance.now()-ke);if(n>0){ee=setTimeout(()=>{ee=null,Ie()},n);return}const f=Se;Se=null,ke=performance.now(),f()}function ot(){ee!==null&&(clearTimeout(ee),ee=null),Se=null,ke=-1/0}kt(()=>{const n=e(se),f={allowEmpty:!0,skipIfHTML:!1,preserveAnchors:!0,taskBlockRenderMode:m(),workspaceId:s(),relativeMediaBase:o()??(s()&&s()!==Sr?"":void 0),renderRichFencesAsCode:B()||T(),processPrimitives:!T(),allowSanitizedHtml:i(),renderMath:!c(),workspaceFileVersion:_},W=p(),S=++fe,j=()=>void ft(n,f,W,S);c()?(Se=j,ee===null&&Ie()):(ot(),j())});let De=ne(void 0),ce=ne(null),Ke=ne(Qa({top:0,right:0})),v=ne(!1),h=ne(void 0),ae=ne(null);function V(n){if(n.type==="mouseover"&&ga(e(ce),e(ae)))return;const f=n.target,W=Dt(f);if(W&&vt(W)&&Q(W.getAttribute("src")||"")){if(e(ce)===W)return;O(ce,W,!0),O(Ke,Vn(W,n.currentTarget),!0)}else if(e(ce)&&!e(v)){if(f instanceof Node&&e(ae)?.contains(f))return;O(ce,null)}}function te(){!e(v)&&!ga(e(ce),e(ae))&&O(ce,null)}function he(n){const f=Dt(n.target);!f||!vt(f)||!Q(f.getAttribute("src")||"")||(n.preventDefault(),n.stopPropagation(),V(n),O(v,!0))}function re(n){return Jn(n,{getWorkspaceId:()=>s(),canUseMedia:Q,onMediaRemoved:f=>{e(ce)===f&&O(ce,null)}})}function Re(n){const f=n.target,W=f.closest("a");if(!W&&f instanceof HTMLImageElement){const j=f.getAttribute("src")||"";if(Ma(j)&&Q(j)){n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation(),e(De)?.openImage(f);return}}if(W?.href){if(n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation(),e(De)?.openAsset(W))return;const j=d(n),K=s()?ta(s()):void 0;ia(W.href,{workspaceId:K,canOpenFile:b(),sourcePanelId:j,event:n,rawHref:W.getAttribute("href")??void 0,...U()?{forceExternal:!0}:{}});return}const S=Xr(f.closest("[data-mention]"));if(S){const{type:j,meta:K}=S;if(j==="file"&&S.filePath){if(b()?.()===!1)return;n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation();const J=S.filePath;ht.debug("[MarkdownViewer] File mention clicked",{filePath:J,meta:K});const Pe=d(n),de=Ht({event:n});if(x())x()(J,{line:S.line,openInAdjacentPanel:de,sourcePanelId:Pe});else{const ue=s();ue&&ve.dispatch(Rr(ue,J,{line:S.line,openInAdjacentPanel:de,sourcePanelId:Pe}))}}else if(S.folderPath!==void 0){if(b()?.()===!1||!s())return;n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation(),ve.dispatch(Er(s(),$r(S.folderPath)))}else if(j==="note"&&S.note){n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation();const J=S.note.id;ht.debug("[MarkdownViewer] Note mention clicked",{noteId:J,meta:K});const Pe=d(n),de=Ht({event:n});if(S.note.workspaceId&&S.note.workspaceId!==s()){ia(ir(J,S.note.workspaceId),{workspaceId:s()?ta(s()):void 0,sourcePanelId:Pe,event:n});return}const ue=s();ue&&ve.dispatch(Pr(ue,J,{openInAdjacentPanel:de,sourcePanelId:Pe}))}}}function Ue(n){if(je(n),!n.defaultPrevented){if(n.target instanceof HTMLImageElement&&vt(n.target)&&(n.key==="Enter"||n.key===" ")){Re(n);return}n.key!=="Enter"||!Ht({event:n})||Re(n)}}function je(n){const f=Dt(n.target);!f||!vt(f)||!Q(f.getAttribute("src")||"")||e(h)?.handleCopy(n,f.getAttribute("src")||"")}function d(n){const f=n.target;if(f instanceof HTMLElement)return f.closest("[data-panel-id]")?.dataset.panelId}Xa(()=>{fe+=1,ot()});var C={get content(){return l()},set content(n){l(n),M()},get isStreaming(){return c()},set isStreaming(n=!1){c(n),M()},get className(){return u()},set className(n=""){u(n),M()},get workspaceId(){return s()},set workspaceId(n=ca()?.workspaceId??void 0){s(n),M()},get relativeMediaBase(){return o()},set relativeMediaBase(n){o(n),M()},get onCodeBlockAction(){return g()},set onCodeBlockAction(n){g(n),M()},get onFileClick(){return x()},set onFileClick(n){x(n),M()},get canOpenFile(){return b()},set canOpenFile(n){b(n),M()},get allowFileMedia(){return w()},set allowFileMedia(n=!0){w(n),M()},get taskBlockRenderMode(){return m()},set taskBlockRenderMode(n="placeholder"){m(n),M()},get chatImageThumbnails(){return k()},set chatImageThumbnails(n=!1){k(n),M()},get forceExternalLinks(){return U()},set forceExternalLinks(n=!1){U(n),M()},get renderRichFencesAsCode(){return B()},set renderRichFencesAsCode(n=!1){B(n),M()},get renderDiagrams(){return T()},set renderDiagrams(n=!1){T(n),M()},get allowSanitizedHtml(){return i()},set allowSanitizedHtml(n=!1){i(n),M()},get media(){return p()},set media(n){p(n),M()},$set:at,$on:(n,f)=>rt(t,n,f)},F=as(),X=Fe(F);{var be=n=>{var f=es();zt(f,21,()=>e(D),Za,(W,S)=>{var j=Ut(),K=Fe(j);{var J=de=>{Fa(de,{get allowFileMedia(){return w()},get canOpenFile(){return b()},get source(){return e(S).source},get name(){return e(S).name},get poster(){return e(S).poster}})},Pe=de=>{_a(de,{get content(){return e(S).content},get isStreaming(){return c()},get workspaceId(){return s()},get relativeMediaBase(){return o()},get onCodeBlockAction(){return g()},get onFileClick(){return x()},get canOpenFile(){return b()},get allowFileMedia(){return w()},get taskBlockRenderMode(){return m()},get chatImageThumbnails(){return k()},get forceExternalLinks(){return U()},get renderRichFencesAsCode(){return B()},get renderDiagrams(){return T()},get allowSanitizedHtml(){return i()},get media(){return p()}})};ie(K,de=>{e(S).type==="video"?de(J):de(Pe,-1)})}H(W,j)}),L(f),Z(()=>Oe(f,1,`markdown-video-segments ${u()??""}`,"svelte-nzvuq5")),H(n,f)},pe=n=>{var f=wa();let W;var S=N(f);oa(S,()=>e(Me));var j=q(S,2);r(j),L(f),Ze(f,K=>re?.(K)),Ze(f,(K,J)=>ha?.(K,J),()=>({enabled:T(),workspaceId:s(),context:P})),Z(()=>W=Oe(f,1,`markdown-viewer streaming-content ${u()??""}`,"svelte-nzvuq5",W,{"chat-image-thumbnails":k()})),Ae("click",f,Re),Ae("keydown",f,Ue),He("copy",f,je),Ae("contextmenu",f,he),Ae("mouseover",f,V),Ae("focusin",f,V),He("mouseleave",f,te),H(n,f)},we=n=>{var f=ts(),W=N(f),S=me(W,!0);L(f),Z(()=>{Oe(f,1,`markdown-viewer simple-content ${u()??""}`,"svelte-nzvuq5"),ge(S,e(se))}),H(n,f)},Ee=n=>{var f=wa();let W;var S=N(f);oa(S,()=>e(Me));var j=q(S,2);r(j),L(f),et(f,K=>O(le,K),()=>e(le)),Ze(f,K=>re?.(K)),Ze(f,(K,J)=>ha?.(K,J),()=>({enabled:T(),workspaceId:s(),context:P})),Z(()=>W=Oe(f,1,`markdown-viewer static-content ${u()??""}`,"svelte-nzvuq5",W,{"chat-image-thumbnails":k()})),Ae("click",f,Re),Ae("keydown",f,Ue),He("copy",f,je),Ae("contextmenu",f,he),Ae("mouseover",f,V),Ae("focusin",f,V),He("mouseleave",f,te),H(n,f)};ie(X,n=>{e(Y)?n(be):c()?n(pe,1):e(Ce)==="simple"&&!i()?n(we,2):n(Ee,-1)})}var _e=q(X,2);return et(Ta(_e,{get workspaceId(){return s()},canUseMedia:Q}),n=>O(De,n,!0),()=>e(De)),H(a,F),st(C)}xa(["click","keydown","contextmenu","mouseover","focusin"]);class Ps{constructor(t){lt(this,"container");lt(this,"previousFocus",null);lt(this,"firstFocusable",null);lt(this,"lastFocusable",null);lt(this,"handleKeyDown");this.container=t,this.handleKeyDown=this.onKeyDown.bind(this)}activate(){this.previousFocus=document.activeElement;const t=this.container.querySelectorAll('a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])');t.length>0&&(this.firstFocusable=t[0],this.lastFocusable=t[t.length-1],this.firstFocusable.focus()),document.addEventListener("keydown",this.handleKeyDown)}deactivate(){document.removeEventListener("keydown",this.handleKeyDown),this.previousFocus&&this.previousFocus.focus()}onKeyDown(t){t.key==="Tab"&&(!this.firstFocusable||!this.lastFocusable||(t.shiftKey?document.activeElement===this.firstFocusable&&(t.preventDefault(),this.lastFocusable.focus()):document.activeElement===this.lastFocusable&&(t.preventDefault(),this.firstFocusable.focus())))}}function Ts(a,t){const r=x=>{const b=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(x);return b?{r:parseInt(b[1],16),g:parseInt(b[2],16),b:parseInt(b[3],16)}:null},l=x=>{const[b,w,m]=[x.r,x.g,x.b].map(k=>(k=k/255,k<=.03928?k/12.92:Math.pow((k+.055)/1.055,2.4)));return .2126*b+.7152*w+.0722*m},c=r(a),u=r(t);if(!c||!u)return ht.warn("Invalid color values for contrast check",{foreground:a,background:t}),{ratio:0,passes:{aa:!1,aaa:!1}};const s=l(c),o=l(u),g=(Math.max(s,o)+.05)/(Math.min(s,o)+.05);return{ratio:g,passes:{aa:g>=4.5,aaa:g>=7}}}export{Fa as C,Ps as F,Rn as H,_a as M,Ss as W,Wa as a,fa as b,An as c,Pa as d,Ts as e,Cn as f,Es as g,Ea as h,on as r,Bn as s,Rs as w};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as R,bq as W,a_ as A,bo as s,by as O,b as S}from"./
|
|
1
|
+
import{t as R,bq as W,a_ as A,bo as s,by as O,b as S}from"./eK7OULll.js";import{bs as q,a5 as B,aD as i,bS as p,bl as u,bA as k,b_ as h,bO as b,W as f,bn as j,c9 as E,aA as F,aB as m}from"./DYhIMPy1.js";import{h as G,s as g}from"./DZtstCLQ.js";import{h as H,W as J,i as K}from"./B0JWnOsx.js";var L=m('<li class="flex items-center gap-2"><!> <span class="min-w-0 flex-1 break-words"> </span> <span class="shrink-0 text-muted-foreground"> </span></li>'),M=m('<ul class="space-y-1 text-sm"></ul>');function N(o,n){if(new.target)return R({component:N,...o});q(n,!0);let r=W(n,"checklist",7);const v=E(()=>{const e=c=>({state:c?"done":"waiting",status:c?s.desktop_os_checklist_allowed():s.desktop_os_checklist_missing()}),t=()=>!r().accessibility||!r().screenRecording?{state:"waiting",status:s.desktop_os_checklist_blocked()}:r().screenCapture==="ready"?{state:"done",status:s.desktop_os_checklist_ready()}:r().screenCapture==="pending"?{state:"waiting",status:s.desktop_os_checklist_checking()}:{state:"failed",status:s.desktop_os_checklist_unconfirmed()};return[{label:s.desktop_os_checklist_accessibility(),...e(r().accessibility)},{label:s.desktop_os_checklist_screenRecording(),...e(r().screenRecording)},{label:s.desktop_os_checklist_screenCapture(),...t()}]});var x={get checklist(){return r()},set checklist(e){r(e),F()},$set:O,$on:(e,t)=>S(n,e,t)},l=M();return G(l,21,()=>i(v),e=>e.label,(e,t)=>{var c=L(),_=B(c);{var y=a=>{H(a,{class:"size-4 shrink-0 text-success","aria-hidden":"true"})},C=a=>{J(a,{class:"size-4 shrink-0 text-danger","aria-hidden":"true"})},w=a=>{K(a,{class:"size-4 shrink-0 text-muted-foreground","aria-hidden":"true"})};A(_,a=>{i(t).state==="done"?a(y):i(t).state==="failed"?a(C,1):a(w,-1)})}var d=p(_,2),z=u(d,!0),D=p(d,2),I=u(D,!0);k(c),h(()=>{g(c,"data-state",i(t).state),b(z,i(t).label),b(I,i(t).status)}),f(e,c)}),k(l),h(e=>g(l,"aria-label",e),[()=>s.desktop_os_checklist_title()]),f(o,l),j(x)}export{N as D};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as r}from"./CCnP87Jb.js";import{v as a,I as e}from"./Dix9BiYu.js";import{HR as s}from"./Bo4s1kgI.js";import{c as t}from"./8OpKoiOO.js";function C(o,i){return t(s,o,{navigate:i,...a("windowChrome")?{closeWindow:()=>r(e.WINDOW.CLOSE)}:{}})}export{C as closeActiveTab};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as i,aW as l,aw as d,P as o}from"./
|
|
1
|
+
import{b as i,aW as l,aw as d,P as o}from"./DwsRDnkS.js";var x=i((r,t)=>{const e=r.append("rect");if(e.attr("x",t.x),e.attr("y",t.y),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("width",t.width),e.attr("height",t.height),t.name&&e.attr("name",t.name),t.rx&&e.attr("rx",t.rx),t.ry&&e.attr("ry",t.ry),t.attrs!==void 0)for(const s in t.attrs)e.attr(s,t.attrs[s]);return t.class&&e.attr("class",t.class),e},"drawRect"),p=i((r,t)=>{const e={x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:"rect"};x(r,e).lower()},"drawBackgroundRect"),y=i((r,t)=>{const e=t.text.replace(d," "),s=r.append("text");s.attr("x",t.x),s.attr("y",t.y),s.attr("class","legend"),s.style("text-anchor",t.anchor),t.class&&s.attr("class",t.class);const a=s.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.text(e),s},"drawText"),m=i((r,t,e,s)=>{const a=r.append("image");a.attr("x",t),a.attr("y",e);const n=o.sanitizeUrl(s);a.attr("xlink:href",n)},"drawImage"),g=i((r,t,e,s)=>{const a=r.append("use");a.attr("x",t),a.attr("y",e);const n=o.sanitizeUrl(s);a.attr("xlink:href",`#${n}`)},"drawEmbeddedImage"),h=i(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),f=i(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),w=i(()=>{let r=l(".mermaidTooltip");return r.empty()&&(r=l("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),r},"createTooltip");export{g as a,m as b,w as c,p as d,x as e,y as f,h as g,f as h};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{p as tt}from"./
|
|
1
|
+
import{p as tt}from"./BkR5Qiti.js";import{U as et,aZ as at,V as rt,a_ as it,Y as nt,b0 as ot,b as l,ay as E,X as st,q as lt,aX as ct,aH as dt,d as I,B as gt,r as ht,aJ as pt,O as ft}from"./DwsRDnkS.js";import{p as ut}from"./DZAWjsA4.js";import{o as mt}from"./DjqPgoUP.js";var vt=ft.pie,R={sections:new Map,showData:!1},b=R.sections,H=R.showData,St=structuredClone(vt),xt=l(()=>structuredClone(St),"getConfig"),wt=l(()=>{b=new Map,H=R.showData,ht()},"clear"),$t=l(({label:t,value:a})=>{if(a<0)throw new Error(`"${t}" has invalid value: ${a}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);b.has(t)||(b.set(t,a),E.debug(`added new section: ${t}, with value: ${a}`))},"addSection"),Ct=l(()=>b,"getSections"),yt=l(t=>{H=t},"setShowData"),Dt=l(()=>H,"getShowData"),U={getConfig:xt,clear:wt,setDiagramTitle:ot,getDiagramTitle:nt,setAccTitle:it,getAccTitle:rt,setAccDescription:at,getAccDescription:et,addSection:$t,getSections:Ct,setShowData:yt,getShowData:Dt},bt=l((t,a)=>{tt(t,a),a.setShowData(t.showData),t.sections.map(a.addSection)},"populateDb"),Tt={parse:l(async t=>{const a=await ut("pie",t);E.debug(a),bt(a,U)},"parse")},At=l(t=>`
|
|
2
2
|
.pieCircle{
|
|
3
3
|
stroke: ${t.pieStrokeColor};
|
|
4
4
|
stroke-width : ${t.pieStrokeWidth};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{HR as s,i8 as a,lL as S,nk as f,lY as m}from"./Bo4s1kgI.js";import{C as O}from"./z3QVK190.js";import{du as d,aT as k,dC as b}from"./C-RJDuZ9.js";const v=s.createSelector((t,e)=>{if(k.select(t,e)&&b.select(t,e))return!1;const r=t.principal?.snapshot;return r?.capabilities.workspaceGuestRoles===!0&&(r.capabilities.hostMembership?r.principal.hostRole==="guest":!r.principal.isAdministrator)}),h=s.createSelector(t=>t.principal?.snapshot?.capabilities.remoteScripts===1),l=s.createSelector((t,e,r)=>!v.select(t,e)||!!d.select(t,e)&&r?.purpose==="saved");function o(t,e,r){return!!e&&!!r&&l.select(t,e,r)}function i(t,e){return e?t.scripts.byWorkspaceId[e]??m:m}const C=s.createSelector((t,e)=>i(t,e).initialized),W=s.createSelector((t,e)=>{const r=i(t,e);return r.activeScriptIds?r.activeScriptIds.flatMap(c=>o(t,e,r.scripts[c])?[r.scripts[c]]:[]):Object.values(r.scripts).filter(c=>!c.archivedAt&&o(t,e,c))}),j=s.createSelector((t,e)=>W.select(t,e).filter(r=>O((r.runtime??a()).status))),u=s.createSelector((t,e,r)=>{const c=i(t,e);return o(t,e,c.scripts[r])?c.scripts[r]:null}),x=s.createSelector((t,e,r)=>u.select(t,e,r)?.runtime??a()),E=s.createSelector((t,e,r)=>{const c=i(t,e);return l.select(t,e??"",c.scripts[r])?c.outputBuffers[r]??S:S}),M=s.createSelector((t,e,r,c)=>{const n=i(t,e).retainedOutputs?.[c];return n?.scriptId===r&&l.select(t,e,i(t,e).scripts[r])?n:void 0}),z=s.createSelector(t=>Object.entries(t.scripts?.byWorkspaceId??{}).filter(([,e])=>Object.keys(e.retainedOutputs??{}).length>0).map(([e])=>e).sort()),A=s.createSelector((t,e)=>!!t.scripts?.byWorkspaceId[e]?.outputStreamReady),D=s.createSelector((t,e)=>i(t,e).initialized),B=s.createSelector((t,e)=>{const r=i(t,e);return r.activeScriptIds?r.activeScriptIds.flatMap(c=>o(t,e,r.scripts[c])?[r.scripts[c]]:[]):Object.values(r.scripts).filter(c=>!c.archivedAt&&o(t,e,c))}),G=s.createSelector((t,e)=>{const r=i(t,e);return r.detectionOperation?.pending?{...r.operations,...Object.fromEntries(Object.keys(r.scripts).map(c=>[c,r.detectionOperation]))}:r.operations}),L=s.createSelector((t,e)=>i(t,e).detectionOperation),P=s.createSelector((t,e,r,c)=>{const n=i(t,r).workflowOutcomes,p=n?f(n,e):void 0;return p?.workspaceId===r&&p.resourceId===c?p:void 0}),H=s.createSelector((t,e,r)=>u.select(t,e,r)?.runtime??a()),J=s.createSelector((t,e)=>Object.values(i(t,e).scripts).filter(r=>o(t,e,r))),T=s.createSelector((t,e,r)=>i(t,e).pendingReads?.[r]),U=s.createSelector((t,e,r)=>!!u.select(t,e,r)&&!i(t,e).detectionOperation?.pending&&!i(t,e).operations[r]?.pending),V=s.createSelector((t,e)=>({nextCursor:i(t,e).nextCursor,loading:i(t,e).loading,error:i(t,e).loadError}));export{J as selectAllWorkspaceScriptEntries,U as selectCanDeleteScript,l as selectCanReadScriptDefinition,h as selectRemoteScriptsSupported,j as selectRunningScripts,u as selectScriptById,L as selectScriptDetectionOperation,W as selectScriptEntries,V as selectScriptListPageState,E as selectScriptOutput,A as selectScriptOutputStreamReady,z as selectScriptOutputViewerWorkspaceIds,T as selectScriptReadJournal,M as selectScriptRetainedOutput,x as selectScriptRuntime,P as selectScriptWorkflowOutcome,C as selectScriptsInitialized,v as selectUsesGuestScriptScope,B as selectWorkspaceScriptEntries,G as selectWorkspaceScriptOperations,H as selectWorkspaceScriptRuntime,D as selectWorkspaceScriptsInitialized};
|