@intent-hq/web 2.372.1 → 2.372.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (143) hide show
  1. package/package.json +1 -1
  2. package/web/app/immutable/chunks/{C7-pF3hJ.js → 1mJrE3jk.js} +1 -1
  3. package/web/app/immutable/chunks/{hlGimPBZ.js → 2XoFwLeT.js} +1 -1
  4. package/web/app/immutable/chunks/{vRnYB3t4.js → 2YKrLT6f.js} +1 -1
  5. package/web/app/immutable/chunks/{vjUVG9_D.js → 55NQjm3t.js} +1 -1
  6. package/web/app/immutable/chunks/{BiWJoWSv.js → 5Z6V3HtS.js} +3 -3
  7. package/web/app/immutable/chunks/{uh-AKdCH.js → 9DRLCqFH.js} +1 -1
  8. package/web/app/immutable/chunks/{Cp6ekE_s.js → A-qdlPO9.js} +1 -1
  9. package/web/app/immutable/chunks/{C9WFArWI.js → B0kpU9fA.js} +2 -2
  10. package/web/app/immutable/chunks/{CrKTQysx.js → B0lZCUS6.js} +1 -1
  11. package/web/app/immutable/chunks/{D9sQ8qcN.js → B2NZzPt-.js} +1 -1
  12. package/web/app/immutable/chunks/{D-Uz-39Z.js → B418rdhJ.js} +1 -1
  13. package/web/app/immutable/chunks/{Bc_WCBau.js → B5PU_SZw.js} +1 -1
  14. package/web/app/immutable/chunks/{B2pOchvy.js → B6l-Kttu.js} +1 -1
  15. package/web/app/immutable/chunks/{CvNJnDlW.js → B89v0U4a.js} +3 -3
  16. package/web/app/immutable/chunks/{zmWxChUq.js → B9STQthu.js} +1 -1
  17. package/web/app/immutable/chunks/{MUCe8vjx.js → B9Y57c7j.js} +6 -6
  18. package/web/app/immutable/chunks/{CVhHgrXf.js → BApUcPKR.js} +1 -1
  19. package/web/app/immutable/chunks/{2EVipgJi.js → BDThAQjj.js} +1 -1
  20. package/web/app/immutable/chunks/{CiKM_Bkk.js → BEWjMMmw.js} +3 -3
  21. package/web/app/immutable/chunks/{BRIObpKH.js → BHtMcien.js} +1 -1
  22. package/web/app/immutable/chunks/{CTpG0iUn.js → BIkmNkpw.js} +1 -1
  23. package/web/app/immutable/chunks/{BbU8lQ23.js → BIn5egRU.js} +1 -1
  24. package/web/app/immutable/chunks/{piULzuzd.js → BOD8_Ffh.js} +1 -1
  25. package/web/app/immutable/chunks/{7UCN4F7m.js → BPW7kjsh.js} +1 -1
  26. package/web/app/immutable/chunks/{D7c2h2XU.js → BPwzpRKZ.js} +1 -1
  27. package/web/app/immutable/chunks/{BRbooHVW.js → BQNpzQlP.js} +1 -1
  28. package/web/app/immutable/chunks/{B-9Pvu6y.js → BTcBtO7l.js} +1 -1
  29. package/web/app/immutable/chunks/{Cqh6RRVt.js → BTi_uPkP.js} +2 -2
  30. package/web/app/immutable/chunks/{wUr2Clcr.js → BWDjljS8.js} +3 -3
  31. package/web/app/immutable/chunks/{SSRyQIWE.js → BZQZwdGm.js} +1 -1
  32. package/web/app/immutable/chunks/{CJJs2g33.js → BbobBw8S.js} +1 -1
  33. package/web/app/immutable/chunks/{Dm3V_bi_.js → BehvUfjM.js} +1 -1
  34. package/web/app/immutable/chunks/{gFsMmW36.js → BesmUwoU.js} +1 -1
  35. package/web/app/immutable/chunks/{DRbwhDjx.js → BoefNJ5Q.js} +1 -1
  36. package/web/app/immutable/chunks/{fZM82vlq.js → BpSBXUuJ.js} +2 -2
  37. package/web/app/immutable/chunks/{CKEnN_Hn.js → BpWCMu3u.js} +1 -1
  38. package/web/app/immutable/chunks/{BUIz4Yba.js → Bpb7JDWq.js} +1 -1
  39. package/web/app/immutable/chunks/{CU2GkTBo.js → BrFkQr4z.js} +1 -1
  40. package/web/app/immutable/chunks/{DaO8nz6N.js → BuQN2T0g.js} +2 -2
  41. package/web/app/immutable/chunks/{DJPMh7Pg.js → Bxb8LI6C.js} +1 -1
  42. package/web/app/immutable/chunks/{DlXO0azG.js → C-y2Lv4J.js} +1 -1
  43. package/web/app/immutable/chunks/{CJrtVlDG.js → C79sRXBG.js} +1 -1
  44. package/web/app/immutable/chunks/{DuvgBOgL.js → CAG8YIXN.js} +1 -1
  45. package/web/app/immutable/chunks/{IcVyfKsD.js → CBHdapAk.js} +1 -1
  46. package/web/app/immutable/chunks/{DpBTZWt9.js → CIJY2gxU.js} +1 -1
  47. package/web/app/immutable/chunks/{CtatSKin.js → CKK0Gz-a.js} +2 -2
  48. package/web/app/immutable/chunks/{TET1QjU6.js → CL1PbmdJ.js} +1 -1
  49. package/web/app/immutable/chunks/{DEkD3je6.js → CMAV3UUk.js} +1 -1
  50. package/web/app/immutable/chunks/{Demr6Qvy.js → CNsgRr0G.js} +1 -1
  51. package/web/app/immutable/chunks/{Dhb96fci.js → CPj4SFCC.js} +1 -1
  52. package/web/app/immutable/chunks/{D6QsCyM5.js → CQR1o7um.js} +2 -2
  53. package/web/app/immutable/chunks/{BRfr79MP.js → CQy8trug.js} +1 -1
  54. package/web/app/immutable/chunks/{TYee8CmD.js → CR5ZxoLH.js} +1 -1
  55. package/web/app/immutable/chunks/{C-CEp48D.js → CRBVaIXN.js} +1 -1
  56. package/web/app/immutable/chunks/{DuiyN7wg.js → CYyfRGPT.js} +1 -1
  57. package/web/app/immutable/chunks/{Cc-PW4gv.js → CZDluI6H.js} +1 -1
  58. package/web/app/immutable/chunks/{CuiAAAM-.js → CajUAX8N.js} +2 -2
  59. package/web/app/immutable/chunks/{DFudQwu4.js → CjYF1At4.js} +1 -1
  60. package/web/app/immutable/chunks/{Dh6rqlVy.js → CnzZSXm6.js} +1 -1
  61. package/web/app/immutable/chunks/{D1S-BeW0.js → CrBBYf3_.js} +1 -1
  62. package/web/app/immutable/chunks/{-A1Xt6t2.js → CrL6DZCQ.js} +1 -1
  63. package/web/app/immutable/chunks/{CugIOLIa.js → CsleiD5D.js} +1 -1
  64. package/web/app/immutable/chunks/{v3dlpdhZ.js → CtKyfVB_.js} +1 -1
  65. package/web/app/immutable/chunks/{C8e17gER.js → CtZeiR9i.js} +1 -1
  66. package/web/app/immutable/chunks/{QMZYeDiU.js → Cv2q5gkL.js} +1 -1
  67. package/web/app/immutable/chunks/{Bb_op89B.js → CwB9Am9z.js} +3 -3
  68. package/web/app/immutable/chunks/{DVuRO9FX.js → D-usBtmP.js} +4 -4
  69. package/web/app/immutable/chunks/{BQYZptYQ.js → D0xQDzbV.js} +1 -1
  70. package/web/app/immutable/chunks/{C3HJlgor.js → D1wNvwqn.js} +1 -1
  71. package/web/app/immutable/chunks/{DiFC8Mk6.js → D82C3bhe.js} +1 -1
  72. package/web/app/immutable/chunks/{D7h3Dl5-.js → D9-KwDth.js} +1 -1
  73. package/web/app/immutable/chunks/{BEAj7h28.js → DC0oh9YH.js} +1 -1
  74. package/web/app/immutable/chunks/{CutJRErj.js → DCO02E6M.js} +1 -1
  75. package/web/app/immutable/chunks/{nPO4QUTk.js → DCzChru-.js} +1 -1
  76. package/web/app/immutable/chunks/{ChUo22u6.js → DE_K0DMt.js} +3 -3
  77. package/web/app/immutable/chunks/{CzTHqaDJ.js → DFQ6yCR1.js} +13 -13
  78. package/web/app/immutable/chunks/{0A5oWXer.js → DHpb0iQY.js} +1 -1
  79. package/web/app/immutable/chunks/{DVWpH0Ww.js → DLmLA9DN.js} +1 -1
  80. package/web/app/immutable/chunks/{QnlnDXiH.js → DOOplL0N.js} +2 -2
  81. package/web/app/immutable/chunks/{BAy-IHSv.js → DQewNXDh.js} +1 -1
  82. package/web/app/immutable/chunks/{B-vPMZJe.js → DSIsc1Ss.js} +1 -1
  83. package/web/app/immutable/chunks/{Cuk_Gihq.js → DY06SZsl.js} +1 -1
  84. package/web/app/immutable/chunks/{BCAvwmcb.js → DadrYnVI.js} +1 -1
  85. package/web/app/immutable/chunks/{BD3toGAv.js → DdJj628K.js} +1 -1
  86. package/web/app/immutable/chunks/{B873lVHv.js → Df3mQZLv.js} +3 -3
  87. package/web/app/immutable/chunks/{d4XsLpJr.js → Dge5ZGj2.js} +1 -1
  88. package/web/app/immutable/chunks/{DLR3Xiy1.js → Di4F3rxF.js} +1 -1
  89. package/web/app/immutable/chunks/{KwzSRF2d.js → Dkvzw9dt.js} +1 -1
  90. package/web/app/immutable/chunks/{DHk9xTTU.js → DqfSttpc.js} +1 -1
  91. package/web/app/immutable/chunks/{DD1WD1M5.js → Ds6NYQhM.js} +1 -1
  92. package/web/app/immutable/chunks/{D9uHbDgA.js → DsFpAZo7.js} +2 -2
  93. package/web/app/immutable/chunks/{CPI29I6f.js → DsnmJyUD.js} +1 -1
  94. package/web/app/immutable/chunks/{DjmUoBsP.js → DyaBo2y6.js} +1 -1
  95. package/web/app/immutable/chunks/{C8kqUaJu.js → EwMtkE4R.js} +4 -4
  96. package/web/app/immutable/chunks/{BN7MhY13.js → Ixhw1ROs.js} +1 -1
  97. package/web/app/immutable/chunks/{CuByX_yP.js → LbiCax8N.js} +1 -1
  98. package/web/app/immutable/chunks/{jWqlu3Sf.js → NPKMdhKA.js} +2 -2
  99. package/web/app/immutable/chunks/{kVZwUKh5.js → O-dTT9_6.js} +1 -1
  100. package/web/app/immutable/chunks/{Bn_8JArX.js → OfToEAub.js} +1 -1
  101. package/web/app/immutable/chunks/{C1elIQnx.js → OusZ11tk.js} +1 -1
  102. package/web/app/immutable/chunks/{BbSguaMP.js → Qh1eK2X9.js} +1 -1
  103. package/web/app/immutable/chunks/{CFPreIC6.js → R-aBLidW.js} +3 -3
  104. package/web/app/immutable/chunks/{ClsrgcJW.js → RwJyhbRN.js} +1 -1
  105. package/web/app/immutable/chunks/{Cp4OFkA0.js → Z4Jzxw8B.js} +1 -1
  106. package/web/app/immutable/chunks/{BxNRSHj7.js → ZJOyleCJ.js} +3 -3
  107. package/web/app/immutable/chunks/{BtZepnY7.js → ahq3r4Wz.js} +1 -1
  108. package/web/app/immutable/chunks/{BOj9vGyw.js → eGqXrC9g.js} +1 -1
  109. package/web/app/immutable/chunks/{IpC95BdD.js → f50N8hQo.js} +1 -1
  110. package/web/app/immutable/chunks/{BJ8UpUx3.js → ftVcR4tQ.js} +1 -1
  111. package/web/app/immutable/chunks/{DkM2tUNb.js → fth1noPu.js} +1 -1
  112. package/web/app/immutable/chunks/{xs7GVnBi.js → lCSqh71Z.js} +1 -1
  113. package/web/app/immutable/chunks/{B6jc-_sR.js → lFTk8wpi.js} +1 -1
  114. package/web/app/immutable/chunks/{CGprRn3S.js → m11ohSMf.js} +1 -1
  115. package/web/app/immutable/chunks/{DXoCvZQl.js → oaGKgX0i.js} +1 -1
  116. package/web/app/immutable/chunks/{EUqcNEWQ.js → uA3ZM6fH.js} +1 -1
  117. package/web/app/immutable/chunks/{DDRbr07B.js → ulO2uazy.js} +1 -1
  118. package/web/app/immutable/chunks/{D8PTjyMt.js → vE2E6sS8.js} +1 -1
  119. package/web/app/immutable/chunks/{Be-tvUeZ.js → vQ3XSTvm.js} +1 -1
  120. package/web/app/immutable/chunks/{VNZmrcSz.js → vlM04DTZ.js} +1 -1
  121. package/web/app/immutable/chunks/{C4Dbybcz.js → wDPUZWBZ.js} +1 -1
  122. package/web/app/immutable/chunks/{DyVTwc41.js → xs1C7KnJ.js} +1 -1
  123. package/web/app/immutable/chunks/{DBeNyp1m.js → yLWVsiXj.js} +1 -1
  124. package/web/app/immutable/chunks/{DAd8-v0C.js → zROLTv2m.js} +1 -1
  125. package/web/app/immutable/entry/{app.HXk4QgVW.js → app.-hRXZvoO.js} +2 -2
  126. package/web/app/immutable/entry/start.C3r7ji-v.js +1 -0
  127. package/web/app/immutable/nodes/{0.C35VPs87.js → 0.Bf92A2SS.js} +1 -1
  128. package/web/app/immutable/nodes/{1.ZQ0mU96X.js → 1.BWS1uOkH.js} +1 -1
  129. package/web/app/immutable/nodes/{10.Ba3bdQFj.js → 10.xvB45P-Z.js} +4 -4
  130. package/web/app/immutable/nodes/{11.ls9oXbQw.js → 11.CWt_UL31.js} +1 -1
  131. package/web/app/immutable/nodes/{15.DwnvTlNj.js → 15.BFkam5BT.js} +1 -1
  132. package/web/app/immutable/nodes/{19.ChdL9npo.js → 19.DASGyMmu.js} +2 -2
  133. package/web/app/immutable/nodes/{2.CEHgYNfF.js → 2.BLp65UB0.js} +4 -4
  134. package/web/app/immutable/nodes/{3.yDo-Jv4L.js → 3.sLYNU_z5.js} +1 -1
  135. package/web/app/immutable/nodes/{4.BfGmTHCX.js → 4.CYsqPvqR.js} +1 -1
  136. package/web/app/immutable/nodes/{5.CdbvrG1H.js → 5.BDPUNvGt.js} +1 -1
  137. package/web/app/immutable/nodes/{6.D-e34gg6.js → 6.Cmp_rej6.js} +1 -1
  138. package/web/app/immutable/nodes/{7.DkqU_r1v.js → 7.BeJ_Zasr.js} +1 -1
  139. package/web/app/immutable/nodes/{8.DXAWn9Y1.js → 8.CTerGGp8.js} +1 -1
  140. package/web/app/immutable/nodes/{9.a_zRpwry.js → 9.D8TUAlXi.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.okH3MvzT.js +0 -1
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/DpBTZWt9.js","/app/immutable/chunks/DEkD3je6.js","/app/immutable/chunks/fZM82vlq.js","/app/immutable/chunks/ClpAEjbe.js","/app/immutable/chunks/CJxGDkBm.js","/app/immutable/chunks/-xK_vQQs.js","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/uh-AKdCH.js","/app/immutable/chunks/DBeNyp1m.js","/app/immutable/chunks/CPI29I6f.js","/app/immutable/chunks/lAmQKSWr.js","/app/immutable/chunks/B6jc-_sR.js","/app/immutable/chunks/BOj9vGyw.js","/app/immutable/chunks/C3HJlgor.js","/app/immutable/chunks/Cc-PW4gv.js","/app/immutable/chunks/DyVTwc41.js","/app/immutable/chunks/B-vPMZJe.js","/app/immutable/chunks/DJPMh7Pg.js","/app/immutable/chunks/D9Ykl3eH.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/CpP1PKzF.js","/app/immutable/chunks/PVXvIyE8.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/CgBcONKs.js","/app/immutable/chunks/WSVFXKpL.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/Bqd7fdCF.js","/app/immutable/chunks/CtJxHvGv.js","/app/immutable/chunks/DSqSJXGX.js","/app/immutable/chunks/wmcYjLAa.js","/app/immutable/chunks/CnGVh7I3.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/BwASeArv.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/CPDV_dyu.js","/app/immutable/chunks/BejTxFyR.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/CTV49dzf.js","/app/immutable/chunks/By588DV1.js","/app/immutable/chunks/DiFC8Mk6.js","/app/immutable/chunks/C1zxTHwk.js","/app/immutable/chunks/BVi5KkOP.js","/app/immutable/chunks/NtFyWdpR.js","/app/immutable/chunks/Xh71Wbuh.js","/app/immutable/chunks/BeYVt6Wg.js","/app/immutable/chunks/DJfJ5NWH.js","/app/immutable/chunks/oXpJ1LFx.js","/app/immutable/chunks/BoIfXiRv.js","/app/immutable/chunks/XJv96NUg.js","/app/immutable/assets/notify.B1j5oT2y.css","/app/immutable/chunks/CL3a4Hm1.js","/app/immutable/chunks/BBWuirRW.js","/app/immutable/chunks/D9uHbDgA.js","/app/immutable/chunks/DKwAaLwd.js","/app/immutable/chunks/b89lNINv.js","/app/immutable/chunks/DujUyPvo.js","/app/immutable/chunks/ByoP16rr.js","/app/immutable/chunks/C5TH9nNS.js","/app/immutable/chunks/B6-GEB4b.js","/app/immutable/chunks/B5aYN90J.js","/app/immutable/chunks/BxKppgO5.js","/app/immutable/chunks/DONrLvvt.js","/app/immutable/chunks/CuByX_yP.js","/app/immutable/chunks/IcVyfKsD.js","/app/immutable/chunks/D8PTjyMt.js","/app/immutable/chunks/Cuk_Gihq.js","/app/immutable/chunks/xs7GVnBi.js","/app/immutable/chunks/DAd8-v0C.js","/app/immutable/chunks/2ypcXvW0.js","/app/immutable/chunks/DLR3Xiy1.js","/app/immutable/chunks/0A5oWXer.js","/app/immutable/chunks/Cp4OFkA0.js","/app/immutable/chunks/2EVipgJi.js","/app/immutable/chunks/gFsMmW36.js","/app/immutable/chunks/DD1WD1M5.js","/app/immutable/chunks/DkM2tUNb.js","/app/immutable/chunks/TET1QjU6.js","/app/immutable/chunks/CrKTQysx.js","/app/immutable/chunks/-A1Xt6t2.js","/app/immutable/chunks/DFudQwu4.js","/app/immutable/chunks/BtZepnY7.js","/app/immutable/chunks/Dm3V_bi_.js","/app/immutable/chunks/DlXO0azG.js","/app/immutable/chunks/Dh6rqlVy.js","/app/immutable/chunks/BN7MhY13.js","/app/immutable/chunks/BRfr79MP.js","/app/immutable/chunks/BEAj7h28.js","/app/immutable/chunks/CJrtVlDG.js","/app/immutable/chunks/Bn_8JArX.js","/app/immutable/chunks/BbU8lQ23.js","/app/immutable/chunks/d4XsLpJr.js","/app/immutable/chunks/VNZmrcSz.js","/app/immutable/chunks/D7c2h2XU.js","/app/immutable/chunks/TYee8CmD.js","/app/immutable/chunks/C7-pF3hJ.js","/app/immutable/chunks/SSRyQIWE.js","/app/immutable/chunks/CJJs2g33.js","/app/immutable/chunks/BAy-IHSv.js"])))=>i.map(i=>d[i]);
2
- var lC=Object.defineProperty;var cC=(e,t,r)=>t in e?lC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var xr=(e,t,r)=>cC(e,typeof t!="symbol"?t+"":t,r);import{_ as Ve,t as Oo,bo as He,bm as je,bw as Do,b as Ro,bp as hC}from"./ClpAEjbe.js";import{g as dC}from"./BdWqymET.js";import{aR as bs}from"./DJPMh7Pg.js";import{b7 as uC,cc as fC,bs as No,a7 as Ko,ay as ui,aD as A,bS as We,be as en,b$ as rl,b_ as cr,bO as br,W as ge,c9 as Dt,bn as qo,aA as _e,aB as ar,bk as hd,bH as gt,ca as Bo,c5 as pl,a5 as qe,bA as $e,bV as ce,bl as Tr,c0 as Th,aC as pi,aw as ml,a as Wu,bj as Np,br as wi,cb as gC,bf as pC}from"./CJxGDkBm.js";import{i as yr}from"./wmcYjLAa.js";import{h as zu}from"./BigcqNWS.js";import{f as co,s as fe,b as qp,c as Wp,g as Xa}from"./CnGVh7I3.js";import{b as no}from"./NtFyWdpR.js";import{c as mC}from"./ChTqQfQN.js";import{d4 as yC,cW as xC,F as dn,aM as bC,bb as zp,m as CC,n as wC,f as kC,j as SC,y as Hu,v as Yu,h as vC,u as MC,P as TC,s as BC,O as _C,r as LC,k as AC,D as Xu,H as FC,U as $C,ax as EC,ay as PC,aY as IC}from"./CtJxHvGv.js";import{f as Ja,ae as OC}from"./BVi5KkOP.js";import"./CPDV_dyu.js";import{M as DC,Z as RC}from"./DjmUoBsP.js";import{p as rn,h as NC,d as qC,S as WC,e as zC,g as ya,i as ju}from"./BwASeArv.js";import{c as HC}from"./BbIcudMY.js";import{k as Hp}from"./Xh71Wbuh.js";import{n as To,h as Gu,t as Is,d as Uu}from"./oXpJ1LFx.js";import{c as fa}from"./DSqSJXGX.js";import{e as YC}from"./CARsKzUN.js";import{t as XC}from"./DAsc1V4f.js";import{s as il}from"./WSVFXKpL.js";import{H as jC}from"./DRG24ZS8.js";import{s as Vu,a as GC}from"./BsieX9dN.js";import{l as UC,K as VC,d as ZC,e as Cc,M as KC}from"./B06RKBOm.js";import"./B5wwCKYG.js";import{u as wo}from"./C1zxTHwk.js";import"./BeYVt6Wg.js";import"./CpP1PKzF.js";import{bL as QC}from"./DiFC8Mk6.js";function JC(e,t){uC(window,["resize"],()=>fC(()=>t(window[e])))}var Yp=Object.defineProperty,C=(e,t)=>Yp(e,"name",{value:t,configurable:!0}),t2=(e,t)=>{for(var r in t)Yp(e,r,{get:t[r],enumerable:!0})};function Xp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}C(Xp,"getDefaultExportFromCjs");var ei={},Pn={},Xo={},Zu;function Ts(){if(Zu)return Xo;Zu=1;function e(s){return typeof s>"u"||s===null}C(e,"isNothing");function t(s){return typeof s=="object"&&s!==null}C(t,"isObject");function r(s){return Array.isArray(s)?s:e(s)?[]:[s]}C(r,"toArray");function i(s,n){if(n){const l=Object.keys(n);for(let c=0,h=l.length;c<h;c+=1){const d=l[c];s[d]=n[d]}}return s}C(i,"extend");function o(s,n){let l="";for(let c=0;c<n;c+=1)l+=s;return l}C(o,"repeat");function a(s){return s===0&&Number.NEGATIVE_INFINITY===1/s}return C(a,"isNegativeZero"),Xo.isNothing=e,Xo.isObject=t,Xo.toArray=r,Xo.repeat=o,Xo.isNegativeZero=a,Xo.extend=i,Xo}C(Ts,"requireCommon");var wc,Ku;function Bs(){if(Ku)return wc;Ku=1;function e(r,i){let o="";const a=r.reason||"(unknown reason)";return r.mark?(r.mark.name&&(o+='in "'+r.mark.name+'" '),o+="("+(r.mark.line+1)+":"+(r.mark.column+1)+")",!i&&r.mark.snippet&&(o+=`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/CIJY2gxU.js","/app/immutable/chunks/CMAV3UUk.js","/app/immutable/chunks/BpSBXUuJ.js","/app/immutable/chunks/ClpAEjbe.js","/app/immutable/chunks/CJxGDkBm.js","/app/immutable/chunks/-xK_vQQs.js","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/9DRLCqFH.js","/app/immutable/chunks/yLWVsiXj.js","/app/immutable/chunks/DsnmJyUD.js","/app/immutable/chunks/lAmQKSWr.js","/app/immutable/chunks/lFTk8wpi.js","/app/immutable/chunks/eGqXrC9g.js","/app/immutable/chunks/D1wNvwqn.js","/app/immutable/chunks/CZDluI6H.js","/app/immutable/chunks/xs1C7KnJ.js","/app/immutable/chunks/DSIsc1Ss.js","/app/immutable/chunks/Bxb8LI6C.js","/app/immutable/chunks/D9Ykl3eH.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/CpP1PKzF.js","/app/immutable/chunks/PVXvIyE8.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/CgBcONKs.js","/app/immutable/chunks/WSVFXKpL.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/Bqd7fdCF.js","/app/immutable/chunks/CtJxHvGv.js","/app/immutable/chunks/DSqSJXGX.js","/app/immutable/chunks/wmcYjLAa.js","/app/immutable/chunks/CnGVh7I3.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/BwASeArv.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/CPDV_dyu.js","/app/immutable/chunks/BejTxFyR.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/CTV49dzf.js","/app/immutable/chunks/By588DV1.js","/app/immutable/chunks/D82C3bhe.js","/app/immutable/chunks/C1zxTHwk.js","/app/immutable/chunks/BVi5KkOP.js","/app/immutable/chunks/NtFyWdpR.js","/app/immutable/chunks/Xh71Wbuh.js","/app/immutable/chunks/BeYVt6Wg.js","/app/immutable/chunks/DJfJ5NWH.js","/app/immutable/chunks/oXpJ1LFx.js","/app/immutable/chunks/BoIfXiRv.js","/app/immutable/chunks/XJv96NUg.js","/app/immutable/assets/notify.B1j5oT2y.css","/app/immutable/chunks/CL3a4Hm1.js","/app/immutable/chunks/BBWuirRW.js","/app/immutable/chunks/DsFpAZo7.js","/app/immutable/chunks/DKwAaLwd.js","/app/immutable/chunks/b89lNINv.js","/app/immutable/chunks/DujUyPvo.js","/app/immutable/chunks/ByoP16rr.js","/app/immutable/chunks/C5TH9nNS.js","/app/immutable/chunks/B6-GEB4b.js","/app/immutable/chunks/B5aYN90J.js","/app/immutable/chunks/BxKppgO5.js","/app/immutable/chunks/DONrLvvt.js","/app/immutable/chunks/LbiCax8N.js","/app/immutable/chunks/CBHdapAk.js","/app/immutable/chunks/vE2E6sS8.js","/app/immutable/chunks/DY06SZsl.js","/app/immutable/chunks/lCSqh71Z.js","/app/immutable/chunks/zROLTv2m.js","/app/immutable/chunks/2ypcXvW0.js","/app/immutable/chunks/Di4F3rxF.js","/app/immutable/chunks/DHpb0iQY.js","/app/immutable/chunks/Z4Jzxw8B.js","/app/immutable/chunks/BDThAQjj.js","/app/immutable/chunks/BesmUwoU.js","/app/immutable/chunks/Ds6NYQhM.js","/app/immutable/chunks/fth1noPu.js","/app/immutable/chunks/CL1PbmdJ.js","/app/immutable/chunks/B0lZCUS6.js","/app/immutable/chunks/CrL6DZCQ.js","/app/immutable/chunks/CjYF1At4.js","/app/immutable/chunks/ahq3r4Wz.js","/app/immutable/chunks/BehvUfjM.js","/app/immutable/chunks/C-y2Lv4J.js","/app/immutable/chunks/CnzZSXm6.js","/app/immutable/chunks/Ixhw1ROs.js","/app/immutable/chunks/CQy8trug.js","/app/immutable/chunks/DC0oh9YH.js","/app/immutable/chunks/C79sRXBG.js","/app/immutable/chunks/OfToEAub.js","/app/immutable/chunks/BIn5egRU.js","/app/immutable/chunks/Dge5ZGj2.js","/app/immutable/chunks/vlM04DTZ.js","/app/immutable/chunks/BPwzpRKZ.js","/app/immutable/chunks/CR5ZxoLH.js","/app/immutable/chunks/1mJrE3jk.js","/app/immutable/chunks/BZQZwdGm.js","/app/immutable/chunks/BbobBw8S.js","/app/immutable/chunks/DQewNXDh.js"])))=>i.map(i=>d[i]);
2
+ var lC=Object.defineProperty;var cC=(e,t,r)=>t in e?lC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var xr=(e,t,r)=>cC(e,typeof t!="symbol"?t+"":t,r);import{_ as Ve,t as Oo,bo as He,bm as je,bw as Do,b as Ro,bp as hC}from"./ClpAEjbe.js";import{g as dC}from"./BdWqymET.js";import{aR as bs}from"./Bxb8LI6C.js";import{b7 as uC,cc as fC,bs as No,a7 as Ko,ay as ui,aD as A,bS as We,be as en,b$ as rl,b_ as cr,bO as br,W as ge,c9 as Dt,bn as qo,aA as _e,aB as ar,bk as hd,bH as gt,ca as Bo,c5 as pl,a5 as qe,bA as $e,bV as ce,bl as Tr,c0 as Th,aC as pi,aw as ml,a as Wu,bj as Np,br as wi,cb as gC,bf as pC}from"./CJxGDkBm.js";import{i as yr}from"./wmcYjLAa.js";import{h as zu}from"./BigcqNWS.js";import{f as co,s as fe,b as qp,c as Wp,g as Xa}from"./CnGVh7I3.js";import{b as no}from"./NtFyWdpR.js";import{c as mC}from"./ChTqQfQN.js";import{d4 as yC,cW as xC,F as dn,aM as bC,bb as zp,m as CC,n as wC,f as kC,j as SC,y as Hu,v as Yu,h as vC,u as MC,P as TC,s as BC,O as _C,r as LC,k as AC,D as Xu,H as FC,U as $C,ax as EC,ay as PC,aY as IC}from"./CtJxHvGv.js";import{f as Ja,ae as OC}from"./BVi5KkOP.js";import"./CPDV_dyu.js";import{M as DC,Z as RC}from"./DyaBo2y6.js";import{p as rn,h as NC,d as qC,S as WC,e as zC,g as ya,i as ju}from"./BwASeArv.js";import{c as HC}from"./BbIcudMY.js";import{k as Hp}from"./Xh71Wbuh.js";import{n as To,h as Gu,t as Is,d as Uu}from"./oXpJ1LFx.js";import{c as fa}from"./DSqSJXGX.js";import{e as YC}from"./CARsKzUN.js";import{t as XC}from"./DAsc1V4f.js";import{s as il}from"./WSVFXKpL.js";import{H as jC}from"./DRG24ZS8.js";import{s as Vu,a as GC}from"./BsieX9dN.js";import{l as UC,K as VC,d as ZC,e as Cc,M as KC}from"./B06RKBOm.js";import"./B5wwCKYG.js";import{u as wo}from"./C1zxTHwk.js";import"./BeYVt6Wg.js";import"./CpP1PKzF.js";import{bL as QC}from"./D82C3bhe.js";function JC(e,t){uC(window,["resize"],()=>fC(()=>t(window[e])))}var Yp=Object.defineProperty,C=(e,t)=>Yp(e,"name",{value:t,configurable:!0}),t2=(e,t)=>{for(var r in t)Yp(e,r,{get:t[r],enumerable:!0})};function Xp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}C(Xp,"getDefaultExportFromCjs");var ei={},Pn={},Xo={},Zu;function Ts(){if(Zu)return Xo;Zu=1;function e(s){return typeof s>"u"||s===null}C(e,"isNothing");function t(s){return typeof s=="object"&&s!==null}C(t,"isObject");function r(s){return Array.isArray(s)?s:e(s)?[]:[s]}C(r,"toArray");function i(s,n){if(n){const l=Object.keys(n);for(let c=0,h=l.length;c<h;c+=1){const d=l[c];s[d]=n[d]}}return s}C(i,"extend");function o(s,n){let l="";for(let c=0;c<n;c+=1)l+=s;return l}C(o,"repeat");function a(s){return s===0&&Number.NEGATIVE_INFINITY===1/s}return C(a,"isNegativeZero"),Xo.isNothing=e,Xo.isObject=t,Xo.toArray=r,Xo.repeat=o,Xo.isNegativeZero=a,Xo.extend=i,Xo}C(Ts,"requireCommon");var wc,Ku;function Bs(){if(Ku)return wc;Ku=1;function e(r,i){let o="";const a=r.reason||"(unknown reason)";return r.mark?(r.mark.name&&(o+='in "'+r.mark.name+'" '),o+="("+(r.mark.line+1)+":"+(r.mark.column+1)+")",!i&&r.mark.snippet&&(o+=`
3
3
 
4
4
  `+r.mark.snippet),a+" "+o):a}C(e,"formatError");function t(r,i){Error.call(this),this.name="YAMLException",this.reason=r,this.mark=i,this.message=e(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}return C(t,"YAMLException2"),t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t.prototype.toString=C(function(i){return this.name+": "+e(this,i)},"toString"),wc=t,wc}C(Bs,"requireException");var kc,Qu;function jp(){if(Qu)return kc;Qu=1;const e=Ts();function t(o,a,s,n,l){let c="",h="";const d=Math.floor(l/2)-1;return n-a>d&&(c=" ... ",a=n-d+c.length),s-n>d&&(h=" ...",s=n+d-h.length),{str:c+o.slice(a,s).replace(/\t/g,"→")+h,pos:n-a+c.length}}C(t,"getLine");function r(o,a){return e.repeat(" ",a-o.length)+o}C(r,"padStart");function i(o,a){if(a=Object.create(a||null),!o.buffer)return null;a.maxLength||(a.maxLength=79),typeof a.indent!="number"&&(a.indent=1),typeof a.linesBefore!="number"&&(a.linesBefore=3),typeof a.linesAfter!="number"&&(a.linesAfter=2);const s=/\r?\n|\r|\0/g,n=[0],l=[];let c,h=-1;for(;c=s.exec(o.buffer);)l.push(c.index),n.push(c.index+c[0].length),o.position<=c.index&&h<0&&(h=n.length-2);h<0&&(h=n.length-1);let d="";const u=Math.min(o.line+a.linesAfter,l.length).toString().length,f=a.maxLength-(a.indent+u+3);for(let p=1;p<=a.linesBefore&&!(h-p<0);p++){const m=t(o.buffer,n[h-p],l[h-p],o.position-(n[h]-n[h-p]),f);d=e.repeat(" ",a.indent)+r((o.line-p+1).toString(),u)+" | "+m.str+`
5
5
  `+d}const g=t(o.buffer,n[h],l[h],o.position,f);d+=e.repeat(" ",a.indent)+r((o.line+1).toString(),u)+" | "+g.str+`
@@ -298,8 +298,8 @@ ${a.join(`
298
298
  L0,20`)},"requirement_arrow"),lL=C((e,t,r)=>{const i=Ar(),{themeVariables:o}=i,{strokeWidth:a}=o;e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${a}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
299
299
  L20,10
300
300
  M20,10
301
- L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),cL=C((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),hL=C((e,t,r)=>{const i=Ar(),{themeVariables:o}=i,{strokeWidth:a}=o,s=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");s.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),s.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),s.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),s.selectAll("*").attr("stroke-width",`${a}`)},"requirement_contains_neo"),dL=C((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-hierarchyEnd").attr("class","marker hierarchy "+t).attr("viewBox","0 0 12 10").attr("refX",10).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",10).attr("orient","auto").append("path").attr("d","M 0 0 L 6 5 L 0 10 M 4 0 L 10 5 L 4 10").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0").style("fill","none"),e.append("marker").attr("id",r+"_"+t+"-hierarchyStart").attr("class","marker hierarchy "+t).attr("viewBox","0 0 12 10").attr("refX",2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",10).attr("orient","auto").append("path").attr("d","M 12 0 L 6 5 L 12 10 M 8 0 L 2 5 L 8 10").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0").style("fill","none")},"hierarchy"),uL=C((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-openArrowEnd").attr("class","marker openArrow "+t).attr("viewBox","0 0 12 12").attr("refX",11).attr("refY",6).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1 1 L 11 6 L 1 11").attr("class","arrowMarkerPath").style("stroke-width",1.4).style("stroke-linecap","round").style("stroke-linejoin","round").style("stroke-dasharray","1,0").style("fill","none"),e.append("marker").attr("id",r+"_"+t+"-openArrowStart").attr("class","marker openArrow "+t).attr("viewBox","0 0 12 12").attr("refX",1).attr("refY",6).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 11 1 L 1 6 L 11 11").attr("class","arrowMarkerPath").style("stroke-width",1.4).style("stroke-linecap","round").style("stroke-linejoin","round").style("stroke-dasharray","1,0").style("fill","none")},"openArrow"),fL=C((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-hollowCircleStart").attr("class","marker hollowCircle "+t).attr("viewBox","0 0 10 10").attr("refX",0).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10).attr("markerHeight",10).attr("orient","auto").append("circle").attr("cx",5).attr("cy",5).attr("r",3.6).attr("class","arrowMarkerPath").style("stroke-width",1.4).style("stroke-dasharray","1,0").style("fill","none"),e.append("marker").attr("id",r+"_"+t+"-hollowCircleEnd").attr("class","marker hollowCircle "+t).attr("viewBox","0 0 10 10").attr("refX",10).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10).attr("markerHeight",10).attr("orient","auto").append("circle").attr("cx",5).attr("cy",5).attr("r",3.6).attr("class","arrowMarkerPath").style("stroke-width",1.4).style("stroke-dasharray","1,0").style("fill","none")},"hollowCircle"),gL={extension:H_,composition:Y_,aggregation:X_,dependency:j_,lollipop:G_,point:U_,circle:V_,cross:Z_,barb:K_,barbNeo:Q_,hierarchy:dL,only_one:J_,zero_or_one:tL,one_or_more:eL,zero_or_more:rL,only_one_neo:iL,zero_or_one_neo:oL,one_or_more_neo:aL,zero_or_more_neo:sL,requirement_arrow:nL,requirement_contains:cL,requirement_arrow_neo:lL,requirement_contains_neo:hL,openArrow:uL,hollowCircle:fL},pL=z_,mL={common:kn,getConfig:Ar,insertCluster:UB,insertEdge:W_,insertEdgeLabel:E_,insertMarkers:pL,insertNode:eb,interpolateToCurve:Vd,labelHelper:he,log:Lt,positionEdgeLabel:I_},yL=["elk.stress","elk.force","elk.mrtree","elk.sporeOverlap","elk.box","elk.rectpacking"],mn=Object.create(null),Cb=C(e=>{for(const t of e)mn[t.name]=t},"registerLayoutLoaders"),xL=C(()=>{const e=C(async()=>await Ve(()=>import("./DpBTZWt9.js"),__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url),"loader");return[{name:"elk",loader:e,algorithm:"elk.layered"},...yL.map(t=>({name:t,loader:e,algorithm:t}))]},"elkLayoutLoaders"),bL=C(()=>{Cb([{name:"dagre",loader:C(async()=>await Ve(()=>import("./uh-AKdCH.js"),__vite__mapDeps([7,2,3,4,5]),import.meta.url),"loader")},{name:"swimlane",loader:C(async()=>await Ve(()=>import("./DBeNyp1m.js"),__vite__mapDeps([8,1,2,3,4,5]),import.meta.url),"loader")},{name:"cose-bilkent",loader:C(async()=>await Ve(()=>import("./CPI29I6f.js"),__vite__mapDeps([9,10,6]),import.meta.url),"loader")},...xL()])},"registerDefaultLayoutLoaders");bL();var AP=C(async(e,t)=>{if(!Object.hasOwn(mn,e.layoutAlgorithm))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const a of e.nodes){const s=a.domId||a.id;a.domId=`${e.diagramId}-${s}`}const r=mn[e.layoutAlgorithm],i=await r.loader();a2(t,e.config);const o=await i.render(e,t,mL,{algorithm:r.algorithm});return B_(t.node()),o},"render"),ch="dagre",FP=C((e="",{fallback:t=ch}={})=>{if(Object.hasOwn(mn,e))return e;for(const r of[t,ch])if(Object.hasOwn(mn,r))return Lt.warn(`Layout algorithm ${e} is not registered. Using ${r} as fallback.`),r;throw new Error(`Neither layout algorithm ${e}, ${t}, nor ${ch} is registered.`)},"getRegisteredLayoutAlgorithm"),CL=C(e=>{const{securityLevel:t}=Ge();let r=Ye("body");if(t==="sandbox"){const a=Ye(`#i${e}`).node()?.contentDocument??document;r=Ye(a.body)}return r.select(`#${e}`)},"selectSvgElement"),ku="comm",wb="rule",kb="decl",wL="@media",kL="@import",SL="@supports",vL="@namespace",td="@keyframes",Sb="@layer",ML="@scope",TL=Math.abs,hn=String.fromCharCode;function vb(e){return e.trim()}function ed(e,t,r){return e.replace(t,r)}function is(e,t){return e.charCodeAt(t)|0}function ks(e,t,r){return e.slice(t,r)}function oo(e){return e.length}function Mb(e){return e.length}function jn(e,t){return t.push(e),e}var cc=1,Ss=1,Tb=0,Ii=0,qr=0,Fs="";function Su(e,t,r,i,o,a,s,n){return{value:e,root:t,parent:r,type:i,props:o,children:a,line:cc,column:Ss,length:s,return:"",siblings:n}}function BL(){return qr}function _L(){return qr=Ii>0?is(Fs,--Ii):0,Ss--,qr===10&&(Ss=1,cc--),qr}function ji(){return qr=Ii<Tb?is(Fs,Ii++):0,Ss++,qr===10&&(Ss=1,cc++),qr}function Vo(){return is(Fs,Ii)}function fl(){return Ii}function hc(e,t){return ks(Fs,e,t)}function yn(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function LL(e){return cc=Ss=1,Tb=oo(Fs=e),Ii=0,[]}function AL(e){return Fs="",e}function hh(e){return vb(hc(Ii-1,rd(e===91?e+2:e===40?e+1:e)))}function FL(e){for(;(qr=Vo())&&qr<33;)ji();return yn(e)>2||yn(qr)>3?"":" "}function $L(e,t){for(;--t&&ji()&&!(qr<48||qr>102||qr>57&&qr<65||qr>70&&qr<97););return hc(e,fl()+(t<6&&Vo()==32&&ji()==32))}function rd(e){for(;ji();)switch(qr){case e:return Ii;case 34:case 39:e!==34&&e!==39&&rd(qr);break;case 40:e===41&&rd(e);break;case 92:ji();break}return Ii}function EL(e,t){for(;ji()&&e+qr!==57;)if(e+qr===84&&Vo()===47)break;return"/*"+hc(t,Ii-1)+"*"+hn(e===47?e:ji())}function PL(e){for(;!yn(Vo());)ji();return hc(e,Ii)}function IL(e){return AL(gl("",null,null,null,[""],e=LL(e),0,[0],e))}function gl(e,t,r,i,o,a,s,n,l){for(var c=0,h=0,d=s,u=0,f=0,g=0,p=1,m=1,y=1,x=0,b=0,S="",T=o,k=a,_=i,L=S;m;)switch(g=b,b=ji()){case 40:g!=108&&is(L,d-1)==58?(x++,L+="("):L+=hh(b);break;case 41:x--,L+=")";break;case 34:case 39:case 91:L+=hh(b);break;case 9:case 10:case 13:case 32:if(x>0){L+=hn(b);break}L+=FL(g);break;case 92:L+=$L(fl()-1,7);continue;case 47:switch(Vo()){case 42:case 47:jn(OL(EL(ji(),fl()),t,r,l),l),(yn(g||1)==5||yn(Vo()||1)==5)&&oo(L)&&ks(L,-1,void 0)!==" "&&(L+=" ");break;default:L+="/"}break;case 123*p:n[c++]=oo(L)*y;case 125*p:case 59:case 0:if(x>0&&b){L+=hn(b);break}switch(b){case 0:case 125:m=0;case 59+h:y==-1&&(L=ed(L,/\f/g,"")),f>0&&(oo(L)-d||p===0)&&jn(f>32?sp(L+";",i,r,d-1,l):sp(ed(L," ","")+";",i,r,d-2,l),l);break;case 59:L+=";";default:if(jn(_=ap(L,t,r,c,h,o,n,S,T=[],k=[],d,a),a),b===123)if(h===0)gl(L,t,_,_,T,a,d,n,k);else{switch(u){case 99:if(is(L,3)===110)break;case 108:if(is(L,2)===97)break;default:h=0;case 100:case 109:case 115:}h?gl(e,_,_,i&&jn(ap(e,_,_,0,0,o,n,S,o,T=[],d,k),k),o,k,d,n,i?T:k):gl(L,_,_,_,[""],k,0,n,k)}}c=h=f=0,p=y=1,S=L="",d=s;break;case 58:d=1+oo(L),f=g;default:if(p<1){if(b==123)--p;else if(b==125&&p++==0&&_L()==125)continue}switch(L+=hn(b),b*p){case 38:y=h>0?1:(L+="\f",-1);break;case 44:if(x>0)break;n[c++]=(oo(L)-1)*y,y=1;break;case 64:Vo()===45&&(L+=hh(ji())),u=Vo(),h=d=oo(S=L+=PL(fl())),b++;break;case 45:g===45&&oo(L)==2&&(p=0)}}return a}function ap(e,t,r,i,o,a,s,n,l,c,h,d){for(var u=o-1,f=o===0?a:[""],g=Mb(f),p=0,m=0,y=0;p<i;++p)for(var x=0,b=ks(e,u+1,u=TL(m=s[p])),S=e;x<g;++x)(S=vb(m>0?f[x]+" "+b:ed(b,/&\f/g,f[x])))&&(l[y++]=S);return Su(e,t,r,o===0?wb:n,l,c,h,d)}function OL(e,t,r,i){return Su(e,t,r,ku,hn(BL()),ks(e,2,-2),0,i)}function sp(e,t,r,i,o){return Su(e,t,r,kb,ks(e,0,i),ks(e,i+1,-1),i,o)}function id(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function DL(e,t,r,i){switch(e.type){case Sb:if(e.children.length)break;case kL:case vL:case kb:return e.return=e.return||e.value;case ku:return"";case td:return e.return=e.value+"{"+id(e.children,i)+"}";case wb:if(!oo(e.value=e.props.join(",")))return""}return oo(r=id(e.children,i))?e.return=e.value+"{"+r+"}":""}function RL(e){var t=Mb(e);return function(r,i,o,a){for(var s="",n=0;n<t;n++)s+=e[n](r,i,o,a)||"";return s}}var Bb="c4",NL=C(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),qL=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./B6jc-_sR.js");return{diagram:t}},__vite__mapDeps([11,12]),import.meta.url);return{id:Bb,diagram:e}},"loader"),WL={id:Bb,detector:NL,loader:qL},zL=WL,_b="flowchart-v2",HL=C(e=>/^\s*(graph|flowchart)/.test(e),"detector"),YL=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./C3HJlgor.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([13,14,15,16,12,17,18,19,20,3,4,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,6,53,54,55,56,57,58,59,60,61,62]),import.meta.url);return{id:_b,diagram:e}},"loader"),XL={id:_b,detector:HL,loader:YL},jL=XL,Lb="agentflow",GL=C(e=>/^\s*agentflow-beta\b/.test(e),"detector"),UL=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./CuByX_yP.js");return{diagram:t}},__vite__mapDeps([63,14,15,16,12,17,18,19,20,3,4,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,6,53,54,55,56,57,58,59,60,61,62]),import.meta.url);return{id:Lb,diagram:e}},"loader"),VL={id:Lb,detector:GL,loader:UL},ZL=VL,Ab="swimlane",KL=C(e=>/^\s*swimlane-beta\b/.test(e),"detector"),QL=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./IcVyfKsD.js");return{diagram:t}},__vite__mapDeps([64,13,14,15,16,12,17,18,19,20,3,4,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,6,53,54,55,56,57,58,59,60,61,62]),import.meta.url);return{id:Ab,diagram:e}},"loader"),JL={id:Ab,detector:KL,loader:QL},tA=JL,Fb="er",eA=C(e=>/^\s*erDiagram/.test(e),"detector"),rA=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./D8PTjyMt.js");return{diagram:t}},__vite__mapDeps([65,15,16]),import.meta.url);return{id:Fb,diagram:e}},"loader"),iA={id:Fb,detector:eA,loader:rA},oA=iA,$b="gitGraph",aA=C(e=>/^\s*gitGraph/.test(e),"detector"),sA=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./Cuk_Gihq.js");return{diagram:t}},__vite__mapDeps([66,67,68,69,3,4]),import.meta.url);return{id:$b,diagram:e}},"loader"),nA={id:$b,detector:aA,loader:sA},lA=nA,Eb="gantt",cA=C(e=>/^\s*gantt/.test(e),"detector"),hA=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./DLR3Xiy1.js");return{diagram:t}},__vite__mapDeps([70,6,71]),import.meta.url);return{id:Eb,diagram:e}},"loader"),dA={id:Eb,detector:cA,loader:hA},uA=dA,Pb="info",fA=C(e=>/^\s*info/.test(e),"detector"),gA=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./Cp4OFkA0.js");return{diagram:t}},__vite__mapDeps([72,69,3,4]),import.meta.url);return{id:Pb,diagram:e}},"loader"),pA={id:Pb,detector:fA,loader:gA},Ib="pie",mA=C(e=>/^\s*pie/.test(e),"detector"),yA=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./2EVipgJi.js");return{diagram:t}},__vite__mapDeps([73,68,69,3,4,71]),import.meta.url);return{id:Ib,diagram:e}},"loader"),xA={id:Ib,detector:mA,loader:yA},Ob="quadrantChart",bA=C(e=>/^\s*quadrantChart/.test(e),"detector"),CA=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./gFsMmW36.js");return{diagram:t}},__vite__mapDeps([74,71]),import.meta.url);return{id:Ob,diagram:e}},"loader"),wA={id:Ob,detector:bA,loader:CA},kA=wA,Db="xychart",SA=C(e=>/^\s*xychart(-beta)?/.test(e),"detector"),vA=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./DD1WD1M5.js");return{diagram:t}},__vite__mapDeps([75,71]),import.meta.url);return{id:Db,diagram:e}},"loader"),MA={id:Db,detector:SA,loader:vA},TA=MA,Rb="requirement",BA=C(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),_A=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./DkM2tUNb.js");return{diagram:t}},__vite__mapDeps([76,15,16]),import.meta.url);return{id:Rb,diagram:e}},"loader"),LA={id:Rb,detector:BA,loader:_A},AA=LA,Nb="sequence",FA=C(e=>/^\s*sequenceDiagram/.test(e),"detector"),$A=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./TET1QjU6.js");return{diagram:t}},__vite__mapDeps([77,67,12]),import.meta.url);return{id:Nb,diagram:e}},"loader"),EA={id:Nb,detector:FA,loader:$A},PA=EA,qb="classDiagram",IA=C(e=>/^\s*classDiagram/.test(e),"detector"),OA=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./CrKTQysx.js");return{diagram:t}},__vite__mapDeps([78,14,15,16,12,17,18,19,20,3,4,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,6,53,54,55,56,57,58,59,60,61,62]),import.meta.url);return{id:qb,diagram:e}},"loader"),DA={id:qb,detector:IA,loader:OA},RA=DA,Wb="stateDiagram",NA=C(e=>/^\s*stateDiagram/.test(e),"detector"),qA=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./-A1Xt6t2.js");return{diagram:t}},__vite__mapDeps([79,15,16,12,17,18,19,20,3,4,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,6,53,54,55,56,57,58,59,60,61,62]),import.meta.url);return{id:Wb,diagram:e}},"loader"),WA={id:Wb,detector:NA,loader:qA},zA=WA,zb="journey",HA=C(e=>/^\s*journey/.test(e),"detector"),YA=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./DFudQwu4.js");return{diagram:t}},__vite__mapDeps([80,14,12]),import.meta.url);return{id:zb,diagram:e}},"loader"),XA={id:zb,detector:HA,loader:YA},jA=XA,Gn=4,Hs=75,GA=C(e=>{const t=[];for(const o of e.split(/\s+/)){let a=[...o];for(;a.length>Hs;)t.push(a.slice(0,Hs).join("")),a=a.slice(Hs);a.length>0&&t.push(a.join(""))}const r=[];let i="";for(const o of t){const a=i?`${i} ${o}`:o;[...a].length>Hs?(r.push(i),i=o):i=a}if(i&&r.push(i),r.length>Gn){r.length=Gn;const o=r[Gn-1]??"";r[Gn-1]=`${[...o].slice(0,Hs-3).join("")}...`}return r},"wrapErrorMessage"),UA=C((e,t,r,i)=>{Lt.debug(`rendering svg for syntax error
302
- `);const o=CL(t),a=o.append("g"),s=GA(i?.db.getErrorMessage?.()??""),n=s.length>0?500+s.length*56:512;o.attr("viewBox",`0 0 2412 ${n}`),um(o,100,n,!0),a.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),a.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),a.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),a.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),a.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),a.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),a.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),a.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`),s.forEach((l,c)=>{a.append("text").attr("class","error-text").attr("x",1440).attr("y",510+c*56).attr("font-size","42px").style("text-anchor","middle").text(l)})},"draw"),Hb={draw:UA},VA=Hb,dh,ZA={clear(){dh=void 0},setErrorMessage(e){dh=e},getErrorMessage(){return dh}},KA={db:ZA,renderer:Hb,parser:{parse:C(()=>{},"parse")}},QA=KA,Yb="flowchart-elk",JA=C((e,t={})=>/^\s*flowchart-elk/.test(e)?(t.layout="elk",!0):!1,"detector"),t5=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./C3HJlgor.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([13,14,15,16,12,17,18,19,20,3,4,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,6,53,54,55,56,57,58,59,60,61,62]),import.meta.url);return{id:Yb,diagram:e}},"loader"),e5={id:Yb,detector:JA,loader:t5},r5=e5,Xb="timeline",i5=C(e=>/^\s*timeline/.test(e),"detector"),o5=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./BD3toGAv.js");return{diagram:t}},[],import.meta.url);return{id:Xb,diagram:e}},"loader"),a5={id:Xb,detector:i5,loader:o5},s5=a5,jb="mindmap",n5=C(e=>/^\s*mindmap/.test(e),"detector"),l5=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./BtZepnY7.js");return{diagram:t}},__vite__mapDeps([81,15,16]),import.meta.url);return{id:jb,diagram:e}},"loader"),c5={id:jb,detector:n5,loader:l5},h5=c5,Gb="kanban",d5=C(e=>/^\s*kanban/.test(e),"detector"),u5=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./Dm3V_bi_.js");return{diagram:t}},__vite__mapDeps([82,14]),import.meta.url);return{id:Gb,diagram:e}},"loader"),f5={id:Gb,detector:d5,loader:u5},g5=f5,Ub="sankey",p5=C(e=>/^\s*sankey(-beta)?/.test(e),"detector"),m5=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./DlXO0azG.js");return{diagram:t}},__vite__mapDeps([83,71]),import.meta.url);return{id:Ub,diagram:e}},"loader"),y5={id:Ub,detector:p5,loader:m5},x5=y5,Vb="packet",b5=C(e=>/^\s*packet(-beta)?/.test(e),"detector"),C5=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./Dh6rqlVy.js");return{diagram:t}},__vite__mapDeps([84,68,69,3,4]),import.meta.url);return{id:Vb,diagram:e}},"loader"),w5={id:Vb,detector:b5,loader:C5},Zb="radar",k5=C(e=>/^\s*radar-beta/.test(e),"detector"),S5=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./BN7MhY13.js");return{diagram:t}},__vite__mapDeps([85,68,69,3,4]),import.meta.url);return{id:Zb,diagram:e}},"loader"),v5={id:Zb,detector:k5,loader:S5},Kb="block",M5=C(e=>/^\s*block(-beta)?/.test(e),"detector"),T5=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./BRfr79MP.js");return{diagram:t}},__vite__mapDeps([86,14,5]),import.meta.url);return{id:Kb,diagram:e}},"loader"),B5={id:Kb,detector:M5,loader:T5},_5=B5,Qb="treeView",L5=C(e=>/^\s*treeView-beta/.test(e),"detector"),A5=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./BEAj7h28.js");return{diagram:t}},__vite__mapDeps([87,67,68,69,3,4]),import.meta.url);return{id:Qb,diagram:e}},"loader"),F5={id:Qb,detector:L5,loader:A5},$5=F5,Jb="architecture",E5=C(e=>/^\s*architecture/.test(e),"detector"),P5=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./CJrtVlDG.js");return{diagram:t}},__vite__mapDeps([88,68,69,3,4,10,6]),import.meta.url);return{id:Jb,diagram:e}},"loader"),I5={id:Jb,detector:E5,loader:P5},O5=I5,t1="eventmodeling",D5=C(e=>/^\s*eventmodeling/.test(e),"detector"),R5=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./Bn_8JArX.js");return{diagram:t}},__vite__mapDeps([89,68,69,3,4]),import.meta.url);return{id:t1,diagram:e}},"loader"),N5={id:t1,detector:D5,loader:R5},q5=N5,e1="ishikawa",W5=C(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),z5=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./BJ8UpUx3.js");return{diagram:t}},[],import.meta.url);return{id:e1,diagram:e}},"loader"),H5={id:e1,detector:W5,loader:z5},r1="venn",Y5=C(e=>/^\s*venn-beta/.test(e),"detector"),X5=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./EUqcNEWQ.js");return{diagram:t}},[],import.meta.url);return{id:r1,diagram:e}},"loader"),j5={id:r1,detector:Y5,loader:X5},G5=j5,i1="treemap",U5=C(e=>/^\s*treemap/.test(e),"detector"),V5=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./BbU8lQ23.js");return{diagram:t}},__vite__mapDeps([90,16,68,69,3,4,71]),import.meta.url);return{id:i1,diagram:e}},"loader"),Z5={id:i1,detector:U5,loader:V5},o1="usecase",K5=C(e=>/^\s*usecase-beta(?:\s|$)/.test(e),"detector"),Q5=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./d4XsLpJr.js");return{diagram:t}},__vite__mapDeps([91,15,16]),import.meta.url);return{id:o1,diagram:e}},"loader"),J5={id:o1,detector:K5,loader:Q5},a1="wardley",tF=C(e=>/^\s*wardley-beta/i.test(e),"detector"),eF=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./VNZmrcSz.js");return{diagram:t}},__vite__mapDeps([92,68,69,3,4]),import.meta.url);return{id:a1,diagram:e}},"loader"),rF={id:a1,detector:tF,loader:eF},iF=rF,s1="cynefin",oF=C(e=>/^\s*cynefin-beta(?:[\s:]|$)/.test(e),"detector"),aF=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./D7c2h2XU.js");return{diagram:t}},__vite__mapDeps([93,68,69,3,4]),import.meta.url);return{id:s1,diagram:e}},"loader"),sF={id:s1,detector:oF,loader:aF},n1="railroad",nF=C(e=>/^\s*railroad-beta/i.test(e),"detector"),lF=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./TYee8CmD.js");return{diagram:t}},__vite__mapDeps([94,95,68,69,3,4]),import.meta.url);return{id:n1,diagram:e}},"loader"),cF={id:n1,detector:nF,loader:lF},l1="railroadEbnf",hF=C(e=>/^\s*railroad-ebnf-beta/i.test(e),"detector"),dF=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./SSRyQIWE.js");return{diagram:t}},__vite__mapDeps([96,95,68,69,3,4]),import.meta.url);return{id:l1,diagram:e}},"loader"),uF={id:l1,detector:hF,loader:dF},c1="railroadAbnf",fF=C(e=>/^\s*railroad-abnf-beta/i.test(e),"detector"),gF=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./CJJs2g33.js");return{diagram:t}},__vite__mapDeps([97,95,68,69,3,4]),import.meta.url);return{id:c1,diagram:e}},"loader"),pF={id:c1,detector:fF,loader:gF},h1="railroadPeg",mF=C(e=>/^\s*railroad-peg-beta/i.test(e),"detector"),yF=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./BAy-IHSv.js");return{diagram:t}},__vite__mapDeps([98,95,68,69,3,4]),import.meta.url);return{id:h1,diagram:e}},"loader"),xF={id:h1,detector:mF,loader:yF},np=!1,dc=C(()=>{np||(np=!0,Sl("error",QA,e=>e.toLowerCase().trim()==="error"),Sl("---",{db:{clear:C(()=>{},"clear")},styles:{},renderer:{draw:C(()=>{},"draw")},parser:{parse:C(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:C(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),Bh(r5,h5,O5),Bh(ZL,zL,g5,RA,oA,uA,pA,xA,AA,PA,tA,jL,s5,lA,zA,jA,kA,x5,w5,TA,_5,q5,$5,v5,H5,Z5,cF,uF,pF,xF,G5,iF,sF,J5))},"addDiagrams"),bF=C(async()=>{Lt.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(Ta).map(async([r,{detector:i,loader:o}])=>{if(o)try{$h(r)}catch{try{const{diagram:a,id:s}=await o();Sl(s,a,i)}catch(a){throw Lt.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete Ta[r],a}}}))).filter(r=>r.status==="rejected");if(t.length>0){Lt.error(`Failed to load ${t.length} external diagrams`);for(const r of t)Lt.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),CF="graphics-document document";function d1(e,t){e.attr("role",CF),t!==""&&e.attr("aria-roledescription",t)}C(d1,"setA11yDiagramInfo");function u1(e,t,r,i){if(e.insert!==void 0){if(r){const o=`chart-desc-${i}`;e.attr("aria-describedby",o),e.insert("desc",":first-child").attr("id",o).text(r)}if(t){const o=`chart-title-${i}`;e.attr("aria-labelledby",o),e.insert("title",":first-child").attr("id",o).text(t)}}}C(u1,"addSVGa11yTitleDescription");var Ma,Xl=(Ma=class{constructor(t,r,i,o,a){this.type=t,this.text=r,this.db=i,this.parser=o,this.renderer=a}static async fromText(t,r={}){const i=typeof t=="string"?{cleaned:t}:t,o=Ar(),a=Zl(i.cleaned,o);try{$h(a)}catch{const u=C2(a);if(!u)throw new Jp(`Diagram ${a} not found.`);const{id:f,diagram:g}=await u();Sl(f,g)}const{db:s,parser:n,renderer:l,init:c}=$h(a);n.parser&&(n.parser.yy=s),s.clear?.(),c?.(o),r.title&&s.setDiagramTitle?.(r.title);let h=i.cleaned;if(s.preserveCommentsWhenParsing&&i.withComments){const u=o.maxTextSize??Ld.maxTextSize;i.withComments.length>u?Lt.warn(`Comment-preserving source exceeds maxTextSize (${i.withComments.length} > ${u}); parsing the comment-stripped text instead. Reported source positions will not account for comment lines.`):h=i.withComments}const d=TM(h)+`
301
+ L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),cL=C((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),hL=C((e,t,r)=>{const i=Ar(),{themeVariables:o}=i,{strokeWidth:a}=o,s=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");s.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),s.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),s.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),s.selectAll("*").attr("stroke-width",`${a}`)},"requirement_contains_neo"),dL=C((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-hierarchyEnd").attr("class","marker hierarchy "+t).attr("viewBox","0 0 12 10").attr("refX",10).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",10).attr("orient","auto").append("path").attr("d","M 0 0 L 6 5 L 0 10 M 4 0 L 10 5 L 4 10").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0").style("fill","none"),e.append("marker").attr("id",r+"_"+t+"-hierarchyStart").attr("class","marker hierarchy "+t).attr("viewBox","0 0 12 10").attr("refX",2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",10).attr("orient","auto").append("path").attr("d","M 12 0 L 6 5 L 12 10 M 8 0 L 2 5 L 8 10").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0").style("fill","none")},"hierarchy"),uL=C((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-openArrowEnd").attr("class","marker openArrow "+t).attr("viewBox","0 0 12 12").attr("refX",11).attr("refY",6).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1 1 L 11 6 L 1 11").attr("class","arrowMarkerPath").style("stroke-width",1.4).style("stroke-linecap","round").style("stroke-linejoin","round").style("stroke-dasharray","1,0").style("fill","none"),e.append("marker").attr("id",r+"_"+t+"-openArrowStart").attr("class","marker openArrow "+t).attr("viewBox","0 0 12 12").attr("refX",1).attr("refY",6).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 11 1 L 1 6 L 11 11").attr("class","arrowMarkerPath").style("stroke-width",1.4).style("stroke-linecap","round").style("stroke-linejoin","round").style("stroke-dasharray","1,0").style("fill","none")},"openArrow"),fL=C((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-hollowCircleStart").attr("class","marker hollowCircle "+t).attr("viewBox","0 0 10 10").attr("refX",0).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10).attr("markerHeight",10).attr("orient","auto").append("circle").attr("cx",5).attr("cy",5).attr("r",3.6).attr("class","arrowMarkerPath").style("stroke-width",1.4).style("stroke-dasharray","1,0").style("fill","none"),e.append("marker").attr("id",r+"_"+t+"-hollowCircleEnd").attr("class","marker hollowCircle "+t).attr("viewBox","0 0 10 10").attr("refX",10).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10).attr("markerHeight",10).attr("orient","auto").append("circle").attr("cx",5).attr("cy",5).attr("r",3.6).attr("class","arrowMarkerPath").style("stroke-width",1.4).style("stroke-dasharray","1,0").style("fill","none")},"hollowCircle"),gL={extension:H_,composition:Y_,aggregation:X_,dependency:j_,lollipop:G_,point:U_,circle:V_,cross:Z_,barb:K_,barbNeo:Q_,hierarchy:dL,only_one:J_,zero_or_one:tL,one_or_more:eL,zero_or_more:rL,only_one_neo:iL,zero_or_one_neo:oL,one_or_more_neo:aL,zero_or_more_neo:sL,requirement_arrow:nL,requirement_contains:cL,requirement_arrow_neo:lL,requirement_contains_neo:hL,openArrow:uL,hollowCircle:fL},pL=z_,mL={common:kn,getConfig:Ar,insertCluster:UB,insertEdge:W_,insertEdgeLabel:E_,insertMarkers:pL,insertNode:eb,interpolateToCurve:Vd,labelHelper:he,log:Lt,positionEdgeLabel:I_},yL=["elk.stress","elk.force","elk.mrtree","elk.sporeOverlap","elk.box","elk.rectpacking"],mn=Object.create(null),Cb=C(e=>{for(const t of e)mn[t.name]=t},"registerLayoutLoaders"),xL=C(()=>{const e=C(async()=>await Ve(()=>import("./CIJY2gxU.js"),__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url),"loader");return[{name:"elk",loader:e,algorithm:"elk.layered"},...yL.map(t=>({name:t,loader:e,algorithm:t}))]},"elkLayoutLoaders"),bL=C(()=>{Cb([{name:"dagre",loader:C(async()=>await Ve(()=>import("./9DRLCqFH.js"),__vite__mapDeps([7,2,3,4,5]),import.meta.url),"loader")},{name:"swimlane",loader:C(async()=>await Ve(()=>import("./yLWVsiXj.js"),__vite__mapDeps([8,1,2,3,4,5]),import.meta.url),"loader")},{name:"cose-bilkent",loader:C(async()=>await Ve(()=>import("./DsnmJyUD.js"),__vite__mapDeps([9,10,6]),import.meta.url),"loader")},...xL()])},"registerDefaultLayoutLoaders");bL();var AP=C(async(e,t)=>{if(!Object.hasOwn(mn,e.layoutAlgorithm))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const a of e.nodes){const s=a.domId||a.id;a.domId=`${e.diagramId}-${s}`}const r=mn[e.layoutAlgorithm],i=await r.loader();a2(t,e.config);const o=await i.render(e,t,mL,{algorithm:r.algorithm});return B_(t.node()),o},"render"),ch="dagre",FP=C((e="",{fallback:t=ch}={})=>{if(Object.hasOwn(mn,e))return e;for(const r of[t,ch])if(Object.hasOwn(mn,r))return Lt.warn(`Layout algorithm ${e} is not registered. Using ${r} as fallback.`),r;throw new Error(`Neither layout algorithm ${e}, ${t}, nor ${ch} is registered.`)},"getRegisteredLayoutAlgorithm"),CL=C(e=>{const{securityLevel:t}=Ge();let r=Ye("body");if(t==="sandbox"){const a=Ye(`#i${e}`).node()?.contentDocument??document;r=Ye(a.body)}return r.select(`#${e}`)},"selectSvgElement"),ku="comm",wb="rule",kb="decl",wL="@media",kL="@import",SL="@supports",vL="@namespace",td="@keyframes",Sb="@layer",ML="@scope",TL=Math.abs,hn=String.fromCharCode;function vb(e){return e.trim()}function ed(e,t,r){return e.replace(t,r)}function is(e,t){return e.charCodeAt(t)|0}function ks(e,t,r){return e.slice(t,r)}function oo(e){return e.length}function Mb(e){return e.length}function jn(e,t){return t.push(e),e}var cc=1,Ss=1,Tb=0,Ii=0,qr=0,Fs="";function Su(e,t,r,i,o,a,s,n){return{value:e,root:t,parent:r,type:i,props:o,children:a,line:cc,column:Ss,length:s,return:"",siblings:n}}function BL(){return qr}function _L(){return qr=Ii>0?is(Fs,--Ii):0,Ss--,qr===10&&(Ss=1,cc--),qr}function ji(){return qr=Ii<Tb?is(Fs,Ii++):0,Ss++,qr===10&&(Ss=1,cc++),qr}function Vo(){return is(Fs,Ii)}function fl(){return Ii}function hc(e,t){return ks(Fs,e,t)}function yn(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function LL(e){return cc=Ss=1,Tb=oo(Fs=e),Ii=0,[]}function AL(e){return Fs="",e}function hh(e){return vb(hc(Ii-1,rd(e===91?e+2:e===40?e+1:e)))}function FL(e){for(;(qr=Vo())&&qr<33;)ji();return yn(e)>2||yn(qr)>3?"":" "}function $L(e,t){for(;--t&&ji()&&!(qr<48||qr>102||qr>57&&qr<65||qr>70&&qr<97););return hc(e,fl()+(t<6&&Vo()==32&&ji()==32))}function rd(e){for(;ji();)switch(qr){case e:return Ii;case 34:case 39:e!==34&&e!==39&&rd(qr);break;case 40:e===41&&rd(e);break;case 92:ji();break}return Ii}function EL(e,t){for(;ji()&&e+qr!==57;)if(e+qr===84&&Vo()===47)break;return"/*"+hc(t,Ii-1)+"*"+hn(e===47?e:ji())}function PL(e){for(;!yn(Vo());)ji();return hc(e,Ii)}function IL(e){return AL(gl("",null,null,null,[""],e=LL(e),0,[0],e))}function gl(e,t,r,i,o,a,s,n,l){for(var c=0,h=0,d=s,u=0,f=0,g=0,p=1,m=1,y=1,x=0,b=0,S="",T=o,k=a,_=i,L=S;m;)switch(g=b,b=ji()){case 40:g!=108&&is(L,d-1)==58?(x++,L+="("):L+=hh(b);break;case 41:x--,L+=")";break;case 34:case 39:case 91:L+=hh(b);break;case 9:case 10:case 13:case 32:if(x>0){L+=hn(b);break}L+=FL(g);break;case 92:L+=$L(fl()-1,7);continue;case 47:switch(Vo()){case 42:case 47:jn(OL(EL(ji(),fl()),t,r,l),l),(yn(g||1)==5||yn(Vo()||1)==5)&&oo(L)&&ks(L,-1,void 0)!==" "&&(L+=" ");break;default:L+="/"}break;case 123*p:n[c++]=oo(L)*y;case 125*p:case 59:case 0:if(x>0&&b){L+=hn(b);break}switch(b){case 0:case 125:m=0;case 59+h:y==-1&&(L=ed(L,/\f/g,"")),f>0&&(oo(L)-d||p===0)&&jn(f>32?sp(L+";",i,r,d-1,l):sp(ed(L," ","")+";",i,r,d-2,l),l);break;case 59:L+=";";default:if(jn(_=ap(L,t,r,c,h,o,n,S,T=[],k=[],d,a),a),b===123)if(h===0)gl(L,t,_,_,T,a,d,n,k);else{switch(u){case 99:if(is(L,3)===110)break;case 108:if(is(L,2)===97)break;default:h=0;case 100:case 109:case 115:}h?gl(e,_,_,i&&jn(ap(e,_,_,0,0,o,n,S,o,T=[],d,k),k),o,k,d,n,i?T:k):gl(L,_,_,_,[""],k,0,n,k)}}c=h=f=0,p=y=1,S=L="",d=s;break;case 58:d=1+oo(L),f=g;default:if(p<1){if(b==123)--p;else if(b==125&&p++==0&&_L()==125)continue}switch(L+=hn(b),b*p){case 38:y=h>0?1:(L+="\f",-1);break;case 44:if(x>0)break;n[c++]=(oo(L)-1)*y,y=1;break;case 64:Vo()===45&&(L+=hh(ji())),u=Vo(),h=d=oo(S=L+=PL(fl())),b++;break;case 45:g===45&&oo(L)==2&&(p=0)}}return a}function ap(e,t,r,i,o,a,s,n,l,c,h,d){for(var u=o-1,f=o===0?a:[""],g=Mb(f),p=0,m=0,y=0;p<i;++p)for(var x=0,b=ks(e,u+1,u=TL(m=s[p])),S=e;x<g;++x)(S=vb(m>0?f[x]+" "+b:ed(b,/&\f/g,f[x])))&&(l[y++]=S);return Su(e,t,r,o===0?wb:n,l,c,h,d)}function OL(e,t,r,i){return Su(e,t,r,ku,hn(BL()),ks(e,2,-2),0,i)}function sp(e,t,r,i,o){return Su(e,t,r,kb,ks(e,0,i),ks(e,i+1,-1),i,o)}function id(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function DL(e,t,r,i){switch(e.type){case Sb:if(e.children.length)break;case kL:case vL:case kb:return e.return=e.return||e.value;case ku:return"";case td:return e.return=e.value+"{"+id(e.children,i)+"}";case wb:if(!oo(e.value=e.props.join(",")))return""}return oo(r=id(e.children,i))?e.return=e.value+"{"+r+"}":""}function RL(e){var t=Mb(e);return function(r,i,o,a){for(var s="",n=0;n<t;n++)s+=e[n](r,i,o,a)||"";return s}}var Bb="c4",NL=C(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),qL=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./lFTk8wpi.js");return{diagram:t}},__vite__mapDeps([11,12]),import.meta.url);return{id:Bb,diagram:e}},"loader"),WL={id:Bb,detector:NL,loader:qL},zL=WL,_b="flowchart-v2",HL=C(e=>/^\s*(graph|flowchart)/.test(e),"detector"),YL=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./D1wNvwqn.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([13,14,15,16,12,17,18,19,20,3,4,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,6,53,54,55,56,57,58,59,60,61,62]),import.meta.url);return{id:_b,diagram:e}},"loader"),XL={id:_b,detector:HL,loader:YL},jL=XL,Lb="agentflow",GL=C(e=>/^\s*agentflow-beta\b/.test(e),"detector"),UL=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./LbiCax8N.js");return{diagram:t}},__vite__mapDeps([63,14,15,16,12,17,18,19,20,3,4,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,6,53,54,55,56,57,58,59,60,61,62]),import.meta.url);return{id:Lb,diagram:e}},"loader"),VL={id:Lb,detector:GL,loader:UL},ZL=VL,Ab="swimlane",KL=C(e=>/^\s*swimlane-beta\b/.test(e),"detector"),QL=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./CBHdapAk.js");return{diagram:t}},__vite__mapDeps([64,13,14,15,16,12,17,18,19,20,3,4,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,6,53,54,55,56,57,58,59,60,61,62]),import.meta.url);return{id:Ab,diagram:e}},"loader"),JL={id:Ab,detector:KL,loader:QL},tA=JL,Fb="er",eA=C(e=>/^\s*erDiagram/.test(e),"detector"),rA=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./vE2E6sS8.js");return{diagram:t}},__vite__mapDeps([65,15,16]),import.meta.url);return{id:Fb,diagram:e}},"loader"),iA={id:Fb,detector:eA,loader:rA},oA=iA,$b="gitGraph",aA=C(e=>/^\s*gitGraph/.test(e),"detector"),sA=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./DY06SZsl.js");return{diagram:t}},__vite__mapDeps([66,67,68,69,3,4]),import.meta.url);return{id:$b,diagram:e}},"loader"),nA={id:$b,detector:aA,loader:sA},lA=nA,Eb="gantt",cA=C(e=>/^\s*gantt/.test(e),"detector"),hA=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./Di4F3rxF.js");return{diagram:t}},__vite__mapDeps([70,6,71]),import.meta.url);return{id:Eb,diagram:e}},"loader"),dA={id:Eb,detector:cA,loader:hA},uA=dA,Pb="info",fA=C(e=>/^\s*info/.test(e),"detector"),gA=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./Z4Jzxw8B.js");return{diagram:t}},__vite__mapDeps([72,69,3,4]),import.meta.url);return{id:Pb,diagram:e}},"loader"),pA={id:Pb,detector:fA,loader:gA},Ib="pie",mA=C(e=>/^\s*pie/.test(e),"detector"),yA=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./BDThAQjj.js");return{diagram:t}},__vite__mapDeps([73,68,69,3,4,71]),import.meta.url);return{id:Ib,diagram:e}},"loader"),xA={id:Ib,detector:mA,loader:yA},Ob="quadrantChart",bA=C(e=>/^\s*quadrantChart/.test(e),"detector"),CA=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./BesmUwoU.js");return{diagram:t}},__vite__mapDeps([74,71]),import.meta.url);return{id:Ob,diagram:e}},"loader"),wA={id:Ob,detector:bA,loader:CA},kA=wA,Db="xychart",SA=C(e=>/^\s*xychart(-beta)?/.test(e),"detector"),vA=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./Ds6NYQhM.js");return{diagram:t}},__vite__mapDeps([75,71]),import.meta.url);return{id:Db,diagram:e}},"loader"),MA={id:Db,detector:SA,loader:vA},TA=MA,Rb="requirement",BA=C(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),_A=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./fth1noPu.js");return{diagram:t}},__vite__mapDeps([76,15,16]),import.meta.url);return{id:Rb,diagram:e}},"loader"),LA={id:Rb,detector:BA,loader:_A},AA=LA,Nb="sequence",FA=C(e=>/^\s*sequenceDiagram/.test(e),"detector"),$A=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./CL1PbmdJ.js");return{diagram:t}},__vite__mapDeps([77,67,12]),import.meta.url);return{id:Nb,diagram:e}},"loader"),EA={id:Nb,detector:FA,loader:$A},PA=EA,qb="classDiagram",IA=C(e=>/^\s*classDiagram/.test(e),"detector"),OA=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./B0lZCUS6.js");return{diagram:t}},__vite__mapDeps([78,14,15,16,12,17,18,19,20,3,4,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,6,53,54,55,56,57,58,59,60,61,62]),import.meta.url);return{id:qb,diagram:e}},"loader"),DA={id:qb,detector:IA,loader:OA},RA=DA,Wb="stateDiagram",NA=C(e=>/^\s*stateDiagram/.test(e),"detector"),qA=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./CrL6DZCQ.js");return{diagram:t}},__vite__mapDeps([79,15,16,12,17,18,19,20,3,4,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,6,53,54,55,56,57,58,59,60,61,62]),import.meta.url);return{id:Wb,diagram:e}},"loader"),WA={id:Wb,detector:NA,loader:qA},zA=WA,zb="journey",HA=C(e=>/^\s*journey/.test(e),"detector"),YA=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./CjYF1At4.js");return{diagram:t}},__vite__mapDeps([80,14,12]),import.meta.url);return{id:zb,diagram:e}},"loader"),XA={id:zb,detector:HA,loader:YA},jA=XA,Gn=4,Hs=75,GA=C(e=>{const t=[];for(const o of e.split(/\s+/)){let a=[...o];for(;a.length>Hs;)t.push(a.slice(0,Hs).join("")),a=a.slice(Hs);a.length>0&&t.push(a.join(""))}const r=[];let i="";for(const o of t){const a=i?`${i} ${o}`:o;[...a].length>Hs?(r.push(i),i=o):i=a}if(i&&r.push(i),r.length>Gn){r.length=Gn;const o=r[Gn-1]??"";r[Gn-1]=`${[...o].slice(0,Hs-3).join("")}...`}return r},"wrapErrorMessage"),UA=C((e,t,r,i)=>{Lt.debug(`rendering svg for syntax error
302
+ `);const o=CL(t),a=o.append("g"),s=GA(i?.db.getErrorMessage?.()??""),n=s.length>0?500+s.length*56:512;o.attr("viewBox",`0 0 2412 ${n}`),um(o,100,n,!0),a.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),a.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),a.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),a.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),a.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),a.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),a.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),a.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`),s.forEach((l,c)=>{a.append("text").attr("class","error-text").attr("x",1440).attr("y",510+c*56).attr("font-size","42px").style("text-anchor","middle").text(l)})},"draw"),Hb={draw:UA},VA=Hb,dh,ZA={clear(){dh=void 0},setErrorMessage(e){dh=e},getErrorMessage(){return dh}},KA={db:ZA,renderer:Hb,parser:{parse:C(()=>{},"parse")}},QA=KA,Yb="flowchart-elk",JA=C((e,t={})=>/^\s*flowchart-elk/.test(e)?(t.layout="elk",!0):!1,"detector"),t5=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./D1wNvwqn.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([13,14,15,16,12,17,18,19,20,3,4,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,6,53,54,55,56,57,58,59,60,61,62]),import.meta.url);return{id:Yb,diagram:e}},"loader"),e5={id:Yb,detector:JA,loader:t5},r5=e5,Xb="timeline",i5=C(e=>/^\s*timeline/.test(e),"detector"),o5=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./DdJj628K.js");return{diagram:t}},[],import.meta.url);return{id:Xb,diagram:e}},"loader"),a5={id:Xb,detector:i5,loader:o5},s5=a5,jb="mindmap",n5=C(e=>/^\s*mindmap/.test(e),"detector"),l5=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./ahq3r4Wz.js");return{diagram:t}},__vite__mapDeps([81,15,16]),import.meta.url);return{id:jb,diagram:e}},"loader"),c5={id:jb,detector:n5,loader:l5},h5=c5,Gb="kanban",d5=C(e=>/^\s*kanban/.test(e),"detector"),u5=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./BehvUfjM.js");return{diagram:t}},__vite__mapDeps([82,14]),import.meta.url);return{id:Gb,diagram:e}},"loader"),f5={id:Gb,detector:d5,loader:u5},g5=f5,Ub="sankey",p5=C(e=>/^\s*sankey(-beta)?/.test(e),"detector"),m5=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./C-y2Lv4J.js");return{diagram:t}},__vite__mapDeps([83,71]),import.meta.url);return{id:Ub,diagram:e}},"loader"),y5={id:Ub,detector:p5,loader:m5},x5=y5,Vb="packet",b5=C(e=>/^\s*packet(-beta)?/.test(e),"detector"),C5=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./CnzZSXm6.js");return{diagram:t}},__vite__mapDeps([84,68,69,3,4]),import.meta.url);return{id:Vb,diagram:e}},"loader"),w5={id:Vb,detector:b5,loader:C5},Zb="radar",k5=C(e=>/^\s*radar-beta/.test(e),"detector"),S5=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./Ixhw1ROs.js");return{diagram:t}},__vite__mapDeps([85,68,69,3,4]),import.meta.url);return{id:Zb,diagram:e}},"loader"),v5={id:Zb,detector:k5,loader:S5},Kb="block",M5=C(e=>/^\s*block(-beta)?/.test(e),"detector"),T5=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./CQy8trug.js");return{diagram:t}},__vite__mapDeps([86,14,5]),import.meta.url);return{id:Kb,diagram:e}},"loader"),B5={id:Kb,detector:M5,loader:T5},_5=B5,Qb="treeView",L5=C(e=>/^\s*treeView-beta/.test(e),"detector"),A5=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./DC0oh9YH.js");return{diagram:t}},__vite__mapDeps([87,67,68,69,3,4]),import.meta.url);return{id:Qb,diagram:e}},"loader"),F5={id:Qb,detector:L5,loader:A5},$5=F5,Jb="architecture",E5=C(e=>/^\s*architecture/.test(e),"detector"),P5=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./C79sRXBG.js");return{diagram:t}},__vite__mapDeps([88,68,69,3,4,10,6]),import.meta.url);return{id:Jb,diagram:e}},"loader"),I5={id:Jb,detector:E5,loader:P5},O5=I5,t1="eventmodeling",D5=C(e=>/^\s*eventmodeling/.test(e),"detector"),R5=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./OfToEAub.js");return{diagram:t}},__vite__mapDeps([89,68,69,3,4]),import.meta.url);return{id:t1,diagram:e}},"loader"),N5={id:t1,detector:D5,loader:R5},q5=N5,e1="ishikawa",W5=C(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),z5=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./ftVcR4tQ.js");return{diagram:t}},[],import.meta.url);return{id:e1,diagram:e}},"loader"),H5={id:e1,detector:W5,loader:z5},r1="venn",Y5=C(e=>/^\s*venn-beta/.test(e),"detector"),X5=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./uA3ZM6fH.js");return{diagram:t}},[],import.meta.url);return{id:r1,diagram:e}},"loader"),j5={id:r1,detector:Y5,loader:X5},G5=j5,i1="treemap",U5=C(e=>/^\s*treemap/.test(e),"detector"),V5=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./BIn5egRU.js");return{diagram:t}},__vite__mapDeps([90,16,68,69,3,4,71]),import.meta.url);return{id:i1,diagram:e}},"loader"),Z5={id:i1,detector:U5,loader:V5},o1="usecase",K5=C(e=>/^\s*usecase-beta(?:\s|$)/.test(e),"detector"),Q5=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./Dge5ZGj2.js");return{diagram:t}},__vite__mapDeps([91,15,16]),import.meta.url);return{id:o1,diagram:e}},"loader"),J5={id:o1,detector:K5,loader:Q5},a1="wardley",tF=C(e=>/^\s*wardley-beta/i.test(e),"detector"),eF=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./vlM04DTZ.js");return{diagram:t}},__vite__mapDeps([92,68,69,3,4]),import.meta.url);return{id:a1,diagram:e}},"loader"),rF={id:a1,detector:tF,loader:eF},iF=rF,s1="cynefin",oF=C(e=>/^\s*cynefin-beta(?:[\s:]|$)/.test(e),"detector"),aF=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./BPwzpRKZ.js");return{diagram:t}},__vite__mapDeps([93,68,69,3,4]),import.meta.url);return{id:s1,diagram:e}},"loader"),sF={id:s1,detector:oF,loader:aF},n1="railroad",nF=C(e=>/^\s*railroad-beta/i.test(e),"detector"),lF=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./CR5ZxoLH.js");return{diagram:t}},__vite__mapDeps([94,95,68,69,3,4]),import.meta.url);return{id:n1,diagram:e}},"loader"),cF={id:n1,detector:nF,loader:lF},l1="railroadEbnf",hF=C(e=>/^\s*railroad-ebnf-beta/i.test(e),"detector"),dF=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./BZQZwdGm.js");return{diagram:t}},__vite__mapDeps([96,95,68,69,3,4]),import.meta.url);return{id:l1,diagram:e}},"loader"),uF={id:l1,detector:hF,loader:dF},c1="railroadAbnf",fF=C(e=>/^\s*railroad-abnf-beta/i.test(e),"detector"),gF=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./BbobBw8S.js");return{diagram:t}},__vite__mapDeps([97,95,68,69,3,4]),import.meta.url);return{id:c1,diagram:e}},"loader"),pF={id:c1,detector:fF,loader:gF},h1="railroadPeg",mF=C(e=>/^\s*railroad-peg-beta/i.test(e),"detector"),yF=C(async()=>{const{diagram:e}=await Ve(async()=>{const{diagram:t}=await import("./DQewNXDh.js");return{diagram:t}},__vite__mapDeps([98,95,68,69,3,4]),import.meta.url);return{id:h1,diagram:e}},"loader"),xF={id:h1,detector:mF,loader:yF},np=!1,dc=C(()=>{np||(np=!0,Sl("error",QA,e=>e.toLowerCase().trim()==="error"),Sl("---",{db:{clear:C(()=>{},"clear")},styles:{},renderer:{draw:C(()=>{},"draw")},parser:{parse:C(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:C(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),Bh(r5,h5,O5),Bh(ZL,zL,g5,RA,oA,uA,pA,xA,AA,PA,tA,jL,s5,lA,zA,jA,kA,x5,w5,TA,_5,q5,$5,v5,H5,Z5,cF,uF,pF,xF,G5,iF,sF,J5))},"addDiagrams"),bF=C(async()=>{Lt.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(Ta).map(async([r,{detector:i,loader:o}])=>{if(o)try{$h(r)}catch{try{const{diagram:a,id:s}=await o();Sl(s,a,i)}catch(a){throw Lt.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete Ta[r],a}}}))).filter(r=>r.status==="rejected");if(t.length>0){Lt.error(`Failed to load ${t.length} external diagrams`);for(const r of t)Lt.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),CF="graphics-document document";function d1(e,t){e.attr("role",CF),t!==""&&e.attr("aria-roledescription",t)}C(d1,"setA11yDiagramInfo");function u1(e,t,r,i){if(e.insert!==void 0){if(r){const o=`chart-desc-${i}`;e.attr("aria-describedby",o),e.insert("desc",":first-child").attr("id",o).text(r)}if(t){const o=`chart-title-${i}`;e.attr("aria-labelledby",o),e.insert("title",":first-child").attr("id",o).text(t)}}}C(u1,"addSVGa11yTitleDescription");var Ma,Xl=(Ma=class{constructor(t,r,i,o,a){this.type=t,this.text=r,this.db=i,this.parser=o,this.renderer=a}static async fromText(t,r={}){const i=typeof t=="string"?{cleaned:t}:t,o=Ar(),a=Zl(i.cleaned,o);try{$h(a)}catch{const u=C2(a);if(!u)throw new Jp(`Diagram ${a} not found.`);const{id:f,diagram:g}=await u();Sl(f,g)}const{db:s,parser:n,renderer:l,init:c}=$h(a);n.parser&&(n.parser.yy=s),s.clear?.(),c?.(o),r.title&&s.setDiagramTitle?.(r.title);let h=i.cleaned;if(s.preserveCommentsWhenParsing&&i.withComments){const u=o.maxTextSize??Ld.maxTextSize;i.withComments.length>u?Lt.warn(`Comment-preserving source exceeds maxTextSize (${i.withComments.length} > ${u}); parsing the comment-stripped text instead. Reported source positions will not account for comment lines.`):h=i.withComments}const d=TM(h)+`
303
303
  `;return i.frontmatterLineOffset&&s.setFrontmatterLineOffset?.(i.frontmatterLineOffset),await n.parse(d),new Ma(a,d,s,n,l)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},C(Ma,"Diagram"),Ma),lp=[],wF=C(()=>{lp.forEach(e=>{e()}),lp=[]},"attachFunctions"),kF=C(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function f1(e){const t=Qp(e);if(!t)return{text:e,metadata:{}};const r=t.indent,i=r?t.body.split(`
