@intent-hq/web 2.384.1 → 2.384.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/web/app/immutable/chunks/{DTdAlnvg.js → 2bsrY56g.js} +5 -5
- package/web/app/immutable/chunks/{BJ1Bk8co.js → 4QXQvR4H.js} +1 -1
- package/web/app/immutable/chunks/{CZDat5YW.js → 4oPBEC4-.js} +1 -1
- package/web/app/immutable/chunks/{D5reO2Y0.js → B4l71ix-.js} +1 -1
- package/web/app/immutable/chunks/{C1GvdDuD.js → B7RoQL2j.js} +2 -2
- package/web/app/immutable/chunks/{BFBQinse.js → B7h1ZmQS.js} +1 -1
- package/web/app/immutable/chunks/{D5i4Tktw.js → B7o2QL9R.js} +1 -1
- package/web/app/immutable/chunks/{4rRlR2tp.js → B8evz7o6.js} +2 -2
- package/web/app/immutable/chunks/{0_OkSok2.js → B8nUpMEz.js} +1 -1
- package/web/app/immutable/chunks/{BX_Jr21Z.js → BAAb6Ol7.js} +1 -1
- package/web/app/immutable/chunks/{qAXb8ucI.js → BBV_EtXR.js} +1 -1
- package/web/app/immutable/chunks/{5ibcqblv.js → BCx-pM-8.js} +1 -1
- package/web/app/immutable/chunks/{BkUPUOzV.js → BEiVNbJd.js} +1 -1
- package/web/app/immutable/chunks/{Tk34IzPH.js → BEjISjEF.js} +1 -1
- package/web/app/immutable/chunks/{jzrltQdi.js → BEpYOO0x.js} +1 -1
- package/web/app/immutable/chunks/{Dh_uOrf0.js → BFc0Rlfo.js} +1 -1
- package/web/app/immutable/chunks/{BgPJ_lbZ.js → BGN0Ete3.js} +1 -1
- package/web/app/immutable/chunks/{C7OV0KqB.js → BGaOyp5o.js} +1 -1
- package/web/app/immutable/chunks/{DvdS-8it.js → BHKaBN6i.js} +1 -1
- package/web/app/immutable/chunks/{JD0Hsmjx.js → BJZU-qAV.js} +1 -1
- package/web/app/immutable/chunks/{BACpI8G6.js → BK6CZrM5.js} +1 -1
- package/web/app/immutable/chunks/{BYIgLpGQ.js → BNFLngEB.js} +1 -1
- package/web/app/immutable/chunks/{Bmn4uqsd.js → BPZBxYco.js} +1 -1
- package/web/app/immutable/chunks/{B7eTEd5f.js → BRsOtr8M.js} +1 -1
- package/web/app/immutable/chunks/{eZPmVSmq.js → BYU-C1jV.js} +2 -2
- package/web/app/immutable/chunks/{ZAUoxjxb.js → BaodMpKG.js} +1 -1
- package/web/app/immutable/chunks/{eTRx_lEs.js → Bap7o4n5.js} +1 -1
- package/web/app/immutable/chunks/{Di0D97hw.js → BcffwE-d.js} +1 -1
- package/web/app/immutable/chunks/{Cj5p8V3Z.js → BhpCwvYl.js} +1 -1
- package/web/app/immutable/chunks/{CQhRmQZt.js → Bm6FDHvN.js} +1 -1
- package/web/app/immutable/chunks/{CFjwzuFW.js → BqU6TsU1.js} +1 -1
- package/web/app/immutable/chunks/{BGN2EuCq.js → Bw8_vMki.js} +1 -1
- package/web/app/immutable/chunks/{DRg21hWl.js → BziYv9ZW.js} +2 -2
- package/web/app/immutable/chunks/{BtBv0U_D.js → BzllE3aT.js} +2 -2
- package/web/app/immutable/chunks/{C41iTvQS.js → C4IVoYqo.js} +1 -1
- package/web/app/immutable/chunks/{Cxz7a3ln.js → CBZTF7Qa.js} +4 -4
- package/web/app/immutable/chunks/{E92QiCEr.js → CBvkahdk.js} +1 -1
- package/web/app/immutable/chunks/{BltFs6ST.js → CCAcpS1o.js} +2 -2
- package/web/app/immutable/chunks/{CGmFuvv3.js → CI-VmE1m.js} +1 -1
- package/web/app/immutable/chunks/{MEhQGTPs.js → CJ72QIuX.js} +3 -3
- package/web/app/immutable/chunks/{lDDdxVqt.js → CJHIllR1.js} +1 -1
- package/web/app/immutable/chunks/{BiM95_Ol.js → CK2Cr1RP.js} +1 -1
- package/web/app/immutable/chunks/{CDVdEpeY.js → CNzCvSR9.js} +1 -1
- package/web/app/immutable/chunks/{DM_kAcca.js → CP9jggxp.js} +1 -1
- package/web/app/immutable/chunks/{CvCS8OAf.js → CSIAWhhl.js} +1 -1
- package/web/app/immutable/chunks/{IjcPbG76.js → CUWtSiZ5.js} +1 -1
- package/web/app/immutable/chunks/{CMn1nNPl.js → CU_25eHm.js} +1 -1
- package/web/app/immutable/chunks/{D59epBkG.js → CYQKXGJn.js} +1 -1
- package/web/app/immutable/chunks/{CjsT6P1W.js → CayjT2l8.js} +1 -1
- package/web/app/immutable/chunks/{d7CFoqrB.js → Cb0AGw5F.js} +1 -1
- package/web/app/immutable/chunks/{DnkGrT83.js → CbDsELcV.js} +3 -3
- package/web/app/immutable/chunks/{B57eLsJv.js → CbucW-av.js} +1 -1
- package/web/app/immutable/chunks/{lma_Aa_Q.js → CceLSCZq.js} +1 -1
- package/web/app/immutable/chunks/{CdhlQsS3.js → CdMAY9xp.js} +1 -1
- package/web/app/immutable/chunks/{B1DQbauY.js → CgJXgMzB.js} +1 -1
- package/web/app/immutable/chunks/{BHXs-6um.js → ChdMCKvy.js} +1 -1
- package/web/app/immutable/chunks/{CrjK8LH9.js → Chx7ONT3.js} +1 -1
- package/web/app/immutable/chunks/{BvGyYsBI.js → Ciei8d6b.js} +3 -3
- package/web/app/immutable/chunks/{DvjmmZhh.js → CjyJQV6j.js} +1 -1
- package/web/app/immutable/chunks/{Dkgk_rvZ.js → CnHcPhIW.js} +4 -4
- package/web/app/immutable/chunks/{8uGKFevW.js → Ct8L3-dh.js} +1 -1
- package/web/app/immutable/chunks/{3BCyU2N-.js → Cw2ZnpX7.js} +1 -1
- package/web/app/immutable/chunks/{CEaHYCM5.js → Cx6Utm5I.js} +1 -1
- package/web/app/immutable/chunks/{DSTc-o8X.js → D0sQr-H_.js} +1 -1
- package/web/app/immutable/chunks/{ByNdLM3c.js → D2LsUZli.js} +1 -1
- package/web/app/immutable/chunks/{CfE9G-Vk.js → D3qs3VJZ.js} +1 -1
- package/web/app/immutable/chunks/{DnQOpOtg.js → D4ZMSrvm.js} +3 -3
- package/web/app/immutable/chunks/{BbV6R15i.js → D4g4334W.js} +1 -1
- package/web/app/immutable/chunks/{C8veqOP9.js → D5u143LD.js} +1 -1
- package/web/app/immutable/chunks/{gZ0nGq7V.js → D6Hf6lXy.js} +1 -1
- package/web/app/immutable/chunks/{BV8D9pH6.js → D8elUKsb.js} +1 -1
- package/web/app/immutable/chunks/{KmGBeLVg.js → D8s3q34H.js} +1 -1
- package/web/app/immutable/chunks/{CeOHBQlu.js → DAzQ7i2U.js} +1 -1
- package/web/app/immutable/chunks/{CQ9fljqW.js → DB0jxR-D.js} +1 -1
- package/web/app/immutable/chunks/{D_DdTIu0.js → DCGl0RXW.js} +7 -7
- package/web/app/immutable/chunks/{ClyQ7g2p.js → DGZLYT-c.js} +1 -1
- package/web/app/immutable/chunks/{CCej7AMq.js → DHbqsCcC.js} +1 -1
- package/web/app/immutable/chunks/{BMPSP6zy.js → DJM7b4MF.js} +1 -1
- package/web/app/immutable/chunks/{C-srtNB0.js → DKLk3Wx8.js} +1 -1
- package/web/app/immutable/chunks/{BMW8QkkW.js → DKrlwauu.js} +1 -1
- package/web/app/immutable/chunks/{DUhda8VE.js → DLKd3Oyl.js} +1 -1
- package/web/app/immutable/chunks/{DA6dl8M4.js → DN-MAVuE.js} +1 -1
- package/web/app/immutable/chunks/{CKc3ivIh.js → DOU-V4Cg.js} +2 -2
- package/web/app/immutable/chunks/{C2jf24pz.js → DV6uX7ff.js} +1 -1
- package/web/app/immutable/chunks/{DQdjZnba.js → DVL_BM5a.js} +1 -1
- package/web/app/immutable/chunks/{XS67_4Nj.js → DY52XPja.js} +2 -2
- package/web/app/immutable/chunks/{DAUcVagO.js → DZjKvOyB.js} +1 -1
- package/web/app/immutable/chunks/{DVuQpyKc.js → DZnKNdAN.js} +1 -1
- package/web/app/immutable/chunks/{P9PnSQNh.js → DaZ7K0cS.js} +3 -3
- package/web/app/immutable/chunks/{CTKlTmjI.js → DcACHBPs.js} +1 -1
- package/web/app/immutable/chunks/{BegKMnH4.js → Df-2xtN9.js} +1 -1
- package/web/app/immutable/chunks/{CcNZQwT1.js → Dfh8DRT0.js} +3 -3
- package/web/app/immutable/chunks/{XzLIP4y8.js → Dg5FvxXA.js} +1 -1
- package/web/app/immutable/chunks/{esAd2hCU.js → Dk0Z1pVU.js} +1 -1
- package/web/app/immutable/chunks/{Rz920YbF.js → DkET5D1Z.js} +1 -1
- package/web/app/immutable/chunks/{BXClhyCJ.js → Dl9we4aZ.js} +1 -1
- package/web/app/immutable/chunks/{DUkL2vjQ.js → DltbAw1B.js} +1 -1
- package/web/app/immutable/chunks/{BQXu3XXC.js → Dm9EHXJZ.js} +1 -1
- package/web/app/immutable/chunks/{HP51nVq8.js → DnozpXMO.js} +1 -1
- package/web/app/immutable/chunks/{Dc7e-OgI.js → DoStKyYK.js} +2 -2
- package/web/app/immutable/chunks/{Cr6ukNck.js → DpeQIGDn.js} +1 -1
- package/web/app/immutable/chunks/{CzG_0Mji.js → H9nIRlnK.js} +1 -1
- package/web/app/immutable/chunks/{CZ56JG-R.js → Ipu7_2rx.js} +1 -1
- package/web/app/immutable/chunks/{Ue4xifLs.js → McOgUz0K.js} +1 -1
- package/web/app/immutable/chunks/{Bk1CZ_aH.js → MsC14vMO.js} +1 -1
- package/web/app/immutable/chunks/{rjhGooNa.js → NZ_vlsKe.js} +1 -1
- package/web/app/immutable/chunks/{wsPxCWV4.js → QFC15GkG.js} +2 -2
- package/web/app/immutable/chunks/{ClNWpSoj.js → RzextV4B.js} +1 -1
- package/web/app/immutable/chunks/{evy8DaDH.js → WWSsQ21S.js} +1 -1
- package/web/app/immutable/chunks/{4Pag07jF.js → YTt0B0lA.js} +1 -1
- package/web/app/immutable/chunks/{-31r5MID.js → ZNhLMxqQ.js} +1 -1
- package/web/app/immutable/chunks/{Cm60YBNN.js → Za_i3D8P.js} +4 -4
- package/web/app/immutable/chunks/{DtO9zNSi.js → _0LhNaan.js} +1 -1
- package/web/app/immutable/chunks/{0vzGySSF.js → akx8_VtJ.js} +1 -1
- package/web/app/immutable/chunks/{DneGzq7o.js → ez7LBTR9.js} +1 -1
- package/web/app/immutable/chunks/{BxiKdHSR.js → gkPeOUJv.js} +1 -1
- package/web/app/immutable/chunks/{CRGZeiHP.js → h3LTJhAu.js} +1 -1
- package/web/app/immutable/chunks/{D2rdAIDv.js → hcDGwCEP.js} +1 -1
- package/web/app/immutable/chunks/{gIt--5se.js → jiLgt56M.js} +1 -1
- package/web/app/immutable/chunks/{BWM_jjc6.js → jmJoSjVa.js} +1 -1
- package/web/app/immutable/chunks/{B80lqB7E.js → mLzVJBUx.js} +1 -1
- package/web/app/immutable/chunks/{BswbJQ0U.js → oTjaecL9.js} +1 -1
- package/web/app/immutable/chunks/{D8mJ0i4V.js → oki3b9jv.js} +1 -1
- package/web/app/immutable/chunks/{DJEkkAqR.js → qLxI2L63.js} +1 -1
- package/web/app/immutable/chunks/{8eQog6L5.js → rYnu2FeJ.js} +1 -1
- package/web/app/immutable/chunks/{B4T9RExk.js → tF7VK2wM.js} +1 -1
- package/web/app/immutable/chunks/{zJz5NUAZ.js → wZz1J3UE.js} +1 -1
- package/web/app/immutable/entry/{app.BN9LppoE.js → app.CHgb5yMQ.js} +2 -2
- package/web/app/immutable/entry/start.CINDVXKj.js +1 -0
- package/web/app/immutable/nodes/{0.DuuUT7lf.js → 0.DECevrtM.js} +1 -1
- package/web/app/immutable/nodes/{1.CuKU_s85.js → 1.LZZdSQoJ.js} +1 -1
- package/web/app/immutable/nodes/{10.DkGJji_v.js → 10.KUh1filM.js} +1 -1
- package/web/app/immutable/nodes/{11.DswJjpxi.js → 11.D5CTYtT6.js} +1 -1
- package/web/app/immutable/nodes/{15.CDuV6cP7.js → 15.5st_fzCN.js} +1 -1
- package/web/app/immutable/nodes/{19.DvjAcoWG.js → 19.wB7XsK3B.js} +2 -2
- package/web/app/immutable/nodes/{2.r_yCTdWa.js → 2.C7whbYui.js} +1 -1
- package/web/app/immutable/nodes/{3.BzmP3XDj.js → 3.KbBbpAm6.js} +1 -1
- package/web/app/immutable/nodes/{4.BPX7a1xw.js → 4.C1b_QyI0.js} +1 -1
- package/web/app/immutable/nodes/{5.CbH1sau-.js → 5.CG-B5vOM.js} +1 -1
- package/web/app/immutable/nodes/{6.DXN3u4yU.js → 6.v-GnNHdu.js} +1 -1
- package/web/app/immutable/nodes/{7.BAFpN-hf.js → 7.D9LU-AZb.js} +1 -1
- package/web/app/immutable/nodes/{8.COZNLTaW.js → 8.BJP_1POW.js} +1 -1
- package/web/app/immutable/nodes/9.f8mHa7_b.js +14 -0
- package/web/app/version.json +1 -1
- package/web/index.html +9 -9
- package/web/app/immutable/entry/start.Dyk9KswN.js +0 -1
- package/web/app/immutable/nodes/9.VZM4RxD5.js +0 -14
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var G_=Object.defineProperty;var Ng=n=>{throw TypeError(n)};var V_=(n,r,a)=>r in n?G_(n,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):n[r]=a;var Js=(n,r,a)=>V_(n,typeof r!="symbol"?r+"":r,a),K_=(n,r,a)=>r.has(n)||Ng("Cannot "+a);var Ao=(n,r,a)=>(K_(n,r,"read from private field"),a?a.call(n):r.get(n)),Bg=(n,r,a)=>r.has(n)?Ng("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(n):r.set(n,a);import{t as fn,bo as X,bw as vn,bp as pf,b as hn,bm as u,bq as Nr,bs as ge,br as Li}from"./hY0rMePc.js";import{bs as mn,a5 as I,bf as fs,bA as b,W as p,bn as _n,aA as Z,aB as E,ca as ae,a7 as Wt,ay as ye,aD as e,cd as Bn,c9 as o,bS as m,bl as de,be as pn,b_ as L,bO as j,c5 as ot,bH as w,bV as _e,bj as qs,bk as ro,b$ as dn,ai as Ud,aj as ps,bo as Vl,br as Tr,c0 as Ot,cb as ql,ak as Q_,aw as bi,a as J_}from"./3SdAC2_C.js";import{i as B}from"./BWmYJDmC.js";import{k as Ci}from"./CXul4WJt.js";import{g as On,i as Y_,I as eo,p as Lo,e as Eo}from"./D400ElMz.js";import{n as Bt,l as ma,c as to,j as Wg,k as Do,h as X_}from"./72S4_8Fo.js";import{b as ff,e as zd,f as xe,s as Ue,c as jt,g as gs}from"./leDczq9h.js";import{b as Z_}from"./goTpbPhD.js";import{b as _r}from"./Dn334wJv.js";import{m as ew,U as tw,Z as nw,X as rw,Y as aw,I as Ug,o as sw,l as ow,a2 as iw,x as zg,$ as lw,a0 as jg,r as cw,s as dw}from"./MEhQGTPs.js";import{Jx as F,fp as uw,eX as gw,f4 as pw,eY as fw,f2 as vw,f1 as hw,e_ as mw,f0 as _w,eZ as ww,rv as bw,c7 as yw,i as ki,J6 as Iw,Dd as vf,Di as Sw,Dk as Gg,Dh as $w,Dj as kw,vE as xw,vG as Cw,Cq as hf,cq as Pw,co as Rw,Bz as Aw,bF as Tw,A4 as Mw,Cf as id,v0 as Ew,cr as Vg,dC as qw,dD as Lw,Cp as Hw,em as Ow,CJ as Dw,CI as Fw,CN as Nw,CM as Bw,cR as Ww,cU as Uw,nD as zw,es as jw,wS as Gw,CO as Vw,wU as Kw,CP as Qw,cV as Jw,cW as Yw,nL as Xw,Ai as Zw,Is as eb,Ah as tb,Du as nb,wn as rb,wo as ab,z0 as sb,z4 as ld,wj as ob,wk as ib,rT as lb,rg as cb,re as db,f$ as ub,HQ as gb,Ll as pb,GN as fb,go as vb,p3 as hb,Jl as mb,ok as _b,A3 as wb,fu as Kg,r3 as Qg,fn as bb,fm as yb,tC as Ib,g4 as Jg,rf as Sb,ff as $b,Ca as kb,m as xb,nM as Cb,zI as Pb,y_ as Rb,EA as Ab,Ep as Yg,xi as Tb,xj as Xg,u$ as Zg,p4 as Mb,DG as Eb,gk as qb,g2 as Lb,eV as Hb,cN as Ob,A7 as Db,Lq as Fb,Cv as Nb,LI as Bb,y3 as Wb,gb as Ub,fe as zb,cM as jb,cJ as Gb,cI as Vb,vs as Kb,xp as Qb,xn as Jb,cG as Yb,cF as Xb,z6 as Zb,z1 as ey,xo as ty}from"./DXdFemRu.js";import{a as jd}from"./CC7to1B5.js";import{aM as ny,aL as ry,bg as ay,a7 as sy,aD as oy,aO as iy,M as mf,a0 as _f,b8 as ly,b2 as cy,as as ep,P as yl,b0 as tp,a$ as np,a_ as rp}from"./Dkgk_rvZ.js";import{l as wf,G as dy,I as Rd,at as uy,b1 as Ll,a9 as bf,S as gy,aW as cd,aq as py,aJ as fy,C as vy,z as yf,s as hy,A as my,v as _y,a$ as wy,aH as If,aG as Sf,aI as by,j as ap,aM as dd,aT as sp,aS as Il,aU as op,Q as ip,d as yy,e as Iy,ax as Sy,V as lp,aE as $y,c as ky,m as xy,aV as cp,ap as Cy,aw as dp,a as Py,aA as Ry,ad as up,aD as Ay,aX as gp,a_ as pp,n as fp,ae as Ty,R as My,ay as vp,am as Ey,O as qy,as as Ly,h as Hy,q as Oy,$ as ud,_ as Dy,aC as hp,a8 as Fy,f as Ny,i as By,a6 as Wy,ac as Uy}from"./BQXu3XXC.js";import{f as zy,o as jy,E as Gy,C as Vy,m as Ky,a2 as mp,aa as Qy,K as Jy,e as Yy,y as Xy}from"./AXE1aiRo.js";import{g as Ri}from"./DypB-Dwi.js";import{dW as Bl,cU as $f,O as kf,W as Zy,bv as eI,aF as xf,dH as Cf,aU as qo,e8 as tI,dw as Pf,aw as Gd,dV as Vd,aN as Rf,cP as nI,V as ha,a3 as Xs,B as rI,a7 as aI,a4 as sI,M as oI,a6 as iI,ar as lI,aG as Af,aO as Hl,b6 as cI,ay as Tf,r as dI,n as Ad,H as uI,dY as gI,aQ as pI,aK as fI,c9 as vI,aW as hI,bM as mI,bK as _I,bL as wI,c8 as bI,c7 as yI,cN as II,cM as SI,aS as $I,bb as kI,bd as xI,bg as CI,bc as PI,bl as RI,bf as AI,be as TI,bh as MI,bi as EI,bk as qI,bj as LI,ax as HI,cj as OI,ck as DI,dv as FI,du as NI,a$ as BI,G as WI,b3 as UI,cf as zI,C as _p,d0 as jI,ba as ds,b$ as GI,X as VI,bq as KI,E as QI,ad as JI,t as YI,cW as XI,d3 as wp,Q as bp,dt as ZI,cQ as gd}from"./C9aF-Sor.js";import{u as Mf,a as Sl,ag as eS,x as tS,ad as Ef,af as nS,ac as qf,a4 as rS,F as yp,D as aS,e as sS,n as oS,s as iS,m as lS,Y as cS,k as dS}from"./Cr6ukNck.js";import{a2 as uS,b5 as gS,cM as pS,a_ as fS,b4 as vS,c2 as hS,c9 as mS,w as _S,x as wS,cd as bS}from"./3BCyU2N-.js";import{n as yS,P as Lf,F as IS,ai as SS,r as $S,ac as kS}from"./B4mHWFlW.js";import{I as xS,s as CS,H as Ip}from"./Bqd7fdCF.js";import{e as PS}from"./CL3a4Hm1.js";import{e as RS,f as AS}from"./BXyd6A9p.js";import{s as TS,o as Zs,b as MS,g as Wl,d as ES,l as yi}from"./CIyUrgF0.js";import{a5 as qS,a7 as LS,D as HS,N as OS,ac as Sp,X as Hf,i as DS,r as ur,v as Ai,u as ea,p as xi,x as wr,S as Kd,m as Kl,s as Ho,y as Ti,o as ao,n as so,t as $p,aa as oo,w as io,a9 as Qd,q as _a,z as Oo,J as Td,_ as kp,g as FS,F as NS,U as Of,I as Df,a8 as Ff,a6 as Ol,O as BS,E as Nf,V as WS,A as US,b as zS,ab as jS,ad as $l,G as GS,e as pd,l as VS,C as KS,f as Ys,j as xp,H as us,Q as QS,d as kl,c as JS,a as Cp,h as YS,L as XS,Y as Pp,a4 as fd,a1 as Rp,a0 as ZS,a3 as Ap,$ as Tp,T as e$,B as t$,k as n$,a2 as r$,K as a$,R as s$,P as o$,W as i$}from"./CZ56JG-R.js";import{m as l$}from"./Dms_DO28.js";import{g as Bf}from"./CwTWayd0.js";import{b as c$}from"./B4PfEXaO.js";import{g as d$}from"./05jEdw2V.js";import{a as u$}from"./BTtAt-Pu.js";import{q as Wf,d as gr,r as g$,e as Ul,j as p$,g as Md,i as f$,f as Ed,c as v$,A as h$,O as Mp,k as m$}from"./BGN2EuCq.js";import{P as _$}from"./6kZoubzS.js";import{e as w$}from"./BLZhAOLT.js";import{b as b$,a as y$,g as I$,c as S$,i as $$}from"./BvFRd1je.js";import{R as k$,g as x$,W as xl,c as C$}from"./CrjK8LH9.js";import"./COB2k0Aa.js";import"./uAXEbxa8.js";import{t as Mi}from"./CjZEyjv4.js";import{F as P$,h as R$}from"./rNjiZ_3W.js";import"./CbqBbwIN.js";import{C as A$,e as Dr,L as T$,l as Ql,d as Jl,K as Yl,h as Jd,M as Xl,S as Fa}from"./CbaFGz2w.js";import{D as M$}from"./DTU57FsX.js";import{f as Ep}from"./edw8TVSr.js";import"./DU3vNstz.js";import{i as Uf}from"./BjLb7AHW.js";import{h as qp,i as Lp,g as Hp,P as Op,C as E$,m as Dl,R as q$}from"./x_GKKTQV.js";import{f as $t,ae as L$}from"./CIU_APaR.js";import{F as gt,bs as H$,cd as O$,aw as Na,a2 as zf,c9 as D$,bf as F$,be as N$,bg as B$,aO as Dp,aj as vd,aB as hd,bB as jf,d3 as zl,cF as W$,aM as Fp,cb as Np,cK as jl,bu as U$,aS as z$,d0 as j$,a8 as Gf,ac as G$,ag as V$,cr as K$,ba as Q$,aC as Vf,cT as Bp,cz as J$,ax as Y$,cD as X$,c3 as Z$}from"./DETS1-K4.js";import{c as Kf}from"./ChTqQfQN.js";import"./BXT21uPn.js";import{c as Tt}from"./BNN0vAFF.js";import{a4 as Qf,bf as ek,aq as tk,k as nk,X as rk,V as ak,a1 as sk,Y as ok,bv as ik,U as lk,a0 as ck,ag as dk}from"./-31r5MID.js";import{d as Gl,f as uk,e as gk}from"./HP51nVq8.js";import{A as pk}from"./Djz9uuuA.js";import{D as fk}from"./CJtFSxbf.js";import"./BEvFtidS.js";import{a as vk,C as hk}from"./DpChblex.js";import"./DnHJL326.js";import{C as mk}from"./D0I7VQ8a.js";import{h as qd,r as _k,a as wk}from"./CKc3ivIh.js";import{s as bk}from"./IxfPVMNO.js";import{I as yk,a as Jf}from"./CmbheRhJ.js";import{L as Ik}from"./O63l2zGE.js";import{g as Sk,f as $k,b as kk}from"./Mh0PqgbP.js";import{s as Ei,g as Yn,i as xk,j as Ck,e as Wp,r as Up,f as Pk,d as Rk,a as md,h as Ak}from"./CQhRmQZt.js";import{i as zp,a as Tk}from"./Bu13V5mO.js";import{seekConversationToMessage as jp}from"./DvjmmZhh.js";import{l as Xt,o as _d,h as Yd,n as Ld,q as Mk}from"./B7JHU89G.js";import{o as Ek}from"./BtBv0U_D.js";import{A as Yf}from"./DDnDtSlm.js";import{b as Xf}from"./Bcb1iqQJ.js";import{h as qk,f as Zf,w as Lk,g as Hk,Q as Ok,O as Dk,M as Fk,l as ev,m as Nk,J as tv,s as nv}from"./KMO8sO00.js";import{selectCurrentWorkspaceTabId as wd}from"./CcSZrbR4.js";import{o as Bk}from"./BiM95_Ol.js";import{d as Wk}from"./B0Z-1lwJ.js";import{P as Uk}from"./DMrypNw-.js";import{g as zk}from"./Ue4xifLs.js";import{H as rv,M as jk,y as Gk,J as Vk,g as Kk,i as Qk,u as Jk,e as av,c as sv,d as Yk}from"./BVlMQ1xQ.js";import{c as Xk,h as Xd,f as ov,Q as Zk}from"./DZEg_JlV.js";import{t as ex}from"./DAsc1V4f.js";import{s as tx}from"./BsieX9dN.js";import{i as iv}from"./CegXgKbh.js";import{d as nx,i as rx,r as ax}from"./CAmQkXZq.js";import{g as sx}from"./k863GLf6.js";var ox=new Set(["$$slots","$$events","$$legacy","ref","class","children"]),ix=E("<div><!></div>");function lv(n,r){if(new.target)return fn({component:lv,...n});mn(r,!0);let a=X(r,"ref",15,null),i=X(r,"class",7),c=X(r,"children",7),l=pf(r,ox);var v={get ref(){return a()},set ref(f=null){a(f),Z()},get class(){return i()},set class(f){i(f),Z()},get children(){return c()},set children(f){c(f),Z()},$set:vn,$on:(f,P)=>hn(r,f,P)},g=ix();ff(g,f=>({"data-slot":"card-header",class:f,...l}),[()=>zd("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-x-4 gap-y-1.5 pt-4 pb-2 has-data-[slot=card-action]:grid-cols-[minmax(0,1fr)_auto]",mk,i())]);var _=I(g);return Mi(_,()=>c()??fs),b(g),_r(g,f=>a(f),()=>a()),p(n,g),_n(v)}var lx=new Set(["$$slots","$$events","$$legacy","ref","class","children"]),cx=E("<div><!></div>");function cv(n,r){if(new.target)return fn({component:cv,...n});mn(r,!0);let a=X(r,"ref",15,null),i=X(r,"class",7),c=X(r,"children",7),l=pf(r,lx);var v={get ref(){return a()},set ref(f=null){a(f),Z()},get class(){return i()},set class(f){i(f),Z()},get children(){return c()},set children(f){c(f),Z()},$set:vn,$on:(f,P)=>hn(r,f,P)},g=cx();ff(g,f=>({"data-slot":"card-title",class:f,...l}),[()=>zd("type-title min-w-0 break-words font-semibold leading-tight text-foreground",i())]);var _=I(g);return Mi(_,()=>c()??fs),b(g),_r(g,f=>a(f),()=>a()),p(n,g),_n(v)}const Cl=xS.CHAT_MEDIA,bd=TS().min(1).max(512);Zs({workspaceId:bd,agentId:bd,draftId:Wl(),principalId:bd,media:MS(yS).min(1).max(20)}).strict();const dx=Zs({sessionId:Wl()}).strict();dx.extend({control:ES("action",[Zs({action:yi("readiness")}).strict(),Zs({action:yi("export"),request:RS}).strict(),Zs({action:yi("transcribe"),request:AS}).strict(),Zs({action:yi("release"),jobId:Wl()}).strict(),Zs({action:yi("adopt"),jobId:Wl()}).strict()])}).strict();function Zd(n,r,a,i=async(c,l)=>typeof window>"u"||CS(window)!=="electron"?{ok:!1,error:"unavailable"}:PS().invoke(c,l)){let c=null,l=null,v=!1;async function g(){v=!0,a.removeEventListener("abort",_);const k=c;c=null,k&&await i(Cl.CLOSE,{sessionId:k}).catch(()=>{})}const _=()=>{g()};a.addEventListener("abort",_,{once:!0});const f=()=>{if(v||a.aborted||!r())throw new Error("media-send-retired")};async function P(){if(f(),c)return c;if(l)return l;l=(async()=>{const k=await i(Cl.BEGIN,n);if(!k.ok)throw new Error("media-export-unavailable");c=k.value.sessionId;try{return f(),c}catch(W){throw await g(),W}})();try{return await l}finally{l=null}}async function S(k){const W=await P();f();const O=await i(Cl.CONTROL,{sessionId:W,control:k});return f(),O}return{service:{exportMedia:k=>S({action:"export",request:k}),adoptMediaJob:k=>S({action:"adopt",jobId:k}),transcribeMedia:k=>S({action:"transcribe",request:k}),releaseMediaJob:async k=>c?await i(Cl.CONTROL,{sessionId:c,control:{action:"release",jobId:k}}):{ok:!0,value:void 0}},dispose:g,readiness:()=>S({action:"readiness"})}}const yd=new Set;async function ux(n){const{drafts:r,signal:a}=n,i=structuredClone(n.capture),c=structuredClone(n.items),l=structuredClone(n.payload),{workspaceId:v,agentId:g}=i,_=Ri(F.state),f=Bl.select(F.state,v),P=$f.select(F.state),S=wf(),q=JSON.stringify([_,v,g]);if(!_||!f||!P||l.wsId!==v||yd.has(q))return!1;yd.add(q);const k=new AbortController,W=()=>k.abort();a.addEventListener("abort",W,{once:!0});const O=()=>!a.aborted&&!k.signal.aborted&&Ri(F.state)===_&&Bl.select(F.state,v)===f&&bf(S)&&r.isCurrentDraft(i),T=F.getReadableState().subscribe(()=>{O()||k.abort()});let D=null;try{if(!O()||uS(c))return!1;const K=Mf(i.attachments),se=Lf(IS(v,g),K,c.map(fe=>({contextItemId:fe.id,attachmentId:fe.attachmentId,path:fe.path}))),C=new Set([...se.images,...se.clips].map(fe=>fe.contextItemId));if(K.some(([fe])=>!C.has(fe))||se.images.some(fe=>fe.mediaError)||se.clips.some(fe=>fe.mediaError)||!SS(l.text,se))throw new Error("invalid-evidence");if(D=n.warm?.take(i,k.signal)??null,!await r.flushDraft(i)||!O())return!1;const x=await zy.agents.get(g,v);if(!O())return!1;if(!x||x.workspaceId!==v||x.retiredAt||x.pendingDeleteAt||x.status==="deleted")throw new Error("unavailable");const Q=se.clips.flatMap(fe=>fe.media?[fe.media]:[]);Q.length&&!D&&(D=Zd({workspaceId:v,agentId:g,draftId:crypto.randomUUID(),principalId:P.principal.id,media:Q},O,k.signal));const pe=dy(c,se),Te=Rd(pe),he=await uy({workspaceId:v,agentId:g,evidence:se,clickedItems:c,sendItems:pe,clickedPayload:{...l,contextItems:pe,imageBlocks:Te.imageBlocks,fileBlocks:Te.fileBlocks},binding:S,service:D?.service??null,current:O,onRecord:()=>{}});return!he||!O()?!1:Ll(F,g,he)}catch{return O()&&F.dispatch(uw(g,u.dock_conversation_sendFailed_error())),!1}finally{T(),a.removeEventListener("abort",W),await D?.dispose(),yd.delete(q)}}const dv=1e4,Gp={wasBusy:!1,busySince:null,preempted:!1,prediction:null};function Vp(n){return qS(n.messageMetadata)}function gx(n,r){if(n.some(Vp)){const a=n[0];return a&&!Vp(a)&&Kp(a,r)?[a.id]:[]}return n.filter(a=>Kp(a,r)).map(a=>a.id)}function px(n){let r=null;for(const a of n)(a.status==="preparing"||a.status==="sending")&&a.createdAt>(r??-1/0)&&(r=a.createdAt);return r}function Kp(n,r){return!n.requeuedAfterFailure&&LS(n,r)}function fx(n,r){const{busy:a,queue:i,delivered:c,now:l}=r,v=r.blocked||r.interrupted,g=r.timeoutMs??dv;let _=n.prediction;if(_){const k=new Set(i.map(D=>D.id)),W=_.ids.filter(D=>k.has(D)&&!c.has(D)),O=l-_.startedAt>=g,T=n.wasBusy&&!a;!W.length||O||v&&!a||T?_=null:W.length!==_.ids.length&&(_={..._,ids:W})}const f=n.wasBusy&&!a,P=n.wasBusy?n.busySince:a?l:null,S=n.wasBusy&&n.preempted||P!==null&&r.directSendAt!==null&&r.directSendAt>P;if(!_&&f&&!v&&!S){const k=gx(i,l).filter(W=>!c.has(W));k.length&&(_={ids:k,startedAt:l})}const q={wasBusy:a,busySince:a?P:null,preempted:a&&S,prediction:_};return n.wasBusy===q.wasBusy&&n.busySince===q.busySince&&n.preempted===q.preempted&&n.prediction===q.prediction?n:q}class vx{constructor(){Js(this,"previousWorkspaceId",null);Js(this,"_isRebinding",!1);Js(this,"_generation",0);Js(this,"_rebindPromise",null);Js(this,"_rebindResolve",null)}recordMount(r){return this.previousWorkspaceId=r,r}wasWorkspaceChangedDuringMount(r){return this.previousWorkspaceId!==r}shouldRebind(r){return!r||this.previousWorkspaceId===null?!1:r!==this.previousWorkspaceId}recordRebind(r){this.previousWorkspaceId=r}hasWorkspaceChanged(r){return r!==this.previousWorkspaceId}get trackedWorkspaceId(){return this.previousWorkspaceId}get isRebinding(){return this._isRebinding}startRebind(){return this._generation++,this._isRebinding=!0,this._rebindResolve?.(),this._rebindPromise=new Promise(r=>{this._rebindResolve=r}),this._generation}endRebind(r){r!==void 0&&r!==this._generation||(this._isRebinding=!1,this._rebindResolve?.(),this._rebindPromise=null,this._rebindResolve=null)}async waitForRebind(r=5e3){if(!this._isRebinding||!this._rebindPromise)return!1;const a=Date.now()+r;for(;this._isRebinding&&this._rebindPromise;){const i=a-Date.now();if(i<=0)return!1;let c;const l=await Promise.race([this._rebindPromise.then(()=>!1),new Promise(v=>{c=setTimeout(()=>v(!0),i)})]);if(clearTimeout(c),l)return!1}return!0}}function hx(n,r){return!(n?.tabType!=="agent"||n.agentId!==r.agentId||!r.isActive||n.workspaceId&&n.workspaceId!==r.workspaceId||r.panelId&&(n.source!=="dictation"&&!r.isPanelFocused||n.panelId&&n.panelId!==r.panelId))}function Qp(n){const r=typeof n=="string"?n:n&&typeof n=="object"&&typeof n.script=="string"?n.script:void 0;return r||void 0}var mx=E('<div role="status" aria-live="polite" data-presence-typing-indicator=""><span class="inline-flex min-w-[var(--operational-leading-slot-size)] shrink-0 items-center justify-center svelte-lm4khl"><!></span> <span class="min-w-0 truncate svelte-lm4khl"> </span> <span class="inline-flex shrink-0 items-center gap-0.5 svelte-lm4khl" aria-hidden="true"><span class="typing-dot size-1 rounded-full bg-current svelte-lm4khl"></span> <span class="typing-dot size-1 rounded-full bg-current svelte-lm4khl" style="animation-delay: 0.2s"></span> <span class="typing-dot size-1 rounded-full bg-current svelte-lm4khl" style="animation-delay: 0.4s"></span></span></div>');function uv(n,r){if(new.target)return fn({component:uv,...n});mn(r,!0);const a=()=>ge(P,"$typing$",i),[i,c]=Nr();let l=X(r,"workspaceId",7),v=X(r,"agentId",7),g=X(r,"class",7,"");const _=Bn(""),f=Bn("");ae(()=>{_.set(l())}),ae(()=>{f.set(v())});const P=gS(_,f),S=o(()=>w$(a()));var q={get workspaceId(){return l()},set workspaceId(D){l(D),Z()},get agentId(){return v()},set agentId(D){v(D),Z()},get class(){return g()},set class(D=""){g(D),Z()},$set:vn,$on:(D,K)=>hn(r,D,K)},k=Wt(),W=ye(k);{var O=D=>{var K=mx(),se=I(K),C=I(se);_$(C,{get people(){return a()},size:12,decorative:!0}),b(se);var x=m(se,2),Q=de(x,!0);pn(2),b(K),L(()=>{xe(K,1,`${Wf} flex h-4 min-w-0 items-center gap-[var(--operational-leading-gap)] px-[var(--operational-row-inline-padding)] font-family-child font-normal text-muted-foreground text-[11px] leading-4 ${g()??""} /* a11y-ignore: user-requested compact typing status in the composer gap */`,"svelte-lm4khl"),j(Q,e(S))}),p(D,K)};B(W,D=>{e(S)&&D(O)})}p(n,k);var T=_n(q);return c(),T}const _x=50,wx=5e3,bx=500,yx=()=>({authority:()=>Ri(F.state),persistSnapshot:py,dispatch:n=>F.dispatch(n),ownerView:n=>fy.withStore(F)(n)});function Ix(n){const r=n.store??yx(),a=crypto.randomUUID();let i=_e(!1),c=_e(!1),l=_e(!1),v=null,g=null,_=0,f=!1,P=null,S=null,q=null,k=0,W=null,O=null;const T={};let D,K=_e([]),se=null,C=0,x="",Q=0,pe="";const Te=()=>{const N=n.workspaceId(),R=n.agentId();if(!N||!R||!(n.active?.()??!0))return null;const re=r.authority?.();if(!re||f)return null;const qe=n.inputValue(),H=fe(),Y=D?.shared,J=Y?.workspaceId===N&&Y.agentId===R?Y.lifetime:null,Se=JSON.stringify([re,N,R,k,J,H.map(z=>[z.id,z.attachmentId,z.path])]);Se!==pe&&(pe=Se,Q+=1);const He=JSON.stringify([re,N,R,qe,H,k]);return He!==x&&(x=He,C+=1),{authority:re,ownerId:a,workspaceId:N,agentId:R,text:qe,attachments:JSON.parse(JSON.stringify(H)),generation:C,attachmentEpoch:Q}};let he=null;const fe=()=>eS(n.contextItems(),tS(n.contextItems(),e(K))),Le=N=>{if(D=N,!N||f)return;const R=N.restore;if(O&&R?.requestId===O.requestId&&R.status!=="pending"){const{apply:H}=O;O=null,w(c,!1),R.status==="restored"&&w(K,R.draft?.attachments??[]),H(R)}const re=N.shared;if(re&&!e(c)&&g===`${re.workspaceId}\0${re.agentId}`){const H=JSON.stringify([re.provenance,re.workspaceId,re.agentId,re.lifetime,re.revision]);if(se!==H){se=H;const Y=he??v,J=Y&&n.inputValue()===Y.text&&JSON.stringify(fe())===Y.attachmentsJson;re.origin===a?he={text:re.snapshot.text,attachmentsJson:JSON.stringify(re.snapshot.attachments)}:J&&(_+=1,q&&clearTimeout(q),w(K,re.snapshot.attachments),he=v={text:re.snapshot.text,attachmentsJson:JSON.stringify(e(K))},n.setInputValue(re.snapshot.text),n.setContextItems(Sl(e(K))),n.applyEditorContent(re.snapshot.text))}}ot(Te);const qe=[];for(const H of N.saves){if(H.status==="pending")continue;qe.push(H.id);const Y=T[H.id];delete T[H.id],Y?.(H)}qe.length>0&&queueMicrotask(()=>r.dispatch(vw(a,qe)))},ue=(N,R,re)=>{const qe=crypto.randomUUID();O={requestId:qe,apply:re},w(c,!0),r.dispatch(mw(a,qe,N,R))},oe=()=>{O&&(O=null,w(c,!1),r.dispatch(ww(a)))},Me=()=>{const N=W;N&&(W=null,r.dispatch(_w(a)),D?.saves.some(R=>R.id===N)||delete T[N])};r.dispatch(gw(a));const ie=r.ownerView(a).subscribe(N=>ot(()=>Le(N))),ee=()=>{S&&(clearTimeout(S),S=null),w(l,!1)},Ae=()=>{W&&(W=null,r.dispatch(hw(a)))};ae(()=>{const N=n.active?.()??!0,R=n.workspaceId(),re=n.agentId();if(!N){ot(()=>{_+=1,g=null,oe(),P&&clearTimeout(P),P=null,ee(),q&&clearTimeout(q),q=null,w(i,!1),Ae()});return}if(!R||!re)return;const qe=`${R}\0${re}`;if(g===qe)return;const H=g!==null;g=qe;const Y=++_;ot(()=>{v=null,he=null,se=null,w(K,[]),P&&clearTimeout(P),ee(),q&&(clearTimeout(q),q=null),H&&(Ae(),n.setInputValue(""),n.contextItemsAreScoped||n.setContextItems([]),n.applyEditorContent(""));const J=gy(R,re);if(J){w(K,J.attachments),w(i,!1);const He=n.contextItems().length>0,z=J.text,Ie=JSON.stringify(J.attachments);n.setInputValue(J.text),He||n.setContextItems(Sl(J.attachments)),n.applyEditorContent(J.text),v={text:J.text,attachmentsJson:Ie},ue(R,re,Ce=>{if(Ce.status!=="restored")return;const De=Ce.draft;if(f||!(n.active?.()??!0)||g!==qe||_!==Y)return;const at=De?.text??"",lt=De?.attachments??[],Oe=JSON.stringify(lt);cd(R,re,{text:at,attachments:lt});const $e=n.inputValue()===z&&JSON.stringify(fe())===Ie;He||!$e||(at!==z&&(n.setInputValue(at),n.applyEditorContent(at)),Oe!==Ie&&n.setContextItems(Sl(lt)),v={text:at,attachmentsJson:Oe})});return}w(i,!0),S=setTimeout(()=>{S=null,(n.active?.()??!0)&&w(l,!0)},bx),P=setTimeout(()=>{(n.active?.()??!0)&&(w(i,!1),ee())},wx);const Se=()=>{!(n.active?.()??!0)||g!==qe||_!==Y||(P&&clearTimeout(P),w(i,!1),ee())};ue(R,re,He=>{if(He.status!=="restored"){Se();return}const z=He.draft;if(f||!(n.active?.()??!0)||g!==qe||_!==Y)return;const Ie=!!n.inputValue();if(!Ie&&z?.attachments?.length&&n.contextItems().length===0&&n.setContextItems(Sl(z.attachments)),!Ie&&z?.text&&(n.setInputValue(z.text),q=setTimeout(()=>{(n.active?.()??!0)&&n.inputValue()===z.text&&n.applyEditorContent(z.text)},_x)),v===null){const Ce=z?.text??"",De=z?.attachments??[];v={text:Ce,attachmentsJson:JSON.stringify(De)},cd(R,re,{text:Ce,attachments:De})}Se()})})}),ae(()=>{const N=n.active?.()??!0,R=n.workspaceId(),re=n.agentId(),qe=e(i);if(!N){ot(Me);return}if(!R||!re)return;const H=n.inputValue(),Y=fe();if(ot(Te),ot(Me),qe||v===null&&!H&&Y.length===0)return;const J=JSON.stringify(Y);if(v!==null&&v.text===H&&v.attachmentsJson===J)return;JSON.stringify(e(K))!==J&&w(K,Y);const Se=`${R}\0${re}`,He=k,z=crypto.randomUUID();T[z]=Ie=>{if(n.active?.()??!0){if(Ie.status==="saved"){g===Se&&k===He&&(v={text:H,attachmentsJson:J});return}n.onSaveError?.(new Error(Ie.error))}},ot(()=>{W=z,r.dispatch(pw(a,z,{authority:r.authority?.()??void 0,workspaceId:R,agentId:re,text:H,attachments:Y,rollback:v?{text:v.text,attachments:JSON.parse(v.attachmentsJson)}:null}))})}),ae(()=>()=>{f=!0,P&&clearTimeout(P),S&&clearTimeout(S),q&&clearTimeout(q),Ae(),ie(),r.dispatch(fw(a))});const Ee=N=>{const R=Te();return R!==null&&R.authority===N.authority&&R.ownerId===N.ownerId&&R.workspaceId===N.workspaceId&&R.agentId===N.agentId&&R.generation===N.generation&&R.text===N.text&&JSON.stringify(R.attachments)===JSON.stringify(N.attachments)};return{captureDraft:Te,isCurrentDraft:Ee,updateAttachmentScreen(N,R,re){return!Ee(N)||!N.attachments.some(qe=>qe.id===R)?null:(w(K,N.attachments.map(qe=>qe.id===R?{...qe,screen:structuredClone(re)}:qe)),Te())},async flushDraft(N){if(!Ee(N))return!1;if(!r.persistSnapshot)throw new Error("draft-shared-transport-unavailable");return await r.persistSnapshot(a,N.workspaceId,N.agentId,N,N.authority),Ee(N)},get restorePending(){return e(c)},get gateActive(){return e(i)},get gateVisible(){return e(l)},invalidatePendingRestore(){if(_+=1,k+=1,oe(),P&&(clearTimeout(P),P=null),q&&(clearTimeout(q),q=null),w(i,!1),ee(),Me(),g!==null){const[N,R]=g.split("\0");cd(N,R,{text:"",attachments:[]}),he=null,w(K,[]),v={text:"",attachmentsJson:"[]"}}}}}function qi(n){if(!n)return null;const r=Lf(JSON.stringify([n.workspaceId,n.agentId]),Mf(n.attachments),n.attachments.map(a=>({contextItemId:a.id,attachmentId:a.attachmentId,path:a.path})));return{...r,clips:r.clips.filter(a=>{const i=n.attachments.find(c=>c.id===a.contextItemId);return!!a.media&&!a.mediaError&&!!i&&a.path===i.path})}}async function Sx(n,r,a){const i=F.state.principal.snapshot,c=()=>Ri(F.state)===n.authority&&a.isCurrentDraft(n);if(!i||!c()||!await a.flushDraft(n)||!c())return{ready:!1};const l=new AbortController,v=Zd({workspaceId:n.workspaceId,agentId:n.agentId,principalId:i.principal.id,draftId:crypto.randomUUID(),media:[r]},c,l.signal);try{const g=await v.readiness();return!c()||!g.ok?{ready:!1}:g.value.find(_=>_.sourceId===r.source.id)??{ready:!1}}finally{await v.dispose()}}function Jp(n){let r=_e(null),a=_e(!1),i=_e(!1),c=null,l=!0,v=0,g=null;qs(()=>{l=!1,v++}),ae(()=>{const S=n.capture();e(r)&&(!S||S.authority!==e(r).capture.authority||S.ownerId!==e(r).capture.ownerId||S.workspaceId!==e(r).capture.workspaceId||S.agentId!==e(r).capture.agentId||S.attachmentEpoch!==e(r).capture.attachmentEpoch)&&w(r,null)});async function _(S){if(n.disabled()||e(a))return;const q=n.drafts.captureDraft(),k=qi(q),W=k?.clips.find(K=>K.contextItemId===S);if(!q||!W?.media||!k)return;const O=vy({workspaceId:q.workspaceId,agentId:q.agentId,clip:W,evidence:k,marks:k.marks}),T=yf(q.workspaceId,W.path);if(!O||!T)return;const D=++v;c=document.activeElement instanceof HTMLElement?document.activeElement:null,w(a,!0),w(i,!1);try{if(await n.beforeOpen?.(),!l||v!==D||!n.drafts.isCurrentDraft(q))return;const K=await(n.prepareOutput??Sx)(q,W.media,n.drafts);if(!l||v!==D||!n.drafts.isCurrentDraft(q))return;const{attachmentPath:se,...C}=O;w(r,{capture:q,contextItemId:S,snapshot:{...C,openId:crypto.randomUUID(),mediaUrl:T,output:K,deleteReady:!0}})}catch{l&&v===D&&w(i,!0)}finally{l&&v===D&&w(a,!1)}}async function f(S){const q=crypto.randomUUID(),k=e(r),W=n.drafts.captureDraft();if(!k||!W||W.authority!==k.capture.authority||W.ownerId!==k.capture.ownerId||W.workspaceId!==k.capture.workspaceId||W.agentId!==k.capture.agentId||W.attachmentEpoch!==k.capture.attachmentEpoch)return{requestId:q,result:"stale-source"};const O=qi(W),T=O?.clips.find(Q=>Q.contextItemId===k.contextItemId);if(!O||!T?.media)return{requestId:q,result:"stale-source"};const K=g?.openId===k.snapshot.openId&&g.inputRevision===S.revision&&JSON.stringify(g.media)===JSON.stringify(T.media)?{...S,revision:T.media.saved?.revision??0}:S,se=$S(T.media,{openId:k.snapshot.openId,...k.snapshot.output?.version===2?{outputVersion:2}:{},pair:{workspaceId:W.workspaceId,agentId:W.agentId},sourceId:S.sourceId,sourceRevision:S.sourceRevision,expectedEditRevision:K.revision,edit:K});if(se.status!=="saved")return{requestId:q,result:se.status==="invalid-edit"?"failed":se.status};const C=kS({...O,clips:O.clips.map(Q=>Q.id===T.id?{...Q,media:se.media}:Q)})[k.contextItemId],x=n.drafts.updateAttachmentScreen(W,k.contextItemId,C);if(!x)return{requestId:q,result:"stale-source"};g={openId:k.snapshot.openId,media:se.media,inputRevision:S.revision};try{if(!n.drafts.isCurrentDraft(x))return{requestId:q,result:"stale-source"};await n.drafts.flushDraft(x);const Q=n.drafts.captureDraft();return!l||e(r)?.snapshot.openId!==k.snapshot.openId||!Q||Q.attachmentEpoch!==k.capture.attachmentEpoch||Q.authority!==x.authority||Q.ownerId!==x.ownerId||Q.workspaceId!==x.workspaceId||Q.agentId!==x.agentId||JSON.stringify(Q.attachments.find(pe=>pe.id===k.contextItemId)?.screen)!==JSON.stringify(C)?{requestId:q,result:"stale-source"}:(g=null,{requestId:q,result:"saved",saved:se.media.saved??void 0})}catch{return{requestId:q,result:"failed"}}}function P(S){return n.disabled()||!n.onRemove(S)?!1:(e(r)?.contextItemId===S&&w(r,null),!0)}return{get session(){return e(r)},get opening(){return e(a)},get problem(){return e(i)},open:_,save:f,remove:P,close(){w(r,null)},restoreFocus(){c?.isConnected&&c.focus()}}}var $x=E('<p role="alert"> </p>'),kx=E('<div class="recording-editor-surface svelte-cdb16"><!></div>'),xx=E("<!> <!> <!>",1);function gv(n,r){if(new.target)return fn({component:gv,...n});mn(r,!0);let a=X(r,"capture",7),i=X(r,"drafts",7),c=X(r,"disabled",7,!1),l=X(r,"onRemove",7),v=X(r,"controllerFactory",7,Jp),g=X(r,"beforeOpen",7),_=X(r,"onReviewChange",7);const f=ot(()=>v()({drafts:i(),capture:()=>a(),disabled:()=>c(),onRemove:C=>l()(C),beforeOpen:()=>g()?.()??Promise.resolve()}));ae(()=>{const C=f.opening,x=f.session;ot(()=>_()?.(C,x?.snapshot.output?.ready?{openId:x.snapshot.openId,capture:x.capture}:null))});const P=o(hy),S=o(()=>qi(a())),q=o(()=>e(S)?.clips.map(C=>({id:C.contextItemId,kind:"clip",owner:"evidence",duration:Ep(C.durationMs),recording:!1,url:a()?yf(a().workspaceId,C.path):void 0,...C.media?.saved?{summary:my(C.media.saved)}:{}}))??[]);let k=_e(null);var W={get capture(){return a()},set capture(C){a(C),Z()},get drafts(){return i()},set drafts(C){i(C),Z()},get disabled(){return c()},set disabled(C=!1){c(C),Z()},get onRemove(){return l()},set onRemove(C){l(C),Z()},get controllerFactory(){return v()},set controllerFactory(C=Jp){v(C),Z()},get beforeOpen(){return g()},set beforeOpen(C){g(C),Z()},get onReviewChange(){return _()},set onReviewChange(C){_(C),Z()},$set:vn,$on:(C,x)=>hn(r,C,x)},O=xx(),T=ye(O);{let C=o(()=>c()||f.opening);HS(T,{get items(){return e(q)},get labels(){return e(P)},get disabled(){return e(C)},onEdit:x=>void f.open(x),onMarkUp:x=>void f.open(x),get onRemove(){return f.remove}})}var D=m(T,2);{var K=C=>{var x=$x(),Q=de(x,!0);L(pe=>j(Q,pe),[()=>u.dock_captureEditor_saveFailed_label()]),p(C,x)};B(D,C=>{f.problem&&C(K)})}var se=m(D,2);{let C=o(()=>!!f.session),x=o(()=>u.dock_captureEditor_recording_title({duration:f.session?Ep(f.session.snapshot.durationMs??0):""}));A$(se,{get open(){return e(C)},size:"editor",showCloseButton:!1,get title(){return e(x)},escapeKeydownBehavior:"ignore",dismissOnInteractOutside:!1,onClose:()=>f.close(),onCloseAutoFocus:Q=>{Q.preventDefault(),f.restoreFocus()},get contentRef(){return e(k)},set contentRef(Q){w(k,Q,!0)},children:(Q,pe)=>{var Te=Wt(),he=ye(Te);{var fe=Le=>{var ue=Wt(),oe=ye(ue);Ci(oe,()=>f.session.snapshot.openId,Me=>{var ie=kx(),ee=I(ie);M$(ee,{get snapshot(){return f.session.snapshot},get shortcutDialog(){return e(k)},onClose:()=>f.close(),get onSave(){return f.save},onDelete:async()=>!!f.session&&f.remove(f.session.contextItemId)}),b(ie),p(Me,ie)}),p(Le,ue)};B(he,Le=>{f.session&&Le(fe)})}p(Q,Te)},$$slots:{default:!0}})}return p(n,O),_n(W)}const Pl=n=>JSON.stringify([n.authority,n.ownerId,n.workspaceId,n.agentId,n.attachmentEpoch,n.attachments]);function Cx(n){let r=_e(!1),a=_e(!1),i=_e(null),c=!1,l=0,v=null,g=null;async function _(S){S.abort.abort(),S.slot?.cancel(),await S.native?.dispose()}async function f(){l++;const S=g;g=null,S&&await _(S)}ro(()=>{const S=()=>{w(r,document.hasFocus(),!0)};return S(),window.addEventListener("focus",S),window.addEventListener("blur",S),()=>{window.removeEventListener("focus",S),window.removeEventListener("blur",S)}});const P=F.getReadableState().subscribe(()=>{g&&!g.current()&&f()});return qs(()=>{c=!0,P(),f()}),ae(()=>{const S=n.capture(),q=S?Pl(S):"",k=e(r)&&!e(a)&&(n.active()||e(i)?.key===q);ot(()=>{if(!k||!S){f();return}if(g?.key===q)return;if(v===q){f();return}f();const O=qi(S)?.clips.flatMap(Te=>!Te.mediaError&&Te.media?[Te.media]:[])??[],T=O[0],D=F.state.principal.snapshot,K=Bl.select(F.state,S.workspaceId);if(!T||!D||!K||n.drafts.gateActive)return;const se=wf(),C=new AbortController,x=()=>!c&&!C.signal.aborted&&Ri(F.state)===S.authority&&Bl.select(F.state,S.workspaceId)===K&&bf(se)&&!!n.capture()&&Pl(n.capture())===q,Q={key:q,capture:S,abort:C,native:null,slot:null,current:x};g=Q;const pe=l;n.drafts.flushDraft(S).then(async Te=>{if(!(g!==Q||pe!==l||!x())){if(!Te){v=q,await f();return}Q.native=Zd({workspaceId:S.workspaceId,agentId:S.agentId,draftId:crypto.randomUUID(),principalId:D.principal.id,media:structuredClone(O)},x,C.signal),Q.slot=_y(Q.native.service),v=q,Q.slot.warm(q,T,x)}}).catch(()=>{g===Q&&f()})})}),{cancel:f,async beforeEditorOpen(){w(a,!0),v=null,await f()},editorState(S,q){w(a,S,!0);const k=q?Pl(q.capture):null;q&&e(i)?.openId!==q.openId&&(v=null),w(i,q&&k?{openId:q.openId,key:k}:null)},take(S,q){const k=g;if(!k?.native||!k.slot||k.key!==Pl(S)||!k.current())return f(),null;g=null,l++;const W=k.native,O=k.slot,T=()=>k.abort.abort();return q.addEventListener("abort",T,{once:!0}),q.aborted&&T(),{service:{...W.service,takePreparedRecording:D=>O.take(k.key,D,()=>!q.aborted&&k.current())},async dispose(){q.removeEventListener("abort",T),await _(k)}}}}}var Px=E('<div role="status" class="px-3 py-1.5 text-xs text-muted-foreground" data-testid="chat-draft-loading-gate"><span> </span></div>');function pv(n,r){if(new.target)return fn({component:pv,...n});mn(r,!1);var a={$set:vn,$on:(v,g)=>hn(r,v,g)};Uf();var i=Px(),c=I(i),l=de(c,!0);return b(i),L(v=>j(l,v),[()=>u.chat_draftGate_loading_label()]),p(n,i),_n(a)}var Rx=E('<div data-new-messages-divider="" class="type-caption font-family-child my-6 flex items-center gap-2 px-2" role="separator"><div class="h-px flex-1 bg-border"></div> <span class="whitespace-nowrap px-1 font-medium text-foreground"> </span> <div class="h-px flex-1 bg-border"></div></div>');function Hd(n,r){if(new.target)return fn({component:Hd,...n});mn(r,!1);var a={$set:vn,$on:(v,g)=>hn(r,v,g)};Uf();var i=Rx(),c=m(I(i),2),l=de(c,!0);return pn(2),b(i),L((v,g)=>{Ue(i,"aria-label",v),j(l,g)},[()=>u.chat_newMessagesDivider_label(),()=>u.chat_newMessagesDivider_label()]),p(n,i),_n(a)}function Ax(n,r){if(!r||n.length===0)return null;const a=n.indexOf(r);return a===-1||a===n.length-1?null:r}function Tx(n,r,a){if(!r||n.length===0)return"none";const i=n.indexOf(r);return i===n.length-1?"none":i!==-1?"marker-loaded":a.complete?a.truncated?"marker-beyond-window":"none":"marker-pending"}function Mx(n,r){return r&&n.includes(r)?r:null}function Yp(n,r,a){return r-n<=a}const Ex=.2;function Xp(n,r,a){const i=Math.max(0,a-r),c=n-Ex*r;return Math.min(Math.max(0,c),i)}function qx(n,r,a){return n!==null&&a&&n===r}function Lx(n){return n?bw(n)&&yw(n)!==null&&typeof n.metadata?.taskNoteId=="string":!1}function Hx(n){const r=[],a=new Set;let i,c;for(const D of n.messages){if(D.agentId&&D.agentId!==n.agentId){i=void 0,c=void 0;continue}if(a.has(D.id))continue;a.add(D.id),n.breakBeforeMessageIds?.has(D.id)&&(i=void 0,c=void 0);const K=OS(D);if(K?.kind!=="turn-failure")c=void 0;else{const se=i?.seq!==void 0&&D.seq!==void 0&&Number.isSafeInteger(i.seq)&&Number.isSafeInteger(D.seq)&&D.seq===i.seq+1;(!c||!se)&&(c={key:JSON.stringify([n.agentId,"notice",D.id]),anchorMessageId:D.id,correlation:"unavailable",records:[],recordedFailureCount:0},r.push(c)),c.records.push({messageId:D.id,reason:K.reason,timestamp:D.timestamp}),c.recordedFailureCount+=1}i=D}const l=new Map;for(const D of n.queue){if(!D.requeuedAfterFailure)continue;const K=D.turnId||void 0,se=JSON.stringify([n.agentId,K?"turn":"queue",K??D.id]);let C=l.get(se);C||(C={key:se,correlation:K?"turn":"queue-entry",turnId:K,queueIds:[],state:"queued"},l.set(se,C)),C.queueIds.includes(D.id)||C.queueIds.push(D.id)}const v=[...l.values()],g=n.session?.id===n.agentId?n.session:void 0,_=g?.status===ki.Error,f=n.transientError||_&&g.stopReason||null,P=_&&!f,S=_&&(!n.transientError||n.transientError===g.stopReason)?g.stopReasonTimestamp:void 0,q=S?Sp(S):null,k=q&&f&&f===g?.stopReason?r.flatMap(D=>D.records).filter(D=>D.reason===f&&Sp(D.timestamp)===q):[],W=k.length===1?k[0].messageId:void 0,T=(g?kf(g):!1)?"attempting":v.length?"queued":f||P?"action-needed":"inactive";return{history:r,queueRecovery:v,current:{state:T,error:f,needsFallbackReason:P,timestamp:S,noticeId:W}}}function Ox(n,r){const a=n.hiddenTail[0]?.id,i=Hx({...r,messages:[...n.groups.flatMap(g=>g.messages),...n.hiddenTail],breakBeforeMessageIds:new Set(a?[a]:[])}),c=i.current.noticeId,l=i.history.map(g=>({...g,records:g.records.filter(_=>_.messageId!==c)})).filter(g=>g.records.length>0),v=new Set(l.map(g=>g.records[0].messageId));return{...i,runsByAnchor:new Map(l.map(g=>[g.records[0].messageId,g])),collapsedMessageIds:new Set(i.history.flatMap(g=>g.records.map(_=>_.messageId).filter(_=>!v.has(_))))}}var Dx=E('<div class="flex size-10 shrink-0 items-center justify-center rounded-md bg-muted/50"><!></div> <div class="min-w-0 flex-1"><div class="type-body truncate font-medium text-foreground"> </div> <div class="type-caption mt-0.5 line-clamp-2 text-muted-foreground"> </div></div> <div class="flex size-7 shrink-0 items-center justify-center rounded-md bg-muted/50 text-muted-foreground transition-colors group-hover:bg-muted"><!></div>',1),Fx=E('<div class="flex size-9 shrink-0 items-center justify-center rounded-md bg-muted/50"><!></div> <span class="type-body font-medium"> </span>',1),Nx=E('<div><div class="border-b border-border bg-muted/20 px-4 py-3"><p class="type-body font-medium text-foreground"> </p> <p class="type-caption mt-0.5 text-muted-foreground"> </p></div> <div class="max-h-[21rem] overflow-y-auto p-2"><!></div> <div class="border-t border-border bg-popover p-2"><!></div></div>'),Bx=E('<div class="mb-5"><!></div>'),Wx=E('<p data-testid="agent-welcome-description"> </p> <!>',1),Ux=E("<!> <!>",1),zx=E('<p class="mb-3 px-4 text-sm text-subtle leading-relaxed whitespace-pre-wrap" data-testid="agent-welcome-description"> </p>'),jx=E("<!> <span> </span>",1),Gx=E('<div class="mx-auto flex w-full max-w-[40rem] flex-1 flex-col px-4 pb-6 pt-4 text-subtle"><!> <!> <!></div>');function fv(n,r){if(new.target)return fn({component:fv,...n});mn(r,!0);const a=()=>ge(k,"$userOverrides$",v),i=()=>ge(q,"$specialists$",v),c=()=>ge(D,"$isGitHubAuth$",v),l=()=>ge(K,"$recentSpecialistIds$",v),[v,g]=Nr();let _=X(r,"onSpecialistChange",7),f=X(r,"session",7),P=X(r,"workspaceId",7);const S=Bn(P()??"");ae(()=>S.set(P()??""));const q=Qf(S),k=ek();ae(()=>{a()});const W=o(()=>{if(!f()||Zy(f()))return null;const N=f().metadata?.specialist||f().agentMetadata?.specialist;return N&&i().find(R=>R.id===N)||null});async function O(N){N?await Gl({specialist:N,hash:"specialists"}):await Gl({view:"create-specialist"})}let T=_e(!1);const D=tk(),K=pS(),se=o(()=>Iw(nk(i(),c()),l()));let C=_e(!1);const x=o(()=>u.chat_regularAgentWelcome_generalDescription_label()),Q=o(()=>e(W)?.name??u.chat_shared_general_fallback()),pe=o(()=>e(W)?.description??u.chat_shared_noSpecializedBehavior_label()),Te=o(()=>e(W)?e(W).defaultBehaviorPrompt||"":e(x));var he={get onSpecialistChange(){return _()},set onSpecialistChange(N){_(N),Z()},get session(){return f()},set session(N){f(N),Z()},get workspaceId(){return P()},set workspaceId(N){P(N),Z()},$set:vn,$on:(N,R)=>hn(r,N,R)},fe=Gx(),Le=I(fe);{var ue=N=>{var R=Bx(),re=I(R);fk(re,{class:"block w-full",align:"start",side:"bottom",contentClass:"w-[min(28rem,calc(100vw-2rem))]",get open(){return e(C)},set open(Y){w(C,Y,!0)},trigger:(Y,J)=>{let Se=()=>(J?.()).props;{let He=o(()=>zd("group flex h-auto min-h-(--control-height-medium) w-full cursor-pointer items-center gap-3 whitespace-normal rounded-lg border border-border bg-card px-4 py-3 text-left shadow-xs transition-colors","hover:border-input hover:bg-accent/30 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"));$t(Y,Li(Se,{type:"button",variant:"plain",wrapContent:!1,get class(){return e(He)},"data-testid":"specialist-picker-trigger",children:(z,Ie)=>{var Ce=Dx(),De=ye(Ce),at=I(De);{let ze=o(()=>e(W)?.id??null),Ze=o(()=>e(W)?.icon??null);pk(at,{agentId:"blank",variant:"emphasized",get specialist(){return e(ze)},get icon(){return e(Ze)}})}b(De);var lt=m(De,2),Oe=I(lt),$e=de(Oe,!0),V=m(Oe,2),ne=de(V,!0);b(lt);var Fe=m(lt,2),me=I(Fe);gt(me,{get icon(){return Na},size:10}),b(Fe),L(()=>{j($e,e(Q)),j(ne,e(pe))}),p(z,Ce)},$$slots:{default:!0}}))}},content:Y=>{var J=Nx(),Se=I(J),He=I(Se),z=de(He,!0),Ie=m(He,2),Ce=de(Ie,!0);b(Se);var De=m(Se,2),at=I(De);{let $e=o(()=>e(W)?.id??null);ew(at,{get specialists(){return e(se)},get value(){return e($e)},onchange:V=>{w(C,!1),_()?.(V)}})}b(De);var lt=m(De,2),Oe=I(lt);Tt(Oe,()=>Dr,($e,V)=>{V($e,{class:"flex h-auto w-full cursor-pointer items-center gap-3 whitespace-normal rounded-md px-3 py-2 text-left text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",onSelect:()=>{w(C,!1),O()},children:(ne,Fe)=>{var me=Fx(),ze=ye(me),Ze=I(ze);gt(Ze,{get icon(){return O$},size:12}),b(ze);var ut=m(ze,2),mt=de(ut,!0);L(dt=>j(mt,dt),[()=>u.chat_regularAgentWelcome_createSpecialist_label()]),p(ne,me)},$$slots:{default:!0}})}),b(lt),b(J),L(($e,V)=>{j(z,$e),j(Ce,V)},[()=>u.workspace_createAgentSection_specialists_label(),()=>u.workspace_createAgentSection_specialists_description()]),p(Y,J)},$$slots:{trigger:!0,content:!0}}),b(R),p(N,R)};B(Le,N=>{_()&&N(ue)})}var oe=m(Le,2);{var Me=N=>{var R=Wt(),re=ye(R);{let qe=o(()=>u.chat_specialistSelector_prompt_label());Tt(re,()=>hk,(H,Y)=>{Y(H,{class:"mb-3",role:"region",get"aria-label"(){return e(qe)},children:(J,Se)=>{var He=Ux(),z=ye(He);Tt(z,()=>lv,(Ce,De)=>{De(Ce,{children:(at,lt)=>{var Oe=Wt(),$e=ye(Oe);Tt($e,()=>cv,(V,ne)=>{ne(V,{class:"type-caption font-medium",children:(Fe,me)=>{pn();var ze=dn();L(Ze=>j(ze,Ze),[()=>u.chat_specialistSelector_prompt_label()]),p(Fe,ze)},$$slots:{default:!0}})}),p(at,Oe)},$$slots:{default:!0}})});var Ie=m(z,2);Tt(Ie,()=>vk,(Ce,De)=>{De(Ce,{children:(at,lt)=>{var Oe=Wx(),$e=ye(Oe),V=de($e,!0),ne=m($e,2);$t(ne,{type:"button",variant:"link",get"aria-expanded"(){return e(T)},onclick:()=>w(T,!e(T)),class:"text-xs text-muted-foreground hover:text-foreground transition-colors mt-2 cursor-pointer",children:(Fe,me)=>{pn();var ze=dn();L(Ze=>j(ze,Ze),[()=>e(T)?u.chat_regularAgentWelcome_showLess_label():u.chat_regularAgentWelcome_showMore_label()]),p(Fe,ze)},$$slots:{default:!0}}),L(()=>{xe($e,1,`text-sm text-subtle leading-relaxed whitespace-pre-wrap break-words ${e(T)?"":"line-clamp-6"}`),j(V,e(Te))}),p(at,Oe)},$$slots:{default:!0}})}),p(J,He)},$$slots:{default:!0}})})}p(N,R)},ie=N=>{var R=zx(),re=de(R,!0);L(()=>j(re,e(Te))),p(N,R)};B(oe,N=>{e(W)?N(Me):N(ie,-1)})}var ee=m(oe,2);{var Ae=N=>{$t(N,{variant:"ghost-light",size:"sm",onclick:()=>O(e(W).id),class:"inline-flex items-center gap-2 text-sm text-muted-foreground hover:text-foreground transition-colors cursor-pointer pl-1.5 mr-auto",children:(R,re)=>{var qe=jx(),H=ye(qe);gt(H,{get icon(){return H$},size:12,class:"opacity-60"});var Y=m(H,2),J=de(Y,!0);L(Se=>j(J,Se),[()=>u.chat_regularAgentWelcome_customize_label()]),p(R,qe)},$$slots:{default:!0}})};B(ee,N=>{e(W)&&N(Ae)})}b(fe),p(n,fe);var Ee=_n(he);return g(),Ee}var Vx=E('<a class="cursor-pointer underline underline-offset-2 hover:opacity-80" data-suggested-prompt-link=""> </a>'),Kx=E('<kbd data-suggested-prompt-hint=""> </kbd>'),Qx=E('<span class="type-caption"> </span>'),Jx=E('<div role="presentation" data-typography-role="body" data-suggested-prompt-row=""><span data-suggested-prompt-icon=""><!></span> <span class="min-w-0 flex-1 text-pretty" data-suggested-prompt-label=""><span role="button" tabindex="0" class="focus-visible:outline-none" data-suggested-prompt-text=""> </span><!></span> <!> <!></div>'),Yx=E('<div class="flex flex-col" data-testid="suggested-prompts-surface"><!></div>');function eu(n,r){if(new.target)return fn({component:eu,...n});mn(r,!0);let a=X(r,"prompts",7),i=X(r,"onSelect",7),c=X(r,"onEdit",7),l=X(r,"compact",7,!1),v=X(r,"showShortcutHints",7,!1),g=X(r,"reserveShortcutHintSpace",7,!1),_=X(r,"workspaceId",7);const P=typeof navigator<"u"&&navigator.platform.toUpperCase().includes("MAC")?"⌃":"Alt+",S=p$.replace("text-ui","type-caption");function q(x){i()(x)}function k(x,Q){x.key!=="Enter"&&x.key!==" "||(x.preventDefault(),q(Q))}function W(x,Q){x.preventDefault(),x.stopPropagation(),qd(Q,{workspaceId:_(),event:x})}function O(x,Q){(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),x.stopPropagation(),qd(Q,{workspaceId:_(),event:x}))}function T(x){return x<3}var D={get prompts(){return a()},set prompts(x){a(x),Z()},get onSelect(){return i()},set onSelect(x){i(x),Z()},get onEdit(){return c()},set onEdit(x){c(x),Z()},get compact(){return l()},set compact(x=!1){l(x),Z()},get showShortcutHints(){return v()},set showShortcutHints(x=!1){v(x),Z()},get reserveShortcutHintSpace(){return g()},set reserveShortcutHintSpace(x=!1){g(x),Z()},get workspaceId(){return _()},set workspaceId(x){_(x),Z()},$set:vn,$on:(x,Q)=>hn(r,x,Q)},K=Wt(),se=ye(K);{var C=x=>{var Q=Yx(),pe=I(Q);{const Te=(fe,Le)=>{let ue=()=>(Le?.()).item,oe=()=>(Le?.()).index;const Me=o(()=>ay(ue())),ie=o(()=>e(Me)[0]?.type==="text"?e(Me)[0].content:"");var ee=Jx(),Ae=I(ee),Ee=I(Ae);gt(Ee,{get icon(){return zf},size:16,get class(){return gr}}),b(Ae);var N=m(Ae,2),R=I(N),re=de(R,!0),qe=m(R);On(qe,17,()=>e(Me).slice(e(ie)?1:0),Y_,(z,Ie)=>{var Ce=Wt(),De=ye(Ce);{var at=Oe=>{const $e=o(()=>ry(e(Ie).url));var V=Vx(),ne=de(V,!0);L(()=>{Ue(V,"href",e($e)),Ue(V,"title",e($e)),j(ne,e(Ie).label)}),ps("click",V,Fe=>W(Fe,e($e))),ps("keydown",V,Fe=>O(Fe,e($e))),p(Oe,V)},lt=Oe=>{var $e=dn();L(()=>j($e,e(Ie).content)),p(Oe,$e)};B(De,Oe=>{e(Ie).type==="link"?Oe(at):Oe(lt,-1)})}p(z,Ce)}),b(N);var H=m(N,2);{var Y=z=>{var Ie=Kx();let Ce;var De=de(Ie);L(()=>{Ce=xe(Ie,1,`${S??""} mt-px inline-flex h-5 items-center self-start border-0 bg-transparent p-0 font-sans font-normal text-muted-foreground! opacity-100`,null,Ce,{invisible:!v()}),Ue(Ie,"aria-hidden",v()?void 0:"true"),Ue(Ie,"data-hint-visible",v()),j(De,`${P}${oe()+1}`)}),p(z,Ie)},J=o(()=>T(oe())&&(v()||g()));B(H,z=>{e(J)&&z(Y)})}var Se=m(H,2);{var He=z=>{L$(z,{side:"top",delayDuration:300,trigger:De=>{{let at=o(()=>u.chat_suggestedPrompts_editInInput_ariaLabel());$t(De,{type:"button",variant:"ghost-light",size:"icon-xs",iconOnly:!0,class:"absolute right-0.5 top-[calc(var(--operational-leading-half-slot-size)+var(--space-1)*0.5+1px)] shrink-0 -translate-y-1/2 rounded opacity-0 group-hover:opacity-100 group-focus-within:opacity-100 focus-visible:opacity-100",onclick:lt=>{lt.stopPropagation(),c()(ue())},get"aria-label"(){return e(at)},children:(lt,Oe)=>{gt(lt,{get icon(){return D$},size:"xs"})},$$slots:{default:!0}})}},content:De=>{var at=Qx(),lt=de(at,!0);L(Oe=>j(lt,Oe),[()=>u.chat_suggestedPrompts_edit_tooltip()]),p(De,at)},$$slots:{trigger:!0,content:!0}})};B(Se,z=>{c()&&z(He)})}b(ee),L(z=>{xe(ee,1,`${Wf} ${g$} group relative flex cursor-pointer items-center gap-[var(--operational-leading-gap)] rounded-sm border border-transparent bg-transparent px-1.5 py-0.5 text-left opacity-100 pr-9 transition-colors hover:text-foreground has-[[data-suggested-prompt-text]:focus-visible]:outline-2 has-[[data-suggested-prompt-text]:focus-visible]:outline-offset-2 has-[[data-suggested-prompt-text]:focus-visible]:outline-ring`),xe(Ae,1,`${Ul??""} mt-px self-start`),Ue(R,"aria-label",z),j(re,e(ie))},[()=>ny(ue())]),ps("click",R,z=>{z.stopPropagation(),q(ue())}),ps("keydown",R,z=>k(z,ue())),p(fe,ee)};let he=o(()=>l()?"[&>div>div:last-child]:gap-0":"[&>div>div:last-child]:gap-0.5");T$(pe,{get items(){return a()},virtualize:!1,onActivate:q,get class(){return`overflow-visible! [&>div>div:last-child]:flex [&>div>div:last-child]:flex-col ${e(he)??""}`},"data-testid":"suggested-prompts-list",get"data-compact"(){return l()},row:Te,$$slots:{row:!0}})}b(Q),Bt(1,Q,()=>ma,()=>({tier:"fast",y:0,scale:1})),Bt(2,Q,()=>to,()=>({tier:"fast"})),p(x,Q)};B(se,x=>{a().length>0&&x(C)})}return p(n,K),_n(D)}Ud(["click","keydown"]);var Xx=E('<section class="pb-6 pt-6"><p class="type-body mb-5 max-w-[36rem] px-1.5 text-pretty text-muted-foreground"> </p> <!></section>');function vv(n,r){if(new.target)return fn({component:vv,...n});mn(r,!0);let a=X(r,"onSelect",7),i=X(r,"compact",7,!1);const c=o(()=>[{label:u.chat_chiefEmptyState_assignedPrs_label(),prompt:u.chat_chiefEmptyState_assignedPrs_prompt()},{label:u.chat_chiefEmptyState_staleWorkspaces_label(),prompt:u.chat_chiefEmptyState_staleWorkspaces_prompt()},{label:u.chat_chiefEmptyState_agentPerformance_label(),prompt:u.chat_chiefEmptyState_agentPerformance_prompt()},{label:u.chat_chiefEmptyState_morningBrief_label(),prompt:u.chat_chiefEmptyState_morningBrief_prompt()},{label:u.chat_chiefEmptyState_randomTheme_label(),prompt:u.chat_chiefEmptyState_randomTheme_prompt()}]),l=o(()=>e(c).map(q=>q.label));function v(q){const k=e(c).find(W=>W.label===q);k&&a()(k.prompt)}var g={get onSelect(){return a()},set onSelect(q){a(q),Z()},get compact(){return i()},set compact(q=!1){i(q),Z()},$set:vn,$on:(q,k)=>hn(r,q,k)},_=Xx(),f=I(_),P=de(f,!0),S=m(f,2);return eu(S,{get prompts(){return e(l)},onSelect:v,get compact(){return i()}}),b(_),L(q=>j(P,q),[()=>u.chat_chiefEmptyState_intro_label()]),p(n,_),_n(g)}const tu=2e3,Zx=4e3,e1=Zx-tu-2;function t1(n,r=tu){const a=[];let i=0;for(let c=n.length-1;c>=0&&i<r;c-=1){const l=n[c];if(l.role!=="user"&&l.role!=="assistant")continue;const v=(l.contentBlocks??[]).filter(_=>_.type==="text").map(_=>_.text||_.content||"").join(""),g=(l.role==="assistant"?tw(v).cleanedContent:v).trim();g&&(a.unshift({role:l.role,text:g}),i+=g.length)}return a}function n1(n,r){const a=n.map(l=>`${l.role==="user"?"User":"Assistant"}: ${l.text}`).join(`
|
|
1
|
+
var G_=Object.defineProperty;var Ng=n=>{throw TypeError(n)};var V_=(n,r,a)=>r in n?G_(n,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):n[r]=a;var Js=(n,r,a)=>V_(n,typeof r!="symbol"?r+"":r,a),K_=(n,r,a)=>r.has(n)||Ng("Cannot "+a);var Ao=(n,r,a)=>(K_(n,r,"read from private field"),a?a.call(n):r.get(n)),Bg=(n,r,a)=>r.has(n)?Ng("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(n):r.set(n,a);import{t as fn,bo as X,bw as vn,bp as pf,b as hn,bm as u,bq as Nr,bs as ge,br as Li}from"./hY0rMePc.js";import{bs as mn,a5 as I,bf as fs,bA as b,W as p,bn as _n,aA as Z,aB as E,ca as ae,a7 as Wt,ay as ye,aD as e,cd as Bn,c9 as o,bS as m,bl as de,be as pn,b_ as L,bO as j,c5 as ot,bH as w,bV as _e,bj as qs,bk as ro,b$ as dn,ai as Ud,aj as ps,bo as Vl,br as Tr,c0 as Ot,cb as ql,ak as Q_,aw as bi,a as J_}from"./3SdAC2_C.js";import{i as B}from"./BWmYJDmC.js";import{k as Ci}from"./CXul4WJt.js";import{g as On,i as Y_,I as eo,p as Lo,e as Eo}from"./D400ElMz.js";import{n as Bt,l as ma,c as to,j as Wg,k as Do,h as X_}from"./72S4_8Fo.js";import{b as ff,e as zd,f as xe,s as Ue,c as jt,g as gs}from"./leDczq9h.js";import{b as Z_}from"./goTpbPhD.js";import{b as _r}from"./Dn334wJv.js";import{m as ew,U as tw,Z as nw,X as rw,Y as aw,I as Ug,o as sw,l as ow,a2 as iw,x as zg,$ as lw,a0 as jg,r as cw,s as dw}from"./CJ72QIuX.js";import{Jx as F,fp as uw,eX as gw,f4 as pw,eY as fw,f2 as vw,f1 as hw,e_ as mw,f0 as _w,eZ as ww,rv as bw,c7 as yw,i as ki,J6 as Iw,Dd as vf,Di as Sw,Dk as Gg,Dh as $w,Dj as kw,vE as xw,vG as Cw,Cq as hf,cq as Pw,co as Rw,Bz as Aw,bF as Tw,A4 as Mw,Cf as id,v0 as Ew,cr as Vg,dC as qw,dD as Lw,Cp as Hw,em as Ow,CJ as Dw,CI as Fw,CN as Nw,CM as Bw,cR as Ww,cU as Uw,nD as zw,es as jw,wS as Gw,CO as Vw,wU as Kw,CP as Qw,cV as Jw,cW as Yw,nL as Xw,Ai as Zw,Is as eb,Ah as tb,Du as nb,wn as rb,wo as ab,z0 as sb,z4 as ld,wj as ob,wk as ib,rT as lb,rg as cb,re as db,f$ as ub,HQ as gb,Ll as pb,GN as fb,go as vb,p3 as hb,Jl as mb,ok as _b,A3 as wb,fu as Kg,r3 as Qg,fn as bb,fm as yb,tC as Ib,g4 as Jg,rf as Sb,ff as $b,Ca as kb,m as xb,nM as Cb,zI as Pb,y_ as Rb,EA as Ab,Ep as Yg,xi as Tb,xj as Xg,u$ as Zg,p4 as Mb,DG as Eb,gk as qb,g2 as Lb,eV as Hb,cN as Ob,A7 as Db,Lq as Fb,Cv as Nb,LI as Bb,y3 as Wb,gb as Ub,fe as zb,cM as jb,cJ as Gb,cI as Vb,vs as Kb,xp as Qb,xn as Jb,cG as Yb,cF as Xb,z6 as Zb,z1 as ey,xo as ty}from"./DXdFemRu.js";import{a as jd}from"./CC7to1B5.js";import{aM as ny,aL as ry,bg as ay,a7 as sy,aD as oy,aO as iy,M as mf,a0 as _f,b8 as ly,b2 as cy,as as ep,P as yl,b0 as tp,a$ as np,a_ as rp}from"./CnHcPhIW.js";import{l as wf,G as dy,I as Rd,at as uy,b1 as Ll,a9 as bf,S as gy,aW as cd,aq as py,aJ as fy,C as vy,z as yf,s as hy,A as my,v as _y,a$ as wy,aH as If,aG as Sf,aI as by,j as ap,aM as dd,aT as sp,aS as Il,aU as op,Q as ip,d as yy,e as Iy,ax as Sy,V as lp,aE as $y,c as ky,m as xy,aV as cp,ap as Cy,aw as dp,a as Py,aA as Ry,ad as up,aD as Ay,aX as gp,a_ as pp,n as fp,ae as Ty,R as My,ay as vp,am as Ey,O as qy,as as Ly,h as Hy,q as Oy,$ as ud,_ as Dy,aC as hp,a8 as Fy,f as Ny,i as By,a6 as Wy,ac as Uy}from"./Dm9EHXJZ.js";import{f as zy,o as jy,E as Gy,C as Vy,m as Ky,a2 as mp,aa as Qy,K as Jy,e as Yy,y as Xy}from"./AXE1aiRo.js";import{g as Ri}from"./DypB-Dwi.js";import{dW as Bl,cU as $f,O as kf,W as Zy,bv as eI,aF as xf,dH as Cf,aU as qo,e8 as tI,dw as Pf,aw as Gd,dV as Vd,aN as Rf,cP as nI,V as ha,a3 as Xs,B as rI,a7 as aI,a4 as sI,M as oI,a6 as iI,ar as lI,aG as Af,aO as Hl,b6 as cI,ay as Tf,r as dI,n as Ad,H as uI,dY as gI,aQ as pI,aK as fI,c9 as vI,aW as hI,bM as mI,bK as _I,bL as wI,c8 as bI,c7 as yI,cN as II,cM as SI,aS as $I,bb as kI,bd as xI,bg as CI,bc as PI,bl as RI,bf as AI,be as TI,bh as MI,bi as EI,bk as qI,bj as LI,ax as HI,cj as OI,ck as DI,dv as FI,du as NI,a$ as BI,G as WI,b3 as UI,cf as zI,C as _p,d0 as jI,ba as ds,b$ as GI,X as VI,bq as KI,E as QI,ad as JI,t as YI,cW as XI,d3 as wp,Q as bp,dt as ZI,cQ as gd}from"./C9aF-Sor.js";import{u as Mf,a as Sl,ag as eS,x as tS,ad as Ef,af as nS,ac as qf,a4 as rS,F as yp,D as aS,e as sS,n as oS,s as iS,m as lS,Y as cS,k as dS}from"./DpeQIGDn.js";import{a2 as uS,b5 as gS,cM as pS,a_ as fS,b4 as vS,c2 as hS,c9 as mS,w as _S,x as wS,cd as bS}from"./Cw2ZnpX7.js";import{n as yS,P as Lf,F as IS,ai as SS,r as $S,ac as kS}from"./B4mHWFlW.js";import{I as xS,s as CS,H as Ip}from"./Bqd7fdCF.js";import{e as PS}from"./CL3a4Hm1.js";import{e as RS,f as AS}from"./BXyd6A9p.js";import{s as TS,o as Zs,b as MS,g as Wl,d as ES,l as yi}from"./CIyUrgF0.js";import{a5 as qS,a7 as LS,D as HS,N as OS,ac as Sp,X as Hf,i as DS,r as ur,v as Ai,u as ea,p as xi,x as wr,S as Kd,m as Kl,s as Ho,y as Ti,o as ao,n as so,t as $p,aa as oo,w as io,a9 as Qd,q as _a,z as Oo,J as Td,_ as kp,g as FS,F as NS,U as Of,I as Df,a8 as Ff,a6 as Ol,O as BS,E as Nf,V as WS,A as US,b as zS,ab as jS,ad as $l,G as GS,e as pd,l as VS,C as KS,f as Ys,j as xp,H as us,Q as QS,d as kl,c as JS,a as Cp,h as YS,L as XS,Y as Pp,a4 as fd,a1 as Rp,a0 as ZS,a3 as Ap,$ as Tp,T as e$,B as t$,k as n$,a2 as r$,K as a$,R as s$,P as o$,W as i$}from"./Ipu7_2rx.js";import{m as l$}from"./Dms_DO28.js";import{g as Bf}from"./CwTWayd0.js";import{b as c$}from"./B4PfEXaO.js";import{g as d$}from"./05jEdw2V.js";import{a as u$}from"./BTtAt-Pu.js";import{q as Wf,d as gr,r as g$,e as Ul,j as p$,g as Md,i as f$,f as Ed,c as v$,A as h$,O as Mp,k as m$}from"./Bw8_vMki.js";import{P as _$}from"./6kZoubzS.js";import{e as w$}from"./BLZhAOLT.js";import{b as b$,a as y$,g as I$,c as S$,i as $$}from"./BvFRd1je.js";import{R as k$,g as x$,W as xl,c as C$}from"./Chx7ONT3.js";import"./COB2k0Aa.js";import"./uAXEbxa8.js";import{t as Mi}from"./CjZEyjv4.js";import{F as P$,h as R$}from"./rNjiZ_3W.js";import"./CbqBbwIN.js";import{C as A$,e as Dr,L as T$,l as Ql,d as Jl,K as Yl,h as Jd,M as Xl,S as Fa}from"./CbaFGz2w.js";import{D as M$}from"./DTU57FsX.js";import{f as Ep}from"./edw8TVSr.js";import"./DU3vNstz.js";import{i as Uf}from"./BjLb7AHW.js";import{h as qp,i as Lp,g as Hp,P as Op,C as E$,m as Dl,R as q$}from"./x_GKKTQV.js";import{f as $t,ae as L$}from"./CIU_APaR.js";import{F as gt,bs as H$,cd as O$,aw as Na,a2 as zf,c9 as D$,bf as F$,be as N$,bg as B$,aO as Dp,aj as vd,aB as hd,bB as jf,d3 as zl,cF as W$,aM as Fp,cb as Np,cK as jl,bu as U$,aS as z$,d0 as j$,a8 as Gf,ac as G$,ag as V$,cr as K$,ba as Q$,aC as Vf,cT as Bp,cz as J$,ax as Y$,cD as X$,c3 as Z$}from"./DETS1-K4.js";import{c as Kf}from"./ChTqQfQN.js";import"./BXT21uPn.js";import{c as Tt}from"./BNN0vAFF.js";import{a4 as Qf,bf as ek,aq as tk,k as nk,X as rk,V as ak,a1 as sk,Y as ok,bv as ik,U as lk,a0 as ck,ag as dk}from"./ZNhLMxqQ.js";import{d as Gl,f as uk,e as gk}from"./DnozpXMO.js";import{A as pk}from"./Djz9uuuA.js";import{D as fk}from"./CJtFSxbf.js";import"./BEvFtidS.js";import{a as vk,C as hk}from"./DpChblex.js";import"./DnHJL326.js";import{C as mk}from"./D0I7VQ8a.js";import{h as qd,r as _k,a as wk}from"./DOU-V4Cg.js";import{s as bk}from"./IxfPVMNO.js";import{I as yk,a as Jf}from"./CmbheRhJ.js";import{L as Ik}from"./O63l2zGE.js";import{g as Sk,f as $k,b as kk}from"./Mh0PqgbP.js";import{s as Ei,g as Yn,i as xk,j as Ck,e as Wp,r as Up,f as Pk,d as Rk,a as md,h as Ak}from"./Bm6FDHvN.js";import{i as zp,a as Tk}from"./Bu13V5mO.js";import{seekConversationToMessage as jp}from"./CjyJQV6j.js";import{l as Xt,o as _d,h as Yd,n as Ld,q as Mk}from"./B7JHU89G.js";import{o as Ek}from"./BzllE3aT.js";import{A as Yf}from"./DDnDtSlm.js";import{b as Xf}from"./Bcb1iqQJ.js";import{h as qk,f as Zf,w as Lk,g as Hk,Q as Ok,O as Dk,M as Fk,l as ev,m as Nk,J as tv,s as nv}from"./KMO8sO00.js";import{selectCurrentWorkspaceTabId as wd}from"./CcSZrbR4.js";import{o as Bk}from"./CK2Cr1RP.js";import{d as Wk}from"./B0Z-1lwJ.js";import{P as Uk}from"./DMrypNw-.js";import{g as zk}from"./McOgUz0K.js";import{H as rv,M as jk,y as Gk,J as Vk,g as Kk,i as Qk,u as Jk,e as av,c as sv,d as Yk}from"./BVlMQ1xQ.js";import{c as Xk,h as Xd,f as ov,Q as Zk}from"./DZEg_JlV.js";import{t as ex}from"./DAsc1V4f.js";import{s as tx}from"./BsieX9dN.js";import{i as iv}from"./CegXgKbh.js";import{d as nx,i as rx,r as ax}from"./CAmQkXZq.js";import{g as sx}from"./k863GLf6.js";var ox=new Set(["$$slots","$$events","$$legacy","ref","class","children"]),ix=E("<div><!></div>");function lv(n,r){if(new.target)return fn({component:lv,...n});mn(r,!0);let a=X(r,"ref",15,null),i=X(r,"class",7),c=X(r,"children",7),l=pf(r,ox);var v={get ref(){return a()},set ref(f=null){a(f),Z()},get class(){return i()},set class(f){i(f),Z()},get children(){return c()},set children(f){c(f),Z()},$set:vn,$on:(f,P)=>hn(r,f,P)},g=ix();ff(g,f=>({"data-slot":"card-header",class:f,...l}),[()=>zd("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-x-4 gap-y-1.5 pt-4 pb-2 has-data-[slot=card-action]:grid-cols-[minmax(0,1fr)_auto]",mk,i())]);var _=I(g);return Mi(_,()=>c()??fs),b(g),_r(g,f=>a(f),()=>a()),p(n,g),_n(v)}var lx=new Set(["$$slots","$$events","$$legacy","ref","class","children"]),cx=E("<div><!></div>");function cv(n,r){if(new.target)return fn({component:cv,...n});mn(r,!0);let a=X(r,"ref",15,null),i=X(r,"class",7),c=X(r,"children",7),l=pf(r,lx);var v={get ref(){return a()},set ref(f=null){a(f),Z()},get class(){return i()},set class(f){i(f),Z()},get children(){return c()},set children(f){c(f),Z()},$set:vn,$on:(f,P)=>hn(r,f,P)},g=cx();ff(g,f=>({"data-slot":"card-title",class:f,...l}),[()=>zd("type-title min-w-0 break-words font-semibold leading-tight text-foreground",i())]);var _=I(g);return Mi(_,()=>c()??fs),b(g),_r(g,f=>a(f),()=>a()),p(n,g),_n(v)}const Cl=xS.CHAT_MEDIA,bd=TS().min(1).max(512);Zs({workspaceId:bd,agentId:bd,draftId:Wl(),principalId:bd,media:MS(yS).min(1).max(20)}).strict();const dx=Zs({sessionId:Wl()}).strict();dx.extend({control:ES("action",[Zs({action:yi("readiness")}).strict(),Zs({action:yi("export"),request:RS}).strict(),Zs({action:yi("transcribe"),request:AS}).strict(),Zs({action:yi("release"),jobId:Wl()}).strict(),Zs({action:yi("adopt"),jobId:Wl()}).strict()])}).strict();function Zd(n,r,a,i=async(c,l)=>typeof window>"u"||CS(window)!=="electron"?{ok:!1,error:"unavailable"}:PS().invoke(c,l)){let c=null,l=null,v=!1;async function g(){v=!0,a.removeEventListener("abort",_);const k=c;c=null,k&&await i(Cl.CLOSE,{sessionId:k}).catch(()=>{})}const _=()=>{g()};a.addEventListener("abort",_,{once:!0});const f=()=>{if(v||a.aborted||!r())throw new Error("media-send-retired")};async function P(){if(f(),c)return c;if(l)return l;l=(async()=>{const k=await i(Cl.BEGIN,n);if(!k.ok)throw new Error("media-export-unavailable");c=k.value.sessionId;try{return f(),c}catch(W){throw await g(),W}})();try{return await l}finally{l=null}}async function S(k){const W=await P();f();const O=await i(Cl.CONTROL,{sessionId:W,control:k});return f(),O}return{service:{exportMedia:k=>S({action:"export",request:k}),adoptMediaJob:k=>S({action:"adopt",jobId:k}),transcribeMedia:k=>S({action:"transcribe",request:k}),releaseMediaJob:async k=>c?await i(Cl.CONTROL,{sessionId:c,control:{action:"release",jobId:k}}):{ok:!0,value:void 0}},dispose:g,readiness:()=>S({action:"readiness"})}}const yd=new Set;async function ux(n){const{drafts:r,signal:a}=n,i=structuredClone(n.capture),c=structuredClone(n.items),l=structuredClone(n.payload),{workspaceId:v,agentId:g}=i,_=Ri(F.state),f=Bl.select(F.state,v),P=$f.select(F.state),S=wf(),q=JSON.stringify([_,v,g]);if(!_||!f||!P||l.wsId!==v||yd.has(q))return!1;yd.add(q);const k=new AbortController,W=()=>k.abort();a.addEventListener("abort",W,{once:!0});const O=()=>!a.aborted&&!k.signal.aborted&&Ri(F.state)===_&&Bl.select(F.state,v)===f&&bf(S)&&r.isCurrentDraft(i),T=F.getReadableState().subscribe(()=>{O()||k.abort()});let D=null;try{if(!O()||uS(c))return!1;const K=Mf(i.attachments),se=Lf(IS(v,g),K,c.map(fe=>({contextItemId:fe.id,attachmentId:fe.attachmentId,path:fe.path}))),C=new Set([...se.images,...se.clips].map(fe=>fe.contextItemId));if(K.some(([fe])=>!C.has(fe))||se.images.some(fe=>fe.mediaError)||se.clips.some(fe=>fe.mediaError)||!SS(l.text,se))throw new Error("invalid-evidence");if(D=n.warm?.take(i,k.signal)??null,!await r.flushDraft(i)||!O())return!1;const x=await zy.agents.get(g,v);if(!O())return!1;if(!x||x.workspaceId!==v||x.retiredAt||x.pendingDeleteAt||x.status==="deleted")throw new Error("unavailable");const Q=se.clips.flatMap(fe=>fe.media?[fe.media]:[]);Q.length&&!D&&(D=Zd({workspaceId:v,agentId:g,draftId:crypto.randomUUID(),principalId:P.principal.id,media:Q},O,k.signal));const pe=dy(c,se),Te=Rd(pe),he=await uy({workspaceId:v,agentId:g,evidence:se,clickedItems:c,sendItems:pe,clickedPayload:{...l,contextItems:pe,imageBlocks:Te.imageBlocks,fileBlocks:Te.fileBlocks},binding:S,service:D?.service??null,current:O,onRecord:()=>{}});return!he||!O()?!1:Ll(F,g,he)}catch{return O()&&F.dispatch(uw(g,u.dock_conversation_sendFailed_error())),!1}finally{T(),a.removeEventListener("abort",W),await D?.dispose(),yd.delete(q)}}const dv=1e4,Gp={wasBusy:!1,busySince:null,preempted:!1,prediction:null};function Vp(n){return qS(n.messageMetadata)}function gx(n,r){if(n.some(Vp)){const a=n[0];return a&&!Vp(a)&&Kp(a,r)?[a.id]:[]}return n.filter(a=>Kp(a,r)).map(a=>a.id)}function px(n){let r=null;for(const a of n)(a.status==="preparing"||a.status==="sending")&&a.createdAt>(r??-1/0)&&(r=a.createdAt);return r}function Kp(n,r){return!n.requeuedAfterFailure&&LS(n,r)}function fx(n,r){const{busy:a,queue:i,delivered:c,now:l}=r,v=r.blocked||r.interrupted,g=r.timeoutMs??dv;let _=n.prediction;if(_){const k=new Set(i.map(D=>D.id)),W=_.ids.filter(D=>k.has(D)&&!c.has(D)),O=l-_.startedAt>=g,T=n.wasBusy&&!a;!W.length||O||v&&!a||T?_=null:W.length!==_.ids.length&&(_={..._,ids:W})}const f=n.wasBusy&&!a,P=n.wasBusy?n.busySince:a?l:null,S=n.wasBusy&&n.preempted||P!==null&&r.directSendAt!==null&&r.directSendAt>P;if(!_&&f&&!v&&!S){const k=gx(i,l).filter(W=>!c.has(W));k.length&&(_={ids:k,startedAt:l})}const q={wasBusy:a,busySince:a?P:null,preempted:a&&S,prediction:_};return n.wasBusy===q.wasBusy&&n.busySince===q.busySince&&n.preempted===q.preempted&&n.prediction===q.prediction?n:q}class vx{constructor(){Js(this,"previousWorkspaceId",null);Js(this,"_isRebinding",!1);Js(this,"_generation",0);Js(this,"_rebindPromise",null);Js(this,"_rebindResolve",null)}recordMount(r){return this.previousWorkspaceId=r,r}wasWorkspaceChangedDuringMount(r){return this.previousWorkspaceId!==r}shouldRebind(r){return!r||this.previousWorkspaceId===null?!1:r!==this.previousWorkspaceId}recordRebind(r){this.previousWorkspaceId=r}hasWorkspaceChanged(r){return r!==this.previousWorkspaceId}get trackedWorkspaceId(){return this.previousWorkspaceId}get isRebinding(){return this._isRebinding}startRebind(){return this._generation++,this._isRebinding=!0,this._rebindResolve?.(),this._rebindPromise=new Promise(r=>{this._rebindResolve=r}),this._generation}endRebind(r){r!==void 0&&r!==this._generation||(this._isRebinding=!1,this._rebindResolve?.(),this._rebindPromise=null,this._rebindResolve=null)}async waitForRebind(r=5e3){if(!this._isRebinding||!this._rebindPromise)return!1;const a=Date.now()+r;for(;this._isRebinding&&this._rebindPromise;){const i=a-Date.now();if(i<=0)return!1;let c;const l=await Promise.race([this._rebindPromise.then(()=>!1),new Promise(v=>{c=setTimeout(()=>v(!0),i)})]);if(clearTimeout(c),l)return!1}return!0}}function hx(n,r){return!(n?.tabType!=="agent"||n.agentId!==r.agentId||!r.isActive||n.workspaceId&&n.workspaceId!==r.workspaceId||r.panelId&&(n.source!=="dictation"&&!r.isPanelFocused||n.panelId&&n.panelId!==r.panelId))}function Qp(n){const r=typeof n=="string"?n:n&&typeof n=="object"&&typeof n.script=="string"?n.script:void 0;return r||void 0}var mx=E('<div role="status" aria-live="polite" data-presence-typing-indicator=""><span class="inline-flex min-w-[var(--operational-leading-slot-size)] shrink-0 items-center justify-center svelte-lm4khl"><!></span> <span class="min-w-0 truncate svelte-lm4khl"> </span> <span class="inline-flex shrink-0 items-center gap-0.5 svelte-lm4khl" aria-hidden="true"><span class="typing-dot size-1 rounded-full bg-current svelte-lm4khl"></span> <span class="typing-dot size-1 rounded-full bg-current svelte-lm4khl" style="animation-delay: 0.2s"></span> <span class="typing-dot size-1 rounded-full bg-current svelte-lm4khl" style="animation-delay: 0.4s"></span></span></div>');function uv(n,r){if(new.target)return fn({component:uv,...n});mn(r,!0);const a=()=>ge(P,"$typing$",i),[i,c]=Nr();let l=X(r,"workspaceId",7),v=X(r,"agentId",7),g=X(r,"class",7,"");const _=Bn(""),f=Bn("");ae(()=>{_.set(l())}),ae(()=>{f.set(v())});const P=gS(_,f),S=o(()=>w$(a()));var q={get workspaceId(){return l()},set workspaceId(D){l(D),Z()},get agentId(){return v()},set agentId(D){v(D),Z()},get class(){return g()},set class(D=""){g(D),Z()},$set:vn,$on:(D,K)=>hn(r,D,K)},k=Wt(),W=ye(k);{var O=D=>{var K=mx(),se=I(K),C=I(se);_$(C,{get people(){return a()},size:12,decorative:!0}),b(se);var x=m(se,2),Q=de(x,!0);pn(2),b(K),L(()=>{xe(K,1,`${Wf} flex h-4 min-w-0 items-center gap-[var(--operational-leading-gap)] px-[var(--operational-row-inline-padding)] font-family-child font-normal text-muted-foreground text-[11px] leading-4 ${g()??""} /* a11y-ignore: user-requested compact typing status in the composer gap */`,"svelte-lm4khl"),j(Q,e(S))}),p(D,K)};B(W,D=>{e(S)&&D(O)})}p(n,k);var T=_n(q);return c(),T}const _x=50,wx=5e3,bx=500,yx=()=>({authority:()=>Ri(F.state),persistSnapshot:py,dispatch:n=>F.dispatch(n),ownerView:n=>fy.withStore(F)(n)});function Ix(n){const r=n.store??yx(),a=crypto.randomUUID();let i=_e(!1),c=_e(!1),l=_e(!1),v=null,g=null,_=0,f=!1,P=null,S=null,q=null,k=0,W=null,O=null;const T={};let D,K=_e([]),se=null,C=0,x="",Q=0,pe="";const Te=()=>{const N=n.workspaceId(),R=n.agentId();if(!N||!R||!(n.active?.()??!0))return null;const re=r.authority?.();if(!re||f)return null;const qe=n.inputValue(),H=fe(),Y=D?.shared,J=Y?.workspaceId===N&&Y.agentId===R?Y.lifetime:null,Se=JSON.stringify([re,N,R,k,J,H.map(z=>[z.id,z.attachmentId,z.path])]);Se!==pe&&(pe=Se,Q+=1);const He=JSON.stringify([re,N,R,qe,H,k]);return He!==x&&(x=He,C+=1),{authority:re,ownerId:a,workspaceId:N,agentId:R,text:qe,attachments:JSON.parse(JSON.stringify(H)),generation:C,attachmentEpoch:Q}};let he=null;const fe=()=>eS(n.contextItems(),tS(n.contextItems(),e(K))),Le=N=>{if(D=N,!N||f)return;const R=N.restore;if(O&&R?.requestId===O.requestId&&R.status!=="pending"){const{apply:H}=O;O=null,w(c,!1),R.status==="restored"&&w(K,R.draft?.attachments??[]),H(R)}const re=N.shared;if(re&&!e(c)&&g===`${re.workspaceId}\0${re.agentId}`){const H=JSON.stringify([re.provenance,re.workspaceId,re.agentId,re.lifetime,re.revision]);if(se!==H){se=H;const Y=he??v,J=Y&&n.inputValue()===Y.text&&JSON.stringify(fe())===Y.attachmentsJson;re.origin===a?he={text:re.snapshot.text,attachmentsJson:JSON.stringify(re.snapshot.attachments)}:J&&(_+=1,q&&clearTimeout(q),w(K,re.snapshot.attachments),he=v={text:re.snapshot.text,attachmentsJson:JSON.stringify(e(K))},n.setInputValue(re.snapshot.text),n.setContextItems(Sl(e(K))),n.applyEditorContent(re.snapshot.text))}}ot(Te);const qe=[];for(const H of N.saves){if(H.status==="pending")continue;qe.push(H.id);const Y=T[H.id];delete T[H.id],Y?.(H)}qe.length>0&&queueMicrotask(()=>r.dispatch(vw(a,qe)))},ue=(N,R,re)=>{const qe=crypto.randomUUID();O={requestId:qe,apply:re},w(c,!0),r.dispatch(mw(a,qe,N,R))},oe=()=>{O&&(O=null,w(c,!1),r.dispatch(ww(a)))},Me=()=>{const N=W;N&&(W=null,r.dispatch(_w(a)),D?.saves.some(R=>R.id===N)||delete T[N])};r.dispatch(gw(a));const ie=r.ownerView(a).subscribe(N=>ot(()=>Le(N))),ee=()=>{S&&(clearTimeout(S),S=null),w(l,!1)},Ae=()=>{W&&(W=null,r.dispatch(hw(a)))};ae(()=>{const N=n.active?.()??!0,R=n.workspaceId(),re=n.agentId();if(!N){ot(()=>{_+=1,g=null,oe(),P&&clearTimeout(P),P=null,ee(),q&&clearTimeout(q),q=null,w(i,!1),Ae()});return}if(!R||!re)return;const qe=`${R}\0${re}`;if(g===qe)return;const H=g!==null;g=qe;const Y=++_;ot(()=>{v=null,he=null,se=null,w(K,[]),P&&clearTimeout(P),ee(),q&&(clearTimeout(q),q=null),H&&(Ae(),n.setInputValue(""),n.contextItemsAreScoped||n.setContextItems([]),n.applyEditorContent(""));const J=gy(R,re);if(J){w(K,J.attachments),w(i,!1);const He=n.contextItems().length>0,z=J.text,Ie=JSON.stringify(J.attachments);n.setInputValue(J.text),He||n.setContextItems(Sl(J.attachments)),n.applyEditorContent(J.text),v={text:J.text,attachmentsJson:Ie},ue(R,re,Ce=>{if(Ce.status!=="restored")return;const De=Ce.draft;if(f||!(n.active?.()??!0)||g!==qe||_!==Y)return;const at=De?.text??"",lt=De?.attachments??[],Oe=JSON.stringify(lt);cd(R,re,{text:at,attachments:lt});const $e=n.inputValue()===z&&JSON.stringify(fe())===Ie;He||!$e||(at!==z&&(n.setInputValue(at),n.applyEditorContent(at)),Oe!==Ie&&n.setContextItems(Sl(lt)),v={text:at,attachmentsJson:Oe})});return}w(i,!0),S=setTimeout(()=>{S=null,(n.active?.()??!0)&&w(l,!0)},bx),P=setTimeout(()=>{(n.active?.()??!0)&&(w(i,!1),ee())},wx);const Se=()=>{!(n.active?.()??!0)||g!==qe||_!==Y||(P&&clearTimeout(P),w(i,!1),ee())};ue(R,re,He=>{if(He.status!=="restored"){Se();return}const z=He.draft;if(f||!(n.active?.()??!0)||g!==qe||_!==Y)return;const Ie=!!n.inputValue();if(!Ie&&z?.attachments?.length&&n.contextItems().length===0&&n.setContextItems(Sl(z.attachments)),!Ie&&z?.text&&(n.setInputValue(z.text),q=setTimeout(()=>{(n.active?.()??!0)&&n.inputValue()===z.text&&n.applyEditorContent(z.text)},_x)),v===null){const Ce=z?.text??"",De=z?.attachments??[];v={text:Ce,attachmentsJson:JSON.stringify(De)},cd(R,re,{text:Ce,attachments:De})}Se()})})}),ae(()=>{const N=n.active?.()??!0,R=n.workspaceId(),re=n.agentId(),qe=e(i);if(!N){ot(Me);return}if(!R||!re)return;const H=n.inputValue(),Y=fe();if(ot(Te),ot(Me),qe||v===null&&!H&&Y.length===0)return;const J=JSON.stringify(Y);if(v!==null&&v.text===H&&v.attachmentsJson===J)return;JSON.stringify(e(K))!==J&&w(K,Y);const Se=`${R}\0${re}`,He=k,z=crypto.randomUUID();T[z]=Ie=>{if(n.active?.()??!0){if(Ie.status==="saved"){g===Se&&k===He&&(v={text:H,attachmentsJson:J});return}n.onSaveError?.(new Error(Ie.error))}},ot(()=>{W=z,r.dispatch(pw(a,z,{authority:r.authority?.()??void 0,workspaceId:R,agentId:re,text:H,attachments:Y,rollback:v?{text:v.text,attachments:JSON.parse(v.attachmentsJson)}:null}))})}),ae(()=>()=>{f=!0,P&&clearTimeout(P),S&&clearTimeout(S),q&&clearTimeout(q),Ae(),ie(),r.dispatch(fw(a))});const Ee=N=>{const R=Te();return R!==null&&R.authority===N.authority&&R.ownerId===N.ownerId&&R.workspaceId===N.workspaceId&&R.agentId===N.agentId&&R.generation===N.generation&&R.text===N.text&&JSON.stringify(R.attachments)===JSON.stringify(N.attachments)};return{captureDraft:Te,isCurrentDraft:Ee,updateAttachmentScreen(N,R,re){return!Ee(N)||!N.attachments.some(qe=>qe.id===R)?null:(w(K,N.attachments.map(qe=>qe.id===R?{...qe,screen:structuredClone(re)}:qe)),Te())},async flushDraft(N){if(!Ee(N))return!1;if(!r.persistSnapshot)throw new Error("draft-shared-transport-unavailable");return await r.persistSnapshot(a,N.workspaceId,N.agentId,N,N.authority),Ee(N)},get restorePending(){return e(c)},get gateActive(){return e(i)},get gateVisible(){return e(l)},invalidatePendingRestore(){if(_+=1,k+=1,oe(),P&&(clearTimeout(P),P=null),q&&(clearTimeout(q),q=null),w(i,!1),ee(),Me(),g!==null){const[N,R]=g.split("\0");cd(N,R,{text:"",attachments:[]}),he=null,w(K,[]),v={text:"",attachmentsJson:"[]"}}}}}function qi(n){if(!n)return null;const r=Lf(JSON.stringify([n.workspaceId,n.agentId]),Mf(n.attachments),n.attachments.map(a=>({contextItemId:a.id,attachmentId:a.attachmentId,path:a.path})));return{...r,clips:r.clips.filter(a=>{const i=n.attachments.find(c=>c.id===a.contextItemId);return!!a.media&&!a.mediaError&&!!i&&a.path===i.path})}}async function Sx(n,r,a){const i=F.state.principal.snapshot,c=()=>Ri(F.state)===n.authority&&a.isCurrentDraft(n);if(!i||!c()||!await a.flushDraft(n)||!c())return{ready:!1};const l=new AbortController,v=Zd({workspaceId:n.workspaceId,agentId:n.agentId,principalId:i.principal.id,draftId:crypto.randomUUID(),media:[r]},c,l.signal);try{const g=await v.readiness();return!c()||!g.ok?{ready:!1}:g.value.find(_=>_.sourceId===r.source.id)??{ready:!1}}finally{await v.dispose()}}function Jp(n){let r=_e(null),a=_e(!1),i=_e(!1),c=null,l=!0,v=0,g=null;qs(()=>{l=!1,v++}),ae(()=>{const S=n.capture();e(r)&&(!S||S.authority!==e(r).capture.authority||S.ownerId!==e(r).capture.ownerId||S.workspaceId!==e(r).capture.workspaceId||S.agentId!==e(r).capture.agentId||S.attachmentEpoch!==e(r).capture.attachmentEpoch)&&w(r,null)});async function _(S){if(n.disabled()||e(a))return;const q=n.drafts.captureDraft(),k=qi(q),W=k?.clips.find(K=>K.contextItemId===S);if(!q||!W?.media||!k)return;const O=vy({workspaceId:q.workspaceId,agentId:q.agentId,clip:W,evidence:k,marks:k.marks}),T=yf(q.workspaceId,W.path);if(!O||!T)return;const D=++v;c=document.activeElement instanceof HTMLElement?document.activeElement:null,w(a,!0),w(i,!1);try{if(await n.beforeOpen?.(),!l||v!==D||!n.drafts.isCurrentDraft(q))return;const K=await(n.prepareOutput??Sx)(q,W.media,n.drafts);if(!l||v!==D||!n.drafts.isCurrentDraft(q))return;const{attachmentPath:se,...C}=O;w(r,{capture:q,contextItemId:S,snapshot:{...C,openId:crypto.randomUUID(),mediaUrl:T,output:K,deleteReady:!0}})}catch{l&&v===D&&w(i,!0)}finally{l&&v===D&&w(a,!1)}}async function f(S){const q=crypto.randomUUID(),k=e(r),W=n.drafts.captureDraft();if(!k||!W||W.authority!==k.capture.authority||W.ownerId!==k.capture.ownerId||W.workspaceId!==k.capture.workspaceId||W.agentId!==k.capture.agentId||W.attachmentEpoch!==k.capture.attachmentEpoch)return{requestId:q,result:"stale-source"};const O=qi(W),T=O?.clips.find(Q=>Q.contextItemId===k.contextItemId);if(!O||!T?.media)return{requestId:q,result:"stale-source"};const K=g?.openId===k.snapshot.openId&&g.inputRevision===S.revision&&JSON.stringify(g.media)===JSON.stringify(T.media)?{...S,revision:T.media.saved?.revision??0}:S,se=$S(T.media,{openId:k.snapshot.openId,...k.snapshot.output?.version===2?{outputVersion:2}:{},pair:{workspaceId:W.workspaceId,agentId:W.agentId},sourceId:S.sourceId,sourceRevision:S.sourceRevision,expectedEditRevision:K.revision,edit:K});if(se.status!=="saved")return{requestId:q,result:se.status==="invalid-edit"?"failed":se.status};const C=kS({...O,clips:O.clips.map(Q=>Q.id===T.id?{...Q,media:se.media}:Q)})[k.contextItemId],x=n.drafts.updateAttachmentScreen(W,k.contextItemId,C);if(!x)return{requestId:q,result:"stale-source"};g={openId:k.snapshot.openId,media:se.media,inputRevision:S.revision};try{if(!n.drafts.isCurrentDraft(x))return{requestId:q,result:"stale-source"};await n.drafts.flushDraft(x);const Q=n.drafts.captureDraft();return!l||e(r)?.snapshot.openId!==k.snapshot.openId||!Q||Q.attachmentEpoch!==k.capture.attachmentEpoch||Q.authority!==x.authority||Q.ownerId!==x.ownerId||Q.workspaceId!==x.workspaceId||Q.agentId!==x.agentId||JSON.stringify(Q.attachments.find(pe=>pe.id===k.contextItemId)?.screen)!==JSON.stringify(C)?{requestId:q,result:"stale-source"}:(g=null,{requestId:q,result:"saved",saved:se.media.saved??void 0})}catch{return{requestId:q,result:"failed"}}}function P(S){return n.disabled()||!n.onRemove(S)?!1:(e(r)?.contextItemId===S&&w(r,null),!0)}return{get session(){return e(r)},get opening(){return e(a)},get problem(){return e(i)},open:_,save:f,remove:P,close(){w(r,null)},restoreFocus(){c?.isConnected&&c.focus()}}}var $x=E('<p role="alert"> </p>'),kx=E('<div class="recording-editor-surface svelte-cdb16"><!></div>'),xx=E("<!> <!> <!>",1);function gv(n,r){if(new.target)return fn({component:gv,...n});mn(r,!0);let a=X(r,"capture",7),i=X(r,"drafts",7),c=X(r,"disabled",7,!1),l=X(r,"onRemove",7),v=X(r,"controllerFactory",7,Jp),g=X(r,"beforeOpen",7),_=X(r,"onReviewChange",7);const f=ot(()=>v()({drafts:i(),capture:()=>a(),disabled:()=>c(),onRemove:C=>l()(C),beforeOpen:()=>g()?.()??Promise.resolve()}));ae(()=>{const C=f.opening,x=f.session;ot(()=>_()?.(C,x?.snapshot.output?.ready?{openId:x.snapshot.openId,capture:x.capture}:null))});const P=o(hy),S=o(()=>qi(a())),q=o(()=>e(S)?.clips.map(C=>({id:C.contextItemId,kind:"clip",owner:"evidence",duration:Ep(C.durationMs),recording:!1,url:a()?yf(a().workspaceId,C.path):void 0,...C.media?.saved?{summary:my(C.media.saved)}:{}}))??[]);let k=_e(null);var W={get capture(){return a()},set capture(C){a(C),Z()},get drafts(){return i()},set drafts(C){i(C),Z()},get disabled(){return c()},set disabled(C=!1){c(C),Z()},get onRemove(){return l()},set onRemove(C){l(C),Z()},get controllerFactory(){return v()},set controllerFactory(C=Jp){v(C),Z()},get beforeOpen(){return g()},set beforeOpen(C){g(C),Z()},get onReviewChange(){return _()},set onReviewChange(C){_(C),Z()},$set:vn,$on:(C,x)=>hn(r,C,x)},O=xx(),T=ye(O);{let C=o(()=>c()||f.opening);HS(T,{get items(){return e(q)},get labels(){return e(P)},get disabled(){return e(C)},onEdit:x=>void f.open(x),onMarkUp:x=>void f.open(x),get onRemove(){return f.remove}})}var D=m(T,2);{var K=C=>{var x=$x(),Q=de(x,!0);L(pe=>j(Q,pe),[()=>u.dock_captureEditor_saveFailed_label()]),p(C,x)};B(D,C=>{f.problem&&C(K)})}var se=m(D,2);{let C=o(()=>!!f.session),x=o(()=>u.dock_captureEditor_recording_title({duration:f.session?Ep(f.session.snapshot.durationMs??0):""}));A$(se,{get open(){return e(C)},size:"editor",showCloseButton:!1,get title(){return e(x)},escapeKeydownBehavior:"ignore",dismissOnInteractOutside:!1,onClose:()=>f.close(),onCloseAutoFocus:Q=>{Q.preventDefault(),f.restoreFocus()},get contentRef(){return e(k)},set contentRef(Q){w(k,Q,!0)},children:(Q,pe)=>{var Te=Wt(),he=ye(Te);{var fe=Le=>{var ue=Wt(),oe=ye(ue);Ci(oe,()=>f.session.snapshot.openId,Me=>{var ie=kx(),ee=I(ie);M$(ee,{get snapshot(){return f.session.snapshot},get shortcutDialog(){return e(k)},onClose:()=>f.close(),get onSave(){return f.save},onDelete:async()=>!!f.session&&f.remove(f.session.contextItemId)}),b(ie),p(Me,ie)}),p(Le,ue)};B(he,Le=>{f.session&&Le(fe)})}p(Q,Te)},$$slots:{default:!0}})}return p(n,O),_n(W)}const Pl=n=>JSON.stringify([n.authority,n.ownerId,n.workspaceId,n.agentId,n.attachmentEpoch,n.attachments]);function Cx(n){let r=_e(!1),a=_e(!1),i=_e(null),c=!1,l=0,v=null,g=null;async function _(S){S.abort.abort(),S.slot?.cancel(),await S.native?.dispose()}async function f(){l++;const S=g;g=null,S&&await _(S)}ro(()=>{const S=()=>{w(r,document.hasFocus(),!0)};return S(),window.addEventListener("focus",S),window.addEventListener("blur",S),()=>{window.removeEventListener("focus",S),window.removeEventListener("blur",S)}});const P=F.getReadableState().subscribe(()=>{g&&!g.current()&&f()});return qs(()=>{c=!0,P(),f()}),ae(()=>{const S=n.capture(),q=S?Pl(S):"",k=e(r)&&!e(a)&&(n.active()||e(i)?.key===q);ot(()=>{if(!k||!S){f();return}if(g?.key===q)return;if(v===q){f();return}f();const O=qi(S)?.clips.flatMap(Te=>!Te.mediaError&&Te.media?[Te.media]:[])??[],T=O[0],D=F.state.principal.snapshot,K=Bl.select(F.state,S.workspaceId);if(!T||!D||!K||n.drafts.gateActive)return;const se=wf(),C=new AbortController,x=()=>!c&&!C.signal.aborted&&Ri(F.state)===S.authority&&Bl.select(F.state,S.workspaceId)===K&&bf(se)&&!!n.capture()&&Pl(n.capture())===q,Q={key:q,capture:S,abort:C,native:null,slot:null,current:x};g=Q;const pe=l;n.drafts.flushDraft(S).then(async Te=>{if(!(g!==Q||pe!==l||!x())){if(!Te){v=q,await f();return}Q.native=Zd({workspaceId:S.workspaceId,agentId:S.agentId,draftId:crypto.randomUUID(),principalId:D.principal.id,media:structuredClone(O)},x,C.signal),Q.slot=_y(Q.native.service),v=q,Q.slot.warm(q,T,x)}}).catch(()=>{g===Q&&f()})})}),{cancel:f,async beforeEditorOpen(){w(a,!0),v=null,await f()},editorState(S,q){w(a,S,!0);const k=q?Pl(q.capture):null;q&&e(i)?.openId!==q.openId&&(v=null),w(i,q&&k?{openId:q.openId,key:k}:null)},take(S,q){const k=g;if(!k?.native||!k.slot||k.key!==Pl(S)||!k.current())return f(),null;g=null,l++;const W=k.native,O=k.slot,T=()=>k.abort.abort();return q.addEventListener("abort",T,{once:!0}),q.aborted&&T(),{service:{...W.service,takePreparedRecording:D=>O.take(k.key,D,()=>!q.aborted&&k.current())},async dispose(){q.removeEventListener("abort",T),await _(k)}}}}}var Px=E('<div role="status" class="px-3 py-1.5 text-xs text-muted-foreground" data-testid="chat-draft-loading-gate"><span> </span></div>');function pv(n,r){if(new.target)return fn({component:pv,...n});mn(r,!1);var a={$set:vn,$on:(v,g)=>hn(r,v,g)};Uf();var i=Px(),c=I(i),l=de(c,!0);return b(i),L(v=>j(l,v),[()=>u.chat_draftGate_loading_label()]),p(n,i),_n(a)}var Rx=E('<div data-new-messages-divider="" class="type-caption font-family-child my-6 flex items-center gap-2 px-2" role="separator"><div class="h-px flex-1 bg-border"></div> <span class="whitespace-nowrap px-1 font-medium text-foreground"> </span> <div class="h-px flex-1 bg-border"></div></div>');function Hd(n,r){if(new.target)return fn({component:Hd,...n});mn(r,!1);var a={$set:vn,$on:(v,g)=>hn(r,v,g)};Uf();var i=Rx(),c=m(I(i),2),l=de(c,!0);return pn(2),b(i),L((v,g)=>{Ue(i,"aria-label",v),j(l,g)},[()=>u.chat_newMessagesDivider_label(),()=>u.chat_newMessagesDivider_label()]),p(n,i),_n(a)}function Ax(n,r){if(!r||n.length===0)return null;const a=n.indexOf(r);return a===-1||a===n.length-1?null:r}function Tx(n,r,a){if(!r||n.length===0)return"none";const i=n.indexOf(r);return i===n.length-1?"none":i!==-1?"marker-loaded":a.complete?a.truncated?"marker-beyond-window":"none":"marker-pending"}function Mx(n,r){return r&&n.includes(r)?r:null}function Yp(n,r,a){return r-n<=a}const Ex=.2;function Xp(n,r,a){const i=Math.max(0,a-r),c=n-Ex*r;return Math.min(Math.max(0,c),i)}function qx(n,r,a){return n!==null&&a&&n===r}function Lx(n){return n?bw(n)&&yw(n)!==null&&typeof n.metadata?.taskNoteId=="string":!1}function Hx(n){const r=[],a=new Set;let i,c;for(const D of n.messages){if(D.agentId&&D.agentId!==n.agentId){i=void 0,c=void 0;continue}if(a.has(D.id))continue;a.add(D.id),n.breakBeforeMessageIds?.has(D.id)&&(i=void 0,c=void 0);const K=OS(D);if(K?.kind!=="turn-failure")c=void 0;else{const se=i?.seq!==void 0&&D.seq!==void 0&&Number.isSafeInteger(i.seq)&&Number.isSafeInteger(D.seq)&&D.seq===i.seq+1;(!c||!se)&&(c={key:JSON.stringify([n.agentId,"notice",D.id]),anchorMessageId:D.id,correlation:"unavailable",records:[],recordedFailureCount:0},r.push(c)),c.records.push({messageId:D.id,reason:K.reason,timestamp:D.timestamp}),c.recordedFailureCount+=1}i=D}const l=new Map;for(const D of n.queue){if(!D.requeuedAfterFailure)continue;const K=D.turnId||void 0,se=JSON.stringify([n.agentId,K?"turn":"queue",K??D.id]);let C=l.get(se);C||(C={key:se,correlation:K?"turn":"queue-entry",turnId:K,queueIds:[],state:"queued"},l.set(se,C)),C.queueIds.includes(D.id)||C.queueIds.push(D.id)}const v=[...l.values()],g=n.session?.id===n.agentId?n.session:void 0,_=g?.status===ki.Error,f=n.transientError||_&&g.stopReason||null,P=_&&!f,S=_&&(!n.transientError||n.transientError===g.stopReason)?g.stopReasonTimestamp:void 0,q=S?Sp(S):null,k=q&&f&&f===g?.stopReason?r.flatMap(D=>D.records).filter(D=>D.reason===f&&Sp(D.timestamp)===q):[],W=k.length===1?k[0].messageId:void 0,T=(g?kf(g):!1)?"attempting":v.length?"queued":f||P?"action-needed":"inactive";return{history:r,queueRecovery:v,current:{state:T,error:f,needsFallbackReason:P,timestamp:S,noticeId:W}}}function Ox(n,r){const a=n.hiddenTail[0]?.id,i=Hx({...r,messages:[...n.groups.flatMap(g=>g.messages),...n.hiddenTail],breakBeforeMessageIds:new Set(a?[a]:[])}),c=i.current.noticeId,l=i.history.map(g=>({...g,records:g.records.filter(_=>_.messageId!==c)})).filter(g=>g.records.length>0),v=new Set(l.map(g=>g.records[0].messageId));return{...i,runsByAnchor:new Map(l.map(g=>[g.records[0].messageId,g])),collapsedMessageIds:new Set(i.history.flatMap(g=>g.records.map(_=>_.messageId).filter(_=>!v.has(_))))}}var Dx=E('<div class="flex size-10 shrink-0 items-center justify-center rounded-md bg-muted/50"><!></div> <div class="min-w-0 flex-1"><div class="type-body truncate font-medium text-foreground"> </div> <div class="type-caption mt-0.5 line-clamp-2 text-muted-foreground"> </div></div> <div class="flex size-7 shrink-0 items-center justify-center rounded-md bg-muted/50 text-muted-foreground transition-colors group-hover:bg-muted"><!></div>',1),Fx=E('<div class="flex size-9 shrink-0 items-center justify-center rounded-md bg-muted/50"><!></div> <span class="type-body font-medium"> </span>',1),Nx=E('<div><div class="border-b border-border bg-muted/20 px-4 py-3"><p class="type-body font-medium text-foreground"> </p> <p class="type-caption mt-0.5 text-muted-foreground"> </p></div> <div class="max-h-[21rem] overflow-y-auto p-2"><!></div> <div class="border-t border-border bg-popover p-2"><!></div></div>'),Bx=E('<div class="mb-5"><!></div>'),Wx=E('<p data-testid="agent-welcome-description"> </p> <!>',1),Ux=E("<!> <!>",1),zx=E('<p class="mb-3 px-4 text-sm text-subtle leading-relaxed whitespace-pre-wrap" data-testid="agent-welcome-description"> </p>'),jx=E("<!> <span> </span>",1),Gx=E('<div class="mx-auto flex w-full max-w-[40rem] flex-1 flex-col px-4 pb-6 pt-4 text-subtle"><!> <!> <!></div>');function fv(n,r){if(new.target)return fn({component:fv,...n});mn(r,!0);const a=()=>ge(k,"$userOverrides$",v),i=()=>ge(q,"$specialists$",v),c=()=>ge(D,"$isGitHubAuth$",v),l=()=>ge(K,"$recentSpecialistIds$",v),[v,g]=Nr();let _=X(r,"onSpecialistChange",7),f=X(r,"session",7),P=X(r,"workspaceId",7);const S=Bn(P()??"");ae(()=>S.set(P()??""));const q=Qf(S),k=ek();ae(()=>{a()});const W=o(()=>{if(!f()||Zy(f()))return null;const N=f().metadata?.specialist||f().agentMetadata?.specialist;return N&&i().find(R=>R.id===N)||null});async function O(N){N?await Gl({specialist:N,hash:"specialists"}):await Gl({view:"create-specialist"})}let T=_e(!1);const D=tk(),K=pS(),se=o(()=>Iw(nk(i(),c()),l()));let C=_e(!1);const x=o(()=>u.chat_regularAgentWelcome_generalDescription_label()),Q=o(()=>e(W)?.name??u.chat_shared_general_fallback()),pe=o(()=>e(W)?.description??u.chat_shared_noSpecializedBehavior_label()),Te=o(()=>e(W)?e(W).defaultBehaviorPrompt||"":e(x));var he={get onSpecialistChange(){return _()},set onSpecialistChange(N){_(N),Z()},get session(){return f()},set session(N){f(N),Z()},get workspaceId(){return P()},set workspaceId(N){P(N),Z()},$set:vn,$on:(N,R)=>hn(r,N,R)},fe=Gx(),Le=I(fe);{var ue=N=>{var R=Bx(),re=I(R);fk(re,{class:"block w-full",align:"start",side:"bottom",contentClass:"w-[min(28rem,calc(100vw-2rem))]",get open(){return e(C)},set open(Y){w(C,Y,!0)},trigger:(Y,J)=>{let Se=()=>(J?.()).props;{let He=o(()=>zd("group flex h-auto min-h-(--control-height-medium) w-full cursor-pointer items-center gap-3 whitespace-normal rounded-lg border border-border bg-card px-4 py-3 text-left shadow-xs transition-colors","hover:border-input hover:bg-accent/30 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"));$t(Y,Li(Se,{type:"button",variant:"plain",wrapContent:!1,get class(){return e(He)},"data-testid":"specialist-picker-trigger",children:(z,Ie)=>{var Ce=Dx(),De=ye(Ce),at=I(De);{let ze=o(()=>e(W)?.id??null),Ze=o(()=>e(W)?.icon??null);pk(at,{agentId:"blank",variant:"emphasized",get specialist(){return e(ze)},get icon(){return e(Ze)}})}b(De);var lt=m(De,2),Oe=I(lt),$e=de(Oe,!0),V=m(Oe,2),ne=de(V,!0);b(lt);var Fe=m(lt,2),me=I(Fe);gt(me,{get icon(){return Na},size:10}),b(Fe),L(()=>{j($e,e(Q)),j(ne,e(pe))}),p(z,Ce)},$$slots:{default:!0}}))}},content:Y=>{var J=Nx(),Se=I(J),He=I(Se),z=de(He,!0),Ie=m(He,2),Ce=de(Ie,!0);b(Se);var De=m(Se,2),at=I(De);{let $e=o(()=>e(W)?.id??null);ew(at,{get specialists(){return e(se)},get value(){return e($e)},onchange:V=>{w(C,!1),_()?.(V)}})}b(De);var lt=m(De,2),Oe=I(lt);Tt(Oe,()=>Dr,($e,V)=>{V($e,{class:"flex h-auto w-full cursor-pointer items-center gap-3 whitespace-normal rounded-md px-3 py-2 text-left text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",onSelect:()=>{w(C,!1),O()},children:(ne,Fe)=>{var me=Fx(),ze=ye(me),Ze=I(ze);gt(Ze,{get icon(){return O$},size:12}),b(ze);var ut=m(ze,2),mt=de(ut,!0);L(dt=>j(mt,dt),[()=>u.chat_regularAgentWelcome_createSpecialist_label()]),p(ne,me)},$$slots:{default:!0}})}),b(lt),b(J),L(($e,V)=>{j(z,$e),j(Ce,V)},[()=>u.workspace_createAgentSection_specialists_label(),()=>u.workspace_createAgentSection_specialists_description()]),p(Y,J)},$$slots:{trigger:!0,content:!0}}),b(R),p(N,R)};B(Le,N=>{_()&&N(ue)})}var oe=m(Le,2);{var Me=N=>{var R=Wt(),re=ye(R);{let qe=o(()=>u.chat_specialistSelector_prompt_label());Tt(re,()=>hk,(H,Y)=>{Y(H,{class:"mb-3",role:"region",get"aria-label"(){return e(qe)},children:(J,Se)=>{var He=Ux(),z=ye(He);Tt(z,()=>lv,(Ce,De)=>{De(Ce,{children:(at,lt)=>{var Oe=Wt(),$e=ye(Oe);Tt($e,()=>cv,(V,ne)=>{ne(V,{class:"type-caption font-medium",children:(Fe,me)=>{pn();var ze=dn();L(Ze=>j(ze,Ze),[()=>u.chat_specialistSelector_prompt_label()]),p(Fe,ze)},$$slots:{default:!0}})}),p(at,Oe)},$$slots:{default:!0}})});var Ie=m(z,2);Tt(Ie,()=>vk,(Ce,De)=>{De(Ce,{children:(at,lt)=>{var Oe=Wx(),$e=ye(Oe),V=de($e,!0),ne=m($e,2);$t(ne,{type:"button",variant:"link",get"aria-expanded"(){return e(T)},onclick:()=>w(T,!e(T)),class:"text-xs text-muted-foreground hover:text-foreground transition-colors mt-2 cursor-pointer",children:(Fe,me)=>{pn();var ze=dn();L(Ze=>j(ze,Ze),[()=>e(T)?u.chat_regularAgentWelcome_showLess_label():u.chat_regularAgentWelcome_showMore_label()]),p(Fe,ze)},$$slots:{default:!0}}),L(()=>{xe($e,1,`text-sm text-subtle leading-relaxed whitespace-pre-wrap break-words ${e(T)?"":"line-clamp-6"}`),j(V,e(Te))}),p(at,Oe)},$$slots:{default:!0}})}),p(J,He)},$$slots:{default:!0}})})}p(N,R)},ie=N=>{var R=zx(),re=de(R,!0);L(()=>j(re,e(Te))),p(N,R)};B(oe,N=>{e(W)?N(Me):N(ie,-1)})}var ee=m(oe,2);{var Ae=N=>{$t(N,{variant:"ghost-light",size:"sm",onclick:()=>O(e(W).id),class:"inline-flex items-center gap-2 text-sm text-muted-foreground hover:text-foreground transition-colors cursor-pointer pl-1.5 mr-auto",children:(R,re)=>{var qe=jx(),H=ye(qe);gt(H,{get icon(){return H$},size:12,class:"opacity-60"});var Y=m(H,2),J=de(Y,!0);L(Se=>j(J,Se),[()=>u.chat_regularAgentWelcome_customize_label()]),p(R,qe)},$$slots:{default:!0}})};B(ee,N=>{e(W)&&N(Ae)})}b(fe),p(n,fe);var Ee=_n(he);return g(),Ee}var Vx=E('<a class="cursor-pointer underline underline-offset-2 hover:opacity-80" data-suggested-prompt-link=""> </a>'),Kx=E('<kbd data-suggested-prompt-hint=""> </kbd>'),Qx=E('<span class="type-caption"> </span>'),Jx=E('<div role="presentation" data-typography-role="body" data-suggested-prompt-row=""><span data-suggested-prompt-icon=""><!></span> <span class="min-w-0 flex-1 text-pretty" data-suggested-prompt-label=""><span role="button" tabindex="0" class="focus-visible:outline-none" data-suggested-prompt-text=""> </span><!></span> <!> <!></div>'),Yx=E('<div class="flex flex-col" data-testid="suggested-prompts-surface"><!></div>');function eu(n,r){if(new.target)return fn({component:eu,...n});mn(r,!0);let a=X(r,"prompts",7),i=X(r,"onSelect",7),c=X(r,"onEdit",7),l=X(r,"compact",7,!1),v=X(r,"showShortcutHints",7,!1),g=X(r,"reserveShortcutHintSpace",7,!1),_=X(r,"workspaceId",7);const P=typeof navigator<"u"&&navigator.platform.toUpperCase().includes("MAC")?"⌃":"Alt+",S=p$.replace("text-ui","type-caption");function q(x){i()(x)}function k(x,Q){x.key!=="Enter"&&x.key!==" "||(x.preventDefault(),q(Q))}function W(x,Q){x.preventDefault(),x.stopPropagation(),qd(Q,{workspaceId:_(),event:x})}function O(x,Q){(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),x.stopPropagation(),qd(Q,{workspaceId:_(),event:x}))}function T(x){return x<3}var D={get prompts(){return a()},set prompts(x){a(x),Z()},get onSelect(){return i()},set onSelect(x){i(x),Z()},get onEdit(){return c()},set onEdit(x){c(x),Z()},get compact(){return l()},set compact(x=!1){l(x),Z()},get showShortcutHints(){return v()},set showShortcutHints(x=!1){v(x),Z()},get reserveShortcutHintSpace(){return g()},set reserveShortcutHintSpace(x=!1){g(x),Z()},get workspaceId(){return _()},set workspaceId(x){_(x),Z()},$set:vn,$on:(x,Q)=>hn(r,x,Q)},K=Wt(),se=ye(K);{var C=x=>{var Q=Yx(),pe=I(Q);{const Te=(fe,Le)=>{let ue=()=>(Le?.()).item,oe=()=>(Le?.()).index;const Me=o(()=>ay(ue())),ie=o(()=>e(Me)[0]?.type==="text"?e(Me)[0].content:"");var ee=Jx(),Ae=I(ee),Ee=I(Ae);gt(Ee,{get icon(){return zf},size:16,get class(){return gr}}),b(Ae);var N=m(Ae,2),R=I(N),re=de(R,!0),qe=m(R);On(qe,17,()=>e(Me).slice(e(ie)?1:0),Y_,(z,Ie)=>{var Ce=Wt(),De=ye(Ce);{var at=Oe=>{const $e=o(()=>ry(e(Ie).url));var V=Vx(),ne=de(V,!0);L(()=>{Ue(V,"href",e($e)),Ue(V,"title",e($e)),j(ne,e(Ie).label)}),ps("click",V,Fe=>W(Fe,e($e))),ps("keydown",V,Fe=>O(Fe,e($e))),p(Oe,V)},lt=Oe=>{var $e=dn();L(()=>j($e,e(Ie).content)),p(Oe,$e)};B(De,Oe=>{e(Ie).type==="link"?Oe(at):Oe(lt,-1)})}p(z,Ce)}),b(N);var H=m(N,2);{var Y=z=>{var Ie=Kx();let Ce;var De=de(Ie);L(()=>{Ce=xe(Ie,1,`${S??""} mt-px inline-flex h-5 items-center self-start border-0 bg-transparent p-0 font-sans font-normal text-muted-foreground! opacity-100`,null,Ce,{invisible:!v()}),Ue(Ie,"aria-hidden",v()?void 0:"true"),Ue(Ie,"data-hint-visible",v()),j(De,`${P}${oe()+1}`)}),p(z,Ie)},J=o(()=>T(oe())&&(v()||g()));B(H,z=>{e(J)&&z(Y)})}var Se=m(H,2);{var He=z=>{L$(z,{side:"top",delayDuration:300,trigger:De=>{{let at=o(()=>u.chat_suggestedPrompts_editInInput_ariaLabel());$t(De,{type:"button",variant:"ghost-light",size:"icon-xs",iconOnly:!0,class:"absolute right-0.5 top-[calc(var(--operational-leading-half-slot-size)+var(--space-1)*0.5+1px)] shrink-0 -translate-y-1/2 rounded opacity-0 group-hover:opacity-100 group-focus-within:opacity-100 focus-visible:opacity-100",onclick:lt=>{lt.stopPropagation(),c()(ue())},get"aria-label"(){return e(at)},children:(lt,Oe)=>{gt(lt,{get icon(){return D$},size:"xs"})},$$slots:{default:!0}})}},content:De=>{var at=Qx(),lt=de(at,!0);L(Oe=>j(lt,Oe),[()=>u.chat_suggestedPrompts_edit_tooltip()]),p(De,at)},$$slots:{trigger:!0,content:!0}})};B(Se,z=>{c()&&z(He)})}b(ee),L(z=>{xe(ee,1,`${Wf} ${g$} group relative flex cursor-pointer items-center gap-[var(--operational-leading-gap)] rounded-sm border border-transparent bg-transparent px-1.5 py-0.5 text-left opacity-100 pr-9 transition-colors hover:text-foreground has-[[data-suggested-prompt-text]:focus-visible]:outline-2 has-[[data-suggested-prompt-text]:focus-visible]:outline-offset-2 has-[[data-suggested-prompt-text]:focus-visible]:outline-ring`),xe(Ae,1,`${Ul??""} mt-px self-start`),Ue(R,"aria-label",z),j(re,e(ie))},[()=>ny(ue())]),ps("click",R,z=>{z.stopPropagation(),q(ue())}),ps("keydown",R,z=>k(z,ue())),p(fe,ee)};let he=o(()=>l()?"[&>div>div:last-child]:gap-0":"[&>div>div:last-child]:gap-0.5");T$(pe,{get items(){return a()},virtualize:!1,onActivate:q,get class(){return`overflow-visible! [&>div>div:last-child]:flex [&>div>div:last-child]:flex-col ${e(he)??""}`},"data-testid":"suggested-prompts-list",get"data-compact"(){return l()},row:Te,$$slots:{row:!0}})}b(Q),Bt(1,Q,()=>ma,()=>({tier:"fast",y:0,scale:1})),Bt(2,Q,()=>to,()=>({tier:"fast"})),p(x,Q)};B(se,x=>{a().length>0&&x(C)})}return p(n,K),_n(D)}Ud(["click","keydown"]);var Xx=E('<section class="pb-6 pt-6"><p class="type-body mb-5 max-w-[36rem] px-1.5 text-pretty text-muted-foreground"> </p> <!></section>');function vv(n,r){if(new.target)return fn({component:vv,...n});mn(r,!0);let a=X(r,"onSelect",7),i=X(r,"compact",7,!1);const c=o(()=>[{label:u.chat_chiefEmptyState_assignedPrs_label(),prompt:u.chat_chiefEmptyState_assignedPrs_prompt()},{label:u.chat_chiefEmptyState_staleWorkspaces_label(),prompt:u.chat_chiefEmptyState_staleWorkspaces_prompt()},{label:u.chat_chiefEmptyState_agentPerformance_label(),prompt:u.chat_chiefEmptyState_agentPerformance_prompt()},{label:u.chat_chiefEmptyState_morningBrief_label(),prompt:u.chat_chiefEmptyState_morningBrief_prompt()},{label:u.chat_chiefEmptyState_randomTheme_label(),prompt:u.chat_chiefEmptyState_randomTheme_prompt()}]),l=o(()=>e(c).map(q=>q.label));function v(q){const k=e(c).find(W=>W.label===q);k&&a()(k.prompt)}var g={get onSelect(){return a()},set onSelect(q){a(q),Z()},get compact(){return i()},set compact(q=!1){i(q),Z()},$set:vn,$on:(q,k)=>hn(r,q,k)},_=Xx(),f=I(_),P=de(f,!0),S=m(f,2);return eu(S,{get prompts(){return e(l)},onSelect:v,get compact(){return i()}}),b(_),L(q=>j(P,q),[()=>u.chat_chiefEmptyState_intro_label()]),p(n,_),_n(g)}const tu=2e3,Zx=4e3,e1=Zx-tu-2;function t1(n,r=tu){const a=[];let i=0;for(let c=n.length-1;c>=0&&i<r;c-=1){const l=n[c];if(l.role!=="user"&&l.role!=="assistant")continue;const v=(l.contentBlocks??[]).filter(_=>_.type==="text").map(_=>_.text||_.content||"").join(""),g=(l.role==="assistant"?tw(v).cleanedContent:v).trim();g&&(a.unshift({role:l.role,text:g}),i+=g.length)}return a}function n1(n,r){const a=n.map(l=>`${l.role==="user"?"User":"Assistant"}: ${l.text}`).join(`
|
|
2
2
|
|
|
3
3
|
`).slice(-tu),i=r.map(l=>l.trim()).filter(Boolean);if(i.length===0)return a;const c=`Suggested prompts:
|
|
4
4
|
${i.map(l=>`- ${l}`).join(`
|