@intent-hq/web 2.383.3 → 2.383.4

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 (147) hide show
  1. package/package.json +1 -1
  2. package/web/app/immutable/chunks/{Cuvcpuwl.js → -Mic_e6k.js} +1 -1
  3. package/web/app/immutable/chunks/{DUdBCfQ2.js → -ZE0BKMJ.js} +1 -1
  4. package/web/app/immutable/chunks/{0l7ZqDIV.js → 0Z36NhH2.js} +1 -1
  5. package/web/app/immutable/chunks/{sjYi8iFk.js → 12yXK53O.js} +1 -1
  6. package/web/app/immutable/chunks/{CW2OkXuF.js → 35Pj1tWu.js} +1 -1
  7. package/web/app/immutable/chunks/{CKOijLzA.js → 5sSmbvC-.js} +1 -1
  8. package/web/app/immutable/chunks/{uA-KbK5l.js → 6oqjp0oY.js} +1 -1
  9. package/web/app/immutable/chunks/{BDgY7Zd8.js → B1PlU8Mp.js} +2 -2
  10. package/web/app/immutable/chunks/{AqAgOqAP.js → B1QCl1Po.js} +2 -2
  11. package/web/app/immutable/chunks/{BthP56U0.js → B1poZr5t.js} +1 -1
  12. package/web/app/immutable/chunks/{ufC4F9mx.js → B48XhjTD.js} +2 -2
  13. package/web/app/immutable/chunks/{BB7BFhCP.js → BAtDEUM7.js} +1 -1
  14. package/web/app/immutable/chunks/{B7AnydIV.js → BFzamEtR.js} +1 -1
  15. package/web/app/immutable/chunks/{D6J72aTz.js → BIsvX0dB.js} +3 -3
  16. package/web/app/immutable/chunks/{yC4xveeV.js → BJWnaGKs.js} +1 -1
  17. package/web/app/immutable/chunks/{CiNhMqq1.js → BLL1wBVI.js} +1 -1
  18. package/web/app/immutable/chunks/{BGxmHLUr.js → BMGB0uZU.js} +1 -1
  19. package/web/app/immutable/chunks/{DR9rgOUR.js → BMv9rEVV.js} +1 -1
  20. package/web/app/immutable/chunks/{BZskJqHK.js → BNF7dSgi.js} +2 -2
  21. package/web/app/immutable/chunks/{B4mnoVZK.js → BNcG1DWU.js} +1 -1
  22. package/web/app/immutable/chunks/{mlIdQnJX.js → BTa8GIiv.js} +2 -2
  23. package/web/app/immutable/chunks/{C19Fl1wo.js → BV1ipkUL.js} +1 -1
  24. package/web/app/immutable/chunks/{CXR8jfrb.js → B_Fn14Ok.js} +1 -1
  25. package/web/app/immutable/chunks/{DLbnXb7P.js → Bc3KFcWc.js} +3 -3
  26. package/web/app/immutable/chunks/{DcTV3q3a.js → BdJ_iWAp.js} +1 -1
  27. package/web/app/immutable/chunks/{BwyO9iAx.js → BgxuPkk9.js} +1 -1
  28. package/web/app/immutable/chunks/{BB5q5DsO.js → Bi3RVGsg.js} +1 -1
  29. package/web/app/immutable/chunks/{C_1Oardw.js → BnSzQmM2.js} +1 -1
  30. package/web/app/immutable/chunks/{CKG0fjh3.js → BnaEYx3G.js} +1 -1
  31. package/web/app/immutable/chunks/{Byun8_as.js → BoIrWOoc.js} +1 -1
  32. package/web/app/immutable/chunks/{DGXU2Eur.js → Boyio2o8.js} +1 -1
  33. package/web/app/immutable/chunks/{CLeH6OyR.js → BpboU9n2.js} +1 -1
  34. package/web/app/immutable/chunks/{CnljYLZs.js → Bt7IO3Ki.js} +1 -1
  35. package/web/app/immutable/chunks/{Bok48R2D.js → Bt7Q47HI.js} +1 -1
  36. package/web/app/immutable/chunks/{CDXv1PW9.js → Bvp3gPe2.js} +1 -1
  37. package/web/app/immutable/chunks/{CpxEaO9r.js → Bw9sjqWK.js} +1 -1
  38. package/web/app/immutable/chunks/{Dipy9ZkR.js → C3cn2j3y.js} +1 -1
  39. package/web/app/immutable/chunks/{a6nBCKTJ.js → C3vHP-qn.js} +1 -1
  40. package/web/app/immutable/chunks/{D83rapov.js → C7d9ZbWc.js} +1 -1
  41. package/web/app/immutable/chunks/{WAmymGEm.js → CATo12kv.js} +1 -1
  42. package/web/app/immutable/chunks/{BTTEE7GF.js → CBp-yM36.js} +1 -1
  43. package/web/app/immutable/chunks/{DhN_Bb70.js → CDGoCDAX.js} +4 -4
  44. package/web/app/immutable/chunks/{LFBaWgJg.js → CE15e5UF.js} +1 -1
  45. package/web/app/immutable/chunks/{CMiAv123.js → CFr8iZKI.js} +1 -1
  46. package/web/app/immutable/chunks/{DCQ9cJhS.js → CGwsFBBd.js} +1 -1
  47. package/web/app/immutable/chunks/{BdgSVihu.js → CHtJr32B.js} +1 -1
  48. package/web/app/immutable/chunks/{-2V-BAm8.js → CIEu92Dv.js} +3 -3
  49. package/web/app/immutable/chunks/{BDUjjuc4.js → CJj7ZaOk.js} +1 -1
  50. package/web/app/immutable/chunks/{gRz70TuX.js → CMHU_cf0.js} +1 -1
  51. package/web/app/immutable/chunks/{DLZnxjXG.js → CO3Ad3gs.js} +1 -1
  52. package/web/app/immutable/chunks/{C-n5-Nyi.js → CP-xkzkH.js} +1 -1
  53. package/web/app/immutable/chunks/{BCo0L43p.js → CPr4uSCV.js} +1 -1
  54. package/web/app/immutable/chunks/{DKYFDagY.js → CQHTACis.js} +1 -1
  55. package/web/app/immutable/chunks/{BammBnda.js → CSB4cQlc.js} +3 -3
  56. package/web/app/immutable/chunks/{D1QHqX16.js → CUJZhB5z.js} +1 -1
  57. package/web/app/immutable/chunks/{D3a_DhRG.js → CWoaP7UR.js} +1 -1
  58. package/web/app/immutable/chunks/{D59f5vu3.js → CY8jnGs7.js} +1 -1
  59. package/web/app/immutable/chunks/{SDWlqEse.js → CZ1onE9g.js} +1 -1
  60. package/web/app/immutable/chunks/{DEIwQ6hO.js → Ca13FruI.js} +1 -1
  61. package/web/app/immutable/chunks/{C_-1gUwp.js → CjZzZn8W.js} +3 -3
  62. package/web/app/immutable/chunks/{-NFtmIGG.js → CnEpmcA-.js} +1 -1
  63. package/web/app/immutable/chunks/{CtIGR2R7.js → Cpi4W9SM.js} +1 -1
  64. package/web/app/immutable/chunks/{CGslv4Qq.js → Cqg6DAOX.js} +2 -2
  65. package/web/app/immutable/chunks/{DlrDVrrH.js → CruNSA_k.js} +1 -1
  66. package/web/app/immutable/chunks/{BkfSBkLs.js → CtDWHhd5.js} +2 -2
  67. package/web/app/immutable/chunks/{BJA4-3TS.js → CtTTJ9Pl.js} +1 -1
  68. package/web/app/immutable/chunks/{B2EqH2B9.js → Cv7maMEX.js} +1 -1
  69. package/web/app/immutable/chunks/{Dj5oY4MN.js → CvQK16ac.js} +1 -1
  70. package/web/app/immutable/chunks/{CEAKAkFK.js → CvWPR84D.js} +1 -1
  71. package/web/app/immutable/chunks/{Dkwg3iDV.js → CvjFWjQI.js} +3 -3
  72. package/web/app/immutable/chunks/{Dcuzm8gD.js → Cxdjn52l.js} +1 -1
  73. package/web/app/immutable/chunks/{p-4Usjf1.js → CzXxUwZ9.js} +1 -1
  74. package/web/app/immutable/chunks/{DVnAuhkJ.js → Czxip--U.js} +1 -1
  75. package/web/app/immutable/chunks/{Df5fc__K.js → DEU72krH.js} +2 -2
  76. package/web/app/immutable/chunks/{DqRH8mOo.js → DH-1Jck3.js} +1 -1
  77. package/web/app/immutable/chunks/{DQ0P5vIc.js → DH3NAcDJ.js} +1 -1
  78. package/web/app/immutable/chunks/{38Vg2YF4.js → DIdM8saJ.js} +2 -2
  79. package/web/app/immutable/chunks/{pf1qexdH.js → DL8v_XLP.js} +1 -1
  80. package/web/app/immutable/chunks/{QXKw7ybW.js → DOL2D_mf.js} +1 -1
  81. package/web/app/immutable/chunks/{C7cQ3lDB.js → DRYK6Su3.js} +1 -1
  82. package/web/app/immutable/chunks/{wh8BTzW1.js → DTTFQasE.js} +2 -2
  83. package/web/app/immutable/chunks/{CslzdKY2.js → DU-k_hXE.js} +1 -1
  84. package/web/app/immutable/chunks/{hrbt6TUA.js → DYguRX86.js} +1 -1
  85. package/web/app/immutable/chunks/{C89qw-SN.js → D_Eq4qPA.js} +1 -1
  86. package/web/app/immutable/chunks/{v1V9O0KC.js → D_vQVrz1.js} +1 -1
  87. package/web/app/immutable/chunks/{ChUo5Z7l.js → Dbiz8ybb.js} +1 -1
  88. package/web/app/immutable/chunks/{DpCuuI0h.js → DeQ_Nnwi.js} +1 -1
  89. package/web/app/immutable/chunks/{CUHgqEKH.js → DgL848jV.js} +1 -1
  90. package/web/app/immutable/chunks/{BwOKiDn9.js → Dgfo6hku.js} +1 -1
  91. package/web/app/immutable/chunks/{BhHscwNa.js → Dh9P66ji.js} +1 -1
  92. package/web/app/immutable/chunks/{BktdbaP2.js → Di84urxA.js} +1 -1
  93. package/web/app/immutable/chunks/{CiieGSUV.js → Dk14zZxI.js} +1 -1
  94. package/web/app/immutable/chunks/{BFU4GSWL.js → DkCny-Z-.js} +1 -1
  95. package/web/app/immutable/chunks/{BMiKKOoz.js → Dkwe3T9x.js} +1 -1
  96. package/web/app/immutable/chunks/{Bp3ZrlmO.js → DoRDI0_k.js} +1 -1
  97. package/web/app/immutable/chunks/{Ax0sJJJl.js → Drv2Rza_.js} +13 -13
  98. package/web/app/immutable/chunks/{BvWOwOTx.js → DrvBnHFf.js} +3 -3
  99. package/web/app/immutable/chunks/{JhwNDffI.js → DvmLmn-C.js} +1 -1
  100. package/web/app/immutable/chunks/{eBfEHUcb.js → Dw1ghJA6.js} +4 -4
  101. package/web/app/immutable/chunks/{CrJMkG_1.js → DxxuJILr.js} +5 -5
  102. package/web/app/immutable/chunks/{CImg9Ht4.js → F-AjnQny.js} +1 -1
  103. package/web/app/immutable/chunks/{DUxx6wT8.js → HRIwLWKn.js} +1 -1
  104. package/web/app/immutable/chunks/{Jmsfhy4p.js → HlXIpYIa.js} +1 -1
  105. package/web/app/immutable/chunks/{BD1NjrB7.js → K6lw4N0L.js} +1 -1
  106. package/web/app/immutable/chunks/{BzVtDZxE.js → KcJe_B2f.js} +1 -1
  107. package/web/app/immutable/chunks/{m6g2qs4v.js → MIFcwWBB.js} +1 -1
  108. package/web/app/immutable/chunks/{BQ9VbGlu.js → QMwjEX1-.js} +1 -1
  109. package/web/app/immutable/chunks/{BOYBHPRf.js → TLsmZI1o.js} +1 -1
  110. package/web/app/immutable/chunks/{BZ1qE3sd.js → TMWKDIeD.js} +1 -1
  111. package/web/app/immutable/chunks/{zw9aQKYl.js → TwdEefIb.js} +1 -1
  112. package/web/app/immutable/chunks/{yYvyTKgb.js → UqfcQTtt.js} +1 -1
  113. package/web/app/immutable/chunks/{CzXkTVR8.js → Y-O_IvTW.js} +1 -1
  114. package/web/app/immutable/chunks/{CWmACcmS.js → Y3tz73Wx.js} +1 -1
  115. package/web/app/immutable/chunks/{D4QkxipA.js → YjYi8jsS.js} +1 -1
  116. package/web/app/immutable/chunks/{DWG0la6r.js → bXVL0d4u.js} +1 -1
  117. package/web/app/immutable/chunks/{CgLuwxkV.js → cmJ0YuhX.js} +1 -1
  118. package/web/app/immutable/chunks/{B1Gvj9xq.js → gTlamSLB.js} +3 -3
  119. package/web/app/immutable/chunks/{DD98YGoG.js → jIe9AFY3.js} +1 -1
  120. package/web/app/immutable/chunks/{DPPrfCEc.js → mbHeC_bT.js} +1 -1
  121. package/web/app/immutable/chunks/{bB4pIooo.js → oBUj9ZOr.js} +1 -1
  122. package/web/app/immutable/chunks/{CKaMWgJQ.js → qCXYeue5.js} +1 -1
  123. package/web/app/immutable/chunks/{D23uZeQI.js → t0y-kHkY.js} +1 -1
  124. package/web/app/immutable/chunks/{B4rcpoVl.js → usXRXUNe.js} +1 -1
  125. package/web/app/immutable/chunks/{CpdAeaX0.js → vELdnnGk.js} +1 -1
  126. package/web/app/immutable/chunks/{DCq92KiG.js → w8vA4Z3z.js} +1 -1
  127. package/web/app/immutable/chunks/{CfdQaRg7.js → wVIKqVlE.js} +4 -4
  128. package/web/app/immutable/chunks/{BT9OtIDj.js → x81_VdcZ.js} +1 -1
  129. package/web/app/immutable/entry/{app.CeAiZV-v.js → app.CQjcFUvX.js} +2 -2
  130. package/web/app/immutable/entry/start.BSd130By.js +1 -0
  131. package/web/app/immutable/nodes/{0.D2I9SFzE.js → 0.BZ6BuxeE.js} +1 -1
  132. package/web/app/immutable/nodes/{1.CHeML-3-.js → 1.DxAIVMOr.js} +1 -1
  133. package/web/app/immutable/nodes/{10.CPMi8QX9.js → 10.UdD3v_c2.js} +4 -4
  134. package/web/app/immutable/nodes/{11.DOD-sh-z.js → 11.DFg9W_ST.js} +1 -1
  135. package/web/app/immutable/nodes/{15.BXDyjjHm.js → 15.7ofOw_b1.js} +1 -1
  136. package/web/app/immutable/nodes/{19.BEUhM4Xw.js → 19.C7CCQoBf.js} +2 -2
  137. package/web/app/immutable/nodes/{2.CeC42N_5.js → 2.DuqlsYHB.js} +4 -4
  138. package/web/app/immutable/nodes/{3.-_yjscmj.js → 3.DRC75TZt.js} +1 -1
  139. package/web/app/immutable/nodes/{4.CdQdgUhv.js → 4.DKVGzRd0.js} +1 -1
  140. package/web/app/immutable/nodes/{5.jUP9W-D7.js → 5.DY0hRGuv.js} +1 -1
  141. package/web/app/immutable/nodes/{6.B0WnMraI.js → 6.TN7w_X2Z.js} +1 -1
  142. package/web/app/immutable/nodes/{7.DAEOmrZS.js → 7.swMVj6u3.js} +1 -1
  143. package/web/app/immutable/nodes/{8.D1Q1AivC.js → 8.DlrgL_9b.js} +1 -1
  144. package/web/app/immutable/nodes/{9.C5Qv23W5.js → 9.CSFgmDLj.js} +4 -4
  145. package/web/app/version.json +1 -1
  146. package/web/index.html +9 -9
  147. package/web/app/immutable/entry/start.DrVPJx5Z.js +0 -1
