@intent-hq/web 2.383.2 → 2.383.3
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/{B54vxPSC.js → -2V-BAm8.js} +3 -3
- package/web/app/immutable/chunks/{DaA4cwB7.js → -NFtmIGG.js} +1 -1
- package/web/app/immutable/chunks/{CERS_x_a.js → 0l7ZqDIV.js} +1 -1
- package/web/app/immutable/chunks/{CkJj_XU1.js → 38Vg2YF4.js} +2 -2
- package/web/app/immutable/chunks/{DYw-jZnX.js → AqAgOqAP.js} +2 -2
- package/web/app/immutable/chunks/{BGOOya_A.js → Ax0sJJJl.js} +13 -13
- package/web/app/immutable/chunks/{pWMJoQQd.js → B1Gvj9xq.js} +3 -3
- package/web/app/immutable/chunks/{BxKrk2Xm.js → B2EqH2B9.js} +1 -1
- package/web/app/immutable/chunks/{BYtUt_7N.js → B4mnoVZK.js} +1 -1
- package/web/app/immutable/chunks/{B8eFCa5E.js → B4rcpoVl.js} +1 -1
- package/web/app/immutable/chunks/{g9tUAsNS.js → B7AnydIV.js} +1 -1
- package/web/app/immutable/chunks/{kLtCLkab.js → BB5q5DsO.js} +1 -1
- package/web/app/immutable/chunks/{CtxKEpQR.js → BB7BFhCP.js} +1 -1
- package/web/app/immutable/chunks/{DQK1MQRy.js → BCo0L43p.js} +1 -1
- package/web/app/immutable/chunks/{aR25fz44.js → BD1NjrB7.js} +1 -1
- package/web/app/immutable/chunks/{BVGxYq00.js → BDUjjuc4.js} +1 -1
- package/web/app/immutable/chunks/{BnOThusB.js → BDgY7Zd8.js} +2 -2
- package/web/app/immutable/chunks/{DbhHGGnX.js → BFU4GSWL.js} +1 -1
- package/web/app/immutable/chunks/{CHJf6CKw.js → BGxmHLUr.js} +1 -1
- package/web/app/immutable/chunks/{MpqcTAsG.js → BJA4-3TS.js} +1 -1
- package/web/app/immutable/chunks/{DTKdf69M.js → BMiKKOoz.js} +1 -1
- package/web/app/immutable/chunks/{B6Ea_mQK.js → BOYBHPRf.js} +1 -1
- package/web/app/immutable/chunks/{Bk0JLGzR.js → BQ9VbGlu.js} +1 -1
- package/web/app/immutable/chunks/{SQ1JAgBB.js → BT9OtIDj.js} +1 -1
- package/web/app/immutable/chunks/{_Yaq9uZY.js → BTTEE7GF.js} +1 -1
- package/web/app/immutable/chunks/{46R-6bwp.js → BZ1qE3sd.js} +1 -1
- package/web/app/immutable/chunks/{Bnurq_Pf.js → BZskJqHK.js} +2 -2
- package/web/app/immutable/chunks/{DgKxSqnb.js → BammBnda.js} +3 -3
- package/web/app/immutable/chunks/{DKN2oFQh.js → BdgSVihu.js} +1 -1
- package/web/app/immutable/chunks/{DynK7LpZ.js → BhHscwNa.js} +1 -1
- package/web/app/immutable/chunks/{-wH-MzHg.js → BkfSBkLs.js} +2 -2
- package/web/app/immutable/chunks/{DJ7NuUn9.js → BktdbaP2.js} +1 -1
- package/web/app/immutable/chunks/{C5wdJ-5g.js → Bok48R2D.js} +1 -1
- package/web/app/immutable/chunks/{sSkm7u9g.js → Bp3ZrlmO.js} +1 -1
- package/web/app/immutable/chunks/{C68E7oEN.js → BthP56U0.js} +1 -1
- package/web/app/immutable/chunks/{D3326bvN.js → BvWOwOTx.js} +3 -3
- package/web/app/immutable/chunks/{CU2vyfYu.js → BwOKiDn9.js} +1 -1
- package/web/app/immutable/chunks/{YJiBWTwd.js → BwyO9iAx.js} +1 -1
- package/web/app/immutable/chunks/{DOBbyUSI.js → Byun8_as.js} +1 -1
- package/web/app/immutable/chunks/{DBUDGVnq.js → BzVtDZxE.js} +1 -1
- package/web/app/immutable/chunks/{Cq8vwNeW.js → C-n5-Nyi.js} +1 -1
- package/web/app/immutable/chunks/{DYAwS63B.js → C19Fl1wo.js} +1 -1
- package/web/app/immutable/chunks/{BL78xDnE.js → C7cQ3lDB.js} +1 -1
- package/web/app/immutable/chunks/{Cv4Nh90j.js → C89qw-SN.js} +1 -1
- package/web/app/immutable/chunks/{VQuhn_Lt.js → CDXv1PW9.js} +1 -1
- package/web/app/immutable/chunks/{yOorim_l.js → CEAKAkFK.js} +1 -1
- package/web/app/immutable/chunks/{CCMszM-p.js → CGslv4Qq.js} +2 -2
- package/web/app/immutable/chunks/{DRJrqXOC.js → CImg9Ht4.js} +1 -1
- package/web/app/immutable/chunks/{B-HvfCLM.js → CKG0fjh3.js} +1 -1
- package/web/app/immutable/chunks/{BALrIQ13.js → CKOijLzA.js} +1 -1
- package/web/app/immutable/chunks/{DhFCW7ui.js → CKaMWgJQ.js} +1 -1
- package/web/app/immutable/chunks/{BCEIpZAe.js → CLeH6OyR.js} +1 -1
- package/web/app/immutable/chunks/{CaOXszWh.js → CMiAv123.js} +1 -1
- package/web/app/immutable/chunks/{g_W_KtW7.js → CUHgqEKH.js} +1 -1
- package/web/app/immutable/chunks/{BnaqhxMa.js → CW2OkXuF.js} +1 -1
- package/web/app/immutable/chunks/{CMW1kPYq.js → CWmACcmS.js} +1 -1
- package/web/app/immutable/chunks/{DPTJGt-4.js → CXR8jfrb.js} +1 -1
- package/web/app/immutable/chunks/{CqaNT709.js → C_-1gUwp.js} +3 -3
- package/web/app/immutable/chunks/{ClJH5EDU.js → C_1Oardw.js} +1 -1
- package/web/app/immutable/chunks/{NV_vO3Eg.js → CfdQaRg7.js} +4 -4
- package/web/app/immutable/chunks/{C5E04JHB.js → CgLuwxkV.js} +1 -1
- package/web/app/immutable/chunks/{C6aFracI.js → ChUo5Z7l.js} +1 -1
- package/web/app/immutable/chunks/{Dc-K8gB4.js → CiNhMqq1.js} +1 -1
- package/web/app/immutable/chunks/{BPlFpIis.js → CiieGSUV.js} +1 -1
- package/web/app/immutable/chunks/{dbsKZB4V.js → CnljYLZs.js} +1 -1
- package/web/app/immutable/chunks/{BaJk_Nxp.js → CpdAeaX0.js} +1 -1
- package/web/app/immutable/chunks/{BsLGFv7V.js → CpxEaO9r.js} +1 -1
- package/web/app/immutable/chunks/{hSGzq1Th.js → CrJMkG_1.js} +2 -2
- package/web/app/immutable/chunks/{BTLLdzM2.js → CslzdKY2.js} +1 -1
- package/web/app/immutable/chunks/{CjoAn_VO.js → CtIGR2R7.js} +1 -1
- package/web/app/immutable/chunks/{BDU9DorN.js → Cuvcpuwl.js} +1 -1
- package/web/app/immutable/chunks/{CCOwocDi.js → CzXkTVR8.js} +1 -1
- package/web/app/immutable/chunks/{DF4N7xKD.js → D1QHqX16.js} +1 -1
- package/web/app/immutable/chunks/{BQpH3OoI.js → D23uZeQI.js} +1 -1
- package/web/app/immutable/chunks/{mEP1tNc7.js → D3a_DhRG.js} +1 -1
- package/web/app/immutable/chunks/{BUAZt4k8.js → D4QkxipA.js} +1 -1
- package/web/app/immutable/chunks/{Ci6sHn75.js → D59f5vu3.js} +1 -1
- package/web/app/immutable/chunks/{TLXVPYri.js → D6J72aTz.js} +3 -3
- package/web/app/immutable/chunks/{BYf4P-Xv.js → D83rapov.js} +1 -1
- package/web/app/immutable/chunks/{OKklWV7_.js → DCQ9cJhS.js} +1 -1
- package/web/app/immutable/chunks/{t_AdNc5B.js → DCq92KiG.js} +1 -1
- package/web/app/immutable/chunks/{C9nDXeDI.js → DD98YGoG.js} +1 -1
- package/web/app/immutable/chunks/{Bm_BMJ5S.js → DEIwQ6hO.js} +1 -1
- package/web/app/immutable/chunks/{BK3I1582.js → DGXU2Eur.js} +1 -1
- package/web/app/immutable/chunks/{CBvXBpaM.js → DKYFDagY.js} +1 -1
- package/web/app/immutable/chunks/{CKjDn57H.js → DLZnxjXG.js} +1 -1
- package/web/app/immutable/chunks/{C4oBHTC7.js → DLbnXb7P.js} +3 -3
- package/web/app/immutable/chunks/{1eGVa7uN.js → DPPrfCEc.js} +1 -1
- package/web/app/immutable/chunks/{DtEcb9Kl.js → DQ0P5vIc.js} +1 -1
- package/web/app/immutable/chunks/{03HQb6Nz.js → DR9rgOUR.js} +1 -1
- package/web/app/immutable/chunks/{BvYSMLN-.js → DUdBCfQ2.js} +1 -1
- package/web/app/immutable/chunks/{4lxKnD4E.js → DUxx6wT8.js} +1 -1
- package/web/app/immutable/chunks/{BI4Gr7El.js → DVnAuhkJ.js} +1 -1
- package/web/app/immutable/chunks/{BUtMbPHc.js → DWG0la6r.js} +1 -1
- package/web/app/immutable/chunks/{DUrqr-_9.js → DcTV3q3a.js} +1 -1
- package/web/app/immutable/chunks/{DKAEb0Nq.js → Dcuzm8gD.js} +1 -1
- package/web/app/immutable/chunks/{DMis7v6J.js → Df5fc__K.js} +2 -2
- package/web/app/immutable/chunks/{1pbfqlmC.js → DhN_Bb70.js} +4 -4
- package/web/app/immutable/chunks/{CDTDaiWd.js → Dipy9ZkR.js} +1 -1
- package/web/app/immutable/chunks/{DqnZckLn.js → Dj5oY4MN.js} +1 -1
- package/web/app/immutable/chunks/{BFnrc2L0.js → Dkwg3iDV.js} +3 -3
- package/web/app/immutable/chunks/{CCsFilO2.js → DlrDVrrH.js} +1 -1
- package/web/app/immutable/chunks/{CPfM5J_u.js → DpCuuI0h.js} +1 -1
- package/web/app/immutable/chunks/{COs0nq_h.js → DqRH8mOo.js} +1 -1
- package/web/app/immutable/chunks/{CRmihGrZ.js → JhwNDffI.js} +1 -1
- package/web/app/immutable/chunks/{B73pME8S.js → Jmsfhy4p.js} +1 -1
- package/web/app/immutable/chunks/{CfqtYdKm.js → LFBaWgJg.js} +1 -1
- package/web/app/immutable/chunks/{BNsReuZq.js → QXKw7ybW.js} +1 -1
- package/web/app/immutable/chunks/{D7OzCs6b.js → SDWlqEse.js} +1 -1
- package/web/app/immutable/chunks/{DWKRk5qT.js → WAmymGEm.js} +1 -1
- package/web/app/immutable/chunks/{DOTkiVAt.js → a6nBCKTJ.js} +1 -1
- package/web/app/immutable/chunks/{C2UQ69-V.js → bB4pIooo.js} +1 -1
- package/web/app/immutable/chunks/{Bw02Klel.js → eBfEHUcb.js} +4 -4
- package/web/app/immutable/chunks/{DqVxq9qz.js → gRz70TuX.js} +1 -1
- package/web/app/immutable/chunks/{5Ya2tobY.js → hrbt6TUA.js} +1 -1
- package/web/app/immutable/chunks/{ML4TWB19.js → m6g2qs4v.js} +1 -1
- package/web/app/immutable/chunks/{CecaUouy.js → mlIdQnJX.js} +2 -2
- package/web/app/immutable/chunks/{CCNu9Rxf.js → p-4Usjf1.js} +1 -1
- package/web/app/immutable/chunks/{DU6GzJo7.js → pf1qexdH.js} +1 -1
- package/web/app/immutable/chunks/{HnXWs0wn.js → sjYi8iFk.js} +1 -1
- package/web/app/immutable/chunks/{BBLmHF-x.js → uA-KbK5l.js} +1 -1
- package/web/app/immutable/chunks/{CTKRrTvZ.js → ufC4F9mx.js} +2 -2
- package/web/app/immutable/chunks/{TkG8RZHk.js → v1V9O0KC.js} +1 -1
- package/web/app/immutable/chunks/{D9PsslUR.js → wh8BTzW1.js} +2 -2
- package/web/app/immutable/chunks/{Doz22Fw6.js → yC4xveeV.js} +1 -1
- package/web/app/immutable/chunks/{gMS62uii.js → yYvyTKgb.js} +1 -1
- package/web/app/immutable/chunks/{D89oEjt1.js → zw9aQKYl.js} +1 -1
- package/web/app/immutable/entry/{app.D9Jtjo9u.js → app.CeAiZV-v.js} +2 -2
- package/web/app/immutable/entry/start.DrVPJx5Z.js +1 -0
- package/web/app/immutable/nodes/{0.D7G8zYtJ.js → 0.D2I9SFzE.js} +1 -1
- package/web/app/immutable/nodes/{1.CeP6l7to.js → 1.CHeML-3-.js} +1 -1
- package/web/app/immutable/nodes/{10.B0HUYmSO.js → 10.CPMi8QX9.js} +4 -4
- package/web/app/immutable/nodes/{11.DK72_yYq.js → 11.DOD-sh-z.js} +1 -1
- package/web/app/immutable/nodes/{15.u_u2o_gG.js → 15.BXDyjjHm.js} +1 -1
- package/web/app/immutable/nodes/{19.Ckyt7QSw.js → 19.BEUhM4Xw.js} +2 -2
- package/web/app/immutable/nodes/{2.B6dSCynl.js → 2.CeC42N_5.js} +4 -4
- package/web/app/immutable/nodes/{3.BYMfscY7.js → 3.-_yjscmj.js} +1 -1
- package/web/app/immutable/nodes/{4.BbNp4BGO.js → 4.CdQdgUhv.js} +1 -1
- package/web/app/immutable/nodes/{5.BY-7-cOX.js → 5.jUP9W-D7.js} +1 -1
- package/web/app/immutable/nodes/{6.CgyQkAW2.js → 6.B0WnMraI.js} +1 -1
- package/web/app/immutable/nodes/{7.573udsYL.js → 7.DAEOmrZS.js} +1 -1
- package/web/app/immutable/nodes/{8.CRV-jSmC.js → 8.D1Q1AivC.js} +1 -1
- package/web/app/immutable/nodes/{9.BWV1lf5B.js → 9.C5Qv23W5.js} +4 -4
- package/web/app/version.json +1 -1
- package/web/index.html +9 -9
- package/web/app/immutable/entry/start.CkN6A8cF.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var U_=Object.defineProperty;var Dg=n=>{throw TypeError(n)};var z_=(n,r,a)=>r in n?U_(n,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):n[r]=a;var Js=(n,r,a)=>z_(n,typeof r!="symbol"?r+"":r,a),j_=(n,r,a)=>r.has(n)||Dg("Cannot "+a);var To=(n,r,a)=>(j_(n,r,"read from private field"),a?a.call(n):r.get(n)),Ng=(n,r,a)=>r.has(n)?Dg("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(n):r.set(n,a);import{t as un,bo as Z,bw as gn,bp as gf,b as pn,bm as g,bq as Ur,bs as ue,br as qi}from"./C0QTy0Sy.js";import{bs as fn,a5 as I,bf as fs,bA as y,W as p,bn as vn,aA as ee,aB as q,ca as se,a7 as Wt,ay as ye,aD as e,cd as Bn,c9 as o,bS as _,bl as de,be as dn,b_ as L,bO as j,c5 as it,bH as w,bV as me,bj as Es,bk as ro,b$ as ln,ai as Wd,aj as ps,bo as jl,br as Mr,c0 as Dt,ak as G_,cb as sd,aw as wi,a as V_}from"./3SdAC2_C.js";import{i as B}from"./bhKPSdq4.js";import{k as xi}from"./-K3ARgq0.js";import{g as Dn,i as K_,I as eo,p as Lo,e as Eo}from"./B6S6VNu7.js";import{n as Nt,l as ma,c as to,j as Bg,k as Fo,h as Q_}from"./DLwWVKiF.js";import{b as pf,e as Ud,f as ke,s as ze,c as zt,g as gs}from"./7UPrdiE9.js";import{b as J_}from"./goTpbPhD.js";import{b as wr}from"./Dn334wJv.js";import{m as Y_,U as X_,Z as Z_,X as ew,Y as tw,I as Wg,o as nw,l as rw,a2 as aw,x as Ug,$ as sw,a0 as zg,r as ow,s as iw}from"./pWMJoQQd.js";import{Jv as F,fo as lw,eW as cw,f3 as dw,eX as uw,f1 as gw,f0 as pw,eZ as fw,e$ as vw,eY as hw,ru as mw,c6 as _w,i as $i,J4 as ww,Dc as ff,Dh as bw,Dj as jg,Dg as yw,Di as Iw,vD as Sw,vF as $w,Cp as vf,cp as kw,cn as xw,By as Cw,bE as Pw,A3 as Rw,Ce as od,u$ as Tw,cq as Gg,dB as Aw,dC as Mw,Co as Ew,el as qw,CI as Lw,CH as Hw,CM as Ow,CL as Fw,cQ as Dw,cT as Nw,nC as Bw,er as Ww,wR as Uw,CN as zw,wT as jw,CO as Gw,cU as Vw,cV as Kw,nK as Qw,Ah as Jw,Iq as Yw,Ag as Xw,Dt as Zw,wm as eb,wn as tb,y$ as nb,z3 as id,wi as rb,wj as ab,rS as sb,rf as ob,rd as ib,f_ as lb,HO as cb,Lj as db,GM as ub,gn as gb,p2 as pb,Jj as fb,oj as vb,A2 as hb,ft as Vg,r2 as Kg,fm as mb,fl as _b,tB as wb,g3 as Qg,re as bb,fe as yb,C9 as Ib,m as Sb,nL as $b,zH as kb,yZ as xb,Ez as Cb,Eo as Jg,xh as Pb,xi as Yg,u_ as Xg,p3 as Rb,DF as Tb,gj as Ab,g1 as Mb,eU as Eb,cM as qb,A6 as Lb,Lo as Hb,Cu as Ob,LG as Fb,y2 as Db,ga as Nb,fd as Bb,cL as Wb,cI as Ub,cH as zb,vr as jb,xo as Gb,xm as Vb,cF as Kb,cE as Qb,z5 as Jb,z0 as Yb,xn as Xb}from"./tr-2J8Mf.js";import{a as zd}from"./CC7to1B5.js";import{aM as Zb,aL as ey,bg as ty,a7 as ny,aD as ry,aO as ay,M as hf,a0 as mf,b8 as sy,b2 as oy,as as Zg,P as bl,b0 as ep,a$ as tp,a_ as np}from"./NV_vO3Eg.js";import{l as _f,G as iy,I as Pd,at as ly,b1 as El,a9 as wf,S as cy,aW as ld,aq as dy,aJ as uy,C as gy,z as bf,s as py,A as fy,v as vy,a$ as hy,aH as yf,aG as If,aI as my,j as rp,aM as cd,aT as ap,aS as yl,aU as sp,Q as op,d as _y,e as wy,ax as by,V as ip,aE as yy,c as Iy,m as Sy,aV as lp,ap as $y,aw as cp,a as ky,aA as xy,ad as dp,aD as Cy,aX as up,a_ as gp,n as pp,ae as Py,R as Ry,ay as fp,am as Ty,O as Ay,as as My,h as Ey,q as qy,$ as dd,_ as Ly,aC as vp,a8 as Hy,f as Oy,i as Fy,a6 as Dy,ac as Ny}from"./CqaNT709.js";import{f as By,o as Wy,E as Uy,C as zy,m as jy,a2 as hp,aa as Gy,K as Vy,e as Ky,y as Qy}from"./C6mS8uZB.js";import{g as Pi}from"./DypB-Dwi.js";import{dW as Dl,cU as Sf,O as $f,W as Jy,bv as Yy,aF as kf,dH as xf,aU as qo,e8 as Xy,dw as Cf,aw as jd,dV as Gd,aN as Pf,cP as Zy,V as ha,a3 as Xs,B as eI,a7 as tI,a4 as nI,M as rI,a6 as aI,ar as sI,aG as Rf,aO as ql,b6 as oI,ay as Tf,r as iI,n as Rd,H as lI,dY as cI,aQ as dI,aK as uI,c9 as gI,aW as pI,bM as fI,bK as vI,bL as hI,c8 as mI,c7 as _I,cN as wI,cM as bI,aS as yI,bb as II,bd as SI,bg as $I,bc as kI,bl as xI,bf as CI,be as PI,bh as RI,bi as TI,bk as AI,bj as MI,ax as EI,cj as qI,ck as LI,dv as HI,du as OI,a$ as FI,G as DI,b3 as NI,cf as BI,C as mp,d0 as WI,ba as ds,b$ as UI,X as zI,bq as jI,E as GI,ad as VI,t as KI,cW as QI,d3 as _p,Q as wp,dt as JI,cQ as ud}from"./BaujsV9k.js";import{u as Af,a as Il,ag as YI,x as XI,ad as Mf,af as ZI,ac as Ef,a4 as eS,F as bp,D as tS,e as nS,n as rS,s as aS,m as sS,Y as oS,k as iS}from"./DU6GzJo7.js";import{a2 as lS,b5 as cS,cM as dS,a_ as uS,b4 as gS,c2 as pS,c9 as fS,w as vS,x as hS,cd as mS}from"./CCOwocDi.js";import{n as _S,P as qf,F as wS,ai as bS,r as yS,ac as IS}from"./DX-Wrapd.js";import{I as SS,s as $S,H as yp}from"./Bqd7fdCF.js";import{e as kS}from"./CL3a4Hm1.js";import{e as xS,f as CS}from"./haN7a3Sc.js";import{s as PS,o as Zs,b as RS,g as Nl,d as TS,l as bi}from"./CIyUrgF0.js";import{a5 as AS,a7 as MS,D as ES,N as qS,ac as Ip,X as LS,i as HS,r as dr,v as Ri,u as na,p as ki,x as br,S as Vd,m as Gl,s as Ho,y as Ti,o as ao,n as so,t as Sp,aa as oo,w as io,a9 as Kd,q as _a,z as Oo,J as Td,_ as $p,g as OS,F as FS,U as Lf,I as Hf,a8 as Of,a6 as Ll,O as DS,E as Ff,V as NS,A as BS,b as WS,ab as US,ad as Sl,G as zS,e as gd,l as jS,C as GS,f as Ys,j as kp,H as us,Q as VS,d as $l,c as KS,a as xp,h as QS,L as JS,Y as Cp,a4 as pd,a1 as Pp,a0 as YS,a3 as Rp,$ as Tp,T as XS,B as ZS,k as e$,a2 as t$,K as n$,R as r$,P as a$,W as s$}from"./BTLLdzM2.js";import{m as o$}from"./Dms_DO28.js";import{g as Df}from"./DA5opfEp.js";import{b as i$}from"./EK6zOAHM.js";import{g as l$}from"./PIgqsYsQ.js";import{a as c$}from"./C4QKwtCH.js";import{q as Nf,d as ur,r as d$,e as Bl,j as u$,g as Ad,i as g$,f as Md,c as p$,A as f$,O as Ap,k as v$}from"./CtxKEpQR.js";import{P as h$}from"./D_Xpj-6r.js";import{e as m$}from"./DB7RVYiL.js";import{b as _$,a as w$,g as b$,c as y$,i as I$}from"./DrxfcnSy.js";import{R as S$,g as $$,W as kl,c as k$}from"./CBvXBpaM.js";import"./A9niI_uA.js";import"./CJ4Z96pe.js";import{t as Ai}from"./CrD0jtXE.js";import{F as x$,h as C$}from"./DCRuihKm.js";import"./lJeex2Gh.js";import{C as P$,e as Br,L as R$,l as Vl,d as Kl,K as Ql,h as Qd,M as Jl,S as Da}from"./fiz8N_zQ.js";import{D as T$}from"./518Fef2L.js";import{f as Mp}from"./chjnSxvZ.js";import"./DU3vNstz.js";import{i as Bf}from"./BjLb7AHW.js";import{h as Ep,i as qp,g as Lp,P as Hp,C as A$,m as Hl,R as M$}from"./BmTMWrby.js";import{f as bt,ae as E$}from"./FzlZUztb.js";import{F as ct,bs as q$,cd as L$,aw as Na,a2 as Wf,c9 as H$,bf as O$,be as F$,bg as D$,aO as Op,aj as fd,aB as vd,bB as Uf,d3 as Wl,cF as N$,aM as Fp,cb as Dp,cK as Ul,bu as B$,aS as W$,d0 as U$,a8 as zf,ac as z$,ag as j$,cr as G$,ba as V$,aC as jf,cT as Np,cz as K$,ax as Q$,cD as J$,c3 as Y$}from"./U9jJmfYa.js";import{c as Gf}from"./ChTqQfQN.js";import"./B4SiDSWP.js";import{c as Et}from"./CUkDMZwP.js";import{a5 as Vf,bg as X$,ar as Z$,k as ek,Y as tk,W as nk,a2 as rk,Z as ak,bw as sk,V as ok,a1 as ik,ah as lk}from"./DQK1MQRy.js";import{d as zl,f as ck,e as dk}from"./B8eFCa5E.js";import{A as uk}from"./wl2qP2wF.js";import{D as gk}from"./Cqa6LF3b.js";import"./QeBH-DWE.js";import{a as pk,C as fk}from"./CCqqosml.js";import"./Bsh6nUhU.js";import{C as vk}from"./c5QZsH9t.js";import{h as Ed,r as hk,a as mk}from"./Bnurq_Pf.js";import{s as _k}from"./D37getya.js";import{I as wk,a as Kf}from"./BAKPnd3w.js";import{L as bk}from"./DsGUBv3k.js";import{g as yk,f as Ik,b as Sk}from"./DKHY8q_S.js";import{s as Mi,g as Yn,i as $k,j as kk,e as Bp,r as Wp,f as xk,d as Ck,a as hd,h as Pk}from"./COs0nq_h.js";import{i as Up,a as Rk}from"./Bu13V5mO.js";import{seekConversationToMessage as zp}from"./C5E04JHB.js";import{l as Jt,o as md,h as Jd,n as qd,q as Tk}from"./CE7dsja4.js";import{o as Ak}from"./BnOThusB.js";import{A as Qf}from"./KYuLFpkq.js";import{b as Jf}from"./BYq9VtBF.js";import{g as Mk,e as Yf,v as Ek,f as qk,N as Lk,M as Hk,K as Ok,k as Xf,l as Fk,H as Zf,s as ev}from"./B2nCyo89.js";import{selectCurrentWorkspaceTabId as _d}from"./S845NCb3.js";import{o as Dk}from"./DOTkiVAt.js";import{d as Nk}from"./B0Z-1lwJ.js";import{P as Bk}from"./Ctbo6mXV.js";import{g as Wk}from"./BsLGFv7V.js";import{H as tv,M as Uk,y as zk,J as jk,g as Gk,i as Vk,u as Kk,e as nv,c as rv,d as Qk}from"./eElW3aeh.js";import{c as Jk,h as Yd,f as av,Q as Yk}from"./DCK8dPAL.js";import{t as Xk}from"./DAsc1V4f.js";import{s as Zk}from"./BsieX9dN.js";import{i as sv}from"./BcpfdNy8.js";import{d as ex,i as tx,r as nx}from"./L_tYoUCb.js";import{g as rx}from"./yFcbscNn.js";var ax=new Set(["$$slots","$$events","$$legacy","ref","class","children"]),sx=q("<div><!></div>");function ov(n,r){if(new.target)return un({component:ov,...n});fn(r,!0);let a=Z(r,"ref",15,null),i=Z(r,"class",7),c=Z(r,"children",7),l=gf(r,ax);var h={get ref(){return a()},set ref(f=null){a(f),ee()},get class(){return i()},set class(f){i(f),ee()},get children(){return c()},set children(f){c(f),ee()},$set:gn,$on:(f,P)=>pn(r,f,P)},u=sx();pf(u,f=>({"data-slot":"card-header",class:f,...l}),[()=>Ud("@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]",vk,i())]);var b=I(u);return Ai(b,()=>c()??fs),y(u),wr(u,f=>a(f),()=>a()),p(n,u),vn(h)}var ox=new Set(["$$slots","$$events","$$legacy","ref","class","children"]),ix=q("<div><!></div>");function iv(n,r){if(new.target)return un({component:iv,...n});fn(r,!0);let a=Z(r,"ref",15,null),i=Z(r,"class",7),c=Z(r,"children",7),l=gf(r,ox);var h={get ref(){return a()},set ref(f=null){a(f),ee()},get class(){return i()},set class(f){i(f),ee()},get children(){return c()},set children(f){c(f),ee()},$set:gn,$on:(f,P)=>pn(r,f,P)},u=ix();pf(u,f=>({"data-slot":"card-title",class:f,...l}),[()=>Ud("type-title min-w-0 break-words font-semibold leading-tight text-foreground",i())]);var b=I(u);return Ai(b,()=>c()??fs),y(u),wr(u,f=>a(f),()=>a()),p(n,u),vn(h)}const xl=SS.CHAT_MEDIA,wd=PS().min(1).max(512);Zs({workspaceId:wd,agentId:wd,draftId:Nl(),principalId:wd,media:RS(_S).min(1).max(20)}).strict();const lx=Zs({sessionId:Nl()}).strict();lx.extend({control:TS("action",[Zs({action:bi("readiness")}).strict(),Zs({action:bi("export"),request:xS}).strict(),Zs({action:bi("transcribe"),request:CS}).strict(),Zs({action:bi("release"),jobId:Nl()}).strict(),Zs({action:bi("adopt"),jobId:Nl()}).strict()])}).strict();function Xd(n,r,a,i=async(c,l)=>typeof window>"u"||$S(window)!=="electron"?{ok:!1,error:"unavailable"}:kS().invoke(c,l)){let c=null,l=null,h=!1;async function u(){h=!0,a.removeEventListener("abort",b);const x=c;c=null,x&&await i(xl.CLOSE,{sessionId:x}).catch(()=>{})}const b=()=>{u()};a.addEventListener("abort",b,{once:!0});const f=()=>{if(h||a.aborted||!r())throw new Error("media-send-retired")};async function P(){if(f(),c)return c;if(l)return l;l=(async()=>{const x=await i(xl.BEGIN,n);if(!x.ok)throw new Error("media-export-unavailable");c=x.value.sessionId;try{return f(),c}catch(D){throw await u(),D}})();try{return await l}finally{l=null}}async function S(x){const D=await P();f();const N=await i(xl.CONTROL,{sessionId:D,control:x});return f(),N}return{service:{exportMedia:x=>S({action:"export",request:x}),adoptMediaJob:x=>S({action:"adopt",jobId:x}),transcribeMedia:x=>S({action:"transcribe",request:x}),releaseMediaJob:async x=>c?await i(xl.CONTROL,{sessionId:c,control:{action:"release",jobId:x}}):{ok:!0,value:void 0}},dispose:u,readiness:()=>S({action:"readiness"})}}const bd=new Set;async function cx(n){const{drafts:r,signal:a}=n,i=structuredClone(n.capture),c=structuredClone(n.items),l=structuredClone(n.payload),{workspaceId:h,agentId:u}=i,b=Pi(F.state),f=Dl.select(F.state,h),P=Sf.select(F.state),S=_f(),M=JSON.stringify([b,h,u]);if(!b||!f||!P||l.wsId!==h||bd.has(M))return!1;bd.add(M);const x=new AbortController,D=()=>x.abort();a.addEventListener("abort",D,{once:!0});const N=()=>!a.aborted&&!x.signal.aborted&&Pi(F.state)===b&&Dl.select(F.state,h)===f&&wf(S)&&r.isCurrentDraft(i),T=F.getReadableState().subscribe(()=>{N()||x.abort()});let O=null;try{if(!N()||lS(c))return!1;const V=Af(i.attachments),ie=qf(wS(h,u),V,c.map(pe=>({contextItemId:pe.id,attachmentId:pe.attachmentId,path:pe.path}))),R=new Set([...ie.images,...ie.clips].map(pe=>pe.contextItemId));if(V.some(([pe])=>!R.has(pe))||ie.images.some(pe=>pe.mediaError)||ie.clips.some(pe=>pe.mediaError)||!bS(l.text,ie))throw new Error("invalid-evidence");if(O=n.warm?.take(i,x.signal)??null,!await r.flushDraft(i)||!N())return!1;const k=await By.agents.get(u,h);if(!N())return!1;if(!k||k.workspaceId!==h||k.retiredAt||k.pendingDeleteAt||k.status==="deleted")throw new Error("unavailable");const Q=ie.clips.flatMap(pe=>pe.media?[pe.media]:[]);Q.length&&!O&&(O=Xd({workspaceId:h,agentId:u,draftId:crypto.randomUUID(),principalId:P.principal.id,media:Q},N,x.signal));const ge=iy(c,ie),Re=Pd(ge),he=await ly({workspaceId:h,agentId:u,evidence:ie,clickedItems:c,sendItems:ge,clickedPayload:{...l,contextItems:ge,imageBlocks:Re.imageBlocks,fileBlocks:Re.fileBlocks},binding:S,service:O?.service??null,current:N,onRecord:()=>{}});return!he||!N()?!1:El(F,u,he)}catch{return N()&&F.dispatch(lw(u,g.dock_conversation_sendFailed_error())),!1}finally{T(),a.removeEventListener("abort",D),await O?.dispose(),bd.delete(M)}}const lv=1e4,jp={wasBusy:!1,busySince:null,preempted:!1,prediction:null};function Gp(n){return AS(n.messageMetadata)}function dx(n,r){if(n.some(Gp)){const a=n[0];return a&&!Gp(a)&&Vp(a,r)?[a.id]:[]}return n.filter(a=>Vp(a,r)).map(a=>a.id)}function ux(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 Vp(n,r){return!n.requeuedAfterFailure&&MS(n,r)}function gx(n,r){const{busy:a,queue:i,delivered:c,now:l}=r,h=r.blocked||r.interrupted,u=r.timeoutMs??lv;let b=n.prediction;if(b){const x=new Set(i.map(O=>O.id)),D=b.ids.filter(O=>x.has(O)&&!c.has(O)),N=l-b.startedAt>=u,T=n.wasBusy&&!a;!D.length||N||h&&!a||T?b=null:D.length!==b.ids.length&&(b={...b,ids:D})}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(!b&&f&&!h&&!S){const x=dx(i,l).filter(D=>!c.has(D));x.length&&(b={ids:x,startedAt:l})}const M={wasBusy:a,busySince:a?P:null,preempted:a&&S,prediction:b};return n.wasBusy===M.wasBusy&&n.busySince===M.busySince&&n.preempted===M.preempted&&n.prediction===M.prediction?n:M}class px{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(h=>{c=setTimeout(()=>h(!0),i)})]);if(clearTimeout(c),l)return!1}return!0}}function fx(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 Kp(n){const r=typeof n=="string"?n:n&&typeof n=="object"&&typeof n.script=="string"?n.script:void 0;return r||void 0}var vx=q('<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 cv(n,r){if(new.target)return un({component:cv,...n});fn(r,!0);const a=()=>ue(P,"$typing$",i),[i,c]=Ur();let l=Z(r,"workspaceId",7),h=Z(r,"agentId",7),u=Z(r,"class",7,"");const b=Bn(""),f=Bn("");se(()=>{b.set(l())}),se(()=>{f.set(h())});const P=cS(b,f),S=o(()=>m$(a()));var M={get workspaceId(){return l()},set workspaceId(O){l(O),ee()},get agentId(){return h()},set agentId(O){h(O),ee()},get class(){return u()},set class(O=""){u(O),ee()},$set:gn,$on:(O,V)=>pn(r,O,V)},x=Wt(),D=ye(x);{var N=O=>{var V=vx(),ie=I(V),R=I(ie);h$(R,{get people(){return a()},size:12,decorative:!0}),y(ie);var k=_(ie,2),Q=de(k,!0);dn(2),y(V),L(()=>{ke(V,1,`${Nf} 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 ${u()??""} /* a11y-ignore: user-requested compact typing status in the composer gap */`,"svelte-lm4khl"),j(Q,e(S))}),p(O,V)};B(D,O=>{e(S)&&O(N)})}p(n,x);var T=vn(M);return c(),T}const hx=50,mx=5e3,_x=500,wx=()=>({authority:()=>Pi(F.state),persistSnapshot:dy,dispatch:n=>F.dispatch(n),ownerView:n=>uy.withStore(F)(n)});function bx(n){const r=n.store??wx(),a=crypto.randomUUID();let i=me(!1),c=me(!1),l=me(!1),h=null,u=null,b=0,f=!1,P=null,S=null,M=null,x=0,D=null,N=null;const T={};let O,V=me([]),ie=null,R=0,k="",Q=0,ge="";const Re=()=>{const W=n.workspaceId(),C=n.agentId();if(!W||!C||!(n.active?.()??!0))return null;const re=r.authority?.();if(!re||f)return null;const Me=n.inputValue(),H=pe(),Y=O?.shared,X=Y?.workspaceId===W&&Y.agentId===C?Y.lifetime:null,Ie=JSON.stringify([re,W,C,x,X,H.map(z=>[z.id,z.attachmentId,z.path])]);Ie!==ge&&(ge=Ie,Q+=1);const Ne=JSON.stringify([re,W,C,Me,H,x]);return Ne!==k&&(k=Ne,R+=1),{authority:re,ownerId:a,workspaceId:W,agentId:C,text:Me,attachments:JSON.parse(JSON.stringify(H)),generation:R,attachmentEpoch:Q}};let he=null;const pe=()=>YI(n.contextItems(),XI(n.contextItems(),e(V))),qe=W=>{if(O=W,!W||f)return;const C=W.restore;if(N&&C?.requestId===N.requestId&&C.status!=="pending"){const{apply:H}=N;N=null,w(c,!1),C.status==="restored"&&w(V,C.draft?.attachments??[]),H(C)}const re=W.shared;if(re&&!e(c)&&u===`${re.workspaceId}\0${re.agentId}`){const H=JSON.stringify([re.provenance,re.workspaceId,re.agentId,re.lifetime,re.revision]);if(ie!==H){ie=H;const Y=he??h,X=Y&&n.inputValue()===Y.text&&JSON.stringify(pe())===Y.attachmentsJson;re.origin===a?he={text:re.snapshot.text,attachmentsJson:JSON.stringify(re.snapshot.attachments)}:X&&(b+=1,M&&clearTimeout(M),w(V,re.snapshot.attachments),he=h={text:re.snapshot.text,attachmentsJson:JSON.stringify(e(V))},n.setInputValue(re.snapshot.text),n.setContextItems(Il(e(V))),n.applyEditorContent(re.snapshot.text))}}it(Re);const Me=[];for(const H of W.saves){if(H.status==="pending")continue;Me.push(H.id);const Y=T[H.id];delete T[H.id],Y?.(H)}Me.length>0&&queueMicrotask(()=>r.dispatch(gw(a,Me)))},fe=(W,C,re)=>{const Me=crypto.randomUUID();N={requestId:Me,apply:re},w(c,!0),r.dispatch(fw(a,Me,W,C))},oe=()=>{N&&(N=null,w(c,!1),r.dispatch(hw(a)))},Te=()=>{const W=D;W&&(D=null,r.dispatch(vw(a)),O?.saves.some(C=>C.id===W)||delete T[W])};r.dispatch(cw(a));const J=r.ownerView(a).subscribe(W=>it(()=>qe(W))),ae=()=>{S&&(clearTimeout(S),S=null),w(l,!1)},Ae=()=>{D&&(D=null,r.dispatch(pw(a)))};se(()=>{const W=n.active?.()??!0,C=n.workspaceId(),re=n.agentId();if(!W){it(()=>{b+=1,u=null,oe(),P&&clearTimeout(P),P=null,ae(),M&&clearTimeout(M),M=null,w(i,!1),Ae()});return}if(!C||!re)return;const Me=`${C}\0${re}`;if(u===Me)return;const H=u!==null;u=Me;const Y=++b;it(()=>{h=null,he=null,ie=null,w(V,[]),P&&clearTimeout(P),ae(),M&&(clearTimeout(M),M=null),H&&(Ae(),n.setInputValue(""),n.contextItemsAreScoped||n.setContextItems([]),n.applyEditorContent(""));const X=cy(C,re);if(X){w(V,X.attachments),w(i,!1);const Ne=n.contextItems().length>0,z=X.text,Se=JSON.stringify(X.attachments);n.setInputValue(X.text),Ne||n.setContextItems(Il(X.attachments)),n.applyEditorContent(X.text),h={text:X.text,attachmentsJson:Se},fe(C,re,Ce=>{if(Ce.status!=="restored")return;const De=Ce.draft;if(f||!(n.active?.()??!0)||u!==Me||b!==Y)return;const at=De?.text??"",Xe=De?.attachments??[],Fe=JSON.stringify(Xe);ld(C,re,{text:at,attachments:Xe});const Pe=n.inputValue()===z&&JSON.stringify(pe())===Se;Ne||!Pe||(at!==z&&(n.setInputValue(at),n.applyEditorContent(at)),Fe!==Se&&n.setContextItems(Il(Xe)),h={text:at,attachmentsJson:Fe})});return}w(i,!0),S=setTimeout(()=>{S=null,(n.active?.()??!0)&&w(l,!0)},_x),P=setTimeout(()=>{(n.active?.()??!0)&&(w(i,!1),ae())},mx);const Ie=()=>{!(n.active?.()??!0)||u!==Me||b!==Y||(P&&clearTimeout(P),w(i,!1),ae())};fe(C,re,Ne=>{if(Ne.status!=="restored"){Ie();return}const z=Ne.draft;if(f||!(n.active?.()??!0)||u!==Me||b!==Y)return;const Se=!!n.inputValue();if(!Se&&z?.attachments?.length&&n.contextItems().length===0&&n.setContextItems(Il(z.attachments)),!Se&&z?.text&&(n.setInputValue(z.text),M=setTimeout(()=>{(n.active?.()??!0)&&n.inputValue()===z.text&&n.applyEditorContent(z.text)},hx)),h===null){const Ce=z?.text??"",De=z?.attachments??[];h={text:Ce,attachmentsJson:JSON.stringify(De)},ld(C,re,{text:Ce,attachments:De})}Ie()})})}),se(()=>{const W=n.active?.()??!0,C=n.workspaceId(),re=n.agentId(),Me=e(i);if(!W){it(Te);return}if(!C||!re)return;const H=n.inputValue(),Y=pe();if(it(Re),it(Te),Me||h===null&&!H&&Y.length===0)return;const X=JSON.stringify(Y);if(h!==null&&h.text===H&&h.attachmentsJson===X)return;JSON.stringify(e(V))!==X&&w(V,Y);const Ie=`${C}\0${re}`,Ne=x,z=crypto.randomUUID();T[z]=Se=>{if(n.active?.()??!0){if(Se.status==="saved"){u===Ie&&x===Ne&&(h={text:H,attachmentsJson:X});return}n.onSaveError?.(new Error(Se.error))}},it(()=>{D=z,r.dispatch(dw(a,z,{authority:r.authority?.()??void 0,workspaceId:C,agentId:re,text:H,attachments:Y,rollback:h?{text:h.text,attachments:JSON.parse(h.attachmentsJson)}:null}))})}),se(()=>()=>{f=!0,P&&clearTimeout(P),S&&clearTimeout(S),M&&clearTimeout(M),Ae(),J(),r.dispatch(uw(a))});const He=W=>{const C=Re();return C!==null&&C.authority===W.authority&&C.ownerId===W.ownerId&&C.workspaceId===W.workspaceId&&C.agentId===W.agentId&&C.generation===W.generation&&C.text===W.text&&JSON.stringify(C.attachments)===JSON.stringify(W.attachments)};return{captureDraft:Re,isCurrentDraft:He,updateAttachmentScreen(W,C,re){return!He(W)||!W.attachments.some(Me=>Me.id===C)?null:(w(V,W.attachments.map(Me=>Me.id===C?{...Me,screen:structuredClone(re)}:Me)),Re())},async flushDraft(W){if(!He(W))return!1;if(!r.persistSnapshot)throw new Error("draft-shared-transport-unavailable");return await r.persistSnapshot(a,W.workspaceId,W.agentId,W,W.authority),He(W)},get restorePending(){return e(c)},get gateActive(){return e(i)},get gateVisible(){return e(l)},invalidatePendingRestore(){if(b+=1,x+=1,oe(),P&&(clearTimeout(P),P=null),M&&(clearTimeout(M),M=null),w(i,!1),ae(),Te(),u!==null){const[W,C]=u.split("\0");ld(W,C,{text:"",attachments:[]}),he=null,w(V,[]),h={text:"",attachmentsJson:"[]"}}}}}function Ei(n){if(!n)return null;const r=qf(JSON.stringify([n.workspaceId,n.agentId]),Af(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 yx(n,r,a){const i=F.state.principal.snapshot,c=()=>Pi(F.state)===n.authority&&a.isCurrentDraft(n);if(!i||!c()||!await a.flushDraft(n)||!c())return{ready:!1};const l=new AbortController,h=Xd({workspaceId:n.workspaceId,agentId:n.agentId,principalId:i.principal.id,draftId:crypto.randomUUID(),media:[r]},c,l.signal);try{const u=await h.readiness();return!c()||!u.ok?{ready:!1}:u.value.find(b=>b.sourceId===r.source.id)??{ready:!1}}finally{await h.dispose()}}function Qp(n){let r=me(null),a=me(!1),i=me(!1),c=null,l=!0,h=0,u=null;Es(()=>{l=!1,h++}),se(()=>{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 b(S){if(n.disabled()||e(a))return;const M=n.drafts.captureDraft(),x=Ei(M),D=x?.clips.find(V=>V.contextItemId===S);if(!M||!D?.media||!x)return;const N=gy({workspaceId:M.workspaceId,agentId:M.agentId,clip:D,evidence:x,marks:x.marks}),T=bf(M.workspaceId,D.path);if(!N||!T)return;const O=++h;c=document.activeElement instanceof HTMLElement?document.activeElement:null,w(a,!0),w(i,!1);try{if(await n.beforeOpen?.(),!l||h!==O||!n.drafts.isCurrentDraft(M))return;const V=await(n.prepareOutput??yx)(M,D.media,n.drafts);if(!l||h!==O||!n.drafts.isCurrentDraft(M))return;const{attachmentPath:ie,...R}=N;w(r,{capture:M,contextItemId:S,snapshot:{...R,openId:crypto.randomUUID(),mediaUrl:T,output:V,deleteReady:!0}})}catch{l&&h===O&&w(i,!0)}finally{l&&h===O&&w(a,!1)}}async function f(S){const M=crypto.randomUUID(),x=e(r),D=n.drafts.captureDraft();if(!x||!D||D.authority!==x.capture.authority||D.ownerId!==x.capture.ownerId||D.workspaceId!==x.capture.workspaceId||D.agentId!==x.capture.agentId||D.attachmentEpoch!==x.capture.attachmentEpoch)return{requestId:M,result:"stale-source"};const N=Ei(D),T=N?.clips.find(Q=>Q.contextItemId===x.contextItemId);if(!N||!T?.media)return{requestId:M,result:"stale-source"};const V=u?.openId===x.snapshot.openId&&u.inputRevision===S.revision&&JSON.stringify(u.media)===JSON.stringify(T.media)?{...S,revision:T.media.saved?.revision??0}:S,ie=yS(T.media,{openId:x.snapshot.openId,...x.snapshot.output?.version===2?{outputVersion:2}:{},pair:{workspaceId:D.workspaceId,agentId:D.agentId},sourceId:S.sourceId,sourceRevision:S.sourceRevision,expectedEditRevision:V.revision,edit:V});if(ie.status!=="saved")return{requestId:M,result:ie.status==="invalid-edit"?"failed":ie.status};const R=IS({...N,clips:N.clips.map(Q=>Q.id===T.id?{...Q,media:ie.media}:Q)})[x.contextItemId],k=n.drafts.updateAttachmentScreen(D,x.contextItemId,R);if(!k)return{requestId:M,result:"stale-source"};u={openId:x.snapshot.openId,media:ie.media,inputRevision:S.revision};try{if(!n.drafts.isCurrentDraft(k))return{requestId:M,result:"stale-source"};await n.drafts.flushDraft(k);const Q=n.drafts.captureDraft();return!l||e(r)?.snapshot.openId!==x.snapshot.openId||!Q||Q.attachmentEpoch!==x.capture.attachmentEpoch||Q.authority!==k.authority||Q.ownerId!==k.ownerId||Q.workspaceId!==k.workspaceId||Q.agentId!==k.agentId||JSON.stringify(Q.attachments.find(ge=>ge.id===x.contextItemId)?.screen)!==JSON.stringify(R)?{requestId:M,result:"stale-source"}:(u=null,{requestId:M,result:"saved",saved:ie.media.saved??void 0})}catch{return{requestId:M,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:b,save:f,remove:P,close(){w(r,null)},restoreFocus(){c?.isConnected&&c.focus()}}}var Ix=q('<p role="alert"> </p>'),Sx=q('<div class="recording-editor-surface svelte-cdb16"><!></div>'),$x=q("<!> <!> <!>",1);function dv(n,r){if(new.target)return un({component:dv,...n});fn(r,!0);let a=Z(r,"capture",7),i=Z(r,"drafts",7),c=Z(r,"disabled",7,!1),l=Z(r,"onRemove",7),h=Z(r,"controllerFactory",7,Qp),u=Z(r,"beforeOpen",7),b=Z(r,"onReviewChange",7);const f=it(()=>h()({drafts:i(),capture:()=>a(),disabled:()=>c(),onRemove:R=>l()(R),beforeOpen:()=>u()?.()??Promise.resolve()}));se(()=>{const R=f.opening,k=f.session;it(()=>b()?.(R,k?.snapshot.output?.ready?{openId:k.snapshot.openId,capture:k.capture}:null))});const P=o(py),S=o(()=>Ei(a())),M=o(()=>e(S)?.clips.map(R=>({id:R.contextItemId,kind:"clip",owner:"evidence",duration:Mp(R.durationMs),recording:!1,url:a()?bf(a().workspaceId,R.path):void 0,...R.media?.saved?{summary:fy(R.media.saved)}:{}}))??[]);let x=me(null);var D={get capture(){return a()},set capture(R){a(R),ee()},get drafts(){return i()},set drafts(R){i(R),ee()},get disabled(){return c()},set disabled(R=!1){c(R),ee()},get onRemove(){return l()},set onRemove(R){l(R),ee()},get controllerFactory(){return h()},set controllerFactory(R=Qp){h(R),ee()},get beforeOpen(){return u()},set beforeOpen(R){u(R),ee()},get onReviewChange(){return b()},set onReviewChange(R){b(R),ee()},$set:gn,$on:(R,k)=>pn(r,R,k)},N=$x(),T=ye(N);{let R=o(()=>c()||f.opening);ES(T,{get items(){return e(M)},get labels(){return e(P)},get disabled(){return e(R)},onEdit:k=>void f.open(k),onMarkUp:k=>void f.open(k),get onRemove(){return f.remove}})}var O=_(T,2);{var V=R=>{var k=Ix(),Q=de(k,!0);L(ge=>j(Q,ge),[()=>g.dock_captureEditor_saveFailed_label()]),p(R,k)};B(O,R=>{f.problem&&R(V)})}var ie=_(O,2);{let R=o(()=>!!f.session),k=o(()=>g.dock_captureEditor_recording_title({duration:f.session?Mp(f.session.snapshot.durationMs??0):""}));P$(ie,{get open(){return e(R)},size:"editor",showCloseButton:!1,get title(){return e(k)},escapeKeydownBehavior:"ignore",dismissOnInteractOutside:!1,onClose:()=>f.close(),onCloseAutoFocus:Q=>{Q.preventDefault(),f.restoreFocus()},get contentRef(){return e(x)},set contentRef(Q){w(x,Q,!0)},children:(Q,ge)=>{var Re=Wt(),he=ye(Re);{var pe=qe=>{var fe=Wt(),oe=ye(fe);xi(oe,()=>f.session.snapshot.openId,Te=>{var J=Sx(),ae=I(J);T$(ae,{get snapshot(){return f.session.snapshot},get shortcutDialog(){return e(x)},onClose:()=>f.close(),get onSave(){return f.save},onDelete:async()=>!!f.session&&f.remove(f.session.contextItemId)}),y(J),p(Te,J)}),p(qe,fe)};B(he,qe=>{f.session&&qe(pe)})}p(Q,Re)},$$slots:{default:!0}})}return p(n,N),vn(D)}const Cl=n=>JSON.stringify([n.authority,n.ownerId,n.workspaceId,n.agentId,n.attachmentEpoch,n.attachments]);function kx(n){let r=me(!1),a=me(!1),i=me(null),c=!1,l=0,h=null,u=null;async function b(S){S.abort.abort(),S.slot?.cancel(),await S.native?.dispose()}async function f(){l++;const S=u;u=null,S&&await b(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(()=>{u&&!u.current()&&f()});return Es(()=>{c=!0,P(),f()}),se(()=>{const S=n.capture(),M=S?Cl(S):"",x=e(r)&&!e(a)&&(n.active()||e(i)?.key===M);it(()=>{if(!x||!S){f();return}if(u?.key===M)return;if(h===M){f();return}f();const N=Ei(S)?.clips.flatMap(Re=>!Re.mediaError&&Re.media?[Re.media]:[])??[],T=N[0],O=F.state.principal.snapshot,V=Dl.select(F.state,S.workspaceId);if(!T||!O||!V||n.drafts.gateActive)return;const ie=_f(),R=new AbortController,k=()=>!c&&!R.signal.aborted&&Pi(F.state)===S.authority&&Dl.select(F.state,S.workspaceId)===V&&wf(ie)&&!!n.capture()&&Cl(n.capture())===M,Q={key:M,capture:S,abort:R,native:null,slot:null,current:k};u=Q;const ge=l;n.drafts.flushDraft(S).then(async Re=>{if(!(u!==Q||ge!==l||!k())){if(!Re){h=M,await f();return}Q.native=Xd({workspaceId:S.workspaceId,agentId:S.agentId,draftId:crypto.randomUUID(),principalId:O.principal.id,media:structuredClone(N)},k,R.signal),Q.slot=vy(Q.native.service),h=M,Q.slot.warm(M,T,k)}}).catch(()=>{u===Q&&f()})})}),{cancel:f,async beforeEditorOpen(){w(a,!0),h=null,await f()},editorState(S,M){w(a,S,!0);const x=M?Cl(M.capture):null;M&&e(i)?.openId!==M.openId&&(h=null),w(i,M&&x?{openId:M.openId,key:x}:null)},take(S,M){const x=u;if(!x?.native||!x.slot||x.key!==Cl(S)||!x.current())return f(),null;u=null,l++;const D=x.native,N=x.slot,T=()=>x.abort.abort();return M.addEventListener("abort",T,{once:!0}),M.aborted&&T(),{service:{...D.service,takePreparedRecording:O=>N.take(x.key,O,()=>!M.aborted&&x.current())},async dispose(){M.removeEventListener("abort",T),await b(x)}}}}}var xx=q('<div role="status" class="px-3 py-1.5 text-xs text-muted-foreground" data-testid="chat-draft-loading-gate"><span> </span></div>');function uv(n,r){if(new.target)return un({component:uv,...n});fn(r,!1);var a={$set:gn,$on:(h,u)=>pn(r,h,u)};Bf();var i=xx(),c=I(i),l=de(c,!0);return y(i),L(h=>j(l,h),[()=>g.chat_draftGate_loading_label()]),p(n,i),vn(a)}var Cx=q('<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 Ld(n,r){if(new.target)return un({component:Ld,...n});fn(r,!1);var a={$set:gn,$on:(h,u)=>pn(r,h,u)};Bf();var i=Cx(),c=_(I(i),2),l=de(c,!0);return dn(2),y(i),L((h,u)=>{ze(i,"aria-label",h),j(l,u)},[()=>g.chat_newMessagesDivider_label(),()=>g.chat_newMessagesDivider_label()]),p(n,i),vn(a)}function Px(n,r){if(!r||n.length===0)return null;const a=n.indexOf(r);return a===-1||a===n.length-1?null:r}function Rx(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 Tx(n,r){return r&&n.includes(r)?r:null}function Jp(n,r,a){return r-n<=a}const Ax=.2;function Yp(n,r,a){const i=Math.max(0,a-r),c=n-Ax*r;return Math.min(Math.max(0,c),i)}function Mx(n,r,a){return n!==null&&a&&n===r}function Ex(n){return n?mw(n)&&_w(n)!==null&&typeof n.metadata?.taskNoteId=="string":!1}function qx(n){const r=[],a=new Set;let i,c;for(const O of n.messages){if(O.agentId&&O.agentId!==n.agentId){i=void 0,c=void 0;continue}if(a.has(O.id))continue;a.add(O.id),n.breakBeforeMessageIds?.has(O.id)&&(i=void 0,c=void 0);const V=qS(O);if(V?.kind!=="turn-failure")c=void 0;else{const ie=i?.seq!==void 0&&O.seq!==void 0&&Number.isSafeInteger(i.seq)&&Number.isSafeInteger(O.seq)&&O.seq===i.seq+1;(!c||!ie)&&(c={key:JSON.stringify([n.agentId,"notice",O.id]),anchorMessageId:O.id,correlation:"unavailable",records:[],recordedFailureCount:0},r.push(c)),c.records.push({messageId:O.id,reason:V.reason,timestamp:O.timestamp}),c.recordedFailureCount+=1}i=O}const l=new Map;for(const O of n.queue){if(!O.requeuedAfterFailure)continue;const V=O.turnId||void 0,ie=JSON.stringify([n.agentId,V?"turn":"queue",V??O.id]);let R=l.get(ie);R||(R={key:ie,correlation:V?"turn":"queue-entry",turnId:V,queueIds:[],state:"queued"},l.set(ie,R)),R.queueIds.includes(O.id)||R.queueIds.push(O.id)}const h=[...l.values()],u=n.session?.id===n.agentId?n.session:void 0,b=u?.status===$i.Error,f=n.transientError||b&&u.stopReason||null,P=b&&!f,S=b&&(!n.transientError||n.transientError===u.stopReason)?u.stopReasonTimestamp:void 0,M=S?Ip(S):null,x=M&&f&&f===u?.stopReason?r.flatMap(O=>O.records).filter(O=>O.reason===f&&Ip(O.timestamp)===M):[],D=x.length===1?x[0].messageId:void 0,T=(u?$f(u):!1)?"attempting":h.length?"queued":f||P?"action-needed":"inactive";return{history:r,queueRecovery:h,current:{state:T,error:f,needsFallbackReason:P,timestamp:S,noticeId:D}}}function Lx(n,r){const a=n.hiddenTail[0]?.id,i=qx({...r,messages:[...n.groups.flatMap(u=>u.messages),...n.hiddenTail],breakBeforeMessageIds:new Set(a?[a]:[])}),c=i.current.noticeId,l=i.history.map(u=>({...u,records:u.records.filter(b=>b.messageId!==c)})).filter(u=>u.records.length>0),h=new Set(l.map(u=>u.records[0].messageId));return{...i,runsByAnchor:new Map(l.map(u=>[u.records[0].messageId,u])),collapsedMessageIds:new Set(i.history.flatMap(u=>u.records.map(b=>b.messageId).filter(b=>!h.has(b))))}}var Hx=q('<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),Ox=q('<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),Fx=q('<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>'),Dx=q('<div class="mb-5"><!></div>'),Nx=q('<p data-testid="agent-welcome-description"> </p> <!>',1),Bx=q("<!> <!>",1),Wx=q('<p class="mb-3 px-4 text-sm text-subtle leading-relaxed whitespace-pre-wrap" data-testid="agent-welcome-description"> </p>'),Ux=q("<!> <span> </span>",1),zx=q('<div class="mx-auto flex w-full max-w-[40rem] flex-1 flex-col px-4 pb-6 pt-4 text-subtle"><!> <!> <!></div>');function gv(n,r){if(new.target)return un({component:gv,...n});fn(r,!0);const a=()=>ue(x,"$userOverrides$",h),i=()=>ue(M,"$specialists$",h),c=()=>ue(O,"$isGitHubAuth$",h),l=()=>ue(V,"$recentSpecialistIds$",h),[h,u]=Ur();let b=Z(r,"onSpecialistChange",7),f=Z(r,"session",7),P=Z(r,"workspaceId",7);const S=Bn(P()??"");se(()=>S.set(P()??""));const M=Vf(S),x=X$();se(()=>{a()});const D=o(()=>{if(!f()||Jy(f()))return null;const W=f().metadata?.specialist||f().agentMetadata?.specialist;return W&&i().find(C=>C.id===W)||null});async function N(W){W?await zl({specialist:W,hash:"specialists"}):await zl({view:"create-specialist"})}let T=me(!1);const O=Z$(),V=dS(),ie=o(()=>ww(ek(i(),c()),l()));let R=me(!1);const k=o(()=>g.chat_regularAgentWelcome_generalDescription_label()),Q=o(()=>e(D)?.name??g.chat_shared_general_fallback()),ge=o(()=>e(D)?.description??g.chat_shared_noSpecializedBehavior_label()),Re=o(()=>e(D)?e(D).defaultBehaviorPrompt||"":e(k));var he={get onSpecialistChange(){return b()},set onSpecialistChange(W){b(W),ee()},get session(){return f()},set session(W){f(W),ee()},get workspaceId(){return P()},set workspaceId(W){P(W),ee()},$set:gn,$on:(W,C)=>pn(r,W,C)},pe=zx(),qe=I(pe);{var fe=W=>{var C=Dx(),re=I(C);gk(re,{class:"block w-full",align:"start",side:"bottom",contentClass:"w-[min(28rem,calc(100vw-2rem))]",get open(){return e(R)},set open(Y){w(R,Y,!0)},trigger:(Y,X)=>{let Ie=()=>(X?.()).props;{let Ne=o(()=>Ud("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"));bt(Y,qi(Ie,{type:"button",variant:"plain",wrapContent:!1,get class(){return e(Ne)},"data-testid":"specialist-picker-trigger",children:(z,Se)=>{var Ce=Hx(),De=ye(Ce),at=I(De);{let Ge=o(()=>e(D)?.id??null),Qe=o(()=>e(D)?.icon??null);uk(at,{agentId:"blank",variant:"emphasized",get specialist(){return e(Ge)},get icon(){return e(Qe)}})}y(De);var Xe=_(De,2),Fe=I(Xe),Pe=de(Fe,!0),G=_(Fe,2),te=de(G,!0);y(Xe);var Oe=_(Xe,2),we=I(Oe);ct(we,{get icon(){return Na},size:10}),y(Oe),L(()=>{j(Pe,e(Q)),j(te,e(ge))}),p(z,Ce)},$$slots:{default:!0}}))}},content:Y=>{var X=Fx(),Ie=I(X),Ne=I(Ie),z=de(Ne,!0),Se=_(Ne,2),Ce=de(Se,!0);y(Ie);var De=_(Ie,2),at=I(De);{let Pe=o(()=>e(D)?.id??null);Y_(at,{get specialists(){return e(ie)},get value(){return e(Pe)},onchange:G=>{w(R,!1),b()?.(G)}})}y(De);var Xe=_(De,2),Fe=I(Xe);Et(Fe,()=>Br,(Pe,G)=>{G(Pe,{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(R,!1),N()},children:(te,Oe)=>{var we=Ox(),Ge=ye(we),Qe=I(Ge);ct(Qe,{get icon(){return L$},size:12}),y(Ge);var dt=_(Ge,2),ft=de(dt,!0);L(lt=>j(ft,lt),[()=>g.chat_regularAgentWelcome_createSpecialist_label()]),p(te,we)},$$slots:{default:!0}})}),y(Xe),y(X),L((Pe,G)=>{j(z,Pe),j(Ce,G)},[()=>g.workspace_createAgentSection_specialists_label(),()=>g.workspace_createAgentSection_specialists_description()]),p(Y,X)},$$slots:{trigger:!0,content:!0}}),y(C),p(W,C)};B(qe,W=>{b()&&W(fe)})}var oe=_(qe,2);{var Te=W=>{var C=Wt(),re=ye(C);{let Me=o(()=>g.chat_specialistSelector_prompt_label());Et(re,()=>fk,(H,Y)=>{Y(H,{class:"mb-3",role:"region",get"aria-label"(){return e(Me)},children:(X,Ie)=>{var Ne=Bx(),z=ye(Ne);Et(z,()=>ov,(Ce,De)=>{De(Ce,{children:(at,Xe)=>{var Fe=Wt(),Pe=ye(Fe);Et(Pe,()=>iv,(G,te)=>{te(G,{class:"type-caption font-medium",children:(Oe,we)=>{dn();var Ge=ln();L(Qe=>j(Ge,Qe),[()=>g.chat_specialistSelector_prompt_label()]),p(Oe,Ge)},$$slots:{default:!0}})}),p(at,Fe)},$$slots:{default:!0}})});var Se=_(z,2);Et(Se,()=>pk,(Ce,De)=>{De(Ce,{children:(at,Xe)=>{var Fe=Nx(),Pe=ye(Fe),G=de(Pe,!0),te=_(Pe,2);bt(te,{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:(Oe,we)=>{dn();var Ge=ln();L(Qe=>j(Ge,Qe),[()=>e(T)?g.chat_regularAgentWelcome_showLess_label():g.chat_regularAgentWelcome_showMore_label()]),p(Oe,Ge)},$$slots:{default:!0}}),L(()=>{ke(Pe,1,`text-sm text-subtle leading-relaxed whitespace-pre-wrap break-words ${e(T)?"":"line-clamp-6"}`),j(G,e(Re))}),p(at,Fe)},$$slots:{default:!0}})}),p(X,Ne)},$$slots:{default:!0}})})}p(W,C)},J=W=>{var C=Wx(),re=de(C,!0);L(()=>j(re,e(Re))),p(W,C)};B(oe,W=>{e(D)?W(Te):W(J,-1)})}var ae=_(oe,2);{var Ae=W=>{bt(W,{variant:"ghost-light",size:"sm",onclick:()=>N(e(D).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:(C,re)=>{var Me=Ux(),H=ye(Me);ct(H,{get icon(){return q$},size:12,class:"opacity-60"});var Y=_(H,2),X=de(Y,!0);L(Ie=>j(X,Ie),[()=>g.chat_regularAgentWelcome_customize_label()]),p(C,Me)},$$slots:{default:!0}})};B(ae,W=>{e(D)&&W(Ae)})}y(pe),p(n,pe);var He=vn(he);return u(),He}var jx=q('<a class="cursor-pointer underline underline-offset-2 hover:opacity-80" data-suggested-prompt-link=""> </a>'),Gx=q('<kbd data-suggested-prompt-hint=""> </kbd>'),Vx=q('<span class="type-caption"> </span>'),Kx=q('<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>'),Qx=q('<div class="flex flex-col" data-testid="suggested-prompts-surface"><!></div>');function Zd(n,r){if(new.target)return un({component:Zd,...n});fn(r,!0);let a=Z(r,"prompts",7),i=Z(r,"onSelect",7),c=Z(r,"onEdit",7),l=Z(r,"compact",7,!1),h=Z(r,"showShortcutHints",7,!1),u=Z(r,"reserveShortcutHintSpace",7,!1),b=Z(r,"workspaceId",7);const P=typeof navigator<"u"&&navigator.platform.toUpperCase().includes("MAC")?"⌃":"Alt+",S=u$.replace("text-ui","type-caption");function M(k){i()(k)}function x(k,Q){k.key!=="Enter"&&k.key!==" "||(k.preventDefault(),M(Q))}function D(k,Q){k.preventDefault(),k.stopPropagation(),Ed(Q,{workspaceId:b(),event:k})}function N(k,Q){(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),k.stopPropagation(),Ed(Q,{workspaceId:b(),event:k}))}function T(k){return k<3}var O={get prompts(){return a()},set prompts(k){a(k),ee()},get onSelect(){return i()},set onSelect(k){i(k),ee()},get onEdit(){return c()},set onEdit(k){c(k),ee()},get compact(){return l()},set compact(k=!1){l(k),ee()},get showShortcutHints(){return h()},set showShortcutHints(k=!1){h(k),ee()},get reserveShortcutHintSpace(){return u()},set reserveShortcutHintSpace(k=!1){u(k),ee()},get workspaceId(){return b()},set workspaceId(k){b(k),ee()},$set:gn,$on:(k,Q)=>pn(r,k,Q)},V=Wt(),ie=ye(V);{var R=k=>{var Q=Qx(),ge=I(Q);{const Re=(pe,qe)=>{let fe=()=>(qe?.()).item,oe=()=>(qe?.()).index;const Te=o(()=>ty(fe())),J=o(()=>e(Te)[0]?.type==="text"?e(Te)[0].content:"");var ae=Kx(),Ae=I(ae),He=I(Ae);ct(He,{get icon(){return Wf},size:16,get class(){return ur}}),y(Ae);var W=_(Ae,2),C=I(W),re=de(C,!0),Me=_(C);Dn(Me,17,()=>e(Te).slice(e(J)?1:0),K_,(z,Se)=>{var Ce=Wt(),De=ye(Ce);{var at=Fe=>{const Pe=o(()=>ey(e(Se).url));var G=jx(),te=de(G,!0);L(()=>{ze(G,"href",e(Pe)),ze(G,"title",e(Pe)),j(te,e(Se).label)}),ps("click",G,Oe=>D(Oe,e(Pe))),ps("keydown",G,Oe=>N(Oe,e(Pe))),p(Fe,G)},Xe=Fe=>{var Pe=ln();L(()=>j(Pe,e(Se).content)),p(Fe,Pe)};B(De,Fe=>{e(Se).type==="link"?Fe(at):Fe(Xe,-1)})}p(z,Ce)}),y(W);var H=_(W,2);{var Y=z=>{var Se=Gx();let Ce;var De=de(Se);L(()=>{Ce=ke(Se,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:!h()}),ze(Se,"aria-hidden",h()?void 0:"true"),ze(Se,"data-hint-visible",h()),j(De,`${P}${oe()+1}`)}),p(z,Se)},X=o(()=>T(oe())&&(h()||u()));B(H,z=>{e(X)&&z(Y)})}var Ie=_(H,2);{var Ne=z=>{E$(z,{side:"top",delayDuration:300,trigger:De=>{{let at=o(()=>g.chat_suggestedPrompts_editInInput_ariaLabel());bt(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:Xe=>{Xe.stopPropagation(),c()(fe())},get"aria-label"(){return e(at)},children:(Xe,Fe)=>{ct(Xe,{get icon(){return H$},size:"xs"})},$$slots:{default:!0}})}},content:De=>{var at=Vx(),Xe=de(at,!0);L(Fe=>j(Xe,Fe),[()=>g.chat_suggestedPrompts_edit_tooltip()]),p(De,at)},$$slots:{trigger:!0,content:!0}})};B(Ie,z=>{c()&&z(Ne)})}y(ae),L(z=>{ke(ae,1,`${Nf} ${d$} 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`),ke(Ae,1,`${Bl??""} mt-px self-start`),ze(C,"aria-label",z),j(re,e(J))},[()=>Zb(fe())]),ps("click",C,z=>{z.stopPropagation(),M(fe())}),ps("keydown",C,z=>x(z,fe())),p(pe,ae)};let he=o(()=>l()?"[&>div>div:last-child]:gap-0":"[&>div>div:last-child]:gap-0.5");R$(ge,{get items(){return a()},virtualize:!1,onActivate:M,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:Re,$$slots:{row:!0}})}y(Q),Nt(1,Q,()=>ma,()=>({tier:"fast",y:0,scale:1})),Nt(2,Q,()=>to,()=>({tier:"fast"})),p(k,Q)};B(ie,k=>{a().length>0&&k(R)})}return p(n,V),vn(O)}Wd(["click","keydown"]);var Jx=q('<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 pv(n,r){if(new.target)return un({component:pv,...n});fn(r,!0);let a=Z(r,"onSelect",7),i=Z(r,"compact",7,!1);const c=o(()=>[{label:g.chat_chiefEmptyState_assignedPrs_label(),prompt:g.chat_chiefEmptyState_assignedPrs_prompt()},{label:g.chat_chiefEmptyState_staleWorkspaces_label(),prompt:g.chat_chiefEmptyState_staleWorkspaces_prompt()},{label:g.chat_chiefEmptyState_agentPerformance_label(),prompt:g.chat_chiefEmptyState_agentPerformance_prompt()},{label:g.chat_chiefEmptyState_morningBrief_label(),prompt:g.chat_chiefEmptyState_morningBrief_prompt()},{label:g.chat_chiefEmptyState_randomTheme_label(),prompt:g.chat_chiefEmptyState_randomTheme_prompt()}]),l=o(()=>e(c).map(M=>M.label));function h(M){const x=e(c).find(D=>D.label===M);x&&a()(x.prompt)}var u={get onSelect(){return a()},set onSelect(M){a(M),ee()},get compact(){return i()},set compact(M=!1){i(M),ee()},$set:gn,$on:(M,x)=>pn(r,M,x)},b=Jx(),f=I(b),P=de(f,!0),S=_(f,2);return Zd(S,{get prompts(){return e(l)},onSelect:h,get compact(){return i()}}),y(b),L(M=>j(P,M),[()=>g.chat_chiefEmptyState_intro_label()]),p(n,b),vn(u)}const eu=2e3,Yx=4e3,Xx=Yx-eu-2;function Zx(n,r=eu){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 h=(l.contentBlocks??[]).filter(b=>b.type==="text").map(b=>b.text||b.content||"").join(""),u=(l.role==="assistant"?X_(h).cleanedContent:h).trim();u&&(a.unshift({role:l.role,text:u}),i+=u.length)}return a}function e1(n,r){const a=n.map(l=>`${l.role==="user"?"User":"Assistant"}: ${l.text}`).join(`
|
|
1
|
+
var U_=Object.defineProperty;var Dg=n=>{throw TypeError(n)};var z_=(n,r,a)=>r in n?U_(n,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):n[r]=a;var Js=(n,r,a)=>z_(n,typeof r!="symbol"?r+"":r,a),j_=(n,r,a)=>r.has(n)||Dg("Cannot "+a);var To=(n,r,a)=>(j_(n,r,"read from private field"),a?a.call(n):r.get(n)),Ng=(n,r,a)=>r.has(n)?Dg("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(n):r.set(n,a);import{t as un,bo as Z,bw as gn,bp as gf,b as pn,bm as g,bq as Ur,bs as ue,br as qi}from"./C0QTy0Sy.js";import{bs as fn,a5 as I,bf as fs,bA as y,W as p,bn as vn,aA as ee,aB as q,ca as se,a7 as Wt,ay as ye,aD as e,cd as Bn,c9 as o,bS as _,bl as de,be as dn,b_ as L,bO as j,c5 as it,bH as w,bV as me,bj as Es,bk as ro,b$ as ln,ai as Wd,aj as ps,bo as jl,br as Mr,c0 as Dt,ak as G_,cb as sd,aw as wi,a as V_}from"./3SdAC2_C.js";import{i as B}from"./bhKPSdq4.js";import{k as xi}from"./-K3ARgq0.js";import{g as Dn,i as K_,I as eo,p as Lo,e as Eo}from"./B6S6VNu7.js";import{n as Nt,l as ma,c as to,j as Bg,k as Fo,h as Q_}from"./DLwWVKiF.js";import{b as pf,e as Ud,f as ke,s as ze,c as zt,g as gs}from"./7UPrdiE9.js";import{b as J_}from"./goTpbPhD.js";import{b as wr}from"./Dn334wJv.js";import{m as Y_,U as X_,Z as Z_,X as ew,Y as tw,I as Wg,o as nw,l as rw,a2 as aw,x as Ug,$ as sw,a0 as zg,r as ow,s as iw}from"./B1Gvj9xq.js";import{Jv as F,fo as lw,eW as cw,f3 as dw,eX as uw,f1 as gw,f0 as pw,eZ as fw,e$ as vw,eY as hw,ru as mw,c6 as _w,i as $i,J4 as ww,Dc as ff,Dh as bw,Dj as jg,Dg as yw,Di as Iw,vD as Sw,vF as $w,Cp as vf,cp as kw,cn as xw,By as Cw,bE as Pw,A3 as Rw,Ce as od,u$ as Tw,cq as Gg,dB as Aw,dC as Mw,Co as Ew,el as qw,CI as Lw,CH as Hw,CM as Ow,CL as Fw,cQ as Dw,cT as Nw,nC as Bw,er as Ww,wR as Uw,CN as zw,wT as jw,CO as Gw,cU as Vw,cV as Kw,nK as Qw,Ah as Jw,Iq as Yw,Ag as Xw,Dt as Zw,wm as eb,wn as tb,y$ as nb,z3 as id,wi as rb,wj as ab,rS as sb,rf as ob,rd as ib,f_ as lb,HO as cb,Lj as db,GM as ub,gn as gb,p2 as pb,Jj as fb,oj as vb,A2 as hb,ft as Vg,r2 as Kg,fm as mb,fl as _b,tB as wb,g3 as Qg,re as bb,fe as yb,C9 as Ib,m as Sb,nL as $b,zH as kb,yZ as xb,Ez as Cb,Eo as Jg,xh as Pb,xi as Yg,u_ as Xg,p3 as Rb,DF as Tb,gj as Ab,g1 as Mb,eU as Eb,cM as qb,A6 as Lb,Lo as Hb,Cu as Ob,LG as Fb,y2 as Db,ga as Nb,fd as Bb,cL as Wb,cI as Ub,cH as zb,vr as jb,xo as Gb,xm as Vb,cF as Kb,cE as Qb,z5 as Jb,z0 as Yb,xn as Xb}from"./tr-2J8Mf.js";import{a as zd}from"./CC7to1B5.js";import{aM as Zb,aL as ey,bg as ty,a7 as ny,aD as ry,aO as ay,M as hf,a0 as mf,b8 as sy,b2 as oy,as as Zg,P as bl,b0 as ep,a$ as tp,a_ as np}from"./CfdQaRg7.js";import{l as _f,G as iy,I as Pd,at as ly,b1 as El,a9 as wf,S as cy,aW as ld,aq as dy,aJ as uy,C as gy,z as bf,s as py,A as fy,v as vy,a$ as hy,aH as yf,aG as If,aI as my,j as rp,aM as cd,aT as ap,aS as yl,aU as sp,Q as op,d as _y,e as wy,ax as by,V as ip,aE as yy,c as Iy,m as Sy,aV as lp,ap as $y,aw as cp,a as ky,aA as xy,ad as dp,aD as Cy,aX as up,a_ as gp,n as pp,ae as Py,R as Ry,ay as fp,am as Ty,O as Ay,as as My,h as Ey,q as qy,$ as dd,_ as Ly,aC as vp,a8 as Hy,f as Oy,i as Fy,a6 as Dy,ac as Ny}from"./C_-1gUwp.js";import{f as By,o as Wy,E as Uy,C as zy,m as jy,a2 as hp,aa as Gy,K as Vy,e as Ky,y as Qy}from"./C6mS8uZB.js";import{g as Pi}from"./DypB-Dwi.js";import{dW as Dl,cU as Sf,O as $f,W as Jy,bv as Yy,aF as kf,dH as xf,aU as qo,e8 as Xy,dw as Cf,aw as jd,dV as Gd,aN as Pf,cP as Zy,V as ha,a3 as Xs,B as eI,a7 as tI,a4 as nI,M as rI,a6 as aI,ar as sI,aG as Rf,aO as ql,b6 as oI,ay as Tf,r as iI,n as Rd,H as lI,dY as cI,aQ as dI,aK as uI,c9 as gI,aW as pI,bM as fI,bK as vI,bL as hI,c8 as mI,c7 as _I,cN as wI,cM as bI,aS as yI,bb as II,bd as SI,bg as $I,bc as kI,bl as xI,bf as CI,be as PI,bh as RI,bi as TI,bk as AI,bj as MI,ax as EI,cj as qI,ck as LI,dv as HI,du as OI,a$ as FI,G as DI,b3 as NI,cf as BI,C as mp,d0 as WI,ba as ds,b$ as UI,X as zI,bq as jI,E as GI,ad as VI,t as KI,cW as QI,d3 as _p,Q as wp,dt as JI,cQ as ud}from"./BaujsV9k.js";import{u as Af,a as Il,ag as YI,x as XI,ad as Mf,af as ZI,ac as Ef,a4 as eS,F as bp,D as tS,e as nS,n as rS,s as aS,m as sS,Y as oS,k as iS}from"./pf1qexdH.js";import{a2 as lS,b5 as cS,cM as dS,a_ as uS,b4 as gS,c2 as pS,c9 as fS,w as vS,x as hS,cd as mS}from"./CzXkTVR8.js";import{n as _S,P as qf,F as wS,ai as bS,r as yS,ac as IS}from"./DX-Wrapd.js";import{I as SS,s as $S,H as yp}from"./Bqd7fdCF.js";import{e as kS}from"./CL3a4Hm1.js";import{e as xS,f as CS}from"./haN7a3Sc.js";import{s as PS,o as Zs,b as RS,g as Nl,d as TS,l as bi}from"./CIyUrgF0.js";import{a5 as AS,a7 as MS,D as ES,N as qS,ac as Ip,X as LS,i as HS,r as dr,v as Ri,u as na,p as ki,x as br,S as Vd,m as Gl,s as Ho,y as Ti,o as ao,n as so,t as Sp,aa as oo,w as io,a9 as Kd,q as _a,z as Oo,J as Td,_ as $p,g as OS,F as FS,U as Lf,I as Hf,a8 as Of,a6 as Ll,O as DS,E as Ff,V as NS,A as BS,b as WS,ab as US,ad as Sl,G as zS,e as gd,l as jS,C as GS,f as Ys,j as kp,H as us,Q as VS,d as $l,c as KS,a as xp,h as QS,L as JS,Y as Cp,a4 as pd,a1 as Pp,a0 as YS,a3 as Rp,$ as Tp,T as XS,B as ZS,k as e$,a2 as t$,K as n$,R as r$,P as a$,W as s$}from"./CslzdKY2.js";import{m as o$}from"./Dms_DO28.js";import{g as Df}from"./DA5opfEp.js";import{b as i$}from"./EK6zOAHM.js";import{g as l$}from"./PIgqsYsQ.js";import{a as c$}from"./C4QKwtCH.js";import{q as Nf,d as ur,r as d$,e as Bl,j as u$,g as Ad,i as g$,f as Md,c as p$,A as f$,O as Ap,k as v$}from"./BB7BFhCP.js";import{P as h$}from"./D_Xpj-6r.js";import{e as m$}from"./DB7RVYiL.js";import{b as _$,a as w$,g as b$,c as y$,i as I$}from"./DrxfcnSy.js";import{R as S$,g as $$,W as kl,c as k$}from"./DKYFDagY.js";import"./A9niI_uA.js";import"./CJ4Z96pe.js";import{t as Ai}from"./CrD0jtXE.js";import{F as x$,h as C$}from"./DCRuihKm.js";import"./lJeex2Gh.js";import{C as P$,e as Br,L as R$,l as Vl,d as Kl,K as Ql,h as Qd,M as Jl,S as Da}from"./fiz8N_zQ.js";import{D as T$}from"./518Fef2L.js";import{f as Mp}from"./chjnSxvZ.js";import"./DU3vNstz.js";import{i as Bf}from"./BjLb7AHW.js";import{h as Ep,i as qp,g as Lp,P as Hp,C as A$,m as Hl,R as M$}from"./BmTMWrby.js";import{f as bt,ae as E$}from"./FzlZUztb.js";import{F as ct,bs as q$,cd as L$,aw as Na,a2 as Wf,c9 as H$,bf as O$,be as F$,bg as D$,aO as Op,aj as fd,aB as vd,bB as Uf,d3 as Wl,cF as N$,aM as Fp,cb as Dp,cK as Ul,bu as B$,aS as W$,d0 as U$,a8 as zf,ac as z$,ag as j$,cr as G$,ba as V$,aC as jf,cT as Np,cz as K$,ax as Q$,cD as J$,c3 as Y$}from"./U9jJmfYa.js";import{c as Gf}from"./ChTqQfQN.js";import"./B4SiDSWP.js";import{c as Et}from"./CUkDMZwP.js";import{a5 as Vf,bg as X$,ar as Z$,k as ek,Y as tk,W as nk,a2 as rk,Z as ak,bw as sk,V as ok,a1 as ik,ah as lk}from"./BCo0L43p.js";import{d as zl,f as ck,e as dk}from"./B4rcpoVl.js";import{A as uk}from"./wl2qP2wF.js";import{D as gk}from"./Cqa6LF3b.js";import"./QeBH-DWE.js";import{a as pk,C as fk}from"./CCqqosml.js";import"./Bsh6nUhU.js";import{C as vk}from"./c5QZsH9t.js";import{h as Ed,r as hk,a as mk}from"./BZskJqHK.js";import{s as _k}from"./D37getya.js";import{I as wk,a as Kf}from"./BAKPnd3w.js";import{L as bk}from"./DsGUBv3k.js";import{g as yk,f as Ik,b as Sk}from"./DKHY8q_S.js";import{s as Mi,g as Yn,i as $k,j as kk,e as Bp,r as Wp,f as xk,d as Ck,a as hd,h as Pk}from"./DqRH8mOo.js";import{i as Up,a as Rk}from"./Bu13V5mO.js";import{seekConversationToMessage as zp}from"./CgLuwxkV.js";import{l as Jt,o as md,h as Jd,n as qd,q as Tk}from"./CE7dsja4.js";import{o as Ak}from"./BDgY7Zd8.js";import{A as Qf}from"./KYuLFpkq.js";import{b as Jf}from"./BYq9VtBF.js";import{g as Mk,e as Yf,v as Ek,f as qk,N as Lk,M as Hk,K as Ok,k as Xf,l as Fk,H as Zf,s as ev}from"./B2nCyo89.js";import{selectCurrentWorkspaceTabId as _d}from"./S845NCb3.js";import{o as Dk}from"./a6nBCKTJ.js";import{d as Nk}from"./B0Z-1lwJ.js";import{P as Bk}from"./Ctbo6mXV.js";import{g as Wk}from"./CpxEaO9r.js";import{H as tv,M as Uk,y as zk,J as jk,g as Gk,i as Vk,u as Kk,e as nv,c as rv,d as Qk}from"./eElW3aeh.js";import{c as Jk,h as Yd,f as av,Q as Yk}from"./DCK8dPAL.js";import{t as Xk}from"./DAsc1V4f.js";import{s as Zk}from"./BsieX9dN.js";import{i as sv}from"./BcpfdNy8.js";import{d as ex,i as tx,r as nx}from"./L_tYoUCb.js";import{g as rx}from"./yFcbscNn.js";var ax=new Set(["$$slots","$$events","$$legacy","ref","class","children"]),sx=q("<div><!></div>");function ov(n,r){if(new.target)return un({component:ov,...n});fn(r,!0);let a=Z(r,"ref",15,null),i=Z(r,"class",7),c=Z(r,"children",7),l=gf(r,ax);var h={get ref(){return a()},set ref(f=null){a(f),ee()},get class(){return i()},set class(f){i(f),ee()},get children(){return c()},set children(f){c(f),ee()},$set:gn,$on:(f,P)=>pn(r,f,P)},u=sx();pf(u,f=>({"data-slot":"card-header",class:f,...l}),[()=>Ud("@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]",vk,i())]);var b=I(u);return Ai(b,()=>c()??fs),y(u),wr(u,f=>a(f),()=>a()),p(n,u),vn(h)}var ox=new Set(["$$slots","$$events","$$legacy","ref","class","children"]),ix=q("<div><!></div>");function iv(n,r){if(new.target)return un({component:iv,...n});fn(r,!0);let a=Z(r,"ref",15,null),i=Z(r,"class",7),c=Z(r,"children",7),l=gf(r,ox);var h={get ref(){return a()},set ref(f=null){a(f),ee()},get class(){return i()},set class(f){i(f),ee()},get children(){return c()},set children(f){c(f),ee()},$set:gn,$on:(f,P)=>pn(r,f,P)},u=ix();pf(u,f=>({"data-slot":"card-title",class:f,...l}),[()=>Ud("type-title min-w-0 break-words font-semibold leading-tight text-foreground",i())]);var b=I(u);return Ai(b,()=>c()??fs),y(u),wr(u,f=>a(f),()=>a()),p(n,u),vn(h)}const xl=SS.CHAT_MEDIA,wd=PS().min(1).max(512);Zs({workspaceId:wd,agentId:wd,draftId:Nl(),principalId:wd,media:RS(_S).min(1).max(20)}).strict();const lx=Zs({sessionId:Nl()}).strict();lx.extend({control:TS("action",[Zs({action:bi("readiness")}).strict(),Zs({action:bi("export"),request:xS}).strict(),Zs({action:bi("transcribe"),request:CS}).strict(),Zs({action:bi("release"),jobId:Nl()}).strict(),Zs({action:bi("adopt"),jobId:Nl()}).strict()])}).strict();function Xd(n,r,a,i=async(c,l)=>typeof window>"u"||$S(window)!=="electron"?{ok:!1,error:"unavailable"}:kS().invoke(c,l)){let c=null,l=null,h=!1;async function u(){h=!0,a.removeEventListener("abort",b);const x=c;c=null,x&&await i(xl.CLOSE,{sessionId:x}).catch(()=>{})}const b=()=>{u()};a.addEventListener("abort",b,{once:!0});const f=()=>{if(h||a.aborted||!r())throw new Error("media-send-retired")};async function P(){if(f(),c)return c;if(l)return l;l=(async()=>{const x=await i(xl.BEGIN,n);if(!x.ok)throw new Error("media-export-unavailable");c=x.value.sessionId;try{return f(),c}catch(D){throw await u(),D}})();try{return await l}finally{l=null}}async function S(x){const D=await P();f();const N=await i(xl.CONTROL,{sessionId:D,control:x});return f(),N}return{service:{exportMedia:x=>S({action:"export",request:x}),adoptMediaJob:x=>S({action:"adopt",jobId:x}),transcribeMedia:x=>S({action:"transcribe",request:x}),releaseMediaJob:async x=>c?await i(xl.CONTROL,{sessionId:c,control:{action:"release",jobId:x}}):{ok:!0,value:void 0}},dispose:u,readiness:()=>S({action:"readiness"})}}const bd=new Set;async function cx(n){const{drafts:r,signal:a}=n,i=structuredClone(n.capture),c=structuredClone(n.items),l=structuredClone(n.payload),{workspaceId:h,agentId:u}=i,b=Pi(F.state),f=Dl.select(F.state,h),P=Sf.select(F.state),S=_f(),M=JSON.stringify([b,h,u]);if(!b||!f||!P||l.wsId!==h||bd.has(M))return!1;bd.add(M);const x=new AbortController,D=()=>x.abort();a.addEventListener("abort",D,{once:!0});const N=()=>!a.aborted&&!x.signal.aborted&&Pi(F.state)===b&&Dl.select(F.state,h)===f&&wf(S)&&r.isCurrentDraft(i),T=F.getReadableState().subscribe(()=>{N()||x.abort()});let O=null;try{if(!N()||lS(c))return!1;const V=Af(i.attachments),ie=qf(wS(h,u),V,c.map(pe=>({contextItemId:pe.id,attachmentId:pe.attachmentId,path:pe.path}))),R=new Set([...ie.images,...ie.clips].map(pe=>pe.contextItemId));if(V.some(([pe])=>!R.has(pe))||ie.images.some(pe=>pe.mediaError)||ie.clips.some(pe=>pe.mediaError)||!bS(l.text,ie))throw new Error("invalid-evidence");if(O=n.warm?.take(i,x.signal)??null,!await r.flushDraft(i)||!N())return!1;const k=await By.agents.get(u,h);if(!N())return!1;if(!k||k.workspaceId!==h||k.retiredAt||k.pendingDeleteAt||k.status==="deleted")throw new Error("unavailable");const Q=ie.clips.flatMap(pe=>pe.media?[pe.media]:[]);Q.length&&!O&&(O=Xd({workspaceId:h,agentId:u,draftId:crypto.randomUUID(),principalId:P.principal.id,media:Q},N,x.signal));const ge=iy(c,ie),Re=Pd(ge),he=await ly({workspaceId:h,agentId:u,evidence:ie,clickedItems:c,sendItems:ge,clickedPayload:{...l,contextItems:ge,imageBlocks:Re.imageBlocks,fileBlocks:Re.fileBlocks},binding:S,service:O?.service??null,current:N,onRecord:()=>{}});return!he||!N()?!1:El(F,u,he)}catch{return N()&&F.dispatch(lw(u,g.dock_conversation_sendFailed_error())),!1}finally{T(),a.removeEventListener("abort",D),await O?.dispose(),bd.delete(M)}}const lv=1e4,jp={wasBusy:!1,busySince:null,preempted:!1,prediction:null};function Gp(n){return AS(n.messageMetadata)}function dx(n,r){if(n.some(Gp)){const a=n[0];return a&&!Gp(a)&&Vp(a,r)?[a.id]:[]}return n.filter(a=>Vp(a,r)).map(a=>a.id)}function ux(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 Vp(n,r){return!n.requeuedAfterFailure&&MS(n,r)}function gx(n,r){const{busy:a,queue:i,delivered:c,now:l}=r,h=r.blocked||r.interrupted,u=r.timeoutMs??lv;let b=n.prediction;if(b){const x=new Set(i.map(O=>O.id)),D=b.ids.filter(O=>x.has(O)&&!c.has(O)),N=l-b.startedAt>=u,T=n.wasBusy&&!a;!D.length||N||h&&!a||T?b=null:D.length!==b.ids.length&&(b={...b,ids:D})}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(!b&&f&&!h&&!S){const x=dx(i,l).filter(D=>!c.has(D));x.length&&(b={ids:x,startedAt:l})}const M={wasBusy:a,busySince:a?P:null,preempted:a&&S,prediction:b};return n.wasBusy===M.wasBusy&&n.busySince===M.busySince&&n.preempted===M.preempted&&n.prediction===M.prediction?n:M}class px{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(h=>{c=setTimeout(()=>h(!0),i)})]);if(clearTimeout(c),l)return!1}return!0}}function fx(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 Kp(n){const r=typeof n=="string"?n:n&&typeof n=="object"&&typeof n.script=="string"?n.script:void 0;return r||void 0}var vx=q('<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 cv(n,r){if(new.target)return un({component:cv,...n});fn(r,!0);const a=()=>ue(P,"$typing$",i),[i,c]=Ur();let l=Z(r,"workspaceId",7),h=Z(r,"agentId",7),u=Z(r,"class",7,"");const b=Bn(""),f=Bn("");se(()=>{b.set(l())}),se(()=>{f.set(h())});const P=cS(b,f),S=o(()=>m$(a()));var M={get workspaceId(){return l()},set workspaceId(O){l(O),ee()},get agentId(){return h()},set agentId(O){h(O),ee()},get class(){return u()},set class(O=""){u(O),ee()},$set:gn,$on:(O,V)=>pn(r,O,V)},x=Wt(),D=ye(x);{var N=O=>{var V=vx(),ie=I(V),R=I(ie);h$(R,{get people(){return a()},size:12,decorative:!0}),y(ie);var k=_(ie,2),Q=de(k,!0);dn(2),y(V),L(()=>{ke(V,1,`${Nf} 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 ${u()??""} /* a11y-ignore: user-requested compact typing status in the composer gap */`,"svelte-lm4khl"),j(Q,e(S))}),p(O,V)};B(D,O=>{e(S)&&O(N)})}p(n,x);var T=vn(M);return c(),T}const hx=50,mx=5e3,_x=500,wx=()=>({authority:()=>Pi(F.state),persistSnapshot:dy,dispatch:n=>F.dispatch(n),ownerView:n=>uy.withStore(F)(n)});function bx(n){const r=n.store??wx(),a=crypto.randomUUID();let i=me(!1),c=me(!1),l=me(!1),h=null,u=null,b=0,f=!1,P=null,S=null,M=null,x=0,D=null,N=null;const T={};let O,V=me([]),ie=null,R=0,k="",Q=0,ge="";const Re=()=>{const W=n.workspaceId(),C=n.agentId();if(!W||!C||!(n.active?.()??!0))return null;const re=r.authority?.();if(!re||f)return null;const Me=n.inputValue(),H=pe(),Y=O?.shared,X=Y?.workspaceId===W&&Y.agentId===C?Y.lifetime:null,Ie=JSON.stringify([re,W,C,x,X,H.map(z=>[z.id,z.attachmentId,z.path])]);Ie!==ge&&(ge=Ie,Q+=1);const Ne=JSON.stringify([re,W,C,Me,H,x]);return Ne!==k&&(k=Ne,R+=1),{authority:re,ownerId:a,workspaceId:W,agentId:C,text:Me,attachments:JSON.parse(JSON.stringify(H)),generation:R,attachmentEpoch:Q}};let he=null;const pe=()=>YI(n.contextItems(),XI(n.contextItems(),e(V))),qe=W=>{if(O=W,!W||f)return;const C=W.restore;if(N&&C?.requestId===N.requestId&&C.status!=="pending"){const{apply:H}=N;N=null,w(c,!1),C.status==="restored"&&w(V,C.draft?.attachments??[]),H(C)}const re=W.shared;if(re&&!e(c)&&u===`${re.workspaceId}\0${re.agentId}`){const H=JSON.stringify([re.provenance,re.workspaceId,re.agentId,re.lifetime,re.revision]);if(ie!==H){ie=H;const Y=he??h,X=Y&&n.inputValue()===Y.text&&JSON.stringify(pe())===Y.attachmentsJson;re.origin===a?he={text:re.snapshot.text,attachmentsJson:JSON.stringify(re.snapshot.attachments)}:X&&(b+=1,M&&clearTimeout(M),w(V,re.snapshot.attachments),he=h={text:re.snapshot.text,attachmentsJson:JSON.stringify(e(V))},n.setInputValue(re.snapshot.text),n.setContextItems(Il(e(V))),n.applyEditorContent(re.snapshot.text))}}it(Re);const Me=[];for(const H of W.saves){if(H.status==="pending")continue;Me.push(H.id);const Y=T[H.id];delete T[H.id],Y?.(H)}Me.length>0&&queueMicrotask(()=>r.dispatch(gw(a,Me)))},fe=(W,C,re)=>{const Me=crypto.randomUUID();N={requestId:Me,apply:re},w(c,!0),r.dispatch(fw(a,Me,W,C))},oe=()=>{N&&(N=null,w(c,!1),r.dispatch(hw(a)))},Te=()=>{const W=D;W&&(D=null,r.dispatch(vw(a)),O?.saves.some(C=>C.id===W)||delete T[W])};r.dispatch(cw(a));const J=r.ownerView(a).subscribe(W=>it(()=>qe(W))),ae=()=>{S&&(clearTimeout(S),S=null),w(l,!1)},Ae=()=>{D&&(D=null,r.dispatch(pw(a)))};se(()=>{const W=n.active?.()??!0,C=n.workspaceId(),re=n.agentId();if(!W){it(()=>{b+=1,u=null,oe(),P&&clearTimeout(P),P=null,ae(),M&&clearTimeout(M),M=null,w(i,!1),Ae()});return}if(!C||!re)return;const Me=`${C}\0${re}`;if(u===Me)return;const H=u!==null;u=Me;const Y=++b;it(()=>{h=null,he=null,ie=null,w(V,[]),P&&clearTimeout(P),ae(),M&&(clearTimeout(M),M=null),H&&(Ae(),n.setInputValue(""),n.contextItemsAreScoped||n.setContextItems([]),n.applyEditorContent(""));const X=cy(C,re);if(X){w(V,X.attachments),w(i,!1);const Ne=n.contextItems().length>0,z=X.text,Se=JSON.stringify(X.attachments);n.setInputValue(X.text),Ne||n.setContextItems(Il(X.attachments)),n.applyEditorContent(X.text),h={text:X.text,attachmentsJson:Se},fe(C,re,Ce=>{if(Ce.status!=="restored")return;const De=Ce.draft;if(f||!(n.active?.()??!0)||u!==Me||b!==Y)return;const at=De?.text??"",Xe=De?.attachments??[],Fe=JSON.stringify(Xe);ld(C,re,{text:at,attachments:Xe});const Pe=n.inputValue()===z&&JSON.stringify(pe())===Se;Ne||!Pe||(at!==z&&(n.setInputValue(at),n.applyEditorContent(at)),Fe!==Se&&n.setContextItems(Il(Xe)),h={text:at,attachmentsJson:Fe})});return}w(i,!0),S=setTimeout(()=>{S=null,(n.active?.()??!0)&&w(l,!0)},_x),P=setTimeout(()=>{(n.active?.()??!0)&&(w(i,!1),ae())},mx);const Ie=()=>{!(n.active?.()??!0)||u!==Me||b!==Y||(P&&clearTimeout(P),w(i,!1),ae())};fe(C,re,Ne=>{if(Ne.status!=="restored"){Ie();return}const z=Ne.draft;if(f||!(n.active?.()??!0)||u!==Me||b!==Y)return;const Se=!!n.inputValue();if(!Se&&z?.attachments?.length&&n.contextItems().length===0&&n.setContextItems(Il(z.attachments)),!Se&&z?.text&&(n.setInputValue(z.text),M=setTimeout(()=>{(n.active?.()??!0)&&n.inputValue()===z.text&&n.applyEditorContent(z.text)},hx)),h===null){const Ce=z?.text??"",De=z?.attachments??[];h={text:Ce,attachmentsJson:JSON.stringify(De)},ld(C,re,{text:Ce,attachments:De})}Ie()})})}),se(()=>{const W=n.active?.()??!0,C=n.workspaceId(),re=n.agentId(),Me=e(i);if(!W){it(Te);return}if(!C||!re)return;const H=n.inputValue(),Y=pe();if(it(Re),it(Te),Me||h===null&&!H&&Y.length===0)return;const X=JSON.stringify(Y);if(h!==null&&h.text===H&&h.attachmentsJson===X)return;JSON.stringify(e(V))!==X&&w(V,Y);const Ie=`${C}\0${re}`,Ne=x,z=crypto.randomUUID();T[z]=Se=>{if(n.active?.()??!0){if(Se.status==="saved"){u===Ie&&x===Ne&&(h={text:H,attachmentsJson:X});return}n.onSaveError?.(new Error(Se.error))}},it(()=>{D=z,r.dispatch(dw(a,z,{authority:r.authority?.()??void 0,workspaceId:C,agentId:re,text:H,attachments:Y,rollback:h?{text:h.text,attachments:JSON.parse(h.attachmentsJson)}:null}))})}),se(()=>()=>{f=!0,P&&clearTimeout(P),S&&clearTimeout(S),M&&clearTimeout(M),Ae(),J(),r.dispatch(uw(a))});const He=W=>{const C=Re();return C!==null&&C.authority===W.authority&&C.ownerId===W.ownerId&&C.workspaceId===W.workspaceId&&C.agentId===W.agentId&&C.generation===W.generation&&C.text===W.text&&JSON.stringify(C.attachments)===JSON.stringify(W.attachments)};return{captureDraft:Re,isCurrentDraft:He,updateAttachmentScreen(W,C,re){return!He(W)||!W.attachments.some(Me=>Me.id===C)?null:(w(V,W.attachments.map(Me=>Me.id===C?{...Me,screen:structuredClone(re)}:Me)),Re())},async flushDraft(W){if(!He(W))return!1;if(!r.persistSnapshot)throw new Error("draft-shared-transport-unavailable");return await r.persistSnapshot(a,W.workspaceId,W.agentId,W,W.authority),He(W)},get restorePending(){return e(c)},get gateActive(){return e(i)},get gateVisible(){return e(l)},invalidatePendingRestore(){if(b+=1,x+=1,oe(),P&&(clearTimeout(P),P=null),M&&(clearTimeout(M),M=null),w(i,!1),ae(),Te(),u!==null){const[W,C]=u.split("\0");ld(W,C,{text:"",attachments:[]}),he=null,w(V,[]),h={text:"",attachmentsJson:"[]"}}}}}function Ei(n){if(!n)return null;const r=qf(JSON.stringify([n.workspaceId,n.agentId]),Af(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 yx(n,r,a){const i=F.state.principal.snapshot,c=()=>Pi(F.state)===n.authority&&a.isCurrentDraft(n);if(!i||!c()||!await a.flushDraft(n)||!c())return{ready:!1};const l=new AbortController,h=Xd({workspaceId:n.workspaceId,agentId:n.agentId,principalId:i.principal.id,draftId:crypto.randomUUID(),media:[r]},c,l.signal);try{const u=await h.readiness();return!c()||!u.ok?{ready:!1}:u.value.find(b=>b.sourceId===r.source.id)??{ready:!1}}finally{await h.dispose()}}function Qp(n){let r=me(null),a=me(!1),i=me(!1),c=null,l=!0,h=0,u=null;Es(()=>{l=!1,h++}),se(()=>{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 b(S){if(n.disabled()||e(a))return;const M=n.drafts.captureDraft(),x=Ei(M),D=x?.clips.find(V=>V.contextItemId===S);if(!M||!D?.media||!x)return;const N=gy({workspaceId:M.workspaceId,agentId:M.agentId,clip:D,evidence:x,marks:x.marks}),T=bf(M.workspaceId,D.path);if(!N||!T)return;const O=++h;c=document.activeElement instanceof HTMLElement?document.activeElement:null,w(a,!0),w(i,!1);try{if(await n.beforeOpen?.(),!l||h!==O||!n.drafts.isCurrentDraft(M))return;const V=await(n.prepareOutput??yx)(M,D.media,n.drafts);if(!l||h!==O||!n.drafts.isCurrentDraft(M))return;const{attachmentPath:ie,...R}=N;w(r,{capture:M,contextItemId:S,snapshot:{...R,openId:crypto.randomUUID(),mediaUrl:T,output:V,deleteReady:!0}})}catch{l&&h===O&&w(i,!0)}finally{l&&h===O&&w(a,!1)}}async function f(S){const M=crypto.randomUUID(),x=e(r),D=n.drafts.captureDraft();if(!x||!D||D.authority!==x.capture.authority||D.ownerId!==x.capture.ownerId||D.workspaceId!==x.capture.workspaceId||D.agentId!==x.capture.agentId||D.attachmentEpoch!==x.capture.attachmentEpoch)return{requestId:M,result:"stale-source"};const N=Ei(D),T=N?.clips.find(Q=>Q.contextItemId===x.contextItemId);if(!N||!T?.media)return{requestId:M,result:"stale-source"};const V=u?.openId===x.snapshot.openId&&u.inputRevision===S.revision&&JSON.stringify(u.media)===JSON.stringify(T.media)?{...S,revision:T.media.saved?.revision??0}:S,ie=yS(T.media,{openId:x.snapshot.openId,...x.snapshot.output?.version===2?{outputVersion:2}:{},pair:{workspaceId:D.workspaceId,agentId:D.agentId},sourceId:S.sourceId,sourceRevision:S.sourceRevision,expectedEditRevision:V.revision,edit:V});if(ie.status!=="saved")return{requestId:M,result:ie.status==="invalid-edit"?"failed":ie.status};const R=IS({...N,clips:N.clips.map(Q=>Q.id===T.id?{...Q,media:ie.media}:Q)})[x.contextItemId],k=n.drafts.updateAttachmentScreen(D,x.contextItemId,R);if(!k)return{requestId:M,result:"stale-source"};u={openId:x.snapshot.openId,media:ie.media,inputRevision:S.revision};try{if(!n.drafts.isCurrentDraft(k))return{requestId:M,result:"stale-source"};await n.drafts.flushDraft(k);const Q=n.drafts.captureDraft();return!l||e(r)?.snapshot.openId!==x.snapshot.openId||!Q||Q.attachmentEpoch!==x.capture.attachmentEpoch||Q.authority!==k.authority||Q.ownerId!==k.ownerId||Q.workspaceId!==k.workspaceId||Q.agentId!==k.agentId||JSON.stringify(Q.attachments.find(ge=>ge.id===x.contextItemId)?.screen)!==JSON.stringify(R)?{requestId:M,result:"stale-source"}:(u=null,{requestId:M,result:"saved",saved:ie.media.saved??void 0})}catch{return{requestId:M,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:b,save:f,remove:P,close(){w(r,null)},restoreFocus(){c?.isConnected&&c.focus()}}}var Ix=q('<p role="alert"> </p>'),Sx=q('<div class="recording-editor-surface svelte-cdb16"><!></div>'),$x=q("<!> <!> <!>",1);function dv(n,r){if(new.target)return un({component:dv,...n});fn(r,!0);let a=Z(r,"capture",7),i=Z(r,"drafts",7),c=Z(r,"disabled",7,!1),l=Z(r,"onRemove",7),h=Z(r,"controllerFactory",7,Qp),u=Z(r,"beforeOpen",7),b=Z(r,"onReviewChange",7);const f=it(()=>h()({drafts:i(),capture:()=>a(),disabled:()=>c(),onRemove:R=>l()(R),beforeOpen:()=>u()?.()??Promise.resolve()}));se(()=>{const R=f.opening,k=f.session;it(()=>b()?.(R,k?.snapshot.output?.ready?{openId:k.snapshot.openId,capture:k.capture}:null))});const P=o(py),S=o(()=>Ei(a())),M=o(()=>e(S)?.clips.map(R=>({id:R.contextItemId,kind:"clip",owner:"evidence",duration:Mp(R.durationMs),recording:!1,url:a()?bf(a().workspaceId,R.path):void 0,...R.media?.saved?{summary:fy(R.media.saved)}:{}}))??[]);let x=me(null);var D={get capture(){return a()},set capture(R){a(R),ee()},get drafts(){return i()},set drafts(R){i(R),ee()},get disabled(){return c()},set disabled(R=!1){c(R),ee()},get onRemove(){return l()},set onRemove(R){l(R),ee()},get controllerFactory(){return h()},set controllerFactory(R=Qp){h(R),ee()},get beforeOpen(){return u()},set beforeOpen(R){u(R),ee()},get onReviewChange(){return b()},set onReviewChange(R){b(R),ee()},$set:gn,$on:(R,k)=>pn(r,R,k)},N=$x(),T=ye(N);{let R=o(()=>c()||f.opening);ES(T,{get items(){return e(M)},get labels(){return e(P)},get disabled(){return e(R)},onEdit:k=>void f.open(k),onMarkUp:k=>void f.open(k),get onRemove(){return f.remove}})}var O=_(T,2);{var V=R=>{var k=Ix(),Q=de(k,!0);L(ge=>j(Q,ge),[()=>g.dock_captureEditor_saveFailed_label()]),p(R,k)};B(O,R=>{f.problem&&R(V)})}var ie=_(O,2);{let R=o(()=>!!f.session),k=o(()=>g.dock_captureEditor_recording_title({duration:f.session?Mp(f.session.snapshot.durationMs??0):""}));P$(ie,{get open(){return e(R)},size:"editor",showCloseButton:!1,get title(){return e(k)},escapeKeydownBehavior:"ignore",dismissOnInteractOutside:!1,onClose:()=>f.close(),onCloseAutoFocus:Q=>{Q.preventDefault(),f.restoreFocus()},get contentRef(){return e(x)},set contentRef(Q){w(x,Q,!0)},children:(Q,ge)=>{var Re=Wt(),he=ye(Re);{var pe=qe=>{var fe=Wt(),oe=ye(fe);xi(oe,()=>f.session.snapshot.openId,Te=>{var J=Sx(),ae=I(J);T$(ae,{get snapshot(){return f.session.snapshot},get shortcutDialog(){return e(x)},onClose:()=>f.close(),get onSave(){return f.save},onDelete:async()=>!!f.session&&f.remove(f.session.contextItemId)}),y(J),p(Te,J)}),p(qe,fe)};B(he,qe=>{f.session&&qe(pe)})}p(Q,Re)},$$slots:{default:!0}})}return p(n,N),vn(D)}const Cl=n=>JSON.stringify([n.authority,n.ownerId,n.workspaceId,n.agentId,n.attachmentEpoch,n.attachments]);function kx(n){let r=me(!1),a=me(!1),i=me(null),c=!1,l=0,h=null,u=null;async function b(S){S.abort.abort(),S.slot?.cancel(),await S.native?.dispose()}async function f(){l++;const S=u;u=null,S&&await b(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(()=>{u&&!u.current()&&f()});return Es(()=>{c=!0,P(),f()}),se(()=>{const S=n.capture(),M=S?Cl(S):"",x=e(r)&&!e(a)&&(n.active()||e(i)?.key===M);it(()=>{if(!x||!S){f();return}if(u?.key===M)return;if(h===M){f();return}f();const N=Ei(S)?.clips.flatMap(Re=>!Re.mediaError&&Re.media?[Re.media]:[])??[],T=N[0],O=F.state.principal.snapshot,V=Dl.select(F.state,S.workspaceId);if(!T||!O||!V||n.drafts.gateActive)return;const ie=_f(),R=new AbortController,k=()=>!c&&!R.signal.aborted&&Pi(F.state)===S.authority&&Dl.select(F.state,S.workspaceId)===V&&wf(ie)&&!!n.capture()&&Cl(n.capture())===M,Q={key:M,capture:S,abort:R,native:null,slot:null,current:k};u=Q;const ge=l;n.drafts.flushDraft(S).then(async Re=>{if(!(u!==Q||ge!==l||!k())){if(!Re){h=M,await f();return}Q.native=Xd({workspaceId:S.workspaceId,agentId:S.agentId,draftId:crypto.randomUUID(),principalId:O.principal.id,media:structuredClone(N)},k,R.signal),Q.slot=vy(Q.native.service),h=M,Q.slot.warm(M,T,k)}}).catch(()=>{u===Q&&f()})})}),{cancel:f,async beforeEditorOpen(){w(a,!0),h=null,await f()},editorState(S,M){w(a,S,!0);const x=M?Cl(M.capture):null;M&&e(i)?.openId!==M.openId&&(h=null),w(i,M&&x?{openId:M.openId,key:x}:null)},take(S,M){const x=u;if(!x?.native||!x.slot||x.key!==Cl(S)||!x.current())return f(),null;u=null,l++;const D=x.native,N=x.slot,T=()=>x.abort.abort();return M.addEventListener("abort",T,{once:!0}),M.aborted&&T(),{service:{...D.service,takePreparedRecording:O=>N.take(x.key,O,()=>!M.aborted&&x.current())},async dispose(){M.removeEventListener("abort",T),await b(x)}}}}}var xx=q('<div role="status" class="px-3 py-1.5 text-xs text-muted-foreground" data-testid="chat-draft-loading-gate"><span> </span></div>');function uv(n,r){if(new.target)return un({component:uv,...n});fn(r,!1);var a={$set:gn,$on:(h,u)=>pn(r,h,u)};Bf();var i=xx(),c=I(i),l=de(c,!0);return y(i),L(h=>j(l,h),[()=>g.chat_draftGate_loading_label()]),p(n,i),vn(a)}var Cx=q('<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 Ld(n,r){if(new.target)return un({component:Ld,...n});fn(r,!1);var a={$set:gn,$on:(h,u)=>pn(r,h,u)};Bf();var i=Cx(),c=_(I(i),2),l=de(c,!0);return dn(2),y(i),L((h,u)=>{ze(i,"aria-label",h),j(l,u)},[()=>g.chat_newMessagesDivider_label(),()=>g.chat_newMessagesDivider_label()]),p(n,i),vn(a)}function Px(n,r){if(!r||n.length===0)return null;const a=n.indexOf(r);return a===-1||a===n.length-1?null:r}function Rx(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 Tx(n,r){return r&&n.includes(r)?r:null}function Jp(n,r,a){return r-n<=a}const Ax=.2;function Yp(n,r,a){const i=Math.max(0,a-r),c=n-Ax*r;return Math.min(Math.max(0,c),i)}function Mx(n,r,a){return n!==null&&a&&n===r}function Ex(n){return n?mw(n)&&_w(n)!==null&&typeof n.metadata?.taskNoteId=="string":!1}function qx(n){const r=[],a=new Set;let i,c;for(const O of n.messages){if(O.agentId&&O.agentId!==n.agentId){i=void 0,c=void 0;continue}if(a.has(O.id))continue;a.add(O.id),n.breakBeforeMessageIds?.has(O.id)&&(i=void 0,c=void 0);const V=qS(O);if(V?.kind!=="turn-failure")c=void 0;else{const ie=i?.seq!==void 0&&O.seq!==void 0&&Number.isSafeInteger(i.seq)&&Number.isSafeInteger(O.seq)&&O.seq===i.seq+1;(!c||!ie)&&(c={key:JSON.stringify([n.agentId,"notice",O.id]),anchorMessageId:O.id,correlation:"unavailable",records:[],recordedFailureCount:0},r.push(c)),c.records.push({messageId:O.id,reason:V.reason,timestamp:O.timestamp}),c.recordedFailureCount+=1}i=O}const l=new Map;for(const O of n.queue){if(!O.requeuedAfterFailure)continue;const V=O.turnId||void 0,ie=JSON.stringify([n.agentId,V?"turn":"queue",V??O.id]);let R=l.get(ie);R||(R={key:ie,correlation:V?"turn":"queue-entry",turnId:V,queueIds:[],state:"queued"},l.set(ie,R)),R.queueIds.includes(O.id)||R.queueIds.push(O.id)}const h=[...l.values()],u=n.session?.id===n.agentId?n.session:void 0,b=u?.status===$i.Error,f=n.transientError||b&&u.stopReason||null,P=b&&!f,S=b&&(!n.transientError||n.transientError===u.stopReason)?u.stopReasonTimestamp:void 0,M=S?Ip(S):null,x=M&&f&&f===u?.stopReason?r.flatMap(O=>O.records).filter(O=>O.reason===f&&Ip(O.timestamp)===M):[],D=x.length===1?x[0].messageId:void 0,T=(u?$f(u):!1)?"attempting":h.length?"queued":f||P?"action-needed":"inactive";return{history:r,queueRecovery:h,current:{state:T,error:f,needsFallbackReason:P,timestamp:S,noticeId:D}}}function Lx(n,r){const a=n.hiddenTail[0]?.id,i=qx({...r,messages:[...n.groups.flatMap(u=>u.messages),...n.hiddenTail],breakBeforeMessageIds:new Set(a?[a]:[])}),c=i.current.noticeId,l=i.history.map(u=>({...u,records:u.records.filter(b=>b.messageId!==c)})).filter(u=>u.records.length>0),h=new Set(l.map(u=>u.records[0].messageId));return{...i,runsByAnchor:new Map(l.map(u=>[u.records[0].messageId,u])),collapsedMessageIds:new Set(i.history.flatMap(u=>u.records.map(b=>b.messageId).filter(b=>!h.has(b))))}}var Hx=q('<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),Ox=q('<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),Fx=q('<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>'),Dx=q('<div class="mb-5"><!></div>'),Nx=q('<p data-testid="agent-welcome-description"> </p> <!>',1),Bx=q("<!> <!>",1),Wx=q('<p class="mb-3 px-4 text-sm text-subtle leading-relaxed whitespace-pre-wrap" data-testid="agent-welcome-description"> </p>'),Ux=q("<!> <span> </span>",1),zx=q('<div class="mx-auto flex w-full max-w-[40rem] flex-1 flex-col px-4 pb-6 pt-4 text-subtle"><!> <!> <!></div>');function gv(n,r){if(new.target)return un({component:gv,...n});fn(r,!0);const a=()=>ue(x,"$userOverrides$",h),i=()=>ue(M,"$specialists$",h),c=()=>ue(O,"$isGitHubAuth$",h),l=()=>ue(V,"$recentSpecialistIds$",h),[h,u]=Ur();let b=Z(r,"onSpecialistChange",7),f=Z(r,"session",7),P=Z(r,"workspaceId",7);const S=Bn(P()??"");se(()=>S.set(P()??""));const M=Vf(S),x=X$();se(()=>{a()});const D=o(()=>{if(!f()||Jy(f()))return null;const W=f().metadata?.specialist||f().agentMetadata?.specialist;return W&&i().find(C=>C.id===W)||null});async function N(W){W?await zl({specialist:W,hash:"specialists"}):await zl({view:"create-specialist"})}let T=me(!1);const O=Z$(),V=dS(),ie=o(()=>ww(ek(i(),c()),l()));let R=me(!1);const k=o(()=>g.chat_regularAgentWelcome_generalDescription_label()),Q=o(()=>e(D)?.name??g.chat_shared_general_fallback()),ge=o(()=>e(D)?.description??g.chat_shared_noSpecializedBehavior_label()),Re=o(()=>e(D)?e(D).defaultBehaviorPrompt||"":e(k));var he={get onSpecialistChange(){return b()},set onSpecialistChange(W){b(W),ee()},get session(){return f()},set session(W){f(W),ee()},get workspaceId(){return P()},set workspaceId(W){P(W),ee()},$set:gn,$on:(W,C)=>pn(r,W,C)},pe=zx(),qe=I(pe);{var fe=W=>{var C=Dx(),re=I(C);gk(re,{class:"block w-full",align:"start",side:"bottom",contentClass:"w-[min(28rem,calc(100vw-2rem))]",get open(){return e(R)},set open(Y){w(R,Y,!0)},trigger:(Y,X)=>{let Ie=()=>(X?.()).props;{let Ne=o(()=>Ud("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"));bt(Y,qi(Ie,{type:"button",variant:"plain",wrapContent:!1,get class(){return e(Ne)},"data-testid":"specialist-picker-trigger",children:(z,Se)=>{var Ce=Hx(),De=ye(Ce),at=I(De);{let Ge=o(()=>e(D)?.id??null),Qe=o(()=>e(D)?.icon??null);uk(at,{agentId:"blank",variant:"emphasized",get specialist(){return e(Ge)},get icon(){return e(Qe)}})}y(De);var Xe=_(De,2),Fe=I(Xe),Pe=de(Fe,!0),G=_(Fe,2),te=de(G,!0);y(Xe);var Oe=_(Xe,2),we=I(Oe);ct(we,{get icon(){return Na},size:10}),y(Oe),L(()=>{j(Pe,e(Q)),j(te,e(ge))}),p(z,Ce)},$$slots:{default:!0}}))}},content:Y=>{var X=Fx(),Ie=I(X),Ne=I(Ie),z=de(Ne,!0),Se=_(Ne,2),Ce=de(Se,!0);y(Ie);var De=_(Ie,2),at=I(De);{let Pe=o(()=>e(D)?.id??null);Y_(at,{get specialists(){return e(ie)},get value(){return e(Pe)},onchange:G=>{w(R,!1),b()?.(G)}})}y(De);var Xe=_(De,2),Fe=I(Xe);Et(Fe,()=>Br,(Pe,G)=>{G(Pe,{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(R,!1),N()},children:(te,Oe)=>{var we=Ox(),Ge=ye(we),Qe=I(Ge);ct(Qe,{get icon(){return L$},size:12}),y(Ge);var dt=_(Ge,2),ft=de(dt,!0);L(lt=>j(ft,lt),[()=>g.chat_regularAgentWelcome_createSpecialist_label()]),p(te,we)},$$slots:{default:!0}})}),y(Xe),y(X),L((Pe,G)=>{j(z,Pe),j(Ce,G)},[()=>g.workspace_createAgentSection_specialists_label(),()=>g.workspace_createAgentSection_specialists_description()]),p(Y,X)},$$slots:{trigger:!0,content:!0}}),y(C),p(W,C)};B(qe,W=>{b()&&W(fe)})}var oe=_(qe,2);{var Te=W=>{var C=Wt(),re=ye(C);{let Me=o(()=>g.chat_specialistSelector_prompt_label());Et(re,()=>fk,(H,Y)=>{Y(H,{class:"mb-3",role:"region",get"aria-label"(){return e(Me)},children:(X,Ie)=>{var Ne=Bx(),z=ye(Ne);Et(z,()=>ov,(Ce,De)=>{De(Ce,{children:(at,Xe)=>{var Fe=Wt(),Pe=ye(Fe);Et(Pe,()=>iv,(G,te)=>{te(G,{class:"type-caption font-medium",children:(Oe,we)=>{dn();var Ge=ln();L(Qe=>j(Ge,Qe),[()=>g.chat_specialistSelector_prompt_label()]),p(Oe,Ge)},$$slots:{default:!0}})}),p(at,Fe)},$$slots:{default:!0}})});var Se=_(z,2);Et(Se,()=>pk,(Ce,De)=>{De(Ce,{children:(at,Xe)=>{var Fe=Nx(),Pe=ye(Fe),G=de(Pe,!0),te=_(Pe,2);bt(te,{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:(Oe,we)=>{dn();var Ge=ln();L(Qe=>j(Ge,Qe),[()=>e(T)?g.chat_regularAgentWelcome_showLess_label():g.chat_regularAgentWelcome_showMore_label()]),p(Oe,Ge)},$$slots:{default:!0}}),L(()=>{ke(Pe,1,`text-sm text-subtle leading-relaxed whitespace-pre-wrap break-words ${e(T)?"":"line-clamp-6"}`),j(G,e(Re))}),p(at,Fe)},$$slots:{default:!0}})}),p(X,Ne)},$$slots:{default:!0}})})}p(W,C)},J=W=>{var C=Wx(),re=de(C,!0);L(()=>j(re,e(Re))),p(W,C)};B(oe,W=>{e(D)?W(Te):W(J,-1)})}var ae=_(oe,2);{var Ae=W=>{bt(W,{variant:"ghost-light",size:"sm",onclick:()=>N(e(D).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:(C,re)=>{var Me=Ux(),H=ye(Me);ct(H,{get icon(){return q$},size:12,class:"opacity-60"});var Y=_(H,2),X=de(Y,!0);L(Ie=>j(X,Ie),[()=>g.chat_regularAgentWelcome_customize_label()]),p(C,Me)},$$slots:{default:!0}})};B(ae,W=>{e(D)&&W(Ae)})}y(pe),p(n,pe);var He=vn(he);return u(),He}var jx=q('<a class="cursor-pointer underline underline-offset-2 hover:opacity-80" data-suggested-prompt-link=""> </a>'),Gx=q('<kbd data-suggested-prompt-hint=""> </kbd>'),Vx=q('<span class="type-caption"> </span>'),Kx=q('<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>'),Qx=q('<div class="flex flex-col" data-testid="suggested-prompts-surface"><!></div>');function Zd(n,r){if(new.target)return un({component:Zd,...n});fn(r,!0);let a=Z(r,"prompts",7),i=Z(r,"onSelect",7),c=Z(r,"onEdit",7),l=Z(r,"compact",7,!1),h=Z(r,"showShortcutHints",7,!1),u=Z(r,"reserveShortcutHintSpace",7,!1),b=Z(r,"workspaceId",7);const P=typeof navigator<"u"&&navigator.platform.toUpperCase().includes("MAC")?"⌃":"Alt+",S=u$.replace("text-ui","type-caption");function M(k){i()(k)}function x(k,Q){k.key!=="Enter"&&k.key!==" "||(k.preventDefault(),M(Q))}function D(k,Q){k.preventDefault(),k.stopPropagation(),Ed(Q,{workspaceId:b(),event:k})}function N(k,Q){(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),k.stopPropagation(),Ed(Q,{workspaceId:b(),event:k}))}function T(k){return k<3}var O={get prompts(){return a()},set prompts(k){a(k),ee()},get onSelect(){return i()},set onSelect(k){i(k),ee()},get onEdit(){return c()},set onEdit(k){c(k),ee()},get compact(){return l()},set compact(k=!1){l(k),ee()},get showShortcutHints(){return h()},set showShortcutHints(k=!1){h(k),ee()},get reserveShortcutHintSpace(){return u()},set reserveShortcutHintSpace(k=!1){u(k),ee()},get workspaceId(){return b()},set workspaceId(k){b(k),ee()},$set:gn,$on:(k,Q)=>pn(r,k,Q)},V=Wt(),ie=ye(V);{var R=k=>{var Q=Qx(),ge=I(Q);{const Re=(pe,qe)=>{let fe=()=>(qe?.()).item,oe=()=>(qe?.()).index;const Te=o(()=>ty(fe())),J=o(()=>e(Te)[0]?.type==="text"?e(Te)[0].content:"");var ae=Kx(),Ae=I(ae),He=I(Ae);ct(He,{get icon(){return Wf},size:16,get class(){return ur}}),y(Ae);var W=_(Ae,2),C=I(W),re=de(C,!0),Me=_(C);Dn(Me,17,()=>e(Te).slice(e(J)?1:0),K_,(z,Se)=>{var Ce=Wt(),De=ye(Ce);{var at=Fe=>{const Pe=o(()=>ey(e(Se).url));var G=jx(),te=de(G,!0);L(()=>{ze(G,"href",e(Pe)),ze(G,"title",e(Pe)),j(te,e(Se).label)}),ps("click",G,Oe=>D(Oe,e(Pe))),ps("keydown",G,Oe=>N(Oe,e(Pe))),p(Fe,G)},Xe=Fe=>{var Pe=ln();L(()=>j(Pe,e(Se).content)),p(Fe,Pe)};B(De,Fe=>{e(Se).type==="link"?Fe(at):Fe(Xe,-1)})}p(z,Ce)}),y(W);var H=_(W,2);{var Y=z=>{var Se=Gx();let Ce;var De=de(Se);L(()=>{Ce=ke(Se,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:!h()}),ze(Se,"aria-hidden",h()?void 0:"true"),ze(Se,"data-hint-visible",h()),j(De,`${P}${oe()+1}`)}),p(z,Se)},X=o(()=>T(oe())&&(h()||u()));B(H,z=>{e(X)&&z(Y)})}var Ie=_(H,2);{var Ne=z=>{E$(z,{side:"top",delayDuration:300,trigger:De=>{{let at=o(()=>g.chat_suggestedPrompts_editInInput_ariaLabel());bt(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:Xe=>{Xe.stopPropagation(),c()(fe())},get"aria-label"(){return e(at)},children:(Xe,Fe)=>{ct(Xe,{get icon(){return H$},size:"xs"})},$$slots:{default:!0}})}},content:De=>{var at=Vx(),Xe=de(at,!0);L(Fe=>j(Xe,Fe),[()=>g.chat_suggestedPrompts_edit_tooltip()]),p(De,at)},$$slots:{trigger:!0,content:!0}})};B(Ie,z=>{c()&&z(Ne)})}y(ae),L(z=>{ke(ae,1,`${Nf} ${d$} 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`),ke(Ae,1,`${Bl??""} mt-px self-start`),ze(C,"aria-label",z),j(re,e(J))},[()=>Zb(fe())]),ps("click",C,z=>{z.stopPropagation(),M(fe())}),ps("keydown",C,z=>x(z,fe())),p(pe,ae)};let he=o(()=>l()?"[&>div>div:last-child]:gap-0":"[&>div>div:last-child]:gap-0.5");R$(ge,{get items(){return a()},virtualize:!1,onActivate:M,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:Re,$$slots:{row:!0}})}y(Q),Nt(1,Q,()=>ma,()=>({tier:"fast",y:0,scale:1})),Nt(2,Q,()=>to,()=>({tier:"fast"})),p(k,Q)};B(ie,k=>{a().length>0&&k(R)})}return p(n,V),vn(O)}Wd(["click","keydown"]);var Jx=q('<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 pv(n,r){if(new.target)return un({component:pv,...n});fn(r,!0);let a=Z(r,"onSelect",7),i=Z(r,"compact",7,!1);const c=o(()=>[{label:g.chat_chiefEmptyState_assignedPrs_label(),prompt:g.chat_chiefEmptyState_assignedPrs_prompt()},{label:g.chat_chiefEmptyState_staleWorkspaces_label(),prompt:g.chat_chiefEmptyState_staleWorkspaces_prompt()},{label:g.chat_chiefEmptyState_agentPerformance_label(),prompt:g.chat_chiefEmptyState_agentPerformance_prompt()},{label:g.chat_chiefEmptyState_morningBrief_label(),prompt:g.chat_chiefEmptyState_morningBrief_prompt()},{label:g.chat_chiefEmptyState_randomTheme_label(),prompt:g.chat_chiefEmptyState_randomTheme_prompt()}]),l=o(()=>e(c).map(M=>M.label));function h(M){const x=e(c).find(D=>D.label===M);x&&a()(x.prompt)}var u={get onSelect(){return a()},set onSelect(M){a(M),ee()},get compact(){return i()},set compact(M=!1){i(M),ee()},$set:gn,$on:(M,x)=>pn(r,M,x)},b=Jx(),f=I(b),P=de(f,!0),S=_(f,2);return Zd(S,{get prompts(){return e(l)},onSelect:h,get compact(){return i()}}),y(b),L(M=>j(P,M),[()=>g.chat_chiefEmptyState_intro_label()]),p(n,b),vn(u)}const eu=2e3,Yx=4e3,Xx=Yx-eu-2;function Zx(n,r=eu){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 h=(l.contentBlocks??[]).filter(b=>b.type==="text").map(b=>b.text||b.content||"").join(""),u=(l.role==="assistant"?X_(h).cleanedContent:h).trim();u&&(a.unshift({role:l.role,text:u}),i+=u.length)}return a}function e1(n,r){const a=n.map(l=>`${l.role==="user"?"User":"Assistant"}: ${l.text}`).join(`
|
|
2
2
|
|
|
3
3
|
`).slice(-eu),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(`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as Ni}from"./
|
|
1
|
+
import{g as Ni}from"./CKOijLzA.js";import{s as Ci}from"./DUxx6wT8.js";import{U as Zs,aZ as jt,V as Qs,a_ as Gt,Y as bi,b0 as vi,b as h,aU as je,ay as _i,X as en,a1 as xi,aP as Mi,bh as wi,aV as Ui,r as Pi,O as Di,am as Fi,W as Bi,ab as $i,aG as ji,aA as Gi,aW as Wi}from"./eBfEHUcb.js";function Wt(s){console&&console.error&&console.error(`Error: ${s}`)}function tn(s){console&&console.warn&&console.warn(`Warning: ${s}`)}function sn(s){const e=new Date().getTime(),t=s();return{time:new Date().getTime()-e,value:t}}function nn(s){function e(){}e.prototype=s;const t=new e;function n(){return typeof t.bar}return n(),n(),s}function Ki(s){return Vi(s)?s.LABEL:s.name}function Vi(s){return typeof s.LABEL=="string"&&s.LABEL!==""}class te{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){this._definition=e}accept(e){e.visit(this),this.definition.forEach(t=>{t.accept(e)})}}class K extends te{constructor(e){super([]),this.idx=1,Object.assign(this,ie(e))}set definition(e){}get definition(){return this.referencedRule!==void 0?this.referencedRule.definition:[]}accept(e){e.visit(this)}}class _e extends te{constructor(e){super(e.definition),this.orgText="",Object.assign(this,ie(e))}}class W extends te{constructor(e){super(e.definition),this.ignoreAmbiguities=!1,Object.assign(this,ie(e))}}class G extends te{constructor(e){super(e.definition),this.idx=1,Object.assign(this,ie(e))}}class se extends te{constructor(e){super(e.definition),this.idx=1,Object.assign(this,ie(e))}}class ne extends te{constructor(e){super(e.definition),this.idx=1,Object.assign(this,ie(e))}}class M extends te{constructor(e){super(e.definition),this.idx=1,Object.assign(this,ie(e))}}class q extends te{constructor(e){super(e.definition),this.idx=1,Object.assign(this,ie(e))}}class Z extends te{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){super(e.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,Object.assign(this,ie(e))}}class k{constructor(e){this.idx=1,Object.assign(this,ie(e))}accept(e){e.visit(this)}}function zi(s){return s.map(at)}function at(s){function e(t){return t.map(at)}if(s instanceof K){const t={type:"NonTerminal",name:s.nonTerminalName,idx:s.idx};return typeof s.label=="string"&&(t.label=s.label),t}else{if(s instanceof W)return{type:"Alternative",definition:e(s.definition)};if(s instanceof G)return{type:"Option",idx:s.idx,definition:e(s.definition)};if(s instanceof se)return{type:"RepetitionMandatory",idx:s.idx,definition:e(s.definition)};if(s instanceof ne)return{type:"RepetitionMandatoryWithSeparator",idx:s.idx,separator:at(new k({terminalType:s.separator})),definition:e(s.definition)};if(s instanceof q)return{type:"RepetitionWithSeparator",idx:s.idx,separator:at(new k({terminalType:s.separator})),definition:e(s.definition)};if(s instanceof M)return{type:"Repetition",idx:s.idx,definition:e(s.definition)};if(s instanceof Z)return{type:"Alternation",idx:s.idx,definition:e(s.definition)};if(s instanceof k){const t={type:"Terminal",name:s.terminalType.name,label:Ki(s.terminalType),idx:s.idx};typeof s.label=="string"&&(t.terminalLabel=s.label);const n=s.terminalType.PATTERN;return s.terminalType.PATTERN&&(t.pattern=n instanceof RegExp?n.source:n),t}else{if(s instanceof _e)return{type:"Rule",name:s.name,orgText:s.orgText,definition:e(s.definition)};throw Error("non exhaustive match")}}}function ie(s){return Object.fromEntries(Object.entries(s).filter(([,e])=>e!==void 0))}class xe{visit(e){const t=e;switch(t.constructor){case K:return this.visitNonTerminal(t);case W:return this.visitAlternative(t);case G:return this.visitOption(t);case se:return this.visitRepetitionMandatory(t);case ne:return this.visitRepetitionMandatoryWithSeparator(t);case q:return this.visitRepetitionWithSeparator(t);case M:return this.visitRepetition(t);case Z:return this.visitAlternation(t);case k:return this.visitTerminal(t);case _e:return this.visitRule(t);default:throw Error("non exhaustive match")}}visitNonTerminal(e){}visitAlternative(e){}visitOption(e){}visitRepetition(e){}visitRepetitionMandatory(e){}visitRepetitionMandatoryWithSeparator(e){}visitRepetitionWithSeparator(e){}visitAlternation(e){}visitTerminal(e){}visitRule(e){}}function Hi(s){return s instanceof W||s instanceof G||s instanceof M||s instanceof se||s instanceof ne||s instanceof q||s instanceof k||s instanceof _e}function Tt(s,e=[]){return s instanceof G||s instanceof M||s instanceof q?!0:s instanceof Z?s.definition.some(n=>Tt(n,e)):s instanceof K&&e.includes(s)?!1:s instanceof te?(s instanceof K&&e.push(s),s.definition.every(n=>Tt(n,e))):!1}function Xi(s){return s instanceof Z}function ee(s){if(s instanceof K)return"SUBRULE";if(s instanceof G)return"OPTION";if(s instanceof Z)return"OR";if(s instanceof se)return"AT_LEAST_ONE";if(s instanceof ne)return"AT_LEAST_ONE_SEP";if(s instanceof q)return"MANY_SEP";if(s instanceof M)return"MANY";if(s instanceof k)return"CONSUME";throw Error("non exhaustive match")}class kt{walk(e,t=[]){e.definition.forEach((n,i)=>{const a=e.definition.slice(i+1);if(n instanceof K)this.walkProdRef(n,a,t);else if(n instanceof k)this.walkTerminal(n,a,t);else if(n instanceof W)this.walkFlat(n,a,t);else if(n instanceof G)this.walkOption(n,a,t);else if(n instanceof se)this.walkAtLeastOne(n,a,t);else if(n instanceof ne)this.walkAtLeastOneSep(n,a,t);else if(n instanceof q)this.walkManySep(n,a,t);else if(n instanceof M)this.walkMany(n,a,t);else if(n instanceof Z)this.walkOr(n,a,t);else throw Error("non exhaustive match")})}walkTerminal(e,t,n){}walkProdRef(e,t,n){}walkFlat(e,t,n){const i=t.concat(n);this.walk(e,i)}walkOption(e,t,n){const i=t.concat(n);this.walk(e,i)}walkAtLeastOne(e,t,n){const i=[new G({definition:e.definition})].concat(t,n);this.walk(e,i)}walkAtLeastOneSep(e,t,n){const i=ys(e,t,n);this.walk(e,i)}walkMany(e,t,n){const i=[new G({definition:e.definition})].concat(t,n);this.walk(e,i)}walkManySep(e,t,n){const i=ys(e,t,n);this.walk(e,i)}walkOr(e,t,n){const i=t.concat(n);e.definition.forEach(a=>{const r=new W({definition:[a]});this.walk(r,i)})}}function ys(s,e,t){return[new G({definition:[new k({terminalType:s.separator})].concat(s.definition)})].concat(e,t)}function Je(s){if(s instanceof K)return Je(s.referencedRule);if(s instanceof k)return qi(s);if(Hi(s))return Yi(s);if(Xi(s))return Ji(s);throw Error("non exhaustive match")}function Yi(s){let e=[];const t=s.definition;let n=0,i=t.length>n,a,r=!0;for(;i&&r;)a=t[n],r=Tt(a),e=e.concat(Je(a)),n=n+1,i=t.length>n;return[...new Set(e)]}function Ji(s){const e=s.definition.map(t=>Je(t));return[...new Set(e.flat())]}function qi(s){return[s.terminalType]}const an="_~IN~_";class Zi extends kt{constructor(e){super(),this.topProd=e,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(e,t,n){}walkProdRef(e,t,n){const i=ea(e.referencedRule,e.idx)+this.topProd.name,a=t.concat(n),r=new W({definition:a}),l=Je(r);this.follows[i]=l}}function Qi(s){const e={};return s.forEach(t=>{const n=new Zi(t).startWalking();Object.assign(e,n)}),e}function ea(s,e){return s.name+e+an}function S(s){return s.charCodeAt(0)}function Pt(s,e){Array.isArray(s)?s.forEach(function(t){e.push(t)}):e.push(s)}function Fe(s,e){if(s[e]===!0)throw"duplicate flag "+e;s[e],s[e]=!0}function Se(s){if(s===void 0)throw Error("Internal Error - Should never get here!");return!0}function ta(){throw Error("Internal Error - Should never get here!")}function Rs(s){return s.type==="Character"}const gt=[];for(let s=S("0");s<=S("9");s++)gt.push(s);const At=[S("_")].concat(gt);for(let s=S("a");s<=S("z");s++)At.push(s);for(let s=S("A");s<=S("Z");s++)At.push(s);const Os=[S(" "),S("\f"),S(`
|
|
2
2
|
`),S("\r"),S(" "),S("\v"),S(" "),S(" "),S(" "),S(" "),S(" "),S(" "),S(" "),S(" "),S(" "),S(" "),S(" "),S(" "),S(" "),S(" "),S("\u2028"),S("\u2029"),S(" "),S(" "),S(" "),S("\uFEFF")],sa=/[0-9a-fA-F]/,tt=/[0-9]/,na=/[1-9]/;class ia{constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(e){this.idx=e.idx,this.input=e.input,this.groupIdx=e.groupIdx}pattern(e){this.idx=0,this.input=e,this.groupIdx=0,this.consumeChar("/");const t=this.disjunction();this.consumeChar("/");const n={type:"Flags",loc:{begin:this.idx,end:e.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case"g":Fe(n,"global");break;case"i":Fe(n,"ignoreCase");break;case"m":Fe(n,"multiLine");break;case"u":Fe(n,"unicode");break;case"y":Fe(n,"sticky");break}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:n,value:t,loc:this.loc(0)}}disjunction(){const e=[],t=this.idx;for(e.push(this.alternative());this.peekChar()==="|";)this.consumeChar("|"),e.push(this.alternative());return{type:"Disjunction",value:e,loc:this.loc(t)}}alternative(){const e=[],t=this.idx;for(;this.isTerm();)e.push(this.term());return{type:"Alternative",value:e,loc:this.loc(t)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){const e=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(e)};case"$":return{type:"EndAnchor",loc:this.loc(e)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(e)};case"B":return{type:"NonWordBoundary",loc:this.loc(e)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");let t;switch(this.popChar()){case"=":t="Lookahead";break;case"!":t="NegativeLookahead";break;case"<":{switch(this.popChar()){case"=":t="Lookbehind";break;case"!":t="NegativeLookbehind"}break}}Se(t);const n=this.disjunction();return this.consumeChar(")"),{type:t,value:n,loc:this.loc(e)}}return ta()}quantifier(e=!1){let t;const n=this.idx;switch(this.popChar()){case"*":t={atLeast:0,atMost:1/0};break;case"+":t={atLeast:1,atMost:1/0};break;case"?":t={atLeast:0,atMost:1};break;case"{":const i=this.integerIncludingZero();switch(this.popChar()){case"}":t={atLeast:i,atMost:i};break;case",":let a;this.isDigit()?(a=this.integerIncludingZero(),t={atLeast:i,atMost:a}):t={atLeast:i,atMost:1/0},this.consumeChar("}");break}if(e===!0&&t===void 0)return;Se(t);break}if(!(e===!0&&t===void 0)&&Se(t))return this.peekChar(0)==="?"?(this.consumeChar("?"),t.greedy=!1):t.greedy=!0,t.type="Quantifier",t.loc=this.loc(n),t}atom(){let e;const t=this.idx;switch(this.peekChar()){case".":e=this.dotAll();break;case"\\":e=this.atomEscape();break;case"[":e=this.characterClass();break;case"(":e=this.group();break}if(e===void 0&&this.isPatternCharacter()&&(e=this.patternCharacter()),Se(e))return e.loc=this.loc(t),this.isQuantifier()&&(e.quantifier=this.quantifier()),e}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[S(`
|
|
3
3
|
`),S("\r"),S("\u2028"),S("\u2029")]}}atomEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:"GroupBackReference",value:this.positiveInteger()}}characterClassEscape(){let e,t=!1;switch(this.popChar()){case"d":e=gt;break;case"D":e=gt,t=!0;break;case"s":e=Os;break;case"S":e=Os,t=!0;break;case"w":e=At;break;case"W":e=At,t=!0;break}if(Se(e))return{type:"Set",value:e,complement:t}}controlEscapeAtom(){let e;switch(this.popChar()){case"f":e=S("\f");break;case"n":e=S(`
|
|
4
4
|
`);break;case"r":e=S("\r");break;case"t":e=S(" ");break;case"v":e=S("\v");break}if(Se(e))return{type:"Character",value:e}}controlLetterEscapeAtom(){this.consumeChar("c");const e=this.popChar();if(/[a-zA-Z]/.test(e)===!1)throw Error("Invalid ");return{type:"Character",value:e.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:S("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){const e=this.popChar();return{type:"Character",value:S(e)}}classPatternCharacterAtom(){switch(this.peekChar()){case`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as p,r as u,d as n}from"./
|
|
1
|
+
import{g as p,r as u,d as n}from"./SDWlqEse.js";import{p as f}from"./BD1NjrB7.js";import{b as a,ay as o}from"./eBfEHUcb.js";import{M as c,c as d}from"./BFeEPayU.js";var v=d().RailroadAbnf.parser.LangiumParser,i=a(e=>{const r=e.alternatives.map(g);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformAlternation"),g=a(e=>{const r=e.elements.map(y);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformConcatenation"),b=a(e=>{if(e.includes("*")){const[t,s]=e.split("*"),l=t?parseInt(t,10):0,m=s?parseInt(s,10):1/0;return{min:l,max:m}}const r=parseInt(e,10);return{min:r,max:r}},"parseRepeat"),y=a(e=>{const r=A(e.primary);if(!e.repeat)return r;const{min:t,max:s}=b(e.repeat);return t===0&&s===1?{type:"optional",element:r}:{type:"repetition",element:r,min:t,max:s}},"transformElement"),A=a(e=>{switch(e.$type){case"AbnfStringLiteral":return{type:"terminal",value:e.value};case"AbnfNumVal":return{type:"terminal",value:e.value};case"AbnfRuleName":return{type:"nonterminal",name:e.name};case"AbnfGroup":return i(e.element);case"AbnfOptionalGroup":return{type:"optional",element:i(e.element)};default:throw new Error(`Unsupported ABNF primary node: ${e.$type}`)}},"transformPrimary"),P=a(e=>({name:e.name,definition:i(e.definition)}),"transformRule"),h=a(e=>{f(e,n),e.title&&n.setTitle(e.title),e.rules.map(r=>n.addRule(P(r)))},"populateDb"),R={parse:a(e=>{n.clear(),o.debug("[ABNF Parser] Starting Langium parse");const r=v.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new c(r);const t=r.value;o.debug("[ABNF Parser] Parsed rules:",t.rules.length),h(t),o.debug("[ABNF Parser] Parse complete")},"parse"),parser:{yy:n}},w={parser:R,db:n,renderer:u,styles:p};export{w as diagram};
|