@intent-hq/web 2.342.0 → 2.342.1

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.
Files changed (144) hide show
  1. package/package.json +1 -1
  2. package/web/app/immutable/chunks/{BlQYIsgz.js → -Dxv6K1p.js} +1 -1
  3. package/web/app/immutable/chunks/{CHXe2vhO.js → -mR18H9M.js} +1 -1
  4. package/web/app/immutable/chunks/{DRokLA_h.js → 7sX0Tp9W.js} +1 -1
  5. package/web/app/immutable/chunks/{Dmai8xFd.js → 99pf2UTc.js} +1 -1
  6. package/web/app/immutable/chunks/{CBd4V6kc.js → B-Eh_eo4.js} +1 -1
  7. package/web/app/immutable/chunks/{CmioQ4XN.js → B-TrLhSP.js} +1 -1
  8. package/web/app/immutable/chunks/{BijK0v06.js → B0P-JC2_.js} +1 -1
  9. package/web/app/immutable/chunks/{35Abwqb8.js → B1ZQMY3n.js} +1 -1
  10. package/web/app/immutable/chunks/{DPjKoP0i.js → B1eUs-GT.js} +1 -1
  11. package/web/app/immutable/chunks/{BRnGfHTw.js → B1qL2mIF.js} +1 -1
  12. package/web/app/immutable/chunks/{B9amR_Dw.js → B2YL0V12.js} +2 -2
  13. package/web/app/immutable/chunks/{DzIxZpb5.js → B4aLuSlK.js} +1 -1
  14. package/web/app/immutable/chunks/{CGtYoV-M.js → BAeRDdCp.js} +1 -1
  15. package/web/app/immutable/chunks/{D-0OyyJ-.js → BE2e7JDe.js} +4 -4
  16. package/web/app/immutable/chunks/{8KgyPQ3T.js → BFQ4zSOP.js} +1 -1
  17. package/web/app/immutable/chunks/{45QsePdz.js → BI6d_Sls.js} +1 -1
  18. package/web/app/immutable/chunks/{B1LNS3z1.js → BIKajrVX.js} +1 -1
  19. package/web/app/immutable/chunks/{BaUdwTLR.js → BKh5-nTu.js} +1 -1
  20. package/web/app/immutable/chunks/{CW_-qhL6.js → BLBVN-SC.js} +1 -1
  21. package/web/app/immutable/chunks/{CdoqAJxX.js → BMcTRN7B.js} +1 -1
  22. package/web/app/immutable/chunks/{sY5iwEvB.js → BO7tTahy.js} +1 -1
  23. package/web/app/immutable/chunks/{DvvcnI1d.js → BRqXLjM4.js} +1 -1
  24. package/web/app/immutable/chunks/{QLQGj8FM.js → BSjdkOXN.js} +1 -1
  25. package/web/app/immutable/chunks/{DIdnzamn.js → BT9dxP4b.js} +1 -1
  26. package/web/app/immutable/chunks/{6UD6ce2L.js → BUBp-Ovl.js} +1 -1
  27. package/web/app/immutable/chunks/{BM2UZlzL.js → Bd_hasKp.js} +1 -1
  28. package/web/app/immutable/chunks/{CZK_hhNB.js → BlnajRfF.js} +1 -1
  29. package/web/app/immutable/chunks/{C-NtAnvC.js → BuYqXi0L.js} +3 -3
  30. package/web/app/immutable/chunks/{CVThxHG5.js → Bxc9qqDR.js} +1 -1
  31. package/web/app/immutable/chunks/{B7Gvu3ge.js → C2UoIc_W.js} +1 -1
  32. package/web/app/immutable/chunks/{DDk5F5sJ.js → C3Gh2blV.js} +1 -1
  33. package/web/app/immutable/chunks/{Cos6Oz-0.js → C7sevXRg.js} +2 -2
  34. package/web/app/immutable/chunks/{BrKws6Hg.js → C9gmZxfY.js} +1 -1
  35. package/web/app/immutable/chunks/{CUN_OmMV.js → CBPH6RMz.js} +1 -1
  36. package/web/app/immutable/chunks/{DviY4ewX.js → CHM8aaKI.js} +1 -1
  37. package/web/app/immutable/chunks/{TSjT7_nb.js → CI3AMzpC.js} +1 -1
  38. package/web/app/immutable/chunks/{dSslqs4g.js → CJ00qudQ.js} +1 -1
  39. package/web/app/immutable/chunks/{B7nuZ1_v.js → CJDdIkUD.js} +1 -1
  40. package/web/app/immutable/chunks/{CEYy0s6D.js → CLjY0iIn.js} +1 -1
  41. package/web/app/immutable/chunks/{C1osHF_0.js → CS4gjpMT.js} +1 -1
  42. package/web/app/immutable/chunks/{B1n8qNyV.js → CWY8k4gh.js} +1 -1
  43. package/web/app/immutable/chunks/{BSxHv8Xq.js → CWkugLNW.js} +1 -1
  44. package/web/app/immutable/chunks/{flLDz0wy.js → CYgBZucw.js} +3 -3
  45. package/web/app/immutable/chunks/{Ck6vtPRk.js → Cc-3_ZEX.js} +1 -1
  46. package/web/app/immutable/chunks/{CgnBGHkd.js → Cc2PZs8y.js} +1 -1
  47. package/web/app/immutable/chunks/{C4EI4OBa.js → Cc3t1-St.js} +1 -1
  48. package/web/app/immutable/chunks/{DpYvU5Um.js → CdFUlmVm.js} +1 -1
  49. package/web/app/immutable/chunks/{DZNIagbG.js → CdG4iBQs.js} +1 -1
  50. package/web/app/immutable/chunks/{BwJMslX3.js → CdceEfVS.js} +1 -1
  51. package/web/app/immutable/chunks/{D10SNJ1_.js → CeFwx3XL.js} +1 -1
  52. package/web/app/immutable/chunks/{CIJwENwL.js → CeRfV5NA.js} +2 -2
  53. package/web/app/immutable/chunks/{30NFOQmG.js → Ceet7yGK.js} +1 -1
  54. package/web/app/immutable/chunks/{C79QqXwO.js → Cg13XVA6.js} +1 -1
  55. package/web/app/immutable/chunks/{CDJoB6qE.js → CgpO_ER6.js} +1 -1
  56. package/web/app/immutable/chunks/{D_Ap2MX5.js → ChCpmZvV.js} +1 -1
  57. package/web/app/immutable/chunks/{Bc1QJkrz.js → ChGUMi8s.js} +4 -4
  58. package/web/app/immutable/chunks/{CnerPXkc.js → CkzLAxTX.js} +1 -1
  59. package/web/app/immutable/chunks/{CJfLFNWH.js → ClkoN0_7.js} +1 -1
  60. package/web/app/immutable/chunks/{DJLlczwf.js → Cmktqw1t.js} +1 -1
  61. package/web/app/immutable/chunks/{albOkVDz.js → CpSj3JZp.js} +3 -3
  62. package/web/app/immutable/chunks/{BcQstxJy.js → Cr6nDIxG.js} +1 -1
  63. package/web/app/immutable/chunks/{DyKitUYt.js → CuuefJC4.js} +1 -1
  64. package/web/app/immutable/chunks/{DC9x0YsA.js → Cx3mm-QI.js} +1 -1
  65. package/web/app/immutable/chunks/{wYGoLdpP.js → Cy1w4EdG.js} +4 -4
  66. package/web/app/immutable/chunks/{Dzqx9T0R.js → Cy6EJnAj.js} +1 -1
  67. package/web/app/immutable/chunks/{CcR6hTRV.js → D0JTb-x1.js} +1 -1
  68. package/web/app/immutable/chunks/{DYKYmG2J.js → D2MxkB-j.js} +1 -1
  69. package/web/app/immutable/chunks/{BvWol2Sw.js → D4JPXZyy.js} +1 -1
  70. package/web/app/immutable/chunks/{BvjZuj8o.js → D4zAmJHw.js} +3 -3
  71. package/web/app/immutable/chunks/{B7bT6NAZ.js → D6uMWlr5.js} +1 -1
  72. package/web/app/immutable/chunks/{OYmfktdC.js → D7YcNS-l.js} +1 -1
  73. package/web/app/immutable/chunks/{uPMCm9Pm.js → DB0FiVwX.js} +1 -1
  74. package/web/app/immutable/chunks/{DtPZkNWy.js → DBNIVHC3.js} +1 -1
  75. package/web/app/immutable/chunks/{BbGz1HlB.js → DEyE92PJ.js} +2 -2
  76. package/web/app/immutable/chunks/{OvvfQBFA.js → DIAwHvqh.js} +1 -1
  77. package/web/app/immutable/chunks/{DPLUySBU.js → DN4HOaG2.js} +1 -1
  78. package/web/app/immutable/chunks/{CQ6CVL3L.js → DNhsoFiW.js} +3 -3
  79. package/web/app/immutable/chunks/{DS4ybXeD.js → DOFEO5SQ.js} +2 -2
  80. package/web/app/immutable/chunks/{D6ElSvvJ.js → DU2uhw3t.js} +1 -1
  81. package/web/app/immutable/chunks/{Bwg8RlLb.js → DUiZSnMh.js} +1 -1
  82. package/web/app/immutable/chunks/{CJwbqrYr.js → DVtimWsJ.js} +1 -1
  83. package/web/app/immutable/chunks/{CE2pU2o0.js → DZGJMqUt.js} +1 -1
  84. package/web/app/immutable/chunks/{CGIjwhyC.js → D_sSf0vv.js} +1 -1
  85. package/web/app/immutable/chunks/{C_TBf9DC.js → DcRC-D9-.js} +1 -1
  86. package/web/app/immutable/chunks/{Bo59l9mg.js → DiCe745f.js} +1 -1
  87. package/web/app/immutable/chunks/{DF9k8p1N.js → DiJfTLSL.js} +1 -1
  88. package/web/app/immutable/chunks/{BwLafg6q.js → DjQNgs4p.js} +9 -9
  89. package/web/app/immutable/chunks/{DBdzw54p.js → DlOELRPg.js} +1 -1
  90. package/web/app/immutable/chunks/{DC76IZQY.js → Dlqod_D5.js} +1 -1
  91. package/web/app/immutable/chunks/{DIo33rol.js → Dmx6eQHl.js} +1 -1
  92. package/web/app/immutable/chunks/{C7QKX6x1.js → DnLdM-QZ.js} +1 -1
  93. package/web/app/immutable/chunks/{CD3udzsw.js → DoBxwPW8.js} +12 -12
  94. package/web/app/immutable/chunks/{FtuGuqb0.js → DqpwsXVv.js} +1 -1
  95. package/web/app/immutable/chunks/{C5skVbkJ.js → DryTclNg.js} +1 -1
  96. package/web/app/immutable/chunks/{BXyyUale.js → Dy-xIfFO.js} +1 -1
  97. package/web/app/immutable/chunks/{nVnAPmkz.js → DzBwn-Yt.js} +1 -1
  98. package/web/app/immutable/chunks/{BBbceDnm.js → DzKmanpI.js} +2 -2
  99. package/web/app/immutable/chunks/{BJtGyZ9L.js → DzM_rrom.js} +1 -1
  100. package/web/app/immutable/chunks/{Dl9kaa36.js → EUuCRgBG.js} +2 -2
  101. package/web/app/immutable/chunks/{Cul-vf25.js → GP5gU8GB.js} +2 -2
  102. package/web/app/immutable/chunks/{Cb-gdBM3.js → ISabpJyz.js} +1 -1
  103. package/web/app/immutable/chunks/{Xitto2ql.js → IUYHwj-Q.js} +1 -1
  104. package/web/app/immutable/chunks/{C30NbvEJ.js → LiN3qoUD.js} +1 -1
  105. package/web/app/immutable/chunks/{DsBkWBKg.js → MdBXkHgJ.js} +1 -1
  106. package/web/app/immutable/chunks/{DhiXRQzT.js → NSeFolqL.js} +6 -6
  107. package/web/app/immutable/chunks/{CAs5l0X_.js → SB0oeZZm.js} +1 -1
  108. package/web/app/immutable/chunks/{LHFbtKF0.js → YUTOcxSv.js} +1 -1
  109. package/web/app/immutable/chunks/{nf3NNIUa.js → _DgrG-uz.js} +1 -1
  110. package/web/app/immutable/chunks/{CcsetI5k.js → ao08AFko.js} +1 -1
  111. package/web/app/immutable/chunks/{BPdPv8hu.js → bTTOLC6Y.js} +1 -1
  112. package/web/app/immutable/chunks/{BCUawUBQ.js → bqt2f6_K.js} +1 -1
  113. package/web/app/immutable/chunks/{CtzYQtk5.js → nwJTcqVj.js} +1 -1
  114. package/web/app/immutable/chunks/{BGq8aLdc.js → pd6ci8R7.js} +1 -1
  115. package/web/app/immutable/chunks/{B97N_7xe.js → q04RkU5w.js} +1 -1
  116. package/web/app/immutable/chunks/{vNAwiwWq.js → sLhSSNGJ.js} +1 -1
  117. package/web/app/immutable/chunks/{Bv-doMP-.js → sxD3pQ34.js} +1 -1
  118. package/web/app/immutable/chunks/{DB3xWWab.js → uDKsIseI.js} +1 -1
  119. package/web/app/immutable/chunks/{BkM1sNrB.js → vOds2UO6.js} +1 -1
  120. package/web/app/immutable/chunks/{BOvnJANl.js → vuPofDJd.js} +1 -1
  121. package/web/app/immutable/chunks/{EdrtlkX6.js → wYgRppwI.js} +1 -1
  122. package/web/app/immutable/chunks/{BYZMzcnz.js → wkk-WhNm.js} +1 -1
  123. package/web/app/immutable/chunks/{D12mpB59.js → xB4HOmid.js} +1 -1
  124. package/web/app/immutable/chunks/{Dd-xLE-b.js → z4kq6KWc.js} +1 -1
  125. package/web/app/immutable/chunks/{1NJgD6I8.js → zBPK5s1-.js} +1 -1
  126. package/web/app/immutable/entry/{app.v-wfa2Wf.js → app.DxHiQ2oX.js} +2 -2
  127. package/web/app/immutable/entry/start.BiwGykY4.js +1 -0
  128. package/web/app/immutable/nodes/{0.C_mnGSyv.js → 0.CN8CENFf.js} +1 -1
  129. package/web/app/immutable/nodes/{1.SutvvOJ3.js → 1.BA-nuCLe.js} +1 -1
  130. package/web/app/immutable/nodes/{10.BKfnVKgL.js → 10.CZGA3bGf.js} +1 -1
  131. package/web/app/immutable/nodes/{14.DCIw8BXO.js → 14.BhhKV3d_.js} +1 -1
  132. package/web/app/immutable/nodes/{17.DFgka5Fq.js → 17.KM-T33gb.js} +2 -2
  133. package/web/app/immutable/nodes/{2.D3TsTQd5.js → 2.DPjewEhy.js} +4 -4
  134. package/web/app/immutable/nodes/{3.CuAjL6uQ.js → 3.CFq56H2j.js} +1 -1
  135. package/web/app/immutable/nodes/{4.-mmIMdIj.js → 4.r9Tkg-el.js} +1 -1
  136. package/web/app/immutable/nodes/{5.CpltS0rf.js → 5.DyN42GGq.js} +1 -1
  137. package/web/app/immutable/nodes/{6.BXrpgQNv.js → 6.CcFwXeH9.js} +1 -1
  138. package/web/app/immutable/nodes/{7.C5-H0qSi.js → 7.utZT-aFD.js} +1 -1
  139. package/web/app/immutable/nodes/{8.fVs5tHGP.js → 8.Cj-VG2gq.js} +4 -4
  140. package/web/app/immutable/nodes/{9.CvYPi6Ov.js → 9.DAntSadP.js} +4 -4
  141. package/web/app/version.json +1 -1
  142. package/web/generated/paraglide.js +8 -8
  143. package/web/index.html +9 -9
  144. package/web/app/immutable/entry/start.BANzb2Nz.js +0 -1