@@ -1,4 +1,4 @@
1
- import{k as qa,s as fa}from"./DqRH8mOo.js";import{p as ma,g as Ct,I as Wa,X as Ka,e as Nn}from"./B6S6VNu7.js";import{aB as Qa,cW as Ga,A as Va,a_ as xn,bZ as Xa,v as Ya}from"./CzXkTVR8.js";import{bm as c,t as Pt,bo as w,bw as Tt,b as Rt,bq as qn,bs as Re,br as Ja}from"./C0QTy0Sy.js";import{bo as Wn,bs as Ot,a5 as O,bl as U,bS as b,bA as $,b_ as x,aD as e,W as l,ay as H,a7 as Oe,bO as L,bn as Lt,c9 as u,aA as k,aB as _,ca as ze,bH as h,b$ as Kt,bV as le,cd as Mt,br as va,be as un,c5 as Za,bi as En,bj as er,bf as hn,am as ta,ax as na,ai as tr,aj as nr,c0 as ar}from"./3SdAC2_C.js";import{i as M}from"./bhKPSdq4.js";import{t as _a}from"./CrD0jtXE.js";import{e as rr}from"./BFEzojY2.js";import{s as q,g as en,f as ve,b as sr}from"./7UPrdiE9.js";import{a as or,n as ha}from"./DLwWVKiF.js";import{r as ir,o as lr,A as aa,L as dr}from"./BDgY7Zd8.js";import{t as Dn}from"./DAsc1V4f.js";import{R as ra}from"./BmTMWrby.js";import{I as ba}from"./BAKPnd3w.js";import"./A9niI_uA.js";import{aO as wn,cN as ur,ax as cr,aM as pr,cH as gr,cI as fr,as as mr,au as vr,aC as _r,aI as hr,s as br,O as wr,e8 as kr,X as xr,cy as yr,c4 as $r}from"./BaujsV9k.js";import{Jv as J,cp as zn,cn as wa,cq as kn,ru as Ar,DU as Sr,fU as ka,DZ as Ir,bE as Cr,A3 as Pr,mO as sa,uq as Tr,ct as Rr,u$ as oa,nK as Or,DE as Lr,DX as Nr,cb as Er}from"./tr-2J8Mf.js";import{A as Dr,b as Mr}from"./BYq9VtBF.js";import{y as Fr}from"./Bqd7fdCF.js";import{l as zr}from"./BcpfdNy8.js";import{f as ia}from"./B4rcpoVl.js";import{h as Br,g as jr}from"./DA5opfEp.js";import{o as Hr,S as Ur}from"./D6J72aTz.js";import"./CJ4Z96pe.js";import{ae as qr,ah as Wr,f as Mn,a1 as Kr}from"./FzlZUztb.js";import{h as Qr,F as la}from"./DCRuihKm.js";import"./lJeex2Gh.js";import{C as Gr,k as Vr,j as Xr,i as Yr}from"./fiz8N_zQ.js";import{L as Jr}from"./CmrjfWYI.js";import{c as de}from"./CUkDMZwP.js";import{c as Bn,b as da,d as jn,a as Hn,A as xa}from"./BhHscwNa.js";import{l as Wt,b as Zr}from"./CE7dsja4.js";import{F as es,bc as ts}from"./BCo0L43p.js";import{D as ns}from"./C4JbSg3f.js";import{b as as}from"./No1eCFy3.js";import{T as rs}from"./CRZZ_hOy.js";import"./BWYuMy_r.js";import{cl as ya,cP as ss,cO as os,bR as is,M as ls,F as yn,b5 as ds,au as us,aK as cs,aG as ps,cT as gs,be as fs,aA as ms,aL as vs,b1 as _s,ah as ua,a8 as hs,c6 as bs,ag as ws,cF as ks,an as xs,cS as ys,aD as $s}from"./U9jJmfYa.js";import{b as As}from"./Dn334wJv.js";import"./QeBH-DWE.js";import{S as bn}from"./tZyAiGvb.js";import{E as Ss}from"./c5QZsH9t.js";import"./Bsh6nUhU.js";import{f as Is}from"./DvUGkiYP.js";import{P as Cs}from"./D51XIZYq.js";import{b as Ps,P as Ts}from"./BP5uGGO_.js";import{h as Rs,H as Os,g as Ls}from"./eElW3aeh.js";const Ns=80,Es=10,Ds=new Qa(Ga,{renderer:{html({text:a}){return Va(a)},image({tokens:a}){return this.parser.parseInline(a)}}});function Kn(a){const n=document.createElement("template");n.innerHTML=Ds.parseInline(a,{async:!1});for(const o of n.content.querySelectorAll("br"))o.replaceWith(" ");return(n.content.textContent??"").replace(/\s+/g," ").trim()}function Ft(a){return a.replace(/!\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/\[([^\]]+)\]\([^)]*\)/g,"$1").replace(/`+([^`]*?)`+/g,"$1").replace(/<[^>]+>/g,"").replace(/\\([\\`*_[\]{}()#+\-.!>])/g,"$1").replace(/[*~]/g,"").replace(/(^|[^A-Za-z0-9])_+/g,"$1").replace(/_+([^A-Za-z0-9]|$)/g,"$1").replace(/\s+/g," ").trim()}function Un(a,n){return a.slice(n).replace(/^(?:[ \t]*(?:\r\n|\n|\r))+/,"")}function Sn(a,n){return!n||n.length>Ns||n.split(/\s+/).length>Es||/[.!?;]$/.test(n)?!1:!/^[ \t]*(?:[-+*][ \t]+|\d+[.)][ \t]+|>|```|~~~|\|)/.test(a)}function tl(a){const o=a.trim().match(/^\*\*([^\r\n]+)\*\*$/);if(!o)return null;const i=Ft(o[1]);return Sn(o[0],i)?i:null}function Qn(a,n=!1,o=!0){const i=a.match(/^(?:[ \t]*(?:\r\n|\n|\r))*/)?.[0]??"",r=a.slice(i.length).match(/^\*\*([^\r\n]+)\*\*[ \t]*(?:(?:\r\n|\n|\r)|$)/);if(!r)return null;if(n){const v=r[1],f=v.match(/\\+$/)?.[0].length??0;if(v!==v.trim()||v.includes("**")||v.startsWith("*")||v.endsWith("*")||f%2!==0)return null}const p=Ft(r[1]);return Sn(r[0],p)?{title:n&&o?Kn(r[1]):p,body:Un(a,i.length+r[0].length)}:null}function ca(a){const n=[];let o=a;for(;o.trim();){const i=Gn(o,!0),d=i.heading?{body:i.body}:Qn(o,!0,!1);if(!d)return null;n.push(o.slice(0,o.length-d.body.length)),o=d.body}return n.length?n:null}function nl(a){const n=[];let o=a;for(;o.trim();){const i=Gn(o,!0,Kn),d=i.heading?{title:i.heading,body:i.body}:Qn(o,!0);if(!d)return null;n.push(d.title),o=d.body}return n.length?n:null}function al(a){const n=Fs(a),o=[];let i=a;for(n.heading&&(o.push({title:n.heading,body:""}),i=n.body);i;){const d=Qn(i);if(!d||d.body.length>=i.length)break;o.push({title:d.title,body:""}),i=d.body}if(o.length===0){const d=a.trim(),r=Ft(d);return!d.includes(`
1
+ import{k as qa,s as fa}from"./DH-1Jck3.js";import{p as ma,g as Ct,I as Wa,X as Ka,e as Nn}from"./B6S6VNu7.js";import{aB as Qa,cW as Ga,A as Va,a_ as xn,bZ as Xa,v as Ya}from"./Y-O_IvTW.js";import{bm as c,t as Pt,bo as w,bw as Tt,b as Rt,bq as qn,bs as Re,br as Ja}from"./C0QTy0Sy.js";import{bo as Wn,bs as Ot,a5 as O,bl as U,bS as b,bA as $,b_ as x,aD as e,W as l,ay as H,a7 as Oe,bO as L,bn as Lt,c9 as u,aA as k,aB as _,ca as ze,bH as h,b$ as Kt,bV as le,cd as Mt,br as va,be as un,c5 as Za,bi as En,bj as er,bf as hn,am as ta,ax as na,ai as tr,aj as nr,c0 as ar}from"./3SdAC2_C.js";import{i as M}from"./bhKPSdq4.js";import{t as _a}from"./CrD0jtXE.js";import{e as rr}from"./BFEzojY2.js";import{s as q,g as en,f as ve,b as sr}from"./7UPrdiE9.js";import{a as or,n as ha}from"./DLwWVKiF.js";import{r as ir,o as lr,A as aa,L as dr}from"./B1PlU8Mp.js";import{t as Dn}from"./DAsc1V4f.js";import{R as ra}from"./BmTMWrby.js";import{I as ba}from"./BAKPnd3w.js";import"./A9niI_uA.js";import{aO as wn,cN as ur,ax as cr,aM as pr,cH as gr,cI as fr,as as mr,au as vr,aC as _r,aI as hr,s as br,O as wr,e8 as kr,X as xr,cy as yr,c4 as $r}from"./BaujsV9k.js";import{Jv as J,cp as zn,cn as wa,cq as kn,ru as Ar,DU as Sr,fU as ka,DZ as Ir,bE as Cr,A3 as Pr,mO as sa,uq as Tr,ct as Rr,u$ as oa,nK as Or,DE as Lr,DX as Nr,cb as Er}from"./tr-2J8Mf.js";import{A as Dr,b as Mr}from"./BYq9VtBF.js";import{y as Fr}from"./Bqd7fdCF.js";import{l as zr}from"./BcpfdNy8.js";import{f as ia}from"./usXRXUNe.js";import{h as Br,g as jr}from"./DA5opfEp.js";import{o as Hr,S as Ur}from"./BIsvX0dB.js";import"./CJ4Z96pe.js";import{ae as qr,ah as Wr,f as Mn,a1 as Kr}from"./FzlZUztb.js";import{h as Qr,F as la}from"./DCRuihKm.js";import"./lJeex2Gh.js";import{C as Gr,k as Vr,j as Xr,i as Yr}from"./fiz8N_zQ.js";import{L as Jr}from"./CmrjfWYI.js";import{c as de}from"./CUkDMZwP.js";import{c as Bn,b as da,d as jn,a as Hn,A as xa}from"./Dh9P66ji.js";import{l as Wt,b as Zr}from"./CE7dsja4.js";import{F as es,bc as ts}from"./CPr4uSCV.js";import{D as ns}from"./C4JbSg3f.js";import{b as as}from"./No1eCFy3.js";import{T as rs}from"./CRZZ_hOy.js";import"./BWYuMy_r.js";import{cl as ya,cP as ss,cO as os,bR as is,M as ls,F as yn,b5 as ds,au as us,aK as cs,aG as ps,cT as gs,be as fs,aA as ms,aL as vs,b1 as _s,ah as ua,a8 as hs,c6 as bs,ag as ws,cF as ks,an as xs,cS as ys,aD as $s}from"./U9jJmfYa.js";import{b as As}from"./Dn334wJv.js";import"./QeBH-DWE.js";import{S as bn}from"./tZyAiGvb.js";import{E as Ss}from"./c5QZsH9t.js";import"./Bsh6nUhU.js";import{f as Is}from"./DvUGkiYP.js";import{P as Cs}from"./D51XIZYq.js";import{b as Ps,P as Ts}from"./BP5uGGO_.js";import{h as Rs,H as Os,g as Ls}from"./eElW3aeh.js";const Ns=80,Es=10,Ds=new Qa(Ga,{renderer:{html({text:a}){return Va(a)},image({tokens:a}){return this.parser.parseInline(a)}}});function Kn(a){const n=document.createElement("template");n.innerHTML=Ds.parseInline(a,{async:!1});for(const o of n.content.querySelectorAll("br"))o.replaceWith(" ");return(n.content.textContent??"").replace(/\s+/g," ").trim()}function Ft(a){return a.replace(/!\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/\[([^\]]+)\]\([^)]*\)/g,"$1").replace(/`+([^`]*?)`+/g,"$1").replace(/<[^>]+>/g,"").replace(/\\([\\`*_[\]{}()#+\-.!>])/g,"$1").replace(/[*~]/g,"").replace(/(^|[^A-Za-z0-9])_+/g,"$1").replace(/_+([^A-Za-z0-9]|$)/g,"$1").replace(/\s+/g," ").trim()}function Un(a,n){return a.slice(n).replace(/^(?:[ \t]*(?:\r\n|\n|\r))+/,"")}function Sn(a,n){return!n||n.length>Ns||n.split(/\s+/).length>Es||/[.!?;]$/.test(n)?!1:!/^[ \t]*(?:[-+*][ \t]+|\d+[.)][ \t]+|>|```|~~~|\|)/.test(a)}function tl(a){const o=a.trim().match(/^\*\*([^\r\n]+)\*\*$/);if(!o)return null;const i=Ft(o[1]);return Sn(o[0],i)?i:null}function Qn(a,n=!1,o=!0){const i=a.match(/^(?:[ \t]*(?:\r\n|\n|\r))*/)?.[0]??"",r=a.slice(i.length).match(/^\*\*([^\r\n]+)\*\*[ \t]*(?:(?:\r\n|\n|\r)|$)/);if(!r)return null;if(n){const v=r[1],f=v.match(/\\+$/)?.[0].length??0;if(v!==v.trim()||v.includes("**")||v.startsWith("*")||v.endsWith("*")||f%2!==0)return null}const p=Ft(r[1]);return Sn(r[0],p)?{title:n&&o?Kn(r[1]):p,body:Un(a,i.length+r[0].length)}:null}function ca(a){const n=[];let o=a;for(;o.trim();){const i=Gn(o,!0),d=i.heading?{body:i.body}:Qn(o,!0,!1);if(!d)return null;n.push(o.slice(0,o.length-d.body.length)),o=d.body}return n.length?n:null}function nl(a){const n=[];let o=a;for(;o.trim();){const i=Gn(o,!0,Kn),d=i.heading?{title:i.heading,body:i.body}:Qn(o,!0);if(!d)return null;n.push(d.title),o=d.body}return n.length?n:null}function al(a){const n=Fs(a),o=[];let i=a;for(n.heading&&(o.push({title:n.heading,body:""}),i=n.body);i;){const d=Qn(i);if(!d||d.body.length>=i.length)break;o.push({title:d.title,body:""}),i=d.body}if(o.length===0){const d=a.trim(),r=Ft(d);return!d.includes(`
2
2
  `)&&Sn(d,r)?[{title:r,body:""}]:d?[{title:null,body:d}]:[]}return o[o.length-1].body=i.trim(),o}function Ms(a){const n=a.replace(/^ {0,3}/,"");return!/^(?:\s|>|`{3}|~{3}|(?:[-+*]|\d+[.)])(?:[ \t]|$)|#{1,6}(?:[ \t]|$)|<|\[[^\]]*\]:)/.test(n)&&!/^(?:(?:\*[ \t]*){3,}|(?:_[ \t]*){3,}|(?:-[ \t]*){3,})$/.test(n)}function Gn(a,n=!1,o=Ft){const i=a.match(/^(?:\uFEFF)?(?:[ \t]*(?:\r\n|\n|\r))*/)?.[0]??"",d=a.slice(i.length);if(n&&/^(?: {4}| {0,3}\t)/.test(d))return{heading:null,body:a};const r=d.match(/^[ \t]{0,3}#{1,6}[ \t]+([^\r\n]*?)(?:[ \t]+#+)?[ \t]*(?:\r\n|\n|\r|$)/);if(r&&Ft(r[1]))return{heading:o(r[1]),body:Un(a,i.length+r[0].length)};const p=d.match(/^([^\r\n]+)(?:\r\n|\n|\r)([ \t]{0,3})(?:=+|-+)[ \t]*(?:\r\n|\n|\r|$)/);return p&&(!n||Ms(p[1])&&!p[2].includes(" "))&&Ft(p[1])?{heading:o(p[1]),body:Un(a,i.length+p[0].length)}:{heading:null,body:a}}function Fs(a,{preserveInlineText:n=!1}={}){const o=n?Kn:Ft,i=Gn(a,!1,o);if(i.heading)return i;const d=a.match(/^(?:\uFEFF)?(?:[ \t]*(?:\r\n|\n|\r))*/)?.[0]??"",p=a.slice(d.length).match(/^([^\r\n]+)(?:\r\n|\n|\r)(?:[ \t]*(?:\r\n|\n|\r))+/);if(p){const v=Ft(p[1]),f=a.slice(d.length+p[0].length);if(f.trim()&&Sn(p[1],v))return{heading:o(p[1]),body:f}}return{heading:null,body:a}}const Qt="[--operational-row-inline-padding:var(--chat-operational-row-inline-padding,0.5rem)] [--operational-leading-slot-size:1.25rem] [--operational-leading-half-slot-size:0.625rem] [--operational-leading-gap:var(--chat-operational-leading-gap,0.5rem)]",rl="type-body font-family-child font-normal text-muted-foreground",sl=`${Qt} min-w-0 max-w-full pl-[calc(var(--operational-row-inline-padding)+var(--operational-leading-slot-size)+var(--operational-leading-gap))]`,ol=`${Qt} min-w-0 max-w-full pl-[calc(var(--operational-row-inline-padding)+var(--operational-leading-slot-size)+var(--operational-leading-gap))] pt-1.5`,il=`${Qt} min-w-0 max-w-full pl-[calc(var(--operational-row-inline-padding)+var(--operational-leading-slot-size)+var(--operational-leading-gap))] pt-1`,ll=`${Qt} relative min-w-0 max-w-full`,dl=`${Qt} min-w-0 max-w-full pl-[calc(var(--operational-row-inline-padding)+var(--operational-leading-slot-size)+var(--operational-leading-gap))]`,ul=`${Qt} operational-group-child-row ml-2 min-w-0 w-[calc(100%-0.5rem)] max-w-[calc(100%-0.5rem)]`,cl="pt-6",pl="text-muted-foreground",gl="text-muted-foreground",$a="font-normal text-muted-foreground",fl="tool-call-container group relative block w-full min-w-0 max-w-full overflow-hidden type-body font-family-child font-normal text-muted-foreground",ml="h-[16px]! w-[16px]! shrink-0",vl=`${Qt} relative grid h-7 w-full min-w-0 max-w-full grid-cols-[var(--operational-leading-slot-size)_minmax(0,1fr)_auto] items-center gap-[var(--operational-leading-gap)] overflow-hidden rounded-md px-[var(--operational-row-inline-padding)] type-body transition-colors duration-[var(--motion-fast)] motion-reduce:transition-none`,_l=`a11y-ignore pointer-events-none flex size-[var(--operational-leading-slot-size)] min-w-[var(--operational-leading-slot-size)] shrink-0 items-center justify-center [&_svg]:size-[16px]! ${$a}`,hl=`type-body block min-w-0 max-w-full truncate overflow-hidden text-ellipsis whitespace-nowrap border-0 bg-transparent p-0 text-left ${$a}`,bl="type-body flex min-w-0 shrink-0 items-center gap-1 whitespace-nowrap",wl="h-[16px]! w-[16px]! shrink-0 opacity-60 transition-transform duration-[var(--motion-fast)] motion-reduce:transition-none";function kl(a){return qa(a,{axis:"y",duration:ma()?0:150})}function cn(a){return a.type==="thinking"||a.type==="tool_use"||a.type==="content_group"}function xl(a){const n=a?.[0];return!n||cn(n)?"":"pt-4"}function yl(a,n,o=()=>!0){const i=a[n];if(!i||!o(i)||!cn(i))return!1;let d=n-1;for(;d>=0&&!o(a[d]);)d-=1;return d>=0&&cn(a[d])}function $l(a,n,o=()=>!0,i=!1){const d=a[n];if(!d||!o(d))return"";let r=n-1;for(;r>=0&&!o(a[r]);)r-=1;if(r<0)return"";const p=a[r];if(p.type==="thinking"&&d.type==="thinking")return i||ca(p.text??p.content??"")!==null&&ca(d.text??d.content??"")!==null?"":"pt-14";const v=cn(p),f=cn(d);return v&&f?"":p.type==="thinking"&&!f?"pt-6":v||f?"pt-4":"pt-1"}const Al="shrink-0 whitespace-nowrap text-ui text-subtle focus-visible:outline-none focus-visible:text-foreground";function zs(a){if(a?.status==="halted")return c.agent_node_halted_label();if(a?.status==="resuming")return c.agent_node_resuming_label();if(a?.placement?.target==="remote"||Fr(a?.placement?.target)){if(a.placementError)return c.remoteAgent_status_failed();if(a.cloudStart)return c.remoteAgent_status_starting();if(a.effectiveIsolation==="pending")return a.setup?.state==="pending"?c.remoteAgent_status_preparingCheckout():a.setup?.state==="running"?c.remoteAgent_status_runningSetup():c.remoteAgent_status_starting()}if(a?.placement&&a.effectiveIsolation==="pending")return c.agent_node_provisioning_label()}var Bs=_('<span class="owner-fill block h-full svelte-sxf8s9"></span>'),js=_('<span class="shrink-0 text-xs text-muted-foreground"> </span>'),Hs=_('<span class="flex items-center gap-2"><span class="group-key size-1.5 shrink-0 rounded-full svelte-sxf8s9"></span> <span class="min-w-0 flex-1"> </span> <!> <span> </span></span>'),Us=_('<dd class="col-span-2 pl-[1.125rem] text-xs text-muted-foreground wrap-anywhere"> </dd>'),qs=_(`<div class="grid grid-cols-[1fr_auto] items-baseline gap-x-3 py-0.5 text-sm"><dt class="relative min-w-0 pl-[1.125rem] wrap-anywhere before:absolute before:top-2 before:left-0 before:size-1 before:rounded-full before:bg-muted-foreground before:content-['']"> </dt> <dd> </dd> <!></div>`),Ws=_('<dl class="ml-3.5 text-foreground"></dl>'),Fn=_("<!> <!>",1),Ks=_('<span class="flex items-center gap-2"><span class="min-w-0 flex-1"> </span> <span class="shrink-0 tabular-nums text-muted-foreground"> </span></span>'),Qs=_('<div class="min-w-0"><dt class="truncate text-sm text-foreground"> </dt> <dd class="text-xs text-muted-foreground wrap-anywhere"> </dd></div>'),Gs=_('<dl class="ml-3.5 flex flex-col gap-2"></dl>'),Vs=_('<section class="min-w-0" data-testid="prompt-breakdown"><div class="mb-3 flex items-baseline justify-between gap-3"><h3 class="text-sm font-medium"> </h3> <span class="shrink-0 text-sm tabular-nums text-muted-foreground"> </span></div> <div class="owner-strip mb-2 flex h-1.5 w-full overflow-hidden svelte-sxf8s9" role="img"></div> <!></section>');function Aa(a,n){const o=Wn();if(new.target)return Pt({component:Aa,...a});Ot(n,!0);let i=w(n,"breakdown",7);const d="type-body font-normal text-foreground data-[state=open]:font-normal";function r(T){return Zr(T,{maximumFractionDigits:T<1e4?1:0})}function p(T){return T==="native"?c.agent_contextBreakdown_owner_native_label():T==="intent"?c.agent_contextBreakdown_owner_intent_label():c.agent_contextBreakdown_owner_user_label()}const v=u(()=>i().owners.map(T=>c.agent_contextBreakdown_ownerShare_label({owner:p(T.owner),tokens:r(T.estTokens)})).join(", "));var f={get breakdown(){return i()},set breakdown(T){i(T),k()},$set:Tt,$on:(T,m)=>Rt(n,T,m)},S=Vs(),y=O(S),g=O(y),E=U(g,!0),F=b(g,2),Ce=U(F,!0);$(y);var D=b(y,2);Ct(D,21,()=>i().owners,T=>T.owner,(T,m)=>{var me=Bs();let ue;x(()=>{q(me,"data-owner",e(m).owner),ue=en(me,"",ue,{"flex-grow":e(m).share})}),l(T,me)}),$(D);var P=b(D,2);return de(P,()=>xa,(T,m)=>{m(T,{type:"multiple",children:(me,ue)=>{var R=Fn(),_e=H(R);Ct(_e,17,()=>i().groups,pe=>pe.kind,(pe,G)=>{var W=Oe(),ne=H(W);de(ne,()=>Bn,(ge,Fe)=>{Fe(ge,{get value(){return e(G).kind},get"data-prompt-group"(){return e(G).kind},children:(ot,Q)=>{var I=Fn(),ae=H(I);de(ae,()=>da,(he,N)=>{N(he,{level:4,children:(Le,Y)=>{var K=Oe(),Z=H(K);de(Z,()=>jn,(V,oe)=>{oe(V,{inset:!1,class:d,children:(ee,Ne)=>{var be=Hs(),je=O(be),et=b(je,2),ut=U(et,!0),tt=b(et,2);{var at=ct=>{var Nt=js(),yt=U(Nt,!0);x(X=>L(yt,X),[()=>c.agent_contextBreakdown_notCounted_label()]),l(ct,Nt)};M(tt,ct=>{e(G).kind==="native"&&ct(at)})}var Ee=b(tt,2),Gt=U(Ee,!0);$(be),x((ct,Nt)=>{q(je,"data-kind",e(G).kind),L(ut,ct),ve(Ee,1,`shrink-0 tabular-nums ${e(G).kind==="native"?"text-muted-foreground":""}`),L(Gt,Nt)},[()=>p(e(G).kind),()=>r(e(G).estTokens)]),l(ee,be)},$$slots:{default:!0}})}),l(Le,K)},$$slots:{default:!0}})});var Be=b(ae,2);de(Be,()=>Hn,(he,N)=>{N(he,{inset:!1,children:(Le,Y)=>{var K=Ws();Ct(K,21,()=>e(G).rows,Z=>Z.key,(Z,V)=>{var oe=qs(),ee=O(oe),Ne=U(ee,!0),be=b(ee,2),je=U(be,!0),et=b(be,2);{var ut=tt=>{var at=Us(),Ee=U(at,!0);x(()=>L(Ee,e(V).hint)),l(tt,at)};M(et,tt=>{e(V).hint&&tt(ut)})}$(oe),x(tt=>{L(Ne,e(V).label),ve(be,1,`tabular-nums ${e(V).counted?"":"text-muted-foreground"}`),L(je,tt)},[()=>r(e(V).estTokens)]),l(Z,oe)}),$(K),l(Le,K)},$$slots:{default:!0}})}),l(ot,I)},$$slots:{default:!0}})}),l(pe,W)});var ce=b(_e,2);{var xe=pe=>{var G=Oe(),W=H(G);de(W,()=>Bn,(ne,ge)=>{ge(ne,{value:"hidden-skills",class:"mt-1",children:(Fe,ot)=>{var Q=Fn(),I=H(Q);de(I,()=>da,(Be,he)=>{he(Be,{level:4,children:(N,Le)=>{var Y=Oe(),K=H(Y);de(K,()=>jn,(Z,V)=>{V(Z,{inset:!1,class:d,children:(oe,ee)=>{var Ne=Ks(),be=O(Ne),je=U(be,!0),et=b(be,2),ut=U(et,!0);$(Ne),x((tt,at)=>{L(je,tt),L(ut,at)},[()=>c.agent_contextBreakdown_hiddenSkills_title(),()=>Wt(i().hiddenSkills.length)]),l(oe,Ne)},$$slots:{default:!0}})}),l(N,Y)},$$slots:{default:!0}})});var ae=b(I,2);de(ae,()=>Hn,(Be,he)=>{he(Be,{inset:!1,children:(N,Le)=>{var Y=Gs();Ct(Y,21,()=>i().hiddenSkills,K=>K.name,(K,Z)=>{var V=Qs(),oe=O(V),ee=U(oe,!0),Ne=b(oe,2),be=U(Ne,!0);$(V),x(je=>{L(ee,e(Z).name),L(be,je)},[()=>[e(Z).detail,e(Z).fix].filter(Boolean).join(" · ")]),l(K,V)}),$(Y),l(N,Y)},$$slots:{default:!0}})}),l(Fe,Q)},$$slots:{default:!0}})}),l(pe,G)};M(ce,pe=>{i().hiddenSkills.length>0&&pe(xe)})}l(me,R)},$$slots:{default:!0}})}),$(S),x((T,m)=>{q(S,"aria-labelledby",`${o}-title`),q(g,"id",`${o}-title`),L(E,T),L(Ce,m),q(D,"aria-label",e(v))},[()=>c.agent_contextBreakdown_title(),()=>c.agent_contextBreakdown_tokens_label({tokens:r(i().estTokens)})]),l(a,S),Lt(f)}const Xs=["intent","user"],Ys=["systemPrompt","toolDescription","provider"],Js=["native","user","intent"],$n=a=>typeof a=="object"&&a!==null&&!Array.isArray(a),An=a=>typeof a=="number"&&Number.isFinite(a)&&a>=0,Zs=a=>a==="intent"||a==="user";function eo(a,n){if(!$n(a))return null;const{id:o,label:i,owner:d,location:r,chars:p,estTokens:v,controlHint:f}=a;if(typeof o!="string"||typeof i!="string"||!Zs(d)||typeof r!="string"||!Ys.includes(r)||!An(p)||!An(v))return null;const S=$n(f)&&typeof f.text=="string"&&f.text;return{key:`${n}:${o}`,id:o,label:i,owner:d,chars:p,estTokens:v,counted:r!=="provider",...S?{hint:S}:{}}}function to(a){if(!$n(a))return null;const{name:n,reason:o,detail:i,fix:d}=a;return[n,o,i,d].some(r=>typeof r!="string")?null:{name:n,reason:o,detail:i,fix:d}}function no(a){if(!$n(a)||a.available!==!0)return null;const{totalChars:n,estTokens:o,sections:i,hiddenSkills:d}=a;if(!An(n)||!An(o)||!Array.isArray(i)||!Array.isArray(d))return null;const r=i.map(eo).filter(f=>f!==null).sort((f,S)=>S.chars-f.chars),p=Xs.map(f=>{const S=r.filter(g=>g.counted&&g.owner===f),y=S.reduce((g,E)=>g+E.chars,0);return{owner:f,chars:y,estTokens:S.reduce((g,E)=>g+E.estTokens,0),share:n>0?y/n:0}}).filter(f=>f.chars>0),v=Js.map(f=>{const S=r.filter(y=>f==="native"?!y.counted:y.counted&&y.owner===f);return{kind:f,chars:S.reduce((y,g)=>y+g.chars,0),estTokens:S.reduce((y,g)=>y+g.estTokens,0),rows:S}}).filter(f=>f.rows.length>0);return{totalChars:n,estTokens:o,rows:r,groups:v,owners:p,hiddenSkills:d.map(to).filter(f=>f!==null)}}async function ao(a){try{const n=await Qr("agent.getSession",{agentId:a});return no(n?.session?.promptBreakdown)}catch{return null}}const pa=es.map(a=>({key:a.path.replace(/^agentFeatures\./,""),label:a.label,description:a.description}));function ro(a){const n=a.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[_-]+/g," ").toLowerCase().trim();return n.charAt(0).toUpperCase()+n.slice(1)}function so(a){const n=a??{},o=pa.map(r=>({key:r.key,label:r.label(),description:r.description(),enabled:n[r.key]===!0,known:!0})),i=new Set(pa.map(r=>r.key)),d=[];for(const[r,p]of Object.entries(n))i.has(r)||d.push({key:r,label:ro(r),description:null,enabled:p===!0,known:!1});return d.sort((r,p)=>r.label.localeCompare(p.label)),o.concat(d)}var oo=_('<div class="mb-6 border-b border-border pb-6"><!></div>'),io=_("<span> </span>"),lo=_('<!> <span class="sr-only"> </span>',1),uo=_('<div role="listitem" class="text-xs text-subtle" aria-hidden="true">—</div>'),co=_('<section class="min-w-0"><h4 class="text-sm font-medium mb-3"> </h4> <div role="list" class="space-y-2"></div></section>'),po=_('<div class="@container"><!> <section><h3 class="text-sm font-medium"> </h3> <p class="mb-4 mt-1 text-sm text-muted-foreground"> </p> <div class="grid grid-cols-1 gap-6 @min-[28rem]:grid-cols-2" data-testid="harness-features-list"></div></section></div>');function Sa(a,n){const o=Wn();if(new.target)return Pt({component:Sa,...a});Ot(n,!0);let i=w(n,"open",15,!1),d=w(n,"static",7,!1),r=w(n,"version",7),p=w(n,"features",7,null),v=w(n,"agentId",7),f=w(n,"breakdown",7),S=le(null);const y=u(()=>f()===void 0&&!!v());ze(()=>{if(!i()||!e(y)||!v())return;const D=v();let P=!0;return ao(D).then(T=>{P&&h(S,{agentId:D,view:T},!0)}),()=>{P=!1}});const g=u(()=>f()!==void 0?f():e(y)&&e(S)&&e(S).agentId===v()?e(S).view:null),E=u(()=>so(p())),F=u(()=>[{enabled:!0,label:c.chat_shared_valueOn_label(),rows:e(E).filter(D=>D.enabled)},{enabled:!1,label:c.chat_shared_valueOff_label(),rows:e(E).filter(D=>!D.enabled)}]);var Ce={get open(){return i()},set open(D=!1){i(D),k()},get static(){return d()},set static(D=!1){d(D),k()},get version(){return r()},set version(D){r(D),k()},get features(){return p()},set features(D=null){p(D),k()},get agentId(){return v()},set agentId(D){v(D),k()},get breakdown(){return f()},set breakdown(D){f(D),k()},$set:Tt,$on:(D,P)=>Rt(n,D,P)};{let D=u(()=>c.chat_harnessFeaturesModal_title({version:r()}));Gr(a,{get static(){return d()},get title(){return e(D)},size:"wide",get open(){return i()},set open(P){i(P)},children:(P,T)=>{var m=po(),me=O(m);{var ue=W=>{var ne=oo(),ge=O(ne);Aa(ge,{get breakdown(){return e(g)}}),$(ne),l(W,ne)};M(me,W=>{e(g)&&W(ue)})}var R=b(me,2),_e=O(R),ce=U(_e,!0),xe=b(_e,2),pe=U(xe,!0),G=b(xe,2);Ct(G,21,()=>e(F),W=>W.enabled,(W,ne)=>{var ge=co(),Fe=O(ge),ot=U(Fe,!0),Q=b(Fe,2);Ct(Q,21,()=>e(ne).rows,I=>I.key,(I,ae)=>{Jr(I,{role:"listitem",class:"min-h-0 px-0 py-0 [&_.truncate]:whitespace-normal","data-testid":"harness-feature-state",get"data-feature"(){return e(ae).key},get"data-enabled"(){return e(ae).enabled},title:he=>{var N=Oe(),Le=H(N);{var Y=Z=>{var V=lo(),oe=H(V);qr(oe,{get content(){return e(ae).description},side:"top",size:"sm",children:(be,je)=>{var et=io(),ut=U(et,!0);x(()=>L(ut,e(ae).label)),l(be,et)},$$slots:{default:!0}});var ee=b(oe,2),Ne=U(ee,!0);x(()=>L(Ne,e(ae).description)),l(Z,V)},K=Z=>{var V=Kt();x(()=>L(V,e(ae).label)),l(Z,V)};M(Le,Z=>{e(ae).description?Z(Y):Z(K,-1)})}l(he,N)},$$slots:{title:!0}})},I=>{var ae=uo();l(I,ae)}),$(Q),$(ge),x(()=>{q(ge,"aria-label",e(ne).label),L(ot,e(ne).label)}),l(W,ge)}),$(G),$(R),$(m),x((W,ne)=>{q(R,"aria-labelledby",`${o}-capabilities`),q(_e,"id",`${o}-capabilities`),L(ce,W),L(pe,ne)},[()=>c.chat_harnessFeaturesModal_capabilities_title(),()=>c.chat_harnessFeaturesModal_description()]),l(P,m)},$$slots:{default:!0}})}return Lt(Ce)}var go=_('<p role="alert" class="type-body text-danger"> </p>');function Ia(a,n){if(new.target)return Pt({component:Ia,...a});Ot(n,!0);const o=()=>Re(g,"$outcome$",i),[i,d]=qn();let r=w(n,"open",15,!1),p=w(n,"agentName",7),v=w(n,"workspaceId",7),f=w(n,"agentId",7);const S=crypto.randomUUID(),y=Mt(""),g=xn(y,S),E=u(()=>o()?.workspaceId===v()&&o().agentId===f()?o():void 0),F=u(()=>e(E)?.status==="pending"),Ce=u(()=>e(E)?.status==="failed"?e(E).error:"");ze(()=>{const m=v();return f(),y.set(m),()=>J.dispatch(zn(m,S))}),ze(()=>{e(E)?.status==="succeeded"&&(r(!1),J.dispatch(wa(v(),S,e(E).requestId)))});function D(){const m=xn.select(J.state,v(),S);m?.agentId===f()&&m.status==="pending"||J.dispatch(kn(v(),S,crypto.randomUUID(),f(),{kind:"retire"}))}var P={get open(){return r()},set open(m=!1){r(m),k()},get agentName(){return p()},set agentName(m){p(m),k()},get workspaceId(){return v()},set workspaceId(m){v(m),k()},get agentId(){return f()},set agentId(m){f(m),k()},$set:Tt,$on:(m,me)=>Rt(n,m,me)};{const m=ce=>{var xe=Oe(),pe=H(xe);{var G=W=>{var ne=go(),ge=U(ne,!0);x(()=>L(ge,e(Ce))),l(W,ne)};M(pe,W=>{e(Ce)&&W(G)})}l(ce,xe)};let me=u(()=>c.modals_retireAgent_title()),ue=u(()=>c.modals_retireAgent_description({name:p()})),R=u(()=>c.modals_retireAgent_confirm_label()),_e=u(()=>c.modals_bulkActionConfirm_cancel_label());ns(a,{get title(){return e(me)},get description(){return e(ue)},get confirmLabel(){return e(R)},get cancelLabel(){return e(_e)},focusSubmit:!1,focusCancel:!0,get busy(){return e(F)},onConfirm:D,get open(){return r()},set open(ce){r(ce)},details:m,$$slots:{details:!0}})}var T=Lt(P);return d(),T}function fo({agentName:a,specialist:n}){const o=n?`{ topLevel: true, specialist: ${JSON.stringify(n)} }`:"{ topLevel: true }",i=n?`and keep the same specialist (${JSON.stringify(n)})`:"and, if you were created with a specialist, pass that exact same `specialist` value in the options";return`Please replace yourself with a fresh top-level agent and run a gradual, coordinated hand-off:
