@intent-hq/web 2.284.0 → 2.285.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/web/app/immutable/chunks/{BLEfessf.js → -KtznSS-.js} +1 -1
- package/web/app/immutable/chunks/{BfCf1CX7.js → 1lVCCXL6.js} +1 -1
- package/web/app/immutable/chunks/{rL78ODLZ.js → 2eBUyHOS.js} +1 -1
- package/web/app/immutable/chunks/{D-aPtTCv.js → 6ASkEKEx.js} +1 -1
- package/web/app/immutable/chunks/{C6Lk-C_n.js → 70g8kmTR.js} +1 -1
- package/web/app/immutable/chunks/{CclADFoZ.js → 9s6R6NFl.js} +1 -1
- package/web/app/immutable/chunks/{BghJZEqX.js → ASxUuKIZ.js} +1 -1
- package/web/app/immutable/chunks/{BYvXj8cv.js → B0UymEvm.js} +1 -1
- package/web/app/immutable/chunks/{BoffG-0C.js → B0a31Ljt.js} +1 -1
- package/web/app/immutable/chunks/{gNzz3jGE.js → B4GCMjY3.js} +1 -1
- package/web/app/immutable/chunks/B4kKZm1B.js +1 -0
- package/web/app/immutable/chunks/{Dkj8SIBR.js → B91hcydD.js} +1 -1
- package/web/app/immutable/chunks/{Bj2uvmt-.js → B9DD1rvd.js} +1 -1
- package/web/app/immutable/chunks/{B1s7HAuZ.js → BA2m5W5p.js} +1 -1
- package/web/app/immutable/chunks/{CajYOO74.js → BB-v27nE.js} +1 -1
- package/web/app/immutable/chunks/{CeMTgCB3.js → BDnf9UFd.js} +1 -1
- package/web/app/immutable/chunks/{DyQA18KQ.js → BEu9jjb7.js} +1 -1
- package/web/app/immutable/chunks/{Byp8PswU.js → BFDtkLj3.js} +1 -1
- package/web/app/immutable/chunks/{C-AxUu93.js → BFlCxloC.js} +1 -1
- package/web/app/immutable/chunks/{DR4RT4VO.js → BLT4lwJH.js} +1 -1
- package/web/app/immutable/chunks/{CyO8AnLs.js → BMCIczJY.js} +1 -1
- package/web/app/immutable/chunks/{BcemBG1g.js → BMqkZHSQ.js} +4 -4
- package/web/app/immutable/chunks/{DcoQTetB.js → BOxsG-23.js} +1 -1
- package/web/app/immutable/chunks/{D2hiI0dA.js → BRaDvZhu.js} +1 -1
- package/web/app/immutable/chunks/{BUtQhKox.js → BRiWAWWR.js} +1 -1
- package/web/app/immutable/chunks/{vICHfDZm.js → BRrnGZdq.js} +1 -1
- package/web/app/immutable/chunks/{8n4ougjP.js → BRsvqYQJ.js} +1 -1
- package/web/app/immutable/chunks/{Bj6-QOR3.js → BW5WMYMF.js} +1 -1
- package/web/app/immutable/chunks/{DZ-8K7hK.js → BYD9CrbJ.js} +1 -1
- package/web/app/immutable/chunks/{CEkEURUB.js → BerKnKvV.js} +1 -1
- package/web/app/immutable/chunks/{J2ZKQ-lu.js → BfCM8g6D.js} +1 -1
- package/web/app/immutable/chunks/{BFDD1pyQ.js → Bi5G5jdW.js} +1 -1
- package/web/app/immutable/chunks/{BSLrzoVf.js → BijxVENA.js} +1 -1
- package/web/app/immutable/chunks/{JqZ92YB_.js → BioKfdhs.js} +1 -1
- package/web/app/immutable/chunks/{5ZpW5rVB.js → Bj2REgAl.js} +1 -1
- package/web/app/immutable/chunks/{5BmKVYc1.js → Bj2YjLqH.js} +4 -4
- package/web/app/immutable/chunks/{B8xgoeqo.js → BkTES_s_.js} +1 -1
- package/web/app/immutable/chunks/{oPjZ8e3L.js → BlGCnZqu.js} +1 -1
- package/web/app/immutable/chunks/{CBF5TBJQ.js → BoAgG62K.js} +1 -1
- package/web/app/immutable/chunks/{cesw6DqW.js → Bpei5bK8.js} +1 -1
- package/web/app/immutable/chunks/{CqyYuyXE.js → BqEq2gS8.js} +1 -1
- package/web/app/immutable/chunks/{Bir-_mB8.js → BrPrpju0.js} +1 -1
- package/web/app/immutable/chunks/{DbdgMxO8.js → Btdv9Hrh.js} +1 -1
- package/web/app/immutable/chunks/{C1FIrZNw.js → BuKPgt_Y.js} +1 -1
- package/web/app/immutable/chunks/{CLDGr3DL.js → BuRX-tbO.js} +1 -1
- package/web/app/immutable/chunks/{BQqtq_EY.js → Butq4Y1l.js} +4 -4
- package/web/app/immutable/chunks/{CoEKpjkL.js → BwcCzTcz.js} +1 -1
- package/web/app/immutable/chunks/{DxyRwm0L.js → C-PJ15bY.js} +1 -1
- package/web/app/immutable/chunks/{D0GCGQZA.js → C4eeWJf-.js} +1 -1
- package/web/app/immutable/chunks/{lKWYFdqV.js → C4mRaa7L.js} +1 -1
- package/web/app/immutable/chunks/{BOV2-YtX.js → C5vTcsb2.js} +1 -1
- package/web/app/immutable/chunks/{Dwola7mR.js → C64d2sYd.js} +1 -1
- package/web/app/immutable/chunks/{D9ZfYqMq.js → C7A26Vlu.js} +1 -1
- package/web/app/immutable/chunks/{kjKGIJZ6.js → C8BEXIPc.js} +1 -1
- package/web/app/immutable/chunks/{DWW4w6Jk.js → C8xd2WWY.js} +1 -1
- package/web/app/immutable/chunks/{CWMWrTe0.js → C9o24MoC.js} +1 -1
- package/web/app/immutable/chunks/{7IZupueL.js → CAkMXI-6.js} +3 -3
- package/web/app/immutable/chunks/{LoyMyTg_.js → CDnN0LSW.js} +1 -1
- package/web/app/immutable/chunks/{Ri_Gwy-5.js → CEQqb3fD.js} +1 -1
- package/web/app/immutable/chunks/{DPd_IJJ7.js → CFzJYgT5.js} +1 -1
- package/web/app/immutable/chunks/{DSJT83nX.js → CHXt_ftw.js} +1 -1
- package/web/app/immutable/chunks/{RAzXpC6i.js → CHaUiotE.js} +1 -1
- package/web/app/immutable/chunks/{BIkNHTNp.js → CHjSilfW.js} +1 -1
- package/web/app/immutable/chunks/{CLCaT9pi.js → CJQrM64N.js} +3 -3
- package/web/app/immutable/chunks/{U9YbfUz9.js → CMO5zsjQ.js} +1 -1
- package/web/app/immutable/chunks/{BCkgwkHF.js → CMt5MqSJ.js} +1 -1
- package/web/app/immutable/chunks/{580ALcE7.js → COL0pyet.js} +1 -1
- package/web/app/immutable/chunks/{D_mcoMIN.js → CQ7Jnj9E.js} +1 -1
- package/web/app/immutable/chunks/{DoBcYmem.js → CRhgbDg2.js} +5 -5
- package/web/app/immutable/chunks/{DDi4fKeR.js → CTozw_6a.js} +1 -1
- package/web/app/immutable/chunks/{--3ZEJ9J.js → CTwzQE4y.js} +1 -1
- package/web/app/immutable/chunks/{Dk3JYfn4.js → CULilvBT.js} +1 -1
- package/web/app/immutable/chunks/{BnZq-I73.js → CV2PaujE.js} +2 -2
- package/web/app/immutable/chunks/{bin8Us0N.js → CVUNrf_6.js} +1 -1
- package/web/app/immutable/chunks/{GJVVHDkb.js → CWgAcLvx.js} +1 -1
- package/web/app/immutable/chunks/{CTthB0JK.js → CYElNz1m.js} +1 -1
- package/web/app/immutable/chunks/{CoQLGQdj.js → CZUDc12W.js} +1 -1
- package/web/app/immutable/chunks/{Bmnp4Cni.js → CdT170lG.js} +6 -6
- package/web/app/immutable/chunks/{B96HYSUr.js → Ceyasj46.js} +1 -1
- package/web/app/immutable/chunks/{IrWlayTZ.js → CfAqizJ3.js} +1 -1
- package/web/app/immutable/chunks/{D8GxmJaV.js → CfYh5raT.js} +1 -1
- package/web/app/immutable/chunks/{DkJafW99.js → CgWJ7tKh.js} +1 -1
- package/web/app/immutable/chunks/{CwYn_cZy.js → ChDcu7sM.js} +1 -1
- package/web/app/immutable/chunks/{C-tRLOED.js → ChmO5DTP.js} +1 -1
- package/web/app/immutable/chunks/{CXruy7R4.js → Cj_Tm5wU.js} +1 -1
- package/web/app/immutable/chunks/{BXwgWEmz.js → CkNc-1DL.js} +1 -1
- package/web/app/immutable/chunks/{DpiQDkOO.js → CkqPtSf5.js} +1 -1
- package/web/app/immutable/chunks/{Cci8BWX_.js → ClNs6jou.js} +1 -1
- package/web/app/immutable/chunks/{qb0bPcr5.js → CotgBJSP.js} +1 -1
- package/web/app/immutable/chunks/{CHK5bSfe.js → CoyHhRwd.js} +1 -1
- package/web/app/immutable/chunks/{Dd_avILP.js → CozIiFS7.js} +1 -1
- package/web/app/immutable/chunks/{B5HPrVzu.js → Cp09JH6d.js} +1 -1
- package/web/app/immutable/chunks/{BYhzE2Id.js → CpPsvdhC.js} +1 -1
- package/web/app/immutable/chunks/{v3KbAU5c.js → CrXlvCkv.js} +1 -1
- package/web/app/immutable/chunks/{DKwy0FDy.js → Crq4Js3_.js} +1 -1
- package/web/app/immutable/chunks/{BZjntufp.js → CvZhT_UL.js} +1 -1
- package/web/app/immutable/chunks/{Ds-TYeKV.js → Cve5pOPi.js} +2 -2
- package/web/app/immutable/chunks/{CQMmROUx.js → CwK4Fl7A.js} +2 -2
- package/web/app/immutable/chunks/{Bhov0MTz.js → Cwxvd99b.js} +1 -1
- package/web/app/immutable/chunks/{CbNazQqj.js → Cz9_gz0r.js} +1 -1
- package/web/app/immutable/chunks/{CXu6aWOL.js → Czc4IAh9.js} +1 -1
- package/web/app/immutable/chunks/{BmY5L1Op.js → Czzw_Pvc.js} +1 -1
- package/web/app/immutable/chunks/{BCHni7By.js → D0csyvlS.js} +1 -1
- package/web/app/immutable/chunks/{pl6-mRrC.js → D1dPbxoX.js} +1 -1
- package/web/app/immutable/chunks/{CNzOZ9MW.js → D2Fdja4t.js} +1 -1
- package/web/app/immutable/chunks/{DPfdnkfB.js → D38kCxZ9.js} +1 -1
- package/web/app/immutable/chunks/{DZpe54cf.js → D4K0RFHm.js} +1 -1
- package/web/app/immutable/chunks/{BLjf4WQt.js → D4RvTAYA.js} +1 -1
- package/web/app/immutable/chunks/{DG8rkBW-.js → D6XYE7JV.js} +1 -1
- package/web/app/immutable/chunks/{k5qVf45I.js → D6dtEt_1.js} +1 -1
- package/web/app/immutable/chunks/{DOdMtNpo.js → D72pFxfr.js} +1 -1
- package/web/app/immutable/chunks/{D6K58w6v.js → D7P2CXpO.js} +3 -3
- package/web/app/immutable/chunks/{BE5jLkkZ.js → D82TCSK5.js} +1 -1
- package/web/app/immutable/chunks/{CJuSN2hh.js → D8HMZQ9R.js} +1 -1
- package/web/app/immutable/chunks/{syg_Gxp6.js → D8U0PEIU.js} +1 -1
- package/web/app/immutable/chunks/{CrPyrftw.js → DB6_aOnf.js} +1 -1
- package/web/app/immutable/chunks/{4kHCfKWR.js → DB_2g4tK.js} +1 -1
- package/web/app/immutable/chunks/{1wcS2GHA.js → DBicYI5c.js} +1 -1
- package/web/app/immutable/chunks/{BQu3cSOx.js → DFXw4s8S.js} +1 -1
- package/web/app/immutable/chunks/{CCzzpn5X.js → DFvnP41F.js} +1 -1
- package/web/app/immutable/chunks/{BmeKmSN1.js → DG5KvEVf.js} +1 -1
- package/web/app/immutable/chunks/{oU2ii1bq.js → DKF2EjTY.js} +1 -1
- package/web/app/immutable/chunks/{BSIOWZWq.js → DOPcy6T2.js} +1 -1
- package/web/app/immutable/chunks/{Dzk1FZ-5.js → DPY72hn4.js} +1 -1
- package/web/app/immutable/chunks/{CAS7It7T.js → DQafeec3.js} +1 -1
- package/web/app/immutable/chunks/{D6CS23-9.js → DRdRLmUz.js} +1 -1
- package/web/app/immutable/chunks/{D5bYJMaB.js → DWzbf_aU.js} +1 -1
- package/web/app/immutable/chunks/{BAyTpaq3.js → DX0AlGFV.js} +1 -1
- package/web/app/immutable/chunks/{DI5O_gLl.js → DX0hE1oC.js} +1 -1
- package/web/app/immutable/chunks/{BxFP5cPu.js → DX3MlPN0.js} +1 -1
- package/web/app/immutable/chunks/{Tpzyol5T.js → DXJ3D6-0.js} +2 -2
- package/web/app/immutable/chunks/{wXtCM_sb.js → DYX4kEq9.js} +1 -1
- package/web/app/immutable/chunks/{BuSZooEw.js → DZRaa7LH.js} +1 -1
- package/web/app/immutable/chunks/{BMBobKUo.js → Dbuv3b_7.js} +2 -2
- package/web/app/immutable/chunks/{CEZnJlwn.js → DhQAmnDS.js} +1 -1
- package/web/app/immutable/chunks/{BrvhC6GL.js → DhkOw60r.js} +1 -1
- package/web/app/immutable/chunks/{D805RV1I.js → Dijv8faG.js} +1 -1
- package/web/app/immutable/chunks/{Djthn66V.js → DlYL66WK.js} +2 -2
- package/web/app/immutable/chunks/{BS6Z2wWv.js → DlYrPe_w.js} +1 -1
- package/web/app/immutable/chunks/{cfTDb37Y.js → Dlu0_GVa.js} +1 -1
- package/web/app/immutable/chunks/{BNfbL3_i.js → DpXfO8nM.js} +1 -1
- package/web/app/immutable/chunks/{BE6av5p4.js → DuKFlC9j.js} +1 -1
- package/web/app/immutable/chunks/{DqUTyEPN.js → DwW5MiN3.js} +1 -1
- package/web/app/immutable/chunks/{BRk6sSrF.js → DxJXJeWp.js} +1 -1
- package/web/app/immutable/chunks/{03ESLWB1.js → DxlpLNnB.js} +1 -1
- package/web/app/immutable/chunks/{BYB7SynS.js → F42L1irN.js} +1 -1
- package/web/app/immutable/chunks/{FcnPtqUv.js → I1eQnBry.js} +1 -1
- package/web/app/immutable/chunks/{B5KLQb3J.js → J5Q3706J.js} +1 -1
- package/web/app/immutable/chunks/{mf6N49ed.js → JUqct0gC.js} +1 -1
- package/web/app/immutable/chunks/{BxUDfZfX.js → KxpMwUsB.js} +1 -1
- package/web/app/immutable/chunks/{BKAQdyqG.js → LiYeJQ_y.js} +1 -1
- package/web/app/immutable/chunks/{CZ1Jg-sG.js → Qyi-W7KZ.js} +1 -1
- package/web/app/immutable/chunks/{CyBNkEuV.js → RDcDz1X1.js} +1 -1
- package/web/app/immutable/chunks/{Blhl4Kzo.js → SlH326tK.js} +1 -1
- package/web/app/immutable/chunks/{lLF0vfI3.js → UMObs5wi.js} +1 -1
- package/web/app/immutable/chunks/{BEQXbC7q.js → Uv0U-1kP.js} +1 -1
- package/web/app/immutable/chunks/{DIvWSFnj.js → WPmFGY7m.js} +1 -1
- package/web/app/immutable/chunks/{DRYCjR4c.js → Xb_csWgU.js} +1 -1
- package/web/app/immutable/chunks/{aVNMqNTp.js → Y3UAS5wV.js} +1 -1
- package/web/app/immutable/chunks/{CZFoI5QY.js → YpQeV5ep.js} +6 -6
- package/web/app/immutable/chunks/{DO0tFr72.js → _Y7Nvr11.js} +1 -1
- package/web/app/immutable/chunks/{lflImyZ6.js → _bgnudZi.js} +2 -2
- package/web/app/immutable/chunks/{CRQOCmwo.js → _eQjP0_7.js} +7 -7
- package/web/app/immutable/chunks/{C6NP7Wkf.js → c0MObYhr.js} +1 -1
- package/web/app/immutable/chunks/{CYvdhBss.js → hAyFyjes.js} +1 -1
- package/web/app/immutable/chunks/{BLjxHwvZ.js → iPSaMdjW.js} +1 -1
- package/web/app/immutable/chunks/{Jyr4akMd.js → ingscYYg.js} +1 -1
- package/web/app/immutable/chunks/{goXBWNik.js → lrd8vBcb.js} +1 -1
- package/web/app/immutable/chunks/{BlhXsK8K.js → nvBTDqJi.js} +1 -1
- package/web/app/immutable/chunks/{CzfXsXYz.js → oDL-pLcj.js} +1 -1
- package/web/app/immutable/chunks/{C83cffhG.js → s4JAFzR2.js} +1 -1
- package/web/app/immutable/chunks/{DyaiTi8A.js → sgXcAFR7.js} +1 -1
- package/web/app/immutable/chunks/{DQ_zmHT9.js → t61BPD62.js} +1 -1
- package/web/app/immutable/chunks/{CRqiQDbX.js → t7uelISx.js} +1 -1
- package/web/app/immutable/chunks/{CzTIJ9gY.js → tWOclZbM.js} +1 -1
- package/web/app/immutable/chunks/{i_sqIi_B.js → u9Jr5xJ2.js} +1 -1
- package/web/app/immutable/chunks/{CtwCGSFA.js → uKt9v9GZ.js} +1 -1
- package/web/app/immutable/chunks/{CsP-2ecL.js → xS44oH53.js} +1 -1
- package/web/app/immutable/chunks/{CX89Aogf.js → yQykulND.js} +1 -1
- package/web/app/immutable/chunks/{NfelpfPi.js → z5aynuor.js} +1 -1
- package/web/app/immutable/chunks/{B1P0TORE.js → zOdhHtWD.js} +1 -1
- package/web/app/immutable/chunks/{C1GRqLCq.js → zuhzlizP.js} +1 -1
- package/web/app/immutable/entry/{app.Cn1_ubOc.js → app.ZJRI8LL8.js} +2 -2
- package/web/app/immutable/entry/start.B_ChBWnN.js +1 -0
- package/web/app/immutable/nodes/{0.wKUTDWdz.js → 0.B_5IeAcY.js} +1 -1
- package/web/app/immutable/nodes/{1.DxJUaPzW.js → 1.D2RcMrk8.js} +1 -1
- package/web/app/immutable/nodes/{10.eeMW9oGM.js → 10.a-yBB_mg.js} +1 -1
- package/web/app/immutable/nodes/{14.DMbmYykJ.js → 14.BRMrhd95.js} +1 -1
- package/web/app/immutable/nodes/{16.D7z1ouJw.js → 16.DsObfcQu.js} +2 -2
- package/web/app/immutable/nodes/{2.BHOa4yl6.js → 2.BX2UV9md.js} +3 -3
- package/web/app/immutable/nodes/{3.DLeJMfu1.js → 3.BAb5j4vs.js} +1 -1
- package/web/app/immutable/nodes/{4.BEPpJpXB.js → 4.i3m7hv4J.js} +1 -1
- package/web/app/immutable/nodes/{5.Cb4CR-KH.js → 5.kQ7xzuNs.js} +1 -1
- package/web/app/immutable/nodes/{6.Bko4vkVy.js → 6.De5Z6N1w.js} +1 -1
- package/web/app/immutable/nodes/{7.z66lh95v.js → 7.Dqm5QJxM.js} +1 -1
- package/web/app/immutable/nodes/{8.Cykwxl0x.js → 8.BT-G_bE5.js} +2 -2
- package/web/app/immutable/nodes/{9.Bm3FCmVg.js → 9.DIcsOChV.js} +1 -1
- package/web/app/version.json +1 -1
- package/web/index.html +9 -9
- package/web/app/immutable/chunks/DsYKN9zh.js +0 -1
- package/web/app/immutable/entry/start.7mFy7hlx.js +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/
|
|
2
|
-
var za=Object.defineProperty;var Ba=(a,t,r)=>t in a?za(a,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):a[t]=r;var lt=(a,t,r)=>Ba(a,typeof t!="symbol"?t+"":t,r);import{bo as A,t as tt,bq as I,a_ as ie,by as at,b as rt,bs as Va,bu as Qt,_ as ka}from"./D4MoKNoK.js";import{bs as nt,a5 as N,aD as e,bA as L,b_ as X,W as H,bn as st,c9 as E,aA as M,aB as z,ca as kt,bk as ya,c6 as Ka,cd as Wt,bV as ne,bS as O,ay as Fe,bl as me,bO as ge,ai as xa,a7 as Ut,c0 as ja,bf as Nt,bH as q,aw as He,aj as Ae,be as Ga,c3 as ut,bb as Mt,aF as Ya,br as $a,bj as Qa}from"./B8o4lNgr.js";import{d as Za,f as Ja,k as qe,l as Ct,s as Z,a as Xe,h as zt,i as Xa}from"./WVYGrHqE.js";import{aM as er,cT as tr,L as ar,au as rr,dg as nr,V as sr,dj as Aa,B as or,$ as ir}from"./dimBDqRX.js";import{t as Bt}from"./Ds7can9q.js";import{a3 as cr,af as lr,A as dr,n as ur,a0 as Ia,q as Vt,$ as Kt,au as yt,aS as Ma,m as fr,aw as pr,aR as mr}from"./5BmKVYc1.js";import{l as Zt}from"./D6K58w6v.js";import{bu as gr,br as vr,bs as Jt,ac as hr}from"./C_fEvnNK.js";import{w as dt,P as br}from"./BQ-Vdhjp.js";import{f as jt,bb as Ht}from"./DgFojmqv.js";import{t as Oe,v as wr,H as It,E as Xt,c as ea}from"./C8yAGnZY.js";import{qb as Ca,G2 as ve,lp as _r,fr as kr,mh as yr,sA as xr,a as Ar,t_ as Ir,rq as Mr,pV as Cr,g as Sr,b9 as ta,tf as Rr,re as Er,th as Tr}from"./C51KzdSG.js";import{c as Pr,l as ht}from"./ChTqQfQN.js";import{o as Fr}from"./CBF5TBJQ.js";import{aN as Lr,aO as aa,bv as Wr,ay as Nr,bu as Hr,aC as qr,cT as Or,cH as Dr,F as bt,av as ra,bD as Ur,by as zr}from"./CG5J-qd_.js";import{l as Br}from"./Di6XfBOT.js";import{p as Vr,cG as wt,cF as na,ak as Kr,cI as Sa,a4 as St,ay as Ra,aO as jr,ar as Gr,a3 as sa,r as Yr,aF as $r,aK as Qr,E as Zr}from"./DQ_zmHT9.js";import{s as qt}from"./WZHg24tN.js";import{b as et}from"./D2g8BuR1.js";import{s as Jr}from"./CS1d84Cn.js";import{c as Xr,u as en,s as tn,a as an}from"./D2AmAQEr.js";import{Q as oa,N as ia}from"./BMBobKUo.js";import{g as ca}from"./DOE_TCNp.js";import{T as la}from"./Sk9pLJI5.js";const rn=new Set(["failed","blocked","needs_attention","in_progress"]),nn={failed:{visual:"icon",icon:Dr,className:"text-foreground"},blocked:{visual:"icon",icon:Or,className:"text-danger"},needs_attention:{visual:"icon",icon:qr,className:"text-warning-ink"},in_progress:{visual:"dot",icon:null,className:"workspace-status-color-active"},waiting:{visual:"icon",icon:Hr,className:"text-muted-foreground"},unread:{visual:"dot",icon:null,className:"workspace-status-color-unread"},not_started:{visual:"dot",icon:null,className:"text-muted-foreground/35"},idle:{visual:"dot",icon:null,className:"text-muted-foreground/35"},complete:{visual:"icon",icon:Nr,className:"text-success"},pr_queued:{visual:"icon",icon:Wr,className:"text-info"},pr_ready:{visual:"icon",icon:aa,className:"text-success"},pr_open:{visual:"icon",icon:aa,className:"text-info"},pr_merged:{visual:"icon",icon:Lr,className:"text-purple-500"}};function sn(a){switch(a){case"failed":return A.workspace_statusIcon_failed_label();case"blocked":return A.workspace_statusIcon_blocked_label();case"needs_attention":return A.workspace_statusIcon_needsAttention_label();case"in_progress":return A.workspace_statusIcon_inProgress_label();case"waiting":return A.workspace_taskStatus_waiting_label();case"unread":return A.layout_activeCard_unread_header();case"not_started":return A.workspace_statusIcon_notStarted_label();case"idle":return A.workspace_statusIcon_idle_label();case"complete":return A.workspace_statusIcon_complete_label();case"pr_queued":return A.workspace_statusIcon_prQueued_label();case"pr_ready":return A.workspace_statusIcon_prReady_label();case"pr_open":return A.workspace_statusIcon_prOpen_label();case"pr_merged":return A.workspace_statusIcon_prMerged_label()}}function on(a){const t=Ca(a.displayStatus)?a.displayStatus:"not_started";return rn.has(t)?t:a.attention==="unread"?"unread":a.waiting===!0?"waiting":t}function Ea(a){const t=a==="waiting"||a==="unread"||Ca(a)?a:"not_started",r=sn(t);return{state:t,...nn[t],label:r,tooltip:r,accessibleName:r}}var cn=z('<span class="workspace-status-dot svelte-14zk5l0" data-workspace-status-dot=""></span>'),ln=z("<span><!></span>");function Ta(a,t){if(new.target)return tt({component:Ta,...a});nt(t,!0);let r=I(t,"status",7),l=I(t,"size",7,14),c=I(t,"decorative",7,!1),u=I(t,"class",7);const s=E(()=>Ea(r()));var o={get status(){return r()},set status(m){r(m),M()},get size(){return l()},set size(m=14){l(m),M()},get decorative(){return c()},set decorative(m=!1){c(m),M()},get class(){return u()},set class(m){u(m),M()},$set:at,$on:(m,k)=>rt(t,m,k)},g=ln(),x=N(g);{var b=m=>{var k=cn();H(m,k)},w=m=>{bt(m,{get icon(){return e(s).icon},class:"size-full!"})};ie(x,m=>{e(s).visual==="dot"?m(b):e(s).icon&&m(w,1)})}return L(g),X(m=>{qe(g,1,m,"svelte-14zk5l0"),Ct(g,`width: ${l()??""}px; height: ${l()??""}px;`),Z(g,"role",c()?void 0:"img"),Z(g,"aria-label",c()?void 0:e(s).accessibleName),Z(g,"aria-hidden",c()?"true":void 0),Z(g,"title",c()?void 0:e(s).tooltip),Z(g,"data-workspace-status",e(s).state),Z(g,"data-workspace-status-visual",e(s).visual),Z(g,"data-workspace-status-icon",e(s).icon?.iconName)},[()=>Za(Ja("workspace-status-icon inline-flex shrink-0 items-center justify-center forced-colors:text-[CanvasText]",e(s).className,u()))]),H(a,g),st(o)}const Gt=6e4,Yt=60*Gt,$t=24*Yt,da=30*$t;function dn(a,t=new Date){if(a==null)return null;const r=a instanceof Date?a:new Date(a),l=r.getTime(),c=t.getTime();if(!Number.isFinite(l)||!Number.isFinite(c))return null;const u=Math.max(0,c-l);let s;u<Gt?s="<1m":u<Yt?s=`${Oe(Math.floor(u/Gt))}m`:u<$t?s=`${Oe(Math.floor(u/Yt))}h`:u<da?s=`${Oe(Math.floor(u/$t))}d`:s=`${Oe(Math.floor(u/da))}mo`;const o=l>c?t:r,g=wr(o,{now:t});return g?{compact:s,accessible:g,dateTime:r.toISOString()}:null}var un=z('<div><div class="grid gap-0.5 px-5 pt-4"><div class="flex min-w-0 items-center justify-between gap-3"><!> <!></div> <!> <!></div> <div class="my-3 border-t border-border" data-workspace-hover-card-divider=""></div> <div class="body-grid grid min-w-0 grid-cols-1 items-stretch gap-3 px-5 pb-4" data-workspace-hover-card-columns=""><div class="grid" data-workspace-hover-card-activity=""><!></div> <div class="pull-requests grid" data-workspace-hover-card-pr-column=""><!></div></div></div>'),fn=z('<p class="type-caption mt-1 min-w-0 line-clamp-3 text-muted-foreground" data-workspace-hover-card-summary=""> </p>'),pn=z('<span class="shrink-0 text-muted-foreground" data-workspace-hover-card-question-meta=""><span aria-hidden="true"> </span></span>'),mn=z('<span class="row-span-2 flex h-(--text-caption-line-height) items-center" aria-hidden="true"><!></span><span class="type-caption min-w-0 truncate text-foreground" data-workspace-hover-card-agent-name=""> </span><time class="type-caption whitespace-nowrap text-muted-foreground" data-workspace-hover-card-agent-time=""> </time> <span class="agent-detail type-caption flex min-w-0 items-start gap-1.5 text-muted-foreground svelte-1vax087" data-workspace-hover-card-agent-detail=""><span class="min-w-0 truncate" data-workspace-hover-card-agent-context=""> </span><!></span>',1),ua=z('<div role="listitem"><!></div>'),gn=z('<div class="type-caption mt-3 flex items-center justify-between text-muted-foreground" data-workspace-hover-card-overflow=""><span> </span> <!></div>'),vn=z('<section class="activity min-w-0" data-workspace-hover-card-activity="" data-workspace-hover-card-agent-table=""><div class="-mx-2 grid gap-2" role="list"></div> <!></section>'),hn=z('<!> <span class="type-caption min-w-0 truncate text-foreground" data-workspace-hover-card-pr-title=""> </span> <span class="type-caption shrink-0 text-muted-foreground" data-workspace-hover-card-pr-status=""> </span> <span class="type-caption shrink-0 text-muted-foreground" data-workspace-hover-card-pr-number=""> </span>',1),bn=z('<div class="grid w-full min-w-0 grid-cols-[1rem_minmax(0,1fr)_auto_auto] items-center gap-x-2 rounded-sm px-2 py-0 text-left" data-workspace-hover-card-pr-row=""><!></div>'),wn=z('<div class="type-caption mt-3 flex items-center justify-between text-muted-foreground" data-workspace-hover-card-pr-overflow=""><span> </span> <!></div>'),_n=z('<section class="pull-requests min-w-0" data-workspace-hover-card-pr-column=""><div class="-mx-2 grid min-w-0 gap-2" role="list" data-workspace-hover-card-pr-list=""></div> <!></section>'),kn=z('<div class="my-3 border-t border-border" data-workspace-hover-card-divider=""></div> <div class="body-grid grid min-w-0 grid-cols-1 items-stretch gap-3 px-5 pb-4" data-workspace-hover-card-columns=""><!> <!></div>',1),yn=z('<header data-workspace-hover-card-header=""><div class="min-w-0" data-workspace-hover-card-identity=""><div class="flex min-w-0 items-center justify-between gap-3"><h2 class="type-body min-w-0 truncate font-medium text-foreground" data-workspace-hover-card-title=""> </h2> <span class="type-caption flex shrink-0 items-center gap-1.5 text-muted-foreground" data-workspace-hover-card-status=""><span class="truncate" data-workspace-hover-card-status-label=""> </span><!></span></div> <div class="type-caption mt-0.5 min-w-0 truncate text-muted-foreground" data-workspace-hover-card-repo=""> </div> <!></div></header> <!>',1),xn=z('<section class="workspace-hover-card shrink-0 overflow-hidden rounded-md bg-background text-left text-foreground shadow-(--elevation-overlay) ring-1 ring-border svelte-1vax087" data-workspace-hover-card="" data-workspace-hover-card-layout="landscape"><!></section>');function An(a,t){if(new.target)return tt({component:An,...a});nt(t,!0);const r=()=>Qt(P,"$workspaceAgents$",c),l=()=>Qt(i,"$prMonitors$",c),[c,u]=Va(),s=Pr("WorkspaceHoverCard");let o=I(t,"workspace",7),g=I(t,"isLoading",7,!1),x=I(t,"activeAgentIds",23,()=>[]),b=I(t,"loadAgentSessions",7,!0),w=I(t,"onkeydown",7),m=I(t,"staticData",7,!1);const k=Wt("");function U(){return m()?Wt([]):er(k)}function B(){return m()?Wt([]):tr(k)}const P=U(),i=B();kt(()=>k.set(o()?.id??""));let p=ne(0);ya(()=>Zt.subscribe(()=>Ka(p)));let _=E(()=>o()?.agentSummary?.agentIds??[]),T=E(()=>(e(p),o()?Zt.getStreamingAgentIdsForWorkspace(o().id):[])),D=null,Y=new Set;kt(()=>{if(!o()||!b())return;const d=String(o().id);D!==d&&(D=d,Y=new Set);for(const C of new Set([...e(_).slice(0,6),...x(),...e(T)]))Y.has(C)||(ve.dispatch(_r(d,C)),Y.add(C))});function se(d){return[d.name,d.context,d.questionMeta?.accessible,d.updated.accessible].filter(Boolean).join(". ")}function Ce(d){return d?d.kind==="attention"?d.attention.reason?.trim()||null:"text"in d&&d.text.trim()||null:null}function le(d){return dn(d.lastActivity||d.updatedAt||d.createdAt)??{compact:"—",accessible:A.workspace_hoverCard_noRecentActivity_label()}}function y(d){const C=String(d.status).toLowerCase(),F=yr(d),Q=lr(d),be=Q==="question"?gr(d):null,pe=Ce(rr.select(ve.state,String(d.id)));let we,Ee,_e,n,f,W,S=!1;if(Q==="question"){we="attention",Ee="question",_e=be?.questions[0]?.question.trim()||pe||A.workspace_hoverCard_question_label(),n="question",f=1;const K=be?.questions.length??0;K>1&&(W={compact:`${Oe(1)}/${Oe(K)}`,accessible:A.chat_questionWizard_stepCounter_label({current:1,total:K})})}else if(Q==="attention-discussion")we="attention",Ee="discussion",_e=F?.reason?.trim()||A.chat_agentCard_attentionDiscussion_label(),n="attention-discussion",f=1;else if(Q==="attention-blocker"||C==="blocked")we="attention",Ee="blocker",_e=F?.reason?.trim()||A.chat_agentCard_attentionBlocker_label(),n="attention-blocker",f=0;else if(d.hasUnread)we="attention",Ee="unread",_e=pe||A.chat_newMessagesDivider_label(),S=!!pe,n="unread",f=2;else if(d.isStreaming||d.isProcessing||x().includes(String(d.id))||e(T).includes(String(d.id))||["active","busy","processing","responding","running","streaming","in_progress"].includes(C))we="active",_e=pe||A.workspace_devScripts_running_label(),S=!!pe,n=d.isProcessing?"responding":"running",f=3;else if(["waiting","pending","queued","starting"].includes(C))we="waiting",_e=pe||A.workspace_taskStatus_waiting_label(),S=!!pe,n="waiting",f=4;else return null;const j=d.agentMetadata??d.metadata;return{id:String(d.id),name:d.name?.trim()||A.workspace_fileChanges_agent_label(),group:we,attentionKind:Ee,avatarState:n,specialist:j?.specialist,context:_e,questionMeta:W,contextIsPreview:S,updated:le(d),priority:f}}let $=E(()=>{const d=o()?.agentSummary,C=new Map;if(Array.isArray(d?.agents))for(const F of d.agents)F&&typeof F=="object"&&typeof F.id=="string"&&C.set(F.id,F.parentAgentId);return r().filter(F=>{const Q=C.get(String(F.id));return!(kr(F)!=="topLevel"||typeof Q=="string"&&Q||F.pendingDeleteAt||F.retiredAt||String(F.status).toLowerCase()==="deleted")})}),oe=E(()=>e($).map(y).filter(d=>d!==null).sort((d,C)=>d.priority-C.priority)),Le=E(()=>e(oe).slice(0,6)),Me=E(()=>Math.max(0,e(oe).length-6)),fe=E(()=>o()?.repositoryName?o().repositoryOwner?`${o().repositoryOwner} / ${o().repositoryName}`:o().repositoryName:A.workspace_hoverCard_localRepository_label()),Ve=E(()=>on(o()??{})),ke=E(()=>Ea(e(Ve))),ee=E(()=>o()?.statusMessage?.trim()||"");function Se(d){if(!d)return null;const C=d.activePullRequest??d.pullRequests?.[0]??null;return C||(d.prStatus?{id:`legacy-pr-${d.prNumber??"workspace"}`,number:d.prNumber??0,url:d.prUrl??"",title:A.workspace_hoverCard_pullRequest_label(),status:d.prStatus,createdAt:d.updatedAt,updatedAt:d.updatedAt}:null)}let ft=E(()=>o()?m()?Se(o()):nr.select(ve.state,o().id)??Se(o()):null),Ie=E(()=>{if(!o()||ar(o()))return[];const d=o().repositoryOwner&&o().repositoryName?`${o().repositoryOwner}/${o().repositoryName}`:void 0;return cr({workspacePRs:o().pullRequests,activePR:e(ft),monitors:l(),workspaceRepo:d,buildPrUrl:(C,F)=>Vr(C,o().repositoryOwner,o().repositoryName,F),getDisplayTitle:C=>C.title})}),ot=E(()=>e(Ie).slice(0,3)),De=E(()=>Math.max(0,e(Ie).length-3)),ce=E(()=>e(oe).length>0),Ke=E(()=>e(Ie).length>0),v=E(()=>e(ce)||e(Ke));function h(d){const C=d.resource?.repository.provider==="gitlab"?`${d.repo} !${d.number}`:d.repo?A.workspace_card_prBadge_repoLine_tooltip({repo:d.repo,number:d.number}):A.workspace_card_prBadge_label({number:` #${d.number}`});return[sr(C,d),d.title,d.details].filter(Boolean).join(`
|
|
3
|
-
`)}function ae(d,C){if(d.stopPropagation(),!o()||!b())return;const F=o().id;Br.select(ve.state)!==F&&Fr(F).catch(Q=>{s.warn("Failed to switch workspace for hover-card agent",{agentId:C,error:Q})}),ve.dispatch(xr(F,{agentId:C}))}function V(d,C){if(d.stopPropagation(),!o()||!C.url)return;const F=o().id;ka(async()=>{const{handleLink:Q}=await import("./BMBobKUo.js").then(be=>be.V);return{handleLink:Q}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55]),import.meta.url).then(({handleLink:Q})=>Q(C.url,{workspaceId:F,event:d}))}var te={get workspace(){return o()},set workspace(d){o(d),M()},get isLoading(){return g()},set isLoading(d=!1){g(d),M()},get activeAgentIds(){return x()},set activeAgentIds(d=[]){x(d),M()},get loadAgentSessions(){return b()},set loadAgentSessions(d=!0){b(d),M()},get onkeydown(){return w()},set onkeydown(d){w(d),M()},get staticData(){return m()},set staticData(d=!1){m(d),M()},$set:at,$on:(d,C)=>rt(t,d,C)},he=xn(),re=N(he);{var Re=d=>{var C=un(),F=N(C),Q=N(F),be=N(Q);dt(be,{class:"h-7 min-w-0 max-w-64 flex-1"});var pe=O(be,2);dt(pe,{class:"h-5 w-20 shrink-0"}),L(Q);var we=O(Q,2);dt(we,{class:"h-4 w-40"});var Ee=O(we,2);dt(Ee,{class:"mt-2 h-10 w-full"}),L(F);var _e=O(F,4),n=N(_e),f=N(n);dt(f,{class:"h-10 w-full"}),L(n);var W=O(n,2),S=N(W);dt(S,{class:"h-10 w-full"}),L(W),L(_e),L(C),H(d,C)},Ue=d=>{var C=yn(),F=Fe(C);let Q;var be=N(F),pe=N(be),we=N(pe),Ee=me(we,!0),_e=O(we,2),n=N(_e),f=me(n,!0),W=O(n);Ta(W,{get status(){return e(Ve)},size:16,decorative:!0}),L(_e),L(pe);var S=O(pe,2),j=me(S,!0),K=O(S,2);{var J=ue=>{var We=fn(),xt=me(We,!0);Xe(We,(At,Rt)=>Bt?.(At,Rt),()=>e(ee)),X(()=>ge(xt,e(ee))),H(ue,We)};ie(K,ue=>{e(ee)&&ue(J)})}L(be),L(F);var Te=O(F,2);{var de=ue=>{var We=kn(),xt=O(Fe(We),2),At=N(xt);{var Rt=Ye=>{var ze=vn(),Ge=N(ze);zt(Ge,21,()=>e(Le),G=>G.id,(G,R)=>{var ye=ua(),$e=N(ye);{let Qe=E(()=>se(e(R)));jt($e,{variant:"plain",wrapContent:!1,class:"grid h-auto! min-h-8 w-full min-w-0 cursor-pointer grid-cols-[1rem_minmax(0,1fr)_auto] items-start justify-normal gap-x-2 gap-y-0 whitespace-normal rounded-sm border-0! px-2! py-0! text-left font-normal transition-colors hover:bg-muted/50 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",get"aria-label"(){return e(Qe)},"data-workspace-hover-card-agent-row":!0,get"data-agent-group-row"(){return e(R).group},get"data-attention-kind"(){return e(R).attentionKind},get onkeydown(){return w()},onclick:Be=>ae(Be,e(R).id),children:(Be,pt)=>{var Pe=mn(),xe=Fe(Pe),Ne=N(xe);{let Je=E(()=>e(R).specialist??null);dr(Ne,{get agentId(){return e(R).id},variant:"compact",get state(){return e(R).avatarState},get specialist(){return e(Je)}})}L(xe);var it=O(xe),Pt=me(it,!0),Ze=O(it),Ft=me(Ze,!0),mt=O(Ze,2),gt=N(mt),Lt=me(gt,!0);Xe(gt,(Je,ct)=>Bt?.(Je,ct),()=>e(R).context);var qa=O(gt);{var Oa=Je=>{var ct=pn(),Da=N(ct),Ua=me(Da,!0);L(ct),X(()=>{Z(ct,"aria-label",e(R).questionMeta.accessible),ge(Ua,e(R).questionMeta.compact)}),H(Je,ct)};ie(qa,Je=>{e(R).questionMeta&&Je(Oa)})}L(mt),X(()=>{ge(Pt,e(R).name),Z(Ze,"datetime",e(R).updated.dateTime),Z(Ze,"aria-label",e(R).updated.accessible),ge(Ft,e(R).updated.compact),Z(mt,"data-workspace-hover-card-agent-preview",e(R).contextIsPreview||void 0),ge(Lt,e(R).context)}),H(Be,Pe)},$$slots:{default:!0}})}L(ye),H(G,ye)}),L(Ge);var Et=O(Ge,2);{var Tt=G=>{var R=gn(),ye=N(R),$e=me(ye,!0),Qe=O(ye,2);bt(Qe,{get icon(){return ra},size:10}),L(R),X(Be=>ge($e,Be),[()=>A.workspace_hoverCard_moreAgents_label({count:Oe(e(Me))})]),H(G,R)};ie(Et,G=>{e(Me)&&G(Tt)})}L(ze),X(G=>Z(ze,"aria-label",G),[()=>A.workspace_multiSelectSidebar_agentsTab_label()]),H(Ye,ze)};ie(At,Ye=>{e(ce)&&Ye(Rt)})}var Na=O(At,2);{var Ha=Ye=>{var ze=_n(),Ge=N(ze);zt(Ge,21,()=>e(ot),G=>G.identity,(G,R)=>{var ye=ua();{const pt=Pe=>{var xe=hn(),Ne=Fe(xe);bt(Ne,{get icon(){return e(R).statusIcon},size:16,get class(){return`shrink-0 justify-self-start ${e(R).foregroundClass??""}`}});var it=O(Ne,2),Pt=me(it,!0),Ze=O(it,2),Ft=me(Ze,!0),mt=O(Ze,2),gt=me(mt,!0);X(Lt=>{ge(Pt,Lt),ge(Ft,e(R).accessibleStateLabel),ge(gt,e(R).numberLabel??`#${e(R).number}`)},[()=>e(R).title||(e(R).resource?.repository.provider==="gitlab"?A.workspace_hoverCard_mergeRequest_label():A.workspace_hoverCard_pullRequest_label())]),H(Pe,xe)};var $e=N(ye);{var Qe=Pe=>{{let xe=E(()=>h(e(R)));jt(Pe,{variant:"plain",wrapContent:!1,class:"grid h-auto! w-full min-w-0 grid-cols-[1rem_minmax(0,1fr)_auto_auto] items-center justify-normal gap-x-2 whitespace-normal rounded-sm border-0! px-2! py-0! text-left font-normal transition-colors hover:bg-muted/50 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",get"aria-label"(){return e(xe)},"data-workspace-hover-card-pr-row":!0,get"data-pr-identity"(){return e(R).identity},get"data-pr-status"(){return e(R).status},get onkeydown(){return w()},onclick:Ne=>V(Ne,e(R)),children:(Ne,it)=>{pt(Ne)},$$slots:{default:!0}})}},Be=Pe=>{var xe=bn(),Ne=N(xe);pt(Ne),L(xe),X(()=>{Z(xe,"data-pr-identity",e(R).identity),Z(xe,"data-pr-status",e(R).status)}),H(Pe,xe)};ie($e,Pe=>{e(R).url?Pe(Qe):Pe(Be,-1)})}L(ye)}X(pt=>Z(ye,"aria-label",pt),[()=>e(R).url?void 0:h(e(R))]),H(G,ye)}),L(Ge);var Et=O(Ge,2);{var Tt=G=>{var R=wn(),ye=N(R),$e=me(ye,!0),Qe=O(ye,2);bt(Qe,{get icon(){return ra},size:10}),L(R),X(Be=>ge($e,Be),[()=>A.workspace_hoverCard_moreItems_label({count:Oe(e(De))})]),H(G,R)};ie(Et,G=>{e(De)&&G(Tt)})}L(ze),X((G,R)=>{Z(ze,"aria-label",G),Z(Ge,"aria-label",R)},[()=>e(Ie).every(G=>G.resource?.repository.provider==="gitlab")?A.workspace_hoverCard_mergeRequests_label():e(Ie).some(G=>G.resource?.repository.provider==="gitlab")?A.workspace_hoverCard_reviews_label():A.workspace_hoverCard_pullRequests_label(),()=>e(Ie).every(G=>G.resource?.repository.provider==="gitlab")?A.workspace_hoverCard_mergeRequests_label():e(Ie).some(G=>G.resource?.repository.provider==="gitlab")?A.workspace_hoverCard_reviews_label():A.workspace_hoverCard_pullRequests_label()]),H(Ye,ze)};ie(Na,Ye=>{e(Ke)&&Ye(Ha)})}L(xt),H(ue,We)};ie(Te,ue=>{e(v)&&ue(de)})}X(ue=>{Q=qe(F,1,"min-w-0 px-5 pt-4",null,Q,{"pb-4":!e(v)}),ge(Ee,ue),ge(f,e(ke).label),ge(j,e(fe))},[()=>o().title||A.workspace_links_untitled_label()]),H(d,C)};ie(re,d=>{g()||!o()?d(Re):d(Ue,-1)})}L(he),H(a,he);var je=st(te);return u(),je}const fa=800,Ss=175,In=300;function Mn(){let a=0,t=null;const r=new Set,l=new Set;function c(){return a>0||t!==null?0:fa}function u(){const o=c();r.forEach(g=>g(o))}function s(){t!==null&&(clearTimeout(t),t=null)}return{get currentOpenDelay(){return c()},subscribe(o){return r.add(o),o(c()),()=>r.delete(o)},notifyOpened(){const o=a===0&&t===null;s(),a+=1,o&&u()},notifyClosed(){a!==0&&(a-=1,!(a>0)&&(s(),t=setTimeout(()=>{t=null,u()},In)))},deferClose(o){return l.add(o),()=>l.delete(o)},settleDeferredCloses(){const o=[...l];l.clear(),o.forEach(g=>g())},reset(){const o=c()!==fa;s(),a=0,l.clear(),o&&u()}}}const Rs=Mn();function Ot(a){const t=Aa.select(ve.state,a);return t!==void 0&&Cr(t)}function Cn(a,t){if(!Ot(a))return[];const r=vr.select(ve.state,a),l=Jt.select(ve.state,a),c=hr.select(ve.state),u=[];for(let s=0;s<Ar;s+=1){const o=c[s],g=o&&o!==a?Aa.select(ve.state,o):void 0;u.push({id:`assign-micro-key-${s+1}`,label:g?A.workspace_card_assignOccupiedMicroKey_label({number:Oe(s+1),title:g.title}):A.workspace_card_assignMicroKeyNumber_label({number:Oe(s+1)}),checked:r===s,closeOnSelect:!0,onClick:()=>{Ot(a)&&ve.dispatch(Ir(s,a)),t()}})}return l!==null&&(u.push({type:"separator"}),u.push({id:"unassign-micro-key",label:A.workspace_card_unassignMicroKey_label(),onClick:()=>{Ot(a)&&Jt.select(ve.state,a)===l&&ve.dispatch(Mr(l)),t()}})),u}function Es(a,{connected:t,onClose:r}){if(!t)return[];const l=Cn(a,r);if(l.length===0)return[];const c=l.filter(s=>"id"in s&&s.id!=="unassign-micro-key"),u=l.find(s=>"id"in s&&s.id==="unassign-micro-key");return[{id:"assign-micro-key",label:A.workspace_card_assignMicroKey_label(),icon:Ur,onClick:()=>{},selection:"single",submenu:c},...u?[u]:[]]}var Sn=z('<div data-static-position="" role="tooltip"><!></div>'),pa=z('<div role="tooltip"><!></div>');function Rn(a,t){if(new.target)return tt({component:Rn,...a});nt(t,!0);let r=I(t,"id",7),l=I(t,"anchor",7),c=I(t,"position",7,"right"),u=I(t,"absolute",7,!1),s=I(t,"anchorElement",7,null),o=I(t,"staticPosition",7,!1),g=I(t,"class",7,""),x=I(t,"children",7),b=I(t,"onmouseenter",7),w=I(t,"onmouseleave",7),m=I(t,"onfocusin",7),k=I(t,"onfocusout",7);const U=Xr(en()+2);tn(U);const B=an(U),P=8,i=4;let p=ne(null),_=ne(""),T=ne(void 0);const D=E(()=>c()==="bottom-right"||c()==="bottom-left"),Y=E(()=>c()==="top"),se=E(()=>o()?"relative":u()?"absolute":"fixed"),Ce=E(()=>c()==="right"?{x:-4,y:0}:c()==="bottom"?{x:4,y:0}:e(Y)?{x:0,y:4}:{x:0,y:-4});function le(v,h,ae){return Math.max(h,Math.min(ae,v))}let y=null,$=null;function oe(){return!y?.isConnected||$!==l()?!1:y.style.getPropertyValue("anchor-name").includes(l())||getComputedStyle(y).getPropertyValue("anchor-name").includes(l())}function Le(){return s()?s():(oe()||(y=Array.from(document.querySelectorAll('[style*="anchor-name"]')).find(v=>{const h=v.style.getPropertyValue("anchor-name"),ae=getComputedStyle(v).getPropertyValue("anchor-name");return h.includes(l())||ae.includes(l())})??null,$=y?l():null),y)}function Me(){if(o()||u()||!e(p))return;const v=Le();if(!v)return;const h=v.getBoundingClientRect(),ae=e(p).getBoundingClientRect(),V=window.innerWidth||document.documentElement.clientWidth,te=window.innerHeight||document.documentElement.clientHeight,he=ae.width||e(p).offsetWidth,re=ae.height||e(p).offsetHeight,Re=Math.max(0,h.top-i-P),Ue=Math.max(0,te-h.bottom-i-P),je=e(Y)?!(Re<re&&Ue>Re):e(D)&&Ue<re&&Re>Ue;let d=h.left,C=h.bottom+i,F=je?Re:Ue;if(c()==="right"){const Q=h.left-i-P,be=V-h.right-i-P;d=be>=he||be>=Q?h.right+i:h.left-he-i,C=h.top,F=Math.max(0,te-P*2)}else c()==="bottom"?(d=h.left-he-i,C=h.bottom-re):(e(Y)||e(D))&&(c()==="bottom-left"?d=h.right-he:e(Y)&&(d=h.left+h.width/2-he/2),C=je?h.top-Math.min(re,F)-i:h.bottom+i);d=le(d,P,Math.max(P,V-he-P)),C=le(C,P,Math.max(P,te-Math.min(re,F)-P)),q(T,`${F}px`),q(_,`left: ${d}px; top: ${C}px;`)}let fe=!1;async function Ve(){fe||(fe=!0,await ja(),fe=!1,Me())}let ke=null;function ee(){ke||(ke=Jr(()=>{ke=null,Me()}))}function Se(v){const h=s()??(oe()?y:null);h&&v.target instanceof Node&&!v.target.contains(h)||ee()}kt(()=>{const v=e(p),h=s();o()||u()||!v||!h||Ve()}),ya(()=>{if(o())return;let v=null;return Ve().then(()=>{if(!u()&&typeof ResizeObserver<"u"){v=new ResizeObserver(ee),e(p)&&v.observe(e(p));const h=Le();h&&v.observe(h)}}),window.addEventListener("resize",ee),window.addEventListener("scroll",Se,!0),()=>{v?.disconnect(),window.removeEventListener("resize",ee),window.removeEventListener("scroll",Se,!0),ke?.(),ke=null}});var ft={get id(){return r()},set id(v){r(v),M()},get anchor(){return l()},set anchor(v){l(v),M()},get position(){return c()},set position(v="right"){c(v),M()},get absolute(){return u()},set absolute(v=!1){u(v),M()},get anchorElement(){return s()},set anchorElement(v=null){s(v),M()},get staticPosition(){return o()},set staticPosition(v=!1){o(v),M()},get class(){return g()},set class(v=""){g(v),M()},get children(){return x()},set children(v){x(v),M()},get onmouseenter(){return b()},set onmouseenter(v){b(v),M()},get onmouseleave(){return w()},set onmouseleave(v){w(v),M()},get onfocusin(){return m()},set onfocusin(v){m(v),M()},get onfocusout(){return k()},set onfocusout(v){k(v),M()},$set:at,$on:(v,h)=>rt(t,v,h)},Ie=Ut(),ot=Fe(Ie);{var De=v=>{var h=Sn(),ae=N(h);qt(ae,()=>x()??Nt),L(h),et(h,V=>q(p,V),()=>e(p)),X(()=>{Z(h,"id",r()),qe(h,1,e(se)+` z-50 w-64 flex flex-col overflow-y-auto border border-border pointer-events-auto ${B} `+g()),Z(h,"data-surface-level",U)}),H(v,h)},ce=v=>{var h=pa();let ae;var V=N(h);qt(V,()=>x()??Nt),L(h),et(h,te=>q(p,te),()=>e(p)),X(()=>{Z(h,"id",r()),qe(h,1,e(se)+` z-50 w-64 flex flex-col border border-border pointer-events-none ${B} `+g()),Z(h,"data-surface-level",U),ae=Ct(h,"",ae,{"position-anchor":l(),right:c()==="bottom"?"anchor(left)":void 0,left:c()==="right"?"anchor(right)":e(D)?"anchor(left)":e(Y)?"anchor(center)":void 0,top:c()==="right"?"anchor(top)":e(D)?"anchor(bottom)":void 0,bottom:c()==="bottom"?"anchor(bottom)":e(Y)?"anchor(top)":void 0,"margin-right":c()==="bottom"?"8px":void 0,"margin-left":c()==="right"?"8px":void 0,"margin-top":e(D)?"4px":void 0,"margin-bottom":e(Y)?"4px":void 0,translate:e(Y)?"-50% 0":void 0})}),He("mouseenter",h,function(...te){b()?.apply(this,te)}),He("mouseleave",h,function(...te){w()?.apply(this,te)}),Ae("focusin",h,function(...te){m()?.apply(this,te)}),Ae("focusout",h,function(...te){k()?.apply(this,te)}),It(1,h,()=>Xt,()=>({tier:"fast",...e(Ce),scale:.96})),It(2,h,()=>ea,()=>({tier:"fast"})),H(v,h)},Ke=v=>{br(v,{zIndex:50,children:(h,ae)=>{var V=pa();let te;var he=N(V);qt(he,()=>x()??Nt),L(V),et(V,re=>q(p,re),()=>e(p)),X(()=>{Z(V,"id",r()),qe(V,1,e(se)+` z-50 w-64 flex flex-col overflow-y-auto border border-border pointer-events-auto ${B} `+g()),Z(V,"data-surface-level",U),te=Ct(V,e(_),te,{"max-height":e(T)})}),He("mouseenter",V,function(...re){b()?.apply(this,re)}),He("mouseleave",V,function(...re){w()?.apply(this,re)}),Ae("focusin",V,function(...re){m()?.apply(this,re)}),Ae("focusout",V,function(...re){k()?.apply(this,re)}),It(1,V,()=>Xt,()=>({tier:"fast",...e(Ce),scale:.96})),It(2,V,()=>ea,()=>({tier:"fast"})),H(h,V)},$$slots:{default:!0}})};ie(ot,v=>{o()?v(De):u()?v(ce,1):v(Ke,-1)})}return H(a,Ie),st(ft)}xa(["focusin","focusout"]);function _t(a,t){return t||/^(?:https?:|data:|blob:|workspace-asset:)/i.test(a.trim())}function En(a,t){if(t||!a)return a;const r=document.createElement("template");r.innerHTML=a;for(const l of r.content.querySelectorAll("img, video")){const c=l.getAttribute("src")||l.getAttribute("data-media-src")||"",u=[...l.querySelectorAll("source")];if(!_t(c,!1)||u.some(o=>!_t(o.getAttribute("src")||"",!1))){const o=document.createElement("img");o.setAttribute("alt",l.getAttribute("alt")||l.getAttribute("data-name")||""),o.setAttribute("data-media-unavailable","node-owned"),l.replaceWith(o);continue}l.removeAttribute("srcset");const s=l.getAttribute("poster");s&&!_t(s,!1)&&l.removeAttribute("poster")}return r.innerHTML}const Tn=[/(^|[^\\])\$(?!\$)(?=\S)(?:\\.|[^\\$\n])+?\$(?!\$)/,/(^|[^\\])\\\((?:\\.|[^\\\n])*?\\\)/,/^(?: {0,3})(?:\$\$|\\\[)/m,/^\s*[-*]\s*\[[ x]\]/m,/```/,/`[^`]+`/,/\|.*\|/,/\[.*\]\(.*\)/,/!\[.*\]\(.*\)/,/<[a-z][\s\S]*>/i,/^#{1,6}\s/m,/^\s*>\s/m,/\*\*[^*]+\*\*/,/\*[^*]+\*/,/_[^_]+_/,/~~[^~]+~~/,/^[-*_]{3,}\s*$/m,/^\s*[-*+]\s/m,/^\s*\d+\.\s/m];function Pn(a){return a&&(Tn.some(t=>t.test(a))||or(a,"markdown"))?"static":"simple"}var Fn=z("<!> <!>",1);function Pa(a,t){if(new.target)return tt({component:Pa,...a});nt(t,!0);let r=I(t,"workspaceId",7),l=I(t,"canUseMedia",7),c=ne(null),u=ne(null),s=ne(!1),o=ne(!1);function g(_){q(c,{url:_.getAttribute("src")||"",name:_.getAttribute("alt")||void 0,opener:_},!0),q(s,!0)}function x(_){const T=na(_.getAttribute("href")||"",r());return T&&l()(T)?(q(c,{url:T,name:_.textContent?.trim()||void 0,opener:_,assetLink:!0},!0),q(s,!0),!0):b(_)}function b(_){const T=wt(_.getAttribute("href")||"",r());return!T||!l()(T.url)?!1:(q(u,{url:T.url,mimeType:T.mimeType,name:_.textContent?.trim()||void 0,opener:_},!0),q(o,!0),!0)}kt(()=>{e(u)&&!wt(e(u).url,r())&&(q(o,!1),q(u,null)),e(c)?.assetLink&&!na(e(c).url,r())&&(q(s,!1),q(c,null))});var w={openImage:g,openAsset:x,get workspaceId(){return r()},set workspaceId(_){r(_),M()},get canUseMedia(){return l()},set canUseMedia(_){l(_),M()},$set:at,$on:(_,T)=>rt(t,_,T)},m=Fn(),k=Fe(m);{var U=_=>{ur(_,{get imageUrl(){return e(c).url},get imageName(){return e(c).name},get openerElement(){return e(c).opener},showActionsMenu:!0,get open(){return e(s)},set open(T){q(s,T,!0)}})},B=E(()=>e(c)&&l()(e(c).url));ie(k,_=>{e(B)&&_(U)})}var P=O(k,2);{var i=_=>{Ia(_,{get videoUrl(){return e(u).url},get videoName(){return e(u).name},get mimeType(){return e(u).mimeType},sourceKind:"workspace",get openerElement(){return e(u).opener},get open(){return e(o)},set open(T){q(o,T,!0)}})},p=E(()=>e(u)&&wt(e(u).url,r())&&l()(e(u).url));ie(P,_=>{e(p)&&_(i)})}return H(a,m),st(w)}var Ln=z('<div class="flex items-center gap-2"><!> <!></div>'),Wn=z('<div class="absolute inset-0 flex items-center justify-center bg-muted text-muted-foreground" aria-hidden="true"><svg viewBox="0 0 24 24" class="size-10" fill="none"><rect x="3" y="5" width="18" height="14" rx="2" stroke="currentColor"></rect><path d="m10 9 5 3-5 3V9Z" fill="currentColor"></path></svg></div> <video preload="metadata" playsinline="" tabindex="-1" aria-hidden="true"></video> <span class="absolute inset-0 flex items-center justify-center bg-black/10 transition-colors group-hover:bg-black/20 motion-reduce:transition-none forced-colors:bg-transparent" aria-hidden="true"><span class="flex size-11 items-center justify-center rounded-full border border-white/70 bg-black/60 text-white shadow-(--elevation-raised) forced-colors:border forced-colors:bg-[Canvas] forced-colors:text-[CanvasText]"><svg viewBox="0 0 20 20" class="ml-0.5 size-5" fill="currentColor"><path d="m7 5 7 5-7 5V5Z"></path></svg></span></span>',3),Nn=z('<div class="group relative aspect-video w-full max-h-40 max-w-2xl" style="width: min(100%, calc(10rem * 16 / 9));"><!> <!></div>'),Hn=z('<div class="my-2 min-w-0 max-w-2xl" data-chat-video=""><!></div> <!>',1);function Fa(a,t){if(new.target)return tt({component:Fa,...a});nt(t,!0);let r=I(t,"source",7),l=I(t,"name",23,()=>A.chat_videoBlock_fromAgent_label()),c=I(t,"poster",7),u=I(t,"allowFileMedia",7,!0),s=I(t,"canOpenFile",7),o=ne(!1),g=ne(!1),x=ne(!1),b=ne(null);const w=E(()=>r().kind==="inline"?`data:${r().mimeType};base64,${r().data}`:r().url);function m(y){return _t(y,u()&&s()?.()!==!1)}const k=E(()=>!m(e(w))),U=E(()=>yt(e(w))),B=E(()=>{if(!(!c()||!m(c()))){if(/^data:image\/(?:gif|jpeg|png|webp);base64,[a-z0-9+/=]+$/i.test(c()))return c();try{const y=new URL(c());return(y.protocol==="https:"||y.protocol==="workspace-file:")&&!y.username&&!y.password?c():void 0}catch{return}}});function P(){q(g,!0),q(x,!1)}var i={get source(){return r()},set source(y){r(y),M()},get name(){return l()},set name(y=A.chat_videoBlock_fromAgent_label()){l(y),M()},get poster(){return c()},set poster(y){c(y),M()},get allowFileMedia(){return u()},set allowFileMedia(y=!0){u(y),M()},get canOpenFile(){return s()},set canOpenFile(y){s(y),M()},$set:at,$on:(y,$)=>rt(t,y,$)},p=Hn(),_=Fe(p),T=N(_);{var D=y=>{Vt(y,{get name(){return l()},reason:"load-failed"})},Y=y=>{var $=Ln(),oe=N($);{let Me=E(()=>e(U)?.path),fe=E(()=>e(U)?.workspaceId);Vt(oe,{get name(){return l()},reason:"load-failed",get path(){return e(Me)},get workspaceId(){return e(fe)}})}var Le=O(oe,2);Kt(Le,{get videoUrl(){return e(w)},get videoName(){return l()},get sourceKind(){return r().kind},get mimeType(){return r().mimeType}}),L($),H(y,$)},se=y=>{var $=Nn(),oe=N($);{let Me=E(()=>A.chat_videoBlock_play_ariaLabel({name:l()}));jt(oe,{type:"button",variant:"ghost",size:"default",class:"relative block size-full cursor-pointer overflow-hidden rounded-lg border border-border bg-muted/40 p-0 shadow-(--elevation-raised) focus-visible:border-ring focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 forced-colors:border",get"aria-label"(){return e(Me)},"data-testid":"chat-video-snapshot",onclick:()=>{m(e(w))&&q(o,!0)},get ref(){return e(b)},set ref(fe){q(b,fe,!0)},children:(fe,Ve)=>{var ke=Wn(),ee=O(Fe(ke),2);ee.muted=!0,Ga(2),X(()=>{Z(ee,"src",e(w)),Z(ee,"poster",e(B)),qe(ee,1,`pointer-events-none absolute inset-0 size-full object-contain transition-opacity motion-reduce:transition-none ${e(B)||e(g)&&!e(x)?"opacity-100":"opacity-0"}`)}),He("loadeddata",ee,P),He("error",ee,()=>q(x,!0)),H(fe,ke)},$$slots:{default:!0}})}var Le=O(oe,2);Kt(Le,{get videoUrl(){return e(w)},get videoName(){return l()},get sourceKind(){return r().kind},get mimeType(){return r().mimeType},triggerClass:"absolute right-1.5 top-1.5 opacity-0 transition-opacity focus-visible:opacity-100 group-focus-within:opacity-100 group-hover:opacity-100 data-[state=open]:opacity-100"}),L($),H(y,$)};ie(T,y=>{e(k)?y(D):e(x)?y(Y,1):y(se,-1)})}L(_);var Ce=O(_,2);{var le=y=>{Ia(y,{get videoUrl(){return e(w)},get videoName(){return l()},get poster(){return e(B)},get sourceKind(){return r().kind},get mimeType(){return r().mimeType},get openerElement(){return e(b)},get open(){return e(o)},set open($){q(o,$,!0)}})};ie(Ce,y=>{!e(x)&&!e(k)&&y(le)})}return H(a,p),st(i)}const qn=/^\s*!\[([^\]\n]*)\]\((?:<)?((?:intent:\/\/local\/|workspace-file:\/\/|workspace-asset:\/\/)[^)\s>]+)(?:>)?\)\s*$/,On=/^ {0,3}(`{3,}|~{3,})(.*)$/;function ma(a,t){if(typeof a!="string"||!a||a!==a.trim())return null;if(a.startsWith("workspace-asset://"))return wt(a,t);if(a.startsWith("workspace-file://")){const l=yt(a);if(!l||l.workspaceId!==t)return null;const c=Sa(a);return c?la(c,t):null}const r=a.startsWith("intent://")?a:`intent://local/file/${a}`;return la(r,t)}function Dn(a,t){if(a.startsWith("workspace-file://")){const r=yt(a);if(!r||r.workspaceId!==t)return!1;const l=Sa(a);return!!l&&!!St(l,t)}return!!St(a,t,{readOnly:!0})}function Un(a,t){return(t===0||!a[t-1].trim())&&(t===a.length-1||!a[t+1].trim())}function zn(a,t,r){const l=r[0];return a.findIndex((c,u)=>{if(u<=t)return!1;const s=c.trim();return s.length>=r.length&&s.split("").every(o=>o===l)})}function Bn(a,t){const r=a.split(`
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/Dbuv3b_7.js","/app/immutable/chunks/B8o4lNgr.js","/app/immutable/chunks/D4MoKNoK.js","/app/immutable/chunks/WZHg24tN.js","/app/immutable/chunks/DOE_TCNp.js","/app/immutable/chunks/C8yAGnZY.js","/app/immutable/chunks/WVYGrHqE.js","/app/immutable/chunks/CpHIRYx9.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/DgFojmqv.js","/app/immutable/chunks/D2g8BuR1.js","/app/immutable/chunks/BPQohPc9.js","/app/immutable/chunks/HfuFYz2u.js","/app/immutable/chunks/D0pR1-a6.js","/app/immutable/chunks/DVkfuwKw.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/CS1d84Cn.js","/app/immutable/chunks/S9ot6IO_.js","/app/immutable/chunks/C51KzdSG.js","/app/immutable/chunks/CjSUqH7t.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/D5B1sycf.js","/app/immutable/chunks/BQ-Vdhjp.js","/app/immutable/chunks/Ds7can9q.js","/app/immutable/chunks/CG5J-qd_.js","/app/immutable/chunks/D2AmAQEr.js","/app/immutable/chunks/BrXpFLv_.js","/app/immutable/assets/dialog.BtQTVchw.css","/app/immutable/assets/observe-overflow.D4mrl2M9.css","/app/immutable/chunks/C_fEvnNK.js","/app/immutable/chunks/Di6XfBOT.js","/app/immutable/chunks/CVBBsS8i.js","/app/immutable/chunks/dimBDqRX.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/B9YdV5Lr.js","/app/immutable/chunks/De4WWpS0.js","/app/immutable/assets/connection-label.UE5obH5A.css","/app/immutable/chunks/CUrlpJj4.js","/app/immutable/chunks/FY5ry3XL.js","/app/immutable/chunks/bjlKIwQF.js","/app/immutable/assets/SettingsPage.D8u26cHZ.css","/app/immutable/chunks/CQTIadOp.js","/app/immutable/chunks/BjO6mATN.js","/app/immutable/assets/notify.CaX-6yIe.css","/app/immutable/chunks/BJwGOB8K.js","/app/immutable/chunks/BJzHxIyr.js","/app/immutable/chunks/1lVCCXL6.js","/app/immutable/chunks/DDhakcOb.js","/app/immutable/chunks/DzMB8eQW.js","/app/immutable/chunks/CwK4Fl7A.js","/app/immutable/chunks/iPSaMdjW.js","/app/immutable/chunks/YpQeV5ep.js","/app/immutable/chunks/ASxUuKIZ.js","/app/immutable/chunks/B0Z-1lwJ.js","/app/immutable/chunks/BoAgG62K.js","/app/immutable/assets/directory-picker-service.CzNEA6Ot.css","/app/immutable/chunks/SlH326tK.js","/app/immutable/chunks/CdT170lG.js","/app/immutable/chunks/t61BPD62.js","/app/immutable/chunks/Sk9pLJI5.js","/app/immutable/chunks/Bj2YjLqH.js","/app/immutable/chunks/CMiilI_P.js","/app/immutable/chunks/CJaPqUNh.js","/app/immutable/chunks/CxP2tIQc.js","/app/immutable/assets/AttachmentPreview.D9u_jNlU.css","/app/immutable/assets/DiagramPresentation.fimBl1wP.css","/app/immutable/chunks/BijxVENA.js","/app/immutable/assets/StreamingDiagramRenderer.BShsSvPz.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
var za=Object.defineProperty;var Ba=(a,t,r)=>t in a?za(a,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):a[t]=r;var lt=(a,t,r)=>Ba(a,typeof t!="symbol"?t+"":t,r);import{bo as A,t as tt,bq as I,a_ as ie,by as at,b as rt,bs as Va,bu as Qt,_ as ka}from"./D4MoKNoK.js";import{bs as nt,a5 as N,aD as e,bA as L,b_ as X,W as H,bn as st,c9 as E,aA as M,aB as z,ca as kt,bk as ya,c6 as Ka,cd as Wt,bV as ne,bS as O,ay as Fe,bl as me,bO as ge,ai as xa,a7 as Ut,c0 as ja,bf as Nt,bH as q,aw as He,aj as Ae,be as Ga,c3 as ut,bb as Mt,aF as Ya,br as $a,bj as Qa}from"./B8o4lNgr.js";import{d as Za,f as Ja,k as qe,l as Ct,s as Z,a as Xe,h as zt,i as Xa}from"./WVYGrHqE.js";import{aM as er,cT as tr,L as ar,au as rr,dg as nr,V as sr,dj as Aa,B as or,$ as ir}from"./dimBDqRX.js";import{t as Bt}from"./Ds7can9q.js";import{a3 as cr,af as lr,A as dr,n as ur,a0 as Ia,q as Vt,$ as Kt,au as yt,aS as Ma,m as fr,aw as pr,aR as mr}from"./Bj2YjLqH.js";import{l as Zt}from"./D7P2CXpO.js";import{bu as gr,br as vr,bs as Jt,ac as hr}from"./C_fEvnNK.js";import{w as dt,P as br}from"./BQ-Vdhjp.js";import{f as jt,bb as Ht}from"./DgFojmqv.js";import{t as Oe,v as wr,H as It,E as Xt,c as ea}from"./C8yAGnZY.js";import{qb as Ca,G2 as ve,lp as _r,fr as kr,mh as yr,sA as xr,a as Ar,t_ as Ir,rq as Mr,pV as Cr,g as Sr,b9 as ta,tf as Rr,re as Er,th as Tr}from"./C51KzdSG.js";import{c as Pr,l as ht}from"./ChTqQfQN.js";import{o as Fr}from"./BoAgG62K.js";import{aN as Lr,aO as aa,bv as Wr,ay as Nr,bu as Hr,aC as qr,cT as Or,cH as Dr,F as bt,av as ra,bD as Ur,by as zr}from"./CG5J-qd_.js";import{l as Br}from"./Di6XfBOT.js";import{p as Vr,cG as wt,cF as na,ak as Kr,cI as Sa,a4 as St,ay as Ra,aO as jr,ar as Gr,a3 as sa,r as Yr,aF as $r,aK as Qr,E as Zr}from"./t61BPD62.js";import{s as qt}from"./WZHg24tN.js";import{b as et}from"./D2g8BuR1.js";import{s as Jr}from"./CS1d84Cn.js";import{c as Xr,u as en,s as tn,a as an}from"./D2AmAQEr.js";import{Q as oa,N as ia}from"./Dbuv3b_7.js";import{g as ca}from"./DOE_TCNp.js";import{T as la}from"./Sk9pLJI5.js";const rn=new Set(["failed","blocked","needs_attention","in_progress"]),nn={failed:{visual:"icon",icon:Dr,className:"text-foreground"},blocked:{visual:"icon",icon:Or,className:"text-danger"},needs_attention:{visual:"icon",icon:qr,className:"text-warning-ink"},in_progress:{visual:"dot",icon:null,className:"workspace-status-color-active"},waiting:{visual:"icon",icon:Hr,className:"text-muted-foreground"},unread:{visual:"dot",icon:null,className:"workspace-status-color-unread"},not_started:{visual:"dot",icon:null,className:"text-muted-foreground/35"},idle:{visual:"dot",icon:null,className:"text-muted-foreground/35"},complete:{visual:"icon",icon:Nr,className:"text-success"},pr_queued:{visual:"icon",icon:Wr,className:"text-info"},pr_ready:{visual:"icon",icon:aa,className:"text-success"},pr_open:{visual:"icon",icon:aa,className:"text-info"},pr_merged:{visual:"icon",icon:Lr,className:"text-purple-500"}};function sn(a){switch(a){case"failed":return A.workspace_statusIcon_failed_label();case"blocked":return A.workspace_statusIcon_blocked_label();case"needs_attention":return A.workspace_statusIcon_needsAttention_label();case"in_progress":return A.workspace_statusIcon_inProgress_label();case"waiting":return A.workspace_taskStatus_waiting_label();case"unread":return A.layout_activeCard_unread_header();case"not_started":return A.workspace_statusIcon_notStarted_label();case"idle":return A.workspace_statusIcon_idle_label();case"complete":return A.workspace_statusIcon_complete_label();case"pr_queued":return A.workspace_statusIcon_prQueued_label();case"pr_ready":return A.workspace_statusIcon_prReady_label();case"pr_open":return A.workspace_statusIcon_prOpen_label();case"pr_merged":return A.workspace_statusIcon_prMerged_label()}}function on(a){const t=Ca(a.displayStatus)?a.displayStatus:"not_started";return rn.has(t)?t:a.attention==="unread"?"unread":a.waiting===!0?"waiting":t}function Ea(a){const t=a==="waiting"||a==="unread"||Ca(a)?a:"not_started",r=sn(t);return{state:t,...nn[t],label:r,tooltip:r,accessibleName:r}}var cn=z('<span class="workspace-status-dot svelte-14zk5l0" data-workspace-status-dot=""></span>'),ln=z("<span><!></span>");function Ta(a,t){if(new.target)return tt({component:Ta,...a});nt(t,!0);let r=I(t,"status",7),l=I(t,"size",7,14),c=I(t,"decorative",7,!1),u=I(t,"class",7);const s=E(()=>Ea(r()));var o={get status(){return r()},set status(m){r(m),M()},get size(){return l()},set size(m=14){l(m),M()},get decorative(){return c()},set decorative(m=!1){c(m),M()},get class(){return u()},set class(m){u(m),M()},$set:at,$on:(m,k)=>rt(t,m,k)},g=ln(),x=N(g);{var b=m=>{var k=cn();H(m,k)},w=m=>{bt(m,{get icon(){return e(s).icon},class:"size-full!"})};ie(x,m=>{e(s).visual==="dot"?m(b):e(s).icon&&m(w,1)})}return L(g),X(m=>{qe(g,1,m,"svelte-14zk5l0"),Ct(g,`width: ${l()??""}px; height: ${l()??""}px;`),Z(g,"role",c()?void 0:"img"),Z(g,"aria-label",c()?void 0:e(s).accessibleName),Z(g,"aria-hidden",c()?"true":void 0),Z(g,"title",c()?void 0:e(s).tooltip),Z(g,"data-workspace-status",e(s).state),Z(g,"data-workspace-status-visual",e(s).visual),Z(g,"data-workspace-status-icon",e(s).icon?.iconName)},[()=>Za(Ja("workspace-status-icon inline-flex shrink-0 items-center justify-center forced-colors:text-[CanvasText]",e(s).className,u()))]),H(a,g),st(o)}const Gt=6e4,Yt=60*Gt,$t=24*Yt,da=30*$t;function dn(a,t=new Date){if(a==null)return null;const r=a instanceof Date?a:new Date(a),l=r.getTime(),c=t.getTime();if(!Number.isFinite(l)||!Number.isFinite(c))return null;const u=Math.max(0,c-l);let s;u<Gt?s="<1m":u<Yt?s=`${Oe(Math.floor(u/Gt))}m`:u<$t?s=`${Oe(Math.floor(u/Yt))}h`:u<da?s=`${Oe(Math.floor(u/$t))}d`:s=`${Oe(Math.floor(u/da))}mo`;const o=l>c?t:r,g=wr(o,{now:t});return g?{compact:s,accessible:g,dateTime:r.toISOString()}:null}var un=z('<div><div class="grid gap-0.5 px-5 pt-4"><div class="flex min-w-0 items-center justify-between gap-3"><!> <!></div> <!> <!></div> <div class="my-3 border-t border-border" data-workspace-hover-card-divider=""></div> <div class="body-grid grid min-w-0 grid-cols-1 items-stretch gap-3 px-5 pb-4" data-workspace-hover-card-columns=""><div class="grid" data-workspace-hover-card-activity=""><!></div> <div class="pull-requests grid" data-workspace-hover-card-pr-column=""><!></div></div></div>'),fn=z('<p class="type-caption mt-1 min-w-0 line-clamp-3 text-muted-foreground" data-workspace-hover-card-summary=""> </p>'),pn=z('<span class="shrink-0 text-muted-foreground" data-workspace-hover-card-question-meta=""><span aria-hidden="true"> </span></span>'),mn=z('<span class="row-span-2 flex h-(--text-caption-line-height) items-center" aria-hidden="true"><!></span><span class="type-caption min-w-0 truncate text-foreground" data-workspace-hover-card-agent-name=""> </span><time class="type-caption whitespace-nowrap text-muted-foreground" data-workspace-hover-card-agent-time=""> </time> <span class="agent-detail type-caption flex min-w-0 items-start gap-1.5 text-muted-foreground svelte-1vax087" data-workspace-hover-card-agent-detail=""><span class="min-w-0 truncate" data-workspace-hover-card-agent-context=""> </span><!></span>',1),ua=z('<div role="listitem"><!></div>'),gn=z('<div class="type-caption mt-3 flex items-center justify-between text-muted-foreground" data-workspace-hover-card-overflow=""><span> </span> <!></div>'),vn=z('<section class="activity min-w-0" data-workspace-hover-card-activity="" data-workspace-hover-card-agent-table=""><div class="-mx-2 grid gap-2" role="list"></div> <!></section>'),hn=z('<!> <span class="type-caption min-w-0 truncate text-foreground" data-workspace-hover-card-pr-title=""> </span> <span class="type-caption shrink-0 text-muted-foreground" data-workspace-hover-card-pr-status=""> </span> <span class="type-caption shrink-0 text-muted-foreground" data-workspace-hover-card-pr-number=""> </span>',1),bn=z('<div class="grid w-full min-w-0 grid-cols-[1rem_minmax(0,1fr)_auto_auto] items-center gap-x-2 rounded-sm px-2 py-0 text-left" data-workspace-hover-card-pr-row=""><!></div>'),wn=z('<div class="type-caption mt-3 flex items-center justify-between text-muted-foreground" data-workspace-hover-card-pr-overflow=""><span> </span> <!></div>'),_n=z('<section class="pull-requests min-w-0" data-workspace-hover-card-pr-column=""><div class="-mx-2 grid min-w-0 gap-2" role="list" data-workspace-hover-card-pr-list=""></div> <!></section>'),kn=z('<div class="my-3 border-t border-border" data-workspace-hover-card-divider=""></div> <div class="body-grid grid min-w-0 grid-cols-1 items-stretch gap-3 px-5 pb-4" data-workspace-hover-card-columns=""><!> <!></div>',1),yn=z('<header data-workspace-hover-card-header=""><div class="min-w-0" data-workspace-hover-card-identity=""><div class="flex min-w-0 items-center justify-between gap-3"><h2 class="type-body min-w-0 truncate font-medium text-foreground" data-workspace-hover-card-title=""> </h2> <span class="type-caption flex shrink-0 items-center gap-1.5 text-muted-foreground" data-workspace-hover-card-status=""><span class="truncate" data-workspace-hover-card-status-label=""> </span><!></span></div> <div class="type-caption mt-0.5 min-w-0 truncate text-muted-foreground" data-workspace-hover-card-repo=""> </div> <!></div></header> <!>',1),xn=z('<section class="workspace-hover-card shrink-0 overflow-hidden rounded-md bg-background text-left text-foreground shadow-(--elevation-overlay) ring-1 ring-border svelte-1vax087" data-workspace-hover-card="" data-workspace-hover-card-layout="landscape"><!></section>');function An(a,t){if(new.target)return tt({component:An,...a});nt(t,!0);const r=()=>Qt(P,"$workspaceAgents$",c),l=()=>Qt(i,"$prMonitors$",c),[c,u]=Va(),s=Pr("WorkspaceHoverCard");let o=I(t,"workspace",7),g=I(t,"isLoading",7,!1),x=I(t,"activeAgentIds",23,()=>[]),b=I(t,"loadAgentSessions",7,!0),w=I(t,"onkeydown",7),m=I(t,"staticData",7,!1);const k=Wt("");function U(){return m()?Wt([]):er(k)}function B(){return m()?Wt([]):tr(k)}const P=U(),i=B();kt(()=>k.set(o()?.id??""));let p=ne(0);ya(()=>Zt.subscribe(()=>Ka(p)));let _=E(()=>o()?.agentSummary?.agentIds??[]),T=E(()=>(e(p),o()?Zt.getStreamingAgentIdsForWorkspace(o().id):[])),D=null,Y=new Set;kt(()=>{if(!o()||!b())return;const d=String(o().id);D!==d&&(D=d,Y=new Set);for(const C of new Set([...e(_).slice(0,6),...x(),...e(T)]))Y.has(C)||(ve.dispatch(_r(d,C)),Y.add(C))});function se(d){return[d.name,d.context,d.questionMeta?.accessible,d.updated.accessible].filter(Boolean).join(". ")}function Ce(d){return d?d.kind==="attention"?d.attention.reason?.trim()||null:"text"in d&&d.text.trim()||null:null}function le(d){return dn(d.lastActivity||d.updatedAt||d.createdAt)??{compact:"—",accessible:A.workspace_hoverCard_noRecentActivity_label()}}function y(d){const C=String(d.status).toLowerCase(),F=yr(d),Q=lr(d),be=Q==="question"?gr(d):null,pe=Ce(rr.select(ve.state,String(d.id)));let we,Ee,_e,n,f,W,S=!1;if(Q==="question"){we="attention",Ee="question",_e=be?.questions[0]?.question.trim()||pe||A.workspace_hoverCard_question_label(),n="question",f=1;const K=be?.questions.length??0;K>1&&(W={compact:`${Oe(1)}/${Oe(K)}`,accessible:A.chat_questionWizard_stepCounter_label({current:1,total:K})})}else if(Q==="attention-discussion")we="attention",Ee="discussion",_e=F?.reason?.trim()||A.chat_agentCard_attentionDiscussion_label(),n="attention-discussion",f=1;else if(Q==="attention-blocker"||C==="blocked")we="attention",Ee="blocker",_e=F?.reason?.trim()||A.chat_agentCard_attentionBlocker_label(),n="attention-blocker",f=0;else if(d.hasUnread)we="attention",Ee="unread",_e=pe||A.chat_newMessagesDivider_label(),S=!!pe,n="unread",f=2;else if(d.isStreaming||d.isProcessing||x().includes(String(d.id))||e(T).includes(String(d.id))||["active","busy","processing","responding","running","streaming","in_progress"].includes(C))we="active",_e=pe||A.workspace_devScripts_running_label(),S=!!pe,n=d.isProcessing?"responding":"running",f=3;else if(["waiting","pending","queued","starting"].includes(C))we="waiting",_e=pe||A.workspace_taskStatus_waiting_label(),S=!!pe,n="waiting",f=4;else return null;const j=d.agentMetadata??d.metadata;return{id:String(d.id),name:d.name?.trim()||A.workspace_fileChanges_agent_label(),group:we,attentionKind:Ee,avatarState:n,specialist:j?.specialist,context:_e,questionMeta:W,contextIsPreview:S,updated:le(d),priority:f}}let $=E(()=>{const d=o()?.agentSummary,C=new Map;if(Array.isArray(d?.agents))for(const F of d.agents)F&&typeof F=="object"&&typeof F.id=="string"&&C.set(F.id,F.parentAgentId);return r().filter(F=>{const Q=C.get(String(F.id));return!(kr(F)!=="topLevel"||typeof Q=="string"&&Q||F.pendingDeleteAt||F.retiredAt||String(F.status).toLowerCase()==="deleted")})}),oe=E(()=>e($).map(y).filter(d=>d!==null).sort((d,C)=>d.priority-C.priority)),Le=E(()=>e(oe).slice(0,6)),Me=E(()=>Math.max(0,e(oe).length-6)),fe=E(()=>o()?.repositoryName?o().repositoryOwner?`${o().repositoryOwner} / ${o().repositoryName}`:o().repositoryName:A.workspace_hoverCard_localRepository_label()),Ve=E(()=>on(o()??{})),ke=E(()=>Ea(e(Ve))),ee=E(()=>o()?.statusMessage?.trim()||"");function Se(d){if(!d)return null;const C=d.activePullRequest??d.pullRequests?.[0]??null;return C||(d.prStatus?{id:`legacy-pr-${d.prNumber??"workspace"}`,number:d.prNumber??0,url:d.prUrl??"",title:A.workspace_hoverCard_pullRequest_label(),status:d.prStatus,createdAt:d.updatedAt,updatedAt:d.updatedAt}:null)}let ft=E(()=>o()?m()?Se(o()):nr.select(ve.state,o().id)??Se(o()):null),Ie=E(()=>{if(!o()||ar(o()))return[];const d=o().repositoryOwner&&o().repositoryName?`${o().repositoryOwner}/${o().repositoryName}`:void 0;return cr({workspacePRs:o().pullRequests,activePR:e(ft),monitors:l(),workspaceRepo:d,buildPrUrl:(C,F)=>Vr(C,o().repositoryOwner,o().repositoryName,F),getDisplayTitle:C=>C.title})}),ot=E(()=>e(Ie).slice(0,3)),De=E(()=>Math.max(0,e(Ie).length-3)),ce=E(()=>e(oe).length>0),Ke=E(()=>e(Ie).length>0),v=E(()=>e(ce)||e(Ke));function h(d){const C=d.resource?.repository.provider==="gitlab"?`${d.repo} !${d.number}`:d.repo?A.workspace_card_prBadge_repoLine_tooltip({repo:d.repo,number:d.number}):A.workspace_card_prBadge_label({number:` #${d.number}`});return[sr(C,d),d.title,d.details].filter(Boolean).join(`
|
|
3
|
+
`)}function ae(d,C){if(d.stopPropagation(),!o()||!b())return;const F=o().id;Br.select(ve.state)!==F&&Fr(F).catch(Q=>{s.warn("Failed to switch workspace for hover-card agent",{agentId:C,error:Q})}),ve.dispatch(xr(F,{agentId:C}))}function V(d,C){if(d.stopPropagation(),!o()||!C.url)return;const F=o().id;ka(async()=>{const{handleLink:Q}=await import("./Dbuv3b_7.js").then(be=>be.V);return{handleLink:Q}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55]),import.meta.url).then(({handleLink:Q})=>Q(C.url,{workspaceId:F,event:d}))}var te={get workspace(){return o()},set workspace(d){o(d),M()},get isLoading(){return g()},set isLoading(d=!1){g(d),M()},get activeAgentIds(){return x()},set activeAgentIds(d=[]){x(d),M()},get loadAgentSessions(){return b()},set loadAgentSessions(d=!0){b(d),M()},get onkeydown(){return w()},set onkeydown(d){w(d),M()},get staticData(){return m()},set staticData(d=!1){m(d),M()},$set:at,$on:(d,C)=>rt(t,d,C)},he=xn(),re=N(he);{var Re=d=>{var C=un(),F=N(C),Q=N(F),be=N(Q);dt(be,{class:"h-7 min-w-0 max-w-64 flex-1"});var pe=O(be,2);dt(pe,{class:"h-5 w-20 shrink-0"}),L(Q);var we=O(Q,2);dt(we,{class:"h-4 w-40"});var Ee=O(we,2);dt(Ee,{class:"mt-2 h-10 w-full"}),L(F);var _e=O(F,4),n=N(_e),f=N(n);dt(f,{class:"h-10 w-full"}),L(n);var W=O(n,2),S=N(W);dt(S,{class:"h-10 w-full"}),L(W),L(_e),L(C),H(d,C)},Ue=d=>{var C=yn(),F=Fe(C);let Q;var be=N(F),pe=N(be),we=N(pe),Ee=me(we,!0),_e=O(we,2),n=N(_e),f=me(n,!0),W=O(n);Ta(W,{get status(){return e(Ve)},size:16,decorative:!0}),L(_e),L(pe);var S=O(pe,2),j=me(S,!0),K=O(S,2);{var J=ue=>{var We=fn(),xt=me(We,!0);Xe(We,(At,Rt)=>Bt?.(At,Rt),()=>e(ee)),X(()=>ge(xt,e(ee))),H(ue,We)};ie(K,ue=>{e(ee)&&ue(J)})}L(be),L(F);var Te=O(F,2);{var de=ue=>{var We=kn(),xt=O(Fe(We),2),At=N(xt);{var Rt=Ye=>{var ze=vn(),Ge=N(ze);zt(Ge,21,()=>e(Le),G=>G.id,(G,R)=>{var ye=ua(),$e=N(ye);{let Qe=E(()=>se(e(R)));jt($e,{variant:"plain",wrapContent:!1,class:"grid h-auto! min-h-8 w-full min-w-0 cursor-pointer grid-cols-[1rem_minmax(0,1fr)_auto] items-start justify-normal gap-x-2 gap-y-0 whitespace-normal rounded-sm border-0! px-2! py-0! text-left font-normal transition-colors hover:bg-muted/50 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",get"aria-label"(){return e(Qe)},"data-workspace-hover-card-agent-row":!0,get"data-agent-group-row"(){return e(R).group},get"data-attention-kind"(){return e(R).attentionKind},get onkeydown(){return w()},onclick:Be=>ae(Be,e(R).id),children:(Be,pt)=>{var Pe=mn(),xe=Fe(Pe),Ne=N(xe);{let Je=E(()=>e(R).specialist??null);dr(Ne,{get agentId(){return e(R).id},variant:"compact",get state(){return e(R).avatarState},get specialist(){return e(Je)}})}L(xe);var it=O(xe),Pt=me(it,!0),Ze=O(it),Ft=me(Ze,!0),mt=O(Ze,2),gt=N(mt),Lt=me(gt,!0);Xe(gt,(Je,ct)=>Bt?.(Je,ct),()=>e(R).context);var qa=O(gt);{var Oa=Je=>{var ct=pn(),Da=N(ct),Ua=me(Da,!0);L(ct),X(()=>{Z(ct,"aria-label",e(R).questionMeta.accessible),ge(Ua,e(R).questionMeta.compact)}),H(Je,ct)};ie(qa,Je=>{e(R).questionMeta&&Je(Oa)})}L(mt),X(()=>{ge(Pt,e(R).name),Z(Ze,"datetime",e(R).updated.dateTime),Z(Ze,"aria-label",e(R).updated.accessible),ge(Ft,e(R).updated.compact),Z(mt,"data-workspace-hover-card-agent-preview",e(R).contextIsPreview||void 0),ge(Lt,e(R).context)}),H(Be,Pe)},$$slots:{default:!0}})}L(ye),H(G,ye)}),L(Ge);var Et=O(Ge,2);{var Tt=G=>{var R=gn(),ye=N(R),$e=me(ye,!0),Qe=O(ye,2);bt(Qe,{get icon(){return ra},size:10}),L(R),X(Be=>ge($e,Be),[()=>A.workspace_hoverCard_moreAgents_label({count:Oe(e(Me))})]),H(G,R)};ie(Et,G=>{e(Me)&&G(Tt)})}L(ze),X(G=>Z(ze,"aria-label",G),[()=>A.workspace_multiSelectSidebar_agentsTab_label()]),H(Ye,ze)};ie(At,Ye=>{e(ce)&&Ye(Rt)})}var Na=O(At,2);{var Ha=Ye=>{var ze=_n(),Ge=N(ze);zt(Ge,21,()=>e(ot),G=>G.identity,(G,R)=>{var ye=ua();{const pt=Pe=>{var xe=hn(),Ne=Fe(xe);bt(Ne,{get icon(){return e(R).statusIcon},size:16,get class(){return`shrink-0 justify-self-start ${e(R).foregroundClass??""}`}});var it=O(Ne,2),Pt=me(it,!0),Ze=O(it,2),Ft=me(Ze,!0),mt=O(Ze,2),gt=me(mt,!0);X(Lt=>{ge(Pt,Lt),ge(Ft,e(R).accessibleStateLabel),ge(gt,e(R).numberLabel??`#${e(R).number}`)},[()=>e(R).title||(e(R).resource?.repository.provider==="gitlab"?A.workspace_hoverCard_mergeRequest_label():A.workspace_hoverCard_pullRequest_label())]),H(Pe,xe)};var $e=N(ye);{var Qe=Pe=>{{let xe=E(()=>h(e(R)));jt(Pe,{variant:"plain",wrapContent:!1,class:"grid h-auto! w-full min-w-0 grid-cols-[1rem_minmax(0,1fr)_auto_auto] items-center justify-normal gap-x-2 whitespace-normal rounded-sm border-0! px-2! py-0! text-left font-normal transition-colors hover:bg-muted/50 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",get"aria-label"(){return e(xe)},"data-workspace-hover-card-pr-row":!0,get"data-pr-identity"(){return e(R).identity},get"data-pr-status"(){return e(R).status},get onkeydown(){return w()},onclick:Ne=>V(Ne,e(R)),children:(Ne,it)=>{pt(Ne)},$$slots:{default:!0}})}},Be=Pe=>{var xe=bn(),Ne=N(xe);pt(Ne),L(xe),X(()=>{Z(xe,"data-pr-identity",e(R).identity),Z(xe,"data-pr-status",e(R).status)}),H(Pe,xe)};ie($e,Pe=>{e(R).url?Pe(Qe):Pe(Be,-1)})}L(ye)}X(pt=>Z(ye,"aria-label",pt),[()=>e(R).url?void 0:h(e(R))]),H(G,ye)}),L(Ge);var Et=O(Ge,2);{var Tt=G=>{var R=wn(),ye=N(R),$e=me(ye,!0),Qe=O(ye,2);bt(Qe,{get icon(){return ra},size:10}),L(R),X(Be=>ge($e,Be),[()=>A.workspace_hoverCard_moreItems_label({count:Oe(e(De))})]),H(G,R)};ie(Et,G=>{e(De)&&G(Tt)})}L(ze),X((G,R)=>{Z(ze,"aria-label",G),Z(Ge,"aria-label",R)},[()=>e(Ie).every(G=>G.resource?.repository.provider==="gitlab")?A.workspace_hoverCard_mergeRequests_label():e(Ie).some(G=>G.resource?.repository.provider==="gitlab")?A.workspace_hoverCard_reviews_label():A.workspace_hoverCard_pullRequests_label(),()=>e(Ie).every(G=>G.resource?.repository.provider==="gitlab")?A.workspace_hoverCard_mergeRequests_label():e(Ie).some(G=>G.resource?.repository.provider==="gitlab")?A.workspace_hoverCard_reviews_label():A.workspace_hoverCard_pullRequests_label()]),H(Ye,ze)};ie(Na,Ye=>{e(Ke)&&Ye(Ha)})}L(xt),H(ue,We)};ie(Te,ue=>{e(v)&&ue(de)})}X(ue=>{Q=qe(F,1,"min-w-0 px-5 pt-4",null,Q,{"pb-4":!e(v)}),ge(Ee,ue),ge(f,e(ke).label),ge(j,e(fe))},[()=>o().title||A.workspace_links_untitled_label()]),H(d,C)};ie(re,d=>{g()||!o()?d(Re):d(Ue,-1)})}L(he),H(a,he);var je=st(te);return u(),je}const fa=800,Ss=175,In=300;function Mn(){let a=0,t=null;const r=new Set,l=new Set;function c(){return a>0||t!==null?0:fa}function u(){const o=c();r.forEach(g=>g(o))}function s(){t!==null&&(clearTimeout(t),t=null)}return{get currentOpenDelay(){return c()},subscribe(o){return r.add(o),o(c()),()=>r.delete(o)},notifyOpened(){const o=a===0&&t===null;s(),a+=1,o&&u()},notifyClosed(){a!==0&&(a-=1,!(a>0)&&(s(),t=setTimeout(()=>{t=null,u()},In)))},deferClose(o){return l.add(o),()=>l.delete(o)},settleDeferredCloses(){const o=[...l];l.clear(),o.forEach(g=>g())},reset(){const o=c()!==fa;s(),a=0,l.clear(),o&&u()}}}const Rs=Mn();function Ot(a){const t=Aa.select(ve.state,a);return t!==void 0&&Cr(t)}function Cn(a,t){if(!Ot(a))return[];const r=vr.select(ve.state,a),l=Jt.select(ve.state,a),c=hr.select(ve.state),u=[];for(let s=0;s<Ar;s+=1){const o=c[s],g=o&&o!==a?Aa.select(ve.state,o):void 0;u.push({id:`assign-micro-key-${s+1}`,label:g?A.workspace_card_assignOccupiedMicroKey_label({number:Oe(s+1),title:g.title}):A.workspace_card_assignMicroKeyNumber_label({number:Oe(s+1)}),checked:r===s,closeOnSelect:!0,onClick:()=>{Ot(a)&&ve.dispatch(Ir(s,a)),t()}})}return l!==null&&(u.push({type:"separator"}),u.push({id:"unassign-micro-key",label:A.workspace_card_unassignMicroKey_label(),onClick:()=>{Ot(a)&&Jt.select(ve.state,a)===l&&ve.dispatch(Mr(l)),t()}})),u}function Es(a,{connected:t,onClose:r}){if(!t)return[];const l=Cn(a,r);if(l.length===0)return[];const c=l.filter(s=>"id"in s&&s.id!=="unassign-micro-key"),u=l.find(s=>"id"in s&&s.id==="unassign-micro-key");return[{id:"assign-micro-key",label:A.workspace_card_assignMicroKey_label(),icon:Ur,onClick:()=>{},selection:"single",submenu:c},...u?[u]:[]]}var Sn=z('<div data-static-position="" role="tooltip"><!></div>'),pa=z('<div role="tooltip"><!></div>');function Rn(a,t){if(new.target)return tt({component:Rn,...a});nt(t,!0);let r=I(t,"id",7),l=I(t,"anchor",7),c=I(t,"position",7,"right"),u=I(t,"absolute",7,!1),s=I(t,"anchorElement",7,null),o=I(t,"staticPosition",7,!1),g=I(t,"class",7,""),x=I(t,"children",7),b=I(t,"onmouseenter",7),w=I(t,"onmouseleave",7),m=I(t,"onfocusin",7),k=I(t,"onfocusout",7);const U=Xr(en()+2);tn(U);const B=an(U),P=8,i=4;let p=ne(null),_=ne(""),T=ne(void 0);const D=E(()=>c()==="bottom-right"||c()==="bottom-left"),Y=E(()=>c()==="top"),se=E(()=>o()?"relative":u()?"absolute":"fixed"),Ce=E(()=>c()==="right"?{x:-4,y:0}:c()==="bottom"?{x:4,y:0}:e(Y)?{x:0,y:4}:{x:0,y:-4});function le(v,h,ae){return Math.max(h,Math.min(ae,v))}let y=null,$=null;function oe(){return!y?.isConnected||$!==l()?!1:y.style.getPropertyValue("anchor-name").includes(l())||getComputedStyle(y).getPropertyValue("anchor-name").includes(l())}function Le(){return s()?s():(oe()||(y=Array.from(document.querySelectorAll('[style*="anchor-name"]')).find(v=>{const h=v.style.getPropertyValue("anchor-name"),ae=getComputedStyle(v).getPropertyValue("anchor-name");return h.includes(l())||ae.includes(l())})??null,$=y?l():null),y)}function Me(){if(o()||u()||!e(p))return;const v=Le();if(!v)return;const h=v.getBoundingClientRect(),ae=e(p).getBoundingClientRect(),V=window.innerWidth||document.documentElement.clientWidth,te=window.innerHeight||document.documentElement.clientHeight,he=ae.width||e(p).offsetWidth,re=ae.height||e(p).offsetHeight,Re=Math.max(0,h.top-i-P),Ue=Math.max(0,te-h.bottom-i-P),je=e(Y)?!(Re<re&&Ue>Re):e(D)&&Ue<re&&Re>Ue;let d=h.left,C=h.bottom+i,F=je?Re:Ue;if(c()==="right"){const Q=h.left-i-P,be=V-h.right-i-P;d=be>=he||be>=Q?h.right+i:h.left-he-i,C=h.top,F=Math.max(0,te-P*2)}else c()==="bottom"?(d=h.left-he-i,C=h.bottom-re):(e(Y)||e(D))&&(c()==="bottom-left"?d=h.right-he:e(Y)&&(d=h.left+h.width/2-he/2),C=je?h.top-Math.min(re,F)-i:h.bottom+i);d=le(d,P,Math.max(P,V-he-P)),C=le(C,P,Math.max(P,te-Math.min(re,F)-P)),q(T,`${F}px`),q(_,`left: ${d}px; top: ${C}px;`)}let fe=!1;async function Ve(){fe||(fe=!0,await ja(),fe=!1,Me())}let ke=null;function ee(){ke||(ke=Jr(()=>{ke=null,Me()}))}function Se(v){const h=s()??(oe()?y:null);h&&v.target instanceof Node&&!v.target.contains(h)||ee()}kt(()=>{const v=e(p),h=s();o()||u()||!v||!h||Ve()}),ya(()=>{if(o())return;let v=null;return Ve().then(()=>{if(!u()&&typeof ResizeObserver<"u"){v=new ResizeObserver(ee),e(p)&&v.observe(e(p));const h=Le();h&&v.observe(h)}}),window.addEventListener("resize",ee),window.addEventListener("scroll",Se,!0),()=>{v?.disconnect(),window.removeEventListener("resize",ee),window.removeEventListener("scroll",Se,!0),ke?.(),ke=null}});var ft={get id(){return r()},set id(v){r(v),M()},get anchor(){return l()},set anchor(v){l(v),M()},get position(){return c()},set position(v="right"){c(v),M()},get absolute(){return u()},set absolute(v=!1){u(v),M()},get anchorElement(){return s()},set anchorElement(v=null){s(v),M()},get staticPosition(){return o()},set staticPosition(v=!1){o(v),M()},get class(){return g()},set class(v=""){g(v),M()},get children(){return x()},set children(v){x(v),M()},get onmouseenter(){return b()},set onmouseenter(v){b(v),M()},get onmouseleave(){return w()},set onmouseleave(v){w(v),M()},get onfocusin(){return m()},set onfocusin(v){m(v),M()},get onfocusout(){return k()},set onfocusout(v){k(v),M()},$set:at,$on:(v,h)=>rt(t,v,h)},Ie=Ut(),ot=Fe(Ie);{var De=v=>{var h=Sn(),ae=N(h);qt(ae,()=>x()??Nt),L(h),et(h,V=>q(p,V),()=>e(p)),X(()=>{Z(h,"id",r()),qe(h,1,e(se)+` z-50 w-64 flex flex-col overflow-y-auto border border-border pointer-events-auto ${B} `+g()),Z(h,"data-surface-level",U)}),H(v,h)},ce=v=>{var h=pa();let ae;var V=N(h);qt(V,()=>x()??Nt),L(h),et(h,te=>q(p,te),()=>e(p)),X(()=>{Z(h,"id",r()),qe(h,1,e(se)+` z-50 w-64 flex flex-col border border-border pointer-events-none ${B} `+g()),Z(h,"data-surface-level",U),ae=Ct(h,"",ae,{"position-anchor":l(),right:c()==="bottom"?"anchor(left)":void 0,left:c()==="right"?"anchor(right)":e(D)?"anchor(left)":e(Y)?"anchor(center)":void 0,top:c()==="right"?"anchor(top)":e(D)?"anchor(bottom)":void 0,bottom:c()==="bottom"?"anchor(bottom)":e(Y)?"anchor(top)":void 0,"margin-right":c()==="bottom"?"8px":void 0,"margin-left":c()==="right"?"8px":void 0,"margin-top":e(D)?"4px":void 0,"margin-bottom":e(Y)?"4px":void 0,translate:e(Y)?"-50% 0":void 0})}),He("mouseenter",h,function(...te){b()?.apply(this,te)}),He("mouseleave",h,function(...te){w()?.apply(this,te)}),Ae("focusin",h,function(...te){m()?.apply(this,te)}),Ae("focusout",h,function(...te){k()?.apply(this,te)}),It(1,h,()=>Xt,()=>({tier:"fast",...e(Ce),scale:.96})),It(2,h,()=>ea,()=>({tier:"fast"})),H(v,h)},Ke=v=>{br(v,{zIndex:50,children:(h,ae)=>{var V=pa();let te;var he=N(V);qt(he,()=>x()??Nt),L(V),et(V,re=>q(p,re),()=>e(p)),X(()=>{Z(V,"id",r()),qe(V,1,e(se)+` z-50 w-64 flex flex-col overflow-y-auto border border-border pointer-events-auto ${B} `+g()),Z(V,"data-surface-level",U),te=Ct(V,e(_),te,{"max-height":e(T)})}),He("mouseenter",V,function(...re){b()?.apply(this,re)}),He("mouseleave",V,function(...re){w()?.apply(this,re)}),Ae("focusin",V,function(...re){m()?.apply(this,re)}),Ae("focusout",V,function(...re){k()?.apply(this,re)}),It(1,V,()=>Xt,()=>({tier:"fast",...e(Ce),scale:.96})),It(2,V,()=>ea,()=>({tier:"fast"})),H(h,V)},$$slots:{default:!0}})};ie(ot,v=>{o()?v(De):u()?v(ce,1):v(Ke,-1)})}return H(a,Ie),st(ft)}xa(["focusin","focusout"]);function _t(a,t){return t||/^(?:https?:|data:|blob:|workspace-asset:)/i.test(a.trim())}function En(a,t){if(t||!a)return a;const r=document.createElement("template");r.innerHTML=a;for(const l of r.content.querySelectorAll("img, video")){const c=l.getAttribute("src")||l.getAttribute("data-media-src")||"",u=[...l.querySelectorAll("source")];if(!_t(c,!1)||u.some(o=>!_t(o.getAttribute("src")||"",!1))){const o=document.createElement("img");o.setAttribute("alt",l.getAttribute("alt")||l.getAttribute("data-name")||""),o.setAttribute("data-media-unavailable","node-owned"),l.replaceWith(o);continue}l.removeAttribute("srcset");const s=l.getAttribute("poster");s&&!_t(s,!1)&&l.removeAttribute("poster")}return r.innerHTML}const Tn=[/(^|[^\\])\$(?!\$)(?=\S)(?:\\.|[^\\$\n])+?\$(?!\$)/,/(^|[^\\])\\\((?:\\.|[^\\\n])*?\\\)/,/^(?: {0,3})(?:\$\$|\\\[)/m,/^\s*[-*]\s*\[[ x]\]/m,/```/,/`[^`]+`/,/\|.*\|/,/\[.*\]\(.*\)/,/!\[.*\]\(.*\)/,/<[a-z][\s\S]*>/i,/^#{1,6}\s/m,/^\s*>\s/m,/\*\*[^*]+\*\*/,/\*[^*]+\*/,/_[^_]+_/,/~~[^~]+~~/,/^[-*_]{3,}\s*$/m,/^\s*[-*+]\s/m,/^\s*\d+\.\s/m];function Pn(a){return a&&(Tn.some(t=>t.test(a))||or(a,"markdown"))?"static":"simple"}var Fn=z("<!> <!>",1);function Pa(a,t){if(new.target)return tt({component:Pa,...a});nt(t,!0);let r=I(t,"workspaceId",7),l=I(t,"canUseMedia",7),c=ne(null),u=ne(null),s=ne(!1),o=ne(!1);function g(_){q(c,{url:_.getAttribute("src")||"",name:_.getAttribute("alt")||void 0,opener:_},!0),q(s,!0)}function x(_){const T=na(_.getAttribute("href")||"",r());return T&&l()(T)?(q(c,{url:T,name:_.textContent?.trim()||void 0,opener:_,assetLink:!0},!0),q(s,!0),!0):b(_)}function b(_){const T=wt(_.getAttribute("href")||"",r());return!T||!l()(T.url)?!1:(q(u,{url:T.url,mimeType:T.mimeType,name:_.textContent?.trim()||void 0,opener:_},!0),q(o,!0),!0)}kt(()=>{e(u)&&!wt(e(u).url,r())&&(q(o,!1),q(u,null)),e(c)?.assetLink&&!na(e(c).url,r())&&(q(s,!1),q(c,null))});var w={openImage:g,openAsset:x,get workspaceId(){return r()},set workspaceId(_){r(_),M()},get canUseMedia(){return l()},set canUseMedia(_){l(_),M()},$set:at,$on:(_,T)=>rt(t,_,T)},m=Fn(),k=Fe(m);{var U=_=>{ur(_,{get imageUrl(){return e(c).url},get imageName(){return e(c).name},get openerElement(){return e(c).opener},showActionsMenu:!0,get open(){return e(s)},set open(T){q(s,T,!0)}})},B=E(()=>e(c)&&l()(e(c).url));ie(k,_=>{e(B)&&_(U)})}var P=O(k,2);{var i=_=>{Ia(_,{get videoUrl(){return e(u).url},get videoName(){return e(u).name},get mimeType(){return e(u).mimeType},sourceKind:"workspace",get openerElement(){return e(u).opener},get open(){return e(o)},set open(T){q(o,T,!0)}})},p=E(()=>e(u)&&wt(e(u).url,r())&&l()(e(u).url));ie(P,_=>{e(p)&&_(i)})}return H(a,m),st(w)}var Ln=z('<div class="flex items-center gap-2"><!> <!></div>'),Wn=z('<div class="absolute inset-0 flex items-center justify-center bg-muted text-muted-foreground" aria-hidden="true"><svg viewBox="0 0 24 24" class="size-10" fill="none"><rect x="3" y="5" width="18" height="14" rx="2" stroke="currentColor"></rect><path d="m10 9 5 3-5 3V9Z" fill="currentColor"></path></svg></div> <video preload="metadata" playsinline="" tabindex="-1" aria-hidden="true"></video> <span class="absolute inset-0 flex items-center justify-center bg-black/10 transition-colors group-hover:bg-black/20 motion-reduce:transition-none forced-colors:bg-transparent" aria-hidden="true"><span class="flex size-11 items-center justify-center rounded-full border border-white/70 bg-black/60 text-white shadow-(--elevation-raised) forced-colors:border forced-colors:bg-[Canvas] forced-colors:text-[CanvasText]"><svg viewBox="0 0 20 20" class="ml-0.5 size-5" fill="currentColor"><path d="m7 5 7 5-7 5V5Z"></path></svg></span></span>',3),Nn=z('<div class="group relative aspect-video w-full max-h-40 max-w-2xl" style="width: min(100%, calc(10rem * 16 / 9));"><!> <!></div>'),Hn=z('<div class="my-2 min-w-0 max-w-2xl" data-chat-video=""><!></div> <!>',1);function Fa(a,t){if(new.target)return tt({component:Fa,...a});nt(t,!0);let r=I(t,"source",7),l=I(t,"name",23,()=>A.chat_videoBlock_fromAgent_label()),c=I(t,"poster",7),u=I(t,"allowFileMedia",7,!0),s=I(t,"canOpenFile",7),o=ne(!1),g=ne(!1),x=ne(!1),b=ne(null);const w=E(()=>r().kind==="inline"?`data:${r().mimeType};base64,${r().data}`:r().url);function m(y){return _t(y,u()&&s()?.()!==!1)}const k=E(()=>!m(e(w))),U=E(()=>yt(e(w))),B=E(()=>{if(!(!c()||!m(c()))){if(/^data:image\/(?:gif|jpeg|png|webp);base64,[a-z0-9+/=]+$/i.test(c()))return c();try{const y=new URL(c());return(y.protocol==="https:"||y.protocol==="workspace-file:")&&!y.username&&!y.password?c():void 0}catch{return}}});function P(){q(g,!0),q(x,!1)}var i={get source(){return r()},set source(y){r(y),M()},get name(){return l()},set name(y=A.chat_videoBlock_fromAgent_label()){l(y),M()},get poster(){return c()},set poster(y){c(y),M()},get allowFileMedia(){return u()},set allowFileMedia(y=!0){u(y),M()},get canOpenFile(){return s()},set canOpenFile(y){s(y),M()},$set:at,$on:(y,$)=>rt(t,y,$)},p=Hn(),_=Fe(p),T=N(_);{var D=y=>{Vt(y,{get name(){return l()},reason:"load-failed"})},Y=y=>{var $=Ln(),oe=N($);{let Me=E(()=>e(U)?.path),fe=E(()=>e(U)?.workspaceId);Vt(oe,{get name(){return l()},reason:"load-failed",get path(){return e(Me)},get workspaceId(){return e(fe)}})}var Le=O(oe,2);Kt(Le,{get videoUrl(){return e(w)},get videoName(){return l()},get sourceKind(){return r().kind},get mimeType(){return r().mimeType}}),L($),H(y,$)},se=y=>{var $=Nn(),oe=N($);{let Me=E(()=>A.chat_videoBlock_play_ariaLabel({name:l()}));jt(oe,{type:"button",variant:"ghost",size:"default",class:"relative block size-full cursor-pointer overflow-hidden rounded-lg border border-border bg-muted/40 p-0 shadow-(--elevation-raised) focus-visible:border-ring focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 forced-colors:border",get"aria-label"(){return e(Me)},"data-testid":"chat-video-snapshot",onclick:()=>{m(e(w))&&q(o,!0)},get ref(){return e(b)},set ref(fe){q(b,fe,!0)},children:(fe,Ve)=>{var ke=Wn(),ee=O(Fe(ke),2);ee.muted=!0,Ga(2),X(()=>{Z(ee,"src",e(w)),Z(ee,"poster",e(B)),qe(ee,1,`pointer-events-none absolute inset-0 size-full object-contain transition-opacity motion-reduce:transition-none ${e(B)||e(g)&&!e(x)?"opacity-100":"opacity-0"}`)}),He("loadeddata",ee,P),He("error",ee,()=>q(x,!0)),H(fe,ke)},$$slots:{default:!0}})}var Le=O(oe,2);Kt(Le,{get videoUrl(){return e(w)},get videoName(){return l()},get sourceKind(){return r().kind},get mimeType(){return r().mimeType},triggerClass:"absolute right-1.5 top-1.5 opacity-0 transition-opacity focus-visible:opacity-100 group-focus-within:opacity-100 group-hover:opacity-100 data-[state=open]:opacity-100"}),L($),H(y,$)};ie(T,y=>{e(k)?y(D):e(x)?y(Y,1):y(se,-1)})}L(_);var Ce=O(_,2);{var le=y=>{Ia(y,{get videoUrl(){return e(w)},get videoName(){return l()},get poster(){return e(B)},get sourceKind(){return r().kind},get mimeType(){return r().mimeType},get openerElement(){return e(b)},get open(){return e(o)},set open($){q(o,$,!0)}})};ie(Ce,y=>{!e(x)&&!e(k)&&y(le)})}return H(a,p),st(i)}const qn=/^\s*!\[([^\]\n]*)\]\((?:<)?((?:intent:\/\/local\/|workspace-file:\/\/|workspace-asset:\/\/)[^)\s>]+)(?:>)?\)\s*$/,On=/^ {0,3}(`{3,}|~{3,})(.*)$/;function ma(a,t){if(typeof a!="string"||!a||a!==a.trim())return null;if(a.startsWith("workspace-asset://"))return wt(a,t);if(a.startsWith("workspace-file://")){const l=yt(a);if(!l||l.workspaceId!==t)return null;const c=Sa(a);return c?la(c,t):null}const r=a.startsWith("intent://")?a:`intent://local/file/${a}`;return la(r,t)}function Dn(a,t){if(a.startsWith("workspace-file://")){const r=yt(a);if(!r||r.workspaceId!==t)return!1;const l=Sa(a);return!!l&&!!St(l,t)}return!!St(a,t,{readOnly:!0})}function Un(a,t){return(t===0||!a[t-1].trim())&&(t===a.length-1||!a[t+1].trim())}function zn(a,t,r){const l=r[0];return a.findIndex((c,u)=>{if(u<=t)return!1;const s=c.trim();return s.length>=r.length&&s.split("").every(o=>o===l)})}function Bn(a,t){const r=a.split(`
|
|
4
4
|
`),l=[];let c=[];const u=()=>{const s=c.join(`
|
|
5
5
|
`);s.trim()&&l.push({type:"markdown",content:s}),c=[]};for(let s=0;s<r.length;s+=1){const o=r[s].match(On);if(o){const k=zn(r,s,o[1]);if(k>s){const U=r.slice(s,k+1);if(o[2].trim()==="ws-block:video")try{const B=JSON.parse(r.slice(s+1,k).join(`
|
|
6
|
-
`)),P=ma(B?.path,t);if(P){u(),l.push({type:"video",source:P,name:typeof B.path=="string"?B.path:void 0,poster:typeof B.poster=="string"?B.poster:void 0}),s=k;continue}}catch{}c.push(...U),s=k;continue}c.push(...r.slice(s));break}const x=!/^(?: {4}|\t)/.test(r[s])&&Un(r,s)?r[s].match(qn):null;if(!x){c.push(r[s]);continue}const[,b,w]=x,m=ma(w,t);m?(u(),l.push({type:"video",source:m,name:b||void 0})):w.startsWith("workspace-asset://")&&!Kr(w)||Dn(w,t)?c.push(r[s]):c.push(`[${b}](${w})`)}return u(),l}function vt(a){return Ma(a.getAttribute("src")||"")}function Dt(a){return a instanceof HTMLImageElement?a:a instanceof HTMLAnchorElement?a.querySelector("img"):null}function Vn(a,t){const r=a.getBoundingClientRect(),l=t.getBoundingClientRect();return{top:r.top-l.top+6,right:l.right-r.right+6}}function ga(a,t){const r=document.activeElement;return!!(r&&(r===a||r===a?.closest("a")||t?.contains(r)))}function Kn(a,t){const r=a.getAttribute("src")||"",l=yt(r)?.path??Ra(r,t)?.path;if(l)return l;if(r.startsWith("workspace-asset://")){const c=r.split(/[?#]/)[0].split("/").pop();if(c)return c}if(r&&!/^[a-z][a-z0-9+.-]*:/i.test(r)&&!r.startsWith("//"))try{return decodeURI(r)}catch{return r}return a.getAttribute("alt")||void 0}const La="data-image-sized",va=a=>typeof a=="number"&&Number.isInteger(a)&&a>0;function jn(a){try{return encodeURI(a).replace(/%25/g,"%")}catch{return null}}function Gn(a){return a.startsWith("workspace-file://")?a.split(/[?#]/)[0]:a}function Yn(a,t,r){const l=new Map;for(const[c,u]of Object.entries(a)){if(!u||!va(u.width)||!va(u.height))continue;const s={width:u.width,height:u.height},o=new Set([c]),g=jn(c);g&&o.add(g);for(const x of[...o]){const b=St(x,t);if(b&&o.add(b),r!==void 0){const w=jr(x,r);if(w){const m=St(`intent://local/file/${w.split("/").map(encodeURIComponent).join("/")}`,t);m&&o.add(m)}}}for(const x of o)l.has(x)||l.set(x,s)}return l}function $n(a,t,r,l){if(!t||!a.includes("<img"))return a;const c=Yn(t,r,l);return c.size===0?a:a.replace(/<img\b(?:[^>"']|"[^"]*"|'[^']*')*>/gi,u=>{if(/\s(?:width|height)="/i.test(u))return u;const s=/\ssrc="([^"]*)"/i.exec(u);if(!s)return u;const o=Gn(s[1].replace(/&/g,"&")),g=c.get(o);return g?u.replace(/\s*\/?>$/,` width="${g.width}" height="${g.height}" ${La}="">`):u})}function ha(a,t){let r=t,l,c=!1,u=!1;const s=new Map;function o(){for(const[b,{component:w,source:m}]of s)ut(w),a.contains(b)&&b.replaceWith(m);s.clear()}function g(){if(!u){for(const[b,{component:w}]of s)a.contains(b)||(ut(w),s.delete(b));if(r.enabled)for(const b of a.querySelectorAll("pre > code")){if(b.closest("[data-markdown-diagram]"))continue;const w=[...b.classList].find(P=>P.startsWith("language-"))?.slice(9);let m;if(w==="mermaid")m="mermaid";else if(w==="diagram"||w==="ws-block:diagram")m="diagram";else if(w==="ws-block")try{if(JSON.parse(b.textContent??"").type!=="diagram")continue;m="diagram"}catch{continue}else continue;const k=b.parentElement;if(!k)continue;if(!l){c||(c=!0,ka(()=>import("./Blhl4Kzo.js"),__vite__mapDeps([56,2,1,57,45,58,18,19,20,21,14,7,3,12,32,24,11,6,8,33,9,10,13,15,34,5,59,31,48,46,47,49,29,30,35,36,0,4,16,17,22,23,25,26,27,28,37,38,39,40,41,42,43,44,50,51,52,53,54,55,60,61,62,63,64,65,66,67]),import.meta.url).then(P=>{l=P.default,c=!1,g()}).catch(P=>{c=!1,ht.error("Failed to load the Markdown diagram renderer",{error:P})}));return}const U=document.createElement("div");U.dataset.markdownDiagram=m,k.replaceWith(U);const B=Mt(l,{target:U,context:r.context,props:{kind:m,source:b.textContent??"",workspaceId:r.workspaceId}});s.set(U,{component:B,source:k})}}}const x=new MutationObserver(g);return x.observe(a,{childList:!0,subtree:!0}),queueMicrotask(g),{update(b){(r.enabled!==b.enabled||r.workspaceId!==b.workspaceId)&&o(),r=b,g()},destroy(){u=!0,x.disconnect(),o()}}}var Qn=z('<span class="min-w-0 max-w-full truncate"> </span>'),Zn=z('<span class="type-caption flex min-w-0 max-w-full items-start gap-2 whitespace-normal py-1 text-muted-foreground" role="status" data-testid="media-loading-placeholder"><span class="first-line-icon" aria-hidden="true"><!></span> <span class="flex min-w-0 flex-wrap items-baseline gap-x-1.5"><span> </span> <!></span></span>');function Wa(a,t){if(new.target)return tt({component:Wa,...a});nt(t,!0);let r=I(t,"name",7);var l={get name(){return r()},set name(m){r(m),M()},$set:at,$on:(m,k)=>rt(t,m,k)},c=Zn(),u=N(c),s=N(u);bt(s,{get icon(){return zr},class:"size-3.5"}),L(u);var o=O(u,2),g=N(o),x=me(g,!0),b=O(g,2);{var w=m=>{var k=Qn(),U=me(k,!0);Xe(k,(B,P)=>Bt?.(B,P),r),X(()=>ge(U,r())),H(m,k)};ie(b,m=>{r()&&m(w)})}return L(o),L(c),X(m=>ge(x,m),[()=>A.ui_mediaLoadingPlaceholder_title_label()]),H(a,c),st(l)}const ba="markdown-image-frame";function Jn(a,t){const r=new Map,l=new Map,c=new Map,u=[300,1e3];let s=!1;function o(i){let p=l.get(i);return p||(p={source:i.getAttribute("src")||"",workspaceId:t.getWorkspaceId(),retries:0,failureHandled:!1},l.set(i,p)),p}function g(i){const p=o(i);return!s&&a.contains(p.fallbackHost??i)&&p.workspaceId===t.getWorkspaceId()&&t.canUseMedia(p.source)&&!i.hasAttribute("data-media-unavailable")&&!i.hasAttribute("data-media-unsupported")&&sa(p.source)!==null}function x(i,p=!1){if(!g(i))return;const _=o(i),T=sa(_.source);if(!T)return;const D=_.fallbackHost,Y=D?.contains(document.activeElement)??!1;if(_.failureHandled=!1,_.fallbackHost=void 0,p&&(_.retries=0),i.removeAttribute("src"),i.setAttribute("src",T),D){const se=r.get(D);se&&ut(se),r.delete(D),D.replaceWith(i),U(),Y&&a.contains(i)&&i.focus()}}function b(i){const p=o(i);s||!a.contains(i)||p.failureHandled||(p.failureHandled=!0,g(i)&&p.retries<u.length?p.timer=setTimeout(()=>{p.timer=void 0,x(i)},u[p.retries++]):k(i,"load-failed"))}function w(i){const p=i.parentElement;return p?.classList.contains(ba)?p:null}function m(i){const p=Number(i.getAttribute("width")),_=Number(i.getAttribute("height"));if(!(p>0&&_>0))return;const T=document.createElement("span");T.className=ba,T.style.aspectRatio=`${p} / ${_}`,T.style.setProperty("--image-aspect-ratio",`${p} / ${_}`),T.style.width=`min(${p}px, 100%)`,T.dataset.loaded="false",i.replaceWith(T),T.appendChild(i);const D=T.appendChild(document.createElement("span"));D.className="markdown-image-frame-placeholder",r.set(D,Mt(Wa,{target:D,props:{name:Kn(i,t.getWorkspaceId())}}));const Y=()=>{if(c.delete(i),s||!a.contains(T))return;T.dataset.loaded="true";const se=r.get(D);se&&(ut(se),r.delete(D)),D.remove()};i.complete&&i.naturalWidth>0?Y():(c.set(i,Y),i.addEventListener("load",Y,{once:!0}))}function k(i,p){const _=i.getAttribute("src")||i.getAttribute("data-media-src")||"",T=yt(_),D=Ra(_,t.getWorkspaceId()),Y=T?.path??D?.path,se=T?.workspaceId??D?.workspaceId,Ce=i.getAttribute("data-name")||i.getAttribute("alt")||Y?.split("/").pop()||void 0,le=document.createElement(i instanceof HTMLVideoElement?"div":"span");le.className="media-unavailable-host",(w(i)??i).replaceWith(le),t.onMediaRemoved(i);let y;if(i instanceof HTMLImageElement&&p==="load-failed"){const oe=o(i);oe.fallbackHost=le,g(i)&&(y=()=>x(i,!0))}const $=Mt(Vt,{target:le,props:{name:Ce,reason:p,path:Y,workspaceId:se,onRetry:y}});if(r.set(le,$),i instanceof HTMLVideoElement){le.classList.add("flex","items-center","gap-2");const oe=le.appendChild(document.createElement("span"));r.set(oe,Mt(Kt,{target:oe,props:{videoUrl:_,videoName:Ce,sourceKind:"workspace",mimeType:wt(_,t.getWorkspaceId())?.mimeType}}))}}function U(){if(!s){for(const i of a.querySelectorAll("img"))vt(i)&&!i.closest("a")&&(i.tabIndex=0,i.setAttribute("role","button")),!(i.hasAttribute("data-media-unsupported")||i.hasAttribute("data-media-unavailable"))&&(o(i),i.hasAttribute(La)&&!w(i)&&m(i),i.getAttribute("src")&&i.complete&&i.naturalWidth===0&&b(i));for(const i of a.querySelectorAll("[data-media-unsupported]"))k(i,"unsupported");for(const i of a.querySelectorAll("[data-media-unavailable]"))k(i,Gr(i));for(const[i,p]of l)a.contains(p.fallbackHost??i)||(p.timer!==void 0&&clearTimeout(p.timer),l.delete(i));for(const[i,p]of c)a.contains(i)||(i.removeEventListener("load",p),c.delete(i));for(const[i,p]of r)a.contains(i)||(ut(p),r.delete(i))}}function B(i){const p=i.target;(p instanceof HTMLImageElement||p instanceof HTMLVideoElement)&&(p instanceof HTMLImageElement?b(p):k(p,"load-failed"))}const P=new MutationObserver(U);return P.observe(a,{childList:!0,subtree:!0}),a.addEventListener("error",B,!0),queueMicrotask(U),{destroy(){s=!0,P.disconnect();for(const i of l.values())i.timer!==void 0&&clearTimeout(i.timer);l.clear();for(const[i,p]of c)i.removeEventListener("load",p);c.clear(),a.removeEventListener("error",B,!0);for(const i of r.values())ut(i);r.clear()}}}var Xn=z('<div class="image-actions-overlay absolute z-10 svelte-nzvuq5" data-testid="markdown-image-actions-overlay"><!></div>'),es=z("<div></div>"),wa=z('<div role="group"><!> <!></div>'),ts=z('<div><p class="whitespace-pre-wrap svelte-nzvuq5"> </p></div>'),as=z("<!> <!>",1);function _a(a,t){if(new.target)return tt({component:_a,...a});nt(t,!0);const r=n=>{var f=Ut(),W=Fe(f);{var S=K=>{var J=Xn(),Te=N(J);{let de=E(()=>e(ce).getAttribute("src")||""),ue=E(()=>e(ce).getAttribute("alt")||void 0);et(fr(Te,{get imageUrl(){return e(de)},get imageName(){return e(ue)},get open(){return e(v)},set open(We){q(v,We,!0)}}),We=>q(h,We,!0),()=>e(h))}L(J),et(J,de=>q(ae,de),()=>e(ae)),X(()=>Ct(J,`top: ${e(Ke).top??""}px; right: ${e(Ke).right??""}px;`)),H(K,J)},j=E(()=>e(ce)&&$(e(ce).getAttribute("src")||""));ie(W,K=>{e(j)&&K(S)})}H(n,f)};let l=I(t,"content",7),c=I(t,"isStreaming",7,!1),u=I(t,"className",7,""),s=I(t,"workspaceId",23,()=>ca()?.workspaceId??void 0),o=I(t,"relativeMediaBase",7),g=I(t,"onCodeBlockAction",7),x=I(t,"onFileClick",7),b=I(t,"canOpenFile",7),w=I(t,"allowFileMedia",7,!0),m=I(t,"taskBlockRenderMode",7,"placeholder"),k=I(t,"chatImageThumbnails",7,!1),U=I(t,"forceExternalLinks",7,!1),B=I(t,"renderRichFencesAsCode",7,!1),P=I(t,"renderDiagrams",7,!1),i=I(t,"allowSanitizedHtml",7,!1),p=I(t,"media",7);const _=Yr(),T=Ya(),D=E(()=>Bn(l(),s())),Y=E(()=>e(D).some(n=>n.type==="video")),se=E(()=>!e(Y)&&e(D).length===1&&e(D)[0].type==="markdown"?e(D)[0].content:l()),Ce=E(()=>Pn(e(se)));let le=ne(null),y=ne("");function $(n){return _t(n,w()&&b()?.()!==!1)}const oe=E(()=>En(e(y),w()&&b()?.()!==!1)),Le=E(()=>pr(e(oe),s(),mr)),Me=E(()=>`<div class="markdown-content">${e(Le)}</div>`);let fe=0;const Ve=150;let ke=-1/0,ee=null,Se=null;async function ft(n,f,W,S){try{const j=await $r(n,{...f,readOnly:!0});if(S!==fe)return;q(y,$n(j,W,f?.workspaceId,f?.relativeMediaBase),!0)}catch(j){if(S!==fe)return;ht.error("Failed to process markdown:",j);const K=n.replace(/[&<>"']/g,J=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[J]||J);q(y,`<p>${K}</p>`)}}function Ie(){if(!Se)return;const n=Ve-(performance.now()-ke);if(n>0){ee=setTimeout(()=>{ee=null,Ie()},n);return}const f=Se;Se=null,ke=performance.now(),f()}function ot(){ee!==null&&(clearTimeout(ee),ee=null),Se=null,ke=-1/0}kt(()=>{const n=e(se),f={allowEmpty:!0,skipIfHTML:!1,preserveAnchors:!0,taskBlockRenderMode:m(),workspaceId:s(),relativeMediaBase:o()??(s()&&s()!==Sr?"":void 0),renderRichFencesAsCode:B()||P(),processPrimitives:!P(),allowSanitizedHtml:i(),renderMath:!c(),workspaceFileVersion:_},W=p(),S=++fe,j=()=>void ft(n,f,W,S);c()?(Se=j,ee===null&&Ie()):(ot(),j())});let De=ne(void 0),ce=ne(null),Ke=ne($a({top:0,right:0})),v=ne(!1),h=ne(void 0),ae=ne(null);function V(n){if(n.type==="mouseover"&&ga(e(ce),e(ae)))return;const f=n.target,W=Dt(f);if(W&&vt(W)&&$(W.getAttribute("src")||"")){if(e(ce)===W)return;q(ce,W,!0),q(Ke,Vn(W,n.currentTarget),!0)}else if(e(ce)&&!e(v)){if(f instanceof Node&&e(ae)?.contains(f))return;q(ce,null)}}function te(){!e(v)&&!ga(e(ce),e(ae))&&q(ce,null)}function he(n){const f=Dt(n.target);!f||!vt(f)||!$(f.getAttribute("src")||"")||(n.preventDefault(),n.stopPropagation(),V(n),q(v,!0))}function re(n){return Jn(n,{getWorkspaceId:()=>s(),canUseMedia:$,onMediaRemoved:f=>{e(ce)===f&&q(ce,null)}})}function Re(n){const f=n.target,W=f.closest("a");if(!W&&f instanceof HTMLImageElement){const j=f.getAttribute("src")||"";if(Ma(j)&&$(j)){n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation(),e(De)?.openImage(f);return}}if(W?.href){if(n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation(),e(De)?.openAsset(W))return;const j=d(n),K=s()?ta(s()):void 0;ia(W.href,{workspaceId:K,canOpenFile:b(),sourcePanelId:j,event:n,rawHref:W.getAttribute("href")??void 0,...U()?{forceExternal:!0}:{}});return}const S=Qr(f.closest("[data-mention]"));if(S){const{type:j,meta:K}=S;if(j==="file"&&S.filePath){if(b()?.()===!1)return;n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation();const J=S.filePath;ht.debug("[MarkdownViewer] File mention clicked",{filePath:J,meta:K});const Te=d(n),de=Ht({event:n});if(x())x()(J,{line:S.line,openInAdjacentPanel:de,sourcePanelId:Te});else{const ue=s();ue&&ve.dispatch(Rr(ue,J,{line:S.line,openInAdjacentPanel:de,sourcePanelId:Te}))}}else if(S.folderPath!==void 0){if(b()?.()===!1||!s())return;n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation(),ve.dispatch(Er(s(),Zr(S.folderPath)))}else if(j==="note"&&S.note){n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation();const J=S.note.id;ht.debug("[MarkdownViewer] Note mention clicked",{noteId:J,meta:K});const Te=d(n),de=Ht({event:n});if(S.note.workspaceId&&S.note.workspaceId!==s()){ia(ir(J,S.note.workspaceId),{workspaceId:s()?ta(s()):void 0,sourcePanelId:Te,event:n});return}const ue=s();ue&&ve.dispatch(Tr(ue,J,{openInAdjacentPanel:de,sourcePanelId:Te}))}}}function Ue(n){if(je(n),!n.defaultPrevented){if(n.target instanceof HTMLImageElement&&vt(n.target)&&(n.key==="Enter"||n.key===" ")){Re(n);return}n.key!=="Enter"||!Ht({event:n})||Re(n)}}function je(n){const f=Dt(n.target);!f||!vt(f)||!$(f.getAttribute("src")||"")||e(h)?.handleCopy(n,f.getAttribute("src")||"")}function d(n){const f=n.target;if(f instanceof HTMLElement)return f.closest("[data-panel-id]")?.dataset.panelId}Qa(()=>{fe+=1,ot()});var C={get content(){return l()},set content(n){l(n),M()},get isStreaming(){return c()},set isStreaming(n=!1){c(n),M()},get className(){return u()},set className(n=""){u(n),M()},get workspaceId(){return s()},set workspaceId(n=ca()?.workspaceId??void 0){s(n),M()},get relativeMediaBase(){return o()},set relativeMediaBase(n){o(n),M()},get onCodeBlockAction(){return g()},set onCodeBlockAction(n){g(n),M()},get onFileClick(){return x()},set onFileClick(n){x(n),M()},get canOpenFile(){return b()},set canOpenFile(n){b(n),M()},get allowFileMedia(){return w()},set allowFileMedia(n=!0){w(n),M()},get taskBlockRenderMode(){return m()},set taskBlockRenderMode(n="placeholder"){m(n),M()},get chatImageThumbnails(){return k()},set chatImageThumbnails(n=!1){k(n),M()},get forceExternalLinks(){return U()},set forceExternalLinks(n=!1){U(n),M()},get renderRichFencesAsCode(){return B()},set renderRichFencesAsCode(n=!1){B(n),M()},get renderDiagrams(){return P()},set renderDiagrams(n=!1){P(n),M()},get allowSanitizedHtml(){return i()},set allowSanitizedHtml(n=!1){i(n),M()},get media(){return p()},set media(n){p(n),M()},$set:at,$on:(n,f)=>rt(t,n,f)},F=as(),Q=Fe(F);{var be=n=>{var f=es();zt(f,21,()=>e(D),Xa,(W,S)=>{var j=Ut(),K=Fe(j);{var J=de=>{Fa(de,{get allowFileMedia(){return w()},get canOpenFile(){return b()},get source(){return e(S).source},get name(){return e(S).name},get poster(){return e(S).poster}})},Te=de=>{_a(de,{get content(){return e(S).content},get isStreaming(){return c()},get workspaceId(){return s()},get relativeMediaBase(){return o()},get onCodeBlockAction(){return g()},get onFileClick(){return x()},get canOpenFile(){return b()},get allowFileMedia(){return w()},get taskBlockRenderMode(){return m()},get chatImageThumbnails(){return k()},get forceExternalLinks(){return U()},get renderRichFencesAsCode(){return B()},get renderDiagrams(){return P()},get allowSanitizedHtml(){return i()},get media(){return p()}})};ie(K,de=>{e(S).type==="video"?de(J):de(Te,-1)})}H(W,j)}),L(f),X(()=>qe(f,1,`markdown-video-segments ${u()??""}`,"svelte-nzvuq5")),H(n,f)},pe=n=>{var f=wa();let W;var S=N(f);oa(S,()=>e(Me));var j=O(S,2);r(j),L(f),Xe(f,K=>re?.(K)),Xe(f,(K,J)=>ha?.(K,J),()=>({enabled:P(),workspaceId:s(),context:T})),X(()=>W=qe(f,1,`markdown-viewer streaming-content ${u()??""}`,"svelte-nzvuq5",W,{"chat-image-thumbnails":k()})),Ae("click",f,Re),Ae("keydown",f,Ue),He("copy",f,je),Ae("contextmenu",f,he),Ae("mouseover",f,V),Ae("focusin",f,V),He("mouseleave",f,te),H(n,f)},we=n=>{var f=ts(),W=N(f),S=me(W,!0);L(f),X(()=>{qe(f,1,`markdown-viewer simple-content ${u()??""}`,"svelte-nzvuq5"),ge(S,e(se))}),H(n,f)},Ee=n=>{var f=wa();let W;var S=N(f);oa(S,()=>e(Me));var j=O(S,2);r(j),L(f),et(f,K=>q(le,K),()=>e(le)),Xe(f,K=>re?.(K)),Xe(f,(K,J)=>ha?.(K,J),()=>({enabled:P(),workspaceId:s(),context:T})),X(()=>W=qe(f,1,`markdown-viewer static-content ${u()??""}`,"svelte-nzvuq5",W,{"chat-image-thumbnails":k()})),Ae("click",f,Re),Ae("keydown",f,Ue),He("copy",f,je),Ae("contextmenu",f,he),Ae("mouseover",f,V),Ae("focusin",f,V),He("mouseleave",f,te),H(n,f)};ie(Q,n=>{e(Y)?n(be):c()?n(pe,1):e(Ce)==="simple"&&!i()?n(we,2):n(Ee,-1)})}var _e=O(Q,2);return et(Pa(_e,{get workspaceId(){return s()},canUseMedia:$}),n=>q(De,n,!0),()=>e(De)),H(a,F),st(C)}xa(["click","keydown","contextmenu","mouseover","focusin"]);class Ts{constructor(t){lt(this,"container");lt(this,"previousFocus",null);lt(this,"firstFocusable",null);lt(this,"lastFocusable",null);lt(this,"handleKeyDown");this.container=t,this.handleKeyDown=this.onKeyDown.bind(this)}activate(){this.previousFocus=document.activeElement;const t=this.container.querySelectorAll('a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])');t.length>0&&(this.firstFocusable=t[0],this.lastFocusable=t[t.length-1],this.firstFocusable.focus()),document.addEventListener("keydown",this.handleKeyDown)}deactivate(){document.removeEventListener("keydown",this.handleKeyDown),this.previousFocus&&this.previousFocus.focus()}onKeyDown(t){t.key==="Tab"&&(!this.firstFocusable||!this.lastFocusable||(t.shiftKey?document.activeElement===this.firstFocusable&&(t.preventDefault(),this.lastFocusable.focus()):document.activeElement===this.lastFocusable&&(t.preventDefault(),this.firstFocusable.focus())))}}function Ps(a,t){const r=x=>{const b=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(x);return b?{r:parseInt(b[1],16),g:parseInt(b[2],16),b:parseInt(b[3],16)}:null},l=x=>{const[b,w,m]=[x.r,x.g,x.b].map(k=>(k=k/255,k<=.03928?k/12.92:Math.pow((k+.055)/1.055,2.4)));return .2126*b+.7152*w+.0722*m},c=r(a),u=r(t);if(!c||!u)return ht.warn("Invalid color values for contrast check",{foreground:a,background:t}),{ratio:0,passes:{aa:!1,aaa:!1}};const s=l(c),o=l(u),g=(Math.max(s,o)+.05)/(Math.min(s,o)+.05);return{ratio:g,passes:{aa:g>=4.5,aaa:g>=7}}}export{Fa as C,Ts as F,Rn as H,_a as M,Ss as W,Wa as a,fa as b,An as c,Ta as d,Ps as e,Cn as f,Es as g,Ea as h,on as r,Bn as s,Rs as w};
|
|
6
|
+
`)),P=ma(B?.path,t);if(P){u(),l.push({type:"video",source:P,name:typeof B.path=="string"?B.path:void 0,poster:typeof B.poster=="string"?B.poster:void 0}),s=k;continue}}catch{}c.push(...U),s=k;continue}c.push(...r.slice(s));break}const x=!/^(?: {4}|\t)/.test(r[s])&&Un(r,s)?r[s].match(qn):null;if(!x){c.push(r[s]);continue}const[,b,w]=x,m=ma(w,t);m?(u(),l.push({type:"video",source:m,name:b||void 0})):w.startsWith("workspace-asset://")&&!Kr(w)||Dn(w,t)?c.push(r[s]):c.push(`[${b}](${w})`)}return u(),l}function vt(a){return Ma(a.getAttribute("src")||"")}function Dt(a){return a instanceof HTMLImageElement?a:a instanceof HTMLAnchorElement?a.querySelector("img"):null}function Vn(a,t){const r=a.getBoundingClientRect(),l=t.getBoundingClientRect();return{top:r.top-l.top+6,right:l.right-r.right+6}}function ga(a,t){const r=document.activeElement;return!!(r&&(r===a||r===a?.closest("a")||t?.contains(r)))}function Kn(a,t){const r=a.getAttribute("src")||"",l=yt(r)?.path??Ra(r,t)?.path;if(l)return l;if(r.startsWith("workspace-asset://")){const c=r.split(/[?#]/)[0].split("/").pop();if(c)return c}if(r&&!/^[a-z][a-z0-9+.-]*:/i.test(r)&&!r.startsWith("//"))try{return decodeURI(r)}catch{return r}return a.getAttribute("alt")||void 0}const La="data-image-sized",va=a=>typeof a=="number"&&Number.isInteger(a)&&a>0;function jn(a){try{return encodeURI(a).replace(/%25/g,"%")}catch{return null}}function Gn(a){return a.startsWith("workspace-file://")?a.split(/[?#]/)[0]:a}function Yn(a,t,r){const l=new Map;for(const[c,u]of Object.entries(a)){if(!u||!va(u.width)||!va(u.height))continue;const s={width:u.width,height:u.height},o=new Set([c]),g=jn(c);g&&o.add(g);for(const x of[...o]){const b=St(x,t);if(b&&o.add(b),r!==void 0){const w=jr(x,r);if(w){const m=St(`intent://local/file/${w.split("/").map(encodeURIComponent).join("/")}`,t);m&&o.add(m)}}}for(const x of o)l.has(x)||l.set(x,s)}return l}function $n(a,t,r,l){if(!t||!a.includes("<img"))return a;const c=Yn(t,r,l);return c.size===0?a:a.replace(/<img\b(?:[^>"']|"[^"]*"|'[^']*')*>/gi,u=>{if(/\s(?:width|height)="/i.test(u))return u;const s=/\ssrc="([^"]*)"/i.exec(u);if(!s)return u;const o=Gn(s[1].replace(/&/g,"&")),g=c.get(o);return g?u.replace(/\s*\/?>$/,` width="${g.width}" height="${g.height}" ${La}="">`):u})}function ha(a,t){let r=t,l,c=!1,u=!1;const s=new Map;function o(){for(const[b,{component:w,source:m}]of s)ut(w),a.contains(b)&&b.replaceWith(m);s.clear()}function g(){if(!u){for(const[b,{component:w}]of s)a.contains(b)||(ut(w),s.delete(b));if(r.enabled)for(const b of a.querySelectorAll("pre > code")){if(b.closest("[data-markdown-diagram]"))continue;const w=[...b.classList].find(P=>P.startsWith("language-"))?.slice(9);let m;if(w==="mermaid")m="mermaid";else if(w==="diagram"||w==="ws-block:diagram")m="diagram";else if(w==="ws-block")try{if(JSON.parse(b.textContent??"").type!=="diagram")continue;m="diagram"}catch{continue}else continue;const k=b.parentElement;if(!k)continue;if(!l){c||(c=!0,ka(()=>import("./SlH326tK.js"),__vite__mapDeps([56,2,1,57,45,58,18,19,20,21,14,7,3,12,32,24,11,6,8,33,9,10,13,15,34,5,59,31,48,46,47,49,29,30,35,36,0,4,16,17,22,23,25,26,27,28,37,38,39,40,41,42,43,44,50,51,52,53,54,55,60,61,62,63,64,65,66,67]),import.meta.url).then(P=>{l=P.default,c=!1,g()}).catch(P=>{c=!1,ht.error("Failed to load the Markdown diagram renderer",{error:P})}));return}const U=document.createElement("div");U.dataset.markdownDiagram=m,k.replaceWith(U);const B=Mt(l,{target:U,context:r.context,props:{kind:m,source:b.textContent??"",workspaceId:r.workspaceId}});s.set(U,{component:B,source:k})}}}const x=new MutationObserver(g);return x.observe(a,{childList:!0,subtree:!0}),queueMicrotask(g),{update(b){(r.enabled!==b.enabled||r.workspaceId!==b.workspaceId)&&o(),r=b,g()},destroy(){u=!0,x.disconnect(),o()}}}var Qn=z('<span class="min-w-0 max-w-full truncate"> </span>'),Zn=z('<span class="type-caption flex min-w-0 max-w-full items-start gap-2 whitespace-normal py-1 text-muted-foreground" role="status" data-testid="media-loading-placeholder"><span class="first-line-icon" aria-hidden="true"><!></span> <span class="flex min-w-0 flex-wrap items-baseline gap-x-1.5"><span> </span> <!></span></span>');function Wa(a,t){if(new.target)return tt({component:Wa,...a});nt(t,!0);let r=I(t,"name",7);var l={get name(){return r()},set name(m){r(m),M()},$set:at,$on:(m,k)=>rt(t,m,k)},c=Zn(),u=N(c),s=N(u);bt(s,{get icon(){return zr},class:"size-3.5"}),L(u);var o=O(u,2),g=N(o),x=me(g,!0),b=O(g,2);{var w=m=>{var k=Qn(),U=me(k,!0);Xe(k,(B,P)=>Bt?.(B,P),r),X(()=>ge(U,r())),H(m,k)};ie(b,m=>{r()&&m(w)})}return L(o),L(c),X(m=>ge(x,m),[()=>A.ui_mediaLoadingPlaceholder_title_label()]),H(a,c),st(l)}const ba="markdown-image-frame";function Jn(a,t){const r=new Map,l=new Map,c=new Map,u=[300,1e3];let s=!1;function o(i){let p=l.get(i);return p||(p={source:i.getAttribute("src")||"",workspaceId:t.getWorkspaceId(),retries:0,failureHandled:!1},l.set(i,p)),p}function g(i){const p=o(i);return!s&&a.contains(p.fallbackHost??i)&&p.workspaceId===t.getWorkspaceId()&&t.canUseMedia(p.source)&&!i.hasAttribute("data-media-unavailable")&&!i.hasAttribute("data-media-unsupported")&&sa(p.source)!==null}function x(i,p=!1){if(!g(i))return;const _=o(i),T=sa(_.source);if(!T)return;const D=_.fallbackHost,Y=D?.contains(document.activeElement)??!1;if(_.failureHandled=!1,_.fallbackHost=void 0,p&&(_.retries=0),i.removeAttribute("src"),i.setAttribute("src",T),D){const se=r.get(D);se&&ut(se),r.delete(D),D.replaceWith(i),U(),Y&&a.contains(i)&&i.focus()}}function b(i){const p=o(i);s||!a.contains(i)||p.failureHandled||(p.failureHandled=!0,g(i)&&p.retries<u.length?p.timer=setTimeout(()=>{p.timer=void 0,x(i)},u[p.retries++]):k(i,"load-failed"))}function w(i){const p=i.parentElement;return p?.classList.contains(ba)?p:null}function m(i){const p=Number(i.getAttribute("width")),_=Number(i.getAttribute("height"));if(!(p>0&&_>0))return;const T=document.createElement("span");T.className=ba,T.style.aspectRatio=`${p} / ${_}`,T.style.setProperty("--image-aspect-ratio",`${p} / ${_}`),T.style.width=`min(${p}px, 100%)`,T.dataset.loaded="false",i.replaceWith(T),T.appendChild(i);const D=T.appendChild(document.createElement("span"));D.className="markdown-image-frame-placeholder",r.set(D,Mt(Wa,{target:D,props:{name:Kn(i,t.getWorkspaceId())}}));const Y=()=>{if(c.delete(i),s||!a.contains(T))return;T.dataset.loaded="true";const se=r.get(D);se&&(ut(se),r.delete(D)),D.remove()};i.complete&&i.naturalWidth>0?Y():(c.set(i,Y),i.addEventListener("load",Y,{once:!0}))}function k(i,p){const _=i.getAttribute("src")||i.getAttribute("data-media-src")||"",T=yt(_),D=Ra(_,t.getWorkspaceId()),Y=T?.path??D?.path,se=T?.workspaceId??D?.workspaceId,Ce=i.getAttribute("data-name")||i.getAttribute("alt")||Y?.split("/").pop()||void 0,le=document.createElement(i instanceof HTMLVideoElement?"div":"span");le.className="media-unavailable-host",(w(i)??i).replaceWith(le),t.onMediaRemoved(i);let y;if(i instanceof HTMLImageElement&&p==="load-failed"){const oe=o(i);oe.fallbackHost=le,g(i)&&(y=()=>x(i,!0))}const $=Mt(Vt,{target:le,props:{name:Ce,reason:p,path:Y,workspaceId:se,onRetry:y}});if(r.set(le,$),i instanceof HTMLVideoElement){le.classList.add("flex","items-center","gap-2");const oe=le.appendChild(document.createElement("span"));r.set(oe,Mt(Kt,{target:oe,props:{videoUrl:_,videoName:Ce,sourceKind:"workspace",mimeType:wt(_,t.getWorkspaceId())?.mimeType}}))}}function U(){if(!s){for(const i of a.querySelectorAll("img"))vt(i)&&!i.closest("a")&&(i.tabIndex=0,i.setAttribute("role","button")),!(i.hasAttribute("data-media-unsupported")||i.hasAttribute("data-media-unavailable"))&&(o(i),i.hasAttribute(La)&&!w(i)&&m(i),i.getAttribute("src")&&i.complete&&i.naturalWidth===0&&b(i));for(const i of a.querySelectorAll("[data-media-unsupported]"))k(i,"unsupported");for(const i of a.querySelectorAll("[data-media-unavailable]"))k(i,Gr(i));for(const[i,p]of l)a.contains(p.fallbackHost??i)||(p.timer!==void 0&&clearTimeout(p.timer),l.delete(i));for(const[i,p]of c)a.contains(i)||(i.removeEventListener("load",p),c.delete(i));for(const[i,p]of r)a.contains(i)||(ut(p),r.delete(i))}}function B(i){const p=i.target;(p instanceof HTMLImageElement||p instanceof HTMLVideoElement)&&(p instanceof HTMLImageElement?b(p):k(p,"load-failed"))}const P=new MutationObserver(U);return P.observe(a,{childList:!0,subtree:!0}),a.addEventListener("error",B,!0),queueMicrotask(U),{destroy(){s=!0,P.disconnect();for(const i of l.values())i.timer!==void 0&&clearTimeout(i.timer);l.clear();for(const[i,p]of c)i.removeEventListener("load",p);c.clear(),a.removeEventListener("error",B,!0);for(const i of r.values())ut(i);r.clear()}}}var Xn=z('<div class="image-actions-overlay absolute z-10 svelte-nzvuq5" data-testid="markdown-image-actions-overlay"><!></div>'),es=z("<div></div>"),wa=z('<div role="group"><!> <!></div>'),ts=z('<div><p class="whitespace-pre-wrap svelte-nzvuq5"> </p></div>'),as=z("<!> <!>",1);function _a(a,t){if(new.target)return tt({component:_a,...a});nt(t,!0);const r=n=>{var f=Ut(),W=Fe(f);{var S=K=>{var J=Xn(),Te=N(J);{let de=E(()=>e(ce).getAttribute("src")||""),ue=E(()=>e(ce).getAttribute("alt")||void 0);et(fr(Te,{get imageUrl(){return e(de)},get imageName(){return e(ue)},get open(){return e(v)},set open(We){q(v,We,!0)}}),We=>q(h,We,!0),()=>e(h))}L(J),et(J,de=>q(ae,de),()=>e(ae)),X(()=>Ct(J,`top: ${e(Ke).top??""}px; right: ${e(Ke).right??""}px;`)),H(K,J)},j=E(()=>e(ce)&&$(e(ce).getAttribute("src")||""));ie(W,K=>{e(j)&&K(S)})}H(n,f)};let l=I(t,"content",7),c=I(t,"isStreaming",7,!1),u=I(t,"className",7,""),s=I(t,"workspaceId",23,()=>ca()?.workspaceId??void 0),o=I(t,"relativeMediaBase",7),g=I(t,"onCodeBlockAction",7),x=I(t,"onFileClick",7),b=I(t,"canOpenFile",7),w=I(t,"allowFileMedia",7,!0),m=I(t,"taskBlockRenderMode",7,"placeholder"),k=I(t,"chatImageThumbnails",7,!1),U=I(t,"forceExternalLinks",7,!1),B=I(t,"renderRichFencesAsCode",7,!1),P=I(t,"renderDiagrams",7,!1),i=I(t,"allowSanitizedHtml",7,!1),p=I(t,"media",7);const _=Yr(),T=Ya(),D=E(()=>Bn(l(),s())),Y=E(()=>e(D).some(n=>n.type==="video")),se=E(()=>!e(Y)&&e(D).length===1&&e(D)[0].type==="markdown"?e(D)[0].content:l()),Ce=E(()=>Pn(e(se)));let le=ne(null),y=ne("");function $(n){return _t(n,w()&&b()?.()!==!1)}const oe=E(()=>En(e(y),w()&&b()?.()!==!1)),Le=E(()=>pr(e(oe),s(),mr)),Me=E(()=>`<div class="markdown-content">${e(Le)}</div>`);let fe=0;const Ve=150;let ke=-1/0,ee=null,Se=null;async function ft(n,f,W,S){try{const j=await $r(n,{...f,readOnly:!0});if(S!==fe)return;q(y,$n(j,W,f?.workspaceId,f?.relativeMediaBase),!0)}catch(j){if(S!==fe)return;ht.error("Failed to process markdown:",j);const K=n.replace(/[&<>"']/g,J=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[J]||J);q(y,`<p>${K}</p>`)}}function Ie(){if(!Se)return;const n=Ve-(performance.now()-ke);if(n>0){ee=setTimeout(()=>{ee=null,Ie()},n);return}const f=Se;Se=null,ke=performance.now(),f()}function ot(){ee!==null&&(clearTimeout(ee),ee=null),Se=null,ke=-1/0}kt(()=>{const n=e(se),f={allowEmpty:!0,skipIfHTML:!1,preserveAnchors:!0,taskBlockRenderMode:m(),workspaceId:s(),relativeMediaBase:o()??(s()&&s()!==Sr?"":void 0),renderRichFencesAsCode:B()||P(),processPrimitives:!P(),allowSanitizedHtml:i(),renderMath:!c(),workspaceFileVersion:_},W=p(),S=++fe,j=()=>void ft(n,f,W,S);c()?(Se=j,ee===null&&Ie()):(ot(),j())});let De=ne(void 0),ce=ne(null),Ke=ne($a({top:0,right:0})),v=ne(!1),h=ne(void 0),ae=ne(null);function V(n){if(n.type==="mouseover"&&ga(e(ce),e(ae)))return;const f=n.target,W=Dt(f);if(W&&vt(W)&&$(W.getAttribute("src")||"")){if(e(ce)===W)return;q(ce,W,!0),q(Ke,Vn(W,n.currentTarget),!0)}else if(e(ce)&&!e(v)){if(f instanceof Node&&e(ae)?.contains(f))return;q(ce,null)}}function te(){!e(v)&&!ga(e(ce),e(ae))&&q(ce,null)}function he(n){const f=Dt(n.target);!f||!vt(f)||!$(f.getAttribute("src")||"")||(n.preventDefault(),n.stopPropagation(),V(n),q(v,!0))}function re(n){return Jn(n,{getWorkspaceId:()=>s(),canUseMedia:$,onMediaRemoved:f=>{e(ce)===f&&q(ce,null)}})}function Re(n){const f=n.target,W=f.closest("a");if(!W&&f instanceof HTMLImageElement){const j=f.getAttribute("src")||"";if(Ma(j)&&$(j)){n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation(),e(De)?.openImage(f);return}}if(W?.href){if(n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation(),e(De)?.openAsset(W))return;const j=d(n),K=s()?ta(s()):void 0;ia(W.href,{workspaceId:K,canOpenFile:b(),sourcePanelId:j,event:n,rawHref:W.getAttribute("href")??void 0,...U()?{forceExternal:!0}:{}});return}const S=Qr(f.closest("[data-mention]"));if(S){const{type:j,meta:K}=S;if(j==="file"&&S.filePath){if(b()?.()===!1)return;n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation();const J=S.filePath;ht.debug("[MarkdownViewer] File mention clicked",{filePath:J,meta:K});const Te=d(n),de=Ht({event:n});if(x())x()(J,{line:S.line,openInAdjacentPanel:de,sourcePanelId:Te});else{const ue=s();ue&&ve.dispatch(Rr(ue,J,{line:S.line,openInAdjacentPanel:de,sourcePanelId:Te}))}}else if(S.folderPath!==void 0){if(b()?.()===!1||!s())return;n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation(),ve.dispatch(Er(s(),Zr(S.folderPath)))}else if(j==="note"&&S.note){n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation();const J=S.note.id;ht.debug("[MarkdownViewer] Note mention clicked",{noteId:J,meta:K});const Te=d(n),de=Ht({event:n});if(S.note.workspaceId&&S.note.workspaceId!==s()){ia(ir(J,S.note.workspaceId),{workspaceId:s()?ta(s()):void 0,sourcePanelId:Te,event:n});return}const ue=s();ue&&ve.dispatch(Tr(ue,J,{openInAdjacentPanel:de,sourcePanelId:Te}))}}}function Ue(n){if(je(n),!n.defaultPrevented){if(n.target instanceof HTMLImageElement&&vt(n.target)&&(n.key==="Enter"||n.key===" ")){Re(n);return}n.key!=="Enter"||!Ht({event:n})||Re(n)}}function je(n){const f=Dt(n.target);!f||!vt(f)||!$(f.getAttribute("src")||"")||e(h)?.handleCopy(n,f.getAttribute("src")||"")}function d(n){const f=n.target;if(f instanceof HTMLElement)return f.closest("[data-panel-id]")?.dataset.panelId}Qa(()=>{fe+=1,ot()});var C={get content(){return l()},set content(n){l(n),M()},get isStreaming(){return c()},set isStreaming(n=!1){c(n),M()},get className(){return u()},set className(n=""){u(n),M()},get workspaceId(){return s()},set workspaceId(n=ca()?.workspaceId??void 0){s(n),M()},get relativeMediaBase(){return o()},set relativeMediaBase(n){o(n),M()},get onCodeBlockAction(){return g()},set onCodeBlockAction(n){g(n),M()},get onFileClick(){return x()},set onFileClick(n){x(n),M()},get canOpenFile(){return b()},set canOpenFile(n){b(n),M()},get allowFileMedia(){return w()},set allowFileMedia(n=!0){w(n),M()},get taskBlockRenderMode(){return m()},set taskBlockRenderMode(n="placeholder"){m(n),M()},get chatImageThumbnails(){return k()},set chatImageThumbnails(n=!1){k(n),M()},get forceExternalLinks(){return U()},set forceExternalLinks(n=!1){U(n),M()},get renderRichFencesAsCode(){return B()},set renderRichFencesAsCode(n=!1){B(n),M()},get renderDiagrams(){return P()},set renderDiagrams(n=!1){P(n),M()},get allowSanitizedHtml(){return i()},set allowSanitizedHtml(n=!1){i(n),M()},get media(){return p()},set media(n){p(n),M()},$set:at,$on:(n,f)=>rt(t,n,f)},F=as(),Q=Fe(F);{var be=n=>{var f=es();zt(f,21,()=>e(D),Xa,(W,S)=>{var j=Ut(),K=Fe(j);{var J=de=>{Fa(de,{get allowFileMedia(){return w()},get canOpenFile(){return b()},get source(){return e(S).source},get name(){return e(S).name},get poster(){return e(S).poster}})},Te=de=>{_a(de,{get content(){return e(S).content},get isStreaming(){return c()},get workspaceId(){return s()},get relativeMediaBase(){return o()},get onCodeBlockAction(){return g()},get onFileClick(){return x()},get canOpenFile(){return b()},get allowFileMedia(){return w()},get taskBlockRenderMode(){return m()},get chatImageThumbnails(){return k()},get forceExternalLinks(){return U()},get renderRichFencesAsCode(){return B()},get renderDiagrams(){return P()},get allowSanitizedHtml(){return i()},get media(){return p()}})};ie(K,de=>{e(S).type==="video"?de(J):de(Te,-1)})}H(W,j)}),L(f),X(()=>qe(f,1,`markdown-video-segments ${u()??""}`,"svelte-nzvuq5")),H(n,f)},pe=n=>{var f=wa();let W;var S=N(f);oa(S,()=>e(Me));var j=O(S,2);r(j),L(f),Xe(f,K=>re?.(K)),Xe(f,(K,J)=>ha?.(K,J),()=>({enabled:P(),workspaceId:s(),context:T})),X(()=>W=qe(f,1,`markdown-viewer streaming-content ${u()??""}`,"svelte-nzvuq5",W,{"chat-image-thumbnails":k()})),Ae("click",f,Re),Ae("keydown",f,Ue),He("copy",f,je),Ae("contextmenu",f,he),Ae("mouseover",f,V),Ae("focusin",f,V),He("mouseleave",f,te),H(n,f)},we=n=>{var f=ts(),W=N(f),S=me(W,!0);L(f),X(()=>{qe(f,1,`markdown-viewer simple-content ${u()??""}`,"svelte-nzvuq5"),ge(S,e(se))}),H(n,f)},Ee=n=>{var f=wa();let W;var S=N(f);oa(S,()=>e(Me));var j=O(S,2);r(j),L(f),et(f,K=>q(le,K),()=>e(le)),Xe(f,K=>re?.(K)),Xe(f,(K,J)=>ha?.(K,J),()=>({enabled:P(),workspaceId:s(),context:T})),X(()=>W=qe(f,1,`markdown-viewer static-content ${u()??""}`,"svelte-nzvuq5",W,{"chat-image-thumbnails":k()})),Ae("click",f,Re),Ae("keydown",f,Ue),He("copy",f,je),Ae("contextmenu",f,he),Ae("mouseover",f,V),Ae("focusin",f,V),He("mouseleave",f,te),H(n,f)};ie(Q,n=>{e(Y)?n(be):c()?n(pe,1):e(Ce)==="simple"&&!i()?n(we,2):n(Ee,-1)})}var _e=O(Q,2);return et(Pa(_e,{get workspaceId(){return s()},canUseMedia:$}),n=>q(De,n,!0),()=>e(De)),H(a,F),st(C)}xa(["click","keydown","contextmenu","mouseover","focusin"]);class Ts{constructor(t){lt(this,"container");lt(this,"previousFocus",null);lt(this,"firstFocusable",null);lt(this,"lastFocusable",null);lt(this,"handleKeyDown");this.container=t,this.handleKeyDown=this.onKeyDown.bind(this)}activate(){this.previousFocus=document.activeElement;const t=this.container.querySelectorAll('a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])');t.length>0&&(this.firstFocusable=t[0],this.lastFocusable=t[t.length-1],this.firstFocusable.focus()),document.addEventListener("keydown",this.handleKeyDown)}deactivate(){document.removeEventListener("keydown",this.handleKeyDown),this.previousFocus&&this.previousFocus.focus()}onKeyDown(t){t.key==="Tab"&&(!this.firstFocusable||!this.lastFocusable||(t.shiftKey?document.activeElement===this.firstFocusable&&(t.preventDefault(),this.lastFocusable.focus()):document.activeElement===this.lastFocusable&&(t.preventDefault(),this.firstFocusable.focus())))}}function Ps(a,t){const r=x=>{const b=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(x);return b?{r:parseInt(b[1],16),g:parseInt(b[2],16),b:parseInt(b[3],16)}:null},l=x=>{const[b,w,m]=[x.r,x.g,x.b].map(k=>(k=k/255,k<=.03928?k/12.92:Math.pow((k+.055)/1.055,2.4)));return .2126*b+.7152*w+.0722*m},c=r(a),u=r(t);if(!c||!u)return ht.warn("Invalid color values for contrast check",{foreground:a,background:t}),{ratio:0,passes:{aa:!1,aaa:!1}};const s=l(c),o=l(u),g=(Math.max(s,o)+.05)/(Math.min(s,o)+.05);return{ratio:g,passes:{aa:g>=4.5,aaa:g>=7}}}export{Fa as C,Ts as F,Rn as H,_a as M,Ss as W,Wa as a,fa as b,An as c,Ta as d,Ps as e,Cn as f,Es as g,Ea as h,on as r,Bn as s,Rs as w};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{aF as ue,K as fe,O as he,aI as de,L as ge,aG as ye,a as _,M as Kt,aE as xe,d as pe,a8 as me,aR as Gt,aa as be,w as ve,r as Se,k as Ie,j as Me,y as ke}from"./CRQOCmwo.js";import{c3 as yt,g as v}from"./Bmnp4Cni.js";var qt=1e-10;function it(t,n){const s=Wt(t),e=s.filter(l=>Ut(l,t));let i=0,o=0;const r=[];if(e.length>1){const l=vt(e);for(let u=0;u<e.length;++u){const a=e[u];a.angle=Math.atan2(a.x-l.x,a.y-l.y)}e.sort((u,a)=>a.angle-u.angle);let f=e[e.length-1];for(let u=0;u<e.length;++u){const a=e[u];o+=(f.x+a.x)*(a.y-f.y);const x={x:(a.x+f.x)/2,y:(a.y+f.y)/2};let h=null;for(let b=0;b<a.parentIndex.length;++b)if(f.parentIndex.includes(a.parentIndex[b])){const p=t[a.parentIndex[b]],k=Math.atan2(a.x-p.x,a.y-p.y),z=Math.atan2(f.x-p.x,f.y-p.y);let T=z-k;T<0&&(T+=2*Math.PI);const w=z-T/2;let g=K(x,{x:p.x+p.radius*Math.sin(w),y:p.y+p.radius*Math.cos(w)});g>p.radius*2&&(g=p.radius*2),(h==null||h.width>g)&&(h={circle:p,width:g,p1:a,p2:f,large:g>p.radius,sweep:!0})}h!=null&&(r.push(h),i+=at(h.circle.radius,h.width),f=a)}}else{let l=t[0];for(let u=1;u<t.length;++u)t[u].radius<l.radius&&(l=t[u]);let f=!1;for(let u=0;u<t.length;++u)if(K(t[u],l)>Math.abs(l.radius-t[u].radius)){f=!0;break}f?i=o=0:(i=l.radius*l.radius*Math.PI,r.push({circle:l,p1:{x:l.x,y:l.y+l.radius},p2:{x:l.x-qt,y:l.y+l.radius},width:l.radius*2,large:!0,sweep:!0}))}return o/=2,n&&(n.area=i+o,n.arcArea=i,n.polygonArea=o,n.arcs=r,n.innerPoints=e,n.intersectionPoints=s),i+o}v(it,"intersectionArea");function Ut(t,n){return n.every(s=>K(t,s)<s.radius+qt)}v(Ut,"containedInCircles");function Wt(t){const n=[];for(let s=0;s<t.length;++s)for(let e=s+1;e<t.length;++e){const i=bt(t[s],t[e]);for(const o of i)o.parentIndex=[s,e],n.push(o)}return n}v(Wt,"getIntersectionPoints");function at(t,n){return t*t*Math.acos(1-n/t)-(t-n)*Math.sqrt(n*(2*t-n))}v(at,"circleArea");function K(t,n){return Math.sqrt((t.x-n.x)*(t.x-n.x)+(t.y-n.y)*(t.y-n.y))}v(K,"distance");function dt(t,n,s){if(s>=t+n)return 0;if(s<=Math.abs(t-n))return Math.PI*Math.min(t,n)*Math.min(t,n);const e=t-(s*s-n*n+t*t)/(2*s),i=n-(s*s-t*t+n*n)/(2*s);return at(t,e)+at(n,i)}v(dt,"circleOverlap");function bt(t,n){const s=K(t,n),e=t.radius,i=n.radius;if(s>=e+i||s<=Math.abs(e-i))return[];const o=(e*e-i*i+s*s)/(2*s),r=Math.sqrt(e*e-o*o),l=t.x+o*(n.x-t.x)/s,f=t.y+o*(n.y-t.y)/s,u=-(n.y-t.y)*(r/s),a=-(n.x-t.x)*(r/s);return[{x:l+u,y:f-a},{x:l-u,y:f+a}]}v(bt,"circleCircleIntersection");function vt(t){const n={x:0,y:0};for(const s of t)n.x+=s.x,n.y+=s.y;return n.x/=t.length,n.y/=t.length,n}v(vt,"getCenter");function Ht(t,n,s,e){e=e||{};const i=e.maxIterations||100,o=e.tolerance||1e-10,r=t(n),l=t(s);let f=s-n;if(r*l>0)throw"Initial bisect points must have opposite signs";if(r===0)return n;if(l===0)return s;for(let u=0;u<i;++u){f/=2;const a=n+f,x=t(a);if(x*r>=0&&(n=a),Math.abs(f)<o||x===0)return a}return n+f}v(Ht,"bisect");function lt(t){const n=new Array(t);for(let s=0;s<t;++s)n[s]=0;return n}v(lt,"zeros");function xt(t,n){return lt(t).map(()=>lt(n))}v(xt,"zerosM");function tt(t,n){let s=0;for(let e=0;e<t.length;++e)s+=t[e]*n[e];return s}v(tt,"dot");function ct(t){return Math.sqrt(tt(t,t))}v(ct,"norm2");function ut(t,n,s){for(let e=0;e<n.length;++e)t[e]=n[e]*s}v(ut,"scale");function Z(t,n,s,e,i){for(let o=0;o<t.length;++o)t[o]=n*s[o]+e*i[o]}v(Z,"weightedSum");function St(t,n,s){s=s||{};const e=s.maxIterations||n.length*200,i=s.nonZeroDelta||1.05,o=s.zeroDelta||.001,r=s.minErrorDelta||1e-6,l=s.minErrorDelta||1e-5,f=s.rho!==void 0?s.rho:1,u=s.chi!==void 0?s.chi:2,a=s.psi!==void 0?s.psi:-.5,x=s.sigma!==void 0?s.sigma:.5;let h;const b=n.length,p=new Array(b+1);p[0]=n,p[0].fx=t(n),p[0].id=0;for(let S=0;S<b;++S){const c=n.slice();c[S]=c[S]?c[S]*i:o,p[S+1]=c,p[S+1].fx=t(c),p[S+1].id=S+1}function k(S){for(let c=0;c<S.length;c++)p[b][c]=S[c];p[b].fx=S.fx}v(k,"updateSimplex");const z=v((S,c)=>S.fx-c.fx,"sortOrder"),T=n.slice(),w=n.slice(),g=n.slice(),m=n.slice();for(let S=0;S<e;++S){if(p.sort(z),s.history){const y=p.map(d=>{const D=d.slice();return D.fx=d.fx,D.id=d.id,D});y.sort((d,D)=>d.id-D.id),s.history.push({x:p[0].slice(),fx:p[0].fx,simplex:y})}h=0;for(let y=0;y<b;++y)h=Math.max(h,Math.abs(p[0][y]-p[1][y]));if(Math.abs(p[0].fx-p[b].fx)<r&&h<l)break;for(let y=0;y<b;++y){T[y]=0;for(let d=0;d<b;++d)T[y]+=p[d][y];T[y]/=b}const c=p[b];if(Z(w,1+f,T,-f,c),w.fx=t(w),w.fx<p[0].fx)Z(m,1+u,T,-u,c),m.fx=t(m),m.fx<w.fx?k(m):k(w);else if(w.fx>=p[b-1].fx){let y=!1;if(w.fx>c.fx?(Z(g,1+a,T,-a,c),g.fx=t(g),g.fx<c.fx?k(g):y=!0):(Z(g,1-a*f,T,a*f,c),g.fx=t(g),g.fx<w.fx?k(g):y=!0),y){if(x>=1)break;for(let d=1;d<p.length;++d)Z(p[d],1-x,p[0],x,p[d]),p[d].fx=t(p[d])}}else k(w)}return p.sort(z),{fx:p[0].fx,x:p[0]}}v(St,"nelderMead");function Yt(t,n,s,e,i,o,r){const l=s.fx,f=tt(s.fxprime,n);let u=l,a=l,x=f,h=0;i=i||1,o=o||1e-6,r=r||.1;function b(p,k,z){for(let T=0;T<16;++T)if(i=(p+k)/2,Z(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),x=tt(e.fxprime,n),u>l+o*i*f||u>=z)k=i;else{if(Math.abs(x)<=-r*f)return i;x*(k-p)>=0&&(k=p),p=i,z=u}return 0}v(b,"zoom");for(let p=0;p<10;++p){if(Z(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),x=tt(e.fxprime,n),u>l+o*i*f||p&&u>=a)return b(h,i,a);if(Math.abs(x)<=-r*f)return i;if(x>=0)return b(i,h,u);a=u,h=i,i*=2}return i}v(Yt,"wolfeLineSearch");function Xt(t,n,s){let e={x:n.slice(),fx:0,fxprime:n.slice()},i={x:n.slice(),fx:0,fxprime:n.slice()};const o=n.slice();let r,l,f=1,u;s=s||{},u=s.maxIterations||n.length*20,e.fx=t(e.x,e.fxprime),r=e.fxprime.slice(),ut(r,e.fxprime,-1);for(let a=0;a<u;++a){if(f=Yt(t,r,e,i,f),s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:f}),!f)ut(r,e.fxprime,-1);else{Z(o,1,i.fxprime,-1,e.fxprime);const x=tt(e.fxprime,e.fxprime),h=Math.max(0,tt(o,i.fxprime)/x);Z(r,h,r,-1,i.fxprime),l=e,e=i,i=l}if(ct(e.fxprime)<=1e-5)break}return s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:f}),e}v(Xt,"conjugateGradient");function It(t,n={}){n.maxIterations=n.maxIterations||500;const s=n.initialLayout||te,e=n.lossFunction||et,i=Jt(t,n),o=s(i,n),r=Object.keys(o),l=[];for(const a of r)l.push(o[a].x),l.push(o[a].y);const u=St(a=>{const x={};for(let h=0;h<r.length;++h){const b=r[h];x[b]={x:a[2*h],y:a[2*h+1],radius:o[b].radius}}return e(x,i)},l,n).x;for(let a=0;a<r.length;++a){const x=r[a];o[x].x=u[2*a],o[x].y=u[2*a+1]}return o}v(It,"venn");var Zt=1e-10;function ft(t,n,s){return Math.min(t,n)*Math.min(t,n)*Math.PI<=s+Zt?Math.abs(t-n):Ht(e=>dt(t,n,e)-s,0,t+n)}v(ft,"distanceFromIntersectArea");function Jt(t,n={}){const s=n.distinct,e=t.map(l=>Object.assign({},l));function i(l){return l.join(";")}if(v(i,"toKey"),s){const l=new Map;for(const f of e)for(let u=0;u<f.sets.length;u++){const a=String(f.sets[u]);l.set(a,f.size+(l.get(a)||0));for(let x=u+1;x<f.sets.length;x++){const h=String(f.sets[x]),b=`${a};${h}`,p=`${h};${a}`;l.set(b,f.size+(l.get(b)||0)),l.set(p,f.size+(l.get(p)||0))}}for(const f of e)f.sets.length<3&&(f.size=l.get(i(f.sets)))}const o=[],r=new Set;for(const l of e)if(l.sets.length===1)o.push(l.sets[0]);else if(l.sets.length===2){const f=l.sets[0],u=l.sets[1];r.add(i(l.sets)),r.add(i([u,f]))}o.sort((l,f)=>l===f?0:l<f?-1:1);for(let l=0;l<o.length;++l){const f=o[l];for(let u=l+1;u<o.length;++u){const a=o[u];r.has(i([f,a]))||e.push({sets:[f,a],size:0})}}return e}v(Jt,"addMissingAreas");function Qt(t,n,s){const e=xt(n.length,n.length),i=xt(n.length,n.length);return t.filter(o=>o.sets.length===2).forEach(o=>{const r=s[o.sets[0]],l=s[o.sets[1]],f=Math.sqrt(n[r].size/Math.PI),u=Math.sqrt(n[l].size/Math.PI),a=ft(f,u,o.size);e[r][l]=e[l][r]=a;let x=0;o.size+1e-10>=Math.min(n[r].size,n[l].size)?x=1:o.size<=1e-10&&(x=-1),i[r][l]=i[l][r]=x}),{distances:e,constraints:i}}v(Qt,"getDistanceMatrices");function $t(t,n,s,e){for(let o=0;o<n.length;++o)n[o]=0;let i=0;for(let o=0;o<s.length;++o){const r=t[2*o],l=t[2*o+1];for(let f=o+1;f<s.length;++f){const u=t[2*f],a=t[2*f+1],x=s[o][f],h=e[o][f],b=(u-r)*(u-r)+(a-l)*(a-l),p=Math.sqrt(b),k=b-x*x;h>0&&p<=x||h<0&&p>=x||(i+=2*k*k,n[2*o]+=4*k*(r-u),n[2*o+1]+=4*k*(l-a),n[2*f]+=4*k*(u-r),n[2*f+1]+=4*k*(a-l))}}return i}v($t,"constrainedMDSGradient");function te(t,n={}){let s=ne(t,n);const e=n.lossFunction||et;if(t.length>=8){const i=ee(t,n),o=e(i,t),r=e(s,t);o+1e-8<r&&(s=i)}return s}v(te,"bestInitialLayout");function ee(t,n={}){const s=n.restarts||10,e=[],i={};for(const h of t)h.sets.length===1&&(i[h.sets[0]]=e.length,e.push(h));let{distances:o,constraints:r}=Qt(t,e,i);const l=ct(o.map(ct))/o.length;o=o.map(h=>h.map(b=>b/l));const f=v((h,b)=>$t(h,b,o,r),"obj");let u=null;for(let h=0;h<s;++h){const b=lt(o.length*2).map(Math.random),p=Xt(f,b,n);(!u||p.fx<u.fx)&&(u=p)}const a=u.x,x={};for(let h=0;h<e.length;++h){const b=e[h];x[b.sets[0]]={x:a[2*h]*l,y:a[2*h+1]*l,radius:Math.sqrt(b.size/Math.PI)}}if(n.history)for(const h of n.history)ut(h.x,l);return x}v(ee,"constrainedMDSLayout");function ne(t,n){const s=n&&n.lossFunction?n.lossFunction:et,e={},i={};for(const x of t)if(x.sets.length===1){const h=x.sets[0];e[h]={x:1e10,y:1e10,rowid:e.length,size:x.size,radius:Math.sqrt(x.size/Math.PI)},i[h]=[]}t=t.filter(x=>x.sets.length===2);for(const x of t){let h=x.weight!=null?x.weight:1;const b=x.sets[0],p=x.sets[1];x.size+Zt>=Math.min(e[b].size,e[p].size)&&(h=0),i[b].push({set:p,size:x.size,weight:h}),i[p].push({set:b,size:x.size,weight:h})}const o=[];Object.keys(i).forEach(x=>{let h=0;for(let b=0;b<i[x].length;++b)h+=i[x][b].size*i[x][b].weight;o.push({set:x,size:h})});function r(x,h){return h.size-x.size}v(r,"sortOrder"),o.sort(r);const l={};function f(x){return x.set in l}v(f,"isPositioned");function u(x,h){e[h].x=x.x,e[h].y=x.y,l[h]=!0}v(u,"positionSet"),u({x:0,y:0},o[0].set);for(let x=1;x<o.length;++x){const h=o[x].set,b=i[h].filter(f),p=e[h];if(b.sort(r),b.length===0)throw"ERROR: missing pairwise overlap information";const k=[];for(var a=0;a<b.length;++a){const w=e[b[a].set],g=ft(p.radius,w.radius,b[a].size);k.push({x:w.x+g,y:w.y}),k.push({x:w.x-g,y:w.y}),k.push({y:w.y+g,x:w.x}),k.push({y:w.y-g,x:w.x});for(let m=a+1;m<b.length;++m){const S=e[b[m].set],c=ft(p.radius,S.radius,b[m].size),y=bt({x:w.x,y:w.y,radius:g},{x:S.x,y:S.y,radius:c});k.push(...y)}}let z=1e50,T=k[0];for(const w of k){e[h].x=w.x,e[h].y=w.y;const g=s(e,t);g<z&&(z=g,T=w)}u(T,h)}return e}v(ne,"greedyLayout");function et(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const r=t[e.sets[0]],l=t[e.sets[1]];i=dt(r.radius,l.radius,K(r,l))}else i=it(e.sets.map(r=>t[r]));const o=e.weight!=null?e.weight:1;s+=o*(i-e.size)*(i-e.size)}return s}v(et,"lossFunction");function Mt(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const l=t[e.sets[0]],f=t[e.sets[1]];i=dt(l.radius,f.radius,K(l,f))}else i=it(e.sets.map(l=>t[l]));const o=e.weight!=null?e.weight:1,r=Math.log((i+1)/(e.size+1));s+=o*r*r}return s}v(Mt,"logRatioLossFunction");function se(t,n,s){if(s==null?t.sort((i,o)=>o.radius-i.radius):t.sort(s),t.length>0){const i=t[0].x,o=t[0].y;for(const r of t)r.x-=i,r.y-=o}if(t.length===2&&K(t[0],t[1])<Math.abs(t[1].radius-t[0].radius)&&(t[1].x=t[0].x+t[0].radius-t[1].radius-1e-10,t[1].y=t[0].y),t.length>1){const i=Math.atan2(t[1].x,t[1].y)-n,o=Math.cos(i),r=Math.sin(i);for(const l of t){const f=l.x,u=l.y;l.x=o*f-r*u,l.y=r*f+o*u}}if(t.length>2){let i=Math.atan2(t[2].x,t[2].y)-n;for(;i<0;)i+=2*Math.PI;for(;i>2*Math.PI;)i-=2*Math.PI;if(i>Math.PI){const o=t[1].y/(1e-10+t[1].x);for(const r of t){var e=(r.x+o*r.y)/(1+o*o);r.x=2*e-r.x,r.y=2*e*o-r.y}}}}v(se,"orientateCircles");function ie(t){t.forEach(i=>{i.parent=i});function n(i){return i.parent!==i&&(i.parent=n(i.parent)),i.parent}v(n,"find");function s(i,o){const r=n(i),l=n(o);r.parent=l}v(s,"union");for(let i=0;i<t.length;++i)for(let o=i+1;o<t.length;++o){const r=t[i].radius+t[o].radius;K(t[i],t[o])+1e-10<r&&s(t[o],t[i])}const e=new Map;for(let i=0;i<t.length;++i){const o=n(t[i]).parent.setid;e.has(o)||e.set(o,[]),e.get(o).push(t[i])}return t.forEach(i=>{delete i.parent}),Array.from(e.values())}v(ie,"disjointCluster");function ht(t){const n=v(s=>{const e=t.reduce((o,r)=>Math.max(o,r[s]+r.radius),Number.NEGATIVE_INFINITY),i=t.reduce((o,r)=>Math.min(o,r[s]-r.radius),Number.POSITIVE_INFINITY);return{max:e,min:i}},"minMax");return{xRange:n("x"),yRange:n("y")}}v(ht,"getBoundingBox");function kt(t,n,s){n==null&&(n=Math.PI/2);let e=Tt(t).map(u=>Object.assign({},u));const i=ie(e);for(const u of i){se(u,n,s);const a=ht(u);u.size=(a.xRange.max-a.xRange.min)*(a.yRange.max-a.yRange.min),u.bounds=a}i.sort((u,a)=>a.size-u.size),e=i[0];let o=e.bounds;const r=(o.xRange.max-o.xRange.min)/50;function l(u,a,x){if(!u)return;const h=u.bounds;let b,p;if(a)b=o.xRange.max-h.xRange.min+r;else{b=o.xRange.max-h.xRange.max;const k=(h.xRange.max-h.xRange.min)/2-(o.xRange.max-o.xRange.min)/2;k<0&&(b+=k)}if(x)p=o.yRange.max-h.yRange.min+r;else{p=o.yRange.max-h.yRange.max;const k=(h.yRange.max-h.yRange.min)/2-(o.yRange.max-o.yRange.min)/2;k<0&&(p+=k)}for(const k of u)k.x+=b,k.y+=p,e.push(k)}v(l,"addCluster");let f=1;for(;f<i.length;)l(i[f],!0,!1),l(i[f+1],!1,!0),l(i[f+2],!0,!0),f+=3,o=ht(e);return _t(e)}v(kt,"normalizeSolution");function wt(t,n,s,e,i){const o=Tt(t);n-=2*e,s-=2*e;const{xRange:r,yRange:l}=ht(o);if(r.max===r.min||l.max===l.min)return console.log("not scaling solution: zero size detected"),t;let f,u;if(i){const b=Math.sqrt(i/Math.PI)*2;f=n/b,u=s/b}else f=n/(r.max-r.min),u=s/(l.max-l.min);const a=Math.min(u,f),x=(n-(r.max-r.min)*a)/2,h=(s-(l.max-l.min)*a)/2;return _t(o.map(b=>({radius:a*b.radius,x:e+x+(b.x-r.min)*a,y:e+h+(b.y-l.min)*a,setid:b.setid})))}v(wt,"scaleSolution");function _t(t){const n={};for(const s of t)n[s.setid]=s;return n}v(_t,"toObjectNotation");function Tt(t){return Object.keys(t).map(s=>Object.assign(t[s],{setid:s}))}v(Tt,"fromObjectNotation");function oe(t={}){let n=!1,s=600,e=350,i=15,o=1e3,r=Math.PI/2,l=!0,f=null,u=!0,a=!0,x=null,h=null,b=!1,p=null,k=t&&t.symmetricalTextCentre?t.symmetricalTextCentre:!1,z={},T=t&&t.colourScheme?t.colourScheme:t&&t.colorScheme?t.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],w=0,g=v(function(y){if(y in z)return z[y];var d=z[y]=T[w];return w+=1,w>=T.length&&(w=0),d},"colours"),m=It,S=et;function c(y){let d=y.datum();const D=new Set;d.forEach(M=>{M.size==0&&M.sets.length==1&&D.add(M.sets[0])}),d=d.filter(M=>!M.sets.some(F=>D.has(F)));let I={},O={};if(d.length>0){let M=m(d,{lossFunction:S,distinct:b});l&&(M=kt(M,r,h)),I=wt(M,s,e,i,f),O=zt(I,d,k)}const U={};d.forEach(M=>{M.label&&(U[M.sets]=M.label)});function B(M){if(M.sets in U)return U[M.sets];if(M.sets.length==1)return""+M.sets[0]}v(B,"label"),y.selectAll("svg").data([I]).enter().append("svg");const P=y.select("svg");n?P.attr("viewBox",`0 0 ${s} ${e}`):P.attr("width",s).attr("height",e);const R={};let E=!1;P.selectAll(".venn-area path").each(function(M){const F=this.getAttribute("d");M.sets.length==1&&F&&!b&&(E=!0,R[M.sets[0]]=le(F))});function C(M){return F=>{const Y=M.sets.map(nt=>{let X=R[nt],Q=I[nt];return X||(X={x:s/2,y:e/2,radius:1}),Q||(Q={x:s/2,y:e/2,radius:1}),{x:X.x*(1-F)+Q.x*F,y:X.y*(1-F)+Q.y*F,radius:X.radius*(1-F)+Q.radius*F}});return pt(Y,p)}}v(C,"pathTween");const W=P.selectAll(".venn-area").data(d,M=>M.sets),V=W.enter().append("g").attr("class",M=>`venn-area venn-${M.sets.length==1?"circle":"intersection"}${M.colour||M.color?" venn-coloured":""}`).attr("data-venn-sets",M=>M.sets.join("_")),G=V.append("path"),j=V.append("text").attr("class","label").text(M=>B(M)).attr("text-anchor","middle").attr("dy",".35em").attr("x",s/2).attr("y",e/2);a&&(G.style("fill-opacity","0").filter(M=>M.sets.length==1).style("fill",M=>M.colour?M.colour:M.color?M.color:g(M.sets)).style("fill-opacity",".25"),j.style("fill",M=>M.colour||M.color?"#FFF":t.textFill?t.textFill:M.sets.length==1?g(M.sets):"#444"));function q(M){return typeof M.transition=="function"?M.transition("venn").duration(o):M}v(q,"asTransition");let A=y;E&&typeof A.transition=="function"?(A=q(y),A.selectAll("path").attrTween("d",C)):A.selectAll("path").attr("d",M=>pt(M.sets.map(F=>I[F])),p);const N=A.selectAll("text").filter(M=>M.sets in O).text(M=>B(M)).attr("x",M=>Math.floor(O[M.sets].x)).attr("y",M=>Math.floor(O[M.sets].y));u&&(E?"on"in N?N.on("end",ot(I,B)):N.each("end",ot(I,B)):N.each(ot(I,B)));const L=q(W.exit()).remove();typeof W.transition=="function"&&L.selectAll("path").attrTween("d",C);const J=L.selectAll("text").attr("x",s/2).attr("y",e/2);return x!==null&&(j.style("font-size","0px"),N.style("font-size",x),J.style("font-size","0px")),{circles:I,textCentres:O,nodes:W,enter:V,update:A,exit:L}}return v(c,"chart"),c.wrap=function(y){return arguments.length?(u=y,c):u},c.useViewBox=function(){return n=!0,c},c.width=function(y){return arguments.length?(s=y,c):s},c.height=function(y){return arguments.length?(e=y,c):e},c.padding=function(y){return arguments.length?(i=y,c):i},c.distinct=function(y){return arguments.length?(b=y,c):b},c.colours=function(y){return arguments.length?(g=y,c):g},c.colors=function(y){return arguments.length?(g=y,c):g},c.fontSize=function(y){return arguments.length?(x=y,c):x},c.round=function(y){return arguments.length?(p=y,c):p},c.duration=function(y){return arguments.length?(o=y,c):o},c.layoutFunction=function(y){return arguments.length?(m=y,c):m},c.normalize=function(y){return arguments.length?(l=y,c):l},c.scaleToFit=function(y){return arguments.length?(f=y,c):f},c.styled=function(y){return arguments.length?(a=y,c):a},c.orientation=function(y){return arguments.length?(r=y,c):r},c.orientationOrder=function(y){return arguments.length?(h=y,c):h},c.lossFunction=function(y){return arguments.length?(S=y==="default"?et:y==="logRatio"?Mt:y,c):S},c}v(oe,"VennDiagram");function ot(t,n){return function(s){const e=this,i=t[s.sets[0]].radius||50,o=n(s)||"",r=o.split(/\s+/).reverse(),f=(o.length+r.length)/3;let u=r.pop(),a=[u],x=0;const h=1.1;e.textContent=null;const b=[];function p(g){const m=e.ownerDocument.createElementNS(e.namespaceURI,"tspan");return m.textContent=g,b.push(m),e.append(m),m}v(p,"append");let k=p(u);for(;u=r.pop(),!!u;){a.push(u);const g=a.join(" ");k.textContent=g,g.length>f&&k.getComputedTextLength()>i&&(a.pop(),k.textContent=a.join(" "),a=[u],k=p(u),x++)}const z=.35-x*h/2,T=e.getAttribute("x"),w=e.getAttribute("y");b.forEach((g,m)=>{g.setAttribute("x",T),g.setAttribute("y",w),g.setAttribute("dy",`${z+m*h}em`)})}}v(ot,"wrapText");function rt(t,n,s){let e=n[0].radius-K(n[0],t);for(let i=1;i<n.length;++i){const o=n[i].radius-K(n[i],t);o<=e&&(e=o)}for(let i=0;i<s.length;++i){const o=K(s[i],t)-s[i].radius;o<=e&&(e=o)}return e}v(rt,"circleMargin");function Et(t,n,s){const e=[];for(const a of t)e.push({x:a.x,y:a.y}),e.push({x:a.x+a.radius/2,y:a.y}),e.push({x:a.x-a.radius/2,y:a.y}),e.push({x:a.x,y:a.y+a.radius/2}),e.push({x:a.x,y:a.y-a.radius/2});let i=e[0],o=rt(e[0],t,n);for(let a=1;a<e.length;++a){const x=rt(e[a],t,n);x>=o&&(i=e[a],o=x)}const r=St(a=>-1*rt({x:a[0],y:a[1]},t,n),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,l={x:s?0:r[0],y:r[1]};let f=!0;for(const a of t)if(K(l,a)>a.radius){f=!1;break}for(const a of n)if(K(l,a)<a.radius){f=!1;break}if(f)return l;if(t.length==1)return{x:t[0].x,y:t[0].y};const u={};return it(t,u),u.arcs.length===0?{x:0,y:-1e3,disjoint:!0}:u.arcs.length==1?{x:u.arcs[0].circle.x,y:u.arcs[0].circle.y}:n.length?Et(t,[]):vt(u.arcs.map(a=>a.p1))}v(Et,"computeTextCentre");function re(t){const n={},s=Object.keys(t);for(const e of s)n[e]=[];for(let e=0;e<s.length;e++){const i=s[e],o=t[i];for(let r=e+1;r<s.length;++r){const l=s[r],f=t[l],u=K(o,f);u+f.radius<=o.radius+1e-10?n[l].push(i):u+o.radius<=f.radius+1e-10&&n[i].push(l)}}return n}v(re,"getOverlappingCircles");function zt(t,n,s){const e={},i=re(t);for(let o=0;o<n.length;++o){const r=n[o].sets,l={},f={};for(let h=0;h<r.length;++h){l[r[h]]=!0;const b=i[r[h]];for(let p=0;p<b.length;++p)f[b[p]]=!0}const u=[],a=[];for(let h in t)h in l?u.push(t[h]):h in f||a.push(t[h]);const x=Et(u,a,s);e[r]=x,x.disjoint&&n[o].size>0&&console.log("WARNING: area "+r+" not represented on screen")}return e}v(zt,"computeTextCentres");function ae(t,n,s){const e=[];return e.push(`
|
|
1
|
+
import{aF as ue,K as fe,O as he,aI as de,L as ge,aG as ye,a as _,M as Kt,aE as xe,d as pe,a8 as me,aR as Gt,aa as be,w as ve,r as Se,k as Ie,j as Me,y as ke}from"./_eQjP0_7.js";import{c3 as yt,g as v}from"./CdT170lG.js";var qt=1e-10;function it(t,n){const s=Wt(t),e=s.filter(l=>Ut(l,t));let i=0,o=0;const r=[];if(e.length>1){const l=vt(e);for(let u=0;u<e.length;++u){const a=e[u];a.angle=Math.atan2(a.x-l.x,a.y-l.y)}e.sort((u,a)=>a.angle-u.angle);let f=e[e.length-1];for(let u=0;u<e.length;++u){const a=e[u];o+=(f.x+a.x)*(a.y-f.y);const x={x:(a.x+f.x)/2,y:(a.y+f.y)/2};let h=null;for(let b=0;b<a.parentIndex.length;++b)if(f.parentIndex.includes(a.parentIndex[b])){const p=t[a.parentIndex[b]],k=Math.atan2(a.x-p.x,a.y-p.y),z=Math.atan2(f.x-p.x,f.y-p.y);let T=z-k;T<0&&(T+=2*Math.PI);const w=z-T/2;let g=K(x,{x:p.x+p.radius*Math.sin(w),y:p.y+p.radius*Math.cos(w)});g>p.radius*2&&(g=p.radius*2),(h==null||h.width>g)&&(h={circle:p,width:g,p1:a,p2:f,large:g>p.radius,sweep:!0})}h!=null&&(r.push(h),i+=at(h.circle.radius,h.width),f=a)}}else{let l=t[0];for(let u=1;u<t.length;++u)t[u].radius<l.radius&&(l=t[u]);let f=!1;for(let u=0;u<t.length;++u)if(K(t[u],l)>Math.abs(l.radius-t[u].radius)){f=!0;break}f?i=o=0:(i=l.radius*l.radius*Math.PI,r.push({circle:l,p1:{x:l.x,y:l.y+l.radius},p2:{x:l.x-qt,y:l.y+l.radius},width:l.radius*2,large:!0,sweep:!0}))}return o/=2,n&&(n.area=i+o,n.arcArea=i,n.polygonArea=o,n.arcs=r,n.innerPoints=e,n.intersectionPoints=s),i+o}v(it,"intersectionArea");function Ut(t,n){return n.every(s=>K(t,s)<s.radius+qt)}v(Ut,"containedInCircles");function Wt(t){const n=[];for(let s=0;s<t.length;++s)for(let e=s+1;e<t.length;++e){const i=bt(t[s],t[e]);for(const o of i)o.parentIndex=[s,e],n.push(o)}return n}v(Wt,"getIntersectionPoints");function at(t,n){return t*t*Math.acos(1-n/t)-(t-n)*Math.sqrt(n*(2*t-n))}v(at,"circleArea");function K(t,n){return Math.sqrt((t.x-n.x)*(t.x-n.x)+(t.y-n.y)*(t.y-n.y))}v(K,"distance");function dt(t,n,s){if(s>=t+n)return 0;if(s<=Math.abs(t-n))return Math.PI*Math.min(t,n)*Math.min(t,n);const e=t-(s*s-n*n+t*t)/(2*s),i=n-(s*s-t*t+n*n)/(2*s);return at(t,e)+at(n,i)}v(dt,"circleOverlap");function bt(t,n){const s=K(t,n),e=t.radius,i=n.radius;if(s>=e+i||s<=Math.abs(e-i))return[];const o=(e*e-i*i+s*s)/(2*s),r=Math.sqrt(e*e-o*o),l=t.x+o*(n.x-t.x)/s,f=t.y+o*(n.y-t.y)/s,u=-(n.y-t.y)*(r/s),a=-(n.x-t.x)*(r/s);return[{x:l+u,y:f-a},{x:l-u,y:f+a}]}v(bt,"circleCircleIntersection");function vt(t){const n={x:0,y:0};for(const s of t)n.x+=s.x,n.y+=s.y;return n.x/=t.length,n.y/=t.length,n}v(vt,"getCenter");function Ht(t,n,s,e){e=e||{};const i=e.maxIterations||100,o=e.tolerance||1e-10,r=t(n),l=t(s);let f=s-n;if(r*l>0)throw"Initial bisect points must have opposite signs";if(r===0)return n;if(l===0)return s;for(let u=0;u<i;++u){f/=2;const a=n+f,x=t(a);if(x*r>=0&&(n=a),Math.abs(f)<o||x===0)return a}return n+f}v(Ht,"bisect");function lt(t){const n=new Array(t);for(let s=0;s<t;++s)n[s]=0;return n}v(lt,"zeros");function xt(t,n){return lt(t).map(()=>lt(n))}v(xt,"zerosM");function tt(t,n){let s=0;for(let e=0;e<t.length;++e)s+=t[e]*n[e];return s}v(tt,"dot");function ct(t){return Math.sqrt(tt(t,t))}v(ct,"norm2");function ut(t,n,s){for(let e=0;e<n.length;++e)t[e]=n[e]*s}v(ut,"scale");function Z(t,n,s,e,i){for(let o=0;o<t.length;++o)t[o]=n*s[o]+e*i[o]}v(Z,"weightedSum");function St(t,n,s){s=s||{};const e=s.maxIterations||n.length*200,i=s.nonZeroDelta||1.05,o=s.zeroDelta||.001,r=s.minErrorDelta||1e-6,l=s.minErrorDelta||1e-5,f=s.rho!==void 0?s.rho:1,u=s.chi!==void 0?s.chi:2,a=s.psi!==void 0?s.psi:-.5,x=s.sigma!==void 0?s.sigma:.5;let h;const b=n.length,p=new Array(b+1);p[0]=n,p[0].fx=t(n),p[0].id=0;for(let S=0;S<b;++S){const c=n.slice();c[S]=c[S]?c[S]*i:o,p[S+1]=c,p[S+1].fx=t(c),p[S+1].id=S+1}function k(S){for(let c=0;c<S.length;c++)p[b][c]=S[c];p[b].fx=S.fx}v(k,"updateSimplex");const z=v((S,c)=>S.fx-c.fx,"sortOrder"),T=n.slice(),w=n.slice(),g=n.slice(),m=n.slice();for(let S=0;S<e;++S){if(p.sort(z),s.history){const y=p.map(d=>{const D=d.slice();return D.fx=d.fx,D.id=d.id,D});y.sort((d,D)=>d.id-D.id),s.history.push({x:p[0].slice(),fx:p[0].fx,simplex:y})}h=0;for(let y=0;y<b;++y)h=Math.max(h,Math.abs(p[0][y]-p[1][y]));if(Math.abs(p[0].fx-p[b].fx)<r&&h<l)break;for(let y=0;y<b;++y){T[y]=0;for(let d=0;d<b;++d)T[y]+=p[d][y];T[y]/=b}const c=p[b];if(Z(w,1+f,T,-f,c),w.fx=t(w),w.fx<p[0].fx)Z(m,1+u,T,-u,c),m.fx=t(m),m.fx<w.fx?k(m):k(w);else if(w.fx>=p[b-1].fx){let y=!1;if(w.fx>c.fx?(Z(g,1+a,T,-a,c),g.fx=t(g),g.fx<c.fx?k(g):y=!0):(Z(g,1-a*f,T,a*f,c),g.fx=t(g),g.fx<w.fx?k(g):y=!0),y){if(x>=1)break;for(let d=1;d<p.length;++d)Z(p[d],1-x,p[0],x,p[d]),p[d].fx=t(p[d])}}else k(w)}return p.sort(z),{fx:p[0].fx,x:p[0]}}v(St,"nelderMead");function Yt(t,n,s,e,i,o,r){const l=s.fx,f=tt(s.fxprime,n);let u=l,a=l,x=f,h=0;i=i||1,o=o||1e-6,r=r||.1;function b(p,k,z){for(let T=0;T<16;++T)if(i=(p+k)/2,Z(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),x=tt(e.fxprime,n),u>l+o*i*f||u>=z)k=i;else{if(Math.abs(x)<=-r*f)return i;x*(k-p)>=0&&(k=p),p=i,z=u}return 0}v(b,"zoom");for(let p=0;p<10;++p){if(Z(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),x=tt(e.fxprime,n),u>l+o*i*f||p&&u>=a)return b(h,i,a);if(Math.abs(x)<=-r*f)return i;if(x>=0)return b(i,h,u);a=u,h=i,i*=2}return i}v(Yt,"wolfeLineSearch");function Xt(t,n,s){let e={x:n.slice(),fx:0,fxprime:n.slice()},i={x:n.slice(),fx:0,fxprime:n.slice()};const o=n.slice();let r,l,f=1,u;s=s||{},u=s.maxIterations||n.length*20,e.fx=t(e.x,e.fxprime),r=e.fxprime.slice(),ut(r,e.fxprime,-1);for(let a=0;a<u;++a){if(f=Yt(t,r,e,i,f),s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:f}),!f)ut(r,e.fxprime,-1);else{Z(o,1,i.fxprime,-1,e.fxprime);const x=tt(e.fxprime,e.fxprime),h=Math.max(0,tt(o,i.fxprime)/x);Z(r,h,r,-1,i.fxprime),l=e,e=i,i=l}if(ct(e.fxprime)<=1e-5)break}return s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:f}),e}v(Xt,"conjugateGradient");function It(t,n={}){n.maxIterations=n.maxIterations||500;const s=n.initialLayout||te,e=n.lossFunction||et,i=Jt(t,n),o=s(i,n),r=Object.keys(o),l=[];for(const a of r)l.push(o[a].x),l.push(o[a].y);const u=St(a=>{const x={};for(let h=0;h<r.length;++h){const b=r[h];x[b]={x:a[2*h],y:a[2*h+1],radius:o[b].radius}}return e(x,i)},l,n).x;for(let a=0;a<r.length;++a){const x=r[a];o[x].x=u[2*a],o[x].y=u[2*a+1]}return o}v(It,"venn");var Zt=1e-10;function ft(t,n,s){return Math.min(t,n)*Math.min(t,n)*Math.PI<=s+Zt?Math.abs(t-n):Ht(e=>dt(t,n,e)-s,0,t+n)}v(ft,"distanceFromIntersectArea");function Jt(t,n={}){const s=n.distinct,e=t.map(l=>Object.assign({},l));function i(l){return l.join(";")}if(v(i,"toKey"),s){const l=new Map;for(const f of e)for(let u=0;u<f.sets.length;u++){const a=String(f.sets[u]);l.set(a,f.size+(l.get(a)||0));for(let x=u+1;x<f.sets.length;x++){const h=String(f.sets[x]),b=`${a};${h}`,p=`${h};${a}`;l.set(b,f.size+(l.get(b)||0)),l.set(p,f.size+(l.get(p)||0))}}for(const f of e)f.sets.length<3&&(f.size=l.get(i(f.sets)))}const o=[],r=new Set;for(const l of e)if(l.sets.length===1)o.push(l.sets[0]);else if(l.sets.length===2){const f=l.sets[0],u=l.sets[1];r.add(i(l.sets)),r.add(i([u,f]))}o.sort((l,f)=>l===f?0:l<f?-1:1);for(let l=0;l<o.length;++l){const f=o[l];for(let u=l+1;u<o.length;++u){const a=o[u];r.has(i([f,a]))||e.push({sets:[f,a],size:0})}}return e}v(Jt,"addMissingAreas");function Qt(t,n,s){const e=xt(n.length,n.length),i=xt(n.length,n.length);return t.filter(o=>o.sets.length===2).forEach(o=>{const r=s[o.sets[0]],l=s[o.sets[1]],f=Math.sqrt(n[r].size/Math.PI),u=Math.sqrt(n[l].size/Math.PI),a=ft(f,u,o.size);e[r][l]=e[l][r]=a;let x=0;o.size+1e-10>=Math.min(n[r].size,n[l].size)?x=1:o.size<=1e-10&&(x=-1),i[r][l]=i[l][r]=x}),{distances:e,constraints:i}}v(Qt,"getDistanceMatrices");function $t(t,n,s,e){for(let o=0;o<n.length;++o)n[o]=0;let i=0;for(let o=0;o<s.length;++o){const r=t[2*o],l=t[2*o+1];for(let f=o+1;f<s.length;++f){const u=t[2*f],a=t[2*f+1],x=s[o][f],h=e[o][f],b=(u-r)*(u-r)+(a-l)*(a-l),p=Math.sqrt(b),k=b-x*x;h>0&&p<=x||h<0&&p>=x||(i+=2*k*k,n[2*o]+=4*k*(r-u),n[2*o+1]+=4*k*(l-a),n[2*f]+=4*k*(u-r),n[2*f+1]+=4*k*(a-l))}}return i}v($t,"constrainedMDSGradient");function te(t,n={}){let s=ne(t,n);const e=n.lossFunction||et;if(t.length>=8){const i=ee(t,n),o=e(i,t),r=e(s,t);o+1e-8<r&&(s=i)}return s}v(te,"bestInitialLayout");function ee(t,n={}){const s=n.restarts||10,e=[],i={};for(const h of t)h.sets.length===1&&(i[h.sets[0]]=e.length,e.push(h));let{distances:o,constraints:r}=Qt(t,e,i);const l=ct(o.map(ct))/o.length;o=o.map(h=>h.map(b=>b/l));const f=v((h,b)=>$t(h,b,o,r),"obj");let u=null;for(let h=0;h<s;++h){const b=lt(o.length*2).map(Math.random),p=Xt(f,b,n);(!u||p.fx<u.fx)&&(u=p)}const a=u.x,x={};for(let h=0;h<e.length;++h){const b=e[h];x[b.sets[0]]={x:a[2*h]*l,y:a[2*h+1]*l,radius:Math.sqrt(b.size/Math.PI)}}if(n.history)for(const h of n.history)ut(h.x,l);return x}v(ee,"constrainedMDSLayout");function ne(t,n){const s=n&&n.lossFunction?n.lossFunction:et,e={},i={};for(const x of t)if(x.sets.length===1){const h=x.sets[0];e[h]={x:1e10,y:1e10,rowid:e.length,size:x.size,radius:Math.sqrt(x.size/Math.PI)},i[h]=[]}t=t.filter(x=>x.sets.length===2);for(const x of t){let h=x.weight!=null?x.weight:1;const b=x.sets[0],p=x.sets[1];x.size+Zt>=Math.min(e[b].size,e[p].size)&&(h=0),i[b].push({set:p,size:x.size,weight:h}),i[p].push({set:b,size:x.size,weight:h})}const o=[];Object.keys(i).forEach(x=>{let h=0;for(let b=0;b<i[x].length;++b)h+=i[x][b].size*i[x][b].weight;o.push({set:x,size:h})});function r(x,h){return h.size-x.size}v(r,"sortOrder"),o.sort(r);const l={};function f(x){return x.set in l}v(f,"isPositioned");function u(x,h){e[h].x=x.x,e[h].y=x.y,l[h]=!0}v(u,"positionSet"),u({x:0,y:0},o[0].set);for(let x=1;x<o.length;++x){const h=o[x].set,b=i[h].filter(f),p=e[h];if(b.sort(r),b.length===0)throw"ERROR: missing pairwise overlap information";const k=[];for(var a=0;a<b.length;++a){const w=e[b[a].set],g=ft(p.radius,w.radius,b[a].size);k.push({x:w.x+g,y:w.y}),k.push({x:w.x-g,y:w.y}),k.push({y:w.y+g,x:w.x}),k.push({y:w.y-g,x:w.x});for(let m=a+1;m<b.length;++m){const S=e[b[m].set],c=ft(p.radius,S.radius,b[m].size),y=bt({x:w.x,y:w.y,radius:g},{x:S.x,y:S.y,radius:c});k.push(...y)}}let z=1e50,T=k[0];for(const w of k){e[h].x=w.x,e[h].y=w.y;const g=s(e,t);g<z&&(z=g,T=w)}u(T,h)}return e}v(ne,"greedyLayout");function et(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const r=t[e.sets[0]],l=t[e.sets[1]];i=dt(r.radius,l.radius,K(r,l))}else i=it(e.sets.map(r=>t[r]));const o=e.weight!=null?e.weight:1;s+=o*(i-e.size)*(i-e.size)}return s}v(et,"lossFunction");function Mt(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const l=t[e.sets[0]],f=t[e.sets[1]];i=dt(l.radius,f.radius,K(l,f))}else i=it(e.sets.map(l=>t[l]));const o=e.weight!=null?e.weight:1,r=Math.log((i+1)/(e.size+1));s+=o*r*r}return s}v(Mt,"logRatioLossFunction");function se(t,n,s){if(s==null?t.sort((i,o)=>o.radius-i.radius):t.sort(s),t.length>0){const i=t[0].x,o=t[0].y;for(const r of t)r.x-=i,r.y-=o}if(t.length===2&&K(t[0],t[1])<Math.abs(t[1].radius-t[0].radius)&&(t[1].x=t[0].x+t[0].radius-t[1].radius-1e-10,t[1].y=t[0].y),t.length>1){const i=Math.atan2(t[1].x,t[1].y)-n,o=Math.cos(i),r=Math.sin(i);for(const l of t){const f=l.x,u=l.y;l.x=o*f-r*u,l.y=r*f+o*u}}if(t.length>2){let i=Math.atan2(t[2].x,t[2].y)-n;for(;i<0;)i+=2*Math.PI;for(;i>2*Math.PI;)i-=2*Math.PI;if(i>Math.PI){const o=t[1].y/(1e-10+t[1].x);for(const r of t){var e=(r.x+o*r.y)/(1+o*o);r.x=2*e-r.x,r.y=2*e*o-r.y}}}}v(se,"orientateCircles");function ie(t){t.forEach(i=>{i.parent=i});function n(i){return i.parent!==i&&(i.parent=n(i.parent)),i.parent}v(n,"find");function s(i,o){const r=n(i),l=n(o);r.parent=l}v(s,"union");for(let i=0;i<t.length;++i)for(let o=i+1;o<t.length;++o){const r=t[i].radius+t[o].radius;K(t[i],t[o])+1e-10<r&&s(t[o],t[i])}const e=new Map;for(let i=0;i<t.length;++i){const o=n(t[i]).parent.setid;e.has(o)||e.set(o,[]),e.get(o).push(t[i])}return t.forEach(i=>{delete i.parent}),Array.from(e.values())}v(ie,"disjointCluster");function ht(t){const n=v(s=>{const e=t.reduce((o,r)=>Math.max(o,r[s]+r.radius),Number.NEGATIVE_INFINITY),i=t.reduce((o,r)=>Math.min(o,r[s]-r.radius),Number.POSITIVE_INFINITY);return{max:e,min:i}},"minMax");return{xRange:n("x"),yRange:n("y")}}v(ht,"getBoundingBox");function kt(t,n,s){n==null&&(n=Math.PI/2);let e=Tt(t).map(u=>Object.assign({},u));const i=ie(e);for(const u of i){se(u,n,s);const a=ht(u);u.size=(a.xRange.max-a.xRange.min)*(a.yRange.max-a.yRange.min),u.bounds=a}i.sort((u,a)=>a.size-u.size),e=i[0];let o=e.bounds;const r=(o.xRange.max-o.xRange.min)/50;function l(u,a,x){if(!u)return;const h=u.bounds;let b,p;if(a)b=o.xRange.max-h.xRange.min+r;else{b=o.xRange.max-h.xRange.max;const k=(h.xRange.max-h.xRange.min)/2-(o.xRange.max-o.xRange.min)/2;k<0&&(b+=k)}if(x)p=o.yRange.max-h.yRange.min+r;else{p=o.yRange.max-h.yRange.max;const k=(h.yRange.max-h.yRange.min)/2-(o.yRange.max-o.yRange.min)/2;k<0&&(p+=k)}for(const k of u)k.x+=b,k.y+=p,e.push(k)}v(l,"addCluster");let f=1;for(;f<i.length;)l(i[f],!0,!1),l(i[f+1],!1,!0),l(i[f+2],!0,!0),f+=3,o=ht(e);return _t(e)}v(kt,"normalizeSolution");function wt(t,n,s,e,i){const o=Tt(t);n-=2*e,s-=2*e;const{xRange:r,yRange:l}=ht(o);if(r.max===r.min||l.max===l.min)return console.log("not scaling solution: zero size detected"),t;let f,u;if(i){const b=Math.sqrt(i/Math.PI)*2;f=n/b,u=s/b}else f=n/(r.max-r.min),u=s/(l.max-l.min);const a=Math.min(u,f),x=(n-(r.max-r.min)*a)/2,h=(s-(l.max-l.min)*a)/2;return _t(o.map(b=>({radius:a*b.radius,x:e+x+(b.x-r.min)*a,y:e+h+(b.y-l.min)*a,setid:b.setid})))}v(wt,"scaleSolution");function _t(t){const n={};for(const s of t)n[s.setid]=s;return n}v(_t,"toObjectNotation");function Tt(t){return Object.keys(t).map(s=>Object.assign(t[s],{setid:s}))}v(Tt,"fromObjectNotation");function oe(t={}){let n=!1,s=600,e=350,i=15,o=1e3,r=Math.PI/2,l=!0,f=null,u=!0,a=!0,x=null,h=null,b=!1,p=null,k=t&&t.symmetricalTextCentre?t.symmetricalTextCentre:!1,z={},T=t&&t.colourScheme?t.colourScheme:t&&t.colorScheme?t.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],w=0,g=v(function(y){if(y in z)return z[y];var d=z[y]=T[w];return w+=1,w>=T.length&&(w=0),d},"colours"),m=It,S=et;function c(y){let d=y.datum();const D=new Set;d.forEach(M=>{M.size==0&&M.sets.length==1&&D.add(M.sets[0])}),d=d.filter(M=>!M.sets.some(F=>D.has(F)));let I={},O={};if(d.length>0){let M=m(d,{lossFunction:S,distinct:b});l&&(M=kt(M,r,h)),I=wt(M,s,e,i,f),O=zt(I,d,k)}const U={};d.forEach(M=>{M.label&&(U[M.sets]=M.label)});function B(M){if(M.sets in U)return U[M.sets];if(M.sets.length==1)return""+M.sets[0]}v(B,"label"),y.selectAll("svg").data([I]).enter().append("svg");const P=y.select("svg");n?P.attr("viewBox",`0 0 ${s} ${e}`):P.attr("width",s).attr("height",e);const R={};let E=!1;P.selectAll(".venn-area path").each(function(M){const F=this.getAttribute("d");M.sets.length==1&&F&&!b&&(E=!0,R[M.sets[0]]=le(F))});function C(M){return F=>{const Y=M.sets.map(nt=>{let X=R[nt],Q=I[nt];return X||(X={x:s/2,y:e/2,radius:1}),Q||(Q={x:s/2,y:e/2,radius:1}),{x:X.x*(1-F)+Q.x*F,y:X.y*(1-F)+Q.y*F,radius:X.radius*(1-F)+Q.radius*F}});return pt(Y,p)}}v(C,"pathTween");const W=P.selectAll(".venn-area").data(d,M=>M.sets),V=W.enter().append("g").attr("class",M=>`venn-area venn-${M.sets.length==1?"circle":"intersection"}${M.colour||M.color?" venn-coloured":""}`).attr("data-venn-sets",M=>M.sets.join("_")),G=V.append("path"),j=V.append("text").attr("class","label").text(M=>B(M)).attr("text-anchor","middle").attr("dy",".35em").attr("x",s/2).attr("y",e/2);a&&(G.style("fill-opacity","0").filter(M=>M.sets.length==1).style("fill",M=>M.colour?M.colour:M.color?M.color:g(M.sets)).style("fill-opacity",".25"),j.style("fill",M=>M.colour||M.color?"#FFF":t.textFill?t.textFill:M.sets.length==1?g(M.sets):"#444"));function q(M){return typeof M.transition=="function"?M.transition("venn").duration(o):M}v(q,"asTransition");let A=y;E&&typeof A.transition=="function"?(A=q(y),A.selectAll("path").attrTween("d",C)):A.selectAll("path").attr("d",M=>pt(M.sets.map(F=>I[F])),p);const N=A.selectAll("text").filter(M=>M.sets in O).text(M=>B(M)).attr("x",M=>Math.floor(O[M.sets].x)).attr("y",M=>Math.floor(O[M.sets].y));u&&(E?"on"in N?N.on("end",ot(I,B)):N.each("end",ot(I,B)):N.each(ot(I,B)));const L=q(W.exit()).remove();typeof W.transition=="function"&&L.selectAll("path").attrTween("d",C);const J=L.selectAll("text").attr("x",s/2).attr("y",e/2);return x!==null&&(j.style("font-size","0px"),N.style("font-size",x),J.style("font-size","0px")),{circles:I,textCentres:O,nodes:W,enter:V,update:A,exit:L}}return v(c,"chart"),c.wrap=function(y){return arguments.length?(u=y,c):u},c.useViewBox=function(){return n=!0,c},c.width=function(y){return arguments.length?(s=y,c):s},c.height=function(y){return arguments.length?(e=y,c):e},c.padding=function(y){return arguments.length?(i=y,c):i},c.distinct=function(y){return arguments.length?(b=y,c):b},c.colours=function(y){return arguments.length?(g=y,c):g},c.colors=function(y){return arguments.length?(g=y,c):g},c.fontSize=function(y){return arguments.length?(x=y,c):x},c.round=function(y){return arguments.length?(p=y,c):p},c.duration=function(y){return arguments.length?(o=y,c):o},c.layoutFunction=function(y){return arguments.length?(m=y,c):m},c.normalize=function(y){return arguments.length?(l=y,c):l},c.scaleToFit=function(y){return arguments.length?(f=y,c):f},c.styled=function(y){return arguments.length?(a=y,c):a},c.orientation=function(y){return arguments.length?(r=y,c):r},c.orientationOrder=function(y){return arguments.length?(h=y,c):h},c.lossFunction=function(y){return arguments.length?(S=y==="default"?et:y==="logRatio"?Mt:y,c):S},c}v(oe,"VennDiagram");function ot(t,n){return function(s){const e=this,i=t[s.sets[0]].radius||50,o=n(s)||"",r=o.split(/\s+/).reverse(),f=(o.length+r.length)/3;let u=r.pop(),a=[u],x=0;const h=1.1;e.textContent=null;const b=[];function p(g){const m=e.ownerDocument.createElementNS(e.namespaceURI,"tspan");return m.textContent=g,b.push(m),e.append(m),m}v(p,"append");let k=p(u);for(;u=r.pop(),!!u;){a.push(u);const g=a.join(" ");k.textContent=g,g.length>f&&k.getComputedTextLength()>i&&(a.pop(),k.textContent=a.join(" "),a=[u],k=p(u),x++)}const z=.35-x*h/2,T=e.getAttribute("x"),w=e.getAttribute("y");b.forEach((g,m)=>{g.setAttribute("x",T),g.setAttribute("y",w),g.setAttribute("dy",`${z+m*h}em`)})}}v(ot,"wrapText");function rt(t,n,s){let e=n[0].radius-K(n[0],t);for(let i=1;i<n.length;++i){const o=n[i].radius-K(n[i],t);o<=e&&(e=o)}for(let i=0;i<s.length;++i){const o=K(s[i],t)-s[i].radius;o<=e&&(e=o)}return e}v(rt,"circleMargin");function Et(t,n,s){const e=[];for(const a of t)e.push({x:a.x,y:a.y}),e.push({x:a.x+a.radius/2,y:a.y}),e.push({x:a.x-a.radius/2,y:a.y}),e.push({x:a.x,y:a.y+a.radius/2}),e.push({x:a.x,y:a.y-a.radius/2});let i=e[0],o=rt(e[0],t,n);for(let a=1;a<e.length;++a){const x=rt(e[a],t,n);x>=o&&(i=e[a],o=x)}const r=St(a=>-1*rt({x:a[0],y:a[1]},t,n),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,l={x:s?0:r[0],y:r[1]};let f=!0;for(const a of t)if(K(l,a)>a.radius){f=!1;break}for(const a of n)if(K(l,a)<a.radius){f=!1;break}if(f)return l;if(t.length==1)return{x:t[0].x,y:t[0].y};const u={};return it(t,u),u.arcs.length===0?{x:0,y:-1e3,disjoint:!0}:u.arcs.length==1?{x:u.arcs[0].circle.x,y:u.arcs[0].circle.y}:n.length?Et(t,[]):vt(u.arcs.map(a=>a.p1))}v(Et,"computeTextCentre");function re(t){const n={},s=Object.keys(t);for(const e of s)n[e]=[];for(let e=0;e<s.length;e++){const i=s[e],o=t[i];for(let r=e+1;r<s.length;++r){const l=s[r],f=t[l],u=K(o,f);u+f.radius<=o.radius+1e-10?n[l].push(i):u+o.radius<=f.radius+1e-10&&n[i].push(l)}}return n}v(re,"getOverlappingCircles");function zt(t,n,s){const e={},i=re(t);for(let o=0;o<n.length;++o){const r=n[o].sets,l={},f={};for(let h=0;h<r.length;++h){l[r[h]]=!0;const b=i[r[h]];for(let p=0;p<b.length;++p)f[b[p]]=!0}const u=[],a=[];for(let h in t)h in l?u.push(t[h]):h in f||a.push(t[h]);const x=Et(u,a,s);e[r]=x,x.disjoint&&n[o].size>0&&console.log("WARNING: area "+r+" not represented on screen")}return e}v(zt,"computeTextCentres");function ae(t,n,s){const e=[];return e.push(`
|
|
2
2
|
M`,t,n),e.push(`
|
|
3
3
|
m`,-s,0),e.push(`
|
|
4
4
|
a`,s,s,0,1,0,s*2,0),e.push(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as o}from"./
|
|
1
|
+
import{a as o}from"./_eQjP0_7.js";import{g as r}from"./CdT170lG.js";var l=1;function n(){if(!(typeof globalThis>"u"))return globalThis}r(n,"getCaptureGlobal");o(n,"getCaptureGlobal");function p(){return!!n()?.mermaidCaptureSizes}r(p,"shouldCaptureSizes");o(p,"shouldCaptureSizes");function u(){return typeof location>"u"?"browser-dev":`${location.pathname}${location.search}`}r(u,"capturedFromLocation");o(u,"capturedFromLocation");function d(i,a){const t=n();if(!t)return;const e=a.node(),m=((e&&"ownerSVGElement"in e?e.ownerSVGElement:null)??e)?.id??"(unknown)";t.mermaidCapturedSizes??=[];const s={svgId:m,sizes:i};t.mermaidCapturedSizes.push(s),t.mermaidLastCapturedSizes=s}r(d,"emitCapturedSizes");o(d,"emitCapturedSizes");function c(i,a){const t=[];for(const e of a.nodes)e.isGroup||t.push({id:e.id,width:e.width??0,height:e.height??0});t.length!==0&&d({metadata:{captureVersion:l,capturedAt:new Date().toISOString(),capturedFrom:u()},nodes:t},i)}r(c,"captureNodeSizes");o(c,"captureNodeSizes");export{c as captureNodeSizes,p as shouldCaptureSizes};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as p,ad as C,aE as q,M as W,k as G,U,r as j,aD as K,N as J}from"./
|
|
1
|
+
import{a as p,ad as C,aE as q,M as W,k as G,U,r as j,aD as K,N as J}from"./_eQjP0_7.js";import{g as Y}from"./CdT170lG.js";var M="",A="",O="",D=[],b=new Map,v=p(e=>K(e,J()),"sanitizeText"),$=p(e=>{switch(e.type){case"terminal":return{...e,value:v(e.value)};case"nonterminal":return{...e,name:v(e.name)};case"sequence":return{...e,elements:e.elements.map($)};case"choice":return{...e,alternatives:e.alternatives.map($)};case"optional":return{...e,element:$(e.element)};case"repetition":return{...e,element:$(e.element),separator:e.separator?$(e.separator):void 0};case"special":return{...e,text:v(e.text)}}},"sanitizeAstNode"),Q=p(()=>{M="",A="",O="",D.length=0,b.clear(),G(),C.debug("[Railroad] Database cleared")},"clear"),P=p(e=>{M=v(e),C.debug("[Railroad] Title set:",e)},"setTitle"),L=p(()=>M,"getTitle"),Z=p(e=>{const i={...e,name:v(e.name),definition:$(e.definition),comment:e.comment?v(e.comment):void 0};C.debug("[Railroad] Adding rule:",i.name),b.has(i.name)&&C.warn(`[Railroad] Rule '${i.name}' is already defined. Overwriting.`),D.push(i),b.set(i.name,i)},"addRule"),V=p(()=>D,"getRules"),ee=p(e=>b.get(e),"getRule"),te=p(e=>{A=v(e).replace(/^\s+/g,""),C.debug("[Railroad] Accessibility title set:",e)},"setAccTitle"),re=p(()=>A,"getAccTitle"),ie=p(e=>{O=v(e).replace(/\n\s+/g,`
|
|
2
2
|
`),C.debug("[Railroad] Accessibility description set:",e)},"setAccDescription"),ae=p(()=>O,"getAccDescription"),ne=P,oe=L,le={clear:Q,setTitle:P,getTitle:L,addRule:Z,getRules:V,getRule:ee,setAccTitle:te,getAccTitle:re,setAccDescription:ie,getAccDescription:ae,setDiagramTitle:ne,getDiagramTitle:oe},f={compactMode:!1,padding:10,verticalSeparation:8,horizontalSeparation:10,arcRadius:10,fontSize:14,fontFamily:"monospace",terminalFill:"#FFFFC0",terminalStroke:"#000000",terminalTextColor:"#000000",nonTerminalFill:"#FFFFFF",nonTerminalStroke:"#000000",nonTerminalTextColor:"#000000",lineColor:"#000000",strokeWidth:2,markerFill:"#000000",commentFill:"#E8E8E8",commentStroke:"#888888",commentTextColor:"#666666",specialFill:"#F0E0FF",specialStroke:"#8800CC",ruleNameColor:"#000066",showMarkers:!0,markerRadius:5},se=/^#(?:[\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$|^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch)\([\d\s%+,./-]+\)$|^[a-z]+$/i,de=/^[\w "',.-]+$/,ce=new Set(["compactMode","padding","verticalSeparation","horizontalSeparation","arcRadius","fontSize","fontFamily","terminalFill","terminalStroke","terminalTextColor","nonTerminalFill","nonTerminalStroke","nonTerminalTextColor","lineColor","strokeWidth","markerFill","commentFill","commentStroke","commentTextColor","specialFill","specialStroke","ruleNameColor","showMarkers","markerRadius"]),I=p(e=>e?Object.keys(e).every(i=>i==="railroad"||ce.has(i)):!1,"isRailroadStyleOptions"),me=p(e=>e?"railroad"in e&&e.railroad?e.railroad:I(e)?e:{}:{},"extractRailroadOverrides"),he=p(e=>{if(!e||I(e))return{};const{railroad:i,svgId:n,theme:a,look:t,...r}=e;return r},"extractThemeOverrides"),m=p((e,i)=>{if(typeof e!="string")return i;const n=e.trim();return se.test(n)?n:i},"sanitizeColorValue"),X=p((e,i)=>{if(typeof e!="string")return i;const n=e.trim();return de.test(n)?n:i},"sanitizeFontFamilyValue"),F=p((e,i)=>{const n=typeof e=="number"?e:typeof e=="string"?Number.parseFloat(e):Number.NaN;return Number.isFinite(n)&&n>=0?n:i},"sanitizeNumberValue"),pe=p(e=>{const i=typeof e=="number"?e:typeof e=="string"?Number.parseFloat(e):Number.NaN;return Number.isFinite(i)&&i>0?i:void 0},"parseThemeFontSize"),ue=p(e=>{const i=X(e.fontFamily,f.fontFamily),n=pe(e.fontSize)??f.fontSize;return{...f,fontFamily:i,fontSize:n,terminalFill:m(e.secondBkg??e.secondaryColor,f.terminalFill),terminalStroke:m(e.secondaryBorderColor??e.lineColor,f.terminalStroke),terminalTextColor:m(e.secondaryTextColor??e.textColor,f.terminalTextColor),nonTerminalFill:m(e.mainBkg??e.background,f.nonTerminalFill),nonTerminalStroke:m(e.primaryBorderColor??e.lineColor,f.nonTerminalStroke),nonTerminalTextColor:m(e.primaryTextColor??e.textColor,f.nonTerminalTextColor),lineColor:m(e.lineColor,f.lineColor),markerFill:m(e.lineColor,f.markerFill),commentFill:m(e.labelBackground??e.tertiaryColor,f.commentFill),commentStroke:m(e.tertiaryBorderColor??e.lineColor,f.commentStroke),commentTextColor:m(e.tertiaryTextColor??e.textColor,f.commentTextColor),specialFill:m(e.tertiaryColor??e.secondaryColor,f.specialFill),specialStroke:m(e.tertiaryBorderColor??e.secondaryBorderColor,f.specialStroke),ruleNameColor:m(e.titleColor??e.textColor,f.ruleNameColor)}},"buildThemeDefaults"),E=p(e=>{const i=W(),n={...U(),...i.themeVariables??{},...he(e)},a=ue(n),t={...i.railroad??{},...me(e)};return{compactMode:t.compactMode??a.compactMode,padding:F(t.padding,a.padding),verticalSeparation:F(t.verticalSeparation,a.verticalSeparation),horizontalSeparation:F(t.horizontalSeparation,a.horizontalSeparation),arcRadius:F(t.arcRadius,a.arcRadius),fontSize:F(t.fontSize,a.fontSize),fontFamily:X(t.fontFamily,a.fontFamily),terminalFill:m(t.terminalFill,a.terminalFill),terminalStroke:m(t.terminalStroke,a.terminalStroke),terminalTextColor:m(t.terminalTextColor,a.terminalTextColor),nonTerminalFill:m(t.nonTerminalFill,a.nonTerminalFill),nonTerminalStroke:m(t.nonTerminalStroke,a.nonTerminalStroke),nonTerminalTextColor:m(t.nonTerminalTextColor,a.nonTerminalTextColor),lineColor:m(t.lineColor,a.lineColor),strokeWidth:F(t.strokeWidth,a.strokeWidth),markerFill:m(t.markerFill,a.markerFill),commentFill:m(t.commentFill,a.commentFill),commentStroke:m(t.commentStroke,a.commentStroke),commentTextColor:m(t.commentTextColor,a.commentTextColor),specialFill:m(t.specialFill,a.specialFill),specialStroke:m(t.specialStroke,a.specialStroke),ruleNameColor:m(t.ruleNameColor,a.ruleNameColor),showMarkers:t.showMarkers??a.showMarkers,markerRadius:F(t.markerRadius,a.markerRadius)}},"buildRailroadStyleOptions"),we=p(e=>{const{fontFamily:i,fontSize:n,terminalFill:a,terminalStroke:t,terminalTextColor:r,nonTerminalFill:o,nonTerminalStroke:g,nonTerminalTextColor:l,lineColor:s,strokeWidth:h,markerFill:u,commentFill:c,commentStroke:w,commentTextColor:d,specialFill:T,specialStroke:z,ruleNameColor:S}=E(e);return`
|
|
3
3
|
.railroad-diagram {
|
|
4
4
|
font-family: ${i};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{e as Le}from"./CoQLGQdj.js";import{c6 as Ie,aK as Me,aL as Be,c7 as Ve,f as d,aO as wt,bC as he,a6 as Ye,u as Fe,W as Dt,cf as Ue,c2 as be,c3 as Jt,cA as je,a4 as $t,V as de}from"./Bmnp4Cni.js";var Ut=(function(){var t=d(function(yt,g,x,E){for(x=x||{},E=yt.length;E--;x[yt[E]]=g);return x},"o"),e=[1,24],s=[1,25],a=[1,26],u=[1,27],i=[1,28],n=[1,63],l=[1,64],r=[1,65],h=[1,66],y=[1,67],f=[1,68],b=[1,69],v=[1,29],w=[1,30],N=[1,31],O=[1,32],P=[1,33],I=[1,34],W=[1,35],X=[1,36],q=[1,37],H=[1,38],Q=[1,39],K=[1,40],G=[1,41],J=[1,42],Z=[1,43],$=[1,44],tt=[1,45],et=[1,46],nt=[1,47],st=[1,48],rt=[1,50],at=[1,51],it=[1,52],ot=[1,53],lt=[1,54],ct=[1,55],ut=[1,56],ht=[1,57],dt=[1,58],pt=[1,59],ft=[1,60],Tt=[14,42],Wt=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Ot=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],S=[1,82],T=[1,83],k=[1,84],C=[1,85],R=[12,14,42],ie=[12,14,33,42],Mt=[12,14,33,42,76,77,79,80],mt=[12,33],Xt=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],qt={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:d(function(g,x,E,_,D,o,Pt){var p=o.length-1;switch(D){case 3:_.setDirection("TB");break;case 4:_.setDirection("BT");break;case 5:_.setDirection("RL");break;case 6:_.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:_.setC4Type(o[p-3]);break;case 19:_.setTitle(o[p].substring(6)),this.$=o[p].substring(6);break;case 20:_.setAccDescription(o[p].substring(15)),this.$=o[p].substring(15);break;case 21:this.$=o[p].trim(),_.setTitle(this.$);break;case 22:case 23:this.$=o[p].trim(),_.setAccDescription(this.$);break;case 28:o[p].splice(2,0,"ENTERPRISE"),_.addPersonOrSystemBoundary(...o[p]),this.$=o[p];break;case 29:o[p].splice(2,0,"SYSTEM"),_.addPersonOrSystemBoundary(...o[p]),this.$=o[p];break;case 30:_.addPersonOrSystemBoundary(...o[p]),this.$=o[p];break;case 31:o[p].splice(2,0,"CONTAINER"),_.addContainerBoundary(...o[p]),this.$=o[p];break;case 32:_.addDeploymentNode("node",...o[p]),this.$=o[p];break;case 33:_.addDeploymentNode("nodeL",...o[p]),this.$=o[p];break;case 34:_.addDeploymentNode("nodeR",...o[p]),this.$=o[p];break;case 35:_.popBoundaryParseStack();break;case 39:_.addPersonOrSystem("person",...o[p]),this.$=o[p];break;case 40:_.addPersonOrSystem("external_person",...o[p]),this.$=o[p];break;case 41:_.addPersonOrSystem("system",...o[p]),this.$=o[p];break;case 42:_.addPersonOrSystem("system_db",...o[p]),this.$=o[p];break;case 43:_.addPersonOrSystem("system_queue",...o[p]),this.$=o[p];break;case 44:_.addPersonOrSystem("external_system",...o[p]),this.$=o[p];break;case 45:_.addPersonOrSystem("external_system_db",...o[p]),this.$=o[p];break;case 46:_.addPersonOrSystem("external_system_queue",...o[p]),this.$=o[p];break;case 47:_.addContainer("container",...o[p]),this.$=o[p];break;case 48:_.addContainer("container_db",...o[p]),this.$=o[p];break;case 49:_.addContainer("container_queue",...o[p]),this.$=o[p];break;case 50:_.addContainer("external_container",...o[p]),this.$=o[p];break;case 51:_.addContainer("external_container_db",...o[p]),this.$=o[p];break;case 52:_.addContainer("external_container_queue",...o[p]),this.$=o[p];break;case 53:_.addComponent("component",...o[p]),this.$=o[p];break;case 54:_.addComponent("component_db",...o[p]),this.$=o[p];break;case 55:_.addComponent("component_queue",...o[p]),this.$=o[p];break;case 56:_.addComponent("external_component",...o[p]),this.$=o[p];break;case 57:_.addComponent("external_component_db",...o[p]),this.$=o[p];break;case 58:_.addComponent("external_component_queue",...o[p]),this.$=o[p];break;case 60:_.addRel("rel",...o[p]),this.$=o[p];break;case 61:_.addRel("birel",...o[p]),this.$=o[p];break;case 62:_.addRel("rel_u",...o[p]),this.$=o[p];break;case 63:_.addRel("rel_d",...o[p]),this.$=o[p];break;case 64:_.addRel("rel_l",...o[p]),this.$=o[p];break;case 65:_.addRel("rel_r",...o[p]),this.$=o[p];break;case 66:_.addRel("rel_b",...o[p]),this.$=o[p];break;case 67:o[p].splice(0,1),_.addRel("rel",...o[p]),this.$=o[p];break;case 68:_.updateElStyle("update_el_style",...o[p]),this.$=o[p];break;case 69:_.updateRelStyle("update_rel_style",...o[p]),this.$=o[p];break;case 70:_.updateLayoutConfig("update_layout_config",...o[p]),this.$=o[p];break;case 71:this.$=[o[p]];break;case 72:o[p].unshift(o[p-1]),this.$=o[p];break;case 73:case 75:this.$=o[p].trim();break;case 74:let xt={};xt[o[p-1].trim()]=o[p].trim(),this.$=xt;break;case 76:this.$="";break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:e,23:s,24:a,26:u,28:i,29:49,30:61,32:62,34:n,36:l,37:r,38:h,39:y,40:f,41:b,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:st,64:rt,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft},{13:70,19:20,20:21,21:22,22:e,23:s,24:a,26:u,28:i,29:49,30:61,32:62,34:n,36:l,37:r,38:h,39:y,40:f,41:b,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:st,64:rt,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft},{13:71,19:20,20:21,21:22,22:e,23:s,24:a,26:u,28:i,29:49,30:61,32:62,34:n,36:l,37:r,38:h,39:y,40:f,41:b,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:st,64:rt,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft},{13:72,19:20,20:21,21:22,22:e,23:s,24:a,26:u,28:i,29:49,30:61,32:62,34:n,36:l,37:r,38:h,39:y,40:f,41:b,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:st,64:rt,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft},{13:73,19:20,20:21,21:22,22:e,23:s,24:a,26:u,28:i,29:49,30:61,32:62,34:n,36:l,37:r,38:h,39:y,40:f,41:b,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:st,64:rt,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft},{14:[1,74]},t(Tt,[2,13],{43:23,29:49,30:61,32:62,20:75,34:n,36:l,37:r,38:h,39:y,40:f,41:b,44:v,45:w,46:N,47:O,48:P,49:I,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:st,64:rt,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft}),t(Tt,[2,14]),t(Wt,[2,16],{12:[1,76]}),t(Tt,[2,36],{12:[1,77]}),t(Ot,[2,19]),t(Ot,[2,20]),{25:[1,78]},{27:[1,79]},t(Ot,[2,23]),{35:80,75:81,76:S,77:T,79:k,80:C},{35:86,75:81,76:S,77:T,79:k,80:C},{35:87,75:81,76:S,77:T,79:k,80:C},{35:88,75:81,76:S,77:T,79:k,80:C},{35:89,75:81,76:S,77:T,79:k,80:C},{35:90,75:81,76:S,77:T,79:k,80:C},{35:91,75:81,76:S,77:T,79:k,80:C},{35:92,75:81,76:S,77:T,79:k,80:C},{35:93,75:81,76:S,77:T,79:k,80:C},{35:94,75:81,76:S,77:T,79:k,80:C},{35:95,75:81,76:S,77:T,79:k,80:C},{35:96,75:81,76:S,77:T,79:k,80:C},{35:97,75:81,76:S,77:T,79:k,80:C},{35:98,75:81,76:S,77:T,79:k,80:C},{35:99,75:81,76:S,77:T,79:k,80:C},{35:100,75:81,76:S,77:T,79:k,80:C},{35:101,75:81,76:S,77:T,79:k,80:C},{35:102,75:81,76:S,77:T,79:k,80:C},{35:103,75:81,76:S,77:T,79:k,80:C},{35:104,75:81,76:S,77:T,79:k,80:C},t(R,[2,59]),{35:105,75:81,76:S,77:T,79:k,80:C},{35:106,75:81,76:S,77:T,79:k,80:C},{35:107,75:81,76:S,77:T,79:k,80:C},{35:108,75:81,76:S,77:T,79:k,80:C},{35:109,75:81,76:S,77:T,79:k,80:C},{35:110,75:81,76:S,77:T,79:k,80:C},{35:111,75:81,76:S,77:T,79:k,80:C},{35:112,75:81,76:S,77:T,79:k,80:C},{35:113,75:81,76:S,77:T,79:k,80:C},{35:114,75:81,76:S,77:T,79:k,80:C},{35:115,75:81,76:S,77:T,79:k,80:C},{20:116,29:49,30:61,32:62,34:n,36:l,37:r,38:h,39:y,40:f,41:b,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:st,64:rt,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft},{12:[1,118],33:[1,117]},{35:119,75:81,76:S,77:T,79:k,80:C},{35:120,75:81,76:S,77:T,79:k,80:C},{35:121,75:81,76:S,77:T,79:k,80:C},{35:122,75:81,76:S,77:T,79:k,80:C},{35:123,75:81,76:S,77:T,79:k,80:C},{35:124,75:81,76:S,77:T,79:k,80:C},{35:125,75:81,76:S,77:T,79:k,80:C},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},t(Tt,[2,15]),t(Wt,[2,17],{21:22,19:130,22:e,23:s,24:a,26:u,28:i}),t(Tt,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:e,23:s,24:a,26:u,28:i,34:n,36:l,37:r,38:h,39:y,40:f,41:b,44:v,45:w,46:N,47:O,48:P,49:I,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:st,64:rt,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft}),t(Ot,[2,21]),t(Ot,[2,22]),t(R,[2,39]),t(ie,[2,71],{75:81,35:132,76:S,77:T,79:k,80:C}),t(Mt,[2,73]),{78:[1,133]},t(Mt,[2,75]),t(Mt,[2,76]),t(R,[2,40]),t(R,[2,41]),t(R,[2,42]),t(R,[2,43]),t(R,[2,44]),t(R,[2,45]),t(R,[2,46]),t(R,[2,47]),t(R,[2,48]),t(R,[2,49]),t(R,[2,50]),t(R,[2,51]),t(R,[2,52]),t(R,[2,53]),t(R,[2,54]),t(R,[2,55]),t(R,[2,56]),t(R,[2,57]),t(R,[2,58]),t(R,[2,60]),t(R,[2,61]),t(R,[2,62]),t(R,[2,63]),t(R,[2,64]),t(R,[2,65]),t(R,[2,66]),t(R,[2,67]),t(R,[2,68]),t(R,[2,69]),t(R,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},t(mt,[2,28]),t(mt,[2,29]),t(mt,[2,30]),t(mt,[2,31]),t(mt,[2,32]),t(mt,[2,33]),t(mt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},t(Wt,[2,18]),t(Tt,[2,38]),t(ie,[2,72]),t(Mt,[2,74]),t(R,[2,24]),t(R,[2,35]),t(Xt,[2,25]),t(Xt,[2,26],{12:[1,138]}),t(Xt,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:d(function(g,x){if(x.recoverable)this.trace(g);else{var E=new Error(g);throw E.hash=x,E}},"parseError"),parse:d(function(g){var x=this,E=[0],_=[],D=[null],o=[],Pt=this.table,p="",xt=0,oe=0,Pe=2,le=1,De=o.slice.call(arguments,1),A=Object.create(this.lexer),vt={yy:{}};for(var Ht in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ht)&&(vt.yy[Ht]=this.yy[Ht]);A.setInput(g,vt.yy),vt.yy.lexer=A,vt.yy.parser=this,typeof A.yylloc>"u"&&(A.yylloc={});var Qt=A.yylloc;o.push(Qt);var Ne=A.options&&A.options.ranges;typeof vt.yy.parseError=="function"?this.parseError=vt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ae(B){E.length=E.length-2*B,D.length=D.length-B,o.length=o.length-B}d(Ae,"popStack");function ce(){var B;return B=_.pop()||A.lex()||le,typeof B!="number"&&(B instanceof Array&&(_=B,B=_.pop()),B=x.symbols_[B]||B),B}d(ce,"lex");for(var M,Et,V,Kt,kt={},Vt,j,ue,Yt;;){if(Et=E[E.length-1],this.defaultActions[Et]?V=this.defaultActions[Et]:((M===null||typeof M>"u")&&(M=ce()),V=Pt[Et]&&Pt[Et][M]),typeof V>"u"||!V.length||!V[0]){var Gt="";Yt=[];for(Vt in Pt[Et])this.terminals_[Vt]&&Vt>Pe&&Yt.push("'"+this.terminals_[Vt]+"'");A.showPosition?Gt="Parse error on line "+(xt+1)+`:
|
|
1
|
+
import{e as Le}from"./CZUDc12W.js";import{c6 as Ie,aK as Me,aL as Be,c7 as Ve,f as d,aO as wt,bC as he,a6 as Ye,u as Fe,W as Dt,cf as Ue,c2 as be,c3 as Jt,cA as je,a4 as $t,V as de}from"./CdT170lG.js";var Ut=(function(){var t=d(function(yt,g,x,E){for(x=x||{},E=yt.length;E--;x[yt[E]]=g);return x},"o"),e=[1,24],s=[1,25],a=[1,26],u=[1,27],i=[1,28],n=[1,63],l=[1,64],r=[1,65],h=[1,66],y=[1,67],f=[1,68],b=[1,69],v=[1,29],w=[1,30],N=[1,31],O=[1,32],P=[1,33],I=[1,34],W=[1,35],X=[1,36],q=[1,37],H=[1,38],Q=[1,39],K=[1,40],G=[1,41],J=[1,42],Z=[1,43],$=[1,44],tt=[1,45],et=[1,46],nt=[1,47],st=[1,48],rt=[1,50],at=[1,51],it=[1,52],ot=[1,53],lt=[1,54],ct=[1,55],ut=[1,56],ht=[1,57],dt=[1,58],pt=[1,59],ft=[1,60],Tt=[14,42],Wt=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Ot=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],S=[1,82],T=[1,83],k=[1,84],C=[1,85],R=[12,14,42],ie=[12,14,33,42],Mt=[12,14,33,42,76,77,79,80],mt=[12,33],Xt=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],qt={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:d(function(g,x,E,_,D,o,Pt){var p=o.length-1;switch(D){case 3:_.setDirection("TB");break;case 4:_.setDirection("BT");break;case 5:_.setDirection("RL");break;case 6:_.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:_.setC4Type(o[p-3]);break;case 19:_.setTitle(o[p].substring(6)),this.$=o[p].substring(6);break;case 20:_.setAccDescription(o[p].substring(15)),this.$=o[p].substring(15);break;case 21:this.$=o[p].trim(),_.setTitle(this.$);break;case 22:case 23:this.$=o[p].trim(),_.setAccDescription(this.$);break;case 28:o[p].splice(2,0,"ENTERPRISE"),_.addPersonOrSystemBoundary(...o[p]),this.$=o[p];break;case 29:o[p].splice(2,0,"SYSTEM"),_.addPersonOrSystemBoundary(...o[p]),this.$=o[p];break;case 30:_.addPersonOrSystemBoundary(...o[p]),this.$=o[p];break;case 31:o[p].splice(2,0,"CONTAINER"),_.addContainerBoundary(...o[p]),this.$=o[p];break;case 32:_.addDeploymentNode("node",...o[p]),this.$=o[p];break;case 33:_.addDeploymentNode("nodeL",...o[p]),this.$=o[p];break;case 34:_.addDeploymentNode("nodeR",...o[p]),this.$=o[p];break;case 35:_.popBoundaryParseStack();break;case 39:_.addPersonOrSystem("person",...o[p]),this.$=o[p];break;case 40:_.addPersonOrSystem("external_person",...o[p]),this.$=o[p];break;case 41:_.addPersonOrSystem("system",...o[p]),this.$=o[p];break;case 42:_.addPersonOrSystem("system_db",...o[p]),this.$=o[p];break;case 43:_.addPersonOrSystem("system_queue",...o[p]),this.$=o[p];break;case 44:_.addPersonOrSystem("external_system",...o[p]),this.$=o[p];break;case 45:_.addPersonOrSystem("external_system_db",...o[p]),this.$=o[p];break;case 46:_.addPersonOrSystem("external_system_queue",...o[p]),this.$=o[p];break;case 47:_.addContainer("container",...o[p]),this.$=o[p];break;case 48:_.addContainer("container_db",...o[p]),this.$=o[p];break;case 49:_.addContainer("container_queue",...o[p]),this.$=o[p];break;case 50:_.addContainer("external_container",...o[p]),this.$=o[p];break;case 51:_.addContainer("external_container_db",...o[p]),this.$=o[p];break;case 52:_.addContainer("external_container_queue",...o[p]),this.$=o[p];break;case 53:_.addComponent("component",...o[p]),this.$=o[p];break;case 54:_.addComponent("component_db",...o[p]),this.$=o[p];break;case 55:_.addComponent("component_queue",...o[p]),this.$=o[p];break;case 56:_.addComponent("external_component",...o[p]),this.$=o[p];break;case 57:_.addComponent("external_component_db",...o[p]),this.$=o[p];break;case 58:_.addComponent("external_component_queue",...o[p]),this.$=o[p];break;case 60:_.addRel("rel",...o[p]),this.$=o[p];break;case 61:_.addRel("birel",...o[p]),this.$=o[p];break;case 62:_.addRel("rel_u",...o[p]),this.$=o[p];break;case 63:_.addRel("rel_d",...o[p]),this.$=o[p];break;case 64:_.addRel("rel_l",...o[p]),this.$=o[p];break;case 65:_.addRel("rel_r",...o[p]),this.$=o[p];break;case 66:_.addRel("rel_b",...o[p]),this.$=o[p];break;case 67:o[p].splice(0,1),_.addRel("rel",...o[p]),this.$=o[p];break;case 68:_.updateElStyle("update_el_style",...o[p]),this.$=o[p];break;case 69:_.updateRelStyle("update_rel_style",...o[p]),this.$=o[p];break;case 70:_.updateLayoutConfig("update_layout_config",...o[p]),this.$=o[p];break;case 71:this.$=[o[p]];break;case 72:o[p].unshift(o[p-1]),this.$=o[p];break;case 73:case 75:this.$=o[p].trim();break;case 74:let xt={};xt[o[p-1].trim()]=o[p].trim(),this.$=xt;break;case 76:this.$="";break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:e,23:s,24:a,26:u,28:i,29:49,30:61,32:62,34:n,36:l,37:r,38:h,39:y,40:f,41:b,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:st,64:rt,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft},{13:70,19:20,20:21,21:22,22:e,23:s,24:a,26:u,28:i,29:49,30:61,32:62,34:n,36:l,37:r,38:h,39:y,40:f,41:b,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:st,64:rt,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft},{13:71,19:20,20:21,21:22,22:e,23:s,24:a,26:u,28:i,29:49,30:61,32:62,34:n,36:l,37:r,38:h,39:y,40:f,41:b,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:st,64:rt,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft},{13:72,19:20,20:21,21:22,22:e,23:s,24:a,26:u,28:i,29:49,30:61,32:62,34:n,36:l,37:r,38:h,39:y,40:f,41:b,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:st,64:rt,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft},{13:73,19:20,20:21,21:22,22:e,23:s,24:a,26:u,28:i,29:49,30:61,32:62,34:n,36:l,37:r,38:h,39:y,40:f,41:b,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:st,64:rt,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft},{14:[1,74]},t(Tt,[2,13],{43:23,29:49,30:61,32:62,20:75,34:n,36:l,37:r,38:h,39:y,40:f,41:b,44:v,45:w,46:N,47:O,48:P,49:I,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:st,64:rt,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft}),t(Tt,[2,14]),t(Wt,[2,16],{12:[1,76]}),t(Tt,[2,36],{12:[1,77]}),t(Ot,[2,19]),t(Ot,[2,20]),{25:[1,78]},{27:[1,79]},t(Ot,[2,23]),{35:80,75:81,76:S,77:T,79:k,80:C},{35:86,75:81,76:S,77:T,79:k,80:C},{35:87,75:81,76:S,77:T,79:k,80:C},{35:88,75:81,76:S,77:T,79:k,80:C},{35:89,75:81,76:S,77:T,79:k,80:C},{35:90,75:81,76:S,77:T,79:k,80:C},{35:91,75:81,76:S,77:T,79:k,80:C},{35:92,75:81,76:S,77:T,79:k,80:C},{35:93,75:81,76:S,77:T,79:k,80:C},{35:94,75:81,76:S,77:T,79:k,80:C},{35:95,75:81,76:S,77:T,79:k,80:C},{35:96,75:81,76:S,77:T,79:k,80:C},{35:97,75:81,76:S,77:T,79:k,80:C},{35:98,75:81,76:S,77:T,79:k,80:C},{35:99,75:81,76:S,77:T,79:k,80:C},{35:100,75:81,76:S,77:T,79:k,80:C},{35:101,75:81,76:S,77:T,79:k,80:C},{35:102,75:81,76:S,77:T,79:k,80:C},{35:103,75:81,76:S,77:T,79:k,80:C},{35:104,75:81,76:S,77:T,79:k,80:C},t(R,[2,59]),{35:105,75:81,76:S,77:T,79:k,80:C},{35:106,75:81,76:S,77:T,79:k,80:C},{35:107,75:81,76:S,77:T,79:k,80:C},{35:108,75:81,76:S,77:T,79:k,80:C},{35:109,75:81,76:S,77:T,79:k,80:C},{35:110,75:81,76:S,77:T,79:k,80:C},{35:111,75:81,76:S,77:T,79:k,80:C},{35:112,75:81,76:S,77:T,79:k,80:C},{35:113,75:81,76:S,77:T,79:k,80:C},{35:114,75:81,76:S,77:T,79:k,80:C},{35:115,75:81,76:S,77:T,79:k,80:C},{20:116,29:49,30:61,32:62,34:n,36:l,37:r,38:h,39:y,40:f,41:b,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:st,64:rt,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft},{12:[1,118],33:[1,117]},{35:119,75:81,76:S,77:T,79:k,80:C},{35:120,75:81,76:S,77:T,79:k,80:C},{35:121,75:81,76:S,77:T,79:k,80:C},{35:122,75:81,76:S,77:T,79:k,80:C},{35:123,75:81,76:S,77:T,79:k,80:C},{35:124,75:81,76:S,77:T,79:k,80:C},{35:125,75:81,76:S,77:T,79:k,80:C},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},t(Tt,[2,15]),t(Wt,[2,17],{21:22,19:130,22:e,23:s,24:a,26:u,28:i}),t(Tt,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:e,23:s,24:a,26:u,28:i,34:n,36:l,37:r,38:h,39:y,40:f,41:b,44:v,45:w,46:N,47:O,48:P,49:I,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:st,64:rt,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft}),t(Ot,[2,21]),t(Ot,[2,22]),t(R,[2,39]),t(ie,[2,71],{75:81,35:132,76:S,77:T,79:k,80:C}),t(Mt,[2,73]),{78:[1,133]},t(Mt,[2,75]),t(Mt,[2,76]),t(R,[2,40]),t(R,[2,41]),t(R,[2,42]),t(R,[2,43]),t(R,[2,44]),t(R,[2,45]),t(R,[2,46]),t(R,[2,47]),t(R,[2,48]),t(R,[2,49]),t(R,[2,50]),t(R,[2,51]),t(R,[2,52]),t(R,[2,53]),t(R,[2,54]),t(R,[2,55]),t(R,[2,56]),t(R,[2,57]),t(R,[2,58]),t(R,[2,60]),t(R,[2,61]),t(R,[2,62]),t(R,[2,63]),t(R,[2,64]),t(R,[2,65]),t(R,[2,66]),t(R,[2,67]),t(R,[2,68]),t(R,[2,69]),t(R,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},t(mt,[2,28]),t(mt,[2,29]),t(mt,[2,30]),t(mt,[2,31]),t(mt,[2,32]),t(mt,[2,33]),t(mt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},t(Wt,[2,18]),t(Tt,[2,38]),t(ie,[2,72]),t(Mt,[2,74]),t(R,[2,24]),t(R,[2,35]),t(Xt,[2,25]),t(Xt,[2,26],{12:[1,138]}),t(Xt,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:d(function(g,x){if(x.recoverable)this.trace(g);else{var E=new Error(g);throw E.hash=x,E}},"parseError"),parse:d(function(g){var x=this,E=[0],_=[],D=[null],o=[],Pt=this.table,p="",xt=0,oe=0,Pe=2,le=1,De=o.slice.call(arguments,1),A=Object.create(this.lexer),vt={yy:{}};for(var Ht in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ht)&&(vt.yy[Ht]=this.yy[Ht]);A.setInput(g,vt.yy),vt.yy.lexer=A,vt.yy.parser=this,typeof A.yylloc>"u"&&(A.yylloc={});var Qt=A.yylloc;o.push(Qt);var Ne=A.options&&A.options.ranges;typeof vt.yy.parseError=="function"?this.parseError=vt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ae(B){E.length=E.length-2*B,D.length=D.length-B,o.length=o.length-B}d(Ae,"popStack");function ce(){var B;return B=_.pop()||A.lex()||le,typeof B!="number"&&(B instanceof Array&&(_=B,B=_.pop()),B=x.symbols_[B]||B),B}d(ce,"lex");for(var M,Et,V,Kt,kt={},Vt,j,ue,Yt;;){if(Et=E[E.length-1],this.defaultActions[Et]?V=this.defaultActions[Et]:((M===null||typeof M>"u")&&(M=ce()),V=Pt[Et]&&Pt[Et][M]),typeof V>"u"||!V.length||!V[0]){var Gt="";Yt=[];for(Vt in Pt[Et])this.terminals_[Vt]&&Vt>Pe&&Yt.push("'"+this.terminals_[Vt]+"'");A.showPosition?Gt="Parse error on line "+(xt+1)+`:
|
|
2
2
|
`+A.showPosition()+`
|
|
3
3
|
Expecting `+Yt.join(", ")+", got '"+(this.terminals_[M]||M)+"'":Gt="Parse error on line "+(xt+1)+": Unexpected "+(M==le?"end of input":"'"+(this.terminals_[M]||M)+"'"),this.parseError(Gt,{text:A.match,token:this.terminals_[M]||M,line:A.yylineno,loc:Qt,expected:Yt})}if(V[0]instanceof Array&&V.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Et+", token: "+M);switch(V[0]){case 1:E.push(M),D.push(A.yytext),o.push(A.yylloc),E.push(V[1]),M=null,oe=A.yyleng,p=A.yytext,xt=A.yylineno,Qt=A.yylloc;break;case 2:if(j=this.productions_[V[1]][1],kt.$=D[D.length-j],kt._$={first_line:o[o.length-(j||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(j||1)].first_column,last_column:o[o.length-1].last_column},Ne&&(kt._$.range=[o[o.length-(j||1)].range[0],o[o.length-1].range[1]]),Kt=this.performAction.apply(kt,[p,oe,xt,vt.yy,V[1],D,o].concat(De)),typeof Kt<"u")return Kt;j&&(E=E.slice(0,-1*j*2),D=D.slice(0,-1*j),o=o.slice(0,-1*j)),E.push(this.productions_[V[1]][0]),D.push(kt.$),o.push(kt._$),ue=Pt[E[E.length-2]][E[E.length-1]],E.push(ue);break;case 3:return!0}}return!0},"parse")},Oe=(function(){var yt={EOF:1,parseError:d(function(x,E){if(this.yy.parser)this.yy.parser.parseError(x,E);else throw new Error(x)},"parseError"),setInput:d(function(g,x){return this.yy=x||this.yy||{},this._input=g,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:d(function(){var g=this._input[0];this.yytext+=g,this.yyleng++,this.offset++,this.match+=g,this.matched+=g;var x=g.match(/(?:\r\n?|\n).*/g);return x?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),g},"input"),unput:d(function(g){var x=g.length,E=g.split(/(?:\r\n?|\n)/g);this._input=g+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-x),this.offset-=x;var _=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),E.length-1&&(this.yylineno-=E.length-1);var D=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:E?(E.length===_.length?this.yylloc.first_column:0)+_[_.length-E.length].length-E[0].length:this.yylloc.first_column-x},this.options.ranges&&(this.yylloc.range=[D[0],D[0]+this.yyleng-x]),this.yyleng=this.yytext.length,this},"unput"),more:d(function(){return this._more=!0,this},"more"),reject:d(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:d(function(g){this.unput(this.match.slice(g))},"less"),pastInput:d(function(){var g=this.matched.substr(0,this.matched.length-this.match.length);return(g.length>20?"...":"")+g.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:d(function(){var g=this.match;return g.length<20&&(g+=this._input.substr(0,20-g.length)),(g.substr(0,20)+(g.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:d(function(){var g=this.pastInput(),x=new Array(g.length+1).join("-");return g+this.upcomingInput()+`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as Xt}from"./
|
|
1
|
+
import{g as Xt}from"./C8xd2WWY.js";import{g as Qt}from"./c0MObYhr.js";import{s as Zt}from"./Btdv9Hrh.js";import{f as k,aZ as Jt,c8 as Mt,bC as $,aO as ke,aS as $t,bZ as e1,cx as rt,c7 as t1,c6 as s1,c9 as i1,aL as r1,aK as a1,aP as n1,a4 as u1,bB as o1,J as l1,bw as c1,aQ as st,c3 as it,a0 as h1,aw as d1,c0 as p1}from"./CdT170lG.js";import{c as f1}from"./CZUDc12W.js";import{aI as g1}from"./t61BPD62.js";import{c as b1}from"./B4kKZm1B.js";var A1="flowchart-",Pe,k1=(Pe=class{constructor(){this.vertexCounter=0,this.config=ke(),this.diagramId="",this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=t1,this.setAccDescription=s1,this.setDiagramTitle=i1,this.getAccTitle=r1,this.getAccDescription=a1,this.getDiagramTitle=n1,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}sanitizeText(i){return u1.sanitizeText(i,this.config)}sanitizeNodeLabelType(i){switch(i){case"markdown":case"string":case"text":return i;default:return"markdown"}}setDiagramId(i){this.diagramId=i}lookUpDomId(i){for(const r of this.vertices.values())if(r.id===i)return this.diagramId?`${this.diagramId}-${r.domId}`:r.domId;return this.diagramId?`${this.diagramId}-${i}`:i}addVertex(i,r,a,n,c,g,l={},m){if(!i||i.trim().length===0)return;let p;if(m!==void 0){let u;m.includes(`
|
|
2
2
|
`)?u=m+`
|
|
3
3
|
`:u=`{
|
|
4
4
|
`+m+`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a7 as a,co as M,n as j}from"./
|
|
1
|
+
import{a7 as a,co as M,n as j}from"./CdT170lG.js";function k(r,u){return u<r?-1:u>r?1:u>=r?0:NaN}function q(r){return r}function B(){var r=q,u=k,s=null,p=a(0),m=a(M),h=a(0);function t(n){var e,l=(n=j(n)).length,f,w,y=0,g=new Array(l),i=new Array(l),c=+p.apply(this,arguments),A=Math.min(M,Math.max(-M,m.apply(this,arguments)-c)),d,N=Math.min(Math.abs(A)/l,h.apply(this,arguments)),V=N*(A<0?-1:1),o;for(e=0;e<l;++e)(o=i[g[e]=e]=+r(n[e],e,n))>0&&(y+=o);for(u!=null?g.sort(function(v,x){return u(i[v],i[x])}):s!=null&&g.sort(function(v,x){return s(n[v],n[x])}),e=0,w=y?(A-l*V)/y:0;e<l;++e,c=d)f=g[e],o=i[f],d=c+(o>0?o*w:0)+V,i[f]={data:n[f],index:e,value:o,startAngle:c,endAngle:d,padAngle:N};return i}return t.value=function(n){return arguments.length?(r=typeof n=="function"?n:a(+n),t):r},t.sortValues=function(n){return arguments.length?(u=n,s=null,t):u},t.sort=function(n){return arguments.length?(s=n,u=null,t):s},t.startAngle=function(n){return arguments.length?(p=typeof n=="function"?n:a(+n),t):p},t.endAngle=function(n){return arguments.length?(m=typeof n=="function"?n:a(+n),t):m},t.padAngle=function(n){return arguments.length?(h=typeof n=="function"?n:a(+n),t):h},t}export{B as d};
|