@intent-hq/web 2.350.1 → 2.351.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 (266) hide show
  1. package/package.json +1 -1
  2. package/web/app/immutable/chunks/{DNZhZg57.js → -o555Jq8.js} +1 -1
  3. package/web/app/immutable/chunks/{BOMdRVXl.js → 0-xAXZgf.js} +1 -1
  4. package/web/app/immutable/chunks/{7uJhY2Ro.js → 25Qfa38y.js} +1 -1
  5. package/web/app/immutable/chunks/{BRWlAcla.js → 3yYmQx2z.js} +1 -1
  6. package/web/app/immutable/chunks/41c-5lbJ.js +1 -0
  7. package/web/app/immutable/chunks/{To-GU1hI.js → 4XRamNN4.js} +1 -1
  8. package/web/app/immutable/chunks/{SW-tnZ5e.js → 5P8mOVWK.js} +1 -1
  9. package/web/app/immutable/chunks/{C-Tv9xzP.js → 67kYB1lt.js} +1 -1
  10. package/web/app/immutable/chunks/{BtEQs3u_.js → 6pSwNbUy.js} +3 -3
  11. package/web/app/immutable/chunks/{BBYhh_eX.js → 73QfWqEv.js} +1 -1
  12. package/web/app/immutable/chunks/{Cjw1QvKa.js → AOUBMpYk.js} +1 -1
  13. package/web/app/immutable/chunks/{BT9NukZQ.js → AyGecNlS.js} +1 -1
  14. package/web/app/immutable/chunks/{CEa8rngJ.js → B-TDUD-n.js} +1 -1
  15. package/web/app/immutable/chunks/{CtUmTl5D.js → B-hKl_xx.js} +1 -1
  16. package/web/app/immutable/chunks/{Ci4xycon.js → B043Z8mk.js} +1 -1
  17. package/web/app/immutable/chunks/{D7v0ZhmL.js → B0QrNgSj.js} +1 -1
  18. package/web/app/immutable/chunks/{Ca33AaL6.js → B22owOuz.js} +1 -1
  19. package/web/app/immutable/chunks/{CV5WtbgW.js → B57wBfTw.js} +1 -1
  20. package/web/app/immutable/chunks/{B4ny9Nap.js → B5ekpGAe.js} +1 -1
  21. package/web/app/immutable/chunks/{BmxmL68T.js → B6bPIJ1k.js} +1 -1
  22. package/web/app/immutable/chunks/{D41iEHKy.js → B9aafd7C.js} +1 -1
  23. package/web/app/immutable/chunks/{Cvv8aJ4r.js → B9l9TMyA.js} +1 -1
  24. package/web/app/immutable/chunks/{B8WU5ocP.js → BA4L4UPI.js} +1 -1
  25. package/web/app/immutable/chunks/{7fznLbVZ.js → BAb3JAL_.js} +1 -1
  26. package/web/app/immutable/chunks/{Bp_k45o-.js → BBCbq-hE.js} +1 -1
  27. package/web/app/immutable/chunks/{DzPN4aFg.js → BCP62aew.js} +1 -1
  28. package/web/app/immutable/chunks/{CBVEFL-b.js → BCQGaqgQ.js} +1 -1
  29. package/web/app/immutable/chunks/{BhO09u_O.js → BDX4YTR9.js} +1 -1
  30. package/web/app/immutable/chunks/{D897Deqj.js → BDbt9cuZ.js} +1 -1
  31. package/web/app/immutable/chunks/{gq1gp-va.js → BEsCIa2p.js} +1 -1
  32. package/web/app/immutable/chunks/{D4xoTssJ.js → BH-zWM3a.js} +3 -3
  33. package/web/app/immutable/chunks/{xEQudZps.js → BHcKnFOT.js} +1 -1
  34. package/web/app/immutable/chunks/{CEI59WUF.js → BI5nb_pF.js} +1 -1
  35. package/web/app/immutable/chunks/{DWqOehs6.js → BJ5nSO_Z.js} +3 -3
  36. package/web/app/immutable/chunks/{BLiGayBi.js → BJdaIUzQ.js} +1 -1
  37. package/web/app/immutable/chunks/BJwMP_No.js +1 -0
  38. package/web/app/immutable/chunks/{rbrWRnHh.js → BOuXmWAj.js} +1 -1
  39. package/web/app/immutable/chunks/{C5_BSKQx.js → BPIrwIPC.js} +1 -1
  40. package/web/app/immutable/chunks/{UiRD2HCB.js → BSkWWR3g.js} +1 -1
  41. package/web/app/immutable/chunks/{DJBAuZjD.js → BTI1m7l8.js} +1 -1
  42. package/web/app/immutable/chunks/{BaneMq5E.js → BTLU_fQH.js} +1 -1
  43. package/web/app/immutable/chunks/{C-8EePTi.js → BXYFidlw.js} +1 -1
  44. package/web/app/immutable/chunks/{C1862fgG.js → BYT1TQGK.js} +1 -1
  45. package/web/app/immutable/chunks/{CPFtOnI7.js → BYjUWrg8.js} +1 -1
  46. package/web/app/immutable/chunks/{YeEGAsBO.js → BahcW9Py.js} +1 -1
  47. package/web/app/immutable/chunks/{UkpeErAx.js → Bd6Rwh69.js} +2 -2
  48. package/web/app/immutable/chunks/{BzSSQl6R.js → BdKft7gn.js} +1 -1
  49. package/web/app/immutable/chunks/{ChmnWquS.js → BhX-5zd9.js} +1 -1
  50. package/web/app/immutable/chunks/{BxE0TK4z.js → Bj0v3XMt.js} +1 -1
  51. package/web/app/immutable/chunks/{Bv8FuKnx.js → BjHlv5EB.js} +1 -1
  52. package/web/app/immutable/chunks/{BsAcT-SB.js → BjVx5o0n.js} +1 -1
  53. package/web/app/immutable/chunks/{BxUPDfJ4.js → BjnapXgD.js} +2 -2
  54. package/web/app/immutable/chunks/{B_EJ_ROK.js → Bkkc9nPJ.js} +3 -3
  55. package/web/app/immutable/chunks/{DMJnRVJf.js → BlcZflKW.js} +1 -1
  56. package/web/app/immutable/chunks/{9_2ZyZ9L.js → Bm0VuPYn.js} +1 -1
  57. package/web/app/immutable/chunks/{eIlGg2ZH.js → Bo40L-We.js} +1 -1
  58. package/web/app/immutable/chunks/{BHpSEINq.js → BoT__Uvu.js} +1 -1
  59. package/web/app/immutable/chunks/{D6kv6T9Z.js → BpGfQKt5.js} +1 -1
  60. package/web/app/immutable/chunks/{BJTb0iPR.js → Bpkh7IXN.js} +1 -1
  61. package/web/app/immutable/chunks/{DKPFCCGK.js → BrR0973A.js} +1 -1
  62. package/web/app/immutable/chunks/{BpfVRpLO.js → BsDTYuK1.js} +1 -1
  63. package/web/app/immutable/chunks/{BSSsvY4I.js → BuDJvkTk.js} +1 -1
  64. package/web/app/immutable/chunks/{Cw94LfJC.js → BuupGai6.js} +1 -1
  65. package/web/app/immutable/chunks/{_s2xW34N.js → Bv1i2B5u.js} +1 -1
  66. package/web/app/immutable/chunks/{DVpbdNgF.js → BwzznN4d.js} +1 -1
  67. package/web/app/immutable/chunks/{DsLKXQ10.js → ByQWAkHB.js} +1 -1
  68. package/web/app/immutable/chunks/{DM6SW5ie.js → Byr2ZhFE.js} +1 -1
  69. package/web/app/immutable/chunks/{d34yYkdR.js → BzXCk-eX.js} +1 -1
  70. package/web/app/immutable/chunks/{EBvHmS3f.js → C-cC659R.js} +1 -1
  71. package/web/app/immutable/chunks/{fE-kcmYj.js → C1ha510g.js} +1 -1
  72. package/web/app/immutable/chunks/{CIFYvyWz.js → C1zdYplM.js} +1 -1
  73. package/web/app/immutable/chunks/{LeGktTWT.js → C2QAZ2iP.js} +1 -1
  74. package/web/app/immutable/chunks/{B3groEj8.js → C2pyYkiS.js} +1 -1
  75. package/web/app/immutable/chunks/{Dw4yJGUy.js → C4UmUQ0t.js} +1 -1
  76. package/web/app/immutable/chunks/{CbVZZ75K.js → C4oYAvfo.js} +1 -1
  77. package/web/app/immutable/chunks/{C7uOzB-k.js → C4qlKK6F.js} +1 -1
  78. package/web/app/immutable/chunks/{6oPcdkTg.js → C96Cos0M.js} +1 -1
  79. package/web/app/immutable/chunks/{qVFwsb4j.js → C97vyu8P.js} +1 -1
  80. package/web/app/immutable/chunks/{BE9VuWVi.js → C9OFPDov.js} +1 -1
  81. package/web/app/immutable/chunks/{DJnP7chT.js → C9jK2F--.js} +1 -1
  82. package/web/app/immutable/chunks/{Cs2fCAnT.js → CA8Jy4WC.js} +1 -1
  83. package/web/app/immutable/chunks/{CeeT1t7l.js → CB3bw4PL.js} +1 -1
  84. package/web/app/immutable/chunks/{C2olseF2.js → CBtX8-Aa.js} +1 -1
  85. package/web/app/immutable/chunks/{rEoZFmiI.js → CCO5tijn.js} +1 -1
  86. package/web/app/immutable/chunks/{286xXFLf.js → CCw4KHZp.js} +1 -1
  87. package/web/app/immutable/chunks/{CcIb5dHQ.js → CEpelLfd.js} +2 -2
  88. package/web/app/immutable/chunks/{D3HUOTfX.js → CEufllny.js} +1 -1
  89. package/web/app/immutable/chunks/{mxwa8yTT.js → CHnA0xpr.js} +1 -1
  90. package/web/app/immutable/chunks/{B0tZqpMw.js → CIm0iT4E.js} +1 -1
  91. package/web/app/immutable/chunks/{CtH7YJ1N.js → CKGxulW8.js} +1 -1
  92. package/web/app/immutable/chunks/{Dw7Mfzwn.js → CKmgmdFa.js} +1 -1
  93. package/web/app/immutable/chunks/{DukC1Pxj.js → CMWevjI7.js} +1 -1
  94. package/web/app/immutable/chunks/{XM11aLg9.js → CNPNgdra.js} +1 -1
  95. package/web/app/immutable/chunks/{1WcgIxhR.js → CTh4M5uj.js} +1 -1
  96. package/web/app/immutable/chunks/{BKf74O20.js → CTvwRPyF.js} +1 -1
  97. package/web/app/immutable/chunks/{BXSSv3Oq.js → CUBdinib.js} +1 -1
  98. package/web/app/immutable/chunks/{CaGPKvrg.js → CVDRxz2f.js} +1 -1
  99. package/web/app/immutable/chunks/{BC51na55.js → CWUa486r.js} +1 -1
  100. package/web/app/immutable/chunks/{CBTiE17j.js → CYlvyU3U.js} +1 -1
  101. package/web/app/immutable/chunks/{2yJgo8xz.js → CYyISHjN.js} +1 -1
  102. package/web/app/immutable/chunks/{CMvvA2dm.js → C_akaBgq.js} +1 -1
  103. package/web/app/immutable/chunks/{DlTJT3V9.js → CaPALXDj.js} +1 -1
  104. package/web/app/immutable/chunks/{Csp7pCXT.js → CbX7A7fn.js} +1 -1
  105. package/web/app/immutable/chunks/{Cwzl8GTd.js → Cc0uYvgR.js} +1 -1
  106. package/web/app/immutable/chunks/{CyRJV2Ki.js → CcYKMJWn.js} +1 -1
  107. package/web/app/immutable/chunks/{D7KOa2cM.js → CccgSyFt.js} +2 -2
  108. package/web/app/immutable/chunks/{B_7vJcZK.js → CdXmpyDy.js} +1 -1
  109. package/web/app/immutable/chunks/{f_NG7JPv.js → CgXr85TV.js} +1 -1
  110. package/web/app/immutable/chunks/{H_Nm449K.js → CgfVp9Ef.js} +1 -1
  111. package/web/app/immutable/chunks/{BCahpYtg.js → Ch2DvoYt.js} +1 -1
  112. package/web/app/immutable/chunks/{Xn8V9ehY.js → ChD6V-mA.js} +1 -1
  113. package/web/app/immutable/chunks/{CrlYwLEr.js → CjPfyTRR.js} +1 -1
  114. package/web/app/immutable/chunks/{D2rxIP2b.js → Cj__CwtA.js} +1 -1
  115. package/web/app/immutable/chunks/{BK62I-uA.js → CjafAhxa.js} +1 -1
  116. package/web/app/immutable/chunks/{CFE62qf4.js → ClCe1k4i.js} +1 -1
  117. package/web/app/immutable/chunks/{B-DRVFcy.js → ClgmQqA9.js} +1 -1
  118. package/web/app/immutable/chunks/{CK2a86W3.js → ClkbPGx9.js} +1 -1
  119. package/web/app/immutable/chunks/{CUEflbxf.js → CrHTQDbT.js} +1 -1
  120. package/web/app/immutable/chunks/{DwJJFAxY.js → CramXAJ0.js} +1 -1
  121. package/web/app/immutable/chunks/{BkMQXe7-.js → Crf39e2Q.js} +1 -1
  122. package/web/app/immutable/chunks/{2cru8yuU.js → CrkDo76r.js} +1 -1
  123. package/web/app/immutable/chunks/{Dr7kBzFG.js → CuCrpEmq.js} +1 -1
  124. package/web/app/immutable/chunks/{DxR7IJ2x.js → CuHfgFFh.js} +1 -1
  125. package/web/app/immutable/chunks/{BjYS0G-V.js → Cv3VBAcZ.js} +1 -1
  126. package/web/app/immutable/chunks/{DFxm2U6S.js → Cw23SInT.js} +1 -1
  127. package/web/app/immutable/chunks/{ChdL62OI.js → Cxn17X4d.js} +2 -2
  128. package/web/app/immutable/chunks/{71jcCmFL.js → Cy3svQNQ.js} +1 -1
  129. package/web/app/immutable/chunks/{DVWomJ3M.js → D-fvD02O.js} +2 -2
  130. package/web/app/immutable/chunks/{B2r-op5b.js → D07rIrLM.js} +1 -1
  131. package/web/app/immutable/chunks/{iP2vS2hx.js → D2kFrNtb.js} +1 -1
  132. package/web/app/immutable/chunks/{Ccm9-f52.js → D542lbvk.js} +2 -2
  133. package/web/app/immutable/chunks/{kXBIZrMa.js → D68o263s.js} +1 -1
  134. package/web/app/immutable/chunks/{CUiOtEey.js → D6kdeziR.js} +1 -1
  135. package/web/app/immutable/chunks/{C9CjIm-I.js → D6ncbN-K.js} +1 -1
  136. package/web/app/immutable/chunks/{B99vgEcA.js → D9WrXbf9.js} +1 -1
  137. package/web/app/immutable/chunks/{32pNLDLJ.js → D9XKGcAY.js} +1 -1
  138. package/web/app/immutable/chunks/{qT7g0XeC.js → DE4arwhh.js} +1 -1
  139. package/web/app/immutable/chunks/{BDh1WR6p.js → DEVAGsyG.js} +1 -1
  140. package/web/app/immutable/chunks/{BJpI9lmh.js → DGRqvVY1.js} +2 -2
  141. package/web/app/immutable/chunks/{vCsRAP9U.js → DGaDkdng.js} +1 -1
  142. package/web/app/immutable/chunks/{CbVK4mzc.js → DGb_dMRY.js} +1 -1
  143. package/web/app/immutable/chunks/{BCazrMx2.js → DL304mi1.js} +1 -1
  144. package/web/app/immutable/chunks/{B1uWzETW.js → DLiD3Y7h.js} +1 -1
  145. package/web/app/immutable/chunks/DMIrVtTU.js +1 -0
  146. package/web/app/immutable/chunks/{CIwCBz4N.js → DPemhAGL.js} +1 -1
  147. package/web/app/immutable/chunks/{DPiLMhQg.js → DQ8vH0VY.js} +1 -1
  148. package/web/app/immutable/chunks/{B45FOkqf.js → DQ_x-k0O.js} +3 -3
  149. package/web/app/immutable/chunks/{2rtvtln4.js → DQjekoSU.js} +1 -1
  150. package/web/app/immutable/chunks/{BwgrW8yQ.js → DRRbh3V4.js} +1 -1
  151. package/web/app/immutable/chunks/{C82N7Ttz.js → DRiReCwX.js} +1 -1
  152. package/web/app/immutable/chunks/{CsbrChhH.js → DUor0DI_.js} +1 -1
  153. package/web/app/immutable/chunks/{BmMUMiCr.js → DWgWsm2y.js} +1 -1
  154. package/web/app/immutable/chunks/{CM0lKKPd.js → D_P8KoFV.js} +1 -1
  155. package/web/app/immutable/chunks/{BMcc0dQQ.js → Dc8XEwi0.js} +1 -1
  156. package/web/app/immutable/chunks/{BQAE7Cab.js → DcxuGfvW.js} +1 -1
  157. package/web/app/immutable/chunks/{D4gEzra-.js → DdfHQxRr.js} +1 -1
  158. package/web/app/immutable/chunks/{DZ-cwX5R.js → De70D2Lx.js} +2 -2
  159. package/web/app/immutable/chunks/{CzZDc-Ii.js → DfA_Upom.js} +1 -1
  160. package/web/app/immutable/chunks/{fvaRaafM.js → DfuAejzr.js} +1 -1
  161. package/web/app/immutable/chunks/{BaMaQsqR.js → DhhomoFS.js} +1 -1
  162. package/web/app/immutable/chunks/{BV_qZ-Kq.js → DipCXz5L.js} +1 -1
  163. package/web/app/immutable/chunks/{D3wOVtz4.js → DjE6Tn4o.js} +1 -1
  164. package/web/app/immutable/chunks/{4M32Nrru.js → Dq9dLpt4.js} +4 -4
  165. package/web/app/immutable/chunks/{B_Iojn2B.js → DqKef_Yi.js} +1 -1
  166. package/web/app/immutable/chunks/{DG7MHKfi.js → DsewpLhd.js} +1 -1
  167. package/web/app/immutable/chunks/{DhNmiaLk.js → DtV2WjXp.js} +1 -1
  168. package/web/app/immutable/chunks/{LIrM5l7a.js → DtWKfIHW.js} +1 -1
  169. package/web/app/immutable/chunks/{BASTKLI1.js → DuPQa1Hv.js} +4 -4
  170. package/web/app/immutable/chunks/{CJeZnjZ2.js → Dv-TQImR.js} +1 -1
  171. package/web/app/immutable/chunks/{CKR2Jwr3.js → DvmJXjP_.js} +1 -1
  172. package/web/app/immutable/chunks/{Cifu9mi9.js → DwR2QVtr.js} +1 -1
  173. package/web/app/immutable/chunks/{DDlZNhW-.js → DwqB2LW1.js} +1 -1
  174. package/web/app/immutable/chunks/{CrGdgRLR.js → Dy3sS5WY.js} +1 -1
  175. package/web/app/immutable/chunks/{DLbCIONA.js → Dy5C9WSY.js} +1 -1
  176. package/web/app/immutable/chunks/{DxrW2EIL.js → DzIV-I7E.js} +1 -1
  177. package/web/app/immutable/chunks/{DZlVkf9Y.js → DzqZnAgo.js} +4 -4
  178. package/web/app/immutable/chunks/{CFMV5ANe.js → ETkf7dmN.js} +1 -1
  179. package/web/app/immutable/chunks/{CjFrzDwu.js → FHXrLz5A.js} +1 -1
  180. package/web/app/immutable/chunks/{_1y9QH1k.js → FbHjHDf9.js} +1 -1
  181. package/web/app/immutable/chunks/{2B0vRGaJ.js → G1rQ1ZLS.js} +1 -1
  182. package/web/app/immutable/chunks/{Bb07ib28.js → GfKb8O3O.js} +1 -1
  183. package/web/app/immutable/chunks/{Cbr15rLJ.js → Ghm7WpFi.js} +1 -1
  184. package/web/app/immutable/chunks/{Y5hz4Ndf.js → Ju7PAma1.js} +1 -1
  185. package/web/app/immutable/chunks/{BEVux-ca.js → KcC0pRTT.js} +1 -1
  186. package/web/app/immutable/chunks/{CH0shWeP.js → Lx7mQEPN.js} +1 -1
  187. package/web/app/immutable/chunks/{BboZoGK5.js → N7G-ZTah.js} +5 -5
  188. package/web/app/immutable/chunks/{C7LjhbvI.js → NFc5A7UL.js} +1 -1
  189. package/web/app/immutable/chunks/{C6DrVy6-.js → Og4xuM7g.js} +1 -1
  190. package/web/app/immutable/chunks/{CEHfILB1.js → QFwPCSKD.js} +1 -1
  191. package/web/app/immutable/chunks/{CKe6gKEB.js → QLXfiC8k.js} +1 -1
  192. package/web/app/immutable/chunks/{BJeKKdy7.js → QPRdLPHE.js} +1 -1
  193. package/web/app/immutable/chunks/{C7NptMs7.js → R6z5Bqeu.js} +1 -1
  194. package/web/app/immutable/chunks/{D2JEXCBC.js → RjrC7VFY.js} +1 -1
  195. package/web/app/immutable/chunks/{DEu6gDAW.js → SXjX79W0.js} +3 -3
  196. package/web/app/immutable/chunks/{B8kZnhwO.js → Sa9G_k7P.js} +1 -1
  197. package/web/app/immutable/chunks/{Ari-xzJB.js → SoUJpC1P.js} +1 -1
  198. package/web/app/immutable/chunks/{BCFqTXC5.js → UMKs78qL.js} +1 -1
  199. package/web/app/immutable/chunks/{2GRAEVbl.js → Uea955Vz.js} +1 -1
  200. package/web/app/immutable/chunks/{CClSMHHc.js → VIOarPUD.js} +1 -1
  201. package/web/app/immutable/chunks/{hHmUU40X.js → VmRBMU-H.js} +2 -2
  202. package/web/app/immutable/chunks/{D3v_P2Uq.js → W2yoNJFv.js} +1 -1
  203. package/web/app/immutable/chunks/{DZ9bPwU4.js → X0wrjHux.js} +1 -1
  204. package/web/app/immutable/chunks/{Ctvf1zqH.js → XVViy8ZW.js} +1 -1
  205. package/web/app/immutable/chunks/{BNuxEAQs.js → ZngqFVq2.js} +1 -1
  206. package/web/app/immutable/chunks/{CxxiwOxz.js → _6UbyZFm.js} +1 -1
  207. package/web/app/immutable/chunks/{BaXl9G_p.js → a6ao35lO.js} +1 -1
  208. package/web/app/immutable/chunks/{RMrXit9I.js → af7yduyJ.js} +12 -12
  209. package/web/app/immutable/chunks/{vQ6gxb4d.js → b1qSM27E.js} +1 -1
  210. package/web/app/immutable/chunks/{DldD9pcf.js → b8GoMhSt.js} +1 -1
  211. package/web/app/immutable/chunks/{WydNOMQI.js → bV1WTvQr.js} +1 -1
  212. package/web/app/immutable/chunks/{B79m0-as.js → cKfnoB88.js} +1 -1
  213. package/web/app/immutable/chunks/{ClDVqtGb.js → dAVgSJe8.js} +1 -1
  214. package/web/app/immutable/chunks/{B25aSyPj.js → dvtNrmBJ.js} +1 -1
  215. package/web/app/immutable/chunks/{DW8-b4qF.js → fKGM3H1S.js} +1 -1
  216. package/web/app/immutable/chunks/{Dt_3gVf3.js → gWaxvgpv.js} +4 -4
  217. package/web/app/immutable/chunks/{D68W4EG9.js → gtyJplKf.js} +1 -1
  218. package/web/app/immutable/chunks/{BVg1wXVp.js → hYtFXuM6.js} +1 -1
  219. package/web/app/immutable/chunks/{dt-eIcjK.js → jmGUW687.js} +1 -1
  220. package/web/app/immutable/chunks/{nwgFD7pR.js → jqiN8Ebl.js} +2 -2
  221. package/web/app/immutable/chunks/{BXpSvmYd.js → jyFhDlZn.js} +1 -1
  222. package/web/app/immutable/chunks/{zDp2t9TD.js → mgh5gPA4.js} +1 -1
  223. package/web/app/immutable/chunks/{CxF8YFum.js → nLyQInj7.js} +1 -1
  224. package/web/app/immutable/chunks/nbfGErIW.js +1 -0
  225. package/web/app/immutable/chunks/{DMF8Xnwn.js → nqpg2Djj.js} +1 -1
  226. package/web/app/immutable/chunks/{kWL2GjPN.js → oNlT93oA.js} +1 -1
  227. package/web/app/immutable/chunks/{CNCNgnPl.js → ot3p-Y1j.js} +1 -1
  228. package/web/app/immutable/chunks/{xCXPOQKs.js → pA6KCKbP.js} +1 -1
  229. package/web/app/immutable/chunks/{B3aPtdPQ.js → sHSA98Ae.js} +1 -1
  230. package/web/app/immutable/chunks/{DDmVz0zj.js → sxpeFI4o.js} +1 -1
  231. package/web/app/immutable/chunks/{CfcmMMGe.js → ugjOCd8V.js} +3 -3
  232. package/web/app/immutable/chunks/{DBwXC8Tc.js → uoJ0nI_z.js} +1 -1
  233. package/web/app/immutable/chunks/{BgCDi7PA.js → v23yk8Nl.js} +1 -1
  234. package/web/app/immutable/chunks/{DYdDm8qg.js → vLUkS5Lr.js} +1 -1
  235. package/web/app/immutable/chunks/{cHlEaLvO.js → vSLEtuRc.js} +1 -1
  236. package/web/app/immutable/chunks/{DT77V-dl.js → zB3SalmM.js} +1 -1
  237. package/web/app/immutable/entry/{app.B3zmyQo-.js → app.D9kIVkFi.js} +3 -3
  238. package/web/app/immutable/entry/start.CsSnQcM4.js +1 -0
  239. package/web/app/immutable/nodes/{0.kC9p1Qyh.js → 0.CycxDG0L.js} +1 -1
  240. package/web/app/immutable/nodes/{1.CbKQgLbJ.js → 1.DBDsO8vk.js} +1 -1
  241. package/web/app/immutable/nodes/{10.nkEgxR4t.js → 10.DeWMsWJr.js} +1 -1
  242. package/web/app/immutable/nodes/{11.BNBCl9Ko.js → 11.D3R05nAN.js} +1 -1
  243. package/web/app/immutable/nodes/{12.BriSlPZC.js → 12.FwwO1QwE.js} +1 -1
  244. package/web/app/immutable/nodes/{13.QpfX0_5g.js → 13.BXCK1uUO.js} +3 -3
  245. package/web/app/immutable/nodes/{14.ZJqXSGiE.js → 14.CaU020TI.js} +1 -1
  246. package/web/app/immutable/nodes/{15.DdEMX_Kl.js → 15.DBweoCJ3.js} +1 -1
  247. package/web/app/immutable/nodes/{16.rtMs5JTy.js → 16.x7FRjB-z.js} +1 -1
  248. package/web/app/immutable/nodes/{17.DDfq3IKN.js → 17.nVKVEw2j.js} +1 -1
  249. package/web/app/immutable/nodes/{18.Cds1TQEe.js → 18.D8Pypemm.js} +2 -2
  250. package/web/app/immutable/nodes/{2.TMV-VJam.js → 2.bw2OhfV2.js} +4 -4
  251. package/web/app/immutable/nodes/{3.Dy6_DOyf.js → 3.C3rwANJW.js} +1 -1
  252. package/web/app/immutable/nodes/{4.CSClZLtr.js → 4.D3HKzTPL.js} +1 -1
  253. package/web/app/immutable/nodes/{5.B2fm04nD.js → 5.f1pRghhu.js} +1 -1
  254. package/web/app/immutable/nodes/{6.wppAoRAf.js → 6.rpNMjH5t.js} +1 -1
  255. package/web/app/immutable/nodes/{7.BJEQzlNN.js → 7.BSbrbiiB.js} +1 -1
  256. package/web/app/immutable/nodes/8.DbrZFert.js +14 -0
  257. package/web/app/immutable/nodes/{9.Dz8XAzvL.js → 9.D--sfpfT.js} +5 -5
  258. package/web/app/version.json +1 -1
  259. package/web/generated/paraglide.js +46 -46
  260. package/web/index.html +18 -18
  261. package/web/app/immutable/chunks/DGQ1ECsI.js +0 -1
  262. package/web/app/immutable/chunks/DZgyzAfw.js +0 -1
  263. package/web/app/immutable/chunks/H2SodBVA.js +0 -1
  264. package/web/app/immutable/chunks/Hc3ynozM.js +0 -1
  265. package/web/app/immutable/entry/start.DL1A5aV6.js +0 -1
  266. package/web/app/immutable/nodes/8.bO4mjRsC.js +0 -14
