@intent-hq/web 2.342.8 → 2.342.9
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/{B_gooRw3.js → 3yZfNPAV.js} +1 -1
- package/web/app/immutable/chunks/{Dfs3_YYJ.js → 7IhreKLs.js} +1 -1
- package/web/app/immutable/chunks/{CfcPGi-s.js → 9THCFi9r.js} +3 -3
- package/web/app/immutable/chunks/{DE1Y_Mqg.js → AiziHZdW.js} +1 -1
- package/web/app/immutable/chunks/{hPM-hpF1.js → B0KDOtDn.js} +1 -1
- package/web/app/immutable/chunks/{Db9BDdTM.js → B31Fv1Yf.js} +1 -1
- package/web/app/immutable/chunks/{DorrRHA9.js → B5auOEHx.js} +1 -1
- package/web/app/immutable/chunks/{Zz2ufh_s.js → B5woGrCE.js} +1 -1
- package/web/app/immutable/chunks/{BlJpnECK.js → B6BcD4WH.js} +3 -3
- package/web/app/immutable/chunks/{CVoHD481.js → B86KwyUY.js} +1 -1
- package/web/app/immutable/chunks/{BZRAoPBg.js → BA0Siouo.js} +1 -1
- package/web/app/immutable/chunks/{DtsUKbfD.js → BDrbb5ru.js} +1 -1
- package/web/app/immutable/chunks/{Cn2QoVqR.js → BEBrrrrG.js} +4 -4
- package/web/app/immutable/chunks/{DKyOFl-H.js → BELLt3Rp.js} +1 -1
- package/web/app/immutable/chunks/{C6ijr8RP.js → BG0i-ahv.js} +1 -1
- package/web/app/immutable/chunks/{DARBmEKl.js → BHTZ1IpN.js} +1 -1
- package/web/app/immutable/chunks/{W4n-ioby.js → BHjzQO3e.js} +1 -1
- package/web/app/immutable/chunks/{D8kRzVzM.js → BI90DWW0.js} +3 -3
- package/web/app/immutable/chunks/{BM2TfFMT.js → BNArlfIr.js} +1 -1
- package/web/app/immutable/chunks/{BTRr_gVO.js → BNhy_oid.js} +4 -4
- package/web/app/immutable/chunks/{hC1Rd2xp.js → BOiWTqMG.js} +1 -1
- package/web/app/immutable/chunks/{8dcwmYMD.js → BOv-t-JT.js} +1 -1
- package/web/app/immutable/chunks/{DksiAt8J.js → BPODOVgS.js} +1 -1
- package/web/app/immutable/chunks/{CPNo3Wxe.js → BPeBH6AO.js} +1 -1
- package/web/app/immutable/chunks/{DGLoeWwC.js → BWYkpaSu.js} +1 -1
- package/web/app/immutable/chunks/{C_YySiHw.js → BXBFDj7S.js} +1 -1
- package/web/app/immutable/chunks/{H1fgmcwF.js → BXPT2uA9.js} +1 -1
- package/web/app/immutable/chunks/{DBwzp-5d.js → BY7eZNdx.js} +1 -1
- package/web/app/immutable/chunks/{DP9aVWvY.js → BZUf-Anc.js} +2 -2
- package/web/app/immutable/chunks/{B87Opa04.js → BdmYNLCp.js} +1 -1
- package/web/app/immutable/chunks/{Br4sh5Vb.js → BfHEUs_v.js} +1 -1
- package/web/app/immutable/chunks/{BVX8qLeE.js → BfwQblTp.js} +1 -1
- package/web/app/immutable/chunks/{BGKHyW3m.js → BiGxny7G.js} +1 -1
- package/web/app/immutable/chunks/{DCWQ8q2B.js → Bj3kdllZ.js} +1 -1
- package/web/app/immutable/chunks/{eqoPYRQw.js → Bkvq66cQ.js} +1 -1
- package/web/app/immutable/chunks/{-2bHDplp.js → BpMTYOh3.js} +1 -1
- package/web/app/immutable/chunks/{zFLt0HSh.js → BtCmVuwg.js} +1 -1
- package/web/app/immutable/chunks/{h1qD8ry7.js → BvsfRyvB.js} +1 -1
- package/web/app/immutable/chunks/{CbGy5L3Y.js → ByWN0UP2.js} +1 -1
- package/web/app/immutable/chunks/{m-4S75UZ.js → C-0t79mD.js} +1 -1
- package/web/app/immutable/chunks/{DUMC5ag4.js → C5jKDcPw.js} +1 -1
- package/web/app/immutable/chunks/{BAr6DP2S.js → C6-_Dbfv.js} +1 -1
- package/web/app/immutable/chunks/{CwkZa8IK.js → CBCPUMw2.js} +1 -1
- package/web/app/immutable/chunks/{0tj_yJAd.js → CBOkoV02.js} +1 -1
- package/web/app/immutable/chunks/{BHOPo_9A.js → CBvV4T1N.js} +1 -1
- package/web/app/immutable/chunks/{BhR1rUz4.js → CCC99Zod.js} +4 -4
- package/web/app/immutable/chunks/{DAy_opbr.js → CE_jWS3I.js} +1 -1
- package/web/app/immutable/chunks/{DWfKl2G1.js → CFqvncb_.js} +2 -2
- package/web/app/immutable/chunks/{CK9cQMVJ.js → CImtZPCw.js} +1 -1
- package/web/app/immutable/chunks/{CVWq5h5S.js → CJ1-3935.js} +1 -1
- package/web/app/immutable/chunks/{DQJZrn_X.js → CNKWrPN7.js} +1 -1
- package/web/app/immutable/chunks/{CUfXGQXK.js → CPRLdguD.js} +1 -1
- package/web/app/immutable/chunks/{CqOHERUX.js → CQiPhdyr.js} +3 -3
- package/web/app/immutable/chunks/{BOhFt8_6.js → CRlyIql5.js} +1 -1
- package/web/app/immutable/chunks/{DSWsYH8C.js → CVNbeyq9.js} +1 -1
- package/web/app/immutable/chunks/{TudrisM3.js → CVwikJ31.js} +1 -1
- package/web/app/immutable/chunks/{BQ-M1wvC.js → CXVnrj9A.js} +1 -1
- package/web/app/immutable/chunks/{D3bgZo3Z.js → CXnaNNAz.js} +2 -2
- package/web/app/immutable/chunks/{Pvi3xCgN.js → C_UMz1vS.js} +1 -1
- package/web/app/immutable/chunks/{DODWySkx.js → C_d0eb1I.js} +1 -1
- package/web/app/immutable/chunks/{DzBSnte5.js → CbqyU6-T.js} +1 -1
- package/web/app/immutable/chunks/{B5QVp6A0.js → CcClhJcG.js} +1 -1
- package/web/app/immutable/chunks/{Db-yEKas.js → CcPfbTb9.js} +1 -1
- package/web/app/immutable/chunks/{Cj0F5ihH.js → CdSjG4Ft.js} +1 -1
- package/web/app/immutable/chunks/{D1Ne8i3Y.js → Ch6ugyQo.js} +1 -1
- package/web/app/immutable/chunks/{DiLL3u8G.js → Ci2Fkl9H.js} +1 -1
- package/web/app/immutable/chunks/{CYrZeetF.js → CiFAN3wQ.js} +1 -1
- package/web/app/immutable/chunks/{CCguRiXg.js → Ckk7lRpt.js} +1 -1
- package/web/app/immutable/chunks/{BqUo6Ktu.js → CmdEd1F6.js} +2 -2
- package/web/app/immutable/chunks/{8_7J_rxm.js → CnQmqlSe.js} +1 -1
- package/web/app/immutable/chunks/{CEQ56sKb.js → CoDZl2Cl.js} +1 -1
- package/web/app/immutable/chunks/{Dm9UWIDS.js → CpHRT1fG.js} +1 -1
- package/web/app/immutable/chunks/{B_FQfWfg.js → CsKhIDbI.js} +1 -1
- package/web/app/immutable/chunks/{eHnFo4lI.js → Cyenk5cb.js} +1 -1
- package/web/app/immutable/chunks/{DbaSDcEd.js → D-eZQ2fL.js} +1 -1
- package/web/app/immutable/chunks/{DbZTkkyC.js → D1-WBdny.js} +1 -1
- package/web/app/immutable/chunks/{B6UkjkkG.js → D1l0bxRT.js} +1 -1
- package/web/app/immutable/chunks/{olZe0-nS.js → D5ML4v-V.js} +1 -1
- package/web/app/immutable/chunks/{DqyPPCyO.js → D6jCr2wa.js} +2 -2
- package/web/app/immutable/chunks/{CxR88OSV.js → D7lKnGLc.js} +1 -1
- package/web/app/immutable/chunks/{B82-1O1e.js → D8fRnm9t.js} +1 -1
- package/web/app/immutable/chunks/{BbpzcJJv.js → DEbw1igk.js} +1 -1
- package/web/app/immutable/chunks/{3_J6fjhO.js → DGifkN9t.js} +1 -1
- package/web/app/immutable/chunks/{Cnv943xM.js → DHPGgtRx.js} +1 -1
- package/web/app/immutable/chunks/{BYR3hbm1.js → DKOo5zOB.js} +1 -1
- package/web/app/immutable/chunks/{DPULIKQk.js → DMJnM_nO.js} +1 -1
- package/web/app/immutable/chunks/{CSVFP6Jt.js → DNSk3ZfB.js} +1 -1
- package/web/app/immutable/chunks/{D6AnRuxJ.js → DN_Tzm7_.js} +1 -1
- package/web/app/immutable/chunks/{TpcWfRK3.js → DNac-m4q.js} +1 -1
- package/web/app/immutable/chunks/{l0-9ftmB.js → DTgS9Vhe.js} +1 -1
- package/web/app/immutable/chunks/{ob_UjBCd.js → DaOHTC-I.js} +2 -2
- package/web/app/immutable/chunks/{D_cxHEqU.js → DcSsc00x.js} +12 -12
- package/web/app/immutable/chunks/{72kV58Ql.js → DcXakdBe.js} +2 -2
- package/web/app/immutable/chunks/{762lAjev.js → DiI1RDM1.js} +6 -6
- package/web/app/immutable/chunks/{BXtYtFFm.js → DjjF2uGN.js} +1 -1
- package/web/app/immutable/chunks/{DTQGk7-p.js → DjuIGdjm.js} +1 -1
- package/web/app/immutable/chunks/{CVimJ6Rz.js → Dk3qKWP5.js} +1 -1
- package/web/app/immutable/chunks/{CEcvV5G3.js → DkHudGT7.js} +1 -1
- package/web/app/immutable/chunks/{BI40CZU_.js → DmHO_MSD.js} +1 -1
- package/web/app/immutable/chunks/{QroQeT1R.js → DspxmVwU.js} +1 -1
- package/web/app/immutable/chunks/{C62uwcSa.js → DuiaDZ1M.js} +1 -1
- package/web/app/immutable/chunks/{CsZ8CKOb.js → DxqPF6Rz.js} +1 -1
- package/web/app/immutable/chunks/{DdjKmyFb.js → DyqIj-ur.js} +1 -1
- package/web/app/immutable/chunks/{DdroO4BP.js → H9GSzKkU.js} +1 -1
- package/web/app/immutable/chunks/{DZIpsGdM.js → ImTraP8T.js} +1 -1
- package/web/app/immutable/chunks/{CdwWwIxc.js → IumZO_Dv.js} +1 -1
- package/web/app/immutable/chunks/{B0Eu_1Zr.js → J9A0UoBg.js} +1 -1
- package/web/app/immutable/chunks/{NAs2sQwc.js → MZSjdLi7.js} +1 -1
- package/web/app/immutable/chunks/{BYOZsc06.js → PvZaDjMJ.js} +1 -1
- package/web/app/immutable/chunks/{ChCEEi91.js → QGJb4cQl.js} +2 -2
- package/web/app/immutable/chunks/{CiJxgZE6.js → VZ9l83jo.js} +1 -1
- package/web/app/immutable/chunks/{b6oXDh_T.js → X6Xuy0au.js} +3 -3
- package/web/app/immutable/chunks/{CqAUygYd.js → XZbbHW_j.js} +1 -1
- package/web/app/immutable/chunks/{Crf8zlEl.js → YxdkHijX.js} +1 -1
- package/web/app/immutable/chunks/{BKZOB6N7.js → eUgSKPd1.js} +1 -1
- package/web/app/immutable/chunks/{C_MoDXbz.js → h4Po-NCE.js} +1 -1
- package/web/app/immutable/chunks/{Dnnm3rWT.js → jiBDEVCw.js} +1 -1
- package/web/app/immutable/chunks/{CZ4naQ1D.js → mD0vYAzJ.js} +1 -1
- package/web/app/immutable/chunks/{CVnjH67L.js → mHC4yU51.js} +1 -1
- package/web/app/immutable/chunks/{teiHBTP_.js → rt8w-zGI.js} +1 -1
- package/web/app/immutable/chunks/{BbiotSng.js → uVMl5RuS.js} +1 -1
- package/web/app/immutable/chunks/{BKrFdF0K.js → v9HJJtBT.js} +1 -1
- package/web/app/immutable/chunks/{DUfPBqyv.js → zhwpGmcn.js} +1 -1
- package/web/app/immutable/chunks/{Bip3iRY7.js → zrO2ZdKm.js} +4 -4
- package/web/app/immutable/entry/{app.PZ5Y9PBf.js → app.9q3h-VmL.js} +2 -2
- package/web/app/immutable/entry/start.C19LftfI.js +1 -0
- package/web/app/immutable/nodes/{0.NhRN4wpn.js → 0.BlKCxlmB.js} +1 -1
- package/web/app/immutable/nodes/{1.rxmnWftv.js → 1.xcsha6lZ.js} +1 -1
- package/web/app/immutable/nodes/{10.B5uqPVYd.js → 10.Bdyn6cmH.js} +1 -1
- package/web/app/immutable/nodes/{14.BNz2Qn0-.js → 14.CbltyVov.js} +1 -1
- package/web/app/immutable/nodes/{17.DmFoGT2O.js → 17.D1kH34dL.js} +2 -2
- package/web/app/immutable/nodes/{2.BewlISWX.js → 2.CuUzplWd.js} +4 -4
- package/web/app/immutable/nodes/{3.Dh75TGTq.js → 3.T7kzKVL0.js} +1 -1
- package/web/app/immutable/nodes/{4.D_lzUIO2.js → 4.C10VOSMQ.js} +1 -1
- package/web/app/immutable/nodes/{5.D-mFbexK.js → 5.ByeolYXZ.js} +1 -1
- package/web/app/immutable/nodes/{6.Cgb9LGMD.js → 6.nObHzXZU.js} +1 -1
- package/web/app/immutable/nodes/{7.CEKTuRJF.js → 7.Bl2k4MpH.js} +1 -1
- package/web/app/immutable/nodes/{8.Dwn9d0dT.js → 8.DSmE4IYY.js} +4 -4
- package/web/app/immutable/nodes/{9.JcoFlsdV.js → 9.BdgVRpr5.js} +4 -4
- package/web/app/version.json +1 -1
- package/web/index.html +9 -9
- package/web/app/immutable/entry/start.BY0gUtqa.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/
|
|
2
|
-
import{bp as v,t as Bt,br as y,a_ as D,bz as Ft,b as zt,bs as Qf,bv as bt,bt as ga,bu as el,b7 as Nl,bm as $f,ba as ep,bl as tp,bb as rp,bn as np,a$ as ap,b9 as sp,b8 as op,b2 as ip,bf as lp,bg as cp,bk as dp,be as up,bo as fp,b0 as pp,b4 as gp,bi as vp,bh as mp,b6 as hp,b5 as bp,b3 as yp,bd as _p,bc as xp,bj as wp,b1 as kp,_ as Ip}from"./DXyyWeag.js";import{bI as Sp,bj as eo,aG as Cp,bs as Ht,aD as e,a5 as S,bS as m,bA as w,W as u,bn as jt,c9 as d,aA as _,a7 as kt,ay as je,be as tr,b$ as Tt,aC as Ha,bl as M,b_ as k,bO as x,aB as I,bo as Rs,ca as wt,bH as A,bV as ye,br as Gr,bk as to,c0 as ca,ai as es,cd as Is,aw as Rn,a as Ep,aj as Rr,c7 as Pp,c6 as Ll,c5 as Mn,bf as So,bz as Id}from"./DYhIMPy1.js";import{G as Es,I as Ap,z as Tp}from"./DyvrH0mm.js";import{o as Rp,i as Mp,u as re,g as Un,w as Nn,l as In,j as ir,v as gt,I as ro,n as Rt,p as Tr,q as Np,s as Lp,m as Op,x as Dp}from"./CjaOLL1c.js";import{s as un}from"./Cuqq8bL5.js";import{c as Qr}from"./CnVt0JNG.js";import{I as Si,t as nr,n as Bp,i as Ol,u as Dl}from"./BboIV5H5.js";import{b as pr}from"./BaIAhI85.js";import{i as Sd,bv as Cd,cM as Ed,dG as Fp,ds as zp,ax as Hp,cv as jp,a2 as Wp,cS as Up,dr as qs,aC as Bo,c3 as qp,I as Vp,a as Kp,a0 as Bl,cY as Gp,bT as Jp,M as Yp,dm as Xp,W as Zp,dx as Qp,af as $p,cP as eg,at as tg,g as rg,u as ng}from"./D3QcPFoL.js";import{c as ag}from"./D-62MVd3.js";import{k as da,w as sg,C as Pd,c as og,R as ig}from"./DT4bpJWb.js";import{f as yt,ap as ws,ai as lg,am as Ci,bc as cg}from"./Bfr1QjPr.js";import{ar as dg,ae as Fl,a0 as ug,aI as fg,af as pg,h as gg,ag as vg,a$ as mg,I as hg,R as bg,ax as yg,ak as _g,a1 as xg,a as zl,az as wg,s as kg,n as Ig,b5 as Sg,m as Cg,b7 as Ei,A as Hl,aj as Eg,b6 as Pg,at as Ad,T as Td,a9 as Ag,a7 as jl,W as Tg,V as Rg,ad as Mg,a8 as Ng,L as Wl,ay as Lg}from"./
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/CXnaNNAz.js","/app/immutable/chunks/DYhIMPy1.js","/app/immutable/chunks/DXyyWeag.js","/app/immutable/chunks/Cuqq8bL5.js","/app/immutable/chunks/B5m4HK_m.js","/app/immutable/chunks/BboIV5H5.js","/app/immutable/chunks/CjaOLL1c.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/D5ej8a-y.js","/app/immutable/chunks/WFvSJ9zU.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/ppRpwazH.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/chunks/DyvrH0mm.js","/app/immutable/chunks/BaIAhI85.js","/app/immutable/chunks/Bfr1QjPr.js","/app/immutable/chunks/CnVt0JNG.js","/app/immutable/chunks/BybfkKTj.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/ChOlbK8y.js","/app/immutable/chunks/Co9PgWQA.js","/app/immutable/chunks/CX_KiszT.js","/app/immutable/chunks/4NMrKcis.js","/app/immutable/chunks/BTdkHPOB.js","/app/immutable/chunks/D6bHtnlF.js","/app/immutable/assets/menu-footer.Ck5GCpgU.css","/app/immutable/chunks/DfxQWSVU.js","/app/immutable/chunks/Dwmx7Nbz.js","/app/immutable/assets/dialog.BtQTVchw.css","/app/immutable/chunks/BsieX9dN.js","/app/immutable/assets/observe-overflow.CbDLK6fN.css","/app/immutable/chunks/BtId34lw.js","/app/immutable/chunks/C5oPUaEZ.js","/app/immutable/chunks/BKnW-cqy.js","/app/immutable/chunks/XJv96NUg.js","/app/immutable/assets/confirm.UE5obH5A.css","/app/immutable/chunks/BWYr8u9e.js","/app/immutable/chunks/BeP4UORy.js","/app/immutable/chunks/B0gQeWRk.js","/app/immutable/chunks/DJkHth-B.js","/app/immutable/assets/SettingsPage.D8u26cHZ.css","/app/immutable/chunks/D-hrwg9Y.js","/app/immutable/chunks/2YGlULfT.js","/app/immutable/chunks/CC7to1B5.js","/app/immutable/chunks/DT4bpJWb.js","/app/immutable/assets/notify.BeL_JB6L.css","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/B0KDOtDn.js","/app/immutable/chunks/D3QcPFoL.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/DEYvT_CO.js","/app/immutable/chunks/RD9QY1Yc.js","/app/immutable/chunks/DogedYC1.js","/app/immutable/chunks/CRsmjbca.js","/app/immutable/chunks/DHQOuksI.js","/app/immutable/chunks/DNBv5HWD.js","/app/immutable/chunks/BvFAWM27.js","/app/immutable/chunks/BZUf-Anc.js","/app/immutable/chunks/DN_Tzm7_.js","/app/immutable/chunks/DiI1RDM1.js","/app/immutable/chunks/Cyenk5cb.js","/app/immutable/chunks/B0Z-1lwJ.js","/app/immutable/chunks/mD0vYAzJ.js","/app/immutable/assets/directory-picker-service.CzNEA6Ot.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{bp as v,t as Bt,br as y,a_ as D,bz as Ft,b as zt,bs as Qf,bv as bt,bt as ga,bu as el,b7 as Nl,bm as $f,ba as ep,bl as tp,bb as rp,bn as np,a$ as ap,b9 as sp,b8 as op,b2 as ip,bf as lp,bg as cp,bk as dp,be as up,bo as fp,b0 as pp,b4 as gp,bi as vp,bh as mp,b6 as hp,b5 as bp,b3 as yp,bd as _p,bc as xp,bj as wp,b1 as kp,_ as Ip}from"./DXyyWeag.js";import{bI as Sp,bj as eo,aG as Cp,bs as Ht,aD as e,a5 as S,bS as m,bA as w,W as u,bn as jt,c9 as d,aA as _,a7 as kt,ay as je,be as tr,b$ as Tt,aC as Ha,bl as M,b_ as k,bO as x,aB as I,bo as Rs,ca as wt,bH as A,bV as ye,br as Gr,bk as to,c0 as ca,ai as es,cd as Is,aw as Rn,a as Ep,aj as Rr,c7 as Pp,c6 as Ll,c5 as Mn,bf as So,bz as Id}from"./DYhIMPy1.js";import{G as Es,I as Ap,z as Tp}from"./DyvrH0mm.js";import{o as Rp,i as Mp,u as re,g as Un,w as Nn,l as In,j as ir,v as gt,I as ro,n as Rt,p as Tr,q as Np,s as Lp,m as Op,x as Dp}from"./CjaOLL1c.js";import{s as un}from"./Cuqq8bL5.js";import{c as Qr}from"./CnVt0JNG.js";import{I as Si,t as nr,n as Bp,i as Ol,u as Dl}from"./BboIV5H5.js";import{b as pr}from"./BaIAhI85.js";import{i as Sd,bv as Cd,cM as Ed,dG as Fp,ds as zp,ax as Hp,cv as jp,a2 as Wp,cS as Up,dr as qs,aC as Bo,c3 as qp,I as Vp,a as Kp,a0 as Bl,cY as Gp,bT as Jp,M as Yp,dm as Xp,W as Zp,dx as Qp,af as $p,cP as eg,at as tg,g as rg,u as ng}from"./D3QcPFoL.js";import{c as ag}from"./D-62MVd3.js";import{k as da,w as sg,C as Pd,c as og,R as ig}from"./DT4bpJWb.js";import{f as yt,ap as ws,ai as lg,am as Ci,bc as cg}from"./Bfr1QjPr.js";import{ar as dg,ae as Fl,a0 as ug,aI as fg,af as pg,h as gg,ag as vg,a$ as mg,I as hg,R as bg,ax as yg,ak as _g,a1 as xg,a as zl,az as wg,s as kg,n as Ig,b5 as Sg,m as Cg,b7 as Ei,A as Hl,aj as Eg,b6 as Pg,at as Ad,T as Td,a9 as Ag,a7 as jl,W as Tg,V as Rg,ad as Mg,a8 as Ng,L as Wl,ay as Lg}from"./zrO2ZdKm.js";import{F as At,bf as Pi,bK as Og,am as Dg,aO as Bg,cL as Fg,bj as tl,bA as zg,aE as Rd,aJ as rl,c_ as Co,a9 as Ai,cn as Hg,cc as jg,ci as nl,cF as Md,br as Wg,e as Ug,b_ as Ul,c8 as qg,cl as Vg,cW as Nd,bU as ql,b6 as ai,bc as Hs,aD as Kg,ax as Ti,as as Ld,ba as Od,bB as Gg,B as Jg,bu as Yg,a4 as Dd,cg as Xg,aj as Bd,cN as Fd,cJ as Vl,aq as zd,aI as Kl,_ as Zg,cv as Qg,cU as $g,cO as ev,aH as tv,aZ as rv,bN as Hd,bl as nv,al,c4 as Gl,aw as av,a7 as sv,a5 as ov}from"./BTdkHPOB.js";import{c as jd}from"./ChTqQfQN.js";import{g as iv}from"./DJkHth-B.js";import{Iy as Nt,bM as lv,rV as Jl,sv as cv,Jn as dv,Jt as uv,g as Wd,Ib as Ud,nw as qd,nM as Vd,nL as Kd,np as Fo,q2 as sl,x_ as fv,v2 as yo,ul as Ri,v4 as pv,ne as Gd,ID as gv,ta as vv,oA as Jd,rf as ol,lX as Yl,a2 as Xl,qL as mv,qH as hv,qM as bv,qD as yv,qJ as _v,uU as xv,Ax as Yd,AB as Xd,nN as Zl,be as Mi,GW as wv,I7 as kv,h9 as Iv,h8 as Sv,nH as Cv,w3 as Ev,w4 as Pv,w2 as Ql,Bx as ia,cr as Av,cf as Tv,d0 as Rv,d7 as Mv,AH as Nv}from"./D5ej8a-y.js";import{bH as Lv,bQ as Ov,i as Dv,B as Bv,bT as Fv,ah as zv,aj as Hv,al as jv,a5 as Wv,a4 as Uv,an as qv,V as Vv,bk as Kv,bM as Gv,bm as Jv}from"./CRsmjbca.js";import{n as Yv,m as Xv,v as Ni,ck as Zv,M as Qv,ci as $v,cb as em,aD as $l,cd as tm,bM as Li,aN as rm,s as nm,c as Vs,d as Oi,cf as Zd,cg as Di,bB as am,b6 as sm,bQ as om,bO as im,E as lm,ce as ec,bv as cm,y as tc,ch as dm}from"./B0KDOtDn.js";import{ci as um,ck as fm,cj as pm,b1 as gm,a$ as vm,b0 as mm,a4 as hm,al as go,ak as bm,aA as rc,aI as ym,aj as _m,C as xm,i as wm,E as _o,cT as km,aW as nc,cY as Im,ag as Sm,a8 as Cm,r as Em,p as Pm,aF as Am,c$ as Tm,cK as Rm,cD as Mm,R as Nm,cu as Lm,bS as Om}from"./XZbbHW_j.js";import{i as Dm,I as Ss,c as ac}from"./ChOlbK8y.js";import"./Co9PgWQA.js";import{f as sc,y as oc,M as Qd,n as Bm,m as Fm,z as $d,x as Bi,e as Ks,E as Fi,W as us,h as zm}from"./CXnaNNAz.js";import"./BKnW-cqy.js";import{b as eu}from"./2YGlULfT.js";import"./Dwmx7Nbz.js";import{z as il,P as Hm,p as jm,h as Wm,G as Um,l as qm,i as Vm,M as Km,H as Gm,t as _s,a as Jm,K as Ym,k as Xm,R as Zm}from"./CX_KiszT.js";import{t as Gs,O as Qm,M as $m,S as Fa}from"./4NMrKcis.js";import{a as eh}from"./D6bHtnlF.js";import{C as zi}from"./CshdgsKR.js";import{aQ as th,aY as rh,aB as nh,b0 as ah,aO as sh,aU as oh,a7 as Ps,b3 as ic,aK as ih,aR as lh,aX as ll,aS as cl,W as si,aq as ch,X as dh,a_ as uh,aJ as fh,aT as ph,aW as gh,b6 as vh,b4 as mh,ay as tu,p as hh,n as bh,aV as yh,_ as _h,ao as xh,aD as wh,z as kh,aC as Ih,a8 as Sh}from"./BI90DWW0.js";import{s as Hi}from"./BHTZ1IpN.js";import{M as Ch}from"./CGnwT0iY.js";import{s as Eh,a as Ph}from"./BsieX9dN.js";import{u as dl,w as Ah,v as zo,I as Th,A as lc,e as Js,d as za,J as cc,c as Rh,f as Mh,g as dc,i as Nh,b as Lh,o as ru,j as Oh,O as Dh,x as Bh,k as nu,S as Fh,N as zh,q as uc,p as Hh,n as fc,z as jh,s as Wh}from"./uVMl5RuS.js";import{o as pc,a as gc,T as oi,b as Uh}from"./QGJb4cQl.js";import{P as qh,y as Vh,j as Kh,h as Gh,V as Jh}from"./ChkzKl5W.js";import{D as Ys}from"./DjjF2uGN.js";import"./DlErnbqC.js";import{C as ua}from"./YxdkHijX.js";import{M as Yh}from"./BEBrrrrG.js";import{g as ul}from"./B5m4HK_m.js";import{f as vc,d as Xh}from"./DN_Tzm7_.js";import{c as xo}from"./SYPnLWme.js";import{handleIntentLink as Zh}from"./CFqvncb_.js";import{s as Qh,a as $h,f as eb,d as tb,r as rb,h as nb,w as js,g as ab,W as sb,H as ob,c as ib,M as au}from"./CCC99Zod.js";import{e as lb,q as cb}from"./DHQOuksI.js";import{showAssistantContent as db}from"./DaOHTC-I.js";import{o as Eo,c as ub,n as fb}from"./mD0vYAzJ.js";import{p as pb}from"./DuiaDZ1M.js";import{m as gb}from"./-DqWFMjY.js";import{h as vo}from"./bVXl7xNp.js";import{i as su}from"./RD9QY1Yc.js";import{g as vb,e as mb,f as hb,h as bb}from"./BvFAWM27.js";import{T as ii}from"./BqxV3q0f.js";import"./C5oPUaEZ.js";import{i as yb,r as mc}from"./D7lKnGLc.js";import{a as _b}from"./D-hrwg9Y.js";import{a as xb}from"./BdWqymET.js";import{p as wb}from"./CE_jWS3I.js";const kb="intent:inline-visual-draft";function MC(r,t){const n=t.title.replace(/\s+/g," ").trim(),a=JSON.stringify({inputs:t.inputs,results:t.results},null,2),s=(a.match(/`+/g)??[]).reduce((c,l)=>Math.max(c,l.length),0),o="`".repeat(Math.max(3,s+1));return`${r}${r?`
|
|
3
3
|
|
|
4
4
|
`:""}${n}
|
|
5
5
|
|
|
@@ -260,7 +260,7 @@ ${r.content}`:a.content=r.content,a):r.old_text!==void 0&&r.new_text!==void 0?(a
|
|
|
260
260
|
`,L0=["background","foreground","card","card-foreground","primary","primary-ink","primary-foreground","secondary","secondary-foreground","muted","muted-foreground","border","input","ring","danger","danger-background","info","info-foreground","success","success-foreground","warning","warning-foreground","font-ui","font-code","text-body-size","text-body-line-height","text-body-weight","text-body-tracking","radius-small","radius-medium","radius-large","app-background","sidebar","sidebar-accent","agent-avatar-surface-active","agent-avatar-foreground","diagram-host-surface","diagram-canvas","diagram-label-surface","diagram-node-surface","diagram-node-hover-surface","diagram-node-outline","diagram-node-title","diagram-metadata","diagram-group-outline","diagram-connector","diagram-connector-hover","diagram-connector-muted","diagram-connector-inactive","diagram-connector-danger","diagram-connector-success","diagram-connector-warning","diagram-connector-active","diagram-accent","diagram-accent-foreground","diagram-node-radius","diagram-group-radius","diagram-connector-width","text-caption-size","text-caption-line-height","text-caption-weight","text-caption-tracking","text-body-strong-size","text-body-strong-line-height","text-body-strong-weight","text-body-strong-tracking","space-1","space-2","space-3","space-4","space-5","space-6","space-7","control-height-compact","control-height-small","control-height-medium","control-height-large","radius-full","spring-fast","spring-fast-exit","spring-fast-ease","spring-moderate","spring-moderate-exit","spring-moderate-ease","spring-slow","spring-slow-exit","spring-slow-ease","spring-exit-ease","motion-fast","motion-standard","motion-slow","ease-standard","ease-emphasized-out","motion-reduced"],_i=96,sd=2e4,O0=480,pf=512,D0=["default-src 'none'","script-src 'unsafe-inline'","style-src 'unsafe-inline'","img-src data:","connect-src 'none'","font-src data:","media-src 'none'","object-src 'none'","frame-src 'none'","child-src 'none'","worker-src 'none'","manifest-src 'none'","base-uri 'none'","form-action 'none'"].join("; ");function B0(r,t,n,a,s,o){const c=new MessageChannel,l=MessagePort.prototype.postMessage.bind(c.port1);window.parent.postMessage({channel:r,type:"scroll-port"},"*",[c.port2]);const f=(E,z={})=>{window.parent.postMessage({channel:r,type:E,...z},"*")};let i=s?.state??null,p=null,g=!1;Object.defineProperty(window,"intentVisual",{configurable:!1,writable:!1,value:Object.freeze({get state(){return i},publish(E){try{if(!o(E))return!1;const z=JSON.parse(JSON.stringify(E));return i=z.state,p=z,g||(g=!0,requestAnimationFrame(()=>{g=!1,p&&f("snapshot",{snapshot:p}),p=null})),!0}catch{return!1}}})});let O=!1,b=-1,h=innerHeight,P=Number.NaN,R=0,B=0;const F=()=>{if(O=!1,!document.body)return;let E=Math.ceil(Math.max(document.body.scrollHeight,document.body.getBoundingClientRect().height));const z=innerHeight,J=E-z;if(z>h+1&&J>1&&Math.abs(J-P)<=1?R+=1:(z!==h||J<=1)&&(R=0),h=z,P=J,!B&&R>=3){B=Math.max(a,z);const Y="Page height follows the frame (vh units or height: 100%); frame height held.";console.warn(Y),f("layout",{message:Y})}B&&(E=Math.min(E,B)),E!==b&&(b=E,f("resize",{height:E}))},T=()=>{O||(O=!0,requestAnimationFrame(F))},L=E=>{if(!E||typeof E.dark!="boolean"||!E.variables)return;const z=document.documentElement;z.classList.toggle("dark",E.dark),z.style.colorScheme=E.dark?"dark":"light";const J=E.variables["--inline-html-root-font-size"];"--inline-html-root-font-size"in t.variables&&typeof J=="string"&&J.length<512&&z.style.setProperty("--inline-html-root-font-size",J);for(const Y of Object.keys(t.variables)){if(Y==="--inline-html-root-font-size")continue;const Q=E.variables[Y];typeof Q=="string"&&Q.length<512&&z.style.setProperty(Y,Q)}T()};window.addEventListener("message",E=>{E.source!==window.parent||!E.data||E.data.channel!==r||E.data.type==="theme"&&L(E.data.theme)});const U=E=>{if(E.defaultPrevented||!E.isTrusted||E.ctrlKey||E.metaKey||E.shiftKey||!E.deltaY||Math.abs(E.deltaX)>Math.abs(E.deltaY))return;const z=Q=>{const Ie=getComputedStyle(Q);if(Q!==document.scrollingElement&&!/^(auto|scroll|overlay)$/.test(Ie.overflowY)||/^(hidden|clip)$/.test(Ie.overflowY))return!1;const le=Q.scrollHeight-Q.clientHeight;return le>1&&(E.deltaY<0?Q.scrollTop>1:Q.scrollTop<le-1)};if(E.composedPath().some(Q=>Q instanceof Element&&z(Q))||document.scrollingElement&&z(document.scrollingElement))return;const J=E.deltaMode===WheelEvent.DOM_DELTA_LINE?parseFloat(getComputedStyle(document.body).lineHeight)||16:E.deltaMode===WheelEvent.DOM_DELTA_PAGE?innerHeight:1,Y=Math.max(-n,Math.min(n,E.deltaY*J));Number.isFinite(Y)&&(E.preventDefault(),l({deltaY:Y}))};window.addEventListener("wheel",()=>{window.removeEventListener("wheel",U),window.addEventListener("wheel",U,{passive:!1})},{capture:!0,passive:!1}),window.addEventListener("error",E=>{E.message&&f("error",{message:E.message.slice(0,300)})}),window.addEventListener("unhandledrejection",E=>{const z=E.reason;f("error",{message:String(z instanceof Error?z.message:z).slice(0,300)})}),window.addEventListener("click",E=>{const z=E.target instanceof Element?E.target.closest("a, area"):null;if(!z)return;(z.getAttribute("href")??z.getAttribute("xlink:href"))?.startsWith("#")||E.preventDefault()},!0),window.addEventListener("submit",E=>E.preventDefault(),!0),L(t),window.addEventListener("DOMContentLoaded",()=>{new ResizeObserver(T).observe(document.body),new MutationObserver(T).observe(document.body,{childList:!0,subtree:!0,attributes:!0,characterData:!0}),window.addEventListener("resize",T),document.addEventListener("load",T,!0),document.fonts.ready.then(T),f("ready"),T()},{once:!0})}function F0(r,t,n,a,s){const o=document.createElement("iframe");o.setAttribute("sandbox","allow-scripts"),o.setAttribute("referrerpolicy","no-referrer"),o.title=n,o.style.cssText="display:block;width:100%;height:100%;border:0;";let c;const l=f=>{const i=f.data?.deltaY;typeof i=="number"&&Number.isFinite(i)&&i!==0&&Math.abs(i)<=a&&window.parent.postMessage({channel:r,type:"wheel",deltaY:i},"*")};window.addEventListener("message",f=>{const i=f.data;if(!(!i||typeof i!="object"||i.channel!==r)){if(f.source===window.parent&&i.type==="theme"){o.contentWindow?.postMessage({channel:r,type:"theme",theme:i.theme},"*");return}if(!(f.source!==o.contentWindow||f.origin!=="null")){if(i.type==="scroll-port"&&!c&&f.ports.length===1){c=f.ports[0],c.onmessage=l;return}i.type==="resize"&&typeof i.height=="number"&&Number.isFinite(i.height)&&i.height>=0?window.parent.postMessage({channel:r,type:"resize",height:i.height},"*"):i.type==="ready"?window.parent.postMessage({channel:r,type:"ready"},"*"):(i.type==="error"||i.type==="layout")&&typeof i.message=="string"?window.parent.postMessage({channel:r,type:i.type,message:i.message.slice(0,300)},"*"):i.type==="snapshot"&&s(i.snapshot)&&window.parent.postMessage({channel:r,type:"snapshot",snapshot:i.snapshot},"*")}}}),window.addEventListener("DOMContentLoaded",()=>{o.srcdoc=t,document.body.append(o)},{once:!0})}function z0(r,t,n,a,s,o,c,l){const f=document.implementation.createHTMLDocument(""),i=f.createElement("template");i.innerHTML=n,f.body.append(i.content);const p=Y=>{Y.querySelectorAll("meta, base, link, iframe, frame, frameset, object, embed").forEach(Q=>Q.remove()),Y.querySelectorAll("template").forEach(Q=>p(Q.content)),Y.querySelectorAll("a, area").forEach(Q=>{for(const Ie of["href","xlink:href"])Q.getAttribute(Ie)?.startsWith("#")||Q.removeAttribute(Ie);Q.removeAttribute("target"),Q.removeAttribute("ping"),Q.removeAttribute("download")})};p(f);const g=Y=>JSON.stringify(Y).replace(/</g,"\\u003c"),O=f.createElement("meta");O.httpEquiv="Content-Security-Policy",O.content=r.csp;const b=f.createElement("meta");b.setAttribute("charset","utf-8");const h=f.createElement("style"),P=/^data:[\w.+/-]+;base64,[A-Za-z0-9+/=]+$/.test(l)?`@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900;
|
|
261
261
|
font-display: swap; src: url('${l}') format('woff2'); }`:"";h.textContent=`${P}${r.styles}`;const R=f.createElement("script"),B=g([a,s,r.maxScrollDelta,r.lockHeight,t(c)?c:null]);R.textContent=`(${r.bridge})(...${B}, (${r.validate}));`,f.head.prepend(O,b,h,R);const F=`<!doctype html>${f.documentElement.outerHTML}`,T=document.implementation.createHTMLDocument(""),L=T.createElement("meta");L.httpEquiv="Content-Security-Policy",L.content=r.csp.replace("frame-src 'none'","frame-src about:");const U=T.createElement("meta");U.setAttribute("charset","utf-8");const E=T.createElement("style");E.textContent="html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; }";const z=T.createElement("script"),J=g([a,F,o,r.maxScrollDelta]);return z.textContent=`(${r.shell})(...${J}, (${r.validate}));`,T.head.prepend(L,U,E,z),`<!doctype html>${T.documentElement.outerHTML}`}const H0=()=>({csp:D0,styles:N0,maxScrollDelta:pf,lockHeight:O0,bridge:B0.toString(),shell:F0.toString(),validate:ol.toString()});function j0(r,t,n,a,s=null,o=""){return z0(H0(),ol,r,t,n,a,s,o)}function od(r){const t=getComputedStyle(r);return{dark:document.documentElement.classList.contains("dark"),variables:{...Object.fromEntries(L0.map(n=>[`--${n}`,t.getPropertyValue(`--${n}`).trim()])),"--inline-html-root-font-size":getComputedStyle(document.documentElement).fontSize}}}function W0(r,t,n,a,s=null){return j0(r,t,n,a,s,M0)}var U0=I('<p class="type-caption m-0 break-words px-4 pb-2 text-muted-foreground"> </p>'),q0=I('<div class="type-body flex items-center justify-between gap-3 px-4 py-2" role="status"><span class="text-danger"> </span> <!></div> <!>',1),V0=I('<p class="sr-only" role="status"> </p>'),K0=I('<p class="type-body m-0 px-4 py-3 text-muted-foreground" role="status"> </p>'),G0=I('<div class="type-body px-4 py-2 text-danger" role="status"><p class="m-0"> </p> <p class="type-code m-0 break-words"> </p></div>'),J0=I('<iframe sandbox="allow-scripts" referrerpolicy="no-referrer"></iframe>'),Y0=I('<div class="space-y-4 p-4" aria-hidden="true"><div class="space-y-2"><!> <!></div> <!> <div class="flex items-center gap-4"><!> <!> <!></div></div>'),X0=I('<span class="type-caption ml-auto text-muted-foreground" role="status"> </span>'),Z0=I('<p class="type-caption m-0 break-words px-4 pb-2 text-muted-foreground" role="status"> <!></p>'),Q0=I('<th class="min-w-40 px-2 pb-3 align-top font-normal"><!> <div class="mt-1 flex gap-1"><!> <!></div></th>'),$0=I('<td class="max-w-56 px-2 py-2 align-top break-words tabular-nums"> </td>'),ek=I('<tr><th class="max-w-48 py-2 pr-4 align-top font-normal break-words text-muted-foreground"> </th><!></tr>'),tk=I('<div class="overflow-x-auto px-4 pb-4" data-inline-visual-comparison=""><table class="type-body w-full border-separate border-spacing-0 text-left"><thead><tr><th class="min-w-28 pr-4 pb-3 font-normal text-muted-foreground"> </th><th class="min-w-32 px-2 pb-3 align-top font-medium"> </th><!></tr></thead><tbody></tbody></table></div>'),rk=I('<div class="flex flex-wrap items-center gap-1 px-4 py-2" data-inline-visual-actions=""><!> <!> <!> <!> <!></div> <!> <!>',1),nk=I('<div data-inline-html="" class="my-3 min-w-0 overflow-hidden rounded-lg bg-background text-foreground"><div class="flex min-w-0 items-center justify-end gap-1 p-1"><!> <!></div> <!> <!> <div class="relative min-w-0"><!> <!></div> <!></div>');function gf(r,t){if(new.target)return Bt({component:gf,...r});Ht(t,!0);const n=720,a=1e4;let s=y(t,"source",7),o=y(t,"isStreaming",7,!1),c=y(t,"isComplete",7,!0),l=y(t,"record",7),f=y(t,"storageStatus",7,"ready"),i=y(t,"onRecordChange",7),p=y(t,"onUseConfiguration",7),g=y(t,"onExport",7),O=y(t,"onRetry",7),b=y(t,"storageError",7),h=y(t,"exportStatus",7),P=y(t,"exportPath",7),R=y(t,"exportError",7),B,F=ye(void 0),T=ye(!1),L=ye(!1),U=ye(0),E=ye(""),z=ye(""),J=ye(!1),Y=ye(""),Q=ye(Gr(_i)),Ie=ye(n),le=ye(""),fe=ye(Yl()),ce=ye(void 0),Le,G=ye(void 0),we=ye(!1);const $=d(()=>l()??e(fe)),We=d(()=>f()!=="loading"&&(f()!=="error"||!!e($).current)),Ee=d(()=>!o()&&c()&&!!s().trim()&&e(We)),Se=d(()=>Math.min(sd,Math.max(_i,e(Q)))),ke=d(()=>o()||f()==="loading"?"loading":c()?s().trim()?e(Y)?"error":e(J)?"ready":"loading":"empty":"incomplete"),Be=d(()=>o()||f()==="loading"||e(Ee)&&!e(J)&&!e(Y));function Xe(se){const ze={...se,current:e(ce)??se.current};A(fe,ze),i()?.(ze)}function ae(){const se=e(ce);!se||e($).scenarios.length>=Xl||(Xe({...e($),scenarios:[...e($).scenarios,{id:crypto.randomUUID(),name:dp({number:Dl(e($).scenarios.length+1)}),snapshot:structuredClone(se)}]}),A(we,!0))}function Z(se,ze){const nt=ze.trim().slice(0,120);nt&&Xe({...e($),scenarios:e($).scenarios.map(dt=>dt.id===se?{...dt,name:nt}:dt)})}function Je(se){const ze=structuredClone(se);A(ce,ze),A(G,ze),Xe({...e($),current:ze}),A(U,e(U)+1)}function K(se){return typeof se=="number"?Dl(se):typeof se=="string"?se:JSON.stringify(se)}function V(){!e(F)?.contentWindow||!e(z)||e(F).contentWindow.postMessage({channel:e(z),type:"theme",theme:od(B)},"*")}function W(se){let ze=B.parentElement;for(;ze;){const nt=getComputedStyle(ze),dt=ze.scrollHeight-ze.clientHeight;if(/^(auto|scroll|overlay)$/.test(nt.overflowY)&&dt>1){if(se<0?ze.scrollTop>0:ze.scrollTop<dt){ze.dispatchEvent(new WheelEvent("wheel",{deltaY:se,bubbles:!0})),ze.scrollTop+=se;return}if(/^(contain|none)$/.test(nt.overscrollBehaviorY))return}ze=ze.parentElement}window.scrollBy({top:se,behavior:"instant"})}wt(()=>{if(!e(T))return;const se=s(),ze=e(Ee);e(U),Mn(()=>{Le!==se&&(A(fe,Yl()),A(ce,void 0),A(we,!1),A(G,void 0),Le=se),A(J,!1),A(Y,""),A(le,""),A(Q,_i,!0),A(z,crypto.randomUUID(),!0),A(E,ze?W0(se,e(z),od(B),Nl(),e(G)??e(ce)??e($).current):"",!0),A(G,void 0)})}),wt(()=>{if(!e(E)||e(J)||e(Y))return;const se=setTimeout(()=>{A(Y,$f(),!0)},a);return()=>clearTimeout(se)}),to(()=>{A(T,!0);const se=Ke=>{if(Ke.source!==e(F)?.contentWindow||Ke.origin!=="null")return;const tt=Ke.data;if(!(!tt||typeof tt!="object"||tt.channel!==e(z))){if(tt.type==="bootstrap"){e(F)?.contentWindow?.postMessage({channel:e(z),type:"initialize",documentHtml:e(E)},"*");return}if(tt.type==="resize"&&typeof tt.height=="number"&&Number.isFinite(tt.height)&&tt.height>=0)A(Q,Math.min(sd,Math.ceil(tt.height)),!0);else if(tt.type==="ready")A(J,!0),V();else if(tt.type==="error"&&typeof tt.message=="string")A(Y,tt.message.slice(0,300),!0);else if(tt.type==="layout"&&typeof tt.message=="string")A(le,tt.message.slice(0,300),!0);else if(tt.type==="snapshot"&&e(Ee)&&ol(tt.snapshot)){const st=tt.snapshot;A(ce,st),Xe({...e($),current:st})}else tt.type==="wheel"&&e(J)&&e(Ee)&&!e(L)&&!e(Be)&&typeof tt.deltaY=="number"&&Number.isFinite(tt.deltaY)&&tt.deltaY!==0&&Math.abs(tt.deltaY)<=pf&&W(tt.deltaY)}},ze=()=>{A(Ie,Math.min(n,Math.max(160,Math.floor(window.innerHeight*.8))),!0)},nt=new MutationObserver(V);nt.observe(document.documentElement,{attributes:!0,attributeFilter:["class","style","data-theme"]});const dt=window.matchMedia("(prefers-color-scheme: dark)");return dt.addEventListener("change",V),window.addEventListener("message",se),window.addEventListener("resize",ze),ze(),()=>{nt.disconnect(),dt.removeEventListener("change",V),window.removeEventListener("message",se),window.removeEventListener("resize",ze)}});var ie={get source(){return s()},set source(se){s(se),_()},get isStreaming(){return o()},set isStreaming(se=!1){o(se),_()},get isComplete(){return c()},set isComplete(se=!0){c(se),_()},get record(){return l()},set record(se){l(se),_()},get storageStatus(){return f()},set storageStatus(se="ready"){f(se),_()},get onRecordChange(){return i()},set onRecordChange(se){i(se),_()},get onUseConfiguration(){return p()},set onUseConfiguration(se){p(se),_()},get onExport(){return g()},set onExport(se){g(se),_()},get onRetry(){return O()},set onRetry(se){O(se),_()},get storageError(){return b()},set storageError(se){b(se),_()},get exportStatus(){return h()},set exportStatus(se){h(se),_()},get exportPath(){return P()},set exportPath(se){P(se),_()},get exportError(){return R()},set exportError(se){R(se),_()},$set:Ft,$on:(se,ze)=>zt(t,se,ze)},ge=nk(),X=S(ge),de=S(X);yt(de,{variant:"ghost",size:"sm",get active(){return e(L)},get"aria-pressed"(){return e(L)},onclick:()=>{A(L,!e(L))},children:(se,ze)=>{tr();var nt=Tt();k(dt=>x(nt,dt),[()=>e(L)?ep():tp()]),u(se,nt)},$$slots:{default:!0}});var Ne=m(de,2);{let se=d(()=>!e(Ee));yt(Ne,{variant:"ghost",size:"sm",get disabled(){return e(se)},onclick:()=>{A(U,e(U)+1)},children:(ze,nt)=>{tr();var dt=Tt();k(Ke=>x(dt,Ke),[()=>rp()]),u(ze,dt)},$$slots:{default:!0}})}w(X);var Ce=m(X,2);{var rt=se=>{var ze=q0(),nt=je(ze),dt=S(nt),Ke=M(dt,!0),tt=m(dt,2);{var st=Ot=>{yt(Ot,{variant:"ghost",size:"sm",get onclick(){return O()},children:(Dt,Yt)=>{tr();var Et=Tt();k(Wt=>x(Et,Wt),[()=>up()]),u(Dt,Et)},$$slots:{default:!0}})};D(tt,Ot=>{O()&&Ot(st)})}w(nt);var vt=m(nt,2);{var _t=Ot=>{var Dt=U0(),Yt=M(Dt,!0);k(()=>x(Yt,b())),u(Ot,Dt)};D(vt,Ot=>{b()&&Ot(_t)})}k(Ot=>x(Ke,Ot),[()=>np()]),u(se,ze)};D(Ce,se=>{f()==="error"&&se(rt)})}var me=m(Ce,2);{var Re=se=>{var ze=V0(),nt=M(ze,!0);k(dt=>x(nt,dt),[()=>o()?ap():sp()]),u(se,ze)},q=se=>{var ze=K0(),nt=M(ze,!0);k(dt=>x(nt,dt),[()=>c()?ip():op()]),u(se,ze)},Pe=se=>{var ze=G0(),nt=S(ze),dt=M(nt,!0),Ke=m(nt,2),tt=M(Ke,!0);w(ze),k(st=>{x(dt,st),x(tt,e(Y))},[()=>lp()]),u(se,ze)};D(me,se=>{e(Be)?se(Re):e(Ee)?e(Y)&&se(Pe,2):se(q,1)})}var ue=m(me,2),N=S(ue);{var H=se=>{var ze=kt(),nt=je(ze);Es(nt,()=>e(z),dt=>{var Ke=J0();let tt,st;pr(Ke,vt=>A(F,vt),()=>e(F)),k(vt=>{re(Ke,"title",vt),re(Ke,"src",`/inline-html-sandbox.html#${e(z)}`),tt=gt(Ke,1,"block w-full border-0 svelte-1kkow1d",null,tt,{"preview-hidden":e(L)||!e(J)}),re(Ke,"aria-hidden",e(L)||!e(J)),st=Nn(Ke,"",st,{height:`${e(Se)}px`})},[()=>Nl()]),u(dt,Ke)}),u(se,ze)};D(N,se=>{e(Ee)&&e(E)&&se(H)})}var pe=m(N,2);{var Qe=se=>{ua(se,{get code(){return s()},language:"html",noBorder:!0,noMargin:!0,get maxHeight(){return e(Ie)}})},Te=se=>{var ze=Y0(),nt=S(ze),dt=S(nt);_s(dt,{class:"h-4 w-32 max-w-1/2"});var Ke=m(dt,2);_s(Ke,{class:"h-3 w-2/3"}),w(nt);var tt=m(nt,2);_s(tt,{class:"aspect-video max-h-60 w-full rounded-lg"});var st=m(tt,2),vt=S(st);_s(vt,{class:"h-3 w-16"});var _t=m(vt,2);_s(_t,{class:"h-2 min-w-0 flex-1"});var Ot=m(_t,2);_s(Ot,{class:"h-3 w-10"}),w(st),w(ze),u(se,ze)};D(pe,se=>{e(L)?se(Qe):e(Be)&&se(Te,1)})}w(ue);var Fe=m(ue,2);{var et=se=>{var ze=rk(),nt=je(ze),dt=S(nt);{var Ke=Mt=>{{let St=d(()=>!e(J)||!!e(Y));yt(Mt,{size:"sm",get disabled(){return e(St)},onclick:()=>e(ce)&&p()(e(ce)),children:(_e,ee)=>{tr();var Ue=Tt();k(at=>x(Ue,at),[()=>fp()]),u(_e,Ue)},$$slots:{default:!0}})}};D(dt,Mt=>{p()&&Mt(Ke)})}var tt=m(dt,2);{let Mt=d(()=>!e(J)||!!e(Y)||e($).scenarios.length>=Xl);yt(tt,{variant:"ghost",size:"sm",get disabled(){return e(Mt)},onclick:ae,children:(St,_e)=>{tr();var ee=Tt();k(Ue=>x(ee,Ue),[()=>cp()]),u(St,ee)},$$slots:{default:!0}})}var st=m(tt,2);{var vt=Mt=>{yt(Mt,{variant:"ghost",size:"sm",get active(){return e(we)},get"aria-expanded"(){return e(we)},onclick:()=>A(we,!e(we)),children:(St,_e)=>{tr();var ee=Tt();k(Ue=>x(ee,Ue),[()=>pp()]),u(St,ee)},$$slots:{default:!0}})};D(st,Mt=>{e($).scenarios.length&&Mt(vt)})}var _t=m(st,2);{var Ot=Mt=>{{let St=d(()=>!e(J)||h()==="saving");yt(Mt,{variant:"ghost",size:"sm",get disabled(){return e(St)},onclick:()=>g()({...e($),current:e(ce)??null}),children:(_e,ee)=>{tr();var Ue=Tt();k(at=>x(Ue,at),[()=>gp()]),u(_e,Ue)},$$slots:{default:!0}})}};D(_t,Mt=>{g()&&Mt(Ot)})}var Dt=m(_t,2);{var Yt=Mt=>{var St=X0(),_e=M(St,!0);k(ee=>x(_e,ee),[()=>f()==="saving"?vp():f()==="ready"?mp():""]),u(Mt,St)};D(Dt,Mt=>{i()&&Mt(Yt)})}w(nt);var Et=m(nt,2);{var Wt=Mt=>{var St=Z0(),_e=S(St),ee=m(_e);{var Ue=at=>{var ot=Tt();k(()=>x(ot,R())),u(at,ot)};D(ee,at=>{h()==="error"&&R()&&at(Ue)})}w(St),k(at=>x(_e,`${at??""} `),[()=>h()==="saving"?hp():h()==="saved"?bp({path:P()??""}):yp()]),u(Mt,St)};D(Et,Mt=>{h()&&Mt(Wt)})}var Qt=m(Et,2);{var lr=Mt=>{var St=tk(),_e=S(St),ee=S(_e),Ue=S(ee),at=S(Ue),ot=M(at,!0),De=m(at),oe=M(De,!0),ve=m(De);Rt(ve,17,()=>e($).scenarios,Me=>Me.id,(Me,he)=>{var He=Q0(),Ve=S(He);{let Ye=d(()=>wp());Ss(Ve,{get value(){return e(he).name},get"aria-label"(){return e(Ye)},maxlength:120,onblur:xe=>{xe.currentTarget.value.trim()||(xe.currentTarget.value=e(he).name),Z(e(he).id,xe.currentTarget.value)},onkeydown:xe=>{xe.key==="Enter"&&xe.currentTarget.blur(),xe.key==="Escape"&&(xe.currentTarget.value=e(he).name,xe.currentTarget.blur())}})}var qe=m(Ve,2),$e=S(qe);yt($e,{variant:"ghost",size:"sm",onclick:()=>Je(e(he).snapshot),children:(Ye,xe)=>{tr();var Ze=Tt();k(ft=>x(Ze,ft),[()=>_p()]),u(Ye,Ze)},$$slots:{default:!0}});var Oe=m($e,2);yt(Oe,{variant:"ghost",size:"sm",onclick:()=>Xe({...e($),scenarios:e($).scenarios.filter(Ye=>Ye.id!==e(he).id)}),children:(Ye,xe)=>{tr();var Ze=Tt();k(ft=>x(Ze,ft),[()=>xp()]),u(Ye,Ze)},$$slots:{default:!0}}),w(qe),w(He),u(Me,He)}),w(Ue),w(ee);var ne=m(ee);Rt(ne,20,()=>["inputs","results"],Tr,(Me,he)=>{const He=d(()=>he),Ve=d(()=>Array.from(new Set([...Object.keys(e(ce)[e(He)]),...e($).scenarios.flatMap(Oe=>Object.keys(Oe.snapshot[e(He)]))])));var qe=kt(),$e=je(qe);Rt($e,16,()=>e(Ve),Oe=>Oe,(Oe,Ye)=>{var xe=ek(),Ze=S(xe),ft=M(Ze,!0),ct=m(Ze);Rt(ct,17,()=>[e(ce),...e($).scenarios.map(it=>it.snapshot)],Tr,(it,Ct)=>{var mt=$0(),Lt=M(mt,!0);k(Kt=>x(Lt,Kt),[()=>Object.hasOwn(e(Ct)[e(He)],Ye)?K(e(Ct)[e(He)][Ye]):"—"]),u(it,mt)}),w(xe),k(()=>x(ft,Ye)),u(Oe,xe)}),u(Me,qe)}),w(ne),w(_e),w(St),k(Me=>{x(ot,e(ce).title),x(oe,Me)},[()=>kp()]),u(Mt,St)};D(Qt,Mt=>{e(we)&&e($).scenarios.length&&Mt(lr)})}u(se,ze)};D(Fe,se=>{e(ce)&&e(Ee)&&se(et)})}return w(ge),pr(ge,se=>B=se,()=>B),k(()=>{re(ge,"data-inline-html-status",e(ke)),re(ge,"data-inline-html-layout",e(le)?"viewport-locked":void 0),re(ge,"aria-busy",e(Be))}),u(r,ge),jt(ie)}var ak=I('<div class="w-full min-w-0"><!></div>');function sk(r,t){if(new.target)return Bt({component:sk,...r});Ht(t,!0);const n=()=>bt(e(b),"$agent$",s),a=()=>bt(e(B),"$entry$",s),[s,o]=ga();let c=y(t,"block",7),l=y(t,"role",7),f=y(t,"workspaceId",7),i=y(t,"agentId",7),p=y(t,"messageId",7),g=y(t,"contentBlockKey",7,""),O=ye(void 0);const b=d(()=>Bo(i()??"")),h=d(()=>l()==="assistant"&&f()&&i()&&p()&&c().metadata?.fenceClosed&&!c().metadata?.isStreaming&&n()&&!Jd(n())?{workspaceId:f(),agentId:i(),messageId:p(),blockKey:JSON.stringify([g(),c().metadata?.fenceStart??0]),source:c().content}:void 0),P=d(()=>!!(f()&&i()&&p()&&c().metadata?.fenceClosed&&!n())),R=d(()=>e(h)?_v(e(h)):""),B=d(()=>sh(e(R)));wt(()=>{e(h)&&Nt.dispatch(mv(e(h)))});function F(Y){!f()||!i()||n()?.retiredAt||e(O)?.dispatchEvent(new CustomEvent(kb,{bubbles:!0,detail:{workspaceId:f(),agentId:i(),snapshot:Y}}))}var T={get block(){return c()},set block(Y){c(Y),_()},get role(){return l()},set role(Y){l(Y),_()},get workspaceId(){return f()},set workspaceId(Y){f(Y),_()},get agentId(){return i()},set agentId(Y){i(Y),_()},get messageId(){return p()},set messageId(Y){p(Y),_()},get contentBlockKey(){return g()},set contentBlockKey(Y=""){g(Y),_()},$set:Ft,$on:(Y,Q)=>zt(t,Y,Q)},L=kt(),U=je(L);{var E=Y=>{var Q=ak(),Ie=S(Q);{let le=d(()=>c().metadata?.isStreaming??!1),fe=d(()=>c().metadata?.fenceClosed??!1),ce=d(()=>a()?.record),Le=d(()=>e(h)?a()?.status??"loading":e(P)?"loading":"ready"),G=d(()=>a()?.error),we=d(()=>e(h)?Xe=>Nt.dispatch(yv(e(R),Xe)):void 0),$=d(()=>f()&&i()&&n()&&!n().retiredAt?F:void 0),We=d(()=>e(h)?()=>Nt.dispatch(bv(e(R))):void 0),Ee=d(()=>e(h)?Xe=>Nt.dispatch(hv(e(R),crypto.randomUUID(),Xe)):void 0),Se=d(()=>a()?.export?.status),ke=d(()=>a()?.export?.path),Be=d(()=>a()?.export?.error);gf(Ie,{get source(){return c().content},get isStreaming(){return e(le)},get isComplete(){return e(fe)},get record(){return e(ce)},get storageStatus(){return e(Le)},get storageError(){return e(G)},get onRecordChange(){return e(we)},get onUseConfiguration(){return e($)},get onRetry(){return e(We)},get onExport(){return e(Ee)},get exportStatus(){return e(Se)},get exportPath(){return e(ke)},get exportError(){return e(Be)}})}w(Q),pr(Q,le=>A(O,le),()=>e(O)),u(Y,Q)},z=Y=>{ua(Y,{get code(){return c().content},language:"html"})};D(U,Y=>{l()==="assistant"?Y(E):Y(z,-1)})}u(r,L);var J=jt(T);return o(),J}var ok=I('<div class="digest-card flex items-start gap-2.5 py-5 px-6 my-4 shadow-xs text-base leading-normal border border-border"> </div>');function ik(r,t){if(new.target)return Bt({component:ik,...r});Ht(t,!0);let n=y(t,"digest",7);var a={get digest(){return n()},set digest(c){n(c),_()},$set:Ft,$on:(c,l)=>zt(t,c,l)},s=ok(),o=M(s,!0);return k(()=>x(o,n())),u(r,s),jt(a)}var lk=I('<span class="inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-blue-500/15 text-blue-600 dark:text-blue-400"> </span>'),ck=I('<span class="inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-muted text-muted-foreground"> </span>'),dk=I('<span class="inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-primary/10 text-primary/80"> </span>'),uk=I('<div class="flex items-start gap-3 px-4 py-2.5"><div class="flex-1 min-w-0"><div class="flex items-center gap-2 flex-wrap"><span class="text-sm font-semibold text-foreground"> </span> <!> <!></div> <div class="mt-0.5 text-xs font-mono text-muted-foreground truncate"> </div></div></div>'),fk=I('<div class="detected-scripts-card my-3 rounded-lg border border-border bg-muted/30 overflow-hidden"><div class="flex items-center gap-2 px-4 py-2.5 border-b border-border bg-muted/40"><!> <span class="text-sm font-semibold text-foreground"> </span></div> <div class="divide-y divide-border"></div> <div class="px-4 py-2 border-t border-border bg-muted/20"><span class="text-xs text-muted-foreground"> </span></div></div>');function pk(r,t){if(new.target)return Bt({component:pk,...r});Ht(t,!0);let n=y(t,"scripts",7);var a={get scripts(){return n()},set scripts(b){n(b),_()},$set:Ft,$on:(b,h)=>zt(t,b,h)},s=fk(),o=S(s),c=S(o);At(c,{get icon(){return Nd},size:"sm",class:"text-primary-ink/70"});var l=m(c,2),f=M(l,!0);w(o);var i=m(o,2);Rt(i,21,n,b=>b.name+b.command,(b,h)=>{var P=uk(),R=S(P),B=S(R),F=S(B),T=M(F,!0),L=m(F,2);{var U=Ie=>{var le=lk(),fe=M(le,!0);k(ce=>x(fe,ce),[()=>v.chat_detectedScripts_service_badge()]),u(Ie,le)},E=Ie=>{var le=ck(),fe=M(le,!0);k(ce=>x(fe,ce),[()=>v.chat_detectedScripts_command_badge()]),u(Ie,le)};D(L,Ie=>{e(h).mode==="service"?Ie(U):Ie(E,-1)})}var z=m(L,2);{var J=Ie=>{var le=dk(),fe=M(le,!0);k(()=>x(fe,e(h).category)),u(Ie,le)};D(z,Ie=>{e(h).category&&e(h).category!=="other"&&Ie(J)})}w(B);var Y=m(B,2),Q=M(Y,!0);w(R),w(P),k(()=>{x(T,e(h).name),x(Q,e(h).command)}),u(b,P)}),w(i);var p=m(i,2),g=S(p),O=M(g,!0);return w(p),w(s),k((b,h)=>{x(f,b),x(O,h)},[()=>v.chat_detectedScripts_title(),()=>n().length===1?v.chat_detectedScripts_count_one({count:nr(n().length)}):v.chat_detectedScripts_count_many({count:nr(n().length)})]),u(r,s),jt(a)}function gk(r,t){if(new.target)return Bt({component:gk,...r});Ht(t,!0);let n=y(t,"diff",7),a=y(t,"filePath",7),s=y(t,"language",7),o=y(t,"onApply",7),c=y(t,"onReject",7);function l(){o()?.(),da.success(v.chat_diffViewer_applied_toast())}function f(){c()?.(),da.info(v.chat_diffViewer_rejected_toast())}const i=d(()=>{const g=[];return o()&&g.push({label:v.chat_diffViewer_apply_label(),variant:"success",onClick:l}),c()&&g.push({label:v.chat_diffViewer_reject_label(),variant:"danger",onClick:f}),g});var p={get diff(){return n()},set diff(g){n(g),_()},get filePath(){return a()},set filePath(g){a(g),_()},get language(){return s()},set language(g){s(g),_()},get onApply(){return o()},set onApply(g){o(g),_()},get onReject(){return c()},set onReject(g){c(g),_()},$set:Ft,$on:(g,O)=>zt(t,g,O)};{let g=d(()=>a()||v.chat_diffViewer_suggestedChanges_fallback());Ys(r,{get patch(){return n()},get fileName(){return e(g)},get language(){return s()},get actions(){return e(i)},collapsible:!0,initialCollapsed:!1,maxHeight:"500px"})}return jt(p)}var vk=Ha('<circle fill="none" style="transition: stroke-dasharray 0.3s ease-out"></circle>'),id=Ha("<circle></circle>"),mk=Ha('<svg class="absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 fill-background" viewBox="0 0 8 6"><path fill-rule="evenodd" clip-rule="evenodd" d="M7.69471 1.69471C7.87687 1.50611 7.97766 1.25351 7.97539 0.991311C7.97311 0.729114 7.86794 0.478302 7.68253 0.292894C7.49712 0.107485 7.24631 0.00231622 6.98411 3.78025e-05C6.72192 -0.00224062 6.46931 0.0985542 6.28071 0.280712L2.98771 3.57371L1.69471 2.28071C1.50611 2.09855 1.25351 1.99776 0.991311 2.00004C0.729114 2.00232 0.478302 2.10749 0.292894 2.29289C0.107485 2.4783 0.00231622 2.72911 3.78025e-05 2.99131C-0.00224062 3.25351 0.0985542 3.50611 0.280712 3.69471L2.28071 5.69471C2.46824 5.88218 2.72255 5.9875 2.98771 5.9875C3.25288 5.9875 3.50718 5.88218 3.69471 5.69471L7.69471 1.69471Z"></path></svg>'),hk=I('<div class="relative"><svg fill="none" xmlns="http://www.w3.org/2000/svg"><circle fill="none"></circle><!></svg> <!></div>');function Io(r,t){if(new.target)return Bt({component:Io,...r});Ht(t,!0);let n=y(t,"phase",7),a=y(t,"progress",7,0),s=y(t,"size",7,16),o=y(t,"class",7,""),c=d(()=>s()/2),l=d(()=>e(c)),f=d(()=>e(c)),i=d(()=>s()*.12),p=d(()=>e(c)-e(i)/2),g=d(()=>e(c)*.35),O=d(()=>2*Math.PI*e(g)),b=d(()=>Math.max(0,Math.min(1,a()))*e(O));const h={planning:"#99999999",building:"#54B1F3",reviewing:"#6D7FF5",shipped:"var(--color-foreground)"};let P=d(()=>h[n()]||"currentColor");var R={get phase(){return n()},set phase(le){n(le),_()},get progress(){return a()},set progress(le=0){a(le),_()},get size(){return s()},set size(le=16){s(le),_()},get class(){return o()},set class(le=""){o(le),_()},$set:Ft,$on:(le,fe)=>zt(t,le,fe)},B=hk(),F=S(B),T=S(F),L=m(T);{var U=le=>{},E=le=>{var fe=vk();k(()=>{re(fe,"cx",e(l)),re(fe,"cy",e(f)),re(fe,"r",e(g)*.8),re(fe,"stroke",e(P)),re(fe,"stroke-width",e(g)*1.5),re(fe,"stroke-dasharray",`${e(b)??""} ${e(O)??""}`),re(fe,"stroke-dashoffset",e(O)*.25),re(fe,"transform",`rotate(-90 ${e(l)??""} ${e(f)??""})`)}),u(le,fe)},z=le=>{var fe=id();k(()=>{re(fe,"cx",e(l)),re(fe,"cy",e(f)),re(fe,"r",e(p)*.6),re(fe,"fill",e(P))}),u(le,fe)},J=le=>{var fe=id();k(()=>{re(fe,"cx",e(l)),re(fe,"cy",e(f)),re(fe,"r",e(p)),re(fe,"fill",e(P))}),u(le,fe)};D(L,le=>{n()==="planning"?le(U):n()==="building"?le(E,1):n()==="reviewing"?le(z,2):n()==="shipped"&&le(J,3)})}w(F);var Y=m(F,2);{var Q=le=>{},Ie=le=>{var fe=mk();k(()=>re(fe,"width",s()*.5)),u(le,fe)};D(Y,le=>{n()==="reviewing"?le(Q):n()==="shipped"&&le(Ie,1)})}return w(B),k(()=>{re(F,"width",s()),re(F,"height",s()),re(F,"viewBox",`0 0 ${s()??""} ${s()??""}`),gt(F,0,ir(o())),re(T,"cx",e(l)),re(T,"cy",e(f)),re(T,"r",e(p)),re(T,"stroke",e(P)),re(T,"stroke-width",e(i))}),u(r,B),jt(R)}var ld=I('<span class="flex items-center gap-1"><span class="size-1.5 rounded-full"></span> </span>'),bk=I('<span class="flex items-center gap-1"><span class="size-1.5 rounded-full bg-border"></span> </span>'),cd=I('<span class="text-ui text-subtle truncate"> </span>'),dd=I('<div class="flex items-center gap-1 mt-0.5"><!> <!></div>'),ud=I('<div class="flex items-start gap-2"><div class="shrink-0 mt-0.5"><!></div> <div class="flex-1 min-w-0"><div class="text-xs leading-snug truncate"> </div> <!></div></div>'),yk=I('<div class="flex items-center gap-2"><div class="shrink-0"><!></div> <span class="text-ui text-subtle truncate line-through"> </span></div>'),_k=I('<span class="text-ui text-subtle pl-4"> </span>'),xk=I('<div class="flex flex-col gap-0.5 pt-1 border-t border-border"><!> <!></div>'),wk=I('<div class="text-ui text-subtle"> </div>'),kk=I("<!> <!> <!> <!>",1),Ik=I('<div class="flex flex-col py-2 px-3 gap-2 max-h-80 overflow-y-auto"><div class="flex items-center justify-between gap-3"><span class="text-xs font-semibold text-foreground"> </span> <div class="flex items-center gap-3 text-ui text-subtle"><!> <!> <!></div></div> <!></div>'),Sk=I('<div class="rounded-[0.5px]"></div>');function vf(r,t){if(new.target)return Bt({component:vf,...r});Ht(t,!0);let n=y(t,"stats",7),a=y(t,"tasks",23,()=>[]),s=y(t,"maxBars",7,20),o=y(t,"barWidth",7,"1px"),c=y(t,"barHeight",7,"16px"),l=y(t,"gap",7,"1px"),f=y(t,"class",7);const i={completed:"#22c55e",inProgress:"#4F7BF7",notStarted:"var(--border)"};let p=d(()=>{const{completed:L,inProgress:U,notStarted:E,total:z}=n();if(z===0)return[];const J=[...Array(L).fill("completed"),...Array(U).fill("inProgress"),...Array(Math.max(0,E)).fill("notStarted")];return J.length<=s()?J:J.slice(J.length-s())}),g=d(()=>a().filter(L=>L.status==="complete")),O=d(()=>a().filter(L=>L.status==="in_progress"||L.status==="review_required")),b=d(()=>a().filter(L=>L.status!=="complete"&&L.status!=="in_progress"&&L.status!=="review_required"&&L.status!=="cancelled")),h=d(()=>a().filter(L=>L.status==="cancelled")),P=d(()=>a().length>0);var R={get stats(){return n()},set stats(L){n(L),_()},get tasks(){return a()},set tasks(L=[]){a(L),_()},get maxBars(){return s()},set maxBars(L=20){s(L),_()},get barWidth(){return o()},set barWidth(L="1px"){o(L),_()},get barHeight(){return c()},set barHeight(L="16px"){c(L),_()},get gap(){return l()},set gap(L="1px"){l(L),_()},get class(){return f()},set class(L){f(L),_()},$set:Ft,$on:(L,U)=>zt(t,L,U)},B=kt(),F=je(B);{var T=L=>{Ci(L,{side:"top",align:"start",sideOffset:6,contentClass:"max-w-xs p-0",delayDuration:200,disableHoverableContent:!1,content:E=>{var z=Ik(),J=S(z),Y=S(J),Q=M(Y,!0),Ie=m(Y,2),le=S(Ie);{var fe=Ee=>{var Se=ld(),ke=S(Se);Nn(ke,"",{},{"background-color":"#22c55e"});var Be=m(ke);w(Se),k(()=>x(Be,` ${n().completed??""}`)),u(Ee,Se)};D(le,Ee=>{n().completed>0&&Ee(fe)})}var ce=m(le,2);{var Le=Ee=>{var Se=ld(),ke=S(Se);Nn(ke,"",{},{"background-color":"#4F7BF7"});var Be=m(ke);w(Se),k(()=>x(Be,` ${n().inProgress??""}`)),u(Ee,Se)};D(ce,Ee=>{n().inProgress>0&&Ee(Le)})}var G=m(ce,2);{var we=Ee=>{var Se=bk(),ke=m(S(Se));w(Se),k(()=>x(ke,` ${n().notStarted??""}`)),u(Ee,Se)};D(G,Ee=>{n().notStarted>0&&Ee(we)})}w(Ie),w(J);var $=m(J,2);{var We=Ee=>{var Se=kk(),ke=je(Se);Rt(ke,17,()=>e(O),Tr,(K,V)=>{var W=ud(),ie=S(W),ge=S(ie);oi(ge,{get status(){return e(V).status},size:14}),w(ie);var X=m(ie,2),de=S(X),Ne=M(de,!0),Ce=m(de,2);{var rt=me=>{var Re=dd(),q=S(Re);{let N=d(()=>e(V).agentState||"idle");Hl(q,{get agentId(){return e(V).agentId},get state(){return e(N)},size:12,get specialist(){return e(V).agentSpecialist}})}var Pe=m(q,2);{var ue=N=>{var H=cd(),pe=M(H,!0);k(()=>x(pe,e(V).agentName)),u(N,H)};D(Pe,N=>{e(V).agentName&&N(ue)})}w(Re),u(me,Re)};D(Ce,me=>{e(V).agentId&&me(rt)})}w(X),w(W),k(()=>x(Ne,e(V).title)),u(K,W)});var Be=m(ke,2);Rt(Be,17,()=>e(b),Tr,(K,V)=>{var W=ud(),ie=S(W),ge=S(ie);oi(ge,{get status(){return e(V).status},size:14}),w(ie);var X=m(ie,2),de=S(X),Ne=M(de,!0),Ce=m(de,2);{var rt=me=>{var Re=dd(),q=S(Re);{let N=d(()=>e(V).agentState||"idle");Hl(q,{get agentId(){return e(V).agentId},get state(){return e(N)},size:12,get specialist(){return e(V).agentSpecialist}})}var Pe=m(q,2);{var ue=N=>{var H=cd(),pe=M(H,!0);k(()=>x(pe,e(V).agentName)),u(N,H)};D(Pe,N=>{e(V).agentName&&N(ue)})}w(Re),u(me,Re)};D(Ce,me=>{e(V).agentId&&me(rt)})}w(X),w(W),k(()=>x(Ne,e(V).title)),u(K,W)});var Xe=m(Be,2);{var ae=K=>{var V=xk(),W=S(V);Rt(W,17,()=>e(g).slice(0,3),Tr,(X,de)=>{var Ne=yk(),Ce=S(Ne),rt=S(Ce);oi(rt,{status:"complete",size:12}),w(Ce);var me=m(Ce,2),Re=M(me,!0);w(Ne),k(()=>x(Re,e(de).title)),u(X,Ne)});var ie=m(W,2);{var ge=X=>{var de=_k(),Ne=M(de,!0);k(Ce=>x(Ne,Ce),[()=>v.workspace_taskProgressBar_moreCompleted_label({count:nr(e(g).length-3)})]),u(X,de)};D(ie,X=>{e(g).length>3&&X(ge)})}w(V),u(K,V)};D(Xe,K=>{e(g).length>0&&K(ae)})}var Z=m(Xe,2);{var Je=K=>{var V=wk(),W=M(V,!0);k(ie=>x(W,ie),[()=>v.workspace_taskProgressBar_cancelled_label({count:nr(e(h).length)})]),u(K,V)};D(Z,K=>{e(h).length>0&&K(Je)})}u(Ee,Se)};D($,Ee=>{e(P)&&Ee(We)})}w(z),k(Ee=>x(Q,Ee),[()=>v.workspace_taskProgressBar_tasksRatio_label({completed:nr(n().completed),total:nr(n().total)})]),u(E,z)},children:(E,z)=>{{let J=d(()=>In("flex h-auto min-w-0 shrink items-end justify-start cursor-default rounded-none border-0",f())),Y=d(()=>`gap: ${l()}`),Q=d(()=>v.workspace_taskProgressBar_tasksRatio_label({completed:nr(n().completed),total:nr(n().total)}));yt(E,{variant:"plain",type:"button",wrapContent:!1,get class(){return e(J)},get style(){return e(Y)},get"aria-label"(){return e(Q)},"data-task-progress-trigger":!0,children:(Ie,le)=>{var fe=kt(),ce=je(fe);Rt(ce,17,()=>e(p),Tr,(Le,G)=>{var we=Sk();let $;k(()=>$=Nn(we,"",$,{width:o(),height:c(),"background-color":i[e(G)]})),u(Le,we)}),u(Ie,fe)},$$slots:{default:!0}})}},$$slots:{content:!0,default:!0}})};D(F,L=>{n().total>0&&L(T)})}return u(r,B),jt(R)}function Il(r,t){if(new.target)return Bt({component:Il,...r});Ht(t,!0);let n=y(t,"items",7),a=y(t,"ariaLabel",7),s=y(t,"open",15,!1),o=y(t,"orientation",7,"vertical"),c=y(t,"selection",7),l=y(t,"class",7,"");const f=d(()=>Pg(n(),c(),a()));var i={get items(){return n()},set items(p){n(p),_()},get ariaLabel(){return a()},set ariaLabel(p){a(p),_()},get open(){return s()},set open(p=!1){s(p),_()},get orientation(){return o()},set orientation(p="vertical"){o(p),_()},get selection(){return c()},set selection(p){c(p),_()},get class(){return l()},set class(p=""){l(p),_()},$set:Ft,$on:(p,g)=>zt(t,p,g)};return Jm(r,{get actions(){return e(f)},align:"end",get ariaLabel(){return a()},onAction:g=>Eg(n(),g)?.onClick(),get open(){return s()},set open(g){s(g)},trigger:(g,O)=>{let b=()=>(O?.()).props;yt(g,el(b,{variant:"plain",size:"icon-compact",iconOnly:!0,type:"button",get class(){return l()},get"aria-label"(){return a()},onclick:h=>{h.stopPropagation(),b().onclick?.(h)},oncontextmenu:h=>{h.preventDefault(),h.stopPropagation()},children:(h,P)=>{Ym(h,{get orientation(){return o()},class:"size-3.5"})},$$slots:{default:!0}}))},$$slots:{trigger:!0}}),jt(i)}var Ck=I('<span class="contents"><!></span>'),Ek=I("<!> <!>",1);function mf(r,t){if(new.target)return Bt({component:mf,...r});Ht(t,!0);let n=y(t,"workspaceId",7),a=y(t,"slot",7);const s=d(()=>iv(a()));let o=ye(null);wt(()=>{e(o)&&e(o).workspaceId!==n()&&A(o,null)});function c(h){const P=Ad(h);P&&A(o,{...P,workspaceId:n()},!0)}function l(h){h.preventDefault(),h.stopPropagation();const P=h.currentTarget.getBoundingClientRect();A(o,{x:P.left,y:P.bottom+2,returnFocus:h.currentTarget,workspaceId:n()},!0)}function f(){A(o,null)}var i={get workspaceId(){return n()},set workspaceId(h){n(h),_()},get slot(){return a()},set slot(h){a(h),_()},$set:Ft,$on:(h,P)=>zt(t,h,P)},p=Ek(),g=je(p);{let h=d(()=>v.workspace_microKeyBadge_ariaLabel({number:nr(a()+1)})),P=d(()=>v.workspace_microKeyBadge_tooltip({number:nr(a()+1)})),R=d(()=>e(o)!==null);yt(g,{variant:"ghost",size:"icon",type:"button",class:"micro-key-slot-badge size-4 min-w-0 shrink-0 cursor-pointer rounded-[3px] p-0 a11y-ignore",get"aria-label"(){return e(h)},get title(){return e(P)},onclick:l,oncontextmenu:c,onkeydown:c,"aria-haspopup":"menu",get"aria-expanded"(){return e(R)},children:(B,F)=>{var T=Ck(),L=S(T);og(L,{get slot(){return a()},get class(){return`transition-colors ${e(s)??""}`}}),w(T),u(B,T)},$$slots:{default:!0}})}var O=m(g,2);{var b=h=>{{let P=d(()=>e(o)?.x??0),R=d(()=>e(o)?.y??0),B=d(()=>e(o)?.returnFocus),F=d(()=>v.workspace_card_assignMicroKey_label()),T=d(()=>eb(n(),f));Td(h,{get x(){return e(P)},get y(){return e(R)},get returnFocus(){return e(B)},selection:"single",get ariaLabel(){return e(F)},get items(){return e(T)},onClickOutside:f})}};D(O,h=>{e(o)&&h(b)})}return u(r,p),jt(i)}var Pk=I('<span class="flex size-4 shrink-0 items-center justify-center"><!></span>'),Ak=I('<span data-workspace-card-pin-indicator="" aria-hidden="true"><!></span> <span class="sr-only"> </span>',1),Tk=I('<span class="type-caption shrink-0 rounded-sm bg-muted-foreground/10 px-1.5 font-normal text-muted-foreground" data-workspace-card-trailing-label=""> </span>'),Rk=I('<span data-workspace-card-pr-item=""><!></span>'),Mk=I('<span class="flex shrink-0 items-center" data-workspace-card-pr-list=""><!></span>'),Nk=I('<span data-workspace-card-time=""><!></span>'),Lk=I('<span aria-hidden="true"><!></span>'),Ok=I("<div><!> <!> <!> <!></div>"),Dk=I('<div data-workspace-card-hover-surface=""><!></div>'),Bk=I('<div role="group" data-workspace-card-row=""><!> <div class="relative z-10 flex shrink-0 items-center gap-1.5"><!> <!> <span class="sr-only"> </span></div> <div class="relative z-10 flex min-w-0 flex-1 items-center gap-2"><span class="flex min-w-0 flex-1 items-center gap-1" data-workspace-card-title-group=""><span dir="ltr" data-workspace-card-title=""><span class="wc-title-text svelte-1ct56pd"> </span></span> <!></span> <!> <!> <!></div> <!></div> <!> <!>',1),Fk=I('<div class="relative z-10 flex shrink-0 items-center"><!></div>'),zk=I('<div><!> <!> <span class="font-medium truncate"> </span> <span class="shrink-0 text-muted-foreground">·</span> <span class="truncate text-xs text-muted-foreground"> </span> <!></div>'),Hk=I('<div class="text-sm font-semibold truncate"> </div>'),fd=I('<span class="truncate"> </span>'),jk=I('<span class="text-muted-foreground">·</span>'),Wk=I('<div class="flex items-center gap-1 truncate text-xs text-muted-foreground"><!> <!> <!></div>'),Uk=I('<div><!> <!> <div class="flex items-center gap-2 text-xs"><!> <span class="truncate text-muted-foreground"> </span> <span> </span></div> <!></div>'),qk=I('<div class="flex items-center gap-2"><!> <span class="text-ui shrink-0 tabular-nums text-muted-foreground"> </span></div>'),Vk=I('<div class="flex items-center justify-between text-ui"><span class="text-muted-foreground"> </span> <span class="tabular-nums"><span class="text-success"> </span> <span class="ml-1 text-danger"> </span></span></div>'),Kk=I('<div class="flex items-center justify-between text-ui"><span class="text-muted-foreground"> </span></div>'),Gk=I('<div class="flex items-center text-ui"><span> </span></div>'),Jk=I('<div class="flex flex-col gap-1 px-3 pb-2.5"><!> <!> <!> <!></div>'),Yk=I('<div class="relative z-10 flex items-center gap-1.5 px-2 pb-2"><!></div>'),Xk=I('<div class="relative z-10 flex items-center gap-1.5 px-2 pb-2"><!> <!></div>'),Zk=I('<div role="group"><!> <div class="flex items-start gap-2.5 px-3 pt-3 pb-2"><!> <div class="flex-1 min-w-0"><div class="text-sm font-medium"> </div> <div class="mt-0.5 line-clamp-2 text-xs leading-snug text-muted-foreground"> </div></div></div> <!> <!></div>');function hf(r,t){if(new.target)return Bt({component:hf,...r});Ht(t,!0);const n=()=>bt(Be,"$prMonitors$",c),a=()=>bt(Xe,"$microConnected$",c),s=()=>bt(Z,"$hidesOwnerActions$",c),o=()=>bt(ae,"$workspaceKeySlot$",c),[c,l]=ga();let f=y(t,"workspace",7),i=y(t,"phase",7),p=y(t,"stats",7),g=y(t,"variant",7,"compact"),O=y(t,"showTime",7,!0),b=y(t,"isRunning",7,!1),h=y(t,"isUnread",7,!1),P=y(t,"isWaiting",7),R=y(t,"isPinned",7,!1),B=y(t,"streamingAgentIds",23,()=>[]),F=y(t,"hasSpec",7,!1),T=y(t,"isAgentRunning",7,!1),L=y(t,"agentDigest",7),U=y(t,"trailingLabel",7),E=y(t,"title",7),z=y(t,"repoName",7),J=y(t,"branch",7),Y=y(t,"onClick",7),Q=y(t,"onAction",7),Ie=y(t,"onTogglePin",7),le=y(t,"onMarkAsRead",7),fe=y(t,"onOpenInNewWindow",7),ce=y(t,"onHover",7),Le=y(t,"highlighted",7,!1),G=y(t,"selected",7,!1),we=y(t,"highlightId",7),$=y(t,"suppressHover",7,!1),We=y(t,"isolateHoverReveal",7,!1),Ee=y(t,"class",7),Se=y(t,"actions",7);const ke=Is("");wt(()=>{ke.set(f()?.id??"")});const Be=Gp(ke),Xe=gb(),ae=Fv(ke),Z=Jp(ke),Je=d(()=>rb(f()??{})),K=d(()=>nb(e(Je)));let V=d(()=>f()?pb.url.pathname===`/workspace/${f().id}`:!1),W=d(()=>f()?`workspace-hover-card-${f().id}`:void 0),ie=ye(!1),ge=ye(null),X=ye(null);wt(()=>{if(!e(X))return;const te=vo(e(X),{id:we()});return()=>te.destroy()});let de=ye(null),Ne=ye(null),Ce=ye(null),rt=ye(0),me=ye(0),Re=d(()=>e(rt)+(e(me)>0?e(me)+4:0));function q(){const te=e(de),pt=e(Ce);A(rt,te?Math.max(0,te.scrollWidth-te.clientWidth):0,!0),A(me,te&&pt&&pt.getClientRects().length>0?Math.max(0,te.getBoundingClientRect().right-pt.getBoundingClientRect().left):0,!0)}wt(()=>{const te=e(de),pt=e(Ne),qt=e(Ce);if(!te||!pt||(q(),typeof ResizeObserver>"u"))return;const Jt=new ResizeObserver(q);return Jt.observe(te),Jt.observe(pt),qt&&Jt.observe(qt),()=>Jt.disconnect()});let Pe=null,ue=null,N=!1,H=!1,pe=!1,Qe=!1,Te=!1,Fe=!1,et=ye(!1),se=!1,ze=null,nt=ye(null),dt=null,Ke;function tt(){Pe!==null&&(clearTimeout(Pe),Pe=null)}function st(){ue!==null&&(clearTimeout(ue),ue=null),dt?.(),dt=null}function vt(){st(),A(et,!0),A(ie,!0),!Te&&(Te=!0,js.notifyOpened())}function _t(){st(),clearTimeout(Ke),A(et,!1),A(ie,!1),H=!1,Qe=!1,Te&&(Te=!1,js.notifyClosed())}function Ot(){return N||H||pe||Qe}function Dt(){if(!e(ie)){_t();return}st(),ue=setTimeout(()=>{ue=null,Ot()||_t()},sb),dt=js.deferClose(_t)}function Yt(){H=!0,st()}function Et(){H=!1,!pe&&!Qe&&Dt()}function Wt(){Qe=!0,clearTimeout(Ke),st()}function Qt(te){const pt=te.relatedTarget instanceof Node?te.relatedTarget:null;if(pt&&ve()?.contains(pt)||(Qe=!1,pt&&e(ge)?.contains(pt)))return;if(pt){!N&&!H&&_t();return}const qt=te.target;clearTimeout(Ke),Ke=setTimeout(()=>{const Jt=document.activeElement,_r=ve()?.contains(Jt)||e(ge)?.contains(Jt);Jt&&Jt!==qt&&_r||!N&&!H&&_t()},0)}function lr(){ze!==null&&clearTimeout(ze),se=!0,ze=setTimeout(()=>{se=!1,ze=null},0)}function Mt(te){const pt=te.target,qt=ve();pt instanceof Node&&qt?.contains(pt)||te.type==="scroll"&&e(ge)&&pt instanceof Node&&!pt.contains(e(ge))||(te.type==="pointerdown"&&lr(),tt(),_t())}wt(()=>{if(e(et))return window.addEventListener("pointerdown",Mt,!0),window.addEventListener("scroll",Mt,!0),()=>{window.removeEventListener("pointerdown",Mt,!0),window.removeEventListener("scroll",Mt,!0)}});function St(te){if(te.key!=="Escape")return;const pt=te.target;pt instanceof Node&&ve()?.contains(pt)||(te.preventDefault(),te.stopPropagation(),Fe=pe,tt(),_t())}wt(()=>{if(e(ie))return window.addEventListener("keydown",St,!0),()=>window.removeEventListener("keydown",St,!0)});const _e=d(()=>f()?Xp.select(Nt.state,f().id):null),ee=d(()=>e(_e)?e(_e):f()?.activePullRequest?f().activePullRequest:!f()?.prStatus||f().prNumber==null?null:{id:`legacy-pr-${f().prNumber}`,number:f().prNumber,url:f().prUrl??"",title:v.workspace_hoverCard_pullRequest_label(),status:f().prStatus,createdAt:f().updatedAt,updatedAt:f().updatedAt}),Ue=d(()=>Yp(f())),at=d(()=>{if(!f()||e(Ue))return[];const te=f(),pt=te.repositoryOwner&&te.repositoryName?`${te.repositoryOwner}/${te.repositoryName}`:void 0;return Ag({workspacePRs:te.pullRequests,activePR:e(ee),monitors:n(),workspaceRepo:pt,buildPrUrl:(qt,Jt)=>Pm(qt,te.repositoryOwner,te.repositoryName,Jt),getDisplayTitle:qt=>qt.title})}),ot=d(()=>e(at)[0]);function De(te){const pt=te.resource?.repository.provider==="gitlab"?`${te.repo} !${te.number}`:te.repo?v.workspace_card_prBadge_repoLine_tooltip({repo:te.repo,number:te.number}):v.workspace_card_prBadge_label({number:` #${te.number}`});return[Zp(pt,te),te.title,te.details].filter(Boolean).join(`
|
|
262
262
|
`)}function oe(te){te.key==="Enter"&&Y()?.(te)}function ve(){return e(W)?document.getElementById(e(W)):null}function ne(){return Array.from(ve()?.querySelectorAll("button:not(:disabled), a[href]")??[])}function Me(){const te=e(ge)?.querySelector("[data-workspace-card-trigger]"),pt=ve();if(!te||!pt)return null;const qt=Array.from(document.querySelectorAll('button:not(:disabled), a[href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex="-1"])')).filter(_r=>_r.tabIndex>=0&&!pt.contains(_r)),Jt=qt.indexOf(te);return Jt>=0?qt[Jt+1]:null}function he(te){Fe=!!e(ge)?.contains(te),_t(),te.focus({preventScroll:!0})}function He(){const te=e(ge)?.querySelector("[data-workspace-card-trigger]");te&&he(te)}async function Ve(te){if(te.key==="Escape"&&e(ie)){te.preventDefault(),te.stopPropagation(),_t();return}te.key!=="ArrowDown"||$()||!f()||(te.preventDefault(),te.stopPropagation(),A(et,!0),A(ie,!0),await ca(),ne()[0]?.focus({preventScroll:!0}))}function qe(te){const pt=ne(),qt=te.key==="Tab"&&te.shiftKey&&te.currentTarget===pt[0],_r=te.key==="Tab"&&!te.shiftKey&&te.currentTarget===pt.at(-1)?Me():null;te.key!=="Escape"&&!qt&&!_r||(te.preventDefault(),te.stopPropagation(),_r?he(_r):He())}function $e(){N=!0,st(),js.settleDeferredCloses(),q(),ce()?.(),f()&&!$()&&!pe&&(tt(),A(et,!0),Pe=setTimeout(()=>{Pe=null,vt()},js.currentOpenDelay))}function Oe(){N=!1,tt(),!pe&&!Qe&&Dt()}function Ye(){pe=!0,tt(),st(),!Fe&&(se||f()&&!$()&&(A(et,!0),A(ie,!0)))}function xe(te){const pt=te.relatedTarget instanceof Node?te.relatedTarget:null;pt&&e(ge)?.contains(pt)||(Fe=!1,pe=!1,!(pt&&ve()?.contains(pt))&&!N&&!H&&_t())}wt(()=>{$()&&(tt(),st(),_t())});let Ze=ye(null),ft=ye(!1),ct;wt(()=>{const te=f()?.id;ct!==te&&(ct=te,A(ft,!1)),e(Ze)&&e(Ze).workspaceId!==f()?.id&&Ct()});function it(te){if(!f())return;const pt=Ad(te);if(pt){if(A(ft,!1),mt().length===0){A(Ze,null);return}A(Ze,{...pt,returnFocus:te.target instanceof HTMLElement?te.target.closest("button")??e(ge)?.querySelector("button")??null:null,workspaceId:f().id},!0)}}function Ct(){A(Ze,null),A(ft,!1)}wt(()=>{e(ft)&&A(Ze,null)}),eo(()=>{tt(),st(),ze!==null&&(clearTimeout(ze),ze=null),_t()});function mt(){if(!f())return[];const te=[];return fe()&&te.push({id:"open-new-window",label:v.workspace_card_openNewWindow_label(),icon:Dd,onClick:()=>{fe()?.(),Ct()}}),te.push(...ab(f().id,{connected:a(),onClose:Ct})),s()||(e(Ue)||te.push({id:"transfer",label:v.workspace_card_transfer_label(),icon:Xg,onClick:()=>{Nt.dispatch(xv({workspaceId:f().id,workspaceTitle:f().title})),Ct()}}),te.push({id:"archive",label:v.workspace_card_archive_label(),icon:Bd,onClick:()=>{Nt.dispatch(Yd(f().id)),Ct()}}),te.push({id:"delete",label:v.workspace_card_deleteSpace_label(),icon:Fd,destructive:!0,onClick:()=>{Nt.dispatch(Xd(f().id)),Ct()}})),te}let Lt=d(()=>T()&&L()?L():i()?.subtitle??""),Kt=d(()=>p()&&p().tasks.total>0?p().tasks.completed/p().tasks.total:0),Zt=d(()=>!!p()&&(p().tasks.total>0||p().files.changed>0||p().commits.total>0||p().pr.hasOpen||p().pr.hasMerged)),cr=d(()=>e(Ue)?void 0:J()),Hr=d(()=>!p()||e(Ue)?"":p().pr.hasMerged?v.workspace_card_prMerged_label({number:p().pr.number??""}):p().pr.hasOpen?v.workspace_card_prOpen_label({number:p().pr.number?`#${p().pr.number}`:""}):""),ln=d(()=>i()?.phase==="planning"?T()?{primary:{label:v.workspace_card_showCoordinator_label(),action:"show-coordinator"},secondary:{label:v.workspace_card_pause_label(),action:"pause"}}:F()||(p()?.tasks.total??0)>0?{primary:{label:v.workspace_card_approveStart_label(),action:"approve"},secondary:{label:v.workspace_card_viewSpec_label(),action:"view-spec"}}:{primary:{label:v.workspace_card_showCoordinator_label(),action:"show-coordinator"},secondary:{label:v.workspace_card_viewSpec_label(),action:"view-spec"}}:i()?.phase==="building"?{primary:{label:v.workspace_card_showCoordinator_label(),action:"show-coordinator"},secondary:{label:v.workspace_card_pause_label(),action:"pause"}}:i()?.phase==="reviewing"?{primary:{label:v.workspace_card_createPr_label(),action:"create-pr"},secondary:{label:v.workspace_card_showChanges_label(),action:"show-changes"}}:{primary:{label:v.workspace_card_archive_label(),action:"archive"},secondary:{label:v.workspace_card_showChanges_label(),action:"show-changes"}});const $r={planning:"bg-muted/20 text-muted-foreground",building:"bg-info/15 text-info",reviewing:"bg-primary/15 text-primary",shipped:"bg-foreground/10 text-foreground"};var mr={get workspace(){return f()},set workspace(te){f(te),_()},get phase(){return i()},set phase(te){i(te),_()},get stats(){return p()},set stats(te){p(te),_()},get variant(){return g()},set variant(te="compact"){g(te),_()},get showTime(){return O()},set showTime(te=!0){O(te),_()},get isRunning(){return b()},set isRunning(te=!1){b(te),_()},get isUnread(){return h()},set isUnread(te=!1){h(te),_()},get isWaiting(){return P()},set isWaiting(te){P(te),_()},get isPinned(){return R()},set isPinned(te=!1){R(te),_()},get streamingAgentIds(){return B()},set streamingAgentIds(te=[]){B(te),_()},get hasSpec(){return F()},set hasSpec(te=!1){F(te),_()},get isAgentRunning(){return T()},set isAgentRunning(te=!1){T(te),_()},get agentDigest(){return L()},set agentDigest(te){L(te),_()},get trailingLabel(){return U()},set trailingLabel(te){U(te),_()},get title(){return E()},set title(te){E(te),_()},get repoName(){return z()},set repoName(te){z(te),_()},get branch(){return J()},set branch(te){J(te),_()},get onClick(){return Y()},set onClick(te){Y(te),_()},get onAction(){return Q()},set onAction(te){Q(te),_()},get onTogglePin(){return Ie()},set onTogglePin(te){Ie(te),_()},get onMarkAsRead(){return le()},set onMarkAsRead(te){le(te),_()},get onOpenInNewWindow(){return fe()},set onOpenInNewWindow(te){fe(te),_()},get onHover(){return ce()},set onHover(te){ce(te),_()},get highlighted(){return Le()},set highlighted(te=!1){Le(te),_()},get selected(){return G()},set selected(te=!1){G(te),_()},get highlightId(){return we()},set highlightId(te){we(te),_()},get suppressHover(){return $()},set suppressHover(te=!1){$(te),_()},get isolateHoverReveal(){return We()},set isolateHoverReveal(te=!1){We(te),_()},get class(){return Ee()},set class(te){Ee(te),_()},get actions(){return Se()},set actions(te){Se(te),_()},$set:Ft,$on:(te,pt)=>zt(t,te,pt)},qn=kt(),ea=je(qn);{var Vn=te=>{var pt=Bk(),qt=je(pt);let Jt;var _r=S(qt);{let ht=d(()=>f().title||v.workspace_links_untitled_label()),Pt=d(()=>`workspace-status-state-${f().id}${R()?` workspace-pinned-state-${f().id}`:""}${e(ie)?` ${e(W)}`:""}`),ar=d(()=>e(V)?"page":void 0);yt(_r,{variant:"plain",class:"absolute inset-0 z-0 h-auto w-auto rounded-md focus-visible:border-transparent focus-visible:bg-background/50 focus-visible:ring-0",get"aria-label"(){return e(ht)},get"aria-describedby"(){return e(Pt)},get"aria-current"(){return e(ar)},"data-workspace-card-trigger":!0,onkeydown:Ve,onclick:hr=>{hr.stopPropagation(),Y()?.(hr)}})}var Kn=m(_r,2),Jr=S(Kn);{var Gn=ht=>{var Pt=Pk(),ar=S(Pt);{var hr=wr=>{mf(wr,{get workspaceId(){return f().id},get slot(){return o()}})};D(ar,wr=>{o()!==null&&wr(hr)})}w(Pt),u(ht,Pt)};D(Jr,ht=>{a()&&ht(Gn)})}var fn=m(Jr,2);Ci(fn,{get content(){return e(K).tooltip},side:"bottom",sideOffset:4,children:(ht,Pt)=>{tb(ht,{get status(){return e(Je)},size:14,decorative:!0,class:"justify-start"})},$$slots:{default:!0}});var Jn=m(fn,2),ta=M(Jn,!0);w(Kn);var jr=m(Kn,2),en=S(jr),rr=S(en),Wr=S(rr),pn=M(Wr,!0);pr(Wr,ht=>A(Ne,ht),()=>e(Ne)),w(rr),pr(rr,ht=>A(de,ht),()=>e(de));var xr=m(rr,2);{var Or=ht=>{var Pt=Ak(),ar=je(Pt),hr=S(ar);At(hr,{get icon(){return Vl},size:"xs"}),w(ar);var wr=m(ar,2),Dr=M(wr,!0);k(yn=>{gt(ar,1,`wc-pin-indicator inline-flex shrink-0 items-center text-muted-foreground transition-opacity
|
|
263
|
-
${Ie()?Le()?"opacity-0":$()?"":We()?"group-hover/wc:opacity-0 group-focus-within/wc:opacity-0":"group-hover:opacity-0 group-focus-within:opacity-0":""}`,"svelte-1ct56pd"),re(wr,"id",`workspace-pinned-state-${f().id??""}`),x(Dr,yn)},[()=>v.layout_activeCard_pinned_header()]),u(ht,Pt)};D(xr,ht=>{R()&&ht(Or)})}w(en);var gn=m(en,2);{var va=ht=>{var Pt=Tk(),ar=M(Pt,!0);k(()=>x(ar,U())),u(ht,Pt)};D(gn,ht=>{U()&&ht(va)})}var tn=m(gn,2);{var Yr=ht=>{const Pt=d(()=>e(ot));var ar=Mk(),hr=S(ar);{let wr=d(()=>De(e(Pt)));Ci(hr,{get content(){return e(wr)},side:"bottom",sideOffset:4,children:(Dr,yn)=>{var ra=kt(),Dn=je(ra);{var Cr=cn=>{{let Er=d(()=>De(e(Pt)));yt(cn,{variant:"plain",size:"icon-compact",iconOnly:!0,get class(){return`size-5 shrink-0 rounded-sm ${e(Pt).foregroundClass??""}`},get"aria-label"(){return e(Er)},"data-workspace-card-pr-item":!0,get"data-pr-identity"(){return e(Pt).identity},get"data-pr-status"(){return e(Pt).status},onclick:nn=>{nn.stopPropagation();const Ta=f().id;Ip(async()=>{const{handleLink:Yn}=await import("./
|
|
263
|
+
${Ie()?Le()?"opacity-0":$()?"":We()?"group-hover/wc:opacity-0 group-focus-within/wc:opacity-0":"group-hover:opacity-0 group-focus-within:opacity-0":""}`,"svelte-1ct56pd"),re(wr,"id",`workspace-pinned-state-${f().id??""}`),x(Dr,yn)},[()=>v.layout_activeCard_pinned_header()]),u(ht,Pt)};D(xr,ht=>{R()&&ht(Or)})}w(en);var gn=m(en,2);{var va=ht=>{var Pt=Tk(),ar=M(Pt,!0);k(()=>x(ar,U())),u(ht,Pt)};D(gn,ht=>{U()&&ht(va)})}var tn=m(gn,2);{var Yr=ht=>{const Pt=d(()=>e(ot));var ar=Mk(),hr=S(ar);{let wr=d(()=>De(e(Pt)));Ci(hr,{get content(){return e(wr)},side:"bottom",sideOffset:4,children:(Dr,yn)=>{var ra=kt(),Dn=je(ra);{var Cr=cn=>{{let Er=d(()=>De(e(Pt)));yt(cn,{variant:"plain",size:"icon-compact",iconOnly:!0,get class(){return`size-5 shrink-0 rounded-sm ${e(Pt).foregroundClass??""}`},get"aria-label"(){return e(Er)},"data-workspace-card-pr-item":!0,get"data-pr-identity"(){return e(Pt).identity},get"data-pr-status"(){return e(Pt).status},onclick:nn=>{nn.stopPropagation();const Ta=f().id;Ip(async()=>{const{handleLink:Yn}=await import("./CXnaNNAz.js").then(vn=>vn.H);return{handleLink:Yn}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65]),import.meta.url).then(({handleLink:Yn})=>Yn(e(Pt).url,{workspaceId:Ta,event:nn}))},children:(nn,Ta)=>{At(nn,{get icon(){return e(Pt).statusIcon},size:14})},$$slots:{default:!0}})}},Cn=cn=>{var Er=Rk(),nn=S(Er);At(nn,{get icon(){return e(Pt).statusIcon},size:14}),w(Er),k(Ta=>{gt(Er,1,`inline-flex size-5 shrink-0 items-center justify-center rounded-sm ${e(Pt).foregroundClass??""}`,"svelte-1ct56pd"),re(Er,"aria-label",Ta),re(Er,"data-pr-identity",e(Pt).identity),re(Er,"data-pr-status",e(Pt).status)},[()=>De(e(Pt))]),u(cn,Er)};D(Dn,cn=>{e(Pt).url?cn(Cr):cn(Cn,-1)})}u(Dr,ra)},$$slots:{default:!0}})}w(ar),k(wr=>re(ar,"aria-label",wr),[()=>e(Pt).resource?.repository.provider==="gitlab"?v.workspace_hoverCard_mergeRequest_label():v.workspace_hoverCard_pullRequest_label()]),u(ht,ar)};D(tn,ht=>{e(ot)&&ht(Yr)})}var Mr=m(tn,2);{var xa=ht=>{var Pt=Nk(),ar=S(Pt);{var hr=Dr=>{{let yn=d(()=>Zl(f()));ig(Dr,{get date(){return e(yn)},class:"type-caption whitespace-nowrap tabular-nums text-muted-foreground",compact:!0})}},wr=d(()=>Zl(f())>0);D(ar,Dr=>{e(wr)&&Dr(hr)})}w(Pt),k(()=>gt(Pt,1,`wc-secondary shrink-0 ${Se()||Ie()||h()&&le()?Le()?"opacity-0":$()?"":We()?"group-hover/wc:opacity-0 group-hover/message:opacity-0":"group-hover:opacity-0 group-hover/message:opacity-0":""}`,"svelte-1ct56pd")),u(ht,Pt)};D(Mr,ht=>{O()&&ht(xa)})}w(jr);var rs=m(jr,2);{var ns=ht=>{var Pt=Ok(),ar=S(Pt);{var hr=Cr=>{{let Cn=d(()=>R()?"text-primary-ink":"text-muted-foreground"),cn=d(()=>R()?v.workspace_card_unpin_ariaLabel():v.workspace_card_pin_ariaLabel()),Er=d(()=>R()?v.workspace_card_unpin_tooltip():v.workspace_card_pin_tooltip());yt(Cr,{variant:"plain",size:"icon-xs",iconOnly:!0,get class(){return`transition-all hover:bg-muted/50 hover:text-foreground focus-visible:border-transparent focus-visible:bg-muted/50 focus-visible:text-foreground focus-visible:ring-0
|
|
264
264
|
${e(Cn)??""}`},onclick:nn=>{nn.stopPropagation(),Ie()?.(nn)},get"aria-label"(){return e(cn)},get title(){return e(Er)},children:(nn,Ta)=>{var Yn=Lk(),vn=S(Yn);At(vn,{get icon(){return Vl},size:"xs"}),w(Yn),u(nn,Yn)},$$slots:{default:!0}})}};D(ar,Cr=>{Ie()&&Cr(hr)})}var wr=m(ar,2);{var Dr=Cr=>{{let Cn=d(()=>v.workspace_card_markAsRead_label()),cn=d(()=>v.workspace_card_markAsRead_label());yt(Cr,{variant:"plain",size:"icon-xs",iconOnly:!0,class:"text-muted-foreground hover:bg-muted/50 hover:text-foreground focus-visible:border-transparent focus-visible:bg-muted/50 focus-visible:text-foreground focus-visible:ring-0",onclick:Er=>{Er.stopPropagation(),le()?.(Er)},get"aria-label"(){return e(Cn)},get title(){return e(cn)},children:(Er,nn)=>{At(Er,{get icon(){return zd},size:"xs"})},$$slots:{default:!0}})}};D(wr,Cr=>{h()&&le()&&Cr(Dr)})}var yn=m(wr,2);un(yn,()=>Se()??So);var ra=m(yn,2);{var Dn=Cr=>{{let Cn=d(mt),cn=d(()=>v.workspace_progressCard_actions_ariaLabel());Il(Cr,{get items(){return e(Cn)},get ariaLabel(){return e(cn)},class:"flex size-5 cursor-pointer items-center justify-center rounded text-muted-foreground transition-colors hover:bg-muted/50 hover:text-foreground focus-visible:bg-muted/50 focus-visible:text-foreground focus-visible:outline-none",get open(){return e(ft)},set open(Er){A(ft,Er,!0)}})}};D(ra,Cr=>{fe()&&Cr(Dn)})}w(Pt),pr(Pt,Cr=>A(Ce,Cr),()=>e(Ce)),k(()=>gt(Pt,1,`wc-actions absolute right-1 top-1/2 z-20 flex -translate-y-1/2 items-center gap-0.5 rounded-md bg-accent/95 px-0.5 focus-within:opacity-100
|
|
265
265
|
${We()?"group-focus-within/wc:opacity-100":"group-focus-within:opacity-100"}
|
|
266
266
|
${Le()?"opacity-100":$()?"opacity-0":We()?"opacity-0 group-hover/wc:opacity-100":"opacity-0 group-hover:opacity-100"}`,"svelte-1ct56pd")),u(ht,Pt)};D(rs,ht=>{(Se()||fe()||Ie()||h()&&le())&&ht(ns)})}w(qt),pr(qt,ht=>A(ge,ht),()=>e(ge)),Un(qt,(ht,Pt)=>vo?.(ht,Pt),()=>({id:we()}));var Xr=m(qt,2);{var rn=ht=>{ob(ht,{get id(){return e(W)},get anchor(){return`--workspace-list-${f().id??""}`},position:"right",get anchorElement(){return e(ge)},class:"w-auto overflow-visible! rounded-lg border-0! bg-background! shadow-none!",onmouseenter:Yt,onmouseleave:Et,onfocusin:Wt,onfocusout:Qt,children:(Pt,ar)=>{var hr=Dk(),wr=S(hr);ib(wr,{get workspace(){return f()},get activeAgentIds(){return B()},onkeydown:qe}),w(hr),pr(hr,Dr=>A(nt,Dr),()=>e(nt)),Rn("pointerenter",hr,Yt),Rn("pointerleave",hr,Et),Rr("focusin",hr,Wt),Rr("focusout",hr,Qt),u(Pt,hr)},$$slots:{default:!0}})};D(Xr,ht=>{e(ie)&&!$()&&ht(rn)})}var On=m(Xr,2);{var kr=ht=>{const Pt=d(mt);var ar=kt(),hr=je(ar);{var wr=Dr=>{{let yn=d(()=>e(Ze)?.x??0),ra=d(()=>e(Ze)?.y??0),Dn=d(()=>e(Ze)?.returnFocus),Cr=d(()=>v.workspace_progressCard_actions_ariaLabel());Td(Dr,{get x(){return e(yn)},get y(){return e(ra)},get returnFocus(){return e(Dn)},get ariaLabel(){return e(Cr)},get items(){return e(Pt)},onClickOutside:Ct})}};D(hr,Dr=>{e(Pt).length>0&&Dr(wr)})}u(ht,ar)};D(On,ht=>{e(Ze)&&ht(kr)})}k((ht,Pt,ar)=>{gt(qt,1,ht,"svelte-1ct56pd"),re(qt,"data-pinned",R()),re(qt,"data-highlight-id",we()),Jt=Nn(qt,"",Jt,{"anchor-name":`--workspace-list-${f().id??""}`}),re(Jn,"id",`workspace-status-state-${f().id??""}`),x(ta,e(K).accessibleName),gt(rr,1,`wc-title type-body min-w-0 truncate font-normal!
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var a1=Object.defineProperty;var i1=(t,e,r)=>e in t?a1(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var se=(t,e,r)=>i1(t,typeof e!="symbol"?e+"":e,r);import{cD as ur,aU as s1,ds as _l,_ as R0,Y as ya,Z as o1,X as l1,a1 as c1,ab as u1,U as d1,dT as h1,M as p1,ba as Pl,cG as Pr,dr as Ll,aT as m1,aX as f1,co as g1,cE as v1,c9 as b1,dl as Xa,dN as y1,dG as w1,ay as Fn,al as k1,at as Ti,dq as Ol,dD as x1,dX as $l,dW as S1}from"./D3QcPFoL.js";import{D as Ps,bv as A1,bM as T1,aY as E1}from"./hPM-hpF1.js";import{M as M1,F as i0}from"./DyvrH0mm.js";import{yC as gn,Iy as E,ny as ge,nx as Se,aM as C1,g as Bl,y as Re,be as c0,jT as Ei,lS as vn,aj as jt,lR as Ls,l$ as Os,lY as $s,jq as ql,gj as Ka,GW as I1,t4 as z1,zZ as R1,oB as D1,mE as bn,By as N1,iw as _1,m9 as P1,lM as L1}from"./D5ej8a-y.js";import{bp as ne}from"./DXyyWeag.js";import{t as rt}from"./BboIV5H5.js";import{l as O1,d as xr}from"./ChkzKl5W.js";import{a as u0}from"./BdWqymET.js";import{o as pe,r as Gt,e as d0,s as V,_ as Xe,l as h0,g as $1,n as Pe,c as or,b as Ue,u as B1,d as q1}from"./CIyUrgF0.js";import{j as Fl}from"./uXuxG9cN.js";import{w as F1}from"./DEYvT_CO.js";import{b as H1}from"./DHQOuksI.js";import{i as He}from"./RD9QY1Yc.js";import{l as wa,c as Hl}from"./ChTqQfQN.js";import{f as Mi,C as Ul,D as Wl,l as U1,z as Gl,r as W1,u as G1}from"./CRsmjbca.js";import{e as j1,h as Sr}from"./pKvpKpo4.js";import{ax as p0}from"./Bfr1QjPr.js";import{i as Bs}from"./DogedYC1.js";const Ge=[];for(let t=0;t<256;++t)Ge.push((t+256).toString(16).slice(1));function V1(t,e=0){return(Ge[t[e+0]]+Ge[t[e+1]]+Ge[t[e+2]]+Ge[t[e+3]]+"-"+Ge[t[e+4]]+Ge[t[e+5]]+"-"+Ge[t[e+6]]+Ge[t[e+7]]+"-"+Ge[t[e+8]]+Ge[t[e+9]]+"-"+Ge[t[e+10]]+Ge[t[e+11]]+Ge[t[e+12]]+Ge[t[e+13]]+Ge[t[e+14]]+Ge[t[e+15]]).toLowerCase()}const Y1=new Uint8Array(16);function X1(){return crypto.getRandomValues(Y1)}function Ci(t,e,r){return crypto.randomUUID?crypto.randomUUID():K1(t)}function K1(t,e,r){t=t||{};const n=t.random??t.rng?.()??X1();if(n.length<16)throw new Error("Random bytes length must be >= 16");return n[6]=n[6]&15|64,n[8]=n[8]&63|128,V1(n)}function Ii(t,e){if(t.repositoryIdentity===null)return null;if(t.repositoryIdentity){const{provider:a,instanceBaseUrl:i,projectPath:s}=t.repositoryIdentity,o=Ii({...t,repositoryIdentity:void 0,githubUrl:`${i}/${s}`},a==="gitlab"?i:void 0);return o?.provider===a?o:null}const r=t.githubUrl;if(!r)return null;const n=/^(?:https:\/\/github\.com\/|git@github\.com:)([A-Za-z0-9_.-]+)\/([A-Za-z0-9_.-]+?)(?:\.git)?\/?$/i.exec(r);return n&&!n.slice(1).some(a=>a==="."||a==="..")?{provider:"github",instanceBaseUrl:"https://github.com",projectPath:`${n[1]}/${n[2]}`}:e?M1(r.replace(/\.git\/?$/,""),e):null}function w5(t,e){return t.type==="local"?t.plainFolder?"folder":"local":Ii(t,e)?.provider==="gitlab"?"gitlab":"github"}function jl(t){const e=t.split(/[\\/]/).filter(Boolean);return e[e.length-1]??""}function k5(t){if(t.type!=="local")return{ownerPrefix:t.owner,primary:t.name};const e=jl(t.path)||t.name,r=t.owner?`${t.owner}/${t.name}`:void 0;return{primary:e,suffix:r}}function x5(t){return t.type==="local"&&t.path?t.path:void 0}const Z1=["/.clones/","/.repo-cache/"];function S5(t){const e=t.replaceAll("\\","/");return Z1.some(r=>e.includes(r))}function A5(t){const e=new Set;for(const r of t){const{repositoryPath:n,worktreePath:a}=r;n&&a&&n===a&&e.add(n)}return e}function Q1(t){return t.includes("\\")||t.includes(":")||t.startsWith("/")?void 0:/^([^/]+)\/[^/]+$/.exec(t)?.[1]}function T5(t,e){const{selectedValue:r,selectedRepoType:n,confirmedGithubUrl:a}=t;if(!(n!=="github"||!r)){if(a){const i=e(a)?.owner;if(i)return i}return e(r)?.owner??Q1(r)}}function E5(t,e){const r=e.trim().toLowerCase();return r===""?!0:[t.name,t.path,jl(t.path),t.owner,t.owner?`${t.owner}/${t.name}`:void 0].some(a=>a?.toLowerCase().includes(r)??!1)}const J1="known-repos",ed=6e4;function td({saved:t,source:e,dismissed:r,mode:n}){if(!e)return[...t];const a=new Map;if(n==="all")for(const s of[...e.repos,...t]){const o=gn(s);a.has(o)||a.set(o,s)}else{for(const s of t)a.set(gn(s),s);for(const s of e.repos)a.set(gn(s),s)}const i=[...a.values()].filter(s=>!r[gn(s)]);return n==="all"?i:i.slice(0,9)}function M5(t){const e=t.lastUsedAt?Date.parse(t.lastUsedAt):NaN;return Number.isFinite(e)?e:0}function C5({visible:t,admission:e,entry:r,readyAt:n,now:a}){return!t||!e?"skip":!r||r.admission!==e?"load":r.status==="pending"?"reuse":r.status==="ready"&&n?.requestId===r.requestId&&a-n.at<ed?"skip":"load"}function I5(t,e){if(t.type==="local")return t.plainFolder?{repoPath:t.path,plainFolder:!0}:{repoPath:t.path};const r=Ii(t,e);return r?.provider==="gitlab"?{repositoryCheckoutDraft:{instanceBaseUrl:r.instanceBaseUrl,projectPath:r.projectPath}}:r?{githubUrl:`https://github.com/${r.projectPath}`,exactRemote:!0}:{githubUrl:t.githubUrl||`https://github.com/${t.path}`,exactRemote:!0}}function rd({compactFormState:t,lastSubmittedAgent:e,specialists:r,orchestratorId:n}){if(t?.isTeamMode??e?.isTeamMode??!1)return n;const i=o=>r.some(c=>c.id===o),s=t?.selectedSpecialist!==void 0?t.selectedSpecialist:e?.selectedSpecialist!==void 0?e.selectedSpecialist:i(Ps)?Ps:null;return s===null||!i(s)?null:s}const z5=E.createSelector(t=>t.workspaceInitializer.hydrated),R5=E.createSelector(t=>t.workspaceInitializer.compactFormState),D5=E.createSelector(t=>t.workspaceInitializer.onboardingFormState),N5=E.createSelector(t=>t.workspaceInitializer.lastSelectedRepo),_5=E.createSelector(t=>t.workspaceInitializer.branchByRepo),P5=E.createSelector(t=>t.workspaceInitializer.defaultParentPath),L5=E.createSelector(t=>ge(t.workspaceInitializer.recentRepos)),O5=E.createSelector((t,e)=>Se(t.workspaceInitializer.recentRepoRefreshes,e)),$5=E.createSelector((t,e)=>Se(t.workspaceInitializer.directoryStatusChecks,e)),B5=E.createSelector(t=>t.workspaceInitializer.dismissedRecentRepoKeys),q5=E.createSelector(t=>ge(t.workspaceInitializer.remoteSetups)),F5=E.createSelector(t=>t.workspaceInitializer.lastSubmittedAgent),H5=E.createSelector(t=>t.workspaceInitializer.agentByRepo),U5=E.createSelector(t=>t.workspaceInitializer.recentSpecialistIds),W5=E.createSelector((t,e)=>t.workspaceInitializer.agentByRepo[e]??null),G5=E.createSelector(t=>t.workspaceInitializer.pendingGitHubPrefill),j5=E.createSelector((t,e)=>({restore:Se(t.workspaceInitializer.draftRestores,e),clear:Se(t.workspaceInitializer.draftClears,e)})),V5=E.createSelector((t,e,r)=>{const n=Se(t.workspaceInitializer.initializationOutcomes,e);return n?.resourceId===r?n:void 0}),Y5=E.createSelector((t,e)=>Se(t.workspaceInitializer.initializationOutcomes,e)),X5=E.createSelector((t,e)=>Se(t.workspaceInitializer.initializationResumes,e)),K5=E.createSelector(t=>rd({compactFormState:t.workspaceInitializer.compactFormState,lastSubmittedAgent:t.workspaceInitializer.lastSubmittedAgent,specialists:T1.select(t),orchestratorId:A1.select(t)?.id??null})),nd=E.createSelector(t=>{const e=t.workspaceInitializer.gitCheckRequest,r=ur.select(t);return e&&r&&s1.select(t)?JSON.stringify([r,e]):null}),Z5=E.createSelector(t=>{const e=nd.select(t),r=t.workspaceInitializer.gitCheck;return e&&r?.context===e?r.available:null}),ad=E.createSelector(t=>{const e=Se(t.workspaceInitializer.recentRepoRefreshes,J1),r=ur.select(t);return td({saved:ge(t.workspaceInitializer.recentRepos),source:e&&r&&e.admission===r?e:null,dismissed:t.workspaceInitializer.dismissedRecentRepoKeys,mode:"all"})}),Q5=E.createSelector(t=>_l.select(t)?ad.select(t):[]),J5=E.createSelector(t=>E1.select(t)||void 0),qs="workspace-debug-flags",yn={enableCreationAnimation:!0,animationDuration:300,enablePageTransitions:!0,enableComponentTransitions:!0,showDebugInfo:!1,showPerformanceMetrics:!1,logStateChanges:!1,enableAutofocus:!0,enableBranchCaching:!0,enableFormPersistence:!0,simulateSlowNetwork:!1,simulateErrors:!1,networkDelay:0};class id{constructor(){se(this,"flags");se(this,"listeners",new Set);this.flags=this.loadFlags()}loadFlags(){if(typeof localStorage>"u")return yn;try{const e=localStorage.getItem(qs);if(e)return{...yn,...JSON.parse(e)}}catch(e){wa.error("Failed to load debug flags:",e)}return yn}saveFlags(){if(!(typeof localStorage>"u")){try{localStorage.setItem(qs,JSON.stringify(this.flags))}catch(e){wa.error("Failed to save debug flags:",e)}this.listeners.forEach(e=>e(this.flags))}}get(e){return this.flags[e]}set(e,r){this.flags[e]=r,this.saveFlags()}toggle(e){typeof this.flags[e]=="boolean"&&(this.flags[e]=!this.flags[e],this.saveFlags())}reset(){this.flags={...yn},this.saveFlags()}getAll(){return{...this.flags}}subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}toggleDebugPanel(){this.toggle("showDebugInfo"),wa.info("Debug panel:",this.flags.showDebugInfo?"ON":"OFF")}async simulateDelay(e){return this.flags.simulateSlowNetwork&&this.flags.networkDelay>0&&await new Promise(r=>setTimeout(r,this.flags.networkDelay)),e}}const ka=new id;function e3(t){if(!t)return"";let e=t;return e=e.replace(/\*\*(.+?)\*\*/g,"$1"),e=e.replace(/__(.+?)__/g,"$1"),e=e.replace(/(?<!\*)\*(?!\*)(.+?)(?<!\*)\*(?!\*)/g,"$1"),e=e.replace(/(?<!_)_(?!_)(.+?)(?<!_)_(?!_)/g,"$1"),e=e.replace(/~~(.+?)~~/g,"$1"),e=e.replace(/`([^`]+)`/g,"$1"),e=e.replace(/\[([^\]]+)\]\([^)]+\)/g,"$1"),e=e.replace(/^#{1,6}\s+/gm,""),e=e.replace(/^\*+\s*/gm,""),e=e.replace(/\s*\*+$/gm,""),e.trim()}function sd(t){return t.charAt(0).toUpperCase()+t.slice(1)}function t3(t){if(!t||t.trim().length===0)return ne.workspace_sidebarHeader_branchEmpty_error();if(/[\s~^:\\?*\[\\]/.test(t))return ne.workspace_sidebarHeader_branchInvalidChars_error();if(t.includes("@{"))return ne.workspace_sidebarChanges_branchAtBrace_error({seq:"@{"});if(t==="@")return ne.workspace_sidebarChanges_branchAt_error({symbol:"@"});if(t.startsWith("."))return ne.workspace_sidebarHeader_branchStartsDot_error();if(t.endsWith(".lock"))return ne.workspace_sidebarHeader_branchEndsLock_error();if(t.includes(".."))return ne.workspace_sidebarHeader_branchDoubleDot_error();if(t.startsWith("/")||t.endsWith("/"))return ne.workspace_sidebarHeader_branchSlashEnds_error();if(t.includes("//"))return ne.workspace_sidebarHeader_branchDoubleSlash_error();if(t.startsWith("-"))return ne.workspace_sidebarHeader_branchStartsDash_error();if(t.endsWith("."))return ne.workspace_sidebarChanges_branchEndsPeriod_error();const e=t.split("/");for(const r of e){if(r.startsWith("."))return ne.workspace_sidebarChanges_branchComponentStartsDot_error();if(r.endsWith(".lock"))return ne.workspace_sidebarChanges_branchComponentEndsLock_error()}if(t.length>250)return ne.workspace_sidebarHeader_branchTooLong_error()}function r3(t,e,r,n){return e&&r?`https://github.com/${e}/${r}/pull/${t}`:n||""}function Za(t){return t==="Open"?"open":t==="Merged"?"merged":t==="Draft"?"draft":"closed"}function n3(t,e){return`${e}:${t.agentId??"manual"}`}function od(t,e){if(t.length===0||e>=t.length)return 0;const r=Math.max(0,e);let n=0;for(let a=r;a<t.length;a++)t[a].isPushed||n++;return n}function ld(t,e){if(t.length===0||e<0)return 0;const r=Math.min(e,t.length-1);let n=0;for(let a=0;a<=r;a++)t[a].isPushed&&n++;return n}function cd(t,e){if(t.length===0||e<0)return 0;const r=Math.min(e,t.length-1);let n=0;for(let a=0;a<=r;a++)t[a].isPushed||n++;return n}function a3(t,e,r,n){const a=od(t,e),i=n?` (origin/${n})`:"";return r?a===1?ne.workspace_sidebarChanges_addToPr_one({suffix:i}):ne.workspace_sidebarChanges_addToPr_many({count:rt(a),suffix:i}):a===1?ne.workspace_sidebarChanges_pushToRemote_one({suffix:i}):ne.workspace_sidebarChanges_pushToRemote_many({count:rt(a),suffix:i})}function i3(t,e,r){const n=ld(t,e),a=r?` (origin/${r})`:"";return n===1?ne.workspace_sidebarChanges_undoPush_one({suffix:a}):ne.workspace_sidebarChanges_undoPush_many({count:rt(n),suffix:a})}function s3(t,e){const r=cd(t,e);return r===1?ne.workspace_sidebarChanges_undoCommit_one():ne.workspace_sidebarChanges_undoCommit_many({count:rt(r)})}function o3(t,e){return e===0&&t.length>0}function l3(t,e,r,n){return!r||n==null?!1:t===r&&e===n}function c3(t,e,r){const n=`${e?"staged":"unstaged"}:${t}`;return r.has(n)}function u3(t,e,r){return r?.path===t&&r?.staged===e}function d3(t){if(t.length===0)return[];const e=new Map,r=[...t].sort((n,a)=>n.timestamp-a.timestamp);for(const n of r)for(const a of n.files??[]){const i=e.get(a.path);i?e.set(a.path,{additions:i.additions+(a.additions||0),deletions:i.deletions+(a.deletions||0)}):e.set(a.path,{additions:a.additions||0,deletions:a.deletions||0})}return Array.from(e.entries()).map(([n,a])=>({path:n,additions:a.additions,deletions:a.deletions,staged:!1}))}function h3(t,e,r){const n=new Set;let a=0,i=0;for(const s of t)n.add(s.relativePath),a+=s.stats?.additions||0,i+=s.stats?.deletions||0;for(const s of e)n.add(s.relativePath),a+=s.stats?.additions||0,i+=s.stats?.deletions||0;for(const s of r)for(const o of s.files||[])n.add(o.path),a+=o.additions||0,i+=o.deletions||0;return{totalFilesChanged:n.size,totalAdditions:a,totalDeletions:i}}function ud(t){const e=t?.match(/^https?:\/\/github\.com\/([^/]+)\/([^/]+)\/pull\/\d+/i);return e?`${e[1]}/${e[2]}`:void 0}function p3(t,e,r,n,a){if(t&&t.length>0){const i=a?.split("/")[0];return t.map(s=>{const o=s.url||r(s.number),c=ud(s.url),d=c!==void 0&&c.toLowerCase()!==a?.toLowerCase()?c:void 0;return{number:s.number,title:n(s),url:o,htmlUrl:o,status:Za(s.status),createdAt:s.createdAt,updatedAt:s.updatedAt,isInMergeQueue:s.isDraft?void 0:s.isInMergeQueue,crossRepo:d,crossRepoDisplay:d?zi(d,i):void 0}})}return e?[{number:e.number,title:n(e),url:r(e.number,e.url),htmlUrl:r(e.number,e.url),status:Za(e.status),createdAt:e.createdAt,updatedAt:e.updatedAt,isInMergeQueue:e.isDraft?void 0:e.isInMergeQueue}]:[]}function m3(t){const{prNumber:e,prUrl:r}=t;return e==null||!r?null:{id:`legacy-pr-${e}`,number:e,url:r,title:"",status:t.prStatus??C1.Open,createdAt:t.updatedAt,updatedAt:t.updatedAt}}function dd(t){const e=t.lastSnapshot?.state?.toLowerCase();return e==="merged"?"merged":e==="closed"?"closed":t.lastSnapshot?.isDraft?"draft":t.state==="completed"?"closed":"open"}function xa(t,e,r){if(e.length===0)return t;const n=r?.split("/")[0],a=t.map(i=>({...i}));for(const i of e){const s=!i.resource&&!i.monitorAvailability&&(!r||i.repo===r),o=R0(i),c=o.toLowerCase(),d=a.find(p=>!!o&&p.url.toLowerCase()===c||(i.resource||i.monitorAvailability?p.monitorIdentity===ya(i):!p.resource&&!p.monitorAvailability&&(s?!p.crossRepo&&p.number===i.prNumber:p.crossRepo===i.repo&&p.number===i.prNumber)));if(d){d.monitorAgentId=i.agentId,d.resource=i.resource,d.monitorAvailability=i.monitorAvailability,d.monitorIdentity=i.resource||i.monitorAvailability?ya(i):void 0,d.monitorSnapshot=i.lastSnapshot??d.monitorSnapshot;continue}a.push({number:i.prNumber,title:i.title??`${i.repo}${o1(i,i.prNumber)}`,resource:i.resource,monitorAvailability:i.monitorAvailability,monitorIdentity:i.resource||i.monitorAvailability?ya(i):void 0,url:o,htmlUrl:o,status:dd(i),createdAt:i.createdAt,updatedAt:i.updatedAt,monitorAgentId:i.agentId,crossRepo:s?void 0:i.repo,crossRepoDisplay:s?void 0:zi(i.repo,n),monitorSnapshot:i.lastSnapshot,monitorOnly:!0})}return a}function zi(t,e){return e&&t.toLowerCase().startsWith(`${e.toLowerCase()}/`)?t.slice(e.length+1):t}function f3(t,e,r,n,a){const i=r?.toLowerCase(),s=new Set;for(const S of n)S.repoOwner&&S.repoName&&s.add(`${S.repoOwner}/${S.repoName}`.toLowerCase());let o=t;const c=[],d=[];if(t.some(S=>S.crossRepo)){o=[];for(const S of t)S.crossRepo?s.has(S.crossRepo.toLowerCase())?c.push(S):d.push(S):o.push(S)}const p=[],g=[],v=[];for(const S of e){const C=S.repo.toLowerCase();R0(S)&&o.some(W=>W.url===R0(S))||!S.resource&&!S.monitorAvailability&&(!i||C===i)?p.push(S):R0(S)&&c.some(W=>W.url===R0(S))||!S.resource&&!S.monitorAvailability&&s.has(C)?g.push(S):v.push(S)}const w=xa(o,p,r),A=r?.split("/")[0],M=new Set([...w,...c,...d].map(S=>`${(S.crossRepo??r??"").toLowerCase()}#${S.number}`)),D=[...c];for(const S of n){if(!S.repoOwner||!S.repoName)continue;const C=`${S.repoOwner}/${S.repoName}`;for(const W of S.pullRequests??[]){const K=`${C.toLowerCase()}#${W.number}`;if(M.has(K))continue;M.add(K);const X=W.url||`https://github.com/${C}/pull/${W.number}`,T=i!==void 0&&C.toLowerCase()===i;D.push({number:W.number,title:a(W),url:X,htmlUrl:X,status:Za(W.status),createdAt:W.createdAt,updatedAt:W.updatedAt,crossRepo:T?void 0:C,crossRepoDisplay:T?void 0:zi(C,A)})}}return{own:w,otherRoots:xa(D,g,r),otherTracked:xa(d,v,r)}}function Fs(t){return t.status!=="open"?!1:t.monitorSnapshot?t.monitorSnapshot.isInMergeQueue===!0:t.isInMergeQueue===!0}function g3(t){const e=t.status==="merged"?ne.workspace_prSection_merged_label():t.status==="closed"?ne.workspace_prSection_closed_label():t.status==="draft"?ne.workspace_prSection_statusDraft_label():Fs(t)?ne.workspace_prSection_statusQueued_label():ne.workspace_prSection_statusOpen_label(),r=[l1(t)??e],n=Fs(t)?O1(t.monitorSnapshot?.mergeQueue):null;n&&r.push(n);const a=t.status==="merged"||t.status==="closed"?void 0:t.monitorSnapshot;return a&&(a.checks.total===null||a.checks.passed===null||a.checks.failed===null||a.checks.pending===null||a.availability&&a.availability.checks!=="available"?r.push(ne.chat_monitoredPrs_hover_checksUnknown_label()):a.checks.total>0&&r.push(ne.workspace_prSection_statusChecks_tooltip({passed:rt(a.checks.passed),failed:rt(a.checks.failed),pending:rt(a.checks.pending)})),r.push(a.approvals.have===null||a.availability&&a.availability.approvals!=="available"?ne.chat_monitoredPrs_hover_approvalsUnknown_label():a.approvals.needed!=null?ne.workspace_prSection_statusApprovalsOfNeeded_tooltip({count:rt(a.approvals.have),needed:rt(a.approvals.needed)}):ne.workspace_prSection_statusApprovals_tooltip({count:rt(a.approvals.have)})),a.approvals.changesRequested!==null&&a.approvals.changesRequested>0&&r.push(ne.workspace_prSection_statusChangesRequested_tooltip({count:rt(a.approvals.changesRequested)})),a.availability&&a.availability.discussions!=="available"?r.push(ne.workspace_prSection_statusUnresolvedThreadsUnknown_tooltip()):typeof a.threads.unresolved=="number"?a.threads.unresolved>0&&r.push(ne.workspace_prSection_statusUnresolvedThreads_tooltip({count:rt(a.threads.unresolved)})):a.threads.resolutionRequired&&r.push(ne.workspace_prSection_statusUnresolvedThreadsUnknown_tooltip()),a.mergeBlockedReason&&r.push(sd(a.mergeBlockedReason))),r.join(`
|
|
1
|
+
var a1=Object.defineProperty;var i1=(t,e,r)=>e in t?a1(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var se=(t,e,r)=>i1(t,typeof e!="symbol"?e+"":e,r);import{cD as ur,aU as s1,ds as _l,_ as R0,Y as ya,Z as o1,X as l1,a1 as c1,ab as u1,U as d1,dT as h1,M as p1,ba as Pl,cG as Pr,dr as Ll,aT as m1,aX as f1,co as g1,cE as v1,c9 as b1,dl as Xa,dN as y1,dG as w1,ay as Fn,al as k1,at as Ti,dq as Ol,dD as x1,dX as $l,dW as S1}from"./D3QcPFoL.js";import{D as Ps,bv as A1,bM as T1,aY as E1}from"./B0KDOtDn.js";import{M as M1,F as i0}from"./DyvrH0mm.js";import{yC as gn,Iy as E,ny as ge,nx as Se,aM as C1,g as Bl,y as Re,be as c0,jT as Ei,lS as vn,aj as jt,lR as Ls,l$ as Os,lY as $s,jq as ql,gj as Ka,GW as I1,t4 as z1,zZ as R1,oB as D1,mE as bn,By as N1,iw as _1,m9 as P1,lM as L1}from"./D5ej8a-y.js";import{bp as ne}from"./DXyyWeag.js";import{t as rt}from"./BboIV5H5.js";import{l as O1,d as xr}from"./ChkzKl5W.js";import{a as u0}from"./BdWqymET.js";import{o as pe,r as Gt,e as d0,s as V,_ as Xe,l as h0,g as $1,n as Pe,c as or,b as Ue,u as B1,d as q1}from"./CIyUrgF0.js";import{j as Fl}from"./uXuxG9cN.js";import{w as F1}from"./DEYvT_CO.js";import{b as H1}from"./DHQOuksI.js";import{i as He}from"./RD9QY1Yc.js";import{l as wa,c as Hl}from"./ChTqQfQN.js";import{f as Mi,C as Ul,D as Wl,l as U1,z as Gl,r as W1,u as G1}from"./CRsmjbca.js";import{e as j1,h as Sr}from"./pKvpKpo4.js";import{ax as p0}from"./Bfr1QjPr.js";import{i as Bs}from"./DogedYC1.js";const Ge=[];for(let t=0;t<256;++t)Ge.push((t+256).toString(16).slice(1));function V1(t,e=0){return(Ge[t[e+0]]+Ge[t[e+1]]+Ge[t[e+2]]+Ge[t[e+3]]+"-"+Ge[t[e+4]]+Ge[t[e+5]]+"-"+Ge[t[e+6]]+Ge[t[e+7]]+"-"+Ge[t[e+8]]+Ge[t[e+9]]+"-"+Ge[t[e+10]]+Ge[t[e+11]]+Ge[t[e+12]]+Ge[t[e+13]]+Ge[t[e+14]]+Ge[t[e+15]]).toLowerCase()}const Y1=new Uint8Array(16);function X1(){return crypto.getRandomValues(Y1)}function Ci(t,e,r){return crypto.randomUUID?crypto.randomUUID():K1(t)}function K1(t,e,r){t=t||{};const n=t.random??t.rng?.()??X1();if(n.length<16)throw new Error("Random bytes length must be >= 16");return n[6]=n[6]&15|64,n[8]=n[8]&63|128,V1(n)}function Ii(t,e){if(t.repositoryIdentity===null)return null;if(t.repositoryIdentity){const{provider:a,instanceBaseUrl:i,projectPath:s}=t.repositoryIdentity,o=Ii({...t,repositoryIdentity:void 0,githubUrl:`${i}/${s}`},a==="gitlab"?i:void 0);return o?.provider===a?o:null}const r=t.githubUrl;if(!r)return null;const n=/^(?:https:\/\/github\.com\/|git@github\.com:)([A-Za-z0-9_.-]+)\/([A-Za-z0-9_.-]+?)(?:\.git)?\/?$/i.exec(r);return n&&!n.slice(1).some(a=>a==="."||a==="..")?{provider:"github",instanceBaseUrl:"https://github.com",projectPath:`${n[1]}/${n[2]}`}:e?M1(r.replace(/\.git\/?$/,""),e):null}function w5(t,e){return t.type==="local"?t.plainFolder?"folder":"local":Ii(t,e)?.provider==="gitlab"?"gitlab":"github"}function jl(t){const e=t.split(/[\\/]/).filter(Boolean);return e[e.length-1]??""}function k5(t){if(t.type!=="local")return{ownerPrefix:t.owner,primary:t.name};const e=jl(t.path)||t.name,r=t.owner?`${t.owner}/${t.name}`:void 0;return{primary:e,suffix:r}}function x5(t){return t.type==="local"&&t.path?t.path:void 0}const Z1=["/.clones/","/.repo-cache/"];function S5(t){const e=t.replaceAll("\\","/");return Z1.some(r=>e.includes(r))}function A5(t){const e=new Set;for(const r of t){const{repositoryPath:n,worktreePath:a}=r;n&&a&&n===a&&e.add(n)}return e}function Q1(t){return t.includes("\\")||t.includes(":")||t.startsWith("/")?void 0:/^([^/]+)\/[^/]+$/.exec(t)?.[1]}function T5(t,e){const{selectedValue:r,selectedRepoType:n,confirmedGithubUrl:a}=t;if(!(n!=="github"||!r)){if(a){const i=e(a)?.owner;if(i)return i}return e(r)?.owner??Q1(r)}}function E5(t,e){const r=e.trim().toLowerCase();return r===""?!0:[t.name,t.path,jl(t.path),t.owner,t.owner?`${t.owner}/${t.name}`:void 0].some(a=>a?.toLowerCase().includes(r)??!1)}const J1="known-repos",ed=6e4;function td({saved:t,source:e,dismissed:r,mode:n}){if(!e)return[...t];const a=new Map;if(n==="all")for(const s of[...e.repos,...t]){const o=gn(s);a.has(o)||a.set(o,s)}else{for(const s of t)a.set(gn(s),s);for(const s of e.repos)a.set(gn(s),s)}const i=[...a.values()].filter(s=>!r[gn(s)]);return n==="all"?i:i.slice(0,9)}function M5(t){const e=t.lastUsedAt?Date.parse(t.lastUsedAt):NaN;return Number.isFinite(e)?e:0}function C5({visible:t,admission:e,entry:r,readyAt:n,now:a}){return!t||!e?"skip":!r||r.admission!==e?"load":r.status==="pending"?"reuse":r.status==="ready"&&n?.requestId===r.requestId&&a-n.at<ed?"skip":"load"}function I5(t,e){if(t.type==="local")return t.plainFolder?{repoPath:t.path,plainFolder:!0}:{repoPath:t.path};const r=Ii(t,e);return r?.provider==="gitlab"?{repositoryCheckoutDraft:{instanceBaseUrl:r.instanceBaseUrl,projectPath:r.projectPath}}:r?{githubUrl:`https://github.com/${r.projectPath}`,exactRemote:!0}:{githubUrl:t.githubUrl||`https://github.com/${t.path}`,exactRemote:!0}}function rd({compactFormState:t,lastSubmittedAgent:e,specialists:r,orchestratorId:n}){if(t?.isTeamMode??e?.isTeamMode??!1)return n;const i=o=>r.some(c=>c.id===o),s=t?.selectedSpecialist!==void 0?t.selectedSpecialist:e?.selectedSpecialist!==void 0?e.selectedSpecialist:i(Ps)?Ps:null;return s===null||!i(s)?null:s}const z5=E.createSelector(t=>t.workspaceInitializer.hydrated),R5=E.createSelector(t=>t.workspaceInitializer.compactFormState),D5=E.createSelector(t=>t.workspaceInitializer.onboardingFormState),N5=E.createSelector(t=>t.workspaceInitializer.lastSelectedRepo),_5=E.createSelector(t=>t.workspaceInitializer.branchByRepo),P5=E.createSelector(t=>t.workspaceInitializer.defaultParentPath),L5=E.createSelector(t=>ge(t.workspaceInitializer.recentRepos)),O5=E.createSelector((t,e)=>Se(t.workspaceInitializer.recentRepoRefreshes,e)),$5=E.createSelector((t,e)=>Se(t.workspaceInitializer.directoryStatusChecks,e)),B5=E.createSelector(t=>t.workspaceInitializer.dismissedRecentRepoKeys),q5=E.createSelector(t=>ge(t.workspaceInitializer.remoteSetups)),F5=E.createSelector(t=>t.workspaceInitializer.lastSubmittedAgent),H5=E.createSelector(t=>t.workspaceInitializer.agentByRepo),U5=E.createSelector(t=>t.workspaceInitializer.recentSpecialistIds),W5=E.createSelector((t,e)=>t.workspaceInitializer.agentByRepo[e]??null),G5=E.createSelector(t=>t.workspaceInitializer.pendingGitHubPrefill),j5=E.createSelector((t,e)=>({restore:Se(t.workspaceInitializer.draftRestores,e),clear:Se(t.workspaceInitializer.draftClears,e)})),V5=E.createSelector((t,e,r)=>{const n=Se(t.workspaceInitializer.initializationOutcomes,e);return n?.resourceId===r?n:void 0}),Y5=E.createSelector((t,e)=>Se(t.workspaceInitializer.initializationOutcomes,e)),X5=E.createSelector((t,e)=>Se(t.workspaceInitializer.initializationResumes,e)),K5=E.createSelector(t=>rd({compactFormState:t.workspaceInitializer.compactFormState,lastSubmittedAgent:t.workspaceInitializer.lastSubmittedAgent,specialists:T1.select(t),orchestratorId:A1.select(t)?.id??null})),nd=E.createSelector(t=>{const e=t.workspaceInitializer.gitCheckRequest,r=ur.select(t);return e&&r&&s1.select(t)?JSON.stringify([r,e]):null}),Z5=E.createSelector(t=>{const e=nd.select(t),r=t.workspaceInitializer.gitCheck;return e&&r?.context===e?r.available:null}),ad=E.createSelector(t=>{const e=Se(t.workspaceInitializer.recentRepoRefreshes,J1),r=ur.select(t);return td({saved:ge(t.workspaceInitializer.recentRepos),source:e&&r&&e.admission===r?e:null,dismissed:t.workspaceInitializer.dismissedRecentRepoKeys,mode:"all"})}),Q5=E.createSelector(t=>_l.select(t)?ad.select(t):[]),J5=E.createSelector(t=>E1.select(t)||void 0),qs="workspace-debug-flags",yn={enableCreationAnimation:!0,animationDuration:300,enablePageTransitions:!0,enableComponentTransitions:!0,showDebugInfo:!1,showPerformanceMetrics:!1,logStateChanges:!1,enableAutofocus:!0,enableBranchCaching:!0,enableFormPersistence:!0,simulateSlowNetwork:!1,simulateErrors:!1,networkDelay:0};class id{constructor(){se(this,"flags");se(this,"listeners",new Set);this.flags=this.loadFlags()}loadFlags(){if(typeof localStorage>"u")return yn;try{const e=localStorage.getItem(qs);if(e)return{...yn,...JSON.parse(e)}}catch(e){wa.error("Failed to load debug flags:",e)}return yn}saveFlags(){if(!(typeof localStorage>"u")){try{localStorage.setItem(qs,JSON.stringify(this.flags))}catch(e){wa.error("Failed to save debug flags:",e)}this.listeners.forEach(e=>e(this.flags))}}get(e){return this.flags[e]}set(e,r){this.flags[e]=r,this.saveFlags()}toggle(e){typeof this.flags[e]=="boolean"&&(this.flags[e]=!this.flags[e],this.saveFlags())}reset(){this.flags={...yn},this.saveFlags()}getAll(){return{...this.flags}}subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}toggleDebugPanel(){this.toggle("showDebugInfo"),wa.info("Debug panel:",this.flags.showDebugInfo?"ON":"OFF")}async simulateDelay(e){return this.flags.simulateSlowNetwork&&this.flags.networkDelay>0&&await new Promise(r=>setTimeout(r,this.flags.networkDelay)),e}}const ka=new id;function e3(t){if(!t)return"";let e=t;return e=e.replace(/\*\*(.+?)\*\*/g,"$1"),e=e.replace(/__(.+?)__/g,"$1"),e=e.replace(/(?<!\*)\*(?!\*)(.+?)(?<!\*)\*(?!\*)/g,"$1"),e=e.replace(/(?<!_)_(?!_)(.+?)(?<!_)_(?!_)/g,"$1"),e=e.replace(/~~(.+?)~~/g,"$1"),e=e.replace(/`([^`]+)`/g,"$1"),e=e.replace(/\[([^\]]+)\]\([^)]+\)/g,"$1"),e=e.replace(/^#{1,6}\s+/gm,""),e=e.replace(/^\*+\s*/gm,""),e=e.replace(/\s*\*+$/gm,""),e.trim()}function sd(t){return t.charAt(0).toUpperCase()+t.slice(1)}function t3(t){if(!t||t.trim().length===0)return ne.workspace_sidebarHeader_branchEmpty_error();if(/[\s~^:\\?*\[\\]/.test(t))return ne.workspace_sidebarHeader_branchInvalidChars_error();if(t.includes("@{"))return ne.workspace_sidebarChanges_branchAtBrace_error({seq:"@{"});if(t==="@")return ne.workspace_sidebarChanges_branchAt_error({symbol:"@"});if(t.startsWith("."))return ne.workspace_sidebarHeader_branchStartsDot_error();if(t.endsWith(".lock"))return ne.workspace_sidebarHeader_branchEndsLock_error();if(t.includes(".."))return ne.workspace_sidebarHeader_branchDoubleDot_error();if(t.startsWith("/")||t.endsWith("/"))return ne.workspace_sidebarHeader_branchSlashEnds_error();if(t.includes("//"))return ne.workspace_sidebarHeader_branchDoubleSlash_error();if(t.startsWith("-"))return ne.workspace_sidebarHeader_branchStartsDash_error();if(t.endsWith("."))return ne.workspace_sidebarChanges_branchEndsPeriod_error();const e=t.split("/");for(const r of e){if(r.startsWith("."))return ne.workspace_sidebarChanges_branchComponentStartsDot_error();if(r.endsWith(".lock"))return ne.workspace_sidebarChanges_branchComponentEndsLock_error()}if(t.length>250)return ne.workspace_sidebarHeader_branchTooLong_error()}function r3(t,e,r,n){return e&&r?`https://github.com/${e}/${r}/pull/${t}`:n||""}function Za(t){return t==="Open"?"open":t==="Merged"?"merged":t==="Draft"?"draft":"closed"}function n3(t,e){return`${e}:${t.agentId??"manual"}`}function od(t,e){if(t.length===0||e>=t.length)return 0;const r=Math.max(0,e);let n=0;for(let a=r;a<t.length;a++)t[a].isPushed||n++;return n}function ld(t,e){if(t.length===0||e<0)return 0;const r=Math.min(e,t.length-1);let n=0;for(let a=0;a<=r;a++)t[a].isPushed&&n++;return n}function cd(t,e){if(t.length===0||e<0)return 0;const r=Math.min(e,t.length-1);let n=0;for(let a=0;a<=r;a++)t[a].isPushed||n++;return n}function a3(t,e,r,n){const a=od(t,e),i=n?` (origin/${n})`:"";return r?a===1?ne.workspace_sidebarChanges_addToPr_one({suffix:i}):ne.workspace_sidebarChanges_addToPr_many({count:rt(a),suffix:i}):a===1?ne.workspace_sidebarChanges_pushToRemote_one({suffix:i}):ne.workspace_sidebarChanges_pushToRemote_many({count:rt(a),suffix:i})}function i3(t,e,r){const n=ld(t,e),a=r?` (origin/${r})`:"";return n===1?ne.workspace_sidebarChanges_undoPush_one({suffix:a}):ne.workspace_sidebarChanges_undoPush_many({count:rt(n),suffix:a})}function s3(t,e){const r=cd(t,e);return r===1?ne.workspace_sidebarChanges_undoCommit_one():ne.workspace_sidebarChanges_undoCommit_many({count:rt(r)})}function o3(t,e){return e===0&&t.length>0}function l3(t,e,r,n){return!r||n==null?!1:t===r&&e===n}function c3(t,e,r){const n=`${e?"staged":"unstaged"}:${t}`;return r.has(n)}function u3(t,e,r){return r?.path===t&&r?.staged===e}function d3(t){if(t.length===0)return[];const e=new Map,r=[...t].sort((n,a)=>n.timestamp-a.timestamp);for(const n of r)for(const a of n.files??[]){const i=e.get(a.path);i?e.set(a.path,{additions:i.additions+(a.additions||0),deletions:i.deletions+(a.deletions||0)}):e.set(a.path,{additions:a.additions||0,deletions:a.deletions||0})}return Array.from(e.entries()).map(([n,a])=>({path:n,additions:a.additions,deletions:a.deletions,staged:!1}))}function h3(t,e,r){const n=new Set;let a=0,i=0;for(const s of t)n.add(s.relativePath),a+=s.stats?.additions||0,i+=s.stats?.deletions||0;for(const s of e)n.add(s.relativePath),a+=s.stats?.additions||0,i+=s.stats?.deletions||0;for(const s of r)for(const o of s.files||[])n.add(o.path),a+=o.additions||0,i+=o.deletions||0;return{totalFilesChanged:n.size,totalAdditions:a,totalDeletions:i}}function ud(t){const e=t?.match(/^https?:\/\/github\.com\/([^/]+)\/([^/]+)\/pull\/\d+/i);return e?`${e[1]}/${e[2]}`:void 0}function p3(t,e,r,n,a){if(t&&t.length>0){const i=a?.split("/")[0];return t.map(s=>{const o=s.url||r(s.number),c=ud(s.url),d=c!==void 0&&c.toLowerCase()!==a?.toLowerCase()?c:void 0;return{number:s.number,title:n(s),url:o,htmlUrl:o,status:Za(s.status),createdAt:s.createdAt,updatedAt:s.updatedAt,isInMergeQueue:s.isDraft?void 0:s.isInMergeQueue,crossRepo:d,crossRepoDisplay:d?zi(d,i):void 0}})}return e?[{number:e.number,title:n(e),url:r(e.number,e.url),htmlUrl:r(e.number,e.url),status:Za(e.status),createdAt:e.createdAt,updatedAt:e.updatedAt,isInMergeQueue:e.isDraft?void 0:e.isInMergeQueue}]:[]}function m3(t){const{prNumber:e,prUrl:r}=t;return e==null||!r?null:{id:`legacy-pr-${e}`,number:e,url:r,title:"",status:t.prStatus??C1.Open,createdAt:t.updatedAt,updatedAt:t.updatedAt}}function dd(t){const e=t.lastSnapshot?.state?.toLowerCase();return e==="merged"?"merged":e==="closed"?"closed":t.lastSnapshot?.isDraft?"draft":t.state==="completed"?"closed":"open"}function xa(t,e,r){if(e.length===0)return t;const n=r?.split("/")[0],a=t.map(i=>({...i}));for(const i of e){const s=!i.resource&&!i.monitorAvailability&&(!r||i.repo===r),o=R0(i),c=o.toLowerCase(),d=a.find(p=>!!o&&p.url.toLowerCase()===c||(i.resource||i.monitorAvailability?p.monitorIdentity===ya(i):!p.resource&&!p.monitorAvailability&&(s?!p.crossRepo&&p.number===i.prNumber:p.crossRepo===i.repo&&p.number===i.prNumber)));if(d){d.monitorAgentId=i.agentId,d.resource=i.resource,d.monitorAvailability=i.monitorAvailability,d.monitorIdentity=i.resource||i.monitorAvailability?ya(i):void 0,d.monitorSnapshot=i.lastSnapshot??d.monitorSnapshot;continue}a.push({number:i.prNumber,title:i.title??`${i.repo}${o1(i,i.prNumber)}`,resource:i.resource,monitorAvailability:i.monitorAvailability,monitorIdentity:i.resource||i.monitorAvailability?ya(i):void 0,url:o,htmlUrl:o,status:dd(i),createdAt:i.createdAt,updatedAt:i.updatedAt,monitorAgentId:i.agentId,crossRepo:s?void 0:i.repo,crossRepoDisplay:s?void 0:zi(i.repo,n),monitorSnapshot:i.lastSnapshot,monitorOnly:!0})}return a}function zi(t,e){return e&&t.toLowerCase().startsWith(`${e.toLowerCase()}/`)?t.slice(e.length+1):t}function f3(t,e,r,n,a){const i=r?.toLowerCase(),s=new Set;for(const S of n)S.repoOwner&&S.repoName&&s.add(`${S.repoOwner}/${S.repoName}`.toLowerCase());let o=t;const c=[],d=[];if(t.some(S=>S.crossRepo)){o=[];for(const S of t)S.crossRepo?s.has(S.crossRepo.toLowerCase())?c.push(S):d.push(S):o.push(S)}const p=[],g=[],v=[];for(const S of e){const C=S.repo.toLowerCase();R0(S)&&o.some(W=>W.url===R0(S))||!S.resource&&!S.monitorAvailability&&(!i||C===i)?p.push(S):R0(S)&&c.some(W=>W.url===R0(S))||!S.resource&&!S.monitorAvailability&&s.has(C)?g.push(S):v.push(S)}const w=xa(o,p,r),A=r?.split("/")[0],M=new Set([...w,...c,...d].map(S=>`${(S.crossRepo??r??"").toLowerCase()}#${S.number}`)),D=[...c];for(const S of n){if(!S.repoOwner||!S.repoName)continue;const C=`${S.repoOwner}/${S.repoName}`;for(const W of S.pullRequests??[]){const K=`${C.toLowerCase()}#${W.number}`;if(M.has(K))continue;M.add(K);const X=W.url||`https://github.com/${C}/pull/${W.number}`,T=i!==void 0&&C.toLowerCase()===i;D.push({number:W.number,title:a(W),url:X,htmlUrl:X,status:Za(W.status),createdAt:W.createdAt,updatedAt:W.updatedAt,crossRepo:T?void 0:C,crossRepoDisplay:T?void 0:zi(C,A)})}}return{own:w,otherRoots:xa(D,g,r),otherTracked:xa(d,v,r)}}function Fs(t){return t.status!=="open"?!1:t.monitorSnapshot?t.monitorSnapshot.isInMergeQueue===!0:t.isInMergeQueue===!0}function g3(t){const e=t.status==="merged"?ne.workspace_prSection_merged_label():t.status==="closed"?ne.workspace_prSection_closed_label():t.status==="draft"?ne.workspace_prSection_statusDraft_label():Fs(t)?ne.workspace_prSection_statusQueued_label():ne.workspace_prSection_statusOpen_label(),r=[l1(t)??e],n=Fs(t)?O1(t.monitorSnapshot?.mergeQueue):null;n&&r.push(n);const a=t.status==="merged"||t.status==="closed"?void 0:t.monitorSnapshot;return a&&(a.checks.total===null||a.checks.passed===null||a.checks.failed===null||a.checks.pending===null||a.availability&&a.availability.checks!=="available"?r.push(ne.chat_monitoredPrs_hover_checksUnknown_label()):a.checks.total>0&&r.push(ne.workspace_prSection_statusChecks_tooltip({passed:rt(a.checks.passed),failed:rt(a.checks.failed),pending:rt(a.checks.pending)})),r.push(a.approvals.have===null||a.availability&&a.availability.approvals!=="available"?ne.chat_monitoredPrs_hover_approvalsUnknown_label():a.approvals.needed!=null?ne.workspace_prSection_statusApprovalsOfNeeded_tooltip({count:rt(a.approvals.have),needed:rt(a.approvals.needed)}):ne.workspace_prSection_statusApprovals_tooltip({count:rt(a.approvals.have)})),a.approvals.changesRequested!==null&&a.approvals.changesRequested>0&&r.push(ne.workspace_prSection_statusChangesRequested_tooltip({count:rt(a.approvals.changesRequested)})),a.availability&&a.availability.discussions!=="available"?r.push(ne.workspace_prSection_statusUnresolvedThreadsUnknown_tooltip()):typeof a.threads.unresolved=="number"?a.threads.unresolved>0&&r.push(ne.workspace_prSection_statusUnresolvedThreads_tooltip({count:rt(a.threads.unresolved)})):a.threads.resolutionRequired&&r.push(ne.workspace_prSection_statusUnresolvedThreadsUnknown_tooltip()),a.mergeBlockedReason&&r.push(sd(a.mergeBlockedReason))),r.join(`
|
|
2
2
|
`)}function v3(t,e){return e.has(t??"manual")}function b3(t,e){return{path:t.relativePath,additions:t.stats.additions,deletions:t.stats.deletions,staged:e,status:t.status,attribution:t.attribution?.agent?{agentId:t.attribution.agent.agentId,agentName:t.attribution.agent.agentName,sessionId:t.attribution.agent.sessionId,turnNumber:t.attribution.agent.turnNumber,timestamp:t.attribution.timestamp}:void 0}}const Vl=500;function y3(t,e=Vl){const r=Math.max(0,Math.floor(e));return t.length<=r?{visible:t,shown:t.length,hiddenCount:0}:{visible:t.slice(0,r),shown:r,hiddenCount:t.length-r}}function w3(t,e,r=Vl){let n=Math.max(0,Math.floor(r)),a=0,i=0;return{groups:t.map(o=>{if(e(o))return{group:o,visibleFiles:[]};const c=Math.min(n,o.files.length);return n-=c,a+=c,i+=o.files.length-c,{group:o,visibleFiles:c===o.files.length?o.files:o.files.slice(0,c)}}),shown:a,hiddenCount:i}}function k3(t){if(t.hiddenCount<=0)return"";const e=rt(t.shown),r=rt(t.shown+t.hiddenCount);return t.hiddenCount===1?ne.workspace_fileChanges_hiddenFiles_one({shown:e,total:r}):ne.workspace_fileChanges_hiddenFiles_many({shown:e,total:r,count:rt(t.hiddenCount)})}function hd(t){if(!t)return{};try{const e=JSON.parse(t);return e&&typeof e=="object"?e:{}}catch{return{}}}function Qa(t){return t.startsWith("@")?t.slice(1):t}function pd(t,e,r,n){const a=t.fullPath||t.path||t.filename;if(a)return Qa(String(a));const i=[r,e,n.trim()].map(Qa).filter(Boolean),s=i.find(o=>o.includes("/"))??i[0];return s?c1(s).path:void 0}function md(t){const e=t.line??t.startLine??t.range?.start;return typeof e=="number"&&Number.isFinite(e)?e:void 0}function fd(t){if(!t||t.getAttribute("data-mention")===null)return null;const e=t.getAttribute("data-type")||"",r=t.getAttribute("data-id")||"",n=t.getAttribute("data-label")||"",a=t.getAttribute("data-uri")||"",i=hd(t.getAttribute("data-meta")),s={type:e,id:r,label:n,uri:a,meta:i},o=a.startsWith("intent://")?a:typeof i.fullUrl=="string"&&i.fullUrl.startsWith("intent://")?i.fullUrl:void 0;if(o&&(s.intentUrl=o),e==="file"||e==="file-range"){const c=pd(i,n,r,t.textContent||"");c&&(s.filePath=c);const d=md(i);d!==void 0&&(s.line=d)}else if(e==="folder"||e==="source-folder"){const c=i.fullPath||i.path||r||n,d=c?Qa(String(c)).replace(/\/+$/,""):"";d&&(s.folderPath=d)}else if(e==="note"||e==="note-range"){const c=i.noteId||r;c&&(s.note=i.isExternalLink&&i.workspaceId?{id:c,workspaceId:String(i.workspaceId)}:{id:c})}return s}function x3(t){return{sidebarTabId:"files",type:"file",filePath:`${t}/`}}function Ri(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Lr=Ri();function Yl(t){Lr=t}var Ir={exec:()=>null};function Xr(t){let e=[];return r=>{let n=Math.max(0,Math.min(3,r-1)),a=e[n];return a||(a=t(n),e[n]=a),a}}function ce(t,e=""){let r=typeof t=="string"?t:t.source,n={replace:(a,i)=>{let s=typeof i=="string"?i:i.source;return s=s.replace(Ye.caret,"$1"),r=r.replace(a,s),n},getRegex:()=>new RegExp(r,e)};return n}var gd=((t="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+t)}catch{return!1}})(),Ye={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:Xr(t=>new RegExp(`^ {0,${t}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:Xr(t=>new RegExp(`^ {0,${t}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),fencesBeginRegex:Xr(t=>new RegExp(`^ {0,${t}}(?:\`\`\`|~~~)`)),headingBeginRegex:Xr(t=>new RegExp(`^ {0,${t}}#`)),htmlBeginRegex:Xr(t=>new RegExp(`^ {0,${t}}<(?:[a-z].*>|!--)`,"i")),blockquoteBeginRegex:Xr(t=>new RegExp(`^ {0,${t}}>`))},vd=/^(?:[ \t]*(?:\n|$))+/,bd=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,yd=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,W0=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,wd=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Di=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Xl=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Kl=ce(Xl).replace(/bull/g,Di).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),kd=ce(Xl).replace(/bull/g,Di).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Ni=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,xd=/^[^\n]+/,_i=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Sd=ce(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",_i).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Ad=ce(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,Di).getRegex(),Hn="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Pi=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Td=ce("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Pi).replace("tag",Hn).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Zl=t=>ce(Ni).replace("hr",W0).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list",t).replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Hn).getRegex(),Ed=Zl(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),Md=Zl(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),Cd=ce(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Md).getRegex(),Li={blockquote:Cd,code:bd,def:Sd,fences:yd,heading:wd,hr:W0,html:Td,lheading:Kl,list:Ad,newline:vd,paragraph:Ed,table:Ir,text:xd},Hs=ce("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",W0).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Hn).getRegex(),Id={...Li,lheading:kd,table:Hs,paragraph:ce(Ni).replace("hr",W0).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Hs).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Hn).getRegex()},zd={...Li,html:ce(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Pi).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Ir,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ce(Ni).replace("hr",W0).replace("heading",` *#{1,6} *[^
|
|
3
3
|
]`).replace("lheading",Kl).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Rd=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Dd=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Ql=/^( {2,}|\\)\n(?!\s*$)/,Nd=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Vt=/[\p{P}\p{S}]/u,m0=/[\s\p{P}\p{S}]/u,G0=/[^\s\p{P}\p{S}]/u,_d=ce(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,m0).getRegex(),Pd=/[\p{Pi}\p{Ps}"']/u,Jl=/(?!~)[\p{P}\p{S}]/u,Ld=/(?!~)[\s\p{P}\p{S}]/u,Od=/(?:[^\s\p{P}\p{S}]|~)/u,$d=ce(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",gd?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),ec=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Bd=ce(ec,"u").replace(/punct/g,Vt).getRegex(),qd=ce(ec,"u").replace(/punct/g,Jl).getRegex(),Fd=/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,Hd=ce(Fd,"u").replace(/openQuote/g,Pd).replace(/punct/g,Vt).getRegex(),tc="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Ud=ce(tc,"gu").replace(/notPunctSpace/g,G0).replace(/punctSpace/g,m0).replace(/punct/g,Vt).getRegex(),Wd=ce(tc,"gu").replace(/notPunctSpace/g,Od).replace(/punctSpace/g,Ld).replace(/punct/g,Jl).getRegex(),Gd="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)",jd=ce(Gd,"gu").replace(/notPunctSpace/g,G0).replace(/punctSpace/g,m0).replace(/punct/g,Vt).getRegex(),Vd=ce("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,G0).replace(/punctSpace/g,m0).replace(/punct/g,Vt).getRegex(),Yd="^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)",Xd=ce(Yd,"gu").replace(/notPunctSpace/g,G0).replace(/punctSpace/g,m0).replace(/punct/g,Vt).getRegex(),Kd=ce(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,Vt).getRegex(),Zd="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",Qd=ce(Zd,"gu").replace(/notPunctSpace/g,G0).replace(/punctSpace/g,m0).replace(/punct/g,Vt).getRegex(),Jd=ce(/\\(punct)/,"gu").replace(/punct/g,Vt).getRegex(),eh=ce(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),th=ce(Pi).replace("(?:-->|$)","-->").getRegex(),rh=ce("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",th).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Pn=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,nh=ce(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",Pn).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),rc=ce(/^!?\[(label)\]\[(ref)\]/).replace("label",Pn).replace("ref",_i).getRegex(),nc=ce(/^!?\[(ref)\](?:\[\])?/).replace("ref",_i).getRegex(),ah=ce("reflink|nolink(?!\\()","g").replace("reflink",rc).replace("nolink",nc).getRegex(),Us=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Oi={_backpedal:Ir,anyPunctuation:Jd,autolink:eh,blockSkip:$d,br:Ql,code:Dd,del:Ir,delLDelim:Ir,delRDelim:Ir,emStrongLDelim:Bd,emStrongRDelimAst:Ud,emStrongRDelimUnd:Vd,escape:Rd,link:nh,nolink:nc,punctuation:_d,reflink:rc,reflinkSearch:ah,tag:rh,text:Nd,url:Ir},ih={...Oi,emStrongLDelim:Hd,emStrongRDelimAst:jd,emStrongRDelimUnd:Xd,link:ce(/^!?\[(label)\]\((.*?)\)/).replace("label",Pn).getRegex(),reflink:ce(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Pn).getRegex()},Ja={...Oi,emStrongRDelimAst:Wd,emStrongLDelim:qd,delLDelim:Kd,delRDelim:Qd,url:ce(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Us).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:ce(/^(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Us).getRegex()},sh={...Ja,br:ce(Ql).replace("{2,}","*").getRegex(),text:ce(Ja.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},wn={normal:Li,gfm:Id,pedantic:zd},S0={normal:Oi,gfm:Ja,breaks:sh,pedantic:ih},oh={"&":"&","<":"<",">":">",'"':""","'":"'"},Ws=t=>oh[t];function Dt(t,e){if(e){if(Ye.escapeTest.test(t))return t.replace(Ye.escapeReplace,Ws)}else if(Ye.escapeTestNoEncode.test(t))return t.replace(Ye.escapeReplaceNoEncode,Ws);return t}function Gs(t){try{t=encodeURI(t).replace(Ye.percentDecode,"%")}catch{return null}return t}function js(t,e){let r=t.replace(Ye.findPipe,(i,s,o)=>{let c=!1,d=s;for(;--d>=0&&o[d]==="\\";)c=!c;return c?"|":" |"}),n=r.split(Ye.splitPipe),a=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;a<n.length;a++)n[a]=n[a].trim().replace(Ye.slashPipe,"|");return n}function tr(t,e,r){let n=t.length;if(n===0)return"";let a=0;for(;a<n&&t.charAt(n-a-1)===e;)a++;return t.slice(0,n-a)}function Vs(t){let e=t.split(`
|
|
4
4
|
`),r=e.length-1;for(;r>=0&&Ye.blankLine.test(e[r]);)r--;return e.length-r<=2?t:e.slice(0,r+1).join(`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t as se,br as a,a_ as ie,bz as ae,b as le}from"./DXyyWeag.js";import{bs as oe,bV as ge,br as ue,ca as ce,bH as q,a5 as p,bA as m,bS as V,aD as C,b_ as P,W as w,bn as he,c9 as W,aA as l,bl as de,bO as me,aB as I}from"./DYhIMPy1.js";import{n as Y,v,p as fe,w as ve}from"./CjaOLL1c.js";import{z as be}from"./
|
|
1
|
+
import{t as se,br as a,a_ as ie,bz as ae,b as le}from"./DXyyWeag.js";import{bs as oe,bV as ge,br as ue,ca as ce,bH as q,a5 as p,bA as m,bS as V,aD as C,b_ as P,W as w,bn as he,c9 as W,aA as l,bl as de,bO as me,aB as I}from"./DYhIMPy1.js";import{n as Y,v,p as fe,w as ve}from"./CjaOLL1c.js";import{z as be}from"./CXnaNNAz.js";import{H as R}from"./CcNhqKh5.js";import{C as _e}from"./DT4bpJWb.js";function A(r){const t={"&":"&","<":"<",">":">",'"':""","'":"'"};return r.replace(/[&<>"']/g,n=>t[n])}const pe=300,Ce=2e6,xe=1e5,u=new Map;let X=0;function Q(r,t){return`${t}\0${r}`}function Z(r,t){const n=Q(r,t),s=u.get(n);return s===void 0?null:(u.delete(n),u.set(n,s),s)}function F(r){const t=u.get(r);t!==void 0&&(X-=r.length+t.length,u.delete(r))}function He(r,t){F(r);const n=r.length+t.length;if(!(n>xe)){for(;u.size>=pe||u.size>0&&X+n>Ce;){const s=u.keys().next().value;if(s===void 0)break;F(s)}u.set(r,t),X+=n}}function ye(){return new Promise(r=>{typeof requestIdleCallback=="function"?requestIdleCallback(()=>r(),{timeout:200}):setTimeout(r,0)})}function Ne(r,t){try{return t&&R.getLanguage(t)?R.highlight(r,{language:t}).value:R.highlightAuto(r).value}catch{return A(r)}}const k=new Map;function Le(r,t,n){const s=Q(r,t),f=u.get(s);if(f!==void 0)return Promise.resolve(f);const c=k.get(s);if(c)return c.staleChecks.push(n??(()=>!1)),c.promise;const g={staleChecks:[n??(()=>!1)],promise:Promise.resolve("")};return g.promise=ye().then(()=>{if(k.get(s)===g&&k.delete(s),g.staleChecks.every(x=>x()))return A(r);const b=Ne(r,t);return He(s,b),b}),k.set(s,g),g.promise}var we=I("<div> </div>"),ke=I('<div class="line-numbers-gutter select-none text-right flex-shrink-0 py-3 pl-3 pr-2 svelte-1irg7m4"></div>'),Ae=I("<div></div>"),Ie=I('<div><div class="absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity z-10"><!></div> <div class="flex"><!> <div><pre><code></code></pre></div></div></div>');function Se(r,t){if(new.target)return se({component:Se,...r});oe(t,!0);const n=a(t,"code",7,""),s=a(t,"language",7,"plaintext"),f=a(t,"showLineNumbers",7,!1),c=a(t,"startLineNumber",7,1),g=a(t,"highlightLines",23,()=>[]),b=a(t,"fileName",7,""),x=a(t,"filename",7,""),H=a(t,"maxHeight",7,void 0),S=a(t,"noBorder",7,!1),y=a(t,"noMargin",7,!1),M=a(t,"doScroll",7,!0),B=a(t,"className",7,"");let N=ge(ue(Z(n(),s())??A(n())));ce(()=>{const e=n(),i=s(),h=Z(e,i);if(h!==null){q(N,h,!0);return}q(N,A(e),!0);let o=!1;return Le(e,i,()=>o).then(d=>{o||q(N,d,!0)}),()=>{o=!0}});const j=W(()=>C(N).split(`
|
|
2
2
|
`)),U=W(()=>Array.from({length:C(j).length},(e,i)=>c()+i));var $={get code(){return n()},set code(e=""){n(e),l()},get language(){return s()},set language(e="plaintext"){s(e),l()},get showLineNumbers(){return f()},set showLineNumbers(e=!1){f(e),l()},get startLineNumber(){return c()},set startLineNumber(e=1){c(e),l()},get highlightLines(){return g()},set highlightLines(e=[]){g(e),l()},get fileName(){return b()},set fileName(e=""){b(e),l()},get filename(){return x()},set filename(e=""){x(e),l()},get maxHeight(){return H()},set maxHeight(e=void 0){H(e),l()},get noBorder(){return S()},set noBorder(e=!1){S(e),l()},get noMargin(){return y()},set noMargin(e=!1){y(e),l()},get doScroll(){return M()},set doScroll(e=!0){M(e),l()},get className(){return B()},set className(e=""){B(e),l()},$set:ae,$on:(e,i)=>le(t,e,i)},_=Ie();let D;var z=p(_),ee=p(z);_e(ee,{get text(){return n()},size:"xs",class:"bg-background/80 hover:bg-hover text-muted-foreground hover:text-foreground backdrop-blur-sm"}),m(z);var J=V(z,2),K=p(J);{var te=e=>{var i=ke();Y(i,20,()=>C(U),h=>h,(h,o)=>{var d=we();let L;var re=de(d,!0);P(ne=>{L=v(d,1,"line-number svelte-1irg7m4",null,L,{highlighted:ne}),me(re,o)},[()=>g().includes(o)]),w(h,d)}),m(i),w(e,i)};ie(K,e=>{f()&&e(te)})}var G=V(K,2),E=p(G);let O;var T=p(E);return Y(T,21,()=>C(j),fe,(e,i,h)=>{var o=Ae();let d;be(o,()=>C(i)||" ",!0),m(o),P(L=>d=v(o,1,"code-line svelte-1irg7m4",null,d,{highlighted:L}),[()=>g().includes(c()+h)]),w(e,o)}),m(T),m(E),m(G),m(J),m(_),P(()=>{D=v(_,1,`code-block-container group rounded-md overflow-hidden relative ${B()??""}`,"svelte-1irg7m4",D,{"mt-3":!y(),"mb-5":!y(),"no-border":S()}),ve(_,H()?`max-height: ${H()}px; overflow-y: auto;`:""),v(G,1,`flex-1 ${M()?"overflow-x-auto":""}`),O=v(E,1,"code-pre py-3 pr-3 bg-background! svelte-1irg7m4",null,O,{"pl-3":!f()}),v(T,1,`hljs language-${s()??""}`,"svelte-1irg7m4")}),w(r,_),he($)}export{Se as C};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as Gt,aZ as Kt,U as Ht,Y as Yt,b0 as Xt,V as Zt,a_ as Jt,b as w,W as wt,aX as Qt,aW as ot,i as $t,an as te,au as ee,H as ne,B as se,r as ie,q as oe,O as re}from"./Cn2QoVqR.js";const kt=(t,n)=>Gt(t,"a",-n),_t=1e-10;function st(t,n){const s=le(t),e=s.filter(l=>ae(l,t));let i=0,o=0;const r=[];if(e.length>1){const l=Et(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 y={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]],M=Math.atan2(a.x-p.x,a.y-p.y),E=Math.atan2(f.x-p.x,f.y-p.y);let _=E-M;_<0&&(_+=2*Math.PI);const S=E-_/2;let g=q(y,{x:p.x+p.radius*Math.sin(S),y:p.y+p.radius*Math.cos(S)});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+=lt(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(q(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-_t,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}function ae(t,n){return n.every(s=>q(t,s)<s.radius+_t)}function le(t){const n=[];for(let s=0;s<t.length;++s)for(let e=s+1;e<t.length;++e){const i=Tt(t[s],t[e]);for(const o of i)o.parentIndex=[s,e],n.push(o)}return n}function lt(t,n){return t*t*Math.acos(1-n/t)-(t-n)*Math.sqrt(n*(2*t-n))}function q(t,n){return Math.sqrt((t.x-n.x)*(t.x-n.x)+(t.y-n.y)*(t.y-n.y))}function xt(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 lt(t,e)+lt(n,i)}function Tt(t,n){const s=q(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}]}function Et(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}function ce(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,y=t(a);if(y*r>=0&&(n=a),Math.abs(f)<o||y===0)return a}return n+f}function ct(t){const n=new Array(t);for(let s=0;s<t;++s)n[s]=0;return n}function Mt(t,n){return ct(t).map(()=>ct(n))}function $(t,n){let s=0;for(let e=0;e<t.length;++e)s+=t[e]*n[e];return s}function ut(t){return Math.sqrt($(t,t))}function ft(t,n,s){for(let e=0;e<n.length;++e)t[e]=n[e]*s}function Z(t,n,s,e,i){for(let o=0;o<t.length;++o)t[o]=n*s[o]+e*i[o]}function zt(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,y=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 v=0;v<b;++v){const c=n.slice();c[v]=c[v]?c[v]*i:o,p[v+1]=c,p[v+1].fx=t(c),p[v+1].id=v+1}function M(v){for(let c=0;c<v.length;c++)p[b][c]=v[c];p[b].fx=v.fx}const E=(v,c)=>v.fx-c.fx,_=n.slice(),S=n.slice(),g=n.slice(),m=n.slice();for(let v=0;v<e;++v){if(p.sort(E),s.history){const x=p.map(d=>{const C=d.slice();return C.fx=d.fx,C.id=d.id,C});x.sort((d,C)=>d.id-C.id),s.history.push({x:p[0].slice(),fx:p[0].fx,simplex:x})}h=0;for(let x=0;x<b;++x)h=Math.max(h,Math.abs(p[0][x]-p[1][x]));if(Math.abs(p[0].fx-p[b].fx)<r&&h<l)break;for(let x=0;x<b;++x){_[x]=0;for(let d=0;d<b;++d)_[x]+=p[d][x];_[x]/=b}const c=p[b];if(Z(S,1+f,_,-f,c),S.fx=t(S),S.fx<p[0].fx)Z(m,1+u,_,-u,c),m.fx=t(m),m.fx<S.fx?M(m):M(S);else if(S.fx>=p[b-1].fx){let x=!1;if(S.fx>c.fx?(Z(g,1+a,_,-a,c),g.fx=t(g),g.fx<c.fx?M(g):x=!0):(Z(g,1-a*f,_,a*f,c),g.fx=t(g),g.fx<S.fx?M(g):x=!0),x){if(y>=1)break;for(let d=1;d<p.length;++d)Z(p[d],1-y,p[0],y,p[d]),p[d].fx=t(p[d])}}else M(S)}return p.sort(E),{fx:p[0].fx,x:p[0]}}function ue(t,n,s,e,i,o,r){const l=s.fx,f=$(s.fxprime,n);let u=l,a=l,y=f,h=0;i=i||1,o=o||1e-6,r=r||.1;function b(p,M,E){for(let _=0;_<16;++_)if(i=(p+M)/2,Z(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),y=$(e.fxprime,n),u>l+o*i*f||u>=E)M=i;else{if(Math.abs(y)<=-r*f)return i;y*(M-p)>=0&&(M=p),p=i,E=u}return 0}for(let p=0;p<10;++p){if(Z(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),y=$(e.fxprime,n),u>l+o*i*f||p&&u>=a)return b(h,i,a);if(Math.abs(y)<=-r*f)return i;if(y>=0)return b(i,h,u);a=u,h=i,i*=2}return i}function fe(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(),ft(r,e.fxprime,-1);for(let a=0;a<u;++a){if(f=ue(t,r,e,i,f),s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:f}),!f)ft(r,e.fxprime,-1);else{Z(o,1,i.fxprime,-1,e.fxprime);const y=$(e.fxprime,e.fxprime),h=Math.max(0,$(o,i.fxprime)/y);Z(r,h,r,-1,i.fxprime),l=e,e=i,i=l}if(ut(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}function At(t,n={}){n.maxIterations=n.maxIterations||500;const s=n.initialLayout||xe,e=n.lossFunction||tt,i=he(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=zt(a=>{const y={};for(let h=0;h<r.length;++h){const b=r[h];y[b]={x:a[2*h],y:a[2*h+1],radius:o[b].radius}}return e(y,i)},l,n).x;for(let a=0;a<r.length;++a){const y=r[a];o[y].x=u[2*a],o[y].y=u[2*a+1]}return o}const Rt=1e-10;function ht(t,n,s){return Math.min(t,n)*Math.min(t,n)*Math.PI<=s+Rt?Math.abs(t-n):ce(e=>xt(t,n,e)-s,0,t+n)}function he(t,n={}){const s=n.distinct,e=t.map(l=>Object.assign({},l));function i(l){return l.join(";")}if(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 y=u+1;y<f.sets.length;y++){const h=String(f.sets[y]),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}function de(t,n,s){const e=Mt(n.length,n.length),i=Mt(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=ht(f,u,o.size);e[r][l]=e[l][r]=a;let y=0;o.size+1e-10>=Math.min(n[r].size,n[l].size)?y=1:o.size<=1e-10&&(y=-1),i[r][l]=i[l][r]=y}),{distances:e,constraints:i}}function ge(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],y=s[o][f],h=e[o][f],b=(u-r)*(u-r)+(a-l)*(a-l),p=Math.sqrt(b),M=b-y*y;h>0&&p<=y||h<0&&p>=y||(i+=2*M*M,n[2*o]+=4*M*(r-u),n[2*o+1]+=4*M*(l-a),n[2*f]+=4*M*(u-r),n[2*f+1]+=4*M*(a-l))}}return i}function xe(t,n={}){let s=pe(t,n);const e=n.lossFunction||tt;if(t.length>=8){const i=ye(t,n),o=e(i,t),r=e(s,t);o+1e-8<r&&(s=i)}return s}function ye(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}=de(t,e,i);const l=ut(o.map(ut))/o.length;o=o.map(h=>h.map(b=>b/l));const f=(h,b)=>ge(h,b,o,r);let u=null;for(let h=0;h<s;++h){const b=ct(o.length*2).map(Math.random),p=fe(f,b,n);(!u||p.fx<u.fx)&&(u=p)}const a=u.x,y={};for(let h=0;h<e.length;++h){const b=e[h];y[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)ft(h.x,l);return y}function pe(t,n){const s=n&&n.lossFunction?n.lossFunction:tt,e={},i={};for(const y of t)if(y.sets.length===1){const h=y.sets[0];e[h]={x:1e10,y:1e10,rowid:e.length,size:y.size,radius:Math.sqrt(y.size/Math.PI)},i[h]=[]}t=t.filter(y=>y.sets.length===2);for(const y of t){let h=y.weight!=null?y.weight:1;const b=y.sets[0],p=y.sets[1];y.size+Rt>=Math.min(e[b].size,e[p].size)&&(h=0),i[b].push({set:p,size:y.size,weight:h}),i[p].push({set:b,size:y.size,weight:h})}const o=[];Object.keys(i).forEach(y=>{let h=0;for(let b=0;b<i[y].length;++b)h+=i[y][b].size*i[y][b].weight;o.push({set:y,size:h})});function r(y,h){return h.size-y.size}o.sort(r);const l={};function f(y){return y.set in l}function u(y,h){e[h].x=y.x,e[h].y=y.y,l[h]=!0}u({x:0,y:0},o[0].set);for(let y=1;y<o.length;++y){const h=o[y].set,b=i[h].filter(f),p=e[h];if(b.sort(r),b.length===0)throw"ERROR: missing pairwise overlap information";const M=[];for(var a=0;a<b.length;++a){const S=e[b[a].set],g=ht(p.radius,S.radius,b[a].size);M.push({x:S.x+g,y:S.y}),M.push({x:S.x-g,y:S.y}),M.push({y:S.y+g,x:S.x}),M.push({y:S.y-g,x:S.x});for(let m=a+1;m<b.length;++m){const v=e[b[m].set],c=ht(p.radius,v.radius,b[m].size),x=Tt({x:S.x,y:S.y,radius:g},{x:v.x,y:v.y,radius:c});M.push(...x)}}let E=1e50,_=M[0];for(const S of M){e[h].x=S.x,e[h].y=S.y;const g=s(e,t);g<E&&(E=g,_=S)}u(_,h)}return e}function tt(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=xt(r.radius,l.radius,q(r,l))}else i=st(e.sets.map(r=>t[r]));const o=e.weight!=null?e.weight:1;s+=o*(i-e.size)*(i-e.size)}return s}function Ct(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=xt(l.radius,f.radius,q(l,f))}else i=st(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}function me(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&&q(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}}}}function be(t){t.forEach(i=>{i.parent=i});function n(i){return i.parent!==i&&(i.parent=n(i.parent)),i.parent}function s(i,o){const r=n(i),l=n(o);r.parent=l}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;q(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())}function dt(t){const n=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}};return{xRange:n("x"),yRange:n("y")}}function Dt(t,n,s){n==null&&(n=Math.PI/2);let e=Ft(t).map(u=>Object.assign({},u));const i=be(e);for(const u of i){me(u,n,s);const a=dt(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,y){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 M=(h.xRange.max-h.xRange.min)/2-(o.xRange.max-o.xRange.min)/2;M<0&&(b+=M)}if(y)p=o.yRange.max-h.yRange.min+r;else{p=o.yRange.max-h.yRange.max;const M=(h.yRange.max-h.yRange.min)/2-(o.yRange.max-o.yRange.min)/2;M<0&&(p+=M)}for(const M of u)M.x+=b,M.y+=p,e.push(M)}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=dt(e);return Nt(e)}function Ot(t,n,s,e,i){const o=Ft(t);n-=2*e,s-=2*e;const{xRange:r,yRange:l}=dt(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),y=(n-(r.max-r.min)*a)/2,h=(s-(l.max-l.min)*a)/2;return Nt(o.map(b=>({radius:a*b.radius,x:e+y+(b.x-r.min)*a,y:e+h+(b.y-l.min)*a,setid:b.setid})))}function Nt(t){const n={};for(const s of t)n[s.setid]=s;return n}function Ft(t){return Object.keys(t).map(s=>Object.assign(t[s],{setid:s}))}function ve(t={}){let n=!1,s=600,e=350,i=15,o=1e3,r=Math.PI/2,l=!0,f=null,u=!0,a=!0,y=null,h=null,b=!1,p=null,M=t&&t.symmetricalTextCentre?t.symmetricalTextCentre:!1,E={},_=t&&t.colourScheme?t.colourScheme:t&&t.colorScheme?t.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],S=0,g=function(x){if(x in E)return E[x];var d=E[x]=_[S];return S+=1,S>=_.length&&(S=0),d},m=At,v=tt;function c(x){let d=x.datum();const C=new Set;d.forEach(k=>{k.size==0&&k.sets.length==1&&C.add(k.sets[0])}),d=d.filter(k=>!k.sets.some(O=>C.has(O)));let I={},D={};if(d.length>0){let k=m(d,{lossFunction:v,distinct:b});l&&(k=Dt(k,r,h)),I=Ot(k,s,e,i,f),D=Lt(I,d,M)}const U={};d.forEach(k=>{k.label&&(U[k.sets]=k.label)});function V(k){if(k.sets in U)return U[k.sets];if(k.sets.length==1)return""+k.sets[0]}x.selectAll("svg").data([I]).enter().append("svg");const F=x.select("svg");n?F.attr("viewBox",`0 0 ${s} ${e}`):F.attr("width",s).attr("height",e);const R={};let T=!1;F.selectAll(".venn-area path").each(function(k){const O=this.getAttribute("d");k.sets.length==1&&O&&!b&&(T=!0,R[k.sets[0]]=Me(O))});function A(k){return O=>{const K=k.sets.map(et=>{let Y=R[et],X=I[et];return Y||(Y={x:s/2,y:e/2,radius:1}),X||(X={x:s/2,y:e/2,radius:1}),{x:Y.x*(1-O)+X.x*O,y:Y.y*(1-O)+X.y*O,radius:Y.radius*(1-O)+X.radius*O}});return St(K,p)}}const W=F.selectAll(".venn-area").data(d,k=>k.sets),P=W.enter().append("g").attr("class",k=>`venn-area venn-${k.sets.length==1?"circle":"intersection"}${k.colour||k.color?" venn-coloured":""}`).attr("data-venn-sets",k=>k.sets.join("_")),B=P.append("path"),G=P.append("text").attr("class","label").text(k=>V(k)).attr("text-anchor","middle").attr("dy",".35em").attr("x",s/2).attr("y",e/2);a&&(B.style("fill-opacity","0").filter(k=>k.sets.length==1).style("fill",k=>k.colour?k.colour:k.color?k.color:g(k.sets)).style("fill-opacity",".25"),G.style("fill",k=>k.colour||k.color?"#FFF":t.textFill?t.textFill:k.sets.length==1?g(k.sets):"#444"));function L(k){return typeof k.transition=="function"?k.transition("venn").duration(o):k}let z=x;T&&typeof z.transition=="function"?(z=L(x),z.selectAll("path").attrTween("d",A)):z.selectAll("path").attr("d",k=>St(k.sets.map(O=>I[O])),p);const N=z.selectAll("text").filter(k=>k.sets in D).text(k=>V(k)).attr("x",k=>Math.floor(D[k.sets].x)).attr("y",k=>Math.floor(D[k.sets].y));u&&(T?"on"in N?N.on("end",rt(I,V)):N.each("end",rt(I,V)):N.each(rt(I,V)));const j=L(W.exit()).remove();typeof W.transition=="function"&&j.selectAll("path").attrTween("d",A);const Q=j.selectAll("text").attr("x",s/2).attr("y",e/2);return y!==null&&(G.style("font-size","0px"),N.style("font-size",y),Q.style("font-size","0px")),{circles:I,textCentres:D,nodes:W,enter:P,update:z,exit:j}}return c.wrap=function(x){return arguments.length?(u=x,c):u},c.useViewBox=function(){return n=!0,c},c.width=function(x){return arguments.length?(s=x,c):s},c.height=function(x){return arguments.length?(e=x,c):e},c.padding=function(x){return arguments.length?(i=x,c):i},c.distinct=function(x){return arguments.length?(b=x,c):b},c.colours=function(x){return arguments.length?(g=x,c):g},c.colors=function(x){return arguments.length?(g=x,c):g},c.fontSize=function(x){return arguments.length?(y=x,c):y},c.round=function(x){return arguments.length?(p=x,c):p},c.duration=function(x){return arguments.length?(o=x,c):o},c.layoutFunction=function(x){return arguments.length?(m=x,c):m},c.normalize=function(x){return arguments.length?(l=x,c):l},c.scaleToFit=function(x){return arguments.length?(f=x,c):f},c.styled=function(x){return arguments.length?(a=x,c):a},c.orientation=function(x){return arguments.length?(r=x,c):r},c.orientationOrder=function(x){return arguments.length?(h=x,c):h},c.lossFunction=function(x){return arguments.length?(v=x==="default"?tt:x==="logRatio"?Ct:x,c):v},c}function rt(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],y=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}let M=p(u);for(;u=r.pop(),!!u;){a.push(u);const g=a.join(" ");M.textContent=g,g.length>f&&M.getComputedTextLength()>i&&(a.pop(),M.textContent=a.join(" "),a=[u],M=p(u),y++)}const E=.35-y*h/2,_=e.getAttribute("x"),S=e.getAttribute("y");b.forEach((g,m)=>{g.setAttribute("x",_),g.setAttribute("y",S),g.setAttribute("dy",`${E+m*h}em`)})}}function at(t,n,s){let e=n[0].radius-q(n[0],t);for(let i=1;i<n.length;++i){const o=n[i].radius-q(n[i],t);o<=e&&(e=o)}for(let i=0;i<s.length;++i){const o=q(s[i],t)-s[i].radius;o<=e&&(e=o)}return e}function jt(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=at(e[0],t,n);for(let a=1;a<e.length;++a){const y=at(e[a],t,n);y>=o&&(i=e[a],o=y)}const r=zt(a=>-1*at({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(q(l,a)>a.radius){f=!1;break}for(const a of n)if(q(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 st(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?jt(t,[]):Et(u.arcs.map(a=>a.p1))}function Ie(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=q(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}function Lt(t,n,s){const e={},i=Ie(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 y=jt(u,a,s);e[r]=y,y.disjoint&&n[o].size>0&&console.log("WARNING: area "+r+" not represented on screen")}return e}function ke(t,n,s){const e=[];return e.push(`
|
|
1
|
+
import{c as Gt,aZ as Kt,U as Ht,Y as Yt,b0 as Xt,V as Zt,a_ as Jt,b as w,W as wt,aX as Qt,aW as ot,i as $t,an as te,au as ee,H as ne,B as se,r as ie,q as oe,O as re}from"./BEBrrrrG.js";const kt=(t,n)=>Gt(t,"a",-n),_t=1e-10;function st(t,n){const s=le(t),e=s.filter(l=>ae(l,t));let i=0,o=0;const r=[];if(e.length>1){const l=Et(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 y={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]],M=Math.atan2(a.x-p.x,a.y-p.y),E=Math.atan2(f.x-p.x,f.y-p.y);let _=E-M;_<0&&(_+=2*Math.PI);const S=E-_/2;let g=q(y,{x:p.x+p.radius*Math.sin(S),y:p.y+p.radius*Math.cos(S)});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+=lt(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(q(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-_t,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}function ae(t,n){return n.every(s=>q(t,s)<s.radius+_t)}function le(t){const n=[];for(let s=0;s<t.length;++s)for(let e=s+1;e<t.length;++e){const i=Tt(t[s],t[e]);for(const o of i)o.parentIndex=[s,e],n.push(o)}return n}function lt(t,n){return t*t*Math.acos(1-n/t)-(t-n)*Math.sqrt(n*(2*t-n))}function q(t,n){return Math.sqrt((t.x-n.x)*(t.x-n.x)+(t.y-n.y)*(t.y-n.y))}function xt(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 lt(t,e)+lt(n,i)}function Tt(t,n){const s=q(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}]}function Et(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}function ce(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,y=t(a);if(y*r>=0&&(n=a),Math.abs(f)<o||y===0)return a}return n+f}function ct(t){const n=new Array(t);for(let s=0;s<t;++s)n[s]=0;return n}function Mt(t,n){return ct(t).map(()=>ct(n))}function $(t,n){let s=0;for(let e=0;e<t.length;++e)s+=t[e]*n[e];return s}function ut(t){return Math.sqrt($(t,t))}function ft(t,n,s){for(let e=0;e<n.length;++e)t[e]=n[e]*s}function Z(t,n,s,e,i){for(let o=0;o<t.length;++o)t[o]=n*s[o]+e*i[o]}function zt(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,y=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 v=0;v<b;++v){const c=n.slice();c[v]=c[v]?c[v]*i:o,p[v+1]=c,p[v+1].fx=t(c),p[v+1].id=v+1}function M(v){for(let c=0;c<v.length;c++)p[b][c]=v[c];p[b].fx=v.fx}const E=(v,c)=>v.fx-c.fx,_=n.slice(),S=n.slice(),g=n.slice(),m=n.slice();for(let v=0;v<e;++v){if(p.sort(E),s.history){const x=p.map(d=>{const C=d.slice();return C.fx=d.fx,C.id=d.id,C});x.sort((d,C)=>d.id-C.id),s.history.push({x:p[0].slice(),fx:p[0].fx,simplex:x})}h=0;for(let x=0;x<b;++x)h=Math.max(h,Math.abs(p[0][x]-p[1][x]));if(Math.abs(p[0].fx-p[b].fx)<r&&h<l)break;for(let x=0;x<b;++x){_[x]=0;for(let d=0;d<b;++d)_[x]+=p[d][x];_[x]/=b}const c=p[b];if(Z(S,1+f,_,-f,c),S.fx=t(S),S.fx<p[0].fx)Z(m,1+u,_,-u,c),m.fx=t(m),m.fx<S.fx?M(m):M(S);else if(S.fx>=p[b-1].fx){let x=!1;if(S.fx>c.fx?(Z(g,1+a,_,-a,c),g.fx=t(g),g.fx<c.fx?M(g):x=!0):(Z(g,1-a*f,_,a*f,c),g.fx=t(g),g.fx<S.fx?M(g):x=!0),x){if(y>=1)break;for(let d=1;d<p.length;++d)Z(p[d],1-y,p[0],y,p[d]),p[d].fx=t(p[d])}}else M(S)}return p.sort(E),{fx:p[0].fx,x:p[0]}}function ue(t,n,s,e,i,o,r){const l=s.fx,f=$(s.fxprime,n);let u=l,a=l,y=f,h=0;i=i||1,o=o||1e-6,r=r||.1;function b(p,M,E){for(let _=0;_<16;++_)if(i=(p+M)/2,Z(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),y=$(e.fxprime,n),u>l+o*i*f||u>=E)M=i;else{if(Math.abs(y)<=-r*f)return i;y*(M-p)>=0&&(M=p),p=i,E=u}return 0}for(let p=0;p<10;++p){if(Z(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),y=$(e.fxprime,n),u>l+o*i*f||p&&u>=a)return b(h,i,a);if(Math.abs(y)<=-r*f)return i;if(y>=0)return b(i,h,u);a=u,h=i,i*=2}return i}function fe(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(),ft(r,e.fxprime,-1);for(let a=0;a<u;++a){if(f=ue(t,r,e,i,f),s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:f}),!f)ft(r,e.fxprime,-1);else{Z(o,1,i.fxprime,-1,e.fxprime);const y=$(e.fxprime,e.fxprime),h=Math.max(0,$(o,i.fxprime)/y);Z(r,h,r,-1,i.fxprime),l=e,e=i,i=l}if(ut(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}function At(t,n={}){n.maxIterations=n.maxIterations||500;const s=n.initialLayout||xe,e=n.lossFunction||tt,i=he(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=zt(a=>{const y={};for(let h=0;h<r.length;++h){const b=r[h];y[b]={x:a[2*h],y:a[2*h+1],radius:o[b].radius}}return e(y,i)},l,n).x;for(let a=0;a<r.length;++a){const y=r[a];o[y].x=u[2*a],o[y].y=u[2*a+1]}return o}const Rt=1e-10;function ht(t,n,s){return Math.min(t,n)*Math.min(t,n)*Math.PI<=s+Rt?Math.abs(t-n):ce(e=>xt(t,n,e)-s,0,t+n)}function he(t,n={}){const s=n.distinct,e=t.map(l=>Object.assign({},l));function i(l){return l.join(";")}if(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 y=u+1;y<f.sets.length;y++){const h=String(f.sets[y]),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}function de(t,n,s){const e=Mt(n.length,n.length),i=Mt(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=ht(f,u,o.size);e[r][l]=e[l][r]=a;let y=0;o.size+1e-10>=Math.min(n[r].size,n[l].size)?y=1:o.size<=1e-10&&(y=-1),i[r][l]=i[l][r]=y}),{distances:e,constraints:i}}function ge(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],y=s[o][f],h=e[o][f],b=(u-r)*(u-r)+(a-l)*(a-l),p=Math.sqrt(b),M=b-y*y;h>0&&p<=y||h<0&&p>=y||(i+=2*M*M,n[2*o]+=4*M*(r-u),n[2*o+1]+=4*M*(l-a),n[2*f]+=4*M*(u-r),n[2*f+1]+=4*M*(a-l))}}return i}function xe(t,n={}){let s=pe(t,n);const e=n.lossFunction||tt;if(t.length>=8){const i=ye(t,n),o=e(i,t),r=e(s,t);o+1e-8<r&&(s=i)}return s}function ye(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}=de(t,e,i);const l=ut(o.map(ut))/o.length;o=o.map(h=>h.map(b=>b/l));const f=(h,b)=>ge(h,b,o,r);let u=null;for(let h=0;h<s;++h){const b=ct(o.length*2).map(Math.random),p=fe(f,b,n);(!u||p.fx<u.fx)&&(u=p)}const a=u.x,y={};for(let h=0;h<e.length;++h){const b=e[h];y[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)ft(h.x,l);return y}function pe(t,n){const s=n&&n.lossFunction?n.lossFunction:tt,e={},i={};for(const y of t)if(y.sets.length===1){const h=y.sets[0];e[h]={x:1e10,y:1e10,rowid:e.length,size:y.size,radius:Math.sqrt(y.size/Math.PI)},i[h]=[]}t=t.filter(y=>y.sets.length===2);for(const y of t){let h=y.weight!=null?y.weight:1;const b=y.sets[0],p=y.sets[1];y.size+Rt>=Math.min(e[b].size,e[p].size)&&(h=0),i[b].push({set:p,size:y.size,weight:h}),i[p].push({set:b,size:y.size,weight:h})}const o=[];Object.keys(i).forEach(y=>{let h=0;for(let b=0;b<i[y].length;++b)h+=i[y][b].size*i[y][b].weight;o.push({set:y,size:h})});function r(y,h){return h.size-y.size}o.sort(r);const l={};function f(y){return y.set in l}function u(y,h){e[h].x=y.x,e[h].y=y.y,l[h]=!0}u({x:0,y:0},o[0].set);for(let y=1;y<o.length;++y){const h=o[y].set,b=i[h].filter(f),p=e[h];if(b.sort(r),b.length===0)throw"ERROR: missing pairwise overlap information";const M=[];for(var a=0;a<b.length;++a){const S=e[b[a].set],g=ht(p.radius,S.radius,b[a].size);M.push({x:S.x+g,y:S.y}),M.push({x:S.x-g,y:S.y}),M.push({y:S.y+g,x:S.x}),M.push({y:S.y-g,x:S.x});for(let m=a+1;m<b.length;++m){const v=e[b[m].set],c=ht(p.radius,v.radius,b[m].size),x=Tt({x:S.x,y:S.y,radius:g},{x:v.x,y:v.y,radius:c});M.push(...x)}}let E=1e50,_=M[0];for(const S of M){e[h].x=S.x,e[h].y=S.y;const g=s(e,t);g<E&&(E=g,_=S)}u(_,h)}return e}function tt(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=xt(r.radius,l.radius,q(r,l))}else i=st(e.sets.map(r=>t[r]));const o=e.weight!=null?e.weight:1;s+=o*(i-e.size)*(i-e.size)}return s}function Ct(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=xt(l.radius,f.radius,q(l,f))}else i=st(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}function me(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&&q(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}}}}function be(t){t.forEach(i=>{i.parent=i});function n(i){return i.parent!==i&&(i.parent=n(i.parent)),i.parent}function s(i,o){const r=n(i),l=n(o);r.parent=l}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;q(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())}function dt(t){const n=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}};return{xRange:n("x"),yRange:n("y")}}function Dt(t,n,s){n==null&&(n=Math.PI/2);let e=Ft(t).map(u=>Object.assign({},u));const i=be(e);for(const u of i){me(u,n,s);const a=dt(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,y){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 M=(h.xRange.max-h.xRange.min)/2-(o.xRange.max-o.xRange.min)/2;M<0&&(b+=M)}if(y)p=o.yRange.max-h.yRange.min+r;else{p=o.yRange.max-h.yRange.max;const M=(h.yRange.max-h.yRange.min)/2-(o.yRange.max-o.yRange.min)/2;M<0&&(p+=M)}for(const M of u)M.x+=b,M.y+=p,e.push(M)}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=dt(e);return Nt(e)}function Ot(t,n,s,e,i){const o=Ft(t);n-=2*e,s-=2*e;const{xRange:r,yRange:l}=dt(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),y=(n-(r.max-r.min)*a)/2,h=(s-(l.max-l.min)*a)/2;return Nt(o.map(b=>({radius:a*b.radius,x:e+y+(b.x-r.min)*a,y:e+h+(b.y-l.min)*a,setid:b.setid})))}function Nt(t){const n={};for(const s of t)n[s.setid]=s;return n}function Ft(t){return Object.keys(t).map(s=>Object.assign(t[s],{setid:s}))}function ve(t={}){let n=!1,s=600,e=350,i=15,o=1e3,r=Math.PI/2,l=!0,f=null,u=!0,a=!0,y=null,h=null,b=!1,p=null,M=t&&t.symmetricalTextCentre?t.symmetricalTextCentre:!1,E={},_=t&&t.colourScheme?t.colourScheme:t&&t.colorScheme?t.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],S=0,g=function(x){if(x in E)return E[x];var d=E[x]=_[S];return S+=1,S>=_.length&&(S=0),d},m=At,v=tt;function c(x){let d=x.datum();const C=new Set;d.forEach(k=>{k.size==0&&k.sets.length==1&&C.add(k.sets[0])}),d=d.filter(k=>!k.sets.some(O=>C.has(O)));let I={},D={};if(d.length>0){let k=m(d,{lossFunction:v,distinct:b});l&&(k=Dt(k,r,h)),I=Ot(k,s,e,i,f),D=Lt(I,d,M)}const U={};d.forEach(k=>{k.label&&(U[k.sets]=k.label)});function V(k){if(k.sets in U)return U[k.sets];if(k.sets.length==1)return""+k.sets[0]}x.selectAll("svg").data([I]).enter().append("svg");const F=x.select("svg");n?F.attr("viewBox",`0 0 ${s} ${e}`):F.attr("width",s).attr("height",e);const R={};let T=!1;F.selectAll(".venn-area path").each(function(k){const O=this.getAttribute("d");k.sets.length==1&&O&&!b&&(T=!0,R[k.sets[0]]=Me(O))});function A(k){return O=>{const K=k.sets.map(et=>{let Y=R[et],X=I[et];return Y||(Y={x:s/2,y:e/2,radius:1}),X||(X={x:s/2,y:e/2,radius:1}),{x:Y.x*(1-O)+X.x*O,y:Y.y*(1-O)+X.y*O,radius:Y.radius*(1-O)+X.radius*O}});return St(K,p)}}const W=F.selectAll(".venn-area").data(d,k=>k.sets),P=W.enter().append("g").attr("class",k=>`venn-area venn-${k.sets.length==1?"circle":"intersection"}${k.colour||k.color?" venn-coloured":""}`).attr("data-venn-sets",k=>k.sets.join("_")),B=P.append("path"),G=P.append("text").attr("class","label").text(k=>V(k)).attr("text-anchor","middle").attr("dy",".35em").attr("x",s/2).attr("y",e/2);a&&(B.style("fill-opacity","0").filter(k=>k.sets.length==1).style("fill",k=>k.colour?k.colour:k.color?k.color:g(k.sets)).style("fill-opacity",".25"),G.style("fill",k=>k.colour||k.color?"#FFF":t.textFill?t.textFill:k.sets.length==1?g(k.sets):"#444"));function L(k){return typeof k.transition=="function"?k.transition("venn").duration(o):k}let z=x;T&&typeof z.transition=="function"?(z=L(x),z.selectAll("path").attrTween("d",A)):z.selectAll("path").attr("d",k=>St(k.sets.map(O=>I[O])),p);const N=z.selectAll("text").filter(k=>k.sets in D).text(k=>V(k)).attr("x",k=>Math.floor(D[k.sets].x)).attr("y",k=>Math.floor(D[k.sets].y));u&&(T?"on"in N?N.on("end",rt(I,V)):N.each("end",rt(I,V)):N.each(rt(I,V)));const j=L(W.exit()).remove();typeof W.transition=="function"&&j.selectAll("path").attrTween("d",A);const Q=j.selectAll("text").attr("x",s/2).attr("y",e/2);return y!==null&&(G.style("font-size","0px"),N.style("font-size",y),Q.style("font-size","0px")),{circles:I,textCentres:D,nodes:W,enter:P,update:z,exit:j}}return c.wrap=function(x){return arguments.length?(u=x,c):u},c.useViewBox=function(){return n=!0,c},c.width=function(x){return arguments.length?(s=x,c):s},c.height=function(x){return arguments.length?(e=x,c):e},c.padding=function(x){return arguments.length?(i=x,c):i},c.distinct=function(x){return arguments.length?(b=x,c):b},c.colours=function(x){return arguments.length?(g=x,c):g},c.colors=function(x){return arguments.length?(g=x,c):g},c.fontSize=function(x){return arguments.length?(y=x,c):y},c.round=function(x){return arguments.length?(p=x,c):p},c.duration=function(x){return arguments.length?(o=x,c):o},c.layoutFunction=function(x){return arguments.length?(m=x,c):m},c.normalize=function(x){return arguments.length?(l=x,c):l},c.scaleToFit=function(x){return arguments.length?(f=x,c):f},c.styled=function(x){return arguments.length?(a=x,c):a},c.orientation=function(x){return arguments.length?(r=x,c):r},c.orientationOrder=function(x){return arguments.length?(h=x,c):h},c.lossFunction=function(x){return arguments.length?(v=x==="default"?tt:x==="logRatio"?Ct:x,c):v},c}function rt(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],y=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}let M=p(u);for(;u=r.pop(),!!u;){a.push(u);const g=a.join(" ");M.textContent=g,g.length>f&&M.getComputedTextLength()>i&&(a.pop(),M.textContent=a.join(" "),a=[u],M=p(u),y++)}const E=.35-y*h/2,_=e.getAttribute("x"),S=e.getAttribute("y");b.forEach((g,m)=>{g.setAttribute("x",_),g.setAttribute("y",S),g.setAttribute("dy",`${E+m*h}em`)})}}function at(t,n,s){let e=n[0].radius-q(n[0],t);for(let i=1;i<n.length;++i){const o=n[i].radius-q(n[i],t);o<=e&&(e=o)}for(let i=0;i<s.length;++i){const o=q(s[i],t)-s[i].radius;o<=e&&(e=o)}return e}function jt(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=at(e[0],t,n);for(let a=1;a<e.length;++a){const y=at(e[a],t,n);y>=o&&(i=e[a],o=y)}const r=zt(a=>-1*at({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(q(l,a)>a.radius){f=!1;break}for(const a of n)if(q(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 st(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?jt(t,[]):Et(u.arcs.map(a=>a.p1))}function Ie(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=q(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}function Lt(t,n,s){const e={},i=Ie(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 y=jt(u,a,s);e[r]=y,y.disjoint&&n[o].size>0&&console.log("WARNING: area "+r+" not represented on screen")}return e}function ke(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{t as T,br as r,a_ as W,bz as $,bt as x,b as B,bv as C}from"./DXyyWeag.js";import{bs as L,cd as S,ca as z,a7 as m,ay as f,W as b,bn as D,aA as o}from"./DYhIMPy1.js";import{G}from"./DyvrH0mm.js";import{a as H}from"./
|
|
1
|
+
import{t as T,br as r,a_ as W,bz as $,bt as x,b as B,bv as C}from"./DXyyWeag.js";import{bs as L,cd as S,ca as z,a7 as m,ay as f,W as b,bn as D,aA as o}from"./DYhIMPy1.js";import{G}from"./DyvrH0mm.js";import{a as H}from"./D8fRnm9t.js";import{dr as j}from"./D3QcPFoL.js";import{Iy as q,gL as E}from"./D5ej8a-y.js";function F(i,t){if(new.target)return T({component:F,...i});L(t,!0);const d=()=>C(_,"$workspace$",k),[k,v]=x();let c=r(t,"tab",7),a=r(t,"workspaceId",7),n=r(t,"layoutId",7),p=r(t,"isActive",7);const l=S(a());z(()=>l.set(a()));const _=j(l);var g={get tab(){return c()},set tab(e){c(e),o()},get workspaceId(){return a()},set workspaceId(e){a(e),o()},get layoutId(){return n()},set layoutId(e){n(e),o()},get isActive(){return p()},set isActive(e){p(e),o()},$set:$,$on:(e,s)=>B(t,e,s)},u=m(),w=f(u);{var y=e=>{var s=m(),A=f(s);G(A,a,h=>{H(h,{get workspace(){return d()},showBackToList:!1,onclose:()=>q.dispatch(E(n()??a(),c().id))})}),b(e,s)};W(w,e=>{p()&&d()&&e(y)})}b(i,u);var I=D(g);return v(),I}export{F as default};
|