@intent-hq/web 2.350.1 → 2.352.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/assets/0.Dgd1ZLTR.css +1 -0
- package/web/app/immutable/chunks/{BboZoGK5.js → -lzAI0Yg.js} +2 -2
- package/web/app/immutable/chunks/{C-Tv9xzP.js → 3DUg3Vrc.js} +1 -1
- package/web/app/immutable/chunks/{UiRD2HCB.js → 42Hi6Nev.js} +1 -1
- package/web/app/immutable/chunks/{DFxm2U6S.js → 4dL6nLyL.js} +1 -1
- package/web/app/immutable/chunks/{XM11aLg9.js → 4fLmPVdQ.js} +1 -1
- package/web/app/immutable/chunks/{DT77V-dl.js → 4gwN8kRi.js} +1 -1
- package/web/app/immutable/chunks/{B_EJ_ROK.js → 61CqOAVf.js} +3 -3
- package/web/app/immutable/chunks/{C9CjIm-I.js → 6J2j9GGS.js} +1 -1
- package/web/app/immutable/chunks/{BV_qZ-Kq.js → 6cjeTxFJ.js} +1 -1
- package/web/app/immutable/chunks/{B0tZqpMw.js → 6dKWFbhS.js} +1 -1
- package/web/app/immutable/chunks/{CrGdgRLR.js → 9cOnZvFz.js} +1 -1
- package/web/app/immutable/chunks/{BsAcT-SB.js → 9zOi9r5I.js} +1 -1
- package/web/app/immutable/chunks/A4OD-mjJ.js +1 -0
- package/web/app/immutable/chunks/{Xn8V9ehY.js → AnpLuuuk.js} +1 -1
- package/web/app/immutable/chunks/{DZ-cwX5R.js → B1s_9zgm.js} +2 -2
- package/web/app/immutable/chunks/{Ctvf1zqH.js → B32BlPhm.js} +1 -1
- package/web/app/immutable/chunks/{BKf74O20.js → B3I1nFXA.js} +1 -1
- package/web/app/immutable/chunks/{WydNOMQI.js → B3Wey9bw.js} +1 -1
- package/web/app/immutable/chunks/{BT9NukZQ.js → B48wzP5i.js} +1 -1
- package/web/app/immutable/chunks/{DKPFCCGK.js → B4qnea7H.js} +1 -1
- package/web/app/immutable/chunks/{BJTb0iPR.js → B58e63dk.js} +1 -1
- package/web/app/immutable/chunks/{B25aSyPj.js → B5oIPQ5b.js} +1 -1
- package/web/app/immutable/chunks/{ChdL62OI.js → B6eIRRKX.js} +2 -2
- package/web/app/immutable/chunks/{Cw94LfJC.js → B6lWPidK.js} +1 -1
- package/web/app/immutable/chunks/{BASTKLI1.js → B7oLLIgw.js} +4 -4
- package/web/app/immutable/chunks/{BQAE7Cab.js → B82ywBwW.js} +1 -1
- package/web/app/immutable/chunks/{BmxmL68T.js → B87_3X7t.js} +1 -1
- package/web/app/immutable/chunks/{71jcCmFL.js → B8PxK7sP.js} +1 -1
- package/web/app/immutable/chunks/{C5_BSKQx.js → B8u7Bszh.js} +1 -1
- package/web/app/immutable/chunks/{BCFqTXC5.js → B9Ccf4_O.js} +1 -1
- package/web/app/immutable/chunks/{CEa8rngJ.js → BA4kNZus.js} +1 -1
- package/web/app/immutable/chunks/{DYdDm8qg.js → BAj9Av-i.js} +1 -1
- package/web/app/immutable/chunks/{CClSMHHc.js → BAkYMES1.js} +1 -1
- package/web/app/immutable/chunks/{LeGktTWT.js → BAp1A2ZH.js} +1 -1
- package/web/app/immutable/chunks/{CMvvA2dm.js → BEpQx2rq.js} +1 -1
- package/web/app/immutable/chunks/{BXpSvmYd.js → BGkKDEs0.js} +1 -1
- package/web/app/immutable/chunks/{vCsRAP9U.js → BIQ14Jou.js} +1 -1
- package/web/app/immutable/chunks/{D7v0ZhmL.js → BJ4sw9rR.js} +1 -1
- package/web/app/immutable/chunks/{BaneMq5E.js → BM7Fn-M6.js} +1 -1
- package/web/app/immutable/chunks/{CtUmTl5D.js → BMQBnpVJ.js} +1 -1
- package/web/app/immutable/chunks/BMYSQl-k.js +19 -0
- package/web/app/immutable/chunks/{B4ny9Nap.js → BO5Pq4fi.js} +1 -1
- package/web/app/immutable/chunks/{CIFYvyWz.js → BQYuNS07.js} +1 -1
- package/web/app/immutable/chunks/{BCahpYtg.js → BQpZAVZ0.js} +1 -1
- package/web/app/immutable/chunks/{D7KOa2cM.js → BR9y4bsr.js} +2 -2
- package/web/app/immutable/chunks/{Dw7Mfzwn.js → BROObX9U.js} +1 -1
- package/web/app/immutable/chunks/{CFE62qf4.js → BReF7PxO.js} +1 -1
- package/web/app/immutable/chunks/{Cbr15rLJ.js → BS0GmsgM.js} +1 -1
- package/web/app/immutable/chunks/BUAFIktJ.js +1 -0
- package/web/app/immutable/chunks/{32pNLDLJ.js → BXyNrc2B.js} +1 -1
- package/web/app/immutable/chunks/BYO1ou6X.js +1 -0
- package/web/app/immutable/chunks/{CEHfILB1.js → B_sYr-qY.js} +1 -1
- package/web/app/immutable/chunks/{Cwzl8GTd.js → BeeeYKV6.js} +1 -1
- package/web/app/immutable/chunks/{dt-eIcjK.js → Bfba9qCM.js} +1 -1
- package/web/app/immutable/chunks/{6oPcdkTg.js → BfmiyhX4.js} +1 -1
- package/web/app/immutable/chunks/{CJeZnjZ2.js → BgOj6lPu.js} +1 -1
- package/web/app/immutable/chunks/{B8WU5ocP.js → BgasfqLM.js} +1 -1
- package/web/app/immutable/chunks/{CKe6gKEB.js → BhzNHo5H.js} +1 -1
- package/web/app/immutable/chunks/{BpfVRpLO.js → Bi2Crhsq.js} +1 -1
- package/web/app/immutable/chunks/{DDlZNhW-.js → BlsliAvk.js} +1 -1
- package/web/app/immutable/chunks/{DukC1Pxj.js → Bmm9qguf.js} +1 -1
- package/web/app/immutable/chunks/{2B0vRGaJ.js → BnfhlAnU.js} +1 -1
- package/web/app/immutable/chunks/{To-GU1hI.js → BodHilN5.js} +1 -1
- package/web/app/immutable/chunks/{BHpSEINq.js → BotG4DRY.js} +1 -1
- package/web/app/immutable/chunks/{Dw4yJGUy.js → Bs7PlXA3.js} +1 -1
- package/web/app/immutable/chunks/{2rtvtln4.js → BszXPYBq.js} +1 -1
- package/web/app/immutable/chunks/{286xXFLf.js → Buh7J53B.js} +1 -1
- package/web/app/immutable/chunks/{B-DRVFcy.js → Bvd0DfwC.js} +1 -1
- package/web/app/immutable/chunks/{BLiGayBi.js → Bw0E8NsL.js} +1 -1
- package/web/app/immutable/chunks/{CBTiE17j.js → Bz6dDdb9.js} +1 -1
- package/web/app/immutable/chunks/{CeeT1t7l.js → BzNn-vV2.js} +1 -1
- package/web/app/immutable/chunks/{Ci4xycon.js → C-_Lx3Nm.js} +1 -1
- package/web/app/immutable/chunks/C-d_8VyS.js +2 -0
- package/web/app/immutable/chunks/{DPiLMhQg.js → C12ljpSn.js} +1 -1
- package/web/app/immutable/chunks/{B8kZnhwO.js → C1WXXen7.js} +1 -1
- package/web/app/immutable/chunks/{D4xoTssJ.js → C1X9EbCK.js} +3 -3
- package/web/app/immutable/chunks/{BOMdRVXl.js → C1l_AdDU.js} +1 -1
- package/web/app/immutable/chunks/{BC51na55.js → C2Y-3LOO.js} +1 -1
- package/web/app/immutable/chunks/{DMJnRVJf.js → C4rL7fPq.js} +1 -1
- package/web/app/immutable/chunks/C5H4Pe0T.js +1 -0
- package/web/app/immutable/chunks/{DJnP7chT.js → C79qeQUX.js} +1 -1
- package/web/app/immutable/chunks/{CPFtOnI7.js → C7lasS44.js} +1 -1
- package/web/app/immutable/chunks/{DxR7IJ2x.js → CDFph9XW.js} +1 -1
- package/web/app/immutable/chunks/{BDh1WR6p.js → CDJiCuQl.js} +1 -1
- package/web/app/immutable/chunks/{Ccm9-f52.js → CDhg3msv.js} +2 -2
- package/web/app/immutable/chunks/{BaXl9G_p.js → CDvr6QES.js} +1 -1
- package/web/app/immutable/chunks/{UkpeErAx.js → CGtiJZ6Q.js} +2 -2
- package/web/app/immutable/chunks/{B2r-op5b.js → CGuBCqy6.js} +1 -1
- package/web/app/immutable/chunks/{C-8EePTi.js → CH2B1dsg.js} +1 -1
- package/web/app/immutable/chunks/{C7LjhbvI.js → CLL457e6.js} +1 -1
- package/web/app/immutable/chunks/{B99vgEcA.js → CLi8c-Jc.js} +1 -1
- package/web/app/immutable/chunks/{BhO09u_O.js → CMbQPqLg.js} +1 -1
- package/web/app/immutable/chunks/{BzSSQl6R.js → CMeXe72Y.js} +1 -1
- package/web/app/immutable/chunks/{EBvHmS3f.js → CNgwOiTE.js} +1 -1
- package/web/app/immutable/chunks/{Bp_k45o-.js → COO6ldt4.js} +1 -1
- package/web/app/immutable/chunks/{DDmVz0zj.js → CPY58-tp.js} +1 -1
- package/web/app/immutable/chunks/CPjC-KKN.js +1 -0
- package/web/app/immutable/chunks/{Ca33AaL6.js → CRZhk1kc.js} +1 -1
- package/web/app/immutable/chunks/{B_7vJcZK.js → CRrFC3B8.js} +1 -1
- package/web/app/immutable/chunks/{D3wOVtz4.js → CSDwAwlx.js} +1 -1
- package/web/app/immutable/chunks/{4M32Nrru.js → CUHqJ1Vg.js} +4 -4
- package/web/app/immutable/chunks/{2cru8yuU.js → CUolE7JW.js} +1 -1
- package/web/app/immutable/chunks/{7uJhY2Ro.js → CVxBES9o.js} +1 -1
- package/web/app/immutable/chunks/CWr4n77L.js +13 -0
- package/web/app/immutable/chunks/{DLbCIONA.js → CYYbdMIM.js} +1 -1
- package/web/app/immutable/chunks/{BEVux-ca.js → CYqtKpzf.js} +1 -1
- package/web/app/immutable/chunks/{DW8-b4qF.js → CZ8DhcrQ.js} +1 -1
- package/web/app/immutable/chunks/{Bb07ib28.js → CZd1y8kW.js} +1 -1
- package/web/app/immutable/chunks/{DEu6gDAW.js → CZkLaz_S.js} +3 -3
- package/web/app/immutable/chunks/{DG7MHKfi.js → CZwN60O3.js} +1 -1
- package/web/app/immutable/chunks/{CBVEFL-b.js → C_Q5e0bX.js} +1 -1
- package/web/app/immutable/chunks/{BMcc0dQQ.js → CaZWRaBD.js} +1 -1
- package/web/app/immutable/chunks/{C7uOzB-k.js → CacD4jQL.js} +1 -1
- package/web/app/immutable/chunks/{kXBIZrMa.js → CbBwTVsV.js} +1 -1
- package/web/app/immutable/chunks/{RMrXit9I.js → CbIRB05A.js} +37 -37
- package/web/app/immutable/chunks/{xEQudZps.js → Cbew16AD.js} +1 -1
- package/web/app/immutable/chunks/Ce8ODqPP.js +1 -0
- package/web/app/immutable/chunks/{Cs2fCAnT.js → Cep-BDRS.js} +1 -1
- package/web/app/immutable/chunks/{Cjw1QvKa.js → CfdX4Lfl.js} +1 -1
- package/web/app/immutable/chunks/{CUiOtEey.js → CgbHaDpG.js} +1 -1
- package/web/app/immutable/chunks/{DBwXC8Tc.js → ChYZv5SJ.js} +1 -1
- package/web/app/immutable/chunks/{C2olseF2.js → Ci51i12B.js} +1 -1
- package/web/app/immutable/chunks/{BkMQXe7-.js → Cjd2lqUF.js} +1 -1
- package/web/app/immutable/chunks/{DxrW2EIL.js → CltuTtDv.js} +1 -1
- package/web/app/immutable/chunks/{2yJgo8xz.js → CmSGn2AH.js} +1 -1
- package/web/app/immutable/chunks/{Dr7kBzFG.js → CmpBd6Tg.js} +1 -1
- package/web/app/immutable/chunks/{ChmnWquS.js → CnTu6sc6.js} +1 -1
- package/web/app/immutable/chunks/{DsLKXQ10.js → Cnntv_QI.js} +1 -1
- package/web/app/immutable/chunks/{rEoZFmiI.js → Co5bimwo.js} +1 -1
- package/web/app/immutable/chunks/{iP2vS2hx.js → CrxGBxMK.js} +1 -1
- package/web/app/immutable/chunks/{CKR2Jwr3.js → Cs1vro6u.js} +1 -1
- package/web/app/immutable/chunks/{CfcmMMGe.js → Cx8Xjey1.js} +3 -3
- package/web/app/immutable/chunks/{qVFwsb4j.js → CzoxGXV9.js} +1 -1
- package/web/app/immutable/chunks/{CUEflbxf.js → D0ArSCdC.js} +1 -1
- package/web/app/immutable/chunks/{BtEQs3u_.js → D0fcdSwZ.js} +3 -3
- package/web/app/immutable/chunks/{nwgFD7pR.js → D16yE-CH.js} +2 -2
- package/web/app/immutable/chunks/{CbVK4mzc.js → D1PZlLC_.js} +1 -1
- package/web/app/immutable/chunks/{C82N7Ttz.js → D1nX-Mgh.js} +1 -1
- package/web/app/immutable/chunks/{CH0shWeP.js → D1z1qVWr.js} +1 -1
- package/web/app/immutable/chunks/{BgCDi7PA.js → D4uvglha.js} +1 -1
- package/web/app/immutable/chunks/{zDp2t9TD.js → D529OnQb.js} +1 -1
- package/web/app/immutable/chunks/{vQ6gxb4d.js → D5fTH_R4.js} +1 -1
- package/web/app/immutable/chunks/{Cifu9mi9.js → D62BIRhv.js} +1 -1
- package/web/app/immutable/chunks/{DJBAuZjD.js → D6eYnkBB.js} +1 -1
- package/web/app/immutable/chunks/{DhNmiaLk.js → D76YpzZQ.js} +1 -1
- package/web/app/immutable/chunks/{BK62I-uA.js → D7LYGcjf.js} +1 -1
- package/web/app/immutable/chunks/{D897Deqj.js → D8Uhwh7R.js} +1 -1
- package/web/app/immutable/chunks/{7fznLbVZ.js → D8eSz7L_.js} +1 -1
- package/web/app/immutable/chunks/{Csp7pCXT.js → DBGsU6bn.js} +1 -1
- package/web/app/immutable/chunks/{DNZhZg57.js → DCOf4rfq.js} +1 -1
- package/web/app/immutable/chunks/{CIwCBz4N.js → DD4J0jul.js} +1 -1
- package/web/app/immutable/chunks/{BjYS0G-V.js → DE-3_OpQ.js} +1 -1
- package/web/app/immutable/chunks/{DVWomJ3M.js → DEo3brV5.js} +2 -2
- package/web/app/immutable/chunks/{Dt_3gVf3.js → DEo5mzFE.js} +4 -4
- package/web/app/immutable/chunks/{BVg1wXVp.js → DF7SJcHw.js} +1 -1
- package/web/app/immutable/chunks/{B79m0-as.js → DFbFLnMx.js} +1 -1
- package/web/app/immutable/chunks/{SW-tnZ5e.js → DHnebSEV.js} +1 -1
- package/web/app/immutable/chunks/DJnc5r8U.js +1 -0
- package/web/app/immutable/chunks/{B3aPtdPQ.js → DLHLuX0B.js} +1 -1
- package/web/app/immutable/chunks/{B_Iojn2B.js → DMVl8bez.js} +1 -1
- package/web/app/immutable/chunks/{DwJJFAxY.js → DNBLhM9P.js} +1 -1
- package/web/app/immutable/chunks/{DZ9bPwU4.js → DQuLjWyg.js} +1 -1
- package/web/app/immutable/chunks/{DMF8Xnwn.js → DR5IxY_q.js} +1 -1
- package/web/app/immutable/chunks/{DM6SW5ie.js → DRDTrHX3.js} +1 -1
- package/web/app/immutable/chunks/{C6DrVy6-.js → DS2QhtLm.js} +1 -1
- package/web/app/immutable/chunks/{_s2xW34N.js → DTNUQDFX.js} +1 -1
- package/web/app/immutable/chunks/{BCazrMx2.js → DUy6xMdY.js} +1 -1
- package/web/app/immutable/chunks/{DldD9pcf.js → DV_c4cZz.js} +1 -1
- package/web/app/immutable/chunks/{cHlEaLvO.js → DVdgjGW2.js} +1 -1
- package/web/app/immutable/chunks/{D41iEHKy.js → DXBnJ5oH.js} +1 -1
- package/web/app/immutable/chunks/{ClDVqtGb.js → DXIggtiA.js} +1 -1
- package/web/app/immutable/chunks/{Cvv8aJ4r.js → Da2MW7PY.js} +1 -1
- package/web/app/immutable/chunks/{CsbrChhH.js → Da7V4qRA.js} +1 -1
- package/web/app/immutable/chunks/{BXSSv3Oq.js → DaVLGnNn.js} +1 -1
- package/web/app/immutable/chunks/{Bv8FuKnx.js → Db2Jl7w7.js} +1 -1
- package/web/app/immutable/chunks/{DZlVkf9Y.js → Dbd3M4VX.js} +4 -4
- package/web/app/immutable/chunks/{C1862fgG.js → Dcd40P4V.js} +1 -1
- package/web/app/immutable/chunks/{CEI59WUF.js → DdSHHwG-.js} +1 -1
- package/web/app/immutable/chunks/{d34yYkdR.js → DeLItg2s.js} +1 -1
- package/web/app/immutable/chunks/{DWqOehs6.js → DevaRANM.js} +3 -3
- package/web/app/immutable/chunks/{BmMUMiCr.js → Dfo7IcH5.js} +1 -1
- package/web/app/immutable/chunks/{H_Nm449K.js → DgGohlQK.js} +1 -1
- package/web/app/immutable/chunks/{D2JEXCBC.js → DhPqduTn.js} +1 -1
- package/web/app/immutable/chunks/{CbVZZ75K.js → DifK42p0.js} +1 -1
- package/web/app/immutable/chunks/{kWL2GjPN.js → DjaIRWIW.js} +1 -1
- package/web/app/immutable/chunks/{CrlYwLEr.js → DkkZo56B.js} +1 -1
- package/web/app/immutable/chunks/{CNCNgnPl.js → DlNogvkm.js} +1 -1
- package/web/app/immutable/chunks/{BNuxEAQs.js → DlySFqed.js} +1 -1
- package/web/app/immutable/chunks/{CtH7YJ1N.js → DoWpanLy.js} +1 -1
- package/web/app/immutable/chunks/{BaMaQsqR.js → DrPWazGq.js} +1 -1
- package/web/app/immutable/chunks/{fvaRaafM.js → DsPTvO1D.js} +1 -1
- package/web/app/immutable/chunks/{CM0lKKPd.js → DyLYtK5N.js} +1 -1
- package/web/app/immutable/chunks/{BJpI9lmh.js → Dzmm4LX6.js} +2 -2
- package/web/app/immutable/chunks/{eIlGg2ZH.js → EbPgJF03.js} +1 -1
- package/web/app/immutable/chunks/{YeEGAsBO.js → GVSL2sGk.js} +1 -1
- package/web/app/immutable/chunks/{CyRJV2Ki.js → HZ9TCfKK.js} +1 -1
- package/web/app/immutable/chunks/{D6kv6T9Z.js → HpSr1h8y.js} +1 -1
- package/web/app/immutable/chunks/{xCXPOQKs.js → HtolvgCH.js} +1 -1
- package/web/app/immutable/chunks/{CK2a86W3.js → IH85nSha.js} +1 -1
- package/web/app/immutable/chunks/{Ari-xzJB.js → IsZH9joj.js} +1 -1
- package/web/app/immutable/chunks/{CxxiwOxz.js → JxvzDmDF.js} +1 -1
- package/web/app/immutable/chunks/{C7NptMs7.js → Kn9ZbRDu.js} +1 -1
- package/web/app/immutable/chunks/{D4gEzra-.js → OXVbQQSu.js} +1 -1
- package/web/app/immutable/chunks/{BE9VuWVi.js → OyCLeO1d.js} +1 -1
- package/web/app/immutable/chunks/{qT7g0XeC.js → Qg7vTeHw.js} +1 -1
- package/web/app/immutable/chunks/{CFMV5ANe.js → Qpp-eumr.js} +1 -1
- package/web/app/immutable/chunks/{9_2ZyZ9L.js → SAoHFFQz.js} +1 -1
- package/web/app/immutable/chunks/{CjFrzDwu.js → WSPGY2Jm.js} +1 -1
- package/web/app/immutable/chunks/{BxE0TK4z.js → XHXZbc0Q.js} +1 -1
- package/web/app/immutable/chunks/{BRWlAcla.js → XJEHWeE3.js} +1 -1
- package/web/app/immutable/chunks/{DzPN4aFg.js → _L5AdDNH.js} +1 -1
- package/web/app/immutable/chunks/{mxwa8yTT.js → bl5nff1M.js} +1 -1
- package/web/app/immutable/chunks/{BJeKKdy7.js → ceF1L-gS.js} +1 -1
- package/web/app/immutable/chunks/{1WcgIxhR.js → fEnLQxJ4.js} +1 -1
- package/web/app/immutable/chunks/{2GRAEVbl.js → gWBpiwO7.js} +1 -1
- package/web/app/immutable/chunks/{DlTJT3V9.js → hQlemDzn.js} +1 -1
- package/web/app/immutable/chunks/{BwgrW8yQ.js → hRTaoCvf.js} +1 -1
- package/web/app/immutable/chunks/{CzZDc-Ii.js → hmNmIDzu.js} +1 -1
- package/web/app/immutable/chunks/{CxF8YFum.js → hwFphMxp.js} +1 -1
- package/web/app/immutable/chunks/{CV5WtbgW.js → i4rQF8gq.js} +1 -1
- package/web/app/immutable/chunks/{BSSsvY4I.js → iYz7qSVO.js} +2 -2
- package/web/app/immutable/chunks/{D68W4EG9.js → iqwxOx7o.js} +1 -1
- package/web/app/immutable/chunks/{Y5hz4Ndf.js → j5tG0B2t.js} +1 -1
- package/web/app/immutable/chunks/{DVpbdNgF.js → jK-m9hL8.js} +1 -1
- package/web/app/immutable/chunks/{gq1gp-va.js → jOuwgRm6.js} +1 -1
- package/web/app/immutable/chunks/{B3groEj8.js → lwGMtA_8.js} +1 -1
- package/web/app/immutable/chunks/{rbrWRnHh.js → sbDqysXr.js} +1 -1
- package/web/app/immutable/chunks/{D3v_P2Uq.js → tSZXsoGb.js} +1 -1
- package/web/app/immutable/chunks/{D3HUOTfX.js → vJ7Dp7-k.js} +1 -1
- package/web/app/immutable/chunks/{hHmUU40X.js → vSkHI-FK.js} +2 -2
- package/web/app/immutable/chunks/{BBYhh_eX.js → vgvfRyJV.js} +1 -1
- package/web/app/immutable/chunks/{fE-kcmYj.js → vj4vOyOm.js} +1 -1
- package/web/app/immutable/chunks/{LIrM5l7a.js → xeIBXGKb.js} +1 -1
- package/web/app/immutable/chunks/{BxUPDfJ4.js → xpT8lZyG.js} +2 -2
- package/web/app/immutable/chunks/{CaGPKvrg.js → ztG-0WIA.js} +1 -1
- package/web/app/immutable/entry/{app.B3zmyQo-.js → app.RSzHSDgw.js} +3 -3
- package/web/app/immutable/entry/start.BVuekftv.js +1 -0
- package/web/app/immutable/nodes/{0.kC9p1Qyh.js → 0.Da435p_w.js} +1 -1
- package/web/app/immutable/nodes/{1.CbKQgLbJ.js → 1.D1nY11Eo.js} +1 -1
- package/web/app/immutable/nodes/{10.nkEgxR4t.js → 10.C15wfgwX.js} +1 -1
- package/web/app/immutable/nodes/{11.BNBCl9Ko.js → 11.TMR29QT0.js} +1 -1
- package/web/app/immutable/nodes/{12.BriSlPZC.js → 12.Dkcg23hr.js} +1 -1
- package/web/app/immutable/nodes/{13.QpfX0_5g.js → 13.BANT9s8o.js} +3 -3
- package/web/app/immutable/nodes/{14.ZJqXSGiE.js → 14.DChhRykH.js} +1 -1
- package/web/app/immutable/nodes/{15.DdEMX_Kl.js → 15.BXSdgmt8.js} +1 -1
- package/web/app/immutable/nodes/{16.rtMs5JTy.js → 16.Cp3myrhK.js} +1 -1
- package/web/app/immutable/nodes/{17.DDfq3IKN.js → 17.AJ0Z4n7s.js} +1 -1
- package/web/app/immutable/nodes/{18.Cds1TQEe.js → 18.BYytq5r4.js} +2 -2
- package/web/app/immutable/nodes/{2.TMV-VJam.js → 2.B_tahnsH.js} +4 -4
- package/web/app/immutable/nodes/{3.Dy6_DOyf.js → 3.l2wlNZto.js} +1 -1
- package/web/app/immutable/nodes/{4.CSClZLtr.js → 4.DSLW-lsR.js} +1 -1
- package/web/app/immutable/nodes/{5.B2fm04nD.js → 5.DaH-2DbB.js} +1 -1
- package/web/app/immutable/nodes/{6.wppAoRAf.js → 6.CWNY9M3R.js} +1 -1
- package/web/app/immutable/nodes/{7.BJEQzlNN.js → 7.DI6SUPGK.js} +1 -1
- package/web/app/immutable/nodes/8.j51qyATM.js +14 -0
- package/web/app/immutable/nodes/9.C4rF4IYL.js +39 -0
- package/web/app/version.json +1 -1
- package/web/generated/paraglide.js +49 -49
- package/web/index.html +19 -19
- package/web/app/immutable/assets/0.C6uvaa87.css +0 -1
- package/web/app/immutable/chunks/B1uWzETW.js +0 -1
- package/web/app/immutable/chunks/B45FOkqf.js +0 -13
- package/web/app/immutable/chunks/CcIb5dHQ.js +0 -2
- package/web/app/immutable/chunks/D2rxIP2b.js +0 -1
- package/web/app/immutable/chunks/DGQ1ECsI.js +0 -1
- package/web/app/immutable/chunks/DZgyzAfw.js +0 -1
- package/web/app/immutable/chunks/H2SodBVA.js +0 -1
- package/web/app/immutable/chunks/Hc3ynozM.js +0 -1
- package/web/app/immutable/chunks/_1y9QH1k.js +0 -1
- package/web/app/immutable/chunks/f_NG7JPv.js +0 -19
- package/web/app/immutable/entry/start.DL1A5aV6.js +0 -1
- package/web/app/immutable/nodes/8.bO4mjRsC.js +0 -14
- package/web/app/immutable/nodes/9.Dz8XAzvL.js +0 -39
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/
|
|
2
|
-
var Ua=Object.defineProperty;var Ba=(a,t,r)=>t in a?Ua(a,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):a[t]=r;var dt=(a,t,r)=>Ba(a,typeof t!="symbol"?t+"":t,r);import{bo as C,t as rt,bq as y,by as nt,b as st,bs as Va,bu as Jt,_ as ka}from"./DGQ1ECsI.js";import{bs as ot,a5 as N,aD as e,bA as T,b_ as X,W,bn as it,c9 as E,aA as x,aB as B,ca as yt,bk as ya,c6 as Ka,cd as Ht,bV as oe,bS as z,ay as Ee,bl as me,bO as be,ai as xa,a7 as xt,c0 as ja,bf as Ot,bH as O,aw as Be,aj as Se,aC as Ga,c3 as ft,bb as St,aF as Ya,br as Za,bj as Ja}from"./DYhIMPy1.js";import{i as re}from"./B-DRVFcy.js";import{e as tt,g as Ut,i as Qa}from"./D3HUOTfX.js";import{c as Xa,e as $a,f as Pe,g as pt,s as $}from"./Bp_k45o-.js";import{aO as er,cY as tr,M as ar,aw as rr,dm as nr,W as sr,dr as Aa,C as or,a0 as ir}from"./CbVK4mzc.js";import{t as Bt}from"./CKe6gKEB.js";import{a9 as cr,ao as lr,A as dr,n as ur,a5 as Ia,s as Vt,a4 as Kt,aJ as At,b5 as Ma,m as fr,aL as pr,b4 as mr}from"./4M32Nrru.js";import{l as Qt}from"./CfcmMMGe.js";import{c6 as gr,c3 as vr,c4 as Xt,aO as hr}from"./DW8-b4qF.js";import{t as ut,P as br}from"./Cw94LfJC.js";import{F as qt}from"./DZ-cwX5R.js";import{f as jt}from"./CxF8YFum.js";import{t as Ve,v as wr,I as Ct,F as $t,c as ea}from"./DNZhZg57.js";import{ry as Ca,Iv as we,mq as _r,fG as kr,nk as yr,uk as xr,c as Ar,vW as Ir,s$ as Mr,rg as Cr,i as Sr,bf as ta,v1 as Rr,sG as Er,v3 as Pr}from"./BSSsvY4I.js";import{c as Tr,l as bt}from"./ChTqQfQN.js";import{o as Fr}from"./CBVEFL-b.js";import{aN as Lr,aO as aa,by as Wr,ax as Nr,bx as Hr,aC as Or,c_ as qr,cO as Dr,F as wt,au as ra,bG as zr,bB as Ur}from"./Cjw1QvKa.js";import{l as Br}from"./2yJgo8xz.js";import{p as Vr,c_ as _t,cZ as na,ao as Kr,d0 as Sa,a8 as Et,aE as Ra,aV as jr,aw as Gr,a7 as sa,r as Yr,aM as Zr,aR as Jr,F as Qr}from"./CsbrChhH.js";import{s as Rt}from"./ChmnWquS.js";import{b as at}from"./BaIAhI85.js";import{s as Xr}from"./BsieX9dN.js";import{c as $r,u as en,s as tn,a as an}from"./DfxQWSVU.js";import{z as oa,x as ia}from"./D7KOa2cM.js";import{g as ca}from"./Bv8FuKnx.js";import{m as la}from"./DldD9pcf.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 C.workspace_statusIcon_failed_label();case"blocked":return C.workspace_statusIcon_blocked_label();case"needs_attention":return C.workspace_statusIcon_needsAttention_label();case"in_progress":return C.workspace_statusIcon_inProgress_label();case"waiting":return C.workspace_taskStatus_waiting_label();case"unread":return C.layout_activeCard_unread_header();case"not_started":return C.workspace_statusIcon_notStarted_label();case"idle":return C.workspace_statusIcon_idle_label();case"complete":return C.workspace_statusIcon_complete_label();case"pr_queued":return C.workspace_statusIcon_prQueued_label();case"pr_ready":return C.workspace_statusIcon_prReady_label();case"pr_open":return C.workspace_statusIcon_prOpen_label();case"pr_merged":return C.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=B('<span class="workspace-status-dot svelte-14zk5l0" data-workspace-status-dot=""></span>'),ln=B("<span><!></span>");function Pa(a,t){if(new.target)return rt({component:Pa,...a});ot(t,!0);let r=y(t,"status",7),d=y(t,"size",7,14),c=y(t,"decorative",7,!1),u=y(t,"class",7);const s=E(()=>Ea(r()));var o={get status(){return r()},set status(m){r(m),x()},get size(){return d()},set size(m=14){d(m),x()},get decorative(){return c()},set decorative(m=!1){c(m),x()},get class(){return u()},set class(m){u(m),x()},$set:nt,$on:(m,w)=>st(t,m,w)},v=ln(),_=N(v);{var b=m=>{var w=cn();W(m,w)},A=m=>{wt(m,{get icon(){return e(s).icon},class:"size-full!"})};re(_,m=>{e(s).visual==="dot"?m(b):e(s).icon&&m(A,1)})}return T(v),X(m=>{Pe(v,1,m,"svelte-14zk5l0"),pt(v,`width: ${d()??""}px; height: ${d()??""}px;`),$(v,"role",c()?void 0:"img"),$(v,"aria-label",c()?void 0:e(s).accessibleName),$(v,"aria-hidden",c()?"true":void 0),$(v,"title",c()?void 0:e(s).tooltip),$(v,"data-workspace-status",e(s).state),$(v,"data-workspace-status-visual",e(s).visual),$(v,"data-workspace-status-icon",e(s).icon?.iconName)},[()=>Xa($a("workspace-status-icon inline-flex shrink-0 items-center justify-center forced-colors:text-[CanvasText]",e(s).className,u()))]),W(a,v),it(o)}const Gt=6e4,Yt=60*Gt,Zt=24*Yt,da=30*Zt;function dn(a,t=new Date){if(a==null)return null;const r=a instanceof Date?a:new Date(a),d=r.getTime(),c=t.getTime();if(!Number.isFinite(d)||!Number.isFinite(c))return null;const u=Math.max(0,c-d);let s;u<Gt?s="<1m":u<Yt?s=`${Ve(Math.floor(u/Gt))}m`:u<Zt?s=`${Ve(Math.floor(u/Yt))}h`:u<da?s=`${Ve(Math.floor(u/Zt))}d`:s=`${Ve(Math.floor(u/da))}mo`;const o=d>c?t:r,v=wr(o,{now:t});return v?{compact:s,accessible:v,dateTime:r.toISOString()}:null}var un=B('<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=B('<p class="type-caption mt-1 min-w-0 line-clamp-3 text-muted-foreground" data-workspace-hover-card-summary=""> </p>'),pn=B('<span class="shrink-0 text-muted-foreground" data-workspace-hover-card-question-meta=""><span aria-hidden="true"> </span></span>'),mn=B('<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=B('<div role="listitem"><!></div>'),gn=B('<div class="type-caption mt-3 flex items-center justify-between text-muted-foreground" data-workspace-hover-card-overflow=""><span> </span> <!></div>'),vn=B('<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=B('<!> <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=B('<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=B('<div class="type-caption mt-3 flex items-center justify-between text-muted-foreground" data-workspace-hover-card-pr-overflow=""><span> </span> <!></div>'),_n=B('<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=B('<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=B('<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=B('<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 rt({component:An,...a});ot(t,!0);const r=()=>Jt(F,"$workspaceAgents$",c),d=()=>Jt(i,"$prMonitors$",c),[c,u]=Va(),s=Tr("WorkspaceHoverCard");let o=y(t,"workspace",7),v=y(t,"isLoading",7,!1),_=y(t,"activeAgentIds",23,()=>[]),b=y(t,"loadAgentSessions",7,!0),A=y(t,"onkeydown",7),m=y(t,"staticData",7,!1);const w=Ht("");function q(){return m()?Ht([]):er(w)}function V(){return m()?Ht([]):tr(w)}const F=q(),i=V();yt(()=>w.set(o()?.id??""));let p=oe(0);ya(()=>Qt.subscribe(()=>Ka(p)));let k=E(()=>o()?.agentSummary?.agentIds??[]),P=E(()=>(e(p),o()?Qt.getStreamingAgentIdsForWorkspace(o().id):[])),U=null,K=new Set;yt(()=>{if(!o()||!b())return;const l=String(o().id);U!==l&&(U=l,K=new Set);for(const M of new Set([...e(k).slice(0,6),..._(),...e(P)]))K.has(M)||(we.dispatch(_r(l,M)),K.add(M))});function ne(l){return[l.name,l.context,l.questionMeta?.accessible,l.updated.accessible].filter(Boolean).join(". ")}function Le(l){return l?l.kind==="attention"?l.attention.reason?.trim()||null:"text"in l&&l.text.trim()||null:null}function le(l){return dn(l.lastActivity||l.updatedAt||l.createdAt)??{compact:"—",accessible:C.workspace_hoverCard_noRecentActivity_label()}}function ie(l){const M=String(l.status).toLowerCase(),L=yr(l),Q=lr(l),ye=Q==="question"?gr(l):null,he=Le(rr.select(we.state,String(l.id)));let xe,Ne,Ae,n,f,H,S=!1;if(Q==="question"){xe="attention",Ne="question",Ae=ye?.questions[0]?.question.trim()||he||C.workspace_hoverCard_question_label(),n="question",f=1;const G=ye?.questions.length??0;G>1&&(H={compact:`${Ve(1)}/${Ve(G)}`,accessible:C.chat_questionWizard_stepCounter_label({current:1,total:G})})}else if(Q==="attention-discussion")xe="attention",Ne="discussion",Ae=L?.reason?.trim()||C.chat_agentCard_attentionDiscussion_label(),n="attention-discussion",f=1;else if(Q==="attention-blocker"||M==="blocked")xe="attention",Ne="blocker",Ae=L?.reason?.trim()||C.chat_agentCard_attentionBlocker_label(),n="attention-blocker",f=0;else if(l.hasUnread)xe="attention",Ne="unread",Ae=he||C.chat_newMessagesDivider_label(),S=!!he,n="unread",f=2;else if(l.isStreaming||l.isProcessing||_().includes(String(l.id))||e(P).includes(String(l.id))||["active","busy","processing","responding","running","streaming","in_progress"].includes(M))xe="active",Ae=he||C.workspace_devScripts_running_label(),S=!!he,n=l.isProcessing?"responding":"running",f=3;else if(["waiting","pending","queued","starting"].includes(M))xe="waiting",Ae=he||C.workspace_taskStatus_waiting_label(),S=!!he,n="waiting",f=4;else return null;const Y=l.agentMetadata??l.metadata;return{id:String(l.id),name:l.name?.trim()||C.workspace_fileChanges_agent_label(),group:xe,attentionKind:Ne,avatarState:n,specialist:Y?.specialist,context:Ae,questionMeta:H,contextIsPreview:S,updated:le(l),priority:f}}let ge=E(()=>{const l=o()?.agentSummary,M=new Map;if(Array.isArray(l?.agents))for(const L of l.agents)L&&typeof L=="object"&&typeof L.id=="string"&&M.set(L.id,L.parentAgentId);return r().filter(L=>{const Q=M.get(String(L.id));return!(kr(L)!=="topLevel"||typeof Q=="string"&&Q||L.pendingDeleteAt||L.retiredAt||String(L.status).toLowerCase()==="deleted")})}),_e=E(()=>e(ge).map(ie).filter(l=>l!==null).sort((l,M)=>l.priority-M.priority)),Ge=E(()=>e(_e).slice(0,6)),I=E(()=>Math.max(0,e(_e).length-6)),ee=E(()=>o()?.repositoryName?o().repositoryOwner?`${o().repositoryOwner} / ${o().repositoryName}`:o().repositoryName:C.workspace_hoverCard_localRepository_label()),Re=E(()=>on(o()??{})),ve=E(()=>Ea(e(Re))),ce=E(()=>o()?.statusMessage?.trim()||"");function ke(l){if(!l)return null;const M=l.activePullRequest??l.pullRequests?.[0]??null;return M||(l.prStatus?{id:`legacy-pr-${l.prNumber??"workspace"}`,number:l.prNumber??0,url:l.prUrl??"",title:C.workspace_hoverCard_pullRequest_label(),status:l.prStatus,createdAt:l.updatedAt,updatedAt:l.updatedAt}:null)}let We=E(()=>o()?m()?ke(o()):nr.select(we.state,o().id)??ke(o()):null),de=E(()=>{if(!o()||ar(o()))return[];const l=o().repositoryOwner&&o().repositoryName?`${o().repositoryOwner}/${o().repositoryName}`:void 0;return cr({workspacePRs:o().pullRequests,activePR:e(We),monitors:d(),workspaceRepo:l,buildPrUrl:(M,L)=>Vr(M,o().repositoryOwner,o().repositoryName,L),getDisplayTitle:M=>M.title})}),Ze=E(()=>e(de).slice(0,3)),Te=E(()=>Math.max(0,e(de).length-3)),se=E(()=>e(_e).length>0),qe=E(()=>e(de).length>0),h=E(()=>e(se)||e(qe));function g(l){const M=l.resource?.repository.provider==="gitlab"?`${l.repo} !${l.number}`:l.repo?C.workspace_card_prBadge_repoLine_tooltip({repo:l.repo,number:l.number}):C.workspace_card_prBadge_label({number:` #${l.number}`});return[sr(M,l),l.title,l.details].filter(Boolean).join(`
|
|
3
|
-
`)}function J(l,M){if(l.stopPropagation(),!o()||!b())return;const L=o().id;Br.select(we.state)!==L&&Fr(L).catch(Q=>{s.warn("Failed to switch workspace for hover-card agent",{agentId:M,error:Q})}),we.dispatch(xr(L,{agentId:M}))}function D(l,M){if(l.stopPropagation(),!o()||!M.url)return;const L=o().id;ka(async()=>{const{handleLink:Q}=await import("./D7KOa2cM.js").then(ye=>ye.H);return{handleLink:Q}},__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,57,58,59,60,61,62,63,64,65,66,67,68,69]),import.meta.url).then(({handleLink:Q})=>Q(M.url,{workspaceId:L,event:l}))}var ae={get workspace(){return o()},set workspace(l){o(l),x()},get isLoading(){return v()},set isLoading(l=!1){v(l),x()},get activeAgentIds(){return _()},set activeAgentIds(l=[]){_(l),x()},get loadAgentSessions(){return b()},set loadAgentSessions(l=!0){b(l),x()},get onkeydown(){return A()},set onkeydown(l){A(l),x()},get staticData(){return m()},set staticData(l=!1){m(l),x()},$set:nt,$on:(l,M)=>st(t,l,M)},ue=xn(),j=N(ue);{var Ie=l=>{var M=un(),L=N(M),Q=N(L),ye=N(Q);ut(ye,{class:"h-7 min-w-0 max-w-64 flex-1"});var he=z(ye,2);ut(he,{class:"h-5 w-20 shrink-0"}),T(Q);var xe=z(Q,2);ut(xe,{class:"h-4 w-40"});var Ne=z(xe,2);ut(Ne,{class:"mt-2 h-10 w-full"}),T(L);var Ae=z(L,4),n=N(Ae),f=N(n);ut(f,{class:"h-10 w-full"}),T(n);var H=z(n,2),S=N(H);ut(S,{class:"h-10 w-full"}),T(H),T(Ae),T(M),W(l,M)},Fe=l=>{var M=yn(),L=Ee(M);let Q;var ye=N(L),he=N(ye),xe=N(he),Ne=me(xe,!0),Ae=z(xe,2),n=N(Ae),f=me(n,!0),H=z(n);Pa(H,{get status(){return e(Re)},size:16,decorative:!0}),T(Ae),T(he);var S=z(he,2),Y=me(S,!0),G=z(S,2);{var te=pe=>{var ze=fn(),It=me(ze,!0);tt(ze,(Mt,Pt)=>Bt?.(Mt,Pt),()=>e(ce)),X(()=>be(It,e(ce))),W(pe,ze)};re(G,pe=>{e(ce)&&pe(te)})}T(ye),T(L);var He=z(L,2);{var fe=pe=>{var ze=kn(),It=z(Ee(ze),2),Mt=N(It);{var Pt=Je=>{var Ke=vn(),Ye=N(Ke);Ut(Ye,21,()=>e(Ge),Z=>Z.id,(Z,R)=>{var Me=ua(),Qe=N(Me);{let Xe=E(()=>ne(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 A()},onclick:je=>J(je,e(R).id),children:(je,mt)=>{var Oe=mn(),Ce=Ee(Oe),Ue=N(Ce);{let et=E(()=>e(R).specialist??null);dr(Ue,{get agentId(){return e(R).id},variant:"compact",get state(){return e(R).avatarState},get specialist(){return e(et)}})}T(Ce);var ct=z(Ce),Lt=me(ct,!0),$e=z(ct),Wt=me($e,!0),gt=z($e,2),vt=N(gt),Nt=me(vt,!0);tt(vt,(et,lt)=>Bt?.(et,lt),()=>e(R).context);var Oa=z(vt);{var qa=et=>{var lt=pn(),Da=N(lt),za=me(Da,!0);T(lt),X(()=>{$(lt,"aria-label",e(R).questionMeta.accessible),be(za,e(R).questionMeta.compact)}),W(et,lt)};re(Oa,et=>{e(R).questionMeta&&et(qa)})}T(gt),X(()=>{be(Lt,e(R).name),$($e,"datetime",e(R).updated.dateTime),$($e,"aria-label",e(R).updated.accessible),be(Wt,e(R).updated.compact),$(gt,"data-workspace-hover-card-agent-preview",e(R).contextIsPreview||void 0),be(Nt,e(R).context)}),W(je,Oe)},$$slots:{default:!0}})}T(Me),W(Z,Me)}),T(Ye);var Tt=z(Ye,2);{var Ft=Z=>{var R=gn(),Me=N(R),Qe=me(Me,!0),Xe=z(Me,2);wt(Xe,{get icon(){return ra},size:10}),T(R),X(je=>be(Qe,je),[()=>C.workspace_hoverCard_moreAgents_label({count:Ve(e(I))})]),W(Z,R)};re(Tt,Z=>{e(I)&&Z(Ft)})}T(Ke),X(Z=>$(Ke,"aria-label",Z),[()=>C.workspace_multiSelectSidebar_agentsTab_label()]),W(Je,Ke)};re(Mt,Je=>{e(se)&&Je(Pt)})}var Na=z(Mt,2);{var Ha=Je=>{var Ke=_n(),Ye=N(Ke);Ut(Ye,21,()=>e(Ze),Z=>Z.identity,(Z,R)=>{var Me=ua();{const mt=Oe=>{var Ce=hn(),Ue=Ee(Ce);wt(Ue,{get icon(){return e(R).statusIcon},size:16,get class(){return`shrink-0 justify-self-start ${e(R).foregroundClass??""}`}});var ct=z(Ue,2),Lt=me(ct,!0),$e=z(ct,2),Wt=me($e,!0),gt=z($e,2),vt=me(gt,!0);X(Nt=>{be(Lt,Nt),be(Wt,e(R).accessibleStateLabel),be(vt,e(R).numberLabel??`#${e(R).number}`)},[()=>e(R).title||(e(R).resource?.repository.provider==="gitlab"?C.workspace_hoverCard_mergeRequest_label():C.workspace_hoverCard_pullRequest_label())]),W(Oe,Ce)};var Qe=N(Me);{var Xe=Oe=>{{let Ce=E(()=>g(e(R)));jt(Oe,{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(Ce)},"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 A()},onclick:Ue=>D(Ue,e(R)),children:(Ue,ct)=>{mt(Ue)},$$slots:{default:!0}})}},je=Oe=>{var Ce=bn(),Ue=N(Ce);mt(Ue),T(Ce),X(()=>{$(Ce,"data-pr-identity",e(R).identity),$(Ce,"data-pr-status",e(R).status)}),W(Oe,Ce)};re(Qe,Oe=>{e(R).url?Oe(Xe):Oe(je,-1)})}T(Me)}X(mt=>$(Me,"aria-label",mt),[()=>e(R).url?void 0:g(e(R))]),W(Z,Me)}),T(Ye);var Tt=z(Ye,2);{var Ft=Z=>{var R=wn(),Me=N(R),Qe=me(Me,!0),Xe=z(Me,2);wt(Xe,{get icon(){return ra},size:10}),T(R),X(je=>be(Qe,je),[()=>C.workspace_hoverCard_moreItems_label({count:Ve(e(Te))})]),W(Z,R)};re(Tt,Z=>{e(Te)&&Z(Ft)})}T(Ke),X((Z,R)=>{$(Ke,"aria-label",Z),$(Ye,"aria-label",R)},[()=>e(de).every(Z=>Z.resource?.repository.provider==="gitlab")?C.workspace_hoverCard_mergeRequests_label():e(de).some(Z=>Z.resource?.repository.provider==="gitlab")?C.workspace_hoverCard_reviews_label():C.workspace_hoverCard_pullRequests_label(),()=>e(de).every(Z=>Z.resource?.repository.provider==="gitlab")?C.workspace_hoverCard_mergeRequests_label():e(de).some(Z=>Z.resource?.repository.provider==="gitlab")?C.workspace_hoverCard_reviews_label():C.workspace_hoverCard_pullRequests_label()]),W(Je,Ke)};re(Na,Je=>{e(qe)&&Je(Ha)})}T(It),W(pe,ze)};re(He,pe=>{e(h)&&pe(fe)})}X(pe=>{Q=Pe(L,1,"min-w-0 px-5 pt-4",null,Q,{"pb-4":!e(h)}),be(Ne,pe),be(f,e(ve).label),be(Y,e(ee))},[()=>o().title||C.workspace_links_untitled_label()]),W(l,M)};re(j,l=>{v()||!o()?l(Ie):l(Fe,-1)})}T(ue),W(a,ue);var De=it(ae);return u(),De}const fa=800,Ts=175,In=300;function Mn(){let a=0,t=null;const r=new Set,d=new Set;function c(){return a>0||t!==null?0:fa}function u(){const o=c();r.forEach(v=>v(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 d.add(o),()=>d.delete(o)},settleDeferredCloses(){const o=[...d];d.clear(),o.forEach(v=>v())},reset(){const o=c()!==fa;s(),a=0,d.clear(),o&&u()}}}const Fs=Mn();function Dt(a){const t=Aa.select(we.state,a);return t!==void 0&&Cr(t)}function Cn(a,t){if(!Dt(a))return[];const r=vr.select(we.state,a),d=Xt.select(we.state,a),c=hr.select(we.state),u=[];for(let s=0;s<Ar;s+=1){const o=c[s],v=o&&o!==a?Aa.select(we.state,o):void 0;u.push({id:`assign-micro-key-${s+1}`,label:v?C.workspace_card_assignOccupiedMicroKey_label({number:Ve(s+1),title:v.title}):C.workspace_card_assignMicroKeyNumber_label({number:Ve(s+1)}),checked:r===s,closeOnSelect:!0,onClick:()=>{Dt(a)&&we.dispatch(Ir(s,a)),t()}})}return d!==null&&(u.push({type:"separator"}),u.push({id:"unassign-micro-key",label:C.workspace_card_unassignMicroKey_label(),onClick:()=>{Dt(a)&&Xt.select(we.state,a)===d&&we.dispatch(Mr(d)),t()}})),u}function Ls(a,{connected:t,onClose:r}){if(!t)return[];const d=Cn(a,r);if(d.length===0)return[];const c=d.filter(s=>"id"in s&&s.id!=="unassign-micro-key"),u=d.find(s=>"id"in s&&s.id==="unassign-micro-key");return[{id:"assign-micro-key",label:C.workspace_card_assignMicroKey_label(),icon:zr,onClick:()=>{},selection:"single",submenu:c},...u?[u]:[]]}var Sn=B('<div data-static-position="" role="tooltip"><!></div>'),pa=B('<div role="tooltip"><!></div>');function Rn(a,t){if(new.target)return rt({component:Rn,...a});ot(t,!0);let r=y(t,"id",7),d=y(t,"anchor",7),c=y(t,"position",7,"right"),u=y(t,"absolute",7,!1),s=y(t,"anchorElement",7,null),o=y(t,"staticPosition",7,!1),v=y(t,"class",7,""),_=y(t,"children",7),b=y(t,"onmouseenter",7),A=y(t,"onmouseleave",7),m=y(t,"onfocusin",7),w=y(t,"onfocusout",7);const q=$r(en()+2);tn(q);const V=an(q),F=8,i=4;let p=oe(null),k=oe(""),P=oe(void 0);const U=E(()=>c()==="bottom-right"||c()==="bottom-left"),K=E(()=>c()==="top"),ne=E(()=>o()?"relative":u()?"absolute":"fixed"),Le=E(()=>c()==="right"?{x:-4,y:0}:c()==="bottom"?{x:4,y:0}:e(K)?{x:0,y:4}:{x:0,y:-4});function le(h,g,J){return Math.max(g,Math.min(J,h))}let ie=null,ge=null;function _e(){return!ie?.isConnected||ge!==d()?!1:ie.style.getPropertyValue("anchor-name").includes(d())||getComputedStyle(ie).getPropertyValue("anchor-name").includes(d())}function Ge(){return s()?s():(_e()||(ie=Array.from(document.querySelectorAll('[style*="anchor-name"]')).find(h=>{const g=h.style.getPropertyValue("anchor-name"),J=getComputedStyle(h).getPropertyValue("anchor-name");return g.includes(d())||J.includes(d())})??null,ge=ie?d():null),ie)}function I(){if(o()||u()||!e(p))return;const h=Ge();if(!h)return;const g=h.getBoundingClientRect(),J=e(p).getBoundingClientRect(),D=window.innerWidth||document.documentElement.clientWidth,ae=window.innerHeight||document.documentElement.clientHeight,ue=J.width||e(p).offsetWidth,j=J.height||e(p).offsetHeight,Ie=Math.max(0,g.top-i-F),Fe=Math.max(0,ae-g.bottom-i-F),De=e(K)?!(Ie<j&&Fe>Ie):e(U)&&Fe<j&&Ie>Fe;let l=g.left,M=g.bottom+i,L=De?Ie:Fe;if(c()==="right"){const Q=g.left-i-F,ye=D-g.right-i-F;l=ye>=ue||ye>=Q?g.right+i:g.left-ue-i,M=g.top,L=Math.max(0,ae-F*2)}else c()==="bottom"?(l=g.left-ue-i,M=g.bottom-j):(e(K)||e(U))&&(c()==="bottom-left"?l=g.right-ue:e(K)&&(l=g.left+g.width/2-ue/2),M=De?g.top-Math.min(j,L)-i:g.bottom+i);l=le(l,F,Math.max(F,D-ue-F)),M=le(M,F,Math.max(F,ae-Math.min(j,L)-F)),O(P,`${L}px`),O(k,`left: ${l}px; top: ${M}px;`)}let ee=!1;async function Re(){ee||(ee=!0,await ja(),ee=!1,I())}let ve=null;function ce(){ve||(ve=Xr(()=>{ve=null,I()}))}function ke(h){const g=s()??(_e()?ie:null);g&&h.target instanceof Node&&!h.target.contains(g)||ce()}yt(()=>{const h=e(p),g=s();o()||u()||!h||!g||Re()}),ya(()=>{if(o())return;let h=null;return Re().then(()=>{if(!u()&&typeof ResizeObserver<"u"){h=new ResizeObserver(ce),e(p)&&h.observe(e(p));const g=Ge();g&&h.observe(g)}}),window.addEventListener("resize",ce),window.addEventListener("scroll",ke,!0),()=>{h?.disconnect(),window.removeEventListener("resize",ce),window.removeEventListener("scroll",ke,!0),ve?.(),ve=null}});var We={get id(){return r()},set id(h){r(h),x()},get anchor(){return d()},set anchor(h){d(h),x()},get position(){return c()},set position(h="right"){c(h),x()},get absolute(){return u()},set absolute(h=!1){u(h),x()},get anchorElement(){return s()},set anchorElement(h=null){s(h),x()},get staticPosition(){return o()},set staticPosition(h=!1){o(h),x()},get class(){return v()},set class(h=""){v(h),x()},get children(){return _()},set children(h){_(h),x()},get onmouseenter(){return b()},set onmouseenter(h){b(h),x()},get onmouseleave(){return A()},set onmouseleave(h){A(h),x()},get onfocusin(){return m()},set onfocusin(h){m(h),x()},get onfocusout(){return w()},set onfocusout(h){w(h),x()},$set:nt,$on:(h,g)=>st(t,h,g)},de=xt(),Ze=Ee(de);{var Te=h=>{var g=Sn(),J=N(g);Rt(J,()=>_()??Ot),T(g),at(g,D=>O(p,D),()=>e(p)),X(()=>{$(g,"id",r()),Pe(g,1,e(ne)+` z-50 w-64 flex flex-col overflow-y-auto border border-border pointer-events-auto ${V} `+v()),$(g,"data-surface-level",q)}),W(h,g)},se=h=>{var g=pa();let J;var D=N(g);Rt(D,()=>_()??Ot),T(g),at(g,ae=>O(p,ae),()=>e(p)),X(()=>{$(g,"id",r()),Pe(g,1,e(ne)+` z-50 w-64 flex flex-col border border-border pointer-events-none ${V} `+v()),$(g,"data-surface-level",q),J=pt(g,"",J,{"position-anchor":d(),right:c()==="bottom"?"anchor(left)":void 0,left:c()==="right"?"anchor(right)":e(U)?"anchor(left)":e(K)?"anchor(center)":void 0,top:c()==="right"?"anchor(top)":e(U)?"anchor(bottom)":void 0,bottom:c()==="bottom"?"anchor(bottom)":e(K)?"anchor(top)":void 0,"margin-right":c()==="bottom"?"8px":void 0,"margin-left":c()==="right"?"8px":void 0,"margin-top":e(U)?"4px":void 0,"margin-bottom":e(K)?"4px":void 0,translate:e(K)?"-50% 0":void 0})}),Be("mouseenter",g,function(...ae){b()?.apply(this,ae)}),Be("mouseleave",g,function(...ae){A()?.apply(this,ae)}),Se("focusin",g,function(...ae){m()?.apply(this,ae)}),Se("focusout",g,function(...ae){w()?.apply(this,ae)}),Ct(1,g,()=>$t,()=>({tier:"fast",...e(Le),scale:.96})),Ct(2,g,()=>ea,()=>({tier:"fast"})),W(h,g)},qe=h=>{br(h,{zIndex:50,children:(g,J)=>{var D=pa();let ae;var ue=N(D);Rt(ue,()=>_()??Ot),T(D),at(D,j=>O(p,j),()=>e(p)),X(()=>{$(D,"id",r()),Pe(D,1,e(ne)+` z-50 w-64 flex flex-col overflow-y-auto border border-border pointer-events-auto ${V} `+v()),$(D,"data-surface-level",q),ae=pt(D,e(k),ae,{"max-height":e(P)})}),Be("mouseenter",D,function(...j){b()?.apply(this,j)}),Be("mouseleave",D,function(...j){A()?.apply(this,j)}),Se("focusin",D,function(...j){m()?.apply(this,j)}),Se("focusout",D,function(...j){w()?.apply(this,j)}),Ct(1,D,()=>$t,()=>({tier:"fast",...e(Le),scale:.96})),Ct(2,D,()=>ea,()=>({tier:"fast"})),W(g,D)},$$slots:{default:!0}})};re(Ze,h=>{o()?h(Te):u()?h(se,1):h(qe,-1)})}return W(a,de),it(We)}xa(["focusin","focusout"]);function kt(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 d of r.content.querySelectorAll("img, video")){const c=d.getAttribute("src")||d.getAttribute("data-media-src")||"",u=[...d.querySelectorAll("source")];if(!kt(c,!1)||u.some(o=>!kt(o.getAttribute("src")||"",!1))){const o=document.createElement("img");o.setAttribute("alt",d.getAttribute("alt")||d.getAttribute("data-name")||""),o.setAttribute("data-media-unavailable","node-owned"),d.replaceWith(o);continue}d.removeAttribute("srcset");const s=d.getAttribute("poster");s&&!kt(s,!1)&&d.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=B("<!> <!>",1);function Ta(a,t){if(new.target)return rt({component:Ta,...a});ot(t,!0);let r=y(t,"workspaceId",7),d=y(t,"canUseMedia",7),c=oe(null),u=oe(null),s=oe(!1),o=oe(!1);function v(k){O(c,{url:k.getAttribute("src")||"",name:k.getAttribute("alt")||void 0,opener:k},!0),O(s,!0)}function _(k){const P=na(k.getAttribute("href")||"",r());return P&&d()(P)?(O(c,{url:P,name:k.textContent?.trim()||void 0,opener:k,assetLink:!0},!0),O(s,!0),!0):b(k)}function b(k){const P=_t(k.getAttribute("href")||"",r());return!P||!d()(P.url)?!1:(O(u,{url:P.url,mimeType:P.mimeType,name:k.textContent?.trim()||void 0,opener:k},!0),O(o,!0),!0)}yt(()=>{e(u)&&!_t(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 A={openImage:v,openAsset:_,get workspaceId(){return r()},set workspaceId(k){r(k),x()},get canUseMedia(){return d()},set canUseMedia(k){d(k),x()},$set:nt,$on:(k,P)=>st(t,k,P)},m=Fn(),w=Ee(m);{var q=k=>{ur(k,{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)}})},V=E(()=>e(c)&&d()(e(c).url));re(w,k=>{e(V)&&k(q)})}var F=z(w,2);{var i=k=>{Ia(k,{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)&&_t(e(u).url,r())&&d()(e(u).url));re(F,k=>{e(p)&&k(i)})}return W(a,m),it(A)}var Ln=B('<div class="flex items-center gap-2"><!> <!></div>'),Wn=Ga('<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>'),Nn=B('<div class="absolute inset-0 flex items-center justify-center bg-muted text-muted-foreground" aria-hidden="true"><!></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><svg viewBox="0 0 20 20" fill="currentColor"><path d="m7 5 7 5-7 5V5Z"></path></svg></span></span>',3),Hn=B("<div><!> <!></div>"),On=B('<div class="my-2 min-w-0 max-w-2xl" data-chat-video=""><!></div> <!>',1);function Fa(a,t){if(new.target)return rt({component:Fa,...a});ot(t,!0);let r=y(t,"source",7),d=y(t,"name",23,()=>C.chat_videoBlock_fromAgent_label()),c=y(t,"poster",7),u=y(t,"allowFileMedia",7,!0),s=y(t,"canOpenFile",7),o=y(t,"fluid",7,!1),v=y(t,"compact",7,!1),_=y(t,"compactPreview",7),b=oe(!1),A=oe(!1),m=oe(!1),w=oe(null);const q=E(()=>r().kind==="inline"?`data:${r().mimeType};base64,${r().data}`:r().url);function V(I){return kt(I,u()&&s()?.()!==!1)}const F=E(()=>!V(e(q))),i=E(()=>At(e(q))),p=E(()=>{if(!(!c()||!V(c()))){if(/^data:image\/(?:gif|jpeg|png|webp);base64,[a-z0-9+/=]+$/i.test(c()))return c();try{const I=new URL(c());return(I.protocol==="https:"||I.protocol==="workspace-file:")&&!I.username&&!I.password?c():void 0}catch{return}}});function k(){O(A,!0),O(m,!1)}var P={get source(){return r()},set source(I){r(I),x()},get name(){return d()},set name(I=C.chat_videoBlock_fromAgent_label()){d(I),x()},get poster(){return c()},set poster(I){c(I),x()},get allowFileMedia(){return u()},set allowFileMedia(I=!0){u(I),x()},get canOpenFile(){return s()},set canOpenFile(I){s(I),x()},get fluid(){return o()},set fluid(I=!1){o(I),x()},get compact(){return v()},set compact(I=!1){v(I),x()},get compactPreview(){return _()},set compactPreview(I){_(I),x()},$set:nt,$on:(I,ee)=>st(t,I,ee)},U=On(),K=Ee(U);let ne;var Le=N(K);{var le=I=>{Vt(I,{get name(){return d()},reason:"load-failed"})},ie=I=>{var ee=Ln(),Re=N(ee);{let ce=E(()=>e(i)?.path),ke=E(()=>e(i)?.workspaceId);Vt(Re,{get name(){return d()},reason:"load-failed",get path(){return e(ce)},get workspaceId(){return e(ke)}})}var ve=z(Re,2);Kt(ve,{get videoUrl(){return e(q)},get videoName(){return d()},get sourceKind(){return r().kind},get mimeType(){return r().mimeType}}),T(ee),W(I,ee)},ge=I=>{var ee=Hn();let Re;var ve=N(ee);{let We=E(()=>C.chat_videoBlock_play_ariaLabel({name:d()}));jt(ve,{wrapContent:!1,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(We)},"data-testid":"chat-video-snapshot",onclick:()=>{V(e(q))&&O(b,!0)},get ref(){return e(w)},set ref(de){O(w,de,!0)},children:(de,Ze)=>{var Te=xt(),se=Ee(Te);{var qe=g=>{var J=xt(),D=Ee(J);Rt(D,_),W(g,J)},h=g=>{var J=Nn(),D=Ee(J),ae=N(D);{var ue=l=>{var M=Wn();W(l,M)};re(ae,l=>{o()||l(ue)})}T(D);var j=z(D,2);j.muted=!0;var Ie=z(j,2),Fe=N(Ie),De=me(Fe);T(Ie),X(()=>{$(j,"src",e(q)),$(j,"poster",e(p)),Pe(j,1,`pointer-events-none absolute inset-0 size-full object-contain transition-opacity motion-reduce:transition-none ${e(p)||e(A)&&!e(m)?"opacity-100":"opacity-0"}`),Pe(Fe,1,`flex ${v()?"size-6":"size-11"} shrink-0 aspect-square 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]`),Pe(De,0,`ml-0.5 ${v()?"size-3":"size-5"}`)}),Be("loadeddata",j,k),Be("error",j,()=>O(m,!0)),W(g,J)};re(se,g=>{_()?g(qe):g(h,-1)})}W(de,Te)},$$slots:{default:!0}})}var ce=z(ve,2);{var ke=We=>{Kt(We,{get videoUrl(){return e(q)},get videoName(){return d()},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"})};re(ce,We=>{_()||We(ke)})}T(ee),X(()=>{Pe(ee,1,`group relative aspect-video w-full max-w-2xl ${o()?"max-h-72":"max-h-40"}`),Re=pt(ee,"",Re,{height:_()?"100%":void 0,width:o()?"min(100%, calc(18rem * 16 / 9))":"min(100%, calc(10rem * 16 / 9))"})}),W(I,ee)};re(Le,I=>{e(F)?I(le):e(m)?I(ie,1):I(ge,-1)})}T(K);var _e=z(K,2);{var Ge=I=>{Ia(I,{get videoUrl(){return e(q)},get videoName(){return d()},get poster(){return e(p)},get sourceKind(){return r().kind},get mimeType(){return r().mimeType},get openerElement(){return e(w)},get open(){return e(b)},set open(ee){O(b,ee,!0)}})};re(_e,I=>{!e(m)&&!e(F)&&I(Ge)})}return X(()=>ne=pt(K,"",ne,{height:_()?"100%":void 0})),W(a,U),it(P)}const qn=/^\s*!\[([^\]\n]*)\]\((?:<)?((?:intent:\/\/local\/|workspace-file:\/\/|workspace-asset:\/\/)[^)\s>]+)(?:>)?\)\s*$/,Dn=/^ {0,3}(`{3,}|~{3,})(.*)$/;function ma(a,t){if(typeof a!="string"||!a||a!==a.trim())return null;if(a.startsWith("workspace-asset://"))return _t(a,t);if(a.startsWith("workspace-file://")){const d=At(a);if(!d||d.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 zn(a,t){if(a.startsWith("workspace-file://")){const r=At(a);if(!r||r.workspaceId!==t)return!1;const d=Sa(a);return!!d&&!!Et(d,t)}return!!Et(a,t,{readOnly:!0})}function Un(a,t){return(t===0||!a[t-1].trim())&&(t===a.length-1||!a[t+1].trim())}function Bn(a,t,r){const d=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===d)})}function Vn(a,t){const r=a.split(`
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/BR9y4bsr.js","/app/immutable/chunks/DYhIMPy1.js","/app/immutable/chunks/BUAFIktJ.js","/app/immutable/chunks/Bvd0DfwC.js","/app/immutable/chunks/CnTu6sc6.js","/app/immutable/chunks/Db2Jl7w7.js","/app/immutable/chunks/DCOf4rfq.js","/app/immutable/chunks/vJ7Dp7-k.js","/app/immutable/chunks/COO6ldt4.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/iYz7qSVO.js","/app/immutable/chunks/WFvSJ9zU.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/D8Uhwh7R.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/chunks/ggQuSgBM.js","/app/immutable/chunks/BaIAhI85.js","/app/immutable/chunks/hwFphMxp.js","/app/immutable/chunks/B1s_9zgm.js","/app/immutable/chunks/BXyNrc2B.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/BgOj6lPu.js","/app/immutable/chunks/CLi8c-Jc.js","/app/immutable/chunks/DyLYtK5N.js","/app/immutable/chunks/Co5bimwo.js","/app/immutable/chunks/B6lWPidK.js","/app/immutable/chunks/BhzNHo5H.js","/app/immutable/chunks/CfdX4Lfl.js","/app/immutable/chunks/Buh7J53B.js","/app/immutable/assets/menu-footer.Ck5GCpgU.css","/app/immutable/chunks/DfxQWSVU.js","/app/immutable/chunks/hmNmIDzu.js","/app/immutable/assets/dialog.BtQTVchw.css","/app/immutable/chunks/BsieX9dN.js","/app/immutable/assets/observe-overflow.CbDLK6fN.css","/app/immutable/chunks/GVSL2sGk.js","/app/immutable/chunks/DS2QhtLm.js","/app/immutable/chunks/CGuBCqy6.js","/app/immutable/chunks/XJv96NUg.js","/app/immutable/assets/confirm.UE5obH5A.css","/app/immutable/chunks/BWYr8u9e.js","/app/immutable/chunks/BeP4UORy.js","/app/immutable/chunks/DeLItg2s.js","/app/immutable/chunks/CRrFC3B8.js","/app/immutable/assets/SettingsPage.D8u26cHZ.css","/app/immutable/chunks/CrxGBxMK.js","/app/immutable/chunks/jK-m9hL8.js","/app/immutable/chunks/CC7to1B5.js","/app/immutable/chunks/IH85nSha.js","/app/immutable/assets/notify.BeL_JB6L.css","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/DBGsU6bn.js","/app/immutable/chunks/D1PZlLC_.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/Bz6dDdb9.js","/app/immutable/chunks/DJ8_lZZl.js","/app/immutable/chunks/D_Kq1QRo.js","/app/immutable/chunks/CZ8DhcrQ.js","/app/immutable/chunks/CmSGn2AH.js","/app/immutable/chunks/CacD4jQL.js","/app/immutable/chunks/BvFAWM27.js","/app/immutable/chunks/DEo3brV5.js","/app/immutable/chunks/SAoHFFQz.js","/app/immutable/chunks/-lzAI0Yg.js","/app/immutable/chunks/lwGMtA_8.js","/app/immutable/chunks/B0Z-1lwJ.js","/app/immutable/chunks/C_Q5e0bX.js","/app/immutable/assets/directory-picker-service.CzNEA6Ot.css","/app/immutable/chunks/Bw0E8NsL.js","/app/immutable/chunks/DEo5mzFE.js","/app/immutable/chunks/Da7V4qRA.js","/app/immutable/chunks/DV_c4cZz.js","/app/immutable/chunks/BDDVFcm3.js","/app/immutable/chunks/CUHqJ1Vg.js","/app/immutable/chunks/CMiilI_P.js","/app/immutable/chunks/lkH5RFQO.js","/app/immutable/chunks/BS0GmsgM.js","/app/immutable/assets/AttachmentPreview.BCSCCZGm.css","/app/immutable/assets/DiagramPresentation.C2GLYoBN.css","/app/immutable/chunks/hQlemDzn.js","/app/immutable/assets/StreamingDiagramRenderer.BShsSvPz.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
var Ua=Object.defineProperty;var Ba=(a,t,r)=>t in a?Ua(a,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):a[t]=r;var dt=(a,t,r)=>Ba(a,typeof t!="symbol"?t+"":t,r);import{bo as C,t as rt,bq as y,by as nt,b as st,bs as Va,bu as Jt,_ as ka}from"./BUAFIktJ.js";import{bs as ot,a5 as N,aD as e,bA as T,b_ as X,W,bn as it,c9 as E,aA as x,aB as B,ca as yt,bk as ya,c6 as Ka,cd as Ht,bV as oe,bS as z,ay as Ee,bl as me,bO as be,ai as xa,a7 as xt,c0 as ja,bf as Ot,bH as O,aw as Be,aj as Se,aC as Ga,c3 as ft,bb as St,aF as Ya,br as Za,bj as Ja}from"./DYhIMPy1.js";import{i as re}from"./Bvd0DfwC.js";import{e as tt,g as Ut,i as Qa}from"./vJ7Dp7-k.js";import{c as Xa,e as $a,f as Pe,g as pt,s as $}from"./COO6ldt4.js";import{aO as er,cY as tr,M as ar,aw as rr,dm as nr,W as sr,dr as Aa,C as or,a0 as ir}from"./D1PZlLC_.js";import{t as Bt}from"./BhzNHo5H.js";import{a9 as cr,ao as lr,A as dr,n as ur,a5 as Ia,s as Vt,a4 as Kt,aJ as At,b5 as Ma,m as fr,aL as pr,b4 as mr}from"./CUHqJ1Vg.js";import{l as Qt}from"./Cx8Xjey1.js";import{c6 as gr,c3 as vr,c4 as Xt,aO as hr}from"./CZ8DhcrQ.js";import{t as ut,P as br}from"./B6lWPidK.js";import{F as qt}from"./B1s_9zgm.js";import{f as jt}from"./hwFphMxp.js";import{t as Ve,v as wr,I as Ct,F as $t,c as ea}from"./DCOf4rfq.js";import{ry as Ca,Iv as we,mq as _r,fG as kr,nk as yr,uk as xr,c as Ar,vW as Ir,s$ as Mr,rg as Cr,i as Sr,bf as ta,v1 as Rr,sG as Er,v3 as Pr}from"./iYz7qSVO.js";import{c as Tr,l as bt}from"./ChTqQfQN.js";import{o as Fr}from"./C_Q5e0bX.js";import{aN as Lr,aO as aa,by as Wr,ax as Nr,bx as Hr,aC as Or,c_ as qr,cO as Dr,F as wt,au as ra,bG as zr,bB as Ur}from"./CfdX4Lfl.js";import{l as Br}from"./CmSGn2AH.js";import{p as Vr,c_ as _t,cZ as na,ao as Kr,d0 as Sa,a8 as Et,aE as Ra,aV as jr,aw as Gr,a7 as sa,r as Yr,aM as Zr,aR as Jr,F as Qr}from"./Da7V4qRA.js";import{s as Rt}from"./CnTu6sc6.js";import{b as at}from"./BaIAhI85.js";import{s as Xr}from"./BsieX9dN.js";import{c as $r,u as en,s as tn,a as an}from"./DfxQWSVU.js";import{z as oa,x as ia}from"./BR9y4bsr.js";import{g as ca}from"./Db2Jl7w7.js";import{m as la}from"./DV_c4cZz.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 C.workspace_statusIcon_failed_label();case"blocked":return C.workspace_statusIcon_blocked_label();case"needs_attention":return C.workspace_statusIcon_needsAttention_label();case"in_progress":return C.workspace_statusIcon_inProgress_label();case"waiting":return C.workspace_taskStatus_waiting_label();case"unread":return C.layout_activeCard_unread_header();case"not_started":return C.workspace_statusIcon_notStarted_label();case"idle":return C.workspace_statusIcon_idle_label();case"complete":return C.workspace_statusIcon_complete_label();case"pr_queued":return C.workspace_statusIcon_prQueued_label();case"pr_ready":return C.workspace_statusIcon_prReady_label();case"pr_open":return C.workspace_statusIcon_prOpen_label();case"pr_merged":return C.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=B('<span class="workspace-status-dot svelte-14zk5l0" data-workspace-status-dot=""></span>'),ln=B("<span><!></span>");function Pa(a,t){if(new.target)return rt({component:Pa,...a});ot(t,!0);let r=y(t,"status",7),d=y(t,"size",7,14),c=y(t,"decorative",7,!1),u=y(t,"class",7);const s=E(()=>Ea(r()));var o={get status(){return r()},set status(m){r(m),x()},get size(){return d()},set size(m=14){d(m),x()},get decorative(){return c()},set decorative(m=!1){c(m),x()},get class(){return u()},set class(m){u(m),x()},$set:nt,$on:(m,w)=>st(t,m,w)},v=ln(),_=N(v);{var b=m=>{var w=cn();W(m,w)},A=m=>{wt(m,{get icon(){return e(s).icon},class:"size-full!"})};re(_,m=>{e(s).visual==="dot"?m(b):e(s).icon&&m(A,1)})}return T(v),X(m=>{Pe(v,1,m,"svelte-14zk5l0"),pt(v,`width: ${d()??""}px; height: ${d()??""}px;`),$(v,"role",c()?void 0:"img"),$(v,"aria-label",c()?void 0:e(s).accessibleName),$(v,"aria-hidden",c()?"true":void 0),$(v,"title",c()?void 0:e(s).tooltip),$(v,"data-workspace-status",e(s).state),$(v,"data-workspace-status-visual",e(s).visual),$(v,"data-workspace-status-icon",e(s).icon?.iconName)},[()=>Xa($a("workspace-status-icon inline-flex shrink-0 items-center justify-center forced-colors:text-[CanvasText]",e(s).className,u()))]),W(a,v),it(o)}const Gt=6e4,Yt=60*Gt,Zt=24*Yt,da=30*Zt;function dn(a,t=new Date){if(a==null)return null;const r=a instanceof Date?a:new Date(a),d=r.getTime(),c=t.getTime();if(!Number.isFinite(d)||!Number.isFinite(c))return null;const u=Math.max(0,c-d);let s;u<Gt?s="<1m":u<Yt?s=`${Ve(Math.floor(u/Gt))}m`:u<Zt?s=`${Ve(Math.floor(u/Yt))}h`:u<da?s=`${Ve(Math.floor(u/Zt))}d`:s=`${Ve(Math.floor(u/da))}mo`;const o=d>c?t:r,v=wr(o,{now:t});return v?{compact:s,accessible:v,dateTime:r.toISOString()}:null}var un=B('<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=B('<p class="type-caption mt-1 min-w-0 line-clamp-3 text-muted-foreground" data-workspace-hover-card-summary=""> </p>'),pn=B('<span class="shrink-0 text-muted-foreground" data-workspace-hover-card-question-meta=""><span aria-hidden="true"> </span></span>'),mn=B('<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=B('<div role="listitem"><!></div>'),gn=B('<div class="type-caption mt-3 flex items-center justify-between text-muted-foreground" data-workspace-hover-card-overflow=""><span> </span> <!></div>'),vn=B('<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=B('<!> <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=B('<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=B('<div class="type-caption mt-3 flex items-center justify-between text-muted-foreground" data-workspace-hover-card-pr-overflow=""><span> </span> <!></div>'),_n=B('<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=B('<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=B('<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=B('<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 rt({component:An,...a});ot(t,!0);const r=()=>Jt(F,"$workspaceAgents$",c),d=()=>Jt(i,"$prMonitors$",c),[c,u]=Va(),s=Tr("WorkspaceHoverCard");let o=y(t,"workspace",7),v=y(t,"isLoading",7,!1),_=y(t,"activeAgentIds",23,()=>[]),b=y(t,"loadAgentSessions",7,!0),A=y(t,"onkeydown",7),m=y(t,"staticData",7,!1);const w=Ht("");function q(){return m()?Ht([]):er(w)}function V(){return m()?Ht([]):tr(w)}const F=q(),i=V();yt(()=>w.set(o()?.id??""));let p=oe(0);ya(()=>Qt.subscribe(()=>Ka(p)));let k=E(()=>o()?.agentSummary?.agentIds??[]),P=E(()=>(e(p),o()?Qt.getStreamingAgentIdsForWorkspace(o().id):[])),U=null,K=new Set;yt(()=>{if(!o()||!b())return;const l=String(o().id);U!==l&&(U=l,K=new Set);for(const M of new Set([...e(k).slice(0,6),..._(),...e(P)]))K.has(M)||(we.dispatch(_r(l,M)),K.add(M))});function ne(l){return[l.name,l.context,l.questionMeta?.accessible,l.updated.accessible].filter(Boolean).join(". ")}function Le(l){return l?l.kind==="attention"?l.attention.reason?.trim()||null:"text"in l&&l.text.trim()||null:null}function le(l){return dn(l.lastActivity||l.updatedAt||l.createdAt)??{compact:"—",accessible:C.workspace_hoverCard_noRecentActivity_label()}}function ie(l){const M=String(l.status).toLowerCase(),L=yr(l),Q=lr(l),ye=Q==="question"?gr(l):null,he=Le(rr.select(we.state,String(l.id)));let xe,Ne,Ae,n,f,H,S=!1;if(Q==="question"){xe="attention",Ne="question",Ae=ye?.questions[0]?.question.trim()||he||C.workspace_hoverCard_question_label(),n="question",f=1;const G=ye?.questions.length??0;G>1&&(H={compact:`${Ve(1)}/${Ve(G)}`,accessible:C.chat_questionWizard_stepCounter_label({current:1,total:G})})}else if(Q==="attention-discussion")xe="attention",Ne="discussion",Ae=L?.reason?.trim()||C.chat_agentCard_attentionDiscussion_label(),n="attention-discussion",f=1;else if(Q==="attention-blocker"||M==="blocked")xe="attention",Ne="blocker",Ae=L?.reason?.trim()||C.chat_agentCard_attentionBlocker_label(),n="attention-blocker",f=0;else if(l.hasUnread)xe="attention",Ne="unread",Ae=he||C.chat_newMessagesDivider_label(),S=!!he,n="unread",f=2;else if(l.isStreaming||l.isProcessing||_().includes(String(l.id))||e(P).includes(String(l.id))||["active","busy","processing","responding","running","streaming","in_progress"].includes(M))xe="active",Ae=he||C.workspace_devScripts_running_label(),S=!!he,n=l.isProcessing?"responding":"running",f=3;else if(["waiting","pending","queued","starting"].includes(M))xe="waiting",Ae=he||C.workspace_taskStatus_waiting_label(),S=!!he,n="waiting",f=4;else return null;const Y=l.agentMetadata??l.metadata;return{id:String(l.id),name:l.name?.trim()||C.workspace_fileChanges_agent_label(),group:xe,attentionKind:Ne,avatarState:n,specialist:Y?.specialist,context:Ae,questionMeta:H,contextIsPreview:S,updated:le(l),priority:f}}let ge=E(()=>{const l=o()?.agentSummary,M=new Map;if(Array.isArray(l?.agents))for(const L of l.agents)L&&typeof L=="object"&&typeof L.id=="string"&&M.set(L.id,L.parentAgentId);return r().filter(L=>{const Q=M.get(String(L.id));return!(kr(L)!=="topLevel"||typeof Q=="string"&&Q||L.pendingDeleteAt||L.retiredAt||String(L.status).toLowerCase()==="deleted")})}),_e=E(()=>e(ge).map(ie).filter(l=>l!==null).sort((l,M)=>l.priority-M.priority)),Ge=E(()=>e(_e).slice(0,6)),I=E(()=>Math.max(0,e(_e).length-6)),ee=E(()=>o()?.repositoryName?o().repositoryOwner?`${o().repositoryOwner} / ${o().repositoryName}`:o().repositoryName:C.workspace_hoverCard_localRepository_label()),Re=E(()=>on(o()??{})),ve=E(()=>Ea(e(Re))),ce=E(()=>o()?.statusMessage?.trim()||"");function ke(l){if(!l)return null;const M=l.activePullRequest??l.pullRequests?.[0]??null;return M||(l.prStatus?{id:`legacy-pr-${l.prNumber??"workspace"}`,number:l.prNumber??0,url:l.prUrl??"",title:C.workspace_hoverCard_pullRequest_label(),status:l.prStatus,createdAt:l.updatedAt,updatedAt:l.updatedAt}:null)}let We=E(()=>o()?m()?ke(o()):nr.select(we.state,o().id)??ke(o()):null),de=E(()=>{if(!o()||ar(o()))return[];const l=o().repositoryOwner&&o().repositoryName?`${o().repositoryOwner}/${o().repositoryName}`:void 0;return cr({workspacePRs:o().pullRequests,activePR:e(We),monitors:d(),workspaceRepo:l,buildPrUrl:(M,L)=>Vr(M,o().repositoryOwner,o().repositoryName,L),getDisplayTitle:M=>M.title})}),Ze=E(()=>e(de).slice(0,3)),Te=E(()=>Math.max(0,e(de).length-3)),se=E(()=>e(_e).length>0),qe=E(()=>e(de).length>0),h=E(()=>e(se)||e(qe));function g(l){const M=l.resource?.repository.provider==="gitlab"?`${l.repo} !${l.number}`:l.repo?C.workspace_card_prBadge_repoLine_tooltip({repo:l.repo,number:l.number}):C.workspace_card_prBadge_label({number:` #${l.number}`});return[sr(M,l),l.title,l.details].filter(Boolean).join(`
|
|
3
|
+
`)}function J(l,M){if(l.stopPropagation(),!o()||!b())return;const L=o().id;Br.select(we.state)!==L&&Fr(L).catch(Q=>{s.warn("Failed to switch workspace for hover-card agent",{agentId:M,error:Q})}),we.dispatch(xr(L,{agentId:M}))}function D(l,M){if(l.stopPropagation(),!o()||!M.url)return;const L=o().id;ka(async()=>{const{handleLink:Q}=await import("./BR9y4bsr.js").then(ye=>ye.H);return{handleLink:Q}},__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,57,58,59,60,61,62,63,64,65,66,67,68,69]),import.meta.url).then(({handleLink:Q})=>Q(M.url,{workspaceId:L,event:l}))}var ae={get workspace(){return o()},set workspace(l){o(l),x()},get isLoading(){return v()},set isLoading(l=!1){v(l),x()},get activeAgentIds(){return _()},set activeAgentIds(l=[]){_(l),x()},get loadAgentSessions(){return b()},set loadAgentSessions(l=!0){b(l),x()},get onkeydown(){return A()},set onkeydown(l){A(l),x()},get staticData(){return m()},set staticData(l=!1){m(l),x()},$set:nt,$on:(l,M)=>st(t,l,M)},ue=xn(),j=N(ue);{var Ie=l=>{var M=un(),L=N(M),Q=N(L),ye=N(Q);ut(ye,{class:"h-7 min-w-0 max-w-64 flex-1"});var he=z(ye,2);ut(he,{class:"h-5 w-20 shrink-0"}),T(Q);var xe=z(Q,2);ut(xe,{class:"h-4 w-40"});var Ne=z(xe,2);ut(Ne,{class:"mt-2 h-10 w-full"}),T(L);var Ae=z(L,4),n=N(Ae),f=N(n);ut(f,{class:"h-10 w-full"}),T(n);var H=z(n,2),S=N(H);ut(S,{class:"h-10 w-full"}),T(H),T(Ae),T(M),W(l,M)},Fe=l=>{var M=yn(),L=Ee(M);let Q;var ye=N(L),he=N(ye),xe=N(he),Ne=me(xe,!0),Ae=z(xe,2),n=N(Ae),f=me(n,!0),H=z(n);Pa(H,{get status(){return e(Re)},size:16,decorative:!0}),T(Ae),T(he);var S=z(he,2),Y=me(S,!0),G=z(S,2);{var te=pe=>{var ze=fn(),It=me(ze,!0);tt(ze,(Mt,Pt)=>Bt?.(Mt,Pt),()=>e(ce)),X(()=>be(It,e(ce))),W(pe,ze)};re(G,pe=>{e(ce)&&pe(te)})}T(ye),T(L);var He=z(L,2);{var fe=pe=>{var ze=kn(),It=z(Ee(ze),2),Mt=N(It);{var Pt=Je=>{var Ke=vn(),Ye=N(Ke);Ut(Ye,21,()=>e(Ge),Z=>Z.id,(Z,R)=>{var Me=ua(),Qe=N(Me);{let Xe=E(()=>ne(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 A()},onclick:je=>J(je,e(R).id),children:(je,mt)=>{var Oe=mn(),Ce=Ee(Oe),Ue=N(Ce);{let et=E(()=>e(R).specialist??null);dr(Ue,{get agentId(){return e(R).id},variant:"compact",get state(){return e(R).avatarState},get specialist(){return e(et)}})}T(Ce);var ct=z(Ce),Lt=me(ct,!0),$e=z(ct),Wt=me($e,!0),gt=z($e,2),vt=N(gt),Nt=me(vt,!0);tt(vt,(et,lt)=>Bt?.(et,lt),()=>e(R).context);var Oa=z(vt);{var qa=et=>{var lt=pn(),Da=N(lt),za=me(Da,!0);T(lt),X(()=>{$(lt,"aria-label",e(R).questionMeta.accessible),be(za,e(R).questionMeta.compact)}),W(et,lt)};re(Oa,et=>{e(R).questionMeta&&et(qa)})}T(gt),X(()=>{be(Lt,e(R).name),$($e,"datetime",e(R).updated.dateTime),$($e,"aria-label",e(R).updated.accessible),be(Wt,e(R).updated.compact),$(gt,"data-workspace-hover-card-agent-preview",e(R).contextIsPreview||void 0),be(Nt,e(R).context)}),W(je,Oe)},$$slots:{default:!0}})}T(Me),W(Z,Me)}),T(Ye);var Tt=z(Ye,2);{var Ft=Z=>{var R=gn(),Me=N(R),Qe=me(Me,!0),Xe=z(Me,2);wt(Xe,{get icon(){return ra},size:10}),T(R),X(je=>be(Qe,je),[()=>C.workspace_hoverCard_moreAgents_label({count:Ve(e(I))})]),W(Z,R)};re(Tt,Z=>{e(I)&&Z(Ft)})}T(Ke),X(Z=>$(Ke,"aria-label",Z),[()=>C.workspace_multiSelectSidebar_agentsTab_label()]),W(Je,Ke)};re(Mt,Je=>{e(se)&&Je(Pt)})}var Na=z(Mt,2);{var Ha=Je=>{var Ke=_n(),Ye=N(Ke);Ut(Ye,21,()=>e(Ze),Z=>Z.identity,(Z,R)=>{var Me=ua();{const mt=Oe=>{var Ce=hn(),Ue=Ee(Ce);wt(Ue,{get icon(){return e(R).statusIcon},size:16,get class(){return`shrink-0 justify-self-start ${e(R).foregroundClass??""}`}});var ct=z(Ue,2),Lt=me(ct,!0),$e=z(ct,2),Wt=me($e,!0),gt=z($e,2),vt=me(gt,!0);X(Nt=>{be(Lt,Nt),be(Wt,e(R).accessibleStateLabel),be(vt,e(R).numberLabel??`#${e(R).number}`)},[()=>e(R).title||(e(R).resource?.repository.provider==="gitlab"?C.workspace_hoverCard_mergeRequest_label():C.workspace_hoverCard_pullRequest_label())]),W(Oe,Ce)};var Qe=N(Me);{var Xe=Oe=>{{let Ce=E(()=>g(e(R)));jt(Oe,{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(Ce)},"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 A()},onclick:Ue=>D(Ue,e(R)),children:(Ue,ct)=>{mt(Ue)},$$slots:{default:!0}})}},je=Oe=>{var Ce=bn(),Ue=N(Ce);mt(Ue),T(Ce),X(()=>{$(Ce,"data-pr-identity",e(R).identity),$(Ce,"data-pr-status",e(R).status)}),W(Oe,Ce)};re(Qe,Oe=>{e(R).url?Oe(Xe):Oe(je,-1)})}T(Me)}X(mt=>$(Me,"aria-label",mt),[()=>e(R).url?void 0:g(e(R))]),W(Z,Me)}),T(Ye);var Tt=z(Ye,2);{var Ft=Z=>{var R=wn(),Me=N(R),Qe=me(Me,!0),Xe=z(Me,2);wt(Xe,{get icon(){return ra},size:10}),T(R),X(je=>be(Qe,je),[()=>C.workspace_hoverCard_moreItems_label({count:Ve(e(Te))})]),W(Z,R)};re(Tt,Z=>{e(Te)&&Z(Ft)})}T(Ke),X((Z,R)=>{$(Ke,"aria-label",Z),$(Ye,"aria-label",R)},[()=>e(de).every(Z=>Z.resource?.repository.provider==="gitlab")?C.workspace_hoverCard_mergeRequests_label():e(de).some(Z=>Z.resource?.repository.provider==="gitlab")?C.workspace_hoverCard_reviews_label():C.workspace_hoverCard_pullRequests_label(),()=>e(de).every(Z=>Z.resource?.repository.provider==="gitlab")?C.workspace_hoverCard_mergeRequests_label():e(de).some(Z=>Z.resource?.repository.provider==="gitlab")?C.workspace_hoverCard_reviews_label():C.workspace_hoverCard_pullRequests_label()]),W(Je,Ke)};re(Na,Je=>{e(qe)&&Je(Ha)})}T(It),W(pe,ze)};re(He,pe=>{e(h)&&pe(fe)})}X(pe=>{Q=Pe(L,1,"min-w-0 px-5 pt-4",null,Q,{"pb-4":!e(h)}),be(Ne,pe),be(f,e(ve).label),be(Y,e(ee))},[()=>o().title||C.workspace_links_untitled_label()]),W(l,M)};re(j,l=>{v()||!o()?l(Ie):l(Fe,-1)})}T(ue),W(a,ue);var De=it(ae);return u(),De}const fa=800,Ts=175,In=300;function Mn(){let a=0,t=null;const r=new Set,d=new Set;function c(){return a>0||t!==null?0:fa}function u(){const o=c();r.forEach(v=>v(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 d.add(o),()=>d.delete(o)},settleDeferredCloses(){const o=[...d];d.clear(),o.forEach(v=>v())},reset(){const o=c()!==fa;s(),a=0,d.clear(),o&&u()}}}const Fs=Mn();function Dt(a){const t=Aa.select(we.state,a);return t!==void 0&&Cr(t)}function Cn(a,t){if(!Dt(a))return[];const r=vr.select(we.state,a),d=Xt.select(we.state,a),c=hr.select(we.state),u=[];for(let s=0;s<Ar;s+=1){const o=c[s],v=o&&o!==a?Aa.select(we.state,o):void 0;u.push({id:`assign-micro-key-${s+1}`,label:v?C.workspace_card_assignOccupiedMicroKey_label({number:Ve(s+1),title:v.title}):C.workspace_card_assignMicroKeyNumber_label({number:Ve(s+1)}),checked:r===s,closeOnSelect:!0,onClick:()=>{Dt(a)&&we.dispatch(Ir(s,a)),t()}})}return d!==null&&(u.push({type:"separator"}),u.push({id:"unassign-micro-key",label:C.workspace_card_unassignMicroKey_label(),onClick:()=>{Dt(a)&&Xt.select(we.state,a)===d&&we.dispatch(Mr(d)),t()}})),u}function Ls(a,{connected:t,onClose:r}){if(!t)return[];const d=Cn(a,r);if(d.length===0)return[];const c=d.filter(s=>"id"in s&&s.id!=="unassign-micro-key"),u=d.find(s=>"id"in s&&s.id==="unassign-micro-key");return[{id:"assign-micro-key",label:C.workspace_card_assignMicroKey_label(),icon:zr,onClick:()=>{},selection:"single",submenu:c},...u?[u]:[]]}var Sn=B('<div data-static-position="" role="tooltip"><!></div>'),pa=B('<div role="tooltip"><!></div>');function Rn(a,t){if(new.target)return rt({component:Rn,...a});ot(t,!0);let r=y(t,"id",7),d=y(t,"anchor",7),c=y(t,"position",7,"right"),u=y(t,"absolute",7,!1),s=y(t,"anchorElement",7,null),o=y(t,"staticPosition",7,!1),v=y(t,"class",7,""),_=y(t,"children",7),b=y(t,"onmouseenter",7),A=y(t,"onmouseleave",7),m=y(t,"onfocusin",7),w=y(t,"onfocusout",7);const q=$r(en()+2);tn(q);const V=an(q),F=8,i=4;let p=oe(null),k=oe(""),P=oe(void 0);const U=E(()=>c()==="bottom-right"||c()==="bottom-left"),K=E(()=>c()==="top"),ne=E(()=>o()?"relative":u()?"absolute":"fixed"),Le=E(()=>c()==="right"?{x:-4,y:0}:c()==="bottom"?{x:4,y:0}:e(K)?{x:0,y:4}:{x:0,y:-4});function le(h,g,J){return Math.max(g,Math.min(J,h))}let ie=null,ge=null;function _e(){return!ie?.isConnected||ge!==d()?!1:ie.style.getPropertyValue("anchor-name").includes(d())||getComputedStyle(ie).getPropertyValue("anchor-name").includes(d())}function Ge(){return s()?s():(_e()||(ie=Array.from(document.querySelectorAll('[style*="anchor-name"]')).find(h=>{const g=h.style.getPropertyValue("anchor-name"),J=getComputedStyle(h).getPropertyValue("anchor-name");return g.includes(d())||J.includes(d())})??null,ge=ie?d():null),ie)}function I(){if(o()||u()||!e(p))return;const h=Ge();if(!h)return;const g=h.getBoundingClientRect(),J=e(p).getBoundingClientRect(),D=window.innerWidth||document.documentElement.clientWidth,ae=window.innerHeight||document.documentElement.clientHeight,ue=J.width||e(p).offsetWidth,j=J.height||e(p).offsetHeight,Ie=Math.max(0,g.top-i-F),Fe=Math.max(0,ae-g.bottom-i-F),De=e(K)?!(Ie<j&&Fe>Ie):e(U)&&Fe<j&&Ie>Fe;let l=g.left,M=g.bottom+i,L=De?Ie:Fe;if(c()==="right"){const Q=g.left-i-F,ye=D-g.right-i-F;l=ye>=ue||ye>=Q?g.right+i:g.left-ue-i,M=g.top,L=Math.max(0,ae-F*2)}else c()==="bottom"?(l=g.left-ue-i,M=g.bottom-j):(e(K)||e(U))&&(c()==="bottom-left"?l=g.right-ue:e(K)&&(l=g.left+g.width/2-ue/2),M=De?g.top-Math.min(j,L)-i:g.bottom+i);l=le(l,F,Math.max(F,D-ue-F)),M=le(M,F,Math.max(F,ae-Math.min(j,L)-F)),O(P,`${L}px`),O(k,`left: ${l}px; top: ${M}px;`)}let ee=!1;async function Re(){ee||(ee=!0,await ja(),ee=!1,I())}let ve=null;function ce(){ve||(ve=Xr(()=>{ve=null,I()}))}function ke(h){const g=s()??(_e()?ie:null);g&&h.target instanceof Node&&!h.target.contains(g)||ce()}yt(()=>{const h=e(p),g=s();o()||u()||!h||!g||Re()}),ya(()=>{if(o())return;let h=null;return Re().then(()=>{if(!u()&&typeof ResizeObserver<"u"){h=new ResizeObserver(ce),e(p)&&h.observe(e(p));const g=Ge();g&&h.observe(g)}}),window.addEventListener("resize",ce),window.addEventListener("scroll",ke,!0),()=>{h?.disconnect(),window.removeEventListener("resize",ce),window.removeEventListener("scroll",ke,!0),ve?.(),ve=null}});var We={get id(){return r()},set id(h){r(h),x()},get anchor(){return d()},set anchor(h){d(h),x()},get position(){return c()},set position(h="right"){c(h),x()},get absolute(){return u()},set absolute(h=!1){u(h),x()},get anchorElement(){return s()},set anchorElement(h=null){s(h),x()},get staticPosition(){return o()},set staticPosition(h=!1){o(h),x()},get class(){return v()},set class(h=""){v(h),x()},get children(){return _()},set children(h){_(h),x()},get onmouseenter(){return b()},set onmouseenter(h){b(h),x()},get onmouseleave(){return A()},set onmouseleave(h){A(h),x()},get onfocusin(){return m()},set onfocusin(h){m(h),x()},get onfocusout(){return w()},set onfocusout(h){w(h),x()},$set:nt,$on:(h,g)=>st(t,h,g)},de=xt(),Ze=Ee(de);{var Te=h=>{var g=Sn(),J=N(g);Rt(J,()=>_()??Ot),T(g),at(g,D=>O(p,D),()=>e(p)),X(()=>{$(g,"id",r()),Pe(g,1,e(ne)+` z-50 w-64 flex flex-col overflow-y-auto border border-border pointer-events-auto ${V} `+v()),$(g,"data-surface-level",q)}),W(h,g)},se=h=>{var g=pa();let J;var D=N(g);Rt(D,()=>_()??Ot),T(g),at(g,ae=>O(p,ae),()=>e(p)),X(()=>{$(g,"id",r()),Pe(g,1,e(ne)+` z-50 w-64 flex flex-col border border-border pointer-events-none ${V} `+v()),$(g,"data-surface-level",q),J=pt(g,"",J,{"position-anchor":d(),right:c()==="bottom"?"anchor(left)":void 0,left:c()==="right"?"anchor(right)":e(U)?"anchor(left)":e(K)?"anchor(center)":void 0,top:c()==="right"?"anchor(top)":e(U)?"anchor(bottom)":void 0,bottom:c()==="bottom"?"anchor(bottom)":e(K)?"anchor(top)":void 0,"margin-right":c()==="bottom"?"8px":void 0,"margin-left":c()==="right"?"8px":void 0,"margin-top":e(U)?"4px":void 0,"margin-bottom":e(K)?"4px":void 0,translate:e(K)?"-50% 0":void 0})}),Be("mouseenter",g,function(...ae){b()?.apply(this,ae)}),Be("mouseleave",g,function(...ae){A()?.apply(this,ae)}),Se("focusin",g,function(...ae){m()?.apply(this,ae)}),Se("focusout",g,function(...ae){w()?.apply(this,ae)}),Ct(1,g,()=>$t,()=>({tier:"fast",...e(Le),scale:.96})),Ct(2,g,()=>ea,()=>({tier:"fast"})),W(h,g)},qe=h=>{br(h,{zIndex:50,children:(g,J)=>{var D=pa();let ae;var ue=N(D);Rt(ue,()=>_()??Ot),T(D),at(D,j=>O(p,j),()=>e(p)),X(()=>{$(D,"id",r()),Pe(D,1,e(ne)+` z-50 w-64 flex flex-col overflow-y-auto border border-border pointer-events-auto ${V} `+v()),$(D,"data-surface-level",q),ae=pt(D,e(k),ae,{"max-height":e(P)})}),Be("mouseenter",D,function(...j){b()?.apply(this,j)}),Be("mouseleave",D,function(...j){A()?.apply(this,j)}),Se("focusin",D,function(...j){m()?.apply(this,j)}),Se("focusout",D,function(...j){w()?.apply(this,j)}),Ct(1,D,()=>$t,()=>({tier:"fast",...e(Le),scale:.96})),Ct(2,D,()=>ea,()=>({tier:"fast"})),W(g,D)},$$slots:{default:!0}})};re(Ze,h=>{o()?h(Te):u()?h(se,1):h(qe,-1)})}return W(a,de),it(We)}xa(["focusin","focusout"]);function kt(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 d of r.content.querySelectorAll("img, video")){const c=d.getAttribute("src")||d.getAttribute("data-media-src")||"",u=[...d.querySelectorAll("source")];if(!kt(c,!1)||u.some(o=>!kt(o.getAttribute("src")||"",!1))){const o=document.createElement("img");o.setAttribute("alt",d.getAttribute("alt")||d.getAttribute("data-name")||""),o.setAttribute("data-media-unavailable","node-owned"),d.replaceWith(o);continue}d.removeAttribute("srcset");const s=d.getAttribute("poster");s&&!kt(s,!1)&&d.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=B("<!> <!>",1);function Ta(a,t){if(new.target)return rt({component:Ta,...a});ot(t,!0);let r=y(t,"workspaceId",7),d=y(t,"canUseMedia",7),c=oe(null),u=oe(null),s=oe(!1),o=oe(!1);function v(k){O(c,{url:k.getAttribute("src")||"",name:k.getAttribute("alt")||void 0,opener:k},!0),O(s,!0)}function _(k){const P=na(k.getAttribute("href")||"",r());return P&&d()(P)?(O(c,{url:P,name:k.textContent?.trim()||void 0,opener:k,assetLink:!0},!0),O(s,!0),!0):b(k)}function b(k){const P=_t(k.getAttribute("href")||"",r());return!P||!d()(P.url)?!1:(O(u,{url:P.url,mimeType:P.mimeType,name:k.textContent?.trim()||void 0,opener:k},!0),O(o,!0),!0)}yt(()=>{e(u)&&!_t(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 A={openImage:v,openAsset:_,get workspaceId(){return r()},set workspaceId(k){r(k),x()},get canUseMedia(){return d()},set canUseMedia(k){d(k),x()},$set:nt,$on:(k,P)=>st(t,k,P)},m=Fn(),w=Ee(m);{var q=k=>{ur(k,{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)}})},V=E(()=>e(c)&&d()(e(c).url));re(w,k=>{e(V)&&k(q)})}var F=z(w,2);{var i=k=>{Ia(k,{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)&&_t(e(u).url,r())&&d()(e(u).url));re(F,k=>{e(p)&&k(i)})}return W(a,m),it(A)}var Ln=B('<div class="flex items-center gap-2"><!> <!></div>'),Wn=Ga('<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>'),Nn=B('<div class="absolute inset-0 flex items-center justify-center bg-muted text-muted-foreground" aria-hidden="true"><!></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><svg viewBox="0 0 20 20" fill="currentColor"><path d="m7 5 7 5-7 5V5Z"></path></svg></span></span>',3),Hn=B("<div><!> <!></div>"),On=B('<div class="my-2 min-w-0 max-w-2xl" data-chat-video=""><!></div> <!>',1);function Fa(a,t){if(new.target)return rt({component:Fa,...a});ot(t,!0);let r=y(t,"source",7),d=y(t,"name",23,()=>C.chat_videoBlock_fromAgent_label()),c=y(t,"poster",7),u=y(t,"allowFileMedia",7,!0),s=y(t,"canOpenFile",7),o=y(t,"fluid",7,!1),v=y(t,"compact",7,!1),_=y(t,"compactPreview",7),b=oe(!1),A=oe(!1),m=oe(!1),w=oe(null);const q=E(()=>r().kind==="inline"?`data:${r().mimeType};base64,${r().data}`:r().url);function V(I){return kt(I,u()&&s()?.()!==!1)}const F=E(()=>!V(e(q))),i=E(()=>At(e(q))),p=E(()=>{if(!(!c()||!V(c()))){if(/^data:image\/(?:gif|jpeg|png|webp);base64,[a-z0-9+/=]+$/i.test(c()))return c();try{const I=new URL(c());return(I.protocol==="https:"||I.protocol==="workspace-file:")&&!I.username&&!I.password?c():void 0}catch{return}}});function k(){O(A,!0),O(m,!1)}var P={get source(){return r()},set source(I){r(I),x()},get name(){return d()},set name(I=C.chat_videoBlock_fromAgent_label()){d(I),x()},get poster(){return c()},set poster(I){c(I),x()},get allowFileMedia(){return u()},set allowFileMedia(I=!0){u(I),x()},get canOpenFile(){return s()},set canOpenFile(I){s(I),x()},get fluid(){return o()},set fluid(I=!1){o(I),x()},get compact(){return v()},set compact(I=!1){v(I),x()},get compactPreview(){return _()},set compactPreview(I){_(I),x()},$set:nt,$on:(I,ee)=>st(t,I,ee)},U=On(),K=Ee(U);let ne;var Le=N(K);{var le=I=>{Vt(I,{get name(){return d()},reason:"load-failed"})},ie=I=>{var ee=Ln(),Re=N(ee);{let ce=E(()=>e(i)?.path),ke=E(()=>e(i)?.workspaceId);Vt(Re,{get name(){return d()},reason:"load-failed",get path(){return e(ce)},get workspaceId(){return e(ke)}})}var ve=z(Re,2);Kt(ve,{get videoUrl(){return e(q)},get videoName(){return d()},get sourceKind(){return r().kind},get mimeType(){return r().mimeType}}),T(ee),W(I,ee)},ge=I=>{var ee=Hn();let Re;var ve=N(ee);{let We=E(()=>C.chat_videoBlock_play_ariaLabel({name:d()}));jt(ve,{wrapContent:!1,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(We)},"data-testid":"chat-video-snapshot",onclick:()=>{V(e(q))&&O(b,!0)},get ref(){return e(w)},set ref(de){O(w,de,!0)},children:(de,Ze)=>{var Te=xt(),se=Ee(Te);{var qe=g=>{var J=xt(),D=Ee(J);Rt(D,_),W(g,J)},h=g=>{var J=Nn(),D=Ee(J),ae=N(D);{var ue=l=>{var M=Wn();W(l,M)};re(ae,l=>{o()||l(ue)})}T(D);var j=z(D,2);j.muted=!0;var Ie=z(j,2),Fe=N(Ie),De=me(Fe);T(Ie),X(()=>{$(j,"src",e(q)),$(j,"poster",e(p)),Pe(j,1,`pointer-events-none absolute inset-0 size-full object-contain transition-opacity motion-reduce:transition-none ${e(p)||e(A)&&!e(m)?"opacity-100":"opacity-0"}`),Pe(Fe,1,`flex ${v()?"size-6":"size-11"} shrink-0 aspect-square 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]`),Pe(De,0,`ml-0.5 ${v()?"size-3":"size-5"}`)}),Be("loadeddata",j,k),Be("error",j,()=>O(m,!0)),W(g,J)};re(se,g=>{_()?g(qe):g(h,-1)})}W(de,Te)},$$slots:{default:!0}})}var ce=z(ve,2);{var ke=We=>{Kt(We,{get videoUrl(){return e(q)},get videoName(){return d()},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"})};re(ce,We=>{_()||We(ke)})}T(ee),X(()=>{Pe(ee,1,`group relative aspect-video w-full max-w-2xl ${o()?"max-h-72":"max-h-40"}`),Re=pt(ee,"",Re,{height:_()?"100%":void 0,width:o()?"min(100%, calc(18rem * 16 / 9))":"min(100%, calc(10rem * 16 / 9))"})}),W(I,ee)};re(Le,I=>{e(F)?I(le):e(m)?I(ie,1):I(ge,-1)})}T(K);var _e=z(K,2);{var Ge=I=>{Ia(I,{get videoUrl(){return e(q)},get videoName(){return d()},get poster(){return e(p)},get sourceKind(){return r().kind},get mimeType(){return r().mimeType},get openerElement(){return e(w)},get open(){return e(b)},set open(ee){O(b,ee,!0)}})};re(_e,I=>{!e(m)&&!e(F)&&I(Ge)})}return X(()=>ne=pt(K,"",ne,{height:_()?"100%":void 0})),W(a,U),it(P)}const qn=/^\s*!\[([^\]\n]*)\]\((?:<)?((?:intent:\/\/local\/|workspace-file:\/\/|workspace-asset:\/\/)[^)\s>]+)(?:>)?\)\s*$/,Dn=/^ {0,3}(`{3,}|~{3,})(.*)$/;function ma(a,t){if(typeof a!="string"||!a||a!==a.trim())return null;if(a.startsWith("workspace-asset://"))return _t(a,t);if(a.startsWith("workspace-file://")){const d=At(a);if(!d||d.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 zn(a,t){if(a.startsWith("workspace-file://")){const r=At(a);if(!r||r.workspaceId!==t)return!1;const d=Sa(a);return!!d&&!!Et(d,t)}return!!Et(a,t,{readOnly:!0})}function Un(a,t){return(t===0||!a[t-1].trim())&&(t===a.length-1||!a[t+1].trim())}function Bn(a,t,r){const d=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===d)})}function Vn(a,t){const r=a.split(`
|
|
4
4
|
`),d=[];let c=[];const u=()=>{const s=c.join(`
|
|
5
5
|
`);s.trim()&&d.push({type:"markdown",content:s}),c=[]};for(let s=0;s<r.length;s+=1){const o=r[s].match(Dn);if(o){const w=Bn(r,s,o[1]);if(w>s){const q=r.slice(s,w+1);if(o[2].trim()==="ws-block:video")try{const V=JSON.parse(r.slice(s+1,w).join(`
|
|
6
|
-
`)),F=ma(V?.path,t);if(F){u(),d.push({type:"video",source:F,name:typeof V.path=="string"?V.path:void 0,poster:typeof V.poster=="string"?V.poster:void 0}),s=w;continue}}catch{}c.push(...q),s=w;continue}c.push(...r.slice(s));break}const _=!/^(?: {4}|\t)/.test(r[s])&&Un(r,s)?r[s].match(qn):null;if(!_){c.push(r[s]);continue}const[,b,A]=_,m=ma(A,t);m?(u(),d.push({type:"video",source:m,name:b||void 0})):A.startsWith("workspace-asset://")&&!Kr(A)||zn(A,t)?c.push(r[s]):c.push(`[${b}](${A})`)}return u(),d}function ht(a){return Ma(a.getAttribute("src")||"")}function zt(a){return a instanceof HTMLImageElement?a:a instanceof HTMLAnchorElement?a.querySelector("img"):null}function Kn(a,t){const r=a.getBoundingClientRect(),d=t.getBoundingClientRect();return{top:r.top-d.top+6,right:d.right-r.right+6}}function ga(a,t){const r=document.activeElement;return!!(r&&(r===a||r===a?.closest("a")||t?.contains(r)))}function jn(a,t){const r=a.getAttribute("src")||"",d=At(r)?.path??Ra(r,t)?.path;if(d)return d;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 Gn(a){try{return encodeURI(a).replace(/%25/g,"%")}catch{return null}}function Yn(a){return a.startsWith("workspace-file://")?a.split(/[?#]/)[0]:a}function Zn(a,t,r){const d=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]),v=Gn(c);v&&o.add(v);for(const _ of[...o]){const b=Et(_,t);if(b&&o.add(b),r!==void 0){const A=jr(_,r);if(A){const m=Et(`intent://local/file/${A.split("/").map(encodeURIComponent).join("/")}`,t);m&&o.add(m)}}}for(const _ of o)d.has(_)||d.set(_,s)}return d}function Jn(a,t,r,d){if(!t||!a.includes("<img"))return a;const c=Zn(t,r,d);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=Yn(s[1].replace(/&/g,"&")),v=c.get(o);return v?u.replace(/\s*\/?>$/,` width="${v.width}" height="${v.height}" ${La}="">`):u})}function ha(a,t){let r=t,d,c=!1,u=!1;const s=new Map;function o(){for(const[b,{component:A,source:m}]of s)ft(A),a.contains(b)&&b.replaceWith(m);s.clear()}function v(){if(!u){for(const[b,{component:A}]of s)a.contains(b)||(ft(A),s.delete(b));if(r.enabled)for(const b of a.querySelectorAll("pre > code")){if(b.closest("[data-markdown-diagram]"))continue;const A=[...b.classList].find(F=>F.startsWith("language-"))?.slice(9);let m;if(A==="mermaid")m="mermaid";else if(A==="diagram"||A==="ws-block:diagram")m="diagram";else if(A==="ws-block")try{if(JSON.parse(b.textContent??"").type!=="diagram")continue;m="diagram"}catch{continue}else continue;const w=b.parentElement;if(!w)continue;if(!d){c||(c=!0,ka(()=>import("./BLiGayBi.js"),__vite__mapDeps([70,2,1,3,71,52,72,54,16,9,11,12,13,14,4,15,17,29,23,8,10,7,55,20,21,22,56,6,53,50,19,18,24,45,32,42,40,51,57,58,59,60,61,62,63,73,74,0,5,25,26,27,28,30,31,33,34,35,36,37,38,39,41,43,44,46,47,48,49,64,65,66,67,68,69,75,76,77,78,79,80,81,82]),import.meta.url).then(F=>{d=F.default,c=!1,v()}).catch(F=>{c=!1,bt.error("Failed to load the Markdown diagram renderer",{error:F})}));return}const q=document.createElement("div");q.dataset.markdownDiagram=m,w.replaceWith(q);const V=St(d,{target:q,context:r.context,props:{kind:m,source:b.textContent??"",workspaceId:r.workspaceId}});s.set(q,{component:V,source:w})}}}const _=new MutationObserver(v);return _.observe(a,{childList:!0,subtree:!0}),queueMicrotask(v),{update(b){(r.enabled!==b.enabled||r.workspaceId!==b.workspaceId)&&o(),r=b,v()},destroy(){u=!0,_.disconnect(),o()}}}var Qn=B('<span class="min-w-0 max-w-full truncate"> </span>'),Xn=B('<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 rt({component:Wa,...a});ot(t,!0);let r=y(t,"name",7);var d={get name(){return r()},set name(m){r(m),x()},$set:nt,$on:(m,w)=>st(t,m,w)},c=Xn(),u=N(c),s=N(u);wt(s,{get icon(){return Ur},class:"size-3.5"}),T(u);var o=z(u,2),v=N(o),_=me(v,!0),b=z(v,2);{var A=m=>{var w=Qn(),q=me(w,!0);tt(w,(V,F)=>Bt?.(V,F),r),X(()=>be(q,r())),W(m,w)};re(b,m=>{r()&&m(A)})}return T(o),T(c),X(m=>be(_,m),[()=>C.ui_mediaLoadingPlaceholder_title_label()]),W(a,c),it(d)}const ba="markdown-image-frame";function $n(a,t){const r=new Map,d=new Map,c=new Map,u=[300,1e3];let s=!1;function o(i){let p=d.get(i);return p||(p={source:i.getAttribute("src")||"",workspaceId:t.getWorkspaceId(),retries:0,failureHandled:!1},d.set(i,p)),p}function v(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 _(i,p=!1){if(!v(i))return;const k=o(i),P=sa(k.source);if(!P)return;const U=k.fallbackHost,K=U?.contains(document.activeElement)??!1;if(k.failureHandled=!1,k.fallbackHost=void 0,p&&(k.retries=0),i.removeAttribute("src"),i.setAttribute("src",P),U){const ne=r.get(U);ne&&ft(ne),r.delete(U),U.replaceWith(i),q(),K&&a.contains(i)&&i.focus()}}function b(i){const p=o(i);s||!a.contains(i)||p.failureHandled||(p.failureHandled=!0,v(i)&&p.retries<u.length?p.timer=setTimeout(()=>{p.timer=void 0,_(i)},u[p.retries++]):w(i,"load-failed"))}function A(i){const p=i.parentElement;return p?.classList.contains(ba)?p:null}function m(i){const p=Number(i.getAttribute("width")),k=Number(i.getAttribute("height"));if(!(p>0&&k>0))return;const P=document.createElement("span");P.className=ba,P.style.aspectRatio=`${p} / ${k}`,P.style.setProperty("--image-aspect-ratio",`${p} / ${k}`),P.style.width=`min(${p}px, 100%)`,P.dataset.loaded="false",i.replaceWith(P),P.appendChild(i);const U=P.appendChild(document.createElement("span"));U.className="markdown-image-frame-placeholder",r.set(U,St(Wa,{target:U,props:{name:jn(i,t.getWorkspaceId())}}));const K=()=>{if(c.delete(i),s||!a.contains(P))return;P.dataset.loaded="true";const ne=r.get(U);ne&&(ft(ne),r.delete(U)),U.remove()};i.complete&&i.naturalWidth>0?K():(c.set(i,K),i.addEventListener("load",K,{once:!0}))}function w(i,p){const k=i.getAttribute("src")||i.getAttribute("data-media-src")||"",P=At(k),U=Ra(k,t.getWorkspaceId()),K=P?.path??U?.path,ne=P?.workspaceId??U?.workspaceId,Le=i.getAttribute("data-name")||i.getAttribute("alt")||K?.split("/").pop()||void 0,le=document.createElement(i instanceof HTMLVideoElement?"div":"span");le.className="media-unavailable-host",(A(i)??i).replaceWith(le),t.onMediaRemoved(i);let ie;if(i instanceof HTMLImageElement&&p==="load-failed"){const _e=o(i);_e.fallbackHost=le,v(i)&&(ie=()=>_(i,!0))}const ge=St(Vt,{target:le,props:{name:Le,reason:p,path:K,workspaceId:ne,onRetry:ie}});if(r.set(le,ge),i instanceof HTMLVideoElement){le.classList.add("flex","items-center","gap-2");const _e=le.appendChild(document.createElement("span"));r.set(_e,St(Kt,{target:_e,props:{videoUrl:k,videoName:Le,sourceKind:"workspace",mimeType:_t(k,t.getWorkspaceId())?.mimeType}}))}}function q(){if(!s){for(const i of a.querySelectorAll("img"))ht(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)&&!A(i)&&m(i),i.getAttribute("src")&&i.complete&&i.naturalWidth===0&&b(i));for(const i of a.querySelectorAll("[data-media-unsupported]"))w(i,"unsupported");for(const i of a.querySelectorAll("[data-media-unavailable]"))w(i,Gr(i));for(const[i,p]of d)a.contains(p.fallbackHost??i)||(p.timer!==void 0&&clearTimeout(p.timer),d.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)||(ft(p),r.delete(i))}}function V(i){const p=i.target;(p instanceof HTMLImageElement||p instanceof HTMLVideoElement)&&(p instanceof HTMLImageElement?b(p):w(p,"load-failed"))}const F=new MutationObserver(q);return F.observe(a,{childList:!0,subtree:!0}),a.addEventListener("error",V,!0),queueMicrotask(q),{destroy(){s=!0,F.disconnect();for(const i of d.values())i.timer!==void 0&&clearTimeout(i.timer);d.clear();for(const[i,p]of c)i.removeEventListener("load",p);c.clear(),a.removeEventListener("error",V,!0);for(const i of r.values())ft(i);r.clear()}}}var es=B('<div class="image-actions-overlay absolute z-10 svelte-nzvuq5" data-testid="markdown-image-actions-overlay"><!></div>'),ts=B("<div></div>"),wa=B('<div role="group"><!> <!></div>'),as=B('<div><p class="whitespace-pre-wrap svelte-nzvuq5"> </p></div>'),rs=B("<!> <!>",1);function _a(a,t){if(new.target)return rt({component:_a,...a});ot(t,!0);const r=n=>{var f=xt(),H=Ee(f);{var S=G=>{var te=es(),He=N(te);{let fe=E(()=>e(se).getAttribute("src")||""),pe=E(()=>e(se).getAttribute("alt")||void 0);at(fr(He,{get imageUrl(){return e(fe)},get imageName(){return e(pe)},get open(){return e(h)},set open(ze){O(h,ze,!0)}}),ze=>O(g,ze,!0),()=>e(g))}T(te),at(te,fe=>O(J,fe),()=>e(J)),X(()=>pt(te,`top: ${e(qe).top??""}px; right: ${e(qe).right??""}px;`)),W(G,te)},Y=E(()=>e(se)&&ge(e(se).getAttribute("src")||""));re(H,G=>{e(Y)&&G(S)})}W(n,f)};let d=y(t,"content",7),c=y(t,"isStreaming",7,!1),u=y(t,"className",7,""),s=y(t,"workspaceId",23,()=>ca()?.workspaceId??void 0),o=y(t,"relativeMediaBase",7),v=y(t,"onCodeBlockAction",7),_=y(t,"onFileClick",7),b=y(t,"canOpenFile",7),A=y(t,"allowFileMedia",7,!0),m=y(t,"taskBlockRenderMode",7,"placeholder"),w=y(t,"chatImageThumbnails",7,!1),q=y(t,"forceExternalLinks",7,!1),V=y(t,"renderRichFencesAsCode",7,!1),F=y(t,"renderDiagrams",7,!1),i=y(t,"allowSanitizedHtml",7,!1),p=y(t,"media",7);const k=Yr(),P=Ya(),U=E(()=>Vn(d(),s())),K=E(()=>e(U).some(n=>n.type==="video")),ne=E(()=>!e(K)&&e(U).length===1&&e(U)[0].type==="markdown"?e(U)[0].content:d()),Le=E(()=>Tn(e(ne)));let le=oe(null),ie=oe("");function ge(n){return kt(n,A()&&b()?.()!==!1)}const _e=E(()=>En(e(ie),A()&&b()?.()!==!1)),Ge=E(()=>pr(e(_e),s(),mr)),I=E(()=>`<div class="markdown-content">${e(Ge)}</div>`);let ee=0;const Re=150;let ve=-1/0,ce=null,ke=null;async function We(n,f,H,S){try{const Y=await Zr(n,{...f,readOnly:!0});if(S!==ee)return;O(ie,Jn(Y,H,f?.workspaceId,f?.relativeMediaBase),!0)}catch(Y){if(S!==ee)return;bt.error("Failed to process markdown:",Y);const G=n.replace(/[&<>"']/g,te=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[te]||te);O(ie,`<p>${G}</p>`)}}function de(){if(!ke)return;const n=Re-(performance.now()-ve);if(n>0){ce=setTimeout(()=>{ce=null,de()},n);return}const f=ke;ke=null,ve=performance.now(),f()}function Ze(){ce!==null&&(clearTimeout(ce),ce=null),ke=null,ve=-1/0}yt(()=>{const n=e(ne),f={allowEmpty:!0,skipIfHTML:!1,preserveAnchors:!0,taskBlockRenderMode:m(),workspaceId:s(),relativeMediaBase:o()??(s()&&s()!==Sr?"":void 0),renderRichFencesAsCode:V()||F(),processPrimitives:!F(),allowSanitizedHtml:i(),renderMath:!c(),workspaceFileVersion:k},H=p(),S=++ee,Y=()=>void We(n,f,H,S);c()?(ke=Y,ce===null&&de()):(Ze(),Y())});let Te=oe(void 0),se=oe(null),qe=oe(Za({top:0,right:0})),h=oe(!1),g=oe(void 0),J=oe(null);function D(n){if(n.type==="mouseover"&&ga(e(se),e(J)))return;const f=n.target,H=zt(f);if(H&&ht(H)&&ge(H.getAttribute("src")||"")){if(e(se)===H)return;O(se,H,!0),O(qe,Kn(H,n.currentTarget),!0)}else if(e(se)&&!e(h)){if(f instanceof Node&&e(J)?.contains(f))return;O(se,null)}}function ae(){!e(h)&&!ga(e(se),e(J))&&O(se,null)}function ue(n){const f=zt(n.target);!f||!ht(f)||!ge(f.getAttribute("src")||"")||(n.preventDefault(),n.stopPropagation(),D(n),O(h,!0))}function j(n){return $n(n,{getWorkspaceId:()=>s(),canUseMedia:ge,onMediaRemoved:f=>{e(se)===f&&O(se,null)}})}function Ie(n){const f=n.target,H=f.closest("a");if(!H&&f instanceof HTMLImageElement){const Y=f.getAttribute("src")||"";if(Ma(Y)&&ge(Y)){n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation(),e(Te)?.openImage(f);return}}if(H?.href){if(n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation(),e(Te)?.openAsset(H))return;const Y=l(n),G=s()?ta(s()):void 0;ia(H.href,{workspaceId:G,canOpenFile:b(),sourcePanelId:Y,event:n,rawHref:H.getAttribute("href")??void 0,...q()?{forceExternal:!0}:{}});return}const S=Jr(f.closest("[data-mention]"));if(S){const{type:Y,meta:G}=S;if(Y==="file"&&S.filePath){if(b()?.()===!1)return;n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation();const te=S.filePath;bt.debug("[MarkdownViewer] File mention clicked",{filePath:te,meta:G});const He=l(n),fe=qt({event:n});if(_())_()(te,{line:S.line,openInAdjacentPanel:fe,sourcePanelId:He});else{const pe=s();pe&&we.dispatch(Rr(pe,te,{line:S.line,openInAdjacentPanel:fe,sourcePanelId:He}))}}else if(S.folderPath!==void 0){if(b()?.()===!1||!s())return;n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation(),we.dispatch(Er(s(),Qr(S.folderPath)))}else if(Y==="note"&&S.note){n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation();const te=S.note.id;bt.debug("[MarkdownViewer] Note mention clicked",{noteId:te,meta:G});const He=l(n),fe=qt({event:n});if(S.note.workspaceId&&S.note.workspaceId!==s()){ia(ir(te,S.note.workspaceId),{workspaceId:s()?ta(s()):void 0,sourcePanelId:He,event:n});return}const pe=s();pe&&we.dispatch(Pr(pe,te,{openInAdjacentPanel:fe,sourcePanelId:He}))}}}function Fe(n){if(De(n),!n.defaultPrevented){if(n.target instanceof HTMLImageElement&&ht(n.target)&&(n.key==="Enter"||n.key===" ")){Ie(n);return}n.key!=="Enter"||!qt({event:n})||Ie(n)}}function De(n){const f=zt(n.target);!f||!ht(f)||!ge(f.getAttribute("src")||"")||e(g)?.handleCopy(n,f.getAttribute("src")||"")}function l(n){const f=n.target;if(f instanceof HTMLElement)return f.closest("[data-panel-id]")?.dataset.panelId}Ja(()=>{ee+=1,Ze()});var M={get content(){return d()},set content(n){d(n),x()},get isStreaming(){return c()},set isStreaming(n=!1){c(n),x()},get className(){return u()},set className(n=""){u(n),x()},get workspaceId(){return s()},set workspaceId(n=ca()?.workspaceId??void 0){s(n),x()},get relativeMediaBase(){return o()},set relativeMediaBase(n){o(n),x()},get onCodeBlockAction(){return v()},set onCodeBlockAction(n){v(n),x()},get onFileClick(){return _()},set onFileClick(n){_(n),x()},get canOpenFile(){return b()},set canOpenFile(n){b(n),x()},get allowFileMedia(){return A()},set allowFileMedia(n=!0){A(n),x()},get taskBlockRenderMode(){return m()},set taskBlockRenderMode(n="placeholder"){m(n),x()},get chatImageThumbnails(){return w()},set chatImageThumbnails(n=!1){w(n),x()},get forceExternalLinks(){return q()},set forceExternalLinks(n=!1){q(n),x()},get renderRichFencesAsCode(){return V()},set renderRichFencesAsCode(n=!1){V(n),x()},get renderDiagrams(){return F()},set renderDiagrams(n=!1){F(n),x()},get allowSanitizedHtml(){return i()},set allowSanitizedHtml(n=!1){i(n),x()},get media(){return p()},set media(n){p(n),x()},$set:nt,$on:(n,f)=>st(t,n,f)},L=rs(),Q=Ee(L);{var ye=n=>{var f=ts();Ut(f,21,()=>e(U),Qa,(H,S)=>{var Y=xt(),G=Ee(Y);{var te=fe=>{Fa(fe,{get allowFileMedia(){return A()},get canOpenFile(){return b()},get source(){return e(S).source},get name(){return e(S).name},get poster(){return e(S).poster}})},He=fe=>{_a(fe,{get content(){return e(S).content},get isStreaming(){return c()},get workspaceId(){return s()},get relativeMediaBase(){return o()},get onCodeBlockAction(){return v()},get onFileClick(){return _()},get canOpenFile(){return b()},get allowFileMedia(){return A()},get taskBlockRenderMode(){return m()},get chatImageThumbnails(){return w()},get forceExternalLinks(){return q()},get renderRichFencesAsCode(){return V()},get renderDiagrams(){return F()},get allowSanitizedHtml(){return i()},get media(){return p()}})};re(G,fe=>{e(S).type==="video"?fe(te):fe(He,-1)})}W(H,Y)}),T(f),X(()=>Pe(f,1,`markdown-video-segments ${u()??""}`,"svelte-nzvuq5")),W(n,f)},he=n=>{var f=wa();let H;var S=N(f);oa(S,()=>e(I));var Y=z(S,2);r(Y),T(f),tt(f,G=>j?.(G)),tt(f,(G,te)=>ha?.(G,te),()=>({enabled:F(),workspaceId:s(),context:P})),X(()=>H=Pe(f,1,`markdown-viewer streaming-content ${u()??""}`,"svelte-nzvuq5",H,{"chat-image-thumbnails":w()})),Se("click",f,Ie),Se("keydown",f,Fe),Be("copy",f,De),Se("contextmenu",f,ue),Se("mouseover",f,D),Se("focusin",f,D),Be("mouseleave",f,ae),W(n,f)},xe=n=>{var f=as(),H=N(f),S=me(H,!0);T(f),X(()=>{Pe(f,1,`markdown-viewer simple-content ${u()??""}`,"svelte-nzvuq5"),be(S,e(ne))}),W(n,f)},Ne=n=>{var f=wa();let H;var S=N(f);oa(S,()=>e(I));var Y=z(S,2);r(Y),T(f),at(f,G=>O(le,G),()=>e(le)),tt(f,G=>j?.(G)),tt(f,(G,te)=>ha?.(G,te),()=>({enabled:F(),workspaceId:s(),context:P})),X(()=>H=Pe(f,1,`markdown-viewer static-content ${u()??""}`,"svelte-nzvuq5",H,{"chat-image-thumbnails":w()})),Se("click",f,Ie),Se("keydown",f,Fe),Be("copy",f,De),Se("contextmenu",f,ue),Se("mouseover",f,D),Se("focusin",f,D),Be("mouseleave",f,ae),W(n,f)};re(Q,n=>{e(K)?n(ye):c()?n(he,1):e(Le)==="simple"&&!i()?n(xe,2):n(Ne,-1)})}var Ae=z(Q,2);return at(Ta(Ae,{get workspaceId(){return s()},canUseMedia:ge}),n=>O(Te,n,!0),()=>e(Te)),W(a,L),it(M)}xa(["click","keydown","contextmenu","mouseover","focusin"]);class Ws{constructor(t){dt(this,"container");dt(this,"previousFocus",null);dt(this,"firstFocusable",null);dt(this,"lastFocusable",null);dt(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 Ns(a,t){const r=_=>{const b=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(_);return b?{r:parseInt(b[1],16),g:parseInt(b[2],16),b:parseInt(b[3],16)}:null},d=_=>{const[b,A,m]=[_.r,_.g,_.b].map(w=>(w=w/255,w<=.03928?w/12.92:Math.pow((w+.055)/1.055,2.4)));return .2126*b+.7152*A+.0722*m},c=r(a),u=r(t);if(!c||!u)return bt.warn("Invalid color values for contrast check",{foreground:a,background:t}),{ratio:0,passes:{aa:!1,aaa:!1}};const s=d(c),o=d(u),v=(Math.max(s,o)+.05)/(Math.min(s,o)+.05);return{ratio:v,passes:{aa:v>=4.5,aaa:v>=7}}}export{Fa as C,Ws as F,Rn as H,_a as M,Ts as W,Wa as a,fa as b,An as c,Pa as d,Ns as e,Cn as f,Ls as g,Ea as h,on as r,Vn as s,Fs as w};
|
|
6
|
+
`)),F=ma(V?.path,t);if(F){u(),d.push({type:"video",source:F,name:typeof V.path=="string"?V.path:void 0,poster:typeof V.poster=="string"?V.poster:void 0}),s=w;continue}}catch{}c.push(...q),s=w;continue}c.push(...r.slice(s));break}const _=!/^(?: {4}|\t)/.test(r[s])&&Un(r,s)?r[s].match(qn):null;if(!_){c.push(r[s]);continue}const[,b,A]=_,m=ma(A,t);m?(u(),d.push({type:"video",source:m,name:b||void 0})):A.startsWith("workspace-asset://")&&!Kr(A)||zn(A,t)?c.push(r[s]):c.push(`[${b}](${A})`)}return u(),d}function ht(a){return Ma(a.getAttribute("src")||"")}function zt(a){return a instanceof HTMLImageElement?a:a instanceof HTMLAnchorElement?a.querySelector("img"):null}function Kn(a,t){const r=a.getBoundingClientRect(),d=t.getBoundingClientRect();return{top:r.top-d.top+6,right:d.right-r.right+6}}function ga(a,t){const r=document.activeElement;return!!(r&&(r===a||r===a?.closest("a")||t?.contains(r)))}function jn(a,t){const r=a.getAttribute("src")||"",d=At(r)?.path??Ra(r,t)?.path;if(d)return d;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 Gn(a){try{return encodeURI(a).replace(/%25/g,"%")}catch{return null}}function Yn(a){return a.startsWith("workspace-file://")?a.split(/[?#]/)[0]:a}function Zn(a,t,r){const d=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]),v=Gn(c);v&&o.add(v);for(const _ of[...o]){const b=Et(_,t);if(b&&o.add(b),r!==void 0){const A=jr(_,r);if(A){const m=Et(`intent://local/file/${A.split("/").map(encodeURIComponent).join("/")}`,t);m&&o.add(m)}}}for(const _ of o)d.has(_)||d.set(_,s)}return d}function Jn(a,t,r,d){if(!t||!a.includes("<img"))return a;const c=Zn(t,r,d);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=Yn(s[1].replace(/&/g,"&")),v=c.get(o);return v?u.replace(/\s*\/?>$/,` width="${v.width}" height="${v.height}" ${La}="">`):u})}function ha(a,t){let r=t,d,c=!1,u=!1;const s=new Map;function o(){for(const[b,{component:A,source:m}]of s)ft(A),a.contains(b)&&b.replaceWith(m);s.clear()}function v(){if(!u){for(const[b,{component:A}]of s)a.contains(b)||(ft(A),s.delete(b));if(r.enabled)for(const b of a.querySelectorAll("pre > code")){if(b.closest("[data-markdown-diagram]"))continue;const A=[...b.classList].find(F=>F.startsWith("language-"))?.slice(9);let m;if(A==="mermaid")m="mermaid";else if(A==="diagram"||A==="ws-block:diagram")m="diagram";else if(A==="ws-block")try{if(JSON.parse(b.textContent??"").type!=="diagram")continue;m="diagram"}catch{continue}else continue;const w=b.parentElement;if(!w)continue;if(!d){c||(c=!0,ka(()=>import("./Bw0E8NsL.js"),__vite__mapDeps([70,2,1,3,71,52,72,54,16,9,11,12,13,14,4,15,17,29,23,8,10,7,55,20,21,22,56,6,53,50,19,18,24,45,32,42,40,51,57,58,59,60,61,62,63,73,74,0,5,25,26,27,28,30,31,33,34,35,36,37,38,39,41,43,44,46,47,48,49,64,65,66,67,68,69,75,76,77,78,79,80,81,82]),import.meta.url).then(F=>{d=F.default,c=!1,v()}).catch(F=>{c=!1,bt.error("Failed to load the Markdown diagram renderer",{error:F})}));return}const q=document.createElement("div");q.dataset.markdownDiagram=m,w.replaceWith(q);const V=St(d,{target:q,context:r.context,props:{kind:m,source:b.textContent??"",workspaceId:r.workspaceId}});s.set(q,{component:V,source:w})}}}const _=new MutationObserver(v);return _.observe(a,{childList:!0,subtree:!0}),queueMicrotask(v),{update(b){(r.enabled!==b.enabled||r.workspaceId!==b.workspaceId)&&o(),r=b,v()},destroy(){u=!0,_.disconnect(),o()}}}var Qn=B('<span class="min-w-0 max-w-full truncate"> </span>'),Xn=B('<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 rt({component:Wa,...a});ot(t,!0);let r=y(t,"name",7);var d={get name(){return r()},set name(m){r(m),x()},$set:nt,$on:(m,w)=>st(t,m,w)},c=Xn(),u=N(c),s=N(u);wt(s,{get icon(){return Ur},class:"size-3.5"}),T(u);var o=z(u,2),v=N(o),_=me(v,!0),b=z(v,2);{var A=m=>{var w=Qn(),q=me(w,!0);tt(w,(V,F)=>Bt?.(V,F),r),X(()=>be(q,r())),W(m,w)};re(b,m=>{r()&&m(A)})}return T(o),T(c),X(m=>be(_,m),[()=>C.ui_mediaLoadingPlaceholder_title_label()]),W(a,c),it(d)}const ba="markdown-image-frame";function $n(a,t){const r=new Map,d=new Map,c=new Map,u=[300,1e3];let s=!1;function o(i){let p=d.get(i);return p||(p={source:i.getAttribute("src")||"",workspaceId:t.getWorkspaceId(),retries:0,failureHandled:!1},d.set(i,p)),p}function v(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 _(i,p=!1){if(!v(i))return;const k=o(i),P=sa(k.source);if(!P)return;const U=k.fallbackHost,K=U?.contains(document.activeElement)??!1;if(k.failureHandled=!1,k.fallbackHost=void 0,p&&(k.retries=0),i.removeAttribute("src"),i.setAttribute("src",P),U){const ne=r.get(U);ne&&ft(ne),r.delete(U),U.replaceWith(i),q(),K&&a.contains(i)&&i.focus()}}function b(i){const p=o(i);s||!a.contains(i)||p.failureHandled||(p.failureHandled=!0,v(i)&&p.retries<u.length?p.timer=setTimeout(()=>{p.timer=void 0,_(i)},u[p.retries++]):w(i,"load-failed"))}function A(i){const p=i.parentElement;return p?.classList.contains(ba)?p:null}function m(i){const p=Number(i.getAttribute("width")),k=Number(i.getAttribute("height"));if(!(p>0&&k>0))return;const P=document.createElement("span");P.className=ba,P.style.aspectRatio=`${p} / ${k}`,P.style.setProperty("--image-aspect-ratio",`${p} / ${k}`),P.style.width=`min(${p}px, 100%)`,P.dataset.loaded="false",i.replaceWith(P),P.appendChild(i);const U=P.appendChild(document.createElement("span"));U.className="markdown-image-frame-placeholder",r.set(U,St(Wa,{target:U,props:{name:jn(i,t.getWorkspaceId())}}));const K=()=>{if(c.delete(i),s||!a.contains(P))return;P.dataset.loaded="true";const ne=r.get(U);ne&&(ft(ne),r.delete(U)),U.remove()};i.complete&&i.naturalWidth>0?K():(c.set(i,K),i.addEventListener("load",K,{once:!0}))}function w(i,p){const k=i.getAttribute("src")||i.getAttribute("data-media-src")||"",P=At(k),U=Ra(k,t.getWorkspaceId()),K=P?.path??U?.path,ne=P?.workspaceId??U?.workspaceId,Le=i.getAttribute("data-name")||i.getAttribute("alt")||K?.split("/").pop()||void 0,le=document.createElement(i instanceof HTMLVideoElement?"div":"span");le.className="media-unavailable-host",(A(i)??i).replaceWith(le),t.onMediaRemoved(i);let ie;if(i instanceof HTMLImageElement&&p==="load-failed"){const _e=o(i);_e.fallbackHost=le,v(i)&&(ie=()=>_(i,!0))}const ge=St(Vt,{target:le,props:{name:Le,reason:p,path:K,workspaceId:ne,onRetry:ie}});if(r.set(le,ge),i instanceof HTMLVideoElement){le.classList.add("flex","items-center","gap-2");const _e=le.appendChild(document.createElement("span"));r.set(_e,St(Kt,{target:_e,props:{videoUrl:k,videoName:Le,sourceKind:"workspace",mimeType:_t(k,t.getWorkspaceId())?.mimeType}}))}}function q(){if(!s){for(const i of a.querySelectorAll("img"))ht(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)&&!A(i)&&m(i),i.getAttribute("src")&&i.complete&&i.naturalWidth===0&&b(i));for(const i of a.querySelectorAll("[data-media-unsupported]"))w(i,"unsupported");for(const i of a.querySelectorAll("[data-media-unavailable]"))w(i,Gr(i));for(const[i,p]of d)a.contains(p.fallbackHost??i)||(p.timer!==void 0&&clearTimeout(p.timer),d.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)||(ft(p),r.delete(i))}}function V(i){const p=i.target;(p instanceof HTMLImageElement||p instanceof HTMLVideoElement)&&(p instanceof HTMLImageElement?b(p):w(p,"load-failed"))}const F=new MutationObserver(q);return F.observe(a,{childList:!0,subtree:!0}),a.addEventListener("error",V,!0),queueMicrotask(q),{destroy(){s=!0,F.disconnect();for(const i of d.values())i.timer!==void 0&&clearTimeout(i.timer);d.clear();for(const[i,p]of c)i.removeEventListener("load",p);c.clear(),a.removeEventListener("error",V,!0);for(const i of r.values())ft(i);r.clear()}}}var es=B('<div class="image-actions-overlay absolute z-10 svelte-nzvuq5" data-testid="markdown-image-actions-overlay"><!></div>'),ts=B("<div></div>"),wa=B('<div role="group"><!> <!></div>'),as=B('<div><p class="whitespace-pre-wrap svelte-nzvuq5"> </p></div>'),rs=B("<!> <!>",1);function _a(a,t){if(new.target)return rt({component:_a,...a});ot(t,!0);const r=n=>{var f=xt(),H=Ee(f);{var S=G=>{var te=es(),He=N(te);{let fe=E(()=>e(se).getAttribute("src")||""),pe=E(()=>e(se).getAttribute("alt")||void 0);at(fr(He,{get imageUrl(){return e(fe)},get imageName(){return e(pe)},get open(){return e(h)},set open(ze){O(h,ze,!0)}}),ze=>O(g,ze,!0),()=>e(g))}T(te),at(te,fe=>O(J,fe),()=>e(J)),X(()=>pt(te,`top: ${e(qe).top??""}px; right: ${e(qe).right??""}px;`)),W(G,te)},Y=E(()=>e(se)&&ge(e(se).getAttribute("src")||""));re(H,G=>{e(Y)&&G(S)})}W(n,f)};let d=y(t,"content",7),c=y(t,"isStreaming",7,!1),u=y(t,"className",7,""),s=y(t,"workspaceId",23,()=>ca()?.workspaceId??void 0),o=y(t,"relativeMediaBase",7),v=y(t,"onCodeBlockAction",7),_=y(t,"onFileClick",7),b=y(t,"canOpenFile",7),A=y(t,"allowFileMedia",7,!0),m=y(t,"taskBlockRenderMode",7,"placeholder"),w=y(t,"chatImageThumbnails",7,!1),q=y(t,"forceExternalLinks",7,!1),V=y(t,"renderRichFencesAsCode",7,!1),F=y(t,"renderDiagrams",7,!1),i=y(t,"allowSanitizedHtml",7,!1),p=y(t,"media",7);const k=Yr(),P=Ya(),U=E(()=>Vn(d(),s())),K=E(()=>e(U).some(n=>n.type==="video")),ne=E(()=>!e(K)&&e(U).length===1&&e(U)[0].type==="markdown"?e(U)[0].content:d()),Le=E(()=>Tn(e(ne)));let le=oe(null),ie=oe("");function ge(n){return kt(n,A()&&b()?.()!==!1)}const _e=E(()=>En(e(ie),A()&&b()?.()!==!1)),Ge=E(()=>pr(e(_e),s(),mr)),I=E(()=>`<div class="markdown-content">${e(Ge)}</div>`);let ee=0;const Re=150;let ve=-1/0,ce=null,ke=null;async function We(n,f,H,S){try{const Y=await Zr(n,{...f,readOnly:!0});if(S!==ee)return;O(ie,Jn(Y,H,f?.workspaceId,f?.relativeMediaBase),!0)}catch(Y){if(S!==ee)return;bt.error("Failed to process markdown:",Y);const G=n.replace(/[&<>"']/g,te=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[te]||te);O(ie,`<p>${G}</p>`)}}function de(){if(!ke)return;const n=Re-(performance.now()-ve);if(n>0){ce=setTimeout(()=>{ce=null,de()},n);return}const f=ke;ke=null,ve=performance.now(),f()}function Ze(){ce!==null&&(clearTimeout(ce),ce=null),ke=null,ve=-1/0}yt(()=>{const n=e(ne),f={allowEmpty:!0,skipIfHTML:!1,preserveAnchors:!0,taskBlockRenderMode:m(),workspaceId:s(),relativeMediaBase:o()??(s()&&s()!==Sr?"":void 0),renderRichFencesAsCode:V()||F(),processPrimitives:!F(),allowSanitizedHtml:i(),renderMath:!c(),workspaceFileVersion:k},H=p(),S=++ee,Y=()=>void We(n,f,H,S);c()?(ke=Y,ce===null&&de()):(Ze(),Y())});let Te=oe(void 0),se=oe(null),qe=oe(Za({top:0,right:0})),h=oe(!1),g=oe(void 0),J=oe(null);function D(n){if(n.type==="mouseover"&&ga(e(se),e(J)))return;const f=n.target,H=zt(f);if(H&&ht(H)&&ge(H.getAttribute("src")||"")){if(e(se)===H)return;O(se,H,!0),O(qe,Kn(H,n.currentTarget),!0)}else if(e(se)&&!e(h)){if(f instanceof Node&&e(J)?.contains(f))return;O(se,null)}}function ae(){!e(h)&&!ga(e(se),e(J))&&O(se,null)}function ue(n){const f=zt(n.target);!f||!ht(f)||!ge(f.getAttribute("src")||"")||(n.preventDefault(),n.stopPropagation(),D(n),O(h,!0))}function j(n){return $n(n,{getWorkspaceId:()=>s(),canUseMedia:ge,onMediaRemoved:f=>{e(se)===f&&O(se,null)}})}function Ie(n){const f=n.target,H=f.closest("a");if(!H&&f instanceof HTMLImageElement){const Y=f.getAttribute("src")||"";if(Ma(Y)&&ge(Y)){n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation(),e(Te)?.openImage(f);return}}if(H?.href){if(n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation(),e(Te)?.openAsset(H))return;const Y=l(n),G=s()?ta(s()):void 0;ia(H.href,{workspaceId:G,canOpenFile:b(),sourcePanelId:Y,event:n,rawHref:H.getAttribute("href")??void 0,...q()?{forceExternal:!0}:{}});return}const S=Jr(f.closest("[data-mention]"));if(S){const{type:Y,meta:G}=S;if(Y==="file"&&S.filePath){if(b()?.()===!1)return;n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation();const te=S.filePath;bt.debug("[MarkdownViewer] File mention clicked",{filePath:te,meta:G});const He=l(n),fe=qt({event:n});if(_())_()(te,{line:S.line,openInAdjacentPanel:fe,sourcePanelId:He});else{const pe=s();pe&&we.dispatch(Rr(pe,te,{line:S.line,openInAdjacentPanel:fe,sourcePanelId:He}))}}else if(S.folderPath!==void 0){if(b()?.()===!1||!s())return;n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation(),we.dispatch(Er(s(),Qr(S.folderPath)))}else if(Y==="note"&&S.note){n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation();const te=S.note.id;bt.debug("[MarkdownViewer] Note mention clicked",{noteId:te,meta:G});const He=l(n),fe=qt({event:n});if(S.note.workspaceId&&S.note.workspaceId!==s()){ia(ir(te,S.note.workspaceId),{workspaceId:s()?ta(s()):void 0,sourcePanelId:He,event:n});return}const pe=s();pe&&we.dispatch(Pr(pe,te,{openInAdjacentPanel:fe,sourcePanelId:He}))}}}function Fe(n){if(De(n),!n.defaultPrevented){if(n.target instanceof HTMLImageElement&&ht(n.target)&&(n.key==="Enter"||n.key===" ")){Ie(n);return}n.key!=="Enter"||!qt({event:n})||Ie(n)}}function De(n){const f=zt(n.target);!f||!ht(f)||!ge(f.getAttribute("src")||"")||e(g)?.handleCopy(n,f.getAttribute("src")||"")}function l(n){const f=n.target;if(f instanceof HTMLElement)return f.closest("[data-panel-id]")?.dataset.panelId}Ja(()=>{ee+=1,Ze()});var M={get content(){return d()},set content(n){d(n),x()},get isStreaming(){return c()},set isStreaming(n=!1){c(n),x()},get className(){return u()},set className(n=""){u(n),x()},get workspaceId(){return s()},set workspaceId(n=ca()?.workspaceId??void 0){s(n),x()},get relativeMediaBase(){return o()},set relativeMediaBase(n){o(n),x()},get onCodeBlockAction(){return v()},set onCodeBlockAction(n){v(n),x()},get onFileClick(){return _()},set onFileClick(n){_(n),x()},get canOpenFile(){return b()},set canOpenFile(n){b(n),x()},get allowFileMedia(){return A()},set allowFileMedia(n=!0){A(n),x()},get taskBlockRenderMode(){return m()},set taskBlockRenderMode(n="placeholder"){m(n),x()},get chatImageThumbnails(){return w()},set chatImageThumbnails(n=!1){w(n),x()},get forceExternalLinks(){return q()},set forceExternalLinks(n=!1){q(n),x()},get renderRichFencesAsCode(){return V()},set renderRichFencesAsCode(n=!1){V(n),x()},get renderDiagrams(){return F()},set renderDiagrams(n=!1){F(n),x()},get allowSanitizedHtml(){return i()},set allowSanitizedHtml(n=!1){i(n),x()},get media(){return p()},set media(n){p(n),x()},$set:nt,$on:(n,f)=>st(t,n,f)},L=rs(),Q=Ee(L);{var ye=n=>{var f=ts();Ut(f,21,()=>e(U),Qa,(H,S)=>{var Y=xt(),G=Ee(Y);{var te=fe=>{Fa(fe,{get allowFileMedia(){return A()},get canOpenFile(){return b()},get source(){return e(S).source},get name(){return e(S).name},get poster(){return e(S).poster}})},He=fe=>{_a(fe,{get content(){return e(S).content},get isStreaming(){return c()},get workspaceId(){return s()},get relativeMediaBase(){return o()},get onCodeBlockAction(){return v()},get onFileClick(){return _()},get canOpenFile(){return b()},get allowFileMedia(){return A()},get taskBlockRenderMode(){return m()},get chatImageThumbnails(){return w()},get forceExternalLinks(){return q()},get renderRichFencesAsCode(){return V()},get renderDiagrams(){return F()},get allowSanitizedHtml(){return i()},get media(){return p()}})};re(G,fe=>{e(S).type==="video"?fe(te):fe(He,-1)})}W(H,Y)}),T(f),X(()=>Pe(f,1,`markdown-video-segments ${u()??""}`,"svelte-nzvuq5")),W(n,f)},he=n=>{var f=wa();let H;var S=N(f);oa(S,()=>e(I));var Y=z(S,2);r(Y),T(f),tt(f,G=>j?.(G)),tt(f,(G,te)=>ha?.(G,te),()=>({enabled:F(),workspaceId:s(),context:P})),X(()=>H=Pe(f,1,`markdown-viewer streaming-content ${u()??""}`,"svelte-nzvuq5",H,{"chat-image-thumbnails":w()})),Se("click",f,Ie),Se("keydown",f,Fe),Be("copy",f,De),Se("contextmenu",f,ue),Se("mouseover",f,D),Se("focusin",f,D),Be("mouseleave",f,ae),W(n,f)},xe=n=>{var f=as(),H=N(f),S=me(H,!0);T(f),X(()=>{Pe(f,1,`markdown-viewer simple-content ${u()??""}`,"svelte-nzvuq5"),be(S,e(ne))}),W(n,f)},Ne=n=>{var f=wa();let H;var S=N(f);oa(S,()=>e(I));var Y=z(S,2);r(Y),T(f),at(f,G=>O(le,G),()=>e(le)),tt(f,G=>j?.(G)),tt(f,(G,te)=>ha?.(G,te),()=>({enabled:F(),workspaceId:s(),context:P})),X(()=>H=Pe(f,1,`markdown-viewer static-content ${u()??""}`,"svelte-nzvuq5",H,{"chat-image-thumbnails":w()})),Se("click",f,Ie),Se("keydown",f,Fe),Be("copy",f,De),Se("contextmenu",f,ue),Se("mouseover",f,D),Se("focusin",f,D),Be("mouseleave",f,ae),W(n,f)};re(Q,n=>{e(K)?n(ye):c()?n(he,1):e(Le)==="simple"&&!i()?n(xe,2):n(Ne,-1)})}var Ae=z(Q,2);return at(Ta(Ae,{get workspaceId(){return s()},canUseMedia:ge}),n=>O(Te,n,!0),()=>e(Te)),W(a,L),it(M)}xa(["click","keydown","contextmenu","mouseover","focusin"]);class Ws{constructor(t){dt(this,"container");dt(this,"previousFocus",null);dt(this,"firstFocusable",null);dt(this,"lastFocusable",null);dt(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 Ns(a,t){const r=_=>{const b=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(_);return b?{r:parseInt(b[1],16),g:parseInt(b[2],16),b:parseInt(b[3],16)}:null},d=_=>{const[b,A,m]=[_.r,_.g,_.b].map(w=>(w=w/255,w<=.03928?w/12.92:Math.pow((w+.055)/1.055,2.4)));return .2126*b+.7152*A+.0722*m},c=r(a),u=r(t);if(!c||!u)return bt.warn("Invalid color values for contrast check",{foreground:a,background:t}),{ratio:0,passes:{aa:!1,aaa:!1}};const s=d(c),o=d(u),v=(Math.max(s,o)+.05)/(Math.min(s,o)+.05);return{ratio:v,passes:{aa:v>=4.5,aaa:v>=7}}}export{Fa as C,Ws as F,Rn as H,_a as M,Ts as W,Wa as a,fa as b,An as c,Pa as d,Ns as e,Cn as f,Ls as g,Ea as h,on as r,Vn as s,Fs as w};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{e as Ie}from"./Cifu9mi9.js";import{aZ as Me,U as Be,V as Ve,a_ as Ye,b as d,X as Ot,ay as de,B as Fe,h as Ue,al as je,o as Nt,b5 as ze,aV as me,aW as Jt,bi as We,z as te,n as pe}from"./Dt_3gVf3.js";var jt=(function(){var t=d(function(_t,m,x,E){for(x=x||{},E=_t.length;E--;x[_t[E]]=m);return x},"o"),e=[1,24],a=[1,25],i=[1,26],u=[1,27],r=[1,28],n=[1,63],l=[1,64],s=[1,65],h=[1,66],y=[1,67],p=[1,68],g=[1,69],v=[1,29],w=[1,30],N=[1,31],O=[1,32],P=[1,33],I=[1,34],X=[1,35],q=[1,36],H=[1,37],Q=[1,38],K=[1,39],G=[1,40],Z=[1,41],J=[1,42],$=[1,43],tt=[1,44],et=[1,45],nt=[1,46],st=[1,47],at=[1,48],rt=[1,50],it=[1,51],ot=[1,52],lt=[1,53],ct=[1,54],ut=[1,55],ht=[1,56],dt=[1,57],pt=[1,58],ft=[1,59],yt=[1,60],kt=[14,42],Xt=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Pt=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],S=[1,82],T=[1,83],k=[1,84],C=[1,85],R=[12,14,42],oe=[12,14,33,42],Bt=[12,14,33,42,76,77,79,80],xt=[12,33],qt=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Ht={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:d(function(m,x,E,_,D,o,Dt){var f=o.length-1;switch(D){case 3:_.setDirection("TB");break;case 4:_.setDirection("BT");break;case 5:_.setDirection("RL");break;case 6:_.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:_.setC4Type(o[f-3]);break;case 19:_.setTitle(o[f].substring(6)),this.$=o[f].substring(6);break;case 20:_.setAccDescription(o[f].substring(15)),this.$=o[f].substring(15);break;case 21:this.$=o[f].trim(),_.setTitle(this.$);break;case 22:case 23:this.$=o[f].trim(),_.setAccDescription(this.$);break;case 28:o[f].splice(2,0,"ENTERPRISE"),_.addPersonOrSystemBoundary(...o[f]),this.$=o[f];break;case 29:o[f].splice(2,0,"SYSTEM"),_.addPersonOrSystemBoundary(...o[f]),this.$=o[f];break;case 30:_.addPersonOrSystemBoundary(...o[f]),this.$=o[f];break;case 31:o[f].splice(2,0,"CONTAINER"),_.addContainerBoundary(...o[f]),this.$=o[f];break;case 32:_.addDeploymentNode("node",...o[f]),this.$=o[f];break;case 33:_.addDeploymentNode("nodeL",...o[f]),this.$=o[f];break;case 34:_.addDeploymentNode("nodeR",...o[f]),this.$=o[f];break;case 35:_.popBoundaryParseStack();break;case 39:_.addPersonOrSystem("person",...o[f]),this.$=o[f];break;case 40:_.addPersonOrSystem("external_person",...o[f]),this.$=o[f];break;case 41:_.addPersonOrSystem("system",...o[f]),this.$=o[f];break;case 42:_.addPersonOrSystem("system_db",...o[f]),this.$=o[f];break;case 43:_.addPersonOrSystem("system_queue",...o[f]),this.$=o[f];break;case 44:_.addPersonOrSystem("external_system",...o[f]),this.$=o[f];break;case 45:_.addPersonOrSystem("external_system_db",...o[f]),this.$=o[f];break;case 46:_.addPersonOrSystem("external_system_queue",...o[f]),this.$=o[f];break;case 47:_.addContainer("container",...o[f]),this.$=o[f];break;case 48:_.addContainer("container_db",...o[f]),this.$=o[f];break;case 49:_.addContainer("container_queue",...o[f]),this.$=o[f];break;case 50:_.addContainer("external_container",...o[f]),this.$=o[f];break;case 51:_.addContainer("external_container_db",...o[f]),this.$=o[f];break;case 52:_.addContainer("external_container_queue",...o[f]),this.$=o[f];break;case 53:_.addComponent("component",...o[f]),this.$=o[f];break;case 54:_.addComponent("component_db",...o[f]),this.$=o[f];break;case 55:_.addComponent("component_queue",...o[f]),this.$=o[f];break;case 56:_.addComponent("external_component",...o[f]),this.$=o[f];break;case 57:_.addComponent("external_component_db",...o[f]),this.$=o[f];break;case 58:_.addComponent("external_component_queue",...o[f]),this.$=o[f];break;case 60:_.addRel("rel",...o[f]),this.$=o[f];break;case 61:_.addRel("birel",...o[f]),this.$=o[f];break;case 62:_.addRel("rel_u",...o[f]),this.$=o[f];break;case 63:_.addRel("rel_d",...o[f]),this.$=o[f];break;case 64:_.addRel("rel_l",...o[f]),this.$=o[f];break;case 65:_.addRel("rel_r",...o[f]),this.$=o[f];break;case 66:_.addRel("rel_b",...o[f]),this.$=o[f];break;case 67:o[f].splice(0,1),_.addRel("rel",...o[f]),this.$=o[f];break;case 68:_.updateElStyle("update_el_style",...o[f]),this.$=o[f];break;case 69:_.updateRelStyle("update_rel_style",...o[f]),this.$=o[f];break;case 70:_.updateLayoutConfig("update_layout_config",...o[f]),this.$=o[f];break;case 71:this.$=[o[f]];break;case 72:o[f].unshift(o[f-1]),this.$=o[f];break;case 73:case 75:this.$=o[f].trim();break;case 74:let vt={};vt[o[f-1].trim()]=o[f].trim(),this.$=vt;break;case 76:this.$="";break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:e,23:a,24:i,26:u,28:r,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:p,41:g,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:X,51:q,52:H,53:Q,54:K,55:G,56:Z,57:J,58:$,59:tt,60:et,61:nt,62:st,63:at,64:rt,65:it,66:ot,67:lt,68:ct,69:ut,70:ht,71:dt,72:pt,73:ft,74:yt},{13:70,19:20,20:21,21:22,22:e,23:a,24:i,26:u,28:r,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:p,41:g,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:X,51:q,52:H,53:Q,54:K,55:G,56:Z,57:J,58:$,59:tt,60:et,61:nt,62:st,63:at,64:rt,65:it,66:ot,67:lt,68:ct,69:ut,70:ht,71:dt,72:pt,73:ft,74:yt},{13:71,19:20,20:21,21:22,22:e,23:a,24:i,26:u,28:r,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:p,41:g,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:X,51:q,52:H,53:Q,54:K,55:G,56:Z,57:J,58:$,59:tt,60:et,61:nt,62:st,63:at,64:rt,65:it,66:ot,67:lt,68:ct,69:ut,70:ht,71:dt,72:pt,73:ft,74:yt},{13:72,19:20,20:21,21:22,22:e,23:a,24:i,26:u,28:r,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:p,41:g,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:X,51:q,52:H,53:Q,54:K,55:G,56:Z,57:J,58:$,59:tt,60:et,61:nt,62:st,63:at,64:rt,65:it,66:ot,67:lt,68:ct,69:ut,70:ht,71:dt,72:pt,73:ft,74:yt},{13:73,19:20,20:21,21:22,22:e,23:a,24:i,26:u,28:r,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:p,41:g,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:X,51:q,52:H,53:Q,54:K,55:G,56:Z,57:J,58:$,59:tt,60:et,61:nt,62:st,63:at,64:rt,65:it,66:ot,67:lt,68:ct,69:ut,70:ht,71:dt,72:pt,73:ft,74:yt},{14:[1,74]},t(kt,[2,13],{43:23,29:49,30:61,32:62,20:75,34:n,36:l,37:s,38:h,39:y,40:p,41:g,44:v,45:w,46:N,47:O,48:P,49:I,50:X,51:q,52:H,53:Q,54:K,55:G,56:Z,57:J,58:$,59:tt,60:et,61:nt,62:st,63:at,64:rt,65:it,66:ot,67:lt,68:ct,69:ut,70:ht,71:dt,72:pt,73:ft,74:yt}),t(kt,[2,14]),t(Xt,[2,16],{12:[1,76]}),t(kt,[2,36],{12:[1,77]}),t(Pt,[2,19]),t(Pt,[2,20]),{25:[1,78]},{27:[1,79]},t(Pt,[2,23]),{35:80,75:81,76:S,77:T,79:k,80:C},{35:86,75:81,76:S,77:T,79:k,80:C},{35:87,75:81,76:S,77:T,79:k,80:C},{35:88,75:81,76:S,77:T,79:k,80:C},{35:89,75:81,76:S,77:T,79:k,80:C},{35:90,75:81,76:S,77:T,79:k,80:C},{35:91,75:81,76:S,77:T,79:k,80:C},{35:92,75:81,76:S,77:T,79:k,80:C},{35:93,75:81,76:S,77:T,79:k,80:C},{35:94,75:81,76:S,77:T,79:k,80:C},{35:95,75:81,76:S,77:T,79:k,80:C},{35:96,75:81,76:S,77:T,79:k,80:C},{35:97,75:81,76:S,77:T,79:k,80:C},{35:98,75:81,76:S,77:T,79:k,80:C},{35:99,75:81,76:S,77:T,79:k,80:C},{35:100,75:81,76:S,77:T,79:k,80:C},{35:101,75:81,76:S,77:T,79:k,80:C},{35:102,75:81,76:S,77:T,79:k,80:C},{35:103,75:81,76:S,77:T,79:k,80:C},{35:104,75:81,76:S,77:T,79:k,80:C},t(R,[2,59]),{35:105,75:81,76:S,77:T,79:k,80:C},{35:106,75:81,76:S,77:T,79:k,80:C},{35:107,75:81,76:S,77:T,79:k,80:C},{35:108,75:81,76:S,77:T,79:k,80:C},{35:109,75:81,76:S,77:T,79:k,80:C},{35:110,75:81,76:S,77:T,79:k,80:C},{35:111,75:81,76:S,77:T,79:k,80:C},{35:112,75:81,76:S,77:T,79:k,80:C},{35:113,75:81,76:S,77:T,79:k,80:C},{35:114,75:81,76:S,77:T,79:k,80:C},{35:115,75:81,76:S,77:T,79:k,80:C},{20:116,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:p,41:g,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:X,51:q,52:H,53:Q,54:K,55:G,56:Z,57:J,58:$,59:tt,60:et,61:nt,62:st,63:at,64:rt,65:it,66:ot,67:lt,68:ct,69:ut,70:ht,71:dt,72:pt,73:ft,74:yt},{12:[1,118],33:[1,117]},{35:119,75:81,76:S,77:T,79:k,80:C},{35:120,75:81,76:S,77:T,79:k,80:C},{35:121,75:81,76:S,77:T,79:k,80:C},{35:122,75:81,76:S,77:T,79:k,80:C},{35:123,75:81,76:S,77:T,79:k,80:C},{35:124,75:81,76:S,77:T,79:k,80:C},{35:125,75:81,76:S,77:T,79:k,80:C},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},t(kt,[2,15]),t(Xt,[2,17],{21:22,19:130,22:e,23:a,24:i,26:u,28:r}),t(kt,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:e,23:a,24:i,26:u,28:r,34:n,36:l,37:s,38:h,39:y,40:p,41:g,44:v,45:w,46:N,47:O,48:P,49:I,50:X,51:q,52:H,53:Q,54:K,55:G,56:Z,57:J,58:$,59:tt,60:et,61:nt,62:st,63:at,64:rt,65:it,66:ot,67:lt,68:ct,69:ut,70:ht,71:dt,72:pt,73:ft,74:yt}),t(Pt,[2,21]),t(Pt,[2,22]),t(R,[2,39]),t(oe,[2,71],{75:81,35:132,76:S,77:T,79:k,80:C}),t(Bt,[2,73]),{78:[1,133]},t(Bt,[2,75]),t(Bt,[2,76]),t(R,[2,40]),t(R,[2,41]),t(R,[2,42]),t(R,[2,43]),t(R,[2,44]),t(R,[2,45]),t(R,[2,46]),t(R,[2,47]),t(R,[2,48]),t(R,[2,49]),t(R,[2,50]),t(R,[2,51]),t(R,[2,52]),t(R,[2,53]),t(R,[2,54]),t(R,[2,55]),t(R,[2,56]),t(R,[2,57]),t(R,[2,58]),t(R,[2,60]),t(R,[2,61]),t(R,[2,62]),t(R,[2,63]),t(R,[2,64]),t(R,[2,65]),t(R,[2,66]),t(R,[2,67]),t(R,[2,68]),t(R,[2,69]),t(R,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},t(xt,[2,28]),t(xt,[2,29]),t(xt,[2,30]),t(xt,[2,31]),t(xt,[2,32]),t(xt,[2,33]),t(xt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},t(Xt,[2,18]),t(kt,[2,38]),t(oe,[2,72]),t(Bt,[2,74]),t(R,[2,24]),t(R,[2,35]),t(qt,[2,25]),t(qt,[2,26],{12:[1,138]}),t(qt,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:d(function(m,x){if(x.recoverable)this.trace(m);else{var E=new Error(m);throw E.hash=x,E}},"parseError"),parse:d(function(m){var x=this,E=[0],_=[],D=[null],o=[],Dt=this.table,f="",vt=0,le=0,De=2,ce=1,Ne=o.slice.call(arguments,1),A=Object.create(this.lexer),Et={yy:{}};for(var Qt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Qt)&&(Et.yy[Qt]=this.yy[Qt]);A.setInput(m,Et.yy),Et.yy.lexer=A,Et.yy.parser=this,typeof A.yylloc>"u"&&(A.yylloc={});var Kt=A.yylloc;o.push(Kt);var Ae=A.options&&A.options.ranges;typeof Et.yy.parseError=="function"?this.parseError=Et.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Le(B){E.length=E.length-2*B,D.length=D.length-B,o.length=o.length-B}d(Le,"popStack");function ue(){var B;return B=_.pop()||A.lex()||ce,typeof B!="number"&&(B instanceof Array&&(_=B,B=_.pop()),B=x.symbols_[B]||B),B}d(ue,"lex");for(var M,St,V,Gt,Ct={},Yt,z,he,Ft;;){if(St=E[E.length-1],this.defaultActions[St]?V=this.defaultActions[St]:((M===null||typeof M>"u")&&(M=ue()),V=Dt[St]&&Dt[St][M]),typeof V>"u"||!V.length||!V[0]){var Zt="";Ft=[];for(Yt in Dt[St])this.terminals_[Yt]&&Yt>De&&Ft.push("'"+this.terminals_[Yt]+"'");A.showPosition?Zt="Parse error on line "+(vt+1)+`:
|
|
1
|
+
import{e as Ie}from"./D62BIRhv.js";import{aZ as Me,U as Be,V as Ve,a_ as Ye,b as d,X as Ot,ay as de,B as Fe,h as Ue,al as je,o as Nt,b5 as ze,aV as me,aW as Jt,bi as We,z as te,n as pe}from"./DEo5mzFE.js";var jt=(function(){var t=d(function(_t,m,x,E){for(x=x||{},E=_t.length;E--;x[_t[E]]=m);return x},"o"),e=[1,24],a=[1,25],i=[1,26],u=[1,27],r=[1,28],n=[1,63],l=[1,64],s=[1,65],h=[1,66],y=[1,67],p=[1,68],g=[1,69],v=[1,29],w=[1,30],N=[1,31],O=[1,32],P=[1,33],I=[1,34],X=[1,35],q=[1,36],H=[1,37],Q=[1,38],K=[1,39],G=[1,40],Z=[1,41],J=[1,42],$=[1,43],tt=[1,44],et=[1,45],nt=[1,46],st=[1,47],at=[1,48],rt=[1,50],it=[1,51],ot=[1,52],lt=[1,53],ct=[1,54],ut=[1,55],ht=[1,56],dt=[1,57],pt=[1,58],ft=[1,59],yt=[1,60],kt=[14,42],Xt=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Pt=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],S=[1,82],T=[1,83],k=[1,84],C=[1,85],R=[12,14,42],oe=[12,14,33,42],Bt=[12,14,33,42,76,77,79,80],xt=[12,33],qt=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Ht={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:d(function(m,x,E,_,D,o,Dt){var f=o.length-1;switch(D){case 3:_.setDirection("TB");break;case 4:_.setDirection("BT");break;case 5:_.setDirection("RL");break;case 6:_.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:_.setC4Type(o[f-3]);break;case 19:_.setTitle(o[f].substring(6)),this.$=o[f].substring(6);break;case 20:_.setAccDescription(o[f].substring(15)),this.$=o[f].substring(15);break;case 21:this.$=o[f].trim(),_.setTitle(this.$);break;case 22:case 23:this.$=o[f].trim(),_.setAccDescription(this.$);break;case 28:o[f].splice(2,0,"ENTERPRISE"),_.addPersonOrSystemBoundary(...o[f]),this.$=o[f];break;case 29:o[f].splice(2,0,"SYSTEM"),_.addPersonOrSystemBoundary(...o[f]),this.$=o[f];break;case 30:_.addPersonOrSystemBoundary(...o[f]),this.$=o[f];break;case 31:o[f].splice(2,0,"CONTAINER"),_.addContainerBoundary(...o[f]),this.$=o[f];break;case 32:_.addDeploymentNode("node",...o[f]),this.$=o[f];break;case 33:_.addDeploymentNode("nodeL",...o[f]),this.$=o[f];break;case 34:_.addDeploymentNode("nodeR",...o[f]),this.$=o[f];break;case 35:_.popBoundaryParseStack();break;case 39:_.addPersonOrSystem("person",...o[f]),this.$=o[f];break;case 40:_.addPersonOrSystem("external_person",...o[f]),this.$=o[f];break;case 41:_.addPersonOrSystem("system",...o[f]),this.$=o[f];break;case 42:_.addPersonOrSystem("system_db",...o[f]),this.$=o[f];break;case 43:_.addPersonOrSystem("system_queue",...o[f]),this.$=o[f];break;case 44:_.addPersonOrSystem("external_system",...o[f]),this.$=o[f];break;case 45:_.addPersonOrSystem("external_system_db",...o[f]),this.$=o[f];break;case 46:_.addPersonOrSystem("external_system_queue",...o[f]),this.$=o[f];break;case 47:_.addContainer("container",...o[f]),this.$=o[f];break;case 48:_.addContainer("container_db",...o[f]),this.$=o[f];break;case 49:_.addContainer("container_queue",...o[f]),this.$=o[f];break;case 50:_.addContainer("external_container",...o[f]),this.$=o[f];break;case 51:_.addContainer("external_container_db",...o[f]),this.$=o[f];break;case 52:_.addContainer("external_container_queue",...o[f]),this.$=o[f];break;case 53:_.addComponent("component",...o[f]),this.$=o[f];break;case 54:_.addComponent("component_db",...o[f]),this.$=o[f];break;case 55:_.addComponent("component_queue",...o[f]),this.$=o[f];break;case 56:_.addComponent("external_component",...o[f]),this.$=o[f];break;case 57:_.addComponent("external_component_db",...o[f]),this.$=o[f];break;case 58:_.addComponent("external_component_queue",...o[f]),this.$=o[f];break;case 60:_.addRel("rel",...o[f]),this.$=o[f];break;case 61:_.addRel("birel",...o[f]),this.$=o[f];break;case 62:_.addRel("rel_u",...o[f]),this.$=o[f];break;case 63:_.addRel("rel_d",...o[f]),this.$=o[f];break;case 64:_.addRel("rel_l",...o[f]),this.$=o[f];break;case 65:_.addRel("rel_r",...o[f]),this.$=o[f];break;case 66:_.addRel("rel_b",...o[f]),this.$=o[f];break;case 67:o[f].splice(0,1),_.addRel("rel",...o[f]),this.$=o[f];break;case 68:_.updateElStyle("update_el_style",...o[f]),this.$=o[f];break;case 69:_.updateRelStyle("update_rel_style",...o[f]),this.$=o[f];break;case 70:_.updateLayoutConfig("update_layout_config",...o[f]),this.$=o[f];break;case 71:this.$=[o[f]];break;case 72:o[f].unshift(o[f-1]),this.$=o[f];break;case 73:case 75:this.$=o[f].trim();break;case 74:let vt={};vt[o[f-1].trim()]=o[f].trim(),this.$=vt;break;case 76:this.$="";break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:e,23:a,24:i,26:u,28:r,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:p,41:g,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:X,51:q,52:H,53:Q,54:K,55:G,56:Z,57:J,58:$,59:tt,60:et,61:nt,62:st,63:at,64:rt,65:it,66:ot,67:lt,68:ct,69:ut,70:ht,71:dt,72:pt,73:ft,74:yt},{13:70,19:20,20:21,21:22,22:e,23:a,24:i,26:u,28:r,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:p,41:g,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:X,51:q,52:H,53:Q,54:K,55:G,56:Z,57:J,58:$,59:tt,60:et,61:nt,62:st,63:at,64:rt,65:it,66:ot,67:lt,68:ct,69:ut,70:ht,71:dt,72:pt,73:ft,74:yt},{13:71,19:20,20:21,21:22,22:e,23:a,24:i,26:u,28:r,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:p,41:g,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:X,51:q,52:H,53:Q,54:K,55:G,56:Z,57:J,58:$,59:tt,60:et,61:nt,62:st,63:at,64:rt,65:it,66:ot,67:lt,68:ct,69:ut,70:ht,71:dt,72:pt,73:ft,74:yt},{13:72,19:20,20:21,21:22,22:e,23:a,24:i,26:u,28:r,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:p,41:g,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:X,51:q,52:H,53:Q,54:K,55:G,56:Z,57:J,58:$,59:tt,60:et,61:nt,62:st,63:at,64:rt,65:it,66:ot,67:lt,68:ct,69:ut,70:ht,71:dt,72:pt,73:ft,74:yt},{13:73,19:20,20:21,21:22,22:e,23:a,24:i,26:u,28:r,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:p,41:g,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:X,51:q,52:H,53:Q,54:K,55:G,56:Z,57:J,58:$,59:tt,60:et,61:nt,62:st,63:at,64:rt,65:it,66:ot,67:lt,68:ct,69:ut,70:ht,71:dt,72:pt,73:ft,74:yt},{14:[1,74]},t(kt,[2,13],{43:23,29:49,30:61,32:62,20:75,34:n,36:l,37:s,38:h,39:y,40:p,41:g,44:v,45:w,46:N,47:O,48:P,49:I,50:X,51:q,52:H,53:Q,54:K,55:G,56:Z,57:J,58:$,59:tt,60:et,61:nt,62:st,63:at,64:rt,65:it,66:ot,67:lt,68:ct,69:ut,70:ht,71:dt,72:pt,73:ft,74:yt}),t(kt,[2,14]),t(Xt,[2,16],{12:[1,76]}),t(kt,[2,36],{12:[1,77]}),t(Pt,[2,19]),t(Pt,[2,20]),{25:[1,78]},{27:[1,79]},t(Pt,[2,23]),{35:80,75:81,76:S,77:T,79:k,80:C},{35:86,75:81,76:S,77:T,79:k,80:C},{35:87,75:81,76:S,77:T,79:k,80:C},{35:88,75:81,76:S,77:T,79:k,80:C},{35:89,75:81,76:S,77:T,79:k,80:C},{35:90,75:81,76:S,77:T,79:k,80:C},{35:91,75:81,76:S,77:T,79:k,80:C},{35:92,75:81,76:S,77:T,79:k,80:C},{35:93,75:81,76:S,77:T,79:k,80:C},{35:94,75:81,76:S,77:T,79:k,80:C},{35:95,75:81,76:S,77:T,79:k,80:C},{35:96,75:81,76:S,77:T,79:k,80:C},{35:97,75:81,76:S,77:T,79:k,80:C},{35:98,75:81,76:S,77:T,79:k,80:C},{35:99,75:81,76:S,77:T,79:k,80:C},{35:100,75:81,76:S,77:T,79:k,80:C},{35:101,75:81,76:S,77:T,79:k,80:C},{35:102,75:81,76:S,77:T,79:k,80:C},{35:103,75:81,76:S,77:T,79:k,80:C},{35:104,75:81,76:S,77:T,79:k,80:C},t(R,[2,59]),{35:105,75:81,76:S,77:T,79:k,80:C},{35:106,75:81,76:S,77:T,79:k,80:C},{35:107,75:81,76:S,77:T,79:k,80:C},{35:108,75:81,76:S,77:T,79:k,80:C},{35:109,75:81,76:S,77:T,79:k,80:C},{35:110,75:81,76:S,77:T,79:k,80:C},{35:111,75:81,76:S,77:T,79:k,80:C},{35:112,75:81,76:S,77:T,79:k,80:C},{35:113,75:81,76:S,77:T,79:k,80:C},{35:114,75:81,76:S,77:T,79:k,80:C},{35:115,75:81,76:S,77:T,79:k,80:C},{20:116,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:p,41:g,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:X,51:q,52:H,53:Q,54:K,55:G,56:Z,57:J,58:$,59:tt,60:et,61:nt,62:st,63:at,64:rt,65:it,66:ot,67:lt,68:ct,69:ut,70:ht,71:dt,72:pt,73:ft,74:yt},{12:[1,118],33:[1,117]},{35:119,75:81,76:S,77:T,79:k,80:C},{35:120,75:81,76:S,77:T,79:k,80:C},{35:121,75:81,76:S,77:T,79:k,80:C},{35:122,75:81,76:S,77:T,79:k,80:C},{35:123,75:81,76:S,77:T,79:k,80:C},{35:124,75:81,76:S,77:T,79:k,80:C},{35:125,75:81,76:S,77:T,79:k,80:C},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},t(kt,[2,15]),t(Xt,[2,17],{21:22,19:130,22:e,23:a,24:i,26:u,28:r}),t(kt,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:e,23:a,24:i,26:u,28:r,34:n,36:l,37:s,38:h,39:y,40:p,41:g,44:v,45:w,46:N,47:O,48:P,49:I,50:X,51:q,52:H,53:Q,54:K,55:G,56:Z,57:J,58:$,59:tt,60:et,61:nt,62:st,63:at,64:rt,65:it,66:ot,67:lt,68:ct,69:ut,70:ht,71:dt,72:pt,73:ft,74:yt}),t(Pt,[2,21]),t(Pt,[2,22]),t(R,[2,39]),t(oe,[2,71],{75:81,35:132,76:S,77:T,79:k,80:C}),t(Bt,[2,73]),{78:[1,133]},t(Bt,[2,75]),t(Bt,[2,76]),t(R,[2,40]),t(R,[2,41]),t(R,[2,42]),t(R,[2,43]),t(R,[2,44]),t(R,[2,45]),t(R,[2,46]),t(R,[2,47]),t(R,[2,48]),t(R,[2,49]),t(R,[2,50]),t(R,[2,51]),t(R,[2,52]),t(R,[2,53]),t(R,[2,54]),t(R,[2,55]),t(R,[2,56]),t(R,[2,57]),t(R,[2,58]),t(R,[2,60]),t(R,[2,61]),t(R,[2,62]),t(R,[2,63]),t(R,[2,64]),t(R,[2,65]),t(R,[2,66]),t(R,[2,67]),t(R,[2,68]),t(R,[2,69]),t(R,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},t(xt,[2,28]),t(xt,[2,29]),t(xt,[2,30]),t(xt,[2,31]),t(xt,[2,32]),t(xt,[2,33]),t(xt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},t(Xt,[2,18]),t(kt,[2,38]),t(oe,[2,72]),t(Bt,[2,74]),t(R,[2,24]),t(R,[2,35]),t(qt,[2,25]),t(qt,[2,26],{12:[1,138]}),t(qt,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:d(function(m,x){if(x.recoverable)this.trace(m);else{var E=new Error(m);throw E.hash=x,E}},"parseError"),parse:d(function(m){var x=this,E=[0],_=[],D=[null],o=[],Dt=this.table,f="",vt=0,le=0,De=2,ce=1,Ne=o.slice.call(arguments,1),A=Object.create(this.lexer),Et={yy:{}};for(var Qt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Qt)&&(Et.yy[Qt]=this.yy[Qt]);A.setInput(m,Et.yy),Et.yy.lexer=A,Et.yy.parser=this,typeof A.yylloc>"u"&&(A.yylloc={});var Kt=A.yylloc;o.push(Kt);var Ae=A.options&&A.options.ranges;typeof Et.yy.parseError=="function"?this.parseError=Et.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Le(B){E.length=E.length-2*B,D.length=D.length-B,o.length=o.length-B}d(Le,"popStack");function ue(){var B;return B=_.pop()||A.lex()||ce,typeof B!="number"&&(B instanceof Array&&(_=B,B=_.pop()),B=x.symbols_[B]||B),B}d(ue,"lex");for(var M,St,V,Gt,Ct={},Yt,z,he,Ft;;){if(St=E[E.length-1],this.defaultActions[St]?V=this.defaultActions[St]:((M===null||typeof M>"u")&&(M=ue()),V=Dt[St]&&Dt[St][M]),typeof V>"u"||!V.length||!V[0]){var Zt="";Ft=[];for(Yt in Dt[St])this.terminals_[Yt]&&Yt>De&&Ft.push("'"+this.terminals_[Yt]+"'");A.showPosition?Zt="Parse error on line "+(vt+1)+`:
|
|
2
2
|
`+A.showPosition()+`
|
|
3
3
|
Expecting `+Ft.join(", ")+", got '"+(this.terminals_[M]||M)+"'":Zt="Parse error on line "+(vt+1)+": Unexpected "+(M==ce?"end of input":"'"+(this.terminals_[M]||M)+"'"),this.parseError(Zt,{text:A.match,token:this.terminals_[M]||M,line:A.yylineno,loc:Kt,expected:Ft})}if(V[0]instanceof Array&&V.length>1)throw new Error("Parse Error: multiple actions possible at state: "+St+", token: "+M);switch(V[0]){case 1:E.push(M),D.push(A.yytext),o.push(A.yylloc),E.push(V[1]),M=null,le=A.yyleng,f=A.yytext,vt=A.yylineno,Kt=A.yylloc;break;case 2:if(z=this.productions_[V[1]][1],Ct.$=D[D.length-z],Ct._$={first_line:o[o.length-(z||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(z||1)].first_column,last_column:o[o.length-1].last_column},Ae&&(Ct._$.range=[o[o.length-(z||1)].range[0],o[o.length-1].range[1]]),Gt=this.performAction.apply(Ct,[f,le,vt,Et.yy,V[1],D,o].concat(Ne)),typeof Gt<"u")return Gt;z&&(E=E.slice(0,-1*z*2),D=D.slice(0,-1*z),o=o.slice(0,-1*z)),E.push(this.productions_[V[1]][0]),D.push(Ct.$),o.push(Ct._$),he=Dt[E[E.length-2]][E[E.length-1]],E.push(he);break;case 3:return!0}}return!0},"parse")},Pe=(function(){var _t={EOF:1,parseError:d(function(x,E){if(this.yy.parser)this.yy.parser.parseError(x,E);else throw new Error(x)},"parseError"),setInput:d(function(m,x){return this.yy=x||this.yy||{},this._input=m,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:d(function(){var m=this._input[0];this.yytext+=m,this.yyleng++,this.offset++,this.match+=m,this.matched+=m;var x=m.match(/(?:\r\n?|\n).*/g);return x?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),m},"input"),unput:d(function(m){var x=m.length,E=m.split(/(?:\r\n?|\n)/g);this._input=m+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-x),this.offset-=x;var _=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),E.length-1&&(this.yylineno-=E.length-1);var D=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:E?(E.length===_.length?this.yylloc.first_column:0)+_[_.length-E.length].length-E[0].length:this.yylloc.first_column-x},this.options.ranges&&(this.yylloc.range=[D[0],D[0]+this.yyleng-x]),this.yyleng=this.yytext.length,this},"unput"),more:d(function(){return this._more=!0,this},"more"),reject:d(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:d(function(m){this.unput(this.match.slice(m))},"less"),pastInput:d(function(){var m=this.matched.substr(0,this.matched.length-this.match.length);return(m.length>20?"...":"")+m.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:d(function(){var m=this.match;return m.length<20&&(m+=this._input.substr(0,20-m.length)),(m.substr(0,20)+(m.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:d(function(){var m=this.pastInput(),x=new Array(m.length+1).join("-");return m+this.upcomingInput()+`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var $l=Object.defineProperty;var Ol=(r,t,n)=>t in r?$l(r,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[t]=n;var kn=(r,t,n)=>Ol(r,typeof t!="symbol"?t+"":t,n);import{t as It,bq as g,by as St,b as Tt,bo as f,bs as Kn,bu as dr,bt as ql,br as ha}from"./DGQ1ECsI.js";import{ai as aa,bs as Ct,ca as sr,aD as e,bH as j,ay as xe,bS as T,a7 as Rt,W as u,a5 as z,bA as R,bn as At,c9 as s,bV as we,aA as m,b_ as $,aj as Sr,aB as I,be as gr,b$ as Or,bO as J,bf as or,c0 as Cn,bl as oe,bj as jn,c6 as Dl,bo as za,br as Yr,am as Dn,ax as Bn,bk as as,aw as va,bz as ss,cb as ms,c5 as Ha,aC as xr,cd as _o,bv as Bl}from"./DYhIMPy1.js";import{i as B}from"./B-DRVFcy.js";import{g as Tr,e as _n,p as ps,i as Yn,I as Fl,h as eo,X as _i,o as zl}from"./D3HUOTfX.js";import{I as Kt,F as qa,c as ea,j as Wl,s as yi,p as to,y as Hl,u as Ul,t as $r,g as oa,B as ws,E as os,S as jl}from"./DNZhZg57.js";import{s as te,f as ze,g as _a,c as kt,e as ar,b as ya,p as Vl,S as Kl,C as Gl}from"./Bp_k45o-.js";import{b as cn}from"./BaIAhI85.js";import{f as Xe,ae as ro,a_ as Ql}from"./CxF8YFum.js";import{J as Zl,O as Jl,Q as xs}from"./DZ-cwX5R.js";import"./rEoZFmiI.js";import"./B2r-op5b.js";import"./CzZDc-Ii.js";import{s as Ln}from"./ChmnWquS.js";import{F as jt,a0 as zs,bc as Tn,cF as no,aq as bi,aV as wi,aG as Xl,c4 as Yl,a2 as is,aJ as ed,cI as td,cH as rd,$ as vs,as as ao,I as yo,af as nd,bq as ad,aO as sd,aT as od,bF as id,ak as ld,cx as dd,ay as bo,aL as wo,bX as ks,aE as Ua,cR as cd,c6 as ud,bj as fd,b as gd,ck as md,ac as pd,b6 as Is,cm as xa,cA as vd,a as hd}from"./Cjw1QvKa.js";import{c as xi,A as _d,x as yd}from"./Cw94LfJC.js";import{b as Ss,V as xo}from"./BmMUMiCr.js";import{a as ki,b7 as Pr,A as Ga,ao as Ii,s as bd,n as Si,d as wd,I as xd,R as kd,ax as Id,a0 as Sd}from"./4M32Nrru.js";import{bX as Ti,j as Qa,a6 as Ws,al as ls,F as Td,au as Za,aN as Cd,aQ as ko}from"./CsbrChhH.js";import{t as ia,o as Ad}from"./CKe6gKEB.js";import{c3 as Ja,aC as Da,cQ as Ci,cS as Vn,bU as hs,j as Md,cJ as Ai,cP as _s,cO as Mi,cM as Pi,g as Nn,aa as Pd,ab as Rd,ax as Ed,s as Nd,K as Ld,W as Io,v as Ri,dO as $d,at as Od,k as qd,u as Ts,a6 as Dd,n as Bd,O as Fd,o as zd,S as Wd,R as Hd,a0 as Ud,q as Ei,r as Ni,l as jd,cT as Vd,a4 as Kd,D as Gd,x as Qd,V as So}from"./CbVK4mzc.js";import{Iv as yt,oA as Zd,t9 as Xa,np as To,v1 as Li,v3 as $i,ro as Jd,x$ as ds,uk as Oi,nk as qi,bf as Ya,y0 as Xd,q2 as Yd,sG as ec,uW as Di,nj as tc,mq as rc,i as nc,ys as ac,yp as sc,yr as oc}from"./BSSsvY4I.js";import{a2 as ic,x as Cs,a0 as lc,O as As,V as dc,_ as cc,j as uc,o as ka,M as fa,p as fc,F as gc,u as mc,s as pc,L as Ms,J as vc,y as hc,K as _c,Z as Ma,Q as ja,N as Co,m as Ao,E as yc,c as Ps,B as Mo,z as bc,v as Po,H as Pa,P as wc,G as xc,i as kc,R as Ic,T as Sc,A as Tc,g as Cc,b as Ac,D as Mc,f as Pc,e as Rc,a as Ec,C as Nc,h as Lc,U as Bi,a3 as $c,t as Oc,k as qc,d as Ro}from"./DEu6gDAW.js";import{i as Dc,e as Bc}from"./CBTiE17j.js";import{g as Rs}from"./BvFAWM27.js";import{M as Ia,C as Ra}from"./DZlVkf9Y.js";import{C as Eo}from"./D6kv6T9Z.js";import"./BCFqTXC5.js";import{P as Fc}from"./DYdDm8qg.js";import"./cHlEaLvO.js";import{c as Fi}from"./ChTqQfQN.js";import{S as zc}from"./DlTJT3V9.js";import{D as No,M as Wc}from"./Dt_3gVf3.js";import{b as Hc,s as na,c as cs}from"./XM11aLg9.js";import{O as es,y as Es,E as Ns,B as Ls,N as Uc,m as jc,l as Vc,d as us,C as Lo,f as Kc,e as Gc,g as Qc}from"./7fznLbVZ.js";import{a as zi,s as $o}from"./BsieX9dN.js";import{f as Zc}from"./BdWqymET.js";import{c as dn}from"./Hc3ynozM.js";import{P as Jc}from"./286xXFLf.js";import{v as $s,t as Os,K as Oo,h as Xc}from"./BJpI9lmh.js";import{R as Hs,C as ys,k as Yc,h as eu,g as tu,i as qo,P as ru}from"./CK2a86W3.js";import"./B_7vJcZK.js";import{R as Do,x as Na,o as Wi}from"./D7KOa2cM.js";import{B as nu}from"./CyRJV2Ki.js";import{o as Hi,r as au,e as su}from"./BaMaQsqR.js";import{o as Ui}from"./nwgFD7pR.js";import{g as so}from"./Bv8FuKnx.js";import{a as ou,M as iu}from"./32pNLDLJ.js";import{c as Sa}from"./CJeZnjZ2.js";import{A as lu}from"./DZ9bPwU4.js";import{f as du,d as cu}from"./9_2ZyZ9L.js";import{a8 as uu,N as fu,Y as gu,K as Bo,X as mu,v as pu}from"./DWqOehs6.js";import{a as vu}from"./CC7to1B5.js";import{k as hu}from"./B99vgEcA.js";import{S as _u}from"./BNuxEAQs.js";import{u as yu,a as bu,c as Fo,S as wu}from"./DfxQWSVU.js";import{T as Us}from"./BmxmL68T.js";import"./C6DrVy6-.js";import{g as xu}from"./CM0lKKPd.js";import{a as ku}from"./iP2vS2hx.js";import{b as Iu}from"./DVpbdNgF.js";import{b as zo}from"./p7znhYIU.js";import{g as Su,i as Tu,a as Cu}from"./D897Deqj.js";import{n as Wo,o as Ho,b as ma,s as Ta,_ as qs,e as Au}from"./CIyUrgF0.js";import{b7 as Un,L as Mu}from"./DW8-b4qF.js";import{x as Pu}from"./DldD9pcf.js";import{c as Ru}from"./BboZoGK5.js";function Eu(r){if(!r||typeof r!="object")return null;const t=r;if(t.type!=="script_monitor_wake"||t.source!=="system")return null;const{scriptName:n,scriptId:a,runId:o,monitorId:i,workspaceId:d,reason:c}=t;if(typeof n!="string"||typeof a!="string"||!a||typeof o!="string"||!o||typeof i!="string"||!i||typeof d!="string"||!d||c!=="finished"&&c!=="ttl-expired"&&c!=="output-match"&&c!=="line-count")return null;const h=t.trigger;return{scriptName:n,scriptId:a,runId:o,monitorId:i,workspaceId:d,reason:c,...c==="output-match"&&typeof h?.matchedLine=="string"?{matchedLine:h.matchedLine}:{}}}function Nu(r){return r?.type==="script_monitor_wake"&&!("remoteAgentId"in r)}function Lu(r,t,n,a=!1){if(!r||!t)return{edit:!1,remove:!1,sendNow:!1};const o=r.messageMetadata?.fromPrincipalId??r.author?.principalId,i=uu(r)&&r.author?.principalId!==null&&o===t;return{edit:i,remove:i||t===n||a,sendNow:(i||a)&&!ji(r)}}function Ca(r,t){if(t)return r.find(n=>n.editing&&n.editingMessageId?n.editingMessageId===t:n.id===t)}function ji(r){return Nu(r.messageMetadata)&&typeof r.messageMetadata?.monitorId=="string"}function Uo(r,t=Date.now()){const n=r.messageMetadata,a=n?.fromPrincipalId,o=n&&Object.hasOwn(n,"humanAuthor")&&!(typeof a=="string"&&a.length>0),i=r.holdKind!==void 0&&Date.parse(r.holdUntil??"")>t;return!r.editing&&!i&&!o&&!ji(r)}const G_="pl-3.5! pr-2!";var $u=I('<span class="tile-remove-slot svelte-d8pwpf"><!></span>'),jo=I('<span class="attachment-status svelte-d8pwpf"> </span>'),Ou=I('<div class="file-image tile svelte-d8pwpf" data-kind="file"><!> <!> <div class="tile-actions svelte-d8pwpf"><!> <!></div></div>'),qu=I("<!><span> </span>",1),Du=I('<img alt="" draggable="false"/>'),Bu=I('<span class="summary svelte-d8pwpf" data-clip-summary=""> </span>'),Fu=I('<span class="clip svelte-d8pwpf"><span class="record-dot svelte-d8pwpf" aria-hidden="true"></span><span class="duration svelte-d8pwpf"> </span><!></span>'),zu=I('<div class="tile svelte-d8pwpf"><!> <!> <div class="tile-actions svelte-d8pwpf"><!> <!></div></div>'),Wu=I('<div class="attachment-row svelte-d8pwpf" role="group" data-dock-media-attachments=""></div>'),Hu=I("<!> <!> <!>",1),Uu=I('<img draggable="false" class="svelte-d8pwpf"/>'),ju=I('<video controls="" playsinline="" class="svelte-d8pwpf"></video>',2),Vu=I('<div class="media-viewer svelte-d8pwpf"><!></div>'),Ku=I("<!> <!>",1);function Gu(r,t){if(new.target)return It({component:Gu,...r});Ct(t,!0);const n=(O,ye=or,pe=or)=>{var A=$u(),ge=z(A);Xe(ge,{variant:"secondary",size:"icon-sm",class:"tile-action tile-remove",get disabled(){return i()},get"aria-label"(){return pe()},tooltipContentClass:"dock-chrome-tooltip",get tooltip(){return pe()},onclick:()=>q(ye()),children:(Te,Be)=>{Ss(Te,{glyph:"x"})},$$slots:{default:!0}}),R(A),u(O,A)};let a=g(t,"items",7),o=g(t,"labels",7),i=g(t,"disabled",7,!1),d=g(t,"onMarkUp",7),c=g(t,"onEdit",7),h=g(t,"onRemove",7),v=g(t,"onRetry",7),b=g(t,"onCopy",7),k=g(t,"onMenu",7);const N=O=>O.owner==="attachment"?2:{image:0,clip:1,file:2}[O.kind],Y=s(()=>[...a()].sort((O,ye)=>N(O)-N(ye)));let S=we(null),D=we(!1),ie=we(null),X=null;const M=s(()=>a().find(O=>O.id===e(ie)));sr(()=>{(!e(M)||e(M).kind==="image"&&!W(e(M)))&&j(D,!1)});function W(O){return O.kind==="image"&&O.status!=="placing"&&O.status!=="failed"&&O.url.trim().length>0}function E(O){return O.kind==="image"?o().image(O.markCount):O.kind==="clip"?O.summary?`${o().clip(O.duration)} ${O.summary}`:o().clip(O.duration):O.name}function ne(O,ye){if(!(i()||O.kind==="file"||O.kind==="image"&&!W(O)||O.kind==="clip"&&(!O.url||O.recording))){if((O.kind==="clip"||O.kind==="image")&&c()){c()(O.id);return}X=ye,j(ie,O.id,!0),j(D,!0)}}async function q(O){i()||(e(ie)===O&&j(D,!1),h()(O),await Cn(),(!document.activeElement||document.activeElement===document.body)&&e(S)?.querySelector("button:not(:disabled)")?.focus())}function F(O){const ye=a().find(pe=>pe.id===O);i()||!ye||!W(ye)||(j(D,!1),c()?c()(O):d()(O))}function ae(O,ye){O.key!=="Delete"||i()||(O.preventDefault(),O.stopPropagation(),q(ye))}function C(O){return O.status==="placing"||O.status==="failed"?!1:O.kind==="image"?!!O.file||W(O):O.kind==="clip"&&!O.recording&&!!O.url}function ee(O,ye){const pe=Zl()?O.metaKey:O.ctrlKey,A=O.key.toLowerCase();if(pe&&!O.shiftKey&&!O.altKey&&(A==="c"||A==="x")){if(!b()||!C(ye)||(O.preventDefault(),O.stopPropagation(),A==="x"&&i()))return;b()(ye.id,A==="x");return}ae(O,ye.id)}function le(O,ye){!k()||!C(ye)||(O.preventDefault(),k()(ye.id))}var me={get items(){return a()},set items(O){a(O),m()},get labels(){return o()},set labels(O){o(O),m()},get disabled(){return i()},set disabled(O=!1){i(O),m()},get onMarkUp(){return d()},set onMarkUp(O){d(O),m()},get onEdit(){return c()},set onEdit(O){c(O),m()},get onRemove(){return h()},set onRemove(O){h(O),m()},get onRetry(){return v()},set onRetry(O){v(O),m()},get onCopy(){return b()},set onCopy(O){b(O),m()},get onMenu(){return k()},set onMenu(O){k(O),m()},$set:St,$on:(O,ye)=>Tt(t,O,ye)},_e=Ku(),Re=xe(_e);{var Le=O=>{var ye=Wu();Tr(ye,21,()=>e(Y),pe=>pe.id,(pe,A)=>{var ge=Rt(),Te=xe(ge);{var Be=P=>{var Q=Ou(),re=z(Q);{let G=s(()=>i()||e(A).status==="placing");ki(re,{get id(){return e(A).id},get name(){return e(A).file.name},get type(){return e(A).file.imageMimeType},get imageData(){return e(A).file.imageData},get imageMimeType(){return e(A).file.imageMimeType},variant:"thumbnail",thumbnailClass:"size-full",class:"size-full",get disabled(){return e(G)},get placementStatus(){return e(A).status},get placementError(){return e(A).error}})}var se=T(re,2);{var ce=G=>{var Ee=jo(),De=oe(Ee,!0);$(()=>{te(Ee,"data-failed",e(A).status==="failed"||void 0),te(Ee,"role",e(A).status==="failed"?"alert":"status"),te(Ee,"title",e(A).error),J(De,e(A).status==="failed"?e(A).error??o().attachmentFailed:o().attachmentPending)}),u(G,Ee)};B(se,G=>{e(A).status&&G(ce)})}var w=T(se,2),Se=z(w);{var Ae=G=>{Xe(G,{variant:"primary",size:"icon-sm",class:"tile-action",get disabled(){return i()},get"aria-label"(){return o().retry},tooltipContentClass:"dock-chrome-tooltip",get tooltip(){return o().retry},onclick:()=>v()?.(e(A).id),children:(Ee,De)=>{jt(Ee,{get icon(){return zs},size:16})},$$slots:{default:!0}})};B(Se,G=>{e(A).status==="failed"&&v()&&G(Ae)})}var L=T(Se,2);{let G=s(()=>f.chat_attachmentPreview_remove_ariaLabel({name:e(A).file.name}));n(L,()=>e(A).id,()=>e(G))}R(w),R(Q),$(()=>te(Q,"data-attachment-id",e(A).id)),Sr("keydown",Q,G=>ee(G,e(A))),Sr("contextmenu",Q,G=>le(G,e(A))),Kt(1,Q,()=>qa,()=>({tier:"fast",y:3,scale:.98})),Kt(2,Q,()=>ea,()=>({tier:"fast"})),u(P,Q)},Ce=P=>{const Q=s(()=>e(A).kind==="image"&&!W(e(A))&&e(A).status!=="failed");var re=zu(),se=z(re);{var ce=ve=>{Xe(ve,{type:"button",variant:"ghost",wrapContent:!1,class:"open-tile file",get"aria-label"(){return e(A).name},get disabled(){return i()},onkeydown:Oe=>ae(Oe,e(A).id),children:(Oe,U)=>{var ue=qu(),ot=xe(ue);jt(ot,{get icon(){return Tn},size:20});var xt=T(ot),mt=oe(xt,!0);$(()=>J(mt,e(A).name)),u(Oe,ue)},$$slots:{default:!0}})},w=ve=>{{let Oe=s(()=>E(e(A))),U=s(()=>i()||e(A).kind==="clip"&&(e(A).recording||!e(A).url));Xe(ve,{type:"button",variant:"ghost",wrapContent:!1,class:"open-tile",get"aria-label"(){return e(Oe)},get disabled(){return e(U)},onkeydown:ue=>ee(ue,e(A)),onclick:ue=>{ue.currentTarget instanceof HTMLElement&&ne(e(A),ue.currentTarget)},children:(ue,ot)=>{var xt=Rt(),mt=xe(xt);{var Ft=je=>{var bt=Du();$(()=>te(bt,"src",e(A).url)),u(je,bt)},pt=je=>{var bt=Fu(),at=T(z(bt)),dt=oe(at,!0),$e=T(at);{var ft=K=>{var _=Bu(),he=oe(_,!0);$(()=>J(he,e(A).summary)),u(K,_)};B($e,K=>{e(A).summary&&K(ft)})}R(bt),$(()=>J(dt,e(A).duration)),u(je,bt)};B(mt,je=>{e(A).kind==="image"?je(Ft):je(pt,-1)})}u(ue,xt)},$$slots:{default:!0}})}},Se=s(()=>e(A).kind!=="image"||W(e(A)));B(se,ve=>{e(A).kind==="file"?ve(ce):e(Se)&&ve(w,1)})}var Ae=T(se,2);{var L=ve=>{var Oe=jo(),U=oe(Oe,!0);$(()=>{te(Oe,"data-failed",e(A).status==="failed"||void 0),te(Oe,"role",e(A).status==="failed"?"alert":"status"),te(Oe,"title",e(A).error),J(U,e(A).status==="failed"?e(A).error??o().attachmentFailed:o().attachmentPending)}),u(ve,Oe)};B(Ae,ve=>{(e(A).status||e(Q))&&ve(L)})}var G=T(Ae,2),Ee=z(G);{var De=ve=>{Xe(ve,{variant:"primary",size:"icon-sm",class:"tile-action",get disabled(){return i()},get"aria-label"(){return o().retry},tooltipContentClass:"dock-chrome-tooltip",get tooltip(){return o().retry},onclick:()=>v()?.(e(A).id),children:(Oe,U)=>{jt(Oe,{get icon(){return zs},size:16})},$$slots:{default:!0}})},Je=ve=>{{let Oe=s(()=>c()?o().edit:o().markUp),U=s(()=>c()?o().edit:o().markUp);Xe(ve,{variant:"primary",size:"icon-sm",class:"tile-action",get disabled(){return i()},get"aria-label"(){return e(Oe)},tooltipContentClass:"dock-chrome-tooltip",get tooltip(){return e(U)},onclick:()=>F(e(A).id),children:(ue,ot)=>{Ss(ue,{glyph:"pencil"})},$$slots:{default:!0}})}},Ge=s(()=>W(e(A))),Bt=ve=>{{let Oe=s(()=>c()?o().edit:o().play),U=s(()=>c()?o().edit:o().play);Xe(ve,{variant:"primary",size:"icon-sm",class:"tile-action",get disabled(){return i()},get"aria-label"(){return e(Oe)},tooltipContentClass:"dock-chrome-tooltip",get tooltip(){return e(U)},onclick:ue=>{ue.currentTarget instanceof HTMLElement&&ne(e(A),ue.currentTarget)},children:(ue,ot)=>{{let xt=s(()=>c()?"pencil":"play");Ss(ue,{get glyph(){return e(xt)}})}},$$slots:{default:!0}})}};B(Ee,ve=>{e(A).status==="failed"&&v()?ve(De):e(Ge)?ve(Je,1):e(A).kind==="clip"&&!e(A).recording&&e(A).url&&ve(Bt,2)})}var ke=T(Ee,2);n(ke,()=>e(A).id,()=>o().remove),R(G),R(re),$(()=>{te(re,"data-kind",e(A).kind),te(re,"data-attachment-id",e(A).id),te(re,"aria-busy",e(Q)||void 0)}),Sr("contextmenu",re,ve=>le(ve,e(A))),Kt(1,re,()=>qa,()=>({tier:"fast",y:3,scale:.98})),Kt(2,re,()=>ea,()=>({tier:"fast"})),u(P,re)};B(Te,P=>{e(A).kind==="image"&&e(A).file?P(Be):P(Ce,-1)})}u(pe,ge)}),R(ye),cn(ye,pe=>j(S,pe),()=>e(S)),$(()=>te(ye,"aria-label",o().attachments)),u(O,ye)};B(Re,O=>{e(Y).length&&O(Le)})}var Ke=T(Re,2);{const O=pe=>{var A=Rt(),ge=xe(A);{var Te=Be=>{var Ce=Hu(),P=xe(Ce);{var Q=w=>{Xe(w,{variant:"primary",get disabled(){return i()},onclick:()=>e(M)&&F(e(M).id),children:(Se,Ae)=>{gr();var L=Or();$(()=>J(L,o().markUp)),u(Se,L)},$$slots:{default:!0}})},re=s(()=>W(e(M)));B(P,w=>{e(re)&&w(Q)})}var se=T(P,2);Xe(se,{variant:"secondary",get disabled(){return i()},onclick:()=>e(M)&&q(e(M).id),children:(w,Se)=>{gr();var Ae=Or();$(()=>J(Ae,o().remove)),u(w,Ae)},$$slots:{default:!0}});var ce=T(se,2);Xe(ce,{variant:"ghost-light",onclick:()=>{j(D,!1)},children:(w,Se)=>{gr();var Ae=Or();$(()=>J(Ae,o().done)),u(w,Ae)},$$slots:{default:!0}}),u(Be,Ce)};B(ge,Be=>{e(M)&&e(M).kind!=="file"&&Be(Te)})}u(pe,A)};let ye=s(()=>e(M)?E(e(M)):o().attachments);xi(Ke,{get title(){return e(ye)},size:"wide",showCloseButton:!1,onCloseAutoFocus:pe=>{pe.preventDefault(),X?.isConnected?X.focus():e(S)?.querySelector("button:not(:disabled)")?.focus()},get open(){return e(D)},set open(pe){j(D,pe,!0)},footer:O,children:(pe,A)=>{var ge=Rt(),Te=xe(ge);{var Be=Ce=>{var P=Vu(),Q=z(P);{var re=w=>{var Se=Uu();$(Ae=>{te(Se,"src",e(M).url),te(Se,"alt",Ae)},[()=>E(e(M))]),u(w,Se)},se=s(()=>e(M).kind==="image"&&W(e(M))),ce=w=>{var Se=ju();$(Ae=>{te(Se,"src",e(M).url),te(Se,"aria-label",Ae)},[()=>E(e(M))]),u(w,Se)};B(Q,w=>{e(se)?w(re):e(M).kind==="clip"&&e(M).url&&w(ce,1)})}R(P),u(Ce,P)};B(Te,Ce=>{e(M)&&e(M).kind!=="file"&&Ce(Be)})}u(pe,ge)},$$slots:{footer:!0,default:!0}})}return u(r,_e),At(me)}aa(["keydown","contextmenu"]);var Qu=I("<!> ",1),Zu=I('<div class="flex flex-col gap-2 px-4 py-3 bg-muted/30 border border-border rounded-lg my-4"><div class="flex items-center justify-between gap-2"><div class="flex items-center gap-2"><div class="shrink-0 text-subtle"><!></div> <div class="font-medium text-sm"> </div></div> <div class="flex items-center gap-1"><!> <!></div></div> <div class="text-xs text-subtle"> </div> <pre class="text-xs bg-background/50 rounded p-2 overflow-x-auto max-h-40 overflow-y-auto font-mono"> </pre></div>');function Vi(r,t){if(new.target)return It({component:Vi,...r});Ct(t,!0);let n=g(t,"name",7),a=g(t,"description",7),o=g(t,"content",7),i=g(t,"onUseScript",7),d=we(!1);function c(){navigator.clipboard.writeText(o()),j(d,!0),setTimeout(()=>{j(d,!1)},2e3)}function h(){i()?.({name:n(),description:a(),content:o()})}var v={get name(){return n()},set name(C){n(C),m()},get description(){return a()},set description(C){a(C),m()},get content(){return o()},set content(C){o(C),m()},get onUseScript(){return i()},set onUseScript(C){i(C),m()},$set:St,$on:(C,ee)=>Tt(t,C,ee)},b=Zu(),k=z(b),N=z(k),Y=z(N),S=z(Y);jt(S,{get icon(){return no},size:"sm"}),R(Y);var D=T(Y,2),ie=oe(D,!0);R(N);var X=T(N,2),M=z(X);Xe(M,{variant:"ghost-light",size:"sm",onclick:c,class:"h-7 px-2",children:(C,ee)=>{var le=Qu(),me=xe(le);{let Re=s(()=>e(d)?bi:wi);jt(me,{get icon(){return e(Re)},class:"mr-1"})}var _e=T(me);$(Re=>J(_e,` ${Re??""}`),[()=>e(d)?f.chat_shared_copied_label():f.chat_shared_copy_label()]),u(C,le)},$$slots:{default:!0}});var W=T(M,2);{var E=C=>{Xe(C,{variant:"ghost-light",size:"sm",onclick:h,class:"h-7 px-2",children:(ee,le)=>{gr();var me=Or();$(_e=>J(me,_e),[()=>f.chat_setupScriptCard_useScript_label()]),u(ee,me)},$$slots:{default:!0}})};B(W,C=>{i()&&C(E)})}R(X),R(k);var ne=T(k,2),q=oe(ne,!0),F=T(ne,2),ae=oe(F,!0);return R(b),$(()=>{J(ie,n()),J(q,a()),J(ae,o())}),u(r,b),At(v)}const wr={toolStart:/(?:\x1B\[\d+m)?🔧\s+(?:Tool call:\s+)?(.+?)(?:\x1B\[0m)?$/,toolDetail:/(?:[└├]─\s+(.+)$|^\s{3,}(.+)$)/,toolResult:/(?:\x1B\[\d+m)?📋\s+Tool result:\s+(.+?)(?:\x1B\[0m)?$/,toolSuccess:/[✓✔✅]\s+(.+)$/,toolError:/[❌✗❎]\s+(.+)$/,sessionInfo:/[Ss]ession:\s*([a-f0-9-]+)/,resumedSession:/📂?\s*Resumed session/i,assistantMarker:/🤖/,systemMarker:/💻/,userMarker:/👤/,thinkingMarker:/🤔\s*Thinking/i,waitingMarker:/^⏳\s+Running/i,indexingProgress:/^Indexing:\s*\[.*\]\s*\d+%/,agentDigest:/<agent_digest>([\s\S]*?)<\/agent_digest>/,setupScript:/<setup_script\s+name="([^"]+)"\s+description="([^"]+)">([\s\S]*?)<\/setup_script>/};class Ju{constructor(){kn(this,"buffer","");kn(this,"currentToolName",null);kn(this,"currentToolId",null);kn(this,"lastToolId",null);kn(this,"currentToolParams",[]);kn(this,"currentToolResultContent",[]);kn(this,"inToolResult",!1);kn(this,"inCodeBlock",!1);kn(this,"codeBlockLanguage","");kn(this,"codeBlockContent","");kn(this,"characterBuffer","");kn(this,"inCharacterMode",!1);kn(this,"emittedToolIds",new Set)}parseChunk(t){if(this.isMarkerLine(t.trim())){const o=[];if(this.inToolResult&&this.currentToolResultContent.length>0){const c=this.currentToolResultContent.some(v=>v.startsWith("❌")||v.startsWith("Error:")),h=this.currentToolResultContent.map(v=>v.replace(/^❌\s*/,"").replace(/^Error:\s*/,"")).join(`
|
|
1
|
+
var $l=Object.defineProperty;var Ol=(r,t,n)=>t in r?$l(r,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[t]=n;var kn=(r,t,n)=>Ol(r,typeof t!="symbol"?t+"":t,n);import{t as It,bq as g,by as St,b as Tt,bo as f,bs as Kn,bu as dr,bt as ql,br as ha}from"./BUAFIktJ.js";import{ai as aa,bs as Ct,ca as sr,aD as e,bH as j,ay as xe,bS as T,a7 as Rt,W as u,a5 as z,bA as R,bn as At,c9 as s,bV as we,aA as m,b_ as $,aj as Sr,aB as I,be as gr,b$ as Or,bO as J,bf as or,c0 as Cn,bl as oe,bj as jn,c6 as Dl,bo as za,br as Yr,am as Dn,ax as Bn,bk as as,aw as va,bz as ss,cb as ms,c5 as Ha,aC as xr,cd as _o,bv as Bl}from"./DYhIMPy1.js";import{i as B}from"./Bvd0DfwC.js";import{g as Tr,e as _n,p as ps,i as Yn,I as Fl,h as eo,X as _i,o as zl}from"./vJ7Dp7-k.js";import{I as Kt,F as qa,c as ea,j as Wl,s as yi,p as to,y as Hl,u as Ul,t as $r,g as oa,B as ws,E as os,S as jl}from"./DCOf4rfq.js";import{s as te,f as ze,g as _a,c as kt,e as ar,b as ya,p as Vl,S as Kl,C as Gl}from"./COO6ldt4.js";import{b as cn}from"./BaIAhI85.js";import{f as Xe,ae as ro,a_ as Ql}from"./hwFphMxp.js";import{J as Zl,O as Jl,Q as xs}from"./B1s_9zgm.js";import"./Co5bimwo.js";import"./CGuBCqy6.js";import"./hmNmIDzu.js";import{s as Ln}from"./CnTu6sc6.js";import{F as jt,a0 as zs,bc as Tn,cF as no,aq as bi,aV as wi,aG as Xl,c4 as Yl,a2 as is,aJ as ed,cI as td,cH as rd,$ as vs,as as ao,I as yo,af as nd,bq as ad,aO as sd,aT as od,bF as id,ak as ld,cx as dd,ay as bo,aL as wo,bX as ks,aE as Ua,cR as cd,c6 as ud,bj as fd,b as gd,ck as md,ac as pd,b6 as Is,cm as xa,cA as vd,a as hd}from"./CfdX4Lfl.js";import{c as xi,A as _d,x as yd}from"./B6lWPidK.js";import{b as Ss,V as xo}from"./Dfo7IcH5.js";import{a as ki,b7 as Pr,A as Ga,ao as Ii,s as bd,n as Si,d as wd,I as xd,R as kd,ax as Id,a0 as Sd}from"./CUHqJ1Vg.js";import{bX as Ti,j as Qa,a6 as Ws,al as ls,F as Td,au as Za,aN as Cd,aQ as ko}from"./Da7V4qRA.js";import{t as ia,o as Ad}from"./BhzNHo5H.js";import{c3 as Ja,aC as Da,cQ as Ci,cS as Vn,bU as hs,j as Md,cJ as Ai,cP as _s,cO as Mi,cM as Pi,g as Nn,aa as Pd,ab as Rd,ax as Ed,s as Nd,K as Ld,W as Io,v as Ri,dO as $d,at as Od,k as qd,u as Ts,a6 as Dd,n as Bd,O as Fd,o as zd,S as Wd,R as Hd,a0 as Ud,q as Ei,r as Ni,l as jd,cT as Vd,a4 as Kd,D as Gd,x as Qd,V as So}from"./D1PZlLC_.js";import{Iv as yt,oA as Zd,t9 as Xa,np as To,v1 as Li,v3 as $i,ro as Jd,x$ as ds,uk as Oi,nk as qi,bf as Ya,y0 as Xd,q2 as Yd,sG as ec,uW as Di,nj as tc,mq as rc,i as nc,ys as ac,yp as sc,yr as oc}from"./iYz7qSVO.js";import{a2 as ic,x as Cs,a0 as lc,O as As,V as dc,_ as cc,j as uc,o as ka,M as fa,p as fc,F as gc,u as mc,s as pc,L as Ms,J as vc,y as hc,K as _c,Z as Ma,Q as ja,N as Co,m as Ao,E as yc,c as Ps,B as Mo,z as bc,v as Po,H as Pa,P as wc,G as xc,i as kc,R as Ic,T as Sc,A as Tc,g as Cc,b as Ac,D as Mc,f as Pc,e as Rc,a as Ec,C as Nc,h as Lc,U as Bi,a3 as $c,t as Oc,k as qc,d as Ro}from"./CZkLaz_S.js";import{i as Dc,e as Bc}from"./Bz6dDdb9.js";import{g as Rs}from"./BvFAWM27.js";import{M as Ia,C as Ra}from"./Dbd3M4VX.js";import{C as Eo}from"./HpSr1h8y.js";import"./B9Ccf4_O.js";import{P as Fc}from"./BAj9Av-i.js";import"./DVdgjGW2.js";import{c as Fi}from"./ChTqQfQN.js";import{S as zc}from"./hQlemDzn.js";import{D as No,M as Wc}from"./DEo5mzFE.js";import{b as Hc,s as na,c as cs}from"./4fLmPVdQ.js";import{O as es,y as Es,E as Ns,B as Ls,N as Uc,m as jc,l as Vc,d as us,C as Lo,f as Kc,e as Gc,g as Qc}from"./D8eSz7L_.js";import{a as zi,s as $o}from"./BsieX9dN.js";import{f as Zc}from"./BdWqymET.js";import{c as dn}from"./C5H4Pe0T.js";import{P as Jc}from"./Buh7J53B.js";import{v as $s,t as Os,K as Oo,h as Xc}from"./Dzmm4LX6.js";import{R as Hs,C as ys,k as Yc,h as eu,g as tu,i as qo,P as ru}from"./IH85nSha.js";import"./CRrFC3B8.js";import{R as Do,x as Na,o as Wi}from"./BR9y4bsr.js";import{B as nu}from"./HZ9TCfKK.js";import{o as Hi,r as au,e as su}from"./DrPWazGq.js";import{o as Ui}from"./D16yE-CH.js";import{g as so}from"./Db2Jl7w7.js";import{a as ou,M as iu}from"./BXyNrc2B.js";import{c as Sa}from"./BgOj6lPu.js";import{A as lu}from"./DQuLjWyg.js";import{f as du,d as cu}from"./SAoHFFQz.js";import{a8 as uu,N as fu,Y as gu,K as Bo,X as mu,v as pu}from"./DevaRANM.js";import{a as vu}from"./CC7to1B5.js";import{k as hu}from"./CLi8c-Jc.js";import{S as _u}from"./DlySFqed.js";import{u as yu,a as bu,c as Fo,S as wu}from"./DfxQWSVU.js";import{T as Us}from"./B87_3X7t.js";import"./DS2QhtLm.js";import{g as xu}from"./DyLYtK5N.js";import{a as ku}from"./CrxGBxMK.js";import{b as Iu}from"./jK-m9hL8.js";import{b as zo}from"./p7znhYIU.js";import{g as Su,i as Tu,a as Cu}from"./D8Uhwh7R.js";import{n as Wo,o as Ho,b as ma,s as Ta,_ as qs,e as Au}from"./CIyUrgF0.js";import{b7 as Un,L as Mu}from"./CZ8DhcrQ.js";import{x as Pu}from"./DV_c4cZz.js";import{c as Ru}from"./-lzAI0Yg.js";function Eu(r){if(!r||typeof r!="object")return null;const t=r;if(t.type!=="script_monitor_wake"||t.source!=="system")return null;const{scriptName:n,scriptId:a,runId:o,monitorId:i,workspaceId:d,reason:c}=t;if(typeof n!="string"||typeof a!="string"||!a||typeof o!="string"||!o||typeof i!="string"||!i||typeof d!="string"||!d||c!=="finished"&&c!=="ttl-expired"&&c!=="output-match"&&c!=="line-count")return null;const h=t.trigger;return{scriptName:n,scriptId:a,runId:o,monitorId:i,workspaceId:d,reason:c,...c==="output-match"&&typeof h?.matchedLine=="string"?{matchedLine:h.matchedLine}:{}}}function Nu(r){return r?.type==="script_monitor_wake"&&!("remoteAgentId"in r)}function Lu(r,t,n,a=!1){if(!r||!t)return{edit:!1,remove:!1,sendNow:!1};const o=r.messageMetadata?.fromPrincipalId??r.author?.principalId,i=uu(r)&&r.author?.principalId!==null&&o===t;return{edit:i,remove:i||t===n||a,sendNow:(i||a)&&!ji(r)}}function Ca(r,t){if(t)return r.find(n=>n.editing&&n.editingMessageId?n.editingMessageId===t:n.id===t)}function ji(r){return Nu(r.messageMetadata)&&typeof r.messageMetadata?.monitorId=="string"}function Uo(r,t=Date.now()){const n=r.messageMetadata,a=n?.fromPrincipalId,o=n&&Object.hasOwn(n,"humanAuthor")&&!(typeof a=="string"&&a.length>0),i=r.holdKind!==void 0&&Date.parse(r.holdUntil??"")>t;return!r.editing&&!i&&!o&&!ji(r)}const G_="pl-3.5! pr-2!";var $u=I('<span class="tile-remove-slot svelte-d8pwpf"><!></span>'),jo=I('<span class="attachment-status svelte-d8pwpf"> </span>'),Ou=I('<div class="file-image tile svelte-d8pwpf" data-kind="file"><!> <!> <div class="tile-actions svelte-d8pwpf"><!> <!></div></div>'),qu=I("<!><span> </span>",1),Du=I('<img alt="" draggable="false"/>'),Bu=I('<span class="summary svelte-d8pwpf" data-clip-summary=""> </span>'),Fu=I('<span class="clip svelte-d8pwpf"><span class="record-dot svelte-d8pwpf" aria-hidden="true"></span><span class="duration svelte-d8pwpf"> </span><!></span>'),zu=I('<div class="tile svelte-d8pwpf"><!> <!> <div class="tile-actions svelte-d8pwpf"><!> <!></div></div>'),Wu=I('<div class="attachment-row svelte-d8pwpf" role="group" data-dock-media-attachments=""></div>'),Hu=I("<!> <!> <!>",1),Uu=I('<img draggable="false" class="svelte-d8pwpf"/>'),ju=I('<video controls="" playsinline="" class="svelte-d8pwpf"></video>',2),Vu=I('<div class="media-viewer svelte-d8pwpf"><!></div>'),Ku=I("<!> <!>",1);function Gu(r,t){if(new.target)return It({component:Gu,...r});Ct(t,!0);const n=(O,ye=or,pe=or)=>{var A=$u(),ge=z(A);Xe(ge,{variant:"secondary",size:"icon-sm",class:"tile-action tile-remove",get disabled(){return i()},get"aria-label"(){return pe()},tooltipContentClass:"dock-chrome-tooltip",get tooltip(){return pe()},onclick:()=>q(ye()),children:(Te,Be)=>{Ss(Te,{glyph:"x"})},$$slots:{default:!0}}),R(A),u(O,A)};let a=g(t,"items",7),o=g(t,"labels",7),i=g(t,"disabled",7,!1),d=g(t,"onMarkUp",7),c=g(t,"onEdit",7),h=g(t,"onRemove",7),v=g(t,"onRetry",7),b=g(t,"onCopy",7),k=g(t,"onMenu",7);const N=O=>O.owner==="attachment"?2:{image:0,clip:1,file:2}[O.kind],Y=s(()=>[...a()].sort((O,ye)=>N(O)-N(ye)));let S=we(null),D=we(!1),ie=we(null),X=null;const M=s(()=>a().find(O=>O.id===e(ie)));sr(()=>{(!e(M)||e(M).kind==="image"&&!W(e(M)))&&j(D,!1)});function W(O){return O.kind==="image"&&O.status!=="placing"&&O.status!=="failed"&&O.url.trim().length>0}function E(O){return O.kind==="image"?o().image(O.markCount):O.kind==="clip"?O.summary?`${o().clip(O.duration)} ${O.summary}`:o().clip(O.duration):O.name}function ne(O,ye){if(!(i()||O.kind==="file"||O.kind==="image"&&!W(O)||O.kind==="clip"&&(!O.url||O.recording))){if((O.kind==="clip"||O.kind==="image")&&c()){c()(O.id);return}X=ye,j(ie,O.id,!0),j(D,!0)}}async function q(O){i()||(e(ie)===O&&j(D,!1),h()(O),await Cn(),(!document.activeElement||document.activeElement===document.body)&&e(S)?.querySelector("button:not(:disabled)")?.focus())}function F(O){const ye=a().find(pe=>pe.id===O);i()||!ye||!W(ye)||(j(D,!1),c()?c()(O):d()(O))}function ae(O,ye){O.key!=="Delete"||i()||(O.preventDefault(),O.stopPropagation(),q(ye))}function C(O){return O.status==="placing"||O.status==="failed"?!1:O.kind==="image"?!!O.file||W(O):O.kind==="clip"&&!O.recording&&!!O.url}function ee(O,ye){const pe=Zl()?O.metaKey:O.ctrlKey,A=O.key.toLowerCase();if(pe&&!O.shiftKey&&!O.altKey&&(A==="c"||A==="x")){if(!b()||!C(ye)||(O.preventDefault(),O.stopPropagation(),A==="x"&&i()))return;b()(ye.id,A==="x");return}ae(O,ye.id)}function le(O,ye){!k()||!C(ye)||(O.preventDefault(),k()(ye.id))}var me={get items(){return a()},set items(O){a(O),m()},get labels(){return o()},set labels(O){o(O),m()},get disabled(){return i()},set disabled(O=!1){i(O),m()},get onMarkUp(){return d()},set onMarkUp(O){d(O),m()},get onEdit(){return c()},set onEdit(O){c(O),m()},get onRemove(){return h()},set onRemove(O){h(O),m()},get onRetry(){return v()},set onRetry(O){v(O),m()},get onCopy(){return b()},set onCopy(O){b(O),m()},get onMenu(){return k()},set onMenu(O){k(O),m()},$set:St,$on:(O,ye)=>Tt(t,O,ye)},_e=Ku(),Re=xe(_e);{var Le=O=>{var ye=Wu();Tr(ye,21,()=>e(Y),pe=>pe.id,(pe,A)=>{var ge=Rt(),Te=xe(ge);{var Be=P=>{var Q=Ou(),re=z(Q);{let G=s(()=>i()||e(A).status==="placing");ki(re,{get id(){return e(A).id},get name(){return e(A).file.name},get type(){return e(A).file.imageMimeType},get imageData(){return e(A).file.imageData},get imageMimeType(){return e(A).file.imageMimeType},variant:"thumbnail",thumbnailClass:"size-full",class:"size-full",get disabled(){return e(G)},get placementStatus(){return e(A).status},get placementError(){return e(A).error}})}var se=T(re,2);{var ce=G=>{var Ee=jo(),De=oe(Ee,!0);$(()=>{te(Ee,"data-failed",e(A).status==="failed"||void 0),te(Ee,"role",e(A).status==="failed"?"alert":"status"),te(Ee,"title",e(A).error),J(De,e(A).status==="failed"?e(A).error??o().attachmentFailed:o().attachmentPending)}),u(G,Ee)};B(se,G=>{e(A).status&&G(ce)})}var w=T(se,2),Se=z(w);{var Ae=G=>{Xe(G,{variant:"primary",size:"icon-sm",class:"tile-action",get disabled(){return i()},get"aria-label"(){return o().retry},tooltipContentClass:"dock-chrome-tooltip",get tooltip(){return o().retry},onclick:()=>v()?.(e(A).id),children:(Ee,De)=>{jt(Ee,{get icon(){return zs},size:16})},$$slots:{default:!0}})};B(Se,G=>{e(A).status==="failed"&&v()&&G(Ae)})}var L=T(Se,2);{let G=s(()=>f.chat_attachmentPreview_remove_ariaLabel({name:e(A).file.name}));n(L,()=>e(A).id,()=>e(G))}R(w),R(Q),$(()=>te(Q,"data-attachment-id",e(A).id)),Sr("keydown",Q,G=>ee(G,e(A))),Sr("contextmenu",Q,G=>le(G,e(A))),Kt(1,Q,()=>qa,()=>({tier:"fast",y:3,scale:.98})),Kt(2,Q,()=>ea,()=>({tier:"fast"})),u(P,Q)},Ce=P=>{const Q=s(()=>e(A).kind==="image"&&!W(e(A))&&e(A).status!=="failed");var re=zu(),se=z(re);{var ce=ve=>{Xe(ve,{type:"button",variant:"ghost",wrapContent:!1,class:"open-tile file",get"aria-label"(){return e(A).name},get disabled(){return i()},onkeydown:Oe=>ae(Oe,e(A).id),children:(Oe,U)=>{var ue=qu(),ot=xe(ue);jt(ot,{get icon(){return Tn},size:20});var xt=T(ot),mt=oe(xt,!0);$(()=>J(mt,e(A).name)),u(Oe,ue)},$$slots:{default:!0}})},w=ve=>{{let Oe=s(()=>E(e(A))),U=s(()=>i()||e(A).kind==="clip"&&(e(A).recording||!e(A).url));Xe(ve,{type:"button",variant:"ghost",wrapContent:!1,class:"open-tile",get"aria-label"(){return e(Oe)},get disabled(){return e(U)},onkeydown:ue=>ee(ue,e(A)),onclick:ue=>{ue.currentTarget instanceof HTMLElement&&ne(e(A),ue.currentTarget)},children:(ue,ot)=>{var xt=Rt(),mt=xe(xt);{var Ft=je=>{var bt=Du();$(()=>te(bt,"src",e(A).url)),u(je,bt)},pt=je=>{var bt=Fu(),at=T(z(bt)),dt=oe(at,!0),$e=T(at);{var ft=K=>{var _=Bu(),he=oe(_,!0);$(()=>J(he,e(A).summary)),u(K,_)};B($e,K=>{e(A).summary&&K(ft)})}R(bt),$(()=>J(dt,e(A).duration)),u(je,bt)};B(mt,je=>{e(A).kind==="image"?je(Ft):je(pt,-1)})}u(ue,xt)},$$slots:{default:!0}})}},Se=s(()=>e(A).kind!=="image"||W(e(A)));B(se,ve=>{e(A).kind==="file"?ve(ce):e(Se)&&ve(w,1)})}var Ae=T(se,2);{var L=ve=>{var Oe=jo(),U=oe(Oe,!0);$(()=>{te(Oe,"data-failed",e(A).status==="failed"||void 0),te(Oe,"role",e(A).status==="failed"?"alert":"status"),te(Oe,"title",e(A).error),J(U,e(A).status==="failed"?e(A).error??o().attachmentFailed:o().attachmentPending)}),u(ve,Oe)};B(Ae,ve=>{(e(A).status||e(Q))&&ve(L)})}var G=T(Ae,2),Ee=z(G);{var De=ve=>{Xe(ve,{variant:"primary",size:"icon-sm",class:"tile-action",get disabled(){return i()},get"aria-label"(){return o().retry},tooltipContentClass:"dock-chrome-tooltip",get tooltip(){return o().retry},onclick:()=>v()?.(e(A).id),children:(Oe,U)=>{jt(Oe,{get icon(){return zs},size:16})},$$slots:{default:!0}})},Je=ve=>{{let Oe=s(()=>c()?o().edit:o().markUp),U=s(()=>c()?o().edit:o().markUp);Xe(ve,{variant:"primary",size:"icon-sm",class:"tile-action",get disabled(){return i()},get"aria-label"(){return e(Oe)},tooltipContentClass:"dock-chrome-tooltip",get tooltip(){return e(U)},onclick:()=>F(e(A).id),children:(ue,ot)=>{Ss(ue,{glyph:"pencil"})},$$slots:{default:!0}})}},Ge=s(()=>W(e(A))),Bt=ve=>{{let Oe=s(()=>c()?o().edit:o().play),U=s(()=>c()?o().edit:o().play);Xe(ve,{variant:"primary",size:"icon-sm",class:"tile-action",get disabled(){return i()},get"aria-label"(){return e(Oe)},tooltipContentClass:"dock-chrome-tooltip",get tooltip(){return e(U)},onclick:ue=>{ue.currentTarget instanceof HTMLElement&&ne(e(A),ue.currentTarget)},children:(ue,ot)=>{{let xt=s(()=>c()?"pencil":"play");Ss(ue,{get glyph(){return e(xt)}})}},$$slots:{default:!0}})}};B(Ee,ve=>{e(A).status==="failed"&&v()?ve(De):e(Ge)?ve(Je,1):e(A).kind==="clip"&&!e(A).recording&&e(A).url&&ve(Bt,2)})}var ke=T(Ee,2);n(ke,()=>e(A).id,()=>o().remove),R(G),R(re),$(()=>{te(re,"data-kind",e(A).kind),te(re,"data-attachment-id",e(A).id),te(re,"aria-busy",e(Q)||void 0)}),Sr("contextmenu",re,ve=>le(ve,e(A))),Kt(1,re,()=>qa,()=>({tier:"fast",y:3,scale:.98})),Kt(2,re,()=>ea,()=>({tier:"fast"})),u(P,re)};B(Te,P=>{e(A).kind==="image"&&e(A).file?P(Be):P(Ce,-1)})}u(pe,ge)}),R(ye),cn(ye,pe=>j(S,pe),()=>e(S)),$(()=>te(ye,"aria-label",o().attachments)),u(O,ye)};B(Re,O=>{e(Y).length&&O(Le)})}var Ke=T(Re,2);{const O=pe=>{var A=Rt(),ge=xe(A);{var Te=Be=>{var Ce=Hu(),P=xe(Ce);{var Q=w=>{Xe(w,{variant:"primary",get disabled(){return i()},onclick:()=>e(M)&&F(e(M).id),children:(Se,Ae)=>{gr();var L=Or();$(()=>J(L,o().markUp)),u(Se,L)},$$slots:{default:!0}})},re=s(()=>W(e(M)));B(P,w=>{e(re)&&w(Q)})}var se=T(P,2);Xe(se,{variant:"secondary",get disabled(){return i()},onclick:()=>e(M)&&q(e(M).id),children:(w,Se)=>{gr();var Ae=Or();$(()=>J(Ae,o().remove)),u(w,Ae)},$$slots:{default:!0}});var ce=T(se,2);Xe(ce,{variant:"ghost-light",onclick:()=>{j(D,!1)},children:(w,Se)=>{gr();var Ae=Or();$(()=>J(Ae,o().done)),u(w,Ae)},$$slots:{default:!0}}),u(Be,Ce)};B(ge,Be=>{e(M)&&e(M).kind!=="file"&&Be(Te)})}u(pe,A)};let ye=s(()=>e(M)?E(e(M)):o().attachments);xi(Ke,{get title(){return e(ye)},size:"wide",showCloseButton:!1,onCloseAutoFocus:pe=>{pe.preventDefault(),X?.isConnected?X.focus():e(S)?.querySelector("button:not(:disabled)")?.focus()},get open(){return e(D)},set open(pe){j(D,pe,!0)},footer:O,children:(pe,A)=>{var ge=Rt(),Te=xe(ge);{var Be=Ce=>{var P=Vu(),Q=z(P);{var re=w=>{var Se=Uu();$(Ae=>{te(Se,"src",e(M).url),te(Se,"alt",Ae)},[()=>E(e(M))]),u(w,Se)},se=s(()=>e(M).kind==="image"&&W(e(M))),ce=w=>{var Se=ju();$(Ae=>{te(Se,"src",e(M).url),te(Se,"aria-label",Ae)},[()=>E(e(M))]),u(w,Se)};B(Q,w=>{e(se)?w(re):e(M).kind==="clip"&&e(M).url&&w(ce,1)})}R(P),u(Ce,P)};B(Te,Ce=>{e(M)&&e(M).kind!=="file"&&Ce(Be)})}u(pe,ge)},$$slots:{footer:!0,default:!0}})}return u(r,_e),At(me)}aa(["keydown","contextmenu"]);var Qu=I("<!> ",1),Zu=I('<div class="flex flex-col gap-2 px-4 py-3 bg-muted/30 border border-border rounded-lg my-4"><div class="flex items-center justify-between gap-2"><div class="flex items-center gap-2"><div class="shrink-0 text-subtle"><!></div> <div class="font-medium text-sm"> </div></div> <div class="flex items-center gap-1"><!> <!></div></div> <div class="text-xs text-subtle"> </div> <pre class="text-xs bg-background/50 rounded p-2 overflow-x-auto max-h-40 overflow-y-auto font-mono"> </pre></div>');function Vi(r,t){if(new.target)return It({component:Vi,...r});Ct(t,!0);let n=g(t,"name",7),a=g(t,"description",7),o=g(t,"content",7),i=g(t,"onUseScript",7),d=we(!1);function c(){navigator.clipboard.writeText(o()),j(d,!0),setTimeout(()=>{j(d,!1)},2e3)}function h(){i()?.({name:n(),description:a(),content:o()})}var v={get name(){return n()},set name(C){n(C),m()},get description(){return a()},set description(C){a(C),m()},get content(){return o()},set content(C){o(C),m()},get onUseScript(){return i()},set onUseScript(C){i(C),m()},$set:St,$on:(C,ee)=>Tt(t,C,ee)},b=Zu(),k=z(b),N=z(k),Y=z(N),S=z(Y);jt(S,{get icon(){return no},size:"sm"}),R(Y);var D=T(Y,2),ie=oe(D,!0);R(N);var X=T(N,2),M=z(X);Xe(M,{variant:"ghost-light",size:"sm",onclick:c,class:"h-7 px-2",children:(C,ee)=>{var le=Qu(),me=xe(le);{let Re=s(()=>e(d)?bi:wi);jt(me,{get icon(){return e(Re)},class:"mr-1"})}var _e=T(me);$(Re=>J(_e,` ${Re??""}`),[()=>e(d)?f.chat_shared_copied_label():f.chat_shared_copy_label()]),u(C,le)},$$slots:{default:!0}});var W=T(M,2);{var E=C=>{Xe(C,{variant:"ghost-light",size:"sm",onclick:h,class:"h-7 px-2",children:(ee,le)=>{gr();var me=Or();$(_e=>J(me,_e),[()=>f.chat_setupScriptCard_useScript_label()]),u(ee,me)},$$slots:{default:!0}})};B(W,C=>{i()&&C(E)})}R(X),R(k);var ne=T(k,2),q=oe(ne,!0),F=T(ne,2),ae=oe(F,!0);return R(b),$(()=>{J(ie,n()),J(q,a()),J(ae,o())}),u(r,b),At(v)}const wr={toolStart:/(?:\x1B\[\d+m)?🔧\s+(?:Tool call:\s+)?(.+?)(?:\x1B\[0m)?$/,toolDetail:/(?:[└├]─\s+(.+)$|^\s{3,}(.+)$)/,toolResult:/(?:\x1B\[\d+m)?📋\s+Tool result:\s+(.+?)(?:\x1B\[0m)?$/,toolSuccess:/[✓✔✅]\s+(.+)$/,toolError:/[❌✗❎]\s+(.+)$/,sessionInfo:/[Ss]ession:\s*([a-f0-9-]+)/,resumedSession:/📂?\s*Resumed session/i,assistantMarker:/🤖/,systemMarker:/💻/,userMarker:/👤/,thinkingMarker:/🤔\s*Thinking/i,waitingMarker:/^⏳\s+Running/i,indexingProgress:/^Indexing:\s*\[.*\]\s*\d+%/,agentDigest:/<agent_digest>([\s\S]*?)<\/agent_digest>/,setupScript:/<setup_script\s+name="([^"]+)"\s+description="([^"]+)">([\s\S]*?)<\/setup_script>/};class Ju{constructor(){kn(this,"buffer","");kn(this,"currentToolName",null);kn(this,"currentToolId",null);kn(this,"lastToolId",null);kn(this,"currentToolParams",[]);kn(this,"currentToolResultContent",[]);kn(this,"inToolResult",!1);kn(this,"inCodeBlock",!1);kn(this,"codeBlockLanguage","");kn(this,"codeBlockContent","");kn(this,"characterBuffer","");kn(this,"inCharacterMode",!1);kn(this,"emittedToolIds",new Set)}parseChunk(t){if(this.isMarkerLine(t.trim())){const o=[];if(this.inToolResult&&this.currentToolResultContent.length>0){const c=this.currentToolResultContent.some(v=>v.startsWith("❌")||v.startsWith("Error:")),h=this.currentToolResultContent.map(v=>v.replace(/^❌\s*/,"").replace(/^Error:\s*/,"")).join(`
|
|
2
2
|
`);o.push({type:"tool_result",content:h,metadata:{toolId:this.currentToolId,isError:c}}),this.lastToolId=this.currentToolId,this.currentToolId=null,this.inToolResult=!1,this.currentToolResultContent=[]}const i=t.indexOf("🤖"),d=t.substring(i+2);if(this.inCharacterMode=!0,this.characterBuffer="",d&&d.trim()&&d!==`
|
|
3
3
|
`){const c=d.replace(/^\n/,"");c&&(this.characterBuffer=c)}return o}if(this.inCharacterMode){if(t.trim()===""&&this.characterBuffer==="")return[];if(t.includes(`
|
|
4
4
|
`)&&this.characterBuffer.length>0){const o=t.substring(0,t.indexOf(`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{p as e}from"./
|
|
1
|
+
import{p as e}from"./COO6ldt4.js";const t=[{id:"editorial-card",title:"Editorial card states",states:["default","group","inline","outlined","separated","selected","fluid-hover","header","flush-content","interactive","pressed","empty","long-content","compact","zoom-200","inert","light","dark","reduced-motion"],themes:["light","dark"],viewport:"both",reducedMotion:!0}];e({id:"card",source:"src/lib/components/ui/card/card.svelte",publicImport:"$lib/components/ui/card",legacyImports:[],exports:["Action","CARD_CONTENT_INSET_CLASS","CARD_ROW_GUTTER_CLASS","Card","CardAction","CardContent","CardDescription","CardFooter","CardGroup","CardHeader","CardTitle","Content","Description","Footer","Group","Header","Root","Title","cardMetadata"],usage:`<script lang="ts">
|
|
2
2
|
import * as Card from '$lib/components/ui/card';
|
|
3
3
|
<\/script>
|
|
4
4
|
|