@@ -1 +1 @@
1
- import{ac as En,w as Bn,aS as Wn,F as Xn}from"./Dt_3gVf3.js";function Mn(n,e){return n==null||e==null?NaN:n<e?-1:n>e?1:n>=e?0:NaN}function _e(n,e){return n==null||e==null?NaN:e<n?-1:e>n?1:e>=n?0:NaN}function Pn(n){let e,r,t;n.length!==2?(e=Mn,r=(a,f)=>Mn(n(a),f),t=(a,f)=>n(a)-f):(e=n===Mn||n===_e?n:Qe,r=n,t=n);function u(a,f,c=0,h=a.length){if(c<h){if(e(f,f)!==0)return h;do{const g=c+h>>>1;r(a[g],f)<0?c=g+1:h=g}while(c<h)}return c}function o(a,f,c=0,h=a.length){if(c<h){if(e(f,f)!==0)return h;do{const g=c+h>>>1;r(a[g],f)<=0?c=g+1:h=g}while(c<h)}return c}function i(a,f,c=0,h=a.length){const g=u(a,f,c,h-1);return g>c&&t(a[g-1],f)>-t(a[g],f)?g-1:g}return{left:u,center:i,right:o}}function Qe(){return 0}function Ve(n){return n===null?NaN:+n}const Ee=Pn(Mn),Be=Ee.right;Pn(Ve).center;class Gn extends Map{constructor(e,r=Je){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),e!=null)for(const[t,u]of e)this.set(t,u)}get(e){return super.get(Jn(this,e))}has(e){return super.has(Jn(this,e))}set(e,r){return super.set(Xe(this,e),r)}delete(e){return super.delete(Ge(this,e))}}function Jn({_intern:n,_key:e},r){const t=e(r);return n.has(t)?n.get(t):r}function Xe({_intern:n,_key:e},r){const t=e(r);return n.has(t)?n.get(t):(n.set(t,r),r)}function Ge({_intern:n,_key:e},r){const t=e(r);return n.has(t)&&(r=n.get(t),n.delete(t)),r}function Je(n){return n!==null&&typeof n=="object"?n.valueOf():n}const Ke=Math.sqrt(50),nr=Math.sqrt(10),er=Math.sqrt(2);function dn(n,e,r){const t=(e-n)/Math.max(0,r),u=Math.floor(Math.log10(t)),o=t/Math.pow(10,u),i=o>=Ke?10:o>=nr?5:o>=er?2:1;let a,f,c;return u<0?(c=Math.pow(10,-u)/i,a=Math.round(n*c),f=Math.round(e*c),a/c<n&&++a,f/c>e&&--f,c=-c):(c=Math.pow(10,u)*i,a=Math.round(n/c),f=Math.round(e/c),a*c<n&&++a,f*c>e&&--f),f<a&&.5<=r&&r<2?dn(n,e,r*2):[a,f,c]}function rr(n,e,r){if(e=+e,n=+n,r=+r,!(r>0))return[];if(n===e)return[n];const t=e<n,[u,o,i]=t?dn(e,n,r):dn(n,e,r);if(!(o>=u))return[];const a=o-u+1,f=new Array(a);if(t)if(i<0)for(let c=0;c<a;++c)f[c]=(o-c)/-i;else for(let c=0;c<a;++c)f[c]=(o-c)*i;else if(i<0)for(let c=0;c<a;++c)f[c]=(u+c)/-i;else for(let c=0;c<a;++c)f[c]=(u+c)*i;return f}function Ln(n,e,r){return e=+e,n=+n,r=+r,dn(n,e,r)[2]}function In(n,e,r){e=+e,n=+n,r=+r;const t=e<n,u=t?Ln(e,n,r):Ln(n,e,r);return(t?-1:1)*(u<0?1/-u:u)}function lu(n,e){let r;if(e===void 0)for(const t of n)t!=null&&(r<t||r===void 0&&t>=t)&&(r=t);else{let t=-1;for(let u of n)(u=e(u,++t,n))!=null&&(r<u||r===void 0&&u>=u)&&(r=u)}return r}function gu(n,e){let r;if(e===void 0)for(const t of n)t!=null&&(r>t||r===void 0&&t>=t)&&(r=t);else{let t=-1;for(let u of n)(u=e(u,++t,n))!=null&&(r>u||r===void 0&&u>=u)&&(r=u)}return r}function tr(n,e,r){n=+n,e=+e,r=(u=arguments.length)<2?(e=n,n=0,1):u<3?1:+r;for(var t=-1,u=Math.max(0,Math.ceil((e-n)/r))|0,o=new Array(u);++t<u;)o[t]=n+t*r;return o}function ur(n,e,r,t,u){var o=n*n,i=o*n;return((1-3*n+3*o-i)*e+(4-6*o+3*i)*r+(1+3*n+3*o-3*i)*t+i*u)/6}function or(n){var e=n.length-1;return function(r){var t=r<=0?r=0:r>=1?(r=1,e-1):Math.floor(r*e),u=n[t],o=n[t+1],i=t>0?n[t-1]:2*u-o,a=t<e-1?n[t+2]:2*o-u;return ur((r-t/e)*e,i,u,o,a)}}var xn=n=>()=>n;function pe(n,e){return function(r){return n+r*e}}function ir(n,e,r){return n=Math.pow(n,r),e=Math.pow(e,r)-n,r=1/r,function(t){return Math.pow(n+t*e,r)}}function we(n,e){var r=e-n;return r?pe(n,r>180||r<-180?r-360*Math.round(r/360):r):xn(isNaN(n)?e:n)}function ar(n){return(n=+n)==1?Z:function(e,r){return r-e?ir(e,r,n):xn(isNaN(e)?r:e)}}function Z(n,e){var r=e-n;return r?pe(n,r):xn(isNaN(n)?e:n)}var Kn=(function n(e){var r=ar(e);function t(u,o){var i=r((u=Wn(u)).r,(o=Wn(o)).r),a=r(u.g,o.g),f=r(u.b,o.b),c=Z(u.opacity,o.opacity);return function(h){return u.r=i(h),u.g=a(h),u.b=f(h),u.opacity=c(h),u+""}}return t.gamma=n,t})(1);function cr(n){return function(e){var r=e.length,t=new Array(r),u=new Array(r),o=new Array(r),i,a;for(i=0;i<r;++i)a=Wn(e[i]),t[i]=a.r||0,u[i]=a.g||0,o[i]=a.b||0;return t=n(t),u=n(u),o=n(o),a.opacity=1,function(f){return a.r=t(f),a.g=u(f),a.b=o(f),a+""}}}var hu=cr(or);function fr(n,e){e||(e=[]);var r=n?Math.min(e.length,n.length):0,t=e.slice(),u;return function(o){for(u=0;u<r;++u)t[u]=n[u]*(1-o)+e[u]*o;return t}}function sr(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function lr(n,e){var r=e?e.length:0,t=n?Math.min(r,n.length):0,u=new Array(t),o=new Array(r),i;for(i=0;i<t;++i)u[i]=Rn(n[i],e[i]);for(;i<r;++i)o[i]=e[i];return function(a){for(i=0;i<t;++i)o[i]=u[i](a);return o}}function gr(n,e){var r=new Date;return n=+n,e=+e,function(t){return r.setTime(n*(1-t)+e*t),r}}function Tn(n,e){return n=+n,e=+e,function(r){return n*(1-r)+e*r}}function hr(n,e){var r={},t={},u;(n===null||typeof n!="object")&&(n={}),(e===null||typeof e!="object")&&(e={});for(u in e)u in n?r[u]=Rn(n[u],e[u]):t[u]=e[u];return function(o){for(u in r)t[u]=r[u](o);return t}}var On=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Fn=new RegExp(On.source,"g");function mr(n){return function(){return n}}function yr(n){return function(e){return n(e)+""}}function Mr(n,e){var r=On.lastIndex=Fn.lastIndex=0,t,u,o,i=-1,a=[],f=[];for(n=n+"",e=e+"";(t=On.exec(n))&&(u=Fn.exec(e));)(o=u.index)>r&&(o=e.slice(r,o),a[i]?a[i]+=o:a[++i]=o),(t=t[0])===(u=u[0])?a[i]?a[i]+=u:a[++i]=u:(a[++i]=null,f.push({i,x:Tn(t,u)})),r=Fn.lastIndex;return r<e.length&&(o=e.slice(r),a[i]?a[i]+=o:a[++i]=o),a.length<2?f[0]?yr(f[0].x):mr(e):(e=f.length,function(c){for(var h=0,g;h<e;++h)a[(g=f[h]).i]=g.x(c);return a.join("")})}function Rn(n,e){var r=typeof e,t;return e==null||r==="boolean"?xn(e):(r==="number"?Tn:r==="string"?(t=Bn(e))?(e=t,Kn):Mr:e instanceof Bn?Kn:e instanceof Date?gr:sr(e)?fr:Array.isArray(e)?lr:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?hr:Tn)(n,e)}function dr(n,e){return n=+n,e=+e,function(r){return Math.round(n*(1-r)+e*r)}}var Tr=1e-12;function ne(n){return((n=Math.exp(n))+1/n)/2}function pr(n){return((n=Math.exp(n))-1/n)/2}function wr(n){return((n=Math.exp(2*n))-1)/(n+1)}(function n(e,r,t){function u(o,i){var a=o[0],f=o[1],c=o[2],h=i[0],g=i[1],l=i[2],w=h-a,v=g-f,U=w*w+v*v,S,Y;if(U<Tr)Y=Math.log(l/c)/e,S=function(D){return[a+D*w,f+D*v,c*Math.exp(e*D*Y)]};else{var O=Math.sqrt(U),N=(l*l-c*c+t*U)/(2*c*r*O),x=(l*l-c*c-t*U)/(2*l*r*O),L=Math.log(Math.sqrt(N*N+1)-N),y=Math.log(Math.sqrt(x*x+1)-x);Y=(y-L)/e,S=function(D){var P=D*Y,V=ne(L),J=c/(r*O)*(V*wr(e*P+L)-pr(L));return[a+J*w,f+J*v,c*V/ne(e*P+L)]}}return S.duration=Math.abs(Y)*1e3*e/Math.SQRT2,S}return u.rho=function(o){var i=Math.max(.001,+o),a=i*i,f=a*a;return n(i,a,f)},u})(Math.SQRT2,2,4);function vr(n){return function(e,r){var t=n((e=En(e)).h,(r=En(r)).h),u=Z(e.c,r.c),o=Z(e.l,r.l),i=Z(e.opacity,r.opacity);return function(a){return e.h=t(a),e.c=u(a),e.l=o(a),e.opacity=i(a),e+""}}}var mu=vr(we);function ve(n){return(function e(r){r=+r;function t(u,o){var i=n((u=Xn(u)).h,(o=Xn(o)).h),a=Z(u.s,o.s),f=Z(u.l,o.l),c=Z(u.opacity,o.opacity);return function(h){return u.h=i(h),u.s=a(h),u.l=f(Math.pow(h,r)),u.opacity=c(h),u+""}}return t.gamma=e,t})(1)}ve(we);var yu=ve(Z);function Cr(n){return Math.abs(n=Math.round(n))>=1e21?n.toLocaleString("en").replace(/,/g,""):n.toString(10)}function pn(n,e){if(!isFinite(n)||n===0)return null;var r=(n=e?n.toExponential(e-1):n.toExponential()).indexOf("e"),t=n.slice(0,r);return[t.length>1?t[0]+t.slice(2):t,+n.slice(r+1)]}function on(n){return n=pn(Math.abs(n)),n?n[1]:NaN}function Ur(n,e){return function(r,t){for(var u=r.length,o=[],i=0,a=n[0],f=0;u>0&&a>0&&(f+a+1>t&&(a=Math.max(1,t-f)),o.push(r.substring(u-=a,u+a)),!((f+=a+1)>t));)a=n[i=(i+1)%n.length];return o.reverse().join(e)}}function Dr(n){return function(e){return e.replace(/[0-9]/g,function(r){return n[+r]})}}var xr=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function wn(n){if(!(e=xr.exec(n)))throw new Error("invalid format: "+n);var e;return new zn({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}wn.prototype=zn.prototype;function zn(n){this.fill=n.fill===void 0?" ":n.fill+"",this.align=n.align===void 0?">":n.align+"",this.sign=n.sign===void 0?"-":n.sign+"",this.symbol=n.symbol===void 0?"":n.symbol+"",this.zero=!!n.zero,this.width=n.width===void 0?void 0:+n.width,this.comma=!!n.comma,this.precision=n.precision===void 0?void 0:+n.precision,this.trim=!!n.trim,this.type=n.type===void 0?"":n.type+""}zn.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function Sr(n){n:for(var e=n.length,r=1,t=-1,u;r<e;++r)switch(n[r]){case".":t=u=r;break;case"0":t===0&&(t=r),u=r;break;default:if(!+n[r])break n;t>0&&(t=0);break}return t>0?n.slice(0,t)+n.slice(u+1):n}var vn;function kr(n,e){var r=pn(n,e);if(!r)return vn=void 0,n.toPrecision(e);var t=r[0],u=r[1],o=u-(vn=Math.max(-8,Math.min(8,Math.floor(u/3)))*3)+1,i=t.length;return o===i?t:o>i?t+new Array(o-i+1).join("0"):o>0?t.slice(0,o)+"."+t.slice(o):"0."+new Array(1-o).join("0")+pn(n,Math.max(0,e+o-1))[0]}function ee(n,e){var r=pn(n,e);if(!r)return n+"";var t=r[0],u=r[1];return u<0?"0."+new Array(-u).join("0")+t:t.length>u+1?t.slice(0,u+1)+"."+t.slice(u+1):t+new Array(u-t.length+2).join("0")}var re={"%":(n,e)=>(n*100).toFixed(e),b:n=>Math.round(n).toString(2),c:n=>n+"",d:Cr,e:(n,e)=>n.toExponential(e),f:(n,e)=>n.toFixed(e),g:(n,e)=>n.toPrecision(e),o:n=>Math.round(n).toString(8),p:(n,e)=>ee(n*100,e),r:ee,s:kr,X:n=>Math.round(n).toString(16).toUpperCase(),x:n=>Math.round(n).toString(16)};function te(n){return n}var ue=Array.prototype.map,oe=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Fr(n){var e=n.grouping===void 0||n.thousands===void 0?te:Ur(ue.call(n.grouping,Number),n.thousands+""),r=n.currency===void 0?"":n.currency[0]+"",t=n.currency===void 0?"":n.currency[1]+"",u=n.decimal===void 0?".":n.decimal+"",o=n.numerals===void 0?te:Dr(ue.call(n.numerals,String)),i=n.percent===void 0?"%":n.percent+"",a=n.minus===void 0?"−":n.minus+"",f=n.nan===void 0?"NaN":n.nan+"";function c(g,l){g=wn(g);var w=g.fill,v=g.align,U=g.sign,S=g.symbol,Y=g.zero,O=g.width,N=g.comma,x=g.precision,L=g.trim,y=g.type;y==="n"?(N=!0,y="g"):re[y]||(x===void 0&&(x=12),L=!0,y="g"),(Y||w==="0"&&v==="=")&&(Y=!0,w="0",v="=");var D=(l&&l.prefix!==void 0?l.prefix:"")+(S==="$"?r:S==="#"&&/[boxX]/.test(y)?"0"+y.toLowerCase():""),P=(S==="$"?t:/[%p]/.test(y)?i:"")+(l&&l.suffix!==void 0?l.suffix:""),V=re[y],J=/[defgprs%]/.test(y);x=x===void 0?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,x)):Math.max(0,Math.min(20,x));function hn(d){var R=D,b=P,Q,mn,K;if(y==="c")b=V(d)+b,d="";else{d=+d;var nn=d<0||1/d<0;if(d=isNaN(d)?f:V(Math.abs(d),x),L&&(d=Sr(d)),nn&&+d==0&&U!=="+"&&(nn=!1),R=(nn?U==="("?U:a:U==="-"||U==="("?"":U)+R,b=(y==="s"&&!isNaN(d)&&vn!==void 0?oe[8+vn/3]:"")+b+(nn&&U==="("?")":""),J){for(Q=-1,mn=d.length;++Q<mn;)if(K=d.charCodeAt(Q),48>K||K>57){b=(K===46?u+d.slice(Q+1):d.slice(Q))+b,d=d.slice(0,Q);break}}}N&&!Y&&(d=e(d,1/0));var en=R.length+d.length+b.length,$=en<O?new Array(O-en+1).join(w):"";switch(N&&Y&&(d=e($+d,$.length?O-b.length:1/0),$=""),v){case"<":d=R+d+b+$;break;case"=":d=R+$+d+b;break;case"^":d=$.slice(0,en=$.length>>1)+R+d+b+$.slice(en);break;default:d=$+R+d+b;break}return o(d)}return hn.toString=function(){return g+""},hn}function h(g,l){var w=Math.max(-8,Math.min(8,Math.floor(on(l)/3)))*3,v=Math.pow(10,-w),U=c((g=wn(g),g.type="f",g),{suffix:oe[8+w/3]});return function(S){return U(v*S)}}return{format:c,formatPrefix:h}}var yn,Ce,Ue;Nr({thousands:",",grouping:[3],currency:["$",""]});function Nr(n){return yn=Fr(n),Ce=yn.format,Ue=yn.formatPrefix,yn}function Yr(n){return Math.max(0,-on(Math.abs(n)))}function br(n,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(on(e)/3)))*3-on(Math.abs(n)))}function Ar(n,e){return n=Math.abs(n),e=Math.abs(e)-n,Math.max(0,on(e)-on(n))+1}const Nn=new Date,Yn=new Date;function k(n,e,r,t){function u(o){return n(o=arguments.length===0?new Date:new Date(+o)),o}return u.floor=o=>(n(o=new Date(+o)),o),u.ceil=o=>(n(o=new Date(o-1)),e(o,1),n(o),o),u.round=o=>{const i=u(o),a=u.ceil(o);return o-i<a-o?i:a},u.offset=(o,i)=>(e(o=new Date(+o),i==null?1:Math.floor(i)),o),u.range=(o,i,a)=>{const f=[];if(o=u.ceil(o),a=a==null?1:Math.floor(a),!(o<i)||!(a>0))return f;let c;do f.push(c=new Date(+o)),e(o,a),n(o);while(c<o&&o<i);return f},u.filter=o=>k(i=>{if(i>=i)for(;n(i),!o(i);)i.setTime(i-1)},(i,a)=>{if(i>=i)if(a<0)for(;++a<=0;)for(;e(i,-1),!o(i););else for(;--a>=0;)for(;e(i,1),!o(i););}),r&&(u.count=(o,i)=>(Nn.setTime(+o),Yn.setTime(+i),n(Nn),n(Yn),Math.floor(r(Nn,Yn))),u.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?u.filter(t?i=>t(i)%o===0:i=>u.count(0,i)%o===0):u)),u}const Cn=k(()=>{},(n,e)=>{n.setTime(+n+e)},(n,e)=>e-n);Cn.every=n=>(n=Math.floor(n),!isFinite(n)||!(n>0)?null:n>1?k(e=>{e.setTime(Math.floor(e/n)*n)},(e,r)=>{e.setTime(+e+r*n)},(e,r)=>(r-e)/n):Cn);Cn.range;const z=1e3,I=z*60,j=I*60,q=j*24,jn=q*7,ie=q*30,bn=q*365,tn=k(n=>{n.setTime(n-n.getMilliseconds())},(n,e)=>{n.setTime(+n+e*z)},(n,e)=>(e-n)/z,n=>n.getUTCSeconds());tn.range;const Zn=k(n=>{n.setTime(n-n.getMilliseconds()-n.getSeconds()*z)},(n,e)=>{n.setTime(+n+e*I)},(n,e)=>(e-n)/I,n=>n.getMinutes());Zn.range;const Hr=k(n=>{n.setUTCSeconds(0,0)},(n,e)=>{n.setTime(+n+e*I)},(n,e)=>(e-n)/I,n=>n.getUTCMinutes());Hr.range;const qn=k(n=>{n.setTime(n-n.getMilliseconds()-n.getSeconds()*z-n.getMinutes()*I)},(n,e)=>{n.setTime(+n+e*j)},(n,e)=>(e-n)/j,n=>n.getHours());qn.range;const Wr=k(n=>{n.setUTCMinutes(0,0,0)},(n,e)=>{n.setTime(+n+e*j)},(n,e)=>(e-n)/j,n=>n.getUTCHours());Wr.range;const gn=k(n=>n.setHours(0,0,0,0),(n,e)=>n.setDate(n.getDate()+e),(n,e)=>(e-n-(e.getTimezoneOffset()-n.getTimezoneOffset())*I)/q,n=>n.getDate()-1);gn.range;const _n=k(n=>{n.setUTCHours(0,0,0,0)},(n,e)=>{n.setUTCDate(n.getUTCDate()+e)},(n,e)=>(e-n)/q,n=>n.getUTCDate()-1);_n.range;const Lr=k(n=>{n.setUTCHours(0,0,0,0)},(n,e)=>{n.setUTCDate(n.getUTCDate()+e)},(n,e)=>(e-n)/q,n=>Math.floor(n/q));Lr.range;function X(n){return k(e=>{e.setDate(e.getDate()-(e.getDay()+7-n)%7),e.setHours(0,0,0,0)},(e,r)=>{e.setDate(e.getDate()+r*7)},(e,r)=>(r-e-(r.getTimezoneOffset()-e.getTimezoneOffset())*I)/jn)}const Sn=X(0),Un=X(1),Ir=X(2),Or=X(3),an=X(4),$r=X(5),Pr=X(6);Sn.range;Un.range;Ir.range;Or.range;an.range;$r.range;Pr.range;function G(n){return k(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-n)%7),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCDate(e.getUTCDate()+r*7)},(e,r)=>(r-e)/jn)}const De=G(0),Dn=G(1),Rr=G(2),zr=G(3),cn=G(4),jr=G(5),Zr=G(6);De.range;Dn.range;Rr.range;zr.range;cn.range;jr.range;Zr.range;const Qn=k(n=>{n.setDate(1),n.setHours(0,0,0,0)},(n,e)=>{n.setMonth(n.getMonth()+e)},(n,e)=>e.getMonth()-n.getMonth()+(e.getFullYear()-n.getFullYear())*12,n=>n.getMonth());Qn.range;const qr=k(n=>{n.setUTCDate(1),n.setUTCHours(0,0,0,0)},(n,e)=>{n.setUTCMonth(n.getUTCMonth()+e)},(n,e)=>e.getUTCMonth()-n.getUTCMonth()+(e.getUTCFullYear()-n.getUTCFullYear())*12,n=>n.getUTCMonth());qr.range;const _=k(n=>{n.setMonth(0,1),n.setHours(0,0,0,0)},(n,e)=>{n.setFullYear(n.getFullYear()+e)},(n,e)=>e.getFullYear()-n.getFullYear(),n=>n.getFullYear());_.every=n=>!isFinite(n=Math.floor(n))||!(n>0)?null:k(e=>{e.setFullYear(Math.floor(e.getFullYear()/n)*n),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,r)=>{e.setFullYear(e.getFullYear()+r*n)});_.range;const B=k(n=>{n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)},(n,e)=>{n.setUTCFullYear(n.getUTCFullYear()+e)},(n,e)=>e.getUTCFullYear()-n.getUTCFullYear(),n=>n.getUTCFullYear());B.every=n=>!isFinite(n=Math.floor(n))||!(n>0)?null:k(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/n)*n),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCFullYear(e.getUTCFullYear()+r*n)});B.range;function _r(n,e,r,t,u,o){const i=[[tn,1,z],[tn,5,5*z],[tn,15,15*z],[tn,30,30*z],[o,1,I],[o,5,5*I],[o,15,15*I],[o,30,30*I],[u,1,j],[u,3,3*j],[u,6,6*j],[u,12,12*j],[t,1,q],[t,2,2*q],[r,1,jn],[e,1,ie],[e,3,3*ie],[n,1,bn]];function a(c,h,g){const l=h<c;l&&([c,h]=[h,c]);const w=g&&typeof g.range=="function"?g:f(c,h,g),v=w?w.range(c,+h+1):[];return l?v.reverse():v}function f(c,h,g){const l=Math.abs(h-c)/g,w=Pn(([,,S])=>S).right(i,l);if(w===i.length)return n.every(In(c/bn,h/bn,g));if(w===0)return Cn.every(Math.max(In(c,h,g),1));const[v,U]=i[l/i[w-1][2]<i[w][2]/l?w-1:w];return v.every(U)}return[a,f]}const[Qr,Vr]=_r(_,Qn,Sn,gn,qn,Zn);function An(n){if(0<=n.y&&n.y<100){var e=new Date(-1,n.m,n.d,n.H,n.M,n.S,n.L);return e.setFullYear(n.y),e}return new Date(n.y,n.m,n.d,n.H,n.M,n.S,n.L)}function Hn(n){if(0<=n.y&&n.y<100){var e=new Date(Date.UTC(-1,n.m,n.d,n.H,n.M,n.S,n.L));return e.setUTCFullYear(n.y),e}return new Date(Date.UTC(n.y,n.m,n.d,n.H,n.M,n.S,n.L))}function fn(n,e,r){return{y:n,m:e,d:r,H:0,M:0,S:0,L:0}}function Er(n){var e=n.dateTime,r=n.date,t=n.time,u=n.periods,o=n.days,i=n.shortDays,a=n.months,f=n.shortMonths,c=sn(u),h=ln(u),g=sn(o),l=ln(o),w=sn(i),v=ln(i),U=sn(a),S=ln(a),Y=sn(f),O=ln(f),N={a:K,A:nn,b:en,B:$,c:null,d:ge,e:ge,f:dt,g:kt,G:Nt,H:mt,I:yt,j:Mt,L:xe,m:Tt,M:pt,p:Oe,q:$e,Q:ye,s:Me,S:wt,u:vt,U:Ct,V:Ut,w:Dt,W:xt,x:null,X:null,y:St,Y:Ft,Z:Yt,"%":me},x={a:Pe,A:Re,b:ze,B:je,c:null,d:he,e:he,f:Wt,g:qt,G:Qt,H:bt,I:At,j:Ht,L:ke,m:Lt,M:It,p:Ze,q:qe,Q:ye,s:Me,S:Ot,u:$t,U:Pt,V:Rt,w:zt,W:jt,x:null,X:null,y:Zt,Y:_t,Z:Vt,"%":me},L={a:J,A:hn,b:d,B:R,c:b,d:se,e:se,f:st,g:fe,G:ce,H:le,I:le,j:it,L:ft,m:ot,M:at,p:V,q:ut,Q:gt,s:ht,S:ct,u:Kr,U:nt,V:et,w:Jr,W:rt,x:Q,X:mn,y:fe,Y:ce,Z:tt,"%":lt};N.x=y(r,N),N.X=y(t,N),N.c=y(e,N),x.x=y(r,x),x.X=y(t,x),x.c=y(e,x);function y(m,M){return function(T){var s=[],A=-1,C=0,H=m.length,W,E,Vn;for(T instanceof Date||(T=new Date(+T));++A<H;)m.charCodeAt(A)===37&&(s.push(m.slice(C,A)),(E=ae[W=m.charAt(++A)])!=null?W=m.charAt(++A):E=W==="e"?" ":"0",(Vn=M[W])&&(W=Vn(T,E)),s.push(W),C=A+1);return s.push(m.slice(C,A)),s.join("")}}function D(m,M){return function(T){var s=fn(1900,void 0,1),A=P(s,m,T+="",0),C,H;if(A!=T.length)return null;if("Q"in s)return new Date(s.Q);if("s"in s)return new Date(s.s*1e3+("L"in s?s.L:0));if(M&&!("Z"in s)&&(s.Z=0),"p"in s&&(s.H=s.H%12+s.p*12),s.m===void 0&&(s.m="q"in s?s.q:0),"V"in s){if(s.V<1||s.V>53)return null;"w"in s||(s.w=1),"Z"in s?(C=Hn(fn(s.y,0,1)),H=C.getUTCDay(),C=H>4||H===0?Dn.ceil(C):Dn(C),C=_n.offset(C,(s.V-1)*7),s.y=C.getUTCFullYear(),s.m=C.getUTCMonth(),s.d=C.getUTCDate()+(s.w+6)%7):(C=An(fn(s.y,0,1)),H=C.getDay(),C=H>4||H===0?Un.ceil(C):Un(C),C=gn.offset(C,(s.V-1)*7),s.y=C.getFullYear(),s.m=C.getMonth(),s.d=C.getDate()+(s.w+6)%7)}else("W"in s||"U"in s)&&("w"in s||(s.w="u"in s?s.u%7:"W"in s?1:0),H="Z"in s?Hn(fn(s.y,0,1)).getUTCDay():An(fn(s.y,0,1)).getDay(),s.m=0,s.d="W"in s?(s.w+6)%7+s.W*7-(H+5)%7:s.w+s.U*7-(H+6)%7);return"Z"in s?(s.H+=s.Z/100|0,s.M+=s.Z%100,Hn(s)):An(s)}}function P(m,M,T,s){for(var A=0,C=M.length,H=T.length,W,E;A<C;){if(s>=H)return-1;if(W=M.charCodeAt(A++),W===37){if(W=M.charAt(A++),E=L[W in ae?M.charAt(A++):W],!E||(s=E(m,T,s))<0)return-1}else if(W!=T.charCodeAt(s++))return-1}return s}function V(m,M,T){var s=c.exec(M.slice(T));return s?(m.p=h.get(s[0].toLowerCase()),T+s[0].length):-1}function J(m,M,T){var s=w.exec(M.slice(T));return s?(m.w=v.get(s[0].toLowerCase()),T+s[0].length):-1}function hn(m,M,T){var s=g.exec(M.slice(T));return s?(m.w=l.get(s[0].toLowerCase()),T+s[0].length):-1}function d(m,M,T){var s=Y.exec(M.slice(T));return s?(m.m=O.get(s[0].toLowerCase()),T+s[0].length):-1}function R(m,M,T){var s=U.exec(M.slice(T));return s?(m.m=S.get(s[0].toLowerCase()),T+s[0].length):-1}function b(m,M,T){return P(m,e,M,T)}function Q(m,M,T){return P(m,r,M,T)}function mn(m,M,T){return P(m,t,M,T)}function K(m){return i[m.getDay()]}function nn(m){return o[m.getDay()]}function en(m){return f[m.getMonth()]}function $(m){return a[m.getMonth()]}function Oe(m){return u[+(m.getHours()>=12)]}function $e(m){return 1+~~(m.getMonth()/3)}function Pe(m){return i[m.getUTCDay()]}function Re(m){return o[m.getUTCDay()]}function ze(m){return f[m.getUTCMonth()]}function je(m){return a[m.getUTCMonth()]}function Ze(m){return u[+(m.getUTCHours()>=12)]}function qe(m){return 1+~~(m.getUTCMonth()/3)}return{format:function(m){var M=y(m+="",N);return M.toString=function(){return m},M},parse:function(m){var M=D(m+="",!1);return M.toString=function(){return m},M},utcFormat:function(m){var M=y(m+="",x);return M.toString=function(){return m},M},utcParse:function(m){var M=D(m+="",!0);return M.toString=function(){return m},M}}}var ae={"-":"",_:" ",0:"0"},F=/^\s*\d+/,Br=/^%/,Xr=/[\\^$*+?|[\]().{}]/g;function p(n,e,r){var t=n<0?"-":"",u=(t?-n:n)+"",o=u.length;return t+(o<r?new Array(r-o+1).join(e)+u:u)}function Gr(n){return n.replace(Xr,"\\$&")}function sn(n){return new RegExp("^(?:"+n.map(Gr).join("|")+")","i")}function ln(n){return new Map(n.map((e,r)=>[e.toLowerCase(),r]))}function Jr(n,e,r){var t=F.exec(e.slice(r,r+1));return t?(n.w=+t[0],r+t[0].length):-1}function Kr(n,e,r){var t=F.exec(e.slice(r,r+1));return t?(n.u=+t[0],r+t[0].length):-1}function nt(n,e,r){var t=F.exec(e.slice(r,r+2));return t?(n.U=+t[0],r+t[0].length):-1}function et(n,e,r){var t=F.exec(e.slice(r,r+2));return t?(n.V=+t[0],r+t[0].length):-1}function rt(n,e,r){var t=F.exec(e.slice(r,r+2));return t?(n.W=+t[0],r+t[0].length):-1}function ce(n,e,r){var t=F.exec(e.slice(r,r+4));return t?(n.y=+t[0],r+t[0].length):-1}function fe(n,e,r){var t=F.exec(e.slice(r,r+2));return t?(n.y=+t[0]+(+t[0]>68?1900:2e3),r+t[0].length):-1}function tt(n,e,r){var t=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(r,r+6));return t?(n.Z=t[1]?0:-(t[2]+(t[3]||"00")),r+t[0].length):-1}function ut(n,e,r){var t=F.exec(e.slice(r,r+1));return t?(n.q=t[0]*3-3,r+t[0].length):-1}function ot(n,e,r){var t=F.exec(e.slice(r,r+2));return t?(n.m=t[0]-1,r+t[0].length):-1}function se(n,e,r){var t=F.exec(e.slice(r,r+2));return t?(n.d=+t[0],r+t[0].length):-1}function it(n,e,r){var t=F.exec(e.slice(r,r+3));return t?(n.m=0,n.d=+t[0],r+t[0].length):-1}function le(n,e,r){var t=F.exec(e.slice(r,r+2));return t?(n.H=+t[0],r+t[0].length):-1}function at(n,e,r){var t=F.exec(e.slice(r,r+2));return t?(n.M=+t[0],r+t[0].length):-1}function ct(n,e,r){var t=F.exec(e.slice(r,r+2));return t?(n.S=+t[0],r+t[0].length):-1}function ft(n,e,r){var t=F.exec(e.slice(r,r+3));return t?(n.L=+t[0],r+t[0].length):-1}function st(n,e,r){var t=F.exec(e.slice(r,r+6));return t?(n.L=Math.floor(t[0]/1e3),r+t[0].length):-1}function lt(n,e,r){var t=Br.exec(e.slice(r,r+1));return t?r+t[0].length:-1}function gt(n,e,r){var t=F.exec(e.slice(r));return t?(n.Q=+t[0],r+t[0].length):-1}function ht(n,e,r){var t=F.exec(e.slice(r));return t?(n.s=+t[0],r+t[0].length):-1}function ge(n,e){return p(n.getDate(),e,2)}function mt(n,e){return p(n.getHours(),e,2)}function yt(n,e){return p(n.getHours()%12||12,e,2)}function Mt(n,e){return p(1+gn.count(_(n),n),e,3)}function xe(n,e){return p(n.getMilliseconds(),e,3)}function dt(n,e){return xe(n,e)+"000"}function Tt(n,e){return p(n.getMonth()+1,e,2)}function pt(n,e){return p(n.getMinutes(),e,2)}function wt(n,e){return p(n.getSeconds(),e,2)}function vt(n){var e=n.getDay();return e===0?7:e}function Ct(n,e){return p(Sn.count(_(n)-1,n),e,2)}function Se(n){var e=n.getDay();return e>=4||e===0?an(n):an.ceil(n)}function Ut(n,e){return n=Se(n),p(an.count(_(n),n)+(_(n).getDay()===4),e,2)}function Dt(n){return n.getDay()}function xt(n,e){return p(Un.count(_(n)-1,n),e,2)}function St(n,e){return p(n.getFullYear()%100,e,2)}function kt(n,e){return n=Se(n),p(n.getFullYear()%100,e,2)}function Ft(n,e){return p(n.getFullYear()%1e4,e,4)}function Nt(n,e){var r=n.getDay();return n=r>=4||r===0?an(n):an.ceil(n),p(n.getFullYear()%1e4,e,4)}function Yt(n){var e=n.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+p(e/60|0,"0",2)+p(e%60,"0",2)}function he(n,e){return p(n.getUTCDate(),e,2)}function bt(n,e){return p(n.getUTCHours(),e,2)}function At(n,e){return p(n.getUTCHours()%12||12,e,2)}function Ht(n,e){return p(1+_n.count(B(n),n),e,3)}function ke(n,e){return p(n.getUTCMilliseconds(),e,3)}function Wt(n,e){return ke(n,e)+"000"}function Lt(n,e){return p(n.getUTCMonth()+1,e,2)}function It(n,e){return p(n.getUTCMinutes(),e,2)}function Ot(n,e){return p(n.getUTCSeconds(),e,2)}function $t(n){var e=n.getUTCDay();return e===0?7:e}function Pt(n,e){return p(De.count(B(n)-1,n),e,2)}function Fe(n){var e=n.getUTCDay();return e>=4||e===0?cn(n):cn.ceil(n)}function Rt(n,e){return n=Fe(n),p(cn.count(B(n),n)+(B(n).getUTCDay()===4),e,2)}function zt(n){return n.getUTCDay()}function jt(n,e){return p(Dn.count(B(n)-1,n),e,2)}function Zt(n,e){return p(n.getUTCFullYear()%100,e,2)}function qt(n,e){return n=Fe(n),p(n.getUTCFullYear()%100,e,2)}function _t(n,e){return p(n.getUTCFullYear()%1e4,e,4)}function Qt(n,e){var r=n.getUTCDay();return n=r>=4||r===0?cn(n):cn.ceil(n),p(n.getUTCFullYear()%1e4,e,4)}function Vt(){return"+0000"}function me(){return"%"}function ye(n){return+n}function Me(n){return Math.floor(+n/1e3)}var rn,Ne,Ye,be;Et({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Et(n){return rn=Er(n),Ne=rn.format,rn.parse,Ye=rn.utcFormat,be=rn.utcParse,rn}var Ae="%Y-%m-%dT%H:%M:%S.%LZ";function Bt(n){return n.toISOString()}Date.prototype.toISOString||Ye(Ae);function Xt(n){var e=new Date(n);return isNaN(e)?null:e}+new Date("2000-01-01T00:00:00.000Z")||be(Ae);function kn(n,e){switch(arguments.length){case 0:break;case 1:this.range(n);break;default:this.range(e).domain(n);break}return this}const de=Symbol("implicit");function He(){var n=new Gn,e=[],r=[],t=de;function u(o){let i=n.get(o);if(i===void 0){if(t!==de)return t;n.set(o,i=e.push(o)-1)}return r[i%r.length]}return u.domain=function(o){if(!arguments.length)return e.slice();e=[],n=new Gn;for(const i of o)n.has(i)||n.set(i,e.push(i)-1);return u},u.range=function(o){return arguments.length?(r=Array.from(o),u):r.slice()},u.unknown=function(o){return arguments.length?(t=o,u):t},u.copy=function(){return He(e,r).unknown(t)},kn.apply(u,arguments),u}function Gt(){var n=He().unknown(void 0),e=n.domain,r=n.range,t=0,u=1,o,i,a=!1,f=0,c=0,h=.5;delete n.unknown;function g(){var l=e().length,w=u<t,v=w?u:t,U=w?t:u;o=(U-v)/Math.max(1,l-f+c*2),a&&(o=Math.floor(o)),v+=(U-v-o*(l-f))*h,i=o*(1-f),a&&(v=Math.round(v),i=Math.round(i));var S=tr(l).map(function(Y){return v+o*Y});return r(w?S.reverse():S)}return n.domain=function(l){return arguments.length?(e(l),g()):e()},n.range=function(l){return arguments.length?([t,u]=l,t=+t,u=+u,g()):[t,u]},n.rangeRound=function(l){return[t,u]=l,t=+t,u=+u,a=!0,g()},n.bandwidth=function(){return i},n.step=function(){return o},n.round=function(l){return arguments.length?(a=!!l,g()):a},n.padding=function(l){return arguments.length?(f=Math.min(1,c=+l),g()):f},n.paddingInner=function(l){return arguments.length?(f=Math.min(1,l),g()):f},n.paddingOuter=function(l){return arguments.length?(c=+l,g()):c},n.align=function(l){return arguments.length?(h=Math.max(0,Math.min(1,l)),g()):h},n.copy=function(){return Gt(e(),[t,u]).round(a).paddingInner(f).paddingOuter(c).align(h)},kn.apply(g(),arguments)}function Jt(n){return function(){return n}}function Kt(n){return+n}var Te=[0,1];function un(n){return n}function $n(n,e){return(e-=n=+n)?function(r){return(r-n)/e}:Jt(isNaN(e)?NaN:.5)}function nu(n,e){var r;return n>e&&(r=n,n=e,e=r),function(t){return Math.max(n,Math.min(e,t))}}function eu(n,e,r){var t=n[0],u=n[1],o=e[0],i=e[1];return u<t?(t=$n(u,t),o=r(i,o)):(t=$n(t,u),o=r(o,i)),function(a){return o(t(a))}}function ru(n,e,r){var t=Math.min(n.length,e.length)-1,u=new Array(t),o=new Array(t),i=-1;for(n[t]<n[0]&&(n=n.slice().reverse(),e=e.slice().reverse());++i<t;)u[i]=$n(n[i],n[i+1]),o[i]=r(e[i],e[i+1]);return function(a){var f=Be(n,a,1,t)-1;return o[f](u[f](a))}}function We(n,e){return e.domain(n.domain()).range(n.range()).interpolate(n.interpolate()).clamp(n.clamp()).unknown(n.unknown())}function tu(){var n=Te,e=Te,r=Rn,t,u,o,i=un,a,f,c;function h(){var l=Math.min(n.length,e.length);return i!==un&&(i=nu(n[0],n[l-1])),a=l>2?ru:eu,f=c=null,g}function g(l){return l==null||isNaN(l=+l)?o:(f||(f=a(n.map(t),e,r)))(t(i(l)))}return g.invert=function(l){return i(u((c||(c=a(e,n.map(t),Tn)))(l)))},g.domain=function(l){return arguments.length?(n=Array.from(l,Kt),h()):n.slice()},g.range=function(l){return arguments.length?(e=Array.from(l),h()):e.slice()},g.rangeRound=function(l){return e=Array.from(l),r=dr,h()},g.clamp=function(l){return arguments.length?(i=l?!0:un,h()):i!==un},g.interpolate=function(l){return arguments.length?(r=l,h()):r},g.unknown=function(l){return arguments.length?(o=l,g):o},function(l,w){return t=l,u=w,h()}}function Le(){return tu()(un,un)}function uu(n,e,r,t){var u=In(n,e,r),o;switch(t=wn(t??",f"),t.type){case"s":{var i=Math.max(Math.abs(n),Math.abs(e));return t.precision==null&&!isNaN(o=br(u,i))&&(t.precision=o),Ue(t,i)}case"":case"e":case"g":case"p":case"r":{t.precision==null&&!isNaN(o=Ar(u,Math.max(Math.abs(n),Math.abs(e))))&&(t.precision=o-(t.type==="e"));break}case"f":case"%":{t.precision==null&&!isNaN(o=Yr(u))&&(t.precision=o-(t.type==="%")*2);break}}return Ce(t)}function ou(n){var e=n.domain;return n.ticks=function(r){var t=e();return rr(t[0],t[t.length-1],r??10)},n.tickFormat=function(r,t){var u=e();return uu(u[0],u[u.length-1],r??10,t)},n.nice=function(r){r==null&&(r=10);var t=e(),u=0,o=t.length-1,i=t[u],a=t[o],f,c,h=10;for(a<i&&(c=i,i=a,a=c,c=u,u=o,o=c);h-- >0;){if(c=Ln(i,a,r),c===f)return t[u]=i,t[o]=a,e(t);if(c>0)i=Math.floor(i/c)*c,a=Math.ceil(a/c)*c;else if(c<0)i=Math.ceil(i*c)/c,a=Math.floor(a*c)/c;else break;f=c}return n},n}function iu(){var n=Le();return n.copy=function(){return We(n,iu())},kn.apply(n,arguments),ou(n)}function au(n,e){n=n.slice();var r=0,t=n.length-1,u=n[r],o=n[t],i;return o<u&&(i=r,r=t,t=i,i=u,u=o,o=i),n[r]=e.floor(u),n[t]=e.ceil(o),n}function cu(n){return new Date(n)}function fu(n){return n instanceof Date?+n:Math.round(n)}function Ie(n,e,r,t,u,o,i,a,f,c){var h=Le(),g=h.invert,l=h.domain,w=c(".%L"),v=c(":%S"),U=c("%I:%M"),S=c("%I %p"),Y=c("%a %d"),O=c("%b %d"),N=c("%B"),x=c("%Y");function L(y){return(f(y)<y?w:a(y)<y?v:i(y)<y?U:o(y)<y?S:t(y)<y?u(y)<y?Y:O:r(y)<y?N:x)(y)}return h.invert=function(y){return new Date(Math.round(g(y)))},h.domain=function(y){return arguments.length?l(Array.from(y,fu)):l().map(cu)},h.ticks=function(y){var D=l();return n(D[0],D[D.length-1],y??10)},h.tickFormat=function(y,D){return D==null?L:c(D)},h.nice=function(y){var D=l();return(!y||typeof y.range!="function")&&(y=e(D[0],D[D.length-1],y??10)),y?l(au(D,y)):h},h.copy=function(){return We(h,Ie(n,e,r,t,u,o,i,a,f,c))},h}function Mu(){return kn.apply(Ie(Qr,Vr,_,Qn,Sn,gn,qn,Zn,tn,Ne).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}export{Cn as a,Gt as b,yu as c,gu as d,gn as e,Ce as f,Ne as g,mu as h,$r as i,qn as j,Zn as k,iu as l,lu as m,Un as n,He as o,Qn as p,Pr as q,hu as r,tn as s,Mu as t,Sn as u,an as v,Ir as w,Or as x};
1
+ import{ac as En,w as Bn,aS as Wn,F as Xn}from"./gWaxvgpv.js";function Mn(n,e){return n==null||e==null?NaN:n<e?-1:n>e?1:n>=e?0:NaN}function _e(n,e){return n==null||e==null?NaN:e<n?-1:e>n?1:e>=n?0:NaN}function Pn(n){let e,r,t;n.length!==2?(e=Mn,r=(a,f)=>Mn(n(a),f),t=(a,f)=>n(a)-f):(e=n===Mn||n===_e?n:Qe,r=n,t=n);function u(a,f,c=0,h=a.length){if(c<h){if(e(f,f)!==0)return h;do{const g=c+h>>>1;r(a[g],f)<0?c=g+1:h=g}while(c<h)}return c}function o(a,f,c=0,h=a.length){if(c<h){if(e(f,f)!==0)return h;do{const g=c+h>>>1;r(a[g],f)<=0?c=g+1:h=g}while(c<h)}return c}function i(a,f,c=0,h=a.length){const g=u(a,f,c,h-1);return g>c&&t(a[g-1],f)>-t(a[g],f)?g-1:g}return{left:u,center:i,right:o}}function Qe(){return 0}function Ve(n){return n===null?NaN:+n}const Ee=Pn(Mn),Be=Ee.right;Pn(Ve).center;class Gn extends Map{constructor(e,r=Je){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),e!=null)for(const[t,u]of e)this.set(t,u)}get(e){return super.get(Jn(this,e))}has(e){return super.has(Jn(this,e))}set(e,r){return super.set(Xe(this,e),r)}delete(e){return super.delete(Ge(this,e))}}function Jn({_intern:n,_key:e},r){const t=e(r);return n.has(t)?n.get(t):r}function Xe({_intern:n,_key:e},r){const t=e(r);return n.has(t)?n.get(t):(n.set(t,r),r)}function Ge({_intern:n,_key:e},r){const t=e(r);return n.has(t)&&(r=n.get(t),n.delete(t)),r}function Je(n){return n!==null&&typeof n=="object"?n.valueOf():n}const Ke=Math.sqrt(50),nr=Math.sqrt(10),er=Math.sqrt(2);function dn(n,e,r){const t=(e-n)/Math.max(0,r),u=Math.floor(Math.log10(t)),o=t/Math.pow(10,u),i=o>=Ke?10:o>=nr?5:o>=er?2:1;let a,f,c;return u<0?(c=Math.pow(10,-u)/i,a=Math.round(n*c),f=Math.round(e*c),a/c<n&&++a,f/c>e&&--f,c=-c):(c=Math.pow(10,u)*i,a=Math.round(n/c),f=Math.round(e/c),a*c<n&&++a,f*c>e&&--f),f<a&&.5<=r&&r<2?dn(n,e,r*2):[a,f,c]}function rr(n,e,r){if(e=+e,n=+n,r=+r,!(r>0))return[];if(n===e)return[n];const t=e<n,[u,o,i]=t?dn(e,n,r):dn(n,e,r);if(!(o>=u))return[];const a=o-u+1,f=new Array(a);if(t)if(i<0)for(let c=0;c<a;++c)f[c]=(o-c)/-i;else for(let c=0;c<a;++c)f[c]=(o-c)*i;else if(i<0)for(let c=0;c<a;++c)f[c]=(u+c)/-i;else for(let c=0;c<a;++c)f[c]=(u+c)*i;return f}function Ln(n,e,r){return e=+e,n=+n,r=+r,dn(n,e,r)[2]}function In(n,e,r){e=+e,n=+n,r=+r;const t=e<n,u=t?Ln(e,n,r):Ln(n,e,r);return(t?-1:1)*(u<0?1/-u:u)}function lu(n,e){let r;if(e===void 0)for(const t of n)t!=null&&(r<t||r===void 0&&t>=t)&&(r=t);else{let t=-1;for(let u of n)(u=e(u,++t,n))!=null&&(r<u||r===void 0&&u>=u)&&(r=u)}return r}function gu(n,e){let r;if(e===void 0)for(const t of n)t!=null&&(r>t||r===void 0&&t>=t)&&(r=t);else{let t=-1;for(let u of n)(u=e(u,++t,n))!=null&&(r>u||r===void 0&&u>=u)&&(r=u)}return r}function tr(n,e,r){n=+n,e=+e,r=(u=arguments.length)<2?(e=n,n=0,1):u<3?1:+r;for(var t=-1,u=Math.max(0,Math.ceil((e-n)/r))|0,o=new Array(u);++t<u;)o[t]=n+t*r;return o}function ur(n,e,r,t,u){var o=n*n,i=o*n;return((1-3*n+3*o-i)*e+(4-6*o+3*i)*r+(1+3*n+3*o-3*i)*t+i*u)/6}function or(n){var e=n.length-1;return function(r){var t=r<=0?r=0:r>=1?(r=1,e-1):Math.floor(r*e),u=n[t],o=n[t+1],i=t>0?n[t-1]:2*u-o,a=t<e-1?n[t+2]:2*o-u;return ur((r-t/e)*e,i,u,o,a)}}var xn=n=>()=>n;function pe(n,e){return function(r){return n+r*e}}function ir(n,e,r){return n=Math.pow(n,r),e=Math.pow(e,r)-n,r=1/r,function(t){return Math.pow(n+t*e,r)}}function we(n,e){var r=e-n;return r?pe(n,r>180||r<-180?r-360*Math.round(r/360):r):xn(isNaN(n)?e:n)}function ar(n){return(n=+n)==1?Z:function(e,r){return r-e?ir(e,r,n):xn(isNaN(e)?r:e)}}function Z(n,e){var r=e-n;return r?pe(n,r):xn(isNaN(n)?e:n)}var Kn=(function n(e){var r=ar(e);function t(u,o){var i=r((u=Wn(u)).r,(o=Wn(o)).r),a=r(u.g,o.g),f=r(u.b,o.b),c=Z(u.opacity,o.opacity);return function(h){return u.r=i(h),u.g=a(h),u.b=f(h),u.opacity=c(h),u+""}}return t.gamma=n,t})(1);function cr(n){return function(e){var r=e.length,t=new Array(r),u=new Array(r),o=new Array(r),i,a;for(i=0;i<r;++i)a=Wn(e[i]),t[i]=a.r||0,u[i]=a.g||0,o[i]=a.b||0;return t=n(t),u=n(u),o=n(o),a.opacity=1,function(f){return a.r=t(f),a.g=u(f),a.b=o(f),a+""}}}var hu=cr(or);function fr(n,e){e||(e=[]);var r=n?Math.min(e.length,n.length):0,t=e.slice(),u;return function(o){for(u=0;u<r;++u)t[u]=n[u]*(1-o)+e[u]*o;return t}}function sr(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function lr(n,e){var r=e?e.length:0,t=n?Math.min(r,n.length):0,u=new Array(t),o=new Array(r),i;for(i=0;i<t;++i)u[i]=Rn(n[i],e[i]);for(;i<r;++i)o[i]=e[i];return function(a){for(i=0;i<t;++i)o[i]=u[i](a);return o}}function gr(n,e){var r=new Date;return n=+n,e=+e,function(t){return r.setTime(n*(1-t)+e*t),r}}function Tn(n,e){return n=+n,e=+e,function(r){return n*(1-r)+e*r}}function hr(n,e){var r={},t={},u;(n===null||typeof n!="object")&&(n={}),(e===null||typeof e!="object")&&(e={});for(u in e)u in n?r[u]=Rn(n[u],e[u]):t[u]=e[u];return function(o){for(u in r)t[u]=r[u](o);return t}}var On=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Fn=new RegExp(On.source,"g");function mr(n){return function(){return n}}function yr(n){return function(e){return n(e)+""}}function Mr(n,e){var r=On.lastIndex=Fn.lastIndex=0,t,u,o,i=-1,a=[],f=[];for(n=n+"",e=e+"";(t=On.exec(n))&&(u=Fn.exec(e));)(o=u.index)>r&&(o=e.slice(r,o),a[i]?a[i]+=o:a[++i]=o),(t=t[0])===(u=u[0])?a[i]?a[i]+=u:a[++i]=u:(a[++i]=null,f.push({i,x:Tn(t,u)})),r=Fn.lastIndex;return r<e.length&&(o=e.slice(r),a[i]?a[i]+=o:a[++i]=o),a.length<2?f[0]?yr(f[0].x):mr(e):(e=f.length,function(c){for(var h=0,g;h<e;++h)a[(g=f[h]).i]=g.x(c);return a.join("")})}function Rn(n,e){var r=typeof e,t;return e==null||r==="boolean"?xn(e):(r==="number"?Tn:r==="string"?(t=Bn(e))?(e=t,Kn):Mr:e instanceof Bn?Kn:e instanceof Date?gr:sr(e)?fr:Array.isArray(e)?lr:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?hr:Tn)(n,e)}function dr(n,e){return n=+n,e=+e,function(r){return Math.round(n*(1-r)+e*r)}}var Tr=1e-12;function ne(n){return((n=Math.exp(n))+1/n)/2}function pr(n){return((n=Math.exp(n))-1/n)/2}function wr(n){return((n=Math.exp(2*n))-1)/(n+1)}(function n(e,r,t){function u(o,i){var a=o[0],f=o[1],c=o[2],h=i[0],g=i[1],l=i[2],w=h-a,v=g-f,U=w*w+v*v,S,Y;if(U<Tr)Y=Math.log(l/c)/e,S=function(D){return[a+D*w,f+D*v,c*Math.exp(e*D*Y)]};else{var O=Math.sqrt(U),N=(l*l-c*c+t*U)/(2*c*r*O),x=(l*l-c*c-t*U)/(2*l*r*O),L=Math.log(Math.sqrt(N*N+1)-N),y=Math.log(Math.sqrt(x*x+1)-x);Y=(y-L)/e,S=function(D){var P=D*Y,V=ne(L),J=c/(r*O)*(V*wr(e*P+L)-pr(L));return[a+J*w,f+J*v,c*V/ne(e*P+L)]}}return S.duration=Math.abs(Y)*1e3*e/Math.SQRT2,S}return u.rho=function(o){var i=Math.max(.001,+o),a=i*i,f=a*a;return n(i,a,f)},u})(Math.SQRT2,2,4);function vr(n){return function(e,r){var t=n((e=En(e)).h,(r=En(r)).h),u=Z(e.c,r.c),o=Z(e.l,r.l),i=Z(e.opacity,r.opacity);return function(a){return e.h=t(a),e.c=u(a),e.l=o(a),e.opacity=i(a),e+""}}}var mu=vr(we);function ve(n){return(function e(r){r=+r;function t(u,o){var i=n((u=Xn(u)).h,(o=Xn(o)).h),a=Z(u.s,o.s),f=Z(u.l,o.l),c=Z(u.opacity,o.opacity);return function(h){return u.h=i(h),u.s=a(h),u.l=f(Math.pow(h,r)),u.opacity=c(h),u+""}}return t.gamma=e,t})(1)}ve(we);var yu=ve(Z);function Cr(n){return Math.abs(n=Math.round(n))>=1e21?n.toLocaleString("en").replace(/,/g,""):n.toString(10)}function pn(n,e){if(!isFinite(n)||n===0)return null;var r=(n=e?n.toExponential(e-1):n.toExponential()).indexOf("e"),t=n.slice(0,r);return[t.length>1?t[0]+t.slice(2):t,+n.slice(r+1)]}function on(n){return n=pn(Math.abs(n)),n?n[1]:NaN}function Ur(n,e){return function(r,t){for(var u=r.length,o=[],i=0,a=n[0],f=0;u>0&&a>0&&(f+a+1>t&&(a=Math.max(1,t-f)),o.push(r.substring(u-=a,u+a)),!((f+=a+1)>t));)a=n[i=(i+1)%n.length];return o.reverse().join(e)}}function Dr(n){return function(e){return e.replace(/[0-9]/g,function(r){return n[+r]})}}var xr=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function wn(n){if(!(e=xr.exec(n)))throw new Error("invalid format: "+n);var e;return new zn({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}wn.prototype=zn.prototype;function zn(n){this.fill=n.fill===void 0?" ":n.fill+"",this.align=n.align===void 0?">":n.align+"",this.sign=n.sign===void 0?"-":n.sign+"",this.symbol=n.symbol===void 0?"":n.symbol+"",this.zero=!!n.zero,this.width=n.width===void 0?void 0:+n.width,this.comma=!!n.comma,this.precision=n.precision===void 0?void 0:+n.precision,this.trim=!!n.trim,this.type=n.type===void 0?"":n.type+""}zn.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function Sr(n){n:for(var e=n.length,r=1,t=-1,u;r<e;++r)switch(n[r]){case".":t=u=r;break;case"0":t===0&&(t=r),u=r;break;default:if(!+n[r])break n;t>0&&(t=0);break}return t>0?n.slice(0,t)+n.slice(u+1):n}var vn;function kr(n,e){var r=pn(n,e);if(!r)return vn=void 0,n.toPrecision(e);var t=r[0],u=r[1],o=u-(vn=Math.max(-8,Math.min(8,Math.floor(u/3)))*3)+1,i=t.length;return o===i?t:o>i?t+new Array(o-i+1).join("0"):o>0?t.slice(0,o)+"."+t.slice(o):"0."+new Array(1-o).join("0")+pn(n,Math.max(0,e+o-1))[0]}function ee(n,e){var r=pn(n,e);if(!r)return n+"";var t=r[0],u=r[1];return u<0?"0."+new Array(-u).join("0")+t:t.length>u+1?t.slice(0,u+1)+"."+t.slice(u+1):t+new Array(u-t.length+2).join("0")}var re={"%":(n,e)=>(n*100).toFixed(e),b:n=>Math.round(n).toString(2),c:n=>n+"",d:Cr,e:(n,e)=>n.toExponential(e),f:(n,e)=>n.toFixed(e),g:(n,e)=>n.toPrecision(e),o:n=>Math.round(n).toString(8),p:(n,e)=>ee(n*100,e),r:ee,s:kr,X:n=>Math.round(n).toString(16).toUpperCase(),x:n=>Math.round(n).toString(16)};function te(n){return n}var ue=Array.prototype.map,oe=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Fr(n){var e=n.grouping===void 0||n.thousands===void 0?te:Ur(ue.call(n.grouping,Number),n.thousands+""),r=n.currency===void 0?"":n.currency[0]+"",t=n.currency===void 0?"":n.currency[1]+"",u=n.decimal===void 0?".":n.decimal+"",o=n.numerals===void 0?te:Dr(ue.call(n.numerals,String)),i=n.percent===void 0?"%":n.percent+"",a=n.minus===void 0?"−":n.minus+"",f=n.nan===void 0?"NaN":n.nan+"";function c(g,l){g=wn(g);var w=g.fill,v=g.align,U=g.sign,S=g.symbol,Y=g.zero,O=g.width,N=g.comma,x=g.precision,L=g.trim,y=g.type;y==="n"?(N=!0,y="g"):re[y]||(x===void 0&&(x=12),L=!0,y="g"),(Y||w==="0"&&v==="=")&&(Y=!0,w="0",v="=");var D=(l&&l.prefix!==void 0?l.prefix:"")+(S==="$"?r:S==="#"&&/[boxX]/.test(y)?"0"+y.toLowerCase():""),P=(S==="$"?t:/[%p]/.test(y)?i:"")+(l&&l.suffix!==void 0?l.suffix:""),V=re[y],J=/[defgprs%]/.test(y);x=x===void 0?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,x)):Math.max(0,Math.min(20,x));function hn(d){var R=D,b=P,Q,mn,K;if(y==="c")b=V(d)+b,d="";else{d=+d;var nn=d<0||1/d<0;if(d=isNaN(d)?f:V(Math.abs(d),x),L&&(d=Sr(d)),nn&&+d==0&&U!=="+"&&(nn=!1),R=(nn?U==="("?U:a:U==="-"||U==="("?"":U)+R,b=(y==="s"&&!isNaN(d)&&vn!==void 0?oe[8+vn/3]:"")+b+(nn&&U==="("?")":""),J){for(Q=-1,mn=d.length;++Q<mn;)if(K=d.charCodeAt(Q),48>K||K>57){b=(K===46?u+d.slice(Q+1):d.slice(Q))+b,d=d.slice(0,Q);break}}}N&&!Y&&(d=e(d,1/0));var en=R.length+d.length+b.length,$=en<O?new Array(O-en+1).join(w):"";switch(N&&Y&&(d=e($+d,$.length?O-b.length:1/0),$=""),v){case"<":d=R+d+b+$;break;case"=":d=R+$+d+b;break;case"^":d=$.slice(0,en=$.length>>1)+R+d+b+$.slice(en);break;default:d=$+R+d+b;break}return o(d)}return hn.toString=function(){return g+""},hn}function h(g,l){var w=Math.max(-8,Math.min(8,Math.floor(on(l)/3)))*3,v=Math.pow(10,-w),U=c((g=wn(g),g.type="f",g),{suffix:oe[8+w/3]});return function(S){return U(v*S)}}return{format:c,formatPrefix:h}}var yn,Ce,Ue;Nr({thousands:",",grouping:[3],currency:["$",""]});function Nr(n){return yn=Fr(n),Ce=yn.format,Ue=yn.formatPrefix,yn}function Yr(n){return Math.max(0,-on(Math.abs(n)))}function br(n,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(on(e)/3)))*3-on(Math.abs(n)))}function Ar(n,e){return n=Math.abs(n),e=Math.abs(e)-n,Math.max(0,on(e)-on(n))+1}const Nn=new Date,Yn=new Date;function k(n,e,r,t){function u(o){return n(o=arguments.length===0?new Date:new Date(+o)),o}return u.floor=o=>(n(o=new Date(+o)),o),u.ceil=o=>(n(o=new Date(o-1)),e(o,1),n(o),o),u.round=o=>{const i=u(o),a=u.ceil(o);return o-i<a-o?i:a},u.offset=(o,i)=>(e(o=new Date(+o),i==null?1:Math.floor(i)),o),u.range=(o,i,a)=>{const f=[];if(o=u.ceil(o),a=a==null?1:Math.floor(a),!(o<i)||!(a>0))return f;let c;do f.push(c=new Date(+o)),e(o,a),n(o);while(c<o&&o<i);return f},u.filter=o=>k(i=>{if(i>=i)for(;n(i),!o(i);)i.setTime(i-1)},(i,a)=>{if(i>=i)if(a<0)for(;++a<=0;)for(;e(i,-1),!o(i););else for(;--a>=0;)for(;e(i,1),!o(i););}),r&&(u.count=(o,i)=>(Nn.setTime(+o),Yn.setTime(+i),n(Nn),n(Yn),Math.floor(r(Nn,Yn))),u.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?u.filter(t?i=>t(i)%o===0:i=>u.count(0,i)%o===0):u)),u}const Cn=k(()=>{},(n,e)=>{n.setTime(+n+e)},(n,e)=>e-n);Cn.every=n=>(n=Math.floor(n),!isFinite(n)||!(n>0)?null:n>1?k(e=>{e.setTime(Math.floor(e/n)*n)},(e,r)=>{e.setTime(+e+r*n)},(e,r)=>(r-e)/n):Cn);Cn.range;const z=1e3,I=z*60,j=I*60,q=j*24,jn=q*7,ie=q*30,bn=q*365,tn=k(n=>{n.setTime(n-n.getMilliseconds())},(n,e)=>{n.setTime(+n+e*z)},(n,e)=>(e-n)/z,n=>n.getUTCSeconds());tn.range;const Zn=k(n=>{n.setTime(n-n.getMilliseconds()-n.getSeconds()*z)},(n,e)=>{n.setTime(+n+e*I)},(n,e)=>(e-n)/I,n=>n.getMinutes());Zn.range;const Hr=k(n=>{n.setUTCSeconds(0,0)},(n,e)=>{n.setTime(+n+e*I)},(n,e)=>(e-n)/I,n=>n.getUTCMinutes());Hr.range;const qn=k(n=>{n.setTime(n-n.getMilliseconds()-n.getSeconds()*z-n.getMinutes()*I)},(n,e)=>{n.setTime(+n+e*j)},(n,e)=>(e-n)/j,n=>n.getHours());qn.range;const Wr=k(n=>{n.setUTCMinutes(0,0,0)},(n,e)=>{n.setTime(+n+e*j)},(n,e)=>(e-n)/j,n=>n.getUTCHours());Wr.range;const gn=k(n=>n.setHours(0,0,0,0),(n,e)=>n.setDate(n.getDate()+e),(n,e)=>(e-n-(e.getTimezoneOffset()-n.getTimezoneOffset())*I)/q,n=>n.getDate()-1);gn.range;const _n=k(n=>{n.setUTCHours(0,0,0,0)},(n,e)=>{n.setUTCDate(n.getUTCDate()+e)},(n,e)=>(e-n)/q,n=>n.getUTCDate()-1);_n.range;const Lr=k(n=>{n.setUTCHours(0,0,0,0)},(n,e)=>{n.setUTCDate(n.getUTCDate()+e)},(n,e)=>(e-n)/q,n=>Math.floor(n/q));Lr.range;function X(n){return k(e=>{e.setDate(e.getDate()-(e.getDay()+7-n)%7),e.setHours(0,0,0,0)},(e,r)=>{e.setDate(e.getDate()+r*7)},(e,r)=>(r-e-(r.getTimezoneOffset()-e.getTimezoneOffset())*I)/jn)}const Sn=X(0),Un=X(1),Ir=X(2),Or=X(3),an=X(4),$r=X(5),Pr=X(6);Sn.range;Un.range;Ir.range;Or.range;an.range;$r.range;Pr.range;function G(n){return k(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-n)%7),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCDate(e.getUTCDate()+r*7)},(e,r)=>(r-e)/jn)}const De=G(0),Dn=G(1),Rr=G(2),zr=G(3),cn=G(4),jr=G(5),Zr=G(6);De.range;Dn.range;Rr.range;zr.range;cn.range;jr.range;Zr.range;const Qn=k(n=>{n.setDate(1),n.setHours(0,0,0,0)},(n,e)=>{n.setMonth(n.getMonth()+e)},(n,e)=>e.getMonth()-n.getMonth()+(e.getFullYear()-n.getFullYear())*12,n=>n.getMonth());Qn.range;const qr=k(n=>{n.setUTCDate(1),n.setUTCHours(0,0,0,0)},(n,e)=>{n.setUTCMonth(n.getUTCMonth()+e)},(n,e)=>e.getUTCMonth()-n.getUTCMonth()+(e.getUTCFullYear()-n.getUTCFullYear())*12,n=>n.getUTCMonth());qr.range;const _=k(n=>{n.setMonth(0,1),n.setHours(0,0,0,0)},(n,e)=>{n.setFullYear(n.getFullYear()+e)},(n,e)=>e.getFullYear()-n.getFullYear(),n=>n.getFullYear());_.every=n=>!isFinite(n=Math.floor(n))||!(n>0)?null:k(e=>{e.setFullYear(Math.floor(e.getFullYear()/n)*n),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,r)=>{e.setFullYear(e.getFullYear()+r*n)});_.range;const B=k(n=>{n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)},(n,e)=>{n.setUTCFullYear(n.getUTCFullYear()+e)},(n,e)=>e.getUTCFullYear()-n.getUTCFullYear(),n=>n.getUTCFullYear());B.every=n=>!isFinite(n=Math.floor(n))||!(n>0)?null:k(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/n)*n),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCFullYear(e.getUTCFullYear()+r*n)});B.range;function _r(n,e,r,t,u,o){const i=[[tn,1,z],[tn,5,5*z],[tn,15,15*z],[tn,30,30*z],[o,1,I],[o,5,5*I],[o,15,15*I],[o,30,30*I],[u,1,j],[u,3,3*j],[u,6,6*j],[u,12,12*j],[t,1,q],[t,2,2*q],[r,1,jn],[e,1,ie],[e,3,3*ie],[n,1,bn]];function a(c,h,g){const l=h<c;l&&([c,h]=[h,c]);const w=g&&typeof g.range=="function"?g:f(c,h,g),v=w?w.range(c,+h+1):[];return l?v.reverse():v}function f(c,h,g){const l=Math.abs(h-c)/g,w=Pn(([,,S])=>S).right(i,l);if(w===i.length)return n.every(In(c/bn,h/bn,g));if(w===0)return Cn.every(Math.max(In(c,h,g),1));const[v,U]=i[l/i[w-1][2]<i[w][2]/l?w-1:w];return v.every(U)}return[a,f]}const[Qr,Vr]=_r(_,Qn,Sn,gn,qn,Zn);function An(n){if(0<=n.y&&n.y<100){var e=new Date(-1,n.m,n.d,n.H,n.M,n.S,n.L);return e.setFullYear(n.y),e}return new Date(n.y,n.m,n.d,n.H,n.M,n.S,n.L)}function Hn(n){if(0<=n.y&&n.y<100){var e=new Date(Date.UTC(-1,n.m,n.d,n.H,n.M,n.S,n.L));return e.setUTCFullYear(n.y),e}return new Date(Date.UTC(n.y,n.m,n.d,n.H,n.M,n.S,n.L))}function fn(n,e,r){return{y:n,m:e,d:r,H:0,M:0,S:0,L:0}}function Er(n){var e=n.dateTime,r=n.date,t=n.time,u=n.periods,o=n.days,i=n.shortDays,a=n.months,f=n.shortMonths,c=sn(u),h=ln(u),g=sn(o),l=ln(o),w=sn(i),v=ln(i),U=sn(a),S=ln(a),Y=sn(f),O=ln(f),N={a:K,A:nn,b:en,B:$,c:null,d:ge,e:ge,f:dt,g:kt,G:Nt,H:mt,I:yt,j:Mt,L:xe,m:Tt,M:pt,p:Oe,q:$e,Q:ye,s:Me,S:wt,u:vt,U:Ct,V:Ut,w:Dt,W:xt,x:null,X:null,y:St,Y:Ft,Z:Yt,"%":me},x={a:Pe,A:Re,b:ze,B:je,c:null,d:he,e:he,f:Wt,g:qt,G:Qt,H:bt,I:At,j:Ht,L:ke,m:Lt,M:It,p:Ze,q:qe,Q:ye,s:Me,S:Ot,u:$t,U:Pt,V:Rt,w:zt,W:jt,x:null,X:null,y:Zt,Y:_t,Z:Vt,"%":me},L={a:J,A:hn,b:d,B:R,c:b,d:se,e:se,f:st,g:fe,G:ce,H:le,I:le,j:it,L:ft,m:ot,M:at,p:V,q:ut,Q:gt,s:ht,S:ct,u:Kr,U:nt,V:et,w:Jr,W:rt,x:Q,X:mn,y:fe,Y:ce,Z:tt,"%":lt};N.x=y(r,N),N.X=y(t,N),N.c=y(e,N),x.x=y(r,x),x.X=y(t,x),x.c=y(e,x);function y(m,M){return function(T){var s=[],A=-1,C=0,H=m.length,W,E,Vn;for(T instanceof Date||(T=new Date(+T));++A<H;)m.charCodeAt(A)===37&&(s.push(m.slice(C,A)),(E=ae[W=m.charAt(++A)])!=null?W=m.charAt(++A):E=W==="e"?" ":"0",(Vn=M[W])&&(W=Vn(T,E)),s.push(W),C=A+1);return s.push(m.slice(C,A)),s.join("")}}function D(m,M){return function(T){var s=fn(1900,void 0,1),A=P(s,m,T+="",0),C,H;if(A!=T.length)return null;if("Q"in s)return new Date(s.Q);if("s"in s)return new Date(s.s*1e3+("L"in s?s.L:0));if(M&&!("Z"in s)&&(s.Z=0),"p"in s&&(s.H=s.H%12+s.p*12),s.m===void 0&&(s.m="q"in s?s.q:0),"V"in s){if(s.V<1||s.V>53)return null;"w"in s||(s.w=1),"Z"in s?(C=Hn(fn(s.y,0,1)),H=C.getUTCDay(),C=H>4||H===0?Dn.ceil(C):Dn(C),C=_n.offset(C,(s.V-1)*7),s.y=C.getUTCFullYear(),s.m=C.getUTCMonth(),s.d=C.getUTCDate()+(s.w+6)%7):(C=An(fn(s.y,0,1)),H=C.getDay(),C=H>4||H===0?Un.ceil(C):Un(C),C=gn.offset(C,(s.V-1)*7),s.y=C.getFullYear(),s.m=C.getMonth(),s.d=C.getDate()+(s.w+6)%7)}else("W"in s||"U"in s)&&("w"in s||(s.w="u"in s?s.u%7:"W"in s?1:0),H="Z"in s?Hn(fn(s.y,0,1)).getUTCDay():An(fn(s.y,0,1)).getDay(),s.m=0,s.d="W"in s?(s.w+6)%7+s.W*7-(H+5)%7:s.w+s.U*7-(H+6)%7);return"Z"in s?(s.H+=s.Z/100|0,s.M+=s.Z%100,Hn(s)):An(s)}}function P(m,M,T,s){for(var A=0,C=M.length,H=T.length,W,E;A<C;){if(s>=H)return-1;if(W=M.charCodeAt(A++),W===37){if(W=M.charAt(A++),E=L[W in ae?M.charAt(A++):W],!E||(s=E(m,T,s))<0)return-1}else if(W!=T.charCodeAt(s++))return-1}return s}function V(m,M,T){var s=c.exec(M.slice(T));return s?(m.p=h.get(s[0].toLowerCase()),T+s[0].length):-1}function J(m,M,T){var s=w.exec(M.slice(T));return s?(m.w=v.get(s[0].toLowerCase()),T+s[0].length):-1}function hn(m,M,T){var s=g.exec(M.slice(T));return s?(m.w=l.get(s[0].toLowerCase()),T+s[0].length):-1}function d(m,M,T){var s=Y.exec(M.slice(T));return s?(m.m=O.get(s[0].toLowerCase()),T+s[0].length):-1}function R(m,M,T){var s=U.exec(M.slice(T));return s?(m.m=S.get(s[0].toLowerCase()),T+s[0].length):-1}function b(m,M,T){return P(m,e,M,T)}function Q(m,M,T){return P(m,r,M,T)}function mn(m,M,T){return P(m,t,M,T)}function K(m){return i[m.getDay()]}function nn(m){return o[m.getDay()]}function en(m){return f[m.getMonth()]}function $(m){return a[m.getMonth()]}function Oe(m){return u[+(m.getHours()>=12)]}function $e(m){return 1+~~(m.getMonth()/3)}function Pe(m){return i[m.getUTCDay()]}function Re(m){return o[m.getUTCDay()]}function ze(m){return f[m.getUTCMonth()]}function je(m){return a[m.getUTCMonth()]}function Ze(m){return u[+(m.getUTCHours()>=12)]}function qe(m){return 1+~~(m.getUTCMonth()/3)}return{format:function(m){var M=y(m+="",N);return M.toString=function(){return m},M},parse:function(m){var M=D(m+="",!1);return M.toString=function(){return m},M},utcFormat:function(m){var M=y(m+="",x);return M.toString=function(){return m},M},utcParse:function(m){var M=D(m+="",!0);return M.toString=function(){return m},M}}}var ae={"-":"",_:" ",0:"0"},F=/^\s*\d+/,Br=/^%/,Xr=/[\\^$*+?|[\]().{}]/g;function p(n,e,r){var t=n<0?"-":"",u=(t?-n:n)+"",o=u.length;return t+(o<r?new Array(r-o+1).join(e)+u:u)}function Gr(n){return n.replace(Xr,"\\$&")}function sn(n){return new RegExp("^(?:"+n.map(Gr).join("|")+")","i")}function ln(n){return new Map(n.map((e,r)=>[e.toLowerCase(),r]))}function Jr(n,e,r){var t=F.exec(e.slice(r,r+1));return t?(n.w=+t[0],r+t[0].length):-1}function Kr(n,e,r){var t=F.exec(e.slice(r,r+1));return t?(n.u=+t[0],r+t[0].length):-1}function nt(n,e,r){var t=F.exec(e.slice(r,r+2));return t?(n.U=+t[0],r+t[0].length):-1}function et(n,e,r){var t=F.exec(e.slice(r,r+2));return t?(n.V=+t[0],r+t[0].length):-1}function rt(n,e,r){var t=F.exec(e.slice(r,r+2));return t?(n.W=+t[0],r+t[0].length):-1}function ce(n,e,r){var t=F.exec(e.slice(r,r+4));return t?(n.y=+t[0],r+t[0].length):-1}function fe(n,e,r){var t=F.exec(e.slice(r,r+2));return t?(n.y=+t[0]+(+t[0]>68?1900:2e3),r+t[0].length):-1}function tt(n,e,r){var t=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(r,r+6));return t?(n.Z=t[1]?0:-(t[2]+(t[3]||"00")),r+t[0].length):-1}function ut(n,e,r){var t=F.exec(e.slice(r,r+1));return t?(n.q=t[0]*3-3,r+t[0].length):-1}function ot(n,e,r){var t=F.exec(e.slice(r,r+2));return t?(n.m=t[0]-1,r+t[0].length):-1}function se(n,e,r){var t=F.exec(e.slice(r,r+2));return t?(n.d=+t[0],r+t[0].length):-1}function it(n,e,r){var t=F.exec(e.slice(r,r+3));return t?(n.m=0,n.d=+t[0],r+t[0].length):-1}function le(n,e,r){var t=F.exec(e.slice(r,r+2));return t?(n.H=+t[0],r+t[0].length):-1}function at(n,e,r){var t=F.exec(e.slice(r,r+2));return t?(n.M=+t[0],r+t[0].length):-1}function ct(n,e,r){var t=F.exec(e.slice(r,r+2));return t?(n.S=+t[0],r+t[0].length):-1}function ft(n,e,r){var t=F.exec(e.slice(r,r+3));return t?(n.L=+t[0],r+t[0].length):-1}function st(n,e,r){var t=F.exec(e.slice(r,r+6));return t?(n.L=Math.floor(t[0]/1e3),r+t[0].length):-1}function lt(n,e,r){var t=Br.exec(e.slice(r,r+1));return t?r+t[0].length:-1}function gt(n,e,r){var t=F.exec(e.slice(r));return t?(n.Q=+t[0],r+t[0].length):-1}function ht(n,e,r){var t=F.exec(e.slice(r));return t?(n.s=+t[0],r+t[0].length):-1}function ge(n,e){return p(n.getDate(),e,2)}function mt(n,e){return p(n.getHours(),e,2)}function yt(n,e){return p(n.getHours()%12||12,e,2)}function Mt(n,e){return p(1+gn.count(_(n),n),e,3)}function xe(n,e){return p(n.getMilliseconds(),e,3)}function dt(n,e){return xe(n,e)+"000"}function Tt(n,e){return p(n.getMonth()+1,e,2)}function pt(n,e){return p(n.getMinutes(),e,2)}function wt(n,e){return p(n.getSeconds(),e,2)}function vt(n){var e=n.getDay();return e===0?7:e}function Ct(n,e){return p(Sn.count(_(n)-1,n),e,2)}function Se(n){var e=n.getDay();return e>=4||e===0?an(n):an.ceil(n)}function Ut(n,e){return n=Se(n),p(an.count(_(n),n)+(_(n).getDay()===4),e,2)}function Dt(n){return n.getDay()}function xt(n,e){return p(Un.count(_(n)-1,n),e,2)}function St(n,e){return p(n.getFullYear()%100,e,2)}function kt(n,e){return n=Se(n),p(n.getFullYear()%100,e,2)}function Ft(n,e){return p(n.getFullYear()%1e4,e,4)}function Nt(n,e){var r=n.getDay();return n=r>=4||r===0?an(n):an.ceil(n),p(n.getFullYear()%1e4,e,4)}function Yt(n){var e=n.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+p(e/60|0,"0",2)+p(e%60,"0",2)}function he(n,e){return p(n.getUTCDate(),e,2)}function bt(n,e){return p(n.getUTCHours(),e,2)}function At(n,e){return p(n.getUTCHours()%12||12,e,2)}function Ht(n,e){return p(1+_n.count(B(n),n),e,3)}function ke(n,e){return p(n.getUTCMilliseconds(),e,3)}function Wt(n,e){return ke(n,e)+"000"}function Lt(n,e){return p(n.getUTCMonth()+1,e,2)}function It(n,e){return p(n.getUTCMinutes(),e,2)}function Ot(n,e){return p(n.getUTCSeconds(),e,2)}function $t(n){var e=n.getUTCDay();return e===0?7:e}function Pt(n,e){return p(De.count(B(n)-1,n),e,2)}function Fe(n){var e=n.getUTCDay();return e>=4||e===0?cn(n):cn.ceil(n)}function Rt(n,e){return n=Fe(n),p(cn.count(B(n),n)+(B(n).getUTCDay()===4),e,2)}function zt(n){return n.getUTCDay()}function jt(n,e){return p(Dn.count(B(n)-1,n),e,2)}function Zt(n,e){return p(n.getUTCFullYear()%100,e,2)}function qt(n,e){return n=Fe(n),p(n.getUTCFullYear()%100,e,2)}function _t(n,e){return p(n.getUTCFullYear()%1e4,e,4)}function Qt(n,e){var r=n.getUTCDay();return n=r>=4||r===0?cn(n):cn.ceil(n),p(n.getUTCFullYear()%1e4,e,4)}function Vt(){return"+0000"}function me(){return"%"}function ye(n){return+n}function Me(n){return Math.floor(+n/1e3)}var rn,Ne,Ye,be;Et({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Et(n){return rn=Er(n),Ne=rn.format,rn.parse,Ye=rn.utcFormat,be=rn.utcParse,rn}var Ae="%Y-%m-%dT%H:%M:%S.%LZ";function Bt(n){return n.toISOString()}Date.prototype.toISOString||Ye(Ae);function Xt(n){var e=new Date(n);return isNaN(e)?null:e}+new Date("2000-01-01T00:00:00.000Z")||be(Ae);function kn(n,e){switch(arguments.length){case 0:break;case 1:this.range(n);break;default:this.range(e).domain(n);break}return this}const de=Symbol("implicit");function He(){var n=new Gn,e=[],r=[],t=de;function u(o){let i=n.get(o);if(i===void 0){if(t!==de)return t;n.set(o,i=e.push(o)-1)}return r[i%r.length]}return u.domain=function(o){if(!arguments.length)return e.slice();e=[],n=new Gn;for(const i of o)n.has(i)||n.set(i,e.push(i)-1);return u},u.range=function(o){return arguments.length?(r=Array.from(o),u):r.slice()},u.unknown=function(o){return arguments.length?(t=o,u):t},u.copy=function(){return He(e,r).unknown(t)},kn.apply(u,arguments),u}function Gt(){var n=He().unknown(void 0),e=n.domain,r=n.range,t=0,u=1,o,i,a=!1,f=0,c=0,h=.5;delete n.unknown;function g(){var l=e().length,w=u<t,v=w?u:t,U=w?t:u;o=(U-v)/Math.max(1,l-f+c*2),a&&(o=Math.floor(o)),v+=(U-v-o*(l-f))*h,i=o*(1-f),a&&(v=Math.round(v),i=Math.round(i));var S=tr(l).map(function(Y){return v+o*Y});return r(w?S.reverse():S)}return n.domain=function(l){return arguments.length?(e(l),g()):e()},n.range=function(l){return arguments.length?([t,u]=l,t=+t,u=+u,g()):[t,u]},n.rangeRound=function(l){return[t,u]=l,t=+t,u=+u,a=!0,g()},n.bandwidth=function(){return i},n.step=function(){return o},n.round=function(l){return arguments.length?(a=!!l,g()):a},n.padding=function(l){return arguments.length?(f=Math.min(1,c=+l),g()):f},n.paddingInner=function(l){return arguments.length?(f=Math.min(1,l),g()):f},n.paddingOuter=function(l){return arguments.length?(c=+l,g()):c},n.align=function(l){return arguments.length?(h=Math.max(0,Math.min(1,l)),g()):h},n.copy=function(){return Gt(e(),[t,u]).round(a).paddingInner(f).paddingOuter(c).align(h)},kn.apply(g(),arguments)}function Jt(n){return function(){return n}}function Kt(n){return+n}var Te=[0,1];function un(n){return n}function $n(n,e){return(e-=n=+n)?function(r){return(r-n)/e}:Jt(isNaN(e)?NaN:.5)}function nu(n,e){var r;return n>e&&(r=n,n=e,e=r),function(t){return Math.max(n,Math.min(e,t))}}function eu(n,e,r){var t=n[0],u=n[1],o=e[0],i=e[1];return u<t?(t=$n(u,t),o=r(i,o)):(t=$n(t,u),o=r(o,i)),function(a){return o(t(a))}}function ru(n,e,r){var t=Math.min(n.length,e.length)-1,u=new Array(t),o=new Array(t),i=-1;for(n[t]<n[0]&&(n=n.slice().reverse(),e=e.slice().reverse());++i<t;)u[i]=$n(n[i],n[i+1]),o[i]=r(e[i],e[i+1]);return function(a){var f=Be(n,a,1,t)-1;return o[f](u[f](a))}}function We(n,e){return e.domain(n.domain()).range(n.range()).interpolate(n.interpolate()).clamp(n.clamp()).unknown(n.unknown())}function tu(){var n=Te,e=Te,r=Rn,t,u,o,i=un,a,f,c;function h(){var l=Math.min(n.length,e.length);return i!==un&&(i=nu(n[0],n[l-1])),a=l>2?ru:eu,f=c=null,g}function g(l){return l==null||isNaN(l=+l)?o:(f||(f=a(n.map(t),e,r)))(t(i(l)))}return g.invert=function(l){return i(u((c||(c=a(e,n.map(t),Tn)))(l)))},g.domain=function(l){return arguments.length?(n=Array.from(l,Kt),h()):n.slice()},g.range=function(l){return arguments.length?(e=Array.from(l),h()):e.slice()},g.rangeRound=function(l){return e=Array.from(l),r=dr,h()},g.clamp=function(l){return arguments.length?(i=l?!0:un,h()):i!==un},g.interpolate=function(l){return arguments.length?(r=l,h()):r},g.unknown=function(l){return arguments.length?(o=l,g):o},function(l,w){return t=l,u=w,h()}}function Le(){return tu()(un,un)}function uu(n,e,r,t){var u=In(n,e,r),o;switch(t=wn(t??",f"),t.type){case"s":{var i=Math.max(Math.abs(n),Math.abs(e));return t.precision==null&&!isNaN(o=br(u,i))&&(t.precision=o),Ue(t,i)}case"":case"e":case"g":case"p":case"r":{t.precision==null&&!isNaN(o=Ar(u,Math.max(Math.abs(n),Math.abs(e))))&&(t.precision=o-(t.type==="e"));break}case"f":case"%":{t.precision==null&&!isNaN(o=Yr(u))&&(t.precision=o-(t.type==="%")*2);break}}return Ce(t)}function ou(n){var e=n.domain;return n.ticks=function(r){var t=e();return rr(t[0],t[t.length-1],r??10)},n.tickFormat=function(r,t){var u=e();return uu(u[0],u[u.length-1],r??10,t)},n.nice=function(r){r==null&&(r=10);var t=e(),u=0,o=t.length-1,i=t[u],a=t[o],f,c,h=10;for(a<i&&(c=i,i=a,a=c,c=u,u=o,o=c);h-- >0;){if(c=Ln(i,a,r),c===f)return t[u]=i,t[o]=a,e(t);if(c>0)i=Math.floor(i/c)*c,a=Math.ceil(a/c)*c;else if(c<0)i=Math.ceil(i*c)/c,a=Math.floor(a*c)/c;else break;f=c}return n},n}function iu(){var n=Le();return n.copy=function(){return We(n,iu())},kn.apply(n,arguments),ou(n)}function au(n,e){n=n.slice();var r=0,t=n.length-1,u=n[r],o=n[t],i;return o<u&&(i=r,r=t,t=i,i=u,u=o,o=i),n[r]=e.floor(u),n[t]=e.ceil(o),n}function cu(n){return new Date(n)}function fu(n){return n instanceof Date?+n:Math.round(n)}function Ie(n,e,r,t,u,o,i,a,f,c){var h=Le(),g=h.invert,l=h.domain,w=c(".%L"),v=c(":%S"),U=c("%I:%M"),S=c("%I %p"),Y=c("%a %d"),O=c("%b %d"),N=c("%B"),x=c("%Y");function L(y){return(f(y)<y?w:a(y)<y?v:i(y)<y?U:o(y)<y?S:t(y)<y?u(y)<y?Y:O:r(y)<y?N:x)(y)}return h.invert=function(y){return new Date(Math.round(g(y)))},h.domain=function(y){return arguments.length?l(Array.from(y,fu)):l().map(cu)},h.ticks=function(y){var D=l();return n(D[0],D[D.length-1],y??10)},h.tickFormat=function(y,D){return D==null?L:c(D)},h.nice=function(y){var D=l();return(!y||typeof y.range!="function")&&(y=e(D[0],D[D.length-1],y??10)),y?l(au(D,y)):h},h.copy=function(){return We(h,Ie(n,e,r,t,u,o,i,a,f,c))},h}function Mu(){return kn.apply(Ie(Qr,Vr,_,Qn,Sn,gn,qn,Zn,tn,Ne).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}export{Cn as a,Gt as b,yu as c,gu as d,gn as e,Ce as f,Ne as g,mu as h,$r as i,qn as j,Zn as k,iu as l,lu as m,Un as n,He as o,Qn as p,Pr as q,hu as r,tn as s,Mu as t,Sn as u,an as v,Ir as w,Or as x};
@@ -1,4 +1,4 @@
1
- import{t as He,bq as v,bo as d,by as je,b as Ze,bt as or,bu as _t,bs as Ur}from"./DGQ1ECsI.js";import{bs as Xe,ay as X,be as ut,b$ as nt,b_ as q,bO as Y,W as y,bS as m,aD as e,a7 as ht,bl as xe,bn as Ye,c9 as c,aA as p,aB as re,ca as Le,c0 as pt,bH as s,a5 as oe,bA as ne,bV as V,br as Ct,bk as Ar,bj as Br,bf as Lo,bo as Nr,c5 as kt,aw as Yt,bz as Fo,cd as qt}from"./DYhIMPy1.js";import{i as be}from"./B-DRVFcy.js";import{c as Q}from"./CJeZnjZ2.js";import{g as yr,i as Ro,I as So,e as It}from"./D3HUOTfX.js";import{f as Lt,s as Me,g as To}from"./Bp_k45o-.js";import{b as wt}from"./BaIAhI85.js";import{d as xr}from"./BASTKLI1.js";import{k as $o}from"./B99vgEcA.js";import{c as nr}from"./ChTqQfQN.js";import{a as Uo}from"./CC7to1B5.js";import{f as Be}from"./CxF8YFum.js";import{F as Ao}from"./DZ-cwX5R.js";import{k as st}from"./CK2a86W3.js";import{s as Bo}from"./ChmnWquS.js";import{ck as Or,F as _e,a4 as No,aV as Oo,an as Mo,cF as Do,aI as Ko,aW as Jt,Y as ar,_ as ir,aZ as Mr,as as Vo,ay as Dr,cO as Wo,cd as Kr,bO as Vr,ci as zo}from"./Cjw1QvKa.js";import"./B_7vJcZK.js";import{Iv as Pe,fM as Go,bs as qo,zf as Ho,yC as jo,Ku as Cr,dJ as Zo,bM as Xo,Kt as Yo,uk as Jo,Kr as kr,gs as Qo,tH as en,Ks as tn,K7 as Ir,Kq as Er}from"./BSSsvY4I.js";import"./d34yYkdR.js";import{R as rn,k as Ht,l as dt,j as on,i as qe,p as Wr,h as zr,K as nn,m as an,o as sn,n as ln,M as Gr,d as dn}from"./Cw94LfJC.js";import{a as qr,B as Et}from"./BvFAWM27.js";import{cu as un}from"./Csp7pCXT.js";import{ac as cn,D as fn}from"./BJpI9lmh.js";import{w as gn,K as vn}from"./2yJgo8xz.js";import{I as $t}from"./CM0lKKPd.js";import{d as pn}from"./BtEQs3u_.js";import{G as wn,I as bn}from"./ggQuSgBM.js";import{a3 as mn,ae as _n}from"./4M32Nrru.js";import{i as Qt}from"./DJ8_lZZl.js";import{i as hn,a as yn}from"./DKPFCCGK.js";import{B as xn,m as Cn,n as kn}from"./D7KOa2cM.js";import"./286xXFLf.js";import{t as Ke}from"./DNZhZg57.js";import{M as Hr}from"./CPFtOnI7.js";import"./rEoZFmiI.js";import"./B2r-op5b.js";import{b as In}from"./DVpbdNgF.js";import"./CzZDc-Ii.js";import{o as Pr,s as lt,n as St}from"./CIyUrgF0.js";import{g as En}from"./DfN8_dcw.js";import{f as Pn}from"./9_2ZyZ9L.js";import{ay as Ln,$ as Fn}from"./B45FOkqf.js";import{aO as Rn}from"./CbVK4mzc.js";function Sn(o,r){return o.loadURL(r)}function Tn(o){return{previousUrlProp:o||null}}function Lr(o,r){o.previousUrlProp=r}function $n(o,r,i){const b=i||r;return o.previousUrlProp===b?null:(o.previousUrlProp=b,b)}function Un(o,r,i){return r?o.previousUrlProp===null?(o.previousUrlProp=r,{shouldLoad:!1,targetUrl:null}):r===o.previousUrlProp?{shouldLoad:!1,targetUrl:null}:i.webviewReady?(o.previousUrlProp=r,i.isValidBrowserUrl(r)?{shouldLoad:!0,targetUrl:r}:{shouldLoad:!1,targetUrl:null}):{shouldLoad:!1,targetUrl:null}:{shouldLoad:!1,targetUrl:null}}const jr=nr("TabBoundsReporter"),An=150;function jt(o,r,i){!(r>0)||!(i>0)||window.electronAPI?.invoke("browser:report-tab-bounds",{tabId:o,width:r,height:i}).catch(b=>{jr.debug("Failed to report tab bounds",{tabId:o,error:b})})}function Fr(o){window.electronAPI?.invoke("browser:report-tab-bounds",{tabId:o}).catch(r=>{jr.debug("Failed to clear tab bounds",{tabId:o,error:r})})}function Bn(o,r){let i=r,b;const x=typeof ResizeObserver>"u"?void 0:new ResizeObserver(C=>{if(!i)return;const h=C[C.length-1]?.contentRect;if(!h)return;const N=i;clearTimeout(b),b=setTimeout(()=>{jt(N,h.width,h.height)},An)});if(x?.observe(o),i){const C=o.getBoundingClientRect();jt(i,C.width,C.height)}return{update(C){if(C!==i&&(clearTimeout(b),i&&Fr(i),i=C,i)){const h=o.getBoundingClientRect();jt(i,h.width,h.height)}},destroy(){clearTimeout(b),x?.disconnect(),i&&Fr(i)}}}function Zr(o){let r=o.trim();if(!r)return null;/^[a-z][a-z0-9+.-]*:\/\//i.test(r)||(r=(r.includes("localhost")||r.includes("127.0.0.1")||r.includes("0.0.0.0")?"http://":"https://")+r);try{return new URL(r),r}catch{return null}}function ot(o,r=typeof window<"u"?window.location.origin:""){return o==="about:blank"||Xr(o,r)}function Xr(o,r=typeof window<"u"?window.location.origin:""){if(!o)return!1;try{const i=new URL(o);return qr.NAVIGATION_ALLOWED.includes(i.protocol)&&i.origin!==r}catch{return!1}}const er="__INTENT_PANEL_BRACKET__:",Nn=`
1
+ import{t as He,bq as v,bo as d,by as je,b as Ze,bt as or,bu as _t,bs as Ur}from"./41c-5lbJ.js";import{bs as Xe,ay as X,be as ut,b$ as nt,b_ as q,bO as Y,W as y,bS as m,aD as e,a7 as ht,bl as xe,bn as Ye,c9 as c,aA as p,aB as re,ca as Le,c0 as pt,bH as s,a5 as oe,bA as ne,bV as V,br as Ct,bk as Ar,bj as Br,bf as Lo,bo as Nr,c5 as kt,aw as Yt,bz as Fo,cd as qt}from"./DYhIMPy1.js";import{i as be}from"./ClgmQqA9.js";import{c as Q}from"./Dv-TQImR.js";import{g as yr,i as Ro,I as So,e as It}from"./CEufllny.js";import{f as Lt,s as Me,g as To}from"./BBCbq-hE.js";import{b as wt}from"./BaIAhI85.js";import{d as xr}from"./DuPQa1Hv.js";import{k as $o}from"./D9WrXbf9.js";import{c as nr}from"./ChTqQfQN.js";import{a as Uo}from"./CC7to1B5.js";import{f as Be}from"./nLyQInj7.js";import{F as Ao}from"./De70D2Lx.js";import{k as st}from"./ClkbPGx9.js";import{s as Bo}from"./BhX-5zd9.js";import{ck as Or,F as _e,a4 as No,aV as Oo,an as Mo,cF as Do,aI as Ko,aW as Jt,Y as ar,_ as ir,aZ as Mr,as as Vo,ay as Dr,cO as Wo,cd as Kr,bO as Vr,ci as zo}from"./AOUBMpYk.js";import"./CdXmpyDy.js";import{Iv as Pe,fM as Go,bs as qo,zf as Ho,yC as jo,Ku as Cr,dJ as Zo,bM as Xo,Kt as Yo,uk as Jo,Kr as kr,gs as Qo,tH as en,Ks as tn,K7 as Ir,Kq as Er}from"./BuDJvkTk.js";import"./BzXCk-eX.js";import{R as rn,k as Ht,l as dt,j as on,i as qe,p as Wr,h as zr,K as nn,m as an,o as sn,n as ln,M as Gr,d as dn}from"./BuupGai6.js";import{a as qr,B as Et}from"./BvFAWM27.js";import{cu as un}from"./CbX7A7fn.js";import{ac as cn,D as fn}from"./DGRqvVY1.js";import{w as gn,K as vn}from"./CYyISHjN.js";import{I as $t}from"./D_P8KoFV.js";import{d as pn}from"./6pSwNbUy.js";import{G as wn,I as bn}from"./ggQuSgBM.js";import{a3 as mn,ae as _n}from"./Dq9dLpt4.js";import{i as Qt}from"./DJ8_lZZl.js";import{i as hn,a as yn}from"./BrR0973A.js";import{B as xn,m as Cn,n as kn}from"./CccgSyFt.js";import"./CCw4KHZp.js";import{t as Ke}from"./-o555Jq8.js";import{M as Hr}from"./BYjUWrg8.js";import"./CCO5tijn.js";import"./D07rIrLM.js";import{b as In}from"./BwzznN4d.js";import"./DfA_Upom.js";import{o as Pr,s as lt,n as St}from"./CIyUrgF0.js";import{g as En}from"./DfN8_dcw.js";import{f as Pn}from"./Bm0VuPYn.js";import{ay as Ln,$ as Fn}from"./DQ_x-k0O.js";import{aO as Rn}from"./DGb_dMRY.js";function Sn(o,r){return o.loadURL(r)}function Tn(o){return{previousUrlProp:o||null}}function Lr(o,r){o.previousUrlProp=r}function $n(o,r,i){const b=i||r;return o.previousUrlProp===b?null:(o.previousUrlProp=b,b)}function Un(o,r,i){return r?o.previousUrlProp===null?(o.previousUrlProp=r,{shouldLoad:!1,targetUrl:null}):r===o.previousUrlProp?{shouldLoad:!1,targetUrl:null}:i.webviewReady?(o.previousUrlProp=r,i.isValidBrowserUrl(r)?{shouldLoad:!0,targetUrl:r}:{shouldLoad:!1,targetUrl:null}):{shouldLoad:!1,targetUrl:null}:{shouldLoad:!1,targetUrl:null}}const jr=nr("TabBoundsReporter"),An=150;function jt(o,r,i){!(r>0)||!(i>0)||window.electronAPI?.invoke("browser:report-tab-bounds",{tabId:o,width:r,height:i}).catch(b=>{jr.debug("Failed to report tab bounds",{tabId:o,error:b})})}function Fr(o){window.electronAPI?.invoke("browser:report-tab-bounds",{tabId:o}).catch(r=>{jr.debug("Failed to clear tab bounds",{tabId:o,error:r})})}function Bn(o,r){let i=r,b;const x=typeof ResizeObserver>"u"?void 0:new ResizeObserver(C=>{if(!i)return;const h=C[C.length-1]?.contentRect;if(!h)return;const N=i;clearTimeout(b),b=setTimeout(()=>{jt(N,h.width,h.height)},An)});if(x?.observe(o),i){const C=o.getBoundingClientRect();jt(i,C.width,C.height)}return{update(C){if(C!==i&&(clearTimeout(b),i&&Fr(i),i=C,i)){const h=o.getBoundingClientRect();jt(i,h.width,h.height)}},destroy(){clearTimeout(b),x?.disconnect(),i&&Fr(i)}}}function Zr(o){let r=o.trim();if(!r)return null;/^[a-z][a-z0-9+.-]*:\/\//i.test(r)||(r=(r.includes("localhost")||r.includes("127.0.0.1")||r.includes("0.0.0.0")?"http://":"https://")+r);try{return new URL(r),r}catch{return null}}function ot(o,r=typeof window<"u"?window.location.origin:""){return o==="about:blank"||Xr(o,r)}function Xr(o,r=typeof window<"u"?window.location.origin:""){if(!o)return!1;try{const i=new URL(o);return qr.NAVIGATION_ALLOWED.includes(i.protocol)&&i.origin!==r}catch{return!1}}const er="__INTENT_PANEL_BRACKET__:",Nn=`
2
2
  (function() {
3
3
  if (window.__augmentKeyboardInterceptorInstalled) return;
4
4
  window.__augmentKeyboardInterceptorInstalled = true;
@@ -1,4 +1,4 @@
1
- import{I as le}from"./DwJJFAxY.js";import{p as he}from"./kWL2GjPN.js";import{Y as $e,b0 as fe,aZ as ge,U as ue,V as ye,a_ as xe,b as h,W as J,ay as w,aW as me,X as P,bh as pe,b4 as be,r as we,z as B,q as ke,O as ve,aM as Ce}from"./Dt_3gVf3.js";import{p as Ee}from"./D3v_P2Uq.js";var m={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Be=ve.gitGraph,S=h(()=>ke({...Be,...J().gitGraph}),"getConfig"),d=new le(()=>{const e=S(),r=e.mainBranchName,t=e.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:t}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function Y(){return Ce({length:7})}h(Y,"getID");function te(e,r){const t=Object.create(null);return e.reduce((s,o)=>{const i=r(o);return t[i]||(t[i]=!0,s.push(o)),s},[])}h(te,"uniqBy");var Te=h(function(e){d.records.direction=e},"setDirection"),Le=h(function(e){w.debug("options str",e),e=e?.trim(),e=e||"{}";try{d.records.options=JSON.parse(e)}catch(r){w.error("error while parsing gitGraph options",r.message)}},"setOptions"),Me=h(function(){return d.records.options},"getOptions"),Re=h(function(e){let r=e.msg,t=e.id;const s=e.type;let o=e.tags;w.info("commit",r,t,s,o),w.debug("Entering commit:",r,t,s,o);const i=S();t=B.sanitizeText(t,i),r=B.sanitizeText(r,i),o=o?.map(a=>B.sanitizeText(a,i));const n={id:t||d.records.seq+"-"+Y(),message:r,seq:d.records.seq++,type:s??m.NORMAL,tags:o??[],parents:d.records.head==null?[]:[d.records.head.id],branch:d.records.currBranch};d.records.head=n,w.info("main branch",i.mainBranchName),d.records.commits.has(n.id)&&w.warn(`Commit ID ${n.id} already exists`),d.records.commits.set(n.id,n),d.records.branches.set(d.records.currBranch,n.id),w.debug("in pushCommit "+n.id)},"commit"),Ie=h(function(e){let r=e.name;const t=e.order;if(r=B.sanitizeText(r,S()),d.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);d.records.branches.set(r,d.records.head!=null?d.records.head.id:null),d.records.branchConfig.set(r,{name:r,order:t}),ae(r),w.debug("in createBranch")},"branch"),Oe=h(e=>{let r=e.branch,t=e.id;const s=e.type,o=e.tags,i=S();r=B.sanitizeText(r,i),t&&(t=B.sanitizeText(t,i));const n=d.records.branches.get(d.records.currBranch),a=d.records.branches.get(r),l=n?d.records.commits.get(n):void 0,f=a?d.records.commits.get(a):void 0;if(l&&f&&l.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(d.records.currBranch===r){const c=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(l===void 0||!l){const c=new Error(`Incorrect usage of "merge". Current branch (${d.records.currBranch})has no commits`);throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},c}if(!d.records.branches.has(r)){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},c}if(f===void 0||!f){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},c}if(l===f){const c=new Error('Incorrect usage of "merge". Both branches have same head');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(t&&d.records.commits.has(t)){const c=new Error('Incorrect usage of "merge". Commit with id:'+t+" already exists, use different custom id");throw c.hash={text:`merge ${r} ${t} ${s} ${o?.join(" ")}`,token:`merge ${r} ${t} ${s} ${o?.join(" ")}`,expected:[`merge ${r} ${t}_UNIQUE ${s} ${o?.join(" ")}`]},c}const g=a||"",$={id:t||`${d.records.seq}-${Y()}`,message:`merged branch ${r} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,g],branch:d.records.currBranch,type:m.MERGE,customType:s,customId:!!t,tags:o??[]};d.records.head=$,d.records.commits.set($.id,$),d.records.branches.set(d.records.currBranch,$.id),w.debug(d.records.branches),w.debug("in mergeBranch")},"merge"),_e=h(function(e){let r=e.id,t=e.targetId,s=e.tags,o=e.parent;w.debug("Entering cherryPick:",r,t,s);const i=S();if(r=B.sanitizeText(r,i),t=B.sanitizeText(t,i),s=s?.map(l=>B.sanitizeText(l,i)),o=B.sanitizeText(o,i),!r||!d.records.commits.has(r)){const l=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw l.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},l}const n=d.records.commits.get(r);if(n===void 0||!n)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(o&&!(Array.isArray(n.parents)&&n.parents.includes(o)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const a=n.branch;if(n.type===m.MERGE&&!o)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!t||!d.records.commits.has(t)){if(a===d.records.currBranch){const $=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const l=d.records.branches.get(d.records.currBranch);if(l===void 0||!l){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const f=d.records.commits.get(l);if(f===void 0||!f){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const g={id:d.records.seq+"-"+Y(),message:`cherry-picked ${n?.message} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,n.id],branch:d.records.currBranch,type:m.CHERRY_PICK,tags:s?s.filter(Boolean):[`cherry-pick:${n.id}${n.type===m.MERGE?`|parent:${o}`:""}`]};d.records.head=g,d.records.commits.set(g.id,g),d.records.branches.set(d.records.currBranch,g.id),w.debug(d.records.branches),w.debug("in cherryPick")}},"cherryPick"),ae=h(function(e){if(e=B.sanitizeText(e,S()),d.records.branches.has(e)){d.records.currBranch=e;const r=d.records.branches.get(d.records.currBranch);r===void 0||!r?d.records.head=null:d.records.head=d.records.commits.get(r)??null}else{const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw r.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},r}},"checkout");function V(e,r,t){const s=e.indexOf(r);s===-1?e.push(t):e.splice(s,1,t)}h(V,"upsert");function Q(e){const r=e.reduce((o,i)=>o.seq>i.seq?o:i,e[0]);let t="";e.forEach(function(o){o===r?t+=" *":t+=" |"});const s=[t,r.id,r.seq];for(const o in d.records.branches)d.records.branches.get(o)===r.id&&s.push(o);if(w.debug(s.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){const o=d.records.commits.get(r.parents[0]);V(e,r,o),r.parents[1]&&e.push(d.records.commits.get(r.parents[1]))}else{if(r.parents.length==0)return;if(r.parents[0]){const o=d.records.commits.get(r.parents[0]);V(e,r,o)}}e=te(e,o=>o.id),Q(e)}h(Q,"prettyPrintCommitHistory");var Ge=h(function(){w.debug(d.records.commits);const e=ne()[0];Q([e])},"prettyPrint"),He=h(function(){d.reset(),we()},"clear"),Se=h(function(){return[...d.records.branchConfig.values()].map((r,t)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${t}`)}).sort((r,t)=>(r.order??0)-(t.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),Ae=h(function(){return d.records.branches},"getBranches"),We=h(function(){return d.records.commits},"getCommits"),ne=h(function(){const e=[...d.records.commits.values()];return e.forEach(function(r){w.debug(r.id)}),e.sort((r,t)=>r.seq-t.seq),e},"getCommitsArray"),De=h(function(){return d.records.currBranch},"getCurrentBranch"),qe=h(function(){return d.records.direction},"getDirection"),Pe=h(function(){return d.records.head},"getHead"),se={commitType:m,getConfig:S,setDirection:Te,setOptions:Le,getOptions:Me,commit:Re,branch:Ie,merge:Oe,cherryPick:_e,checkout:ae,prettyPrint:Ge,clear:He,getBranchesAsObjArray:Se,getBranches:Ae,getCommits:We,getCommitsArray:ne,getCurrentBranch:De,getDirection:qe,getHead:Pe,setAccTitle:xe,getAccTitle:ye,getAccDescription:ue,setAccDescription:ge,setDiagramTitle:fe,getDiagramTitle:$e},Ne=h((e,r)=>{he(e,r),e.dir&&r.setDirection(e.dir);for(const t of e.statements)Fe(t,r)},"populate"),Fe=h((e,r)=>{const s={Commit:h(o=>r.commit(ze(o)),"Commit"),Branch:h(o=>r.branch(Ye(o)),"Branch"),Merge:h(o=>r.merge(je(o)),"Merge"),Checkout:h(o=>r.checkout(Ue(o)),"Checkout"),CherryPicking:h(o=>r.cherryPick(Ke(o)),"CherryPicking")}[e.$type];s?s(e):w.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),ze=h(e=>({id:e.id,msg:e.message??"",type:e.type!==void 0?m[e.type]:m.NORMAL,tags:e.tags??void 0}),"parseCommit"),Ye=h(e=>({name:e.name,order:e.order??0}),"parseBranch"),je=h(e=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?m[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),Ue=h(e=>e.branch,"parseCheckout"),Ke=h(e=>({id:e.id,targetId:"",tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),"parseCherryPicking"),Ve={parse:h(async e=>{const r=await Ee("gitGraph",e);w.debug(r),Ne(r,se)},"parse")},O=10,_=40,L=4,R=2,G=8,j=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),X=12,Z=new Set(["redux-color","redux-dark-color"]),Xe=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),H=h((e,r,t=!1)=>t&&e>0?(e-1)%(r-1)+1:e%r,"calcColorIndex"),C=new Map,E=new Map,F=30,D=new Map,z=[],I=0,y="LR",Je=h(()=>{C.clear(),E.clear(),D.clear(),I=0,z=[],y="LR"},"clear"),oe=h(e=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e=="string"?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach(s=>{const o=document.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),o.setAttribute("dy","1em"),o.setAttribute("x","0"),o.setAttribute("class","row"),o.textContent=s.trim(),r.appendChild(o)}),r},"drawText"),ce=h(e=>{let r,t,s;return y==="BT"?(t=h((o,i)=>o<=i,"comparisonFunc"),s=1/0):(t=h((o,i)=>o>=i,"comparisonFunc"),s=0),e.forEach(o=>{const i=y==="TB"||y=="BT"?E.get(o)?.y:E.get(o)?.x;i!==void 0&&t(i,s)&&(r=o,s=i)}),r},"findClosestParent"),Qe=h(e=>{let r="",t=1/0;return e.forEach(s=>{const o=E.get(s).y;o<=t&&(r=s,t=o)}),r||void 0},"findClosestParentBT"),Ze=h((e,r,t)=>{let s=t,o=t;const i=[];e.forEach(n=>{const a=r.get(n);if(!a)throw new Error(`Commit not found for key ${n}`);a.parents.length?(s=rr(a),o=Math.max(s,o)):i.push(a),tr(a,s)}),s=o,i.forEach(n=>{ar(n,s,t)}),e.forEach(n=>{const a=r.get(n);if(a?.parents.length){const l=Qe(a.parents);s=E.get(l).y-_,s<=o&&(o=s);const f=C.get(a.branch).pos,g=s-O;E.set(a.id,{x:f,y:g})}})},"setParallelBTPos"),er=h(e=>{const r=ce(e.parents.filter(s=>s!==null));if(!r)throw new Error(`Closest parent not found for commit ${e.id}`);const t=E.get(r)?.y;if(t===void 0)throw new Error(`Closest parent position not found for commit ${e.id}`);return t},"findClosestParentPos"),rr=h(e=>er(e)+_,"calculateCommitPosition"),tr=h((e,r)=>{const t=C.get(e.branch);if(!t)throw new Error(`Branch not found for commit ${e.id}`);const s=t.pos,o=r+O;return E.set(e.id,{x:s,y:o}),{x:s,y:o}},"setCommitPosition"),ar=h((e,r,t)=>{const s=C.get(e.branch);if(!s)throw new Error(`Branch not found for commit ${e.id}`);const o=r+t,i=s.pos;E.set(e.id,{x:i,y:o})},"setRootPosition"),nr=h((e,r,t,s,o,i)=>{const{theme:n}=P(),a=j.has(n??""),l=Z.has(n??""),f=Xe.has(n??"");if(i===m.HIGHLIGHT)e.append("rect").attr("x",t.x-10+(a?3:0)).attr("y",t.y-10+(a?3:0)).attr("width",a?14:20).attr("height",a?14:20).attr("class",`commit ${r.id} commit-highlight${H(o,G,l)} ${s}-outer`),e.append("rect").attr("x",t.x-6+(a?2:0)).attr("y",t.y-6+(a?2:0)).attr("width",a?8:12).attr("height",a?8:12).attr("class",`commit ${r.id} commit${H(o,G,l)} ${s}-inner`);else if(i===m.CHERRY_PICK)e.append("circle").attr("cx",t.x).attr("cy",t.y).attr("r",a?7:10).attr("class",`commit ${r.id} ${s}`),e.append("circle").attr("cx",t.x-3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("circle").attr("cx",t.x+3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("line").attr("x1",t.x+3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("line").attr("x1",t.x-3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`);else{const g=e.append("circle");if(g.attr("cx",t.x),g.attr("cy",t.y),g.attr("r",a?7:10),g.attr("class",`commit ${r.id} commit${H(o,G,l)}`),i===m.MERGE){const $=e.append("circle");$.attr("cx",t.x),$.attr("cy",t.y),$.attr("r",a?5:6),$.attr("class",`commit ${s} ${r.id} commit${H(o,G,l)}`)}if(i===m.REVERSE){const $=e.append("path"),c=a?4:5;$.attr("d",`M ${t.x-c},${t.y-c}L${t.x+c},${t.y+c}M${t.x-c},${t.y+c}L${t.x+c},${t.y-c}`).attr("class",`commit ${s} ${r.id} commit${H(o,G,l)}`)}}},"drawCommitBullet"),sr=h((e,r,t,s,o)=>{if(r.type!==m.CHERRY_PICK&&(r.customId&&r.type===m.MERGE||r.type!==m.MERGE)&&o.showCommitLabel){const i=e.append("g"),n=i.insert("rect").attr("class","commit-label-bkg"),a=i.append("text").attr("x",s).attr("y",t.y+25).attr("class","commit-label").text(r.id),l=a.node()?.getBBox();if(l&&(n.attr("x",t.posWithOffset-l.width/2-R).attr("y",t.y+13.5).attr("width",l.width+2*R).attr("height",l.height+2*R),y==="TB"||y==="BT"?(n.attr("x",t.x-(l.width+4*L+5)).attr("y",t.y-12),a.attr("x",t.x-(l.width+4*L)).attr("y",t.y+l.height-12)):a.attr("x",t.posWithOffset-l.width/2),o.rotateCommitLabel))if(y==="TB"||y==="BT")a.attr("transform","rotate(-45, "+t.x+", "+t.y+")"),n.attr("transform","rotate(-45, "+t.x+", "+t.y+")");else{const f=-7.5-(l.width+10)/25*9.5,g=10+l.width/25*8.5;i.attr("transform","translate("+f+", "+g+") rotate(-45, "+s+", "+t.y+")")}}},"drawCommitLabel"),or=h((e,r,t,s)=>{if(r.tags.length>0){let o=0,i=0,n=0;const a=[];for(const l of r.tags.reverse()){const f=e.insert("polygon"),g=e.append("circle"),$=e.append("text").attr("y",t.y-16-o).attr("class","tag-label").text(l),c=$.node()?.getBBox();if(!c)throw new Error("Tag bbox not found");i=Math.max(i,c.width),n=Math.max(n,c.height),$.attr("x",t.posWithOffset-c.width/2),a.push({tag:$,hole:g,rect:f,yOffset:o}),o+=20}for(const{tag:l,hole:f,rect:g,yOffset:$}of a){const c=n/2,x=t.y-19.2-$;if(g.attr("class","tag-label-bkg").attr("points",`
1
+ import{I as le}from"./CramXAJ0.js";import{p as he}from"./oNlT93oA.js";import{Y as $e,b0 as fe,aZ as ge,U as ue,V as ye,a_ as xe,b as h,W as J,ay as w,aW as me,X as P,bh as pe,b4 as be,r as we,z as B,q as ke,O as ve,aM as Ce}from"./gWaxvgpv.js";import{p as Ee}from"./W2yoNJFv.js";var m={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Be=ve.gitGraph,S=h(()=>ke({...Be,...J().gitGraph}),"getConfig"),d=new le(()=>{const e=S(),r=e.mainBranchName,t=e.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:t}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function Y(){return Ce({length:7})}h(Y,"getID");function te(e,r){const t=Object.create(null);return e.reduce((s,o)=>{const i=r(o);return t[i]||(t[i]=!0,s.push(o)),s},[])}h(te,"uniqBy");var Te=h(function(e){d.records.direction=e},"setDirection"),Le=h(function(e){w.debug("options str",e),e=e?.trim(),e=e||"{}";try{d.records.options=JSON.parse(e)}catch(r){w.error("error while parsing gitGraph options",r.message)}},"setOptions"),Me=h(function(){return d.records.options},"getOptions"),Re=h(function(e){let r=e.msg,t=e.id;const s=e.type;let o=e.tags;w.info("commit",r,t,s,o),w.debug("Entering commit:",r,t,s,o);const i=S();t=B.sanitizeText(t,i),r=B.sanitizeText(r,i),o=o?.map(a=>B.sanitizeText(a,i));const n={id:t||d.records.seq+"-"+Y(),message:r,seq:d.records.seq++,type:s??m.NORMAL,tags:o??[],parents:d.records.head==null?[]:[d.records.head.id],branch:d.records.currBranch};d.records.head=n,w.info("main branch",i.mainBranchName),d.records.commits.has(n.id)&&w.warn(`Commit ID ${n.id} already exists`),d.records.commits.set(n.id,n),d.records.branches.set(d.records.currBranch,n.id),w.debug("in pushCommit "+n.id)},"commit"),Ie=h(function(e){let r=e.name;const t=e.order;if(r=B.sanitizeText(r,S()),d.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);d.records.branches.set(r,d.records.head!=null?d.records.head.id:null),d.records.branchConfig.set(r,{name:r,order:t}),ae(r),w.debug("in createBranch")},"branch"),Oe=h(e=>{let r=e.branch,t=e.id;const s=e.type,o=e.tags,i=S();r=B.sanitizeText(r,i),t&&(t=B.sanitizeText(t,i));const n=d.records.branches.get(d.records.currBranch),a=d.records.branches.get(r),l=n?d.records.commits.get(n):void 0,f=a?d.records.commits.get(a):void 0;if(l&&f&&l.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(d.records.currBranch===r){const c=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(l===void 0||!l){const c=new Error(`Incorrect usage of "merge". Current branch (${d.records.currBranch})has no commits`);throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},c}if(!d.records.branches.has(r)){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},c}if(f===void 0||!f){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},c}if(l===f){const c=new Error('Incorrect usage of "merge". Both branches have same head');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(t&&d.records.commits.has(t)){const c=new Error('Incorrect usage of "merge". Commit with id:'+t+" already exists, use different custom id");throw c.hash={text:`merge ${r} ${t} ${s} ${o?.join(" ")}`,token:`merge ${r} ${t} ${s} ${o?.join(" ")}`,expected:[`merge ${r} ${t}_UNIQUE ${s} ${o?.join(" ")}`]},c}const g=a||"",$={id:t||`${d.records.seq}-${Y()}`,message:`merged branch ${r} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,g],branch:d.records.currBranch,type:m.MERGE,customType:s,customId:!!t,tags:o??[]};d.records.head=$,d.records.commits.set($.id,$),d.records.branches.set(d.records.currBranch,$.id),w.debug(d.records.branches),w.debug("in mergeBranch")},"merge"),_e=h(function(e){let r=e.id,t=e.targetId,s=e.tags,o=e.parent;w.debug("Entering cherryPick:",r,t,s);const i=S();if(r=B.sanitizeText(r,i),t=B.sanitizeText(t,i),s=s?.map(l=>B.sanitizeText(l,i)),o=B.sanitizeText(o,i),!r||!d.records.commits.has(r)){const l=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw l.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},l}const n=d.records.commits.get(r);if(n===void 0||!n)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(o&&!(Array.isArray(n.parents)&&n.parents.includes(o)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const a=n.branch;if(n.type===m.MERGE&&!o)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!t||!d.records.commits.has(t)){if(a===d.records.currBranch){const $=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const l=d.records.branches.get(d.records.currBranch);if(l===void 0||!l){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const f=d.records.commits.get(l);if(f===void 0||!f){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const g={id:d.records.seq+"-"+Y(),message:`cherry-picked ${n?.message} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,n.id],branch:d.records.currBranch,type:m.CHERRY_PICK,tags:s?s.filter(Boolean):[`cherry-pick:${n.id}${n.type===m.MERGE?`|parent:${o}`:""}`]};d.records.head=g,d.records.commits.set(g.id,g),d.records.branches.set(d.records.currBranch,g.id),w.debug(d.records.branches),w.debug("in cherryPick")}},"cherryPick"),ae=h(function(e){if(e=B.sanitizeText(e,S()),d.records.branches.has(e)){d.records.currBranch=e;const r=d.records.branches.get(d.records.currBranch);r===void 0||!r?d.records.head=null:d.records.head=d.records.commits.get(r)??null}else{const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw r.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},r}},"checkout");function V(e,r,t){const s=e.indexOf(r);s===-1?e.push(t):e.splice(s,1,t)}h(V,"upsert");function Q(e){const r=e.reduce((o,i)=>o.seq>i.seq?o:i,e[0]);let t="";e.forEach(function(o){o===r?t+=" *":t+=" |"});const s=[t,r.id,r.seq];for(const o in d.records.branches)d.records.branches.get(o)===r.id&&s.push(o);if(w.debug(s.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){const o=d.records.commits.get(r.parents[0]);V(e,r,o),r.parents[1]&&e.push(d.records.commits.get(r.parents[1]))}else{if(r.parents.length==0)return;if(r.parents[0]){const o=d.records.commits.get(r.parents[0]);V(e,r,o)}}e=te(e,o=>o.id),Q(e)}h(Q,"prettyPrintCommitHistory");var Ge=h(function(){w.debug(d.records.commits);const e=ne()[0];Q([e])},"prettyPrint"),He=h(function(){d.reset(),we()},"clear"),Se=h(function(){return[...d.records.branchConfig.values()].map((r,t)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${t}`)}).sort((r,t)=>(r.order??0)-(t.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),Ae=h(function(){return d.records.branches},"getBranches"),We=h(function(){return d.records.commits},"getCommits"),ne=h(function(){const e=[...d.records.commits.values()];return e.forEach(function(r){w.debug(r.id)}),e.sort((r,t)=>r.seq-t.seq),e},"getCommitsArray"),De=h(function(){return d.records.currBranch},"getCurrentBranch"),qe=h(function(){return d.records.direction},"getDirection"),Pe=h(function(){return d.records.head},"getHead"),se={commitType:m,getConfig:S,setDirection:Te,setOptions:Le,getOptions:Me,commit:Re,branch:Ie,merge:Oe,cherryPick:_e,checkout:ae,prettyPrint:Ge,clear:He,getBranchesAsObjArray:Se,getBranches:Ae,getCommits:We,getCommitsArray:ne,getCurrentBranch:De,getDirection:qe,getHead:Pe,setAccTitle:xe,getAccTitle:ye,getAccDescription:ue,setAccDescription:ge,setDiagramTitle:fe,getDiagramTitle:$e},Ne=h((e,r)=>{he(e,r),e.dir&&r.setDirection(e.dir);for(const t of e.statements)Fe(t,r)},"populate"),Fe=h((e,r)=>{const s={Commit:h(o=>r.commit(ze(o)),"Commit"),Branch:h(o=>r.branch(Ye(o)),"Branch"),Merge:h(o=>r.merge(je(o)),"Merge"),Checkout:h(o=>r.checkout(Ue(o)),"Checkout"),CherryPicking:h(o=>r.cherryPick(Ke(o)),"CherryPicking")}[e.$type];s?s(e):w.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),ze=h(e=>({id:e.id,msg:e.message??"",type:e.type!==void 0?m[e.type]:m.NORMAL,tags:e.tags??void 0}),"parseCommit"),Ye=h(e=>({name:e.name,order:e.order??0}),"parseBranch"),je=h(e=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?m[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),Ue=h(e=>e.branch,"parseCheckout"),Ke=h(e=>({id:e.id,targetId:"",tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),"parseCherryPicking"),Ve={parse:h(async e=>{const r=await Ee("gitGraph",e);w.debug(r),Ne(r,se)},"parse")},O=10,_=40,L=4,R=2,G=8,j=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),X=12,Z=new Set(["redux-color","redux-dark-color"]),Xe=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),H=h((e,r,t=!1)=>t&&e>0?(e-1)%(r-1)+1:e%r,"calcColorIndex"),C=new Map,E=new Map,F=30,D=new Map,z=[],I=0,y="LR",Je=h(()=>{C.clear(),E.clear(),D.clear(),I=0,z=[],y="LR"},"clear"),oe=h(e=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e=="string"?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach(s=>{const o=document.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),o.setAttribute("dy","1em"),o.setAttribute("x","0"),o.setAttribute("class","row"),o.textContent=s.trim(),r.appendChild(o)}),r},"drawText"),ce=h(e=>{let r,t,s;return y==="BT"?(t=h((o,i)=>o<=i,"comparisonFunc"),s=1/0):(t=h((o,i)=>o>=i,"comparisonFunc"),s=0),e.forEach(o=>{const i=y==="TB"||y=="BT"?E.get(o)?.y:E.get(o)?.x;i!==void 0&&t(i,s)&&(r=o,s=i)}),r},"findClosestParent"),Qe=h(e=>{let r="",t=1/0;return e.forEach(s=>{const o=E.get(s).y;o<=t&&(r=s,t=o)}),r||void 0},"findClosestParentBT"),Ze=h((e,r,t)=>{let s=t,o=t;const i=[];e.forEach(n=>{const a=r.get(n);if(!a)throw new Error(`Commit not found for key ${n}`);a.parents.length?(s=rr(a),o=Math.max(s,o)):i.push(a),tr(a,s)}),s=o,i.forEach(n=>{ar(n,s,t)}),e.forEach(n=>{const a=r.get(n);if(a?.parents.length){const l=Qe(a.parents);s=E.get(l).y-_,s<=o&&(o=s);const f=C.get(a.branch).pos,g=s-O;E.set(a.id,{x:f,y:g})}})},"setParallelBTPos"),er=h(e=>{const r=ce(e.parents.filter(s=>s!==null));if(!r)throw new Error(`Closest parent not found for commit ${e.id}`);const t=E.get(r)?.y;if(t===void 0)throw new Error(`Closest parent position not found for commit ${e.id}`);return t},"findClosestParentPos"),rr=h(e=>er(e)+_,"calculateCommitPosition"),tr=h((e,r)=>{const t=C.get(e.branch);if(!t)throw new Error(`Branch not found for commit ${e.id}`);const s=t.pos,o=r+O;return E.set(e.id,{x:s,y:o}),{x:s,y:o}},"setCommitPosition"),ar=h((e,r,t)=>{const s=C.get(e.branch);if(!s)throw new Error(`Branch not found for commit ${e.id}`);const o=r+t,i=s.pos;E.set(e.id,{x:i,y:o})},"setRootPosition"),nr=h((e,r,t,s,o,i)=>{const{theme:n}=P(),a=j.has(n??""),l=Z.has(n??""),f=Xe.has(n??"");if(i===m.HIGHLIGHT)e.append("rect").attr("x",t.x-10+(a?3:0)).attr("y",t.y-10+(a?3:0)).attr("width",a?14:20).attr("height",a?14:20).attr("class",`commit ${r.id} commit-highlight${H(o,G,l)} ${s}-outer`),e.append("rect").attr("x",t.x-6+(a?2:0)).attr("y",t.y-6+(a?2:0)).attr("width",a?8:12).attr("height",a?8:12).attr("class",`commit ${r.id} commit${H(o,G,l)} ${s}-inner`);else if(i===m.CHERRY_PICK)e.append("circle").attr("cx",t.x).attr("cy",t.y).attr("r",a?7:10).attr("class",`commit ${r.id} ${s}`),e.append("circle").attr("cx",t.x-3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("circle").attr("cx",t.x+3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("line").attr("x1",t.x+3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("line").attr("x1",t.x-3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`);else{const g=e.append("circle");if(g.attr("cx",t.x),g.attr("cy",t.y),g.attr("r",a?7:10),g.attr("class",`commit ${r.id} commit${H(o,G,l)}`),i===m.MERGE){const $=e.append("circle");$.attr("cx",t.x),$.attr("cy",t.y),$.attr("r",a?5:6),$.attr("class",`commit ${s} ${r.id} commit${H(o,G,l)}`)}if(i===m.REVERSE){const $=e.append("path"),c=a?4:5;$.attr("d",`M ${t.x-c},${t.y-c}L${t.x+c},${t.y+c}M${t.x-c},${t.y+c}L${t.x+c},${t.y-c}`).attr("class",`commit ${s} ${r.id} commit${H(o,G,l)}`)}}},"drawCommitBullet"),sr=h((e,r,t,s,o)=>{if(r.type!==m.CHERRY_PICK&&(r.customId&&r.type===m.MERGE||r.type!==m.MERGE)&&o.showCommitLabel){const i=e.append("g"),n=i.insert("rect").attr("class","commit-label-bkg"),a=i.append("text").attr("x",s).attr("y",t.y+25).attr("class","commit-label").text(r.id),l=a.node()?.getBBox();if(l&&(n.attr("x",t.posWithOffset-l.width/2-R).attr("y",t.y+13.5).attr("width",l.width+2*R).attr("height",l.height+2*R),y==="TB"||y==="BT"?(n.attr("x",t.x-(l.width+4*L+5)).attr("y",t.y-12),a.attr("x",t.x-(l.width+4*L)).attr("y",t.y+l.height-12)):a.attr("x",t.posWithOffset-l.width/2),o.rotateCommitLabel))if(y==="TB"||y==="BT")a.attr("transform","rotate(-45, "+t.x+", "+t.y+")"),n.attr("transform","rotate(-45, "+t.x+", "+t.y+")");else{const f=-7.5-(l.width+10)/25*9.5,g=10+l.width/25*8.5;i.attr("transform","translate("+f+", "+g+") rotate(-45, "+s+", "+t.y+")")}}},"drawCommitLabel"),or=h((e,r,t,s)=>{if(r.tags.length>0){let o=0,i=0,n=0;const a=[];for(const l of r.tags.reverse()){const f=e.insert("polygon"),g=e.append("circle"),$=e.append("text").attr("y",t.y-16-o).attr("class","tag-label").text(l),c=$.node()?.getBBox();if(!c)throw new Error("Tag bbox not found");i=Math.max(i,c.width),n=Math.max(n,c.height),$.attr("x",t.posWithOffset-c.width/2),a.push({tag:$,hole:g,rect:f,yOffset:o}),o+=20}for(const{tag:l,hole:f,rect:g,yOffset:$}of a){const c=n/2,x=t.y-19.2-$;if(g.attr("class","tag-label-bkg").attr("points",`
2
2
  ${s-i/2-L/2},${x+R}
3
3
  ${s-i/2-L/2},${x-R}
4
4
  ${t.posWithOffset-i/2-L},${x-c-R}
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/DKPFCCGK.js","/app/immutable/chunks/CK2a86W3.js","/app/immutable/chunks/ggQuSgBM.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/DGQ1ECsI.js","/app/immutable/chunks/DYhIMPy1.js","/app/immutable/chunks/B-DRVFcy.js","/app/immutable/chunks/Bp_k45o-.js","/app/immutable/chunks/ChmnWquS.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/CxF8YFum.js","/app/immutable/chunks/BaIAhI85.js","/app/immutable/chunks/D3HUOTfX.js","/app/immutable/chunks/DZ-cwX5R.js","/app/immutable/chunks/32pNLDLJ.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/CJeZnjZ2.js","/app/immutable/chunks/B99vgEcA.js","/app/immutable/chunks/DNZhZg57.js","/app/immutable/chunks/B_7vJcZK.js","/app/immutable/chunks/BSSsvY4I.js","/app/immutable/chunks/WFvSJ9zU.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/D897Deqj.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/DfxQWSVU.js","/app/immutable/chunks/Cjw1QvKa.js","/app/immutable/chunks/BWYr8u9e.js","/app/immutable/chunks/XJv96NUg.js","/app/immutable/assets/notify.BeL_JB6L.css","/app/immutable/chunks/fE-kcmYj.js","/app/immutable/chunks/2yJgo8xz.js","/app/immutable/chunks/C7uOzB-k.js"])))=>i.map(i=>d[i]);
2
- var Nh=Object.defineProperty;var zh=(t,e,i)=>e in t?Nh(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i;var P=(t,e,i)=>zh(t,typeof e!="symbol"?e+"":e,i);import{cd as Wh}from"./DYhIMPy1.js";import{bo as Fs,_ as Bn}from"./DGQ1ECsI.js";import{a as ji}from"./BdWqymET.js";import{i as Ns}from"./D_Kq1QRo.js";import{d as Hh}from"./DldD9pcf.js";import{t as Uh}from"./D3wOVtz4.js";import{d as Ui}from"./B0Z-1lwJ.js";import{c as Kh}from"./ChTqQfQN.js";import{H as qh}from"./DZ-cwX5R.js";import{Iv as _t,Jy as An,go as Vh,aT as Gh,BJ as Yh,zX as Xh,rG as jh}from"./BSSsvY4I.js";import{N as Pn,S as On,H as In,B as $n}from"./ggQuSgBM.js";import{g as Zh}from"./CBTiE17j.js";import{f as Jh,l as Qh}from"./xCXPOQKs.js";/**
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/BrR0973A.js","/app/immutable/chunks/ClkbPGx9.js","/app/immutable/chunks/ggQuSgBM.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/41c-5lbJ.js","/app/immutable/chunks/DYhIMPy1.js","/app/immutable/chunks/ClgmQqA9.js","/app/immutable/chunks/BBCbq-hE.js","/app/immutable/chunks/BhX-5zd9.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/nLyQInj7.js","/app/immutable/chunks/BaIAhI85.js","/app/immutable/chunks/CEufllny.js","/app/immutable/chunks/De70D2Lx.js","/app/immutable/chunks/D9XKGcAY.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/Dv-TQImR.js","/app/immutable/chunks/D9WrXbf9.js","/app/immutable/chunks/-o555Jq8.js","/app/immutable/chunks/CdXmpyDy.js","/app/immutable/chunks/BuDJvkTk.js","/app/immutable/chunks/WFvSJ9zU.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/BDbt9cuZ.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/DfxQWSVU.js","/app/immutable/chunks/AOUBMpYk.js","/app/immutable/chunks/BWYr8u9e.js","/app/immutable/chunks/XJv96NUg.js","/app/immutable/assets/notify.BeL_JB6L.css","/app/immutable/chunks/C1ha510g.js","/app/immutable/chunks/CYyISHjN.js","/app/immutable/chunks/C4qlKK6F.js"])))=>i.map(i=>d[i]);
2
+ var Nh=Object.defineProperty;var zh=(t,e,i)=>e in t?Nh(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i;var P=(t,e,i)=>zh(t,typeof e!="symbol"?e+"":e,i);import{cd as Wh}from"./DYhIMPy1.js";import{bo as Fs,_ as Bn}from"./41c-5lbJ.js";import{a as ji}from"./BdWqymET.js";import{i as Ns}from"./D_Kq1QRo.js";import{d as Hh}from"./b8GoMhSt.js";import{t as Uh}from"./DjE6Tn4o.js";import{d as Ui}from"./B0Z-1lwJ.js";import{c as Kh}from"./ChTqQfQN.js";import{H as qh}from"./De70D2Lx.js";import{Iv as _t,Jy as An,go as Vh,aT as Gh,BJ as Yh,zX as Xh,rG as jh}from"./BuDJvkTk.js";import{N as Pn,S as On,H as In,B as $n}from"./ggQuSgBM.js";import{g as Zh}from"./CYlvyU3U.js";import{f as Jh,l as Qh}from"./pA6KCKbP.js";/**
3
3
  * Copyright (c) 2014-2024 The xterm.js authors. All rights reserved.
4
4
  * @license MIT
5
5
  *
@@ -141,6 +141,6 @@ void main() {
141
141
  `))}},uf=class extends Error{constructor(t,e){super(t),this.name="ListenerLeakError",this.stack=e}},_f=class extends Error{constructor(t,e){super(t),this.name="ListenerRefusalError",this.stack=e}},ff=0,ur=class{constructor(t){this.value=t,this.id=ff++}},gf=2,pf,ut=class{constructor(t){this._size=0,this._options=t,this._leakageMon=this._options?.leakWarningThreshold?new cf(t?.onListenerError??dr,this._options?.leakWarningThreshold??lf):void 0,this._perfMon=this._options?._profName?new hf(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){this._disposed||(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners&&(this._listeners=void 0,this._size=0),this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose())}get event(){return this._event??=(t,e,i)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){let o=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(o);let a=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],l=new _f(`${o}. HINT: Stack shows most frequent listener (${a[1]}-times)`,a[0]);return(this._options?.onListenerError||dr)(l),qt.None}if(this._disposed)return qt.None;e&&(t=t.bind(e));let s=new ur(t),r;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(s.stack=df.create(),r=this._leakageMon.check(s.stack,this._size+1)),this._listeners?this._listeners instanceof ur?(this._deliveryQueue??=new mf,this._listeners=[this._listeners,s]):this._listeners.push(s):(this._options?.onWillAddFirstListener?.(this),this._listeners=s,this._options?.onDidAddFirstListener?.(this)),this._size++;let n=yi(()=>{r?.(),this._removeListener(s)});return i instanceof kn?i.add(n):Array.isArray(i)&&i.push(n),n},this._event}_removeListener(t){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}let e=this._listeners,i=e.indexOf(t);if(i===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,e[i]=void 0;let s=this._deliveryQueue.current===this;if(this._size*gf<=e.length){let r=0;for(let n=0;n<e.length;n++)e[n]?e[r++]=e[n]:s&&(this._deliveryQueue.end--,r<this._deliveryQueue.i&&this._deliveryQueue.i--);e.length=r}}_deliver(t,e){if(!t)return;let i=this._options?.onListenerError||dr;if(!i){t.value(e);return}try{t.value(e)}catch(s){i(s)}}_deliverQueue(t){let e=t.current._listeners;for(;t.i<t.end;)this._deliver(e[t.i++],t.value);t.reset()}fire(t){if(this._deliveryQueue?.current&&(this._deliverQueue(this._deliveryQueue),this._perfMon?.stop()),this._perfMon?.start(this._size),this._listeners)if(this._listeners instanceof ur)this._deliver(this._listeners,t);else{let e=this._deliveryQueue;e.enqueue(this,t,this._listeners.length),this._deliverQueue(e)}this._perfMon?.stop()}hasListeners(){return this._size>0}},mf=class{constructor(){this.i=-1,this.end=0}enqueue(t,e,i){this.i=0,this.end=i,this.current=t,this.value=e}reset(){this.i=this.end,this.current=void 0,this.value=void 0}},Oh=Object.freeze(function(t,e){let i=setTimeout(t.bind(e),0);return{dispose(){clearTimeout(i)}}}),vf;(t=>{function e(i){return i===t.None||i===t.Cancelled||i instanceof Sf?!0:!i||typeof i!="object"?!1:typeof i.isCancellationRequested=="boolean"&&typeof i.onCancellationRequested=="function"}t.isCancellationToken=e,t.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:En.None}),t.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:Oh})})(vf||={});var Sf=class{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?Oh:(this._emitter||(this._emitter=new ut),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}},mi="en",_r=!1,ds,Cs=mi,aa=mi,wf,Lt,ni=globalThis,Ge;typeof ni.vscode<"u"&&typeof ni.vscode.process<"u"?Ge=ni.vscode.process:typeof process<"u"&&typeof process?.versions?.node=="string"&&(Ge=process);var bf=typeof Ge?.versions?.electron=="string",Cf=bf&&Ge?.type==="renderer";if(typeof Ge=="object"){Ge.platform,Ge.platform,_r=Ge.platform==="linux",_r&&Ge.env.SNAP&&Ge.env.SNAP_REVISION,Ge.env.CI||Ge.env.BUILD_ARTIFACTSTAGINGDIRECTORY,ds=mi,Cs=mi;let t=Ge.env.VSCODE_NLS_CONFIG;if(t)try{let e=JSON.parse(t);ds=e.userLocale,aa=e.osLocale,Cs=e.resolvedLanguage||mi,wf=e.languagePack?.translationsConfigFile}catch{}}else typeof navigator=="object"&&!Cf?(Lt=navigator.userAgent,Lt.indexOf("Windows")>=0,Lt.indexOf("Macintosh")>=0,(Lt.indexOf("Macintosh")>=0||Lt.indexOf("iPad")>=0||Lt.indexOf("iPhone")>=0)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>0,_r=Lt.indexOf("Linux")>=0,Lt?.indexOf("Mobi")>=0,Cs=globalThis._VSCODE_NLS_LANGUAGE||mi,ds=navigator.language.toLowerCase(),aa=ds):console.error("Unable to resolve platform.");var vt=Lt,$t=Cs,yf;(t=>{function e(){return $t}t.value=e;function i(){return $t.length===2?$t==="en":$t.length>=3?$t[0]==="e"&&$t[1]==="n"&&$t[2]==="-":!1}t.isDefaultVariant=i;function s(){return $t==="en"}t.isDefault=s})(yf||={});var xf=typeof ni.postMessage=="function"&&!ni.importScripts;(()=>{if(xf){let t=[];ni.addEventListener("message",i=>{if(i.data&&i.data.vscodeScheduleAsyncWork)for(let s=0,r=t.length;s<r;s++){let n=t[s];if(n.id===i.data.vscodeScheduleAsyncWork){t.splice(s,1),n.callback();return}}});let e=0;return i=>{let s=++e;t.push({id:s,callback:i}),ni.postMessage({vscodeScheduleAsyncWork:s},"*")}}return t=>setTimeout(t)})();var kf=!!(vt&&vt.indexOf("Chrome")>=0);vt&&vt.indexOf("Firefox")>=0;!kf&&vt&&vt.indexOf("Safari")>=0;vt&&vt.indexOf("Edg/")>=0;vt&&vt.indexOf("Android")>=0;function Ih(t,e=0,i){let s=setTimeout(()=>{t()},e);return yi(()=>{clearTimeout(s)})}var Ef;(t=>{async function e(s){let r,n=await Promise.all(s.map(o=>o.then(a=>a,a=>{r||(r=a)})));if(typeof r<"u")throw r;return n}t.settled=e;function i(s){return new Promise(async(r,n)=>{try{await s(r,n)}catch(o){n(o)}})}t.withAsyncBody=i})(Ef||={});var ha=class Qe{static fromArray(e){return new Qe(i=>{i.emitMany(e)})}static fromPromise(e){return new Qe(async i=>{i.emitMany(await e)})}static fromPromises(e){return new Qe(async i=>{await Promise.all(e.map(async s=>i.emitOne(await s)))})}static merge(e){return new Qe(async i=>{await Promise.all(e.map(async s=>{for await(let r of s)i.emitOne(r)}))})}constructor(e,i){this._state=0,this._results=[],this._error=null,this._onReturn=i,this._onStateChanged=new ut,queueMicrotask(async()=>{let s={emitOne:r=>this.emitOne(r),emitMany:r=>this.emitMany(r),reject:r=>this.reject(r)};try{await Promise.resolve(e(s)),this.resolve()}catch(r){this.reject(r)}finally{s.emitOne=void 0,s.emitMany=void 0,s.reject=void 0}})}[Symbol.asyncIterator](){let e=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(e<this._results.length)return{done:!1,value:this._results[e++]};if(this._state===1)return{done:!0,value:void 0};await En.toPromise(this._onStateChanged.event)}while(!0)},return:async()=>(this._onReturn?.(),{done:!0,value:void 0})}}static map(e,i){return new Qe(async s=>{for await(let r of e)s.emitOne(i(r))})}map(e){return Qe.map(this,e)}static filter(e,i){return new Qe(async s=>{for await(let r of e)i(r)&&s.emitOne(r)})}filter(e){return Qe.filter(this,e)}static coalesce(e){return Qe.filter(e,i=>!!i)}coalesce(){return Qe.coalesce(this)}static async toPromise(e){let i=[];for await(let s of e)i.push(s);return i}toPromise(){return Qe.toPromise(this)}emitOne(e){this._state===0&&(this._results.push(e),this._onStateChanged.fire())}emitMany(e){this._state===0&&(this._results=this._results.concat(e),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(e){this._state===0&&(this._state=2,this._error=e,this._onStateChanged.fire())}};ha.EMPTY=ha.fromArray([]);var Lf=class extends qt{constructor(t){super(),this._terminal=t,this._linesCacheTimeout=this._register(new Rs),this._linesCacheDisposables=this._register(new Rs),this._register(yi(()=>this._destroyLinesCache()))}initLinesCache(){this._linesCache||(this._linesCache=new Array(this._terminal.buffer.active.length),this._linesCacheDisposables.value=Mh(this._terminal.onLineFeed(()=>this._destroyLinesCache()),this._terminal.onCursorMove(()=>this._destroyLinesCache()),this._terminal.onResize(()=>this._destroyLinesCache()))),this._linesCacheTimeout.value=Ih(()=>this._destroyLinesCache(),15e3)}_destroyLinesCache(){this._linesCache=void 0,this._linesCacheDisposables.clear(),this._linesCacheTimeout.clear()}getLineFromCache(t){return this._linesCache?.[t]}setLineInCache(t,e){this._linesCache&&(this._linesCache[t]=e)}translateBufferLineToStringWithWrap(t,e){let i=[],s=[0],r=this._terminal.buffer.active.getLine(t);for(;r;){let n=this._terminal.buffer.active.getLine(t+1),o=n?n.isWrapped:!1,a=r.translateToString(!o&&e);if(o&&n){let l=r.getCell(r.length-1);l&&l.getCode()===0&&l.getWidth()===1&&n.getCell(0)?.getWidth()===2&&(a=a.slice(0,-1))}if(i.push(a),o)s.push(s[s.length-1]+a.length);else break;t++,r=n}return[i.join(""),s]}},Mf=class{get cachedSearchTerm(){return this._cachedSearchTerm}set cachedSearchTerm(t){this._cachedSearchTerm=t}get lastSearchOptions(){return this._lastSearchOptions}set lastSearchOptions(t){this._lastSearchOptions=t}isValidSearchTerm(t){return!!(t&&t.length>0)}didOptionsChange(t){return this._lastSearchOptions?t?this._lastSearchOptions.caseSensitive!==t.caseSensitive||this._lastSearchOptions.regex!==t.regex||this._lastSearchOptions.wholeWord!==t.wholeWord:!1:!0}shouldUpdateHighlighting(t,e){return e?.decorations?this._cachedSearchTerm===void 0||t!==this._cachedSearchTerm||this.didOptionsChange(e):!1}clearCachedTerm(){this._cachedSearchTerm=void 0}reset(){this._cachedSearchTerm=void 0,this._lastSearchOptions=void 0}},Tf=class{constructor(t,e){this._terminal=t,this._lineCache=e}find(t,e,i,s){if(!t||t.length===0){this._terminal.clearSelection();return}if(i>this._terminal.cols)throw new Error(`Invalid col: ${i} to search in terminal of ${this._terminal.cols} cols`);this._lineCache.initLinesCache();let r={startRow:e,startCol:i},n=this._findInLine(t,r,s);if(!n)for(let o=e+1;o<this._terminal.buffer.active.baseY+this._terminal.rows&&(r.startRow=o,r.startCol=0,n=this._findInLine(t,r,s),!n);o++);return n}findNextWithSelection(t,e,i){if(!t||t.length===0){this._terminal.clearSelection();return}let s=this._terminal.getSelectionPosition();this._terminal.clearSelection();let r=0,n=0;s&&(i===t?(r=s.end.x,n=s.end.y):(r=s.start.x,n=s.start.y)),this._lineCache.initLinesCache();let o={startRow:n,startCol:r},a=this._findInLine(t,o,e);if(!a)for(let l=n+1;l<this._terminal.buffer.active.baseY+this._terminal.rows&&(o.startRow=l,o.startCol=0,a=this._findInLine(t,o,e),!a);l++);if(!a&&n!==0)for(let l=0;l<n&&(o.startRow=l,o.startCol=0,a=this._findInLine(t,o,e),!a);l++);return!a&&s&&(o.startRow=s.start.y,o.startCol=0,a=this._findInLine(t,o,e)),a}findPreviousWithSelection(t,e,i){if(!t||t.length===0){this._terminal.clearSelection();return}let s=this._terminal.getSelectionPosition();this._terminal.clearSelection();let r=this._terminal.buffer.active.baseY+this._terminal.rows-1,n=this._terminal.cols,o=!0;this._lineCache.initLinesCache();let a={startRow:r,startCol:n},l;if(s&&(a.startRow=r=s.start.y,a.startCol=n=s.start.x,i!==t&&(l=this._findInLine(t,a,e,!1),l||(a.startRow=r=s.end.y,a.startCol=n=s.end.x))),l||(l=this._findInLine(t,a,e,o)),!l){a.startCol=Math.max(a.startCol,this._terminal.cols);for(let h=r-1;h>=0&&(a.startRow=h,l=this._findInLine(t,a,e,o),!l);h--);}if(!l&&r!==this._terminal.buffer.active.baseY+this._terminal.rows-1)for(let h=this._terminal.buffer.active.baseY+this._terminal.rows-1;h>=r&&(a.startRow=h,l=this._findInLine(t,a,e,o),!l);h--);return l}_isWholeWord(t,e,i){return(t===0||" ~!@#$%^&*()+`-=[]{}|\\;:\"',./<>?".includes(e[t-1]))&&(t+i.length===e.length||" ~!@#$%^&*()+`-=[]{}|\\;:\"',./<>?".includes(e[t+i.length]))}_findInLine(t,e,i={},s=!1){let r=e.startRow,n=e.startCol;if(this._terminal.buffer.active.getLine(r)?.isWrapped){if(s){e.startCol+=this._terminal.cols;return}return e.startRow--,e.startCol+=this._terminal.cols,this._findInLine(t,e,i)}let o=this._lineCache.getLineFromCache(r);o||(o=this._lineCache.translateBufferLineToStringWithWrap(r,!0),this._lineCache.setLineInCache(r,o));let[a,l]=o,h=this._bufferColsToStringOffset(r,n),c=t,d=a;i.regex||(c=i.caseSensitive?t:t.toLowerCase(),d=i.caseSensitive?a:a.toLowerCase());let u=-1;if(i.regex){let f=RegExp(c,i.caseSensitive?"g":"gi"),g;if(s)for(;g=f.exec(d.slice(0,h));)u=f.lastIndex-g[0].length,t=g[0],f.lastIndex-=t.length-1;else g=f.exec(d.slice(h)),g&&g[0].length>0&&(u=h+(f.lastIndex-g[0].length),t=g[0])}else s?h-c.length>=0&&(u=d.lastIndexOf(c,h-c.length)):u=d.indexOf(c,h);if(u>=0){if(i.wholeWord&&!this._isWholeWord(u,d,t))return;let f=0;for(;f<l.length-1&&u>=l[f+1];)f++;let g=f;for(;g<l.length-1&&u+t.length>=l[g+1];)g++;let C=u-l[f],E=u+t.length-l[g],D=this._stringLengthToBufferSize(r+f,C),B=this._stringLengthToBufferSize(r+g,E)-D+this._terminal.cols*(g-f);return{term:t,col:D,row:r+f,size:B}}}_stringLengthToBufferSize(t,e){let i=this._terminal.buffer.active.getLine(t);if(!i)return 0;for(let s=0;s<e;s++){let r=i.getCell(s);if(!r)break;let n=r.getChars();n.length>1&&(e-=n.length-1);let o=i.getCell(s+1);o&&o.getWidth()===0&&e++}return e}_bufferColsToStringOffset(t,e){let i=t,s=0,r=this._terminal.buffer.active.getLine(i);for(;e>0&&r;){for(let n=0;n<e&&n<this._terminal.cols;n++){let o=r.getCell(n);if(!o)break;o.getWidth()&&(s+=o.getCode()===0?1:o.getChars().length)}if(i++,r=this._terminal.buffer.active.getLine(i),r&&!r.isWrapped)break;e-=this._terminal.cols}return s}},Rf=class extends qt{constructor(t){super(),this._terminal=t,this._highlightDecorations=[],this._highlightedLines=new Set,this._register(yi(()=>this.clearHighlightDecorations()))}createHighlightDecorations(t,e){this.clearHighlightDecorations();for(let i of t){let s=this._createResultDecorations(i,e,!1);if(s)for(let r of s)this._storeDecoration(r,i)}}createActiveDecoration(t,e){let i=this._createResultDecorations(t,e,!0);if(i)return{decorations:i,match:t,dispose(){qi(i)}}}clearHighlightDecorations(){qi(this._highlightDecorations),this._highlightDecorations=[],this._highlightedLines.clear()}_storeDecoration(t,e){this._highlightedLines.add(t.marker.line),this._highlightDecorations.push({decoration:t,match:e,dispose(){t.dispose()}})}_applyStyles(t,e,i){t.classList.contains("xterm-find-result-decoration")||(t.classList.add("xterm-find-result-decoration"),e&&(t.style.outline=`1px solid ${e}`)),i&&t.classList.add("xterm-find-active-result-decoration")}_createResultDecorations(t,e,i){let s=[],r=t.col,n=t.size,o=-this._terminal.buffer.active.baseY-this._terminal.buffer.active.cursorY+t.row;for(;n>0;){let l=Math.min(this._terminal.cols-r,n);s.push([o,r,l]),r=0,n-=l,o++}let a=[];for(let l of s){let h=this._terminal.registerMarker(l[0]),c=this._terminal.registerDecoration({marker:h,x:l[1],width:l[2],backgroundColor:i?e.activeMatchBackground:e.matchBackground,overviewRulerOptions:this._highlightedLines.has(h.line)?void 0:{color:i?e.activeMatchColorOverviewRuler:e.matchOverviewRuler,position:"center"}});if(c){let d=[];d.push(h),d.push(c.onRender(u=>this._applyStyles(u,i?e.activeMatchBorder:e.matchBorder,!1))),d.push(c.onDispose(()=>qi(d))),a.push(c)}}return a.length===0?void 0:a}},Df=class extends qt{constructor(){super(...arguments),this._searchResults=[],this._onDidChangeResults=this._register(new ut)}get onDidChangeResults(){return this._onDidChangeResults.event}get searchResults(){return this._searchResults}get selectedDecoration(){return this._selectedDecoration}set selectedDecoration(t){this._selectedDecoration=t}updateResults(t,e){this._searchResults=t.slice(0,e)}clearResults(){this._searchResults=[]}clearSelectedDecoration(){this._selectedDecoration&&(this._selectedDecoration.dispose(),this._selectedDecoration=void 0)}findResultIndex(t){for(let e=0;e<this._searchResults.length;e++){let i=this._searchResults[e];if(i.row===t.row&&i.col===t.col&&i.size===t.size)return e}return-1}fireResultsChanged(t){if(!t)return;let e=-1;this._selectedDecoration&&(e=this.findResultIndex(this._selectedDecoration.match)),this._onDidChangeResults.fire({resultIndex:e,resultCount:this._searchResults.length})}reset(){this.clearSelectedDecoration(),this.clearResults()}},Bf=class extends qt{constructor(t){super(),this._highlightTimeout=this._register(new Rs),this._lineCache=this._register(new Rs),this._state=new Mf,this._resultTracker=this._register(new Df),this._highlightLimit=t?.highlightLimit??1e3}get onDidChangeResults(){return this._resultTracker.onDidChangeResults}activate(t){this._terminal=t,this._lineCache.value=new Lf(t),this._engine=new Tf(t,this._lineCache.value),this._decorationManager=new Rf(t),this._register(this._terminal.onWriteParsed(()=>this._updateMatches())),this._register(this._terminal.onResize(()=>this._updateMatches())),this._register(yi(()=>this.clearDecorations()))}_updateMatches(){this._highlightTimeout.clear(),this._state.cachedSearchTerm&&this._state.lastSearchOptions?.decorations&&(this._highlightTimeout.value=Ih(()=>{let t=this._state.cachedSearchTerm;this._state.clearCachedTerm(),this.findPrevious(t,{...this._state.lastSearchOptions,incremental:!0},{noScroll:!0})},200))}clearDecorations(t){this._resultTracker.clearSelectedDecoration(),this._decorationManager?.clearHighlightDecorations(),this._resultTracker.clearResults(),t||this._state.clearCachedTerm()}clearActiveDecoration(){this._resultTracker.clearSelectedDecoration()}findNext(t,e,i){if(!this._terminal||!this._engine)throw new Error("Cannot use addon until it has been loaded");this._state.lastSearchOptions=e,this._state.shouldUpdateHighlighting(t,e)&&this._highlightAllMatches(t,e);let s=this._findNextAndSelect(t,e,i);return this._fireResults(e),this._state.cachedSearchTerm=t,s}_highlightAllMatches(t,e){if(!this._terminal||!this._engine||!this._decorationManager)throw new Error("Cannot use addon until it has been loaded");if(!this._state.isValidSearchTerm(t)){this.clearDecorations();return}this.clearDecorations(!0);let i=[],s,r=this._engine.find(t,0,0,e);for(;r&&(s?.row!==r.row||s?.col!==r.col)&&!(i.length>=this._highlightLimit);)s=r,i.push(s),r=this._engine.find(t,s.col+s.term.length>=this._terminal.cols?s.row+1:s.row,s.col+s.term.length>=this._terminal.cols?0:s.col+1,e);this._resultTracker.updateResults(i,this._highlightLimit),e.decorations&&this._decorationManager.createHighlightDecorations(i,e.decorations)}_findNextAndSelect(t,e,i){if(!this._terminal||!this._engine)return!1;if(!this._state.isValidSearchTerm(t))return this._terminal.clearSelection(),this.clearDecorations(),!1;let s=this._engine.findNextWithSelection(t,e,this._state.cachedSearchTerm);return this._selectResult(s,e?.decorations,i?.noScroll)}findPrevious(t,e,i){if(!this._terminal||!this._engine)throw new Error("Cannot use addon until it has been loaded");this._state.lastSearchOptions=e,this._state.shouldUpdateHighlighting(t,e)&&this._highlightAllMatches(t,e);let s=this._findPreviousAndSelect(t,e,i);return this._fireResults(e),this._state.cachedSearchTerm=t,s}_fireResults(t){this._resultTracker.fireResultsChanged(!!t?.decorations)}_findPreviousAndSelect(t,e,i){if(!this._terminal||!this._engine)return!1;if(!this._state.isValidSearchTerm(t))return this._terminal.clearSelection(),this.clearDecorations(),!1;let s=this._engine.findPreviousWithSelection(t,e,this._state.cachedSearchTerm);return this._selectResult(s,e?.decorations,i?.noScroll)}_selectResult(t,e,i){if(!this._terminal||!this._decorationManager)return!1;if(this._resultTracker.clearSelectedDecoration(),!t)return this._terminal.clearSelection(),!1;if(this._terminal.select(t.col,t.row,t.size),e){let s=this._decorationManager.createActiveDecoration(t,e);s&&(this._resultTracker.selectedDecoration=s)}if(!i&&(t.row>=this._terminal.buffer.active.viewportY+this._terminal.rows||t.row<this._terminal.buffer.active.viewportY)){let s=t.row-this._terminal.buffer.active.viewportY;s-=Math.floor(this._terminal.rows/2),this._terminal.scrollLines(s)}return!0}};const Yt=new ji("TerminalStateMachine");var et=(t=>(t.UNINITIALIZED="uninitialized",t.INITIALIZING="initializing",t.CONNECTING="connecting",t.CONNECTED="connected",t.RECONNECTING="reconnecting",t.DISCONNECTED="disconnected",t.ERROR="error",t.DISPOSED="disposed",t))(et||{});class Af{constructor(e){P(this,"currentState","uninitialized");P(this,"stateListeners",new Map);P(this,"transitionListeners",new Set);P(this,"errorHandlers",new Set);P(this,"transitions",[{from:["uninitialized"],to:"initializing",action:"initialize"},{from:["initializing"],to:"connecting",action:"connect"},{from:["connecting"],to:"connected",action:"connected"},{from:["disconnected","error"],to:"reconnecting",action:"reconnect"},{from:["reconnecting"],to:"connected",action:"reconnected"},{from:["connected","connecting"],to:"disconnected",action:"disconnect"},{from:["initializing","connecting","connected","reconnecting"],to:"error",action:"error"},{from:["uninitialized","initializing","connecting","connected","reconnecting","disconnected","error"],to:"disposed",action:"dispose"}]);this.terminalId=e}getState(){return this.currentState}canTransition(e){const i=this.transitions.find(s=>s.action===e&&s.from.includes(this.currentState));return!(!i||i.guard&&!i.guard())}transition(e){const i=this.transitions.find(r=>r.action===e&&r.from.includes(this.currentState));if(!i)return Yt.warn(`Invalid transition: ${e} from ${this.currentState}`),!1;if(i.guard&&!i.guard())return Yt.warn(`Guard failed for transition: ${e}`),!1;const s=this.currentState;return this.currentState=i.to,Yt.info(`Terminal ${this.terminalId}: ${s} -> ${this.currentState} (${e})`),this.notifyStateListeners(this.currentState),this.notifyTransitionListeners(s,this.currentState),!0}onStateChange(e,i){let s=this.stateListeners.get(e);return s||(s=new Set,this.stateListeners.set(e,s)),s.add(i),()=>{this.stateListeners.get(e)?.delete(i)}}onTransition(e){return this.transitionListeners.add(e),()=>{this.transitionListeners.delete(e)}}onError(e){return this.errorHandlers.add(e),()=>{this.errorHandlers.delete(e)}}reportError(e){Yt.error(`Terminal ${this.terminalId} error:`,e),this.errorHandlers.forEach(i=>{try{i(e)}catch(s){Yt.error("Error handler threw exception:",s)}}),this.currentState!=="disposed"&&this.transition("error")}isHealthy(){return["connected","connecting","reconnecting"].includes(this.currentState)}canAcceptInput(){return this.currentState==="connected"}isDisposed(){return this.currentState==="disposed"}notifyStateListeners(e){this.stateListeners.get(e)?.forEach(i=>{try{i()}catch(s){Yt.error("Error in state listener:",s)}})}notifyTransitionListeners(e,i){this.transitionListeners.forEach(s=>{try{s(e,i)}catch(r){Yt.error("Error in transition listener:",r)}})}dispose(){this.isDisposed()||this.transition("dispose"),this.stateListeners.clear(),this.transitionListeners.clear(),this.errorHandlers.clear()}}const ct=new ji("TerminalBufferManager"),Ln="terminal-buffer-index";let Jt=null,hn=0;const Pf=5e3;function Mn(){const t=Date.now();if(Jt&&t-hn<Pf)return Jt;try{const e=localStorage.getItem(Ln);if(e){const i=JSON.parse(e);Jt=new Map(i.map(s=>[s.key,s.timestamp]))}else Jt=new Map}catch{Jt=new Map}return hn=t,Jt}function Tn(t){try{const e=Array.from(t.entries()).map(([i,s])=>({key:i,timestamp:s}));localStorage.setItem(Ln,JSON.stringify(e)),Jt=t,hn=Date.now()}catch{}}function la(t,e){const i=Mn();i.set(t,e),Tn(i)}function ca(t){const e=Mn();e.delete(t),Tn(e)}const $e=class $e{constructor(e,i){P(this,"storageKey");P(this,"fallbackStorage",new Map);this.workspaceId=e,this.terminalId=i,this.storageKey=`terminal-buffer-${e}-${i}`}async saveBuffer(e,i,s){try{const n={lines:this.trimBuffer(e),cursorX:i,cursorY:s,timestamp:Date.now(),version:$e.BUFFER_VERSION};if(await this.hasStorageSpace(n))try{return localStorage.setItem(this.storageKey,JSON.stringify(n)),la(this.storageKey,n.timestamp),ct.debug(`Saved buffer for terminal ${this.terminalId}`),!0}catch(o){return ct.warn("localStorage failed, using fallback storage:",o),this.fallbackStorage.set(this.storageKey,n),!0}else{await this.cleanupOldBuffers();try{return localStorage.setItem(this.storageKey,JSON.stringify(n)),la(this.storageKey,n.timestamp),!0}catch{return this.fallbackStorage.set(this.storageKey,n),!0}}}catch(r){return ct.error("Failed to save buffer:",r),!1}}async restoreBuffer(){try{const e=localStorage.getItem(this.storageKey);if(e){const s=JSON.parse(e);if(this.isValidSnapshot(s))return ct.debug(`Restored buffer for terminal ${this.terminalId}`),s;localStorage.removeItem(this.storageKey)}const i=this.fallbackStorage.get(this.storageKey);return i&&this.isValidSnapshot(i)?i:null}catch(e){return ct.error("Failed to restore buffer:",e),null}}async clearBuffer(){try{localStorage.removeItem(this.storageKey),this.fallbackStorage.delete(this.storageKey),ca(this.storageKey)}catch(e){ct.error("Failed to clear buffer:",e)}}trimBuffer(e){for(;e.length>0&&!e[e.length-1].trim();)e.pop();return e.length>$e.MAX_BUFFER_SIZE&&(e=e.slice(-1e4)),e.map(i=>i.length>$e.MAX_LINE_LENGTH?`${i.substring(0,$e.MAX_LINE_LENGTH)}…`:i)}isValidSnapshot(e){return!(e.version!==$e.BUFFER_VERSION||Date.now()-e.timestamp>$e.RETENTION_PERIOD||!Array.isArray(e.lines))}async hasStorageSpace(e){try{const i=JSON.stringify(e).length;if("storage"in navigator&&"estimate"in navigator.storage){const s=await navigator.storage.estimate();return(s.quota||0)-(s.usage||0)>i+$e.STORAGE_QUOTA_BUFFER}return!0}catch{return!0}}async cleanupOldBuffers(){try{const e=[],i=Date.now(),s=Mn();for(const[r,n]of s)i-n>$e.RETENTION_PERIOD&&e.push(r);for(const r of e)localStorage.removeItem(r),ca(r),ct.debug(`Cleaned up old buffer: ${r}`);s.size===0&&await this.rebuildBufferIndex()}catch(e){ct.error("Failed to cleanup old buffers:",e)}}async rebuildBufferIndex(){try{const e=new Map;for(let i=0;i<localStorage.length;i++){const s=localStorage.key(i);if(s?.startsWith("terminal-buffer-")&&s!==Ln)try{const r=localStorage.getItem(s);if(r){const n=JSON.parse(r);e.set(s,n.timestamp)}}catch{}}e.size>0&&(Tn(e),ct.debug(`Rebuilt buffer index with ${e.size} entries`))}catch(e){ct.error("Failed to rebuild buffer index:",e)}}getStats(){try{const e=localStorage.getItem(this.storageKey);if(e){const i=JSON.parse(e);return{size:e.length,lineCount:i.lines.length,age:Date.now()-i.timestamp}}return null}catch{return null}}};P($e,"BUFFER_VERSION",1),P($e,"MAX_BUFFER_SIZE",1e4),P($e,"MAX_LINE_LENGTH",1e3),P($e,"RETENTION_PERIOD",1440*60*1e3),P($e,"STORAGE_QUOTA_BUFFER",100*1024);let Ds=$e;const Oi=new ji("TerminalThemeManager"),Se=class Se{constructor(e){P(this,"currentTheme");P(this,"customTerminalTheme",null);P(this,"themeObserver",null);P(this,"transitionTimeout",null);P(this,"darkModeQuery",null);P(this,"darkModeChangeHandler",null);P(this,"themeChangeHandler",null);this.container=e,this.currentTheme=this.detectSystemTheme(),this.setContainer(this.container??null),this.setupThemeObserver()}setContainer(e){this.transitionTimeout&&(clearTimeout(this.transitionTimeout),this.transitionTimeout=null),this.container&&this.container!==e&&(this.container.style.transition=""),this.container=e,this.container&&(this.container.style.backgroundColor=this.currentTheme.background||"transparent")}getCurrentTheme(){return this.currentTheme}applyTheme(e,i){const s=i||this.detectSystemTheme();if(s.name!==this.currentTheme.name)try{this.container&&(this.container.style.transition=`background-color ${Se.TRANSITION_DURATION}ms ease`),e.options.theme=s,this.container&&(this.container.style.backgroundColor=s.background||"transparent"),e.refresh(0,e.rows-1),this.currentTheme=s,Oi.debug(`Applied theme: ${s.name}`),this.transitionTimeout&&clearTimeout(this.transitionTimeout),this.transitionTimeout=setTimeout(()=>{this.container&&(this.container.style.transition="")},Se.TRANSITION_DURATION)}catch(r){Oi.error("Failed to apply theme:",r)}}detectSystemTheme(){if(this.customTerminalTheme)return this.customTerminalTheme;const e=document.documentElement.classList.contains("dark"),i=document.documentElement.classList.contains("light");if(e)return Se.DARK_THEME;if(i)return Se.LIGHT_THEME;const s=document.documentElement.getAttribute("data-theme");if(s==="dark")return Se.DARK_THEME;if(s==="light")return Se.LIGHT_THEME;const n=getComputedStyle(document.documentElement).getPropertyValue("--background").trim();return n&&this.isColorDark(n)||Uh.isDark()?Se.DARK_THEME:Se.LIGHT_THEME}isColorDark(e){const i=this.colorToRgb(e);return i?(.299*i.r+.587*i.g+.114*i.b)/255<.5:!1}colorToRgb(e){if(e.startsWith("#")){const s=e.slice(1);if(s.length===3)return{r:parseInt(s[0]+s[0],16),g:parseInt(s[1]+s[1],16),b:parseInt(s[2]+s[2],16)};if(s.length===6)return{r:parseInt(s.slice(0,2),16),g:parseInt(s.slice(2,4),16),b:parseInt(s.slice(4,6),16)}}const i=e.match(/rgb\((\d+),\s*(\d+),\s*(\d+)\)/);return i?{r:parseInt(i[1]),g:parseInt(i[2]),b:parseInt(i[3])}:null}setupThemeObserver(){typeof window>"u"||(this.themeObserver=new MutationObserver(e=>{for(const i of e)if(i.type==="attributes"){const s=i.attributeName;if(s==="class"||s==="data-theme"){const r=this.detectSystemTheme();r.name!==this.currentTheme.name&&(Oi.debug(`Theme change detected: ${this.currentTheme.name} -> ${r.name}`),Ui("terminal-theme-changed",{theme:r}))}}}),this.themeObserver.observe(document.documentElement,{attributes:!0,attributeFilter:["class","data-theme"]}),this.darkModeQuery=window.matchMedia("(prefers-color-scheme: dark)"),this.darkModeChangeHandler=()=>{Oi.debug("System theme preference changed");const e=this.detectSystemTheme();e.name!==this.currentTheme.name&&Ui("terminal-theme-changed",{theme:e})},this.darkModeQuery.addEventListener("change",this.darkModeChangeHandler),this.themeChangeHandler=e=>{const i=e.detail?.isDark,s=e.detail?.terminalColors;let r;s&&Object.keys(s).length>0?(r={...i?Se.DARK_THEME:Se.LIGHT_THEME,...s,name:"custom",isDark:i},this.customTerminalTheme=r):(this.customTerminalTheme=null,r=i?Se.DARK_THEME:Se.LIGHT_THEME),(r.name!==this.currentTheme.name||s)&&(Oi.debug(`App theme changed to ${r.name}`),Ui("terminal-theme-changed",{theme:r}))},window.addEventListener("theme-changed",this.themeChangeHandler))}dispose(){this.themeObserver&&(this.themeObserver.disconnect(),this.themeObserver=null),this.darkModeQuery&&this.darkModeChangeHandler&&(this.darkModeQuery.removeEventListener("change",this.darkModeChangeHandler),this.darkModeQuery=null,this.darkModeChangeHandler=null),this.themeChangeHandler&&(window.removeEventListener("theme-changed",this.themeChangeHandler),this.themeChangeHandler=null),this.transitionTimeout&&(clearTimeout(this.transitionTimeout),this.transitionTimeout=null),this.setContainer(null)}};P(Se,"TRANSITION_DURATION",200),P(Se,"DARK_THEME",{name:"sleek-dark",isDark:!0,background:"#0B0B0E",foreground:"#e4e4e7",cursor:"#fbbf24",cursorAccent:"#1a1a1a",selectionBackground:"#3f3f46",selectionForeground:"#F7F7F7",selectionInactiveBackground:"#27272a",black:"#18181b",red:"#ef4444",green:"#22c55e",yellow:"#eab308",blue:"#3b82f6",magenta:"#a855f7",cyan:"#06b6d4",white:"#d4d4d8",brightBlack:"#52525b",brightRed:"#f87171",brightGreen:"#4ade80",brightYellow:"#facc15",brightBlue:"#60a5fa",brightMagenta:"#c084fc",brightCyan:"#22d3ee",brightWhite:"#f4f4f5"}),P(Se,"LIGHT_THEME",{name:"sleek-light",isDark:!1,background:"#F7F7F8",foreground:"#18181b",cursor:"#f59e0b",cursorAccent:"#F7F7F7",selectionBackground:"#e4e4e7",selectionForeground:"#09090b",selectionInactiveBackground:"#f4f4f5",black:"#18181b",red:"#dc2626",green:"#16a34a",yellow:"#ca8a04",blue:"#2563eb",magenta:"#9333ea",cyan:"#0891b2",white:"#e4e4e7",brightBlack:"#71717a",brightRed:"#ef4444",brightGreen:"#22c55e",brightYellow:"#eab308",brightBlue:"#3b82f6",brightMagenta:"#a855f7",brightCyan:"#06b6d4",brightWhite:"#F7F7F7"});let ln=Se;const Ft="***",Of="(?=[A-Za-z_])[A-Za-z0-9_]*(?:KEY|TOKEN|SECRET|PASSWORD|PASS|CREDENTIAL|AUTH|PWD)[A-Za-z0-9_]*",If=new RegExp(`((?:^|(?<=\\s)|&&|;|\\|\\|)\\s*(?:export\\s+)?)(${Of})(=)("(?:[^"\\\\]|\\\\.)*"|'(?:[^'\\\\]|\\\\.)*'|\\\`[^\\\`]*\\\`|\\S+)`,"gi"),$f=/(-[Hh]\s+|--header\s+)(['"])(Authorization:\s*)[^'"]*(\2)/gi,Ff=/([\w+.-]+:\/\/[^\s@]+):([^\s@]+)@(?=\S)/gi,Nf=/(curl\s+(?:\S+\s+)*(?:-u|--user)[=\s]\s*)(["']?)([^\s"':]+):([^\s"']+)\2/gi,zf=/(--(?:password|passwd|token|secret|api-key|api-token|auth-token|access-token|client-secret|private-key))(=)("(?:[^"\\\\]|\\\\.)*"|'(?:[^'\\\\]|\\\\.)*'|\S+)/gi,Wf=/(--(?:password|passwd|token|secret|api-key|api-token|auth-token|access-token|client-secret|private-key))\s+("(?:[^"\\\\]|\\\\.)*"|'(?:[^'\\\\]|\\\\.)*'|\S+)/gi,Hf=/((?:mysql|mongosh?|redis-cli|sshpass)\s+(?:\S+\s+)*-[pP])\s+(\S+)/gi,Uf=/(mysql\s+(?:\S+\s+)*-[pP])(\S+)/gi;function Ut(t){if(!t)return t;let e=t;return e=e.replace($f,`$1$2Authorization: ${Ft}$4`),e=e.replace(Nf,`$1$2$3:${Ft}$2`),e=e.replace(Ff,`$1:${Ft}@`),e=e.replace(zf,`$1$2${Ft}`),e=e.replace(Wf,`$1 ${Ft}`),e=e.replace(Hf,`$1 ${Ft}`),e=e.replace(Uf,`$1${Ft}`),e=e.replace(If,`$1$2$3${Ft}`),e}function Fp(t){try{const e=new URL(t);return`${e.origin}${e.pathname}`.substring(0,100)}catch{return""}}const Xt=Kh("TerminalHistoryTracker"),Qt=class Qt{constructor(){P(this,"histories",new Map);P(this,"MAX_HISTORY_SIZE",10);P(this,"MAX_OUTPUT_LENGTH",500);P(this,"STORAGE_PREFIX","terminal-history-");P(this,"_updateCounter",Wh(0));P(this,"updateCounter",{subscribe:this._updateCounter.subscribe});this.loadHistories()}notifyUpdate(){this._updateCounter.update(e=>e+1)}static getInstance(){return Qt.instance||(Qt.instance=new Qt),Qt.instance}getOrCreateHistory(e,i){let s=this.histories.get(e);return s||(s={terminalId:e,workspaceId:i,commands:[],currentOutput:"",isExecuting:!1},this.histories.set(e,s)),s}onCommandStart(e,i,s){const r=this.getOrCreateHistory(e,i),n=Ut(s);r.currentCommand=n,r.currentOutput="",r.isExecuting=!0,r.lastCommand=n,this.notifyUpdate(),Xt.debug(`Command started for terminal ${e}: ${n}`)}onOutput(e,i,s){const r=this.getOrCreateHistory(e,i);r.currentOutput.length<this.MAX_OUTPUT_LENGTH&&(r.currentOutput+=s,r.currentOutput.length>this.MAX_OUTPUT_LENGTH&&(r.currentOutput=`${r.currentOutput.substring(0,this.MAX_OUTPUT_LENGTH)}...`))}onCommandFinish(e,i){const s=this.getOrCreateHistory(e,i);if(s.currentCommand){const r=Ut(s.currentCommand),n={command:r,timestamp:Date.now(),output:s.currentOutput};s.commands.push(n),s.commands.length>this.MAX_HISTORY_SIZE&&(s.commands=s.commands.slice(-this.MAX_HISTORY_SIZE)),s.lastCommand=r,s.lastOutput=s.currentOutput,this.saveHistory(e,s),Xt.debug(`Command finished for terminal ${e}: ${r}`)}s.currentCommand=void 0,s.currentOutput="",s.isExecuting=!1,this.notifyUpdate()}getHistory(e){return this.histories.get(e)}getHistoriesForWorkspace(e){return Array.from(this.histories.values()).filter(i=>i.workspaceId===e)}getLastCommand(e){return this.histories.get(e)?.lastCommand}getLastOutput(e){return this.histories.get(e)?.lastOutput}saveHistory(e,i){try{const s=`${this.STORAGE_PREFIX}${e}`,r={terminalId:i.terminalId,workspaceId:i.workspaceId,commands:i.commands.slice(-5).map(n=>({...n,command:Ut(n.command)})),lastCommand:i.lastCommand?Ut(i.lastCommand):void 0,lastOutput:i.lastOutput?.substring(0,200)};localStorage.setItem(s,JSON.stringify(r))}catch(s){Xt.warn("Failed to save terminal history:",s)}}loadHistories(){try{const e=Object.keys(localStorage).filter(i=>i.startsWith(this.STORAGE_PREFIX));for(const i of e)try{const s=localStorage.getItem(i);if(s){const r=JSON.parse(s);r.terminalId&&this.histories.set(r.terminalId,{...r,currentOutput:"",isExecuting:!1,commands:r.commands||[]})}}catch(s){Xt.warn(`Failed to load terminal history for ${i}:`,s)}Xt.info(`Loaded ${this.histories.size} terminal histories from localStorage`)}catch(e){Xt.error("Failed to load terminal histories:",e)}}clearHistory(e){this.histories.delete(e);try{localStorage.removeItem(`${this.STORAGE_PREFIX}${e}`)}catch(i){Xt.warn("Failed to clear terminal history:",i)}}clearWorkspaceHistories(e){const i=[];for(const[s,r]of this.histories.entries())r.workspaceId===e&&i.push(s);for(const s of i)this.clearHistory(s)}};P(Qt,"instance");let cn=Qt;const Ii=cn.getInstance();function Kf(t,e){return setTimeout(()=>{try{t.dispose()}catch(i){if(e)e(i);else throw i}},0)}const qf=["panel.focus-next-column","panel.focus-previous-column","global.next-space-alt","global.previous-space-alt","navigation.go-to-tab"];function Vf(t,e,i,s=!1){const r=o=>Pn(o,e),n=s?r("navigation.go-to-device"):Pn("navigation.go-to-tab",e)===On["navigation.go-to-tab"]?On["navigation.go-to-device"]:null;return n&&In(t,n,i)>=0&&!$n("navigation.go-to-device",t,r,i)?!0:qf.some(o=>In(t,r(o),i)>=0&&(o!=="navigation.go-to-tab"||!$n(o,t,r,i)))}const Gf=Bf,I=new ji("TerminalAdapter"),Yf=typeof process<"u"&&process.platform==="win32",Xf=100,Ae=class Ae{constructor(e){P(this,"xterm");P(this,"fitAddon");P(this,"searchAddon");P(this,"webLinksAddon");P(this,"webglAddon",null);P(this,"stateMachine");P(this,"bufferManager");P(this,"themeManager");P(this,"terminalId");P(this,"workspaceId");P(this,"container");P(this,"eventListeners",[]);P(this,"resizeObserver",null);P(this,"reattachFitObserver",null);P(this,"reattachFitTimer",null);P(this,"visibilityObserver",null);P(this,"wasVisible",!0);P(this,"isVisible",!0);P(this,"lastFittedSize",null);P(this,"resizeDebounceTimer",null);P(this,"bufferSaveTimer",null);P(this,"dataDisposable",null);P(this,"resizeDisposable",null);P(this,"selectionDisposable",null);P(this,"ipcCleanup",null);P(this,"themeCleanup",null);P(this,"webglContextLostCleanup",null);P(this,"isDisposed",!1);P(this,"isXtermOpened",!1);P(this,"autoReconnectTimer",null);P(this,"autoReconnectAttempts",0);P(this,"heartbeatTimer",null);P(this,"webglRecoveryAttempts",0);P(this,"exitedNormally",!1);P(this,"lastCwd");P(this,"isExecuting",!1);P(this,"startTime",Date.now());P(this,"commandBuffer","");P(this,"currentLineBuffer","");P(this,"isAtPrompt",!1);P(this,"callbacks");P(this,"terminals");this.workspaceId=e.workspaceId,this.terminalId=e.terminalId||`terminal-${Date.now()}-${Math.random().toString(36).substring(2,11)}`,this.container=e.container,this.terminals=(e.appClient??Hh).terminals,this.callbacks={onReady:e.onReady,onExit:e.onExit,onCommandStart:e.onCommandStart,onCommandFinished:e.onCommandFinished,onCwdChanged:e.onCwdChanged,onError:e.onError,onToggleSearch:e.onToggleSearch},this.stateMachine=new Af(this.terminalId),this.setupStateMachineListeners(),this.bufferManager=new Ds(this.workspaceId,this.terminalId),this.themeManager=new ln(this.container);const i=e.fontFamily??Zh.select(_t.state);this.xterm=new hu({allowProposedApi:!0,fontFamily:i,fontSize:13,lineHeight:1.2,letterSpacing:0,cursorBlink:!0,cursorStyle:"block",cursorWidth:1,scrollback:1e4,allowTransparency:!0,windowsPty:Yf?{backend:"conpty"}:void 0,macOptionIsMeta:!0,rightClickSelectsWord:!0,convertEol:!0,drawBoldTextInBrightColors:!0,scrollSensitivity:1,theme:this.themeManager.getCurrentTheme()}),this.fitAddon=new du,this.xterm.loadAddon(this.fitAddon),this.webLinksAddon=new mu((s,r)=>{this.handleLinkClick(r)}),this.xterm.loadAddon(this.webLinksAddon),this.searchAddon=new Gf,this.xterm.loadAddon(this.searchAddon),this.searchAddon.onDidChangeResults(s=>{this.callbacks.onSearchResultsChange?.(s.resultIndex,s.resultCount)})}getSearchDecorations(){return{matchBackground:"#515c6a",matchBorder:"#515c6a",matchOverviewRuler:"#515c6a",activeMatchBackground:"#eab308",activeMatchBorder:"#ca8a04",activeMatchColorOverviewRuler:"#eab308"}}setupStateMachineListeners(){this.stateMachine.onTransition((e,i)=>{i===et.ERROR&&this.handleError(new Error(`Terminal entered error state from ${e}`)),(i===et.DISCONNECTED||i===et.ERROR)&&(this.stopHeartbeat(),this.exitedNormally||this.scheduleAutoReconnect()),i===et.CONNECTED&&(this.autoReconnectAttempts=0,this.cancelAutoReconnect(),this.startHeartbeat())}),this.stateMachine.onError(e=>{this.handleError(e)})}async initialize(e=!1){if(this.isDisposed)throw new Error("Cannot initialize disposed terminal");if(!this.container)throw new Error("Cannot initialize terminal without a container");const i=this.container;if(!this.stateMachine.canTransition("initialize"))throw new Error(`Cannot initialize terminal in state ${this.stateMachine.getState()}`);this.stateMachine.transition("initialize");try{this.isXtermOpened?I.warn(`[initialize] XTerm already opened for terminal ${this.terminalId}, skipping open()`):(this.xterm.open(i),this.isXtermOpened=!0,I.info(`[initialize] XTerm opened for terminal ${this.terminalId}`)),this.themeManager.getCurrentTheme().isDark?this.loadWebglAddon():I.debug("[Renderer] Using Canvas renderer for light theme (better anti-aliasing)"),this.themeManager.applyTheme(this.xterm),this.fitTerminalToContainer()||(I.warn("Container has no dimensions, delaying fit"),setTimeout(()=>{this.fitTerminalToContainer()},100)),this.setupResizeObserver(),this.setupXTermEventHandlers(),this.setupThemeChangeListener();const r=this.xterm.cols,n=this.xterm.rows,o=await this.findBackendTerminal(),a=o!==null;if(!e)if(a)try{const l=await this.terminals.getBuffer(this.terminalId,void 0,this.workspaceId);l&&(I.info(`Restoring ${l.length} bytes of buffered output from backend`),this.xterm.write(l),this.parseTerminalOutput(l))}catch(l){I.warn("Could not restore terminal buffer from backend:",l)}else{const l=await this.bufferManager.restoreBuffer();l&&(I.info("Restoring terminal buffer from local storage"),this.restoreFromSnapshot(l))}this.startBufferAutoSave(),this.stateMachine.transition("connect"),a?(this.setupIpcEventHandlers(),this.stateMachine.transition("connected"),this.resize(r,n),o?.isExecuting===!1&&this.hideCursorOnExit(),this.callbacks.onReady?.()):(I.debug(`[initialize] Terminal ${this.terminalId} creating new PTY`),await this.openPtyConnection(r,n)),requestAnimationFrame(()=>{!this.isDisposed&&this.isVisible&&this.xterm.focus()})}catch(s){throw this.stateMachine.reportError(s),s}}async openPtyConnection(e,i){try{const s=await this.terminals.create({workspaceId:this.workspaceId,cols:e,rows:i});if(!s.success)throw new Error(s.error||Fs.terminal_adapter_openFailed_error());s.id&&(this.terminalId=s.id),this.setupIpcEventHandlers(),this.stateMachine.transition("connected"),this.restoreCursor(),this.callbacks.onReady?.()}catch(s){throw this.stateMachine.reportError(s),s}}async findBackendTerminal(){try{const{terminals:e}=await this.terminals.list(this.workspaceId);return e.find(i=>i.id===this.terminalId)??null}catch(e){return I.warn("Could not check terminal existence:",e),null}}async terminalExistsOnBackend(){return await this.findBackendTerminal()!==null}hideCursorOnExit(){this.isDisposed||(this.xterm.options.cursorBlink=!1,this.xterm.write("\x1B[?25l"))}restoreCursor(){this.isDisposed||(this.xterm.options.cursorBlink=!0,this.xterm.write("\x1B[?25h"))}setupXTermEventHandlers(){this.container&&(this.dataDisposable&&(this.dataDisposable.dispose(),this.dataDisposable=null),this.resizeDisposable&&(this.resizeDisposable.dispose(),this.resizeDisposable=null),this.selectionDisposable&&(this.selectionDisposable.dispose(),this.selectionDisposable=null),this.xterm.attachCustomKeyEventHandler(e=>{const i=navigator.platform.toUpperCase().includes("MAC"),s=i?e.metaKey:e.ctrlKey;return e.metaKey&&e.key==="k"&&!e.ctrlKey&&!e.shiftKey&&!e.altKey?(e.type==="keydown"&&this.clear(),!1):s&&e.key==="j"&&!e.shiftKey&&!e.altKey?(e.type==="keydown"&&_t.dispatch(An(this.workspaceId)),!1):s&&e.key==="f"&&!e.shiftKey&&!e.altKey?(e.type==="keydown"&&this.callbacks.onToggleSearch?.(),!1):s&&(e.key==="t"||e.key==="T")&&!e.shiftKey&&!e.altKey?(e.type==="keydown"&&Ui("workspace:new-terminal",{workspaceId:this.workspaceId}),!1):s&&(e.key==="w"||e.key==="W")&&!e.shiftKey&&!e.altKey?(e.type==="keydown"&&_t.dispatch(Vh(this.workspaceId)),!1):Vf(e,_t.state.userPreferences?.shortcutOverrides??{},i,_t.state.machineRail?.enabled??!1)||s&&e.shiftKey&&!e.altKey&&(e.key==="]"||e.key==="}"||e.key==="["||e.key==="{")?!1:e.ctrlKey&&!e.metaKey&&!e.altKey&&(e.key==="`"||e.key==="~")?(e.type==="keydown"&&(e.shiftKey||e.key==="~"?Ui("workspace:new-terminal",{workspaceId:this.workspaceId}):_t.dispatch(An(this.workspaceId))),!1):!0}),this.dataDisposable=this.xterm.onData(e=>{this.isDisposed||this.write(e)}),this.resizeDisposable=this.xterm.onResize(({cols:e,rows:i})=>{!this.isDisposed&&this.stateMachine.canAcceptInput()&&this.resize(e,i)}),this.selectionDisposable=this.xterm.onSelectionChange(()=>{}))}setupIpcEventHandlers(){this.ipcCleanup&&(this.ipcCleanup(),this.ipcCleanup=null);let e=!1;const i=this.terminals.subscribeEvents(this.terminalId,{onData:({chunk:s})=>{e||this.isDisposed||this.stateMachine.canAcceptInput()&&(this.xterm.write(s),this.parseTerminalOutput(s))},onExit:({exitCode:s})=>{e||this.isDisposed||(this.exitedNormally=!0,this.hideCursorOnExit(),this.callbacks.onExit?.(s),this.stateMachine.transition("disconnect"))},onCwd:({cwd:s})=>{e||this.isDisposed||(this.lastCwd=s,this.callbacks.onCwdChanged?.(s))}},this.workspaceId);this.ipcCleanup=()=>{e=!0;try{i()}catch(s){I.warn("Failed to unsubscribe terminal events:",s)}}}setupResizeObserver(){if(!this.container||!this.isVisible)return;const e=this.container;this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),this.resizeDebounceTimer&&(clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=null),this.resizeObserver=new ResizeObserver(()=>{this.resizeDebounceTimer&&clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=setTimeout(()=>{this.fitTerminalToContainer()},100)}),this.resizeObserver.observe(e),this.setupVisibilityObserver()}setupVisibilityObserver(){if(!this.container)return;const e=this.container;this.visibilityObserver&&(this.visibilityObserver.disconnect(),this.visibilityObserver=null),this.visibilityObserver=new IntersectionObserver(i=>{for(const s of i){const r=s.isIntersecting;r&&!this.wasVisible&&(I.debug(`[visibility] Terminal ${this.terminalId} became visible, reconnecting ResizeObserver`),this.resizeObserver||(this.resizeObserver=new ResizeObserver(()=>{this.resizeDebounceTimer&&clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=setTimeout(()=>{this.fitTerminalToContainer()},100)}),this.resizeObserver.observe(e)),this.fitTerminalToContainer()),this.wasVisible=r}}),this.visibilityObserver.observe(e)}loadWebglAddon(){this.disposeWebglAddon();try{this.webglAddon=new J_,this.xterm.loadAddon(this.webglAddon);const e=this.xterm.element?.querySelector("canvas");if(e){const i=s=>{s.preventDefault(),I.warn(`[WebGL] Context lost for terminal ${this.terminalId}, recovering...`),!this.isDisposed&&(this.disposeWebglAddon(),setTimeout(()=>{if(this.isDisposed)return;if(!this.themeManager.getCurrentTheme().isDark){I.info("[WebGL] Skipping WebGL recovery on light theme, using Canvas renderer");return}if(this.webglRecoveryAttempts>=Ae.MAX_WEBGL_RECOVERY_ATTEMPTS){I.warn(`[WebGL] Max recovery attempts (${Ae.MAX_WEBGL_RECOVERY_ATTEMPTS}) reached for terminal ${this.terminalId}, staying on Canvas renderer`);return}this.webglRecoveryAttempts++;try{this.loadWebglAddon(),I.info(`[WebGL] Successfully recovered from context loss (attempt ${this.webglRecoveryAttempts})`)}catch(n){I.warn("[WebGL] Failed to recover from context loss, falling back to Canvas renderer:",n),this.webglAddon=null}},100))};e.addEventListener("webglcontextlost",i),this.webglContextLostCleanup=()=>{e.removeEventListener("webglcontextlost",i)}}}catch(e){I.warn("Failed to load WebGL renderer, falling back to Canvas renderer:",e),this.webglAddon=null}}disposeWebglAddon(){if(this.webglContextLostCleanup&&(this.webglContextLostCleanup(),this.webglContextLostCleanup=null),this.webglAddon){try{this.webglAddon.dispose()}catch(e){I.warn("Error disposing WebGL addon:",e)}this.webglAddon=null}}setupThemeChangeListener(){this.themeCleanup&&(this.themeCleanup(),this.themeCleanup=null);const e=i=>{const s=i.detail?.theme;s&&this.xterm&&(I.info(`[Theme] Theme changed to: ${s.name} (isDark: ${s.isDark})`),this.themeManager.applyTheme(this.xterm,s),s.isDark?this.webglAddon||this.loadWebglAddon():this.webglAddon&&(this.disposeWebglAddon(),I.info("[WebGL] Disposed WebGL addon for light theme (using Canvas renderer)")))};window.addEventListener("terminal-theme-changed",e),this.themeCleanup=()=>{window.removeEventListener("terminal-theme-changed",e)}}parseTerminalOutput(e){Ii.onOutput(this.terminalId,this.workspaceId,e),e.includes("\x1B]133;C\x07")?(this.isExecuting&&(this.isExecuting=!1,this.callbacks.onCommandFinished?.(),Ii.onCommandFinish(this.terminalId,this.workspaceId)),this.commandBuffer="",this.isAtPrompt=!0):e.includes("\x1B]133;A\x07")&&(this.isExecuting||(this.isExecuting=!0,this.callbacks.onCommandStart?.()),this.isAtPrompt=!0,this.commandBuffer="");const i=/[\$%]\s*$/,s=/^.*[\$%]\s+(.+)$/,r=e.split(/\r?\n/);for(const o of r){const a=o.replace(/\x1b\[[0-9;?]*[a-zA-Z]/g,"").replace(/\x1b\][^\x07]*\x07/g,"").replace(/\x1b\][^\x1b]*\x1b\\/g,"").replace(/\x1b[()][AB0-2]/g,"").replace(/\x1b[=>]/g,"").replace(/\x1b[78]/g,"").replace(/\x1b[DME]/g,"").replace(/\x1b[HZ]/g,"").replace(/\x1b[c]/g,"").replace(/\[\?[0-9;]*[a-zA-Z]/g,"").replace(/\x07/g,"").replace(/\x00-\x08\x0b\x0c\x0e-\x1f/g,"").trim();if(!a||/^\[[\?0-9;]*[a-zA-Z]$/.test(a))continue;const l=a.match(s);if(l&&l[1]){const h=l[1].trim(),c=/^[a-zA-Z0-9.\/~]/.test(h);h.length>0&&!this.isExecuting&&c?(I.info(`[TerminalAdapter] Detected command from output: ${Ut(h)}`),Ii.onCommandStart(this.terminalId,this.workspaceId,h),this.isExecuting=!0,this.callbacks.onCommandStart?.()):h.length>0&&!c&&I.debug(`[TerminalAdapter] Skipping suspicious command detection: ${Ut(h)}`)}i.test(a)&&!l&&(this.isExecuting&&(this.isExecuting=!1,this.callbacks.onCommandFinished?.(),Ii.onCommandFinish(this.terminalId,this.workspaceId),I.debug(`[TerminalAdapter] Command finished, prompt detected: ${Ut(a)}`)),this.isAtPrompt=!0,this.commandBuffer="")}const n=e.match(/\x1b\]7;file:\/\/[^/]*([^\x07]*)\x07/);if(n){const o=decodeURIComponent(n[1]);o!==this.lastCwd&&(this.lastCwd=o,this.callbacks.onCwdChanged?.(o))}}startBufferAutoSave(){this.bufferSaveTimer=setInterval(()=>{this.stateMachine?.canAcceptInput()&&this.saveBuffer()},5e3)}async saveBuffer(){try{const e=this.xterm.buffer.active,i=[];for(let s=0;s<e.length;s++){const r=e.getLine(s);r&&i.push(r.translateToString(!0))}await this.bufferManager.saveBuffer(i,e.cursorX,e.cursorY)}catch(e){I.error("Failed to save buffer:",e)}}restoreFromSnapshot(e){if(e.lines&&e.lines.length>0){this.xterm.clear();const i=[...e.lines];for(;i.length>0&&i[i.length-1].trim()==="";)i.pop();const s=/[\$>#%]\s*$/,r=/@[\w-]+/;if(i.length>0){const n=i[i.length-1],o=i.length>1?i[i.length-2]:"";if(s.test(n)&&r.test(n))i.pop();else if(s.test(n)&&n.trim().length<80)i.pop(),i.length>0&&r.test(i[i.length-1])&&i.pop();else if(i.length>=2){const a=o+n;s.test(a)&&r.test(a)&&(i.pop(),i.pop())}}for(let n=0;n<i.length;n++)n<i.length-1?this.xterm.writeln(i[n]):i[n].trim()&&this.xterm.writeln(i[n]);I.debug(`Restored terminal buffer for ${this.terminalId} with ${i.length} lines (prompt removed)`)}}getCommandFromXtermBuffer(){try{const e=this.xterm.buffer.active,i=e.cursorY+e.baseY,s=e.getLine(i);if(!s)return null;const r=s.translateToString(!0);if(!r||!r.trim())return null;const n=r.replace(/\x1b\[[0-9;?]*[a-zA-Z]/g,"").replace(/\x1b\][^\x07]*\x07/g,"").replace(/\x1b[()][AB0-2]/g,"").replace(/\x07/g,"").trim();if(!n)return null;const o=n.match(/^.*[\$%#❯➜]\s+(.+)$/);return o&&o[1]?o[1].trim():null}catch{return null}}write(e){if(!(this.isDisposed||!this.stateMachine.canAcceptInput())){if(e==="\r"||e===`
142
142
  `){const i=this.getCommandFromXtermBuffer(),s=i||this.commandBuffer.trim();s&&(Ii.onCommandStart(this.terminalId,this.workspaceId,s),this.isExecuting=!0,I.debug(`Command executed: ${Ut(s)}${i?" (from xterm buffer)":" (from keystroke buffer)"}`)),this.commandBuffer="",this.currentLineBuffer=""}else e===""||e==="\b"?this.commandBuffer.length>0&&(this.commandBuffer=this.commandBuffer.slice(0,-1)):e===""?(this.commandBuffer="",this.currentLineBuffer=""):e===""?(this.commandBuffer="",this.currentLineBuffer=""):e.match(/[\x00-\x1F\x7F]/)||(this.commandBuffer+=e,this.currentLineBuffer+=e);this.terminals.write(this.terminalId,e,this.workspaceId).then(i=>{i.success||I.error(`[write] Terminal ${this.terminalId}: write failed - ${i.error}`)}).catch(i=>{I.error(`[write] Terminal ${this.terminalId}: transport error - ${i}`),this.isDisposed||this.stateMachine.reportError(i)})}}resize(e,i){this.isDisposed||!this.stateMachine.canAcceptInput()||this.terminals.resize(this.terminalId,e,i,this.workspaceId).catch(s=>{I.error("Failed to resize terminal:",s)})}focus(){!this.isDisposed&&this.isVisible&&this.xterm.focus()}blur(){this.isDisposed||this.xterm.blur()}setVisible(e){if(!(this.isDisposed||this.isVisible===e)){if(this.isVisible=e,this.wasVisible=e,!e){this.xterm.blur(),this.disconnectLayoutObservers();return}this.setupResizeObserver(),requestAnimationFrame(()=>this.fitTerminalToContainer())}}fitTerminalToContainer(){if(this.isDisposed||!this.isVisible||!this.container)return!1;const{width:e,height:i}=this.container.getBoundingClientRect();return e<=0||i<=0?!1:(this.lastFittedSize?.width===e&&this.lastFittedSize.height===i||(this.fitAddon.fit(),this.lastFittedSize={width:e,height:i}),!0)}disconnectLayoutObservers(){this.resizeObserver?.disconnect(),this.resizeObserver=null,this.visibilityObserver?.disconnect(),this.visibilityObserver=null,this.resizeDebounceTimer&&(clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=null)}fitAfterReattach(e){if(this.cancelReattachFit(),this.fitReattachedContainer(e))return;const i=new ResizeObserver(()=>{if(this.reattachFitObserver!==i){i.disconnect();return}this.hasReattachedContainerBox(e)&&(this.reattachFitTimer&&clearTimeout(this.reattachFitTimer),this.reattachFitTimer=setTimeout(()=>{this.reattachFitTimer=null,this.fitReattachedContainer(e)&&this.cancelReattachFit()},Xf))});this.reattachFitObserver=i,i.observe(e)}fitReattachedContainer(e){if(this.isDisposed||this.container!==e)return!0;if(!this.hasReattachedContainerBox(e))return!1;const{width:i,height:s}=e.getBoundingClientRect();return this.fitAddon.fit(),this.lastFittedSize={width:i,height:s},this.xterm.refresh(0,this.xterm.rows-1),!0}hasReattachedContainerBox(e){if(!this.isVisible)return!1;const{width:i,height:s}=e.getBoundingClientRect();return i>0&&s>0}cancelReattachFit(){this.reattachFitObserver?.disconnect(),this.reattachFitObserver=null,this.reattachFitTimer&&(clearTimeout(this.reattachFitTimer),this.reattachFitTimer=null)}clear(){this.isDisposed||this.xterm.clear()}async reattach(e){if(this.isDisposed||this.stateMachine.isDisposed())throw new Error("Cannot reattach disposed terminal");this.cancelAutoReconnect(),this.autoReconnectAttempts=0,this.webglRecoveryAttempts=0,this.exitedNormally=!1,this.setupIpcEventHandlers();const i=this.stateMachine.getState();if(i!==et.CONNECTED){I.info(`[reattach] Terminal ${this.terminalId} not in CONNECTED state (${i}), attempting to restore`);const n=await this.findBackendTerminal();n&&(i===et.DISCONNECTED||i===et.ERROR?(this.stateMachine.transition("reconnect"),this.stateMachine.transition("reconnected")):i===et.CONNECTING&&this.stateMachine.transition("connected"),n.isExecuting===!1&&this.hideCursorOnExit(),I.info(`[reattach] Terminal ${this.terminalId} state restored to ${this.stateMachine.getState()}`))}const s=this.xterm.element;if(s){e.appendChild(s),this.container=e,this.themeManager.setContainer(e),this.disposeWebglAddon(),this.themeManager.applyTheme(this.xterm),this.themeManager.getCurrentTheme().isDark?this.loadWebglAddon():I.debug("[Renderer] Using Canvas renderer after move (light theme)"),this.fitAfterReattach(e),this.setupResizeObserver(),this.setupXTermEventHandlers(),this.commandBuffer="",this.currentLineBuffer="",this.isAtPrompt=!1,this.startHeartbeat(),requestAnimationFrame(()=>{!this.isDisposed&&this.isVisible&&this.xterm.focus()});return}I.warn(`Could not move terminal element, recreating for terminal ${this.terminalId}`),this.container&&(this.container.innerHTML=""),this.disposeWebglAddon(),this.dataDisposable&&(this.dataDisposable.dispose(),this.dataDisposable=null),this.container=e,this.themeManager.setContainer(e),this.isXtermOpened&&I.warn(`[reattach] XTerm was already opened for terminal ${this.terminalId}, calling open() again may cause duplicate handlers`),this.xterm.open(e),this.isXtermOpened=!0,this.themeManager.applyTheme(this.xterm),this.themeManager.getCurrentTheme().isDark?this.loadWebglAddon():I.debug("[Renderer] Using Canvas renderer on reattach (light theme)"),this.fitAfterReattach(e),this.setupXTermEventHandlers(),this.setupResizeObserver(),this.commandBuffer="",this.currentLineBuffer="",this.isAtPrompt=!1,this.startHeartbeat(),requestAnimationFrame(()=>{!this.isDisposed&&this.isVisible&&this.xterm.focus()})}updateCallbacks(e){Object.assign(this.callbacks,e)}updateFontFamily(e){this.isDisposed||this.xterm.options.fontFamily!==e&&(this.xterm.options.fontFamily=e)}findNext(e,i){return this.searchAddon.findNext(e,{caseSensitive:i?.caseSensitive??!1,wholeWord:i?.wholeWord??!1,regex:i?.regex??!1,incremental:!1,decorations:this.getSearchDecorations()})}findPrevious(e,i){return this.searchAddon.findPrevious(e,{caseSensitive:i?.caseSensitive??!1,wholeWord:i?.wholeWord??!1,regex:i?.regex??!1,incremental:!1,decorations:this.getSearchDecorations()})}clearSearch(){this.searchAddon.clearDecorations()}getSelection(){return this.xterm.getSelection()}getInfo(){const e=this.bufferManager.getStats();return{id:this.terminalId,workspaceId:this.workspaceId,state:this.stateMachine.getState(),cwd:this.lastCwd,isExecuting:this.isExecuting,stats:e?{bufferSize:e.size,lineCount:e.lineCount,uptime:Date.now()-this.startTime}:void 0}}startHeartbeat(){this.heartbeatTimer||this.isDisposed||(I.debug(`[heartbeat] Starting for terminal ${this.terminalId} (every ${Ae.HEARTBEAT_INTERVAL_MS}ms)`),this.heartbeatTimer=setInterval(()=>{this.performHealthCheck()},Ae.HEARTBEAT_INTERVAL_MS))}stopHeartbeat(){this.heartbeatTimer&&(clearInterval(this.heartbeatTimer),this.heartbeatTimer=null,I.debug(`[heartbeat] Stopped for terminal ${this.terminalId}`))}async performHealthCheck(){if(this.isDisposed||!this.ipcCleanup||this.stateMachine.getState()!==et.CONNECTED)return;let e=null;try{const i=await Promise.race([this.terminalExistsOnBackend(),new Promise((s,r)=>{e=setTimeout(()=>r(new Error("Heartbeat timeout")),Ae.HEARTBEAT_TIMEOUT_MS)})]);if(e&&clearTimeout(e),this.isDisposed)return;i||(I.warn(`[heartbeat] Terminal ${this.terminalId}: PTY not found on backend, transitioning to DISCONNECTED`),this.stopHeartbeat(),this.stateMachine.transition("disconnect"))}catch(i){if(e&&clearTimeout(e),this.isDisposed)return;I.warn(`[heartbeat] Terminal ${this.terminalId}: health check failed:`,i),this.stopHeartbeat(),this.stateMachine.transition("disconnect")}}scheduleAutoReconnect(){if(this.isDisposed)return;if(this.autoReconnectAttempts>=Ae.MAX_RECONNECT_ATTEMPTS){I.warn(`[auto-reconnect] Terminal ${this.terminalId}: max reconnect attempts (${Ae.MAX_RECONNECT_ATTEMPTS}) reached, giving up`);return}this.cancelAutoReconnect();const e=Ae.BASE_RECONNECT_DELAY_MS*Math.pow(2,this.autoReconnectAttempts);this.autoReconnectAttempts++,I.info(`[auto-reconnect] Terminal ${this.terminalId}: scheduling attempt ${this.autoReconnectAttempts}/${Ae.MAX_RECONNECT_ATTEMPTS} in ${e}ms`),this.autoReconnectTimer=setTimeout(()=>{this.autoReconnectTimer=null,this.attemptAutoReconnect()},e)}cancelAutoReconnect(){this.autoReconnectTimer&&(clearTimeout(this.autoReconnectTimer),this.autoReconnectTimer=null)}async attemptAutoReconnect(){if(this.isDisposed)return;const e=this.stateMachine.getState();if(e!==et.DISCONNECTED&&e!==et.ERROR){I.debug(`[auto-reconnect] Terminal ${this.terminalId}: skipping, state is ${e}`);return}this.exitedNormally=!1,I.info(`[auto-reconnect] Terminal ${this.terminalId}: attempting reconnect (attempt ${this.autoReconnectAttempts})`);try{const i=await this.findBackendTerminal();if(this.isDisposed)return;i?(I.info(`[auto-reconnect] Terminal ${this.terminalId}: PTY exists on backend, re-establishing connection`),this.setupIpcEventHandlers(),this.stateMachine.transition("reconnect"),this.stateMachine.transition("reconnected"),this.xterm.cols&&this.xterm.rows&&this.resize(this.xterm.cols,this.xterm.rows),i.isExecuting===!1&&this.hideCursorOnExit(),this.callbacks.onReady?.(),I.info(`[auto-reconnect] Terminal ${this.terminalId}: reconnected successfully`)):(I.info(`[auto-reconnect] Terminal ${this.terminalId}: PTY not found, creating new PTY`),await this.reconnect(),I.info(`[auto-reconnect] Terminal ${this.terminalId}: new PTY created successfully`))}catch(i){I.error(`[auto-reconnect] Terminal ${this.terminalId}: attempt ${this.autoReconnectAttempts} failed:`,i),this.scheduleAutoReconnect()}}handleError(e){I.error(`Terminal ${this.terminalId} error:`,e),this.callbacks.onError?.(e),this.isDisposed||this.xterm.writeln(`\r
143
143
  \x1B[31m${Fs.terminal_adapter_errorLine_label({message:e.message})}\x1B[0m\r
144
- `)}handleLinkClick(e){try{if(qh(e)||this.workspaceId===Gh){I.debug("Opening terminal link in external browser",{uri:e,workspaceId:this.workspaceId}),Ns("shell:openExternal",{url:e});return}Bn(async()=>{const{resolveBrowserLinkForOpen:i}=await import("./DKPFCCGK.js").then(s=>s.b);return{resolveBrowserLinkForOpen:i}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30]),import.meta.url).then(({resolveBrowserLinkForOpen:i})=>i(e)).catch(()=>({url:e})).then(i=>{Bn(async()=>{const{getPanelLayoutManager:s}=await import("./fE-kcmYj.js").then(r=>r.p);return{getPanelLayoutManager:s}},__vite__mapDeps([31,21,22,5,23,24,3,8,4,25,15,2,32,33]),import.meta.url).then(({getPanelLayoutManager:s})=>{s(this.workspaceId).openBrowserPanel(i.url,void 0,void 0,i.requestedUrl),I.debug("Opened URL in browser panel",{uri:e,resolvedUrl:i.url,workspaceId:this.workspaceId})}).catch(s=>{I.warn("Failed to open URL in browser panel, falling back to external browser",{uri:e,error:s}),Ns("shell:openExternal",{url:i.url})})})}catch(i){I.warn("Failed to handle link click",{uri:e,error:i}),Ns("shell:openExternal",{url:e})}}async reconnect(){if(this.isDisposed)throw new Error("Cannot reconnect disposed terminal");if(!this.stateMachine.canTransition("reconnect"))throw new Error(`Cannot reconnect in state ${this.stateMachine.getState()}`);this.exitedNormally=!1,this.stateMachine.transition("reconnect");try{const e=this.xterm.cols,i=this.xterm.rows,s=await this.terminals.create({workspaceId:this.workspaceId,cols:e,rows:i});if(!s.success)throw new Error(s.error||Fs.terminal_adapter_reconnectFailed_error());s.id&&(this.terminalId=s.id),this.setupIpcEventHandlers(),this.stateMachine.transition("reconnected"),this.restoreCursor(),this.callbacks.onReady?.()}catch(e){throw this.stateMachine.reportError(e),e}}detach(){this.ipcCleanup&&(this.ipcCleanup(),this.ipcCleanup=null),this.stopHeartbeat(),this.cancelAutoReconnect(),this.cancelReattachFit(),this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),this.visibilityObserver&&(this.visibilityObserver.disconnect(),this.visibilityObserver=null),this.resizeDebounceTimer&&(clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=null);const e=this.xterm.element;e&&e.parentNode&&e.parentNode.removeChild(e),this.themeManager.setContainer(null),this.container=null}dispose(e={}){if(!(this.isDisposed||this.stateMachine.isDisposed())){if(this.isDisposed=!0,this.cancelAutoReconnect(),this.stopHeartbeat(),this.cancelReattachFit(),this.stateMachine.transition("dispose"),this.saveBuffer().catch(()=>{}),this.resizeDebounceTimer&&(clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=null),this.bufferSaveTimer&&(clearInterval(this.bufferSaveTimer),this.bufferSaveTimer=null),this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),this.visibilityObserver&&(this.visibilityObserver.disconnect(),this.visibilityObserver=null),this.dataDisposable){try{this.dataDisposable.dispose()}catch(i){I.error("Error disposing data handler:",i)}this.dataDisposable=null}if(this.resizeDisposable){try{this.resizeDisposable.dispose()}catch(i){I.error("Error disposing resize handler:",i)}this.resizeDisposable=null}if(this.selectionDisposable){try{this.selectionDisposable.dispose()}catch(i){I.error("Error disposing selection handler:",i)}this.selectionDisposable=null}if(this.ipcCleanup){try{this.ipcCleanup()}catch(i){I.error("Error cleaning up IPC handlers:",i)}this.ipcCleanup=null}if(this.themeCleanup){try{this.themeCleanup()}catch(i){I.error("Error cleaning up theme listener:",i)}this.themeCleanup=null}this.eventListeners.forEach(i=>{try{i()}catch(s){I.error("Error cleaning up event listener:",s)}}),this.eventListeners=[],e.killPty!==!1&&this.terminals.kill(this.terminalId,this.workspaceId).catch(i=>{I.error("Error killing PTY connection:",i)});try{this.searchAddon?.dispose&&this.searchAddon.dispose(),this.webLinksAddon?.dispose&&this.webLinksAddon.dispose(),this.disposeWebglAddon(),this.fitAddon?.dispose&&this.fitAddon.dispose()}catch(i){I.error("Error disposing addons:",i)}try{this.themeManager.dispose()}catch(i){I.error("Error disposing theme manager:",i)}try{this.stateMachine.dispose()}catch(i){I.error("Error disposing state machine:",i)}Kf(this.xterm,i=>{I.error("Error disposing xterm:",i)})}}};P(Ae,"MAX_RECONNECT_ATTEMPTS",5),P(Ae,"BASE_RECONNECT_DELAY_MS",1e3),P(Ae,"HEARTBEAT_INTERVAL_MS",3e4),P(Ae,"HEARTBEAT_TIMEOUT_MS",1e4),P(Ae,"MAX_WEBGL_RECOVERY_ATTEMPTS",3);let dn=Ae;const le=new ji("TerminalManager");class jf{constructor(){P(this,"terminals",new Map)}saveTerminalMetadata(e,i,s){try{_t.dispatch(Yh(i,e,s,new Date().toISOString())),le.debug(`[RendererTerminalManager] Saved terminal metadata for ${e}`)}catch(r){le.error("[RendererTerminalManager] Failed to save terminal metadata:",r)}}loadTerminalMetadata(e){try{return Jh.select(_t.state,e).map(i=>({terminalId:i.id,workspaceId:i.workspaceId??e,createdAt:i.createdAt??"",title:i.customName||Qh(i.name)}))}catch(i){le.error("[RendererTerminalManager] Failed to load terminal metadata:",i)}return[]}removeTerminalMetadata(e,i){try{_t.dispatch(Xh(i,e)),le.debug(`[RendererTerminalManager] Removed terminal metadata for ${e}`)}catch(s){le.error("[RendererTerminalManager] Failed to remove terminal metadata:",s)}}hasTerminal(e){return this.terminals.has(e)}async getOrCreateTerminal(e,i,s,r,n=!1){let o=this.terminals.get(e);if(n&&o&&(le.info(`[RendererTerminalManager] Force creating new terminal, disposing existing: ${e}`),this.disposeTerminal(e),o=void 0),o)if(o.workspaceId!==i)le.warn(`[RendererTerminalManager] Terminal ${e} has mismatched workspaceId (has: ${o.workspaceId}, requested: ${i}). Disposing and recreating.`),this.disposeTerminal(e),o=void 0;else return le.info(`[RendererTerminalManager] Reattaching to existing terminal: ${e} (was attached: ${o.isAttached})`),o.container=s,o.isAttached=!0,await o.adapter.reattach(s),r&&(o.adapter.updateCallbacks(r),r.onReady?.()),le.info(`[RendererTerminalManager] Successfully reattached terminal: ${e}`),o.adapter;le.info(`[RendererTerminalManager] Creating new terminal: ${e}`);const a=new dn({workspaceId:i,terminalId:e,container:s,...r});return o={adapter:a,terminalId:e,workspaceId:i,isAttached:!0,container:s},this.terminals.set(e,o),this.saveTerminalMetadata(e,i),await a.initialize(n),a}isAttachedTo(e,i){const s=this.terminals.get(e);return!!s&&s.isAttached&&s.container===i}detachTerminal(e,i){const s=this.terminals.get(e);if(s){if(i&&s.container!==i){le.info(`[RendererTerminalManager] Ignoring detach from a stale surface: ${e}`);return}le.info(`[RendererTerminalManager] Detaching terminal: ${e}`),s.isAttached=!1,s.adapter.detach(),s.container=null}}disposeTerminal(e,i){const s=this.terminals.get(e);s?(le.info(`[RendererTerminalManager] Disposing terminal: ${e}`),s.adapter.dispose(),this.terminals.delete(e),this.removeTerminalMetadata(e,s.workspaceId)):_t.dispatch(jh(e,i))}disposeExitedTerminal(e){const i=this.terminals.get(e);i&&(le.info(`[RendererTerminalManager] Disposing exited terminal: ${e}`),i.adapter.dispose({killPty:!1}),this.terminals.delete(e))}clearTerminal(e){const i=this.terminals.get(e);i&&(le.info(`[RendererTerminalManager] Clearing terminal: ${e}`),i.adapter.clear())}getTerminalInfo(e){const i=this.terminals.get(e);return i?i.adapter.getInfo():null}async getBufferContent(e,i){const s=this.terminals.get(e);if(s?.adapter)try{const r=s.adapter.xterm;if(r?.buffer?.active){const n=r.buffer.active,o=[];for(let a=0;a<n.length;a++){const l=n.getLine(a);l&&o.push(l.translateToString(!0))}for(;o.length>0&&!o[o.length-1].trim();)o.pop();if(o.length>0)return o.join(`
144
+ `)}handleLinkClick(e){try{if(qh(e)||this.workspaceId===Gh){I.debug("Opening terminal link in external browser",{uri:e,workspaceId:this.workspaceId}),Ns("shell:openExternal",{url:e});return}Bn(async()=>{const{resolveBrowserLinkForOpen:i}=await import("./BrR0973A.js").then(s=>s.b);return{resolveBrowserLinkForOpen:i}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30]),import.meta.url).then(({resolveBrowserLinkForOpen:i})=>i(e)).catch(()=>({url:e})).then(i=>{Bn(async()=>{const{getPanelLayoutManager:s}=await import("./C1ha510g.js").then(r=>r.p);return{getPanelLayoutManager:s}},__vite__mapDeps([31,21,22,5,23,24,3,8,4,25,15,2,32,33]),import.meta.url).then(({getPanelLayoutManager:s})=>{s(this.workspaceId).openBrowserPanel(i.url,void 0,void 0,i.requestedUrl),I.debug("Opened URL in browser panel",{uri:e,resolvedUrl:i.url,workspaceId:this.workspaceId})}).catch(s=>{I.warn("Failed to open URL in browser panel, falling back to external browser",{uri:e,error:s}),Ns("shell:openExternal",{url:i.url})})})}catch(i){I.warn("Failed to handle link click",{uri:e,error:i}),Ns("shell:openExternal",{url:e})}}async reconnect(){if(this.isDisposed)throw new Error("Cannot reconnect disposed terminal");if(!this.stateMachine.canTransition("reconnect"))throw new Error(`Cannot reconnect in state ${this.stateMachine.getState()}`);this.exitedNormally=!1,this.stateMachine.transition("reconnect");try{const e=this.xterm.cols,i=this.xterm.rows,s=await this.terminals.create({workspaceId:this.workspaceId,cols:e,rows:i});if(!s.success)throw new Error(s.error||Fs.terminal_adapter_reconnectFailed_error());s.id&&(this.terminalId=s.id),this.setupIpcEventHandlers(),this.stateMachine.transition("reconnected"),this.restoreCursor(),this.callbacks.onReady?.()}catch(e){throw this.stateMachine.reportError(e),e}}detach(){this.ipcCleanup&&(this.ipcCleanup(),this.ipcCleanup=null),this.stopHeartbeat(),this.cancelAutoReconnect(),this.cancelReattachFit(),this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),this.visibilityObserver&&(this.visibilityObserver.disconnect(),this.visibilityObserver=null),this.resizeDebounceTimer&&(clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=null);const e=this.xterm.element;e&&e.parentNode&&e.parentNode.removeChild(e),this.themeManager.setContainer(null),this.container=null}dispose(e={}){if(!(this.isDisposed||this.stateMachine.isDisposed())){if(this.isDisposed=!0,this.cancelAutoReconnect(),this.stopHeartbeat(),this.cancelReattachFit(),this.stateMachine.transition("dispose"),this.saveBuffer().catch(()=>{}),this.resizeDebounceTimer&&(clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=null),this.bufferSaveTimer&&(clearInterval(this.bufferSaveTimer),this.bufferSaveTimer=null),this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),this.visibilityObserver&&(this.visibilityObserver.disconnect(),this.visibilityObserver=null),this.dataDisposable){try{this.dataDisposable.dispose()}catch(i){I.error("Error disposing data handler:",i)}this.dataDisposable=null}if(this.resizeDisposable){try{this.resizeDisposable.dispose()}catch(i){I.error("Error disposing resize handler:",i)}this.resizeDisposable=null}if(this.selectionDisposable){try{this.selectionDisposable.dispose()}catch(i){I.error("Error disposing selection handler:",i)}this.selectionDisposable=null}if(this.ipcCleanup){try{this.ipcCleanup()}catch(i){I.error("Error cleaning up IPC handlers:",i)}this.ipcCleanup=null}if(this.themeCleanup){try{this.themeCleanup()}catch(i){I.error("Error cleaning up theme listener:",i)}this.themeCleanup=null}this.eventListeners.forEach(i=>{try{i()}catch(s){I.error("Error cleaning up event listener:",s)}}),this.eventListeners=[],e.killPty!==!1&&this.terminals.kill(this.terminalId,this.workspaceId).catch(i=>{I.error("Error killing PTY connection:",i)});try{this.searchAddon?.dispose&&this.searchAddon.dispose(),this.webLinksAddon?.dispose&&this.webLinksAddon.dispose(),this.disposeWebglAddon(),this.fitAddon?.dispose&&this.fitAddon.dispose()}catch(i){I.error("Error disposing addons:",i)}try{this.themeManager.dispose()}catch(i){I.error("Error disposing theme manager:",i)}try{this.stateMachine.dispose()}catch(i){I.error("Error disposing state machine:",i)}Kf(this.xterm,i=>{I.error("Error disposing xterm:",i)})}}};P(Ae,"MAX_RECONNECT_ATTEMPTS",5),P(Ae,"BASE_RECONNECT_DELAY_MS",1e3),P(Ae,"HEARTBEAT_INTERVAL_MS",3e4),P(Ae,"HEARTBEAT_TIMEOUT_MS",1e4),P(Ae,"MAX_WEBGL_RECOVERY_ATTEMPTS",3);let dn=Ae;const le=new ji("TerminalManager");class jf{constructor(){P(this,"terminals",new Map)}saveTerminalMetadata(e,i,s){try{_t.dispatch(Yh(i,e,s,new Date().toISOString())),le.debug(`[RendererTerminalManager] Saved terminal metadata for ${e}`)}catch(r){le.error("[RendererTerminalManager] Failed to save terminal metadata:",r)}}loadTerminalMetadata(e){try{return Jh.select(_t.state,e).map(i=>({terminalId:i.id,workspaceId:i.workspaceId??e,createdAt:i.createdAt??"",title:i.customName||Qh(i.name)}))}catch(i){le.error("[RendererTerminalManager] Failed to load terminal metadata:",i)}return[]}removeTerminalMetadata(e,i){try{_t.dispatch(Xh(i,e)),le.debug(`[RendererTerminalManager] Removed terminal metadata for ${e}`)}catch(s){le.error("[RendererTerminalManager] Failed to remove terminal metadata:",s)}}hasTerminal(e){return this.terminals.has(e)}async getOrCreateTerminal(e,i,s,r,n=!1){let o=this.terminals.get(e);if(n&&o&&(le.info(`[RendererTerminalManager] Force creating new terminal, disposing existing: ${e}`),this.disposeTerminal(e),o=void 0),o)if(o.workspaceId!==i)le.warn(`[RendererTerminalManager] Terminal ${e} has mismatched workspaceId (has: ${o.workspaceId}, requested: ${i}). Disposing and recreating.`),this.disposeTerminal(e),o=void 0;else return le.info(`[RendererTerminalManager] Reattaching to existing terminal: ${e} (was attached: ${o.isAttached})`),o.container=s,o.isAttached=!0,await o.adapter.reattach(s),r&&(o.adapter.updateCallbacks(r),r.onReady?.()),le.info(`[RendererTerminalManager] Successfully reattached terminal: ${e}`),o.adapter;le.info(`[RendererTerminalManager] Creating new terminal: ${e}`);const a=new dn({workspaceId:i,terminalId:e,container:s,...r});return o={adapter:a,terminalId:e,workspaceId:i,isAttached:!0,container:s},this.terminals.set(e,o),this.saveTerminalMetadata(e,i),await a.initialize(n),a}isAttachedTo(e,i){const s=this.terminals.get(e);return!!s&&s.isAttached&&s.container===i}detachTerminal(e,i){const s=this.terminals.get(e);if(s){if(i&&s.container!==i){le.info(`[RendererTerminalManager] Ignoring detach from a stale surface: ${e}`);return}le.info(`[RendererTerminalManager] Detaching terminal: ${e}`),s.isAttached=!1,s.adapter.detach(),s.container=null}}disposeTerminal(e,i){const s=this.terminals.get(e);s?(le.info(`[RendererTerminalManager] Disposing terminal: ${e}`),s.adapter.dispose(),this.terminals.delete(e),this.removeTerminalMetadata(e,s.workspaceId)):_t.dispatch(jh(e,i))}disposeExitedTerminal(e){const i=this.terminals.get(e);i&&(le.info(`[RendererTerminalManager] Disposing exited terminal: ${e}`),i.adapter.dispose({killPty:!1}),this.terminals.delete(e))}clearTerminal(e){const i=this.terminals.get(e);i&&(le.info(`[RendererTerminalManager] Clearing terminal: ${e}`),i.adapter.clear())}getTerminalInfo(e){const i=this.terminals.get(e);return i?i.adapter.getInfo():null}async getBufferContent(e,i){const s=this.terminals.get(e);if(s?.adapter)try{const r=s.adapter.xterm;if(r?.buffer?.active){const n=r.buffer.active,o=[];for(let a=0;a<n.length;a++){const l=n.getLine(a);l&&o.push(l.translateToString(!0))}for(;o.length>0&&!o[o.length-1].trim();)o.pop();if(o.length>0)return o.join(`
145
145
  `)}}catch(r){le.warn("[RendererTerminalManager] Failed to read live buffer, falling back:",r)}try{const n=await new Ds(i,e).restoreBuffer();if(n&&n.lines.length>0){const o=[...n.lines];for(;o.length>0&&!o[o.length-1].trim();)o.pop();return o.join(`
146
146
  `)}}catch(r){le.error("[RendererTerminalManager] Failed to read persisted buffer:",r)}return null}disposeWorkspaceTerminals(e){const i=[];for(const[s,r]of this.terminals)r.workspaceId===e&&i.push(s);if(i.length>0){le.info(`[RendererTerminalManager] Disposing ${i.length} terminals for workspace ${e}`);for(const s of i)try{const r=this.terminals.get(s);r&&(r.adapter.dispose(),this.terminals.delete(s))}catch(r){le.error(`[RendererTerminalManager] Failed to dispose terminal ${s}:`,r)}}}disposeAll(){le.info(`[RendererTerminalManager] Disposing all ${this.terminals.size} terminals`);for(const[e,i]of this.terminals)try{i.adapter.dispose()}catch(s){le.error(`[RendererTerminalManager] Failed to dispose terminal ${e}:`,s)}this.terminals.clear()}}typeof window<"u"&&!window.__terminalManager&&(window.__terminalManager=new jf);const Zf=window.__terminalManager,Np=Object.freeze(Object.defineProperty({__proto__:null,terminalManager:Zf},Symbol.toStringTag,{value:"Module"}));export{hu as D,mu as L,ln as T,Kf as a,Zf as b,Np as c,Fp as d,du as o,Ut as s,Ii as t};
@@ -1 +1 @@
1
- import{t as g,bq as n,bt as v,by as b,br as h,b as x}from"./DGQ1ECsI.js";import{bs as y,a7 as S,ay as w,aD as _,W as k,bn as z,aA as i,c9 as C}from"./DYhIMPy1.js";import{c as A}from"./CJeZnjZ2.js";import{e as I,p as M}from"./Bp_k45o-.js";import{S as P}from"./iP2vS2hx.js";var W=new Set(["$$slots","$$events","$$legacy","ref","class","data-slot"]);function D(l,t){if(new.target)return g({component:D,...l});y(t,!0);let a=n(t,"ref",15,null),r=n(t,"class",7),s=n(t,"data-slot",7,"separator"),c=h(t,W);var m={get ref(){return a()},set ref(e=null){a(e),i()},get class(){return r()},set class(e){r(e),i()},get"data-slot"(){return s()},set"data-slot"(e="separator"){s(e),i()},$set:b,$on:(e,o)=>x(t,e,o)},p=S(),d=w(p);{let e=C(()=>I("shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",r()));A(d,()=>P,(o,u)=>{u(o,v({get"data-slot"(){return s()},get class(){return _(e)}},()=>c,{get ref(){return a()},set ref(f){a(f)}}))})}return k(l,p),z(m)}const F=[{id:"separator-state-matrix",title:"Separator states",states:["horizontal","vertical","decorative","semantic","compact","zoom-200","light","dark"],themes:["light","dark","high-contrast"],viewport:"both"}];M({id:"separator",source:"src/lib/components/ui/separator/separator.svelte",publicImport:"$lib/components/ui/separator",legacyImports:["$lib/components/ui/separator/index.js"],exports:["Root","Separator","separatorMetadata"],category:"primitive",owner:"design-system",callers:["src/features/discussions/components/DiscussionMentionPicker.svelte","src/features/home/HomeAssistantThreads.svelte","src/features/workspace-sharing/components/WorkspaceSharingSetup.svelte","src/lib/component-catalog/renderers/ContentFieldCatalogPreview.svelte","src/lib/components/file-explorer/file-explorer-layout.svelte","src/lib/components/ui/sidebar/sidebar-separator.svelte","src/lib/components/workspace/WorkspaceAgentsList.svelte"],replacement:null,characterizationTest:"src/lib/components/ui/separator/separator.test.ts",removalGate:"Retain while exported and orientation, semantic, and fixture tests pass.",dynamicImports:[],fixtures:F});export{D as S};
1
+ import{t as g,bq as n,bt as v,by as b,br as h,b as x}from"./41c-5lbJ.js";import{bs as y,a7 as S,ay as w,aD as _,W as k,bn as z,aA as i,c9 as C}from"./DYhIMPy1.js";import{c as A}from"./Dv-TQImR.js";import{e as I,p as M}from"./BBCbq-hE.js";import{S as P}from"./D2kFrNtb.js";var W=new Set(["$$slots","$$events","$$legacy","ref","class","data-slot"]);function D(l,t){if(new.target)return g({component:D,...l});y(t,!0);let a=n(t,"ref",15,null),r=n(t,"class",7),s=n(t,"data-slot",7,"separator"),c=h(t,W);var m={get ref(){return a()},set ref(e=null){a(e),i()},get class(){return r()},set class(e){r(e),i()},get"data-slot"(){return s()},set"data-slot"(e="separator"){s(e),i()},$set:b,$on:(e,o)=>x(t,e,o)},p=S(),d=w(p);{let e=C(()=>I("shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",r()));A(d,()=>P,(o,u)=>{u(o,v({get"data-slot"(){return s()},get class(){return _(e)}},()=>c,{get ref(){return a()},set ref(f){a(f)}}))})}return k(l,p),z(m)}const F=[{id:"separator-state-matrix",title:"Separator states",states:["horizontal","vertical","decorative","semantic","compact","zoom-200","light","dark"],themes:["light","dark","high-contrast"],viewport:"both"}];M({id:"separator",source:"src/lib/components/ui/separator/separator.svelte",publicImport:"$lib/components/ui/separator",legacyImports:["$lib/components/ui/separator/index.js"],exports:["Root","Separator","separatorMetadata"],category:"primitive",owner:"design-system",callers:["src/features/discussions/components/DiscussionMentionPicker.svelte","src/features/home/HomeAssistantThreads.svelte","src/features/workspace-sharing/components/WorkspaceSharingSetup.svelte","src/lib/component-catalog/renderers/ContentFieldCatalogPreview.svelte","src/lib/components/file-explorer/file-explorer-layout.svelte","src/lib/components/ui/sidebar/sidebar-separator.svelte","src/lib/components/workspace/WorkspaceAgentsList.svelte"],replacement:null,characterizationTest:"src/lib/components/ui/separator/separator.test.ts",removalGate:"Retain while exported and orientation, semantic, and fixture tests pass.",dynamicImports:[],fixtures:F});export{D as S};