304
304
  `).map(s=>s.startsWith(r)?s.slice(r.length):s).join(`
305
305
  `):t.body;let o=o2(i,{schema:i2})??{};o=typeof o=="object"&&!Array.isArray(o)?o:{};const a={};return o.displayMode&&(a.displayMode=o.displayMode.toString()),o.title&&(a.title=o.title.toString()),o.config&&(a.config=o.config),{text:e.slice(t.length),metadata:a}}C(f1,"extractFrontMatter");var SF=C(e=>e.replace(/\r\n?/g,`
@@ -1 +1 @@
1
- import{t as bt,bo as x,bw as wt,bq as Rt,b as Pt,bs as g}from"./ClpAEjbe.js";import{bs as It,ca as P,aD as t,c9 as s,bn as kt,bH as N,bV as M,aA as F}from"./CJxGDkBm.js";import{b as vt}from"./NtFyWdpR.js";import{Jq as l,eJ as Ut,eK as At,t2 as Bt,ol as xt,om as Ft,J_ as Tt,Kd as _t,K3 as Lt,oq as T}from"./CpP1PKzF.js";import{t as Dt}from"./D2MmXC4A.js";import{g as Wt}from"./BrMXrCxP.js";import{dE as Et,bL as Gt,bN as Nt,bK as Mt,bP as Vt,da as qt,m as Ht}from"./D9Ykl3eH.js";import{C as Kt}from"./B2pOchvy.js";import{V as zt}from"./Cp06wewE.js";import{bT as Jt,bN as jt,b8 as Ot}from"./DJPMh7Pg.js";import{i as _,n as V}from"./H2jLkRRS.js";import{af as Qt}from"./CiKM_Bkk.js";function Xt(L,$){if(new.target)return bt({component:Xt,...L});It($,!0);const q=()=>g(at,"$gitRoots$",c),y=()=>g(ot,"$workspace",c),H=()=>g(nt,"$ftCommits$",c),K=()=>g(lt,"$rootGitRoots$",c),S=()=>g(st,"$ftChanges$",c),z=()=>g(tt,"$foldUnchanged",c),J=()=>g(Z,"$lineWrapping",c),j=()=>g(et,"$diffSideBySide",c),O=()=>g(rt,"$ftLoading$",c),Q=()=>g(it,"$ftBoundarySha$",c),[c,X]=Rt(),Y=o=>{zt(o,{embedded:!0,showExpand:!0,get expanded(){return t(w)},onToggleExpand:()=>{N(w,!t(w)),t(w)?t(R)?.expandAll():t(R)?.collapseAll()},get foldEnabled(){return z()},onToggleFold:()=>l.dispatch(Lt()),get wrapEnabled(){return J()},onToggleWrap:()=>l.dispatch(_t()),get splitEnabled(){return j()},onToggleSplit:()=>l.dispatch(Tt())})},Z=Jt(),tt=jt(),et=Ot();let I=x($,"tab",7),m=x($,"workspaceId",7),C=x($,"isActive",7);const D=Wt(),p=Dt(()=>m()),ot=Et(p);P(()=>{const o=m();if(!(!C()||!o||t(n)))return l.dispatch(Ut(o,"all")),()=>l.dispatch(At(o,"all"))});const n=s(()=>I().data?.gitRootId||""),at=Qt(p),b=s(()=>q().find(o=>o.id===t(n))),h=s(()=>y()?.worktreePath||y()?.repositoryPath||""),k=s(()=>t(b)?.path||t(h)),st=Gt(p),nt=Nt(p),it=Mt(p),rt=Vt(p),dt=s(()=>H()||[]),lt=qt(p),f=s(()=>K()[t(n)]??Ht),ct=s(()=>t(f).status),gt=s(()=>t(f).loading),mt=s(()=>t(f).commitFiles),ut=s(()=>{const o=t(b)?.registeredCommitSha,i=o?t(f).commits.findIndex(e=>e.hash===o):-1;return i>=0?t(f).commits.slice(0,i):t(f).commits});P(()=>{const o=m(),i=t(n);o&&i&&l.dispatch(Bt(o,i,t(b)?.registeredCommitSha,100))});let w=M(!0),R=M(null);const pt=s(()=>{if(t(n))return[...(t(ct)?.files??[]).map(e=>({filePath:`${t(k)}/${e.path}`,action:"modify",additions:e.additions??0,deletions:e.deletions??0,toolName:"local",toolCallId:`root-${t(n)}-${e.staged}-${e.path}`,staged:e.staged,category:e.staged?"staged":"unstaged"})),...t(ut).flatMap(e=>(t(mt)[e.hash]??[]).map(a=>({filePath:`${t(k)}/${a.path}`,action:"modify",additions:a.additions??0,deletions:a.deletions??0,toolName:"local",toolCallId:`root-commit-${e.hash}-${a.path}`,staged:!1,category:"committed",commitHash:e.hash,commitMessage:e.message})))];const o=S().filter(e=>e.stage==="unstaged"),i=S().filter(e=>e.stage==="staged");return[...o.map(e=>{const a=e.file||e.relativePath,r=a&&_(a)?a:`${t(h)}/${a}`;return{filePath:r,action:"modify",additions:e.stats?.additions||0,deletions:e.stats?.deletions||0,toolName:"local",toolCallId:`local-unstaged-${r}`,staged:!1,category:"unstaged",oldContent:e.content?.oldContent,newContent:e.content?.newContent,gitlink:e.gitlink}}),...i.map(e=>{const a=e.file||e.relativePath,r=a&&_(a)?a:`${t(h)}/${a}`;return{filePath:r,action:"modify",additions:e.stats?.additions||0,deletions:e.stats?.deletions||0,toolName:"local",toolCallId:`local-staged-${r}`,staged:!0,category:"staged",oldContent:e.content?.oldContent,newContent:e.content?.newContent,gitlink:e.gitlink}}),...t(dt).flatMap(e=>(e.files||[]).map(a=>{const r=typeof a=="string"?a:a.path||"",U=r&&_(r)?r:`${t(h)}/${r}`,A=typeof a=="string"?0:a.additions||0,B=typeof a=="string"?0:a.deletions||0;return{filePath:U,action:"modify",additions:A,deletions:B,toolName:"local",toolCallId:`commit-${e.hash}-${r}`,staged:!1,category:"committed",commitHash:e.hash,commitMessage:e.message}}))]});function v(o){if(!t(h))return o;const i=V(o),e=V(t(h));return i.startsWith(`${e}/`)?i.slice(e.length+1):o}function W(o){l.dispatch(T(m(),crypto.randomUUID(),{kind:"stage",paths:o.map(v),source:"localChanges"}))}function E(o){l.dispatch(T(m(),crypto.randomUUID(),{kind:"unstage",paths:o.map(v),source:"localChanges"}))}function ht(o){l.dispatch(T(m(),crypto.randomUUID(),{kind:"discard",paths:o.map(v),source:"localChanges"}))}P(()=>{!D||!C()||D.registerActions({display:Y})});const G=crypto.randomUUID();P(()=>{const o=m();if(!(!(C()&&t(n))||!o))return l.dispatch(xt(o,G)),()=>l.dispatch(Ft(o,G))});var ft={get tab(){return I()},set tab(o){I(o),F()},get workspaceId(){return m()},set workspaceId(o){m(o),F()},get isActive(){return C()},set isActive(o){C(o),F()},$set:wt,$on:(o,i)=>Pt($,o,i)};{let o=s(()=>t(n)?t(gt):O()),i=s(()=>t(n)||void 0),e=s(()=>t(n)?t(k):void 0),a=s(()=>y()?.baseRef??null),r=s(()=>t(n)?t(b)?.registeredCommitSha||null:Q()||y()?.baseCommitSha||null),U=s(()=>!t(n)),A=s(()=>t(n)?void 0:d=>void W([d])),B=s(()=>t(n)?void 0:d=>void E([d])),Ct=s(()=>t(n)?void 0:d=>void ht([d])),yt=s(()=>t(n)?void 0:()=>{const d=S().filter(u=>u.stage==="unstaged");W(d.map(u=>u.relativePath||u.file))}),St=s(()=>t(n)?void 0:()=>{const d=S().filter(u=>u.stage==="staged");E(d.map(u=>u.relativePath||u.file))});vt(Kt(L,{get isLoading(){return t(o)},get changes(){return t(pt)},get gitRootId(){return t(i)},get gitRootPath(){return t(e)},get branchBaseRef(){return t(a)},get branchBaseCommitSha(){return t(r)},get showStagingControls(){return t(U)},showCategoryFilter:!0,get onStage(){return t(A)},get onUnstage(){return t(B)},get onRevert(){return t(Ct)},get onStageAll(){return t(yt)},get onUnstageAll(){return t(St)}}),d=>N(R,d,!0),()=>t(R))}var $t=kt(ft);return X(),$t}export{Xt as default};
1
+ import{t as bt,bo as x,bw as wt,bq as Rt,b as Pt,bs as g}from"./ClpAEjbe.js";import{bs as It,ca as P,aD as t,c9 as s,bn as kt,bH as N,bV as M,aA as F}from"./CJxGDkBm.js";import{b as vt}from"./NtFyWdpR.js";import{Jq as l,eJ as Ut,eK as At,t2 as Bt,ol as xt,om as Ft,J_ as Tt,Kd as _t,K3 as Lt,oq as T}from"./CpP1PKzF.js";import{t as Dt}from"./D2MmXC4A.js";import{g as Wt}from"./BrMXrCxP.js";import{dE as Et,bL as Gt,bN as Nt,bK as Mt,bP as Vt,da as qt,m as Ht}from"./D9Ykl3eH.js";import{C as Kt}from"./B6l-Kttu.js";import{V as zt}from"./Cp06wewE.js";import{bT as Jt,bN as jt,b8 as Ot}from"./Bxb8LI6C.js";import{i as _,n as V}from"./H2jLkRRS.js";import{af as Qt}from"./BEWjMMmw.js";function Xt(L,$){if(new.target)return bt({component:Xt,...L});It($,!0);const q=()=>g(at,"$gitRoots$",c),y=()=>g(ot,"$workspace",c),H=()=>g(nt,"$ftCommits$",c),K=()=>g(lt,"$rootGitRoots$",c),S=()=>g(st,"$ftChanges$",c),z=()=>g(tt,"$foldUnchanged",c),J=()=>g(Z,"$lineWrapping",c),j=()=>g(et,"$diffSideBySide",c),O=()=>g(rt,"$ftLoading$",c),Q=()=>g(it,"$ftBoundarySha$",c),[c,X]=Rt(),Y=o=>{zt(o,{embedded:!0,showExpand:!0,get expanded(){return t(w)},onToggleExpand:()=>{N(w,!t(w)),t(w)?t(R)?.expandAll():t(R)?.collapseAll()},get foldEnabled(){return z()},onToggleFold:()=>l.dispatch(Lt()),get wrapEnabled(){return J()},onToggleWrap:()=>l.dispatch(_t()),get splitEnabled(){return j()},onToggleSplit:()=>l.dispatch(Tt())})},Z=Jt(),tt=jt(),et=Ot();let I=x($,"tab",7),m=x($,"workspaceId",7),C=x($,"isActive",7);const D=Wt(),p=Dt(()=>m()),ot=Et(p);P(()=>{const o=m();if(!(!C()||!o||t(n)))return l.dispatch(Ut(o,"all")),()=>l.dispatch(At(o,"all"))});const n=s(()=>I().data?.gitRootId||""),at=Qt(p),b=s(()=>q().find(o=>o.id===t(n))),h=s(()=>y()?.worktreePath||y()?.repositoryPath||""),k=s(()=>t(b)?.path||t(h)),st=Gt(p),nt=Nt(p),it=Mt(p),rt=Vt(p),dt=s(()=>H()||[]),lt=qt(p),f=s(()=>K()[t(n)]??Ht),ct=s(()=>t(f).status),gt=s(()=>t(f).loading),mt=s(()=>t(f).commitFiles),ut=s(()=>{const o=t(b)?.registeredCommitSha,i=o?t(f).commits.findIndex(e=>e.hash===o):-1;return i>=0?t(f).commits.slice(0,i):t(f).commits});P(()=>{const o=m(),i=t(n);o&&i&&l.dispatch(Bt(o,i,t(b)?.registeredCommitSha,100))});let w=M(!0),R=M(null);const pt=s(()=>{if(t(n))return[...(t(ct)?.files??[]).map(e=>({filePath:`${t(k)}/${e.path}`,action:"modify",additions:e.additions??0,deletions:e.deletions??0,toolName:"local",toolCallId:`root-${t(n)}-${e.staged}-${e.path}`,staged:e.staged,category:e.staged?"staged":"unstaged"})),...t(ut).flatMap(e=>(t(mt)[e.hash]??[]).map(a=>({filePath:`${t(k)}/${a.path}`,action:"modify",additions:a.additions??0,deletions:a.deletions??0,toolName:"local",toolCallId:`root-commit-${e.hash}-${a.path}`,staged:!1,category:"committed",commitHash:e.hash,commitMessage:e.message})))];const o=S().filter(e=>e.stage==="unstaged"),i=S().filter(e=>e.stage==="staged");return[...o.map(e=>{const a=e.file||e.relativePath,r=a&&_(a)?a:`${t(h)}/${a}`;return{filePath:r,action:"modify",additions:e.stats?.additions||0,deletions:e.stats?.deletions||0,toolName:"local",toolCallId:`local-unstaged-${r}`,staged:!1,category:"unstaged",oldContent:e.content?.oldContent,newContent:e.content?.newContent,gitlink:e.gitlink}}),...i.map(e=>{const a=e.file||e.relativePath,r=a&&_(a)?a:`${t(h)}/${a}`;return{filePath:r,action:"modify",additions:e.stats?.additions||0,deletions:e.stats?.deletions||0,toolName:"local",toolCallId:`local-staged-${r}`,staged:!0,category:"staged",oldContent:e.content?.oldContent,newContent:e.content?.newContent,gitlink:e.gitlink}}),...t(dt).flatMap(e=>(e.files||[]).map(a=>{const r=typeof a=="string"?a:a.path||"",U=r&&_(r)?r:`${t(h)}/${r}`,A=typeof a=="string"?0:a.additions||0,B=typeof a=="string"?0:a.deletions||0;return{filePath:U,action:"modify",additions:A,deletions:B,toolName:"local",toolCallId:`commit-${e.hash}-${r}`,staged:!1,category:"committed",commitHash:e.hash,commitMessage:e.message}}))]});function v(o){if(!t(h))return o;const i=V(o),e=V(t(h));return i.startsWith(`${e}/`)?i.slice(e.length+1):o}function W(o){l.dispatch(T(m(),crypto.randomUUID(),{kind:"stage",paths:o.map(v),source:"localChanges"}))}function E(o){l.dispatch(T(m(),crypto.randomUUID(),{kind:"unstage",paths:o.map(v),source:"localChanges"}))}function ht(o){l.dispatch(T(m(),crypto.randomUUID(),{kind:"discard",paths:o.map(v),source:"localChanges"}))}P(()=>{!D||!C()||D.registerActions({display:Y})});const G=crypto.randomUUID();P(()=>{const o=m();if(!(!(C()&&t(n))||!o))return l.dispatch(xt(o,G)),()=>l.dispatch(Ft(o,G))});var ft={get tab(){return I()},set tab(o){I(o),F()},get workspaceId(){return m()},set workspaceId(o){m(o),F()},get isActive(){return C()},set isActive(o){C(o),F()},$set:wt,$on:(o,i)=>Pt($,o,i)};{let o=s(()=>t(n)?t(gt):O()),i=s(()=>t(n)||void 0),e=s(()=>t(n)?t(k):void 0),a=s(()=>y()?.baseRef??null),r=s(()=>t(n)?t(b)?.registeredCommitSha||null:Q()||y()?.baseCommitSha||null),U=s(()=>!t(n)),A=s(()=>t(n)?void 0:d=>void W([d])),B=s(()=>t(n)?void 0:d=>void E([d])),Ct=s(()=>t(n)?void 0:d=>void ht([d])),yt=s(()=>t(n)?void 0:()=>{const d=S().filter(u=>u.stage==="unstaged");W(d.map(u=>u.relativePath||u.file))}),St=s(()=>t(n)?void 0:()=>{const d=S().filter(u=>u.stage==="staged");E(d.map(u=>u.relativePath||u.file))});vt(Kt(L,{get isLoading(){return t(o)},get changes(){return t(pt)},get gitRootId(){return t(i)},get gitRootPath(){return t(e)},get branchBaseRef(){return t(a)},get branchBaseCommitSha(){return t(r)},get showStagingControls(){return t(U)},showCategoryFilter:!0,get onStage(){return t(A)},get onUnstage(){return t(B)},get onRevert(){return t(Ct)},get onStageAll(){return t(yt)},get onUnstageAll(){return t(St)}}),d=>N(R,d,!0),()=>t(R))}var $t=kt(ft);return X(),$t}export{Xt as default};
@@ -1,4 +1,4 @@
1
- import{g as Jt}from"./Cc-PW4gv.js";import{g as Zt}from"./DyVTwc41.js";import{s as $t}from"./B-vPMZJe.js";import{b as C,a$ as e1,ay as Z,X as Ae,a1 as t1,aP as s1,bh as at,a_ as i1,aZ as r1,b0 as a1,V as n1,U as u1,Y as o1,z as l1,ax as c1,J as h1,aq as st,as as d1,$ as it,aW as rt,r as p1,a2 as f1,N as g1,am as b1,aU as k1,ab as A1,x as m1,aT as C1,p as S1}from"./DVuRO9FX.js";import{c as D1}from"./BOj9vGyw.js";import{aR as T1}from"./DJPMh7Pg.js";var E1="flowchart-",y1=["laneRole","laneIndex","drawnExtent"];function Wt(s){if(!s||typeof s!="object")return s;const i={...s};for(const a of y1)Reflect.deleteProperty(i,a);return i}C(Wt,"withoutInternalKeys");var Pe,x1=(Pe=class{constructor(){this.vertexCounter=0,this.config=Ae(),this.diagramId="",this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.droppedSubGraphMembers=[],this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=i1,this.setAccDescription=r1,this.setDiagramTitle=a1,this.getAccTitle=n1,this.getAccDescription=u1,this.getDiagramTitle=o1,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}sanitizeText(i){return l1.sanitizeText(i,this.config)}sanitizeNodeLabelType(i){switch(i){case"markdown":case"string":case"text":return i;default:return"markdown"}}setDiagramId(i){this.diagramId=i}lookUpDomId(i){for(const a of this.vertices.values())if(a.id===i)return this.diagramId?`${this.diagramId}-${a.domId}`:a.domId;return this.diagramId?`${this.diagramId}-${i}`:i}addVertex(i,a,n,r,l,g,o={},m){if(!i||i.trim().length===0)return;let d;if(m!==void 0){let f;m.includes(`
1
+ import{g as Jt}from"./CZDluI6H.js";import{g as Zt}from"./xs1C7KnJ.js";import{s as $t}from"./DSIsc1Ss.js";import{b as C,a$ as e1,ay as Z,X as Ae,a1 as t1,aP as s1,bh as at,a_ as i1,aZ as r1,b0 as a1,V as n1,U as u1,Y as o1,z as l1,ax as c1,J as h1,aq as st,as as d1,$ as it,aW as rt,r as p1,a2 as f1,N as g1,am as b1,aU as k1,ab as A1,x as m1,aT as C1,p as S1}from"./D-usBtmP.js";import{c as D1}from"./eGqXrC9g.js";import{aR as T1}from"./Bxb8LI6C.js";var E1="flowchart-",y1=["laneRole","laneIndex","drawnExtent"];function Wt(s){if(!s||typeof s!="object")return s;const i={...s};for(const a of y1)Reflect.deleteProperty(i,a);return i}C(Wt,"withoutInternalKeys");var Pe,x1=(Pe=class{constructor(){this.vertexCounter=0,this.config=Ae(),this.diagramId="",this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.droppedSubGraphMembers=[],this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=i1,this.setAccDescription=r1,this.setDiagramTitle=a1,this.getAccTitle=n1,this.getAccDescription=u1,this.getDiagramTitle=o1,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}sanitizeText(i){return l1.sanitizeText(i,this.config)}sanitizeNodeLabelType(i){switch(i){case"markdown":case"string":case"text":return i;default:return"markdown"}}setDiagramId(i){this.diagramId=i}lookUpDomId(i){for(const a of this.vertices.values())if(a.id===i)return this.diagramId?`${this.diagramId}-${a.domId}`:a.domId;return this.diagramId?`${this.diagramId}-${i}`:i}addVertex(i,a,n,r,l,g,o={},m){if(!i||i.trim().length===0)return;let d;if(m!==void 0){let f;m.includes(`
2
2
  `)?f=m+`
3
3
  `:f=`{
4
4
  `+m+`
@@ -1 +1 @@
1
- var ne=Object.defineProperty;var oe=(e,t,r)=>t in e?ne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var d=(e,t,r)=>oe(e,typeof t!="symbol"?t+"":t,r);import{m as ce,N as le,T as de,d as ue,o as pe,w as ge}from"./C1zxTHwk.js";import"./CJxGDkBm.js";import{bm as n,_ as he}from"./ClpAEjbe.js";import"./CnGVh7I3.js";import"./WSVFXKpL.js";import"./CPDV_dyu.js";import{c as B}from"./ChTqQfQN.js";import"./BeYVt6Wg.js";import{Jq as a,uy as fe,nW as y,nV as k,mn as Se,yU as C,yV as N,yS as be,yR as me,yT as ve,rR as _e,c8 as Ae,c7 as ye,cm as ke,cl as we,nY as w}from"./CpP1PKzF.js";import{cR as Ee,cG as Ce,bG as Re,ci as Pe,cy as Me,ck as Te,cP as Q,aI as Ie,c0 as Fe,cX as De}from"./D9Ykl3eH.js";import{a as Le,i as Oe}from"./CL3a4Hm1.js";import{i as D}from"./BBWuirRW.js";import{n as xe}from"./D9uHbDgA.js";import{x as We,aO as Ne,c as Ge,aD as Ve,B as Be,y as Ue,z as He}from"./b89lNINv.js";import{_ as qe,J as Y,$ as $e,aw as U,X as ze,a1 as je,K as Ke,Z as Ze,ay as Qe,w as Ye}from"./B6-GEB4b.js";const Je=5,L=120,Xe=4e3,j=.2,et=.8;function tt(e,t,r=Je){const s=e.length>0?t/(2*e.length):0,i=Xe/L;return Array.from({length:r},(o,l)=>{if(s<=0)return 0;const c=L*i**(l/r),g=L*i**((l+1)/r),f=Math.min(e.length-1,Math.floor(c/s)),b=Math.min(e.length,Math.max(f+1,Math.ceil(g/s)));let $=0;for(let F=f;F<b;F+=1)$+=e[F]??0;const z=($/(b-f)/255-j)/(et-j);return Number.isFinite(z)?Math.min(1,Math.max(0,z)):0})}const rt=Object.freeze(Object.defineProperty({__proto__:null,NOTIFY_DURATION:le,TOAST_COUNTDOWN_CLASS:de,TOAST_COUNTDOWN_NO_HOVER_PAUSE_CLASS:ue,notify:ce,notifyMetadata:pe,withToastCountdown:ge},Symbol.toStringTag,{value:"Module"})),Dr=a.createSelector(e=>Ee.select(e)?.capabilities.gitlabCheckout===!0),Lr=a.createSelector(e=>e.gitlabAuth.host),Or=a.createSelector(e=>e.gitlabAuth.instanceBaseUrl??e.gitlabAuth.host),xr=a.createSelector(e=>fe(e.gitlabAuth.instanceBaseUrl??e.gitlabAuth.host)??""),Wr=a.createSelector(e=>e.gitlabAuth.isCancelling),Nr=a.createSelector(e=>e.gitlabAuth.cancelOutcome),Gr=a.createSelector(e=>e.gitlabAuth.isConfigured),Vr=a.createSelector(e=>e.gitlabAuth.isAuthenticating),Br=a.createSelector(e=>e.gitlabAuth.deviceFlow),Ur=a.createSelector(e=>e.gitlabAuth.deviceGrantSupported),Hr=a.createSelector(e=>e.gitlabAuth.user),qr=a.createSelector(e=>e.gitlabAuth.error);a.createSelector(e=>e.gitlabAuth.method);const $r=a.createSelector(e=>e.gitlabAuth.statusReady===!0),A=[{id:"pr-reviewer",icon:"pr-reviewer",get name(){return n.specialists_builtin_prReviewer_name()},get description(){return n.specialists_builtin_prReviewer_description()},defaultBehaviorPrompt:"",promptUnavailable:!0},{id:"ui-designer",icon:"ui-designer",get name(){return n.specialists_builtin_uiDesigner_name()},get description(){return n.specialists_builtin_uiDesigner_description()},defaultBehaviorPrompt:"",promptUnavailable:!0},{id:"vulnerability-scanner",icon:"pr-reviewer",get name(){return n.specialists_builtin_vulnerabilityScanner_name()},get description(){return n.specialists_builtin_vulnerabilityScanner_description()},defaultBehaviorPrompt:"",promptUnavailable:!0},{id:"developer",icon:"verifier",get name(){return n.specialists_builtin_developer_name()},get description(){return n.specialists_builtin_developer_description()},defaultBehaviorPrompt:"",promptUnavailable:!0},{id:"product-manager",icon:"coordinator",get name(){return n.specialists_builtin_productManager_name()},get description(){return n.specialists_builtin_productManager_description()},defaultBehaviorPrompt:"",promptUnavailable:!0},{id:"maintenance-coordinator",icon:"ralph",get name(){return n.specialists_builtin_maintenanceCoordinator_name()},get description(){return n.specialists_builtin_maintenanceCoordinator_description()},defaultBehaviorPrompt:"",promptUnavailable:!0},{id:"chief-of-staff",icon:"chief-of-staff",get name(){return n.specialists_builtin_chiefOfStaff_name()},get description(){return n.specialists_builtin_chiefOfStaff_description()},hidden:!0,defaultBehaviorPrompt:"",promptUnavailable:!0}],J=new Set(["pr-reviewer"]),zr="developer";function jr(e){return A.find(t=>t.id===e)}const st=a.createSelector(e=>e.githubAuth.mutationRequestId),it=a.createSelector(e=>e.githubAuth.callbacksCancelled),at=a.createSelector(e=>e.githubAuth.isDisconnecting),X=a.createSelector(e=>e.githubAuth.isAuthenticated),nt=a.createSelector(e=>e.githubAuth.statusSettled===!0),ot=a.createSelector(e=>e.githubAuth.requiresDaemonAuth),ct=a.createSelector(e=>e.githubAuth.user),lt=a.createSelector(e=>e.githubAuth.isAuthenticating),dt=a.createSelector(e=>e.githubAuth.deviceFlow),ut=a.createSelector(e=>e.githubAuth.error),Kr=Object.freeze(Object.defineProperty({__proto__:null,selectGitHubAuthCallbacksCancelled:it,selectGitHubAuthDeviceFlow:dt,selectGitHubAuthError:ut,selectGitHubAuthIsAuthenticated:X,selectGitHubAuthIsAuthenticating:lt,selectGitHubAuthIsDisconnecting:at,selectGitHubAuthMutationRequestId:st,selectGitHubAuthRequiresDaemonAuth:ot,selectGitHubAuthStatusSettled:nt,selectGitHubAuthUser:ct},Symbol.toStringTag,{value:"Module"}));function u(e){return e??""}function pt(e,t){const r=e??[],s=t??[];return r.length===s.length&&r.every((i,o)=>u(i.provider)===u(s[o].provider)&&i.model===s[o].model&&i.hint===s[o].hint&&u(i.reasoningEffort)===u(s[o].reasoningEffort))}function K(e,t){if(e.source!=="user"||!t?.ignoreModelPin&&(e.model||e.codingAgent))return!1;const r=e.bundled;return r?u(e.name)===u(r.name)&&u(e.description)===u(r.description)&&u(e.behaviorPrompt)===u(r.behaviorPrompt)&&u(e.roleReminder)===u(r.roleReminder)&&u(e.reasoningEffort)===u(r.reasoningEffort)&&pt(e.modelOptions,r.modelOptions):!1}const Zr=a.createSelector(e=>e.specialists.bundledSpecialists),gt=a.createSelector(e=>e.specialists.fileSpecialists),Qr=a.createSelector(e=>y(gt.select(e))),Yr=a.createSelector(e=>e.specialists.userOverrides);a.createSelector(e=>e.specialists.overridesLoaded);const Jr=a.createSelector(e=>e.specialists.customSpecialistsLoaded),Xr=a.createSelector(e=>e.specialists.fileSpecialistsLoaded),es=a.createSelector(e=>e.specialists.bundledSpecialistsLoaded),ts=a.createSelector(e=>e.specialists.specialistsFolderPath),rs=a.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:""});a.createSelector(e=>e.specialists.providerModelOverrides);const O=a.createSelector((e,t)=>!(J.has(t)&&!X.select(e)));function ht(e,t){return t?e:e.filter(r=>!J.has(r.id))}function ft(e,t){return ht(e,t).filter(r=>!r.hidden)}function ss(e,t){return ft(e,t).filter(r=>r.role!=="internal")}const v=a.createSelector((e,t)=>{if(t)return(e.providerCatalog?.byWorkspaceId?.[t]?.specialists??[]).map(c=>({...c,defaultModel:c.model,defaultBehaviorPrompt:c.behaviorPrompt??c.prompt??"",defaultAgentType:c.agentType}));const r=y(e.specialists.fileSpecialists),s=e.specialists.bundledSpecialists,i=new Set,o=[];for(const c of r)!i.has(c.id)&&O.select(e,c.id)&&(i.add(c.id),o.push({id:c.id,name:c.name,description:c.description,codingAgent:c.codingAgent,defaultModel:c.model||void 0,defaultBehaviorPrompt:c.behaviorPrompt,roleReminder:c.roleReminder,source:c.source,importedFrom:c.importedFrom,unsupportedFields:c.unsupportedFields,requiredSkills:c.requiredSkills,missingSkills:c.missingSkills,hidden:c.hidden,resolvedModel:c.resolvedModel,resolvedProvider:c.resolvedProvider,modelOptions:c.modelOptions,reasoningEffort:c.reasoningEffort,role:c.role,teamAgents:c.teamAgents,icon:c.icon}));for(const c of s)!i.has(c.id)&&O.select(e,c.id)&&(i.add(c.id),o.push(c));if(!e.specialists.bundledSpecialistsLoaded&&r.length===0&&s.length===0)for(const c of A)!i.has(c.id)&&O.select(e,c.id)&&(i.add(c.id),o.push(c));const l=new Map;for(const c of A)l.has(c.id)||l.set(c.id,l.size);for(const c of s)l.has(c.id)||l.set(c.id,l.size);return o.sort((c,g)=>{const f=l.has(c.id),b=l.has(g.id);return f&&b?(l.get(c.id)??0)-(l.get(g.id)??0):f&&!b?-1:!f&&b?1:c.name.localeCompare(g.name)}),o}),is=a.createSelector(e=>{const t=v.select(e).filter(s=>s.role==="orchestrator");if(t.length===0)return null;const r=new Set([...A.map(({id:s})=>s),...e.specialists.bundledSpecialists.map(({id:s})=>s)]);return t.sort((s,i)=>+!r.has(s.id)-+!r.has(i.id)||s.id.localeCompare(i.id)),t[0]}),St=a.createSelector((e,t)=>{const r=k(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(i=>i.id===t);if(s)return{id:s.id,name:s.name,description:s.description,source:"builtin"};if(!e.specialists.bundledSpecialistsLoaded&&y(e.specialists.fileSpecialists).length===0&&e.specialists.bundledSpecialists.length===0){const i=A.find(o=>o.id===t);if(i)return{id:i.id,name:i.name,description:i.description,source:"builtin"}}return null}),as=a.createSelector((e,t)=>St.select(e,t)?.name??null),ns=a.createSelector((e,t,r)=>{const i=v.select(e,r).find(o=>o.id===t);return i?i.defaultModel?i.defaultModel:i.resolvedModel??"":""}),os=a.createSelector((e,t,r)=>v.select(e,r).find(o=>o.id===t)?.defaultModel||void 0),cs=a.createSelector((e,t,r)=>v.select(e,r).find(o=>o.id===t)?.reasoningEffort||void 0),ls=a.createSelector((e,t,r)=>{const i=v.select(e,r).find(o=>o.id===t);return i?i.defaultBehaviorPrompt:""});function R(e,t){return t.some(r=>r.id===e)||A.some(r=>r.id===e)}const ds=a.createSelector((e,t,r)=>{if(r){const s=e.providerCatalog?.byWorkspaceId?.[r]?.specialists.find(i=>i.id===t);return!s||s.importedFrom?!1:s.source==="bundled"||s.source==="user"&&R(t,e.specialists.bundledSpecialists)}return R(t,e.specialists.bundledSpecialists)}),us=a.createSelector((e,t,r)=>r?!!H.select(e,t,r):!!k(e.specialists.fileSpecialists,t)),ps=a.createSelector((e,t,r)=>{if(r){const o=H.select(e,t,r);return!o||o.importedFrom||o.source==="project"?!1:R(t,e.specialists.bundledSpecialists)&&!K(o)}if(!R(t,e.specialists.bundledSpecialists))return!1;const i=k(e.specialists.fileSpecialists,t);return!i||i.source!=="user"?!1:!K(i)}),H=a.createSelector((e,t,r)=>{if(r){const s=e.providerCatalog?.byWorkspaceId?.[r]?.specialists.find(i=>i.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 k(e.specialists.fileSpecialists,t)}),gs=a.createSelector((e,t,r)=>{const s=H.select(e,t,r);return r&&!s?e.providerCatalog?.byWorkspaceId?.[r]?.specialists.some(i=>i.id===t)?"Built-in":null:s?.source==="project"?"Project":s?.source==="user"?"User":e.specialists.bundledSpecialists.some(i=>i.id===t)?"Built-in":null}),hs=a.createSelector((e,t,r)=>{if(r)return e.providerCatalog?.byWorkspaceId?.[r]?.specialists.find(o=>o.id===t)?.path;const s=k(e.specialists.fileSpecialists,t);if(s)return s.filePath;const i=e.specialists.bundledSpecialists.find(o=>o.id===t);if(i&&"filePath"in i)return i.filePath}),fs=a.createSelector((e,t,r)=>{if(r){const i=v.select(e,r).find(c=>c.id===t),o=i?.codingAgent||i?.resolvedProvider;if(o)return Ce.select(e,o,r);const l=Re.select(e,r);return e.providerCatalog?.byWorkspaceId?.[r]?.readiness[l]?.available?l:""}const s=k(e.specialists.fileSpecialists,t);return s?.codingAgent?s.codingAgent:bt.select(e,t)}),bt=a.createSelector((e,t)=>{const s=v.select(e).find(i=>i.id===t);return s?.codingAgent?s.codingAgent:qe.select(e)?Y.select(e):""}),Ss=a.createSelector((e,t)=>{if(t)return e.providerCatalog?.byWorkspaceId?.[t]?.importDiagnostics??[];const r=e.specialists.importDiagnostics;return r?y(r):[]}),bs=a.createSelector((e,t)=>e.specialists.creationByContext?.[t]??Se),ms=a.createSelector(e=>Object.values(e.specialists.creationByContext??{}).flatMap(t=>t.specialistId?[t.specialistId]:[])),x=B("Clipboard");async function vs(e){let t;if(Le())try{const r=await Oe("system:write-clipboard",{text:e});if(r?.success===!1)throw new Error(r.error||"Electron clipboard write failed");return}catch(r){t=r,x.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 x.error("Browser clipboard write failed",r,{electronError:t}),r}throw x.error("No clipboard write API is available",void 0,{electronError:t}),t instanceof Error?t:new Error("Clipboard write API unavailable")}const _s=a.createSelector(e=>e.directoryPicker.source??"daemon"),As=a.createSelector(e=>e.directoryPicker.listing),ys=a.createSelector(e=>e.directoryPicker.loading),ks=a.createSelector(e=>e.directoryPicker.error),ws=a.createSelector(e=>e.directoryPicker.pathError),Es=a.createSelector(e=>e.directoryPicker.createError),mt=B("WorkspaceValidation");async function Cs(e,t=!1,r=!1){if(!e||e.trim().length===0)return{valid:!1,error:n.workspace_validation_repoPathRequired_error(),suggestion:n.workspace_validation_repoPathRequired_suggestion()};const s=e.trim();return vt(s)?At(s):yt(s,t,r)}function vt(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 _t(e){const t=e.trim(),r=[/^https?:\/\/github\.com\/([^\/]+)\/([^\/]+)$/i,/^git@github\.com:([^\/]+)\/([^\/]+)$/i,/^github\.com\/([^\/]+)\/([^\/]+)$/i];for(const i of r){const o=t.match(i);if(o){const l=o[2].replace(/\.git$/,"");return l?{owner:o[1],repo:l}:null}}const s=t.match(/^([a-zA-Z0-9\-_]+)\/([a-zA-Z0-9\-_\.]+)$/);if(s&&!t.includes("\\")&&!t.includes(":")){const i=s[2].replace(/\.git$/,"");return i?{owner:s[1],repo:i}:null}return null}async function At(e){return _t(e)?{valid:!0,warning:n.workspace_validation_githubCloneLocally_warning()}:{valid:!1,error:n.workspace_validation_invalidGithubUrl_error(),suggestion:n.workspace_validation_invalidGithubUrl_suggestion()}}async function yt(e,t=!1,r=!1){if(e.includes("\0"))return{valid:!1,error:n.workspace_validation_nullCharacters_error()};if(!e.startsWith("/")&&!e.startsWith("~")&&!e.startsWith(".")&&!e.includes(":\\")&&!/^[a-zA-Z]:\//.test(e))return{valid:!1,error:n.workspace_validation_pathNotAbsolute_error(),suggestion:n.workspace_validation_pathNotAbsolute_suggestion()};if(typeof window<"u"&&window.electronAPI)try{const s=await D("file:getDirectoryStatus",{path:e});if(s.success&&s.data){const l=s.data;return l.exists?l.isDirectory?l.isGitRepo?{valid:!0,isNewRepo:!1,directoryStatus:l}:l.isSubdirectoryOfGitRepo?{valid:!0,isNewRepo:!1,directoryStatus:l,warning:n.workspace_validation_insideParentRepo_warning({path:l.parentGitRoot??""})}:r?{valid:!0,isNewRepo:!1,directoryStatus:l}:t?l.isEmpty?{valid:!0,isNewRepo:!0,directoryStatus:l,warning:n.workspace_validation_emptyDirInit_warning()}:{valid:!0,isNewRepo:!0,directoryStatus:l,warning:n.workspace_validation_nonGitDirInit_warning()}:{valid:!1,error:n.workspace_repoSelector_notGitRepository_label(),directoryStatus:l}:{valid:!1,error:n.workspace_validation_notDirectory_error(),suggestion:n.workspace_validation_notDirectory_suggestion(),directoryStatus:l}:t?{valid:!0,isNewRepo:!0,directoryStatus:l,warning:n.workspace_validation_willCreateRepo_warning()}:{valid:!1,error:n.workspace_validation_dirNotExist_error(),suggestion:n.workspace_validation_dirNotExist_suggestion(),directoryStatus:l}}if(!(await D("file:exists",{path:e})).exists)return t?{valid:!0,isNewRepo:!0,warning:n.workspace_validation_willCreateRepo_warning()}:{valid:!1,error:n.workspace_validation_dirNotExist_error(),suggestion:n.workspace_validation_dirNotExistLegacy_suggestion()};const o=await D("git:isRepository",{path:e});if(!t&&o?.isRepository!==!0)return{valid:!1,error:o?.isRepository===!1?n.workspace_repoSelector_notGitRepository_label():n.workspace_compactInitializer_gitCheckUnknown_label()};if(!o.isRepository)return{valid:!0,isNewRepo:!0,warning:n.workspace_validation_nonGitInit_warning()}}catch(s){if(mt.warn("Could not validate path existence",s),!t)return{valid:!1,error:n.workspace_compactInitializer_gitCheckUnknown_label()}}return{valid:!0,isNewRepo:!1}}function Rs(e){if(!e||e.trim().length===0)return{valid:!0};const t=e.trim();return/[\s~^:?*\[\]\\]/.test(t)?{valid:!1,error:n.workspace_validation_branchPrefixInvalidChars_error(),suggestion:n.workspace_validation_branchChars_suggestion()}:t==="."||t===".."||t.startsWith(".")?{valid:!1,error:n.workspace_validation_branchPrefixDot_error()}:t.includes("..")||t.includes("//")?{valid:!1,error:n.workspace_validation_branchPrefixConsecutive_error()}:t.startsWith("/")?{valid:!1,error:n.workspace_validation_branchPrefixSlash_error()}:t.endsWith(".lock")?{valid:!1,error:n.workspace_validation_branchPrefixLock_error()}:t.length>50?{valid:!1,error:n.workspace_validation_branchPrefixTooLong_error()}:{valid:!0}}function Ps(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 Ms(e){if(!e||e.trim().length===0)return{valid:!1,error:n.workspace_validation_branchNameRequired_error()};const t=e.trim();return/[\s~^:?*\[\]\\]/.test(t)?{valid:!1,error:n.workspace_validation_branchNameInvalidChars_error(),suggestion:n.workspace_validation_branchChars_suggestion()}:["HEAD",".",".."].includes(t)?{valid:!1,error:n.workspace_validation_branchNameReserved_error()}:t.includes("..")||t.includes("//")?{valid:!1,error:n.workspace_validation_branchNameConsecutive_error()}:t.startsWith("/")||t.endsWith("/")?{valid:!1,error:n.workspace_validation_branchNameSlash_error()}:t.endsWith(".lock")?{valid:!1,error:n.workspace_validation_branchNameLock_error()}:{valid:!0}}function Ts(e){return!e||e.trim().length===0?{valid:!0}:e.trim().length>1e5?{valid:!1,error:n.workspace_validation_promptTooLong_error(),suggestion:n.workspace_validation_promptTooLong_suggestion()}:{valid:!0}}function Is(e){const t=e.toLowerCase();return t.includes("maxbuffer")?n.workspace_gitError_maxBuffer():t.includes("clone")&&t.includes("timed out")?n.workspace_gitError_cloneTimeout():t.includes("json-rpc request timed out: workspace.create")?n.workspace_gitError_createTimeout():t.includes("timed out")&&["git","clone","fetch","worktree","pull","push","rebase","merge"].some(r=>t.includes(r))?n.workspace_gitError_gitTimeout():t.includes("git clone failed")?t.includes("could not read from remote")?n.workspace_gitError_cloneRemote():t.includes("authentication")||t.includes("permission denied")||t.includes("access denied")?n.workspace_gitError_cloneAuth():n.workspace_gitError_cloneFailed():t.includes("could not resolve any ref to create worktree")?n.workspace_gitError_worktreeRef():t.includes("failed to write file")?t.includes("eacces")||t.includes("permission denied")?n.workspace_gitError_writePermission():t.includes("enospc")||t.includes("disk space")?n.workspace_gitError_diskSpaceFree():t.includes("enoent")||t.includes("no such file")?n.workspace_gitError_writeNoEnt():e:t.includes("failed to read file")?t.includes("enoent")||t.includes("no such file")?n.workspace_gitError_readNotFound():t.includes("eacces")||t.includes("permission denied")?n.workspace_gitError_readPermission():e:t.includes("permission denied")?n.workspace_gitError_permissionDenied():t.includes("not found")||t.includes("enoent")?n.workspace_gitError_notFound():t.includes("already exists")?n.workspace_gitError_alreadyExists():t.includes("network")||t.includes("etimedout")?n.workspace_gitError_network():t.includes("authentication")||t.includes("401")?t.includes("private repositor")?e:n.workspace_gitError_authFailed():t.includes("rate limit")||t.includes("403")?n.workspace_gitError_rateLimit():t.includes("disk space")||t.includes("enospc")?n.workspace_gitError_diskSpace():e}const kt=["idle","exited"];function wt(e){return e===void 0||!kt.includes(e)}function Fs(e){return e.status==="restarting"?"restarting":wt(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 Et(e){return e.engine==="os"?"os":e.isLoading||e.keyConfigured[e.provider]===!0?"daemon":e.osEngineAvailable?"os":"unavailable"}const Ds=a.createSelector(e=>e.voiceSettings.isLoading),Ls=a.createSelector(e=>e.voiceSettings.available),Os=a.createSelector(e=>e.voiceSettings.provider),xs=a.createSelector(e=>e.voiceSettings.engine),Ws=a.createSelector(e=>e.voiceSettings.osEngineAvailable),Ns=a.createSelector(e=>e.voiceSettings.keyConfigured),Gs=a.createSelector(e=>e.voiceSettings.vocabulary),Vs=a.createSelector(e=>e.voiceSettings.openaiModel),Bs=a.createSelector(e=>e.voiceSettings.language),Us=a.createSelector(e=>e.voiceSettings.workspaceVocabularyMaxTerms),Hs=a.createSelector(e=>e.voiceSettings.inputDeviceId),qs=a.createSelector(e=>e.voiceSettings.inputDevices),$s=a.createSelector(e=>e.voiceSettings.busyProvider),zs=a.createSelector(e=>e.voiceSettings.error),js=a.createSelector(e=>Pe.select(e)?"unavailable":Et(e.voiceSettings)),G="intent.voice.inputDevice";let V;function Ct(){if(V!==void 0)return V;try{const e=localStorage.getItem(G);return typeof e=="string"&&e!==""?e:null}catch{return null}}function Ks(e){V=e;try{e===null?localStorage.removeItem(G):localStorage.setItem(G,e)}catch{}}let P=null;function Zs(e){P=e}function Qs(){const e=P;return P=null,e}function Rt(){P=null}const Pt=300,Mt=300;class Tt{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??Pt,this.doublePressWindowMs=t.doublePressWindowMs??Mt,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 M=null;function Ys(e){M=e}function Js(){const e=M;return M=null,e}function It(){M=null}const Ft=66;function Dt(e,t){const r=globalThis.AudioContext;if(typeof r!="function")return()=>{};let s,i,o;try{s=new r,i=s.createMediaStreamSource(e),o=s.createAnalyser(),o.fftSize=1024,o.smoothingTimeConstant=.5,o.minDecibels=-85,o.maxDecibels=-25,i.connect(o)}catch{return i?.disconnect(),s?.close().catch(()=>{}),()=>{}}if(!s||!i)return()=>{};const l=s,c=i,g=new Uint8Array(o.frequencyBinCount),f=setInterval(()=>{o.getByteFrequencyData(g),t(tt(g,l.sampleRate))},Ft);let b=!1;return()=>{b||(b=!0,clearInterval(f),c.disconnect(),l.close().catch(()=>{}))}}const Lt=12e4,Ot=["audio/webm;codecs=opus","audio/webm"];function Xs(){return typeof navigator<"u"&&typeof navigator.mediaDevices?.getUserMedia=="function"&&typeof MediaRecorder<"u"}function xt(e){return e?{audio:{deviceId:{ideal:e}}}:{audio:!0}}function Wt(){if(!(typeof MediaRecorder>"u"||typeof MediaRecorder.isTypeSupported!="function"))return Ot.find(e=>MediaRecorder.isTypeSupported(e))}class Nt{constructor(t){d(this,"maxDurationMs");d(this,"now");d(this,"callbacks");d(this,"deviceId");d(this,"onLevels");d(this,"stopMeter",null);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??Lt,this.now=t.now??Date.now,this.callbacks={onFinished:t.onFinished,onError:t.onError},this.deviceId=t.deviceId??null,this.onLevels=t.onLevels}get state(){return this.currentState}async start(){if(this.currentState!=="idle")return"discarded";this.currentState="starting";let t;try{t=await navigator.mediaDevices.getUserMedia(xt(this.deviceId))}catch(i){const o=this.discardRequested;return this.currentState="stopped",o||this.callbacks.onError(i),o?"discarded":"error"}if(this.discardRequested){for(const i of t.getTracks())i.stop();return this.currentState="stopped","discarded"}this.stream=t;const r=Wt(),s=r?new MediaRecorder(t,{mimeType:r}):new MediaRecorder(t);return this.recorder=s,s.ondataavailable=i=>{i.data&&i.data.size>0&&this.chunks.push(i.data)},s.onstop=()=>this.handleRecorderStop(),s.onerror=i=>this.handleRecorderError(i),s.start(),this.startedAt=this.now(),this.currentState="recording",this.maxTimer=setTimeout(()=>this.stop(),this.maxDurationMs),this.onLevels&&(this.stopMeter=Dt(t,this.onLevels)),"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,i=this.cancelRequested;this.teardown(),!i&&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.stopMeter?.(),this.stopMeter=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 Gt=300;function Vt(e){const t=e?.name;return t==="NotAllowedError"||t==="SecurityError"}const Bt={stopReason:"manual",autoSend:!1};let p=null,m=null,_=0,E=null;const I=new Tt({onRecordStart:()=>{E&&Ut(E)},onRecordStop:e=>{ee(E,e)}});function ei(){return p!==null}function ti(){return p}function ri(e){E=e,_+=1,_===1&&I.keyDown()}function si(e){E=e,_!==0&&(_-=1,_===0&&I.keyUp())}function Ut(e,t="key"){if(p!==null)return;It(),Rt();const r=new Nt({deviceId:Ct(),onLevels:s=>{p===r&&e.dispatch(me(s))},onFinished:s=>{p===r&&(p=null);const i=m??{stopReason:"auto-stop",autoSend:!1},o=m!==null;if(m=null,e.dispatch(C()),o||I.reset(),s.durationMs<Gt){i.autoSend&&e.dispatch(N());return}e.dispatch(be({...s,stopReason:i.stopReason,autoSend:i.autoSend}))},onError:s=>{p===r&&(p=null),m=null,e.dispatch(C()),e.showHint(Vt(s)?n.hardwareConsole_ptt_micDenied_message():n.hardwareConsole_ptt_recordingFailed_message())}});p=r,e.dispatch(ve({source:t,startedAt:Date.now()})),r.start().then(s=>{if(s!=="recording"&&(p===r&&(p=null),s==="discarded")){const i=m?.autoSend===!0;m=null,e.dispatch(C()),i&&e.dispatch(N())}})}function ee(e,t){const r=p;if(r===null){t.autoSend&&e?.dispatch(N());return}m=t,r.stop()}function ii(){ee(null,Bt)}function ai(e){I.reset(),_=0,m=null;const t=p;t!==null&&(p=null,t.cancel(),e.dispatch(C()))}const Ht=B("HardwareConsoleVoiceSetupToast"),qt="hardware-console-voice-setup";let W=null;function $t(){return W||(W=he(()=>Promise.resolve().then(()=>rt),void 0,import.meta.url).then(e=>e.notify)),W}function zt(){xe("/settings?tab=connections#voice").catch(e=>{Ht.error("Failed to open voice settings from setup toast",e)})}function jt(){return{label:n.hardwareConsole_voice_openSettings_label(),onClick:()=>zt()}}function ni(){$t().then(e=>{e.error(n.hardwareConsole_voice_noKey_error(),{id:qt,action:jt()})})}const oi=a.createSelector(e=>e.externalEditors.selectedAction),Kt=a.createSelector(e=>e.externalEditors.editors),Zt=a.createSelector(e=>{const t=y(Kt.select(e)),r=e.externalEditors.editorOrder??[];if(!r.length)return t;const s=new Map(t.map(l=>[l.id,l])),i=r.flatMap(l=>{const c=s.get(l);return c?[c]:[]}),o=new Set(r);return[...i,...t.filter(({id:l})=>!o.has(l))]}),ci=a.createSelector(e=>e.externalEditors.editorOrder??[]),li=a.createSelector(e=>e.externalEditors.loading),di=a.createSelector(e=>e.externalEditors.lastFetched),Qt=a.createSelector(e=>e.externalEditors.hiddenEditorIds),ui=a.createSelector((e,t)=>{if(!(t?Me.select(e,t):Te.select(e))||_e())return[];const s=Qt.select(e);return Zt.select(e).filter(i=>i.installed&&!s.includes(i.id))});function pi(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 Yt=0;function Jt(e,t){const r=++Yt;return a.dispatch(ye(e,t,r)),r}function gi(e,t,r){a.dispatch(Ae(e,t,r))}async function te(e,t,r,s){const i=crypto.randomUUID(),o=s?.source??"control";try{return(await a.dispatch(ke({requestId:i,consumerId:o,agentId:e,workspaceId:t,operation:r,connection:Q.select(a.state)},{...s,intent:s?.intent??Jt(e,t)}))).status==="success"}finally{a.dispatch(we(i,o))}}async function hi(e,t,r,s,i){return te(e,t,{kind:"effort",effort:r,previous:s},i)}async function fi(e,t,r,s,i){return te(e,t,{kind:"reconcile",current:r??null,levels:s},i)}const Xt=a.createSelector((e,t)=>y(e.agentModel.mutations).filter(r=>r.consumerId===t)),Si=a.createSelector((e,t)=>Xt.select(e,t).some(r=>r.status==="pending")),bi=a.createSelector((e,t,r)=>{const s=e.agentSessions.byAgentId[t],i=Ie.select(e,t),o=We.select(e,t),l=e.daemonHealth.stats?.protocolVersion,c=Ne(l),g=c?Ge(s?.model,null,o):s?.model;return{session:s,providerId:i,levels:o,legacy:c,identity:JSON.stringify([g,i]),connection:Q.select(e),canWrite:!!s&&s.workspaceId===r&&!Fe.select(e,r)}});function er(e,t,r=!1){const s=t?.available===!0&&t.viaNpx!==!0;return e!=="auggie"||s||r}const mi=a.createSelector(e=>$e.select(e)?null:U.select(e)),tr=a.createSelector(e=>e.providerCatalog?.workspaceEpoch??0),S=a.createSelector((e,t)=>t?e.providerCatalog?.byWorkspaceId?.[t]:void 0),vi=a.createSelector(e=>Object.keys(e.providerCatalog?.byWorkspaceId??{})),_i=a.createSelector((e,t)=>!!S.select(e,t)&&e.providerCatalog.workspaceSnapshotEpochs?.[t]===tr.select(e)),re=a.createSelector((e,t)=>t?S.select(e,t)?.catalog.providers??[]:De.select(e)),se=a.createSelector((e,t)=>{if(!t)return Y.select(e);const r=S.select(e,t)?.settings.find(s=>s.path==="model.defaultProvider")?.value;return typeof r=="string"?r:""}),q=a.createSelector((e,t)=>{if(!t)return ze.select(e);const r=S.select(e,t)?.settings.find(s=>s.path==="providers.enabled")?.value;return r&&typeof r=="object"?r:{}}),ie=a.createSelector((e,t)=>{if(!t)return je.select(e);const r=q.select(e,t),s=se.select(e,t),i=S.select(e,t)?.readiness??{};return re.select(e,t).filter(o=>o.visible&&(!o.canBeDisabled||r[o.id]||o.id===s)&&i[o.id]?.available).map(o=>o.id)}),Ai=a.createSelector((e,t)=>{const r=q.select(e,t),s=t?S.select(e,t)?.readiness??{}:U.select(e);return re.select(e,t).filter(i=>er(i.id,s[i.id],r[i.id]===!0)).map(i=>i.id)}),yi=a.createSelector((e,t)=>t?ie.select(e,t):Ke.select(e)),ki=a.createSelector((e,t)=>v.select(e,t)),wi=a.createSelector((e,t)=>t?!!S.select(e,t):Ze.select(e)),Ei=a.createSelector((e,t)=>{if(!t)return Ve.select(e);const r=S.select(e,t)?.settings??[],s=se.select(e,t),i=r.find(c=>c.path==="model.providerDefaults")?.value,o=i&&typeof i=="object"?i[s]:void 0;if(typeof o=="string")return o;const l=r.find(c=>c.path==="model.default")?.value;return typeof l=="string"?l:""}),Ci=a.createSelector((e,t)=>t?Object.fromEntries(Object.entries(e.providerModels?.byWorkspaceId?.[t]??{}).flatMap(([r,s])=>s.warning?[[r,s.warning]]:[])):Be.select(e)),Ri=a.createSelector((e,t)=>t?Object.fromEntries(Object.entries(e.providerModels?.byWorkspaceId?.[t]??{}).map(([r,s])=>[r,s.stale===!0])):Ue.select(e)),Pi=a.createSelector((e,t)=>t?Object.fromEntries(Object.entries(e.providerModels?.byWorkspaceId?.[t]??{}).flatMap(([r,s])=>s.warning&&s.warningKind?[[r,s.warningKind]]:[])):He.select(e)),Mi=a.createSelector((e,t,r)=>{if(!r)return Qe.select(e,t);const s=q.select(e,r),i=S.select(e,r);return ie.select(e,r).filter(o=>o!==t&&(s[o]||i?.catalog.providers.find(l=>l.id===o)?.canBeDisabled===!1)&&Ye(o,i?.readiness[o]?.authenticated))}),Ti=a.createSelector((e,t)=>t?S.select(e,t)?.readiness??{}:U.select(e)),rr={},Ii=a.createSelector(e=>e.providerSettings?.profiles?.status??rr),Z={},sr=a.createSelector((e,t)=>t?e.providerCatalog?.byWorkspaceId?.[t]?.mcpServers??[]:e.mcpSettings.servers),Fi=a.createSelector((e,t,r)=>{const s=e.providerCatalog?.byWorkspaceId?.[t];return s?s.mcpServers?.find(i=>i.id===r)?.name:e.providerCatalog?.mcpServerNamesByWorkspaceId?.[t]?.[r]}),Di=a.createSelector(e=>e.mcpSettings.loading),Li=a.createSelector(e=>e.mcpSettings.error),Oi=a.createSelector(e=>e.mcpSettings.mutationError??null),xi=a.createSelector(e=>e.mcpSettings.enabled),ir=a.createSelector(e=>e.mcpSettings.disabledServers),ar=a.createSelector(e=>e.mcpSettings.statusMap),nr=a.createSelector(e=>e.mcpSettings.toolsMap),or=a.createSelector((e,t)=>{if(!t)return e.mcpSettings.errorMessages;const r=e.providerCatalog?.byWorkspaceId?.[t],s=new Map(r?.mcpServers?.map(i=>[i.id,w(i)])??[]);return Object.fromEntries((r?.mcpStatuses??[]).flatMap(i=>{const o=s.get(i.serverId);return o&&i.lastError?[[o,i.lastError]]:[]}))}),cr=a.createSelector((e,t)=>t?e.mcpSettings.byWorkspaceId[t]?.disabledServers??Z:Z),Wi=a.createSelector((e,t)=>Object.keys(cr.select(e,t))),Ni=a.createSelector(e=>{const t=sr.select(e),r=ar.select(e),s=nr.select(e),i=ir.select(e),o=or.select(e);return t.map(l=>{const c=w(l)in i,g=s[w(l)]||[];let f=r[w(l)]||"disconnected";return c&&(f="disabled"),{...l,disabled:c,status:f,tools:g,toolCount:g.length,errorMessage:o[w(l)]}})});a.createSelector((e,t)=>e.mcpSettings.errorMessages[t]);const Gi=a.createSelector(e=>e.mcpSettings.lastImportedCount),Vi=a.createSelector(e=>e.mcpSettings.advancedSaveStatus),Bi=a.createSelector(e=>e.mcpSettings.advancedSaveError);function h(e){return{category:"settings",...e}}const T=[{id:"new-workspace",tab:"",label:"New workspace",route:"/workspace/new",category:"navigation",description:"Create-workspace flow."},h({id:"utility-default-model",tab:"providers",hashAliases:["utility-default-model","default-model","quickActions.defaultModel","backgroundAgents.defaultModel"],scrollSelector:"#utility-default-model",highlightSelector:'[data-highlight-id="utility-default-model"]',label:"Settings: Default model",route:"/settings?tab=providers#utility-default-model",description:"Default AI behavior model selection."}),h({id:"global-instructions",tab:"agent-behavior",hashAliases:["global-instructions","agents","specialists","all-agents"],scrollSelector:"#global-instructions",highlightSelector:'[data-highlight-id="global-instructions"]',label:"Settings: Agent Behavior",route:"/settings?tab=agent-behavior#global-instructions",description:"Global agent instructions and defaults."}),h({id:"create-specialist",tab:"specialists",hashAliases:["create-specialist"],scrollSelector:"#create-specialist",highlightSelector:'[data-highlight-id="create-specialist"]',label:"Settings: Create specialist",route:"/settings?tab=specialists&view=create-specialist#create-specialist",description:"Create-specialist entry point."}),h({id:"providers",tab:"providers",hashAliases:["providers"],scrollSelector:"#providers",highlightSelector:'[data-highlight-id="providers"]',label:"Settings: AI coding CLIs",route:"/settings?tab=providers#providers",description:"Provider/account selector settings."}),h({id:"integrations",tab:"connections",hashAliases:["integrations"],scrollSelector:"#integrations",highlightSelector:'[data-highlight-id="integrations"]',label:"Settings: Connections",route:"/settings?tab=connections#integrations",description:"Connected integrations settings."}),h({id:"devices",tab:"devices",hashAliases:["devices","machines"],scrollSelector:"#devices",highlightSelector:"#devices",label:"Settings: Machines",route:"/settings?tab=devices#devices",description:"Saved remote machine settings."}),h({id:"mobile",tab:"mobile",hashAliases:["mobile"],scrollSelector:"#mobile",highlightSelector:'[data-highlight-id="mobile"]',label:"Settings: Mobile",route:"/settings?tab=mobile#mobile",description:"Remote access and Intent Mobile pairing."}),h({id:"guest-sessions",tab:"collaboration",hashAliases:["collaboration","guest-sessions","sharing"],scrollSelector:"#collaboration",highlightSelector:"#collaboration",label:"Settings: Collaboration",route:"/settings?tab=collaboration#collaboration",description:"Host membership, workspace guests and joined hosts."}),h({id:"websocket-api",tab:"mobile",hashAliases:["websocket-api","remote-access"],scrollSelector:"#websocket-api",highlightSelector:'[data-highlight-id="websocket-api"]',label:"Settings: Remote Access",route:"/settings?tab=mobile#websocket-api",description:"Remote access (WebSocket API) settings."}),...[["voice","Voice Dictation","Voice dictation settings.","input"],["keyboard-shortcuts","Keyboard Shortcuts","Keyboard shortcuts reference.","input"],["autocomplete","Autocomplete","Suggest as you type: service, model and API keys.","input"],["mcp-servers","MCP Servers","MCP server configuration.","connections"],["plugins","Plugins","App-wide Agent Plugins.","connections"],["git-workspace","Git & Workspace","Git and workspace defaults.","setup"],["git","Git","Git defaults.","setup"],["shell","Shell","Shell settings.","setup"],["workspace","Workspace","Workspace defaults.","setup"],["cli-optimization","CLI Optimization","RTK/CLI optimization settings.","token-savings"],["workspace-api","Tool Output & Retention","Tool output size and retention settings.","advanced"],["notifications","Notifications","Notification preferences.","app-behavior"],["updates","Updates","Application update preferences.","app-behavior"],["open-in","Open In","External editor/app launch preferences.","app-behavior"],["github-link-action","GitHub Links","GitHub issue and pull request link behavior.","app-behavior"],["agent-features","Agent Features","Agent feature settings.","token-savings"],["font-style","Font style","Font style settings.","display"],["language","Language","Application language settings.","display"],["labs","Labs","Experimental feature switches.","advanced"],["agent-backend","Agent Backend","Agent backend settings.","performance"],["connection","Connection","Daemon connection details.","advanced"],["hardware","Hardware","Hardware integration settings.","input"],["developer","Developer","Development-only settings.","advanced"]].map(([e,t,r,s])=>h({id:e,tab:s,hashAliases:[e],scrollSelector:`#${e}`,highlightSelector:`[data-highlight-id="${e}"]`,label:`Settings: ${t}`,route:`/settings?tab=${s}#${e}`,description:r})),h({id:"appearance",tab:"display",hashAliases:["appearance","theme"],scrollSelector:"#theme",highlightSelector:'[data-highlight-id="appearance"]',label:"Settings: Appearance",route:"/settings?tab=display#theme",description:"Theme mode controls."}),...[["color-theme","Color theme","Color theme selection."],["note-font","Notes font","Notes/spec font style."],["agent-chat-font","Agent chat font","Agent chat font style."],["code-font","Code font","Code editor and diff font."]].map(([e,t,r])=>h({id:e,tab:"display",hashAliases:[e],scrollSelector:`#${e}`,highlightSelector:`[data-highlight-id="${e}"]`,label:`Settings: ${t}`,route:`/settings?tab=display#${e}`,description:r})),h({id:"general",tab:"advanced",hashAliases:["general","reset"],scrollSelector:"#reset",highlightSelector:'[data-highlight-id="general"]',label:"Settings: Advanced",route:"/settings?tab=advanced#reset",description:"Advanced settings and reset controls."}),{id:"workspace-card",tab:"",hashAliases:["workspace-card"],highlightSelector:'[data-highlight-id^="workspace-"]',label:"Workspace card",category:"workspace",description:"A workspace card on workspace list surfaces.",dynamic:!0,idPattern:"workspace-{workspaceId}"},{id:"specialist-entry",tab:"specialists",highlightSelector:'[data-highlight-id^="specialist-"]',label:"Specialist entry",route:"/settings?tab=specialists&specialist={specialistId}#specialist-{specialistId}",category:"specialist",description:"A specific specialist row in settings.",dynamic:!0,idPattern:"specialist-{specialistId}"}];function ae(e){const t=e.indexOf("#"),r=t>=0?e.slice(t+1):e;return decodeURIComponent(r.replace(/^#/,"")).trim()}function lr(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function dr(e,t){if(!t.match(/\{[^}]+\}/g)?.length)return e===t;const s=t.split(/\{[^}]+\}/g).map(lr).join("[^/]+");return new RegExp(`^${s}$`).test(e)}function ur(e){const t=ae(e);if(!t)return;const r=T.find(i=>i.id===t||i.hashAliases?.includes(t));if(r)return r;const s=T.find(i=>i.route&&i.dynamic&&i.idPattern&&dr(t,i.idPattern));return s?{...s,id:t}:void 0}function Ui(){return T.map(e=>({...e,hashAliases:e.hashAliases?[...e.hashAliases]:void 0}))}function pr(e){try{return new URL(e,"app://intent").pathname||"/"}catch{const t=e.indexOf("?"),r=e.indexOf("#");let s=e.length;return t>=0&&(s=Math.min(s,t)),r>=0&&(s=Math.min(s,r)),e.slice(0,s)||"/"}}const gr=new Set(T.flatMap(e=>e.route?[pr(e.route)]:[])),hr=[/^\/workspace\/[^/]+$/,/^\/agent\/[^/]+$/];function Hi(e){if(typeof e!="string")return!1;const t=e.trim();if(!t)return!1;if(t.startsWith("intent://"))return!0;let r,s;try{const i=new URL(t,"app://intent");if(i.protocol!=="app:")return!1;r=i.pathname||"/",s=ae(i.hash)}catch{return!1}return gr.has(r)?s?!!ur(s):!0:hr.some(i=>i.test(r))}const qi=["agentFeatures.backgroundHooks","agentFeatures.hostExec","agentFeatures.secretRequests","agentFeatures.scripts","agentFeatures.terminalAccess","agentFeatures.browserAutomation","agentFeatures.desktopControl","agentFeatures.richChatBlocks","agentFeatures.structuredQuestions","agentFeatures.attentionRequests","agentFeatures.stateSnapshot","agentFeatures.prMonitor","agentFeatures.taskGraph","agentFeatures.peerAgents","agentFeatures.mcpTools"],fr=[{path:"agentFeatures.backgroundHooks",label:()=>n.settings_agentFeatures_backgroundHooks_label(),description:()=>n.settings_agentFeatures_backgroundHooks_description(),defaultValue:!0},{path:"agentFeatures.hostExec",label:()=>n.settings_agentFeatures_hostExec_label(),description:()=>n.settings_agentFeatures_hostExec_description(),defaultValue:!0},{path:"agentFeatures.secretRequests",label:()=>n.settings_agentFeatures_secretRequests_label(),description:()=>n.settings_agentFeatures_secretRequests_description(),defaultValue:!1},{path:"agentFeatures.scripts",label:()=>n.settings_agentFeatures_scripts_label(),description:()=>n.settings_agentFeatures_scripts_description(),defaultValue:!0},{path:"agentFeatures.terminalAccess",label:()=>n.settings_agentFeatures_terminalAccess_label(),description:()=>n.settings_agentFeatures_terminalAccess_description(),defaultValue:!0},{path:"agentFeatures.browserAutomation",label:()=>n.settings_agentFeatures_browserAutomation_label(),description:()=>n.settings_agentFeatures_browserAutomation_description(),defaultValue:!0},{path:"agentFeatures.desktopControl",label:()=>n.settings_agentFeatures_desktopControl_label(),description:()=>n.settings_agentFeatures_desktopControl_description(),info:()=>n.settings_agentFeatures_desktopControl_info(),defaultValue:!0},{path:"agentFeatures.richChatBlocks",label:()=>n.settings_agentFeatures_richChatBlocks_label(),description:()=>n.settings_agentFeatures_richChatBlocks_description(),defaultValue:!0},{path:"agentFeatures.structuredQuestions",label:()=>n.settings_agentFeatures_structuredQuestions_label(),description:()=>n.settings_agentFeatures_structuredQuestions_description(),defaultValue:!0},{path:"agentFeatures.attentionRequests",label:()=>n.settings_agentFeatures_attentionRequests_label(),description:()=>n.settings_agentFeatures_attentionRequests_description(),defaultValue:!0},{path:"agentFeatures.stateSnapshot",label:()=>n.settings_agentFeatures_stateSnapshot_label(),description:()=>n.settings_agentFeatures_stateSnapshot_description(),defaultValue:!0},{path:"agentFeatures.prMonitor",label:()=>n.settings_agentFeatures_prMonitor_label(),description:()=>n.settings_agentFeatures_prMonitor_description(),defaultValue:!0},{path:"agentFeatures.taskGraph",label:()=>n.settings_agentFeatures_taskGraph_label(),description:()=>n.settings_agentFeatures_taskGraph_description(),defaultValue:!0},{path:"agentFeatures.peerAgents",label:()=>n.settings_agentFeatures_peerAgents_label(),description:()=>n.settings_agentFeatures_peerAgents_description(),defaultValue:!0},{path:"agentFeatures.mcpTools",label:()=>n.settings_agentFeatures_mcpTools_label(),description:()=>n.settings_agentFeatures_mcpTools_description(),defaultValue:!0}],$i=Object.fromEntries(fr.map(e=>[e.path,e.defaultValue]));export{Pi as $,Hi as A,Xs as B,Ct as C,zr as D,Jt as E,fr as F,J as G,_t as H,fi as I,gi as J,Et as K,ur as L,Ps as M,Ks as N,Si as O,Xt as P,bi as Q,Zr as R,A as S,es as T,yi as U,se as V,q as W,Ai as X,ie as Y,re as Z,Ri as _,Je as a,sr as a$,Ci as a0,Mi as a1,Ti as a2,wi as a3,Ei as a4,ki as a5,Jr as a6,rs as a7,Es as a8,ks as a9,qr as aA,Lr as aB,xr as aC,Vr as aD,Wr as aE,Gr as aF,Or as aG,Hr as aH,Dr as aI,$r as aJ,ps as aK,Qt as aL,Zt as aM,ui as aN,li as aO,ds as aP,us as aQ,di as aR,Bi as aS,Vi as aT,ir as aU,xi as aV,Li as aW,or as aX,Gi as aY,Di as aZ,Oi as a_,As as aa,ys as ab,ws as ac,_s as ad,ci as ae,ls as af,fs as ag,ns as ah,js as ai,os as aj,cs as ak,Qr as al,Xr as am,H as an,it as ao,dt as ap,ut as aq,X as ar,lt as as,at,st as au,ot as av,ct as aw,Nr as ax,Br as ay,Ur as az,$i as b,Ni as b0,ar as b1,nr as b2,oi as b3,is as b4,Ii as b5,mi as b6,St as b7,bs as b8,ms as b9,Fi as bA,Zs as bB,Ys as bC,ni as bD,Ut as bE,ii as bF,Ms as bG,Rs as bH,Ts as bI,Cs as bJ,jt as bK,vs as bL,hs as ba,Ss as bb,as as bc,gs as bd,v as be,ts as bf,Yr as bg,$s as bh,xs as bi,Hs as bj,qs as bk,Ns as bl,Bs as bm,Vs as bn,Ws as bo,Os as bp,Ls as bq,zs as br,Ds as bs,Gs as bt,Us as bu,S as bv,tr as bw,_i as bx,vi as by,Wi as bz,qi as c,hi as d,ai as e,Rt as f,It as g,Qs as h,Js as i,ss as j,ft as k,ht as l,ti as m,Ui as n,Is as o,Fs as p,jr as q,Kr as r,ri as s,si as t,rt as u,wt as v,er as w,ei as x,pi as y,K as z};
1
+ var ne=Object.defineProperty;var oe=(e,t,r)=>t in e?ne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var d=(e,t,r)=>oe(e,typeof t!="symbol"?t+"":t,r);import{m as ce,N as le,T as de,d as ue,o as pe,w as ge}from"./C1zxTHwk.js";import"./CJxGDkBm.js";import{bm as n,_ as he}from"./ClpAEjbe.js";import"./CnGVh7I3.js";import"./WSVFXKpL.js";import"./CPDV_dyu.js";import{c as B}from"./ChTqQfQN.js";import"./BeYVt6Wg.js";import{Jq as a,uy as fe,nW as y,nV as k,mn as Se,yU as C,yV as N,yS as be,yR as me,yT as ve,rR as _e,c8 as Ae,c7 as ye,cm as ke,cl as we,nY as w}from"./CpP1PKzF.js";import{cR as Ee,cG as Ce,bG as Re,ci as Pe,cy as Me,ck as Te,cP as Q,aI as Ie,c0 as Fe,cX as De}from"./D9Ykl3eH.js";import{a as Le,i as Oe}from"./CL3a4Hm1.js";import{i as D}from"./BBWuirRW.js";import{n as xe}from"./DsFpAZo7.js";import{x as We,aO as Ne,c as Ge,aD as Ve,B as Be,y as Ue,z as He}from"./b89lNINv.js";import{_ as qe,J as Y,$ as $e,aw as U,X as ze,a1 as je,K as Ke,Z as Ze,ay as Qe,w as Ye}from"./B6-GEB4b.js";const Je=5,L=120,Xe=4e3,j=.2,et=.8;function tt(e,t,r=Je){const s=e.length>0?t/(2*e.length):0,i=Xe/L;return Array.from({length:r},(o,l)=>{if(s<=0)return 0;const c=L*i**(l/r),g=L*i**((l+1)/r),f=Math.min(e.length-1,Math.floor(c/s)),b=Math.min(e.length,Math.max(f+1,Math.ceil(g/s)));let $=0;for(let F=f;F<b;F+=1)$+=e[F]??0;const z=($/(b-f)/255-j)/(et-j);return Number.isFinite(z)?Math.min(1,Math.max(0,z)):0})}const rt=Object.freeze(Object.defineProperty({__proto__:null,NOTIFY_DURATION:le,TOAST_COUNTDOWN_CLASS:de,TOAST_COUNTDOWN_NO_HOVER_PAUSE_CLASS:ue,notify:ce,notifyMetadata:pe,withToastCountdown:ge},Symbol.toStringTag,{value:"Module"})),Dr=a.createSelector(e=>Ee.select(e)?.capabilities.gitlabCheckout===!0),Lr=a.createSelector(e=>e.gitlabAuth.host),Or=a.createSelector(e=>e.gitlabAuth.instanceBaseUrl??e.gitlabAuth.host),xr=a.createSelector(e=>fe(e.gitlabAuth.instanceBaseUrl??e.gitlabAuth.host)??""),Wr=a.createSelector(e=>e.gitlabAuth.isCancelling),Nr=a.createSelector(e=>e.gitlabAuth.cancelOutcome),Gr=a.createSelector(e=>e.gitlabAuth.isConfigured),Vr=a.createSelector(e=>e.gitlabAuth.isAuthenticating),Br=a.createSelector(e=>e.gitlabAuth.deviceFlow),Ur=a.createSelector(e=>e.gitlabAuth.deviceGrantSupported),Hr=a.createSelector(e=>e.gitlabAuth.user),qr=a.createSelector(e=>e.gitlabAuth.error);a.createSelector(e=>e.gitlabAuth.method);const $r=a.createSelector(e=>e.gitlabAuth.statusReady===!0),A=[{id:"pr-reviewer",icon:"pr-reviewer",get name(){return n.specialists_builtin_prReviewer_name()},get description(){return n.specialists_builtin_prReviewer_description()},defaultBehaviorPrompt:"",promptUnavailable:!0},{id:"ui-designer",icon:"ui-designer",get name(){return n.specialists_builtin_uiDesigner_name()},get description(){return n.specialists_builtin_uiDesigner_description()},defaultBehaviorPrompt:"",promptUnavailable:!0},{id:"vulnerability-scanner",icon:"pr-reviewer",get name(){return n.specialists_builtin_vulnerabilityScanner_name()},get description(){return n.specialists_builtin_vulnerabilityScanner_description()},defaultBehaviorPrompt:"",promptUnavailable:!0},{id:"developer",icon:"verifier",get name(){return n.specialists_builtin_developer_name()},get description(){return n.specialists_builtin_developer_description()},defaultBehaviorPrompt:"",promptUnavailable:!0},{id:"product-manager",icon:"coordinator",get name(){return n.specialists_builtin_productManager_name()},get description(){return n.specialists_builtin_productManager_description()},defaultBehaviorPrompt:"",promptUnavailable:!0},{id:"maintenance-coordinator",icon:"ralph",get name(){return n.specialists_builtin_maintenanceCoordinator_name()},get description(){return n.specialists_builtin_maintenanceCoordinator_description()},defaultBehaviorPrompt:"",promptUnavailable:!0},{id:"chief-of-staff",icon:"chief-of-staff",get name(){return n.specialists_builtin_chiefOfStaff_name()},get description(){return n.specialists_builtin_chiefOfStaff_description()},hidden:!0,defaultBehaviorPrompt:"",promptUnavailable:!0}],J=new Set(["pr-reviewer"]),zr="developer";function jr(e){return A.find(t=>t.id===e)}const st=a.createSelector(e=>e.githubAuth.mutationRequestId),it=a.createSelector(e=>e.githubAuth.callbacksCancelled),at=a.createSelector(e=>e.githubAuth.isDisconnecting),X=a.createSelector(e=>e.githubAuth.isAuthenticated),nt=a.createSelector(e=>e.githubAuth.statusSettled===!0),ot=a.createSelector(e=>e.githubAuth.requiresDaemonAuth),ct=a.createSelector(e=>e.githubAuth.user),lt=a.createSelector(e=>e.githubAuth.isAuthenticating),dt=a.createSelector(e=>e.githubAuth.deviceFlow),ut=a.createSelector(e=>e.githubAuth.error),Kr=Object.freeze(Object.defineProperty({__proto__:null,selectGitHubAuthCallbacksCancelled:it,selectGitHubAuthDeviceFlow:dt,selectGitHubAuthError:ut,selectGitHubAuthIsAuthenticated:X,selectGitHubAuthIsAuthenticating:lt,selectGitHubAuthIsDisconnecting:at,selectGitHubAuthMutationRequestId:st,selectGitHubAuthRequiresDaemonAuth:ot,selectGitHubAuthStatusSettled:nt,selectGitHubAuthUser:ct},Symbol.toStringTag,{value:"Module"}));function u(e){return e??""}function pt(e,t){const r=e??[],s=t??[];return r.length===s.length&&r.every((i,o)=>u(i.provider)===u(s[o].provider)&&i.model===s[o].model&&i.hint===s[o].hint&&u(i.reasoningEffort)===u(s[o].reasoningEffort))}function K(e,t){if(e.source!=="user"||!t?.ignoreModelPin&&(e.model||e.codingAgent))return!1;const r=e.bundled;return r?u(e.name)===u(r.name)&&u(e.description)===u(r.description)&&u(e.behaviorPrompt)===u(r.behaviorPrompt)&&u(e.roleReminder)===u(r.roleReminder)&&u(e.reasoningEffort)===u(r.reasoningEffort)&&pt(e.modelOptions,r.modelOptions):!1}const Zr=a.createSelector(e=>e.specialists.bundledSpecialists),gt=a.createSelector(e=>e.specialists.fileSpecialists),Qr=a.createSelector(e=>y(gt.select(e))),Yr=a.createSelector(e=>e.specialists.userOverrides);a.createSelector(e=>e.specialists.overridesLoaded);const Jr=a.createSelector(e=>e.specialists.customSpecialistsLoaded),Xr=a.createSelector(e=>e.specialists.fileSpecialistsLoaded),es=a.createSelector(e=>e.specialists.bundledSpecialistsLoaded),ts=a.createSelector(e=>e.specialists.specialistsFolderPath),rs=a.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:""});a.createSelector(e=>e.specialists.providerModelOverrides);const O=a.createSelector((e,t)=>!(J.has(t)&&!X.select(e)));function ht(e,t){return t?e:e.filter(r=>!J.has(r.id))}function ft(e,t){return ht(e,t).filter(r=>!r.hidden)}function ss(e,t){return ft(e,t).filter(r=>r.role!=="internal")}const v=a.createSelector((e,t)=>{if(t)return(e.providerCatalog?.byWorkspaceId?.[t]?.specialists??[]).map(c=>({...c,defaultModel:c.model,defaultBehaviorPrompt:c.behaviorPrompt??c.prompt??"",defaultAgentType:c.agentType}));const r=y(e.specialists.fileSpecialists),s=e.specialists.bundledSpecialists,i=new Set,o=[];for(const c of r)!i.has(c.id)&&O.select(e,c.id)&&(i.add(c.id),o.push({id:c.id,name:c.name,description:c.description,codingAgent:c.codingAgent,defaultModel:c.model||void 0,defaultBehaviorPrompt:c.behaviorPrompt,roleReminder:c.roleReminder,source:c.source,importedFrom:c.importedFrom,unsupportedFields:c.unsupportedFields,requiredSkills:c.requiredSkills,missingSkills:c.missingSkills,hidden:c.hidden,resolvedModel:c.resolvedModel,resolvedProvider:c.resolvedProvider,modelOptions:c.modelOptions,reasoningEffort:c.reasoningEffort,role:c.role,teamAgents:c.teamAgents,icon:c.icon}));for(const c of s)!i.has(c.id)&&O.select(e,c.id)&&(i.add(c.id),o.push(c));if(!e.specialists.bundledSpecialistsLoaded&&r.length===0&&s.length===0)for(const c of A)!i.has(c.id)&&O.select(e,c.id)&&(i.add(c.id),o.push(c));const l=new Map;for(const c of A)l.has(c.id)||l.set(c.id,l.size);for(const c of s)l.has(c.id)||l.set(c.id,l.size);return o.sort((c,g)=>{const f=l.has(c.id),b=l.has(g.id);return f&&b?(l.get(c.id)??0)-(l.get(g.id)??0):f&&!b?-1:!f&&b?1:c.name.localeCompare(g.name)}),o}),is=a.createSelector(e=>{const t=v.select(e).filter(s=>s.role==="orchestrator");if(t.length===0)return null;const r=new Set([...A.map(({id:s})=>s),...e.specialists.bundledSpecialists.map(({id:s})=>s)]);return t.sort((s,i)=>+!r.has(s.id)-+!r.has(i.id)||s.id.localeCompare(i.id)),t[0]}),St=a.createSelector((e,t)=>{const r=k(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(i=>i.id===t);if(s)return{id:s.id,name:s.name,description:s.description,source:"builtin"};if(!e.specialists.bundledSpecialistsLoaded&&y(e.specialists.fileSpecialists).length===0&&e.specialists.bundledSpecialists.length===0){const i=A.find(o=>o.id===t);if(i)return{id:i.id,name:i.name,description:i.description,source:"builtin"}}return null}),as=a.createSelector((e,t)=>St.select(e,t)?.name??null),ns=a.createSelector((e,t,r)=>{const i=v.select(e,r).find(o=>o.id===t);return i?i.defaultModel?i.defaultModel:i.resolvedModel??"":""}),os=a.createSelector((e,t,r)=>v.select(e,r).find(o=>o.id===t)?.defaultModel||void 0),cs=a.createSelector((e,t,r)=>v.select(e,r).find(o=>o.id===t)?.reasoningEffort||void 0),ls=a.createSelector((e,t,r)=>{const i=v.select(e,r).find(o=>o.id===t);return i?i.defaultBehaviorPrompt:""});function R(e,t){return t.some(r=>r.id===e)||A.some(r=>r.id===e)}const ds=a.createSelector((e,t,r)=>{if(r){const s=e.providerCatalog?.byWorkspaceId?.[r]?.specialists.find(i=>i.id===t);return!s||s.importedFrom?!1:s.source==="bundled"||s.source==="user"&&R(t,e.specialists.bundledSpecialists)}return R(t,e.specialists.bundledSpecialists)}),us=a.createSelector((e,t,r)=>r?!!H.select(e,t,r):!!k(e.specialists.fileSpecialists,t)),ps=a.createSelector((e,t,r)=>{if(r){const o=H.select(e,t,r);return!o||o.importedFrom||o.source==="project"?!1:R(t,e.specialists.bundledSpecialists)&&!K(o)}if(!R(t,e.specialists.bundledSpecialists))return!1;const i=k(e.specialists.fileSpecialists,t);return!i||i.source!=="user"?!1:!K(i)}),H=a.createSelector((e,t,r)=>{if(r){const s=e.providerCatalog?.byWorkspaceId?.[r]?.specialists.find(i=>i.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 k(e.specialists.fileSpecialists,t)}),gs=a.createSelector((e,t,r)=>{const s=H.select(e,t,r);return r&&!s?e.providerCatalog?.byWorkspaceId?.[r]?.specialists.some(i=>i.id===t)?"Built-in":null:s?.source==="project"?"Project":s?.source==="user"?"User":e.specialists.bundledSpecialists.some(i=>i.id===t)?"Built-in":null}),hs=a.createSelector((e,t,r)=>{if(r)return e.providerCatalog?.byWorkspaceId?.[r]?.specialists.find(o=>o.id===t)?.path;const s=k(e.specialists.fileSpecialists,t);if(s)return s.filePath;const i=e.specialists.bundledSpecialists.find(o=>o.id===t);if(i&&"filePath"in i)return i.filePath}),fs=a.createSelector((e,t,r)=>{if(r){const i=v.select(e,r).find(c=>c.id===t),o=i?.codingAgent||i?.resolvedProvider;if(o)return Ce.select(e,o,r);const l=Re.select(e,r);return e.providerCatalog?.byWorkspaceId?.[r]?.readiness[l]?.available?l:""}const s=k(e.specialists.fileSpecialists,t);return s?.codingAgent?s.codingAgent:bt.select(e,t)}),bt=a.createSelector((e,t)=>{const s=v.select(e).find(i=>i.id===t);return s?.codingAgent?s.codingAgent:qe.select(e)?Y.select(e):""}),Ss=a.createSelector((e,t)=>{if(t)return e.providerCatalog?.byWorkspaceId?.[t]?.importDiagnostics??[];const r=e.specialists.importDiagnostics;return r?y(r):[]}),bs=a.createSelector((e,t)=>e.specialists.creationByContext?.[t]??Se),ms=a.createSelector(e=>Object.values(e.specialists.creationByContext??{}).flatMap(t=>t.specialistId?[t.specialistId]:[])),x=B("Clipboard");async function vs(e){let t;if(Le())try{const r=await Oe("system:write-clipboard",{text:e});if(r?.success===!1)throw new Error(r.error||"Electron clipboard write failed");return}catch(r){t=r,x.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 x.error("Browser clipboard write failed",r,{electronError:t}),r}throw x.error("No clipboard write API is available",void 0,{electronError:t}),t instanceof Error?t:new Error("Clipboard write API unavailable")}const _s=a.createSelector(e=>e.directoryPicker.source??"daemon"),As=a.createSelector(e=>e.directoryPicker.listing),ys=a.createSelector(e=>e.directoryPicker.loading),ks=a.createSelector(e=>e.directoryPicker.error),ws=a.createSelector(e=>e.directoryPicker.pathError),Es=a.createSelector(e=>e.directoryPicker.createError),mt=B("WorkspaceValidation");async function Cs(e,t=!1,r=!1){if(!e||e.trim().length===0)return{valid:!1,error:n.workspace_validation_repoPathRequired_error(),suggestion:n.workspace_validation_repoPathRequired_suggestion()};const s=e.trim();return vt(s)?At(s):yt(s,t,r)}function vt(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 _t(e){const t=e.trim(),r=[/^https?:\/\/github\.com\/([^\/]+)\/([^\/]+)$/i,/^git@github\.com:([^\/]+)\/([^\/]+)$/i,/^github\.com\/([^\/]+)\/([^\/]+)$/i];for(const i of r){const o=t.match(i);if(o){const l=o[2].replace(/\.git$/,"");return l?{owner:o[1],repo:l}:null}}const s=t.match(/^([a-zA-Z0-9\-_]+)\/([a-zA-Z0-9\-_\.]+)$/);if(s&&!t.includes("\\")&&!t.includes(":")){const i=s[2].replace(/\.git$/,"");return i?{owner:s[1],repo:i}:null}return null}async function At(e){return _t(e)?{valid:!0,warning:n.workspace_validation_githubCloneLocally_warning()}:{valid:!1,error:n.workspace_validation_invalidGithubUrl_error(),suggestion:n.workspace_validation_invalidGithubUrl_suggestion()}}async function yt(e,t=!1,r=!1){if(e.includes("\0"))return{valid:!1,error:n.workspace_validation_nullCharacters_error()};if(!e.startsWith("/")&&!e.startsWith("~")&&!e.startsWith(".")&&!e.includes(":\\")&&!/^[a-zA-Z]:\//.test(e))return{valid:!1,error:n.workspace_validation_pathNotAbsolute_error(),suggestion:n.workspace_validation_pathNotAbsolute_suggestion()};if(typeof window<"u"&&window.electronAPI)try{const s=await D("file:getDirectoryStatus",{path:e});if(s.success&&s.data){const l=s.data;return l.exists?l.isDirectory?l.isGitRepo?{valid:!0,isNewRepo:!1,directoryStatus:l}:l.isSubdirectoryOfGitRepo?{valid:!0,isNewRepo:!1,directoryStatus:l,warning:n.workspace_validation_insideParentRepo_warning({path:l.parentGitRoot??""})}:r?{valid:!0,isNewRepo:!1,directoryStatus:l}:t?l.isEmpty?{valid:!0,isNewRepo:!0,directoryStatus:l,warning:n.workspace_validation_emptyDirInit_warning()}:{valid:!0,isNewRepo:!0,directoryStatus:l,warning:n.workspace_validation_nonGitDirInit_warning()}:{valid:!1,error:n.workspace_repoSelector_notGitRepository_label(),directoryStatus:l}:{valid:!1,error:n.workspace_validation_notDirectory_error(),suggestion:n.workspace_validation_notDirectory_suggestion(),directoryStatus:l}:t?{valid:!0,isNewRepo:!0,directoryStatus:l,warning:n.workspace_validation_willCreateRepo_warning()}:{valid:!1,error:n.workspace_validation_dirNotExist_error(),suggestion:n.workspace_validation_dirNotExist_suggestion(),directoryStatus:l}}if(!(await D("file:exists",{path:e})).exists)return t?{valid:!0,isNewRepo:!0,warning:n.workspace_validation_willCreateRepo_warning()}:{valid:!1,error:n.workspace_validation_dirNotExist_error(),suggestion:n.workspace_validation_dirNotExistLegacy_suggestion()};const o=await D("git:isRepository",{path:e});if(!t&&o?.isRepository!==!0)return{valid:!1,error:o?.isRepository===!1?n.workspace_repoSelector_notGitRepository_label():n.workspace_compactInitializer_gitCheckUnknown_label()};if(!o.isRepository)return{valid:!0,isNewRepo:!0,warning:n.workspace_validation_nonGitInit_warning()}}catch(s){if(mt.warn("Could not validate path existence",s),!t)return{valid:!1,error:n.workspace_compactInitializer_gitCheckUnknown_label()}}return{valid:!0,isNewRepo:!1}}function Rs(e){if(!e||e.trim().length===0)return{valid:!0};const t=e.trim();return/[\s~^:?*\[\]\\]/.test(t)?{valid:!1,error:n.workspace_validation_branchPrefixInvalidChars_error(),suggestion:n.workspace_validation_branchChars_suggestion()}:t==="."||t===".."||t.startsWith(".")?{valid:!1,error:n.workspace_validation_branchPrefixDot_error()}:t.includes("..")||t.includes("//")?{valid:!1,error:n.workspace_validation_branchPrefixConsecutive_error()}:t.startsWith("/")?{valid:!1,error:n.workspace_validation_branchPrefixSlash_error()}:t.endsWith(".lock")?{valid:!1,error:n.workspace_validation_branchPrefixLock_error()}:t.length>50?{valid:!1,error:n.workspace_validation_branchPrefixTooLong_error()}:{valid:!0}}function Ps(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 Ms(e){if(!e||e.trim().length===0)return{valid:!1,error:n.workspace_validation_branchNameRequired_error()};const t=e.trim();return/[\s~^:?*\[\]\\]/.test(t)?{valid:!1,error:n.workspace_validation_branchNameInvalidChars_error(),suggestion:n.workspace_validation_branchChars_suggestion()}:["HEAD",".",".."].includes(t)?{valid:!1,error:n.workspace_validation_branchNameReserved_error()}:t.includes("..")||t.includes("//")?{valid:!1,error:n.workspace_validation_branchNameConsecutive_error()}:t.startsWith("/")||t.endsWith("/")?{valid:!1,error:n.workspace_validation_branchNameSlash_error()}:t.endsWith(".lock")?{valid:!1,error:n.workspace_validation_branchNameLock_error()}:{valid:!0}}function Ts(e){return!e||e.trim().length===0?{valid:!0}:e.trim().length>1e5?{valid:!1,error:n.workspace_validation_promptTooLong_error(),suggestion:n.workspace_validation_promptTooLong_suggestion()}:{valid:!0}}function Is(e){const t=e.toLowerCase();return t.includes("maxbuffer")?n.workspace_gitError_maxBuffer():t.includes("clone")&&t.includes("timed out")?n.workspace_gitError_cloneTimeout():t.includes("json-rpc request timed out: workspace.create")?n.workspace_gitError_createTimeout():t.includes("timed out")&&["git","clone","fetch","worktree","pull","push","rebase","merge"].some(r=>t.includes(r))?n.workspace_gitError_gitTimeout():t.includes("git clone failed")?t.includes("could not read from remote")?n.workspace_gitError_cloneRemote():t.includes("authentication")||t.includes("permission denied")||t.includes("access denied")?n.workspace_gitError_cloneAuth():n.workspace_gitError_cloneFailed():t.includes("could not resolve any ref to create worktree")?n.workspace_gitError_worktreeRef():t.includes("failed to write file")?t.includes("eacces")||t.includes("permission denied")?n.workspace_gitError_writePermission():t.includes("enospc")||t.includes("disk space")?n.workspace_gitError_diskSpaceFree():t.includes("enoent")||t.includes("no such file")?n.workspace_gitError_writeNoEnt():e:t.includes("failed to read file")?t.includes("enoent")||t.includes("no such file")?n.workspace_gitError_readNotFound():t.includes("eacces")||t.includes("permission denied")?n.workspace_gitError_readPermission():e:t.includes("permission denied")?n.workspace_gitError_permissionDenied():t.includes("not found")||t.includes("enoent")?n.workspace_gitError_notFound():t.includes("already exists")?n.workspace_gitError_alreadyExists():t.includes("network")||t.includes("etimedout")?n.workspace_gitError_network():t.includes("authentication")||t.includes("401")?t.includes("private repositor")?e:n.workspace_gitError_authFailed():t.includes("rate limit")||t.includes("403")?n.workspace_gitError_rateLimit():t.includes("disk space")||t.includes("enospc")?n.workspace_gitError_diskSpace():e}const kt=["idle","exited"];function wt(e){return e===void 0||!kt.includes(e)}function Fs(e){return e.status==="restarting"?"restarting":wt(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 Et(e){return e.engine==="os"?"os":e.isLoading||e.keyConfigured[e.provider]===!0?"daemon":e.osEngineAvailable?"os":"unavailable"}const Ds=a.createSelector(e=>e.voiceSettings.isLoading),Ls=a.createSelector(e=>e.voiceSettings.available),Os=a.createSelector(e=>e.voiceSettings.provider),xs=a.createSelector(e=>e.voiceSettings.engine),Ws=a.createSelector(e=>e.voiceSettings.osEngineAvailable),Ns=a.createSelector(e=>e.voiceSettings.keyConfigured),Gs=a.createSelector(e=>e.voiceSettings.vocabulary),Vs=a.createSelector(e=>e.voiceSettings.openaiModel),Bs=a.createSelector(e=>e.voiceSettings.language),Us=a.createSelector(e=>e.voiceSettings.workspaceVocabularyMaxTerms),Hs=a.createSelector(e=>e.voiceSettings.inputDeviceId),qs=a.createSelector(e=>e.voiceSettings.inputDevices),$s=a.createSelector(e=>e.voiceSettings.busyProvider),zs=a.createSelector(e=>e.voiceSettings.error),js=a.createSelector(e=>Pe.select(e)?"unavailable":Et(e.voiceSettings)),G="intent.voice.inputDevice";let V;function Ct(){if(V!==void 0)return V;try{const e=localStorage.getItem(G);return typeof e=="string"&&e!==""?e:null}catch{return null}}function Ks(e){V=e;try{e===null?localStorage.removeItem(G):localStorage.setItem(G,e)}catch{}}let P=null;function Zs(e){P=e}function Qs(){const e=P;return P=null,e}function Rt(){P=null}const Pt=300,Mt=300;class Tt{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??Pt,this.doublePressWindowMs=t.doublePressWindowMs??Mt,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 M=null;function Ys(e){M=e}function Js(){const e=M;return M=null,e}function It(){M=null}const Ft=66;function Dt(e,t){const r=globalThis.AudioContext;if(typeof r!="function")return()=>{};let s,i,o;try{s=new r,i=s.createMediaStreamSource(e),o=s.createAnalyser(),o.fftSize=1024,o.smoothingTimeConstant=.5,o.minDecibels=-85,o.maxDecibels=-25,i.connect(o)}catch{return i?.disconnect(),s?.close().catch(()=>{}),()=>{}}if(!s||!i)return()=>{};const l=s,c=i,g=new Uint8Array(o.frequencyBinCount),f=setInterval(()=>{o.getByteFrequencyData(g),t(tt(g,l.sampleRate))},Ft);let b=!1;return()=>{b||(b=!0,clearInterval(f),c.disconnect(),l.close().catch(()=>{}))}}const Lt=12e4,Ot=["audio/webm;codecs=opus","audio/webm"];function Xs(){return typeof navigator<"u"&&typeof navigator.mediaDevices?.getUserMedia=="function"&&typeof MediaRecorder<"u"}function xt(e){return e?{audio:{deviceId:{ideal:e}}}:{audio:!0}}function Wt(){if(!(typeof MediaRecorder>"u"||typeof MediaRecorder.isTypeSupported!="function"))return Ot.find(e=>MediaRecorder.isTypeSupported(e))}class Nt{constructor(t){d(this,"maxDurationMs");d(this,"now");d(this,"callbacks");d(this,"deviceId");d(this,"onLevels");d(this,"stopMeter",null);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??Lt,this.now=t.now??Date.now,this.callbacks={onFinished:t.onFinished,onError:t.onError},this.deviceId=t.deviceId??null,this.onLevels=t.onLevels}get state(){return this.currentState}async start(){if(this.currentState!=="idle")return"discarded";this.currentState="starting";let t;try{t=await navigator.mediaDevices.getUserMedia(xt(this.deviceId))}catch(i){const o=this.discardRequested;return this.currentState="stopped",o||this.callbacks.onError(i),o?"discarded":"error"}if(this.discardRequested){for(const i of t.getTracks())i.stop();return this.currentState="stopped","discarded"}this.stream=t;const r=Wt(),s=r?new MediaRecorder(t,{mimeType:r}):new MediaRecorder(t);return this.recorder=s,s.ondataavailable=i=>{i.data&&i.data.size>0&&this.chunks.push(i.data)},s.onstop=()=>this.handleRecorderStop(),s.onerror=i=>this.handleRecorderError(i),s.start(),this.startedAt=this.now(),this.currentState="recording",this.maxTimer=setTimeout(()=>this.stop(),this.maxDurationMs),this.onLevels&&(this.stopMeter=Dt(t,this.onLevels)),"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,i=this.cancelRequested;this.teardown(),!i&&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.stopMeter?.(),this.stopMeter=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 Gt=300;function Vt(e){const t=e?.name;return t==="NotAllowedError"||t==="SecurityError"}const Bt={stopReason:"manual",autoSend:!1};let p=null,m=null,_=0,E=null;const I=new Tt({onRecordStart:()=>{E&&Ut(E)},onRecordStop:e=>{ee(E,e)}});function ei(){return p!==null}function ti(){return p}function ri(e){E=e,_+=1,_===1&&I.keyDown()}function si(e){E=e,_!==0&&(_-=1,_===0&&I.keyUp())}function Ut(e,t="key"){if(p!==null)return;It(),Rt();const r=new Nt({deviceId:Ct(),onLevels:s=>{p===r&&e.dispatch(me(s))},onFinished:s=>{p===r&&(p=null);const i=m??{stopReason:"auto-stop",autoSend:!1},o=m!==null;if(m=null,e.dispatch(C()),o||I.reset(),s.durationMs<Gt){i.autoSend&&e.dispatch(N());return}e.dispatch(be({...s,stopReason:i.stopReason,autoSend:i.autoSend}))},onError:s=>{p===r&&(p=null),m=null,e.dispatch(C()),e.showHint(Vt(s)?n.hardwareConsole_ptt_micDenied_message():n.hardwareConsole_ptt_recordingFailed_message())}});p=r,e.dispatch(ve({source:t,startedAt:Date.now()})),r.start().then(s=>{if(s!=="recording"&&(p===r&&(p=null),s==="discarded")){const i=m?.autoSend===!0;m=null,e.dispatch(C()),i&&e.dispatch(N())}})}function ee(e,t){const r=p;if(r===null){t.autoSend&&e?.dispatch(N());return}m=t,r.stop()}function ii(){ee(null,Bt)}function ai(e){I.reset(),_=0,m=null;const t=p;t!==null&&(p=null,t.cancel(),e.dispatch(C()))}const Ht=B("HardwareConsoleVoiceSetupToast"),qt="hardware-console-voice-setup";let W=null;function $t(){return W||(W=he(()=>Promise.resolve().then(()=>rt),void 0,import.meta.url).then(e=>e.notify)),W}function zt(){xe("/settings?tab=connections#voice").catch(e=>{Ht.error("Failed to open voice settings from setup toast",e)})}function jt(){return{label:n.hardwareConsole_voice_openSettings_label(),onClick:()=>zt()}}function ni(){$t().then(e=>{e.error(n.hardwareConsole_voice_noKey_error(),{id:qt,action:jt()})})}const oi=a.createSelector(e=>e.externalEditors.selectedAction),Kt=a.createSelector(e=>e.externalEditors.editors),Zt=a.createSelector(e=>{const t=y(Kt.select(e)),r=e.externalEditors.editorOrder??[];if(!r.length)return t;const s=new Map(t.map(l=>[l.id,l])),i=r.flatMap(l=>{const c=s.get(l);return c?[c]:[]}),o=new Set(r);return[...i,...t.filter(({id:l})=>!o.has(l))]}),ci=a.createSelector(e=>e.externalEditors.editorOrder??[]),li=a.createSelector(e=>e.externalEditors.loading),di=a.createSelector(e=>e.externalEditors.lastFetched),Qt=a.createSelector(e=>e.externalEditors.hiddenEditorIds),ui=a.createSelector((e,t)=>{if(!(t?Me.select(e,t):Te.select(e))||_e())return[];const s=Qt.select(e);return Zt.select(e).filter(i=>i.installed&&!s.includes(i.id))});function pi(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 Yt=0;function Jt(e,t){const r=++Yt;return a.dispatch(ye(e,t,r)),r}function gi(e,t,r){a.dispatch(Ae(e,t,r))}async function te(e,t,r,s){const i=crypto.randomUUID(),o=s?.source??"control";try{return(await a.dispatch(ke({requestId:i,consumerId:o,agentId:e,workspaceId:t,operation:r,connection:Q.select(a.state)},{...s,intent:s?.intent??Jt(e,t)}))).status==="success"}finally{a.dispatch(we(i,o))}}async function hi(e,t,r,s,i){return te(e,t,{kind:"effort",effort:r,previous:s},i)}async function fi(e,t,r,s,i){return te(e,t,{kind:"reconcile",current:r??null,levels:s},i)}const Xt=a.createSelector((e,t)=>y(e.agentModel.mutations).filter(r=>r.consumerId===t)),Si=a.createSelector((e,t)=>Xt.select(e,t).some(r=>r.status==="pending")),bi=a.createSelector((e,t,r)=>{const s=e.agentSessions.byAgentId[t],i=Ie.select(e,t),o=We.select(e,t),l=e.daemonHealth.stats?.protocolVersion,c=Ne(l),g=c?Ge(s?.model,null,o):s?.model;return{session:s,providerId:i,levels:o,legacy:c,identity:JSON.stringify([g,i]),connection:Q.select(e),canWrite:!!s&&s.workspaceId===r&&!Fe.select(e,r)}});function er(e,t,r=!1){const s=t?.available===!0&&t.viaNpx!==!0;return e!=="auggie"||s||r}const mi=a.createSelector(e=>$e.select(e)?null:U.select(e)),tr=a.createSelector(e=>e.providerCatalog?.workspaceEpoch??0),S=a.createSelector((e,t)=>t?e.providerCatalog?.byWorkspaceId?.[t]:void 0),vi=a.createSelector(e=>Object.keys(e.providerCatalog?.byWorkspaceId??{})),_i=a.createSelector((e,t)=>!!S.select(e,t)&&e.providerCatalog.workspaceSnapshotEpochs?.[t]===tr.select(e)),re=a.createSelector((e,t)=>t?S.select(e,t)?.catalog.providers??[]:De.select(e)),se=a.createSelector((e,t)=>{if(!t)return Y.select(e);const r=S.select(e,t)?.settings.find(s=>s.path==="model.defaultProvider")?.value;return typeof r=="string"?r:""}),q=a.createSelector((e,t)=>{if(!t)return ze.select(e);const r=S.select(e,t)?.settings.find(s=>s.path==="providers.enabled")?.value;return r&&typeof r=="object"?r:{}}),ie=a.createSelector((e,t)=>{if(!t)return je.select(e);const r=q.select(e,t),s=se.select(e,t),i=S.select(e,t)?.readiness??{};return re.select(e,t).filter(o=>o.visible&&(!o.canBeDisabled||r[o.id]||o.id===s)&&i[o.id]?.available).map(o=>o.id)}),Ai=a.createSelector((e,t)=>{const r=q.select(e,t),s=t?S.select(e,t)?.readiness??{}:U.select(e);return re.select(e,t).filter(i=>er(i.id,s[i.id],r[i.id]===!0)).map(i=>i.id)}),yi=a.createSelector((e,t)=>t?ie.select(e,t):Ke.select(e)),ki=a.createSelector((e,t)=>v.select(e,t)),wi=a.createSelector((e,t)=>t?!!S.select(e,t):Ze.select(e)),Ei=a.createSelector((e,t)=>{if(!t)return Ve.select(e);const r=S.select(e,t)?.settings??[],s=se.select(e,t),i=r.find(c=>c.path==="model.providerDefaults")?.value,o=i&&typeof i=="object"?i[s]:void 0;if(typeof o=="string")return o;const l=r.find(c=>c.path==="model.default")?.value;return typeof l=="string"?l:""}),Ci=a.createSelector((e,t)=>t?Object.fromEntries(Object.entries(e.providerModels?.byWorkspaceId?.[t]??{}).flatMap(([r,s])=>s.warning?[[r,s.warning]]:[])):Be.select(e)),Ri=a.createSelector((e,t)=>t?Object.fromEntries(Object.entries(e.providerModels?.byWorkspaceId?.[t]??{}).map(([r,s])=>[r,s.stale===!0])):Ue.select(e)),Pi=a.createSelector((e,t)=>t?Object.fromEntries(Object.entries(e.providerModels?.byWorkspaceId?.[t]??{}).flatMap(([r,s])=>s.warning&&s.warningKind?[[r,s.warningKind]]:[])):He.select(e)),Mi=a.createSelector((e,t,r)=>{if(!r)return Qe.select(e,t);const s=q.select(e,r),i=S.select(e,r);return ie.select(e,r).filter(o=>o!==t&&(s[o]||i?.catalog.providers.find(l=>l.id===o)?.canBeDisabled===!1)&&Ye(o,i?.readiness[o]?.authenticated))}),Ti=a.createSelector((e,t)=>t?S.select(e,t)?.readiness??{}:U.select(e)),rr={},Ii=a.createSelector(e=>e.providerSettings?.profiles?.status??rr),Z={},sr=a.createSelector((e,t)=>t?e.providerCatalog?.byWorkspaceId?.[t]?.mcpServers??[]:e.mcpSettings.servers),Fi=a.createSelector((e,t,r)=>{const s=e.providerCatalog?.byWorkspaceId?.[t];return s?s.mcpServers?.find(i=>i.id===r)?.name:e.providerCatalog?.mcpServerNamesByWorkspaceId?.[t]?.[r]}),Di=a.createSelector(e=>e.mcpSettings.loading),Li=a.createSelector(e=>e.mcpSettings.error),Oi=a.createSelector(e=>e.mcpSettings.mutationError??null),xi=a.createSelector(e=>e.mcpSettings.enabled),ir=a.createSelector(e=>e.mcpSettings.disabledServers),ar=a.createSelector(e=>e.mcpSettings.statusMap),nr=a.createSelector(e=>e.mcpSettings.toolsMap),or=a.createSelector((e,t)=>{if(!t)return e.mcpSettings.errorMessages;const r=e.providerCatalog?.byWorkspaceId?.[t],s=new Map(r?.mcpServers?.map(i=>[i.id,w(i)])??[]);return Object.fromEntries((r?.mcpStatuses??[]).flatMap(i=>{const o=s.get(i.serverId);return o&&i.lastError?[[o,i.lastError]]:[]}))}),cr=a.createSelector((e,t)=>t?e.mcpSettings.byWorkspaceId[t]?.disabledServers??Z:Z),Wi=a.createSelector((e,t)=>Object.keys(cr.select(e,t))),Ni=a.createSelector(e=>{const t=sr.select(e),r=ar.select(e),s=nr.select(e),i=ir.select(e),o=or.select(e);return t.map(l=>{const c=w(l)in i,g=s[w(l)]||[];let f=r[w(l)]||"disconnected";return c&&(f="disabled"),{...l,disabled:c,status:f,tools:g,toolCount:g.length,errorMessage:o[w(l)]}})});a.createSelector((e,t)=>e.mcpSettings.errorMessages[t]);const Gi=a.createSelector(e=>e.mcpSettings.lastImportedCount),Vi=a.createSelector(e=>e.mcpSettings.advancedSaveStatus),Bi=a.createSelector(e=>e.mcpSettings.advancedSaveError);function h(e){return{category:"settings",...e}}const T=[{id:"new-workspace",tab:"",label:"New workspace",route:"/workspace/new",category:"navigation",description:"Create-workspace flow."},h({id:"utility-default-model",tab:"providers",hashAliases:["utility-default-model","default-model","quickActions.defaultModel","backgroundAgents.defaultModel"],scrollSelector:"#utility-default-model",highlightSelector:'[data-highlight-id="utility-default-model"]',label:"Settings: Default model",route:"/settings?tab=providers#utility-default-model",description:"Default AI behavior model selection."}),h({id:"global-instructions",tab:"agent-behavior",hashAliases:["global-instructions","agents","specialists","all-agents"],scrollSelector:"#global-instructions",highlightSelector:'[data-highlight-id="global-instructions"]',label:"Settings: Agent Behavior",route:"/settings?tab=agent-behavior#global-instructions",description:"Global agent instructions and defaults."}),h({id:"create-specialist",tab:"specialists",hashAliases:["create-specialist"],scrollSelector:"#create-specialist",highlightSelector:'[data-highlight-id="create-specialist"]',label:"Settings: Create specialist",route:"/settings?tab=specialists&view=create-specialist#create-specialist",description:"Create-specialist entry point."}),h({id:"providers",tab:"providers",hashAliases:["providers"],scrollSelector:"#providers",highlightSelector:'[data-highlight-id="providers"]',label:"Settings: AI coding CLIs",route:"/settings?tab=providers#providers",description:"Provider/account selector settings."}),h({id:"integrations",tab:"connections",hashAliases:["integrations"],scrollSelector:"#integrations",highlightSelector:'[data-highlight-id="integrations"]',label:"Settings: Connections",route:"/settings?tab=connections#integrations",description:"Connected integrations settings."}),h({id:"devices",tab:"devices",hashAliases:["devices","machines"],scrollSelector:"#devices",highlightSelector:"#devices",label:"Settings: Machines",route:"/settings?tab=devices#devices",description:"Saved remote machine settings."}),h({id:"mobile",tab:"mobile",hashAliases:["mobile"],scrollSelector:"#mobile",highlightSelector:'[data-highlight-id="mobile"]',label:"Settings: Mobile",route:"/settings?tab=mobile#mobile",description:"Remote access and Intent Mobile pairing."}),h({id:"guest-sessions",tab:"collaboration",hashAliases:["collaboration","guest-sessions","sharing"],scrollSelector:"#collaboration",highlightSelector:"#collaboration",label:"Settings: Collaboration",route:"/settings?tab=collaboration#collaboration",description:"Host membership, workspace guests and joined hosts."}),h({id:"websocket-api",tab:"mobile",hashAliases:["websocket-api","remote-access"],scrollSelector:"#websocket-api",highlightSelector:'[data-highlight-id="websocket-api"]',label:"Settings: Remote Access",route:"/settings?tab=mobile#websocket-api",description:"Remote access (WebSocket API) settings."}),...[["voice","Voice Dictation","Voice dictation settings.","input"],["keyboard-shortcuts","Keyboard Shortcuts","Keyboard shortcuts reference.","input"],["autocomplete","Autocomplete","Suggest as you type: service, model and API keys.","input"],["mcp-servers","MCP Servers","MCP server configuration.","connections"],["plugins","Plugins","App-wide Agent Plugins.","connections"],["git-workspace","Git & Workspace","Git and workspace defaults.","setup"],["git","Git","Git defaults.","setup"],["shell","Shell","Shell settings.","setup"],["workspace","Workspace","Workspace defaults.","setup"],["cli-optimization","CLI Optimization","RTK/CLI optimization settings.","token-savings"],["workspace-api","Tool Output & Retention","Tool output size and retention settings.","advanced"],["notifications","Notifications","Notification preferences.","app-behavior"],["updates","Updates","Application update preferences.","app-behavior"],["open-in","Open In","External editor/app launch preferences.","app-behavior"],["github-link-action","GitHub Links","GitHub issue and pull request link behavior.","app-behavior"],["agent-features","Agent Features","Agent feature settings.","token-savings"],["font-style","Font style","Font style settings.","display"],["language","Language","Application language settings.","display"],["labs","Labs","Experimental feature switches.","advanced"],["agent-backend","Agent Backend","Agent backend settings.","performance"],["connection","Connection","Daemon connection details.","advanced"],["hardware","Hardware","Hardware integration settings.","input"],["developer","Developer","Development-only settings.","advanced"]].map(([e,t,r,s])=>h({id:e,tab:s,hashAliases:[e],scrollSelector:`#${e}`,highlightSelector:`[data-highlight-id="${e}"]`,label:`Settings: ${t}`,route:`/settings?tab=${s}#${e}`,description:r})),h({id:"appearance",tab:"display",hashAliases:["appearance","theme"],scrollSelector:"#theme",highlightSelector:'[data-highlight-id="appearance"]',label:"Settings: Appearance",route:"/settings?tab=display#theme",description:"Theme mode controls."}),...[["color-theme","Color theme","Color theme selection."],["note-font","Notes font","Notes/spec font style."],["agent-chat-font","Agent chat font","Agent chat font style."],["code-font","Code font","Code editor and diff font."]].map(([e,t,r])=>h({id:e,tab:"display",hashAliases:[e],scrollSelector:`#${e}`,highlightSelector:`[data-highlight-id="${e}"]`,label:`Settings: ${t}`,route:`/settings?tab=display#${e}`,description:r})),h({id:"general",tab:"advanced",hashAliases:["general","reset"],scrollSelector:"#reset",highlightSelector:'[data-highlight-id="general"]',label:"Settings: Advanced",route:"/settings?tab=advanced#reset",description:"Advanced settings and reset controls."}),{id:"workspace-card",tab:"",hashAliases:["workspace-card"],highlightSelector:'[data-highlight-id^="workspace-"]',label:"Workspace card",category:"workspace",description:"A workspace card on workspace list surfaces.",dynamic:!0,idPattern:"workspace-{workspaceId}"},{id:"specialist-entry",tab:"specialists",highlightSelector:'[data-highlight-id^="specialist-"]',label:"Specialist entry",route:"/settings?tab=specialists&specialist={specialistId}#specialist-{specialistId}",category:"specialist",description:"A specific specialist row in settings.",dynamic:!0,idPattern:"specialist-{specialistId}"}];function ae(e){const t=e.indexOf("#"),r=t>=0?e.slice(t+1):e;return decodeURIComponent(r.replace(/^#/,"")).trim()}function lr(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function dr(e,t){if(!t.match(/\{[^}]+\}/g)?.length)return e===t;const s=t.split(/\{[^}]+\}/g).map(lr).join("[^/]+");return new RegExp(`^${s}$`).test(e)}function ur(e){const t=ae(e);if(!t)return;const r=T.find(i=>i.id===t||i.hashAliases?.includes(t));if(r)return r;const s=T.find(i=>i.route&&i.dynamic&&i.idPattern&&dr(t,i.idPattern));return s?{...s,id:t}:void 0}function Ui(){return T.map(e=>({...e,hashAliases:e.hashAliases?[...e.hashAliases]:void 0}))}function pr(e){try{return new URL(e,"app://intent").pathname||"/"}catch{const t=e.indexOf("?"),r=e.indexOf("#");let s=e.length;return t>=0&&(s=Math.min(s,t)),r>=0&&(s=Math.min(s,r)),e.slice(0,s)||"/"}}const gr=new Set(T.flatMap(e=>e.route?[pr(e.route)]:[])),hr=[/^\/workspace\/[^/]+$/,/^\/agent\/[^/]+$/];function Hi(e){if(typeof e!="string")return!1;const t=e.trim();if(!t)return!1;if(t.startsWith("intent://"))return!0;let r,s;try{const i=new URL(t,"app://intent");if(i.protocol!=="app:")return!1;r=i.pathname||"/",s=ae(i.hash)}catch{return!1}return gr.has(r)?s?!!ur(s):!0:hr.some(i=>i.test(r))}const qi=["agentFeatures.backgroundHooks","agentFeatures.hostExec","agentFeatures.secretRequests","agentFeatures.scripts","agentFeatures.terminalAccess","agentFeatures.browserAutomation","agentFeatures.desktopControl","agentFeatures.richChatBlocks","agentFeatures.structuredQuestions","agentFeatures.attentionRequests","agentFeatures.stateSnapshot","agentFeatures.prMonitor","agentFeatures.taskGraph","agentFeatures.peerAgents","agentFeatures.mcpTools"],fr=[{path:"agentFeatures.backgroundHooks",label:()=>n.settings_agentFeatures_backgroundHooks_label(),description:()=>n.settings_agentFeatures_backgroundHooks_description(),defaultValue:!0},{path:"agentFeatures.hostExec",label:()=>n.settings_agentFeatures_hostExec_label(),description:()=>n.settings_agentFeatures_hostExec_description(),defaultValue:!0},{path:"agentFeatures.secretRequests",label:()=>n.settings_agentFeatures_secretRequests_label(),description:()=>n.settings_agentFeatures_secretRequests_description(),defaultValue:!1},{path:"agentFeatures.scripts",label:()=>n.settings_agentFeatures_scripts_label(),description:()=>n.settings_agentFeatures_scripts_description(),defaultValue:!0},{path:"agentFeatures.terminalAccess",label:()=>n.settings_agentFeatures_terminalAccess_label(),description:()=>n.settings_agentFeatures_terminalAccess_description(),defaultValue:!0},{path:"agentFeatures.browserAutomation",label:()=>n.settings_agentFeatures_browserAutomation_label(),description:()=>n.settings_agentFeatures_browserAutomation_description(),defaultValue:!0},{path:"agentFeatures.desktopControl",label:()=>n.settings_agentFeatures_desktopControl_label(),description:()=>n.settings_agentFeatures_desktopControl_description(),info:()=>n.settings_agentFeatures_desktopControl_info(),defaultValue:!0},{path:"agentFeatures.richChatBlocks",label:()=>n.settings_agentFeatures_richChatBlocks_label(),description:()=>n.settings_agentFeatures_richChatBlocks_description(),defaultValue:!0},{path:"agentFeatures.structuredQuestions",label:()=>n.settings_agentFeatures_structuredQuestions_label(),description:()=>n.settings_agentFeatures_structuredQuestions_description(),defaultValue:!0},{path:"agentFeatures.attentionRequests",label:()=>n.settings_agentFeatures_attentionRequests_label(),description:()=>n.settings_agentFeatures_attentionRequests_description(),defaultValue:!0},{path:"agentFeatures.stateSnapshot",label:()=>n.settings_agentFeatures_stateSnapshot_label(),description:()=>n.settings_agentFeatures_stateSnapshot_description(),defaultValue:!0},{path:"agentFeatures.prMonitor",label:()=>n.settings_agentFeatures_prMonitor_label(),description:()=>n.settings_agentFeatures_prMonitor_description(),defaultValue:!0},{path:"agentFeatures.taskGraph",label:()=>n.settings_agentFeatures_taskGraph_label(),description:()=>n.settings_agentFeatures_taskGraph_description(),defaultValue:!0},{path:"agentFeatures.peerAgents",label:()=>n.settings_agentFeatures_peerAgents_label(),description:()=>n.settings_agentFeatures_peerAgents_description(),defaultValue:!0},{path:"agentFeatures.mcpTools",label:()=>n.settings_agentFeatures_mcpTools_label(),description:()=>n.settings_agentFeatures_mcpTools_description(),defaultValue:!0}],$i=Object.fromEntries(fr.map(e=>[e.path,e.defaultValue]));export{Pi as $,Hi as A,Xs as B,Ct as C,zr as D,Jt as E,fr as F,J as G,_t as H,fi as I,gi as J,Et as K,ur as L,Ps as M,Ks as N,Si as O,Xt as P,bi as Q,Zr as R,A as S,es as T,yi as U,se as V,q as W,Ai as X,ie as Y,re as Z,Ri as _,Je as a,sr as a$,Ci as a0,Mi as a1,Ti as a2,wi as a3,Ei as a4,ki as a5,Jr as a6,rs as a7,Es as a8,ks as a9,qr as aA,Lr as aB,xr as aC,Vr as aD,Wr as aE,Gr as aF,Or as aG,Hr as aH,Dr as aI,$r as aJ,ps as aK,Qt as aL,Zt as aM,ui as aN,li as aO,ds as aP,us as aQ,di as aR,Bi as aS,Vi as aT,ir as aU,xi as aV,Li as aW,or as aX,Gi as aY,Di as aZ,Oi as a_,As as aa,ys as ab,ws as ac,_s as ad,ci as ae,ls as af,fs as ag,ns as ah,js as ai,os as aj,cs as ak,Qr as al,Xr as am,H as an,it as ao,dt as ap,ut as aq,X as ar,lt as as,at,st as au,ot as av,ct as aw,Nr as ax,Br as ay,Ur as az,$i as b,Ni as b0,ar as b1,nr as b2,oi as b3,is as b4,Ii as b5,mi as b6,St as b7,bs as b8,ms as b9,Fi as bA,Zs as bB,Ys as bC,ni as bD,Ut as bE,ii as bF,Ms as bG,Rs as bH,Ts as bI,Cs as bJ,jt as bK,vs as bL,hs as ba,Ss as bb,as as bc,gs as bd,v as be,ts as bf,Yr as bg,$s as bh,xs as bi,Hs as bj,qs as bk,Ns as bl,Bs as bm,Vs as bn,Ws as bo,Os as bp,Ls as bq,zs as br,Ds as bs,Gs as bt,Us as bu,S as bv,tr as bw,_i as bx,vi as by,Wi as bz,qi as c,hi as d,ai as e,Rt as f,It as g,Qs as h,Js as i,ss as j,ft as k,ht as l,ti as m,Ui as n,Is as o,Fs as p,jr as q,Kr as r,ri as s,si as t,rt as u,wt as v,er as w,ei as x,pi as y,K as z};
@@ -1 +1 @@
1
- import{t as pt,bo as S,bw as bt,bq as Pt,b as Ct,bm as vt,bs as h}from"./ClpAEjbe.js";import{bs as kt,ca as K,aD as n,c9 as i,a7 as E,ay as _,W as w,bn as $t,bS as yt,aA as B,aB as St}from"./CJxGDkBm.js";import{i as L}from"./wmcYjLAa.js";import{k as _t}from"./Xh71Wbuh.js";import{c as wt}from"./DSqSJXGX.js";import{t as Bt}from"./D2MmXC4A.js";import{Jq as u,eJ as It,eK as Wt,J_ as Tt,Kd as Ut,K3 as Rt,vu as Dt,oq as J}from"./CpP1PKzF.js";import{g as At}from"./BrMXrCxP.js";import{bL as Ft,bN as Ht,dE as Nt}from"./D9Ykl3eH.js";import{C as f}from"./DypB-Dwi.js";import"./C1elIQnx.js";import"./CnGVh7I3.js";import"./WSVFXKpL.js";import{bg as qt}from"./CtJxHvGv.js";import"./CPDV_dyu.js";/* empty css */import{T as Mt}from"./QMZYeDiU.js";import"./B5wwCKYG.js";import{M as xt}from"./Dd_i7pU1.js";import{V as Kt}from"./Cp06wewE.js";import{O as Et}from"./KwzSRF2d.js";import{bT as Lt,bN as Jt,b8 as Vt}from"./DJPMh7Pg.js";import{i as Ot}from"./H2jLkRRS.js";var Gt=St("<!> <!>",1);function jt(I,p){if(new.target)return pt({component:jt,...I});kt(p,!0);const W=()=>h(et,"$workspace",l),P=()=>h(Y,"$ftChanges$",l),V=()=>h(Z,"$ftCommits$",l),T=()=>h(Q,"$foldUnchanged",l),U=()=>h(z,"$lineWrapping",l),R=()=>h(X,"$diffSideBySide",l),[l,O]=Pt(),G=t=>{Kt(t,{embedded:!0,get foldEnabled(){return T()},onToggleFold:()=>u.dispatch(Rt()),get wrapEnabled(){return U()},onToggleWrap:()=>u.dispatch(Ut()),get splitEnabled(){return R()},onToggleSplit:()=>u.dispatch(Tt())})},j=t=>{var e=Gt(),r=_(e);{let m=i(()=>vt.layout_diffHeader_goToFile_tooltip());wt(r,()=>xt,(y,ht)=>{ht(y,{get icon(){return qt},get label(){return n(m)},onclick:zt=>ft()})})}var s=yt(r,2);{var d=m=>{Et(m,{get filePath(){return n(k)},get workspaceId(){return o()},isDirectory:!1,embedded:!0,get workspaceFolderPath(){return n(v)}})};L(s,m=>{n(k)&&m(d)})}w(t,e)},z=Lt(),Q=Jt(),X=Vt();let a=S(p,"tab",7),o=S(p,"workspaceId",7),b=S(p,"isActive",7);const C=Bt(()=>o()),Y=Ft(C),Z=Ht(C),tt=new Set([f.Committed,f.Pushed,f.PullRequest,f.Merged,f.Trunk]),D=At(),et=Nt(C),nt=i(()=>W()?.worktreePath||W()?.repositoryPath||void 0);K(()=>{const t=o();if(!(!b()||!t||n(c)))return u.dispatch(It(t,"all")),()=>u.dispatch(Wt(t,"all"))});const c=i(()=>a().data?.gitRootId),A=i(()=>a().data?.gitRootPath),v=i(()=>n(A)||n(nt)),k=i(()=>a().diffPath&&n(v)?Ot(a().diffPath)?a().diffPath:`${n(v)}/${a().diffPath}`:null);function F(t,e){return!!(t.file===e||t.relativePath===e||t.relativePath&&e.endsWith("/"+t.relativePath)||t.file&&e.endsWith("/"+t.file)||t.relativePath&&t.relativePath.endsWith("/"+e)||t.file&&t.file.endsWith("/"+e))}function H(t){return!t||n(c)?null:P().find(e=>F(e,t)&&(e.stage==="staged"||e.stage==="unstaged"))??null}function at(t){if(!t||n(c))return null;let e=null,r=-1/0;for(const s of P()){if(!F(s,t)||!tt.has(s.stage)||!s.commitHash)continue;const d=s.attribution?.timestamp??0;d>=r&&(e=s,r=d)}return e}function it(t,e){return!!(t===e||e.endsWith("/"+t)||t.endsWith("/"+e))}function rt(t){if(!t||n(c))return null;for(const e of V())if(e?.hash&&e.files?.some(r=>r?.path&&it(r.path,t)))return{id:`diff-${t}-${e.hash}`,file:t,relativePath:t,status:"modified",stage:f.Committed,commitHash:e.hash,stats:{additions:0,deletions:0},attribution:{timestamp:e.timestamp??Date.now()}};return null}const N=i(()=>a().diffPath?H(a().diffPath):null),st=i(()=>{if(!a().diffPath)return 0;const t=H(a().diffPath),e=P().length;if(t){const r=t.stage==="staged"?1:t.stage==="unstaged"?2:3,s=(t.stats?.additions||0)+(t.stats?.deletions||0),d=t.attribution?.timestamp?t.attribution.timestamp%1e5:0;return r*1e6+s*1e3+d+e}return e}),g=i(()=>a().data?.change),q=i(()=>a().data?.branchBaseRef),M=i(()=>a().data?.branchBaseCommitSha),ot=i(()=>!!(n(q)||n(M))),$=i(()=>{if(n(g)?.commitHash)return n(g);if(n(N))return n(N);if(n(ot)&&n(g))return n(g);const t=at(a().diffPath??null);if(t)return t;const e=rt(a().diffPath??null);return e||(n(g)?n(g):{id:`diff-${a().diffPath}`,file:a().diffPath||"",relativePath:a().diffPath||"",status:"modified",stage:f.Unstaged,stats:{additions:0,deletions:0},attribution:{timestamp:Date.now()}})});function ft(t){if(!a().diffPath)return;const r={type:"file",title:a().diffPath.split("/").pop()||a().diffPath,closable:!0,filePath:n(k)||a().diffPath,workspaceId:o()};u.dispatch(Dt(o(),r))}K(()=>{!D||!b()||D.registerActions({display:G,actions:j})});function dt(t,e){u.dispatch(J(o(),crypto.randomUUID(),{kind:"stageHunk",filePath:t,hunkPatch:e,source:"diff"}))}function ut(t,e){u.dispatch(J(o(),crypto.randomUUID(),{kind:"unstageHunk",filePath:t,hunkPatch:e,source:"diff"}))}var ct={get tab(){return a()},set tab(t){a(t),B()},get workspaceId(){return o()},set workspaceId(t){o(t),B()},get isActive(){return b()},set isActive(t){b(t),B()},$set:bt,$on:(t,e)=>Ct(p,t,e)},x=E(),mt=_(x);{var lt=t=>{var e=E(),r=_(e);_t(r,()=>a().diffPath,s=>{{let d=i(()=>R()?"split":"unified"),m=i(()=>!n(c)&&n($).stage===f.Unstaged?dt:void 0),y=i(()=>!n(c)&&n($).stage===f.Staged?ut:void 0);Mt(s,{get active(){return b()},get change(){return n($)},get workspaceId(){return o()},get viewMode(){return n(d)},get foldUnchanged(){return T()},get lineWrapping(){return U()},get refreshKey(){return n(st)},get branchBaseRef(){return n(q)},get branchBaseCommitSha(){return n(M)},get gitRootId(){return n(c)},get gitRootPath(){return n(A)},get onStageHunk(){return n(m)},get onUnstageHunk(){return n(y)}})}}),w(t,e)};L(mt,t=>{a().diffPath&&t(lt)})}w(I,x);var gt=$t(ct);return O(),gt}export{jt as default};
1
+ import{t as pt,bo as S,bw as bt,bq as Pt,b as Ct,bm as vt,bs as h}from"./ClpAEjbe.js";import{bs as kt,ca as K,aD as n,c9 as i,a7 as E,ay as _,W as w,bn as $t,bS as yt,aA as B,aB as St}from"./CJxGDkBm.js";import{i as L}from"./wmcYjLAa.js";import{k as _t}from"./Xh71Wbuh.js";import{c as wt}from"./DSqSJXGX.js";import{t as Bt}from"./D2MmXC4A.js";import{Jq as u,eJ as It,eK as Wt,J_ as Tt,Kd as Ut,K3 as Rt,vu as Dt,oq as J}from"./CpP1PKzF.js";import{g as At}from"./BrMXrCxP.js";import{bL as Ft,bN as Ht,dE as Nt}from"./D9Ykl3eH.js";import{C as f}from"./DypB-Dwi.js";import"./OusZ11tk.js";import"./CnGVh7I3.js";import"./WSVFXKpL.js";import{bg as qt}from"./CtJxHvGv.js";import"./CPDV_dyu.js";/* empty css */import{T as Mt}from"./Cv2q5gkL.js";import"./B5wwCKYG.js";import{M as xt}from"./Dd_i7pU1.js";import{V as Kt}from"./Cp06wewE.js";import{O as Et}from"./Dkvzw9dt.js";import{bT as Lt,bN as Jt,b8 as Vt}from"./Bxb8LI6C.js";import{i as Ot}from"./H2jLkRRS.js";var Gt=St("<!> <!>",1);function jt(I,p){if(new.target)return pt({component:jt,...I});kt(p,!0);const W=()=>h(et,"$workspace",l),P=()=>h(Y,"$ftChanges$",l),V=()=>h(Z,"$ftCommits$",l),T=()=>h(Q,"$foldUnchanged",l),U=()=>h(z,"$lineWrapping",l),R=()=>h(X,"$diffSideBySide",l),[l,O]=Pt(),G=t=>{Kt(t,{embedded:!0,get foldEnabled(){return T()},onToggleFold:()=>u.dispatch(Rt()),get wrapEnabled(){return U()},onToggleWrap:()=>u.dispatch(Ut()),get splitEnabled(){return R()},onToggleSplit:()=>u.dispatch(Tt())})},j=t=>{var e=Gt(),r=_(e);{let m=i(()=>vt.layout_diffHeader_goToFile_tooltip());wt(r,()=>xt,(y,ht)=>{ht(y,{get icon(){return qt},get label(){return n(m)},onclick:zt=>ft()})})}var s=yt(r,2);{var d=m=>{Et(m,{get filePath(){return n(k)},get workspaceId(){return o()},isDirectory:!1,embedded:!0,get workspaceFolderPath(){return n(v)}})};L(s,m=>{n(k)&&m(d)})}w(t,e)},z=Lt(),Q=Jt(),X=Vt();let a=S(p,"tab",7),o=S(p,"workspaceId",7),b=S(p,"isActive",7);const C=Bt(()=>o()),Y=Ft(C),Z=Ht(C),tt=new Set([f.Committed,f.Pushed,f.PullRequest,f.Merged,f.Trunk]),D=At(),et=Nt(C),nt=i(()=>W()?.worktreePath||W()?.repositoryPath||void 0);K(()=>{const t=o();if(!(!b()||!t||n(c)))return u.dispatch(It(t,"all")),()=>u.dispatch(Wt(t,"all"))});const c=i(()=>a().data?.gitRootId),A=i(()=>a().data?.gitRootPath),v=i(()=>n(A)||n(nt)),k=i(()=>a().diffPath&&n(v)?Ot(a().diffPath)?a().diffPath:`${n(v)}/${a().diffPath}`:null);function F(t,e){return!!(t.file===e||t.relativePath===e||t.relativePath&&e.endsWith("/"+t.relativePath)||t.file&&e.endsWith("/"+t.file)||t.relativePath&&t.relativePath.endsWith("/"+e)||t.file&&t.file.endsWith("/"+e))}function H(t){return!t||n(c)?null:P().find(e=>F(e,t)&&(e.stage==="staged"||e.stage==="unstaged"))??null}function at(t){if(!t||n(c))return null;let e=null,r=-1/0;for(const s of P()){if(!F(s,t)||!tt.has(s.stage)||!s.commitHash)continue;const d=s.attribution?.timestamp??0;d>=r&&(e=s,r=d)}return e}function it(t,e){return!!(t===e||e.endsWith("/"+t)||t.endsWith("/"+e))}function rt(t){if(!t||n(c))return null;for(const e of V())if(e?.hash&&e.files?.some(r=>r?.path&&it(r.path,t)))return{id:`diff-${t}-${e.hash}`,file:t,relativePath:t,status:"modified",stage:f.Committed,commitHash:e.hash,stats:{additions:0,deletions:0},attribution:{timestamp:e.timestamp??Date.now()}};return null}const N=i(()=>a().diffPath?H(a().diffPath):null),st=i(()=>{if(!a().diffPath)return 0;const t=H(a().diffPath),e=P().length;if(t){const r=t.stage==="staged"?1:t.stage==="unstaged"?2:3,s=(t.stats?.additions||0)+(t.stats?.deletions||0),d=t.attribution?.timestamp?t.attribution.timestamp%1e5:0;return r*1e6+s*1e3+d+e}return e}),g=i(()=>a().data?.change),q=i(()=>a().data?.branchBaseRef),M=i(()=>a().data?.branchBaseCommitSha),ot=i(()=>!!(n(q)||n(M))),$=i(()=>{if(n(g)?.commitHash)return n(g);if(n(N))return n(N);if(n(ot)&&n(g))return n(g);const t=at(a().diffPath??null);if(t)return t;const e=rt(a().diffPath??null);return e||(n(g)?n(g):{id:`diff-${a().diffPath}`,file:a().diffPath||"",relativePath:a().diffPath||"",status:"modified",stage:f.Unstaged,stats:{additions:0,deletions:0},attribution:{timestamp:Date.now()}})});function ft(t){if(!a().diffPath)return;const r={type:"file",title:a().diffPath.split("/").pop()||a().diffPath,closable:!0,filePath:n(k)||a().diffPath,workspaceId:o()};u.dispatch(Dt(o(),r))}K(()=>{!D||!b()||D.registerActions({display:G,actions:j})});function dt(t,e){u.dispatch(J(o(),crypto.randomUUID(),{kind:"stageHunk",filePath:t,hunkPatch:e,source:"diff"}))}function ut(t,e){u.dispatch(J(o(),crypto.randomUUID(),{kind:"unstageHunk",filePath:t,hunkPatch:e,source:"diff"}))}var ct={get tab(){return a()},set tab(t){a(t),B()},get workspaceId(){return o()},set workspaceId(t){o(t),B()},get isActive(){return b()},set isActive(t){b(t),B()},$set:bt,$on:(t,e)=>Ct(p,t,e)},x=E(),mt=_(x);{var lt=t=>{var e=E(),r=_(e);_t(r,()=>a().diffPath,s=>{{let d=i(()=>R()?"split":"unified"),m=i(()=>!n(c)&&n($).stage===f.Unstaged?dt:void 0),y=i(()=>!n(c)&&n($).stage===f.Staged?ut:void 0);Mt(s,{get active(){return b()},get change(){return n($)},get workspaceId(){return o()},get viewMode(){return n(d)},get foldUnchanged(){return T()},get lineWrapping(){return U()},get refreshKey(){return n(st)},get branchBaseRef(){return n(q)},get branchBaseCommitSha(){return n(M)},get gitRootId(){return n(c)},get gitRootPath(){return n(A)},get onStageHunk(){return n(m)},get onUnstageHunk(){return n(y)}})}}),w(t,e)};L(mt,t=>{a().diffPath&&t(lt)})}w(I,x);var gt=$t(ct);return O(),gt}export{jt as default};