@intent-hq/web 2.342.3 → 2.342.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 (143) hide show
  1. package/package.json +1 -1
  2. package/web/app/immutable/chunks/{D-rFVAfw.js → 1KURqqMz.js} +1 -1
  3. package/web/app/immutable/chunks/{CckCknq8.js → 3KbBjGJm.js} +1 -1
  4. package/web/app/immutable/chunks/{Dl2hKdK8.js → 5Cz4WZpZ.js} +1 -1
  5. package/web/app/immutable/chunks/{CdbkOJyf.js → 5KtPZQMj.js} +1 -1
  6. package/web/app/immutable/chunks/{Cy0flNZe.js → 7HuWq_hr.js} +1 -1
  7. package/web/app/immutable/chunks/{DpcFZgpL.js → 8a4AenV7.js} +1 -1
  8. package/web/app/immutable/chunks/{DOBhNX3p.js → B1NzFEuO.js} +2 -2
  9. package/web/app/immutable/chunks/{D7hU4nML.js → B1cObw1z.js} +1 -1
  10. package/web/app/immutable/chunks/{BSOl3D1L.js → B2sG3ycV.js} +3 -3
  11. package/web/app/immutable/chunks/{CWZ7mpOj.js → B6A6cgF-.js} +1 -1
  12. package/web/app/immutable/chunks/{CD9jD52C.js → B8XCEZm-.js} +1 -1
  13. package/web/app/immutable/chunks/{BU0CN-Mi.js → B9Rr6BpD.js} +1 -1
  14. package/web/app/immutable/chunks/{DJXGgEUK.js → BAdws6Fu.js} +2 -2
  15. package/web/app/immutable/chunks/{DF2UsCIw.js → BFw-QJi_.js} +1 -1
  16. package/web/app/immutable/chunks/{DVIMjmZu.js → BGlD6YLC.js} +1 -1
  17. package/web/app/immutable/chunks/{DKru45dM.js → BGqqSLU-.js} +2 -2
  18. package/web/app/immutable/chunks/{CaxQfH_l.js → BI2l6wE6.js} +1 -1
  19. package/web/app/immutable/chunks/{D16XyjdQ.js → BONdHkQs.js} +1 -1
  20. package/web/app/immutable/chunks/{Poqpz709.js → BRm0glkU.js} +1 -1
  21. package/web/app/immutable/chunks/{WWdulpT-.js → BS1TtWt_.js} +1 -1
  22. package/web/app/immutable/chunks/{Cf1W9csW.js → BVg9yzXR.js} +1 -1
  23. package/web/app/immutable/chunks/{1i6_ayQa.js → Bau8iVXk.js} +1 -1
  24. package/web/app/immutable/chunks/{DjNKFaGs.js → Bb4ph25I.js} +1 -1
  25. package/web/app/immutable/chunks/{C_IbqdcR.js → BbmXR-SH.js} +1 -1
  26. package/web/app/immutable/chunks/{BCQuOTkB.js → BkT4AaId.js} +1 -1
  27. package/web/app/immutable/chunks/{_pQ-TiLj.js → BmytRNPE.js} +1 -1
  28. package/web/app/immutable/chunks/{BzjYW7xk.js → BnMYxi1T.js} +1 -1
  29. package/web/app/immutable/chunks/{CGtv3cos.js → BtxvvbW8.js} +1 -1
  30. package/web/app/immutable/chunks/{DeG9fDv0.js → BtxzFh2d.js} +1 -1
  31. package/web/app/immutable/chunks/{BquLFLry.js → BuvdM8FN.js} +2 -2
  32. package/web/app/immutable/chunks/{0x6dqQIa.js → BvQPs1Xx.js} +1 -1
  33. package/web/app/immutable/chunks/{C4UdVbF_.js → BwfLVMMM.js} +1 -1
  34. package/web/app/immutable/chunks/{DfB0B1KO.js → C17WHWXN.js} +3 -3
  35. package/web/app/immutable/chunks/{BV0CWJbU.js → C3fOi3VT.js} +1 -1
  36. package/web/app/immutable/chunks/{BHJLFedJ.js → C4jx-XZh.js} +4 -4
  37. package/web/app/immutable/chunks/{CU4q4tsx.js → C4lA6Qko.js} +1 -1
  38. package/web/app/immutable/chunks/{C4GpMBeP.js → C8qlJ0Ks.js} +1 -1
  39. package/web/app/immutable/chunks/{Coblm6PA.js → CAZtHQBF.js} +4 -4
  40. package/web/app/immutable/chunks/{BW_B7BlJ.js → CBR1HO24.js} +1 -1
  41. package/web/app/immutable/chunks/{CUftuAIh.js → CD69NP_A.js} +1 -1
  42. package/web/app/immutable/chunks/{BawM1GKD.js → CEhJvA02.js} +1 -1
  43. package/web/app/immutable/chunks/{B-sO71tc.js → CFR39oq5.js} +1 -1
  44. package/web/app/immutable/chunks/{BMCPlkQb.js → CFgR764H.js} +1 -1
  45. package/web/app/immutable/chunks/{DRVWOSo1.js → CNpCGMBp.js} +1 -1
  46. package/web/app/immutable/chunks/{CSQ_fnji.js → COgT-EXe.js} +1 -1
  47. package/web/app/immutable/chunks/{8u8SxllG.js → CQWXQG41.js} +1 -1
  48. package/web/app/immutable/chunks/{DefhHE22.js → CRVLrgxJ.js} +1 -1
  49. package/web/app/immutable/chunks/{Cl-TOt-H.js → CRgdXK-6.js} +1 -1
  50. package/web/app/immutable/chunks/{DXSPB--o.js → CTCotWuX.js} +1 -1
  51. package/web/app/immutable/chunks/{BllPddzf.js → CUMVOvj8.js} +1 -1
  52. package/web/app/immutable/chunks/{CO7_izcq.js → CUfd6v40.js} +1 -1
  53. package/web/app/immutable/chunks/{CmPCJSSG.js → CVKwboeu.js} +1 -1
  54. package/web/app/immutable/chunks/{cdv6-ttx.js → CYkYJCIe.js} +1 -1
  55. package/web/app/immutable/chunks/{Bj7GSp-O.js → C_7QOYdw.js} +1 -1
  56. package/web/app/immutable/chunks/{CIwBzQHU.js → C_hDvi-s.js} +1 -1
  57. package/web/app/immutable/chunks/{Dw7vCIPg.js → Cf4bZipG.js} +1 -1
  58. package/web/app/immutable/chunks/{Du8MDRKf.js → CgO3N0Eh.js} +12 -12
  59. package/web/app/immutable/chunks/{BG2VczVu.js → ChiWSNHv.js} +3 -3
  60. package/web/app/immutable/chunks/{CmOwZBIE.js → Ci8LBOxa.js} +1 -1
  61. package/web/app/immutable/chunks/{DjXa_Id4.js → CkMQV99G.js} +1 -1
  62. package/web/app/immutable/chunks/{Bpcv_J4e.js → CkPDW0xR.js} +1 -1
  63. package/web/app/immutable/chunks/{CnnuzDl4.js → ClPZ-dnm.js} +1 -1
  64. package/web/app/immutable/chunks/{BEaoRHTk.js → CmwgdR7R.js} +1 -1
  65. package/web/app/immutable/chunks/{CMzyDAl1.js → CpMT4a7n.js} +2 -2
  66. package/web/app/immutable/chunks/{CIzDk_zI.js → CpUxooti.js} +1 -1
  67. package/web/app/immutable/chunks/{BNWVLlL9.js → CqND6pvG.js} +1 -1
  68. package/web/app/immutable/chunks/{Bf8tb4wz.js → Cqu-aR4t.js} +1 -1
  69. package/web/app/immutable/chunks/{CBGE1E0g.js → Cth8kMss.js} +1 -1
  70. package/web/app/immutable/chunks/{zCJVgQ0H.js → CvZnx98i.js} +1 -1
  71. package/web/app/immutable/chunks/{CNuU1B-f.js → CxMzoxX3.js} +1 -1
  72. package/web/app/immutable/chunks/{CL9t4ZAe.js → CxvlNIyu.js} +1 -1
  73. package/web/app/immutable/chunks/{CVw1BeiY.js → CyAWaGyu.js} +1 -1
  74. package/web/app/immutable/chunks/{DNjSjUPQ.js → D-CZRaat.js} +1 -1
  75. package/web/app/immutable/chunks/{SCDnOgXN.js → D-XhH1EI.js} +1 -1
  76. package/web/app/immutable/chunks/{DfTEJbwY.js → D0LCHW4n.js} +2 -2
  77. package/web/app/immutable/chunks/{DQQdA4K3.js → D0ypGvvA.js} +1 -1
  78. package/web/app/immutable/chunks/{CE0Qbu3w.js → D4m_3H3b.js} +1 -1
  79. package/web/app/immutable/chunks/{DtIYVb7q.js → D5YUYmA3.js} +1 -1
  80. package/web/app/immutable/chunks/{DuqPG5hn.js → D78kBZDL.js} +3 -3
  81. package/web/app/immutable/chunks/{DuberDif.js → DB4b4MsO.js} +1 -1
  82. package/web/app/immutable/chunks/{BIqvZNBF.js → DDm2Bs3C.js} +1 -1
  83. package/web/app/immutable/chunks/{DfpuTCWq.js → DEgM7-3u.js} +1 -1
  84. package/web/app/immutable/chunks/{fPSk9nMW.js → DEpTpabV.js} +1 -1
  85. package/web/app/immutable/chunks/{DXuzXMqh.js → DIw4K70V.js} +1 -1
  86. package/web/app/immutable/chunks/{DBAiCEuC.js → DKTzyP0R.js} +1 -1
  87. package/web/app/immutable/chunks/{BiPV5llL.js → DMIUJOUV.js} +5 -5
  88. package/web/app/immutable/chunks/{LdScknGk.js → DOJHO8tY.js} +1 -1
  89. package/web/app/immutable/chunks/{CvpN2ntt.js → DQDdpgUG.js} +1 -1
  90. package/web/app/immutable/chunks/{DAHG8VFe.js → DRUHoPvO.js} +1 -1
  91. package/web/app/immutable/chunks/{BCFyx55K.js → DRlYzKsv.js} +1 -1
  92. package/web/app/immutable/chunks/{CR0wuNAQ.js → DSnMQfNF.js} +1 -1
  93. package/web/app/immutable/chunks/{CXtWfXOk.js → DTnOOoUt.js} +1 -1
  94. package/web/app/immutable/chunks/{lApOuXc7.js → DUpM6F7J.js} +1 -1
  95. package/web/app/immutable/chunks/{D3dEuJnw.js → DV-obrTk.js} +1 -1
  96. package/web/app/immutable/chunks/{B1cHX7Xk.js → DXeiIMAg.js} +1 -1
  97. package/web/app/immutable/chunks/{DyYampZL.js → DYJF6z7c.js} +4 -4
  98. package/web/app/immutable/chunks/{C8ljN5z8.js → Dc7eHIw9.js} +1 -1
  99. package/web/app/immutable/chunks/{CSLJ-jez.js → DdI6xQc_.js} +1 -1
  100. package/web/app/immutable/chunks/{BwFLOTNQ.js → DfEfJ41H.js} +1 -1
  101. package/web/app/immutable/chunks/{DRs35PDf.js → DgtpjRdr.js} +1 -1
  102. package/web/app/immutable/chunks/{Bo0nUuSe.js → DjFKdLks.js} +1 -1
  103. package/web/app/immutable/chunks/{cw-D0WSV.js → DkqCzXww.js} +1 -1
  104. package/web/app/immutable/chunks/{OvxzalpE.js → Dt0R2Ktk.js} +1 -1
  105. package/web/app/immutable/chunks/{wLlGz-Fv.js → DuD5Wxpm.js} +1 -1
  106. package/web/app/immutable/chunks/{B_D1XvND.js → DumOb8FY.js} +1 -1
  107. package/web/app/immutable/chunks/{CJdFZ1LA.js → Dvj55vXN.js} +2 -2
  108. package/web/app/immutable/chunks/{CTg5aOyU.js → DwdKjBer.js} +1 -1
  109. package/web/app/immutable/chunks/{B03x8aVM.js → DxtKR96k.js} +1 -1
  110. package/web/app/immutable/chunks/{BHUnRRNH.js → DxzBH9If.js} +1 -1
  111. package/web/app/immutable/chunks/{D9l0jrxc.js → H0MOjDP3.js} +1 -1
  112. package/web/app/immutable/chunks/{CnysHsqM.js → L-ubqpH9.js} +3 -3
  113. package/web/app/immutable/chunks/{BAKjdnbI.js → LPPUEsZT.js} +1 -1
  114. package/web/app/immutable/chunks/{NjlV1WJd.js → Os4z29kc.js} +1 -1
  115. package/web/app/immutable/chunks/{B1arNP2P.js → PeAPKDUF.js} +1 -1
  116. package/web/app/immutable/chunks/{ARTboVs8.js → WIMBPpA0.js} +1 -1
  117. package/web/app/immutable/chunks/{Cu9fTXDM.js → ZvX_fEaP.js} +1 -1
  118. package/web/app/immutable/chunks/{DlTU3Vab.js → _d_cQJ1G.js} +1 -1
  119. package/web/app/immutable/chunks/{DrW1ovmd.js → bijN4Zym.js} +1 -1
  120. package/web/app/immutable/chunks/{Bv_1j8Lx.js → jqA28ECO.js} +1 -1
  121. package/web/app/immutable/chunks/{DcBQoqUj.js → mS-9NIEA.js} +4 -4
  122. package/web/app/immutable/chunks/{BYD1cpfb.js → t9E12oJ3.js} +1 -1
  123. package/web/app/immutable/chunks/{BrPW9js0.js → uZlZnPJv.js} +1 -1
  124. package/web/app/immutable/chunks/{BV3VSi1D.js → zGggXnza.js} +2 -2
  125. package/web/app/immutable/chunks/{BGfE1mTB.js → ztS7waxk.js} +1 -1
  126. package/web/app/immutable/entry/{app.C_tZYG_a.js → app.4WfHy_Zl.js} +2 -2
  127. package/web/app/immutable/entry/start.gUgDD-in.js +1 -0
  128. package/web/app/immutable/nodes/{0.CyLJTlGn.js → 0.vO0Tybn6.js} +1 -1
  129. package/web/app/immutable/nodes/{1.C3ky_JLm.js → 1.Bfh_ynUg.js} +1 -1
  130. package/web/app/immutable/nodes/{10.CiQpynoE.js → 10.CbLOWaiK.js} +1 -1
  131. package/web/app/immutable/nodes/{14.CHWSdLUD.js → 14.CgOJLuna.js} +1 -1
  132. package/web/app/immutable/nodes/{17.Bt_3PCle.js → 17.CeWDuaDv.js} +2 -2
  133. package/web/app/immutable/nodes/{2.uiZCQd8c.js → 2.BJIFazOq.js} +4 -4
  134. package/web/app/immutable/nodes/{3.L51ZJZBh.js → 3.BfaIoPwI.js} +1 -1
  135. package/web/app/immutable/nodes/{4.DHO0h1Bf.js → 4.CIKjzhEc.js} +1 -1
  136. package/web/app/immutable/nodes/{5.CXlGhIbG.js → 5.D0xlWd9R.js} +1 -1
  137. package/web/app/immutable/nodes/{6.D3CgeUJf.js → 6.CXDD93jK.js} +1 -1
  138. package/web/app/immutable/nodes/{7.bpZwTl2d.js → 7.Om4HLRbN.js} +1 -1
  139. package/web/app/immutable/nodes/{8.DP5s58EM.js → 8.3MB3X1xo.js} +4 -4
  140. package/web/app/immutable/nodes/{9.DWXaoBWu.js → 9.CawzZbso.js} +4 -4
  141. package/web/app/version.json +1 -1
  142. package/web/index.html +9 -9
  143. package/web/app/immutable/entry/start.Cq4TY_yo.js +0 -1
