@intent-hq/web 2.303.0 → 2.303.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/web/app/immutable/chunks/{Uqyp_Z5g.js → 00uxEElC.js} +1 -1
- package/web/app/immutable/chunks/{DuLaaA6-.js → 0_F49j-u.js} +1 -1
- package/web/app/immutable/chunks/{YoGNCXo4.js → 16TQPnhH.js} +1 -1
- package/web/app/immutable/chunks/{DfmdJdwv.js → 1PMPyNG_.js} +1 -1
- package/web/app/immutable/chunks/{DmjB9mMi.js → 1mYCesh4.js} +1 -1
- package/web/app/immutable/chunks/{Cnt9Xhr-.js → 27ieI8Q7.js} +1 -1
- package/web/app/immutable/chunks/{ByACHrz5.js → 4NAJ4wU0.js} +1 -1
- package/web/app/immutable/chunks/{BOjYXcVe.js → 4SHq9vZB.js} +1 -1
- package/web/app/immutable/chunks/{ITC0lU_J.js → 80lJL4Bn.js} +1 -1
- package/web/app/immutable/chunks/{BU7Z2EF0.js → 8SGgBOu4.js} +1 -1
- package/web/app/immutable/chunks/{CwAeATOR.js → Af4e_CfR.js} +1 -1
- package/web/app/immutable/chunks/{Dc87vv58.js → B0Ix4oHU.js} +3 -3
- package/web/app/immutable/chunks/{BQljjSCN.js → B0yoZLtl.js} +1 -1
- package/web/app/immutable/chunks/{BuVa2eFx.js → B43OyUe0.js} +1 -1
- package/web/app/immutable/chunks/{Ccv0zhgY.js → B4W6-XXO.js} +1 -1
- package/web/app/immutable/chunks/{DrQZ_5ep.js → B59NonPS.js} +1 -1
- package/web/app/immutable/chunks/{CJ8yc0DP.js → B8eTvp12.js} +1 -1
- package/web/app/immutable/chunks/{BBiyRGtr.js → B8vlcOwv.js} +1 -1
- package/web/app/immutable/chunks/{Br9kjSBP.js → BAY-mFnP.js} +1 -1
- package/web/app/immutable/chunks/{fotZrDMM.js → BC_OV_w3.js} +6 -6
- package/web/app/immutable/chunks/{Cca849ph.js → BD0xH6ju.js} +6 -6
- package/web/app/immutable/chunks/{BF_QBoo8.js → BGn-A48v.js} +2 -2
- package/web/app/immutable/chunks/{Bfq2NG2E.js → BIGW16GS.js} +1 -1
- package/web/app/immutable/chunks/{BigIsyj-.js → BJuRmCrE.js} +1 -1
- package/web/app/immutable/chunks/{Ddxi1vXg.js → BKmyS2KM.js} +1 -1
- package/web/app/immutable/chunks/{DEwxJ7iL.js → BNJMdNln.js} +1 -1
- package/web/app/immutable/chunks/{BteZSr1k.js → BNf1F4jC.js} +1 -1
- package/web/app/immutable/chunks/{BfVCjn3m.js → BNqPvIBf.js} +1 -1
- package/web/app/immutable/chunks/{Ck-LL3ed.js → BOYIvbV1.js} +1 -1
- package/web/app/immutable/chunks/{BMsD16_3.js → BQV3Ny-c.js} +1 -1
- package/web/app/immutable/chunks/{5MHba1xk.js → BR34HSgY.js} +4 -4
- package/web/app/immutable/chunks/{C8OQrIIm.js → BTYvk2mh.js} +1 -1
- package/web/app/immutable/chunks/{CBc7jb8Q.js → BYUq5x3t.js} +1 -1
- package/web/app/immutable/chunks/{BqDsguwv.js → BZltciVZ.js} +1 -1
- package/web/app/immutable/chunks/B_2S_hHs.js +1 -0
- package/web/app/immutable/chunks/{anXEajM1.js → Bb19RpMB.js} +1 -1
- package/web/app/immutable/chunks/{CUDTlaFj.js → BdDWti3j.js} +2 -2
- package/web/app/immutable/chunks/{CpMOYtor.js → BdMGXlaL.js} +1 -1
- package/web/app/immutable/chunks/{a2HQi9wL.js → BeH4qLDH.js} +2 -2
- package/web/app/immutable/chunks/{BtQ4PSLG.js → BehTaWRy.js} +1 -1
- package/web/app/immutable/chunks/{CHFzcWvZ.js → Bf2SLLHW.js} +1 -1
- package/web/app/immutable/chunks/{BBGqB1Iv.js → BgAd01eY.js} +1 -1
- package/web/app/immutable/chunks/{B2mQPZBP.js → BjZIrkYy.js} +1 -1
- package/web/app/immutable/chunks/{5-xtIxmm.js → Bm6CXfx7.js} +1 -1
- package/web/app/immutable/chunks/{D-Id8F3a.js → BmQTD8A8.js} +1 -1
- package/web/app/immutable/chunks/{DgekGtPq.js → BnwJCd5q.js} +1 -1
- package/web/app/immutable/chunks/{ZfQn4F-U.js → Bny3Va3q.js} +1 -1
- package/web/app/immutable/chunks/{Ci-IeJJ3.js → BpPaCMNY.js} +2 -2
- package/web/app/immutable/chunks/{D0Yzm6Tr.js → BpznL-Sx.js} +1 -1
- package/web/app/immutable/chunks/{Bz_Ux7Cj.js → Bq0ctQK9.js} +1 -1
- package/web/app/immutable/chunks/{BJuO6D8C.js → BqNKVfCm.js} +1 -1
- package/web/app/immutable/chunks/{DdpI6OOT.js → BqfQpM-F.js} +1 -1
- package/web/app/immutable/chunks/{CzrjeBLh.js → BrRwX7DO.js} +1 -1
- package/web/app/immutable/chunks/{CeNpZHYY.js → BsYKjXz_.js} +1 -1
- package/web/app/immutable/chunks/{DvLWLX5y.js → Bt6eGVSt.js} +1 -1
- package/web/app/immutable/chunks/{CVyJXdHx.js → Bt9uePlA.js} +1 -1
- package/web/app/immutable/chunks/{CcxlKj8X.js → Bu9lZqPK.js} +2 -2
- package/web/app/immutable/chunks/{D0aTvP2D.js → BuvWIiNr.js} +1 -1
- package/web/app/immutable/chunks/{C3PvtSMl.js → Bv033Zz3.js} +1 -1
- package/web/app/immutable/chunks/{C9C3aXN4.js → Bv7kzLZM.js} +1 -1
- package/web/app/immutable/chunks/{CSJVGysw.js → Bx6JcGvf.js} +3 -3
- package/web/app/immutable/chunks/{Cp2w4Aoq.js → By4T0eds.js} +1 -1
- package/web/app/immutable/chunks/{C0UTtBMM.js → ByA1TTJR.js} +1 -1
- package/web/app/immutable/chunks/{fHyhzSl9.js → BzpcSTCe.js} +1 -1
- package/web/app/immutable/chunks/{BlwZkVqv.js → C-EKIkEj.js} +1 -1
- package/web/app/immutable/chunks/{C7VgYeWn.js → C0PJP29a.js} +1 -1
- package/web/app/immutable/chunks/{S7byAssO.js → C3cCqJG4.js} +1 -1
- package/web/app/immutable/chunks/{BFBxkMdn.js → C5VEh5uc.js} +7 -7
- package/web/app/immutable/chunks/{BNJpxlGa.js → C8Y8MofM.js} +1 -1
- package/web/app/immutable/chunks/{Cxvrw3bm.js → CB9_hf7T.js} +1 -1
- package/web/app/immutable/chunks/{BqCB5d8M.js → CBdGUJdw.js} +1 -1
- package/web/app/immutable/chunks/{BQ8ALGA9.js → CBeI_yeK.js} +1 -1
- package/web/app/immutable/chunks/{B0rYdaYY.js → CFXCYKJP.js} +1 -1
- package/web/app/immutable/chunks/{2B1R4jRU.js → CHRWNuEU.js} +1 -1
- package/web/app/immutable/chunks/{DbBvr8WB.js → CJ6fKCMV.js} +1 -1
- package/web/app/immutable/chunks/{DFwdQIO-.js → CMrQ4XgK.js} +1 -1
- package/web/app/immutable/chunks/{DqjmLIQK.js → CN2zlwHC.js} +1 -1
- package/web/app/immutable/chunks/{B2G7y0XK.js → CPCUj0SC.js} +1 -1
- package/web/app/immutable/chunks/{VUF07YVv.js → CPo0z1NF.js} +1 -1
- package/web/app/immutable/chunks/{CN0juutS.js → CQAi9FSX.js} +1 -1
- package/web/app/immutable/chunks/{BSwEKQ1_.js → CQmHuNgQ.js} +1 -1
- package/web/app/immutable/chunks/{DooB2XO8.js → CQw7GTs6.js} +1 -1
- package/web/app/immutable/chunks/{C0ZFfsPl.js → CWEt6bXk.js} +1 -1
- package/web/app/immutable/chunks/{CllDLn8I.js → CWFKACW0.js} +1 -1
- package/web/app/immutable/chunks/{Cd4YH471.js → CXDa1oob.js} +1 -1
- package/web/app/immutable/chunks/{CwBqheGE.js → C_8qE1Ea.js} +1 -1
- package/web/app/immutable/chunks/{CzSlsGoP.js → C_PzkP6E.js} +1 -1
- package/web/app/immutable/chunks/{DVzAdR49.js → C_c9fmWH.js} +1 -1
- package/web/app/immutable/chunks/{IA3w-uN7.js → CaZjPP9e.js} +1 -1
- package/web/app/immutable/chunks/{DHXO_GXc.js → CbVMangE.js} +1 -1
- package/web/app/immutable/chunks/{Dzgwo0GZ.js → ChsApY2J.js} +1 -1
- package/web/app/immutable/chunks/{BfVcof_o.js → CjD72_YJ.js} +1 -1
- package/web/app/immutable/chunks/{B7Avn4wl.js → CjyLrIKT.js} +1 -1
- package/web/app/immutable/chunks/{CF3ASrh5.js → Ckh5WWeA.js} +1 -1
- package/web/app/immutable/chunks/{D9nEByRA.js → CrPX2-Do.js} +1 -1
- package/web/app/immutable/chunks/{DTjD4zeW.js → CsPa9HxL.js} +1 -1
- package/web/app/immutable/chunks/{DDGwSFq5.js → CtJ4QAPx.js} +1 -1
- package/web/app/immutable/chunks/{CXKLXdSt.js → CtMKqOD8.js} +1 -1
- package/web/app/immutable/chunks/{DAtVbVsS.js → CtR_aYLO.js} +1 -1
- package/web/app/immutable/chunks/{OFlMqCXp.js → CtnKv097.js} +1 -1
- package/web/app/immutable/chunks/{CFMQFeRy.js → CwGSuPgH.js} +1 -1
- package/web/app/immutable/chunks/{BqEArC05.js → Cx0BWf2W.js} +2 -2
- package/web/app/immutable/chunks/{CgbrFn69.js → D-P-dlJm.js} +1 -1
- package/web/app/immutable/chunks/{R9MY3CbI.js → D0P3i4zR.js} +1 -1
- package/web/app/immutable/chunks/{BGBckFMe.js → D1LK1GGR.js} +1 -1
- package/web/app/immutable/chunks/{D3PYAISi.js → D2uYpDGE.js} +1 -1
- package/web/app/immutable/chunks/{Ct4xVHP2.js → D3_DSRwK.js} +1 -1
- package/web/app/immutable/chunks/{Dzh2k03L.js → D4z6L4My.js} +4 -4
- package/web/app/immutable/chunks/{Bge5dh1B.js → D6gIQvhr.js} +1 -1
- package/web/app/immutable/chunks/{Dw3mdpNm.js → D9WcidNh.js} +1 -1
- package/web/app/immutable/chunks/{DJSEF8k8.js → D9xXuqJT.js} +3 -3
- package/web/app/immutable/chunks/{DirNRoXa.js → DBy0KL7v.js} +1 -1
- package/web/app/immutable/chunks/{BQyRZ41z.js → DBzoyXfv.js} +1 -1
- package/web/app/immutable/chunks/{CtY6JHRa.js → DGC8CG3j.js} +1 -1
- package/web/app/immutable/chunks/{CQBka_wr.js → DHHxqqbm.js} +1 -1
- package/web/app/immutable/chunks/{pKHTNJjH.js → DHpbS8ZT.js} +1 -1
- package/web/app/immutable/chunks/{C2vTRI6X.js → DIRIzGp9.js} +1 -1
- package/web/app/immutable/chunks/{DcPnShx8.js → DJPjZO1e.js} +1 -1
- package/web/app/immutable/chunks/{Rc4VcH_q.js → DKYgLLV7.js} +4 -4
- package/web/app/immutable/chunks/{DSl1LR8y.js → DLAMU8JP.js} +1 -1
- package/web/app/immutable/chunks/{Cx-YXwmH.js → DMjEYXkO.js} +1 -1
- package/web/app/immutable/chunks/{DxXerxkL.js → DP49kiGN.js} +1 -1
- package/web/app/immutable/chunks/{Ctj6dlZG.js → DQe9PqN1.js} +1 -1
- package/web/app/immutable/chunks/{BE__XMIp.js → DSXZRa59.js} +1 -1
- package/web/app/immutable/chunks/{Bm2MGeAn.js → DUPA9j6z.js} +1 -1
- package/web/app/immutable/chunks/{BAf0DpTf.js → DVElz61c.js} +1 -1
- package/web/app/immutable/chunks/{BVAdPP5H.js → DW7zmdfj.js} +1 -1
- package/web/app/immutable/chunks/{B8cf5lme.js → DXlS97NX.js} +1 -1
- package/web/app/immutable/chunks/{AJtVnhIc.js → DY2NSWQA.js} +1 -1
- package/web/app/immutable/chunks/{TuV551_5.js → DYUcU12p.js} +1 -1
- package/web/app/immutable/chunks/{Be2jiTan.js → Dc-LMfqP.js} +1 -1
- package/web/app/immutable/chunks/{BXfAbeiD.js → Dcl9PBqG.js} +1 -1
- package/web/app/immutable/chunks/{CaNii-Ah.js → Dh58itL6.js} +1 -1
- package/web/app/immutable/chunks/{BE462hO2.js → DjLmwxj2.js} +1 -1
- package/web/app/immutable/chunks/{BChUH2Be.js → DkCy9df6.js} +1 -1
- package/web/app/immutable/chunks/{LlFTKxal.js → DksBb8YR.js} +1 -1
- package/web/app/immutable/chunks/{bFN78kMF.js → Dm-ly3pD.js} +1 -1
- package/web/app/immutable/chunks/{C1rG2kRq.js → Dnce1kL4.js} +1 -1
- package/web/app/immutable/chunks/{CAiomrJ4.js → Doj9MsHo.js} +1 -1
- package/web/app/immutable/chunks/{D_TKkCPK.js → Dq9THA-s.js} +1 -1
- package/web/app/immutable/chunks/{D2rmBgSd.js → Dss2LRs8.js} +1 -1
- package/web/app/immutable/chunks/{BoGuiO53.js → Dt12oijM.js} +1 -1
- package/web/app/immutable/chunks/{Kb7gEpi7.js → Dt_YHb8y.js} +1 -1
- package/web/app/immutable/chunks/{v5vYCVrf.js → DvXLHS0T.js} +1 -1
- package/web/app/immutable/chunks/{D7HSLF3F.js → Dw0cAOdh.js} +1 -1
- package/web/app/immutable/chunks/{zSrQFJSH.js → DzCBift4.js} +1 -1
- package/web/app/immutable/chunks/{B2VEN5u-.js → DzyWp8BX.js} +1 -1
- package/web/app/immutable/chunks/{DuvPWUsz.js → FVjdVgy8.js} +1 -1
- package/web/app/immutable/chunks/{cGdzQWNj.js → Ga0tOshJ.js} +1 -1
- package/web/app/immutable/chunks/{D3MI97KG.js → GmnYJDe5.js} +1 -1
- package/web/app/immutable/chunks/{CVTVaQji.js → HJsrETfU.js} +1 -1
- package/web/app/immutable/chunks/{Dy7JBRvs.js → I2TUHdNR.js} +1 -1
- package/web/app/immutable/chunks/{KjuwwTcE.js → IJrjG441.js} +1 -1
- package/web/app/immutable/chunks/{Bkptxo7s.js → J4NypHg6.js} +1 -1
- package/web/app/immutable/chunks/{I-jE7nTc.js → JkPZevtU.js} +1 -1
- package/web/app/immutable/chunks/{DBson49o.js → KOu-Cq5S.js} +1 -1
- package/web/app/immutable/chunks/{Bj8ymBdJ.js → KgMNo-wX.js} +1 -1
- package/web/app/immutable/chunks/{CdJFh0TZ.js → N40ygtio.js} +1 -1
- package/web/app/immutable/chunks/{313bnnXe.js → NcsNOGAa.js} +1 -1
- package/web/app/immutable/chunks/{CP8kh5mB.js → PNb0FkcG.js} +1 -1
- package/web/app/immutable/chunks/{xtLfMwsc.js → Q3WVX75B.js} +1 -1
- package/web/app/immutable/chunks/{o3jAyq2Q.js → QpyyH1fV.js} +1 -1
- package/web/app/immutable/chunks/{C-schCPB.js → RTUC_gqV.js} +1 -1
- package/web/app/immutable/chunks/{CotXze-m.js → RYOcIy3J.js} +1 -1
- package/web/app/immutable/chunks/{VLI4PPZ8.js → SQR2mS9I.js} +1 -1
- package/web/app/immutable/chunks/{DecbABF7.js → T3bfkv-Z.js} +2 -2
- package/web/app/immutable/chunks/{DLA-s1b2.js → _bcJX7ZM.js} +1 -1
- package/web/app/immutable/chunks/{CiUEMn04.js → ahHOUTHC.js} +1 -1
- package/web/app/immutable/chunks/{97h7YGw7.js → c7MI1Uwa.js} +1 -1
- package/web/app/immutable/chunks/{DAk3LZcR.js → cwEGs1kY.js} +1 -1
- package/web/app/immutable/chunks/{heLBnDWs.js → gKuhYg6Y.js} +1 -1
- package/web/app/immutable/chunks/{Ctpp2ZEX.js → h37S7kk-.js} +1 -1
- package/web/app/immutable/chunks/{PNQ1m_CS.js → hRfGY9BA.js} +1 -1
- package/web/app/immutable/chunks/{F3rH8MkV.js → i9Hk2neJ.js} +1 -1
- package/web/app/immutable/chunks/{CexToh2A.js → jkdGOTth.js} +1 -1
- package/web/app/immutable/chunks/{BtLMNwhe.js → n7x1c6w9.js} +1 -1
- package/web/app/immutable/chunks/{PdV-3XT4.js → rtWGCI8s.js} +1 -1
- package/web/app/immutable/chunks/{rrqRhvrj.js → sLctU0Rs.js} +1 -1
- package/web/app/immutable/chunks/{DlCMYEtT.js → xCF3kBw_.js} +1 -1
- package/web/app/immutable/chunks/{8Alqs5BQ.js → xZ9BClBk.js} +2 -2
- package/web/app/immutable/chunks/{EbFvsc3p.js → yQjZw-Rk.js} +1 -1
- package/web/app/immutable/chunks/{D4xrSP2W.js → zbpnNt59.js} +1 -1
- package/web/app/immutable/entry/{app.B9uDIvO4.js → app.DYPZuUAX.js} +2 -2
- package/web/app/immutable/entry/start.CkreMjRr.js +1 -0
- package/web/app/immutable/nodes/{0.DxDi28Fc.js → 0.DNhWEYGp.js} +1 -1
- package/web/app/immutable/nodes/{1.BgNW_lIz.js → 1.C9L1F6aA.js} +1 -1
- package/web/app/immutable/nodes/{10.Dq5xHqVF.js → 10.B8AiTDsb.js} +1 -1
- package/web/app/immutable/nodes/{14.BiFAnsPE.js → 14.BKuNc4_Z.js} +1 -1
- package/web/app/immutable/nodes/{16.BflOgUt1.js → 16.CtflurYW.js} +2 -2
- package/web/app/immutable/nodes/{2.D4IoOmMO.js → 2.B4ArXfgw.js} +3 -3
- package/web/app/immutable/nodes/{3.ChiAVYk6.js → 3.FN9eOco4.js} +1 -1
- package/web/app/immutable/nodes/{4.BrpIsxVq.js → 4.ChyHBjf2.js} +1 -1
- package/web/app/immutable/nodes/5.mYT25e0t.js +5 -0
- package/web/app/immutable/nodes/{6.BJlVb40R.js → 6.BDco5Lux.js} +1 -1
- package/web/app/immutable/nodes/{7.sjxnbCBj.js → 7.CMc5WExh.js} +1 -1
- package/web/app/immutable/nodes/{8.DHiXeaLn.js → 8.DZjomBnv.js} +2 -2
- package/web/app/immutable/nodes/{9.CQl5M2II.js → 9.TMF_rwOS.js} +1 -1
- package/web/app/version.json +1 -1
- package/web/index.html +9 -9
- package/web/app/immutable/chunks/QrkzYSgq.js +0 -1
- package/web/app/immutable/entry/start.Co8Id4RS.js +0 -1
- package/web/app/immutable/nodes/5.CnAllYkd.js +0 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as gt}from"./
|
|
1
|
+
import{g as gt}from"./BIGW16GS.js";import{d as mt,g as lt,f as xt,e as kt}from"./B8eTvp12.js";import{aK as _t,c6 as vt,aL as bt,c7 as wt,aP as Tt,c9 as St,f as s,aO as R,c3 as X,a6 as $t,a0 as Mt}from"./BC_OV_w3.js";import{d as it}from"./DBzoyXfv.js";var U=(function(){var t=s(function(h,r,n,l){for(n=n||{},l=h.length;l--;n[h[l]]=r);return n},"o"),e=[6,8,10,11,12,14,16,17,18],a=[1,9],f=[1,10],i=[1,11],u=[1,12],p=[1,13],o=[1,14],g={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:s(function(r,n,l,y,d,c,v){var k=c.length-1;switch(d){case 1:return c[k-1];case 2:this.$=[];break;case 3:c[k-1].push(c[k]),this.$=c[k-1];break;case 4:case 5:this.$=c[k];break;case 6:case 7:this.$=[];break;case 8:y.setDiagramTitle(c[k].substr(6)),this.$=c[k].substr(6);break;case 9:this.$=c[k].trim(),y.setAccTitle(this.$);break;case 10:case 11:this.$=c[k].trim(),y.setAccDescription(this.$);break;case 12:y.addSection(c[k].substr(8)),this.$=c[k].substr(8);break;case 13:y.addTask(c[k-1],c[k]),this.$="task";break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:a,12:f,14:i,16:u,17:p,18:o},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:a,12:f,14:i,16:u,17:p,18:o},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:s(function(r,n){if(n.recoverable)this.trace(r);else{var l=new Error(r);throw l.hash=n,l}},"parseError"),parse:s(function(r){var n=this,l=[0],y=[],d=[null],c=[],v=this.table,k="",C=0,Q=0,yt=2,D=1,dt=c.slice.call(arguments,1),_=Object.create(this.lexer),I={yy:{}};for(var O in this.yy)Object.prototype.hasOwnProperty.call(this.yy,O)&&(I.yy[O]=this.yy[O]);_.setInput(r,I.yy),I.yy.lexer=_,I.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var Y=_.yylloc;c.push(Y);var ft=_.options&&_.options.ranges;typeof I.yy.parseError=="function"?this.parseError=I.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pt(w){l.length=l.length-2*w,d.length=d.length-w,c.length=c.length-w}s(pt,"popStack");function tt(){var w;return w=y.pop()||_.lex()||D,typeof w!="number"&&(w instanceof Array&&(y=w,w=y.pop()),w=n.symbols_[w]||w),w}s(tt,"lex");for(var b,A,T,q,F={},N,M,et,z;;){if(A=l[l.length-1],this.defaultActions[A]?T=this.defaultActions[A]:((b===null||typeof b>"u")&&(b=tt()),T=v[A]&&v[A][b]),typeof T>"u"||!T.length||!T[0]){var H="";z=[];for(N in v[A])this.terminals_[N]&&N>yt&&z.push("'"+this.terminals_[N]+"'");_.showPosition?H="Parse error on line "+(C+1)+`:
|
|
2
2
|
`+_.showPosition()+`
|
|
3
3
|
Expecting `+z.join(", ")+", got '"+(this.terminals_[b]||b)+"'":H="Parse error on line "+(C+1)+": Unexpected "+(b==D?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(H,{text:_.match,token:this.terminals_[b]||b,line:_.yylineno,loc:Y,expected:z})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+A+", token: "+b);switch(T[0]){case 1:l.push(b),d.push(_.yytext),c.push(_.yylloc),l.push(T[1]),b=null,Q=_.yyleng,k=_.yytext,C=_.yylineno,Y=_.yylloc;break;case 2:if(M=this.productions_[T[1]][1],F.$=d[d.length-M],F._$={first_line:c[c.length-(M||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(M||1)].first_column,last_column:c[c.length-1].last_column},ft&&(F._$.range=[c[c.length-(M||1)].range[0],c[c.length-1].range[1]]),q=this.performAction.apply(F,[k,Q,C,I.yy,T[1],d,c].concat(dt)),typeof q<"u")return q;M&&(l=l.slice(0,-1*M*2),d=d.slice(0,-1*M),c=c.slice(0,-1*M)),l.push(this.productions_[T[1]][0]),d.push(F.$),c.push(F._$),et=v[l[l.length-2]][l[l.length-1]],l.push(et);break;case 3:return!0}}return!0},"parse")},m=(function(){var h={EOF:1,parseError:s(function(n,l){if(this.yy.parser)this.yy.parser.parseError(n,l);else throw new Error(n)},"parseError"),setInput:s(function(r,n){return this.yy=n||this.yy||{},this._input=r,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var n=r.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:s(function(r){var n=r.length,l=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;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),l.length-1&&(this.yylineno-=l.length-1);var d=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:l?(l.length===y.length?this.yylloc.first_column:0)+y[y.length-l.length].length-l[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[d[0],d[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(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:s(function(r){this.unput(this.match.slice(r))},"less"),pastInput:s(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var r=this.pastInput(),n=new Array(r.length+1).join("-");return r+this.upcomingInput()+`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as s,r as l,d as t}from"./
|
|
1
|
+
import{g as s,r as l,d as t}from"./Af4e_CfR.js";import{p as m}from"./IJrjG441.js";import{M as p,d}from"./CtnKv097.js";import{a as n,ad as i}from"./C5VEh5uc.js";import"./BC_OV_w3.js";var u=d().Railroad.parser.LangiumParser,a=n(e=>{switch(e.$type){case"RailroadTerminalExpr":return{type:"terminal",value:e.value};case"RailroadNonTerminalExpr":return{type:"nonterminal",name:e.name};case"RailroadSpecialExpr":return{type:"special",text:e.text};case"RailroadSequenceExpr":{const r=e.elements.map(a);return r.length===1?r[0]:{type:"sequence",elements:r}}case"RailroadChoiceExpr":{const r=e.alternatives.map(a);return r.length===1?r[0]:{type:"choice",alternatives:r}}case"RailroadOptionalExpr":return{type:"optional",element:a(e.element)};case"RailroadOneOrMoreExpr":return{type:"repetition",element:a(e.element),min:1,max:1/0};case"RailroadZeroOrMoreExpr":return{type:"repetition",element:a(e.element),min:0,max:1/0};default:throw new Error(`Unsupported railroad expression: ${e.$type}`)}},"transformExpression"),c=n(e=>({name:e.name,definition:a(e.definition)}),"transformRule"),g=n(e=>{m(e,t),e.title&&t.setTitle(e.title),e.rules.map(r=>t.addRule(c(r)))},"populateDb"),y={parse:n(e=>{t.clear(),i.debug("[Railroad Parser] Starting Langium parse");const r=u.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new p(r);const o=r.value;i.debug("[Railroad Parser] Parsed rules:",o.rules.length),g(o),i.debug("[Railroad Parser] Parse complete")},"parse"),parser:{yy:t}},x={parser:y,db:t,renderer:l,styles:s};export{x as diagram};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as F,bq as q,bo as H,a_ as C,by as G,bs as dt,b as J,bu as nt}from"./rfbsWJY8.js";import{bs as K,cd as lt,ca as z,c5 as ct,a5 as T,be as D,b$ as M,b_ as h,bO as _,W as l,bH as U,aD as e,bS as L,bA as B,bn as N,bV as it,aA as R,c9 as u,aB as v,bl as S,ay as pt}from"./B8o4lNgr.js";import{C as ut}from"./
|
|
1
|
+
import{t as F,bq as q,bo as H,a_ as C,by as G,bs as dt,b as J,bu as nt}from"./rfbsWJY8.js";import{bs as K,cd as lt,ca as z,c5 as ct,a5 as T,be as D,b$ as M,b_ as h,bO as _,W as l,bH as U,aD as e,bS as L,bA as B,bn as N,bV as it,aA as R,c9 as u,aB as v,bl as S,ay as pt}from"./B8o4lNgr.js";import{C as ut}from"./CtJ4QAPx.js";import{f as V}from"./_hjrl4Qq.js";import{k as vt}from"./QsqAizRM.js";import{Hi as W,dv as bt,dt as kt,dw as _t}from"./CM_x_DK5.js";var gt=v('<p class="p-2 text-xs text-subtle" data-testid="hook-script-content-too-large"> </p>'),ft=v('<div class="min-h-0 min-w-0 flex-1 overflow-auto" data-testid="hook-script-content-script"><!></div>'),mt=v('<span class="text-xs font-medium text-danger"> </span> <pre class="whitespace-pre-wrap break-all rounded bg-danger-background/10 p-2 font-mono text-xs text-danger"> </pre>',1),ht=v('<pre class="whitespace-pre-wrap break-all rounded bg-muted/40 p-2 font-mono text-xs text-subtle"> </pre>'),xt=v('<p class="text-xs text-subtle"> </p>'),wt=v('<div class="flex min-h-0 min-w-0 flex-1 flex-col gap-2 overflow-auto" data-testid="hook-script-content-logs"><!> <!></div>'),It=v('<div class="flex h-full min-h-0 min-w-0 flex-col gap-3 overflow-hidden" data-testid="hook-script-content"><div class="flex shrink-0 border-b border-border" role="tablist"><!> <!></div> <!></div>');function Q(x,c){if(new.target)return F({component:Q,...x});K(c,!0);const g=()=>nt($,"$hooks$",w),[w,E]=dt();let s=q(c,"workspaceId",7),I=q(c,"hookId",7);const d=lt(s());z(()=>d.set(s()));const $=vt(d),b=u(()=>g().find(t=>t.hookId===I()));z(()=>{if(!s())return;const t=s();return ct(()=>{W.dispatch(bt(t)),W.dispatch(kt(t))}),()=>W.dispatch(_t(t))});let k=it("script");var X={get workspaceId(){return s()},set workspaceId(t){s(t),R()},get hookId(){return I()},set hookId(t){I(t),R()},$set:G,$on:(t,r)=>J(c,t,r)},A=It(),O=T(A),j=T(O);{let t=u(()=>e(k)==="script"),r=u(()=>e(k)==="script"?"border-primary-ink text-primary-ink":"border-transparent text-subtle");V(j,{variant:"ghost",role:"tab",get"aria-selected"(){return e(t)},get class(){return`border-b-2 px-3 py-1.5 text-sm ${e(r)??""}`},onclick:()=>U(k,"script"),children:(p,y)=>{D();var i=M();h(a=>_(i,a),[()=>H.chat_backgroundHooks_modal_scriptTab_label()]),l(p,i)},$$slots:{default:!0}})}var Y=L(j,2);{let t=u(()=>e(k)==="logs"),r=u(()=>e(k)==="logs"?"border-primary-ink text-primary-ink":"border-transparent text-subtle");V(Y,{variant:"ghost",role:"tab",get"aria-selected"(){return e(t)},get class(){return`border-b-2 px-3 py-1.5 text-sm ${e(r)??""}`},onclick:()=>U(k,"logs"),children:(p,y)=>{D();var i=M();h(a=>_(i,a),[()=>H.chat_backgroundHooks_modal_logsTab_label()]),l(p,i)},$$slots:{default:!0}})}B(O);var Z=L(O,2);{var tt=t=>{var r=ft(),p=T(r);{var y=a=>{var f=gt(),o=S(f,!0);h(n=>_(o,n),[()=>H.chat_backgroundHooks_modal_codeTooLarge_description({size:(e(b).codeBytes??0).toLocaleString()})]),l(a,f)},i=a=>{{let f=u(()=>e(b)?.code??"");ut(a,{get code(){return e(f)},language:"javascript",noMargin:!0})}};C(p,a=>{e(b)?.codeOmitted?a(y):a(i,-1)})}B(r),l(t,r)},et=t=>{var r=wt(),p=T(r);{var y=o=>{var n=mt(),m=pt(n),P=S(m,!0),at=L(m,2),ot=S(at,!0);h(st=>{_(P,st),_(ot,e(b).lastError)},[()=>H.chat_backgroundHooks_modal_lastError_label()]),l(o,n)};C(p,o=>{e(b)?.lastError&&o(y)})}var i=L(p,2);{var a=o=>{var n=ht(),m=S(n,!0);h(()=>_(m,e(b).lastLogs)),l(o,n)},f=o=>{var n=xt(),m=S(n,!0);h(P=>_(m,P),[()=>H.chat_backgroundHooks_modal_noLogs_description()]),l(o,n)};C(i,o=>{e(b)?.lastLogs?o(a):o(f,-1)})}B(r),l(t,r)};C(Z,t=>{e(k)==="script"?t(tt):t(et,-1)})}B(A),l(x,A);var rt=N(X);return E(),rt}var $t=v('<div class="h-full min-h-0 min-w-0 max-w-full overflow-hidden p-4" data-testid="hook-script-panel"><!></div>');function yt(x,c){if(new.target)return F({component:yt,...x});K(c,!0);let g=q(c,"tab",7),w=q(c,"workspaceId",7);var E={get tab(){return g()},set tab(d){g(d),R()},get workspaceId(){return w()},set workspaceId(d){w(d),R()},$set:G,$on:(d,$)=>J(c,d,$)},s=$t(),I=T(s);{let d=u(()=>g().workspaceId??w()),$=u(()=>g().hookId??"");Q(I,{get workspaceId(){return e(d)},get hookId(){return e($)}})}return B(s),l(x,s),N(E)}export{yt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as T}from"./CXgisfCc.js";import{a as b}from"./BJzHxIyr.js";import{y as M}from"./L8URHs0O.js";import{Hi as n,Co as v,BT as E,g as y,tM as _,to as C,Bb as D,Bt as O,Do as H,Bf as L}from"./CM_x_DK5.js";import{aX as f}from"./BtwWpYbv.js";import{d as P}from"./B0Z-1lwJ.js";import{n as R}from"./
|
|
1
|
+
import{C as T}from"./CXgisfCc.js";import{a as b}from"./BJzHxIyr.js";import{y as M}from"./L8URHs0O.js";import{Hi as n,Co as v,BT as E,g as y,tM as _,to as C,Bb as D,Bt as O,Do as H,Bf as L}from"./CM_x_DK5.js";import{aX as f}from"./BtwWpYbv.js";import{d as P}from"./B0Z-1lwJ.js";import{n as R}from"./T3bfkv-Z.js";import{o as B,e as x}from"./Dh58itL6.js";const p=new b("OpenMessage"),S=150,k=15e3,W=2,q=[150,400,800,1500,3e3],F=T;let g;function A(e){return new Promise(t=>setTimeout(t,e))}function m(e,t){const s=n.state,o=s.agentSessions?.byAgentId[e]?.messages,a=s.agentSessions?.historySegmentsByAgentId?.[e]?.messages;return!!(o?.some(i=>i.id===t)||a?.some(i=>i.id===t))}function N(e){return n.state.chatState?.byAgentId[e]?.transcriptHydration}async function G(e,t,s){const o=Date.now()+k;let a=0;for(;Date.now()<o;){if(s.aborted)return!1;if(m(e,t))return!0;if(a>=W&&N(e)==="settled"&&!f.select(n.state,e).initialHistoryPending)return!1;a++,await A(S)}return!s.aborted&&m(e,t)}async function Y(e,t,s,o){const a=Date.now()+k;for(;f.select(n.state,e).initialHistoryPending;){if(o?.aborted||Date.now()>=a)return!1;await A(S)}const i=n.state.agentSessions?.byAgentId[e];if(!i||o?.aborted)return!1;if(m(e,t))return!0;s??=i.workspaceId;const d=f.select(n.state,e);let c={nextToken:d.scrollbackOlderToken,prevToken:d.scrollbackGapToken};n.dispatch(D(e,"seek"));const l=f.select(n.state,e).scrollbackDiscardEpoch,u=()=>!!n.state.agentSessions?.byAgentId[e]&&f.select(n.state,e).scrollbackDiscardEpoch===l;try{const r=await M.agents.getConversation(e,F,void 0,t,void 0,s);return o?.aborted||!u()||!r.messages.some(w=>w.id===t)?!1:(n.dispatch(O(e,r.messages,r.messages[0]?.seq)),r.nextToken===null&&n.dispatch(H(e)),c={nextToken:r.nextToken,prevToken:r.prevToken},m(e,t))}catch(r){return p.warn("[seekConversationToMessage] Seek fetch failed (message may no longer exist)",{agentId:e,messageId:t,error:r}),!1}finally{u()&&n.dispatch(L(e,c))}}async function z(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:o,messageId:a,query:i,targetTabId:d}=e;p.info("[openMessage] Deep-opening conversation at message",{workspaceId:s,agentId:o,messageId:a});const c=s===y;c&&!e.contentAlreadyOpen&&(n.dispatch(v(o)),n.dispatch(E(y,o)),n.dispatch(_("chief")));const l=c?"/":x(s);if(!e.contentAlreadyOpen&&typeof window<"u"&&window.location.pathname!==l){try{c?await R(l):await B(s)}catch(h){p.warn("[openMessage] Workspace navigation failed",{workspaceId:s,error:h});return}if(t.aborted)return;if(window.location.pathname!==l){p.warn("[openMessage] Workspace navigation was not confirmed",{workspaceId:s});return}}!e.contentAlreadyOpen&&!c&&n.dispatch(C(s,{agentId:o}));const u=await G(o,a,t)?!0:await Y(o,a,s,t);if(t.aborted)return;if(!u){p.warn("[openMessage] Message not found; conversation opened at tail",{agentId:o,messageId:a});return}const r=`open-message-${Date.now()}-${Math.random().toString(36).slice(2)}`,w={agentId:o,messageId:a,query:i,targetTabId:d,requestId:r,signal:t};for(const h of q)setTimeout(()=>{t.aborted||P("chat:open-message",w)},h)}export{z as openMessage,Y as seekConversationToMessage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as r,a as s,c as e,C as t}from"./
|
|
1
|
+
import{s as r,a as s,c as e,C as t}from"./PNb0FkcG.js";import{f as l}from"./BC_OV_w3.js";var d={parser:e,get db(){return new t},renderer:s,styles:r,init:l(a=>{a.class||(a.class={}),a.class.arrowMarkerAbsolute=a.arrowMarkerAbsolute},"init")};export{d as diagram};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as o}from"./
|
|
1
|
+
import{f as o}from"./BC_OV_w3.js";var c=1;function i(){if(!(typeof globalThis>"u"))return globalThis}o(i,"getCaptureGlobal");function p(){return!!i()?.mermaidCaptureSizes}o(p,"shouldCaptureSizes");function u(){return typeof location>"u"?"browser-dev":`${location.pathname}${location.search}`}o(u,"capturedFromLocation");function d(n,r){const t=i();if(!t)return;const e=r.node(),s=((e&&"ownerSVGElement"in e?e.ownerSVGElement:null)??e)?.id??"(unknown)";t.mermaidCapturedSizes??=[];const a={svgId:s,sizes:n};t.mermaidCapturedSizes.push(a),t.mermaidLastCapturedSizes=a}o(d,"emitCapturedSizes");function m(n,r){const t=[];for(const e of r.nodes)e.isGroup||t.push({id:e.id,width:e.width??0,height:e.height??0});t.length!==0&&d({metadata:{captureVersion:c,capturedAt:new Date().toISOString(),capturedFrom:u()},nodes:t},n)}o(m,"captureNodeSizes");export{m as captureNodeSizes,p as shouldCaptureSizes};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as ue,bq as b,a_ as I,by as fe,b as pe,bo as y}from"./rfbsWJY8.js";import{bs as ge,a7 as X,ay as E,W as _,bn as ve,aA as m,a5 as V,aD as e,bS as j,bl as Z,b_ as z,bO as ee,bA as G,aB as P,bf as be,c9 as i}from"./B8o4lNgr.js";import{h as _e,k as N,s as f,l as O}from"./Z4aRP2F9.js";import{F as me,bo as he,bn as xe}from"./DPDCKuA3.js";import{f as ye,am as ke}from"./_hjrl4Qq.js";import{s as Se}from"./
|
|
1
|
+
import{t as ue,bq as b,a_ as I,by as fe,b as pe,bo as y}from"./rfbsWJY8.js";import{bs as ge,a7 as X,ay as E,W as _,bn as ve,aA as m,a5 as V,aD as e,bS as j,bl as Z,b_ as z,bO as ee,bA as G,aB as P,bf as be,c9 as i}from"./B8o4lNgr.js";import{h as _e,k as N,s as f,l as O}from"./Z4aRP2F9.js";import{F as me,bo as he,bn as xe}from"./DPDCKuA3.js";import{f as ye,am as ke}from"./_hjrl4Qq.js";import{s as Se}from"./Bu9lZqPK.js";import{t as H}from"./DVqY3xlL.js";import{a as te,p as we,b as ze,d as Pe}from"./B4k80c64.js";var $e=P('<span aria-hidden="true"></span>'),Ie=P('<span class="absolute -right-0.5 -bottom-0.5 inline-flex items-center justify-center rounded-full bg-background text-foreground" aria-hidden="true"><!></span>'),Me=P('<span><span data-presence-avatar-tile=""><!></span> <!> <!></span>'),Ae=P('<!> <span class="sr-only"> </span>',1),Ce=P('<span class="inline-flex shrink-0 items-center justify-center rounded-full border border-background bg-muted px-1 font-medium leading-none text-muted-foreground"> </span>'),Le=P('<span role="group" data-presence-avatar-stack=""><!> <!></span>');function Ve(J,u){if(new.target)return ue({component:Ve,...J});ge(u,!0);const R=(t,a=be)=>{const k=i(()=>Pe(a())),L=i(()=>a().online===!1);var d=Me();let l;var r=V(d);let v;var $=V(r);{let n=i(()=>ze(a()));Se($,{fill:!0,get avatarUrl(){return a().avatarUrl},get label(){return e(n)}})}G(r);var S=j(r,2);{var D=n=>{var s=$e();z(()=>{N(s,1,`absolute -right-0.5 -top-0.5 h-1.5 w-1.5 rounded-full border border-background ${a().online?"bg-success":"bg-muted-foreground"}`),f(s,"data-presence-status",a().online?"online":"offline")}),_(n,s)};I(S,n=>{o()==="stack"&&a().hostRole&&a().online!==void 0&&n(D)})}var Y=j(S,2);{var c=n=>{var s=Ie();let h;var w=V(s);{let x=i(()=>a().identity.provider==="gitlab"?he:xe);me(w,{get icon(){return e(x)}})}G(s),z(x=>{f(s,"data-presence-identity-provider",a().identity.provider),f(s,"data-presence-identity-host",a().identity.host),h=O(s,"",h,{width:`${e(q)??""}px`,height:`${e(q)??""}px`,"font-size":x})},[()=>`${Math.round(e(q)*.8)}px`]),_(n,s)};I(Y,n=>{o()==="stack"&&a().identity&&n(c)})}G(d),z(n=>{N(d,1,`relative inline-flex shrink-0 rounded-full border ${o()==="tile"?"border-border":`border-background ${e(k)?ne[e(k)]:""}`}`),f(d,"data-presence-avatar",a().principalId),f(d,"data-presence-ring",o()==="stack"?e(k)??void 0:void 0),f(d,"data-presence-offline",e(L)||void 0),f(d,"data-presence-self",a().self||void 0),l=O(d,"",l,{width:`${g()??""}px`,height:`${g()??""}px`}),N(r,1,`inline-flex h-full w-full items-center justify-center overflow-hidden rounded-full font-medium leading-none ${o()==="tile"?"bg-muted text-muted-foreground":"text-primary-foreground"} ${e(L)||o()==="tile"&&a().viewing===!1?"grayscale":""}`),v=O(r,"",v,{"font-size":e(K),"background-color":n})},[()=>o()==="stack"?we(a().principalId):void 0]),_(t,d)};let p=b(u,"people",7),M=b(u,"maxVisible",7,3),g=b(u,"size",7,16),o=b(u,"variant",7,"stack"),A=b(u,"side",7,"bottom"),B=b(u,"decorative",7,!1),C=b(u,"action",7),F=b(u,"class",7,"");const ae=i(()=>p().slice(0,M())),T=i(()=>Math.max(0,p().length-M())),U=i(()=>p().filter(t=>!t.self&&t.online!==!1).length),W=i(()=>p().filter(t=>!t.self&&t.online===!1).length),re=i(()=>e(U)===1?y.presence_avatarStack_people_one():e(U)>1?y.presence_avatarStack_people_many({count:H(e(U))}):e(W)===0?y.presence_avatarStack_onlyYou_label():e(W)===1?y.presence_avatarStack_offline_one():y.presence_avatarStack_offline_many({count:H(e(W))})),K=i(()=>`${Math.max(8,Math.round(g()*.55))}px`),q=i(()=>Math.max(9,Math.round(g()*.5))),ne={owner:"ring-2 ring-info",member:"ring-2 ring-success",guest:"ring-2 ring-warning-ink",offline:"ring-2 ring-muted-foreground/40"};var se={get people(){return p()},set people(t){p(t),m()},get maxVisible(){return M()},set maxVisible(t=3){M(t),m()},get size(){return g()},set size(t=16){g(t),m()},get variant(){return o()},set variant(t="stack"){o(t),m()},get side(){return A()},set side(t="bottom"){A(t),m()},get decorative(){return B()},set decorative(t=!1){B(t),m()},get action(){return C()},set action(t){C(t),m()},get class(){return F()},set class(t=""){F(t),m()},$set:fe,$on:(t,a)=>pe(u,t,a)},Q=X(),ie=E(Q);{var le=t=>{var a=Le(),k=V(a);_e(k,17,()=>e(ae),l=>l.principalId,(l,r)=>{var v=X(),$=E(v);{var S=c=>{const n=i(()=>{const{label:s,onSelect:h}=C()(e(r));return{personLabel:s,onSelect:h}});{let s=i(()=>e(n).onSelect?void 0:!0),h=i(()=>e(n).onSelect??void 0);ye(c,{variant:"plain",wrapContent:!1,class:"h-auto rounded-full p-0 aria-disabled:opacity-100",get tooltip(){return e(n).personLabel},get tooltipSide(){return A()},get"aria-label"(){return e(n).personLabel},get"aria-disabled"(){return e(s)},get onclick(){return e(h)},get"data-presence-person-button"(){return e(r).principalId},children:(w,x)=>{R(w,()=>e(r))},$$slots:{default:!0}})}},D=c=>{R(c,()=>e(r))},Y=c=>{{let n=i(()=>te(e(r)));ke(c,{get content(){return e(n)},get side(){return A()},children:(s,h)=>{var w=Ae(),x=E(w);R(x,()=>e(r));var oe=j(x,2),de=Z(oe,!0);z(ce=>ee(de,ce),[()=>te(e(r))]),_(s,w)},$$slots:{default:!0}})}};I($,c=>{C()?c(S):B()?c(D,1):c(Y,-1)})}_(l,v)});var L=j(k,2);{var d=l=>{var r=Ce();let v;var $=Z(r,!0);z(S=>{f(r,"data-presence-overflow",e(T)),v=O(r,"",v,{"min-width":`${g()??""}px`,height:`${g()??""}px`,"font-size":e(K)}),ee($,S)},[()=>y.presence_avatarStack_more_label({count:H(e(T))})]),_(l,r)};I(L,l=>{e(T)>0&&l(d)})}G(a),z(l=>{N(a,1,`inline-flex items-center ${o()==="tile"?"flex-wrap gap-1.25":"-space-x-1"} ${F()??""}`),f(a,"aria-label",l),f(a,"data-presence-count",p().length)},[()=>o()==="tile"?y.workspace_peopleTile_title():e(re)]),_(t,a)};I(ie,t=>{p().length>0&&t(le)})}return _(J,Q),ve(se)}export{Ve as P};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{aK as ke,c6 as ye,aP as ge,c9 as ve,aL as pe,c7 as xe,f as l,aO as dt,c3 as pt,a6 as Te,av as U,bC as ot,a4 as be,aA as we,a0 as _e,cx as De}from"./fotZrDMM.js";import{g as Et}from"./BJzHxIyr.js";import{t as Se,d as Ce,m as Ee,i as Me,a as Ie,f as Gt,l as jt,o as Ye,n as $e,g as Fe,p as Le,r as Ae,q as Oe,k as We,e as Xt,h as Ut,j as Zt,s as Qt,c as Kt,b as Pe}from"./Bj8ymBdJ.js";import{l as Re}from"./BU7Z2EF0.js";var xt={exports:{}},Ve=xt.exports,Jt;function Ne(){return Jt||(Jt=1,(function(t,r){(function(i,e){t.exports=e()})(Ve,(function(){var i="day";return function(e,a,g){var v=function(L){return L.add(4-L.isoWeekday(),i)},b=a.prototype;b.isoWeekYear=function(){return v(this).year()},b.isoWeek=function(L){if(!this.$utils().u(L))return this.add(7*(L-this.isoWeek()),i);var w,P,A,V,j=v(this),z=(w=this.isoWeekYear(),P=this.$u,A=(P?g.utc:g)().year(w).startOf("year"),V=4-A.isoWeekday(),A.isoWeekday()>4&&(V+=7),A.add(V,i));return j.diff(z,"week")+1},b.isoWeekday=function(L){return this.$utils().u(L)?this.day()||7:this.day(this.day()%7?L:L-7)};var F=b.startOf;b.startOf=function(L,w){var P=this.$utils(),A=!!P.u(w)||w;return P.p(L)==="isoweek"?A?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):F.bind(this)(L,w)}}}))})(xt)),xt.exports}var ze=Ne();const He=Et(ze);var Tt={exports:{}},Be=Tt.exports,te;function qe(){return te||(te=1,(function(t,r){(function(i,e){t.exports=e()})(Be,(function(){var i={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},e=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,a=/\d/,g=/\d\d/,v=/\d\d?/,b=/\d*[^-_:/,()\s\d]+/,F={},L=function(k){return(k=+k)+(k>68?1900:2e3)},w=function(k){return function(M){this[k]=+M}},P=[/[+-]\d\d:?(\d\d)?|Z/,function(k){(this.zone||(this.zone={})).offset=(function(M){if(!M||M==="Z")return 0;var O=M.match(/([+-]|\d\d)/g),$=60*O[1]+(+O[2]||0);return $===0?0:O[0]==="+"?-$:$})(k)}],A=function(k){var M=F[k];return M&&(M.indexOf?M:M.s.concat(M.f))},V=function(k,M){var O,$=F.meridiem;if($){for(var X=1;X<=24;X+=1)if(k.indexOf($(X,0,M))>-1){O=X>12;break}}else O=k===(M?"pm":"PM");return O},j={A:[b,function(k){this.afternoon=V(k,!1)}],a:[b,function(k){this.afternoon=V(k,!0)}],Q:[a,function(k){this.month=3*(k-1)+1}],S:[a,function(k){this.milliseconds=100*+k}],SS:[g,function(k){this.milliseconds=10*+k}],SSS:[/\d{3}/,function(k){this.milliseconds=+k}],s:[v,w("seconds")],ss:[v,w("seconds")],m:[v,w("minutes")],mm:[v,w("minutes")],H:[v,w("hours")],h:[v,w("hours")],HH:[v,w("hours")],hh:[v,w("hours")],D:[v,w("day")],DD:[g,w("day")],Do:[b,function(k){var M=F.ordinal,O=k.match(/\d+/);if(this.day=O[0],M)for(var $=1;$<=31;$+=1)M($).replace(/\[|\]/g,"")===k&&(this.day=$)}],w:[v,w("week")],ww:[g,w("week")],M:[v,w("month")],MM:[g,w("month")],MMM:[b,function(k){var M=A("months"),O=(A("monthsShort")||M.map((function($){return $.slice(0,3)}))).indexOf(k)+1;if(O<1)throw new Error;this.month=O%12||O}],MMMM:[b,function(k){var M=A("months").indexOf(k)+1;if(M<1)throw new Error;this.month=M%12||M}],Y:[/[+-]?\d+/,w("year")],YY:[g,function(k){this.year=L(k)}],YYYY:[/\d{4}/,w("year")],Z:P,ZZ:P};function z(k){var M,O;M=k,O=F&&F.formats;for(var $=(k=M.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(m,x,p){var y=p&&p.toUpperCase();return x||O[p]||i[p]||O[y].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(n,d,f){return d||f.slice(1)}))}))).match(e),X=$.length,B=0;B<X;B+=1){var Y=$[B],T=j[Y],h=T&&T[0],I=T&&T[1];$[B]=I?{regex:h,parser:I}:Y.replace(/^\[|\]$/g,"")}return function(m){for(var x={},p=0,y=0;p<X;p+=1){var n=$[p];if(typeof n=="string")y+=n.length;else{var d=n.regex,f=n.parser,u=m.slice(y),_=d.exec(u)[0];f.call(x,_),m=m.replace(_,"")}}return(function(s){var D=s.afternoon;if(D!==void 0){var o=s.hours;D?o<12&&(s.hours+=12):o===12&&(s.hours=0),delete s.afternoon}})(x),x}}return function(k,M,O){O.p.customParseFormat=!0,k&&k.parseTwoDigitYear&&(L=k.parseTwoDigitYear);var $=M.prototype,X=$.parse;$.parse=function(B){var Y=B.date,T=B.utc,h=B.args;this.$u=T;var I=h[1];if(typeof I=="string"){var m=h[2]===!0,x=h[3]===!0,p=m||x,y=h[2];x&&(y=h[2]),F=this.$locale(),!m&&y&&(F=O.Ls[y]),this.$d=(function(u,_,s,D){try{if(["x","X"].indexOf(_)>-1)return new Date((_==="X"?1e3:1)*u);var o=z(_)(u),H=o.year,c=o.month,S=o.day,C=o.hours,R=o.minutes,E=o.seconds,N=o.milliseconds,W=o.zone,rt=o.week,nt=new Date,yt=S||(H||c?1:nt.getDate()),lt=H||nt.getFullYear(),q=0;H&&!c||(q=c>0?c-1:nt.getMonth());var K,Z=C||0,at=R||0,J=E||0,it=N||0;return W?new Date(Date.UTC(lt,q,yt,Z,at,J,it+60*W.offset*1e3)):s?new Date(Date.UTC(lt,q,yt,Z,at,J,it)):(K=new Date(lt,q,yt,Z,at,J,it),rt&&(K=D(K).week(rt).toDate()),K)}catch{return new Date("")}})(Y,I,T,O),this.init(),y&&y!==!0&&(this.$L=this.locale(y).$L),p&&Y!=this.format(I)&&(this.$d=new Date("")),F={}}else if(I instanceof Array)for(var n=I.length,d=1;d<=n;d+=1){h[1]=I[d-1];var f=O.apply(this,h);if(f.isValid()){this.$d=f.$d,this.$L=f.$L,this.init();break}d===n&&(this.$d=new Date(""))}else X.call(this,B)}}}))})(Tt)),Tt.exports}var Ge=qe();const je=Et(Ge);var bt={exports:{}},Xe=bt.exports,ee;function Ue(){return ee||(ee=1,(function(t,r){(function(i,e){t.exports=e()})(Xe,(function(){return function(i,e){var a=e.prototype,g=a.format;a.format=function(v){var b=this,F=this.$locale();if(!this.isValid())return g.bind(this)(v);var L=this.$utils(),w=(v||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(P){switch(P){case"Q":return Math.ceil((b.$M+1)/3);case"Do":return F.ordinal(b.$D);case"gggg":return b.weekYear();case"GGGG":return b.isoWeekYear();case"wo":return F.ordinal(b.week(),"W");case"w":case"ww":return L.s(b.week(),P==="w"?1:2,"0");case"W":case"WW":return L.s(b.isoWeek(),P==="W"?1:2,"0");case"k":case"kk":return L.s(String(b.$H===0?24:b.$H),P==="k"?1:2,"0");case"X":return Math.floor(b.$d.getTime()/1e3);case"x":return b.$d.getTime();case"z":return"["+b.offsetName()+"]";case"zzz":return"["+b.offsetName("long")+"]";default:return P}}));return g.bind(this)(w)}}}))})(bt)),bt.exports}var Ze=Ue();const Qe=Et(Ze);var wt={exports:{}},Ke=wt.exports,se;function Je(){return se||(se=1,(function(t,r){(function(i,e){t.exports=e()})(Ke,(function(){var i,e,a=1e3,g=6e4,v=36e5,b=864e5,F=31536e6,L=2628e6,w=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,P=/\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g,A={years:F,months:L,days:b,hours:v,minutes:g,seconds:a,milliseconds:1,weeks:6048e5},V=function(Y){return Y instanceof X},j=function(Y,T,h){return new X(Y,h,T.$l)},z=function(Y){return e.p(Y)+"s"},k=function(Y){return Y<0},M=function(Y){return k(Y)?Math.ceil(Y):Math.floor(Y)},O=function(Y){return Math.abs(Y)},$=function(Y,T){return Y?k(Y)?{negative:!0,format:""+O(Y)+T}:{negative:!1,format:""+Y+T}:{negative:!1,format:""}},X=(function(){function Y(h,I,m){var x=this;if(this.$d={},this.$l=m,h===void 0&&(this.$ms=0,this.parseFromMilliseconds()),I)return j(h*A[z(I)],this);if(typeof h=="number")return this.$ms=h,this.parseFromMilliseconds(),this;if(typeof h=="object")return Object.keys(h).forEach((function(n){x.$d[z(n)]=h[n]})),this.calMilliseconds(),this;if(typeof h=="string"){var p=h.match(w);if(p){var y=p.slice(2).map((function(n){return n!=null?Number(n):0}));return this.$d.years=y[0],this.$d.months=y[1],this.$d.weeks=y[2],this.$d.days=y[3],this.$d.hours=y[4],this.$d.minutes=y[5],this.$d.seconds=y[6],this.calMilliseconds(),this}}return this}var T=Y.prototype;return T.calMilliseconds=function(){var h=this;this.$ms=Object.keys(this.$d).reduce((function(I,m){return I+(h.$d[m]||0)*A[m]}),0)},T.parseFromMilliseconds=function(){var h=this.$ms;this.$d.years=M(h/F),h%=F,this.$d.months=M(h/L),h%=L,this.$d.days=M(h/b),h%=b,this.$d.hours=M(h/v),h%=v,this.$d.minutes=M(h/g),h%=g,this.$d.seconds=M(h/a),h%=a,this.$d.milliseconds=h},T.toISOString=function(){var h=$(this.$d.years,"Y"),I=$(this.$d.months,"M"),m=+this.$d.days||0;this.$d.weeks&&(m+=7*this.$d.weeks);var x=$(m,"D"),p=$(this.$d.hours,"H"),y=$(this.$d.minutes,"M"),n=this.$d.seconds||0;this.$d.milliseconds&&(n+=this.$d.milliseconds/1e3,n=Math.round(1e3*n)/1e3);var d=$(n,"S"),f=h.negative||I.negative||x.negative||p.negative||y.negative||d.negative,u=p.format||y.format||d.format?"T":"",_=(f?"-":"")+"P"+h.format+I.format+x.format+u+p.format+y.format+d.format;return _==="P"||_==="-P"?"P0D":_},T.toJSON=function(){return this.toISOString()},T.format=function(h){var I=h||"YYYY-MM-DDTHH:mm:ss",m={Y:this.$d.years,YY:e.s(this.$d.years,2,"0"),YYYY:e.s(this.$d.years,4,"0"),M:this.$d.months,MM:e.s(this.$d.months,2,"0"),D:this.$d.days,DD:e.s(this.$d.days,2,"0"),H:this.$d.hours,HH:e.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:e.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:e.s(this.$d.seconds,2,"0"),SSS:e.s(this.$d.milliseconds,3,"0")};return I.replace(P,(function(x,p){return p||String(m[x])}))},T.as=function(h){return this.$ms/A[z(h)]},T.get=function(h){var I=this.$ms,m=z(h);return m==="milliseconds"?I%=1e3:I=m==="weeks"?M(I/A[m]):this.$d[m],I||0},T.add=function(h,I,m){var x;return x=I?h*A[z(I)]:V(h)?h.$ms:j(h,this).$ms,j(this.$ms+x*(m?-1:1),this)},T.subtract=function(h,I){return this.add(h,I,!0)},T.locale=function(h){var I=this.clone();return I.$l=h,I},T.clone=function(){return j(this.$ms,this)},T.humanize=function(h){return i().add(this.$ms,"ms").locale(this.$l).fromNow(!h)},T.valueOf=function(){return this.asMilliseconds()},T.milliseconds=function(){return this.get("milliseconds")},T.asMilliseconds=function(){return this.as("milliseconds")},T.seconds=function(){return this.get("seconds")},T.asSeconds=function(){return this.as("seconds")},T.minutes=function(){return this.get("minutes")},T.asMinutes=function(){return this.as("minutes")},T.hours=function(){return this.get("hours")},T.asHours=function(){return this.as("hours")},T.days=function(){return this.get("days")},T.asDays=function(){return this.as("days")},T.weeks=function(){return this.get("weeks")},T.asWeeks=function(){return this.as("weeks")},T.months=function(){return this.get("months")},T.asMonths=function(){return this.as("months")},T.years=function(){return this.get("years")},T.asYears=function(){return this.as("years")},Y})(),B=function(Y,T,h){return Y.add(T.years()*h,"y").add(T.months()*h,"M").add(T.days()*h,"d").add(T.hours()*h,"h").add(T.minutes()*h,"m").add(T.seconds()*h,"s").add(T.milliseconds()*h,"ms")};return function(Y,T,h){i=h,e=h().$utils(),h.duration=function(x,p){var y=h.locale();return j(x,{$l:y},p)},h.isDuration=V;var I=T.prototype.add,m=T.prototype.subtract;T.prototype.add=function(x,p){return V(x)?B(this,x,1):I.bind(this)(x,p)},T.prototype.subtract=function(x,p){return V(x)?B(this,x,-1):m.bind(this)(x,p)}}}))})(wt)),wt.exports}var ts=Je();const es=Et(ts);var Yt=(function(){var t=l(function(y,n,d,f){for(d=d||{},f=y.length;f--;d[y[f]]=n);return d},"o"),r=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],i=[1,26],e=[1,27],a=[1,28],g=[1,29],v=[1,30],b=[1,31],F=[1,32],L=[1,33],w=[1,34],P=[1,9],A=[1,10],V=[1,11],j=[1,12],z=[1,13],k=[1,14],M=[1,15],O=[1,16],$=[1,19],X=[1,20],B=[1,21],Y=[1,22],T=[1,23],h=[1,25],I=[1,35],m={trace:l(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:l(function(n,d,f,u,_,s,D){var o=s.length-1;switch(_){case 1:return s[o-1];case 2:this.$=[];break;case 3:s[o-1].push(s[o]),this.$=s[o-1];break;case 4:case 5:this.$=s[o];break;case 6:case 7:this.$=[];break;case 8:u.setWeekday("monday");break;case 9:u.setWeekday("tuesday");break;case 10:u.setWeekday("wednesday");break;case 11:u.setWeekday("thursday");break;case 12:u.setWeekday("friday");break;case 13:u.setWeekday("saturday");break;case 14:u.setWeekday("sunday");break;case 15:u.setWeekend("friday");break;case 16:u.setWeekend("saturday");break;case 17:u.setDateFormat(s[o].substr(11)),this.$=s[o].substr(11);break;case 18:u.enableInclusiveEndDates(),this.$=s[o].substr(18);break;case 19:u.TopAxis(),this.$=s[o].substr(8);break;case 20:u.setAxisFormat(s[o].substr(11)),this.$=s[o].substr(11);break;case 21:u.setTickInterval(s[o].substr(13)),this.$=s[o].substr(13);break;case 22:u.setExcludes(s[o].substr(9)),this.$=s[o].substr(9);break;case 23:u.setIncludes(s[o].substr(9)),this.$=s[o].substr(9);break;case 24:u.setTodayMarker(s[o].substr(12)),this.$=s[o].substr(12);break;case 27:u.setDiagramTitle(s[o].substr(6)),this.$=s[o].substr(6);break;case 28:this.$=s[o].trim(),u.setAccTitle(this.$);break;case 29:case 30:this.$=s[o].trim(),u.setAccDescription(this.$);break;case 31:u.addSection(s[o].substr(8)),this.$=s[o].substr(8);break;case 33:u.addTask(s[o-1],s[o]),this.$="task";break;case 34:this.$=s[o-1],u.setClickEvent(s[o-1],s[o],null);break;case 35:this.$=s[o-2],u.setClickEvent(s[o-2],s[o-1],s[o]);break;case 36:this.$=s[o-2],u.setClickEvent(s[o-2],s[o-1],null),u.setLink(s[o-2],s[o]);break;case 37:this.$=s[o-3],u.setClickEvent(s[o-3],s[o-2],s[o-1]),u.setLink(s[o-3],s[o]);break;case 38:this.$=s[o-2],u.setClickEvent(s[o-2],s[o],null),u.setLink(s[o-2],s[o-1]);break;case 39:this.$=s[o-3],u.setClickEvent(s[o-3],s[o-1],s[o]),u.setLink(s[o-3],s[o-2]);break;case 40:this.$=s[o-1],u.setLink(s[o-1],s[o]);break;case 41:case 47:this.$=s[o-1]+" "+s[o];break;case 42:case 43:case 45:this.$=s[o-2]+" "+s[o-1]+" "+s[o];break;case 44:case 46:this.$=s[o-3]+" "+s[o-2]+" "+s[o-1]+" "+s[o];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(r,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:i,13:e,14:a,15:g,16:v,17:b,18:F,19:18,20:L,21:w,22:P,23:A,24:V,25:j,26:z,27:k,28:M,29:O,30:$,31:X,33:B,35:Y,36:T,37:24,38:h,40:I},t(r,[2,7],{1:[2,1]}),t(r,[2,3]),{9:36,11:17,12:i,13:e,14:a,15:g,16:v,17:b,18:F,19:18,20:L,21:w,22:P,23:A,24:V,25:j,26:z,27:k,28:M,29:O,30:$,31:X,33:B,35:Y,36:T,37:24,38:h,40:I},t(r,[2,5]),t(r,[2,6]),t(r,[2,17]),t(r,[2,18]),t(r,[2,19]),t(r,[2,20]),t(r,[2,21]),t(r,[2,22]),t(r,[2,23]),t(r,[2,24]),t(r,[2,25]),t(r,[2,26]),t(r,[2,27]),{32:[1,37]},{34:[1,38]},t(r,[2,30]),t(r,[2,31]),t(r,[2,32]),{39:[1,39]},t(r,[2,8]),t(r,[2,9]),t(r,[2,10]),t(r,[2,11]),t(r,[2,12]),t(r,[2,13]),t(r,[2,14]),t(r,[2,15]),t(r,[2,16]),{41:[1,40],43:[1,41]},t(r,[2,4]),t(r,[2,28]),t(r,[2,29]),t(r,[2,33]),t(r,[2,34],{42:[1,42],43:[1,43]}),t(r,[2,40],{41:[1,44]}),t(r,[2,35],{43:[1,45]}),t(r,[2,36]),t(r,[2,38],{42:[1,46]}),t(r,[2,37]),t(r,[2,39])],defaultActions:{},parseError:l(function(n,d){if(d.recoverable)this.trace(n);else{var f=new Error(n);throw f.hash=d,f}},"parseError"),parse:l(function(n){var d=this,f=[0],u=[],_=[null],s=[],D=this.table,o="",H=0,c=0,S=2,C=1,R=s.slice.call(arguments,1),E=Object.create(this.lexer),N={yy:{}};for(var W in this.yy)Object.prototype.hasOwnProperty.call(this.yy,W)&&(N.yy[W]=this.yy[W]);E.setInput(n,N.yy),N.yy.lexer=E,N.yy.parser=this,typeof E.yylloc>"u"&&(E.yylloc={});var rt=E.yylloc;s.push(rt);var nt=E.options&&E.options.ranges;typeof N.yy.parseError=="function"?this.parseError=N.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function yt(Q){f.length=f.length-2*Q,_.length=_.length-Q,s.length=s.length-Q}l(yt,"popStack");function lt(){var Q;return Q=u.pop()||E.lex()||C,typeof Q!="number"&&(Q instanceof Array&&(u=Q,Q=u.pop()),Q=d.symbols_[Q]||Q),Q}l(lt,"lex");for(var q,K,Z,at,J={},it,tt,qt,vt;;){if(K=f[f.length-1],this.defaultActions[K]?Z=this.defaultActions[K]:((q===null||typeof q>"u")&&(q=lt()),Z=D[K]&&D[K][q]),typeof Z>"u"||!Z.length||!Z[0]){var Mt="";vt=[];for(it in D[K])this.terminals_[it]&&it>S&&vt.push("'"+this.terminals_[it]+"'");E.showPosition?Mt="Parse error on line "+(H+1)+`:
|
|
1
|
+
import{aK as ke,c6 as ye,aP as ge,c9 as ve,aL as pe,c7 as xe,f as l,aO as dt,c3 as pt,a6 as Te,av as U,bC as ot,a4 as be,aA as we,a0 as _e,cx as De}from"./BC_OV_w3.js";import{g as Et}from"./BJzHxIyr.js";import{t as Se,d as Ce,m as Ee,i as Me,a as Ie,f as Gt,l as jt,o as Ye,n as $e,g as Fe,p as Le,r as Ae,q as Oe,k as We,e as Xt,h as Ut,j as Zt,s as Qt,c as Kt,b as Pe}from"./KgMNo-wX.js";import{l as Re}from"./8SGgBOu4.js";var xt={exports:{}},Ve=xt.exports,Jt;function Ne(){return Jt||(Jt=1,(function(t,r){(function(i,e){t.exports=e()})(Ve,(function(){var i="day";return function(e,a,g){var v=function(L){return L.add(4-L.isoWeekday(),i)},b=a.prototype;b.isoWeekYear=function(){return v(this).year()},b.isoWeek=function(L){if(!this.$utils().u(L))return this.add(7*(L-this.isoWeek()),i);var w,P,A,V,j=v(this),z=(w=this.isoWeekYear(),P=this.$u,A=(P?g.utc:g)().year(w).startOf("year"),V=4-A.isoWeekday(),A.isoWeekday()>4&&(V+=7),A.add(V,i));return j.diff(z,"week")+1},b.isoWeekday=function(L){return this.$utils().u(L)?this.day()||7:this.day(this.day()%7?L:L-7)};var F=b.startOf;b.startOf=function(L,w){var P=this.$utils(),A=!!P.u(w)||w;return P.p(L)==="isoweek"?A?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):F.bind(this)(L,w)}}}))})(xt)),xt.exports}var ze=Ne();const He=Et(ze);var Tt={exports:{}},Be=Tt.exports,te;function qe(){return te||(te=1,(function(t,r){(function(i,e){t.exports=e()})(Be,(function(){var i={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},e=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,a=/\d/,g=/\d\d/,v=/\d\d?/,b=/\d*[^-_:/,()\s\d]+/,F={},L=function(k){return(k=+k)+(k>68?1900:2e3)},w=function(k){return function(M){this[k]=+M}},P=[/[+-]\d\d:?(\d\d)?|Z/,function(k){(this.zone||(this.zone={})).offset=(function(M){if(!M||M==="Z")return 0;var O=M.match(/([+-]|\d\d)/g),$=60*O[1]+(+O[2]||0);return $===0?0:O[0]==="+"?-$:$})(k)}],A=function(k){var M=F[k];return M&&(M.indexOf?M:M.s.concat(M.f))},V=function(k,M){var O,$=F.meridiem;if($){for(var X=1;X<=24;X+=1)if(k.indexOf($(X,0,M))>-1){O=X>12;break}}else O=k===(M?"pm":"PM");return O},j={A:[b,function(k){this.afternoon=V(k,!1)}],a:[b,function(k){this.afternoon=V(k,!0)}],Q:[a,function(k){this.month=3*(k-1)+1}],S:[a,function(k){this.milliseconds=100*+k}],SS:[g,function(k){this.milliseconds=10*+k}],SSS:[/\d{3}/,function(k){this.milliseconds=+k}],s:[v,w("seconds")],ss:[v,w("seconds")],m:[v,w("minutes")],mm:[v,w("minutes")],H:[v,w("hours")],h:[v,w("hours")],HH:[v,w("hours")],hh:[v,w("hours")],D:[v,w("day")],DD:[g,w("day")],Do:[b,function(k){var M=F.ordinal,O=k.match(/\d+/);if(this.day=O[0],M)for(var $=1;$<=31;$+=1)M($).replace(/\[|\]/g,"")===k&&(this.day=$)}],w:[v,w("week")],ww:[g,w("week")],M:[v,w("month")],MM:[g,w("month")],MMM:[b,function(k){var M=A("months"),O=(A("monthsShort")||M.map((function($){return $.slice(0,3)}))).indexOf(k)+1;if(O<1)throw new Error;this.month=O%12||O}],MMMM:[b,function(k){var M=A("months").indexOf(k)+1;if(M<1)throw new Error;this.month=M%12||M}],Y:[/[+-]?\d+/,w("year")],YY:[g,function(k){this.year=L(k)}],YYYY:[/\d{4}/,w("year")],Z:P,ZZ:P};function z(k){var M,O;M=k,O=F&&F.formats;for(var $=(k=M.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(m,x,p){var y=p&&p.toUpperCase();return x||O[p]||i[p]||O[y].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(n,d,f){return d||f.slice(1)}))}))).match(e),X=$.length,B=0;B<X;B+=1){var Y=$[B],T=j[Y],h=T&&T[0],I=T&&T[1];$[B]=I?{regex:h,parser:I}:Y.replace(/^\[|\]$/g,"")}return function(m){for(var x={},p=0,y=0;p<X;p+=1){var n=$[p];if(typeof n=="string")y+=n.length;else{var d=n.regex,f=n.parser,u=m.slice(y),_=d.exec(u)[0];f.call(x,_),m=m.replace(_,"")}}return(function(s){var D=s.afternoon;if(D!==void 0){var o=s.hours;D?o<12&&(s.hours+=12):o===12&&(s.hours=0),delete s.afternoon}})(x),x}}return function(k,M,O){O.p.customParseFormat=!0,k&&k.parseTwoDigitYear&&(L=k.parseTwoDigitYear);var $=M.prototype,X=$.parse;$.parse=function(B){var Y=B.date,T=B.utc,h=B.args;this.$u=T;var I=h[1];if(typeof I=="string"){var m=h[2]===!0,x=h[3]===!0,p=m||x,y=h[2];x&&(y=h[2]),F=this.$locale(),!m&&y&&(F=O.Ls[y]),this.$d=(function(u,_,s,D){try{if(["x","X"].indexOf(_)>-1)return new Date((_==="X"?1e3:1)*u);var o=z(_)(u),H=o.year,c=o.month,S=o.day,C=o.hours,R=o.minutes,E=o.seconds,N=o.milliseconds,W=o.zone,rt=o.week,nt=new Date,yt=S||(H||c?1:nt.getDate()),lt=H||nt.getFullYear(),q=0;H&&!c||(q=c>0?c-1:nt.getMonth());var K,Z=C||0,at=R||0,J=E||0,it=N||0;return W?new Date(Date.UTC(lt,q,yt,Z,at,J,it+60*W.offset*1e3)):s?new Date(Date.UTC(lt,q,yt,Z,at,J,it)):(K=new Date(lt,q,yt,Z,at,J,it),rt&&(K=D(K).week(rt).toDate()),K)}catch{return new Date("")}})(Y,I,T,O),this.init(),y&&y!==!0&&(this.$L=this.locale(y).$L),p&&Y!=this.format(I)&&(this.$d=new Date("")),F={}}else if(I instanceof Array)for(var n=I.length,d=1;d<=n;d+=1){h[1]=I[d-1];var f=O.apply(this,h);if(f.isValid()){this.$d=f.$d,this.$L=f.$L,this.init();break}d===n&&(this.$d=new Date(""))}else X.call(this,B)}}}))})(Tt)),Tt.exports}var Ge=qe();const je=Et(Ge);var bt={exports:{}},Xe=bt.exports,ee;function Ue(){return ee||(ee=1,(function(t,r){(function(i,e){t.exports=e()})(Xe,(function(){return function(i,e){var a=e.prototype,g=a.format;a.format=function(v){var b=this,F=this.$locale();if(!this.isValid())return g.bind(this)(v);var L=this.$utils(),w=(v||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(P){switch(P){case"Q":return Math.ceil((b.$M+1)/3);case"Do":return F.ordinal(b.$D);case"gggg":return b.weekYear();case"GGGG":return b.isoWeekYear();case"wo":return F.ordinal(b.week(),"W");case"w":case"ww":return L.s(b.week(),P==="w"?1:2,"0");case"W":case"WW":return L.s(b.isoWeek(),P==="W"?1:2,"0");case"k":case"kk":return L.s(String(b.$H===0?24:b.$H),P==="k"?1:2,"0");case"X":return Math.floor(b.$d.getTime()/1e3);case"x":return b.$d.getTime();case"z":return"["+b.offsetName()+"]";case"zzz":return"["+b.offsetName("long")+"]";default:return P}}));return g.bind(this)(w)}}}))})(bt)),bt.exports}var Ze=Ue();const Qe=Et(Ze);var wt={exports:{}},Ke=wt.exports,se;function Je(){return se||(se=1,(function(t,r){(function(i,e){t.exports=e()})(Ke,(function(){var i,e,a=1e3,g=6e4,v=36e5,b=864e5,F=31536e6,L=2628e6,w=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,P=/\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g,A={years:F,months:L,days:b,hours:v,minutes:g,seconds:a,milliseconds:1,weeks:6048e5},V=function(Y){return Y instanceof X},j=function(Y,T,h){return new X(Y,h,T.$l)},z=function(Y){return e.p(Y)+"s"},k=function(Y){return Y<0},M=function(Y){return k(Y)?Math.ceil(Y):Math.floor(Y)},O=function(Y){return Math.abs(Y)},$=function(Y,T){return Y?k(Y)?{negative:!0,format:""+O(Y)+T}:{negative:!1,format:""+Y+T}:{negative:!1,format:""}},X=(function(){function Y(h,I,m){var x=this;if(this.$d={},this.$l=m,h===void 0&&(this.$ms=0,this.parseFromMilliseconds()),I)return j(h*A[z(I)],this);if(typeof h=="number")return this.$ms=h,this.parseFromMilliseconds(),this;if(typeof h=="object")return Object.keys(h).forEach((function(n){x.$d[z(n)]=h[n]})),this.calMilliseconds(),this;if(typeof h=="string"){var p=h.match(w);if(p){var y=p.slice(2).map((function(n){return n!=null?Number(n):0}));return this.$d.years=y[0],this.$d.months=y[1],this.$d.weeks=y[2],this.$d.days=y[3],this.$d.hours=y[4],this.$d.minutes=y[5],this.$d.seconds=y[6],this.calMilliseconds(),this}}return this}var T=Y.prototype;return T.calMilliseconds=function(){var h=this;this.$ms=Object.keys(this.$d).reduce((function(I,m){return I+(h.$d[m]||0)*A[m]}),0)},T.parseFromMilliseconds=function(){var h=this.$ms;this.$d.years=M(h/F),h%=F,this.$d.months=M(h/L),h%=L,this.$d.days=M(h/b),h%=b,this.$d.hours=M(h/v),h%=v,this.$d.minutes=M(h/g),h%=g,this.$d.seconds=M(h/a),h%=a,this.$d.milliseconds=h},T.toISOString=function(){var h=$(this.$d.years,"Y"),I=$(this.$d.months,"M"),m=+this.$d.days||0;this.$d.weeks&&(m+=7*this.$d.weeks);var x=$(m,"D"),p=$(this.$d.hours,"H"),y=$(this.$d.minutes,"M"),n=this.$d.seconds||0;this.$d.milliseconds&&(n+=this.$d.milliseconds/1e3,n=Math.round(1e3*n)/1e3);var d=$(n,"S"),f=h.negative||I.negative||x.negative||p.negative||y.negative||d.negative,u=p.format||y.format||d.format?"T":"",_=(f?"-":"")+"P"+h.format+I.format+x.format+u+p.format+y.format+d.format;return _==="P"||_==="-P"?"P0D":_},T.toJSON=function(){return this.toISOString()},T.format=function(h){var I=h||"YYYY-MM-DDTHH:mm:ss",m={Y:this.$d.years,YY:e.s(this.$d.years,2,"0"),YYYY:e.s(this.$d.years,4,"0"),M:this.$d.months,MM:e.s(this.$d.months,2,"0"),D:this.$d.days,DD:e.s(this.$d.days,2,"0"),H:this.$d.hours,HH:e.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:e.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:e.s(this.$d.seconds,2,"0"),SSS:e.s(this.$d.milliseconds,3,"0")};return I.replace(P,(function(x,p){return p||String(m[x])}))},T.as=function(h){return this.$ms/A[z(h)]},T.get=function(h){var I=this.$ms,m=z(h);return m==="milliseconds"?I%=1e3:I=m==="weeks"?M(I/A[m]):this.$d[m],I||0},T.add=function(h,I,m){var x;return x=I?h*A[z(I)]:V(h)?h.$ms:j(h,this).$ms,j(this.$ms+x*(m?-1:1),this)},T.subtract=function(h,I){return this.add(h,I,!0)},T.locale=function(h){var I=this.clone();return I.$l=h,I},T.clone=function(){return j(this.$ms,this)},T.humanize=function(h){return i().add(this.$ms,"ms").locale(this.$l).fromNow(!h)},T.valueOf=function(){return this.asMilliseconds()},T.milliseconds=function(){return this.get("milliseconds")},T.asMilliseconds=function(){return this.as("milliseconds")},T.seconds=function(){return this.get("seconds")},T.asSeconds=function(){return this.as("seconds")},T.minutes=function(){return this.get("minutes")},T.asMinutes=function(){return this.as("minutes")},T.hours=function(){return this.get("hours")},T.asHours=function(){return this.as("hours")},T.days=function(){return this.get("days")},T.asDays=function(){return this.as("days")},T.weeks=function(){return this.get("weeks")},T.asWeeks=function(){return this.as("weeks")},T.months=function(){return this.get("months")},T.asMonths=function(){return this.as("months")},T.years=function(){return this.get("years")},T.asYears=function(){return this.as("years")},Y})(),B=function(Y,T,h){return Y.add(T.years()*h,"y").add(T.months()*h,"M").add(T.days()*h,"d").add(T.hours()*h,"h").add(T.minutes()*h,"m").add(T.seconds()*h,"s").add(T.milliseconds()*h,"ms")};return function(Y,T,h){i=h,e=h().$utils(),h.duration=function(x,p){var y=h.locale();return j(x,{$l:y},p)},h.isDuration=V;var I=T.prototype.add,m=T.prototype.subtract;T.prototype.add=function(x,p){return V(x)?B(this,x,1):I.bind(this)(x,p)},T.prototype.subtract=function(x,p){return V(x)?B(this,x,-1):m.bind(this)(x,p)}}}))})(wt)),wt.exports}var ts=Je();const es=Et(ts);var Yt=(function(){var t=l(function(y,n,d,f){for(d=d||{},f=y.length;f--;d[y[f]]=n);return d},"o"),r=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],i=[1,26],e=[1,27],a=[1,28],g=[1,29],v=[1,30],b=[1,31],F=[1,32],L=[1,33],w=[1,34],P=[1,9],A=[1,10],V=[1,11],j=[1,12],z=[1,13],k=[1,14],M=[1,15],O=[1,16],$=[1,19],X=[1,20],B=[1,21],Y=[1,22],T=[1,23],h=[1,25],I=[1,35],m={trace:l(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:l(function(n,d,f,u,_,s,D){var o=s.length-1;switch(_){case 1:return s[o-1];case 2:this.$=[];break;case 3:s[o-1].push(s[o]),this.$=s[o-1];break;case 4:case 5:this.$=s[o];break;case 6:case 7:this.$=[];break;case 8:u.setWeekday("monday");break;case 9:u.setWeekday("tuesday");break;case 10:u.setWeekday("wednesday");break;case 11:u.setWeekday("thursday");break;case 12:u.setWeekday("friday");break;case 13:u.setWeekday("saturday");break;case 14:u.setWeekday("sunday");break;case 15:u.setWeekend("friday");break;case 16:u.setWeekend("saturday");break;case 17:u.setDateFormat(s[o].substr(11)),this.$=s[o].substr(11);break;case 18:u.enableInclusiveEndDates(),this.$=s[o].substr(18);break;case 19:u.TopAxis(),this.$=s[o].substr(8);break;case 20:u.setAxisFormat(s[o].substr(11)),this.$=s[o].substr(11);break;case 21:u.setTickInterval(s[o].substr(13)),this.$=s[o].substr(13);break;case 22:u.setExcludes(s[o].substr(9)),this.$=s[o].substr(9);break;case 23:u.setIncludes(s[o].substr(9)),this.$=s[o].substr(9);break;case 24:u.setTodayMarker(s[o].substr(12)),this.$=s[o].substr(12);break;case 27:u.setDiagramTitle(s[o].substr(6)),this.$=s[o].substr(6);break;case 28:this.$=s[o].trim(),u.setAccTitle(this.$);break;case 29:case 30:this.$=s[o].trim(),u.setAccDescription(this.$);break;case 31:u.addSection(s[o].substr(8)),this.$=s[o].substr(8);break;case 33:u.addTask(s[o-1],s[o]),this.$="task";break;case 34:this.$=s[o-1],u.setClickEvent(s[o-1],s[o],null);break;case 35:this.$=s[o-2],u.setClickEvent(s[o-2],s[o-1],s[o]);break;case 36:this.$=s[o-2],u.setClickEvent(s[o-2],s[o-1],null),u.setLink(s[o-2],s[o]);break;case 37:this.$=s[o-3],u.setClickEvent(s[o-3],s[o-2],s[o-1]),u.setLink(s[o-3],s[o]);break;case 38:this.$=s[o-2],u.setClickEvent(s[o-2],s[o],null),u.setLink(s[o-2],s[o-1]);break;case 39:this.$=s[o-3],u.setClickEvent(s[o-3],s[o-1],s[o]),u.setLink(s[o-3],s[o-2]);break;case 40:this.$=s[o-1],u.setLink(s[o-1],s[o]);break;case 41:case 47:this.$=s[o-1]+" "+s[o];break;case 42:case 43:case 45:this.$=s[o-2]+" "+s[o-1]+" "+s[o];break;case 44:case 46:this.$=s[o-3]+" "+s[o-2]+" "+s[o-1]+" "+s[o];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(r,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:i,13:e,14:a,15:g,16:v,17:b,18:F,19:18,20:L,21:w,22:P,23:A,24:V,25:j,26:z,27:k,28:M,29:O,30:$,31:X,33:B,35:Y,36:T,37:24,38:h,40:I},t(r,[2,7],{1:[2,1]}),t(r,[2,3]),{9:36,11:17,12:i,13:e,14:a,15:g,16:v,17:b,18:F,19:18,20:L,21:w,22:P,23:A,24:V,25:j,26:z,27:k,28:M,29:O,30:$,31:X,33:B,35:Y,36:T,37:24,38:h,40:I},t(r,[2,5]),t(r,[2,6]),t(r,[2,17]),t(r,[2,18]),t(r,[2,19]),t(r,[2,20]),t(r,[2,21]),t(r,[2,22]),t(r,[2,23]),t(r,[2,24]),t(r,[2,25]),t(r,[2,26]),t(r,[2,27]),{32:[1,37]},{34:[1,38]},t(r,[2,30]),t(r,[2,31]),t(r,[2,32]),{39:[1,39]},t(r,[2,8]),t(r,[2,9]),t(r,[2,10]),t(r,[2,11]),t(r,[2,12]),t(r,[2,13]),t(r,[2,14]),t(r,[2,15]),t(r,[2,16]),{41:[1,40],43:[1,41]},t(r,[2,4]),t(r,[2,28]),t(r,[2,29]),t(r,[2,33]),t(r,[2,34],{42:[1,42],43:[1,43]}),t(r,[2,40],{41:[1,44]}),t(r,[2,35],{43:[1,45]}),t(r,[2,36]),t(r,[2,38],{42:[1,46]}),t(r,[2,37]),t(r,[2,39])],defaultActions:{},parseError:l(function(n,d){if(d.recoverable)this.trace(n);else{var f=new Error(n);throw f.hash=d,f}},"parseError"),parse:l(function(n){var d=this,f=[0],u=[],_=[null],s=[],D=this.table,o="",H=0,c=0,S=2,C=1,R=s.slice.call(arguments,1),E=Object.create(this.lexer),N={yy:{}};for(var W in this.yy)Object.prototype.hasOwnProperty.call(this.yy,W)&&(N.yy[W]=this.yy[W]);E.setInput(n,N.yy),N.yy.lexer=E,N.yy.parser=this,typeof E.yylloc>"u"&&(E.yylloc={});var rt=E.yylloc;s.push(rt);var nt=E.options&&E.options.ranges;typeof N.yy.parseError=="function"?this.parseError=N.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function yt(Q){f.length=f.length-2*Q,_.length=_.length-Q,s.length=s.length-Q}l(yt,"popStack");function lt(){var Q;return Q=u.pop()||E.lex()||C,typeof Q!="number"&&(Q instanceof Array&&(u=Q,Q=u.pop()),Q=d.symbols_[Q]||Q),Q}l(lt,"lex");for(var q,K,Z,at,J={},it,tt,qt,vt;;){if(K=f[f.length-1],this.defaultActions[K]?Z=this.defaultActions[K]:((q===null||typeof q>"u")&&(q=lt()),Z=D[K]&&D[K][q]),typeof Z>"u"||!Z.length||!Z[0]){var Mt="";vt=[];for(it in D[K])this.terminals_[it]&&it>S&&vt.push("'"+this.terminals_[it]+"'");E.showPosition?Mt="Parse error on line "+(H+1)+`:
|
|
2
2
|
`+E.showPosition()+`
|
|
3
3
|
Expecting `+vt.join(", ")+", got '"+(this.terminals_[q]||q)+"'":Mt="Parse error on line "+(H+1)+": Unexpected "+(q==C?"end of input":"'"+(this.terminals_[q]||q)+"'"),this.parseError(Mt,{text:E.match,token:this.terminals_[q]||q,line:E.yylineno,loc:rt,expected:vt})}if(Z[0]instanceof Array&&Z.length>1)throw new Error("Parse Error: multiple actions possible at state: "+K+", token: "+q);switch(Z[0]){case 1:f.push(q),_.push(E.yytext),s.push(E.yylloc),f.push(Z[1]),q=null,c=E.yyleng,o=E.yytext,H=E.yylineno,rt=E.yylloc;break;case 2:if(tt=this.productions_[Z[1]][1],J.$=_[_.length-tt],J._$={first_line:s[s.length-(tt||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(tt||1)].first_column,last_column:s[s.length-1].last_column},nt&&(J._$.range=[s[s.length-(tt||1)].range[0],s[s.length-1].range[1]]),at=this.performAction.apply(J,[o,c,H,N.yy,Z[1],_,s].concat(R)),typeof at<"u")return at;tt&&(f=f.slice(0,-1*tt*2),_=_.slice(0,-1*tt),s=s.slice(0,-1*tt)),f.push(this.productions_[Z[1]][0]),_.push(J.$),s.push(J._$),qt=D[f[f.length-2]][f[f.length-1]],f.push(qt);break;case 3:return!0}}return!0},"parse")},x=(function(){var y={EOF:1,parseError:l(function(d,f){if(this.yy.parser)this.yy.parser.parseError(d,f);else throw new Error(d)},"parseError"),setInput:l(function(n,d){return this.yy=d||this.yy||{},this._input=n,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:l(function(){var n=this._input[0];this.yytext+=n,this.yyleng++,this.offset++,this.match+=n,this.matched+=n;var d=n.match(/(?:\r\n?|\n).*/g);return d?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),n},"input"),unput:l(function(n){var d=n.length,f=n.split(/(?:\r\n?|\n)/g);this._input=n+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-d),this.offset-=d;var u=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),f.length-1&&(this.yylineno-=f.length-1);var _=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:f?(f.length===u.length?this.yylloc.first_column:0)+u[u.length-f.length].length-f[0].length:this.yylloc.first_column-d},this.options.ranges&&(this.yylloc.range=[_[0],_[0]+this.yyleng-d]),this.yyleng=this.yytext.length,this},"unput"),more:l(function(){return this._more=!0,this},"more"),reject:l(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:l(function(n){this.unput(this.match.slice(n))},"less"),pastInput:l(function(){var n=this.matched.substr(0,this.matched.length-this.match.length);return(n.length>20?"...":"")+n.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:l(function(){var n=this.match;return n.length<20&&(n+=this._input.substr(0,20-n.length)),(n.substr(0,20)+(n.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:l(function(){var n=this.pastInput(),d=new Array(n.length+1).join("-");return n+this.upcomingInput()+`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as r,a as s,c as e,C as t}from"./
|
|
1
|
+
import{s as r,a as s,c as e,C as t}from"./DY2NSWQA.js";import{a as i}from"./C5VEh5uc.js";import"./BC_OV_w3.js";import"./BqNKVfCm.js";var u={parser:e,get db(){return new t},renderer:s,styles:r,init:i(a=>{a.class||(a.class={}),a.class.arrowMarkerAbsolute=a.arrowMarkerAbsolute},"init")};export{u as diagram};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/DXPYZ6rf.js","/app/immutable/chunks/CM_x_DK5.js","/app/immutable/chunks/CjSUqH7t.js","/app/immutable/chunks/B8o4lNgr.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/D5B1sycf.js","/app/immutable/chunks/DVkfuwKw.js","/app/immutable/chunks/CpHIRYx9.js","/app/immutable/chunks/DYvAONpX.js","/app/immutable/chunks/rfbsWJY8.js","/app/immutable/chunks/D5WwA0O_.js","/app/immutable/chunks/DjMZotf0.js","/app/immutable/chunks/CXgisfCc.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{t as Xt,bq as Y,a_ as D,by as Kt,bu as T,bs as Nt,b as Qt,bo as i,_ as Gt}from"./rfbsWJY8.js";import{bs as Jt,ca as A,bH as U,c5 as ft,aD as Z,bj as Yt,a5 as S,bS as p,bA as F,b_ as b,W as h,bn as Zt,cd as tt,bV as _t,c9 as te,aA as et,bl as q,bO as y,ay as vt,aB as k}from"./B8o4lNgr.js";import{k as xt,l as ee}from"./Z4aRP2F9.js";import{b as re}from"./D2g8BuR1.js";import{b as se}from"./Bsxt04FP.js";import{Hi as u,B9 as ae,A$ as ne,A_ as ie,Hc as oe,AM as le,ib as ce,iC as ue}from"./CM_x_DK5.js";import{a as de,T as pe,D as me,L as fe,o as _e}from"./CNUIVnY7.js";import{F as rt,cV as ve,c4 as xe,cR as he}from"./DPDCKuA3.js";import{f as ht}from"./_hjrl4Qq.js";import{n as N}from"./C95Ch7tj.js";import"./DYvAONpX.js";import"./ChTqQfQN.js";import"./DtY788JX.js";import{r as ge}from"./DVM_XdOB.js";import{selectScriptById as st,selectScriptRuntime as be,selectScriptOutput as gt,selectScriptRetainedOutput as ye,selectCanDeleteScript as bt}from"./
|
|
2
|
+
import{t as Xt,bq as Y,a_ as D,by as Kt,bu as T,bs as Nt,b as Qt,bo as i,_ as Gt}from"./rfbsWJY8.js";import{bs as Jt,ca as A,bH as U,c5 as ft,aD as Z,bj as Yt,a5 as S,bS as p,bA as F,b_ as b,W as h,bn as Zt,cd as tt,bV as _t,c9 as te,aA as et,bl as q,bO as y,ay as vt,aB as k}from"./B8o4lNgr.js";import{k as xt,l as ee}from"./Z4aRP2F9.js";import{b as re}from"./D2g8BuR1.js";import{b as se}from"./Bsxt04FP.js";import{Hi as u,B9 as ae,A$ as ne,A_ as ie,Hc as oe,AM as le,ib as ce,iC as ue}from"./CM_x_DK5.js";import{a as de,T as pe,D as me,L as fe,o as _e}from"./CNUIVnY7.js";import{F as rt,cV as ve,c4 as xe,cR as he}from"./DPDCKuA3.js";import{f as ht}from"./_hjrl4Qq.js";import{n as N}from"./C95Ch7tj.js";import"./DYvAONpX.js";import"./ChTqQfQN.js";import"./DtY788JX.js";import{r as ge}from"./DVM_XdOB.js";import{selectScriptById as st,selectScriptRuntime as be,selectScriptOutput as gt,selectScriptRetainedOutput as ye,selectCanDeleteScript as bt}from"./Bm6CXfx7.js";import{g as ke}from"./Bb8-l2NT.js";import{bQ as $e,dF as we,dg as yt}from"./BtwWpYbv.js";import"./D5ofQm_d.js";import"./hnekB-ms.js";import"./pnJ0wUVz.js";import{c as Ae}from"./CuKZEahF.js";var kt=k("<!> ",1),Se=k('<div class="bg-danger-background/20 border-y border-danger/20 px-3 py-1.5 flex items-center justify-between"><div class="flex items-center gap-2 text-sm text-danger font-medium"><div class="w-4 h-4 rounded-full bg-danger-background flex items-center justify-center"><!></div> <span> </span></div> <!></div>'),Fe=k('<pre class="retained-text px-3 pb-3 text-xs svelte-115p4sl"> </pre>'),Ce=k('<p class="px-3 pb-3 text-xs text-muted-foreground" role="status"> </p>'),Oe=k('<details class="retained-output border-b border-border svelte-115p4sl"><summary class="cursor-pointer px-3 py-2 text-xs text-muted-foreground"> </summary> <p class="px-3 pb-2 text-xs text-muted-foreground"> </p> <!></details>'),Re=k('<div class="px-3 py-1 text-xs text-muted-foreground"> </div>'),Ie=k('<code class="text-muted-foreground font-mono text-xs"> </code>'),Le=k('<div class="flex-1 flex items-center justify-center px-4 py-8"><div class="flex items-center gap-3 text-sm"><span class="text-subtle font-mono">$</span> <!> <!></div></div>'),Be=k('<div><!> <!> <!> <!> <div><div class="xterm-output svelte-115p4sl"></div></div></div>');function De(f,m){if(new.target)return Xt({component:De,...f});Jt(m,!0);const H=()=>T(It,"$outputAuthority",O),o=()=>T(St,"$runtime$",O),_=()=>T(Ft,"$output$",O),C=()=>T(Rt,"$codeFontFamilyCSS",O),E=()=>T(Ct,"$retainedOutput$",O),$t=()=>T(Ot,"$hidesAgentLifecycleActions$",O),at=()=>T(At,"$script$",O),[O,wt]=Nt();let $=Y(m,"scriptId",7),v=Y(m,"workspaceId",7),Q=Y(m,"class",7,"");const R=tt(""),P=tt(""),nt=tt("");let G=_t(!1);A(()=>R.set(v())),A(()=>P.set($()));let I,n=null,W=null,V=null,j=null,L=null,z=null;const At=st(R,P),St=be(R,P),Ft=gt(R,P),Ct=ye(R,P,nt),Ot=$e(R),Rt=ke(),It=we(R),it=crypto.randomUUID();A(()=>{const t=v();return $(),()=>{t&&u.dispatch(ae(t,it))}}),A(()=>{const t=v(),e=$(),s=H(),r=o();if(!s||!t||!e)return;r.status,r.startedAt;const l=crypto.randomUUID();return nt.set(l),U(G,ft(()=>_().chunks.length===0),!0),u.dispatch(ne(t,e,l)),()=>u.dispatch(ie(t,e,l))});let X=_t(0);const Lt=te(()=>o().status==="exited"&&o().exitCode!=null&&o().exitCode!==0&&o().exitCode<128);function Bt(){if(!I||n)return;j=new pe(I);const t=j.getCurrentTheme();n=new me({allowProposedApi:!0,fontFamily:C(),fontSize:13,lineHeight:1.2,letterSpacing:0,cursorBlink:!1,cursorStyle:"underline",cursorWidth:1,scrollback:1e4,allowTransparency:!0,convertEol:!0,disableStdin:!0,drawBoldTextInBrightColors:!0,theme:t}),n.attachCustomKeyEventHandler(s=>{const r=s.metaKey||s.ctrlKey;return!(r&&s.key==="`"||r&&s.key==="j"||r&&s.key==="k")}),W=new _e,n.loadAddon(W);const e=new fe((s,r)=>{try{const l=new URL(r);l.hostname==="localhost"||l.hostname==="127.0.0.1"?ge(r).then(g=>{Gt(async()=>{const{getPanelLayoutManager:c}=await import("./DXPYZ6rf.js").then(x=>x.p);return{getPanelLayoutManager:c}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12]),import.meta.url).then(({getPanelLayoutManager:c})=>{c(v()).openBrowserPanel(g.url,void 0,void 0,g.requestedUrl)}).catch(()=>{window.open(g.url,"_blank")})}):window.open(r,"_blank")}catch{window.open(r,"_blank")}});n.loadAddon(e),n.open(I),j.applyTheme(n),z=requestAnimationFrame(()=>{z=null,W?.fit()}),V=new ResizeObserver(()=>{W?.fit()}),V.observe(I),Dt()}function Dt(){if(!n)return;const t=gt.select(u.state,v(),$());t.chunks.length>0&&n.write(t.chunks.map(e=>e.text).join("")),U(X,t.dropped+t.chunks.length)}function ot(){L!==null&&(cancelAnimationFrame(L),L=null),z!==null&&(cancelAnimationFrame(z),z=null),V?.disconnect(),V=null,j?.dispose(),j=null;const t=n;n=null,W=null,U(X,0),t&&de(t)}A(()=>{const t=_(),e=ft(()=>Z(X)),s=t.dropped+t.chunks.length;if(!n||s<=e)return;const r=Math.max(e-t.dropped,0);n.write(t.chunks.slice(r).map(l=>l.text).join("")),U(X,s)}),A(()=>{const t=C();n&&n.options.fontFamily!==t&&(n.options.fontFamily=t)});function Tt(){u.dispatch(oe(v(),$()))}function qt(){if(!v()){N.error(i.terminal_scriptOutput_noWorkspace_error());return}u.dispatch(ce(v(),$(),E()?.text,it))}A(()=>{o().status==="idle"&&_().chunks.length===0&&ot()}),A(()=>{!(o().status==="idle"&&_().chunks.length===0)&&I&&!n&&(L!==null&&cancelAnimationFrame(L),L=requestAnimationFrame(()=>{L=null,Bt()}))}),Yt(()=>{ot()});var Et={get scriptId(){return $()},set scriptId(t){$(t),et()},get workspaceId(){return v()},set workspaceId(t){v(t),et()},get class(){return Q()},set class(t=""){Q(t),et()},$set:Kt,$on:(t,e)=>Qt(m,t,e)},K=Be(),lt=S(K);{var Mt=t=>{var e=Se(),s=S(e),r=S(s),l=S(r);rt(l,{get icon(){return ve},size:"xs"}),F(r);var g=p(r,2),c=q(g,!0);F(s);var x=p(s,2);{var w=a=>{ht(a,{variant:"outline",size:"sm",class:"h-7 text-xs bg-background border border-border text-danger",onclick:qt,children:(d,B)=>{var M=kt(),mt=vt(M);rt(mt,{get icon(){return he},size:"sm",class:"mr-1.5"});var Ht=p(mt);b(Vt=>y(Ht,` ${Vt??""}`),[()=>i.terminal_scriptOutput_askAiToFix_label()]),h(d,M)},$$slots:{default:!0}})};D(x,a=>{$t()||a(w)})}F(e),b(a=>y(c,a),[()=>i.terminal_scriptOutput_buildFailed_label({exitCode:o().exitCode??0})]),h(t,e)};D(lt,t=>{Z(Lt)&&t(Mt)})}var ct=p(lt,2);{var Pt=t=>{var e=Oe(),s=S(e),r=q(s,!0),l=p(s,2),g=q(l,!0),c=p(l,2);{var x=a=>{var d=Fe();let B;var M=q(d,!0);b(()=>{B=ee(d,"",B,{"font-family":C()}),y(M,E().text)}),h(a,d)},w=a=>{var d=Ce(),B=q(d,!0);b(M=>y(B,M),[()=>E().status==="loading"?i.terminal_scriptOutput_retainedLoading_label():i.terminal_scriptOutput_retainedUnavailable_label()]),h(a,d)};D(c,a=>{E().status==="available"?a(x):a(w,-1)})}F(e),b((a,d)=>{y(r,a),y(g,d)},[()=>i.terminal_scriptOutput_retained_label(),()=>i.terminal_scriptOutput_retained_description()]),se("open","toggle",e,a=>U(G,a),()=>Z(G)),h(t,e)};D(ct,t=>{E()&&t(Pt)})}var ut=p(ct,2);{var Wt=t=>{var e=Re(),s=q(e,!0);b(r=>y(s,r),[()=>i.terminal_scriptOutput_live_label()]),h(t,e)};D(ut,t=>{_().chunks.length>0&&E()&&t(Wt)})}var dt=p(ut,2);{var jt=t=>{var e=Le(),s=S(e),r=p(S(s),2);{var l=c=>{var x=Ie(),w=q(x,!0);b(a=>y(w,a),[()=>le(at())]),h(c,x)};D(r,c=>{at()&&c(l)})}var g=p(r,2);ht(g,{variant:"ghost",size:"xs",onclick:Tt,class:"text-muted-foreground hover:text-foreground",children:(c,x)=>{var w=kt(),a=vt(w);rt(a,{get icon(){return xe},class:"h-3 w-3 mr-1"});var d=p(a);b(B=>y(d,` ${B??""}`),[()=>i.terminal_scriptOutput_run_label()]),h(c,w)},$$slots:{default:!0}}),F(s),F(e),h(t,e)};D(dt,t=>{o().status==="idle"&&_().chunks.length===0&&t(jt)})}var J=p(dt,2);let pt;var zt=S(J);re(zt,t=>I=t,()=>I),F(J),F(K),b(()=>{xt(K,1,`script-output-viewer ${Q()??""}`,"svelte-115p4sl"),pt=xt(J,1,"flex-1 relative overflow-hidden",null,pt,{hidden:o().status==="idle"&&_().chunks.length===0})}),h(f,K);var Ut=Zt(Et);return wt(),Ut}async function rr(f,m,H){const o=st.select(u.state,f,m);if(!o||!H()||!bt.select(u.state,f,m))return;const _=yt.select(u.state,f);if(!_){N.error(i.workspace_client_accessChanged_error());return}if(!await Ae({title:i.scripts_delete_title({name:o.name}),description:i.scripts_delete_description(),confirmLabel:i.scripts_delete_label(),destructive:!0}))return;if(_!==yt.select(u.state,f)){N.error(i.workspace_client_accessChanged_error());return}const C=st.select(u.state,f,m);if(!H()||!C||C.createdAt!==o.createdAt||C.name!==o.name||!bt.select(u.state,f,m)){N.error(i.scripts_delete_changed_error());return}u.dispatch(ue(f,m,i.terminal_quakeOverlay_deleteScriptFailed_error()))}export{De as S,rr as c};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t as Et,bq as ae,_ as Ar,a_ as re,by as Mt,bu as be,bs as Zt,b as Ut,bo as d}from"./rfbsWJY8.js";import{bs as jt,ca as ke,aD as e,bH as u,a5 as R,bA as P,W as s,bn as zt,bV as O,c9 as i,aA as oe,c6 as Ot,ay as ue,be as Ge,b$ as et,b_ as C,bO as g,bS as p,bl as S,aB as k,bj as Vr,aw as tt,ai as Nr,c5 as pr,a as gr,a7 as Ue,aj as vt,cd as Wr,br as Br}from"./B8o4lNgr.js";import{D as mr,E as Or}from"./D5WwA0O_.js";import{s as rt,l as yt,k as or,h as Pt}from"./Z4aRP2F9.js";import{c as St}from"./DcUVqsa0.js";import{b as _r}from"./D2g8BuR1.js";import{Hi as V,n4 as hr,uC as wr,uB as br,Jx as Hr,Jy as qr,et as Xr,eu as Yr,IY as ir,lf as Ht,AE as nr,rl as sr,ns as Jr,yh as Kr,a9 as lr,HO as Gr,I3 as Zr,mG as Qr,iz as ea,n6 as ta,u1 as ra,yE as aa,IX as oa}from"./CM_x_DK5.js";import{g as ia}from"./CoSk1zgY.js";import{a as na,g as sa,i as la,c as da,h as ca,d as ua,e as dr,f as fa,b as qt}from"./B3OI09xu.js";import{by as va,bL as pa,dk as ga}from"./BtwWpYbv.js";import{w as cr,d as ma}from"./Djxq7-FU.js";import{f as _a}from"./DjMZotf0.js";import{n as Xt}from"./C95Ch7tj.js";import{f as Fe,ax as ha}from"./_hjrl4Qq.js";import"./DYvAONpX.js";import{F as Qe,a9 as wa,ar as ba,aU as xa,a_ as Tt,cl as ya,cm as Pa,bh as $a,cI as ka,c2 as Ia}from"./DPDCKuA3.js";import{g as Ca,i as Fa,w as ur}from"./D0KbJAaw.js";import{c as Sa}from"./ChTqQfQN.js";import"./DtY788JX.js";import{S as Da}from"./Cca849ph.js";import{i as Yt,b as Ta,a as Ra}from"./H2jLkRRS.js";import{C as Kt,p as Ea}from"./C6s3cg4n.js";import{M as Ma}from"./Dzh2k03L.js";import{t as Jt,u as xr}from"./DVqY3xlL.js";import"./CQV_d_bF.js";import"./D1yEb1Sd.js";import{M as Dt}from"./C_J7hVU_.js";import{V as Ua}from"./On5rgGG2.js";import{bN as ja,b4 as za}from"./Cnt9Xhr-.js";import{ah as La}from"./Rc4VcH_q.js";const yr=V.createSelector((K,x)=>hr(K.pdfPreview.previews,x));var Aa=k('<div class="flex shrink-0 flex-wrap items-center justify-center gap-2 border-b border-border p-2"><!> <span aria-live="polite"> </span> <!> <!> <span> </span> <!></div> <div class="min-h-0 flex-1 overflow-auto p-4"><canvas class="mx-auto block" role="img"></canvas></div>',1),Va=k('<div class="flex h-full min-h-0 flex-col" data-testid="pdf-viewer"><!></div>');function Gt(K,x){if(new.target)return Et({component:Gt,...K});jt(x,!0);const Ie=()=>be(xe,"$preview",at),[at,ie]=Zt();let $=ae(x,"workspaceId",7),ne=ae(x,"filePath",7),Ce=ae(x,"gitRootId",7);const Se=crypto.randomUUID(),xe=yr(Se),_e=new WeakMap;let Q=O(null),qe=O(void 0),N=O(1),B=O(1),se=O(!0),j=O(!1),ze=O(null),Ne=O(0);const ye=i(()=>Ie()?.error??e(ze)),De=i(()=>e(ye)==="missing"?d.file_pdf_missing_error():e(ye)==="large"?d.file_pdf_large_error():e(ye)==="invalid"?d.file_pdf_invalid_error():e(ye)==="password"?d.file_pdf_password_error():d.file_pdf_load_error());ke(()=>{const l=$(),y=ne();e(Ne);const z=crypto.randomUUID();return V.dispatch(wr(Se,z,l,y,...Ce()?[{gitRootId:Ce()}]:[])),()=>{V.dispatch(br(Se,z))}}),ke(()=>{const l=Ie()?.url;let y=!1,z;if(u(Q,null),u(ze,null),u(se,!0),u(N,1),u(B,1),!!l)return(async()=>{try{const{loadPdfDocument:Y}=await Ar(async()=>{const{loadPdfDocument:he}=await import("./BqoyBPEG.js");return{loadPdfDocument:he}},[],import.meta.url);if(y)return;z=Y(l);const le=await z.promise;y||u(Q,le)}catch(Y){if(y)return;u(ze,Y instanceof Error&&Y.name==="PasswordException"?"password":Y instanceof Error&&Y.name==="InvalidPDFException"?"invalid":"load",!0)}finally{y||u(se,!1)}})(),()=>{y=!0,z?.destroy()}}),ke(()=>{const l=e(Q),y=e(qe),z=e(N),Y=e(B);if(!l||!y)return;let le=!1,he,M;const de=()=>{if(!M)return;const J=(_e.get(M)??1)-1;J?_e.set(M,J):(_e.delete(M),M.cleanup()),M=void 0};return u(j,!0),(async()=>{try{if(M=await l.getPage(z),_e.set(M,(_e.get(M)??0)+1),le){de();return}const J=M.getViewport({scale:Y}),ee=Math.min(window.devicePixelRatio||1,2,Math.sqrt(16e6/(J.width*J.height)));y.width=Math.ceil(J.width*ee),y.height=Math.ceil(J.height*ee),y.style.width=`${J.width}px`,y.style.height=`${J.height}px`,he=M.render({canvas:y,viewport:J,transform:[ee,0,0,ee,0,0]}),await he.promise}catch{le||u(ze,"invalid")}finally{le||u(j,!1)}})(),()=>{le=!0,he?.cancel(),he?he.promise.then(de,de):de()}});var We={get workspaceId(){return $()},set workspaceId(l){$(l),oe()},get filePath(){return ne()},set filePath(l){ne(l),oe()},get gitRootId(){return Ce()},set gitRootId(l){Ce(l),oe()},$set:Mt,$on:(l,y)=>Ut(x,l,y)},o=Va(),c=R(o);{var E=l=>{{const y=Y=>{Ge();var le=et();C(()=>g(le,e(De))),s(Y,le)};let z=i(()=>d.ui_combobox_retry_label());Ca(l,{onRetry:()=>Ot(Ne),get retryLabel(){return e(z)},class:"m-auto",message:y,$$slots:{message:!0}})}},m=l=>{{let y=i(()=>d.file_pdf_loading_label());Fa(l,{get label(){return e(y)},count:1,class:"p-4"})}},w=l=>{var y=Aa(),z=ue(y),Y=R(z);{let ge=i(()=>e(N)<=1);Fe(Y,{variant:"ghost",size:"compact",get disabled(){return e(ge)},onclick:()=>Ot(N,-1),children:(Pe,Ye)=>{Ge();var $e=et();C(fe=>g($e,fe),[()=>d.file_pdf_previous_label()]),s(Pe,$e)},$$slots:{default:!0}})}var le=p(Y,2),he=S(le,!0),M=p(le,2);{let ge=i(()=>e(N)>=e(Q).numPages);Fe(M,{variant:"ghost",size:"compact",get disabled(){return e(ge)},onclick:()=>Ot(N),children:(Pe,Ye)=>{Ge();var $e=et();C(fe=>g($e,fe),[()=>d.file_pdf_next_label()]),s(Pe,$e)},$$slots:{default:!0}})}var de=p(M,2);{let ge=i(()=>e(B)<=.25);Fe(de,{variant:"ghost",size:"compact",get disabled(){return e(ge)},onclick:()=>u(B,Math.max(.25,e(B)-.25),!0),children:(Pe,Ye)=>{Ge();var $e=et();C(fe=>g($e,fe),[()=>d.editor_fileViewer_zoomOut_tooltip()]),s(Pe,$e)},$$slots:{default:!0}})}var J=p(de,2),ee=S(J,!0),ot=p(J,2);{let ge=i(()=>e(B)>=3);Fe(ot,{variant:"ghost",size:"compact",get disabled(){return e(ge)},onclick:()=>u(B,Math.min(3,e(B)+.25),!0),children:(Pe,Ye)=>{Ge();var $e=et();C(fe=>g($e,fe),[()=>d.editor_fileViewer_zoomIn_tooltip()]),s(Pe,$e)},$$slots:{default:!0}})}P(z);var it=p(z,2),Xe=R(it);let Ze;_r(Xe,ge=>u(qe,ge),()=>e(qe)),P(it),C((ge,Pe,Ye)=>{g(he,ge),g(ee,Pe),rt(it,"aria-busy",e(j)),rt(Xe,"aria-label",Ye),Ze=yt(Xe,"",Ze,{visibility:e(j)?"hidden":"visible"})},[()=>d.file_pdf_page_label({page:Jt(e(N)),total:Jt(e(Q).numPages)}),()=>xr(e(B),{style:"percent"}),()=>d.file_pdf_canvas_ariaLabel({name:ne(),page:Jt(e(N))})]),s(l,y)};re(c,l=>{e(ye)?l(E):e(se)||Ie()?.status==="loading"?l(m,1):e(Q)&&l(w,2)})}P(o),s(K,o);var Le=zt(We);return ie(),Le}const Na=V.createSelector((K,x)=>hr(K.videoPreview.previews,x));var Wa=k('<p role="status"> </p>'),Ba=k('<p role="alert"> </p>'),Oa=k('<div class="flex flex-col items-center gap-3 p-6 text-center text-sm text-subtle"><p class="break-all"> </p> <!> <!></div>'),Ha=k('<video controls="" preload="metadata" playsinline="" class="max-w-full max-h-full" data-testid="file-video"> </video>',2),qa=k('<div class="min-h-0 flex-1 flex items-center justify-center bg-background"><!></div>');function Pr(K,x){if(new.target)return Et({component:Pr,...K});jt(x,!0);const Ie=()=>be(qe,"$preview",at),[at,ie]=Zt();let $=ae(x,"sourceUrl",7),ne=ae(x,"fileName",7),Ce=ae(x,"allowDownload",7),Se=ae(x,"downloading",7),xe=ae(x,"onDownload",7),_e=O(null);const Q=crypto.randomUUID(),qe=Na(Q),N=i(()=>Ie()?.status==="loading"),B=i(()=>e(_e)??Ie()?.error);let se=!1,j=!1;Vr(()=>{j=!0,V.dispatch(Hr(Q))});function ze(){if(j||e(N))return;const m=$().startsWith("workspace-file://")?new URL($()):null;if(se||!m||!m.pathname.toLowerCase().endsWith(".mp4")){u(_e,"unsupported");return}se=!0,m.searchParams.set("preview","h264"),V.dispatch(qr(Q,m.hostname,m.toString()))}function Ne(m){if(j)return;const w=m.currentTarget.error?.code;w===2?u(_e,"network"):w!==1&&ze()}var ye={get sourceUrl(){return $()},set sourceUrl(m){$(m),oe()},get fileName(){return ne()},set fileName(m){ne(m),oe()},get allowDownload(){return Ce()},set allowDownload(m){Ce(m),oe()},get downloading(){return Se()},set downloading(m){Se(m),oe()},get onDownload(){return xe()},set onDownload(m){xe(m),oe()},$set:Mt,$on:(m,w)=>Ut(x,m,w)},De=qa(),We=R(De);{var o=m=>{var w=Oa(),Le=R(w),l=S(Le,!0),y=p(Le,2);{var z=M=>{var de=Wa(),J=S(de,!0);C(ee=>g(J,ee),[()=>d.editor_fileViewer_videoPreparing_label()]),s(M,de)},Y=M=>{var de=Ba(),J=S(de,!0);C(ee=>g(J,ee),[()=>e(B)==="network"?d.editor_fileViewer_videoLoad_error():d.editor_fileViewer_videoUnsupported_label()]),s(M,de)};re(y,M=>{e(N)?M(z):M(Y,-1)})}var le=p(y,2);{var he=M=>{Fe(M,{variant:"secondary",size:"sm",get onclick(){return xe()},get disabled(){return Se()},children:(de,J)=>{Ge();var ee=et();C(ot=>g(ee,ot),[()=>d.layout_fileTab_downloadFile_label()]),s(de,ee)},$$slots:{default:!0}})};re(le,M=>{Ce()&&M(he)})}P(w),C(()=>g(l,ne())),s(m,w)},c=m=>{var w=Ha(),Le=S(w,!0);C(l=>{rt(w,"src",Ie()?.url??$()),g(Le,l)},[()=>d.editor_fileViewer_videoUnsupported_label()]),tt("error",w,Ne),tt("loadedmetadata",w,l=>{l.currentTarget.videoWidth===0&&ze()}),s(m,w)};re(We,m=>{e(B)||e(N)?m(o):m(c,-1)})}P(De),s(K,De);var E=zt(ye);return ie(),E}var Xa=k('<!> <span class="text-xs text-subtle min-w-[50px] text-center"> </span> <!> <div class="w-px h-5 bg-border mx-1"></div>',1),Ya=k('<div class="min-h-0 flex-1 flex flex-col"><div class="flex items-center gap-2 p-2 border-b border-border bg-muted/30"><!> <!> <div class="w-px h-5 bg-border mx-1"></div> <!> <!> <div class="ml-auto text-xs text-subtle"> </div></div> <div><img draggable="false" class="max-w-full max-h-full object-contain"/></div></div>'),Ja=k('<div class="min-h-0 flex-1 flex flex-col"><div class="flex items-center gap-2 p-2 border-b border-border bg-muted/30"><!> <!> <div class="ml-auto text-xs text-subtle"> </div></div> <div><img draggable="false" class="max-w-full max-h-full object-contain"/></div></div>'),Ka=k('<div class="flex-1 flex flex-col items-center justify-center p-8"><div class="text-subtle mb-4"><svg class="w-24 h-24" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 19V6l12-3v13M9 19c0 1.105-1.343 2-3 2s-3-.895-3-2 1.343-2 3-2 3 .895 3 2zm12-3c0 1.105-1.343 2-3 2s-3-.895-3-2 1.343-2 3-2 3 .895 3 2zM9 10l12-3"></path></svg></div> <div class="text-sm text-subtle mb-4"> </div> <audio controls="" class="w-full max-w-md"><source/> </audio></div>'),Ga=k("<!> ",1),Za=k('<div class="flex-1 flex flex-col items-center justify-center p-8"><div class="text-subtle mb-4"><svg class="w-24 h-24" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg></div> <p class="text-sm text-subtle mb-4"> </p> <!></div>'),Qa=k('<th class="border border-border px-2 py-1 text-left text-xs font-medium bg-muted"> </th>'),eo=k('<td class="border border-border px-2 py-1 text-xs"> </td>'),to=k("<tr></tr>"),ro=k('<div class="flex-1 overflow-auto p-4"><table class="w-full border-collapse"><thead><tr></tr></thead><tbody></tbody></table></div>'),ao=k('<div class="flex-1 flex flex-col items-center justify-center p-8"><div class="text-subtle mb-4"><svg class="w-24 h-24" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M20 13V6a2 2 0 00-2-2H6a2 2 0 00-2 2v7m16 0v5a2 2 0 01-2 2H6a2 2 0 01-2-2v-5m16 0h-2.586a1 1 0 00-.707.293l-2.414 2.414a1 1 0 01-.707.293h-3.172a1 1 0 01-.707-.293l-2.414-2.414A1 1 0 006.586 13H4"></path></svg></div> <p class="text-sm text-subtle mb-2"> </p> <p class="text-xs text-subtle"> </p></div>'),oo=k('<div class="flex-1 flex flex-col items-center justify-center p-8"><div class="text-subtle mb-4"><svg class="w-24 h-24" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 3v2m6-2v2M9 19v2m6-2v2M5 9H3m2 6H3m18-6h-2m2 6h-2M7 19h10a2 2 0 002-2V7a2 2 0 00-2-2H7a2 2 0 00-2 2v10a2 2 0 002 2zM9 9h6v6H9V9z"></path></svg></div> <p class="text-sm text-subtle mb-2"> </p> <p class="text-xs text-subtle"> </p></div>'),io=k('<div class="h-full flex flex-col"><!></div>');function Rt(K,x){if(new.target)return Et({component:Rt,...K});jt(x,!0);const Ie=t=>{var a=Xa(),f=ue(a);{let D=i(()=>d.editor_fileViewer_zoomOut_tooltip());Fe(f,{size:"icon",variant:"ghost",class:"h-7 w-7",onclick:de,get title(){return e(D)},children:(T,H)=>{Qe(T,{get icon(){return ya},size:"sm"})},$$slots:{default:!0}})}var _=p(f,2),h=S(_,!0),U=p(_,2);{let D=i(()=>d.editor_fileViewer_zoomIn_tooltip());Fe(U,{size:"icon",variant:"ghost",class:"h-7 w-7",onclick:M,get title(){return e(D)},children:(T,H)=>{Qe(T,{get icon(){return Pa},size:"sm"})},$$slots:{default:!0}})}Ge(2),C(()=>g(h,e(ze))),s(t,a)},at=Sa("FileViewer");let ie=ae(x,"filePath",7),$=ae(x,"fileContent",7,""),ne=ae(x,"sourceUrl",7),Ce=ae(x,"language",7),Se=ae(x,"isBinary",7),xe=ae(x,"allowDownload",7,!0),_e=ae(x,"onDownload",7),Q=ae(x,"downloading",7,!1);const qe=t=>{const a=t.split(".").pop()?.toLowerCase()||"";return["png","jpg","jpeg","gif","webp","bmp","ico","avif"].includes(a)?"image":a==="svg"?"svg":["mp4","webm","ogg","mov","avi"].includes(a)?"video":["mp3","wav","ogg","m4a","flac"].includes(a)?"audio":a==="pdf"?"pdf":["md","markdown"].includes(a)?"markdown":a==="json"?"json":a==="csv"?"csv":["yaml","yml"].includes(a)?"yaml":a==="xml"?"xml":["zip","tar","gz","rar","7z","bz2"].includes(a)?"archive":["exe","dll","so","dylib","wasm"].includes(a)?"binary":"text"},N=i(()=>qe(ie())),B=i(()=>ie().split("/").pop()||d.editor_fileViewer_unknown_fallback());let se=O(100),j=O(0);const ze=i(()=>xr(e(se)/100,{style:"percent",maximumFractionDigits:0}));let Ne=O(!1),ye=O(0),De=O(0),We=O(0),o=O(0),c=O(!1),E=null;function m(){const t=E;E=null,u(c,!1),t?.viewport.hasPointerCapture(t.pointerId)&&t.viewport.releasePointerCapture(t.pointerId)}function w(t){if(t.button!==0||!t.isPrimary||E)return;const a=t.currentTarget;a.setPointerCapture(t.pointerId),E={pointerId:t.pointerId,x:t.clientX,y:t.clientY,viewport:a},u(c,!0),t.preventDefault()}function Le(t){if(!(!E||t.pointerId!==E.pointerId)){if((t.buttons&1)===0){m();return}u(We,E.viewport.scrollLeft,!0),u(o,E.viewport.scrollTop,!0),u(ye,e(ye)+(t.clientX-E.x)),u(De,e(De)+(t.clientY-E.y)),E.x=t.clientX,E.y=t.clientY}}function l(t){t.pointerId===E?.pointerId&&m()}ke(()=>{ie(),ne(),e(se),e(j),u(We,0),u(o,0)}),ke(()=>(ie(),ne(),pr(()=>{m(),u(ye,0),u(De,0)}),m));const y=t=>{const a=t.split(".").pop()?.toLowerCase();return a==="jpg"||a==="jpeg"?"image/jpeg":a==="png"?"image/png":a==="gif"?"image/gif":a==="webp"?"image/webp":"application/octet-stream"},z=t=>{const a=t.split(".").pop()?.toLowerCase();if(a==="mp4")return"video/mp4";if(a==="webm")return"video/webm"},Y=()=>{if(ne())return ne();if(typeof $()=="string")return $().startsWith("data:")||$().startsWith("http")?$():Se()?`data:${y(ie())};base64,${$()}`:`data:${y(ie())};base64,${$()}`;if($()instanceof ArrayBuffer){const a=new Uint8Array($()).reduce((_,h)=>_+String.fromCharCode(h),""),f=btoa(a);return`data:${y(ie())};base64,${f}`}return""},le=()=>{if(ne())return ne();const t=z(ie());if(!t)return"";if(typeof $()=="string")return $().startsWith("data:")||$().startsWith("http")?$():`data:${t};base64,${$()}`;const a=new Uint8Array($()),f=[],_=32768;for(let h=0;h<a.length;h+=_)f.push(String.fromCharCode(...a.subarray(h,h+_)));return`data:${t};base64,${btoa(f.join(""))}`},he=()=>{const t=typeof $()=="string"?new TextEncoder().encode($()):new Uint8Array($()),a=[],f=32768;for(let _=0;_<t.length;_+=f)a.push(String.fromCharCode(...t.subarray(_,_+f)));return`data:image/svg+xml;base64,${btoa(a.join(""))}`},M=()=>{u(se,Math.min(e(se)+25,500),!0)},de=()=>{u(se,Math.max(e(se)-25,25),!0)},J=()=>{u(j,(e(j)+90)%360)},ee=()=>{if(!xe()||Q())return;if(_e()){_e()();return}const t=document.createElement("a");t.href=e(N)==="video"?le():e(N)==="svg"?he():Y(),t.download=e(B),t.click()},ot=async()=>{try{const t=Y(),a=new Image;a.crossOrigin="anonymous";const f=await new Promise((_,h)=>{a.onload=()=>{const U=document.createElement("canvas");U.width=a.naturalWidth,U.height=a.naturalHeight;const D=U.getContext("2d");if(!D){h(new Error("Failed to get canvas context"));return}D.drawImage(a,0,0),U.toBlob(T=>{T?_(T):h(new Error("Failed to create blob from canvas"))},"image/png",1)},a.onerror=()=>h(new Error("Failed to load image")),a.src=t});await navigator.clipboard.write([new ClipboardItem({"image/png":f})]),u(Ne,!0),setTimeout(()=>u(Ne,!1),2e3)}catch(t){at.error("Failed to copy image:",t)}},it=t=>{try{const a=JSON.parse(t);return JSON.stringify(a,null,2)}catch{return t}},Xe=t=>t.split(`
|
|
1
|
+
import{t as Et,bq as ae,_ as Ar,a_ as re,by as Mt,bu as be,bs as Zt,b as Ut,bo as d}from"./rfbsWJY8.js";import{bs as jt,ca as ke,aD as e,bH as u,a5 as R,bA as P,W as s,bn as zt,bV as O,c9 as i,aA as oe,c6 as Ot,ay as ue,be as Ge,b$ as et,b_ as C,bO as g,bS as p,bl as S,aB as k,bj as Vr,aw as tt,ai as Nr,c5 as pr,a as gr,a7 as Ue,aj as vt,cd as Wr,br as Br}from"./B8o4lNgr.js";import{D as mr,E as Or}from"./D5WwA0O_.js";import{s as rt,l as yt,k as or,h as Pt}from"./Z4aRP2F9.js";import{c as St}from"./DcUVqsa0.js";import{b as _r}from"./D2g8BuR1.js";import{Hi as V,n4 as hr,uC as wr,uB as br,Jx as Hr,Jy as qr,et as Xr,eu as Yr,IY as ir,lf as Ht,AE as nr,rl as sr,ns as Jr,yh as Kr,a9 as lr,HO as Gr,I3 as Zr,mG as Qr,iz as ea,n6 as ta,u1 as ra,yE as aa,IX as oa}from"./CM_x_DK5.js";import{g as ia}from"./CoSk1zgY.js";import{a as na,g as sa,i as la,c as da,h as ca,d as ua,e as dr,f as fa,b as qt}from"./B3OI09xu.js";import{by as va,bL as pa,dk as ga}from"./BtwWpYbv.js";import{w as cr,d as ma}from"./Djxq7-FU.js";import{f as _a}from"./DjMZotf0.js";import{n as Xt}from"./C95Ch7tj.js";import{f as Fe,ax as ha}from"./_hjrl4Qq.js";import"./DYvAONpX.js";import{F as Qe,a9 as wa,ar as ba,aU as xa,a_ as Tt,cl as ya,cm as Pa,bh as $a,cI as ka,c2 as Ia}from"./DPDCKuA3.js";import{g as Ca,i as Fa,w as ur}from"./D0KbJAaw.js";import{c as Sa}from"./ChTqQfQN.js";import"./DtY788JX.js";import{S as Da}from"./BD0xH6ju.js";import{i as Yt,b as Ta,a as Ra}from"./H2jLkRRS.js";import{C as Kt,p as Ea}from"./C6s3cg4n.js";import{M as Ma}from"./D4z6L4My.js";import{t as Jt,u as xr}from"./DVqY3xlL.js";import"./CQV_d_bF.js";import"./D1yEb1Sd.js";import{M as Dt}from"./C_J7hVU_.js";import{V as Ua}from"./On5rgGG2.js";import{bN as ja,b4 as za}from"./27ieI8Q7.js";import{ah as La}from"./DKYgLLV7.js";const yr=V.createSelector((K,x)=>hr(K.pdfPreview.previews,x));var Aa=k('<div class="flex shrink-0 flex-wrap items-center justify-center gap-2 border-b border-border p-2"><!> <span aria-live="polite"> </span> <!> <!> <span> </span> <!></div> <div class="min-h-0 flex-1 overflow-auto p-4"><canvas class="mx-auto block" role="img"></canvas></div>',1),Va=k('<div class="flex h-full min-h-0 flex-col" data-testid="pdf-viewer"><!></div>');function Gt(K,x){if(new.target)return Et({component:Gt,...K});jt(x,!0);const Ie=()=>be(xe,"$preview",at),[at,ie]=Zt();let $=ae(x,"workspaceId",7),ne=ae(x,"filePath",7),Ce=ae(x,"gitRootId",7);const Se=crypto.randomUUID(),xe=yr(Se),_e=new WeakMap;let Q=O(null),qe=O(void 0),N=O(1),B=O(1),se=O(!0),j=O(!1),ze=O(null),Ne=O(0);const ye=i(()=>Ie()?.error??e(ze)),De=i(()=>e(ye)==="missing"?d.file_pdf_missing_error():e(ye)==="large"?d.file_pdf_large_error():e(ye)==="invalid"?d.file_pdf_invalid_error():e(ye)==="password"?d.file_pdf_password_error():d.file_pdf_load_error());ke(()=>{const l=$(),y=ne();e(Ne);const z=crypto.randomUUID();return V.dispatch(wr(Se,z,l,y,...Ce()?[{gitRootId:Ce()}]:[])),()=>{V.dispatch(br(Se,z))}}),ke(()=>{const l=Ie()?.url;let y=!1,z;if(u(Q,null),u(ze,null),u(se,!0),u(N,1),u(B,1),!!l)return(async()=>{try{const{loadPdfDocument:Y}=await Ar(async()=>{const{loadPdfDocument:he}=await import("./BqoyBPEG.js");return{loadPdfDocument:he}},[],import.meta.url);if(y)return;z=Y(l);const le=await z.promise;y||u(Q,le)}catch(Y){if(y)return;u(ze,Y instanceof Error&&Y.name==="PasswordException"?"password":Y instanceof Error&&Y.name==="InvalidPDFException"?"invalid":"load",!0)}finally{y||u(se,!1)}})(),()=>{y=!0,z?.destroy()}}),ke(()=>{const l=e(Q),y=e(qe),z=e(N),Y=e(B);if(!l||!y)return;let le=!1,he,M;const de=()=>{if(!M)return;const J=(_e.get(M)??1)-1;J?_e.set(M,J):(_e.delete(M),M.cleanup()),M=void 0};return u(j,!0),(async()=>{try{if(M=await l.getPage(z),_e.set(M,(_e.get(M)??0)+1),le){de();return}const J=M.getViewport({scale:Y}),ee=Math.min(window.devicePixelRatio||1,2,Math.sqrt(16e6/(J.width*J.height)));y.width=Math.ceil(J.width*ee),y.height=Math.ceil(J.height*ee),y.style.width=`${J.width}px`,y.style.height=`${J.height}px`,he=M.render({canvas:y,viewport:J,transform:[ee,0,0,ee,0,0]}),await he.promise}catch{le||u(ze,"invalid")}finally{le||u(j,!1)}})(),()=>{le=!0,he?.cancel(),he?he.promise.then(de,de):de()}});var We={get workspaceId(){return $()},set workspaceId(l){$(l),oe()},get filePath(){return ne()},set filePath(l){ne(l),oe()},get gitRootId(){return Ce()},set gitRootId(l){Ce(l),oe()},$set:Mt,$on:(l,y)=>Ut(x,l,y)},o=Va(),c=R(o);{var E=l=>{{const y=Y=>{Ge();var le=et();C(()=>g(le,e(De))),s(Y,le)};let z=i(()=>d.ui_combobox_retry_label());Ca(l,{onRetry:()=>Ot(Ne),get retryLabel(){return e(z)},class:"m-auto",message:y,$$slots:{message:!0}})}},m=l=>{{let y=i(()=>d.file_pdf_loading_label());Fa(l,{get label(){return e(y)},count:1,class:"p-4"})}},w=l=>{var y=Aa(),z=ue(y),Y=R(z);{let ge=i(()=>e(N)<=1);Fe(Y,{variant:"ghost",size:"compact",get disabled(){return e(ge)},onclick:()=>Ot(N,-1),children:(Pe,Ye)=>{Ge();var $e=et();C(fe=>g($e,fe),[()=>d.file_pdf_previous_label()]),s(Pe,$e)},$$slots:{default:!0}})}var le=p(Y,2),he=S(le,!0),M=p(le,2);{let ge=i(()=>e(N)>=e(Q).numPages);Fe(M,{variant:"ghost",size:"compact",get disabled(){return e(ge)},onclick:()=>Ot(N),children:(Pe,Ye)=>{Ge();var $e=et();C(fe=>g($e,fe),[()=>d.file_pdf_next_label()]),s(Pe,$e)},$$slots:{default:!0}})}var de=p(M,2);{let ge=i(()=>e(B)<=.25);Fe(de,{variant:"ghost",size:"compact",get disabled(){return e(ge)},onclick:()=>u(B,Math.max(.25,e(B)-.25),!0),children:(Pe,Ye)=>{Ge();var $e=et();C(fe=>g($e,fe),[()=>d.editor_fileViewer_zoomOut_tooltip()]),s(Pe,$e)},$$slots:{default:!0}})}var J=p(de,2),ee=S(J,!0),ot=p(J,2);{let ge=i(()=>e(B)>=3);Fe(ot,{variant:"ghost",size:"compact",get disabled(){return e(ge)},onclick:()=>u(B,Math.min(3,e(B)+.25),!0),children:(Pe,Ye)=>{Ge();var $e=et();C(fe=>g($e,fe),[()=>d.editor_fileViewer_zoomIn_tooltip()]),s(Pe,$e)},$$slots:{default:!0}})}P(z);var it=p(z,2),Xe=R(it);let Ze;_r(Xe,ge=>u(qe,ge),()=>e(qe)),P(it),C((ge,Pe,Ye)=>{g(he,ge),g(ee,Pe),rt(it,"aria-busy",e(j)),rt(Xe,"aria-label",Ye),Ze=yt(Xe,"",Ze,{visibility:e(j)?"hidden":"visible"})},[()=>d.file_pdf_page_label({page:Jt(e(N)),total:Jt(e(Q).numPages)}),()=>xr(e(B),{style:"percent"}),()=>d.file_pdf_canvas_ariaLabel({name:ne(),page:Jt(e(N))})]),s(l,y)};re(c,l=>{e(ye)?l(E):e(se)||Ie()?.status==="loading"?l(m,1):e(Q)&&l(w,2)})}P(o),s(K,o);var Le=zt(We);return ie(),Le}const Na=V.createSelector((K,x)=>hr(K.videoPreview.previews,x));var Wa=k('<p role="status"> </p>'),Ba=k('<p role="alert"> </p>'),Oa=k('<div class="flex flex-col items-center gap-3 p-6 text-center text-sm text-subtle"><p class="break-all"> </p> <!> <!></div>'),Ha=k('<video controls="" preload="metadata" playsinline="" class="max-w-full max-h-full" data-testid="file-video"> </video>',2),qa=k('<div class="min-h-0 flex-1 flex items-center justify-center bg-background"><!></div>');function Pr(K,x){if(new.target)return Et({component:Pr,...K});jt(x,!0);const Ie=()=>be(qe,"$preview",at),[at,ie]=Zt();let $=ae(x,"sourceUrl",7),ne=ae(x,"fileName",7),Ce=ae(x,"allowDownload",7),Se=ae(x,"downloading",7),xe=ae(x,"onDownload",7),_e=O(null);const Q=crypto.randomUUID(),qe=Na(Q),N=i(()=>Ie()?.status==="loading"),B=i(()=>e(_e)??Ie()?.error);let se=!1,j=!1;Vr(()=>{j=!0,V.dispatch(Hr(Q))});function ze(){if(j||e(N))return;const m=$().startsWith("workspace-file://")?new URL($()):null;if(se||!m||!m.pathname.toLowerCase().endsWith(".mp4")){u(_e,"unsupported");return}se=!0,m.searchParams.set("preview","h264"),V.dispatch(qr(Q,m.hostname,m.toString()))}function Ne(m){if(j)return;const w=m.currentTarget.error?.code;w===2?u(_e,"network"):w!==1&&ze()}var ye={get sourceUrl(){return $()},set sourceUrl(m){$(m),oe()},get fileName(){return ne()},set fileName(m){ne(m),oe()},get allowDownload(){return Ce()},set allowDownload(m){Ce(m),oe()},get downloading(){return Se()},set downloading(m){Se(m),oe()},get onDownload(){return xe()},set onDownload(m){xe(m),oe()},$set:Mt,$on:(m,w)=>Ut(x,m,w)},De=qa(),We=R(De);{var o=m=>{var w=Oa(),Le=R(w),l=S(Le,!0),y=p(Le,2);{var z=M=>{var de=Wa(),J=S(de,!0);C(ee=>g(J,ee),[()=>d.editor_fileViewer_videoPreparing_label()]),s(M,de)},Y=M=>{var de=Ba(),J=S(de,!0);C(ee=>g(J,ee),[()=>e(B)==="network"?d.editor_fileViewer_videoLoad_error():d.editor_fileViewer_videoUnsupported_label()]),s(M,de)};re(y,M=>{e(N)?M(z):M(Y,-1)})}var le=p(y,2);{var he=M=>{Fe(M,{variant:"secondary",size:"sm",get onclick(){return xe()},get disabled(){return Se()},children:(de,J)=>{Ge();var ee=et();C(ot=>g(ee,ot),[()=>d.layout_fileTab_downloadFile_label()]),s(de,ee)},$$slots:{default:!0}})};re(le,M=>{Ce()&&M(he)})}P(w),C(()=>g(l,ne())),s(m,w)},c=m=>{var w=Ha(),Le=S(w,!0);C(l=>{rt(w,"src",Ie()?.url??$()),g(Le,l)},[()=>d.editor_fileViewer_videoUnsupported_label()]),tt("error",w,Ne),tt("loadedmetadata",w,l=>{l.currentTarget.videoWidth===0&&ze()}),s(m,w)};re(We,m=>{e(B)||e(N)?m(o):m(c,-1)})}P(De),s(K,De);var E=zt(ye);return ie(),E}var Xa=k('<!> <span class="text-xs text-subtle min-w-[50px] text-center"> </span> <!> <div class="w-px h-5 bg-border mx-1"></div>',1),Ya=k('<div class="min-h-0 flex-1 flex flex-col"><div class="flex items-center gap-2 p-2 border-b border-border bg-muted/30"><!> <!> <div class="w-px h-5 bg-border mx-1"></div> <!> <!> <div class="ml-auto text-xs text-subtle"> </div></div> <div><img draggable="false" class="max-w-full max-h-full object-contain"/></div></div>'),Ja=k('<div class="min-h-0 flex-1 flex flex-col"><div class="flex items-center gap-2 p-2 border-b border-border bg-muted/30"><!> <!> <div class="ml-auto text-xs text-subtle"> </div></div> <div><img draggable="false" class="max-w-full max-h-full object-contain"/></div></div>'),Ka=k('<div class="flex-1 flex flex-col items-center justify-center p-8"><div class="text-subtle mb-4"><svg class="w-24 h-24" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 19V6l12-3v13M9 19c0 1.105-1.343 2-3 2s-3-.895-3-2 1.343-2 3-2 3 .895 3 2zm12-3c0 1.105-1.343 2-3 2s-3-.895-3-2 1.343-2 3-2 3 .895 3 2zM9 10l12-3"></path></svg></div> <div class="text-sm text-subtle mb-4"> </div> <audio controls="" class="w-full max-w-md"><source/> </audio></div>'),Ga=k("<!> ",1),Za=k('<div class="flex-1 flex flex-col items-center justify-center p-8"><div class="text-subtle mb-4"><svg class="w-24 h-24" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg></div> <p class="text-sm text-subtle mb-4"> </p> <!></div>'),Qa=k('<th class="border border-border px-2 py-1 text-left text-xs font-medium bg-muted"> </th>'),eo=k('<td class="border border-border px-2 py-1 text-xs"> </td>'),to=k("<tr></tr>"),ro=k('<div class="flex-1 overflow-auto p-4"><table class="w-full border-collapse"><thead><tr></tr></thead><tbody></tbody></table></div>'),ao=k('<div class="flex-1 flex flex-col items-center justify-center p-8"><div class="text-subtle mb-4"><svg class="w-24 h-24" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M20 13V6a2 2 0 00-2-2H6a2 2 0 00-2 2v7m16 0v5a2 2 0 01-2 2H6a2 2 0 01-2-2v-5m16 0h-2.586a1 1 0 00-.707.293l-2.414 2.414a1 1 0 01-.707.293h-3.172a1 1 0 01-.707-.293l-2.414-2.414A1 1 0 006.586 13H4"></path></svg></div> <p class="text-sm text-subtle mb-2"> </p> <p class="text-xs text-subtle"> </p></div>'),oo=k('<div class="flex-1 flex flex-col items-center justify-center p-8"><div class="text-subtle mb-4"><svg class="w-24 h-24" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 3v2m6-2v2M9 19v2m6-2v2M5 9H3m2 6H3m18-6h-2m2 6h-2M7 19h10a2 2 0 002-2V7a2 2 0 00-2-2H7a2 2 0 00-2 2v10a2 2 0 002 2zM9 9h6v6H9V9z"></path></svg></div> <p class="text-sm text-subtle mb-2"> </p> <p class="text-xs text-subtle"> </p></div>'),io=k('<div class="h-full flex flex-col"><!></div>');function Rt(K,x){if(new.target)return Et({component:Rt,...K});jt(x,!0);const Ie=t=>{var a=Xa(),f=ue(a);{let D=i(()=>d.editor_fileViewer_zoomOut_tooltip());Fe(f,{size:"icon",variant:"ghost",class:"h-7 w-7",onclick:de,get title(){return e(D)},children:(T,H)=>{Qe(T,{get icon(){return ya},size:"sm"})},$$slots:{default:!0}})}var _=p(f,2),h=S(_,!0),U=p(_,2);{let D=i(()=>d.editor_fileViewer_zoomIn_tooltip());Fe(U,{size:"icon",variant:"ghost",class:"h-7 w-7",onclick:M,get title(){return e(D)},children:(T,H)=>{Qe(T,{get icon(){return Pa},size:"sm"})},$$slots:{default:!0}})}Ge(2),C(()=>g(h,e(ze))),s(t,a)},at=Sa("FileViewer");let ie=ae(x,"filePath",7),$=ae(x,"fileContent",7,""),ne=ae(x,"sourceUrl",7),Ce=ae(x,"language",7),Se=ae(x,"isBinary",7),xe=ae(x,"allowDownload",7,!0),_e=ae(x,"onDownload",7),Q=ae(x,"downloading",7,!1);const qe=t=>{const a=t.split(".").pop()?.toLowerCase()||"";return["png","jpg","jpeg","gif","webp","bmp","ico","avif"].includes(a)?"image":a==="svg"?"svg":["mp4","webm","ogg","mov","avi"].includes(a)?"video":["mp3","wav","ogg","m4a","flac"].includes(a)?"audio":a==="pdf"?"pdf":["md","markdown"].includes(a)?"markdown":a==="json"?"json":a==="csv"?"csv":["yaml","yml"].includes(a)?"yaml":a==="xml"?"xml":["zip","tar","gz","rar","7z","bz2"].includes(a)?"archive":["exe","dll","so","dylib","wasm"].includes(a)?"binary":"text"},N=i(()=>qe(ie())),B=i(()=>ie().split("/").pop()||d.editor_fileViewer_unknown_fallback());let se=O(100),j=O(0);const ze=i(()=>xr(e(se)/100,{style:"percent",maximumFractionDigits:0}));let Ne=O(!1),ye=O(0),De=O(0),We=O(0),o=O(0),c=O(!1),E=null;function m(){const t=E;E=null,u(c,!1),t?.viewport.hasPointerCapture(t.pointerId)&&t.viewport.releasePointerCapture(t.pointerId)}function w(t){if(t.button!==0||!t.isPrimary||E)return;const a=t.currentTarget;a.setPointerCapture(t.pointerId),E={pointerId:t.pointerId,x:t.clientX,y:t.clientY,viewport:a},u(c,!0),t.preventDefault()}function Le(t){if(!(!E||t.pointerId!==E.pointerId)){if((t.buttons&1)===0){m();return}u(We,E.viewport.scrollLeft,!0),u(o,E.viewport.scrollTop,!0),u(ye,e(ye)+(t.clientX-E.x)),u(De,e(De)+(t.clientY-E.y)),E.x=t.clientX,E.y=t.clientY}}function l(t){t.pointerId===E?.pointerId&&m()}ke(()=>{ie(),ne(),e(se),e(j),u(We,0),u(o,0)}),ke(()=>(ie(),ne(),pr(()=>{m(),u(ye,0),u(De,0)}),m));const y=t=>{const a=t.split(".").pop()?.toLowerCase();return a==="jpg"||a==="jpeg"?"image/jpeg":a==="png"?"image/png":a==="gif"?"image/gif":a==="webp"?"image/webp":"application/octet-stream"},z=t=>{const a=t.split(".").pop()?.toLowerCase();if(a==="mp4")return"video/mp4";if(a==="webm")return"video/webm"},Y=()=>{if(ne())return ne();if(typeof $()=="string")return $().startsWith("data:")||$().startsWith("http")?$():Se()?`data:${y(ie())};base64,${$()}`:`data:${y(ie())};base64,${$()}`;if($()instanceof ArrayBuffer){const a=new Uint8Array($()).reduce((_,h)=>_+String.fromCharCode(h),""),f=btoa(a);return`data:${y(ie())};base64,${f}`}return""},le=()=>{if(ne())return ne();const t=z(ie());if(!t)return"";if(typeof $()=="string")return $().startsWith("data:")||$().startsWith("http")?$():`data:${t};base64,${$()}`;const a=new Uint8Array($()),f=[],_=32768;for(let h=0;h<a.length;h+=_)f.push(String.fromCharCode(...a.subarray(h,h+_)));return`data:${t};base64,${btoa(f.join(""))}`},he=()=>{const t=typeof $()=="string"?new TextEncoder().encode($()):new Uint8Array($()),a=[],f=32768;for(let _=0;_<t.length;_+=f)a.push(String.fromCharCode(...t.subarray(_,_+f)));return`data:image/svg+xml;base64,${btoa(a.join(""))}`},M=()=>{u(se,Math.min(e(se)+25,500),!0)},de=()=>{u(se,Math.max(e(se)-25,25),!0)},J=()=>{u(j,(e(j)+90)%360)},ee=()=>{if(!xe()||Q())return;if(_e()){_e()();return}const t=document.createElement("a");t.href=e(N)==="video"?le():e(N)==="svg"?he():Y(),t.download=e(B),t.click()},ot=async()=>{try{const t=Y(),a=new Image;a.crossOrigin="anonymous";const f=await new Promise((_,h)=>{a.onload=()=>{const U=document.createElement("canvas");U.width=a.naturalWidth,U.height=a.naturalHeight;const D=U.getContext("2d");if(!D){h(new Error("Failed to get canvas context"));return}D.drawImage(a,0,0),U.toBlob(T=>{T?_(T):h(new Error("Failed to create blob from canvas"))},"image/png",1)},a.onerror=()=>h(new Error("Failed to load image")),a.src=t});await navigator.clipboard.write([new ClipboardItem({"image/png":f})]),u(Ne,!0),setTimeout(()=>u(Ne,!1),2e3)}catch(t){at.error("Failed to copy image:",t)}},it=t=>{try{const a=JSON.parse(t);return JSON.stringify(a,null,2)}catch{return t}},Xe=t=>t.split(`
|
|
2
2
|
`).map(f=>f.split(",").map(_=>_.trim()));var Ze={get filePath(){return ie()},set filePath(t){ie(t),oe()},get fileContent(){return $()},set fileContent(t=""){$(t),oe()},get sourceUrl(){return ne()},set sourceUrl(t){ne(t),oe()},get language(){return Ce()},set language(t){Ce(t),oe()},get isBinary(){return Se()},set isBinary(t){Se(t),oe()},get allowDownload(){return xe()},set allowDownload(t=!0){xe(t),oe()},get onDownload(){return _e()},set onDownload(t){_e(t),oe()},get downloading(){return Q()},set downloading(t=!1){Q(t),oe()},$set:Mt,$on:(t,a)=>Ut(x,t,a)},ge=io();tt("blur",gr,m);var Pe=R(ge);{var Ye=t=>{var a=Ya(),f=R(a),_=R(f);Ie(_);var h=p(_,2);{let te=i(()=>d.editor_fileViewer_rotate_tooltip());Fe(h,{size:"icon",variant:"ghost",class:"h-7 w-7",onclick:J,get title(){return e(te)},children:(we,Te)=>{Qe(we,{get icon(){return wa},size:"sm"})},$$slots:{default:!0}})}var U=p(h,4);{let te=i(()=>d.editor_fileViewer_copyImage_tooltip());Fe(U,{size:"icon",variant:"ghost",class:"h-7 w-7",onclick:ot,get title(){return e(te)},children:(we,Te)=>{var je=Ue(),Be=ue(je);{var At=Je=>{Qe(Je,{get icon(){return ba},size:"sm",class:"text-green-500"})},pt=Je=>{Qe(Je,{get icon(){return xa},size:"sm"})};re(Be,Je=>{e(Ne)?Je(At):Je(pt,-1)})}s(we,je)},$$slots:{default:!0}})}var D=p(U,2);{let te=i(()=>!xe()||Q()),we=i(()=>d.editor_fileViewer_download_tooltip());Fe(D,{size:"icon",variant:"ghost",class:"h-7 w-7",onclick:ee,get disabled(){return e(te)},get title(){return e(we)},children:(Te,je)=>{Qe(Te,{get icon(){return Tt},size:"sm"})},$$slots:{default:!0}})}var T=p(D,2),H=S(T,!0);P(f);var L=p(f,2),G=S(L);P(a),C(te=>{g(H,e(B)),or(L,1,`relative min-h-0 flex-1 overflow-auto bg-checkered flex items-center justify-center p-4 select-none ${e(c)?"cursor-grabbing":"cursor-grab"}`,"svelte-1uj35xu"),yt(L,`--pan-scroll-x: ${e(We)??""}px; --pan-scroll-y: ${e(o)??""}px;`),rt(G,"src",te),rt(G,"alt",e(B)),yt(G,`translate: ${e(ye)??""}px ${e(De)??""}px; transform: scale(${e(se)/100}) rotate(${e(j)??""}deg); transition: transform 0.2s;`)},[()=>Y()]),vt("pointerdown",L,w),vt("pointermove",L,Le),vt("pointerup",L,l),tt("pointercancel",L,l),tt("lostpointercapture",L,l),s(t,a)},$e=t=>{var a=Ja(),f=R(a),_=R(f);Ie(_);var h=p(_,2);{let L=i(()=>!xe()||Q()),G=i(()=>d.editor_fileViewer_download_tooltip());Fe(h,{size:"icon",variant:"ghost",class:"h-7 w-7",onclick:ee,get disabled(){return e(L)},get title(){return e(G)},children:(te,we)=>{Qe(te,{get icon(){return Tt},size:"sm"})},$$slots:{default:!0}})}var U=p(h,2),D=S(U,!0);P(f);var T=p(f,2),H=S(T);P(a),C(L=>{g(D,e(B)),or(T,1,`relative min-h-0 flex-1 overflow-auto bg-checkered flex items-center justify-center p-4 select-none ${e(c)?"cursor-grabbing":"cursor-grab"}`,"svelte-1uj35xu"),yt(T,`--pan-scroll-x: ${e(We)??""}px; --pan-scroll-y: ${e(o)??""}px;`),rt(H,"src",L),rt(H,"alt",e(B)),yt(H,`translate: ${e(ye)??""}px ${e(De)??""}px; transform: scale(${e(se)/100});`)},[()=>he()]),vt("pointerdown",T,w),vt("pointermove",T,Le),vt("pointerup",T,l),tt("pointercancel",T,l),tt("lostpointercapture",T,l),s(t,a)},fe=t=>{const a=i(le);var f=Ue(),_=ue(f);mr(_,()=>ie()+e(a),h=>{Pr(h,{get sourceUrl(){return e(a)},get fileName(){return e(B)},get allowDownload(){return xe()},get downloading(){return Q()},onDownload:ee})}),s(t,f)},nt=t=>{var a=Ka(),f=p(R(a),2),_=S(f,!0),h=p(f,2),U=R(h),D=p(U);P(h),P(a),C((T,H)=>{g(_,e(B)),rt(U,"src",T),g(D,` ${H??""}`)},[()=>Y(),()=>d.editor_fileViewer_audioUnsupported_label()]),s(t,a)},$t=t=>{var a=Za(),f=p(R(a),2),_=S(f,!0),h=p(f,2);{let U=i(()=>!xe()||Q());Fe(h,{size:"sm",variant:"secondary",onclick:ee,get disabled(){return e(U)},children:(D,T)=>{var H=Ga(),L=ue(H);Qe(L,{get icon(){return Tt},size:"sm",class:"mr-2"});var G=p(L);C(te=>g(G,` ${te??""}`),[()=>d.editor_fileViewer_downloadPdf_label()]),s(D,H)},$$slots:{default:!0}})}P(a),C(U=>g(_,U),[()=>d.editor_fileViewer_pdfUnavailable_label()]),s(t,a)},ct=t=>{{let a=i(()=>it($().toString()));Kt(t,{get value(){return e(a)},language:"json",get fileName(){return ie()},lineNumbers:!0,readOnly:!0})}},ut=t=>{const a=i(()=>Xe($().toString()));var f=ro(),_=R(f),h=R(_),U=R(h);Pt(U,23,()=>e(a)[0]||[],(T,H)=>`header-${H}-${T}`,(T,H)=>{var L=Qa(),G=S(L,!0);C(()=>g(G,e(H))),s(T,L)}),P(U),P(h);var D=p(h);Pt(D,23,()=>e(a).slice(1),(T,H)=>`row-${H}`,(T,H,L)=>{var G=to();Pt(G,23,()=>e(H),(te,we)=>`cell-${e(L)}-${we}`,(te,we)=>{var Te=eo(),je=S(Te,!0);C(()=>g(je,e(we))),s(te,Te)}),P(G),s(T,G)}),P(D),P(_),P(f),s(t,f)},kt=t=>{var a=ao(),f=p(R(a),2),_=S(f,!0),h=p(f,2),U=S(h,!0);P(a),C(D=>{g(_,e(B)),g(U,D)},[()=>d.editor_fileViewer_archive_label()]),s(t,a)},Lt=t=>{var a=oo(),f=p(R(a),2),_=S(f,!0),h=p(f,2),U=S(h,!0);P(a),C(D=>{g(_,e(B)),g(U,D)},[()=>d.editor_fileViewer_binary_label()]),s(t,a)},It=t=>{{let a=i(()=>$().toString());Kt(t,{get value(){return e(a)},get language(){return Ce()},get fileName(){return ie()},lineNumbers:!0,highlightActiveLine:!0})}};re(Pe,t=>{e(N)==="image"?t(Ye):e(N)==="svg"?t($e,1):e(N)==="video"?t(fe,2):e(N)==="audio"?t(nt,3):e(N)==="pdf"?t($t,4):e(N)==="json"?t(ct,5):e(N)==="csv"?t(ut,6):e(N)==="archive"?t(kt,7):e(N)==="binary"?t(Lt,8):t(It,-1)})}return P(ge),s(K,ge),zt(Ze)}Nr(["pointerdown","pointermove","pointerup"]);const no=/access denied|permission denied|outside (?:the )?workspace/i,so=/file not found|no such file or directory/i;function lo(K){return no.test(K)?"access-denied":K===d.files_read_notFound_error()||so.test(K)?"not-found":"generic"}function co(K){switch(K){case"access-denied":return d.layout_fileTab_errorAccessDenied_label();case"not-found":return d.layout_fileTab_errorNotFound_label();case"generic":return d.layout_fileTab_errorGeneric_label()}}var uo=k("<!> <!>",1),fo=k("<!> <!> <!>",1),vo=k('<div class="flex flex-col items-center justify-center h-full text-subtle gap-2"><p> </p> <p class="text-xs"> </p></div>'),fr=k('<div class="flex h-full items-center justify-center p-4 text-subtle"><p role="alert"> </p></div>'),po=k('<div class="flex h-full items-center justify-center text-subtle"><p> </p></div>'),vr=k('<div class="flex items-center justify-center h-full text-subtle"><p> </p></div>'),go=k('<div class="flex items-center gap-3"><!> <!></div>'),mo=k('<div class="flex flex-col h-full"><div class="flex-1 p-4 space-y-2"></div></div>'),_o=k('<p class="text-xs"> </p>'),ho=k("<li><!></li>"),wo=k('<p class="text-xs mt-2"> </p> <ul class="flex flex-col items-center gap-1"></ul>',1),bo=k('<div class="flex flex-col items-center justify-center h-full text-subtle gap-2"><p class="text-danger" role="alert"> </p> <p class="text-xs font-mono"> </p> <!> <!></div>'),xo=k('<div class="flex flex-col items-center justify-center h-full text-subtle gap-3 p-4"><p> </p> <p class="text-xs break-all"> </p> <!></div>'),yo=k('<div class="h-full overflow-auto p-4"><!></div>');function Po(K,x){if(new.target)return Et({component:Po,...K});jt(x,!0);const Ie=()=>be($e,"$workspace",j),at=()=>be(Y,"$fileContentStore",j),ie=()=>be(le,"$fileLoadingStore",j),$=()=>be(he,"$fileSavingStore",j),ne=()=>be(M,"$fileErrorStore",j),Ce=()=>be(de,"$fileNotFoundCandidatesStore",j),Se=()=>be(J,"$isFileBinaryStore",j),xe=()=>be(ee,"$isFileDirtyStore",j),_e=()=>be(ot,"$fileLastUpdatedStore",j),Q=()=>be(it,"$ftChanges$",j),qe=()=>be(Ye,"$gutterRead$",j),N=()=>be(De,"$lineWrapping",j),B=()=>be(We,"$diffIndicators",j),se=()=>be(ge,"$rootMediaPreview",j),[j,ze]=Zt(),Ne=r=>{var n=uo(),I=ue(n);{var F=pe=>{var Ae=Ue(),Oe=ue(Ae);St(Oe,()=>Dt,(ft,_t)=>{_t(ft,{get icon(){return $a},get label(){return e(_)},disabled:!0})}),s(pe,Ae)};re(I,pe=>{!e(te)&&!e(l)&&!e(t)&&pe(F)})}var ve=p(I,2);{var Re=pe=>{{let Ae=i(()=>!e(Ct)||!e(L)),Oe=i(()=>!e(l)&&(!e(Ct)||!e(L)));Ua(pe,{embedded:!0,showFold:!1,showSplit:!1,get showPreview(){return e(Ct)},get previewEnabled(){return e(L)},onTogglePreview:()=>u(L,!e(L)),get showWrap(){return e(Ae)},get wrapEnabled(){return N()},onToggleWrap:()=>V.dispatch(Zr()),get showDiff(){return e(Oe)},get diffEnabled(){return B()},onToggleDiff:()=>V.dispatch(Gr())})}};re(ve,pe=>{o().filePath&&!e(te)&&!e(t)&&pe(Re)})}s(r,n)},ye=r=>{var n=Ue(),I=ue(n);{var F=ve=>{var Re=fo(),pe=ue(Re);{var Ae=Ve=>{var Ke=Ue(),lt=ue(Ke);{let ht=i(()=>d.layout_fileTab_goToChanges_tooltip());St(lt,()=>Dt,(wt,bt)=>{bt(wt,{get icon(){return Ia},get label(){return e(ht)},onclick:Tr})})}s(Ve,Ke)};re(pe,Ve=>{e(kr)&&Ve(Ae)})}var Oe=p(pe,2);{var ft=Ve=>{var Ke=Ue(),lt=ue(Ke);{let ht=i(()=>d.layout_fileTab_downloadFile_label()),wt=i(()=>!e(gt)||e(st));St(lt,()=>Dt,(bt,Nt)=>{Nt(bt,{get icon(){return Tt},get label(){return e(ht)},onclick:Ft,get disabled(){return e(wt)}})})}s(Ve,Ke)};re(Oe,Ve=>{e(Be)&&Ve(ft)})}var _t=p(Oe,2);{let Ve=i(()=>d.layout_fileTab_deleteFile_tooltip());St(_t,()=>Dt,(Ke,lt)=>{lt(Ke,{get icon(){return ka},get label(){return e(Ve)},onclick:Rr,destructive:!0})})}s(ve,Re)};re(I,ve=>{o().filePath&&!e(te)&&!e(l)&&ve(F)})}s(r,n)},De=ja(),We=za();let o=ae(x,"tab",7),c=ae(x,"workspaceId",7),E=ae(x,"isActive",7),m=ae(x,"isPanelFocused",7);ke(()=>{const r=c();if(!(!E()||!r||e(w)))return V.dispatch(Xr(r,"files")),()=>V.dispatch(Yr(r,"files"))});const w=i(()=>typeof o().data?.gitRootId=="string"?o().data.gitRootId:void 0),Le=i(()=>typeof o().data?.gitRootPath=="string"?o().data.gitRootPath:void 0),l=i(()=>!!e(w)),y=i(()=>o().filePath?_a(o().filePath,e(w)):o().filePath),z=Wr(e(y));ke(()=>{z.set(e(y))});const Y=na(c(),z),le=sa(c(),z),he=la(c(),z),M=da(c(),z),de=ca(c(),z),J=ua(c(),z),ee=dr(c(),z),ot=fa(c(),z),it=va(c()),Xe=ia(),Ze=crypto.randomUUID(),ge=yr(Ze),Pe=`file-gutter:${crypto.randomUUID()}`,Ye=pa(c(),Pe),$e=ga(c()),fe=i(()=>Ie()?.worktreePath||Ie()?.repositoryPath||Ie()?.path||null),nt=i(at),$t=i(ie),ct=i($),ut=i(ne),kt=i(()=>e(ut)?lo(e(ut)):"generic"),Lt=5,It=i(()=>(Ce()??[]).slice(0,Lt)),t=i(Se),a=i(xe),f=i(_e),_=i(()=>e(ct)?d.ui_saveIndicator_saving_tooltip():e(a)?d.ui_saveIndicator_autoSaving_tooltip():d.ui_saveIndicator_saved_tooltip());let h=O(null),U=O(Br([])),D=O(null),T=O(void 0),H=O(void 0),L=O(!0);ke(()=>{const r=o().data?.line,n=o().data?.jumpTimestamp;!r||n!==void 0&&n===e(H)||(u(H,n,!0),u(T,{line:r},!0),u(L,!1))});const G=i(()=>e(w)?cr(o().filePath,e(Le)):null),te=i(()=>e(w)?!e(G):!!(o().filePath&&(Ta(o().filePath)||e(fe)&&Ra(o().filePath,e(fe))))),we=i(()=>o().filePath&&e(fe)?Yt(o().filePath)?o().filePath:`${e(fe)}/${o().filePath}`:null),Te=i(()=>!!o().filePath&&/\.pdf$/i.test(o().filePath)),je=i(()=>!!o().filePath&&/\.(?:png|jpe?g|gif|webp|mp4|webm)$/i.test(o().filePath)),Be=i(()=>c()&&/^[A-Za-z0-9._-]+$/.test(c())?cr(o().filePath,e(fe)):null),At=i(()=>!e(w)&&e(Be)?e(Be).split("/").slice(0,-1).join("/"):void 0),pt=i(()=>e(Te)||e(je)?e(Be):null),Je=i(()=>e(w)&&e(je)?{png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",webp:"image/webp",mp4:"video/mp4",webm:"video/webm"}[o().filePath?.split(".").pop()?.toLowerCase()??""]:void 0);ke(()=>{if(!E()||!e(w)||!e(G)||!e(Je))return;const r=crypto.randomUUID();return V.dispatch(wr(Ze,r,c(),e(G),{gitRootId:e(w),mimeType:e(Je)})),()=>V.dispatch(br(Ze,r))});let st=O(!1);const gt=i(()=>!!e(Be)&&!e($t)&&(!e(je)||e(D)===e(Be))),Qt=i(()=>e(D)&&c()?`workspace-file://${c()}/${e(D).split("/").map(encodeURIComponent).join("/")}`:null),Vt=i(()=>o().filePath?ta(o().filePath):"plaintext"),Ct=i(()=>e(Vt)==="markdown");ke(()=>{if(!E()||e(Te)||e(w))return;const r=e(pt),n=o().filePath,I=c(),F=o().id;if(u(D,null),!r||!n||!I)return;let ve=!1;const Re=()=>!ve&&c()===I&&o().id===F&&o().filePath===n;return(async()=>{let pe=!1;try{pe=(await ha("file.stat",{workspaceId:I,path:r}))?.isFile===!0}catch{}if(!Re())return;if(pe){u(D,r,!0);return}if(!/\.(?:png|jpe?g|gif|webp|mp4|webm)$/i.test(r)){u(D,r,!0);return}const{candidates:Ae,truncated:Oe}=await Da(I,r);if(Re()){if(!Oe&&Ae.length===1){V.dispatch(ir(I,n,Ae[0],F));return}u(D,r,!0)}})(),()=>{ve=!0}});function $r(r,n){return!!(r.file===n||r.relativePath===n||r.relativePath&&n.endsWith("/"+r.relativePath)||r.file&&n.endsWith("/"+r.file)||r.relativePath&&r.relativePath.endsWith("/"+n)||r.file&&r.file.endsWith("/"+n))}const mt=i(()=>e(l)||!o().filePath?null:Q().find(r=>$r(r,o().filePath))??null),kr=i(()=>!!e(mt));ke(()=>{if(e(l))return;const r=c(),n=o().filePath,I=e(fe);return()=>{if(!r||!n)return;const F=qt.select(V.state,r,n);if(F?.kind!=="editable-text")return;const ve=Ht(F.localContent),Re=dr.select(V.state,r,n),pe=Yt(n)?n:I?`${I}/${n}`:null;Re&&pe&&V.dispatch(nr(r,n,pe,ve))}}),ke(()=>{const r=o().filePath,n=e(we),I=c();if(!E())return;const F=!e(w)&&!!r&&Yt(r)&&!e(fe);r&&I&&!e(te)&&!e(je)&&!e(Te)&&!F&&(e(w)&&e(G)&&e(y)?V.dispatch(sr(I,e(y),n??r,{gitRoot:{id:e(w),relativePath:e(G)}})):V.dispatch(sr(I,r,n??r)))});function Ir(){return e(nt)??""}function Cr(r){e(l)||e(t)||!o().filePath||!c()||!e(we)||V.dispatch(oa(c(),o().filePath,Ht(r)))}function Fr(){if(e(l)||e(t)||!o().filePath||!e(we)||e(nt)===null||e(ct))return;const r=qt.select(V.state,c(),o().filePath);r?.kind==="editable-text"&&V.dispatch(nr(c(),o().filePath,e(we),Ht(r.localContent)))}function Sr(r){const n=o().filePath;!n||!c()||(V.dispatch(aa(c(),n)),V.dispatch(ir(c(),n,r,o().id)))}ke(()=>{const r=o().filePath,n=e(mt);if(!r||!n){u(U,[],!0);return}if(!E())return;const I=c(),F=crypto.randomUUID();return V.dispatch(Jr(I,Pe,F,{kind:"diffs",path:r,staged:n.stage==="staged"})),()=>{V.dispatch(Kr(I,Pe,F))}}),ke(()=>{const r=qe(),n=r?.result?.kind==="diffs"?r.result.chunks:[],I=n.find(F=>F.file===o().filePath)??n[0];u(U,I?Ea(I.chunks.map(F=>({oldStart:F.oldStart,oldLines:F.oldLines,newStart:F.newStart,newLines:F.newLines,lines:F.lines.map(ve=>(ve.type===lr.Addition?"+":ve.type===lr.Deletion?"-":" ")+ve.content)}))):[],!0)});function Dr(r){const n=/Mac|iPhone|iPad|iPod/.test(navigator.userAgent),I=Re=>Or(r,La(Re),n);if(I("editor.save")){r.preventDefault(),e(a)&&!e(ct)&&Fr();return}const F=I("editor.undo")?"undo":I("editor.redo")?"redo":I("editor.toggle-task-list")?"toggle-task-list":I("editor.copy")?"copy":I("editor.select-all")?"select-all":null;if(!F||e(l)&&F!=="copy"&&F!=="select-all")return;F!=="toggle-task-list"&&e(h)?.runShortcut(F)&&r.preventDefault()}function Tr(r){if(!o().filePath||!e(mt))return;const n=r?.metaKey||r?.ctrlKey||!1,F=r?.target?.closest("[data-panel-id]")?.getAttribute("data-panel-id")??void 0;V.dispatch(ra(c(),e(mt),{filePath:o().filePath,changeId:e(mt).id,openInAdjacentPanel:n,sourcePanelId:F}))}async function Ft(){const r=e(Be);if(!(e(l)||!r||!c()||!e(gt)||e(st))){u(st,!0);try{const n=await ma(c(),r,e(fe));!n?.success&&!n?.canceled&&Xt.error(n?.error?.message||d.layout_fileTab_downloadFailed_error())}catch{Xt.error(d.layout_fileTab_downloadFailed_error())}finally{u(st,!1)}}}function Rr(){const r=e(we);if(e(l)||!o().filePath||!c()||!r)return;const n=Qr(qt.select(V.state,c(),o().filePath));if(!n){Xt.error(d.ui_reversibleActions_failed_error({message:d.fileExplorer_tree_undoUnavailable_error()}));return}V.dispatch(ea(c(),o().filePath,{absolutePath:r,tabId:o().id,snapshot:n}))}ke(()=>{if(!Xe||!E())return;const r={isDirty:!e(l)&&e(a),isSaving:!e(l)&&e(ct)};pr(()=>{Xe.registerActions({display:Ne,actions:ye}),Xe.registerState(r)})});var Er={get tab(){return o()},set tab(r){o(r),oe()},get workspaceId(){return c()},set workspaceId(r){c(r),oe()},get isActive(){return E()},set isActive(r){E(r),oe()},get isPanelFocused(){return m()},set isPanelFocused(r){m(r),oe()},$set:Mt,$on:(r,n)=>Ut(x,r,n)},er=Ue();tt("keydown",gr,r=>E()&&Dr(r));var Mr=ue(er);{var Ur=r=>{var n=Ue(),I=ue(n);mr(I,()=>o().filePath,F=>{var ve=Ue(),Re=ue(ve);{var pe=b=>{var v=vo(),A=R(v),q=S(A,!0),W=p(A,2),Ee=S(W,!0);P(v),C(Z=>{g(q,Z),g(Ee,o().filePath)},[()=>d.layout_fileTab_outsideWorkspace_label()]),s(b,v)},Ae=b=>{var v=Ue(),A=ue(v);{var q=W=>{Gt(W,{get workspaceId(){return c()},get filePath(){return e(G)},get gitRootId(){return e(w)}})};re(A,W=>{E()&&W(q)})}s(b,v)},Oe=b=>{var v=Ue(),A=ue(v);{var q=Z=>{var X=fr(),ce=R(X),Me=S(ce,!0);P(X),C(me=>g(Me,me),[()=>d.layout_fileTab_errorLoading_label()]),s(Z,X)},W=Z=>{Rt(Z,{get filePath(){return o().filePath},get sourceUrl(){return se().url},allowDownload:!1})},Ee=Z=>{var X=po(),ce=R(X),Me=S(ce,!0);P(X),C(me=>g(Me,me),[()=>d.layout_fileTab_preparing_label()]),s(Z,X)};re(A,Z=>{se()?.error?Z(q):se()?.url?Z(W,1):Z(Ee,-1)})}s(b,v)},ft=b=>{var v=Ue(),A=ue(v);{var q=W=>{Gt(W,{get workspaceId(){return c()},get filePath(){return e(pt)}})};re(A,W=>{E()&&W(q)})}s(b,v)},_t=b=>{var v=fr(),A=R(v),q=S(A,!0);P(v),C(W=>g(q,W),[()=>d.file_pdf_load_error()]),s(b,v)},Ve=b=>{{let v=i(()=>e(D)??o().filePath),A=i(()=>!e(l)&&e(gt));Rt(b,{get filePath(){return e(v)},get sourceUrl(){return e(Qt)},onDownload:Ft,get allowDownload(){return e(A)},get downloading(){return e(st)}})}},Ke=b=>{var v=vr(),A=R(v),q=S(A,!0);P(v),C(W=>g(q,W),[()=>d.layout_fileTab_preparing_label()]),s(b,v)},lt=b=>{var v=mo(),A=R(v);Pt(A,20,()=>[...Array(20).keys()],q=>q,(q,W)=>{var Ee=go(),Z=R(Ee);ur(Z,{class:"h-3 w-8 shrink-0"});var X=p(Z,2);ur(X,{class:"h-3",style:`width: ${30+Math.random()*60}%`}),P(Ee),s(q,Ee)}),P(A),P(v),s(b,v)},ht=b=>{var v=bo(),A=R(v),q=S(A,!0),W=p(A,2),Ee=S(W,!0),Z=p(W,2);{var X=me=>{var He=_o(),dt=S(He,!0);C(()=>g(dt,e(ut))),s(me,He)};re(Z,me=>{e(kt)==="generic"&&me(X)})}var ce=p(Z,2);{var Me=me=>{var He=wo(),dt=ue(He),Wt=S(dt,!0),tr=p(dt,2);Pt(tr,20,()=>e(It),xt=>xt,(xt,rr)=>{var Bt=ho(),zr=R(Bt);Fe(zr,{variant:"link",size:"compact",class:"h-auto p-0 font-mono text-xs",onclick:()=>Sr(rr),children:(Lr,$o)=>{Ge();var ar=et();C(()=>g(ar,rr)),s(Lr,ar)},$$slots:{default:!0}}),P(Bt),s(xt,Bt)}),P(tr),C(xt=>g(Wt,xt),[()=>d.layout_fileTab_didYouMean_label()]),s(me,He)};re(ce,me=>{e(It).length>0&&me(Me)})}P(v),C(me=>{g(q,me),g(Ee,o().filePath)},[()=>co(e(kt))]),s(b,v)},wt=b=>{var v=xo(),A=R(v),q=S(A,!0),W=p(A,2),Ee=S(W,!0),Z=p(W,2);{var X=ce=>{{let Me=i(()=>!e(gt)||e(st));Fe(ce,{variant:"secondary",size:"sm",onclick:Ft,get disabled(){return e(Me)},children:(me,He)=>{Ge();var dt=et();C(Wt=>g(dt,Wt),[()=>d.layout_fileTab_downloadFile_label()]),s(me,dt)},$$slots:{default:!0}})}};re(Z,ce=>{!e(l)&&e(Be)&&ce(X)})}P(v),C(ce=>{g(q,ce),g(Ee,o().filePath)},[()=>d.editor_fileViewer_binary_label()]),s(b,v)},bt=b=>{const v=i(()=>o().filePath?.toLowerCase().endsWith(".svg"));var A=Ue(),q=ue(A);{var W=X=>{{let ce=i(()=>o().filePath||""),Me=i(()=>!e(l)&&e(gt));Rt(X,{get filePath(){return e(ce)},get fileContent(){return e(nt)},get language(){return e(Vt)},get isBinary(){return e(t)},onDownload:Ft,get allowDownload(){return e(Me)},get downloading(){return e(st)}})}},Ee=X=>{var ce=yo(),Me=R(ce);Ma(Me,{get content(){return e(nt)},get workspaceId(){return c()},get relativeMediaBase(){return e(At)},renderRichFencesAsCode:!0,renderDiagrams:!0}),P(ce),s(X,ce)},Z=X=>{var ce=Ir,Me=Cr;{let me=i(()=>B()?e(U):[]);_r(Kt(X,{get value(){return ce()},set value(He){Me(He)},get language(){return e(Vt)},get readOnly(){return e(l)},get fileName(){return o().filePath},get workspaceId(){return c()},get filePath(){return o().filePath},get lineWrapping(){return N()},get lineChanges(){return e(me)},get jumpTo(){return e(T)},get externalContentVersion(){return e(f)},get isPanelFocused(){return m()}}),He=>u(h,He,!0),()=>e(h))}};re(q,X=>{e(v)?X(W):e(Ct)&&e(L)?X(Ee,1):X(Z,-1)})}s(b,A)},Nt=b=>{var v=vr(),A=R(v),q=S(A,!0);P(v),C(W=>g(q,W),[()=>d.layout_fileTab_preparing_label()]),s(b,v)};re(Re,b=>{e(te)?b(pe):e(w)&&e(Te)&&e(G)?b(Ae,1):e(w)&&e(je)?b(Oe,2):e(Te)&&e(pt)?b(ft,3):e(Te)?b(_t,4):e(Qt)?b(Ve,5):e(je)?b(Ke,6):e($t)?b(lt,7):e(ut)?b(ht,8):e(t)?b(wt,9):e(nt)!==null?b(bt,10):b(Nt,-1)})}s(F,ve)}),s(r,n)};re(Mr,r=>{o().filePath&&r(Ur)})}s(K,er);var jr=zt(Er);return ze(),jr}export{Po as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{bo as C,t as wt,bq as M,a_ as D,by as Tt,bs as xt,b as kt,bu as N}from"./rfbsWJY8.js";import{bs as It,ca as Q,aD as t,a7 as Pt,ay as X,W as w,bn as At,bS as F,c9 as f,aA as V,aB as x,a5 as I,bA as P,bl as A,b_ as U,bO as S}from"./B8o4lNgr.js";import{D as St}from"./D5WwA0O_.js";import{c as Wt}from"./DcUVqsa0.js";import{C as R}from"./DypB-Dwi.js";import{L as $t}from"./D8dE5NKO.js";import"./
|
|
1
|
+
import{bo as C,t as wt,bq as M,a_ as D,by as Tt,bs as xt,b as kt,bu as N}from"./rfbsWJY8.js";import{bs as It,ca as Q,aD as t,a7 as Pt,ay as X,W as w,bn as At,bS as F,c9 as f,aA as V,aB as x,a5 as I,bA as P,bl as A,b_ as U,bO as S}from"./B8o4lNgr.js";import{D as St}from"./D5WwA0O_.js";import{c as Wt}from"./DcUVqsa0.js";import{C as R}from"./DypB-Dwi.js";import{L as $t}from"./D8dE5NKO.js";import"./Dnce1kL4.js";import"./Z4aRP2F9.js";import"./DYvAONpX.js";import{bb as Dt}from"./DPDCKuA3.js";import"./_hjrl4Qq.js";import"./Bu9lZqPK.js";import{Hi as B,HP as Nt,I3 as Ft,HU as Ut,tT as Bt}from"./CM_x_DK5.js";import{T as Et}from"./B0yoZLtl.js";import{g as Lt}from"./CoSk1zgY.js";import{dk as Ot}from"./BtwWpYbv.js";import{bN as Ht,bK as jt,b5 as Mt}from"./27ieI8Q7.js";import"./D1yEb1Sd.js";import{M as Vt}from"./C_J7hVU_.js";import{V as qt}from"./On5rgGG2.js";import{O as Rt}from"./BgAd01eY.js";import{c as Gt}from"./ChTqQfQN.js";import{i as Kt}from"./H2jLkRRS.js";const T=new $t({category:"change-converters"});function q(e,n){return e.path||e.file||e.filePath||e.relativePath||n?.filePath}function Y(e,n){return{additions:e.additions??n?.additions??0,deletions:e.deletions??n?.deletions??0,binary:e.binary??!1}}function zt(e,n){if(n.actor?.type==="agent"&&n.actor.id){const r=n.actor;return{agentId:r.id,agentName:r.name||C.fileTracking_changeTimeline_agent_fallback(),sessionId:r.sessionId||e.sessionId||"",turnNumber:r.turnNumber??e.turnNumber??0,messageId:r.messageId,timestamp:new Date(n.timestamp).getTime()}}if(e.agentId)return{agentId:e.agentId,agentName:e.agentName||C.fileTracking_changeTimeline_agent_fallback(),sessionId:e.sessionId||"",turnNumber:e.turnNumber||0,timestamp:new Date(n.timestamp).getTime()}}function Z(e,n){return{timestamp:new Date(e.timestamp).getTime(),manual:e.actor?.type==="user",agent:zt(n,e)}}function tt(e,n){return{oldContent:n?.oldContent??e.oldContent,newContent:n?.newContent??e.newContent,diff:e.diff??n?.diff}}function et(e,n,r){return r!==void 0?`${e}-${n}-${r}`:`${e}-${n}`}function Jt(e){try{const n=e.data||{},r=e.codeChange;T.debug("Converting event to TrackedChange",{eventType:e.type,eventId:e.id,hasData:!!n,hasCodeChange:!!r});const c=q(n,r);if(e.type.startsWith("file:")&&c){const d=Y(n,r);return T.debug("Creating TrackedChange for file event",{filePath:c,stats:d,hasDiff:!!(n.diff||r?.diff)}),[{id:et("event",e.id),file:c,relativePath:c,stage:R.Unstaged,stats:d,attribution:Z(e,n),content:tt(n,r)}]}return(e.type==="agent:completed"||e.type.startsWith("agent:"))&&n.fileChanges&&Array.isArray(n.fileChanges)?(T.debug("Creating TrackedChanges for agent event",{eventType:e.type,fileChangesCount:n.fileChanges.length,agentId:n.agentId}),n.fileChanges.filter(d=>q(d)?!0:(T.warn("Skipping file change without path",{change:d}),!1)).map((d,s)=>{const v=q(d);if(!v)throw new Error("file change without path");return{id:et("event",e.id,s),file:v,relativePath:v,stage:R.Unstaged,stats:Y(d),attribution:Z(e,n),content:tt(d)}})):(T.debug("No TrackedChanges created for event",{eventType:e.type,eventId:e.id,hasFilePath:!!c,hasFileChanges:!!(n.fileChanges&&Array.isArray(n.fileChanges))}),[])}catch(n){return T.error("Error converting event to TrackedChange",n instanceof Error?n:new Error(String(n)),{eventType:e.type,eventId:e.id}),[]}}function Qt(e){if(!e)return{oldContent:"",newContent:""};const n=[],r=[],c=e.split(`
|
|
2
2
|
`);c.length>0&&c[c.length-1]===""&&c.pop();let d=!1;for(const s of c)if(!(s.startsWith("diff --git")||s.startsWith("index ")||s.startsWith("--- ")||s.startsWith("+++ ")||s.startsWith("\"))){if(s.startsWith("@@")){d=!0;continue}d&&(s.startsWith("+")?r.push(s.slice(1)):s.startsWith("-")?n.push(s.slice(1)):s.startsWith(" ")?(n.push(s.slice(1)),r.push(s.slice(1))):s===""&&(n.push(""),r.push("")))}return{oldContent:n.join(`
|
|
3
3
|
`),newContent:r.join(`
|
|
4
4
|
`)}}var Xt=x("<!> <!>",1),Yt=x('<div class="flex items-center gap-1.5 px-3 py-1.5 text-xs text-subtle bg-muted/50 border-b border-border"><span> </span></div>'),Zt=x('<div class="flex flex-col h-full"><!> <div class="flex-1 min-h-0"><!></div></div>'),te=x('<div class="flex flex-col items-center justify-center h-full text-subtle gap-4"><p class="text-sm"> </p> <p class="text-xs opacity-70"> </p></div>'),ee=x('<p class="text-xs opacity-70"> </p>'),ne=x('<div class="flex flex-col items-center justify-center h-full text-subtle gap-4"><p class="text-sm"> </p> <!></div>');function ae(e,n){if(new.target)return wt({component:ae,...e});It(n,!0);const r=()=>N(lt,"$workspace",v),c=()=>N(st,"$foldUnchanged",v),d=()=>N(rt,"$lineWrapping",v),s=()=>N(ot,"$diffSideBySide",v),[v,nt]=xt(),at=a=>{qt(a,{embedded:!0,get foldEnabled(){return c()},onToggleFold:()=>B.dispatch(Ut()),get wrapEnabled(){return d()},onToggleWrap:()=>B.dispatch(Ft()),get splitEnabled(){return s()},onToggleSplit:()=>B.dispatch(Nt())})},it=a=>{var i=Xt(),g=X(i);{let m=f(()=>C.layout_diffHeader_goToFile_tooltip());Wt(g,()=>Vt,(l,h)=>{h(l,{get icon(){return Dt},get label(){return t(m)},onclick:$=>ut()})})}var b=F(g,2);{var y=m=>{Rt(m,{get filePath(){return t(K)},get workspaceId(){return _()},isDirectory:!1,embedded:!0,get workspaceFolderPath(){return t(O)}})};D(b,m=>{t(K)&&m(y)})}w(a,i)},rt=Ht(),st=jt(),ot=Mt(),dt=Gt("ActivityChangesTabType");let E=M(n,"tab",7),_=M(n,"workspaceId",7),L=M(n,"isActive",7);const G=Lt(),lt=Ot(_()),O=f(()=>r()?.worktreePath||r()?.repositoryPath||void 0),o=f(()=>E().data?.event),ct=f(()=>t(o)?Jt(t(o)):[]),u=f(()=>t(ct)[0]),p=f(()=>t(u)?.relativePath||t(u)?.file||null),K=f(()=>t(p)&&t(O)?Kt(t(p))?t(p):`${t(O)}/${t(p)}`:null),H=f(()=>()=>{if(!t(o))return null;const a=t(o).data,i=t(o).codeChange;return a?.diff||i?.diff||t(u)?.content?.diff||null}),z=f(()=>()=>t(u)?.content?!!(t(u).content.oldContent&&t(u).content.newContent):!1);function ft(a){if(!a)return;const i=a.match(/@@ -(\d+)/);return i?parseInt(i[1],10):void 0}const k=f(()=>{if(t(z)()&&t(u)?.content)return{oldContent:t(u).content.oldContent??"",newContent:t(u).content.newContent??""};const a=t(H)();return a?Qt(a):null}),W=f(()=>ft(t(H)())),pt=f(()=>t(W)!==void 0&&t(W)>1),gt=f(()=>{const a=t(p)||"",i=t(o)?.data||{};return{id:`activity-${t(o)?.id||"unknown"}-${a}`,file:a,relativePath:a,stage:R.Committed,status:t(u)?.status||"modified",stats:{additions:i?.additions||t(u)?.stats?.additions||0,deletions:i?.deletions||t(u)?.stats?.deletions||0},attribution:{timestamp:t(o)?.timestamp?new Date(t(o).timestamp).getTime():Date.now()},content:t(k)?{oldContent:t(k).oldContent,newContent:t(k).newContent}:void 0}});function ut(a){if(!t(p))return;const g={type:"file",title:t(p).split("/").pop()||t(p),closable:!0,filePath:t(p),workspaceId:_()};B.dispatch(Bt(_(),g))}Q(()=>{!G||!L()||G.registerActions({display:at,actions:it})}),Q(()=>{if(t(o)){const a=t(o).data;dt.debug("Activity event diff info",{eventType:t(o).type,eventId:t(o).id,filePath:t(p),hasDiffString:!!t(H)(),hasOldNewContent:t(z)(),hasDiffContents:!!t(k),dataAdditions:a?.additions,dataDeletions:a?.deletions})}});var ht={get tab(){return E()},set tab(a){E(a),V()},get workspaceId(){return _()},set workspaceId(a){_(a),V()},get isActive(){return L()},set isActive(a){L(a),V()},$set:Tt,$on:(a,i)=>kt(n,a,i)},J=Pt(),mt=X(J);{var vt=a=>{var i=Zt(),g=I(i);{var b=l=>{var h=Yt(),$=I(h),j=A($,!0);P(h),U(_t=>S(j,_t),[()=>C.layout_activityChanges_partialDiff_label({line:t(W)??0})]),w(l,h)};D(g,l=>{t(pt)&&l(b)})}var y=F(g,2),m=I(y);St(m,()=>`${t(o)?.id}-${t(p)}`,l=>{{let h=f(()=>s()?"split":"unified");Et(l,{get change(){return t(gt)},get workspaceId(){return _()},get viewMode(){return t(h)},get foldUnchanged(){return c()},get lineWrapping(){return d()},get lineOffset(){return t(W)}})}}),P(y),P(i),w(a,i)},bt=a=>{var i=te(),g=I(i),b=A(g,!0),y=F(g,2),m=A(y,!0);P(i),U((l,h)=>{S(b,l),S(m,h)},[()=>C.layout_activityChanges_noDiffStored_label(),()=>C.layout_activityChanges_diffNotCaptured_description()]),w(a,i)},yt=a=>{var i=ne(),g=I(i),b=A(g,!0),y=F(g,2);{var m=l=>{var h=ee(),$=A(h,!0);U(j=>S($,j),[()=>C.layout_activityChanges_eventType_label({type:t(o).type})]),w(l,h)};D(y,l=>{t(o)&&l(m)})}P(i),U(l=>S(b,l),[()=>C.layout_activityChanges_noChanges_label()]),w(a,i)};D(mt,a=>{t(p)&&t(k)?a(vt):t(p)?a(bt,1):a(yt,-1)})}w(e,J);var Ct=At(ht);return nt(),Ct}export{ae as default};
|