@intent-hq/web 2.348.0 → 2.349.0

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 (268) hide show
  1. package/package.json +1 -1
  2. package/web/app/immutable/chunks/{0Vx84DUP.js → -QpofkRx.js} +25 -25
  3. package/web/app/immutable/chunks/{Cn_Rbwyb.js → 0Ys9jF9i.js} +1 -1
  4. package/web/app/immutable/chunks/{Bqhh4FH7.js → 0vrZgCji.js} +1 -1
  5. package/web/app/immutable/chunks/{2F-Ze5uG.js → 2CGxw1E-.js} +1 -1
  6. package/web/app/immutable/chunks/{hW3N4eWd.js → 5SqYTp29.js} +1 -1
  7. package/web/app/immutable/chunks/{CIvmWNlW.js → 9YwuUfsE.js} +1 -1
  8. package/web/app/immutable/chunks/{DR_T7fiX.js → B0rIXGc4.js} +1 -1
  9. package/web/app/immutable/chunks/{BfyBZYmK.js → B1yX4XGq.js} +1 -1
  10. package/web/app/immutable/chunks/{CB8I0xcf.js → B21_6eW6.js} +1 -1
  11. package/web/app/immutable/chunks/{D6EREClH.js → B2eAyNSi.js} +1 -1
  12. package/web/app/immutable/chunks/{CBiHrObN.js → B3RsHzWp.js} +1 -1
  13. package/web/app/immutable/chunks/{Cy-Gmjfw.js → B3SGnWra.js} +1 -1
  14. package/web/app/immutable/chunks/{CFnuU2Q9.js → B4CR5dfb.js} +1 -1
  15. package/web/app/immutable/chunks/{Btz71F4v.js → B51DLOiX.js} +1 -1
  16. package/web/app/immutable/chunks/{Bbk1k0zD.js → B5G4SPkG.js} +1 -1
  17. package/web/app/immutable/chunks/{3eJAoKag.js → B7Df-Pbj.js} +2 -2
  18. package/web/app/immutable/chunks/{COcWmgqo.js → B7lF313M.js} +1 -1
  19. package/web/app/immutable/chunks/{BWBs_VhF.js → B8MtVUO1.js} +1 -1
  20. package/web/app/immutable/chunks/{DIaPAOHO.js → B9CbdVRS.js} +1 -1
  21. package/web/app/immutable/chunks/{Fz0URFlj.js → B9O5QYHa.js} +1 -1
  22. package/web/app/immutable/chunks/{Qz-8JMY9.js → B9lVck2z.js} +1 -1
  23. package/web/app/immutable/chunks/{B69VjfVW.js → BFU2DTxE.js} +1 -1
  24. package/web/app/immutable/chunks/{CGw07Xyz.js → BFllbeCZ.js} +1 -1
  25. package/web/app/immutable/chunks/{3Y6lb7OZ.js → BHeDLdQn.js} +1 -1
  26. package/web/app/immutable/chunks/{CMgf2JhK.js → BHqqRyT8.js} +1 -1
  27. package/web/app/immutable/chunks/{gd66hMGv.js → BIBA0Biz.js} +1 -1
  28. package/web/app/immutable/chunks/{C8eS8Wxk.js → BJbIj2f5.js} +3 -3
  29. package/web/app/immutable/chunks/{BB2E6zUl.js → BJlw6wnz.js} +1 -1
  30. package/web/app/immutable/chunks/{CV2DFyPr.js → BJm_eT-U.js} +1 -1
  31. package/web/app/immutable/chunks/{COEzShcb.js → BKawFF96.js} +2 -2
  32. package/web/app/immutable/chunks/BKdLSL00.js +1 -0
  33. package/web/app/immutable/chunks/{BCiuPd8v.js → BLAOZHWQ.js} +1 -1
  34. package/web/app/immutable/chunks/{BeIO7jOE.js → BLLsZVvW.js} +1 -1
  35. package/web/app/immutable/chunks/{CipMzp9h.js → BLOjz32P.js} +1 -1
  36. package/web/app/immutable/chunks/{DNIjwT-T.js → BMOxNEff.js} +1 -1
  37. package/web/app/immutable/chunks/{mSFHDc3j.js → BNS1LCAy.js} +1 -1
  38. package/web/app/immutable/chunks/{wm0Oy5pp.js → BNodOXul.js} +1 -1
  39. package/web/app/immutable/chunks/{C0OVkc7f.js → BPrwAqEs.js} +1 -1
  40. package/web/app/immutable/chunks/{BRxcN_af.js → BRPmfbNP.js} +1 -1
  41. package/web/app/immutable/chunks/{ShK1ywMo.js → BRadcq2w.js} +2 -2
  42. package/web/app/immutable/chunks/{B_82dd46.js → BRomtsr7.js} +1 -1
  43. package/web/app/immutable/chunks/{DsM8cZvP.js → BTHEWI_S.js} +1 -1
  44. package/web/app/immutable/chunks/{BnbzkcOJ.js → BTUjIyAV.js} +1 -1
  45. package/web/app/immutable/chunks/{BNYHFEBz.js → BWzmS9rr.js} +1 -1
  46. package/web/app/immutable/chunks/{DP4AQNt-.js → BYBv_fLl.js} +3 -3
  47. package/web/app/immutable/chunks/{B0wbZnxi.js → B_Tk6TVS.js} +1 -1
  48. package/web/app/immutable/chunks/{CEw_Ojs2.js → BaV_HcgG.js} +1 -1
  49. package/web/app/immutable/chunks/{C4rFO2Hf.js → Baz0g_kI.js} +1 -1
  50. package/web/app/immutable/chunks/{kVzVNgmU.js → Bb5T6-Tv.js} +2 -2
  51. package/web/app/immutable/chunks/{DAXBrrD-.js → BbgSAX3i.js} +1 -1
  52. package/web/app/immutable/chunks/{-dJluFvm.js → BcDnMnye.js} +1 -1
  53. package/web/app/immutable/chunks/{DDLB_hVd.js → BdyAQuf8.js} +1 -1
  54. package/web/app/immutable/chunks/{7Kg0aRC7.js → BdzBn7bA.js} +1 -1
  55. package/web/app/immutable/chunks/{CUFDAb6B.js → BeCIalNK.js} +1 -1
  56. package/web/app/immutable/chunks/{DNhivPW8.js → BeQfIbwM.js} +1 -1
  57. package/web/app/immutable/chunks/{CojufscG.js → BfHcmF2O.js} +1 -1
  58. package/web/app/immutable/chunks/{CWKqJsJy.js → BgUSjvxc.js} +1 -1
  59. package/web/app/immutable/chunks/{CsKSizCz.js → BjFyT_W2.js} +1 -1
  60. package/web/app/immutable/chunks/{C8vhldb0.js → Bjp6Z7YT.js} +1 -1
  61. package/web/app/immutable/chunks/{4juZDnmT.js → Bkf7F_Qx.js} +1 -1
  62. package/web/app/immutable/chunks/{Bo8Vb7mw.js → BmagX6n5.js} +1 -1
  63. package/web/app/immutable/chunks/BnJDHHUb.js +1 -0
  64. package/web/app/immutable/chunks/{CEixATbX.js → Bpb2sW6o.js} +1 -1
  65. package/web/app/immutable/chunks/{CY_11EtD.js → BpftDedA.js} +1 -1
  66. package/web/app/immutable/chunks/{DuncjXt7.js → BqobArwh.js} +1 -1
  67. package/web/app/immutable/chunks/{8-qXyFVf.js → Bsismerr.js} +1 -1
  68. package/web/app/immutable/chunks/{BFnV2iJZ.js → BtKOOSsW.js} +1 -1
  69. package/web/app/immutable/chunks/{IYJiuR5Y.js → Bu9v967D.js} +1 -1
  70. package/web/app/immutable/chunks/{CcJbyRBU.js → Bw5h0b4B.js} +1 -1
  71. package/web/app/immutable/chunks/{BHS_T8V0.js → Bw6C51Z8.js} +1 -1
  72. package/web/app/immutable/chunks/{Bi4olNhp.js → BwUnz25X.js} +1 -1
  73. package/web/app/immutable/chunks/{CHK9comt.js → BwYW1dkK.js} +1 -1
  74. package/web/app/immutable/chunks/{ADSB-roI.js → By_us5QF.js} +1 -1
  75. package/web/app/immutable/chunks/{C8aWNHHq.js → BzXXtRZY.js} +2 -2
  76. package/web/app/immutable/chunks/{BZMcByQ2.js → C-enyvpk.js} +1 -1
  77. package/web/app/immutable/chunks/{DvfHX1n9.js → C-vkWK8U.js} +1 -1
  78. package/web/app/immutable/chunks/{B5varbso.js → C-wtKDF4.js} +1 -1
  79. package/web/app/immutable/chunks/{Cy8AeYBK.js → C17Klvq4.js} +1 -1
  80. package/web/app/immutable/chunks/{CoHCPcUH.js → C1HHC_7R.js} +1 -1
  81. package/web/app/immutable/chunks/{DHO9Wxu6.js → C20jcbNk.js} +1 -1
  82. package/web/app/immutable/chunks/{D8a7_5Ny.js → C2XB0GY0.js} +1 -1
  83. package/web/app/immutable/chunks/{DsQW_Oo3.js → C5uQZx4q.js} +1 -1
  84. package/web/app/immutable/chunks/{CIjm5Ho8.js → C6liPF0f.js} +1 -1
  85. package/web/app/immutable/chunks/{DVeWWknf.js → C73NY2AB.js} +1 -1
  86. package/web/app/immutable/chunks/{hwOnI0Qg.js → C7Wb4_Fy.js} +1 -1
  87. package/web/app/immutable/chunks/{n7G96yg-.js → C8_8H2HU.js} +2 -2
  88. package/web/app/immutable/chunks/{B5o_1DGD.js → C9qO9uPq.js} +1 -1
  89. package/web/app/immutable/chunks/{CpXOs3du.js → CA0nf0gO.js} +1 -1
  90. package/web/app/immutable/chunks/{BfuGl5Yh.js → CAKCzVLn.js} +1 -1
  91. package/web/app/immutable/chunks/{Dl2IplSW.js → CCoYF4yh.js} +1 -1
  92. package/web/app/immutable/chunks/{VlCONpJu.js → CE90SUHM.js} +3 -3
  93. package/web/app/immutable/chunks/{SK6qKYG6.js → CESQT1SZ.js} +1 -1
  94. package/web/app/immutable/chunks/{DmpGcxj7.js → CFPsFOEM.js} +1 -1
  95. package/web/app/immutable/chunks/{fZqCaChB.js → CHJZj-fd.js} +1 -1
  96. package/web/app/immutable/chunks/{D10dSkvY.js → CIOLxD2z.js} +1 -1
  97. package/web/app/immutable/chunks/{DGD-U5Bo.js → CJyP11U5.js} +1 -1
  98. package/web/app/immutable/chunks/{DTMC7Bz7.js → CM7GBUHK.js} +1 -1
  99. package/web/app/immutable/chunks/{BJx6o7Ck.js → CMDErhcM.js} +1 -1
  100. package/web/app/immutable/chunks/{BgBv_oVS.js → CNttRhcj.js} +1 -1
  101. package/web/app/immutable/chunks/{DbqjhTxc.js → CQk97DU6.js} +1 -1
  102. package/web/app/immutable/chunks/{ClNwh2X4.js → CQnuk5Vr.js} +1 -1
  103. package/web/app/immutable/chunks/{CMXGjuKe.js → CSHUdNXY.js} +1 -1
  104. package/web/app/immutable/chunks/CT36W95j.js +1 -0
  105. package/web/app/immutable/chunks/{DDR5ATRf.js → CTA4usCn.js} +1 -1
  106. package/web/app/immutable/chunks/{D6_UiQP2.js → CTBZsDJn.js} +1 -1
  107. package/web/app/immutable/chunks/{AsDAWvyv.js → CU5gGNrG.js} +1 -1
  108. package/web/app/immutable/chunks/{DEit52eN.js → CUyvQglq.js} +1 -1
  109. package/web/app/immutable/chunks/{hSO5HDzm.js → CVc3afbh.js} +3 -3
  110. package/web/app/immutable/chunks/{D9ypzy3_.js → CXrz3Q9k.js} +2 -2
  111. package/web/app/immutable/chunks/{DWZFevW5.js → C_p41hnk.js} +1 -1
  112. package/web/app/immutable/chunks/{BMZTgpKM.js → Ca30sbat.js} +4 -4
  113. package/web/app/immutable/chunks/{CS9rwHkY.js → Cayy-ftZ.js} +1 -1
  114. package/web/app/immutable/chunks/{Cw6V9axU.js → CbAeWmeg.js} +1 -1
  115. package/web/app/immutable/chunks/{4pmevG3-.js → CcWSFJ-V.js} +1 -1
  116. package/web/app/immutable/chunks/{BzfZfCQf.js → Ce3Ams7F.js} +1 -1
  117. package/web/app/immutable/chunks/{RFiIZzYq.js → CgQUkF-P.js} +1 -1
  118. package/web/app/immutable/chunks/{CxHceMFQ.js → Ch4_kkqM.js} +1 -1
  119. package/web/app/immutable/chunks/{DbaWuKaJ.js → CiLRDPyT.js} +1 -1
  120. package/web/app/immutable/chunks/ClBJ4iZ6.js +1 -0
  121. package/web/app/immutable/chunks/{Cr-VSi-M.js → ClKki07I.js} +1 -1
  122. package/web/app/immutable/chunks/{DJq2OFOa.js → ClQp3PSY.js} +2 -2
  123. package/web/app/immutable/chunks/{lqRrFWoK.js → CmG1GbmA.js} +1 -1
  124. package/web/app/immutable/chunks/{CWmwYDNG.js → Cn5kmzaj.js} +1 -1
  125. package/web/app/immutable/chunks/{CWFSIfn9.js → Cnd7G5VB.js} +1 -1
  126. package/web/app/immutable/chunks/{CZuVFY9F.js → Co3f6qKm.js} +1 -1
  127. package/web/app/immutable/chunks/{CZ56Xi_v.js → CtiseZKO.js} +1 -1
  128. package/web/app/immutable/chunks/{DMhC9LKs.js → CtnRAN1I.js} +1 -1
  129. package/web/app/immutable/chunks/{5zeKz6ol.js → Ctp2YBhQ.js} +1 -1
  130. package/web/app/immutable/chunks/{DhiahJsn.js → Cu-I2HTr.js} +1 -1
  131. package/web/app/immutable/chunks/{C2RkweJs.js → CuK2Zw46.js} +1 -1
  132. package/web/app/immutable/chunks/{G_T2qAAV.js → Cw3xVp_u.js} +1 -1
  133. package/web/app/immutable/chunks/{KmtLXugw.js → Cw7ROLv9.js} +1 -1
  134. package/web/app/immutable/chunks/{CT1z3096.js → CyZzaZYX.js} +1 -1
  135. package/web/app/immutable/chunks/{U7noOj6Q.js → CyhLcHZ_.js} +1 -1
  136. package/web/app/immutable/chunks/{DauNXbYG.js → Cyu02R5O.js} +1 -1
  137. package/web/app/immutable/chunks/{BkbXY6dY.js → D-5Zsg_M.js} +1 -1
  138. package/web/app/immutable/chunks/{Zbow58Yt.js → D-IkFfCX.js} +1 -1
  139. package/web/app/immutable/chunks/{DRBNGj_-.js → D0yYfpFT.js} +1 -1
  140. package/web/app/immutable/chunks/{CMlQo89-.js → D1QW0Kek.js} +1 -1
  141. package/web/app/immutable/chunks/{DlZTlvi9.js → D1WSBSxV.js} +1 -1
  142. package/web/app/immutable/chunks/{BrhnR-ID.js → D4LrTene.js} +1 -1
  143. package/web/app/immutable/chunks/{XnpstU-2.js → D4bOZmAv.js} +1 -1
  144. package/web/app/immutable/chunks/{CDbqbXk4.js → D4nVXLyT.js} +1 -1
  145. package/web/app/immutable/chunks/{B12HSa3p.js → D4r0rKFl.js} +1 -1
  146. package/web/app/immutable/chunks/{C-gBprWE.js → D8oCNZJt.js} +3 -3
  147. package/web/app/immutable/chunks/{Co17KOMP.js → D9BiEPlJ.js} +1 -1
  148. package/web/app/immutable/chunks/{DH8xXeC1.js → D9xzAHI_.js} +1 -1
  149. package/web/app/immutable/chunks/{BWVi-EJ0.js → DAPuPOz3.js} +1 -1
  150. package/web/app/immutable/chunks/{BLWZRT3p.js → DBigkuTi.js} +1 -1
  151. package/web/app/immutable/chunks/{BgQrVLPV.js → DCZ5UGy-.js} +4 -4
  152. package/web/app/immutable/chunks/{CjlaSeGJ.js → DDgbK4p-.js} +1 -1
  153. package/web/app/immutable/chunks/{CFtvHvEH.js → DFXV1wIW.js} +3 -3
  154. package/web/app/immutable/chunks/{ButPbiBY.js → DFl_UPDl.js} +1 -1
  155. package/web/app/immutable/chunks/{1EEYpvtO.js → DHClt9az.js} +1 -1
  156. package/web/app/immutable/chunks/{G3wMjZ9O.js → DJiBCJAD.js} +1 -1
  157. package/web/app/immutable/chunks/{BTR3RbCu.js → DJkyIBda.js} +1 -1
  158. package/web/app/immutable/chunks/{Cwf8tFwL.js → DJz4QGRL.js} +1 -1
  159. package/web/app/immutable/chunks/{Djp1SSHW.js → DK1WtQKR.js} +3 -3
  160. package/web/app/immutable/chunks/{De4CKtf6.js → DKkMoi_7.js} +1 -1
  161. package/web/app/immutable/chunks/{BgfkhG1x.js → DLyvIErQ.js} +1 -1
  162. package/web/app/immutable/chunks/{CizJ7rQ5.js → DMJ_kXWl.js} +1 -1
  163. package/web/app/immutable/chunks/{t1ZXWA1s.js → DNy6UqlX.js} +1 -1
  164. package/web/app/immutable/chunks/{E3Zijj0F.js → DNzfQenZ.js} +1 -1
  165. package/web/app/immutable/chunks/{BW9zIwc0.js → DOjarwrj.js} +2 -2
  166. package/web/app/immutable/chunks/{MSmU5tc0.js → DPevKyzH.js} +4 -4
  167. package/web/app/immutable/chunks/{BcqStwzo.js → DQh8iE7C.js} +1 -1
  168. package/web/app/immutable/chunks/{BLXS06dm.js → DR-BIfRu.js} +1 -1
  169. package/web/app/immutable/chunks/{Bt4kKs00.js → DSWBNeO8.js} +1 -1
  170. package/web/app/immutable/chunks/{Cmt1ga7s.js → DSWXlbxm.js} +1 -1
  171. package/web/app/immutable/chunks/{CXAeontZ.js → DThHr-M9.js} +1 -1
  172. package/web/app/immutable/chunks/{CDPO_wX9.js → DZ7i3acf.js} +1 -1
  173. package/web/app/immutable/chunks/{fsqlfl9k.js → DZVkFfA6.js} +1 -1
  174. package/web/app/immutable/chunks/DZyjGspJ.js +408 -0
  175. package/web/app/immutable/chunks/{CvWGOqV6.js → D_rHnmLE.js} +1 -1
  176. package/web/app/immutable/chunks/{DTYxFA3y.js → DbxGcVeS.js} +5 -5
  177. package/web/app/immutable/chunks/{2Lw-DzvO.js → DgOx26JX.js} +1 -1
  178. package/web/app/immutable/chunks/{C8y1Abl_.js → Dgv1nn7D.js} +1 -1
  179. package/web/app/immutable/chunks/{C9sB2HsS.js → DjhrVk-G.js} +1 -1
  180. package/web/app/immutable/chunks/{nXbhxidw.js → DkJKEJ06.js} +1 -1
  181. package/web/app/immutable/chunks/{DTG9_7_9.js → Dn-5sae7.js} +1 -1
  182. package/web/app/immutable/chunks/{DEfRWwmu.js → DozUkl5C.js} +4 -4
  183. package/web/app/immutable/chunks/{DPuyFsTN.js → DpNO08YA.js} +1 -1
  184. package/web/app/immutable/chunks/{DaYj80Qs.js → Dsa4n88U.js} +1 -1
  185. package/web/app/immutable/chunks/{BFmjOdeB.js → Du0V4O1Q.js} +1 -1
  186. package/web/app/immutable/chunks/{CrmW6ekG.js → DvvIOlOp.js} +1 -1
  187. package/web/app/immutable/chunks/{DqZi8n0P.js → DwvH6ihg.js} +1 -1
  188. package/web/app/immutable/chunks/{BXPefMgB.js → DxWZwZdx.js} +1 -1
  189. package/web/app/immutable/chunks/{CZL7jnx7.js → Dy3Z_3JL.js} +1 -1
  190. package/web/app/immutable/chunks/{Tx7lrkZd.js → Dz1riI3m.js} +1 -1
  191. package/web/app/immutable/chunks/{F8LkPv3G.js → EMb2ha4n.js} +1 -1
  192. package/web/app/immutable/chunks/{CYYhQFAn.js → ERFmpNRs.js} +1 -1
  193. package/web/app/immutable/chunks/{JyTruf69.js → EhMQOMj3.js} +1 -1
  194. package/web/app/immutable/chunks/{Be5MJLTH.js → Fq8M_XAT.js} +1 -1
  195. package/web/app/immutable/chunks/{DZjCsshe.js → GpPmLIf8.js} +1 -1
  196. package/web/app/immutable/chunks/{DG0FHH4R.js → Gq5VdtSX.js} +1 -1
  197. package/web/app/immutable/chunks/{oG2g18ab.js → Gz_dGLcm.js} +1 -1
  198. package/web/app/immutable/chunks/{BT5gFy0f.js → H0FtMLfI.js} +1 -1
  199. package/web/app/immutable/chunks/{lfjw8hnT.js → IOLk9WTr.js} +1 -1
  200. package/web/app/immutable/chunks/{Bg8aMuhb.js → JzReAjFF.js} +1 -1
  201. package/web/app/immutable/chunks/{BriVbLDU.js → K6Z_l6pq.js} +1 -1
  202. package/web/app/immutable/chunks/{0aynuPUC.js → LMNLZ1NY.js} +1 -1
  203. package/web/app/immutable/chunks/{oNe1xT1B.js → MpnM4XaB.js} +1 -1
  204. package/web/app/immutable/chunks/{Hp_5KBak.js → NBz8yHrY.js} +1 -1
  205. package/web/app/immutable/chunks/{CdfwUBxI.js → NSYi6AlX.js} +1 -1
  206. package/web/app/immutable/chunks/{0KTgJhJS.js → PysgAWQl.js} +2 -2
  207. package/web/app/immutable/chunks/{D-uVnCxU.js → QZ612f-7.js} +1 -1
  208. package/web/app/immutable/chunks/{Bj1VmHmJ.js → QiHSe7pE.js} +1 -1
  209. package/web/app/immutable/chunks/{DPiwgBxV.js → RAtz5BJe.js} +1 -1
  210. package/web/app/immutable/chunks/{C59xgYPp.js → T-UCXbJS.js} +1 -1
  211. package/web/app/immutable/chunks/{CwxaNadx.js → TRV263rQ.js} +1 -1
  212. package/web/app/immutable/chunks/{BcAaHHj_.js → UkcaZDPC.js} +1 -1
  213. package/web/app/immutable/chunks/{BILCfAeY.js → VH54VSPn.js} +1 -1
  214. package/web/app/immutable/chunks/{CDGcnZR5.js → VlylMxmA.js} +1 -1
  215. package/web/app/immutable/chunks/{DR7XO1uo.js → WvnHVkBo.js} +1 -1
  216. package/web/app/immutable/chunks/{C111lYGO.js → Y7H0Q9T9.js} +1 -1
  217. package/web/app/immutable/chunks/{CIUOjVit.js → _639dNbm.js} +1 -1
  218. package/web/app/immutable/chunks/{bp1OJROF.js → aQ1wweeY.js} +1 -1
  219. package/web/app/immutable/chunks/{BzW_8cyh.js → cjWrgEc5.js} +1 -1
  220. package/web/app/immutable/chunks/{CbsveYrS.js → e5cMrke8.js} +1 -1
  221. package/web/app/immutable/chunks/{COokUMpm.js → jeQJPkPX.js} +1 -1
  222. package/web/app/immutable/chunks/{Bi9J7ZWc.js → jvSooljK.js} +1 -1
  223. package/web/app/immutable/chunks/{wEDjfGMo.js → lbBEThX6.js} +1 -1
  224. package/web/app/immutable/chunks/{T5gyQ5hy.js → mp0CeHil.js} +1 -1
  225. package/web/app/immutable/chunks/{CP9eXkGz.js → ndibvDk5.js} +1 -1
  226. package/web/app/immutable/chunks/{tbq-oxb3.js → o3xy8uhx.js} +1 -1
  227. package/web/app/immutable/chunks/{aBVNuo2p.js → ra3YYtwY.js} +1 -1
  228. package/web/app/immutable/chunks/u2UWf7Y4.js +2 -0
  229. package/web/app/immutable/chunks/{e8UxY0el.js → u8LnBJs1.js} +1 -1
  230. package/web/app/immutable/chunks/{axg0Ndkk.js → utDAmz_H.js} +1 -1
  231. package/web/app/immutable/chunks/{BB12pUFu.js → v9ob0vCO.js} +1 -1
  232. package/web/app/immutable/chunks/{CUH-D27g.js → vxHAGoo-.js} +1 -1
  233. package/web/app/immutable/chunks/{CDkIMW0_.js → wzM9lg7r.js} +1 -1
  234. package/web/app/immutable/chunks/{B30jTa2N.js → xKssrPyL.js} +1 -1
  235. package/web/app/immutable/chunks/{gTulAhJn.js → xmUlEbpq.js} +1 -1
  236. package/web/app/immutable/chunks/{Bfg47dIU.js → ycNH2fN8.js} +1 -1
  237. package/web/app/immutable/entry/{app.Dm8wR6Rj.js → app.B5_j9_5M.js} +3 -3
  238. package/web/app/immutable/entry/start.mb9UH8tB.js +1 -0
  239. package/web/app/immutable/nodes/{0.CwEG7GgD.js → 0.DHuGbpUL.js} +1 -1
  240. package/web/app/immutable/nodes/{1.DqpCQ0oj.js → 1.WwJLTbbm.js} +1 -1
  241. package/web/app/immutable/nodes/{10.cnSuSi5Z.js → 10.CPuWWcG0.js} +1 -1
  242. package/web/app/immutable/nodes/{11.CC3qLADs.js → 11.D_8o4hy2.js} +1 -1
  243. package/web/app/immutable/nodes/{12.DSb5Am3H.js → 12.CZZ5SuMc.js} +1 -1
  244. package/web/app/immutable/nodes/{13.CCDV1skO.js → 13.BCLve-7_.js} +3 -3
  245. package/web/app/immutable/nodes/{14.DeCwT4BN.js → 14.BcQJ7NXl.js} +1 -1
  246. package/web/app/immutable/nodes/{15.k51Sg7jX.js → 15.ClAlFdyg.js} +1 -1
  247. package/web/app/immutable/nodes/{16.DpXdz_jE.js → 16.CuGK30BG.js} +1 -1
  248. package/web/app/immutable/nodes/{17.D8r3aG2k.js → 17.D7rHJr6p.js} +1 -1
  249. package/web/app/immutable/nodes/{18.BqQgYdRA.js → 18.zJtnTeH6.js} +2 -2
  250. package/web/app/immutable/nodes/{2.B6rlXtKu.js → 2.0AUsew1o.js} +4 -4
  251. package/web/app/immutable/nodes/{3.C3QOw0-1.js → 3.BAKoHu3T.js} +1 -1
  252. package/web/app/immutable/nodes/{4.w6LAxxf2.js → 4.DvgOQOfh.js} +1 -1
  253. package/web/app/immutable/nodes/{5.iL_EURMh.js → 5.B3LUyqZc.js} +1 -1
  254. package/web/app/immutable/nodes/{6.ycdot7zh.js → 6.CQSK8GlV.js} +1 -1
  255. package/web/app/immutable/nodes/{7.HdIw4pKx.js → 7.C0YP__gO.js} +1 -1
  256. package/web/app/immutable/nodes/8.CCQs8dWr.js +14 -0
  257. package/web/app/immutable/nodes/{9.gXjT92Zl.js → 9.BLr02eF_.js} +5 -5
  258. package/web/app/version.json +1 -1
  259. package/web/generated/paraglide.js +45 -45
  260. package/web/index.html +18 -18
  261. package/web/app/immutable/chunks/BQy38IRs.js +0 -1
  262. package/web/app/immutable/chunks/BvIap_Mf.js +0 -408
  263. package/web/app/immutable/chunks/CD8un3Yt.js +0 -1
  264. package/web/app/immutable/chunks/CiyfjWlF.js +0 -1
  265. package/web/app/immutable/chunks/DUCyNlB1.js +0 -1
  266. package/web/app/immutable/chunks/_EdWPAoo.js +0 -2
  267. package/web/app/immutable/entry/start.D6r48319.js +0 -1
  268. package/web/app/immutable/nodes/8.B8D0hgU8.js +0 -14