@@ -1 +1 @@
1
- import{b as a,B as w,ay as x}from"./Bc1QJkrz.js";var g=a((e,t,i,r)=>{e.attr("class",i);const{width:o,height:h,x:n,y:c}=u(e,t);w(e,h,o,r);const s=B(n,c,o,h,t);e.attr("viewBox",s),x.debug(`viewBox configured: ${s} with padding: ${t}`)},"setupViewPortForSVG"),u=a((e,t)=>{const i=e.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:i.width+t*2,height:i.height+t*2,x:i.x,y:i.y}},"calculateDimensionsWithPadding"),B=a((e,t,i,r,o)=>`${e-o} ${t-o} ${i} ${r}`,"createViewBox");export{g as s};
1
+ import{b as a,B as w,ay as x}from"./ChGUMi8s.js";var g=a((e,t,i,r)=>{e.attr("class",i);const{width:o,height:h,x:n,y:c}=u(e,t);w(e,h,o,r);const s=B(n,c,o,h,t);e.attr("viewBox",s),x.debug(`viewBox configured: ${s} with padding: ${t}`)},"setupViewPortForSVG"),u=a((e,t)=>{const i=e.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:i.width+t*2,height:i.height+t*2,x:i.x,y:i.y}},"calculateDimensionsWithPadding"),B=a((e,t,i,r,o)=>`${e-o} ${t-o} ${i} ${r}`,"createViewBox");export{g as s};
@@ -1,4 +1,4 @@
1
- var $l=Object.defineProperty;var Ol=(r,t,n)=>t in r?$l(r,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[t]=n;var kn=(r,t,n)=>Ol(r,typeof t!="symbol"?t+"":t,n);import{t as It,br as g,a_ as B,bz as St,b as Tt,bp as f,bt as Kn,bv as dr,bu as ql,bs as ha}from"./DXyyWeag.js";import{ai as aa,bs as Ct,ca as sr,aD as e,bH as j,ay as xe,bS as T,a7 as Rt,W as u,a5 as z,bA as R,bn as At,c9 as s,bV as we,aA as m,b_ as $,aj as Sr,aB as I,be as gr,b$ as Or,bO as J,bf as or,c0 as Cn,bl as oe,bj as jn,c6 as Dl,bo as za,br as Yr,am as Dn,ax as Bn,bk as as,aw as va,bz as ss,cb as ms,c5 as Ha,aC as xr,cd as _o,bv as Bl}from"./DYhIMPy1.js";import{n as Tr,u as te,v as ze,g as _n,s as ps,w as _a,j as kt,l as ar,p as Yn,I as Fl,i as ya,r as zl,o as eo,X as _i,q as Wl,S as Hl,C as Ul}from"./CjaOLL1c.js";import{I as Kt,F as qa,c as ea,j as jl,s as yi,p as to,y as Vl,u as Kl,t as $r,g as oa,B as ws,E as os,S as Gl}from"./BboIV5H5.js";import{b as cn}from"./BaIAhI85.js";import{f as Xe,bj as Ql,am as ro,bt as Zl,bx as xs,bL as Jl}from"./Bfr1QjPr.js";import"./Co9PgWQA.js";import"./BKnW-cqy.js";import"./Dwmx7Nbz.js";import{s as Ln}from"./Cuqq8bL5.js";import{F as jt,a0 as zs,bc as Tn,cF as no,aq as bi,aV as wi,aG as Xl,c4 as Yl,a2 as is,aJ as ed,cI as td,cH as rd,$ as vs,as as ao,I as yo,af as nd,bq as ad,aO as sd,aT as od,bF as id,ak as ld,cx as dd,ay as bo,aL as wo,bX as ks,aE as Ua,cR as cd,c6 as ud,bj as fd,b as gd,ck as md,ac as pd,b6 as Is,cm as xa,cA as vd,a as hd}from"./BTdkHPOB.js";import{c as xi,A as _d,x as yd}from"./CX_KiszT.js";import{b as Ss,V as xo}from"./3kWnZLsh.js";import{a as ki,b7 as Pr,A as Ga,ao as Ii,s as bd,n as Si,d as wd,I as xd,R as kd,ax as Id,a0 as Sd}from"./BwLafg6q.js";import{bX as Ti,j as Qa,a6 as Ws,al as ls,F as Td,au as Za,aN as Cd,aQ as ko}from"./CDJoB6qE.js";import{t as ia,o as Ad}from"./4NMrKcis.js";import{c3 as Ja,aC as Da,cQ as Ci,cS as Vn,bU as hs,j as Md,cJ as Ai,cP as _s,cO as Mi,cM as Pi,g as Nn,aa as Pd,ab as Rd,ax as Ed,s as Nd,K as Ld,W as Io,v as Ri,dO as $d,at as Od,k as qd,u as Ts,a6 as Dd,n as Bd,O as Fd,o as zd,S as Wd,R as Hd,a0 as Ud,q as Ei,r as Ni,l as jd,cT as Vd,a4 as Kd,D as Gd,x as Qd,V as So}from"./Cg2SHWhQ.js";import{Iy as yt,oA as Zd,ta as Xa,np as To,v2 as Li,v4 as $i,ro as Jd,x_ as ds,ul as Oi,nk as qi,be as Ya,x$ as Xd,q2 as Yd,sH as ec,uX as Di,nj as tc,mq as rc,g as nc,yr as ac,yo as sc,yq as oc}from"./D5ej8a-y.js";import{a2 as ic,x as Cs,a0 as lc,O as As,V as dc,_ as cc,j as uc,o as ka,M as fa,p as fc,F as gc,u as mc,s as pc,L as Ms,J as vc,y as hc,K as _c,Z as Ma,Q as ja,N as Co,m as Ao,E as yc,c as Ps,B as Mo,z as bc,v as Po,H as Pa,P as wc,G as xc,i as kc,R as Ic,T as Sc,A as Tc,g as Cc,b as Ac,D as Mc,f as Pc,e as Rc,a as Ec,C as Nc,h as Lc,U as Bi,a3 as $c,t as Oc,k as qc,d as Ro}from"./CQ6CVL3L.js";import{i as Dc,e as Bc}from"./DEYvT_CO.js";import{g as Rs}from"./BvFAWM27.js";import{M as Ia,C as Ra}from"./wYGoLdpP.js";import{C as Eo}from"./C5skVbkJ.js";import"./CUN_OmMV.js";import{P as Fc}from"./BM2UZlzL.js";import"./DlErnbqC.js";import{c as Fi}from"./ChTqQfQN.js";import{S as zc}from"./B7bT6NAZ.js";import{D as No,M as Wc}from"./Bc1QJkrz.js";import{b as Hc,s as na,c as cs}from"./DDk5F5sJ.js";import{O as es,y as Es,E as Ns,B as Ls,N as Uc,m as jc,l as Vc,d as us,C as Lo,f as Kc,e as Gc,g as Qc}from"./DIo33rol.js";import{a as zi,s as $o}from"./BsieX9dN.js";import{f as Zc}from"./BdWqymET.js";import{c as dn}from"./CKJ3ApuI.js";import{P as Jc}from"./D6bHtnlF.js";import{v as $s,t as Os,K as Oo,h as Xc}from"./35Abwqb8.js";import{R as Hs,C as ys,k as Yc,h as eu,g as tu,i as qo,P as ru}from"./DT4bpJWb.js";import"./DJkHth-B.js";import{R as Do,x as Na,o as Wi}from"./Cul-vf25.js";import{B as nu}from"./D8HvPJQc.js";import{o as Hi,r as au,e as su}from"./DC76IZQY.js";import{o as Ui}from"./CIJwENwL.js";import{g as so}from"./B5m4HK_m.js";import{a as ou,M as iu}from"./BybfkKTj.js";import{c as Sa}from"./CnVt0JNG.js";import{A as lu}from"./CBd4V6kc.js";import{f as du,d as cu}from"./B7Gvu3ge.js";import{a8 as uu,N as fu,Y as gu,K as Bo,X as mu,v as pu}from"./C-NtAnvC.js";import{a as vu}from"./CC7to1B5.js";import{G as hu}from"./DyvrH0mm.js";import{S as _u}from"./gIO_Cads.js";import{u as yu,a as bu,c as Fo,S as wu}from"./DfxQWSVU.js";import{T as Us}from"./BqxV3q0f.js";import"./C5oPUaEZ.js";import{g as xu}from"./ChOlbK8y.js";import{a as ku}from"./D-hrwg9Y.js";import{b as Iu}from"./2YGlULfT.js";import{b as zo}from"./p7znhYIU.js";import{g as Su,i as Tu,a as Cu}from"./ppRpwazH.js";import{n as Wo,o as Ho,b as ma,s as Ta,_ as qs,e as Au}from"./CIyUrgF0.js";import{aW as Un,B as Mu}from"./BAKm0uzb.js";import{y as Pu}from"./ChkzKl5W.js";import{c as Ru}from"./DhiXRQzT.js";function Eu(r){if(!r||typeof r!="object")return null;const t=r;if(t.type!=="script_monitor_wake"||t.source!=="system")return null;const{scriptName:n,scriptId:a,runId:o,monitorId:i,workspaceId:d,reason:c}=t;if(typeof n!="string"||typeof a!="string"||!a||typeof o!="string"||!o||typeof i!="string"||!i||typeof d!="string"||!d||c!=="finished"&&c!=="ttl-expired"&&c!=="output-match"&&c!=="line-count")return null;const v=t.trigger;return{scriptName:n,scriptId:a,runId:o,monitorId:i,workspaceId:d,reason:c,...c==="output-match"&&typeof v?.matchedLine=="string"?{matchedLine:v.matchedLine}:{}}}function Nu(r){return r?.type==="script_monitor_wake"&&!("remoteAgentId"in r)}function Lu(r,t,n,a=!1){if(!r||!t)return{edit:!1,remove:!1,sendNow:!1};const o=r.messageMetadata?.fromPrincipalId??r.author?.principalId,i=uu(r)&&r.author?.principalId!==null&&o===t;return{edit:i,remove:i||t===n||a,sendNow:(i||a)&&!ji(r)}}function Ca(r,t){if(t)return r.find(n=>n.editing&&n.editingMessageId?n.editingMessageId===t:n.id===t)}function ji(r){return Nu(r.messageMetadata)&&typeof r.messageMetadata?.monitorId=="string"}function Uo(r,t=Date.now()){const n=r.messageMetadata,a=n?.fromPrincipalId,o=n&&Object.hasOwn(n,"humanAuthor")&&!(typeof a=="string"&&a.length>0),i=r.holdKind!==void 0&&Date.parse(r.holdUntil??"")>t;return!r.editing&&!i&&!o&&!ji(r)}const j_="pl-3.5! pr-2!";var $u=I('<span class="tile-remove-slot svelte-d8pwpf"><!></span>'),jo=I('<span class="attachment-status svelte-d8pwpf"> </span>'),Ou=I('<div class="file-image tile svelte-d8pwpf" data-kind="file"><!> <!> <div class="tile-actions svelte-d8pwpf"><!> <!></div></div>'),qu=I("<!><span> </span>",1),Du=I('<img alt="" draggable="false"/>'),Bu=I('<span class="summary svelte-d8pwpf" data-clip-summary=""> </span>'),Fu=I('<span class="clip svelte-d8pwpf"><span class="record-dot svelte-d8pwpf" aria-hidden="true"></span><span class="duration svelte-d8pwpf"> </span><!></span>'),zu=I('<div class="tile svelte-d8pwpf"><!> <!> <div class="tile-actions svelte-d8pwpf"><!> <!></div></div>'),Wu=I('<div class="attachment-row svelte-d8pwpf" role="group" data-dock-media-attachments=""></div>'),Hu=I("<!> <!> <!>",1),Uu=I('<img draggable="false" class="svelte-d8pwpf"/>'),ju=I('<video controls="" playsinline="" class="svelte-d8pwpf"></video>',2),Vu=I('<div class="media-viewer svelte-d8pwpf"><!></div>'),Ku=I("<!> <!>",1);function Gu(r,t){if(new.target)return It({component:Gu,...r});Ct(t,!0);const n=(O,ye=or,pe=or)=>{var A=$u(),ge=z(A);Xe(ge,{variant:"secondary",size:"icon-sm",class:"tile-action tile-remove",get disabled(){return i()},get"aria-label"(){return pe()},tooltipContentClass:"dock-chrome-tooltip",get tooltip(){return pe()},onclick:()=>q(ye()),children:(Te,Be)=>{Ss(Te,{glyph:"x"})},$$slots:{default:!0}}),R(A),u(O,A)};let a=g(t,"items",7),o=g(t,"labels",7),i=g(t,"disabled",7,!1),d=g(t,"onMarkUp",7),c=g(t,"onEdit",7),v=g(t,"onRemove",7),h=g(t,"onRetry",7),b=g(t,"onCopy",7),k=g(t,"onMenu",7);const N=O=>O.owner==="attachment"?2:{image:0,clip:1,file:2}[O.kind],Y=s(()=>[...a()].sort((O,ye)=>N(O)-N(ye)));let S=we(null),D=we(!1),ie=we(null),X=null;const M=s(()=>a().find(O=>O.id===e(ie)));sr(()=>{(!e(M)||e(M).kind==="image"&&!W(e(M)))&&j(D,!1)});function W(O){return O.kind==="image"&&O.status!=="placing"&&O.status!=="failed"&&O.url.trim().length>0}function E(O){return O.kind==="image"?o().image(O.markCount):O.kind==="clip"?O.summary?`${o().clip(O.duration)} ${O.summary}`:o().clip(O.duration):O.name}function ne(O,ye){if(!(i()||O.kind==="file"||O.kind==="image"&&!W(O)||O.kind==="clip"&&(!O.url||O.recording))){if((O.kind==="clip"||O.kind==="image")&&c()){c()(O.id);return}X=ye,j(ie,O.id,!0),j(D,!0)}}async function q(O){i()||(e(ie)===O&&j(D,!1),v()(O),await Cn(),(!document.activeElement||document.activeElement===document.body)&&e(S)?.querySelector("button:not(:disabled)")?.focus())}function F(O){const ye=a().find(pe=>pe.id===O);i()||!ye||!W(ye)||(j(D,!1),c()?c()(O):d()(O))}function ae(O,ye){O.key!=="Delete"||i()||(O.preventDefault(),O.stopPropagation(),q(ye))}function C(O){return O.status==="placing"||O.status==="failed"?!1:O.kind==="image"?!!O.file||W(O):O.kind==="clip"&&!O.recording&&!!O.url}function ee(O,ye){const pe=Ql()?O.metaKey:O.ctrlKey,A=O.key.toLowerCase();if(pe&&!O.shiftKey&&!O.altKey&&(A==="c"||A==="x")){if(!b()||!C(ye)||(O.preventDefault(),O.stopPropagation(),A==="x"&&i()))return;b()(ye.id,A==="x");return}ae(O,ye.id)}function le(O,ye){!k()||!C(ye)||(O.preventDefault(),k()(ye.id))}var me={get items(){return a()},set items(O){a(O),m()},get labels(){return o()},set labels(O){o(O),m()},get disabled(){return i()},set disabled(O=!1){i(O),m()},get onMarkUp(){return d()},set onMarkUp(O){d(O),m()},get onEdit(){return c()},set onEdit(O){c(O),m()},get onRemove(){return v()},set onRemove(O){v(O),m()},get onRetry(){return h()},set onRetry(O){h(O),m()},get onCopy(){return b()},set onCopy(O){b(O),m()},get onMenu(){return k()},set onMenu(O){k(O),m()},$set:St,$on:(O,ye)=>Tt(t,O,ye)},_e=Ku(),Re=xe(_e);{var Le=O=>{var ye=Wu();Tr(ye,21,()=>e(Y),pe=>pe.id,(pe,A)=>{var ge=Rt(),Te=xe(ge);{var Be=P=>{var Q=Ou(),re=z(Q);{let G=s(()=>i()||e(A).status==="placing");ki(re,{get id(){return e(A).id},get name(){return e(A).file.name},get type(){return e(A).file.imageMimeType},get imageData(){return e(A).file.imageData},get imageMimeType(){return e(A).file.imageMimeType},variant:"thumbnail",thumbnailClass:"size-full",class:"size-full",get disabled(){return e(G)},get placementStatus(){return e(A).status},get placementError(){return e(A).error}})}var se=T(re,2);{var ce=G=>{var Ee=jo(),De=oe(Ee,!0);$(()=>{te(Ee,"data-failed",e(A).status==="failed"||void 0),te(Ee,"role",e(A).status==="failed"?"alert":"status"),te(Ee,"title",e(A).error),J(De,e(A).status==="failed"?e(A).error??o().attachmentFailed:o().attachmentPending)}),u(G,Ee)};B(se,G=>{e(A).status&&G(ce)})}var w=T(se,2),Se=z(w);{var Ae=G=>{Xe(G,{variant:"primary",size:"icon-sm",class:"tile-action",get disabled(){return i()},get"aria-label"(){return o().retry},tooltipContentClass:"dock-chrome-tooltip",get tooltip(){return o().retry},onclick:()=>h()?.(e(A).id),children:(Ee,De)=>{jt(Ee,{get icon(){return zs},size:16})},$$slots:{default:!0}})};B(Se,G=>{e(A).status==="failed"&&h()&&G(Ae)})}var L=T(Se,2);{let G=s(()=>f.chat_attachmentPreview_remove_ariaLabel({name:e(A).file.name}));n(L,()=>e(A).id,()=>e(G))}R(w),R(Q),$(()=>te(Q,"data-attachment-id",e(A).id)),Sr("keydown",Q,G=>ee(G,e(A))),Sr("contextmenu",Q,G=>le(G,e(A))),Kt(1,Q,()=>qa,()=>({tier:"fast",y:3,scale:.98})),Kt(2,Q,()=>ea,()=>({tier:"fast"})),u(P,Q)},Ce=P=>{const Q=s(()=>e(A).kind==="image"&&!W(e(A))&&e(A).status!=="failed");var re=zu(),se=z(re);{var ce=ve=>{Xe(ve,{type:"button",variant:"ghost",wrapContent:!1,class:"open-tile file",get"aria-label"(){return e(A).name},get disabled(){return i()},onkeydown:Oe=>ae(Oe,e(A).id),children:(Oe,U)=>{var ue=qu(),ot=xe(ue);jt(ot,{get icon(){return Tn},size:20});var xt=T(ot),mt=oe(xt,!0);$(()=>J(mt,e(A).name)),u(Oe,ue)},$$slots:{default:!0}})},w=ve=>{{let Oe=s(()=>E(e(A))),U=s(()=>i()||e(A).kind==="clip"&&(e(A).recording||!e(A).url));Xe(ve,{type:"button",variant:"ghost",wrapContent:!1,class:"open-tile",get"aria-label"(){return e(Oe)},get disabled(){return e(U)},onkeydown:ue=>ee(ue,e(A)),onclick:ue=>{ue.currentTarget instanceof HTMLElement&&ne(e(A),ue.currentTarget)},children:(ue,ot)=>{var xt=Rt(),mt=xe(xt);{var Ft=je=>{var bt=Du();$(()=>te(bt,"src",e(A).url)),u(je,bt)},pt=je=>{var bt=Fu(),at=T(z(bt)),dt=oe(at,!0),$e=T(at);{var ft=K=>{var _=Bu(),he=oe(_,!0);$(()=>J(he,e(A).summary)),u(K,_)};B($e,K=>{e(A).summary&&K(ft)})}R(bt),$(()=>J(dt,e(A).duration)),u(je,bt)};B(mt,je=>{e(A).kind==="image"?je(Ft):je(pt,-1)})}u(ue,xt)},$$slots:{default:!0}})}},Se=s(()=>e(A).kind!=="image"||W(e(A)));B(se,ve=>{e(A).kind==="file"?ve(ce):e(Se)&&ve(w,1)})}var Ae=T(se,2);{var L=ve=>{var Oe=jo(),U=oe(Oe,!0);$(()=>{te(Oe,"data-failed",e(A).status==="failed"||void 0),te(Oe,"role",e(A).status==="failed"?"alert":"status"),te(Oe,"title",e(A).error),J(U,e(A).status==="failed"?e(A).error??o().attachmentFailed:o().attachmentPending)}),u(ve,Oe)};B(Ae,ve=>{(e(A).status||e(Q))&&ve(L)})}var G=T(Ae,2),Ee=z(G);{var De=ve=>{Xe(ve,{variant:"primary",size:"icon-sm",class:"tile-action",get disabled(){return i()},get"aria-label"(){return o().retry},tooltipContentClass:"dock-chrome-tooltip",get tooltip(){return o().retry},onclick:()=>h()?.(e(A).id),children:(Oe,U)=>{jt(Oe,{get icon(){return zs},size:16})},$$slots:{default:!0}})},Je=ve=>{{let Oe=s(()=>c()?o().edit:o().markUp),U=s(()=>c()?o().edit:o().markUp);Xe(ve,{variant:"primary",size:"icon-sm",class:"tile-action",get disabled(){return i()},get"aria-label"(){return e(Oe)},tooltipContentClass:"dock-chrome-tooltip",get tooltip(){return e(U)},onclick:()=>F(e(A).id),children:(ue,ot)=>{Ss(ue,{glyph:"pencil"})},$$slots:{default:!0}})}},Ge=s(()=>W(e(A))),Bt=ve=>{{let Oe=s(()=>c()?o().edit:o().play),U=s(()=>c()?o().edit:o().play);Xe(ve,{variant:"primary",size:"icon-sm",class:"tile-action",get disabled(){return i()},get"aria-label"(){return e(Oe)},tooltipContentClass:"dock-chrome-tooltip",get tooltip(){return e(U)},onclick:ue=>{ue.currentTarget instanceof HTMLElement&&ne(e(A),ue.currentTarget)},children:(ue,ot)=>{{let xt=s(()=>c()?"pencil":"play");Ss(ue,{get glyph(){return e(xt)}})}},$$slots:{default:!0}})}};B(Ee,ve=>{e(A).status==="failed"&&h()?ve(De):e(Ge)?ve(Je,1):e(A).kind==="clip"&&!e(A).recording&&e(A).url&&ve(Bt,2)})}var ke=T(Ee,2);n(ke,()=>e(A).id,()=>o().remove),R(G),R(re),$(()=>{te(re,"data-kind",e(A).kind),te(re,"data-attachment-id",e(A).id),te(re,"aria-busy",e(Q)||void 0)}),Sr("contextmenu",re,ve=>le(ve,e(A))),Kt(1,re,()=>qa,()=>({tier:"fast",y:3,scale:.98})),Kt(2,re,()=>ea,()=>({tier:"fast"})),u(P,re)};B(Te,P=>{e(A).kind==="image"&&e(A).file?P(Be):P(Ce,-1)})}u(pe,ge)}),R(ye),cn(ye,pe=>j(S,pe),()=>e(S)),$(()=>te(ye,"aria-label",o().attachments)),u(O,ye)};B(Re,O=>{e(Y).length&&O(Le)})}var Ke=T(Re,2);{const O=pe=>{var A=Rt(),ge=xe(A);{var Te=Be=>{var Ce=Hu(),P=xe(Ce);{var Q=w=>{Xe(w,{variant:"primary",get disabled(){return i()},onclick:()=>e(M)&&F(e(M).id),children:(Se,Ae)=>{gr();var L=Or();$(()=>J(L,o().markUp)),u(Se,L)},$$slots:{default:!0}})},re=s(()=>W(e(M)));B(P,w=>{e(re)&&w(Q)})}var se=T(P,2);Xe(se,{variant:"secondary",get disabled(){return i()},onclick:()=>e(M)&&q(e(M).id),children:(w,Se)=>{gr();var Ae=Or();$(()=>J(Ae,o().remove)),u(w,Ae)},$$slots:{default:!0}});var ce=T(se,2);Xe(ce,{variant:"ghost-light",onclick:()=>{j(D,!1)},children:(w,Se)=>{gr();var Ae=Or();$(()=>J(Ae,o().done)),u(w,Ae)},$$slots:{default:!0}}),u(Be,Ce)};B(ge,Be=>{e(M)&&e(M).kind!=="file"&&Be(Te)})}u(pe,A)};let ye=s(()=>e(M)?E(e(M)):o().attachments);xi(Ke,{get title(){return e(ye)},size:"wide",showCloseButton:!1,onCloseAutoFocus:pe=>{pe.preventDefault(),X?.isConnected?X.focus():e(S)?.querySelector("button:not(:disabled)")?.focus()},get open(){return e(D)},set open(pe){j(D,pe,!0)},footer:O,children:(pe,A)=>{var ge=Rt(),Te=xe(ge);{var Be=Ce=>{var P=Vu(),Q=z(P);{var re=w=>{var Se=Uu();$(Ae=>{te(Se,"src",e(M).url),te(Se,"alt",Ae)},[()=>E(e(M))]),u(w,Se)},se=s(()=>e(M).kind==="image"&&W(e(M))),ce=w=>{var Se=ju();$(Ae=>{te(Se,"src",e(M).url),te(Se,"aria-label",Ae)},[()=>E(e(M))]),u(w,Se)};B(Q,w=>{e(se)?w(re):e(M).kind==="clip"&&e(M).url&&w(ce,1)})}R(P),u(Ce,P)};B(Te,Ce=>{e(M)&&e(M).kind!=="file"&&Ce(Be)})}u(pe,ge)},$$slots:{footer:!0,default:!0}})}return u(r,_e),At(me)}aa(["keydown","contextmenu"]);var Qu=I("<!> ",1),Zu=I('<div class="flex flex-col gap-2 px-4 py-3 bg-muted/30 border border-border rounded-lg my-4"><div class="flex items-center justify-between gap-2"><div class="flex items-center gap-2"><div class="shrink-0 text-subtle"><!></div> <div class="font-medium text-sm"> </div></div> <div class="flex items-center gap-1"><!> <!></div></div> <div class="text-xs text-subtle"> </div> <pre class="text-xs bg-background/50 rounded p-2 overflow-x-auto max-h-40 overflow-y-auto font-mono"> </pre></div>');function Vi(r,t){if(new.target)return It({component:Vi,...r});Ct(t,!0);let n=g(t,"name",7),a=g(t,"description",7),o=g(t,"content",7),i=g(t,"onUseScript",7),d=we(!1);function c(){navigator.clipboard.writeText(o()),j(d,!0),setTimeout(()=>{j(d,!1)},2e3)}function v(){i()?.({name:n(),description:a(),content:o()})}var h={get name(){return n()},set name(C){n(C),m()},get description(){return a()},set description(C){a(C),m()},get content(){return o()},set content(C){o(C),m()},get onUseScript(){return i()},set onUseScript(C){i(C),m()},$set:St,$on:(C,ee)=>Tt(t,C,ee)},b=Zu(),k=z(b),N=z(k),Y=z(N),S=z(Y);jt(S,{get icon(){return no},size:"sm"}),R(Y);var D=T(Y,2),ie=oe(D,!0);R(N);var X=T(N,2),M=z(X);Xe(M,{variant:"ghost-light",size:"sm",onclick:c,class:"h-7 px-2",children:(C,ee)=>{var le=Qu(),me=xe(le);{let Re=s(()=>e(d)?bi:wi);jt(me,{get icon(){return e(Re)},class:"mr-1"})}var _e=T(me);$(Re=>J(_e,` ${Re??""}`),[()=>e(d)?f.chat_shared_copied_label():f.chat_shared_copy_label()]),u(C,le)},$$slots:{default:!0}});var W=T(M,2);{var E=C=>{Xe(C,{variant:"ghost-light",size:"sm",onclick:v,class:"h-7 px-2",children:(ee,le)=>{gr();var me=Or();$(_e=>J(me,_e),[()=>f.chat_setupScriptCard_useScript_label()]),u(ee,me)},$$slots:{default:!0}})};B(W,C=>{i()&&C(E)})}R(X),R(k);var ne=T(k,2),q=oe(ne,!0),F=T(ne,2),ae=oe(F,!0);return R(b),$(()=>{J(ie,n()),J(q,a()),J(ae,o())}),u(r,b),At(h)}const wr={toolStart:/(?:\x1B\[\d+m)?🔧\s+(?:Tool call:\s+)?(.+?)(?:\x1B\[0m)?$/,toolDetail:/(?:[└├]─\s+(.+)$|^\s{3,}(.+)$)/,toolResult:/(?:\x1B\[\d+m)?📋\s+Tool result:\s+(.+?)(?:\x1B\[0m)?$/,toolSuccess:/[✓✔✅]\s+(.+)$/,toolError:/[❌✗❎]\s+(.+)$/,sessionInfo:/[Ss]ession:\s*([a-f0-9-]+)/,resumedSession:/📂?\s*Resumed session/i,assistantMarker:/🤖/,systemMarker:/💻/,userMarker:/👤/,thinkingMarker:/🤔\s*Thinking/i,waitingMarker:/^⏳\s+Running/i,indexingProgress:/^Indexing:\s*\[.*\]\s*\d+%/,agentDigest:/<agent_digest>([\s\S]*?)<\/agent_digest>/,setupScript:/<setup_script\s+name="([^"]+)"\s+description="([^"]+)">([\s\S]*?)<\/setup_script>/};class Ju{constructor(){kn(this,"buffer","");kn(this,"currentToolName",null);kn(this,"currentToolId",null);kn(this,"lastToolId",null);kn(this,"currentToolParams",[]);kn(this,"currentToolResultContent",[]);kn(this,"inToolResult",!1);kn(this,"inCodeBlock",!1);kn(this,"codeBlockLanguage","");kn(this,"codeBlockContent","");kn(this,"characterBuffer","");kn(this,"inCharacterMode",!1);kn(this,"emittedToolIds",new Set)}parseChunk(t){if(this.isMarkerLine(t.trim())){const o=[];if(this.inToolResult&&this.currentToolResultContent.length>0){const c=this.currentToolResultContent.some(h=>h.startsWith("❌")||h.startsWith("Error:")),v=this.currentToolResultContent.map(h=>h.replace(/^❌\s*/,"").replace(/^Error:\s*/,"")).join(`
1
+ var $l=Object.defineProperty;var Ol=(r,t,n)=>t in r?$l(r,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[t]=n;var kn=(r,t,n)=>Ol(r,typeof t!="symbol"?t+"":t,n);import{t as It,br as g,a_ as B,bz as St,b as Tt,bp as f,bt as Kn,bv as dr,bu as ql,bs as ha}from"./DXyyWeag.js";import{ai as aa,bs as Ct,ca as sr,aD as e,bH as j,ay as xe,bS as T,a7 as Rt,W as u,a5 as z,bA as R,bn as At,c9 as s,bV as we,aA as m,b_ as $,aj as Sr,aB as I,be as gr,b$ as Or,bO as J,bf as or,c0 as Cn,bl as oe,bj as jn,c6 as Dl,bo as za,br as Yr,am as Dn,ax as Bn,bk as as,aw as va,bz as ss,cb as ms,c5 as Ha,aC as xr,cd as _o,bv as Bl}from"./DYhIMPy1.js";import{n as Tr,u as te,v as ze,g as _n,s as ps,w as _a,j as kt,l as ar,p as Yn,I as Fl,i as ya,r as zl,o as eo,X as _i,q as Wl,S as Hl,C as Ul}from"./CjaOLL1c.js";import{I as Kt,F as qa,c as ea,j as jl,s as yi,p as to,y as Vl,u as Kl,t as $r,g as oa,B as ws,E as os,S as Gl}from"./BboIV5H5.js";import{b as cn}from"./BaIAhI85.js";import{f as Xe,bj as Ql,am as ro,bt as Zl,bx as xs,bL as Jl}from"./Bfr1QjPr.js";import"./Co9PgWQA.js";import"./BKnW-cqy.js";import"./Dwmx7Nbz.js";import{s as Ln}from"./Cuqq8bL5.js";import{F as jt,a0 as zs,bc as Tn,cF as no,aq as bi,aV as wi,aG as Xl,c4 as Yl,a2 as is,aJ as ed,cI as td,cH as rd,$ as vs,as as ao,I as yo,af as nd,bq as ad,aO as sd,aT as od,bF as id,ak as ld,cx as dd,ay as bo,aL as wo,bX as ks,aE as Ua,cR as cd,c6 as ud,bj as fd,b as gd,ck as md,ac as pd,b6 as Is,cm as xa,cA as vd,a as hd}from"./BTdkHPOB.js";import{c as xi,A as _d,x as yd}from"./CX_KiszT.js";import{b as Ss,V as xo}from"./3kWnZLsh.js";import{a as ki,b7 as Pr,A as Ga,ao as Ii,s as bd,n as Si,d as wd,I as xd,R as kd,ax as Id,a0 as Sd}from"./DjQNgs4p.js";import{bX as Ti,j as Qa,a6 as Ws,al as ls,F as Td,au as Za,aN as Cd,aQ as ko}from"./CgpO_ER6.js";import{t as ia,o as Ad}from"./4NMrKcis.js";import{c3 as Ja,aC as Da,cQ as Ci,cS as Vn,bU as hs,j as Md,cJ as Ai,cP as _s,cO as Mi,cM as Pi,g as Nn,aa as Pd,ab as Rd,ax as Ed,s as Nd,K as Ld,W as Io,v as Ri,dO as $d,at as Od,k as qd,u as Ts,a6 as Dd,n as Bd,O as Fd,o as zd,S as Wd,R as Hd,a0 as Ud,q as Ei,r as Ni,l as jd,cT as Vd,a4 as Kd,D as Gd,x as Qd,V as So}from"./Cg2SHWhQ.js";import{Iy as yt,oA as Zd,ta as Xa,np as To,v2 as Li,v4 as $i,ro as Jd,x_ as ds,ul as Oi,nk as qi,be as Ya,x$ as Xd,q2 as Yd,sH as ec,uX as Di,nj as tc,mq as rc,g as nc,yr as ac,yo as sc,yq as oc}from"./D5ej8a-y.js";import{a2 as ic,x as Cs,a0 as lc,O as As,V as dc,_ as cc,j as uc,o as ka,M as fa,p as fc,F as gc,u as mc,s as pc,L as Ms,J as vc,y as hc,K as _c,Z as Ma,Q as ja,N as Co,m as Ao,E as yc,c as Ps,B as Mo,z as bc,v as Po,H as Pa,P as wc,G as xc,i as kc,R as Ic,T as Sc,A as Tc,g as Cc,b as Ac,D as Mc,f as Pc,e as Rc,a as Ec,C as Nc,h as Lc,U as Bi,a3 as $c,t as Oc,k as qc,d as Ro}from"./DNhsoFiW.js";import{i as Dc,e as Bc}from"./DEYvT_CO.js";import{g as Rs}from"./BvFAWM27.js";import{M as Ia,C as Ra}from"./Cy1w4EdG.js";import{C as Eo}from"./DryTclNg.js";import"./CBPH6RMz.js";import{P as Fc}from"./Bd_hasKp.js";import"./DlErnbqC.js";import{c as Fi}from"./ChTqQfQN.js";import{S as zc}from"./D6uMWlr5.js";import{D as No,M as Wc}from"./ChGUMi8s.js";import{b as Hc,s as na,c as cs}from"./C3Gh2blV.js";import{O as es,y as Es,E as Ns,B as Ls,N as Uc,m as jc,l as Vc,d as us,C as Lo,f as Kc,e as Gc,g as Qc}from"./Dmx6eQHl.js";import{a as zi,s as $o}from"./BsieX9dN.js";import{f as Zc}from"./BdWqymET.js";import{c as dn}from"./CKJ3ApuI.js";import{P as Jc}from"./D6bHtnlF.js";import{v as $s,t as Os,K as Oo,h as Xc}from"./B1ZQMY3n.js";import{R as Hs,C as ys,k as Yc,h as eu,g as tu,i as qo,P as ru}from"./DT4bpJWb.js";import"./DJkHth-B.js";import{R as Do,x as Na,o as Wi}from"./GP5gU8GB.js";import{B as nu}from"./D8HvPJQc.js";import{o as Hi,r as au,e as su}from"./Dlqod_D5.js";import{o as Ui}from"./CeRfV5NA.js";import{g as so}from"./B5m4HK_m.js";import{a as ou,M as iu}from"./BybfkKTj.js";import{c as Sa}from"./CnVt0JNG.js";import{A as lu}from"./B-Eh_eo4.js";import{f as du,d as cu}from"./C2UoIc_W.js";import{a8 as uu,N as fu,Y as gu,K as Bo,X as mu,v as pu}from"./BuYqXi0L.js";import{a as vu}from"./CC7to1B5.js";import{G as hu}from"./DyvrH0mm.js";import{S as _u}from"./gIO_Cads.js";import{u as yu,a as bu,c as Fo,S as wu}from"./DfxQWSVU.js";import{T as Us}from"./BqxV3q0f.js";import"./C5oPUaEZ.js";import{g as xu}from"./ChOlbK8y.js";import{a as ku}from"./D-hrwg9Y.js";import{b as Iu}from"./2YGlULfT.js";import{b as zo}from"./p7znhYIU.js";import{g as Su,i as Tu,a as Cu}from"./ppRpwazH.js";import{n as Wo,o as Ho,b as ma,s as Ta,_ as qs,e as Au}from"./CIyUrgF0.js";import{aW as Un,B as Mu}from"./BAKm0uzb.js";import{y as Pu}from"./ChkzKl5W.js";import{c as Ru}from"./NSeFolqL.js";function Eu(r){if(!r||typeof r!="object")return null;const t=r;if(t.type!=="script_monitor_wake"||t.source!=="system")return null;const{scriptName:n,scriptId:a,runId:o,monitorId:i,workspaceId:d,reason:c}=t;if(typeof n!="string"||typeof a!="string"||!a||typeof o!="string"||!o||typeof i!="string"||!i||typeof d!="string"||!d||c!=="finished"&&c!=="ttl-expired"&&c!=="output-match"&&c!=="line-count")return null;const v=t.trigger;return{scriptName:n,scriptId:a,runId:o,monitorId:i,workspaceId:d,reason:c,...c==="output-match"&&typeof v?.matchedLine=="string"?{matchedLine:v.matchedLine}:{}}}function Nu(r){return r?.type==="script_monitor_wake"&&!("remoteAgentId"in r)}function Lu(r,t,n,a=!1){if(!r||!t)return{edit:!1,remove:!1,sendNow:!1};const o=r.messageMetadata?.fromPrincipalId??r.author?.principalId,i=uu(r)&&r.author?.principalId!==null&&o===t;return{edit:i,remove:i||t===n||a,sendNow:(i||a)&&!ji(r)}}function Ca(r,t){if(t)return r.find(n=>n.editing&&n.editingMessageId?n.editingMessageId===t:n.id===t)}function ji(r){return Nu(r.messageMetadata)&&typeof r.messageMetadata?.monitorId=="string"}function Uo(r,t=Date.now()){const n=r.messageMetadata,a=n?.fromPrincipalId,o=n&&Object.hasOwn(n,"humanAuthor")&&!(typeof a=="string"&&a.length>0),i=r.holdKind!==void 0&&Date.parse(r.holdUntil??"")>t;return!r.editing&&!i&&!o&&!ji(r)}const j_="pl-3.5! pr-2!";var $u=I('<span class="tile-remove-slot svelte-d8pwpf"><!></span>'),jo=I('<span class="attachment-status svelte-d8pwpf"> </span>'),Ou=I('<div class="file-image tile svelte-d8pwpf" data-kind="file"><!> <!> <div class="tile-actions svelte-d8pwpf"><!> <!></div></div>'),qu=I("<!><span> </span>",1),Du=I('<img alt="" draggable="false"/>'),Bu=I('<span class="summary svelte-d8pwpf" data-clip-summary=""> </span>'),Fu=I('<span class="clip svelte-d8pwpf"><span class="record-dot svelte-d8pwpf" aria-hidden="true"></span><span class="duration svelte-d8pwpf"> </span><!></span>'),zu=I('<div class="tile svelte-d8pwpf"><!> <!> <div class="tile-actions svelte-d8pwpf"><!> <!></div></div>'),Wu=I('<div class="attachment-row svelte-d8pwpf" role="group" data-dock-media-attachments=""></div>'),Hu=I("<!> <!> <!>",1),Uu=I('<img draggable="false" class="svelte-d8pwpf"/>'),ju=I('<video controls="" playsinline="" class="svelte-d8pwpf"></video>',2),Vu=I('<div class="media-viewer svelte-d8pwpf"><!></div>'),Ku=I("<!> <!>",1);function Gu(r,t){if(new.target)return It({component:Gu,...r});Ct(t,!0);const n=(O,ye=or,pe=or)=>{var A=$u(),ge=z(A);Xe(ge,{variant:"secondary",size:"icon-sm",class:"tile-action tile-remove",get disabled(){return i()},get"aria-label"(){return pe()},tooltipContentClass:"dock-chrome-tooltip",get tooltip(){return pe()},onclick:()=>q(ye()),children:(Te,Be)=>{Ss(Te,{glyph:"x"})},$$slots:{default:!0}}),R(A),u(O,A)};let a=g(t,"items",7),o=g(t,"labels",7),i=g(t,"disabled",7,!1),d=g(t,"onMarkUp",7),c=g(t,"onEdit",7),v=g(t,"onRemove",7),h=g(t,"onRetry",7),b=g(t,"onCopy",7),k=g(t,"onMenu",7);const N=O=>O.owner==="attachment"?2:{image:0,clip:1,file:2}[O.kind],Y=s(()=>[...a()].sort((O,ye)=>N(O)-N(ye)));let S=we(null),D=we(!1),ie=we(null),X=null;const M=s(()=>a().find(O=>O.id===e(ie)));sr(()=>{(!e(M)||e(M).kind==="image"&&!W(e(M)))&&j(D,!1)});function W(O){return O.kind==="image"&&O.status!=="placing"&&O.status!=="failed"&&O.url.trim().length>0}function E(O){return O.kind==="image"?o().image(O.markCount):O.kind==="clip"?O.summary?`${o().clip(O.duration)} ${O.summary}`:o().clip(O.duration):O.name}function ne(O,ye){if(!(i()||O.kind==="file"||O.kind==="image"&&!W(O)||O.kind==="clip"&&(!O.url||O.recording))){if((O.kind==="clip"||O.kind==="image")&&c()){c()(O.id);return}X=ye,j(ie,O.id,!0),j(D,!0)}}async function q(O){i()||(e(ie)===O&&j(D,!1),v()(O),await Cn(),(!document.activeElement||document.activeElement===document.body)&&e(S)?.querySelector("button:not(:disabled)")?.focus())}function F(O){const ye=a().find(pe=>pe.id===O);i()||!ye||!W(ye)||(j(D,!1),c()?c()(O):d()(O))}function ae(O,ye){O.key!=="Delete"||i()||(O.preventDefault(),O.stopPropagation(),q(ye))}function C(O){return O.status==="placing"||O.status==="failed"?!1:O.kind==="image"?!!O.file||W(O):O.kind==="clip"&&!O.recording&&!!O.url}function ee(O,ye){const pe=Ql()?O.metaKey:O.ctrlKey,A=O.key.toLowerCase();if(pe&&!O.shiftKey&&!O.altKey&&(A==="c"||A==="x")){if(!b()||!C(ye)||(O.preventDefault(),O.stopPropagation(),A==="x"&&i()))return;b()(ye.id,A==="x");return}ae(O,ye.id)}function le(O,ye){!k()||!C(ye)||(O.preventDefault(),k()(ye.id))}var me={get items(){return a()},set items(O){a(O),m()},get labels(){return o()},set labels(O){o(O),m()},get disabled(){return i()},set disabled(O=!1){i(O),m()},get onMarkUp(){return d()},set onMarkUp(O){d(O),m()},get onEdit(){return c()},set onEdit(O){c(O),m()},get onRemove(){return v()},set onRemove(O){v(O),m()},get onRetry(){return h()},set onRetry(O){h(O),m()},get onCopy(){return b()},set onCopy(O){b(O),m()},get onMenu(){return k()},set onMenu(O){k(O),m()},$set:St,$on:(O,ye)=>Tt(t,O,ye)},_e=Ku(),Re=xe(_e);{var Le=O=>{var ye=Wu();Tr(ye,21,()=>e(Y),pe=>pe.id,(pe,A)=>{var ge=Rt(),Te=xe(ge);{var Be=P=>{var Q=Ou(),re=z(Q);{let G=s(()=>i()||e(A).status==="placing");ki(re,{get id(){return e(A).id},get name(){return e(A).file.name},get type(){return e(A).file.imageMimeType},get imageData(){return e(A).file.imageData},get imageMimeType(){return e(A).file.imageMimeType},variant:"thumbnail",thumbnailClass:"size-full",class:"size-full",get disabled(){return e(G)},get placementStatus(){return e(A).status},get placementError(){return e(A).error}})}var se=T(re,2);{var ce=G=>{var Ee=jo(),De=oe(Ee,!0);$(()=>{te(Ee,"data-failed",e(A).status==="failed"||void 0),te(Ee,"role",e(A).status==="failed"?"alert":"status"),te(Ee,"title",e(A).error),J(De,e(A).status==="failed"?e(A).error??o().attachmentFailed:o().attachmentPending)}),u(G,Ee)};B(se,G=>{e(A).status&&G(ce)})}var w=T(se,2),Se=z(w);{var Ae=G=>{Xe(G,{variant:"primary",size:"icon-sm",class:"tile-action",get disabled(){return i()},get"aria-label"(){return o().retry},tooltipContentClass:"dock-chrome-tooltip",get tooltip(){return o().retry},onclick:()=>h()?.(e(A).id),children:(Ee,De)=>{jt(Ee,{get icon(){return zs},size:16})},$$slots:{default:!0}})};B(Se,G=>{e(A).status==="failed"&&h()&&G(Ae)})}var L=T(Se,2);{let G=s(()=>f.chat_attachmentPreview_remove_ariaLabel({name:e(A).file.name}));n(L,()=>e(A).id,()=>e(G))}R(w),R(Q),$(()=>te(Q,"data-attachment-id",e(A).id)),Sr("keydown",Q,G=>ee(G,e(A))),Sr("contextmenu",Q,G=>le(G,e(A))),Kt(1,Q,()=>qa,()=>({tier:"fast",y:3,scale:.98})),Kt(2,Q,()=>ea,()=>({tier:"fast"})),u(P,Q)},Ce=P=>{const Q=s(()=>e(A).kind==="image"&&!W(e(A))&&e(A).status!=="failed");var re=zu(),se=z(re);{var ce=ve=>{Xe(ve,{type:"button",variant:"ghost",wrapContent:!1,class:"open-tile file",get"aria-label"(){return e(A).name},get disabled(){return i()},onkeydown:Oe=>ae(Oe,e(A).id),children:(Oe,U)=>{var ue=qu(),ot=xe(ue);jt(ot,{get icon(){return Tn},size:20});var xt=T(ot),mt=oe(xt,!0);$(()=>J(mt,e(A).name)),u(Oe,ue)},$$slots:{default:!0}})},w=ve=>{{let Oe=s(()=>E(e(A))),U=s(()=>i()||e(A).kind==="clip"&&(e(A).recording||!e(A).url));Xe(ve,{type:"button",variant:"ghost",wrapContent:!1,class:"open-tile",get"aria-label"(){return e(Oe)},get disabled(){return e(U)},onkeydown:ue=>ee(ue,e(A)),onclick:ue=>{ue.currentTarget instanceof HTMLElement&&ne(e(A),ue.currentTarget)},children:(ue,ot)=>{var xt=Rt(),mt=xe(xt);{var Ft=je=>{var bt=Du();$(()=>te(bt,"src",e(A).url)),u(je,bt)},pt=je=>{var bt=Fu(),at=T(z(bt)),dt=oe(at,!0),$e=T(at);{var ft=K=>{var _=Bu(),he=oe(_,!0);$(()=>J(he,e(A).summary)),u(K,_)};B($e,K=>{e(A).summary&&K(ft)})}R(bt),$(()=>J(dt,e(A).duration)),u(je,bt)};B(mt,je=>{e(A).kind==="image"?je(Ft):je(pt,-1)})}u(ue,xt)},$$slots:{default:!0}})}},Se=s(()=>e(A).kind!=="image"||W(e(A)));B(se,ve=>{e(A).kind==="file"?ve(ce):e(Se)&&ve(w,1)})}var Ae=T(se,2);{var L=ve=>{var Oe=jo(),U=oe(Oe,!0);$(()=>{te(Oe,"data-failed",e(A).status==="failed"||void 0),te(Oe,"role",e(A).status==="failed"?"alert":"status"),te(Oe,"title",e(A).error),J(U,e(A).status==="failed"?e(A).error??o().attachmentFailed:o().attachmentPending)}),u(ve,Oe)};B(Ae,ve=>{(e(A).status||e(Q))&&ve(L)})}var G=T(Ae,2),Ee=z(G);{var De=ve=>{Xe(ve,{variant:"primary",size:"icon-sm",class:"tile-action",get disabled(){return i()},get"aria-label"(){return o().retry},tooltipContentClass:"dock-chrome-tooltip",get tooltip(){return o().retry},onclick:()=>h()?.(e(A).id),children:(Oe,U)=>{jt(Oe,{get icon(){return zs},size:16})},$$slots:{default:!0}})},Je=ve=>{{let Oe=s(()=>c()?o().edit:o().markUp),U=s(()=>c()?o().edit:o().markUp);Xe(ve,{variant:"primary",size:"icon-sm",class:"tile-action",get disabled(){return i()},get"aria-label"(){return e(Oe)},tooltipContentClass:"dock-chrome-tooltip",get tooltip(){return e(U)},onclick:()=>F(e(A).id),children:(ue,ot)=>{Ss(ue,{glyph:"pencil"})},$$slots:{default:!0}})}},Ge=s(()=>W(e(A))),Bt=ve=>{{let Oe=s(()=>c()?o().edit:o().play),U=s(()=>c()?o().edit:o().play);Xe(ve,{variant:"primary",size:"icon-sm",class:"tile-action",get disabled(){return i()},get"aria-label"(){return e(Oe)},tooltipContentClass:"dock-chrome-tooltip",get tooltip(){return e(U)},onclick:ue=>{ue.currentTarget instanceof HTMLElement&&ne(e(A),ue.currentTarget)},children:(ue,ot)=>{{let xt=s(()=>c()?"pencil":"play");Ss(ue,{get glyph(){return e(xt)}})}},$$slots:{default:!0}})}};B(Ee,ve=>{e(A).status==="failed"&&h()?ve(De):e(Ge)?ve(Je,1):e(A).kind==="clip"&&!e(A).recording&&e(A).url&&ve(Bt,2)})}var ke=T(Ee,2);n(ke,()=>e(A).id,()=>o().remove),R(G),R(re),$(()=>{te(re,"data-kind",e(A).kind),te(re,"data-attachment-id",e(A).id),te(re,"aria-busy",e(Q)||void 0)}),Sr("contextmenu",re,ve=>le(ve,e(A))),Kt(1,re,()=>qa,()=>({tier:"fast",y:3,scale:.98})),Kt(2,re,()=>ea,()=>({tier:"fast"})),u(P,re)};B(Te,P=>{e(A).kind==="image"&&e(A).file?P(Be):P(Ce,-1)})}u(pe,ge)}),R(ye),cn(ye,pe=>j(S,pe),()=>e(S)),$(()=>te(ye,"aria-label",o().attachments)),u(O,ye)};B(Re,O=>{e(Y).length&&O(Le)})}var Ke=T(Re,2);{const O=pe=>{var A=Rt(),ge=xe(A);{var Te=Be=>{var Ce=Hu(),P=xe(Ce);{var Q=w=>{Xe(w,{variant:"primary",get disabled(){return i()},onclick:()=>e(M)&&F(e(M).id),children:(Se,Ae)=>{gr();var L=Or();$(()=>J(L,o().markUp)),u(Se,L)},$$slots:{default:!0}})},re=s(()=>W(e(M)));B(P,w=>{e(re)&&w(Q)})}var se=T(P,2);Xe(se,{variant:"secondary",get disabled(){return i()},onclick:()=>e(M)&&q(e(M).id),children:(w,Se)=>{gr();var Ae=Or();$(()=>J(Ae,o().remove)),u(w,Ae)},$$slots:{default:!0}});var ce=T(se,2);Xe(ce,{variant:"ghost-light",onclick:()=>{j(D,!1)},children:(w,Se)=>{gr();var Ae=Or();$(()=>J(Ae,o().done)),u(w,Ae)},$$slots:{default:!0}}),u(Be,Ce)};B(ge,Be=>{e(M)&&e(M).kind!=="file"&&Be(Te)})}u(pe,A)};let ye=s(()=>e(M)?E(e(M)):o().attachments);xi(Ke,{get title(){return e(ye)},size:"wide",showCloseButton:!1,onCloseAutoFocus:pe=>{pe.preventDefault(),X?.isConnected?X.focus():e(S)?.querySelector("button:not(:disabled)")?.focus()},get open(){return e(D)},set open(pe){j(D,pe,!0)},footer:O,children:(pe,A)=>{var ge=Rt(),Te=xe(ge);{var Be=Ce=>{var P=Vu(),Q=z(P);{var re=w=>{var Se=Uu();$(Ae=>{te(Se,"src",e(M).url),te(Se,"alt",Ae)},[()=>E(e(M))]),u(w,Se)},se=s(()=>e(M).kind==="image"&&W(e(M))),ce=w=>{var Se=ju();$(Ae=>{te(Se,"src",e(M).url),te(Se,"aria-label",Ae)},[()=>E(e(M))]),u(w,Se)};B(Q,w=>{e(se)?w(re):e(M).kind==="clip"&&e(M).url&&w(ce,1)})}R(P),u(Ce,P)};B(Te,Ce=>{e(M)&&e(M).kind!=="file"&&Ce(Be)})}u(pe,ge)},$$slots:{footer:!0,default:!0}})}return u(r,_e),At(me)}aa(["keydown","contextmenu"]);var Qu=I("<!> ",1),Zu=I('<div class="flex flex-col gap-2 px-4 py-3 bg-muted/30 border border-border rounded-lg my-4"><div class="flex items-center justify-between gap-2"><div class="flex items-center gap-2"><div class="shrink-0 text-subtle"><!></div> <div class="font-medium text-sm"> </div></div> <div class="flex items-center gap-1"><!> <!></div></div> <div class="text-xs text-subtle"> </div> <pre class="text-xs bg-background/50 rounded p-2 overflow-x-auto max-h-40 overflow-y-auto font-mono"> </pre></div>');function Vi(r,t){if(new.target)return It({component:Vi,...r});Ct(t,!0);let n=g(t,"name",7),a=g(t,"description",7),o=g(t,"content",7),i=g(t,"onUseScript",7),d=we(!1);function c(){navigator.clipboard.writeText(o()),j(d,!0),setTimeout(()=>{j(d,!1)},2e3)}function v(){i()?.({name:n(),description:a(),content:o()})}var h={get name(){return n()},set name(C){n(C),m()},get description(){return a()},set description(C){a(C),m()},get content(){return o()},set content(C){o(C),m()},get onUseScript(){return i()},set onUseScript(C){i(C),m()},$set:St,$on:(C,ee)=>Tt(t,C,ee)},b=Zu(),k=z(b),N=z(k),Y=z(N),S=z(Y);jt(S,{get icon(){return no},size:"sm"}),R(Y);var D=T(Y,2),ie=oe(D,!0);R(N);var X=T(N,2),M=z(X);Xe(M,{variant:"ghost-light",size:"sm",onclick:c,class:"h-7 px-2",children:(C,ee)=>{var le=Qu(),me=xe(le);{let Re=s(()=>e(d)?bi:wi);jt(me,{get icon(){return e(Re)},class:"mr-1"})}var _e=T(me);$(Re=>J(_e,` ${Re??""}`),[()=>e(d)?f.chat_shared_copied_label():f.chat_shared_copy_label()]),u(C,le)},$$slots:{default:!0}});var W=T(M,2);{var E=C=>{Xe(C,{variant:"ghost-light",size:"sm",onclick:v,class:"h-7 px-2",children:(ee,le)=>{gr();var me=Or();$(_e=>J(me,_e),[()=>f.chat_setupScriptCard_useScript_label()]),u(ee,me)},$$slots:{default:!0}})};B(W,C=>{i()&&C(E)})}R(X),R(k);var ne=T(k,2),q=oe(ne,!0),F=T(ne,2),ae=oe(F,!0);return R(b),$(()=>{J(ie,n()),J(q,a()),J(ae,o())}),u(r,b),At(h)}const wr={toolStart:/(?:\x1B\[\d+m)?🔧\s+(?:Tool call:\s+)?(.+?)(?:\x1B\[0m)?$/,toolDetail:/(?:[└├]─\s+(.+)$|^\s{3,}(.+)$)/,toolResult:/(?:\x1B\[\d+m)?📋\s+Tool result:\s+(.+?)(?:\x1B\[0m)?$/,toolSuccess:/[✓✔✅]\s+(.+)$/,toolError:/[❌✗❎]\s+(.+)$/,sessionInfo:/[Ss]ession:\s*([a-f0-9-]+)/,resumedSession:/📂?\s*Resumed session/i,assistantMarker:/🤖/,systemMarker:/💻/,userMarker:/👤/,thinkingMarker:/🤔\s*Thinking/i,waitingMarker:/^⏳\s+Running/i,indexingProgress:/^Indexing:\s*\[.*\]\s*\d+%/,agentDigest:/<agent_digest>([\s\S]*?)<\/agent_digest>/,setupScript:/<setup_script\s+name="([^"]+)"\s+description="([^"]+)">([\s\S]*?)<\/setup_script>/};class Ju{constructor(){kn(this,"buffer","");kn(this,"currentToolName",null);kn(this,"currentToolId",null);kn(this,"lastToolId",null);kn(this,"currentToolParams",[]);kn(this,"currentToolResultContent",[]);kn(this,"inToolResult",!1);kn(this,"inCodeBlock",!1);kn(this,"codeBlockLanguage","");kn(this,"codeBlockContent","");kn(this,"characterBuffer","");kn(this,"inCharacterMode",!1);kn(this,"emittedToolIds",new Set)}parseChunk(t){if(this.isMarkerLine(t.trim())){const o=[];if(this.inToolResult&&this.currentToolResultContent.length>0){const c=this.currentToolResultContent.some(h=>h.startsWith("❌")||h.startsWith("Error:")),v=this.currentToolResultContent.map(h=>h.replace(/^❌\s*/,"").replace(/^Error:\s*/,"")).join(`
2
2
  `);o.push({type:"tool_result",content:v,metadata:{toolId:this.currentToolId,isError:c}}),this.lastToolId=this.currentToolId,this.currentToolId=null,this.inToolResult=!1,this.currentToolResultContent=[]}const i=t.indexOf("🤖"),d=t.substring(i+2);if(this.inCharacterMode=!0,this.characterBuffer="",d&&d.trim()&&d!==`
3
3
  `){const c=d.replace(/^\n/,"");c&&(this.characterBuffer=c)}return o}if(this.inCharacterMode){if(t.trim()===""&&this.characterBuffer==="")return[];if(t.includes(`
4
4
  `)&&this.characterBuffer.length>0){const o=t.substring(0,t.indexOf(`
@@ -1,4 +1,4 @@
1
- import{t as Yt,br as v,bp as F,a_ as me,bz as Zt,bv as Xe,bt as Jt,b as Qt}from"./DXyyWeag.js";import{bs as en,c5 as Ye,ca as xe,aD as t,bH as H,a5 as M,bA as R,W as L,bn as tn,c9 as d,bV as ae,cd as pt,c6 as nn,aA as m,bS as O,b_ as j,bl as Ze,bO as Y,aB as T,b$ as Pe,be as sn,a7 as an,ay as Je}from"./DYhIMPy1.js";import{n as on,v as rn,p as ln}from"./CjaOLL1c.js";import{f as cn}from"./DHQOuksI.js";import{k as dn}from"./DlErnbqC.js";import{Iy as Se,nV as fn,zf as un,s2 as bt,nX as hn,a5 as kt}from"./D5ej8a-y.js";import{bN as gn,dr as vn}from"./Cg2SHWhQ.js";import{c as mn}from"./ChTqQfQN.js";import{c as Lt,h as He,D as pn}from"./CUN_OmMV.js";import{F as _t,b6 as wt}from"./BTdkHPOB.js";import{f as Qe}from"./Bfr1QjPr.js";import{t as Re}from"./CX_KiszT.js";import{t as bn}from"./BboIV5H5.js";import{g as kn}from"./B5m4HK_m.js";function _n(V,c,oe,Ie=1){const We=Lt(V,c,oe,"","",{context:3}),re=new Set,pe=new Set,Z=wn(Ie)-1,De=We.split(`
1
+ import{t as Yt,br as v,bp as F,a_ as me,bz as Zt,bv as Xe,bt as Jt,b as Qt}from"./DXyyWeag.js";import{bs as en,c5 as Ye,ca as xe,aD as t,bH as H,a5 as M,bA as R,W as L,bn as tn,c9 as d,bV as ae,cd as pt,c6 as nn,aA as m,bS as O,b_ as j,bl as Ze,bO as Y,aB as T,b$ as Pe,be as sn,a7 as an,ay as Je}from"./DYhIMPy1.js";import{n as on,v as rn,p as ln}from"./CjaOLL1c.js";import{f as cn}from"./DHQOuksI.js";import{k as dn}from"./DlErnbqC.js";import{Iy as Se,nV as fn,zf as un,s2 as bt,nX as hn,a5 as kt}from"./D5ej8a-y.js";import{bN as gn,dr as vn}from"./Cg2SHWhQ.js";import{c as mn}from"./ChTqQfQN.js";import{c as Lt,h as He,D as pn}from"./CBPH6RMz.js";import{F as _t,b6 as wt}from"./BTdkHPOB.js";import{f as Qe}from"./Bfr1QjPr.js";import{t as Re}from"./CX_KiszT.js";import{t as bn}from"./BboIV5H5.js";import{g as kn}from"./B5m4HK_m.js";function _n(V,c,oe,Ie=1){const We=Lt(V,c,oe,"","",{context:3}),re=new Set,pe=new Set,Z=wn(Ie)-1,De=We.split(`
2
2
  `);let s=0,I=0,le=!1;for(const z of De)if(z.startsWith("@@")){le=!0;const J=z.match(/@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@/);J&&(I=parseInt(J[1],10),s=parseInt(J[2],10))}else le&&(z.startsWith("+")?(re.add(s+Z),s++):z.startsWith("-")?(pe.add(I+Z),I++):z.startsWith(" ")&&(s++,I++));return{additions:re,deletions:pe}}function wn(V){return Number.isFinite(V)&&V>1?Math.floor(V):1}var Ln=T("<div><!> <!></div>"),Cn=T('<div class="diff-skeleton svelte-1f4chm"><div class="diff-skeleton-header svelte-1f4chm"><!> <!></div> <div class="diff-skeleton-content svelte-1f4chm"></div></div>'),yn=T('<div class="error-state svelte-1f4chm"><!> <span class="text-danger text-sm ml-2"> </span></div>'),xn=T('<div class="error-state svelte-1f4chm"><!> <span class="text-subtle text-sm ml-2"> </span></div>'),Pn=T('<div class="empty-state svelte-1f4chm"><span class="text-subtle text-sm"><!></span></div>'),Sn=T('<span class="icon">+</span> ',1),Hn=T('<span class="icon">−</span> ',1),Rn=T('<div class="selection-action-bar svelte-1f4chm"><span class="selection-info"> </span> <!> <!></div>'),In=T('<div class="diff-wrapper svelte-1f4chm"><!> <div class="diff-content svelte-1f4chm"><!></div></div>'),Wn=T('<div class="tracked-change-diff-viewer svelte-1f4chm"><!></div>');function Dn(V,c){if(new.target)return Yt({component:Dn,...V});en(c,!0);const oe=()=>Xe(yt,"$read$",re),Ie=()=>Xe(Rt,"$workspace$",re),We=()=>Xe(It,"$workingTreeFileContentStore",re),[re,pe]=Jt(),Z=mn("TrackedChangeDiffViewer"),De=2*1024*1024;let s=v(c,"change",7),I=v(c,"active",7,!0),le=v(c,"workspaceId",7),z=v(c,"viewMode",7,"unified"),J=v(c,"showHeader",7,!1),Ne=v(c,"foldUnchanged",7,!0),Me=v(c,"lineWrapping",7,!1),U=v(c,"onStageHunk",7),A=v(c,"onUnstageHunk",7),et=v(c,"onOpenCommit",7),Ue=v(c,"refreshKey",7),Ae=v(c,"branchBaseRef",7),Ee=v(c,"branchBaseCommitSha",7),ge=v(c,"useProvidedContent",7,!1),ce=v(c,"allowHeadReads",7,!0),Fe=v(c,"canReadHeadFiles",7),W=v(c,"lineOffset",7,1),tt=v(c,"lineStageIndicators",7),Oe=v(c,"annotations",23,()=>[]),Te=v(c,"renderAnnotation",7),ze=v(c,"virtualizer",7),q=v(c,"gitRootId",7,void 0),be=v(c,"gitRootPath",7,void 0);const de=Ye(()=>le())??kn()?.workspaceId??"",Ct=Math.random().toString(36).substring(2,8),Be=`tracked-diff:${crypto.randomUUID()}`,yt=gn(de,Be),Q=d(()=>oe()?.result?.kind==="trackedDiff"?oe().result:void 0),ke=d(()=>oe()?.loading??!0),nt=d(()=>oe()?.error??null),$e=d(()=>(t(Q)?.oldContent.length??0)+(t(Q)?.newContent.length??0)>De),B=d(()=>t($e)?"":t(Q)?.oldContent??""),G=d(()=>t($e)?"":t(Q)?.newContent??""),ee=d(()=>ct(s()?.relativePath||s()?.file||"")),it=d(()=>t(Q)?.chunk?.chunks.length?At(t(Q).chunk,t(ee)):""),xt=d(()=>!t(B)&&!t(G)&&!t(it)),Pt=d(()=>!!s()?.gitlink||!!t(Q)?.gitlink),st=d(()=>W()>1?`
3
3
  `.repeat(W()-1):""),St=d(()=>t(st)+t(B)),Ht=d(()=>t(st)+t(G));let _=ae(null),Ke=ae(null),_e=null,we=ae(!1);const Rt=vn(de),at=pt(void 0),ot=pt(""),It=dn(ot,at),rt=d(Ie),te=d(()=>be()||t(rt)?.worktreePath||t(rt)?.repositoryPath||""),Le=d(()=>s()?.relativePath||s()?.file||"file"),Wt=d(()=>Ut(t(Le)));let Ce=ae(null),lt=ae("");function ct(e){if(!e.startsWith("/")||!t(te))return e;const i=t(te).endsWith("/")?t(te).slice(0,-1):t(te);if(e.startsWith(i+"/"))return e.slice(i.length+1);if(e.startsWith(i)){const a=e.slice(i.length);return a.startsWith("/")?a.slice(1):a}return e}function Dt(e){return e?e.startsWith("/")?e:t(te)?`${t(te)}/${e}`:null:null}const dt=d(()=>W()>1),Nt=d(()=>t(dt)?`${t(Le)}:${He(t(B))}:off${W()}`:void 0),Mt=d(()=>t(dt)?`${t(Le)}:${He(t(G))}:off${W()}`:void 0);function Ut(e){const i=e.split(".").pop()?.toLowerCase();return i?{ts:"typescript",tsx:"tsx",js:"javascript",jsx:"jsx",py:"python",rs:"rust",go:"go",rb:"ruby",java:"java",kt:"kotlin",swift:"swift",cs:"csharp",cpp:"cpp",c:"c",h:"c",hpp:"cpp",json:"json",yaml:"yaml",yml:"yaml",toml:"toml",md:"markdown",html:"html",css:"css",scss:"scss",sql:"sql",sh:"bash",bash:"bash",zsh:"bash",svelte:"svelte",vue:"vue"}[i]:void 0}function At(e,i){const a=`a/${i}`,o=`b/${i}`,u=[`diff --git ${a} ${o}`,`--- ${a}`,`+++ ${o}`];for(const r of e.chunks){u.push(`@@ -${r.oldStart},${r.oldLines} +${r.newStart},${r.newLines} @@`);for(const h of r.lines){const l=h.type===kt.Addition?"+":h.type===kt.Deletion?"-":" ",g=h.content.endsWith(`
4
4
  `)?h.content.slice(0,-1):h.content;u.push(`${l}${g}`)}}return u.join(`
@@ -1,4 +1,4 @@
1
- import{e as Ie}from"./CVThxHG5.js";import{aZ as Me,U as Be,V as Ve,a_ as Ye,b as d,X as Ot,ay as de,B as Fe,h as Ue,al as je,o as Nt,b5 as ze,aV as me,aW as Jt,bi as We,z as te,n as pe}from"./Bc1QJkrz.js";var jt=(function(){var t=d(function(_t,m,x,E){for(x=x||{},E=_t.length;E--;x[_t[E]]=m);return x},"o"),e=[1,24],a=[1,25],i=[1,26],u=[1,27],r=[1,28],n=[1,63],l=[1,64],s=[1,65],h=[1,66],y=[1,67],p=[1,68],g=[1,69],v=[1,29],w=[1,30],N=[1,31],O=[1,32],P=[1,33],I=[1,34],X=[1,35],q=[1,36],H=[1,37],Q=[1,38],K=[1,39],G=[1,40],Z=[1,41],J=[1,42],$=[1,43],tt=[1,44],et=[1,45],nt=[1,46],st=[1,47],at=[1,48],rt=[1,50],it=[1,51],ot=[1,52],lt=[1,53],ct=[1,54],ut=[1,55],ht=[1,56],dt=[1,57],pt=[1,58],ft=[1,59],yt=[1,60],kt=[14,42],Xt=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Pt=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],S=[1,82],T=[1,83],k=[1,84],C=[1,85],R=[12,14,42],oe=[12,14,33,42],Bt=[12,14,33,42,76,77,79,80],xt=[12,33],qt=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Ht={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:d(function(m,x,E,_,D,o,Dt){var f=o.length-1;switch(D){case 3:_.setDirection("TB");break;case 4:_.setDirection("BT");break;case 5:_.setDirection("RL");break;case 6:_.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:_.setC4Type(o[f-3]);break;case 19:_.setTitle(o[f].substring(6)),this.$=o[f].substring(6);break;case 20:_.setAccDescription(o[f].substring(15)),this.$=o[f].substring(15);break;case 21:this.$=o[f].trim(),_.setTitle(this.$);break;case 22:case 23:this.$=o[f].trim(),_.setAccDescription(this.$);break;case 28:o[f].splice(2,0,"ENTERPRISE"),_.addPersonOrSystemBoundary(...o[f]),this.$=o[f];break;case 29:o[f].splice(2,0,"SYSTEM"),_.addPersonOrSystemBoundary(...o[f]),this.$=o[f];break;case 30:_.addPersonOrSystemBoundary(...o[f]),this.$=o[f];break;case 31:o[f].splice(2,0,"CONTAINER"),_.addContainerBoundary(...o[f]),this.$=o[f];break;case 32:_.addDeploymentNode("node",...o[f]),this.$=o[f];break;case 33:_.addDeploymentNode("nodeL",...o[f]),this.$=o[f];break;case 34:_.addDeploymentNode("nodeR",...o[f]),this.$=o[f];break;case 35:_.popBoundaryParseStack();break;case 39:_.addPersonOrSystem("person",...o[f]),this.$=o[f];break;case 40:_.addPersonOrSystem("external_person",...o[f]),this.$=o[f];break;case 41:_.addPersonOrSystem("system",...o[f]),this.$=o[f];break;case 42:_.addPersonOrSystem("system_db",...o[f]),this.$=o[f];break;case 43:_.addPersonOrSystem("system_queue",...o[f]),this.$=o[f];break;case 44:_.addPersonOrSystem("external_system",...o[f]),this.$=o[f];break;case 45:_.addPersonOrSystem("external_system_db",...o[f]),this.$=o[f];break;case 46:_.addPersonOrSystem("external_system_queue",...o[f]),this.$=o[f];break;case 47:_.addContainer("container",...o[f]),this.$=o[f];break;case 48:_.addContainer("container_db",...o[f]),this.$=o[f];break;case 49:_.addContainer("container_queue",...o[f]),this.$=o[f];break;case 50:_.addContainer("external_container",...o[f]),this.$=o[f];break;case 51:_.addContainer("external_container_db",...o[f]),this.$=o[f];break;case 52:_.addContainer("external_container_queue",...o[f]),this.$=o[f];break;case 53:_.addComponent("component",...o[f]),this.$=o[f];break;case 54:_.addComponent("component_db",...o[f]),this.$=o[f];break;case 55:_.addComponent("component_queue",...o[f]),this.$=o[f];break;case 56:_.addComponent("external_component",...o[f]),this.$=o[f];break;case 57:_.addComponent("external_component_db",...o[f]),this.$=o[f];break;case 58:_.addComponent("external_component_queue",...o[f]),this.$=o[f];break;case 60:_.addRel("rel",...o[f]),this.$=o[f];break;case 61:_.addRel("birel",...o[f]),this.$=o[f];break;case 62:_.addRel("rel_u",...o[f]),this.$=o[f];break;case 63:_.addRel("rel_d",...o[f]),this.$=o[f];break;case 64:_.addRel("rel_l",...o[f]),this.$=o[f];break;case 65:_.addRel("rel_r",...o[f]),this.$=o[f];break;case 66:_.addRel("rel_b",...o[f]),this.$=o[f];break;case 67:o[f].splice(0,1),_.addRel("rel",...o[f]),this.$=o[f];break;case 68:_.updateElStyle("update_el_style",...o[f]),this.$=o[f];break;case 69:_.updateRelStyle("update_rel_style",...o[f]),this.$=o[f];break;case 70:_.updateLayoutConfig("update_layout_config",...o[f]),this.$=o[f];break;case 71:this.$=[o[f]];break;case 72:o[f].unshift(o[f-1]),this.$=o[f];break;case 73:case 75:this.$=o[f].trim();break;case 74:let vt={};vt[o[f-1].trim()]=o[f].trim(),this.$=vt;break;case 76:this.$="";break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:e,23:a,24:i,26:u,28:r,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:p,41:g,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:X,51:q,52:H,53:Q,54:K,55:G,56:Z,57:J,58:$,59:tt,60:et,61:nt,62:st,63:at,64:rt,65:it,66:ot,67:lt,68:ct,69:ut,70:ht,71:dt,72:pt,73:ft,74:yt},{13:70,19:20,20:21,21:22,22:e,23:a,24:i,26:u,28:r,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:p,41:g,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:X,51:q,52:H,53:Q,54:K,55:G,56:Z,57:J,58:$,59:tt,60:et,61:nt,62:st,63:at,64:rt,65:it,66:ot,67:lt,68:ct,69:ut,70:ht,71:dt,72:pt,73:ft,74:yt},{13:71,19:20,20:21,21:22,22:e,23:a,24:i,26:u,28:r,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:p,41:g,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:X,51:q,52:H,53:Q,54:K,55:G,56:Z,57:J,58:$,59:tt,60:et,61:nt,62:st,63:at,64:rt,65:it,66:ot,67:lt,68:ct,69:ut,70:ht,71:dt,72:pt,73:ft,74:yt},{13:72,19:20,20:21,21:22,22:e,23:a,24:i,26:u,28:r,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:p,41:g,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:X,51:q,52:H,53:Q,54:K,55:G,56:Z,57:J,58:$,59:tt,60:et,61:nt,62:st,63:at,64:rt,65:it,66:ot,67:lt,68:ct,69:ut,70:ht,71:dt,72:pt,73:ft,74:yt},{13:73,19:20,20:21,21:22,22:e,23:a,24:i,26:u,28:r,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:p,41:g,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:X,51:q,52:H,53:Q,54:K,55:G,56:Z,57:J,58:$,59:tt,60:et,61:nt,62:st,63:at,64:rt,65:it,66:ot,67:lt,68:ct,69:ut,70:ht,71:dt,72:pt,73:ft,74:yt},{14:[1,74]},t(kt,[2,13],{43:23,29:49,30:61,32:62,20:75,34:n,36:l,37:s,38:h,39:y,40:p,41:g,44:v,45:w,46:N,47:O,48:P,49:I,50:X,51:q,52:H,53:Q,54:K,55:G,56:Z,57:J,58:$,59:tt,60:et,61:nt,62:st,63:at,64:rt,65:it,66:ot,67:lt,68:ct,69:ut,70:ht,71:dt,72:pt,73:ft,74:yt}),t(kt,[2,14]),t(Xt,[2,16],{12:[1,76]}),t(kt,[2,36],{12:[1,77]}),t(Pt,[2,19]),t(Pt,[2,20]),{25:[1,78]},{27:[1,79]},t(Pt,[2,23]),{35:80,75:81,76:S,77:T,79:k,80:C},{35:86,75:81,76:S,77:T,79:k,80:C},{35:87,75:81,76:S,77:T,79:k,80:C},{35:88,75:81,76:S,77:T,79:k,80:C},{35:89,75:81,76:S,77:T,79:k,80:C},{35:90,75:81,76:S,77:T,79:k,80:C},{35:91,75:81,76:S,77:T,79:k,80:C},{35:92,75:81,76:S,77:T,79:k,80:C},{35:93,75:81,76:S,77:T,79:k,80:C},{35:94,75:81,76:S,77:T,79:k,80:C},{35:95,75:81,76:S,77:T,79:k,80:C},{35:96,75:81,76:S,77:T,79:k,80:C},{35:97,75:81,76:S,77:T,79:k,80:C},{35:98,75:81,76:S,77:T,79:k,80:C},{35:99,75:81,76:S,77:T,79:k,80:C},{35:100,75:81,76:S,77:T,79:k,80:C},{35:101,75:81,76:S,77:T,79:k,80:C},{35:102,75:81,76:S,77:T,79:k,80:C},{35:103,75:81,76:S,77:T,79:k,80:C},{35:104,75:81,76:S,77:T,79:k,80:C},t(R,[2,59]),{35:105,75:81,76:S,77:T,79:k,80:C},{35:106,75:81,76:S,77:T,79:k,80:C},{35:107,75:81,76:S,77:T,79:k,80:C},{35:108,75:81,76:S,77:T,79:k,80:C},{35:109,75:81,76:S,77:T,79:k,80:C},{35:110,75:81,76:S,77:T,79:k,80:C},{35:111,75:81,76:S,77:T,79:k,80:C},{35:112,75:81,76:S,77:T,79:k,80:C},{35:113,75:81,76:S,77:T,79:k,80:C},{35:114,75:81,76:S,77:T,79:k,80:C},{35:115,75:81,76:S,77:T,79:k,80:C},{20:116,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:p,41:g,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:X,51:q,52:H,53:Q,54:K,55:G,56:Z,57:J,58:$,59:tt,60:et,61:nt,62:st,63:at,64:rt,65:it,66:ot,67:lt,68:ct,69:ut,70:ht,71:dt,72:pt,73:ft,74:yt},{12:[1,118],33:[1,117]},{35:119,75:81,76:S,77:T,79:k,80:C},{35:120,75:81,76:S,77:T,79:k,80:C},{35:121,75:81,76:S,77:T,79:k,80:C},{35:122,75:81,76:S,77:T,79:k,80:C},{35:123,75:81,76:S,77:T,79:k,80:C},{35:124,75:81,76:S,77:T,79:k,80:C},{35:125,75:81,76:S,77:T,79:k,80:C},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},t(kt,[2,15]),t(Xt,[2,17],{21:22,19:130,22:e,23:a,24:i,26:u,28:r}),t(kt,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:e,23:a,24:i,26:u,28:r,34:n,36:l,37:s,38:h,39:y,40:p,41:g,44:v,45:w,46:N,47:O,48:P,49:I,50:X,51:q,52:H,53:Q,54:K,55:G,56:Z,57:J,58:$,59:tt,60:et,61:nt,62:st,63:at,64:rt,65:it,66:ot,67:lt,68:ct,69:ut,70:ht,71:dt,72:pt,73:ft,74:yt}),t(Pt,[2,21]),t(Pt,[2,22]),t(R,[2,39]),t(oe,[2,71],{75:81,35:132,76:S,77:T,79:k,80:C}),t(Bt,[2,73]),{78:[1,133]},t(Bt,[2,75]),t(Bt,[2,76]),t(R,[2,40]),t(R,[2,41]),t(R,[2,42]),t(R,[2,43]),t(R,[2,44]),t(R,[2,45]),t(R,[2,46]),t(R,[2,47]),t(R,[2,48]),t(R,[2,49]),t(R,[2,50]),t(R,[2,51]),t(R,[2,52]),t(R,[2,53]),t(R,[2,54]),t(R,[2,55]),t(R,[2,56]),t(R,[2,57]),t(R,[2,58]),t(R,[2,60]),t(R,[2,61]),t(R,[2,62]),t(R,[2,63]),t(R,[2,64]),t(R,[2,65]),t(R,[2,66]),t(R,[2,67]),t(R,[2,68]),t(R,[2,69]),t(R,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},t(xt,[2,28]),t(xt,[2,29]),t(xt,[2,30]),t(xt,[2,31]),t(xt,[2,32]),t(xt,[2,33]),t(xt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},t(Xt,[2,18]),t(kt,[2,38]),t(oe,[2,72]),t(Bt,[2,74]),t(R,[2,24]),t(R,[2,35]),t(qt,[2,25]),t(qt,[2,26],{12:[1,138]}),t(qt,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:d(function(m,x){if(x.recoverable)this.trace(m);else{var E=new Error(m);throw E.hash=x,E}},"parseError"),parse:d(function(m){var x=this,E=[0],_=[],D=[null],o=[],Dt=this.table,f="",vt=0,le=0,De=2,ce=1,Ne=o.slice.call(arguments,1),A=Object.create(this.lexer),Et={yy:{}};for(var Qt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Qt)&&(Et.yy[Qt]=this.yy[Qt]);A.setInput(m,Et.yy),Et.yy.lexer=A,Et.yy.parser=this,typeof A.yylloc>"u"&&(A.yylloc={});var Kt=A.yylloc;o.push(Kt);var Ae=A.options&&A.options.ranges;typeof Et.yy.parseError=="function"?this.parseError=Et.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Le(B){E.length=E.length-2*B,D.length=D.length-B,o.length=o.length-B}d(Le,"popStack");function ue(){var B;return B=_.pop()||A.lex()||ce,typeof B!="number"&&(B instanceof Array&&(_=B,B=_.pop()),B=x.symbols_[B]||B),B}d(ue,"lex");for(var M,St,V,Gt,Ct={},Yt,z,he,Ft;;){if(St=E[E.length-1],this.defaultActions[St]?V=this.defaultActions[St]:((M===null||typeof M>"u")&&(M=ue()),V=Dt[St]&&Dt[St][M]),typeof V>"u"||!V.length||!V[0]){var Zt="";Ft=[];for(Yt in Dt[St])this.terminals_[Yt]&&Yt>De&&Ft.push("'"+this.terminals_[Yt]+"'");A.showPosition?Zt="Parse error on line "+(vt+1)+`:
1
+ import{e as Ie}from"./Bxc9qqDR.js";import{aZ as Me,U as Be,V as Ve,a_ as Ye,b as d,X as Ot,ay as de,B as Fe,h as Ue,al as je,o as Nt,b5 as ze,aV as me,aW as Jt,bi as We,z as te,n as pe}from"./ChGUMi8s.js";var jt=(function(){var t=d(function(_t,m,x,E){for(x=x||{},E=_t.length;E--;x[_t[E]]=m);return x},"o"),e=[1,24],a=[1,25],i=[1,26],u=[1,27],r=[1,28],n=[1,63],l=[1,64],s=[1,65],h=[1,66],y=[1,67],p=[1,68],g=[1,69],v=[1,29],w=[1,30],N=[1,31],O=[1,32],P=[1,33],I=[1,34],X=[1,35],q=[1,36],H=[1,37],Q=[1,38],K=[1,39],G=[1,40],Z=[1,41],J=[1,42],$=[1,43],tt=[1,44],et=[1,45],nt=[1,46],st=[1,47],at=[1,48],rt=[1,50],it=[1,51],ot=[1,52],lt=[1,53],ct=[1,54],ut=[1,55],ht=[1,56],dt=[1,57],pt=[1,58],ft=[1,59],yt=[1,60],kt=[14,42],Xt=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Pt=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],S=[1,82],T=[1,83],k=[1,84],C=[1,85],R=[12,14,42],oe=[12,14,33,42],Bt=[12,14,33,42,76,77,79,80],xt=[12,33],qt=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Ht={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:d(function(m,x,E,_,D,o,Dt){var f=o.length-1;switch(D){case 3:_.setDirection("TB");break;case 4:_.setDirection("BT");break;case 5:_.setDirection("RL");break;case 6:_.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:_.setC4Type(o[f-3]);break;case 19:_.setTitle(o[f].substring(6)),this.$=o[f].substring(6);break;case 20:_.setAccDescription(o[f].substring(15)),this.$=o[f].substring(15);break;case 21:this.$=o[f].trim(),_.setTitle(this.$);break;case 22:case 23:this.$=o[f].trim(),_.setAccDescription(this.$);break;case 28:o[f].splice(2,0,"ENTERPRISE"),_.addPersonOrSystemBoundary(...o[f]),this.$=o[f];break;case 29:o[f].splice(2,0,"SYSTEM"),_.addPersonOrSystemBoundary(...o[f]),this.$=o[f];break;case 30:_.addPersonOrSystemBoundary(...o[f]),this.$=o[f];break;case 31:o[f].splice(2,0,"CONTAINER"),_.addContainerBoundary(...o[f]),this.$=o[f];break;case 32:_.addDeploymentNode("node",...o[f]),this.$=o[f];break;case 33:_.addDeploymentNode("nodeL",...o[f]),this.$=o[f];break;case 34:_.addDeploymentNode("nodeR",...o[f]),this.$=o[f];break;case 35:_.popBoundaryParseStack();break;case 39:_.addPersonOrSystem("person",...o[f]),this.$=o[f];break;case 40:_.addPersonOrSystem("external_person",...o[f]),this.$=o[f];break;case 41:_.addPersonOrSystem("system",...o[f]),this.$=o[f];break;case 42:_.addPersonOrSystem("system_db",...o[f]),this.$=o[f];break;case 43:_.addPersonOrSystem("system_queue",...o[f]),this.$=o[f];break;case 44:_.addPersonOrSystem("external_system",...o[f]),this.$=o[f];break;case 45:_.addPersonOrSystem("external_system_db",...o[f]),this.$=o[f];break;case 46:_.addPersonOrSystem("external_system_queue",...o[f]),this.$=o[f];break;case 47:_.addContainer("container",...o[f]),this.$=o[f];break;case 48:_.addContainer("container_db",...o[f]),this.$=o[f];break;case 49:_.addContainer("container_queue",...o[f]),this.$=o[f];break;case 50:_.addContainer("external_container",...o[f]),this.$=o[f];break;case 51:_.addContainer("external_container_db",...o[f]),this.$=o[f];break;case 52:_.addContainer("external_container_queue",...o[f]),this.$=o[f];break;case 53:_.addComponent("component",...o[f]),this.$=o[f];break;case 54:_.addComponent("component_db",...o[f]),this.$=o[f];break;case 55:_.addComponent("component_queue",...o[f]),this.$=o[f];break;case 56:_.addComponent("external_component",...o[f]),this.$=o[f];break;case 57:_.addComponent("external_component_db",...o[f]),this.$=o[f];break;case 58:_.addComponent("external_component_queue",...o[f]),this.$=o[f];break;case 60:_.addRel("rel",...o[f]),this.$=o[f];break;case 61:_.addRel("birel",...o[f]),this.$=o[f];break;case 62:_.addRel("rel_u",...o[f]),this.$=o[f];break;case 63:_.addRel("rel_d",...o[f]),this.$=o[f];break;case 64:_.addRel("rel_l",...o[f]),this.$=o[f];break;case 65:_.addRel("rel_r",...o[f]),this.$=o[f];break;case 66:_.addRel("rel_b",...o[f]),this.$=o[f];break;case 67:o[f].splice(0,1),_.addRel("rel",...o[f]),this.$=o[f];break;case 68:_.updateElStyle("update_el_style",...o[f]),this.$=o[f];break;case 69:_.updateRelStyle("update_rel_style",...o[f]),this.$=o[f];break;case 70:_.updateLayoutConfig("update_layout_config",...o[f]),this.$=o[f];break;case 71:this.$=[o[f]];break;case 72:o[f].unshift(o[f-1]),this.$=o[f];break;case 73:case 75:this.$=o[f].trim();break;case 74:let vt={};vt[o[f-1].trim()]=o[f].trim(),this.$=vt;break;case 76:this.$="";break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:e,23:a,24:i,26:u,28:r,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:p,41:g,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:X,51:q,52:H,53:Q,54:K,55:G,56:Z,57:J,58:$,59:tt,60:et,61:nt,62:st,63:at,64:rt,65:it,66:ot,67:lt,68:ct,69:ut,70:ht,71:dt,72:pt,73:ft,74:yt},{13:70,19:20,20:21,21:22,22:e,23:a,24:i,26:u,28:r,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:p,41:g,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:X,51:q,52:H,53:Q,54:K,55:G,56:Z,57:J,58:$,59:tt,60:et,61:nt,62:st,63:at,64:rt,65:it,66:ot,67:lt,68:ct,69:ut,70:ht,71:dt,72:pt,73:ft,74:yt},{13:71,19:20,20:21,21:22,22:e,23:a,24:i,26:u,28:r,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:p,41:g,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:X,51:q,52:H,53:Q,54:K,55:G,56:Z,57:J,58:$,59:tt,60:et,61:nt,62:st,63:at,64:rt,65:it,66:ot,67:lt,68:ct,69:ut,70:ht,71:dt,72:pt,73:ft,74:yt},{13:72,19:20,20:21,21:22,22:e,23:a,24:i,26:u,28:r,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:p,41:g,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:X,51:q,52:H,53:Q,54:K,55:G,56:Z,57:J,58:$,59:tt,60:et,61:nt,62:st,63:at,64:rt,65:it,66:ot,67:lt,68:ct,69:ut,70:ht,71:dt,72:pt,73:ft,74:yt},{13:73,19:20,20:21,21:22,22:e,23:a,24:i,26:u,28:r,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:p,41:g,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:X,51:q,52:H,53:Q,54:K,55:G,56:Z,57:J,58:$,59:tt,60:et,61:nt,62:st,63:at,64:rt,65:it,66:ot,67:lt,68:ct,69:ut,70:ht,71:dt,72:pt,73:ft,74:yt},{14:[1,74]},t(kt,[2,13],{43:23,29:49,30:61,32:62,20:75,34:n,36:l,37:s,38:h,39:y,40:p,41:g,44:v,45:w,46:N,47:O,48:P,49:I,50:X,51:q,52:H,53:Q,54:K,55:G,56:Z,57:J,58:$,59:tt,60:et,61:nt,62:st,63:at,64:rt,65:it,66:ot,67:lt,68:ct,69:ut,70:ht,71:dt,72:pt,73:ft,74:yt}),t(kt,[2,14]),t(Xt,[2,16],{12:[1,76]}),t(kt,[2,36],{12:[1,77]}),t(Pt,[2,19]),t(Pt,[2,20]),{25:[1,78]},{27:[1,79]},t(Pt,[2,23]),{35:80,75:81,76:S,77:T,79:k,80:C},{35:86,75:81,76:S,77:T,79:k,80:C},{35:87,75:81,76:S,77:T,79:k,80:C},{35:88,75:81,76:S,77:T,79:k,80:C},{35:89,75:81,76:S,77:T,79:k,80:C},{35:90,75:81,76:S,77:T,79:k,80:C},{35:91,75:81,76:S,77:T,79:k,80:C},{35:92,75:81,76:S,77:T,79:k,80:C},{35:93,75:81,76:S,77:T,79:k,80:C},{35:94,75:81,76:S,77:T,79:k,80:C},{35:95,75:81,76:S,77:T,79:k,80:C},{35:96,75:81,76:S,77:T,79:k,80:C},{35:97,75:81,76:S,77:T,79:k,80:C},{35:98,75:81,76:S,77:T,79:k,80:C},{35:99,75:81,76:S,77:T,79:k,80:C},{35:100,75:81,76:S,77:T,79:k,80:C},{35:101,75:81,76:S,77:T,79:k,80:C},{35:102,75:81,76:S,77:T,79:k,80:C},{35:103,75:81,76:S,77:T,79:k,80:C},{35:104,75:81,76:S,77:T,79:k,80:C},t(R,[2,59]),{35:105,75:81,76:S,77:T,79:k,80:C},{35:106,75:81,76:S,77:T,79:k,80:C},{35:107,75:81,76:S,77:T,79:k,80:C},{35:108,75:81,76:S,77:T,79:k,80:C},{35:109,75:81,76:S,77:T,79:k,80:C},{35:110,75:81,76:S,77:T,79:k,80:C},{35:111,75:81,76:S,77:T,79:k,80:C},{35:112,75:81,76:S,77:T,79:k,80:C},{35:113,75:81,76:S,77:T,79:k,80:C},{35:114,75:81,76:S,77:T,79:k,80:C},{35:115,75:81,76:S,77:T,79:k,80:C},{20:116,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:p,41:g,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:X,51:q,52:H,53:Q,54:K,55:G,56:Z,57:J,58:$,59:tt,60:et,61:nt,62:st,63:at,64:rt,65:it,66:ot,67:lt,68:ct,69:ut,70:ht,71:dt,72:pt,73:ft,74:yt},{12:[1,118],33:[1,117]},{35:119,75:81,76:S,77:T,79:k,80:C},{35:120,75:81,76:S,77:T,79:k,80:C},{35:121,75:81,76:S,77:T,79:k,80:C},{35:122,75:81,76:S,77:T,79:k,80:C},{35:123,75:81,76:S,77:T,79:k,80:C},{35:124,75:81,76:S,77:T,79:k,80:C},{35:125,75:81,76:S,77:T,79:k,80:C},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},t(kt,[2,15]),t(Xt,[2,17],{21:22,19:130,22:e,23:a,24:i,26:u,28:r}),t(kt,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:e,23:a,24:i,26:u,28:r,34:n,36:l,37:s,38:h,39:y,40:p,41:g,44:v,45:w,46:N,47:O,48:P,49:I,50:X,51:q,52:H,53:Q,54:K,55:G,56:Z,57:J,58:$,59:tt,60:et,61:nt,62:st,63:at,64:rt,65:it,66:ot,67:lt,68:ct,69:ut,70:ht,71:dt,72:pt,73:ft,74:yt}),t(Pt,[2,21]),t(Pt,[2,22]),t(R,[2,39]),t(oe,[2,71],{75:81,35:132,76:S,77:T,79:k,80:C}),t(Bt,[2,73]),{78:[1,133]},t(Bt,[2,75]),t(Bt,[2,76]),t(R,[2,40]),t(R,[2,41]),t(R,[2,42]),t(R,[2,43]),t(R,[2,44]),t(R,[2,45]),t(R,[2,46]),t(R,[2,47]),t(R,[2,48]),t(R,[2,49]),t(R,[2,50]),t(R,[2,51]),t(R,[2,52]),t(R,[2,53]),t(R,[2,54]),t(R,[2,55]),t(R,[2,56]),t(R,[2,57]),t(R,[2,58]),t(R,[2,60]),t(R,[2,61]),t(R,[2,62]),t(R,[2,63]),t(R,[2,64]),t(R,[2,65]),t(R,[2,66]),t(R,[2,67]),t(R,[2,68]),t(R,[2,69]),t(R,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},t(xt,[2,28]),t(xt,[2,29]),t(xt,[2,30]),t(xt,[2,31]),t(xt,[2,32]),t(xt,[2,33]),t(xt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},t(Xt,[2,18]),t(kt,[2,38]),t(oe,[2,72]),t(Bt,[2,74]),t(R,[2,24]),t(R,[2,35]),t(qt,[2,25]),t(qt,[2,26],{12:[1,138]}),t(qt,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:d(function(m,x){if(x.recoverable)this.trace(m);else{var E=new Error(m);throw E.hash=x,E}},"parseError"),parse:d(function(m){var x=this,E=[0],_=[],D=[null],o=[],Dt=this.table,f="",vt=0,le=0,De=2,ce=1,Ne=o.slice.call(arguments,1),A=Object.create(this.lexer),Et={yy:{}};for(var Qt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Qt)&&(Et.yy[Qt]=this.yy[Qt]);A.setInput(m,Et.yy),Et.yy.lexer=A,Et.yy.parser=this,typeof A.yylloc>"u"&&(A.yylloc={});var Kt=A.yylloc;o.push(Kt);var Ae=A.options&&A.options.ranges;typeof Et.yy.parseError=="function"?this.parseError=Et.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Le(B){E.length=E.length-2*B,D.length=D.length-B,o.length=o.length-B}d(Le,"popStack");function ue(){var B;return B=_.pop()||A.lex()||ce,typeof B!="number"&&(B instanceof Array&&(_=B,B=_.pop()),B=x.symbols_[B]||B),B}d(ue,"lex");for(var M,St,V,Gt,Ct={},Yt,z,he,Ft;;){if(St=E[E.length-1],this.defaultActions[St]?V=this.defaultActions[St]:((M===null||typeof M>"u")&&(M=ue()),V=Dt[St]&&Dt[St][M]),typeof V>"u"||!V.length||!V[0]){var Zt="";Ft=[];for(Yt in Dt[St])this.terminals_[Yt]&&Yt>De&&Ft.push("'"+this.terminals_[Yt]+"'");A.showPosition?Zt="Parse error on line "+(vt+1)+`:
2
2
  `+A.showPosition()+`
3
3
  Expecting `+Ft.join(", ")+", got '"+(this.terminals_[M]||M)+"'":Zt="Parse error on line "+(vt+1)+": Unexpected "+(M==ce?"end of input":"'"+(this.terminals_[M]||M)+"'"),this.parseError(Zt,{text:A.match,token:this.terminals_[M]||M,line:A.yylineno,loc:Kt,expected:Ft})}if(V[0]instanceof Array&&V.length>1)throw new Error("Parse Error: multiple actions possible at state: "+St+", token: "+M);switch(V[0]){case 1:E.push(M),D.push(A.yytext),o.push(A.yylloc),E.push(V[1]),M=null,le=A.yyleng,f=A.yytext,vt=A.yylineno,Kt=A.yylloc;break;case 2:if(z=this.productions_[V[1]][1],Ct.$=D[D.length-z],Ct._$={first_line:o[o.length-(z||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(z||1)].first_column,last_column:o[o.length-1].last_column},Ae&&(Ct._$.range=[o[o.length-(z||1)].range[0],o[o.length-1].range[1]]),Gt=this.performAction.apply(Ct,[f,le,vt,Et.yy,V[1],D,o].concat(Ne)),typeof Gt<"u")return Gt;z&&(E=E.slice(0,-1*z*2),D=D.slice(0,-1*z),o=o.slice(0,-1*z)),E.push(this.productions_[V[1]][0]),D.push(Ct.$),o.push(Ct._$),he=Dt[E[E.length-2]][E[E.length-1]],E.push(he);break;case 3:return!0}}return!0},"parse")},Pe=(function(){var _t={EOF:1,parseError:d(function(x,E){if(this.yy.parser)this.yy.parser.parseError(x,E);else throw new Error(x)},"parseError"),setInput:d(function(m,x){return this.yy=x||this.yy||{},this._input=m,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:d(function(){var m=this._input[0];this.yytext+=m,this.yyleng++,this.offset++,this.match+=m,this.matched+=m;var x=m.match(/(?:\r\n?|\n).*/g);return x?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),m},"input"),unput:d(function(m){var x=m.length,E=m.split(/(?:\r\n?|\n)/g);this._input=m+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-x),this.offset-=x;var _=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),E.length-1&&(this.yylineno-=E.length-1);var D=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:E?(E.length===_.length?this.yylloc.first_column:0)+_[_.length-E.length].length-E[0].length:this.yylloc.first_column-x},this.options.ranges&&(this.yylloc.range=[D[0],D[0]+this.yyleng-x]),this.yyleng=this.yytext.length,this},"unput"),more:d(function(){return this._more=!0,this},"more"),reject:d(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:d(function(m){this.unput(this.match.slice(m))},"less"),pastInput:d(function(){var m=this.matched.substr(0,this.matched.length-this.match.length);return(m.length>20?"...":"")+m.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:d(function(){var m=this.match;return m.length<20&&(m+=this._input.substr(0,20-m.length)),(m.substr(0,20)+(m.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:d(function(){var m=this.pastInput(),x=new Array(m.length+1).join("-");return m+this.upcomingInput()+`
@@ -1 +1 @@
1
- var Me=Object.defineProperty;var Re=(e,t,r)=>t in e?Me(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var d=(e,t,r)=>Re(e,typeof t!="symbol"?t+"":t,r);import{k as Ce,N as we,T as Pe,d as Ie,l as Oe,w as Te}from"./DT4bpJWb.js";import"./DYhIMPy1.js";import{bp as a,_ as Fe}from"./DXyyWeag.js";import"./CjaOLL1c.js";import"./Cuqq8bL5.js";import"./Bfr1QjPr.js";import{c as K}from"./ChTqQfQN.js";import"./DJkHth-B.js";import{Iy as i,tX as Le,ny as M,nx as _,m1 as De,vk as xe,vi as te,h8 as Ne,h9 as Be,c as We,Ib as Ve,a4 as Ue,yd as O,ye as G,yb as Ge,yc as qe,bY as He,bX as je,ca as Ke,c9 as ze,nA as R}from"./D5ej8a-y.js";import{cG as $e,cv as Xe,bv as Qe,cj as oe,cL as Ye,cK as Ze,cP as Je,c7 as et,cn as tt,c9 as rt,cE as ce,ax as st,bR as nt,cM as it}from"./Cg2SHWhQ.js";import{a as at,i as ot}from"./RD9QY1Yc.js";import{aJ as ct,V as le,bK as lt,m as dt,O as ut,bX as z,g as pt,W as ft,bY as gt,c as ht,aK as mt,bF as $,an as bt,aZ as St,_ as _t,aF as vt,bM as At,Z as kt,X as Et,Y as yt,bI as Mt,x as Rt}from"./BAKm0uzb.js";import{y as Ct}from"./DEYvT_CO.js";import{y as I}from"./DyvrH0mm.js";import{i as B}from"./DogedYC1.js";import{n as wt}from"./BbGz1HlB.js";const Pt=Object.freeze(Object.defineProperty({__proto__:null,NOTIFY_DURATION:we,TOAST_COUNTDOWN_CLASS:Pe,TOAST_COUNTDOWN_NO_HOVER_PAUSE_CLASS:Ie,notify:Ce,notifyMetadata:Oe,withToastCountdown:Te},Symbol.toStringTag,{value:"Module"})),ks=i.createSelector(e=>$e.select(e)?.capabilities.gitlabCheckout===!0),Es=i.createSelector(e=>e.gitlabAuth.host),ys=i.createSelector(e=>e.gitlabAuth.instanceBaseUrl??e.gitlabAuth.host),Ms=i.createSelector(e=>Le(e.gitlabAuth.instanceBaseUrl??e.gitlabAuth.host)??""),Rs=i.createSelector(e=>e.gitlabAuth.isCancelling),Cs=i.createSelector(e=>e.gitlabAuth.cancelOutcome),ws=i.createSelector(e=>e.gitlabAuth.isConfigured),Ps=i.createSelector(e=>e.gitlabAuth.isAuthenticating),Is=i.createSelector(e=>e.gitlabAuth.deviceFlow),Os=i.createSelector(e=>e.gitlabAuth.deviceGrantSupported),Ts=i.createSelector(e=>e.gitlabAuth.user),Fs=i.createSelector(e=>e.gitlabAuth.error);i.createSelector(e=>e.gitlabAuth.method);const Ls=i.createSelector(e=>e.gitlabAuth.statusReady===!0),E=[{id:"pr-reviewer",icon:"pr-reviewer",get name(){return a.specialists_builtin_prReviewer_name()},get description(){return a.specialists_builtin_prReviewer_description()},defaultBehaviorPrompt:"",promptUnavailable:!0},{id:"ui-designer",icon:"ui-designer",get name(){return a.specialists_builtin_uiDesigner_name()},get description(){return a.specialists_builtin_uiDesigner_description()},defaultBehaviorPrompt:"",promptUnavailable:!0},{id:"vulnerability-scanner",icon:"pr-reviewer",get name(){return a.specialists_builtin_vulnerabilityScanner_name()},get description(){return a.specialists_builtin_vulnerabilityScanner_description()},defaultBehaviorPrompt:"",promptUnavailable:!0},{id:"developer",icon:"verifier",get name(){return a.specialists_builtin_developer_name()},get description(){return a.specialists_builtin_developer_description()},defaultBehaviorPrompt:"",promptUnavailable:!0},{id:"product-manager",icon:"coordinator",get name(){return a.specialists_builtin_productManager_name()},get description(){return a.specialists_builtin_productManager_description()},defaultBehaviorPrompt:"",promptUnavailable:!0},{id:"maintenance-coordinator",icon:"ralph",get name(){return a.specialists_builtin_maintenanceCoordinator_name()},get description(){return a.specialists_builtin_maintenanceCoordinator_description()},defaultBehaviorPrompt:"",promptUnavailable:!0},{id:"chief-of-staff",icon:"chief-of-staff",get name(){return a.specialists_builtin_chiefOfStaff_name()},get description(){return a.specialists_builtin_chiefOfStaff_description()},hidden:!0,defaultBehaviorPrompt:"",promptUnavailable:!0}],de=new Set(["pr-reviewer"]),Ds="developer";function xs(e){return E.find(t=>t.id===e)}const It=i.createSelector(e=>e.githubAuth.mutationRequestId),Ot=i.createSelector(e=>e.githubAuth.callbacksCancelled),Tt=i.createSelector(e=>e.githubAuth.isDisconnecting),ue=i.createSelector(e=>e.githubAuth.isAuthenticated),Ft=i.createSelector(e=>e.githubAuth.statusSettled===!0),Lt=i.createSelector(e=>e.githubAuth.requiresDaemonAuth),Dt=i.createSelector(e=>e.githubAuth.user),xt=i.createSelector(e=>e.githubAuth.isAuthenticating),Nt=i.createSelector(e=>e.githubAuth.deviceFlow),Bt=i.createSelector(e=>e.githubAuth.error),Ns=Object.freeze(Object.defineProperty({__proto__:null,selectGitHubAuthCallbacksCancelled:Ot,selectGitHubAuthDeviceFlow:Nt,selectGitHubAuthError:Bt,selectGitHubAuthIsAuthenticated:ue,selectGitHubAuthIsAuthenticating:xt,selectGitHubAuthIsDisconnecting:Tt,selectGitHubAuthMutationRequestId:It,selectGitHubAuthRequiresDaemonAuth:Lt,selectGitHubAuthStatusSettled:Ft,selectGitHubAuthUser:Dt},Symbol.toStringTag,{value:"Module"}));function f(e){return e??""}function Wt(e,t){const r=e??[],s=t??[];return r.length===s.length&&r.every((n,o)=>f(n.provider)===f(s[o].provider)&&n.model===s[o].model&&n.hint===s[o].hint&&f(n.reasoningEffort)===f(s[o].reasoningEffort))}function re(e,t){if(e.source!=="user"||!t?.ignoreModelPin&&(e.model||e.codingAgent))return!1;const r=e.bundled;return r?f(e.name)===f(r.name)&&f(e.description)===f(r.description)&&f(e.behaviorPrompt)===f(r.behaviorPrompt)&&f(e.roleReminder)===f(r.roleReminder)&&f(e.reasoningEffort)===f(r.reasoningEffort)&&Wt(e.modelOptions,r.modelOptions):!1}const Bs=i.createSelector(e=>e.specialists.bundledSpecialists),Vt=i.createSelector(e=>e.specialists.fileSpecialists),Ws=i.createSelector(e=>M(Vt.select(e))),Vs=i.createSelector(e=>e.specialists.userOverrides);i.createSelector(e=>e.specialists.overridesLoaded);const Us=i.createSelector(e=>e.specialists.customSpecialistsLoaded),Gs=i.createSelector(e=>e.specialists.fileSpecialistsLoaded),qs=i.createSelector(e=>e.specialists.bundledSpecialistsLoaded),Hs=i.createSelector(e=>e.specialists.specialistsFolderPath),js=i.createSelector((e,t)=>{if(!t)return e.specialists.defaultSpecialistId??"";const r=e.providerCatalog?.byWorkspaceId?.[t]?.settings.find(s=>s.path==="specialists.default")?.value;return typeof r=="string"?r:""});i.createSelector(e=>e.specialists.providerModelOverrides);const W=i.createSelector((e,t)=>!(de.has(t)&&!ue.select(e)));function Ut(e,t){return t?e:e.filter(r=>!de.has(r.id))}function Gt(e,t){return Ut(e,t).filter(r=>!r.hidden)}function Ks(e,t){return Gt(e,t).filter(r=>r.role!=="internal")}const v=i.createSelector((e,t)=>{if(t)return(e.providerCatalog?.byWorkspaceId?.[t]?.specialists??[]).map(l=>({...l,defaultModel:l.model,defaultBehaviorPrompt:l.behaviorPrompt??l.prompt??"",defaultAgentType:l.agentType}));const r=M(e.specialists.fileSpecialists),s=e.specialists.bundledSpecialists,n=new Set,o=[];for(const l of r)!n.has(l.id)&&W.select(e,l.id)&&(n.add(l.id),o.push({id:l.id,name:l.name,description:l.description,codingAgent:l.codingAgent,defaultModel:l.model||void 0,defaultBehaviorPrompt:l.behaviorPrompt,roleReminder:l.roleReminder,source:l.source,importedFrom:l.importedFrom,unsupportedFields:l.unsupportedFields,requiredSkills:l.requiredSkills,missingSkills:l.missingSkills,hidden:l.hidden,resolvedModel:l.resolvedModel,resolvedProvider:l.resolvedProvider,modelOptions:l.modelOptions,reasoningEffort:l.reasoningEffort,role:l.role,teamAgents:l.teamAgents,icon:l.icon}));for(const l of s)!n.has(l.id)&&W.select(e,l.id)&&(n.add(l.id),o.push(l));if(!e.specialists.bundledSpecialistsLoaded&&r.length===0&&s.length===0)for(const l of E)!n.has(l.id)&&W.select(e,l.id)&&(n.add(l.id),o.push(l));const c=new Map;for(const l of E)c.has(l.id)||c.set(l.id,c.size);for(const l of s)c.has(l.id)||c.set(l.id,c.size);return o.sort((l,p)=>{const b=c.has(l.id),N=c.has(p.id);return b&&N?(c.get(l.id)??0)-(c.get(p.id)??0):b&&!N?-1:!b&&N?1:l.name.localeCompare(p.name)}),o}),zs=i.createSelector(e=>{const t=v.select(e).filter(s=>s.role==="orchestrator");if(t.length===0)return null;const r=new Set([...E.map(({id:s})=>s),...e.specialists.bundledSpecialists.map(({id:s})=>s)]);return t.sort((s,n)=>+!r.has(s.id)-+!r.has(n.id)||s.id.localeCompare(n.id)),t[0]}),qt=i.createSelector((e,t)=>{const r=_(e.specialists.fileSpecialists,t);if(r)return{id:r.id,name:r.name,description:r.description,source:r.source};const s=e.specialists.bundledSpecialists.find(n=>n.id===t);if(s)return{id:s.id,name:s.name,description:s.description,source:"builtin"};if(!e.specialists.bundledSpecialistsLoaded&&M(e.specialists.fileSpecialists).length===0&&e.specialists.bundledSpecialists.length===0){const n=E.find(o=>o.id===t);if(n)return{id:n.id,name:n.name,description:n.description,source:"builtin"}}return null}),$s=i.createSelector((e,t)=>qt.select(e,t)?.name??null),Xs=i.createSelector((e,t,r)=>{const n=v.select(e,r).find(o=>o.id===t);return n?n.defaultModel?n.defaultModel:n.resolvedModel??"":""}),Qs=i.createSelector((e,t,r)=>v.select(e,r).find(o=>o.id===t)?.defaultModel||void 0),Ys=i.createSelector((e,t,r)=>v.select(e,r).find(o=>o.id===t)?.reasoningEffort||void 0),Zs=i.createSelector((e,t,r)=>{const n=v.select(e,r).find(o=>o.id===t);return n?n.defaultBehaviorPrompt:""});function T(e,t){return t.some(r=>r.id===e)||E.some(r=>r.id===e)}const Js=i.createSelector((e,t,r)=>{if(r){const s=e.providerCatalog?.byWorkspaceId?.[r]?.specialists.find(n=>n.id===t);return!s||s.importedFrom?!1:s.source==="bundled"||s.source==="user"&&T(t,e.specialists.bundledSpecialists)}return T(t,e.specialists.bundledSpecialists)}),en=i.createSelector((e,t,r)=>r?!!X.select(e,t,r):!!_(e.specialists.fileSpecialists,t)),tn=i.createSelector((e,t,r)=>{if(r){const o=X.select(e,t,r);return!o||o.importedFrom||o.source==="project"?!1:T(t,e.specialists.bundledSpecialists)&&!re(o)}if(!T(t,e.specialists.bundledSpecialists))return!1;const n=_(e.specialists.fileSpecialists,t);return!n||n.source!=="user"?!1:!re(n)}),X=i.createSelector((e,t,r)=>{if(r){const s=e.providerCatalog?.byWorkspaceId?.[r]?.specialists.find(n=>n.id===t);return!s||s.source==="bundled"?void 0:{...s,source:s.source,model:s.model??"",behaviorPrompt:s.behaviorPrompt??s.prompt??"",filePath:s.path??""}}return _(e.specialists.fileSpecialists,t)}),rn=i.createSelector((e,t,r)=>{const s=X.select(e,t,r);return r&&!s?e.providerCatalog?.byWorkspaceId?.[r]?.specialists.some(n=>n.id===t)?"Built-in":null:s?.source==="project"?"Project":s?.source==="user"?"User":e.specialists.bundledSpecialists.some(n=>n.id===t)?"Built-in":null}),sn=i.createSelector((e,t,r)=>{if(r)return e.providerCatalog?.byWorkspaceId?.[r]?.specialists.find(o=>o.id===t)?.path;const s=_(e.specialists.fileSpecialists,t);if(s)return s.filePath;const n=e.specialists.bundledSpecialists.find(o=>o.id===t);if(n&&"filePath"in n)return n.filePath}),nn=i.createSelector((e,t,r)=>{if(r){const n=v.select(e,r).find(l=>l.id===t),o=n?.codingAgent||n?.resolvedProvider;if(o)return Xe.select(e,o,r);const c=Qe.select(e,r);return e.providerCatalog?.byWorkspaceId?.[r]?.readiness[c]?.available?c:""}const s=_(e.specialists.fileSpecialists,t);return s?.codingAgent?s.codingAgent:Ht.select(e,t)}),Ht=i.createSelector((e,t)=>{const s=v.select(e).find(n=>n.id===t);return s?.codingAgent?s.codingAgent:ct.select(e)?le.select(e):""}),an=i.createSelector((e,t)=>{if(t)return e.providerCatalog?.byWorkspaceId?.[t]?.importDiagnostics??[];const r=e.specialists.importDiagnostics;return r?M(r):[]}),on=i.createSelector((e,t)=>e.specialists.creationByContext?.[t]??De),cn=i.createSelector(e=>Object.values(e.specialists.creationByContext??{}).flatMap(t=>t.specialistId?[t.specialistId]:[])),V=K("Clipboard");async function ln(e){let t;if(at())try{const r=await ot("system:write-clipboard",{text:e});if(r?.success===!1)throw new Error(r.error||"Electron clipboard write failed");return}catch(r){t=r,V.warn("Electron clipboard write failed; falling back to browser clipboard",{error:r})}if(typeof navigator<"u"&&navigator.clipboard?.writeText)try{await navigator.clipboard.writeText(e);return}catch(r){throw V.error("Browser clipboard write failed",r,{electronError:t}),r}throw V.error("No clipboard write API is available",void 0,{electronError:t}),t instanceof Error?t:new Error("Clipboard write API unavailable")}const jt=["connected","disconnected","unreachable","revoked","update-required"],y=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),u=e=>typeof e=="string"&&e.length>0,C=e=>typeof e=="string"&&e.length>0?e:void 0,pe=e=>Number.isSafeInteger(e)&&e>=0?e:0;function Kt(e){if(!y(e))return;const t=Array.isArray(e.providers)?e.providers.flatMap(s=>y(s)&&u(s.id)?[{id:s.id,...s.visible===!1?{visible:!1}:{},status:typeof s.status=="string"?s.status:"unknown",models:Array.isArray(s.models)?s.models.filter(n=>u(n)):[]}]:[]):[],r=C(e.intentdVersion);return{...r?{intentdVersion:r}:{},providers:t}}function dn(e){if(!y(e)||!u(e.id)||!u(e.name)||!u(e.fingerprint)||!jt.includes(e.state)||!Number.isInteger(e.port)||!u(e.addedAt))return null;const t=y(e.platform)&&u(e.platform.os)&&u(e.platform.arch)?{os:e.platform.os,arch:e.platform.arch}:void 0,r=Kt(e.capabilities),s=C(e.tcAddress),n=C(e.observedAt),o=C(e.lastConnectedAt),c=xe(e.cloud),l=Number.isInteger(e.nodeProtocol)&&e.nodeProtocol>=0?e.nodeProtocol:void 0;return{id:e.id,name:e.name,...t?{platform:t}:{},hosts:Array.isArray(e.hosts)?e.hosts.filter(p=>u(p)):[],port:e.port,...s?{tcAddress:s}:{},fingerprint:e.fingerprint,state:e.state,runningAgents:pe(e.runningAgents),...r?{capabilities:r}:{},...l!==void 0?{nodeProtocol:l}:{},...n?{observedAt:n}:{},addedAt:e.addedAt,...o?{lastConnectedAt:o}:{},...c?{cloud:c}:{}}}function un(e){if(!y(e)||!u(e.credentialId)||!u(e.backendId)||!u(e.backendName)||!u(e.createdAt))return null;const t=C(e.lastUsedAt);return{credentialId:e.credentialId,backendId:e.backendId,backendName:e.backendName,createdAt:e.createdAt,...t?{lastUsedAt:t}:{},connected:e.connected===!0,runningAgents:pe(e.runningAgents)}}function pn(e){const t=(typeof e=="string"?e:"").trim().toUpperCase();return t===""?null:t}function zt(e){if(!y(e)||typeof e.name!="string")return null;const t=e.name;return e.kind==="local"?{kind:"local",name:t}:e.kind==="machine"&&u(e.nodeId)?{kind:"machine",nodeId:e.nodeId,name:t}:e.kind==="cloud"&&u(e.cloudMachineId)?{kind:"cloud",cloudMachineId:e.cloudMachineId,name:t}:null}function fn(e){if(!Array.isArray(e))return null;const t=[];for(const r of e){const s=zt(r);if(!s)return null;t.push(s)}return t}function $t(e){return e.kind==="local"?{kind:"local"}:e.kind==="machine"?{kind:"machine",nodeId:e.nodeId}:{kind:"cloud",cloudMachineId:e.cloudMachineId}}function P(e){return e.kind==="local"?"local":e.kind==="machine"?`machine:${e.nodeId}`:`cloud:${e.cloudMachineId}`}const Xt={macos:"macOS",linux:"Linux",windows:"Windows"},Qt={aarch64:"arm64",arm64:"arm64",x86_64:"x64",x64:"x64"};function A(e,t){const r=[e&&(Xt[e]??e),t&&(Qt[t]??t)].filter(s=>!!s);return r.length?r.join(" "):null}function Yt(e){return e?.placement?.target==="remote"||I(e?.placement?.target)}const Zt=new Set(["running","paused","resuming","pausing","stopping"]);function Jt(e,t){if(e.placementError)return null;if(e.cloudStart)return"starting";if(!e.nodeId)return e.effectiveIsolation==="pending"?"starting":null;const r=t?.cloud?.state;return r&&Zt.has(r)?r:e.effectiveIsolation==="pending"?"starting":null}function fe(e,t){if(!e||!Yt(e))return null;const r=e.nodeId??e.placement?.nodeId??"",s=t&&t.id===r?t:null;if(I(e.placement?.target))return{nodeId:r,name:e.nodeName?.trim()||Ne(s?.cloud?.provider??Be(e.placement?.cloudMachineId)),platform:A(s?.platform?.os,s?.platform?.arch),state:"ready",cloud:{state:Jt(e,s)}};const n=A(e.placement?.os,e.placement?.arch)??A(s?.platform?.os,s?.platform?.arch),o=s?.state==="revoked"?"revoked":s?.state==="unreachable"||e.nodeState==="offline"?"unreachable":"ready";return{nodeId:r,name:e.nodeName?.trim()||s?.name||a.remoteAgent_location_unknownMachine(),platform:n,state:o}}function gn(e,t){if(!e)return null;const r=t&&t.id===e?t:null;return{nodeId:e,name:r?.name||a.remoteAgent_location_unknownMachine(),platform:A(r?.platform?.os,r?.platform?.arch),state:r?.state==="revoked"?"revoked":r?.state==="unreachable"?"unreachable":"ready"}}function ge(e){switch(e){case"starting":return a.cloudMachines_agent_starting();case"running":return a.cloudMachines_agent_running();case"paused":return a.cloudMachines_agent_paused();case"resuming":return a.cloudMachines_agent_resuming();case"pausing":return a.cloudMachines_agent_pausing();case"stopping":return a.cloudMachines_agent_stopping();default:return null}}function hn(e){const t=ge(e.cloud?.state);return t?a.cloudMachines_agent_chip({machine:e.name,state:t}):e.name}function mn(e){if(e.cloud){const r=ge(e.cloud.state),s=a.remoteAgent_location_tooltipNoPlatform({machine:e.name});return r?a.remoteAgent_location_tooltipWithState({location:s,state:r}):s}const t=e.platform?a.remoteAgent_location_tooltip({machine:e.name,platform:e.platform}):a.remoteAgent_location_tooltipNoPlatform({machine:e.name});switch(e.state){case"unreachable":return a.remoteAgent_location_tooltipWithState({location:t,state:a.remoteMachines_state_unreachable_label()});case"revoked":return a.remoteAgent_location_tooltipWithState({location:t,state:a.remoteMachines_state_revoked_label()});default:return t}}function he(e,t){return!e||!t?null:e.placementError?"failed":t.state==="revoked"?"revoked":t.state==="unreachable"?"unreachable":e.effectiveIsolation==="pending"||e.cloudStart?"starting":e.setup?.state==="failed"?"setup-failed":null}function me(e){if(!e.endsWith("}"))return null;for(let t=e.indexOf(" {");t>=0;t=e.indexOf(" {",t+1))try{const r=JSON.parse(e.slice(t+1));if(r&&typeof r=="object"&&typeof r.code=="string")return{message:e.slice(0,t).trim(),data:r}}catch{}return null}function er(e,t){const r=e.detail??"",s=me(r),n=e.code==="machine-update-required"||s?.data.code==="machine-update-required";if(n&&s?.data.reason==="prepared-checkout")return{updateRequired:n,message:a.remoteAgent_updateRequired_preparedCheckout({machine:t})};const o=te(s?.data),c=o??(e.code?te({code:e.code}):null);return c?{updateRequired:n,message:s?.message||r,cloud:c,cloudDetailKnown:!!o}:{updateRequired:n,message:s?.message||r}}function bn(e){if(!I(e?.placement?.target)||!e.placementError||e.status!==We.Error)return null;const t=er(e.placementError,"");return t.cloud?t:null}const tr=["attachments-too-large-for-machine:","node-prompt-too-large:"],rr="remote-agent-unsupported:";function se(e){return new Intl.NumberFormat(void 0,{maximumFractionDigits:1}).format(e/1048576)}function Sn(e){const t=me(e)?.message??e;for(const s of tr){const n=t.indexOf(s);if(n<0)continue;const o=t.slice(n+s.length).trim().replace(/^[a-z][\w]*(?:\.[\w]+)+:\s*/i,""),c=/come to (\d+) bytes\b.*?over its (\d+)-byte limit/.exec(o);return c?a.remoteAgent_attachmentsTooLargeSized_error({size:se(Number(c[1])),limit:se(Number(c[2]))}):o?a.remoteAgent_attachmentsTooLarge_error({detail:o}):a.remoteAgent_attachmentsTooLargeNoDetail_error()}const r=t.indexOf(rr);return r>=0&&/attachment/i.test(t.slice(r))?a.remoteAgent_attachmentsUnsupported_error():null}function _n(e){return I(e?.placement?.target)&&he(e,fe(e))==="starting"}function vn(e,t){if(!I(e?.placement?.target))return!1;const r=fe(e,t);return r?.cloud?.state==="resuming"&&he(e,r)===null}const h="",q="cloud:";function Q(e){return`${q}${e}`}function D(e){return e?.startsWith(q)&&e.slice(q.length)||null}const An=Q("e2b");function sr(e,t){return e?.find(r=>Q(r.cloudMachineId)===t&&r.unavailableReason===null)}const nr=new Set(["connected","disconnected"]);function ir(e){switch(e){case"unreachable":return a.remoteMachines_state_unreachable_label();case"revoked":return a.remoteMachines_state_revoked_label();case"update-required":return a.remoteMachines_state_updateRequired_label();default:return}}function Y(e){return nr.has(e.state)}function ar({backendLabel:e,backendPlatform:t,machines:r,cloud:s,orchestrator:n=!1}){const o=[n?{id:h,label:a.remoteMachines_startOn_firstAvailable_label(),platform:null,disabled:!1,hint:a.remoteMachines_startOn_firstAvailable_hint()}:{id:h,label:e,platform:A(t?.os,t?.arch),disabled:!1},...r.map(c=>{const l=A(c.platform?.os,c.platform?.arch);return Y(c)?{id:c.id,label:c.name,platform:l,disabled:!1}:{id:c.id,label:c.name,platform:l,disabled:!0,reason:ir(c.state)}})];for(const c of s??[])o.push({id:Q(c.cloudMachineId),label:c.label,platform:null,kind:"cloud",disabled:c.unavailableReason!==null,...c.unavailableReason?{reason:c.unavailableReason}:c.needsProfile?{hint:a.cloudMachines_startOn_hint()}:{}});return o}function kn(e){return e.find(t=>t.id===h)?.label??""}function En(e,t,r){if(e!==h)return D(e)?void 0:e;if(r)return t.find(s=>s.id!==h&&s.kind!=="cloud"&&!s.disabled)?.id}function or({remoteMachinesVisible:e,supported:t,machines:r,cloud:s}){return e&&t&&(r.some(Y)||(s??[]).some(n=>n.unavailableReason===null))}function cr(e,t,r){if(!e)return h;if(D(e))return sr(r,e)?e:h;const s=t.find(n=>n.id===e);return s&&Y(s)?s.id:h}function yn(e,{cloudEntries:t=!1,providerOf:r}={}){const s=D(e);return s?t&&r?.(s)==="northflank"?{target:"cloud",checkout:"isolated",cloudMachineId:s}:t?{target:"e2b",checkout:"isolated",cloudMachineId:s}:{target:"e2b",checkout:"isolated"}:e?{target:"remote",checkout:"isolated",nodeId:e}:void 0}function Mn({groups:e,providerRef:t,model:r}){const s=c=>c.options.filter(l=>!l.disabled),n=e.find(c=>c.key===t),o=n?s(n):[];if(r){const c=Ve(r).modelId;if(o.some(l=>l.value===c))return null}else if(o.length>0)return null;if(n&&o.length>0)return{providerId:n.key,modelId:o[0].value};for(const c of e){if(c.key==="default")continue;const l=s(c);if(l.length>0)return{providerId:c.key,modelId:l[0].value}}return null}function lr(e,t,r,s){const n=e.map(P),o=n.indexOf(t),c=n.indexOf(r);if(o<0||c<0||o===c)return null;let l=c+(s==="after"?1:0);if(o<l&&(l-=1),l===o)return null;const p=[...e],[b]=p.splice(o,1);return p.splice(l,0,b),p.map($t)}function Rn(e,t,r){const s=e.findIndex(o=>P(o)===t),n=e[s+r];return s<0||!n?null:lr(e,t,P(n),r===-1?"before":"after")}function dr(e,t){if(e===h)return"local";const r=t==="cloud"?D(e):null;return P(r?{kind:"cloud",cloudMachineId:r}:{kind:"machine",nodeId:e})}function ne(e,t){const r=new Map(t.map((n,o)=>[P(n),o])),s=n=>r.get(dr(n.id,n.kind))??t.length;return e.map((n,o)=>({option:n,index:o})).sort((n,o)=>s(n.option)-s(o.option)||n.index-o.index).map(({option:n})=>n)}const Z=i.createSelector(e=>Ct.select(e)&&e.remoteMachines?.supported===!0),Cn=i.createSelector(e=>Z.select(e)&&lt.select(e)&&!oe.select(e)),be=i.createSelector(e=>Z.select(e)&&e.remoteMachines.machineOrder===!0&&e.remoteMachines.order!==null),ie=i.createSelector(e=>be.select(e)?e.remoteMachines.order??[]:[]),wn=i.createSelector(e=>e.remoteMachines.orderSaving!==null),J=i.createSelector(e=>Object.values(e.remoteMachines?.machines??{}).sort((t,r)=>t.name.localeCompare(r.name))),Pn=i.createSelector(e=>e.remoteMachines.localFingerprint),In=i.createSelector(e=>e.remoteMachines.pending),On=i.createSelector(e=>e.remoteMachines.failures),Tn=i.createSelector(e=>e.remoteMachines.executorBackends??[]),ur=i.createSelector((e,t)=>{if(t===Ue)return a.layout_daemonStatus_localConnection_label();const r=_(e.connections.connections,t);return r?dt(r):t}),pr=i.createSelector(e=>ur.select(e,e.connections.windowBackendId)),Fn=i.createSelector((e,t)=>(t?e.remoteMachines.machines[t]??e.cloudMachines?.machines[t]:void 0)??null),Ln=i.createSelector((e,t)=>{const r=e.providerSettings?.profiles;return ut({catalogProfiles:Je.select(e,t),defaultRemoteIncompatibility:Ze.select(e,t),defaultRemoteLaunch:Ye.select(e,t),profileDefaults:Object.values(r?.defaults??{}),profilesLoadStatus:r?.loadStatus??"idle"})}),Dn=i.createSelector(e=>Object.fromEntries(Object.values(e.providerSettings?.profiles?.defaults??{}).map(t=>[t.baseProviderId,t.env.length>0]))),Se=i.createSelector(e=>or({remoteMachinesVisible:Z.select(e),supported:e.remoteMachines?.initialAgentPlacement===!0,machines:J.select(e),cloud:z(e)}));function fr(e){const t=_(e.connections.connections,e.connections.windowBackendId);return t?.hostOs?{os:t.hostOs,arch:t.hostArch}:void 0}const gr=i.createSelector(e=>{const t=oe.select(e),r=ar({backendLabel:pr.select(e),backendPlatform:fr(e),machines:J.select(e),cloud:z(e),orchestrator:t});if(!be.select(e))return r;if(!t)return ne(r,ie.select(e));const[s,...n]=r;return[s,...ne(n,ie.select(e))]}),xn=i.createSelector(e=>Se.select(e)?gr.select(e):[]),Nn=i.createSelector(e=>e.remoteMachines?.initialAgentPlacement===!0),Bn=i.createSelector((e,t,r)=>Se.select(e)?cr(t,J.select(e),_e(e,r)):h);function _e(e,t){const r=z(e);if(!r||!t)return r;const s=e.cloudMachines?.providers??{};return r.map(n=>{if(n.unavailableReason)return n;const o=pt(e,t,s[n.cloudMachineId]??null);return o?{...n,unavailableReason:o}:n})}const Wn=i.createSelector((e,t)=>_e(e,t)),hr=K("WorkspaceValidation");async function Vn(e,t=!1,r=!1){if(!e||e.trim().length===0)return{valid:!1,error:a.workspace_validation_repoPathRequired_error(),suggestion:a.workspace_validation_repoPathRequired_suggestion()};const s=e.trim();return mr(s)?Sr(s):_r(s,t,r)}function mr(e){return[/^https?:\/\/github\.com\//i,/^git@github\.com:/i,/^github\.com\//i,/^([a-zA-Z0-9\-_]+)\/([a-zA-Z0-9\-_\.]+)$/].some(r=>r.test(e.trim()))}function br(e){const t=e.trim(),r=[/^https?:\/\/github\.com\/([^\/]+)\/([^\/]+)$/i,/^git@github\.com:([^\/]+)\/([^\/]+)$/i,/^github\.com\/([^\/]+)\/([^\/]+)$/i];for(const n of r){const o=t.match(n);if(o){const c=o[2].replace(/\.git$/,"");return c?{owner:o[1],repo:c}:null}}const s=t.match(/^([a-zA-Z0-9\-_]+)\/([a-zA-Z0-9\-_\.]+)$/);if(s&&!t.includes("\\")&&!t.includes(":")){const n=s[2].replace(/\.git$/,"");return n?{owner:s[1],repo:n}:null}return null}async function Sr(e){return br(e)?{valid:!0,warning:a.workspace_validation_githubCloneLocally_warning()}:{valid:!1,error:a.workspace_validation_invalidGithubUrl_error(),suggestion:a.workspace_validation_invalidGithubUrl_suggestion()}}async function _r(e,t=!1,r=!1){if(e.includes("\0"))return{valid:!1,error:a.workspace_validation_nullCharacters_error()};if(!e.startsWith("/")&&!e.startsWith("~")&&!e.startsWith(".")&&!e.includes(":\\")&&!/^[a-zA-Z]:\//.test(e))return{valid:!1,error:a.workspace_validation_pathNotAbsolute_error(),suggestion:a.workspace_validation_pathNotAbsolute_suggestion()};if(typeof window<"u"&&window.electronAPI)try{const s=await B("file:getDirectoryStatus",{path:e});if(s.success&&s.data){const c=s.data;return c.exists?c.isDirectory?c.isGitRepo?{valid:!0,isNewRepo:!1,directoryStatus:c}:c.isSubdirectoryOfGitRepo?{valid:!0,isNewRepo:!1,directoryStatus:c,warning:a.workspace_validation_insideParentRepo_warning({path:c.parentGitRoot??""})}:r?{valid:!0,isNewRepo:!1,directoryStatus:c}:t?c.isEmpty?{valid:!0,isNewRepo:!0,directoryStatus:c,warning:a.workspace_validation_emptyDirInit_warning()}:{valid:!0,isNewRepo:!0,directoryStatus:c,warning:a.workspace_validation_nonGitDirInit_warning()}:{valid:!1,error:a.workspace_repoSelector_notGitRepository_label(),directoryStatus:c}:{valid:!1,error:a.workspace_validation_notDirectory_error(),suggestion:a.workspace_validation_notDirectory_suggestion(),directoryStatus:c}:t?{valid:!0,isNewRepo:!0,directoryStatus:c,warning:a.workspace_validation_willCreateRepo_warning()}:{valid:!1,error:a.workspace_validation_dirNotExist_error(),suggestion:a.workspace_validation_dirNotExist_suggestion(),directoryStatus:c}}if(!(await B("file:exists",{path:e})).exists)return t?{valid:!0,isNewRepo:!0,warning:a.workspace_validation_willCreateRepo_warning()}:{valid:!1,error:a.workspace_validation_dirNotExist_error(),suggestion:a.workspace_validation_dirNotExistLegacy_suggestion()};const o=await B("git:isRepository",{path:e});if(!t&&o?.isRepository!==!0)return{valid:!1,error:o?.isRepository===!1?a.workspace_repoSelector_notGitRepository_label():a.workspace_compactInitializer_gitCheckUnknown_label()};if(!o.isRepository)return{valid:!0,isNewRepo:!0,warning:a.workspace_validation_nonGitInit_warning()}}catch(s){if(hr.warn("Could not validate path existence",s),!t)return{valid:!1,error:a.workspace_compactInitializer_gitCheckUnknown_label()}}return{valid:!0,isNewRepo:!1}}function Un(e){if(!e||e.trim().length===0)return{valid:!0};const t=e.trim();return/[\s~^:?*\[\]\\]/.test(t)?{valid:!1,error:a.workspace_validation_branchPrefixInvalidChars_error(),suggestion:a.workspace_validation_branchChars_suggestion()}:t==="."||t===".."||t.startsWith(".")?{valid:!1,error:a.workspace_validation_branchPrefixDot_error()}:t.includes("..")||t.includes("//")?{valid:!1,error:a.workspace_validation_branchPrefixConsecutive_error()}:t.startsWith("/")?{valid:!1,error:a.workspace_validation_branchPrefixSlash_error()}:t.endsWith(".lock")?{valid:!1,error:a.workspace_validation_branchPrefixLock_error()}:t.length>50?{valid:!1,error:a.workspace_validation_branchPrefixTooLong_error()}:{valid:!0}}function Gn(e){if(!e||e.trim().length===0)return"";let t=e.trim().replace(/^[./]+/,"").replace(/[\s~^:?*\[\]\\]/g,"-").replace(/\.{2,}/g,"-").replace(/\/{2,}/g,"/").replace(/-{2,}/g,"-").replace(/^-+/,"").replace(/\.lock$/,"").toLowerCase();return t.length>0&&!t.endsWith("/")&&!t.endsWith("-")&&(t=t.includes("/")?`${t}/`:`${t}/`),t}function qn(e){if(!e||e.trim().length===0)return{valid:!1,error:a.workspace_validation_branchNameRequired_error()};const t=e.trim();return/[\s~^:?*\[\]\\]/.test(t)?{valid:!1,error:a.workspace_validation_branchNameInvalidChars_error(),suggestion:a.workspace_validation_branchChars_suggestion()}:["HEAD",".",".."].includes(t)?{valid:!1,error:a.workspace_validation_branchNameReserved_error()}:t.includes("..")||t.includes("//")?{valid:!1,error:a.workspace_validation_branchNameConsecutive_error()}:t.startsWith("/")||t.endsWith("/")?{valid:!1,error:a.workspace_validation_branchNameSlash_error()}:t.endsWith(".lock")?{valid:!1,error:a.workspace_validation_branchNameLock_error()}:{valid:!0}}function Hn(e){return!e||e.trim().length===0?{valid:!0}:e.trim().length>1e5?{valid:!1,error:a.workspace_validation_promptTooLong_error(),suggestion:a.workspace_validation_promptTooLong_suggestion()}:{valid:!0}}function jn(e){const t=e.toLowerCase();return t.includes("maxbuffer")?a.workspace_gitError_maxBuffer():t.includes("clone")&&t.includes("timed out")?a.workspace_gitError_cloneTimeout():t.includes("json-rpc request timed out: workspace.create")?a.workspace_gitError_createTimeout():t.includes("timed out")&&["git","clone","fetch","worktree","pull","push","rebase","merge"].some(r=>t.includes(r))?a.workspace_gitError_gitTimeout():t.includes("git clone failed")?t.includes("could not read from remote")?a.workspace_gitError_cloneRemote():t.includes("authentication")||t.includes("permission denied")||t.includes("access denied")?a.workspace_gitError_cloneAuth():a.workspace_gitError_cloneFailed():t.includes("could not resolve any ref to create worktree")?a.workspace_gitError_worktreeRef():t.includes("failed to write file")?t.includes("eacces")||t.includes("permission denied")?a.workspace_gitError_writePermission():t.includes("enospc")||t.includes("disk space")?a.workspace_gitError_diskSpaceFree():t.includes("enoent")||t.includes("no such file")?a.workspace_gitError_writeNoEnt():e:t.includes("failed to read file")?t.includes("enoent")||t.includes("no such file")?a.workspace_gitError_readNotFound():t.includes("eacces")||t.includes("permission denied")?a.workspace_gitError_readPermission():e:t.includes("permission denied")?a.workspace_gitError_permissionDenied():t.includes("not found")||t.includes("enoent")?a.workspace_gitError_notFound():t.includes("already exists")?a.workspace_gitError_alreadyExists():t.includes("network")||t.includes("etimedout")?a.workspace_gitError_network():t.includes("authentication")||t.includes("401")?t.includes("private repositor")?e:a.workspace_gitError_authFailed():t.includes("rate limit")||t.includes("403")?a.workspace_gitError_rateLimit():t.includes("disk space")||t.includes("enospc")?a.workspace_gitError_diskSpace():e}const vr=["idle","exited"];function Ar(e){return e===void 0||!vr.includes(e)}function Kn(e){return e.status==="restarting"?"restarting":Ar(e.status)?"running":e.status==="idle"?"idle":e.exitCode===0?"succeeded":e.exitCode===null||e.exitCode===void 0?"exited":e.exitCode>=128?"stopped":"failed"}function kr(e){return e.engine==="os"?"os":e.isLoading||e.keyConfigured[e.provider]===!0?"daemon":e.osEngineAvailable?"os":"unavailable"}const zn=i.createSelector(e=>e.voiceSettings.isLoading),$n=i.createSelector(e=>e.voiceSettings.available),Xn=i.createSelector(e=>e.voiceSettings.provider),Qn=i.createSelector(e=>e.voiceSettings.engine),Yn=i.createSelector(e=>e.voiceSettings.osEngineAvailable),Zn=i.createSelector(e=>e.voiceSettings.keyConfigured),Jn=i.createSelector(e=>e.voiceSettings.vocabulary),ei=i.createSelector(e=>e.voiceSettings.openaiModel),ti=i.createSelector(e=>e.voiceSettings.language),ri=i.createSelector(e=>e.voiceSettings.workspaceVocabularyMaxTerms),si=i.createSelector(e=>e.voiceSettings.inputDeviceId),ni=i.createSelector(e=>e.voiceSettings.inputDevices),ii=i.createSelector(e=>e.voiceSettings.busyProvider),ai=i.createSelector(e=>e.voiceSettings.error),oi=i.createSelector(e=>et.select(e)?"unavailable":kr(e.voiceSettings)),H="intent.voice.inputDevice";let j;function Er(){if(j!==void 0)return j;try{const e=localStorage.getItem(H);return typeof e=="string"&&e!==""?e:null}catch{return null}}function ci(e){j=e;try{e===null?localStorage.removeItem(H):localStorage.setItem(H,e)}catch{}}let F=null;function li(e){F=e}function di(){const e=F;return F=null,e}function yr(){F=null}const Mr=300,Rr=300;class Cr{constructor(t){d(this,"holdThresholdMs");d(this,"doublePressWindowMs");d(this,"onRecordStart");d(this,"onRecordStop");d(this,"currentState","idle");d(this,"timer",null);this.holdThresholdMs=t.holdThresholdMs??Mr,this.doublePressWindowMs=t.doublePressWindowMs??Rr,this.onRecordStart=t.onRecordStart,this.onRecordStop=t.onRecordStop}get state(){return this.currentState}keyDown(){switch(this.currentState){case"idle":this.currentState="first-press",this.armTimer(this.holdThresholdMs,()=>{this.currentState="holding"}),this.onRecordStart();break;case"await-second-press":this.clearTimer(),this.currentState="second-press",this.armTimer(this.holdThresholdMs,()=>{this.currentState="holding-send"});break;case"latched":this.currentState="latched-press";break;case"latched-await-second":this.clearTimer(),this.currentState="draining",this.onRecordStop({stopReason:"double-press",autoSend:!0});break}}keyUp(){switch(this.currentState){case"first-press":this.clearTimer(),this.currentState="await-second-press",this.armTimer(this.doublePressWindowMs,()=>{this.currentState="latched"});break;case"holding":this.currentState="idle",this.onRecordStop({stopReason:"hold-release",autoSend:!1});break;case"second-press":this.clearTimer(),this.currentState="idle",this.onRecordStop({stopReason:"double-press",autoSend:!0});break;case"holding-send":this.currentState="idle",this.onRecordStop({stopReason:"double-hold-release",autoSend:!0});break;case"latched-press":this.currentState="latched-await-second",this.armTimer(this.doublePressWindowMs,()=>{this.currentState="idle",this.onRecordStop({stopReason:"latch-stop",autoSend:!1})});break;case"draining":this.currentState="idle";break}}reset(){this.clearTimer(),this.currentState="idle"}armTimer(t,r){this.clearTimer(),this.timer=setTimeout(()=>{this.timer=null,r()},t)}clearTimer(){this.timer!==null&&clearTimeout(this.timer),this.timer=null}}let L=null;function ui(e){L=e}function pi(){const e=L;return L=null,e}function wr(){L=null}const Pr=12e4,Ir=["audio/webm;codecs=opus","audio/webm"];function fi(){return typeof navigator<"u"&&typeof navigator.mediaDevices?.getUserMedia=="function"&&typeof MediaRecorder<"u"}function Or(e){return e?{audio:{deviceId:{ideal:e}}}:{audio:!0}}function Tr(){if(!(typeof MediaRecorder>"u"||typeof MediaRecorder.isTypeSupported!="function"))return Ir.find(e=>MediaRecorder.isTypeSupported(e))}class Fr{constructor(t){d(this,"maxDurationMs");d(this,"now");d(this,"callbacks");d(this,"deviceId");d(this,"currentState","idle");d(this,"recorder",null);d(this,"stream",null);d(this,"chunks",[]);d(this,"startedAt",0);d(this,"maxTimer",null);d(this,"discardRequested",!1);d(this,"cancelRequested",!1);this.maxDurationMs=t.maxDurationMs??Pr,this.now=t.now??Date.now,this.callbacks={onFinished:t.onFinished,onError:t.onError},this.deviceId=t.deviceId??null}get state(){return this.currentState}async start(){if(this.currentState!=="idle")return"discarded";this.currentState="starting";let t;try{t=await navigator.mediaDevices.getUserMedia(Or(this.deviceId))}catch(n){const o=this.discardRequested;return this.currentState="stopped",o||this.callbacks.onError(n),o?"discarded":"error"}if(this.discardRequested){for(const n of t.getTracks())n.stop();return this.currentState="stopped","discarded"}this.stream=t;const r=Tr(),s=r?new MediaRecorder(t,{mimeType:r}):new MediaRecorder(t);return this.recorder=s,s.ondataavailable=n=>{n.data&&n.data.size>0&&this.chunks.push(n.data)},s.onstop=()=>this.handleRecorderStop(),s.onerror=n=>this.handleRecorderError(n),s.start(),this.startedAt=this.now(),this.currentState="recording",this.maxTimer=setTimeout(()=>this.stop(),this.maxDurationMs),"recording"}stop(){if(this.currentState==="starting"){this.discardRequested=!0;return}this.currentState==="recording"&&this.recorder?.stop()}cancel(){if(this.currentState==="starting"){this.discardRequested=!0;return}this.currentState==="recording"&&(this.cancelRequested=!0,this.recorder?.stop())}handleRecorderStop(){const t=this.now()-this.startedAt,r=this.recorder?.mimeType||"audio/webm",s=this.chunks,n=this.cancelRequested;this.teardown(),!n&&this.callbacks.onFinished({blob:new Blob(s,{type:r}),durationMs:t,mimeType:r})}handleRecorderError(t){const r=t?.error??t;this.teardown(),this.callbacks.onError(r)}teardown(){this.maxTimer!==null&&clearTimeout(this.maxTimer),this.maxTimer=null,this.recorder&&(this.recorder.ondataavailable=null,this.recorder.onstop=null,this.recorder.onerror=null),this.recorder=null;for(const t of this.stream?.getTracks()??[])t.stop();this.stream=null,this.chunks=[],this.currentState="stopped"}}const Lr=300;function Dr(e){const t=e?.name;return t==="NotAllowedError"||t==="SecurityError"}const xr={stopReason:"manual",autoSend:!1};let g=null,S=null,k=0,w=null;const x=new Cr({onRecordStart:()=>{w&&Nr(w)},onRecordStop:e=>{ve(w,e)}});function gi(){return g!==null}function hi(){return g}function mi(e){w=e,k+=1,k===1&&x.keyDown()}function bi(e){w=e,k!==0&&(k-=1,k===0&&x.keyUp())}function Nr(e){if(g!==null)return;wr(),yr();const t=new Fr({deviceId:Er(),onFinished:r=>{g===t&&(g=null);const s=S??{stopReason:"auto-stop",autoSend:!1},n=S!==null;if(S=null,e.dispatch(O()),n||x.reset(),r.durationMs<Lr){s.autoSend&&e.dispatch(G());return}e.dispatch(Ge({...r,stopReason:s.stopReason,autoSend:s.autoSend}))},onError:r=>{g===t&&(g=null),S=null,e.dispatch(O()),e.showHint(Dr(r)?a.hardwareConsole_ptt_micDenied_message():a.hardwareConsole_ptt_recordingFailed_message())}});g=t,e.dispatch(qe()),t.start().then(r=>{if(r!=="recording"&&(g===t&&(g=null),r==="discarded")){const s=S?.autoSend===!0;S=null,e.dispatch(O()),s&&e.dispatch(G())}})}function ve(e,t){const r=g;if(r===null){t.autoSend&&e?.dispatch(G());return}S=t,r.stop()}function Si(){ve(null,xr)}function _i(e){x.reset(),k=0,S=null;const t=g;t!==null&&(g=null,t.cancel(),e.dispatch(O()))}const Br=K("HardwareConsoleVoiceSetupToast"),Wr="hardware-console-voice-setup";let U=null;function Vr(){return U||(U=Fe(()=>Promise.resolve().then(()=>Pt),void 0,import.meta.url).then(e=>e.notify)),U}function Ur(){wt("/settings?tab=connections#voice").catch(e=>{Br.error("Failed to open voice settings from setup toast",e)})}function Gr(){return{label:a.hardwareConsole_voice_openSettings_label(),onClick:()=>Ur()}}function vi(){Vr().then(e=>{e.error(a.hardwareConsole_voice_noKey_error(),{id:Wr,action:Gr()})})}const Ai=i.createSelector(e=>e.externalEditors.selectedAction),qr=i.createSelector(e=>e.externalEditors.editors),Hr=i.createSelector(e=>{const t=M(qr.select(e)),r=e.externalEditors.editorOrder??[];if(!r.length)return t;const s=new Map(t.map(c=>[c.id,c])),n=r.flatMap(c=>{const l=s.get(c);return l?[l]:[]}),o=new Set(r);return[...n,...t.filter(({id:c})=>!o.has(c))]}),ki=i.createSelector(e=>e.externalEditors.editorOrder??[]),Ei=i.createSelector(e=>e.externalEditors.loading),yi=i.createSelector(e=>e.externalEditors.lastFetched),jr=i.createSelector(e=>e.externalEditors.hiddenEditorIds),Mi=i.createSelector((e,t)=>{if(!(t?tt.select(e,t):rt.select(e)))return[];const s=jr.select(e);return Hr.select(e).filter(n=>n.installed&&!s.includes(n.id))});function Ri(e,t){if(!e||!t||t===e.providerId)return!1;const r=e.providerSettings[t];return!!(r&&[r.defaultModel,...Object.values(r.typeOverrides??{})].some(s=>typeof s=="string"&&s.includes(":")))}let Kr=0;function zr(e,t){const r=++Kr;return i.dispatch(je(e,t,r)),r}function Ci(e,t,r){i.dispatch(He(e,t,r))}async function Ae(e,t,r,s){const n=crypto.randomUUID(),o=s?.source??"control";try{return(await i.dispatch(Ke({requestId:n,consumerId:o,agentId:e,workspaceId:t,operation:r,connection:ce.select(i.state)},{...s,intent:s?.intent??zr(e,t)}))).status==="success"}finally{i.dispatch(ze(n,o))}}async function wi(e,t,r,s,n){return Ae(e,t,{kind:"effort",effort:r,previous:s},n)}async function Pi(e,t,r,s,n){return Ae(e,t,{kind:"reconcile",current:r??null,levels:s},n)}const $r=i.createSelector((e,t)=>M(e.agentModel.mutations).filter(r=>r.consumerId===t)),Ii=i.createSelector((e,t)=>$r.select(e,t).some(r=>r.status==="pending")),Oi=i.createSelector((e,t,r)=>{const s=e.agentSessions.byAgentId[t],n=st.select(e,t),o=ft.select(e,t),c=e.daemonHealth.stats?.protocolVersion,l=gt(c),p=l?ht(s?.model,null,o):s?.model;return{session:s,providerId:n,levels:o,legacy:l,identity:JSON.stringify([p,n]),connection:ce.select(e),canWrite:!!s&&s.workspaceId===r&&!nt.select(e,r)}});function Xr(e,t,r=!1){return e!=="auggie"||t===!0||r}const Ti=i.createSelector(e=>mt.select(e)?null:$.select(e)),Qr=i.createSelector(e=>e.providerCatalog?.workspaceEpoch??0),m=i.createSelector((e,t)=>t?e.providerCatalog?.byWorkspaceId?.[t]:void 0),Fi=i.createSelector(e=>Object.keys(e.providerCatalog?.byWorkspaceId??{})),Li=i.createSelector((e,t)=>!!m.select(e,t)&&e.providerCatalog.workspaceSnapshotEpochs?.[t]===Qr.select(e)),ke=i.createSelector((e,t)=>t?m.select(e,t)?.catalog.providers??[]:it.select(e)),Ee=i.createSelector((e,t)=>{if(!t)return le.select(e);const r=m.select(e,t)?.settings.find(s=>s.path==="model.defaultProvider")?.value;return typeof r=="string"?r:""}),ee=i.createSelector((e,t)=>{if(!t)return bt.select(e);const r=m.select(e,t)?.settings.find(s=>s.path==="providers.enabled")?.value;return r&&typeof r=="object"?r:{}}),ye=i.createSelector((e,t)=>{if(!t)return St.select(e);const r=ee.select(e,t),s=Ee.select(e,t),n=m.select(e,t)?.readiness??{};return ke.select(e,t).filter(o=>o.visible&&(!o.canBeDisabled||r[o.id]||o.id===s)&&n[o.id]?.available).map(o=>o.id)}),Di=i.createSelector((e,t)=>{const r=ee.select(e,t),s=t?m.select(e,t)?.readiness??{}:$.select(e);return ke.select(e,t).filter(n=>Xr(n.id,s[n.id]?.available,r[n.id]===!0)).map(n=>n.id)}),xi=i.createSelector((e,t)=>t?ye.select(e,t):_t.select(e)),Ni=i.createSelector((e,t)=>v.select(e,t)),Bi=i.createSelector((e,t)=>t?!!m.select(e,t):vt.select(e)),Wi=i.createSelector((e,t)=>{if(!t)return At.select(e);const r=m.select(e,t)?.settings??[],s=Ee.select(e,t),n=r.find(l=>l.path==="model.providerDefaults")?.value,o=n&&typeof n=="object"?n[s]:void 0;if(typeof o=="string")return o;const c=r.find(l=>l.path==="model.default")?.value;return typeof c=="string"?c:""}),Vi=i.createSelector((e,t)=>t?Object.fromEntries(Object.entries(e.providerModels?.byWorkspaceId?.[t]??{}).flatMap(([r,s])=>s.warning?[[r,s.warning]]:[])):kt.select(e)),Ui=i.createSelector((e,t)=>t?Object.fromEntries(Object.entries(e.providerModels?.byWorkspaceId?.[t]??{}).map(([r,s])=>[r,s.stale===!0])):Et.select(e)),Gi=i.createSelector((e,t)=>t?Object.fromEntries(Object.entries(e.providerModels?.byWorkspaceId?.[t]??{}).flatMap(([r,s])=>s.warning&&s.warningKind?[[r,s.warningKind]]:[])):yt.select(e)),qi=i.createSelector((e,t,r)=>{if(!r)return Mt.select(e,t);const s=ee.select(e,r),n=m.select(e,r);return ye.select(e,r).filter(o=>o!==t&&(s[o]||n?.catalog.providers.find(c=>c.id===o)?.canBeDisabled===!1)&&Rt(o,n?.readiness[o]?.authenticated))}),Hi=i.createSelector((e,t)=>t?m.select(e,t)?.readiness??{}:$.select(e)),Yr={},ji=i.createSelector(e=>e.providerSettings?.profiles?.status??Yr),Ki=i.createSelector(e=>e.directoryPicker.listing),zi=i.createSelector(e=>e.directoryPicker.loading),$i=i.createSelector(e=>e.directoryPicker.error),Xi=i.createSelector(e=>e.directoryPicker.pathError),Qi=i.createSelector(e=>e.directoryPicker.createError),ae={},Zr=i.createSelector((e,t)=>t?e.providerCatalog?.byWorkspaceId?.[t]?.mcpServers??[]:e.mcpSettings.servers),Yi=i.createSelector((e,t,r)=>{const s=e.providerCatalog?.byWorkspaceId?.[t];return s?s.mcpServers?.find(n=>n.id===r)?.name:e.providerCatalog?.mcpServerNamesByWorkspaceId?.[t]?.[r]}),Zi=i.createSelector(e=>e.mcpSettings.loading),Ji=i.createSelector(e=>e.mcpSettings.error),ea=i.createSelector(e=>e.mcpSettings.mutationError??null),ta=i.createSelector(e=>e.mcpSettings.enabled),Jr=i.createSelector(e=>e.mcpSettings.disabledServers),es=i.createSelector(e=>e.mcpSettings.statusMap),ts=i.createSelector(e=>e.mcpSettings.toolsMap),rs=i.createSelector((e,t)=>{if(!t)return e.mcpSettings.errorMessages;const r=e.providerCatalog?.byWorkspaceId?.[t],s=new Map(r?.mcpServers?.map(n=>[n.id,R(n)])??[]);return Object.fromEntries((r?.mcpStatuses??[]).flatMap(n=>{const o=s.get(n.serverId);return o&&n.lastError?[[o,n.lastError]]:[]}))}),ss=i.createSelector((e,t)=>t?e.mcpSettings.byWorkspaceId[t]?.disabledServers??ae:ae),ra=i.createSelector((e,t)=>Object.keys(ss.select(e,t))),sa=i.createSelector(e=>{const t=Zr.select(e),r=es.select(e),s=ts.select(e),n=Jr.select(e),o=rs.select(e);return t.map(c=>{const l=R(c)in n,p=s[R(c)]||[];let b=r[R(c)]||"disconnected";return l&&(b="disabled"),{...c,disabled:l,status:b,tools:p,toolCount:p.length,errorMessage:o[R(c)]}})});i.createSelector((e,t)=>e.mcpSettings.errorMessages[t]);const na=i.createSelector(e=>e.mcpSettings.lastImportedCount),ia=i.createSelector(e=>e.mcpSettings.advancedSaveStatus),aa=i.createSelector(e=>e.mcpSettings.advancedSaveError),oa=["agentFeatures.backgroundHooks","agentFeatures.hostExec","agentFeatures.scripts","agentFeatures.terminalAccess","agentFeatures.browserAutomation","agentFeatures.desktopControl","agentFeatures.richChatBlocks","agentFeatures.structuredQuestions","agentFeatures.secretRequests","agentFeatures.attentionRequests","agentFeatures.stateSnapshot","agentFeatures.prMonitor","agentFeatures.taskGraph","agentFeatures.peerAgents","agentFeatures.mcpTools"],ns=[{path:"agentFeatures.backgroundHooks",label:()=>a.settings_agentFeatures_backgroundHooks_label(),description:()=>a.settings_agentFeatures_backgroundHooks_description(),defaultValue:!0},{path:"agentFeatures.hostExec",label:()=>a.settings_agentFeatures_hostExec_label(),description:()=>a.settings_agentFeatures_hostExec_description(),defaultValue:!0},{path:"agentFeatures.scripts",label:()=>a.settings_agentFeatures_scripts_label(),description:()=>a.settings_agentFeatures_scripts_description(),defaultValue:!0},{path:"agentFeatures.terminalAccess",label:()=>a.settings_agentFeatures_terminalAccess_label(),description:()=>a.settings_agentFeatures_terminalAccess_description(),defaultValue:!0},{path:"agentFeatures.browserAutomation",label:()=>a.settings_agentFeatures_browserAutomation_label(),description:()=>a.settings_agentFeatures_browserAutomation_description(),defaultValue:!0},{path:"agentFeatures.desktopControl",label:()=>a.settings_agentFeatures_desktopControl_label(),description:()=>a.settings_agentFeatures_desktopControl_description(),defaultValue:!0},{path:"agentFeatures.richChatBlocks",label:()=>a.settings_agentFeatures_richChatBlocks_label(),description:()=>a.settings_agentFeatures_richChatBlocks_description(),defaultValue:!0},{path:"agentFeatures.structuredQuestions",label:()=>a.settings_agentFeatures_structuredQuestions_label(),description:()=>a.settings_agentFeatures_structuredQuestions_description(),defaultValue:!0},{path:"agentFeatures.secretRequests",label:()=>a.settings_agentFeatures_secretRequests_label(),description:()=>a.settings_agentFeatures_secretRequests_description(),defaultValue:!1},{path:"agentFeatures.attentionRequests",label:()=>a.settings_agentFeatures_attentionRequests_label(),description:()=>a.settings_agentFeatures_attentionRequests_description(),defaultValue:!0},{path:"agentFeatures.stateSnapshot",label:()=>a.settings_agentFeatures_stateSnapshot_label(),description:()=>a.settings_agentFeatures_stateSnapshot_description(),defaultValue:!0},{path:"agentFeatures.prMonitor",label:()=>a.settings_agentFeatures_prMonitor_label(),description:()=>a.settings_agentFeatures_prMonitor_description(),defaultValue:!0},{path:"agentFeatures.taskGraph",label:()=>a.settings_agentFeatures_taskGraph_label(),description:()=>a.settings_agentFeatures_taskGraph_description(),defaultValue:!0},{path:"agentFeatures.peerAgents",label:()=>a.settings_agentFeatures_peerAgents_label(),description:()=>a.settings_agentFeatures_peerAgents_description(),defaultValue:!0},{path:"agentFeatures.mcpTools",label:()=>a.settings_agentFeatures_mcpTools_label(),description:()=>a.settings_agentFeatures_mcpTools_description(),defaultValue:!0}],ca=Object.fromEntries(ns.map(e=>[e.path,e.defaultValue]));export{Ci as $,mi as A,bi as B,Pt as C,Ds as D,yn as E,ns as F,de as G,Ar as H,Xr as I,gi as J,Ri as K,re as L,fi as M,Er as N,gn as O,Mn as P,P as Q,A as R,E as S,zr as T,lr as U,un as V,br as W,fn as X,dn as Y,er as Z,Pi as _,ca as a,ws as a$,Sn as a0,kr as a1,cr as a2,Gn as a3,ci as a4,Ii as a5,$r as a6,Oi as a7,Bs as a8,qs as a9,nn as aA,Xs as aB,Bn as aC,oi as aD,Tn as aE,Qs as aF,Ys as aG,Ws as aH,Gs as aI,X as aJ,Ot as aK,Nt as aL,Bt as aM,ue as aN,xt as aO,Tt as aP,It as aQ,Lt as aR,Dt as aS,Cs as aT,Is as aU,Os as aV,Fs as aW,Es as aX,Ms as aY,Ps as aZ,Rs as a_,ur as aa,xi as ab,Ee as ac,ee as ad,Di as ae,ye as af,ke as ag,Ui as ah,Gi as ai,Vi as aj,qi as ak,Hi as al,Bi as am,Wi as an,Ni as ao,pr as ap,Us as aq,Dn as ar,js as as,Qi as at,$i as au,Ki as av,zi as aw,Xi as ax,ki as ay,Zs as az,oa as b,Xn as b$,ys as b0,Ts as b1,ks as b2,Ls as b3,tn as b4,jr as b5,Nn as b6,Hr as b7,Mi as b8,Ei as b9,J as bA,Z as bB,Ln as bC,Cn as bD,Ti as bE,qt as bF,on as bG,cn as bH,sn as bI,an as bJ,$s as bK,rn as bL,v as bM,Hs as bN,Wn as bO,xn as bP,gr as bQ,Se as bR,Vs as bS,ii as bT,Qn as bU,si as bV,ni as bW,Zn as bX,ti as bY,ei as bZ,Yn as b_,Js as ba,en as bb,yi as bc,Pn as bd,ie as be,wn as bf,be as bg,aa as bh,ia as bi,Jr as bj,ta as bk,Ji as bl,rs as bm,na as bn,Zi as bo,ea as bp,Zr as bq,sa as br,es as bs,ts as bt,Ai as bu,zs as bv,ji as bw,Fn as bx,On as by,In as bz,h as c,$n as c0,ai as c1,zn as c2,Jn as c3,ri as c4,m as c5,Qr as c6,Li as c7,Fi as c8,ra as c9,Yi as ca,li as cb,ui as cc,vi as cd,kn as ce,Q as cf,D as cg,En as ch,Nr as ci,Rn as cj,Si as ck,qn as cl,Un as cm,Hn as cn,Vn as co,Gr as cp,ln as cq,An as d,bn as e,_n as f,vn as g,hn as h,fe as i,mn as j,he as k,wi as l,_i as m,yr as n,wr as o,di as p,pi as q,Ks as r,Gt as s,Ut as t,pn as u,hi as v,jn as w,Kn as x,xs as y,Ns as z};
1
+ var Me=Object.defineProperty;var Re=(e,t,r)=>t in e?Me(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var d=(e,t,r)=>Re(e,typeof t!="symbol"?t+"":t,r);import{k as Ce,N as we,T as Pe,d as Ie,l as Oe,w as Te}from"./DT4bpJWb.js";import"./DYhIMPy1.js";import{bp as a,_ as Fe}from"./DXyyWeag.js";import"./CjaOLL1c.js";import"./Cuqq8bL5.js";import"./Bfr1QjPr.js";import{c as K}from"./ChTqQfQN.js";import"./DJkHth-B.js";import{Iy as i,tX as Le,ny as M,nx as _,m1 as De,vk as xe,vi as te,h8 as Ne,h9 as Be,c as We,Ib as Ve,a4 as Ue,yd as O,ye as G,yb as Ge,yc as qe,bY as He,bX as je,ca as Ke,c9 as ze,nA as R}from"./D5ej8a-y.js";import{cG as $e,cv as Xe,bv as Qe,cj as oe,cL as Ye,cK as Ze,cP as Je,c7 as et,cn as tt,c9 as rt,cE as ce,ax as st,bR as nt,cM as it}from"./Cg2SHWhQ.js";import{a as at,i as ot}from"./RD9QY1Yc.js";import{aJ as ct,V as le,bK as lt,m as dt,O as ut,bX as z,g as pt,W as ft,bY as gt,c as ht,aK as mt,bF as $,an as bt,aZ as St,_ as _t,aF as vt,bM as At,Z as kt,X as Et,Y as yt,bI as Mt,x as Rt}from"./BAKm0uzb.js";import{y as Ct}from"./DEYvT_CO.js";import{y as I}from"./DyvrH0mm.js";import{i as B}from"./DogedYC1.js";import{n as wt}from"./DEyE92PJ.js";const Pt=Object.freeze(Object.defineProperty({__proto__:null,NOTIFY_DURATION:we,TOAST_COUNTDOWN_CLASS:Pe,TOAST_COUNTDOWN_NO_HOVER_PAUSE_CLASS:Ie,notify:Ce,notifyMetadata:Oe,withToastCountdown:Te},Symbol.toStringTag,{value:"Module"})),ks=i.createSelector(e=>$e.select(e)?.capabilities.gitlabCheckout===!0),Es=i.createSelector(e=>e.gitlabAuth.host),ys=i.createSelector(e=>e.gitlabAuth.instanceBaseUrl??e.gitlabAuth.host),Ms=i.createSelector(e=>Le(e.gitlabAuth.instanceBaseUrl??e.gitlabAuth.host)??""),Rs=i.createSelector(e=>e.gitlabAuth.isCancelling),Cs=i.createSelector(e=>e.gitlabAuth.cancelOutcome),ws=i.createSelector(e=>e.gitlabAuth.isConfigured),Ps=i.createSelector(e=>e.gitlabAuth.isAuthenticating),Is=i.createSelector(e=>e.gitlabAuth.deviceFlow),Os=i.createSelector(e=>e.gitlabAuth.deviceGrantSupported),Ts=i.createSelector(e=>e.gitlabAuth.user),Fs=i.createSelector(e=>e.gitlabAuth.error);i.createSelector(e=>e.gitlabAuth.method);const Ls=i.createSelector(e=>e.gitlabAuth.statusReady===!0),E=[{id:"pr-reviewer",icon:"pr-reviewer",get name(){return a.specialists_builtin_prReviewer_name()},get description(){return a.specialists_builtin_prReviewer_description()},defaultBehaviorPrompt:"",promptUnavailable:!0},{id:"ui-designer",icon:"ui-designer",get name(){return a.specialists_builtin_uiDesigner_name()},get description(){return a.specialists_builtin_uiDesigner_description()},defaultBehaviorPrompt:"",promptUnavailable:!0},{id:"vulnerability-scanner",icon:"pr-reviewer",get name(){return a.specialists_builtin_vulnerabilityScanner_name()},get description(){return a.specialists_builtin_vulnerabilityScanner_description()},defaultBehaviorPrompt:"",promptUnavailable:!0},{id:"developer",icon:"verifier",get name(){return a.specialists_builtin_developer_name()},get description(){return a.specialists_builtin_developer_description()},defaultBehaviorPrompt:"",promptUnavailable:!0},{id:"product-manager",icon:"coordinator",get name(){return a.specialists_builtin_productManager_name()},get description(){return a.specialists_builtin_productManager_description()},defaultBehaviorPrompt:"",promptUnavailable:!0},{id:"maintenance-coordinator",icon:"ralph",get name(){return a.specialists_builtin_maintenanceCoordinator_name()},get description(){return a.specialists_builtin_maintenanceCoordinator_description()},defaultBehaviorPrompt:"",promptUnavailable:!0},{id:"chief-of-staff",icon:"chief-of-staff",get name(){return a.specialists_builtin_chiefOfStaff_name()},get description(){return a.specialists_builtin_chiefOfStaff_description()},hidden:!0,defaultBehaviorPrompt:"",promptUnavailable:!0}],de=new Set(["pr-reviewer"]),Ds="developer";function xs(e){return E.find(t=>t.id===e)}const It=i.createSelector(e=>e.githubAuth.mutationRequestId),Ot=i.createSelector(e=>e.githubAuth.callbacksCancelled),Tt=i.createSelector(e=>e.githubAuth.isDisconnecting),ue=i.createSelector(e=>e.githubAuth.isAuthenticated),Ft=i.createSelector(e=>e.githubAuth.statusSettled===!0),Lt=i.createSelector(e=>e.githubAuth.requiresDaemonAuth),Dt=i.createSelector(e=>e.githubAuth.user),xt=i.createSelector(e=>e.githubAuth.isAuthenticating),Nt=i.createSelector(e=>e.githubAuth.deviceFlow),Bt=i.createSelector(e=>e.githubAuth.error),Ns=Object.freeze(Object.defineProperty({__proto__:null,selectGitHubAuthCallbacksCancelled:Ot,selectGitHubAuthDeviceFlow:Nt,selectGitHubAuthError:Bt,selectGitHubAuthIsAuthenticated:ue,selectGitHubAuthIsAuthenticating:xt,selectGitHubAuthIsDisconnecting:Tt,selectGitHubAuthMutationRequestId:It,selectGitHubAuthRequiresDaemonAuth:Lt,selectGitHubAuthStatusSettled:Ft,selectGitHubAuthUser:Dt},Symbol.toStringTag,{value:"Module"}));function f(e){return e??""}function Wt(e,t){const r=e??[],s=t??[];return r.length===s.length&&r.every((n,o)=>f(n.provider)===f(s[o].provider)&&n.model===s[o].model&&n.hint===s[o].hint&&f(n.reasoningEffort)===f(s[o].reasoningEffort))}function re(e,t){if(e.source!=="user"||!t?.ignoreModelPin&&(e.model||e.codingAgent))return!1;const r=e.bundled;return r?f(e.name)===f(r.name)&&f(e.description)===f(r.description)&&f(e.behaviorPrompt)===f(r.behaviorPrompt)&&f(e.roleReminder)===f(r.roleReminder)&&f(e.reasoningEffort)===f(r.reasoningEffort)&&Wt(e.modelOptions,r.modelOptions):!1}const Bs=i.createSelector(e=>e.specialists.bundledSpecialists),Vt=i.createSelector(e=>e.specialists.fileSpecialists),Ws=i.createSelector(e=>M(Vt.select(e))),Vs=i.createSelector(e=>e.specialists.userOverrides);i.createSelector(e=>e.specialists.overridesLoaded);const Us=i.createSelector(e=>e.specialists.customSpecialistsLoaded),Gs=i.createSelector(e=>e.specialists.fileSpecialistsLoaded),qs=i.createSelector(e=>e.specialists.bundledSpecialistsLoaded),Hs=i.createSelector(e=>e.specialists.specialistsFolderPath),js=i.createSelector((e,t)=>{if(!t)return e.specialists.defaultSpecialistId??"";const r=e.providerCatalog?.byWorkspaceId?.[t]?.settings.find(s=>s.path==="specialists.default")?.value;return typeof r=="string"?r:""});i.createSelector(e=>e.specialists.providerModelOverrides);const W=i.createSelector((e,t)=>!(de.has(t)&&!ue.select(e)));function Ut(e,t){return t?e:e.filter(r=>!de.has(r.id))}function Gt(e,t){return Ut(e,t).filter(r=>!r.hidden)}function Ks(e,t){return Gt(e,t).filter(r=>r.role!=="internal")}const v=i.createSelector((e,t)=>{if(t)return(e.providerCatalog?.byWorkspaceId?.[t]?.specialists??[]).map(l=>({...l,defaultModel:l.model,defaultBehaviorPrompt:l.behaviorPrompt??l.prompt??"",defaultAgentType:l.agentType}));const r=M(e.specialists.fileSpecialists),s=e.specialists.bundledSpecialists,n=new Set,o=[];for(const l of r)!n.has(l.id)&&W.select(e,l.id)&&(n.add(l.id),o.push({id:l.id,name:l.name,description:l.description,codingAgent:l.codingAgent,defaultModel:l.model||void 0,defaultBehaviorPrompt:l.behaviorPrompt,roleReminder:l.roleReminder,source:l.source,importedFrom:l.importedFrom,unsupportedFields:l.unsupportedFields,requiredSkills:l.requiredSkills,missingSkills:l.missingSkills,hidden:l.hidden,resolvedModel:l.resolvedModel,resolvedProvider:l.resolvedProvider,modelOptions:l.modelOptions,reasoningEffort:l.reasoningEffort,role:l.role,teamAgents:l.teamAgents,icon:l.icon}));for(const l of s)!n.has(l.id)&&W.select(e,l.id)&&(n.add(l.id),o.push(l));if(!e.specialists.bundledSpecialistsLoaded&&r.length===0&&s.length===0)for(const l of E)!n.has(l.id)&&W.select(e,l.id)&&(n.add(l.id),o.push(l));const c=new Map;for(const l of E)c.has(l.id)||c.set(l.id,c.size);for(const l of s)c.has(l.id)||c.set(l.id,c.size);return o.sort((l,p)=>{const b=c.has(l.id),N=c.has(p.id);return b&&N?(c.get(l.id)??0)-(c.get(p.id)??0):b&&!N?-1:!b&&N?1:l.name.localeCompare(p.name)}),o}),zs=i.createSelector(e=>{const t=v.select(e).filter(s=>s.role==="orchestrator");if(t.length===0)return null;const r=new Set([...E.map(({id:s})=>s),...e.specialists.bundledSpecialists.map(({id:s})=>s)]);return t.sort((s,n)=>+!r.has(s.id)-+!r.has(n.id)||s.id.localeCompare(n.id)),t[0]}),qt=i.createSelector((e,t)=>{const r=_(e.specialists.fileSpecialists,t);if(r)return{id:r.id,name:r.name,description:r.description,source:r.source};const s=e.specialists.bundledSpecialists.find(n=>n.id===t);if(s)return{id:s.id,name:s.name,description:s.description,source:"builtin"};if(!e.specialists.bundledSpecialistsLoaded&&M(e.specialists.fileSpecialists).length===0&&e.specialists.bundledSpecialists.length===0){const n=E.find(o=>o.id===t);if(n)return{id:n.id,name:n.name,description:n.description,source:"builtin"}}return null}),$s=i.createSelector((e,t)=>qt.select(e,t)?.name??null),Xs=i.createSelector((e,t,r)=>{const n=v.select(e,r).find(o=>o.id===t);return n?n.defaultModel?n.defaultModel:n.resolvedModel??"":""}),Qs=i.createSelector((e,t,r)=>v.select(e,r).find(o=>o.id===t)?.defaultModel||void 0),Ys=i.createSelector((e,t,r)=>v.select(e,r).find(o=>o.id===t)?.reasoningEffort||void 0),Zs=i.createSelector((e,t,r)=>{const n=v.select(e,r).find(o=>o.id===t);return n?n.defaultBehaviorPrompt:""});function T(e,t){return t.some(r=>r.id===e)||E.some(r=>r.id===e)}const Js=i.createSelector((e,t,r)=>{if(r){const s=e.providerCatalog?.byWorkspaceId?.[r]?.specialists.find(n=>n.id===t);return!s||s.importedFrom?!1:s.source==="bundled"||s.source==="user"&&T(t,e.specialists.bundledSpecialists)}return T(t,e.specialists.bundledSpecialists)}),en=i.createSelector((e,t,r)=>r?!!X.select(e,t,r):!!_(e.specialists.fileSpecialists,t)),tn=i.createSelector((e,t,r)=>{if(r){const o=X.select(e,t,r);return!o||o.importedFrom||o.source==="project"?!1:T(t,e.specialists.bundledSpecialists)&&!re(o)}if(!T(t,e.specialists.bundledSpecialists))return!1;const n=_(e.specialists.fileSpecialists,t);return!n||n.source!=="user"?!1:!re(n)}),X=i.createSelector((e,t,r)=>{if(r){const s=e.providerCatalog?.byWorkspaceId?.[r]?.specialists.find(n=>n.id===t);return!s||s.source==="bundled"?void 0:{...s,source:s.source,model:s.model??"",behaviorPrompt:s.behaviorPrompt??s.prompt??"",filePath:s.path??""}}return _(e.specialists.fileSpecialists,t)}),rn=i.createSelector((e,t,r)=>{const s=X.select(e,t,r);return r&&!s?e.providerCatalog?.byWorkspaceId?.[r]?.specialists.some(n=>n.id===t)?"Built-in":null:s?.source==="project"?"Project":s?.source==="user"?"User":e.specialists.bundledSpecialists.some(n=>n.id===t)?"Built-in":null}),sn=i.createSelector((e,t,r)=>{if(r)return e.providerCatalog?.byWorkspaceId?.[r]?.specialists.find(o=>o.id===t)?.path;const s=_(e.specialists.fileSpecialists,t);if(s)return s.filePath;const n=e.specialists.bundledSpecialists.find(o=>o.id===t);if(n&&"filePath"in n)return n.filePath}),nn=i.createSelector((e,t,r)=>{if(r){const n=v.select(e,r).find(l=>l.id===t),o=n?.codingAgent||n?.resolvedProvider;if(o)return Xe.select(e,o,r);const c=Qe.select(e,r);return e.providerCatalog?.byWorkspaceId?.[r]?.readiness[c]?.available?c:""}const s=_(e.specialists.fileSpecialists,t);return s?.codingAgent?s.codingAgent:Ht.select(e,t)}),Ht=i.createSelector((e,t)=>{const s=v.select(e).find(n=>n.id===t);return s?.codingAgent?s.codingAgent:ct.select(e)?le.select(e):""}),an=i.createSelector((e,t)=>{if(t)return e.providerCatalog?.byWorkspaceId?.[t]?.importDiagnostics??[];const r=e.specialists.importDiagnostics;return r?M(r):[]}),on=i.createSelector((e,t)=>e.specialists.creationByContext?.[t]??De),cn=i.createSelector(e=>Object.values(e.specialists.creationByContext??{}).flatMap(t=>t.specialistId?[t.specialistId]:[])),V=K("Clipboard");async function ln(e){let t;if(at())try{const r=await ot("system:write-clipboard",{text:e});if(r?.success===!1)throw new Error(r.error||"Electron clipboard write failed");return}catch(r){t=r,V.warn("Electron clipboard write failed; falling back to browser clipboard",{error:r})}if(typeof navigator<"u"&&navigator.clipboard?.writeText)try{await navigator.clipboard.writeText(e);return}catch(r){throw V.error("Browser clipboard write failed",r,{electronError:t}),r}throw V.error("No clipboard write API is available",void 0,{electronError:t}),t instanceof Error?t:new Error("Clipboard write API unavailable")}const jt=["connected","disconnected","unreachable","revoked","update-required"],y=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),u=e=>typeof e=="string"&&e.length>0,C=e=>typeof e=="string"&&e.length>0?e:void 0,pe=e=>Number.isSafeInteger(e)&&e>=0?e:0;function Kt(e){if(!y(e))return;const t=Array.isArray(e.providers)?e.providers.flatMap(s=>y(s)&&u(s.id)?[{id:s.id,...s.visible===!1?{visible:!1}:{},status:typeof s.status=="string"?s.status:"unknown",models:Array.isArray(s.models)?s.models.filter(n=>u(n)):[]}]:[]):[],r=C(e.intentdVersion);return{...r?{intentdVersion:r}:{},providers:t}}function dn(e){if(!y(e)||!u(e.id)||!u(e.name)||!u(e.fingerprint)||!jt.includes(e.state)||!Number.isInteger(e.port)||!u(e.addedAt))return null;const t=y(e.platform)&&u(e.platform.os)&&u(e.platform.arch)?{os:e.platform.os,arch:e.platform.arch}:void 0,r=Kt(e.capabilities),s=C(e.tcAddress),n=C(e.observedAt),o=C(e.lastConnectedAt),c=xe(e.cloud),l=Number.isInteger(e.nodeProtocol)&&e.nodeProtocol>=0?e.nodeProtocol:void 0;return{id:e.id,name:e.name,...t?{platform:t}:{},hosts:Array.isArray(e.hosts)?e.hosts.filter(p=>u(p)):[],port:e.port,...s?{tcAddress:s}:{},fingerprint:e.fingerprint,state:e.state,runningAgents:pe(e.runningAgents),...r?{capabilities:r}:{},...l!==void 0?{nodeProtocol:l}:{},...n?{observedAt:n}:{},addedAt:e.addedAt,...o?{lastConnectedAt:o}:{},...c?{cloud:c}:{}}}function un(e){if(!y(e)||!u(e.credentialId)||!u(e.backendId)||!u(e.backendName)||!u(e.createdAt))return null;const t=C(e.lastUsedAt);return{credentialId:e.credentialId,backendId:e.backendId,backendName:e.backendName,createdAt:e.createdAt,...t?{lastUsedAt:t}:{},connected:e.connected===!0,runningAgents:pe(e.runningAgents)}}function pn(e){const t=(typeof e=="string"?e:"").trim().toUpperCase();return t===""?null:t}function zt(e){if(!y(e)||typeof e.name!="string")return null;const t=e.name;return e.kind==="local"?{kind:"local",name:t}:e.kind==="machine"&&u(e.nodeId)?{kind:"machine",nodeId:e.nodeId,name:t}:e.kind==="cloud"&&u(e.cloudMachineId)?{kind:"cloud",cloudMachineId:e.cloudMachineId,name:t}:null}function fn(e){if(!Array.isArray(e))return null;const t=[];for(const r of e){const s=zt(r);if(!s)return null;t.push(s)}return t}function $t(e){return e.kind==="local"?{kind:"local"}:e.kind==="machine"?{kind:"machine",nodeId:e.nodeId}:{kind:"cloud",cloudMachineId:e.cloudMachineId}}function P(e){return e.kind==="local"?"local":e.kind==="machine"?`machine:${e.nodeId}`:`cloud:${e.cloudMachineId}`}const Xt={macos:"macOS",linux:"Linux",windows:"Windows"},Qt={aarch64:"arm64",arm64:"arm64",x86_64:"x64",x64:"x64"};function A(e,t){const r=[e&&(Xt[e]??e),t&&(Qt[t]??t)].filter(s=>!!s);return r.length?r.join(" "):null}function Yt(e){return e?.placement?.target==="remote"||I(e?.placement?.target)}const Zt=new Set(["running","paused","resuming","pausing","stopping"]);function Jt(e,t){if(e.placementError)return null;if(e.cloudStart)return"starting";if(!e.nodeId)return e.effectiveIsolation==="pending"?"starting":null;const r=t?.cloud?.state;return r&&Zt.has(r)?r:e.effectiveIsolation==="pending"?"starting":null}function fe(e,t){if(!e||!Yt(e))return null;const r=e.nodeId??e.placement?.nodeId??"",s=t&&t.id===r?t:null;if(I(e.placement?.target))return{nodeId:r,name:e.nodeName?.trim()||Ne(s?.cloud?.provider??Be(e.placement?.cloudMachineId)),platform:A(s?.platform?.os,s?.platform?.arch),state:"ready",cloud:{state:Jt(e,s)}};const n=A(e.placement?.os,e.placement?.arch)??A(s?.platform?.os,s?.platform?.arch),o=s?.state==="revoked"?"revoked":s?.state==="unreachable"||e.nodeState==="offline"?"unreachable":"ready";return{nodeId:r,name:e.nodeName?.trim()||s?.name||a.remoteAgent_location_unknownMachine(),platform:n,state:o}}function gn(e,t){if(!e)return null;const r=t&&t.id===e?t:null;return{nodeId:e,name:r?.name||a.remoteAgent_location_unknownMachine(),platform:A(r?.platform?.os,r?.platform?.arch),state:r?.state==="revoked"?"revoked":r?.state==="unreachable"?"unreachable":"ready"}}function ge(e){switch(e){case"starting":return a.cloudMachines_agent_starting();case"running":return a.cloudMachines_agent_running();case"paused":return a.cloudMachines_agent_paused();case"resuming":return a.cloudMachines_agent_resuming();case"pausing":return a.cloudMachines_agent_pausing();case"stopping":return a.cloudMachines_agent_stopping();default:return null}}function hn(e){const t=ge(e.cloud?.state);return t?a.cloudMachines_agent_chip({machine:e.name,state:t}):e.name}function mn(e){if(e.cloud){const r=ge(e.cloud.state),s=a.remoteAgent_location_tooltipNoPlatform({machine:e.name});return r?a.remoteAgent_location_tooltipWithState({location:s,state:r}):s}const t=e.platform?a.remoteAgent_location_tooltip({machine:e.name,platform:e.platform}):a.remoteAgent_location_tooltipNoPlatform({machine:e.name});switch(e.state){case"unreachable":return a.remoteAgent_location_tooltipWithState({location:t,state:a.remoteMachines_state_unreachable_label()});case"revoked":return a.remoteAgent_location_tooltipWithState({location:t,state:a.remoteMachines_state_revoked_label()});default:return t}}function he(e,t){return!e||!t?null:e.placementError?"failed":t.state==="revoked"?"revoked":t.state==="unreachable"?"unreachable":e.effectiveIsolation==="pending"||e.cloudStart?"starting":e.setup?.state==="failed"?"setup-failed":null}function me(e){if(!e.endsWith("}"))return null;for(let t=e.indexOf(" {");t>=0;t=e.indexOf(" {",t+1))try{const r=JSON.parse(e.slice(t+1));if(r&&typeof r=="object"&&typeof r.code=="string")return{message:e.slice(0,t).trim(),data:r}}catch{}return null}function er(e,t){const r=e.detail??"",s=me(r),n=e.code==="machine-update-required"||s?.data.code==="machine-update-required";if(n&&s?.data.reason==="prepared-checkout")return{updateRequired:n,message:a.remoteAgent_updateRequired_preparedCheckout({machine:t})};const o=te(s?.data),c=o??(e.code?te({code:e.code}):null);return c?{updateRequired:n,message:s?.message||r,cloud:c,cloudDetailKnown:!!o}:{updateRequired:n,message:s?.message||r}}function bn(e){if(!I(e?.placement?.target)||!e.placementError||e.status!==We.Error)return null;const t=er(e.placementError,"");return t.cloud?t:null}const tr=["attachments-too-large-for-machine:","node-prompt-too-large:"],rr="remote-agent-unsupported:";function se(e){return new Intl.NumberFormat(void 0,{maximumFractionDigits:1}).format(e/1048576)}function Sn(e){const t=me(e)?.message??e;for(const s of tr){const n=t.indexOf(s);if(n<0)continue;const o=t.slice(n+s.length).trim().replace(/^[a-z][\w]*(?:\.[\w]+)+:\s*/i,""),c=/come to (\d+) bytes\b.*?over its (\d+)-byte limit/.exec(o);return c?a.remoteAgent_attachmentsTooLargeSized_error({size:se(Number(c[1])),limit:se(Number(c[2]))}):o?a.remoteAgent_attachmentsTooLarge_error({detail:o}):a.remoteAgent_attachmentsTooLargeNoDetail_error()}const r=t.indexOf(rr);return r>=0&&/attachment/i.test(t.slice(r))?a.remoteAgent_attachmentsUnsupported_error():null}function _n(e){return I(e?.placement?.target)&&he(e,fe(e))==="starting"}function vn(e,t){if(!I(e?.placement?.target))return!1;const r=fe(e,t);return r?.cloud?.state==="resuming"&&he(e,r)===null}const h="",q="cloud:";function Q(e){return`${q}${e}`}function D(e){return e?.startsWith(q)&&e.slice(q.length)||null}const An=Q("e2b");function sr(e,t){return e?.find(r=>Q(r.cloudMachineId)===t&&r.unavailableReason===null)}const nr=new Set(["connected","disconnected"]);function ir(e){switch(e){case"unreachable":return a.remoteMachines_state_unreachable_label();case"revoked":return a.remoteMachines_state_revoked_label();case"update-required":return a.remoteMachines_state_updateRequired_label();default:return}}function Y(e){return nr.has(e.state)}function ar({backendLabel:e,backendPlatform:t,machines:r,cloud:s,orchestrator:n=!1}){const o=[n?{id:h,label:a.remoteMachines_startOn_firstAvailable_label(),platform:null,disabled:!1,hint:a.remoteMachines_startOn_firstAvailable_hint()}:{id:h,label:e,platform:A(t?.os,t?.arch),disabled:!1},...r.map(c=>{const l=A(c.platform?.os,c.platform?.arch);return Y(c)?{id:c.id,label:c.name,platform:l,disabled:!1}:{id:c.id,label:c.name,platform:l,disabled:!0,reason:ir(c.state)}})];for(const c of s??[])o.push({id:Q(c.cloudMachineId),label:c.label,platform:null,kind:"cloud",disabled:c.unavailableReason!==null,...c.unavailableReason?{reason:c.unavailableReason}:c.needsProfile?{hint:a.cloudMachines_startOn_hint()}:{}});return o}function kn(e){return e.find(t=>t.id===h)?.label??""}function En(e,t,r){if(e!==h)return D(e)?void 0:e;if(r)return t.find(s=>s.id!==h&&s.kind!=="cloud"&&!s.disabled)?.id}function or({remoteMachinesVisible:e,supported:t,machines:r,cloud:s}){return e&&t&&(r.some(Y)||(s??[]).some(n=>n.unavailableReason===null))}function cr(e,t,r){if(!e)return h;if(D(e))return sr(r,e)?e:h;const s=t.find(n=>n.id===e);return s&&Y(s)?s.id:h}function yn(e,{cloudEntries:t=!1,providerOf:r}={}){const s=D(e);return s?t&&r?.(s)==="northflank"?{target:"cloud",checkout:"isolated",cloudMachineId:s}:t?{target:"e2b",checkout:"isolated",cloudMachineId:s}:{target:"e2b",checkout:"isolated"}:e?{target:"remote",checkout:"isolated",nodeId:e}:void 0}function Mn({groups:e,providerRef:t,model:r}){const s=c=>c.options.filter(l=>!l.disabled),n=e.find(c=>c.key===t),o=n?s(n):[];if(r){const c=Ve(r).modelId;if(o.some(l=>l.value===c))return null}else if(o.length>0)return null;if(n&&o.length>0)return{providerId:n.key,modelId:o[0].value};for(const c of e){if(c.key==="default")continue;const l=s(c);if(l.length>0)return{providerId:c.key,modelId:l[0].value}}return null}function lr(e,t,r,s){const n=e.map(P),o=n.indexOf(t),c=n.indexOf(r);if(o<0||c<0||o===c)return null;let l=c+(s==="after"?1:0);if(o<l&&(l-=1),l===o)return null;const p=[...e],[b]=p.splice(o,1);return p.splice(l,0,b),p.map($t)}function Rn(e,t,r){const s=e.findIndex(o=>P(o)===t),n=e[s+r];return s<0||!n?null:lr(e,t,P(n),r===-1?"before":"after")}function dr(e,t){if(e===h)return"local";const r=t==="cloud"?D(e):null;return P(r?{kind:"cloud",cloudMachineId:r}:{kind:"machine",nodeId:e})}function ne(e,t){const r=new Map(t.map((n,o)=>[P(n),o])),s=n=>r.get(dr(n.id,n.kind))??t.length;return e.map((n,o)=>({option:n,index:o})).sort((n,o)=>s(n.option)-s(o.option)||n.index-o.index).map(({option:n})=>n)}const Z=i.createSelector(e=>Ct.select(e)&&e.remoteMachines?.supported===!0),Cn=i.createSelector(e=>Z.select(e)&&lt.select(e)&&!oe.select(e)),be=i.createSelector(e=>Z.select(e)&&e.remoteMachines.machineOrder===!0&&e.remoteMachines.order!==null),ie=i.createSelector(e=>be.select(e)?e.remoteMachines.order??[]:[]),wn=i.createSelector(e=>e.remoteMachines.orderSaving!==null),J=i.createSelector(e=>Object.values(e.remoteMachines?.machines??{}).sort((t,r)=>t.name.localeCompare(r.name))),Pn=i.createSelector(e=>e.remoteMachines.localFingerprint),In=i.createSelector(e=>e.remoteMachines.pending),On=i.createSelector(e=>e.remoteMachines.failures),Tn=i.createSelector(e=>e.remoteMachines.executorBackends??[]),ur=i.createSelector((e,t)=>{if(t===Ue)return a.layout_daemonStatus_localConnection_label();const r=_(e.connections.connections,t);return r?dt(r):t}),pr=i.createSelector(e=>ur.select(e,e.connections.windowBackendId)),Fn=i.createSelector((e,t)=>(t?e.remoteMachines.machines[t]??e.cloudMachines?.machines[t]:void 0)??null),Ln=i.createSelector((e,t)=>{const r=e.providerSettings?.profiles;return ut({catalogProfiles:Je.select(e,t),defaultRemoteIncompatibility:Ze.select(e,t),defaultRemoteLaunch:Ye.select(e,t),profileDefaults:Object.values(r?.defaults??{}),profilesLoadStatus:r?.loadStatus??"idle"})}),Dn=i.createSelector(e=>Object.fromEntries(Object.values(e.providerSettings?.profiles?.defaults??{}).map(t=>[t.baseProviderId,t.env.length>0]))),Se=i.createSelector(e=>or({remoteMachinesVisible:Z.select(e),supported:e.remoteMachines?.initialAgentPlacement===!0,machines:J.select(e),cloud:z(e)}));function fr(e){const t=_(e.connections.connections,e.connections.windowBackendId);return t?.hostOs?{os:t.hostOs,arch:t.hostArch}:void 0}const gr=i.createSelector(e=>{const t=oe.select(e),r=ar({backendLabel:pr.select(e),backendPlatform:fr(e),machines:J.select(e),cloud:z(e),orchestrator:t});if(!be.select(e))return r;if(!t)return ne(r,ie.select(e));const[s,...n]=r;return[s,...ne(n,ie.select(e))]}),xn=i.createSelector(e=>Se.select(e)?gr.select(e):[]),Nn=i.createSelector(e=>e.remoteMachines?.initialAgentPlacement===!0),Bn=i.createSelector((e,t,r)=>Se.select(e)?cr(t,J.select(e),_e(e,r)):h);function _e(e,t){const r=z(e);if(!r||!t)return r;const s=e.cloudMachines?.providers??{};return r.map(n=>{if(n.unavailableReason)return n;const o=pt(e,t,s[n.cloudMachineId]??null);return o?{...n,unavailableReason:o}:n})}const Wn=i.createSelector((e,t)=>_e(e,t)),hr=K("WorkspaceValidation");async function Vn(e,t=!1,r=!1){if(!e||e.trim().length===0)return{valid:!1,error:a.workspace_validation_repoPathRequired_error(),suggestion:a.workspace_validation_repoPathRequired_suggestion()};const s=e.trim();return mr(s)?Sr(s):_r(s,t,r)}function mr(e){return[/^https?:\/\/github\.com\//i,/^git@github\.com:/i,/^github\.com\//i,/^([a-zA-Z0-9\-_]+)\/([a-zA-Z0-9\-_\.]+)$/].some(r=>r.test(e.trim()))}function br(e){const t=e.trim(),r=[/^https?:\/\/github\.com\/([^\/]+)\/([^\/]+)$/i,/^git@github\.com:([^\/]+)\/([^\/]+)$/i,/^github\.com\/([^\/]+)\/([^\/]+)$/i];for(const n of r){const o=t.match(n);if(o){const c=o[2].replace(/\.git$/,"");return c?{owner:o[1],repo:c}:null}}const s=t.match(/^([a-zA-Z0-9\-_]+)\/([a-zA-Z0-9\-_\.]+)$/);if(s&&!t.includes("\\")&&!t.includes(":")){const n=s[2].replace(/\.git$/,"");return n?{owner:s[1],repo:n}:null}return null}async function Sr(e){return br(e)?{valid:!0,warning:a.workspace_validation_githubCloneLocally_warning()}:{valid:!1,error:a.workspace_validation_invalidGithubUrl_error(),suggestion:a.workspace_validation_invalidGithubUrl_suggestion()}}async function _r(e,t=!1,r=!1){if(e.includes("\0"))return{valid:!1,error:a.workspace_validation_nullCharacters_error()};if(!e.startsWith("/")&&!e.startsWith("~")&&!e.startsWith(".")&&!e.includes(":\\")&&!/^[a-zA-Z]:\//.test(e))return{valid:!1,error:a.workspace_validation_pathNotAbsolute_error(),suggestion:a.workspace_validation_pathNotAbsolute_suggestion()};if(typeof window<"u"&&window.electronAPI)try{const s=await B("file:getDirectoryStatus",{path:e});if(s.success&&s.data){const c=s.data;return c.exists?c.isDirectory?c.isGitRepo?{valid:!0,isNewRepo:!1,directoryStatus:c}:c.isSubdirectoryOfGitRepo?{valid:!0,isNewRepo:!1,directoryStatus:c,warning:a.workspace_validation_insideParentRepo_warning({path:c.parentGitRoot??""})}:r?{valid:!0,isNewRepo:!1,directoryStatus:c}:t?c.isEmpty?{valid:!0,isNewRepo:!0,directoryStatus:c,warning:a.workspace_validation_emptyDirInit_warning()}:{valid:!0,isNewRepo:!0,directoryStatus:c,warning:a.workspace_validation_nonGitDirInit_warning()}:{valid:!1,error:a.workspace_repoSelector_notGitRepository_label(),directoryStatus:c}:{valid:!1,error:a.workspace_validation_notDirectory_error(),suggestion:a.workspace_validation_notDirectory_suggestion(),directoryStatus:c}:t?{valid:!0,isNewRepo:!0,directoryStatus:c,warning:a.workspace_validation_willCreateRepo_warning()}:{valid:!1,error:a.workspace_validation_dirNotExist_error(),suggestion:a.workspace_validation_dirNotExist_suggestion(),directoryStatus:c}}if(!(await B("file:exists",{path:e})).exists)return t?{valid:!0,isNewRepo:!0,warning:a.workspace_validation_willCreateRepo_warning()}:{valid:!1,error:a.workspace_validation_dirNotExist_error(),suggestion:a.workspace_validation_dirNotExistLegacy_suggestion()};const o=await B("git:isRepository",{path:e});if(!t&&o?.isRepository!==!0)return{valid:!1,error:o?.isRepository===!1?a.workspace_repoSelector_notGitRepository_label():a.workspace_compactInitializer_gitCheckUnknown_label()};if(!o.isRepository)return{valid:!0,isNewRepo:!0,warning:a.workspace_validation_nonGitInit_warning()}}catch(s){if(hr.warn("Could not validate path existence",s),!t)return{valid:!1,error:a.workspace_compactInitializer_gitCheckUnknown_label()}}return{valid:!0,isNewRepo:!1}}function Un(e){if(!e||e.trim().length===0)return{valid:!0};const t=e.trim();return/[\s~^:?*\[\]\\]/.test(t)?{valid:!1,error:a.workspace_validation_branchPrefixInvalidChars_error(),suggestion:a.workspace_validation_branchChars_suggestion()}:t==="."||t===".."||t.startsWith(".")?{valid:!1,error:a.workspace_validation_branchPrefixDot_error()}:t.includes("..")||t.includes("//")?{valid:!1,error:a.workspace_validation_branchPrefixConsecutive_error()}:t.startsWith("/")?{valid:!1,error:a.workspace_validation_branchPrefixSlash_error()}:t.endsWith(".lock")?{valid:!1,error:a.workspace_validation_branchPrefixLock_error()}:t.length>50?{valid:!1,error:a.workspace_validation_branchPrefixTooLong_error()}:{valid:!0}}function Gn(e){if(!e||e.trim().length===0)return"";let t=e.trim().replace(/^[./]+/,"").replace(/[\s~^:?*\[\]\\]/g,"-").replace(/\.{2,}/g,"-").replace(/\/{2,}/g,"/").replace(/-{2,}/g,"-").replace(/^-+/,"").replace(/\.lock$/,"").toLowerCase();return t.length>0&&!t.endsWith("/")&&!t.endsWith("-")&&(t=t.includes("/")?`${t}/`:`${t}/`),t}function qn(e){if(!e||e.trim().length===0)return{valid:!1,error:a.workspace_validation_branchNameRequired_error()};const t=e.trim();return/[\s~^:?*\[\]\\]/.test(t)?{valid:!1,error:a.workspace_validation_branchNameInvalidChars_error(),suggestion:a.workspace_validation_branchChars_suggestion()}:["HEAD",".",".."].includes(t)?{valid:!1,error:a.workspace_validation_branchNameReserved_error()}:t.includes("..")||t.includes("//")?{valid:!1,error:a.workspace_validation_branchNameConsecutive_error()}:t.startsWith("/")||t.endsWith("/")?{valid:!1,error:a.workspace_validation_branchNameSlash_error()}:t.endsWith(".lock")?{valid:!1,error:a.workspace_validation_branchNameLock_error()}:{valid:!0}}function Hn(e){return!e||e.trim().length===0?{valid:!0}:e.trim().length>1e5?{valid:!1,error:a.workspace_validation_promptTooLong_error(),suggestion:a.workspace_validation_promptTooLong_suggestion()}:{valid:!0}}function jn(e){const t=e.toLowerCase();return t.includes("maxbuffer")?a.workspace_gitError_maxBuffer():t.includes("clone")&&t.includes("timed out")?a.workspace_gitError_cloneTimeout():t.includes("json-rpc request timed out: workspace.create")?a.workspace_gitError_createTimeout():t.includes("timed out")&&["git","clone","fetch","worktree","pull","push","rebase","merge"].some(r=>t.includes(r))?a.workspace_gitError_gitTimeout():t.includes("git clone failed")?t.includes("could not read from remote")?a.workspace_gitError_cloneRemote():t.includes("authentication")||t.includes("permission denied")||t.includes("access denied")?a.workspace_gitError_cloneAuth():a.workspace_gitError_cloneFailed():t.includes("could not resolve any ref to create worktree")?a.workspace_gitError_worktreeRef():t.includes("failed to write file")?t.includes("eacces")||t.includes("permission denied")?a.workspace_gitError_writePermission():t.includes("enospc")||t.includes("disk space")?a.workspace_gitError_diskSpaceFree():t.includes("enoent")||t.includes("no such file")?a.workspace_gitError_writeNoEnt():e:t.includes("failed to read file")?t.includes("enoent")||t.includes("no such file")?a.workspace_gitError_readNotFound():t.includes("eacces")||t.includes("permission denied")?a.workspace_gitError_readPermission():e:t.includes("permission denied")?a.workspace_gitError_permissionDenied():t.includes("not found")||t.includes("enoent")?a.workspace_gitError_notFound():t.includes("already exists")?a.workspace_gitError_alreadyExists():t.includes("network")||t.includes("etimedout")?a.workspace_gitError_network():t.includes("authentication")||t.includes("401")?t.includes("private repositor")?e:a.workspace_gitError_authFailed():t.includes("rate limit")||t.includes("403")?a.workspace_gitError_rateLimit():t.includes("disk space")||t.includes("enospc")?a.workspace_gitError_diskSpace():e}const vr=["idle","exited"];function Ar(e){return e===void 0||!vr.includes(e)}function Kn(e){return e.status==="restarting"?"restarting":Ar(e.status)?"running":e.status==="idle"?"idle":e.exitCode===0?"succeeded":e.exitCode===null||e.exitCode===void 0?"exited":e.exitCode>=128?"stopped":"failed"}function kr(e){return e.engine==="os"?"os":e.isLoading||e.keyConfigured[e.provider]===!0?"daemon":e.osEngineAvailable?"os":"unavailable"}const zn=i.createSelector(e=>e.voiceSettings.isLoading),$n=i.createSelector(e=>e.voiceSettings.available),Xn=i.createSelector(e=>e.voiceSettings.provider),Qn=i.createSelector(e=>e.voiceSettings.engine),Yn=i.createSelector(e=>e.voiceSettings.osEngineAvailable),Zn=i.createSelector(e=>e.voiceSettings.keyConfigured),Jn=i.createSelector(e=>e.voiceSettings.vocabulary),ei=i.createSelector(e=>e.voiceSettings.openaiModel),ti=i.createSelector(e=>e.voiceSettings.language),ri=i.createSelector(e=>e.voiceSettings.workspaceVocabularyMaxTerms),si=i.createSelector(e=>e.voiceSettings.inputDeviceId),ni=i.createSelector(e=>e.voiceSettings.inputDevices),ii=i.createSelector(e=>e.voiceSettings.busyProvider),ai=i.createSelector(e=>e.voiceSettings.error),oi=i.createSelector(e=>et.select(e)?"unavailable":kr(e.voiceSettings)),H="intent.voice.inputDevice";let j;function Er(){if(j!==void 0)return j;try{const e=localStorage.getItem(H);return typeof e=="string"&&e!==""?e:null}catch{return null}}function ci(e){j=e;try{e===null?localStorage.removeItem(H):localStorage.setItem(H,e)}catch{}}let F=null;function li(e){F=e}function di(){const e=F;return F=null,e}function yr(){F=null}const Mr=300,Rr=300;class Cr{constructor(t){d(this,"holdThresholdMs");d(this,"doublePressWindowMs");d(this,"onRecordStart");d(this,"onRecordStop");d(this,"currentState","idle");d(this,"timer",null);this.holdThresholdMs=t.holdThresholdMs??Mr,this.doublePressWindowMs=t.doublePressWindowMs??Rr,this.onRecordStart=t.onRecordStart,this.onRecordStop=t.onRecordStop}get state(){return this.currentState}keyDown(){switch(this.currentState){case"idle":this.currentState="first-press",this.armTimer(this.holdThresholdMs,()=>{this.currentState="holding"}),this.onRecordStart();break;case"await-second-press":this.clearTimer(),this.currentState="second-press",this.armTimer(this.holdThresholdMs,()=>{this.currentState="holding-send"});break;case"latched":this.currentState="latched-press";break;case"latched-await-second":this.clearTimer(),this.currentState="draining",this.onRecordStop({stopReason:"double-press",autoSend:!0});break}}keyUp(){switch(this.currentState){case"first-press":this.clearTimer(),this.currentState="await-second-press",this.armTimer(this.doublePressWindowMs,()=>{this.currentState="latched"});break;case"holding":this.currentState="idle",this.onRecordStop({stopReason:"hold-release",autoSend:!1});break;case"second-press":this.clearTimer(),this.currentState="idle",this.onRecordStop({stopReason:"double-press",autoSend:!0});break;case"holding-send":this.currentState="idle",this.onRecordStop({stopReason:"double-hold-release",autoSend:!0});break;case"latched-press":this.currentState="latched-await-second",this.armTimer(this.doublePressWindowMs,()=>{this.currentState="idle",this.onRecordStop({stopReason:"latch-stop",autoSend:!1})});break;case"draining":this.currentState="idle";break}}reset(){this.clearTimer(),this.currentState="idle"}armTimer(t,r){this.clearTimer(),this.timer=setTimeout(()=>{this.timer=null,r()},t)}clearTimer(){this.timer!==null&&clearTimeout(this.timer),this.timer=null}}let L=null;function ui(e){L=e}function pi(){const e=L;return L=null,e}function wr(){L=null}const Pr=12e4,Ir=["audio/webm;codecs=opus","audio/webm"];function fi(){return typeof navigator<"u"&&typeof navigator.mediaDevices?.getUserMedia=="function"&&typeof MediaRecorder<"u"}function Or(e){return e?{audio:{deviceId:{ideal:e}}}:{audio:!0}}function Tr(){if(!(typeof MediaRecorder>"u"||typeof MediaRecorder.isTypeSupported!="function"))return Ir.find(e=>MediaRecorder.isTypeSupported(e))}class Fr{constructor(t){d(this,"maxDurationMs");d(this,"now");d(this,"callbacks");d(this,"deviceId");d(this,"currentState","idle");d(this,"recorder",null);d(this,"stream",null);d(this,"chunks",[]);d(this,"startedAt",0);d(this,"maxTimer",null);d(this,"discardRequested",!1);d(this,"cancelRequested",!1);this.maxDurationMs=t.maxDurationMs??Pr,this.now=t.now??Date.now,this.callbacks={onFinished:t.onFinished,onError:t.onError},this.deviceId=t.deviceId??null}get state(){return this.currentState}async start(){if(this.currentState!=="idle")return"discarded";this.currentState="starting";let t;try{t=await navigator.mediaDevices.getUserMedia(Or(this.deviceId))}catch(n){const o=this.discardRequested;return this.currentState="stopped",o||this.callbacks.onError(n),o?"discarded":"error"}if(this.discardRequested){for(const n of t.getTracks())n.stop();return this.currentState="stopped","discarded"}this.stream=t;const r=Tr(),s=r?new MediaRecorder(t,{mimeType:r}):new MediaRecorder(t);return this.recorder=s,s.ondataavailable=n=>{n.data&&n.data.size>0&&this.chunks.push(n.data)},s.onstop=()=>this.handleRecorderStop(),s.onerror=n=>this.handleRecorderError(n),s.start(),this.startedAt=this.now(),this.currentState="recording",this.maxTimer=setTimeout(()=>this.stop(),this.maxDurationMs),"recording"}stop(){if(this.currentState==="starting"){this.discardRequested=!0;return}this.currentState==="recording"&&this.recorder?.stop()}cancel(){if(this.currentState==="starting"){this.discardRequested=!0;return}this.currentState==="recording"&&(this.cancelRequested=!0,this.recorder?.stop())}handleRecorderStop(){const t=this.now()-this.startedAt,r=this.recorder?.mimeType||"audio/webm",s=this.chunks,n=this.cancelRequested;this.teardown(),!n&&this.callbacks.onFinished({blob:new Blob(s,{type:r}),durationMs:t,mimeType:r})}handleRecorderError(t){const r=t?.error??t;this.teardown(),this.callbacks.onError(r)}teardown(){this.maxTimer!==null&&clearTimeout(this.maxTimer),this.maxTimer=null,this.recorder&&(this.recorder.ondataavailable=null,this.recorder.onstop=null,this.recorder.onerror=null),this.recorder=null;for(const t of this.stream?.getTracks()??[])t.stop();this.stream=null,this.chunks=[],this.currentState="stopped"}}const Lr=300;function Dr(e){const t=e?.name;return t==="NotAllowedError"||t==="SecurityError"}const xr={stopReason:"manual",autoSend:!1};let g=null,S=null,k=0,w=null;const x=new Cr({onRecordStart:()=>{w&&Nr(w)},onRecordStop:e=>{ve(w,e)}});function gi(){return g!==null}function hi(){return g}function mi(e){w=e,k+=1,k===1&&x.keyDown()}function bi(e){w=e,k!==0&&(k-=1,k===0&&x.keyUp())}function Nr(e){if(g!==null)return;wr(),yr();const t=new Fr({deviceId:Er(),onFinished:r=>{g===t&&(g=null);const s=S??{stopReason:"auto-stop",autoSend:!1},n=S!==null;if(S=null,e.dispatch(O()),n||x.reset(),r.durationMs<Lr){s.autoSend&&e.dispatch(G());return}e.dispatch(Ge({...r,stopReason:s.stopReason,autoSend:s.autoSend}))},onError:r=>{g===t&&(g=null),S=null,e.dispatch(O()),e.showHint(Dr(r)?a.hardwareConsole_ptt_micDenied_message():a.hardwareConsole_ptt_recordingFailed_message())}});g=t,e.dispatch(qe()),t.start().then(r=>{if(r!=="recording"&&(g===t&&(g=null),r==="discarded")){const s=S?.autoSend===!0;S=null,e.dispatch(O()),s&&e.dispatch(G())}})}function ve(e,t){const r=g;if(r===null){t.autoSend&&e?.dispatch(G());return}S=t,r.stop()}function Si(){ve(null,xr)}function _i(e){x.reset(),k=0,S=null;const t=g;t!==null&&(g=null,t.cancel(),e.dispatch(O()))}const Br=K("HardwareConsoleVoiceSetupToast"),Wr="hardware-console-voice-setup";let U=null;function Vr(){return U||(U=Fe(()=>Promise.resolve().then(()=>Pt),void 0,import.meta.url).then(e=>e.notify)),U}function Ur(){wt("/settings?tab=connections#voice").catch(e=>{Br.error("Failed to open voice settings from setup toast",e)})}function Gr(){return{label:a.hardwareConsole_voice_openSettings_label(),onClick:()=>Ur()}}function vi(){Vr().then(e=>{e.error(a.hardwareConsole_voice_noKey_error(),{id:Wr,action:Gr()})})}const Ai=i.createSelector(e=>e.externalEditors.selectedAction),qr=i.createSelector(e=>e.externalEditors.editors),Hr=i.createSelector(e=>{const t=M(qr.select(e)),r=e.externalEditors.editorOrder??[];if(!r.length)return t;const s=new Map(t.map(c=>[c.id,c])),n=r.flatMap(c=>{const l=s.get(c);return l?[l]:[]}),o=new Set(r);return[...n,...t.filter(({id:c})=>!o.has(c))]}),ki=i.createSelector(e=>e.externalEditors.editorOrder??[]),Ei=i.createSelector(e=>e.externalEditors.loading),yi=i.createSelector(e=>e.externalEditors.lastFetched),jr=i.createSelector(e=>e.externalEditors.hiddenEditorIds),Mi=i.createSelector((e,t)=>{if(!(t?tt.select(e,t):rt.select(e)))return[];const s=jr.select(e);return Hr.select(e).filter(n=>n.installed&&!s.includes(n.id))});function Ri(e,t){if(!e||!t||t===e.providerId)return!1;const r=e.providerSettings[t];return!!(r&&[r.defaultModel,...Object.values(r.typeOverrides??{})].some(s=>typeof s=="string"&&s.includes(":")))}let Kr=0;function zr(e,t){const r=++Kr;return i.dispatch(je(e,t,r)),r}function Ci(e,t,r){i.dispatch(He(e,t,r))}async function Ae(e,t,r,s){const n=crypto.randomUUID(),o=s?.source??"control";try{return(await i.dispatch(Ke({requestId:n,consumerId:o,agentId:e,workspaceId:t,operation:r,connection:ce.select(i.state)},{...s,intent:s?.intent??zr(e,t)}))).status==="success"}finally{i.dispatch(ze(n,o))}}async function wi(e,t,r,s,n){return Ae(e,t,{kind:"effort",effort:r,previous:s},n)}async function Pi(e,t,r,s,n){return Ae(e,t,{kind:"reconcile",current:r??null,levels:s},n)}const $r=i.createSelector((e,t)=>M(e.agentModel.mutations).filter(r=>r.consumerId===t)),Ii=i.createSelector((e,t)=>$r.select(e,t).some(r=>r.status==="pending")),Oi=i.createSelector((e,t,r)=>{const s=e.agentSessions.byAgentId[t],n=st.select(e,t),o=ft.select(e,t),c=e.daemonHealth.stats?.protocolVersion,l=gt(c),p=l?ht(s?.model,null,o):s?.model;return{session:s,providerId:n,levels:o,legacy:l,identity:JSON.stringify([p,n]),connection:ce.select(e),canWrite:!!s&&s.workspaceId===r&&!nt.select(e,r)}});function Xr(e,t,r=!1){return e!=="auggie"||t===!0||r}const Ti=i.createSelector(e=>mt.select(e)?null:$.select(e)),Qr=i.createSelector(e=>e.providerCatalog?.workspaceEpoch??0),m=i.createSelector((e,t)=>t?e.providerCatalog?.byWorkspaceId?.[t]:void 0),Fi=i.createSelector(e=>Object.keys(e.providerCatalog?.byWorkspaceId??{})),Li=i.createSelector((e,t)=>!!m.select(e,t)&&e.providerCatalog.workspaceSnapshotEpochs?.[t]===Qr.select(e)),ke=i.createSelector((e,t)=>t?m.select(e,t)?.catalog.providers??[]:it.select(e)),Ee=i.createSelector((e,t)=>{if(!t)return le.select(e);const r=m.select(e,t)?.settings.find(s=>s.path==="model.defaultProvider")?.value;return typeof r=="string"?r:""}),ee=i.createSelector((e,t)=>{if(!t)return bt.select(e);const r=m.select(e,t)?.settings.find(s=>s.path==="providers.enabled")?.value;return r&&typeof r=="object"?r:{}}),ye=i.createSelector((e,t)=>{if(!t)return St.select(e);const r=ee.select(e,t),s=Ee.select(e,t),n=m.select(e,t)?.readiness??{};return ke.select(e,t).filter(o=>o.visible&&(!o.canBeDisabled||r[o.id]||o.id===s)&&n[o.id]?.available).map(o=>o.id)}),Di=i.createSelector((e,t)=>{const r=ee.select(e,t),s=t?m.select(e,t)?.readiness??{}:$.select(e);return ke.select(e,t).filter(n=>Xr(n.id,s[n.id]?.available,r[n.id]===!0)).map(n=>n.id)}),xi=i.createSelector((e,t)=>t?ye.select(e,t):_t.select(e)),Ni=i.createSelector((e,t)=>v.select(e,t)),Bi=i.createSelector((e,t)=>t?!!m.select(e,t):vt.select(e)),Wi=i.createSelector((e,t)=>{if(!t)return At.select(e);const r=m.select(e,t)?.settings??[],s=Ee.select(e,t),n=r.find(l=>l.path==="model.providerDefaults")?.value,o=n&&typeof n=="object"?n[s]:void 0;if(typeof o=="string")return o;const c=r.find(l=>l.path==="model.default")?.value;return typeof c=="string"?c:""}),Vi=i.createSelector((e,t)=>t?Object.fromEntries(Object.entries(e.providerModels?.byWorkspaceId?.[t]??{}).flatMap(([r,s])=>s.warning?[[r,s.warning]]:[])):kt.select(e)),Ui=i.createSelector((e,t)=>t?Object.fromEntries(Object.entries(e.providerModels?.byWorkspaceId?.[t]??{}).map(([r,s])=>[r,s.stale===!0])):Et.select(e)),Gi=i.createSelector((e,t)=>t?Object.fromEntries(Object.entries(e.providerModels?.byWorkspaceId?.[t]??{}).flatMap(([r,s])=>s.warning&&s.warningKind?[[r,s.warningKind]]:[])):yt.select(e)),qi=i.createSelector((e,t,r)=>{if(!r)return Mt.select(e,t);const s=ee.select(e,r),n=m.select(e,r);return ye.select(e,r).filter(o=>o!==t&&(s[o]||n?.catalog.providers.find(c=>c.id===o)?.canBeDisabled===!1)&&Rt(o,n?.readiness[o]?.authenticated))}),Hi=i.createSelector((e,t)=>t?m.select(e,t)?.readiness??{}:$.select(e)),Yr={},ji=i.createSelector(e=>e.providerSettings?.profiles?.status??Yr),Ki=i.createSelector(e=>e.directoryPicker.listing),zi=i.createSelector(e=>e.directoryPicker.loading),$i=i.createSelector(e=>e.directoryPicker.error),Xi=i.createSelector(e=>e.directoryPicker.pathError),Qi=i.createSelector(e=>e.directoryPicker.createError),ae={},Zr=i.createSelector((e,t)=>t?e.providerCatalog?.byWorkspaceId?.[t]?.mcpServers??[]:e.mcpSettings.servers),Yi=i.createSelector((e,t,r)=>{const s=e.providerCatalog?.byWorkspaceId?.[t];return s?s.mcpServers?.find(n=>n.id===r)?.name:e.providerCatalog?.mcpServerNamesByWorkspaceId?.[t]?.[r]}),Zi=i.createSelector(e=>e.mcpSettings.loading),Ji=i.createSelector(e=>e.mcpSettings.error),ea=i.createSelector(e=>e.mcpSettings.mutationError??null),ta=i.createSelector(e=>e.mcpSettings.enabled),Jr=i.createSelector(e=>e.mcpSettings.disabledServers),es=i.createSelector(e=>e.mcpSettings.statusMap),ts=i.createSelector(e=>e.mcpSettings.toolsMap),rs=i.createSelector((e,t)=>{if(!t)return e.mcpSettings.errorMessages;const r=e.providerCatalog?.byWorkspaceId?.[t],s=new Map(r?.mcpServers?.map(n=>[n.id,R(n)])??[]);return Object.fromEntries((r?.mcpStatuses??[]).flatMap(n=>{const o=s.get(n.serverId);return o&&n.lastError?[[o,n.lastError]]:[]}))}),ss=i.createSelector((e,t)=>t?e.mcpSettings.byWorkspaceId[t]?.disabledServers??ae:ae),ra=i.createSelector((e,t)=>Object.keys(ss.select(e,t))),sa=i.createSelector(e=>{const t=Zr.select(e),r=es.select(e),s=ts.select(e),n=Jr.select(e),o=rs.select(e);return t.map(c=>{const l=R(c)in n,p=s[R(c)]||[];let b=r[R(c)]||"disconnected";return l&&(b="disabled"),{...c,disabled:l,status:b,tools:p,toolCount:p.length,errorMessage:o[R(c)]}})});i.createSelector((e,t)=>e.mcpSettings.errorMessages[t]);const na=i.createSelector(e=>e.mcpSettings.lastImportedCount),ia=i.createSelector(e=>e.mcpSettings.advancedSaveStatus),aa=i.createSelector(e=>e.mcpSettings.advancedSaveError),oa=["agentFeatures.backgroundHooks","agentFeatures.hostExec","agentFeatures.scripts","agentFeatures.terminalAccess","agentFeatures.browserAutomation","agentFeatures.desktopControl","agentFeatures.richChatBlocks","agentFeatures.structuredQuestions","agentFeatures.secretRequests","agentFeatures.attentionRequests","agentFeatures.stateSnapshot","agentFeatures.prMonitor","agentFeatures.taskGraph","agentFeatures.peerAgents","agentFeatures.mcpTools"],ns=[{path:"agentFeatures.backgroundHooks",label:()=>a.settings_agentFeatures_backgroundHooks_label(),description:()=>a.settings_agentFeatures_backgroundHooks_description(),defaultValue:!0},{path:"agentFeatures.hostExec",label:()=>a.settings_agentFeatures_hostExec_label(),description:()=>a.settings_agentFeatures_hostExec_description(),defaultValue:!0},{path:"agentFeatures.scripts",label:()=>a.settings_agentFeatures_scripts_label(),description:()=>a.settings_agentFeatures_scripts_description(),defaultValue:!0},{path:"agentFeatures.terminalAccess",label:()=>a.settings_agentFeatures_terminalAccess_label(),description:()=>a.settings_agentFeatures_terminalAccess_description(),defaultValue:!0},{path:"agentFeatures.browserAutomation",label:()=>a.settings_agentFeatures_browserAutomation_label(),description:()=>a.settings_agentFeatures_browserAutomation_description(),defaultValue:!0},{path:"agentFeatures.desktopControl",label:()=>a.settings_agentFeatures_desktopControl_label(),description:()=>a.settings_agentFeatures_desktopControl_description(),defaultValue:!0},{path:"agentFeatures.richChatBlocks",label:()=>a.settings_agentFeatures_richChatBlocks_label(),description:()=>a.settings_agentFeatures_richChatBlocks_description(),defaultValue:!0},{path:"agentFeatures.structuredQuestions",label:()=>a.settings_agentFeatures_structuredQuestions_label(),description:()=>a.settings_agentFeatures_structuredQuestions_description(),defaultValue:!0},{path:"agentFeatures.secretRequests",label:()=>a.settings_agentFeatures_secretRequests_label(),description:()=>a.settings_agentFeatures_secretRequests_description(),defaultValue:!1},{path:"agentFeatures.attentionRequests",label:()=>a.settings_agentFeatures_attentionRequests_label(),description:()=>a.settings_agentFeatures_attentionRequests_description(),defaultValue:!0},{path:"agentFeatures.stateSnapshot",label:()=>a.settings_agentFeatures_stateSnapshot_label(),description:()=>a.settings_agentFeatures_stateSnapshot_description(),defaultValue:!0},{path:"agentFeatures.prMonitor",label:()=>a.settings_agentFeatures_prMonitor_label(),description:()=>a.settings_agentFeatures_prMonitor_description(),defaultValue:!0},{path:"agentFeatures.taskGraph",label:()=>a.settings_agentFeatures_taskGraph_label(),description:()=>a.settings_agentFeatures_taskGraph_description(),defaultValue:!0},{path:"agentFeatures.peerAgents",label:()=>a.settings_agentFeatures_peerAgents_label(),description:()=>a.settings_agentFeatures_peerAgents_description(),defaultValue:!0},{path:"agentFeatures.mcpTools",label:()=>a.settings_agentFeatures_mcpTools_label(),description:()=>a.settings_agentFeatures_mcpTools_description(),defaultValue:!0}],ca=Object.fromEntries(ns.map(e=>[e.path,e.defaultValue]));export{Ci as $,mi as A,bi as B,Pt as C,Ds as D,yn as E,ns as F,de as G,Ar as H,Xr as I,gi as J,Ri as K,re as L,fi as M,Er as N,gn as O,Mn as P,P as Q,A as R,E as S,zr as T,lr as U,un as V,br as W,fn as X,dn as Y,er as Z,Pi as _,ca as a,ws as a$,Sn as a0,kr as a1,cr as a2,Gn as a3,ci as a4,Ii as a5,$r as a6,Oi as a7,Bs as a8,qs as a9,nn as aA,Xs as aB,Bn as aC,oi as aD,Tn as aE,Qs as aF,Ys as aG,Ws as aH,Gs as aI,X as aJ,Ot as aK,Nt as aL,Bt as aM,ue as aN,xt as aO,Tt as aP,It as aQ,Lt as aR,Dt as aS,Cs as aT,Is as aU,Os as aV,Fs as aW,Es as aX,Ms as aY,Ps as aZ,Rs as a_,ur as aa,xi as ab,Ee as ac,ee as ad,Di as ae,ye as af,ke as ag,Ui as ah,Gi as ai,Vi as aj,qi as ak,Hi as al,Bi as am,Wi as an,Ni as ao,pr as ap,Us as aq,Dn as ar,js as as,Qi as at,$i as au,Ki as av,zi as aw,Xi as ax,ki as ay,Zs as az,oa as b,Xn as b$,ys as b0,Ts as b1,ks as b2,Ls as b3,tn as b4,jr as b5,Nn as b6,Hr as b7,Mi as b8,Ei as b9,J as bA,Z as bB,Ln as bC,Cn as bD,Ti as bE,qt as bF,on as bG,cn as bH,sn as bI,an as bJ,$s as bK,rn as bL,v as bM,Hs as bN,Wn as bO,xn as bP,gr as bQ,Se as bR,Vs as bS,ii as bT,Qn as bU,si as bV,ni as bW,Zn as bX,ti as bY,ei as bZ,Yn as b_,Js as ba,en as bb,yi as bc,Pn as bd,ie as be,wn as bf,be as bg,aa as bh,ia as bi,Jr as bj,ta as bk,Ji as bl,rs as bm,na as bn,Zi as bo,ea as bp,Zr as bq,sa as br,es as bs,ts as bt,Ai as bu,zs as bv,ji as bw,Fn as bx,On as by,In as bz,h as c,$n as c0,ai as c1,zn as c2,Jn as c3,ri as c4,m as c5,Qr as c6,Li as c7,Fi as c8,ra as c9,Yi as ca,li as cb,ui as cc,vi as cd,kn as ce,Q as cf,D as cg,En as ch,Nr as ci,Rn as cj,Si as ck,qn as cl,Un as cm,Hn as cn,Vn as co,Gr as cp,ln as cq,An as d,bn as e,_n as f,vn as g,hn as h,fe as i,mn as j,he as k,wi as l,_i as m,yr as n,wr as o,di as p,pi as q,Ks as r,Gt as s,Ut as t,pn as u,hi as v,jn as w,Kn as x,xs as y,Ns as z};
@@ -1 +1 @@
1
- import{Iy as s,i1 as a,lZ as S,nx as f,ma as m}from"./D5ej8a-y.js";import{H as O}from"./D12mpB59.js";import{dy as d,aV as k,dG as b}from"./Cg2SHWhQ.js";const v=s.createSelector((t,e)=>{if(k.select(t,e)&&b.select(t,e))return!1;const r=t.principal?.snapshot;return r?.capabilities.workspaceGuestRoles===!0&&(r.capabilities.hostMembership?r.principal.hostRole==="guest":!r.principal.isAdministrator)}),h=s.createSelector(t=>t.principal?.snapshot?.capabilities.remoteScripts===1),l=s.createSelector((t,e,r)=>!v.select(t,e)||!!d.select(t,e)&&r?.purpose==="saved");function o(t,e,r){return!!e&&!!r&&l.select(t,e,r)}function i(t,e){return e?t.scripts.byWorkspaceId[e]??m:m}const j=s.createSelector((t,e)=>i(t,e).initialized),W=s.createSelector((t,e)=>{const r=i(t,e);return r.activeScriptIds?r.activeScriptIds.flatMap(c=>o(t,e,r.scripts[c])?[r.scripts[c]]:[]):Object.values(r.scripts).filter(c=>!c.archivedAt&&o(t,e,c))}),C=s.createSelector((t,e)=>W.select(t,e).filter(r=>O((r.runtime??a()).status))),u=s.createSelector((t,e,r)=>{const c=i(t,e);return o(t,e,c.scripts[r])?c.scripts[r]:null}),x=s.createSelector((t,e,r)=>u.select(t,e,r)?.runtime??a()),E=s.createSelector((t,e,r)=>{const c=i(t,e);return l.select(t,e??"",c.scripts[r])?c.outputBuffers[r]??S:S}),M=s.createSelector((t,e,r,c)=>{const n=i(t,e).retainedOutputs?.[c];return n?.scriptId===r&&l.select(t,e,i(t,e).scripts[r])?n:void 0}),z=s.createSelector(t=>Object.entries(t.scripts?.byWorkspaceId??{}).filter(([,e])=>Object.keys(e.retainedOutputs??{}).length>0).map(([e])=>e).sort()),A=s.createSelector((t,e)=>!!t.scripts?.byWorkspaceId[e]?.outputStreamReady),D=s.createSelector((t,e)=>i(t,e).initialized),G=s.createSelector((t,e)=>{const r=i(t,e);return r.activeScriptIds?r.activeScriptIds.flatMap(c=>o(t,e,r.scripts[c])?[r.scripts[c]]:[]):Object.values(r.scripts).filter(c=>!c.archivedAt&&o(t,e,c))}),B=s.createSelector((t,e)=>{const r=i(t,e);return r.detectionOperation?.pending?{...r.operations,...Object.fromEntries(Object.keys(r.scripts).map(c=>[c,r.detectionOperation]))}:r.operations}),L=s.createSelector((t,e)=>i(t,e).detectionOperation),P=s.createSelector((t,e,r,c)=>{const n=i(t,r).workflowOutcomes,p=n?f(n,e):void 0;return p?.workspaceId===r&&p.resourceId===c?p:void 0}),V=s.createSelector((t,e,r)=>u.select(t,e,r)?.runtime??a()),H=s.createSelector((t,e)=>Object.values(i(t,e).scripts).filter(r=>o(t,e,r))),J=s.createSelector((t,e,r)=>i(t,e).pendingReads?.[r]),U=s.createSelector((t,e,r)=>!!u.select(t,e,r)&&!i(t,e).detectionOperation?.pending&&!i(t,e).operations[r]?.pending),Z=s.createSelector((t,e)=>({nextCursor:i(t,e).nextCursor,loading:i(t,e).loading,error:i(t,e).loadError}));export{H as selectAllWorkspaceScriptEntries,U as selectCanDeleteScript,l as selectCanReadScriptDefinition,h as selectRemoteScriptsSupported,C as selectRunningScripts,u as selectScriptById,L as selectScriptDetectionOperation,W as selectScriptEntries,Z as selectScriptListPageState,E as selectScriptOutput,A as selectScriptOutputStreamReady,z as selectScriptOutputViewerWorkspaceIds,J as selectScriptReadJournal,M as selectScriptRetainedOutput,x as selectScriptRuntime,P as selectScriptWorkflowOutcome,j as selectScriptsInitialized,v as selectUsesGuestScriptScope,G as selectWorkspaceScriptEntries,B as selectWorkspaceScriptOperations,V as selectWorkspaceScriptRuntime,D as selectWorkspaceScriptsInitialized};
1
+ import{Iy as s,i1 as a,lZ as S,nx as f,ma as m}from"./D5ej8a-y.js";import{H as O}from"./xB4HOmid.js";import{dy as d,aV as k,dG as b}from"./Cg2SHWhQ.js";const v=s.createSelector((t,e)=>{if(k.select(t,e)&&b.select(t,e))return!1;const r=t.principal?.snapshot;return r?.capabilities.workspaceGuestRoles===!0&&(r.capabilities.hostMembership?r.principal.hostRole==="guest":!r.principal.isAdministrator)}),h=s.createSelector(t=>t.principal?.snapshot?.capabilities.remoteScripts===1),l=s.createSelector((t,e,r)=>!v.select(t,e)||!!d.select(t,e)&&r?.purpose==="saved");function o(t,e,r){return!!e&&!!r&&l.select(t,e,r)}function i(t,e){return e?t.scripts.byWorkspaceId[e]??m:m}const j=s.createSelector((t,e)=>i(t,e).initialized),W=s.createSelector((t,e)=>{const r=i(t,e);return r.activeScriptIds?r.activeScriptIds.flatMap(c=>o(t,e,r.scripts[c])?[r.scripts[c]]:[]):Object.values(r.scripts).filter(c=>!c.archivedAt&&o(t,e,c))}),C=s.createSelector((t,e)=>W.select(t,e).filter(r=>O((r.runtime??a()).status))),u=s.createSelector((t,e,r)=>{const c=i(t,e);return o(t,e,c.scripts[r])?c.scripts[r]:null}),x=s.createSelector((t,e,r)=>u.select(t,e,r)?.runtime??a()),E=s.createSelector((t,e,r)=>{const c=i(t,e);return l.select(t,e??"",c.scripts[r])?c.outputBuffers[r]??S:S}),M=s.createSelector((t,e,r,c)=>{const n=i(t,e).retainedOutputs?.[c];return n?.scriptId===r&&l.select(t,e,i(t,e).scripts[r])?n:void 0}),z=s.createSelector(t=>Object.entries(t.scripts?.byWorkspaceId??{}).filter(([,e])=>Object.keys(e.retainedOutputs??{}).length>0).map(([e])=>e).sort()),A=s.createSelector((t,e)=>!!t.scripts?.byWorkspaceId[e]?.outputStreamReady),D=s.createSelector((t,e)=>i(t,e).initialized),G=s.createSelector((t,e)=>{const r=i(t,e);return r.activeScriptIds?r.activeScriptIds.flatMap(c=>o(t,e,r.scripts[c])?[r.scripts[c]]:[]):Object.values(r.scripts).filter(c=>!c.archivedAt&&o(t,e,c))}),B=s.createSelector((t,e)=>{const r=i(t,e);return r.detectionOperation?.pending?{...r.operations,...Object.fromEntries(Object.keys(r.scripts).map(c=>[c,r.detectionOperation]))}:r.operations}),L=s.createSelector((t,e)=>i(t,e).detectionOperation),P=s.createSelector((t,e,r,c)=>{const n=i(t,r).workflowOutcomes,p=n?f(n,e):void 0;return p?.workspaceId===r&&p.resourceId===c?p:void 0}),V=s.createSelector((t,e,r)=>u.select(t,e,r)?.runtime??a()),H=s.createSelector((t,e)=>Object.values(i(t,e).scripts).filter(r=>o(t,e,r))),J=s.createSelector((t,e,r)=>i(t,e).pendingReads?.[r]),U=s.createSelector((t,e,r)=>!!u.select(t,e,r)&&!i(t,e).detectionOperation?.pending&&!i(t,e).operations[r]?.pending),Z=s.createSelector((t,e)=>({nextCursor:i(t,e).nextCursor,loading:i(t,e).loading,error:i(t,e).loadError}));export{H as selectAllWorkspaceScriptEntries,U as selectCanDeleteScript,l as selectCanReadScriptDefinition,h as selectRemoteScriptsSupported,C as selectRunningScripts,u as selectScriptById,L as selectScriptDetectionOperation,W as selectScriptEntries,Z as selectScriptListPageState,E as selectScriptOutput,A as selectScriptOutputStreamReady,z as selectScriptOutputViewerWorkspaceIds,J as selectScriptReadJournal,M as selectScriptRetainedOutput,x as selectScriptRuntime,P as selectScriptWorkflowOutcome,j as selectScriptsInitialized,v as selectUsesGuestScriptScope,G as selectWorkspaceScriptEntries,B as selectWorkspaceScriptOperations,V as selectWorkspaceScriptRuntime,D as selectWorkspaceScriptsInitialized};
@@ -1 +1 @@
1
- import"./DYhIMPy1.js";import{p as r}from"./DhiXRQzT.js";const t={get error(){return r.error},get params(){return r.params},get state(){return r.state},get status(){return r.status},get url(){return r.url}},s=t;export{s as p};
1
+ import"./DYhIMPy1.js";import{p as r}from"./NSeFolqL.js";const t={get error(){return r.error},get params(){return r.params},get state(){return r.state},get status(){return r.status},get url(){return r.url}},s=t;export{s as p};