@@ -1,4 +1,4 @@
1
- import{s as xe}from"./cdv6-ttx.js";import{p as be}from"./Bpcv_J4e.js";import{b as C,a6 as Ce,W as ae,q as ee,aX as we,B as Te,ay as te,b8 as B,aW as Z,a_ as Le,V as $e,b0 as Ae,Y as Fe,U as _e,aZ as Ne,O as Me,ao as ke,r as Ve}from"./DyYampZL.js";import{p as ze}from"./2gme4FSl.js";import{f as O,o as Q}from"./B1cHX7Xk.js";function De(t){var a=0,l=t.children,n=l&&l.length;if(!n)a=1;else for(;--n>=0;)a+=l[n].value;t.value=a}function Pe(){return this.eachAfter(De)}function Be(t,a){let l=-1;for(const n of this)t.call(a,n,++l,this);return this}function We(t,a){for(var l=this,n=[l],s,r,h=-1;l=n.pop();)if(t.call(a,l,++h,this),s=l.children)for(r=s.length-1;r>=0;--r)n.push(s[r]);return this}function Ee(t,a){for(var l=this,n=[l],s=[],r,h,d,f=-1;l=n.pop();)if(s.push(l),r=l.children)for(h=0,d=r.length;h<d;++h)n.push(r[h]);for(;l=s.pop();)t.call(a,l,++f,this);return this}function Re(t,a){let l=-1;for(const n of this)if(t.call(a,n,++l,this))return n}function He(t){return this.eachAfter(function(a){for(var l=+t(a.data)||0,n=a.children,s=n&&n.length;--s>=0;)l+=n[s].value;a.value=l})}function Ie(t){return this.eachBefore(function(a){a.children&&a.children.sort(t)})}function Oe(t){for(var a=this,l=qe(a,t),n=[a];a!==l;)a=a.parent,n.push(a);for(var s=n.length;t!==l;)n.splice(s,0,t),t=t.parent;return n}function qe(t,a){if(t===a)return t;var l=t.ancestors(),n=a.ancestors(),s=null;for(t=l.pop(),a=n.pop();t===a;)s=t,t=l.pop(),a=n.pop();return s}function Ge(){for(var t=this,a=[t];t=t.parent;)a.push(t);return a}function Xe(){return Array.from(this)}function Ye(){var t=[];return this.eachBefore(function(a){a.children||t.push(a)}),t}function je(){var t=this,a=[];return t.each(function(l){l!==t&&a.push({source:l.parent,target:l})}),a}function*Ue(){var t=this,a,l=[t],n,s,r;do for(a=l.reverse(),l=[];t=a.pop();)if(yield t,n=t.children)for(s=0,r=n.length;s<r;++s)l.push(n[s]);while(l.length)}function ne(t,a){t instanceof Map?(t=[void 0,t],a===void 0&&(a=Ke)):a===void 0&&(a=Je);for(var l=new Y(t),n,s=[l],r,h,d,f;n=s.pop();)if((h=a(n.data))&&(f=(h=Array.from(h)).length))for(n.children=h,d=f-1;d>=0;--d)s.push(r=h[d]=new Y(h[d])),r.parent=n,r.depth=n.depth+1;return l.eachBefore(et)}function Ze(){return ne(this).eachBefore(Qe)}function Je(t){return t.children}function Ke(t){return Array.isArray(t)?t[1]:null}function Qe(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function et(t){var a=0;do t.height=a;while((t=t.parent)&&t.height<++a)}function Y(t){this.data=t,this.depth=this.height=0,this.parent=null}Y.prototype=ne.prototype={constructor:Y,count:Pe,each:Be,eachAfter:Ee,eachBefore:We,find:Re,sum:He,sort:Ie,path:Oe,ancestors:Ge,descendants:Xe,leaves:Ye,links:je,copy:Ze,[Symbol.iterator]:Ue};function tt(t){if(typeof t!="function")throw new Error;return t}function q(){return 0}function G(t){return function(){return t}}function at(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function oe(t,a,l,n,s){for(var r=t.children,h,d=-1,f=r.length,o=t.value&&(n-a)/t.value;++d<f;)h=r[d],h.y0=l,h.y1=s,h.x0=a,h.x1=a+=h.value*o}Object.create(Y.prototype);function ce(t,a,l,n,s){for(var r=t.children,h,d=-1,f=r.length,o=t.value&&(s-l)/t.value;++d<f;)h=r[d],h.x0=a,h.x1=n,h.y0=l,h.y1=l+=h.value*o}var he=(1+Math.sqrt(5))/2;function de(t,a,l,n,s,r){for(var h=[],d=a.children,f,o,u=0,S=0,i=d.length,v,x,g=a.value,p,b,_,$,z,R,N;u<i;){v=s-l,x=r-n;do p=d[S++].value;while(!p&&S<i);for(b=_=p,R=Math.max(x/v,v/x)/(g*t),N=p*p*R,z=Math.max(_/N,N/b);S<i;++S){if(p+=o=d[S].value,o<b&&(b=o),o>_&&(_=o),N=p*p*R,$=Math.max(_/N,N/b),$>z){p-=o;break}z=$}h.push(f={value:p,dice:v<x,children:d.slice(u,S)}),f.dice?oe(f,l,n,s,g?n+=x*p/g:r):ce(f,l,n,g?l+=v*p/g:s,r),g-=p,u=S}return h}var nt=(function t(a){function l(n,s,r,h,d){de(a,n,s,r,h,d)}return l.ratio=function(n){return t((n=+n)>1?n:1)},l})(he);function lt(){var t=nt,a=!1,l=1,n=1,s=[0],r=q,h=q,d=q,f=q,o=q;function u(i){return i.x0=i.y0=0,i.x1=l,i.y1=n,i.eachBefore(S),s=[0],a&&i.eachBefore(at),i}function S(i){var v=s[i.depth],x=i.x0+v,g=i.y0+v,p=i.x1-v,b=i.y1-v;p<x&&(x=p=(x+p)/2),b<g&&(g=b=(g+b)/2),i.x0=x,i.y0=g,i.x1=p,i.y1=b,i.children&&(v=s[i.depth+1]=r(i)/2,x+=o(i)-v,g+=h(i)-v,p-=d(i)-v,b-=f(i)-v,p<x&&(x=p=(x+p)/2),b<g&&(g=b=(g+b)/2),t(i,x,g,p,b))}return u.round=function(i){return arguments.length?(a=!!i,u):a},u.size=function(i){return arguments.length?(l=+i[0],n=+i[1],u):[l,n]},u.tile=function(i){return arguments.length?(t=tt(i),u):t},u.padding=function(i){return arguments.length?u.paddingInner(i).paddingOuter(i):u.paddingInner()},u.paddingInner=function(i){return arguments.length?(r=typeof i=="function"?i:G(+i),u):r},u.paddingOuter=function(i){return arguments.length?u.paddingTop(i).paddingRight(i).paddingBottom(i).paddingLeft(i):u.paddingTop()},u.paddingTop=function(i){return arguments.length?(h=typeof i=="function"?i:G(+i),u):h},u.paddingRight=function(i){return arguments.length?(d=typeof i=="function"?i:G(+i),u):d},u.paddingBottom=function(i){return arguments.length?(f=typeof i=="function"?i:G(+i),u):f},u.paddingLeft=function(i){return arguments.length?(o=typeof i=="function"?i:G(+i),u):o},u}(function t(a){function l(n,s,r,h,d){if((f=n._squarify)&&f.ratio===a)for(var f,o,u,S,i=-1,v,x=f.length,g=n.value;++i<x;){for(o=f[i],u=o.children,S=o.value=0,v=u.length;S<v;++S)o.value+=u[S].value;o.dice?oe(o,s,r,h,g?r+=(d-r)*o.value/g:d):ce(o,s,r,g?s+=(h-s)*o.value/g:h,d),g-=o.value}else n._squarify=f=de(a,n,s,r,h,d),f.ratio=a}return l.ratio=function(n){return t((n=+n)>1?n:1)},l})(he);var E,ue=(E=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=Le,this.getAccTitle=$e,this.setDiagramTitle=Ae,this.getDiagramTitle=Fe,this.getAccDescription=_e,this.setAccDescription=Ne}getNodes(){return this.nodes}getConfig(){const a=Me,l=ae();return ee({...a.treemap,...l.treemap??{}})}addNode(a,l){this.nodes.push(a),this.levels.set(a,l),l===0&&(this.outerNodes.push(a),this.root??=a)}getRoot(){return{name:"",children:this.outerNodes}}addClass(a,l){const n=this.classes.get(a)??{id:a,styles:[],textStyles:[]},s=l.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");s&&s.forEach(r=>{ke(r)&&(n?.textStyles?n.textStyles.push(r):n.textStyles=[r]),n?.styles?n.styles.push(r):n.styles=[r]}),this.classes.set(a,n)}getClasses(){return this.classes}getStylesForClass(a){return this.classes.get(a)?.styles??[]}clear(){Ve(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}},C(E,"TreeMapDB"),E);function pe(t){if(!t.length)return[];const a=[],l=[];return t.forEach(n=>{const s={name:n.name,children:n.type==="Leaf"?void 0:[]};for(s.classSelector=n?.classSelector,n?.cssCompiledStyles&&(s.cssCompiledStyles=n.cssCompiledStyles),n.type==="Leaf"&&n.value!==void 0&&(s.value=n.value);l.length>0&&l[l.length-1].level>=n.level;)l.pop();if(l.length===0)a.push(s);else{const r=l[l.length-1].node;r.children?r.children.push(s):r.children=[s]}n.type!=="Leaf"&&l.push({node:s,level:n.level})}),a}C(pe,"buildHierarchy");var st=C((t,a)=>{be(t,a);const l=[];for(const r of t.TreemapRows??[])r.$type==="ClassDefStatement"&&a.addClass(r.className??"",r.styleText??"");for(const r of t.TreemapRows??[]){const h=r.item;if(!h)continue;const d=r.indent?parseInt(r.indent):0,f=rt(h),o=h.classSelector?a.getStylesForClass(h.classSelector):[],u=o.length>0?o:void 0,S={level:d,name:f,type:h.$type,value:h.value,classSelector:h.classSelector,cssCompiledStyles:u};l.push(S)}const n=pe(l),s=C((r,h)=>{for(const d of r)a.addNode(d,h),d.children&&d.children.length>0&&s(d.children,h+1)},"addNodesRecursively");s(n,0)},"populate"),rt=C(t=>t.name?String(t.name):"","getItemName"),fe={parser:{yy:void 0},parse:C(async t=>{try{const l=await ze("treemap",t);te.debug("Treemap AST:",l);const n=fe.parser?.yy;if(!(n instanceof ue))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");st(l,n)}catch(a){throw te.error("Error parsing treemap:",a),a}},"parse")},it=10,W=10,X=25,ot=C((t,a,l,n)=>{const s=n.db,r=s.getConfig(),h=r.padding??it,d=s.getDiagramTitle(),f=s.getRoot(),{themeVariables:o}=ae();if(!f)return;const u=d?30:0,S=we(a),i=r.nodeWidth?r.nodeWidth*W:960,v=r.nodeHeight?r.nodeHeight*W:500,x=i,g=v+u;S.attr("viewBox",`0 0 ${x} ${g}`),Te(S,g,x,r.useMaxWidth);let p;try{const e=r.valueFormat||",";if(e==="$0,0")p=C(c=>"$"+O(",")(c),"valueFormat");else if(e.startsWith("$")&&e.includes(",")){const c=/\.\d+/.exec(e),m=c?c[0]:"";p=C(w=>"$"+O(","+m)(w),"valueFormat")}else if(e.startsWith("$")){const c=e.substring(1);p=C(m=>"$"+O(c||"")(m),"valueFormat")}else p=O(e)}catch(e){te.error("Error creating format function:",e),p=O(",")}const b=Q().range(["transparent",o.cScale0,o.cScale1,o.cScale2,o.cScale3,o.cScale4,o.cScale5,o.cScale6,o.cScale7,o.cScale8,o.cScale9,o.cScale10,o.cScale11]),_=Q().range(["transparent",o.cScalePeer0,o.cScalePeer1,o.cScalePeer2,o.cScalePeer3,o.cScalePeer4,o.cScalePeer5,o.cScalePeer6,o.cScalePeer7,o.cScalePeer8,o.cScalePeer9,o.cScalePeer10,o.cScalePeer11]),$=Q().range([o.cScaleLabel0,o.cScaleLabel1,o.cScaleLabel2,o.cScaleLabel3,o.cScaleLabel4,o.cScaleLabel5,o.cScaleLabel6,o.cScaleLabel7,o.cScaleLabel8,o.cScaleLabel9,o.cScaleLabel10,o.cScaleLabel11]);d&&S.append("text").attr("x",x/2).attr("y",u/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(d);const z=S.append("g").attr("transform",`translate(0, ${u})`).attr("class","treemapContainer"),R=ne(f).sum(e=>e.value??0).sort((e,c)=>(c.value??0)-(e.value??0)),le=lt().size([i,v]).paddingTop(e=>e.children&&e.children.length>0?X+W:0).paddingInner(h).paddingLeft(e=>e.children&&e.children.length>0?W:0).paddingRight(e=>e.children&&e.children.length>0?W:0).paddingBottom(e=>e.children&&e.children.length>0?W:0).round(!0)(R),me=le.descendants().filter(e=>e.children&&e.children.length>0),H=z.selectAll(".treemapSection").data(me).enter().append("g").attr("class","treemapSection").attr("transform",e=>`translate(${e.x0},${e.y0})`);H.append("rect").attr("width",e=>e.x1-e.x0).attr("height",X).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",e=>e.depth===0?"display: none;":""),H.append("clipPath").attr("id",(e,c)=>`clip-section-${a}-${c}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-12)).attr("height",X),H.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class",(e,c)=>`treemapSection section${c}`).attr("fill",e=>b(e.data.name)).attr("fill-opacity",.6).attr("stroke",e=>_(e.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",e=>{if(e.depth===0)return"display: none;";const c=B({cssCompiledStyles:e.data.cssCompiledStyles});return c.nodeStyles+";"+c.borderStyles.join(";")}),H.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",X/2).attr("dominant-baseline","middle").text(e=>e.depth===0?"":e.data.name).attr("font-weight","bold").attr("clip-path",(e,c)=>`url(#clip-section-${a}-${c})`).attr("style",e=>{if(e.depth===0)return"display: none;";const c="dominant-baseline: middle; font-size: 12px; fill:"+$(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",m=B({cssCompiledStyles:e.data.cssCompiledStyles});return c+m.labelStyles.replace("color:","fill:")}).each(function(e){if(e.depth===0)return;const c=Z(this),m=e.data.name;c.text(m);const w=e.x1-e.x0,L=6;let T;r.showValues!==!1&&e.value?T=w-10-30-10-L:T=w-L-6;const y=Math.max(15,T),M=c.node();if(M.getComputedTextLength()>y){let V=m;for(;V.length>0;){if(V=m.substring(0,V.length-1),V.length===0){c.text("..."),M.getComputedTextLength()>y&&c.text("");break}if(c.text(V+"..."),M.getComputedTextLength()<=y)break}}}),r.showValues!==!1&&H.append("text").attr("class","treemapSectionValue").attr("x",e=>e.x1-e.x0-10).attr("y",X/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(e=>e.value?p(e.value):"").attr("font-style","italic").attr("style",e=>{if(e.depth===0)return"display: none;";const c="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+$(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",m=B({cssCompiledStyles:e.data.cssCompiledStyles});return c+m.labelStyles.replace("color:","fill:")});const se=le.leaves(),A=se.length>20,ge=A?16:38,j=A?14:28,D=A?4:8,I=A?4:6,J=A?2:4,re=A?8:10,K=A?1:2,U=z.selectAll(".treemapLeafGroup").data(se).enter().append("g").attr("class",(e,c)=>`treemapNode treemapLeafGroup leaf${c}${e.data.classSelector?` ${e.data.classSelector}`:""}x`).attr("transform",e=>`translate(${e.x0},${e.y0})`);U.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class","treemapLeaf").attr("fill",e=>e.parent?b(e.parent.data.name):b(e.data.name)).attr("style",e=>B({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",e=>e.parent?b(e.parent.data.name):b(e.data.name)).attr("stroke-width",3),U.append("clipPath").attr("id",(e,c)=>`clip-${a}-${c}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-4)).attr("height",e=>Math.max(0,e.y1-e.y0-4)),U.append("text").attr("class","treemapLabel").attr("x",e=>(e.x1-e.x0)/2).attr("y",e=>(e.y1-e.y0)/2).attr("style",e=>{const c=`text-anchor: middle; dominant-baseline: middle; font-size: ${ge}px;fill:`+$(e.data.name)+";",m=B({cssCompiledStyles:e.data.cssCompiledStyles});return c+m.labelStyles.replace("color:","fill:")}).attr("clip-path",(e,c)=>`url(#clip-${a}-${c})`).text(e=>e.data.name).each(function(e){const c=Z(this),m=e.x1-e.x0,w=e.y1-e.y0,L=c.node(),T=m-2*J,P=w-2*J;if(T<re||P<re){c.style("display","none");return}let y=parseInt(c.style("font-size"),10);const M=.6;for(;L.getComputedTextLength()>T&&y>D;)y--,c.style("font-size",`${y}px`);let F=Math.max(I,Math.min(j,Math.round(y*M))),k=y+K+F;for(;k>P&&y>D&&(y--,F=Math.max(I,Math.min(j,Math.round(y*M))),!(F<I&&y===D));)c.style("font-size",`${y}px`),k=y+K+F;c.style("font-size",`${y}px`),A?(y<D||P<D)&&c.style("display","none"):(L.getComputedTextLength()>T||y<D||P<y)&&c.style("display","none")}),r.showValues!==!1&&U.append("text").attr("class","treemapValue").attr("x",c=>(c.x1-c.x0)/2).attr("y",function(c){return(c.y1-c.y0)/2}).attr("style",c=>{const m=`text-anchor: middle; dominant-baseline: hanging; font-size: ${j}px;fill:`+$(c.data.name)+";",w=B({cssCompiledStyles:c.data.cssCompiledStyles});return m+w.labelStyles.replace("color:","fill:")}).attr("clip-path",(c,m)=>`url(#clip-${a}-${m})`).text(c=>c.value?p(c.value):"").each(function(c){const m=Z(this),w=this.parentNode;if(!w){m.style("display","none");return}const L=Z(w).select(".treemapLabel");if(L.empty()||L.style("display")==="none"){m.style("display","none");return}const T=parseFloat(L.style("font-size")),y=Math.max(I,Math.min(j,Math.round(T*.6)));m.style("font-size",`${y}px`);const F=(c.y1-c.y0)/2+T/2+K;m.attr("y",F);const k=c.x1-c.x0,ie=c.y1-c.y0-4,ve=k-2*J;m.node().getComputedTextLength()>ve||F+y>ie||y<I?m.style("display","none"):m.style("display",null)});const ye=r.diagramPadding??8;xe(S,ye,"flowchart",r?.useMaxWidth||!1)},"draw"),ct=C(function(t,a){return a.db.getClasses()},"getClasses"),ht={draw:ot,getClasses:ct},dt={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelFontSize:"12px",valueFontSize:"10px",titleFontSize:"14px"},ut=C(({treemap:t}={})=>{const a=Ce(),l=ae(),n=ee(a,l.themeVariables),s=ee(dt,t),r=s.titleColor??n.titleColor,h=s.labelColor??n.textColor,d=s.valueColor??n.textColor;return`
1
+ import{s as xe}from"./CYkYJCIe.js";import{p as be}from"./CkPDW0xR.js";import{b as C,a6 as Ce,W as ae,q as ee,aX as we,B as Te,ay as te,b8 as B,aW as Z,a_ as Le,V as $e,b0 as Ae,Y as Fe,U as _e,aZ as Ne,O as Me,ao as ke,r as Ve}from"./DYJF6z7c.js";import{p as ze}from"./2gme4FSl.js";import{f as O,o as Q}from"./DXeiIMAg.js";function De(t){var a=0,l=t.children,n=l&&l.length;if(!n)a=1;else for(;--n>=0;)a+=l[n].value;t.value=a}function Pe(){return this.eachAfter(De)}function Be(t,a){let l=-1;for(const n of this)t.call(a,n,++l,this);return this}function We(t,a){for(var l=this,n=[l],s,r,h=-1;l=n.pop();)if(t.call(a,l,++h,this),s=l.children)for(r=s.length-1;r>=0;--r)n.push(s[r]);return this}function Ee(t,a){for(var l=this,n=[l],s=[],r,h,d,f=-1;l=n.pop();)if(s.push(l),r=l.children)for(h=0,d=r.length;h<d;++h)n.push(r[h]);for(;l=s.pop();)t.call(a,l,++f,this);return this}function Re(t,a){let l=-1;for(const n of this)if(t.call(a,n,++l,this))return n}function He(t){return this.eachAfter(function(a){for(var l=+t(a.data)||0,n=a.children,s=n&&n.length;--s>=0;)l+=n[s].value;a.value=l})}function Ie(t){return this.eachBefore(function(a){a.children&&a.children.sort(t)})}function Oe(t){for(var a=this,l=qe(a,t),n=[a];a!==l;)a=a.parent,n.push(a);for(var s=n.length;t!==l;)n.splice(s,0,t),t=t.parent;return n}function qe(t,a){if(t===a)return t;var l=t.ancestors(),n=a.ancestors(),s=null;for(t=l.pop(),a=n.pop();t===a;)s=t,t=l.pop(),a=n.pop();return s}function Ge(){for(var t=this,a=[t];t=t.parent;)a.push(t);return a}function Xe(){return Array.from(this)}function Ye(){var t=[];return this.eachBefore(function(a){a.children||t.push(a)}),t}function je(){var t=this,a=[];return t.each(function(l){l!==t&&a.push({source:l.parent,target:l})}),a}function*Ue(){var t=this,a,l=[t],n,s,r;do for(a=l.reverse(),l=[];t=a.pop();)if(yield t,n=t.children)for(s=0,r=n.length;s<r;++s)l.push(n[s]);while(l.length)}function ne(t,a){t instanceof Map?(t=[void 0,t],a===void 0&&(a=Ke)):a===void 0&&(a=Je);for(var l=new Y(t),n,s=[l],r,h,d,f;n=s.pop();)if((h=a(n.data))&&(f=(h=Array.from(h)).length))for(n.children=h,d=f-1;d>=0;--d)s.push(r=h[d]=new Y(h[d])),r.parent=n,r.depth=n.depth+1;return l.eachBefore(et)}function Ze(){return ne(this).eachBefore(Qe)}function Je(t){return t.children}function Ke(t){return Array.isArray(t)?t[1]:null}function Qe(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function et(t){var a=0;do t.height=a;while((t=t.parent)&&t.height<++a)}function Y(t){this.data=t,this.depth=this.height=0,this.parent=null}Y.prototype=ne.prototype={constructor:Y,count:Pe,each:Be,eachAfter:Ee,eachBefore:We,find:Re,sum:He,sort:Ie,path:Oe,ancestors:Ge,descendants:Xe,leaves:Ye,links:je,copy:Ze,[Symbol.iterator]:Ue};function tt(t){if(typeof t!="function")throw new Error;return t}function q(){return 0}function G(t){return function(){return t}}function at(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function oe(t,a,l,n,s){for(var r=t.children,h,d=-1,f=r.length,o=t.value&&(n-a)/t.value;++d<f;)h=r[d],h.y0=l,h.y1=s,h.x0=a,h.x1=a+=h.value*o}Object.create(Y.prototype);function ce(t,a,l,n,s){for(var r=t.children,h,d=-1,f=r.length,o=t.value&&(s-l)/t.value;++d<f;)h=r[d],h.x0=a,h.x1=n,h.y0=l,h.y1=l+=h.value*o}var he=(1+Math.sqrt(5))/2;function de(t,a,l,n,s,r){for(var h=[],d=a.children,f,o,u=0,S=0,i=d.length,v,x,g=a.value,p,b,_,$,z,R,N;u<i;){v=s-l,x=r-n;do p=d[S++].value;while(!p&&S<i);for(b=_=p,R=Math.max(x/v,v/x)/(g*t),N=p*p*R,z=Math.max(_/N,N/b);S<i;++S){if(p+=o=d[S].value,o<b&&(b=o),o>_&&(_=o),N=p*p*R,$=Math.max(_/N,N/b),$>z){p-=o;break}z=$}h.push(f={value:p,dice:v<x,children:d.slice(u,S)}),f.dice?oe(f,l,n,s,g?n+=x*p/g:r):ce(f,l,n,g?l+=v*p/g:s,r),g-=p,u=S}return h}var nt=(function t(a){function l(n,s,r,h,d){de(a,n,s,r,h,d)}return l.ratio=function(n){return t((n=+n)>1?n:1)},l})(he);function lt(){var t=nt,a=!1,l=1,n=1,s=[0],r=q,h=q,d=q,f=q,o=q;function u(i){return i.x0=i.y0=0,i.x1=l,i.y1=n,i.eachBefore(S),s=[0],a&&i.eachBefore(at),i}function S(i){var v=s[i.depth],x=i.x0+v,g=i.y0+v,p=i.x1-v,b=i.y1-v;p<x&&(x=p=(x+p)/2),b<g&&(g=b=(g+b)/2),i.x0=x,i.y0=g,i.x1=p,i.y1=b,i.children&&(v=s[i.depth+1]=r(i)/2,x+=o(i)-v,g+=h(i)-v,p-=d(i)-v,b-=f(i)-v,p<x&&(x=p=(x+p)/2),b<g&&(g=b=(g+b)/2),t(i,x,g,p,b))}return u.round=function(i){return arguments.length?(a=!!i,u):a},u.size=function(i){return arguments.length?(l=+i[0],n=+i[1],u):[l,n]},u.tile=function(i){return arguments.length?(t=tt(i),u):t},u.padding=function(i){return arguments.length?u.paddingInner(i).paddingOuter(i):u.paddingInner()},u.paddingInner=function(i){return arguments.length?(r=typeof i=="function"?i:G(+i),u):r},u.paddingOuter=function(i){return arguments.length?u.paddingTop(i).paddingRight(i).paddingBottom(i).paddingLeft(i):u.paddingTop()},u.paddingTop=function(i){return arguments.length?(h=typeof i=="function"?i:G(+i),u):h},u.paddingRight=function(i){return arguments.length?(d=typeof i=="function"?i:G(+i),u):d},u.paddingBottom=function(i){return arguments.length?(f=typeof i=="function"?i:G(+i),u):f},u.paddingLeft=function(i){return arguments.length?(o=typeof i=="function"?i:G(+i),u):o},u}(function t(a){function l(n,s,r,h,d){if((f=n._squarify)&&f.ratio===a)for(var f,o,u,S,i=-1,v,x=f.length,g=n.value;++i<x;){for(o=f[i],u=o.children,S=o.value=0,v=u.length;S<v;++S)o.value+=u[S].value;o.dice?oe(o,s,r,h,g?r+=(d-r)*o.value/g:d):ce(o,s,r,g?s+=(h-s)*o.value/g:h,d),g-=o.value}else n._squarify=f=de(a,n,s,r,h,d),f.ratio=a}return l.ratio=function(n){return t((n=+n)>1?n:1)},l})(he);var E,ue=(E=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=Le,this.getAccTitle=$e,this.setDiagramTitle=Ae,this.getDiagramTitle=Fe,this.getAccDescription=_e,this.setAccDescription=Ne}getNodes(){return this.nodes}getConfig(){const a=Me,l=ae();return ee({...a.treemap,...l.treemap??{}})}addNode(a,l){this.nodes.push(a),this.levels.set(a,l),l===0&&(this.outerNodes.push(a),this.root??=a)}getRoot(){return{name:"",children:this.outerNodes}}addClass(a,l){const n=this.classes.get(a)??{id:a,styles:[],textStyles:[]},s=l.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");s&&s.forEach(r=>{ke(r)&&(n?.textStyles?n.textStyles.push(r):n.textStyles=[r]),n?.styles?n.styles.push(r):n.styles=[r]}),this.classes.set(a,n)}getClasses(){return this.classes}getStylesForClass(a){return this.classes.get(a)?.styles??[]}clear(){Ve(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}},C(E,"TreeMapDB"),E);function pe(t){if(!t.length)return[];const a=[],l=[];return t.forEach(n=>{const s={name:n.name,children:n.type==="Leaf"?void 0:[]};for(s.classSelector=n?.classSelector,n?.cssCompiledStyles&&(s.cssCompiledStyles=n.cssCompiledStyles),n.type==="Leaf"&&n.value!==void 0&&(s.value=n.value);l.length>0&&l[l.length-1].level>=n.level;)l.pop();if(l.length===0)a.push(s);else{const r=l[l.length-1].node;r.children?r.children.push(s):r.children=[s]}n.type!=="Leaf"&&l.push({node:s,level:n.level})}),a}C(pe,"buildHierarchy");var st=C((t,a)=>{be(t,a);const l=[];for(const r of t.TreemapRows??[])r.$type==="ClassDefStatement"&&a.addClass(r.className??"",r.styleText??"");for(const r of t.TreemapRows??[]){const h=r.item;if(!h)continue;const d=r.indent?parseInt(r.indent):0,f=rt(h),o=h.classSelector?a.getStylesForClass(h.classSelector):[],u=o.length>0?o:void 0,S={level:d,name:f,type:h.$type,value:h.value,classSelector:h.classSelector,cssCompiledStyles:u};l.push(S)}const n=pe(l),s=C((r,h)=>{for(const d of r)a.addNode(d,h),d.children&&d.children.length>0&&s(d.children,h+1)},"addNodesRecursively");s(n,0)},"populate"),rt=C(t=>t.name?String(t.name):"","getItemName"),fe={parser:{yy:void 0},parse:C(async t=>{try{const l=await ze("treemap",t);te.debug("Treemap AST:",l);const n=fe.parser?.yy;if(!(n instanceof ue))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");st(l,n)}catch(a){throw te.error("Error parsing treemap:",a),a}},"parse")},it=10,W=10,X=25,ot=C((t,a,l,n)=>{const s=n.db,r=s.getConfig(),h=r.padding??it,d=s.getDiagramTitle(),f=s.getRoot(),{themeVariables:o}=ae();if(!f)return;const u=d?30:0,S=we(a),i=r.nodeWidth?r.nodeWidth*W:960,v=r.nodeHeight?r.nodeHeight*W:500,x=i,g=v+u;S.attr("viewBox",`0 0 ${x} ${g}`),Te(S,g,x,r.useMaxWidth);let p;try{const e=r.valueFormat||",";if(e==="$0,0")p=C(c=>"$"+O(",")(c),"valueFormat");else if(e.startsWith("$")&&e.includes(",")){const c=/\.\d+/.exec(e),m=c?c[0]:"";p=C(w=>"$"+O(","+m)(w),"valueFormat")}else if(e.startsWith("$")){const c=e.substring(1);p=C(m=>"$"+O(c||"")(m),"valueFormat")}else p=O(e)}catch(e){te.error("Error creating format function:",e),p=O(",")}const b=Q().range(["transparent",o.cScale0,o.cScale1,o.cScale2,o.cScale3,o.cScale4,o.cScale5,o.cScale6,o.cScale7,o.cScale8,o.cScale9,o.cScale10,o.cScale11]),_=Q().range(["transparent",o.cScalePeer0,o.cScalePeer1,o.cScalePeer2,o.cScalePeer3,o.cScalePeer4,o.cScalePeer5,o.cScalePeer6,o.cScalePeer7,o.cScalePeer8,o.cScalePeer9,o.cScalePeer10,o.cScalePeer11]),$=Q().range([o.cScaleLabel0,o.cScaleLabel1,o.cScaleLabel2,o.cScaleLabel3,o.cScaleLabel4,o.cScaleLabel5,o.cScaleLabel6,o.cScaleLabel7,o.cScaleLabel8,o.cScaleLabel9,o.cScaleLabel10,o.cScaleLabel11]);d&&S.append("text").attr("x",x/2).attr("y",u/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(d);const z=S.append("g").attr("transform",`translate(0, ${u})`).attr("class","treemapContainer"),R=ne(f).sum(e=>e.value??0).sort((e,c)=>(c.value??0)-(e.value??0)),le=lt().size([i,v]).paddingTop(e=>e.children&&e.children.length>0?X+W:0).paddingInner(h).paddingLeft(e=>e.children&&e.children.length>0?W:0).paddingRight(e=>e.children&&e.children.length>0?W:0).paddingBottom(e=>e.children&&e.children.length>0?W:0).round(!0)(R),me=le.descendants().filter(e=>e.children&&e.children.length>0),H=z.selectAll(".treemapSection").data(me).enter().append("g").attr("class","treemapSection").attr("transform",e=>`translate(${e.x0},${e.y0})`);H.append("rect").attr("width",e=>e.x1-e.x0).attr("height",X).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",e=>e.depth===0?"display: none;":""),H.append("clipPath").attr("id",(e,c)=>`clip-section-${a}-${c}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-12)).attr("height",X),H.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class",(e,c)=>`treemapSection section${c}`).attr("fill",e=>b(e.data.name)).attr("fill-opacity",.6).attr("stroke",e=>_(e.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",e=>{if(e.depth===0)return"display: none;";const c=B({cssCompiledStyles:e.data.cssCompiledStyles});return c.nodeStyles+";"+c.borderStyles.join(";")}),H.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",X/2).attr("dominant-baseline","middle").text(e=>e.depth===0?"":e.data.name).attr("font-weight","bold").attr("clip-path",(e,c)=>`url(#clip-section-${a}-${c})`).attr("style",e=>{if(e.depth===0)return"display: none;";const c="dominant-baseline: middle; font-size: 12px; fill:"+$(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",m=B({cssCompiledStyles:e.data.cssCompiledStyles});return c+m.labelStyles.replace("color:","fill:")}).each(function(e){if(e.depth===0)return;const c=Z(this),m=e.data.name;c.text(m);const w=e.x1-e.x0,L=6;let T;r.showValues!==!1&&e.value?T=w-10-30-10-L:T=w-L-6;const y=Math.max(15,T),M=c.node();if(M.getComputedTextLength()>y){let V=m;for(;V.length>0;){if(V=m.substring(0,V.length-1),V.length===0){c.text("..."),M.getComputedTextLength()>y&&c.text("");break}if(c.text(V+"..."),M.getComputedTextLength()<=y)break}}}),r.showValues!==!1&&H.append("text").attr("class","treemapSectionValue").attr("x",e=>e.x1-e.x0-10).attr("y",X/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(e=>e.value?p(e.value):"").attr("font-style","italic").attr("style",e=>{if(e.depth===0)return"display: none;";const c="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+$(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",m=B({cssCompiledStyles:e.data.cssCompiledStyles});return c+m.labelStyles.replace("color:","fill:")});const se=le.leaves(),A=se.length>20,ge=A?16:38,j=A?14:28,D=A?4:8,I=A?4:6,J=A?2:4,re=A?8:10,K=A?1:2,U=z.selectAll(".treemapLeafGroup").data(se).enter().append("g").attr("class",(e,c)=>`treemapNode treemapLeafGroup leaf${c}${e.data.classSelector?` ${e.data.classSelector}`:""}x`).attr("transform",e=>`translate(${e.x0},${e.y0})`);U.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class","treemapLeaf").attr("fill",e=>e.parent?b(e.parent.data.name):b(e.data.name)).attr("style",e=>B({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",e=>e.parent?b(e.parent.data.name):b(e.data.name)).attr("stroke-width",3),U.append("clipPath").attr("id",(e,c)=>`clip-${a}-${c}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-4)).attr("height",e=>Math.max(0,e.y1-e.y0-4)),U.append("text").attr("class","treemapLabel").attr("x",e=>(e.x1-e.x0)/2).attr("y",e=>(e.y1-e.y0)/2).attr("style",e=>{const c=`text-anchor: middle; dominant-baseline: middle; font-size: ${ge}px;fill:`+$(e.data.name)+";",m=B({cssCompiledStyles:e.data.cssCompiledStyles});return c+m.labelStyles.replace("color:","fill:")}).attr("clip-path",(e,c)=>`url(#clip-${a}-${c})`).text(e=>e.data.name).each(function(e){const c=Z(this),m=e.x1-e.x0,w=e.y1-e.y0,L=c.node(),T=m-2*J,P=w-2*J;if(T<re||P<re){c.style("display","none");return}let y=parseInt(c.style("font-size"),10);const M=.6;for(;L.getComputedTextLength()>T&&y>D;)y--,c.style("font-size",`${y}px`);let F=Math.max(I,Math.min(j,Math.round(y*M))),k=y+K+F;for(;k>P&&y>D&&(y--,F=Math.max(I,Math.min(j,Math.round(y*M))),!(F<I&&y===D));)c.style("font-size",`${y}px`),k=y+K+F;c.style("font-size",`${y}px`),A?(y<D||P<D)&&c.style("display","none"):(L.getComputedTextLength()>T||y<D||P<y)&&c.style("display","none")}),r.showValues!==!1&&U.append("text").attr("class","treemapValue").attr("x",c=>(c.x1-c.x0)/2).attr("y",function(c){return(c.y1-c.y0)/2}).attr("style",c=>{const m=`text-anchor: middle; dominant-baseline: hanging; font-size: ${j}px;fill:`+$(c.data.name)+";",w=B({cssCompiledStyles:c.data.cssCompiledStyles});return m+w.labelStyles.replace("color:","fill:")}).attr("clip-path",(c,m)=>`url(#clip-${a}-${m})`).text(c=>c.value?p(c.value):"").each(function(c){const m=Z(this),w=this.parentNode;if(!w){m.style("display","none");return}const L=Z(w).select(".treemapLabel");if(L.empty()||L.style("display")==="none"){m.style("display","none");return}const T=parseFloat(L.style("font-size")),y=Math.max(I,Math.min(j,Math.round(T*.6)));m.style("font-size",`${y}px`);const F=(c.y1-c.y0)/2+T/2+K;m.attr("y",F);const k=c.x1-c.x0,ie=c.y1-c.y0-4,ve=k-2*J;m.node().getComputedTextLength()>ve||F+y>ie||y<I?m.style("display","none"):m.style("display",null)});const ye=r.diagramPadding??8;xe(S,ye,"flowchart",r?.useMaxWidth||!1)},"draw"),ct=C(function(t,a){return a.db.getClasses()},"getClasses"),ht={draw:ot,getClasses:ct},dt={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelFontSize:"12px",valueFontSize:"10px",titleFontSize:"14px"},ut=C(({treemap:t}={})=>{const a=Ce(),l=ae(),n=ee(a,l.themeVariables),s=ee(dt,t),r=s.titleColor??n.titleColor,h=s.labelColor??n.textColor,d=s.valueColor??n.textColor;return`
2
2
  .treemapNode.section {
3
3
  stroke: ${s.sectionStrokeColor};
4
4
  stroke-width: ${s.sectionStrokeWidth};
@@ -1 +1 @@
1
- import{t as a3,br as p,a_ as I,bz as t3,b as s3}from"./DXyyWeag.js";import{bs as r3,a5 as l3,aD as t,bA as L,b_ as v,W as f,bn as o3,c9 as o,bV as S,aA as u,ay as n3,bS as i3,aw as N,bz as c3,bl as Z,bO as A,aB as m,bH as B}from"./DYhIMPy1.js";import{z as v3}from"./CMzyDAl1.js";import{v as _,w as x,u as F}from"./CjaOLL1c.js";import{F as f3,aP as m3,aH as g3,aY as p3,cq as u3,al as d3}from"./BTdkHPOB.js";var h3=m("<div></div>"),b3=m('<span class="type-caption absolute text-subtle font-medium"> </span>'),w3=m("<img/> <!>",1),C3=m('<span class="type-caption text-subtle font-medium"> </span>'),_3=m("<div><!></div>");function x3(y,n){if(new.target)return a3({component:x3,...y});r3(n,!0);let r=p(n,"iconName",7),i=p(n,"label",7),l=p(n,"size",7,20),d=p(n,"class",7,"");const j={redis:"redis",mongodb:"mongodb",circleci:"circleci",vercel:"vercel",railway:"railway",convex:"convex",snowflake:"snowflake",sentry:"sentry",figma:"figma",github:"github",linear:"linear"},D={figma:"https://upload.wikimedia.org/wikipedia/commons/thumb/3/33/Figma-logo.svg/960px-Figma-logo.svg.png",playwright:"https://ray.run/playwright-brand-assets/playwright-logo.svg"},E={context7:'<svg width="28" height="28" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M24 0C26.2091 0 28 1.79086 28 4V24C28 26.2091 26.2091 28 24 28H4C1.79086 28 0 26.2091 0 24V4C0 1.79086 1.79086 0 4 0H24ZM8.58008 15.2559C8.58008 17.8621 7.95482 19.3557 6.33398 21.1885V22.7783H11.6309V21.1045H8.17773C9.66098 19.3776 10.5723 17.5019 10.5723 15.2559H8.58008ZM17.4268 15.2559C17.4268 17.5019 18.338 19.3776 19.8213 21.1045H16.3672V22.7783H21.6641V21.1885C20.0433 19.3558 19.4189 17.862 19.4189 15.2559H17.4268ZM6.33398 6.80957C7.95495 8.64244 8.58008 10.137 8.58008 12.7432H10.5713C10.5713 10.4972 9.66094 8.62143 8.17773 6.89453H11.6309V5.2207H6.33398V6.80957ZM16.3672 5.2207V6.89453H19.8213C18.338 8.62145 17.4268 10.4972 17.4268 12.7432H19.4189C19.4189 10.137 20.0432 8.64242 21.6641 6.80957V5.2207H16.3672Z" fill="black"/></svg>',slack:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128"><path d="M27.255 80.719c0 7.33-5.978 13.317-13.309 13.317C6.616 94.036.63 88.049.63 80.719s5.987-13.317 13.317-13.317h13.309zm6.709 0c0-7.33 5.987-13.317 13.317-13.317s13.317 5.986 13.317 13.317v33.335c0 7.33-5.986 13.317-13.317 13.317-7.33 0-13.317-5.987-13.317-13.317zm0 0" fill="#de1c59"/><path d="M47.281 27.255c-7.33 0-13.317-5.978-13.317-13.309C33.964 6.616 39.951.63 47.281.63s13.317 5.987 13.317 13.317v13.309zm0 6.709c7.33 0 13.317 5.987 13.317 13.317s-5.986 13.317-13.317 13.317H13.946C6.616 60.598.63 54.612.63 47.281c0-7.33 5.987-13.317 13.317-13.317zm0 0" fill="#35c5f0"/><path d="M100.745 47.281c0-7.33 5.978-13.317 13.309-13.317 7.33 0 13.317 5.987 13.317 13.317s-5.987 13.317-13.317 13.317h-13.309zm-6.709 0c0 7.33-5.987 13.317-13.317 13.317s-13.317-5.986-13.317-13.317V13.946C67.402 6.616 73.388.63 80.719.63c7.33 0 13.317 5.987 13.317 13.317zm0 0" fill="#2eb57d"/><path d="M80.719 100.745c7.33 0 13.317 5.978 13.317 13.309 0 7.33-5.987 13.317-13.317 13.317s-13.317-5.987-13.317-13.317v-13.309zm0-6.709c-7.33 0-13.317-5.987-13.317-13.317s5.986-13.317 13.317-13.317h33.335c7.33 0 13.317 5.986 13.317 13.317 0 7.33-5.987 13.317-13.317 13.317zm0 0" fill="#ebb02e"/></svg>'},U=new Set(["context7","github","linear"]),h={brain:d3,server:u3,database:p3,cloud:g3,default:m3},z=o(()=>j[r().toLowerCase()]),W=o(()=>h[r().toLowerCase()]||h.default),H=o(()=>E[r().toLowerCase()]||null),M=o(()=>U.has(r().toLowerCase()));let b=S(!1),V=S(!1);const k=o(()=>D[r().toLowerCase()]||(t(z)?`https://cdn.simpleicons.org/${t(z)}`:null));function q(){B(b,!0)}function O(){B(V,!0)}var P={get iconName(){return r()},set iconName(e){r(e),u()},get label(){return i()},set label(e){i(e),u()},get size(){return l()},set size(e=20){l(e),u()},get class(){return d()},set class(e=""){d(e),u()},$set:t3,$on:(e,a)=>s3(n,e,a)},c=_3(),Y=l3(c);{var G=e=>{var a=h3();v3(a,()=>t(H),!0),L(a),v(()=>_(a,1,`w-full h-full flex items-center justify-center [&>svg]:w-full [&>svg]:h-full ${t(M)?"dark:invert":""}`)),f(e,a)},J=e=>{var a=w3(),s=n3(a);let g;var T=i3(s,2);{var X=w=>{var C=b3(),$=Z(C,!0);v(e3=>{x(C,`font-size: ${l()*.45}px;`),A($,e3)},[()=>i().charAt(0)]),f(w,C)};I(T,w=>{t(b)||w(X)})}v(()=>{F(s,"src",t(k)),F(s,"alt",i()),g=_(s,1,`w-full h-full object-contain ${t(M)?"dark:invert":""}`,null,g,{"opacity-0":!t(b)})}),N("load",s,q),N("error",s,O),c3(s),f(e,a)},K=e=>{{let a=o(()=>l()*.7);f3(e,{get icon(){return t(W)},class:"text-ghost",get style(){return`font-size: ${t(a)??""}px;`}})}},Q=o(()=>h[r().toLowerCase()]),R=e=>{var a=C3(),s=Z(a,!0);v(g=>{x(a,`font-size: ${l()*.45}px;`),A(s,g)},[()=>i().charAt(0)]),f(e,a)};I(Y,e=>{t(H)?e(G):t(k)&&!t(V)?e(J,1):t(Q)?e(K,2):e(R,-1)})}return L(c),v(()=>{_(c,1,`flex items-center justify-center shrink-0 ${d()??""}`),x(c,`width: ${l()??""}px; height: ${l()??""}px;`)}),f(y,c),o3(P)}export{x3 as M};
1
+ import{t as a3,br as p,a_ as I,bz as t3,b as s3}from"./DXyyWeag.js";import{bs as r3,a5 as l3,aD as t,bA as L,b_ as v,W as f,bn as o3,c9 as o,bV as S,aA as u,ay as n3,bS as i3,aw as N,bz as c3,bl as Z,bO as A,aB as m,bH as B}from"./DYhIMPy1.js";import{z as v3}from"./CpMT4a7n.js";import{v as _,w as x,u as F}from"./CjaOLL1c.js";import{F as f3,aP as m3,aH as g3,aY as p3,cq as u3,al as d3}from"./BTdkHPOB.js";var h3=m("<div></div>"),b3=m('<span class="type-caption absolute text-subtle font-medium"> </span>'),w3=m("<img/> <!>",1),C3=m('<span class="type-caption text-subtle font-medium"> </span>'),_3=m("<div><!></div>");function x3(y,n){if(new.target)return a3({component:x3,...y});r3(n,!0);let r=p(n,"iconName",7),i=p(n,"label",7),l=p(n,"size",7,20),d=p(n,"class",7,"");const j={redis:"redis",mongodb:"mongodb",circleci:"circleci",vercel:"vercel",railway:"railway",convex:"convex",snowflake:"snowflake",sentry:"sentry",figma:"figma",github:"github",linear:"linear"},D={figma:"https://upload.wikimedia.org/wikipedia/commons/thumb/3/33/Figma-logo.svg/960px-Figma-logo.svg.png",playwright:"https://ray.run/playwright-brand-assets/playwright-logo.svg"},E={context7:'<svg width="28" height="28" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M24 0C26.2091 0 28 1.79086 28 4V24C28 26.2091 26.2091 28 24 28H4C1.79086 28 0 26.2091 0 24V4C0 1.79086 1.79086 0 4 0H24ZM8.58008 15.2559C8.58008 17.8621 7.95482 19.3557 6.33398 21.1885V22.7783H11.6309V21.1045H8.17773C9.66098 19.3776 10.5723 17.5019 10.5723 15.2559H8.58008ZM17.4268 15.2559C17.4268 17.5019 18.338 19.3776 19.8213 21.1045H16.3672V22.7783H21.6641V21.1885C20.0433 19.3558 19.4189 17.862 19.4189 15.2559H17.4268ZM6.33398 6.80957C7.95495 8.64244 8.58008 10.137 8.58008 12.7432H10.5713C10.5713 10.4972 9.66094 8.62143 8.17773 6.89453H11.6309V5.2207H6.33398V6.80957ZM16.3672 5.2207V6.89453H19.8213C18.338 8.62145 17.4268 10.4972 17.4268 12.7432H19.4189C19.4189 10.137 20.0432 8.64242 21.6641 6.80957V5.2207H16.3672Z" fill="black"/></svg>',slack:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128"><path d="M27.255 80.719c0 7.33-5.978 13.317-13.309 13.317C6.616 94.036.63 88.049.63 80.719s5.987-13.317 13.317-13.317h13.309zm6.709 0c0-7.33 5.987-13.317 13.317-13.317s13.317 5.986 13.317 13.317v33.335c0 7.33-5.986 13.317-13.317 13.317-7.33 0-13.317-5.987-13.317-13.317zm0 0" fill="#de1c59"/><path d="M47.281 27.255c-7.33 0-13.317-5.978-13.317-13.309C33.964 6.616 39.951.63 47.281.63s13.317 5.987 13.317 13.317v13.309zm0 6.709c7.33 0 13.317 5.987 13.317 13.317s-5.986 13.317-13.317 13.317H13.946C6.616 60.598.63 54.612.63 47.281c0-7.33 5.987-13.317 13.317-13.317zm0 0" fill="#35c5f0"/><path d="M100.745 47.281c0-7.33 5.978-13.317 13.309-13.317 7.33 0 13.317 5.987 13.317 13.317s-5.987 13.317-13.317 13.317h-13.309zm-6.709 0c0 7.33-5.987 13.317-13.317 13.317s-13.317-5.986-13.317-13.317V13.946C67.402 6.616 73.388.63 80.719.63c7.33 0 13.317 5.987 13.317 13.317zm0 0" fill="#2eb57d"/><path d="M80.719 100.745c7.33 0 13.317 5.978 13.317 13.309 0 7.33-5.987 13.317-13.317 13.317s-13.317-5.987-13.317-13.317v-13.309zm0-6.709c-7.33 0-13.317-5.987-13.317-13.317s5.986-13.317 13.317-13.317h33.335c7.33 0 13.317 5.986 13.317 13.317 0 7.33-5.987 13.317-13.317 13.317zm0 0" fill="#ebb02e"/></svg>'},U=new Set(["context7","github","linear"]),h={brain:d3,server:u3,database:p3,cloud:g3,default:m3},z=o(()=>j[r().toLowerCase()]),W=o(()=>h[r().toLowerCase()]||h.default),H=o(()=>E[r().toLowerCase()]||null),M=o(()=>U.has(r().toLowerCase()));let b=S(!1),V=S(!1);const k=o(()=>D[r().toLowerCase()]||(t(z)?`https://cdn.simpleicons.org/${t(z)}`:null));function q(){B(b,!0)}function O(){B(V,!0)}var P={get iconName(){return r()},set iconName(e){r(e),u()},get label(){return i()},set label(e){i(e),u()},get size(){return l()},set size(e=20){l(e),u()},get class(){return d()},set class(e=""){d(e),u()},$set:t3,$on:(e,a)=>s3(n,e,a)},c=_3(),Y=l3(c);{var G=e=>{var a=h3();v3(a,()=>t(H),!0),L(a),v(()=>_(a,1,`w-full h-full flex items-center justify-center [&>svg]:w-full [&>svg]:h-full ${t(M)?"dark:invert":""}`)),f(e,a)},J=e=>{var a=w3(),s=n3(a);let g;var T=i3(s,2);{var X=w=>{var C=b3(),$=Z(C,!0);v(e3=>{x(C,`font-size: ${l()*.45}px;`),A($,e3)},[()=>i().charAt(0)]),f(w,C)};I(T,w=>{t(b)||w(X)})}v(()=>{F(s,"src",t(k)),F(s,"alt",i()),g=_(s,1,`w-full h-full object-contain ${t(M)?"dark:invert":""}`,null,g,{"opacity-0":!t(b)})}),N("load",s,q),N("error",s,O),c3(s),f(e,a)},K=e=>{{let a=o(()=>l()*.7);f3(e,{get icon(){return t(W)},class:"text-ghost",get style(){return`font-size: ${t(a)??""}px;`}})}},Q=o(()=>h[r().toLowerCase()]),R=e=>{var a=C3(),s=Z(a,!0);v(g=>{x(a,`font-size: ${l()*.45}px;`),A(s,g)},[()=>i().charAt(0)]),f(e,a)};I(Y,e=>{t(H)?e(G):t(k)&&!t(V)?e(J,1):t(Q)?e(K,2):e(R,-1)})}return L(c),v(()=>{_(c,1,`flex items-center justify-center shrink-0 ${d()??""}`),x(c,`width: ${l()??""}px; height: ${l()??""}px;`)}),f(y,c),o3(P)}export{x3 as M};
@@ -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"./DJXGgEUK.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"./BAdws6Fu.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};