@intent-hq/web 2.357.5 → 2.358.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/web/app/immutable/chunks/{DjAk5kVg.js → -kRuCO2W.js} +1 -1
- package/web/app/immutable/chunks/{BQBELrK8.js → 4qV-3jgp.js} +1 -1
- package/web/app/immutable/chunks/{BYJ8RYZY.js → 51mPy8SN.js} +1 -1
- package/web/app/immutable/chunks/{Oyv13Qiy.js → 5uoxxRrI.js} +1 -1
- package/web/app/immutable/chunks/{DG3WDlq-.js → 6M8_bOmN.js} +1 -1
- package/web/app/immutable/chunks/{Deb9adiR.js → A6hJVKP1.js} +1 -1
- package/web/app/immutable/chunks/{ejm--nzP.js → AXctOpQN.js} +1 -1
- package/web/app/immutable/chunks/{D3Rn6g6v.js → B--u_2Nc.js} +2 -2
- package/web/app/immutable/chunks/{B9uFsQO_.js → B1YqGJC0.js} +4 -4
- package/web/app/immutable/chunks/{CepTMMxo.js → B21KgEqG.js} +1 -1
- package/web/app/immutable/chunks/{CpbXIHWP.js → B39I5OLS.js} +1 -1
- package/web/app/immutable/chunks/{VWARWUyw.js → B72tYG46.js} +4 -4
- package/web/app/immutable/chunks/{D5P99waS.js → B7XrY5h-.js} +1 -1
- package/web/app/immutable/chunks/{CB5CVvIg.js → BAPNccEM.js} +1 -1
- package/web/app/immutable/chunks/{DwdAFMs6.js → BAnyU7RO.js} +4 -4
- package/web/app/immutable/chunks/{D52fecD7.js → BCRcMJ-W.js} +1 -1
- package/web/app/immutable/chunks/{Dn1W0Y6I.js → BDS5fuDA.js} +3 -3
- package/web/app/immutable/chunks/{BPRVG6k-.js → BECt4TTe.js} +1 -1
- package/web/app/immutable/chunks/{Di-it7y2.js → BEwavXhY.js} +1 -1
- package/web/app/immutable/chunks/{D1LanoIo.js → BGUCuT7q.js} +1 -1
- package/web/app/immutable/chunks/{CDLLVu20.js → BI5bMZSW.js} +1 -1
- package/web/app/immutable/chunks/{B4WNkghA.js → BJzXpdtH.js} +1 -1
- package/web/app/immutable/chunks/{Czt_AdsD.js → BK68KdNc.js} +1 -1
- package/web/app/immutable/chunks/{DhnPdhLH.js → BOz86KDw.js} +1 -1
- package/web/app/immutable/chunks/{Dd0GRPZW.js → BQ8X2LHt.js} +1 -1
- package/web/app/immutable/chunks/{CCPIWPlX.js → BUq4flUY.js} +3 -3
- package/web/app/immutable/chunks/{yHUOSXrf.js → BYPGFyPj.js} +1 -1
- package/web/app/immutable/chunks/{D471hSlY.js → B_8PQmWM.js} +1 -1
- package/web/app/immutable/chunks/{DnKl4bfl.js → Bafh2cjd.js} +1 -1
- package/web/app/immutable/chunks/{ByzmHTuF.js → BdYsGCQ_.js} +1 -1
- package/web/app/immutable/chunks/{DU5JIBjp.js → BeYq4r24.js} +1 -1
- package/web/app/immutable/chunks/{BCb2Hynx.js → BfQXVs1y.js} +1 -1
- package/web/app/immutable/chunks/{BZQMWVq2.js → BfkeWNeb.js} +1 -1
- package/web/app/immutable/chunks/{Bd8jLsTN.js → BgRBcaUo.js} +1 -1
- package/web/app/immutable/chunks/{C9AQUTrX.js → BhL5eL8L.js} +1 -1
- package/web/app/immutable/chunks/{N0DQzoVo.js → BjAL1UGr.js} +1 -1
- package/web/app/immutable/chunks/BkA84tNB.js +1 -0
- package/web/app/immutable/chunks/{CrI50RYR.js → BlcLvSv0.js} +1 -1
- package/web/app/immutable/chunks/{CrdWfEsG.js → Bmbt3TeR.js} +1 -1
- package/web/app/immutable/chunks/{C9Gi_ykP.js → Bmq2l9Xx.js} +1 -1
- package/web/app/immutable/chunks/{XxrpDha8.js → BoLczGrE.js} +1 -1
- package/web/app/immutable/chunks/{B40EQFF1.js → BoTvEsBS.js} +1 -1
- package/web/app/immutable/chunks/{Du6fZ610.js → BoZRF0Rb.js} +2 -2
- package/web/app/immutable/chunks/{GNBTf9n2.js → BonEtgBU.js} +1 -1
- package/web/app/immutable/chunks/{WA5aF6nq.js → BrZfxmOm.js} +1 -1
- package/web/app/immutable/chunks/{DaFADtX2.js → Bre5dDRa.js} +1 -1
- package/web/app/immutable/chunks/{doMsOb8h.js → Bt2zHtMa.js} +4 -4
- package/web/app/immutable/chunks/{CWvv3NtN.js → Bu2DF6bU.js} +1 -1
- package/web/app/immutable/chunks/{CkqMzcAU.js → BuuNmCxr.js} +1 -1
- package/web/app/immutable/chunks/{CEiAdjWq.js → Bwi005HJ.js} +1 -1
- package/web/app/immutable/chunks/{DLfUjnGm.js → BxMfB3uU.js} +1 -1
- package/web/app/immutable/chunks/{CBkni_u0.js → C-NPSxo2.js} +1 -1
- package/web/app/immutable/chunks/{PO83wZCL.js → C1sOJyFR.js} +1 -1
- package/web/app/immutable/chunks/{kkAUANeA.js → C3RH3nH_.js} +1 -1
- package/web/app/immutable/chunks/{yrOFcITJ.js → C3lgXrJt.js} +1 -1
- package/web/app/immutable/chunks/{rXzX5xZR.js → C3rj6Dod.js} +1 -1
- package/web/app/immutable/chunks/{D3EfSPo3.js → C4Mn0Hb-.js} +1 -1
- package/web/app/immutable/chunks/{BbN1PgGi.js → C4eFP2Zv.js} +1 -1
- package/web/app/immutable/chunks/{AyjU69sJ.js → C7xPtEkO.js} +1 -1
- package/web/app/immutable/chunks/{C5G99nVB.js → C9LROoRU.js} +31 -31
- package/web/app/immutable/chunks/{CqHhPGmA.js → C9OoGyJu.js} +1 -1
- package/web/app/immutable/chunks/{CdvjbMBZ.js → CB6GZsrQ.js} +1 -1
- package/web/app/immutable/chunks/{CBPLWyQ8.js → CD4BYSPy.js} +1 -1
- package/web/app/immutable/chunks/{BDG2v-O6.js → CDVUC5qK.js} +1 -1
- package/web/app/immutable/chunks/{CKjYWqEJ.js → CE70dsdv.js} +1 -1
- package/web/app/immutable/chunks/{AZ8Xy_Xh.js → CEGk06kt.js} +2 -2
- package/web/app/immutable/chunks/{D-jxMveW.js → CFa2NaXM.js} +1 -1
- package/web/app/immutable/chunks/{HwJSjKPR.js → CHFBgXBI.js} +3 -3
- package/web/app/immutable/chunks/{CvdR6Bd_.js → CIkMa8dp.js} +1 -1
- package/web/app/immutable/chunks/{CmcfBlnY.js → CKI1_bv0.js} +1 -1
- package/web/app/immutable/chunks/{DxlrzlUO.js → CKte-e5A.js} +1 -1
- package/web/app/immutable/chunks/{CjlM36lq.js → CLXYd9_V.js} +1 -1
- package/web/app/immutable/chunks/{DT0KOxBR.js → CM4ereyg.js} +1 -1
- package/web/app/immutable/chunks/{COHdP7EQ.js → CM_58O-V.js} +1 -1
- package/web/app/immutable/chunks/{fsmCJ9E9.js → CQKd4mJk.js} +1 -1
- package/web/app/immutable/chunks/{CjPqlWA8.js → CQhHtQK8.js} +1 -1
- package/web/app/immutable/chunks/{BD71gD4J.js → CSHLIIcV.js} +1 -1
- package/web/app/immutable/chunks/{CKWWK9AG.js → CSK-Ks7E.js} +2 -2
- package/web/app/immutable/chunks/{ocohHyhc.js → CSQeGAbZ.js} +1 -1
- package/web/app/immutable/chunks/{C7tJ8OXj.js → CU48trLA.js} +1 -1
- package/web/app/immutable/chunks/{D_rjCUs4.js → CV1tpNrG.js} +1 -1
- package/web/app/immutable/chunks/{qFl3oWnR.js → CVK5BOxJ.js} +1 -1
- package/web/app/immutable/chunks/{D0V81fq2.js → CWq1oZWc.js} +1 -1
- package/web/app/immutable/chunks/{DJQD2qGi.js → CXak2CWS.js} +1 -1
- package/web/app/immutable/chunks/{Djq26kWU.js → CY8reJZf.js} +1 -1
- package/web/app/immutable/chunks/{DepfqAOx.js → Ca9Vj8X7.js} +1 -1
- package/web/app/immutable/chunks/{Dk3D2qRF.js → CaSPRIlD.js} +1 -1
- package/web/app/immutable/chunks/{B--8cA8U.js → Cbqe96Su.js} +1 -1
- package/web/app/immutable/chunks/CdSvrLOZ.js +1 -0
- package/web/app/immutable/chunks/{BL1a9dAQ.js → CdjS2YHF.js} +1 -1
- package/web/app/immutable/chunks/{G1wxRXy_.js → CevP3sLy.js} +1 -1
- package/web/app/immutable/chunks/{BCqeyLEa.js → Cgbm4X7X.js} +1 -1
- package/web/app/immutable/chunks/{5cZE-Bb1.js → Chs5DYDz.js} +1 -1
- package/web/app/immutable/chunks/{BmvbrR5U.js → CiDOKjBy.js} +1 -1
- package/web/app/immutable/chunks/{Btd6UQfU.js → CjuCfT-H.js} +1 -1
- package/web/app/immutable/chunks/{BslfCNif.js → Cl6etYZ6.js} +1 -1
- package/web/app/immutable/chunks/{CuG3zmBQ.js → Cld1FvNn.js} +1 -1
- package/web/app/immutable/chunks/{DLZwi7N_.js → Coz3Oj0D.js} +1 -1
- package/web/app/immutable/chunks/{vFmgUcY-.js → Cp-V-kX1.js} +1 -1
- package/web/app/immutable/chunks/{CkfQIblp.js → CpjcO2UG.js} +1 -1
- package/web/app/immutable/chunks/{BjdDije1.js → CrVg-aIz.js} +1 -1
- package/web/app/immutable/chunks/{3E3FFIBp.js → D-WYdZmt.js} +1 -1
- package/web/app/immutable/chunks/{CMK6nD4P.js → D0OCVTi-.js} +3 -3
- package/web/app/immutable/chunks/{DzPu3hXf.js → D11PDukO.js} +1 -1
- package/web/app/immutable/chunks/{CtQODp8h.js → D1EdV32Z.js} +3 -3
- package/web/app/immutable/chunks/{Dtd8hHcj.js → D22mDMme.js} +1 -1
- package/web/app/immutable/chunks/{DNj5HeWT.js → D2HdgcKm.js} +1 -1
- package/web/app/immutable/chunks/{BgvNw2ix.js → D4JuvJNp.js} +1 -1
- package/web/app/immutable/chunks/{DY9qQwsB.js → D6fddbvu.js} +1 -1
- package/web/app/immutable/chunks/D6jebcOi.js +1 -0
- package/web/app/immutable/chunks/{DGeJx6D0.js → D7NtVhAr.js} +1 -1
- package/web/app/immutable/chunks/{buk5RAoP.js → D7lNUU6C.js} +1 -1
- package/web/app/immutable/chunks/{L73m0JEz.js → D83kA8oL.js} +2 -2
- package/web/app/immutable/chunks/{DblIbdBw.js → D90JUNRF.js} +1 -1
- package/web/app/immutable/chunks/{fvC-6LgA.js → D98guX46.js} +1 -1
- package/web/app/immutable/chunks/{kDhfBVjP.js → D9pex3XI.js} +1 -1
- package/web/app/immutable/chunks/{lV2DHKlu.js → DC7_gAhS.js} +1 -1
- package/web/app/immutable/chunks/{YglZqzQH.js → DEnGZxZ_.js} +1 -1
- package/web/app/immutable/chunks/{DcNaMmNl.js → DFPzxECW.js} +1 -1
- package/web/app/immutable/chunks/{0fyWevd4.js → DH2Upu6c.js} +1 -1
- package/web/app/immutable/chunks/{CbOr2Wo7.js → DHlDoleO.js} +1 -1
- package/web/app/immutable/chunks/{CJ5wd9GV.js → DIPuiSIu.js} +1 -1
- package/web/app/immutable/chunks/{Z89jOfre.js → DJ0Jx38f.js} +1 -1
- package/web/app/immutable/chunks/{DFHDo6Bi.js → DJ_p0OFU.js} +1 -1
- package/web/app/immutable/chunks/{Coi-YeL3.js → DLimNxdW.js} +1 -1
- package/web/app/immutable/chunks/{CvCvufVJ.js → DMFMx3nl.js} +1 -1
- package/web/app/immutable/chunks/{Cax0Mn2M.js → DMXfYyb6.js} +1 -1
- package/web/app/immutable/chunks/{JLBeR_lu.js → DN7oXRlP.js} +1 -1
- package/web/app/immutable/chunks/{CkxlqZls.js → DPKwA49z.js} +2 -2
- package/web/app/immutable/chunks/{BZCr6ykZ.js → DPk0hNVC.js} +1 -1
- package/web/app/immutable/chunks/{On9oBe3C.js → DQqi7m2D.js} +1 -1
- package/web/app/immutable/chunks/{_XUW51Cy.js → DR11idWf.js} +1 -1
- package/web/app/immutable/chunks/{byhfHhUo.js → DSqWFvtc.js} +1 -1
- package/web/app/immutable/chunks/{BqRgQbJq.js → DVgQbSSY.js} +1 -1
- package/web/app/immutable/chunks/{BdlgOWZv.js → DVmH_mdJ.js} +1 -1
- package/web/app/immutable/chunks/{BOpfuH36.js → DZ_5eRdK.js} +1 -1
- package/web/app/immutable/chunks/{glaRhtwK.js → DZmWXrCy.js} +2 -2
- package/web/app/immutable/chunks/{Djx7tjiF.js → D_6coCxv.js} +1 -1
- package/web/app/immutable/chunks/{DNnYGTTZ.js → DbmNxzez.js} +1 -1
- package/web/app/immutable/chunks/{C2Dp-Wl8.js → De-23Gnq.js} +1 -1
- package/web/app/immutable/chunks/{CcoWXdk5.js → De3GtDyW.js} +1 -1
- package/web/app/immutable/chunks/{CyVE_a1Z.js → DfFnGsMp.js} +1 -1
- package/web/app/immutable/chunks/{CgH2fhQZ.js → DgCFRQUb.js} +1 -1
- package/web/app/immutable/chunks/{Cn80JY_U.js → DhuTnbBI.js} +1 -1
- package/web/app/immutable/chunks/{CgmFGCOs.js → Di6UqIba.js} +1 -1
- package/web/app/immutable/chunks/{DzLCtzaZ.js → DifIxf0d.js} +1 -1
- package/web/app/immutable/chunks/{BOXzTbe3.js → DkHPIJea.js} +1 -1
- package/web/app/immutable/chunks/{C0yEwiys.js → DlJukBla.js} +1 -1
- package/web/app/immutable/chunks/{BTU_oKHo.js → DlQfuVhT.js} +1 -1
- package/web/app/immutable/chunks/{NUieU9w-.js → DlX8LW3G.js} +1 -1
- package/web/app/immutable/chunks/{Cf7gW7aB.js → DmSaqClG.js} +1 -1
- package/web/app/immutable/chunks/{DiFdx5oB.js → DokMbojI.js} +1 -1
- package/web/app/immutable/chunks/{Cv7PDz7N.js → DrzNBKRX.js} +1 -1
- package/web/app/immutable/chunks/{DQ6qUzf1.js → Ds6w291j.js} +1 -1
- package/web/app/immutable/chunks/{Bggds_Lj.js → DtBQtTbR.js} +1 -1
- package/web/app/immutable/chunks/{Cg1IDzIA.js → DusCCxOz.js} +1 -1
- package/web/app/immutable/chunks/{F6JYuVa2.js → DvOPTg8o.js} +1 -1
- package/web/app/immutable/chunks/{DBLkjlmS.js → DxjLRZie.js} +1 -1
- package/web/app/immutable/chunks/{x7yWobyq.js → DyY04EMd.js} +1 -1
- package/web/app/immutable/chunks/{CWfbH15T.js → DzV2tP7D.js} +1 -1
- package/web/app/immutable/chunks/{CJsbK-x_.js → EIfr2WPF.js} +1 -1
- package/web/app/immutable/chunks/{BrYUi9M4.js → EUhChSgv.js} +1 -1
- package/web/app/immutable/chunks/{CP1rOWJf.js → HTMQjphG.js} +1 -1
- package/web/app/immutable/chunks/{D2qgPGPl.js → Hn8VNjVU.js} +1 -1
- package/web/app/immutable/chunks/{De27JRFf.js → MVAiW-hJ.js} +1 -1
- package/web/app/immutable/chunks/OnVg69qn.js +1 -0
- package/web/app/immutable/chunks/{6gXfEeGO.js → QThbrY7P.js} +1 -1
- package/web/app/immutable/chunks/{Dy7XitXS.js → QoEJNfmE.js} +2 -2
- package/web/app/immutable/chunks/{d5Uq64N6.js → RXp9Ya1-.js} +1 -1
- package/web/app/immutable/chunks/{CV_50DRv.js → SvsTsrhb.js} +1 -1
- package/web/app/immutable/chunks/{C72TMHEI.js → Vl66GswY.js} +1 -1
- package/web/app/immutable/chunks/{DdLb4YD1.js → _Ak2VoUq.js} +1 -1
- package/web/app/immutable/chunks/{CMGOeDRU.js → _NdW2WBC.js} +2 -2
- package/web/app/immutable/chunks/{DGx3tKbO.js → _bOTv1mB.js} +1 -1
- package/web/app/immutable/chunks/{D05xLrNx.js → d0funJ1P.js} +1 -1
- package/web/app/immutable/chunks/{C0Yhbcvw.js → ek2C_PyH.js} +1 -1
- package/web/app/immutable/chunks/{Cu8PqUia.js → ev7flkaM.js} +1 -1
- package/web/app/immutable/chunks/{DgMHJRTi.js → evZTPwS7.js} +4 -4
- package/web/app/immutable/chunks/{BQyjLiC0.js → gfWJw24O.js} +1 -1
- package/web/app/immutable/chunks/{BiL4QTcV.js → i4GmiVMD.js} +1 -1
- package/web/app/immutable/chunks/ikBj1eYj.js +1 -0
- package/web/app/immutable/chunks/{DIbhT_40.js → pgv9jNmm.js} +1 -1
- package/web/app/immutable/chunks/{Cnd1Toz7.js → pwWESNJZ.js} +1 -1
- package/web/app/immutable/chunks/{Ctf7Dmj8.js → rTUEOx0p.js} +2 -2
- package/web/app/immutable/chunks/{D_wC6Fqe.js → uFuCUyKk.js} +1 -1
- package/web/app/immutable/chunks/{DXWj1WUy.js → v1s2zbkS.js} +1 -1
- package/web/app/immutable/chunks/{Zl6q5v_F.js → v_4lRRTK.js} +1 -1
- package/web/app/immutable/chunks/{ByvADqYQ.js → x3PmW7lX.js} +1 -1
- package/web/app/immutable/chunks/{oZSR7jB5.js → xe2H3EkW.js} +2 -2
- package/web/app/immutable/chunks/{C9iqPxLd.js → yiVXShkh.js} +1 -1
- package/web/app/immutable/chunks/{BfQMGn9-.js → zK_pBQnY.js} +1 -1
- package/web/app/immutable/chunks/{DgebLBJ3.js → zgW9h7_p.js} +2 -2
- package/web/app/immutable/entry/{app.DgJ9n1oL.js → app.CbA16NuX.js} +2 -2
- package/web/app/immutable/entry/start.Bk8Z1djZ.js +1 -0
- package/web/app/immutable/nodes/{0.Dyl0nNbk.js → 0.BasYUO8v.js} +1 -1
- package/web/app/immutable/nodes/{1.CRLYaZ63.js → 1.CIO3OA-k.js} +1 -1
- package/web/app/immutable/nodes/{10.DxPon5wB.js → 10.CFi8hf1p.js} +1 -1
- package/web/app/immutable/nodes/{12.zW0eyaJh.js → 12.5Zegs-e7.js} +1 -1
- package/web/app/immutable/nodes/{13.BC8MED3o.js → 13.C6rcyOvO.js} +1 -1
- package/web/app/immutable/nodes/{14.B4mlyc1_.js → 14.BshK7qxH.js} +1 -1
- package/web/app/immutable/nodes/{15.BMXR1gHR.js → 15.Xbhs2JLI.js} +1 -1
- package/web/app/immutable/nodes/{16.vNaF6DA8.js → 16.D1Kda7eS.js} +1 -1
- package/web/app/immutable/nodes/{17.MrvR2td2.js → 17.BWDMPbmT.js} +1 -1
- package/web/app/immutable/nodes/{18.8z39u87k.js → 18.C5ulMwTp.js} +2 -2
- package/web/app/immutable/nodes/{2.BA0oK1QI.js → 2.BNqRZUPf.js} +11 -11
- package/web/app/immutable/nodes/{3.BR33xGjs.js → 3.Cvuu_muM.js} +1 -1
- package/web/app/immutable/nodes/{4.Cd06_jG8.js → 4.DN_ujY3l.js} +1 -1
- package/web/app/immutable/nodes/{5.C8pevtne.js → 5.Dec4Arss.js} +1 -1
- package/web/app/immutable/nodes/{6.haMdZkdJ.js → 6.DpEHMH4c.js} +1 -1
- package/web/app/immutable/nodes/{7.qUwyypfP.js → 7.Dv3u39NY.js} +1 -1
- package/web/app/immutable/nodes/{8.B9LxN_HF.js → 8.J1fqiqGl.js} +4 -4
- package/web/app/immutable/nodes/{9.CuzqllGK.js → 9.Du0PNcOn.js} +5 -5
- package/web/app/version.json +1 -1
- package/web/index.html +15 -15
- package/web/app/immutable/chunks/9bhdf_gz.js +0 -1
- package/web/app/immutable/chunks/BGikh8Vc.js +0 -1
- package/web/app/immutable/chunks/BbcaUswI.js +0 -1
- package/web/app/immutable/chunks/Dnem51XN.js +0 -1
- package/web/app/immutable/chunks/WtQ21IhK.js +0 -1
- package/web/app/immutable/entry/start.4H5rT-16.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
var Me=Object.defineProperty;var De=(i,s,e)=>s in i?Me(i,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[s]=e;var m=(i,s,e)=>De(i,typeof s!="symbol"?s+"":s,e);import{x as Ne,J as oe,Z as ce,ai as q,ar as Ce}from"./HwJSjKPR.js";import{bY as Le,cX as le,co as ue,cn as ve}from"./DepfqAOx.js";import{II as p,Bq as we,bz as be,e as Fe,KL as de,ia as me,bL as ke,Dl as z,BP as Ge,f8 as Pe,zV as xe,dV as Ee,f4 as fe,dU as _e,Ao as Ve,Kp as Ue,vZ as Be}from"./fvC-6LgA.js";import{aC as Ae,dH as he,A as H,P as ge,ay as K}from"./COHdP7EQ.js";import{h as $e}from"./CkxlqZls.js";import{c as W}from"./ChTqQfQN.js";import{a as Xe}from"./BdWqymET.js";import{k as Q}from"./F6JYuVa2.js";import"./DYhIMPy1.js";import{bm as n}from"./BkP7iWmk.js";import"./DdeuoyZB.js";import"./C400w5jq.js";import"./DY9qQwsB.js";import{R as Re}from"./BvFAWM27.js";import{L as Ye}from"./CSiaiLHL.js";function We(i,s){return i.some(e=>e.id===s.id)?i.map(e=>e.id===s.id?{...s,...s.author==null&&e.author!==void 0?{author:e.author}:{}}:e):[...i,s]}const Z=typeof performance<"u"?performance:{now:()=>Date.now()},V=new Xe("PerformanceOptimizer"),w=class w{constructor(){m(this,"metricsBuffer");m(this,"metricsIndex",0);m(this,"metricsCount",0);m(this,"MAX_METRICS",500);m(this,"TARGET_RESPONSE_TIME",100);m(this,"memoCache",new Map);m(this,"MEMO_TTL",6e4);m(this,"MAX_CACHE_SIZE",100);m(this,"cacheHits",0);m(this,"cacheMisses",0);m(this,"pendingRequests",new Map);m(this,"requestQueue",[]);m(this,"cleanupInterval",null);this.metricsBuffer=new Array(this.MAX_METRICS).fill(null),this.startCacheCleanup(),V.info("PerformanceOptimizer initialized")}static getInstance(){return w.instance||(w.instance=new w),w.instance}reset(){this.metricsBuffer=new Array(this.MAX_METRICS).fill(null),this.metricsIndex=0,this.metricsCount=0,this.memoCache.clear(),this.pendingRequests.clear(),this.requestQueue=[],this.cacheHits=0,this.cacheMisses=0}clearCache(){this.memoCache.clear(),this.cacheHits=0,this.cacheMisses=0}async processBatch(s,e,t={}){const{batchSize:r=10,concurrency:a=4}=t,l=[];for(let c=0;c<s.length;c+=r){const f=s.slice(c,c+r).map((o,R)=>{const g=Math.floor(R/a)*10;return new Promise(d=>{setTimeout(async()=>{const k=await e(o);d(k)},g)})}),u=await Promise.all(f);l.push(...u)}return l}startCacheCleanup(){this.cleanupInterval=setInterval(()=>{this.cleanupCache()},3e4)}stopCacheCleanup(){this.cleanupInterval&&(clearInterval(this.cleanupInterval),this.cleanupInterval=null)}cleanupCache(){const s=Date.now(),e=[];this.memoCache.forEach((t,r)=>{s-t.timestamp>this.MEMO_TTL&&e.push(r)}),e.forEach(t=>this.memoCache.delete(t)),this.memoCache.size>this.MAX_CACHE_SIZE&&Array.from(this.memoCache.entries()).sort((a,l)=>a[1].hits-l[1].hits||a[1].timestamp-l[1].timestamp).slice(0,this.memoCache.size-this.MAX_CACHE_SIZE).forEach(([a])=>this.memoCache.delete(a))}async track(s,e,t={}){const r=Z.now();try{const a=t.cacheKey||s;if(t.memoize){const f=this.getMemoized(a);if(f!==void 0)return this.cacheHits++,V.debug("Memoized result used",{operation:s,cacheKey:a,hits:this.cacheHits}),f;this.cacheMisses++}if(t.coalesce){const f=this.pendingRequests.get(s);if(f)return V.debug("Request coalesced",{operation:s}),f}let l;t.coalesce?(l=t.timeout?this.withTimeout(e(),t.timeout):e(),this.pendingRequests.set(s,l)):l=t.timeout?this.withTimeout(e(),t.timeout):e();const c=await l;t.memoize&&this.memoize(a,c);const E=Z.now()-r;return this.recordMetric(s,E,!0,{strategy:t.priority||"normal",memoized:t.memoize||!1,coalesced:t.coalesce||!1}),E>this.TARGET_RESPONSE_TIME&&V.warn("Operation exceeded target time",{operation:s,duration:Math.round(E),target:this.TARGET_RESPONSE_TIME}),c}catch(a){const l=Z.now()-r;throw this.recordMetric(s,l,!1,{error:a instanceof Error?a.message:"Unknown error"}),a}finally{t.coalesce&&this.pendingRequests.delete(s)}}getStats(){if(this.metricsCount===0)return{avgResponseTime:0,p95ResponseTime:0,p99ResponseTime:0,successRate:100,slowOperations:[]};const s=[],e=this.metricsCount<this.MAX_METRICS?0:this.metricsIndex;for(let u=0;u<this.metricsCount;u++){const o=this.metricsBuffer[(e+u)%this.MAX_METRICS];o&&s.push(o)}if(s.length===0)return{avgResponseTime:0,p95ResponseTime:0,p99ResponseTime:0,successRate:100,slowOperations:[]};const t=s.sort((u,o)=>u.duration-o.duration);let r=0,a=0;const l=new Set;for(const u of s)a+=u.duration,u.success&&r++,u.duration>this.TARGET_RESPONSE_TIME&&l.add(u.operation);const c=a/s.length,E=Math.floor(t.length*.95),f=Math.floor(t.length*.99);return{avgResponseTime:Math.round(c),p95ResponseTime:Math.round(t[E]?.duration||0),p99ResponseTime:Math.round(t[f]?.duration||0),successRate:r/s.length*100,slowOperations:Array.from(l)}}getCacheStats(){const s=this.cacheHits+this.cacheMisses;return{size:this.memoCache.size,hitRate:s>0?this.cacheHits/s*100:0,hits:this.cacheHits,misses:this.cacheMisses}}getMemoized(s){const e=this.memoCache.get(s);if(e){if(Date.now()-e.timestamp>this.MEMO_TTL){this.memoCache.delete(s);return}return e.hits++,e.value}}memoize(s,e){const t=JSON.stringify(e).length;this.memoCache.set(s,{value:e,timestamp:Date.now(),hits:0,size:t}),this.memoCache.size>this.MAX_CACHE_SIZE&&this.cleanupCache()}async withTimeout(s,e){return Promise.race([s,new Promise((t,r)=>setTimeout(()=>r(new Error(`Operation timed out after ${e}ms`)),e))])}recordMetric(s,e,t,r){this.metricsBuffer[this.metricsIndex]={operation:s,duration:e,timestamp:Date.now(),success:t,metadata:r},this.metricsIndex=(this.metricsIndex+1)%this.MAX_METRICS,this.metricsCount<this.MAX_METRICS&&this.metricsCount++,e>this.TARGET_RESPONSE_TIME&&V.warn("Slow operation detected",{operation:s,duration:`${e.toFixed(2)}ms`,target:`${this.TARGET_RESPONSE_TIME}ms`,metadata:r})}};m(w,"instance");let ee=w;const qe=ee.getInstance(),pe={AGENT_CREATION:"https://docs.example.com/agent-creation",STREAMING:"https://docs.example.com/streaming-issues",STORAGE:"https://docs.example.com/storage-troubleshooting",MEMORY:"https://docs.example.com/memory-management",PROVIDER:"https://docs.example.com/provider-setup",GENERAL:"https://docs.example.com/help"},j={get AGENT_CREATION_FAILED(){return n.errors_catalog_agentCreationFailed_template({agentName:"{agentName}",details:"{details}"})},get AGENT_ALREADY_EXISTS(){return n.errors_catalog_agentAlreadyExists_template({agentName:"{agentName}"})},get INVALID_AGENT_CONFIG(){return n.errors_catalog_invalidAgentConfig_template({details:"{details}"})},get INVALID_CONFIG(){return n.errors_catalog_invalidConfig_template({details:"{details}"})},get SESSION_NOT_FOUND(){return n.errors_catalog_sessionNotFound_template({sessionId:"{sessionId}"})},get SESSION_ALREADY_ACTIVE(){return n.errors_catalog_sessionAlreadyActive_template()},get SESSION_INITIALIZATION_FAILED(){return n.errors_catalog_sessionInitializationFailed_template({details:"{details}"})},get STREAM_CONNECTION_FAILED(){return n.errors_catalog_streamConnectionFailed_template({details:"{details}"})},get STREAM_TIMEOUT(){return n.errors_catalog_streamTimeout_template({timeout:"{timeout}"})},get STREAM_INTERRUPTED(){return n.errors_catalog_streamInterrupted_template({attempt:"{attempt}",maxAttempts:"{maxAttempts}"})},get STREAM_RECOVERY_FAILED(){return n.errors_catalog_streamRecoveryFailed_template({attempts:"{attempts}"})},get MESSAGE_SEND_FAILED(){return n.errors_catalog_messageSendFailed_template({details:"{details}"})},get MESSAGE_VALIDATION_FAILED(){return n.errors_catalog_messageValidationFailed_template({details:"{details}"})},get MESSAGE_TOO_LONG(){return n.errors_catalog_messageTooLong_template({maxLength:"{maxLength}",currentLength:"{currentLength}"})},get PROVIDER_NOT_FOUND(){return n.errors_catalog_providerNotFound_template({provider:"{provider}"})},get PROVIDER_CONNECTION_FAILED(){return n.errors_catalog_providerConnectionFailed_template({provider:"{provider}",details:"{details}"})},get PROVIDER_PROCESS_DIED(){return n.errors_catalog_providerProcessDied_template({provider:"{provider}"})},get STORAGE_READ_FAILED(){return n.errors_catalog_storageReadFailed_template({details:"{details}"})},get STORAGE_WRITE_FAILED(){return n.errors_catalog_storageWriteFailed_template({details:"{details}"})},get STORAGE_CORRUPTED(){return n.errors_catalog_storageCorrupted_template({lastBackup:"{lastBackup}"})},get MEMORY_LIMIT_EXCEEDED(){return n.errors_catalog_memoryLimitExceeded_template({currentUsage:"{currentUsage}",limit:"{limit}"})},get RATE_LIMIT_EXCEEDED(){return n.errors_catalog_rateLimitExceeded_template({count:"{count}",window:"{window}"})},get CONCURRENT_LIMIT_EXCEEDED(){return n.errors_catalog_concurrentLimitExceeded_template({current:"{current}",max:"{max}"})}},ze={get AGENT_CREATION_FAILED(){return n.errors_catalog_agentCreationFailed_friendly()},get AGENT_ALREADY_EXISTS(){return n.errors_catalog_agentAlreadyExists_friendly()},get INVALID_AGENT_CONFIG(){return n.errors_catalog_invalidAgentConfig_friendly()},get INVALID_CONFIG(){return n.errors_catalog_invalidConfig_friendly()},get SESSION_NOT_FOUND(){return n.errors_catalog_sessionNotFound_friendly()},get SESSION_ALREADY_ACTIVE(){return n.errors_catalog_sessionAlreadyActive_friendly()},get SESSION_INITIALIZATION_FAILED(){return n.errors_catalog_sessionInitializationFailed_friendly()},get STREAM_CONNECTION_FAILED(){return n.errors_catalog_streamConnectionFailed_friendly()},get STREAM_TIMEOUT(){return n.errors_catalog_streamTimeout_friendly()},get STREAM_INTERRUPTED(){return n.errors_catalog_streamInterrupted_friendly()},get STREAM_RECOVERY_FAILED(){return n.errors_catalog_streamRecoveryFailed_friendly()},get MESSAGE_SEND_FAILED(){return n.errors_catalog_messageSendFailed_friendly()},get MESSAGE_VALIDATION_FAILED(){return n.errors_catalog_messageValidationFailed_friendly()},get MESSAGE_TOO_LONG(){return n.errors_catalog_messageTooLong_friendly()},get PROVIDER_NOT_FOUND(){return n.errors_catalog_providerNotFound_friendly()},get PROVIDER_CONNECTION_FAILED(){return n.errors_catalog_providerConnectionFailed_friendly()},get PROVIDER_PROCESS_DIED(){return n.errors_catalog_providerProcessDied_friendly()},get STORAGE_READ_FAILED(){return n.errors_catalog_storageReadFailed_friendly()},get STORAGE_WRITE_FAILED(){return n.errors_catalog_storageWriteFailed_friendly()},get STORAGE_CORRUPTED(){return n.errors_catalog_storageCorrupted_friendly()},get MEMORY_LIMIT_EXCEEDED(){return n.errors_catalog_memoryLimitExceeded_friendly()},get RATE_LIMIT_EXCEEDED(){return n.errors_catalog_rateLimitExceeded_friendly()},get CONCURRENT_LIMIT_EXCEEDED(){return n.errors_catalog_concurrentLimitExceeded_friendly()}};function He(i){return(i.match(/{(\w+)}/g)||[]).map(e=>e.slice(1,-1))}function Ke(i,s){return He(i).every(t=>t in s)}function Ie(i,s={}){return i.replace(/{(\w+)}/g,(e,t)=>String(s[t]??e))}function J(i){const s=n.errors_cleanMessage_fallback_error();if(!i)return s;let e=i;return e=e.replace(/^.*?failed(?:\s+to\s+.*?)?\s+after\s+\d+\s+attempts:\s*/i,""),e=e.replace(/^Error invoking remote method '[^']+':(\s*Error:)?\s*/i,""),e=e.replace(/^(Error:\s*)+/i,""),e=e.replace(/\n\s*at .+/g,""),e=e.replace(/\s+/g," ").trim(),e||s}function Qe(i,s){return s&&j[i]&&Ke(j[i],s)?Ie(j[i],s):ze[i]||n.errors_userFriendly_fallback_error()}function Ze(i){const e={AGENT_CREATION_FAILED:"AGENT_CREATION",AGENT_ALREADY_EXISTS:"AGENT_CREATION",INVALID_AGENT_CONFIG:"AGENT_CREATION",STREAM_CONNECTION_FAILED:"STREAMING",STREAM_TIMEOUT:"STREAMING",STREAM_INTERRUPTED:"STREAMING",STREAM_RECOVERY_FAILED:"STREAMING",STORAGE_READ_FAILED:"STORAGE",STORAGE_WRITE_FAILED:"STORAGE",STORAGE_CORRUPTED:"STORAGE",MEMORY_LIMIT_EXCEEDED:"MEMORY",RATE_LIMIT_EXCEEDED:"MEMORY",CONCURRENT_LIMIT_EXCEEDED:"MEMORY",PROVIDER_NOT_FOUND:"PROVIDER",PROVIDER_CONNECTION_FAILED:"PROVIDER",PROVIDER_PROCESS_DIED:"PROVIDER"}[i];return e?pe[e]:pe.GENERAL}const je={AGENT_CREATION_FAILED:[{action:"retry",description:"Try creating the agent again",automatic:!1,priority:"high"},{action:"check-config",description:"Verify agent configuration in settings",automatic:!1,priority:"high"},{action:"check-resources",description:"Ensure sufficient memory and disk space",automatic:!1,priority:"medium"}],AGENT_ALREADY_EXISTS:[{action:"rename",description:"Choose a different name for the agent",automatic:!1,priority:"high"},{action:"delete-existing",description:"Delete the existing agent first",automatic:!1,priority:"medium"}],INVALID_AGENT_CONFIG:[{action:"review-config",description:"Review and correct the configuration",automatic:!1,priority:"high"},{action:"use-defaults",description:"Reset to default configuration",automatic:!1,priority:"medium"}],INVALID_CONFIG:[{action:"review-config",description:"Review and correct the configuration",automatic:!1,priority:"high"},{action:"use-defaults",description:"Reset to default configuration",automatic:!1,priority:"medium"}],SESSION_NOT_FOUND:[{action:"start-new",description:"Start a new agent session",automatic:!1,priority:"high"},{action:"check-history",description:"Check session history for recent sessions",automatic:!1,priority:"medium"}],SESSION_ALREADY_ACTIVE:[{action:"wait",description:"Wait for the current session to complete",automatic:!1,priority:"high"},{action:"cancel",description:"Cancel the active session first",automatic:!1,priority:"high"}],SESSION_INITIALIZATION_FAILED:[{action:"retry",description:"Try initializing the session again",automatic:!1,priority:"high"},{action:"check-resources",description:"Ensure sufficient resources are available",automatic:!1,priority:"medium"}],MESSAGE_SEND_FAILED:[{action:"retry",description:"Try sending the message again",automatic:!1,priority:"high"},{action:"check-connection",description:"Check your network connection",automatic:!1,priority:"high"}],MESSAGE_VALIDATION_FAILED:[{action:"review-config",description:"Review and correct the message format",automatic:!1,priority:"high"},{action:"check-config",description:"Check configuration for valid message format",automatic:!1,priority:"medium"}],MESSAGE_TOO_LONG:[{action:"retry",description:"Shorten the message and try again",automatic:!1,priority:"high"},{action:"batch",description:"Split the message into multiple parts",automatic:!1,priority:"medium"}],PROVIDER_NOT_FOUND:[{action:"check-config",description:"Verify provider is properly configured",automatic:!1,priority:"high"},{action:"recreate",description:"Install or reinstall the provider",automatic:!1,priority:"high"}],PROVIDER_CONNECTION_FAILED:[{action:"retry",description:"Try connecting to the provider again",automatic:!1,priority:"high"},{action:"check-config",description:"Verify provider configuration",automatic:!1,priority:"high"}],STORAGE_READ_FAILED:[{action:"retry",description:"Try reading the data again",automatic:!1,priority:"high"},{action:"restore",description:"Restore from a recent backup",automatic:!1,priority:"medium"}],STORAGE_WRITE_FAILED:[{action:"retry",description:"Try saving again",automatic:!1,priority:"high"},{action:"check-resources",description:"Check available disk space",automatic:!1,priority:"high"}],STREAM_CONNECTION_FAILED:[{action:"retry",description:"Try connecting again",automatic:!1,priority:"high"},{action:"check-connection",description:"Check your network connection",automatic:!1,priority:"high"}],STREAM_RECOVERY_FAILED:[{action:"restart",description:"Restart the agent",automatic:!1,priority:"high"},{action:"check-config",description:"Check error logs for more details",automatic:!1,priority:"medium"}],STREAM_INTERRUPTED:[{action:"reconnect",description:"Attempting automatic reconnection",automatic:!0,priority:"high"},{action:"retry",description:"Retry sending the message",automatic:!1,priority:"high"},{action:"check-connection",description:"Check your internet connection",automatic:!1,priority:"medium"}],STREAM_TIMEOUT:[{action:"wait",description:"Wait for agent to complete processing",automatic:!1,priority:"high"},{action:"cancel",description:"Cancel current operation",automatic:!1,priority:"medium"},{action:"increase-timeout",description:"Increase timeout in settings",automatic:!1,priority:"low"}],PROVIDER_PROCESS_DIED:[{action:"restart",description:"Restart agent process",automatic:!0,priority:"high"},{action:"recreate",description:"Create new agent session",automatic:!1,priority:"high"}],STORAGE_CORRUPTED:[{action:"restore",description:"Restore from backup",automatic:!1,priority:"high"},{action:"reset",description:"Reset agent data",automatic:!1,priority:"medium"}],MEMORY_LIMIT_EXCEEDED:[{action:"cleanup",description:"Close unused agents",automatic:!1,priority:"high"},{action:"increase-limit",description:"Increase memory limit in settings",automatic:!1,priority:"medium"}],RATE_LIMIT_EXCEEDED:[{action:"wait",description:"Wait before making more requests",automatic:!1,priority:"high"},{action:"batch",description:"Batch requests together",automatic:!1,priority:"medium"}],CONCURRENT_LIMIT_EXCEEDED:[{action:"close-agents",description:"Close some running agents",automatic:!1,priority:"high"},{action:"queue",description:"Queue operation for later",automatic:!1,priority:"medium"}]};function Je(i){return je[i]||[{action:"retry",description:"Try the operation again",automatic:!1,priority:"high"}]}var D=(i=>(i.AGENT_CREATION_FAILED="AGENT_CREATION_FAILED",i.AGENT_ALREADY_EXISTS="AGENT_ALREADY_EXISTS",i.INVALID_AGENT_CONFIG="INVALID_AGENT_CONFIG",i.INVALID_CONFIG="INVALID_CONFIG",i.SESSION_NOT_FOUND="SESSION_NOT_FOUND",i.SESSION_ALREADY_ACTIVE="SESSION_ALREADY_ACTIVE",i.SESSION_INITIALIZATION_FAILED="SESSION_INITIALIZATION_FAILED",i.STREAM_CONNECTION_FAILED="STREAM_CONNECTION_FAILED",i.STREAM_TIMEOUT="STREAM_TIMEOUT",i.STREAM_INTERRUPTED="STREAM_INTERRUPTED",i.STREAM_RECOVERY_FAILED="STREAM_RECOVERY_FAILED",i.MESSAGE_SEND_FAILED="MESSAGE_SEND_FAILED",i.MESSAGE_VALIDATION_FAILED="MESSAGE_VALIDATION_FAILED",i.MESSAGE_TOO_LONG="MESSAGE_TOO_LONG",i.PROVIDER_NOT_FOUND="PROVIDER_NOT_FOUND",i.PROVIDER_CONNECTION_FAILED="PROVIDER_CONNECTION_FAILED",i.PROVIDER_PROCESS_DIED="PROVIDER_PROCESS_DIED",i.PROVIDER_UNAVAILABLE="PROVIDER_UNAVAILABLE",i.PROVIDER_ERROR="PROVIDER_ERROR",i.STORAGE_READ_FAILED="STORAGE_READ_FAILED",i.STORAGE_WRITE_FAILED="STORAGE_WRITE_FAILED",i.STORAGE_CORRUPTED="STORAGE_CORRUPTED",i.STORAGE_ERROR="STORAGE_ERROR",i.STORAGE_QUOTA_EXCEEDED="STORAGE_QUOTA_EXCEEDED",i.MEMORY_LIMIT_EXCEEDED="MEMORY_LIMIT_EXCEEDED",i.RATE_LIMIT_EXCEEDED="RATE_LIMIT_EXCEEDED",i.CONCURRENT_LIMIT_EXCEEDED="CONCURRENT_LIMIT_EXCEEDED",i.RESOURCE_NOT_FOUND="RESOURCE_NOT_FOUND",i.RESOURCE_EXHAUSTED="RESOURCE_EXHAUSTED",i.NETWORK_ERROR="NETWORK_ERROR",i.PERMISSION_DENIED="PERMISSION_DENIED",i.OPERATION_FAILED="OPERATION_FAILED",i.VALIDATION_ERROR="VALIDATION_ERROR",i.INVALID_RESPONSE="INVALID_RESPONSE",i.STATE_CORRUPTION="STATE_CORRUPTION",i.CONTEXT_OVERFLOW="CONTEXT_OVERFLOW",i))(D||{});class Y extends Error{constructor(e,t,r={},a){super(e);m(this,"code");m(this,"context");m(this,"recoverySuggestions");m(this,"userMessage");m(this,"isRecoverable");m(this,"cause");this.name="AgentError",this.code=t,this.context={...r,timestamp:new Date,stackTrace:this.stack},this.userMessage=a?.userMessage||this.getDefaultUserMessage(t),this.recoverySuggestions=a?.recoverySuggestions||this.getDefaultRecoverySuggestions(t),this.isRecoverable=a?.isRecoverable??this.isErrorRecoverable(t),a?.cause&&(this.cause=a.cause)}getDefaultUserMessage(e){return Qe(e,this.context)}getDefaultRecoverySuggestions(e){return Je(e)}isErrorRecoverable(e){return["STREAM_INTERRUPTED","STREAM_TIMEOUT","MESSAGE_SEND_FAILED","PROVIDER_PROCESS_DIED","STORAGE_READ_FAILED","STORAGE_WRITE_FAILED"].includes(e)}getHelpLink(){return Ze(this.code)}formatMessage(e){return Ie(e,this.context)}toJSON(){return{name:this.name,code:this.code,message:this.message,userMessage:this.userMessage,context:this.context,recoverySuggestions:this.recoverySuggestions,isRecoverable:this.isRecoverable,helpLink:this.getHelpLink(),stack:this.stack}}}const et={NON_RETRYABLE_ERRORS:["EACCES","EPERM","ENOSPC","EMFILE","permission","memory","fatal","process died","not available on your current plan","agent binary","rate limit","too many requests","hit your limit","you've hit your limit","quota exceeded"]};function ie(i){const s=i.toLowerCase();for(const e of et.NON_RETRYABLE_ERRORS)if(s.includes(e.toLowerCase()))return!0;return!1}const tt="Agent already has an in-flight prompt. Message was not delivered.",v=W("ErrorBoundary"),b=class b{constructor(){}static getInstance(){return b.instance||(b.instance=new b),b.instance}async wrap(s,e,t={}){const{retries:r=Re.DEFAULT_ATTEMPTS,retryDelay:a=Re.BASE_DELAY,exponentialBackoff:l=!0,notify:c=!1,notifyOnRetry:E=!1,context:f={},onError:u,onRetry:o,shouldRetry:R=this.defaultShouldRetry}=t;let g=null,d=0;for(d=1;d<=r+1;d++)try{v.debug(`[${e}] Attempt ${d}/${r+1}`);const h=await s();return d>1&&v.info(`[${e}] Succeeded after ${d} attempts`),h}catch(h){if(g=h,v.error(`[${e}] Attempt ${d} failed`,{error:g.message,attempt:d,maxAttempts:r+1,context:f}),u?.(g,d),d<=r&&R(g)){const C=l?a*Math.pow(2,d-1):a;E&&Q.warning(n.agent_errorBoundary_retrying_message({seconds:C/1e3})),o?.(d),v.info(`[${e}] Retrying in ${C}ms`),await this.sleep(C)}else break}const k=`${e} failed after ${d} attempt${d===1?"":"s"}: ${g?.message}`,P=J(g?.message||n.agent_errorBoundary_generic_error()),N=g?.message?.toLowerCase()||"",$=N.includes("no available models")||N.includes("all models exhausted")||N.includes("all models unavailable");throw c&&!$&&Q.error(P),new Y(P,D.OPERATION_FAILED,{originalError:g?.message,detailedMessage:k,attempts:d,context:f})}async wrapVoid(s,e,t={}){await this.wrap(s,e,t)}wrapSync(s,e,t={}){try{return s()}catch(r){const a=r;throw v.error(`[${e}] Failed`,{error:a.message,context:t.context}),t.notify&&Q.error(J(a.message)),new Y(J(a.message),D.OPERATION_FAILED,t.context)}}defaultShouldRetry(s){const e=s.message.toLowerCase();return ie(s.message)?!1:e.includes("network")||e.includes("timeout")?!0:s instanceof Y?[D.NETWORK_ERROR,D.STREAM_TIMEOUT,D.STREAM_CONNECTION_FAILED,D.PROVIDER_CONNECTION_FAILED,D.PROVIDER_UNAVAILABLE].includes(s.code):!(e.includes("invalid")||e.includes("interrupted")||e.includes("cancel")||e.includes("not found")||e.includes("not available")||e.includes("404")||e.includes("no available models")||e.includes("all models exhausted")||e.includes("all models unavailable")||e.includes("413")||e.includes("too long for the agent")||e.includes("request entity too large")||e.includes("payload too large")||e.includes("content too large")||e.includes("body too large")||e.includes("unauthorized")||e.includes("forbidden")||e.includes("401")||e.includes("403"))}sleep(s){return new Promise(e=>setTimeout(e,s))}async withTimeout(s,e,t){return Promise.race([s(),new Promise((r,a)=>setTimeout(()=>a(new Y(`${t} timed out after ${e}ms`,D.STREAM_TIMEOUT)),e))])}async batchOperations(s,e,t={}){const{concurrency:r=5,continueOnError:a=!0,operationName:l="batch operation"}=t,c=[],E=[];for(let f=0;f<s.length;f+=r){const u=s.slice(f,f+r);(await Promise.allSettled(u.map(R=>e(R)))).forEach((R,g)=>{if(R.status==="fulfilled")c.push(R.value);else{const d=R.reason;if(E.push({item:u[g],error:d}),v.error(`[${l}] Batch item failed`,{item:u[g],error:d.message}),!a)throw d}})}return E.length>0&&v.warn(`[${l}] Completed with ${E.length} errors`),{results:c,errors:E}}};m(b,"instance");let te=b;const st=te.getInstance(),se=W("browser/index"),F=new Map,B=new Map;let U;function it(i,s,e){for(const t of s)try{t(e)}catch(r){se.error("Error in agent subscriber callback",{agentId:i,error:r})}}function rt(){if(U)return;let i=!1;U=p.createSelector(e=>e.agentSessions)().subscribe(()=>{if(!i){i=!0;return}if(F.size===0)return;const e=p.state;for(const[t,r]of F){const a=Ae.select(e,t);B.get(t)!==a&&(B.set(t,a),it(t,r,a))}})}function at(){F.size>0||!U||(U(),U=void 0,B.clear())}function Ct(i,s,e){let t=F.get(i);const r=!t;t||(t=new Set,F.set(i,t)),t.add(s),rt();const a=p.state,l=Ae.select(a,i);return r&&B.set(i,l),l?se.debug("[subscribeToAgent] Initial callback data",{agentId:i,workspaceId:e??"current",hasSession:!0}):se.debug("[subscribeToAgent] No session found",{agentId:i,workspaceId:e??"current"}),s(l),()=>{const c=F.get(i);c&&(c.delete(s),c.size===0&&(F.delete(i),B.delete(i))),at()}}const y=W("ErrorRecovery"),Se={network:{maxRetries:3,initialBackoffMs:1e3,maxBackoffMs:1e4,backoffMultiplier:2,shouldRetry:i=>{const s=i.message.toLowerCase();return s.includes("network")||s.includes("fetch")||s.includes("connection")||s.includes("timeout")}},streaming:{maxRetries:5,initialBackoffMs:500,maxBackoffMs:5e3,backoffMultiplier:1.5,shouldRetry:(i,s)=>{if(s>=5)return!1;const e=i.message.toLowerCase();return e.includes("no available models")||e.includes("all models exhausted")||e.includes("all models unavailable")||ie(i.message)?!1:e.includes("stream")||e.includes("chunk")||e.includes("incomplete")}},persistence:{maxRetries:2,initialBackoffMs:100,maxBackoffMs:1e3,backoffMultiplier:2,shouldRetry:i=>{const s=i.message.toLowerCase();return s.includes("save")||s.includes("write")||s.includes("persist")}},rateLimit:{maxRetries:3,initialBackoffMs:5e3,maxBackoffMs:3e4,backoffMultiplier:2,shouldRetry:i=>{const s=i.message.toLowerCase();return s.includes("rate")||s.includes("limit")||s.includes("429")}}};class nt{constructor(){m(this,"listeners",new Map)}on(s,e){let t=this.listeners.get(s);t||(t=new Set,this.listeners.set(s,t)),t.add(e)}off(s,e){this.listeners.get(s)?.delete(e)}emit(s,...e){this.listeners.get(s)?.forEach(t=>{try{t(...e)}catch(r){y.error(`Error in event listener for ${s}:`,r)}})}removeAllListeners(){this.listeners.clear()}}class ot extends nt{constructor(){super(...arguments);m(this,"activeRecoveries",new Map);m(this,"recoveryStats",new Map)}async executeWithRecovery(e,t=Se.network,r){const a=Date.now(),l=new AbortController;r&&(this.cancelRecovery(r),this.activeRecoveries.set(r,l));let c,E=t.initialBackoffMs,f=0;for(let u=1;u<=t.maxRetries;u++){if(f=u,l.signal.aborted){y.info(`Recovery cancelled for operation ${r}`);break}try{y.debug(`Attempting operation (attempt ${u}/${t.maxRetries})`,{operationId:r});const o=await e();return this.updateStats(r,!0),this.emit("recovery:success",{operationId:r,attempt:u,duration:Date.now()-a}),r&&this.activeRecoveries.delete(r),{success:!0,data:o,attempts:u,totalTime:Date.now()-a}}catch(o){c=o,y.warn(`Operation failed (attempt ${u}/${t.maxRetries})`,{operationId:r,error:c.message});const R=c.message.toLowerCase();if(R.includes("interrupted")||R.includes("cancelled")||R.includes("canceled")){y.debug("User-initiated interruption/cancellation, not retrying",{operationId:r,error:c.message});break}if(R.includes("no available models")||R.includes("all models exhausted")||R.includes("all models unavailable")){y.debug("All models exhausted, not retrying",{operationId:r,error:c.message});break}if(ie(c.message)){y.debug("Fatal error detected, not retrying",{operationId:r,error:c.message});break}if(!t.shouldRetry(c,u)){y.debug("Error not retryable, stopping recovery",{operationId:r,error:c.message});break}if(u<t.maxRetries){const g=Math.random()*.2*E,d=Math.min(E+g,t.maxBackoffMs);t.onRetry?.(u,d),this.emit("recovery:retry",{operationId:r,attempt:u,delay:d,error:c.message}),await this.delay(d,l.signal),E=Math.min(E*t.backoffMultiplier,t.maxBackoffMs)}}}return this.updateStats(r,!1),t.onFailure?.(c,f),this.emit("recovery:failure",{operationId:r,attempts:f,duration:Date.now()-a,error:c?.message}),r&&this.activeRecoveries.delete(r),{success:!1,error:c,attempts:f,totalTime:Date.now()-a}}cancelRecovery(e){const t=this.activeRecoveries.get(e);t&&(t.abort(),this.activeRecoveries.delete(e),y.info(`Cancelled recovery for operation ${e}`))}cancelAllRecoveries(){for(const[e,t]of this.activeRecoveries)t.abort(),y.info(`Cancelled recovery for operation ${e}`);this.activeRecoveries.clear()}getStats(e){if(e)return this.recoveryStats.get(e)||{successes:0,failures:0};const t={};for(const[r,a]of this.recoveryStats)t[r]=a;return t}clearStats(e){e?this.recoveryStats.delete(e):this.recoveryStats.clear()}isRetryable(e,t){const r=e.message.toLowerCase();if(t)switch(t){case"NETWORK":return r.includes("network")||r.includes("fetch");case"TIMEOUT":return r.includes("timeout")||r.includes("timed out");case"RATE_LIMIT":return r.includes("rate")||r.includes("limit")||r.includes("429");case"TEMPORARY":return r.includes("temporary")||r.includes("transient");case"CONFLICT":return r.includes("conflict")||r.includes("concurrent");default:return!1}return this.isRetryable(e,"NETWORK")||this.isRetryable(e,"TIMEOUT")||this.isRetryable(e,"RATE_LIMIT")||this.isRetryable(e,"TEMPORARY")||this.isRetryable(e,"CONFLICT")}delay(e,t){return new Promise((r,a)=>{const l=setTimeout(r,e);if(t){const c=()=>{clearTimeout(l),a(new Error("Delay aborted"))};t.addEventListener("abort",c);const E=r;r=()=>{t.removeEventListener("abort",c),E()}}})}updateStats(e,t){if(!e)return;const r=this.recoveryStats.get(e)||{successes:0,failures:0};t?r.successes++:r.failures++,this.recoveryStats.set(e,r)}dispose(){this.cancelAllRecoveries(),this.recoveryStats.clear(),this.removeAllListeners()}}const ct=new ot,O=new Ye({category:"WorkspaceMetrics"}),lt=100;class ut{constructor(){m(this,"metrics",new Map);m(this,"operations",new Map)}startWorkspaceCreation(s){const e=Date.now();for(this.metrics.delete(s),this.metrics.set(s,{workspaceId:s,creationStarted:e});this.metrics.size>lt;){const t=this.metrics.keys().next().value;if(t===void 0)break;this.metrics.delete(t)}O.info("Started tracking workspace creation",{workspaceId:s})}recordMilestone(s,e){const t=this.metrics.get(s);if(!t){O.warn("No metrics found for workspace",{workspaceId:s,milestone:e});return}const r=Date.now();switch(e){case"optimisticNavigation":t.optimisticNavigation=r;break;case"realWorkspaceCreated":t.realWorkspaceCreated=r;break;case"agentCreated":t.agentCreated=r;break;case"agentReady":t.agentReady=r;break;case"firstMessageSent":t.firstMessageSent=r;break;case"firstResponseReceived":t.firstResponseReceived=r;break;case"firstChunkReceived":t.firstChunkReceived=r;break;case"totalDuration":t.totalDuration=r;break;case"workspaceId":case"creationStarted":O.warn("Cannot update milestone",{milestone:e});return}const a=r-t.creationStarted;O.info(`Milestone: ${e}`,{workspaceId:s,elapsed:`${a}ms`,timestamp:r}),e==="firstResponseReceived"&&(t.totalDuration=r-t.creationStarted,this.logSummary(s))}startOperation(s,e){this.operations.set(s,{startTime:Date.now(),metadata:e})}endOperation(s,e){const t=this.operations.get(s);if(!t)return O.warn("Operation not found",{operationId:s}),null;const r=Date.now();return t.endTime=r,t.duration=r-t.startTime,e&&(t.metadata={...t.metadata,...e}),O.info("Operation completed",{operationId:s,duration:`${t.duration}ms`,metadata:t.metadata}),this.operations.delete(s),t.duration}getMetrics(s){return this.metrics.get(s)}logSummary(s){const e=this.metrics.get(s);if(!e)return;const t={workspaceId:s,totalDuration:`${e.totalDuration}ms`,stages:{optimisticNavigation:e.optimisticNavigation?`${e.optimisticNavigation-e.creationStarted}ms`:"N/A",realWorkspaceCreation:e.realWorkspaceCreated?`${e.realWorkspaceCreated-e.creationStarted}ms`:"N/A",agentCreation:e.agentCreated?`${e.agentCreated-e.creationStarted}ms`:"N/A",agentReady:e.agentReady?`${e.agentReady-e.creationStarted}ms`:"N/A",firstMessage:e.firstMessageSent?`${e.firstMessageSent-e.creationStarted}ms`:"N/A",firstResponse:e.firstResponseReceived?`${e.firstResponseReceived-e.creationStarted}ms`:"N/A"}};O.info("=== Workspace Creation Metrics Summary ===",t),O.info("Workspace Creation Metrics:",t)}clearMetrics(s){this.metrics.delete(s)}incrementAgentCreated(s){const e=this.metrics.get(s);e&&(e.agentCreated=Date.now(),O.info("Agent created",{workspaceId:s}))}incrementMessageSent(s){const e=this.metrics.get(s);e&&!e.firstMessageSent&&(e.firstMessageSent=Date.now(),O.info("First message sent",{workspaceId:s}))}}const dt=new ut,M=W("AgentSend");function A(i){p.dispatch(i)}function Te(i){return typeof i=="object"&&i!==null&&!Array.isArray(i)}function mt(i){const s=Te(i)&&i.success===!0&&"data"in i?i.data:i;return!Te(s)||s.success!==!1?!1:typeof s.error=="string"&&s.error.includes(tt)}async function Lt(i,s,e,t={}){const r=he.select(p.state,e.id);if(!r)return;const a=Ne(i,e.id),l=t.submission,c=!!l&&Le.select(p.state,l.scope)?.supported===!0,E=(o,R,g=!1)=>{l&&A(Be(l.scope,l.id,o,Date.now(),R,g))};let f=!1;const u=()=>(!l||f||ve.select(p.state,l))&&r===he.select(p.state,e.id)&&a.isCurrent(p.state.agentSessions?.byAgentId[i]?.workspaceId);return qe.track(`sendMessage:${a.key}:${i}:${l?.id??"legacy"}`,async()=>{if(!u())return;M.debug(`Sending message to agent ${i}`,{contentLength:s.length,hasContextReferences:!!t.contextReferences?.length,model:t.model});let o=await p.dispatch(we(e.id,i));if(u()){if(!o)throw new Error(n.agent_streamLifecycle_sessionNotFound_error({agentId:i}));o={...o,isStreaming:o.isStreaming??!1};{if(o&&(o.status==="pending"||!o.id)&&!o.backendSessionId&&o.activationState!==H.ACTIVE&&o.activationState!==H.ACTIVATING){const h=e.id.startsWith("optimistic-"),C=e.worktreePath||e.repositoryPath||e.path;if(!h&&C){M.info("Activating pending session in sendMessage",{agentId:i,status:o.status,activationState:o.activationState,hasBackendSessionId:!!o.backendSessionId});const x=await p.dispatch(be(e.id,i));if(!u())return;x&&(o=x)}else throw M.warn("Cannot activate agent - workspace not ready",{agentId:i,workspaceId:e.id,isOptimistic:h,hasWorktreePath:!!e.worktreePath,hasRepositoryPath:!!e.repositoryPath,hasPath:!!e.path}),new Error(n.agent_streamLifecycle_spaceNotReady_error())}else o&&o.status==="pending"&&o.backendSessionId&&(M.info("Fixing status for already-activated session",{agentId:i,backendSessionId:o.backendSessionId,activationState:o.activationState}),o={...o,status:Fe.Active,activationState:H.ACTIVE},A(de({...o,workspaceId:e.id})));if(!o)throw new Error(`Failed to get or create session for agent ${i}`);A(de({...o,workspaceId:e.id}));const g=[{type:"text",text:s}];if(t.imageBlocks)for(const h of t.imageBlocks)g.push({type:"image",...h.data!==void 0?{data:h.data}:{},...h.mimeType!==void 0?{mimeType:h.mimeType}:{},...h.attachmentId!==void 0?{attachmentId:h.attachmentId}:{}});if(t.fileBlocks)for(const h of t.fileBlocks)g.push({type:"file",attachmentId:h.attachmentId,fileName:h.fileName,...h.mimeType!==void 0?{mimeType:h.mimeType}:{},...h.size!==void 0?{size:h.size}:{}});const d=t.userAppMessageId??oe(),k=t.messageMetadata?.[ge],P={...t.contextReferences?.length?{contextReferences:t.contextReferences}:{},...k!==void 0?{[ge]:k}:{}},N={id:me(le()),appMessageId:d,role:"user",contentBlocks:g,timestamp:new Date().toISOString(),metadata:{...P,...t.messageMetadata??{}}};c||(l&&(E("rejected"),f=!0),A(ke(o.id,N))),A(z(o.id,!0));let $=!1;try{c||await p.dispatch(Ge(e.id,i,!0,{allowTruncation:t.resetHistory}));const h=me(`msg_${le()}`),C=oe(),x=async()=>st.wrap(async()=>{if(!u())return;M.info("Agent Service: Sending message to backend with image and file blocks",{agentId:i,sessionId:o.id,hasImageBlocks:!!t.imageBlocks,imageBlocksCount:t.imageBlocks?.length||0,imageBlockDetails:t.imageBlocks?.map(_=>({type:_.type,mimeType:_.mimeType,dataLength:_.data?.length||0}))||[],hasFileBlocks:!!t.fileBlocks,fileBlocksCount:t.fileBlocks?.length||0,fileBlockDetails:t.fileBlocks?.map(_=>({type:_.type,fileName:_.fileName,mimeType:_.mimeType,attachmentId:_.attachmentId,size:_.size}))||[]});const Oe=t.model??t.modelId??o.model??void 0;A(Pe(i));const ye=ce(i,e.id),ae=p.state.chatState?.byAgentId[i]?.attemptGeneration??0,T=await $e("agent.sendMessage",{agentId:i,...c&&l?{messageId:l.id}:{},workspaceId:e.id,content:s,model:Oe,contextReferences:t.contextReferences,imageBlocks:t.imageBlocks,fileBlocks:t.fileBlocks,noteIds:t.noteIds,stdinContext:t.stdinContext,assistantMessageId:h,userAppMessageId:d,assistantAppMessageId:C,priority:t.priority,...t.messageMetadata?{messageMetadata:t.messageMetadata}:{}}).catch(_=>{if(u())throw _});if(u()){if(mt(T)){M.info("Backend dropped duplicate in-flight prompt",{agentId:i,sessionId:o.id}),E("rejected");return}if(T&&typeof T=="object"&&"success"in T){if(!T.success){const _=T.error,I=typeof _=="string"?_:_?.message;throw $=!0,new Error(I||n.agent_streamLifecycle_sendToBackendFailed_error())}if("queued"in T&&T.queued===!0){if(M.info("sendMessage auto-queued by daemon (mid-turn or turn-startup race)",{agentId:i,sessionId:o.id,queuedMessageId:T.queuedMessage?.id}),(!c||!l||!ue.select(p.state,l))&&A(z(o.id,!1)),c||A(xe(o.id,N.id)),c){const I=T.queuedMessage,G=T.turnId,L=typeof G=="string"?G:I?.turnId;if(I&&typeof L=="string"){const S=Ee(s,t),X=K.select(p.state,i,e.id).find(ne=>ne.id===I.id||ne.turnId===L);A(fe(i,I.id,S,L,_e(X??I,S),!X&&!!l&&ue.select(p.state,l),ae))}E("accepted",I,!0),q(i,e.id);return}const _=T.queuedMessage;if(_){const I=T.turnId,G=typeof I=="string"?I:_.turnId;let L=_;if(u()&&ce(i,e.id)===ye){const S=K.select(p.state,i,e.id),X=We(S,_);A(Ve(i,X,e.id))}else u()&&(M.debug("queued-response queue seed superseded by an authoritative snapshot; reconciling via hydrate",{agentId:i,queuedMessageId:_.id}),await q(i,e.id).catch(()=>{}),L=K.select(p.state,i,e.id).find(S=>S.id===_.id||S.turnId===G));if(u()&&typeof G=="string"){const S=Ee(s,t);A(fe(i,_.id,S,G,_e(L??_,S),!L,ae))}else u()&&M.warn("auto-queued sendMessage response carried no turnId; retry record not parked",{agentId:i,queuedMessageId:_.id})}return}}c&&(E("accepted"),q(i,e.id),Ce(i,e.id)),dt.incrementMessageSent(e.id)}},"send message",{retries:c?0:2,notify:!1,context:{agentId:i,workspace:e.id}}),re=c?await x().then(()=>({success:!0,error:void 0})):await ct.executeWithRecovery(x,Se.streaming,`send-message-${i}`);if(!re.success)throw re.error||new Error(n.agent_streamLifecycle_sendFailed_error())}catch(h){if(!u())return;throw A(z(o.id,!1)),!c&&t.messageMetadata&&A(Ue(o.id,N.id,{metadata:P})),c&&E($?"rejected":"uncertain"),h}}}},{memoize:!1,coalesce:!0,priority:"high"})}export{Ct as a,J as c,We as r,Lt as s};
|
|
1
|
+
var Me=Object.defineProperty;var De=(i,s,e)=>s in i?Me(i,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[s]=e;var m=(i,s,e)=>De(i,typeof s!="symbol"?s+"":s,e);import{x as Ne,J as oe,Z as ce,ai as q,ar as Ce}from"./CHFBgXBI.js";import{bY as Le,cX as le,co as ue,cn as ve}from"./Ca9Vj8X7.js";import{II as p,Bq as we,bz as be,e as Fe,KL as de,ia as me,bL as ke,Dl as z,BP as Ge,f8 as Pe,zV as xe,dV as Ee,f4 as fe,dU as _e,Ao as Ve,Kp as Ue,vZ as Be}from"./D98guX46.js";import{aC as Ae,dH as he,A as H,P as ge,ay as K}from"./CM_58O-V.js";import{h as $e}from"./DPKwA49z.js";import{c as W}from"./ChTqQfQN.js";import{a as Xe}from"./BdWqymET.js";import{k as Q}from"./DvOPTg8o.js";import"./DYhIMPy1.js";import{bm as n}from"./BkP7iWmk.js";import"./DdeuoyZB.js";import"./C400w5jq.js";import"./D6fddbvu.js";import{R as Re}from"./BvFAWM27.js";import{L as Ye}from"./CSiaiLHL.js";function We(i,s){return i.some(e=>e.id===s.id)?i.map(e=>e.id===s.id?{...s,...s.author==null&&e.author!==void 0?{author:e.author}:{}}:e):[...i,s]}const Z=typeof performance<"u"?performance:{now:()=>Date.now()},V=new Xe("PerformanceOptimizer"),w=class w{constructor(){m(this,"metricsBuffer");m(this,"metricsIndex",0);m(this,"metricsCount",0);m(this,"MAX_METRICS",500);m(this,"TARGET_RESPONSE_TIME",100);m(this,"memoCache",new Map);m(this,"MEMO_TTL",6e4);m(this,"MAX_CACHE_SIZE",100);m(this,"cacheHits",0);m(this,"cacheMisses",0);m(this,"pendingRequests",new Map);m(this,"requestQueue",[]);m(this,"cleanupInterval",null);this.metricsBuffer=new Array(this.MAX_METRICS).fill(null),this.startCacheCleanup(),V.info("PerformanceOptimizer initialized")}static getInstance(){return w.instance||(w.instance=new w),w.instance}reset(){this.metricsBuffer=new Array(this.MAX_METRICS).fill(null),this.metricsIndex=0,this.metricsCount=0,this.memoCache.clear(),this.pendingRequests.clear(),this.requestQueue=[],this.cacheHits=0,this.cacheMisses=0}clearCache(){this.memoCache.clear(),this.cacheHits=0,this.cacheMisses=0}async processBatch(s,e,t={}){const{batchSize:r=10,concurrency:a=4}=t,l=[];for(let c=0;c<s.length;c+=r){const f=s.slice(c,c+r).map((o,R)=>{const g=Math.floor(R/a)*10;return new Promise(d=>{setTimeout(async()=>{const k=await e(o);d(k)},g)})}),u=await Promise.all(f);l.push(...u)}return l}startCacheCleanup(){this.cleanupInterval=setInterval(()=>{this.cleanupCache()},3e4)}stopCacheCleanup(){this.cleanupInterval&&(clearInterval(this.cleanupInterval),this.cleanupInterval=null)}cleanupCache(){const s=Date.now(),e=[];this.memoCache.forEach((t,r)=>{s-t.timestamp>this.MEMO_TTL&&e.push(r)}),e.forEach(t=>this.memoCache.delete(t)),this.memoCache.size>this.MAX_CACHE_SIZE&&Array.from(this.memoCache.entries()).sort((a,l)=>a[1].hits-l[1].hits||a[1].timestamp-l[1].timestamp).slice(0,this.memoCache.size-this.MAX_CACHE_SIZE).forEach(([a])=>this.memoCache.delete(a))}async track(s,e,t={}){const r=Z.now();try{const a=t.cacheKey||s;if(t.memoize){const f=this.getMemoized(a);if(f!==void 0)return this.cacheHits++,V.debug("Memoized result used",{operation:s,cacheKey:a,hits:this.cacheHits}),f;this.cacheMisses++}if(t.coalesce){const f=this.pendingRequests.get(s);if(f)return V.debug("Request coalesced",{operation:s}),f}let l;t.coalesce?(l=t.timeout?this.withTimeout(e(),t.timeout):e(),this.pendingRequests.set(s,l)):l=t.timeout?this.withTimeout(e(),t.timeout):e();const c=await l;t.memoize&&this.memoize(a,c);const E=Z.now()-r;return this.recordMetric(s,E,!0,{strategy:t.priority||"normal",memoized:t.memoize||!1,coalesced:t.coalesce||!1}),E>this.TARGET_RESPONSE_TIME&&V.warn("Operation exceeded target time",{operation:s,duration:Math.round(E),target:this.TARGET_RESPONSE_TIME}),c}catch(a){const l=Z.now()-r;throw this.recordMetric(s,l,!1,{error:a instanceof Error?a.message:"Unknown error"}),a}finally{t.coalesce&&this.pendingRequests.delete(s)}}getStats(){if(this.metricsCount===0)return{avgResponseTime:0,p95ResponseTime:0,p99ResponseTime:0,successRate:100,slowOperations:[]};const s=[],e=this.metricsCount<this.MAX_METRICS?0:this.metricsIndex;for(let u=0;u<this.metricsCount;u++){const o=this.metricsBuffer[(e+u)%this.MAX_METRICS];o&&s.push(o)}if(s.length===0)return{avgResponseTime:0,p95ResponseTime:0,p99ResponseTime:0,successRate:100,slowOperations:[]};const t=s.sort((u,o)=>u.duration-o.duration);let r=0,a=0;const l=new Set;for(const u of s)a+=u.duration,u.success&&r++,u.duration>this.TARGET_RESPONSE_TIME&&l.add(u.operation);const c=a/s.length,E=Math.floor(t.length*.95),f=Math.floor(t.length*.99);return{avgResponseTime:Math.round(c),p95ResponseTime:Math.round(t[E]?.duration||0),p99ResponseTime:Math.round(t[f]?.duration||0),successRate:r/s.length*100,slowOperations:Array.from(l)}}getCacheStats(){const s=this.cacheHits+this.cacheMisses;return{size:this.memoCache.size,hitRate:s>0?this.cacheHits/s*100:0,hits:this.cacheHits,misses:this.cacheMisses}}getMemoized(s){const e=this.memoCache.get(s);if(e){if(Date.now()-e.timestamp>this.MEMO_TTL){this.memoCache.delete(s);return}return e.hits++,e.value}}memoize(s,e){const t=JSON.stringify(e).length;this.memoCache.set(s,{value:e,timestamp:Date.now(),hits:0,size:t}),this.memoCache.size>this.MAX_CACHE_SIZE&&this.cleanupCache()}async withTimeout(s,e){return Promise.race([s,new Promise((t,r)=>setTimeout(()=>r(new Error(`Operation timed out after ${e}ms`)),e))])}recordMetric(s,e,t,r){this.metricsBuffer[this.metricsIndex]={operation:s,duration:e,timestamp:Date.now(),success:t,metadata:r},this.metricsIndex=(this.metricsIndex+1)%this.MAX_METRICS,this.metricsCount<this.MAX_METRICS&&this.metricsCount++,e>this.TARGET_RESPONSE_TIME&&V.warn("Slow operation detected",{operation:s,duration:`${e.toFixed(2)}ms`,target:`${this.TARGET_RESPONSE_TIME}ms`,metadata:r})}};m(w,"instance");let ee=w;const qe=ee.getInstance(),pe={AGENT_CREATION:"https://docs.example.com/agent-creation",STREAMING:"https://docs.example.com/streaming-issues",STORAGE:"https://docs.example.com/storage-troubleshooting",MEMORY:"https://docs.example.com/memory-management",PROVIDER:"https://docs.example.com/provider-setup",GENERAL:"https://docs.example.com/help"},j={get AGENT_CREATION_FAILED(){return n.errors_catalog_agentCreationFailed_template({agentName:"{agentName}",details:"{details}"})},get AGENT_ALREADY_EXISTS(){return n.errors_catalog_agentAlreadyExists_template({agentName:"{agentName}"})},get INVALID_AGENT_CONFIG(){return n.errors_catalog_invalidAgentConfig_template({details:"{details}"})},get INVALID_CONFIG(){return n.errors_catalog_invalidConfig_template({details:"{details}"})},get SESSION_NOT_FOUND(){return n.errors_catalog_sessionNotFound_template({sessionId:"{sessionId}"})},get SESSION_ALREADY_ACTIVE(){return n.errors_catalog_sessionAlreadyActive_template()},get SESSION_INITIALIZATION_FAILED(){return n.errors_catalog_sessionInitializationFailed_template({details:"{details}"})},get STREAM_CONNECTION_FAILED(){return n.errors_catalog_streamConnectionFailed_template({details:"{details}"})},get STREAM_TIMEOUT(){return n.errors_catalog_streamTimeout_template({timeout:"{timeout}"})},get STREAM_INTERRUPTED(){return n.errors_catalog_streamInterrupted_template({attempt:"{attempt}",maxAttempts:"{maxAttempts}"})},get STREAM_RECOVERY_FAILED(){return n.errors_catalog_streamRecoveryFailed_template({attempts:"{attempts}"})},get MESSAGE_SEND_FAILED(){return n.errors_catalog_messageSendFailed_template({details:"{details}"})},get MESSAGE_VALIDATION_FAILED(){return n.errors_catalog_messageValidationFailed_template({details:"{details}"})},get MESSAGE_TOO_LONG(){return n.errors_catalog_messageTooLong_template({maxLength:"{maxLength}",currentLength:"{currentLength}"})},get PROVIDER_NOT_FOUND(){return n.errors_catalog_providerNotFound_template({provider:"{provider}"})},get PROVIDER_CONNECTION_FAILED(){return n.errors_catalog_providerConnectionFailed_template({provider:"{provider}",details:"{details}"})},get PROVIDER_PROCESS_DIED(){return n.errors_catalog_providerProcessDied_template({provider:"{provider}"})},get STORAGE_READ_FAILED(){return n.errors_catalog_storageReadFailed_template({details:"{details}"})},get STORAGE_WRITE_FAILED(){return n.errors_catalog_storageWriteFailed_template({details:"{details}"})},get STORAGE_CORRUPTED(){return n.errors_catalog_storageCorrupted_template({lastBackup:"{lastBackup}"})},get MEMORY_LIMIT_EXCEEDED(){return n.errors_catalog_memoryLimitExceeded_template({currentUsage:"{currentUsage}",limit:"{limit}"})},get RATE_LIMIT_EXCEEDED(){return n.errors_catalog_rateLimitExceeded_template({count:"{count}",window:"{window}"})},get CONCURRENT_LIMIT_EXCEEDED(){return n.errors_catalog_concurrentLimitExceeded_template({current:"{current}",max:"{max}"})}},ze={get AGENT_CREATION_FAILED(){return n.errors_catalog_agentCreationFailed_friendly()},get AGENT_ALREADY_EXISTS(){return n.errors_catalog_agentAlreadyExists_friendly()},get INVALID_AGENT_CONFIG(){return n.errors_catalog_invalidAgentConfig_friendly()},get INVALID_CONFIG(){return n.errors_catalog_invalidConfig_friendly()},get SESSION_NOT_FOUND(){return n.errors_catalog_sessionNotFound_friendly()},get SESSION_ALREADY_ACTIVE(){return n.errors_catalog_sessionAlreadyActive_friendly()},get SESSION_INITIALIZATION_FAILED(){return n.errors_catalog_sessionInitializationFailed_friendly()},get STREAM_CONNECTION_FAILED(){return n.errors_catalog_streamConnectionFailed_friendly()},get STREAM_TIMEOUT(){return n.errors_catalog_streamTimeout_friendly()},get STREAM_INTERRUPTED(){return n.errors_catalog_streamInterrupted_friendly()},get STREAM_RECOVERY_FAILED(){return n.errors_catalog_streamRecoveryFailed_friendly()},get MESSAGE_SEND_FAILED(){return n.errors_catalog_messageSendFailed_friendly()},get MESSAGE_VALIDATION_FAILED(){return n.errors_catalog_messageValidationFailed_friendly()},get MESSAGE_TOO_LONG(){return n.errors_catalog_messageTooLong_friendly()},get PROVIDER_NOT_FOUND(){return n.errors_catalog_providerNotFound_friendly()},get PROVIDER_CONNECTION_FAILED(){return n.errors_catalog_providerConnectionFailed_friendly()},get PROVIDER_PROCESS_DIED(){return n.errors_catalog_providerProcessDied_friendly()},get STORAGE_READ_FAILED(){return n.errors_catalog_storageReadFailed_friendly()},get STORAGE_WRITE_FAILED(){return n.errors_catalog_storageWriteFailed_friendly()},get STORAGE_CORRUPTED(){return n.errors_catalog_storageCorrupted_friendly()},get MEMORY_LIMIT_EXCEEDED(){return n.errors_catalog_memoryLimitExceeded_friendly()},get RATE_LIMIT_EXCEEDED(){return n.errors_catalog_rateLimitExceeded_friendly()},get CONCURRENT_LIMIT_EXCEEDED(){return n.errors_catalog_concurrentLimitExceeded_friendly()}};function He(i){return(i.match(/{(\w+)}/g)||[]).map(e=>e.slice(1,-1))}function Ke(i,s){return He(i).every(t=>t in s)}function Ie(i,s={}){return i.replace(/{(\w+)}/g,(e,t)=>String(s[t]??e))}function J(i){const s=n.errors_cleanMessage_fallback_error();if(!i)return s;let e=i;return e=e.replace(/^.*?failed(?:\s+to\s+.*?)?\s+after\s+\d+\s+attempts:\s*/i,""),e=e.replace(/^Error invoking remote method '[^']+':(\s*Error:)?\s*/i,""),e=e.replace(/^(Error:\s*)+/i,""),e=e.replace(/\n\s*at .+/g,""),e=e.replace(/\s+/g," ").trim(),e||s}function Qe(i,s){return s&&j[i]&&Ke(j[i],s)?Ie(j[i],s):ze[i]||n.errors_userFriendly_fallback_error()}function Ze(i){const e={AGENT_CREATION_FAILED:"AGENT_CREATION",AGENT_ALREADY_EXISTS:"AGENT_CREATION",INVALID_AGENT_CONFIG:"AGENT_CREATION",STREAM_CONNECTION_FAILED:"STREAMING",STREAM_TIMEOUT:"STREAMING",STREAM_INTERRUPTED:"STREAMING",STREAM_RECOVERY_FAILED:"STREAMING",STORAGE_READ_FAILED:"STORAGE",STORAGE_WRITE_FAILED:"STORAGE",STORAGE_CORRUPTED:"STORAGE",MEMORY_LIMIT_EXCEEDED:"MEMORY",RATE_LIMIT_EXCEEDED:"MEMORY",CONCURRENT_LIMIT_EXCEEDED:"MEMORY",PROVIDER_NOT_FOUND:"PROVIDER",PROVIDER_CONNECTION_FAILED:"PROVIDER",PROVIDER_PROCESS_DIED:"PROVIDER"}[i];return e?pe[e]:pe.GENERAL}const je={AGENT_CREATION_FAILED:[{action:"retry",description:"Try creating the agent again",automatic:!1,priority:"high"},{action:"check-config",description:"Verify agent configuration in settings",automatic:!1,priority:"high"},{action:"check-resources",description:"Ensure sufficient memory and disk space",automatic:!1,priority:"medium"}],AGENT_ALREADY_EXISTS:[{action:"rename",description:"Choose a different name for the agent",automatic:!1,priority:"high"},{action:"delete-existing",description:"Delete the existing agent first",automatic:!1,priority:"medium"}],INVALID_AGENT_CONFIG:[{action:"review-config",description:"Review and correct the configuration",automatic:!1,priority:"high"},{action:"use-defaults",description:"Reset to default configuration",automatic:!1,priority:"medium"}],INVALID_CONFIG:[{action:"review-config",description:"Review and correct the configuration",automatic:!1,priority:"high"},{action:"use-defaults",description:"Reset to default configuration",automatic:!1,priority:"medium"}],SESSION_NOT_FOUND:[{action:"start-new",description:"Start a new agent session",automatic:!1,priority:"high"},{action:"check-history",description:"Check session history for recent sessions",automatic:!1,priority:"medium"}],SESSION_ALREADY_ACTIVE:[{action:"wait",description:"Wait for the current session to complete",automatic:!1,priority:"high"},{action:"cancel",description:"Cancel the active session first",automatic:!1,priority:"high"}],SESSION_INITIALIZATION_FAILED:[{action:"retry",description:"Try initializing the session again",automatic:!1,priority:"high"},{action:"check-resources",description:"Ensure sufficient resources are available",automatic:!1,priority:"medium"}],MESSAGE_SEND_FAILED:[{action:"retry",description:"Try sending the message again",automatic:!1,priority:"high"},{action:"check-connection",description:"Check your network connection",automatic:!1,priority:"high"}],MESSAGE_VALIDATION_FAILED:[{action:"review-config",description:"Review and correct the message format",automatic:!1,priority:"high"},{action:"check-config",description:"Check configuration for valid message format",automatic:!1,priority:"medium"}],MESSAGE_TOO_LONG:[{action:"retry",description:"Shorten the message and try again",automatic:!1,priority:"high"},{action:"batch",description:"Split the message into multiple parts",automatic:!1,priority:"medium"}],PROVIDER_NOT_FOUND:[{action:"check-config",description:"Verify provider is properly configured",automatic:!1,priority:"high"},{action:"recreate",description:"Install or reinstall the provider",automatic:!1,priority:"high"}],PROVIDER_CONNECTION_FAILED:[{action:"retry",description:"Try connecting to the provider again",automatic:!1,priority:"high"},{action:"check-config",description:"Verify provider configuration",automatic:!1,priority:"high"}],STORAGE_READ_FAILED:[{action:"retry",description:"Try reading the data again",automatic:!1,priority:"high"},{action:"restore",description:"Restore from a recent backup",automatic:!1,priority:"medium"}],STORAGE_WRITE_FAILED:[{action:"retry",description:"Try saving again",automatic:!1,priority:"high"},{action:"check-resources",description:"Check available disk space",automatic:!1,priority:"high"}],STREAM_CONNECTION_FAILED:[{action:"retry",description:"Try connecting again",automatic:!1,priority:"high"},{action:"check-connection",description:"Check your network connection",automatic:!1,priority:"high"}],STREAM_RECOVERY_FAILED:[{action:"restart",description:"Restart the agent",automatic:!1,priority:"high"},{action:"check-config",description:"Check error logs for more details",automatic:!1,priority:"medium"}],STREAM_INTERRUPTED:[{action:"reconnect",description:"Attempting automatic reconnection",automatic:!0,priority:"high"},{action:"retry",description:"Retry sending the message",automatic:!1,priority:"high"},{action:"check-connection",description:"Check your internet connection",automatic:!1,priority:"medium"}],STREAM_TIMEOUT:[{action:"wait",description:"Wait for agent to complete processing",automatic:!1,priority:"high"},{action:"cancel",description:"Cancel current operation",automatic:!1,priority:"medium"},{action:"increase-timeout",description:"Increase timeout in settings",automatic:!1,priority:"low"}],PROVIDER_PROCESS_DIED:[{action:"restart",description:"Restart agent process",automatic:!0,priority:"high"},{action:"recreate",description:"Create new agent session",automatic:!1,priority:"high"}],STORAGE_CORRUPTED:[{action:"restore",description:"Restore from backup",automatic:!1,priority:"high"},{action:"reset",description:"Reset agent data",automatic:!1,priority:"medium"}],MEMORY_LIMIT_EXCEEDED:[{action:"cleanup",description:"Close unused agents",automatic:!1,priority:"high"},{action:"increase-limit",description:"Increase memory limit in settings",automatic:!1,priority:"medium"}],RATE_LIMIT_EXCEEDED:[{action:"wait",description:"Wait before making more requests",automatic:!1,priority:"high"},{action:"batch",description:"Batch requests together",automatic:!1,priority:"medium"}],CONCURRENT_LIMIT_EXCEEDED:[{action:"close-agents",description:"Close some running agents",automatic:!1,priority:"high"},{action:"queue",description:"Queue operation for later",automatic:!1,priority:"medium"}]};function Je(i){return je[i]||[{action:"retry",description:"Try the operation again",automatic:!1,priority:"high"}]}var D=(i=>(i.AGENT_CREATION_FAILED="AGENT_CREATION_FAILED",i.AGENT_ALREADY_EXISTS="AGENT_ALREADY_EXISTS",i.INVALID_AGENT_CONFIG="INVALID_AGENT_CONFIG",i.INVALID_CONFIG="INVALID_CONFIG",i.SESSION_NOT_FOUND="SESSION_NOT_FOUND",i.SESSION_ALREADY_ACTIVE="SESSION_ALREADY_ACTIVE",i.SESSION_INITIALIZATION_FAILED="SESSION_INITIALIZATION_FAILED",i.STREAM_CONNECTION_FAILED="STREAM_CONNECTION_FAILED",i.STREAM_TIMEOUT="STREAM_TIMEOUT",i.STREAM_INTERRUPTED="STREAM_INTERRUPTED",i.STREAM_RECOVERY_FAILED="STREAM_RECOVERY_FAILED",i.MESSAGE_SEND_FAILED="MESSAGE_SEND_FAILED",i.MESSAGE_VALIDATION_FAILED="MESSAGE_VALIDATION_FAILED",i.MESSAGE_TOO_LONG="MESSAGE_TOO_LONG",i.PROVIDER_NOT_FOUND="PROVIDER_NOT_FOUND",i.PROVIDER_CONNECTION_FAILED="PROVIDER_CONNECTION_FAILED",i.PROVIDER_PROCESS_DIED="PROVIDER_PROCESS_DIED",i.PROVIDER_UNAVAILABLE="PROVIDER_UNAVAILABLE",i.PROVIDER_ERROR="PROVIDER_ERROR",i.STORAGE_READ_FAILED="STORAGE_READ_FAILED",i.STORAGE_WRITE_FAILED="STORAGE_WRITE_FAILED",i.STORAGE_CORRUPTED="STORAGE_CORRUPTED",i.STORAGE_ERROR="STORAGE_ERROR",i.STORAGE_QUOTA_EXCEEDED="STORAGE_QUOTA_EXCEEDED",i.MEMORY_LIMIT_EXCEEDED="MEMORY_LIMIT_EXCEEDED",i.RATE_LIMIT_EXCEEDED="RATE_LIMIT_EXCEEDED",i.CONCURRENT_LIMIT_EXCEEDED="CONCURRENT_LIMIT_EXCEEDED",i.RESOURCE_NOT_FOUND="RESOURCE_NOT_FOUND",i.RESOURCE_EXHAUSTED="RESOURCE_EXHAUSTED",i.NETWORK_ERROR="NETWORK_ERROR",i.PERMISSION_DENIED="PERMISSION_DENIED",i.OPERATION_FAILED="OPERATION_FAILED",i.VALIDATION_ERROR="VALIDATION_ERROR",i.INVALID_RESPONSE="INVALID_RESPONSE",i.STATE_CORRUPTION="STATE_CORRUPTION",i.CONTEXT_OVERFLOW="CONTEXT_OVERFLOW",i))(D||{});class Y extends Error{constructor(e,t,r={},a){super(e);m(this,"code");m(this,"context");m(this,"recoverySuggestions");m(this,"userMessage");m(this,"isRecoverable");m(this,"cause");this.name="AgentError",this.code=t,this.context={...r,timestamp:new Date,stackTrace:this.stack},this.userMessage=a?.userMessage||this.getDefaultUserMessage(t),this.recoverySuggestions=a?.recoverySuggestions||this.getDefaultRecoverySuggestions(t),this.isRecoverable=a?.isRecoverable??this.isErrorRecoverable(t),a?.cause&&(this.cause=a.cause)}getDefaultUserMessage(e){return Qe(e,this.context)}getDefaultRecoverySuggestions(e){return Je(e)}isErrorRecoverable(e){return["STREAM_INTERRUPTED","STREAM_TIMEOUT","MESSAGE_SEND_FAILED","PROVIDER_PROCESS_DIED","STORAGE_READ_FAILED","STORAGE_WRITE_FAILED"].includes(e)}getHelpLink(){return Ze(this.code)}formatMessage(e){return Ie(e,this.context)}toJSON(){return{name:this.name,code:this.code,message:this.message,userMessage:this.userMessage,context:this.context,recoverySuggestions:this.recoverySuggestions,isRecoverable:this.isRecoverable,helpLink:this.getHelpLink(),stack:this.stack}}}const et={NON_RETRYABLE_ERRORS:["EACCES","EPERM","ENOSPC","EMFILE","permission","memory","fatal","process died","not available on your current plan","agent binary","rate limit","too many requests","hit your limit","you've hit your limit","quota exceeded"]};function ie(i){const s=i.toLowerCase();for(const e of et.NON_RETRYABLE_ERRORS)if(s.includes(e.toLowerCase()))return!0;return!1}const tt="Agent already has an in-flight prompt. Message was not delivered.",v=W("ErrorBoundary"),b=class b{constructor(){}static getInstance(){return b.instance||(b.instance=new b),b.instance}async wrap(s,e,t={}){const{retries:r=Re.DEFAULT_ATTEMPTS,retryDelay:a=Re.BASE_DELAY,exponentialBackoff:l=!0,notify:c=!1,notifyOnRetry:E=!1,context:f={},onError:u,onRetry:o,shouldRetry:R=this.defaultShouldRetry}=t;let g=null,d=0;for(d=1;d<=r+1;d++)try{v.debug(`[${e}] Attempt ${d}/${r+1}`);const h=await s();return d>1&&v.info(`[${e}] Succeeded after ${d} attempts`),h}catch(h){if(g=h,v.error(`[${e}] Attempt ${d} failed`,{error:g.message,attempt:d,maxAttempts:r+1,context:f}),u?.(g,d),d<=r&&R(g)){const C=l?a*Math.pow(2,d-1):a;E&&Q.warning(n.agent_errorBoundary_retrying_message({seconds:C/1e3})),o?.(d),v.info(`[${e}] Retrying in ${C}ms`),await this.sleep(C)}else break}const k=`${e} failed after ${d} attempt${d===1?"":"s"}: ${g?.message}`,P=J(g?.message||n.agent_errorBoundary_generic_error()),N=g?.message?.toLowerCase()||"",$=N.includes("no available models")||N.includes("all models exhausted")||N.includes("all models unavailable");throw c&&!$&&Q.error(P),new Y(P,D.OPERATION_FAILED,{originalError:g?.message,detailedMessage:k,attempts:d,context:f})}async wrapVoid(s,e,t={}){await this.wrap(s,e,t)}wrapSync(s,e,t={}){try{return s()}catch(r){const a=r;throw v.error(`[${e}] Failed`,{error:a.message,context:t.context}),t.notify&&Q.error(J(a.message)),new Y(J(a.message),D.OPERATION_FAILED,t.context)}}defaultShouldRetry(s){const e=s.message.toLowerCase();return ie(s.message)?!1:e.includes("network")||e.includes("timeout")?!0:s instanceof Y?[D.NETWORK_ERROR,D.STREAM_TIMEOUT,D.STREAM_CONNECTION_FAILED,D.PROVIDER_CONNECTION_FAILED,D.PROVIDER_UNAVAILABLE].includes(s.code):!(e.includes("invalid")||e.includes("interrupted")||e.includes("cancel")||e.includes("not found")||e.includes("not available")||e.includes("404")||e.includes("no available models")||e.includes("all models exhausted")||e.includes("all models unavailable")||e.includes("413")||e.includes("too long for the agent")||e.includes("request entity too large")||e.includes("payload too large")||e.includes("content too large")||e.includes("body too large")||e.includes("unauthorized")||e.includes("forbidden")||e.includes("401")||e.includes("403"))}sleep(s){return new Promise(e=>setTimeout(e,s))}async withTimeout(s,e,t){return Promise.race([s(),new Promise((r,a)=>setTimeout(()=>a(new Y(`${t} timed out after ${e}ms`,D.STREAM_TIMEOUT)),e))])}async batchOperations(s,e,t={}){const{concurrency:r=5,continueOnError:a=!0,operationName:l="batch operation"}=t,c=[],E=[];for(let f=0;f<s.length;f+=r){const u=s.slice(f,f+r);(await Promise.allSettled(u.map(R=>e(R)))).forEach((R,g)=>{if(R.status==="fulfilled")c.push(R.value);else{const d=R.reason;if(E.push({item:u[g],error:d}),v.error(`[${l}] Batch item failed`,{item:u[g],error:d.message}),!a)throw d}})}return E.length>0&&v.warn(`[${l}] Completed with ${E.length} errors`),{results:c,errors:E}}};m(b,"instance");let te=b;const st=te.getInstance(),se=W("browser/index"),F=new Map,B=new Map;let U;function it(i,s,e){for(const t of s)try{t(e)}catch(r){se.error("Error in agent subscriber callback",{agentId:i,error:r})}}function rt(){if(U)return;let i=!1;U=p.createSelector(e=>e.agentSessions)().subscribe(()=>{if(!i){i=!0;return}if(F.size===0)return;const e=p.state;for(const[t,r]of F){const a=Ae.select(e,t);B.get(t)!==a&&(B.set(t,a),it(t,r,a))}})}function at(){F.size>0||!U||(U(),U=void 0,B.clear())}function Ct(i,s,e){let t=F.get(i);const r=!t;t||(t=new Set,F.set(i,t)),t.add(s),rt();const a=p.state,l=Ae.select(a,i);return r&&B.set(i,l),l?se.debug("[subscribeToAgent] Initial callback data",{agentId:i,workspaceId:e??"current",hasSession:!0}):se.debug("[subscribeToAgent] No session found",{agentId:i,workspaceId:e??"current"}),s(l),()=>{const c=F.get(i);c&&(c.delete(s),c.size===0&&(F.delete(i),B.delete(i))),at()}}const y=W("ErrorRecovery"),Se={network:{maxRetries:3,initialBackoffMs:1e3,maxBackoffMs:1e4,backoffMultiplier:2,shouldRetry:i=>{const s=i.message.toLowerCase();return s.includes("network")||s.includes("fetch")||s.includes("connection")||s.includes("timeout")}},streaming:{maxRetries:5,initialBackoffMs:500,maxBackoffMs:5e3,backoffMultiplier:1.5,shouldRetry:(i,s)=>{if(s>=5)return!1;const e=i.message.toLowerCase();return e.includes("no available models")||e.includes("all models exhausted")||e.includes("all models unavailable")||ie(i.message)?!1:e.includes("stream")||e.includes("chunk")||e.includes("incomplete")}},persistence:{maxRetries:2,initialBackoffMs:100,maxBackoffMs:1e3,backoffMultiplier:2,shouldRetry:i=>{const s=i.message.toLowerCase();return s.includes("save")||s.includes("write")||s.includes("persist")}},rateLimit:{maxRetries:3,initialBackoffMs:5e3,maxBackoffMs:3e4,backoffMultiplier:2,shouldRetry:i=>{const s=i.message.toLowerCase();return s.includes("rate")||s.includes("limit")||s.includes("429")}}};class nt{constructor(){m(this,"listeners",new Map)}on(s,e){let t=this.listeners.get(s);t||(t=new Set,this.listeners.set(s,t)),t.add(e)}off(s,e){this.listeners.get(s)?.delete(e)}emit(s,...e){this.listeners.get(s)?.forEach(t=>{try{t(...e)}catch(r){y.error(`Error in event listener for ${s}:`,r)}})}removeAllListeners(){this.listeners.clear()}}class ot extends nt{constructor(){super(...arguments);m(this,"activeRecoveries",new Map);m(this,"recoveryStats",new Map)}async executeWithRecovery(e,t=Se.network,r){const a=Date.now(),l=new AbortController;r&&(this.cancelRecovery(r),this.activeRecoveries.set(r,l));let c,E=t.initialBackoffMs,f=0;for(let u=1;u<=t.maxRetries;u++){if(f=u,l.signal.aborted){y.info(`Recovery cancelled for operation ${r}`);break}try{y.debug(`Attempting operation (attempt ${u}/${t.maxRetries})`,{operationId:r});const o=await e();return this.updateStats(r,!0),this.emit("recovery:success",{operationId:r,attempt:u,duration:Date.now()-a}),r&&this.activeRecoveries.delete(r),{success:!0,data:o,attempts:u,totalTime:Date.now()-a}}catch(o){c=o,y.warn(`Operation failed (attempt ${u}/${t.maxRetries})`,{operationId:r,error:c.message});const R=c.message.toLowerCase();if(R.includes("interrupted")||R.includes("cancelled")||R.includes("canceled")){y.debug("User-initiated interruption/cancellation, not retrying",{operationId:r,error:c.message});break}if(R.includes("no available models")||R.includes("all models exhausted")||R.includes("all models unavailable")){y.debug("All models exhausted, not retrying",{operationId:r,error:c.message});break}if(ie(c.message)){y.debug("Fatal error detected, not retrying",{operationId:r,error:c.message});break}if(!t.shouldRetry(c,u)){y.debug("Error not retryable, stopping recovery",{operationId:r,error:c.message});break}if(u<t.maxRetries){const g=Math.random()*.2*E,d=Math.min(E+g,t.maxBackoffMs);t.onRetry?.(u,d),this.emit("recovery:retry",{operationId:r,attempt:u,delay:d,error:c.message}),await this.delay(d,l.signal),E=Math.min(E*t.backoffMultiplier,t.maxBackoffMs)}}}return this.updateStats(r,!1),t.onFailure?.(c,f),this.emit("recovery:failure",{operationId:r,attempts:f,duration:Date.now()-a,error:c?.message}),r&&this.activeRecoveries.delete(r),{success:!1,error:c,attempts:f,totalTime:Date.now()-a}}cancelRecovery(e){const t=this.activeRecoveries.get(e);t&&(t.abort(),this.activeRecoveries.delete(e),y.info(`Cancelled recovery for operation ${e}`))}cancelAllRecoveries(){for(const[e,t]of this.activeRecoveries)t.abort(),y.info(`Cancelled recovery for operation ${e}`);this.activeRecoveries.clear()}getStats(e){if(e)return this.recoveryStats.get(e)||{successes:0,failures:0};const t={};for(const[r,a]of this.recoveryStats)t[r]=a;return t}clearStats(e){e?this.recoveryStats.delete(e):this.recoveryStats.clear()}isRetryable(e,t){const r=e.message.toLowerCase();if(t)switch(t){case"NETWORK":return r.includes("network")||r.includes("fetch");case"TIMEOUT":return r.includes("timeout")||r.includes("timed out");case"RATE_LIMIT":return r.includes("rate")||r.includes("limit")||r.includes("429");case"TEMPORARY":return r.includes("temporary")||r.includes("transient");case"CONFLICT":return r.includes("conflict")||r.includes("concurrent");default:return!1}return this.isRetryable(e,"NETWORK")||this.isRetryable(e,"TIMEOUT")||this.isRetryable(e,"RATE_LIMIT")||this.isRetryable(e,"TEMPORARY")||this.isRetryable(e,"CONFLICT")}delay(e,t){return new Promise((r,a)=>{const l=setTimeout(r,e);if(t){const c=()=>{clearTimeout(l),a(new Error("Delay aborted"))};t.addEventListener("abort",c);const E=r;r=()=>{t.removeEventListener("abort",c),E()}}})}updateStats(e,t){if(!e)return;const r=this.recoveryStats.get(e)||{successes:0,failures:0};t?r.successes++:r.failures++,this.recoveryStats.set(e,r)}dispose(){this.cancelAllRecoveries(),this.recoveryStats.clear(),this.removeAllListeners()}}const ct=new ot,O=new Ye({category:"WorkspaceMetrics"}),lt=100;class ut{constructor(){m(this,"metrics",new Map);m(this,"operations",new Map)}startWorkspaceCreation(s){const e=Date.now();for(this.metrics.delete(s),this.metrics.set(s,{workspaceId:s,creationStarted:e});this.metrics.size>lt;){const t=this.metrics.keys().next().value;if(t===void 0)break;this.metrics.delete(t)}O.info("Started tracking workspace creation",{workspaceId:s})}recordMilestone(s,e){const t=this.metrics.get(s);if(!t){O.warn("No metrics found for workspace",{workspaceId:s,milestone:e});return}const r=Date.now();switch(e){case"optimisticNavigation":t.optimisticNavigation=r;break;case"realWorkspaceCreated":t.realWorkspaceCreated=r;break;case"agentCreated":t.agentCreated=r;break;case"agentReady":t.agentReady=r;break;case"firstMessageSent":t.firstMessageSent=r;break;case"firstResponseReceived":t.firstResponseReceived=r;break;case"firstChunkReceived":t.firstChunkReceived=r;break;case"totalDuration":t.totalDuration=r;break;case"workspaceId":case"creationStarted":O.warn("Cannot update milestone",{milestone:e});return}const a=r-t.creationStarted;O.info(`Milestone: ${e}`,{workspaceId:s,elapsed:`${a}ms`,timestamp:r}),e==="firstResponseReceived"&&(t.totalDuration=r-t.creationStarted,this.logSummary(s))}startOperation(s,e){this.operations.set(s,{startTime:Date.now(),metadata:e})}endOperation(s,e){const t=this.operations.get(s);if(!t)return O.warn("Operation not found",{operationId:s}),null;const r=Date.now();return t.endTime=r,t.duration=r-t.startTime,e&&(t.metadata={...t.metadata,...e}),O.info("Operation completed",{operationId:s,duration:`${t.duration}ms`,metadata:t.metadata}),this.operations.delete(s),t.duration}getMetrics(s){return this.metrics.get(s)}logSummary(s){const e=this.metrics.get(s);if(!e)return;const t={workspaceId:s,totalDuration:`${e.totalDuration}ms`,stages:{optimisticNavigation:e.optimisticNavigation?`${e.optimisticNavigation-e.creationStarted}ms`:"N/A",realWorkspaceCreation:e.realWorkspaceCreated?`${e.realWorkspaceCreated-e.creationStarted}ms`:"N/A",agentCreation:e.agentCreated?`${e.agentCreated-e.creationStarted}ms`:"N/A",agentReady:e.agentReady?`${e.agentReady-e.creationStarted}ms`:"N/A",firstMessage:e.firstMessageSent?`${e.firstMessageSent-e.creationStarted}ms`:"N/A",firstResponse:e.firstResponseReceived?`${e.firstResponseReceived-e.creationStarted}ms`:"N/A"}};O.info("=== Workspace Creation Metrics Summary ===",t),O.info("Workspace Creation Metrics:",t)}clearMetrics(s){this.metrics.delete(s)}incrementAgentCreated(s){const e=this.metrics.get(s);e&&(e.agentCreated=Date.now(),O.info("Agent created",{workspaceId:s}))}incrementMessageSent(s){const e=this.metrics.get(s);e&&!e.firstMessageSent&&(e.firstMessageSent=Date.now(),O.info("First message sent",{workspaceId:s}))}}const dt=new ut,M=W("AgentSend");function A(i){p.dispatch(i)}function Te(i){return typeof i=="object"&&i!==null&&!Array.isArray(i)}function mt(i){const s=Te(i)&&i.success===!0&&"data"in i?i.data:i;return!Te(s)||s.success!==!1?!1:typeof s.error=="string"&&s.error.includes(tt)}async function Lt(i,s,e,t={}){const r=he.select(p.state,e.id);if(!r)return;const a=Ne(i,e.id),l=t.submission,c=!!l&&Le.select(p.state,l.scope)?.supported===!0,E=(o,R,g=!1)=>{l&&A(Be(l.scope,l.id,o,Date.now(),R,g))};let f=!1;const u=()=>(!l||f||ve.select(p.state,l))&&r===he.select(p.state,e.id)&&a.isCurrent(p.state.agentSessions?.byAgentId[i]?.workspaceId);return qe.track(`sendMessage:${a.key}:${i}:${l?.id??"legacy"}`,async()=>{if(!u())return;M.debug(`Sending message to agent ${i}`,{contentLength:s.length,hasContextReferences:!!t.contextReferences?.length,model:t.model});let o=await p.dispatch(we(e.id,i));if(u()){if(!o)throw new Error(n.agent_streamLifecycle_sessionNotFound_error({agentId:i}));o={...o,isStreaming:o.isStreaming??!1};{if(o&&(o.status==="pending"||!o.id)&&!o.backendSessionId&&o.activationState!==H.ACTIVE&&o.activationState!==H.ACTIVATING){const h=e.id.startsWith("optimistic-"),C=e.worktreePath||e.repositoryPath||e.path;if(!h&&C){M.info("Activating pending session in sendMessage",{agentId:i,status:o.status,activationState:o.activationState,hasBackendSessionId:!!o.backendSessionId});const x=await p.dispatch(be(e.id,i));if(!u())return;x&&(o=x)}else throw M.warn("Cannot activate agent - workspace not ready",{agentId:i,workspaceId:e.id,isOptimistic:h,hasWorktreePath:!!e.worktreePath,hasRepositoryPath:!!e.repositoryPath,hasPath:!!e.path}),new Error(n.agent_streamLifecycle_spaceNotReady_error())}else o&&o.status==="pending"&&o.backendSessionId&&(M.info("Fixing status for already-activated session",{agentId:i,backendSessionId:o.backendSessionId,activationState:o.activationState}),o={...o,status:Fe.Active,activationState:H.ACTIVE},A(de({...o,workspaceId:e.id})));if(!o)throw new Error(`Failed to get or create session for agent ${i}`);A(de({...o,workspaceId:e.id}));const g=[{type:"text",text:s}];if(t.imageBlocks)for(const h of t.imageBlocks)g.push({type:"image",...h.data!==void 0?{data:h.data}:{},...h.mimeType!==void 0?{mimeType:h.mimeType}:{},...h.attachmentId!==void 0?{attachmentId:h.attachmentId}:{}});if(t.fileBlocks)for(const h of t.fileBlocks)g.push({type:"file",attachmentId:h.attachmentId,fileName:h.fileName,...h.mimeType!==void 0?{mimeType:h.mimeType}:{},...h.size!==void 0?{size:h.size}:{}});const d=t.userAppMessageId??oe(),k=t.messageMetadata?.[ge],P={...t.contextReferences?.length?{contextReferences:t.contextReferences}:{},...k!==void 0?{[ge]:k}:{}},N={id:me(le()),appMessageId:d,role:"user",contentBlocks:g,timestamp:new Date().toISOString(),metadata:{...P,...t.messageMetadata??{}}};c||(l&&(E("rejected"),f=!0),A(ke(o.id,N))),A(z(o.id,!0));let $=!1;try{c||await p.dispatch(Ge(e.id,i,!0,{allowTruncation:t.resetHistory}));const h=me(`msg_${le()}`),C=oe(),x=async()=>st.wrap(async()=>{if(!u())return;M.info("Agent Service: Sending message to backend with image and file blocks",{agentId:i,sessionId:o.id,hasImageBlocks:!!t.imageBlocks,imageBlocksCount:t.imageBlocks?.length||0,imageBlockDetails:t.imageBlocks?.map(_=>({type:_.type,mimeType:_.mimeType,dataLength:_.data?.length||0}))||[],hasFileBlocks:!!t.fileBlocks,fileBlocksCount:t.fileBlocks?.length||0,fileBlockDetails:t.fileBlocks?.map(_=>({type:_.type,fileName:_.fileName,mimeType:_.mimeType,attachmentId:_.attachmentId,size:_.size}))||[]});const Oe=t.model??t.modelId??o.model??void 0;A(Pe(i));const ye=ce(i,e.id),ae=p.state.chatState?.byAgentId[i]?.attemptGeneration??0,T=await $e("agent.sendMessage",{agentId:i,...c&&l?{messageId:l.id}:{},workspaceId:e.id,content:s,model:Oe,contextReferences:t.contextReferences,imageBlocks:t.imageBlocks,fileBlocks:t.fileBlocks,noteIds:t.noteIds,stdinContext:t.stdinContext,assistantMessageId:h,userAppMessageId:d,assistantAppMessageId:C,priority:t.priority,...t.messageMetadata?{messageMetadata:t.messageMetadata}:{}}).catch(_=>{if(u())throw _});if(u()){if(mt(T)){M.info("Backend dropped duplicate in-flight prompt",{agentId:i,sessionId:o.id}),E("rejected");return}if(T&&typeof T=="object"&&"success"in T){if(!T.success){const _=T.error,I=typeof _=="string"?_:_?.message;throw $=!0,new Error(I||n.agent_streamLifecycle_sendToBackendFailed_error())}if("queued"in T&&T.queued===!0){if(M.info("sendMessage auto-queued by daemon (mid-turn or turn-startup race)",{agentId:i,sessionId:o.id,queuedMessageId:T.queuedMessage?.id}),(!c||!l||!ue.select(p.state,l))&&A(z(o.id,!1)),c||A(xe(o.id,N.id)),c){const I=T.queuedMessage,G=T.turnId,L=typeof G=="string"?G:I?.turnId;if(I&&typeof L=="string"){const S=Ee(s,t),X=K.select(p.state,i,e.id).find(ne=>ne.id===I.id||ne.turnId===L);A(fe(i,I.id,S,L,_e(X??I,S),!X&&!!l&&ue.select(p.state,l),ae))}E("accepted",I,!0),q(i,e.id);return}const _=T.queuedMessage;if(_){const I=T.turnId,G=typeof I=="string"?I:_.turnId;let L=_;if(u()&&ce(i,e.id)===ye){const S=K.select(p.state,i,e.id),X=We(S,_);A(Ve(i,X,e.id))}else u()&&(M.debug("queued-response queue seed superseded by an authoritative snapshot; reconciling via hydrate",{agentId:i,queuedMessageId:_.id}),await q(i,e.id).catch(()=>{}),L=K.select(p.state,i,e.id).find(S=>S.id===_.id||S.turnId===G));if(u()&&typeof G=="string"){const S=Ee(s,t);A(fe(i,_.id,S,G,_e(L??_,S),!L,ae))}else u()&&M.warn("auto-queued sendMessage response carried no turnId; retry record not parked",{agentId:i,queuedMessageId:_.id})}return}}c&&(E("accepted"),q(i,e.id),Ce(i,e.id)),dt.incrementMessageSent(e.id)}},"send message",{retries:c?0:2,notify:!1,context:{agentId:i,workspace:e.id}}),re=c?await x().then(()=>({success:!0,error:void 0})):await ct.executeWithRecovery(x,Se.streaming,`send-message-${i}`);if(!re.success)throw re.error||new Error(n.agent_streamLifecycle_sendFailed_error())}catch(h){if(!u())return;throw A(z(o.id,!1)),!c&&t.messageMetadata&&A(Ue(o.id,N.id,{metadata:P})),c&&E($?"rejected":"uncertain"),h}}}},{memoize:!1,coalesce:!0,priority:"high"})}export{Ct as a,J as c,We as r,Lt as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as ht,bo as E,bw as $t,bq as It,b as bt,bs as r}from"./BkP7iWmk.js";import{bs as yt,ca as k,aD as t,c9 as s,a7 as Ct,ay as Rt,W as kt,bn as wt,bH as v,bV as H,aA as U}from"./DYhIMPy1.js";import{k as At}from"./BNaYSa9e.js";import{b as Dt}from"./BaIAhI85.js";import{II as a,ex as Pt,ey as St,nY as Et,zt as Ut,o0 as _t,o1 as xt,Jd as Ft,Jt as Tt,Ji as Wt,vc as Lt,ut as qt}from"./
|
|
1
|
+
import{t as ht,bo as E,bw as $t,bq as It,b as bt,bs as r}from"./BkP7iWmk.js";import{bs as yt,ca as k,aD as t,c9 as s,a7 as Ct,ay as Rt,W as kt,bn as wt,bH as v,bV as H,aA as U}from"./DYhIMPy1.js";import{k as At}from"./BNaYSa9e.js";import{b as Dt}from"./BaIAhI85.js";import{II as a,ex as Pt,ey as St,nY as Et,zt as Ut,o0 as _t,o1 as xt,Jd as Ft,Jt as Tt,Ji as Wt,vc as Lt,ut as qt}from"./D98guX46.js";import{b5 as vt}from"./B72tYG46.js";import{g as Ht}from"./DfN8_dcw.js";import{ds as Nt,bN as Ot,bC as Bt,bG as Mt,bE as Gt}from"./CM_58O-V.js";import{af as Jt}from"./BDS5fuDA.js";import{C as Kt}from"./ek2C_PyH.js";import{V as Vt}from"./BJzXpdtH.js";import{bR as jt,bL as zt,b6 as Yt}from"./Ca9Vj8X7.js";import{i as Qt}from"./H2jLkRRS.js";function Xt(_,f){if(new.target)return ht({component:Xt,..._});yt(f,!0);const N=()=>r(Z,"$gitRoots$",n),x=()=>r(X,"$workspace",n),O=()=>r(st,"$ftCommits$",n),B=()=>r(ot,"$ftOlderCommits$",n),y=()=>r(tt,"$commitRead$",n),M=()=>r(Y,"$foldUnchanged",n),G=()=>r(z,"$lineWrapping",n),J=()=>r(Q,"$diffSideBySide",n),K=()=>r(at,"$ftLoading$",n),[n,V]=It(),j=e=>{Vt(e,{embedded:!0,showExpand:!0,get expanded(){return t(C)},onToggleExpand:()=>{v(C,!t(C)),t(C)?t(R)?.expandAll():t(R)?.collapseAll()},get foldEnabled(){return M()},onToggleFold:()=>a.dispatch(Wt()),get wrapEnabled(){return G()},onToggleWrap:()=>a.dispatch(Tt()),get splitEnabled(){return J()},onToggleSplit:()=>a.dispatch(Ft())})},z=jt(),Y=zt(),Q=Yt();let h=E(f,"tab",7),i=E(f,"workspaceId",7),$=E(f,"isActive",7);const F=Ht(),g=vt(()=>i()),X=Nt(g),Z=Jt(g),w=crypto.randomUUID(),tt=Ot(g,w),c=s(()=>h().data?.commitHash||""),T=s(()=>h().data?.commitMessage||"");k(()=>{const e=i();if(!(!$()||!e||t(d)))return a.dispatch(Pt(e,"history")),()=>a.dispatch(St(e,"history"))});const d=s(()=>h().data?.gitRootId||""),W=s(()=>t(d)&&N().find(e=>e.id===t(d))?.path||""),et=s(()=>t(W)||x()?.worktreePath||x()?.repositoryPath||""),st=Bt(g),ot=Mt(g),at=Gt(g),nt=s(()=>O()||[]),it=s(()=>B()||[]),p=s(()=>t(d)?void 0:t(nt).find(e=>e.hash===t(c))||t(it).find(e=>e.hash===t(c))),A=s(()=>t(p)?.files||[]),D=s(()=>y()?.request.kind==="commitDetails"&&y().request.commitHash===t(c)&&(y().request.gitRootId??"")===t(d)?y():void 0),l=s(()=>t(D)?.result?.kind==="commitDetails"?t(D).result.details:null),dt=s(()=>t(l)?t(l).fileDetails.length>0?t(l).fileDetails:t(l).files.map(e=>({path:e,additions:0,deletions:0})):[]),rt=s(()=>t(D)?.loading??!1);k(()=>{const e=t(c),o=i(),I=t(d);if(!e||!o||t(A).length>0)return;const u=crypto.randomUUID();return a.dispatch(Et(o,w,u,{kind:"commitDetails",commitHash:e,gitRootId:I||void 0})),()=>a.dispatch(Ut(o,w,u))});const ct=s(()=>t(A).length>0?t(A):t(dt));let C=H(!0),R=H(null);const lt=s(()=>t(ct).map(e=>{const o=typeof e=="string"?e:e.path||"",I=typeof e=="string"?0:e.additions||0,u=typeof e=="string"?0:e.deletions||0;return{filePath:Qt(o)?o:`${t(et)}/${o}`,action:"modify",additions:I,deletions:u,toolName:"local",toolCallId:`commit-${t(c)}-${o}`,staged:!1,category:"committed",commitHash:t(c),commitMessage:t(T)}}));k(()=>{!F||!$()||F.registerActions({display:j})});const L=crypto.randomUUID();k(()=>{const e=i();if(!(!($()&&t(d))||!e))return a.dispatch(_t(e,L)),()=>a.dispatch(xt(e,L))});var mt={get tab(){return h()},set tab(e){h(e),U()},get workspaceId(){return i()},set workspaceId(e){i(e),U()},get isActive(){return $()},set isActive(e){$(e),U()},$set:$t,$on:(e,o)=>bt(f,e,o)},q=Ct(),gt=Rt(q);At(gt,()=>JSON.stringify([i(),t(d),t(c)]),e=>{{let o=s(()=>K()||t(rt)),I=s(()=>t(d)||void 0),u=s(()=>t(W)||void 0),ut=s(()=>({hash:t(c),message:t(T),author:t(p)?.author||t(l)?.author,authorEmail:t(p)?.authorEmail||t(l)?.authorEmail,date:t(p)?.date||t(l)?.date,agentId:t(p)?.agentId,linkedNoteId:t(p)?.linkedNoteId}));Dt(Kt(e,{get isLoading(){return t(o)},get changes(){return t(lt)},get gitRootId(){return t(I)},get gitRootPath(){return t(u)},get commitInfo(){return t(ut)},onOpenAgent:(b,m)=>{const P=m?.metaKey||m?.ctrlKey||!1,S=m?.target?.closest("[data-panel-id]")?.getAttribute("data-panel-id")??void 0;a.dispatch(qt(i(),{agentId:b,openInAdjacentPanel:P,sourcePanelId:S}))},onOpenNote:(b,m)=>{const P=m?.metaKey||m?.ctrlKey||!1,S=m?.target?.closest("[data-panel-id]")?.getAttribute("data-panel-id")??void 0;a.dispatch(Lt(i(),b,{openInAdjacentPanel:P,sourcePanelId:S}))}}),b=>v(R,b,!0),()=>t(R))}}),kt(_,q);var pt=wt(mt);return V(),pt}export{Xt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as O,bo as m,bw as R,b as T,bm as y}from"./BkP7iWmk.js";import{bs as U,a7 as Y,ay as q,W as s,bn as J,aA as v,be as p,b$ as f,b_ as u,bO as d,a5 as P,bA as S,bS as Q,aD as V,aB as L,c9 as X,aG as Z,bI as tt}from"./DYhIMPy1.js";import{i as C}from"./Cmsd5u03.js";import{E as z}from"./
|
|
1
|
+
import{t as O,bo as m,bw as R,b as T,bm as y}from"./BkP7iWmk.js";import{bs as U,a7 as Y,ay as q,W as s,bn as J,aA as v,be as p,b$ as f,b_ as u,bO as d,a5 as P,bA as S,bS as Q,aD as V,aB as L,c9 as X,aG as Z,bI as tt}from"./DYhIMPy1.js";import{i as C}from"./Cmsd5u03.js";import{E as z}from"./BECt4TTe.js";import"./DdeuoyZB.js";import"./ttE12Kpc.js";import"./DPKwA49z.js";import{f as A}from"./DlQfuVhT.js";import{F as et,a0 as at,bM as ot}from"./Duz2cV7w.js";import"./C400w5jq.js";import{I as st}from"./eF4sVb1p.js";import{i as nt,b as rt}from"./DJ0Jx38f.js";var it=L('<span aria-hidden="true"><!></span>'),lt=L('<div class="flex flex-wrap justify-center gap-2"><!> <!></div>');function ct(g,n){if(new.target)return O({component:ct,...g});U(n,!0);let o=m(n,"view",7),b=m(n,"canMove",7,!1),w=m(n,"waiting",7,!1),h=m(n,"onWait",7),x=m(n,"onMove",7);var I={get view(){return o()},set view(t){o(t),v()},get canMove(){return b()},set canMove(t=!1){b(t),v()},get waiting(){return w()},set waiting(t=!1){w(t),v()},get onWait(){return h()},set onWait(t){h(t),v()},get onMove(){return x()},set onMove(t){x(t),v()},$set:R,$on:(t,k)=>T(n,t,k)},H=Y(),$=q(H);{var B=t=>{z(t,{class:"h-full min-h-0",density:"compact","data-workspace-home-panel-notice":"starting",icon:_=>{var r=it(),e=P(r);st(e,{size:16}),S(r),s(_,r)},title:_=>{p();var r=f();u(e=>d(r,e),[()=>y.workspaceHome_starting_label()]),s(_,r)},$$slots:{icon:!0,title:!0}})},F=t=>{z(t,{class:"h-full",get"data-workspace-home-panel-notice"(){return o().state},icon:e=>{{let a=X(()=>o().state==="moving"?at:ot);et(e,{get icon(){return V(a)},class:"size-5"})}},title:e=>{p();var a=f();u(l=>d(a,l),[()=>rt(o().state==="moving"?"moving":"detached")]),s(e,a)},description:e=>{p();var a=f();u(l=>d(a,l),[()=>nt(o())]),s(e,a)},actions:e=>{var a=lt(),l=P(a);{var D=i=>{A(i,{variant:"outline",size:"sm",get disabled(){return w()},onclick:()=>h()?.(),children:(M,N)=>{p();var c=f();u(W=>d(c,W),[()=>y.workspaceHome_wait_label()]),s(M,c)},$$slots:{default:!0}})};C(l,i=>{o().canWait&&i(D)})}var G=Q(l,2);{var K=i=>{A(i,{variant:"outline",size:"sm",onclick:()=>x()?.(),children:(M,N)=>{p();var c=f();u(W=>d(c,W),[()=>y.workspaceHome_move_label()]),s(M,c)},$$slots:{default:!0}})};C(G,i=>{b()&&i(K)})}S(a),s(e,a)},$$slots:{icon:!0,title:!0,description:!0,actions:!0}})};C($,t=>{o().starting?t(B):t(F,-1)})}return s(g,H),J(I)}const E=Symbol("workspace-home-panel");function kt(g){tt(E,g)}function Mt(){return Z(E)}export{ct as W,Mt as g,kt as s};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{I as pr}from"./D-jxMveW.js";import{b as f,a$ as Er,X as j,aW as Kt,ay as nt,P as Ue,B as ur,h as fr,z as N,a_ as Ke,aZ as _r,b0 as gr,V as xr,U as yr,Y as Ir,ax as Rr,J as Or,r as Lr,aV as Ft,bh as Q,aa as tt,l as vt,aH as Ge,Z as br,W as zt,a7 as mr,aQ as Xe}from"./B9uFsQO_.js";import{d as Sr,h as le,g as pt,e as Ar,a as he,b as de}from"./DcNaMmNl.js";var ne=(function(){var e=f(function(_t,w,C,D){for(C=C||{},D=_t.length;D--;C[_t[D]]=w);return C},"o"),t=[1,2],a=[1,3],r=[1,4],i=[2,4],o=[1,9],s=[1,11],n=[1,12],h=[1,14],d=[1,15],E=[1,17],u=[1,18],_=[1,19],L=[1,25],g=[1,26],R=[1,27],T=[1,28],O=[1,29],x=[1,30],m=[1,31],S=[1,32],b=[1,33],P=[1,34],k=[1,35],B=[1,36],V=[1,37],H=[1,38],z=[1,39],X=[1,40],et=[1,42],rt=[1,43],U=[1,44],ot=[1,45],at=[1,46],W=[1,47],M=[1,4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,49,50,51,53,54,56,61,62,63,64,73],Z=[1,56],Mt=[1,75],A=[1,81],v=[1,82],dt=[1,83],st=[1,84],K=[1,85],mt=[1,86],pe=[1,87],Ee=[1,88],ue=[1,89],fe=[1,90],_e=[1,91],ge=[1,92],xe=[1,93],ye=[1,94],Ie=[1,95],Re=[1,96],Oe=[1,97],Le=[1,98],be=[1,99],me=[1,100],Se=[1,101],Ae=[1,102],we=[1,103],Ne=[1,104],Pe=[1,105],ke=[1,106],De=[2,79],ve=[2,78],Pt=[4,5,17,51,53,54],Bt=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],Ce=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,50,51,53,54,56,61,62,63,64,73],$t=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,49,51,53,54,56,61,62,63,64,73],Me=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,51,53,54,56,61,62,63,64,73],jt=[5,52],F=[62,70,71,72,73],Be=[62,73],lt=[1,152],te={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,INVALID:10,box_section:11,box_line:12,participant_statement:13,create:14,box:15,restOfLine:16,end:17,signal:18,autonumber:19,NUM:20,off:21,activate:22,actor:23,deactivate:24,note_statement:25,links_statement:26,link_statement:27,properties_statement:28,details_statement:29,title:30,legacy_title:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,loop:37,rect:38,opt:39,alt:40,else_sections:41,par:42,par_sections:43,par_over:44,critical:45,option_sections:46,break:47,option:48,and:49,else:50,participant:51,AS:52,participant_actor:53,destroy:54,actor_with_config:55,note:56,placement:57,text2:58,over:59,actor_pair:60,links:61,link:62,properties:63,details:64,spaceList:65,",":66,left_of:67,right_of:68,signaltype:69,"+":70,"-":71,"()":72,ACTOR:73,config_object:74,CONFIG_START:75,CONFIG_CONTENT:76,CONFIG_END:77,SOLID_OPEN_ARROW:78,DOTTED_OPEN_ARROW:79,SOLID_ARROW:80,SOLID_ARROW_TOP:81,SOLID_ARROW_BOTTOM:82,STICK_ARROW_TOP:83,STICK_ARROW_BOTTOM:84,SOLID_ARROW_TOP_DOTTED:85,SOLID_ARROW_BOTTOM_DOTTED:86,STICK_ARROW_TOP_DOTTED:87,STICK_ARROW_BOTTOM_DOTTED:88,SOLID_ARROW_TOP_REVERSE:89,SOLID_ARROW_BOTTOM_REVERSE:90,STICK_ARROW_TOP_REVERSE:91,STICK_ARROW_BOTTOM_REVERSE:92,SOLID_ARROW_TOP_REVERSE_DOTTED:93,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:94,STICK_ARROW_TOP_REVERSE_DOTTED:95,STICK_ARROW_BOTTOM_REVERSE_DOTTED:96,BIDIRECTIONAL_SOLID_ARROW:97,DOTTED_ARROW:98,BIDIRECTIONAL_DOTTED_ARROW:99,SOLID_CROSS:100,DOTTED_CROSS:101,SOLID_POINT:102,DOTTED_POINT:103,TXT:104,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",10:"INVALID",14:"create",15:"box",16:"restOfLine",17:"end",19:"autonumber",20:"NUM",21:"off",22:"activate",24:"deactivate",30:"title",31:"legacy_title",32:"acc_title",33:"acc_title_value",34:"acc_descr",35:"acc_descr_value",36:"acc_descr_multiline_value",37:"loop",38:"rect",39:"opt",40:"alt",42:"par",44:"par_over",45:"critical",47:"break",48:"option",49:"and",50:"else",51:"participant",52:"AS",53:"participant_actor",54:"destroy",56:"note",59:"over",61:"links",62:"link",63:"properties",64:"details",66:",",67:"left_of",68:"right_of",70:"+",71:"-",72:"()",73:"ACTOR",75:"CONFIG_START",76:"CONFIG_CONTENT",77:"CONFIG_END",78:"SOLID_OPEN_ARROW",79:"DOTTED_OPEN_ARROW",80:"SOLID_ARROW",81:"SOLID_ARROW_TOP",82:"SOLID_ARROW_BOTTOM",83:"STICK_ARROW_TOP",84:"STICK_ARROW_BOTTOM",85:"SOLID_ARROW_TOP_DOTTED",86:"SOLID_ARROW_BOTTOM_DOTTED",87:"STICK_ARROW_TOP_DOTTED",88:"STICK_ARROW_BOTTOM_DOTTED",89:"SOLID_ARROW_TOP_REVERSE",90:"SOLID_ARROW_BOTTOM_REVERSE",91:"STICK_ARROW_TOP_REVERSE",92:"STICK_ARROW_BOTTOM_REVERSE",93:"SOLID_ARROW_TOP_REVERSE_DOTTED",94:"SOLID_ARROW_BOTTOM_REVERSE_DOTTED",95:"STICK_ARROW_TOP_REVERSE_DOTTED",96:"STICK_ARROW_BOTTOM_REVERSE_DOTTED",97:"BIDIRECTIONAL_SOLID_ARROW",98:"DOTTED_ARROW",99:"BIDIRECTIONAL_DOTTED_ARROW",100:"SOLID_CROSS",101:"DOTTED_CROSS",102:"SOLID_POINT",103:"DOTTED_POINT",104:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[8,1],[11,0],[11,2],[12,2],[12,1],[12,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[46,1],[46,4],[43,1],[43,4],[41,1],[41,4],[13,5],[13,3],[13,5],[13,3],[13,3],[13,5],[13,3],[13,5],[13,3],[25,4],[25,4],[26,3],[27,3],[28,3],[29,3],[65,2],[65,1],[60,3],[60,1],[57,1],[57,1],[18,5],[18,5],[18,5],[18,5],[18,6],[18,4],[55,2],[74,3],[23,1],[23,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[58,1]],performAction:f(function(w,C,D,y,G,c,kt){var p=c.length-1;switch(G){case 3:return y.apply(c[p]),c[p];case 4:case 10:this.$=[];break;case 5:case 11:c[p-1].push(c[p]),this.$=c[p-1];break;case 6:case 7:case 12:case 13:this.$=c[p];break;case 8:case 9:case 14:this.$=[];break;case 16:c[p].type="createParticipant",this.$=c[p];break;case 17:c[p-1].unshift({type:"boxStart",boxData:y.parseBoxData(c[p-2])}),c[p-1].push({type:"boxEnd",boxText:c[p-2]}),this.$=c[p-1];break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(c[p-2]),sequenceIndexStep:Number(c[p-1]),sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceIndex:Number(c[p-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:y.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 23:this.$={type:"activeStart",signalType:y.LINETYPE.ACTIVE_START,actor:c[p-1].actor};break;case 24:this.$={type:"activeEnd",signalType:y.LINETYPE.ACTIVE_END,actor:c[p-1].actor};break;case 30:y.setDiagramTitle(c[p].substring(6)),this.$=c[p].substring(6);break;case 31:y.setDiagramTitle(c[p].substring(7)),this.$=c[p].substring(7);break;case 32:this.$=c[p].trim(),y.setAccTitle(this.$);break;case 33:case 34:this.$=c[p].trim(),y.setAccDescription(this.$);break;case 35:c[p-1].unshift({type:"loopStart",loopText:y.parseMessage(c[p-2]),signalType:y.LINETYPE.LOOP_START}),c[p-1].push({type:"loopEnd",loopText:c[p-2],signalType:y.LINETYPE.LOOP_END}),this.$=c[p-1];break;case 36:c[p-1].unshift({type:"rectStart",color:y.parseMessage(c[p-2]),signalType:y.LINETYPE.RECT_START}),c[p-1].push({type:"rectEnd",color:y.parseMessage(c[p-2]),signalType:y.LINETYPE.RECT_END}),this.$=c[p-1];break;case 37:c[p-1].unshift({type:"optStart",optText:y.parseMessage(c[p-2]),signalType:y.LINETYPE.OPT_START}),c[p-1].push({type:"optEnd",optText:y.parseMessage(c[p-2]),signalType:y.LINETYPE.OPT_END}),this.$=c[p-1];break;case 38:c[p-1].unshift({type:"altStart",altText:y.parseMessage(c[p-2]),signalType:y.LINETYPE.ALT_START}),c[p-1].push({type:"altEnd",signalType:y.LINETYPE.ALT_END}),this.$=c[p-1];break;case 39:c[p-1].unshift({type:"parStart",parText:y.parseMessage(c[p-2]),signalType:y.LINETYPE.PAR_START}),c[p-1].push({type:"parEnd",signalType:y.LINETYPE.PAR_END}),this.$=c[p-1];break;case 40:c[p-1].unshift({type:"parStart",parText:y.parseMessage(c[p-2]),signalType:y.LINETYPE.PAR_OVER_START}),c[p-1].push({type:"parEnd",signalType:y.LINETYPE.PAR_END}),this.$=c[p-1];break;case 41:c[p-1].unshift({type:"criticalStart",criticalText:y.parseMessage(c[p-2]),signalType:y.LINETYPE.CRITICAL_START}),c[p-1].push({type:"criticalEnd",signalType:y.LINETYPE.CRITICAL_END}),this.$=c[p-1];break;case 42:c[p-1].unshift({type:"breakStart",breakText:y.parseMessage(c[p-2]),signalType:y.LINETYPE.BREAK_START}),c[p-1].push({type:"breakEnd",optText:y.parseMessage(c[p-2]),signalType:y.LINETYPE.BREAK_END}),this.$=c[p-1];break;case 44:this.$=c[p-3].concat([{type:"option",optionText:y.parseMessage(c[p-1]),signalType:y.LINETYPE.CRITICAL_OPTION},c[p]]);break;case 46:this.$=c[p-3].concat([{type:"and",parText:y.parseMessage(c[p-1]),signalType:y.LINETYPE.PAR_AND},c[p]]);break;case 48:this.$=c[p-3].concat([{type:"else",altText:y.parseMessage(c[p-1]),signalType:y.LINETYPE.ALT_ELSE},c[p]]);break;case 49:c[p-3].draw="participant",c[p-3].type="addParticipant",c[p-3].description=y.parseMessage(c[p-1]),this.$=c[p-3];break;case 50:c[p-1].draw="participant",c[p-1].type="addParticipant",this.$=c[p-1];break;case 51:c[p-3].draw="actor",c[p-3].type="addParticipant",c[p-3].description=y.parseMessage(c[p-1]),this.$=c[p-3];break;case 52:case 57:c[p-1].draw="actor",c[p-1].type="addParticipant",this.$=c[p-1];break;case 53:c[p-1].type="destroyParticipant",this.$=c[p-1];break;case 54:c[p-3].draw="participant",c[p-3].type="addParticipant",c[p-3].description=y.parseMessage(c[p-1]),this.$=c[p-3];break;case 55:c[p-1].draw="participant",c[p-1].type="addParticipant",this.$=c[p-1];break;case 56:c[p-3].draw="actor",c[p-3].type="addParticipant",c[p-3].description=y.parseMessage(c[p-1]),this.$=c[p-3];break;case 58:this.$=[c[p-1],{type:"addNote",placement:c[p-2],actor:c[p-1].actor,text:c[p]}];break;case 59:c[p-2]=[].concat(c[p-1],c[p-1]).slice(0,2),c[p-2][0]=c[p-2][0].actor,c[p-2][1]=c[p-2][1].actor,this.$=[c[p-1],{type:"addNote",placement:y.PLACEMENT.OVER,actor:c[p-2].slice(0,2),text:c[p]}];break;case 60:this.$=[c[p-1],{type:"addLinks",actor:c[p-1].actor,text:c[p]}];break;case 61:this.$=[c[p-1],{type:"addALink",actor:c[p-1].actor,text:c[p]}];break;case 62:this.$=[c[p-1],{type:"addProperties",actor:c[p-1].actor,text:c[p]}];break;case 63:this.$=[c[p-1],{type:"addDetails",actor:c[p-1].actor,text:c[p]}];break;case 66:this.$=[c[p-2],c[p]];break;case 67:this.$=c[p];break;case 68:this.$=y.PLACEMENT.LEFTOF;break;case 69:this.$=y.PLACEMENT.RIGHTOF;break;case 70:this.$=[c[p-4],c[p-1],{type:"addMessage",from:c[p-4].actor,to:c[p-1].actor,signalType:c[p-3],msg:c[p],activate:!0},{type:"activeStart",signalType:y.LINETYPE.ACTIVE_START,actor:c[p-1].actor}];break;case 71:this.$=[c[p-4],c[p-1],{type:"addMessage",from:c[p-4].actor,to:c[p-1].actor,signalType:c[p-3],msg:c[p]},{type:"activeEnd",signalType:y.LINETYPE.ACTIVE_END,actor:c[p-4].actor}];break;case 72:this.$=[c[p-4],c[p-1],{type:"addMessage",from:c[p-4].actor,to:c[p-1].actor,signalType:c[p-3],msg:c[p],activate:!0,centralConnection:y.LINETYPE.CENTRAL_CONNECTION},{type:"centralConnection",signalType:y.LINETYPE.CENTRAL_CONNECTION,actor:c[p-1].actor}];break;case 73:this.$=[c[p-4],c[p-1],{type:"addMessage",from:c[p-4].actor,to:c[p-1].actor,signalType:c[p-2],msg:c[p],activate:!1,centralConnection:y.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:"centralConnectionReverse",signalType:y.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:c[p-4].actor}];break;case 74:this.$=[c[p-5],c[p-1],{type:"addMessage",from:c[p-5].actor,to:c[p-1].actor,signalType:c[p-3],msg:c[p],activate:!0,centralConnection:y.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:"centralConnection",signalType:y.LINETYPE.CENTRAL_CONNECTION,actor:c[p-1].actor},{type:"centralConnectionReverse",signalType:y.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:c[p-5].actor}];break;case 75:this.$=[c[p-3],c[p-1],{type:"addMessage",from:c[p-3].actor,to:c[p-1].actor,signalType:c[p-2],msg:c[p]}];break;case 76:this.$={type:"addParticipant",actor:c[p-1],config:c[p]};break;case 77:this.$=c[p-1].trim();break;case 78:case 79:this.$={type:"addParticipant",actor:c[p]};break;case 80:this.$=y.LINETYPE.SOLID_OPEN;break;case 81:this.$=y.LINETYPE.DOTTED_OPEN;break;case 82:this.$=y.LINETYPE.SOLID;break;case 83:this.$=y.LINETYPE.SOLID_TOP;break;case 84:this.$=y.LINETYPE.SOLID_BOTTOM;break;case 85:this.$=y.LINETYPE.STICK_TOP;break;case 86:this.$=y.LINETYPE.STICK_BOTTOM;break;case 87:this.$=y.LINETYPE.SOLID_TOP_DOTTED;break;case 88:this.$=y.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 89:this.$=y.LINETYPE.STICK_TOP_DOTTED;break;case 90:this.$=y.LINETYPE.STICK_BOTTOM_DOTTED;break;case 91:this.$=y.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 92:this.$=y.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 93:this.$=y.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 94:this.$=y.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 95:this.$=y.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 96:this.$=y.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 97:this.$=y.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 98:this.$=y.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 99:this.$=y.LINETYPE.BIDIRECTIONAL_SOLID;break;case 100:this.$=y.LINETYPE.DOTTED;break;case 101:this.$=y.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 102:this.$=y.LINETYPE.SOLID_CROSS;break;case 103:this.$=y.LINETYPE.DOTTED_CROSS;break;case 104:this.$=y.LINETYPE.SOLID_POINT;break;case 105:this.$=y.LINETYPE.DOTTED_POINT;break;case 106:this.$=y.parseMessage(c[p].trim().substring(1));break}},"anonymous"),table:[{3:1,4:t,5:a,6:r},{1:[3]},{3:5,4:t,5:a,6:r},{3:6,4:t,5:a,6:r},e([1,4,5,10,14,15,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:o,5:s,8:8,9:10,10:n,13:13,14:h,15:d,18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:L,31:g,32:R,34:T,36:O,37:x,38:m,39:S,40:b,42:P,44:k,45:B,47:V,51:H,53:z,54:X,56:et,61:rt,62:U,63:ot,64:at,73:W},e(M,[2,5]),{9:48,13:13,14:h,15:d,18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:L,31:g,32:R,34:T,36:O,37:x,38:m,39:S,40:b,42:P,44:k,45:B,47:V,51:H,53:z,54:X,56:et,61:rt,62:U,63:ot,64:at,73:W},e(M,[2,7]),e(M,[2,8]),e(M,[2,9]),e(M,[2,15]),{13:49,51:H,53:z,54:X},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,62:Z,73:W},{23:57,62:Z,73:W},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},{5:[1,62]},e(M,[2,30]),e(M,[2,31]),{33:[1,63]},{35:[1,64]},e(M,[2,34]),{16:[1,65]},{16:[1,66]},{16:[1,67]},{16:[1,68]},{16:[1,69]},{16:[1,70]},{16:[1,71]},{16:[1,72]},{23:73,55:74,62:Z,73:Mt},{23:76,55:77,62:Z,73:Mt},{23:78,62:Z,73:W},{69:79,72:[1,80],78:A,79:v,80:dt,81:st,82:K,83:mt,84:pe,85:Ee,86:ue,87:fe,88:_e,89:ge,90:xe,91:ye,92:Ie,93:Re,94:Oe,95:Le,96:be,97:me,98:Se,99:Ae,100:we,101:Ne,102:Pe,103:ke},{57:107,59:[1,108],67:[1,109],68:[1,110]},{23:111,62:Z,73:W},e([72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103],De,{23:112,62:Z,73:W}),{23:113,62:Z,73:W},{23:114,62:Z,73:W},e([5,66,72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104],ve),e(M,[2,6]),e(M,[2,16]),e(Pt,[2,10],{11:115}),e(M,[2,18]),{5:[1,117],20:[1,116]},{5:[1,118]},e(M,[2,22]),{5:[1,119]},e([5,52,66,104],De),{5:[1,120]},e(M,[2,25]),e(M,[2,26]),e(M,[2,27]),e(M,[2,28]),e(M,[2,29]),e(M,[2,32]),e(M,[2,33]),e(Bt,i,{7:121}),e(Bt,i,{7:122}),e(Bt,i,{7:123}),e(Ce,i,{41:124,7:125}),e($t,i,{43:126,7:127}),e($t,i,{7:127,43:128}),e(Me,i,{46:129,7:130}),e(Bt,i,{7:131}),{5:[1,133],52:[1,132]},{5:[1,135],52:[1,134]},e(jt,ve,{74:136,75:[1,137]}),{5:[1,139],52:[1,138]},{5:[1,141],52:[1,140]},{5:[1,142]},{23:146,62:Z,70:[1,143],71:[1,144],72:[1,145],73:W},{69:147,78:A,79:v,80:dt,81:st,82:K,83:mt,84:pe,85:Ee,86:ue,87:fe,88:_e,89:ge,90:xe,91:ye,92:Ie,93:Re,94:Oe,95:Le,96:be,97:me,98:Se,99:Ae,100:we,101:Ne,102:Pe,103:ke},e(F,[2,80]),e(F,[2,81]),e(F,[2,82]),e(F,[2,83]),e(F,[2,84]),e(F,[2,85]),e(F,[2,86]),e(F,[2,87]),e(F,[2,88]),e(F,[2,89]),e(F,[2,90]),e(F,[2,91]),e(F,[2,92]),e(F,[2,93]),e(F,[2,94]),e(F,[2,95]),e(F,[2,96]),e(F,[2,97]),e(F,[2,98]),e(F,[2,99]),e(F,[2,100]),e(F,[2,101]),e(F,[2,102]),e(F,[2,103]),e(F,[2,104]),e(F,[2,105]),{23:148,62:Z,73:W},{23:150,60:149,62:Z,73:W},e(Be,[2,68]),e(Be,[2,69]),{58:151,104:lt},{58:153,104:lt},{58:154,104:lt},{58:155,104:lt},{4:[1,158],5:[1,160],12:157,13:159,17:[1,156],51:H,53:z,54:X},{5:[1,161]},e(M,[2,20]),e(M,[2,21]),e(M,[2,23]),e(M,[2,24]),{4:o,5:s,8:8,9:10,10:n,13:13,14:h,15:d,17:[1,162],18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:L,31:g,32:R,34:T,36:O,37:x,38:m,39:S,40:b,42:P,44:k,45:B,47:V,51:H,53:z,54:X,56:et,61:rt,62:U,63:ot,64:at,73:W},{4:o,5:s,8:8,9:10,10:n,13:13,14:h,15:d,17:[1,163],18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:L,31:g,32:R,34:T,36:O,37:x,38:m,39:S,40:b,42:P,44:k,45:B,47:V,51:H,53:z,54:X,56:et,61:rt,62:U,63:ot,64:at,73:W},{4:o,5:s,8:8,9:10,10:n,13:13,14:h,15:d,17:[1,164],18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:L,31:g,32:R,34:T,36:O,37:x,38:m,39:S,40:b,42:P,44:k,45:B,47:V,51:H,53:z,54:X,56:et,61:rt,62:U,63:ot,64:at,73:W},{17:[1,165]},{4:o,5:s,8:8,9:10,10:n,13:13,14:h,15:d,17:[2,47],18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:L,31:g,32:R,34:T,36:O,37:x,38:m,39:S,40:b,42:P,44:k,45:B,47:V,50:[1,166],51:H,53:z,54:X,56:et,61:rt,62:U,63:ot,64:at,73:W},{17:[1,167]},{4:o,5:s,8:8,9:10,10:n,13:13,14:h,15:d,17:[2,45],18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:L,31:g,32:R,34:T,36:O,37:x,38:m,39:S,40:b,42:P,44:k,45:B,47:V,49:[1,168],51:H,53:z,54:X,56:et,61:rt,62:U,63:ot,64:at,73:W},{17:[1,169]},{17:[1,170]},{4:o,5:s,8:8,9:10,10:n,13:13,14:h,15:d,17:[2,43],18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:L,31:g,32:R,34:T,36:O,37:x,38:m,39:S,40:b,42:P,44:k,45:B,47:V,48:[1,171],51:H,53:z,54:X,56:et,61:rt,62:U,63:ot,64:at,73:W},{4:o,5:s,8:8,9:10,10:n,13:13,14:h,15:d,17:[1,172],18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:L,31:g,32:R,34:T,36:O,37:x,38:m,39:S,40:b,42:P,44:k,45:B,47:V,51:H,53:z,54:X,56:et,61:rt,62:U,63:ot,64:at,73:W},{16:[1,173]},e(M,[2,50]),{16:[1,174]},e(M,[2,55]),e(jt,[2,76]),{76:[1,175]},{16:[1,176]},e(M,[2,52]),{16:[1,177]},e(M,[2,57]),e(M,[2,53]),{23:178,62:Z,73:W},{23:179,62:Z,73:W},{23:180,62:Z,73:W},{58:181,104:lt},{23:182,62:Z,72:[1,183],73:W},{58:184,104:lt},{58:185,104:lt},{66:[1,186],104:[2,67]},{5:[2,60]},{5:[2,106]},{5:[2,61]},{5:[2,62]},{5:[2,63]},e(M,[2,17]),e(Pt,[2,11]),{13:187,51:H,53:z,54:X},e(Pt,[2,13]),e(Pt,[2,14]),e(M,[2,19]),e(M,[2,35]),e(M,[2,36]),e(M,[2,37]),e(M,[2,38]),{16:[1,188]},e(M,[2,39]),{16:[1,189]},e(M,[2,40]),e(M,[2,41]),{16:[1,190]},e(M,[2,42]),{5:[1,191]},{5:[1,192]},{77:[1,193]},{5:[1,194]},{5:[1,195]},{58:196,104:lt},{58:197,104:lt},{58:198,104:lt},{5:[2,75]},{58:199,104:lt},{23:200,62:Z,73:W},{5:[2,58]},{5:[2,59]},{23:201,62:Z,73:W},e(Pt,[2,12]),e(Ce,i,{7:125,41:202}),e($t,i,{7:127,43:203}),e(Me,i,{7:130,46:204}),e(M,[2,49]),e(M,[2,54]),e(jt,[2,77]),e(M,[2,51]),e(M,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:205,104:lt},{104:[2,66]},{17:[2,48]},{17:[2,46]},{17:[2,44]},{5:[2,74]}],defaultActions:{5:[2,1],6:[2,2],151:[2,60],152:[2,106],153:[2,61],154:[2,62],155:[2,63],181:[2,75],184:[2,58],185:[2,59],196:[2,70],197:[2,71],198:[2,72],199:[2,73],201:[2,66],202:[2,48],203:[2,46],204:[2,44],205:[2,74]},parseError:f(function(w,C){if(C.recoverable)this.trace(w);else{var D=new Error(w);throw D.hash=C,D}},"parseError"),parse:f(function(w){var C=this,D=[0],y=[],G=[null],c=[],kt=this.table,p="",Vt=0,Ye=0,lr=2,Ve=1,hr=c.slice.call(arguments,1),$=Object.create(this.lexer),It={yy:{}};for(var ee in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ee)&&(It.yy[ee]=this.yy[ee]);$.setInput(w,It.yy),It.yy.lexer=$,It.yy.parser=this,typeof $.yylloc>"u"&&($.yylloc={});var re=$.yylloc;c.push(re);var dr=$.options&&$.options.ranges;typeof It.yy.parseError=="function"?this.parseError=It.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Tr(ct){D.length=D.length-2*ct,G.length=G.length-ct,c.length=c.length-ct}f(Tr,"popStack");function We(){var ct;return ct=y.pop()||$.lex()||Ve,typeof ct!="number"&&(ct instanceof Array&&(y=ct,ct=y.pop()),ct=C.symbols_[ct]||ct),ct}f(We,"lex");for(var it,Rt,ht,ae,St={},Wt,Et,He,Ht;;){if(Rt=D[D.length-1],this.defaultActions[Rt]?ht=this.defaultActions[Rt]:((it===null||typeof it>"u")&&(it=We()),ht=kt[Rt]&&kt[Rt][it]),typeof ht>"u"||!ht.length||!ht[0]){var se="";Ht=[];for(Wt in kt[Rt])this.terminals_[Wt]&&Wt>lr&&Ht.push("'"+this.terminals_[Wt]+"'");$.showPosition?se="Parse error on line "+(Vt+1)+`:
|
|
1
|
+
import{I as pr}from"./CFa2NaXM.js";import{b as f,a$ as Er,X as j,aW as Kt,ay as nt,P as Ue,B as ur,h as fr,z as N,a_ as Ke,aZ as _r,b0 as gr,V as xr,U as yr,Y as Ir,ax as Rr,J as Or,r as Lr,aV as Ft,bh as Q,aa as tt,l as vt,aH as Ge,Z as br,W as zt,a7 as mr,aQ as Xe}from"./B1YqGJC0.js";import{d as Sr,h as le,g as pt,e as Ar,a as he,b as de}from"./DFPzxECW.js";var ne=(function(){var e=f(function(_t,w,C,D){for(C=C||{},D=_t.length;D--;C[_t[D]]=w);return C},"o"),t=[1,2],a=[1,3],r=[1,4],i=[2,4],o=[1,9],s=[1,11],n=[1,12],h=[1,14],d=[1,15],E=[1,17],u=[1,18],_=[1,19],L=[1,25],g=[1,26],R=[1,27],T=[1,28],O=[1,29],x=[1,30],m=[1,31],S=[1,32],b=[1,33],P=[1,34],k=[1,35],B=[1,36],V=[1,37],H=[1,38],z=[1,39],X=[1,40],et=[1,42],rt=[1,43],U=[1,44],ot=[1,45],at=[1,46],W=[1,47],M=[1,4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,49,50,51,53,54,56,61,62,63,64,73],Z=[1,56],Mt=[1,75],A=[1,81],v=[1,82],dt=[1,83],st=[1,84],K=[1,85],mt=[1,86],pe=[1,87],Ee=[1,88],ue=[1,89],fe=[1,90],_e=[1,91],ge=[1,92],xe=[1,93],ye=[1,94],Ie=[1,95],Re=[1,96],Oe=[1,97],Le=[1,98],be=[1,99],me=[1,100],Se=[1,101],Ae=[1,102],we=[1,103],Ne=[1,104],Pe=[1,105],ke=[1,106],De=[2,79],ve=[2,78],Pt=[4,5,17,51,53,54],Bt=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],Ce=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,50,51,53,54,56,61,62,63,64,73],$t=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,49,51,53,54,56,61,62,63,64,73],Me=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,51,53,54,56,61,62,63,64,73],jt=[5,52],F=[62,70,71,72,73],Be=[62,73],lt=[1,152],te={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,INVALID:10,box_section:11,box_line:12,participant_statement:13,create:14,box:15,restOfLine:16,end:17,signal:18,autonumber:19,NUM:20,off:21,activate:22,actor:23,deactivate:24,note_statement:25,links_statement:26,link_statement:27,properties_statement:28,details_statement:29,title:30,legacy_title:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,loop:37,rect:38,opt:39,alt:40,else_sections:41,par:42,par_sections:43,par_over:44,critical:45,option_sections:46,break:47,option:48,and:49,else:50,participant:51,AS:52,participant_actor:53,destroy:54,actor_with_config:55,note:56,placement:57,text2:58,over:59,actor_pair:60,links:61,link:62,properties:63,details:64,spaceList:65,",":66,left_of:67,right_of:68,signaltype:69,"+":70,"-":71,"()":72,ACTOR:73,config_object:74,CONFIG_START:75,CONFIG_CONTENT:76,CONFIG_END:77,SOLID_OPEN_ARROW:78,DOTTED_OPEN_ARROW:79,SOLID_ARROW:80,SOLID_ARROW_TOP:81,SOLID_ARROW_BOTTOM:82,STICK_ARROW_TOP:83,STICK_ARROW_BOTTOM:84,SOLID_ARROW_TOP_DOTTED:85,SOLID_ARROW_BOTTOM_DOTTED:86,STICK_ARROW_TOP_DOTTED:87,STICK_ARROW_BOTTOM_DOTTED:88,SOLID_ARROW_TOP_REVERSE:89,SOLID_ARROW_BOTTOM_REVERSE:90,STICK_ARROW_TOP_REVERSE:91,STICK_ARROW_BOTTOM_REVERSE:92,SOLID_ARROW_TOP_REVERSE_DOTTED:93,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:94,STICK_ARROW_TOP_REVERSE_DOTTED:95,STICK_ARROW_BOTTOM_REVERSE_DOTTED:96,BIDIRECTIONAL_SOLID_ARROW:97,DOTTED_ARROW:98,BIDIRECTIONAL_DOTTED_ARROW:99,SOLID_CROSS:100,DOTTED_CROSS:101,SOLID_POINT:102,DOTTED_POINT:103,TXT:104,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",10:"INVALID",14:"create",15:"box",16:"restOfLine",17:"end",19:"autonumber",20:"NUM",21:"off",22:"activate",24:"deactivate",30:"title",31:"legacy_title",32:"acc_title",33:"acc_title_value",34:"acc_descr",35:"acc_descr_value",36:"acc_descr_multiline_value",37:"loop",38:"rect",39:"opt",40:"alt",42:"par",44:"par_over",45:"critical",47:"break",48:"option",49:"and",50:"else",51:"participant",52:"AS",53:"participant_actor",54:"destroy",56:"note",59:"over",61:"links",62:"link",63:"properties",64:"details",66:",",67:"left_of",68:"right_of",70:"+",71:"-",72:"()",73:"ACTOR",75:"CONFIG_START",76:"CONFIG_CONTENT",77:"CONFIG_END",78:"SOLID_OPEN_ARROW",79:"DOTTED_OPEN_ARROW",80:"SOLID_ARROW",81:"SOLID_ARROW_TOP",82:"SOLID_ARROW_BOTTOM",83:"STICK_ARROW_TOP",84:"STICK_ARROW_BOTTOM",85:"SOLID_ARROW_TOP_DOTTED",86:"SOLID_ARROW_BOTTOM_DOTTED",87:"STICK_ARROW_TOP_DOTTED",88:"STICK_ARROW_BOTTOM_DOTTED",89:"SOLID_ARROW_TOP_REVERSE",90:"SOLID_ARROW_BOTTOM_REVERSE",91:"STICK_ARROW_TOP_REVERSE",92:"STICK_ARROW_BOTTOM_REVERSE",93:"SOLID_ARROW_TOP_REVERSE_DOTTED",94:"SOLID_ARROW_BOTTOM_REVERSE_DOTTED",95:"STICK_ARROW_TOP_REVERSE_DOTTED",96:"STICK_ARROW_BOTTOM_REVERSE_DOTTED",97:"BIDIRECTIONAL_SOLID_ARROW",98:"DOTTED_ARROW",99:"BIDIRECTIONAL_DOTTED_ARROW",100:"SOLID_CROSS",101:"DOTTED_CROSS",102:"SOLID_POINT",103:"DOTTED_POINT",104:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[8,1],[11,0],[11,2],[12,2],[12,1],[12,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[46,1],[46,4],[43,1],[43,4],[41,1],[41,4],[13,5],[13,3],[13,5],[13,3],[13,3],[13,5],[13,3],[13,5],[13,3],[25,4],[25,4],[26,3],[27,3],[28,3],[29,3],[65,2],[65,1],[60,3],[60,1],[57,1],[57,1],[18,5],[18,5],[18,5],[18,5],[18,6],[18,4],[55,2],[74,3],[23,1],[23,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[58,1]],performAction:f(function(w,C,D,y,G,c,kt){var p=c.length-1;switch(G){case 3:return y.apply(c[p]),c[p];case 4:case 10:this.$=[];break;case 5:case 11:c[p-1].push(c[p]),this.$=c[p-1];break;case 6:case 7:case 12:case 13:this.$=c[p];break;case 8:case 9:case 14:this.$=[];break;case 16:c[p].type="createParticipant",this.$=c[p];break;case 17:c[p-1].unshift({type:"boxStart",boxData:y.parseBoxData(c[p-2])}),c[p-1].push({type:"boxEnd",boxText:c[p-2]}),this.$=c[p-1];break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(c[p-2]),sequenceIndexStep:Number(c[p-1]),sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceIndex:Number(c[p-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:y.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 23:this.$={type:"activeStart",signalType:y.LINETYPE.ACTIVE_START,actor:c[p-1].actor};break;case 24:this.$={type:"activeEnd",signalType:y.LINETYPE.ACTIVE_END,actor:c[p-1].actor};break;case 30:y.setDiagramTitle(c[p].substring(6)),this.$=c[p].substring(6);break;case 31:y.setDiagramTitle(c[p].substring(7)),this.$=c[p].substring(7);break;case 32:this.$=c[p].trim(),y.setAccTitle(this.$);break;case 33:case 34:this.$=c[p].trim(),y.setAccDescription(this.$);break;case 35:c[p-1].unshift({type:"loopStart",loopText:y.parseMessage(c[p-2]),signalType:y.LINETYPE.LOOP_START}),c[p-1].push({type:"loopEnd",loopText:c[p-2],signalType:y.LINETYPE.LOOP_END}),this.$=c[p-1];break;case 36:c[p-1].unshift({type:"rectStart",color:y.parseMessage(c[p-2]),signalType:y.LINETYPE.RECT_START}),c[p-1].push({type:"rectEnd",color:y.parseMessage(c[p-2]),signalType:y.LINETYPE.RECT_END}),this.$=c[p-1];break;case 37:c[p-1].unshift({type:"optStart",optText:y.parseMessage(c[p-2]),signalType:y.LINETYPE.OPT_START}),c[p-1].push({type:"optEnd",optText:y.parseMessage(c[p-2]),signalType:y.LINETYPE.OPT_END}),this.$=c[p-1];break;case 38:c[p-1].unshift({type:"altStart",altText:y.parseMessage(c[p-2]),signalType:y.LINETYPE.ALT_START}),c[p-1].push({type:"altEnd",signalType:y.LINETYPE.ALT_END}),this.$=c[p-1];break;case 39:c[p-1].unshift({type:"parStart",parText:y.parseMessage(c[p-2]),signalType:y.LINETYPE.PAR_START}),c[p-1].push({type:"parEnd",signalType:y.LINETYPE.PAR_END}),this.$=c[p-1];break;case 40:c[p-1].unshift({type:"parStart",parText:y.parseMessage(c[p-2]),signalType:y.LINETYPE.PAR_OVER_START}),c[p-1].push({type:"parEnd",signalType:y.LINETYPE.PAR_END}),this.$=c[p-1];break;case 41:c[p-1].unshift({type:"criticalStart",criticalText:y.parseMessage(c[p-2]),signalType:y.LINETYPE.CRITICAL_START}),c[p-1].push({type:"criticalEnd",signalType:y.LINETYPE.CRITICAL_END}),this.$=c[p-1];break;case 42:c[p-1].unshift({type:"breakStart",breakText:y.parseMessage(c[p-2]),signalType:y.LINETYPE.BREAK_START}),c[p-1].push({type:"breakEnd",optText:y.parseMessage(c[p-2]),signalType:y.LINETYPE.BREAK_END}),this.$=c[p-1];break;case 44:this.$=c[p-3].concat([{type:"option",optionText:y.parseMessage(c[p-1]),signalType:y.LINETYPE.CRITICAL_OPTION},c[p]]);break;case 46:this.$=c[p-3].concat([{type:"and",parText:y.parseMessage(c[p-1]),signalType:y.LINETYPE.PAR_AND},c[p]]);break;case 48:this.$=c[p-3].concat([{type:"else",altText:y.parseMessage(c[p-1]),signalType:y.LINETYPE.ALT_ELSE},c[p]]);break;case 49:c[p-3].draw="participant",c[p-3].type="addParticipant",c[p-3].description=y.parseMessage(c[p-1]),this.$=c[p-3];break;case 50:c[p-1].draw="participant",c[p-1].type="addParticipant",this.$=c[p-1];break;case 51:c[p-3].draw="actor",c[p-3].type="addParticipant",c[p-3].description=y.parseMessage(c[p-1]),this.$=c[p-3];break;case 52:case 57:c[p-1].draw="actor",c[p-1].type="addParticipant",this.$=c[p-1];break;case 53:c[p-1].type="destroyParticipant",this.$=c[p-1];break;case 54:c[p-3].draw="participant",c[p-3].type="addParticipant",c[p-3].description=y.parseMessage(c[p-1]),this.$=c[p-3];break;case 55:c[p-1].draw="participant",c[p-1].type="addParticipant",this.$=c[p-1];break;case 56:c[p-3].draw="actor",c[p-3].type="addParticipant",c[p-3].description=y.parseMessage(c[p-1]),this.$=c[p-3];break;case 58:this.$=[c[p-1],{type:"addNote",placement:c[p-2],actor:c[p-1].actor,text:c[p]}];break;case 59:c[p-2]=[].concat(c[p-1],c[p-1]).slice(0,2),c[p-2][0]=c[p-2][0].actor,c[p-2][1]=c[p-2][1].actor,this.$=[c[p-1],{type:"addNote",placement:y.PLACEMENT.OVER,actor:c[p-2].slice(0,2),text:c[p]}];break;case 60:this.$=[c[p-1],{type:"addLinks",actor:c[p-1].actor,text:c[p]}];break;case 61:this.$=[c[p-1],{type:"addALink",actor:c[p-1].actor,text:c[p]}];break;case 62:this.$=[c[p-1],{type:"addProperties",actor:c[p-1].actor,text:c[p]}];break;case 63:this.$=[c[p-1],{type:"addDetails",actor:c[p-1].actor,text:c[p]}];break;case 66:this.$=[c[p-2],c[p]];break;case 67:this.$=c[p];break;case 68:this.$=y.PLACEMENT.LEFTOF;break;case 69:this.$=y.PLACEMENT.RIGHTOF;break;case 70:this.$=[c[p-4],c[p-1],{type:"addMessage",from:c[p-4].actor,to:c[p-1].actor,signalType:c[p-3],msg:c[p],activate:!0},{type:"activeStart",signalType:y.LINETYPE.ACTIVE_START,actor:c[p-1].actor}];break;case 71:this.$=[c[p-4],c[p-1],{type:"addMessage",from:c[p-4].actor,to:c[p-1].actor,signalType:c[p-3],msg:c[p]},{type:"activeEnd",signalType:y.LINETYPE.ACTIVE_END,actor:c[p-4].actor}];break;case 72:this.$=[c[p-4],c[p-1],{type:"addMessage",from:c[p-4].actor,to:c[p-1].actor,signalType:c[p-3],msg:c[p],activate:!0,centralConnection:y.LINETYPE.CENTRAL_CONNECTION},{type:"centralConnection",signalType:y.LINETYPE.CENTRAL_CONNECTION,actor:c[p-1].actor}];break;case 73:this.$=[c[p-4],c[p-1],{type:"addMessage",from:c[p-4].actor,to:c[p-1].actor,signalType:c[p-2],msg:c[p],activate:!1,centralConnection:y.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:"centralConnectionReverse",signalType:y.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:c[p-4].actor}];break;case 74:this.$=[c[p-5],c[p-1],{type:"addMessage",from:c[p-5].actor,to:c[p-1].actor,signalType:c[p-3],msg:c[p],activate:!0,centralConnection:y.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:"centralConnection",signalType:y.LINETYPE.CENTRAL_CONNECTION,actor:c[p-1].actor},{type:"centralConnectionReverse",signalType:y.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:c[p-5].actor}];break;case 75:this.$=[c[p-3],c[p-1],{type:"addMessage",from:c[p-3].actor,to:c[p-1].actor,signalType:c[p-2],msg:c[p]}];break;case 76:this.$={type:"addParticipant",actor:c[p-1],config:c[p]};break;case 77:this.$=c[p-1].trim();break;case 78:case 79:this.$={type:"addParticipant",actor:c[p]};break;case 80:this.$=y.LINETYPE.SOLID_OPEN;break;case 81:this.$=y.LINETYPE.DOTTED_OPEN;break;case 82:this.$=y.LINETYPE.SOLID;break;case 83:this.$=y.LINETYPE.SOLID_TOP;break;case 84:this.$=y.LINETYPE.SOLID_BOTTOM;break;case 85:this.$=y.LINETYPE.STICK_TOP;break;case 86:this.$=y.LINETYPE.STICK_BOTTOM;break;case 87:this.$=y.LINETYPE.SOLID_TOP_DOTTED;break;case 88:this.$=y.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 89:this.$=y.LINETYPE.STICK_TOP_DOTTED;break;case 90:this.$=y.LINETYPE.STICK_BOTTOM_DOTTED;break;case 91:this.$=y.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 92:this.$=y.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 93:this.$=y.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 94:this.$=y.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 95:this.$=y.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 96:this.$=y.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 97:this.$=y.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 98:this.$=y.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 99:this.$=y.LINETYPE.BIDIRECTIONAL_SOLID;break;case 100:this.$=y.LINETYPE.DOTTED;break;case 101:this.$=y.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 102:this.$=y.LINETYPE.SOLID_CROSS;break;case 103:this.$=y.LINETYPE.DOTTED_CROSS;break;case 104:this.$=y.LINETYPE.SOLID_POINT;break;case 105:this.$=y.LINETYPE.DOTTED_POINT;break;case 106:this.$=y.parseMessage(c[p].trim().substring(1));break}},"anonymous"),table:[{3:1,4:t,5:a,6:r},{1:[3]},{3:5,4:t,5:a,6:r},{3:6,4:t,5:a,6:r},e([1,4,5,10,14,15,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:o,5:s,8:8,9:10,10:n,13:13,14:h,15:d,18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:L,31:g,32:R,34:T,36:O,37:x,38:m,39:S,40:b,42:P,44:k,45:B,47:V,51:H,53:z,54:X,56:et,61:rt,62:U,63:ot,64:at,73:W},e(M,[2,5]),{9:48,13:13,14:h,15:d,18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:L,31:g,32:R,34:T,36:O,37:x,38:m,39:S,40:b,42:P,44:k,45:B,47:V,51:H,53:z,54:X,56:et,61:rt,62:U,63:ot,64:at,73:W},e(M,[2,7]),e(M,[2,8]),e(M,[2,9]),e(M,[2,15]),{13:49,51:H,53:z,54:X},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,62:Z,73:W},{23:57,62:Z,73:W},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},{5:[1,62]},e(M,[2,30]),e(M,[2,31]),{33:[1,63]},{35:[1,64]},e(M,[2,34]),{16:[1,65]},{16:[1,66]},{16:[1,67]},{16:[1,68]},{16:[1,69]},{16:[1,70]},{16:[1,71]},{16:[1,72]},{23:73,55:74,62:Z,73:Mt},{23:76,55:77,62:Z,73:Mt},{23:78,62:Z,73:W},{69:79,72:[1,80],78:A,79:v,80:dt,81:st,82:K,83:mt,84:pe,85:Ee,86:ue,87:fe,88:_e,89:ge,90:xe,91:ye,92:Ie,93:Re,94:Oe,95:Le,96:be,97:me,98:Se,99:Ae,100:we,101:Ne,102:Pe,103:ke},{57:107,59:[1,108],67:[1,109],68:[1,110]},{23:111,62:Z,73:W},e([72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103],De,{23:112,62:Z,73:W}),{23:113,62:Z,73:W},{23:114,62:Z,73:W},e([5,66,72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104],ve),e(M,[2,6]),e(M,[2,16]),e(Pt,[2,10],{11:115}),e(M,[2,18]),{5:[1,117],20:[1,116]},{5:[1,118]},e(M,[2,22]),{5:[1,119]},e([5,52,66,104],De),{5:[1,120]},e(M,[2,25]),e(M,[2,26]),e(M,[2,27]),e(M,[2,28]),e(M,[2,29]),e(M,[2,32]),e(M,[2,33]),e(Bt,i,{7:121}),e(Bt,i,{7:122}),e(Bt,i,{7:123}),e(Ce,i,{41:124,7:125}),e($t,i,{43:126,7:127}),e($t,i,{7:127,43:128}),e(Me,i,{46:129,7:130}),e(Bt,i,{7:131}),{5:[1,133],52:[1,132]},{5:[1,135],52:[1,134]},e(jt,ve,{74:136,75:[1,137]}),{5:[1,139],52:[1,138]},{5:[1,141],52:[1,140]},{5:[1,142]},{23:146,62:Z,70:[1,143],71:[1,144],72:[1,145],73:W},{69:147,78:A,79:v,80:dt,81:st,82:K,83:mt,84:pe,85:Ee,86:ue,87:fe,88:_e,89:ge,90:xe,91:ye,92:Ie,93:Re,94:Oe,95:Le,96:be,97:me,98:Se,99:Ae,100:we,101:Ne,102:Pe,103:ke},e(F,[2,80]),e(F,[2,81]),e(F,[2,82]),e(F,[2,83]),e(F,[2,84]),e(F,[2,85]),e(F,[2,86]),e(F,[2,87]),e(F,[2,88]),e(F,[2,89]),e(F,[2,90]),e(F,[2,91]),e(F,[2,92]),e(F,[2,93]),e(F,[2,94]),e(F,[2,95]),e(F,[2,96]),e(F,[2,97]),e(F,[2,98]),e(F,[2,99]),e(F,[2,100]),e(F,[2,101]),e(F,[2,102]),e(F,[2,103]),e(F,[2,104]),e(F,[2,105]),{23:148,62:Z,73:W},{23:150,60:149,62:Z,73:W},e(Be,[2,68]),e(Be,[2,69]),{58:151,104:lt},{58:153,104:lt},{58:154,104:lt},{58:155,104:lt},{4:[1,158],5:[1,160],12:157,13:159,17:[1,156],51:H,53:z,54:X},{5:[1,161]},e(M,[2,20]),e(M,[2,21]),e(M,[2,23]),e(M,[2,24]),{4:o,5:s,8:8,9:10,10:n,13:13,14:h,15:d,17:[1,162],18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:L,31:g,32:R,34:T,36:O,37:x,38:m,39:S,40:b,42:P,44:k,45:B,47:V,51:H,53:z,54:X,56:et,61:rt,62:U,63:ot,64:at,73:W},{4:o,5:s,8:8,9:10,10:n,13:13,14:h,15:d,17:[1,163],18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:L,31:g,32:R,34:T,36:O,37:x,38:m,39:S,40:b,42:P,44:k,45:B,47:V,51:H,53:z,54:X,56:et,61:rt,62:U,63:ot,64:at,73:W},{4:o,5:s,8:8,9:10,10:n,13:13,14:h,15:d,17:[1,164],18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:L,31:g,32:R,34:T,36:O,37:x,38:m,39:S,40:b,42:P,44:k,45:B,47:V,51:H,53:z,54:X,56:et,61:rt,62:U,63:ot,64:at,73:W},{17:[1,165]},{4:o,5:s,8:8,9:10,10:n,13:13,14:h,15:d,17:[2,47],18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:L,31:g,32:R,34:T,36:O,37:x,38:m,39:S,40:b,42:P,44:k,45:B,47:V,50:[1,166],51:H,53:z,54:X,56:et,61:rt,62:U,63:ot,64:at,73:W},{17:[1,167]},{4:o,5:s,8:8,9:10,10:n,13:13,14:h,15:d,17:[2,45],18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:L,31:g,32:R,34:T,36:O,37:x,38:m,39:S,40:b,42:P,44:k,45:B,47:V,49:[1,168],51:H,53:z,54:X,56:et,61:rt,62:U,63:ot,64:at,73:W},{17:[1,169]},{17:[1,170]},{4:o,5:s,8:8,9:10,10:n,13:13,14:h,15:d,17:[2,43],18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:L,31:g,32:R,34:T,36:O,37:x,38:m,39:S,40:b,42:P,44:k,45:B,47:V,48:[1,171],51:H,53:z,54:X,56:et,61:rt,62:U,63:ot,64:at,73:W},{4:o,5:s,8:8,9:10,10:n,13:13,14:h,15:d,17:[1,172],18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:L,31:g,32:R,34:T,36:O,37:x,38:m,39:S,40:b,42:P,44:k,45:B,47:V,51:H,53:z,54:X,56:et,61:rt,62:U,63:ot,64:at,73:W},{16:[1,173]},e(M,[2,50]),{16:[1,174]},e(M,[2,55]),e(jt,[2,76]),{76:[1,175]},{16:[1,176]},e(M,[2,52]),{16:[1,177]},e(M,[2,57]),e(M,[2,53]),{23:178,62:Z,73:W},{23:179,62:Z,73:W},{23:180,62:Z,73:W},{58:181,104:lt},{23:182,62:Z,72:[1,183],73:W},{58:184,104:lt},{58:185,104:lt},{66:[1,186],104:[2,67]},{5:[2,60]},{5:[2,106]},{5:[2,61]},{5:[2,62]},{5:[2,63]},e(M,[2,17]),e(Pt,[2,11]),{13:187,51:H,53:z,54:X},e(Pt,[2,13]),e(Pt,[2,14]),e(M,[2,19]),e(M,[2,35]),e(M,[2,36]),e(M,[2,37]),e(M,[2,38]),{16:[1,188]},e(M,[2,39]),{16:[1,189]},e(M,[2,40]),e(M,[2,41]),{16:[1,190]},e(M,[2,42]),{5:[1,191]},{5:[1,192]},{77:[1,193]},{5:[1,194]},{5:[1,195]},{58:196,104:lt},{58:197,104:lt},{58:198,104:lt},{5:[2,75]},{58:199,104:lt},{23:200,62:Z,73:W},{5:[2,58]},{5:[2,59]},{23:201,62:Z,73:W},e(Pt,[2,12]),e(Ce,i,{7:125,41:202}),e($t,i,{7:127,43:203}),e(Me,i,{7:130,46:204}),e(M,[2,49]),e(M,[2,54]),e(jt,[2,77]),e(M,[2,51]),e(M,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:205,104:lt},{104:[2,66]},{17:[2,48]},{17:[2,46]},{17:[2,44]},{5:[2,74]}],defaultActions:{5:[2,1],6:[2,2],151:[2,60],152:[2,106],153:[2,61],154:[2,62],155:[2,63],181:[2,75],184:[2,58],185:[2,59],196:[2,70],197:[2,71],198:[2,72],199:[2,73],201:[2,66],202:[2,48],203:[2,46],204:[2,44],205:[2,74]},parseError:f(function(w,C){if(C.recoverable)this.trace(w);else{var D=new Error(w);throw D.hash=C,D}},"parseError"),parse:f(function(w){var C=this,D=[0],y=[],G=[null],c=[],kt=this.table,p="",Vt=0,Ye=0,lr=2,Ve=1,hr=c.slice.call(arguments,1),$=Object.create(this.lexer),It={yy:{}};for(var ee in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ee)&&(It.yy[ee]=this.yy[ee]);$.setInput(w,It.yy),It.yy.lexer=$,It.yy.parser=this,typeof $.yylloc>"u"&&($.yylloc={});var re=$.yylloc;c.push(re);var dr=$.options&&$.options.ranges;typeof It.yy.parseError=="function"?this.parseError=It.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Tr(ct){D.length=D.length-2*ct,G.length=G.length-ct,c.length=c.length-ct}f(Tr,"popStack");function We(){var ct;return ct=y.pop()||$.lex()||Ve,typeof ct!="number"&&(ct instanceof Array&&(y=ct,ct=y.pop()),ct=C.symbols_[ct]||ct),ct}f(We,"lex");for(var it,Rt,ht,ae,St={},Wt,Et,He,Ht;;){if(Rt=D[D.length-1],this.defaultActions[Rt]?ht=this.defaultActions[Rt]:((it===null||typeof it>"u")&&(it=We()),ht=kt[Rt]&&kt[Rt][it]),typeof ht>"u"||!ht.length||!ht[0]){var se="";Ht=[];for(Wt in kt[Rt])this.terminals_[Wt]&&Wt>lr&&Ht.push("'"+this.terminals_[Wt]+"'");$.showPosition?se="Parse error on line "+(Vt+1)+`:
|
|
2
2
|
`+$.showPosition()+`
|
|
3
3
|
Expecting `+Ht.join(", ")+", got '"+(this.terminals_[it]||it)+"'":se="Parse error on line "+(Vt+1)+": Unexpected "+(it==Ve?"end of input":"'"+(this.terminals_[it]||it)+"'"),this.parseError(se,{text:$.match,token:this.terminals_[it]||it,line:$.yylineno,loc:re,expected:Ht})}if(ht[0]instanceof Array&&ht.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Rt+", token: "+it);switch(ht[0]){case 1:D.push(it),G.push($.yytext),c.push($.yylloc),D.push(ht[1]),it=null,Ye=$.yyleng,p=$.yytext,Vt=$.yylineno,re=$.yylloc;break;case 2:if(Et=this.productions_[ht[1]][1],St.$=G[G.length-Et],St._$={first_line:c[c.length-(Et||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(Et||1)].first_column,last_column:c[c.length-1].last_column},dr&&(St._$.range=[c[c.length-(Et||1)].range[0],c[c.length-1].range[1]]),ae=this.performAction.apply(St,[p,Ye,Vt,It.yy,ht[1],G,c].concat(hr)),typeof ae<"u")return ae;Et&&(D=D.slice(0,-1*Et*2),G=G.slice(0,-1*Et),c=c.slice(0,-1*Et)),D.push(this.productions_[ht[1]][0]),G.push(St.$),c.push(St._$),He=kt[D[D.length-2]][D[D.length-1]],D.push(He);break;case 3:return!0}}return!0},"parse")},cr=(function(){var _t={EOF:1,parseError:f(function(C,D){if(this.yy.parser)this.yy.parser.parseError(C,D);else throw new Error(C)},"parseError"),setInput:f(function(w,C){return this.yy=C||this.yy||{},this._input=w,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:f(function(){var w=this._input[0];this.yytext+=w,this.yyleng++,this.offset++,this.match+=w,this.matched+=w;var C=w.match(/(?:\r\n?|\n).*/g);return C?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),w},"input"),unput:f(function(w){var C=w.length,D=w.split(/(?:\r\n?|\n)/g);this._input=w+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-C),this.offset-=C;var y=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),D.length-1&&(this.yylineno-=D.length-1);var G=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:D?(D.length===y.length?this.yylloc.first_column:0)+y[y.length-D.length].length-D[0].length:this.yylloc.first_column-C},this.options.ranges&&(this.yylloc.range=[G[0],G[0]+this.yyleng-C]),this.yyleng=this.yytext.length,this},"unput"),more:f(function(){return this._more=!0,this},"more"),reject:f(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:f(function(w){this.unput(this.match.slice(w))},"less"),pastInput:f(function(){var w=this.matched.substr(0,this.matched.length-this.match.length);return(w.length>20?"...":"")+w.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:f(function(){var w=this.match;return w.length<20&&(w+=this._input.substr(0,20-w.length)),(w.substr(0,20)+(w.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:f(function(){var w=this.pastInput(),C=new Array(w.length+1).join("-");return w+this.upcomingInput()+`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as M}from"./BvFAWM27.js";import{a as v}from"./BdWqymET.js";import{d as D}from"./
|
|
1
|
+
import{C as M}from"./BvFAWM27.js";import{a as v}from"./BdWqymET.js";import{d as D}from"./B21KgEqG.js";import{II as o,DD as E,D5 as C,i as A,uT as _,ut as O,fZ as H,Cn as L,CF as P,ED as R,Cr as x}from"./D98guX46.js";import{aZ as p}from"./CM_58O-V.js";import{d as F}from"./B0Z-1lwJ.js";import{n as B}from"./DZmWXrCy.js";import{o as W,e as q}from"./BYPGFyPj.js";const u=new v("OpenMessage"),S=150,y=15e3,N=2,G=[150,400,800,1500,3e3],I=M;let g;function T(e){return new Promise(t=>setTimeout(t,e))}function m(e,t){const s=o.state,n=s.agentSessions?.byAgentId[e]?.messages,a=s.agentSessions?.historySegmentsByAgentId?.[e]?.messages;return!!(n?.some(r=>r.id===t)||a?.some(r=>r.id===t))}function k(e,t){const s=o.state,n=s.agentSessions?.historySegmentsByAgentId?.[e];n?.detachedFromTail!==!0||n.messages.some(r=>r.id===t)||!s.agentSessions?.byAgentId[e]?.messages?.some(r=>r.id===t)||o.dispatch(H(e))}function Y(e){return o.state.chatState?.byAgentId[e]?.transcriptHydration}async function Z(e,t,s){const n=Date.now()+y;let a=0;for(;Date.now()<n;){if(s.aborted)return!1;if(m(e,t))return!0;if(a>=N&&Y(e)==="settled"&&!p.select(o.state,e).initialHistoryPending)return!1;a++,await T(S)}return!s.aborted&&m(e,t)}async function K(e,t,s,n){const a=Date.now()+y;for(;p.select(o.state,e).initialHistoryPending;){if(n?.aborted||Date.now()>=a)return!1;await T(S)}const r=o.state.agentSessions?.byAgentId[e];if(!r||n?.aborted)return!1;if(m(e,t))return k(e,t),!0;s??=r.workspaceId;const l=p.select(o.state,e);let c={nextToken:l.scrollbackOlderToken,prevToken:l.scrollbackGapToken,olderAnchorId:l.scrollbackOlderTokenAnchorId};o.dispatch(L(e,"seek"));const d=p.select(o.state,e).scrollbackDiscardEpoch,f=()=>!!o.state.agentSessions?.byAgentId[e]&&p.select(o.state,e).scrollbackDiscardEpoch===d;try{const i=await D.agents.getConversation(e,I,void 0,t,void 0,s);return n?.aborted||!f()||!i.messages.some(h=>h.id===t)?!1:(o.dispatch(P(e,i.messages,i.messages[0]?.seq)),i.nextToken===null&&o.dispatch(R(e)),c={nextToken:i.nextToken,prevToken:i.prevToken,olderAnchorId:i.messages[0]?.id??null},m(e,t))}catch(i){return u.warn("[seekConversationToMessage] Seek fetch failed (message may no longer exist)",{agentId:e,messageId:t,error:i}),!1}finally{f()&&o.dispatch(x(e,c))}}async function ee(e){if(e.signal?.aborted)return;g?.abort(),g=new AbortController;const t=e.signal?AbortSignal.any([g.signal,e.signal]):g.signal,{workspaceId:s,agentId:n,messageId:a,query:r,targetTabId:l}=e;u.info("[openMessage] Deep-opening conversation at message",{workspaceId:s,agentId:n,messageId:a});const c=s===A;c&&!e.contentAlreadyOpen&&(o.dispatch(E(n)),o.dispatch(C(A,n)),o.dispatch(_("chief")));const d=c?"/":q(s);if(!e.contentAlreadyOpen&&typeof window<"u"&&window.location.pathname!==d){try{c?await B(d):await W(s)}catch(w){u.warn("[openMessage] Workspace navigation failed",{workspaceId:s,error:w});return}if(t.aborted)return;if(window.location.pathname!==d){u.warn("[openMessage] Workspace navigation was not confirmed",{workspaceId:s});return}}!e.contentAlreadyOpen&&!c&&o.dispatch(O(s,{agentId:n}));const f=await Z(n,a,t);f&&k(n,a);const i=f||await K(n,a,s,t);if(t.aborted)return;if(!i){u.warn("[openMessage] Message not found; conversation opened at tail",{agentId:n,messageId:a});return}const h=`open-message-${Date.now()}-${Math.random().toString(36).slice(2)}`,b={agentId:n,messageId:a,query:r,targetTabId:l,requestId:h,signal:t};for(const w of G)setTimeout(()=>{t.aborted||F("chat:open-message",b)},w)}export{ee as openMessage,K as seekConversationToMessage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{II as o,nB as d,nA as n,os as i,bh as a,rH as S,pg as p,op as k}from"./
|
|
1
|
+
import{II as o,nB as d,nA as n,os as i,bh as a,rH as S,pg as p,op as k}from"./D98guX46.js";import{ba as g,aV as m,dE as v,dr as h,c as I,cG as W,c1 as w}from"./CM_58O-V.js";const R={status:"loading",members:[]},u=o.createSelector(e=>d(e.guestSessions.sessions)),K=o.createSelector(e=>e.guestSessions.hasReceivedList),l=o.createSelector(e=>n(e.guestSessions.sessions,e.connections.windowBackendId)??null);o.createSelector(e=>l.select(e)!==null);const M=o.createSelector(e=>e.guestSessions.openIds),F=o.createSelector(e=>e.guestSessions.connectedIds),B=o.createSelector(e=>e.guestSessions.leavingIds),O=o.createSelector(e=>e.guestSessions.leavingWorkspaceKeys),P=o.createSelector(e=>u.select(e).filter(s=>e.guestSessions.failedLeaveIds.includes(s.id))),x=o.createSelector(e=>u.select(e).flatMap(s=>(s.workspaces??[]).filter(t=>e.guestSessions.failedLeaveWorkspaceKeys.includes(i(s.id,t.id))).map(t=>({session:s,workspace:t})))),A=o.createSelector(e=>e.guestSessions.failedLeaveIds),E=o.createSelector(e=>d(e.guestSessions.sweepReports)),N=o.createSelector((e,s)=>n(e.guestSessions.sweepReports,s)),$=o.createSelector(e=>e.guestSessions.clearingWorkspaceIds),j=o.createSelector((e,s)=>n(e.workspace.workspaces,a(s))!==void 0),L=o.createSelector((e,s)=>e.guestSessions.hostedRosters[s]?.status==="withheld"?!1:n(e.workspace.workspaces,a(s))!==void 0&&g.select(e)&&m.select(e,s)),y=o.createSelector((e,s)=>{const t=n(e.workspace.workspaces,a(s));if(t?.openInviteCount!=null)return t.openInviteCount;const c=e.guestSessions.hostedRosters[s];return c?.guestCount!=null?Math.max(0,c.guestCount-c.members.filter(S).length):null}),J=o.createSelector(e=>e.workspace.error?"error":v.select(e,e.connections.windowBackendId)?"loaded":"loading"),U=o.createSelector(e=>{const s=h.select(e);return d(e.workspace.workspaces).filter(t=>{if(!s.collaborationReady||!I(s,t.id,()=>t))return!1;const c=y.select(e,t.id);if((t.memberCount??1/0)<=1&&c===0)return!1;const r=e.guestSessions.hostedRosters[t.id];return!r||r.status!=="loaded"?!0:r.members.some(S)||c===null||c>0})}),f=o.createSelector(e=>{const s=l.select(e),t=W.select(e);return u.select(e).filter(c=>{const r=s?.id===c.id&&t?.principal.id===c.principalId?w.select(e):null;return r?r!=="guest":c.hostRole==="member"})}),V=o.createSelector(e=>{const s=new Set(f.select(e).map(t=>t.id));return u.select(e).filter(t=>!s.has(t.id))}),_=o.createSelector(e=>e.guestSessions.listUnavailable),b=o.createSelector((e,s)=>e.guestSessions.hostedRosters[s]??R),q=o.createSelector((e,s)=>b.select(e,s).members.filter(t=>e.guestSessions.failedMemberKeys.includes(p(s,t.principalId)))),C=[],z=o.createSelector((e,s)=>{const t=p(s,""),c=e.guestSessions.removingMemberKeys.filter(r=>r.startsWith(t)).map(r=>r.slice(t.length));return c.length===0?C:c}),D=o.createSelector((e,s)=>e.guestSessions.clearingWorkspaceIds.includes(s)),T=o.createSelector(e=>{const s=[];for(const[t,c]of Object.entries(e.guestSessions.hostedRosters)){if(c.status==="withheld")continue;const r=n(e.workspace.workspaces,a(t));!r||!L.select(e,t)||s.push(`${t}:${r.memberCount??0},${c.invalidation??0}`)}return s.sort()}),Q=o.createSelector(e=>e.guestSessions.inheritedWorkspaceKeys),X=o.createSelector(e=>e.guestSessions.leaveConfirmations),Y=o.createSelector((e,s)=>k(n(e.guestSessions.sessions,s))),Z=o.createSelector((e,s)=>{if(!s||!g.select(e))return!1;const t=l.select(e);return!t||!(t.workspaces??[]).some(c=>c.id===s)||f.select(e).some(c=>c.id===t.id)||e.guestSessions.inheritedWorkspaceKeys.includes(i(t.id,s))?!1:n(e.workspace.workspaces,a(s))?.myRole!=="owner"}),ee=o.createSelector((e,s)=>{const t=l.select(e);return!!t&&e.guestSessions.selfLeaveWorkspaceKeys.includes(i(t.id,s))}),se=o.createSelector((e,s)=>{const t=l.select(e);return!!t&&e.guestSessions.leavingWorkspaceKeys.includes(i(t.id,s))});export{j as A,se as B,ee as C,f as D,V as E,l as F,L as a,P as b,x as c,X as d,A as e,B as f,O as g,Y as h,u as i,F as j,K as k,M as l,_ as m,$ as n,q as o,y as p,z as q,b as r,Z as s,T as t,J as u,N as v,E as w,U as x,Q as y,D as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var Ut=Object.defineProperty;var gt=c=>{throw TypeError(c)};var qt=(c,e,n)=>e in c?Ut(c,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):c[e]=n;var U=(c,e,n)=>qt(c,typeof e!="symbol"?e+"":e,n),Je=(c,e,n)=>e.has(c)||gt("Cannot "+n);var m=(c,e,n)=>(Je(c,e,"read from private field"),n?n.call(c):e.get(c)),T=(c,e,n)=>e.has(c)?gt("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(c):e.set(c,n),Ye=(c,e,n,i)=>(Je(c,e,"write to private field"),i?i.call(c,n):e.set(c,n),n),ft=(c,e,n)=>(Je(c,e,"access private method"),n);import{t as te,bo as r,bw as re,b as se,bp as Ee,bm as ce,br as Ze}from"./BkP7iWmk.js";import{c9 as I,aD as a,bH as k,ca as ye,bV as N,bo as yt,bs as ne,a7 as V,ay as A,W as F,bn as ae,aA as s,a5 as de,bf as fe,bA as ge,aB as Be,b_ as _e,bS as ve,be as $e,b$ as et,bO as tt,br as Wt,c5 as $,bI as Qt,aG as Xt}from"./DYhIMPy1.js";import{i as Y}from"./Cmsd5u03.js";import{s as H}from"./C400w5jq.js";import{c as pe}from"./Dwtk3MUL.js";import{h as Jt,aD as Yt,ar as Zt,an as _t,l as $t,a6 as er,at as tr,aq as pt,ay as rr,a3 as sr,az as Ve,aS as mt,a$ as nr,av as q,aQ as xt,a_ as ar,aa as ir,f as ht}from"./BTU_oKHo.js";import{_ as Ct}from"./CkxlqZls.js";import{O as or}from"./Dk3D2qRF.js";import{a as ur,D as lr}from"./DG3WDlq-.js";import{b as at,e as be,s as wt,c as cr,f as dr}from"./DdeuoyZB.js";import"./D2mVOz_B.js";import{e as gr,P as bt}from"./DJQD2qGi.js";import{b as fr}from"./BaIAhI85.js";import{i as mr}from"./CC7to1B5.js";import"./DJpoQ2fS.js";import"./Dr53ZtPD.js";import{g as hr}from"./C9iqPxLd.js";const rt=rr({component:"toggle-group",parts:["root","item"]}),St=new Jt("ToggleGroup.Root");var xe;class It{constructor(e){U(this,"opts");U(this,"rovingFocusGroup");U(this,"attachment");T(this,xe,I(()=>({id:this.opts.id.current,[rt.root]:"",role:"group","data-orientation":this.opts.orientation.current,"data-disabled":pt(this.opts.disabled.current),...this.attachment})));this.opts=e,this.attachment=_t(this.opts.ref),this.rovingFocusGroup=new sr({candidateAttr:rt.item,rootNode:e.ref,loop:e.loop,orientation:e.orientation})}get props(){return a(m(this,xe))}set props(e){k(m(this,xe),e)}}xe=new WeakMap;var Ce;class br extends It{constructor(n){super(n);U(this,"opts");U(this,"isMulti",!1);T(this,Ce,I(()=>this.opts.value.current!==""));this.opts=n}get anyPressed(){return a(m(this,Ce))}set anyPressed(n){k(m(this,Ce),n)}includesItem(n){return this.opts.value.current===n}toggleItem(n,i){this.includesItem(n)?this.opts.value.current="":(this.opts.value.current=n,this.rovingFocusGroup.setCurrentTabStopId(i))}}Ce=new WeakMap;var we;class vr extends It{constructor(n){super(n);U(this,"opts");U(this,"isMulti",!0);T(this,we,I(()=>this.opts.value.current.length>0));this.opts=n}get anyPressed(){return a(m(this,we))}set anyPressed(n){k(m(this,we),n)}includesItem(n){return this.opts.value.current.includes(n)}toggleItem(n,i){this.includesItem(n)?this.opts.value.current=this.opts.value.current.filter(d=>d!==n):(this.opts.value.current=[...this.opts.value.current,n],this.rovingFocusGroup.setCurrentTabStopId(i))}}we=new WeakMap;class yr{static create(e){const{type:n,...i}=e,d=n==="single"?new br(i):new vr(i);return St.set(d)}}var ee,Se,Oe,De,Ge,Pt,he,Ie,Pe;const it=class it{constructor(e,n){T(this,Ge);U(this,"opts");U(this,"root");U(this,"attachment");T(this,ee,I(()=>this.opts.disabled.current||this.root.opts.disabled.current));T(this,Se,I(()=>this.root.includesItem(this.opts.value.current)));T(this,Oe,I(()=>this.root.isMulti?void 0:Yt(this.isPressed,!1)));T(this,De,I(()=>this.root.isMulti?Zt(this.isPressed):void 0));T(this,he,N(0));T(this,Ie,I(()=>({pressed:this.isPressed})));T(this,Pe,I(()=>({id:this.opts.id.current,role:this.root.isMulti?void 0:"radio",tabindex:a(m(this,he)),"data-orientation":this.root.opts.orientation.current,"data-disabled":pt(a(m(this,ee))),"data-state":_r(this.isPressed),"data-value":this.opts.value.current,"aria-pressed":a(m(this,De)),"aria-checked":a(m(this,Oe)),disabled:tr(a(m(this,ee))),[rt.item]:"",onclick:this.onclick,onkeydown:this.onkeydown,...this.attachment})));this.opts=e,this.root=n,this.attachment=_t(this.opts.ref),ye(()=>{this.root.opts.rovingFocus.current?k(m(this,he),this.root.rovingFocusGroup.getTabIndex(this.opts.ref.current),!0):k(m(this,he),0)}),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}static create(e){return new it(e,St.get())}get isPressed(){return a(m(this,Se))}set isPressed(e){k(m(this,Se),e)}onclick(e){a(m(this,ee))||this.root.toggleItem(this.opts.value.current,this.opts.id.current)}onkeydown(e){if(!a(m(this,ee))){if(e.key===$t||e.key===er){e.preventDefault(),ft(this,Ge,Pt).call(this);return}this.root.opts.rovingFocus.current&&this.root.rovingFocusGroup.handleKeydown(this.opts.ref.current,e)}}get snippetProps(){return a(m(this,Ie))}set snippetProps(e){k(m(this,Ie),e)}get props(){return a(m(this,Pe))}set props(e){k(m(this,Pe),e)}};ee=new WeakMap,Se=new WeakMap,Oe=new WeakMap,De=new WeakMap,Ge=new WeakSet,Pt=function(){a(m(this,ee))||this.root.toggleItem(this.opts.value.current,this.opts.id.current)},he=new WeakMap,Ie=new WeakMap,Pe=new WeakMap;let st=it;function _r(c){return c?"on":"off"}var pr=new Set(["$$slots","$$events","$$legacy","id","ref","value","onValueChange","type","disabled","loop","orientation","rovingFocus","child","children"]),xr=Be("<div><!></div>");function nt(c,e){const n=yt();if(new.target)return te({component:nt,...c});ne(e,!0);let i=r(e,"id",23,()=>Ve(n)),d=r(e,"ref",15,null),g=r(e,"value",15),f=r(e,"onValueChange",7,mt),y=r(e,"type",7),C=r(e,"disabled",7,!1),h=r(e,"loop",7,!0),w=r(e,"orientation",7,"horizontal"),_=r(e,"rovingFocus",7,!0),P=r(e,"child",7),v=r(e,"children",7),x=Ee(e,pr);function S(){g()===void 0&&g(y()==="single"?"":[])}S(),nr.pre(()=>g(),()=>{S()});const z=yr.create({id:q(()=>i()),value:q(()=>g(),l=>{g(l),f()(l)}),disabled:q(()=>C()),loop:q(()=>h()),orientation:q(()=>w()),rovingFocus:q(()=>_()),type:y(),ref:q(()=>d(),l=>d(l))}),b=I(()=>xt(x,z.props));var o={get id(){return i()},set id(l=Ve(n)){i(l),s()},get ref(){return d()},set ref(l=null){d(l),s()},get value(){return g()},set value(l){g(l),s()},get onValueChange(){return f()},set onValueChange(l=mt){f(l),s()},get type(){return y()},set type(l){y(l),s()},get disabled(){return C()},set disabled(l=!1){C(l),s()},get loop(){return h()},set loop(l=!0){h(l),s()},get orientation(){return w()},set orientation(l="horizontal"){w(l),s()},get rovingFocus(){return _()},set rovingFocus(l=!0){_(l),s()},get child(){return P()},set child(l){P(l),s()},get children(){return v()},set children(l){v(l),s()},$set:re,$on:(l,E)=>se(e,l,E)},p=V(),L=A(p);{var K=l=>{var E=V(),B=A(E);H(B,P,()=>({props:a(b)})),F(l,E)},t=l=>{var E=xr();at(E,()=>({...a(b)}));var B=de(E);H(B,()=>v()??fe),ge(E),F(l,E)};Y(L,l=>{P()?l(K):l(t,-1)})}return F(c,p),ae(o)}var Cr=new Set(["$$slots","$$events","$$legacy","children","child","ref","value","disabled","id","type"]),wr=Be("<button><!></button>");function kt(c,e){const n=yt();if(new.target)return te({component:kt,...c});ne(e,!0);let i=r(e,"children",7),d=r(e,"child",7),g=r(e,"ref",15,null),f=r(e,"value",7),y=r(e,"disabled",7,!1),C=r(e,"id",23,()=>Ve(n)),h=r(e,"type",7,"button"),w=Ee(e,Cr);const _=st.create({id:q(()=>C()),value:q(()=>f()),disabled:q(()=>y()??!1),ref:q(()=>g(),o=>g(o))}),P=I(()=>xt(w,_.props,{type:h()}));var v={get children(){return i()},set children(o){i(o),s()},get child(){return d()},set child(o){d(o),s()},get ref(){return g()},set ref(o=null){g(o),s()},get value(){return f()},set value(o){f(o),s()},get disabled(){return y()},set disabled(o=!1){y(o),s()},get id(){return C()},set id(o=Ve(n)){C(o),s()},get type(){return h()},set type(o="button"){h(o),s()},$set:re,$on:(o,p)=>se(e,o,p)},x=V(),S=A(x);{var z=o=>{var p=V(),L=A(p);{let K=I(()=>({props:a(P),..._.snippetProps}));H(L,d,()=>a(K))}F(o,p)},b=o=>{var p=wr();at(p,()=>({...a(P)}));var L=de(p);H(L,()=>i()??fe,()=>_.snippetProps),ge(p),F(o,p)};Y(S,o=>{d()?o(z):o(b,-1)})}return F(c,x),ae(v)}var Sr=new Set(["$$slots","$$events","$$legacy","children","onSubmit","busy","enterKey","modEnter","class"]),Ir=Be('<form><fieldset class="contents"><!></fieldset></form>');function Ft(c,e){if(new.target)return te({component:Ft,...c});ne(e,!0);let n=r(e,"children",7),i=r(e,"onSubmit",7),d=r(e,"busy",7,!1),g=r(e,"enterKey",7,"submit"),f=r(e,"modEnter",7,"submit"),y=r(e,"class",7),C=Ee(e,Sr),h,w=N(!1);const _=I(()=>d()||a(w));async function P(o){if(o.preventDefault(),!a(_)){k(w,!0);try{await i()(o)}finally{k(w,!1)}}}function v(o){if(o.key!=="Enter"||o.isComposing||o.defaultPrevented||a(_))return;const p=o.target,L=mr(p),K=p.closest('button, a[href], select, summary, [role="button"], [role="link"], [role="checkbox"], [role="radio"], [role="switch"], [role="tab"], [role="menuitem"], [role="option"], [role="combobox"], [role="slider"]');if(K&&h.contains(K)||p instanceof HTMLInputElement&&!["text","search","email","url","tel","password","number"].includes(p.type))return;const t=o.metaKey||o.ctrlKey;(t?f()==="submit":!L&&g()==="submit")?(o.preventDefault(),h.requestSubmit()):(!L||t)&&o.preventDefault()}var x={get children(){return n()},set children(o){n(o),s()},get onSubmit(){return i()},set onSubmit(o){i(o),s()},get busy(){return d()},set busy(o=!1){d(o),s()},get enterKey(){return g()},set enterKey(o="submit"){g(o),s()},get modEnter(){return f()},set modEnter(o="submit"){f(o),s()},get class(){return y()},set class(o){y(o),s()},$set:re,$on:(o,p)=>se(e,o,p)},S=Ir();at(S,o=>({"data-slot":"form","aria-busy":a(_)||void 0,class:o,onsubmit:P,onkeydown:v,...C}),[()=>be("grid gap-4",y())]);var z=de(S),b=de(z);return H(b,n),ge(z),ge(S),fr(S,o=>h=o,()=>h),_e(()=>{z.disabled=a(_),wt(z,"aria-busy",a(_)||void 0)}),F(c,S),ae(x)}var Pr=Be('<div data-slot="form-actions"><div data-slot="form-actions-destructive" class="flex items-center"><!></div> <div data-slot="form-actions-end" class="ml-auto flex items-center gap-2"><!> <!> <!></div></div>');function Lt(c,e){if(new.target)return te({component:Lt,...c});ne(e,!0);let n=r(e,"destructive",7),i=r(e,"secondary",7),d=r(e,"primary",7),g=r(e,"hint",7),f=r(e,"class",7);const y=ar();var C={get destructive(){return n()},set destructive(b){n(b),s()},get secondary(){return i()},set secondary(b){i(b),s()},get primary(){return d()},set primary(b){d(b),s()},get hint(){return g()},set hint(b){g(b),s()},get class(){return f()},set class(b){f(b),s()},$set:re,$on:(b,o)=>se(e,b,o)},h=Pr(),w=de(h),_=de(w);H(_,()=>n()??fe),ge(w);var P=ve(w,2),v=de(P);{var x=b=>{ir(b,{children:(o,p)=>{$e();var L=et();_e(()=>tt(L,g())),F(o,L)},$$slots:{default:!0}})};Y(v,b=>{g()&&b(x)})}var S=ve(v,2);H(S,()=>i()??fe);var z=ve(S,2);return H(z,d),ge(P),ge(h),_e(b=>{wt(h,"data-size",y),dr(h,1,b)},[()=>cr(be("flex items-center justify-between",y==="compact"?"gap-2":"gap-3",f()))]),F(c,h),ae(C)}function zt(c,e){if(new.target)return te({component:zt,...c});ne(e,!0);let n=r(e,"open",15,!1),i=r(e,"static",7,!1),d=r(e,"title",7),g=r(e,"description",7),f=r(e,"titleId",7),y=r(e,"descriptionId",7),C=r(e,"children",7),h=r(e,"footer",7),w=r(e,"submitLabel",23,()=>ce.modals_bulkActionConfirm_confirm_label()),_=r(e,"cancelLabel",23,()=>ce.modals_bulkActionConfirm_cancel_label()),P=r(e,"submitVariant",7,"primary"),v=r(e,"canSubmit",7,!0),x=r(e,"busy",7,!1),S=r(e,"submitBusy",7,!1),z=r(e,"role",7,"dialog"),b=r(e,"dismissOnInteractOutside",7,!0),o=r(e,"showCancel",7,!0),p=r(e,"showCloseButton",7,!0),L=r(e,"closeLabel",23,()=>ce.ui_dialog_close_ariaLabel()),K=r(e,"class",7),t=r(e,"size",7,"default"),l=r(e,"initialFocus",7),E=r(e,"focusContent",7,!1),B=r(e,"focusSubmit",7,!1),W=r(e,"focusCancel",7,!1),D=r(e,"escapeKeydownBehavior",7,"close"),G=r(e,"enterKey",7,"submit"),O=r(e,"modEnter",7,"submit"),ie=r(e,"onfocusin",7),Q=r(e,"onCloseAutoFocus",7),X=r(e,"onSubmit",7),oe=r(e,"onCancel",7),ue=N(!1),j=N(""),Me=N(!1),Ae=N(null),Re=N(null),Ne=N(null);const J=I(()=>x()||a(ue));ye(()=>{n()&&(k(Me,!1),k(j,""))});function He(){a(J)||a(Me)||(k(Me,!0),n(!1),oe()?.())}async function Bt(){if(!(a(J)||S()||!v())){k(ue,!0),k(j,"");try{await X()()}catch{k(j,ce.ui_dialog_submitFailed_error(),!0)}finally{k(ue,!1)}}}function At(u){const Z=l()??(W()?a(Re):B()?a(Ne):E()?a(Ae):null);Z&&(Z.focus(),Z.ownerDocument.activeElement===Z&&u.preventDefault())}var Tt={get open(){return n()},set open(u=!1){n(u),s()},get static(){return i()},set static(u=!1){i(u),s()},get title(){return d()},set title(u){d(u),s()},get description(){return g()},set description(u){g(u),s()},get titleId(){return f()},set titleId(u){f(u),s()},get descriptionId(){return y()},set descriptionId(u){y(u),s()},get children(){return C()},set children(u){C(u),s()},get footer(){return h()},set footer(u){h(u),s()},get submitLabel(){return w()},set submitLabel(u=ce.modals_bulkActionConfirm_confirm_label()){w(u),s()},get cancelLabel(){return _()},set cancelLabel(u=ce.modals_bulkActionConfirm_cancel_label()){_(u),s()},get submitVariant(){return P()},set submitVariant(u="primary"){P(u),s()},get canSubmit(){return v()},set canSubmit(u=!0){v(u),s()},get busy(){return x()},set busy(u=!1){x(u),s()},get submitBusy(){return S()},set submitBusy(u=!1){S(u),s()},get role(){return z()},set role(u="dialog"){z(u),s()},get dismissOnInteractOutside(){return b()},set dismissOnInteractOutside(u=!0){b(u),s()},get showCancel(){return o()},set showCancel(u=!0){o(u),s()},get showCloseButton(){return p()},set showCloseButton(u=!0){p(u),s()},get closeLabel(){return L()},set closeLabel(u=ce.ui_dialog_close_ariaLabel()){L(u),s()},get class(){return K()},set class(u){K(u),s()},get size(){return t()},set size(u="default"){t(u),s()},get initialFocus(){return l()},set initialFocus(u){l(u),s()},get focusContent(){return E()},set focusContent(u=!1){E(u),s()},get focusSubmit(){return B()},set focusSubmit(u=!1){B(u),s()},get focusCancel(){return W()},set focusCancel(u=!1){W(u),s()},get escapeKeydownBehavior(){return D()},set escapeKeydownBehavior(u="close"){D(u),s()},get enterKey(){return G()},set enterKey(u="submit"){G(u),s()},get modEnter(){return O()},set modEnter(u="submit"){O(u),s()},get onfocusin(){return ie()},set onfocusin(u){ie(u),s()},get onCloseAutoFocus(){return Q()},set onCloseAutoFocus(u){Q(u),s()},get onSubmit(){return X()},set onSubmit(u){X(u),s()},get onCancel(){return oe()},set onCancel(u){oe(u),s()},$set:re,$on:(u,Z)=>se(e,u,Z)},ot=V(),Kt=A(ot);return pe(Kt,()=>or,(u,Z)=>{Z(u,{get open(){return n()},get staticPosition(){return i()},onOpenChange:je=>!je&&He(),children:(je,Ar)=>{var ut=V(),Vt=A(ut);{let Ot=I(()=>be("flex min-h-0 flex-col overflow-hidden p-0",K()));pe(Vt,()=>ur,(Dt,Gt)=>{Gt(Dt,{get role(){return z()},get size(){return t()},get class(){return a(Ot)},get closeDisabled(){return a(J)},get showCloseButton(){return p()},get closeLabel(){return L()},get escapeKeydownBehavior(){return D()},onOpenAutoFocus:At,get onCloseAutoFocus(){return Q()},get onfocusin(){return ie()},onkeydown:M=>{M.key==="Escape"&&gr(a(Ae),M)||M.key==="Escape"&&D()==="close"&&(M.preventDefault(),M.stopPropagation(),He())},onInteractOutside:M=>(a(J)||!b())&&M.preventDefault(),onEscapeKeydown:M=>a(J)&&M.preventDefault(),get ref(){return a(Ae)},set ref(M){k(Ae,M,!0)},children:(M,Tr)=>{Ft(M,{onSubmit:Bt,get busy(){return a(J)},get enterKey(){return G()},get modEnter(){return O()},class:"flex min-h-0 min-w-0 flex-1 flex-col",children:(Mt,Kr)=>{lr(Mt,{get title(){return d()},get description(){return g()},get titleId(){return f()},get descriptionId(){return y()},get children(){return C()},get error(){return a(j)},footer:Rt=>{var lt=V(),Nt=A(lt);{var Ht=me=>{var Ue=V(),ct=A(Ue);H(ct,h),F(me,Ue)},jt=me=>{Lt(me,{secondary:qe=>{var Te=V(),We=A(Te);{var Qe=le=>{ht(le,{variant:"ghost-light",get disabled(){return a(J)},onclick:He,get ref(){return a(Re)},set ref(Ke){k(Re,Ke,!0)},children:(Ke,Xe)=>{$e();var dt=et();_e(()=>tt(dt,_())),F(Ke,dt)},$$slots:{default:!0}})};Y(We,le=>{o()&&le(Qe)})}F(qe,Te)},primary:qe=>{{let Te=I(()=>B()?"focus-visible:outline focus-visible:-outline-offset-1":void 0),We=I(()=>a(J)||S()),Qe=I(()=>!v()||a(J)||S());ht(qe,{type:"submit",get variant(){return P()},get class(){return a(Te)},get loading(){return a(We)},get disabled(){return a(Qe)},get ref(){return a(Ne)},set ref(le){k(Ne,le,!0)},children:(le,Ke)=>{$e();var Xe=et();_e(()=>tt(Xe,w())),F(le,Xe)},$$slots:{default:!0}})}},$$slots:{secondary:!0,primary:!0}})};Y(Nt,me=>{h()?me(Ht):me(jt,-1)})}F(Rt,lt)},$$slots:{footer:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}})})}F(je,ut)},$$slots:{default:!0}})}),F(c,ot),ae(Tt)}function kr(c,e){if(new.target)return te({component:kr,...c});ne(e,!0);let n=r(e,"open",15,!1),i=r(e,"static",7,!1),d=r(e,"title",7),g=r(e,"description",7),f=r(e,"confirmLabel",7),y=r(e,"cancelLabel",7),C=r(e,"details",7),h=r(e,"busy",7,!1),w=r(e,"submitBusy",7,!1),_=r(e,"canSubmit",7,!0),P=r(e,"focusSubmit",7,!0),v=r(e,"focusCancel",7,!1),x=r(e,"enterKey",7,"submit"),S=r(e,"modEnter",7,"submit"),z=r(e,"destructive",7,!0),b=r(e,"class",7),o=r(e,"closeLabel",7),p=r(e,"onConfirm",7),L=r(e,"onCancel",7);var K={get open(){return n()},set open(t=!1){n(t),s()},get static(){return i()},set static(t=!1){i(t),s()},get title(){return d()},set title(t){d(t),s()},get description(){return g()},set description(t){g(t),s()},get confirmLabel(){return f()},set confirmLabel(t){f(t),s()},get cancelLabel(){return y()},set cancelLabel(t){y(t),s()},get details(){return C()},set details(t){C(t),s()},get busy(){return h()},set busy(t=!1){h(t),s()},get submitBusy(){return w()},set submitBusy(t=!1){w(t),s()},get canSubmit(){return _()},set canSubmit(t=!0){_(t),s()},get focusSubmit(){return P()},set focusSubmit(t=!0){P(t),s()},get focusCancel(){return v()},set focusCancel(t=!1){v(t),s()},get enterKey(){return x()},set enterKey(t="submit"){x(t),s()},get modEnter(){return S()},set modEnter(t="submit"){S(t),s()},get destructive(){return z()},set destructive(t=!0){z(t),s()},get class(){return b()},set class(t){b(t),s()},get closeLabel(){return o()},set closeLabel(t){o(t),s()},get onConfirm(){return p()},set onConfirm(t){p(t),s()},get onCancel(){return L()},set onCancel(t){L(t),s()},$set:re,$on:(t,l)=>se(e,t,l)};{let t=I(()=>z()?"destructive":"default");zt(c,{get static(){return i()},get title(){return d()},get description(){return g()},get submitLabel(){return f()},get cancelLabel(){return y()},get submitVariant(){return a(t)},get busy(){return h()},get submitBusy(){return w()},get canSubmit(){return _()},get focusSubmit(){return P()},get focusCancel(){return v()},get enterKey(){return x()},get modEnter(){return S()},get class(){return b()},get closeLabel(){return o()},get onSubmit(){return p()},get onCancel(){return L()},get open(){return n()},set open(l){n(l)},children:(l,E)=>{var B=V(),W=A(B);{var D=G=>{var O=V(),ie=A(O);H(ie,C),F(G,O)};Y(W,G=>{C()&&G(D)})}F(l,B)},$$slots:{default:!0}})}return ae(K)}var R,ke,Fe,Le,ze;class Fr{constructor(e,n){T(this,R,N(Wt([])));T(this,ke);T(this,Fe);T(this,Le,N(null));T(this,ze,N(0));Ye(this,ke,e),Ye(this,Fe,n)}get hover(){return a(m(this,Le))}set hover(e){k(m(this,Le),e,!0)}get keyboardIndex(){return a(m(this,ze))}set keyboardIndex(e){k(m(this,ze),e,!0)}get selectedIndexes(){const e=new Set(m(this,ke).call(this));return a(m(this,R)).flatMap((n,i)=>n&&e.has(n.value)?[i]:[])}allocate(e){return $(()=>{const n={value:e,element:null,disabled:!1},i=a(m(this,R)).indexOf(void 0);return i<0?a(m(this,R)).push(n)-1:(a(m(this,R))[i]=n,i)})}release(e){$(()=>{a(m(this,R))[e]&&(a(m(this,R))[e]=void 0,this.hover?.activeIndex===e&&this.hover.setActiveIndex(null),this.hover?.registerItem(e,null))})}update(e,n,i){$(()=>{const d=a(m(this,R))[e];d&&(d.value=n,d.disabled=i)})}register(e,n){$(()=>{const i=a(m(this,R))[e];i&&(i.element=n,this.hover?.registerItem(e,n))})}connect(e){$(()=>{this.hover?.destroy(),this.hover=hr(e,{axis:m(this,Fe)});for(const[n,i]of a(m(this,R)).entries())i?.element&&this.hover.registerItem(n,i.element)})}disconnect(){$(()=>{this.hover?.destroy(),this.hover=null})}activate(e){this.keyboardIndex=e,this.hover?.setActiveIndex(e)}focusAdjacent(e,n){const i=a(m(this,R)).map((f,y)=>({entry:f,entryIndex:y})).filter(({entry:f})=>f?.element&&!f.disabled),d=i.findIndex(({entryIndex:f})=>f===e);if(d<0||i.length===0)return;const g=i[(d+n+i.length)%i.length];this.activate(g.entryIndex),g.entry?.element?.focus()}}R=new WeakMap,ke=new WeakMap,Fe=new WeakMap,Le=new WeakMap,ze=new WeakMap;const Et=Symbol("toggle-group");var Lr=new Set(["$$slots","$$events","$$legacy","value","onValueChange","type","disabled","axis","variant","size","class","children"]),vt=Be("<!> <!>",1);function zr(c,e){if(new.target)return te({component:zr,...c});ne(e,!0);const n=Ct({base:"relative isolate inline-flex shrink-0 items-center justify-center gap-0.5 rounded-(--radius-medium) border-0 bg-card",variants:{variant:{default:"shadow-(--elevation-raised)",outline:"border border-border shadow-none",flat:"bg-muted/40 shadow-none"},size:{default:"",xs:"",sm:"",lg:""}},defaultVariants:{variant:"default",size:"default"}});let i=r(e,"value",15),d=r(e,"onValueChange",7),g=r(e,"type",7,"single"),f=r(e,"disabled",7,!1),y=r(e,"axis",7,"x"),C=r(e,"variant",7,"default"),h=r(e,"size",7,"default"),w=r(e,"class",7,""),_=r(e,"children",7),P=Ee(e,Lr),v=N(null);const x=new Fr(()=>Array.isArray(i())?i():typeof i()=="string"&&i()?[i()]:[],$(()=>y()));Qt(Et,{state:x,get size(){return h()},get variant(){return C()}}),ye(()=>{if(a(v))return x.connect(a(v)),()=>x.disconnect()});function S(t){i(t),d()?.(t)}function z(t){i(t),d()?.(t)}var b={get value(){return i()},set value(t){i(t),s()},get onValueChange(){return d()},set onValueChange(t){d(t),s()},get type(){return g()},set type(t="single"){g(t),s()},get disabled(){return f()},set disabled(t=!1){f(t),s()},get axis(){return y()},set axis(t="x"){y(t),s()},get variant(){return C()},set variant(t="default"){C(t),s()},get size(){return h()},set size(t="default"){h(t),s()},get class(){return w()},set class(t=""){w(t),s()},get children(){return _()},set children(t){_(t),s()},$set:re,$on:(t,l)=>se(e,t,l)},o=V(),p=A(o);{var L=t=>{var l=V(),E=A(l);{let B=I(()=>Array.isArray(i())?i():[]),W=I(()=>be(n({variant:C(),size:h()}),w()));pe(E,()=>nt,(D,G)=>{G(D,Ze({type:"multiple",get value(){return a(B)},onValueChange:z,get disabled(){return f()},get class(){return a(W)}},()=>P,{get ref(){return a(v)},set ref(O){k(v,O,!0)},children:(O,ie)=>{var Q=vt(),X=A(Q);{var oe=j=>{bt(j,{get store(){return x.hover},get selectedIndexes(){return x.selectedIndexes}})};Y(X,j=>{x.hover&&j(oe)})}var ue=ve(X,2);H(ue,()=>_()??fe),F(O,Q)},$$slots:{default:!0}}))})}F(t,l)},K=t=>{var l=V(),E=A(l);{let B=I(()=>typeof i()=="string"?i():""),W=I(()=>be(n({variant:C(),size:h()}),w()));pe(E,()=>nt,(D,G)=>{G(D,Ze({type:"single",get value(){return a(B)},onValueChange:S,get disabled(){return f()},get class(){return a(W)}},()=>P,{get ref(){return a(v)},set ref(O){k(v,O,!0)},children:(O,ie)=>{var Q=vt(),X=A(Q);{var oe=j=>{bt(j,{get store(){return x.hover},get selectedIndexes(){return x.selectedIndexes}})};Y(X,j=>{x.hover&&j(oe)})}var ue=ve(X,2);H(ue,()=>_()??fe),F(O,Q)},$$slots:{default:!0}}))})}F(t,l)};Y(p,t=>{g()==="multiple"?t(L):t(K,-1)})}return F(c,o),ae(b)}var Er=new Set(["$$slots","$$events","$$legacy","value","disabled","variant","size","tooltip","class","onclick","onfocus","children"]);function Br(c,e){if(new.target)return te({component:Br,...c});ne(e,!0);const n=Ct({base:"type-caption relative z-10 inline-flex shrink-0 cursor-pointer items-center justify-center whitespace-nowrap rounded-(--radius-medium) border-0 bg-transparent font-normal text-muted-foreground transition-[color,font-weight] duration-spring-fast ease-spring-fast hover:text-foreground active:bg-active disabled:pointer-events-none disabled:opacity-50 data-[state=on]:[--text-caption-weight:500] data-[state=on]:text-foreground motion-reduce:transition-none",variants:{variant:{default:"",outline:"bg-transparent",flat:""},size:{default:"h-(--control-height-medium) min-w-8 px-2",xs:"h-(--control-height-small) min-w-7 px-1.5",sm:"h-(--control-height-small) min-w-7 px-1.5",lg:"h-(--control-height-large) min-w-9 px-2.5"}},defaultVariants:{variant:"default",size:"default"}});let i=r(e,"value",7),d=r(e,"disabled",7,!1),g=r(e,"variant",7,void 0),f=r(e,"size",7,void 0),y=r(e,"tooltip",7,void 0),C=r(e,"class",7,""),h=r(e,"onclick",7),w=r(e,"onfocus",7),_=r(e,"children",7),P=Ee(e,Er);const v=Xt(Et),x=v.state.allocate($(()=>i()));let S=N(null);const z=I(()=>f()??v?.size??"default"),b=I(()=>g()??v?.variant??"default");ye(()=>v.state.update(x,i(),d())),ye(()=>(v.state.register(x,a(S)),()=>v.state.register(x,null)));function o(t){v.state.activate(x),w()?.(t)}var p={get value(){return i()},set value(t){i(t),s()},get disabled(){return d()},set disabled(t=!1){d(t),s()},get variant(){return g()},set variant(t=void 0){g(t),s()},get size(){return f()},set size(t=void 0){f(t),s()},get tooltip(){return y()},set tooltip(t=void 0){y(t),s()},get class(){return C()},set class(t=""){C(t),s()},get onclick(){return h()},set onclick(t){h(t),s()},get onfocus(){return w()},set onfocus(t){w(t),s()},get children(){return _()},set children(t){_(t),s()},$set:re,$on:(t,l)=>se(e,t,l)},L=V(),K=A(L);{let t=I(()=>be(n({variant:a(b),size:a(z)}),C()));pe(K,()=>kt,(l,E)=>{E(l,Ze({get value(){return i()},get title(){return y()},get disabled(){return d()},get onclick(){return h()},onfocus:o,get class(){return a(t)}},()=>P,{get ref(){return a(S)},set ref(B){k(S,B,!0)},children:(B,W)=>{var D=V(),G=A(D);H(G,()=>_()??fe),F(B,D)},$$slots:{default:!0}}))})}return F(c,L),ae(p)}export{Fr as C,kr as D,Ft as F,zr as T,Lt as a,zt as b,Br as c};
|
|
1
|
+
var Ut=Object.defineProperty;var gt=c=>{throw TypeError(c)};var qt=(c,e,n)=>e in c?Ut(c,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):c[e]=n;var U=(c,e,n)=>qt(c,typeof e!="symbol"?e+"":e,n),Je=(c,e,n)=>e.has(c)||gt("Cannot "+n);var m=(c,e,n)=>(Je(c,e,"read from private field"),n?n.call(c):e.get(c)),T=(c,e,n)=>e.has(c)?gt("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(c):e.set(c,n),Ye=(c,e,n,i)=>(Je(c,e,"write to private field"),i?i.call(c,n):e.set(c,n),n),ft=(c,e,n)=>(Je(c,e,"access private method"),n);import{t as te,bo as r,bw as re,b as se,bp as Ee,bm as ce,br as Ze}from"./BkP7iWmk.js";import{c9 as I,aD as a,bH as k,ca as ye,bV as N,bo as yt,bs as ne,a7 as V,ay as A,W as F,bn as ae,aA as s,a5 as de,bf as fe,bA as ge,aB as Be,b_ as _e,bS as ve,be as $e,b$ as et,bO as tt,br as Wt,c5 as $,bI as Qt,aG as Xt}from"./DYhIMPy1.js";import{i as Y}from"./Cmsd5u03.js";import{s as H}from"./C400w5jq.js";import{c as pe}from"./Dwtk3MUL.js";import{h as Jt,aD as Yt,ar as Zt,an as _t,l as $t,a6 as er,at as tr,aq as pt,ay as rr,a3 as sr,az as Ve,aS as mt,a$ as nr,av as q,aQ as xt,a_ as ar,aa as ir,f as ht}from"./DlQfuVhT.js";import{_ as Ct}from"./DPKwA49z.js";import{O as or}from"./CaSPRIlD.js";import{a as ur,D as lr}from"./6M8_bOmN.js";import{b as at,e as be,s as wt,c as cr,f as dr}from"./DdeuoyZB.js";import"./D2mVOz_B.js";import{e as gr,P as bt}from"./CXak2CWS.js";import{b as fr}from"./BaIAhI85.js";import{i as mr}from"./CC7to1B5.js";import"./DJpoQ2fS.js";import"./Dr53ZtPD.js";import{g as hr}from"./yiVXShkh.js";const rt=rr({component:"toggle-group",parts:["root","item"]}),St=new Jt("ToggleGroup.Root");var xe;class It{constructor(e){U(this,"opts");U(this,"rovingFocusGroup");U(this,"attachment");T(this,xe,I(()=>({id:this.opts.id.current,[rt.root]:"",role:"group","data-orientation":this.opts.orientation.current,"data-disabled":pt(this.opts.disabled.current),...this.attachment})));this.opts=e,this.attachment=_t(this.opts.ref),this.rovingFocusGroup=new sr({candidateAttr:rt.item,rootNode:e.ref,loop:e.loop,orientation:e.orientation})}get props(){return a(m(this,xe))}set props(e){k(m(this,xe),e)}}xe=new WeakMap;var Ce;class br extends It{constructor(n){super(n);U(this,"opts");U(this,"isMulti",!1);T(this,Ce,I(()=>this.opts.value.current!==""));this.opts=n}get anyPressed(){return a(m(this,Ce))}set anyPressed(n){k(m(this,Ce),n)}includesItem(n){return this.opts.value.current===n}toggleItem(n,i){this.includesItem(n)?this.opts.value.current="":(this.opts.value.current=n,this.rovingFocusGroup.setCurrentTabStopId(i))}}Ce=new WeakMap;var we;class vr extends It{constructor(n){super(n);U(this,"opts");U(this,"isMulti",!0);T(this,we,I(()=>this.opts.value.current.length>0));this.opts=n}get anyPressed(){return a(m(this,we))}set anyPressed(n){k(m(this,we),n)}includesItem(n){return this.opts.value.current.includes(n)}toggleItem(n,i){this.includesItem(n)?this.opts.value.current=this.opts.value.current.filter(d=>d!==n):(this.opts.value.current=[...this.opts.value.current,n],this.rovingFocusGroup.setCurrentTabStopId(i))}}we=new WeakMap;class yr{static create(e){const{type:n,...i}=e,d=n==="single"?new br(i):new vr(i);return St.set(d)}}var ee,Se,Oe,De,Ge,Pt,he,Ie,Pe;const it=class it{constructor(e,n){T(this,Ge);U(this,"opts");U(this,"root");U(this,"attachment");T(this,ee,I(()=>this.opts.disabled.current||this.root.opts.disabled.current));T(this,Se,I(()=>this.root.includesItem(this.opts.value.current)));T(this,Oe,I(()=>this.root.isMulti?void 0:Yt(this.isPressed,!1)));T(this,De,I(()=>this.root.isMulti?Zt(this.isPressed):void 0));T(this,he,N(0));T(this,Ie,I(()=>({pressed:this.isPressed})));T(this,Pe,I(()=>({id:this.opts.id.current,role:this.root.isMulti?void 0:"radio",tabindex:a(m(this,he)),"data-orientation":this.root.opts.orientation.current,"data-disabled":pt(a(m(this,ee))),"data-state":_r(this.isPressed),"data-value":this.opts.value.current,"aria-pressed":a(m(this,De)),"aria-checked":a(m(this,Oe)),disabled:tr(a(m(this,ee))),[rt.item]:"",onclick:this.onclick,onkeydown:this.onkeydown,...this.attachment})));this.opts=e,this.root=n,this.attachment=_t(this.opts.ref),ye(()=>{this.root.opts.rovingFocus.current?k(m(this,he),this.root.rovingFocusGroup.getTabIndex(this.opts.ref.current),!0):k(m(this,he),0)}),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}static create(e){return new it(e,St.get())}get isPressed(){return a(m(this,Se))}set isPressed(e){k(m(this,Se),e)}onclick(e){a(m(this,ee))||this.root.toggleItem(this.opts.value.current,this.opts.id.current)}onkeydown(e){if(!a(m(this,ee))){if(e.key===$t||e.key===er){e.preventDefault(),ft(this,Ge,Pt).call(this);return}this.root.opts.rovingFocus.current&&this.root.rovingFocusGroup.handleKeydown(this.opts.ref.current,e)}}get snippetProps(){return a(m(this,Ie))}set snippetProps(e){k(m(this,Ie),e)}get props(){return a(m(this,Pe))}set props(e){k(m(this,Pe),e)}};ee=new WeakMap,Se=new WeakMap,Oe=new WeakMap,De=new WeakMap,Ge=new WeakSet,Pt=function(){a(m(this,ee))||this.root.toggleItem(this.opts.value.current,this.opts.id.current)},he=new WeakMap,Ie=new WeakMap,Pe=new WeakMap;let st=it;function _r(c){return c?"on":"off"}var pr=new Set(["$$slots","$$events","$$legacy","id","ref","value","onValueChange","type","disabled","loop","orientation","rovingFocus","child","children"]),xr=Be("<div><!></div>");function nt(c,e){const n=yt();if(new.target)return te({component:nt,...c});ne(e,!0);let i=r(e,"id",23,()=>Ve(n)),d=r(e,"ref",15,null),g=r(e,"value",15),f=r(e,"onValueChange",7,mt),y=r(e,"type",7),C=r(e,"disabled",7,!1),h=r(e,"loop",7,!0),w=r(e,"orientation",7,"horizontal"),_=r(e,"rovingFocus",7,!0),P=r(e,"child",7),v=r(e,"children",7),x=Ee(e,pr);function S(){g()===void 0&&g(y()==="single"?"":[])}S(),nr.pre(()=>g(),()=>{S()});const z=yr.create({id:q(()=>i()),value:q(()=>g(),l=>{g(l),f()(l)}),disabled:q(()=>C()),loop:q(()=>h()),orientation:q(()=>w()),rovingFocus:q(()=>_()),type:y(),ref:q(()=>d(),l=>d(l))}),b=I(()=>xt(x,z.props));var o={get id(){return i()},set id(l=Ve(n)){i(l),s()},get ref(){return d()},set ref(l=null){d(l),s()},get value(){return g()},set value(l){g(l),s()},get onValueChange(){return f()},set onValueChange(l=mt){f(l),s()},get type(){return y()},set type(l){y(l),s()},get disabled(){return C()},set disabled(l=!1){C(l),s()},get loop(){return h()},set loop(l=!0){h(l),s()},get orientation(){return w()},set orientation(l="horizontal"){w(l),s()},get rovingFocus(){return _()},set rovingFocus(l=!0){_(l),s()},get child(){return P()},set child(l){P(l),s()},get children(){return v()},set children(l){v(l),s()},$set:re,$on:(l,E)=>se(e,l,E)},p=V(),L=A(p);{var K=l=>{var E=V(),B=A(E);H(B,P,()=>({props:a(b)})),F(l,E)},t=l=>{var E=xr();at(E,()=>({...a(b)}));var B=de(E);H(B,()=>v()??fe),ge(E),F(l,E)};Y(L,l=>{P()?l(K):l(t,-1)})}return F(c,p),ae(o)}var Cr=new Set(["$$slots","$$events","$$legacy","children","child","ref","value","disabled","id","type"]),wr=Be("<button><!></button>");function kt(c,e){const n=yt();if(new.target)return te({component:kt,...c});ne(e,!0);let i=r(e,"children",7),d=r(e,"child",7),g=r(e,"ref",15,null),f=r(e,"value",7),y=r(e,"disabled",7,!1),C=r(e,"id",23,()=>Ve(n)),h=r(e,"type",7,"button"),w=Ee(e,Cr);const _=st.create({id:q(()=>C()),value:q(()=>f()),disabled:q(()=>y()??!1),ref:q(()=>g(),o=>g(o))}),P=I(()=>xt(w,_.props,{type:h()}));var v={get children(){return i()},set children(o){i(o),s()},get child(){return d()},set child(o){d(o),s()},get ref(){return g()},set ref(o=null){g(o),s()},get value(){return f()},set value(o){f(o),s()},get disabled(){return y()},set disabled(o=!1){y(o),s()},get id(){return C()},set id(o=Ve(n)){C(o),s()},get type(){return h()},set type(o="button"){h(o),s()},$set:re,$on:(o,p)=>se(e,o,p)},x=V(),S=A(x);{var z=o=>{var p=V(),L=A(p);{let K=I(()=>({props:a(P),..._.snippetProps}));H(L,d,()=>a(K))}F(o,p)},b=o=>{var p=wr();at(p,()=>({...a(P)}));var L=de(p);H(L,()=>i()??fe,()=>_.snippetProps),ge(p),F(o,p)};Y(S,o=>{d()?o(z):o(b,-1)})}return F(c,x),ae(v)}var Sr=new Set(["$$slots","$$events","$$legacy","children","onSubmit","busy","enterKey","modEnter","class"]),Ir=Be('<form><fieldset class="contents"><!></fieldset></form>');function Ft(c,e){if(new.target)return te({component:Ft,...c});ne(e,!0);let n=r(e,"children",7),i=r(e,"onSubmit",7),d=r(e,"busy",7,!1),g=r(e,"enterKey",7,"submit"),f=r(e,"modEnter",7,"submit"),y=r(e,"class",7),C=Ee(e,Sr),h,w=N(!1);const _=I(()=>d()||a(w));async function P(o){if(o.preventDefault(),!a(_)){k(w,!0);try{await i()(o)}finally{k(w,!1)}}}function v(o){if(o.key!=="Enter"||o.isComposing||o.defaultPrevented||a(_))return;const p=o.target,L=mr(p),K=p.closest('button, a[href], select, summary, [role="button"], [role="link"], [role="checkbox"], [role="radio"], [role="switch"], [role="tab"], [role="menuitem"], [role="option"], [role="combobox"], [role="slider"]');if(K&&h.contains(K)||p instanceof HTMLInputElement&&!["text","search","email","url","tel","password","number"].includes(p.type))return;const t=o.metaKey||o.ctrlKey;(t?f()==="submit":!L&&g()==="submit")?(o.preventDefault(),h.requestSubmit()):(!L||t)&&o.preventDefault()}var x={get children(){return n()},set children(o){n(o),s()},get onSubmit(){return i()},set onSubmit(o){i(o),s()},get busy(){return d()},set busy(o=!1){d(o),s()},get enterKey(){return g()},set enterKey(o="submit"){g(o),s()},get modEnter(){return f()},set modEnter(o="submit"){f(o),s()},get class(){return y()},set class(o){y(o),s()},$set:re,$on:(o,p)=>se(e,o,p)},S=Ir();at(S,o=>({"data-slot":"form","aria-busy":a(_)||void 0,class:o,onsubmit:P,onkeydown:v,...C}),[()=>be("grid gap-4",y())]);var z=de(S),b=de(z);return H(b,n),ge(z),ge(S),fr(S,o=>h=o,()=>h),_e(()=>{z.disabled=a(_),wt(z,"aria-busy",a(_)||void 0)}),F(c,S),ae(x)}var Pr=Be('<div data-slot="form-actions"><div data-slot="form-actions-destructive" class="flex items-center"><!></div> <div data-slot="form-actions-end" class="ml-auto flex items-center gap-2"><!> <!> <!></div></div>');function Lt(c,e){if(new.target)return te({component:Lt,...c});ne(e,!0);let n=r(e,"destructive",7),i=r(e,"secondary",7),d=r(e,"primary",7),g=r(e,"hint",7),f=r(e,"class",7);const y=ar();var C={get destructive(){return n()},set destructive(b){n(b),s()},get secondary(){return i()},set secondary(b){i(b),s()},get primary(){return d()},set primary(b){d(b),s()},get hint(){return g()},set hint(b){g(b),s()},get class(){return f()},set class(b){f(b),s()},$set:re,$on:(b,o)=>se(e,b,o)},h=Pr(),w=de(h),_=de(w);H(_,()=>n()??fe),ge(w);var P=ve(w,2),v=de(P);{var x=b=>{ir(b,{children:(o,p)=>{$e();var L=et();_e(()=>tt(L,g())),F(o,L)},$$slots:{default:!0}})};Y(v,b=>{g()&&b(x)})}var S=ve(v,2);H(S,()=>i()??fe);var z=ve(S,2);return H(z,d),ge(P),ge(h),_e(b=>{wt(h,"data-size",y),dr(h,1,b)},[()=>cr(be("flex items-center justify-between",y==="compact"?"gap-2":"gap-3",f()))]),F(c,h),ae(C)}function zt(c,e){if(new.target)return te({component:zt,...c});ne(e,!0);let n=r(e,"open",15,!1),i=r(e,"static",7,!1),d=r(e,"title",7),g=r(e,"description",7),f=r(e,"titleId",7),y=r(e,"descriptionId",7),C=r(e,"children",7),h=r(e,"footer",7),w=r(e,"submitLabel",23,()=>ce.modals_bulkActionConfirm_confirm_label()),_=r(e,"cancelLabel",23,()=>ce.modals_bulkActionConfirm_cancel_label()),P=r(e,"submitVariant",7,"primary"),v=r(e,"canSubmit",7,!0),x=r(e,"busy",7,!1),S=r(e,"submitBusy",7,!1),z=r(e,"role",7,"dialog"),b=r(e,"dismissOnInteractOutside",7,!0),o=r(e,"showCancel",7,!0),p=r(e,"showCloseButton",7,!0),L=r(e,"closeLabel",23,()=>ce.ui_dialog_close_ariaLabel()),K=r(e,"class",7),t=r(e,"size",7,"default"),l=r(e,"initialFocus",7),E=r(e,"focusContent",7,!1),B=r(e,"focusSubmit",7,!1),W=r(e,"focusCancel",7,!1),D=r(e,"escapeKeydownBehavior",7,"close"),G=r(e,"enterKey",7,"submit"),O=r(e,"modEnter",7,"submit"),ie=r(e,"onfocusin",7),Q=r(e,"onCloseAutoFocus",7),X=r(e,"onSubmit",7),oe=r(e,"onCancel",7),ue=N(!1),j=N(""),Me=N(!1),Ae=N(null),Re=N(null),Ne=N(null);const J=I(()=>x()||a(ue));ye(()=>{n()&&(k(Me,!1),k(j,""))});function He(){a(J)||a(Me)||(k(Me,!0),n(!1),oe()?.())}async function Bt(){if(!(a(J)||S()||!v())){k(ue,!0),k(j,"");try{await X()()}catch{k(j,ce.ui_dialog_submitFailed_error(),!0)}finally{k(ue,!1)}}}function At(u){const Z=l()??(W()?a(Re):B()?a(Ne):E()?a(Ae):null);Z&&(Z.focus(),Z.ownerDocument.activeElement===Z&&u.preventDefault())}var Tt={get open(){return n()},set open(u=!1){n(u),s()},get static(){return i()},set static(u=!1){i(u),s()},get title(){return d()},set title(u){d(u),s()},get description(){return g()},set description(u){g(u),s()},get titleId(){return f()},set titleId(u){f(u),s()},get descriptionId(){return y()},set descriptionId(u){y(u),s()},get children(){return C()},set children(u){C(u),s()},get footer(){return h()},set footer(u){h(u),s()},get submitLabel(){return w()},set submitLabel(u=ce.modals_bulkActionConfirm_confirm_label()){w(u),s()},get cancelLabel(){return _()},set cancelLabel(u=ce.modals_bulkActionConfirm_cancel_label()){_(u),s()},get submitVariant(){return P()},set submitVariant(u="primary"){P(u),s()},get canSubmit(){return v()},set canSubmit(u=!0){v(u),s()},get busy(){return x()},set busy(u=!1){x(u),s()},get submitBusy(){return S()},set submitBusy(u=!1){S(u),s()},get role(){return z()},set role(u="dialog"){z(u),s()},get dismissOnInteractOutside(){return b()},set dismissOnInteractOutside(u=!0){b(u),s()},get showCancel(){return o()},set showCancel(u=!0){o(u),s()},get showCloseButton(){return p()},set showCloseButton(u=!0){p(u),s()},get closeLabel(){return L()},set closeLabel(u=ce.ui_dialog_close_ariaLabel()){L(u),s()},get class(){return K()},set class(u){K(u),s()},get size(){return t()},set size(u="default"){t(u),s()},get initialFocus(){return l()},set initialFocus(u){l(u),s()},get focusContent(){return E()},set focusContent(u=!1){E(u),s()},get focusSubmit(){return B()},set focusSubmit(u=!1){B(u),s()},get focusCancel(){return W()},set focusCancel(u=!1){W(u),s()},get escapeKeydownBehavior(){return D()},set escapeKeydownBehavior(u="close"){D(u),s()},get enterKey(){return G()},set enterKey(u="submit"){G(u),s()},get modEnter(){return O()},set modEnter(u="submit"){O(u),s()},get onfocusin(){return ie()},set onfocusin(u){ie(u),s()},get onCloseAutoFocus(){return Q()},set onCloseAutoFocus(u){Q(u),s()},get onSubmit(){return X()},set onSubmit(u){X(u),s()},get onCancel(){return oe()},set onCancel(u){oe(u),s()},$set:re,$on:(u,Z)=>se(e,u,Z)},ot=V(),Kt=A(ot);return pe(Kt,()=>or,(u,Z)=>{Z(u,{get open(){return n()},get staticPosition(){return i()},onOpenChange:je=>!je&&He(),children:(je,Ar)=>{var ut=V(),Vt=A(ut);{let Ot=I(()=>be("flex min-h-0 flex-col overflow-hidden p-0",K()));pe(Vt,()=>ur,(Dt,Gt)=>{Gt(Dt,{get role(){return z()},get size(){return t()},get class(){return a(Ot)},get closeDisabled(){return a(J)},get showCloseButton(){return p()},get closeLabel(){return L()},get escapeKeydownBehavior(){return D()},onOpenAutoFocus:At,get onCloseAutoFocus(){return Q()},get onfocusin(){return ie()},onkeydown:M=>{M.key==="Escape"&&gr(a(Ae),M)||M.key==="Escape"&&D()==="close"&&(M.preventDefault(),M.stopPropagation(),He())},onInteractOutside:M=>(a(J)||!b())&&M.preventDefault(),onEscapeKeydown:M=>a(J)&&M.preventDefault(),get ref(){return a(Ae)},set ref(M){k(Ae,M,!0)},children:(M,Tr)=>{Ft(M,{onSubmit:Bt,get busy(){return a(J)},get enterKey(){return G()},get modEnter(){return O()},class:"flex min-h-0 min-w-0 flex-1 flex-col",children:(Mt,Kr)=>{lr(Mt,{get title(){return d()},get description(){return g()},get titleId(){return f()},get descriptionId(){return y()},get children(){return C()},get error(){return a(j)},footer:Rt=>{var lt=V(),Nt=A(lt);{var Ht=me=>{var Ue=V(),ct=A(Ue);H(ct,h),F(me,Ue)},jt=me=>{Lt(me,{secondary:qe=>{var Te=V(),We=A(Te);{var Qe=le=>{ht(le,{variant:"ghost-light",get disabled(){return a(J)},onclick:He,get ref(){return a(Re)},set ref(Ke){k(Re,Ke,!0)},children:(Ke,Xe)=>{$e();var dt=et();_e(()=>tt(dt,_())),F(Ke,dt)},$$slots:{default:!0}})};Y(We,le=>{o()&&le(Qe)})}F(qe,Te)},primary:qe=>{{let Te=I(()=>B()?"focus-visible:outline focus-visible:-outline-offset-1":void 0),We=I(()=>a(J)||S()),Qe=I(()=>!v()||a(J)||S());ht(qe,{type:"submit",get variant(){return P()},get class(){return a(Te)},get loading(){return a(We)},get disabled(){return a(Qe)},get ref(){return a(Ne)},set ref(le){k(Ne,le,!0)},children:(le,Ke)=>{$e();var Xe=et();_e(()=>tt(Xe,w())),F(le,Xe)},$$slots:{default:!0}})}},$$slots:{secondary:!0,primary:!0}})};Y(Nt,me=>{h()?me(Ht):me(jt,-1)})}F(Rt,lt)},$$slots:{footer:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}})})}F(je,ut)},$$slots:{default:!0}})}),F(c,ot),ae(Tt)}function kr(c,e){if(new.target)return te({component:kr,...c});ne(e,!0);let n=r(e,"open",15,!1),i=r(e,"static",7,!1),d=r(e,"title",7),g=r(e,"description",7),f=r(e,"confirmLabel",7),y=r(e,"cancelLabel",7),C=r(e,"details",7),h=r(e,"busy",7,!1),w=r(e,"submitBusy",7,!1),_=r(e,"canSubmit",7,!0),P=r(e,"focusSubmit",7,!0),v=r(e,"focusCancel",7,!1),x=r(e,"enterKey",7,"submit"),S=r(e,"modEnter",7,"submit"),z=r(e,"destructive",7,!0),b=r(e,"class",7),o=r(e,"closeLabel",7),p=r(e,"onConfirm",7),L=r(e,"onCancel",7);var K={get open(){return n()},set open(t=!1){n(t),s()},get static(){return i()},set static(t=!1){i(t),s()},get title(){return d()},set title(t){d(t),s()},get description(){return g()},set description(t){g(t),s()},get confirmLabel(){return f()},set confirmLabel(t){f(t),s()},get cancelLabel(){return y()},set cancelLabel(t){y(t),s()},get details(){return C()},set details(t){C(t),s()},get busy(){return h()},set busy(t=!1){h(t),s()},get submitBusy(){return w()},set submitBusy(t=!1){w(t),s()},get canSubmit(){return _()},set canSubmit(t=!0){_(t),s()},get focusSubmit(){return P()},set focusSubmit(t=!0){P(t),s()},get focusCancel(){return v()},set focusCancel(t=!1){v(t),s()},get enterKey(){return x()},set enterKey(t="submit"){x(t),s()},get modEnter(){return S()},set modEnter(t="submit"){S(t),s()},get destructive(){return z()},set destructive(t=!0){z(t),s()},get class(){return b()},set class(t){b(t),s()},get closeLabel(){return o()},set closeLabel(t){o(t),s()},get onConfirm(){return p()},set onConfirm(t){p(t),s()},get onCancel(){return L()},set onCancel(t){L(t),s()},$set:re,$on:(t,l)=>se(e,t,l)};{let t=I(()=>z()?"destructive":"default");zt(c,{get static(){return i()},get title(){return d()},get description(){return g()},get submitLabel(){return f()},get cancelLabel(){return y()},get submitVariant(){return a(t)},get busy(){return h()},get submitBusy(){return w()},get canSubmit(){return _()},get focusSubmit(){return P()},get focusCancel(){return v()},get enterKey(){return x()},get modEnter(){return S()},get class(){return b()},get closeLabel(){return o()},get onSubmit(){return p()},get onCancel(){return L()},get open(){return n()},set open(l){n(l)},children:(l,E)=>{var B=V(),W=A(B);{var D=G=>{var O=V(),ie=A(O);H(ie,C),F(G,O)};Y(W,G=>{C()&&G(D)})}F(l,B)},$$slots:{default:!0}})}return ae(K)}var R,ke,Fe,Le,ze;class Fr{constructor(e,n){T(this,R,N(Wt([])));T(this,ke);T(this,Fe);T(this,Le,N(null));T(this,ze,N(0));Ye(this,ke,e),Ye(this,Fe,n)}get hover(){return a(m(this,Le))}set hover(e){k(m(this,Le),e,!0)}get keyboardIndex(){return a(m(this,ze))}set keyboardIndex(e){k(m(this,ze),e,!0)}get selectedIndexes(){const e=new Set(m(this,ke).call(this));return a(m(this,R)).flatMap((n,i)=>n&&e.has(n.value)?[i]:[])}allocate(e){return $(()=>{const n={value:e,element:null,disabled:!1},i=a(m(this,R)).indexOf(void 0);return i<0?a(m(this,R)).push(n)-1:(a(m(this,R))[i]=n,i)})}release(e){$(()=>{a(m(this,R))[e]&&(a(m(this,R))[e]=void 0,this.hover?.activeIndex===e&&this.hover.setActiveIndex(null),this.hover?.registerItem(e,null))})}update(e,n,i){$(()=>{const d=a(m(this,R))[e];d&&(d.value=n,d.disabled=i)})}register(e,n){$(()=>{const i=a(m(this,R))[e];i&&(i.element=n,this.hover?.registerItem(e,n))})}connect(e){$(()=>{this.hover?.destroy(),this.hover=hr(e,{axis:m(this,Fe)});for(const[n,i]of a(m(this,R)).entries())i?.element&&this.hover.registerItem(n,i.element)})}disconnect(){$(()=>{this.hover?.destroy(),this.hover=null})}activate(e){this.keyboardIndex=e,this.hover?.setActiveIndex(e)}focusAdjacent(e,n){const i=a(m(this,R)).map((f,y)=>({entry:f,entryIndex:y})).filter(({entry:f})=>f?.element&&!f.disabled),d=i.findIndex(({entryIndex:f})=>f===e);if(d<0||i.length===0)return;const g=i[(d+n+i.length)%i.length];this.activate(g.entryIndex),g.entry?.element?.focus()}}R=new WeakMap,ke=new WeakMap,Fe=new WeakMap,Le=new WeakMap,ze=new WeakMap;const Et=Symbol("toggle-group");var Lr=new Set(["$$slots","$$events","$$legacy","value","onValueChange","type","disabled","axis","variant","size","class","children"]),vt=Be("<!> <!>",1);function zr(c,e){if(new.target)return te({component:zr,...c});ne(e,!0);const n=Ct({base:"relative isolate inline-flex shrink-0 items-center justify-center gap-0.5 rounded-(--radius-medium) border-0 bg-card",variants:{variant:{default:"shadow-(--elevation-raised)",outline:"border border-border shadow-none",flat:"bg-muted/40 shadow-none"},size:{default:"",xs:"",sm:"",lg:""}},defaultVariants:{variant:"default",size:"default"}});let i=r(e,"value",15),d=r(e,"onValueChange",7),g=r(e,"type",7,"single"),f=r(e,"disabled",7,!1),y=r(e,"axis",7,"x"),C=r(e,"variant",7,"default"),h=r(e,"size",7,"default"),w=r(e,"class",7,""),_=r(e,"children",7),P=Ee(e,Lr),v=N(null);const x=new Fr(()=>Array.isArray(i())?i():typeof i()=="string"&&i()?[i()]:[],$(()=>y()));Qt(Et,{state:x,get size(){return h()},get variant(){return C()}}),ye(()=>{if(a(v))return x.connect(a(v)),()=>x.disconnect()});function S(t){i(t),d()?.(t)}function z(t){i(t),d()?.(t)}var b={get value(){return i()},set value(t){i(t),s()},get onValueChange(){return d()},set onValueChange(t){d(t),s()},get type(){return g()},set type(t="single"){g(t),s()},get disabled(){return f()},set disabled(t=!1){f(t),s()},get axis(){return y()},set axis(t="x"){y(t),s()},get variant(){return C()},set variant(t="default"){C(t),s()},get size(){return h()},set size(t="default"){h(t),s()},get class(){return w()},set class(t=""){w(t),s()},get children(){return _()},set children(t){_(t),s()},$set:re,$on:(t,l)=>se(e,t,l)},o=V(),p=A(o);{var L=t=>{var l=V(),E=A(l);{let B=I(()=>Array.isArray(i())?i():[]),W=I(()=>be(n({variant:C(),size:h()}),w()));pe(E,()=>nt,(D,G)=>{G(D,Ze({type:"multiple",get value(){return a(B)},onValueChange:z,get disabled(){return f()},get class(){return a(W)}},()=>P,{get ref(){return a(v)},set ref(O){k(v,O,!0)},children:(O,ie)=>{var Q=vt(),X=A(Q);{var oe=j=>{bt(j,{get store(){return x.hover},get selectedIndexes(){return x.selectedIndexes}})};Y(X,j=>{x.hover&&j(oe)})}var ue=ve(X,2);H(ue,()=>_()??fe),F(O,Q)},$$slots:{default:!0}}))})}F(t,l)},K=t=>{var l=V(),E=A(l);{let B=I(()=>typeof i()=="string"?i():""),W=I(()=>be(n({variant:C(),size:h()}),w()));pe(E,()=>nt,(D,G)=>{G(D,Ze({type:"single",get value(){return a(B)},onValueChange:S,get disabled(){return f()},get class(){return a(W)}},()=>P,{get ref(){return a(v)},set ref(O){k(v,O,!0)},children:(O,ie)=>{var Q=vt(),X=A(Q);{var oe=j=>{bt(j,{get store(){return x.hover},get selectedIndexes(){return x.selectedIndexes}})};Y(X,j=>{x.hover&&j(oe)})}var ue=ve(X,2);H(ue,()=>_()??fe),F(O,Q)},$$slots:{default:!0}}))})}F(t,l)};Y(p,t=>{g()==="multiple"?t(L):t(K,-1)})}return F(c,o),ae(b)}var Er=new Set(["$$slots","$$events","$$legacy","value","disabled","variant","size","tooltip","class","onclick","onfocus","children"]);function Br(c,e){if(new.target)return te({component:Br,...c});ne(e,!0);const n=Ct({base:"type-caption relative z-10 inline-flex shrink-0 cursor-pointer items-center justify-center whitespace-nowrap rounded-(--radius-medium) border-0 bg-transparent font-normal text-muted-foreground transition-[color,font-weight] duration-spring-fast ease-spring-fast hover:text-foreground active:bg-active disabled:pointer-events-none disabled:opacity-50 data-[state=on]:[--text-caption-weight:500] data-[state=on]:text-foreground motion-reduce:transition-none",variants:{variant:{default:"",outline:"bg-transparent",flat:""},size:{default:"h-(--control-height-medium) min-w-8 px-2",xs:"h-(--control-height-small) min-w-7 px-1.5",sm:"h-(--control-height-small) min-w-7 px-1.5",lg:"h-(--control-height-large) min-w-9 px-2.5"}},defaultVariants:{variant:"default",size:"default"}});let i=r(e,"value",7),d=r(e,"disabled",7,!1),g=r(e,"variant",7,void 0),f=r(e,"size",7,void 0),y=r(e,"tooltip",7,void 0),C=r(e,"class",7,""),h=r(e,"onclick",7),w=r(e,"onfocus",7),_=r(e,"children",7),P=Ee(e,Er);const v=Xt(Et),x=v.state.allocate($(()=>i()));let S=N(null);const z=I(()=>f()??v?.size??"default"),b=I(()=>g()??v?.variant??"default");ye(()=>v.state.update(x,i(),d())),ye(()=>(v.state.register(x,a(S)),()=>v.state.register(x,null)));function o(t){v.state.activate(x),w()?.(t)}var p={get value(){return i()},set value(t){i(t),s()},get disabled(){return d()},set disabled(t=!1){d(t),s()},get variant(){return g()},set variant(t=void 0){g(t),s()},get size(){return f()},set size(t=void 0){f(t),s()},get tooltip(){return y()},set tooltip(t=void 0){y(t),s()},get class(){return C()},set class(t=""){C(t),s()},get onclick(){return h()},set onclick(t){h(t),s()},get onfocus(){return w()},set onfocus(t){w(t),s()},get children(){return _()},set children(t){_(t),s()},$set:re,$on:(t,l)=>se(e,t,l)},L=V(),K=A(L);{let t=I(()=>be(n({variant:a(b),size:a(z)}),C()));pe(K,()=>kt,(l,E)=>{E(l,Ze({get value(){return i()},get title(){return y()},get disabled(){return d()},get onclick(){return h()},onfocus:o,get class(){return a(t)}},()=>P,{get ref(){return a(S)},set ref(B){k(S,B,!0)},children:(B,W)=>{var D=V(),G=A(D);H(G,()=>_()??fe),F(B,D)},$$slots:{default:!0}}))})}return F(c,L),ae(p)}export{Fr as C,kr as D,Ft as F,zr as T,Lt as a,zt as b,Br as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as P,bo as d,bw as V,b as B,bm as L}from"./BkP7iWmk.js";import{bs as F,b_ as z,W as _,bn as j,aA as p,aC as T,a7 as H,ay as I,aD as r,a5 as U,bS as X,bH as b,bA as Y,be as Z,b$ as $,bO as ee,c9 as c,aB as te,bV as k,bk as re}from"./DYhIMPy1.js";import{s as ne,f as ie,c as oe}from"./DdeuoyZB.js";import{i as O}from"./Cmsd5u03.js";import{k as se}from"./BNaYSa9e.js";import{I as ae}from"./
|
|
1
|
+
import{t as P,bo as d,bw as V,b as B,bm as L}from"./BkP7iWmk.js";import{bs as F,b_ as z,W as _,bn as j,aA as p,aC as T,a7 as H,ay as I,aD as r,a5 as U,bS as X,bH as b,bA as Y,be as Z,b$ as $,bO as ee,c9 as c,aB as te,bV as k,bk as re}from"./DYhIMPy1.js";import{s as ne,f as ie,c as oe}from"./DdeuoyZB.js";import{i as O}from"./Cmsd5u03.js";import{k as se}from"./BNaYSa9e.js";import{I as ae}from"./yiVXShkh.js";import"./DJpoQ2fS.js";import{L as le}from"./BECt4TTe.js";import"./Dr53ZtPD.js";import{D as ue,b as W}from"./C4eFP2Zv.js";import{J as ce,H as y}from"./Hn8VNjVU.js";var fe=T('<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true"><path d="M12 15.82L12 23.76M4.44 21L8.35 16.35A1.96 1.96 0 0 0 6.4 12.99L0.42 14.04M1.82 6.12L7.08 9.16A1.96 1.96 0 0 0 10.06 6.66L7.98 0.95M16.02 0.95L13.94 6.66A1.96 1.96 0 0 0 16.92 9.16L22.18 6.12M23.58 14.04L17.6 12.99A1.96 1.96 0 0 0 15.65 16.35L19.56 21" stroke="currentColor" stroke-width="2.06" stroke-linecap="butt" stroke-linejoin="round"></path></svg>');function me(f,o){if(new.target)return P({component:me,...f});F(o,!0);let e=d(o,"width",7,24),n=d(o,"class",7,"");var s={get width(){return e()},set width(a=24){e(a),p()},get class(){return n()},set class(a=""){n(a),p()},$set:V,$on:(a,m)=>B(o,a,m)},l=fe();return z(()=>{ne(l,"width",e()),ie(l,0,oe(n()))}),_(f,l),j(s)}var de=te('<div class="grid gap-2"><!> <!></div>');function E(f,o){if(new.target)return P({component:E,...f});F(o,!0);let e=d(o,"request",7),n=d(o,"value",15,""),s=d(o,"busy",7,!1),l=d(o,"static",7,!1),a=d(o,"onAccept",7),m=d(o,"onCancel",7),v=k(null);var A={get request(){return e()},set request(t){e(t),p()},get value(){return n()},set value(t=""){n(t),p()},get busy(){return s()},set busy(t=!1){s(t),p()},get static(){return l()},set static(t=!1){l(t),p()},get onAccept(){return a()},set onAccept(t){a(t),p()},get onCancel(){return m()},set onCancel(t){m(t),p()},$set:V,$on:(t,g)=>B(o,t,g)},h=H(),i=I(h);{var u=t=>{{let g=c(()=>e().options.confirmLabel??L.modals_bulkActionConfirm_confirm_label()),M=c(()=>e().options.cancelLabel??L.modals_bulkActionConfirm_cancel_label()),S=c(()=>e().options.destructive??!1);ue(t,{open:!0,get static(){return l()},get title(){return e().options.title},get description(){return e().options.description},get confirmLabel(){return r(g)},get cancelLabel(){return r(M)},get destructive(){return r(S)},get busy(){return s()},onConfirm:()=>a()(n()),get onCancel(){return m()}})}},q=t=>{{let g=c(()=>e().options.confirmLabel??L.modals_input_confirm_label()),M=c(()=>e().options.cancelLabel??L.modals_input_cancel_label()),S=c(()=>!e().options.field.required||n().trim().length>0);W(t,{open:!0,get static(){return l()},get title(){return e().options.title},get description(){return e().options.description},get submitLabel(){return r(g)},get cancelLabel(){return r(M)},get canSubmit(){return r(S)},get busy(){return s()},get initialFocus(){return r(v)},onSubmit:()=>a()(n()),get onCancel(){return m()},children:(G,ge)=>{var D=de(),J=U(D);{var K=C=>{le(C,{for:"confirm-prompt-field",children:(R,w)=>{Z();var N=$();z(()=>ee(N,e().options.field.label)),_(R,N)},$$slots:{default:!0}})};O(J,C=>{e().options.field.label&&C(K)})}var Q=X(J,2);{let C=c(()=>e().options.field.type??"text"),R=c(()=>e().options.field.label?void 0:e().options.title);ae(Q,{id:"confirm-prompt-field",get type(){return r(C)},get placeholder(){return e().options.field.placeholder},get"aria-label"(){return r(R)},get ref(){return r(v)},set ref(w){b(v,w,!0)},get value(){return n()},set value(w){n(w)}})}Y(D),_(G,D)},$$slots:{default:!0}})}},x=t=>{{let g=c(()=>e().options.confirmLabel??L.modals_input_confirm_label());W(t,{open:!0,get static(){return l()},role:"alertdialog",get title(){return e().options.title},get description(){return e().options.description},get submitLabel(){return r(g)},showCancel:!1,dismissOnInteractOutside:!1,get busy(){return s()},onSubmit:()=>a()(n()),onCancel:()=>a()(n())})}};O(i,t=>{e()?.kind==="confirm"?t(u):e()?.kind==="prompt"?t(q,1):e()?.kind==="alert"&&t(x,2)})}return _(f,h),j(A)}function pe(f,o){if(new.target)return P({component:pe,...f});F(o,!0);let e=k(null),n=k(""),s=k(!1);re(()=>ce(i=>{b(e,i,!0),b(n,i?.kind==="prompt"?i.options.field.initialValue??"":"",!0),b(s,!1)}));function l(){!r(e)||r(s)||y(r(e).id,r(e).kind==="confirm"?!1:null)}async function a(){if(!r(e)||r(s))return;const i=r(e);b(s,!0);try{i.kind==="confirm"?(await i.options.onConfirm?.(),y(i.id,!0)):i.kind==="prompt"?(await i.options.onConfirm?.(r(n).trim()),y(i.id,r(n).trim())):y(i.id,void 0)}catch(u){throw console.error("Confirm action failed:",u),b(s,!1),u}}var m={$set:V,$on:(i,u)=>B(o,i,u)},v=H(),A=I(v);{var h=i=>{var u=H(),q=I(u);se(q,()=>r(e).id,x=>{E(x,{get request(){return r(e)},get busy(){return r(s)},onAccept:a,onCancel:l,get value(){return r(n)},set value(t){b(n,t,!0)}})}),_(i,u)};O(A,i=>{r(e)&&i(h)})}return _(f,v),j(m)}export{pe as C,me as L};
|