@@ -1,2 +1,2 @@
1
- import{b9 as et,an as xe,a2 as tt,as as rt,C as Ee,aR as W,J as Oe,aZ as ot,bG as Tt,aY as st,bZ as Pt,az as _t,t as ee,u as Gt,b as Lt,N as Rt,ao as Nt,aS as Et,aL as Ot,aD as Vt,A as Wt,aI as Bt,bM as Ve,a3 as jt,a_ as Ut,aj as $t,ai as Ft,ac as Ht,Z as Dt,bg as qt,U as Yt,n as Zt,bt as Kt,V as Xt}from"./DYhIMPy1.js";import{_ as ue,o as U,c as Jt,b as P,s as k,l as Qt}from"./CIyUrgF0.js";import{Z as ve}from"./1EEYpvtO.js";function er(e,r){var t=void 0,o;et(()=>{t!==(t=r())&&(o&&(xe(o),o=null),t&&(o=tt(()=>{rt(()=>t(e))})))})}function nt(e){var r,t,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(r=0;r<s;r++)e[r]&&(t=nt(e[r]))&&(o&&(o+=" "),o+=t)}else for(t in e)e[t]&&(o&&(o+=" "),o+=t);return o}function it(){for(var e,r,t=0,o="",s=arguments.length;t<s;t++)(e=arguments[t])&&(r=nt(e))&&(o&&(o+=" "),o+=r);return o}function tr(e){return typeof e=="object"?it(e):e??""}const We=[...`
1
+ import{b9 as et,an as xe,a2 as tt,as as rt,C as Ee,aR as W,J as Oe,aZ as ot,bG as Tt,aY as st,bZ as Pt,az as _t,t as ee,u as Gt,b as Lt,N as Rt,ao as Nt,aS as Et,aL as Ot,aD as Vt,A as Wt,aI as Bt,bM as Ve,a3 as jt,a_ as Ut,aj as $t,ai as Ft,ac as Ht,Z as Dt,bg as qt,U as Yt,n as Zt,bt as Kt,V as Xt}from"./DYhIMPy1.js";import{_ as ue,o as U,c as Jt,b as P,s as k,l as Qt}from"./CIyUrgF0.js";import{Z as ve}from"./DHClt9az.js";function er(e,r){var t=void 0,o;et(()=>{t!==(t=r())&&(o&&(xe(o),o=null),t&&(o=tt(()=>{rt(()=>t(e))})))})}function nt(e){var r,t,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(r=0;r<s;r++)e[r]&&(t=nt(e[r]))&&(o&&(o+=" "),o+=t)}else for(t in e)e[t]&&(o&&(o+=" "),o+=t);return o}function it(){for(var e,r,t=0,o="",s=arguments.length;t<s;t++)(e=arguments[t])&&(r=nt(e))&&(o&&(o+=" "),o+=r);return o}function tr(e){return typeof e=="object"?it(e):e??""}const We=[...`
2
2
  \r\f \v\uFEFF`];function rr(e,r,t){var o=e==null?"":""+e;if(r&&(o=o?o+" "+r:r),t){for(var s of Object.keys(t))if(t[s])o=o?o+" "+s:s;else if(o.length)for(var n=s.length,i=0;(i=o.indexOf(s,i))>=0;){var d=i+n;(i===0||We.includes(o[i-1]))&&(d===o.length||We.includes(o[d]))?o=(i===0?"":o.substring(0,i))+o.substring(d+1):i=d}}return o===""?null:o}function Be(e,r=!1){var t=r?" !important;":";",o="";for(var s of Object.keys(e)){var n=e[s];n!=null&&n!==""&&(o+=" "+s+": "+n+t)}return o}function ke(e){return e[0]!=="-"||e[1]!=="-"?e.toLowerCase():e}function or(e,r){if(r){var t="",o,s;if(Array.isArray(r)?(o=r[0],s=r[1]):o=r,e){e=String(e).replaceAll(/\/\*.*?\*\//g,"").trim();var n=!1,i=0,d=!1,m=[];o&&m.push(...Object.keys(o).map(ke)),s&&m.push(...Object.keys(s).map(ke));var u=0,f=-1;const x=e.length;for(var h=0;h<x;h++){var y=e[h];if(d?y==="/"&&e[h-1]==="*"&&(d=!1):n?n===y&&(n=!1):y==="/"&&e[h+1]==="*"?d=!0:y==='"'||y==="'"?n=y:y==="("?i++:y===")"&&i--,!d&&n===!1&&i===0){if(y===":"&&f===-1)f=h;else if(y===";"||h===x-1){if(f!==-1){var A=ke(e.substring(u,f).trim());if(!m.includes(A)){y!==";"&&h++;var C=e.substring(u,h).trim();t+=" "+C+";"}}u=h+1,f=-1}}}}return o&&(t+=Be(o)),s&&(t+=Be(s,!0)),t=t.trim(),t===""?null:t}return e==null?null:String(e)}function sr(e,r,t,o,s,n){var i=e[Ee];if(W||i!==t||i===void 0){var d=rr(t,o,n);(!W||d!==e.getAttribute("class"))&&(d==null?e.removeAttribute("class"):r?e.className=d:e.setAttribute("class",d)),e[Ee]=t}else if(n&&s!==n)for(var m in n){var u=!!n[m];(s==null||u!==!!s[m])&&e.classList.toggle(m,u)}return n}function we(e,r={},t,o){for(var s in t){var n=t[s];r[s]!==n&&(t[s]==null?e.style.removeProperty(s):e.style.setProperty(s,n,o))}}function nr(e,r,t,o){var s=e[Oe];if(W||s!==r){var n=or(r,o);(!W||n!==e.getAttribute("style"))&&(n==null?e.removeAttribute("style"):e.style.cssText=n),e[Oe]=r}else o&&(Array.isArray(o)?(we(e,t?.[0],o[0]),we(e,t?.[1],o[1],"important")):we(e,t,o));return o}function at(e,r){r?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function je(e,r){var t=!("__defaultValue"in e);!t&&e.__defaultValue===r||(e.__defaultValue=r,lt(e,!t||"__value"in e))}function lt(e,r){var t=e.__defaultValue,o=e.multiple,s=o?t??[]:null;if(!(o&&!ot(s))){var n=e.selectedIndex,i=r&&o?new Set(e.selectedOptions):null;for(var d of e.options){var m=Se(d);at(d,o?s.includes(m):st(m,t))}if(r)if(i!==null)for(d of e.options){var u=i.has(d);d.selected!==u&&(d.selected=u)}else e.selectedIndex!==n&&(e.selectedIndex=n)}}function Ce(e,r,t=!1){if(e.multiple){if(r==null)return;if(!ot(r))return Tt();for(var o of e.options)o.selected=r.includes(Se(o));return}for(o of e.options){var s=Se(o);if(st(s,r)){o.selected=!0;return}}(!t||r!==void 0)&&(e.selectedIndex=-1)}function ir(e){var r=new MutationObserver(t=>{t.every(ar)||("__defaultValue"in e&&lt(e,!1),"__value"in e&&Ce(e,e.__value))});r.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Pt(()=>{r.disconnect()})}function Se(e){return"__value"in e?e.__value:e.value}function ar(e){if(e.target.closest("selectedcontent")!==null)return!0;if(e.type==="childList"){var r=[...e.addedNodes,...e.removedNodes];return r.length>0&&r.every(t=>t.nodeName==="SELECTEDCONTENT")}return!1}const K=Symbol("class"),X=Symbol("style"),ct=Symbol("is custom element"),dt=Symbol("is html"),lr=ee?"link":"LINK",Ue=ee?"input":"INPUT",cr=ee?"option":"OPTION",ut=ee?"select":"SELECT",dr=ee?"progress":"PROGRESS";function ur(e){if(W){var r=!1,t=()=>{if(!r){if(r=!0,e.hasAttribute("value")){var o=e.value;Q(e,"value",null),e.value=o}if(e.hasAttribute("checked")){var s=e.checked;Q(e,"checked",null),e.checked=s}}};e[Zt]=t,Kt(t),Xt()}}function Q(e,r,t,o){var s=pt(e);if(W&&(s[r]=e.getAttribute(r),r==="src"||r==="srcset"||r==="href"&&e.nodeName===lr)){o||mr(e,r,t??"");return}var n=s[r];n!==(s[r]=t)&&(r==="loading"&&(e[Gt]=t),t==null?e.removeAttribute(r):typeof t!="string"&&mt(e).has(r)?e[r]=t:W&&(typeof t=="number"||typeof t=="boolean")&&n===String(t)||e.setAttribute(r,t))}function pr(e,r,t,o,s=!1,n=!1){W&&s&&e.nodeName===Ue&&("defaultValue"in t||"defaultChecked"in t||ur(e));var i=pt(e),d=i[ct],m=!i[dt];let u=W&&d;u&&Ve(!1);var f=r||{},h=e.nodeName===cr,y=e.nodeName===ut;try{for(var A in r)!(A in t)&&A[0]+A[1]!=="$$"&&(t[A]=null);t.class?t.class=tr(t.class):(o||t[K])&&(t.class=null),t[X]&&(t.style??=null);var C=mt(e);if(e.nodeName===Ue&&"type"in t&&("value"in t||"__value"in t)){var x=t.type;(x!==f.type||x===void 0&&e.hasAttribute("type"))&&(f.type=x,Q(e,"type",x,n))}for(const v in t){let g=t[v];if(h&&v==="value"&&g==null){e.value=e.__value="",f[v]=g;continue}if(v==="class"){var _=e.namespaceURI==="http://www.w3.org/1999/xhtml";sr(e,_,g,o,r?.[K],t[K]),f[v]=g,f[K]=t[K];continue}if(v==="style"){nr(e,g,r?.[X],t[X]),f[v]=g,f[X]=t[X];continue}var G=f[v];if(!(g===G&&!(g===void 0&&e.hasAttribute(v)))){f[v]=g;var w=v[0]+v[1];if(w!=="$$")if(w==="on"){const a={},z="$$"+v;let T=v.slice(2);var B=jt(T);if(Ut(T)&&(T=T.slice(0,-7),a.capture=!0),!B&&G){if(g!=null)continue;e.removeEventListener(T,f[z],a),f[z]=null}if(B)$t(T,e,g),Ft([T]);else if(g!=null){let te=function(q){f[v].call(this,q)};f[z]=Ht(T,e,te,a)}}else if(v==="style")Q(e,v,g);else if(v==="autofocus")Dt(e,!!g);else if(!d&&(v==="__value"||v==="value"&&g!=null))e.__value=g,(G==null||e.value!==g||g===0&&e.nodeName===dr)&&(e.value=g);else if(v==="selected"&&h)at(e,g);else{var S=v;m||(S=qt(S));var O=S==="defaultValue"||S==="defaultChecked";if(y&&S==="defaultValue")continue;if(g==null&&!d&&!O)if(i[v]=null,S==="value"||S==="checked"){let a=e;const z=r===void 0;if(S==="value"){let T=a.defaultValue;a.removeAttribute(S),a.defaultValue=T,a.value=a.__value=z?T:null}else{let T=a.defaultChecked;a.removeAttribute(S),a.defaultChecked=T,a.checked=z?T:!1}}else e.removeAttribute(v);else O||(d||typeof g!="string")&&C.has(S)?(e[S]=g,S in i&&(i[S]=Yt)):typeof g!="function"&&Q(e,S,g,n)}}}}finally{u&&Ve(!0)}return f}function ko(e,r,t=[],o=[],s=[],n,i=!1,d=!1){_t(s,t,o,m=>{var u=void 0,f={},h=e.nodeName===ut,y=!1;if(et(()=>{var C=r(...m.map(Vt)),x=pr(e,u,C,n,i,d);if(y&&h){var _=e;"defaultValue"in C&&je(_,C.defaultValue),"value"in C&&Ce(_,C.value)}for(let w of Object.getOwnPropertySymbols(f))C[w]||xe(f[w]);for(let w of Object.getOwnPropertySymbols(C)){var G=C[w];w.description===Wt&&(!u||G!==u[w])&&(f[w]&&xe(f[w]),f[w]=tt(()=>er(e,()=>G))),x[w]=G}u=x}),h){var A=e;rt(()=>{var C=u;"defaultValue"in C&&je(A,C.defaultValue),Ce(A,C.value,!0),ir(A)})}y=!0})}function pt(e){return e[Lt]??={[ct]:e.nodeName.includes("-"),[dt]:e.namespaceURI===Rt}}var $e=new Map;function mt(e){var r=e.getAttribute("is")||e.nodeName,t=$e.get(r);if(t)return t;$e.set(r,t=new Set);for(var o,s=e,n=Element.prototype;n!==s;){o=Bt(s);for(var i in o)o[i].set&&i!=="innerHTML"&&i!=="textContent"&&i!=="innerText"&&t.add(i);s=Ot(s)}return t}function mr(e,r,t){Nt&&(r==="srcset"&&fr(e,t)||Ae(e.getAttribute(r)??"",t)||Et(r,e.outerHTML.replace(e.innerHTML,e.innerHTML&&"..."),String(t)))}function Ae(e,r){return e===r?!0:new URL(e,document.baseURI).href===new URL(r,document.baseURI).href}function Fe(e){return e.split(",").map(r=>r.trim().split(" ").filter(Boolean))}function fr(e,r){var t=Fe(e.srcset),o=Fe(r);return o.length===t.length&&o.every(([s,n],i)=>n===t[i][1]&&(Ae(t[i][0],s)||Ae(s,t[i][0])))}typeof window<"u"&&typeof window.matchMedia!="function"&&(window.matchMedia=e=>({matches:!1,media:e,onchange:null,addListener(){},removeListener(){},addEventListener(){},removeEventListener(){},dispatchEvent:()=>!1}));const br=(e,r)=>{const t=new Array(e.length+r.length);for(let o=0;o<e.length;o++)t[o]=e[o];for(let o=0;o<r.length;o++)t[e.length+o]=r[o];return t},gr=(e,r)=>({classGroupId:e,validator:r}),ft=(e=new Map,r=null,t)=>({nextPart:e,validators:r,classGroupId:t}),pe="-",He=[],hr="arbitrary..",vr=e=>{const r=wr(e),{conflictingClassGroups:t,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return kr(i);const d=i.split(pe),m=d[0]===""&&d.length>1?1:0;return bt(d,m,r)},getConflictingClassGroupIds:(i,d)=>{if(d){const m=o[i],u=t[i];return m?u?br(u,m):m:u||He}return t[i]||He}}},bt=(e,r,t)=>{if(e.length-r===0)return t.classGroupId;const s=e[r],n=t.nextPart.get(s);if(n){const u=bt(e,r+1,n);if(u)return u}const i=t.validators;if(i===null)return;const d=r===0?e.join(pe):e.slice(r).join(pe),m=i.length;for(let u=0;u<m;u++){const f=i[u];if(f.validator(d))return f.classGroupId}},kr=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const r=e.slice(1,-1),t=r.indexOf(":"),o=r.slice(0,t);return o?hr+o:void 0})(),wr=e=>{const{theme:r,classGroups:t}=e;return yr(t,r)},yr=(e,r)=>{const t=ft();for(const o in e){const s=e[o];Me(s,t,o,r)}return t},Me=(e,r,t,o)=>{const s=e.length;for(let n=0;n<s;n++){const i=e[n];xr(i,r,t,o)}},xr=(e,r,t,o)=>{if(typeof e=="string"){Cr(e,r,t);return}if(typeof e=="function"){Sr(e,r,t,o);return}Ar(e,r,t,o)},Cr=(e,r,t)=>{const o=e===""?r:gt(r,e);o.classGroupId=t},Sr=(e,r,t,o)=>{if(zr(e)){Me(e(o),r,t,o);return}r.validators===null&&(r.validators=[]),r.validators.push(gr(t,e))},Ar=(e,r,t,o)=>{const s=Object.entries(e),n=s.length;for(let i=0;i<n;i++){const[d,m]=s[i];Me(m,gt(r,d),t,o)}},gt=(e,r)=>{let t=e;const o=r.split(pe),s=o.length;for(let n=0;n<s;n++){const i=o[n];let d=t.nextPart.get(i);d||(d=ft(),t.nextPart.set(i,d)),t=d}return t},zr=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Ir=e=>{if(e<1)return{get:()=>{},set:()=>{}};let r=0,t=Object.create(null),o=Object.create(null);const s=(n,i)=>{t[n]=i,r++,r>e&&(r=0,o=t,t=Object.create(null))};return{get(n){let i=t[n];if(i!==void 0)return i;if((i=o[n])!==void 0)return s(n,i),i},set(n,i){n in t?t[n]=i:s(n,i)}}},ze="!",De=":",Mr=[],qe=(e,r,t,o,s)=>({modifiers:e,hasImportantModifier:r,baseClassName:t,maybePostfixModifierPosition:o,isExternal:s}),Tr=e=>{const{prefix:r,experimentalParseClassName:t}=e;let o=s=>{const n=[];let i=0,d=0,m=0,u;const f=s.length;for(let x=0;x<f;x++){const _=s[x];if(i===0&&d===0){if(_===De){n.push(s.slice(m,x)),m=x+1;continue}if(_==="/"){u=x;continue}}_==="["?i++:_==="]"?i--:_==="("?d++:_===")"&&d--}const h=n.length===0?s:s.slice(m);let y=h,A=!1;h.endsWith(ze)?(y=h.slice(0,-1),A=!0):h.startsWith(ze)&&(y=h.slice(1),A=!0);const C=u&&u>m?u-m:void 0;return qe(n,A,y,C)};if(r){const s=r+De,n=o;o=i=>i.startsWith(s)?n(i.slice(s.length)):qe(Mr,!1,i,void 0,!0)}if(t){const s=o;o=n=>t({className:n,parseClassName:s})}return o},Pr=e=>{const r=new Map;return e.orderSensitiveModifiers.forEach((t,o)=>{r.set(t,1e6+o)}),t=>{const o=[];let s=[];for(let n=0;n<t.length;n++){const i=t[n],d=i[0]==="[",m=r.has(i);d||m?(s.length>0&&(s.sort(),o.push(...s),s=[]),o.push(i)):s.push(i)}return s.length>0&&(s.sort(),o.push(...s)),o}},_r=e=>({cache:Ir(e.cacheSize),parseClassName:Tr(e),sortModifiers:Pr(e),postfixLookupClassGroupIds:Gr(e),...vr(e)}),Gr=e=>{const r=Object.create(null),t=e.postfixLookupClassGroups;if(t)for(let o=0;o<t.length;o++)r[t[o]]=!0;return r},Lr=/\s+/,Rr=(e,r)=>{const{parseClassName:t,getClassGroupId:o,getConflictingClassGroupIds:s,sortModifiers:n,postfixLookupClassGroupIds:i}=r,d=[],m=e.trim().split(Lr);let u="";for(let f=m.length-1;f>=0;f-=1){const h=m[f],{isExternal:y,modifiers:A,hasImportantModifier:C,baseClassName:x,maybePostfixModifierPosition:_}=t(h);if(y){u=h+(u.length>0?" "+u:u);continue}let G=!!_,w;if(G){const g=x.substring(0,_);w=o(g);const a=w&&i[w]?o(x):void 0;a&&a!==w&&(w=a,G=!1)}else w=o(x);if(!w){if(!G){u=h+(u.length>0?" "+u:u);continue}if(w=o(x),!w){u=h+(u.length>0?" "+u:u);continue}G=!1}const B=A.length===0?"":A.length===1?A[0]:n(A).join(":"),S=C?B+ze:B,O=S+w;if(d.indexOf(O)>-1)continue;d.push(O);const v=s(w,G);for(let g=0;g<v.length;++g){const a=v[g];d.push(S+a)}u=h+(u.length>0?" "+u:u)}return u},Nr=(...e)=>{let r=0,t,o,s="";for(;r<e.length;)(t=e[r++])&&(o=ht(t))&&(s&&(s+=" "),s+=o);return s},ht=e=>{if(typeof e=="string")return e;let r,t="";for(let o=0;o<e.length;o++)e[o]&&(r=ht(e[o]))&&(t&&(t+=" "),t+=r);return t},Ye=(e,...r)=>{let t,o,s,n;const i=m=>{const u=r.reduce((f,h)=>h(f),e());return t=_r(u),o=t.cache.get,s=t.cache.set,n=d,d(m)},d=m=>{const u=o(m);if(u)return u;const f=Rr(m,t);return s(m,f),f};return n=i,(...m)=>n(Nr(...m))},Er=[],I=e=>{const r=t=>t[e]||Er;return r.isThemeGetter=!0,r.themeKey=e,r},vt=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,kt=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Or=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Vr=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Wr=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Br=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/,jr=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ur=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,j=e=>Or.test(e),b=e=>!!e&&!Number.isNaN(Number(e)),E=e=>!!e&&Number.isInteger(Number(e)),ye=e=>e.endsWith("%")&&b(e.slice(0,-1)),V=e=>Vr.test(e),wt=()=>!0,$r=e=>Wr.test(e)&&!Br.test(e),Te=()=>!1,Fr=e=>jr.test(e),Hr=e=>Ur.test(e),Dr=e=>!l(e)&&!c(e),qr=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),Yr=e=>$(e,Ct,Te),l=e=>vt.test(e),H=e=>$(e,St,$r),Ze=e=>$(e,ro,b),Zr=e=>$(e,zt,wt),Kr=e=>$(e,At,Te),Ke=e=>$(e,yt,Te),Xr=e=>$(e,xt,Hr),ie=e=>$(e,It,Fr),c=e=>kt.test(e),J=e=>D(e,St),Jr=e=>D(e,At),Xe=e=>D(e,yt),Qr=e=>D(e,Ct),eo=e=>D(e,xt),ae=e=>D(e,It,!0),to=e=>D(e,zt,!0),$=(e,r,t)=>{const o=vt.exec(e);return o?o[1]?r(o[1]):t(o[2]):!1},D=(e,r,t=!1)=>{const o=kt.exec(e);return o?o[1]?r(o[1]):t:!1},yt=e=>e==="position"||e==="percentage",xt=e=>e==="image"||e==="url",Ct=e=>e==="length"||e==="size"||e==="bg-size",St=e=>e==="length",ro=e=>e==="number",At=e=>e==="family-name",zt=e=>e==="number"||e==="weight",It=e=>e==="shadow",Je=()=>{const e=I("color"),r=I("font"),t=I("text"),o=I("font-weight"),s=I("tracking"),n=I("leading"),i=I("breakpoint"),d=I("container"),m=I("spacing"),u=I("radius"),f=I("shadow"),h=I("inset-shadow"),y=I("text-shadow"),A=I("drop-shadow"),C=I("blur"),x=I("perspective"),_=I("aspect"),G=I("ease"),w=I("animate"),B=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],O=()=>[...S(),c,l],v=()=>["auto","hidden","clip","visible","scroll"],g=()=>["auto","contain","none"],a=()=>[c,l,m],z=()=>[j,"full","auto",...a()],T=()=>[E,"none","subgrid",c,l],te=()=>["auto",{span:["full",E,c,l]},E,c,l],q=()=>[E,"auto",c,l],Pe=()=>["auto","min","max","fr",c,l],me=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Y=()=>["start","end","center","stretch","center-safe","end-safe"],N=()=>["auto",...a()],F=()=>[j,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...a()],fe=()=>[d,j,"screen","full","dvw","lvw","svw","min","max","fit",...a()],be=()=>[j,"screen","full","lh","dvh","lvh","svh","min","max","fit",...a()],p=()=>[e,c,l],_e=()=>[...S(),Xe,Ke,{position:[c,l]}],Ge=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Le=()=>["auto","cover","contain",Qr,Yr,{size:[c,l]}],ge=()=>[ye,J,H],L=()=>["","none","full",u,c,l],R=()=>["",b,J,H],re=()=>["solid","dashed","dotted","double"],Re=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],M=()=>[b,ye,Xe,Ke],Ne=()=>["","none",C,c,l],oe=()=>["none",b,c,l],se=()=>["none",b,c,l],he=()=>[b,c,l],ne=()=>[j,"full",...a()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[V],breakpoint:[V],color:[wt],container:[V],"drop-shadow":[V],ease:["in","out","in-out"],font:[Dr],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[V],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[V],shadow:[V],spacing:["px",b],text:[V],"text-shadow":[V],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",j,l,c,_]}],container:["container"],"container-type":[{"@container":["","normal","size",c,l]}],"container-named":[qr],columns:[{columns:[b,"auto",l,c,d]}],"break-after":[{"break-after":B()}],"break-before":[{"break-before":B()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:O()}],overflow:[{overflow:v()}],"overflow-x":[{"overflow-x":v()}],"overflow-y":[{"overflow-y":v()}],overscroll:[{overscroll:g()}],"overscroll-x":[{"overscroll-x":g()}],"overscroll-y":[{"overscroll-y":g()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:z()}],"inset-x":[{"inset-x":z()}],"inset-y":[{"inset-y":z()}],start:[{"inset-s":z(),start:z()}],end:[{"inset-e":z(),end:z()}],"inset-bs":[{"inset-bs":z()}],"inset-be":[{"inset-be":z()}],top:[{top:z()}],right:[{right:z()}],bottom:[{bottom:z()}],left:[{left:z()}],visibility:["visible","invisible","collapse"],z:[{z:[E,"auto",c,l]}],basis:[{basis:[j,"full","auto",d,...a()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[b,j,"auto","initial","none",l]}],grow:[{grow:["",b,c,l]}],shrink:[{shrink:["",b,c,l]}],order:[{order:[E,"first","last","none",c,l]}],"grid-cols":[{"grid-cols":T()}],"col-start-end":[{col:te()}],"col-start":[{"col-start":q()}],"col-end":[{"col-end":q()}],"grid-rows":[{"grid-rows":T()}],"row-start-end":[{row:te()}],"row-start":[{"row-start":q()}],"row-end":[{"row-end":q()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Pe()}],"auto-rows":[{"auto-rows":Pe()}],gap:[{gap:a()}],"gap-x":[{"gap-x":a()}],"gap-y":[{"gap-y":a()}],"justify-content":[{justify:[...me(),"normal"]}],"justify-items":[{"justify-items":[...Y(),"normal"]}],"justify-self":[{"justify-self":["auto",...Y()]}],"align-content":[{content:["normal",...me()]}],"align-items":[{items:[...Y(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Y(),{baseline:["","last"]}]}],"place-content":[{"place-content":me()}],"place-items":[{"place-items":[...Y(),"baseline"]}],"place-self":[{"place-self":["auto",...Y()]}],p:[{p:a()}],px:[{px:a()}],py:[{py:a()}],ps:[{ps:a()}],pe:[{pe:a()}],pbs:[{pbs:a()}],pbe:[{pbe:a()}],pt:[{pt:a()}],pr:[{pr:a()}],pb:[{pb:a()}],pl:[{pl:a()}],m:[{m:N()}],mx:[{mx:N()}],my:[{my:N()}],ms:[{ms:N()}],me:[{me:N()}],mbs:[{mbs:N()}],mbe:[{mbe:N()}],mt:[{mt:N()}],mr:[{mr:N()}],mb:[{mb:N()}],ml:[{ml:N()}],"space-x":[{"space-x":a()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":a()}],"space-y-reverse":["space-y-reverse"],size:[{size:F()}],"inline-size":[{inline:["auto",...fe()]}],"min-inline-size":[{"min-inline":["auto",...fe()]}],"max-inline-size":[{"max-inline":["none",...fe()]}],"block-size":[{block:["auto",...be()]}],"min-block-size":[{"min-block":["auto",...be()]}],"max-block-size":[{"max-block":["none",...be()]}],w:[{w:[d,"screen",...F()]}],"min-w":[{"min-w":[d,"screen","none",...F()]}],"max-w":[{"max-w":[d,"screen","none","prose",{screen:[i]},...F()]}],h:[{h:["screen","lh",...F()]}],"min-h":[{"min-h":["screen","lh","none",...F()]}],"max-h":[{"max-h":["screen","lh","none",...F()]}],"font-size":[{text:["base",t,J,H]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,to,Zr]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ye,l]}],"font-family":[{font:[Jr,Kr,r]}],"font-features":[{"font-features":[l]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,c,l]}],"line-clamp":[{"line-clamp":[b,"none",c,Ze]}],leading:[{leading:["none",n,...a()]}],"list-image":[{"list-image":["none",c,l]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",c,l]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:p()}],"text-color":[{text:p()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...re(),"wavy"]}],"text-decoration-thickness":[{decoration:[b,"from-font","auto",c,H]}],"text-decoration-color":[{decoration:p()}],"underline-offset":[{"underline-offset":[b,"auto",c,l]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:a()}],"tab-size":[{tab:[E,c,l]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",c,l]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",c,l]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:_e()}],"bg-repeat":[{bg:Ge()}],"bg-size":[{bg:Le()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},E,c,l],radial:["",c,l],conic:["",E,c,l]},eo,Xr]}],"bg-color":[{bg:p()}],"gradient-from-pos":[{from:ge()}],"gradient-via-pos":[{via:ge()}],"gradient-to-pos":[{to:ge()}],"gradient-from":[{from:p()}],"gradient-via":[{via:p()}],"gradient-to":[{to:p()}],rounded:[{rounded:L()}],"rounded-s":[{"rounded-s":L()}],"rounded-e":[{"rounded-e":L()}],"rounded-t":[{"rounded-t":L()}],"rounded-r":[{"rounded-r":L()}],"rounded-b":[{"rounded-b":L()}],"rounded-l":[{"rounded-l":L()}],"rounded-ss":[{"rounded-ss":L()}],"rounded-se":[{"rounded-se":L()}],"rounded-ee":[{"rounded-ee":L()}],"rounded-es":[{"rounded-es":L()}],"rounded-tl":[{"rounded-tl":L()}],"rounded-tr":[{"rounded-tr":L()}],"rounded-br":[{"rounded-br":L()}],"rounded-bl":[{"rounded-bl":L()}],"border-w":[{border:R()}],"border-w-x":[{"border-x":R()}],"border-w-y":[{"border-y":R()}],"border-w-s":[{"border-s":R()}],"border-w-e":[{"border-e":R()}],"border-w-bs":[{"border-bs":R()}],"border-w-be":[{"border-be":R()}],"border-w-t":[{"border-t":R()}],"border-w-r":[{"border-r":R()}],"border-w-b":[{"border-b":R()}],"border-w-l":[{"border-l":R()}],"divide-x":[{"divide-x":R()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":R()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...re(),"hidden","none"]}],"divide-style":[{divide:[...re(),"hidden","none"]}],"border-color":[{border:p()}],"border-color-x":[{"border-x":p()}],"border-color-y":[{"border-y":p()}],"border-color-s":[{"border-s":p()}],"border-color-e":[{"border-e":p()}],"border-color-bs":[{"border-bs":p()}],"border-color-be":[{"border-be":p()}],"border-color-t":[{"border-t":p()}],"border-color-r":[{"border-r":p()}],"border-color-b":[{"border-b":p()}],"border-color-l":[{"border-l":p()}],"divide-color":[{divide:p()}],"outline-style":[{outline:[...re(),"none","hidden"]}],"outline-offset":[{"outline-offset":[b,c,l]}],"outline-w":[{outline:["",b,J,H]}],"outline-color":[{outline:p()}],shadow:[{shadow:["","inner","none",f,ae,ie]}],"shadow-color":[{shadow:p()}],"inset-shadow":[{"inset-shadow":["none",h,ae,ie]}],"inset-shadow-color":[{"inset-shadow":p()}],"ring-w":[{ring:R()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:p()}],"ring-offset-w":[{"ring-offset":[b,H]}],"ring-offset-color":[{"ring-offset":p()}],"inset-ring-w":[{"inset-ring":R()}],"inset-ring-color":[{"inset-ring":p()}],"text-shadow":[{"text-shadow":["none",y,ae,ie]}],"text-shadow-color":[{"text-shadow":p()}],opacity:[{opacity:[b,c,l]}],"mix-blend":[{"mix-blend":[...Re(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Re()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[b]}],"mask-image-linear-from-pos":[{"mask-linear-from":M()}],"mask-image-linear-to-pos":[{"mask-linear-to":M()}],"mask-image-linear-from-color":[{"mask-linear-from":p()}],"mask-image-linear-to-color":[{"mask-linear-to":p()}],"mask-image-t-from-pos":[{"mask-t-from":M()}],"mask-image-t-to-pos":[{"mask-t-to":M()}],"mask-image-t-from-color":[{"mask-t-from":p()}],"mask-image-t-to-color":[{"mask-t-to":p()}],"mask-image-r-from-pos":[{"mask-r-from":M()}],"mask-image-r-to-pos":[{"mask-r-to":M()}],"mask-image-r-from-color":[{"mask-r-from":p()}],"mask-image-r-to-color":[{"mask-r-to":p()}],"mask-image-b-from-pos":[{"mask-b-from":M()}],"mask-image-b-to-pos":[{"mask-b-to":M()}],"mask-image-b-from-color":[{"mask-b-from":p()}],"mask-image-b-to-color":[{"mask-b-to":p()}],"mask-image-l-from-pos":[{"mask-l-from":M()}],"mask-image-l-to-pos":[{"mask-l-to":M()}],"mask-image-l-from-color":[{"mask-l-from":p()}],"mask-image-l-to-color":[{"mask-l-to":p()}],"mask-image-x-from-pos":[{"mask-x-from":M()}],"mask-image-x-to-pos":[{"mask-x-to":M()}],"mask-image-x-from-color":[{"mask-x-from":p()}],"mask-image-x-to-color":[{"mask-x-to":p()}],"mask-image-y-from-pos":[{"mask-y-from":M()}],"mask-image-y-to-pos":[{"mask-y-to":M()}],"mask-image-y-from-color":[{"mask-y-from":p()}],"mask-image-y-to-color":[{"mask-y-to":p()}],"mask-image-radial":[{"mask-radial":[c,l]}],"mask-image-radial-from-pos":[{"mask-radial-from":M()}],"mask-image-radial-to-pos":[{"mask-radial-to":M()}],"mask-image-radial-from-color":[{"mask-radial-from":p()}],"mask-image-radial-to-color":[{"mask-radial-to":p()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":S()}],"mask-image-conic-pos":[{"mask-conic":[b]}],"mask-image-conic-from-pos":[{"mask-conic-from":M()}],"mask-image-conic-to-pos":[{"mask-conic-to":M()}],"mask-image-conic-from-color":[{"mask-conic-from":p()}],"mask-image-conic-to-color":[{"mask-conic-to":p()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:_e()}],"mask-repeat":[{mask:Ge()}],"mask-size":[{mask:Le()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",c,l]}],filter:[{filter:["","none",c,l]}],blur:[{blur:Ne()}],brightness:[{brightness:[b,c,l]}],contrast:[{contrast:[b,c,l]}],"drop-shadow":[{"drop-shadow":["","none",A,ae,ie]}],"drop-shadow-color":[{"drop-shadow":p()}],grayscale:[{grayscale:["",b,c,l]}],"hue-rotate":[{"hue-rotate":[b,c,l]}],invert:[{invert:["",b,c,l]}],saturate:[{saturate:[b,c,l]}],sepia:[{sepia:["",b,c,l]}],"backdrop-filter":[{"backdrop-filter":["","none",c,l]}],"backdrop-blur":[{"backdrop-blur":Ne()}],"backdrop-brightness":[{"backdrop-brightness":[b,c,l]}],"backdrop-contrast":[{"backdrop-contrast":[b,c,l]}],"backdrop-grayscale":[{"backdrop-grayscale":["",b,c,l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[b,c,l]}],"backdrop-invert":[{"backdrop-invert":["",b,c,l]}],"backdrop-opacity":[{"backdrop-opacity":[b,c,l]}],"backdrop-saturate":[{"backdrop-saturate":[b,c,l]}],"backdrop-sepia":[{"backdrop-sepia":["",b,c,l]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":a()}],"border-spacing-x":[{"border-spacing-x":a()}],"border-spacing-y":[{"border-spacing-y":a()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",c,l]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[b,"initial",c,l]}],ease:[{ease:["linear","initial",G,c,l]}],delay:[{delay:[b,c,l]}],animate:[{animate:["none",w,c,l]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[x,c,l]}],"perspective-origin":[{"perspective-origin":O()}],rotate:[{rotate:oe()}],"rotate-x":[{"rotate-x":oe()}],"rotate-y":[{"rotate-y":oe()}],"rotate-z":[{"rotate-z":oe()}],scale:[{scale:se()}],"scale-x":[{"scale-x":se()}],"scale-y":[{"scale-y":se()}],"scale-z":[{"scale-z":se()}],"scale-3d":["scale-3d"],skew:[{skew:he()}],"skew-x":[{"skew-x":he()}],"skew-y":[{"skew-y":he()}],transform:[{transform:[c,l,"","none","gpu","cpu"]}],"transform-origin":[{origin:O()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ne()}],"translate-x":[{"translate-x":ne()}],"translate-y":[{"translate-y":ne()}],"translate-z":[{"translate-z":ne()}],"translate-none":["translate-none"],zoom:[{zoom:[E,c,l]}],accent:[{accent:p()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:p()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",c,l]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":p()}],"scrollbar-track-color":[{"scrollbar-track":p()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":a()}],"scroll-mx":[{"scroll-mx":a()}],"scroll-my":[{"scroll-my":a()}],"scroll-ms":[{"scroll-ms":a()}],"scroll-me":[{"scroll-me":a()}],"scroll-mbs":[{"scroll-mbs":a()}],"scroll-mbe":[{"scroll-mbe":a()}],"scroll-mt":[{"scroll-mt":a()}],"scroll-mr":[{"scroll-mr":a()}],"scroll-mb":[{"scroll-mb":a()}],"scroll-ml":[{"scroll-ml":a()}],"scroll-p":[{"scroll-p":a()}],"scroll-px":[{"scroll-px":a()}],"scroll-py":[{"scroll-py":a()}],"scroll-ps":[{"scroll-ps":a()}],"scroll-pe":[{"scroll-pe":a()}],"scroll-pbs":[{"scroll-pbs":a()}],"scroll-pbe":[{"scroll-pbe":a()}],"scroll-pt":[{"scroll-pt":a()}],"scroll-pr":[{"scroll-pr":a()}],"scroll-pb":[{"scroll-pb":a()}],"scroll-pl":[{"scroll-pl":a()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",c,l]}],fill:[{fill:["none",...p()]}],"stroke-w":[{stroke:[b,J,H,Ze]}],stroke:[{stroke:["none",...p()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["start","end","right","left"],"inset-y":["inset-bs","inset-be","top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["ps","pe","pr","pl"],py:["pbs","pbe","pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["ms","me","mr","ml"],my:["mbs","mbe","mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-s","border-w-e","border-w-r","border-w-l"],"border-w-y":["border-w-bs","border-w-be","border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-s","border-color-e","border-color-r","border-color-l"],"border-color-y":["border-color-bs","border-color-be","border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-ms","scroll-me","scroll-mr","scroll-ml"],"scroll-my":["scroll-mbs","scroll-mbe","scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-ps","scroll-pe","scroll-pr","scroll-pl"],"scroll-py":["scroll-pbs","scroll-pbe","scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},oo=(e,{cacheSize:r,prefix:t,experimentalParseClassName:o,extend:s={},override:n={}})=>(Z(e,"cacheSize",r),Z(e,"prefix",t),Z(e,"experimentalParseClassName",o),le(e.theme,n.theme),le(e.classGroups,n.classGroups),le(e.conflictingClassGroups,n.conflictingClassGroups),le(e.conflictingClassGroupModifiers,n.conflictingClassGroupModifiers),Z(e,"postfixLookupClassGroups",n.postfixLookupClassGroups),Z(e,"orderSensitiveModifiers",n.orderSensitiveModifiers),ce(e.theme,s.theme),ce(e.classGroups,s.classGroups),ce(e.conflictingClassGroups,s.conflictingClassGroups),ce(e.conflictingClassGroupModifiers,s.conflictingClassGroupModifiers),Ie(e,s,"postfixLookupClassGroups"),Ie(e,s,"orderSensitiveModifiers"),e),Z=(e,r,t)=>{t!==void 0&&(e[r]=t)},le=(e,r)=>{if(r)for(const t in r)Z(e,t,r[t])},ce=(e,r)=>{if(r)for(const t in r)Ie(e,r,t)},Ie=(e,r,t)=>{const o=r[t];o!==void 0&&(e[t]=e[t]?e[t].concat(o):o)},so=(e,...r)=>typeof e=="function"?Ye(Je,e,...r):Ye(()=>oo(Je(),e),...r),no=so({extend:{classGroups:{"font-size":["type-caption","type-body","type-title","type-display","type-code","text-ui","text-ui-sm","text-xs"],"surface-inverse":["surface-inverse"]},conflictingClassGroups:{"surface-inverse":["bg-color","text-color"],"bg-color":["surface-inverse"]}}});function wo(...e){return no(it(e))}const io=ue(["primitive","pattern","product","deprecated-wrapper","deletion-candidate"]),ao=U({id:k().min(1),title:k().min(1),states:P(k().min(1)).min(1),themes:P(ue(["light","dark","system","high-contrast"])).optional(),viewport:ue(["compact","desktop","both"]).optional(),reducedMotion:Jt().optional()}),Qe=U({value:k().min(1),label:k().min(1),guidance:k().min(1).optional(),iconValue:k().min(1).optional()}),lo=U({prop:k().min(1),alias:k().min(1),replacement:k().min(1)}),co=U({emphasis:P(Qe).min(1),sizes:P(Qe).min(1),compatibilityAliases:P(lo)}),de=k().min(1).refine(e=>!e.includes("\\"),{message:"use a repository-relative POSIX path"}),Mt=U({id:k().regex(/^[a-z0-9][a-z0-9-]*$/),source:de,publicImport:k().startsWith("$lib/components/ui/"),legacyImports:P(k().startsWith("$lib/components/ui/")).default([]),exports:P(k().min(1)).min(1),category:io,owner:k().min(1),callers:P(de),replacement:k().min(1).nullable(),characterizationTest:de.nullable(),removalGate:k().min(1),dynamicImports:P(de),fixtures:P(ao),useWhen:P(k().min(1)).optional(),dontUseWhen:P(k().min(1)).optional(),replaces:P(k().min(1)).optional(),apiGuidance:co.optional(),usage:k().refine(e=>e.trim().length>0).optional()}).superRefine((e,r)=>{["deprecated-wrapper","deletion-candidate"].includes(e.category)&&(e.replacement||r.addIssue({code:ve.custom,path:["replacement"],message:"deprecated and deletion records require a canonical replacement or deletion plan"}),e.characterizationTest||r.addIssue({code:ve.custom,path:["characterizationTest"],message:"deprecated and deletion records require a characterization test"}),e.removalGate.trim()||r.addIssue({code:ve.custom,path:["removalGate"],message:"deprecated and deletion records require a measurable removal gate"}))}),uo=U({implementation:k().min(1),publicModule:k().min(1),metadata:k().min(1),behavioralTest:k().min(1),fixture:k().min(1),variantRecipe:k().min(1).optional()}),po=U({layer:ue(["primitive","pattern","product"]),allowed:P(k().min(1)).min(1),forbidden:P(k().min(1)),repair:k().min(1)});U({version:Qt(1),folderTemplate:uo,dependencyRules:P(po).length(3),components:P(Mt).min(1)});function mo(e,r){const t=r.issues.find(s=>s.path[0]==="id"),o=r.issues.map(s=>`${s.path.join(".")||e}: ${s.message}`).join("; ");return new Error(`${e}${t?` (${t.message})`:""}: ${o}`)}function fo(e){const r=Mt.safeParse(e);if(!r.success){const t=typeof e=="object"&&e!==null&&"id"in e?String(e.id):"unknown";throw mo(`UI component ${t}`,r.error)}return r.data}const bo=[{id:"spinner-state-matrix",title:"Loading indicator states",states:["bloom","pulse","twist","size-16","size-24","size-32","in-button","in-list-row","paused","light","dark","reduced-motion"],themes:["light","dark"],viewport:"both",reducedMotion:!0}];fo({id:"loading-indicator",source:"src/lib/components/ui/indicators/IntentMarkLoader.svelte",publicImport:"$lib/components/ui/indicators",legacyImports:[],exports:["IntentMarkLoader","AgentBadge","IntentMarkVariant","UnsavedIndicator","intentMarkMotionTiming","intentMarkVariants","spinnerMetadata"],category:"pattern",owner:"007-B1",callers:["src/features/collaboration-auth/renderer/CollaborationSignInModal.svelte","src/features/daemon-status/DaemonUpdatingOverlay.svelte","src/features/discussions/components/DiscussionMicrophone.svelte","src/features/file-tracking/components/diff/PatchBlockContent.svelte","src/features/home/HomeAssistantThreads.svelte","src/features/machine-rail/MachineRail.svelte","src/features/nodes/PairLinkField.svelte","src/features/onboarding/messages/GitHubRepoTab.svelte","src/features/onboarding/messages/ProviderCard.svelte","src/features/onboarding/steps/OnboardingForgeStep.svelte","src/features/onboarding/steps/OnboardingPromptStep.svelte","src/features/onboarding/steps/OnboardingRequirementsStep.svelte","src/features/remote-machines/AgentPlacementNotice.svelte","src/features/scripts/components/ScriptDetectionControls.svelte","src/features/workspace-home/components/WorkspaceHomeBanner.svelte","src/features/workspace-home/components/WorkspaceHomeLine.svelte","src/features/workspace-home/components/WorkspaceHomePanelNotice.svelte","src/lib/component-catalog/renderers/ContentFieldCatalogPreview.svelte","src/lib/component-catalog/renderers/ScreenStatesCatalogPreview.svelte","src/lib/components/AuggieSetupGate.svelte","src/lib/components/GitHubAuthBanner.svelte","src/lib/components/GitHubAuthModal.svelte","src/lib/components/GitLabConnectForm.svelte","src/lib/components/agent-overview/AgentHierarchyCard.svelte","src/lib/components/agent-overview/AgentHierarchyGraph.svelte","src/lib/components/browser/EmbeddedBrowser.svelte","src/lib/components/chat/AttachmentPreview.svelte","src/lib/components/chat/AutoCommitStatus.svelte","src/lib/components/chat/ChatChangesPanel.svelte","src/lib/components/chat/ChatMessageNavigator.svelte","src/lib/components/chat/ChatPanel.svelte","src/lib/components/chat/ExecutionPlanCard.svelte","src/lib/components/chat/StreamingTypingIndicator.svelte","src/lib/components/chat/TaskProgressControl.svelte","src/lib/components/chat/ThinkingBlock.svelte","src/lib/components/chat/ToolStatusIcon.svelte","src/lib/components/chat/input/ContextPickerButton.svelte","src/lib/components/chat/input/ModelPicker.svelte","src/lib/components/chat/input/ModelPickerProviderNotice.svelte","src/lib/components/chat/input/SimpleRichInput.svelte","src/lib/components/chat/streaming-status-utils.ts","src/lib/components/code-review/CodeReviewTabContent.svelte","src/lib/components/code-review/walkthrough/CodeWalkthroughSection.svelte","src/lib/components/code-review/walkthrough/WalkthroughCommentThread.svelte","src/lib/components/code-review/walkthrough/WalkthroughInlineComment.svelte","src/lib/components/error/EnhancedErrorBoundary.svelte","src/lib/components/file-explorer/file-explorer-layout.svelte","src/lib/components/file-explorer/file-explorer-sidebar.svelte","src/lib/components/layout/sidebar-nav/cards/ChiefCard.svelte","src/lib/components/modals/BulkTransferModal.svelte","src/lib/components/modals/InviteConsentModal.svelte","src/lib/components/modals/InviteProgressModal.svelte","src/lib/components/modals/SetupScriptModal.svelte","src/lib/components/notes/primitives/AgentActionBlock.svelte","src/lib/components/notes/primitives/CliBlock.svelte","src/lib/components/patterns/form/UnsavedIndicator.svelte","src/lib/components/patterns/settings/custom-controls.ts","src/lib/components/terminal/QuakeTerminalOverlay.svelte","src/lib/components/tiptap/comments/AgentPeekCard.svelte","src/lib/components/ui/button/button.svelte","src/lib/components/ui/list/ListItem.svelte","src/lib/components/workspace/CheckoutModePill.svelte","src/lib/components/workspace/CompactWorkspaceInitializer.svelte","src/lib/components/workspace/PullRequestCreator.svelte","src/lib/components/workspace/WorkspaceShellList.svelte","src/lib/components/workspace/WorkspaceSidebarHeader.svelte","src/lib/components/workspace/initializer/BranchSelector.svelte","src/lib/components/workspace/initializer/GitLabBranchPicker.svelte","src/lib/components/workspace/initializer/IssueSuggestions.svelte","src/lib/components/workspace/initializer/RepoAndBranchPicker.svelte","src/lib/components/workspace/initializer/RepoSelector.svelte","src/lib/components/workspace/initializer/RepositoryPickerList.svelte","src/lib/components/workspace/initializer/SetupScriptAgent.svelte","src/lib/components/workspace/initializer/SetupScriptTrigger.svelte","src/lib/components/workspace/initializer/WorkspaceCreateButton.svelte","src/lib/components/workspace/sidebar/CommitDrawer.svelte","src/lib/components/workspace/sidebar/CommitsTimeline.svelte","src/lib/components/workspace/sidebar/DividerButton.svelte","src/lib/components/workspace/sidebar/FileChangesSection.svelte","src/lib/components/workspace/sidebar/HistoryBoundary.svelte","src/lib/components/workspace/sidebar/MergePanel.svelte","src/lib/components/workspace/sidebar/PRSection.svelte","src/lib/components/workspace/sidebar/PostMergeActions.svelte","src/lib/components/workspace/sidebar/SecondaryRootChangesView.svelte","src/lib/components/workspace/sidebar/WorkspaceProgressCard.svelte","src/lib/components/workspace/sidebar/context-picker/LinearPicker.svelte","src/lib/components/workspace/sidebar/context-picker/SentryPicker.svelte","src/routes/(app)/workspace/creating/+page.svelte"],replacement:null,characterizationTest:"src/lib/components/ui/indicators/IntentMarkLoader.test.ts",removalGate:"Retain IntentMarkLoader as the only indeterminate indicator while canonical callers, deterministic motion tests, and loading catalog coverage pass; AgentBadge and UnsavedIndicator remain internal product exports and are not catalog entries.",dynamicImports:[],fixtures:bo,useWhen:["Use bloom for buttons, list rows, thinking blocks, live-stream phases, typing, hierarchy cards, message navigation, and content previews; streaming status keeps its status-derived bloom, pulse, or twist variant."]});export{K as C,X as S,er as a,ko as b,tr as c,it as d,wo as e,sr as f,nr as g,fo as p,ur as r,Q as s};
@@ -1 +1 @@
1
- var Me=Object.defineProperty;var De=(i,s,e)=>s in i?Me(i,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[s]=e;var m=(i,s,e)=>De(i,typeof s!="symbol"?s+"":s,e);import{x as Ne,J as oe,Z as ce,ai as q,ar as Ce}from"./C-gBprWE.js";import{bY as Le,cX as le,co as ue,cn as ve}from"./C4rFO2Hf.js";import{Iv as p,Bd as we,bx as be,e as Fe,Ky as de,i8 as me,bJ as ke,D8 as z,BC as Ge,f6 as Pe,zI as xe,dT as Ee,f2 as fe,dS as _e,Ab as Ve,Kc as Ue,vQ as Be}from"./Bo8Vb7mw.js";import{aC as Ae,dG as he,A as H,P as ge,ay as K}from"./DPuyFsTN.js";import{h as $e}from"./DJq2OFOa.js";import{c as W}from"./ChTqQfQN.js";import{a as Xe}from"./BdWqymET.js";import{k as Q}from"./COcWmgqo.js";import"./DYhIMPy1.js";import{bo as n}from"./BQy38IRs.js";import"./CwxaNadx.js";import"./1EEYpvtO.js";import"./DGD-U5Bo.js";import{R as Re}from"./BvFAWM27.js";import{L as Ye}from"./CSiaiLHL.js";function We(i,s){return i.some(e=>e.id===s.id)?i.map(e=>e.id===s.id?{...s,...s.author==null&&e.author!==void 0?{author:e.author}:{}}:e):[...i,s]}const Z=typeof performance<"u"?performance:{now:()=>Date.now()},V=new Xe("PerformanceOptimizer"),w=class w{constructor(){m(this,"metricsBuffer");m(this,"metricsIndex",0);m(this,"metricsCount",0);m(this,"MAX_METRICS",500);m(this,"TARGET_RESPONSE_TIME",100);m(this,"memoCache",new Map);m(this,"MEMO_TTL",6e4);m(this,"MAX_CACHE_SIZE",100);m(this,"cacheHits",0);m(this,"cacheMisses",0);m(this,"pendingRequests",new Map);m(this,"requestQueue",[]);m(this,"cleanupInterval",null);this.metricsBuffer=new Array(this.MAX_METRICS).fill(null),this.startCacheCleanup(),V.info("PerformanceOptimizer initialized")}static getInstance(){return w.instance||(w.instance=new w),w.instance}reset(){this.metricsBuffer=new Array(this.MAX_METRICS).fill(null),this.metricsIndex=0,this.metricsCount=0,this.memoCache.clear(),this.pendingRequests.clear(),this.requestQueue=[],this.cacheHits=0,this.cacheMisses=0}clearCache(){this.memoCache.clear(),this.cacheHits=0,this.cacheMisses=0}async processBatch(s,e,t={}){const{batchSize:r=10,concurrency:a=4}=t,l=[];for(let c=0;c<s.length;c+=r){const f=s.slice(c,c+r).map((o,R)=>{const g=Math.floor(R/a)*10;return new Promise(d=>{setTimeout(async()=>{const k=await e(o);d(k)},g)})}),u=await Promise.all(f);l.push(...u)}return l}startCacheCleanup(){this.cleanupInterval=setInterval(()=>{this.cleanupCache()},3e4)}stopCacheCleanup(){this.cleanupInterval&&(clearInterval(this.cleanupInterval),this.cleanupInterval=null)}cleanupCache(){const s=Date.now(),e=[];this.memoCache.forEach((t,r)=>{s-t.timestamp>this.MEMO_TTL&&e.push(r)}),e.forEach(t=>this.memoCache.delete(t)),this.memoCache.size>this.MAX_CACHE_SIZE&&Array.from(this.memoCache.entries()).sort((a,l)=>a[1].hits-l[1].hits||a[1].timestamp-l[1].timestamp).slice(0,this.memoCache.size-this.MAX_CACHE_SIZE).forEach(([a])=>this.memoCache.delete(a))}async track(s,e,t={}){const r=Z.now();try{const a=t.cacheKey||s;if(t.memoize){const f=this.getMemoized(a);if(f!==void 0)return this.cacheHits++,V.debug("Memoized result used",{operation:s,cacheKey:a,hits:this.cacheHits}),f;this.cacheMisses++}if(t.coalesce){const f=this.pendingRequests.get(s);if(f)return V.debug("Request coalesced",{operation:s}),f}let l;t.coalesce?(l=t.timeout?this.withTimeout(e(),t.timeout):e(),this.pendingRequests.set(s,l)):l=t.timeout?this.withTimeout(e(),t.timeout):e();const c=await l;t.memoize&&this.memoize(a,c);const E=Z.now()-r;return this.recordMetric(s,E,!0,{strategy:t.priority||"normal",memoized:t.memoize||!1,coalesced:t.coalesce||!1}),E>this.TARGET_RESPONSE_TIME&&V.warn("Operation exceeded target time",{operation:s,duration:Math.round(E),target:this.TARGET_RESPONSE_TIME}),c}catch(a){const l=Z.now()-r;throw this.recordMetric(s,l,!1,{error:a instanceof Error?a.message:"Unknown error"}),a}finally{t.coalesce&&this.pendingRequests.delete(s)}}getStats(){if(this.metricsCount===0)return{avgResponseTime:0,p95ResponseTime:0,p99ResponseTime:0,successRate:100,slowOperations:[]};const s=[],e=this.metricsCount<this.MAX_METRICS?0:this.metricsIndex;for(let u=0;u<this.metricsCount;u++){const o=this.metricsBuffer[(e+u)%this.MAX_METRICS];o&&s.push(o)}if(s.length===0)return{avgResponseTime:0,p95ResponseTime:0,p99ResponseTime:0,successRate:100,slowOperations:[]};const t=s.sort((u,o)=>u.duration-o.duration);let r=0,a=0;const l=new Set;for(const u of s)a+=u.duration,u.success&&r++,u.duration>this.TARGET_RESPONSE_TIME&&l.add(u.operation);const c=a/s.length,E=Math.floor(t.length*.95),f=Math.floor(t.length*.99);return{avgResponseTime:Math.round(c),p95ResponseTime:Math.round(t[E]?.duration||0),p99ResponseTime:Math.round(t[f]?.duration||0),successRate:r/s.length*100,slowOperations:Array.from(l)}}getCacheStats(){const s=this.cacheHits+this.cacheMisses;return{size:this.memoCache.size,hitRate:s>0?this.cacheHits/s*100:0,hits:this.cacheHits,misses:this.cacheMisses}}getMemoized(s){const e=this.memoCache.get(s);if(e){if(Date.now()-e.timestamp>this.MEMO_TTL){this.memoCache.delete(s);return}return e.hits++,e.value}}memoize(s,e){const t=JSON.stringify(e).length;this.memoCache.set(s,{value:e,timestamp:Date.now(),hits:0,size:t}),this.memoCache.size>this.MAX_CACHE_SIZE&&this.cleanupCache()}async withTimeout(s,e){return Promise.race([s,new Promise((t,r)=>setTimeout(()=>r(new Error(`Operation timed out after ${e}ms`)),e))])}recordMetric(s,e,t,r){this.metricsBuffer[this.metricsIndex]={operation:s,duration:e,timestamp:Date.now(),success:t,metadata:r},this.metricsIndex=(this.metricsIndex+1)%this.MAX_METRICS,this.metricsCount<this.MAX_METRICS&&this.metricsCount++,e>this.TARGET_RESPONSE_TIME&&V.warn("Slow operation detected",{operation:s,duration:`${e.toFixed(2)}ms`,target:`${this.TARGET_RESPONSE_TIME}ms`,metadata:r})}};m(w,"instance");let ee=w;const qe=ee.getInstance(),pe={AGENT_CREATION:"https://docs.example.com/agent-creation",STREAMING:"https://docs.example.com/streaming-issues",STORAGE:"https://docs.example.com/storage-troubleshooting",MEMORY:"https://docs.example.com/memory-management",PROVIDER:"https://docs.example.com/provider-setup",GENERAL:"https://docs.example.com/help"},j={get AGENT_CREATION_FAILED(){return n.errors_catalog_agentCreationFailed_template({agentName:"{agentName}",details:"{details}"})},get AGENT_ALREADY_EXISTS(){return n.errors_catalog_agentAlreadyExists_template({agentName:"{agentName}"})},get INVALID_AGENT_CONFIG(){return n.errors_catalog_invalidAgentConfig_template({details:"{details}"})},get INVALID_CONFIG(){return n.errors_catalog_invalidConfig_template({details:"{details}"})},get SESSION_NOT_FOUND(){return n.errors_catalog_sessionNotFound_template({sessionId:"{sessionId}"})},get SESSION_ALREADY_ACTIVE(){return n.errors_catalog_sessionAlreadyActive_template()},get SESSION_INITIALIZATION_FAILED(){return n.errors_catalog_sessionInitializationFailed_template({details:"{details}"})},get STREAM_CONNECTION_FAILED(){return n.errors_catalog_streamConnectionFailed_template({details:"{details}"})},get STREAM_TIMEOUT(){return n.errors_catalog_streamTimeout_template({timeout:"{timeout}"})},get STREAM_INTERRUPTED(){return n.errors_catalog_streamInterrupted_template({attempt:"{attempt}",maxAttempts:"{maxAttempts}"})},get STREAM_RECOVERY_FAILED(){return n.errors_catalog_streamRecoveryFailed_template({attempts:"{attempts}"})},get MESSAGE_SEND_FAILED(){return n.errors_catalog_messageSendFailed_template({details:"{details}"})},get MESSAGE_VALIDATION_FAILED(){return n.errors_catalog_messageValidationFailed_template({details:"{details}"})},get MESSAGE_TOO_LONG(){return n.errors_catalog_messageTooLong_template({maxLength:"{maxLength}",currentLength:"{currentLength}"})},get PROVIDER_NOT_FOUND(){return n.errors_catalog_providerNotFound_template({provider:"{provider}"})},get PROVIDER_CONNECTION_FAILED(){return n.errors_catalog_providerConnectionFailed_template({provider:"{provider}",details:"{details}"})},get PROVIDER_PROCESS_DIED(){return n.errors_catalog_providerProcessDied_template({provider:"{provider}"})},get STORAGE_READ_FAILED(){return n.errors_catalog_storageReadFailed_template({details:"{details}"})},get STORAGE_WRITE_FAILED(){return n.errors_catalog_storageWriteFailed_template({details:"{details}"})},get STORAGE_CORRUPTED(){return n.errors_catalog_storageCorrupted_template({lastBackup:"{lastBackup}"})},get MEMORY_LIMIT_EXCEEDED(){return n.errors_catalog_memoryLimitExceeded_template({currentUsage:"{currentUsage}",limit:"{limit}"})},get RATE_LIMIT_EXCEEDED(){return n.errors_catalog_rateLimitExceeded_template({count:"{count}",window:"{window}"})},get CONCURRENT_LIMIT_EXCEEDED(){return n.errors_catalog_concurrentLimitExceeded_template({current:"{current}",max:"{max}"})}},ze={get AGENT_CREATION_FAILED(){return n.errors_catalog_agentCreationFailed_friendly()},get AGENT_ALREADY_EXISTS(){return n.errors_catalog_agentAlreadyExists_friendly()},get INVALID_AGENT_CONFIG(){return n.errors_catalog_invalidAgentConfig_friendly()},get INVALID_CONFIG(){return n.errors_catalog_invalidConfig_friendly()},get SESSION_NOT_FOUND(){return n.errors_catalog_sessionNotFound_friendly()},get SESSION_ALREADY_ACTIVE(){return n.errors_catalog_sessionAlreadyActive_friendly()},get SESSION_INITIALIZATION_FAILED(){return n.errors_catalog_sessionInitializationFailed_friendly()},get STREAM_CONNECTION_FAILED(){return n.errors_catalog_streamConnectionFailed_friendly()},get STREAM_TIMEOUT(){return n.errors_catalog_streamTimeout_friendly()},get STREAM_INTERRUPTED(){return n.errors_catalog_streamInterrupted_friendly()},get STREAM_RECOVERY_FAILED(){return n.errors_catalog_streamRecoveryFailed_friendly()},get MESSAGE_SEND_FAILED(){return n.errors_catalog_messageSendFailed_friendly()},get MESSAGE_VALIDATION_FAILED(){return n.errors_catalog_messageValidationFailed_friendly()},get MESSAGE_TOO_LONG(){return n.errors_catalog_messageTooLong_friendly()},get PROVIDER_NOT_FOUND(){return n.errors_catalog_providerNotFound_friendly()},get PROVIDER_CONNECTION_FAILED(){return n.errors_catalog_providerConnectionFailed_friendly()},get PROVIDER_PROCESS_DIED(){return n.errors_catalog_providerProcessDied_friendly()},get STORAGE_READ_FAILED(){return n.errors_catalog_storageReadFailed_friendly()},get STORAGE_WRITE_FAILED(){return n.errors_catalog_storageWriteFailed_friendly()},get STORAGE_CORRUPTED(){return n.errors_catalog_storageCorrupted_friendly()},get MEMORY_LIMIT_EXCEEDED(){return n.errors_catalog_memoryLimitExceeded_friendly()},get RATE_LIMIT_EXCEEDED(){return n.errors_catalog_rateLimitExceeded_friendly()},get CONCURRENT_LIMIT_EXCEEDED(){return n.errors_catalog_concurrentLimitExceeded_friendly()}};function He(i){return(i.match(/{(\w+)}/g)||[]).map(e=>e.slice(1,-1))}function Ke(i,s){return He(i).every(t=>t in s)}function Ie(i,s={}){return i.replace(/{(\w+)}/g,(e,t)=>String(s[t]??e))}function J(i){const s=n.errors_cleanMessage_fallback_error();if(!i)return s;let e=i;return e=e.replace(/^.*?failed(?:\s+to\s+.*?)?\s+after\s+\d+\s+attempts:\s*/i,""),e=e.replace(/^Error invoking remote method '[^']+':(\s*Error:)?\s*/i,""),e=e.replace(/^(Error:\s*)+/i,""),e=e.replace(/\n\s*at .+/g,""),e=e.replace(/\s+/g," ").trim(),e||s}function Qe(i,s){return s&&j[i]&&Ke(j[i],s)?Ie(j[i],s):ze[i]||n.errors_userFriendly_fallback_error()}function Ze(i){const e={AGENT_CREATION_FAILED:"AGENT_CREATION",AGENT_ALREADY_EXISTS:"AGENT_CREATION",INVALID_AGENT_CONFIG:"AGENT_CREATION",STREAM_CONNECTION_FAILED:"STREAMING",STREAM_TIMEOUT:"STREAMING",STREAM_INTERRUPTED:"STREAMING",STREAM_RECOVERY_FAILED:"STREAMING",STORAGE_READ_FAILED:"STORAGE",STORAGE_WRITE_FAILED:"STORAGE",STORAGE_CORRUPTED:"STORAGE",MEMORY_LIMIT_EXCEEDED:"MEMORY",RATE_LIMIT_EXCEEDED:"MEMORY",CONCURRENT_LIMIT_EXCEEDED:"MEMORY",PROVIDER_NOT_FOUND:"PROVIDER",PROVIDER_CONNECTION_FAILED:"PROVIDER",PROVIDER_PROCESS_DIED:"PROVIDER"}[i];return e?pe[e]:pe.GENERAL}const je={AGENT_CREATION_FAILED:[{action:"retry",description:"Try creating the agent again",automatic:!1,priority:"high"},{action:"check-config",description:"Verify agent configuration in settings",automatic:!1,priority:"high"},{action:"check-resources",description:"Ensure sufficient memory and disk space",automatic:!1,priority:"medium"}],AGENT_ALREADY_EXISTS:[{action:"rename",description:"Choose a different name for the agent",automatic:!1,priority:"high"},{action:"delete-existing",description:"Delete the existing agent first",automatic:!1,priority:"medium"}],INVALID_AGENT_CONFIG:[{action:"review-config",description:"Review and correct the configuration",automatic:!1,priority:"high"},{action:"use-defaults",description:"Reset to default configuration",automatic:!1,priority:"medium"}],INVALID_CONFIG:[{action:"review-config",description:"Review and correct the configuration",automatic:!1,priority:"high"},{action:"use-defaults",description:"Reset to default configuration",automatic:!1,priority:"medium"}],SESSION_NOT_FOUND:[{action:"start-new",description:"Start a new agent session",automatic:!1,priority:"high"},{action:"check-history",description:"Check session history for recent sessions",automatic:!1,priority:"medium"}],SESSION_ALREADY_ACTIVE:[{action:"wait",description:"Wait for the current session to complete",automatic:!1,priority:"high"},{action:"cancel",description:"Cancel the active session first",automatic:!1,priority:"high"}],SESSION_INITIALIZATION_FAILED:[{action:"retry",description:"Try initializing the session again",automatic:!1,priority:"high"},{action:"check-resources",description:"Ensure sufficient resources are available",automatic:!1,priority:"medium"}],MESSAGE_SEND_FAILED:[{action:"retry",description:"Try sending the message again",automatic:!1,priority:"high"},{action:"check-connection",description:"Check your network connection",automatic:!1,priority:"high"}],MESSAGE_VALIDATION_FAILED:[{action:"review-config",description:"Review and correct the message format",automatic:!1,priority:"high"},{action:"check-config",description:"Check configuration for valid message format",automatic:!1,priority:"medium"}],MESSAGE_TOO_LONG:[{action:"retry",description:"Shorten the message and try again",automatic:!1,priority:"high"},{action:"batch",description:"Split the message into multiple parts",automatic:!1,priority:"medium"}],PROVIDER_NOT_FOUND:[{action:"check-config",description:"Verify provider is properly configured",automatic:!1,priority:"high"},{action:"recreate",description:"Install or reinstall the provider",automatic:!1,priority:"high"}],PROVIDER_CONNECTION_FAILED:[{action:"retry",description:"Try connecting to the provider again",automatic:!1,priority:"high"},{action:"check-config",description:"Verify provider configuration",automatic:!1,priority:"high"}],STORAGE_READ_FAILED:[{action:"retry",description:"Try reading the data again",automatic:!1,priority:"high"},{action:"restore",description:"Restore from a recent backup",automatic:!1,priority:"medium"}],STORAGE_WRITE_FAILED:[{action:"retry",description:"Try saving again",automatic:!1,priority:"high"},{action:"check-resources",description:"Check available disk space",automatic:!1,priority:"high"}],STREAM_CONNECTION_FAILED:[{action:"retry",description:"Try connecting again",automatic:!1,priority:"high"},{action:"check-connection",description:"Check your network connection",automatic:!1,priority:"high"}],STREAM_RECOVERY_FAILED:[{action:"restart",description:"Restart the agent",automatic:!1,priority:"high"},{action:"check-config",description:"Check error logs for more details",automatic:!1,priority:"medium"}],STREAM_INTERRUPTED:[{action:"reconnect",description:"Attempting automatic reconnection",automatic:!0,priority:"high"},{action:"retry",description:"Retry sending the message",automatic:!1,priority:"high"},{action:"check-connection",description:"Check your internet connection",automatic:!1,priority:"medium"}],STREAM_TIMEOUT:[{action:"wait",description:"Wait for agent to complete processing",automatic:!1,priority:"high"},{action:"cancel",description:"Cancel current operation",automatic:!1,priority:"medium"},{action:"increase-timeout",description:"Increase timeout in settings",automatic:!1,priority:"low"}],PROVIDER_PROCESS_DIED:[{action:"restart",description:"Restart agent process",automatic:!0,priority:"high"},{action:"recreate",description:"Create new agent session",automatic:!1,priority:"high"}],STORAGE_CORRUPTED:[{action:"restore",description:"Restore from backup",automatic:!1,priority:"high"},{action:"reset",description:"Reset agent data",automatic:!1,priority:"medium"}],MEMORY_LIMIT_EXCEEDED:[{action:"cleanup",description:"Close unused agents",automatic:!1,priority:"high"},{action:"increase-limit",description:"Increase memory limit in settings",automatic:!1,priority:"medium"}],RATE_LIMIT_EXCEEDED:[{action:"wait",description:"Wait before making more requests",automatic:!1,priority:"high"},{action:"batch",description:"Batch requests together",automatic:!1,priority:"medium"}],CONCURRENT_LIMIT_EXCEEDED:[{action:"close-agents",description:"Close some running agents",automatic:!1,priority:"high"},{action:"queue",description:"Queue operation for later",automatic:!1,priority:"medium"}]};function Je(i){return je[i]||[{action:"retry",description:"Try the operation again",automatic:!1,priority:"high"}]}var D=(i=>(i.AGENT_CREATION_FAILED="AGENT_CREATION_FAILED",i.AGENT_ALREADY_EXISTS="AGENT_ALREADY_EXISTS",i.INVALID_AGENT_CONFIG="INVALID_AGENT_CONFIG",i.INVALID_CONFIG="INVALID_CONFIG",i.SESSION_NOT_FOUND="SESSION_NOT_FOUND",i.SESSION_ALREADY_ACTIVE="SESSION_ALREADY_ACTIVE",i.SESSION_INITIALIZATION_FAILED="SESSION_INITIALIZATION_FAILED",i.STREAM_CONNECTION_FAILED="STREAM_CONNECTION_FAILED",i.STREAM_TIMEOUT="STREAM_TIMEOUT",i.STREAM_INTERRUPTED="STREAM_INTERRUPTED",i.STREAM_RECOVERY_FAILED="STREAM_RECOVERY_FAILED",i.MESSAGE_SEND_FAILED="MESSAGE_SEND_FAILED",i.MESSAGE_VALIDATION_FAILED="MESSAGE_VALIDATION_FAILED",i.MESSAGE_TOO_LONG="MESSAGE_TOO_LONG",i.PROVIDER_NOT_FOUND="PROVIDER_NOT_FOUND",i.PROVIDER_CONNECTION_FAILED="PROVIDER_CONNECTION_FAILED",i.PROVIDER_PROCESS_DIED="PROVIDER_PROCESS_DIED",i.PROVIDER_UNAVAILABLE="PROVIDER_UNAVAILABLE",i.PROVIDER_ERROR="PROVIDER_ERROR",i.STORAGE_READ_FAILED="STORAGE_READ_FAILED",i.STORAGE_WRITE_FAILED="STORAGE_WRITE_FAILED",i.STORAGE_CORRUPTED="STORAGE_CORRUPTED",i.STORAGE_ERROR="STORAGE_ERROR",i.STORAGE_QUOTA_EXCEEDED="STORAGE_QUOTA_EXCEEDED",i.MEMORY_LIMIT_EXCEEDED="MEMORY_LIMIT_EXCEEDED",i.RATE_LIMIT_EXCEEDED="RATE_LIMIT_EXCEEDED",i.CONCURRENT_LIMIT_EXCEEDED="CONCURRENT_LIMIT_EXCEEDED",i.RESOURCE_NOT_FOUND="RESOURCE_NOT_FOUND",i.RESOURCE_EXHAUSTED="RESOURCE_EXHAUSTED",i.NETWORK_ERROR="NETWORK_ERROR",i.PERMISSION_DENIED="PERMISSION_DENIED",i.OPERATION_FAILED="OPERATION_FAILED",i.VALIDATION_ERROR="VALIDATION_ERROR",i.INVALID_RESPONSE="INVALID_RESPONSE",i.STATE_CORRUPTION="STATE_CORRUPTION",i.CONTEXT_OVERFLOW="CONTEXT_OVERFLOW",i))(D||{});class Y extends Error{constructor(e,t,r={},a){super(e);m(this,"code");m(this,"context");m(this,"recoverySuggestions");m(this,"userMessage");m(this,"isRecoverable");m(this,"cause");this.name="AgentError",this.code=t,this.context={...r,timestamp:new Date,stackTrace:this.stack},this.userMessage=a?.userMessage||this.getDefaultUserMessage(t),this.recoverySuggestions=a?.recoverySuggestions||this.getDefaultRecoverySuggestions(t),this.isRecoverable=a?.isRecoverable??this.isErrorRecoverable(t),a?.cause&&(this.cause=a.cause)}getDefaultUserMessage(e){return Qe(e,this.context)}getDefaultRecoverySuggestions(e){return Je(e)}isErrorRecoverable(e){return["STREAM_INTERRUPTED","STREAM_TIMEOUT","MESSAGE_SEND_FAILED","PROVIDER_PROCESS_DIED","STORAGE_READ_FAILED","STORAGE_WRITE_FAILED"].includes(e)}getHelpLink(){return Ze(this.code)}formatMessage(e){return Ie(e,this.context)}toJSON(){return{name:this.name,code:this.code,message:this.message,userMessage:this.userMessage,context:this.context,recoverySuggestions:this.recoverySuggestions,isRecoverable:this.isRecoverable,helpLink:this.getHelpLink(),stack:this.stack}}}const et={NON_RETRYABLE_ERRORS:["EACCES","EPERM","ENOSPC","EMFILE","permission","memory","fatal","process died","not available on your current plan","agent binary","rate limit","too many requests","hit your limit","you've hit your limit","quota exceeded"]};function ie(i){const s=i.toLowerCase();for(const e of et.NON_RETRYABLE_ERRORS)if(s.includes(e.toLowerCase()))return!0;return!1}const tt="Agent already has an in-flight prompt. Message was not delivered.",v=W("ErrorBoundary"),b=class b{constructor(){}static getInstance(){return b.instance||(b.instance=new b),b.instance}async wrap(s,e,t={}){const{retries:r=Re.DEFAULT_ATTEMPTS,retryDelay:a=Re.BASE_DELAY,exponentialBackoff:l=!0,notify:c=!1,notifyOnRetry:E=!1,context:f={},onError:u,onRetry:o,shouldRetry:R=this.defaultShouldRetry}=t;let g=null,d=0;for(d=1;d<=r+1;d++)try{v.debug(`[${e}] Attempt ${d}/${r+1}`);const h=await s();return d>1&&v.info(`[${e}] Succeeded after ${d} attempts`),h}catch(h){if(g=h,v.error(`[${e}] Attempt ${d} failed`,{error:g.message,attempt:d,maxAttempts:r+1,context:f}),u?.(g,d),d<=r&&R(g)){const C=l?a*Math.pow(2,d-1):a;E&&Q.warning(n.agent_errorBoundary_retrying_message({seconds:C/1e3})),o?.(d),v.info(`[${e}] Retrying in ${C}ms`),await this.sleep(C)}else break}const k=`${e} failed after ${d} attempt${d===1?"":"s"}: ${g?.message}`,P=J(g?.message||n.agent_errorBoundary_generic_error()),N=g?.message?.toLowerCase()||"",$=N.includes("no available models")||N.includes("all models exhausted")||N.includes("all models unavailable");throw c&&!$&&Q.error(P),new Y(P,D.OPERATION_FAILED,{originalError:g?.message,detailedMessage:k,attempts:d,context:f})}async wrapVoid(s,e,t={}){await this.wrap(s,e,t)}wrapSync(s,e,t={}){try{return s()}catch(r){const a=r;throw v.error(`[${e}] Failed`,{error:a.message,context:t.context}),t.notify&&Q.error(J(a.message)),new Y(J(a.message),D.OPERATION_FAILED,t.context)}}defaultShouldRetry(s){const e=s.message.toLowerCase();return ie(s.message)?!1:e.includes("network")||e.includes("timeout")?!0:s instanceof Y?[D.NETWORK_ERROR,D.STREAM_TIMEOUT,D.STREAM_CONNECTION_FAILED,D.PROVIDER_CONNECTION_FAILED,D.PROVIDER_UNAVAILABLE].includes(s.code):!(e.includes("invalid")||e.includes("interrupted")||e.includes("cancel")||e.includes("not found")||e.includes("not available")||e.includes("404")||e.includes("no available models")||e.includes("all models exhausted")||e.includes("all models unavailable")||e.includes("413")||e.includes("too long for the agent")||e.includes("request entity too large")||e.includes("payload too large")||e.includes("content too large")||e.includes("body too large")||e.includes("unauthorized")||e.includes("forbidden")||e.includes("401")||e.includes("403"))}sleep(s){return new Promise(e=>setTimeout(e,s))}async withTimeout(s,e,t){return Promise.race([s(),new Promise((r,a)=>setTimeout(()=>a(new Y(`${t} timed out after ${e}ms`,D.STREAM_TIMEOUT)),e))])}async batchOperations(s,e,t={}){const{concurrency:r=5,continueOnError:a=!0,operationName:l="batch operation"}=t,c=[],E=[];for(let f=0;f<s.length;f+=r){const u=s.slice(f,f+r);(await Promise.allSettled(u.map(R=>e(R)))).forEach((R,g)=>{if(R.status==="fulfilled")c.push(R.value);else{const d=R.reason;if(E.push({item:u[g],error:d}),v.error(`[${l}] Batch item failed`,{item:u[g],error:d.message}),!a)throw d}})}return E.length>0&&v.warn(`[${l}] Completed with ${E.length} errors`),{results:c,errors:E}}};m(b,"instance");let te=b;const st=te.getInstance(),se=W("browser/index"),F=new Map,B=new Map;let U;function it(i,s,e){for(const t of s)try{t(e)}catch(r){se.error("Error in agent subscriber callback",{agentId:i,error:r})}}function rt(){if(U)return;let i=!1;U=p.createSelector(e=>e.agentSessions)().subscribe(()=>{if(!i){i=!0;return}if(F.size===0)return;const e=p.state;for(const[t,r]of F){const a=Ae.select(e,t);B.get(t)!==a&&(B.set(t,a),it(t,r,a))}})}function at(){F.size>0||!U||(U(),U=void 0,B.clear())}function Ct(i,s,e){let t=F.get(i);const r=!t;t||(t=new Set,F.set(i,t)),t.add(s),rt();const a=p.state,l=Ae.select(a,i);return r&&B.set(i,l),l?se.debug("[subscribeToAgent] Initial callback data",{agentId:i,workspaceId:e??"current",hasSession:!0}):se.debug("[subscribeToAgent] No session found",{agentId:i,workspaceId:e??"current"}),s(l),()=>{const c=F.get(i);c&&(c.delete(s),c.size===0&&(F.delete(i),B.delete(i))),at()}}const y=W("ErrorRecovery"),Se={network:{maxRetries:3,initialBackoffMs:1e3,maxBackoffMs:1e4,backoffMultiplier:2,shouldRetry:i=>{const s=i.message.toLowerCase();return s.includes("network")||s.includes("fetch")||s.includes("connection")||s.includes("timeout")}},streaming:{maxRetries:5,initialBackoffMs:500,maxBackoffMs:5e3,backoffMultiplier:1.5,shouldRetry:(i,s)=>{if(s>=5)return!1;const e=i.message.toLowerCase();return e.includes("no available models")||e.includes("all models exhausted")||e.includes("all models unavailable")||ie(i.message)?!1:e.includes("stream")||e.includes("chunk")||e.includes("incomplete")}},persistence:{maxRetries:2,initialBackoffMs:100,maxBackoffMs:1e3,backoffMultiplier:2,shouldRetry:i=>{const s=i.message.toLowerCase();return s.includes("save")||s.includes("write")||s.includes("persist")}},rateLimit:{maxRetries:3,initialBackoffMs:5e3,maxBackoffMs:3e4,backoffMultiplier:2,shouldRetry:i=>{const s=i.message.toLowerCase();return s.includes("rate")||s.includes("limit")||s.includes("429")}}};class nt{constructor(){m(this,"listeners",new Map)}on(s,e){let t=this.listeners.get(s);t||(t=new Set,this.listeners.set(s,t)),t.add(e)}off(s,e){this.listeners.get(s)?.delete(e)}emit(s,...e){this.listeners.get(s)?.forEach(t=>{try{t(...e)}catch(r){y.error(`Error in event listener for ${s}:`,r)}})}removeAllListeners(){this.listeners.clear()}}class ot extends nt{constructor(){super(...arguments);m(this,"activeRecoveries",new Map);m(this,"recoveryStats",new Map)}async executeWithRecovery(e,t=Se.network,r){const a=Date.now(),l=new AbortController;r&&(this.cancelRecovery(r),this.activeRecoveries.set(r,l));let c,E=t.initialBackoffMs,f=0;for(let u=1;u<=t.maxRetries;u++){if(f=u,l.signal.aborted){y.info(`Recovery cancelled for operation ${r}`);break}try{y.debug(`Attempting operation (attempt ${u}/${t.maxRetries})`,{operationId:r});const o=await e();return this.updateStats(r,!0),this.emit("recovery:success",{operationId:r,attempt:u,duration:Date.now()-a}),r&&this.activeRecoveries.delete(r),{success:!0,data:o,attempts:u,totalTime:Date.now()-a}}catch(o){c=o,y.warn(`Operation failed (attempt ${u}/${t.maxRetries})`,{operationId:r,error:c.message});const R=c.message.toLowerCase();if(R.includes("interrupted")||R.includes("cancelled")||R.includes("canceled")){y.debug("User-initiated interruption/cancellation, not retrying",{operationId:r,error:c.message});break}if(R.includes("no available models")||R.includes("all models exhausted")||R.includes("all models unavailable")){y.debug("All models exhausted, not retrying",{operationId:r,error:c.message});break}if(ie(c.message)){y.debug("Fatal error detected, not retrying",{operationId:r,error:c.message});break}if(!t.shouldRetry(c,u)){y.debug("Error not retryable, stopping recovery",{operationId:r,error:c.message});break}if(u<t.maxRetries){const g=Math.random()*.2*E,d=Math.min(E+g,t.maxBackoffMs);t.onRetry?.(u,d),this.emit("recovery:retry",{operationId:r,attempt:u,delay:d,error:c.message}),await this.delay(d,l.signal),E=Math.min(E*t.backoffMultiplier,t.maxBackoffMs)}}}return this.updateStats(r,!1),t.onFailure?.(c,f),this.emit("recovery:failure",{operationId:r,attempts:f,duration:Date.now()-a,error:c?.message}),r&&this.activeRecoveries.delete(r),{success:!1,error:c,attempts:f,totalTime:Date.now()-a}}cancelRecovery(e){const t=this.activeRecoveries.get(e);t&&(t.abort(),this.activeRecoveries.delete(e),y.info(`Cancelled recovery for operation ${e}`))}cancelAllRecoveries(){for(const[e,t]of this.activeRecoveries)t.abort(),y.info(`Cancelled recovery for operation ${e}`);this.activeRecoveries.clear()}getStats(e){if(e)return this.recoveryStats.get(e)||{successes:0,failures:0};const t={};for(const[r,a]of this.recoveryStats)t[r]=a;return t}clearStats(e){e?this.recoveryStats.delete(e):this.recoveryStats.clear()}isRetryable(e,t){const r=e.message.toLowerCase();if(t)switch(t){case"NETWORK":return r.includes("network")||r.includes("fetch");case"TIMEOUT":return r.includes("timeout")||r.includes("timed out");case"RATE_LIMIT":return r.includes("rate")||r.includes("limit")||r.includes("429");case"TEMPORARY":return r.includes("temporary")||r.includes("transient");case"CONFLICT":return r.includes("conflict")||r.includes("concurrent");default:return!1}return this.isRetryable(e,"NETWORK")||this.isRetryable(e,"TIMEOUT")||this.isRetryable(e,"RATE_LIMIT")||this.isRetryable(e,"TEMPORARY")||this.isRetryable(e,"CONFLICT")}delay(e,t){return new Promise((r,a)=>{const l=setTimeout(r,e);if(t){const c=()=>{clearTimeout(l),a(new Error("Delay aborted"))};t.addEventListener("abort",c);const E=r;r=()=>{t.removeEventListener("abort",c),E()}}})}updateStats(e,t){if(!e)return;const r=this.recoveryStats.get(e)||{successes:0,failures:0};t?r.successes++:r.failures++,this.recoveryStats.set(e,r)}dispose(){this.cancelAllRecoveries(),this.recoveryStats.clear(),this.removeAllListeners()}}const ct=new ot,O=new Ye({category:"WorkspaceMetrics"}),lt=100;class ut{constructor(){m(this,"metrics",new Map);m(this,"operations",new Map)}startWorkspaceCreation(s){const e=Date.now();for(this.metrics.delete(s),this.metrics.set(s,{workspaceId:s,creationStarted:e});this.metrics.size>lt;){const t=this.metrics.keys().next().value;if(t===void 0)break;this.metrics.delete(t)}O.info("Started tracking workspace creation",{workspaceId:s})}recordMilestone(s,e){const t=this.metrics.get(s);if(!t){O.warn("No metrics found for workspace",{workspaceId:s,milestone:e});return}const r=Date.now();switch(e){case"optimisticNavigation":t.optimisticNavigation=r;break;case"realWorkspaceCreated":t.realWorkspaceCreated=r;break;case"agentCreated":t.agentCreated=r;break;case"agentReady":t.agentReady=r;break;case"firstMessageSent":t.firstMessageSent=r;break;case"firstResponseReceived":t.firstResponseReceived=r;break;case"firstChunkReceived":t.firstChunkReceived=r;break;case"totalDuration":t.totalDuration=r;break;case"workspaceId":case"creationStarted":O.warn("Cannot update milestone",{milestone:e});return}const a=r-t.creationStarted;O.info(`Milestone: ${e}`,{workspaceId:s,elapsed:`${a}ms`,timestamp:r}),e==="firstResponseReceived"&&(t.totalDuration=r-t.creationStarted,this.logSummary(s))}startOperation(s,e){this.operations.set(s,{startTime:Date.now(),metadata:e})}endOperation(s,e){const t=this.operations.get(s);if(!t)return O.warn("Operation not found",{operationId:s}),null;const r=Date.now();return t.endTime=r,t.duration=r-t.startTime,e&&(t.metadata={...t.metadata,...e}),O.info("Operation completed",{operationId:s,duration:`${t.duration}ms`,metadata:t.metadata}),this.operations.delete(s),t.duration}getMetrics(s){return this.metrics.get(s)}logSummary(s){const e=this.metrics.get(s);if(!e)return;const t={workspaceId:s,totalDuration:`${e.totalDuration}ms`,stages:{optimisticNavigation:e.optimisticNavigation?`${e.optimisticNavigation-e.creationStarted}ms`:"N/A",realWorkspaceCreation:e.realWorkspaceCreated?`${e.realWorkspaceCreated-e.creationStarted}ms`:"N/A",agentCreation:e.agentCreated?`${e.agentCreated-e.creationStarted}ms`:"N/A",agentReady:e.agentReady?`${e.agentReady-e.creationStarted}ms`:"N/A",firstMessage:e.firstMessageSent?`${e.firstMessageSent-e.creationStarted}ms`:"N/A",firstResponse:e.firstResponseReceived?`${e.firstResponseReceived-e.creationStarted}ms`:"N/A"}};O.info("=== Workspace Creation Metrics Summary ===",t),O.info("Workspace Creation Metrics:",t)}clearMetrics(s){this.metrics.delete(s)}incrementAgentCreated(s){const e=this.metrics.get(s);e&&(e.agentCreated=Date.now(),O.info("Agent created",{workspaceId:s}))}incrementMessageSent(s){const e=this.metrics.get(s);e&&!e.firstMessageSent&&(e.firstMessageSent=Date.now(),O.info("First message sent",{workspaceId:s}))}}const dt=new ut,M=W("AgentSend");function A(i){p.dispatch(i)}function Te(i){return typeof i=="object"&&i!==null&&!Array.isArray(i)}function mt(i){const s=Te(i)&&i.success===!0&&"data"in i?i.data:i;return!Te(s)||s.success!==!1?!1:typeof s.error=="string"&&s.error.includes(tt)}async function Lt(i,s,e,t={}){const r=he.select(p.state,e.id);if(!r)return;const a=Ne(i,e.id),l=t.submission,c=!!l&&Le.select(p.state,l.scope)?.supported===!0,E=(o,R,g=!1)=>{l&&A(Be(l.scope,l.id,o,Date.now(),R,g))};let f=!1;const u=()=>(!l||f||ve.select(p.state,l))&&r===he.select(p.state,e.id)&&a.isCurrent(p.state.agentSessions?.byAgentId[i]?.workspaceId);return qe.track(`sendMessage:${a.key}:${i}:${l?.id??"legacy"}`,async()=>{if(!u())return;M.debug(`Sending message to agent ${i}`,{contentLength:s.length,hasContextReferences:!!t.contextReferences?.length,model:t.model});let o=await p.dispatch(we(e.id,i));if(u()){if(!o)throw new Error(n.agent_streamLifecycle_sessionNotFound_error({agentId:i}));o={...o,isStreaming:o.isStreaming??!1};{if(o&&(o.status==="pending"||!o.id)&&!o.backendSessionId&&o.activationState!==H.ACTIVE&&o.activationState!==H.ACTIVATING){const h=e.id.startsWith("optimistic-"),C=e.worktreePath||e.repositoryPath||e.path;if(!h&&C){M.info("Activating pending session in sendMessage",{agentId:i,status:o.status,activationState:o.activationState,hasBackendSessionId:!!o.backendSessionId});const x=await p.dispatch(be(e.id,i));if(!u())return;x&&(o=x)}else throw M.warn("Cannot activate agent - workspace not ready",{agentId:i,workspaceId:e.id,isOptimistic:h,hasWorktreePath:!!e.worktreePath,hasRepositoryPath:!!e.repositoryPath,hasPath:!!e.path}),new Error(n.agent_streamLifecycle_spaceNotReady_error())}else o&&o.status==="pending"&&o.backendSessionId&&(M.info("Fixing status for already-activated session",{agentId:i,backendSessionId:o.backendSessionId,activationState:o.activationState}),o={...o,status:Fe.Active,activationState:H.ACTIVE},A(de({...o,workspaceId:e.id})));if(!o)throw new Error(`Failed to get or create session for agent ${i}`);A(de({...o,workspaceId:e.id}));const g=[{type:"text",text:s}];if(t.imageBlocks)for(const h of t.imageBlocks)g.push({type:"image",...h.data!==void 0?{data:h.data}:{},...h.mimeType!==void 0?{mimeType:h.mimeType}:{},...h.attachmentId!==void 0?{attachmentId:h.attachmentId}:{}});if(t.fileBlocks)for(const h of t.fileBlocks)g.push({type:"file",attachmentId:h.attachmentId,fileName:h.fileName,...h.mimeType!==void 0?{mimeType:h.mimeType}:{},...h.size!==void 0?{size:h.size}:{}});const d=t.userAppMessageId??oe(),k=t.messageMetadata?.[ge],P={...t.contextReferences?.length?{contextReferences:t.contextReferences}:{},...k!==void 0?{[ge]:k}:{}},N={id:me(le()),appMessageId:d,role:"user",contentBlocks:g,timestamp:new Date().toISOString(),metadata:{...P,...t.messageMetadata??{}}};c||(l&&(E("rejected"),f=!0),A(ke(o.id,N))),A(z(o.id,!0));let $=!1;try{c||await p.dispatch(Ge(e.id,i,!0,{allowTruncation:t.resetHistory}));const h=me(`msg_${le()}`),C=oe(),x=async()=>st.wrap(async()=>{if(!u())return;M.info("Agent Service: Sending message to backend with image and file blocks",{agentId:i,sessionId:o.id,hasImageBlocks:!!t.imageBlocks,imageBlocksCount:t.imageBlocks?.length||0,imageBlockDetails:t.imageBlocks?.map(_=>({type:_.type,mimeType:_.mimeType,dataLength:_.data?.length||0}))||[],hasFileBlocks:!!t.fileBlocks,fileBlocksCount:t.fileBlocks?.length||0,fileBlockDetails:t.fileBlocks?.map(_=>({type:_.type,fileName:_.fileName,mimeType:_.mimeType,attachmentId:_.attachmentId,size:_.size}))||[]});const Oe=t.model??t.modelId??o.model??void 0;A(Pe(i));const ye=ce(i,e.id),ae=p.state.chatState?.byAgentId[i]?.attemptGeneration??0,T=await $e("agent.sendMessage",{agentId:i,...c&&l?{messageId:l.id}:{},workspaceId:e.id,content:s,model:Oe,contextReferences:t.contextReferences,imageBlocks:t.imageBlocks,fileBlocks:t.fileBlocks,noteIds:t.noteIds,stdinContext:t.stdinContext,assistantMessageId:h,userAppMessageId:d,assistantAppMessageId:C,priority:t.priority,...t.messageMetadata?{messageMetadata:t.messageMetadata}:{}}).catch(_=>{if(u())throw _});if(u()){if(mt(T)){M.info("Backend dropped duplicate in-flight prompt",{agentId:i,sessionId:o.id}),E("rejected");return}if(T&&typeof T=="object"&&"success"in T){if(!T.success){const _=T.error,I=typeof _=="string"?_:_?.message;throw $=!0,new Error(I||n.agent_streamLifecycle_sendToBackendFailed_error())}if("queued"in T&&T.queued===!0){if(M.info("sendMessage auto-queued by daemon (mid-turn or turn-startup race)",{agentId:i,sessionId:o.id,queuedMessageId:T.queuedMessage?.id}),(!c||!l||!ue.select(p.state,l))&&A(z(o.id,!1)),c||A(xe(o.id,N.id)),c){const I=T.queuedMessage,G=T.turnId,L=typeof G=="string"?G:I?.turnId;if(I&&typeof L=="string"){const S=Ee(s,t),X=K.select(p.state,i,e.id).find(ne=>ne.id===I.id||ne.turnId===L);A(fe(i,I.id,S,L,_e(X??I,S),!X&&!!l&&ue.select(p.state,l),ae))}E("accepted",I,!0),q(i,e.id);return}const _=T.queuedMessage;if(_){const I=T.turnId,G=typeof I=="string"?I:_.turnId;let L=_;if(u()&&ce(i,e.id)===ye){const S=K.select(p.state,i,e.id),X=We(S,_);A(Ve(i,X,e.id))}else u()&&(M.debug("queued-response queue seed superseded by an authoritative snapshot; reconciling via hydrate",{agentId:i,queuedMessageId:_.id}),await q(i,e.id).catch(()=>{}),L=K.select(p.state,i,e.id).find(S=>S.id===_.id||S.turnId===G));if(u()&&typeof G=="string"){const S=Ee(s,t);A(fe(i,_.id,S,G,_e(L??_,S),!L,ae))}else u()&&M.warn("auto-queued sendMessage response carried no turnId; retry record not parked",{agentId:i,queuedMessageId:_.id})}return}}c&&(E("accepted"),q(i,e.id),Ce(i,e.id)),dt.incrementMessageSent(e.id)}},"send message",{retries:c?0:2,notify:!1,context:{agentId:i,workspace:e.id}}),re=c?await x().then(()=>({success:!0,error:void 0})):await ct.executeWithRecovery(x,Se.streaming,`send-message-${i}`);if(!re.success)throw re.error||new Error(n.agent_streamLifecycle_sendFailed_error())}catch(h){if(!u())return;throw A(z(o.id,!1)),!c&&t.messageMetadata&&A(Ue(o.id,N.id,{metadata:P})),c&&E($?"rejected":"uncertain"),h}}}},{memoize:!1,coalesce:!0,priority:"high"})}export{Ct as a,J as c,We as r,Lt as s};
1
+ var Me=Object.defineProperty;var De=(i,s,e)=>s in i?Me(i,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[s]=e;var m=(i,s,e)=>De(i,typeof s!="symbol"?s+"":s,e);import{x as Ne,J as oe,Z as ce,ai as q,ar as Ce}from"./D8oCNZJt.js";import{bY as Le,cX as le,co as ue,cn as ve}from"./Baz0g_kI.js";import{Iv as p,Bd as we,bx as be,e as Fe,Ky as de,i8 as me,bJ as ke,D8 as z,BC as Ge,f6 as Pe,zI as xe,dT as Ee,f2 as fe,dS as _e,Ab as Ve,Kc as Ue,vQ as Be}from"./BmagX6n5.js";import{aC as Ae,dG as he,A as H,P as ge,ay as K}from"./DpNO08YA.js";import{h as $e}from"./ClQp3PSY.js";import{c as W}from"./ChTqQfQN.js";import{a as Xe}from"./BdWqymET.js";import{k as Q}from"./B7lF313M.js";import"./DYhIMPy1.js";import{bo as n}from"./CT36W95j.js";import"./TRV263rQ.js";import"./DHClt9az.js";import"./CJyP11U5.js";import{R as Re}from"./BvFAWM27.js";import{L as Ye}from"./CSiaiLHL.js";function We(i,s){return i.some(e=>e.id===s.id)?i.map(e=>e.id===s.id?{...s,...s.author==null&&e.author!==void 0?{author:e.author}:{}}:e):[...i,s]}const Z=typeof performance<"u"?performance:{now:()=>Date.now()},V=new Xe("PerformanceOptimizer"),w=class w{constructor(){m(this,"metricsBuffer");m(this,"metricsIndex",0);m(this,"metricsCount",0);m(this,"MAX_METRICS",500);m(this,"TARGET_RESPONSE_TIME",100);m(this,"memoCache",new Map);m(this,"MEMO_TTL",6e4);m(this,"MAX_CACHE_SIZE",100);m(this,"cacheHits",0);m(this,"cacheMisses",0);m(this,"pendingRequests",new Map);m(this,"requestQueue",[]);m(this,"cleanupInterval",null);this.metricsBuffer=new Array(this.MAX_METRICS).fill(null),this.startCacheCleanup(),V.info("PerformanceOptimizer initialized")}static getInstance(){return w.instance||(w.instance=new w),w.instance}reset(){this.metricsBuffer=new Array(this.MAX_METRICS).fill(null),this.metricsIndex=0,this.metricsCount=0,this.memoCache.clear(),this.pendingRequests.clear(),this.requestQueue=[],this.cacheHits=0,this.cacheMisses=0}clearCache(){this.memoCache.clear(),this.cacheHits=0,this.cacheMisses=0}async processBatch(s,e,t={}){const{batchSize:r=10,concurrency:a=4}=t,l=[];for(let c=0;c<s.length;c+=r){const f=s.slice(c,c+r).map((o,R)=>{const g=Math.floor(R/a)*10;return new Promise(d=>{setTimeout(async()=>{const k=await e(o);d(k)},g)})}),u=await Promise.all(f);l.push(...u)}return l}startCacheCleanup(){this.cleanupInterval=setInterval(()=>{this.cleanupCache()},3e4)}stopCacheCleanup(){this.cleanupInterval&&(clearInterval(this.cleanupInterval),this.cleanupInterval=null)}cleanupCache(){const s=Date.now(),e=[];this.memoCache.forEach((t,r)=>{s-t.timestamp>this.MEMO_TTL&&e.push(r)}),e.forEach(t=>this.memoCache.delete(t)),this.memoCache.size>this.MAX_CACHE_SIZE&&Array.from(this.memoCache.entries()).sort((a,l)=>a[1].hits-l[1].hits||a[1].timestamp-l[1].timestamp).slice(0,this.memoCache.size-this.MAX_CACHE_SIZE).forEach(([a])=>this.memoCache.delete(a))}async track(s,e,t={}){const r=Z.now();try{const a=t.cacheKey||s;if(t.memoize){const f=this.getMemoized(a);if(f!==void 0)return this.cacheHits++,V.debug("Memoized result used",{operation:s,cacheKey:a,hits:this.cacheHits}),f;this.cacheMisses++}if(t.coalesce){const f=this.pendingRequests.get(s);if(f)return V.debug("Request coalesced",{operation:s}),f}let l;t.coalesce?(l=t.timeout?this.withTimeout(e(),t.timeout):e(),this.pendingRequests.set(s,l)):l=t.timeout?this.withTimeout(e(),t.timeout):e();const c=await l;t.memoize&&this.memoize(a,c);const E=Z.now()-r;return this.recordMetric(s,E,!0,{strategy:t.priority||"normal",memoized:t.memoize||!1,coalesced:t.coalesce||!1}),E>this.TARGET_RESPONSE_TIME&&V.warn("Operation exceeded target time",{operation:s,duration:Math.round(E),target:this.TARGET_RESPONSE_TIME}),c}catch(a){const l=Z.now()-r;throw this.recordMetric(s,l,!1,{error:a instanceof Error?a.message:"Unknown error"}),a}finally{t.coalesce&&this.pendingRequests.delete(s)}}getStats(){if(this.metricsCount===0)return{avgResponseTime:0,p95ResponseTime:0,p99ResponseTime:0,successRate:100,slowOperations:[]};const s=[],e=this.metricsCount<this.MAX_METRICS?0:this.metricsIndex;for(let u=0;u<this.metricsCount;u++){const o=this.metricsBuffer[(e+u)%this.MAX_METRICS];o&&s.push(o)}if(s.length===0)return{avgResponseTime:0,p95ResponseTime:0,p99ResponseTime:0,successRate:100,slowOperations:[]};const t=s.sort((u,o)=>u.duration-o.duration);let r=0,a=0;const l=new Set;for(const u of s)a+=u.duration,u.success&&r++,u.duration>this.TARGET_RESPONSE_TIME&&l.add(u.operation);const c=a/s.length,E=Math.floor(t.length*.95),f=Math.floor(t.length*.99);return{avgResponseTime:Math.round(c),p95ResponseTime:Math.round(t[E]?.duration||0),p99ResponseTime:Math.round(t[f]?.duration||0),successRate:r/s.length*100,slowOperations:Array.from(l)}}getCacheStats(){const s=this.cacheHits+this.cacheMisses;return{size:this.memoCache.size,hitRate:s>0?this.cacheHits/s*100:0,hits:this.cacheHits,misses:this.cacheMisses}}getMemoized(s){const e=this.memoCache.get(s);if(e){if(Date.now()-e.timestamp>this.MEMO_TTL){this.memoCache.delete(s);return}return e.hits++,e.value}}memoize(s,e){const t=JSON.stringify(e).length;this.memoCache.set(s,{value:e,timestamp:Date.now(),hits:0,size:t}),this.memoCache.size>this.MAX_CACHE_SIZE&&this.cleanupCache()}async withTimeout(s,e){return Promise.race([s,new Promise((t,r)=>setTimeout(()=>r(new Error(`Operation timed out after ${e}ms`)),e))])}recordMetric(s,e,t,r){this.metricsBuffer[this.metricsIndex]={operation:s,duration:e,timestamp:Date.now(),success:t,metadata:r},this.metricsIndex=(this.metricsIndex+1)%this.MAX_METRICS,this.metricsCount<this.MAX_METRICS&&this.metricsCount++,e>this.TARGET_RESPONSE_TIME&&V.warn("Slow operation detected",{operation:s,duration:`${e.toFixed(2)}ms`,target:`${this.TARGET_RESPONSE_TIME}ms`,metadata:r})}};m(w,"instance");let ee=w;const qe=ee.getInstance(),pe={AGENT_CREATION:"https://docs.example.com/agent-creation",STREAMING:"https://docs.example.com/streaming-issues",STORAGE:"https://docs.example.com/storage-troubleshooting",MEMORY:"https://docs.example.com/memory-management",PROVIDER:"https://docs.example.com/provider-setup",GENERAL:"https://docs.example.com/help"},j={get AGENT_CREATION_FAILED(){return n.errors_catalog_agentCreationFailed_template({agentName:"{agentName}",details:"{details}"})},get AGENT_ALREADY_EXISTS(){return n.errors_catalog_agentAlreadyExists_template({agentName:"{agentName}"})},get INVALID_AGENT_CONFIG(){return n.errors_catalog_invalidAgentConfig_template({details:"{details}"})},get INVALID_CONFIG(){return n.errors_catalog_invalidConfig_template({details:"{details}"})},get SESSION_NOT_FOUND(){return n.errors_catalog_sessionNotFound_template({sessionId:"{sessionId}"})},get SESSION_ALREADY_ACTIVE(){return n.errors_catalog_sessionAlreadyActive_template()},get SESSION_INITIALIZATION_FAILED(){return n.errors_catalog_sessionInitializationFailed_template({details:"{details}"})},get STREAM_CONNECTION_FAILED(){return n.errors_catalog_streamConnectionFailed_template({details:"{details}"})},get STREAM_TIMEOUT(){return n.errors_catalog_streamTimeout_template({timeout:"{timeout}"})},get STREAM_INTERRUPTED(){return n.errors_catalog_streamInterrupted_template({attempt:"{attempt}",maxAttempts:"{maxAttempts}"})},get STREAM_RECOVERY_FAILED(){return n.errors_catalog_streamRecoveryFailed_template({attempts:"{attempts}"})},get MESSAGE_SEND_FAILED(){return n.errors_catalog_messageSendFailed_template({details:"{details}"})},get MESSAGE_VALIDATION_FAILED(){return n.errors_catalog_messageValidationFailed_template({details:"{details}"})},get MESSAGE_TOO_LONG(){return n.errors_catalog_messageTooLong_template({maxLength:"{maxLength}",currentLength:"{currentLength}"})},get PROVIDER_NOT_FOUND(){return n.errors_catalog_providerNotFound_template({provider:"{provider}"})},get PROVIDER_CONNECTION_FAILED(){return n.errors_catalog_providerConnectionFailed_template({provider:"{provider}",details:"{details}"})},get PROVIDER_PROCESS_DIED(){return n.errors_catalog_providerProcessDied_template({provider:"{provider}"})},get STORAGE_READ_FAILED(){return n.errors_catalog_storageReadFailed_template({details:"{details}"})},get STORAGE_WRITE_FAILED(){return n.errors_catalog_storageWriteFailed_template({details:"{details}"})},get STORAGE_CORRUPTED(){return n.errors_catalog_storageCorrupted_template({lastBackup:"{lastBackup}"})},get MEMORY_LIMIT_EXCEEDED(){return n.errors_catalog_memoryLimitExceeded_template({currentUsage:"{currentUsage}",limit:"{limit}"})},get RATE_LIMIT_EXCEEDED(){return n.errors_catalog_rateLimitExceeded_template({count:"{count}",window:"{window}"})},get CONCURRENT_LIMIT_EXCEEDED(){return n.errors_catalog_concurrentLimitExceeded_template({current:"{current}",max:"{max}"})}},ze={get AGENT_CREATION_FAILED(){return n.errors_catalog_agentCreationFailed_friendly()},get AGENT_ALREADY_EXISTS(){return n.errors_catalog_agentAlreadyExists_friendly()},get INVALID_AGENT_CONFIG(){return n.errors_catalog_invalidAgentConfig_friendly()},get INVALID_CONFIG(){return n.errors_catalog_invalidConfig_friendly()},get SESSION_NOT_FOUND(){return n.errors_catalog_sessionNotFound_friendly()},get SESSION_ALREADY_ACTIVE(){return n.errors_catalog_sessionAlreadyActive_friendly()},get SESSION_INITIALIZATION_FAILED(){return n.errors_catalog_sessionInitializationFailed_friendly()},get STREAM_CONNECTION_FAILED(){return n.errors_catalog_streamConnectionFailed_friendly()},get STREAM_TIMEOUT(){return n.errors_catalog_streamTimeout_friendly()},get STREAM_INTERRUPTED(){return n.errors_catalog_streamInterrupted_friendly()},get STREAM_RECOVERY_FAILED(){return n.errors_catalog_streamRecoveryFailed_friendly()},get MESSAGE_SEND_FAILED(){return n.errors_catalog_messageSendFailed_friendly()},get MESSAGE_VALIDATION_FAILED(){return n.errors_catalog_messageValidationFailed_friendly()},get MESSAGE_TOO_LONG(){return n.errors_catalog_messageTooLong_friendly()},get PROVIDER_NOT_FOUND(){return n.errors_catalog_providerNotFound_friendly()},get PROVIDER_CONNECTION_FAILED(){return n.errors_catalog_providerConnectionFailed_friendly()},get PROVIDER_PROCESS_DIED(){return n.errors_catalog_providerProcessDied_friendly()},get STORAGE_READ_FAILED(){return n.errors_catalog_storageReadFailed_friendly()},get STORAGE_WRITE_FAILED(){return n.errors_catalog_storageWriteFailed_friendly()},get STORAGE_CORRUPTED(){return n.errors_catalog_storageCorrupted_friendly()},get MEMORY_LIMIT_EXCEEDED(){return n.errors_catalog_memoryLimitExceeded_friendly()},get RATE_LIMIT_EXCEEDED(){return n.errors_catalog_rateLimitExceeded_friendly()},get CONCURRENT_LIMIT_EXCEEDED(){return n.errors_catalog_concurrentLimitExceeded_friendly()}};function He(i){return(i.match(/{(\w+)}/g)||[]).map(e=>e.slice(1,-1))}function Ke(i,s){return He(i).every(t=>t in s)}function Ie(i,s={}){return i.replace(/{(\w+)}/g,(e,t)=>String(s[t]??e))}function J(i){const s=n.errors_cleanMessage_fallback_error();if(!i)return s;let e=i;return e=e.replace(/^.*?failed(?:\s+to\s+.*?)?\s+after\s+\d+\s+attempts:\s*/i,""),e=e.replace(/^Error invoking remote method '[^']+':(\s*Error:)?\s*/i,""),e=e.replace(/^(Error:\s*)+/i,""),e=e.replace(/\n\s*at .+/g,""),e=e.replace(/\s+/g," ").trim(),e||s}function Qe(i,s){return s&&j[i]&&Ke(j[i],s)?Ie(j[i],s):ze[i]||n.errors_userFriendly_fallback_error()}function Ze(i){const e={AGENT_CREATION_FAILED:"AGENT_CREATION",AGENT_ALREADY_EXISTS:"AGENT_CREATION",INVALID_AGENT_CONFIG:"AGENT_CREATION",STREAM_CONNECTION_FAILED:"STREAMING",STREAM_TIMEOUT:"STREAMING",STREAM_INTERRUPTED:"STREAMING",STREAM_RECOVERY_FAILED:"STREAMING",STORAGE_READ_FAILED:"STORAGE",STORAGE_WRITE_FAILED:"STORAGE",STORAGE_CORRUPTED:"STORAGE",MEMORY_LIMIT_EXCEEDED:"MEMORY",RATE_LIMIT_EXCEEDED:"MEMORY",CONCURRENT_LIMIT_EXCEEDED:"MEMORY",PROVIDER_NOT_FOUND:"PROVIDER",PROVIDER_CONNECTION_FAILED:"PROVIDER",PROVIDER_PROCESS_DIED:"PROVIDER"}[i];return e?pe[e]:pe.GENERAL}const je={AGENT_CREATION_FAILED:[{action:"retry",description:"Try creating the agent again",automatic:!1,priority:"high"},{action:"check-config",description:"Verify agent configuration in settings",automatic:!1,priority:"high"},{action:"check-resources",description:"Ensure sufficient memory and disk space",automatic:!1,priority:"medium"}],AGENT_ALREADY_EXISTS:[{action:"rename",description:"Choose a different name for the agent",automatic:!1,priority:"high"},{action:"delete-existing",description:"Delete the existing agent first",automatic:!1,priority:"medium"}],INVALID_AGENT_CONFIG:[{action:"review-config",description:"Review and correct the configuration",automatic:!1,priority:"high"},{action:"use-defaults",description:"Reset to default configuration",automatic:!1,priority:"medium"}],INVALID_CONFIG:[{action:"review-config",description:"Review and correct the configuration",automatic:!1,priority:"high"},{action:"use-defaults",description:"Reset to default configuration",automatic:!1,priority:"medium"}],SESSION_NOT_FOUND:[{action:"start-new",description:"Start a new agent session",automatic:!1,priority:"high"},{action:"check-history",description:"Check session history for recent sessions",automatic:!1,priority:"medium"}],SESSION_ALREADY_ACTIVE:[{action:"wait",description:"Wait for the current session to complete",automatic:!1,priority:"high"},{action:"cancel",description:"Cancel the active session first",automatic:!1,priority:"high"}],SESSION_INITIALIZATION_FAILED:[{action:"retry",description:"Try initializing the session again",automatic:!1,priority:"high"},{action:"check-resources",description:"Ensure sufficient resources are available",automatic:!1,priority:"medium"}],MESSAGE_SEND_FAILED:[{action:"retry",description:"Try sending the message again",automatic:!1,priority:"high"},{action:"check-connection",description:"Check your network connection",automatic:!1,priority:"high"}],MESSAGE_VALIDATION_FAILED:[{action:"review-config",description:"Review and correct the message format",automatic:!1,priority:"high"},{action:"check-config",description:"Check configuration for valid message format",automatic:!1,priority:"medium"}],MESSAGE_TOO_LONG:[{action:"retry",description:"Shorten the message and try again",automatic:!1,priority:"high"},{action:"batch",description:"Split the message into multiple parts",automatic:!1,priority:"medium"}],PROVIDER_NOT_FOUND:[{action:"check-config",description:"Verify provider is properly configured",automatic:!1,priority:"high"},{action:"recreate",description:"Install or reinstall the provider",automatic:!1,priority:"high"}],PROVIDER_CONNECTION_FAILED:[{action:"retry",description:"Try connecting to the provider again",automatic:!1,priority:"high"},{action:"check-config",description:"Verify provider configuration",automatic:!1,priority:"high"}],STORAGE_READ_FAILED:[{action:"retry",description:"Try reading the data again",automatic:!1,priority:"high"},{action:"restore",description:"Restore from a recent backup",automatic:!1,priority:"medium"}],STORAGE_WRITE_FAILED:[{action:"retry",description:"Try saving again",automatic:!1,priority:"high"},{action:"check-resources",description:"Check available disk space",automatic:!1,priority:"high"}],STREAM_CONNECTION_FAILED:[{action:"retry",description:"Try connecting again",automatic:!1,priority:"high"},{action:"check-connection",description:"Check your network connection",automatic:!1,priority:"high"}],STREAM_RECOVERY_FAILED:[{action:"restart",description:"Restart the agent",automatic:!1,priority:"high"},{action:"check-config",description:"Check error logs for more details",automatic:!1,priority:"medium"}],STREAM_INTERRUPTED:[{action:"reconnect",description:"Attempting automatic reconnection",automatic:!0,priority:"high"},{action:"retry",description:"Retry sending the message",automatic:!1,priority:"high"},{action:"check-connection",description:"Check your internet connection",automatic:!1,priority:"medium"}],STREAM_TIMEOUT:[{action:"wait",description:"Wait for agent to complete processing",automatic:!1,priority:"high"},{action:"cancel",description:"Cancel current operation",automatic:!1,priority:"medium"},{action:"increase-timeout",description:"Increase timeout in settings",automatic:!1,priority:"low"}],PROVIDER_PROCESS_DIED:[{action:"restart",description:"Restart agent process",automatic:!0,priority:"high"},{action:"recreate",description:"Create new agent session",automatic:!1,priority:"high"}],STORAGE_CORRUPTED:[{action:"restore",description:"Restore from backup",automatic:!1,priority:"high"},{action:"reset",description:"Reset agent data",automatic:!1,priority:"medium"}],MEMORY_LIMIT_EXCEEDED:[{action:"cleanup",description:"Close unused agents",automatic:!1,priority:"high"},{action:"increase-limit",description:"Increase memory limit in settings",automatic:!1,priority:"medium"}],RATE_LIMIT_EXCEEDED:[{action:"wait",description:"Wait before making more requests",automatic:!1,priority:"high"},{action:"batch",description:"Batch requests together",automatic:!1,priority:"medium"}],CONCURRENT_LIMIT_EXCEEDED:[{action:"close-agents",description:"Close some running agents",automatic:!1,priority:"high"},{action:"queue",description:"Queue operation for later",automatic:!1,priority:"medium"}]};function Je(i){return je[i]||[{action:"retry",description:"Try the operation again",automatic:!1,priority:"high"}]}var D=(i=>(i.AGENT_CREATION_FAILED="AGENT_CREATION_FAILED",i.AGENT_ALREADY_EXISTS="AGENT_ALREADY_EXISTS",i.INVALID_AGENT_CONFIG="INVALID_AGENT_CONFIG",i.INVALID_CONFIG="INVALID_CONFIG",i.SESSION_NOT_FOUND="SESSION_NOT_FOUND",i.SESSION_ALREADY_ACTIVE="SESSION_ALREADY_ACTIVE",i.SESSION_INITIALIZATION_FAILED="SESSION_INITIALIZATION_FAILED",i.STREAM_CONNECTION_FAILED="STREAM_CONNECTION_FAILED",i.STREAM_TIMEOUT="STREAM_TIMEOUT",i.STREAM_INTERRUPTED="STREAM_INTERRUPTED",i.STREAM_RECOVERY_FAILED="STREAM_RECOVERY_FAILED",i.MESSAGE_SEND_FAILED="MESSAGE_SEND_FAILED",i.MESSAGE_VALIDATION_FAILED="MESSAGE_VALIDATION_FAILED",i.MESSAGE_TOO_LONG="MESSAGE_TOO_LONG",i.PROVIDER_NOT_FOUND="PROVIDER_NOT_FOUND",i.PROVIDER_CONNECTION_FAILED="PROVIDER_CONNECTION_FAILED",i.PROVIDER_PROCESS_DIED="PROVIDER_PROCESS_DIED",i.PROVIDER_UNAVAILABLE="PROVIDER_UNAVAILABLE",i.PROVIDER_ERROR="PROVIDER_ERROR",i.STORAGE_READ_FAILED="STORAGE_READ_FAILED",i.STORAGE_WRITE_FAILED="STORAGE_WRITE_FAILED",i.STORAGE_CORRUPTED="STORAGE_CORRUPTED",i.STORAGE_ERROR="STORAGE_ERROR",i.STORAGE_QUOTA_EXCEEDED="STORAGE_QUOTA_EXCEEDED",i.MEMORY_LIMIT_EXCEEDED="MEMORY_LIMIT_EXCEEDED",i.RATE_LIMIT_EXCEEDED="RATE_LIMIT_EXCEEDED",i.CONCURRENT_LIMIT_EXCEEDED="CONCURRENT_LIMIT_EXCEEDED",i.RESOURCE_NOT_FOUND="RESOURCE_NOT_FOUND",i.RESOURCE_EXHAUSTED="RESOURCE_EXHAUSTED",i.NETWORK_ERROR="NETWORK_ERROR",i.PERMISSION_DENIED="PERMISSION_DENIED",i.OPERATION_FAILED="OPERATION_FAILED",i.VALIDATION_ERROR="VALIDATION_ERROR",i.INVALID_RESPONSE="INVALID_RESPONSE",i.STATE_CORRUPTION="STATE_CORRUPTION",i.CONTEXT_OVERFLOW="CONTEXT_OVERFLOW",i))(D||{});class Y extends Error{constructor(e,t,r={},a){super(e);m(this,"code");m(this,"context");m(this,"recoverySuggestions");m(this,"userMessage");m(this,"isRecoverable");m(this,"cause");this.name="AgentError",this.code=t,this.context={...r,timestamp:new Date,stackTrace:this.stack},this.userMessage=a?.userMessage||this.getDefaultUserMessage(t),this.recoverySuggestions=a?.recoverySuggestions||this.getDefaultRecoverySuggestions(t),this.isRecoverable=a?.isRecoverable??this.isErrorRecoverable(t),a?.cause&&(this.cause=a.cause)}getDefaultUserMessage(e){return Qe(e,this.context)}getDefaultRecoverySuggestions(e){return Je(e)}isErrorRecoverable(e){return["STREAM_INTERRUPTED","STREAM_TIMEOUT","MESSAGE_SEND_FAILED","PROVIDER_PROCESS_DIED","STORAGE_READ_FAILED","STORAGE_WRITE_FAILED"].includes(e)}getHelpLink(){return Ze(this.code)}formatMessage(e){return Ie(e,this.context)}toJSON(){return{name:this.name,code:this.code,message:this.message,userMessage:this.userMessage,context:this.context,recoverySuggestions:this.recoverySuggestions,isRecoverable:this.isRecoverable,helpLink:this.getHelpLink(),stack:this.stack}}}const et={NON_RETRYABLE_ERRORS:["EACCES","EPERM","ENOSPC","EMFILE","permission","memory","fatal","process died","not available on your current plan","agent binary","rate limit","too many requests","hit your limit","you've hit your limit","quota exceeded"]};function ie(i){const s=i.toLowerCase();for(const e of et.NON_RETRYABLE_ERRORS)if(s.includes(e.toLowerCase()))return!0;return!1}const tt="Agent already has an in-flight prompt. Message was not delivered.",v=W("ErrorBoundary"),b=class b{constructor(){}static getInstance(){return b.instance||(b.instance=new b),b.instance}async wrap(s,e,t={}){const{retries:r=Re.DEFAULT_ATTEMPTS,retryDelay:a=Re.BASE_DELAY,exponentialBackoff:l=!0,notify:c=!1,notifyOnRetry:E=!1,context:f={},onError:u,onRetry:o,shouldRetry:R=this.defaultShouldRetry}=t;let g=null,d=0;for(d=1;d<=r+1;d++)try{v.debug(`[${e}] Attempt ${d}/${r+1}`);const h=await s();return d>1&&v.info(`[${e}] Succeeded after ${d} attempts`),h}catch(h){if(g=h,v.error(`[${e}] Attempt ${d} failed`,{error:g.message,attempt:d,maxAttempts:r+1,context:f}),u?.(g,d),d<=r&&R(g)){const C=l?a*Math.pow(2,d-1):a;E&&Q.warning(n.agent_errorBoundary_retrying_message({seconds:C/1e3})),o?.(d),v.info(`[${e}] Retrying in ${C}ms`),await this.sleep(C)}else break}const k=`${e} failed after ${d} attempt${d===1?"":"s"}: ${g?.message}`,P=J(g?.message||n.agent_errorBoundary_generic_error()),N=g?.message?.toLowerCase()||"",$=N.includes("no available models")||N.includes("all models exhausted")||N.includes("all models unavailable");throw c&&!$&&Q.error(P),new Y(P,D.OPERATION_FAILED,{originalError:g?.message,detailedMessage:k,attempts:d,context:f})}async wrapVoid(s,e,t={}){await this.wrap(s,e,t)}wrapSync(s,e,t={}){try{return s()}catch(r){const a=r;throw v.error(`[${e}] Failed`,{error:a.message,context:t.context}),t.notify&&Q.error(J(a.message)),new Y(J(a.message),D.OPERATION_FAILED,t.context)}}defaultShouldRetry(s){const e=s.message.toLowerCase();return ie(s.message)?!1:e.includes("network")||e.includes("timeout")?!0:s instanceof Y?[D.NETWORK_ERROR,D.STREAM_TIMEOUT,D.STREAM_CONNECTION_FAILED,D.PROVIDER_CONNECTION_FAILED,D.PROVIDER_UNAVAILABLE].includes(s.code):!(e.includes("invalid")||e.includes("interrupted")||e.includes("cancel")||e.includes("not found")||e.includes("not available")||e.includes("404")||e.includes("no available models")||e.includes("all models exhausted")||e.includes("all models unavailable")||e.includes("413")||e.includes("too long for the agent")||e.includes("request entity too large")||e.includes("payload too large")||e.includes("content too large")||e.includes("body too large")||e.includes("unauthorized")||e.includes("forbidden")||e.includes("401")||e.includes("403"))}sleep(s){return new Promise(e=>setTimeout(e,s))}async withTimeout(s,e,t){return Promise.race([s(),new Promise((r,a)=>setTimeout(()=>a(new Y(`${t} timed out after ${e}ms`,D.STREAM_TIMEOUT)),e))])}async batchOperations(s,e,t={}){const{concurrency:r=5,continueOnError:a=!0,operationName:l="batch operation"}=t,c=[],E=[];for(let f=0;f<s.length;f+=r){const u=s.slice(f,f+r);(await Promise.allSettled(u.map(R=>e(R)))).forEach((R,g)=>{if(R.status==="fulfilled")c.push(R.value);else{const d=R.reason;if(E.push({item:u[g],error:d}),v.error(`[${l}] Batch item failed`,{item:u[g],error:d.message}),!a)throw d}})}return E.length>0&&v.warn(`[${l}] Completed with ${E.length} errors`),{results:c,errors:E}}};m(b,"instance");let te=b;const st=te.getInstance(),se=W("browser/index"),F=new Map,B=new Map;let U;function it(i,s,e){for(const t of s)try{t(e)}catch(r){se.error("Error in agent subscriber callback",{agentId:i,error:r})}}function rt(){if(U)return;let i=!1;U=p.createSelector(e=>e.agentSessions)().subscribe(()=>{if(!i){i=!0;return}if(F.size===0)return;const e=p.state;for(const[t,r]of F){const a=Ae.select(e,t);B.get(t)!==a&&(B.set(t,a),it(t,r,a))}})}function at(){F.size>0||!U||(U(),U=void 0,B.clear())}function Ct(i,s,e){let t=F.get(i);const r=!t;t||(t=new Set,F.set(i,t)),t.add(s),rt();const a=p.state,l=Ae.select(a,i);return r&&B.set(i,l),l?se.debug("[subscribeToAgent] Initial callback data",{agentId:i,workspaceId:e??"current",hasSession:!0}):se.debug("[subscribeToAgent] No session found",{agentId:i,workspaceId:e??"current"}),s(l),()=>{const c=F.get(i);c&&(c.delete(s),c.size===0&&(F.delete(i),B.delete(i))),at()}}const y=W("ErrorRecovery"),Se={network:{maxRetries:3,initialBackoffMs:1e3,maxBackoffMs:1e4,backoffMultiplier:2,shouldRetry:i=>{const s=i.message.toLowerCase();return s.includes("network")||s.includes("fetch")||s.includes("connection")||s.includes("timeout")}},streaming:{maxRetries:5,initialBackoffMs:500,maxBackoffMs:5e3,backoffMultiplier:1.5,shouldRetry:(i,s)=>{if(s>=5)return!1;const e=i.message.toLowerCase();return e.includes("no available models")||e.includes("all models exhausted")||e.includes("all models unavailable")||ie(i.message)?!1:e.includes("stream")||e.includes("chunk")||e.includes("incomplete")}},persistence:{maxRetries:2,initialBackoffMs:100,maxBackoffMs:1e3,backoffMultiplier:2,shouldRetry:i=>{const s=i.message.toLowerCase();return s.includes("save")||s.includes("write")||s.includes("persist")}},rateLimit:{maxRetries:3,initialBackoffMs:5e3,maxBackoffMs:3e4,backoffMultiplier:2,shouldRetry:i=>{const s=i.message.toLowerCase();return s.includes("rate")||s.includes("limit")||s.includes("429")}}};class nt{constructor(){m(this,"listeners",new Map)}on(s,e){let t=this.listeners.get(s);t||(t=new Set,this.listeners.set(s,t)),t.add(e)}off(s,e){this.listeners.get(s)?.delete(e)}emit(s,...e){this.listeners.get(s)?.forEach(t=>{try{t(...e)}catch(r){y.error(`Error in event listener for ${s}:`,r)}})}removeAllListeners(){this.listeners.clear()}}class ot extends nt{constructor(){super(...arguments);m(this,"activeRecoveries",new Map);m(this,"recoveryStats",new Map)}async executeWithRecovery(e,t=Se.network,r){const a=Date.now(),l=new AbortController;r&&(this.cancelRecovery(r),this.activeRecoveries.set(r,l));let c,E=t.initialBackoffMs,f=0;for(let u=1;u<=t.maxRetries;u++){if(f=u,l.signal.aborted){y.info(`Recovery cancelled for operation ${r}`);break}try{y.debug(`Attempting operation (attempt ${u}/${t.maxRetries})`,{operationId:r});const o=await e();return this.updateStats(r,!0),this.emit("recovery:success",{operationId:r,attempt:u,duration:Date.now()-a}),r&&this.activeRecoveries.delete(r),{success:!0,data:o,attempts:u,totalTime:Date.now()-a}}catch(o){c=o,y.warn(`Operation failed (attempt ${u}/${t.maxRetries})`,{operationId:r,error:c.message});const R=c.message.toLowerCase();if(R.includes("interrupted")||R.includes("cancelled")||R.includes("canceled")){y.debug("User-initiated interruption/cancellation, not retrying",{operationId:r,error:c.message});break}if(R.includes("no available models")||R.includes("all models exhausted")||R.includes("all models unavailable")){y.debug("All models exhausted, not retrying",{operationId:r,error:c.message});break}if(ie(c.message)){y.debug("Fatal error detected, not retrying",{operationId:r,error:c.message});break}if(!t.shouldRetry(c,u)){y.debug("Error not retryable, stopping recovery",{operationId:r,error:c.message});break}if(u<t.maxRetries){const g=Math.random()*.2*E,d=Math.min(E+g,t.maxBackoffMs);t.onRetry?.(u,d),this.emit("recovery:retry",{operationId:r,attempt:u,delay:d,error:c.message}),await this.delay(d,l.signal),E=Math.min(E*t.backoffMultiplier,t.maxBackoffMs)}}}return this.updateStats(r,!1),t.onFailure?.(c,f),this.emit("recovery:failure",{operationId:r,attempts:f,duration:Date.now()-a,error:c?.message}),r&&this.activeRecoveries.delete(r),{success:!1,error:c,attempts:f,totalTime:Date.now()-a}}cancelRecovery(e){const t=this.activeRecoveries.get(e);t&&(t.abort(),this.activeRecoveries.delete(e),y.info(`Cancelled recovery for operation ${e}`))}cancelAllRecoveries(){for(const[e,t]of this.activeRecoveries)t.abort(),y.info(`Cancelled recovery for operation ${e}`);this.activeRecoveries.clear()}getStats(e){if(e)return this.recoveryStats.get(e)||{successes:0,failures:0};const t={};for(const[r,a]of this.recoveryStats)t[r]=a;return t}clearStats(e){e?this.recoveryStats.delete(e):this.recoveryStats.clear()}isRetryable(e,t){const r=e.message.toLowerCase();if(t)switch(t){case"NETWORK":return r.includes("network")||r.includes("fetch");case"TIMEOUT":return r.includes("timeout")||r.includes("timed out");case"RATE_LIMIT":return r.includes("rate")||r.includes("limit")||r.includes("429");case"TEMPORARY":return r.includes("temporary")||r.includes("transient");case"CONFLICT":return r.includes("conflict")||r.includes("concurrent");default:return!1}return this.isRetryable(e,"NETWORK")||this.isRetryable(e,"TIMEOUT")||this.isRetryable(e,"RATE_LIMIT")||this.isRetryable(e,"TEMPORARY")||this.isRetryable(e,"CONFLICT")}delay(e,t){return new Promise((r,a)=>{const l=setTimeout(r,e);if(t){const c=()=>{clearTimeout(l),a(new Error("Delay aborted"))};t.addEventListener("abort",c);const E=r;r=()=>{t.removeEventListener("abort",c),E()}}})}updateStats(e,t){if(!e)return;const r=this.recoveryStats.get(e)||{successes:0,failures:0};t?r.successes++:r.failures++,this.recoveryStats.set(e,r)}dispose(){this.cancelAllRecoveries(),this.recoveryStats.clear(),this.removeAllListeners()}}const ct=new ot,O=new Ye({category:"WorkspaceMetrics"}),lt=100;class ut{constructor(){m(this,"metrics",new Map);m(this,"operations",new Map)}startWorkspaceCreation(s){const e=Date.now();for(this.metrics.delete(s),this.metrics.set(s,{workspaceId:s,creationStarted:e});this.metrics.size>lt;){const t=this.metrics.keys().next().value;if(t===void 0)break;this.metrics.delete(t)}O.info("Started tracking workspace creation",{workspaceId:s})}recordMilestone(s,e){const t=this.metrics.get(s);if(!t){O.warn("No metrics found for workspace",{workspaceId:s,milestone:e});return}const r=Date.now();switch(e){case"optimisticNavigation":t.optimisticNavigation=r;break;case"realWorkspaceCreated":t.realWorkspaceCreated=r;break;case"agentCreated":t.agentCreated=r;break;case"agentReady":t.agentReady=r;break;case"firstMessageSent":t.firstMessageSent=r;break;case"firstResponseReceived":t.firstResponseReceived=r;break;case"firstChunkReceived":t.firstChunkReceived=r;break;case"totalDuration":t.totalDuration=r;break;case"workspaceId":case"creationStarted":O.warn("Cannot update milestone",{milestone:e});return}const a=r-t.creationStarted;O.info(`Milestone: ${e}`,{workspaceId:s,elapsed:`${a}ms`,timestamp:r}),e==="firstResponseReceived"&&(t.totalDuration=r-t.creationStarted,this.logSummary(s))}startOperation(s,e){this.operations.set(s,{startTime:Date.now(),metadata:e})}endOperation(s,e){const t=this.operations.get(s);if(!t)return O.warn("Operation not found",{operationId:s}),null;const r=Date.now();return t.endTime=r,t.duration=r-t.startTime,e&&(t.metadata={...t.metadata,...e}),O.info("Operation completed",{operationId:s,duration:`${t.duration}ms`,metadata:t.metadata}),this.operations.delete(s),t.duration}getMetrics(s){return this.metrics.get(s)}logSummary(s){const e=this.metrics.get(s);if(!e)return;const t={workspaceId:s,totalDuration:`${e.totalDuration}ms`,stages:{optimisticNavigation:e.optimisticNavigation?`${e.optimisticNavigation-e.creationStarted}ms`:"N/A",realWorkspaceCreation:e.realWorkspaceCreated?`${e.realWorkspaceCreated-e.creationStarted}ms`:"N/A",agentCreation:e.agentCreated?`${e.agentCreated-e.creationStarted}ms`:"N/A",agentReady:e.agentReady?`${e.agentReady-e.creationStarted}ms`:"N/A",firstMessage:e.firstMessageSent?`${e.firstMessageSent-e.creationStarted}ms`:"N/A",firstResponse:e.firstResponseReceived?`${e.firstResponseReceived-e.creationStarted}ms`:"N/A"}};O.info("=== Workspace Creation Metrics Summary ===",t),O.info("Workspace Creation Metrics:",t)}clearMetrics(s){this.metrics.delete(s)}incrementAgentCreated(s){const e=this.metrics.get(s);e&&(e.agentCreated=Date.now(),O.info("Agent created",{workspaceId:s}))}incrementMessageSent(s){const e=this.metrics.get(s);e&&!e.firstMessageSent&&(e.firstMessageSent=Date.now(),O.info("First message sent",{workspaceId:s}))}}const dt=new ut,M=W("AgentSend");function A(i){p.dispatch(i)}function Te(i){return typeof i=="object"&&i!==null&&!Array.isArray(i)}function mt(i){const s=Te(i)&&i.success===!0&&"data"in i?i.data:i;return!Te(s)||s.success!==!1?!1:typeof s.error=="string"&&s.error.includes(tt)}async function Lt(i,s,e,t={}){const r=he.select(p.state,e.id);if(!r)return;const a=Ne(i,e.id),l=t.submission,c=!!l&&Le.select(p.state,l.scope)?.supported===!0,E=(o,R,g=!1)=>{l&&A(Be(l.scope,l.id,o,Date.now(),R,g))};let f=!1;const u=()=>(!l||f||ve.select(p.state,l))&&r===he.select(p.state,e.id)&&a.isCurrent(p.state.agentSessions?.byAgentId[i]?.workspaceId);return qe.track(`sendMessage:${a.key}:${i}:${l?.id??"legacy"}`,async()=>{if(!u())return;M.debug(`Sending message to agent ${i}`,{contentLength:s.length,hasContextReferences:!!t.contextReferences?.length,model:t.model});let o=await p.dispatch(we(e.id,i));if(u()){if(!o)throw new Error(n.agent_streamLifecycle_sessionNotFound_error({agentId:i}));o={...o,isStreaming:o.isStreaming??!1};{if(o&&(o.status==="pending"||!o.id)&&!o.backendSessionId&&o.activationState!==H.ACTIVE&&o.activationState!==H.ACTIVATING){const h=e.id.startsWith("optimistic-"),C=e.worktreePath||e.repositoryPath||e.path;if(!h&&C){M.info("Activating pending session in sendMessage",{agentId:i,status:o.status,activationState:o.activationState,hasBackendSessionId:!!o.backendSessionId});const x=await p.dispatch(be(e.id,i));if(!u())return;x&&(o=x)}else throw M.warn("Cannot activate agent - workspace not ready",{agentId:i,workspaceId:e.id,isOptimistic:h,hasWorktreePath:!!e.worktreePath,hasRepositoryPath:!!e.repositoryPath,hasPath:!!e.path}),new Error(n.agent_streamLifecycle_spaceNotReady_error())}else o&&o.status==="pending"&&o.backendSessionId&&(M.info("Fixing status for already-activated session",{agentId:i,backendSessionId:o.backendSessionId,activationState:o.activationState}),o={...o,status:Fe.Active,activationState:H.ACTIVE},A(de({...o,workspaceId:e.id})));if(!o)throw new Error(`Failed to get or create session for agent ${i}`);A(de({...o,workspaceId:e.id}));const g=[{type:"text",text:s}];if(t.imageBlocks)for(const h of t.imageBlocks)g.push({type:"image",...h.data!==void 0?{data:h.data}:{},...h.mimeType!==void 0?{mimeType:h.mimeType}:{},...h.attachmentId!==void 0?{attachmentId:h.attachmentId}:{}});if(t.fileBlocks)for(const h of t.fileBlocks)g.push({type:"file",attachmentId:h.attachmentId,fileName:h.fileName,...h.mimeType!==void 0?{mimeType:h.mimeType}:{},...h.size!==void 0?{size:h.size}:{}});const d=t.userAppMessageId??oe(),k=t.messageMetadata?.[ge],P={...t.contextReferences?.length?{contextReferences:t.contextReferences}:{},...k!==void 0?{[ge]:k}:{}},N={id:me(le()),appMessageId:d,role:"user",contentBlocks:g,timestamp:new Date().toISOString(),metadata:{...P,...t.messageMetadata??{}}};c||(l&&(E("rejected"),f=!0),A(ke(o.id,N))),A(z(o.id,!0));let $=!1;try{c||await p.dispatch(Ge(e.id,i,!0,{allowTruncation:t.resetHistory}));const h=me(`msg_${le()}`),C=oe(),x=async()=>st.wrap(async()=>{if(!u())return;M.info("Agent Service: Sending message to backend with image and file blocks",{agentId:i,sessionId:o.id,hasImageBlocks:!!t.imageBlocks,imageBlocksCount:t.imageBlocks?.length||0,imageBlockDetails:t.imageBlocks?.map(_=>({type:_.type,mimeType:_.mimeType,dataLength:_.data?.length||0}))||[],hasFileBlocks:!!t.fileBlocks,fileBlocksCount:t.fileBlocks?.length||0,fileBlockDetails:t.fileBlocks?.map(_=>({type:_.type,fileName:_.fileName,mimeType:_.mimeType,attachmentId:_.attachmentId,size:_.size}))||[]});const Oe=t.model??t.modelId??o.model??void 0;A(Pe(i));const ye=ce(i,e.id),ae=p.state.chatState?.byAgentId[i]?.attemptGeneration??0,T=await $e("agent.sendMessage",{agentId:i,...c&&l?{messageId:l.id}:{},workspaceId:e.id,content:s,model:Oe,contextReferences:t.contextReferences,imageBlocks:t.imageBlocks,fileBlocks:t.fileBlocks,noteIds:t.noteIds,stdinContext:t.stdinContext,assistantMessageId:h,userAppMessageId:d,assistantAppMessageId:C,priority:t.priority,...t.messageMetadata?{messageMetadata:t.messageMetadata}:{}}).catch(_=>{if(u())throw _});if(u()){if(mt(T)){M.info("Backend dropped duplicate in-flight prompt",{agentId:i,sessionId:o.id}),E("rejected");return}if(T&&typeof T=="object"&&"success"in T){if(!T.success){const _=T.error,I=typeof _=="string"?_:_?.message;throw $=!0,new Error(I||n.agent_streamLifecycle_sendToBackendFailed_error())}if("queued"in T&&T.queued===!0){if(M.info("sendMessage auto-queued by daemon (mid-turn or turn-startup race)",{agentId:i,sessionId:o.id,queuedMessageId:T.queuedMessage?.id}),(!c||!l||!ue.select(p.state,l))&&A(z(o.id,!1)),c||A(xe(o.id,N.id)),c){const I=T.queuedMessage,G=T.turnId,L=typeof G=="string"?G:I?.turnId;if(I&&typeof L=="string"){const S=Ee(s,t),X=K.select(p.state,i,e.id).find(ne=>ne.id===I.id||ne.turnId===L);A(fe(i,I.id,S,L,_e(X??I,S),!X&&!!l&&ue.select(p.state,l),ae))}E("accepted",I,!0),q(i,e.id);return}const _=T.queuedMessage;if(_){const I=T.turnId,G=typeof I=="string"?I:_.turnId;let L=_;if(u()&&ce(i,e.id)===ye){const S=K.select(p.state,i,e.id),X=We(S,_);A(Ve(i,X,e.id))}else u()&&(M.debug("queued-response queue seed superseded by an authoritative snapshot; reconciling via hydrate",{agentId:i,queuedMessageId:_.id}),await q(i,e.id).catch(()=>{}),L=K.select(p.state,i,e.id).find(S=>S.id===_.id||S.turnId===G));if(u()&&typeof G=="string"){const S=Ee(s,t);A(fe(i,_.id,S,G,_e(L??_,S),!L,ae))}else u()&&M.warn("auto-queued sendMessage response carried no turnId; retry record not parked",{agentId:i,queuedMessageId:_.id})}return}}c&&(E("accepted"),q(i,e.id),Ce(i,e.id)),dt.incrementMessageSent(e.id)}},"send message",{retries:c?0:2,notify:!1,context:{agentId:i,workspace:e.id}}),re=c?await x().then(()=>({success:!0,error:void 0})):await ct.executeWithRecovery(x,Se.streaming,`send-message-${i}`);if(!re.success)throw re.error||new Error(n.agent_streamLifecycle_sendFailed_error())}catch(h){if(!u())return;throw A(z(o.id,!1)),!c&&t.messageMetadata&&A(Ue(o.id,N.id,{metadata:P})),c&&E($?"rejected":"uncertain"),h}}}},{memoize:!1,coalesce:!0,priority:"high"})}export{Ct as a,J as c,We as r,Lt as s};
@@ -1,4 +1,4 @@
1
- import{c as t,s as r}from"./C59xgYPp.js";import{b as a}from"./DEfRWwmu.js";var s=a(e=>`${r(e)}
1
+ import{c as t,s as r}from"./T-UCXbJS.js";import{b as a}from"./DozUkl5C.js";var s=a(e=>`${r(e)}
2
2
  .swimlane.cluster:not([data-color-id]) rect {
3
3
  stroke: ${e.clusterBorder} !important;
4
4
  }
@@ -1 +1 @@
1
- import{t as we,bq as a,by as pe,b as be,bo as _}from"./BQy38IRs.js";import{bs as me,a7 as h,ay as c,W as l,bn as xe,aA as n,bS as E,aD as M,bH as Ee,a5 as Se,bA as Te,c9 as le,aB as ie,bV as Pe,be as S,b$ as T,b_ as P,bO as k}from"./DYhIMPy1.js";import{i as m}from"./CWmwYDNG.js";import{c as v}from"./RFiIZzYq.js";import{b as ke}from"./CwxaNadx.js";import{F as Ce,cv as De,ba as Fe,a7 as We,a5 as Oe,a1 as Me,aQ as ze,c9 as ye}from"./CvWGOqV6.js";import{f as Ve}from"./DH8xXeC1.js";import"./DJq2OFOa.js";import{p as Ae,h as Le,M as Ie,g as C}from"./BFmjOdeB.js";import"./CHK9comt.js";var Be=ie("<!> <!> <!> <!> <!> <!>",1),Ue=ie("<span><!></span>"),qe=ie("<!> <!>",1);function He(de,r){if(new.target)return we({component:He,...de});me(r,!0);const ge=e=>{var w=Be(),z=c(w);{var ne=t=>{var s=h(),i=c(s);v(i,()=>C,(d,g)=>{g(d,{indicator:"switch",get icon(){return Fe},get checked(){return R()},closeOnSelect:!1,get onCheckedChange(){return X()},children:(f,O)=>{S();var o=T();P(u=>k(o,u),[()=>_.ui_viewSettings_markdownPreview_label()]),l(f,o)},$$slots:{default:!0}})}),l(t,s)};m(z,t=>{K()&&t(ne)})}var y=E(z,2);{var D=t=>{var s=h(),i=c(s);v(i,()=>C,(d,g)=>{g(d,{indicator:"switch",get icon(){return We},get checked(){return Z()},closeOnSelect:!1,get onCheckedChange(){return $()},children:(f,O)=>{S();var o=T();P(u=>k(o,u),[()=>_.ui_viewSettings_allFilesExpanded_label()]),l(f,o)},$$slots:{default:!0}})}),l(t,s)};m(y,t=>{Y()&&t(D)})}var se=E(y,2);{var V=t=>{var s=h(),i=c(s);v(i,()=>C,(d,g)=>{g(d,{indicator:"switch",get icon(){return Oe},get checked(){return L()},closeOnSelect:!1,get onCheckedChange(){return I()},children:(f,O)=>{S();var o=T();P(u=>k(o,u),[()=>_.ui_viewSettings_foldUnchanged_label()]),l(f,o)},$$slots:{default:!0}})}),l(t,s)};m(se,t=>{A()&&t(V)})}var F=E(se,2);{var oe=t=>{var s=h(),i=c(s);v(i,()=>C,(d,g)=>{g(d,{indicator:"switch",get icon(){return Me},get checked(){return U()},closeOnSelect:!1,get onCheckedChange(){return q()},children:(f,O)=>{S();var o=T();P(u=>k(o,u),[()=>_.ui_viewSettings_wrapLines_label()]),l(f,o)},$$slots:{default:!0}})}),l(t,s)};m(F,t=>{B()&&t(oe)})}var x=E(F,2);{var p=t=>{var s=h(),i=c(s);v(i,()=>C,(d,g)=>{g(d,{indicator:"switch",get icon(){return ze},get checked(){return N()},closeOnSelect:!1,get onCheckedChange(){return Q()},children:(f,O)=>{S();var o=T();P(u=>k(o,u),[()=>_.ui_viewSettings_splitView_label()]),l(f,o)},$$slots:{default:!0}})}),l(t,s)};m(x,t=>{H()&&t(p)})}var b=E(x,2);{var W=t=>{var s=h(),i=c(s);v(i,()=>C,(d,g)=>{g(d,{indicator:"switch",get icon(){return ye},get checked(){return G()},closeOnSelect:!1,get onCheckedChange(){return J()},children:(f,O)=>{S();var o=T();P(u=>k(o,u),[()=>_.ui_viewSettings_diffIndicators_label()]),l(f,o)},$$slots:{default:!0}})}),l(t,s)};m(b,t=>{j()&&t(W)})}l(e,w)};let A=a(r,"showFold",7,!0),L=a(r,"foldEnabled",7,!1),I=a(r,"onToggleFold",7),B=a(r,"showWrap",7,!0),U=a(r,"wrapEnabled",7,!1),q=a(r,"onToggleWrap",7),H=a(r,"showSplit",7,!0),N=a(r,"splitEnabled",7,!1),Q=a(r,"onToggleSplit",7),j=a(r,"showDiff",7,!1),G=a(r,"diffEnabled",7,!1),J=a(r,"onToggleDiff",7),K=a(r,"showPreview",7,!1),R=a(r,"previewEnabled",7,!1),X=a(r,"onTogglePreview",7),Y=a(r,"showExpand",7,!1),Z=a(r,"expanded",7,!1),$=a(r,"onToggleExpand",7),ee=a(r,"class",7,""),te=a(r,"size",7,"xs"),re=a(r,"embedded",7,!1),ae=Pe(!1);const ue={xs:"icon-xs",sm:"icon-sm",md:"icon"};var ce={get showFold(){return A()},set showFold(e=!0){A(e),n()},get foldEnabled(){return L()},set foldEnabled(e=!1){L(e),n()},get onToggleFold(){return I()},set onToggleFold(e){I(e),n()},get showWrap(){return B()},set showWrap(e=!0){B(e),n()},get wrapEnabled(){return U()},set wrapEnabled(e=!1){U(e),n()},get onToggleWrap(){return q()},set onToggleWrap(e){q(e),n()},get showSplit(){return H()},set showSplit(e=!0){H(e),n()},get splitEnabled(){return N()},set splitEnabled(e=!1){N(e),n()},get onToggleSplit(){return Q()},set onToggleSplit(e){Q(e),n()},get showDiff(){return j()},set showDiff(e=!1){j(e),n()},get diffEnabled(){return G()},set diffEnabled(e=!1){G(e),n()},get onToggleDiff(){return J()},set onToggleDiff(e){J(e),n()},get showPreview(){return K()},set showPreview(e=!1){K(e),n()},get previewEnabled(){return R()},set previewEnabled(e=!1){R(e),n()},get onTogglePreview(){return X()},set onTogglePreview(e){X(e),n()},get showExpand(){return Y()},set showExpand(e=!1){Y(e),n()},get expanded(){return Z()},set expanded(e=!1){Z(e),n()},get onToggleExpand(){return $()},set onToggleExpand(e){$(e),n()},get class(){return ee()},set class(e=""){ee(e),n()},get size(){return te()},set size(e="xs"){te(e),n()},get embedded(){return re()},set embedded(e=!1){re(e),n()},$set:pe,$on:(e,w)=>be(r,e,w)},fe=h(),_e=c(fe);{var ve=e=>{ge(e)},he=e=>{var w=h(),z=c(w);v(z,()=>Ie,(ne,y)=>{y(ne,{get open(){return M(ae)},set open(D){Ee(ae,D,!0)},children:(D,se)=>{var V=qe(),F=c(V);{const x=(p,b)=>{let W=()=>(b?.()).props;var t=Ue();ke(t,()=>({class:"contents",...W()}));var s=Se(t);{let i=le(()=>_.ui_viewSettings_trigger_tooltip()),d=le(()=>_.ui_viewSettings_trigger_tooltip());Ve(s,{variant:"ghost-light",get size(){return ue[te()]},get tooltip(){return M(i)},tooltipSide:"bottom",get"aria-label"(){return M(d)},get"aria-expanded"(){return M(ae)},get class(){return ee()},"data-testid":"view-settings-trigger",children:(g,f)=>{Ce(g,{get icon(){return De},size:"xs"})},$$slots:{default:!0}})}Te(t),l(p,t)};v(F,()=>Ae,(p,b)=>{b(p,{child:x,$$slots:{child:!0}})})}var oe=E(F,2);{let x=le(()=>_.ui_dropdownMenu_ariaLabel());v(oe,()=>Le,(p,b)=>{b(p,{align:"end",class:"w-56 p-3!",get"aria-label"(){return M(x)},children:(W,t)=>{ge(W)},$$slots:{default:!0}})})}l(D,V)},$$slots:{default:!0}})}),l(e,w)};m(_e,e=>{re()?e(ve):e(he,-1)})}return l(de,fe),xe(ce)}export{He as V};
1
+ import{t as we,bq as a,by as pe,b as be,bo as _}from"./CT36W95j.js";import{bs as me,a7 as h,ay as c,W as l,bn as xe,aA as n,bS as E,aD as M,bH as Ee,a5 as Se,bA as Te,c9 as le,aB as ie,bV as Pe,be as S,b$ as T,b_ as P,bO as k}from"./DYhIMPy1.js";import{i as m}from"./Cn5kmzaj.js";import{c as v}from"./CgQUkF-P.js";import{b as ke}from"./TRV263rQ.js";import{F as Ce,cv as De,ba as Fe,a7 as We,a5 as Oe,a1 as Me,aQ as ze,c9 as ye}from"./D_rHnmLE.js";import{f as Ve}from"./D9xzAHI_.js";import"./ClQp3PSY.js";import{p as Ae,h as Le,M as Ie,g as C}from"./Du0V4O1Q.js";import"./BwYW1dkK.js";var Be=ie("<!> <!> <!> <!> <!> <!>",1),Ue=ie("<span><!></span>"),qe=ie("<!> <!>",1);function He(de,r){if(new.target)return we({component:He,...de});me(r,!0);const ge=e=>{var w=Be(),z=c(w);{var ne=t=>{var s=h(),i=c(s);v(i,()=>C,(d,g)=>{g(d,{indicator:"switch",get icon(){return Fe},get checked(){return R()},closeOnSelect:!1,get onCheckedChange(){return X()},children:(f,O)=>{S();var o=T();P(u=>k(o,u),[()=>_.ui_viewSettings_markdownPreview_label()]),l(f,o)},$$slots:{default:!0}})}),l(t,s)};m(z,t=>{K()&&t(ne)})}var y=E(z,2);{var D=t=>{var s=h(),i=c(s);v(i,()=>C,(d,g)=>{g(d,{indicator:"switch",get icon(){return We},get checked(){return Z()},closeOnSelect:!1,get onCheckedChange(){return $()},children:(f,O)=>{S();var o=T();P(u=>k(o,u),[()=>_.ui_viewSettings_allFilesExpanded_label()]),l(f,o)},$$slots:{default:!0}})}),l(t,s)};m(y,t=>{Y()&&t(D)})}var se=E(y,2);{var V=t=>{var s=h(),i=c(s);v(i,()=>C,(d,g)=>{g(d,{indicator:"switch",get icon(){return Oe},get checked(){return L()},closeOnSelect:!1,get onCheckedChange(){return I()},children:(f,O)=>{S();var o=T();P(u=>k(o,u),[()=>_.ui_viewSettings_foldUnchanged_label()]),l(f,o)},$$slots:{default:!0}})}),l(t,s)};m(se,t=>{A()&&t(V)})}var F=E(se,2);{var oe=t=>{var s=h(),i=c(s);v(i,()=>C,(d,g)=>{g(d,{indicator:"switch",get icon(){return Me},get checked(){return U()},closeOnSelect:!1,get onCheckedChange(){return q()},children:(f,O)=>{S();var o=T();P(u=>k(o,u),[()=>_.ui_viewSettings_wrapLines_label()]),l(f,o)},$$slots:{default:!0}})}),l(t,s)};m(F,t=>{B()&&t(oe)})}var x=E(F,2);{var p=t=>{var s=h(),i=c(s);v(i,()=>C,(d,g)=>{g(d,{indicator:"switch",get icon(){return ze},get checked(){return N()},closeOnSelect:!1,get onCheckedChange(){return Q()},children:(f,O)=>{S();var o=T();P(u=>k(o,u),[()=>_.ui_viewSettings_splitView_label()]),l(f,o)},$$slots:{default:!0}})}),l(t,s)};m(x,t=>{H()&&t(p)})}var b=E(x,2);{var W=t=>{var s=h(),i=c(s);v(i,()=>C,(d,g)=>{g(d,{indicator:"switch",get icon(){return ye},get checked(){return G()},closeOnSelect:!1,get onCheckedChange(){return J()},children:(f,O)=>{S();var o=T();P(u=>k(o,u),[()=>_.ui_viewSettings_diffIndicators_label()]),l(f,o)},$$slots:{default:!0}})}),l(t,s)};m(b,t=>{j()&&t(W)})}l(e,w)};let A=a(r,"showFold",7,!0),L=a(r,"foldEnabled",7,!1),I=a(r,"onToggleFold",7),B=a(r,"showWrap",7,!0),U=a(r,"wrapEnabled",7,!1),q=a(r,"onToggleWrap",7),H=a(r,"showSplit",7,!0),N=a(r,"splitEnabled",7,!1),Q=a(r,"onToggleSplit",7),j=a(r,"showDiff",7,!1),G=a(r,"diffEnabled",7,!1),J=a(r,"onToggleDiff",7),K=a(r,"showPreview",7,!1),R=a(r,"previewEnabled",7,!1),X=a(r,"onTogglePreview",7),Y=a(r,"showExpand",7,!1),Z=a(r,"expanded",7,!1),$=a(r,"onToggleExpand",7),ee=a(r,"class",7,""),te=a(r,"size",7,"xs"),re=a(r,"embedded",7,!1),ae=Pe(!1);const ue={xs:"icon-xs",sm:"icon-sm",md:"icon"};var ce={get showFold(){return A()},set showFold(e=!0){A(e),n()},get foldEnabled(){return L()},set foldEnabled(e=!1){L(e),n()},get onToggleFold(){return I()},set onToggleFold(e){I(e),n()},get showWrap(){return B()},set showWrap(e=!0){B(e),n()},get wrapEnabled(){return U()},set wrapEnabled(e=!1){U(e),n()},get onToggleWrap(){return q()},set onToggleWrap(e){q(e),n()},get showSplit(){return H()},set showSplit(e=!0){H(e),n()},get splitEnabled(){return N()},set splitEnabled(e=!1){N(e),n()},get onToggleSplit(){return Q()},set onToggleSplit(e){Q(e),n()},get showDiff(){return j()},set showDiff(e=!1){j(e),n()},get diffEnabled(){return G()},set diffEnabled(e=!1){G(e),n()},get onToggleDiff(){return J()},set onToggleDiff(e){J(e),n()},get showPreview(){return K()},set showPreview(e=!1){K(e),n()},get previewEnabled(){return R()},set previewEnabled(e=!1){R(e),n()},get onTogglePreview(){return X()},set onTogglePreview(e){X(e),n()},get showExpand(){return Y()},set showExpand(e=!1){Y(e),n()},get expanded(){return Z()},set expanded(e=!1){Z(e),n()},get onToggleExpand(){return $()},set onToggleExpand(e){$(e),n()},get class(){return ee()},set class(e=""){ee(e),n()},get size(){return te()},set size(e="xs"){te(e),n()},get embedded(){return re()},set embedded(e=!1){re(e),n()},$set:pe,$on:(e,w)=>be(r,e,w)},fe=h(),_e=c(fe);{var ve=e=>{ge(e)},he=e=>{var w=h(),z=c(w);v(z,()=>Ie,(ne,y)=>{y(ne,{get open(){return M(ae)},set open(D){Ee(ae,D,!0)},children:(D,se)=>{var V=qe(),F=c(V);{const x=(p,b)=>{let W=()=>(b?.()).props;var t=Ue();ke(t,()=>({class:"contents",...W()}));var s=Se(t);{let i=le(()=>_.ui_viewSettings_trigger_tooltip()),d=le(()=>_.ui_viewSettings_trigger_tooltip());Ve(s,{variant:"ghost-light",get size(){return ue[te()]},get tooltip(){return M(i)},tooltipSide:"bottom",get"aria-label"(){return M(d)},get"aria-expanded"(){return M(ae)},get class(){return ee()},"data-testid":"view-settings-trigger",children:(g,f)=>{Ce(g,{get icon(){return De},size:"xs"})},$$slots:{default:!0}})}Te(t),l(p,t)};v(F,()=>Ae,(p,b)=>{b(p,{child:x,$$slots:{child:!0}})})}var oe=E(F,2);{let x=le(()=>_.ui_dropdownMenu_ariaLabel());v(oe,()=>Le,(p,b)=>{b(p,{align:"end",class:"w-56 p-3!",get"aria-label"(){return M(x)},children:(W,t)=>{ge(W)},$$slots:{default:!0}})})}l(D,V)},$$slots:{default:!0}})}),l(e,w)};m(_e,e=>{re()?e(ve):e(he,-1)})}return l(de,fe),xe(ce)}export{He as V};
@@ -1 +1 @@
1
- import{bo as n}from"./BQy38IRs.js";import{Iv as t}from"./Bo8Vb7mw.js";let c=1,i=null;const a=[],s=new Set;function l(){for(const e of s)e(i)}function h(){return typeof document<"u"&&document.activeElement instanceof HTMLElement?document.activeElement:null}function u(e){a.push({...e,id:c++,returnFocus:h()}),i||(i=a.shift()??null,l())}function _(e){return new Promise(r=>u({kind:"confirm",options:e,resolve:r}))}function S(e){return new Promise(r=>u({kind:"prompt",options:e,resolve:r}))}function p(e){return s.add(e),e(i),()=>s.delete(e)}function f(e,r){if(!i||i.id!==e)return;const o=i;i=a.shift()??null,o.resolve(r),o.returnFocus?.focus(),l()}const m={IS_AUTHENTICATED:"linear-auth:is-authenticated",START_AUTH:"linear-auth:start-auth",CANCEL_AUTH:"linear-auth:cancel-auth",LOGOUT:"linear-auth:logout",GET_AUTH_STATE:"linear-auth:get-auth-state",GET_STATUS:"linear-auth:get-status",FETCH_MY_ISSUES:"linear-auth:fetch-my-issues",SEARCH_ISSUES:"linear-auth:search-issues"},g=[{value:"assigned",get label(){return n.linearAuth_filter_assigned_label()},get description(){return n.linearAuth_filter_assigned_description()}},{value:"created",get label(){return n.linearAuth_filter_created_label()},get description(){return n.linearAuth_filter_created_description()}},{value:"subscribed",get label(){return n.linearAuth_filter_subscribed_label()},get description(){return n.linearAuth_filter_subscribed_description()}},{value:"team",get label(){return n.linearAuth_filter_team_label()},get description(){return n.linearAuth_filter_team_description()}},{value:"all",get label(){return n.linearAuth_filter_all_label()},get description(){return n.linearAuth_filter_all_description()}}],I=t.createSelector(e=>e.linearAuth.operation),E=t.createSelector((e,r)=>e.linearAuth.operation?.consumerId===r?e.linearAuth.operation:null),b=t.createSelector(e=>e.linearAuth.operation?.kind==="logout"&&e.linearAuth.operation.status==="pending"),T=t.createSelector(e=>e.linearAuth.isAuthenticated),y=t.createSelector(e=>e.linearAuth.requiresDaemonAuth),C=t.createSelector(e=>e.linearAuth.isAuthenticating),L=t.createSelector(e=>e.linearAuth.error),N=t.createSelector(e=>e.sentryAuth.operation),v=t.createSelector((e,r)=>e.sentryAuth.operation?.consumerId===r?e.sentryAuth.operation:null),U=t.createSelector(e=>e.sentryAuth.operation?.kind==="logout"&&e.sentryAuth.operation.status==="pending"),O=t.createSelector(e=>e.sentryAuth.isAuthenticated),H=t.createSelector(e=>e.sentryAuth.organization),R=t.createSelector(e=>e.sentryAuth.isConnecting),q=t.createSelector(e=>e.sentryAuth.error),D="npx not found — install Node.js (with npm) to use Claude Code";export{D as C,m as L,g as a,I as b,_ as c,L as d,T as e,C as f,b as g,y as h,v as i,N as j,q as k,O as l,R as m,U as n,H as o,S as p,f as q,p as r,E as s};
1
+ import{bo as n}from"./CT36W95j.js";import{Iv as t}from"./BmagX6n5.js";let c=1,i=null;const a=[],s=new Set;function l(){for(const e of s)e(i)}function h(){return typeof document<"u"&&document.activeElement instanceof HTMLElement?document.activeElement:null}function u(e){a.push({...e,id:c++,returnFocus:h()}),i||(i=a.shift()??null,l())}function _(e){return new Promise(r=>u({kind:"confirm",options:e,resolve:r}))}function S(e){return new Promise(r=>u({kind:"prompt",options:e,resolve:r}))}function p(e){return s.add(e),e(i),()=>s.delete(e)}function f(e,r){if(!i||i.id!==e)return;const o=i;i=a.shift()??null,o.resolve(r),o.returnFocus?.focus(),l()}const m={IS_AUTHENTICATED:"linear-auth:is-authenticated",START_AUTH:"linear-auth:start-auth",CANCEL_AUTH:"linear-auth:cancel-auth",LOGOUT:"linear-auth:logout",GET_AUTH_STATE:"linear-auth:get-auth-state",GET_STATUS:"linear-auth:get-status",FETCH_MY_ISSUES:"linear-auth:fetch-my-issues",SEARCH_ISSUES:"linear-auth:search-issues"},g=[{value:"assigned",get label(){return n.linearAuth_filter_assigned_label()},get description(){return n.linearAuth_filter_assigned_description()}},{value:"created",get label(){return n.linearAuth_filter_created_label()},get description(){return n.linearAuth_filter_created_description()}},{value:"subscribed",get label(){return n.linearAuth_filter_subscribed_label()},get description(){return n.linearAuth_filter_subscribed_description()}},{value:"team",get label(){return n.linearAuth_filter_team_label()},get description(){return n.linearAuth_filter_team_description()}},{value:"all",get label(){return n.linearAuth_filter_all_label()},get description(){return n.linearAuth_filter_all_description()}}],I=t.createSelector(e=>e.linearAuth.operation),E=t.createSelector((e,r)=>e.linearAuth.operation?.consumerId===r?e.linearAuth.operation:null),b=t.createSelector(e=>e.linearAuth.operation?.kind==="logout"&&e.linearAuth.operation.status==="pending"),T=t.createSelector(e=>e.linearAuth.isAuthenticated),y=t.createSelector(e=>e.linearAuth.requiresDaemonAuth),C=t.createSelector(e=>e.linearAuth.isAuthenticating),L=t.createSelector(e=>e.linearAuth.error),N=t.createSelector(e=>e.sentryAuth.operation),v=t.createSelector((e,r)=>e.sentryAuth.operation?.consumerId===r?e.sentryAuth.operation:null),U=t.createSelector(e=>e.sentryAuth.operation?.kind==="logout"&&e.sentryAuth.operation.status==="pending"),O=t.createSelector(e=>e.sentryAuth.isAuthenticated),H=t.createSelector(e=>e.sentryAuth.organization),R=t.createSelector(e=>e.sentryAuth.isConnecting),q=t.createSelector(e=>e.sentryAuth.error),D="npx not found — install Node.js (with npm) to use Claude Code";export{D as C,m as L,g as a,I as b,_ as c,L as d,T as e,C as f,b as g,y as h,v as i,N as j,q as k,O as l,R as m,U as n,H as o,S as p,f as q,p as r,E as s};
@@ -1 +1 @@
1
- import{ao as s}from"./DYhIMPy1.js";import{d as r}from"./DTYxFA3y.js";const t=()=>{const e=r;return{page:{subscribe:e.page.subscribe},navigating:{subscribe:e.navigating.subscribe},updated:e.updated}},c={subscribe(e){return(s?o("page"):t().page).subscribe(e)}};function o(e){try{return t()[e]}catch{throw new Error(`Cannot subscribe to '${e}' store on the server outside of a Svelte component, as it is bound to the current request via component context. This prevents state from leaking between users.For more information, see https://svelte.dev/docs/kit/state-management#avoid-shared-state-on-the-server`)}}export{c as p};
1
+ import{ao as s}from"./DYhIMPy1.js";import{d as r}from"./DbxGcVeS.js";const t=()=>{const e=r;return{page:{subscribe:e.page.subscribe},navigating:{subscribe:e.navigating.subscribe},updated:e.updated}},c={subscribe(e){return(s?o("page"):t().page).subscribe(e)}};function o(e){try{return t()[e]}catch{throw new Error(`Cannot subscribe to '${e}' store on the server outside of a Svelte component, as it is bound to the current request via component context. This prevents state from leaking between users.For more information, see https://svelte.dev/docs/kit/state-management#avoid-shared-state-on-the-server`)}}export{c as p};
@@ -1 +1 @@
1
- import{p as e}from"./CwxaNadx.js";import{p as t}from"./XJv96NUg.js";const o=[{id:"label-state-matrix",title:"Label states",states:["default","rest","hover","focus","error","required","optional","disabled","long-content","compact","zoom-200","light","dark"],themes:["light","dark","high-contrast"],viewport:"both"}];e({id:"label",source:"src/lib/components/ui/label/label.svelte",publicImport:"$lib/components/ui/label",legacyImports:[],exports:["Label","labelMetadata"],category:"primitive",owner:"007-B2",callers:["src/features/collaboration-auth/renderer/CollaborationSignInModal.svelte","src/features/host-membership/HostInvitationDialog.svelte","src/lib/component-catalog/renderers/ContentFieldCatalogPreview.svelte","src/lib/component-catalog/renderers/FieldPreviewCell.svelte","src/lib/component-catalog/renderers/ModalCatalogPreview.svelte","src/lib/components/GitLabConnectForm.svelte","src/lib/components/chat/secrets/SecretRequestCard.svelte","src/lib/components/debug/DebugPanel.svelte","src/lib/components/modals/InputDialog.svelte","src/lib/components/modals/ShareWorkspaceDialog.svelte","src/lib/components/modals/modal-polish.preview.svelte","src/lib/components/patterns/confirm/ConfirmRequestView.svelte","src/lib/components/patterns/form/FormField.svelte","src/lib/components/patterns/settings/SettingsFieldRow.svelte","src/lib/components/patterns/settings/custom-controls.ts","src/lib/components/workspace/initializer/AddRemoteSetupModal.svelte","src/lib/components/workspace/initializer/SetupScriptTrigger.svelte","src/lib/components/workspace/sidebar/context-picker/BrowserUrlPicker.svelte"],replacement:null,characterizationTest:"src/lib/components/ui/label/label.test.ts",removalGate:"Retain while exported and association and fixture tests pass.",dynamicImports:[],fixtures:o});const s=[{id:"content-dialog",title:"Content dialog",states:["reading","progress","error","long-content"],themes:["light","dark"],viewport:"both"},{id:"confirm-service",title:"Confirm service",states:["confirm","prompt","alert","queued","busy","reduced-motion"],themes:["light","dark","high-contrast"],viewport:"both",reducedMotion:!0},{id:"form-dialog",title:"Form dialog",states:["default","busy","invalid"],themes:["light","dark"],viewport:"both"},{id:"destructive-confirm",title:"Destructive confirm",states:["default","busy"],themes:["light","dark"],viewport:"both"}];t({id:"confirm",source:"src/lib/components/patterns/confirm/index.ts",publicImport:"$lib/components/patterns/confirm",exports:["ConfirmHost","ConfirmRequestView","DestructiveConfirm","FormDialog","ContentDialog","alert","confirm","prompt"],owner:"design-system",fixtures:s,useWhen:["Blocking an action until the user confirms, enters one value, or acknowledges a message.","Building a dialog whose content is a form with standard actions.","Showing a selection, progress/result, or reading dialog with shared layout and focus ownership."],dontUseWhen:["Reporting non-blocking status; use the notification service instead.","Building a multi-step flow; use a dedicated screen or wizard composition."],replaces:["Browser confirm, prompt, and alert APIs.","InputDialog, MessageDialog, and one-off destructive confirmation markup."]});
1
+ import{p as e}from"./TRV263rQ.js";import{p as t}from"./XJv96NUg.js";const o=[{id:"label-state-matrix",title:"Label states",states:["default","rest","hover","focus","error","required","optional","disabled","long-content","compact","zoom-200","light","dark"],themes:["light","dark","high-contrast"],viewport:"both"}];e({id:"label",source:"src/lib/components/ui/label/label.svelte",publicImport:"$lib/components/ui/label",legacyImports:[],exports:["Label","labelMetadata"],category:"primitive",owner:"007-B2",callers:["src/features/collaboration-auth/renderer/CollaborationSignInModal.svelte","src/features/host-membership/HostInvitationDialog.svelte","src/lib/component-catalog/renderers/ContentFieldCatalogPreview.svelte","src/lib/component-catalog/renderers/FieldPreviewCell.svelte","src/lib/component-catalog/renderers/ModalCatalogPreview.svelte","src/lib/components/GitLabConnectForm.svelte","src/lib/components/chat/secrets/SecretRequestCard.svelte","src/lib/components/debug/DebugPanel.svelte","src/lib/components/modals/InputDialog.svelte","src/lib/components/modals/ShareWorkspaceDialog.svelte","src/lib/components/modals/modal-polish.preview.svelte","src/lib/components/patterns/confirm/ConfirmRequestView.svelte","src/lib/components/patterns/form/FormField.svelte","src/lib/components/patterns/settings/SettingsFieldRow.svelte","src/lib/components/patterns/settings/custom-controls.ts","src/lib/components/workspace/initializer/AddRemoteSetupModal.svelte","src/lib/components/workspace/initializer/SetupScriptTrigger.svelte","src/lib/components/workspace/sidebar/context-picker/BrowserUrlPicker.svelte"],replacement:null,characterizationTest:"src/lib/components/ui/label/label.test.ts",removalGate:"Retain while exported and association and fixture tests pass.",dynamicImports:[],fixtures:o});const s=[{id:"content-dialog",title:"Content dialog",states:["reading","progress","error","long-content"],themes:["light","dark"],viewport:"both"},{id:"confirm-service",title:"Confirm service",states:["confirm","prompt","alert","queued","busy","reduced-motion"],themes:["light","dark","high-contrast"],viewport:"both",reducedMotion:!0},{id:"form-dialog",title:"Form dialog",states:["default","busy","invalid"],themes:["light","dark"],viewport:"both"},{id:"destructive-confirm",title:"Destructive confirm",states:["default","busy"],themes:["light","dark"],viewport:"both"}];t({id:"confirm",source:"src/lib/components/patterns/confirm/index.ts",publicImport:"$lib/components/patterns/confirm",exports:["ConfirmHost","ConfirmRequestView","DestructiveConfirm","FormDialog","ContentDialog","alert","confirm","prompt"],owner:"design-system",fixtures:s,useWhen:["Blocking an action until the user confirms, enters one value, or acknowledges a message.","Building a dialog whose content is a form with standard actions.","Showing a selection, progress/result, or reading dialog with shared layout and focus ownership."],dontUseWhen:["Reporting non-blocking status; use the notification service instead.","Building a multi-step flow; use a dedicated screen or wizard composition."],replaces:["Browser confirm, prompt, and alert APIs.","InputDialog, MessageDialog, and one-off destructive confirmation markup."]});
@@ -1 +1 @@
1
- import{Iv as o,ny as d,nx as n,op as i,bf as a,rz as S,p8 as p,om as k}from"./Bo8Vb7mw.js";import{ba as g,aV as m,dD as v,dq as W,c as h,cG as I,c1 as w}from"./DPuyFsTN.js";const R={status:"loading",members:[]},u=o.createSelector(e=>d(e.guestSessions.sessions)),K=o.createSelector(e=>e.guestSessions.hasReceivedList),l=o.createSelector(e=>n(e.guestSessions.sessions,e.connections.windowBackendId)??null);o.createSelector(e=>l.select(e)!==null);const M=o.createSelector(e=>e.guestSessions.openIds),F=o.createSelector(e=>e.guestSessions.connectedIds),x=o.createSelector(e=>e.guestSessions.leavingIds),O=o.createSelector(e=>e.guestSessions.leavingWorkspaceKeys),P=o.createSelector(e=>u.select(e).filter(s=>e.guestSessions.failedLeaveIds.includes(s.id))),B=o.createSelector(e=>u.select(e).flatMap(s=>(s.workspaces??[]).filter(t=>e.guestSessions.failedLeaveWorkspaceKeys.includes(i(s.id,t.id))).map(t=>({session:s,workspace:t})))),A=o.createSelector(e=>e.guestSessions.failedLeaveIds),N=o.createSelector(e=>d(e.guestSessions.sweepReports)),$=o.createSelector((e,s)=>n(e.guestSessions.sweepReports,s)),j=o.createSelector(e=>e.guestSessions.clearingWorkspaceIds),q=o.createSelector((e,s)=>n(e.workspace.workspaces,a(s))!==void 0),L=o.createSelector((e,s)=>e.guestSessions.hostedRosters[s]?.status==="withheld"?!1:n(e.workspace.workspaces,a(s))!==void 0&&g.select(e)&&m.select(e,s)),y=o.createSelector((e,s)=>{const t=n(e.workspace.workspaces,a(s));if(t?.openInviteCount!=null)return t.openInviteCount;const c=e.guestSessions.hostedRosters[s];return c?.guestCount!=null?Math.max(0,c.guestCount-c.members.filter(S).length):null}),z=o.createSelector(e=>e.workspace.error?"error":v.select(e,e.connections.windowBackendId)?"loaded":"loading"),D=o.createSelector(e=>{const s=W.select(e);return d(e.workspace.workspaces).filter(t=>{if(!s.collaborationReady||!h(s,t.id,()=>t))return!1;const c=y.select(e,t.id);if((t.memberCount??1/0)<=1&&c===0)return!1;const r=e.guestSessions.hostedRosters[t.id];return!r||r.status!=="loaded"?!0:r.members.some(S)||c===null||c>0})}),f=o.createSelector(e=>{const s=l.select(e),t=I.select(e);return u.select(e).filter(c=>{const r=s?.id===c.id&&t?.principal.id===c.principalId?w.select(e):null;return r?r!=="guest":c.hostRole==="member"})}),E=o.createSelector(e=>{const s=new Set(f.select(e).map(t=>t.id));return u.select(e).filter(t=>!s.has(t.id))}),J=o.createSelector(e=>e.guestSessions.listUnavailable),b=o.createSelector((e,s)=>e.guestSessions.hostedRosters[s]??R),U=o.createSelector((e,s)=>b.select(e,s).members.filter(t=>e.guestSessions.failedMemberKeys.includes(p(s,t.principalId)))),C=[],V=o.createSelector((e,s)=>{const t=p(s,""),c=e.guestSessions.removingMemberKeys.filter(r=>r.startsWith(t)).map(r=>r.slice(t.length));return c.length===0?C:c}),_=o.createSelector((e,s)=>e.guestSessions.clearingWorkspaceIds.includes(s)),T=o.createSelector(e=>{const s=[];for(const[t,c]of Object.entries(e.guestSessions.hostedRosters)){if(c.status==="withheld")continue;const r=n(e.workspace.workspaces,a(t));!r||!L.select(e,t)||s.push(`${t}:${r.memberCount??0},${c.invalidation??0}`)}return s.sort()}),Q=o.createSelector(e=>e.guestSessions.inheritedWorkspaceKeys),X=o.createSelector(e=>e.guestSessions.leaveConfirmations),Y=o.createSelector((e,s)=>k(n(e.guestSessions.sessions,s))),Z=o.createSelector((e,s)=>{if(!s||!g.select(e))return!1;const t=l.select(e);return!t||!(t.workspaces??[]).some(c=>c.id===s)||f.select(e).some(c=>c.id===t.id)||e.guestSessions.inheritedWorkspaceKeys.includes(i(t.id,s))?!1:n(e.workspace.workspaces,a(s))?.myRole!=="owner"}),ee=o.createSelector((e,s)=>{const t=l.select(e);return!!t&&e.guestSessions.selfLeaveWorkspaceKeys.includes(i(t.id,s))}),se=o.createSelector((e,s)=>{const t=l.select(e);return!!t&&e.guestSessions.leavingWorkspaceKeys.includes(i(t.id,s))});export{q as A,se as B,ee as C,f as D,E,l as F,L as a,P as b,B as c,X as d,A as e,x as f,O as g,Y as h,u as i,F as j,K as k,M as l,J as m,j as n,U as o,y as p,V as q,b as r,Z as s,T as t,z as u,$ as v,N as w,D as x,Q as y,_ as z};
1
+ import{Iv as o,ny as d,nx as n,op as i,bf as a,rz as S,p8 as p,om as k}from"./BmagX6n5.js";import{ba as g,aV as m,dD as v,dq as W,c as h,cG as I,c1 as w}from"./DpNO08YA.js";const R={status:"loading",members:[]},u=o.createSelector(e=>d(e.guestSessions.sessions)),K=o.createSelector(e=>e.guestSessions.hasReceivedList),l=o.createSelector(e=>n(e.guestSessions.sessions,e.connections.windowBackendId)??null);o.createSelector(e=>l.select(e)!==null);const M=o.createSelector(e=>e.guestSessions.openIds),F=o.createSelector(e=>e.guestSessions.connectedIds),x=o.createSelector(e=>e.guestSessions.leavingIds),O=o.createSelector(e=>e.guestSessions.leavingWorkspaceKeys),P=o.createSelector(e=>u.select(e).filter(s=>e.guestSessions.failedLeaveIds.includes(s.id))),B=o.createSelector(e=>u.select(e).flatMap(s=>(s.workspaces??[]).filter(t=>e.guestSessions.failedLeaveWorkspaceKeys.includes(i(s.id,t.id))).map(t=>({session:s,workspace:t})))),A=o.createSelector(e=>e.guestSessions.failedLeaveIds),N=o.createSelector(e=>d(e.guestSessions.sweepReports)),$=o.createSelector((e,s)=>n(e.guestSessions.sweepReports,s)),j=o.createSelector(e=>e.guestSessions.clearingWorkspaceIds),q=o.createSelector((e,s)=>n(e.workspace.workspaces,a(s))!==void 0),L=o.createSelector((e,s)=>e.guestSessions.hostedRosters[s]?.status==="withheld"?!1:n(e.workspace.workspaces,a(s))!==void 0&&g.select(e)&&m.select(e,s)),y=o.createSelector((e,s)=>{const t=n(e.workspace.workspaces,a(s));if(t?.openInviteCount!=null)return t.openInviteCount;const c=e.guestSessions.hostedRosters[s];return c?.guestCount!=null?Math.max(0,c.guestCount-c.members.filter(S).length):null}),z=o.createSelector(e=>e.workspace.error?"error":v.select(e,e.connections.windowBackendId)?"loaded":"loading"),D=o.createSelector(e=>{const s=W.select(e);return d(e.workspace.workspaces).filter(t=>{if(!s.collaborationReady||!h(s,t.id,()=>t))return!1;const c=y.select(e,t.id);if((t.memberCount??1/0)<=1&&c===0)return!1;const r=e.guestSessions.hostedRosters[t.id];return!r||r.status!=="loaded"?!0:r.members.some(S)||c===null||c>0})}),f=o.createSelector(e=>{const s=l.select(e),t=I.select(e);return u.select(e).filter(c=>{const r=s?.id===c.id&&t?.principal.id===c.principalId?w.select(e):null;return r?r!=="guest":c.hostRole==="member"})}),E=o.createSelector(e=>{const s=new Set(f.select(e).map(t=>t.id));return u.select(e).filter(t=>!s.has(t.id))}),J=o.createSelector(e=>e.guestSessions.listUnavailable),b=o.createSelector((e,s)=>e.guestSessions.hostedRosters[s]??R),U=o.createSelector((e,s)=>b.select(e,s).members.filter(t=>e.guestSessions.failedMemberKeys.includes(p(s,t.principalId)))),C=[],V=o.createSelector((e,s)=>{const t=p(s,""),c=e.guestSessions.removingMemberKeys.filter(r=>r.startsWith(t)).map(r=>r.slice(t.length));return c.length===0?C:c}),_=o.createSelector((e,s)=>e.guestSessions.clearingWorkspaceIds.includes(s)),T=o.createSelector(e=>{const s=[];for(const[t,c]of Object.entries(e.guestSessions.hostedRosters)){if(c.status==="withheld")continue;const r=n(e.workspace.workspaces,a(t));!r||!L.select(e,t)||s.push(`${t}:${r.memberCount??0},${c.invalidation??0}`)}return s.sort()}),Q=o.createSelector(e=>e.guestSessions.inheritedWorkspaceKeys),X=o.createSelector(e=>e.guestSessions.leaveConfirmations),Y=o.createSelector((e,s)=>k(n(e.guestSessions.sessions,s))),Z=o.createSelector((e,s)=>{if(!s||!g.select(e))return!1;const t=l.select(e);return!t||!(t.workspaces??[]).some(c=>c.id===s)||f.select(e).some(c=>c.id===t.id)||e.guestSessions.inheritedWorkspaceKeys.includes(i(t.id,s))?!1:n(e.workspace.workspaces,a(s))?.myRole!=="owner"}),ee=o.createSelector((e,s)=>{const t=l.select(e);return!!t&&e.guestSessions.selfLeaveWorkspaceKeys.includes(i(t.id,s))}),se=o.createSelector((e,s)=>{const t=l.select(e);return!!t&&e.guestSessions.leavingWorkspaceKeys.includes(i(t.id,s))});export{q as A,se as B,ee as C,f as D,E,l as F,L as a,P as b,B as c,X as d,A as e,x as f,O as g,Y as h,u as i,F as j,K as k,M as l,J as m,j as n,U as o,y as p,V as q,b as r,Z as s,T as t,z as u,$ as v,N as w,D as x,Q as y,_ as z};
@@ -1 +1 @@
1
- import{i as r}from"./DJ8_lZZl.js";import{w as a,I as e}from"./ggQuSgBM.js";import{Iv as s}from"./Bo8Vb7mw.js";import{c as t}from"./C0OVkc7f.js";function C(o,i){return t(s,o,{navigate:i,...a("windowChrome")?{closeWindow:()=>r(e.WINDOW.CLOSE)}:{}})}export{C as closeActiveTab};
1
+ import{i as r}from"./DJ8_lZZl.js";import{w as a,I as e}from"./ggQuSgBM.js";import{Iv as s}from"./BmagX6n5.js";import{c as t}from"./BPrwAqEs.js";function C(o,i){return t(s,o,{navigate:i,...a("windowChrome")?{closeWindow:()=>r(e.WINDOW.CLOSE)}:{}})}export{C as closeActiveTab};
@@ -1,3 +1,3 @@
1
- import{p as re}from"./DvfHX1n9.js";import{Y as oe,b0 as se,aZ as de,U as le,V as ce,a_ as me,b as o,ay as g,X as R,aW as ue,b4 as xe,r as fe,q as ge,W as B,O as he,aV as P,bi as S,m as pe}from"./DEfRWwmu.js";import{p as be,i as ve}from"./C8y1Abl_.js";var D="position frame",N="frame positioned",k="position relation",T="relation positioned",we=o(function(e){g.debug("options str",e)},"setOptions"),ye=o(function(){return{}},"getOptions"),Pe=o(function(){C(),fe()},"clear");function C(){w={}}o(C,"reset");var Se=he.eventmodeling,ke=o(()=>ge({...Se,...B().eventmodeling}),"getConfig"),w={};function O(){let e=Fe;const{ast:n}=w,t=E();if(!n)throw new Error("No data for EventModel");return n.frames.forEach((i,a)=>{const r=L(i,n.dataEntities,t);e=v(e,{$kind:D,index:a,frame:i,textProps:r});let d;K(i)?(g.debug("source frame",i.sourceFrames),d=n.frames.filter(l=>i.sourceFrames.some(c=>c.$refText===l.name)),d.forEach(l=>{e=v(e,{$kind:k,index:a,frame:i,sourceFrame:l})})):e=v(e,{$kind:k,index:a,frame:i})}),e={...e,sortedSwimlanesArray:A(e.swimlanes)},e}o(O,"getState");function W(e){w.ast=void 0;const n=new Set;for(const t of e.frames){if(n.has(t.name)){const i=t.$cstNode?.range.start.line,a=i===void 0?"":` on line ${i+1}`;throw new Error(`Duplicate event modeling frame ID "${t.name}"${a}`)}n.add(t.name)}w.ast=e}o(W,"setAst");var s={swimlaneMinHeight:70,swimlanePadding:15,swimlaneGap:10,boxPadding:10,boxOverlap:90,boxDefaultY:0,boxMinWidth:80,boxMaxWidth:450,boxMinHeight:80,boxMaxHeight:750,contentStartX:250,textMaxWidth:430,boxTextFontWeight:"bold",boxTextPadding:10,swimlaneTextFontWeight:"bold",labelUiAutomation:"UI/Automation",labelUiAutomationPrefix:"UI/A: ",labelCommandReadModel:"Command/Read Model",labelCommandReadModelPrefix:"C/RM: ",labelEvents:"Events",labelEventsPrefix:"Stream: "};function E(){return s}o(E,"getDiagramProps");var Fe={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]};function I(e){const n=e.split(".");if(n.length===2)return n[0]}o(I,"extractNamespace");function H(e){const n=e.split(".");return n.length===2?n[1]:e}o(H,"extractName");function U(e,n){if(!(!n||n.length===0))return Object.values(e).find(t=>t.namespace===n)}o(U,"findSwimlaneByNamespace");function b(e,n,t){return Math.max(n,...Object.keys(e).filter(i=>{const a=Number.parseInt(i);return a>n&&a<t}).map(i=>Number.parseInt(i)))+1}o(b,"findNextAvailableIndex");function _(e,n){const t=I(e.entityIdentifier),i=U(n,t);switch(e.modelEntityType){case"ui":case"pcr":case"processor":return i?{index:i.index,label:i.namespace||s.labelUiAutomation}:t?{index:b(n,0,100),label:s.labelUiAutomationPrefix+t}:{index:0,label:s.labelUiAutomation};case"rmo":case"readmodel":case"cmd":case"command":return i?{index:i.index,label:i.namespace||s.labelCommandReadModel}:t?{index:b(n,100,200),label:s.labelCommandReadModelPrefix+t}:{index:100,label:s.labelCommandReadModel};case"evt":case"event":default:return i?{index:i.index,label:i.namespace||s.labelEvents}:t?{index:b(n,200,300),label:s.labelEventsPrefix+t}:{index:200,label:s.labelEvents}}}o(_,"calculateSwimlaneProps");function V(e){const{themeVariables:n}=B();switch(e.modelEntityType){case"ui":return{fill:n.emUiFill??"white",stroke:n.emUiStroke??"#dbdada"};case"pcr":case"processor":return{fill:n.emProcessorFill??"#edb3f6",stroke:n.emProcessorStroke??"#b88cbf"};case"rmo":case"readmodel":return{fill:n.emReadModelFill??"#d3f1a2",stroke:n.emReadModelStroke??"#a3b732"};case"cmd":case"command":return{fill:n.emCommandFill??"#bcd6fe",stroke:n.emCommandStroke??"#679ac3"};case"evt":case"event":return{fill:n.emEventFill??"#ffb778",stroke:n.emEventStroke??"#c19a0f"};default:return{fill:"red",stroke:"black"}}}o(V,"calculateEntityVisualProps");function L(e,n,t){const i=B(),a=P(H(e.entityIdentifier)??"",i);let r;const d={fontSize:16,fontWeight:700,fontFamily:'"trebuchet ms", verdana, arial, sans-serif',joinWith:"<br/>"};let c=`<b>${S(a,t.textMaxWidth,d)}</b>`;if(e.dataInlineValue&&(r=e.dataInlineValue,r=r.substring(r.indexOf("{")+1),r=r.substring(0,r.lastIndexOf("}")-1),r=P(r,i),r=S(r,t.textMaxWidth,d),r=r.replaceAll(" ","&nbsp;")),e.dataReference){const p=n.find(y=>y.name===e.dataReference?.$refText);p&&(r=p.dataBlockValue,r=r.substring(r.indexOf(`{
1
+ import{p as re}from"./C-vkWK8U.js";import{Y as oe,b0 as se,aZ as de,U as le,V as ce,a_ as me,b as o,ay as g,X as R,aW as ue,b4 as xe,r as fe,q as ge,W as B,O as he,aV as P,bi as S,m as pe}from"./DozUkl5C.js";import{p as be,i as ve}from"./Dgv1nn7D.js";var D="position frame",N="frame positioned",k="position relation",T="relation positioned",we=o(function(e){g.debug("options str",e)},"setOptions"),ye=o(function(){return{}},"getOptions"),Pe=o(function(){C(),fe()},"clear");function C(){w={}}o(C,"reset");var Se=he.eventmodeling,ke=o(()=>ge({...Se,...B().eventmodeling}),"getConfig"),w={};function O(){let e=Fe;const{ast:n}=w,t=E();if(!n)throw new Error("No data for EventModel");return n.frames.forEach((i,a)=>{const r=L(i,n.dataEntities,t);e=v(e,{$kind:D,index:a,frame:i,textProps:r});let d;K(i)?(g.debug("source frame",i.sourceFrames),d=n.frames.filter(l=>i.sourceFrames.some(c=>c.$refText===l.name)),d.forEach(l=>{e=v(e,{$kind:k,index:a,frame:i,sourceFrame:l})})):e=v(e,{$kind:k,index:a,frame:i})}),e={...e,sortedSwimlanesArray:A(e.swimlanes)},e}o(O,"getState");function W(e){w.ast=void 0;const n=new Set;for(const t of e.frames){if(n.has(t.name)){const i=t.$cstNode?.range.start.line,a=i===void 0?"":` on line ${i+1}`;throw new Error(`Duplicate event modeling frame ID "${t.name}"${a}`)}n.add(t.name)}w.ast=e}o(W,"setAst");var s={swimlaneMinHeight:70,swimlanePadding:15,swimlaneGap:10,boxPadding:10,boxOverlap:90,boxDefaultY:0,boxMinWidth:80,boxMaxWidth:450,boxMinHeight:80,boxMaxHeight:750,contentStartX:250,textMaxWidth:430,boxTextFontWeight:"bold",boxTextPadding:10,swimlaneTextFontWeight:"bold",labelUiAutomation:"UI/Automation",labelUiAutomationPrefix:"UI/A: ",labelCommandReadModel:"Command/Read Model",labelCommandReadModelPrefix:"C/RM: ",labelEvents:"Events",labelEventsPrefix:"Stream: "};function E(){return s}o(E,"getDiagramProps");var Fe={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]};function I(e){const n=e.split(".");if(n.length===2)return n[0]}o(I,"extractNamespace");function H(e){const n=e.split(".");return n.length===2?n[1]:e}o(H,"extractName");function U(e,n){if(!(!n||n.length===0))return Object.values(e).find(t=>t.namespace===n)}o(U,"findSwimlaneByNamespace");function b(e,n,t){return Math.max(n,...Object.keys(e).filter(i=>{const a=Number.parseInt(i);return a>n&&a<t}).map(i=>Number.parseInt(i)))+1}o(b,"findNextAvailableIndex");function _(e,n){const t=I(e.entityIdentifier),i=U(n,t);switch(e.modelEntityType){case"ui":case"pcr":case"processor":return i?{index:i.index,label:i.namespace||s.labelUiAutomation}:t?{index:b(n,0,100),label:s.labelUiAutomationPrefix+t}:{index:0,label:s.labelUiAutomation};case"rmo":case"readmodel":case"cmd":case"command":return i?{index:i.index,label:i.namespace||s.labelCommandReadModel}:t?{index:b(n,100,200),label:s.labelCommandReadModelPrefix+t}:{index:100,label:s.labelCommandReadModel};case"evt":case"event":default:return i?{index:i.index,label:i.namespace||s.labelEvents}:t?{index:b(n,200,300),label:s.labelEventsPrefix+t}:{index:200,label:s.labelEvents}}}o(_,"calculateSwimlaneProps");function V(e){const{themeVariables:n}=B();switch(e.modelEntityType){case"ui":return{fill:n.emUiFill??"white",stroke:n.emUiStroke??"#dbdada"};case"pcr":case"processor":return{fill:n.emProcessorFill??"#edb3f6",stroke:n.emProcessorStroke??"#b88cbf"};case"rmo":case"readmodel":return{fill:n.emReadModelFill??"#d3f1a2",stroke:n.emReadModelStroke??"#a3b732"};case"cmd":case"command":return{fill:n.emCommandFill??"#bcd6fe",stroke:n.emCommandStroke??"#679ac3"};case"evt":case"event":return{fill:n.emEventFill??"#ffb778",stroke:n.emEventStroke??"#c19a0f"};default:return{fill:"red",stroke:"black"}}}o(V,"calculateEntityVisualProps");function L(e,n,t){const i=B(),a=P(H(e.entityIdentifier)??"",i);let r;const d={fontSize:16,fontWeight:700,fontFamily:'"trebuchet ms", verdana, arial, sans-serif',joinWith:"<br/>"};let c=`<b>${S(a,t.textMaxWidth,d)}</b>`;if(e.dataInlineValue&&(r=e.dataInlineValue,r=r.substring(r.indexOf("{")+1),r=r.substring(0,r.lastIndexOf("}")-1),r=P(r,i),r=S(r,t.textMaxWidth,d),r=r.replaceAll(" ","&nbsp;")),e.dataReference){const p=n.find(y=>y.name===e.dataReference?.$refText);p&&(r=p.dataBlockValue,r=r.substring(r.indexOf(`{
2
2
  `)+2),r=r.substring(0,r.lastIndexOf("}")-1),r=P(r,i),r=S(r,t.textMaxWidth,d),r=r.replaceAll(" ","&nbsp;"),r+="<br/>")}const m=r!==void 0;m&&(c+=`<br/><br/><code style="text-align: left; display: block;max-width:${t.textMaxWidth}px">${r}</code>`);const x={fontSize:d.fontSize,fontWeight:d.fontWeight,fontFamily:d.fontFamily},u=pe(c,x),h=m?u.width/3:u.width,f={content:c,width:h,height:u.height};return g.debug(`[${e.name}] ${e.entityIdentifier} text`,f),f}o(L,"calculateTextProps");function G(e,n){const t=n,i=V(t.frame),a={width:t.textProps.width+2*s.boxTextPadding,height:t.textProps.height+2*s.boxTextPadding};return[{$kind:N,frame:t.frame,index:t.index,visual:i,dimension:a,textProps:t.textProps}]}o(G,"decidePositionFrame");function X(e,n,t){return n===void 0?s.contentStartX:n.index===e.index&&e.r?e.r+s.boxPadding:t===void 0?s.contentStartX:t.r-s.boxOverlap+s.boxPadding}o(X,"calculateX");function Y(e,n){const t=[...e.map(i=>i.r),n];return Math.max(...t)}o(Y,"calculateMaxRight");function A(e){return Object.values(e).sort((n,t)=>n.index-t.index)}o(A,"sortedSwimlanesArray");function j(e,n){const t=n,i=_(t.frame,e.swimlanes);let a;i.index in e.swimlanes?a=e.swimlanes[i.index]:a={index:i.index,label:i.label,r:0,y:i.index*s.swimlaneMinHeight+s.swimlaneGap,height:s.swimlaneMinHeight,maxHeight:s.swimlaneMinHeight};const r=e.boxes.length>0?e.boxes[e.boxes.length-1]:void 0,d=e.previousSwimlaneNumber!==void 0?e.swimlanes[e.previousSwimlaneNumber]:void 0,l={width:Math.max(s.boxMinWidth,Math.min(s.boxMaxWidth,t.dimension.width))+2*s.boxPadding,height:Math.max(s.boxMinHeight,Math.min(s.boxMaxHeight,t.dimension.height))+2*s.boxPadding},c=X(a,d,r),m=c+l.width+s.boxPadding,x=Y(Object.values(e.swimlanes),m);a.r=c+l.width,a.maxHeight=Math.max(a.maxHeight,l.height),a.height=Math.max(s.swimlaneMinHeight,a.maxHeight)+2*s.swimlanePadding;const u={x:c,y:s.swimlanePadding+a.y,r:m,dimension:l,leftSibling:!1,swimlane:a,visual:t.visual,text:t.textProps.content,frame:t.frame,index:t.index},h={...e,boxes:[...e.boxes,u],swimlanes:{...e.swimlanes,[`${a.index}`]:a},previousSwimlaneNumber:i.index,previousFrame:t.frame,maxR:x},f=A(h.swimlanes);f.length>0&&(f[0].y=0);for(let p=1;p<f.length;p++){const y=f[p],$=f[p-1];y.y=$.y+$.height+s.swimlaneGap}return h}o(j,"evolveFramePositioned");function z(e,n){return e===0&&n.sourceFrames.length===0}o(z,"isFirstFrame");function K(e){return e.sourceFrames!==void 0&&e.sourceFrames!==null&&e.sourceFrames.length>0}o(K,"hasSourceFrame");function F(e,n){if(n!=null)return e.find(t=>t.frame.name===n.name)}o(F,"findBoxByFrame");function q(e,n,t){if(!(t<0))for(let i=t;i>=0;i--){const a=e[i];if(a.swimlane.index!==n)return a}}o(q,"findBoxByLineIndex");function Z(e,n){const t=n;if(z(t.index,t.frame))return[];const i=F(e.boxes,t.frame);if(i===void 0)throw new Error(`Target box not found for frame ${t.frame.name}`);let a;if(t.sourceFrame)a=F(e.boxes,t.sourceFrame);else{if(ve(t.frame))return[];a=q(e.boxes,i.swimlane.index,t.index-1)}return a===void 0?[]:[{$kind:T,frame:t.frame,index:t.index,sourceBox:a,targetBox:i}]}o(Z,"decidePositionRelation");function J(e,n){const t=n,i={visual:{fill:"none",stroke:"#000"},source:{x:t.sourceBox.x,y:t.sourceBox.y},target:{x:t.targetBox.x,y:t.targetBox.y},sourceBox:t.sourceBox,targetBox:t.targetBox};return{...e,relations:[...e.relations,i]}}o(J,"evolveRelationPositioned");var Me={[D]:G,[k]:Z},Be={[N]:j,[T]:J};function Q(e,n){const t=Me[n.$kind];if(t==null)return[];const i=t(e,n);return g.debug("decided events",i),i}o(Q,"decide");function ee(e,n){const t=n.reduce((i,a)=>{const r=Be[a.$kind];return r==null?i:r(i,a)},e);return g.debug("evolve events",{state:e,newState:t,events:n}),t}o(ee,"evolve");function v(e,n){const t=Q(e,n);return ee(e,t)}o(v,"dispatch");var M={getConfig:ke,preserveCommentsWhenParsing:!0,setOptions:we,getOptions:ye,clear:Pe,setAccTitle:me,getAccTitle:ce,getAccDescription:le,setAccDescription:de,setDiagramTitle:se,getDiagramTitle:oe,setAst:W,getDiagramProps:E,getState:O},Ee={parse:o(async e=>{const n=await be("eventmodeling",e);g.debug(n),M.setAst(n),re(n,M)},"parse")},Ae=R(),$e=Ae?.eventmodeling;function te(e,n){return t=>{const i=t.swimlane.y+n.swimlanePadding,a=e.append("g").attr("class","em-box");a.append("rect").attr("x",t.x).attr("y",i).attr("rx","3").attr("width",t.dimension.width).attr("height",t.dimension.height).attr("stroke",t.visual.stroke).attr("fill",t.visual.fill),a.append("foreignObject").attr("x",t.x+n.boxPadding).attr("y",i+10).attr("width",t.dimension.width-2*n.boxPadding).attr("height",t.dimension.height-2*n.boxPadding).append("xhtml:div").style("display","table").style("height","100%").style("width","100%").append("span").style("display","table-cell").style("text-align","center").style("vertical-align","middle").html(t.text)}}o(te,"renderD3Box");function ne(e,n){return e>n}o(ne,"dirUpwards");function ie(e,n,t,i){return a=>{const r=a.sourceBox.swimlane.y+n.swimlanePadding,d=a.targetBox.swimlane.y+n.swimlanePadding,l=ne(r,d),c=a.sourceBox.x+a.sourceBox.dimension.width*2/3,m=a.targetBox.x+a.targetBox.dimension.width/3;let x,u;g.debug(`rendering relation up=${l} for `,{sourceBox:a.sourceBox,targetBox:a.targetBox}),l?(x=r,u=d+a.targetBox.dimension.height):(x=r+a.sourceBox.dimension.height,u=d);const h=i.emRelationStroke??a.visual.stroke;e.append("path").attr("class","em-relation").attr("fill",a.visual.fill).attr("stroke",h).attr("stroke-width","1").attr("marker-end",`url(#${t})`).attr("d",`M${c} ${x} L${m} ${u}`)}}o(ie,"renderD3Relation");function ae(e,n,t,i){return a=>{const r=e.append("g").attr("class","em-swimlane"),d=i.emSwimlaneBackgroundOdd??"rgb(250,250,250)",l=i.emSwimlaneBackgroundStroke??"rgb(240,240,240)";r.append("rect").attr("x",0).attr("y",a.y).attr("rx","3").attr("width",n+t.swimlanePadding).attr("height",a.height).attr("fill",d).attr("stroke",l),r.append("text").attr("font-weight",t.swimlaneTextFontWeight).attr("x",30).attr("y",a.y+30).text(a.label)}}o(ae,"renderD3Swimlane");var Re=o(function(e,n,t,i){if(g.debug("in eventmodeling renderer",e+`
3
3
  `,"id:",n,t),!$e)throw new Error("EventModeling config not found");const a=i.db,{themeVariables:r,eventmodeling:d}=R(),l=ue(`[id="${n}"]`),c=a.getDiagramProps(),m=a.getState(),x=`em-arrowhead-${n}`,u=r.emArrowhead??"#000000";m.sortedSwimlanesArray.forEach(ae(l,m.maxR,c,r)),m.boxes.forEach(te(l,c)),m.relations.forEach(ie(l,c,x,r)),l.append("defs").append("marker").attr("id",x).attr("markerWidth","10").attr("markerHeight","7").attr("refX","10").attr("refY","3.5").attr("orient","auto").append("polygon").attr("points","0 0, 10 3.5, 0 7").attr("fill",u),xe(void 0,l,d?.padding??30,d?.useMaxWidth)},"draw"),De={draw:Re},Ne=o(e=>"","getStyles"),Te=Ne,Ie={parser:Ee,db:M,renderer:De,styles:Te};export{Ie as diagram};
@@ -1,3 +1,3 @@
1
- import{fG as U,Iv as o,ny as x,m0 as F,lT as G,sX as K}from"./Bo8Vb7mw.js";import{g as q,G as j,dS as V,cG as N,dr as w,dC as E,dN as M,cB as Y,aB as $}from"./DPuyFsTN.js";import{l as X,R as z,E as J}from"./DHO9Wxu6.js";function Q(e){return!e.retiredAt&&!e.pendingDeleteAt&&e.status!=="deleted"}function k(e){const t=new Date(e.lastActivity??e.updatedAt??e.createdAt).getTime()||0,s=e.messages.at(-1)?.timestamp,r=s&&new Date(s).getTime()||0;return Math.max(t,r)}function we(e){const t=e.filter(Q).map(s=>({agent:s,activity:k(s),created:new Date(s.createdAt).getTime()||0})).sort((s,r)=>r.activity-s.activity||r.created-s.created||String(s.agent.id).localeCompare(String(r.agent.id)));return t.find(({agent:s})=>U(s)==="topLevel")?.agent??t[0]?.agent??null}const p="__chief__",L="New chat";function Z(e){const t=e?.trim();return!t||t===L||t==="New chat with Assistant"||t==="New chat with Intent"||t==="Chief of Staff"||t.startsWith("New thread ")}function ee(e){const t=e.name?.trim();if(e.nameExplicitlySet&&t)return t;const r=e.messages.find(l=>l.role==="user")??e.messages[0],c=r?q(r).trim():"";return!t||Z(t)?c||L:c||t}const te="chief-of-staff",se=6,T="## Assistant Runtime Identity\n\nYou are Intent's built-in Assistant. Operate at the app level with `ws.app.*` tools: manage workspaces, settings, specialists, navigation, and cross-workspace agents. You are not a repository coding agent. Treat generic coding-agent, workspace, spec, task, and delegation instructions as subordinate to this role.\n\nWhen the user requests repository work, create or open the appropriate workspace and hand the work to the appropriate specialist. Once you have enough repository or PR information, act through the app-level proposal flow instead of merely promising to verify, prepare, or hand off the work.\n\nShow workspaces, notes, files, agent conversations and repository links beside your conversation when they help the user. Share ordinary Markdown links to notes (intent://local/note/<noteId> or intent://local/<workspaceId>/note/<noteId>) workspace links (intent://local/workspace/<workspaceId>), workspace file and agent links, and HTTPS repository URLs; clicking opens a closable content panel while keeping chat visible. To show content automatically, call `ws.app.ui.navigate` with the same link or /workspace/<workspaceId>. Calling `ws.app.workspaces.open` also shows that workspace beside chat unless the user requests a new window. Each conversation has its own panel history. Workspaces show the same detail and agent chat as Home’s Workspaces tab. Earlier content remains available in that conversation’s panel header picker. Creating a note alone does not open it: explicitly navigate when you want to show it.\n\nWhen the user asks to transfer a project between devices, find the source workspace with `ws.app.workspaces.list` and call `ws.app.workspaces.transfer(id, { destination })`. Pass the user's destination name as the hint, or omit it so they can choose a saved device in the inline card. The source is the device serving this assistant conversation. The tool only proposes the transfer: wait for approval or cancellation in the card, and report completion only after the proposal is applied.";function be(e){const t=e?.trim();return t?`${T}
1
+ import{fG as U,Iv as o,ny as x,m0 as F,lT as G,sX as K}from"./BmagX6n5.js";import{g as q,G as j,dS as V,cG as N,dr as w,dC as E,dN as M,cB as Y,aB as $}from"./DpNO08YA.js";import{l as X,R as z,E as J}from"./C20jcbNk.js";function Q(e){return!e.retiredAt&&!e.pendingDeleteAt&&e.status!=="deleted"}function k(e){const t=new Date(e.lastActivity??e.updatedAt??e.createdAt).getTime()||0,s=e.messages.at(-1)?.timestamp,r=s&&new Date(s).getTime()||0;return Math.max(t,r)}function we(e){const t=e.filter(Q).map(s=>({agent:s,activity:k(s),created:new Date(s.createdAt).getTime()||0})).sort((s,r)=>r.activity-s.activity||r.created-s.created||String(s.agent.id).localeCompare(String(r.agent.id)));return t.find(({agent:s})=>U(s)==="topLevel")?.agent??t[0]?.agent??null}const p="__chief__",L="New chat";function Z(e){const t=e?.trim();return!t||t===L||t==="New chat with Assistant"||t==="New chat with Intent"||t==="Chief of Staff"||t.startsWith("New thread ")}function ee(e){const t=e.name?.trim();if(e.nameExplicitlySet&&t)return t;const r=e.messages.find(l=>l.role==="user")??e.messages[0],c=r?q(r).trim():"";return!t||Z(t)?c||L:c||t}const te="chief-of-staff",se=6,T="## Assistant Runtime Identity\n\nYou are Intent's built-in Assistant. Operate at the app level with `ws.app.*` tools: manage workspaces, settings, specialists, navigation, and cross-workspace agents. You are not a repository coding agent. Treat generic coding-agent, workspace, spec, task, and delegation instructions as subordinate to this role.\n\nWhen the user requests repository work, create or open the appropriate workspace and hand the work to the appropriate specialist. Once you have enough repository or PR information, act through the app-level proposal flow instead of merely promising to verify, prepare, or hand off the work.\n\nShow workspaces, notes, files, agent conversations and repository links beside your conversation when they help the user. Share ordinary Markdown links to notes (intent://local/note/<noteId> or intent://local/<workspaceId>/note/<noteId>) workspace links (intent://local/workspace/<workspaceId>), workspace file and agent links, and HTTPS repository URLs; clicking opens a closable content panel while keeping chat visible. To show content automatically, call `ws.app.ui.navigate` with the same link or /workspace/<workspaceId>. Calling `ws.app.workspaces.open` also shows that workspace beside chat unless the user requests a new window. Each conversation has its own panel history. Workspaces show the same detail and agent chat as Home’s Workspaces tab. Earlier content remains available in that conversation’s panel header picker. Creating a note alone does not open it: explicitly navigate when you want to show it.\n\nWhen the user asks to transfer a project between devices, find the source workspace with `ws.app.workspaces.list` and call `ws.app.workspaces.transfer(id, { destination })`. Pass the user's destination name as the hint, or omit it so they can choose a saved device in the inline card. The source is the device serving this assistant conversation. The tool only proposes the transfer: wait for approval or cancellation in the card, and report completion only after the proposal is applied.";function be(e){const t=e?.trim();return t?`${T}
2
2
 
3
3
  ${t}`:T}const re=o.createSelector((e,t)=>{const s=e.backgroundHooks?.byWorkspaceId?.[t];return s?x(s.hooks):[]}),oe=o.createSelector((e,t)=>e.backgroundHooks?.byWorkspaceId?.[t]?.snapshotStatus??"loading"),O=o.createSelector((e,t)=>e.scriptMonitor?.byWorkspaceId[t]??F),Ae=o.createSelector((e,t,s)=>{const r=O.select(e,t);return r.status==="unsupported"?[]:r.monitors.filter(c=>c.agentId===s)}),u=o.createSelector((e,t,s)=>{const r=K(t,s);return e.agentSubscriptionUI.entries[r]??G}),ne=o.createSelector((e,t,s)=>u.select(e,t,s).subscriptions),ae=o.createSelector((e,t,s)=>u.select(e,t,s).eventSubscriptions??[]),ce=o.createSelector((e,t,s)=>u.select(e,t,s).delegationGroups),ve=o.createSelector((e,t,s)=>u.select(e,t,s).agentStatuses),ye=o.createSelector((e,t,s)=>u.select(e,t,s).waitingState),Ce=o.createSelector((e,t,s)=>u.select(e,t,s).wokenUpInfo);function ie(e){return[...new Set(e.filter(Boolean))]}const We=o.createSelector((e,t,s)=>{const r=u.select(e,t,s),c=[],l=new Set,i=n=>{for(const a of ie(n))l.has(a)||(l.add(a),c.push(a))},h=[...r.subscriptions].sort((n,a)=>n.createdAt.localeCompare(a.createdAt)||n.id.localeCompare(a.id));for(const n of h)n.delegationGroup?.awaitMode!=="all"&&i(n.actorIds);const g=new Map;for(const n of r.delegationGroups)n.awaitMode==="all"&&g.set(n.groupId,n);for(const n of g.values())i(n.expectedAgentIds);for(const n of h){const a=n.delegationGroup;a?.awaitMode==="all"&&!g.has(a.groupId)&&i(a.expectedAgentIds)}const d=new Set;for(const n of r.delegationGroups){for(const a of n.completedAgentIds)d.add(a);for(const a of n.deletedAgentIds)d.add(a);for(const[a,f]of Object.entries(n.agentStatuses))f==="completed"&&d.add(a)}for(const[n,a]of Object.entries(r.agentStatuses))a==="completed"&&d.add(n);const A=e.agentSessions?.byAgentId??{},v=new Set([...d].filter(n=>{const a=A[n];return!a||!j(V(a))})),y=new Map(c.map((n,a)=>[n,a])),C=n=>{const a=A[n];if(!a)return 2;if(a.attentionRequestKind==="blocker")return 0;if(a.attentionRequestKind==="discussion")return 1;if(v.has(n))return 4;const f=String(a.status).toLowerCase();return f==="responding"||f==="active"||f==="processing"?2:3},W=c.filter(n=>!v.has(n)).sort((n,a)=>C(n)-C(a)||(y.get(n)??0)-(y.get(a)??0));return{visible:r.snapshotStatus==="failed"||r.waitingState==="completed"||c.length>0||r.wokenUpInfo!==null,count:W.length,participantAgentIds:W}}),Te=o.createSelector((e,t,s)=>u.select(e,t,s).snapshotStatus),Ne=o.createSelector((e,t)=>{const s=`${t}:`,r=[];for(const c of Object.keys(e.agentSubscriptionUI.entries))c.startsWith(s)&&r.push(c.slice(s.length));return r});o.createSelector((e,t,s)=>{const r=ce.select(e,t,s);let c=0,l=0;for(const i of r)c+=i.expectedAgentIds.length,l+=i.completedAgentIds.length+i.deletedAgentIds.length;return{total:c,completed:l}});const Ee=o.createSelector(e=>{const t=X.select(e);if(!t||!z.select(e))return[];const s=new Set;for(const r of J.select(e,t)){const c=r.panes.find(l=>l.id===r.activePaneId);c?.type==="agent"&&c.agentId&&s.add(c.agentId)}return[...s].map(r=>({wsId:t,agentId:r}))}),P="pinned",le=64;function I(e){return e.trim().toLocaleLowerCase()}function R(e){return e===P}function Me(e,t){const s=e.trim();if(s.length===0)return{ok:!1,error:"empty"};if([...s].length>le)return{ok:!1,error:"tooLong"};const r=I(s);return r===P?{ok:!1,error:"reserved"}:t.some(c=>I(c)===r)?{ok:!1,error:"duplicate"}:{ok:!0,label:s}}function de(e){const t=new Map;for(const s of e){if(typeof s!="string"||R(s))continue;const r=s.trim();if(r.length===0)continue;const c=I(r);t.has(c)||t.set(c,s)}return[...t.values()].sort((s,r)=>s.localeCompare(r,void 0,{sensitivity:"base"}))}function _(e){const s=e.workspaceAgents?.byWorkspaceId?.[p]?.agentIds,r=s&&s.length>0?new Set(s.map(i=>String(i))):null,c=e.agentSessions?.agentIdsByWorkspace?.[p]??[],l=c.length>0?c.map(i=>e.agentSessions?.byAgentId?.[i]).filter(i=>!!i):Object.values(e.agentSessions?.byAgentId??{}).filter(i=>i.workspaceId===p);return r?l.filter(i=>r.has(String(i.id))):l}function D(e){return e.metadata?.specialist===te&&e.metadata?.chiefPromptVersion===se}function B(e){return Math.max(e.messages.length,e.messageCount??0)}function S(e){return{agentId:e.id,title:ee(e),isActive:e.isStreaming===!0||e.isProcessing===!0||e.isResponding===!0,messageCount:B(e),pinned:e.pinned===!0,retired:!!e.retiredAt}}function b(e){return _(e).filter(t=>!t.retiredAt)}function m(e,t){return k(t)-k(e)}const Le=o.createSelector(e=>e.sidebarNav.panelItem),Oe=o.createSelector(e=>e.sidebarNav.onboardingActive),Pe=o.createSelector(e=>e.sidebarNav.showCreateModal),Re=o.createSelector(e=>e.sidebarNav.createModalUsesHomeRepository),_e=o.createSelector(e=>e.sidebarNav.createModalPrefillRequest),H=o.createSelector(e=>N.select(e)?.capabilities.workspaceLabels===1),De=o.createSelector((e,t)=>w.select(e,t)?.label??null),Be=o.createSelector(e=>de(E.select(e).map(t=>t.label))),pe=["id","label"],He=o.createSelector((e,t)=>H.select(e)&&M.select(e,t,pe)!==null),ue=o.createSelector(e=>N.select(e)?.capabilities.workspaceAutoArchiveOptOut===1),ge=o.createSelector(e=>(e.sidebarNav.autoArchiveIdleAfterDays??0)>0),Ue=o.createSelector((e,t)=>w.select(e,t)?.autoArchiveDisabled===!0),fe=["id","autoArchiveDisabled"],xe=o.createSelector((e,t)=>{if(!ue.select(e)||!ge.select(e))return!1;const s=w.select(e,t);return!s||s.isRemote===!0||s.environmentConfig?.type==="remote"?!1:M.select(e,t,fe)!==null}),Fe=o.createSelector(e=>e.sidebarNav.pinnedWorkspaceIds),Ge=o.createSelector(e=>H.select(e)?E.select(e).filter(t=>R(t.label)).map(t=>t.id):e.sidebarNav.pinnedWorkspaceIds),Ke=o.createSelector((e,t)=>e.sidebarNav.multiSelectSelectedTabIdsByWorkspaceId[t]??["overview"]),qe=o.createSelector((e,t)=>e.sidebarNav.noteOrderByWorkspaceId[t]??[]),je=o.createSelector((e,t)=>e.sidebarNav.collapsedNoteIdsByWorkspaceId[t]??[]),Ve=o.createSelector((e,t)=>e.sidebarNav.expandedNoteIdsByWorkspaceId?.[t]??[]),Ye=o.createSelector(e=>e.sidebarNav.chiefActiveAgentId),$e=o.createSelector((e,t)=>{const s=e.agentSessions.byAgentId[t];if(s?.workspaceId!==p)return{hooks:0,monitors:0,subscriptions:0};const r=oe.select(e,p)==="ready"?re.select(e,p).filter(d=>d.agentId===t&&(d.state==="scheduled"||d.state==="running")).length:s.waitingOnHooks?.length??0,c=Y.select(e,p)==="ready"?$.select(e,p,t).filter(d=>d.state==="active").length:s.waitingOnPrMonitors?.length??0,l=O.select(e,p),i=l.status==="unsupported"?0:l.status==="ready"?l.monitors.filter(d=>d.agentId===t&&d.state==="active").length:s.waitingOnScriptMonitors?.length??0,h=s.isWaitingForOtherAgents===!1?0:s.waitingForAgentIds?.length??(ne.select(e,p,t).length||(s.isWaitingForOtherAgents?1:0)),g=ae.select(e,p,t).filter(d=>d.subscriberAgentId===t).length;return{hooks:r,monitors:c+i,subscriptions:h+g}}),Xe=o.createSelector(e=>e.sidebarNav.statsOverlayOpen),he=o.createSelector(e=>b(e).sort((t,s)=>+(s.pinned===!0)-+(t.pinned===!0)||m(t,s)).map(S)),Se=o.createSelector(e=>_(e).filter(t=>!!t.retiredAt).sort(m).map(S)),ze=o.createSelector(e=>[...he.select(e),...Se.select(e)]),Je=o.createSelector(e=>{const t=b(e).filter(D).sort(m)[0];return t?S(t):null}),Qe=o.createSelector(e=>{const t=b(e).filter(s=>B(s)===0&&!s.lastMessageId&&D(s)).sort(m)[0];return t?S(t):null});export{Oe as A,Le as B,se as C,L as D,Ge as E,Se as F,Qe as G,O as H,Pe as I,Xe as J,Te as K,Ne as L,ye as M,Ce as N,Ue as O,P,je as Q,Ve as R,De as S,Be as T,qe as U,Me as V,le as W,te as a,p as b,be as c,Q as d,We as e,ve as f,ne as g,ze as h,R as i,$e as j,re as k,oe as l,xe as m,He as n,Ye as o,he as p,_e as q,we as r,Ae as s,Re as t,Je as u,ce as v,Ee as w,H as x,Fe as y,Ke as z};