3
3
 
4
4
  1. Create your replacement now: call \`ws.agent.create(${JSON.stringify(a)}, kickoffMessage, ${o})\`. The first argument must be your EXACT current name (${JSON.stringify(a)}) ${i}. Write the kickoff message as a thorough context hand-off: the overall goal, the current state of the work, key notes and files, decisions already made, and open threads.
@@ -1,4 +1,4 @@
1
- var $s=Object.defineProperty;var Fs=(f,r,l)=>r in f?$s(f,r,{enumerable:!0,configurable:!0,writable:!0,value:l}):f[r]=l;var q=(f,r,l)=>Fs(f,typeof r!="symbol"?r+"":r,l);import{t as dn,bo as x,bm as P,bw as un,bq as On,b as hn,bs as je}from"./C0QTy0Sy.js";import{ai as Cr,bs as gn,ca as Be,aD as e,bH as m,a5 as N,bA as L,b_ as z,aw as sn,aj as ln,W as w,bn as fn,bV as J,aA as C,ay as ne,bS as y,bl as de,bO as K,aB as T,c9 as u,a7 as nt,br as tt,bj as sr,c5 as gt,c0 as Hn,a as Us,be as Tt,b$ as ft,bf as or}from"./3SdAC2_C.js";import{i as M}from"./bhKPSdq4.js";import{g as Pt,i as Ln,I as ir,e as ar}from"./B6S6VNu7.js";import{n as cn,l as Ws,c as Bs}from"./DLwWVKiF.js";import{f as En,s as Ve,g as lr}from"./7UPrdiE9.js";import{b as on}from"./Dn334wJv.js";import{Jv as Me,eS as Vs,eJ as Ks,eK as js,o_ as qs,nO as Vt,nS as cr,nR as In,eM as Gs,vF as Qs,vG as Xs,vI as Js,Hy as Ys,JA as Zs,rX as eo,eR as to}from"./tr-2J8Mf.js";import{c as no}from"./BIVeXMBl.js";import{F as Ne,a1 as ro,a8 as An,aw as dr,ax as ur,bS as so,aP as oo,cd as hr,bZ as gr,cq as fr}from"./U9jJmfYa.js";import{dH as io,bs as ao,X as lo,aO as mr,p as co}from"./BaujsV9k.js";import{L as pr}from"./L7j-Q29w.js";import{C as an}from"./DypB-Dwi.js";import{b8 as kr,bN as uo,bT as ho}from"./CzXkTVR8.js";import{q as $e,d as go,g as fo}from"./CpxEaO9r.js";import"./CrD0jtXE.js";import"./DCRuihKm.js";/* empty css */import{T as Pr}from"./DlrDVrrH.js";import{g as Nn}from"./OFhgRaUm.js";import{A as mo}from"./wl2qP2wF.js";import{f as ke}from"./FzlZUztb.js";import{C as po}from"./DQ_mNIfK.js";import{C as vo}from"./BmTMWrby.js";import{s as vr}from"./DqRH8mOo.js";import{S as Dt}from"./fiz8N_zQ.js";import{l as Rt}from"./CE7dsja4.js";import{G as _r}from"./a3TFelkn.js";import{P as _o}from"./Ctbo6mXV.js";import{g as wo}from"./DA5opfEp.js";import{a8 as bo,Y as So}from"./pf1qexdH.js";import{ap as yo}from"./Dkwg3iDV.js";import{N as wr}from"./C_-1gUwp.js";import{ae as xo,ad as Co,af as ko}from"./Ax0sJJJl.js";function br({scrollTop:f,scrollHeight:r,height:l,fitPerfectly:a=!1,fitPerfectlyOverscroll:c=0,overscrollSize:p}){const b=l+p*2,S=a?l+c*2:b;if(r=Math.max(r,S),b>=r||a){const G=Math.max(f-c,0),h=Math.min(f+S,r);return{top:G,bottom:Math.max(h,G)}}let A=f+l/2-b/2,F=A+b;return A<0&&(A=0),F>r&&(F=r),A=Math.floor(Math.max(A,0)),{top:A,bottom:Math.ceil(Math.max(Math.min(F,r),A))}}function Po(f,r){return f==null||r==null?f===r:f.top===r.top&&f.bottom===r.bottom}const Rr=1e3,Ro=Rr*4,Ho=[0,1e-6,.99999,1],Lo={overscrollSize:Rr,intersectionObserverMargin:Ro,resizeDebugging:!1};let rn=0,Io=-1;var Pe,Ao=(Pe=class{constructor(r){q(this,"__id",`virtualizer-${++Io}`);q(this,"config");q(this,"type","simple");q(this,"intersectionObserver");q(this,"scrollTop",0);q(this,"height",0);q(this,"scrollHeight",0);q(this,"windowSpecs",{top:0,bottom:0});q(this,"root");q(this,"contentContainer");q(this,"resizeObserver");q(this,"observers",new Map);q(this,"visibleInstances",new Map);q(this,"visibleInstancesDirty",!1);q(this,"instancesChanged",new Set);q(this,"reconcileQueue",new Set);q(this,"scrollDirty",!0);q(this,"heightDirty",!0);q(this,"scrollHeightDirty",!0);q(this,"renderedObservers",0);q(this,"connectQueue",new Map);q(this,"handleContainerResize",r=>{if(this.root==null)return;let l=!1;for(const a of r){const c=a.borderBoxSize[0].blockSize;this.root instanceof Document?c!==this.scrollHeight&&(this.scrollHeightDirty=!0,l=!0,this.config.resizeDebugging&&(console.log("Virtualizer: content size change",this.__id,{sizeChange:c-rn,newSize:c}),rn=c)):a.target===this.root?c!==this.height&&(this.heightDirty=!0,l=!0):a.target===this.contentContainer&&(this.scrollHeightDirty=!0,l=!0,this.config.resizeDebugging&&(console.log("Virtualizer: scroller size change",this.__id,{sizeChange:c-rn,newSize:c}),rn=c))}l&&$e(this.computeRenderRangeAndEmit)});q(this,"handleWindowResize",()=>{Pe.__STOP||window.innerHeight===this.height||(this.heightDirty=!0,$e(this.computeRenderRangeAndEmit))});q(this,"handleWindowScroll",()=>{Pe.__STOP||this.root==null||!(this.root instanceof Document)||(this.scrollDirty=!0,$e(this.computeRenderRangeAndEmit))});q(this,"handleElementScroll",()=>{Pe.__STOP||this.root==null||this.root instanceof Document||(this.scrollDirty=!0,$e(this.computeRenderRangeAndEmit))});q(this,"computeRenderRangeAndEmit",()=>{if(Pe.__STOP)return;const r=this.heightDirty||this.scrollHeightDirty;let l=this.instancesChanged.size>0;if(this.instancesChanged.size===0){const p=br({scrollTop:this.getScrollTop(),height:this.getHeight(),scrollHeight:this.getScrollHeight(),overscrollSize:this.config.overscrollSize});if(!r&&Po(this.windowSpecs,p)&&this.renderedObservers===this.observers.size&&!this.visibleInstancesDirty&&this.reconcileQueue.size===0)return;this.windowSpecs=p}this.visibleInstancesDirty=!1,this.renderedObservers=this.observers.size;const a=this.getScrollAnchor(this.height),c=new Set;for(const p of r?this.observers.values():this.visibleInstances.values())p.onRender(r)&&c.add(p);for(const p of this.instancesChanged)c.has(p)||p.onRender(r)&&c.add(p);this.scrollFix(a);for(const p of c)this.reconcileQueue.delete(p),p.reconcileHeights();for(const p of this.reconcileQueue)p.reconcileHeights()&&(l=!0);this.reconcileQueue.clear(),l||=this.instancesChanged.size>0,l&&this.markDOMDirty(),(l||r)&&$e(this.computeRenderRangeAndEmit),c.clear(),this.instancesChanged.clear()});q(this,"handleIntersectionChange",r=>{this.scrollDirty=!0;for(const{target:l,isIntersecting:a}of r){if(!(l instanceof HTMLElement))throw new Error("Virtualizer.handleIntersectionChange: target not an HTMLElement");const c=this.observers.get(l);c!=null&&(a&&!this.visibleInstances.has(l)?(c.setVisibility(!0),this.visibleInstances.set(l,c),this.visibleInstancesDirty=!0):!a&&this.visibleInstances.has(l)&&(c.setVisibility(!1),this.visibleInstances.delete(l),this.visibleInstancesDirty=!0))}this.visibleInstancesDirty&&$e(this.computeRenderRangeAndEmit)});this.config={...Lo,...r}}setup(r,l){if(this.root==null){this.root=r,this.resizeObserver=new ResizeObserver(this.handleContainerResize),this.intersectionObserver=new IntersectionObserver(this.handleIntersectionChange,{root:this.root,threshold:Ho,rootMargin:`${this.config.intersectionObserverMargin}px 0px ${this.config.intersectionObserverMargin}px 0px`}),r instanceof Document?this.setupWindow():this.setupElement(l),window.__INSTANCE=this,window.__TOGGLE=()=>{Pe.__STOP?(Pe.__STOP=!1,(this.getScrollContainerElement()??window).scrollTo({top:Pe.__lastScrollPosition}),$e(this.computeRenderRangeAndEmit)):(Pe.__lastScrollPosition=this.getScrollTop(),Pe.__STOP=!0)};for(const[a,c]of this.connectQueue.entries())this.connect(a,c);this.connectQueue.clear(),this.markDOMDirty(),$e(this.computeRenderRangeAndEmit)}}instanceChanged(r,l){this.instancesChanged.add(r),l&&this.markDOMDirty(),$e(this.computeRenderRangeAndEmit)}requestHeightReconcile(r){this.reconcileQueue.add(r),$e(this.computeRenderRangeAndEmit)}getWindowSpecs(){return this.windowSpecs.top===0&&this.windowSpecs.bottom===0&&(this.windowSpecs=br({scrollTop:this.getScrollTop(),height:this.getHeight(),scrollHeight:this.getScrollHeight(),overscrollSize:this.config.overscrollSize})),this.windowSpecs}getRoot(){return this.root}isInstanceVisible(r,l){const a=this.getScrollTop(),c=this.getHeight(),p=this.config.intersectionObserverMargin,b=a-p,S=a+c+p;return!(r<b-l||r>S)}setupWindow(){if(this.root==null||!(this.root instanceof Document))throw new Error("Virtualizer.setupWindow: Invalid setup method");window.addEventListener("scroll",this.handleWindowScroll,{passive:!0}),window.addEventListener("resize",this.handleWindowResize,{passive:!0}),this.resizeObserver?.observe(this.root.documentElement)}setupElement(r){if(this.root==null||this.root instanceof Document)throw new Error("Virtualizer.setupElement: Invalid setup method");this.root.addEventListener("scroll",this.handleElementScroll,{passive:!0}),this.resizeObserver?.observe(this.root),r??=this.root.firstElementChild??void 0,r instanceof HTMLElement&&(this.contentContainer=r,this.resizeObserver?.observe(r))}cleanUp(){go(this.computeRenderRangeAndEmit),this.resizeObserver?.disconnect(),this.resizeObserver=void 0,this.intersectionObserver?.disconnect(),this.intersectionObserver=void 0,this.root?.removeEventListener("scroll",this.handleElementScroll),window.removeEventListener("scroll",this.handleWindowScroll),window.removeEventListener("resize",this.handleWindowResize),this.root=void 0,this.contentContainer=void 0,this.observers.clear(),this.visibleInstances.clear(),this.instancesChanged.clear(),this.reconcileQueue.clear(),this.connectQueue.clear(),this.visibleInstancesDirty=!1,this.windowSpecs={top:0,bottom:0},this.scrollTop=0,this.height=0,this.scrollHeight=0,this.scrollDirty=!0,this.heightDirty=!0,this.scrollHeightDirty=!0}getOffsetInScrollContainer(r){return this.getScrollTop()+Kt(r,this.getScrollContainerElement())}connect(r,l){if(this.observers.has(r))throw new Error("Virtualizer.connect: instance is already connected...");return this.intersectionObserver==null?this.connectQueue.set(r,l):(this.intersectionObserver.observe(r),this.observers.set(r,l),this.instancesChanged.add(l),this.markDOMDirty(),$e(this.computeRenderRangeAndEmit)),()=>this.disconnect(r)}disconnect(r){const l=this.observers.get(r);this.connectQueue.delete(r),l!=null&&(this.intersectionObserver?.unobserve(r),this.observers.delete(r),this.instancesChanged.delete(l),this.reconcileQueue.delete(l),this.visibleInstances.delete(r)&&(this.visibleInstancesDirty=!0),this.markDOMDirty(),$e(this.computeRenderRangeAndEmit))}scrollFix(r){if(r==null)return;const l=this.getScrollContainerElement(),{lineIndex:a,lineOffset:c,fileElement:p,fileOffset:b,fileTypeOffset:S}=r;if(a!=null&&c!=null){const F=p.shadowRoot?.querySelector(`[data-line][data-line-index="${a}"]`);if(F instanceof HTMLElement){const G=Kt(F,l);if(G!==c){const h=G-c;this.applyScrollFix(h)}return}}const A=Kt(p,l);if(S==="top")A!==b&&this.applyScrollFix(A-b);else{const F=A+p.getBoundingClientRect().height;F!==b&&this.applyScrollFix(F-b)}}applyScrollFix(r){this.root==null||this.root instanceof Document?window.scrollTo({top:window.scrollY+r,behavior:"instant"}):this.root.scrollTo({top:this.root.scrollTop+r,behavior:"instant"}),this.markDOMDirty()}getScrollAnchor(r){const l=this.getScrollContainerElement();let a;for(const[c]of this.visibleInstances.entries()){const p=Kt(c,l),b=p+c.offsetHeight;let S,A;b<=0?(S=b,A="bottom"):(S=p,A="top");let F,G;if(b>0&&p<r)for(const oe of c.shadowRoot?.querySelectorAll("[data-line][data-line-index]")??[]){if(!(oe instanceof HTMLElement))continue;const Te=oe.dataset.lineIndex;if(Te==null)continue;const ue=Kt(oe,l);if(!(ue<0)){F=Te,G=ue;break}}if(a?.lineOffset!=null&&G==null)continue;let h=!1;(a==null||G!=null&&(a.lineOffset==null||G<a.lineOffset)||G==null&&a.lineOffset==null&&(S>=0&&(a.fileOffset<0||S<a.fileOffset)||S<0&&a.fileOffset<0&&S>a.fileOffset))&&(h=!0),h&&(a={fileElement:c,fileTypeOffset:A,fileOffset:S,lineIndex:F,lineOffset:G})}return a}getScrollTop(){if(!this.scrollDirty)return this.scrollTop;this.scrollDirty=!1;let r=this.root==null?0:this.root instanceof Document?window.scrollY:this.root.scrollTop;return r=this.clampScrollTop(r),this.scrollTop=r,r}scrollTo({top:r,behavior:l="auto"}){const{root:a}=this;if(a==null)return;const c=this.clampScrollTop(r);a instanceof Document?window.scrollTo({top:c,behavior:l}):a.scrollTo({top:c,behavior:l}),this.scrollDirty=!0,$e(this.computeRenderRangeAndEmit)}clampScrollTop(r){return Math.max(0,Math.min(r,this.getScrollHeight()-this.getHeight()))}getScrollHeight(){return this.scrollHeightDirty?(this.scrollHeightDirty=!1,this.scrollHeight=this.root==null?0:this.root instanceof Document?this.root.documentElement.scrollHeight:this.root.scrollHeight,this.scrollHeight):this.scrollHeight}getHeight(){return this.heightDirty?(this.heightDirty=!1,this.height=this.root==null?0:this.root instanceof Document?globalThis.innerHeight:this.root.getBoundingClientRect().height,this.height):this.height}markDOMDirty(){this.scrollDirty=!0,this.scrollHeightDirty=!0,this.heightDirty=!0}getScrollContainerElement(){return this.root==null||this.root instanceof Document?void 0:this.root}},q(Pe,"__STOP",!1),q(Pe,"__lastScrollPosition",0),Pe);function Kt(f,r){const l=f.getBoundingClientRect(),a=r?.getBoundingClientRect().top??0;return l.top-a}var Eo=T('<div class="absolute inset-0 flex items-center justify-center rounded-lg bg-background/60 backdrop-blur-[2px] transition-opacity duration-spring-moderate ease-spring-moderate motion-reduce:transition-none z-10 pointer-events-none"><div class="flex items-center gap-2 rounded-lg border border-border bg-card px-3 py-2 text-xs font-medium text-subtle shadow-lg"><!> </div></div>'),Oo=T("<!> <!>",1),No=T('<div class="flex h-24 items-center justify-start text-left text-subtle"> </div>'),To=T('<div role="region"><!></div>');function Hr(f,r){if(new.target)return dn({component:Hr,...f});gn(r,!0);const l=()=>je(ve,"$sideBySide",a),[a,c]=On(),p=Nn()?.workspaceId??void 0;let b=x(r,"change",7),S=x(r,"foldUnchanged",7,!0),A=x(r,"allowHeadReads",7,!0),F=x(r,"canReadHeadFiles",7),G=x(r,"lineWrapping",7,!1),h=x(r,"scrollToLine",7),oe=x(r,"isAggregate",7,!1),Te=x(r,"showScrollHint",7,!1),ue=x(r,"onStageHunk",7),Q=x(r,"onUnstageHunk",7),at=x(r,"onOpenCommit",7),pt=x(r,"virtualizer",7),vt=x(r,"gitRootId",7,void 0),_t=x(r,"gitRootPath",7,void 0);const ve=kr();let Re=J(!1),Se=J(!1),Fe=J(!1),Ue=J(0),qe=J(void 0);const $=80;function ie(){m(Se,!0)}function De(){m(Se,!1),m(Fe,!1),m(Ue,0)}function He(v){!e(Se)||e(Re)||(m(Ue,e(Ue)+Math.abs(v.deltaY)),e(Ue)>=$&&!e(Fe)&&m(Fe,!0))}function jt(){m(Re,!0),m(Fe,!1),m(Ue,0)}function qt(v){e(qe)&&!e(qe).contains(v.relatedTarget)&&m(Re,!1)}Be(()=>{(e(Re)||!e(Se))&&(m(Fe,!1),m(Ue,0))});let Ht=u(()=>{const{toolCallId:v,filePath:_e,additions:Qe,deletions:St,oldContent:re,newContent:Xe}=b(),rt="staged"in b()&&b().staged===!0,Ke="category"in b()?b().category:void 0,At="commitHash"in b()?b().commitHash:void 0,zt="gitlink"in b()?b().gitlink:void 0,Mt="isFullFileContent"in b()?b().isFullFileContent:!1;let yt;return Ke==="committed"?yt=an.Committed:rt?yt=an.Staged:yt=an.Unstaged,{id:v,file:_e,relativePath:_e,stage:yt,commitHash:At,gitlink:zt,stats:{additions:Qe,deletions:St},attribution:{timestamp:0},content:re!==void 0||Xe!==void 0?{oldContent:re??"",newContent:Xe??"",isFullFileContent:Mt}:void 0}});const D=u(()=>b().isFullFileContent?1:("chunks"in b()?b().chunks?.[0]?.newStart:void 0)??b().startLineNumber??1);var Lt={get change(){return b()},set change(v){b(v),C()},get foldUnchanged(){return S()},set foldUnchanged(v=!0){S(v),C()},get allowHeadReads(){return A()},set allowHeadReads(v=!0){A(v),C()},get canReadHeadFiles(){return F()},set canReadHeadFiles(v){F(v),C()},get lineWrapping(){return G()},set lineWrapping(v=!1){G(v),C()},get scrollToLine(){return h()},set scrollToLine(v){h(v),C()},get isAggregate(){return oe()},set isAggregate(v=!1){oe(v),C()},get showScrollHint(){return Te()},set showScrollHint(v=!1){Te(v),C()},get onStageHunk(){return ue()},set onStageHunk(v){ue(v),C()},get onUnstageHunk(){return Q()},set onUnstageHunk(v){Q(v),C()},get onOpenCommit(){return at()},set onOpenCommit(v){at(v),C()},get virtualizer(){return pt()},set virtualizer(v){pt(v),C()},get gitRootId(){return vt()},set gitRootId(v=void 0){vt(v),C()},get gitRootPath(){return _t()},set gitRootPath(v=void 0){_t(v),C()},$set:un,$on:(v,_e)=>hn(r,v,_e)},Le=To();let wt;var It=N(Le);{var Ge=v=>{var _e=Oo(),Qe=ne(_e);{let Xe=u(()=>l()?"split":"unified");Pr(Qe,{get change(){return e(Ht)},get workspaceId(){return p},get viewMode(){return e(Xe)},get foldUnchanged(){return S()},get lineWrapping(){return G()},get onStageHunk(){return ue()},get onUnstageHunk(){return Q()},useProvidedContent:!0,get allowHeadReads(){return A()},get canReadHeadFiles(){return F()},get lineOffset(){return e(D)},get virtualizer(){return pt()},get gitRootId(){return vt()},get gitRootPath(){return _t()}})}var St=y(Qe,2);{var re=Xe=>{var rt=Eo(),Ke=N(rt),At=N(Ke);Ne(At,{get icon(){return ro},class:"w-3 h-3"});var zt=y(At);L(Ke),L(rt),z(Mt=>K(zt,` ${Mt??""}`),[()=>P.chat_inlineDiffItem_clickToScroll_label()]),cn(1,rt,()=>Ws,()=>({tier:"fast",y:0,scale:1})),cn(2,rt,()=>Bs,()=>({tier:"fast"})),w(Xe,rt)};M(St,Xe=>{Te()&&e(Fe)&&Xe(re)})}w(v,_e)},bt=v=>{var _e=No(),Qe=de(_e,!0);z(St=>K(Qe,St),[()=>P.chat_inlineDiffItem_noWorkspace_label()]),w(v,_e)};M(It,v=>{p?v(Ge):v(bt,-1)})}L(Le),on(Le,v=>m(qe,v),()=>e(qe)),z(v=>{wt=En(Le,1,"inline-diff-container relative",null,wt,{focused:e(Re)}),Ve(Le,"aria-label",v)},[()=>P.chat_inlineDiffItem_viewer_ariaLabel()]),sn("mouseenter",Le,ie),sn("mouseleave",Le,De),sn("wheel",Le,He),ln("focusin",Le,jt),ln("focusout",Le,qt),w(f,Le);var mn=fn(Lt);return c(),mn}Cr(["focusin","focusout"]);function Sr(f){return[f.stage,f.type,f.oldLineNumber??"",f.newLineNumber??"",f.content].join("\0")}function Do(f){let r=f.oldStart,l=f.newStart;return f.lines.map(a=>{const c={...a,oldLineNumber:a.oldLineNumber??a.oldNumber,newLineNumber:a.newLineNumber??a.newNumber};return c.oldLineNumber===void 0&&c.newLineNumber===void 0?a.type==="Context"?(c.oldLineNumber=r++,c.newLineNumber=l++):a.type==="Deletion"?c.oldLineNumber=r++:a.type==="Addition"&&(c.newLineNumber=l++):a.type==="Context"?(r=(c.oldLineNumber??r)+1,l=(c.newLineNumber??l)+1):a.type==="Deletion"?r=(c.oldLineNumber??r)+1:a.type==="Addition"&&(l=(c.newLineNumber??l)+1),c})}function zo(f,r){const l=f?f.split(`
1
+ var $s=Object.defineProperty;var Fs=(f,r,l)=>r in f?$s(f,r,{enumerable:!0,configurable:!0,writable:!0,value:l}):f[r]=l;var q=(f,r,l)=>Fs(f,typeof r!="symbol"?r+"":r,l);import{t as dn,bo as x,bm as P,bw as un,bq as On,b as hn,bs as je}from"./C0QTy0Sy.js";import{ai as Cr,bs as gn,ca as Be,aD as e,bH as m,a5 as N,bA as L,b_ as z,aw as sn,aj as ln,W as w,bn as fn,bV as J,aA as C,ay as ne,bS as y,bl as de,bO as K,aB as T,c9 as u,a7 as nt,br as tt,bj as sr,c5 as gt,c0 as Hn,a as Us,be as Tt,b$ as ft,bf as or}from"./3SdAC2_C.js";import{i as M}from"./bhKPSdq4.js";import{g as Pt,i as Ln,I as ir,e as ar}from"./B6S6VNu7.js";import{n as cn,l as Ws,c as Bs}from"./DLwWVKiF.js";import{f as En,s as Ve,g as lr}from"./7UPrdiE9.js";import{b as on}from"./Dn334wJv.js";import{Jv as Me,eS as Vs,eJ as Ks,eK as js,o_ as qs,nO as Vt,nS as cr,nR as In,eM as Gs,vF as Qs,vG as Xs,vI as Js,Hy as Ys,JA as Zs,rX as eo,eR as to}from"./tr-2J8Mf.js";import{c as no}from"./BIVeXMBl.js";import{F as Ne,a1 as ro,a8 as An,aw as dr,ax as ur,bS as so,aP as oo,cd as hr,bZ as gr,cq as fr}from"./U9jJmfYa.js";import{dH as io,bs as ao,X as lo,aO as mr,p as co}from"./BaujsV9k.js";import{L as pr}from"./L7j-Q29w.js";import{C as an}from"./DypB-Dwi.js";import{b8 as kr,bN as uo,bT as ho}from"./Y-O_IvTW.js";import{q as $e,d as go,g as fo}from"./Bw9sjqWK.js";import"./CrD0jtXE.js";import"./DCRuihKm.js";/* empty css */import{T as Pr}from"./CruNSA_k.js";import{g as Nn}from"./OFhgRaUm.js";import{A as mo}from"./wl2qP2wF.js";import{f as ke}from"./FzlZUztb.js";import{C as po}from"./DQ_mNIfK.js";import{C as vo}from"./BmTMWrby.js";import{s as vr}from"./DH-1Jck3.js";import{S as Dt}from"./fiz8N_zQ.js";import{l as Rt}from"./CE7dsja4.js";import{G as _r}from"./a3TFelkn.js";import{P as _o}from"./Ctbo6mXV.js";import{g as wo}from"./DA5opfEp.js";import{a8 as bo,Y as So}from"./DL8v_XLP.js";import{ap as yo}from"./CvjFWjQI.js";import{N as wr}from"./CjZzZn8W.js";import{ae as xo,ad as Co,af as ko}from"./Drv2Rza_.js";function br({scrollTop:f,scrollHeight:r,height:l,fitPerfectly:a=!1,fitPerfectlyOverscroll:c=0,overscrollSize:p}){const b=l+p*2,S=a?l+c*2:b;if(r=Math.max(r,S),b>=r||a){const G=Math.max(f-c,0),h=Math.min(f+S,r);return{top:G,bottom:Math.max(h,G)}}let A=f+l/2-b/2,F=A+b;return A<0&&(A=0),F>r&&(F=r),A=Math.floor(Math.max(A,0)),{top:A,bottom:Math.ceil(Math.max(Math.min(F,r),A))}}function Po(f,r){return f==null||r==null?f===r:f.top===r.top&&f.bottom===r.bottom}const Rr=1e3,Ro=Rr*4,Ho=[0,1e-6,.99999,1],Lo={overscrollSize:Rr,intersectionObserverMargin:Ro,resizeDebugging:!1};let rn=0,Io=-1;var Pe,Ao=(Pe=class{constructor(r){q(this,"__id",`virtualizer-${++Io}`);q(this,"config");q(this,"type","simple");q(this,"intersectionObserver");q(this,"scrollTop",0);q(this,"height",0);q(this,"scrollHeight",0);q(this,"windowSpecs",{top:0,bottom:0});q(this,"root");q(this,"contentContainer");q(this,"resizeObserver");q(this,"observers",new Map);q(this,"visibleInstances",new Map);q(this,"visibleInstancesDirty",!1);q(this,"instancesChanged",new Set);q(this,"reconcileQueue",new Set);q(this,"scrollDirty",!0);q(this,"heightDirty",!0);q(this,"scrollHeightDirty",!0);q(this,"renderedObservers",0);q(this,"connectQueue",new Map);q(this,"handleContainerResize",r=>{if(this.root==null)return;let l=!1;for(const a of r){const c=a.borderBoxSize[0].blockSize;this.root instanceof Document?c!==this.scrollHeight&&(this.scrollHeightDirty=!0,l=!0,this.config.resizeDebugging&&(console.log("Virtualizer: content size change",this.__id,{sizeChange:c-rn,newSize:c}),rn=c)):a.target===this.root?c!==this.height&&(this.heightDirty=!0,l=!0):a.target===this.contentContainer&&(this.scrollHeightDirty=!0,l=!0,this.config.resizeDebugging&&(console.log("Virtualizer: scroller size change",this.__id,{sizeChange:c-rn,newSize:c}),rn=c))}l&&$e(this.computeRenderRangeAndEmit)});q(this,"handleWindowResize",()=>{Pe.__STOP||window.innerHeight===this.height||(this.heightDirty=!0,$e(this.computeRenderRangeAndEmit))});q(this,"handleWindowScroll",()=>{Pe.__STOP||this.root==null||!(this.root instanceof Document)||(this.scrollDirty=!0,$e(this.computeRenderRangeAndEmit))});q(this,"handleElementScroll",()=>{Pe.__STOP||this.root==null||this.root instanceof Document||(this.scrollDirty=!0,$e(this.computeRenderRangeAndEmit))});q(this,"computeRenderRangeAndEmit",()=>{if(Pe.__STOP)return;const r=this.heightDirty||this.scrollHeightDirty;let l=this.instancesChanged.size>0;if(this.instancesChanged.size===0){const p=br({scrollTop:this.getScrollTop(),height:this.getHeight(),scrollHeight:this.getScrollHeight(),overscrollSize:this.config.overscrollSize});if(!r&&Po(this.windowSpecs,p)&&this.renderedObservers===this.observers.size&&!this.visibleInstancesDirty&&this.reconcileQueue.size===0)return;this.windowSpecs=p}this.visibleInstancesDirty=!1,this.renderedObservers=this.observers.size;const a=this.getScrollAnchor(this.height),c=new Set;for(const p of r?this.observers.values():this.visibleInstances.values())p.onRender(r)&&c.add(p);for(const p of this.instancesChanged)c.has(p)||p.onRender(r)&&c.add(p);this.scrollFix(a);for(const p of c)this.reconcileQueue.delete(p),p.reconcileHeights();for(const p of this.reconcileQueue)p.reconcileHeights()&&(l=!0);this.reconcileQueue.clear(),l||=this.instancesChanged.size>0,l&&this.markDOMDirty(),(l||r)&&$e(this.computeRenderRangeAndEmit),c.clear(),this.instancesChanged.clear()});q(this,"handleIntersectionChange",r=>{this.scrollDirty=!0;for(const{target:l,isIntersecting:a}of r){if(!(l instanceof HTMLElement))throw new Error("Virtualizer.handleIntersectionChange: target not an HTMLElement");const c=this.observers.get(l);c!=null&&(a&&!this.visibleInstances.has(l)?(c.setVisibility(!0),this.visibleInstances.set(l,c),this.visibleInstancesDirty=!0):!a&&this.visibleInstances.has(l)&&(c.setVisibility(!1),this.visibleInstances.delete(l),this.visibleInstancesDirty=!0))}this.visibleInstancesDirty&&$e(this.computeRenderRangeAndEmit)});this.config={...Lo,...r}}setup(r,l){if(this.root==null){this.root=r,this.resizeObserver=new ResizeObserver(this.handleContainerResize),this.intersectionObserver=new IntersectionObserver(this.handleIntersectionChange,{root:this.root,threshold:Ho,rootMargin:`${this.config.intersectionObserverMargin}px 0px ${this.config.intersectionObserverMargin}px 0px`}),r instanceof Document?this.setupWindow():this.setupElement(l),window.__INSTANCE=this,window.__TOGGLE=()=>{Pe.__STOP?(Pe.__STOP=!1,(this.getScrollContainerElement()??window).scrollTo({top:Pe.__lastScrollPosition}),$e(this.computeRenderRangeAndEmit)):(Pe.__lastScrollPosition=this.getScrollTop(),Pe.__STOP=!0)};for(const[a,c]of this.connectQueue.entries())this.connect(a,c);this.connectQueue.clear(),this.markDOMDirty(),$e(this.computeRenderRangeAndEmit)}}instanceChanged(r,l){this.instancesChanged.add(r),l&&this.markDOMDirty(),$e(this.computeRenderRangeAndEmit)}requestHeightReconcile(r){this.reconcileQueue.add(r),$e(this.computeRenderRangeAndEmit)}getWindowSpecs(){return this.windowSpecs.top===0&&this.windowSpecs.bottom===0&&(this.windowSpecs=br({scrollTop:this.getScrollTop(),height:this.getHeight(),scrollHeight:this.getScrollHeight(),overscrollSize:this.config.overscrollSize})),this.windowSpecs}getRoot(){return this.root}isInstanceVisible(r,l){const a=this.getScrollTop(),c=this.getHeight(),p=this.config.intersectionObserverMargin,b=a-p,S=a+c+p;return!(r<b-l||r>S)}setupWindow(){if(this.root==null||!(this.root instanceof Document))throw new Error("Virtualizer.setupWindow: Invalid setup method");window.addEventListener("scroll",this.handleWindowScroll,{passive:!0}),window.addEventListener("resize",this.handleWindowResize,{passive:!0}),this.resizeObserver?.observe(this.root.documentElement)}setupElement(r){if(this.root==null||this.root instanceof Document)throw new Error("Virtualizer.setupElement: Invalid setup method");this.root.addEventListener("scroll",this.handleElementScroll,{passive:!0}),this.resizeObserver?.observe(this.root),r??=this.root.firstElementChild??void 0,r instanceof HTMLElement&&(this.contentContainer=r,this.resizeObserver?.observe(r))}cleanUp(){go(this.computeRenderRangeAndEmit),this.resizeObserver?.disconnect(),this.resizeObserver=void 0,this.intersectionObserver?.disconnect(),this.intersectionObserver=void 0,this.root?.removeEventListener("scroll",this.handleElementScroll),window.removeEventListener("scroll",this.handleWindowScroll),window.removeEventListener("resize",this.handleWindowResize),this.root=void 0,this.contentContainer=void 0,this.observers.clear(),this.visibleInstances.clear(),this.instancesChanged.clear(),this.reconcileQueue.clear(),this.connectQueue.clear(),this.visibleInstancesDirty=!1,this.windowSpecs={top:0,bottom:0},this.scrollTop=0,this.height=0,this.scrollHeight=0,this.scrollDirty=!0,this.heightDirty=!0,this.scrollHeightDirty=!0}getOffsetInScrollContainer(r){return this.getScrollTop()+Kt(r,this.getScrollContainerElement())}connect(r,l){if(this.observers.has(r))throw new Error("Virtualizer.connect: instance is already connected...");return this.intersectionObserver==null?this.connectQueue.set(r,l):(this.intersectionObserver.observe(r),this.observers.set(r,l),this.instancesChanged.add(l),this.markDOMDirty(),$e(this.computeRenderRangeAndEmit)),()=>this.disconnect(r)}disconnect(r){const l=this.observers.get(r);this.connectQueue.delete(r),l!=null&&(this.intersectionObserver?.unobserve(r),this.observers.delete(r),this.instancesChanged.delete(l),this.reconcileQueue.delete(l),this.visibleInstances.delete(r)&&(this.visibleInstancesDirty=!0),this.markDOMDirty(),$e(this.computeRenderRangeAndEmit))}scrollFix(r){if(r==null)return;const l=this.getScrollContainerElement(),{lineIndex:a,lineOffset:c,fileElement:p,fileOffset:b,fileTypeOffset:S}=r;if(a!=null&&c!=null){const F=p.shadowRoot?.querySelector(`[data-line][data-line-index="${a}"]`);if(F instanceof HTMLElement){const G=Kt(F,l);if(G!==c){const h=G-c;this.applyScrollFix(h)}return}}const A=Kt(p,l);if(S==="top")A!==b&&this.applyScrollFix(A-b);else{const F=A+p.getBoundingClientRect().height;F!==b&&this.applyScrollFix(F-b)}}applyScrollFix(r){this.root==null||this.root instanceof Document?window.scrollTo({top:window.scrollY+r,behavior:"instant"}):this.root.scrollTo({top:this.root.scrollTop+r,behavior:"instant"}),this.markDOMDirty()}getScrollAnchor(r){const l=this.getScrollContainerElement();let a;for(const[c]of this.visibleInstances.entries()){const p=Kt(c,l),b=p+c.offsetHeight;let S,A;b<=0?(S=b,A="bottom"):(S=p,A="top");let F,G;if(b>0&&p<r)for(const oe of c.shadowRoot?.querySelectorAll("[data-line][data-line-index]")??[]){if(!(oe instanceof HTMLElement))continue;const Te=oe.dataset.lineIndex;if(Te==null)continue;const ue=Kt(oe,l);if(!(ue<0)){F=Te,G=ue;break}}if(a?.lineOffset!=null&&G==null)continue;let h=!1;(a==null||G!=null&&(a.lineOffset==null||G<a.lineOffset)||G==null&&a.lineOffset==null&&(S>=0&&(a.fileOffset<0||S<a.fileOffset)||S<0&&a.fileOffset<0&&S>a.fileOffset))&&(h=!0),h&&(a={fileElement:c,fileTypeOffset:A,fileOffset:S,lineIndex:F,lineOffset:G})}return a}getScrollTop(){if(!this.scrollDirty)return this.scrollTop;this.scrollDirty=!1;let r=this.root==null?0:this.root instanceof Document?window.scrollY:this.root.scrollTop;return r=this.clampScrollTop(r),this.scrollTop=r,r}scrollTo({top:r,behavior:l="auto"}){const{root:a}=this;if(a==null)return;const c=this.clampScrollTop(r);a instanceof Document?window.scrollTo({top:c,behavior:l}):a.scrollTo({top:c,behavior:l}),this.scrollDirty=!0,$e(this.computeRenderRangeAndEmit)}clampScrollTop(r){return Math.max(0,Math.min(r,this.getScrollHeight()-this.getHeight()))}getScrollHeight(){return this.scrollHeightDirty?(this.scrollHeightDirty=!1,this.scrollHeight=this.root==null?0:this.root instanceof Document?this.root.documentElement.scrollHeight:this.root.scrollHeight,this.scrollHeight):this.scrollHeight}getHeight(){return this.heightDirty?(this.heightDirty=!1,this.height=this.root==null?0:this.root instanceof Document?globalThis.innerHeight:this.root.getBoundingClientRect().height,this.height):this.height}markDOMDirty(){this.scrollDirty=!0,this.scrollHeightDirty=!0,this.heightDirty=!0}getScrollContainerElement(){return this.root==null||this.root instanceof Document?void 0:this.root}},q(Pe,"__STOP",!1),q(Pe,"__lastScrollPosition",0),Pe);function Kt(f,r){const l=f.getBoundingClientRect(),a=r?.getBoundingClientRect().top??0;return l.top-a}var Eo=T('<div class="absolute inset-0 flex items-center justify-center rounded-lg bg-background/60 backdrop-blur-[2px] transition-opacity duration-spring-moderate ease-spring-moderate motion-reduce:transition-none z-10 pointer-events-none"><div class="flex items-center gap-2 rounded-lg border border-border bg-card px-3 py-2 text-xs font-medium text-subtle shadow-lg"><!> </div></div>'),Oo=T("<!> <!>",1),No=T('<div class="flex h-24 items-center justify-start text-left text-subtle"> </div>'),To=T('<div role="region"><!></div>');function Hr(f,r){if(new.target)return dn({component:Hr,...f});gn(r,!0);const l=()=>je(ve,"$sideBySide",a),[a,c]=On(),p=Nn()?.workspaceId??void 0;let b=x(r,"change",7),S=x(r,"foldUnchanged",7,!0),A=x(r,"allowHeadReads",7,!0),F=x(r,"canReadHeadFiles",7),G=x(r,"lineWrapping",7,!1),h=x(r,"scrollToLine",7),oe=x(r,"isAggregate",7,!1),Te=x(r,"showScrollHint",7,!1),ue=x(r,"onStageHunk",7),Q=x(r,"onUnstageHunk",7),at=x(r,"onOpenCommit",7),pt=x(r,"virtualizer",7),vt=x(r,"gitRootId",7,void 0),_t=x(r,"gitRootPath",7,void 0);const ve=kr();let Re=J(!1),Se=J(!1),Fe=J(!1),Ue=J(0),qe=J(void 0);const $=80;function ie(){m(Se,!0)}function De(){m(Se,!1),m(Fe,!1),m(Ue,0)}function He(v){!e(Se)||e(Re)||(m(Ue,e(Ue)+Math.abs(v.deltaY)),e(Ue)>=$&&!e(Fe)&&m(Fe,!0))}function jt(){m(Re,!0),m(Fe,!1),m(Ue,0)}function qt(v){e(qe)&&!e(qe).contains(v.relatedTarget)&&m(Re,!1)}Be(()=>{(e(Re)||!e(Se))&&(m(Fe,!1),m(Ue,0))});let Ht=u(()=>{const{toolCallId:v,filePath:_e,additions:Qe,deletions:St,oldContent:re,newContent:Xe}=b(),rt="staged"in b()&&b().staged===!0,Ke="category"in b()?b().category:void 0,At="commitHash"in b()?b().commitHash:void 0,zt="gitlink"in b()?b().gitlink:void 0,Mt="isFullFileContent"in b()?b().isFullFileContent:!1;let yt;return Ke==="committed"?yt=an.Committed:rt?yt=an.Staged:yt=an.Unstaged,{id:v,file:_e,relativePath:_e,stage:yt,commitHash:At,gitlink:zt,stats:{additions:Qe,deletions:St},attribution:{timestamp:0},content:re!==void 0||Xe!==void 0?{oldContent:re??"",newContent:Xe??"",isFullFileContent:Mt}:void 0}});const D=u(()=>b().isFullFileContent?1:("chunks"in b()?b().chunks?.[0]?.newStart:void 0)??b().startLineNumber??1);var Lt={get change(){return b()},set change(v){b(v),C()},get foldUnchanged(){return S()},set foldUnchanged(v=!0){S(v),C()},get allowHeadReads(){return A()},set allowHeadReads(v=!0){A(v),C()},get canReadHeadFiles(){return F()},set canReadHeadFiles(v){F(v),C()},get lineWrapping(){return G()},set lineWrapping(v=!1){G(v),C()},get scrollToLine(){return h()},set scrollToLine(v){h(v),C()},get isAggregate(){return oe()},set isAggregate(v=!1){oe(v),C()},get showScrollHint(){return Te()},set showScrollHint(v=!1){Te(v),C()},get onStageHunk(){return ue()},set onStageHunk(v){ue(v),C()},get onUnstageHunk(){return Q()},set onUnstageHunk(v){Q(v),C()},get onOpenCommit(){return at()},set onOpenCommit(v){at(v),C()},get virtualizer(){return pt()},set virtualizer(v){pt(v),C()},get gitRootId(){return vt()},set gitRootId(v=void 0){vt(v),C()},get gitRootPath(){return _t()},set gitRootPath(v=void 0){_t(v),C()},$set:un,$on:(v,_e)=>hn(r,v,_e)},Le=To();let wt;var It=N(Le);{var Ge=v=>{var _e=Oo(),Qe=ne(_e);{let Xe=u(()=>l()?"split":"unified");Pr(Qe,{get change(){return e(Ht)},get workspaceId(){return p},get viewMode(){return e(Xe)},get foldUnchanged(){return S()},get lineWrapping(){return G()},get onStageHunk(){return ue()},get onUnstageHunk(){return Q()},useProvidedContent:!0,get allowHeadReads(){return A()},get canReadHeadFiles(){return F()},get lineOffset(){return e(D)},get virtualizer(){return pt()},get gitRootId(){return vt()},get gitRootPath(){return _t()}})}var St=y(Qe,2);{var re=Xe=>{var rt=Eo(),Ke=N(rt),At=N(Ke);Ne(At,{get icon(){return ro},class:"w-3 h-3"});var zt=y(At);L(Ke),L(rt),z(Mt=>K(zt,` ${Mt??""}`),[()=>P.chat_inlineDiffItem_clickToScroll_label()]),cn(1,rt,()=>Ws,()=>({tier:"fast",y:0,scale:1})),cn(2,rt,()=>Bs,()=>({tier:"fast"})),w(Xe,rt)};M(St,Xe=>{Te()&&e(Fe)&&Xe(re)})}w(v,_e)},bt=v=>{var _e=No(),Qe=de(_e,!0);z(St=>K(Qe,St),[()=>P.chat_inlineDiffItem_noWorkspace_label()]),w(v,_e)};M(It,v=>{p?v(Ge):v(bt,-1)})}L(Le),on(Le,v=>m(qe,v),()=>e(qe)),z(v=>{wt=En(Le,1,"inline-diff-container relative",null,wt,{focused:e(Re)}),Ve(Le,"aria-label",v)},[()=>P.chat_inlineDiffItem_viewer_ariaLabel()]),sn("mouseenter",Le,ie),sn("mouseleave",Le,De),sn("wheel",Le,He),ln("focusin",Le,jt),ln("focusout",Le,qt),w(f,Le);var mn=fn(Lt);return c(),mn}Cr(["focusin","focusout"]);function Sr(f){return[f.stage,f.type,f.oldLineNumber??"",f.newLineNumber??"",f.content].join("\0")}function Do(f){let r=f.oldStart,l=f.newStart;return f.lines.map(a=>{const c={...a,oldLineNumber:a.oldLineNumber??a.oldNumber,newLineNumber:a.newLineNumber??a.newNumber};return c.oldLineNumber===void 0&&c.newLineNumber===void 0?a.type==="Context"?(c.oldLineNumber=r++,c.newLineNumber=l++):a.type==="Deletion"?c.oldLineNumber=r++:a.type==="Addition"&&(c.newLineNumber=l++):a.type==="Context"?(r=(c.oldLineNumber??r)+1,l=(c.newLineNumber??l)+1):a.type==="Deletion"?r=(c.oldLineNumber??r)+1:a.type==="Addition"&&(l=(c.newLineNumber??l)+1),c})}function zo(f,r){const l=f?f.split(`
2
2
  `):[],a=r?r.split(`
3
3
  `):[];if(l.length===0&&a.length===0)return[];const c=[];for(const p of l)c.push({type:"Deletion",content:p});for(const p of a)c.push({type:"Addition",content:p});return[{oldStart:1,oldLines:l.length,newStart:1,newLines:a.length,lines:c}]}function Mo(f){if(!f||f.length===0)return[];const r=[];for(const a of f){let c=a.change.chunks||[];c.length===0&&(a.change.oldContent!=null||a.change.newContent!=null)&&(c=zo(a.change.oldContent??"",a.change.newContent??"")),c.forEach((p,b)=>{r.push({hunk:p,stage:a.category,part:a,hunkIndex:b})})}if(r.length===0)return[];r.sort((a,c)=>a.hunk.newStart-c.hunk.newStart);const l=[];for(const{hunk:a,stage:c,hunkIndex:p}of r){const S=Do(a).map(A=>({type:A.type,content:A.content,oldLineNumber:A.oldLineNumber,newLineNumber:A.newLineNumber,stage:c,hunkIndex:p}));l.push({headStart:a.oldStart,headLines:a.oldLines,wtStart:a.newStart,wtLines:a.newLines,lines:S,stages:new Set([c])})}return $o(l)}function $o(f){if(f.length<=1)return f;const r=[];let l=f[0];for(let a=1;a<f.length;a++){const c=f[a],p=l.wtStart+l.wtLines;c.wtStart<=p+3?l=Fo(l,c):(r.push(l),l=c)}return r.push(l),r}function Fo(f,r){const l=new Map,a=new Map,c=new Set;for(const h of f.lines)c.add(Sr(h)),h.newLineNumber!==void 0&&l.set(h.newLineNumber,h),h.oldLineNumber!==void 0&&h.type!=="Addition"&&a.set(h.oldLineNumber,h);const p=[...f.lines];for(const h of r.lines){const oe=Sr(h);if(!c.has(oe)){if(h.type==="Context"){const Te=h.newLineNumber!==void 0?l.get(h.newLineNumber):void 0,ue=h.oldLineNumber!==void 0?a.get(h.oldLineNumber):void 0;if(Te?.type==="Context"||ue?.type==="Context"){c.add(oe);continue}}p.push(h),c.add(oe),h.newLineNumber!==void 0&&l.set(h.newLineNumber,h),h.oldLineNumber!==void 0&&h.type!=="Addition"&&a.set(h.oldLineNumber,h)}}p.sort((h,oe)=>{const Te=h.newLineNumber??h.oldLineNumber??0,ue=oe.newLineNumber??oe.oldLineNumber??0;return Te-ue});const b=new Set([...f.stages,...r.stages]),S=Math.min(f.headStart,r.headStart),A=Math.min(f.wtStart,r.wtStart),F=Math.max(f.headStart+f.headLines,r.headStart+r.headLines),G=Math.max(f.wtStart+f.wtLines,r.wtStart+r.wtLines);return{headStart:S,headLines:F-S,wtStart:A,wtLines:G-A,lines:p,stages:b}}function Uo(f){const r=[],l=[];let a=f[0]?.headStart??1,c=f[0]?.wtStart??1;const p=(b,S,A)=>{let F=S;for(;F<A;)b.push(""),F++;return F};for(const b of f){a=p(r,a,b.headStart),c=p(l,c,b.wtStart);for(const S of b.lines)S.type==="Context"?(S.oldLineNumber!==void 0&&(a=p(r,a,S.oldLineNumber)),S.newLineNumber!==void 0&&(c=p(l,c,S.newLineNumber)),r.push(S.content),l.push(S.content),a++,c++):S.type==="Deletion"?(S.oldLineNumber!==void 0&&(a=p(r,a,S.oldLineNumber)),r.push(S.content),a++):S.type==="Addition"&&(S.newLineNumber!==void 0&&(c=p(l,c,S.newLineNumber)),l.push(S.content),c++)}return{oldContent:r.join(`
4
4
  `),newContent:l.join(`