@dylanpiercey/work 0.0.141 → 0.0.143

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 (556) hide show
  1. package/dist/index.mjs +16815 -10692
  2. package/dist/public/assets/{_DLzJNX7C.js → _0gdzfuwb.js} +1 -1
  3. package/dist/public/assets/_0gdzfuwb.js.br +0 -0
  4. package/dist/public/assets/_3e5vpyoY.js +1 -0
  5. package/dist/public/assets/_5AJ_AKid.js +1 -0
  6. package/dist/public/assets/_5AJ_AKid.js.br +0 -0
  7. package/dist/public/assets/_5cJqJSYA.js +1 -0
  8. package/dist/public/assets/_5cJqJSYA.js.br +0 -0
  9. package/dist/public/assets/_A2wGvgf0.js +1 -0
  10. package/dist/public/assets/_B2LkwyUu.js +1 -0
  11. package/dist/public/assets/_B2LkwyUu.js.br +0 -0
  12. package/dist/public/assets/{_TsHAzFfC.js → _B7sBnSVB.js} +1 -1
  13. package/dist/public/assets/_B7sBnSVB.js.br +0 -0
  14. package/dist/public/assets/_B7sulDMZ.js +1 -0
  15. package/dist/public/assets/_B7sulDMZ.js.br +0 -0
  16. package/dist/public/assets/_BAfg1_wL.js +1 -0
  17. package/dist/public/assets/_BAfg1_wL.js.br +0 -0
  18. package/dist/public/assets/{_BERiWLR2.js → _BCq3eWBs.js} +1 -1
  19. package/dist/public/assets/_BCq3eWBs.js.br +0 -0
  20. package/dist/public/assets/_BE-5_Vob.js +1 -0
  21. package/dist/public/assets/_BE-5_Vob.js.br +0 -0
  22. package/dist/public/assets/_BE-cBzrM.js +1 -0
  23. package/dist/public/assets/_BE-cBzrM.js.br +0 -0
  24. package/dist/public/assets/_BEoBkcdi.js +1 -0
  25. package/dist/public/assets/{_Da8gt_F52.js → _BI6nDtQe.js} +1 -1
  26. package/dist/public/assets/_BI6nDtQe.js.br +0 -0
  27. package/dist/public/assets/{_hN1-RJcA.js → _BIPSG49u.js} +1 -1
  28. package/dist/public/assets/_BJLWIg3J.js +1 -0
  29. package/dist/public/assets/{_DgCQT80U.js → _BKkKlZgz.js} +1 -1
  30. package/dist/public/assets/_BKkKlZgz.js.br +0 -0
  31. package/dist/public/assets/{_DvHOWoGF.js → _BLsa44WM.js} +1 -1
  32. package/dist/public/assets/_BLsa44WM.js.br +0 -0
  33. package/dist/public/assets/_BMLL4cWB.js +1 -0
  34. package/dist/public/assets/_BMLL4cWB.js.br +0 -0
  35. package/dist/public/assets/{_BuLSZuTT2.js → _BNeDY6c6.js} +1 -1
  36. package/dist/public/assets/_BOllftHQ.js +1 -0
  37. package/dist/public/assets/_BOllftHQ.js.br +0 -0
  38. package/dist/public/assets/_BPanIK56.js +1 -0
  39. package/dist/public/assets/_BPanIK56.js.br +0 -0
  40. package/dist/public/assets/_BV5QcD1t.js +1 -0
  41. package/dist/public/assets/_BV5QcD1t.js.br +0 -0
  42. package/dist/public/assets/_BWxWv3Q4.js +1 -0
  43. package/dist/public/assets/_BWxWv3Q4.js.br +0 -0
  44. package/dist/public/assets/_BY9Zpo-y.js +1 -0
  45. package/dist/public/assets/_BY9Zpo-y.js.br +0 -0
  46. package/dist/public/assets/{_B8bLTrAR.js → _BZiRiFuW.js} +1 -1
  47. package/dist/public/assets/_BZiRiFuW.js.br +0 -0
  48. package/dist/public/assets/_BfqywnWV.js +1 -0
  49. package/dist/public/assets/_BfqywnWV.js.br +0 -0
  50. package/dist/public/assets/_BhpLuC-Z.js +1 -0
  51. package/dist/public/assets/_BhpLuC-Z.js.br +0 -0
  52. package/dist/public/assets/_BkmuJnv4.js +1 -0
  53. package/dist/public/assets/_BkmuJnv4.js.br +0 -0
  54. package/dist/public/assets/_BlbpeXEW.js +1 -0
  55. package/dist/public/assets/_BmhN3Nyl.js +1 -0
  56. package/dist/public/assets/_BmhN3Nyl.js.br +0 -0
  57. package/dist/public/assets/_Bmi9ioLs.js +1 -0
  58. package/dist/public/assets/_BzVfXLzU.js +1 -0
  59. package/dist/public/assets/{_DcfWOyup.js → _C2c05-aV.js} +1 -1
  60. package/dist/public/assets/_C2c05-aV.js.br +0 -0
  61. package/dist/public/assets/_C3EMIoXk.js +1 -0
  62. package/dist/public/assets/_C3EMIoXk.js.br +0 -0
  63. package/dist/public/assets/_C3vzIjs1.js +1 -0
  64. package/dist/public/assets/_C3vzIjs1.js.br +0 -0
  65. package/dist/public/assets/_C6F_DycA.js +1 -0
  66. package/dist/public/assets/_C6F_DycA.js.br +0 -0
  67. package/dist/public/assets/_C7Qx5vsK.js +1 -0
  68. package/dist/public/assets/_C7Qx5vsK.js.br +0 -0
  69. package/dist/public/assets/_C8OhMxob.js +1 -0
  70. package/dist/public/assets/_C8OhMxob.js.br +0 -0
  71. package/dist/public/assets/{_B4zQcDgs.js → _CAjFT4sV.js} +1 -1
  72. package/dist/public/assets/_CAjFT4sV.js.br +0 -0
  73. package/dist/public/assets/_CENbzEJT.js +1 -0
  74. package/dist/public/assets/_CENbzEJT.js.br +0 -0
  75. package/dist/public/assets/_CMC6b9HF.js +1 -0
  76. package/dist/public/assets/_CMC6b9HF.js.br +0 -0
  77. package/dist/public/assets/{_CygMTO1C.js → _CNTJHRw3.js} +1 -1
  78. package/dist/public/assets/_CNTJHRw3.js.br +0 -0
  79. package/dist/public/assets/_COoyuGi7.js +1 -0
  80. package/dist/public/assets/_COoyuGi7.js.br +0 -0
  81. package/dist/public/assets/_CQJs3lWb.js +1 -0
  82. package/dist/public/assets/_CQJs3lWb.js.br +0 -0
  83. package/dist/public/assets/_CQTDE9K4.js +1 -0
  84. package/dist/public/assets/_CQTDE9K4.js.br +0 -0
  85. package/dist/public/assets/_CQtYx0Hw.js +1 -0
  86. package/dist/public/assets/_CQtYx0Hw.js.br +0 -0
  87. package/dist/public/assets/_CRzKmxW8.js +1 -0
  88. package/dist/public/assets/_CRzKmxW8.js.br +0 -0
  89. package/dist/public/assets/{_Dbp391kL2.js → _CVzjJEu4.js} +1 -1
  90. package/dist/public/assets/_CWH6qxYM.js +1 -0
  91. package/dist/public/assets/_CWH6qxYM.js.br +0 -0
  92. package/dist/public/assets/{_DFGJGEpB.js → _CZEx699l.js} +1 -1
  93. package/dist/public/assets/_CZEx699l.js.br +0 -0
  94. package/dist/public/assets/{_p1qRbXAM.js → _CaR0Cm4R.js} +1 -1
  95. package/dist/public/assets/_CaR0Cm4R.js.br +0 -0
  96. package/dist/public/assets/_Cc2pSvWm.js +1 -0
  97. package/dist/public/assets/{_CSJQogH62.js → _Ceg68iFQ.js} +1 -1
  98. package/dist/public/assets/_Ceg68iFQ.js.br +0 -0
  99. package/dist/public/assets/_CfwcpHky.js +1 -0
  100. package/dist/public/assets/_CfwcpHky.js.br +0 -0
  101. package/dist/public/assets/_ClmBPtsj.js +1 -0
  102. package/dist/public/assets/_ClmBPtsj.js.br +0 -0
  103. package/dist/public/assets/{_CUjz6cMW.js → _CmFrqHJw.js} +1 -1
  104. package/dist/public/assets/_CmFrqHJw.js.br +0 -0
  105. package/dist/public/assets/{_DqxT_h3w.js → _CptijnhY.js} +1 -1
  106. package/dist/public/assets/_CptijnhY.js.br +0 -0
  107. package/dist/public/assets/_Ct0KrtgB.js +1 -0
  108. package/dist/public/assets/_Ct_oQB57.js +1 -0
  109. package/dist/public/assets/{_DXOGRSbq.js → _CwSTGRiH.js} +1 -1
  110. package/dist/public/assets/_CwSTGRiH.js.br +0 -0
  111. package/dist/public/assets/_D0ODP8pF.js +1 -0
  112. package/dist/public/assets/_D0ODP8pF.js.br +0 -0
  113. package/dist/public/assets/_D0OygaZT.js +1 -0
  114. package/dist/public/assets/_D0OygaZT.js.br +0 -0
  115. package/dist/public/assets/_D0TvPGyZ.js +1 -0
  116. package/dist/public/assets/_D0TvPGyZ.js.br +0 -0
  117. package/dist/public/assets/_D0p3M5lr.js +1 -0
  118. package/dist/public/assets/_D0p3M5lr.js.br +0 -0
  119. package/dist/public/assets/_D3JBLQPx.js +1 -0
  120. package/dist/public/assets/_D9Uq_kAm.js +1 -0
  121. package/dist/public/assets/_D9Uq_kAm.js.br +0 -0
  122. package/dist/public/assets/_DB-OQ-9y.js +1 -0
  123. package/dist/public/assets/_DB-OQ-9y.js.br +0 -0
  124. package/dist/public/assets/{_CoIipOdm.js → _DK7gU5UW.js} +1 -1
  125. package/dist/public/assets/_DK7gU5UW.js.br +0 -0
  126. package/dist/public/assets/_DPs98hXw.js +1 -0
  127. package/dist/public/assets/_DPs98hXw.js.br +0 -0
  128. package/dist/public/assets/_DSC0z2WY.js +1 -0
  129. package/dist/public/assets/_DSC0z2WY.js.br +0 -0
  130. package/dist/public/assets/_DSqTdrDE.js +1 -0
  131. package/dist/public/assets/_DVvz1278.js +1 -0
  132. package/dist/public/assets/_DW3nSckX.js +1 -0
  133. package/dist/public/assets/_DW3nSckX.js.br +0 -0
  134. package/dist/public/assets/_DWQbgPoS.js +1 -0
  135. package/dist/public/assets/_DWQbgPoS.js.br +0 -0
  136. package/dist/public/assets/_DWc1bOg5.js +1 -0
  137. package/dist/public/assets/_DWc1bOg5.js.br +0 -0
  138. package/dist/public/assets/_DadCbsTx.js +1 -0
  139. package/dist/public/assets/_DalQpFMm.js +1 -0
  140. package/dist/public/assets/_DbYA3moe.js +1 -0
  141. package/dist/public/assets/_DbYA3moe.js.br +0 -0
  142. package/dist/public/assets/_Dcq8o-F1.js +1 -0
  143. package/dist/public/assets/_DekxQCZG.js +1 -0
  144. package/dist/public/assets/_DekxQCZG.js.br +0 -0
  145. package/dist/public/assets/_DendWUyw.js +1 -0
  146. package/dist/public/assets/_DendWUyw.js.br +0 -0
  147. package/dist/public/assets/_DhdFcMUM.js +1 -0
  148. package/dist/public/assets/_DinKA_hx.js +1 -0
  149. package/dist/public/assets/_DinKA_hx.js.br +0 -0
  150. package/dist/public/assets/_DnNcgzzd.js +1536 -0
  151. package/dist/public/assets/_DnNcgzzd.js.br +0 -0
  152. package/dist/public/assets/_Dtdv7oY4.js +1 -0
  153. package/dist/public/assets/_Dtdv7oY4.js.br +0 -0
  154. package/dist/public/assets/_DxPa6R8r.js +1 -0
  155. package/dist/public/assets/_DxPa6R8r.js.br +0 -0
  156. package/dist/public/assets/{_DMc_yyoD2.js → _EnzWFNCd.js} +1 -1
  157. package/dist/public/assets/_EnzWFNCd.js.br +0 -0
  158. package/dist/public/assets/_I6bkQ0U8.js +1 -0
  159. package/dist/public/assets/_I6bkQ0U8.js.br +0 -0
  160. package/dist/public/assets/_IvbGWrWX.js +1 -0
  161. package/dist/public/assets/_IvbGWrWX.js.br +0 -0
  162. package/dist/public/assets/_K81ipFoO.js +1 -0
  163. package/dist/public/assets/_K81ipFoO.js.br +0 -0
  164. package/dist/public/assets/{_B2vPwdLW2.js → _Un2ZJKHi.js} +1 -1
  165. package/dist/public/assets/_Un2ZJKHi.js.br +0 -0
  166. package/dist/public/assets/_YkIvmgMd.js +1 -0
  167. package/dist/public/assets/_YkIvmgMd.js.br +0 -0
  168. package/dist/public/assets/_cXHJ5Aqj.js +1 -0
  169. package/dist/public/assets/_cXHJ5Aqj.js.br +0 -0
  170. package/dist/public/assets/{_DhEdWcLh.js → _eEx3xZw1.js} +1 -1
  171. package/dist/public/assets/_eEx3xZw1.js.br +0 -0
  172. package/dist/public/assets/_fT1Q2AHj.js +1 -0
  173. package/dist/public/assets/_fT1Q2AHj.js.br +0 -0
  174. package/dist/public/assets/{_CFuIV2fl.js → _fg40_ntQ.js} +1 -1
  175. package/dist/public/assets/_fg40_ntQ.js.br +0 -0
  176. package/dist/public/assets/_hePW80VL.js +1 -0
  177. package/dist/public/assets/_hfRJcieK.js +1 -0
  178. package/dist/public/assets/_hfRJcieK.js.br +0 -0
  179. package/dist/public/assets/_mQm0jPVv.js +1 -0
  180. package/dist/public/assets/_mQm0jPVv.js.br +0 -0
  181. package/dist/public/assets/{_Cs_1C06H.js → _owCQ3_5m.js} +1 -1
  182. package/dist/public/assets/_owCQ3_5m.js.br +0 -0
  183. package/dist/public/assets/_pyReIzhQ.js +83 -0
  184. package/dist/public/assets/_pyReIzhQ.js.br +0 -0
  185. package/dist/public/assets/_rMYAdrnY.js +1 -0
  186. package/dist/public/assets/_rMYAdrnY.js.br +0 -0
  187. package/dist/public/assets/_uvCtJ6zz.js +1 -0
  188. package/dist/public/assets/_uvCtJ6zz.js.br +0 -0
  189. package/dist/public/assets/_x_da49mF.js +1 -0
  190. package/dist/public/assets/_yGw4R7yw.js +1 -0
  191. package/dist/public/assets/{_CfpVtrZd.js → _zy6yt2JI.js} +1 -1
  192. package/dist/public/assets/_zy6yt2JI.js.br +0 -0
  193. package/dist/public/assets/app-page-B0f8itSE.css +1 -0
  194. package/dist/public/assets/app-page-B0f8itSE.css.br +0 -0
  195. package/dist/public/assets/diff-view-B0vo5Jai.js +2 -0
  196. package/dist/public/assets/diff-view-BxwS17IY.css +1 -0
  197. package/dist/public/assets/diff-view-BxwS17IY.css.br +0 -0
  198. package/dist/public/assets/icon-arrow-down-yHrjFe7f.css +1 -0
  199. package/dist/public/assets/icon-arrow-down-yHrjFe7f.css.br +0 -0
  200. package/dist/public/assets/new-DIWv_y0V.js +1 -0
  201. package/dist/public/assets/settings-DIWv_y0V.js +1 -0
  202. package/dist/public/assets/w-DIWv_y0V.js +1 -0
  203. package/dist/public/assets/w._-DIWv_y0V.js +1 -0
  204. package/dist/public/assets/w._-Dt1Jdj_n.js +1 -0
  205. package/package.json +6 -6
  206. package/dist/_CZz7Wyts.js +0 -2352
  207. package/dist/_jYLlSG8J.js +0 -3824
  208. package/dist/public/assets/_B1B7SsmR.js +0 -1
  209. package/dist/public/assets/_B1B7SsmR.js.br +0 -0
  210. package/dist/public/assets/_B1nEnOeR.js +0 -1
  211. package/dist/public/assets/_B1nEnOeR.js.br +0 -0
  212. package/dist/public/assets/_B2vPwdLW2.js.br +0 -0
  213. package/dist/public/assets/_B2zlBhgP.js +0 -1
  214. package/dist/public/assets/_B2zlBhgP.js.br +0 -0
  215. package/dist/public/assets/_B3-rUIWu.js +0 -1
  216. package/dist/public/assets/_B3-rUIWu.js.br +0 -0
  217. package/dist/public/assets/_B3v2Mxg9.js +0 -1
  218. package/dist/public/assets/_B3v2Mxg9.js.br +0 -0
  219. package/dist/public/assets/_B4zQcDgs.js.br +0 -0
  220. package/dist/public/assets/_B7g6vstf.js +0 -1
  221. package/dist/public/assets/_B7g6vstf.js.br +0 -0
  222. package/dist/public/assets/_B8bLTrAR.js.br +0 -0
  223. package/dist/public/assets/_BERiWLR2.js.br +0 -0
  224. package/dist/public/assets/_BG6eCCtD.js +0 -1
  225. package/dist/public/assets/_BG6eCCtD.js.br +0 -0
  226. package/dist/public/assets/_BIGq6NLW2.js +0 -1
  227. package/dist/public/assets/_BIGq6NLW2.js.br +0 -0
  228. package/dist/public/assets/_BJL8EzDT2.js +0 -1
  229. package/dist/public/assets/_BJL8EzDT2.js.br +0 -0
  230. package/dist/public/assets/_BM315xPC.js +0 -1
  231. package/dist/public/assets/_BM315xPC.js.br +0 -0
  232. package/dist/public/assets/_BMjuOAQ4.js +0 -1
  233. package/dist/public/assets/_BMjuOAQ4.js.br +0 -0
  234. package/dist/public/assets/_BNv3fPjT2.js +0 -1
  235. package/dist/public/assets/_BNv3fPjT2.js.br +0 -0
  236. package/dist/public/assets/_BQazGBwX.js +0 -1
  237. package/dist/public/assets/_BQazGBwX.js.br +0 -0
  238. package/dist/public/assets/_BY-WvMhs.js +0 -1
  239. package/dist/public/assets/_BY-WvMhs.js.br +0 -0
  240. package/dist/public/assets/_BZJVwhA5.js +0 -1
  241. package/dist/public/assets/_BZJVwhA5.js.br +0 -0
  242. package/dist/public/assets/_B_wawL6J2.js +0 -1
  243. package/dist/public/assets/_B_wawL6J2.js.br +0 -0
  244. package/dist/public/assets/_Ba8vUCRv2.js +0 -1
  245. package/dist/public/assets/_Ba8vUCRv2.js.br +0 -0
  246. package/dist/public/assets/_BcTQMZit.js +0 -1
  247. package/dist/public/assets/_BcTQMZit.js.br +0 -0
  248. package/dist/public/assets/_Blhy_Vd12.js +0 -1
  249. package/dist/public/assets/_Blhy_Vd12.js.br +0 -0
  250. package/dist/public/assets/_BuNhyEVe.js +0 -1
  251. package/dist/public/assets/_BuNhyEVe.js.br +0 -0
  252. package/dist/public/assets/_C2WEo047.js +0 -1
  253. package/dist/public/assets/_C2WEo047.js.br +0 -0
  254. package/dist/public/assets/_C5QblKM6.js +0 -1
  255. package/dist/public/assets/_C5QblKM6.js.br +0 -0
  256. package/dist/public/assets/_CBHyOOZB.js +0 -1
  257. package/dist/public/assets/_CBHyOOZB.js.br +0 -0
  258. package/dist/public/assets/_CFGDp3Sw.js +0 -1
  259. package/dist/public/assets/_CFGDp3Sw.js.br +0 -0
  260. package/dist/public/assets/_CFuIV2fl.js.br +0 -0
  261. package/dist/public/assets/_CNPgjl1-2.js +0 -1
  262. package/dist/public/assets/_CNPgjl1-2.js.br +0 -0
  263. package/dist/public/assets/_CSJQogH62.js.br +0 -0
  264. package/dist/public/assets/_CUjz6cMW.js.br +0 -0
  265. package/dist/public/assets/_CWHyYnLM2.js +0 -1
  266. package/dist/public/assets/_CWHyYnLM2.js.br +0 -0
  267. package/dist/public/assets/_CWzOnDwF2.js +0 -1
  268. package/dist/public/assets/_CWzOnDwF2.js.br +0 -0
  269. package/dist/public/assets/_CXcrI0KH.js +0 -1
  270. package/dist/public/assets/_CXcrI0KH.js.br +0 -0
  271. package/dist/public/assets/_CY8IvGdO2.js +0 -1
  272. package/dist/public/assets/_CY8IvGdO2.js.br +0 -0
  273. package/dist/public/assets/_CYK6BCWH2.js +0 -1
  274. package/dist/public/assets/_CYK6BCWH2.js.br +0 -0
  275. package/dist/public/assets/_CYSMKo7F.js +0 -1
  276. package/dist/public/assets/_CYSMKo7F.js.br +0 -0
  277. package/dist/public/assets/_CfpVtrZd.js.br +0 -0
  278. package/dist/public/assets/_CftRvTVW.js +0 -1
  279. package/dist/public/assets/_CftRvTVW.js.br +0 -0
  280. package/dist/public/assets/_ClSO8TOE2.js +0 -1
  281. package/dist/public/assets/_ClSO8TOE2.js.br +0 -0
  282. package/dist/public/assets/_CoIipOdm.js.br +0 -0
  283. package/dist/public/assets/_CpYNKFv52.js +0 -1
  284. package/dist/public/assets/_CpYNKFv52.js.br +0 -0
  285. package/dist/public/assets/_CpqV5nOZ2.js +0 -1
  286. package/dist/public/assets/_CpqV5nOZ2.js.br +0 -0
  287. package/dist/public/assets/_Cs_1C06H.js.br +0 -0
  288. package/dist/public/assets/_CxrdJ7hp2.js +0 -1
  289. package/dist/public/assets/_CxrdJ7hp2.js.br +0 -0
  290. package/dist/public/assets/_CygMTO1C.js.br +0 -0
  291. package/dist/public/assets/_CznrmqM4.js +0 -1
  292. package/dist/public/assets/_CznrmqM4.js.br +0 -0
  293. package/dist/public/assets/_DA_VGkH6.js +0 -1
  294. package/dist/public/assets/_DA_VGkH6.js.br +0 -0
  295. package/dist/public/assets/_DFGJGEpB.js.br +0 -0
  296. package/dist/public/assets/_DI99ib-x2.js +0 -1
  297. package/dist/public/assets/_DI99ib-x2.js.br +0 -0
  298. package/dist/public/assets/_DLbMbJfH.js +0 -1
  299. package/dist/public/assets/_DLbMbJfH.js.br +0 -0
  300. package/dist/public/assets/_DLzJNX7C.js.br +0 -0
  301. package/dist/public/assets/_DMc_yyoD2.js.br +0 -0
  302. package/dist/public/assets/_DMi37Owt.js +0 -1
  303. package/dist/public/assets/_DMi37Owt.js.br +0 -0
  304. package/dist/public/assets/_DRT4_m9d.js +0 -1
  305. package/dist/public/assets/_DRT4_m9d.js.br +0 -0
  306. package/dist/public/assets/_DV6VXtzH.js +0 -89
  307. package/dist/public/assets/_DV6VXtzH.js.br +0 -0
  308. package/dist/public/assets/_DVIdvZ6L.js +0 -1
  309. package/dist/public/assets/_DVIdvZ6L.js.br +0 -0
  310. package/dist/public/assets/_DXOGRSbq.js.br +0 -0
  311. package/dist/public/assets/_DY5hwH4S2.js +0 -1
  312. package/dist/public/assets/_DY5hwH4S2.js.br +0 -0
  313. package/dist/public/assets/_Da8gt_F52.js.br +0 -0
  314. package/dist/public/assets/_DbTEN3Co.js +0 -1
  315. package/dist/public/assets/_DbTEN3Co.js.br +0 -0
  316. package/dist/public/assets/_DcfWOyup.js.br +0 -0
  317. package/dist/public/assets/_Dd4lKEYp2.js +0 -1
  318. package/dist/public/assets/_Dd4lKEYp2.js.br +0 -0
  319. package/dist/public/assets/_DgCQT80U.js.br +0 -0
  320. package/dist/public/assets/_DhEdWcLh.js.br +0 -0
  321. package/dist/public/assets/_DiHWQ-Ew.js +0 -1
  322. package/dist/public/assets/_DiHWQ-Ew.js.br +0 -0
  323. package/dist/public/assets/_DjcyEwVn2.js +0 -1
  324. package/dist/public/assets/_DjcyEwVn2.js.br +0 -0
  325. package/dist/public/assets/_Dm-zlffy.js +0 -1536
  326. package/dist/public/assets/_Dm-zlffy.js.br +0 -0
  327. package/dist/public/assets/_DnhKP7pH.js +0 -1
  328. package/dist/public/assets/_DnhKP7pH.js.br +0 -0
  329. package/dist/public/assets/_DpJdqIrj.js +0 -1
  330. package/dist/public/assets/_DpJdqIrj.js.br +0 -0
  331. package/dist/public/assets/_DqxT_h3w.js.br +0 -0
  332. package/dist/public/assets/_DsKRHcpP2.js +0 -1
  333. package/dist/public/assets/_DsKRHcpP2.js.br +0 -0
  334. package/dist/public/assets/_Dt461FGT.js +0 -1
  335. package/dist/public/assets/_Dt461FGT.js.br +0 -0
  336. package/dist/public/assets/_DvHOWoGF.js.br +0 -0
  337. package/dist/public/assets/_N8vS2ulD2.js +0 -1
  338. package/dist/public/assets/_N8vS2ulD2.js.br +0 -0
  339. package/dist/public/assets/_ToAhQlpQ2.js +0 -1
  340. package/dist/public/assets/_ToAhQlpQ2.js.br +0 -0
  341. package/dist/public/assets/_TsHAzFfC.js.br +0 -0
  342. package/dist/public/assets/_ZVf0cDT12.js +0 -1
  343. package/dist/public/assets/_ZVf0cDT12.js.br +0 -0
  344. package/dist/public/assets/__g_2CBHN.js +0 -1
  345. package/dist/public/assets/__g_2CBHN.js.br +0 -0
  346. package/dist/public/assets/_kIpfj7zU2.js +0 -1
  347. package/dist/public/assets/_kIpfj7zU2.js.br +0 -0
  348. package/dist/public/assets/_p1qRbXAM.js.br +0 -0
  349. package/dist/public/assets/app-page-B-xb0lEG.css +0 -1
  350. package/dist/public/assets/app-page-B-xb0lEG.css.br +0 -0
  351. package/dist/public/assets/diff-view-CPZTgZs3.css +0 -1
  352. package/dist/public/assets/diff-view-CPZTgZs3.css.br +0 -0
  353. package/dist/public/assets/new-BMnZANmK.js +0 -1
  354. package/dist/public/assets/settings-BMnZANmK.js +0 -1
  355. package/dist/public/assets/w-BMnZANmK.js +0 -1
  356. package/dist/public/assets/w._-BMnZANmK.js +0 -1
  357. package/dist/public/assets/w._-C_I4x7J1.js +0 -1
  358. /package/dist/public/assets/{_2IIEA8gg2.js → _2IIEA8gg.js} +0 -0
  359. /package/dist/public/assets/{_2IIEA8gg2.js.br → _2IIEA8gg.js.br} +0 -0
  360. /package/dist/public/assets/{_4G7pJPwS2.js → _4G7pJPwS.js} +0 -0
  361. /package/dist/public/assets/{_4G7pJPwS2.js.br → _4G7pJPwS.js.br} +0 -0
  362. /package/dist/public/assets/{_4ZHwLPI52.js → _4ZHwLPI5.js} +0 -0
  363. /package/dist/public/assets/{_4ZHwLPI52.js.br → _4ZHwLPI5.js.br} +0 -0
  364. /package/dist/public/assets/{_7GGW24-e2.js → _7GGW24-e.js} +0 -0
  365. /package/dist/public/assets/{_7GGW24-e2.js.br → _7GGW24-e.js.br} +0 -0
  366. /package/dist/public/assets/{_8PwUyIlP2.js → _8PwUyIlP.js} +0 -0
  367. /package/dist/public/assets/{_8PwUyIlP2.js.br → _8PwUyIlP.js.br} +0 -0
  368. /package/dist/public/assets/{_B1RWQWA52.js → _B1RWQWA5.js} +0 -0
  369. /package/dist/public/assets/{_B1RWQWA52.js.br → _B1RWQWA5.js.br} +0 -0
  370. /package/dist/public/assets/{_B2OO5cIa2.js → _B2OO5cIa.js} +0 -0
  371. /package/dist/public/assets/{_B2OO5cIa2.js.br → _B2OO5cIa.js.br} +0 -0
  372. /package/dist/public/assets/{_B2gwz-sJ2.js → _B2gwz-sJ.js} +0 -0
  373. /package/dist/public/assets/{_B2gwz-sJ2.js.br → _B2gwz-sJ.js.br} +0 -0
  374. /package/dist/public/assets/{_B3gFvitq2.js → _B3gFvitq.js} +0 -0
  375. /package/dist/public/assets/{_B3gFvitq2.js.br → _B3gFvitq.js.br} +0 -0
  376. /package/dist/public/assets/{_B5W6OYN72.js → _B5W6OYN7.js} +0 -0
  377. /package/dist/public/assets/{_B5W6OYN72.js.br → _B5W6OYN7.js.br} +0 -0
  378. /package/dist/public/assets/{_B7ZEbQpA2.js → _B7ZEbQpA.js} +0 -0
  379. /package/dist/public/assets/{_B7ZEbQpA2.js.br → _B7ZEbQpA.js.br} +0 -0
  380. /package/dist/public/assets/{_BJitypiv2.js → _BJitypiv.js} +0 -0
  381. /package/dist/public/assets/{_BJitypiv2.js.br → _BJitypiv.js.br} +0 -0
  382. /package/dist/public/assets/{_BRdr0IET2.js → _BRdr0IET.js} +0 -0
  383. /package/dist/public/assets/{_BRdr0IET2.js.br → _BRdr0IET.js.br} +0 -0
  384. /package/dist/public/assets/{_BSWPekZh2.js → _BSWPekZh.js} +0 -0
  385. /package/dist/public/assets/{_BSWPekZh2.js.br → _BSWPekZh.js.br} +0 -0
  386. /package/dist/public/assets/{_BUDT5pXO2.js → _BUDT5pXO.js} +0 -0
  387. /package/dist/public/assets/{_BUDT5pXO2.js.br → _BUDT5pXO.js.br} +0 -0
  388. /package/dist/public/assets/{_BWXHIvNe2.js → _BWXHIvNe.js} +0 -0
  389. /package/dist/public/assets/{_BWXHIvNe2.js.br → _BWXHIvNe.js.br} +0 -0
  390. /package/dist/public/assets/{_BXeXVLqQ2.js → _BXeXVLqQ.js} +0 -0
  391. /package/dist/public/assets/{_BXeXVLqQ2.js.br → _BXeXVLqQ.js.br} +0 -0
  392. /package/dist/public/assets/{_BYnGhZoM2.js → _BYnGhZoM.js} +0 -0
  393. /package/dist/public/assets/{_BYnGhZoM2.js.br → _BYnGhZoM.js.br} +0 -0
  394. /package/dist/public/assets/{_B_bV9PQ92.js → _B_bV9PQ9.js} +0 -0
  395. /package/dist/public/assets/{_B_bV9PQ92.js.br → _B_bV9PQ9.js.br} +0 -0
  396. /package/dist/public/assets/{_BiFt_7mu2.js → _BiFt_7mu.js} +0 -0
  397. /package/dist/public/assets/{_BiFt_7mu2.js.br → _BiFt_7mu.js.br} +0 -0
  398. /package/dist/public/assets/{_BiJDBrnU2.js → _BiJDBrnU.js} +0 -0
  399. /package/dist/public/assets/{_BiJDBrnU2.js.br → _BiJDBrnU.js.br} +0 -0
  400. /package/dist/public/assets/{_Bm3Qr25_2.js → _Bm3Qr25_.js} +0 -0
  401. /package/dist/public/assets/{_Bm3Qr25_2.js.br → _Bm3Qr25_.js.br} +0 -0
  402. /package/dist/public/assets/{_BroJfC0k2.js → _BroJfC0k.js} +0 -0
  403. /package/dist/public/assets/{_BroJfC0k2.js.br → _BroJfC0k.js.br} +0 -0
  404. /package/dist/public/assets/{_BsKzXJz42.js → _BsKzXJz4.js} +0 -0
  405. /package/dist/public/assets/{_BsKzXJz42.js.br → _BsKzXJz4.js.br} +0 -0
  406. /package/dist/public/assets/{_BsSzOQcm2.js → _BsSzOQcm.js} +0 -0
  407. /package/dist/public/assets/{_BsSzOQcm2.js.br → _BsSzOQcm.js.br} +0 -0
  408. /package/dist/public/assets/{_BxMlprV52.js → _BxMlprV5.js} +0 -0
  409. /package/dist/public/assets/{_BxMlprV52.js.br → _BxMlprV5.js.br} +0 -0
  410. /package/dist/public/assets/{_ByWQv1Qj2.js → _ByWQv1Qj.js} +0 -0
  411. /package/dist/public/assets/{_ByWQv1Qj2.js.br → _ByWQv1Qj.js.br} +0 -0
  412. /package/dist/public/assets/{_C03EYrpw2.js → _C03EYrpw.js} +0 -0
  413. /package/dist/public/assets/{_C03EYrpw2.js.br → _C03EYrpw.js.br} +0 -0
  414. /package/dist/public/assets/{_C1IUL_tW2.js → _C1IUL_tW.js} +0 -0
  415. /package/dist/public/assets/{_C1IUL_tW2.js.br → _C1IUL_tW.js.br} +0 -0
  416. /package/dist/public/assets/{_C8oCnwJJ2.js → _C8oCnwJJ.js} +0 -0
  417. /package/dist/public/assets/{_C8oCnwJJ2.js.br → _C8oCnwJJ.js.br} +0 -0
  418. /package/dist/public/assets/{_C8pVoKbM2.js → _C8pVoKbM.js} +0 -0
  419. /package/dist/public/assets/{_C8pVoKbM2.js.br → _C8pVoKbM.js.br} +0 -0
  420. /package/dist/public/assets/{_CBce3t8t2.js → _CBce3t8t.js} +0 -0
  421. /package/dist/public/assets/{_CBce3t8t2.js.br → _CBce3t8t.js.br} +0 -0
  422. /package/dist/public/assets/{_CHQ94UKr2.js → _CHQ94UKr.js} +0 -0
  423. /package/dist/public/assets/{_CHQ94UKr2.js.br → _CHQ94UKr.js.br} +0 -0
  424. /package/dist/public/assets/{_CLwyXe_n2.js → _CLwyXe_n.js} +0 -0
  425. /package/dist/public/assets/{_CLwyXe_n2.js.br → _CLwyXe_n.js.br} +0 -0
  426. /package/dist/public/assets/{_CMLA9XwU2.js → _CMLA9XwU.js} +0 -0
  427. /package/dist/public/assets/{_CMLA9XwU2.js.br → _CMLA9XwU.js.br} +0 -0
  428. /package/dist/public/assets/{_CQ2zXKGN2.js → _CQ2zXKGN.js} +0 -0
  429. /package/dist/public/assets/{_CQ2zXKGN2.js.br → _CQ2zXKGN.js.br} +0 -0
  430. /package/dist/public/assets/{_CSRkHgEL2.js → _CSRkHgEL.js} +0 -0
  431. /package/dist/public/assets/{_CSRkHgEL2.js.br → _CSRkHgEL.js.br} +0 -0
  432. /package/dist/public/assets/{_CUHmPFLl2.js → _CUHmPFLl.js} +0 -0
  433. /package/dist/public/assets/{_CUHmPFLl2.js.br → _CUHmPFLl.js.br} +0 -0
  434. /package/dist/public/assets/{_CV2tkWYe2.js → _CV2tkWYe.js} +0 -0
  435. /package/dist/public/assets/{_CV2tkWYe2.js.br → _CV2tkWYe.js.br} +0 -0
  436. /package/dist/public/assets/{_CYIUgYqB2.js → _CYIUgYqB.js} +0 -0
  437. /package/dist/public/assets/{_CYIUgYqB2.js.br → _CYIUgYqB.js.br} +0 -0
  438. /package/dist/public/assets/{_CYNrtFtB2.js → _CYNrtFtB.js} +0 -0
  439. /package/dist/public/assets/{_CYNrtFtB2.js.br → _CYNrtFtB.js.br} +0 -0
  440. /package/dist/public/assets/{_CZd0xW_V2.js → _CZd0xW_V.js} +0 -0
  441. /package/dist/public/assets/{_CZd0xW_V2.js.br → _CZd0xW_V.js.br} +0 -0
  442. /package/dist/public/assets/{_CacY0gHj2.js → _CacY0gHj.js} +0 -0
  443. /package/dist/public/assets/{_CacY0gHj2.js.br → _CacY0gHj.js.br} +0 -0
  444. /package/dist/public/assets/{_Cb4Vim4T2.js → _Cb4Vim4T.js} +0 -0
  445. /package/dist/public/assets/{_Cb4Vim4T2.js.br → _Cb4Vim4T.js.br} +0 -0
  446. /package/dist/public/assets/{_CcmNWLt02.js → _CcmNWLt0.js} +0 -0
  447. /package/dist/public/assets/{_CcmNWLt02.js.br → _CcmNWLt0.js.br} +0 -0
  448. /package/dist/public/assets/{_Cfkwpbl82.js → _Cfkwpbl8.js} +0 -0
  449. /package/dist/public/assets/{_Cfkwpbl82.js.br → _Cfkwpbl8.js.br} +0 -0
  450. /package/dist/public/assets/{_CgoNMtux2.js → _CgoNMtux.js} +0 -0
  451. /package/dist/public/assets/{_CgoNMtux2.js.br → _CgoNMtux.js.br} +0 -0
  452. /package/dist/public/assets/{_Ci_nEsc72.js → _Ci_nEsc7.js} +0 -0
  453. /package/dist/public/assets/{_Ci_nEsc72.js.br → _Ci_nEsc7.js.br} +0 -0
  454. /package/dist/public/assets/{_CjNLYCLg2.js → _CjNLYCLg.js} +0 -0
  455. /package/dist/public/assets/{_CjNLYCLg2.js.br → _CjNLYCLg.js.br} +0 -0
  456. /package/dist/public/assets/{_Cmm7eHzH2.js → _Cmm7eHzH.js} +0 -0
  457. /package/dist/public/assets/{_Cmm7eHzH2.js.br → _Cmm7eHzH.js.br} +0 -0
  458. /package/dist/public/assets/{_CohzipZa2.js → _CohzipZa.js} +0 -0
  459. /package/dist/public/assets/{_CohzipZa2.js.br → _CohzipZa.js.br} +0 -0
  460. /package/dist/public/assets/{_CtfBBspg2.js → _CtfBBspg.js} +0 -0
  461. /package/dist/public/assets/{_CtfBBspg2.js.br → _CtfBBspg.js.br} +0 -0
  462. /package/dist/public/assets/{_Cvrh5tZx2.js → _Cvrh5tZx.js} +0 -0
  463. /package/dist/public/assets/{_Cvrh5tZx2.js.br → _Cvrh5tZx.js.br} +0 -0
  464. /package/dist/public/assets/{_CxZEssPk2.js → _CxZEssPk.js} +0 -0
  465. /package/dist/public/assets/{_CxZEssPk2.js.br → _CxZEssPk.js.br} +0 -0
  466. /package/dist/public/assets/{_CyEgAFGc2.js → _CyEgAFGc.js} +0 -0
  467. /package/dist/public/assets/{_CyEgAFGc2.js.br → _CyEgAFGc.js.br} +0 -0
  468. /package/dist/public/assets/{_D-usSTwE2.js → _D-usSTwE.js} +0 -0
  469. /package/dist/public/assets/{_D-usSTwE2.js.br → _D-usSTwE.js.br} +0 -0
  470. /package/dist/public/assets/{_D0apG41V2.js → _D0apG41V.js} +0 -0
  471. /package/dist/public/assets/{_D0apG41V2.js.br → _D0apG41V.js.br} +0 -0
  472. /package/dist/public/assets/{_D1A_Heim2.js → _D1A_Heim.js} +0 -0
  473. /package/dist/public/assets/{_D1A_Heim2.js.br → _D1A_Heim.js.br} +0 -0
  474. /package/dist/public/assets/{_D7Lr4KcI2.js → _D7Lr4KcI.js} +0 -0
  475. /package/dist/public/assets/{_D7Lr4KcI2.js.br → _D7Lr4KcI.js.br} +0 -0
  476. /package/dist/public/assets/{_D8IpX4py2.js → _D8IpX4py.js} +0 -0
  477. /package/dist/public/assets/{_D8IpX4py2.js.br → _D8IpX4py.js.br} +0 -0
  478. /package/dist/public/assets/{_DBj4K9d_2.js → _DBj4K9d_.js} +0 -0
  479. /package/dist/public/assets/{_DBj4K9d_2.js.br → _DBj4K9d_.js.br} +0 -0
  480. /package/dist/public/assets/{_DDpmG2fV2.js → _DDpmG2fV.js} +0 -0
  481. /package/dist/public/assets/{_DDpmG2fV2.js.br → _DDpmG2fV.js.br} +0 -0
  482. /package/dist/public/assets/{_DExj1W_82.js → _DExj1W_8.js} +0 -0
  483. /package/dist/public/assets/{_DExj1W_82.js.br → _DExj1W_8.js.br} +0 -0
  484. /package/dist/public/assets/{_DGHpHOYJ2.js → _DGHpHOYJ.js} +0 -0
  485. /package/dist/public/assets/{_DGHpHOYJ2.js.br → _DGHpHOYJ.js.br} +0 -0
  486. /package/dist/public/assets/{_DHYfO66s2.js → _DHYfO66s.js} +0 -0
  487. /package/dist/public/assets/{_DHYfO66s2.js.br → _DHYfO66s.js.br} +0 -0
  488. /package/dist/public/assets/{_DJMQeKeT2.js → _DJMQeKeT.js} +0 -0
  489. /package/dist/public/assets/{_DJMQeKeT2.js.br → _DJMQeKeT.js.br} +0 -0
  490. /package/dist/public/assets/{_DKpUyyne2.js → _DKpUyyne.js} +0 -0
  491. /package/dist/public/assets/{_DKpUyyne2.js.br → _DKpUyyne.js.br} +0 -0
  492. /package/dist/public/assets/{_DMoTqEGO2.js → _DMoTqEGO.js} +0 -0
  493. /package/dist/public/assets/{_DMoTqEGO2.js.br → _DMoTqEGO.js.br} +0 -0
  494. /package/dist/public/assets/{_DO-qXg-I2.js → _DO-qXg-I.js} +0 -0
  495. /package/dist/public/assets/{_DO-qXg-I2.js.br → _DO-qXg-I.js.br} +0 -0
  496. /package/dist/public/assets/{_DOwzaHZ02.js → _DOwzaHZ0.js} +0 -0
  497. /package/dist/public/assets/{_DOwzaHZ02.js.br → _DOwzaHZ0.js.br} +0 -0
  498. /package/dist/public/assets/{_DQwYfKfQ2.js → _DQwYfKfQ.js} +0 -0
  499. /package/dist/public/assets/{_DQwYfKfQ2.js.br → _DQwYfKfQ.js.br} +0 -0
  500. /package/dist/public/assets/{_DRFjx7u42.js → _DRFjx7u4.js} +0 -0
  501. /package/dist/public/assets/{_DRFjx7u42.js.br → _DRFjx7u4.js.br} +0 -0
  502. /package/dist/public/assets/{_DVQuIRkW2.js → _DVQuIRkW.js} +0 -0
  503. /package/dist/public/assets/{_DVQuIRkW2.js.br → _DVQuIRkW.js.br} +0 -0
  504. /package/dist/public/assets/{_DX1BQOs82.js → _DX1BQOs8.js} +0 -0
  505. /package/dist/public/assets/{_DX1BQOs82.js.br → _DX1BQOs8.js.br} +0 -0
  506. /package/dist/public/assets/{_DYvRD3hg2.js → _DYvRD3hg.js} +0 -0
  507. /package/dist/public/assets/{_DYvRD3hg2.js.br → _DYvRD3hg.js.br} +0 -0
  508. /package/dist/public/assets/{_Dh228itO2.js → _Dh228itO.js} +0 -0
  509. /package/dist/public/assets/{_Dh228itO2.js.br → _Dh228itO.js.br} +0 -0
  510. /package/dist/public/assets/{_Dh5ihWbf2.js → _Dh5ihWbf.js} +0 -0
  511. /package/dist/public/assets/{_Dh5ihWbf2.js.br → _Dh5ihWbf.js.br} +0 -0
  512. /package/dist/public/assets/{_DhmEMT882.js → _DhmEMT88.js} +0 -0
  513. /package/dist/public/assets/{_DhmEMT882.js.br → _DhmEMT88.js.br} +0 -0
  514. /package/dist/public/assets/{_Dl-2e7rI2.js → _Dl-2e7rI.js} +0 -0
  515. /package/dist/public/assets/{_Dl-2e7rI2.js.br → _Dl-2e7rI.js.br} +0 -0
  516. /package/dist/public/assets/{_DmIc4jLQ2.js → _DmIc4jLQ.js} +0 -0
  517. /package/dist/public/assets/{_DmIc4jLQ2.js.br → _DmIc4jLQ.js.br} +0 -0
  518. /package/dist/public/assets/{_DnToyrRv2.js → _DnToyrRv.js} +0 -0
  519. /package/dist/public/assets/{_DnToyrRv2.js.br → _DnToyrRv.js.br} +0 -0
  520. /package/dist/public/assets/{_DqKBuwfJ2.js → _DqKBuwfJ.js} +0 -0
  521. /package/dist/public/assets/{_DqKBuwfJ2.js.br → _DqKBuwfJ.js.br} +0 -0
  522. /package/dist/public/assets/{_DswuEJGm2.js → _DswuEJGm.js} +0 -0
  523. /package/dist/public/assets/{_DswuEJGm2.js.br → _DswuEJGm.js.br} +0 -0
  524. /package/dist/public/assets/{_DvXPmvsu2.js → _DvXPmvsu.js} +0 -0
  525. /package/dist/public/assets/{_DvXPmvsu2.js.br → _DvXPmvsu.js.br} +0 -0
  526. /package/dist/public/assets/{_IvuFDN5E2.js → _IvuFDN5E.js} +0 -0
  527. /package/dist/public/assets/{_IvuFDN5E2.js.br → _IvuFDN5E.js.br} +0 -0
  528. /package/dist/public/assets/{_O90oeIOV2.js → _O90oeIOV.js} +0 -0
  529. /package/dist/public/assets/{_O90oeIOV2.js.br → _O90oeIOV.js.br} +0 -0
  530. /package/dist/public/assets/{_UdsmMDCL2.js → _UdsmMDCL.js} +0 -0
  531. /package/dist/public/assets/{_UdsmMDCL2.js.br → _UdsmMDCL.js.br} +0 -0
  532. /package/dist/public/assets/{__X_XdTYD2.js → __X_XdTYD.js} +0 -0
  533. /package/dist/public/assets/{__X_XdTYD2.js.br → __X_XdTYD.js.br} +0 -0
  534. /package/dist/public/assets/{_aMsaMD1D2.js → _aMsaMD1D.js} +0 -0
  535. /package/dist/public/assets/{_aMsaMD1D2.js.br → _aMsaMD1D.js.br} +0 -0
  536. /package/dist/public/assets/{_bTVj8UrX2.js → _bTVj8UrX.js} +0 -0
  537. /package/dist/public/assets/{_bTVj8UrX2.js.br → _bTVj8UrX.js.br} +0 -0
  538. /package/dist/public/assets/{_eJ-hLW7d2.js → _eJ-hLW7d.js} +0 -0
  539. /package/dist/public/assets/{_eJ-hLW7d2.js.br → _eJ-hLW7d.js.br} +0 -0
  540. /package/dist/public/assets/{_gzcpVVnB2.js → _gzcpVVnB.js} +0 -0
  541. /package/dist/public/assets/{_gzcpVVnB2.js.br → _gzcpVVnB.js.br} +0 -0
  542. /package/dist/public/assets/{_ilITqXS62.js → _ilITqXS6.js} +0 -0
  543. /package/dist/public/assets/{_ilITqXS62.js.br → _ilITqXS6.js.br} +0 -0
  544. /package/dist/public/assets/{_nFMaYfgc2.js → _nFMaYfgc.js} +0 -0
  545. /package/dist/public/assets/{_nFMaYfgc2.js.br → _nFMaYfgc.js.br} +0 -0
  546. /package/dist/public/assets/{_ot-7Btpt2.js → _ot-7Btpt.js} +0 -0
  547. /package/dist/public/assets/{_ot-7Btpt2.js.br → _ot-7Btpt.js.br} +0 -0
  548. /package/dist/public/assets/{_qdxAdBWQ2.js → _qdxAdBWQ.js} +0 -0
  549. /package/dist/public/assets/{_qdxAdBWQ2.js.br → _qdxAdBWQ.js.br} +0 -0
  550. /package/dist/public/assets/{_rLFTqkRN2.js → _rLFTqkRN.js} +0 -0
  551. /package/dist/public/assets/{_rLFTqkRN2.js.br → _rLFTqkRN.js.br} +0 -0
  552. /package/dist/public/assets/{_sltzmVWM2.js → _sltzmVWM.js} +0 -0
  553. /package/dist/public/assets/{_uhdI0v042.js → _uhdI0v04.js} +0 -0
  554. /package/dist/public/assets/{_uhdI0v042.js.br → _uhdI0v04.js.br} +0 -0
  555. /package/dist/public/assets/{_zf12oZj62.js → _zf12oZj6.js} +0 -0
  556. /package/dist/public/assets/{_zf12oZj62.js.br → _zf12oZj6.js.br} +0 -0
@@ -1,1536 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_DMi37Owt.js","assets/_DV6VXtzH.js","assets/app-page-B-xb0lEG.css","assets/_CznrmqM4.js","assets/_CftRvTVW.js","assets/_BQazGBwX.js","assets/_DFGJGEpB.js","assets/_DVIdvZ6L.js","assets/_CfpVtrZd.js","assets/_DnhKP7pH.js","assets/_C5QblKM6.js","assets/_B3v2Mxg9.js","assets/_Dd4lKEYp2.js","assets/_CNPgjl1-2.js","assets/_BXeXVLqQ2.js","assets/_DjcyEwVn2.js","assets/_Ba8vUCRv2.js","assets/_BuLSZuTT2.js","assets/_ClSO8TOE2.js","assets/_CpYNKFv52.js","assets/_bTVj8UrX2.js","assets/_CWzOnDwF2.js","assets/_kIpfj7zU2.js","assets/_gzcpVVnB2.js","assets/_BIGq6NLW2.js","assets/_CUjz6cMW.js","assets/_CygMTO1C.js","assets/_B1B7SsmR.js","assets/__g_2CBHN.js","assets/_BuNhyEVe.js","assets/_CYSMKo7F.js","assets/_DiHWQ-Ew.js","assets/_Dt461FGT.js","assets/_DhEdWcLh.js","assets/_TsHAzFfC.js","assets/_DXOGRSbq.js","assets/_BcTQMZit.js","assets/_B7g6vstf.js","assets/_B1nEnOeR.js","assets/_CXcrI0KH.js","assets/_BG6eCCtD.js","assets/_DpJdqIrj.js","assets/_BaHq4SXp.js","assets/_BYOwaDjH.js","assets/_DsKRHcpP2.js","assets/_CYNrtFtB2.js","assets/_DmIc4jLQ2.js","assets/_CY8IvGdO2.js","assets/_CBce3t8t2.js","assets/_DYvRD3hg2.js","assets/_Dl-2e7rI2.js","assets/_woXpYk--.js","assets/_Dbp391kL2.js","assets/_CWHyYnLM2.js","assets/_Blhy_Vd12.js","assets/_CxrdJ7hp2.js","assets/_DMc_yyoD2.js","assets/_DqxT_h3w.js","assets/_CoIipOdm.js","assets/_Dx-8-gkx.js","assets/_DLbMbJfH.js","assets/_C8oCnwJJ2.js","assets/_DvHOWoGF.js","assets/_Cs_1C06H.js","assets/_CFGDp3Sw.js","assets/_BMjuOAQ4.js","assets/_DA_VGkH6.js","assets/_BZJVwhA5.js","assets/_B8bLTrAR.js","assets/_CBHyOOZB.js","assets/_DLzJNX7C.js","assets/_DbTEN3Co.js","assets/_DVTAwKKz.js","assets/_BY-WvMhs.js","assets/_DY5hwH4S2.js","assets/_DJMQeKeT2.js","assets/_CSJQogH62.js","assets/_B_wawL6J2.js","assets/_ZVf0cDT12.js","assets/_DqKBuwfJ2.js","assets/_oqKa8noW.js","assets/_CnvKMtbv.js","assets/_IyjqRm3v.js","assets/_rLFTqkRN2.js","assets/_CacY0gHj2.js","assets/_B5eOa1yu.js","assets/_Dixweg8N.js","assets/_D1A_Heim2.js","assets/_O90oeIOV2.js","assets/_CYK6BCWH2.js","assets/_DOwzaHZ02.js","assets/_B3gFvitq2.js","assets/_Cfkwpbl82.js","assets/_BiFt_7mu2.js","assets/_CMLA9XwU2.js","assets/_Da8gt_F52.js","assets/_p1qRbXAM.js","assets/_BERiWLR2.js","assets/_DcfWOyup.js","assets/_C2WEo047.js","assets/_Bj61d0ZC.js","assets/_B2zlBhgP.js","assets/_BM315xPC.js","assets/_Cvrh5tZx2.js","assets/_hN1-RJcA.js","assets/_B4zQcDgs.js","assets/_L8AbGenz.js","assets/_ByJddavk.js","assets/_B3-rUIWu.js","assets/_DgCQT80U.js","assets/_DRT4_m9d.js","assets/_ToAhQlpQ2.js","assets/_BNv3fPjT2.js","assets/_N8vS2ulD2.js","assets/_BJL8EzDT2.js","assets/_B2vPwdLW2.js","assets/_CpqV5nOZ2.js","assets/_B6D30XZt.js"])))=>i.map(i=>d[i]);
2
- import{$ as e,$t as t,A as n,At as r,B as i,Bt as a,C as o,Ct as s,D as c,Dt as l,E as u,Et as d,F as f,Ft as p,G as m,Gt as h,H as g,Ht as _,I as v,It as y,J as b,Jt as x,K as S,Kt as C,L as ee,Lt as te,M as ne,Mt as w,N as re,Nt as ie,O as ae,Ot as oe,P as se,Pt as ce,Q as le,Qt as T,R as ue,Rt as de,S as fe,St as pe,T as me,Tt as he,U as ge,Ut as _e,V as ve,Vt as E,W as ye,Wt as be,X as xe,Xt as Se,Y as Ce,Yt as D,Z as we,Zt as Te,_ as Ee,_t as De,a as Oe,an as ke,at as Ae,b as je,bt as Me,c as Ne,ct as Pe,d as Fe,dt as Ie,en as O,et as Le,f as Re,ft as ze,g as Be,gt as Ve,h as He,ht as Ue,i as We,in as Ge,it as Ke,j as qe,jt as k,k as Je,kt as Ye,l as Xe,lt as Ze,m as Qe,mt as $e,n as et,nn as A,nt as tt,o as nt,on as rt,ot as it,p as at,pt as ot,q as st,qt as j,r as ct,rt as lt,s as ut,st as dt,t as M,tn as N,tt as ft,u as pt,ut as mt,v as ht,vt as gt,w as _t,wt as vt,x as yt,xt as bt,y as xt,yt as St,z as Ct,zt as wt}from"./_DV6VXtzH.js";function Tt(e){return e.map(e=>{let t=e.pr?String(e.pr.number):`-`,n=e.pr&&(e.pr.headRefOid||e.head)||``,r=e.localHead||e.head||``;return`${e.worktree}#${t}:${n}:L${r}`}).sort().join(`\0`)}function Et(e){return e.repos.flatMap(e=>{let t=e.localHead||``,n=e.prs.filter(e=>e.state===`OPEN`||e.state===void 0);return n.length?n.map(n=>`${e.worktree}#${n.number}:${n.headRefOid||``}:L${t}`):[`${e.worktree}#-::L${t}`]}).sort().join(`\0`)}function Dt(e){let t=[],n=[];for(let r of e.trim().split(/\s+/).filter(Boolean)){let e=r.startsWith(`!`),i=e?r.slice(1):r;i&&(e?n:t).push(Ot(i))}return e=>!n.some(t=>t(e))&&t.every(t=>t(e))}function Ot(e){if(!/[*?]/.test(e))return t=>Be(e,t);let t=``;for(let n=0;n<e.length;n++){let r=e[n];r===`*`?e[n+1]===`*`?(t+=`.*`,n++):t+=`[^/]*`:t+=r===`?`?`[^/]`:r.replace(/[.+^${}()|[\]\\]/,`\\$&`)}try{let e=new RegExp(t,`i`);return t=>e.test(t)}catch{return t=>Be(e,t)}}var kt=`search-mark`,At=`mark.${kt}`,jt=`mark.${kt}{display:inline;background:#ffd24a;color:#1a1408;-webkit-text-fill-color:#1a1408;border-radius:3px;padding:0 2px}mark.${kt} *,mark.${kt} *::before,mark.${kt} *::after{color:inherit!important;-webkit-text-fill-color:inherit!important;background:transparent!important}mark.${kt}.active{background:#ffb000;box-shadow:0 0 0 1px #c98400}`,Mt={query:``,hit:null,keys:null},Nt=new Map,Pt=new WeakMap,Ft=(e,t)=>t?`${e}\n${t.line}\n${t.side||``}`:e;function It(e,t,n){Mt.query=e,Mt.hit=t,Mt.keys=n?new Set(n):null;for(let[e,t]of Nt)Ht(e,t,!1);t&&Rt(t)}function Lt(){Mt.hit&&Rt(Mt.hit)}function Rt(e,t=0){requestAnimationFrame(()=>{requestAnimationFrame(()=>{let n=!1;for(let[r,i]of Nt)if(i===e.key&&(n=!0,Vt(r,e)||t>=40))return;t>=40||(!n||t<12)&&setTimeout(()=>Rt(e,t+1),n?32:48)})})}function zt(e,t,n){let r=e.getBoundingClientRect(),i=t.getBoundingClientRect();if(i.height===0&&i.width===0)return!1;if(n===`y`){let t=i.top-r.top+e.scrollTop-(r.height/2-i.height/2);return e.scrollTo({top:Math.max(0,t)}),!0}if(e.scrollWidth<=e.clientWidth+1)return!0;let a=Math.min(24,r.width/8);if(i.left>=r.left+a&&i.right<=r.right-a)return!0;let o=i.left-r.left+e.scrollLeft-(r.width/2-i.width/2),s=Math.max(0,e.scrollWidth-e.clientWidth);return e.scrollTo({left:Math.max(0,Math.min(o,s))}),!0}function Bt(e,t){let n=t.parentElement,r=e;for(;r&&r!==n;){if(r instanceof HTMLElement&&r.scrollWidth>r.clientWidth+1){let e=getComputedStyle(r).overflowX;if(e===`auto`||e===`scroll`)return r}let e=r.getRootNode(),t=r.parentElement??(e instanceof ShadowRoot?e.host:null);if(t===r)break;r=t}return null}function Vt(e,t){let n=e.querySelector(`diffs-container`)?.shadowRoot;if(!n)return!1;let r=n.querySelector(`mark.search-mark.active`)??(()=>{if(t.line<1)return null;let e=[...n.querySelectorAll(`[data-line="${t.line}"]`)],r=t.side||`additions`;return e.find(e=>Kt(e)===r)??e[0]??null})();if(!r)return!1;let i=e.closest(`[data-diff-main]`);if(i){if(!zt(i,r,`y`))return!1}else r.scrollIntoView({block:`center`,inline:`nearest`});let a=Bt(r,e);return a&&zt(a,r,`x`),!0}function Ht(e,t,n=!0){let r=t&&Mt.hit?.key===t?Mt.hit:null,i=Mt.query.trim(),a=!!i&&!!Mt.keys&&!!t&&!Mt.keys.has(t),o=a?``:Ft(i,r);!n&&Pt.get(e)===o||(Pt.set(e,o),Zt(e,a?``:i,r),r&&Rt(r))}function Ut(e,t){return Nt.set(e,t),Ht(e,t),()=>{Nt.delete(e),Pt.delete(e)}}function Wt(e){Ht(e,Nt.get(e))}function Gt(e){let t=e.querySelectorAll(At);if(!t.length)return;let n=new Set;for(let e of[...t])e.parentElement&&n.add(e.parentElement),e.replaceWith(...e.childNodes);for(let e of n)e.normalize()}function Kt(e){let t=e.closest(`[data-code]`);return t?.hasAttribute(`data-deletions`)?`deletions`:t?.hasAttribute(`data-additions`)?`additions`:(e.getAttribute(`data-line-type`)||``).includes(`deletion`)?`deletions`:`additions`}function qt(e){let t=document.createTreeWalker(e,NodeFilter.SHOW_TEXT),n=[];for(let e=t.nextNode();e;e=t.nextNode())e.parentElement?.closest(At)||n.push(e);return n}function Jt(e,t,n){let r=0;for(let i=0;i<e.length;i++){let a=t[i].length;if(n<=r+a)return{node:e[i],offset:Math.min(a,Math.max(0,n-r))};r+=a}let i=e.at(-1);return i?{node:i,offset:t.at(-1)?.length??0}:null}function Yt(e,t,n,r,i){let a=Jt(e,t,n),o=Jt(e,t,r);if(!a||!o)return;let s=document.createRange();s.setStart(a.node,a.offset),s.setEnd(o.node,o.offset);let c=document.createElement(`mark`);c.className=i;try{c.append(s.extractContents()),s.insertNode(c)}catch{}}function Xt(e,t,n,r){let i=qt(e);if(!i.length)return;let a=i.map(e=>e.textContent??``),o=a.join(``),s=n?o:o.toLowerCase(),c=[];for(let e=s.indexOf(t);e!==-1;e=s.indexOf(t,e+t.length))c.push([e,e+t.length]);if(!c.length)return;let l=Kt(e),u=Number(e.getAttribute(`data-line`)),d=r&&r.line===u&&(r.side||`additions`)===l?`${kt} active`:kt;for(let e=c.length-1;e>=0;e--)Yt(i,a,c[e][0],c[e][1],d)}function Zt(e,t,n){let r=[e],i=e.querySelector(`diffs-container`)?.shadowRoot;i&&r.push(i);let a=t.trim(),o=/[A-Z]/.test(a),s=a&&!o?a.toLowerCase():a;for(let e of r)if(Gt(e),s)for(let t of e.querySelectorAll(`[data-code] [data-line]`)){let e=t.textContent||``;(o?e:e.toLowerCase()).includes(s)&&Xt(t,s,o,n)}}var Qt=3;function $t(e,t){let n=new Map;for(let t of e)n.set(t.worktree,[...n.get(t.worktree)||[],t]);let r=[`Review feedback:`],i=0;for(let[e,a]of n){let n=(t||[]).find(t=>t.worktree===e);r.push(``),r.push(tn(e,n,a));for(let e of a){i++;let t=e.side===`deletions`?`Old`:`New`,a=e.line_start===e.line_end?`line ${e.line_start}`:`lines ${e.line_start}-${e.line_end}`;r.push(``),r.push(`${i}. **${e.path}** (${t} ${a})`);let o=e.snippet??en(n,e);if(o!=null){let e=an(o);r.push(``),r.push(on(`${e}diff\n${o}\n${e}`))}r.push(``),r.push(on(e.text))}}return r.join(`
3
- `)}function en(e,t){let n=e?.files?.find(e=>e.path===t.path),r=t.side===`deletions`?n?.old:n?.new;return r==null?null:rn(r,t.line_start,t.line_end,t.side)}function tn(e,t,n){if(t?.head){let n=nn(t.head),r=t.baseSha?nn(t.baseSha):``,i=t.pr?.headRefName||t.branch||`HEAD`;return`${e}/${t.pr?` #${t.pr.number}`:``}: \`${i}\` ${n}${t.base?` vs \`${t.base}\` ${r}`:``}`}let r=[...new Set(n.map(e=>e.head).filter(Boolean))];return r.length?`${e}/: ${r.map(e=>nn(e)).join(`, `)}`:`${e}/`}function nn(e,t=12){return e.slice(0,t)}function rn(e,t,n,r){let i=e.split(`
4
- `),a=Math.max(1,t-Qt),o=Math.min(i.length,n+Qt),s=r===`deletions`?`-`:`+`,c=[];for(let e=a;e<=o;e++){let r=e>=t&&e<=n?s:` `;c.push(`${r}${String(e).padStart(4)} | ${i[e-1]??``}`)}return c.join(`
5
- `)}function an(e){let t=3,n=/`+/g,r;for(;r=n.exec(e);)t=Math.max(t,r[0].length+1);return"`".repeat(t)}function on(e){return e.split(`
6
- `).map(e=>e&&` ${e}`).join(`
7
- `)}function sn(e){let t={dirs:new Map,files:[]};for(let n of e){let e=n.path.split(`/`),r=e.pop(),i=t;for(let t of e){let e=i.dirs.get(t);e||(e={dirs:new Map,files:[]},i.dirs.set(t,e)),i=e}i.files.push({file:n,name:r})}let n=(e,t,r,i)=>{let a=[];for(let[t,o]of[...e.dirs].sort(([e],[t])=>e.localeCompare(t))){let e=t,s=o;for(;s.dirs.size===1&&!s.files.length;){let[[t,n]]=s.dirs;e+=`/${t}`,s=n}let c=r?`${r}/${e}`:e;a.push(n(s,e,c,i+1))}return{label:t,path:r,depth:i,dirs:a,files:e.files}};return n(t,``,``,-1)}var cn=`_fG _3 _j`,ln=`_fN _bQ`,un=`<span><button type=button title="Copy comments as markdown"> </button><!></span>`,dn=` D D l%l`,fn=(e,t)=>k(e.a,`value`,t),pn=t(7,e=>A(e.b,e.f||e.g)),mn=_(5,pn),hn=_(6,pn),gn=(e,t)=>{fn(e,t[0]?.id),mn(e,t[0]?.title),hn(e,t[0]?.agent)},_n=x(3,1,e=>{k(e.b,`disabled`,e._.k),A(e.c,e._.k?`Sending…`:`Send to`),k(e.d,`disabled`,e._.k)}),vn=N(`j2`,e=>{T(e.b,`click`,function(){(async()=>{if(!(!e._.s||e._.k)){An(e._,!0);try{await e._.i(e._.s)}finally{An(e._,!1)}}})()}),de(e,`d`)}),yn=e=>{_n._(e),bn._(e),Sn._(e),w(e.a,`_gx`),w(e.b,[`_p`,`_gy`]),w(e.d,`_gz`),vn(e)},bn=x(3,1,e=>te(e,`d`,e._.l,Wn(e))),xn=C(3,`<option> </option>`,` D `,0,gn),Sn=x(3,1,e=>xn(e,[e._.m,`id`])),Cn=t(2,e=>A(e.b,e._.k?`Sending…`:`Send to ${e._.q||e._.r}`),2),wn=x(3,0,e=>{k(e.a,`disabled`,e._.k),Cn(e)}),Tn=N(`j1`,e=>T(e.a,`click`,function(){(async()=>{if(!(!e._.s||e._.k)){An(e._,!0);try{await e._.i(e._.s)}finally{An(e._,!1)}}})()})),En=e=>{wn._(e),Dn._(e),On._(e),w(e.a,[`_o`,`_p`]),Tn(e)},Dn=x(3,0,Cn),On=x(3,0,Cn),kn=D(9,e=>A(e.c,e.j?`Copied`:`Copy`)),An=D(10,e=>{wn(e),_n(e)}),jn=_(18),Mn=t(13,e=>jn(e,e.m.some(t=>t.id===e.l)?e.l:e.m[0]?.id??null)),Nn=D(11,e=>{Mn(e),bn(e)}),Pn=N(`j3`,e=>T(e.b,`click`,function(){(async()=>{await e.h()&&(kn(e,!0),setTimeout(()=>{kn(e,!1)},1500))})()}));function Fn(e){w(e.a,`_gw`),w(e.b,`_o`),kn(e,!1),An(e,!1),Nn(e,null),Pn(e)}var In=_(12,e=>{Ln(e,e.m[0]?.title),Rn(e,e.m[0]?.agent),Bn(e,e.m.length),Mn(e),Sn(e)}),Ln=_(16,Dn),Rn=_(17,On),zn=j(3,`<button type=button> </button>`,` D `,En,`<span><button type=button> </button><select aria-label="Send comments to session"></select></span>`,` D D l `,yn),Bn=(e,t)=>zn(e,t===1?0:t?1:2),Vn=(e,t)=>In(e,t||[]),Hn=_(7),Un=_(8),Wn=e=>t=>{Nn(e._,t)};O(`j0`,Wn);var Gn=`diffs-container`,Kn=/(?=^diff --git)/gm,qn=/(?<=\n)/,Jn=/^(---|\+\+\+)\s+([^\t\r\n]+)/,Yn=/^(---|\+\+\+)\s+[ab]\/([^\t\r\n]+)/,Xn=/^diff --git (?:"a\/(.+?)"|a\/(.+?)) (?:"b\/(.+?)"|b\/(.+?))$/,Zn=/^index ([0-9a-f]+)\.\.([0-9a-f]+)(?: (\d+))?$/i,Qn=`header-prefix`,$n=`header-filename-suffix`,er=`header-metadata`,tr=`header-custom`,nr={dark:`pierre-dark`,light:`pierre-light`},rr=`data-theme-css`,ir=`data-unsafe-css`,ar=`data-diffs-scrollbar-measure`,or=`--diffs-scrollbar-gutter-measured`,sr=1e5,cr=Object.freeze({fromStart:0,fromEnd:0}),lr={startingLine:0,totalLines:1/0,bufferBefore:0,bufferAfter:0},ur={startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:0},dr=new Set,fr=null;function pr(e){dr.add(e),fr??=requestAnimationFrame(hr)}function mr(e){dr.delete(e)&&dr.size===0&&fr!=null&&(cancelAnimationFrame(fr),fr=null)}function hr(e){let t=new Set(dr);dr.clear();for(let n of t)try{n(e)}catch(e){console.error(e)}fr=dr.size>0?requestAnimationFrame(hr):null}function gr(e,t){return e==null||t==null||typeof e==`string`||typeof t==`string`?e===t:e.dark===t.dark&&e.light===t.light}function _r(e,t){return e?.start===t?.start&&e?.end===t?.end&&e?.side===t?.side&&e?.endSide===t?.endSide}function vr(e){let t=e.length;return e.charCodeAt(t-1)===10&&(t--,e.charCodeAt(t-1)===13&&t--),e.slice(0,t)}var yr=new TextEncoder,br=new TextDecoder(`utf-8`,{ignoreBOM:!0}),xr=/[\uD800-\uDFFF]/,Sr=1024,Cr=new Uint8Array(Sr);function wr(){Cr.length!==Sr&&(Cr=new Uint8Array(Sr))}function P(e){if(e.length===0)return e;if(xr.test(e))return JSON.parse(JSON.stringify(e));let t=e.length*3;Cr.length<t&&(Cr=new Uint8Array(t));let{written:n}=yr.encodeInto(e,Cr);return br.decode(Cr.subarray(0,n))}function Tr(e,t){return e-(t===0?0:1)}function F(e,t){return Tr(e,t)+t}var Er=4096,Dr=.5;function Or(e){for(let t of e.hunks){for(let n=0;n<t.hunkContent.length;n++){let r=t.hunkContent[n];if(r.type!==`change`)continue;let i=Ar(e,r);i!=null&&(t.hunkContent.splice(n,1,...i),n+=i.length-1)}kr(t,e)}}function kr(e,t){let{hunkContent:n}=e;for(let e=1;e<n.length;e++){let r=n[e],i=n[e-1];if(r.type!==`change`||r.additions>0&&r.deletions>0||i.type!==`context`)continue;let a=r.additions>0,o=a?t.additionLines:t.deletionLines,s=a?r.additionLineIndex:r.deletionLineIndex,c=a?r.additions:r.deletions,l=o[s]??``;if(l.trim()!==``)continue;let u=!0;for(let e=1;e<c;e++)if(o[s+e]!==l){u=!1;break}if(!u)continue;let d=0;for(;d<i.lines&&t.additionLines[i.additionLineIndex+i.lines-1-d]===l;)d++;if(d===0||e===1&&d===i.lines)continue;r.additionLineIndex-=d,r.deletionLineIndex-=d;let f=r.additionLineIndex+r.additions,p=r.deletionLineIndex+r.deletions,m=n[e+1];m?.type===`context`?(m.lines+=d,m.additionLineIndex=f,m.deletionLineIndex=p):n.splice(e+1,0,{type:`context`,lines:d,additionLineIndex:f,deletionLineIndex:p}),i.lines-=d,i.lines===0&&(n.splice(e-1,1),e--)}}function Ar(e,t){let{deletions:n,additions:r,deletionLineIndex:i,additionLineIndex:a}=t,o=Math.min(n,r),s=Math.abs(r-n);if(o===0||s===0||o*(s+1)>Er)return null;let c=[];for(let t=0;t<n;t++)c.push(Mr(e.deletionLines[i+t]??``));let l=[];for(let t=0;t<r;t++)l.push(Mr(e.additionLines[a+t]??``));let u=r>n,d=0,f=-1;for(let e=0;e<=s;e++){let t=0;for(let n=0;n<o;n++)t+=Nr(c[n+(u?0:e)],l[n+(u?e:0)]);e===0?f=t+o*Dr:t>f&&(f=t,d=e)}if(d===0)return null;let p=[],m=(e,t,n,r)=>{(e>0||t>0)&&p.push({type:`change`,deletions:e,additions:t,deletionLineIndex:n,additionLineIndex:r})};return u?(m(0,d,i,a),m(o,o,i,a+d),m(0,r-o-d,i+o,a+d+o)):(m(d,0,i,a),m(o,o,i+d,a),m(n-o-d,0,i+d+o,a+o)),p}var jr=/\s+/g;function Mr(e){return e.replace(jr,``)}function Nr(e,t){if(e===t)return 1;let n=Math.max(e.length,t.length),r=Math.min(e.length,t.length);if(r===0)return 0;let i=0;for(;i<r&&e[i]===t[i];)i++;let a=0;for(;a<r-i&&e[e.length-1-a]===t[t.length-1-a];)a++;return(i+a)/n}function Pr(e,t){try{return Fr(e,t)}finally{wr()}}function Fr(e,{cacheKey:t,isGitDiff:n=Kn.test(e),oldFile:r,newFile:i,throwOnError:a=!1}={}){let o=0,s=Ur(e,`@@ `),c,l=r==null||i==null,u=0,d=0;for(let e of s){let s=Lr(e),f=s[0];if(f==null){if(a)throw Error(`parsePatchContent: invalid hunk`);console.error(`parsePatchContent: invalid hunk`,e);continue}let p=Br(f),m=0,h=0;if(p==null||c==null){if(c!=null){if(a)throw Error(`parsePatchContent: Invalid hunk`);console.error(`parsePatchContent: Invalid hunk`,e);continue}c={name:``,type:`change`,hunks:[],splitLineCount:0,unifiedLineCount:0,isPartial:l,additionLines:!l&&r!=null&&i!=null?Ir(i.contents):[],deletionLines:!l&&r!=null&&i!=null?Ir(r.contents):[],cacheKey:Gr(t)},c.additionLines.length===1&&i?.contents===``&&(c.additionLines.length=0),c.deletionLines.length===1&&r?.contents===``&&(c.deletionLines.length=0);for(let e of s){if(e.startsWith(`diff --git`)){let t=e.trim().match(Xn),n=t?.[1]??t?.[2],r=t?.[3]??t?.[4];if(n==null||r==null){if(a)throw Error(`parsePatchContent: invalid git diff header`);console.error(`parsePatchContent: invalid git diff header`,e);continue}c.name=P(r.trim()),n!==r&&(c.prevName=P(n.trim()));continue}let t=e.startsWith(`---`)||e.startsWith(`+++`)?e.match(n?Yn:Jn):null;if(t!=null){let[,e,n]=t;if(e===`---`&&n!==`/dev/null`){let e=P(n.trim());c.prevName=e,c.name=e}else e===`+++`&&n!==`/dev/null`&&(c.name=P(n.trim()))}else if(n){if(e.startsWith(`new mode `)&&(c.mode=P(e.slice(8).trim())),e.startsWith(`old mode `)&&(c.prevMode=P(e.slice(8).trim())),e.startsWith(`new file mode`)&&(c.type=`new`,c.mode=P(e.slice(13).trim())),e.startsWith(`deleted file mode`)&&(c.type=`deleted`,c.mode=P(e.slice(17).trim())),e.startsWith(`similarity index`)&&(e.startsWith(`similarity index 100%`)?c.type=`rename-pure`:c.type=`rename-changed`),e.startsWith(`index `)){let[,t,n,r]=e.trim().match(Zn)??[];t!=null&&(c.prevObjectId=P(t)),n!=null&&(c.newObjectId=P(n)),r!=null&&(c.mode=P(r))}e.startsWith(`rename from `)&&(c.prevName=P(e.slice(12).trim())),e.startsWith(`rename to `)&&(c.name=P(e.slice(10).trim()))}}continue}let g,_;for(;s.length>0&&(s[s.length-1]===`
8
- `||s[s.length-1]===`\r`||s[s.length-1]===`\r
9
- `||s[s.length-1]===``);)s.pop();let{additionStart:v,deletionStart:y}=p;u=l?u:y-1,d=l?d:v-1;let b={collapsedBefore:0,splitLineCount:0,splitLineStart:0,unifiedLineCount:0,unifiedLineStart:0,additionCount:p.additionCount,additionStart:v,additionLines:m,deletionCount:p.deletionCount,deletionStart:y,deletionLines:h,deletionLineIndex:u,additionLineIndex:d,hunkContent:[],hunkContext:Gr(p.hunkContext),hunkSpecs:P(f),noEOFCRAdditions:!1,noEOFCRDeletions:!1},x=0,S=0;for(let e=1;e<s.length;e++){let t=s[e];if(x>=b.additionCount&&S>=b.deletionCount&&!t.startsWith(`\\`)){if(a&&Rr(t)&&!zr(t))throw Error(`parsePatchContent: hunk has more lines than expected`);break}let n=t[0];if(n!==`+`&&n!==`-`&&n!==` `&&n!==`\\`){if(a)throw Error(`parsePatchContent: invalid hunk line`);console.error(`parseLineType: Invalid firstChar: "${n}", full line: "${t}"`),console.error(`processFile: invalid rawLine:`,t);continue}let r=Kr(n);if(r===`addition`){if(a&&x>=b.additionCount)throw Error(`parsePatchContent: hunk has too many addition lines`);let e=qr(t);(g==null||g.type!==`change`)&&(g=Jr(`change`,u,d),b.hunkContent.push(g)),d++,x++,l&&c.additionLines.push(e),g.additions++,m++,_=`addition`}else if(r===`deletion`){if(a&&S>=b.deletionCount)throw Error(`parsePatchContent: hunk has too many deletion lines`);let e=qr(t);(g==null||g.type!==`change`)&&(g=Jr(`change`,u,d),b.hunkContent.push(g)),u++,S++,l&&c.deletionLines.push(e),g.deletions++,h++,_=`deletion`}else if(r===`context`){if(a&&(S>=b.deletionCount||x>=b.additionCount))throw Error(`parsePatchContent: hunk has too many context lines`);let e=qr(t);(g==null||g.type!==`context`)&&(g=Jr(`context`,u,d),b.hunkContent.push(g)),d++,u++,x++,S++,l&&(c.deletionLines.push(e),c.additionLines.push(e)),g.lines++,_=`context`}else if(r===`metadata`&&g!=null){if(g.type===`context`?(b.noEOFCRAdditions=!0,b.noEOFCRDeletions=!0):_===`deletion`?b.noEOFCRDeletions=!0:_===`addition`&&(b.noEOFCRAdditions=!0),l&&(_===`addition`||_===`context`)){let e=c.additionLines.length-1;e>=0&&(c.additionLines[e]=vr(c.additionLines[e]))}if(l&&(_===`deletion`||_===`context`)){let e=c.deletionLines.length-1;e>=0&&(c.deletionLines[e]=vr(c.deletionLines[e]))}}}if(a&&(x!==b.additionCount||S!==b.deletionCount))throw Error(`parsePatchContent: hunk line count mismatch`);b.additionLines=m,b.deletionLines=h,b.collapsedBefore=Math.max(Tr(b.additionStart,b.additionCount)-o,0),c.hunks.push(b),o=F(b.additionStart,b.additionCount);for(let e of b.hunkContent)e.type===`context`?(b.splitLineCount+=e.lines,b.unifiedLineCount+=e.lines):(b.splitLineCount+=Math.max(e.additions,e.deletions),b.unifiedLineCount+=e.deletions+e.additions);b.splitLineStart=c.splitLineCount+b.collapsedBefore,b.unifiedLineStart=c.unifiedLineCount+b.collapsedBefore,c.splitLineCount+=b.collapsedBefore+b.splitLineCount,c.unifiedLineCount+=b.collapsedBefore+b.unifiedLineCount}if(c!=null){if(a&&l&&!n&&c.hunks.length===0)throw Error(`parsePatchContent: unified file has no hunks`);if(c.hunks.length>0&&!l&&c.additionLines.length>0&&c.deletionLines.length>0){let e=c.hunks[c.hunks.length-1],t=F(e.additionStart,e.additionCount),n=c.additionLines.length,r=Math.max(n-t,0);c.splitLineCount+=r,c.unifiedLineCount+=r}return n||(c.prevName!=null&&c.name!==c.prevName?c.hunks.length>0?c.type=`rename-changed`:c.type=`rename-pure`:(r==null||r.contents===``)&&i!=null&&i.contents!==``?c.type=`new`:r!=null&&r.contents!==``&&(i==null||i.contents===``)&&(c.type=`deleted`)),c.type!==`rename-pure`&&c.type!==`rename-changed`&&(c.prevName=void 0),Or(c),c}}function Ir(e){let t=Lr(e);for(let e=0;e<t.length;e++)t[e]=P(t[e]);return t}function Lr(e){if(e.length===0)return[``];let t=[],n=0;for(;;){let r=e.indexOf(`
10
- `,n);if(r===-1)break;t.push(e.slice(n,r+1)),n=r+1}return n<e.length&&t.push(e.slice(n)),t}function Rr(e){let t=e[0];return t===`+`||t===`-`||t===` `}function zr(e){if(!e.startsWith(`--`))return!1;for(let t=2;t<e.length;t++){let n=e[t];if(n!==` `&&n!==` `&&n!==`
11
- `&&n!==`\r`)return!1}return!0}function Br(e){if(!e.startsWith(`@@ -`))return;let t=4,n=Vr(e,t);if(n==null)return;let r=n.value;t=n.endIndex;let i=1;if(e[t]===`,`){let n=Vr(e,t+1);if(n==null)return;i=n.value,t=n.endIndex}if(e[t]!==` `||e[t+1]!==`+`)return;t+=2;let a=Vr(e,t);if(a==null)return;let o=a.value;t=a.endIndex;let s=1;if(e[t]===`,`){let n=Vr(e,t+1);if(n==null)return;s=n.value,t=n.endIndex}if(e[t]!==` `||e[t+1]!==`@`||e[t+2]!==`@`)return;let c,l=t+3;return e[l]===` `&&(c=Hr(e.slice(l+1))),{additionCount:s,additionStart:o,deletionCount:i,deletionStart:r,hunkContext:c}}function Vr(e,t){let n=t,r=0;for(;n<e.length;n++){let t=e.charCodeAt(n)-48;if(t<0||t>9)break;r=r*10+t}if(n!==t)return{value:r,endIndex:n}}function Hr(e){return e.endsWith(`\r
12
- `)?e.slice(0,-2):e.endsWith(`
13
- `)?e.slice(0,-1):e}function Ur(e,t){if(e.length===0)return[``];let n=`\n${t}`,r=e.startsWith(t)?0:Wr(e,n,0);if(r===-1)return[e];let i=[];r>0&&i.push(e.slice(0,r));let a=r;for(;;){let t=Wr(e,n,a+1);if(t===-1)break;i.push(e.slice(a,t)),a=t}return i.push(e.slice(a)),i}function Wr(e,t,n){let r=e.indexOf(t,n);return r===-1?-1:r+1}function Gr(e){return e==null?e:P(e)}function Kr(e){return e===` `?`context`:e===`\\`?`metadata`:e===`+`?`addition`:`deletion`}function qr(e){let t=e.slice(1);return P(t===``?`
14
- `:t)}function Jr(e,t,n){return e===`change`?{type:`change`,additions:0,deletions:0,additionLineIndex:n,deletionLineIndex:t}:{type:`context`,lines:0,additionLineIndex:n,deletionLineIndex:t}}var Yr=class{diff(e,t,n={}){let r;typeof n==`function`?(r=n,n={}):`callback`in n&&(r=n.callback);let i=this.castInput(e,n),a=this.castInput(t,n),o=this.removeEmpty(this.tokenize(i,n)),s=this.removeEmpty(this.tokenize(a,n));return this.diffWithOptionsObj(o,s,n,r)}diffWithOptionsObj(e,t,n,r){let i=e=>{if(e=this.postProcess(e,n),r){setTimeout(function(){r(e)},0);return}return e},a=t.length,o=e.length,s=1,c=a+o;n.maxEditLength!=null&&(c=Math.min(c,n.maxEditLength));let l=n.timeout??1/0,u=Date.now()+l,d=[{oldPos:-1,lastComponent:void 0}],f=this.extractCommon(d[0],t,e,0,n);if(d[0].oldPos+1>=o&&f+1>=a)return i(this.buildValues(d[0].lastComponent,t,e));let p=-1/0,m=1/0,h=()=>{for(let r=Math.max(p,-s);r<=Math.min(m,s);r+=2){let s,c=d[r-1],l=d[r+1];c&&(d[r-1]=void 0);let u=!1;if(l){let e=l.oldPos-r;u=l&&0<=e&&e<a}let h=c&&c.oldPos+1<o;if(!u&&!h){d[r]=void 0;continue}if(s=!h||u&&c.oldPos<l.oldPos?this.addToPath(l,!0,!1,0,n):this.addToPath(c,!1,!0,1,n),f=this.extractCommon(s,t,e,r,n),s.oldPos+1>=o&&f+1>=a)return i(this.buildValues(s.lastComponent,t,e))||!0;d[r]=s,s.oldPos+1>=o&&(m=Math.min(m,r-1)),f+1>=a&&(p=Math.max(p,r+1))}s++};if(r)(function e(){setTimeout(function(){if(s>c||Date.now()>u)return r(void 0);h()||e()},0)})();else for(;s<=c&&Date.now()<=u;){let e=h();if(e)return e}}addToPath(e,t,n,r,i){let a=e.lastComponent;return a&&!i.oneChangePerToken&&a.added===t&&a.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:a.count+1,added:t,removed:n,previousComponent:a.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:n,previousComponent:a}}}extractCommon(e,t,n,r,i){let a=t.length,o=n.length,s=e.oldPos,c=s-r,l=0;for(;c+1<a&&s+1<o&&this.equals(n[s+1],t[c+1],i);)c++,s++,l++,i.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return l&&!i.oneChangePerToken&&(e.lastComponent={count:l,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=s,c}equals(e,t,n){return n.comparator?n.comparator(e,t):e===t||!!n.ignoreCase&&e.toLowerCase()===t.toLowerCase()}removeEmpty(e){let t=[];for(let n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t}castInput(e,t){return e}tokenize(e,t){return Array.from(e)}join(e){return e.join(``)}postProcess(e,t){return e}get useLongestToken(){return!1}buildValues(e,t,n){let r=[],i;for(;e;)r.push(e),i=e.previousComponent,delete e.previousComponent,e=i;r.reverse();let a=r.length,o=0,s=0,c=0;for(;o<a;o++){let e=r[o];if(e.removed)e.value=this.join(n.slice(c,c+e.count)),c+=e.count;else{if(!e.added&&this.useLongestToken){let r=t.slice(s,s+e.count);r=r.map(function(e,t){let r=n[c+t];return r.length>e.length?r:e}),e.value=this.join(r)}else e.value=this.join(t.slice(s,s+e.count));s+=e.count,e.added||(c+=e.count)}}return r}},Xr=new class extends Yr{};function Zr(e,t,n){return Xr.diff(e,t,n)}function Qr(e,t){let n;for(n=0;n<e.length&&n<t.length;n++)if(e[n]!=t[n])return e.slice(0,n);return e.slice(0,n)}function $r(e,t){let n;if(!e||!t||e[e.length-1]!=t[t.length-1])return``;for(n=0;n<e.length&&n<t.length;n++)if(e[e.length-(n+1)]!=t[t.length-(n+1)])return e.slice(-n);return e.slice(-n)}function ei(e,t,n){if(e.slice(0,t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't start with prefix ${JSON.stringify(t)}; this is a bug`);return n+e.slice(t.length)}function ti(e,t,n){if(!t)return e+n;if(e.slice(-t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't end with suffix ${JSON.stringify(t)}; this is a bug`);return e.slice(0,-t.length)+n}function ni(e,t){return ei(e,t,``)}function ri(e,t){return ti(e,t,``)}function ii(e,t){return t.slice(0,ai(e,t))}function ai(e,t){let n=0;e.length>t.length&&(n=e.length-t.length);let r=t.length;e.length<t.length&&(r=e.length);let i=Array(r),a=0;i[0]=0;for(let e=1;e<r;e++){for(t[e]==t[a]?i[e]=i[a]:i[e]=a;a>0&&t[e]!=t[a];)a=i[a];t[e]==t[a]&&a++}a=0;for(let r=n;r<e.length;r++){for(;a>0&&e[r]!=t[a];)a=i[a];e[r]==t[a]&&a++}return a}function oi(e,t){let n=[];for(let r of Array.from(t.segment(e))){let e=r.segment;n.length&&/\s/.test(n[n.length-1])&&/\s/.test(e)?n[n.length-1]+=e:n.push(e)}return n}function si(e,t){if(t)return li(e,t)[1];let n;for(n=e.length-1;n>=0&&e[n].match(/\s/);n--);return e.substring(n+1)}function ci(e,t){if(t)return li(e,t)[0];let n=e.match(/^\s*/);return n?n[0]:``}function li(e,t){if(!t)return[ci(e),si(e)];if(t.resolvedOptions().granularity!=`word`)throw Error(`The segmenter passed must have a granularity of "word"`);let n=oi(e,t),r=n[0],i=n[n.length-1];return[/\s/.test(r)?r:``,/\s/.test(i)?i:``]}var ui=`a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}`,di=RegExp(`[${ui}]+|\\s+|[^${ui}]`,`ug`);new class extends Yr{equals(e,t,n){return n.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e.trim()===t.trim()}tokenize(e,t={}){let n;if(t.intlSegmenter){let r=t.intlSegmenter;if(r.resolvedOptions().granularity!=`word`)throw Error(`The segmenter passed must have a granularity of "word"`);n=oi(e,r)}else n=e.match(di)||[];let r=[],i=null;return n.forEach(e=>{/\s/.test(e)?i==null?r.push(e):r.push(r.pop()+e):i!=null&&/\s/.test(i)?r[r.length-1]==i?r.push(r.pop()+e):r.push(i+e):r.push(e),i=e}),r}join(e){return e.map((e,t)=>t==0?e:e.replace(/^\s+/,``)).join(``)}postProcess(e,t){if(!e||t.oneChangePerToken)return e;let n=null,r=null,i=null;return e.forEach(e=>{e.added?r=e:e.removed?i=e:((r||i)&&fi(n,i,r,e,t.intlSegmenter),n=e,r=null,i=null)}),(r||i)&&fi(n,i,r,null,t.intlSegmenter),e}};function fi(e,t,n,r,i){if(t&&n){let[a,o]=li(t.value,i),[s,c]=li(n.value,i);if(e){let r=Qr(a,s);e.value=ti(e.value,s,r),t.value=ni(t.value,r),n.value=ni(n.value,r)}if(r){let e=$r(o,c);r.value=ei(r.value,c,e),t.value=ri(t.value,e),n.value=ri(n.value,e)}}else if(n){if(e){let e=ci(n.value,i);n.value=n.value.substring(e.length)}if(r){let e=ci(r.value,i);r.value=r.value.substring(e.length)}}else if(e&&r){let n=ci(r.value,i),[a,o]=li(t.value,i),s=Qr(n,a);t.value=ni(t.value,s);let c=$r(ni(n,s),o);t.value=ri(t.value,c),r.value=ei(r.value,n,c),e.value=ti(e.value,n,n.slice(0,n.length-c.length))}else if(r){let e=ci(r.value,i),n=ii(si(t.value,i),e);t.value=ri(t.value,n)}else if(e){let n=ii(si(e.value,i),ci(t.value,i));t.value=ni(t.value,n)}}var pi=new class extends Yr{tokenize(e){let t=RegExp(`(\\r?\\n)|[${ui}]+|[^\\S\\n\\r]+|[^${ui}]`,`ug`);return e.match(t)||[]}};function mi(e,t,n){return pi.diff(e,t,n)}var hi=new class extends Yr{constructor(){super(...arguments),this.tokenize=_i}equals(e,t,n){return n.ignoreWhitespace?((!n.newlineIsToken||!e.includes(`
15
- `))&&(e=e.trim()),(!n.newlineIsToken||!t.includes(`
16
- `))&&(t=t.trim())):n.ignoreNewlineAtEof&&!n.newlineIsToken&&(e.endsWith(`
17
- `)&&(e=e.slice(0,-1)),t.endsWith(`
18
- `)&&(t=t.slice(0,-1))),super.equals(e,t,n)}};function gi(e,t,n){return hi.diff(e,t,n)}function _i(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,`
19
- `));let n=[],r=e.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(let e=0;e<r.length;e++){let i=r[e];e%2&&!t.newlineIsToken?n[n.length-1]+=i:n.push(i)}return n}function vi(e){for(let t=0;t<e.length;t++)if(e[t]<` `||e[t]>`~`||e[t]===`"`||e[t]===`\\`)return!0;return!1}function yi(e){if(!vi(e))return e;let t=`"`,n=new TextEncoder().encode(e),r=0;for(;r<n.length;){let e=n[r];t+=e===7?`\\a`:e===8?`\\b`:e===9?`\\t`:e===10?`\\n`:e===11?`\\v`:e===12?`\\f`:e===13?`\\r`:e===34?`\\"`:e===92?`\\\\`:e>=32&&e<=126?String.fromCharCode(e):`\\`+e.toString(8).padStart(3,`0`),r++}return t+=`"`,t}var bi={includeIndex:!0,includeUnderline:!0,includeFileHeaders:!0};function xi(e,t,n,r,i,a,o){let s;s=o?typeof o==`function`?{callback:o}:o:{},s.context===void 0&&(s.context=4);let c=s.context;if(s.newlineIsToken)throw Error(`newlineIsToken may not be used with patch-generation functions, only with diffing functions`);if(s.callback){let{callback:e}=s;gi(n,r,Object.assign(Object.assign({},s),{callback:t=>{let n=l(t);e(n)}}))}else return l(gi(n,r,s));function l(n){if(!n)return;n.push({value:``,lines:[]});function r(e){return e.map(function(e){return` `+e})}let o=[],s=0,l=0,u=[],d=1,f=1;for(let e=0;e<n.length;e++){let t=n[e],i=t.lines||wi(t.value);if(t.lines=i,t.added||t.removed){if(!s){let t=n[e-1];s=d,l=f,t&&(u=c>0?r(t.lines.slice(-c)):[],s-=u.length,l-=u.length)}for(let e of i)u.push((t.added?`+`:`-`)+e);t.added?f+=i.length:d+=i.length}else{if(s){if(i.length<=c*2&&e<n.length-2)for(let e of r(i))u.push(e);else{let e=Math.min(i.length,c);for(let t of r(i.slice(0,e)))u.push(t);let t={oldStart:s,oldLines:d-s+e,newStart:l,newLines:f-l+e,lines:u};o.push(t),s=0,l=0,u=[]}}d+=i.length,f+=i.length}}for(let e of o)for(let t=0;t<e.lines.length;t++)e.lines[t].endsWith(`
20
- `)?e.lines[t]=e.lines[t].slice(0,-1):(e.lines.splice(t+1,0,`\`),t++);return{oldFileName:e,newFileName:t,oldHeader:i,newHeader:a,hunks:o}}}function Si(e,t){if(t||=bi,Array.isArray(e)){if(e.length>1&&!t.includeFileHeaders&&!e.every(e=>e.isGit))throw Error(`Cannot omit file headers on a multi-file patch. (The result would be unparseable; how would a tool trying to apply the patch know which changes are to which file?)`);return e.map(e=>Si(e,t)).join(`
21
- `)}let n=[];if(e.isGit){if(t=bi,!e.oldFileName)throw Error(`oldFileName must be specified for Git patches`);if(!e.newFileName)throw Error(`newFileName must be specified for Git patches`);let r=e.oldFileName,i=e.newFileName;e.isCreate&&r===`/dev/null`?r=i.replace(/^b\//,`a/`):e.isDelete&&i===`/dev/null`&&(i=r.replace(/^a\//,`b/`)),n.push(`diff --git `+yi(r)+` `+yi(i)),e.isDelete&&n.push(`deleted file mode `+(e.oldMode??`100644`)),e.isCreate&&n.push(`new file mode `+(e.newMode??`100644`)),e.oldMode&&e.newMode&&!e.isDelete&&!e.isCreate&&(n.push(`old mode `+e.oldMode),n.push(`new mode `+e.newMode)),e.isRename&&(n.push(`rename from `+yi((e.oldFileName??``).replace(/^a\//,``))),n.push(`rename to `+yi((e.newFileName??``).replace(/^b\//,``)))),e.isCopy&&(n.push(`copy from `+yi((e.oldFileName??``).replace(/^a\//,``))),n.push(`copy to `+yi((e.newFileName??``).replace(/^b\//,``))))}else t.includeIndex&&e.oldFileName==e.newFileName&&e.oldFileName!==void 0&&n.push(`Index: `+e.oldFileName),t.includeUnderline&&n.push(`===================================================================`);let r=e.hunks.length>0;t.includeFileHeaders&&e.oldFileName!==void 0&&e.newFileName!==void 0&&(!e.isGit||r)&&(n.push(`--- `+yi(e.oldFileName)+(e.oldHeader?` `+e.oldHeader:``)),n.push(`+++ `+yi(e.newFileName)+(e.newHeader?` `+e.newHeader:``)));for(let t=0;t<e.hunks.length;t++){let r=e.hunks[t],i=r.oldLines===0?r.oldStart-1:r.oldStart,a=r.newLines===0?r.newStart-1:r.newStart;n.push(`@@ -`+i+`,`+r.oldLines+` +`+a+`,`+r.newLines+` @@`);for(let e of r.lines)n.push(e)}return n.join(`
22
- `)+`
23
- `}function Ci(e,t,n,r,i,a,o){if(typeof o==`function`&&(o={callback:o}),o?.callback){let{callback:s}=o;xi(e,t,n,r,i,a,Object.assign(Object.assign({},o),{callback:e=>{s(e?Si(e,o.headerOptions):void 0)}}))}else{let s=xi(e,t,n,r,i,a,o);return s?Si(s,o?.headerOptions):void 0}}function wi(e){let t=e.endsWith(`
24
- `),n=e.split(`
25
- `).map(e=>e+`
26
- `);return t?n.pop():n.push(n.pop().slice(0,-1)),n}var Ti=`/dev/null`;function Ei(e,t,n,r=!1){if(e===null&&t===null)throw Error(`parseDiffFromFile: You must pass oldFile, newFile, or both`);let i=e??Di(),a=t??Di(),o=Pr(Ci(i.name,a.name,i.contents,a.contents,i.header,a.header,n),{cacheKey:(()=>{let n=e?.cacheKey??e?.name,r=t?.cacheKey??t?.name;return n!=null&&r!=null?n+`:`+r:n??r})(),oldFile:i,newFile:a,throwOnError:r});if(o==null)throw Error(`parseDiffFrom: FileInvalid diff -- probably need to fix something -- if the files are the same maybe?`);e===null?(o.type=`new`,o.prevName=void 0):t===null&&(o.type=`deleted`,o.prevName=void 0);let s=t?.lang??(t===null?e?.lang:void 0);return s!=null&&(o.lang=s),o}function Di(){return{name:Ti,contents:``}}function Oi(e,t){return e?.cacheKey===t?.cacheKey&&e?.contents===t?.contents&&e?.name===t?.name&&e?.lang===t?.lang}function ki(e){return{type:`text`,value:e}}function I({tagName:e,children:t=[],properties:n={}}){return{type:`element`,tagName:e,properties:n,children:t}}function Ai({name:e,width:t=16,height:n=16,properties:r}){return I({tagName:`svg`,properties:{width:t,height:n,viewBox:`0 0 16 16`,...r},children:[I({tagName:`use`,properties:{href:`#${e.replace(/^#/,``)}`}})]})}function ji(e){let t=e.children[0];for(;t!=null;){if(t.type===`element`&&t.tagName===`code`)return t;t=`children`in t?t.children[0]:null}}function Mi(e){return I({tagName:`div`,properties:{"data-gutter":``},children:e})}function Ni(e,t,n,r={}){return I({tagName:`div`,properties:{"data-line-type":e,"data-column-number":t,"data-line-index":n,...r},children:t==null?void 0:[I({tagName:`span`,properties:{"data-line-number-content":``},children:[ki(`${t}`)]})]})}function Pi(e,t,n){return I({tagName:`div`,properties:{"data-gutter-buffer":t,"data-buffer-size":n,"data-line-type":t===`annotation`?void 0:e,style:t===`annotation`?`grid-row: span ${n};`:`grid-row: span ${n};min-height:calc(${n} * 1lh);`}})}function Fi(){return I({tagName:`button`,properties:{"data-utility-button":``,type:`button`},children:[Ai({name:`diffs-icon-plus`,properties:{"data-icon":``}})]})}function Ii(e,t){return e.lineNumber===t.lineNumber&&e.side===t.side}function Li(e){for(let t of e)if(t instanceof HTMLElement&&(t.hasAttribute(`data-utility-button`)||t.hasAttribute(`data-gutter-utility-slot`)||t.getAttribute(`slot`)===`gutter-utility-slot`||t.getAttribute(`name`)===`gutter-utility-slot`))return!0;return!1}var Ri=[`area`,`base`,`basefont`,`bgsound`,`br`,`col`,`command`,`embed`,`frame`,`hr`,`image`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`],zi=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};zi.prototype.normal={},zi.prototype.property={},zi.prototype.space=void 0;function Bi(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new zi(n,r,t)}function Vi(e){return e.toLowerCase()}var L=class{constructor(e,t){this.attribute=t,this.property=e}};L.prototype.attribute=``,L.prototype.booleanish=!1,L.prototype.boolean=!1,L.prototype.commaOrSpaceSeparated=!1,L.prototype.commaSeparated=!1,L.prototype.defined=!1,L.prototype.mustUseProperty=!1,L.prototype.number=!1,L.prototype.overloadedBoolean=!1,L.prototype.property=``,L.prototype.spaceSeparated=!1,L.prototype.space=void 0;var Hi=ke({boolean:()=>R,booleanish:()=>z,commaOrSpaceSeparated:()=>H,commaSeparated:()=>Gi,number:()=>B,overloadedBoolean:()=>Wi,spaceSeparated:()=>V}),Ui=0,R=Ki(),z=Ki(),Wi=Ki(),B=Ki(),V=Ki(),Gi=Ki(),H=Ki();function Ki(){return 2**++Ui}var qi=Object.keys(Hi),Ji=class extends L{constructor(e,t,n,r){let i=-1;if(super(e,t),Yi(this,`space`,r),typeof n==`number`)for(;++i<qi.length;){let e=qi[i];Yi(this,qi[i],(n&Hi[e])===Hi[e])}}};Ji.prototype.defined=!0;function Yi(e,t,n){n&&(e[t]=n)}function Xi(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new Ji(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Vi(r)]=r,n[Vi(a.attribute)]=r}return new zi(t,n,e.space)}var Zi=Xi({properties:{ariaActiveDescendant:null,ariaAtomic:z,ariaAutoComplete:null,ariaBusy:z,ariaChecked:z,ariaColCount:B,ariaColIndex:B,ariaColSpan:B,ariaControls:V,ariaCurrent:null,ariaDescribedBy:V,ariaDetails:null,ariaDisabled:z,ariaDropEffect:V,ariaErrorMessage:null,ariaExpanded:z,ariaFlowTo:V,ariaGrabbed:z,ariaHasPopup:null,ariaHidden:z,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:V,ariaLevel:B,ariaLive:null,ariaModal:z,ariaMultiLine:z,ariaMultiSelectable:z,ariaOrientation:null,ariaOwns:V,ariaPlaceholder:null,ariaPosInSet:B,ariaPressed:z,ariaReadOnly:z,ariaRelevant:null,ariaRequired:z,ariaRoleDescription:V,ariaRowCount:B,ariaRowIndex:B,ariaRowSpan:B,ariaSelected:z,ariaSetSize:B,ariaSort:null,ariaValueMax:B,ariaValueMin:B,ariaValueNow:B,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function Qi(e,t){return t in e?e[t]:t}function $i(e,t){return Qi(e,t.toLowerCase())}var ea=Xi({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:Gi,acceptCharset:V,accessKey:V,action:null,allow:null,allowFullScreen:R,allowPaymentRequest:R,allowUserMedia:R,alpha:R,alt:null,as:null,async:R,autoCapitalize:null,autoComplete:V,autoFocus:R,autoPlay:R,blocking:V,capture:null,charSet:null,checked:R,cite:null,className:V,closedBy:null,colorSpace:null,cols:B,colSpan:B,command:null,commandFor:null,content:null,contentEditable:z,controls:R,controlsList:V,coords:B|Gi,crossOrigin:null,data:null,dateTime:null,decoding:null,default:R,defer:R,dir:null,dirName:null,disabled:R,download:Wi,draggable:z,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:R,formTarget:null,headers:V,height:B,hidden:Wi,high:B,href:null,hrefLang:null,htmlFor:V,httpEquiv:V,id:null,imageSizes:null,imageSrcSet:null,inert:R,inputMode:null,integrity:null,is:null,isMap:R,itemId:null,itemProp:V,itemRef:V,itemScope:R,itemType:V,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:R,low:B,manifest:null,max:null,maxLength:B,media:null,method:null,min:null,minLength:B,multiple:R,muted:R,name:null,nonce:null,noModule:R,noValidate:R,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:R,optimum:B,pattern:null,ping:V,placeholder:null,playsInline:R,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:R,referrerPolicy:null,rel:V,required:R,reversed:R,rows:B,rowSpan:B,sandbox:V,scope:null,scoped:R,seamless:R,selected:R,shadowRootClonable:R,shadowRootCustomElementRegistry:R,shadowRootDelegatesFocus:R,shadowRootMode:null,shadowRootSerializable:R,shape:null,size:B,sizes:null,slot:null,span:B,spellCheck:z,src:null,srcDoc:null,srcLang:null,srcSet:null,start:B,step:null,style:null,tabIndex:B,target:null,title:null,translate:null,type:null,typeMustMatch:R,useMap:null,value:z,width:B,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:V,axis:null,background:null,bgColor:null,border:B,borderColor:null,bottomMargin:B,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:R,declare:R,event:null,face:null,frame:null,frameBorder:null,hSpace:B,leftMargin:B,link:null,longDesc:null,lowSrc:null,marginHeight:B,marginWidth:B,noResize:R,noHref:R,noShade:R,noWrap:R,object:null,profile:null,prompt:null,rev:null,rightMargin:B,rules:null,scheme:null,scrolling:z,standby:null,summary:null,text:null,topMargin:B,valueType:null,version:null,vAlign:null,vLink:null,vSpace:B,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:R,disablePictureInPicture:R,disableRemotePlayback:R,exportParts:Gi,part:V,prefix:null,property:null,results:B,security:null,unselectable:null},space:`html`,transform:$i}),ta=Xi({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,maskType:`mask-type`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:H,accentHeight:B,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:B,amplitude:B,arabicForm:null,ascent:B,attributeName:null,attributeType:null,azimuth:B,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:B,by:null,calcMode:null,capHeight:B,className:V,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:B,diffuseConstant:B,direction:null,display:null,dur:null,divisor:B,dominantBaseline:null,download:R,dx:null,dy:null,edgeMode:null,editable:null,elevation:B,enableBackground:null,end:null,event:null,exponent:B,externalResourcesRequired:null,fill:null,fillOpacity:B,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Gi,g2:Gi,glyphName:Gi,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:B,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:B,horizOriginX:B,horizOriginY:B,id:null,ideographic:B,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:B,k:B,k1:B,k2:B,k3:B,k4:B,kernelMatrix:H,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:B,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:B,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:B,overlineThickness:B,paintOrder:null,panose1:null,path:null,pathLength:B,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:V,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:B,pointsAtY:B,pointsAtZ:B,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:H,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:H,rev:H,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:H,requiredFeatures:H,requiredFonts:H,requiredFormats:H,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:B,specularExponent:B,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:B,strikethroughThickness:B,string:null,stroke:null,strokeDashArray:H,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:B,strokeOpacity:B,strokeWidth:null,style:null,surfaceScale:B,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:H,tabIndex:B,tableValues:null,target:null,targetX:B,targetY:B,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:H,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:B,underlineThickness:B,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:B,values:null,vAlphabetic:B,vMathematical:B,vectorEffect:null,vHanging:B,vIdeographic:B,version:null,vertAdvY:B,vertOriginX:B,vertOriginY:B,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:B,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:Qi}),na=Xi({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),ra=Xi({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:$i}),ia=Xi({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),aa=/[A-Z]/g,oa=/-[a-z]/g,sa=/^data[-\w.:]+$/i;function ca(e,t){let n=Vi(t),r=t,i=L;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&sa.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(oa,ua);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!oa.test(e)){let n=e.replace(aa,la);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=Ji}return new i(r,t)}function la(e){return`-`+e.toLowerCase()}function ua(e){return e.charAt(1).toUpperCase()}var da=Bi([Zi,ea,na,ra,ia],`html`),fa=Bi([Zi,ta,na,ra,ia],`svg`),pa={}.hasOwnProperty;function ma(e,t){let n=t||{};function r(t,...n){let i=r.invalid,a=r.handlers;if(t&&pa.call(t,e)){let n=String(t[e]);i=pa.call(a,n)?a[n]:r.unknown}if(i)return i.call(this,t,...n)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}var ha=/["&'<>`]/g,ga=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,_a=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,va=/[|\\{}()[\]^$+*?.]/g,ya=new WeakMap;function ba(e,t){if(e=e.replace(t.subset?xa(t.subset):ha,r),t.subset||t.escapeOnly)return e;return e.replace(ga,n).replace(_a,r);function n(e,n,r){return t.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,r.charCodeAt(n+2),t)}function r(e,n,r){return t.format(e.charCodeAt(0),r.charCodeAt(n+1),t)}}function xa(e){let t=ya.get(e);return t||(t=Sa(e),ya.set(e,t)),t}function Sa(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(va,`\\$&`));return RegExp(`(?:`+t.join(`|`)+`)`,`g`)}var Ca=/[\dA-Fa-f]/;function wa(e,t,n){let r=`&#x`+e.toString(16).toUpperCase();return n&&t&&!Ca.test(String.fromCharCode(t))?r:r+`;`}var Ta=/\d/;function Ea(e,t,n){let r=`&#`+String(e);return n&&t&&!Ta.test(String.fromCharCode(t))?r:r+`;`}var Da=`AElig.AMP.Aacute.Acirc.Agrave.Aring.Atilde.Auml.COPY.Ccedil.ETH.Eacute.Ecirc.Egrave.Euml.GT.Iacute.Icirc.Igrave.Iuml.LT.Ntilde.Oacute.Ocirc.Ograve.Oslash.Otilde.Ouml.QUOT.REG.THORN.Uacute.Ucirc.Ugrave.Uuml.Yacute.aacute.acirc.acute.aelig.agrave.amp.aring.atilde.auml.brvbar.ccedil.cedil.cent.copy.curren.deg.divide.eacute.ecirc.egrave.eth.euml.frac12.frac14.frac34.gt.iacute.icirc.iexcl.igrave.iquest.iuml.laquo.lt.macr.micro.middot.nbsp.not.ntilde.oacute.ocirc.ograve.ordf.ordm.oslash.otilde.ouml.para.plusmn.pound.quot.raquo.reg.sect.shy.sup1.sup2.sup3.szlig.thorn.times.uacute.ucirc.ugrave.uml.uuml.yacute.yen.yuml`.split(`.`),Oa={nbsp:`\xA0`,iexcl:`¡`,cent:`¢`,pound:`£`,curren:`¤`,yen:`¥`,brvbar:`¦`,sect:`§`,uml:`¨`,copy:`©`,ordf:`ª`,laquo:`«`,not:`¬`,shy:`­`,reg:`®`,macr:`¯`,deg:`°`,plusmn:`±`,sup2:`²`,sup3:`³`,acute:`´`,micro:`µ`,para:`¶`,middot:`·`,cedil:`¸`,sup1:`¹`,ordm:`º`,raquo:`»`,frac14:`¼`,frac12:`½`,frac34:`¾`,iquest:`¿`,Agrave:`À`,Aacute:`Á`,Acirc:`Â`,Atilde:`Ã`,Auml:`Ä`,Aring:`Å`,AElig:`Æ`,Ccedil:`Ç`,Egrave:`È`,Eacute:`É`,Ecirc:`Ê`,Euml:`Ë`,Igrave:`Ì`,Iacute:`Í`,Icirc:`Î`,Iuml:`Ï`,ETH:`Ð`,Ntilde:`Ñ`,Ograve:`Ò`,Oacute:`Ó`,Ocirc:`Ô`,Otilde:`Õ`,Ouml:`Ö`,times:`×`,Oslash:`Ø`,Ugrave:`Ù`,Uacute:`Ú`,Ucirc:`Û`,Uuml:`Ü`,Yacute:`Ý`,THORN:`Þ`,szlig:`ß`,agrave:`à`,aacute:`á`,acirc:`â`,atilde:`ã`,auml:`ä`,aring:`å`,aelig:`æ`,ccedil:`ç`,egrave:`è`,eacute:`é`,ecirc:`ê`,euml:`ë`,igrave:`ì`,iacute:`í`,icirc:`î`,iuml:`ï`,eth:`ð`,ntilde:`ñ`,ograve:`ò`,oacute:`ó`,ocirc:`ô`,otilde:`õ`,ouml:`ö`,divide:`÷`,oslash:`ø`,ugrave:`ù`,uacute:`ú`,ucirc:`û`,uuml:`ü`,yacute:`ý`,thorn:`þ`,yuml:`ÿ`,fnof:`ƒ`,Alpha:`Α`,Beta:`Β`,Gamma:`Γ`,Delta:`Δ`,Epsilon:`Ε`,Zeta:`Ζ`,Eta:`Η`,Theta:`Θ`,Iota:`Ι`,Kappa:`Κ`,Lambda:`Λ`,Mu:`Μ`,Nu:`Ν`,Xi:`Ξ`,Omicron:`Ο`,Pi:`Π`,Rho:`Ρ`,Sigma:`Σ`,Tau:`Τ`,Upsilon:`Υ`,Phi:`Φ`,Chi:`Χ`,Psi:`Ψ`,Omega:`Ω`,alpha:`α`,beta:`β`,gamma:`γ`,delta:`δ`,epsilon:`ε`,zeta:`ζ`,eta:`η`,theta:`θ`,iota:`ι`,kappa:`κ`,lambda:`λ`,mu:`μ`,nu:`ν`,xi:`ξ`,omicron:`ο`,pi:`π`,rho:`ρ`,sigmaf:`ς`,sigma:`σ`,tau:`τ`,upsilon:`υ`,phi:`φ`,chi:`χ`,psi:`ψ`,omega:`ω`,thetasym:`ϑ`,upsih:`ϒ`,piv:`ϖ`,bull:`•`,hellip:`…`,prime:`′`,Prime:`″`,oline:`‾`,frasl:`⁄`,weierp:`℘`,image:`ℑ`,real:`ℜ`,trade:`™`,alefsym:`ℵ`,larr:`←`,uarr:`↑`,rarr:`→`,darr:`↓`,harr:`↔`,crarr:`↵`,lArr:`⇐`,uArr:`⇑`,rArr:`⇒`,dArr:`⇓`,hArr:`⇔`,forall:`∀`,part:`∂`,exist:`∃`,empty:`∅`,nabla:`∇`,isin:`∈`,notin:`∉`,ni:`∋`,prod:`∏`,sum:`∑`,minus:`−`,lowast:`∗`,radic:`√`,prop:`∝`,infin:`∞`,ang:`∠`,and:`∧`,or:`∨`,cap:`∩`,cup:`∪`,int:`∫`,there4:`∴`,sim:`∼`,cong:`≅`,asymp:`≈`,ne:`≠`,equiv:`≡`,le:`≤`,ge:`≥`,sub:`⊂`,sup:`⊃`,nsub:`⊄`,sube:`⊆`,supe:`⊇`,oplus:`⊕`,otimes:`⊗`,perp:`⊥`,sdot:`⋅`,lceil:`⌈`,rceil:`⌉`,lfloor:`⌊`,rfloor:`⌋`,lang:`〈`,rang:`〉`,loz:`◊`,spades:`♠`,clubs:`♣`,hearts:`♥`,diams:`♦`,quot:`"`,amp:`&`,lt:`<`,gt:`>`,OElig:`Œ`,oelig:`œ`,Scaron:`Š`,scaron:`š`,Yuml:`Ÿ`,circ:`ˆ`,tilde:`˜`,ensp:` `,emsp:` `,thinsp:` `,zwnj:`‌`,zwj:`‍`,lrm:`‎`,rlm:`‏`,ndash:`–`,mdash:`—`,lsquo:`‘`,rsquo:`’`,sbquo:`‚`,ldquo:`“`,rdquo:`”`,bdquo:`„`,dagger:`†`,Dagger:`‡`,permil:`‰`,lsaquo:`‹`,rsaquo:`›`,euro:`€`},ka=[`cent`,`copy`,`divide`,`gt`,`lt`,`not`,`para`,`times`],Aa={}.hasOwnProperty,ja={},Ma;for(Ma in Oa)Aa.call(Oa,Ma)&&(ja[Oa[Ma]]=Ma);var Na=/[^\dA-Za-z]/;function Pa(e,t,n,r){let i=String.fromCharCode(e);if(Aa.call(ja,i)){let e=ja[i],a=`&`+e;return n&&Da.includes(e)&&!ka.includes(e)&&(!r||t&&t!==61&&Na.test(String.fromCharCode(t)))?a:a+`;`}return``}function Fa(e,t,n){let r=wa(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=Pa(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){let i=Ea(e,t,n.omitOptionalSemicolons);i.length<r.length&&(r=i)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function Ia(e,t){return ba(e,Object.assign({format:Fa},t))}var La=/^>|^->|<!--|-->|--!>|<!-$/g,Ra=[`>`],za=[`<`,`>`];function Ba(e,t,n,r){return r.settings.bogusComments?`<?`+Ia(e.value,Object.assign({},r.settings.characterReferences,{subset:Ra}))+`>`:`<!--`+e.value.replace(La,i)+`-->`;function i(e){return Ia(e,Object.assign({},r.settings.characterReferences,{subset:za}))}}function Va(e,t,n,r){return`<!`+(r.settings.upperDoctype?`DOCTYPE`:`doctype`)+(r.settings.tightDoctype?``:` `)+`html>`}function Ha(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function Ua(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}function Wa(e){return e.join(` `).trim()}var Ga=/[ \t\n\f\r]/g;function Ka(e){return typeof e==`object`?e.type===`text`&&qa(e.value):qa(e)}function qa(e){return e.replace(Ga,``)===``}var U=Xa(1),Ja=Xa(-1),Ya=[];function Xa(e){return t;function t(t,n,r){let i=t?t.children:Ya,a=(n||0)+e,o=i[a];if(!r)for(;o&&Ka(o);)a+=e,o=i[a];return o}}var Za={}.hasOwnProperty;function Qa(e){return t;function t(t,n,r){return Za.call(e,t.tagName)&&e[t.tagName](t,n,r)}}var $a=Qa({body:no,caption:eo,colgroup:eo,dd:oo,dt:ao,head:eo,html:to,li:io,optgroup:co,option:lo,p:ro,rp:so,rt:so,tbody:fo,td:ho,tfoot:po,th:ho,thead:uo,tr:mo});function eo(e,t,n){let r=U(n,t,!0);return!r||r.type!==`comment`&&!(r.type===`text`&&Ka(r.value.charAt(0)))}function to(e,t,n){let r=U(n,t);return!r||r.type!==`comment`}function no(e,t,n){let r=U(n,t);return!r||r.type!==`comment`}function ro(e,t,n){let r=U(n,t);return r?r.type===`element`&&(r.tagName===`address`||r.tagName===`article`||r.tagName===`aside`||r.tagName===`blockquote`||r.tagName===`details`||r.tagName===`div`||r.tagName===`dl`||r.tagName===`fieldset`||r.tagName===`figcaption`||r.tagName===`figure`||r.tagName===`footer`||r.tagName===`form`||r.tagName===`h1`||r.tagName===`h2`||r.tagName===`h3`||r.tagName===`h4`||r.tagName===`h5`||r.tagName===`h6`||r.tagName===`header`||r.tagName===`hgroup`||r.tagName===`hr`||r.tagName===`main`||r.tagName===`menu`||r.tagName===`nav`||r.tagName===`ol`||r.tagName===`p`||r.tagName===`pre`||r.tagName===`section`||r.tagName===`table`||r.tagName===`ul`):!n||n.type!==`element`||n.tagName!==`a`&&n.tagName!==`audio`&&n.tagName!==`del`&&n.tagName!==`ins`&&n.tagName!==`map`&&n.tagName!==`noscript`&&n.tagName!==`video`}function io(e,t,n){let r=U(n,t);return!r||r.type===`element`&&r.tagName===`li`}function ao(e,t,n){let r=U(n,t);return!!(r&&r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`))}function oo(e,t,n){let r=U(n,t);return!r||r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`)}function so(e,t,n){let r=U(n,t);return!r||r.type===`element`&&(r.tagName===`rp`||r.tagName===`rt`)}function co(e,t,n){let r=U(n,t);return!r||r.type===`element`&&r.tagName===`optgroup`}function lo(e,t,n){let r=U(n,t);return!r||r.type===`element`&&(r.tagName===`option`||r.tagName===`optgroup`)}function uo(e,t,n){let r=U(n,t);return!!(r&&r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`))}function fo(e,t,n){let r=U(n,t);return!r||r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`)}function po(e,t,n){return!U(n,t)}function mo(e,t,n){let r=U(n,t);return!r||r.type===`element`&&r.tagName===`tr`}function ho(e,t,n){let r=U(n,t);return!r||r.type===`element`&&(r.tagName===`td`||r.tagName===`th`)}var go=Qa({body:yo,colgroup:bo,head:vo,html:_o,tbody:xo});function _o(e){let t=U(e,-1);return!t||t.type!==`comment`}function vo(e){let t=new Set;for(let n of e.children)if(n.type===`element`&&(n.tagName===`base`||n.tagName===`title`)){if(t.has(n.tagName))return!1;t.add(n.tagName)}let n=e.children[0];return!n||n.type===`element`}function yo(e){let t=U(e,-1,!0);return!t||t.type!==`comment`&&!(t.type===`text`&&Ka(t.value.charAt(0)))&&(t.type!==`element`||t.tagName!==`meta`&&t.tagName!==`link`&&t.tagName!==`script`&&t.tagName!==`style`&&t.tagName!==`template`)}function bo(e,t,n){let r=Ja(n,t),i=U(e,-1,!0);return n&&r&&r.type===`element`&&r.tagName===`colgroup`&&$a(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`col`)}function xo(e,t,n){let r=Ja(n,t),i=U(e,-1);return n&&r&&r.type===`element`&&(r.tagName===`thead`||r.tagName===`tbody`)&&$a(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`tr`)}var So={name:[[`
27
- \f\r &/=>`.split(``),`
28
- \f\r "&'/=>\``.split(``)],[`\0
29
- \f\r "&'/<=>`.split(``),`\0
30
- \f\r "&'/<=>\``.split(``)]],unquoted:[[`
31
- \f\r &>`.split(``),`\0
32
- \f\r "&'<=>\``.split(``)],[`\0
33
- \f\r "&'<=>\``.split(``),`\0
34
- \f\r "&'<=>\``.split(``)]],single:[[`&'`.split(``),`"&'\``.split(``)],[`\0&'`.split(``),`\0"&'\``.split(``)]],double:[[`"&`.split(``),`"&'\``.split(``)],[`\0"&`.split(``),`\0"&'\``.split(``)]]};function Co(e,t,n,r){let i=r.schema,a=i.space!==`svg`&&r.settings.omitOptionalTags,o=i.space===`svg`?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase()),s=[],c;i.space===`html`&&e.tagName===`svg`&&(r.schema=fa);let l=wo(r,e.properties),u=r.all(i.space===`html`&&e.tagName===`template`?e.content:e);return r.schema=i,u&&(o=!1),(l||!a||!go(e,t,n))&&(s.push(`<`,e.tagName,l?` `+l:``),o&&(i.space===`svg`||r.settings.closeSelfClosing)&&(c=l.charAt(l.length-1),(!r.settings.tightSelfClosing||c===`/`||c&&c!==`"`&&c!==`'`)&&s.push(` `),s.push(`/`)),s.push(`>`)),s.push(u),!o&&(!a||!$a(e,t,n))&&s.push(`</`+e.tagName+`>`),s.join(``)}function wo(e,t){let n=[],r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){let r=To(e,i,t[i]);r&&n.push(r)}}for(;++r<n.length;){let t=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&t!==`"`&&t!==`'`&&(n[r]+=` `)}return n.join(``)}function To(e,t,n){let r=ca(e.schema,t),i=e.settings.allowParseErrors&&e.schema.space===`html`?0:1,a=+!e.settings.allowDangerousCharacters,o=e.quote,s;if(r.overloadedBoolean&&(n===r.attribute||n===``)?n=!0:(r.boolean||r.overloadedBoolean)&&(typeof n!=`string`||n===r.attribute||n===``)&&(n=!!n),n==null||n===!1||typeof n==`number`&&Number.isNaN(n))return``;let c=Ia(r.attribute,Object.assign({},e.settings.characterReferences,{subset:So.name[i][a]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?Ua:Wa)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?c:(e.settings.preferUnquoted&&(s=Ia(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:So.unquoted[i][a]}))),s!==n&&(e.settings.quoteSmart&&Ha(n,o)>Ha(n,e.alternative)&&(o=e.alternative),s=o+Ia(n,Object.assign({},e.settings.characterReferences,{subset:(o===`'`?So.single:So.double)[i][a],attribute:!0}))+o),c+(s&&`=`+s))}var Eo=[`<`,`&`];function Do(e,t,n,r){return n&&n.type===`element`&&(n.tagName===`script`||n.tagName===`style`)?e.value:Ia(e.value,Object.assign({},r.settings.characterReferences,{subset:Eo}))}function Oo(e,t,n,r){return r.settings.allowDangerousHtml?e.value:Do(e,t,n,r)}function ko(e,t,n,r){return r.all(e)}var Ao=ma(`type`,{invalid:jo,unknown:Mo,handlers:{comment:Ba,doctype:Va,element:Co,raw:Oo,root:ko,text:Do}});function jo(e){throw Error("Expected node, not `"+e+"`")}function Mo(e){throw Error("Cannot compile unknown node `"+e.type+"`")}var No={},Po={},Fo=[];function Io(e,t){let n=t||No,r=n.quote||`"`,i=r===`"`?`'`:`"`;if(r!==`"`&&r!==`'`)throw Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:Lo,all:Ro,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||Ri,characterReferences:n.characterReferences||Po,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space===`svg`?fa:da,quote:r,alternative:i}.one(Array.isArray(e)?{type:`root`,children:e}:e,void 0,void 0)}function Lo(e,t,n){return Ao(e,t,n,this)}function Ro(e){let t=[],n=e&&e.children||Fo,r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join(``)}var zo=class{mode;options;hoveredLine;hoveredToken;pre;gutterUtilityLine;gutterUtilityContainer;gutterUtilityButton;gutterUtilitySlot;interactiveLinesAttr=!1;interactiveLineNumbersAttr=!1;hasPointerListeners=!1;hasDocumentPointerListeners=!1;selectedRange=null;selectedRangeHighlightSide;selectedRangeLineNumberOnly=!1;editorActiveLine=null;editorActiveLineSide;editorLineNumberOnly=!1;proposedSelectedRange;renderedSelectedLinesState;renderedEditorActiveLineState;selectionAnchor;pointerSession={mode:`idle`};constructor(e,t){this.mode=e,this.options=t}setOptions(e){this.options=e}cleanUp(){this.pre?.removeEventListener(`click`,this.handlePointerClick),this.pre?.removeEventListener(`pointerdown`,this.handlePointerDown),this.pre?.removeEventListener(`pointermove`,this.handlePointerMove),this.pre?.removeEventListener(`pointerleave`,this.handlePointerLeave),this.pre?.removeAttribute(`data-interactive-lines`),this.pre?.removeAttribute(`data-interactive-line-numbers`),this.pre=void 0,this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.clearHoveredLine(),this.clearHoveredToken(),this.detachDocumentPointerListeners(),this.clearPointerSession(),mr(this.renderSelection),this.interactiveLinesAttr=!1,this.interactiveLineNumbersAttr=!1,this.hasPointerListeners=!1,this.setSelectionDirty()}setup(e){this.setSelectionDirty();let{usesCustomGutterUtility:t=!1,enableGutterUtility:n=!1}=this.options;this.pre!==e&&(this.cleanUp(),this.pre=e),n?this.ensureGutterUtilityNode(t):this.gutterUtilityContainer!=null&&(this.gutterUtilityContainer.remove(),this.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.pointerSession.mode===`gutterSelecting`&&(this.clearPointerSession(),this.detachDocumentPointerListeners())),this.syncPointerListeners(e),this.updateInteractiveLineAttributes(),this.renderSelection(),this.placeUtility()}setSelectionDirty(){this.renderedSelectedLinesState=void 0,this.renderedEditorActiveLineState=void 0}isSelectionDirty(){return this.renderedSelectedLinesState===void 0||this.renderedEditorActiveLineState===void 0}setSelection(e,t){let n=!(e===this.selectedRange||_r(e??void 0,this.selectedRange??void 0)),r=t?.lineNumberOnly??!1,i=t?.activeLineSide!==this.selectedRangeHighlightSide||r!==this.selectedRangeLineNumberOnly;!this.isSelectionDirty()&&!n&&!i||(this.proposedSelectedRange=void 0,this.selectedRange=e,this.selectedRangeHighlightSide=t?.activeLineSide,this.selectedRangeLineNumberOnly=r,this.renderSelection(),this.placeUtility(),n&&t?.notify!==!1&&this.notifySelectionCommitted(e))}setEditorActiveLine(e,{lineNumberOnly:t=!1,side:n}={}){let r=e!==this.editorActiveLine,i=n!==this.editorActiveLineSide||t!==this.editorLineNumberOnly;!this.isSelectionDirty()&&!r&&!i||(this.editorActiveLine=e,this.editorActiveLineSide=n,this.editorLineNumberOnly=t,this.renderSelection())}getSelection(){return this.selectedRange}getHoveredLine=()=>{let e=this.gutterUtilityLine??this.hoveredLine;if(e!=null){if(this.mode===`diff`&&e.type===`diff-line`)return{lineNumber:e.lineNumber,side:e.annotationSide};if(this.mode===`file`&&e.type===`line`)return{lineNumber:e.lineNumber}}};handlePointerClick=e=>{let{onHunkExpand:t,onLineClick:n,onLineNumberClick:r,onTokenClick:i,onMergeConflictActionClick:a}=this.options;(t!=null||n!=null||r!=null||a!=null||i!=null)&&(this.options.onGutterUtilityClick!=null&&Li(e.composedPath())||(is(this.options.__debugPointerEvents,`click`,`FileDiff.DEBUG.handlePointerClick:`,e),this.handlePointerEvent({eventType:`click`,event:e})))};handlePointerMove=e=>{if(e.pointerType!==`mouse`)return;let{lineHoverHighlight:t=`disabled`,onLineEnter:n,onLineLeave:r,onTokenEnter:i,onTokenLeave:a,enableGutterUtility:o=!1}=this.options;t===`disabled`&&!o&&n==null&&r==null&&i==null&&a==null||(is(this.options.__debugPointerEvents,`move`,`FileDiff.DEBUG.handlePointerMove:`,e),this.handlePointerEvent({eventType:`move`,event:e}))};handlePointerLeave=e=>{let{__debugPointerEvents:t}=this.options;if(is(t,`move`,`FileDiff.DEBUG.handlePointerLeave: no event`),this.hoveredLine==null&&this.hoveredToken==null){is(t,`move`,`FileDiff.DEBUG.handlePointerLeave: returned early, no hovered line or token`);return}this.hoveredToken!=null&&(this.options.onTokenLeave?.(this.hoveredToken,e),this.clearHoveredToken()),this.hoveredLine!=null&&(this.options.onLineLeave?.({...this.hoveredLine,event:e}),this.clearHoveredLine()),this.placeUtility()};handlePointerEvent({eventType:e,event:t}){let{__debugPointerEvents:n}=this.options,r=t.composedPath();is(n,e,`FileDiff.DEBUG.handlePointerEvent:`,{eventType:e,composedPath:r});let i=this.resolvePointerTarget(r);is(n,e,`FileDiff.DEBUG.handlePointerEvent: resolvePointerTarget result:`,i);let{onLineClick:a,onLineNumberClick:o,onLineEnter:s,onLineLeave:c,onTokenClick:l,onTokenEnter:u,onTokenLeave:d,onHunkExpand:f,onMergeConflictActionClick:p}=this.options;switch(e){case`move`:{let e=Wo(i)&&this.hoveredLine?.lineElement===i.lineElement;Uo(i)&&this.hoveredToken?.tokenElement===i.tokenElement||(this.hoveredToken!=null&&(d?.(this.hoveredToken,t),this.clearHoveredToken()),Uo(i)&&(this.setHoveredToken(this.toTokenEventBaseProps(i)),u?.(this.hoveredToken,t))),e||(this.hoveredLine!=null&&(c?.({...this.hoveredLine,event:t}),this.clearHoveredLine()),Wo(i)?(this.setHoveredLine(this.toEventBaseProps(i)),this.placeUtility(),s?.({...this.hoveredLine,event:t})):this.placeUtility());break}case`click`:{if(i==null)break;if(Ko(i)&&p!=null){p(i);break}if(Go(i)&&f!=null){f(i.hunkIndex,i.all||t.shiftKey?`both`:i.direction,i.all||t.shiftKey?1/0:void 0);break}if(!Wo(i))break;Uo(i)&&l!=null&&l(this.toTokenEventBaseProps(i),t);let e=this.toEventBaseProps(i);o!=null&&i.numberColumn?o({...e,event:t}):a?.({...e,event:t});break}}}syncPointerListeners(e){let{__debugPointerEvents:t,lineHoverHighlight:n=`disabled`,onLineClick:r,onLineNumberClick:i,onLineEnter:a,onLineLeave:o,onTokenClick:s,onTokenEnter:c,onTokenLeave:l,onHunkExpand:u,onMergeConflictActionClick:d,enableGutterUtility:f=!1,enableLineSelection:p=!1,onGutterUtilityClick:m}=this.options,h=m!=null,g=n!==`disabled`||r!=null||i!=null||a!=null||o!=null||s!=null||c!=null||l!=null||u!=null||d!=null||f||p||h;g&&!this.hasPointerListeners?(e.addEventListener(`click`,this.handlePointerClick),e.addEventListener(`pointerdown`,this.handlePointerDown),e.addEventListener(`pointermove`,this.handlePointerMove),e.addEventListener(`pointerleave`,this.handlePointerLeave),this.hasPointerListeners=!0,is(t,`click`,`FileDiff.DEBUG.attachEventListeners: Attaching click events for:`,(()=>{let e=[];return(t===`both`||t===`click`)&&(r!=null&&e.push(`onLineClick`),i!=null&&e.push(`onLineNumberClick`),u!=null&&e.push(`expandable hunk separators`),d!=null&&e.push(`merge conflict actions`)),e})()),is(t,`move`,`FileDiff.DEBUG.attachEventListeners: Attaching pointer move event`),is(t,`move`,`FileDiff.DEBUG.attachEventListeners: Attaching pointer leave event`)):!g&&this.hasPointerListeners&&(e.removeEventListener(`click`,this.handlePointerClick),e.removeEventListener(`pointerdown`,this.handlePointerDown),e.removeEventListener(`pointermove`,this.handlePointerMove),e.removeEventListener(`pointerleave`,this.handlePointerLeave),this.hasPointerListeners=!1);let _=this.pointerSession.mode===`selecting`||this.pointerSession.mode===`pendingSingleLineUnselect`,v=this.pointerSession.mode===`gutterSelecting`;(!p&&_||!h&&v)&&(this.clearPointerSession(),this.detachDocumentPointerListeners(),this.selectionAnchor=void 0,this.clearPendingSingleLineState())}updateInteractiveLineAttributes(){if(this.pre==null)return;let{onLineClick:e,onLineNumberClick:t,enableLineSelection:n=!1}=this.options,r=e!=null,i=t!=null||n;r&&!this.interactiveLinesAttr?(this.pre.setAttribute(`data-interactive-lines`,``),this.interactiveLinesAttr=!0):!r&&this.interactiveLinesAttr&&(this.pre.removeAttribute(`data-interactive-lines`),this.interactiveLinesAttr=!1),i&&!this.interactiveLineNumbersAttr?(this.pre.setAttribute(`data-interactive-line-numbers`,``),this.interactiveLineNumbersAttr=!0):!i&&this.interactiveLineNumbersAttr&&(this.pre.removeAttribute(`data-interactive-line-numbers`),this.interactiveLineNumbersAttr=!1)}handlePointerDown=e=>{if(e.pointerType===`mouse`&&e.button!==0||this.pre==null||this.pointerSession.mode!==`idle`)return;let t=e.composedPath();Li(t)&&this.options.onGutterUtilityClick!=null?this.startGutterSelectionFromPointerDown(e):(e.pointerType!==`mouse`&&this.revealUtilityFromGutterPath(t),this.startLineSelectionFromPointerDown(e))};startLineSelectionFromPointerDown(e){let{enableLineSelection:t=!1}=this.options;if(!t)return;let n=this.resolveSelectionInfo(e,{source:`event-path`,requireNumberColumn:!0});if(n==null)return;let{pre:r}=this;if(r==null)return;let{lineNumber:i,eventSide:a,lineIndex:o}=n;if(e.shiftKey&&this.selectedRange!=null){let t=this.getIndexesFromSelection(this.selectedRange,r.getAttribute(`data-diff-type`)===`split`);if(t==null)return;let n=t.start<=t.end?o>=t.start:o<=t.end;this.selectionAnchor={lineNumber:n?this.selectedRange.start:this.selectedRange.end,side:n?this.selectedRange.side:this.selectedRange.endSide??this.selectedRange.side},this.updateSelection(i,a,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:`selecting`,pointerId:e.pointerId},this.attachDocumentPointerListeners();return}if(this.selectedRange?.start===i&&this.selectedRange?.end===i){let t={lineNumber:i,side:a};this.selectionAnchor=t,this.pointerSession={mode:`pendingSingleLineUnselect`,pointerId:e.pointerId,anchor:t,pending:t},this.attachDocumentPointerListeners();return}this.options.controlledSelection===!0?this.proposedSelectedRange=null:this.selectedRange=null,this.placeUtility(),this.selectionAnchor={lineNumber:i,side:a},this.updateSelection(i,a,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:`selecting`,pointerId:e.pointerId},this.attachDocumentPointerListeners()}startGutterSelectionFromPointerDown(e){let{onGutterUtilityClick:t}=this.options;if(t==null)return;let n=this.currentSelectionEnds(),r=n?.bottom??this.resolveSelectionPoint(e,{source:`event-path`,excludeUtility:!1}),i=n?.top??r;r!=null&&i!=null&&(e.preventDefault(),e.stopPropagation(),this.pointerSession={mode:`gutterSelecting`,pointerId:e.pointerId,anchor:i,current:r},this.selectionAnchor={lineNumber:i.lineNumber,side:i.side},this.updateSelection(r.lineNumber,r.side,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.attachDocumentPointerListeners())}handleDocumentPointerMove=e=>{switch(this.pointerSession.mode){case`idle`:return;case`gutterSelecting`:{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();let t=this.resolveSelectionPoint(e,{source:`coordinates-first`});if(t==null)return;this.pointerSession.current=t,this.updateSelection(t.lineNumber,t.side);return}case`selecting`:{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();let t=this.resolveSelectionInfo(e,{source:`coordinates-first`,requireNumberColumn:!1});if(t==null||this.selectionAnchor==null)return;this.updateSelection(t.lineNumber,t.eventSide);return}case`pendingSingleLineUnselect`:{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();let t=this.resolveSelectionInfo(e,{source:`coordinates-first`,requireNumberColumn:!1});if(t==null||this.selectionAnchor==null)return;let n={lineNumber:t.lineNumber,side:t.eventSide};if(Ii(this.pointerSession.pending,n))return;this.updateSelection(t.lineNumber,t.eventSide,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.notifySelectionChangeDelta(),this.pointerSession={mode:`selecting`,pointerId:e.pointerId};return}}};handleDocumentPointerUp=e=>{let{onGutterUtilityClick:t}=this.options;switch(this.pointerSession.mode){case`idle`:return;case`gutterSelecting`:{let{pointerSession:n}=this;if(e.pointerId!==n.pointerId)return;e.preventDefault();let r=this.resolveSelectionPoint(e,{source:`coordinates-first`});r!=null&&(n.current=r,this.updateSelection(r.lineNumber,r.side));let i=this.buildSelectedLineRange(n.anchor,n.current);t?.({...i}),this.selectionAnchor=void 0,this.notifySelectionEnd(i),this.notifySelectionCommitted(i),this.clearProposedSelection(),this.clearPointerSession(),this.detachDocumentPointerListeners();return}case`pendingSingleLineUnselect`:if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.updateSelection(null,void 0,!1),this.selectionAnchor=void 0,this.clearPendingSingleLineState(),this.detachDocumentPointerListeners(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(this.getCurrentSelectionRange()),this.clearProposedSelection();return;case`selecting`:if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.selectionAnchor=void 0,this.detachDocumentPointerListeners(),this.clearPointerSession(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(this.getCurrentSelectionRange()),this.clearProposedSelection()}};handleDocumentPointerCancel=e=>{switch(this.pointerSession.mode){case`idle`:return;case`gutterSelecting`:case`selecting`:case`pendingSingleLineUnselect`:if(`pointerId`in this.pointerSession&&e.pointerId!==this.pointerSession.pointerId)return;this.selectionAnchor=void 0,this.clearProposedSelection(),this.clearPendingSingleLineState(),this.clearPointerSession(),this.detachDocumentPointerListeners()}};clearHoveredLine(){this.hoveredLine!=null&&(this.hoveredLine.lineElement.removeAttribute(`data-hovered`),this.hoveredLine.numberElement.removeAttribute(`data-hovered`),this.hoveredLine=void 0)}setHoveredLine(e){let{lineHoverHighlight:t=`disabled`}=this.options;this.hoveredLine!=null&&this.clearHoveredLine(),this.hoveredLine=e,t!==`disabled`&&((t===`both`||t===`line`)&&this.hoveredLine.lineElement.setAttribute(`data-hovered`,``),(t===`both`||t===`number`)&&this.hoveredLine.numberElement.setAttribute(`data-hovered`,``))}clearHoveredToken(){this.hoveredToken!=null&&(this.hoveredToken=void 0)}setHoveredToken(e){this.hoveredToken!=null&&this.clearHoveredToken(),this.hoveredToken=e}ensureGutterUtilityNode(e){if(this.gutterUtilityContainer??(this.gutterUtilityContainer=document.createElement(`div`),this.gutterUtilityContainer.setAttribute(`data-gutter-utility-slot`,``)),e)this.gutterUtilityButton!=null&&(this.gutterUtilityButton.remove(),this.gutterUtilityButton=void 0),this.gutterUtilitySlot??(this.gutterUtilitySlot=document.createElement(`slot`),this.gutterUtilitySlot.name=`gutter-utility-slot`),this.gutterUtilitySlot.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilitySlot);else{if(this.gutterUtilitySlot?.remove(),this.gutterUtilitySlot=void 0,this.gutterUtilityButton==null){let e=document.createElement(`div`);e.innerHTML=Io(Fi());let t=e.firstElementChild;if(!(t instanceof HTMLButtonElement))throw Error(`InteractionManager.ensureGutterUtilityNode: Node element should be a button`);t.remove(),this.gutterUtilityButton=t}this.gutterUtilityButton.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilityButton)}}revealUtilityFromGutterPath(e){if(this.placeUtilityFromSelection())return;let t=this.resolvePointerTarget(e);Ho(t)&&t.numberColumn&&this.showUtilityOnLine(this.toEventBaseProps(t))}placeUtility(){if(!this.placeUtilityFromSelection()){if(this.hoveredLine!=null){this.showUtilityOnLine(this.hoveredLine);return}this.hideUtility()}}placeUtilityFromSelection(){let e=this.currentSelectionEnds();if(e==null)return!1;let t=this.targetForSelectionPoint(e.bottom);return t==null?this.hideUtility():this.showUtilityOnLine(this.toEventBaseProps(t)),!0}showUtilityOnLine(e){this.gutterUtilityContainer!=null&&(this.gutterUtilityLine=e,e.numberElement.appendChild(this.gutterUtilityContainer))}hideUtility(){this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0}currentSelectionEnds(){let e=this.getCurrentSelectionRange();return e==null?void 0:this.selectionEnds(e)}selectionEnds(e){let t={lineNumber:e.start,side:e.side},n={lineNumber:e.end,side:e.endSide??e.side},r=this.selectionPointRowIndex(t),i=this.selectionPointRowIndex(n);if(r!=null&&i!=null)return r>i?{top:n,bottom:t}:{top:t,bottom:n}}selectionPointRowIndex(e){let t=this.getLineIndex(e.lineNumber,e.side);if(t!=null)return this.isSplitDiff()?t[1]:t[0]}targetForSelectionPoint(e){if(this.pre==null)return;let t=this.getLineIndex(e.lineNumber,e.side);if(t==null)return;let n=this.mode===`diff`?`${t[0]},${t[1]}`:`${t[0]}`,r=this.pre.querySelectorAll(`[data-column-number="${e.lineNumber}"][data-line-index="${n}"]`);for(let t of r){if(!(t instanceof HTMLElement))continue;let n=this.resolvePointerTarget(Yo(t));if(Ho(n)&&(this.mode!==`diff`||e.side==null||n.side===e.side))return n}}attachDocumentPointerListeners(){this.hasDocumentPointerListeners||=(document.addEventListener(`pointermove`,this.handleDocumentPointerMove),document.addEventListener(`pointerup`,this.handleDocumentPointerUp),document.addEventListener(`pointercancel`,this.handleDocumentPointerCancel),!0)}detachDocumentPointerListeners(){this.hasDocumentPointerListeners&&=(document.removeEventListener(`pointermove`,this.handleDocumentPointerMove),document.removeEventListener(`pointerup`,this.handleDocumentPointerUp),document.removeEventListener(`pointercancel`,this.handleDocumentPointerCancel),!1)}clearPointerSession(){this.pointerSession={mode:`idle`}}clearPendingSingleLineState(){this.pointerSession.mode===`pendingSingleLineUnselect`&&(this.pointerSession={mode:`idle`})}selectionInfoFromPath(e,t){let n=this.resolvePointerTarget(e);if(Ho(n)&&!(t&&!n.numberColumn)&&n.splitLineIndex!=null)return{lineIndex:n.splitLineIndex,lineNumber:n.lineNumber,eventSide:this.mode===`diff`?n.side:void 0}}resolveSelectionInfo(e,t){let n=this.resolveSelectionPath(e,t);return n==null?void 0:this.selectionInfoFromPath(n,t.requireNumberColumn)}selectionPointFromPath(e){let t=this.resolvePointerTarget(e);if(Ho(t))return{lineNumber:t.lineNumber,side:this.mode===`diff`?t.side:void 0}}resolveSelectionPoint(e,t){let n=this.resolveSelectionPath(e,t);return n==null?void 0:this.selectionPointFromPath(n)}resolveSelectionPath(e,t){let n=t.excludeUtility!==!1;switch(t.source){case`event-path`:return this.pathFromEventPath(e.composedPath(),n);case`coordinates-first`:{let t=this.pathFromCoordinates(e,n);return t===void 0?this.pathFromEventPath(e.composedPath(),n):t??void 0}}}pathFromCoordinates(e,t){let n=this.hitTest(e);if(n!==void 0)return n===null?null:this.pathFromElement(n,t)??null}pathFromEventPath(e,t){if(!(t&&Li(e))){for(let n of e)if(n instanceof Element)return this.pathFromElement(n,t)}}pathFromElement(e,t){let n=Yo(e);if(t&&Li(n))return;let r=Xo(e);return r==null?this.pathFromAnnotationSlot(e):Yo(r)}pathFromAnnotationSlot(e){let t=Qo(Zo(e));if(t==null)return;let n=this.targetForSelectionPoint(t);return n==null?void 0:Yo(n.lineElement)}hitTest(e){if(!Number.isFinite(e.clientX)||!Number.isFinite(e.clientY))return;let t=this.pre?.getRootNode(),n=$o(t)?t:$o(document)?document:void 0;if(n!=null)return n.elementFromPoint(e.clientX,e.clientY)}getLineIndex(e,t){let{getLineIndex:n}=this.options;return n==null?[e-1,e-1]:n(e,t)}getCurrentSelectionRange(){return this.proposedSelectedRange===void 0?this.selectedRange:this.proposedSelectedRange}clearProposedSelection(){this.proposedSelectedRange=void 0}updateSelection(e,t,n=!0){let r=this.getCurrentSelectionRange(),i;if(e==null)i=null;else{let n=this.selectionAnchor?.side??t,r=this.selectionAnchor?.lineNumber??e;i=this.buildSelectionRange(r,e,n,t)}_r(r??void 0,i??void 0)||(this.selectedRangeHighlightSide=void 0,this.selectedRangeLineNumberOnly=!1,this.options.controlledSelection===!0?this.proposedSelectedRange=i:(this.selectedRange=i,pr(this.renderSelection)),this.placeUtility(),n&&this.notifySelectionChangeDelta())}getIndexesFromSelection(e,t){if(this.pre==null)return;let n=this.getLineIndex(e.start,e.side),r=this.getLineIndex(e.end,e.endSide??e.side);return n!=null&&r!=null?{start:t?n[1]:n[0],end:t?r[1]:r[0]}:void 0}getSelectionRenderState(){return{selectedLines:{range:this.selectedRange,highlightSide:this.selectedRangeHighlightSide,lineNumberOnly:this.selectedRangeLineNumberOnly},editorActiveLine:{range:this.editorActiveLine==null?null:{start:this.editorActiveLine,end:this.editorActiveLine,side:this.editorActiveLineSide},highlightSide:this.editorActiveLineSide,lineNumberOnly:this.editorLineNumberOnly}}}resolveLineRenderRange(e,t,n){if(e.range==null)return;let r=this.getIndexesFromSelection(e.range,t);if(r==null)throw console.error({rowRange:r,range:e.range}),Error(`InteractionManager.renderSelection: No valid ${n} rowRange`);return r}getLineRenderColumns(e,t,n,r){if(this.pre==null||t==null&&r==null)return[];let{children:i}=this.pre;if(i.length>2)throw console.error(i),Error(`InteractionManager.renderSelection: Somehow there are more than 2 code elements...`);let a=[];for(let o of i){let i=o.hasAttribute(`data-deletions`)?`deletions`:o.hasAttribute(`data-additions`)?`additions`:void 0,s=e!=null&&t!=null&&(e.highlightSide==null||i==null||e.highlightSide===i),c=n!=null&&r!=null&&(n.highlightSide==null||i==null||n.highlightSide===i);if(!s&&!c)continue;let[l,u]=o.children;if(!(l instanceof HTMLElement)||!(u instanceof HTMLElement))throw Error(`InteractionManager.renderSelection: missing gutter or content element`);if(u.children.length!==l.children.length)throw Error(`InteractionManager.renderSelection: gutter and content children dont match, something is wrong`);a.push({content:u,gutter:l,renderEditorActiveLine:c,renderSelectedLines:s})}return a}renderSelection=()=>{mr(this.renderSelection);let e=this.getSelectionRenderState();if(this.pre==null)return;let{editorActiveLine:t,selectedLines:n}=e,r=!ts(this.renderedSelectedLinesState,n),i=!ts(this.renderedEditorActiveLineState,t);if(!r&&!i)return;r&&(this.renderedSelectedLinesState=void 0),i&&(this.renderedEditorActiveLineState=void 0);let a=this.pre.getAttribute(`data-diff-type`)===`split`,o=r?this.resolveLineRenderRange(n,a,`selected-lines`):void 0,s=i?this.resolveLineRenderRange(t,a,`editor-active-line`):void 0,c=this.getLineRenderColumns(r?n:void 0,o,i?t:void 0,s),l=n.range==null||c.some(e=>e.renderSelectedLines),u=t.range==null||c.some(e=>e.renderEditorActiveLine);if(r)for(let e of this.pre.querySelectorAll(`[data-selected-line]`))e.removeAttribute(`data-selected-line`);if(i)for(let e of this.pre.querySelectorAll(`[data-editor-active-line]`))e.removeAttribute(`data-editor-active-line`);let d=o==null?void 0:Math.min(o.start,o.end),f=o==null?void 0:Math.max(o.start,o.end),p=d===f,m=s?.start;for(let e of c){let{content:r,gutter:i,renderEditorActiveLine:o,renderSelectedLines:s}=e,c=Math.max(s?f??-1/0:-1/0,o?m??-1/0:-1/0),l=r.children.length;for(let e=0;e<l;e++){let l=r.children[e],u=i.children[e];if(!(l instanceof HTMLElement)||!(u instanceof HTMLElement))continue;let h=this.parseLineIndex(l,a);if((h??0)>c)break;if(h!=null){if(s&&d!=null&&f!=null&&h>=d&&h<=f){let e=p?`single`:h===d?`first`:h===f?`last`:``;u.setAttribute(`data-selected-line`,e),n.lineNumberOnly||(l.setAttribute(`data-selected-line`,e),u.nextSibling instanceof HTMLElement&&l.nextSibling instanceof HTMLElement&&(l.nextSibling.hasAttribute(`data-line-annotation`)||l.nextSibling.hasAttribute(`data-merge-conflict-actions`))&&(p?(e=`last`,l.setAttribute(`data-selected-line`,`first`)):h===d?e=``:h===f&&l.setAttribute(`data-selected-line`,``),l.nextSibling.setAttribute(`data-selected-line`,e),u.nextSibling.setAttribute(`data-selected-line`,e)))}o&&h===m&&(u.setAttribute(`data-editor-active-line`,``),t.lineNumberOnly||l.setAttribute(`data-editor-active-line`,``))}}}r&&l&&(this.renderedSelectedLinesState=n),i&&u&&(this.renderedEditorActiveLineState=t)};notifySelectionCommitted(e){this.options.onLineSelected?.(e)}notifySelectionChangeDelta(){this.options.onLineSelectionChange?.(this.getCurrentSelectionRange()??null)}notifySelectionStart(e){this.options.onLineSelectionStart?.(e)}notifySelectionEnd(e){this.options.onLineSelectionEnd?.(e)}toEventBaseProps(e){return this.mode===`file`?{type:`line`,lineElement:e.lineElement,lineNumber:e.lineNumber,numberColumn:e.numberColumn,numberElement:e.numberElement}:{type:`diff-line`,annotationSide:e.side,lineType:e.lineType,lineElement:e.lineElement,numberElement:e.numberElement,lineNumber:e.lineNumber,numberColumn:e.numberColumn}}toTokenEventBaseProps({lineCharEnd:e,lineCharStart:t,lineNumber:n,side:r,tokenElement:i,tokenText:a}){return this.mode===`file`?{type:`token`,lineCharEnd:e,lineCharStart:t,lineNumber:n,tokenElement:i,tokenText:a}:{type:`token`,lineCharEnd:e,lineCharStart:t,lineNumber:n,side:r,tokenElement:i,tokenText:a}}buildSelectedLineRange(e,t){return this.buildSelectionRange(e.lineNumber,t.lineNumber,e.side,t.side)}buildSelectionRange(e,t,n,r){return{start:e,end:t,...n==null?{}:{side:n},...n!==r&&r!=null?{endSide:r}:{}}}resolvePointerTarget(e){let t=!1,n,r,i,a,o,s,c,l,u,d;for(let f of e){if(!(f instanceof HTMLElement))continue;if(d==null&&f.hasAttribute(`data-merge-conflict-action`)){let e=f.getAttribute(`data-merge-conflict-action`)??void 0,t=f.getAttribute(`data-merge-conflict-conflict-index`)??void 0,n=t==null?NaN:Number.parseInt(t,10);qo(e)&&Number.isFinite(n)&&(d={kind:`merge-conflict-action`,resolution:e,conflictIndex:n})}if(s==null&&f.hasAttribute(`data-char`)){s=f;let e=f.getAttribute(`data-char`);if(e!=null){let t=Number.parseInt(e,10);if(!Number.isNaN(t)){let e=f.textContent??``,n=t+e.length;(e.trim()!==``||this.options.enableTokenInteractionsOnWhitespace===!0)&&(c={tokenElement:s,lineCharStart:t,lineCharEnd:n,tokenText:e});continue}}}let e=o==null?f.getAttribute(`data-column-number`)??void 0:void 0;if(e!=null){o=f,u=Number.parseInt(e,10),t=!0,n=rs(f),a=f.getAttribute(`data-line-index`)??void 0;continue}let p=i==null?f.getAttribute(`data-line`)??void 0:void 0;if(p!=null){i=f,u=Number.parseInt(p,10),n=rs(f),a=f.getAttribute(`data-line-index`)??void 0;continue}if(l==null&&(f.hasAttribute(`data-expand-button`)||f.hasAttribute(`data-unmodified-lines`))){l={hunkIndex:void 0,direction:f.hasAttribute(`data-expand-up`)?`up`:f.hasAttribute(`data-expand-down`)?`down`:`both`,all:f.hasAttribute(`data-expand-all-button`)};continue}let m=l==null?void 0:f.getAttribute(`data-expand-index`)??void 0;if(l!=null&&m!=null){let e=Number.parseInt(m,10);Number.isNaN(e)||(l.hunkIndex=e);continue}if(r==null&&f.hasAttribute(`data-code`)){r=f;break}}if(d!=null)return d;if(l?.hunkIndex!=null)return{type:`line-info`,hunkIndex:l.hunkIndex,direction:l.direction,all:l.all};if(i??=a==null?void 0:Jo(r,`[data-line][data-line-index="${a}"]`),o??=a==null?void 0:Jo(r,`[data-column-number][data-line-index="${a}"]`),r==null||i==null||o==null||n==null||u==null||Number.isNaN(u))return;let f=this.parseLineIndex(i,this.isSplitDiff());return c==null?this.mode===`file`?{kind:`line`,lineType:n,lineElement:i,lineNumber:u,numberColumn:t,numberElement:o,side:void 0,splitLineIndex:f}:{kind:`line`,lineType:n,lineElement:i,lineNumber:u,numberColumn:t,numberElement:o,side:ns(n,r),splitLineIndex:f}:this.mode===`file`?{kind:`token`,lineType:n,lineElement:i,lineNumber:u,numberColumn:t,numberElement:o,side:void 0,splitLineIndex:f,...c}:{kind:`token`,lineType:n,lineElement:i,lineNumber:u,numberColumn:t,numberElement:o,side:ns(n,r),splitLineIndex:f,...c}}isSplitDiff(){return this.pre?.getAttribute(`data-diff-type`)===`split`}parseLineIndex(e,t){let n=(e.getAttribute(`data-line-index`)??``).split(`,`).map(e=>Number.parseInt(e,10)).filter(e=>!Number.isNaN(e));if(t&&n.length===2)return n[1];if(!t)return n[0]}};function Bo({enableTokenInteractionsOnWhitespace:e,enableGutterUtility:t,lineHoverHighlight:n,onGutterUtilityClick:r,onLineClick:i,onLineEnter:a,onLineLeave:o,onLineNumberClick:s,onTokenClick:c,onTokenEnter:l,onTokenLeave:u,renderGutterUtility:d,__debugPointerEvents:f,enableLineSelection:p,controlledSelection:m,onLineSelected:h,onLineSelectionStart:g,onLineSelectionChange:_,onLineSelectionEnd:v},y,b,x){return{enableTokenInteractionsOnWhitespace:e,enableGutterUtility:Vo({enableGutterUtility:t,renderGutterUtility:d,onGutterUtilityClick:r}),usesCustomGutterUtility:d!=null,lineHoverHighlight:n,onGutterUtilityClick:r,onHunkExpand:y,onMergeConflictActionClick:x,onLineClick:i,onLineEnter:a,onLineLeave:o,onLineNumberClick:s,onTokenClick:c,onTokenEnter:l,onTokenLeave:u,__debugPointerEvents:f,enableLineSelection:p,controlledSelection:m,onLineSelected:h,onLineSelectionStart:g,onLineSelectionChange:_,onLineSelectionEnd:v,getLineIndex:b}}function Vo({enableGutterUtility:e,renderGutterUtility:t,onGutterUtilityClick:n}){if(n!=null&&t!=null)throw Error(`Cannot use both 'onGutterUtilityClick' and 'renderGutterUtility'. Use only one gutter utility API.`);return e??!1}function Ho(e){return e!=null&&`kind`in e&&e.kind===`line`}function Uo(e){return e!=null&&`kind`in e&&e.kind===`token`}function Wo(e){return Ho(e)||Uo(e)}function Go(e){return`type`in e&&e.type===`line-info`}function Ko(e){return`kind`in e&&e.kind===`merge-conflict-action`}function qo(e){return e===`current`||e===`incoming`||e===`both`}function Jo(e,t){let n=e?.querySelector(t);return n instanceof HTMLElement?n:void 0}function Yo(e){let t=[],n=e;for(;n!=null;)t.push(n),n=n.parentNode;return t}function Xo(e){let t=e.closest(`[data-line], [data-column-number]`);if(t instanceof HTMLElement)return t;let n=e.closest(`[data-line-annotation], [data-gutter-buffer="annotation"]`);if(!(n instanceof HTMLElement))return;let r=n.previousElementSibling;return r instanceof HTMLElement&&(r.hasAttribute(`data-line`)||r.hasAttribute(`data-column-number`))?r:void 0}function Zo(e){let t=e.closest(`[slot^="annotation-"]`);if(t instanceof HTMLElement)return t.getAttribute(`slot`)??void 0;if(e instanceof HTMLElement){let t=e.getAttribute(`name`)??void 0;return t!=null&&t.startsWith(`annotation-`)?t:void 0}}function Qo(e){if(e==null)return;let t=/^annotation-(?:(additions|deletions)-)?(\d+)$/.exec(e);if(t==null)return;let n=Number.parseInt(t[2],10);if(!(!Number.isFinite(n)||n<=0))return{lineNumber:n,side:t[1]}}function $o(e){return e!=null&&typeof e.elementFromPoint==`function`}function es(e,t){return e===t||_r(e??void 0,t??void 0)}function ts(e,t){return e?.highlightSide===t.highlightSide&&e?.lineNumberOnly===t.lineNumberOnly&&es(e?.range??null,t.range)}function ns(e,t){switch(e){case`change-deletion`:return`deletions`;case`change-addition`:return`additions`;default:return t.hasAttribute(`data-deletions`)?`deletions`:`additions`}}function rs(e){let t=e.getAttribute(`data-line-type`);if(t!=null)switch(t){case`change-deletion`:case`change-addition`:case`context`:case`context-expanded`:return t;default:return}}function is(e=`none`,t,...n){switch(e){case`none`:return;case`both`:break;case`click`:if(t!==`click`)return;break;case`move`:if(t!==`move`)return}console.log(...n)}var as=class e{static resizeObserver;static managersByElement=new Map;static getResizeObserver(){let t=e.resizeObserver??new ResizeObserver(e.handleSharedResizeEntries);return e.resizeObserver=t,t}static handleSharedResizeEntries(t){let n=new Map;for(let r of t){let t=e.managersByElement.get(r.target);if(t==null)continue;let i=n.get(t);i==null?n.set(t,[r]):i.push(r)}for(let[e,t]of n)e.handleResizeEntries(t)}observedNodes=new Map;setup(e,{disableAnnotations:t,columnVariables:n=`apply`}){let r=new Set,i=n===`apply`,a=0,o=new Map(this.observedNodes);this.observedNodes.clear();for(let t of e.children){if(a===2)break;let e=(()=>{if(t instanceof HTMLElement&&t.tagName===`CODE`)return t})();if(e==null)continue;a++;let n=o.get(e);if(n!=null&&n.type!==`code`)throw Error(`ResizeManager.setup: somehow a code node is being used for an annotation, should be impossible`);let r=e.firstElementChild;r instanceof HTMLElement||(r=null),n==null?(n={type:`code`,codeElement:e,numberElement:r,codeWidth:`auto`,numberWidth:0,applyColumnVariables:i},this.observedNodes.set(e,n),this.observe(e),r!=null&&(this.observedNodes.set(r,n),this.observe(r))):(this.observedNodes.set(e,n),o.delete(e),n.numberElement===r?n.numberElement==null?n.numberWidth=0:(o.delete(n.numberElement),this.observedNodes.set(n.numberElement,n)):(n.numberElement!=null&&(this.unobserve(n.numberElement),o.delete(n.numberElement)),r!=null&&(this.observe(r),o.delete(r),this.observedNodes.set(r,n)),n.numberElement=r,n.numberWidth=0),cs(n,i))}if(a>1&&!t){let t=e.querySelectorAll(`[data-line-annotation*=","]`),n=new Map;for(let e of t){if(!(e instanceof HTMLElement))continue;let t=e.getAttribute(`data-line-annotation`)??``;if(!/^-?\d+,-?\d+$/.test(t)){console.error(`DiffFileRenderer.setupResizeObserver: Invalid element or annotation`,{lineAnnotation:t,element:e});continue}let r=n.get(t);r??(r=[],n.set(t,r)),r.push(e)}for(let[e,t]of n){if(t.length!==2){console.error(`DiffFileRenderer.setupResizeObserver: Bad Pair`,e,t);continue}let[n,i]=t,a=n.firstElementChild,s=i.firstElementChild;if(!(n instanceof HTMLElement)||!(i instanceof HTMLElement)||!(a instanceof HTMLElement)||!(s instanceof HTMLElement))continue;let c=o.get(a);if(c!=null){this.observedNodes.set(a,c),this.observedNodes.set(s,c),o.delete(a),o.delete(s);continue}let l=a.getBoundingClientRect().height,u=s.getBoundingClientRect().height;c={type:`annotations`,column1:{container:n,child:a,childHeight:l},column2:{container:i,child:s,childHeight:u},currentHeight:`auto`},r.add({child1:a,child2:s,item:c,newHeight:Math.max(l,u)})}for(let e of r)this.applyNewHeight(e.item,e.newHeight),this.observedNodes.set(e.child1,e.item),this.observedNodes.set(e.child2,e.item),this.observe(e.child1),this.observe(e.child2);r.clear()}for(let[e,t]of o)this.unobserve(e),t.type===`code`?ds(t):fs(t);o.clear()}cleanUp(){for(let e of this.observedNodes.keys())this.unobserve(e);this.observedNodes.clear()}observe(t){let{managersByElement:n}=e,r=n.get(t);if(r!==this){if(r!=null&&r!==this)throw Error(`ResizeManager.observe: element is already owned by another ResizeManager`);n.set(t,this),e.getResizeObserver().observe(t)}}unobserve(t){let{managersByElement:n,resizeObserver:r}=e,i=n.get(t);if(i!=null){if(i!==this)throw Error(`ResizeManager.unobserve: element is owned by another ResizeManager`);n.delete(t),r?.unobserve(t),r!=null&&n.size===0&&(r.disconnect(),e.resizeObserver=void 0)}}handleResizeEntries(e){let t=new Map,n=new Set;for(let r of e){let{target:e,borderBoxSize:i,contentBoxSize:a}=r;if(!(e instanceof HTMLElement)){console.error(`ResizeManager.handleResizeEntries: Invalid element for ResizeObserver`,r);continue}let o=this.observedNodes.get(e);if(o==null){console.error(`ResizeManager.handleResizeEntries: Not a valid observed node`,r);continue}if(o.type===`annotations`){let t=(()=>{if(e===o.column1.child)return o.column1;if(e===o.column2.child)return o.column2})();if(t==null){console.error(`ResizeManager.handleResizeEntries: Couldn't find a column for`,{item:o,target:e});continue}t.childHeight=i[0].blockSize,n.add(o)}else if(o.type===`code`){let n=t.get(o)??{},r=a[0].inlineSize;e===o.codeElement?n.codeInlineSize=r:e===o.numberElement&&(n.numberInlineSize=r),t.set(o,n)}}this.applyAnnotationUpdates(n),n.clear(),this.applyColumnUpdates(t),t.clear()}applyAnnotationUpdates(e){for(let t of e)this.applyNewHeight(t,Math.max(t.column1.childHeight,t.column2.childHeight))}applyColumnUpdates=e=>{for(let[t,n]of e){let e=n.codeInlineSize==null?t.codeWidth:os(n.codeInlineSize),r=n.numberInlineSize==null?t.numberWidth:ss(n.numberInlineSize),i=e!==t.codeWidth,a=r!==t.numberWidth;!i&&!a||(t.codeWidth=e,t.numberWidth=r,t.applyColumnVariables&&ls(t,{codeWidthChanged:i,numberWidthChanged:a}))}};applyNewHeight(e,t){t!==e.currentHeight&&(e.currentHeight=Math.max(t,0),e.column1.container.style.setProperty(`--diffs-annotation-min-height`,`${e.currentHeight}px`),e.column2.container.style.setProperty(`--diffs-annotation-min-height`,`${e.currentHeight}px`))}};function os(e){let t=Math.max(Math.floor(e),0);return t===0?`auto`:t}function ss(e){return Math.max(Math.ceil(e),0)}function cs(e,t){e.applyColumnVariables!==t&&(e.applyColumnVariables=t,t?ls(e,{codeWidthChanged:!0,numberWidthChanged:!0}):us(e))}function ls(e,{codeWidthChanged:t,numberWidthChanged:n}){let{codeElement:r,codeWidth:i,numberWidth:a}=e;if(t&&r.style.setProperty(`--diffs-column-width`,`${typeof i==`number`?`${i}px`:`auto`}`),n&&r.style.setProperty(`--diffs-column-number-width`,`${a===0?`auto`:`${a}px`}`),t||n&&i!==`auto`){let e=typeof i==`number`?Math.max(i-a,0):0;r.style.setProperty(`--diffs-column-content-width`,`${e>0?`${e}px`:`auto`}`)}}function us(e){e.codeElement.style.removeProperty(`--diffs-column-content-width`),e.codeElement.style.removeProperty(`--diffs-column-number-width`),e.codeElement.style.removeProperty(`--diffs-column-width`)}function ds(e){e.codeElement.isConnected&&us(e)}function fs(e){e.column1.container.isConnected&&e.column1.container.style.removeProperty(`--diffs-annotation-min-height`),e.column2.container.isConnected&&e.column2.container.style.removeProperty(`--diffs-annotation-min-height`)}var ps=new Map,ms=new Map,hs=new Map,gs=new Set;function _s(e){for(let t of Array.isArray(e)?e:[e])if(t!==`text`&&t!==`ansi`&&!gs.has(t))return!1;return!0}function vs(e,t){e=Array.isArray(e)?e:[e];for(let n of e){if(gs.has(n.name))continue;let e=ps.get(n.name);e??(e=n,ps.set(n.name,e)),gs.add(e.name),t.loadLanguageSync(e.data)}}function ys(){return typeof WorkerGlobalScope<`u`&&typeof self<`u`&&self instanceof WorkerGlobalScope}var bs=Object.defineProperty,xs=Object.getOwnPropertyDescriptor,Ss=Object.getOwnPropertyNames,Cs=Object.prototype.hasOwnProperty,ws=(e,t)=>{let n={};for(var r in e)bs(n,r,{get:e[r],enumerable:!0});return t||bs(n,Symbol.toStringTag,{value:`Module`}),n},Ts=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=Ss(t),a=0,o=i.length,s;a<o;a++)s=i[a],!Cs.call(e,s)&&s!==n&&bs(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=xs(t,s))||r.enumerable});return e},Es=(e,t,n)=>(Ts(e,t,`default`),n&&Ts(n,t,`default`)),Ds=[{id:`abap`,name:`ABAP`,import:(()=>M(()=>import(`./_CLvhMVsD.js`),[]))},{id:`actionscript-3`,name:`ActionScript`,aliases:[`actionscript`,`as3`],import:(()=>M(()=>import(`./_Cs6JJXT5.js`),[]))},{id:`ada`,name:`Ada`,import:(()=>M(()=>import(`./_C5qYipkI.js`),[]))},{id:`ahk`,name:`AutoHotkey`,aliases:[`ahk1`],import:(()=>M(()=>import(`./_CA9gdOdF.js`),[]))},{id:`ahk2`,name:`AutoHotkey2`,import:(()=>M(()=>import(`./__6rzW9BS.js`),[]))},{id:`angular-html`,name:`Angular HTML`,import:(()=>M(()=>import(`./_DMi37Owt.js`).then(e=>e.n),__vite__mapDeps([0,1,2,3,4,5])))},{id:`angular-ts`,name:`Angular TypeScript`,import:(()=>M(()=>import(`./_DFGJGEpB.js`),__vite__mapDeps([6,0,1,2,3,4,5,7])))},{id:`apache`,name:`Apache Conf`,import:(()=>M(()=>import(`./_U0d_L8uA.js`),[]))},{id:`apex`,name:`Apex`,import:(()=>M(()=>import(`./_KFGFyKwG.js`),[]))},{id:`apl`,name:`APL`,import:(()=>M(()=>import(`./_CfpVtrZd.js`),__vite__mapDeps([8,4,1,2,5,3,9,10,11])))},{id:`applescript`,name:`AppleScript`,import:(()=>M(()=>import(`./_CCn79oCD.js`),[]))},{id:`ara`,name:`Ara`,import:(()=>M(()=>import(`./_4CJ0cIlV.js`),[]))},{id:`asciidoc`,name:`AsciiDoc`,aliases:[`adoc`],import:(()=>M(()=>import(`./_SCjQUq34.js`),[]))},{id:`asm`,name:`Assembly`,import:(()=>M(()=>import(`./_Cmm7eHzH2.js`),[]))},{id:`astro`,name:`Astro`,import:(()=>M(()=>import(`./_Dd4lKEYp2.js`),__vite__mapDeps([12,4,1,2,5,11,13,14,15])))},{id:`awk`,name:`AWK`,import:(()=>M(()=>import(`./_BWXHIvNe2.js`),[]))},{id:`ballerina`,name:`Ballerina`,import:(()=>M(()=>import(`./_B7ZEbQpA2.js`),[]))},{id:`bat`,name:`Batch File`,aliases:[`batch`,`cmd`],import:(()=>M(()=>import(`./_qdxAdBWQ2.js`),[]))},{id:`beancount`,name:`Beancount`,import:(()=>M(()=>import(`./_D-usSTwE2.js`),[]))},{id:`berry`,name:`Berry`,aliases:[`be`],import:(()=>M(()=>import(`./_DKpUyyne2.js`),[]))},{id:`bibtex`,name:`BibTeX`,import:(()=>M(()=>import(`./_Ci_nEsc72.js`),[]))},{id:`bicep`,name:`Bicep`,import:(()=>M(()=>import(`./_CUHmPFLl2.js`),[]))},{id:`bird2`,name:`BIRD2 Configuration`,aliases:[`bird`],import:(()=>M(()=>import(`./_CYIUgYqB2.js`),[]))},{id:`blade`,name:`Blade`,import:(()=>M(()=>import(`./_Ba8vUCRv2.js`),__vite__mapDeps([16,4,1,2,5,3,9,10,11,17,18])))},{id:`bsl`,name:`1C (Enterprise)`,aliases:[`1c`],import:(()=>M(()=>import(`./_CpYNKFv52.js`),__vite__mapDeps([19,20])))},{id:`c`,name:`C`,import:(()=>M(()=>import(`./_CWzOnDwF2.js`).then(e=>e.n),__vite__mapDeps([21,1,2])))},{id:`c3`,name:`C3`,import:(()=>M(()=>import(`./_D0apG41V2.js`),[]))},{id:`cadence`,name:`Cadence`,aliases:[`cdc`],import:(()=>M(()=>import(`./_CQ2zXKGN2.js`),[]))},{id:`cairo`,name:`Cairo`,import:(()=>M(()=>import(`./_kIpfj7zU2.js`),__vite__mapDeps([22,23])))},{id:`chapel`,name:`Chapel`,aliases:[`chpl`],import:(()=>M(()=>import(`./_BIGq6NLW2.js`),__vite__mapDeps([24,21,1,2])))},{id:`clarity`,name:`Clarity`,import:(()=>M(()=>import(`./_CtfBBspg2.js`),[]))},{id:`clojure`,name:`Clojure`,aliases:[`clj`],import:(()=>M(()=>import(`./_DqKBuwfJ2.js`),[]))},{id:`cmake`,name:`CMake`,import:(()=>M(()=>import(`./_Bj61d0ZC.js`),[]))},{id:`cobol`,name:`COBOL`,import:(()=>M(()=>import(`./_CUjz6cMW.js`),__vite__mapDeps([25,3,1,2,4,5,10])))},{id:`codeowners`,name:`CODEOWNERS`,import:(()=>M(()=>import(`./_C8r90Shi.js`),[]))},{id:`codeql`,name:`CodeQL`,aliases:[`ql`],import:(()=>M(()=>import(`./_oeQT6MSM.js`),[]))},{id:`coffee`,name:`CoffeeScript`,aliases:[`coffeescript`],import:(()=>M(()=>import(`./_CygMTO1C.js`),__vite__mapDeps([26,4,1,2])))},{id:`common-lisp`,name:`Common Lisp`,aliases:[`lisp`],import:(()=>M(()=>import(`./_Cv5bFMCO.js`),[]))},{id:`coq`,name:`Rocq`,import:(()=>M(()=>import(`./_DuBRPxYg.js`),[]))},{id:`cpp`,name:`C++`,aliases:[`c++`],import:(()=>M(()=>import(`./_B1B7SsmR.js`).then(e=>e.n),__vite__mapDeps([27,1,2,28,29,21])))},{id:`crystal`,name:`Crystal`,import:(()=>M(()=>import(`./_CYSMKo7F.js`),__vite__mapDeps([30,4,1,2,5,3,18,21,31])))},{id:`csharp`,name:`C#`,aliases:[`c#`,`cs`],import:(()=>M(()=>import(`./_oqKa8noW.js`),[]))},{id:`css`,name:`CSS`,import:(()=>M(()=>import(`./_BQazGBwX.js`).then(e=>e.n),__vite__mapDeps([5,1,2])))},{id:`csv`,name:`CSV`,import:(()=>M(()=>import(`./_Dx-8-gkx.js`),[]))},{id:`cue`,name:`CUE`,import:(()=>M(()=>import(`./_CE9AQfxI.js`),[]))},{id:`cypher`,name:`Cypher`,aliases:[`cql`],import:(()=>M(()=>import(`./_ClKdZ_lG.js`),[]))},{id:`d`,name:`D`,import:(()=>M(()=>import(`./_qD-0Kul2.js`),[]))},{id:`dart`,name:`Dart`,import:(()=>M(()=>import(`./_CnvKMtbv.js`),[]))},{id:`dax`,name:`DAX`,import:(()=>M(()=>import(`./_BkyTk9wS.js`),[]))},{id:`desktop`,name:`Desktop`,import:(()=>M(()=>import(`./_Dlh5hvp9.js`),[]))},{id:`diff`,name:`Diff`,import:(()=>M(()=>import(`./_woXpYk--.js`),[]))},{id:`docker`,name:`Dockerfile`,aliases:[`dockerfile`],import:(()=>M(()=>import(`./_IyjqRm3v.js`),[]))},{id:`dotenv`,name:`dotEnv`,import:(()=>M(()=>import(`./__5a1GRtc.js`),[]))},{id:`dream-maker`,name:`Dream Maker`,import:(()=>M(()=>import(`./_DW3nJb8Q.js`),[]))},{id:`edge`,name:`Edge`,import:(()=>M(()=>import(`./_Dt461FGT.js`),__vite__mapDeps([32,3,1,2,4,5,13,17])))},{id:`elixir`,name:`Elixir`,import:(()=>M(()=>import(`./_DhEdWcLh.js`),__vite__mapDeps([33,3,1,2,4,5])))},{id:`elm`,name:`Elm`,import:(()=>M(()=>import(`./_TsHAzFfC.js`),__vite__mapDeps([34,29,1,2,21])))},{id:`emacs-lisp`,name:`Emacs Lisp`,aliases:[`elisp`],import:(()=>M(()=>import(`./_c_oH4hRZ.js`),[]))},{id:`erb`,name:`ERB`,import:(()=>M(()=>import(`./_DXOGRSbq.js`),__vite__mapDeps([35,3,1,2,4,5,36,9,10,18,21,27,28,29,31,37,38,13,15,39,40,41])))},{id:`erlang`,name:`Erlang`,aliases:[`erl`],import:(()=>M(()=>import(`./_BaHq4SXp.js`),__vite__mapDeps([42,43])))},{id:`fennel`,name:`Fennel`,import:(()=>M(()=>import(`./_DQxkIbk2.js`),[]))},{id:`fish`,name:`Fish`,import:(()=>M(()=>import(`./_BJitypiv2.js`),[]))},{id:`fluent`,name:`Fluent`,aliases:[`ftl`],import:(()=>M(()=>import(`./_C03EYrpw2.js`),[]))},{id:`fortran-fixed-form`,name:`Fortran (Fixed Form)`,aliases:[`f`,`for`,`f77`],import:(()=>M(()=>import(`./_DsKRHcpP2.js`),__vite__mapDeps([44,45])))},{id:`fortran-free-form`,name:`Fortran (Free Form)`,aliases:[`f90`,`f95`,`f03`,`f08`,`f18`],import:(()=>M(()=>import(`./_CYNrtFtB2.js`),[]))},{id:`fsharp`,name:`F#`,aliases:[`f#`,`fs`],import:(()=>M(()=>import(`./_DmIc4jLQ2.js`),__vite__mapDeps([46,43])))},{id:`gdresource`,name:`GDResource`,aliases:[`tscn`,`tres`],import:(()=>M(()=>import(`./_CY8IvGdO2.js`),__vite__mapDeps([47,48,49])))},{id:`gdscript`,name:`GDScript`,aliases:[`gd`],import:(()=>M(()=>import(`./_DYvRD3hg2.js`),[]))},{id:`gdshader`,name:`GDShader`,import:(()=>M(()=>import(`./_CBce3t8t2.js`),[]))},{id:`genie`,name:`Genie`,import:(()=>M(()=>import(`./_CV2tkWYe2.js`),[]))},{id:`gherkin`,name:`Gherkin`,import:(()=>M(()=>import(`./_DExj1W_82.js`),[]))},{id:`git-commit`,name:`Git Commit Message`,import:(()=>M(()=>import(`./_Dl-2e7rI2.js`),__vite__mapDeps([50,51])))},{id:`git-rebase`,name:`Git Rebase Message`,import:(()=>M(()=>import(`./_Dbp391kL2.js`),__vite__mapDeps([52,31,1,2])))},{id:`gleam`,name:`Gleam`,import:(()=>M(()=>import(`./_CSRkHgEL2.js`),[]))},{id:`glimmer-js`,name:`Glimmer JS`,aliases:[`gjs`],import:(()=>M(()=>import(`./_CWHyYnLM2.js`),__vite__mapDeps([53,4,1,2,5,3,13])))},{id:`glimmer-ts`,name:`Glimmer TS`,aliases:[`gts`],import:(()=>M(()=>import(`./_Blhy_Vd12.js`),__vite__mapDeps([54,4,1,2,5,3,13])))},{id:`glsl`,name:`GLSL`,import:(()=>M(()=>import(`./_BuNhyEVe.js`).then(e=>e.n),__vite__mapDeps([29,1,2,21])))},{id:`gn`,name:`GN`,import:(()=>M(()=>import(`./_ilITqXS62.js`),[]))},{id:`gnuplot`,name:`Gnuplot`,import:(()=>M(()=>import(`./_7GGW24-e2.js`),[]))},{id:`go`,name:`Go`,import:(()=>M(()=>import(`./_rLFTqkRN2.js`),[]))},{id:`graphql`,name:`GraphQL`,aliases:[`gql`],import:(()=>M(()=>import(`./_B1nEnOeR.js`).then(e=>e.n),__vite__mapDeps([38,1,2,4,13,15,39])))},{id:`groovy`,name:`Groovy`,import:(()=>M(()=>import(`./_CacY0gHj2.js`),[]))},{id:`hack`,name:`Hack`,import:(()=>M(()=>import(`./_CxrdJ7hp2.js`),__vite__mapDeps([55,3,1,2,4,5,18])))},{id:`haml`,name:`Ruby Haml`,import:(()=>M(()=>import(`./_B7g6vstf.js`).then(e=>e.n),__vite__mapDeps([37,1,2,4,5])))},{id:`handlebars`,name:`Handlebars`,aliases:[`hbs`],import:(()=>M(()=>import(`./_DMc_yyoD2.js`),__vite__mapDeps([56,4,1,2,5,3,41])))},{id:`haskell`,name:`Haskell`,aliases:[`hs`],import:(()=>M(()=>import(`./_D8IpX4py2.js`),[]))},{id:`haxe`,name:`Haxe`,import:(()=>M(()=>import(`./_C8oCnwJJ2.js`),[]))},{id:`hcl`,name:`HashiCorp HCL`,import:(()=>M(()=>import(`./_Dh228itO2.js`),[]))},{id:`hjson`,name:`Hjson`,import:(()=>M(()=>import(`./_CxZEssPk2.js`),[]))},{id:`hlsl`,name:`HLSL`,import:(()=>M(()=>import(`./_Cvrh5tZx2.js`),[]))},{id:`html`,name:`HTML`,import:(()=>M(()=>import(`./_CznrmqM4.js`).then(e=>e.n),__vite__mapDeps([3,1,2,4,5])))},{id:`html-derivative`,name:`HTML (Derivative)`,import:(()=>M(()=>import(`./_BuLSZuTT2.js`),__vite__mapDeps([17,3,1,2,4,5])))},{id:`http`,name:`HTTP`,import:(()=>M(()=>import(`./_DqxT_h3w.js`),__vite__mapDeps([57,9,1,2,10,11,31,38,4,13,15,39])))},{id:`hurl`,name:`Hurl`,import:(()=>M(()=>import(`./_CoIipOdm.js`),__vite__mapDeps([58,9,1,2,10,59,38,4,13,15,39])))},{id:`hxml`,name:`HXML`,import:(()=>M(()=>import(`./_DLbMbJfH.js`),__vite__mapDeps([60,61])))},{id:`hy`,name:`Hy`,import:(()=>M(()=>import(`./_CZbG8q4J.js`),[]))},{id:`imba`,name:`Imba`,import:(()=>M(()=>import(`./_DsUTQ-LC.js`),[]))},{id:`ini`,name:`INI`,aliases:[`properties`],import:(()=>M(()=>import(`./_B5eOa1yu.js`),[]))},{id:`java`,name:`Java`,import:(()=>M(()=>import(`./_C5QblKM6.js`).then(e=>e.n),__vite__mapDeps([10,1,2])))},{id:`javascript`,name:`JavaScript`,aliases:[`js`,`cjs`,`mjs`],import:(()=>M(()=>import(`./_CftRvTVW.js`).then(e=>e.n),__vite__mapDeps([4,1,2])))},{id:`jinja`,name:`Jinja`,import:(()=>M(()=>import(`./_DvHOWoGF.js`),__vite__mapDeps([62,3,1,2,4,5])))},{id:`jison`,name:`Jison`,import:(()=>M(()=>import(`./_Cs_1C06H.js`),__vite__mapDeps([63,4,1,2])))},{id:`json`,name:`JSON`,import:(()=>M(()=>import(`./_B3v2Mxg9.js`).then(e=>e.n),__vite__mapDeps([11,1,2])))},{id:`json5`,name:`JSON5`,import:(()=>M(()=>import(`./_BR5RXkoi.js`),[]))},{id:`jsonc`,name:`JSON with Comments`,import:(()=>M(()=>import(`./_CYpm1nAK.js`),[]))},{id:`jsonl`,name:`JSON Lines`,import:(()=>M(()=>import(`./_CmCQp5Yx.js`),[]))},{id:`jsonnet`,name:`Jsonnet`,import:(()=>M(()=>import(`./_CJTPZ8u_.js`),[]))},{id:`jssm`,name:`JSSM`,aliases:[`fsl`],import:(()=>M(()=>import(`./_DXw9l8Rf.js`),[]))},{id:`jsx`,name:`JSX`,import:(()=>M(()=>import(`./_CXcrI0KH.js`).then(e=>e.n),__vite__mapDeps([39,1,2])))},{id:`julia`,name:`Julia`,aliases:[`jl`],import:(()=>M(()=>import(`./_CFGDp3Sw.js`),__vite__mapDeps([64,4,1,2,18,23,27,28,29,21,65])))},{id:`just`,name:`Just`,aliases:[`justfile`],import:(()=>M(()=>import(`./_DA_VGkH6.js`),__vite__mapDeps([66,4,1,2,13,23,31,36,5,3,9,10,18,21,27,28,29,37,38,15,39,40,41,67])))},{id:`kdl`,name:`KDL`,import:(()=>M(()=>import(`./_CsD5j6eV.js`),[]))},{id:`kotlin`,name:`Kotlin`,aliases:[`kt`,`kts`],import:(()=>M(()=>import(`./_DhhofPvG.js`),[]))},{id:`kusto`,name:`Kusto`,aliases:[`kql`],import:(()=>M(()=>import(`./_C7mF5XQf.js`),[]))},{id:`latex`,name:`LaTeX`,import:(()=>M(()=>import(`./_B8bLTrAR.js`),__vite__mapDeps([68,69,1,2,65])))},{id:`lean`,name:`Lean 4`,aliases:[`lean4`],import:(()=>M(()=>import(`./_CewbzKMR.js`),[]))},{id:`less`,name:`Less`,import:(()=>M(()=>import(`./_DVTAwKKz.js`),[]))},{id:`liquid`,name:`Liquid`,import:(()=>M(()=>import(`./_DLzJNX7C.js`),__vite__mapDeps([70,4,1,2,5,3,11])))},{id:`llvm`,name:`LLVM IR`,import:(()=>M(()=>import(`./_DqHOMS-s.js`),[]))},{id:`log`,name:`Log file`,import:(()=>M(()=>import(`./_BNLmms1o.js`),[]))},{id:`logo`,name:`Logo`,import:(()=>M(()=>import(`./_Cluzi2Zq.js`),[]))},{id:`lua`,name:`Lua`,import:(()=>M(()=>import(`./_BG6eCCtD.js`).then(e=>e.n),__vite__mapDeps([40,1,2,21])))},{id:`luau`,name:`Luau`,import:(()=>M(()=>import(`./_C2pBCSgt.js`),[]))},{id:`make`,name:`Makefile`,aliases:[`makefile`],import:(()=>M(()=>import(`./_Dixweg8N.js`),[]))},{id:`markdown`,name:`Markdown`,aliases:[`md`],import:(()=>M(()=>import(`./_BYOwaDjH.js`),[]))},{id:`marko`,name:`Marko`,import:(()=>M(()=>import(`./_DbTEN3Co.js`),__vite__mapDeps([71,5,1,2,7,13,72])))},{id:`matlab`,name:`MATLAB`,import:(()=>M(()=>import(`./_D7qyCx1q.js`),[]))},{id:`mdc`,name:`MDC`,import:(()=>M(()=>import(`./_BY-WvMhs.js`),__vite__mapDeps([73,17,3,1,2,4,5,41,43])))},{id:`mdx`,name:`MDX`,import:(()=>M(()=>import(`./_DQZ5AkYe.js`),[]))},{id:`mermaid`,name:`Mermaid`,aliases:[`mmd`],import:(()=>M(()=>import(`./_BxpfTIzt.js`),[]))},{id:`mipsasm`,name:`MIPS Assembly`,aliases:[`mips`],import:(()=>M(()=>import(`./_BMqwQI7S.js`),[]))},{id:`mojo`,name:`Mojo`,import:(()=>M(()=>import(`./_CFuIV2fl.js`),[]))},{id:`moonbit`,name:`MoonBit`,aliases:[`mbt`,`mbti`],import:(()=>M(()=>import(`./_DgjMoLWr.js`),[]))},{id:`move`,name:`Move`,import:(()=>M(()=>import(`./_BYnGhZoM2.js`),[]))},{id:`narrat`,name:`Narrat Language`,aliases:[`nar`],import:(()=>M(()=>import(`./__X_XdTYD2.js`),[]))},{id:`nextflow`,name:`Nextflow`,aliases:[`nf`],import:(()=>M(()=>import(`./_DY5hwH4S2.js`),__vite__mapDeps([74,75])))},{id:`nextflow-groovy`,name:`Nextflow Groovy`,import:(()=>M(()=>import(`./_DJMQeKeT2.js`),[]))},{id:`nginx`,name:`Nginx`,import:(()=>M(()=>import(`./_CSJQogH62.js`),__vite__mapDeps([76,40,1,2,21])))},{id:`nim`,name:`Nim`,import:(()=>M(()=>import(`./_B_wawL6J2.js`),__vite__mapDeps([77,4,1,2,5,3,9,10,21,29,43])))},{id:`nix`,name:`Nix`,import:(()=>M(()=>import(`./_IvuFDN5E2.js`),[]))},{id:`nsis`,name:`NSIS`,import:(()=>M(()=>import(`./_CjNLYCLg2.js`),[]))},{id:`nushell`,name:`nushell`,aliases:[`nu`],import:(()=>M(()=>import(`./_DHYfO66s2.js`),[]))},{id:`objective-c`,name:`Objective-C`,aliases:[`objc`],import:(()=>M(()=>import(`./_D1A_Heim2.js`),[]))},{id:`objective-cpp`,name:`Objective-C++`,import:(()=>M(()=>import(`./_BsSzOQcm2.js`),[]))},{id:`ocaml`,name:`OCaml`,import:(()=>M(()=>import(`./_O90oeIOV2.js`),[]))},{id:`odin`,name:`Odin`,import:(()=>M(()=>import(`./_B1RWQWA52.js`),[]))},{id:`openscad`,name:`OpenSCAD`,aliases:[`scad`],import:(()=>M(()=>import(`./_BUDT5pXO2.js`),[]))},{id:`org`,name:`Org Markup`,import:(()=>M(()=>import(`./_ZVf0cDT12.js`),__vite__mapDeps([78,4,1,2,5,3,7,10,9,11,13,15,18,21,23,79,26,28,27,29,31,80,81,51,82,33,40,41,36,37,38,39,43,42,50,52,83,84,85,65,67,68,69,72,86,77,87,88,89,90,91,92,93,94,95])))},{id:`pascal`,name:`Pascal`,import:(()=>M(()=>import(`./_4ZHwLPI52.js`),[]))},{id:`perl`,name:`Perl`,import:(()=>M(()=>import(`./_BZJVwhA5.js`),__vite__mapDeps([67,4,1,2,5,3,9,10,18])))},{id:`php`,name:`PHP`,import:(()=>M(()=>import(`./_CYK6BCWH2.js`),__vite__mapDeps([89,4,1,2,5,3,9,10,11,18])))},{id:`pkl`,name:`Pkl`,import:(()=>M(()=>import(`./_ot-7Btpt2.js`),[]))},{id:`plsql`,name:`PL/SQL`,import:(()=>M(()=>import(`./_DGHpHOYJ2.js`),[]))},{id:`po`,name:`Gettext PO`,aliases:[`pot`,`potx`],import:(()=>M(()=>import(`./_BiJDBrnU2.js`),[]))},{id:`polar`,name:`Polar`,import:(()=>M(()=>import(`./_C7UOKdEL.js`),[]))},{id:`postcss`,name:`PostCSS`,import:(()=>M(()=>import(`./_BXeXVLqQ2.js`),[]))},{id:`powerquery`,name:`PowerQuery`,import:(()=>M(()=>import(`./_DNMTfnFr.js`),[]))},{id:`powershell`,name:`PowerShell`,aliases:[`ps`,`ps1`,`pwsh`],import:(()=>M(()=>import(`./_CCSX75yM.js`),[]))},{id:`prisma`,name:`Prisma`,import:(()=>M(()=>import(`./_DMgNhnYS.js`),[]))},{id:`prolog`,name:`Prolog`,import:(()=>M(()=>import(`./_iXnhIJG7.js`),[]))},{id:`proto`,name:`Protocol Buffer 3`,aliases:[`protobuf`],import:(()=>M(()=>import(`./_DB4EqR-F.js`),[]))},{id:`pug`,name:`Pug`,aliases:[`jade`],import:(()=>M(()=>import(`./_p1qRbXAM.js`),__vite__mapDeps([96,4,1,2,5,3])))},{id:`puppet`,name:`Puppet`,import:(()=>M(()=>import(`./_CDv2pdJW.js`),[]))},{id:`purescript`,name:`PureScript`,import:(()=>M(()=>import(`./_9MfHhQsQ.js`),[]))},{id:`python`,name:`Python`,aliases:[`py`],import:(()=>M(()=>import(`./_gzcpVVnB2.js`),[]))},{id:`qml`,name:`QML`,import:(()=>M(()=>import(`./_BERiWLR2.js`),__vite__mapDeps([97,4,1,2])))},{id:`qmldir`,name:`QML Directory`,import:(()=>M(()=>import(`./_DCQb3MpD.js`),[]))},{id:`qss`,name:`Qt Style Sheets`,import:(()=>M(()=>import(`./_Fe1Jh2GI.js`),[]))},{id:`r`,name:`R`,import:(()=>M(()=>import(`./_BMjuOAQ4.js`).then(e=>e.n),__vite__mapDeps([65,1,2])))},{id:`racket`,name:`Racket`,import:(()=>M(()=>import(`./_DcIDlBhZ.js`),[]))},{id:`raku`,name:`Raku`,aliases:[`perl6`],import:(()=>M(()=>import(`./_B3gFvitq2.js`),[]))},{id:`razor`,name:`ASP.NET Razor`,import:(()=>M(()=>import(`./_DcfWOyup.js`),__vite__mapDeps([98,3,1,2,4,5,80])))},{id:`rbs`,name:`RBS`,aliases:[`ruby-signature`],import:(()=>M(()=>import(`./_C0MpOrj4.js`),[]))},{id:`reg`,name:`Windows Registry Script`,import:(()=>M(()=>import(`./_CRGYupPL.js`),[]))},{id:`regexp`,name:`RegExp`,aliases:[`regex`],import:(()=>M(()=>import(`./__g_2CBHN.js`).then(e=>e.n),__vite__mapDeps([28,1,2])))},{id:`rel`,name:`Rel`,import:(()=>M(()=>import(`./_BtDbiS_P.js`),[]))},{id:`riscv`,name:`RISC-V`,import:(()=>M(()=>import(`./_Ckw8ddFX.js`),[]))},{id:`ron`,name:`RON`,import:(()=>M(()=>import(`./_VUp2lXgN.js`),[]))},{id:`rosmsg`,name:`ROS Interface`,import:(()=>M(()=>import(`./_CAekHB0j.js`),[]))},{id:`rst`,name:`reStructuredText`,import:(()=>M(()=>import(`./_C2WEo047.js`),__vite__mapDeps([99,4,1,2,17,3,5,23,100,27,28,29,21,31,41,36,9,10,18,37,38,13,15,39,40])))},{id:`ruby`,name:`Ruby`,aliases:[`rb`],import:(()=>M(()=>import(`./_BcTQMZit.js`),__vite__mapDeps([36,4,1,2,5,3,9,10,18,21,27,28,29,31,37,38,13,15,39,40,41])))},{id:`rust`,name:`Rust`,aliases:[`rs`],import:(()=>M(()=>import(`./_Cfkwpbl82.js`),[]))},{id:`sas`,name:`SAS`,import:(()=>M(()=>import(`./_B2zlBhgP.js`),__vite__mapDeps([101,18,1,2])))},{id:`sass`,name:`Sass`,import:(()=>M(()=>import(`./_DXrisJhu.js`),[]))},{id:`scala`,name:`Scala`,import:(()=>M(()=>import(`./_BiFt_7mu2.js`),[]))},{id:`scheme`,name:`Scheme`,import:(()=>M(()=>import(`./_DQCgrYNe.js`),[]))},{id:`scss`,name:`SCSS`,import:(()=>M(()=>import(`./_DVIdvZ6L.js`).then(e=>e.n),__vite__mapDeps([7,1,2,5])))},{id:`sdbl`,name:`1C (Query)`,aliases:[`1c-query`],import:(()=>M(()=>import(`./_bTVj8UrX2.js`),[]))},{id:`shaderlab`,name:`ShaderLab`,aliases:[`shader`],import:(()=>M(()=>import(`./_BM315xPC.js`),__vite__mapDeps([102,103])))},{id:`shellscript`,name:`Shell`,aliases:[`bash`,`sh`,`shell`,`zsh`],import:(()=>M(()=>import(`./_DiHWQ-Ew.js`).then(e=>e.n),__vite__mapDeps([31,1,2])))},{id:`shellsession`,name:`Shell Session`,aliases:[`console`],import:(()=>M(()=>import(`./_hN1-RJcA.js`),__vite__mapDeps([104,31,1,2])))},{id:`smalltalk`,name:`GNU Smalltalk`,import:(()=>M(()=>import(`./_BHpQb5nM.js`),[]))},{id:`smithy`,name:`Smithy`,import:(()=>M(()=>import(`./_Dgaz7aur.js`),[]))},{id:`solidity`,name:`Solidity`,import:(()=>M(()=>import(`./_Bj7E1mRn.js`),[]))},{id:`soy`,name:`Closure Templates`,aliases:[`closure-templates`],import:(()=>M(()=>import(`./_B4zQcDgs.js`),__vite__mapDeps([105,3,1,2,4,5])))},{id:`sparql`,name:`SPARQL`,import:(()=>M(()=>import(`./_L8AbGenz.js`),__vite__mapDeps([106,107])))},{id:`splunk`,name:`Splunk Query Language`,aliases:[`spl`],import:(()=>M(()=>import(`./_BC2Px7Mm.js`),[]))},{id:`sql`,name:`SQL`,import:(()=>M(()=>import(`./_ClSO8TOE2.js`).then(e=>e.n),__vite__mapDeps([18,1,2])))},{id:`ssh-config`,name:`SSH Config`,import:(()=>M(()=>import(`./_BgfXC-Er.js`),[]))},{id:`stata`,name:`Stata`,import:(()=>M(()=>import(`./_B3-rUIWu.js`),__vite__mapDeps([108,18,1,2])))},{id:`stylus`,name:`Stylus`,aliases:[`styl`],import:(()=>M(()=>import(`./_B6D30XZt.js`),[]))},{id:`surrealql`,name:`SurrealQL`,aliases:[`surql`],import:(()=>M(()=>import(`./_DgCQT80U.js`),__vite__mapDeps([109,4,1,2])))},{id:`svelte`,name:`Svelte`,import:(()=>M(()=>import(`./_DRT4_m9d.js`),__vite__mapDeps([110,4,1,2,5,13,14])))},{id:`swift`,name:`Swift`,import:(()=>M(()=>import(`./_CyEgAFGc2.js`),[]))},{id:`system-verilog`,name:`SystemVerilog`,import:(()=>M(()=>import(`./_Dh5ihWbf2.js`),[]))},{id:`systemd`,name:`Systemd Units`,import:(()=>M(()=>import(`./_BxMlprV52.js`),[]))},{id:`talonscript`,name:`TalonScript`,aliases:[`talon`],import:(()=>M(()=>import(`./_CohzipZa2.js`),[]))},{id:`tasl`,name:`Tasl`,import:(()=>M(()=>import(`./_DMoTqEGO2.js`),[]))},{id:`tcl`,name:`Tcl`,import:(()=>M(()=>import(`./_CZd0xW_V2.js`),[]))},{id:`templ`,name:`Templ`,import:(()=>M(()=>import(`./_ToAhQlpQ2.js`),__vite__mapDeps([111,4,1,2,5,83])))},{id:`terraform`,name:`Terraform`,aliases:[`tf`,`tfvars`],import:(()=>M(()=>import(`./_DswuEJGm2.js`),[]))},{id:`tex`,name:`TeX`,import:(()=>M(()=>import(`./_CBHyOOZB.js`).then(e=>e.n),__vite__mapDeps([69,1,2,65])))},{id:`toml`,name:`TOML`,import:(()=>M(()=>import(`./_CcmNWLt02.js`),[]))},{id:`ts-tags`,name:`TypeScript with Tags`,aliases:[`lit`],import:(()=>M(()=>import(`./_BNv3fPjT2.js`),__vite__mapDeps([112,4,1,2,5,3,9,10,13,18,29,21])))},{id:`tsv`,name:`TSV`,import:(()=>M(()=>import(`./_sltzmVWM2.js`),[]))},{id:`tsx`,name:`TSX`,import:(()=>M(()=>import(`./_DjcyEwVn2.js`).then(e=>e.n),__vite__mapDeps([15,1,2])))},{id:`turtle`,name:`Turtle`,import:(()=>M(()=>import(`./_ByJddavk.js`),[]))},{id:`twig`,name:`Twig`,import:(()=>M(()=>import(`./_N8vS2ulD2.js`),__vite__mapDeps([113,4,1,2,5,7,23,36,3,9,10,18,21,27,28,29,31,37,38,13,15,39,40,41,89,11])))},{id:`typescript`,name:`TypeScript`,aliases:[`ts`,`cts`,`mts`],import:(()=>M(()=>import(`./_CNPgjl1-2.js`).then(e=>e.n),__vite__mapDeps([13,1,2])))},{id:`typespec`,name:`TypeSpec`,aliases:[`tsp`],import:(()=>M(()=>import(`./_BRdr0IET2.js`),[]))},{id:`typst`,name:`Typst`,aliases:[`typ`],import:(()=>M(()=>import(`./_DI99ib-x2.js`),[]))},{id:`v`,name:`V`,import:(()=>M(()=>import(`./_DBj4K9d_2.js`),[]))},{id:`vala`,name:`Vala`,import:(()=>M(()=>import(`./_zf12oZj62.js`),[]))},{id:`vb`,name:`Visual Basic`,import:(()=>M(()=>import(`./_DOwzaHZ02.js`),[]))},{id:`verilog`,name:`Verilog`,import:(()=>M(()=>import(`./_B2gwz-sJ2.js`),[]))},{id:`vhdl`,name:`VHDL`,import:(()=>M(()=>import(`./_BroJfC0k2.js`),[]))},{id:`viml`,name:`Vim Script`,aliases:[`vim`,`vimscript`],import:(()=>M(()=>import(`./_DvXPmvsu2.js`),[]))},{id:`vue`,name:`Vue`,import:(()=>M(()=>import(`./_BJL8EzDT2.js`),__vite__mapDeps([114,4,1,2,5,3,11,13,17])))},{id:`vue-html`,name:`Vue HTML`,import:(()=>M(()=>import(`./_B2vPwdLW2.js`),__vite__mapDeps([115,4,1,2])))},{id:`vue-vine`,name:`Vue Vine`,import:(()=>M(()=>import(`./_CpqV5nOZ2.js`),__vite__mapDeps([116,4,1,2,5,7,14,72,117])))},{id:`vyper`,name:`Vyper`,aliases:[`vy`],import:(()=>M(()=>import(`./_CgoNMtux2.js`),[]))},{id:`wasm`,name:`WebAssembly`,import:(()=>M(()=>import(`./_ByWQv1Qj2.js`),[]))},{id:`wenyan`,name:`Wenyan`,aliases:[`文言`],import:(()=>M(()=>import(`./_C8pVoKbM2.js`),[]))},{id:`wgsl`,name:`WGSL`,import:(()=>M(()=>import(`./_BsKzXJz42.js`),[]))},{id:`wikitext`,name:`Wikitext`,aliases:[`mediawiki`,`wiki`],import:(()=>M(()=>import(`./_ClFFjSW2.js`),[]))},{id:`wit`,name:`WebAssembly Interface Types`,import:(()=>M(()=>import(`./_DdvCle-K.js`),[]))},{id:`wolfram`,name:`Wolfram`,aliases:[`wl`],import:(()=>M(()=>import(`./_DLL8P-h_.js`),[]))},{id:`xml`,name:`XML`,import:(()=>M(()=>import(`./_DnhKP7pH.js`).then(e=>e.n),__vite__mapDeps([9,1,2,10])))},{id:`xsl`,name:`XSL`,import:(()=>M(()=>import(`./_Da8gt_F52.js`),__vite__mapDeps([95,9,1,2,10])))},{id:`yaml`,name:`YAML`,aliases:[`yml`],import:(()=>M(()=>import(`./_DpJdqIrj.js`).then(e=>e.n),__vite__mapDeps([41,1,2])))},{id:`zenscript`,name:`ZenScript`,import:(()=>M(()=>import(`./_BnlCZFoB.js`),[]))},{id:`zig`,name:`Zig`,import:(()=>M(()=>import(`./_CMLA9XwU2.js`),[]))}],Os=Object.fromEntries(Ds.map(e=>[e.id,e.import])),ks=Object.fromEntries(Ds.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),As={...Os,...ks},js=Object.fromEntries([{id:`andromeeda`,displayName:`Andromeeda`,type:`dark`,import:(()=>M(()=>import(`./_vGVdxbeo.js`),[]))},{id:`aurora-x`,displayName:`Aurora X`,type:`dark`,import:(()=>M(()=>import(`./_CDeNXAV0.js`),[]))},{id:`ayu-dark`,displayName:`Ayu Dark`,type:`dark`,import:(()=>M(()=>import(`./_DluEY0Gj.js`),[]))},{id:`ayu-light`,displayName:`Ayu Light`,type:`light`,import:(()=>M(()=>import(`./_C3h-C4tm.js`),[]))},{id:`ayu-mirage`,displayName:`Ayu Mirage`,type:`dark`,import:(()=>M(()=>import(`./_Bqwy1Gya.js`),[]))},{id:`catppuccin-frappe`,displayName:`Catppuccin Frappé`,type:`dark`,import:(()=>M(()=>import(`./_C9Q5zVZY.js`),[]))},{id:`catppuccin-latte`,displayName:`Catppuccin Latte`,type:`light`,import:(()=>M(()=>import(`./_CtsyrtPq.js`),[]))},{id:`catppuccin-macchiato`,displayName:`Catppuccin Macchiato`,type:`dark`,import:(()=>M(()=>import(`./_R8nAf1vR.js`),[]))},{id:`catppuccin-mocha`,displayName:`Catppuccin Mocha`,type:`dark`,import:(()=>M(()=>import(`./_DjuaAJKi.js`),[]))},{id:`dark-plus`,displayName:`Dark Plus`,type:`dark`,import:(()=>M(()=>import(`./_Cs2F2srj.js`),[]))},{id:`dracula`,displayName:`Dracula Theme`,type:`dark`,import:(()=>M(()=>import(`./_BHWKrbxM.js`),[]))},{id:`dracula-soft`,displayName:`Dracula Theme Soft`,type:`dark`,import:(()=>M(()=>import(`./_5eyTD99u.js`),[]))},{id:`everforest-dark`,displayName:`Everforest Dark`,type:`dark`,import:(()=>M(()=>import(`./_sB-x3p7T.js`),[]))},{id:`everforest-light`,displayName:`Everforest Light`,type:`light`,import:(()=>M(()=>import(`./_Df2xbC6M.js`),[]))},{id:`github-dark`,displayName:`GitHub Dark`,type:`dark`,import:(()=>M(()=>import(`./_C-LZuMrd.js`),[]))},{id:`github-dark-default`,displayName:`GitHub Dark Default`,type:`dark`,import:(()=>M(()=>import(`./_DXG-b-1a.js`),[]))},{id:`github-dark-dimmed`,displayName:`GitHub Dark Dimmed`,type:`dark`,import:(()=>M(()=>import(`./_Bx1FflLF.js`),[]))},{id:`github-dark-high-contrast`,displayName:`GitHub Dark High Contrast`,type:`dark`,import:(()=>M(()=>import(`./_B_tTalzw.js`),[]))},{id:`github-light`,displayName:`GitHub Light`,type:`light`,import:(()=>M(()=>import(`./_EUqPIrTm.js`),[]))},{id:`github-light-default`,displayName:`GitHub Light Default`,type:`light`,import:(()=>M(()=>import(`./_BXViO-2h.js`),[]))},{id:`github-light-high-contrast`,displayName:`GitHub Light High Contrast`,type:`light`,import:(()=>M(()=>import(`./_B68TUdTA.js`),[]))},{id:`gruvbox-dark-hard`,displayName:`Gruvbox Dark Hard`,type:`dark`,import:(()=>M(()=>import(`./_C820rvS2.js`),[]))},{id:`gruvbox-dark-medium`,displayName:`Gruvbox Dark Medium`,type:`dark`,import:(()=>M(()=>import(`./_BPjhmG05.js`),[]))},{id:`gruvbox-dark-soft`,displayName:`Gruvbox Dark Soft`,type:`dark`,import:(()=>M(()=>import(`./_MrdJrrXF.js`),[]))},{id:`gruvbox-light-hard`,displayName:`Gruvbox Light Hard`,type:`light`,import:(()=>M(()=>import(`./_BC_s9l72.js`),[]))},{id:`gruvbox-light-medium`,displayName:`Gruvbox Light Medium`,type:`light`,import:(()=>M(()=>import(`./_BAWPOn9u.js`),[]))},{id:`gruvbox-light-soft`,displayName:`Gruvbox Light Soft`,type:`light`,import:(()=>M(()=>import(`./_BSMLrYjP.js`),[]))},{id:`horizon`,displayName:`Horizon`,type:`dark`,import:(()=>M(()=>import(`./_CE9ld1lL.js`),[]))},{id:`horizon-bright`,displayName:`Horizon Bright`,type:`light`,import:(()=>M(()=>import(`./_DSNQnXHK.js`),[]))},{id:`houston`,displayName:`Houston`,type:`dark`,import:(()=>M(()=>import(`./_CsvMBhTu.js`),[]))},{id:`kanagawa-dragon`,displayName:`Kanagawa Dragon`,type:`dark`,import:(()=>M(()=>import(`./_Bozd7klA.js`),[]))},{id:`kanagawa-lotus`,displayName:`Kanagawa Lotus`,type:`light`,import:(()=>M(()=>import(`./_BmuOG9ZW.js`),[]))},{id:`kanagawa-wave`,displayName:`Kanagawa Wave`,type:`dark`,import:(()=>M(()=>import(`./_BML5mF2J.js`),[]))},{id:`laserwave`,displayName:`LaserWave`,type:`dark`,import:(()=>M(()=>import(`./_C_8bwKvT.js`),[]))},{id:`light-plus`,displayName:`Light Plus`,type:`light`,import:(()=>M(()=>import(`./_DVQuIRkW2.js`),[]))},{id:`material-theme`,displayName:`Material Theme`,type:`dark`,import:(()=>M(()=>import(`./_Bm3Qr25_2.js`),[]))},{id:`material-theme-darker`,displayName:`Material Theme Darker`,type:`dark`,import:(()=>M(()=>import(`./_2IIEA8gg2.js`),[]))},{id:`material-theme-lighter`,displayName:`Material Theme Lighter`,type:`light`,import:(()=>M(()=>import(`./_uhdI0v042.js`),[]))},{id:`material-theme-ocean`,displayName:`Material Theme Ocean`,type:`dark`,import:(()=>M(()=>import(`./_CHQ94UKr2.js`),[]))},{id:`material-theme-palenight`,displayName:`Material Theme Palenight`,type:`dark`,import:(()=>M(()=>import(`./_B5W6OYN72.js`),[]))},{id:`min-dark`,displayName:`Min Dark`,type:`dark`,import:(()=>M(()=>import(`./_BSWPekZh2.js`),[]))},{id:`min-light`,displayName:`Min Light`,type:`light`,import:(()=>M(()=>import(`./_DDpmG2fV2.js`),[]))},{id:`monokai`,displayName:`Monokai`,type:`dark`,import:(()=>M(()=>import(`./_B_bV9PQ92.js`),[]))},{id:`night-owl`,displayName:`Night Owl`,type:`dark`,import:(()=>M(()=>import(`./_DhmEMT882.js`),[]))},{id:`night-owl-light`,displayName:`Night Owl Light`,type:`light`,import:(()=>M(()=>import(`./_eJ-hLW7d2.js`),[]))},{id:`nord`,displayName:`Nord`,type:`dark`,import:(()=>M(()=>import(`./_Cb4Vim4T2.js`),[]))},{id:`one-dark-pro`,displayName:`One Dark Pro`,type:`dark`,import:(()=>M(()=>import(`./_CLwyXe_n2.js`),[]))},{id:`one-light`,displayName:`One Light`,type:`light`,import:(()=>M(()=>import(`./_D7Lr4KcI2.js`),[]))},{id:`plastic`,displayName:`Plastic`,type:`dark`,import:(()=>M(()=>import(`./_DQwYfKfQ2.js`),[]))},{id:`poimandres`,displayName:`Poimandres`,type:`dark`,import:(()=>M(()=>import(`./_DRFjx7u42.js`),[]))},{id:`red`,displayName:`Red`,type:`dark`,import:(()=>M(()=>import(`./_DX1BQOs82.js`),[]))},{id:`rose-pine`,displayName:`Rosé Pine`,type:`dark`,import:(()=>M(()=>import(`./_aMsaMD1D2.js`),[]))},{id:`rose-pine-dawn`,displayName:`Rosé Pine Dawn`,type:`light`,import:(()=>M(()=>import(`./_8PwUyIlP2.js`),[]))},{id:`rose-pine-moon`,displayName:`Rosé Pine Moon`,type:`dark`,import:(()=>M(()=>import(`./_DO-qXg-I2.js`),[]))},{id:`slack-dark`,displayName:`Slack Dark`,type:`dark`,import:(()=>M(()=>import(`./_DnToyrRv2.js`),[]))},{id:`slack-ochin`,displayName:`Slack Ochin`,type:`light`,import:(()=>M(()=>import(`./_B2OO5cIa2.js`),[]))},{id:`snazzy-light`,displayName:`Snazzy Light`,type:`light`,import:(()=>M(()=>import(`./_4G7pJPwS2.js`),[]))},{id:`solarized-dark`,displayName:`Solarized Dark`,type:`dark`,import:(()=>M(()=>import(`./_UdsmMDCL2.js`),[]))},{id:`solarized-light`,displayName:`Solarized Light`,type:`light`,import:(()=>M(()=>import(`./_C1IUL_tW2.js`),[]))},{id:`synthwave-84`,displayName:`Synthwave '84`,type:`dark`,import:(()=>M(()=>import(`./_nFMaYfgc2.js`),[]))},{id:`tokyo-night`,displayName:`Tokyo Night`,type:`dark`,import:(()=>M(()=>import(`./_oM2G3aXe.js`),[]))},{id:`vesper`,displayName:`Vesper`,type:`dark`,import:(()=>M(()=>import(`./_DdrHHSXu.js`),[]))},{id:`vitesse-black`,displayName:`Vitesse Black`,type:`dark`,import:(()=>M(()=>import(`./_fwtXNY1n.js`),[]))},{id:`vitesse-dark`,displayName:`Vitesse Dark`,type:`dark`,import:(()=>M(()=>import(`./_BZCL-v6S.js`),[]))},{id:`vitesse-light`,displayName:`Vitesse Light`,type:`light`,import:(()=>M(()=>import(`./_VbXTXTou.js`),[]))}].map(e=>[e.id,e.import])),Ms=ke({createOnigurumaEngine:()=>ic,getDefaultWasmLoader:()=>rc,loadWasm:()=>Zs,setDefaultWasmLoader:()=>nc}),Ns=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function Ps(){return 2147483648}function Fs(){return typeof performance<`u`?performance.now():Date.now()}var Is=(e,t)=>e+(t-e%t)%t;async function Ls(e){let t,n,r={};function i(e){n=e,r.HEAPU8=new Uint8Array(e),r.HEAPU32=new Uint32Array(e)}function a(e,t,n){r.HEAPU8.copyWithin(e,t,t+n)}function o(e){try{return t.grow(e-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}function s(e){let t=r.HEAPU8.length;e>>>=0;let n=Ps();if(e>n)return!1;for(let r=1;r<=4;r*=2){let i=t*(1+.2/r);if(i=Math.min(i,e+100663296),o(Math.min(n,Is(Math.max(e,i),65536))))return!0}return!1}let c=typeof TextDecoder<`u`?new TextDecoder(`utf8`):void 0;function l(e,t,n=1024){let r=t+n,i=t;for(;e[i]&&!(i>=r);)++i;if(i-t>16&&e.buffer&&c)return c.decode(e.subarray(t,i));let a=``;for(;t<i;){let n=e[t++];if(!(n&128)){a+=String.fromCharCode(n);continue}let r=e[t++]&63;if((n&224)==192){a+=String.fromCharCode((n&31)<<6|r);continue}let i=e[t++]&63;if(n=(n&240)==224?(n&15)<<12|r<<6|i:(n&7)<<18|r<<12|i<<6|e[t++]&63,n<65536)a+=String.fromCharCode(n);else{let e=n-65536;a+=String.fromCharCode(55296|e>>10,56320|e&1023)}}return a}function u(e,t){return e?l(r.HEAPU8,e,t):``}let d={emscripten_get_now:Fs,emscripten_memcpy_big:a,emscripten_resize_heap:s,fd_write:()=>0};async function f(){let n=await e({env:d,wasi_snapshot_preview1:d});t=n.memory,i(t.buffer),Object.assign(r,n),r.UTF8ToString=u}return await f(),r}var Rs=Object.defineProperty,zs=(e,t,n)=>t in e?Rs(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,W=(e,t,n)=>zs(e,typeof t==`symbol`?t:t+``,n),G=null;function Bs(e){throw new Ns(e.UTF8ToString(e.getLastOnigError()))}var Vs=class e{constructor(t){W(this,`utf16Length`),W(this,`utf8Length`),W(this,`utf16Value`),W(this,`utf8Value`),W(this,`utf16OffsetToUtf8`),W(this,`utf8OffsetToUtf16`);let n=t.length,r=e._utf8ByteLength(t),i=r!==n,a=i?new Uint32Array(n+1):null;i&&(a[n]=r);let o=i?new Uint32Array(r+1):null;i&&(o[r]=n);let s=new Uint8Array(r),c=0;for(let e=0;e<n;e++){let r=t.charCodeAt(e),l=r,u=!1;if(r>=55296&&r<=56319&&e+1<n){let n=t.charCodeAt(e+1);n>=56320&&n<=57343&&(l=(r-55296<<10)+65536|n-56320,u=!0)}i&&(a[e]=c,u&&(a[e+1]=c),l<=127?o[c+0]=e:l<=2047?(o[c+0]=e,o[c+1]=e):l<=65535?(o[c+0]=e,o[c+1]=e,o[c+2]=e):(o[c+0]=e,o[c+1]=e,o[c+2]=e,o[c+3]=e)),l<=127?s[c++]=l:l<=2047?(s[c++]=192|(l&1984)>>>6,s[c++]=128|(l&63)>>>0):l<=65535?(s[c++]=224|(l&61440)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0):(s[c++]=240|(l&1835008)>>>18,s[c++]=128|(l&258048)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0),u&&e++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=s,this.utf16OffsetToUtf8=a,this.utf8OffsetToUtf16=o}static _utf8ByteLength(e){let t=0;for(let n=0,r=e.length;n<r;n++){let i=e.charCodeAt(n),a=i,o=!1;if(i>=55296&&i<=56319&&n+1<r){let t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(a=(i-55296<<10)+65536|t-56320,o=!0)}t+=a<=127?1:a<=2047?2:a<=65535?3:4,o&&n++}return t}createString(e){let t=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}},Hs=class e{constructor(t){if(W(this,`id`,++e.LAST_ID),W(this,`_onigBinding`),W(this,`content`),W(this,`utf16Length`),W(this,`utf8Length`),W(this,`utf16OffsetToUtf8`),W(this,`utf8OffsetToUtf16`),W(this,`ptr`),!G)throw new Ns(`Must invoke loadWasm first.`);this._onigBinding=G,this.content=t;let n=new Vs(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||=G.omalloc(1e4),e._sharedPtrInUse=!0,G.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString(G)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===e._sharedPtr?e._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};W(Hs,`LAST_ID`,0),W(Hs,`_sharedPtr`,0),W(Hs,`_sharedPtrInUse`,!1);var Us=Hs,Ws=class{constructor(e){if(W(this,`_onigBinding`),W(this,`_ptr`),!G)throw new Ns(`Must invoke loadWasm first.`);let t=[],n=[];for(let r=0,i=e.length;r<i;r++){let i=new Vs(e[r]);t[r]=i.createString(G),n[r]=i.utf8Length}let r=G.omalloc(4*e.length);G.HEAPU32.set(t,r/4);let i=G.omalloc(4*e.length);G.HEAPU32.set(n,i/4);let a=G.createOnigScanner(r,i,e.length);for(let n=0,r=e.length;n<r;n++)G.ofree(t[n]);G.ofree(i),G.ofree(r),a===0&&Bs(G),this._onigBinding=G,this._ptr=a}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,t,n){let r=0;if(typeof n==`number`&&(r=n),typeof e==`string`){e=new Us(e);let n=this._findNextMatchSync(e,t,!1,r);return e.dispose(),n}return this._findNextMatchSync(e,t,!1,r)}_findNextMatchSync(e,t,n,r){let i=this._onigBinding,a=i.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),r);if(a===0)return null;let o=i.HEAPU32,s=a/4,c=o[s++],l=o[s++],u=[];for(let t=0;t<l;t++){let n=e.convertUtf8OffsetToUtf16(o[s++]),r=e.convertUtf8OffsetToUtf16(o[s++]);u[t]={start:n,end:r,length:r-n}}return{index:c,captureIndices:u}}};function Gs(e){return typeof e.instantiator==`function`}function Ks(e){return typeof e.default==`function`}function qs(e){return e.data!==void 0}function Js(e){return typeof Response<`u`&&e instanceof Response}function Ys(e){return typeof ArrayBuffer<`u`&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<`u`&&Buffer.isBuffer?.(e)||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer||typeof Uint32Array<`u`&&e instanceof Uint32Array}var Xs;function Zs(e){if(Xs)return Xs;async function t(){G=await Ls(async t=>{let n=e;return n=await n,typeof n==`function`&&(n=await n(t)),typeof n==`function`&&(n=await n(t)),Gs(n)?n=await n.instantiator(t):Ks(n)?n=await n.default(t):(qs(n)&&(n=n.data),Js(n)?n=typeof WebAssembly.instantiateStreaming==`function`?await $s(n)(t):await ec(n)(t):Ys(n)||n instanceof WebAssembly.Module?n=await Qs(n)(t):`default`in n&&n.default instanceof WebAssembly.Module&&(n=await Qs(n.default)(t))),`instance`in n&&(n=n.instance),`exports`in n&&(n=n.exports),n})}return Xs=t(),Xs}function Qs(e){return t=>WebAssembly.instantiate(e,t)}function $s(e){return t=>WebAssembly.instantiateStreaming(e,t)}function ec(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}var tc;function nc(e){tc=e}function rc(){return tc}async function ic(e){return e&&await Zs(e),{createScanner(e){return new Ws(e.map(e=>typeof e==`string`?e:e.source))},createString(e){return new Us(e)}}}var ac=ws({});Es(ac,Ms);var K=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function oc(e){return sc(e)}function sc(e){return Array.isArray(e)?cc(e):e instanceof RegExp?e:typeof e==`object`?lc(e):e}function cc(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=sc(e[n]);return t}function lc(e){let t={};for(let n in e)t[n]=sc(e[n]);return t}function uc(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function dc(e){let t=~e.lastIndexOf(`/`)||~e.lastIndexOf(`\\`);return t===0?e:~t===e.length-1?dc(e.substring(0,e.length-1)):e.substr(~t+1)}var fc=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,pc=class{static hasCaptures(e){return e!==null&&(fc.lastIndex=0,fc.test(e))}static replaceCaptures(e,t,n){return e.replace(fc,(e,r,i,a)=>{let o=n[parseInt(r||i,10)];if(o){let e=t.substring(o.start,o.end);for(;e[0]===`.`;)e=e.substring(1);switch(a){case`downcase`:return e.toLowerCase();case`upcase`:return e.toUpperCase();default:return e}}else return e})}};function mc(e,t){return e<t?-1:+(e>t)}function hc(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let r=0;r<n;r++){let n=mc(e[r],t[r]);if(n!==0)return n}return 0}return n-r}function gc(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function _c(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,`\\$&`)}var vc=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},yc=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(wc(e),t)}static createFromParsedTheme(e,t){return Ec(e,t)}_cachedMatchRoot=new vc(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;let t=e.scopeName,n=this._cachedMatchRoot.get(t).find(t=>xc(e.parent,t.parentScopes));return n?new Cc(n.fontStyle,n.foreground,n.background):null}},bc=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,n){for(let r of n)t=new e(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new e(n,t[r]);return n}push(t){return new e(this,t)}getSegments(){let e=this,t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(` `)}extends(e){return this===e||this.parent!==null&&this.parent.extends(e)}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}};function xc(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],i=!1;if(r===`>`){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!Sc(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function Sc(e,t){return t===e||e.startsWith(t)&&e[t.length]===`.`}var Cc=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function wc(e){if(!e||!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let e=0,i=t.length;e<i;e++){let i=t[e];if(!i.settings)continue;let a;if(typeof i.scope==`string`){let e=i.scope;e=e.replace(/^[,]+/,``),e=e.replace(/[,]+$/,``),a=e.split(`,`)}else a=Array.isArray(i.scope)?i.scope:[``];let o=-1;if(typeof i.settings.fontStyle==`string`){o=0;let e=i.settings.fontStyle.split(` `);for(let t=0,n=e.length;t<n;t++)switch(e[t]){case`italic`:o|=1;break;case`bold`:o|=2;break;case`underline`:o|=4;break;case`strikethrough`:o|=8}}let s=null;typeof i.settings.foreground==`string`&&gc(i.settings.foreground)&&(s=i.settings.foreground);let c=null;typeof i.settings.background==`string`&&gc(i.settings.background)&&(c=i.settings.background);for(let t=0,i=a.length;t<i;t++){let i=a[t].trim().split(` `),l=i[i.length-1],u=null;i.length>1&&(u=i.slice(0,i.length-1),u.reverse()),n[r++]=new Tc(l,u,e,o,s,c)}}return n}var Tc=class{constructor(e,t,n,r,i,a){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=a}},q=(e=>(e[e.NotSet=-1]=`NotSet`,e[e.None=0]=`None`,e[e.Italic=1]=`Italic`,e[e.Bold=2]=`Bold`,e[e.Underline=4]=`Underline`,e[e.Strikethrough=8]=`Strikethrough`,e))(q||{});function Ec(e,t){e.sort((e,t)=>{let n=mc(e.scope,t.scope);return n!==0||(n=hc(e.parentScopes,t.parentScopes),n!==0)?n:e.index-t.index});let n=0,r=`#000000`,i=`#ffffff`;for(;e.length>=1&&e[0].scope===``;){let t=e.shift();t.fontStyle!==-1&&(n=t.fontStyle),t.foreground!==null&&(r=t.foreground),t.background!==null&&(i=t.background)}let a=new Dc(t),o=new Cc(n,a.getId(r),a.getId(i)),s=new Ac(new kc(0,null,-1,0,0),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];s.insert(0,n.scope,n.parentScopes,n.fontStyle,a.getId(n.foreground),a.getId(n.background))}return new yc(a,o,s)}var Dc=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},Oc=Object.freeze([]),kc=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||Oc,this.fontStyle=n,this.foreground=r,this.background=i}clone(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,r){this.scopeDepth>e?console.log(`how did this happen?`):this.scopeDepth=e,t!==-1&&(this.fontStyle=t),n!==0&&(this.foreground=n),r!==0&&(this.background=r)}},Ac=class e{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,r=0;for(;e.parentScopes[n]===`>`&&n++,t.parentScopes[r]===`>`&&r++,!(n>=e.parentScopes.length||r>=t.parentScopes.length);){let i=t.parentScopes[r].length-e.parentScopes[n].length;if(i!==0)return i;n++,r++}return t.parentScopes.length-e.parentScopes.length}match(t){if(t!==``){let e=t.indexOf(`.`),n,r;if(e===-1?(n=t,r=``):(n=t.substring(0,e),r=t.substring(e+1)),this._children.hasOwnProperty(n))return this._children[n].match(r)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(e._cmpBySpecificity),n}insert(t,n,r,i,a,o){if(n===``){this._doInsertHere(t,r,i,a,o);return}let s=n.indexOf(`.`),c,l;s===-1?(c=n,l=``):(c=n.substring(0,s),l=n.substring(s+1));let u;this._children.hasOwnProperty(c)?u=this._children[c]:(u=new e(this._mainRule.clone(),kc.cloneArr(this._rulesWithParentScopes)),this._children[c]=u),u.insert(t+1,l,r,i,a,o)}_doInsertHere(e,t,n,r,i){if(t===null){this._mainRule.acceptOverwrite(e,n,r,i);return}for(let a=0,o=this._rulesWithParentScopes.length;a<o;a++){let o=this._rulesWithParentScopes[a];if(hc(o.parentScopes,t)===0){o.acceptOverwrite(e,n,r,i);return}}n===-1&&(n=this._mainRule.fontStyle),r===0&&(r=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new kc(e,t,n,r,i))}},jc=class e{static toBinaryStr(e){return e.toString(2).padStart(32,`0`)}static print(t){let n=e.getLanguageId(t),r=e.getTokenType(t),i=e.getFontStyle(t),a=e.getForeground(t),o=e.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:a,background:o})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return!!(e&1024)}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(t,n,r,i,a,o,s){let c=e.getLanguageId(t),l=e.getTokenType(t),u=+!!e.containsBalancedBrackets(t),d=e.getFontStyle(t),f=e.getForeground(t),p=e.getBackground(t);return n!==0&&(c=n),r!==8&&(l=Nc(r)),i!==null&&(u=+!!i),a!==-1&&(d=a),o!==0&&(f=o),s!==0&&(p=s),(c<<0|l<<8|u<<10|d<<11|f<<15|p<<24)>>>0}};function Mc(e){return e}function Nc(e){return e}function Pc(e,t){let n=[],r=Ic(e),i=r.next();for(;i!==null;){let e=0;if(i.length===2&&i.charAt(1)===`:`){switch(i.charAt(0)){case`R`:e=1;break;case`L`:e=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let t=o();if(n.push({matcher:t,priority:e}),i!==`,`)break;i=r.next()}return n;function a(){if(i===`-`){i=r.next();let e=a();return t=>!!e&&!e(t)}if(i===`(`){i=r.next();let e=s();return i===`)`&&(i=r.next()),e}if(Fc(i)){let e=[];do e.push(i),i=r.next();while(Fc(i));return n=>t(e,n)}return null}function o(){let e=[],t=a();for(;t;)e.push(t),t=a();return t=>e.every(e=>e(t))}function s(){let e=[],t=o();for(;t&&(e.push(t),i===`|`||i===`,`);){do i=r.next();while(i===`|`||i===`,`);t=o()}return t=>e.some(e=>e(t))}}function Fc(e){return!!e&&!!e.match(/[\w\.:]+/)}function Ic(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;let r=n[0];return n=t.exec(e),r}}}function Lc(e){typeof e.dispose==`function`&&e.dispose()}var Rc=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},zc=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},Bc=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){let t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},Vc=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Rc(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new Bc;for(let n of e)Hc(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof Rc){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName)||this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};function Hc(e,t,n,r){let i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw Error(`No grammar provided for <${t}>`);return}let a=n.lookup(t);e instanceof Rc?Wc({baseGrammar:a,selfGrammar:i},r):Uc(e.ruleName,{baseGrammar:a,selfGrammar:i,repository:i.repository},r);let o=n.injections(e.scopeName);if(o)for(let e of o)r.add(new Rc(e))}function Uc(e,t,n){if(t.repository&&t.repository[e]){let r=t.repository[e];Gc([r],t,n)}}function Wc(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&Gc(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&Gc(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function Gc(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?uc({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&Gc(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let a=Zc(i);switch(a.kind){case 0:Wc({...t,selfGrammar:t.baseGrammar},n);break;case 1:Wc(t,n);break;case 2:Uc(a.ruleName,{...t,repository:e},n);break;case 3:case 4:let r=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(r){let i={baseGrammar:t.baseGrammar,selfGrammar:r,repository:e};a.kind===4?Uc(a.ruleName,i,n):Wc(i,n)}else a.kind===4?n.add(new zc(a.scopeName,a.ruleName)):n.add(new Rc(a.scopeName))}}}var Kc=class{kind=0},qc=class{kind=1},Jc=class{constructor(e){this.ruleName=e}kind=2},Yc=class{constructor(e){this.scopeName=e}kind=3},Xc=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function Zc(e){if(e===`$base`)return new Kc;if(e===`$self`)return new qc;let t=e.indexOf(`#`);return t===-1?new Yc(e):t===0?new Jc(e.substring(1)):new Xc(e.substring(0,t),e.substring(t+1))}var Qc=/\\(\d+)/,$c=/\\(\d+)/g,el=-1,tl=-2;function nl(e){return e}function rl(e){return e}var il=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=pc.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=pc.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${dc(this.$location.filename)}:${this.$location.line}`:`unknown`;return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:pc.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:pc.replaceCaptures(this._contentName,e,t)}},al=class extends il{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw Error(`Not supported!`)}compile(e,t){throw Error(`Not supported!`)}compileAG(e,t,n,r){throw Error(`Not supported!`)}},ol=class extends il{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new dl(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new fl,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},sl=class extends il{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}collectPatterns(e,t){for(let n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new fl,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},cl=class extends il{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,a,o,s,c,l){super(e,t,n,r),this._begin=new dl(i,this.id),this.beginCaptures=a,this._end=new dl(o||`￿`,-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=s,this.applyEndPatternLast=c||!1,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new fl;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},ll=class extends il{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,a,o,s,c){super(e,t,n,r),this._begin=new dl(i,this.id),this.beginCaptures=a,this.whileCaptures=s,this._while=new dl(o,tl),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null),this._cachedCompiledWhilePatterns&&=(this._cachedCompiledWhilePatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new fl;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new fl,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||`￿`),this._cachedCompiledWhilePatterns}},ul=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new al(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new ol(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(t.begin===void 0){t.repository&&(r=uc({},r,t.repository));let i=t.patterns;return i===void 0&&t.include&&(i=[{include:t.include}]),new sl(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new ll(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,e._compileCaptures(t.whileCaptures||t.captures,n,r),e._compilePatterns(t.patterns,n,r)):new cl(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,e._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,e._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let a=0;for(let e in t){if(e===`$vscodeTextmateLocation`)continue;let t=parseInt(e,10);t>a&&(a=t)}for(let e=0;e<=a;e++)i[e]=null;for(let a in t){if(a===`$vscodeTextmateLocation`)continue;let o=parseInt(a,10),s=0;t[a].patterns&&(s=e.getCompiledRuleId(t[a],n,r)),i[o]=e.createCaptureRule(n,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,s)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let a=0,o=t.length;a<o;a++){let o=t[a],s=-1;if(o.include){let t=Zc(o.include);switch(t.kind){case 0:case 1:s=e.getCompiledRuleId(r[o.include],n,r);break;case 2:let i=r[t.ruleName];i&&(s=e.getCompiledRuleId(i,n,r));break;case 3:case 4:let a=t.scopeName,c=t.kind===4?t.ruleName:null,l=n.getExternalGrammar(a,r);if(l){if(c){let t=l.repository[c];t&&(s=e.getCompiledRuleId(t,n,l.repository))}else s=e.getCompiledRuleId(l.repository.$self,n,l.repository)}}}else s=e.getCompiledRuleId(o,n,r);if(s!==-1){let e=n.getRule(s),t=!1;if((e instanceof sl||e instanceof cl||e instanceof ll)&&e.hasMissingPatterns&&e.patterns.length===0&&(t=!0),t)continue;i.push(s)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},dl=class e{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&typeof e==`string`){let t=e.length,n=0,r=[],i=!1;for(let a=0;a<t;a++)if(e.charAt(a)===`\\`&&a+1<t){let t=e.charAt(a+1);t===`z`?(r.push(e.substring(n,a)),r.push(`$(?!\\n)(?<!\\n)`),n=a+2):(t===`A`||t===`G`)&&(i=!0),a++}this.hasAnchor=i,n===0?this.source=e:(r.push(e.substring(n,t)),this.source=r.join(``))}else this.hasAnchor=!1,this.source=e;this._anchorCache=this.hasAnchor?this._buildAnchorCache():null,this.ruleId=t,this.hasBackReferences=typeof this.source==`string`&&Qc.test(this.source)}clone(){return new e(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let n=t.map(t=>e.substring(t.start,t.end));return $c.lastIndex=0,this.source.replace($c,(e,t)=>_c(n[parseInt(t,10)]||``))}_buildAnchorCache(){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let e=[],t=[],n=[],r=[],i,a,o,s;for(i=0,a=this.source.length;i<a;i++)o=this.source.charAt(i),e[i]=o,t[i]=o,n[i]=o,r[i]=o,o===`\\`&&i+1<a&&(s=this.source.charAt(i+1),s===`A`?(e[i+1]=`￿`,t[i+1]=`￿`,n[i+1]=`A`,r[i+1]=`A`):s===`G`?(e[i+1]=`￿`,t[i+1]=`G`,n[i+1]=`￿`,r[i+1]=`G`):(e[i+1]=s,t[i+1]=s,n[i+1]=s,r[i+1]=s),i++);return{A0_G0:e.join(``),A0_G1:t.join(``),A1_G0:n.join(``),A1_G1:r.join(``)}}resolveAnchors(e,t){return!this.hasAnchor||!this._anchorCache||typeof this.source!=`string`?this.source:e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},fl=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&=(this._cached.dispose(),null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(e=>e.source);this._cached=new pl(e,t,this._items.map(e=>e.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){return new pl(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},pl=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose==`function`&&this.scanner.dispose()}toString(){let e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(` - `+this.rules[t]+`: `+this.regExps[t]);return e.join(`
35
- `)}findNextMatchSync(e,t,n){let r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},ml=class{constructor(e,t){this.languageId=e,this.tokenType=t}},hl=class e{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,t){this._defaultAttributes=new ml(e,8),this._embeddedLanguagesMatcher=new gl(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?e._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new ml(0,0);_getBasicScopeAttributes=new vc(e=>new ml(this._scopeToLanguage(e),this._toStandardTokenType(e)));_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(t){let n=t.match(e.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case`comment`:return 1;case`string`:return 2;case`regex`:return 3;case`meta.embedded`:return 0}throw Error(`Unexpected match for standard token type!`)}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},gl=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);let t=e.map(([e,t])=>_c(e));t.sort(),t.reverse(),this.scopesRegExp=RegExp(`^((${t.join(`)|(`)}))($|\\.)`,``)}}match(e){if(!this.scopesRegExp)return;let t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}};typeof process<`u`&&{}.VSCODE_TEXTMATE_DEBUG;var _l=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function vl(e,t,n,r,i,a,o,s){let c=t.content.length,l=!1,u=-1;if(o){let o=yl(e,t,n,r,i,a);i=o.stack,r=o.linePos,n=o.isFirstLine,u=o.anchorPosition}let d=Date.now();for(;!l;){if(s!==0&&Date.now()-d>s)return new _l(i,!0);f()}return new _l(i,!1);function f(){let o=bl(e,t,n,r,i,u);if(!o){a.produce(i,c),l=!0;return}let s=o.captureIndices,d=o.matchedRuleId,f=s&&s.length>0?s[0].end>r:!1;if(d===el){let o=i.getRule(e);a.produce(i,s[0].start),i=i.withContentNameScopesList(i.nameScopesList),Tl(e,t,n,i,a,o.endCaptures,s),a.produce(i,s[0].end);let d=i;if(i=i.parent,u=d.getAnchorPos(),!f&&d.getEnterPos()===r){i=d,a.produce(i,c),l=!0;return}}else{let o=e.getRule(d);a.produce(i,s[0].start);let p=i,m=o.getName(t.content,s),h=i.contentNameScopesList.pushAttributed(m,e);if(i=i.push(d,r,u,s[0].end===c,null,h,h),o instanceof cl){let r=o;Tl(e,t,n,i,a,r.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let d=r.getContentName(t.content,s),m=h.pushAttributed(d,e);if(i=i.withContentNameScopesList(m),r.endHasBackReferences&&(i=i.withEndRule(r.getEndWithResolvedBackReferences(t.content,s))),!f&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),l=!0;return}}else if(o instanceof ll){let r=o;Tl(e,t,n,i,a,r.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let d=r.getContentName(t.content,s),m=h.pushAttributed(d,e);if(i=i.withContentNameScopesList(m),r.whileHasBackReferences&&(i=i.withEndRule(r.getWhileWithResolvedBackReferences(t.content,s))),!f&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),l=!0;return}}else if(Tl(e,t,n,i,a,o.captures,s),a.produce(i,s[0].end),i=i.pop(),!f){i=i.safePop(),a.produce(i,c),l=!0;return}}s[0].end>r&&(r=s[0].end,n=!1)}}function yl(e,t,n,r,i,a){let o=i.beginRuleCapturedEOL?0:-1,s=[];for(let t=i;t;t=t.pop()){let n=t.getRule(e);n instanceof ll&&s.push({rule:n,stack:t})}for(let c=s.pop();c;c=s.pop()){let{ruleScanner:s,findOptions:l}=wl(c.rule,e,c.stack.endRule,n,r===o),u=s.findNextMatchSync(t,r,l);if(u){if(u.ruleId!==tl){i=c.stack.pop();break}u.captureIndices&&u.captureIndices.length&&(a.produce(c.stack,u.captureIndices[0].start),Tl(e,t,n,c.stack,a,c.rule.whileCaptures,u.captureIndices),a.produce(c.stack,u.captureIndices[0].end),o=u.captureIndices[0].end,u.captureIndices[0].end>r&&(r=u.captureIndices[0].end,n=!1))}else{i=c.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:o,isFirstLine:n}}function bl(e,t,n,r,i,a){let o=xl(e,t,n,r,i,a),s=e.getInjections();if(s.length===0)return o;let c=Sl(s,e,t,n,r,i,a);if(!c)return o;if(!o)return c;let l=o.captureIndices[0].start,u=c.captureIndices[0].start;return u<l||c.priorityMatch&&u===l?c:o}function xl(e,t,n,r,i,a){let{ruleScanner:o,findOptions:s}=Cl(i.getRule(e),e,i.endRule,n,r===a),c=o.findNextMatchSync(t,r,s);return c?{captureIndices:c.captureIndices,matchedRuleId:c.ruleId}:null}function Sl(e,t,n,r,i,a,o){let s=Number.MAX_VALUE,c=null,l,u=0,d=a.contentNameScopesList.getScopeNames();for(let a=0,f=e.length;a<f;a++){let f=e[a];if(!f.matcher(d))continue;let{ruleScanner:p,findOptions:m}=Cl(t.getRule(f.ruleId),t,null,r,i===o),h=p.findNextMatchSync(n,i,m);if(!h)continue;let g=h.captureIndices[0].start;if(!(g>=s)&&(s=g,c=h.captureIndices,l=h.ruleId,u=f.priority,s===i))break}return c?{priorityMatch:u===-1,captureIndices:c,matchedRuleId:l}:null}function Cl(e,t,n,r,i){return{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function wl(e,t,n,r,i){return{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function Tl(e,t,n,r,i,a,o){if(a.length===0)return;let s=t.content,c=Math.min(a.length,o.length),l=[],u=o[0].end;for(let t=0;t<c;t++){let c=a[t];if(c===null)continue;let d=o[t];if(d.length===0)continue;if(d.start>u)break;for(;l.length>0&&l[l.length-1].endPos<=d.start;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop();if(l.length>0?i.produceFromScopes(l[l.length-1].scopes,d.start):i.produce(r,d.start),c.retokenizeCapturedWithRuleId){let t=c.getName(s,o),a=r.contentNameScopesList.pushAttributed(t,e),l=c.getContentName(s,o),u=a.pushAttributed(l,e),f=r.push(c.retokenizeCapturedWithRuleId,d.start,-1,!1,null,a,u),p=e.createOnigString(s.substring(0,d.end));vl(e,p,n&&d.start===0,d.start,f,i,!1,0),Lc(p);continue}let f=c.getName(s,o);if(f!==null){let t=(l.length>0?l[l.length-1].scopes:r.contentNameScopesList).pushAttributed(f,e);l.push(new El(t,d.end))}}for(;l.length>0;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop()}var El=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function Dl(e,t,n,r,i,a,o,s){return new jl(e,t,n,r,i,a,o,s)}function Ol(e,t,n,r,i){let a=Pc(t,kl),o=ul.getCompiledRuleId(n,r,i.repository);for(let n of a)e.push({debugSelector:t,matcher:n.matcher,ruleId:o,grammar:i,priority:n.priority})}function kl(e,t){if(t.length<e.length)return!1;let n=0;return e.every(e=>{for(let r=n;r<t.length;r++)if(Al(t[r],e))return n=r+1,!0;return!1})}function Al(e,t){if(!e)return!1;if(e===t)return!0;let n=t.length;return e.length>n&&e.substr(0,n)===t&&e[n]===`.`}var jl=class{constructor(e,t,n,r,i,a,o,s){if(this._rootScopeName=e,this.balancedBracketSelectors=a,this._onigLib=s,this._basicScopeAttributesProvider=new hl(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=Ml(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(let e of Object.keys(i)){let t=Pc(e,kl);for(let n of t)this._tokenTypeMatchers.push({matcher:n.matcher,type:i[e]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(let e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){let e={lookup:e=>e===this._rootScopeName?this._grammar:this.getExternalGrammar(e),injections:e=>this._grammarRepository.injections(e)},t=[],n=this._rootScopeName,r=e.lookup(n);if(r){let e=r.injections;if(e)for(let n in e)Ol(t,n,e[n],this,r);let i=this._grammarRepository.injections(n);i&&i.forEach(e=>{let n=this.getExternalGrammar(e);if(n){let e=n.injectionSelector;e&&Ol(t,e,n,this,n)}})}return t.sort((e,t)=>e.priority-t.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){let t=++this._lastRuleId,n=e(nl(t));return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[rl(e)]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){let n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=Ml(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){let r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){let r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){this._rootId===-1&&(this._rootId=ul.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===Pl.NULL){i=!0;let e=this._basicScopeAttributesProvider.getDefaultAttributes(),n=this.themeProvider.getDefaults(),r=jc.set(0,e.languageId,e.tokenType,null,n.fontStyle,n.foregroundId,n.backgroundId),a=this.getRule(this._rootId).getName(null,null),o;o=a?Nl.createRootAndLookUpScopeName(a,r,this):Nl.createRoot(`unknown`,r),t=new Pl(null,this._rootId,-1,-1,!1,null,o,o)}else i=!1,t.reset();e+=`
36
- `;let a=this.createOnigString(e),o=a.content.length,s=new Il(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),c=vl(this,a,i,0,t,s,!0,r);return Lc(a),{lineLength:o,lineTokens:s,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function Ml(e,t){return e=oc(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var Nl=class e{constructor(e,t,n){this.parent=e,this.scopePath=t,this.tokenAttributes=n}static fromExtension(t,n){let r=t,i=t?.scopePath??null;for(let t of n)i=bc.push(i,t.scopeNames),r=new e(r,i,t.encodedTokenAttributes);return r}static createRoot(t,n){return new e(null,new bc(null,t),n)}static createRootAndLookUpScopeName(t,n,r){let i=r.getMetadataForScope(t),a=new bc(null,t),o=r.themeProvider.themeMatch(a),s=e.mergeAttributes(n,i,o);return new e(null,a,s)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(` `)}equals(t){return e.equals(this,t)}static equals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}while(!0)}static mergeAttributes(e,t,n){let r=-1,i=0,a=0;return n!==null&&(r=n.fontStyle,i=n.foregroundId,a=n.backgroundId),jc.set(e,t.languageId,t.tokenType,null,r,i,a)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(` `)===-1)return e._pushAttributed(this,t,n);let r=t.split(/ /g),i=this;for(let t of r)i=e._pushAttributed(i,t,n);return i}static _pushAttributed(t,n,r){let i=r.getMetadataForScope(n),a=t.scopePath.push(n),o=r.themeProvider.themeMatch(a),s=e.mergeAttributes(t.tokenAttributes,i,o);return new e(t,a,s)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(n.parent?.scopePath??null)}),n=n.parent;return n===e?t.reverse():void 0}},Pl=class e{constructor(e,t,n,r,i,a,o,s){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=i,this.endRule=a,this.nameScopesList=o,this.contentNameScopesList=s,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=r}_stackElementBrand=void 0;static NULL=new e(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t!==null&&e._equals(this,t)}static _equals(e,t){return e===t?!0:this._structuralEquals(e,t)?Nl.equals(e.contentNameScopesList,t.contentNameScopesList):!1}static _structuralEquals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}while(!0)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){e._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,i,a,o,s){return new e(this,t,n,r,i,a,o,s)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){let e=[];return this._writeString(e,0),`[`+e.join(`,`)+`]`}_writeString(e,t){return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(t){return this.endRule===t?this:new e(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){return{ruleId:rl(this.ruleId),beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){let r=Nl.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new e(t,nl(n.ruleId),n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,Nl.fromExtension(r,n.contentNameScopesList))}},Fl=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(e=>e===`*`?(this.allowAny=!0,[]):Pc(e,kl).map(e=>e.matcher)),this.unbalancedBracketScopes=t.flatMap(e=>Pc(e,kl).map(e=>e.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(let t of this.unbalancedBracketScopes)if(t(e))return!1;for(let t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},Il=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let n=e?.tokenAttributes??0,r=!1;if(this.balancedBracketSelectors?.matchesAlways&&(r=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){let t=e?.getScopeNames()??[];for(let e of this._tokenTypeOverrides)e.matcher(t)&&(n=jc.set(n,0,Mc(e.type),null,-1,0,0));this.balancedBracketSelectors&&(r=this.balancedBracketSelectors.match(t))}if(r&&(n=jc.set(n,0,8,r,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),this._lastTokenEndIndex=t;return}let n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);let n=new Uint32Array(this._binaryTokens.length);for(let e=0,t=this._binaryTokens.length;e<t;e++)n[e]=this._binaryTokens[e];return n}},Ll=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(let e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,i){if(!this._grammars.has(e)){let a=this._rawGrammars.get(e);if(!a)return null;this._grammars.set(e,Dl(e,a,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},Rl=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new Ll(yc.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(yc.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes,new Fl(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,r,i){let a=new Vc(this._syncRegistry,e);for(;a.Q.length>0;)a.Q.map(e=>this._loadSingleGrammar(e.scopeName)),a.processQueue();return this._grammarForScopeName(e,t,n,r,i)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){let t=this._options.loadGrammar(e);if(t){let n=typeof this._options.getInjections==`function`?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}addGrammar(e,t=[],n=0,r=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,n,r)}_grammarForScopeName(e,t=0,n=null,r=null,i=null){return this._syncRegistry.grammarForScopeName(e,t,n,r,i)}},zl=Pl.NULL;function Bl(e,t){let n=typeof e==`string`?{}:{...e.colorReplacements},r=typeof e==`string`?e:e.name;for(let[e,i]of Object.entries(t?.colorReplacements||{}))typeof i==`string`?n[e]=i:e===r&&Object.assign(n,i);return n}function Vl(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function Hl(e){return Array.isArray(e)?e:[e]}async function Ul(e){return Promise.resolve(typeof e==`function`?e():e).then(e=>e.default||e)}function Wl(e){return!e||[`plaintext`,`txt`,`text`,`plain`].includes(e)}function Gl(e){return e===`ansi`||Wl(e)}function Kl(e){return e===`none`}function ql(e){return Kl(e)}var Jl=/(\r?\n)/g;function Yl(e,t=!1){if(e.length===0)return[[``,0]];let n=e.split(Jl),r=0,i=[];for(let e=0;e<n.length;e+=2){let a=t?n[e]+(n[e+1]||``):n[e];i.push([a,r]),r+=n[e].length,r+=n[e+1]?.length||0}return i}var Xl={light:`#333333`,dark:`#bbbbbb`},Zl={light:`#fffffe`,dark:`#1e1e1e`},Ql=`__shiki_resolved`;function $l(e){if(e?.[Ql])return e;let t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||=`dark`,t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:r}=t;if(!n||!r){let e=t.settings?t.settings.find(e=>!e.name&&!e.scope):void 0;e?.settings?.foreground&&(r=e.settings.foreground),e?.settings?.background&&(n=e.settings.background),!r&&t?.colors?.[`editor.foreground`]&&(r=t.colors[`editor.foreground`]),!n&&t?.colors?.[`editor.background`]&&(n=t.colors[`editor.background`]),r||=t.type===`light`?Xl.light:Xl.dark,n||=t.type===`light`?Zl.light:Zl.dark,t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let i=0,a=new Map;function o(e){if(a.has(e))return a.get(e);i+=1;let n=`#${i.toString(16).padStart(8,`0`).toLowerCase()}`;return t.colorReplacements?.[`#${n}`]?o(e):(a.set(e,n),n)}t.settings=t.settings.map(e=>{let n=e.settings?.foreground&&!e.settings.foreground.startsWith(`#`),r=e.settings?.background&&!e.settings.background.startsWith(`#`);if(!n&&!r)return e;let i={...e,settings:{...e.settings}};if(n){let n=o(e.settings.foreground);t.colorReplacements[n]=e.settings.foreground,i.settings.foreground=n}if(r){let n=o(e.settings.background);t.colorReplacements[n]=e.settings.background,i.settings.background=n}return i});for(let e of Object.keys(t.colors||{}))if((e===`editor.foreground`||e===`editor.background`||e.startsWith(`terminal.ansi`))&&!t.colors[e]?.startsWith(`#`)){let n=o(t.colors[e]);t.colorReplacements[n]=t.colors[e],t.colors[e]=n}return Object.defineProperty(t,Ql,{enumerable:!1,writable:!1,value:!0}),t}async function eu(e){return[...new Set((await Promise.all(e.filter(e=>!Gl(e)).map(async e=>await Ul(e).then(e=>Array.isArray(e)?e:[e])))).flat())]}async function tu(e){return(await Promise.all(e.map(async e=>ql(e)?null:$l(await Ul(e))))).filter(e=>!!e)}function nu(e,t){if(!t)return e;if(t[e]){let n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new K(`Circular alias \`${[...n].join(` -> `)} -> ${e}\``);n.add(e)}}return e}var ru=class extends Rl{_resolver;_themes;_langs;_alias;_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(e,t,n,r={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=r,this._themes.map(e=>this.loadTheme(e)),this.loadLanguages(this._langs)}getTheme(e){return typeof e==`string`?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){let t=$l(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||=[...this._resolvedThemes.keys()],this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=yc.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=nu(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;let t=new Set([...this._langMap.values()].filter(t=>t.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);let n={balancedBracketSelectors:e.balancedBracketSelectors||[`*`],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);let r=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(r.name=e.name,this._resolvedGrammars.set(e.name,r),e.aliases&&e.aliases.forEach(t=>{this._alias[t]=e.name}),this._loadedLanguagesCache=null,t.size)for(let e of t)this._resolvedGrammars.delete(e.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(e.scopeName),this._syncRegistry?._grammars?.delete(e.scopeName),this.loadLanguage(this._langMap.get(e.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(let t of e)this.resolveEmbeddedLanguages(t);let t=[...this._langGraph.entries()],n=t.filter(([e,t])=>!t);if(n.length){let e=t.filter(([e,t])=>t?(t.embeddedLanguages||t.embeddedLangs)?.some(e=>n.map(([e])=>e).includes(e)):!1).filter(e=>!n.includes(e));throw new K(`Missing languages ${n.map(([e])=>`\`${e}\``).join(`, `)}, required by ${e.map(([e])=>`\`${e}\``).join(`, `)}`)}for(let[e,n]of t)this._resolver.addLanguage(n);for(let[e,n]of t)this.loadLanguage(n)}getLoadedLanguages(){return this._loadedLanguagesCache||=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])],this._loadedLanguagesCache}resolveEmbeddedLanguages(e){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);let t=e.embeddedLanguages??e.embeddedLangs;if(t)for(let e of t)this._langGraph.set(e,this._langMap.get(e))}},iu=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:t=>e.createScanner(t),createOnigString:t=>e.createString(t)},t.forEach(e=>this.addLanguage(e))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){let t=e.split(`.`),n=[];for(let e=1;e<=t.length;e++){let r=t.slice(0,e).join(`.`);n=[...n,...this._injections.get(r)||[]]}return n}},au=0;function ou(e){au+=1,e.warnings!==!1&&au>=10&&au%10==0&&console.warn(`[Shiki] ${au} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new K("`engine` option is required for synchronous mode");let n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map($l),i=new ru(new iu(e.engine,n),r,n,e.langAlias),a;function o(t){return nu(t,e.langAlias)}function s(e){g();let t=i.getGrammar(typeof e==`string`?e:e.name);if(!t)throw new K(`Language \`${e}\` not found, you may need to load it first`);return t}function c(e){if(e===`none`)return{bg:``,fg:``,name:`none`,settings:[],type:`dark`};g();let t=i.getTheme(e);if(!t)throw new K(`Theme \`${e}\` not found, you may need to load it first`);return t}function l(e){g();let t=c(e);return a!==e&&(i.setTheme(t),a=e),{theme:t,colorMap:i.getColorMap()}}function u(){return g(),i.getLoadedThemes()}function d(){return g(),i.getLoadedLanguages()}function f(...e){g(),i.loadLanguages(e.flat(1))}async function p(...e){return f(await eu(e))}function m(...e){g();for(let t of e.flat(1))i.loadTheme(t)}async function h(...e){return g(),m(await tu(e))}function g(){if(t)throw new K(`Shiki instance has been disposed`)}function _(){t||(t=!0,i.dispose(),--au)}return{setTheme:l,getTheme:c,getLanguage:s,getLoadedThemes:u,getLoadedLanguages:d,resolveLangAlias:o,loadLanguage:p,loadLanguageSync:f,loadTheme:h,loadThemeSync:m,dispose:_,[Symbol.dispose]:_}}async function su(e){e.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,n,r]=await Promise.all([tu(e.themes||[]),eu(e.langs||[]),e.engine]);return ou({...e,themes:t,langs:n,engine:r})}var cu=new WeakMap;function lu(e,t){cu.set(e,t)}function uu(e){return cu.get(e)}var du=class e{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new e(Object.fromEntries(Hl(n).map(e=>[e,zl])),t)}constructor(...e){if(e.length===2){let[t,n]=e;this.lang=n,this._stacks=t}else{let[t,n,r]=e;this.lang=n,this._stacks={[r]:t}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return fu(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function fu(e){let t=[],n=new Set;function r(e){if(n.has(e))return;n.add(e);let i=e?.nameScopesList?.scopeName;i&&t.push(i),e.parent&&r(e.parent)}return r(e),t}function pu(e,t){if(!(e instanceof du))throw new K(`Invalid grammar state`);return e.getInternalStack(t)}var mu=/,/,hu=/ /;function gu(e,t,n={}){let{theme:r=e.getLoadedThemes()[0]}=n;if(Wl(e.resolveLangAlias(n.lang||`text`))||Kl(r))return Yl(t).map(e=>[{content:e[0],offset:e[1]}]);let{theme:i,colorMap:a}=e.setTheme(r),o=e.getLanguage(n.lang||`text`);if(n.grammarState){if(n.grammarState.lang!==o.name)throw new K(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${o.name}"`);if(!n.grammarState.themes.includes(i.name))throw new K(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${i.name}"`)}return vu(t,o,i,a,n)}function _u(...e){if(e.length===2)return uu(e[1]);let[t,n,r={}]=e,{lang:i=`text`,theme:a=t.getLoadedThemes()[0]}=r;if(Wl(i)||Kl(a))throw new K(`Plain language does not have grammar state`);if(i===`ansi`)throw new K(`ANSI language does not have grammar state`);let{theme:o,colorMap:s}=t.setTheme(a),c=t.getLanguage(i);return new du(yu(n,c,o,s,r).stateStack,c.name,o.name)}function vu(e,t,n,r,i){let a=yu(e,t,n,r,i),o=new du(a.stateStack,t.name,n.name);return lu(a.tokens,o),a.tokens}function yu(e,t,n,r,i){let a=Bl(n,i),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:s=500,includeExplanation:c=!1}=i,l=Yl(e),u=i.grammarState?pu(i.grammarState,n.name)??zl:i.grammarContextCode==null?zl:yu(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack,d=[],f=[];for(let e=0,i=l.length;e<i;e++){let[i,p]=l[e];if(i===``){d=[],f.push([]);continue}if(o>0&&i.length>=o){d=[],f.push([{content:i,offset:p,color:``,fontStyle:0}]);continue}let m,h,g;c&&c!==`tokenType`&&(m=t.tokenizeLine(i,u,s),h=m.tokens,g=0);let _=t.tokenizeLine2(i,u,s),v=_.tokens.length/2;for(let e=0;e<v;e++){let t=_.tokens[2*e],o=e+1<v?_.tokens[2*e+2]:i.length;if(t===o)continue;let s=_.tokens[2*e+1],l=Vl(r[jc.getForeground(s)],a),u=jc.getFontStyle(s),f={content:i.substring(t,o),offset:p+t,color:l,fontStyle:u};if(c===`tokenType`)f.type=jc.getTokenType(s);else if(c){let e=[];if(c!==`scopeName`)for(let t of n.settings){let n;switch(typeof t.scope){case`string`:n=t.scope.split(mu).map(e=>e.trim());break;case`object`:n=t.scope;break;default:continue}e.push({settings:t,selectors:n.map(e=>e.split(hu))})}f.explanation=[];let r=0;for(;t+r<o;){let t=h[g],n=i.substring(t.startIndex,t.endIndex);r+=n.length,f.explanation.push({content:n,scopes:c===`scopeName`?bu(t.scopes):xu(e,t.scopes)}),g+=1}}d.push(f)}f.push(d),d=[],u=_.ruleStack}return{tokens:f,stateStack:u}}function bu(e){return e.map(e=>({scopeName:e}))}function xu(e,t){let n=[];for(let r=0,i=t.length;r<i;r++){let i=t[r];n[r]={scopeName:i,themeMatches:wu(e,i,t.slice(0,r))}}return n}function Su(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]===`.`}function Cu(e,t,n){if(!Su(e.at(-1),t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)Su(e[r],n[i])&&--r,--i;return r===-1}function wu(e,t,n){let r=[];for(let{selectors:i,settings:a}of e)for(let e of i)if(Cu(e,t,n)){r.push(a);break}return r}function Tu(e,t,n,r=gu){let i=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})),a=i.map(i=>{let a=r(e,t,{...n,theme:i.theme});return{tokens:a,state:uu(a),theme:typeof i.theme==`string`?i.theme:i.theme.name}}),o=Eu(...a.map(e=>e.tokens)),s=o[0].map((e,t)=>e.map((e,r)=>{let a={content:e.content,variants:{},offset:e.offset};return`includeExplanation`in n&&n.includeExplanation&&(a.explanation=e.explanation),o.forEach((e,n)=>{let{content:o,explanation:s,offset:c,...l}=e[t][r];a.variants[i[n].color]=l}),a})),c=a[0].state?new du(Object.fromEntries(a.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),a[0].state.lang):void 0;return c&&lu(s,c),s}function Eu(...e){let t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){let i=e.map(e=>e[r]),a=t.map(()=>[]);t.forEach((e,t)=>e.push(a[t]));let o=i.map(()=>0),s=i.map(e=>e[0]);for(;s.every(e=>e);){let e=Math.min(...s.map(e=>e.content.length));for(let t=0;t<n;t++){let n=s[t];n.content.length===e?(a[t].push(n),o[t]+=1,s[t]=i[t][o[t]]):(a[t].push({...n,content:n.content.slice(0,e)}),s[t]={...n,content:n.content.slice(e),offset:n.offset+e})}}}return t}var Du=/\s+/g;function Ou(e,t){if(!t)return e;e.properties||={},e.properties.class||=[],typeof e.properties.class==`string`&&(e.properties.class=e.properties.class.split(Du)),Array.isArray(e.properties.class)||(e.properties.class=[]);let n=Array.isArray(t)?t:t.split(Du);for(let t of n)t&&!e.properties.class.includes(t)&&e.properties.class.push(t);return e}var ku=/:?lang=["']([^"']+)["']/g,Au=/(?:```|~~~)([\w-]+)/g,ju=/\\begin\{([\w-]+)\}/g,Mu=/<script\s+(?:type|lang)=["']([^"']+)["']/gi,Nu=/^\s*---\r?\n[\s\S]*?\r?\n---(?:\r?\n|\s*$)/;function Pu(e){let t=Yl(e,!0).map(([e])=>e);function n(n){if(n===e.length)return{line:t.length-1,character:t.at(-1).length};let r=n,i=0;for(let e of t){if(r<e.length)break;r-=e.length,i++}return{line:i,character:r}}function r(e,n){let r=0;for(let n=0;n<e;n++)r+=t[n].length;return r+=n,r}return{lines:t,indexToPos:n,posToIndex:r}}function Fu(e,t,n){let r=new Set;for(let t of e.matchAll(ku)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(Au)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(ju)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(Mu)){let e=t[1].toLowerCase().trim(),n=e.includes(`/`)?e.split(`/`).pop():e;n&&r.add(n)}if(Nu.test(e)&&r.add(`yaml`),!n)return[...r];let i=n.getBundledLanguages();return[...r].filter(e=>e&&i[e])}var Iu=[`color`,`background-color`];function Lu(e,t){let n=0,r=[];for(let i of t)i>n&&r.push({...e,content:e.content.slice(n,i),offset:e.offset+n}),n=i;return n<e.content.length&&r.push({...e,content:e.content.slice(n),offset:e.offset+n}),r}function Ru(e,t){let n=0,r=e.length;for(;n<r;){let i=n+(r-n>>1);e[i]<=t?n=i+1:r=i}return n}function zu(e,t){let n=[...t instanceof Set?t:new Set(t)].sort((e,t)=>e-t);return n.length?e.map(e=>e.flatMap(e=>{let t=e.offset+e.content.length,r=Ru(n,e.offset),i=r;for(;i<n.length&&n[i]<t;)i++;if(r===i)return e;let a=n.slice(r,i);for(let t=0;t<a.length;t++)a[t]-=e.offset;return Lu(e,a)})):e}function Bu(e,t,n,r,i=`css-vars`){let a={content:e.content,explanation:e.explanation,offset:e.offset},o=t.map(t=>Vu(e.variants[t])),s=new Set(o.flatMap(e=>Object.keys(e))),c={},l=(e,r)=>{let i=r===`color`?``:r===`background-color`?`-bg`:`-${r}`;return n+t[e]+(r===`color`?``:i)};return o.forEach((e,n)=>{for(let a of s){let s=e[a]||`inherit`;if(n===0&&r&&Iu.includes(a)){if(r===`light-dark()`&&o.length>1){let e=t.findIndex(e=>e===`light`),r=t.findIndex(e=>e===`dark`);if(e===-1||r===-1)throw new K('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');let u=o[e][a]||`inherit`,d=o[r][a]||`inherit`;c[a]=`light-dark(${u}, ${d})`,i===`css-vars`&&(c[l(n,a)]=s)}else c[a]=s}else i===`css-vars`&&(c[l(n,a)]=s)}}),a.htmlStyle=c,a}function Vu(e){let t={};if(e.color&&(t.color=e.color),e.bgColor&&(t[`background-color`]=e.bgColor),e.fontStyle){e.fontStyle&q.Italic&&(t[`font-style`]=`italic`),e.fontStyle&q.Bold&&(t[`font-weight`]=`bold`);let n=[];e.fontStyle&q.Underline&&n.push(`underline`),e.fontStyle&q.Strikethrough&&n.push(`line-through`),n.length&&(t[`text-decoration`]=n.join(` `))}return t}function Hu(e){return typeof e==`string`?e:Object.entries(e).map(([e,t])=>`${e}:${t}`).join(`;`)}function Uu(){let e=new WeakMap;function t(t){if(!e.has(t.meta)){let n=Pu(t.source);function r(e){if(typeof e==`number`){if(e<0||e>t.source.length)throw new K(`Invalid decoration offset: ${e}. Code length: ${t.source.length}`);return{...n.indexToPos(e),offset:e}}{let t=n.lines[e.line];if(t===void 0)throw new K(`Invalid decoration position ${JSON.stringify(e)}. Lines length: ${n.lines.length}`);let r=e.character;if(r<0&&(r=t.length+r),r<0||r>t.length)throw new K(`Invalid decoration position ${JSON.stringify(e)}. Line ${e.line} length: ${t.length}`);return{...e,character:r,offset:n.posToIndex(e.line,r)}}}let i=(t.options.decorations||[]).map(e=>({...e,start:r(e.start),end:r(e.end)}));Wu(i),e.set(t.meta,{decorations:i,converter:n,source:t.source})}return e.get(t.meta)}return{name:`shiki:decorations`,tokens(e){if(this.options.decorations?.length)return zu(e,t(this).decorations.flatMap(e=>[e.start.offset,e.end.offset]))},code(e){if(!this.options.decorations?.length)return;let n=t(this),r=[...e.children].filter(e=>e.type===`element`&&e.tagName===`span`);if(r.length!==n.converter.lines.length)throw new K(`Number of lines in code element (${r.length}) does not match the number of lines in the source (${n.converter.lines.length}). Failed to apply decorations.`);function i(e,t,n,i){let a=r[e],s=``,c=-1,l=-1;if(t===0&&(c=0),n===0&&(l=0),n===1/0&&(l=a.children.length),c===-1||l===-1)for(let e=0;e<a.children.length;e++)s+=Gu(a.children[e]),c===-1&&s.length===t&&(c=e+1),l===-1&&s.length===n&&(l=e+1);if(c===-1)throw new K(`Failed to find start index for decoration ${JSON.stringify(i.start)}`);if(l===-1)throw new K(`Failed to find end index for decoration ${JSON.stringify(i.end)}`);let u=a.children.slice(c,l);if(!i.alwaysWrap&&u.length===a.children.length)o(a,i,`line`);else if(!i.alwaysWrap&&u.length===1&&u[0].type===`element`)o(u[0],i,`token`);else{let e={type:`element`,tagName:`span`,properties:{},children:u};o(e,i,`wrapper`),a.children.splice(c,u.length,e)}}function a(e,t){r[e]=o(r[e],t,`line`)}function o(e,t,n){let r=t.properties||{},i=t.transform||(e=>e);return e.tagName=t.tagName||`span`,e.properties={...e.properties,...r,class:e.properties.class},t.properties?.class&&Ou(e,t.properties.class),e=i(e,n)||e,e}let s=[],c=n.decorations.sort((e,t)=>t.start.offset-e.start.offset||e.end.offset-t.end.offset);for(let e of c){let{start:t,end:n}=e;if(t.line===n.line)i(t.line,t.character,n.character,e);else if(t.line<n.line){i(t.line,t.character,1/0,e);for(let r=t.line+1;r<n.line;r++)s.unshift(()=>a(r,e));i(n.line,0,n.character,e)}}s.forEach(e=>e())}}}function Wu(e){for(let t=0;t<e.length;t++){let n=e[t];if(n.start.offset>n.end.offset)throw new K(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){let t=e[r],i=n.start.offset<=t.start.offset&&t.start.offset<n.end.offset,a=n.start.offset<t.end.offset&&t.end.offset<=n.end.offset,o=t.start.offset<=n.start.offset&&n.start.offset<t.end.offset,s=t.start.offset<n.end.offset&&n.end.offset<=t.end.offset;if(i||a||o||s){if(i&&a||o&&s||o&&n.start.offset===n.end.offset||a&&t.start.offset===t.end.offset)continue;throw new K(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(t.start)} intersect.`)}}}}function Gu(e){return e.type===`text`?e.value:e.type===`element`?e.children.map(Gu).join(``):``}var Ku=[Uu()];function qu(e){let t=Ju(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...Ku]}function Ju(e){let t=[],n=[],r=[];for(let i of e)switch(i.enforce){case`pre`:t.push(i);break;case`post`:n.push(i);break;default:r.push(i)}return{pre:t,post:n,normal:r}}var Yu=[`black`,`red`,`green`,`yellow`,`blue`,`magenta`,`cyan`,`white`,`brightBlack`,`brightRed`,`brightGreen`,`brightYellow`,`brightBlue`,`brightMagenta`,`brightCyan`,`brightWhite`],Xu={1:`bold`,2:`dim`,3:`italic`,4:`underline`,7:`reverse`,8:`hidden`,9:`strikethrough`};function Zu(e,t){let n=e.indexOf(`\x1B`,t);if(n!==-1&&e[n+1]===`[`){let t=e.indexOf(`m`,n);if(t!==-1)return{sequence:e.substring(n+2,t).split(`;`),startPosition:n,position:t+1}}return{position:e.length}}function Qu(e){let t=e.shift();if(t===`2`){let t=e.splice(0,3).map(e=>Number.parseInt(e));return t.length!==3||t.some(e=>Number.isNaN(e))?void 0:{type:`rgb`,rgb:t}}if(t===`5`){let t=e.shift();if(t)return{type:`table`,index:Number(t)}}}function $u(e){let t=[];for(;e.length>0;){let n=e.shift();if(!n)continue;let r=Number.parseInt(n);if(!Number.isNaN(r)){if(r===0)t.push({type:`resetAll`});else if(r<=9)Xu[r]&&t.push({type:`setDecoration`,value:Xu[r]});else if(r<=29){let e=Xu[r-20];e&&(t.push({type:`resetDecoration`,value:e}),e===`dim`&&t.push({type:`resetDecoration`,value:`bold`}))}else if(r<=37)t.push({type:`setForegroundColor`,value:{type:`named`,name:Yu[r-30]}});else if(r===38){let n=Qu(e);n&&t.push({type:`setForegroundColor`,value:n})}else if(r===39)t.push({type:`resetForegroundColor`});else if(r<=47)t.push({type:`setBackgroundColor`,value:{type:`named`,name:Yu[r-40]}});else if(r===48){let n=Qu(e);n&&t.push({type:`setBackgroundColor`,value:n})}else r===49?t.push({type:`resetBackgroundColor`}):r===53?t.push({type:`setDecoration`,value:`overline`}):r===55?t.push({type:`resetDecoration`,value:`overline`}):r>=90&&r<=97?t.push({type:`setForegroundColor`,value:{type:`named`,name:Yu[r-90+8]}}):r>=100&&r<=107&&t.push({type:`setBackgroundColor`,value:{type:`named`,name:Yu[r-100+8]}})}}return t}function ed(){let e=null,t=null,n=new Set;return{parse(r){let i=[],a=0;do{let o=Zu(r,a),s=o.sequence?r.substring(a,o.startPosition):r.substring(a);if(s.length>0&&i.push({value:s,foreground:e,background:t,decorations:new Set(n)}),o.sequence){let r=$u(o.sequence);for(let i of r)i.type===`resetAll`?(e=null,t=null,n.clear()):i.type===`resetForegroundColor`?e=null:i.type===`resetBackgroundColor`?t=null:i.type===`resetDecoration`&&n.delete(i.value);for(let i of r)i.type===`setForegroundColor`?e=i.value:i.type===`setBackgroundColor`?t=i.value:i.type===`setDecoration`&&n.add(i.value)}a=o.position}while(a<r.length);return i}}}var td={black:`#000000`,red:`#bb0000`,green:`#00bb00`,yellow:`#bbbb00`,blue:`#0000bb`,magenta:`#ff00ff`,cyan:`#00bbbb`,white:`#eeeeee`,brightBlack:`#555555`,brightRed:`#ff5555`,brightGreen:`#00ff00`,brightYellow:`#ffff55`,brightBlue:`#5555ff`,brightMagenta:`#ff55ff`,brightCyan:`#55ffff`,brightWhite:`#ffffff`};function nd(e=td){function t(t){return e[t]}function n(e){return`#${e.map(e=>Math.max(0,Math.min(e,255)).toString(16).padStart(2,`0`)).join(``)}`}let r;function i(){if(r)return r;r=[];for(let e=0;e<Yu.length;e++)r.push(t(Yu[e]));let e=[0,95,135,175,215,255];for(let t=0;t<6;t++)for(let i=0;i<6;i++)for(let a=0;a<6;a++)r.push(n([e[t],e[i],e[a]]));let i=8;for(let e=0;e<24;e++,i+=10)r.push(n([i,i,i]));return r}function a(e){return i()[e]}function o(e){switch(e.type){case`named`:return t(e.name);case`rgb`:return n(e.rgb);case`table`:return a(e.index)}}return{value:o}}var rd=/#([0-9a-f]{3,8})/i,id=/var\((--[\w-]+-ansi-[\w-]+)\)/,ad={black:`#000000`,red:`#cd3131`,green:`#0DBC79`,yellow:`#E5E510`,blue:`#2472C8`,magenta:`#BC3FBC`,cyan:`#11A8CD`,white:`#E5E5E5`,brightBlack:`#666666`,brightRed:`#F14C4C`,brightGreen:`#23D18B`,brightYellow:`#F5F543`,brightBlue:`#3B8EEA`,brightMagenta:`#D670D6`,brightCyan:`#29B8DB`,brightWhite:`#FFFFFF`};function od(e,t,n){let r=Bl(e,n),i=Yl(t),a=nd(Object.fromEntries(Yu.map(t=>{let n=`terminal.ansi${t[0].toUpperCase()}${t.substring(1)}`;return[t,e.colors?.[n]||ad[t]]}))),o=ed();return i.map(t=>o.parse(t[0]).map(n=>{let i,o;n.decorations.has(`reverse`)?(i=n.background?a.value(n.background):e.bg,o=n.foreground?a.value(n.foreground):e.fg):(i=n.foreground?a.value(n.foreground):e.fg,o=n.background?a.value(n.background):void 0),i=Vl(i,r),o=Vl(o,r),n.decorations.has(`dim`)&&(i=sd(i));let s=q.None;return n.decorations.has(`bold`)&&(s|=q.Bold),n.decorations.has(`italic`)&&(s|=q.Italic),n.decorations.has(`underline`)&&(s|=q.Underline),n.decorations.has(`strikethrough`)&&(s|=q.Strikethrough),{content:n.value,offset:t[1],color:i,bgColor:o,fontStyle:s}}))}function sd(e){let t=e.match(rd);if(t){let e=t[1];if(e.length===8){let t=Math.round(Number.parseInt(e.slice(6,8),16)/2).toString(16).padStart(2,`0`);return`#${e.slice(0,6)}${t}`}if(e.length===6)return`#${e}80`;if(e.length===4){let t=e[0],n=e[1],r=e[2],i=e[3];return`#${t}${t}${n}${n}${r}${r}${Math.round(Number.parseInt(`${i}${i}`,16)/2).toString(16).padStart(2,`0`)}`}if(e.length===3){let t=e[0],n=e[1],r=e[2];return`#${t}${t}${n}${n}${r}${r}80`}}let n=e.match(id);return n?`var(${n[1]}-dim)`:e}function cd(e,t,n={}){let r=e.resolveLangAlias(n.lang||`text`),{theme:i=e.getLoadedThemes()[0]}=n;if(!Wl(r)&&!Kl(i)&&r===`ansi`){let{theme:r}=e.setTheme(i);return od(r,t,n)}return gu(e,t,n)}function ld(e,t,n){let r,i,a,o,s,c;if(`themes`in n){let{defaultColor:l=`light`,cssVariablePrefix:u=`--shiki-`,colorsRendering:d=`css-vars`}=n,f=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})).sort((e,t)=>e.color===l?-1:+(t.color===l));if(f.length===0)throw new K("`themes` option must not be empty");let p=Tu(e,t,n,cd);if(c=uu(p),l&&l!==`light-dark()`&&!f.some(e=>e.color===l))throw new K(`\`themes\` option must contain the defaultColor key \`${l}\``);let m=f.map(t=>e.getTheme(t.theme)),h=f.map(e=>e.color);a=p.map(e=>e.map(e=>Bu(e,h,u,l,d))),c&&lu(a,c);let g=f.map(e=>Bl(e.theme,n));i=ud(f,m,g,u,l,`fg`,d),r=ud(f,m,g,u,l,`bg`,d),o=`shiki-themes ${m.map(e=>e.name).join(` `)}`,s=l?void 0:[i,r].join(`;`)}else if(`theme`in n){let s=Bl(n.theme,n);a=cd(e,t,n);let l=e.getTheme(n.theme);r=Vl(l.bg,s),i=Vl(l.fg,s),o=l.name,c=uu(a)}else throw new K("Invalid options, either `theme` or `themes` must be provided");return{tokens:a,fg:i,bg:r,themeName:o,rootStyle:s,grammarState:c}}function ud(e,t,n,r,i,a,o){return e.map((s,c)=>{let l=Vl(t[c][a],n[c])||`inherit`,u=`${r+s.color}${a===`bg`?`-bg`:``}:${l}`;if(c===0&&i){if(i===`light-dark()`&&e.length>1){let r=e.findIndex(e=>e.color===`light`),i=e.findIndex(e=>e.color===`dark`);if(r===-1||i===-1)throw new K('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${Vl(t[r][a],n[r])||`inherit`}, ${Vl(t[i][a],n[i])||`inherit`});${u}`}return l}return o===`css-vars`?u:null}).filter(e=>!!e).join(`;`)}var dd=/^\s+$/,fd=/^(\s*)(.*?)(\s*)$/;function pd(e,t,n,r={meta:{},options:n,codeToHast:(t,n)=>pd(e,t,n),codeToTokens:(t,n)=>ld(e,t,n)}){let i=t;for(let e of qu(n))i=e.preprocess?.call(r,i,n)||i;let{tokens:a,fg:o,bg:s,themeName:c,rootStyle:l,grammarState:u}=ld(e,i,n),{mergeWhitespaces:d=!0,mergeSameStyleTokens:f=!1}=n;d===!0?a=hd(a):d===`never`&&(a=gd(a)),f&&(a=_d(a));let p={...r,get source(){return i}};for(let e of qu(n))a=e.tokens?.call(p,a)||a;return md(a,{...n,fg:o,bg:s,themeName:c,rootStyle:n.rootStyle===!1?!1:n.rootStyle??l},p,u)}function md(e,t,n,r=uu(e)){let i=qu(t),a=[],o={type:`root`,children:[]},{structure:s=`classic`,tabindex:c=`0`}=t,l={class:`shiki ${t.themeName||``}`};t.rootStyle!==!1&&(l.style=t.rootStyle==null?`background-color:${t.bg};color:${t.fg}`:t.rootStyle),c!==!1&&c!=null&&(l.tabindex=c.toString());for(let[e,n]of Object.entries(t.meta||{}))e.startsWith(`_`)||(l[e]=n);let u={type:`element`,tagName:`pre`,properties:l,children:[],data:t.data},d={type:`element`,tagName:`code`,properties:{},children:a},f=[],p={...n,structure:s,addClassToHast:Ou,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return o},get pre(){return u},get code(){return d},get lines(){return f}};if(e.forEach((e,t)=>{t&&(s===`inline`?o.children.push({type:`element`,tagName:`br`,properties:{},children:[]}):s===`classic`&&a.push({type:`text`,value:`
37
- `}));let n={type:`element`,tagName:`span`,properties:{class:`line`},children:[]},r=0;for(let a of e){let e={type:`element`,tagName:`span`,properties:{...a.htmlAttrs},children:[{type:`text`,value:a.content}]},c=Hu(a.htmlStyle||Vu(a));c&&(e.properties.style=c);for(let o of i)e=o?.span?.call(p,e,t+1,r,n,a)||e;s===`inline`?o.children.push(e):s===`classic`&&n.children.push(e),r+=a.content.length}if(s===`classic`){for(let e of i)n=e?.line?.call(p,n,t+1)||n;f.push(n),a.push(n)}else s===`inline`&&f.push(n)}),s===`classic`){for(let e of i)d=e?.code?.call(p,d)||d;u.children.push(d);for(let e of i)u=e?.pre?.call(p,u)||u;o.children.push(u)}else if(s===`inline`){let e=[],t={type:`element`,tagName:`span`,properties:{class:`line`},children:[]};for(let n of o.children)n.type===`element`&&n.tagName===`br`?(e.push(t),t={type:`element`,tagName:`span`,properties:{class:`line`},children:[]}):(n.type===`element`||n.type===`text`)&&t.children.push(n);e.push(t);let n={type:`element`,tagName:`code`,properties:{},children:e};for(let e of i)n=e?.code?.call(p,n)||n;o.children=[];for(let e=0;e<n.children.length;e++){e>0&&o.children.push({type:`element`,tagName:`br`,properties:{},children:[]});let t=n.children[e];t.type===`element`&&o.children.push(...t.children)}}let m=o;for(let e of i)m=e?.root?.call(p,m)||m;return r&&lu(m,r),m}function hd(e){return e.map(e=>{let t=[],n=``,r;return e.forEach((i,a)=>{let o=!(i.fontStyle&&(i.fontStyle&q.Underline||i.fontStyle&q.Strikethrough));o&&dd.test(i.content)&&e[a+1]?(r===void 0&&(r=i.offset),n+=i.content):n?(o?t.push({...i,offset:r,content:n+i.content}):t.push({content:n,offset:r},i),r=void 0,n=``):t.push(i)}),t})}function gd(e){return e.map(e=>e.flatMap(e=>{if(dd.test(e.content))return e;let t=e.content.match(fd);if(!t)return e;let[,n,r,i]=t;if(!n&&!i)return e;let a=[{...e,offset:e.offset+n.length,content:r}];return n&&a.unshift({content:n,offset:e.offset}),i&&a.push({content:i,offset:e.offset+n.length+r.length}),a}))}function _d(e){return e.map(e=>{let t=[];for(let n of e){if(t.length===0){t.push({...n});continue}let e=t.at(-1),r=Hu(e.htmlStyle||Vu(e)),i=Hu(n.htmlStyle||Vu(n)),a=e.fontStyle&&(e.fontStyle&q.Underline||e.fontStyle&q.Strikethrough),o=n.fontStyle&&(n.fontStyle&q.Underline||n.fontStyle&q.Strikethrough);!a&&!o&&r===i?e.content+=n.content:t.push({...n})}return t})}var vd=Io;function yd(e,t,n){let r={meta:{},options:n,codeToHast:(t,n)=>pd(e,t,n),codeToTokens:(t,n)=>ld(e,t,n)},i=vd(pd(e,t,n,r));for(let e of qu(n))i=e.postprocess?.call(r,i,n)||i;return i}async function bd(e){let t=await su(e);return{getLastGrammarState:(...e)=>_u(t,...e),codeToTokensBase:(e,n)=>cd(t,e,n),codeToTokensWithThemes:(e,n)=>Tu(t,e,n),codeToTokens:(e,n)=>ld(t,e,n),codeToHast:(e,n)=>pd(t,e,n),codeToHtml:(e,n)=>yd(t,e,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function xd(e){let t=e.langs,n=e.themes,r=e.engine;async function i(e){function i(n){if(typeof n==`string`){if(n=e.langAlias?.[n]||n,Gl(n))return[];let r=t[n];if(!r)throw new K(`Language \`${n}\` is not included in this bundle. You may want to load it from external source.`);return r}return n}function a(e){if(ql(e))return`none`;if(typeof e==`string`){let t=n[e];if(!t)throw new K(`Theme \`${e}\` is not included in this bundle. You may want to load it from external source.`);return t}return e}let o=(e.themes??[]).map(e=>a(e)),s=(e.langs??[]).map(e=>i(e)),c=await bd({engine:e.engine??r(),...e,themes:o,langs:s});return{...c,loadLanguage(...e){return c.loadLanguage(...e.map(i))},loadTheme(...e){return c.loadTheme(...e.map(a))},getBundledLanguages(){return t},getBundledThemes(){return n}}}return i}function Sd(e){let t;async function n(n={}){if(t){let e=await t;return await Promise.all([e.loadTheme(...n.themes||[]),e.loadLanguage(...n.langs||[])]),e}{t=e({...n,themes:[],langs:[]});let r=await t;return await Promise.all([r.loadTheme(...n.themes||[]),r.loadLanguage(...n.langs||[])]),r}}return n}function Cd(e,t){let n=Sd(e);async function r(e,r){let i=await n({langs:[r.lang],themes:`theme`in r?[r.theme]:Object.values(r.themes)}),a=await t?.guessEmbeddedLanguages?.(e,r.lang,i);return a&&await i.loadLanguage(...a),i}return{getSingletonHighlighter(e){return n(e)},async codeToHtml(e,t){return(await r(e,t)).codeToHtml(e,t)},async codeToHast(e,t){return(await r(e,t)).codeToHast(e,t)},async codeToTokens(e,t){return(await r(e,t)).codeToTokens(e,t)},async codeToTokensBase(e,t){return(await r(e,t)).codeToTokensBase(e,t)},async codeToTokensWithThemes(e,t){return(await r(e,t)).codeToTokensWithThemes(e,t)},async getLastGrammarState(e,t){return(await n({langs:[t.lang],themes:[t.theme]})).getLastGrammarState(e,t)}}}var wd=xd({langs:As,themes:js,engine:()=>(0,ac.createOnigurumaEngine)(M(()=>import(`./_sWLklcDZ.js`),[]))}),{codeToHtml:Td,codeToHast:Ed,codeToTokens:Dd,codeToTokensBase:Od,codeToTokensWithThemes:kd,getSingletonHighlighter:Ad,getLastGrammarState:jd}=Cd(wd,{guessEmbeddedLanguages:Fu}),Md=4294967295,Nd=class{patterns;options;regexps;constructor(e,t={}){this.patterns=e,this.options=t;let{forgiving:n=!1,cache:r,regexConstructor:i}=t;if(!i)throw Error("Option `regexConstructor` is not provided");this.regexps=e.map(e=>{if(typeof e!=`string`)return e;let t=r?.get(e);if(t){if(t instanceof RegExp)return t;if(n)return null;throw t}try{let t=i(e);return r?.set(e,t),t}catch(t){if(r?.set(e,t),n)return null;throw t}})}findNextMatchSync(e,t,n){let r=typeof e==`string`?e:e.content,i=[];function a(e,t,n=0){return{index:e,captureIndices:t.indices.map(e=>e==null?{start:Md,end:Md,length:0}:{start:e[0]+n,end:e[1]+n,length:e[1]-e[0]})}}for(let e=0;e<this.regexps.length;e++){let n=this.regexps[e];if(n)try{n.lastIndex=t;let o=n.exec(r);if(!o)continue;if(o.index===t)return a(e,o,0);i.push([e,o,0])}catch(e){if(this.options.forgiving)continue;throw e}}if(i.length){let e=Math.min(...i.map(e=>e[1].index));for(let[t,n,r]of i)if(n.index===e)return a(t,n,r)}return null}};function Pd(e){if([...e].length!==1)throw Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function Fd(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}var Id=new Set([`alnum`,`alpha`,`ascii`,`blank`,`cntrl`,`digit`,`graph`,`lower`,`print`,`punct`,`space`,`upper`,`word`,`xdigit`]),J=String.raw;function Ld(e,t){if(e==null)throw Error(t??`Value expected`);return e}var Rd=J`\[\^?`,zd=`c.? | C(?:-.?)?|${J`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${J`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${J`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${J`o\{[^\}]*\}?`}|${J`\d{1,3}`}`,Bd=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,Vd=new RegExp(J`
38
- \\ (?:
39
- ${zd}
40
- | [gk]<[^>]*>?
41
- | [gk]'[^']*'?
42
- | .
43
- )
44
- | \( (?:
45
- \? (?:
46
- [:=!>({]
47
- | <[=!]
48
- | <[^>]*>
49
- | '[^']*'
50
- | ~\|?
51
- | #(?:[^)\\]|\\.?)*
52
- | [^:)]*[:)]
53
- )?
54
- | \*[^\)]*\)?
55
- )?
56
- | (?:${Bd.source})+
57
- | ${Rd}
58
- | .
59
- `.replace(/\s+/g,``),`gsu`),Hd=new RegExp(J`
60
- \\ (?:
61
- ${zd}
62
- | .
63
- )
64
- | \[:(?:\^?\p{Alpha}+|\^):\]
65
- | ${Rd}
66
- | &&
67
- | .
68
- `.replace(/\s+/g,``),`gsu`);function Ud(e,t={}){let n={flags:``,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}};if(typeof e!=`string`)throw Error(`String expected as pattern`);let r=bf(n.flags),i=[r.extended],a={captureGroup:n.rules.captureGroup,getCurrentModX(){return i.at(-1)},numOpenGroups:0,popModX(){i.pop()},pushModX(e){i.push(e)},replaceCurrentModX(e){i[i.length-1]=e},singleline:n.rules.singleline},o=[],s;for(Vd.lastIndex=0;s=Vd.exec(e);){let t=Wd(a,e,s[0],Vd.lastIndex);t.tokens?o.push(...t.tokens):t.token&&o.push(t.token),t.lastIndex!==void 0&&(Vd.lastIndex=t.lastIndex)}let c=[],l=0;o.filter(e=>e.type===`GroupOpen`).forEach(e=>{e.kind===`capturing`?e.number=++l:e.raw===`(`&&c.push(e)}),l||c.forEach((e,t)=>{e.kind=`capturing`,e.number=t+1});let u=l||c.length;return{tokens:o.map(e=>e.type===`EscapedNumber`?Sf(e,u):e).flat(),flags:r}}function Wd(e,t,n,r){let[i,a]=n;if(n===`[`||n===`[^`){let e=Gd(t,n,r);return{tokens:e.tokens,lastIndex:e.lastIndex}}if(i===`\\`){if(`AbBGyYzZ`.includes(a))return{token:Yd(n,n)};if(/^\\g[<']/.test(n)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(n))throw Error(`Invalid group name "${n}"`);return{token:uf(n)}}if(/^\\k[<']/.test(n)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(n))throw Error(`Invalid group name "${n}"`);return{token:Xd(n)}}if(a===`K`)return{token:rf(`keep`,n)};if(a===`N`||a===`R`)return{token:nf(`newline`,n,{negate:a===`N`})};if(a===`O`)return{token:nf(`any`,n)};if(a===`X`)return{token:nf(`text_segment`,n)};let e=qd(n,{inCharClass:!1});return Array.isArray(e)?{tokens:e}:{token:e}}if(i===`(`){if(a===`*`)return{token:hf(n)};if(n===`(?{`)throw Error(`Unsupported callout "${n}"`);if(n.startsWith(`(?#`)){if(t[r]!==`)`)throw Error(`Unclosed comment group "(?#"`);return{lastIndex:r+1}}if(/^\(\?[-imx]+[:)]$/.test(n))return{token:mf(n,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,n===`(`&&!e.captureGroup||n===`(?:`)return{token:sf(`group`,n)};if(n===`(?>`)return{token:sf(`atomic`,n)};if(n===`(?=`||n===`(?!`||n===`(?<=`||n===`(?<!`)return{token:sf(n[2]===`<`?`lookbehind`:`lookahead`,n,{negate:n.endsWith(`!`)})};if(n===`(`&&e.captureGroup||n.startsWith(`(?<`)&&n.endsWith(`>`)||n.startsWith(`(?'`)&&n.endsWith(`'`))return{token:sf(`capturing`,n,{...n!==`(`&&{name:n.slice(3,-1)}})};if(n.startsWith(`(?~`)){if(n===`(?~|`)throw Error(`Unsupported absence function kind "${n}"`);return{token:sf(`absence_repeater`,n)}}throw Error(n===`(?(`?`Unsupported conditional "${n}"`:`Invalid or unsupported group option "${n}"`)}if(n===`)`){if(e.popModX(),e.numOpenGroups--,e.numOpenGroups<0)throw Error(`Unmatched ")"`);return{token:of(n)}}if(e.getCurrentModX()){if(n===`#`){let e=t.indexOf(`
69
- `,r);return{lastIndex:e===-1?t.length:e}}if(/^\s$/.test(n)){let e=/\s+/y;return e.lastIndex=r,{lastIndex:e.exec(t)?e.lastIndex:r}}}return n===`.`?{token:nf(`dot`,n)}:n===`^`||n===`$`?{token:Yd(e.singleline?{"^":J`\A`,$:J`\Z`}[n]:n,n)}:n===`|`?{token:Jd(n)}:Bd.test(n)?{tokens:Cf(n)}:{token:Zd(Pd(n),n)}}function Gd(e,t,n){let r=[tf(t[1]===`^`,t)],i=1,a;for(Hd.lastIndex=n;a=Hd.exec(e);){let e=a[0];if(e[0]===`[`&&e[1]!==`:`)i++,r.push(tf(e[1]===`^`,e));else if(e===`]`){if(r.at(-1).type===`CharacterClassOpen`)r.push(Zd(93,e));else if(i--,r.push(Qd(e)),!i)break}else{let t=Kd(e);Array.isArray(t)?r.push(...t):r.push(t)}}return{tokens:r,lastIndex:Hd.lastIndex||e.length}}function Kd(e){if(e[0]===`\\`)return qd(e,{inCharClass:!0});if(e[0]===`[`){let t=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!t||!Id.has(t.groups.name))throw Error(`Invalid POSIX class "${e}"`);return nf(`posix`,e,{value:t.groups.name,negate:!!t.groups.negate})}return e===`-`?$d(e):e===`&&`?ef(e):Zd(Pd(e),e)}function qd(e,{inCharClass:t}){let n=e[1];if(n===`c`||n===`C`)return pf(e);if(`dDhHsSwW`.includes(n))return _f(e);if(e.startsWith(J`\o{`))throw Error(`Incomplete, invalid, or unsupported octal code point "${e}"`);if(/^\\[pP]\{/.test(e)){if(e.length===3)throw Error(`Incomplete or invalid Unicode property "${e}"`);return vf(e)}if(/^\\x[89A-Fa-f]\p{AHex}/u.test(e))try{let t=e.split(/\\x/).slice(1).map(e=>parseInt(e,16)),n=new TextDecoder(`utf-8`,{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(t)),r=new TextEncoder;return[...n].map(e=>{let t=[...r.encode(e)].map(e=>`\\x${e.toString(16)}`).join(``);return Zd(Pd(e),t)})}catch{throw Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if(n===`u`||n===`x`)return Zd(xf(e),e);if(ff.has(n))return Zd(ff.get(n),e);if(/\d/.test(n))return af(t,e);if(e===`\\`)throw Error(J`Incomplete escape "\"`);if(n===`M`)throw Error(`Unsupported meta "${e}"`);if([...e].length===2)return Zd(e.codePointAt(1),e);throw Error(`Unexpected escape "${e}"`)}function Jd(e){return{type:`Alternator`,raw:e}}function Yd(e,t){return{type:`Assertion`,kind:e,raw:t}}function Xd(e){return{type:`Backreference`,raw:e}}function Zd(e,t){return{type:`Character`,value:e,raw:t}}function Qd(e){return{type:`CharacterClassClose`,raw:e}}function $d(e){return{type:`CharacterClassHyphen`,raw:e}}function ef(e){return{type:`CharacterClassIntersector`,raw:e}}function tf(e,t){return{type:`CharacterClassOpen`,negate:e,raw:t}}function nf(e,t,n={}){return{type:`CharacterSet`,kind:e,...n,raw:t}}function rf(e,t,n={}){return e===`keep`?{type:`Directive`,kind:e,raw:t}:{type:`Directive`,kind:e,flags:Ld(n.flags),raw:t}}function af(e,t){return{type:`EscapedNumber`,inCharClass:e,raw:t}}function of(e){return{type:`GroupClose`,raw:e}}function sf(e,t,n={}){return{type:`GroupOpen`,kind:e,...n,raw:t}}function cf(e,t,n,r){return{type:`NamedCallout`,kind:e,tag:t,arguments:n,raw:r}}function lf(e,t,n,r){return{type:`Quantifier`,kind:e,min:t,max:n,raw:r}}function uf(e){return{type:`Subroutine`,raw:e}}var df=new Set([`COUNT`,`CMP`,`ERROR`,`FAIL`,`MAX`,`MISMATCH`,`SKIP`,`TOTAL_COUNT`]),ff=new Map([[`a`,7],[`b`,8],[`e`,27],[`f`,12],[`n`,10],[`r`,13],[`t`,9],[`v`,11]]);function pf(e){let t=e[1]===`c`?e[2]:e[3];if(!t||!/[A-Za-z]/.test(t))throw Error(`Unsupported control character "${e}"`);return Zd(Pd(t.toUpperCase())-64,e)}function mf(e,t){let{on:n,off:r}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(e).groups;r??=``;let i=(t.getCurrentModX()||n.includes(`x`))&&!r.includes(`x`),a=yf(n),o=yf(r),s={};if(a&&(s.enable=a),o&&(s.disable=o),e.endsWith(`)`))return t.replaceCurrentModX(i),rf(`flags`,e,{flags:s});if(e.endsWith(`:`))return t.pushModX(i),t.numOpenGroups++,sf(`group`,e,{...(a||o)&&{flags:s}});throw Error(`Unexpected flag modifier "${e}"`)}function hf(e){let t=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(e);if(!t)throw Error(`Incomplete or invalid named callout "${e}"`);let{name:n,tag:r,args:i}=t.groups;if(!n)throw Error(`Invalid named callout "${e}"`);if(r===``)throw Error(`Named callout tag with empty value not allowed "${e}"`);let a=i?i.split(`,`).filter(e=>e!==``).map(e=>/^[+-]?\d+$/.test(e)?+e:e):[],[o,s,c]=a,l=df.has(n)?n.toLowerCase():`custom`;switch(l){case`fail`:case`mismatch`:case`skip`:if(a.length>0)throw Error(`Named callout arguments not allowed "${a}"`);break;case`error`:if(a.length>1)throw Error(`Named callout allows only one argument "${a}"`);if(typeof o==`string`)throw Error(`Named callout argument must be a number "${o}"`);break;case`max`:if(!a.length||a.length>2)throw Error(`Named callout must have one or two arguments "${a}"`);if(typeof o==`string`&&!/^[A-Za-z_]\w*$/.test(o))throw Error(`Named callout argument one must be a tag or number "${o}"`);if(a.length===2&&(typeof s==`number`||!/^[<>X]$/.test(s)))throw Error(`Named callout optional argument two must be '<', '>', or 'X' "${s}"`);break;case`count`:case`total_count`:if(a.length>1)throw Error(`Named callout allows only one argument "${a}"`);if(a.length===1&&(typeof o==`number`||!/^[<>X]$/.test(o)))throw Error(`Named callout optional argument must be '<', '>', or 'X' "${o}"`);break;case`cmp`:if(a.length!==3)throw Error(`Named callout must have three arguments "${a}"`);if(typeof o==`string`&&!/^[A-Za-z_]\w*$/.test(o))throw Error(`Named callout argument one must be a tag or number "${o}"`);if(typeof s==`number`||!/^(?:[<>!=]=|[<>])$/.test(s))throw Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${s}"`);if(typeof c==`string`&&!/^[A-Za-z_]\w*$/.test(c))throw Error(`Named callout argument three must be a tag or number "${c}"`);break;case`custom`:throw Error(`Undefined callout name "${n}"`);default:throw Error(`Unexpected named callout kind "${l}"`)}return cf(l,r??null,i?.split(`,`)??null,e)}function gf(e){let t=null,n,r;if(e[0]===`{`){let{minStr:i,maxStr:a}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(e).groups,o=1e5;if(+i>o||a&&+a>o)throw Error(`Quantifier value unsupported in Oniguruma`);if(n=+i,r=a===void 0?+i:a===``?1/0:+a,n>r&&(t=`possessive`,[n,r]=[r,n]),e.endsWith(`?`)){if(t===`possessive`)throw Error(`Unsupported possessive interval quantifier chain with "?"`);t=`lazy`}else t||=`greedy`}else n=+(e[0]===`+`),r=e[0]===`?`?1:1/0,t=e[1]===`+`?`possessive`:e[1]===`?`?`lazy`:`greedy`;return lf(t,n,r,e)}function _f(e){let t=e[1].toLowerCase();return nf({d:`digit`,h:`hex`,s:`space`,w:`word`}[t],e,{negate:e[1]!==t})}function vf(e){let{p:t,neg:n,value:r}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return nf(`property`,e,{value:r,negate:t===`P`&&!n||t===`p`&&!!n})}function yf(e){let t={};return e.includes(`i`)&&(t.ignoreCase=!0),e.includes(`m`)&&(t.dotAll=!0),e.includes(`x`)&&(t.extended=!0),Object.keys(t).length?t:null}function bf(e){let t={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let n=0;n<e.length;n++){let r=e[n];if(!`imxDPSWy`.includes(r))throw Error(`Invalid flag "${r}"`);if(r===`y`){if(!/^y{[gw]}/.test(e.slice(n)))throw Error(`Invalid or unspecified flag "y" mode`);t.textSegmentMode=e[n+2]===`g`?`grapheme`:`word`,n+=3;continue}t[{i:`ignoreCase`,m:`dotAll`,x:`extended`,D:`digitIsAscii`,P:`posixIsAscii`,S:`spaceIsAscii`,W:`wordIsAscii`}[r]]=!0}return t}function xf(e){if(/^(?:\\u(?!\p{AHex}{4})|\\x(?!\p{AHex}{1,2}|\{\p{AHex}{1,8}\}))/u.test(e))throw Error(`Incomplete or invalid escape "${e}"`);let t=e[2]===`{`?/^\\x\{\s*(?<hex>\p{AHex}+)/u.exec(e).groups.hex:e.slice(2);return parseInt(t,16)}function Sf(e,t){let{raw:n,inCharClass:r}=e,i=n.slice(1);if(!r&&(i!==`0`&&i.length===1||i[0]!==`0`&&+i<=t))return[Xd(n)];let a=[],o=i.match(/^[0-7]+|\d/g);for(let e=0;e<o.length;e++){let t=o[e],r;if(e===0&&t!==`8`&&t!==`9`){if(r=parseInt(t,8),r>127)throw Error(J`Octal encoded byte above 177 unsupported "${n}"`)}else r=Pd(t);a.push(Zd(r,(e===0?`\\`:``)+t))}return a}function Cf(e){let t=[],n=new RegExp(Bd,`gy`),r;for(;r=n.exec(e);){let e=r[0];if(e[0]===`{`){let r=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(e);if(r){let{min:i,max:a}=r.groups;if(+i>+a&&e.endsWith(`?`)){n.lastIndex--,t.push(gf(e.slice(0,-1)));continue}}}t.push(gf(e))}return t}function wf(e,t){if(!Array.isArray(e.body))throw Error(`Expected node with body array`);if(e.body.length!==1)return!1;let n=e.body[0];return!t||Object.keys(t).every(e=>t[e]===n[e])}function Tf(e){return Ef.has(e.type)}var Ef=new Set([`AbsenceFunction`,`Backreference`,`CapturingGroup`,`Character`,`CharacterClass`,`CharacterSet`,`Group`,`Quantifier`,`Subroutine`]);function Df(e,t={}){let n={flags:``,normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}},r=Ud(e,{flags:n.flags,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline}}),i=(e,t)=>{let n=r.tokens[a.nextIndex];switch(a.parent=e,a.nextIndex++,n.type){case`Alternator`:return Lf();case`Assertion`:return Of(n);case`Backreference`:return kf(n,a);case`Character`:return Vf(n.value,{useLastValid:!!t.isCheckingRangeEnd});case`CharacterClassHyphen`:return Af(n,a,t);case`CharacterClassOpen`:return jf(n,a,t);case`CharacterSet`:return Mf(n,a);case`Directive`:return Gf(n.kind,{flags:n.flags});case`GroupOpen`:return Nf(n,a,t);case`NamedCallout`:return Yf(n.kind,n.tag,n.arguments);case`Quantifier`:return Pf(n,a);case`Subroutine`:return Ff(n,a);default:throw Error(`Unexpected token type "${n.type}"`)}},a={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:n.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:n.skipBackrefValidation,skipLookbehindValidation:n.skipLookbehindValidation,skipPropertyNameValidation:n.skipPropertyNameValidation,subroutines:[],tokens:r.tokens,unicodePropertyMap:n.unicodePropertyMap,walk:i},o=Qf(Kf(r.flags)),s=o.body[0];for(;a.nextIndex<r.tokens.length;){let e=i(s,{});e.type===`Alternative`?(o.body.push(e),s=e):s.body.push(e)}let{capturingGroups:c,hasNumberedRef:l,namedGroupsByName:u,subroutines:d}=a;if(l&&u.size&&!n.rules.captureGroup)throw Error(`Numbered backref/subroutine not allowed when using named capture`);for(let{ref:e}of d)if(typeof e==`number`){if(e>c.length)throw Error(`Subroutine uses a group number that's not defined`);e&&(c[e-1].isSubroutined=!0)}else if(u.has(e)){if(u.get(e).length>1)throw Error(J`Subroutine uses a duplicate group name "\g<${e}>"`);u.get(e)[0].isSubroutined=!0}else throw Error(J`Subroutine uses a group name that's not defined "\g<${e}>"`);return o}function Of({kind:e}){return Rf(Ld({"^":`line_start`,$:`line_end`,"\\A":`string_start`,"\\b":`word_boundary`,"\\B":`word_boundary`,"\\G":`search_start`,"\\y":`text_segment_boundary`,"\\Y":`text_segment_boundary`,"\\z":`string_end`,"\\Z":`string_end_newline`}[e],`Unexpected assertion kind "${e}"`),{negate:e===J`\B`||e===J`\Y`})}function kf({raw:e},t){let n=/^\\k[<']/.test(e),r=n?e.slice(3,-1):e.slice(1),i=(n,r=!1)=>{let i=t.capturingGroups.length,a=!1;if(n>i){if(t.skipBackrefValidation)a=!0;else throw Error(`Not enough capturing groups defined to the left "${e}"`)}return t.hasNumberedRef=!0,zf(r?i+1-n:n,{orphan:a})};if(n){let n=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(r);if(n)return i(+n.groups.num,!!n.groups.sign);if(/[-+]/.test(r))throw Error(`Invalid backref name "${e}"`);if(!t.namedGroupsByName.has(r))throw Error(`Group name not defined to the left "${e}"`);return zf(r)}return i(+r)}function Af(e,t,n){let{tokens:r,walk:i}=t,a=t.parent,o=a.body.at(-1),s=r[t.nextIndex];if(!n.isCheckingRangeEnd&&o&&o.type!==`CharacterClass`&&o.type!==`CharacterClassRange`&&s&&s.type!==`CharacterClassOpen`&&s.type!==`CharacterClassClose`&&s.type!==`CharacterClassIntersector`){let e=i(a,{...n,isCheckingRangeEnd:!0});if(o.type===`Character`&&e.type===`Character`)return a.body.pop(),Uf(o,e);throw Error(`Invalid character class range`)}return Vf(Pd(`-`))}function jf({negate:e},t,n){let{tokens:r,walk:i}=t,a=[Hf()],o=r[t.nextIndex],s=lp(o);for(;s.type!==`CharacterClassClose`;){if(s.type===`CharacterClassIntersector`)a.push(Hf()),t.nextIndex++;else{let e=a.at(-1);e.body.push(i(e,n))}s=lp(r[t.nextIndex],o)}let c=Hf({negate:e});return a.length===1?c.body=a[0].body:(c.kind=`intersection`,c.body=a.map(e=>e.body.length===1?e.body[0]:e)),t.nextIndex++,c}function Mf({kind:e,negate:t,value:n},r){let{normalizeUnknownPropertyNames:i,skipPropertyNameValidation:a,unicodePropertyMap:o}=r;if(e===`property`){let r=cp(n);if(Id.has(r)&&!o?.has(r))e=`posix`,n=r;else return ep(n,{negate:t,normalizeUnknownPropertyNames:i,skipPropertyNameValidation:a,unicodePropertyMap:o})}return e===`posix`?Xf(n,{negate:t}):Wf(e,{negate:t})}function Nf(e,t,n){let{tokens:r,capturingGroups:i,namedGroupsByName:a,skipLookbehindValidation:o,walk:s}=t,c=tp(e),l=c.type===`AbsenceFunction`,u=ap(c),d=u&&c.negate;if(c.type===`CapturingGroup`&&(i.push(c),c.name&&Fd(a,c.name,[]).push(c)),l&&n.isInAbsenceFunction)throw Error(`Nested absence function not supported by Oniguruma`);let f=up(r[t.nextIndex]);for(;f.type!==`GroupClose`;){if(f.type===`Alternator`)c.body.push(Lf()),t.nextIndex++;else{let e=c.body.at(-1),t=s(e,{...n,isInAbsenceFunction:n.isInAbsenceFunction||l,isInLookbehind:n.isInLookbehind||u,isInNegLookbehind:n.isInNegLookbehind||d});if(e.body.push(t),(u||n.isInLookbehind)&&!o){let e=`Lookbehind includes a pattern not allowed by Oniguruma`;if(d||n.isInNegLookbehind){if(ip(t)||t.type===`CapturingGroup`)throw Error(e)}else if(ip(t)||ap(t)&&t.negate)throw Error(e)}}f=up(r[t.nextIndex])}return t.nextIndex++,c}function Pf({kind:e,min:t,max:n},r){let i=r.parent,a=i.body.at(-1);if(!a||!Tf(a))throw Error(`Quantifier requires a repeatable token`);let o=Zf(e,t,n,a);return i.body.pop(),o}function Ff({raw:e},t){let{capturingGroups:n,subroutines:r}=t,i=e.slice(3,-1),a=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(i);if(a){let e=+a.groups.num,r=n.length;if(t.hasNumberedRef=!0,i={"":e,"+":r+e,"-":r+1-e}[a.groups.sign],i<1)throw Error(`Invalid subroutine number`)}else i===`0`&&(i=0);let o=$f(i);return r.push(o),o}function If(e,t){if(e!==`repeater`)throw Error(`Unexpected absence function kind "${e}"`);return{type:`AbsenceFunction`,kind:e,body:np(t?.body)}}function Lf(e){return{type:`Alternative`,body:rp(e?.body)}}function Rf(e,t){let n={type:`Assertion`,kind:e};return(e===`word_boundary`||e===`text_segment_boundary`)&&(n.negate=!!t?.negate),n}function zf(e,t){let n=!!t?.orphan;return{type:`Backreference`,ref:e,...n&&{orphan:n}}}function Bf(e,t){let n={name:void 0,isSubroutined:!1,...t};if(n.name!==void 0&&!op(n.name))throw Error(`Group name "${n.name}" invalid in Oniguruma`);return{type:`CapturingGroup`,number:e,...n.name&&{name:n.name},...n.isSubroutined&&{isSubroutined:n.isSubroutined},body:np(t?.body)}}function Vf(e,t){let n={useLastValid:!1,...t};if(e>1114111){let t=e.toString(16);if(n.useLastValid)e=1114111;else throw Error(e>1310719?`Invalid code point out of range "\\x{${t}}"`:`Invalid code point out of range in JS "\\x{${t}}"`)}return{type:`Character`,value:e}}function Hf(e){let t={kind:`union`,negate:!1,...e};return{type:`CharacterClass`,kind:t.kind,negate:t.negate,body:rp(e?.body)}}function Uf(e,t){if(t.value<e.value)throw Error(`Character class range out of order`);return{type:`CharacterClassRange`,min:e,max:t}}function Wf(e,t){let n=!!t?.negate,r={type:`CharacterSet`,kind:e};return(e===`digit`||e===`hex`||e===`newline`||e===`space`||e===`word`)&&(r.negate=n),(e===`text_segment`||e===`newline`&&!n)&&(r.variableLength=!0),r}function Gf(e,t={}){if(e===`keep`)return{type:`Directive`,kind:e};if(e===`flags`)return{type:`Directive`,kind:e,flags:Ld(t.flags)};throw Error(`Unexpected directive kind "${e}"`)}function Kf(e){return{type:`Flags`,...e}}function qf(e){let t=e?.atomic,n=e?.flags;if(t&&n)throw Error(`Atomic group cannot have flags`);return{type:`Group`,...t&&{atomic:t},...n&&{flags:n},body:np(e?.body)}}function Jf(e){let t={behind:!1,negate:!1,...e};return{type:`LookaroundAssertion`,kind:t.behind?`lookbehind`:`lookahead`,negate:t.negate,body:np(e?.body)}}function Yf(e,t,n){return{type:`NamedCallout`,kind:e,tag:t,arguments:n}}function Xf(e,t){let n=!!t?.negate;if(!Id.has(e))throw Error(`Invalid POSIX class "${e}"`);return{type:`CharacterSet`,kind:`posix`,value:e,negate:n}}function Zf(e,t,n,r){if(t>n)throw Error(`Invalid reversed quantifier range`);return{type:`Quantifier`,kind:e,min:t,max:n,body:r}}function Qf(e,t){return{type:`Regex`,body:np(t?.body),flags:e}}function $f(e){return{type:`Subroutine`,ref:e}}function ep(e,t){let n={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t},r=n.unicodePropertyMap?.get(cp(e));if(!r){if(n.normalizeUnknownPropertyNames)r=sp(e);else if(n.unicodePropertyMap&&!n.skipPropertyNameValidation)throw Error(J`Invalid Unicode property "\p{${e}}"`)}return{type:`CharacterSet`,kind:`property`,value:r??e,negate:n.negate}}function tp({flags:e,kind:t,name:n,negate:r,number:i}){switch(t){case`absence_repeater`:return If(`repeater`);case`atomic`:return qf({atomic:!0});case`capturing`:return Bf(i,{name:n});case`group`:return qf({flags:e});case`lookahead`:case`lookbehind`:return Jf({behind:t===`lookbehind`,negate:r});default:throw Error(`Unexpected group kind "${t}"`)}}function np(e){if(e===void 0)e=[Lf()];else if(!Array.isArray(e)||!e.length||!e.every(e=>e.type===`Alternative`))throw Error(`Invalid body; expected array of one or more Alternative nodes`);return e}function rp(e){if(e===void 0)e=[];else if(!Array.isArray(e)||!e.every(e=>!!e.type))throw Error(`Invalid body; expected array of nodes`);return e}function ip(e){return e.type===`LookaroundAssertion`&&e.kind===`lookahead`}function ap(e){return e.type===`LookaroundAssertion`&&e.kind===`lookbehind`}function op(e){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(e)}function sp(e){return e.trim().replace(/[- _]+/g,`_`).replace(/[A-Z][a-z]+(?=[A-Z])/g,`$&_`).replace(/[A-Za-z]+/g,e=>e[0].toUpperCase()+e.slice(1).toLowerCase())}function cp(e){return e.replace(/[- _]+/g,``).toLowerCase()}function lp(e,t){let n=t;return Ld(e,`Unclosed character class${n?.type===`Character`&&n.value===93&&n.raw===`]`?` (started with "]")`:``}`)}function up(e){return Ld(e,`Unclosed group`)}function dp(e,t,n=null){function r(e,t){for(let n=0;n<e.length;n++){let r=i(e[n],t,n,e);n=Math.max(-1,n+r)}}function i(a,o=null,s=null,c=null){let l=0,u=!1,d={node:a,parent:o,key:s,container:c,root:e,remove(){fp(c).splice(Math.max(0,pp(s)+l),1),l--,u=!0},removeAllNextSiblings(){return fp(c).splice(pp(s)+1)},removeAllPrevSiblings(){let e=pp(s)+l;return l-=e,fp(c).splice(0,Math.max(0,e))},replaceWith(e,t={}){let n=!!t.traverse;c?c[Math.max(0,pp(s)+l)]=e:Ld(o,`Can't replace root node`)[s]=e,n&&i(e,o,s,c),u=!0},replaceWithMultiple(e,t={}){let n=!!t.traverse;if(fp(c).splice(Math.max(0,pp(s)+l),1,...e),l+=e.length-1,n){let t=0;for(let n=0;n<e.length;n++)t+=i(e[n],o,pp(s)+n+t,c)}u=!0},skip(){u=!0}},{type:f}=a,p=t[`*`],m=t[f],h=typeof p==`function`?p:p?.enter,g=typeof m==`function`?m:m?.enter;if(h?.(d,n),g?.(d,n),!u)switch(f){case`AbsenceFunction`:case`Alternative`:case`CapturingGroup`:case`CharacterClass`:case`Group`:case`LookaroundAssertion`:r(a.body,a);break;case`Assertion`:case`Backreference`:case`Character`:case`CharacterSet`:case`Directive`:case`Flags`:case`NamedCallout`:case`Subroutine`:break;case`CharacterClassRange`:i(a.min,a,`min`),i(a.max,a,`max`);break;case`Quantifier`:i(a.body,a,`body`);break;case`Regex`:r(a.body,a),i(a.flags,a,`flags`);break;default:throw Error(`Unexpected node type "${f}"`)}return m?.exit?.(d,n),p?.exit?.(d,n),l}return i(e),e}function fp(e){if(!Array.isArray(e))throw Error(`Container expected`);return e}function pp(e){if(typeof e!=`number`)throw Error(`Numeric key expected`);return e}var mp=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function hp(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function gp(e,t,n,r){return e.slice(0,t)+r+e.slice(t+n.length)}var _p=Object.freeze({DEFAULT:`DEFAULT`,CHAR_CLASS:`CHAR_CLASS`});function vp(e,t,n,r){let i=new RegExp(String.raw`${t}|(?<$skip>\[\^?|\\?.)`,`gsu`),a=[!1],o=0,s=``;for(let t of e.matchAll(i)){let{0:e,groups:{$skip:i}}=t;if(!i&&(!r||r===_p.DEFAULT==!o)){n instanceof Function?s+=n(t,{context:o?_p.CHAR_CLASS:_p.DEFAULT,negated:a[a.length-1]}):s+=n;continue}e[0]===`[`?(o++,a.push(e[1]===`^`)):e===`]`&&o&&(o--,a.pop()),s+=e}return s}function yp(e,t,n,r){vp(e,t,n,r)}function bp(e,t,n=0,r){if(!new RegExp(t,`su`).test(e))return null;let i=RegExp(`${t}|(?<$skip>\\\\?.)`,`gsu`);i.lastIndex=n;let a=0,o;for(;o=i.exec(e);){let{0:e,groups:{$skip:t}}=o;if(!t&&(!r||r===_p.DEFAULT==!a))return o;e===`[`?a++:e===`]`&&a&&a--,i.lastIndex==o.index&&i.lastIndex++}return null}function xp(e,t,n){return!!bp(e,t,0,n)}function Sp(e,t){let n=/\\?./gsu;n.lastIndex=t;let r=e.length,i=0,a=1,o;for(;o=n.exec(e);){let[e]=o;if(e===`[`)i++;else if(i)e===`]`&&i--;else if(e===`(`)a++;else if(e===`)`&&(a--,!a)){r=o.index;break}}return e.slice(t,r)}var Cp=new RegExp(String.raw`(?<noncapturingStart>${mp})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,`gsu`);function wp(e,t){let n=t?.hiddenCaptures??[],r=t?.captureTransfers??new Map;if(!/\(\?>/.test(e))return{pattern:e,captureTransfers:r,hiddenCaptures:n};let i=[0],a=[],o=0,s=0,c=NaN,l;do{l=!1;let t=0,u=0,d=!1,f;for(Cp.lastIndex=Number.isNaN(c)?0:c+7;f=Cp.exec(e);){let{0:p,index:m,groups:{capturingStart:h,noncapturingStart:g}}=f;if(p===`[`)t++;else if(t)p===`]`&&t--;else if(p===`(?>`&&!d)c=m,d=!0;else if(d&&g)u++;else if(h)d?u++:(o++,i.push(o+s));else if(p===`)`&&d){if(!u){s++;let t=o+s;if(e=`${e.slice(0,c)}(?:(?=(${e.slice(c+3,m)}))<$$${t}>)${e.slice(m+1)}`,l=!0,a.push(t),hp(n,t),r.size){let e=new Map;r.forEach((n,r)=>{e.set(r>=t?r+1:r,n.map(e=>e>=t?e+1:e))}),r=e}break}u--}}}while(l);return n.push(...a),e=vp(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:e,groups:{backrefNum:t,wrappedBackrefNum:n}})=>{if(t){let n=+t;if(n>i.length-1)throw Error(`Backref "${e}" greater than number of captures`);return`\\${i[n]}`}return`\\${n}`},_p.DEFAULT),{pattern:e,captureTransfers:r,hiddenCaptures:n}}var Tp=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,Ep=new RegExp(String.raw`
70
- \\(?: \d+
71
- | c[A-Za-z]
72
- | [gk]<[^>]+>
73
- | [pPu]\{[^\}]+\}
74
- | u[A-Fa-f\d]{4}
75
- | x[A-Fa-f\d]{2}
76
- )
77
- | \((?: \? (?: [:=!>]
78
- | <(?:[=!]|[^>]+>)
79
- | [A-Za-z\-]+:
80
- | \(DEFINE\)
81
- ))?
82
- | (?<qBase>${Tp})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
83
- | \\?.
84
- `.replace(/\s+/g,``),`gsu`);function Dp(e){if(!RegExp(`${Tp}\\+`).test(e))return{pattern:e};let t=[],n=null,r=null,i=``,a=0,o;for(Ep.lastIndex=0;o=Ep.exec(e);){let{0:s,index:c,groups:{qBase:l,qMod:u,invalidQ:d}}=o;if(s===`[`)a||(r=c),a++;else if(s===`]`)a?a--:r=null;else if(!a){if(u===`+`&&i&&!i.startsWith(`(`)){if(d)throw Error(`Invalid quantifier "${s}"`);let t=-1;if(/^\{\d+\}$/.test(l))e=gp(e,c+l.length,u,``);else{if(i===`)`||i===`]`){let t=i===`)`?n:r;if(t===null)throw Error(`Invalid unmatched "${i}"`);e=`${e.slice(0,t)}(?>${e.slice(t,c)}${l})${e.slice(c+s.length)}`}else e=`${e.slice(0,c-i.length)}(?>${i}${l})${e.slice(c+s.length)}`;t+=4}Ep.lastIndex+=t}else s[0]===`(`?t.push(c):s===`)`&&(n=t.length?t.pop():null)}i=s}return{pattern:e}}var Op=String.raw,kp=Op`\(\?R=(?<rDepth>[^\)]+)\)|${Op`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`}`,Ap=Op`\(\?<(?![=!])(?<captureName>[^>]+)>`,jp=Op`${Ap}|(?<unnamed>\()(?!\?)`,Mp=new RegExp(Op`${Ap}|${kp}|\(\?|\\?.`,`gsu`),Np=`Cannot use multiple overlapping recursions`;function Pp(e,t){let{hiddenCaptures:n,mode:r}={hiddenCaptures:[],mode:`plugin`,...t},i=t?.captureTransfers??new Map;if(!new RegExp(kp,`su`).test(e))return{pattern:e,captureTransfers:i,hiddenCaptures:n};if(r===`plugin`&&xp(e,Op`\(\?\(DEFINE\)`,_p.DEFAULT))throw Error(`DEFINE groups cannot be used with recursion`);let a=[],o=xp(e,Op`\\[1-9]`,_p.DEFAULT),s=new Map,c=[],l=!1,u=0,d=0,f;for(Mp.lastIndex=0;f=Mp.exec(e);){let{0:t,groups:{captureName:p,rDepth:m,gRNameOrNum:h,gRDepth:g}}=f;if(t===`[`)u++;else if(u)t===`]`&&u--;else{if(m){if(Fp(m),l)throw Error(Np);if(o)throw Error(`${r===`external`?`Backrefs`:`Numbered backrefs`} cannot be used with global recursion`);let t=e.slice(0,f.index),s=e.slice(Mp.lastIndex);if(xp(s,kp,_p.DEFAULT))throw Error(Np);let c=m-1;e=Ip(t,s,c,!1,n,a,d),i=zp(i,t,c,a.length,0,d);break}if(h){Fp(g);let u=!1;for(let e of c)if(e.name===h||e.num===+h){if(u=!0,e.hasRecursedWithin)throw Error(Np);break}if(!u)throw Error(Op`Recursive \g cannot be used outside the referenced group "${r===`external`?h:Op`\g<${h}&R=${g}>`}"`);let p=s.get(h),m=Sp(e,p);if(o&&xp(m,Op`${Ap}|\((?!\?)`,_p.DEFAULT))throw Error(`${r===`external`?`Backrefs`:`Numbered backrefs`} cannot be used with recursion of capturing groups`);let _=e.slice(p,f.index),v=m.slice(_.length+t.length),y=a.length,b=g-1,x=Ip(_,v,b,!0,n,a,d);i=zp(i,_,b,a.length-y,y,d),e=`${e.slice(0,p)}${x}${e.slice(p+m.length)}`,Mp.lastIndex+=x.length-t.length-_.length-v.length,c.forEach(e=>e.hasRecursedWithin=!0),l=!0}else if(p)d++,s.set(String(d),Mp.lastIndex),s.set(p,Mp.lastIndex),c.push({num:d,name:p});else if(t[0]===`(`){let e=t===`(`;e&&(d++,s.set(String(d),Mp.lastIndex)),c.push(e?{num:d}:{})}else t===`)`&&c.pop()}}return n.push(...a),{pattern:e,captureTransfers:i,hiddenCaptures:n}}function Fp(e){let t=`Max depth must be integer between 2 and 100; used ${e}`;if(!/^[1-9]\d*$/.test(e)||(e=+e,e<2||e>100))throw Error(t)}function Ip(e,t,n,r,i,a,o){let s=new Set;r&&yp(e+t,Ap,({groups:{captureName:e}})=>{s.add(e)},_p.DEFAULT);let c=[n,r?s:null,i,a,o];return`${e}${Lp(`(?:${e}`,`forward`,...c)}(?:)${Lp(`${t})`,`backward`,...c)}${t}`}function Lp(e,t,n,r,i,a,o){let s=e=>t===`forward`?e+2:n-e+2-1,c=``;for(let t=0;t<n;t++){let n=s(t);c+=vp(e,Op`${jp}|\\k<(?<backref>[^>]+)>`,({0:e,groups:{captureName:t,unnamed:s,backref:c}})=>{if(c&&r&&!r.has(c))return e;let l=`_$${n}`;if(s||t){let n=o+a.length+1;return a.push(n),Rp(i,n),s?e:`(?<${t}${l}>`}return Op`\k<${c}${l}>`},_p.DEFAULT)}return c}function Rp(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function zp(e,t,n,r,i,a){if(e.size&&r){let o=0;yp(t,jp,()=>o++,_p.DEFAULT);let s=a-o+i,c=new Map;return e.forEach((e,t)=>{let i=(r-o*n)/n,a=o*n,l=t>s+o?t+r:t,u=[];for(let t of e)if(t<=s)u.push(t);else if(t>s+o+i)u.push(t+r);else if(t<=s+o)for(let e=0;e<=n;e++)u.push(t+o*e);else for(let e=0;e<=n;e++)u.push(t+a+i*e);c.set(l,u)}),c}return e}var Y=String.fromCodePoint,X=String.raw,Bp={},Vp=globalThis.RegExp;Bp.flagGroups=(()=>{try{new Vp(`(?i:)`)}catch{return!1}return!0})(),Bp.unicodeSets=(()=>{try{new Vp(`[[]]`,`v`)}catch{return!1}return!0})(),Bp.bugFlagVLiteralHyphenIsRange=Bp.unicodeSets?(()=>{try{new Vp(X`[\d\-a]`,`v`)}catch{return!0}return!1})():!1,Bp.bugNestedClassIgnoresNegation=Bp.unicodeSets&&new Vp(`[[^a]]`,`v`).test(`a`);function Hp(e,{enable:t,disable:n}){return{dotAll:!n?.dotAll&&!!(t?.dotAll||e.dotAll),ignoreCase:!n?.ignoreCase&&!!(t?.ignoreCase||e.ignoreCase)}}function Up(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}function Wp(e,t){return Kp[e]>=Kp[t]}function Gp(e,t){if(e==null)throw Error(t??`Value expected`);return e}var Kp={ES2025:2025,ES2024:2024,ES2018:2018},qp={auto:`auto`,ES2025:`ES2025`,ES2024:`ES2024`,ES2018:`ES2018`};function Jp(e={}){if({}.toString.call(e)!==`[object Object]`)throw Error(`Unexpected options`);if(e.target!==void 0&&!qp[e.target])throw Error(`Unexpected target "${e.target}"`);let t={accuracy:`default`,avoidSubclass:!1,flags:``,global:!1,hasIndices:!1,lazyCompileLength:1/0,target:`auto`,verbose:!1,...e,rules:{allowOrphanBackrefs:!1,asciiWordBoundaries:!1,captureGroup:!1,recursionLimit:20,singleline:!1,...e.rules}};return t.target===`auto`&&(t.target=Bp.flagGroups?`ES2025`:Bp.unicodeSets?`ES2024`:`ES2018`),t}var Yp=`[ -\r ]`,Xp=new Set([Y(304),Y(305)]),Zp=X`[\p{L}\p{M}\p{N}\p{Pc}]`;function Qp(e){if(Xp.has(e))return[e];let t=new Set,n=e.toLowerCase(),r=n.toUpperCase(),i=nm.get(n),a=em.get(n),o=tm.get(n);return[...r].length===1&&t.add(r),o&&t.add(o),i&&t.add(i),t.add(n),a&&t.add(a),[...t]}var $p=new Map(`C Other
85
- Cc Control cntrl
86
- Cf Format
87
- Cn Unassigned
88
- Co Private_Use
89
- Cs Surrogate
90
- L Letter
91
- LC Cased_Letter
92
- Ll Lowercase_Letter
93
- Lm Modifier_Letter
94
- Lo Other_Letter
95
- Lt Titlecase_Letter
96
- Lu Uppercase_Letter
97
- M Mark Combining_Mark
98
- Mc Spacing_Mark
99
- Me Enclosing_Mark
100
- Mn Nonspacing_Mark
101
- N Number
102
- Nd Decimal_Number digit
103
- Nl Letter_Number
104
- No Other_Number
105
- P Punctuation punct
106
- Pc Connector_Punctuation
107
- Pd Dash_Punctuation
108
- Pe Close_Punctuation
109
- Pf Final_Punctuation
110
- Pi Initial_Punctuation
111
- Po Other_Punctuation
112
- Ps Open_Punctuation
113
- S Symbol
114
- Sc Currency_Symbol
115
- Sk Modifier_Symbol
116
- Sm Math_Symbol
117
- So Other_Symbol
118
- Z Separator
119
- Zl Line_Separator
120
- Zp Paragraph_Separator
121
- Zs Space_Separator
122
- ASCII
123
- ASCII_Hex_Digit AHex
124
- Alphabetic Alpha
125
- Any
126
- Assigned
127
- Bidi_Control Bidi_C
128
- Bidi_Mirrored Bidi_M
129
- Case_Ignorable CI
130
- Cased
131
- Changes_When_Casefolded CWCF
132
- Changes_When_Casemapped CWCM
133
- Changes_When_Lowercased CWL
134
- Changes_When_NFKC_Casefolded CWKCF
135
- Changes_When_Titlecased CWT
136
- Changes_When_Uppercased CWU
137
- Dash
138
- Default_Ignorable_Code_Point DI
139
- Deprecated Dep
140
- Diacritic Dia
141
- Emoji
142
- Emoji_Component EComp
143
- Emoji_Modifier EMod
144
- Emoji_Modifier_Base EBase
145
- Emoji_Presentation EPres
146
- Extended_Pictographic ExtPict
147
- Extender Ext
148
- Grapheme_Base Gr_Base
149
- Grapheme_Extend Gr_Ext
150
- Hex_Digit Hex
151
- IDS_Binary_Operator IDSB
152
- IDS_Trinary_Operator IDST
153
- ID_Continue IDC
154
- ID_Start IDS
155
- Ideographic Ideo
156
- Join_Control Join_C
157
- Logical_Order_Exception LOE
158
- Lowercase Lower
159
- Math
160
- Noncharacter_Code_Point NChar
161
- Pattern_Syntax Pat_Syn
162
- Pattern_White_Space Pat_WS
163
- Quotation_Mark QMark
164
- Radical
165
- Regional_Indicator RI
166
- Sentence_Terminal STerm
167
- Soft_Dotted SD
168
- Terminal_Punctuation Term
169
- Unified_Ideograph UIdeo
170
- Uppercase Upper
171
- Variation_Selector VS
172
- White_Space space
173
- XID_Continue XIDC
174
- XID_Start XIDS`.split(/\s/).map(e=>[cp(e),e])),em=new Map([[`s`,Y(383)],[Y(383),`s`]]),tm=new Map([[Y(223),Y(7838)],[Y(107),Y(8490)],[Y(229),Y(8491)],[Y(969),Y(8486)]]),nm=new Map([am(453),am(456),am(459),am(498),...om(8072,8079),...om(8088,8095),...om(8104,8111),am(8124),am(8140),am(8188)]),rm=new Map([[`alnum`,X`[\p{Alpha}\p{Nd}]`],[`alpha`,X`\p{Alpha}`],[`ascii`,X`\p{ASCII}`],[`blank`,X`[\p{Zs}\t]`],[`cntrl`,X`\p{Cc}`],[`digit`,X`\p{Nd}`],[`graph`,X`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],[`lower`,X`\p{Lower}`],[`print`,X`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],[`punct`,X`[\p{P}\p{S}]`],[`space`,X`\p{space}`],[`upper`,X`\p{Upper}`],[`word`,X`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],[`xdigit`,X`\p{AHex}`]]);function im(e,t){let n=[];for(let r=e;r<=t;r++)n.push(r);return n}function am(e){let t=Y(e);return[t.toLowerCase(),t]}function om(e,t){return im(e,t).map(e=>am(e))}var sm=new Set([`Lower`,`Lowercase`,`Upper`,`Uppercase`,`Ll`,`Lowercase_Letter`,`Lt`,`Titlecase_Letter`,`Lu`,`Uppercase_Letter`]);function cm(e,t){let n={accuracy:`default`,asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:`ES2025`,...t};fm(e);let r={accuracy:n.accuracy,asciiWordBoundaries:n.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:Wp(n.bestEffortTarget,`ES2024`),passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:e.flags.digitIsAscii,spaceIsAscii:e.flags.spaceIsAscii,wordIsAscii:e.flags.wordIsAscii};dp(e,lm,r);let i={dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},a={currentFlags:i,prevFlags:null,globalFlags:i,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:r.subroutineRefMap};return dp(e,um,a),dp(e,dm,{groupsByName:a.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:a.reffedNodesByReferencer}),e._originMap=a.groupOriginByCopy,e._strategy=r.strategy,e}var lm={AbsenceFunction({node:e,parent:t,replaceWith:n}){let{body:r,kind:i}=e;if(i===`repeater`){let e=qf();e.body[0].body.push(Jf({negate:!0,body:r}),ep(`Any`));let i=qf();i.body[0].body.push(Zf(`greedy`,0,1/0,e)),n(Z(i,t),{traverse:!0})}else throw Error(`Unsupported absence function "(?~|"`)},Alternative:{enter({node:e,parent:t,key:n},{flagDirectivesByAlt:r}){let i=e.body.filter(e=>e.kind===`flags`);for(let e=n+1;e<t.body.length;e++){let n=t.body[e];Up(r,n,[]).push(...i)}},exit({node:e},{flagDirectivesByAlt:t}){if(t.get(e)?.length){let n=ym(t.get(e));if(n){let t=qf({flags:n});t.body[0].body=e.body,e.body=[Z(t,e)]}}}},Assertion({node:e,parent:t,key:n,container:r,root:i,remove:a,replaceWith:o},s){let{kind:c,negate:l}=e,{asciiWordBoundaries:u,avoidSubclass:d,supportedGNodes:f,wordIsAscii:p}=s;if(c===`text_segment_boundary`)throw Error(`Unsupported text segment boundary "\\${l?`Y`:`y`}"`);if(c===`line_end`)o(Z(Jf({body:[Lf({body:[Rf(`string_end`)]}),Lf({body:[Vf(10)]})]}),t));else if(c===`line_start`)o(Z(Om(X`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),t));else if(c===`search_start`){if(f.has(e))i.flags.sticky=!0,a();else{let e=r[n-1];if(e&&Tm(e))o(Z(Jf({negate:!0}),t));else if(d)throw Error(X`Uses "\G" in a way that requires a subclass`);else o(Am(Rf(`string_start`),t)),s.strategy=`clip_search`}}else if(c!==`string_end`&&c!==`string_start`){if(c===`string_end_newline`)o(Z(Om(X`(?=\n?\z)`),t));else if(c===`word_boundary`){if(!p&&!u){let e=`(?:(?<=${Zp})(?!${Zp})|(?<!${Zp})(?=${Zp}))`,n=`(?:(?<=${Zp})(?=${Zp})|(?<!${Zp})(?!${Zp}))`;o(Z(Om(l?n:e),t))}}else throw Error(`Unexpected assertion kind "${c}"`)}},Backreference({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n==`string`&&!Dm(n)&&(n=vm(n,t),e.ref=n)},CapturingGroup({node:e},{jsGroupNameMap:t,subroutineRefMap:n}){let{name:r}=e;r&&!Dm(r)&&(r=vm(r,t),e.name=r),n.set(e.number,e),r&&n.set(r,e)},CharacterClassRange({node:e,parent:t,replaceWith:n}){t.kind===`intersection`&&n(Z(Hf({body:[e]}),t),{traverse:!0})},CharacterSet({node:e,parent:t,replaceWith:n},{accuracy:r,minTargetEs2024:i,digitIsAscii:a,spaceIsAscii:o,wordIsAscii:s}){let{kind:c,negate:l,value:u}=e;if(a&&(c===`digit`||u===`digit`)){n(Am(Wf(`digit`,{negate:l}),t));return}if(o&&(c===`space`||u===`space`)){n(Z(km(Om(Yp),l),t));return}if(s&&(c===`word`||u===`word`)){n(Am(Wf(`word`,{negate:l}),t));return}if(c===`any`)n(Am(ep(`Any`),t));else if(c===`digit`)n(Am(ep(`Nd`,{negate:l}),t));else if(c!==`dot`){if(c===`text_segment`){if(r===`strict`)throw Error(X`Use of "\X" requires non-strict accuracy`);let e=`\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?`,a=X`\p{RI}{2}|${e}(?:\u200D${e})*`;n(Z(Om(X`(?>\r\n|${i?X`\p{RGI_Emoji}`:a}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if(c===`hex`)n(Am(ep(`AHex`,{negate:l}),t));else if(c===`newline`)n(Z(Om(l?`[^
175
- ]`:`(?>\r
176
- ?|[
177
- \v\f…\u2028\u2029])`),t));else if(c===`posix`){if(!i&&(u===`graph`||u===`print`)){if(r===`strict`)throw Error(`POSIX class "${u}" requires min target ES2024 or non-strict accuracy`);let e={graph:`!-~`,print:` -~`}[u];l&&(e=`\0-${Y(e.codePointAt(0)-1)}${Y(e.codePointAt(2)+1)}-\u{10FFFF}`),n(Z(Om(`[${e}]`),t))}else n(Z(km(Om(rm.get(u)),l),t))}else if(c===`property`)$p.has(cp(u))||(e.key=`sc`);else if(c===`space`)n(Am(ep(`space`,{negate:l}),t));else if(c===`word`)n(Z(km(Om(Zp),l),t));else throw Error(`Unexpected character set kind "${c}"`)}},Directive({node:e,parent:t,root:n,remove:r,replaceWith:i,removeAllPrevSiblings:a,removeAllNextSiblings:o}){let{kind:s,flags:c}=e;if(s===`flags`){if(!c.enable&&!c.disable)r();else{let e=qf({flags:c});e.body[0].body=o(),i(Z(e,t),{traverse:!0})}}else if(s===`keep`){let e=n.body[0],r=n.body.length===1&&wf(e,{type:`Group`})&&e.body[0].body.length===1?e.body[0]:n;if(t.parent!==r||r.body.length>1)throw Error(X`Uses "\K" in a way that's unsupported`);let o=Jf({behind:!0});o.body[0].body=a(),i(Z(o,t))}else throw Error(`Unexpected directive kind "${s}"`)},Flags({node:e,parent:t}){if(e.posixIsAscii)throw Error(`Unsupported flag "P"`);if(e.textSegmentMode===`word`)throw Error(`Unsupported flag "y{w}"`);[`digitIsAscii`,`extended`,`posixIsAscii`,`spaceIsAscii`,`wordIsAscii`,`textSegmentMode`].forEach(t=>delete e[t]),Object.assign(e,{global:!1,hasIndices:!1,multiline:!1,sticky:e.sticky??!1}),t.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:e}){if(!e.flags)return;let{enable:t,disable:n}=e.flags;t?.extended&&delete t.extended,n?.extended&&delete n.extended,t?.dotAll&&n?.dotAll&&delete t.dotAll,t?.ignoreCase&&n?.ignoreCase&&delete t.ignoreCase,t&&!Object.keys(t).length&&delete e.flags.enable,n&&!Object.keys(n).length&&delete e.flags.disable,!e.flags.enable&&!e.flags.disable&&delete e.flags},LookaroundAssertion({node:e},t){let{kind:n}=e;n===`lookbehind`&&(t.passedLookbehind=!0)},NamedCallout({node:e,parent:t,replaceWith:n}){let{kind:r}=e;if(r===`fail`)n(Z(Jf({negate:!0}),t));else throw Error(`Unsupported named callout "(*${r.toUpperCase()}"`)},Quantifier({node:e}){if(e.body.type===`Quantifier`){let t=qf();t.body[0].body.push(e.body),e.body=Z(t,e)}},Regex:{enter({node:e},{supportedGNodes:t}){let n=[],r=!1,i=!1;for(let t of e.body)if(t.body.length===1&&t.body[0].kind===`search_start`)t.body.pop();else{let e=Sm(t.body);e?(r=!0,Array.isArray(e)?n.push(...e):n.push(e)):i=!0}r&&!i&&n.forEach(e=>t.add(e))},exit(e,{accuracy:t,passedLookbehind:n,strategy:r}){if(t===`strict`&&n&&r)throw Error(X`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n==`string`&&!Dm(n)&&(n=vm(n,t),e.ref=n)}},um={Backreference({node:e},{multiplexCapturesToLeftByRef:t,reffedNodesByReferencer:n}){let{orphan:r,ref:i}=e;r||n.set(e,[...t.get(i).map(({node:e})=>e)])},CapturingGroup:{enter({node:e,parent:t,replaceWith:n,skip:r},{groupOriginByCopy:i,groupsByName:a,multiplexCapturesToLeftByRef:o,openRefs:s,reffedNodesByReferencer:c}){let l=i.get(e);if(l&&s.has(e.number)){let r=Am(gm(e.number),t);c.set(r,s.get(e.number)),n(r);return}s.set(e.number,e),o.set(e.number,[]),e.name&&Up(o,e.name,[]);let u=o.get(e.name??e.number);for(let t=0;t<u.length;t++){let n=u[t];if(l===n.node||l&&l===n.origin||e===n.origin){u.splice(t,1);break}}if(o.get(e.number).push({node:e,origin:l}),e.name&&o.get(e.name).push({node:e,origin:l}),e.name){let t=Up(a,e.name,new Map),n=!1;if(l)n=!0;else for(let e of t.values())if(!e.hasDuplicateNameToRemove){n=!0;break}a.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:n})}},exit({node:e},{openRefs:t}){t.get(e.number)===e&&t.delete(e.number)}},Group:{enter({node:e},t){t.prevFlags=t.currentFlags,e.flags&&(t.currentFlags=Hp(t.currentFlags,e.flags))},exit(e,t){t.currentFlags=t.prevFlags}},Subroutine({node:e,parent:t,replaceWith:n},r){let{isRecursive:i,ref:a}=e;if(i){let n=t;for(;(n=n.parent)&&(n.type!==`CapturingGroup`||n.name!==a&&n.number!==a););r.reffedNodesByReferencer.set(e,n);return}let o=r.subroutineRefMap.get(a),s=a===0,c=s?gm(0):hm(o,r.groupOriginByCopy,null),l=c;if(!s){let e=ym(_m(o,e=>e.type===`Group`&&!!e.flags)),t=e?Hp(r.globalFlags,e):r.globalFlags;pm(t,r.currentFlags)||(l=qf({flags:bm(t)}),l.body[0].body.push(c))}n(Z(l,t),{traverse:!s})}},dm={Backreference({node:e,parent:t,replaceWith:n},r){if(e.orphan){r.highestOrphanBackref=Math.max(r.highestOrphanBackref,e.ref);return}let i=r.reffedNodesByReferencer.get(e).filter(t=>mm(t,e));i.length?i.length>1?n(Z(qf({atomic:!0,body:i.reverse().map(e=>Lf({body:[zf(e.number)]}))}),t)):e.ref=i[0].number:n(Z(Jf({negate:!0}),t))},CapturingGroup({node:e},t){e.number=++t.numCapturesToLeft,e.name&&t.groupsByName.get(e.name).get(e).hasDuplicateNameToRemove&&delete e.name},Regex:{exit({node:e},t){let n=Math.max(t.highestOrphanBackref-t.numCapturesToLeft,0);for(let t=0;t<n;t++){let t=Bf();e.body.at(-1).body.push(t)}}},Subroutine({node:e},t){!e.isRecursive||e.ref===0||(e.ref=t.reffedNodesByReferencer.get(e).number)}};function fm(e){dp(e,{"*"({node:e,parent:t}){e.parent=t}})}function pm(e,t){return e.dotAll===t.dotAll&&e.ignoreCase===t.ignoreCase}function mm(e,t){let n=t;do{if(n.type===`Regex`)return!1;if(n.type===`Alternative`)continue;if(n===e)return!1;let t=xm(n.parent);for(let r of t){if(r===n)break;if(r===e||Cm(r,e))return!0}}while(n=n.parent);throw Error(`Unexpected path`)}function hm(e,t,n,r){let i=Array.isArray(e)?[]:{};for(let[a,o]of Object.entries(e))a===`parent`?i.parent=Array.isArray(n)?r:n:o&&typeof o==`object`?i[a]=hm(o,t,i,n):(a===`type`&&o===`CapturingGroup`&&t.set(i,t.get(e)??e),i[a]=o);return i}function gm(e){let t=$f(e);return t.isRecursive=!0,t}function _m(e,t){let n=[];for(;e=e.parent;)(!t||t(e))&&n.push(e);return n}function vm(e,t){if(t.has(e))return t.get(e);let n=`$${t.size}_${e.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/gu,`_`)}`;return t.set(e,n),n}function ym(e){let t=[`dotAll`,`ignoreCase`],n={enable:{},disable:{}};return e.forEach(({flags:e})=>{t.forEach(t=>{e.enable?.[t]&&(delete n.disable[t],n.enable[t]=!0),e.disable?.[t]&&(n.disable[t]=!0)})}),Object.keys(n.enable).length||delete n.enable,Object.keys(n.disable).length||delete n.disable,n.enable||n.disable?n:null}function bm({dotAll:e,ignoreCase:t}){let n={};return(e||t)&&(n.enable={},e&&(n.enable.dotAll=!0),t&&(n.enable.ignoreCase=!0)),(!e||!t)&&(n.disable={},!e&&(n.disable.dotAll=!0),!t&&(n.disable.ignoreCase=!0)),n}function xm(e){if(!e)throw Error(`Node expected`);let{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function Sm(e){let t=e.find(e=>e.kind===`search_start`||Em(e,{negate:!1})||!wm(e));if(!t)return null;if(t.kind===`search_start`)return t;if(t.type===`LookaroundAssertion`)return t.body[0].body[0];if(t.type===`CapturingGroup`||t.type===`Group`){let e=[];for(let n of t.body){let t=Sm(n.body);if(!t)return null;Array.isArray(t)?e.push(...t):e.push(t)}return e}return null}function Cm(e,t){let n=xm(e)??[];for(let e of n)if(e===t||Cm(e,t))return!0;return!1}function wm({type:e}){return e===`Assertion`||e===`Directive`||e===`LookaroundAssertion`}function Tm(e){let t=[`Character`,`CharacterClass`,`CharacterSet`];return t.includes(e.type)||e.type===`Quantifier`&&e.min&&t.includes(e.body.type)}function Em(e,t){let n={negate:null,...t};return e.type===`LookaroundAssertion`&&(n.negate===null||e.negate===n.negate)&&e.body.length===1&&wf(e.body[0],{type:`Assertion`,kind:`search_start`})}function Dm(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function Om(e,t){let n=Df(e,{...t,unicodePropertyMap:$p}).body;return n.length>1||n[0].body.length>1?qf({body:n}):n[0].body[0]}function km(e,t){return e.negate=t,e}function Am(e,t){return e.parent=t,e}function Z(e,t){return fm(e),e.parent=t,e}function jm(e,t){let n=Jp(t),r=Wp(n.target,`ES2024`),i=Wp(n.target,`ES2025`),a=n.rules.recursionLimit;if(!Number.isInteger(a)||a<2||a>20)throw Error(`Invalid recursionLimit; use 2-20`);let o=null,s=null;if(!i){let t=[e.flags.ignoreCase];dp(e,Mm,{getCurrentModI:()=>t.at(-1),popModI(){t.pop()},pushModI(e){t.push(e)},setHasCasedChar(){t.at(-1)?o=!0:s=!0}})}let c={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||o)&&!s)},l=e,u={accuracy:n.accuracy,appliedGlobalFlags:c,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:l,originMap:e._originMap,recursionLimit:a,useAppliedIgnoreCase:!!(!i&&o&&s),useFlagMods:i,useFlagV:r,verbose:n.verbose};function d(e){return u.lastNode=l,l=e,Gp(Nm[e.type],`Unexpected node type "${e.type}"`)(e,u,d)}let f={pattern:e.body.map(d).join(`|`),flags:d(e.flags),options:{...e.options}};return r||(delete f.options.force.v,f.options.disable.v=!0,f.options.unicodeSetsPlugin=null),f._captureTransfers=new Map,f._hiddenCaptures=[],u.captureMap.forEach((e,t)=>{e.hidden&&f._hiddenCaptures.push(t),e.transferTo&&Up(f._captureTransfers,e.transferTo,[]).push(t)}),f}var Mm={"*":{enter({node:e},t){if(Gm(e)){let n=t.getCurrentModI();t.pushModI(e.flags?Hp({ignoreCase:n},e.flags).ignoreCase:n)}},exit({node:e},t){Gm(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){zm(Y(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},n){t(),Bm(e,{firstOnly:!0}).length&&n.setHasCasedChar()},CharacterSet({node:e},t){e.kind===`property`&&sm.has(e.value)&&t.setHasCasedChar()}},Nm={Alternative({body:e},t,n){return e.map(n).join(``)},Assertion({kind:e,negate:t}){if(e===`string_end`)return`$`;if(e===`string_start`)return`^`;if(e===`word_boundary`)return t?X`\B`:X`\b`;throw Error(`Unexpected assertion kind "${e}"`)},Backreference({ref:e},t){if(typeof e!=`number`)throw Error(`Unexpected named backref in transformed AST`);if(!t.useFlagMods&&t.accuracy===`strict`&&t.currentFlags.ignoreCase&&!t.captureMap.get(e).ignoreCase)throw Error(`Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy`);return`\\`+e},CapturingGroup(e,t,n){let{body:r,name:i,number:a}=e,o={ignoreCase:t.currentFlags.ignoreCase},s=t.originMap.get(e);return s&&(o.hidden=!0,a>s.number&&(o.transferTo=s.number)),t.captureMap.set(a,o),`(${i?`?<${i}>`:``}${r.map(n).join(`|`)})`},Character({value:e},t){let n=Y(e),r=Vm(e,{escDigit:t.lastNode.type===`Backreference`,inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(r!==n)return r;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&zm(n)){let e=Qp(n);return t.inCharClass?e.join(``):e.length>1?`[${e.join(``)}]`:e[0]}return n},CharacterClass(e,t,n){let{kind:r,negate:i,parent:a}=e,{body:o}=e;if(r===`intersection`&&!t.useFlagV)throw Error(`Use of character class intersection requires min target ES2024`);Bp.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&o.some(qm)&&(o=[Vf(45),...o.filter(e=>!qm(e))]);let s=()=>`[${i?`^`:``}${o.map(n).join(r===`intersection`?`&&`:``)}]`;if(!t.inCharClass){if((!t.useFlagV||Bp.bugNestedClassIgnoresNegation)&&!i){let t=o.filter(e=>e.type===`CharacterClass`&&e.kind===`union`&&e.negate);if(t.length){let r=qf(),i=r.body[0];return r.parent=a,i.parent=r,o=o.filter(e=>!t.includes(e)),e.body=o,o.length?(e.parent=i,i.body.push(e)):r.body.pop(),t.forEach(e=>{let t=Lf({body:[e]});e.parent=t,t.parent=r,r.body.push(t)}),n(r)}}t.inCharClass=!0;let r=s();return t.inCharClass=!1,r}let c=o[0];if(r===`union`&&!i&&c&&((!t.useFlagV||!t.verbose)&&a.kind===`union`&&!(Bp.bugFlagVLiteralHyphenIsRange&&t.useFlagV)||!t.verbose&&a.kind===`intersection`&&o.length===1&&c.type!==`CharacterClassRange`))return o.map(n).join(``);if(!t.useFlagV&&a.type===`CharacterClass`)throw Error(`Uses nested character class in a way that requires min target ES2024`);return s()},CharacterClassRange(e,t){let n=e.min.value,r=e.max.value,i={escDigit:!1,inCharClass:!0,useFlagV:t.useFlagV},a=Vm(n,i),o=Vm(r,i),s=new Set;return t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&Hm(Bm(e)).forEach(e=>{s.add(Array.isArray(e)?`${Vm(e[0],i)}-${Vm(e[1],i)}`:Vm(e,i))}),`${a}-${o}${[...s].join(``)}`},CharacterSet({kind:e,negate:t,value:n,key:r},i){if(e===`dot`)return i.currentFlags.dotAll?i.appliedGlobalFlags.dotAll||i.useFlagMods?`.`:`[^]`:X`[^\n]`;if(e===`digit`)return t?X`\D`:X`\d`;if(e===`property`){if(i.useAppliedIgnoreCase&&i.currentFlags.ignoreCase&&sm.has(n))throw Error(`Unicode property "${n}" can't be case-insensitive when other chars have specific case`);return`${t?X`\P`:X`\p`}{${r?`${r}=`:``}${n}}`}if(e===`word`)return t?X`\W`:X`\w`;throw Error(`Unexpected character set kind "${e}"`)},Flags(e,t){return(t.appliedGlobalFlags.ignoreCase?`i`:``)+(e.dotAll?`s`:``)+(e.sticky?`y`:``)},Group({atomic:e,body:t,flags:n,parent:r},i,a){let o=i.currentFlags;n&&(i.currentFlags=Hp(o,n));let s=t.map(a).join(`|`),c=!i.verbose&&t.length===1&&r.type!==`Quantifier`&&!e&&(!i.useFlagMods||!n)?s:`(?${Um(e,n,i.useFlagMods)}${s})`;return i.currentFlags=o,c},LookaroundAssertion({body:e,kind:t,negate:n},r,i){return`(?${`${t===`lookahead`?``:`<`}${n?`!`:`=`}`}${e.map(i).join(`|`)})`},Quantifier(e,t,n){return n(e.body)+Wm(e)},Subroutine({isRecursive:e,ref:t},n){if(!e)throw Error(`Unexpected non-recursive subroutine in transformed AST`);let r=n.recursionLimit;return t===0?`(?R=${r})`:X`\g<${t}&R=${r}>`}},Pm=new Set([`$`,`(`,`)`,`*`,`+`,`.`,`?`,`[`,`\\`,`]`,`^`,`{`,`|`,`}`]),Fm=new Set([`-`,`\\`,`]`,`^`,`[`]),Im=new Set("()-/[\\]^{|}!#$%&*+,.:;<=>?@`~".split(``)),Lm=new Map([[9,X`\t`],[10,X`\n`],[11,X`\v`],[12,X`\f`],[13,X`\r`],[8232,X`\u2028`],[8233,X`\u2029`],[65279,X`\uFEFF`]]),Rm=/^\p{Cased}$/u;function zm(e){return Rm.test(e)}function Bm(e,t){let n=!!t?.firstOnly,r=e.min.value,i=e.max.value,a=[];if(r<65&&(i===65535||i>=131071)||r===65536&&i>=131071)return a;for(let e=r;e<=i;e++){let t=Y(e);if(!zm(t))continue;let o=Qp(t).filter(e=>{let t=e.codePointAt(0);return t<r||t>i});if(o.length&&(a.push(...o),n))break}return a}function Vm(e,{escDigit:t,inCharClass:n,useFlagV:r}){if(Lm.has(e))return Lm.get(e);if(e<32||e>126&&e<160||e>262143||t&&Km(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,`0`)}`;let i=n?r?Im:Fm:Pm,a=Y(e);return(i.has(a)?`\\`:``)+a}function Hm(e){let t=e.map(e=>e.codePointAt(0)).sort((e,t)=>e-t),n=[],r=null;for(let e=0;e<t.length;e++)t[e+1]===t[e]+1?r??=t[e]:r===null?n.push(t[e]):(n.push([r,t[e]]),r=null);return n}function Um(e,t,n){if(e)return`>`;let r=``;if(t&&n){let{enable:e,disable:n}=t;r=(e?.ignoreCase?`i`:``)+(e?.dotAll?`s`:``)+(n?`-`:``)+(n?.ignoreCase?`i`:``)+(n?.dotAll?`s`:``)}return`${r}:`}function Wm({kind:e,max:t,min:n}){let r;return r=!n&&t===1?`?`:!n&&t===1/0?`*`:n===1&&t===1/0?`+`:n===t?`{${n}}`:`{${n},${t===1/0?``:t}}`,r+{greedy:``,lazy:`?`,possessive:`+`}[e]}function Gm({type:e}){return e===`CapturingGroup`||e===`Group`||e===`LookaroundAssertion`}function Km(e){return e>47&&e<58}function qm({type:e,value:t}){return e===`Character`&&t===45}var Jm=class e extends RegExp{#e=new Map;#t=null;#n;#r=null;#i=null;rawOptions={};get source(){return this.#n||`(?:)`}constructor(t,n,r){let i=!!r?.lazyCompile;if(t instanceof RegExp){if(r)throw Error(`Cannot provide options when copying a regexp`);let i=t;super(i,n),this.#n=i.source,i instanceof e&&(this.#e=i.#e,this.#r=i.#r,this.#i=i.#i,this.rawOptions=i.rawOptions)}else{let e={hiddenCaptures:[],strategy:null,transfers:[],...r};super(i?``:t,n),this.#n=t,this.#e=Xm(e.hiddenCaptures,e.transfers),this.#i=e.strategy,this.rawOptions=r??{}}i||(this.#t=this)}exec(t){if(!this.#t){let{lazyCompile:t,...n}=this.rawOptions;this.#t=new e(this.#n,this.flags,n)}let n=this.global||this.sticky,r=this.lastIndex;if(this.#i===`clip_search`&&n&&r){this.lastIndex=0;let e=this.#a(t.slice(r));return e&&(Ym(e,r,t,this.hasIndices),this.lastIndex+=r),e}return this.#a(t)}#a(e){this.#t.lastIndex=this.lastIndex;let t=super.exec.call(this.#t,e);if(this.lastIndex=this.#t.lastIndex,!t||!this.#e.size)return t;let n=[...t];t.length=1;let r;this.hasIndices&&(r=[...t.indices],t.indices.length=1);let i=[0];for(let e=1;e<n.length;e++){let{hidden:a,transferTo:o}=this.#e.get(e)??{};if(a?i.push(null):(i.push(t.length),t.push(n[e]),this.hasIndices&&t.indices.push(r[e])),o&&n[e]!==void 0){let a=i[o];if(!a)throw Error(`Invalid capture transfer to "${a}"`);if(t[a]=n[e],this.hasIndices&&(t.indices[a]=r[e]),t.groups){this.#r||=Zm(this.source);let i=this.#r.get(o);i&&(t.groups[i]=n[e],this.hasIndices&&(t.indices.groups[i]=r[e]))}}}return t}};function Ym(e,t,n,r){if(e.index+=t,e.input=n,r){let n=e.indices;for(let e=0;e<n.length;e++){let r=n[e];r&&(n[e]=[r[0]+t,r[1]+t])}let r=n.groups;r&&Object.keys(r).forEach(e=>{let n=r[e];n&&(r[e]=[n[0]+t,n[1]+t])})}}function Xm(e,t){let n=new Map;for(let t of e)n.set(t,{hidden:!0});for(let[e,r]of t)for(let t of r)Up(n,t,{}).transferTo=e;return n}function Zm(e){let t=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,n=new Map,r=0,i=0,a;for(;a=t.exec(e);){let{0:e,groups:{capture:t,name:o}}=a;e===`[`?r++:r?e===`]`&&r--:t&&(i++,o&&n.set(i,o))}return n}function Qm(e,t){let n=$m(e,t);return n.options?new Jm(n.pattern,n.flags,n.options):new RegExp(n.pattern,n.flags)}function $m(e,t){let n=Jp(t),r=cm(Df(e,{flags:n.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline},skipBackrefValidation:n.rules.allowOrphanBackrefs,unicodePropertyMap:$p}),{accuracy:n.accuracy,asciiWordBoundaries:n.rules.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,bestEffortTarget:n.target}),i=jm(r,n),a=Pp(i.pattern,{captureTransfers:i._captureTransfers,hiddenCaptures:i._hiddenCaptures,mode:`external`}),o=wp(Dp(a.pattern).pattern,{captureTransfers:a.captureTransfers,hiddenCaptures:a.hiddenCaptures}),s={pattern:o.pattern,flags:`${n.hasIndices?`d`:``}${n.global?`g`:``}${i.flags}${i.options.disable.v?`u`:`v`}`};if(n.avoidSubclass){if(n.lazyCompileLength!==1/0)throw Error(`Lazy compilation requires subclass`)}else{let e=o.hiddenCaptures.sort((e,t)=>e-t),t=Array.from(o.captureTransfers),i=r._strategy,a=s.pattern.length>=n.lazyCompileLength;(e.length||t.length||i||a)&&(s.options={...e.length&&{hiddenCaptures:e},...t.length&&{transfers:t},...i&&{strategy:i},...a&&{lazyCompile:a}})}return s}function eh(e,t){return Qm(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function th(e={}){let t={target:`auto`,cache:new Map,...e};return t.regexConstructor||=e=>eh(e,{target:t.target}),{createScanner(e){return new Nd(e,t)},createString(e){return{content:e}}}}async function nh(e){if(ys())throw Error(`resolveLanguage("${e}") cannot be called from a worker context. Languages must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);let t=ms.get(e);if(t!=null)return t;try{let t=hs.get(e);if(t==null&&Object.prototype.hasOwnProperty.call(As,e)&&(t=As[e]),t==null)throw Error(`resolveLanguage: "${e}" not found in bundled or custom languages`);let n=t().then(({default:t})=>{let n={name:e,data:t};return ps.has(e)||ps.set(e,n),n});return ms.set(e,n),await n}finally{ms.delete(e)}}function rh(e){return ps.get(e)??nh(e)}var ih=new Set;function ah(e){let t=[],n=new Set;for(let r of oh(e.themes)){let e=lh(r)?r.getThemes():[r];for(let r of e){if(n.has(r.name))throw Error(`Theme collection already contains theme "${r.name}"`);n.add(r.name),t.push(r)}}let r=Object.freeze([...t]),i=Object.freeze(r.filter(e=>e.colorScheme===`light`)),a=Object.freeze(r.filter(e=>e.colorScheme===`dark`)),o=new Map(r.map(e=>[e.name,e])),s=Object.freeze(r.map(e=>e.name)),c=Object.freeze(i.map(e=>e.name)),l=Object.freeze(a.map(e=>e.name));function u(e){if(e==null)return r;let{colorScheme:t,collection:n}=e;return n==null?t===`light`?i:t===`dark`?a:r:r.filter(e=>e.collection===n?t==null||e.colorScheme===t:!1)}return{getTheme(e){return o.get(e)},getThemes(e){return u(e)},getThemeNames(e){return e?.collection==null?e?.colorScheme===`light`?c:e?.colorScheme===`dark`?l:s:u(e).map(e=>e.name)},hasTheme(e){return o.has(e)},orderBy(e){return ah({themes:r.map((e,t)=>({descriptor:e,index:t})).sort((t,n)=>{let r=e(t.descriptor,n.descriptor);return r===0?t.index-n.index:r}).map(e=>e.descriptor)})},pick(e){let t=[],n=new Set;for(let r of e){if(n.has(r))throw Error(`Theme collection pick already includes theme "${r}"`);n.add(r);let e=o.get(r);if(e==null)throw Error(`Theme collection does not contain theme "${r}"`);t.push(e)}return ah({themes:t})},registerInto(e){for(let t of r)e.registerThemeIfAbsent(t.name,t.load)}}}function oh(e){return sh(e)?[e]:e}function sh(e){return lh(e)||ch(e)}function ch(e){return typeof e.name==`string`&&typeof e.load==`function`}function lh(e){return typeof e.getThemes==`function`}function uh(e){return typeof e==`object`&&e&&`default`in e?e.default:e}var dh=class extends Error{constructor(e){super(`Theme "${e}" is already registered`),this.name=`DuplicateThemeError`}},fh=class extends Error{constructor(e){super(`No loader registered for theme "${e}"`),this.name=`UnregisteredThemeError`}},ph=class extends Error{constructor(e){super(`Theme "${e}" has not been resolved`),this.name=`UnresolvedThemeError`}};function mh(){let e=new Map,t=new Map,n=new Map,r=0;function i(t,n){if(e.has(t))throw new dh(t);e.set(t,n)}function a(t,n){return!e.has(t)&&(e.set(t,n),!0)}function o(t){return e.has(t)}function s(i){let a=t.get(i);if(a!==void 0)return Promise.resolve(a);let o=n.get(i);if(o!==void 0)return o;let s=e.get(i);if(s===void 0)return Promise.reject(new fh(i));let c=r,l=s().then(e=>{let a=uh(e);return c===r&&t.set(i,a),n.get(i)===l&&n.delete(i),a}).catch(e=>{throw n.get(i)===l&&n.delete(i),e});return n.set(i,l),l}function c(e){return Promise.all(e.map(e=>s(e)))}function l(e,n){t.set(e,n)}function u(e){for(let[t,n]of e)l(t,n)}function d(e){return t.get(e)}function f(e){let n=[];for(let r of e){let e=t.get(r);if(e===void 0)throw new ph(r);n.push(e)}return n}function p(e){return t.has(e)}function m(e){for(let n of e)if(!t.has(n))return!1;return!0}function h(e){let n=t.get(e);return n===void 0?s(e):n}function g(){r++,t.clear(),n.clear()}return{clearResolvedThemes:g,getResolvedOrResolveTheme:h,getResolvedTheme:d,getResolvedThemes:f,hasRegisteredTheme:o,hasResolvedTheme:p,hasResolvedThemes:m,registerTheme:i,registerThemeIfAbsent:a,resolveTheme:s,resolveThemes:c,seedResolvedTheme:l,seedResolvedThemes:u}}var hh=mh();function gh(e,t){e=Array.isArray(e)?e:[e];for(let n of e){let e;if(typeof n==`string`){if(e=hh.getResolvedTheme(n),e==null)throw Error(`loadResolvedThemes: ${n} is not resolved, you must resolve it before calling loadResolvedThemes`)}else e=n,n=n.name,hh.getResolvedTheme(n)??hh.seedResolvedTheme(n,e);ih.has(n)||(ih.add(n),t.loadThemeSync(e))}}function _h({name:e,load:t,colorScheme:n,collection:r,displayName:i}){return{name:e,colorScheme:n,collection:r,displayName:i,load:vh(t)}}function vh(e){return async()=>$l(uh(await e()))}var yh=`pierre`,bh=[`pierre-dark`,`pierre-dark-soft`,`pierre-dark-vibrant`,`pierre-dark-protanopia-deuteranopia`,`pierre-dark-tritanopia`],xh=[`pierre-light`,`pierre-light-soft`,`pierre-light-vibrant`,`pierre-light-protanopia-deuteranopia`,`pierre-light-tritanopia`],Sh=[...xh,...bh],Ch=new Set(xh);function wh(e){return Ch.has(e)?`light`:`dark`}var Th={"pierre-dark":`Pierre Dark`,"pierre-dark-soft":`Pierre Dark Soft`,"pierre-dark-vibrant":`Pierre Dark Vibrant`,"pierre-dark-protanopia-deuteranopia":`Pierre Dark Protanopia & Deuteranopia`,"pierre-dark-tritanopia":`Pierre Dark Tritanopia`,"pierre-light":`Pierre Light`,"pierre-light-soft":`Pierre Light Soft`,"pierre-light-vibrant":`Pierre Light Vibrant`,"pierre-light-protanopia-deuteranopia":`Pierre Light Protanopia & Deuteranopia`,"pierre-light-tritanopia":`Pierre Light Tritanopia`},Eh={"pierre-dark":()=>M(()=>import(`./_CpLgRqie.js`),[]),"pierre-dark-soft":()=>M(()=>import(`./_kZQmAZld.js`),[]),"pierre-dark-vibrant":()=>M(()=>import(`./_CpQYzh95.js`),[]),"pierre-dark-protanopia-deuteranopia":()=>M(()=>import(`./_B35FxJx-.js`),[]),"pierre-dark-tritanopia":()=>M(()=>import(`./_CpjhbsIL.js`),[]),"pierre-light":()=>M(()=>import(`./_CoaEpmwp.js`),[]),"pierre-light-soft":()=>M(()=>import(`./_lWLdNTOI.js`),[]),"pierre-light-vibrant":()=>M(()=>import(`./_D80Fkn33.js`),[]),"pierre-light-protanopia-deuteranopia":()=>M(()=>import(`./_0fSaH845.js`),[]),"pierre-light-tritanopia":()=>M(()=>import(`./_CEbqgOJL.js`),[])};function Dh(e){return _h({name:e,collection:yh,colorScheme:wh(e),displayName:Th[e],load:Eh[e]})}var Oh=ah({themes:Sh.map(e=>Dh(e))}),kh=`shiki`,Ah=[`ayu-light`,`catppuccin-latte`,`everforest-light`,`github-light`,`github-light-default`,`github-light-high-contrast`,`gruvbox-light-hard`,`gruvbox-light-medium`,`gruvbox-light-soft`,`horizon-bright`,`kanagawa-lotus`,`light-plus`,`material-theme-lighter`,`min-light`,`night-owl-light`,`one-light`,`rose-pine-dawn`,`slack-ochin`,`snazzy-light`,`solarized-light`,`vitesse-light`],jh=`andromeeda.aurora-x.ayu-dark.ayu-mirage.catppuccin-frappe.catppuccin-macchiato.catppuccin-mocha.dark-plus.dracula.dracula-soft.everforest-dark.github-dark.github-dark-default.github-dark-dimmed.github-dark-high-contrast.gruvbox-dark-hard.gruvbox-dark-medium.gruvbox-dark-soft.horizon.houston.kanagawa-dragon.kanagawa-wave.laserwave.material-theme.material-theme-darker.material-theme-ocean.material-theme-palenight.min-dark.monokai.night-owl.nord.one-dark-pro.plastic.poimandres.red.rose-pine.rose-pine-moon.slack-dark.solarized-dark.synthwave-84.tokyo-night.vesper.vitesse-black.vitesse-dark`.split(`.`),Mh=new Set(Ah);function Nh(e){return Mh.has(e)?`light`:`dark`}var Ph={andromeeda:()=>M(()=>import(`./_vGVdxbeo.js`),[]),"aurora-x":()=>M(()=>import(`./_CDeNXAV0.js`),[]),"ayu-dark":()=>M(()=>import(`./_DluEY0Gj.js`),[]),"ayu-light":()=>M(()=>import(`./_C3h-C4tm.js`),[]),"ayu-mirage":()=>M(()=>import(`./_Bqwy1Gya.js`),[]),"catppuccin-frappe":()=>M(()=>import(`./_C9Q5zVZY.js`),[]),"catppuccin-latte":()=>M(()=>import(`./_CtsyrtPq.js`),[]),"catppuccin-macchiato":()=>M(()=>import(`./_R8nAf1vR.js`),[]),"catppuccin-mocha":()=>M(()=>import(`./_DjuaAJKi.js`),[]),"dark-plus":()=>M(()=>import(`./_Cs2F2srj.js`),[]),dracula:()=>M(()=>import(`./_BHWKrbxM.js`),[]),"dracula-soft":()=>M(()=>import(`./_5eyTD99u.js`),[]),"everforest-dark":()=>M(()=>import(`./_sB-x3p7T.js`),[]),"everforest-light":()=>M(()=>import(`./_Df2xbC6M.js`),[]),"github-dark":()=>M(()=>import(`./_C-LZuMrd.js`),[]),"github-dark-default":()=>M(()=>import(`./_DXG-b-1a.js`),[]),"github-dark-dimmed":()=>M(()=>import(`./_Bx1FflLF.js`),[]),"github-dark-high-contrast":()=>M(()=>import(`./_B_tTalzw.js`),[]),"github-light":()=>M(()=>import(`./_EUqPIrTm.js`),[]),"github-light-default":()=>M(()=>import(`./_BXViO-2h.js`),[]),"github-light-high-contrast":()=>M(()=>import(`./_B68TUdTA.js`),[]),"gruvbox-dark-hard":()=>M(()=>import(`./_C820rvS2.js`),[]),"gruvbox-dark-medium":()=>M(()=>import(`./_BPjhmG05.js`),[]),"gruvbox-dark-soft":()=>M(()=>import(`./_MrdJrrXF.js`),[]),"gruvbox-light-hard":()=>M(()=>import(`./_BC_s9l72.js`),[]),"gruvbox-light-medium":()=>M(()=>import(`./_BAWPOn9u.js`),[]),"gruvbox-light-soft":()=>M(()=>import(`./_BSMLrYjP.js`),[]),horizon:()=>M(()=>import(`./_CE9ld1lL.js`),[]),"horizon-bright":()=>M(()=>import(`./_DSNQnXHK.js`),[]),houston:()=>M(()=>import(`./_CsvMBhTu.js`),[]),"kanagawa-dragon":()=>M(()=>import(`./_Bozd7klA.js`),[]),"kanagawa-lotus":()=>M(()=>import(`./_BmuOG9ZW.js`),[]),"kanagawa-wave":()=>M(()=>import(`./_BML5mF2J.js`),[]),laserwave:()=>M(()=>import(`./_C_8bwKvT.js`),[]),"light-plus":()=>M(()=>import(`./_DVQuIRkW2.js`),[]),"material-theme":()=>M(()=>import(`./_Bm3Qr25_2.js`),[]),"material-theme-darker":()=>M(()=>import(`./_2IIEA8gg2.js`),[]),"material-theme-lighter":()=>M(()=>import(`./_uhdI0v042.js`),[]),"material-theme-ocean":()=>M(()=>import(`./_CHQ94UKr2.js`),[]),"material-theme-palenight":()=>M(()=>import(`./_B5W6OYN72.js`),[]),"min-dark":()=>M(()=>import(`./_BSWPekZh2.js`),[]),"min-light":()=>M(()=>import(`./_DDpmG2fV2.js`),[]),monokai:()=>M(()=>import(`./_B_bV9PQ92.js`),[]),"night-owl":()=>M(()=>import(`./_DhmEMT882.js`),[]),"night-owl-light":()=>M(()=>import(`./_eJ-hLW7d2.js`),[]),nord:()=>M(()=>import(`./_Cb4Vim4T2.js`),[]),"one-dark-pro":()=>M(()=>import(`./_CLwyXe_n2.js`),[]),"one-light":()=>M(()=>import(`./_D7Lr4KcI2.js`),[]),plastic:()=>M(()=>import(`./_DQwYfKfQ2.js`),[]),poimandres:()=>M(()=>import(`./_DRFjx7u42.js`),[]),red:()=>M(()=>import(`./_DX1BQOs82.js`),[]),"rose-pine":()=>M(()=>import(`./_aMsaMD1D2.js`),[]),"rose-pine-dawn":()=>M(()=>import(`./_8PwUyIlP2.js`),[]),"rose-pine-moon":()=>M(()=>import(`./_DO-qXg-I2.js`),[]),"slack-dark":()=>M(()=>import(`./_DnToyrRv2.js`),[]),"slack-ochin":()=>M(()=>import(`./_B2OO5cIa2.js`),[]),"snazzy-light":()=>M(()=>import(`./_4G7pJPwS2.js`),[]),"solarized-dark":()=>M(()=>import(`./_UdsmMDCL2.js`),[]),"solarized-light":()=>M(()=>import(`./_C1IUL_tW2.js`),[]),"synthwave-84":()=>M(()=>import(`./_nFMaYfgc2.js`),[]),"tokyo-night":()=>M(()=>import(`./_oM2G3aXe.js`),[]),vesper:()=>M(()=>import(`./_DdrHHSXu.js`),[]),"vitesse-black":()=>M(()=>import(`./_fwtXNY1n.js`),[]),"vitesse-dark":()=>M(()=>import(`./_BZCL-v6S.js`),[]),"vitesse-light":()=>M(()=>import(`./_VbXTXTou.js`),[])};function Fh(e){return _h({name:e,collection:kh,colorScheme:Nh(e),load:Ph[e]})}var Ih=ah({themes:Object.freeze([...Ah.map(e=>Fh(e)),...jh.map(e=>Fh(e))])});function Lh(e){if(ys())throw Error(`Theme "${e}" cannot be resolved from a worker context. Themes must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);if(hh.hasRegisteredTheme(e))return;let t=Ih.getTheme(e);if(t!=null){hh.registerThemeIfAbsent(t.name,t.load);return}throw Error(`No valid theme loader registered for "${e}"`)}function Rh(e,t){if(t.name!==e)throw Error(`resolvedTheme: themeName: ${e} does not match theme.name: ${t.name}`)}async function zh(e){Lh(e);let t=await hh.resolveTheme(e);return Rh(e,t),t}function Bh(e){return hh.getResolvedTheme(e)??zh(e)}var Vh;async function Hh({themes:e,langs:t,preferredHighlighter:n=`shiki-js`}){Vh??=wd({themes:[],langs:[`text`],engine:n===`shiki-wasm`?ic(M(()=>import(`./_sWLklcDZ.js`),[])):th()});let r=Wh(Vh)?await Vh:Vh;Vh=r;let i=[];for(let e of t){if(e===`text`||e===`ansi`)continue;let t=rh(e);`then`in t?i.push(t):vs(t,r)}let a=[];for(let t of e){let e=Bh(t);`then`in e?a.push(e):gh(e,Vh)}return(i.length>0||a.length>0)&&await Promise.all([Promise.all(i).then(e=>{vs(e,r)}),Promise.all(a).then(e=>{gh(e,r)})]),r}function Uh(){if(Vh!=null&&!(`then`in Vh))return Vh}function Wh(e=Vh){return e!=null&&`then`in e}for(let e of Oh.getThemes())hh.registerThemeIfAbsent(e.name,e.load);function Gh(e=nr){let t=[];return typeof e==`string`?t.push(e):(t.push(e.dark),t.push(e.light)),t}function Kh(e){for(let t of Gh(e))if(!ih.has(t))return!1;return!0}function qh(e){return hh.hasResolvedThemes(e)}function Jh(e,t){return gr(e.theme,t.theme)&&e.useTokenTransformer===t.useTokenTransformer&&e.tokenizeMaxLineLength===t.tokenizeMaxLineLength}function Yh(e,t){return e==null||t==null?e===t:e.startingLine===t.startingLine&&e.totalLines===t.totalLines&&e.bufferBefore===t.bufferBefore&&e.bufferAfter===t.bufferAfter}function Xh(e){return I({tagName:`div`,children:[I({tagName:`div`,children:e.annotations?.map(e=>I({tagName:`slot`,properties:{name:e}})),properties:{"data-annotation-content":``}})],properties:{"data-line-annotation":`${e.hunkIndex},${e.lineIndex}`}})}function Zh(e){switch(e){case`file`:return`diffs-icon-file-code`;case`change`:return`diffs-icon-symbol-modified`;case`new`:return`diffs-icon-symbol-added`;case`deleted`:return`diffs-icon-symbol-deleted`;case`rename-pure`:case`rename-changed`:return`diffs-icon-symbol-moved`}}function Qh({fileOrDiff:e,mode:t,stickyHeader:n}){let r=`type`in e?e:void 0,i={"data-diffs-header":t,"data-change-type":r?.type,"data-sticky":n?``:void 0};return I({tagName:`div`,children:[t===`custom`?I({tagName:`slot`,properties:{name:tr}}):$h({name:e.name,prevName:`prevName`in e?e.prevName:void 0,iconType:r?.type??`file`}),...t===`custom`?[]:[eg(r)]],properties:i})}function $h({name:e,prevName:t,iconType:n}){let r=[I({tagName:`slot`,properties:{name:Qn}}),Ai({name:Zh(n),properties:{"data-change-icon":n}})];return t!=null&&(r.push(I({tagName:`div`,children:[I({tagName:`bdi`,children:[ki(t)]})],properties:{"data-prev-name":``}})),r.push(Ai({name:`diffs-icon-arrow-right-short`,properties:{"data-rename-icon":``}}))),r.push(I({tagName:`div`,children:[I({tagName:`bdi`,children:[ki(e)]})],properties:{"data-title":``}})),r.push(I({tagName:`slot`,properties:{name:$n}})),I({tagName:`div`,children:r,properties:{"data-header-content":``}})}function eg(e){let t=[];if(e!=null){let n=0,r=0;for(let t of e.hunks)n+=t.additionLines,r+=t.deletionLines;(r>0||n===0)&&t.push(I({tagName:`span`,children:[ki(`-${r}`)],properties:{"data-deletions-count":``}})),(n>0||r===0)&&t.push(I({tagName:`span`,children:[ki(`+${n}`)],properties:{"data-additions-count":``}}))}return t.push(I({tagName:`slot`,properties:{name:er}})),I({tagName:`div`,children:t,properties:{"data-metadata":``}})}function tg(e){return I({tagName:`pre`,properties:ng(e)})}function ng({diffIndicators:e,disableBackground:t,disableLineNumbers:n,overflow:r,split:i,totalLines:a,type:o,customProperties:s}){return{...s,"data-diff":o===`diff`?``:void 0,"data-file":o===`file`?``:void 0,"data-diff-type":o===`diff`?i?`split`:`single`:void 0,"data-overflow":r,"data-disable-line-numbers":n?``:void 0,"data-background":t?void 0:``,"data-indicators":e===`bars`||e===`classic`?e:void 0,style:`--diffs-min-number-column-width-default:${`${a}`.length}ch;`}}var rg=new Map,ig=0,ag={"1c":`1c`,abap:`abap`,as:`actionscript-3`,ada:`ada`,adb:`ada`,ads:`ada`,adoc:`asciidoc`,asciidoc:`asciidoc`,"component.html":`angular-html`,"component.ts":`angular-ts`,conf:`nginx`,htaccess:`apache`,cls:`tex`,trigger:`apex`,apl:`apl`,applescript:`applescript`,scpt:`applescript`,ara:`ara`,asm:`asm`,s:`riscv`,astro:`astro`,awk:`awk`,bal:`ballerina`,sh:`zsh`,bash:`zsh`,bat:`cmd`,cmd:`cmd`,be:`berry`,beancount:`beancount`,bib:`bibtex`,bicep:`bicep`,"blade.php":`blade`,bsl:`bsl`,c:`c`,h:`objective-cpp`,cs:`csharp`,cpp:`cpp`,hpp:`cpp`,cc:`cpp`,cxx:`cpp`,hh:`cpp`,cdc:`cdc`,cairo:`cairo`,clar:`clarity`,clj:`clojure`,cljs:`clojure`,cljc:`clojure`,soy:`soy`,cmake:`cmake`,"CMakeLists.txt":`cmake`,cob:`cobol`,cbl:`cobol`,cobol:`cobol`,CODEOWNERS:`codeowners`,ql:`ql`,coffee:`coffeescript`,lisp:`lisp`,cl:`lisp`,lsp:`lisp`,log:`log`,v:`verilog`,cql:`cql`,cr:`crystal`,css:`css`,csv:`csv`,cue:`cue`,cypher:`cypher`,cyp:`cypher`,d:`d`,dart:`dart`,dax:`dax`,desktop:`desktop`,diff:`diff`,patch:`diff`,Dockerfile:`dockerfile`,dockerfile:`dockerfile`,env:`dotenv`,dm:`dream-maker`,edge:`edge`,el:`emacs-lisp`,ex:`elixir`,exs:`elixir`,elm:`elm`,erb:`erb`,erl:`erlang`,hrl:`erlang`,f:`fortran-fixed-form`,for:`fortran-fixed-form`,fs:`fsharp`,fsi:`fsharp`,fsx:`fsharp`,f03:`f03`,f08:`f08`,f18:`f18`,f77:`f77`,f90:`fortran-free-form`,f95:`fortran-free-form`,fnl:`fennel`,fish:`fish`,ftl:`ftl`,tres:`gdresource`,res:`gdresource`,gd:`gdscript`,gdshader:`gdshader`,gs:`genie`,feature:`gherkin`,COMMIT_EDITMSG:`git-commit`,"git-rebase-todo":`git-rebase`,gjs:`glimmer-js`,gleam:`gleam`,gts:`glimmer-ts`,glsl:`glsl`,vert:`glsl`,frag:`glsl`,shader:`shaderlab`,gp:`gnuplot`,plt:`gnuplot`,gnuplot:`gnuplot`,go:`go`,graphql:`graphql`,gql:`graphql`,groovy:`groovy`,gvy:`groovy`,hack:`hack`,haml:`haml`,hbs:`handlebars`,handlebars:`handlebars`,hs:`haskell`,lhs:`haskell`,hx:`haxe`,hcl:`hcl`,hjson:`hjson`,hlsl:`hlsl`,fx:`hlsl`,html:`html`,htm:`html`,http:`http`,rest:`http`,hxml:`hxml`,hy:`hy`,imba:`imba`,ini:`ini`,cfg:`ini`,jade:`pug`,pug:`pug`,java:`java`,js:`javascript`,mjs:`javascript`,cjs:`javascript`,jinja:`jinja`,jinja2:`jinja`,j2:`jinja`,jison:`jison`,jl:`julia`,json:`json`,json5:`json5`,jsonc:`jsonc`,jsonl:`jsonl`,jsonnet:`jsonnet`,libsonnet:`jsonnet`,jssm:`jssm`,jsx:`jsx`,kt:`kotlin`,kts:`kts`,kql:`kusto`,tex:`tex`,ltx:`tex`,lean:`lean4`,less:`less`,liquid:`liquid`,lit:`lit`,ll:`llvm`,logo:`logo`,lua:`lua`,luau:`luau`,Makefile:`makefile`,mk:`makefile`,makefile:`makefile`,md:`markdown`,markdown:`markdown`,marko:`marko`,m:`wolfram`,mat:`matlab`,mdc:`mdc`,mdx:`mdx`,wiki:`wikitext`,mediawiki:`wikitext`,mmd:`mermaid`,mermaid:`mermaid`,mips:`mipsasm`,mojo:`mojo`,"🔥":`mojo`,move:`move`,nar:`narrat`,nf:`nextflow`,nim:`nim`,nims:`nim`,nimble:`nim`,nix:`nix`,nu:`nushell`,mm:`objective-cpp`,ml:`ocaml`,mli:`ocaml`,mll:`ocaml`,mly:`ocaml`,pas:`pascal`,p:`pascal`,pl:`prolog`,pm:`perl`,t:`perl`,raku:`raku`,p6:`raku`,pl6:`raku`,php:`php`,phtml:`php`,pls:`plsql`,sql:`sql`,po:`po`,polar:`polar`,pcss:`postcss`,pot:`pot`,potx:`potx`,pq:`powerquery`,pqm:`powerquery`,ps1:`powershell`,psm1:`powershell`,psd1:`powershell`,prisma:`prisma`,pro:`prolog`,P:`prolog`,properties:`properties`,proto:`protobuf`,pp:`puppet`,purs:`purescript`,py:`python`,pyw:`python`,pyi:`python`,qml:`qml`,qmldir:`qmldir`,qss:`qss`,r:`r`,R:`r`,rkt:`racket`,rktl:`racket`,razor:`razor`,cshtml:`razor`,rb:`ruby`,rbw:`ruby`,reg:`reg`,regex:`regexp`,rel:`rel`,rs:`rust`,rst:`rst`,rake:`ruby`,gemspec:`ruby`,jbuilder:`ruby`,builder:`ruby`,rabl:`ruby`,arb:`ruby`,ru:`ruby`,podspec:`ruby`,Gemfile:`ruby`,Rakefile:`ruby`,Guardfile:`ruby`,Capfile:`ruby`,Berksfile:`ruby`,Brewfile:`ruby`,Vagrantfile:`ruby`,Thorfile:`ruby`,Appraisals:`ruby`,Dangerfile:`ruby`,sas:`sas`,sass:`sass`,scala:`scala`,sc:`scala`,scm:`scheme`,ss:`scheme`,sld:`scheme`,scss:`scss`,sdbl:`sdbl`,shadergraph:`shader`,st:`smalltalk`,sol:`solidity`,sparql:`sparql`,rq:`sparql`,spl:`splunk`,config:`ssh-config`,do:`stata`,ado:`stata`,dta:`stata`,styl:`stylus`,stylus:`stylus`,svelte:`svelte`,swift:`swift`,sv:`system-verilog`,svh:`system-verilog`,service:`systemd`,socket:`systemd`,device:`systemd`,timer:`systemd`,talon:`talonscript`,tasl:`tasl`,tcl:`tcl`,templ:`templ`,tf:`tf`,tfvars:`tfvars`,toml:`toml`,ts:`typescript`,mts:`typescript`,cts:`typescript`,tsp:`typespec`,tsv:`tsv`,tsx:`tsx`,ttl:`turtle`,twig:`twig`,typ:`typst`,vv:`v`,vala:`vala`,vapi:`vala`,vb:`vb`,vbs:`vb`,bas:`vb`,vh:`verilog`,vhd:`vhdl`,vhdl:`vhdl`,vim:`vimscript`,vue:`vue`,"vine.ts":`vue-vine`,vy:`vyper`,wasm:`wasm`,wat:`wasm`,wy:`文言`,wgsl:`wgsl`,wit:`wit`,wl:`wolfram`,nb:`wolfram`,xml:`xml`,xsl:`xsl`,xslt:`xsl`,yaml:`yaml`,yml:`yml`,zs:`zenscript`,zig:`zig`,zsh:`zsh`,sty:`tex`};function og(e){if(rg.has(e))return rg.get(e)??`text`;if(ag[e]!=null)return ag[e];let t=e.match(/\.([^/\\]+\.[^/\\]+)$/);if(t!=null){if(rg.has(t[1]))return rg.get(t[1])??`text`;if(ag[t[1]]!=null)return ag[t[1]]??`text`}let n=e.match(/\.([^.]+)$/)?.[1]??``;return rg.has(n)?rg.get(n)??`text`:ag[n]??`text`}function sg(){return ig}function cg(){return Object.fromEntries(rg)}function lg(e,{theme:t,preferredHighlighter:n=`shiki-js`}){return{langs:[e??`text`],themes:Gh(t),preferredHighlighter:n}}function ug(e){return`annotation-${`side`in e?`${e.side}-`:``}${e.lineNumber}`}function dg(e,t,n){let r=typeof n.lineInfo==`function`?n.lineInfo(t):n.lineInfo[t-1];if(r==null){let r=`processLine: line ${t}, contains no state.lineInfo`;throw console.error(r,{node:e,line:t,state:n}),Error(r)}return e.tagName=`div`,e.properties[`data-line`]=r.lineNumber,e.properties[`data-alt-line`]=r.altLineNumber,e.properties[`data-line-type`]=r.type,e.properties[`data-line-index`]=r.lineIndex,e.children.length===0&&e.children.push(ki(`
178
- `)),e}var fg=Symbol(`no-token`),pg=Symbol(`multiple-tokens`);function mg(e){let t=hg(e);if(t!=null)return t;let n=fg,r=[],i=[],a,o=()=>{if(i.length===0||a==null){i=[],a=void 0;return}if(i.length===1){let e=i[0];if(e?.type===`element`){_g(e,a);for(let t of e.children)gg(t)}else gg(e);r.push(e),i=[],a=void 0;return}for(let e of i)gg(e);r.push(I({tagName:`span`,properties:{"data-char":a},children:i})),i=[],a=void 0},s=e=>{if(e!==fg){if(e===pg){n=pg;return}if(n===fg){n=e;return}n!==e&&(n=pg)}};for(let t of e.children){let e=t.type===`element`?mg(t):fg;if(s(e),typeof e!=`number`){o(),r.push(t);continue}a!=null&&a!==e&&o(),a??=e,i.push(t)}return o(),e.children=r,n}function hg(e){let t=e.properties[`data-char`];if(typeof t==`number`)return t}function gg(e){if(e.type===`element`){e.properties[`data-char`]=void 0;for(let t of e.children)gg(t)}}function _g(e,t){e.properties[`data-char`]=t}function vg(e={}){let{classPrefix:t=`__shiki_`,classSuffix:n=``,classReplacer:r=e=>e}=e,i=new Map;function a(e){return Object.entries(e).map(([e,t])=>`${e}:${t}`).join(`;`)}function o(e){let o=typeof e==`string`?e:a(e),s=t+yg(o)+n;return s=r(s),i.has(s)||i.set(s,typeof e==`string`?e:{...e}),s}return{name:`@shikijs/transformers:style-to-class`,pre(e){if(!e.properties.style)return;let t=o(e.properties.style);delete e.properties.style,this.addClassToHast(e,t)},tokens(e){for(let t of e)for(let e of t){if(!e.htmlStyle)continue;let t=o(e.htmlStyle);e.htmlStyle={},e.htmlAttrs||={},e.htmlAttrs.class?e.htmlAttrs.class+=` ${t}`:e.htmlAttrs.class=t}},getClassRegistry(){return i},getCSS(){let e=``;for(let[t,n]of i.entries())e+=`.${t}{${typeof n==`string`?n:a(n)}}`;return e},clearRegistry(){i.clear()}}}function yg(e,t=0){let n=3735928559^t,r=1103547991^t;for(let t=0,i;t<e.length;t++)i=e.charCodeAt(t),n=Math.imul(n^i,2654435761),r=Math.imul(r^i,1597334677);return n=Math.imul(n^n>>>16,2246822507),n^=Math.imul(r^r>>>13,3266489909),r=Math.imul(r^r>>>16,2246822507),r^=Math.imul(n^n>>>13,3266489909),(4294967296*(2097151&r)+(n>>>0)).toString(36).slice(0,6)}function bg(e=!1,t=!1){let n={lineInfo:[]},r=[{line(e){return delete e.properties.class,e},pre(t){let r=ji(t),i=[];if(r!=null){let t=1;for(let a of r.children)a.type===`element`&&(e&&mg(a),i.push(dg(a,t,n)),t++);r.children=i}return t},...e?{tokens(e){for(let t of e){let e=0;for(let n of t){let t=n;t.__lineChar??=e,e+=n.content.length}}},preprocess(e,t){t.mergeWhitespaces=`never`},span(e,t,n,r,i){if(i?.offset!=null&&i.content!=null){let t=i.__lineChar;return t!=null&&(e.properties[`data-char`]=t),e}return e}}:null}];return t&&r.push(Sg,xg),e&&r.push({line:e=>(e.type===`element`&&e.children.length===0&&e.children.push({type:`element`,tagName:`br`,properties:{},children:[]}),e)}),{state:n,transformers:r,toClass:xg}}var xg=vg({classPrefix:`hl-`}),Sg={name:`token-style-normalizer`,tokens(e){for(let t of e)for(let e of t){if(e.htmlStyle!=null)continue;let t={};e.color!=null&&(t.color=e.color),e.bgColor!=null&&(t[`background-color`]=e.bgColor),e.fontStyle!=null&&e.fontStyle!==0&&(e.fontStyle&1&&(t[`font-style`]=`italic`),e.fontStyle&2&&(t[`font-weight`]=`bold`),e.fontStyle&4&&(t[`text-decoration`]=`underline`)),Object.keys(t).length>0&&(e.htmlStyle=t)}}};function Cg(e){return`--${e===`token`?`diffs-token`:`diffs`}-`}var wg=/^#(?:[0-9a-f]{3}0|[0-9a-f]{6}00)$/i,Tg=/^0(?:\.0+)?%?$/;function Eg(e){let t=e.indexOf(`(`);if(t<=0||!e.endsWith(`)`))return;let n=e.slice(0,t).trim();if(!/^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch|color)$/i.test(n))return;let r=e.slice(t+1,-1).trim();if(r.length===0)return;let i=r.lastIndexOf(`/`);if(i!==-1)return r.slice(i+1).trim();if(/^(?:rgba|hsla)$/i.test(n)){let e=r.split(`,`);if(e.length===4)return e[3]?.trim()}}function Dg(e){let t=/^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})\b/i.exec(e.trim());if(t==null)return null;let n=t[1],r,i=1;return n.length===3?r=n.split(``).map(e=>e+e).join(``):n.length===6?r=n:(r=n.slice(0,6),i=parseInt(n.slice(6,8),16)/255),[parseInt(r.slice(0,2),16),parseInt(r.slice(2,4),16),parseInt(r.slice(4,6),16),i]}function Og(e){if(e==null)return null;let t=Dg(e);if(t==null)return null;let n=t[0]/255,r=t[1]/255,i=t[2]/255,a=e=>e<=.03928?e/12.92:((e+.055)/1.055)**2.4;return .2126*a(n)+.7152*a(r)+.0722*a(i)}function kg(e){if(e==null)return!1;let t=e.trim().toLowerCase();if(t===`transparent`||wg.test(t))return!0;let n=Eg(t);return n!=null&&Tg.test(n)}function Ag(e,t,n){if(t==null||n==null)return!1;let r=Og(e),i=Og(t),a=Og(n);return r==null||i==null||a==null?!1:Math.abs(r-a)<Math.abs(r-i)}var jg=new WeakMap;function Mg(e){let t=jg.get(e);if(t!=null)return t;let n=e.colors??{},r={...n},i=n[`editor.background`]??e.bg,a=n[`editor.foreground`]??e.fg,o=n[`sideBar.background`]??i,s=n[`sideBar.foreground`]??a;Ng(r,`editor.background`,i),Ng(r,`editor.foreground`,a),Ng(r,`sideBar.background`,o),Ng(r,`sideBar.foreground`,s),Ng(r,`input.background`,n[`input.background`]??o),Ng(r,`sideBarSectionHeader.foreground`,n[`sideBarSectionHeader.foreground`]??s),Ng(r,`list.activeSelectionForeground`,n[`list.activeSelectionForeground`]??s),Ng(r,`gitDecoration.addedResourceForeground`,Pg(n[`gitDecoration.addedResourceForeground`],n[`terminal.ansiGreen`],n[`editorGutter.addedBackground`])),Ng(r,`gitDecoration.modifiedResourceForeground`,Pg(n[`gitDecoration.modifiedResourceForeground`],n[`terminal.ansiBlue`],n[`editorGutter.modifiedBackground`])),Ng(r,`gitDecoration.deletedResourceForeground`,Pg(n[`gitDecoration.deletedResourceForeground`],n[`terminal.ansiRed`],n[`editorGutter.deletedBackground`]));let c=(kg(n[`list.focusOutline`])?void 0:n[`list.focusOutline`])??(kg(n.focusBorder)?void 0:n.focusBorder);c==null?delete r[`list.focusOutline`]:r[`list.focusOutline`]=c;let l=n[`list.hoverBackground`];l!=null&&(Fg(l,o)||Ag(l,o,s))&&delete r[`list.hoverBackground`];let u=Object.freeze({...e,colors:Object.freeze(r)});return jg.set(e,u),u}function Ng(e,t,n){n!=null&&n!==``&&(e[t]=n)}function Pg(...e){for(let t of e)if(t!=null&&t!==``)return t}function Fg(e,t){return t!=null&&e.toLowerCase()===t.toLowerCase()}function Ig({theme:e=nr,highlighter:t,prefix:n}){let r=``;if(typeof e==`string`){let i=t.getTheme(e),a=Mg(i);r+=`color:${a.fg};`,r+=`background-color:${a.bg};`,r+=`${Cg(`global`)}fg:${a.fg};`,r+=`${Cg(`global`)}bg:${a.bg};`,r+=Lg(i,n)}else{let n=t.getTheme(e.dark),i=Mg(n);r+=`${Cg(`global`)}dark:${i.fg};`,r+=`${Cg(`global`)}dark-bg:${i.bg};`,r+=Lg(n,`dark`),n=t.getTheme(e.light),i=Mg(n),r+=`${Cg(`global`)}light:${i.fg};`,r+=`${Cg(`global`)}light-bg:${i.bg};`,r+=Lg(n,`light`)}return r}function Lg(e,t){t=t==null?``:`${t}-`;let n=``,r=e.colors?.[`gitDecoration.addedResourceForeground`]??e.colors?.[`terminal.ansiGreen`];r!=null&&(n+=`${Cg(`global`)}${t}addition-color:${r};`);let i=e.colors?.[`gitDecoration.deletedResourceForeground`]??e.colors?.[`terminal.ansiRed`];i!=null&&(n+=`${Cg(`global`)}${t}deletion-color:${i};`);let a=e.colors?.[`gitDecoration.modifiedResourceForeground`]??e.colors?.[`terminal.ansiBlue`];return a!=null&&(n+=`${Cg(`global`)}${t}modified-color:${a};`),n}function Rg(e){let t=e.children[0];for(;t!=null;){if(t.type===`element`&&t.tagName===`code`)return t.children;t=`children`in t?t.children[0]:null}throw console.error(e),Error(`getLineNodes: Unable to find children`)}var zg=10,Bg=13,Vg=4,Hg=40;function Ug(e){let t=[0],n=e.indexOf(`\r`),r=e.indexOf(`
179
- `),i=0,a=0;for(;n!==-1||r!==-1;){let o;if(n!==-1&&(r===-1||n<r)?r===n+1?(o=r+1,n=e.indexOf(`\r`,o),r=e.indexOf(`
180
- `,o)):(o=n+1,n=e.indexOf(`\r`,o)):(o=r+1,r=e.indexOf(`
181
- `,o)),t.push(o),++a===Vg){if(o-i<=Hg){for(let n=o;n<e.length;n++){let r=e.charCodeAt(n);(r===zg||r===Bg)&&(r===Bg&&n+1<e.length&&e.charCodeAt(n+1)===zg&&n++,t.push(n+1))}return t}i=o,a=0}}return t}function Wg(e){let t=Ug(e);return Array.from({length:t.length},(n,r)=>{let i=t[r],a=t[r+1]??e.length;return e.slice(i,a)})}var Gg={forcePlainText:!1};function Kg(e,t,{theme:n=nr,tokenizeMaxLineLength:r,useTokenTransformer:i},{forcePlainText:a,startingLine:o,totalLines:s,lines:c}=Gg){a?(o??=0,s??=1/0):(o=0,s=1/0);let l=o>0||s<1/0,{state:u,transformers:d}=bg(i),f=a?`text`:e.lang??og(e.name),p=typeof n==`string`?t.getTheme(n).type:void 0,m=Ig({theme:n,highlighter:t});u.lineInfo=e=>({type:`context`,lineIndex:e-1+o,lineNumber:e+o});let h=typeof n==`string`?{lang:f,theme:n,transformers:d,defaultColor:!1,cssVariablePrefix:Cg(`token`),tokenizeMaxLineLength:r,tokenizeTimeLimit:0}:{lang:f,themes:n,transformers:d,defaultColor:!1,cssVariablePrefix:Cg(`token`),tokenizeMaxLineLength:r,tokenizeTimeLimit:0},g=Rg(t.codeToHast(l?qg(c??Wg(e.contents),o,s):e.contents,h)),_=l?Array(o):g;return l&&_.push(...g),{code:_,themeStyles:m,baseThemeType:p}}function qg(e,t,n){if(e.length===0)return``;let r=Math.min(t+n,e.length);return e.slice(t,r).join(``)}function Jg(e){let t=e[0];return t!=null&&t.length>0?t:void 0}function Yg(e){return e.startingLine===0&&e.totalLines>0}function Xg(e,t){return e.endsWith(`\r
182
- `)?t+`\r
183
- `:e.endsWith(`\r`)?t+`\r`:e.endsWith(`
184
- `)?t+`
185
- `:t}function Zg(e,t){return I({tagName:`div`,children:e,properties:{"data-content":``,style:`grid-row: span ${t}`}})}function Qg(e){return(e.lang??og(e.name))===`text`}var $g=`<svg data-icon-sprite aria-hidden="true" width="0" height="0">
186
- <symbol id="diffs-icon-arrow-right-short" viewBox="0 0 16 16">
187
- <path d="M8.47 4.22a.75.75 0 0 0 0 1.06l1.97 1.97H3.75a.75.75 0 0 0 0 1.5h6.69l-1.97 1.97a.75.75 0 1 0 1.06 1.06l3.25-3.25a.75.75 0 0 0 0-1.06L9.53 4.22a.75.75 0 0 0-1.06 0"/>
188
- </symbol>
189
- <symbol id="diffs-icon-brand-github" viewBox="0 0 16 16">
190
- <path d="M8 0c4.42 0 8 3.58 8 8a8.01 8.01 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27s-1.36.09-2 .27c-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8"/>
191
- </symbol>
192
- <symbol id="diffs-icon-chevron" viewBox="0 0 16 16">
193
- <path d="M1.47 4.47a.75.75 0 0 1 1.06 0L8 9.94l5.47-5.47a.75.75 0 1 1 1.06 1.06l-6 6a.75.75 0 0 1-1.06 0l-6-6a.75.75 0 0 1 0-1.06"/>
194
- </symbol>
195
- <symbol id="diffs-icon-chevrons-narrow" viewBox="0 0 10 16">
196
- <path d="M4.47 2.22a.75.75 0 0 1 1.06 0l3.25 3.25a.75.75 0 0 1-1.06 1.06L5 3.81 2.28 6.53a.75.75 0 0 1-1.06-1.06zM1.22 9.47a.75.75 0 0 1 1.06 0L5 12.19l2.72-2.72a.75.75 0 0 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0l-3.25-3.25a.75.75 0 0 1 0-1.06"/>
197
- </symbol>
198
- <symbol id="diffs-icon-diff-split" viewBox="0 0 16 16">
199
- <path d="M14 0H8.5v16H14a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2m-1.5 6.5v1h1a.5.5 0 0 1 0 1h-1v1a.5.5 0 0 1-1 0v-1h-1a.5.5 0 0 1 0-1h1v-1a.5.5 0 0 1 1 0"/><path d="M2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h5.5V0zm.5 7.5h3a.5.5 0 0 1 0 1h-3a.5.5 0 0 1 0-1" opacity=".3"/>
200
- </symbol>
201
- <symbol id="diffs-icon-diff-unified" viewBox="0 0 16 16">
202
- <path fill-rule="evenodd" d="M16 14a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V8.5h16zm-8-4a.5.5 0 0 0-.5.5v1h-1a.5.5 0 0 0 0 1h1v1a.5.5 0 0 0 1 0v-1h1a.5.5 0 0 0 0-1h-1v-1A.5.5 0 0 0 8 10" clip-rule="evenodd"/><path fill-rule="evenodd" d="M14 0a2 2 0 0 1 2 2v5.5H0V2a2 2 0 0 1 2-2zM6.5 3.5a.5.5 0 0 0 0 1h3a.5.5 0 0 0 0-1z" clip-rule="evenodd" opacity=".4"/>
203
- </symbol>
204
- <symbol id="diffs-icon-expand" viewBox="0 0 16 16">
205
- <path d="M3.47 5.47a.75.75 0 0 1 1.06 0L8 8.94l3.47-3.47a.75.75 0 1 1 1.06 1.06l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 0 1 0-1.06"/>
206
- </symbol>
207
- <symbol id="diffs-icon-expand-all" viewBox="0 0 16 16">
208
- <path d="M11.47 9.47a.75.75 0 1 1 1.06 1.06l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 1 1 1.06-1.06L8 12.94zM7.526 1.418a.75.75 0 0 1 1.004.052l4 4a.75.75 0 1 1-1.06 1.06L8 3.06 4.53 6.53a.75.75 0 1 1-1.06-1.06l4-4z"/>
209
- </symbol>
210
- <symbol id="diffs-icon-file-code" viewBox="0 0 16 16">
211
- <path d="M10.75 0c.199 0 .39.08.53.22l3.5 3.5c.14.14.22.331.22.53v9A2.75 2.75 0 0 1 12.25 16h-8.5A2.75 2.75 0 0 1 1 13.25V2.75A2.75 2.75 0 0 1 3.75 0zm-7 1.5c-.69 0-1.25.56-1.25 1.25v10.5c0 .69.56 1.25 1.25 1.25h8.5c.69 0 1.25-.56 1.25-1.25V5h-1.25A2.25 2.25 0 0 1 10 2.75V1.5z"/><path d="M7.248 6.19a.75.75 0 0 1 .063 1.058L5.753 9l1.558 1.752a.75.75 0 0 1-1.122.996l-2-2.25a.75.75 0 0 1 0-.996l2-2.25a.75.75 0 0 1 1.06-.063M8.69 7.248a.75.75 0 1 1 1.12-.996l2 2.25a.75.75 0 0 1 0 .996l-2 2.25a.75.75 0 1 1-1.12-.996L10.245 9z"/>
212
- </symbol>
213
- <symbol id="diffs-icon-plus" viewBox="0 0 16 16">
214
- <path d="M8 3a.75.75 0 0 1 .75.75v3.5h3.5a.75.75 0 0 1 0 1.5h-3.5v3.5a.75.75 0 0 1-1.5 0v-3.5h-3.5a.75.75 0 0 1 0-1.5h3.5v-3.5A.75.75 0 0 1 8 3"/>
215
- </symbol>
216
- <symbol id="diffs-icon-symbol-added" viewBox="0 0 16 16">
217
- <path d="M8 4a.75.75 0 0 1 .75.75v2.5h2.5a.75.75 0 0 1 0 1.5h-2.5v2.5a.75.75 0 0 1-1.5 0v-2.5h-2.5a.75.75 0 0 1 0-1.5h2.5v-2.5A.75.75 0 0 1 8 4"/><path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/>
218
- </symbol>
219
- <symbol id="diffs-icon-symbol-deleted" viewBox="0 0 16 16">
220
- <path d="M4 8a.75.75 0 0 1 .75-.75h6.5a.75.75 0 0 1 0 1.5h-6.5A.75.75 0 0 1 4 8"/><path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/>
221
- </symbol>
222
- <symbol id="diffs-icon-symbol-diffstat" viewBox="0 0 16 16">
223
- <path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/><path d="M8.75 4.296a.75.75 0 0 0-1.5 0V6.25h-2a.75.75 0 0 0 0 1.5h2v1.5h1.5v-1.5h2a.75.75 0 0 0 0-1.5h-2zM5.25 10a.75.75 0 0 0 0 1.5h5.5a.75.75 0 0 0 0-1.5z"/>
224
- </symbol>
225
- <symbol id="diffs-icon-symbol-ignored" viewBox="0 0 16 16">
226
- <path d="M1.5 8c0 1.613.088 2.806.288 3.704.196.88.478 1.381.802 1.706s.826.607 1.706.802c.898.2 2.091.288 3.704.288s2.806-.088 3.704-.288c.88-.195 1.381-.478 1.706-.802s.607-.826.802-1.706c.2-.898.288-2.091.288-3.704s-.088-2.806-.288-3.704c-.195-.88-.478-1.381-.802-1.706s-.826-.606-1.706-.802C10.806 1.588 9.613 1.5 8 1.5s-2.806.088-3.704.288c-.88.196-1.381.478-1.706.802s-.606.826-.802 1.706C1.588 5.194 1.5 6.387 1.5 8M0 8c0-6.588 1.412-8 8-8s8 1.412 8 8-1.412 8-8 8-8-1.412-8-8m11.53-2.47a.75.75 0 0 0-1.06-1.06l-6 6a.75.75 0 1 0 1.06 1.06z"/>
227
- </symbol>
228
- <symbol id="diffs-icon-symbol-modified" viewBox="0 0 16 16">
229
- <path d="M1.5 8c0 1.613.088 2.806.288 3.704.196.88.478 1.381.802 1.706s.826.607 1.706.802c.898.2 2.091.288 3.704.288s2.806-.088 3.704-.288c.88-.195 1.381-.478 1.706-.802s.607-.826.802-1.706c.2-.898.288-2.091.288-3.704s-.088-2.806-.288-3.704c-.195-.88-.478-1.381-.802-1.706s-.826-.606-1.706-.802C10.806 1.588 9.613 1.5 8 1.5s-2.806.088-3.704.288c-.88.196-1.381.478-1.706.802s-.606.826-.802 1.706C1.588 5.194 1.5 6.387 1.5 8M0 8c0-6.588 1.412-8 8-8s8 1.412 8 8-1.412 8-8 8-8-1.412-8-8m8 3a3 3 0 1 0 0-6 3 3 0 0 0 0 6"/>
230
- </symbol>
231
- <symbol id="diffs-icon-symbol-moved" viewBox="0 0 16 16">
232
- <path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/><path d="M8.495 4.695a.75.75 0 0 0-.05 1.06L10.486 8l-2.041 2.246a.75.75 0 0 0 1.11 1.008l2.5-2.75a.75.75 0 0 0 0-1.008l-2.5-2.75a.75.75 0 0 0-1.06-.051m-4 0a.75.75 0 0 0-.05 1.06l2.044 2.248-1.796 1.995a.75.75 0 0 0 1.114 1.004l2.25-2.5a.75.75 0 0 0-.002-1.007l-2.5-2.75a.75.75 0 0 0-1.06-.05"/>
233
- </symbol>
234
- <symbol id="diffs-icon-symbol-ref" viewBox="0 0 16 16">
235
- <path d="M1.5 8c0 1.613.088 2.806.288 3.704.196.88.478 1.381.802 1.706.286.286.71.54 1.41.73V1.86c-.7.19-1.124.444-1.41.73-.324.325-.606.826-.802 1.706C1.588 5.194 1.5 6.387 1.5 8m4 6.397c.697.07 1.522.103 2.5.103 1.613 0 2.806-.088 3.704-.288.88-.195 1.381-.478 1.706-.802s.607-.826.802-1.706c.2-.898.288-2.091.288-3.704s-.088-2.806-.288-3.704c-.195-.88-.478-1.381-.802-1.706s-.826-.606-1.706-.802C10.806 1.588 9.613 1.5 8 1.5c-.978 0-1.803.033-2.5.103zM0 8c0-6.588 1.412-8 8-8s8 1.412 8 8-1.412 8-8 8-8-1.412-8-8m7-2a1 1 0 0 1 1-1h3a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1z"/>
236
- </symbol>
237
- </svg>`;function e_(e,t){return e==null||t==null?e===t:n_(e.customProperties,t.customProperties)&&e.type===t.type&&e.diffIndicators===t.diffIndicators&&e.disableBackground===t.disableBackground&&e.disableLineNumbers===t.disableLineNumbers&&e.overflow===t.overflow&&e.split===t.split&&e.totalLines===t.totalLines}var t_={};function n_(e=t_,t=t_){if(e===t)return!0;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(e[r]!==t[r])return!1;return!0}function r_(e){let t=document.createElement(`div`);return t.dataset.annotationSlot=``,t.slot=e,t.style.whiteSpace=`normal`,t}function i_(){let e=document.createElement(`div`);return e.slot=`gutter-utility-slot`,e.style.position=`absolute`,e.style.top=`0`,e.style.bottom=`0`,e.style.textAlign=`center`,e.style.whiteSpace=`normal`,e.style.touchAction=`none`,e}function a_(){let e=document.createElement(`style`);return e.setAttribute(ir,``),e}var o_=`@layer base {
238
- :host {
239
- --diffs-font-fallback: "SF Mono", Monaco, Consolas, "Ubuntu Mono", "Liberation Mono",
240
- "Courier New", monospace;
241
- --diffs-header-font-fallback: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
242
- "Noto Sans", "Liberation Sans", Arial, sans-serif;
243
- --diffs-mixer: light-dark(#000, #fff);
244
- --diffs-gap-fallback: 8px;
245
- --diffs-scrollbar-gutter-fallback: 6px;
246
- --diffs-scrollbar-gutter: var(--diffs-scrollbar-gutter-override, var(--diffs-scrollbar-gutter-measured, var(--diffs-scrollbar-gutter-fallback)));
247
- --diffs-added-light: #0dbe4e;
248
- --diffs-added-dark: #5ecc71;
249
- --diffs-modified-light: #009fff;
250
- --diffs-modified-dark: #69b1ff;
251
- --diffs-deleted-light: #ff2e3f;
252
- --diffs-deleted-dark: #ff6762;
253
- --diffs-warning-light: #d5a910;
254
- --diffs-warning-dark: #ffd452;
255
- color-scheme: light dark;
256
- font-family: var(--diffs-header-font-family, var(--diffs-header-font-fallback));
257
- font-size: var(--diffs-font-size, 13px);
258
- line-height: var(--diffs-line-height, 20px);
259
- font-feature-settings: var(--diffs-font-features);
260
- --diffs-bg: light-dark(var(--diffs-light-bg, #fff), var(--diffs-dark-bg, #000));
261
- --diffs-bg-buffer: var(--diffs-bg-buffer-override, light-dark(color-mix(in lab, var(--diffs-bg) 92%, var(--diffs-mixer)), color-mix(in lab, var(--diffs-bg) 92%, var(--diffs-mixer))));
262
- --diffs-bg-context: var(--diffs-bg-context-override, light-dark(color-mix(in lab, var(--diffs-bg) 98.5%, var(--diffs-mixer)), color-mix(in lab, var(--diffs-bg) 92.5%, var(--diffs-mixer))));
263
- --diffs-bg-context-gutter: var(--diffs-bg-context-gutter-override, light-dark(color-mix(in lab, var(--diffs-bg-context) 90%, var(--diffs-bg)), color-mix(in lab, var(--diffs-bg-context) 45%, var(--diffs-bg))));
264
- --diffs-bg-separator: var(--diffs-bg-separator-override, light-dark(color-mix(in lab, var(--diffs-bg) 96%, var(--diffs-mixer)), color-mix(in lab, var(--diffs-bg) 85%, var(--diffs-mixer))));
265
- --diffs-fg: light-dark(var(--diffs-light, #000), var(--diffs-dark, #fff));
266
- --diffs-fg-number: var(--diffs-fg-number-override, light-dark(color-mix(in lab, var(--diffs-fg) 65%, var(--diffs-bg)), color-mix(in lab, var(--diffs-fg) 65%, var(--diffs-bg))));
267
- --diffs-fg-conflict-marker: var(--diffs-fg-conflict-marker-override, var(--diffs-fg-number));
268
- --diffs-deletion-base: var(--diffs-deletion-color-override, light-dark(var(--diffs-light-deletion-color, var(--diffs-deletion-color, var(--diffs-deleted-light))), var(--diffs-dark-deletion-color, var(--diffs-deletion-color, var(--diffs-deleted-dark)))));
269
- --diffs-addition-base: var(--diffs-addition-color-override, light-dark(var(--diffs-light-addition-color, var(--diffs-addition-color, var(--diffs-added-light))), var(--diffs-dark-addition-color, var(--diffs-addition-color, var(--diffs-added-dark)))));
270
- --diffs-modified-base: var(--diffs-modified-color-override, light-dark(var(--diffs-light-modified-color, var(--diffs-modified-color, var(--diffs-modified-light))), var(--diffs-dark-modified-color, var(--diffs-modified-color, var(--diffs-modified-dark)))));
271
- --diffs-bg-deletion: var(--diffs-bg-deletion-override, light-dark(color-mix(in lab, var(--diffs-bg) 88%, var(--diffs-deletion-base)), color-mix(in lab, var(--diffs-bg) 80%, var(--diffs-deletion-base))));
272
- --diffs-bg-deletion-emphasis: var(--diffs-bg-deletion-emphasis-override, light-dark(rgb(from var(--diffs-deletion-base) r g b / .15), rgb(from var(--diffs-deletion-base) r g b / .2)));
273
- --diffs-bg-addition: var(--diffs-bg-addition-override, light-dark(color-mix(in lab, var(--diffs-bg) 88%, var(--diffs-addition-base)), color-mix(in lab, var(--diffs-bg) 80%, var(--diffs-addition-base))));
274
- --diffs-bg-addition-emphasis: var(--diffs-bg-addition-emphasis-override, light-dark(rgb(from var(--diffs-addition-base) r g b / .15), rgb(from var(--diffs-addition-base) r g b / .2)));
275
- --diffs-selection-base: var(--diffs-modified-base);
276
- --diffs-selection-number-fg: light-dark(color-mix(in lab, var(--diffs-selection-base) 65%, var(--diffs-mixer)), color-mix(in lab, var(--diffs-selection-base) 75%, var(--diffs-mixer)));
277
- background-color: var(--diffs-bg);
278
- color: var(--diffs-fg);
279
- display: block;
280
- }
281
-
282
- pre, code, [data-error-wrapper] {
283
- isolation: isolate;
284
- font-family: var(--diffs-font-family, var(--diffs-font-fallback));
285
- outline: none;
286
- margin: 0;
287
- padding: 0;
288
- display: block;
289
- }
290
-
291
- pre, code {
292
- background-color: var(--diffs-bg);
293
- }
294
-
295
- code {
296
- contain: content;
297
- }
298
-
299
- input, button {
300
- font-family: inherit;
301
- font-size: inherit;
302
- line-height: inherit;
303
- }
304
-
305
- *, :before, :after {
306
- box-sizing: border-box;
307
- }
308
-
309
- [data-icon-sprite] {
310
- display: none;
311
- }
312
-
313
- [data-diffs-header], [data-separator] {
314
- font-family: var(--diffs-header-font-family, var(--diffs-header-font-fallback));
315
- }
316
-
317
- [data-diffs-header][data-sticky] {
318
- z-index: 1;
319
- background-color: var(--diffs-bg);
320
- position: sticky;
321
- top: 0;
322
- }
323
-
324
- [data-file-info] {
325
- color: var(--fg);
326
- background-color: color-mix(in lab, var(--bg) 98%, var(--fg));
327
- border-block: 1px solid color-mix(in lab, var(--bg) 95%, var(--fg));
328
- padding: 10px;
329
- font-weight: 700;
330
- }
331
-
332
- [data-diff], [data-file] {
333
- --diffs-grid-number-column-width: minmax(min-content, max-content);
334
- --diffs-code-grid: var(--diffs-grid-number-column-width) 1fr;
335
-
336
- &[data-dehydrated] {
337
- --diffs-code-grid: var(--diffs-grid-number-column-width) minmax(0, 1fr);
338
- }
339
-
340
- &:hover [data-code]::-webkit-scrollbar-thumb {
341
- background-color: var(--diffs-bg-context);
342
- }
343
- }
344
-
345
- @supports (-webkit-touch-callout: none) {
346
- :host {
347
- --diffs-scrollbar-gutter-fallback: 0px;
348
- }
349
- }
350
-
351
- [data-line] span {
352
- color: light-dark(var(--diffs-token-light, var(--diffs-light)), var(--diffs-token-dark, var(--diffs-dark)));
353
- background-color: light-dark(var(--diffs-token-light-bg, inherit), var(--diffs-token-dark-bg, inherit));
354
- font-weight: light-dark(var(--diffs-token-light-font-weight, inherit), var(--diffs-token-dark-font-weight, inherit));
355
- font-style: light-dark(var(--diffs-token-light-font-style, inherit), var(--diffs-token-dark-font-style, inherit));
356
- text-decoration: light-dark(var(--diffs-token-light-text-decoration, inherit), var(--diffs-token-dark-text-decoration, inherit));
357
- }
358
-
359
- [data-line], [data-gutter-buffer], [data-column-number], [data-line-annotation], [data-no-newline], [data-merge-conflict], [data-merge-conflict-actions], [data-editor-overlay] {
360
- --diffs-computed-decoration-bg: var(--diffs-bg);
361
- --diffs-computed-diff-line-bg: var(--diffs-computed-decoration-bg);
362
- --diffs-computed-selected-line-bg: var(--diffs-computed-diff-line-bg);
363
- --diffs-computed-editor-active-line-bg: var(--diffs-computed-selected-line-bg);
364
- --diffs-computed-hovered-line-bg: var(--diffs-computed-editor-active-line-bg);
365
- --diffs-hover-mix-target: var(--diffs-bg-hover-override, var(--diffs-mixer));
366
- --diffs-line-bg: var(--diffs-computed-hovered-line-bg);
367
- color: var(--diffs-fg);
368
- background-color: var(--diffs-line-bg, var(--diffs-bg));
369
- }
370
-
371
- [data-line], [data-no-newline] {
372
- &[data-decoration-bg] {
373
- --mix-deco-light: 92%;
374
- --mix-deco-dark: 85%;
375
-
376
- &[data-decoration-bg-depth="2"] {
377
- --mix-deco-light: 88%;
378
- --mix-deco-dark: 80%;
379
- }
380
-
381
- &[data-decoration-bg-depth="3"] {
382
- --mix-deco-light: 85%;
383
- --mix-deco-dark: 78%;
384
- }
385
-
386
- --diffs-hover-mix-target: var(--diffs-decoration-bg);
387
- --diffs-computed-decoration-bg: light-dark(color-mix(in lab,
388
- var(--diffs-bg) var(--mix-deco-light),
389
- var(--diffs-decoration-bg)), color-mix(in lab,
390
- var(--diffs-bg) var(--mix-deco-dark),
391
- var(--diffs-decoration-bg)));
392
- }
393
- }
394
-
395
- [data-line-annotation], [data-gutter-buffer="annotation"] {
396
- --diffs-annotation-bg: var(--diffs-bg-context);
397
- --diffs-computed-decoration-bg: var(--diffs-annotation-bg);
398
- --diffs-hover-mix-target: var(--diffs-computed-editor-active-line-bg);
399
- }
400
-
401
- [data-merge-conflict-actions], [data-gutter-buffer="merge-conflict-action"], [data-gutter-buffer="merge-conflict-marker-base"], [data-gutter-buffer="merge-conflict-marker-separator"], [data-merge-conflict="marker-base"], [data-merge-conflict="marker-separator"] {
402
- --diffs-computed-decoration-bg: var(--diffs-bg-context);
403
- --diffs-hover-mix-target: var(--diffs-computed-editor-active-line-bg);
404
- }
405
-
406
- [data-gutter-buffer="merge-conflict-marker-start"], [data-merge-conflict="marker-start"] {
407
- --diffs-computed-decoration-bg: light-dark(color-mix(in lab,
408
- var(--diffs-bg) 78%,
409
- var(--conflict-bg-current-header-override, var(--diffs-addition-base))), color-mix(in lab,
410
- var(--diffs-bg) 68%,
411
- var(--conflict-bg-current-header-override, var(--diffs-addition-base))));
412
- --diffs-hover-mix-target: var(--diffs-computed-editor-active-line-bg);
413
- }
414
-
415
- [data-gutter-buffer="merge-conflict-marker-end"], [data-merge-conflict="marker-end"] {
416
- --diffs-computed-decoration-bg: light-dark(color-mix(in lab,
417
- var(--diffs-bg) 78%,
418
- var(--conflict-bg-incoming-header-override, var(--diffs-modified-base))), color-mix(in lab,
419
- var(--diffs-bg) 68%,
420
- var(--conflict-bg-incoming-header-override, var(--diffs-modified-base))));
421
- --diffs-hover-mix-target: var(--diffs-computed-editor-active-line-bg);
422
- }
423
-
424
- [data-has-merge-conflict] [data-line-annotation], [data-has-merge-conflict] [data-gutter-buffer="annotation"] {
425
- --diffs-computed-decoration-bg: var(--diffs-bg);
426
- --diffs-hover-mix-target: var(--diffs-computed-editor-active-line-bg);
427
- }
428
-
429
- :where([data-background]) {
430
- & [data-gutter-buffer], & [data-column-number] {
431
- --mix-light: 91%;
432
- --mix-dark: 85%;
433
- }
434
-
435
- & [data-line], & [data-no-newline] {
436
- --mix-light: 88%;
437
- --mix-dark: 80%;
438
- }
439
-
440
- & [data-gutter-buffer], & [data-column-number], & [data-line], & [data-no-newline] {
441
- --diffs-diff-line-mix-target: var(--diffs-bg);
442
-
443
- &[data-line-type="change-deletion"] {
444
- --diffs-diff-line-mix-target: var(--diffs-bg-deletion-override, var(--diffs-deletion-base));
445
- --diffs-hover-mix-target: var(--diffs-diff-line-mix-target);
446
-
447
- &:where([data-gutter-buffer], [data-column-number]) {
448
- color: var(--diffs-fg-number-deletion-override, var(--diffs-deletion-base));
449
- --diffs-diff-line-mix-target: var(--diffs-bg-deletion-number-override, var(--diffs-deletion-base));
450
- }
451
-
452
- --diffs-computed-diff-line-bg: light-dark(color-mix(in lab,
453
- var(--diffs-computed-decoration-bg) var(--mix-light),
454
- var(--diffs-diff-line-mix-target)), color-mix(in lab,
455
- var(--diffs-computed-decoration-bg) var(--mix-dark),
456
- var(--diffs-diff-line-mix-target)));
457
- }
458
-
459
- &[data-line-type="change-addition"] {
460
- --diffs-diff-line-mix-target: var(--diffs-bg-addition-override, var(--diffs-addition-base));
461
- --diffs-hover-mix-target: var(--diffs-diff-line-mix-target);
462
-
463
- &:where([data-gutter-buffer], [data-column-number]) {
464
- color: var(--diffs-fg-number-addition-override, var(--diffs-addition-base));
465
- --diffs-diff-line-mix-target: var(--diffs-bg-addition-number-override, var(--diffs-addition-base));
466
- }
467
-
468
- --diffs-computed-diff-line-bg: light-dark(color-mix(in lab,
469
- var(--diffs-computed-decoration-bg) var(--mix-light),
470
- var(--diffs-diff-line-mix-target)), color-mix(in lab,
471
- var(--diffs-computed-decoration-bg) var(--mix-dark),
472
- var(--diffs-diff-line-mix-target)));
473
- }
474
-
475
- &[data-merge-conflict="current"] {
476
- --diffs-diff-line-mix-target: var(--conflict-bg-current-override, var(--diffs-addition-base));
477
- --diffs-hover-mix-target: var(--diffs-diff-line-mix-target);
478
-
479
- &:where([data-gutter-buffer], [data-column-number]) {
480
- color: var(--diffs-fg-number-addition-override, var(--diffs-addition-base));
481
- --diffs-diff-line-mix-target: var(--conflict-bg-current-number-override, var(--diffs-addition-base));
482
- }
483
-
484
- --diffs-computed-diff-line-bg: light-dark(color-mix(in lab,
485
- var(--diffs-computed-decoration-bg) var(--mix-light),
486
- var(--diffs-diff-line-mix-target)), color-mix(in lab,
487
- var(--diffs-computed-decoration-bg) var(--mix-dark),
488
- var(--diffs-diff-line-mix-target)));
489
- }
490
-
491
- &[data-merge-conflict="incoming"] {
492
- --diffs-diff-line-mix-target: var(--conflict-bg-incoming-override, var(--diffs-modified-base));
493
- --diffs-hover-mix-target: var(--diffs-diff-line-mix-target);
494
-
495
- &:where([data-gutter-buffer], [data-column-number]) {
496
- color: var(--diffs-modified-base);
497
- --diffs-diff-line-mix-target: var(--conflict-bg-incoming-number-override, var(--diffs-modified-base));
498
- }
499
-
500
- --diffs-computed-diff-line-bg: light-dark(color-mix(in lab,
501
- var(--diffs-computed-decoration-bg) var(--mix-light),
502
- var(--diffs-diff-line-mix-target)), color-mix(in lab,
503
- var(--diffs-computed-decoration-bg) var(--mix-dark),
504
- var(--diffs-diff-line-mix-target)));
505
- }
506
- }
507
- }
508
-
509
- [data-gutter-buffer], [data-column-number], [data-line], [data-line-annotation], [data-merge-conflict], [data-merge-conflict-actions], [data-no-newline], [data-editor-overlay] {
510
- --diffs-selection-mix-target: var(--diffs-bg-selection-override, var(--diffs-selection-base));
511
- --diffs-selection-emphasis-mix-target: var(--diffs-selection-mix-target);
512
-
513
- &:where([data-editor-overlay]), &:where([data-line], [data-line-annotation], [data-merge-conflict], [data-merge-conflict-actions], [data-no-newline])[data-selected-line] {
514
- --mix-selection-light: 82%;
515
- --mix-selection-dark: 75%;
516
- --diffs-hover-mix-target: var(--diffs-selection-mix-target);
517
- }
518
-
519
- &:where([data-gutter-buffer][data-selected-line], [data-column-number]:is([data-selected-line], [data-editor-active-line])) {
520
- --mix-selection-light: 75%;
521
- --mix-selection-dark: 60%;
522
- --diffs-selection-mix-target: var(--diffs-bg-selection-number-override, var(--diffs-selection-base));
523
- --diffs-hover-mix-target: var(--diffs-selection-mix-target);
524
- }
525
-
526
- &:where([data-line][data-selected-line]):is([data-line-type="change-addition"], [data-line-type="change-deletion"]) {
527
- --diffs-selection-emphasis-mix-target: light-dark(color-mix(in lab,
528
- var(--diffs-diff-line-mix-target, var(--diffs-selection-mix-target))
529
- var(--mix-selection-light),
530
- var(--diffs-selection-mix-target)), var(--diffs-selection-mix-target));
531
- }
532
-
533
- &:where([data-editor-overlay]), &[data-selected-line] {
534
- --diffs-computed-selected-line-bg: light-dark(color-mix(in lab,
535
- var(--diffs-computed-diff-line-bg) var(--mix-selection-light),
536
- var(--diffs-selection-mix-target)), color-mix(in lab,
537
- var(--diffs-computed-diff-line-bg) var(--mix-selection-dark),
538
- var(--diffs-selection-mix-target)));
539
- }
540
- }
541
-
542
- [data-line][data-editor-active-line], [data-column-number][data-editor-active-line] {
543
- --diffs-computed-editor-active-line-bg: color-mix(in lab,
544
- var(--diffs-computed-selected-line-bg)
545
- var(--diffs-editor-active-line-source-mix, 100%),
546
- var(--diffs-selection-emphasis-mix-target));
547
- }
548
-
549
- @media (pointer: fine) {
550
- [data-line][data-hovered], [data-gutter-buffer][data-hovered], [data-column-number][data-hovered], [data-line-annotation][data-hovered], [data-no-newline][data-hovered], [data-merge-conflict][data-hovered], [data-merge-conflict-actions][data-hovered], [data-editor-overlay][data-hovered] {
551
- --diffs-computed-hovered-line-bg: light-dark(color-mix(in lab,
552
- var(--diffs-computed-editor-active-line-bg) 97%,
553
- var(--diffs-hover-mix-target)), color-mix(in lab,
554
- var(--diffs-computed-editor-active-line-bg) 91%,
555
- var(--diffs-hover-mix-target)));
556
- }
557
- }
558
-
559
- [data-gutter-buffer][data-selected-line], [data-column-number]:is([data-selected-line], [data-editor-active-line]) {
560
- color: var(--diffs-selection-number-fg);
561
- }
562
-
563
- [data-no-newline] {
564
- user-select: none;
565
-
566
- & span {
567
- opacity: .6;
568
- }
569
- }
570
-
571
- [data-diff-type="split"][data-overflow="scroll"] {
572
- grid-template-columns: 1fr 1fr;
573
- display: grid;
574
-
575
- & [data-additions] {
576
- border-left: 1px solid var(--diffs-bg);
577
- }
578
-
579
- & [data-deletions] {
580
- border-right: 1px solid var(--diffs-bg);
581
- }
582
- }
583
-
584
- [data-code] {
585
- grid-auto-flow: dense;
586
- grid-template-columns: var(--diffs-code-grid);
587
- overflow: var(--diffs-overflow-override, scroll) clip;
588
- overscroll-behavior-x: none;
589
- tab-size: var(--diffs-tab-size, 2);
590
- padding-top: var(--diffs-gap-block, var(--diffs-gap-fallback));
591
- padding-bottom: max(0px,
592
- calc(var(--diffs-gap-block, var(--diffs-gap-fallback)) -
593
- var(--diffs-scrollbar-gutter)));
594
- scrollbar-gutter: stable;
595
- align-self: flex-start;
596
- display: grid;
597
- }
598
-
599
- [data-diffs-scrollbar-measure] {
600
- opacity: 0;
601
- pointer-events: none;
602
- scrollbar-gutter: auto;
603
- grid-template-columns: none;
604
- width: 100px;
605
- height: 100px;
606
- padding: 0;
607
- position: absolute;
608
- top: -200px;
609
- left: -200px;
610
- }
611
-
612
- [data-container-size] {
613
- container-type: inline-size;
614
- }
615
-
616
- [data-code]::-webkit-scrollbar {
617
- width: 0;
618
- height: var(--diffs-scrollbar-gutter);
619
- }
620
-
621
- [data-code]::-webkit-scrollbar-track {
622
- background: none;
623
- }
624
-
625
- [data-code]::-webkit-scrollbar-thumb {
626
- background-color: #0000;
627
- background-clip: content-box;
628
- border: 1px solid #0000;
629
- border-radius: 3px;
630
- }
631
-
632
- [data-code]::-webkit-scrollbar-corner {
633
- background-color: #0000;
634
- }
635
-
636
- @supports ((-moz-appearance: none)) {
637
- [data-code] {
638
- scrollbar-width: thin;
639
- scrollbar-color: var(--diffs-bg-context) transparent;
640
- padding-bottom: var(--diffs-gap-block, var(--diffs-gap-fallback));
641
- }
642
- }
643
-
644
- [data-diffs-header] ~ [data-diff], [data-diffs-header] ~ [data-file] {
645
- & [data-code], &[data-overflow="wrap"], &[data-dehydrated][data-diff-type="split"][data-overflow="scroll"] {
646
- padding-top: 0;
647
- }
648
- }
649
-
650
- [data-gutter] {
651
- grid-template-rows: subgrid;
652
- grid-template-columns: subgrid;
653
- z-index: 3;
654
- background-color: var(--diffs-bg);
655
- grid-column: 1;
656
- display: grid;
657
- position: relative;
658
-
659
- & [data-gutter-buffer], & [data-column-number] {
660
- border-right: var(--diffs-gap-style, 2px solid var(--diffs-bg));
661
- }
662
- }
663
-
664
- [data-content] {
665
- grid-template-rows: subgrid;
666
- grid-template-columns: subgrid;
667
- background-color: var(--diffs-bg);
668
- grid-column: 2;
669
- min-width: 0;
670
- display: grid;
671
- }
672
-
673
- [data-diff-type="split"][data-overflow="wrap"], [data-dehydrated][data-diff-type="split"][data-overflow="scroll"] {
674
- grid-auto-flow: dense;
675
- grid-template-columns: repeat(2, var(--diffs-code-grid));
676
- padding-block: var(--diffs-gap-block, var(--diffs-gap-fallback));
677
- display: grid;
678
-
679
- & [data-code] {
680
- display: contents;
681
- }
682
-
683
- & [data-deletions] {
684
- & [data-gutter] {
685
- grid-column: 1;
686
- }
687
-
688
- & [data-content] {
689
- border-right: 1px solid var(--diffs-bg);
690
- grid-column: 2;
691
- }
692
- }
693
-
694
- & [data-additions] {
695
- & [data-gutter] {
696
- border-left: 1px solid var(--diffs-bg);
697
- grid-column: 3;
698
- }
699
-
700
- & [data-content] {
701
- grid-column: 4;
702
- }
703
- }
704
- }
705
-
706
- [data-dehydrated][data-diff-type="split"][data-overflow="scroll"] [data-content] {
707
- overflow: clip;
708
- }
709
-
710
- [data-overflow="scroll"] [data-gutter] {
711
- position: sticky;
712
- left: 0;
713
- }
714
-
715
- [data-interactive-lines] [data-line] {
716
- cursor: pointer;
717
- }
718
-
719
- [data-interactive-line-numbers] [data-column-number] {
720
- cursor: pointer;
721
- touch-action: none;
722
- }
723
-
724
- [data-content-buffer], [data-gutter-buffer] {
725
- user-select: none;
726
- min-height: 1lh;
727
- position: relative;
728
- }
729
-
730
- [data-gutter-buffer] {
731
- padding-left: 2ch;
732
- padding-right: 1ch;
733
-
734
- &:before {
735
- content: "";
736
- min-width: var(--diffs-min-number-column-width, var(--diffs-min-number-column-width-default, 3ch));
737
- display: block;
738
- }
739
- }
740
-
741
- [data-gutter-buffer="annotation"] {
742
- --diffs-annotation-bg: var(--diffs-bg-context-gutter);
743
- min-height: 0;
744
- }
745
-
746
- [data-gutter-buffer="buffer"] {
747
- --diffs-line-bg: var(--diffs-bg-context-gutter);
748
- }
749
-
750
- [data-content-buffer] {
751
- background-position: 5px 0;
752
- background-size: 8px 8px;
753
- background-origin: border-box;
754
- background-image: repeating-linear-gradient(-45deg,
755
- transparent,
756
- transparent calc(3px * 1.414),
757
- var(--diffs-bg-buffer) calc(3px * 1.414),
758
- var(--diffs-bg-buffer) calc(4px * 1.414));
759
- grid-column: 1;
760
- }
761
-
762
- [data-separator] {
763
- box-sizing: content-box;
764
- background-color: var(--diffs-bg);
765
- }
766
-
767
- [data-separator="simple"] {
768
- min-height: 4px;
769
- }
770
-
771
- [data-separator="line-info"], [data-separator="line-info-basic"], [data-separator="metadata"], [data-separator="simple"] {
772
- background-color: var(--diffs-bg-separator);
773
- }
774
-
775
- [data-separator="line-info"], [data-separator="line-info-basic"], [data-separator="metadata"] {
776
- height: 32px;
777
- position: relative;
778
- }
779
-
780
- [data-separator-wrapper] {
781
- user-select: none;
782
- fill: currentColor;
783
- background-color: var(--diffs-bg);
784
- align-items: center;
785
- height: 100%;
786
- display: flex;
787
- position: absolute;
788
- inset-inline: 0;
789
- }
790
-
791
- [data-content] [data-separator-wrapper] {
792
- display: none;
793
- }
794
-
795
- [data-separator="metadata"] [data-separator-wrapper] {
796
- background-color: var(--diffs-bg-separator);
797
- height: 100%;
798
- color: var(--diffs-fg-number);
799
- white-space: nowrap;
800
- text-overflow: ellipsis;
801
- min-width: min-content;
802
- padding-inline: 1ch;
803
- inset-inline: 100% auto;
804
- overflow: hidden;
805
- }
806
-
807
- [data-separator="line-info"] {
808
- margin-block: var(--diffs-gap-block, var(--diffs-gap-fallback));
809
-
810
- & [data-separator-wrapper] {
811
- min-width: 16px;
812
- }
813
- }
814
-
815
- [data-separator="line-info-basic"], [data-separator="metadata"] {
816
- margin-block: 0;
817
- }
818
-
819
- [data-separator="line-info"][data-separator-first] {
820
- margin-top: 0;
821
- }
822
-
823
- [data-separator="line-info"][data-separator-last] {
824
- margin-bottom: 0;
825
- }
826
-
827
- [data-expand-index] [data-separator-wrapper] {
828
- grid-template-columns: 32px auto;
829
- display: grid;
830
- }
831
-
832
- [data-expand-index] [data-separator-wrapper][data-separator-multi-button] {
833
- grid-template-columns: 32px 32px auto;
834
- }
835
-
836
- [data-expand-button], [data-separator-content] {
837
- background-color: var(--diffs-bg-separator);
838
- flex: none;
839
- align-items: center;
840
- display: flex;
841
- }
842
-
843
- [data-expand-index] [data-separator-content]:hover {
844
- cursor: pointer;
845
- text-decoration: underline;
846
- }
847
-
848
- [data-expand-button] {
849
- cursor: pointer;
850
- min-width: 32px;
851
- color: var(--diffs-fg-number);
852
- border-right: 2px solid var(--diffs-bg);
853
- flex-shrink: 0;
854
- justify-content: center;
855
- align-self: stretch;
856
-
857
- &:hover {
858
- color: var(--diffs-fg);
859
- }
860
-
861
- &[data-expand-all-button] {
862
- display: none;
863
- }
864
- }
865
-
866
- [data-expand-down] [data-icon] {
867
- transform: scaleY(-1);
868
- }
869
-
870
- [data-separator-content] {
871
- height: 100%;
872
- color: var(--diffs-fg-number);
873
- flex: auto;
874
- justify-content: flex-start;
875
- padding: 0 1ch;
876
- overflow: hidden;
877
- }
878
-
879
- [data-separator="line-info"], [data-separator="line-info-basic"] {
880
- & [data-separator-content] {
881
- user-select: none;
882
- height: 100%;
883
- overflow: clip;
884
- }
885
- }
886
-
887
- [data-unmodified-lines] {
888
- text-overflow: ellipsis;
889
- white-space: nowrap;
890
- flex: 0 auto;
891
- min-width: 0;
892
- display: block;
893
- overflow: hidden;
894
- }
895
-
896
- @supports (width: 1cqi) {
897
- [data-unified] {
898
- & [data-separator="line-info"] [data-separator-wrapper] {
899
- padding-inline: var(--diffs-gap-inline, var(--diffs-gap-fallback));
900
- width: 100cqi;
901
-
902
- & [data-separator-content] {
903
- border-radius: 6px;
904
- }
905
- }
906
-
907
- & [data-separator="line-info"][data-expand-index] [data-separator-wrapper] [data-separator-content] {
908
- border-top-left-radius: unset;
909
- border-bottom-left-radius: unset;
910
- }
911
- }
912
-
913
- [data-gutter] {
914
- & [data-separator="line-info"] [data-separator-wrapper] {
915
- padding-left: var(--diffs-gap-inline, var(--diffs-gap-fallback));
916
- }
917
-
918
- & [data-separator="line-info"] [data-separator-content] {
919
- border-top-left-radius: 6px;
920
- border-bottom-left-radius: 6px;
921
- }
922
-
923
- & [data-separator="line-info"][data-expand-index] [data-separator-content] {
924
- border-top-left-radius: unset;
925
- border-bottom-left-radius: unset;
926
- }
927
- }
928
-
929
- [data-additions] {
930
- & [data-content] [data-separator="line-info"] {
931
- background-color: var(--diffs-bg);
932
-
933
- & [data-separator-wrapper] {
934
- display: none;
935
- }
936
- }
937
-
938
- & [data-gutter] [data-separator="line-info"] [data-separator-wrapper] {
939
- background-color: var(--diffs-bg-separator);
940
- border-top-right-radius: 6px;
941
- border-bottom-right-radius: 6px;
942
- height: 100%;
943
- display: block;
944
-
945
- & [data-separator-content], & [data-expand-button] {
946
- display: none;
947
- }
948
- }
949
- }
950
-
951
- [data-overflow="scroll"] [data-additions] [data-gutter] [data-separator="line-info"] [data-separator-wrapper] {
952
- width: calc(100cqi - var(--diffs-gap-inline, var(--diffs-gap-fallback)));
953
- }
954
-
955
- [data-overflow="wrap"] [data-additions] [data-content] [data-separator="line-info"] [data-separator-wrapper] {
956
- background-color: var(--diffs-bg-separator);
957
- height: 100%;
958
- margin-right: var(--diffs-gap-inline, var(--diffs-gap-fallback));
959
- border-top-right-radius: 6px;
960
- border-bottom-right-radius: 6px;
961
- display: block;
962
-
963
- & [data-separator-content], & [data-expand-button] {
964
- display: none;
965
- }
966
- }
967
-
968
- [data-separator="line-info"] [data-separator-wrapper] {
969
- & [data-expand-both], & [data-expand-down], & [data-expand-up] {
970
- border-top-left-radius: 6px;
971
- border-bottom-left-radius: 6px;
972
- }
973
- }
974
-
975
- @media (pointer: fine) {
976
- [data-separator="line-info"] [data-separator-wrapper] {
977
- &[data-separator-multi-button] {
978
- & [data-expand-up] {
979
- border-top-left-radius: 6px;
980
- border-bottom-left-radius: unset;
981
- }
982
-
983
- & [data-expand-down] {
984
- border-bottom-left-radius: 6px;
985
- border-top-left-radius: unset;
986
- }
987
- }
988
- }
989
- }
990
- }
991
-
992
- @media (pointer: coarse) {
993
- [data-separator="line-info-basic"] [data-separator-wrapper][data-separator-multi-button] {
994
- grid-template-columns: 34px 34px auto;
995
-
996
- & [data-separator-content] {
997
- grid-column: unset;
998
- grid-row: unset;
999
- }
1000
- }
1001
-
1002
- @supports (width: 1cqi) {
1003
- [data-separator="line-info"] [data-separator-wrapper] {
1004
- & [data-expand-both], & [data-expand-down], & [data-expand-up] {
1005
- border-top-left-radius: 6px;
1006
- border-bottom-left-radius: 6px;
1007
- }
1008
-
1009
- &[data-separator-multi-button] {
1010
- & [data-expand-up] {
1011
- border-top-left-radius: 6px;
1012
- border-bottom-left-radius: 6px;
1013
- }
1014
-
1015
- & [data-expand-down] {
1016
- border-bottom-left-radius: unset;
1017
- border-top-left-radius: unset;
1018
- }
1019
- }
1020
- }
1021
- }
1022
- }
1023
-
1024
- @media (pointer: fine) {
1025
- [data-separator-wrapper][data-separator-multi-button] {
1026
- grid-template-rows: 50% 50%;
1027
- display: grid;
1028
-
1029
- & [data-separator-content] {
1030
- grid-area: 1 / 2 / -1;
1031
- min-width: min-content;
1032
- }
1033
-
1034
- & [data-expand-button] {
1035
- grid-column: 1;
1036
- }
1037
- }
1038
-
1039
- [data-separator="line-info"] [data-separator-wrapper], [data-separator="line-info"] [data-separator-wrapper][data-separator-multi-button] {
1040
- grid-template-columns: 34px auto;
1041
- }
1042
-
1043
- [data-separator="line-info-basic"][data-expand-index] [data-separator-wrapper] {
1044
- grid-template-columns: 100% auto;
1045
- }
1046
-
1047
- [data-separator="line-info"], [data-separator="line-info-basic"] {
1048
- & [data-separator-multi-button] {
1049
- & [data-expand-up] {
1050
- border-bottom: 1px solid var(--diffs-bg);
1051
- border-right: 2px solid var(--diffs-bg);
1052
- }
1053
-
1054
- & [data-expand-down] {
1055
- border-top: 1px solid var(--diffs-bg);
1056
- border-right: 2px solid var(--diffs-bg);
1057
- }
1058
- }
1059
- }
1060
- }
1061
-
1062
- [data-additions] [data-gutter] [data-separator-wrapper], [data-additions] [data-separator="line-info-basic"] [data-separator-wrapper], [data-content] [data-separator-wrapper] {
1063
- display: none;
1064
- }
1065
-
1066
- [data-line-annotation] {
1067
- min-height: var(--diffs-annotation-min-height, 0);
1068
- z-index: 2;
1069
- }
1070
-
1071
- [data-merge-conflict-actions] {
1072
- z-index: 2;
1073
- }
1074
-
1075
- [data-separator="custom"] {
1076
- grid-template-columns: subgrid;
1077
- display: grid;
1078
- }
1079
-
1080
- [data-line], [data-column-number], [data-no-newline] {
1081
- padding-inline: 1ch;
1082
- position: relative;
1083
- }
1084
-
1085
- [data-indicators="classic"] [data-line] {
1086
- padding-inline-start: 2ch;
1087
- }
1088
-
1089
- [data-indicators="classic"] {
1090
- & [data-line-type="change-addition"], & [data-line-type="change-deletion"] {
1091
- &[data-no-newline], &[data-line] {
1092
- &:before {
1093
- user-select: none;
1094
- width: 1ch;
1095
- height: 1lh;
1096
- display: inline-block;
1097
- position: absolute;
1098
- top: 0;
1099
- left: 0;
1100
- }
1101
- }
1102
- }
1103
-
1104
- & [data-line-type="change-addition"] {
1105
- &[data-line], &[data-no-newline] {
1106
- &:before {
1107
- content: "+";
1108
- color: var(--diffs-addition-base);
1109
- }
1110
- }
1111
- }
1112
-
1113
- & [data-line-type="change-deletion"] {
1114
- &[data-line], &[data-no-newline] {
1115
- &:before {
1116
- content: "-";
1117
- color: var(--diffs-deletion-base);
1118
- }
1119
- }
1120
- }
1121
- }
1122
-
1123
- [data-indicators="bars"] {
1124
- & [data-line-type="change-deletion"], & [data-line-type="change-addition"] {
1125
- &[data-column-number] {
1126
- &:before {
1127
- content: "";
1128
- user-select: none;
1129
- contain: strict;
1130
- width: 4px;
1131
- height: 100%;
1132
- display: block;
1133
- position: absolute;
1134
- top: 0;
1135
- left: 0;
1136
- }
1137
- }
1138
- }
1139
-
1140
- & [data-line-type="change-deletion"] {
1141
- &[data-column-number] {
1142
- &:before {
1143
- background-image: linear-gradient(0deg,
1144
- var(--diffs-bg-deletion) 50%,
1145
- var(--diffs-deletion-base) 50%);
1146
- background-repeat: repeat;
1147
- background-size: 2px 2px;
1148
- background-size: calc(1lh / round(1lh / 2px))
1149
- calc(1lh / round(1lh / 2px));
1150
- }
1151
- }
1152
- }
1153
-
1154
- & [data-line-type="change-addition"] {
1155
- &[data-column-number] {
1156
- &:before {
1157
- background-color: var(--diffs-addition-base);
1158
- }
1159
- }
1160
- }
1161
- }
1162
-
1163
- [data-overflow="wrap"] {
1164
- & [data-line] {
1165
- white-space: pre-wrap;
1166
- word-break: break-word;
1167
- }
1168
-
1169
- & [data-annotation-content] {
1170
- word-break: break-word;
1171
- }
1172
- }
1173
-
1174
- [data-overflow="scroll"] [data-line] {
1175
- white-space: pre;
1176
- min-height: 1lh;
1177
- }
1178
-
1179
- [data-column-number] {
1180
- box-sizing: content-box;
1181
- text-align: right;
1182
- user-select: none;
1183
- color: var(--diffs-fg-number);
1184
- padding-left: 2ch;
1185
- }
1186
-
1187
- [data-line-number-content] {
1188
- min-width: var(--diffs-min-number-column-width, var(--diffs-min-number-column-width-default, 3ch));
1189
- z-index: 1;
1190
- display: inline-block;
1191
- position: relative;
1192
- }
1193
-
1194
- [data-disable-line-numbers] {
1195
- & [data-gutter-buffer], & [data-column-number] {
1196
- min-width: 4px;
1197
- padding: 0;
1198
-
1199
- &:before {
1200
- min-width: 0;
1201
- }
1202
- }
1203
-
1204
- & [data-line-number-content] {
1205
- display: none;
1206
- }
1207
-
1208
- & [data-gutter-utility-slot] {
1209
- right: unset;
1210
- justify-content: flex-start;
1211
- left: 0;
1212
- }
1213
-
1214
- &[data-indicators="bars"] [data-gutter-utility-slot] {
1215
- left: 6px;
1216
- }
1217
- }
1218
-
1219
- [data-file][data-disable-line-numbers] {
1220
- & [data-gutter-buffer], & [data-column-number] {
1221
- border-right: 0;
1222
- min-width: 0;
1223
- }
1224
- }
1225
-
1226
- [data-diff-span] {
1227
- box-decoration-break: clone;
1228
- border-radius: 3px;
1229
- }
1230
-
1231
- [data-line-type="change-addition"] [data-diff-span] {
1232
- background-color: var(--diffs-bg-addition-emphasis);
1233
- }
1234
-
1235
- [data-line-type="change-deletion"] [data-diff-span] {
1236
- background-color: var(--diffs-bg-deletion-emphasis);
1237
- }
1238
-
1239
- [data-merge-conflict="marker-start"], [data-merge-conflict="marker-base"], [data-merge-conflict="marker-separator"], [data-merge-conflict="marker-end"] {
1240
- color: var(--diffs-fg);
1241
- padding-left: 1ch;
1242
- }
1243
-
1244
- [data-merge-conflict="marker-start"], [data-merge-conflict="marker-end"] {
1245
- align-items: center;
1246
- display: flex;
1247
-
1248
- &:after {
1249
- color: var(--diffs-fg-conflict-marker);
1250
- font-size: .75rem;
1251
- font-style: normal;
1252
- line-height: 1.25rem;
1253
- font-family: var(--diffs-header-font-family, var(--diffs-header-font-fallback));
1254
- padding-left: 1ch;
1255
- }
1256
- }
1257
-
1258
- [data-merge-conflict="marker-start"]:after {
1259
- content: "(Current Change)";
1260
- }
1261
-
1262
- [data-merge-conflict="marker-end"]:after {
1263
- content: "(Incoming Change)";
1264
- }
1265
-
1266
- [data-merge-conflict-actions-content] {
1267
- min-height: 1.75rem;
1268
- font-family: var(--diffs-header-font-family, var(--diffs-header-font-fallback));
1269
- color: var(--diffs-fg);
1270
- align-items: center;
1271
- gap: .25rem;
1272
- padding-inline: .5rem;
1273
- font-size: .75rem;
1274
- line-height: 1.2;
1275
- display: flex;
1276
- }
1277
-
1278
- [data-merge-conflict-action] {
1279
- appearance: none;
1280
- color: var(--diffs-fg-number);
1281
- font: inherit;
1282
- cursor: pointer;
1283
- background: none;
1284
- border: 0;
1285
- padding: 0;
1286
- font-style: normal;
1287
- }
1288
-
1289
- [data-merge-conflict-action]:hover {
1290
- color: var(--diffs-fg);
1291
- }
1292
-
1293
- [data-merge-conflict-action="current"]:hover {
1294
- color: var(--diffs-addition-base);
1295
- }
1296
-
1297
- [data-merge-conflict-action="incoming"]:hover {
1298
- color: var(--diffs-modified-base);
1299
- }
1300
-
1301
- [data-merge-conflict-action-separator] {
1302
- color: var(--diffs-fg-number);
1303
- opacity: .6;
1304
- user-select: none;
1305
- }
1306
-
1307
- [data-diffs-header="default"] {
1308
- background-color: var(--diffs-bg);
1309
- justify-content: space-between;
1310
- align-items: center;
1311
- gap: var(--diffs-gap-inline, var(--diffs-gap-fallback));
1312
- min-height: calc(1lh + (var(--diffs-gap-block, var(--diffs-gap-fallback)) * 3));
1313
- z-index: 2;
1314
- flex-direction: row;
1315
- padding-inline: 16px;
1316
- display: flex;
1317
- position: relative;
1318
- top: 0;
1319
- }
1320
-
1321
- [data-header-content] {
1322
- align-items: center;
1323
- gap: var(--diffs-gap-inline, var(--diffs-gap-fallback));
1324
- white-space: nowrap;
1325
- flex-direction: row;
1326
- min-width: 0;
1327
- display: flex;
1328
- }
1329
-
1330
- [data-header-content] [data-prev-name], [data-header-content] [data-title] {
1331
- text-overflow: ellipsis;
1332
- white-space: nowrap;
1333
- direction: rtl;
1334
- min-width: 0;
1335
- overflow: hidden;
1336
- }
1337
-
1338
- [data-prev-name] {
1339
- opacity: .7;
1340
- }
1341
-
1342
- [data-rename-icon] {
1343
- fill: currentColor;
1344
- flex-grow: 0;
1345
- flex-shrink: 0;
1346
- }
1347
-
1348
- [data-diffs-header="default"] [data-metadata] {
1349
- white-space: nowrap;
1350
- align-items: center;
1351
- gap: 1ch;
1352
- display: flex;
1353
- }
1354
-
1355
- [data-diffs-header="default"] [data-additions-count] {
1356
- font-family: var(--diffs-font-family, var(--diffs-font-fallback));
1357
- color: var(--diffs-addition-base);
1358
- }
1359
-
1360
- [data-diffs-header="default"] [data-deletions-count] {
1361
- font-family: var(--diffs-font-family, var(--diffs-font-fallback));
1362
- color: var(--diffs-deletion-base);
1363
- }
1364
-
1365
- [data-change-icon] {
1366
- fill: currentColor;
1367
- flex-shrink: 0;
1368
- }
1369
-
1370
- [data-change-icon="change"], [data-change-icon="rename-pure"], [data-change-icon="rename-changed"] {
1371
- color: var(--diffs-modified-base);
1372
- }
1373
-
1374
- [data-change-icon="new"] {
1375
- color: var(--diffs-addition-base);
1376
- }
1377
-
1378
- [data-change-icon="deleted"] {
1379
- color: var(--diffs-deletion-base);
1380
- }
1381
-
1382
- [data-change-icon="file"] {
1383
- opacity: .6;
1384
- }
1385
-
1386
- [data-annotation-content] {
1387
- z-index: 2;
1388
- isolation: isolate;
1389
- white-space: normal;
1390
- align-self: flex-start;
1391
- min-width: 0;
1392
- display: flow-root;
1393
- position: relative;
1394
- }
1395
-
1396
- [data-overflow="scroll"] [data-annotation-content], [data-overflow="scroll"] [data-merge-conflict-actions-content] {
1397
- width: var(--diffs-column-content-width, auto);
1398
- left: var(--diffs-column-number-width, 0);
1399
- position: sticky;
1400
- }
1401
-
1402
- [data-annotation-slot] {
1403
- text-wrap-mode: wrap;
1404
- word-break: normal;
1405
- white-space-collapse: collapse;
1406
- }
1407
-
1408
- [data-gutter-utility-slot] {
1409
- touch-action: none;
1410
- justify-content: flex-end;
1411
- display: flex;
1412
- position: absolute;
1413
- top: 0;
1414
- bottom: 0;
1415
- right: 0;
1416
- }
1417
-
1418
- [data-utility-button] {
1419
- appearance: none;
1420
- cursor: pointer;
1421
- width: 1lh;
1422
- height: 1lh;
1423
- font-size: var(--diffs-font-size, 13px);
1424
- line-height: var(--diffs-line-height, 20px);
1425
- background-color: var(--diffs-modified-base);
1426
- color: var(--diffs-bg);
1427
- fill: currentColor;
1428
- z-index: 4;
1429
- touch-action: none;
1430
- border: none;
1431
- border-radius: 4px;
1432
- justify-content: center;
1433
- align-items: center;
1434
- margin-right: calc(-1lh + 1ch);
1435
- padding: 0;
1436
- display: flex;
1437
- position: relative;
1438
-
1439
- &:before {
1440
- content: "";
1441
- display: block;
1442
- position: absolute;
1443
- inset: 0 0 0 -4px;
1444
- }
1445
- }
1446
-
1447
- [data-decoration-bar-stack] {
1448
- pointer-events: none;
1449
- isolation: isolate;
1450
- z-index: 1;
1451
- background-color: var(--diffs-decoration-bar-color, transparent);
1452
- box-sizing: content-box;
1453
- border-left: 2px solid var(--diffs-bg);
1454
- border-right: 2px solid var(--diffs-bg);
1455
- width: 6px;
1456
- position: absolute;
1457
- top: 0;
1458
- bottom: 0;
1459
- right: -2px;
1460
-
1461
- [data-decoration-bar-depth="1"] & {
1462
- background-color: color-mix(in lab,
1463
- var(--diffs-bg) 20%,
1464
- var(--diffs-decoration-bar-color, transparent));
1465
- }
1466
-
1467
- [data-decoration-bar-depth="2"] & {
1468
- background-color: color-mix(in lab,
1469
- var(--diffs-bg) 45%,
1470
- var(--diffs-decoration-bar-color, transparent));
1471
- }
1472
-
1473
- [data-decoration-bar-depth="3"] & {
1474
- background-color: color-mix(in lab,
1475
- var(--diffs-bg) 65%,
1476
- var(--diffs-decoration-bar-color, transparent));
1477
- }
1478
-
1479
- [data-decoration-bar-start] & {
1480
- border-top-left-radius: 5px;
1481
- border-top-right-radius: 5px;
1482
- }
1483
-
1484
- [data-decoration-bar-end] & {
1485
- z-index: 3;
1486
- border-bottom-right-radius: 5px;
1487
- border-bottom-left-radius: 5px;
1488
- }
1489
- }
1490
-
1491
- [data-placeholder] {
1492
- contain: strict;
1493
- }
1494
-
1495
- [data-error-wrapper] {
1496
- padding: var(--diffs-gap-block, var(--diffs-gap-fallback))
1497
- var(--diffs-gap-inline, var(--diffs-gap-fallback));
1498
- scrollbar-width: none;
1499
- max-height: 400px;
1500
- overflow: auto;
1501
-
1502
- & [data-error-message] {
1503
- color: var(--diffs-deletion-base);
1504
- font-size: 18px;
1505
- font-weight: bold;
1506
- }
1507
-
1508
- & [data-error-stack] {
1509
- color: var(--diffs-fg-number);
1510
- }
1511
- }
1512
- }
1513
-
1514
- @layer theme, rendered, unsafe;
1515
- `,s_;function c_(e){if(s_!=null)return s_;let t=e.host;if(typeof HTMLElement<`u`&&t instanceof HTMLElement&&!t.isConnected)return;let n=document.createElement(`div`);n.setAttribute(`data-code`,``),n.setAttribute(ar,`true`);let r=document.createElement(`div`);return r.style.position=`relative`,r.style.width=`200%`,r.style.height=`200%`,n.appendChild(r),e.appendChild(n),s_=Math.max(n.offsetHeight-n.clientHeight,0),n.remove(),s_}function l_(e){return`${or}: ${e==null?`var(--diffs-scrollbar-gutter-fallback)`:`${e}px`};`}var u_=`@layer base, theme, rendered, unsafe;`,d_=RegExp(`${h_(or)}\\s*:\\s*[^;]+;`);function f_(e){return`${u_}
1516
- @layer unsafe {
1517
- ${e}
1518
- }`}function p_(e,t=`system`,n){return`${u_}
1519
- @layer rendered {
1520
- :host {${t===`system`?``:`
1521
- color-scheme: ${t};`}
1522
- ${l_(n)}
1523
- ${e}
1524
- }
1525
- }`}function m_(e,t){let n=l_(t);return e.replace(d_,n)}function h_(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function g_({code:e,pre:t,columnType:n,rowSpan:r,containerSize:i=!1}={}){return e??(e=document.createElement(`code`),e.setAttribute(`data-code`,``),n!=null&&e.setAttribute(`data-${n}`,``),t?.appendChild(e)),r==null?e.style.removeProperty(`grid-row`):e.style.setProperty(`grid-row`,`span ${r}`),i?e.setAttribute(`data-container-size`,``):e.removeAttribute(`data-container-size`),e}function __(e,t){if(t==null)return;let n=e.shadowRoot??e.attachShadow({mode:`open`});n.innerHTML===``&&(n.innerHTML=t)}function v_(e,{type:t,diffIndicators:n,disableBackground:r,disableLineNumbers:i,overflow:a,split:o,totalLines:s,customProperties:c}){if(c!=null)for(let t in c){let n=c[t];n!=null&&e.setAttribute(t,`${n}`)}switch(t===`diff`?(e.setAttribute(`data-diff`,``),e.removeAttribute(`data-file`)):(e.setAttribute(`data-file`,``),e.removeAttribute(`data-diff`)),n){case`bars`:case`classic`:e.setAttribute(`data-indicators`,n);break;case`none`:e.removeAttribute(`data-indicators`)}return i?e.setAttribute(`data-disable-line-numbers`,``):e.removeAttribute(`data-disable-line-numbers`),r?e.removeAttribute(`data-background`):e.setAttribute(`data-background`,``),t===`diff`?e.setAttribute(`data-diff-type`,o?`split`:`single`):e.removeAttribute(`data-diff-type`),e.setAttribute(`data-overflow`,a),e.style.setProperty(`--diffs-min-number-column-width-default`,`${`${s}`.length}ch`),e}function y_(e){if(typeof HTMLStyleElement<`u`&&e instanceof HTMLStyleElement)return!0;let t=e.tagName??e.nodeName;return typeof t==`string`&&t.toLowerCase()===`style`}function b_(e){return e?.useTokenTransformer===!0||e?.onTokenClick!=null||e?.onTokenEnter!=null||e?.onTokenLeave!=null}function x_(e,t){let n=e?.offsetHeight??0;if(e==null||n===0){t();return}e.style.minHeight=`${n}px`;try{t(),e.offsetHeight}finally{e.style.minHeight=``}}function S_({shadowRoot:e,currentNode:t,themeCSS:n}){if(n.trim()===``){t?.remove();return}return t??=C_(),t.textContent=n,t.parentNode!==e&&e.appendChild(t),t}function C_(){let e=document.createElement(`style`);return e.setAttribute(rr,``),e}var w_=void 0;function T_(){return w_??=`safari`in window&&`pushNotification`in window.safari||/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}if(typeof HTMLElement<`u`&&customElements.get(`diffs-container`)==null){let e;class t extends HTMLElement{constructor(){if(super(),this.shadowRoot!=null)return;let t=this.attachShadow({mode:`open`});e??(e=new CSSStyleSheet,e.replaceSync(o_)),t.adoptedStyleSheets=[e]}connectedCallback(){c_(this.shadowRoot??this.attachShadow({mode:`open`}))}}customElements.define(Gn,t)}function E_(e,t){return e===t||e?.cacheKey!=null&&e.cacheKey===t?.cacheKey}function D_(e){return{...e,hunks:e.hunks.map(e=>({...e,hunkContent:e.hunkContent.map(e=>({...e}))})),deletionLines:[...e.deletionLines],additionLines:[...e.additionLines]}}function O_(e){return e===``?[]:e.split(qn)}function k_(e,t,n){let r=e===`clone`?D_(t):t;if(!r.isPartial)throw Error(`hydratePartialDiff: fileDiff must be partial`);switch(r.type){case`change`:case`rename-changed`:return A_(r,M_(r,n),N_(r,n));case`rename-pure`:{let e=N_(r,n);P_(r,n);let t=O_(e.contents);return r.isPartial=!1,r.deletionLines=t,r.additionLines=t,I_(r,null,e),r}}throw Error(`hydratePartialDiff: ${r.type} diffs cannot be hydrated from loaded files`)}function A_(e,t,n){let r=O_(t.contents),i=O_(n.contents),{hunks:a,splitLineCount:o,unifiedLineCount:s}=j_(e.hunks,i.length);return e.hunks=a,e.splitLineCount=o,e.unifiedLineCount=s,e.isPartial=!1,e.deletionLines=r,e.additionLines=i,I_(e,t,n),e}function j_(e,t){let n=0,r=0,i=0,a=[];for(let t of e){let e=Math.max(t.additionStart-1,0),o=Math.max(t.deletionStart-1,0),s=e,c=o,l=0,u=0,d=0,f=0,p=[];for(let e of t.hunkContent){if(e.type===`context`){p.push({...e,additionLineIndex:s,deletionLineIndex:c}),s+=e.lines,c+=e.lines,d+=e.lines,f+=e.lines;continue}p.push({...e,additionLineIndex:s,deletionLineIndex:c}),s+=e.additions,c+=e.deletions,l+=e.additions,u+=e.deletions,d+=Math.max(e.additions,e.deletions),f+=e.additions+e.deletions}let m=Math.max(Tr(t.additionStart,t.additionCount)-i,0);a.push({...t,collapsedBefore:m,additionLineIndex:e,deletionLineIndex:o,additionLines:l,deletionLines:u,hunkContent:p,splitLineStart:n+m,unifiedLineStart:r+m,splitLineCount:d,unifiedLineCount:f}),n+=m+d,r+=m+f,i=F(t.additionStart,t.additionCount)}if(a.length>0){let e=a[a.length-1],i=F(e.additionStart,e.additionCount),o=Math.max(t-i,0);n+=o,r+=o}return{hunks:a,splitLineCount:n,unifiedLineCount:r}}function M_(e,t){if(t.oldFile==null)throw Error(`hydratePartialDiff: ${e.type} diff for ${e.name} requires oldFile`);return t.oldFile}function N_(e,t){if(t.newFile==null)throw Error(`hydratePartialDiff: ${e.type} diff for ${e.name} requires newFile`);return t.newFile}function P_(e,t){if(t.oldFile!==null)throw Error(`hydratePartialDiff: ${e.type} diff for ${e.name} requires oldFile to be null`)}function F_(e,t,n){return e.cacheKey==null?L_(t,n):`${e.cacheKey}:hydrated`}function I_(e,t,n){let r=F_(e,t,n);if(r==null){delete e.cacheKey;return}e.cacheKey=r}function L_(e,t){return e!=null&&t!=null?e.cacheKey!=null&&t.cacheKey!=null?`${e.cacheKey}:${t.cacheKey}`:void 0:e?.cacheKey??t?.cacheKey}var R_=class{isDeletionsScrolling=!1;isAdditionsScrolling=!1;timeoutId=-1;codeDeletions;codeAdditions;enabled=!1;cleanUp(){this.enabled&&=(this.codeDeletions?.removeEventListener(`scroll`,this.handleDeletionsScroll),this.codeAdditions?.removeEventListener(`scroll`,this.handleAdditionsScroll),clearTimeout(this.timeoutId),this.codeDeletions=void 0,this.codeAdditions=void 0,!1)}setup(e,t,n){if(t==null||n==null)for(let r of e.children??[])r instanceof HTMLElement&&(`deletions`in r.dataset?t=r:`additions`in r.dataset&&(n=r));if(n==null||t==null){this.cleanUp();return}this.codeDeletions!==t&&(this.codeDeletions?.removeEventListener(`scroll`,this.handleDeletionsScroll),this.codeDeletions=t,t.addEventListener(`scroll`,this.handleDeletionsScroll,{passive:!0})),this.codeAdditions!==n&&(this.codeAdditions?.removeEventListener(`scroll`,this.handleAdditionsScroll),this.codeAdditions=n,n.addEventListener(`scroll`,this.handleAdditionsScroll,{passive:!0})),this.enabled=!0}handleDeletionsScroll=()=>{this.isAdditionsScrolling||(this.isDeletionsScrolling=!0,clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>{this.isDeletionsScrolling=!1},300),this.codeAdditions?.scrollTo({left:this.codeDeletions?.scrollLeft}))};handleAdditionsScroll=()=>{this.isDeletionsScrolling||(this.isAdditionsScrolling=!0,clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>{this.isAdditionsScrolling=!1},300),this.codeDeletions?.scrollTo({left:this.codeAdditions?.scrollLeft}))}};function z_(e,t){return gr(e.theme,t.theme)&&e.useTokenTransformer===t.useTokenTransformer&&e.tokenizeMaxLineLength===t.tokenizeMaxLineLength&&e.lineDiffType===t.lineDiffType&&e.maxLineDiffLength===t.maxLineDiffLength}function B_(e){return I({tagName:`div`,properties:{"data-content-buffer":``,"data-buffer-size":e,style:`grid-row: span ${e};min-height:calc(${e} * 1lh)`}})}function V_(e){return I({tagName:`div`,children:[I({tagName:`span`,children:[ki(`No newline at end of file`)]})],properties:{"data-no-newline":``,"data-line-type":e,"data-column-content":``}})}function H_(e){return I({tagName:`div`,children:[Ai({name:e===`both`?`diffs-icon-expand-all`:`diffs-icon-expand`,properties:{"data-icon":``}})],properties:{role:`button`,"data-expand-button":``,"data-expand-both":e===`both`?``:void 0,"data-expand-up":e===`up`?``:void 0,"data-expand-down":e===`down`?``:void 0}})}function U_({type:e,content:t,expandIndex:n,chunked:r=!1,slotName:i,isFirstHunk:a,isLastHunk:o}){let s=0,c=[];if(e===`metadata`&&t!=null&&c.push(I({tagName:`div`,children:[ki(t)],properties:{"data-separator-wrapper":``}})),(e===`line-info`||e===`line-info-basic`)&&t!=null){let e=[];n!=null&&(r?(a||(e.push(H_(`up`)),s++),o||(e.push(H_(`down`)),s++)):(e.push(H_(!a&&!o?`both`:a?`down`:`up`)),s++)),e.push(I({tagName:`div`,children:[I({tagName:`span`,children:[ki(t)],properties:{"data-unmodified-lines":``}})],properties:{"data-separator-content":``}})),r&&n!=null&&e.push(I({tagName:`div`,children:[ki(`Expand all`)],properties:{role:`button`,"data-expand-button":``,"data-expand-all-button":``}})),c.push(I({tagName:`div`,children:e,properties:{"data-separator-wrapper":``,"data-separator-multi-button":s>1?``:void 0}}))}return e===`custom`&&i!=null&&c.push(I({tagName:`slot`,properties:{name:i}})),I({tagName:`div`,children:c,properties:{"data-separator":c.length===0?`simple`:e,"data-expand-index":n,"data-separator-first":a?``:void 0,"data-separator-last":o?``:void 0}})}function W_(e,t){return`hunk-separator-${e}-${t}`}function G_(e){let t=e.at(-1);return t==null?0:Math.max(F(t.additionStart,t.additionCount),F(t.deletionStart,t.deletionCount))}function K_(e){return e.startingLine===0&&e.totalLines===1/0&&e.bufferBefore===0&&e.bufferAfter===0}function q_({line:e,spanStart:t,spanLength:n}){return{start:{line:e,character:t},end:{line:e,character:t+n},properties:{"data-diff-span":``},alwaysWrap:!0}}function J_({item:e,arr:t,enableJoin:n,isNeutral:r=!1,isLastItem:i=!1}){let a=t[t.length-1];if(a==null||i||!n){t.push([+!r,e.value]);return}let o=a[0]===0;if(r===o||r&&e.value.length===1&&!o){a[1]+=e.value;return}t.push([+!r,e.value])}function Y_(e){return[Tr(e.additionStart,e.additionCount)+1,F(e.additionStart,e.additionCount)+1]}function X_({isPartial:e,rangeSize:t,expandedHunks:n,hunkIndex:r,collapsedContextThreshold:i}){let a=Math.max(t,0);if(a===0||e)return{fromStart:0,fromEnd:0,rangeSize:a,collapsedLines:a,renderAll:!1};if(n===!0||a<=i)return{fromStart:a,fromEnd:0,rangeSize:a,collapsedLines:0,renderAll:!0};let o=n?.get(r),s=Math.min(Math.max(o?.fromStart??0,0),a),c=Math.min(Math.max(o?.fromEnd??0,0),a),l=s+c,u=l>=a;return{fromStart:u?a:s,fromEnd:u?0:c,rangeSize:a,collapsedLines:Math.max(a-l,0),renderAll:u}}function Z_(e){let t=e.hunks[e.hunks.length-1];if(t==null||e.isPartial||e.additionLines.length===0||e.deletionLines.length===0)return!1;let n=e.additionLines.length-F(t.additionStart,t.additionCount),r=e.deletionLines.length-F(t.deletionStart,t.deletionCount);return n<=0&&r<=0?!1:n!==r}function Q_({fileDiff:e,errorPrefix:t}){let n=e.hunks[e.hunks.length-1];if(n==null||e.isPartial||e.additionLines.length===0||e.deletionLines.length===0)return 0;let r=e.additionLines.length-F(n.additionStart,n.additionCount),i=e.deletionLines.length-F(n.deletionStart,n.deletionCount);if(r<=0&&i<=0)return 0;if(r!==i)throw Error(`${t}: trailing context mismatch (additions=${r}, deletions=${i}) for ${e.name}`);return Math.min(r,i)}function $_({fileDiff:e,hunkIndex:t,expandedHunks:n,collapsedContextThreshold:r,errorPrefix:i}){if(t!==e.hunks.length-1)return;let a=Q_({fileDiff:e,errorPrefix:i});if(a<=0)return;if(n===!0||a<=r)return{fromStart:a,fromEnd:0,rangeSize:a,collapsedLines:0,renderAll:!0};let o=n?.get(e.hunks.length),s=Math.min(Math.max(o?.fromStart??0,0),a);return{fromStart:s,fromEnd:0,rangeSize:a,collapsedLines:a-s,renderAll:s>=a}}function ev({fileDiff:e,lineNumber:t,expandedHunks:n,collapsedContextThreshold:r}){if(n===!0||e.isPartial)return!0;for(let[i,a]of e.hunks.entries()){let[o,s]=Y_(a);if(t<o){let s=X_({isPartial:e.isPartial,rangeSize:a.collapsedBefore,expandedHunks:n,hunkIndex:i,collapsedContextThreshold:r}),c=o-s.rangeSize;return s.renderAll||t<c+s.fromStart||t>=o-s.fromEnd}if(t<s)return!0}let i=$_({fileDiff:e,hunkIndex:e.hunks.length-1,expandedHunks:n,collapsedContextThreshold:r,errorPrefix:`isAdditionLineRenderable`});if(i==null||i.renderAll)return!0;let a=e.hunks[e.hunks.length-1],[,o]=Y_(a);return t<o+i.fromStart||t>=o+i.rangeSize}function tv({fileDiff:e,lineNumber:t,direction:n,expandedHunks:r,collapsedContextThreshold:i}){if(r===!0||e.isPartial)return t;let a=[],o=1;for(let[t,n]of e.hunks.entries()){let[s,c]=Y_(n),l=X_({isPartial:e.isPartial,rangeSize:n.collapsedBefore,expandedHunks:r,hunkIndex:t,collapsedContextThreshold:i}),u=s-l.rangeSize;l.renderAll?a.push([u,s]):(l.fromStart>0&&a.push([u,u+l.fromStart]),l.fromEnd>0&&a.push([s-l.fromEnd,s])),a.push([s,c]),o=c}let s=$_({fileDiff:e,hunkIndex:e.hunks.length-1,expandedHunks:r,collapsedContextThreshold:i,errorPrefix:`getNearestRenderableAdditionLine`});if(s!=null){let e=o;o=e+s.rangeSize,s.renderAll?a.push([e,o]):s.fromStart>0&&a.push([e,e+s.fromStart])}if(t>=o)return t;if(n===`down`){for(let[e,n]of a)if(n>t)return Math.max(e,t);return}for(let e=a.length-1;e>=0;e--){let[n,r]=a[e];if(n<=t)return Math.min(r-1,t)}}function nv({diff:e,diffStyle:t,startingLine:n=0,totalLines:r=1/0,expandedHunks:i,collapsedContextThreshold:a=1,callback:o}){let s=rv({diff:e,diffStyle:t,startingLine:n,expandedHunks:i,collapsedContextThreshold:a}),c={viewportStart:n,viewportEnd:n+r,isWindowedHighlight:n>0||r<1/0,splitCount:s.splitCount,unifiedCount:s.unifiedCount,finalHunkIndex:e.hunks.length-1,shouldBreak(){if(!c.isWindowedHighlight)return!1;let e=c.unifiedCount>=n+r,i=c.splitCount>=n+r;return t===`unified`?e:(t===`split`||e)&&i},shouldSkip(e,r){if(!c.isWindowedHighlight)return!1;let i=e>0&&c.unifiedCount+e<=n,a=r>0&&c.splitCount+r<=n;return t===`unified`?i:(t===`split`||i)&&a},incrementCounts(e,n){(t===`unified`||t===`both`)&&(c.unifiedCount+=e),(t===`split`||t===`both`)&&(c.splitCount+=n)},isInWindow(e,n){if(!c.isWindowedHighlight)return!0;let r=c.isInUnifiedWindow(e),i=c.isInSplitWindow(n);return t===`unified`?r:t===`split`?i:r||i},isInUnifiedWindow(e){return!c.isWindowedHighlight||c.unifiedCount>=n-e&&c.unifiedCount<n+r},isInSplitWindow(e){return!c.isWindowedHighlight||c.splitCount>=n-e&&c.splitCount<n+r},emit(e,n=!1){return n||(t===`unified`?c.incrementCounts(1,0):t===`split`?c.incrementCounts(0,1):c.incrementCounts(1,1)),o(e)??!1}};hunkIterator:for(let n=s.hunkIndex;n<e.hunks.length;n++){let r=e.hunks[n];if(r==null)throw Error(`iterateOverDiff: invalid hunk index`);if(c.shouldBreak())break;let o=Tr(r.deletionStart,r.deletionCount),s=Tr(r.additionStart,r.additionCount),l=!e.isPartial&&r.deletionCount===0?o:r.deletionLineIndex,u=!e.isPartial&&r.additionCount===0?s:r.additionLineIndex,d=X_({isPartial:e.isPartial,rangeSize:r.collapsedBefore,expandedHunks:i,hunkIndex:n,collapsedContextThreshold:a}),f=n===c.finalHunkIndex?$_({fileDiff:e,hunkIndex:n,expandedHunks:i,collapsedContextThreshold:a,errorPrefix:`iterateOverDiff`}):void 0,p=d.fromStart+d.fromEnd;function m(e,n){return f==null||f.collapsedLines<=0||f.fromStart+f.fromEnd>0?0:t===`unified`?e===r.unifiedLineStart+r.unifiedLineCount-1?f.collapsedLines:0:n===r.splitLineStart+r.splitLineCount-1?f.collapsedLines:0}let h=d.collapsedLines===0;function g(){return h?0:(h=!0,d.collapsedLines)}if(c.shouldSkip(p,p))c.incrementCounts(p,p),g();else{let e=r.unifiedLineStart-d.rangeSize,i=r.splitLineStart-d.rangeSize,a=l-d.rangeSize,f=u-d.rangeSize,p=o+1-d.rangeSize,m=s+1-d.rangeSize;if(ov(c,d.fromStart,t,t=>c.emit({hunkIndex:n,hunk:r,collapsedBefore:0,collapsedAfter:0,type:`context-expanded`,deletionLine:{lineNumber:p+t,lineIndex:a+t,noEOFCR:!1,unifiedLineIndex:e+t,splitLineIndex:i+t},additionLine:{unifiedLineIndex:e+t,splitLineIndex:i+t,lineIndex:f+t,lineNumber:m+t,noEOFCR:!1}}))||(e=r.unifiedLineStart-d.fromEnd,i=r.splitLineStart-d.fromEnd,a=l-d.fromEnd,f=u-d.fromEnd,p=o+1-d.fromEnd,m=s+1-d.fromEnd,ov(c,d.fromEnd,t,t=>c.emit({hunkIndex:n,hunk:r,collapsedBefore:g(),collapsedAfter:0,type:`context-expanded`,deletionLine:{lineNumber:p+t,lineIndex:a+t,noEOFCR:!1,unifiedLineIndex:e+t,splitLineIndex:i+t},additionLine:{unifiedLineIndex:e+t,splitLineIndex:i+t,lineIndex:f+t,lineNumber:m+t,noEOFCR:!1}}),()=>{g()})))break hunkIterator}let _=r.unifiedLineStart,v=r.splitLineStart,y=l,b=u,x=o+1,S=s+1,C=r.hunkContent.at(-1);for(let e of r.hunkContent){if(c.shouldBreak())break hunkIterator;let i=e===C;if(e.type===`context`){if(c.shouldSkip(e.lines,e.lines))c.incrementCounts(e.lines,e.lines),g();else if(ov(c,e.lines,t,t=>{let a=i&&t===e.lines-1,o=_+t,s=v+t;return c.emit({hunkIndex:n,hunk:r,collapsedBefore:g(),collapsedAfter:m(o,s),type:`context`,deletionLine:{lineNumber:x+t,lineIndex:y+t,noEOFCR:a&&r.noEOFCRDeletions,unifiedLineIndex:o,splitLineIndex:s},additionLine:{unifiedLineIndex:o,splitLineIndex:s,lineIndex:b+t,lineNumber:S+t,noEOFCR:a&&r.noEOFCRAdditions}})},()=>{g()}))break hunkIterator;_+=e.lines,v+=e.lines,y+=e.lines,b+=e.lines,x+=e.lines,S+=e.lines}else{let a=Math.max(e.deletions,e.additions),o=e.deletions+e.additions;if(!c.shouldSkip(o,a)){let s=sv(c,e,t);(s[0]?.[0]??0)>0&&g();for(let[l,u]of s)for(let s=l;s<u;s++){let l=m(_+s,t===`unified`?v+(s<e.deletions?s:s-e.deletions):v+s);if(c.emit(cv({hunkIndex:n,hunk:r,collapsedBefore:g(),collapsedAfter:l,diffStyle:t,index:s,unifiedLineIndex:_,splitLineIndex:v,additionLineIndex:b,deletionLineIndex:y,additionLineNumber:S,deletionLineNumber:x,content:e,isLastContent:i,unifiedCount:o,splitCount:a}),!0))break hunkIterator}}g(),c.incrementCounts(o,a),_+=o,v+=a,y+=e.deletions,b+=e.additions,x+=e.deletions,S+=e.additions}}if(f!=null){let{collapsedLines:n,fromStart:r,fromEnd:i}=f,a=r+i;if(ov(c,a,t,t=>{let r=t===a-1;return c.emit({hunkIndex:e.hunks.length,hunk:void 0,collapsedBefore:0,collapsedAfter:r?n:0,type:`context-expanded`,deletionLine:{lineNumber:x+t,lineIndex:y+t,noEOFCR:!1,unifiedLineIndex:_+t,splitLineIndex:v+t},additionLine:{unifiedLineIndex:_+t,splitLineIndex:v+t,lineIndex:b+t,lineNumber:S+t,noEOFCR:!1}})},void 0,()=>c.shouldBreak()))break hunkIterator}}}function rv({diff:e,diffStyle:t,startingLine:n,expandedHunks:r,collapsedContextThreshold:i}){if(n<=0||t===`both`)return{hunkIndex:0,splitCount:0,unifiedCount:0};let a=iv({diff:e,expandedHunks:r,collapsedContextThreshold:i}),o=0,s=e.hunks.length-1,c=e.hunks.length;for(;o<=s;){let e=o+s>>1,r=a[e+1];if(r==null)throw Error(`iterateOverDiff: invalid hunk prefix index`);(t===`unified`?r.unifiedCount:r.splitCount)>n?(c=e,s=e-1):o=e+1}if(c>=e.hunks.length){let t=a[e.hunks.length];if(t==null)throw Error(`iterateOverDiff: invalid terminal hunk prefix index`);return{hunkIndex:e.hunks.length,splitCount:t.splitCount,unifiedCount:t.unifiedCount}}let l=a[c];if(l==null)throw Error(`iterateOverDiff: invalid selected hunk prefix index`);return{hunkIndex:c,splitCount:l.splitCount,unifiedCount:l.unifiedCount}}function iv({diff:e,expandedHunks:t,collapsedContextThreshold:n}){let r=0,i=0,a=e.hunks.length-1,o=[{splitCount:0,unifiedCount:0}];for(let s=0;s<e.hunks.length;s++){let c=e.hunks[s];if(c==null)throw Error(`iterateOverDiff: invalid hunk summary index`);let l=X_({isPartial:e.isPartial,rangeSize:c.collapsedBefore,expandedHunks:t,hunkIndex:s,collapsedContextThreshold:n}),u=l.fromStart+l.fromEnd;r+=u+c.splitLineCount,i+=u+c.unifiedLineCount;let d=s===a?$_({fileDiff:e,hunkIndex:s,expandedHunks:t,collapsedContextThreshold:n,errorPrefix:`iterateOverDiff`}):void 0;if(d!=null){let e=d.fromStart+d.fromEnd;r+=e,i+=e}o.push({splitCount:r,unifiedCount:i})}return o}function av(e,t,n){if(!e.isWindowedHighlight||t<=0)return[0,t];let r=[];function i(n){let i=Math.max(0,e.viewportStart-n),a=Math.min(t,e.viewportEnd-n);a>i&&r.push([i,a])}if(n!==`split`&&i(e.unifiedCount),n!==`unified`&&i(e.splitCount),r.length===0)return[0,0];let a=r[0][0],o=r[0][1];for(let e=1;e<r.length;e++){let t=r[e];a=Math.min(a,t[0]),o=Math.max(o,t[1])}return[a,o]}function ov(e,t,n,r,i,a){let[o,s]=av(e,t,n);o>0&&(e.incrementCounts(o,o),i?.());let c=o;for(;c<t;){if(a?.()===!0)return!0;if(c>=s){e.incrementCounts(t-c,t-c);break}if(e.isInWindow(0,0)){if(r(c)===!0)return!0}else e.incrementCounts(1,1);c++}return!1}function sv(e,t,n){if(!e.isWindowedHighlight)return[[0,n===`unified`?t.deletions+t.additions:Math.max(t.deletions,t.additions)]];let r=n!==`split`,i=n!==`unified`,a=n===`unified`?`unified`:`split`,o=[];function s(t,n){if(t+n<=e.viewportStart||t>=e.viewportEnd)return;let r=Math.max(0,e.viewportStart-t),i=Math.min(n,e.viewportEnd-t);return i>r?[r,i]:void 0}function c(e,n){return a===`split`?e:n===`additions`?[e[0]+t.deletions,e[1]+t.deletions]:e}function l(e,t){if(e==null)return;let[n,r]=c(e,t);r>n&&o.push([n,r])}if(r&&(l(s(e.unifiedCount,t.deletions),`deletions`),l(s(e.unifiedCount+t.deletions,t.additions),`additions`)),i&&(l(s(e.splitCount,t.deletions),`deletions`),l(s(e.splitCount,t.additions),`additions`)),o.length===0)return o;o.sort((e,t)=>e[0]-t[0]);let u=[o[0]];for(let[e,t]of o.slice(1)){let n=u[u.length-1];e<=n[1]?n[1]=Math.max(n[1],t):u.push([e,t])}return u}function cv({hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:r,diffStyle:i,index:a,unifiedLineIndex:o,splitLineIndex:s,additionLineIndex:c,deletionLineIndex:l,additionLineNumber:u,deletionLineNumber:d,content:f,isLastContent:p,unifiedCount:m,splitCount:h}){let g=a<f.deletions?o+a:void 0,_=i===`unified`?a>=f.deletions?o+a:void 0:a<f.additions?o+f.deletions+a:void 0,v=i===`unified`?s+(a<f.deletions?a:a-f.deletions):s+a,y=a<f.deletions?l+a:void 0,b=a<f.deletions?d+a:void 0,x=i===`unified`?a>=f.deletions?c+(a-f.deletions):void 0:a<f.additions?c+a:void 0,S=i===`unified`?a>=f.deletions?u+(a-f.deletions):void 0:a<f.additions?u+a:void 0,C=i===`unified`?p&&a===f.deletions-1&&t.noEOFCRDeletions:p&&a===h-1&&t.noEOFCRDeletions,ee=i===`unified`?p&&a===m-1&&t.noEOFCRAdditions:p&&a===h-1&&t.noEOFCRAdditions,te=y!=null&&b!=null&&g!=null?{lineNumber:b,lineIndex:y,noEOFCR:C,unifiedLineIndex:g,splitLineIndex:v}:void 0,ne=x!=null&&S!=null&&_!=null?{unifiedLineIndex:_,splitLineIndex:v,lineIndex:x,lineNumber:S,noEOFCR:ee}:void 0;if(te==null&&ne!=null)return{type:`change`,hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:r,deletionLine:void 0,additionLine:ne};if(te!=null&&ne==null)return{type:`change`,hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:r,deletionLine:te,additionLine:void 0};if(te==null||ne==null)throw Error(`iterateOverDiff: missing change line data`);return{type:`change`,hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:r,deletionLine:te,additionLine:ne}}var lv={forcePlainText:!1};function uv(e,t,n,{forcePlainText:r,startingLine:i,totalLines:a,expandedHunks:o,collapsedContextThreshold:s=1}=lv){r?(i??=0,a??=1/0):(i=0,a=1/0);let c=i>0||a<1/0,l=typeof n.theme==`string`?t.getTheme(n.theme).type:void 0,u=Ig({theme:n.theme,highlighter:t}),d=r&&!c&&(e.unifiedLineCount>1e3||e.splitLineCount>1e3)?`none`:n.lineDiffType,f={deletionLines:[],additionLines:[]},{maxLineDiffLength:p}=n,m=!r&&!e.isPartial,h=r?o:void 0,g=new Map;function _(e){let t=m?0:e,n=g.get(t)??fv();return g.set(t,n),n}function v(e,t,n,r){if(c){let e=n.at(-1);(e==null||e.targetIndex+e.count!==t)&&(e={targetIndex:t,originalOffset:r.length,count:0},n.push(e)),e.count++}r.push(e)}nv({diff:e,diffStyle:`both`,startingLine:i,totalLines:a,expandedHunks:!c||h,collapsedContextThreshold:s,callback:({hunkIndex:t,additionLine:n,deletionLine:r,type:i})=>{let a=_(t),o=n==null?r.splitLineIndex:n.splitLineIndex;i===`change`&&n!=null&&r!=null&&dv({additionLine:e.additionLines[n.lineIndex],deletionLine:e.deletionLines[r.lineIndex],deletionLineIndex:a.deletionContent.length,additionLineIndex:a.additionContent.length,deletionDecorations:a.deletionDecorations,additionDecorations:a.additionDecorations,lineDiffType:d,maxLineDiffLength:p}),r!=null&&(v(e.deletionLines[r.lineIndex],r.lineIndex,a.deletionSegments,a.deletionContent),a.deletionInfo.push({type:i===`change`?`change-deletion`:i,lineNumber:r.lineNumber,altLineNumber:i===`change`?void 0:n.lineNumber??void 0,lineIndex:`${r.unifiedLineIndex},${o}`})),n!=null&&(v(e.additionLines[n.lineIndex],n.lineIndex,a.additionSegments,a.additionContent),a.additionInfo.push({type:i===`change`?`change-addition`:i,lineNumber:n.lineNumber,altLineNumber:i===`change`?void 0:r.lineNumber??void 0,lineIndex:`${n.unifiedLineIndex},${o}`}))}});for(let i of g.values()){if(i.deletionContent.length===0&&i.additionContent.length===0)continue;let a={name:e.prevName??e.name,contents:i.deletionContent.value},o={name:e.name,contents:i.additionContent.value},{deletionLines:s,additionLines:c}=pv({deletionFile:a,deletionInfo:i.deletionInfo,deletionDecorations:i.deletionDecorations,additionFile:o,additionInfo:i.additionInfo,additionDecorations:i.additionDecorations,highlighter:t,options:n,languageOverride:r?`text`:e.lang});if(m){f.deletionLines=s,f.additionLines=c;continue}if(i.deletionSegments.length>0)for(let e of i.deletionSegments)for(let t=0;t<e.count;t++)f.deletionLines[e.targetIndex+t]=s[e.originalOffset+t];else f.deletionLines.push(...s);if(i.additionSegments.length>0)for(let e of i.additionSegments)for(let t=0;t<e.count;t++)f.additionLines[e.targetIndex+t]=c[e.originalOffset+t];else f.additionLines.push(...c)}return{code:f,themeStyles:u,baseThemeType:l}}function dv({deletionLine:e,additionLine:t,deletionLineIndex:n,additionLineIndex:r,deletionDecorations:i,additionDecorations:a,lineDiffType:o,maxLineDiffLength:s}){if(e==null||t==null||o===`none`||(e=vr(e),t=vr(t),e.length>s||t.length>s))return;let c=o===`char`?Zr(e,t):mi(e,t),l=[],u=[],d=o===`word-alt`,f=c.at(-1);for(let e of c){let t=e===f;!e.added&&!e.removed?(J_({item:e,arr:l,enableJoin:d,isNeutral:!0,isLastItem:t}),J_({item:e,arr:u,enableJoin:d,isNeutral:!0,isLastItem:t})):e.removed?J_({item:e,arr:l,enableJoin:d,isLastItem:t}):J_({item:e,arr:u,enableJoin:d,isLastItem:t})}let p=0;for(let e of l)e[0]===1&&i.push(q_({line:n,spanStart:p,spanLength:e[1].length})),p+=e[1].length;p=0;for(let e of u)e[0]===1&&a.push(q_({line:r,spanStart:p,spanLength:e[1].length})),p+=e[1].length}function fv(){return{deletionContent:{push(e){this.value+=e,this.length++},value:``,length:0},additionContent:{push(e){this.value+=e,this.length++},value:``,length:0},deletionInfo:[],additionInfo:[],deletionDecorations:[],additionDecorations:[],deletionSegments:[],additionSegments:[]}}function pv({deletionFile:e,additionFile:t,deletionInfo:n,additionInfo:r,highlighter:i,deletionDecorations:a,additionDecorations:o,languageOverride:s,options:{theme:c=nr,...l}}){let u=s??og(e.name),d=s??og(t.name),{state:f,transformers:p}=bg(l.useTokenTransformer),m=typeof c==`string`?{...l,lang:`text`,theme:c,transformers:p,decorations:void 0,defaultColor:!1,cssVariablePrefix:Cg(`token`),tokenizeTimeLimit:0}:{...l,lang:`text`,themes:c,transformers:p,decorations:void 0,defaultColor:!1,cssVariablePrefix:Cg(`token`),tokenizeTimeLimit:0};return{deletionLines:e.contents===``?[]:(m.lang=u,f.lineInfo=n,m.decorations=a,Rg(i.codeToHast(vr(e.contents),m))),additionLines:t.contents===``?[]:(m.lang=d,m.decorations=o,f.lineInfo=r,Rg(i.codeToHast(vr(t.contents),m)))}}function mv(e,t){let n=Ei({name:e.prevName??e.name,contents:e.deletionLines.join(``)},{name:e.name,contents:e.additionLines.join(``),lang:e.lang},t);return{hunks:n.hunks,splitLineCount:n.splitLineCount,unifiedLineCount:n.unifiedLineCount,additionLines:n.additionLines,deletionLines:n.deletionLines,type:n.type}}function hv(e,t){let n=Math.max(e,1),r=Array.from({length:n},(e,t)=>`${` `.repeat(t+1)}\n`).join(``);return r===t&&(r=Array.from({length:n},(e,t)=>`\u0000${` `.repeat(t)}\n`).join(``)),r}function gv(e){for(let t of e)if(t.trim().length>0)return!1;return!0}function _v(e,t){return t.length>0&&t.length<e.deletionLines.length&&gv(t)}function vv(e,t,n){let r=e.deletionLines.join(``),i=hv(t.length,r),a=Ei({name:e.prevName??e.name,contents:r},{name:e.name,contents:i,lang:e.lang},n);return{hunks:a.hunks,splitLineCount:a.splitLineCount,unifiedLineCount:a.unifiedLineCount,additionLines:t,deletionLines:a.deletionLines,type:a.type}}function yv(e,t){return vv(e,[``],t)}function bv(e,t){if(e.additionLines.length===0)return yv(e,t);if(_v(e,e.additionLines))return vv(e,e.additionLines,t);let n=e.additionLines,r=mv(e,t);return Sv(r,n),r}function xv(e){return e.length>1&&e.at(-1)===``}function Sv(e,t){if(!xv(t))return;let n=t.length-e.additionLines.length;if(n<=0)return;let r=e.additionLines.length,i=e.hunks.at(-1);if(i!=null&&F(i.additionStart,i.additionCount)===r){for(let a of i.hunkContent)if(a.type===`change`&&a.additions<a.deletions&&a.additionLineIndex+a.additions===r){e.additionLines=t,a.additions+=n,i.additionCount+=n,i.additionLines+=n,Mv(e);return}}}function Cv(e,t,n){if(e.isPartial||e.deletionLines.length!==e.additionLines.length)return wv(e,mv(e,n));let r=Array.from(t);if(r.length===0)return wv(e,{hunks:e.hunks,splitLineCount:e.splitLineCount,unifiedLineCount:e.unifiedLineCount,type:e.type});for(let t of r){let r=e.additionLines[t],i=e.deletionLines[t];if(r==null||i==null||vr(r)===vr(i))return wv(e,mv(e,n))}let i=Tv(e,r);if(i.size===0)return wv(e,mv(e,n));for(let t of i)if(!Dv(e,t,n))return wv(e,mv(e,n));return Mv(e),Z_(e)?wv(e,mv(e,n)):wv(e,{hunks:e.hunks,splitLineCount:e.splitLineCount,unifiedLineCount:e.unifiedLineCount,type:e.type})}function wv(e,t){return Object.assign(e,t),t}function Tv(e,t){let n=new Set;for(let r of t){let t=Ev(e,r);if(t==null)return new Set;n.add(t)}return n}function Ev(e,t){for(let[n,r]of e.hunks.entries()){let e=r.additionLineIndex+r.additionCount;if(t>=r.additionLineIndex&&t<e)return n}}function Dv(e,t,n){let r=e.hunks[t];if(r==null)return!1;let i=e.deletionLines.slice(r.deletionLineIndex,r.deletionLineIndex+r.deletionCount),a=e.additionLines.slice(r.additionLineIndex,r.additionLineIndex+r.additionCount),o=Ei({name:e.prevName??e.name,contents:i.join(``)},{name:e.name,contents:a.join(``),lang:e.lang},{...n,context:0}),s=o.hunks[0];return s==null||o.hunks.length!==1?!1:(kv(r,s),Ov(e,t),!0)}function Ov(e,t){let n=e.hunks[t];if(n==null)return;if(t!==e.hunks.length-1){n.noEOFCRAdditions=!1,n.noEOFCRDeletions=!1;return}let r=e.additionLines.at(-1),i=e.deletionLines.at(-1);n.noEOFCRAdditions=r!=null&&r!==``&&!r.endsWith(`
1526
- `),n.noEOFCRDeletions=i!=null&&i!==``&&!i.endsWith(`
1527
- `)}function kv(e,t){let n=e.additionLineIndex,r=e.deletionLineIndex;e.hunkContent=t.hunkContent.map(e=>Av(e,n,r)),e.additionLineIndex=n+t.additionLineIndex,e.additionStart+=t.additionLineIndex,e.additionCount=t.additionCount,e.additionLines=t.additionLines,t.deletionLineIndex>=0&&(e.deletionLineIndex=r+t.deletionLineIndex,e.deletionStart+=t.deletionLineIndex),e.deletionCount=t.deletionCount,e.deletionLines=t.deletionLines,e.noEOFCRAdditions=t.noEOFCRAdditions,e.noEOFCRDeletions=t.noEOFCRDeletions,jv(e)}function Av(e,t,n){return{...e,additionLineIndex:e.additionLineIndex+t,deletionLineIndex:e.deletionLineIndex+n}}function jv(e){let t=0,n=0;for(let r of e.hunkContent)r.type===`context`?(t+=r.lines,n+=r.lines):(t+=Math.max(r.additions,r.deletions),n+=r.additions+r.deletions);e.splitLineCount=t,e.unifiedLineCount=n}function Mv(e){let t=0,n=0,r=0;for(let i of e.hunks)i.collapsedBefore=Math.max(Tr(i.additionStart,i.additionCount)-r,0),i.splitLineStart=t+i.collapsedBefore,i.unifiedLineStart=n+i.collapsedBefore,jv(i),t+=i.collapsedBefore+i.splitLineCount,n+=i.collapsedBefore+i.unifiedLineCount,r=F(i.additionStart,i.additionCount);if(e.hunks.length>0){let r=e.hunks[e.hunks.length-1],i=Math.max(e.additionLines.length-F(r.additionStart,r.additionCount),0);t+=i,n+=i}e.splitLineCount=t,e.unifiedLineCount=n}var Nv=new WeakMap;function Pv(e){return e.length>1&&e[e.length-1]===``?e.slice(0,-1):e}function Fv(e,t){let n=Math.min(e.length,t.length),r=0;for(;r<n&&e[r]===t[r];)r++;let i=e.length,a=t.length;for(;i>r&&a>r&&e[i-1]===t[a-1];)i--,a--;if(r!==i||r!==a)return{start:r,deletionEnd:i,additionEnd:a}}function Iv(e,t){let n=e.hunks,r=e.additionLines,i=Pv(r),a=i===r?e:{...e,additionLines:i},o=Kv(n,Gv(a,t),e.deletionLines.length),s=Yv(a,o);if(e.additionLines=i,e.hunks=s,e.editSessionDirty=!0,ay(e),Sv(e,r),Qv(n,e.hunks))return{regions:o.map(e=>e.previousSpan)}}function Lv(e,t,n,r){let i=Array.from(new Set(t)).filter(t=>t>=0&&t<e.additionLines.length).sort((e,t)=>e-t);if(i.length===0)return;let{hunks:a}=e,o,s=0;for(let t of i){for(;s<a.length;){let e=a[s];if(t<ty(e)+e.additionCount)break;s++}let r=a[s],i=r==null?void 0:ty(r);if(i==null||t<i||o!=null&&o!==s)return Iv(e,n);o=s}if(o!=null){if(Rv(e,i,o,r,n)){e.editSessionDirty=!0;return}return Iv(e,n)}}function Rv(e,t,n,r,i){if(r==null||i?.ignoreWhitespace===!0||i?.stripTrailingCr===!0)return!1;let a=zv(e),o=e.hunks[n];if(o.hunkContent.some(Bv))return!1;for(let n of t){let t=r.get(n),i=e.additionLines[n];if(t==null||i==null||a.has(t)||a.has(i))return!1;let s=!1;for(let e of o.hunkContent)if(e.type===`change`&&e.additions===e.deletions&&n>=e.additionLineIndex&&n<e.additionLineIndex+e.additions){s=!0;break}if(!s)return!1}return!0}function zv(e){let t=Nv.get(e);if(t?.lines===e.deletionLines)return t.set;let n=new Set(e.deletionLines);return Nv.set(e,{lines:e.deletionLines,set:n}),n}function Bv(e){return e?.type===`change`&&(e.additions===0||e.deletions===0)}function Vv(e,t){let n=new Map,{regions:r}=t;for(let t=0;t<=r.length;t++){let i=r[t-1],a=r[t],o=t===0?e.get(0):i==null?void 0:e.get(i.lastIndex+1),s=a==null?void 0:e.get(a.firstIndex),c=o?.fromStart??0,l=s?.fromEnd??0;(c>0||l>0)&&n.set(t,{fromStart:c,fromEnd:l})}return n}function Hv(e,t,n){let r=[];if(e.isPartial)return r;for(let[i,a]of e.hunks.entries()){let o=X_({isPartial:e.isPartial,rangeSize:a.collapsedBefore,expandedHunks:t,hunkIndex:i,collapsedContextThreshold:n});if(o.rangeSize<=n)continue;let s=ny(a),c=s-o.rangeSize;o.fromStart>0&&r.push([c,c+o.fromStart]),o.fromEnd>0&&r.push([s-o.fromEnd,s])}let i=$_({fileDiff:e,hunkIndex:e.hunks.length-1,expandedHunks:t,collapsedContextThreshold:n,errorPrefix:`captureExpansionAnchors`});if(i!=null&&i.fromStart>0&&i.rangeSize>n){let t=e.hunks[e.hunks.length-1],n=ny(t)+t.deletionCount;r.push([n,n+i.fromStart])}return r}function Uv(e,t){let n=new Map;if(t.length===0)return n;let r=(e,r,i)=>{if(i<=r)return;let a=0,o=0;for(let[e,n]of t)n<=r||e>=i||(e<=r&&(a=Math.max(a,Math.min(n,i)-r)),n>=i&&(o=Math.max(o,i-Math.max(e,r))));(a>0||o>0)&&n.set(e,{fromStart:a,fromEnd:o})};for(let[t,n]of e.hunks.entries()){let e=ny(n);r(t,e-Math.max(n.collapsedBefore,0),e)}let i=e.hunks[e.hunks.length-1];return i!=null&&!e.isPartial&&e.deletionLines.length>0&&r(e.hunks.length,ny(i)+i.deletionCount,e.deletionLines.length),n}function Wv(e,t){return e.editSessionDirty===!0&&(e.editSessionDirty=void 0,Object.assign(e,e.additionLines.length<=1&&e.additionLines.join(``)===``?mv(e,t):bv(e,t)),!0)}function Gv(e,t){if(Fv(e.deletionLines,e.additionLines)==null)return[];let n=Ei({name:e.prevName??e.name,contents:e.deletionLines.join(``)},{name:e.name,contents:e.additionLines.join(``),lang:e.lang},t),r=[],i=0,a=0;for(let e of n.hunks){let t=e.additionCount>0?e.additionLineIndex-i:e.deletionLineIndex-a;i+=t,a+=t;for(let t of e.hunkContent){if(t.type===`context`){i+=t.lines,a+=t.lines;continue}let e=Av(t,0,0);e.additions===0&&(e.additionLineIndex=i),e.deletions===0&&(e.deletionLineIndex=a),r.push(e),i+=e.additions,a+=e.deletions}}return r}function Kv(e,t,n){let r=e.map((e,t)=>{let n=ny(e);return{deletionStart:n,deletionEnd:n+e.deletionCount,blocks:[],previousSpan:{firstIndex:t,lastIndex:t}}}),i=[],a=0;for(let e of t){let t=e.deletionLineIndex,o=t+e.deletions;for(;a<r.length&&r[a].deletionEnd<t;)i.push(r[a]),a++;let s=i.length>0&&qv(t,o,i[i.length-1])?i.pop():void 0;for(;a<r.length&&r[a].deletionStart<=o;)s=Jv(s,r[a]),a++;if(s==null){let c=t,l=o;if((e.deletions===0||e.additions===0)&&n>e.deletions){let e=i[i.length-1]?.deletionEnd??0,s=r[a]?.deletionStart??n;t>e?c--:o<s&&l++}s={deletionStart:c,deletionEnd:l,blocks:[],previousSpan:void 0}}s.deletionStart=Math.min(s.deletionStart,t),s.deletionEnd=Math.max(s.deletionEnd,o),s.blocks.push(e),i.push(s)}for(;a<r.length;)i.push(r[a]),a++;return i}function qv(e,t,n){return e<=n.deletionEnd&&t>=n.deletionStart}function Jv(e,t){return e==null?t:(e.deletionStart=Math.min(e.deletionStart,t.deletionStart),e.deletionEnd=Math.max(e.deletionEnd,t.deletionEnd),e.blocks.push(...t.blocks),t.previousSpan!=null&&(e.previousSpan??={...t.previousSpan},e.previousSpan.firstIndex=Math.min(e.previousSpan.firstIndex,t.previousSpan.firstIndex),e.previousSpan.lastIndex=Math.max(e.previousSpan.lastIndex,t.previousSpan.lastIndex)),e)}function Yv(e,t){let n=[],r=0,i=0;for(let a of t){let t=a.deletionStart-r;if(t<0)throw Error(`buildRegionHunks: overlapping old-side regions`);r+=t,i+=t;let o=i,s=[];for(let e of a.blocks){let t=e.deletionLineIndex-r,n=e.additionLineIndex-i;if(t<0||t!==n)throw Error(`buildRegionHunks: canonical block context mismatch`);Zv(s,t,i,r),r+=t,i+=n,s.push({...e}),r+=e.deletions,i+=e.additions}let c=a.deletionEnd-r;if(c<0)throw Error(`buildRegionHunks: block exceeds its old-side region`);Zv(s,c,i,r),r+=c,i+=c,n.push(Xv(e,{additionStart:o,additionEnd:i,deletionStart:a.deletionStart,deletionEnd:a.deletionEnd},s))}if(e.deletionLines.length-r!==e.additionLines.length-i)throw Error(`buildRegionHunks: trailing context mismatch`);return n}function Xv(e,t,n){let r=t.additionEnd-t.additionStart,i=t.deletionEnd-t.deletionStart,a=0,o=0;for(let e of n)e.type===`change`&&(a+=e.additions,o+=e.deletions);let s={collapsedBefore:0,additionStart:ry(t.additionStart,r),additionCount:r,additionLines:a,additionLineIndex:iy(t.additionStart,r),deletionStart:ry(t.deletionStart,i),deletionCount:i,deletionLines:o,deletionLineIndex:iy(t.deletionStart,i),hunkContent:n,hunkSpecs:`@@ -${ry(t.deletionStart,i)},${i} +${ry(t.additionStart,r)},${r} @@`,splitLineStart:0,splitLineCount:0,unifiedLineStart:0,unifiedLineCount:0,noEOFCRAdditions:!1,noEOFCRDeletions:!1};return jv(s),s}function Zv(e,t,n,r){t>0&&e.push({type:`context`,lines:t,additionLineIndex:n,deletionLineIndex:r})}function Qv(e,t){if(e.length!==t.length)return!0;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(ny(r)!==ny(i)||r.deletionCount!==i.deletionCount||ty(r)!==ty(i)||r.additionCount!==i.additionCount||r.splitLineCount!==i.splitLineCount||!$v(r,i))return!0}return!1}function $v(e,t){let n=ey(e),r=ey(t);for(;;){let e=n.next(),t=r.next();if(e.done===!0||t.done===!0)return e.done===t.done;if(e.value[0]!==t.value[0]||e.value[1]!==t.value[1])return!1}}function*ey(e){for(let t of e.hunkContent){if(t.type===`context`){for(let e=0;e<t.lines;e++)yield[t.deletionLineIndex+e,t.additionLineIndex+e];continue}let e=Math.max(t.deletions,t.additions);for(let n=0;n<e;n++)yield[n<t.deletions?t.deletionLineIndex+n:void 0,n<t.additions?t.additionLineIndex+n:void 0]}}function ty(e){return Tr(e.additionStart,e.additionCount)}function ny(e){return Tr(e.deletionStart,e.deletionCount)}function ry(e,t){return t===0?e:e+1}function iy(e,t){return t===0?e-1:e}function ay(e){Mv(e);for(let t=0;t<e.hunks.length;t++)Ov(e,t)}function oy(e){let t=e.lang??og(e.name),n=e.lang??(e.prevName==null?`text`:og(e.prevName));return t===`text`&&n===`text`}var sy=-1,cy=class{options;onRenderUpdate;workerManager;__id=`diff-hunks-renderer:${++sy}`;highlighter;diff;expandedHunks=new Map;deletionAnnotations={};additionAnnotations={};computedLang=`text`;renderCache;editSessionActive=!1;constructor(e={theme:nr},t,n){this.options=e,this.onRenderUpdate=t,this.workerManager=n,n?.isWorkingPool()!==!0&&(this.highlighter=Kh(e.theme??nr)?Uh():void 0)}cleanUp(){this.recycle(),this.expandedHunks.clear(),this.workerManager=void 0,this.onRenderUpdate=void 0}recycle(){this.highlighter=void 0,this.diff=void 0,this.clearRenderCache(),this.additionAnnotations={},this.deletionAnnotations={},this.workerManager?.cleanUpTasks(this),this.endEditSession()}beginEditSession(){this.editSessionActive=!0;let e=this.diffCache;e!=null&&!e.isPartial&&e.additionLines.length===0&&(Object.assign(e,yv(e,this.options.parseDiffOptions)),this.markEditSessionPass(e),this.clearRenderCache())}endEditSession(){this.editSessionActive=!1}editorRenderReady(){return this.renderCache?.options.useTokenTransformer===!0&&this.renderCache.highlighted&&this.renderCache.result!=null}refreshHighlightedResult(){let{renderCache:e}=this;if(e==null||oy(e.diff)||Cy(e.diff,this.getTokenizeMaxLength()))return Promise.resolve();let{diff:t}=e,{workerManager:n}=this;return!this.editSessionActive&&n?.isWorkingPool()===!0&&t.cacheKey!=null?(n.evictDiffFromCache(t.cacheKey),n.primeDiffHighlightCache(t).then(()=>{this.applyRefreshedResult(t,n.getDiffResultCache(t))}).catch(e=>this.onHighlightError(e))):this.asyncHighlight(t).then(e=>this.applyRefreshedResult(t,e)).catch(e=>this.onHighlightError(e))}applyRefreshedResult(e,t){if(t==null||this.renderCache==null||this.renderCache.diff!==e||this.editSessionActive)return;let{options:n}=this.getRenderOptions(e);z_(n,t.options)&&(this.renderCache={diff:e,options:t.options,highlighted:!0,result:t.result,renderRange:void 0},this.onRenderUpdate?.())}get diffCache(){return this.renderCache?.diff??this.diff}clearRenderCache(){let e=this.renderCache;this.renderCache=void 0,e!=null&&e.isDirty===!0&&e.diff.cacheKey!=null&&this.workerManager?.evictDiffFromCache(e.diff.cacheKey)}setOptions(e){this.options=e}mergeOptions(e){this.options={...this.options,...e}}expandHunk(e,t,n=this.getOptionsWithDefaults().expansionLineCount){let r={...this.expandedHunks.get(e)??{fromStart:0,fromEnd:0}};(t===`up`||t===`both`)&&(r.fromStart+=n),(t===`down`||t===`both`)&&(r.fromEnd+=n),this.renderCache?.highlighted!==!0&&this.clearRenderCache(),this.expandedHunks.set(e,r)}getExpandedHunk(e){return this.expandedHunks.get(e)??cr}getExpandedHunksMap(){return this.expandedHunks}setExpandedHunksMap(e){this.expandedHunks=e}setLineAnnotations(e){this.additionAnnotations={},this.deletionAnnotations={};for(let t of e){let e=(()=>{switch(t.side){case`deletions`:return this.deletionAnnotations;case`additions`:return this.additionAnnotations}})(),n=e[t.lineNumber]??[];e[t.lineNumber]=n,n.push(t)}}updateRenderCache(e,t,n=!1){if(this.renderCache==null)return!1;let{result:r,diff:i}=this.renderCache;if(r==null)return!1;if(i.isPartial)throw Error(`Could not update render cache for partial diff`);let a=r.code.additionLines,o=[],s=new Map;for(let[t,n]of e){let e=a[t]?.properties??{},r=n.map(e=>e[2]).join(``),c=t<i.additionLines.length,l=c?i.additionLines[t]??``:``,u=vr(l);c&&(i.additionLines[t]=Xg(l,r),u!==r&&(o.push(t),s.set(t,l))),a[t]={type:`element`,tagName:`div`,properties:{"data-line":e[`data-line`]??t+1,"data-line-index":e[`data-line-index`]??t,"data-line-type":e[`data-line-type`]??`context`},children:n.map(([e,t,n])=>e===0&&t===``?n===``?{type:`element`,tagName:`br`,properties:{},children:[]}:{type:`text`,value:n}:{type:`element`,tagName:`span`,properties:{"data-char":e,style:`color:${t};`},children:[{type:`text`,value:n}]})}}let c=!1;if(o.length>0){if(this.editSessionActive&&!i.isPartial){if(!n){if(i.additionLines.length<=1&&i.additionLines.join(``)===``)Object.assign(i,yv(i,this.options.parseDiffOptions)),this.markEditSessionPass(i),c=!0;else if(_v(i,i.additionLines))Object.assign(i,vv(i,i.additionLines,this.options.parseDiffOptions)),this.markEditSessionPass(i),c=!0;else{let e=Lv(i,o,this.options.parseDiffOptions,s);this.applyExpansionRemap(e),c=e!=null}}}else Object.assign(i,Cv(i,o,this.options.parseDiffOptions))}return r.baseThemeType=t,this.renderCache.isDirty=!0,c}applyExpansionRemap(e){e!=null&&(this.expandedHunks=Vv(this.expandedHunks,e))}applyDocumentChange(e){if(this.renderCache==null)return;let{diff:t,result:n}=this.renderCache;if(n==null)return;if(t.isPartial)throw Error(`Could not apply document change for partial diff`);let{additionLines:r}=t;t.additionLines=by(e,r),n.code.additionLines=vy(r,t.additionLines,n.code.additionLines,e),t.additionLines.length<=1&&t.additionLines.join(``)===``?(Object.assign(t,yv(t,this.options.parseDiffOptions)),n.code.additionLines[0]=yy(0,e.getLineText(0)),this.markEditSessionPass(t)):this.editSessionActive?this.applySessionDocumentChange(t):Object.assign(t,bv(t,this.options.parseDiffOptions)),this.renderCache.isDirty=!0}applySessionDocumentChange(e){let{parseDiffOptions:t}=this.options,n=e.additionLines;if(_v(e,n)){Object.assign(e,vv(e,n,t)),this.markEditSessionPass(e);return}this.applyExpansionRemap(Iv(e,t))}markEditSessionPass(e){this.editSessionActive&&(e.editSessionDirty=!0)}getUnifiedLineDecoration({lineType:e}){return{gutterLineType:e,contentProperties:{"data-line-type":e}}}getSplitLineDecoration({side:e,type:t}){let n=t===`change`?e===`deletions`?`change-deletion`:`change-addition`:t;return{gutterLineType:n,contentProperties:{"data-line-type":n}}}createAnnotationElement=e=>Xh(e);getOptionsWithDefaults(){let{diffIndicators:e=`bars`,diffStyle:t=`split`,disableBackground:n=!1,disableFileHeader:r=!1,disableLineNumbers:i=!1,disableVirtualizationBuffers:a=!1,collapsed:o=!1,expandUnchanged:s=!1,collapsedContextThreshold:c=1,expansionLineCount:l=100,hunkSeparators:u=`line-info`,lineDiffType:d=`word-alt`,maxLineDiffLength:f=1e3,overflow:p=`scroll`,stickyHeader:m=!1,theme:h=nr,headerRenderMode:g=`default`,tokenizeMaxLineLength:_=1e3,tokenizeMaxLength:v=sr,useTokenTransformer:y=!1,useCSSClasses:b=!1}=this.options;return{diffIndicators:e,diffStyle:t,disableBackground:n,disableFileHeader:r,disableLineNumbers:i,disableVirtualizationBuffers:a,collapsed:o,expandUnchanged:s,collapsedContextThreshold:c,expansionLineCount:l,hunkSeparators:u,lineDiffType:d,maxLineDiffLength:f,overflow:p,stickyHeader:m,theme:this.workerManager?.getDiffRenderOptions().theme??h,headerRenderMode:g,tokenizeMaxLineLength:_,tokenizeMaxLength:v,useTokenTransformer:y,useCSSClasses:b}}async initializeHighlighter(){return this.highlighter=await Hh(lg(this.computedLang,{theme:this.getLocalHighlightTheme(),preferredHighlighter:this.workerManager?.getPreferredHighlighter()??this.options.preferredHighlighter})),this.highlighter}hydrate(e){if(e==null)return;this.diff=e;let{options:t}=this.getRenderOptions(e),n=Cy(e,this.getTokenizeMaxLength()),r=this.workerManager?.getDiffResultCache(e);r!=null&&!z_(t,r.options)&&(r=void 0),this.renderCache??={diff:e,highlighted:!n&&!oy(e),options:t,result:n?void 0:r?.result,renderRange:void 0},!this.editSessionActive&&this.workerManager?.isWorkingPool()===!0?this.renderCache.result==null&&!n&&this.workerManager.highlightDiffAST(this,this.diff):this.highlighter??(this.computedLang=e.lang??og(e.name),this.initializeHighlighter())}getLocalHighlightTheme(){return this.workerManager?.getDiffRenderOptions().theme??this.options.theme??nr}getEffectiveCodeOptions(){let e=this.workerManager?.isWorkingPool()===!0?this.workerManager.getDiffRenderOptions():void 0;return{theme:this.getLocalHighlightTheme(),tokenizeMaxLineLength:e?.tokenizeMaxLineLength??this.options.tokenizeMaxLineLength}}getRenderOptions(e){let t=(()=>{if(this.workerManager?.isWorkingPool()===!0){let e=this.workerManager.getDiffRenderOptions();return this.editSessionActive&&e.useTokenTransformer!==!0?{...e,useTokenTransformer:!0}:e}let{theme:e,tokenizeMaxLineLength:t,lineDiffType:n,maxLineDiffLength:r}=this.getOptionsWithDefaults();return{theme:e,useTokenTransformer:this.editSessionActive||this.options.useTokenTransformer===!0,tokenizeMaxLineLength:t,lineDiffType:n,maxLineDiffLength:r}})();this.getOptionsWithDefaults();let{renderCache:n}=this;return n?.result==null||!E_(e,n.diff)||!z_(t,n.options)?{options:t,forceHighlight:!0}:{options:t,forceHighlight:!1}}renderDiff(e=this.renderCache?.diff,t=lr){if(e==null)return;let{expandUnchanged:n,collapsedContextThreshold:r}=this.getOptionsWithDefaults(),{options:i,forceHighlight:a}=this.getRenderOptions(e),o=this.getMatchingWorkerResultCache(e,i);o!=null&&!this.hasHighlightedRenderCache(e,i)&&(this.renderCache={diff:e,highlighted:!0,renderRange:void 0,...o},a=!1),this.renderCache??={diff:e,highlighted:!1,options:i,result:void 0,renderRange:void 0};let s=e.additionLines.length>0||e.deletionLines.length>0,c=!s||oy(e)||Cy(e,this.getTokenizeMaxLength()),l=!E_(e,this.renderCache.diff),u=!Yh(this.renderCache.renderRange,t);if(!this.editSessionActive&&this.workerManager?.isWorkingPool()===!0){let o=this.renderCache.result==null&&this.renderCache.highlighted&&!c&&!l&&K_(t);o&&(this.renderCache.highlightPending=!0),!o&&(c||this.renderCache.result==null||!this.renderCache.highlighted&&(l||u))&&(this.renderCache.diff=e,this.renderCache.options=i,this.renderCache.highlighted=!1,(this.renderCache.result==null||l||u||a)&&(this.renderCache.result=this.workerManager.getPlainDiffAST(e,t.startingLine,t.totalLines,K_(t)||n?!0:this.expandedHunks,r)),this.renderCache.renderRange=t),!c&&s&&(!this.renderCache.highlighted||a)&&this.workerManager.highlightDiffAST(this,e)}else{this.computedLang=e.lang??og(e.name);let t=this.highlighter!=null&&Kh(i.theme),n=this.highlighter!=null&&_s(this.computedLang),r=!c&&n;if(this.highlighter!=null&&t&&(a||c||!this.renderCache.highlighted&&r||this.renderCache.result==null)){let{result:t,options:i}=this.renderDiffWithHighlighter(e,this.highlighter,c||!n);this.renderCache={diff:e,options:i,highlighted:r,result:t,renderRange:void 0}}(!t||!c&&!n)&&this.asyncHighlight(e).then(({result:t,options:n})=>{this.renderCache!=null&&(this.renderCache.highlighted=!1),this.applyHighlightResult(e,t,n,!c)})}return this.renderCache.result==null?void 0:this.processDiffResult(this.renderCache.diff,t,this.renderCache.result)}async asyncRender(e,t=lr){let{result:n}=await this.asyncHighlight(e);return this.processDiffResult(e,t,n)}createPreElement(e,t,n){let{diffIndicators:r,disableBackground:i,disableLineNumbers:a,overflow:o}=this.getOptionsWithDefaults();return tg({type:`diff`,diffIndicators:r,disableBackground:i,disableLineNumbers:a,overflow:o,split:e,totalLines:t,customProperties:n})}async asyncHighlight(e){let t=Cy(e,this.getTokenizeMaxLength());this.computedLang=t?`text`:e.lang??og(e.name);let n=this.highlighter!=null&&Kh(this.getLocalHighlightTheme()),r=t||this.highlighter!=null&&_s(this.computedLang);return(this.highlighter==null||!n||!r)&&(this.highlighter=await this.initializeHighlighter()),this.renderDiffWithHighlighter(e,this.highlighter,t)}renderDiffWithHighlighter(e,t,n=!1){let{options:r}=this.getRenderOptions(e),{collapsedContextThreshold:i}=this.getOptionsWithDefaults(),a=uv(e,t,r,{forcePlainText:n,expandedHunks:n?!0:void 0,collapsedContextThreshold:i});if(this.editSessionActive&&e.additionLines.length===1&&e.additionLines[0]===``&&a.code.additionLines[0]==null){let t;if(nv({diff:e,diffStyle:`both`,expandedHunks:n?!0:void 0,collapsedContextThreshold:i,callback:({additionLine:e})=>{if(e?.lineIndex===0)return t=e,!0}}),t==null)throw Error(`DiffHunksRenderer: missing empty addition line`);a.code.additionLines[0]=yy(0,``,t.unifiedLineIndex,t.splitLineIndex)}return{result:a,options:r}}onHighlightSuccess(e,t,n,r=!0){this.editSessionActive||this.applyHighlightResult(e,t,n,r)}applyHighlightResult(e,t,n,r=!0){if(this.renderCache==null)return;let i=this.renderCache.highlightPending===!0||!this.renderCache.highlighted||!z_(this.renderCache.options,n)||!E_(this.renderCache.diff,e);this.renderCache={diff:e,options:n,highlighted:r,result:t,renderRange:void 0},i&&this.onRenderUpdate?.()}getMatchingWorkerResultCache(e,t){if(this.editSessionActive)return;let n=this.workerManager?.getDiffResultCache(e);if(!(n==null||!z_(t,n.options)))return n}hasHighlightedRenderCache(e,t){let{renderCache:n}=this;return n?.result!=null&&n.highlighted&&E_(e,n.diff)&&z_(t,n.options)}onHighlightError(e){console.error(e)}getTokenizeMaxLength(){return this.options.tokenizeMaxLength??1e5}processDiffResult(e,t,{code:n,themeStyles:r,baseThemeType:i}){let{diffStyle:a,disableFileHeader:o,expandUnchanged:s,expansionLineCount:c,collapsedContextThreshold:l,hunkSeparators:u}=this.getOptionsWithDefaults(),d=this.renderCache?.isDirty??!1;this.diff=e;let f=a===`unified`,p=wy(e,this.options.loadDiffFiles!=null),m=!e.isPartial||p,h=[],g=[],_=[],v=[],{additionLines:y,deletionLines:b}=n,x={rowCount:0,hunkSeparators:u,additionsContentAST:h,deletionsContentAST:g,unifiedContentAST:_,unifiedGutterAST:Mi(),deletionsGutterAST:Mi(),additionsGutterAST:Mi(),expansionLineCount:c,hunkData:v,incrementRowCount(e=1){x.rowCount+=e},pushToGutter(e,t){switch(e){case`unified`:x.unifiedGutterAST.children.push(t);break;case`deletions`:x.deletionsGutterAST.children.push(t);break;case`additions`:x.additionsGutterAST.children.push(t)}}},S=Q_({fileDiff:e,errorPrefix:`DiffHunksRenderer.processDiffResult`}),C={size:0,side:void 0,increment(){this.size+=1},flush(){if(a!==`unified`){if(this.size<=0||this.side==null){this.side=void 0,this.size=0;return}this.side===`additions`?(x.pushToGutter(`additions`,Pi(void 0,`buffer`,this.size)),h?.push(B_(this.size))):(x.pushToGutter(`deletions`,Pi(void 0,`buffer`,this.size)),g?.push(B_(this.size))),this.size=0,this.side=void 0}}},ee=(e,t,n,r,i)=>{x.pushToGutter(e,Ni(t,n,r,i))};function te(e){C.flush(),a===`unified`?hy(`unified`,e,x):(hy(`deletions`,e,x),hy(`additions`,e,x))}this.pushFileLevelAnnotations(e,a,t,x),nv({diff:e,diffStyle:a,startingLine:t.startingLine,totalLines:t.totalLines,expandedHunks:s?!0:this.expandedHunks,collapsedContextThreshold:l,callback:({hunkIndex:t,hunk:n,collapsedBefore:r,collapsedAfter:i,additionLine:o,deletionLine:s,type:c})=>{let l=s==null?o.splitLineIndex:s.splitLineIndex,f=o==null?s.unifiedLineIndex:o.unifiedLineIndex;a===`split`&&c!==`change`&&C.flush(),r>0&&te({hunkIndex:t,collapsedLines:r,rangeSize:Math.max(n?.collapsedBefore??0,0),hunkSpecs:n?.hunkSpecs,isFirstHunk:t===0,isLastHunk:!1,isExpandable:m});let h=a===`unified`?f:l,g={type:c,hunkIndex:t,lineIndex:h,unifiedLineIndex:f,splitLineIndex:l,deletionLine:s,additionLine:o};if(a===`unified`){let n=this.getUnifiedInjectedRowsForLine?.(g);n?.before!=null&&fy(n.before,x);let r=s==null?void 0:b[s.lineIndex],i=o==null?void 0:y[o.lineIndex];if(r==null&&i==null){let t=`DiffHunksRenderer.processDiffResult: deletionLine and additionLine are null, something is wrong`;throw console.error(t,{file:e.name}),Error(t)}let a=c===`change`?o==null?`change-deletion`:`change-addition`:c,u=this.getUnifiedLineDecoration({type:c,lineType:a,additionLineIndex:o?.lineIndex,deletionLineIndex:s?.lineIndex});ee(`unified`,u.gutterLineType,o==null?s.lineNumber:o.lineNumber,`${f},${l}`,u.gutterProperties),i==null?r!=null&&(r=gy(r,u.contentProperties,d&&s!=null?{"data-line":s.lineNumber,"data-line-index":`${f},${l}`}:void 0)):i=gy(i,u.contentProperties,d&&o!=null?{"data-line":o.lineNumber,"data-line-index":`${f},${l}`}:void 0),my({diffStyle:`unified`,type:c,deletionLine:r,additionLine:i,unifiedSpan:this.getAnnotations(`unified`,s?.lineNumber,o?.lineNumber,t,h),createAnnotationElement:e=>this.createAnnotationElement(e),context:x}),n?.after!=null&&fy(n.after,x)}else{let n=this.getSplitInjectedRowsForLine?.(g);n?.before!=null&&py(n.before,x,C);let r=s==null?void 0:b[s.lineIndex],i=o==null?void 0:y[o.lineIndex],a=this.getSplitLineDecoration({side:`deletions`,type:c,lineIndex:s?.lineIndex}),u=this.getSplitLineDecoration({side:`additions`,type:c,lineIndex:o?.lineIndex});if(r==null&&i==null){let t=`DiffHunksRenderer.processDiffResult: deletionLine and additionLine are null, something is wrong`;throw console.error(t,{file:e.name}),Error(t)}let f=(()=>{if(c===`change`){if(i==null)return`additions`;if(r==null)return`deletions`}})();f==null?c===`change`&&C.flush():(C.side!=null&&C.side!==f&&C.flush(),C.side=f,C.increment());let p=this.getAnnotations(`split`,s?.lineNumber,o?.lineNumber,t,h);if(p!=null&&C.size>0&&C.flush(),s!=null){let e=gy(r,a.contentProperties,d?{"data-line":s.lineNumber,"data-line-index":`${s.unifiedLineIndex},${l}`}:void 0);ee(`deletions`,a.gutterLineType,s.lineNumber,`${s.unifiedLineIndex},${l}`,a.gutterProperties),e!=null&&(r=e)}if(o!=null){let e=gy(i,u.contentProperties,d?{"data-line":o.lineNumber,"data-line-index":`${o.unifiedLineIndex},${l}`}:void 0);ee(`additions`,u.gutterLineType,o.lineNumber,`${o.unifiedLineIndex},${l}`,u.gutterProperties),e!=null&&(i=e)}my({diffStyle:`split`,type:c,additionLine:i,deletionLine:r,...p,createAnnotationElement:e=>this.createAnnotationElement(e),context:x}),n?.after!=null&&py(n.after,x,C)}let _=a===`split`&&n!=null&&l===n.splitLineStart+n.splitLineCount-1,v=t===e.hunks.length-1&&n!=null&&(a===`split`?l===n.splitLineStart+n.splitLineCount-1:f===n.unifiedLineStart+n.unifiedLineCount-1),ne=_?n.noEOFCRDeletions:!1,w=_?n.noEOFCRAdditions:!1,re=(s?.noEOFCR??!1)||ne,ie=(o?.noEOFCR??!1)||w;if(ie||re){if(a===`split`&&C.flush(),re){let e=c===`context`||c===`context-expanded`?c:`change-deletion`;a===`unified`?(x.unifiedContentAST.push(V_(e)),x.pushToGutter(`unified`,Pi(e,`metadata`,1))):(x.deletionsContentAST.push(V_(e)),x.pushToGutter(`deletions`,Pi(e,`metadata`,1)),ie||(x.pushToGutter(`additions`,Pi(void 0,`buffer`,1)),x.additionsContentAST.push(B_(1))))}if(ie){let e=c===`context`||c===`context-expanded`?c:`change-addition`;a===`unified`?(x.unifiedContentAST.push(V_(e)),x.pushToGutter(`unified`,Pi(e,`metadata`,1))):(x.additionsContentAST.push(V_(e)),x.pushToGutter(`additions`,Pi(e,`metadata`,1)),re||(x.pushToGutter(`deletions`,Pi(void 0,`buffer`,1)),x.deletionsContentAST.push(B_(1))))}x.incrementRowCount(1)}u!==`simple`&&u!==`metadata`&&(i>0||v&&p)&&te({hunkIndex:c===`context-expanded`?t:t+1,collapsedLines:v&&p?`unknown`:i,rangeSize:S,hunkSpecs:void 0,isFirstHunk:!1,isLastHunk:!0,isExpandable:m}),x.incrementRowCount(1)}}),a===`split`&&C.flush();let ne=Math.max(G_(e.hunks),e.additionLines.length??0,e.deletionLines.length??0),w=t.bufferBefore>0||t.bufferAfter>0,re=!f&&e.type!==`deleted`,ie=!f&&e.type!==`new`,ae=x.rowCount>0||w;h=re&&ae?h:void 0,g=ie&&ae?g:void 0,_=f&&ae?_:void 0;let oe=this.createPreElement(g!=null&&h!=null,ne);return{unifiedGutterAST:f&&ae?x.unifiedGutterAST.children:void 0,unifiedContentAST:_,deletionsGutterAST:ie&&ae?x.deletionsGutterAST.children:void 0,deletionsContentAST:g,additionsGutterAST:re&&ae?x.additionsGutterAST.children:void 0,additionsContentAST:h,hunkData:v,preNode:oe,themeStyles:r,baseThemeType:i,headerElement:o?void 0:this.renderHeader(this.diff),totalLines:ne,rowCount:x.rowCount,bufferBefore:t.bufferBefore,bufferAfter:t.bufferAfter,css:``}}renderCodeAST(e,t){let n=e===`unified`?t.unifiedGutterAST:e===`deletions`?t.deletionsGutterAST:t.additionsGutterAST,r=e===`unified`?t.unifiedContentAST:e===`deletions`?t.deletionsContentAST:t.additionsContentAST;if(n==null||r==null)return;let i=Mi(n);return i.properties.style=`grid-row: span ${t.rowCount}`,[i,Zg(r,t.rowCount)]}renderFullAST(e,t=[]){let n=this.getOptionsWithDefaults().hunkSeparators===`line-info`,r=this.renderCodeAST(`unified`,e);if(r!=null)return t.push(I({tagName:`code`,children:r,properties:{"data-code":``,"data-container-size":n?``:void 0,"data-unified":``}})),{...e.preNode,children:t};let i=this.renderCodeAST(`deletions`,e);i!=null&&t.push(I({tagName:`code`,children:i,properties:{"data-code":``,"data-container-size":n?``:void 0,"data-deletions":``}}));let a=this.renderCodeAST(`additions`,e);return a!=null&&t.push(I({tagName:`code`,children:a,properties:{"data-code":``,"data-container-size":n?``:void 0,"data-additions":``}})),{...e.preNode,children:t}}renderFullHTML(e,t=[]){return Io(this.renderFullAST(e,t))}renderPartialHTML(e,t){return Io(t==null?e:I({tagName:`code`,children:e,properties:{"data-code":``,"data-container-size":this.getOptionsWithDefaults().hunkSeparators===`line-info`?``:void 0,[`data-${t}`]:``}}))}pushFileLevelAnnotations(e,t,n,r){if(!Yg(n))return;let i=e.type===`new`?[]:ly(Jg(this.deletionAnnotations)),a=e.type===`deleted`?[]:ly(Jg(this.additionAnnotations));if(i.length===0&&a.length===0)return;let{createAnnotationElement:o}=this;if(t===`unified`){my({diffStyle:t,type:`context`,unifiedSpan:{type:`annotation`,hunkIndex:-1,lineIndex:-1,annotations:i.concat(a)},createAnnotationElement:o,context:r});return}my({diffStyle:t,type:`context`,deletionSpan:{type:`annotation`,hunkIndex:-1,lineIndex:-1,annotations:i},additionSpan:{type:`annotation`,hunkIndex:-1,lineIndex:-1,annotations:a},createAnnotationElement:o,context:r})}getAnnotations(e,t,n,r,i){let a={type:`annotation`,hunkIndex:r,lineIndex:i,annotations:[]};if(t!=null)for(let e of this.deletionAnnotations[t]??[])a.annotations.push(ug(e));let o={type:`annotation`,hunkIndex:r,lineIndex:i,annotations:[]};if(n!=null)for(let t of this.additionAnnotations[n]??[])(e===`unified`?a:o).annotations.push(ug(t));if(e===`unified`)return a.annotations.length>0?a:void 0;if(o.annotations.length!==0||a.annotations.length!==0)return{deletionSpan:a,additionSpan:o}}renderHeader(e){let{headerRenderMode:t,stickyHeader:n}=this.getOptionsWithDefaults();return Qh({fileOrDiff:e,mode:t,stickyHeader:n})}};function ly(e){return e?.map(e=>ug(e))??[]}var uy=new Intl.PluralRules(`en-US`);function dy(e){return`${e} unmodified line${uy.select(e)===`one`?``:`s`}`}function fy(e,t){for(let n of e)t.unifiedContentAST.push(n.content),t.pushToGutter(`unified`,n.gutter),t.incrementRowCount(1)}function py(e,t,n){for(let{deletion:r,addition:i}of e){if(r==null&&i==null)continue;let e=r!=null&&i!=null?void 0:r==null?`deletions`:`additions`;(e==null||n.side!==e)&&n.flush(),r!=null&&(t.deletionsContentAST.push(r.content),t.pushToGutter(`deletions`,r.gutter)),i!=null&&(t.additionsContentAST.push(i.content),t.pushToGutter(`additions`,i.gutter)),e!=null&&(n.side=e,n.increment()),t.incrementRowCount(1)}}function my({diffStyle:e,type:t,deletionLine:n,additionLine:r,unifiedSpan:i,deletionSpan:a,additionSpan:o,createAnnotationElement:s,context:c}){let l=!1;if(e===`unified`){if(r==null?n!=null&&c.unifiedContentAST.push(n):c.unifiedContentAST.push(r),i!=null){let e=t===`change`?n==null?`change-addition`:`change-deletion`:t;c.unifiedContentAST.push(s(i)),c.pushToGutter(`unified`,Pi(e,`annotation`,1)),l=!0}}else if(e===`split`){if(n!=null&&c.deletionsContentAST.push(n),r!=null&&c.additionsContentAST.push(r),a!=null){let e=t===`change`?n==null?`context`:`change-deletion`:t;c.deletionsContentAST.push(s(a)),c.pushToGutter(`deletions`,Pi(e,`annotation`,1)),l=!0}if(o!=null){let e=t===`change`?r==null?`context`:`change-addition`:t;c.additionsContentAST.push(s(o)),c.pushToGutter(`additions`,Pi(e,`annotation`,1)),l=!0}}l&&c.incrementRowCount(1)}function hy(e,{hunkIndex:t,collapsedLines:n,rangeSize:r,hunkSpecs:i,isFirstHunk:a,isLastHunk:o,isExpandable:s},c){if(typeof n==`number`&&n<=0)return;let l=e===`unified`?c.unifiedContentAST:e===`deletions`?c.deletionsContentAST:c.additionsContentAST;if(c.hunkSeparators===`metadata`){i!=null&&(c.pushToGutter(e,U_({type:`metadata`,content:i,isFirstHunk:a,isLastHunk:o})),l.push(U_({type:`metadata`,content:i,isFirstHunk:a,isLastHunk:o})),e!==`additions`&&c.incrementRowCount(1));return}if(c.hunkSeparators===`simple`){t>0&&(c.pushToGutter(e,U_({type:`simple`,isFirstHunk:a,isLastHunk:!1})),l.push(U_({type:`simple`,isFirstHunk:a,isLastHunk:!1})),e!==`additions`&&c.incrementRowCount(1));return}let u=W_(e,t),d=r>c.expansionLineCount,f=s?t:void 0,p=typeof n==`number`?dy(n):`More unchanged context may be available`;c.pushToGutter(e,U_({type:c.hunkSeparators,content:p,expandIndex:f,chunked:d,slotName:u,isFirstHunk:a,isLastHunk:o})),l.push(U_({type:c.hunkSeparators,content:p,expandIndex:f,chunked:d,slotName:u,isFirstHunk:a,isLastHunk:o})),e!==`additions`&&c.incrementRowCount(1),c.hunkData.push({slotName:u,hunkIndex:t,lines:typeof n==`number`?n:0,lineCountKnown:typeof n==`number`,type:e,expandable:s?{up:!a,down:!o,chunked:d}:void 0})}function gy(e,t,n){return e==null||e.type!==`element`||t==null&&n==null?e:{...e,properties:{...e.properties,...t,...n}}}function _y(e){return e.length>0&&e[e.length-1]===``?e.length-1:e.length}function vy(e,t,n,r){let i=_y(e),a=_y(t),o=Math.min(i,a),s=0;for(;s<o&&e[s]===t[s];)s++;let c=0;for(;c<o-s&&e[i-1-c]===t[a-1-c];)c++;let l=Array(t.length);for(let e=0;e<s;e++)l[e]=n[e];for(let e=0;e<c;e++)l[a-1-e]=n[i-1-e];i<e.length&&a<t.length&&(l[t.length-1]=n[e.length-1]);for(let r=e.length;r<t.length;r++)l[r]??=n[r];for(let e=s;e<t.length;e++)l[e]??=yy(e,r.getLineText(e));return l}function yy(e,t,n=e,r=e){return{type:`element`,tagName:`div`,properties:{"data-line":e+1,"data-line-index":`${n},${r}`,"data-line-type":`context`},children:[{type:`element`,tagName:`span`,properties:{"data-char":0},children:[{type:`text`,value:t}]}]}}function by(e,t){let n=[],r=Sy(t);for(let t=0;t<e.lineCount;t++){let i=e.getLineText(t,!0);n.push(t<e.lineCount-1&&!xy(i)?i+r:i)}return n}function xy(e){return e.endsWith(`
1528
- `)||e.endsWith(`\r`)}function Sy(e){for(let t of e){if(t.endsWith(`\r
1529
- `))return`\r
1530
- `;if(t.endsWith(`
1531
- `))return`
1532
- `;if(t.endsWith(`\r`))return`\r`}return`
1533
- `}function Cy(e,t){return Math.max(e.additionLines.length,e.deletionLines.length)>t}function wy(e,t){return e.isPartial&&t&&(e.type===`change`||e.type===`rename-changed`)}function Ty(e,t){return e.lineNumber===t.lineNumber&&e.side===t.side&&e.metadata===t.metadata}function Ey(e,t){return e.slotName===t.slotName&&e.hunkIndex===t.hunkIndex&&e.lines===t.lines&&e.lineCountKnown===t.lineCountKnown&&e.type===t.type&&e.expandable?.chunked===t.expandable?.chunked&&e.expandable?.up===t.expandable?.up&&e.expandable?.down===t.expandable?.down}async function Dy(e,t=300){let n;try{await Promise.race([e(),new Promise(e=>{n=setTimeout(e,t)})])}finally{n!=null&&clearTimeout(n)}}function Oy({oldFile:e,newFile:t},n){if(e!==void 0||t!==void 0){if(e===void 0||t===void 0)throw Error(`${n}: Pass null for an intentionally missing oldFile or newFile side`);if(e===null){if(t===null)throw Error(`${n}: You must pass oldFile, newFile, or both`);return{oldFile:e,newFile:t}}return{oldFile:e,newFile:t}}}function ky(e){return{theme:e?.theme,disableLineNumbers:e?.disableLineNumbers,overflow:e?.overflow,collapsed:e?.collapsed,disableFileHeader:e?.disableFileHeader,disableVirtualizationBuffers:e?.disableVirtualizationBuffers,stickyHeader:e?.stickyHeader,preferredHighlighter:e?.preferredHighlighter,useCSSClasses:e?.useCSSClasses,useTokenTransformer:b_(e),tokenizeMaxLineLength:e?.tokenizeMaxLineLength,tokenizeMaxLength:e?.tokenizeMaxLength,diffStyle:e?.diffStyle,diffIndicators:e?.diffIndicators,disableBackground:e?.disableBackground,hunkSeparators:typeof e?.hunkSeparators==`function`?`custom`:e?.hunkSeparators,expandUnchanged:e?.expandUnchanged,loadDiffFiles:e?.loadDiffFiles,collapsedContextThreshold:e?.collapsedContextThreshold,lineDiffType:e?.lineDiffType,maxLineDiffLength:e?.maxLineDiffLength,expansionLineCount:e?.expansionLineCount,headerRenderMode:e?.renderCustomHeader==null?`default`:`custom`}}function Ay(e){return e.isPartial&&(e.type===`change`||e.type===`rename-changed`||e.type===`rename-pure`)}var jy=-1,My=class{options;workerManager;isContainerManaged;static LoadedCustomComponent=!0;__id=`file-diff:${++jy}`;type=`file-diff`;fileContainer;spriteSVG;pre;codeUnified;codeDeletions;codeAdditions;bufferBefore;bufferAfter;themeCSSStyle;appliedThemeCSS;hasAdoptedThemeCSS=!1;unsafeCSSStyle;appliedUnsafeCSS;gutterUtilityContent;headerElement;headerPrefix;headerFilenameSuffix;headerMetadata;headerCustom;separatorCache=new Map;errorWrapper;placeHolder;hunksRenderer;resizeManager;scrollSyncManager;interactionManager;annotationCache=new Map;lineAnnotations=[];managersDirty=!1;deletionFile;additionFile;fileDiff;renderRange;pendingFiles;appliedPreAttributes;lastRenderedHeaderHTML;cachedHeaderHTML;lastRowCount;mounted=!1;enabled=!0;editor;refreshViewTimeout;lineStateRefreshPending=!1;deferredSelectedLines;deferredEditorActiveLine;constructor(e={theme:nr},t,n=!1){this.options=e,this.workerManager=t,this.isContainerManaged=n,this.hunksRenderer=this.createHunksRenderer(e),this.resizeManager=new as,this.scrollSyncManager=new R_,this.interactionManager=new zo(`diff`,Bo(e,typeof e.hunkSeparators==`function`||(e.hunkSeparators??`line-info`)===`line-info`||e.hunkSeparators===`line-info-basic`?this.handleExpandHunk:void 0,this.getLineIndex)),this.workerManager?.subscribeToThemeChanges(this),this.enabled=!0}handleHighlightRender=()=>{this.rerender()};getHunksRendererOptions(e){return ky(e)}createHunksRenderer(e){return new cy(this.getHunksRendererOptions(e),this.handleHighlightRender,this.workerManager)}getLineIndex=(e,t=`additions`)=>{let n=this.fileDiffCache;if(n==null)return;let r=n.hunks.at(-1),i,a;hunkIterator:for(let o of n.hunks){let n=t===`deletions`?o.deletionStart:o.additionStart,s=t===`deletions`?o.deletionCount:o.additionCount,c=Tr(n,s)+1,l=o.splitLineStart,u=o.unifiedLineStart;if(e<c){let t=c-e;i=Math.max(u-t,0),a=Math.max(l-t,0);break hunkIterator}if(e>=c+s){if(o===r){let t=e-(c+s);i=u+o.unifiedLineCount+t,a=l+o.splitLineCount+t;break hunkIterator}continue}for(let n of o.hunkContent)if(n.type===`context`){if(e<c+n.lines){let t=e-c;a=l+t,i=u+t;break hunkIterator}c+=n.lines,l+=n.lines,u+=n.lines}else{let r=t===`deletions`?n.deletions:n.additions;if(e<c+r){let r=e-c;i=u+(t===`additions`?n.deletions:0)+r,a=l+r;break hunkIterator}c+=r,l+=Math.max(n.deletions,n.additions),u+=n.deletions+n.additions}break hunkIterator}if(i!=null&&a!=null)return[i,a]};setOptions(e){e!=null&&(this.options=e,this.cachedHeaderHTML=void 0,this.hunksRenderer.setOptions(this.getHunksRendererOptions(e)),this.syncInteractionOptions())}syncInteractionOptions(){this.interactionManager.setOptions(Bo(this.options,typeof this.options.hunkSeparators==`function`||(this.options.hunkSeparators??`line-info`)===`line-info`||this.options.hunkSeparators===`line-info-basic`?this.handleExpandHunk:void 0,this.getLineIndex))}mergeOptions(e){this.options={...this.options,...e}}setThemeType(e){(this.options.themeType??`system`)!==e&&(this.mergeOptions({themeType:e}),this.applyCachedThemeState(e))}applyCachedThemeState(e){if(typeof this.options.theme==`string`||this.fileContainer==null||this.appliedThemeCSS==null)return!1;let t=this.appliedThemeCSS.baseThemeType??e;return this.appliedThemeCSS.themeType!==t&&(this.applyThemeState(this.fileContainer,this.appliedThemeCSS.themeStyles,e,this.appliedThemeCSS.baseThemeType),!0)}hasThemeChanged(){return this.appliedThemeCSS!=null&&!gr(this.appliedThemeCSS.theme,this.options.theme??nr)}getHoveredLine=()=>this.interactionManager.getHoveredLine();setLineAnnotations(e){this.lineAnnotations=e}canPartiallyRender(e,t,n){return!(e||t||n||typeof this.options.hunkSeparators==`function`)}setSelectedLines(e,t){this.lineStateRefreshPending?this.deferredSelectedLines=[e,t]:this.interactionManager.setSelection(e,t)}setEditorActiveLine(e,t){this.lineStateRefreshPending?this.deferredEditorActiveLine=[e,t]:this.interactionManager.setEditorActiveLine(e,{lineNumberOnly:t?.lineNumberOnly,side:t?.side??`additions`})}flushDeferredLineState(){let{deferredEditorActiveLine:e,deferredSelectedLines:t}=this;this.lineStateRefreshPending=!1,this.deferredEditorActiveLine=void 0,this.deferredSelectedLines=void 0,e!=null&&this.setEditorActiveLine(...e),t!=null&&this.interactionManager.setSelection(...t)}flushManagers(){if(!this.managersDirty||this.pre==null){this.managersDirty=!1;return}let{diffStyle:e=`split`,overflow:t=`scroll`}=this.options;this.interactionManager.setup(this.pre),this.resizeManager.setup(this.pre,{disableAnnotations:t===`wrap`,columnVariables:this.shouldApplyColumnVariables(t)?`apply`:`measure`}),t===`scroll`&&e===`split`?this.scrollSyncManager.setup(this.pre,this.codeDeletions,this.codeAdditions):this.scrollSyncManager.cleanUp(),this.managersDirty=!1}shouldApplyColumnVariables(e){return typeof this.options.hunkSeparators==`function`||e===`scroll`&&(this.lineAnnotations.length>0||this.pre?.hasAttribute(`data-has-merge-conflict`)===!0)}getCodeScrollLeft(){return Math.max(this.codeUnified?.scrollLeft??0,this.codeDeletions?.scrollLeft??0,this.codeAdditions?.scrollLeft??0)}setCodeScrollLeft(e){this.codeUnified!=null&&(this.codeUnified.scrollLeft=e),this.codeAdditions!=null&&(this.codeAdditions.scrollLeft=e),this.codeDeletions!=null&&(this.codeDeletions.scrollLeft=e)}__getEffectiveCodeOptions(){return{...this.options,...this.hunksRenderer.getEffectiveCodeOptions()}}cleanUp(e=!1){mr(this.handleEditSessionRender),this.emitPostRender(!0),this.editor?.cleanUp(e),this.editor=void 0,this.resizeManager.cleanUp(),this.interactionManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.managersDirty=!1,this.workerManager?.unsubscribeToThemeChanges(this),this.renderRange=void 0,this.pendingFiles=void 0,this.isContainerManaged||this.fileContainer?.remove(),this.fileContainer=void 0,this.mounted=!1,e||(this.lineAnnotations=[]),this.clearAuxiliaryNodes(),this.annotationCache.clear(),this.pre=void 0,this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0,this.bufferBefore?.remove(),this.bufferBefore=void 0,this.bufferAfter?.remove(),this.bufferAfter=void 0,this.appliedPreAttributes=void 0,this.headerElement=void 0,this.headerPrefix=void 0,this.headerFilenameSuffix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0,this.placeHolder?.remove(),this.placeHolder=void 0,this.lastRenderedHeaderHTML=void 0,e||(this.cachedHeaderHTML=void 0),this.errorWrapper?.remove(),this.errorWrapper=void 0,this.spriteSVG=void 0,this.lastRowCount=void 0,this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0,this.hasAdoptedThemeCSS=!1,this.unsafeCSSStyle=void 0,this.appliedUnsafeCSS=void 0,e?this.hunksRenderer.recycle():(this.hunksRenderer.cleanUp(),this.workerManager=void 0,this.fileDiff=void 0,this.deletionFile=void 0,this.additionFile=void 0),this.refreshViewTimeout!=null&&(clearTimeout(this.refreshViewTimeout),this.refreshViewTimeout=void 0),this.lineStateRefreshPending=!1,this.deferredEditorActiveLine=void 0,this.deferredSelectedLines=void 0,this.enabled=!1}virtualizedSetup(){this.enabled=!0,this.workerManager?.subscribeToThemeChanges(this)}hydrate({fileContainer:e,prerenderedHTML:t,preventEmit:n=!1,lineAnnotations:r,fileDiff:i,...a}){if(!this.enabled)throw Error(`FileDiff.hydrate: attempting to call hydrate after cleaned up`);if(this.fileContainer!=null)throw Error(`FileDiff.hydrate: hydrate can only be called before the instance has rendered or hydrated`);let o=Oy(a,`FileDiff.hydrate`),s=o?.oldFile,c=o?.newFile;this.hydrateElements(e,t),Iy(this.pre,Py({fileDiff:i,oldFile:s,newFile:c}),this.options.collapsed)||Ly(this.headerElement,Fy({fileDiff:i,oldFile:s,newFile:c}),this.options.disableFileHeader)?this.render({...a,fileContainer:e,lineAnnotations:r,fileDiff:i,preventEmit:!0}):this.hydrationSetup({fileDiff:i,lineAnnotations:r,...o}),n||this.emitPostRender()}hydrateElements(e,t){this.fileContainer!==e&&this.emitPostRender(!0),__(e,t);for(let t of e.shadowRoot?.children??[]){if(t instanceof SVGElement){this.spriteSVG=t;continue}if(t instanceof HTMLElement){if(t instanceof HTMLPreElement){this.pre=t;for(let e of t.children)!(e instanceof HTMLElement)||e.tagName.toLowerCase()!==`code`||(`deletions`in e.dataset&&(this.codeDeletions=e),`additions`in e.dataset&&(this.codeAdditions=e),`unified`in e.dataset&&(this.codeUnified=e));continue}if(`diffsHeader`in t.dataset){this.headerElement=t;continue}if(t instanceof HTMLStyleElement&&t.hasAttribute(`data-theme-css`)){this.themeCSSStyle=t;continue}if(t instanceof HTMLStyleElement&&t.hasAttribute(`data-unsafe-css`)){this.unsafeCSSStyle=t,this.appliedUnsafeCSS=t.textContent;continue}}}this.pre!=null&&(this.syncCodeNodesFromPre(this.pre),this.pre.removeAttribute(`data-dehydrated`)),this.fileContainer=e,this.hydrateMeasuredScrollbar()}hydrationSetup({fileDiff:e,oldFile:t,newFile:n,lineAnnotations:r}){this.lineAnnotations=r??this.lineAnnotations,this.additionFile=n,this.deletionFile=t,this.fileDiff=e??(t!==void 0&&n!==void 0?Ei(t,n,this.options.parseDiffOptions):void 0),this.pre!=null&&(this.syncInteractionOptions(),this.hunksRenderer.hydrate(this.fileDiff),this.renderAnnotations(),this.renderGutterUtility(),this.injectUnsafeCSS(),this.managersDirty=!0,this.flushManagers())}rerender(){!this.enabled||this.fileDiff==null&&this.additionFile==null&&this.deletionFile==null||this.render({forceRender:!0,renderRange:this.renderRange})}onThemeChange(){this.hunksRenderer.clearRenderCache(),this.rerender()}handleExpandHunk=(e,t,n)=>{this.expandHunk(e,t,n)};expandHunk=(e,t,n)=>{this.hunksRenderer.expandHunk(e,t,n),this.loadFilesIfNecessary(),this.rerender()};loadFilesIfNecessary(){let{fileDiff:e,options:{loadDiffFiles:t}}=this;e==null||t==null||!Ay(e)||this.pendingFiles?.fileDiff===e||(this.pendingFiles={fileDiff:e,promise:this.loadFilesForDiff(e,t)})}async loadFilesForDiff(e,t){try{let n=await t(e);if(!this.enabled||this.fileDiff!==e)return;await this.handleFilesLoaded(e,n)}catch(e){if(this.options.disableErrorHandling===!0)throw e;console.error(e)}finally{this.pendingFiles?.fileDiff===e&&(this.pendingFiles=void 0)}}async handleFilesLoaded(e,t){this.fileDiff!==e||!e.isPartial||(k_(`merge`,e,t),this.setHydratedState(t),await Dy(()=>this.primeHighlightCache(e)),!(!this.enabled||this.fileDiff!==e)&&this.rerender())}setHydratedState(e){this.deletionFile=e.oldFile,this.additionFile=e.newFile,this.workerManager?.cleanUpTasks(this.hunksRenderer),this.hunksRenderer.clearRenderCache()}render({fileDiff:e,deferManagers:t=!1,forceRender:n=!1,preventEmit:r=!1,lineAnnotations:i,fileContainer:a,containerWrapper:o,renderRange:s,...c}){let l=Oy(c,`FileDiff.render`),u=l?.oldFile,d=l?.newFile;if(!this.enabled)throw Error(`FileDiff.render: attempting to call render after cleaned up`);e!=null&&e.cacheKey===void 0&&(e.cacheKey=e.prevName==null?e.name:e.prevName+`:`+e.name),this.editor?.__postponeBgTokenizeToNextFrame();let{collapsed:f=!1,themeType:p=`system`,expandUnchanged:m=!1}=this.options,h=f?void 0:s,g=this.hasThemeChanged(),_=l!=null,v=_&&(!Ny(u,this.deletionFile)||!Ny(d,this.additionFile)),y=e!=null&&e!==this.fileDiff,b=i!=null&&(i.length>0||this.lineAnnotations.length>0)&&i!==this.lineAnnotations;if(!f&&Yh(h,this.renderRange)&&!n&&!b&&!g&&(e!=null&&e===this.fileDiff||e==null&&!v))return this.applyCachedThemeState(p);let x;e==null&&_&&(v||this.fileDiff==null)&&(x=Ei(l.oldFile,l.newFile,this.options.parseDiffOptions));let{renderRange:S}=this;if(this.renderRange=h,_?(this.deletionFile=u,this.additionFile=d):e!=null&&(this.deletionFile=void 0,this.additionFile=void 0),e==null?x!=null&&(y=!0,this.fileDiff=x):this.fileDiff=e,y&&(this.cachedHeaderHTML=void 0),i!=null&&this.setLineAnnotations(i),this.fileDiff==null)return!1;this.fileDiff.editSessionDirty===!0&&this.shouldSelfHealEditSession()&&(Wv(this.fileDiff,this.options.parseDiffOptions),this.hunksRenderer.refreshHighlightedResult()),m&&this.loadFilesIfNecessary(),this.hunksRenderer.setOptions(this.getHunksRendererOptions(this.options)),this.syncInteractionOptions(),this.hunksRenderer.setLineAnnotations(this.lineAnnotations);let{disableErrorHandling:C=!1,disableFileHeader:ee=!1}=this.options;if(ee&&(this.headerElement!=null&&(this.headerElement.remove(),this.headerElement=void 0,this.lastRenderedHeaderHTML=void 0),this.clearHeaderSlots()),a=this.getOrCreateFileContainer(a,o),this.applyCachedThemeState(p),f){this.removeRenderedCode(),this.clearAuxiliaryNodes();try{let e=this.hunksRenderer.renderDiff(this.fileDiff,ur);e!=null&&this.applyThemeState(a,e.themeStyles,p,e.baseThemeType),e?.headerElement!=null&&this.applyHeaderToDOM(e.headerElement,a),this.renderSeparators([]),this.injectUnsafeCSS()}catch(e){if(C)throw e;console.error(e),e instanceof Error&&this.applyErrorToDOM(e,a)}return r||this.emitPostRender(),!0}try{let e=this.getOrCreatePreNode(a);if(!(this.canPartiallyRender(n,b,v||y||g)&&this.applyPartialRender({previousRenderRange:S,renderRange:h}))){let t=this.hunksRenderer.renderDiff(this.fileDiff,h);if(t==null)return this.workerManager?.isInitialized()===!1&&this.workerManager.initialize().then(()=>this.rerender()),!1;this.applyThemeState(a,t.themeStyles,p,t.baseThemeType),t.headerElement!=null&&this.applyHeaderToDOM(t.headerElement,a),t.additionsContentAST!=null||t.deletionsContentAST!=null||t.unifiedContentAST!=null?this.applyHunksToDOM(e,t):this.pre!=null&&(this.pre.remove(),this.pre=void 0),this.renderSeparators(t.hunkData)}this.applyBuffers(e,h),this.injectUnsafeCSS(),this.renderAnnotations(),this.renderGutterUtility(),this.managersDirty=!0,t||this.flushManagers(),this.editor!=null&&this.syncRenderViewToEditor()}catch(e){if(C)throw e;console.error(e),e instanceof Error&&this.applyErrorToDOM(e,a)}return r||this.emitPostRender(),!0}emitPostRender(e=!1){let{fileContainer:t,options:{onPostRender:n}}=this;if(e){if(!this.mounted||(this.mounted=!1,t==null))return;this.options.onPostRender?.(t,this,`unmount`);return}if(t==null)return;let r=this.mounted?`update`:`mount`;this.mounted=!0,n?.(t,this,r)}get fileDiffCache(){return this.hunksRenderer.diffCache??this.fileDiff}syncRenderViewToEditor(){let e=this.editor,t=this.fileContainer,n=this.fileDiffCache,r=this.lineAnnotations,i=this.computeEditorRenderRange(this.renderRange);e!=null&&t!=null&&n!=null&&!n.isPartial&&this.hunksRenderer.initializeHighlighter().then(a=>{!this.enabled||this.editor!==e||this.fileContainer!==t||this.fileDiffCache!==n||e.__syncRenderView(a,t,n,r,i)})}computeEditorRenderRange(e){let t=this.fileDiffCache;if(e==null||t==null||K_(e))return e;let{diffStyle:n=`split`,expandUnchanged:r=!1,collapsedContextThreshold:i=1}=this.options,a,o;return nv({diff:t,diffStyle:n,startingLine:e.startingLine,totalLines:e.totalLines,expandedHunks:r?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:i,callback:({additionLine:e})=>{e!=null&&(a??=e.lineNumber,o=e.lineNumber)}}),a==null||o==null?{...e,startingLine:0,totalLines:0}:{...e,startingLine:a-1,totalLines:o-a+1}}attachEditor(e){if(this.type!==`file-diff`)throw Error(`FileDiff.attachEditor: cannot attach an editor to a "${this.type}" diff`);return this.editor?.cleanUp(),this.editor=e,this.hunksRenderer.beginEditSession(),this.fileDiff?.isPartial===!0&&this.loadFilesIfNecessary(),this.hunksRenderer.editorRenderReady()?this.syncRenderViewToEditor():this.rerender(),e=>{this.editor=void 0,e!==!0&&this.finishEditSession()}}finishEditSession(){this.hunksRenderer.endEditSession(),this.completeEditSession()}completeEditSession(){let e=this.fileDiffCache;if(e==null||e.editSessionDirty!==!0)return!1;let{collapsedContextThreshold:t=1}=this.options,n=Hv(e,this.hunksRenderer.getExpandedHunksMap(),t);return Wv(e,this.options.parseDiffOptions),this.hunksRenderer.setExpandedHunksMap(Uv(e,n)),this.hunksRenderer.refreshHighlightedResult(),this.escalateEditSessionRender(),!0}applyDocumentChange(e,t){this.hunksRenderer.applyDocumentChange(e);let n=this.hunksRenderer.diffCache;if(n!=null){let e=this.fileDiff?.cacheKey;e!=null&&n.cacheKey==null&&(n.cacheKey=e),this.fileDiff=n}t!==void 0&&t!==this.lineAnnotations&&(this.setLineAnnotations(t),this.hunksRenderer.setLineAnnotations(this.lineAnnotations),this.renderAnnotations()),this.rerender(),this.interactionManager.setSelectionDirty()}updateRenderCache(e,t,n={}){let{shouldRefreshDiffsView:r,lineCountChangeInFlight:i}=n;if(this.hunksRenderer.updateRenderCache(e,t,i)){this.refreshViewTimeout!=null&&(clearTimeout(this.refreshViewTimeout),this.refreshViewTimeout=void 0),this.lineStateRefreshPending=!0,this.escalateEditSessionRender();return}r===!0&&(this.refreshViewTimeout!=null&&clearTimeout(this.refreshViewTimeout),this.lineStateRefreshPending=!0,this.refreshViewTimeout=setTimeout(()=>{this.refreshViewTimeout=void 0,this.options.diffStyle===`split`?this.refreshSplitDiffView():this.refreshUnifiedDiffView(),this.flushDeferredLineState()},150))}isLineRenderable(e){let t=this.fileDiffCache;if(t==null)return!0;let{expandUnchanged:n=!1,collapsedContextThreshold:r=1}=this.options;return ev({fileDiff:t,lineNumber:e,expandedHunks:n?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:r})}getNearestRenderableLine(e,t){let n=this.fileDiffCache;if(n==null)return e;let{expandUnchanged:r=!1,collapsedContextThreshold:i=1}=this.options;return tv({fileDiff:n,lineNumber:e,direction:t,expandedHunks:r?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:i})}revealLine(e){let t=this.fileDiffCache,{expandUnchanged:n=!1,collapsedContextThreshold:r=1,expansionLineCount:i=100}=this.options;if(t==null||t.isPartial||n)return!1;let a=this.hunksRenderer.getExpandedHunksMap();for(let[n,o]of t.hunks.entries()){let[s,c]=Y_(o);if(e<s){let c=X_({isPartial:t.isPartial,rangeSize:o.collapsedBefore,expandedHunks:a,hunkIndex:n,collapsedContextThreshold:r}),l=s-c.rangeSize;if(c.renderAll||e<l+c.fromStart||e>=s-c.fromEnd)return!1;let u=e-(l+c.fromStart)+1,d=s-c.fromEnd-e;return u<=d?this.expandHunk(n,`up`,u+i):this.expandHunk(n,`down`,d+i),!0}if(e<c)return!1}let o=$_({fileDiff:t,hunkIndex:t.hunks.length-1,expandedHunks:a,collapsedContextThreshold:r,errorPrefix:`FileDiff.revealLine`});if(o==null||o.renderAll)return!1;let s=t.hunks[t.hunks.length-1],[,c]=Y_(s);return e<c+o.fromStart||e>=c+o.rangeSize?!1:(this.expandHunk(t.hunks.length,`up`,e-(c+o.fromStart)+1+i),!0)}shouldSelfHealEditSession(){return this.editor==null}escalateEditSessionRender(){pr(this.handleEditSessionRender)}handleEditSessionRender=()=>{this.rerender(),this.flushDeferredLineState()};removeRenderedCode(){this.resizeManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.interactionManager.cleanUp(),this.bufferBefore?.remove(),this.bufferBefore=void 0,this.bufferAfter?.remove(),this.bufferAfter=void 0,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0,this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0,this.lastRowCount=void 0}clearAuxiliaryNodes(){for(let{element:e}of this.separatorCache.values())e.remove();this.separatorCache.clear();for(let{element:e}of this.annotationCache.values())e.remove();this.annotationCache.clear(),this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0}renderPlaceholder(e){if(this.fileContainer==null)return!1;if(this.emitPostRender(!0),this.cleanChildNodes(),this.placeHolder==null){let e=this.fileContainer.shadowRoot??this.fileContainer.attachShadow({mode:`open`});this.placeHolder=document.createElement(`div`),this.placeHolder.dataset.placeholder=``,e.appendChild(this.placeHolder)}return this.placeHolder.style.setProperty(`height`,`${e}px`),!0}async primeHighlightCache(e=this.fileDiff){let{workerManager:t}=this;if(e==null||t==null||!t.isWorkingPool()||e.cacheKey==null||oy(e))return;let n=this.options.tokenizeMaxLength??1e5;Math.max(e.additionLines.length,e.deletionLines.length)>n||await t.primeDiffHighlightCache(e).catch(e=>{console.error(e)})}cleanChildNodes(){this.resizeManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.interactionManager.cleanUp(),this.clearAuxiliaryNodes(),this.bufferAfter?.remove(),this.bufferBefore?.remove(),this.codeAdditions?.remove(),this.codeDeletions?.remove(),this.codeUnified?.remove(),this.errorWrapper?.remove(),this.headerElement?.remove(),this.headerPrefix?.remove(),this.headerFilenameSuffix?.remove(),this.headerMetadata?.remove(),this.headerCustom?.remove(),this.pre?.remove(),this.spriteSVG?.remove(),this.themeCSSStyle?.remove(),this.unsafeCSSStyle?.remove(),this.bufferAfter=void 0,this.bufferBefore=void 0,this.codeAdditions=void 0,this.codeDeletions=void 0,this.codeUnified=void 0,this.errorWrapper=void 0,this.headerElement=void 0,this.headerPrefix=void 0,this.headerFilenameSuffix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0,this.pre=void 0,this.spriteSVG=void 0,this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0,this.hasAdoptedThemeCSS=!1,this.unsafeCSSStyle=void 0,this.appliedUnsafeCSS=void 0,this.lastRenderedHeaderHTML=void 0,this.lastRowCount=void 0,this.mounted=!1}renderSeparators(e){let{hunkSeparators:t}=this.options;if(this.isContainerManaged||this.fileContainer==null||typeof t!=`function`){for(let{element:e}of this.separatorCache.values())e.remove();this.separatorCache.clear();return}let n=new Map(this.separatorCache);for(let r of e){let e=r.slotName,i=this.separatorCache.get(e);if(i==null||!Ey(r,i.hunkData)){i?.element.remove();let n=document.createElement(`div`);n.style.display=`contents`,n.slot=r.slotName;let a=t(r,this);a!=null&&n.appendChild(a),this.fileContainer.appendChild(n),i={element:n,hunkData:r},this.separatorCache.set(e,i)}n.delete(e)}for(let[e,{element:t}]of n.entries())this.separatorCache.delete(e),t.remove()}renderAnnotations(){if(this.isContainerManaged||this.fileContainer==null){for(let{element:e}of this.annotationCache.values())e.remove();this.annotationCache.clear();return}let e=new Map(this.annotationCache),{renderAnnotation:t}=this.options;if(t!=null&&this.lineAnnotations.length>0)for(let[n,r]of this.lineAnnotations.entries()){let i=`${n}-${ug(r)}`,a=this.annotationCache.get(i);if(a==null||!Ty(r,a.annotation)){a?.element.remove();let e=t(r);if(e==null)continue;a={element:r_(ug(r)),annotation:r},a.element.appendChild(e),this.fileContainer.appendChild(a.element),this.annotationCache.set(i,a)}e.delete(i)}for(let[t,{element:n}]of e.entries())this.annotationCache.delete(t),n.remove()}renderGutterUtility(){let{renderGutterUtility:e}=this.options;if(this.fileContainer==null||e==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}let t=e(this.interactionManager.getHoveredLine);if(t!=null&&this.gutterUtilityContent!=null)return;if(t==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}let n=i_();n.appendChild(t),this.fileContainer.appendChild(n),this.gutterUtilityContent=n}getOrCreateFileContainer(e,t){let{fileContainer:n}=this,r=e??n??document.createElement(`diffs-container`),i=n!==r;return n!=null&&i&&this.editor?.__captureFocusForDOMReplacement(),i&&this.emitPostRender(!0),this.fileContainer=r,n!=null&&i&&(this.lastRenderedHeaderHTML=void 0,this.headerElement=void 0),t!=null&&this.fileContainer.parentNode!==t&&t.appendChild(this.fileContainer),i&&this.adoptReusableShellElements(this.fileContainer),this.ensureSpriteSVG(this.fileContainer),this.fileContainer}adoptReusableShellElements(e){let{shadowRoot:t}=e;if(t!=null)for(let e of t.children)e instanceof SVGElement?this.spriteSVG??=e:y_(e)&&e.hasAttribute(`data-theme-css`)?(this.themeCSSStyle??=e,this.hasAdoptedThemeCSS=!0):y_(e)&&e.hasAttribute(`data-unsafe-css`)&&(this.unsafeCSSStyle??=e,this.appliedUnsafeCSS??=this.options.unsafeCSS??void 0)}ensureSpriteSVG(e){let t=e.shadowRoot??e.attachShadow({mode:`open`});if(this.spriteSVG==null){let e=document.createElement(`div`);e.innerHTML=$g;let t=e.firstChild;t instanceof SVGElement&&(this.spriteSVG=t)}this.spriteSVG!=null&&this.spriteSVG.parentNode!==t&&t.appendChild(this.spriteSVG)}getOrCreatePreNode(e){let t=e.shadowRoot??e.attachShadow({mode:`open`});return this.pre==null?(this.pre=document.createElement(`pre`),this.appliedPreAttributes=void 0,this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0,t.appendChild(this.pre)):this.pre.parentNode!==t&&(this.editor?.__captureFocusForDOMReplacement(),t.appendChild(this.pre),this.appliedPreAttributes=void 0),this.placeHolder?.remove(),this.placeHolder=void 0,this.pre}syncCodeNodesFromPre(e){this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0;for(let t of Array.from(e.children))t instanceof HTMLElement&&(t.hasAttribute(`data-unified`)?this.codeUnified=t:t.hasAttribute(`data-deletions`)?this.codeDeletions=t:t.hasAttribute(`data-additions`)&&(this.codeAdditions=t))}applyHeaderToDOM(e,t){this.cleanupErrorWrapper(),this.placeHolder?.remove(),this.placeHolder=void 0;let{fileDiff:n}=this,r=this.cachedHeaderHTML??Io(e);if(this.cachedHeaderHTML=r,r!==this.lastRenderedHeaderHTML){let e=document.createElement(`div`);e.innerHTML=r;let n=e.firstElementChild;if(!(n instanceof HTMLElement))return;this.headerElement==null?t.shadowRoot?.prepend(n):t.shadowRoot?.replaceChild(n,this.headerElement),this.headerElement=n,this.lastRenderedHeaderHTML=r}if(this.isContainerManaged||n==null)return;let{renderCustomHeader:i,renderHeaderPrefix:a,renderHeaderFilenameSuffix:o,renderHeaderMetadata:s}=this.options;if(i!=null){let e=i(n)??void 0;this.headerCustom=this.upsertHeaderSlotElement(t,this.headerCustom,tr,e),this.headerPrefix?.remove(),this.headerFilenameSuffix?.remove(),this.headerMetadata?.remove(),this.headerPrefix=void 0,this.headerFilenameSuffix=void 0,this.headerMetadata=void 0;return}let c=a?.(n)??void 0,l=o?.(n)??void 0,u=s?.(n)??void 0;this.headerPrefix=this.upsertHeaderSlotElement(t,this.headerPrefix,Qn,c),this.headerFilenameSuffix=this.upsertHeaderSlotElement(t,this.headerFilenameSuffix,$n,l),this.headerMetadata=this.upsertHeaderSlotElement(t,this.headerMetadata,er,u),this.headerCustom?.remove(),this.headerCustom=void 0}clearHeaderSlots(){this.headerPrefix?.remove(),this.headerFilenameSuffix?.remove(),this.headerMetadata?.remove(),this.headerCustom?.remove(),this.headerPrefix=void 0,this.headerFilenameSuffix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0}upsertHeaderSlotElement(e,t,n,r){if(r==null){t?.remove();return}let i=t??this.createHeaderSlotElement(n);return t??e.appendChild(i),this.replaceHeaderSlotContent(i,r),i}replaceHeaderSlotContent(e,t){e.replaceChildren(),t instanceof Element?e.appendChild(t):e.innerText=`${t}`}createHeaderSlotElement(e){let t=document.createElement(`div`);return t.slot=e,t}injectUnsafeCSS(){let{unsafeCSS:e}=this.options,t=this.fileContainer?.shadowRoot;if(t!=null){if(e==null||e===``){this.unsafeCSSStyle!=null&&(this.unsafeCSSStyle.remove(),this.unsafeCSSStyle=void 0),this.appliedUnsafeCSS=void 0;return}(this.unsafeCSSStyle?.parentNode!==t||this.appliedUnsafeCSS!==e)&&(this.unsafeCSSStyle??=a_(),this.unsafeCSSStyle.parentNode!==t&&t.appendChild(this.unsafeCSSStyle),this.unsafeCSSStyle.textContent=f_(e),this.appliedUnsafeCSS=e)}}applyThemeState(e,t,n,r){let i=e.shadowRoot??e.attachShadow({mode:`open`}),a=r??n,o=this.options.theme??nr,s=typeof o==`string`?o:{...o},c=c_(i);if(this.themeCSSStyle?.parentNode===i&&this.appliedThemeCSS?.themeStyles===t&&this.appliedThemeCSS.themeType===a&&this.appliedThemeCSS.scrollbarGutter===c){this.appliedThemeCSS.theme=s;return}if(this.hasAdoptedThemeCSS&&this.themeCSSStyle?.parentNode===i){this.hasAdoptedThemeCSS=!1,this.appliedThemeCSS={theme:s,themeStyles:t,themeType:a,baseThemeType:r,scrollbarGutter:c};return}this.themeCSSStyle=S_({shadowRoot:i,currentNode:this.themeCSSStyle,themeCSS:p_(t,a,c)}),this.appliedThemeCSS=this.themeCSSStyle==null?void 0:{theme:s,themeStyles:t,themeType:a,baseThemeType:r,scrollbarGutter:c}}hydrateMeasuredScrollbar(){let e=this.fileContainer?.shadowRoot;e!=null&&this.themeCSSStyle!=null&&(this.themeCSSStyle.textContent=m_(this.themeCSSStyle.textContent??``,c_(e)))}shouldGuardRebuildScroll(){return this.editor!=null&&T_()}applyHunksToDOM(e,t){this.shouldGuardRebuildScroll()?x_(e,()=>this.replaceCodeColumns(e,t)):this.replaceCodeColumns(e,t)}applyCodeColumnsInPlace(e,t,n){let r=this.getColumnPair(e);if(r==null)return!1;let i=Ry(t[0]),a=Ry(t[1]);return i==null||a==null?!1:(r.gutter.innerHTML=Io(i),r.content.innerHTML=Io(a),n!==this.lastRowCount&&(r.gutter.style.setProperty(`grid-row`,`span ${n}`),r.content.style.setProperty(`grid-row`,`span ${n}`)),!0)}replaceCodeColumns(e,t){let{overflow:n=`scroll`}=this.options,r=(this.options.hunkSeparators??`line-info`)===`line-info`,i=n===`wrap`?t.rowCount:void 0;this.cleanupErrorWrapper(),this.applyPreNodeAttributes(e,t);let a=!1,o=[],s=this.hunksRenderer.renderCodeAST(`unified`,t),c=this.hunksRenderer.renderCodeAST(`deletions`,t),l=this.hunksRenderer.renderCodeAST(`additions`,t);this.editor?.__captureFocusForDOMReplacement(),s==null?c!=null||l!=null?(c==null?(this.codeDeletions?.remove(),this.codeDeletions=void 0):(a=this.codeDeletions==null||this.codeUnified!=null,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions=g_({code:this.codeDeletions,columnType:`deletions`,rowSpan:i,containerSize:r}),this.applyCodeColumnsInPlace(this.codeDeletions,c,t.rowCount)||(this.codeDeletions.innerHTML=this.hunksRenderer.renderPartialHTML(c)),o.push(this.codeDeletions)),l==null?(this.codeAdditions?.remove(),this.codeAdditions=void 0):(a=a||this.codeAdditions==null||this.codeUnified!=null,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeAdditions=g_({code:this.codeAdditions,columnType:`additions`,rowSpan:i,containerSize:r}),this.applyCodeColumnsInPlace(this.codeAdditions,l,t.rowCount)||(this.codeAdditions.innerHTML=this.hunksRenderer.renderPartialHTML(l)),o.push(this.codeAdditions))):(this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0):(a=this.codeUnified==null||this.codeAdditions!=null||this.codeDeletions!=null,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0,this.codeUnified=g_({code:this.codeUnified,columnType:`unified`,rowSpan:i,containerSize:r}),this.applyCodeColumnsInPlace(this.codeUnified,s,t.rowCount)||(this.codeUnified.innerHTML=this.hunksRenderer.renderPartialHTML(s)),o.push(this.codeUnified)),o.length===0?e.textContent=``:a&&e.replaceChildren(...o),this.lastRowCount=t.rowCount}applyPartialRender({previousRenderRange:e,renderRange:t}){let{pre:n,codeUnified:r,codeAdditions:i,codeDeletions:a,options:{diffStyle:o=`split`}}=this;if(n==null||e==null||t==null||!Number.isFinite(e.totalLines)||!Number.isFinite(t.totalLines)||this.lastRowCount==null)return!1;let s=this.getCodeColumns(o,r,a,i);if(s==null)return!1;let c=e.startingLine,l=t.startingLine,u=c+e.totalLines,d=l+t.totalLines,f=Math.max(c,l),p=Math.min(u,d);if(p<=f)return!1;let m=Math.max(0,f-c),h=Math.max(0,u-p),g=this.trimColumns({columns:s,trimStart:m,trimEnd:h,previousStart:c,overlapStart:f,overlapEnd:p,diffStyle:o});if(g<0)throw Error(`FileDiff.applyPartialRender: failed to trim to overlap`);if(this.lastRowCount<g)throw Error(`FileDiff.applyPartialRender: trimmed beyond DOM row count`);let _=this.lastRowCount-g,v=(e,t)=>{if(!(t<=0||this.fileDiff==null))return this.hunksRenderer.renderDiff(this.fileDiff,{startingLine:e,totalLines:t,bufferBefore:0,bufferAfter:0})},y=v(l,Math.max(f-l,0));if(y==null&&l<f)return!1;let b=v(p,Math.max(d-p,0));if(b==null&&d>p)return!1;let x=(e,t)=>{if(e!=null){if(o===`unified`&&!Array.isArray(s))this.insertPartialHTML(o,s,e,t);else if(o===`split`&&Array.isArray(s))this.insertPartialHTML(o,s,e,t);else throw Error(`FileDiff.applyPartialRender.applyChunk: invalid chunk application`);_+=e.rowCount}};return this.cleanupErrorWrapper(),x(y,`afterbegin`),x(b,`beforeend`),this.lastRowCount!==_&&(this.applyRowSpan(o,s,_),this.lastRowCount=_),!0}insertPartialHTML(e,t,n,r){if(e===`unified`&&!Array.isArray(t)){let e=this.hunksRenderer.renderCodeAST(`unified`,n);this.renderPartialColumn(t,e,r)}else if(e===`split`&&Array.isArray(t)){let e=this.hunksRenderer.renderCodeAST(`deletions`,n),i=this.hunksRenderer.renderCodeAST(`additions`,n);this.renderPartialColumn(t[0],e,r),this.renderPartialColumn(t[1],i,r)}else throw Error(`FileDiff.insertPartialHTML: Invalid argument composition`)}refreshSplitDiffView(){if(this.options.diffStyle!==`split`)return;let e=this.hunksRenderer.renderDiff(this.fileDiff,this.renderRange);if(e==null)return;let t=this.getCodeColumns(`split`,this.codeUnified,this.codeDeletions,this.codeAdditions);if(!Array.isArray(t))return;let n=(t,n)=>{if(n==null)return;let r=this.hunksRenderer.renderCodeAST(t,e),i=Ry(r?.[0]),a=Ry(r?.[1]);for(let[e,t]of[[n.gutter,i],[n.content,a]])if(t!=null&&e.childElementCount===t.length)for(let n=0;n<t.length;n++){let r=e.children[n],i=t[n].properties[`data-line-type`];i!=null&&r.dataset.lineType!==i&&(r.dataset.lineType=i)}};n(`deletions`,t[0]),n(`additions`,t[1])}refreshUnifiedDiffView(){if(this.options.diffStyle!==`unified`)return;let e=this.hunksRenderer.renderDiff(this.fileDiff,this.renderRange);if(e==null)return;let t=this.getCodeColumns(`unified`,this.codeUnified,this.codeDeletions,this.codeAdditions);if(t==null||Array.isArray(t))return;let n=this.hunksRenderer.renderCodeAST(`unified`,e),r=Ry(n?.[0]),i=Ry(n?.[1]),a=()=>{for(let[e,n]of[[t.gutter,r],[t.content,i]])n!=null&&(e.innerHTML=Io(n));e.rowCount!==this.lastRowCount&&(this.applyRowSpan(`unified`,t,e.rowCount),this.lastRowCount=e.rowCount)};this.shouldGuardRebuildScroll()?x_(this.pre,a):a(),this.renderSeparators(e.hunkData),this.managersDirty=!0,this.flushManagers(),this.syncRenderViewToEditor()}renderPartialColumn(e,t,n){if(e==null||t==null)return;let r=Ry(t[0]),i=Ry(t[1]);if(r==null||i==null)throw Error(`FileDiff.insertPartialHTML: Unexpected AST structure`);let a=i.at(0);n===`beforeend`&&a?.type===`element`&&typeof a.properties[`data-buffer-size`]==`number`&&this.mergeBuffersIfNecessary(a.properties[`data-buffer-size`],e.content.children[e.content.children.length-1],e.gutter.children[e.gutter.children.length-1],r,i,!0);let o=i.at(-1);n===`afterbegin`&&o?.type===`element`&&typeof o.properties[`data-buffer-size`]==`number`&&this.mergeBuffersIfNecessary(o.properties[`data-buffer-size`],e.content.children[0],e.gutter.children[0],r,i,!1),e.gutter.insertAdjacentHTML(n,this.hunksRenderer.renderPartialHTML(r)),e.content.insertAdjacentHTML(n,this.hunksRenderer.renderPartialHTML(i))}mergeBuffersIfNecessary(e,t,n,r,i,a){if(!(t instanceof HTMLElement)||!(n instanceof HTMLElement))return;let o=this.getBufferSize(t.dataset);o!=null&&(a?(r.shift(),i.shift()):(r.pop(),i.pop()),this.updateBufferSize(t,o+e),this.updateBufferSize(n,o+e))}applyRowSpan(e,t,n){let r=e=>{e!=null&&(e.gutter.style.setProperty(`grid-row`,`span ${n}`),e.content.style.setProperty(`grid-row`,`span ${n}`))};if(e===`unified`&&!Array.isArray(t))r(t);else if(e===`split`&&Array.isArray(t))r(t[0]),r(t[1]);else throw Error(`dun fuuuuked up`)}trimColumnRows(e,t,n){let r=0,i=0,a=0,o=!1,s=n>=0;if(e==null)return 0;let c=Array.from(e.content.children),l=Array.from(e.gutter.children);if(c.length!==l.length)throw Error(`FileDiff.trimColumnRows: columns do not match`);for(;a<c.length&&!(t<=0&&!s&&!o);){let e=l[a],u=c[a];if(a++,!(e instanceof HTMLElement)||!(u instanceof HTMLElement))throw console.error({gutterElement:e,contentElement:u}),Error(`FileDiff.trimColumnRows: invalid row elements`);if(o&&(o=!1,e.dataset.gutterBuffer===`annotation`&&`lineAnnotation`in u.dataset||e.dataset.gutterBuffer===`metadata`&&`noNewline`in u.dataset)){e.remove(),u.remove(),i++;continue}if(`lineIndex`in e.dataset&&`lineIndex`in u.dataset){(t>0||s&&r>=n)&&(e.remove(),u.remove(),t>0&&(t--,t===0&&(o=!0)),i++),r++;continue}if(`separator`in e.dataset&&`separator`in u.dataset){(t>0||s&&r>=n)&&(e.remove(),u.remove(),i++);continue}if(e.dataset.gutterBuffer===`annotation`&&`lineAnnotation`in u.dataset){(t>0||s&&r>=n)&&(e.remove(),u.remove(),i++);continue}if(e.dataset.gutterBuffer===`metadata`&&`noNewline`in u.dataset){(t>0||s&&r>=n)&&(e.remove(),u.remove(),i++);continue}if(e.dataset.gutterBuffer===`buffer`&&`contentBuffer`in u.dataset){let a=this.getBufferSize(u.dataset);if(a==null)throw Error(`FileDiff.trimColumnRows: invalid element`);if(t>0){let n=Math.min(t,a),r=a-n;r>0?(this.updateBufferSize(e,r),this.updateBufferSize(u,r),i+=n):(e.remove(),u.remove(),i+=a),t-=n,t===0&&r===0&&(o=!0)}else if(s){let t=r,o=r+a-1;if(n<=t)e.remove(),u.remove(),i+=a;else if(n<=o){let t=o-n+1,r=a-t;this.updateBufferSize(e,r),this.updateBufferSize(u,r),i+=t}}r+=a;continue}throw console.error({gutterElement:e,contentElement:u}),Error(`FileDiff.trimColumnRows: unknown row elements`)}return i}trimColumns({columns:e,diffStyle:t,overlapEnd:n,overlapStart:r,previousStart:i,trimEnd:a,trimStart:o}){let s=Math.max(0,r-i),c=n-i;if(c<0)throw Error(`FileDiff.trimColumns: overlap ends before previous`);let l=o>0,u=a>0;if(!l&&!u)return 0;let d=l?s:0,f=u?c:-1;if(t===`unified`&&!Array.isArray(e))return this.trimColumnRows(e,d,f);if(t===`split`&&Array.isArray(e)){let t=this.trimColumnRows(e[0],d,f),n=this.trimColumnRows(e[1],d,f);if(e[0]!=null&&e[1]!=null&&t!==n)throw Error(`FileDiff.trimColumns: split columns out of sync`);return e[0]==null?n:t}throw console.error({diffStyle:t,columns:e}),Error(`FileDiff.trimColumns: Invalid columns for diffType`)}getBufferSize(e){let t=Number.parseInt(e?.bufferSize??``,10);return Number.isNaN(t)?void 0:t}updateBufferSize(e,t){e.dataset.bufferSize=`${t}`,e.style.setProperty(`grid-row`,`span ${t}`),e.style.setProperty(`min-height`,`calc(${t} * 1lh)`)}getColumnPair(e){if(e==null)return;let t=e.children[0],n=e.children[1];if(!(!(t instanceof HTMLElement)||!(n instanceof HTMLElement)||t.dataset.gutter==null||n.dataset.content==null))return{gutter:t,content:n}}getCodeColumns(e,t,n,r){if(e===`unified`)return this.getColumnPair(t);{let e=this.getColumnPair(n),t=this.getColumnPair(r);return e!=null||t!=null?[e,t]:void 0}}updateBuffers(e){this.pre!=null&&this.applyBuffers(this.pre,e)}applyBuffers(e,t){if(t==null||this.shouldDisableVirtualizationBuffers()){this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),this.bufferAfter!=null&&(this.bufferAfter.remove(),this.bufferAfter=void 0);return}t.bufferBefore>0?(this.bufferBefore??(this.bufferBefore=document.createElement(`div`),this.bufferBefore.dataset.virtualizerBuffer=`before`,e.before(this.bufferBefore)),this.bufferBefore.style.setProperty(`height`,`${t.bufferBefore}px`),this.bufferBefore.style.setProperty(`contain`,`strict`)):this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),t.bufferAfter>0?(this.bufferAfter??(this.bufferAfter=document.createElement(`div`),this.bufferAfter.dataset.virtualizerBuffer=`after`,e.after(this.bufferAfter)),this.bufferAfter.style.setProperty(`height`,`${t.bufferAfter}px`),this.bufferAfter.style.setProperty(`contain`,`strict`)):this.bufferAfter!=null&&(this.bufferAfter.remove(),this.bufferAfter=void 0)}shouldDisableVirtualizationBuffers(){return this.options.disableVirtualizationBuffers??!1}applyPreNodeAttributes(e,{additionsContentAST:t,deletionsContentAST:n,totalLines:r},i){let{diffIndicators:a=`bars`,disableBackground:o=!1,disableLineNumbers:s=!1,overflow:c=`scroll`,diffStyle:l=`split`}=this.options,u={type:`diff`,diffIndicators:a,disableBackground:o,disableLineNumbers:s,overflow:c,split:l!==`unified`&&t!=null&&n!=null,totalLines:r,customProperties:i};e_(u,this.appliedPreAttributes)||(v_(e,u),this.appliedPreAttributes=u)}applyErrorToDOM(e,t){this.cleanupErrorWrapper(),this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0;let n=t.shadowRoot??t.attachShadow({mode:`open`});this.errorWrapper??=document.createElement(`div`),this.errorWrapper.dataset.errorWrapper=``,this.errorWrapper.textContent=``,n.appendChild(this.errorWrapper);let r=document.createElement(`div`);r.dataset.errorMessage=``,r.innerText=e.message,this.errorWrapper.appendChild(r);let i=document.createElement(`pre`);i.dataset.errorStack=``,i.innerText=e.stack??`No Error Stack`,this.errorWrapper.appendChild(i)}cleanupErrorWrapper(){this.errorWrapper?.remove(),this.errorWrapper=void 0}};function Ny(e,t){return e==null||t==null?e==null&&t==null:Oi(e,t)}function Py({fileDiff:e,oldFile:t,newFile:n}){return e!=null&&e.hunks.length>0||t!=null||n!=null}function Fy({fileDiff:e,oldFile:t,newFile:n}){return e!=null||t!=null||n!=null}function Iy(e,t,n=!1){return!n&&e==null&&t}function Ly(e,t,n=!1){return e==null&&t&&!n}function Ry(e){if(e!=null&&e.type===`element`)return e.children??[]}function zy(e){let t=[];for(let n of e){let e=ps.get(n);if(e==null)throw Error(`getResolvedLanguages: ${n} is not resolved. Please resolve languages before calling getResolvedLanguages`);t.push(e)}return t}function By(e){for(let t of Array.isArray(e)?e:[e])if(!ps.has(t))return!1;return!0}async function Vy(e){let t=[],n=[];for(let r of e){if(r===`text`||r===`ansi`)continue;let e=rh(r)??nh(r);`then`in e?n.push(e):t.push(e)}return n.length>0&&await Promise.all(n).then(e=>{for(let n of e){if(n==null)throw Error(`resolvedLanguages: unable to resolve language`);t.push(n)}}),t}function Hy(e){return hh.getResolvedThemes(e)}async function Uy(e){for(let t of e)Lh(t);let t=await hh.resolveThemes(e);for(let n=0;n<e.length;n++)Rh(e[n],t[n]);return t}var Wy=40,Gy;function Ky(e){return e.length>=200?null:[...new Set(e.map(e=>e.key))]}function qy(e,t){let n=t.trim();if(!n)return[];if(Gy&&Gy.files===e&&Gy.query===n)return Gy.hits;let r=Xy(e,n);return Gy={files:e,query:n,hits:r},r}var Jy=new WeakMap;function Yy(e){let t=Jy.get(e);return t||(t={visible:Qy(e.old,e.new),newLines:e.new==null?null:e.new.split(`
1534
- `),oldLines:e.old==null?null:e.old.split(`
1535
- `)},Jy.set(e,t)),t}function Xy(e,t){let n=/[A-Z]/.test(t),r=n?t:t.toLowerCase(),i=!/[^\x00-\x7f]/.test(r),a=[];for(let t of e){if(a.length>=200)break;let e=a.length;if(i){let e=n?t.old||``:(t.old||``).toLowerCase(),i=n?t.new||``:(t.new||``).toLowerCase();if(!e.includes(r)&&!i.includes(r)){Zy(t.path,r,n)&&a.push({key:t.key,path:t.path,repo:t.repo,line:0,side:null,preview:t.path});continue}}let{visible:o,newLines:s,oldLines:c}=Yy(t),l=new Set;$y(t,s,`additions`,r,n,l,a,o.additions),$y(t,c,`deletions`,r,n,l,a,o.deletions),a.length===e&&Zy(t.path,r,n)&&a.push({key:t.key,path:t.path,repo:t.repo,line:0,side:null,preview:t.path})}return a}function Zy(e,t,n){let r=n?e:e.toLowerCase();if(!r.includes(t))return!1;let i=e.lastIndexOf(`/`),a=i>=0?e.slice(i+1):e,o=a.lastIndexOf(`.`);if(o<=0)return!0;let s=a.slice(o+1);if(!(n?s:s.toLowerCase()).includes(t))return!0;let c=e.length-s.length;for(let e=r.indexOf(t);e!==-1;e=r.indexOf(t,e+1))if(e<c)return!0;return!1}function Qy(e,t){let n=new Set,r=new Set;if(e==null&&t==null)return{additions:n,deletions:r};try{let i=Ei(e==null?null:{name:`old`,contents:e},t==null?null:{name:`new`,contents:t});for(let e of i.hunks){for(let t=0;t<e.additionCount;t++)n.add(e.additionStart+t);for(let t=0;t<e.deletionCount;t++)r.add(e.deletionStart+t)}}catch{}return{additions:n,deletions:r}}function $y(e,t,n,r,i,a,o,s){if(!t||o.length>=200||!s.size)return;let c=0;for(let l=0;l<t.length;l++){if(o.length>=200||c>=Wy)return;let u=l+1;if(!s.has(u))continue;let d=t[l],f=(i?d:d.toLowerCase()).indexOf(r);f<0||n===`deletions`&&a.has(d)||(n===`additions`&&a.add(d),c++,o.push({key:e.key,path:e.path,repo:e.repo,line:u,side:n,preview:eb(d,f,r.length)}))}}function eb(e,t,n){let r=Math.max(0,t-36),i=Math.min(e.length,t+n+36);return(r>0?`…`:``)+e.slice(r,i)+(i<e.length?`…`:``)}var tb=((e,t,n)=>`<div><input type=search enterkeyhint=search autocomplete=off placeholder="Find in review" aria-label="Find in review"><span> </span><button type=button title="Previous match">${e}</button><button type=button title="Next match">${t}</button><button type=button title="Close find">${n}</button></div>`)(je,Oe,tt),nb=((e,t,n)=>` D b D l D/${e}&l D/${t}&l D/${n}&m`)(yt,nt,lt),rb=N(`i8`,e=>{e.ad=!!e.y,e.w&&(e.w.focus=e.ar)}),ib=t(54,rb,3),ab=N(`i7`,e=>Te(e,{onMount:function(){let t=new AbortController;return document.addEventListener(`keydown`,t=>{if(!e.ad)return;if(t.key===`Escape`){if(document.querySelector(`dialog[open]`)||t.target instanceof HTMLTextAreaElement)return;t.preventDefault(),e.aq();return}let n=t.metaKey||t.ctrlKey;(t.key===`F3`||n&&t.key.toLowerCase()===`g`)&&(t.preventDefault(),e.ap(t.shiftKey?-1:1))},{signal:t.signal}),e.ai=e.x,e.aj=!!e.y,e.y&&e.ar(),{abort:t}},onUpdate:function(){e.x!==e.ai&&(e.ai=e.x,e.y&&e.ar()),e.y&&!e.aj?(e.aj=!0,e.ar()):!e.y&&e.aj&&(e.aj=!1,e.ag&&=(clearTimeout(e.ag),0),It(``,null),Sb(e,{query:``,hit:null,keys:[]}))},onDestroy:function(){e.ag&&clearTimeout(e.ag),this.abort.abort(),It(``,null),Sb(e,{query:``,hit:null,keys:[]})}})),ob=t(55,ab,8),sb=t(37,e=>A(e.d,e.y&&(e.a0||``).trim()?e.a7?`${e.aa+1}/${e.a7}`:`0/0`:``),3),cb=t(34,e=>{k(e.e,`disabled`,!e.a7||!e.y),k(e.g,`disabled`,!e.a7||!e.y)}),lb=Se(24,e=>{w(e.a,[`_gB`,!e.y&&`_gA`]),k(e.a,`aria-hidden`,e.y?`false`:`true`),k(e.b,`tabindex`,e.y?0:-1),k(e.e,`tabindex`,e.y?0:-1),k(e.g,`tabindex`,e.y?0:-1),k(e.i,`tabindex`,e.y?0:-1),ib(e),ob(e),sb(e),cb(e)}),ub=t(14,e=>lb(e,e.m,e.n)),db=_(12,ub),fb=_(13,ub),pb=(e,t)=>Rb(e,t?.length),mb=t(28,e=>pb(e,qy(e.v,e.a0||``))),hb=_(51,ob),gb=t(48,e=>hb(e,Jb(e)),4),_b=t(50,e=>p(e,`b`,e.a0||``,Yb(e))),vb=Se(26,e=>{mb(e),gb(e),_b(e),sb(e)}),yb=t(17,e=>vb(e,e.p,e.q)),bb=_(15,yb),xb=_(16,yb),Sb=Se(29),Cb=t(20,e=>Sb(e,e.s,e.t)),wb=_(18,Cb),Tb=_(19,Cb),Eb=_(36,e=>{gb(e),sb(e)}),Db=t(35,e=>Eb(e,e.a7?Math.min(e.a5,e.a7-1):-1)),Ob=_(49,_b),kb=t(47,e=>Ob(e,Xb(e)),3),Ab=_(46,e=>{kb(e),gb(e)}),jb=t(40,e=>Ab(e,Zb(e)),2),Mb=D(31,e=>{Db(e),jb(e)}),Nb=(e,t)=>Hb(e,t.open),Pb=(e,t)=>{Ub(e,t.timer),Wb(e,t.tick),Gb(e,t.wasOpen)},Fb=_(53,e=>{ib(e),ob(e)}),Ib=N(`i6`,e=>{y(e,`b`),T(e.b,`keydown`,function(t){if(e.y){if(t.key===`Escape`){t.preventDefault(),e.aq();return}t.key===`Enter`&&(t.preventDefault(),e.ap(t.shiftKey?-1:1))}}),T(e.e,`mousedown`,function(e){e.preventDefault()}),T(e.e,`click`,function(){e.ap(-1)}),T(e.g,`mousedown`,function(e){e.preventDefault()}),T(e.g,`click`,function(){e.ap(1)}),T(e.i,`mousedown`,function(e){e.preventDefault()}),T(e.i,`click`,function(){e.aq()})});function Lb(t){w(t.b,Ne),w(t.c,`_gE`),w(t.e,ut),xt(t.f),ht(t.f,14),Ee(t.f),w(t.g,ut),We(t.h),ct(t.h,14),et(t.h),w(t.i,ut),ft(t.j),Le(t.j,14),e(t.j),Mb(t,0),Nb(t,{open:!1}),Pb(t,{timer:0,tick:0,wasOpen:!1}),Fb(t,Qb(t)),Ib(t)}var Rb=_(33,e=>{Db(e),sb(e),cb(e)}),zb=_(21,e=>{mb(e),jb(e),kb(e)}),Bb=_(52,ob),Vb=t(43,e=>Bb(e,$b(e))),Hb=_(39,e=>{jb(e),kb(e),gb(e),Vb(e),ib(e),ob(e)}),Ub=_(42,e=>{kb(e),gb(e),Vb(e),ob(e)}),Wb=_(44,ob),Gb=_(45,ob),Kb=_(22,ib),qb=_(23,ob),Jb=e=>t=>{e.ad&&(e.ag&&=(clearTimeout(e.ag),0),e.ak(e.a0||``,(e.aa<0?0:e.aa)+t))},Yb=e=>function(t){e.an(t)},Xb=e=>t=>{if(!e.ad)return;vb(e,t),Mb(e,0);let n=qy(e.v,t);It(t,n[0]??null,Ky(n)??void 0),e.ag&&clearTimeout(e.ag),e.ag=setTimeout(()=>{e.ag=0,e.ak(t,0)},80)},Zb=e=>(t,n)=>{if(!e.ad)return;let r=qy(e.v,t),i=[...new Set(r.map(e=>e.key))];if(!r.length){Mb(e,0),It(t,null,i),Sb(e,{query:t,hit:null,keys:i});return}Mb(e,(n%r.length+r.length)%r.length);let a=r[e.a5];It(t,a,Ky(r)??void 0),Sb(e,{query:t,hit:a,keys:i})},Qb=e=>()=>{let t=e.b;t&&(t.focus(),t.select(),document.activeElement!==t&&setTimeout(()=>{t.focus(),t.select()},0))},$b=e=>()=>{lb(e,!1),e.ad=!1,e.ag&&=(clearTimeout(e.ag),0),It(``,null),Sb(e,{query:``,hit:null,keys:[]})};O(`i3`,Jb),O(`i0`,Yb),O(`i2`,Xb),O(`i1`,Zb),O(`i5`,Qb),O(`i4`,$b);function ex(e){let t=e.replace(/^origin\//,``);return tx(t.includes(`/`)?t.slice(t.lastIndexOf(`/`)+1):t)}function tx(e){return e.replace(/-[a-z0-9]{1,6}$/i,``)||e}function nx(e,t){if(!t)return``;let n=e.replace(/^origin\//,``),r=t.replace(/^origin\//,``);return n.startsWith(`${r}-`)?n.slice(r.length+1):``}function rx(e){let t=tx(e);if(t.length<=20)return t;let n=t.split(`-`);return n.length>1?n[n.length-1]:t}function ix(e,t,n=``,r=``){let i=(e||`base`).replace(/^origin\//,``),a=(t||`HEAD`).replace(/^origin\//,``),o=(n||``).replace(/^origin\//,``),s=!!o&&(a===o||a.startsWith(`${o}-`));return{base:i,head:s?r||ex(o):rx(a),topic:s?nx(a,o):``,title:a===i?i:`${a} vs ${i}`}}function ax(e,t=``,n=``){let r=e.replace(/^origin\//,``);if(!r||r===`HEAD`)return r||`HEAD`;let i=t.replace(/^origin\//,``);if(i&&(r===i||r.startsWith(`${i}-`))){let e=n||ex(i),t=nx(r,i);return t?`${e} [${t}]`:e}return rx(r)}var ox=`_hy _w`,sx=`_hE _v`,cx=`_hV __`,lx=dt,ux=(e=>`/${e}&`)(Pe);function dx(e){Ae(e.a,`M6 9L12 15L18 9`)}var fx=(e,t)=>it(e.a,t),px=(e,t)=>Ke(e.a,t),mx=dt,hx=(e=>`/${e}&`)(Pe);function gx(e){Ae(e.a,`M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 13.8214 2.48697 15.5291 3.33782 17L2.5 21.5L7 20.6622C8.47087 21.513 10.1786 22 12 22Z`)}var _x=(e,t)=>it(e.a,t),vx=(e,t)=>Ke(e.a,t),yx=dt,bx=(e=>`/${e}&`)(Pe);function xx(e){Ae(e.a,`M18 2L6 2 M18 22L6 22 M12 5V10M12 10L15 7M12 10L9 7 M12 19V14M12 14L15 17M12 14L9 17`)}var Sx=(e,t)=>it(e.a,t),Cx=(e,t)=>Ke(e.a,t),wx=dt,Tx=(e=>`/${e}&`)(Pe);function Ex(e){Ae(e.a,`M18 2L6 2 M18 22L6 22 M12 14V19M12 19L15 16M12 19L9 16 M12 10V5M12 5L15 8M12 5L9 8`)}var Dx=(e,t)=>it(e.a,t),Ox=(e,t)=>Ke(e.a,t),kx=rt(Ge(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?r(e):typeof define==`function`&&define.amd?define([`exports`],r):r((n||=self).lru_map=n.lru_map||{})})(e,function(e){let t=Symbol(`newer`),n=Symbol(`older`);class r{constructor(e,t){typeof e!=`number`&&(t=e,e=0),this.size=0,this.limit=e,this.oldest=this.newest=void 0,this._keymap=new Map,t&&(this.assign(t),e<1&&(this.limit=this.size))}_markEntryAsUsed(e){e!==this.newest&&(e[t]&&(e===this.oldest&&(this.oldest=e[t]),e[t][n]=e[n]),e[n]&&(e[n][t]=e[t]),e[t]=void 0,e[n]=this.newest,this.newest&&(this.newest[t]=e),this.newest=e)}assign(e){let r,a=this.limit||Number.MAX_VALUE;this._keymap.clear();let o=e[Symbol.iterator]();for(let e=o.next();!e.done;e=o.next()){let o=new i(e.value[0],e.value[1]);if(this._keymap.set(o.key,o),r?(r[t]=o,o[n]=r):this.oldest=o,r=o,a--==0)throw Error(`overflow`)}this.newest=r,this.size=this._keymap.size}get(e){var t=this._keymap.get(e);return t?(this._markEntryAsUsed(t),t.value):void 0}set(e,r){var a=this._keymap.get(e);return a?(a.value=r,this._markEntryAsUsed(a),this):(this._keymap.set(e,a=new i(e,r)),this.newest?(this.newest[t]=a,a[n]=this.newest):this.oldest=a,this.newest=a,++this.size,this.size>this.limit&&this.shift(),this)}shift(){var e=this.oldest;if(e)return this.oldest[t]?(this.oldest=this.oldest[t],this.oldest[n]=void 0):(this.oldest=void 0,this.newest=void 0),e[t]=e[n]=void 0,this._keymap.delete(e.key),--this.size,[e.key,e.value]}find(e){let t=this._keymap.get(e);return t?t.value:void 0}has(e){return this._keymap.has(e)}delete(e){var r=this._keymap.get(e);return r?(this._keymap.delete(r.key),r[t]&&r[n]?(r[n][t]=r[t],r[t][n]=r[n]):r[t]?(r[t][n]=void 0,this.oldest=r[t]):r[n]?(r[n][t]=void 0,this.newest=r[n]):this.oldest=this.newest=void 0,this.size--,r.value):void 0}clear(){this.oldest=this.newest=void 0,this.size=0,this._keymap.clear()}keys(){return new o(this.oldest)}values(){return new s(this.oldest)}entries(){return this}[Symbol.iterator](){return new a(this.oldest)}forEach(e,n){typeof n!=`object`&&(n=this);let r=this.oldest;for(;r;)e.call(n,r.value,r.key,this),r=r[t]}toJSON(){for(var e=Array(this.size),n=0,r=this.oldest;r;)e[n++]={key:r.key,value:r.value},r=r[t];return e}toString(){for(var e=``,n=this.oldest;n;)e+=String(n.key)+`:`+n.value,n=n[t],n&&(e+=` < `);return e}}e.LRUMap=r;function i(e,r){this.key=e,this.value=r,this[t]=void 0,this[n]=void 0}function a(e){this.entry=e}a.prototype[Symbol.iterator]=function(){return this},a.prototype.next=function(){let e=this.entry;return e?(this.entry=e[t],{done:!1,value:[e.key,e.value]}):{done:!0,value:void 0}};function o(e){this.entry=e}o.prototype[Symbol.iterator]=function(){return this},o.prototype.next=function(){let e=this.entry;return e?(this.entry=e[t],{done:!1,value:e.key}):{done:!0,value:void 0}};function s(e){this.entry=e}s.prototype[Symbol.iterator]=function(){return this},s.prototype.next=function(){let e=this.entry;return e?(this.entry=e[t],{done:!1,value:e.value}):{done:!0,value:void 0}}})}))(),1),Ax=Symbol(`IGNORE_RESPONSE`),jx=class extends Error{constructor(){super(`WorkerPoolManager: operation canceled because the pool terminated`)}},Mx=class extends Error{constructor(){super(`WorkerPoolManager: operation canceled before the task completed`)}},Nx=class{options;highlighter;preferredHighlighter;renderOptions;renderOptionsRequestVersion=0;renderOptionsVersion=0;initialized=!1;workers=[];queuedTasks=[];queuedTaskByInstance=new Map;taskByHighlightKey=new Map;activeTaskById=new Map;activeRequestByInstance=new Map;nextRequestId=0;themeSubscribers=new Set;workersFailed=!1;statSubscribers=new Set;fileCache;diffCache;_queuedBroadcast;lifecycleGeneration=0;constructor(e,{langs:t,theme:n=nr,useTokenTransformer:r=!1,lineDiffType:i=`word-alt`,maxLineDiffLength:a=1e3,tokenizeMaxLineLength:o=1e3,preferredHighlighter:s=`shiki-js`}){this.options=e,this.preferredHighlighter=s,this.renderOptions={theme:n,useTokenTransformer:r,lineDiffType:i,maxLineDiffLength:a,tokenizeMaxLineLength:o},this.fileCache=new kx.default.LRUMap(e.totalASTLRUCacheSize??100),this.diffCache=new kx.default.LRUMap(e.totalASTLRUCacheSize??100),this.queueInitialization(t)}isWorkingPool(){return!this.workersFailed}getFileResultCache(e){return e.cacheKey==null?void 0:this.fileCache.get(e.cacheKey)}getDiffResultCache(e){return e.cacheKey==null?void 0:this.diffCache.get(e.cacheKey)}inspectCaches(){let{fileCache:e,diffCache:t}=this;return{fileCache:e,diffCache:t}}evictFileFromCache(e){try{return this.fileCache.delete(e)!==void 0}finally{this.queueBroadcastStateChanges()}}evictDiffFromCache(e){try{return this.diffCache.delete(e)!==void 0}finally{this.queueBroadcastStateChanges()}}async setRenderOptions({theme:e=this.renderOptions.theme??nr,useTokenTransformer:t=this.renderOptions.useTokenTransformer??!1,lineDiffType:n=this.renderOptions.lineDiffType??`word-alt`,maxLineDiffLength:r=this.renderOptions.maxLineDiffLength??1e3,tokenizeMaxLineLength:i=this.renderOptions.tokenizeMaxLineLength??1e3}){let{lifecycleGeneration:a}=this,o=++this.renderOptionsRequestVersion,s=()=>this.isCurrentLifecycle(a)&&this.renderOptionsRequestVersion===o;try{let a={theme:e,useTokenTransformer:t,lineDiffType:n,maxLineDiffLength:r,tokenizeMaxLineLength:i};if(this.isInitialized()||await this.initialize(),!s()||z_(a,this.renderOptions))return;let o=Gh(e),c=[];if(gr(a.theme,this.renderOptions.theme)||(c=qh(o)?Hy(o):await Uy(o)),!s())return;if(this.highlighter!=null)gh(c,this.highlighter);else{let e=await Hh({themes:o,langs:[`text`],preferredHighlighter:this.preferredHighlighter});if(!s())return;this.highlighter=e}let l=this.setRenderOptionsOnWorkers(a,c);this.renderOptions=a,this.renderOptionsVersion++,this.diffCache.clear(),this.fileCache.clear(),this.invalidateRenderTasks();for(let e of this.themeSubscribers)e.onThemeChange();await l}catch(e){if(e instanceof jx||!s())return;throw e}}getPreferredHighlighter(){return this.preferredHighlighter}getFileRenderOptions(){let{tokenizeMaxLineLength:e,theme:t,useTokenTransformer:n}=this.renderOptions;return{theme:t,useTokenTransformer:n,tokenizeMaxLineLength:e}}getDiffRenderOptions(){return{...this.renderOptions}}async setRenderOptionsOnWorkers(e,t){if(this.workersFailed)return;this.isInitialized()||await this.initialize();let n=[];for(let r of this.workers){if(!r.initialized)throw console.log({managedWorker:r}),Error(`setRenderOptionsOnWorkers: Somehow we have an uninitialized worker`);n.push(new Promise((n,i)=>{let a=this.generateRequestId(),o={type:`set-render-options`,id:a,request:{type:`set-render-options`,id:a,renderOptions:e,resolvedThemes:t},resolve:n,reject:i,requestStart:Date.now()};this.activeTaskById.set(a,o),r.pendingSetupRequestId=a,r.worker.postMessage(o.request)}))}await Promise.all(n)}subscribeToThemeChanges(e){return this.themeSubscribers.add(e),this.queueBroadcastStateChanges(),()=>{this.unsubscribeToThemeChanges(e),this.queueBroadcastStateChanges()}}unsubscribeToThemeChanges(e){this.themeSubscribers.delete(e),this.queueBroadcastStateChanges()}subscribeToStatChanges(e){return this.statSubscribers.add(e),e(this.getStats()),()=>{this.statSubscribers.delete(e)}}queueBroadcastStateChanges(){this._queuedBroadcast??=requestAnimationFrame(this._broadcastStateChanges)}_broadcastStateChanges=()=>{this._queuedBroadcast!=null&&(cancelAnimationFrame(this._queuedBroadcast),this._queuedBroadcast=void 0);let e=this.getStats();for(let t of this.statSubscribers)t(e)};cleanUpTasks(e){this.detachInstanceFromQueuedTasks(e);let t=this.activeRequestByInstance.get(e);if(t!=null){let n=this.activeTaskById.get(t);Ix(n)?(this.detachInstanceFromRenderTask(n,e),!n.primeCache&&n.instances.size===0&&this.removeActiveTask(n)):this.activeTaskById.delete(t)}this.activeRequestByInstance.delete(e),this.queueBroadcastStateChanges()}isInitialized(){return this.initialized===!0}async initialize(e=[]){if(this.initialized!==!0){if(this.initialized===!1){let{lifecycleGeneration:t}=this;this.initialized=new Promise((n,r)=>{(async()=>{try{let r=Gh(this.renderOptions.theme),i=[];if(i=qh(r)?Hy(r):await Uy(r),!this.isCurrentLifecycle(t)){n();return}let a=[];if(a=By(e)?zy(e):await Vy(e),!this.isCurrentLifecycle(t)){n();return}let[o]=await Promise.all([Hh({themes:r,langs:[`text`,...e],preferredHighlighter:this.preferredHighlighter}),this.initializeWorkers(i,a)]);if(!this.isCurrentLifecycle(t)){this.terminateWorkers(),n();return}this.highlighter=o,this.initialized=!0,this.diffCache.clear(),this.fileCache.clear(),this.drainQueue(),this.queueBroadcastStateChanges(),n()}catch(e){if(e instanceof jx||!this.isCurrentLifecycle(t)){n();return}this.initialized=!1,this.workersFailed=!0;for(let t of this.queuedTasks)this.rejectRenderTaskCallbacks(t,Rx(e));this.queueBroadcastStateChanges(),r(e)}})()}),this.queueBroadcastStateChanges()}else return this.initialized}}async initializeWorkers(e,t){this.workersFailed=!1;let n=[],r=sg(),i=r>0?cg():void 0;this.workers.length>0&&this.terminateWorkers();for(let a=0;a<(this.options.poolSize??8);a++){let a=this.options.workerFactory(),o={worker:a,requestId:void 0,pendingSetupRequestId:void 0,initialized:!1,langs:new Set([`text`,...t.map(({name:e})=>e)]),customExtensionsVersion:0};a.addEventListener(`message`,e=>{this.handleWorkerMessage(o,e.data)}),a.addEventListener(`error`,e=>console.error(`Worker error:`,e,o)),this.workers.push(o),n.push(new Promise((n,a)=>{let s=this.generateRequestId(),c={type:`initialize`,id:s,request:{type:`initialize`,id:s,renderOptions:this.renderOptions,preferredHighlighter:this.preferredHighlighter,resolvedThemes:e,resolvedLanguages:t,customExtensionsVersion:i==null?void 0:r,customExtensionMap:i},resolve(){o.initialized=!0,n()},reject:a,requestStart:Date.now()};this.activeTaskById.set(s,c),this.executeTask(o,c)}))}await Promise.all(n)}drainQueue=()=>{if(this._queuedDrain=void 0,this.initialized===!0&&this.queuedTasks.length!==0){for(let e=0;e<this.queuedTasks.length;){let t=this.queuedTasks[e];if(this.hasActiveRequest(t)){e++;continue}let n=Fx(t),r=this.getAvailableWorker(n);if(r==null)break;this.queuedTasks.splice(e,1),this.assignWorkerToTask(t,r),this.resolveLanguagesAndExecuteTask(r,t,n)}this.queueBroadcastStateChanges()}};highlightFileAST(e,t){let n=this.getFileResultCache(t);Qg(t)||n!=null&&Jh(n.options,this.getFileRenderOptions())||this.hasMatchingFileInstanceTask(e,t)||this.submitTask(e,{type:`file`,file:t})}primeFileHighlightCache(e){if(!this.isWorkingPool())return Promise.reject(Error(`WorkerPoolManager.primeFileHighlightCache: worker pool is not working`));let t=this.getOrCreateFileHighlightCacheTask(e);return t==null?Promise.resolve():this.createRenderTaskCallbacks(t)}getOrCreateFileHighlightCacheTask(e){if(e.cacheKey==null){console.warn(`WorkerPoolManager.primeFileHighlightCache: priming highlight cache requires file.cacheKey; skipping "${e.name}".`);return}let t=this.getFileResultCache(e),n=this.getFileHighlightKey(e);if(n==null||Qg(e)||t!=null&&Jh(t.options,this.getFileRenderOptions()))return;let r=this.getTaskByHighlightKey(n);if(r!=null)return r.primeCache=!0,r.type===`file`?r:void 0;{let t=this.submitCacheTask({type:`file`,file:e},n);return t.type===`file`?t:void 0}}getPlainFileAST(e,t,n,r){if(this.highlighter==null){this.queueInitialization();return}return Kg(e,this.highlighter,this.renderOptions,{forcePlainText:!0,startingLine:t,totalLines:n,lines:r})}highlightDiffAST(e,t){let n=this.getDiffResultCache(t);oy(t)||n!=null&&z_(n.options,this.getDiffRenderOptions())||this.hasMatchingDiffInstanceTask(e,t)||this.submitTask(e,{type:`diff`,diff:t})}primeDiffHighlightCache(e){if(!this.isWorkingPool())return Promise.reject(Error(`WorkerPoolManager.primeDiffHighlightCache: worker pool is not working`));let t=this.getOrCreateDiffHighlightCacheTask(e);return t==null?Promise.resolve():this.createRenderTaskCallbacks(t)}getOrCreateDiffHighlightCacheTask(e){if(e.cacheKey==null){console.warn(`WorkerPoolManager.primeDiffHighlightCache: priming highlight cache requires diff.cacheKey; skipping "${e.prevName??e.name}" -> "${e.name}".`);return}let t=this.getDiffResultCache(e),n=this.getDiffHighlightKey(e);if(n==null||oy(e)||t!=null&&z_(t.options,this.getDiffRenderOptions()))return;let r=this.getTaskByHighlightKey(n);if(r!=null)return r.primeCache=!0,r.type===`diff`?r:void 0;{let t=this.submitCacheTask({type:`diff`,diff:e},n);return t.type===`diff`?t:void 0}}getPlainDiffAST(e,t,n,r,i){return this.highlighter==null?void 0:uv(e,this.highlighter,this.renderOptions,{forcePlainText:!0,startingLine:t,totalLines:n,expandedHunks:r,collapsedContextThreshold:i})}terminate(){this.lifecycleGeneration++,this.cancelActiveWorkerTasks(),this.terminateWorkers();let e=new jx;for(let t of this.queuedTasks)this.rejectRenderTaskCallbacks(t,e);this.fileCache.clear(),this.diffCache.clear(),this.activeRequestByInstance.clear(),this.queuedTasks.length=0,this.queuedTaskByInstance.clear(),this.taskByHighlightKey.clear(),this.activeTaskById.clear(),this.highlighter=void 0,this.initialized=!1,this.workersFailed=!1,this.queueBroadcastStateChanges()}isCurrentLifecycle(e){return this.lifecycleGeneration===e}queueInitialization(e){this.initialize(e).catch(e=>{console.error(e)})}cancelActiveWorkerTasks(){let e=new jx;for(let t of this.activeTaskById.values())`reject`in t?t.reject(e):Ix(t)&&this.rejectRenderTaskCallbacks(t,e)}terminateWorkers(){for(let e of this.workers)e.worker.terminate();this.workers.length=0}getStats(){return{managerState:this.initialized===!1?`waiting`:this.initialized===!0?`initialized`:`initializing`,totalWorkers:this.workers.length,workersFailed:this.workersFailed,busyWorkers:this.workers.filter(e=>e.requestId!=null||e.pendingSetupRequestId!=null).length,queuedTasks:this.queuedTasks.length,activeTasks:this.activeTaskById.size,themeSubscribers:this.themeSubscribers.size,fileCacheSize:this.fileCache.size,diffCacheSize:this.diffCache.size}}submitTask(e,t){this.initialized===!1&&this.queueInitialization();let n=this.getHighlightKeyForRequest(t),r=n==null?void 0:this.getTaskByHighlightKey(n);if(r!=null){this.detachInstanceFromQueuedTasks(e,r),this.addInstanceToTask(r,e),this.queueBroadcastStateChanges();return}this.detachInstanceFromQueuedTasks(e);let i=this.generateRequestId(),a=Date.now(),{renderOptionsVersion:o}=this,s=(()=>{switch(t.type){case`file`:return{type:`file`,id:i,request:{...t,id:i},instances:new Set([e]),primeCache:!1,highlightKey:n,callbacks:new Set,renderOptionsVersion:o,requestStart:a};case`diff`:return{type:`diff`,id:i,request:{...t,id:i},instances:new Set([e]),primeCache:!1,highlightKey:n,callbacks:new Set,renderOptionsVersion:o,requestStart:a}}})();this.enqueueRenderTask(s,e)}submitCacheTask(e,t){this.initialized===!1&&this.queueInitialization();let n=this.generateRequestId(),r=Date.now(),{renderOptionsVersion:i}=this,a=(()=>{switch(e.type){case`file`:return{type:`file`,id:n,request:{...e,id:n},instances:new Set,primeCache:!0,highlightKey:t,callbacks:new Set,renderOptionsVersion:i,requestStart:r};case`diff`:return{type:`diff`,id:n,request:{...e,id:n},instances:new Set,primeCache:!0,highlightKey:t,callbacks:new Set,renderOptionsVersion:i,requestStart:r}}})();return this.enqueueRenderTask(a),a}enqueueRenderTask(e,t){this.queuedTasks.push(e),t!=null&&this.queuedTaskByInstance.set(t,e),e.highlightKey!=null&&this.taskByHighlightKey.set(e.highlightKey,e),this.queueDrain()}async resolveLanguagesAndExecuteTask(e,t,n){try{let r=n.filter(t=>!e.langs.has(t));if(r.length>0&&(By(r)?t.request.resolvedLanguages=zy(r):t.request.resolvedLanguages=await Vy(r)),!this.activeTaskById.has(t.id)){e.requestId===t.id&&(this.cleanWorkerAndTask(e,t),this.queueBroadcastStateChanges(),this.queuedTasks.length>0&&this.queueDrain());return}this.executeTask(e,t)}catch(n){this.rejectRenderTaskCallbacks(t,Rx(n)),this.cleanWorkerAndTask(e,t),this.queueBroadcastStateChanges(),this.queuedTasks.length>0&&this.queueDrain()}}handleWorkerMessage(e,t){let n=this.activeTaskById.get(t.id);try{if(n==null)throw Ax;if(t.type===`error`){let e=Error(t.error);if(t.stack&&(e.stack=t.stack),`reject`in n)n.reject(e);else if(Ix(n))this.notifyHighlightError(n,e),this.rejectRenderTaskCallbacks(n,e);else throw Error(`handleWorkerMessage: unknown task type`);throw e}switch(t.requestType){case`initialize`:if(n.type!==`initialize`)throw Error(`handleWorkerMessage: task/response dont match`);this.syncCustomExtensionVersion(e,n.request),n.resolve();break;case`set-render-options`:if(n.type!==`set-render-options`)throw Error(`handleWorkerMessage: task/response dont match`);n.resolve();break;case`file`:{if(n.type!==`file`)throw Error(`handleWorkerMessage: task/response dont match`);let{result:r,options:i}=t;if(!this.isCurrentRenderTask(n)||!Jh(i,this.getFileRenderOptions()))throw Ax;let{request:a}=n;this.syncCustomExtensionVersion(e,a),n.cacheKeyAtDispatch!=null&&this.fileCache.set(n.cacheKeyAtDispatch,{result:r,options:i}),this.resolveRenderTaskCallbacks(n),this.notifyFileInstances(n,r,i);break}case`diff`:{if(n.type!==`diff`)throw Error(`handleWorkerMessage: task/response dont match`);let{result:r,options:i}=t;if(!this.isCurrentRenderTask(n)||!z_(i,this.getDiffRenderOptions()))throw Ax;let{request:a}=n;this.syncCustomExtensionVersion(e,a),n.cacheKeyAtDispatch!=null&&this.diffCache.set(n.cacheKeyAtDispatch,{result:r,options:i}),this.resolveRenderTaskCallbacks(n),this.notifyDiffInstances(n,r,i);break}}}catch(e){e!==Ax&&console.error(e,n,t)}this.cleanWorkerAndTask(e,n,t.id),this.queueBroadcastStateChanges(),this.queuedTasks.length>0&&this.queueDrain()}_queuedDrain;queueDrain(){this._queuedDrain??(this._queuedDrain=Promise.resolve().then(this.drainQueue),this.queueBroadcastStateChanges())}assignWorkerToTask(e,t){t.requestId=e.id,Ix(e)&&(this.clearQueuedInstanceRequests(e),this.trackInstanceRequests(e)),this.activeTaskById.set(e.id,e)}cleanWorkerAndTask(e,t,n=t?.id){e.requestId===n&&(e.requestId=void 0),e.pendingSetupRequestId===n&&(e.pendingSetupRequestId=void 0),t!=null&&(Ix(t)&&(this.rejectRenderTaskCallbacks(t,new Mx),this.clearInstanceRequests(t),this.clearHighlightKey(t)),this.activeTaskById.delete(t.id))}executeTask(e,t){Px(t.request)&&this.maybeAttachCustomExtensions(e,t.request),this.activeTaskById.has(t.id)||this.assignWorkerToTask(t,e);for(let n of Fx(t))e.langs.add(n);try{t.type===`file`?t.cacheKeyAtDispatch=t.request.file.cacheKey:t.type===`diff`&&(t.cacheKeyAtDispatch=t.request.diff.cacheKey),e.worker.postMessage(t.request)}catch(n){console.error(`Failed to post message to worker:`,n),Ix(t)?(this.notifyHighlightError(t,n),this.rejectRenderTaskCallbacks(t,Rx(n))):`reject`in t&&t.reject(n),this.cleanWorkerAndTask(e,t),this.queuedTasks.length>0&&this.queueDrain()}this.queueBroadcastStateChanges()}maybeAttachCustomExtensions(e,t){if(t.customExtensionsVersion!=null)return;let n=sg();e.customExtensionsVersion>=n||(t.customExtensionsVersion=n,t.customExtensionMap=cg())}syncCustomExtensionVersion(e,t){t.customExtensionsVersion!=null&&(e.customExtensionsVersion=t.customExtensionsVersion)}getAvailableWorker(e){let t;for(let n of this.workers){if(n.requestId!=null||n.pendingSetupRequestId!=null||!n.initialized)continue;if(t=n,e.length===0)break;let r=!0;for(let t of e)if(!n.langs.has(t)){r=!1;break}if(r)break}return t}getFileHighlightKey(e){if(e.cacheKey!=null)return`file:${e.cacheKey}:${this.renderOptionsVersion}`}getDiffHighlightKey(e){if(e.cacheKey!=null)return`diff:${e.cacheKey}:${this.renderOptionsVersion}`}getHighlightKeyForRequest(e){switch(e.type){case`file`:return this.getFileHighlightKey(e.file);case`diff`:return this.getDiffHighlightKey(e.diff)}}hasActiveRequest(e){for(let t of Lx(e))if(this.activeRequestByInstance.has(t))return!0;return!1}addInstanceToTask(e,t){e.type,e.instances.add(t),this.activeTaskById.has(e.id)?this.activeRequestByInstance.set(t,e.id):this.queuedTaskByInstance.set(t,e)}detachInstanceFromQueuedTasks(e,t){let n=this.queuedTaskByInstance.get(e);n!=null&&n!==t&&(this.queuedTaskByInstance.delete(e),this.detachInstanceFromRenderTask(n,e),!n.primeCache&&n.instances.size===0&&this.removeQueuedTask(n))}detachInstanceFromRenderTask(e,t){e.type,e.instances.delete(t)}removeQueuedTask(e){let t=this.queuedTasks.indexOf(e);t!==-1&&this.queuedTasks.splice(t,1),this.rejectRenderTaskCallbacks(e,new Mx),this.clearQueuedInstanceRequests(e),this.clearHighlightKey(e)}removeActiveTask(e){this.rejectRenderTaskCallbacks(e,new Mx),this.clearInstanceRequests(e),this.clearHighlightKey(e),this.activeTaskById.delete(e.id)}createRenderTaskCallbacks(e){return new Promise((t,n)=>{e.callbacks.add({resolve:t,reject:n})})}resolveRenderTaskCallbacks(e){for(let t of e.callbacks)t.resolve();e.callbacks.clear()}rejectRenderTaskCallbacks(e,t){for(let n of e.callbacks)n.reject(t);e.callbacks.clear()}invalidateRenderTasks(){for(let e=this.queuedTasks.length-1;e>=0;e--){let t=this.queuedTasks[e];t.renderOptionsVersion!==this.renderOptionsVersion&&this.removeQueuedTask(t)}for(let e of Array.from(this.activeTaskById.values()))Ix(e)&&e.renderOptionsVersion!==this.renderOptionsVersion&&this.removeActiveTask(e)}clearQueuedInstanceRequests(e){for(let t of Lx(e))this.queuedTaskByInstance.get(t)===e&&this.queuedTaskByInstance.delete(t)}clearHighlightKey(e){e.highlightKey!=null&&this.taskByHighlightKey.get(e.highlightKey)===e&&this.taskByHighlightKey.delete(e.highlightKey)}trackInstanceRequests(e){for(let t of Lx(e))this.activeRequestByInstance.set(t,e.id)}clearInstanceRequests(e){for(let t of Lx(e))this.activeRequestByInstance.get(t)===e.id&&this.activeRequestByInstance.delete(t)}notifyFileInstances(e,t,n){for(let r of e.instances)this.activeRequestByInstance.get(r)===e.id&&r.onHighlightSuccess(e.request.file,t,n)}notifyDiffInstances(e,t,n){for(let r of e.instances)this.activeRequestByInstance.get(r)===e.id&&r.onHighlightSuccess(e.request.diff,t,n)}notifyHighlightError(e,t){for(let n of Lx(e))this.activeRequestByInstance.get(n)===e.id&&n.onHighlightError(t)}hasMatchingFileInstanceTask(e,t){for(let n of this.iterateRenderTasks())if(n.type===`file`&&this.isCurrentRenderTask(n)&&n.instances.has(e)&&Oi(t,n.request.file))return!0;return!1}hasMatchingDiffInstanceTask(e,t){for(let n of this.iterateRenderTasks())if(n.type===`diff`&&this.isCurrentRenderTask(n)&&n.instances.has(e)&&E_(n.request.diff,t))return!0;return!1}getTaskByHighlightKey(e){let t=this.taskByHighlightKey.get(e);return t!=null&&this.isCurrentRenderTask(t)?t:void 0}isCurrentRenderTask(e){return e.renderOptionsVersion===this.renderOptionsVersion}*iterateRenderTasks(){for(let e of this.queuedTasks)yield e;for(let e of this.activeTaskById.values())Ix(e)&&(yield e)}generateRequestId(){return`req_${++this.nextRequestId}`}};function Px(e){return e.type===`initialize`||e.type===`file`||e.type===`diff`}function Fx(e){let t=new Set;if(e.type===`initialize`||e.type===`set-render-options`)return[];switch(e.type){case`file`:t.add(e.request.file.lang??og(e.request.file.name));break;case`diff`:t.add(e.request.diff.lang??og(e.request.diff.name)),t.add(e.request.diff.lang??og(e.request.diff.prevName??`-`))}return t.delete(`text`),Array.from(t)}function Ix(e){return e?.type===`file`||e?.type===`diff`}function Lx(e){return e.instances}function Rx(e){return e instanceof Error?e:Error(String(e))}var zx;function Bx({poolOptions:e,highlighterOptions:t}){return zx??=new Nx(e,t),zx}var Vx=`/assets/worker-hTZla-j_.js`,Hx;function Ux(){return Hx??=Bx({poolOptions:{workerFactory:()=>new Worker(Vx,{type:`module`}),poolSize:Math.min(2,navigator.hardwareConcurrency||2)},highlighterOptions:{theme:{dark:`pierre-dark`,light:`pierre-light`}}})}function Wx(e,t){let n=3735928559,r=1103547991;for(let e=0;e<t.length;e++){let i=t.charCodeAt(e);n=Math.imul(n^i,2654435761),r=Math.imul(r^i,1597334677)}return n=Math.imul(n^n>>>16,2246822507)^Math.imul(r^r>>>13,3266489909),r=Math.imul(r^r>>>16,2246822507)^Math.imul(n^n>>>13,3266489909),`${e}@${(r>>>0).toString(36)}${(n>>>0).toString(36)}:${t.length}`}function Gx(e,t){let n=null,r=()=>{if(!n||t.aborted)return;let i=e().closest(`[data-diff-main]`);if(i){let t=i.getBoundingClientRect(),r=0;if(n.y>=t.bottom-110?r=Math.max(4,Math.min(20,(n.y-(t.bottom-110))/3)):n.y<=t.top+110&&(r=-Math.max(4,Math.min(20,(t.top+110-n.y)/3))),r){i.scrollTop+=r;let a=e().getBoundingClientRect(),o=Math.max(t.top+12,a.top+48),s=Math.min(t.bottom-12,a.bottom-48),c=Math.max(o,Math.min(n.y,s));document.dispatchEvent(new PointerEvent(`pointermove`,{clientX:n.x,clientY:c,pointerId:n.pointerId,pointerType:`touch`,bubbles:!0,composed:!0}))}}requestAnimationFrame(r)};e().addEventListener(`pointerdown`,e=>{e.pointerType!==`mouse`&&e.composedPath().some(e=>e instanceof HTMLElement&&e.hasAttribute?.(`data-column-number`))&&(n={pointerId:e.pointerId,x:e.clientX,y:e.clientY},requestAnimationFrame(r))},{capture:!0,signal:t}),document.addEventListener(`pointermove`,e=>{n&&e.pointerId===n.pointerId&&e.isTrusted&&(n.x=e.clientX,n.y=e.clientY)},{capture:!0,passive:!0,signal:t});for(let e of[`pointerup`,`pointercancel`])document.addEventListener(e,e=>{n&&e.pointerId===n.pointerId&&(n=null)},{capture:!0,signal:t})}var Kx=`<div></div>`,qx=`background:var(--panel);border-block:1px solid var(--border);padding:.5rem .75rem;font-family:system-ui,sans-serif;font-size:.85rem;display:flex;flex-direction:column;gap:.35rem;`,Jx=`display:flex;flex-wrap:wrap;gap:.4rem;align-items:center;`,Yx=[`_o`,mt,`_p`,`_X`,`_L`,$e.warn,`_gx`,`_gy`,`_gz`],Xx=null;function Zx(e,t){let n=e||[],r=t||[];return n.length===r.length&&n.every((e,t)=>e===r[t]||e.id===r[t].id&&e.text===r[t].text)}function Qx(e,t){let n=e||[],r=t||[];return n.length===r.length&&n.every((e,t)=>e===r[t]||e.id===r[t].id&&e.agent===r[t].agent&&e.title===r[t].title)}function $x(){if(Xx)return Xx;let e=new CSSStyleSheet,t=Yx.flatMap(e=>e.split(/\s+/)).filter(Boolean).map(e=>`.${e}`),n=[],r=e=>t.some(t=>RegExp(`${t.replace(/[.$]/g,`\\$&`)}(?![\\w-])`).test(e));for(let e of document.styleSheets){let t;try{t=e.cssRules}catch{continue}for(let e of t){let t=e.selectorText;t&&r(t)&&n.push(e.cssText)}}return n.unshift(`button, select { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; } textarea { font: inherit; font-family: system-ui, sans-serif; color: inherit; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.45rem 0.6rem; } textarea:focus-visible, select:focus-visible, button:focus-visible { outline: 1px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: -1px; }`),e.replaceSync(n.join(`
1536
- `)),Xx=e,e}var eS=new CSSStyleSheet;eS.replaceSync(`:host { display: block; max-width: 100%; overflow-x: auto; } @media (pointer: coarse) { pre[data-diff] { touch-action: pan-x pan-y; } [data-column-number], [data-gutter-utility-slot] { touch-action: none !important; } }`+jt);var tS=be(`h0`,0),nS=(e,t)=>w(e.a,[`_it`,t]),rS=N(`h1`,e=>Te(e,{file:e.e,comments:e.f,draft:e.g,sessions:e.h,wholeFile:e.i,onMount:function(){let t=()=>e.h||[],n=()=>{let e=t();if(e.length<=1)return null;let n=document.createElement(`select`);n.setAttribute(`aria-label`,`Send to session`),n.className=`_gz`;for(let t of e){let e=document.createElement(`option`);e.value=t.id,e.textContent=t.title||t.agent,n.append(e)}return n},r=e=>e?.value||t()[0]?.id||null,i=(e,t,n)=>{for(let r of e)r.disabled=t,n&&r.dataset.role===`send`&&(r.textContent=t?`Sending…`:n)},a=(e,n,r)=>{let i=t()[0];if(!n)return e.className=`_o ${r?mt:``} _p`,e.textContent=`Send`,i&&(e.title=`Send to ${i.title||i.agent}`),e;let a=document.createElement(`span`);return a.className=`_gx`,r&&(a.style.cssText=`font-size:.75rem;`),e.className=`_p _gy`,e.textContent=`Send to`,a.append(e,n),a},o=t=>{if(t.snippet==null)return null;let n=t.side===`deletions`?e.e.old:e.e.new;if(n==null||rn(n,t.line_start,t.line_end,t.side)===t.snippet)return null;let r=document.createElement(`span`);return r.className=`_L ${$e.warn}`,r.textContent=`changed since`,r.title=`The file changed here after this comment was written; the agent gets the lines as they were.`,r},s=s=>{if(!s)return;let c=document.createElement(`div`);c.style.cssText=qx;let l=document.createElement(`div`),u=document.createElement(`div`);u.style.cssText=Jx;let d=()=>{l.replaceChildren(),u.replaceChildren();let c=document.createElement(`p`);c.textContent=s.text,c.style.cssText=`margin:0;white-space:pre-wrap;`;let d=document.createElement(`button`);d.type=`button`,d.textContent=`Remove`,d.className=`_o ${mt}`,d.onclick=()=>e.j?.(s.id);let p=document.createElement(`button`);p.type=`button`,p.textContent=`Edit`,p.className=`_o ${mt}`,p.hidden=!e.k,p.onclick=()=>f();let m=t().length>0&&!!e.l,h=document.createElement(`button`);h.type=`button`,h.dataset.role=`send`,h.textContent=`Send`,h.hidden=!m;let g=m?n():null,_=g?`Send to`:h.textContent;h.onclick=()=>{(async()=>{let t=r(g);if(!(!t||h.disabled)){i([d,p,h],!0,_);try{await e.l?.(s.id,t)}finally{i([d,p,h],!1,_)}}})()},u.append(p,d),m&&u.append(a(h,g,!0));let v=o(s);v&&u.append(v),l.append(c)},f=()=>{l.replaceChildren(),u.replaceChildren();let t=document.createElement(`textarea`);t.value=s.text,t.rows=3,t.className=`_X`,t.style.cssText=`resize:vertical;`+(Ve()?`font-size:16px;`:``);let n=document.createElement(`button`);n.type=`button`,n.textContent=`Save`,n.className=`_o _p`;let r=document.createElement(`button`);r.type=`button`,r.textContent=`Cancel`,r.className=`_o`;let a=()=>{let a=t.value.trim();if(!a||a===s.text){d();return}(async()=>{i([n,r],!0,`Save`);try{await e.k?.(s.id,a),s.text=a,d()}catch{i([n,r],!1,`Save`)}})()};n.onclick=a,r.onclick=()=>d(),t.onkeydown=e=>{e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),a()),e.key===`Escape`&&(e.preventDefault(),d())},u.append(n,r),l.append(t),setTimeout(()=>{t.focus(),t.setSelectionRange(t.value.length,t.value.length)},0)};return d(),c.append(l,u),c},c=()=>{let o=document.createElement(`div`);o.style.cssText=`background:var(--panel);border-block:1px solid var(--border);padding:.5rem .75rem;font-family:system-ui,sans-serif;font-size:.85rem;display:flex;flex-direction:column;gap:.35rem;scroll-margin:4rem 0 1.5rem;`;let s=document.createElement(`textarea`);s.placeholder=`Add a comment…`,s.rows=3,s.className=`_X`,s.style.cssText=`resize:vertical;`+(Ve()?`font-size:16px;`:``);let c=document.createElement(`button`);c.type=`button`,c.textContent=`Add`,c.className=`_o`;let l=document.createElement(`button`);l.type=`button`,l.dataset.role=`send`,l.textContent=`Send`;let u=document.createElement(`button`);u.type=`button`,u.textContent=`Cancel`,u.className=`_o`;let d=t().length>0&&!!e.m;l.hidden=!d;let f=d?n():null,p=d?a(l,f,!1):l,m=l.textContent;c.onclick=()=>{s.value.trim()&&e.n?.(s.value)},l.onclick=()=>{(async()=>{let t=s.value.trim(),n=r(f);if(!(!t||!n||l.disabled)){i([c,l,u],!0,m);try{await e.m?.(t,n)}finally{i([c,l,u],!1,m)}}})()},u.onclick=()=>e.o?.(),s.onkeydown=e=>{e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),d?l.onclick():c.onclick()),e.key===`Escape`&&u.onclick()};let h=document.createElement(`div`);h.style.cssText=Jx,h.append(c),d&&h.append(p),h.append(u),o.append(s,h);let g=()=>o.scrollIntoView({block:`nearest`,behavior:`smooth`}),_=g;s.addEventListener(`focus`,()=>{let e=window.visualViewport;e&&(e.addEventListener(`resize`,_),s.addEventListener(`blur`,()=>e.removeEventListener(`resize`,_),{once:!0}))});let v=(e=0)=>{if(!s.isConnected||!s.getClientRects().length){e<120&&requestAnimationFrame(()=>v(e+1));return}g(),s.focus({preventScroll:!0})};return setTimeout(v,0),o},l=new Map,u,d={draft:!0},f,p={diffStyle:Ue()?`unified`:`split`,disableFileHeader:!0,expandUnchanged:!!e.i,enableLineSelection:!0,onLineSelectionEnd(t){if(!t)return;let n=t.endSide!=null&&t.endSide!==t.side;e.p?.({side:t.side,start:t.start,end:n?t.start:t.end})},onPostRender(t,n,r){if(r===`unmount`)return;g(),Wt(e.a);let i=f?.querySelector(`textarea`),a=f?.getRootNode();if(i&&a&&`activeElement`in a&&a.activeElement===i){let e=f.getBoundingClientRect();e.height&&(e.top<0||e.bottom>window.innerHeight)&&f.scrollIntoView({block:`nearest`,behavior:`smooth`})}},renderAnnotation(e){let t=e.metadata||{};return t.draft?f??=c():s(t.comment)}},m=new My(p,Ux()),h=()=>{let t=[],n=new Map;for(let r of e.f||[]){let e=l.get(r.id);(!e||e.comment.text!==r.text)&&(e={comment:r}),n.set(r.id,e),t.push({side:r.side,lineNumber:r.line_end,metadata:e})}return l=n,e.g&&(u!==e.g&&(u=e.g,d={draft:!0},f=void 0),t.push({side:e.g.side,lineNumber:e.g.end,metadata:d})),t},g=()=>{let t=e.a.querySelector(`diffs-container`)?.shadowRoot;t&&!t.adoptedStyleSheets.includes(eS)&&(t.adoptedStyleSheets=[...t.adoptedStyleSheets,eS,$x()])},_=()=>{if(e.e.old==null&&e.e.new==null){e.q?.(`could not read ${e.e.path}`);return}let t=m.render({containerWrapper:e.a,oldFile:e.e.old==null?null:{name:e.e.oldPath||e.e.path,contents:e.e.old,cacheKey:Wx(`${e.e.key}:old`,e.e.old)},newFile:e.e.new==null?null:{name:e.e.path,contents:e.e.new,cacheKey:Wx(`${e.e.key}:new`,e.e.new)},lineAnnotations:h()});Promise.resolve(t).then(()=>{g(),Wt(e.a)}).catch(t=>e.q?.(`diff render: ${t}`))};_();let v=new AbortController;return Ve()&&Gx(tS(e),v.signal),{instance:m,render:_,dragAbort:v,unregSearch:Ut(e.a,e.e.key),shownFile:e.e,shownComments:e.f,shownDraft:e.g,shownSessions:e.h,shownWhole:!!e.i,options:p}},onUpdate:function(){!!this.wholeFile!==this.shownWhole&&(this.shownWhole=!!this.wholeFile,this.options.expandUnchanged=this.shownWhole,this.instance.setOptions(this.options),this.instance.rerender()),this.shownDraft&&!this.draft&&this.instance.setSelectedLines(null);let e=this.file,t=this.shownFile;(e.old!==t.old||e.new!==t.new||e.path!==t.path||e.oldPath!==t.oldPath||!Zx(this.comments,this.shownComments)||this.draft!==this.shownDraft||!Qx(this.sessions,this.shownSessions))&&(this.shownFile=this.file,this.shownComments=this.comments,this.shownDraft=this.draft,this.shownSessions=this.sessions,this.render())},onDestroy:function(){this.unregSearch(),this.dragAbort.abort(),this.instance.cleanUp?.()}})),iS=t(17,rS,12),aS=_(4,iS),oS=_(5,iS),sS=_(6,iS),cS=_(7,iS),lS=_(8,iS),uS=_(9,iS),dS=_(10,iS),fS=_(11,iS),pS=_(12,iS),mS=_(13,iS),hS=_(14,iS),gS=_(15,iS),_S=_(16,iS),vS=`<section><div><!><!><span><span> </span><span aria-hidden=true>vs</span><span> </span><!></span><!><!><!><span><span><!> file<!></span><!><!></span></div><!></section>`,yS=` D D%b%b D D l b D l%l%b%b%b E%c%l%b%m%l`,bS=e=>w(e.a,[`_hW`,`_hP`]),xS=e=>w(e.a,[`_hW`,`_hP`]),SS=e=>w(e.a,[`_hW`,`_hP`]),CS=e=>{Ex(e.a),Dx(e.a,12),Ox(e.a)},wS=e=>{xx(e.a),Sx(e.a,12),Cx(e.a)},TS=e=>w(e.a,[`_y`,`_hL`]),ES=x(7,0,e=>A(e.c,e._.a0)),DS=e=>{ES._(e),w(e.a,`_s`),gx(e.b),_x(e.b,12),vx(e.b)},OS=e=>{dx(e.a),fx(e.a,14),px(e.a)},kS=e=>{Je(e.a),ae(e.a,14),c(e.a)},AS=x(10,0,e=>A(e.b,e._.by)),jS=e=>{AS._(e),w(e.a,[`_L`,$e.accent,`_hJ`])},MS=x(17,0,e=>A(e.b,e._.bo)),NS=e=>{MS._(e),PS._(e),w(e.a,`_hA`),w(e.c,`_hB`)},PS=x(17,0,e=>A(e.d,e._.bp)),FS=j(0,yx,(e=>`/${e}&`)(bx),wS,wx,(e=>`/${e}&`)(Tx),CS),IS=t(1,e=>{w(e.a,[ot,`_hX`,{_hY:e._._._.bg.has(e._.m)}]),k(e.a,`title`,e._._._.bg.has(e._.m)?`Show changes only`:`Show whole file`),k(e.a,`aria-label`,e._._._.bg.has(e._.m)?`Show changes only`:`Show whole file`),k(e.a,`aria-pressed`,e._._._.bg.has(e._.m)?`true`:`false`),FS(e,+!e._._._.bg.has(e._.m))}),LS=E(135,IS,e=>e._._._),RS=N(`w12`,e=>T(e.a,`click`,function(t){t.preventDefault(),t.stopPropagation();let n=new Set(e._._._.bg);n.delete(e._.m)||n.add(e._.m),CT(e._._._,n)})),zS=e=>{LS(e),BS._(e),RS(e)},BS=x(8,0,IS),VS=t(2,e=>k(e.a,`title`,`${e._.ax?`#${e._.ax.number}`:e._.b1} is already in ${e._.az}; showing the working tree only`),2),HS=x(12,0,VS),US=e=>{HS._(e),WS._(e),GS._(e),w(e.a,[`_L`,`_hK`])},WS=x(12,0,e=>{A(e.b,e._.az),VS(e)}),GS=x(12,0,VS),KS=x(3,1,e=>A(e.b,Ze(e._.ba))),qS=e=>{KS._(e),w(e.a,sx)},JS=x(3,0,e=>A(e.d,e._.b3)),YS=e=>{JS._(e),XS._(e),ZS._(e),QS._(e),w(e.a,[`_s`,`_t`]),w(e.c,sx)},XS=x(3,0,e=>A(e.b,e._.b7)),ZS=x(3,0,e=>k(e.a,`href`,`${e._.b9}/files`)),QS=x(3,0,e=>k(e.a,`title`,e._.bz)),$S=x(2,1,e=>A(e.b,e._.b6)),eC=e=>{$S._(e),w(e.a,ox)},tC=t(1,e=>sS(e.a,e._._._._.am&&e._._._._.am.key===e._._.m?e._._._._.am:null)),nC=E(113,tC,e=>e._._._._),rC=e=>{nC(e),iC(e),oC(e),cC(e),uC(e),dC(e),fC(e),pC(e),mC(e),hC(e),_C(e),vC(e),yC(e),bC(e),e.a,nS(e.a,`_hP`)},iC=E(114,e=>cS(e.a,e._._._._.an),e=>e._._._._),aC=t(2,e=>gS(e.a,OE(e))),oC=E(115,aC,e=>e._._._._),sC=t(3,e=>mS(e.a,kE(e))),cC=E(116,sC,e=>e._._._._),lC=t(4,e=>pS(e.a,AE(e))),uC=E(117,lC,e=>e._._._._),dC=E(118,e=>hS(e.a,jE(e)),e=>e._._._._),fC=E(119,e=>uS(e.a,ME(e)),e=>e._._._._),pC=E(120,e=>dS(e.a,NE(e)),e=>e._._._._),mC=E(121,e=>fS(e.a,PE(e)),e=>e._._._._),hC=E(122,e=>_S(e.a,FE(e)),e=>e._._._._),gC=t(5,e=>lS(e.a,e._._._._.bg.has(e._._.m))),_C=E(135,gC,e=>e._._._._),vC=E(33,e=>{aS(e.a,e._._.l),aC(e),sC(e),lC(e)},e=>e._._),yC=E(34,e=>{tC(e),gC(e)},e=>e._._),bC=E(35,e=>oS(e.a,e._._.z),e=>e._._),xC=N(`w13`,e=>Te(e,{onMount:function(){e._._._._.v.observeNear(e.a,()=>{jC(e._._,!0)})}})),SC=E(98,xC,e=>e._._._._),CC=j(0,`<div></div>`,` `,e=>{SC(e),w(e.a,`_hR`)},Kx,(e=>`/${e}&`)(` b`),rC),wC=t(1,e=>CC(e,e._.a4||e._.a5?1:0)),TC=x(9,3,wC),EC=e=>{TC._(e),DC._(e)},DC=x(9,3,wC),OC=t(13,e=>k(e.a,`hidden`,!e._._.y.has(e.m))),kC=E(100,OC,e=>e._._),AC=t(32,e=>w(e.a,[`_hN`,(e.a4||e.a5)&&`_hO`,e._._.aj===e.m&&`_hs`]),3),jC=D(30,e=>{AC(e),TC(e)}),MC=N(`w14`,e=>{ce(e,`a`),T(e.a,`toggle`,function(e,t){if(!t.open){let e=t.closest(`[data-diff-main]`);if(e){let n=t.getBoundingClientRect().top-e.getBoundingClientRect().top;n<0&&(e.scrollTop+=n)}}})}),NC=e=>{kC(e),LC(e),WC(e),JC(e),YC(e),XC(e),w(e.b,`_hQ`),w(e.c,`_9`),jC(e,!1),MC(e)},PC=a(bC),FC=_(25,e=>{QC(e,e.z.length),PC(e)}),IC=t(14,e=>FC(e,e._._.ah.get(e.m)||[])),LC=E(108,IC,e=>e._._),RC=t(28,e=>ie(e,`a`,e.a1,IE(e)),2),zC=j(8,`<button type=button></button>`,` `,zS),BC=j(9,`<p>binary file</p>`,` `,SS,`<p>file too large to display</p>`,` `,xS,`<p>file could not be read</p>`,` `,bS,`<!><!><!>`,`b%`,EC),VC=t(29,e=>{zC(e,e.a1&&!e.v&&!e.w&&e.x!=null&&e.y!=null?0:1),BC(e,e.v?0:e.w?1:e.x==null&&e.y==null?2:e.a1?3:4)},4),HC=_(27,e=>{RC(e),VC(e)}),UC=t(15,e=>HC(e,!e._._.ai.has(e.m))),WC=E(109,UC,e=>e._._),GC=_(31,e=>{AC(e),DC(e)}),KC=t(16,e=>GC(e,e._._.aj===e.m)),qC=t(17,e=>w(e.e,[cx,e._._.aj===e.m&&e._._.al<1&&`_ht`]),2),JC=E(110,e=>{KC(e),AC(e),qC(e)},e=>e._._),YC=E(111,RC,e=>e._._),XC=E(112,qC,e=>e._._),ZC=j(7,(e=>`<span>${e} <!></span>`)(mx),(e=>` D/${e}&b%l`)(hx),DS),QC=_(26,e=>{ZC(e,+!e.a0),ES(e)}),$C=a(yC),ew=_(12,e=>{k(e.a,`data-key`,e.m),IC(e),UC(e),KC(e),RC(e),AC(e),OC(e),qC(e),$C(e),BS(e)}),tw=(e,t)=>{k(e.c,`data-status`,t),A(e.d,t)},nw=(e,t)=>{k(e.e,`title`,t),A(e.f,t)},rw=j(6,`<span title="Changed since your last visit"></span>`,` `,TS),iw=(e,t)=>rw(e,+!t),aw=_(21,VC),ow=_(22,VC),sw=_(23,VC),cw=_(24,VC),lw=(e,t)=>dw(e,t[0]),uw=a(vC),dw=_(11,e=>{ew(e,e.l?.key),tw(e,e.l?.status),nw(e,e.l?.path),iw(e,e.l?.changedSince),aw(e,e.l?.binary),ow(e,e.l?.tooLarge),sw(e,e.l?.old),cw(e,e.l?.new),uw(e)}),fw=C(0,`<details><summary><span> </span><span><bdi> </bdi></span><!><!><!></summary><!></details>`,` D D D l E m%b%b%l%`,NC,lw),pw=x(19,0,e=>fw(e,[e._.x,`key`])),mw=e=>{pw._(e),gw._(e),_w._(e),w(e.a,`_hM`)},hw=t(1,e=>k(e.a,`hidden`,e._.a5&&e._.a6)),gw=x(19,0,hw),_w=x(19,0,hw),vw=x(18,0,e=>{w(e.a,[`_hD`,{_hC:e._.ad}]),k(e.a,`aria-pressed`,e._.ad?`true`:`false`),k(e.a,`title`,e._.ad?`Show every file`:`Show only files changed since your last visit`)}),yw=N(`w11`,e=>T(e.a,`click`,function(){e._.ae()})),bw=e=>{vw._(e),xw._(e),yw(e)},xw=x(18,0,e=>A(e.b,e._.br)),Sw=t(3,e=>A(e.b,ax(e._.b1,e._.a1,e._.a2)),2),Cw=x(13,0,Sw),ww=e=>{Cw._(e),Tw._(e),Dw._(e),Ow._(e),kw._(e),Aw._(e),w(e.a,[`_L`,`_hK`])},Tw=x(13,0,Sw),Ew=t(4,e=>k(e.a,`title`,`This view is ${nn(e._.b4)} (${e._.b0}); checked out is ${nn(e._.bf)} (${e._.b1})`),3),Dw=x(13,0,Ew),Ow=x(13,0,e=>{Ew(e),Sw(e)}),kw=x(13,0,Ew),Aw=x(13,0,e=>{A(e.c,nn(e._.bf,7)),Ew(e)}),jw=x(11,0,e=>k(e.a,`disabled`,e._.aa)),Mw=N(`w10`,e=>T(e.a,`click`,function(){e._.ab()})),Nw=e=>{jw._(e),Fw._(e),Iw._(e),Lw._(e),w(e.a,[`_L`,$e.warn,`_hK`]),Mw(e)},Pw=t(3,e=>k(e.a,`title`,`origin/${e._.b0} ${e._.b4} · GitHub ${e._.bc}. Reload to re-ask GitHub`),2),Fw=x(11,0,Pw),Iw=x(11,0,e=>{A(e.b,nn(e._.b4,7)),Pw(e)}),Lw=x(11,0,e=>{A(e.c,nn(e._.bc,7)),Pw(e)}),Rw=j(1,n,(e=>`/${e}&`)(qe),kS,lx,(e=>`/${e}&`)(ux),OS),zw=t(5,e=>k(e.a,`title`,e._.a6?`Show ${e._.bm} files`:`Hide files`)),Bw=t(4,e=>w(e.b,[`_hS`,!e._.a6&&`_hT`,e._.a8&&`_hU`])),Vw=x(2,0,e=>{k(e.a,`aria-expanded`,e._.a6?`false`:`true`),Rw(e,+!e._.a6),zw(e),Bw(e)}),Hw=N(`w9`,e=>T(e.a,`click`,function(){e._.a9()})),Uw=e=>{Vw._(e),Ww._(e),Gw._(e),Kw._(e),w(e.a,`_hx`),w(e.c,ox),Hw(e)},Ww=x(2,0,e=>{k(e.a,`aria-busy`,e._.a8?`true`:`false`),Bw(e)}),Gw=x(2,0,e=>A(e.d,e._.b6)),Kw=x(2,0,zw),qw=(e,t)=>{Xw(e,t?.pr),aT(e,t?.base),oT(e,t?.branch),cT(e,t?.head),lT(e,t?.baseSha),uT(e,t?.worktree),dT(e,t?.id),fT(e,t?.full_name),mT(e,t?.githubDrift),_T(e,t?.contained),vT(e,t?.localHead)},Jw=j(3,`<a target=_blank rel=noopener>#<!></a><span> </span>`,` Db%l D `,YS,`<span> </span>`,` D `,qS),Yw=t(83,e=>k(e.a,`hidden`,!e.bj&&!e.ax&&e.a4!==e.b8),3),Xw=_(59,e=>{$w(e,e.ax?.baseRefName),eT(e,e.ax?.headRefName),tT(e,e.ax?.title),nT(e,e.ax?.number),rT(e,e.ax?.url),iT(e,e.ax?.headRefOid),Jw(e,+!e.ax),Yw(e),HS(e)}),Zw=(e,t)=>{HT(e,t?.title),UT(e,t?.base),WT(e,t?.head),KT(e,t?.topic)},Qw=t(64,e=>Zw(e,ix(e.ay||e.az,e.b0||e.b1,e.a1,e.a2)),5),$w=_(60,Qw),eT=_(62,e=>{Qw(e),Fw(e),Dw(e)}),tT=_(65,JS),nT=_(69,XS),rT=_(71,ZS),iT=_(74,Lw),aT=_(61,e=>{Qw(e),WS(e)}),oT=_(63,e=>{Qw(e),Ow(e),GS(e)}),sT=t(93,e=>k(e.e,`title`,`${e.bu} · ${e.b4.slice(0,7)}…${e.b5.slice(0,7)}`),2),cT=_(66,e=>{sT(e),Iw(e),kw(e)}),lT=_(67,sT),uT=_(68,e=>{Gw(e),$S(e)}),dT=_(70,Yw),fT=_(72,KS),pT=j(11,`<button type=button>behind GitHub <!> → <!></button>`,` Db%c%`,Nw),mT=(e,t)=>pT(e,+!t),hT=j(12,`<span>already in <!></span>`,` Db%`,US),gT=t(76,e=>hT(e,e.bd&&e.a0?0:1)),_T=_(75,gT),vT=_(77,Aw),yT=_(97,QS),bT=e=>{yT(e,e.ax?`${e.ax.title}: ${e.ax.headRefName} ${e.b4} vs ${e.az} ${e.b5}`:``)},xT=e=>{k(e.a,`data-pr`,e.ax?`${e.b6}/${e.ax.number}`:void 0)},ST=_(22,e=>{qw(e,e.w),bT(e),xT(e)}),CT=D(78,a(_C,LS));function wT(e){w(e.a,`_hu`),w(e.e,`_hF`),w(e.f,[`_L`,`_hG`]),w(e.h,[`_N`,`_hI`]),w(e.i,[`_L`,`_hH`]),w(e.o,`_hz`),CT(e,new Set)}var TT=(e,t)=>{BT(e,t?.additions),VT(e,t?.deletions)},ET=(e,t)=>{kT(e,t?.length),TT(e,(()=>{let e=0,n=0;for(let r of t)e+=r.additions||0,n+=r.deletions||0;return{additions:e,deletions:n}})())},DT=_(84,e=>{A(e.p,e.bm),A(e.q,e.bm===1?``:`s`),Kw(e)}),OT=t(82,e=>DT(e,e.bj||e.a0)),kT=_(81,e=>{OT(e),Yw(e)}),AT=t(25,e=>ET(e,e.x.filter(t=>e.y.has(t.key)))),jT=j(18,`<button type=button><!> new</button>`,` D%`,bw),MT=t(90,e=>jT(e,e.br||e.ad?0:1)),NT=_(89,e=>{MT(e),xw(e)}),PT=_(23,e=>{LT(e,e.x?.length),NT(e,e.x.filter(e=>e.changedSince).length),AT(e),pw(e)}),FT=a(kC),IT=_(24,e=>{AT(e),FT(e)}),LT=_(26,e=>{OT(e),gT(e)}),RT=j(17,`<span>+<!></span><span>−<!></span>`,` Db%l Db%`,NS),zT=t(88,e=>RT(e,e.bo||e.bp?0:1)),BT=_(86,e=>{zT(e),MS(e)}),VT=_(87,e=>{zT(e),PS(e)}),HT=_(92,sT),UT=(e,t)=>A(e.g,t),WT=(e,t)=>A(e.j,t),GT=j(10,`<span> </span>`,` D `,jS),KT=_(96,e=>{GT(e,+!e.by),AS(e)}),qT=_(27,e=>{Qw(e),Cw(e)}),JT=_(28,e=>{Qw(e),Tw(e)}),YT=_(30,Yw),XT=t(33,e=>w(e.b,[`_hv`,{_hw:e.a5&&e.a6}])),ZT=j(2,`<button type=button><span aria-hidden=true></span><span> </span></button>`,` D b D `,Uw,`<span> </span>`,` D `,eC),QT=j(19,`<div></div>`,` `,mw),$T=t(42,e=>QT(e,!e.a5||!e.a6||e.af?0:1),2),eE=_(31,e=>{ZT(e,+!e.a5),XT(e),$T(e),gw(e)}),tE=_(32,e=>{XT(e),$T(e),Vw(e),_w(e)}),nE=j(13,`<span>local <!><!></span>`,` Db%b%`,ww),rE=(e,t)=>nE(e,+!t),iE=_(39,e=>{MT(e),vw(e)}),aE=_(41,$T),oE=a(SC),sE=_(21,e=>{ST(e,e.v.repo),PT(e,e.v.files),IT(e,e.v.shownKeys),qT(e,e.v.workspaceBranch),JT(e,e.v.workspaceName),YT(e,e.v.findHit?.repo),cE(e,e.v.findHit?.key),lE(e,e.v.findHit?.line),eE(e,e.v.collapsible),tE(e,e.v.collapsed),uE(e,e.v.expanding),dE(e,e.v.onToggle),fE(e,e.v.loading),pE(e,e.v.onReload),rE(e,e.v.localDiffers),iE(e,e.v.onlyNew),mE(e,e.v.onToggleNew),aE(e,e.v.opened),hE(e,e.v.commentsByFile),gE(e,e.v.collapsedFiles),_E(e,e.v.onFileToggle),vE(e,e.v.draft),yE(e,e.v.sessions),bE(e,e.v.onSelect),xE(e,e.v.onSaveComment),SE(e,e.v.onSendDraft),CE(e,e.v.onCancelDraft),wE(e,e.v.onDeleteComment),TE(e,e.v.onEditComment),EE(e,e.v.onSendComment),DE(e,e.v.onError),oE(e)}),cE=_(45,a(JC)),lE=_(47,a(XC)),uE=_(34,Ww),dE=_(35),fE=_(36,jw),pE=_(37),mE=_(40),hE=_(43,a(LC)),gE=_(44,a(WC)),_E=_(46,a(YC)),vE=_(48,a(nC)),yE=_(49,a(iC)),bE=_(50,a(oC)),xE=_(51,a(cC)),SE=_(52,a(uC)),CE=_(53,a(dC)),wE=_(54,a(fC)),TE=_(55,a(pC)),EE=_(56,a(mC)),DE=_(57,a(hC)),OE=e=>function(t){e._._._._.ao(e._._.l,t)},kE=e=>function(t){e._._._._.ap(e._._.l,t)},AE=e=>function(t,n){e._._._._.aq(e._._.l,t,n)},jE=e=>function(){e._._._._.ar()},ME=e=>function(t){e._._._._.as(t)},NE=e=>function(t,n){e._._._._.at(t,n)},PE=e=>function(t,n){e._._._._.au(t,n)},FE=e=>function(t){e._._._._.av(t)},IE=e=>function(t){e._._.ak(e.m,t)};O(`w1`,OE),O(`w2`,kE),O(`w3`,AE),O(`w4`,jE),O(`w5`,ME),O(`w6`,NE),O(`w7`,PE),O(`w8`,FE),O(`w0`,IE);var LE=`_iv _l`,RE=`<div><input type=search placeholder="Filter files…" aria-label="Filter files"></div>`,zE=` D l`,BE=t(18,e=>p(e,`b`,e.l,nD(e))),VE=_(11,BE),HE=t(10,e=>VE(e,(e.j??e.h)||``)),UE=_(17,BE),WE=t(16,e=>UE(e,rD(e))),GE=_(15,WE),KE=t(14,e=>GE(e,iD(e)),2),qE=Se(7,e=>{HE(e),KE(e)}),JE=t(6,e=>qE(e,e.e,e.f)),YE=_(4,JE),XE=_(5,JE),ZE=D(9,e=>{HE(e),KE(e)}),QE=(e,t)=>tD(e,t.timer),$E=N(`n3`,e=>{y(e,`b`),T(e.b,`keydown`,function(t){t.key===`Enter`&&e.p(),t.key===`Escape`&&e.l&&(t.preventDefault(),e.r(``))})});function eD(e){w(e.a,`_iu`),w(e.b,LE),ZE(e,null),QE(e,{timer:0}),$E(e)}var tD=_(13,e=>{KE(e),WE(e)}),nD=e=>function(t){e.r(t)},rD=e=>t=>{if(e.n&&clearTimeout(e.n),!t){e.n=0,ZE(e,null),qE(e,``);return}ZE(e,t),e.n=setTimeout(e.p,150)},iD=e=>()=>{e.n&&=(clearTimeout(e.n),0);let t=e.j===null?e.h||``:e.j;ZE(e,null),qE(e,t)};O(`n0`,nD),O(`n2`,rD),O(`n1`,iD);var aD=`<!><!><!><!>`,oD=`b%b%c`,sD=e=>{w(e.a,`_ho`),gx(e.b),_x(e.b,12),vx(e.b)},cD=e=>w(e.a,[`_y`,`_hn`]),lD=e=>{dx(e.a),fx(e.a,12),px(e.a)},uD=e=>{Je(e.a),ae(e.a,12),c(e.a)},dD=t(11,e=>k(e.a,`href`,e._.d.hrefFor(e.k))),fD=h(1,dD),pD=e=>{fD._(e),gD._(e),yD._(e),SD._(e),CD._(e),w(e.b,`_9`),w(e.d,`_hm`)},mD=t(12,e=>w(e.a,[`_hl`,{_hk:e._.j?.has(e.k)}])),hD=t(16,e=>k(e.a,`title`,e._.j?.has(e.k)?`${e.p} (folded — click to open)`:e.p),2),gD=h(1,e=>{mD(e),hD(e)}),_D=j(6,(e=>`<span>${e}</span>`)(mx),(e=>` D/${e}&l`)(hx),sD),vD=t(13,e=>_D(e,+!e._.k.has(e.k))),yD=h(1,vD),bD=j(5,`<span title="Changed since your last visit"></span>`,` `,cD),xD=t(14,e=>bD(e,+!e._.l.has(e.k))),SD=h(1,xD),CD=h(1,e=>wt(e.a,`--depth:${e._.p+1}`)),wD=_(10,e=>{dD(e),mD(e),hD(e),xD(e),vD(e)}),TD=_(15,hD),ED=(e,t)=>{k(e.b,`data-status`,t),A(e.c,t)},DD=(e,t)=>A(e.e,t),OD=(e,t)=>{wD(e,(t?.[0]).file?.key),TD(e,(t?.[0]).file?.path),ED(e,(t?.[0]).file?.status),DD(e,(t?.[0]).name)},kD=t(1,e=>iO(e.a,{dir:e._.h,collapsed:e._._.f,collapsedKey:e._._.h,onToggleDir:e._._.g,hrefFor:e._._.i,collapsedFiles:e._._.j,commentKeys:e._._.k,newKeys:e._._.l}),7),AD=E(17,kD,e=>e._._),jD=e=>{AD(e),MD(e),ND(e),PD(e),FD(e),ID(e),LD(e),RD._(e)},MD=E(18,kD,e=>e._._),ND=E(19,kD,e=>e._._),PD=E(20,kD,e=>e._._),FD=E(21,kD,e=>e._._),ID=E(22,kD,e=>e._._),LD=E(23,kD,e=>e._._),RD=x(5,0,kD),zD=j(2,n,(e=>`/${e}&`)(qe),uD,lx,(e=>`/${e}&`)(ux),lD),BD=j(5,(e=>`<!>${e}<!>`)(aD),(e=>`b/${e}&b`)(oD),jD),VD=(e,t)=>{w(e.b,[`_hi`,{_g_:t}]),zD(e,+!t),BD(e,+!!t)},HD=t(9,e=>VD(e,e._.d.collapsed.has(e._.d.collapsedKey(e.i)))),UD=h(0,HD),WD=N(`k0`,e=>T(e.b,`click`,function(){e._.g(e.h)})),GD=e=>{UD._(e),w(e.a,`_hh`),w(e.c,`_hp`),w(e.d,`_hj`),WD(e)},KD=_(8,e=>{k(e.b,`title`,e.i),HD(e)}),qD=(e,t)=>wt(e.b,`--depth:${t}`),JD=(e,t)=>A(e.e,t),YD=(e,t)=>XD(e,t[0]),XD=_(7,e=>{KD(e,e.h?.path),qD(e,e.h?.depth),JD(e,e.h?.label),RD(e)}),ZD=(e,t)=>{$D(e,t?.dirs),tO(e,t?.files),nO(e,t?.depth)},QD=C(0,`<div><button type=button><span></span><span><!>/</span></button><!></div>`,` D D b D%m%`,GD,YD),$D=(e,t)=>QD(e,[t,`path`]),eO=C(1,`<a><span> </span><span> </span><!><!></a>`,` D D l D l%b%`,pD,OD),tO=(e,t)=>eO(e,[t,e=>e.file.key]),nO=_(15,CD),rO=ZD,iO=_(3,e=>{rO(e,e.d.dir),aO(e,e.d.collapsed),oO(e,e.d.onToggleDir),sO(e,e.d.collapsedKey),cO(e,e.d.hrefFor),uO(e,e.d.collapsedFiles),fO(e,e.d.commentKeys),mO(e,e.d.newKeys),UD(e),fD(e)}),aO=_(5,a(AD)),oO=_(6,a(MD)),sO=_(7,a(ND)),cO=_(8,a(PD)),lO=a(FD),uO=_(9,e=>{lO(e),gD(e)}),dO=a(ID),fO=_(10,e=>{dO(e),yD(e)}),pO=a(LD),mO=_(11,e=>{pO(e),SD(e)}),hO=(e=>`<aside><div>${e}</div><div><!><!></div></aside>`)(RE),gO=(e=>` D D/${e}&l D%b%m`)(zE),_O=e=>{dx(e.a),fx(e.a,12),px(e.a)},vO=e=>{Je(e.a),ae(e.a,12),c(e.a)},yO=e=>w(e.a,`_hd`),bO=t(4,e=>iO(e.b,{dir:e.d,collapsed:e._._.a8,collapsedKey:Ck(e),onToggleDir:Sk(e),hrefFor:e._._.ab,collapsedFiles:e._._.a0,commentKeys:e._._.a9,newKeys:e._._.aa}),8),xO=E(38,bO,e=>e._._),SO=e=>{xO(e),CO(e),TO(e),EO(e),DO(e),OO(e),kO(e),AO._(e),MO._(e),w(e.a,`_hg`)},CO=E(39,bO,e=>e._._),wO=t(2,e=>k(e.a,`hidden`,e._._.a1.has(e._.i))),TO=E(40,wO,e=>e._._),EO=E(42,bO,e=>e._._),DO=E(43,bO,e=>e._._),OO=E(44,bO,e=>e._._),kO=E(45,bO,e=>e._._),AO=x(5,0,e=>{wO(e),bO(e)}),jO=_(3,bO),MO=x(5,0,e=>{jO(e,sn(e._.m)),bO(e)}),NO=j(2,n,(e=>`/${e}&`)(qe),vO,lx,(e=>`/${e}&`)(ux),_O),PO=t(9,e=>{w(e.b,[`_hf`,{_g_:e._.a1.has(e.i)}]),NO(e,+!e._.a1.has(e.i))}),FO=j(5,(e=>`<div>${e}</div>`)(aD),(e=>` D/${e}&l`)(oD),SO),IO=t(10,e=>FO(e,!e._.a1.has(e.i)||e._.a3.has(e.i)?0:1),2),LO=h(5,e=>{PO(e),IO(e)}),RO=N(`l4`,e=>T(e.b,`click`,function(){let t=e.i,n=new Set(e._.a1);n.delete(t)||(XO(e._,new Set([...e._.a3,t])),n.add(t)),KO(e._,n)})),zO=e=>{LO._(e),BO._(e),w(e.a,`_he`),w(e.c,`_hp`),w(e.d,`_hj`),RO(e)},BO=h(5,IO),VO=_(8,e=>{PO(e),IO(e),AO(e)}),HO=(e,t)=>A(e.e,t),UO=(e,t)=>{VO(e,t[0]?.id),HO(e,t[0]?.label),WO(e,t[0]?.files)},WO=_(12,MO),GO=a(TO),KO=Se(27,e=>{LO(e),GO(e)}),qO=t(10,e=>KO(e,e.i,e.j)),JO=_(8,qO),YO=_(9,qO),XO=Se(29,BO),ZO=t(13,e=>XO(e,e.l,e.m)),QO=_(11,ZO),$O=_(12,ZO),ek=j(4,`<p>No files match.</p>`,` `,yO),tk=t(33,e=>ek(e,!e.y&&e.a5?0:1)),nk=Se(31,e=>{YE(e.c,e.a5),tk(e)}),rk=t(16,e=>nk(e,e.o,e.p)),ik=_(14,rk),ak=_(15,rk),ok=D(34,a(EO));function sk(e){w(e.b,`_hb`),eD(e.c),XE(e.c,wk(e)),w(e.d,`_hc`),ok(e,new Set)}var ck=_(35,a(DO)),lk=(e,t)=>ck(e,t||new Set),uk=_(36,a(OO)),dk=(e,t)=>uk(e,t||new Set),fk=_(37,a(kO)),pk=t(21,e=>fk(e,Tk(e))),mk=_(19,pk),hk=_(20,pk),gk=(e,t)=>w(e.a,[`_ha`,{_g_:t===!1}]),_k=_(24,tk),vk=C(5,`<div><button type=button><span></span><span> </span></button><!></div>`,` D D b D m%`,zO,UO),yk=(e,t)=>{_k(e,t?.length),vk(e,[t,`id`])},bk=_(25,a(xO)),xk=_(26,a(CO)),Sk=e=>function(t){let n=`${e._.i}/${t.path}`,r=new Set(e._._.a8),i=!r.delete(n);i&&r.add(n),ok(e._._,r),e._._.z?.(e._.m.filter(e=>e.path.startsWith(`${t.path}/`)).map(e=>e.key),i)},Ck=e=>t=>`${e._.i}/${t}`,wk=e=>t=>{nk(e,t)},Tk=e=>t=>De({workspaceId:e.t,view:`diff`,scope:e.u??null,file:t});O(`l3`,Sk),O(`l2`,Ck),O(`l1`,wk),O(`l0`,Tk);var Ek=`_gY __`,Dk=`<!><!><!>`,Ok=e=>w(e.a,`_g1`),kk=e=>{gx(e.a),_x(e.a,12),vx(e.a,`_g3`)},Ak=e=>w(e.a,[`_y`,`_g2`]),jk=x(1,0,e=>{k(e.a,`title`,e._.f),A(e.b,e._.f)}),Mk=e=>{jk._(e),w(e.a,Ek)},Nk=j(6,mx,(e=>`/${e}&`)(hx),kk),Pk=t(11,e=>Nk(e,+!e._._._._.w.has(e.k))),Fk=E(29,Pk,e=>e._._._._),Ik=N(`g2`,e=>T(e.a,`click`,function(){mA(e._._._._,!1)})),Lk=e=>{Fk(e),Bk(e),Hk(e),w(e.a,[`_gX`,`_w`]),w(e.b,`_9`),w(e.d,`_gZ`),Ik(e)},Rk=j(5,`<span title="Changed since your last visit"></span>`,` `,Ak),zk=t(12,e=>Rk(e,+!e._._._._.x.has(e.k))),Bk=E(30,zk,e=>e._._._._),Vk=t(13,e=>k(e.a,`href`,e._._._._.z(e.k))),Hk=E(32,Vk,e=>e._._._._),Uk=_(10,e=>{Vk(e),zk(e),Pk(e)}),Wk=(e,t)=>{k(e.b,`data-status`,t),A(e.c,t)},Gk=(e,t)=>A(e.e,t),Kk=(e,t)=>{Uk(e,(t?.[0]).file?.key),Wk(e,(t?.[0]).file?.status),Gk(e,(t?.[0]).name)},qk=e=>w(e.a,`_gW`),Jk=j(1,`<div><bdi><!>/</bdi></div>`,` E%`,Mk),Yk=_(5,e=>{Jk(e,+!e.f),jk(e)}),Xk=C(2,`<a><span> </span><span><bdi> </bdi></span><!><!></a>`,` D D l E m%b%`,Lk,Kk),Zk=(e,t)=>Xk(e,[t,e=>e.file.key]),Qk=(e,t)=>{Yk(e,(t?.[0]).dir),Zk(e,(t?.[0]).files)},$k=e=>{w(e.a,`_gU`),w(e.b,`_gV`)},eA=(e,t)=>A(e.c,t),tA=C(3,`<div><!><!></div>`,` D%b%`,qk,Qk),nA=(e,t)=>tA(e,[t,`dir`]),rA=(e,t)=>{eA(e,t[0]?.repo),nA(e,t[0]?.dirs)},iA=j(13,`<p>No files match.</p>`,` `,Ok),aA=t(14,e=>A(e.g,e._.n===e._.y?``:` / ${e._.y}`)),oA=x(0,0,e=>{A(e.f,e._.n),iA(e,+!!e._.n),aA(e)}),sA=N(`g3`,e=>{T(e.a,`click`,function(){mA(e._,!1)}),T(e.h,`click`,function(){mA(e._,!1)})}),cA=t=>{oA._(t),lA._(t),uA._(t),fA._(t),w(t.a,`_gP`),w(t.b,`_gQ`),w(t.c,`_gR`),w(t.d,`_gO`),w(t.e,`_gS`),w(t.h,[Ie,`_gN`]),ft(t.i),Le(t.i,16),e(t.i),w(t.j,`_g0`),eD(t.k),XE(t.k,IA(t)),w(t.l,`_gT`),sA(t)},lA=x(0,0,e=>YE(e.k,e._.u)),uA=x(0,0,aA),dA=C(12,`<div><div> </div><!></div>`,` D D l%`,$k,rA),fA=x(0,0,e=>dA(e,[e._.a0,`repo`])),pA=j(0,((e,t)=>`<div></div><div role=dialog aria-label="Jump to file"><div><strong>Files</strong><span><!><!></span><button type=button title=Close aria-label=Close>${e}</button></div><div>${t}</div><div><!><!></div></div>`)(tt,RE),((e,t)=>` b D D b D%b%l D/${e}&m D/${t}&l D%b%m`)(lt,zE),cA),mA=Se(18,e=>pA(e,+!e.s)),hA=t(5,e=>mA(e,e.d,e.e)),gA=_(3,hA),_A=_(4,hA),vA=Se(20,lA),yA=t(8,e=>vA(e,e.g,e.h)),bA=_(6,yA),xA=_(7,yA),SA=_(22,a(Fk)),CA=(e,t)=>SA(e,t||new Set),wA=_(23,a(Bk)),TA=(e,t)=>wA(e,t||new Set),EA=_(24,uA),DA=t(14,e=>EA(e,e.l??e.n)),OA=_(11,DA),kA=_(13,e=>{DA(e),oA(e)}),AA=_(25,a(Hk)),jA=t(17,e=>AA(e,LA(e))),MA=_(15,jA),NA=_(16,jA),PA=_(26,fA),FA=(e,t)=>{kA(e,t?.length),PA(e,(()=>{let e=[],n=new Map;for(let r of t){let t=r.key.indexOf(`/`),i=r.key.slice(0,t),a=r.key.slice(t+1),o=a.lastIndexOf(`/`),s=o<0?``:a.slice(0,o),c=o<0?a:a.slice(o+1),l=n.get(i);l||(n.set(i,l=new Map),e.push({repo:i,dirs:[]}));let u=l.get(s);u||(l.set(s,u={dir:s,files:[]}),e[e.length-1].dirs.push(u)),u.files.push({file:r,name:c})}return e})())},IA=e=>t=>{vA(e._,t)},LA=e=>t=>De({workspaceId:e.p,view:`diff`,scope:e.q??null,file:t});O(`g1`,IA),O(`g0`,LA);var RA=((e,t,n,r)=>`<div><div><div><div><!><h1>Review</h1><!><!></div><div><!><button title="Refresh diff">${e}</button><!><span><select aria-label="Review scope"><option value=committed>Committed</option><option value=working>Working tree</option><option value=dirty>Uncommitted</option></select></span><div>${t}</div><!></div></div><div data-diff-main><!><!><!><!><!></div></div>${n}${r}</div>`)(i,tb,hO,Dk),zA=((e,t,n,r)=>` D D D D%b b%b%l D%b D/${e}&l%b D l D/${t}&l%m D%b%b%b%b%m/${n}&/${r}&l`)(ve,nb,gO,`b%c`),BA=e=>{w(e.a,`_fX`),w(e.b,[`_fY`,`_fZ`]),w(e.c,[`_fY`,`_f0`]),w(e.d,[`_fY`,`_f1`]),w(e.e,[`_fY`,`_f0`]),w(e.f,[`_fY`,`_f1`])},VA=x(17,0,e=>k(e.a,`hidden`,e._.b1)),HA=N(`m56`,e=>T(e.a,`click`,function(){e._.dw()})),UA=e=>{VA._(e),w(e.a,[ze,`_fO`,`_fF`]),_t(e.b),o(e.b,14),fe(e.b),HA(e)},WA=x(12,0,e=>A(e.b,e._.d1)),GA=N(`m55`,e=>T(e.a,`click`,function(){kN(e._,!0)})),KA=e=>{WA._(e),w(e.a,[`_o`,`_f2`]),GA(e)},qA=x(9,0,e=>{w(e.a,[cn,`_fF`,{_fE:e._.az}]),k(e.a,`title`,e._.az?`Hide file tree`:`Show file tree`)}),JA=N(`m54`,e=>T(e.a,`click`,function(){ON(e._,!e._.az),he(e._.az)})),YA=e=>{qA._(e),at(e.b),Re(e.b,14),Fe(e.b),JA(e)},XA=t(2,e=>A(e.b,e._.cs.some(e=>e.unborn)?`No commits yet.`:e._.ay===`dirty`?`Nothing uncommitted.`:e._.cs.some(e=>e.pr)?`No file changes on these PRs.`:`No changes vs base.`)),ZA=x(22,0,XA),QA=e=>{ZA._(e),$A._(e),w(e.a,`_bu`)},$A=x(22,0,XA),ej=E(180,e=>A(e.b,e._._.ay===`committed`?``:`, showing uncommitted changes only`),e=>e._._),tj=e=>{ej(e),nj(e)},nj=E(5,e=>A(e.a,e._.e)),rj=_e(`m58`,`<!><!>.`,`%b%`,tj),ij=e=>{Ce(e.a),ge(e.a,rj(e)),S(e.a,`warn`),st(e.a,`inline`),g(e.a),m(e.a),b(e.a),ye(e.a,{})},aj=(e,t)=>we(e.a,`${t}: base not found`),oj=(e,t)=>{aj(e,t[0]?.worktree),sj(e,t[0]?.base)},sj=_(4,a(nj)),cj=t(2,e=>A(e.b,e._.b8.trim()?`No matches in review.`:e._.ax&&!e._.au?`Nothing changed since your last visit.`:`No files match "${e._.au}".`),2),lj=x(22,1,cj),uj=e=>{lj._(e),dj._(e),fj._(e),w(e.a,`_bu`)},dj=x(22,1,cj),fj=x(22,1,cj),pj=E(176,e=>A(e.a,e._._.ar),e=>e._._),mj=_e(`m57`,` `,` `,pj),hj=e=>{Ce(e.a),ge(e.a,mj(e)),b(e.a,xF(e)),g(e.a),m(e.a),S(e.a),st(e.a),we(e.a),ye(e.a,{})},gj=x(6,0,e=>{A(e.b,e._.ap),A(e.c,e._.ap===1?``:`s`)}),_j=e=>{gj._(e),w(e.a,`_fM`)},Q=t(1,e=>sE(e.a,{repo:e._.c,files:e._.g,shownKeys:e._._.d3,collapsible:e._._.ct>1,collapsed:e._._.bc.has(e._.c?.id),expanding:e._._.bg.has(e._.c?.id),opened:e._._.bf.has(e._.c?.id),onToggle:MF(e),workspaceBranch:e._._.aj||``,workspaceName:e._._.ak||``,localDiffers:e._._.de.has(e._.c?.id),onlyNew:e._._.ax,onToggleNew:jF(e),onReload:e._._.cn,loading:e._._.as,findHit:e._._.ba,commentsByFile:e._._.db,draft:e._._.aq,sessions:e._._.ai||[],observeNear:e._._.bn,collapsedFiles:e._._.bd,onFileToggle:AF(e),onSelect:kF(e),onSaveComment:OF(e),onSendDraft:DF(e),onCancelDraft:EF(e),onDeleteComment:TF(e),onEditComment:wF(e),onSendComment:CF(e),onError:SF(e)}),25),vj=E(171,Q,e=>e._._),yj=e=>{vj(e),bj(e),xj(e),Sj(e),Cj(e),wj(e),Tj(e),Ej(e),Dj(e),Oj(e),kj(e),Aj(e),jj(e),Mj(e),Nj(e),Pj(e),Fj(e),Ij(e),Lj(e),Rj(e),zj(e),Bj(e),Vj(e),Hj(e),Uj._(e),Wj._(e),wT(e.a)},bj=E(172,Q,e=>e._._),xj=E(173,Q,e=>e._._),Sj=E(175,Q,e=>e._._),Cj=E(177,Q,e=>e._._),wj=E(179,Q,e=>e._._),Tj=E(184,Q,e=>e._._),Ej=E(185,Q,e=>e._._),Dj=E(186,Q,e=>e._._),Oj=E(187,Q,e=>e._._),kj=E(188,Q,e=>e._._),Aj=E(189,Q,e=>e._._),jj=E(190,Q,e=>e._._),Mj=E(191,Q,e=>e._._),Nj=E(193,Q,e=>e._._),Pj=E(195,Q,e=>e._._),Fj=E(197,Q,e=>e._._),Ij=E(198,Q,e=>e._._),Lj=E(200,Q,e=>e._._),Rj=E(201,Q,e=>e._._),zj=E(202,Q,e=>e._._),Bj=E(205,Q,e=>e._._),Vj=E(206,Q,e=>e._._),Hj=E(207,Q,e=>e._._),Uj=x(0,0,Q),Wj=x(0,0,Q),Gj=_(6,e=>{Qj(e,e.g.length),Wj(e)}),Kj=t(4,e=>Gj(e,e._.d8.get(e.d)||[])),qj=h(23,Kj),Jj=e=>{qj._(e),Zj._(e)},Yj=j(0,vS,(e=>`/${e}&`)(yS),yj),Xj=t(8,e=>Yj(e,e.h||e.f&&e._.df?0:1),2),Zj=h(23,Xj),Qj=_(7,Xj),$j=_(3,Kj),eM=_(5,Xj),tM=(e,t)=>nM(e,t[0]),nM=_(2,e=>{$j(e,e.c?.id),eM(e,e.c?.pr),Uj(e)}),rM=x(7,0,e=>Vn(e.b,e._.ai)),iM=e=>{rM._(e),aM._(e),oM._(e),w(e.a,`_fL`),Fn(e.b)},aM=x(7,0,e=>Hn(e.b,e._.ds)),oM=x(7,0,e=>Un(e.b,e._.dt)),sM=x(4,0,e=>k(e.a,`href`,`/w/${e._.a2}`)),cM=e=>{sM._(e),w(e.a,[ze,`_fK`]),se(e.b),re(e.b,14),ne(e.b)},lM=(e,t)=>{dk(e.y,t),TA(e.z,t)},uM=_(137,a(Pj)),dM=(e,t)=>yk(e.y,t),fM=t(144,e=>dM(e,e.cs.filter(t=>(e.d9.get(t.id)||[]).length).map(t=>({id:t.id,label:t.pr?`${t.worktree} #${t.pr.number}`:t.worktree,files:e.d9.get(t.id)||[]})))),pM=_(143,fM),mM=t(141,e=>pM(e,e.d5(e.d0))),hM=_(134,e=>{FA(e.z,e.d0),fF(e,e.d0?.length),uM(e,new Set(e.d0.map(e=>e.key))),mM(e)}),gM=t(133,e=>hM(e,e.cy?e.cx.filter(t=>e.cy.has(t.key)||t.key===e.bb):e.cx),2),_M=_(131,e=>{zb(e.q,e.cx),gM(e)}),vM=t(129,e=>_M(e,(()=>{let t=Dt(e.au);return e.cu.filter(n=>t(n.key)&&(!e.ax||n.changedSince))})()),2),yM=_(142,qj),bM=t(140,e=>yM(e,e.d5(e.cu))),xM=_(128,e=>{dF(e,e.cu?.length),lM(e,new Set(e.cu.filter(e=>e.changedSince).map(e=>e.key))),vM(e),bM(e)}),SM=_(148,a(Ij)),CM=_(153,a(Lj)),wM=t(152,e=>CM(e,NF(e)),4),TM=_(165,a(Vj)),EM=t(161,e=>TM(e,PF(e)),4),DM=_(151,e=>{wM(e),EM(e)}),OM=C(21,xe,(e=>`/${e}&`)(le),ij,oj),kM=C(23,`<!><!><!>`,`b%`,Jj,tM),AM=_(126,e=>{uF(e,e.cs.length),xM(e,e.cs.flatMap(e=>e.files.map(t=>({...t,repo:e.id,key:`${e.worktree}/${t.path}`})))),SM(e,new Set(e.cs.filter(e=>!!e.pr&&!!e.localHead&&(e.localHead!==e.head||e.branch!==e.pr.headRefName)).map(e=>e.id))),DM(e,FF(e)),OM(e,[e.cs.filter(e=>e.baseMissing),`id`]),kM(e,[e.cs,`id`]),fM(e),$A(e)}),jM=N(`m61`,e=>Te(e,{active:e.ad,load:e.ce,onMount:function(){let t=new AbortController,n={abort:t,loaded:!1,wasActive:!1,lastPr:e.aa||``,lastNonce:e.ae||0,lastFileNonce:e.af||0,start:()=>{this.active&&!n.loaded&&(n.loaded=!0,this.load())}};return n.wasActive=!!this.active,d().addEventListener(`review.changed`,t=>{n.loaded&&t.data?.workspaceId===e.a2&&e.cm()},{signal:t.signal}),d().addEventListener(`status.changed`,t=>{if(!this.active||!n.loaded||e.as)return;let r=t.data,i=r&&r[e.a2];if(!i)return;let a=Et(i);!a||!e.c9||a===e.c9||e.cp()},{signal:t.signal}),window.addEventListener(`pagehide`,()=>{this.active&&n.loaded&&(e.cq(),e.c6())},{signal:t.signal}),document.addEventListener(`visibilitychange`,()=>{document.visibilityState===`hidden`&&this.active&&n.loaded&&e.c6()},{signal:t.signal}),n.start(),n},onUpdate:function(){this.start(),this.active&&this.loaded&&!this.wasActive&&(e.cn(),e.bz&&e.c7(e.bz)),!this.active&&this.loaded&&this.wasActive&&(e.cq(),e.c6()),this.wasActive=!!this.active;let t=e.aa||``,n=e.ae||0;this.loaded&&t&&n!==this.lastNonce?(this.lastNonce=n,this.lastPr=t,e.br(t)):(this.lastPr=t,this.lastNonce=n);let r=e.af||0;this.loaded&&e.ab&&r!==this.lastFileNonce&&e.bw(e.ab),this.lastFileNonce=r,e.a3&&e.a3!==e.ay&&e.ch(e.a3,!1)},onDestroy:function(){e.ca&&clearTimeout(e.ca),this.loaded&&(e.cq(),e.c6()),this.abort.abort()}})),$=t(125,jM,21),MM=t(116,e=>te(e,`o`,e.ay,IF(e))),NM=_(115,e=>{$(e),MM(e)}),PM=t(114,e=>NM(e,LF(e)),2),FM=_(123,$),IM=t(122,e=>FM(e,RF(e))),LM=a(Mj),RM=_(121,e=>{IM(e),$(e),LM(e)}),zM=t(113,e=>RM(e,zF(e))),BM=_(112,e=>{PM(e),zM(e),$(e)}),VM=t(111,e=>BM(e,BF(e)),9),HM=_(89,e=>{VM(e),$(e)}),UM=t(88,e=>HM(e,VF(e)),4),WM=_(104,$),GM=t(98,e=>WM(e,HF(e)),2),KM=_(124,$),qM=t(48,e=>KM(e,UF(e))),JM=j(9,(e=>`<button>${e}</button>`)(Qe),(e=>` D/${e}&l`)(He),YA),YM=j(12,`<button title="Jump to file">Files (<!>)</button>`,` Db%`,KA),XM=j(17,(e=>`<button title="Find in review (⌘/Ctrl+F)" aria-label="Find in review">${e}</button>`)(me),(e=>` D/${e}&l`)(u),UA),ZM=_(149,e=>{JM(e,+!e.df),YM(e,+!e.df),XM(e,+!e.df),Zj(e)}),QM=e=>{ZM(e,!e.al||e.cw>0)},$M=_(162,aM),eN=_(163,oM),tN=_(164,a(Bj)),nN=t(160,e=>{$M(e,WF(e)),eN(e,GF(e)),tN(e,KF(e))}),rN=_(159,e=>{nN(e),EM(e)}),iN=t(156,e=>rN(e,qF(e)),4),aN=j(20,`<div aria-hidden=true><div></div><div></div><div></div><div></div><div></div></div>`,` D b b b b `,BA),oN=t(55,e=>aN(e,!e.al&&e.as?0:1)),sN=j(22,`<p> </p>`,` D `,QA,`<p> </p>`,` D `,uj),cN=t(136,e=>sN(e,e.al&&!e.cw?0:e.al&&!e.d1&&!e.ba?1:2),3),lN=D(47,e=>{AM(e,e.al||[]),UM(e),GM(e),qM(e),QM(e),iN(e),oN(e),cN(e)}),uN=(e,t)=>{lk(e.y,t),CA(e.z,t)},dN=a(Fj),fN=_(145,e=>{uN(e,new Set(e.db.keys())),dN(e)}),pN=_(157,a(Rj)),mN=t(155,e=>pN(e,JF(e))),hN=_(158,a(zj)),gN=t(50,e=>hN(e,YF(e))),_N=D(49,e=>{fP(e,e.an?.length),fN(e,(()=>{let t=new Map;for(let n of e.an){let e=`${n.worktree}/${n.path}`;t.set(e,[...t.get(e)||[],n])}return t})()),wM(e),mN(e),gN(e),iN(e),nN(e)}),vN=a(Sj),yN=D(52,e=>{wM(e),EM(e),vN(e)}),bN=j(19,xe,(e=>`/${e}&`)(le),hj),xN=a(pj),SN=D(53,e=>{bN(e,+!e.ar),xN(e)}),CN=a(Cj),wN=D(54,e=>{k(e.k,`disabled`,e.as),ee(e.l,e.as&&`_D`),k(e.o,`disabled`,e.as),$(e),oN(e),CN(e)}),TN=(e,t)=>{ak(e.y,t),xA(e.z,t)},EN=a(wj),DN=D(59,e=>{VM(e),vM(e),EN(e),dj(e)}),ON=D(61,e=>{gk(e.y,e.az),qA(e)}),kN=D(62,e=>gA(e.z,e.b0)),AN=_(132,gM),jN=e=>{AN(e,e.b8.trim()?new Set(e.b9):null)},MN=D(69,e=>{BP(e,e.b7?.query),VP(e,e.b7?.keys),UP(e,e.b7?.hit),jN(e)}),NN=_(169,a(Hj)),PN=t(79,e=>NN(e,ZF(e)),2),FN=a(Ej),IN=D(74,e=>{JO(e.y,e.bc),UM(e),PN(e),FN(e)}),LN=a(Oj),RN=_(76,e=>{bk(e.y,QF(e)),LN(e)}),zN=a(Dj),BN=D(75,e=>{xk(e.y,e.bd),RN(e,$F(e)),zN(e)}),VN=a(kj),HN=D(77,e=>{QO(e.y,e.bf),UM(e),PN(e),VN(e)}),UN=a(Aj),WN=D(78,e=>{PN(e),UN(e)}),GN=(e,t)=>{qP(e,t.cbs),JP(e,t.io),YP(e,t.root)},KN=_(94,e=>{VM(e),$(e)}),qN=t(93,e=>KN(e,eI(e)),3),JN=_(168,e=>Tb(e.q,tI(e))),YN=t(92,e=>JN(e,nI(e))),XN=_(86,e=>{UM(e),qN(e),YN(e)}),ZN=_(87,e=>{UM(e),qN(e)}),QN=_(91,e=>{qN(e),YN(e)}),$N=_(105,e=>{VM(e),$(e)}),eP=t(100,e=>$N(e,oI(e))),tP=_(90,e=>{QN(e,aI(e)),eP(e)}),nP=(e,t)=>{ZP(e,t.raf),QP(e,t.anchor),$P(e,t.run)},rP=(e,t)=>{eF(e,t.sig),tF(e,t.timer)},iP=(e,t)=>nF(e,t.seq),aP=(e,t)=>oF(e,t.busy),oP=_(139,e=>{bM(e),mM(e)}),sP=_(150,e=>{wM(e),EM(e)}),cP=N(`m59`,e=>{T(e.k,`click`,function(){e.cn()}),de(e,`o`),T(e.s,`scroll`,function(){e.c5()})});function lP(e){w(e.a,`_fD`),w(e.b,`_fI`),w(e.c,`_fJ`),w(e.f,ln),w(e.i,`_fH`),w(e.k,[ze,`_fF`]),Ct(e.l),ue(e.l,14),w(e.n,[`_m`,`_fU`]),w(e.o,[`_n`,`_fV`]),Lb(e.q),fb(e.q,pI(e)),bb(e.q),xb(e.q),wb(e.q),w(e.s,`_fR`),sk(e.y),YO(e.y,fI(e)),$O(e.y,dI(e)),e.z,_A(e.z,uI(e)),lN(e,null),_N(e,[]),yN(e,null),SN(e,null),wN(e,!1),TN(e,XF(e)),DN(e,!1),ON(e,bt()),kN(e,!1),MN(e,{query:``,hit:null,keys:[]}),IN(e,new Set),BN(e,new Set),HN(e,new Set),WN(e,new Set),GN(e,{io:null,root:null,cbs:null}),XN(e,rI(e)),ZN(e,iI),tP(e,sI(e)),nP(e,{anchor:null,raf:0,run:0}),rP(e,{sig:``,timer:0}),iP(e,{seq:0}),aP(e,{busy:0}),oP(e,cI),sP(e,lI),cP(e)}var uP=j(6,`<span><!> comment<!></span>`,` D%c%`,_j),dP=j(7,(e=>`<span>${e}</span>`)(un),(e=>` D/${e}&l`)(dn),iM),fP=_(51,e=>{w(e.d,[`_fT`,{_fS:!e.ap}]),uP(e,+!e.ap),dP(e,+!e.ap),gj(e)}),pP=N(`m63`,e=>{e.au!==gt(e.a2)&&pe(e.a2,e.au)}),mP=t(57,pP),hP=D(56,e=>{ik(e.y,e.au),bA(e.z,e.au),mP(e),vM(e),lj(e)}),gP=_(154,e=>{mN(e),iN(e)}),_P=_(120,$),vP=t(119,e=>_P(e,hI(e))),yP=_(28,e=>{mk(e.y,e.a2),MA(e.z,e.a2),hP(e,gt(e.a2)),gP(e,mI(e)),mP(e),GM(e),VM(e),vP(e),qM(e),$(e),wM(e),gN(e),EM(e),sM(e)}),bP=_(103),xP=t(102,e=>bP(e,gI(e)),2),SP=_(101,xP),CP=a(ej),wP=D(60,e=>{hk(e.y,e.ay),NA(e.z,e.ay),SP(e,_I(e)),VM(e),PM(e),zM(e),$(e),MM(e),CP(e),ZA(e)}),TP=_(29,e=>{wP(e,e.a3??Me()),$(e)}),EP=Se(63,e=>{w(e.p,[`_fQ`,{_fP:!e.b1}]),db(e.q,e.b1),VA(e)}),DP=t(32,e=>EP(e,e.a4,e.a5)),OP=_(30,DP),kP=_(31,DP),AP=N(`m62`,e=>{e.a7!=null&&e.a7!==e.b3&&IP(e,e.a7)}),jP=t(66,AP),MP=N(`m60`,e=>{e.ad&&window.addEventListener(`keydown`,t=>{!(t.metaKey||t.ctrlKey)||t.altKey||t.shiftKey||t.key.toLowerCase()===`f`&&(t.target instanceof HTMLTextAreaElement||(t.preventDefault(),e.dw()))},{capture:!0,signal:Ye(e,0)})}),NP=t(167,e=>{r(e,0),MP(e)}),PP=_(166,NP),FP=t(68,e=>PP(e,vI(e))),IP=D(65,e=>{qb(e.q,e.b3),jP(e),FP(e)}),LP=_(33,e=>{IP(e,e.a7||0),jP(e)}),RP=_(67,e=>{Kb(e.q,e.b5),FP(e)}),zP=(e,t)=>RP(e,t||{focus:yI}),BP=_(70,fj),VP=_(71),HP=a(Tj),UP=_(72,e=>{WP(e,e.ba?.key),cN(e),HP(e)}),WP=_(73,gM),GP=_(85),KP=t(84,e=>GP(e,bI(e)),2),qP=_(81,KP),JP=_(82,KP),YP=_(83,KP),XP=_(35,qN),ZP=_(96,xP),QP=_(97,e=>{xP(e),GM(e),$(e)}),$P=_(99,eP),eF=_(107,e=>{VM(e),$(e)}),tF=_(108,e=>{IM(e),$(e)}),nF=_(110,VM),rF=_(36,e=>{VM(e),$(e)}),iF=_(37,e=>{VM(e),$(e)}),aF=_(38,PM),oF=_(118,e=>{vP(e),iN(e)}),sF=_(39,e=>{$(e),NP(e)}),cF=_(40,$),lF=_(41,$),uF=_(127,a(Nj)),dF=_(130,e=>{OA(e.z,e.cw),cN(e)}),fF=_(135,e=>{cN(e),WA(e)}),pF=_(42,iN),mF=j(4,(e=>`<a title="Back to terminal (Esc)">${e}</a>`)(f),(e=>` D/${e}&l`)(v),cM),hF=(e,t)=>mF(e,+!t),gF=(e,t)=>{yP(e,t.workspaceId),TP(e,t.scope),OP(e,t.findOpen),kP(e,t.findOpenChange),LP(e,t.findTick),zP(e,t.findFocusRef),XP(e,t.onFileChange),rF(e,t.focusPr),iF(e,t.focusFile),aF(e,t.onScopeChange),sF(e,t.active),cF(e,t.focusNonce),lF(e,t.focusFileNonce),pF(e,t.onSent),hF(e,t.onExit),vF(e,t.sessions),yF(e,t.workspaceBranch),bF(e,t.workspaceName)},_F=a(vj),vF=_(44,e=>{rM(e),_F(e)}),yF=_(45,a(bj)),bF=_(46,a(xj)),xF=e=>function(){SN(e._,null)},SF=e=>function(t){SN(e._._,t)},CF=e=>function(t,n){e._._.du(t,n)},wF=e=>function(t,n){e._._.do(t,n)},TF=e=>function(t){e._._.dn(t)},EF=e=>function(){yN(e._._,null)},DF=e=>function(t,n,r){e._._.dv(t,n,r)},OF=e=>function(t,n){e._._.dj(t,n)},kF=e=>function(t,n){yN(e._._,{key:t.key,side:n.side||`additions`,start:Math.min(n.start,n.end),end:Math.max(n.start,n.end)})},AF=e=>function(t,n){e._._.be([t],!n)},jF=e=>function(){DN(e._._,!e._._.ax)},MF=e=>function(){e._._.dz(e._.c?.id)},NF=e=>async(t,n)=>{let r=e.aq;if(yN(e,null),r)try{let i=await l(`/api/workspaces/${e.a2}/review`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({action:`comment`,worktree:e.dg(t.repo),path:t.path,side:r.side,line_start:r.start,line_end:r.end,text:n.trim(),...e.dh(t,r)})});_N(e,e.an.concat(i))}catch(t){SN(e,String(t.message||t))}},PF=e=>(t,n,r)=>{let i=e.aq,a=n.trim();if(!i||!a)return Promise.resolve(!1);let o={id:-1,workspace_id:e.a2,worktree:e.dg(t.repo),path:t.path,side:i.side===`deletions`?`deletions`:`additions`,line_start:i.start,line_end:i.end,text:a,created_at:``,...e.dh(t,i)};return e.dp([o],{session:r},[])},FF=e=>(t,n)=>{let r=e.cs.find(e=>e.id===t.repo),i=n.side===`deletions`?t.old:t.new;return{head:r?.head,snippet:i==null?void 0:rn(i,n.start,n.end,n.side===`deletions`?`deletions`:`additions`)}},IF=e=>function(t){e.ch(t)},LF=e=>(t,n=!0)=>{t!==e.ay&&(wP(e,t),n&&vt(t),e.ac?.(t),e.ce(t))},RF=e=>()=>{e.ca&&clearTimeout(e.ca),e.ca=setTimeout(()=>{e.ca=0,e.cn()},250)},zF=e=>()=>e.ce(e.ay,!0),BF=e=>async(t=e.ay,n=!1)=>{let r=++e.cc;wN(e,!0),SN(e,null);try{let i=new URLSearchParams;t!==`committed`&&i.set(`scope`,t),n&&i.set(`refresh`,`1`);let a=i.size?`?${i}`:``,[o,s]=await Promise.all([l(`/api/workspaces/${e.a2}/diff${a}`),l(`/api/workspaces/${e.a2}/review`)]);if(r!==e.cc)return;if(lN(e,o),e.ax&&!o.some(e=>e.files.some(e=>e.changedSince))&&DN(e,!1),_N(e,s.comments||[]),e.c9=Tt(o),e.aa)e.br(e.aa);else if(e.ab)e.bw(e.ab);else if(!n&&e.cc===1){let n=St(e.a2);n&&n.scope===t&&e.c7(n)}}catch(t){if(r!==e.cc)return;SN(e,String(t.message||t))}finally{r===e.cc&&wN(e,!1)}},VF=e=>t=>{if(!t)return;let n=e.al||[],r=n.find(e=>e.pr&&`${e.worktree}/${e.pr.number}`===t),i=new Set(e.bf);for(let t of n)e.bc.has(t.id)||i.add(t.id);r&&i.add(r.id),HN(e,i);let a=new Set;for(let e of n)(!r||e.id!==r.id)&&a.add(e.id);IN(e,a),WN(e,new Set),e.bp(()=>{let n=e.s?.querySelector(`[data-pr="${CSS.escape(t)}"]`);return n&&e.bo(n),!!n})},HF=e=>()=>{e.al&&s(e.a2,e.bz)},UF=e=>()=>{if(!e.al)return;let t={},n={};for(let r of e.al){t[r.id]=r.head;for(let e of r.files)e.hash&&(n[`${r.worktree}/${e.path}`]=e.hash)}fetch(`/api/workspaces/${e.a2}/review`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({action:`seen`,heads:t,dirty:n}),keepalive:!0}).catch(()=>{})},WF=e=>()=>e.dp(e.an,{clipboard:!0},`all`),GF=e=>t=>e.dp(e.an,{session:t},`all`),KF=e=>(t,n)=>{let r=e.an.find(e=>e.id===t);return r?e.dp([r],{session:n},[t]):Promise.resolve(!1)},qF=e=>async(t,n,r)=>{if(!t.length)return!0;e.ck++;try{let i=$t(t,e.al);if(`clipboard`in n){if(!await pt(i))return SN(e,`Copy failed: the clipboard needs HTTPS in this browser.`),!1}else await l(`/api/sessions/${n.session}/send`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({text:`Please address this review feedback, then summarize what you changed.\n\n${i}`,...Xe()||{}})}),e.ag?.(n.session);if(yN(e,null),r===`all`)_N(e,[]);else{let t=new Set(r);_N(e,e.an.filter(e=>!t.has(e.id)))}return(r===`all`||r.length)&&await e.dk(r).catch(()=>{}),!0}catch(t){return SN(e,String(t.message||t)),!1}finally{e.ck--}},JF=e=>async t=>{_N(e,e.an.filter(e=>e.id!==t)),await e.dk([t]).catch(()=>{})},YF=e=>async(t,n)=>{let r=e.an.find(e=>e.id===t);if(!r)return;let i=n.trim();if(!(!i||i===r.text)){_N(e,e.an.map(e=>e.id===t?{...e,text:i}:e));try{await l(`/api/workspaces/${e.a2}/review/${t}`,{method:`PATCH`,headers:{"content-type":`application/json`},body:JSON.stringify({text:i})})}catch(n){throw _N(e,e.an.map(e=>e.id===t?r:e)),SN(e,String(n.message||n)),n}}},XF=e=>t=>{hP(e,t)},ZF=e=>t=>{if(e.bg.has(t)){let n=new Set(e.bg);n.delete(t),WN(e,n),e.bc.has(t)||IN(e,new Set([...e.bc,t]));return}if(e.bc.has(t)){if(e.bf.has(t)){let n=new Set(e.bc);n.delete(t),IN(e,n);return}WN(e,new Set([...e.bg,t])),requestAnimationFrame(()=>{requestAnimationFrame(()=>{if(!e.bg.has(t))return;let n=new Set(e.bc);n.delete(t),IN(e,n);let r=new Set(e.bg);r.delete(t),WN(e,r)})})}else HN(e,new Set([...e.bf,t])),IN(e,new Set([...e.bc,t]))},QF=e=>function(t,n){e.be(t,n)},$F=e=>(t,n)=>{let r=new Set(e.bd);for(let e of t)n?r.add(e):r.delete(e);(r.size!==e.bd?.size||[...r].some(t=>!e.bd.has(t)))&&BN(e,r)},eI=e=>t=>{e.a9?.(t),e.bp(()=>{let n=e.bt(t);return n&&e.bo(n),!!n})},tI=e=>function(t){e.dy(t)},nI=e=>t=>{if(MN(e,t),!t.hit)return;let n=t.hit;setTimeout(()=>{let r=e.bt(n.key);if(r){if(n.line<1){e.bo(r);return}It(t.query,n),Lt()}},0)},rI=e=>t=>{let n=e.s;if(!n){t.scrollIntoView({block:`start`});return}let r=t.getBoundingClientRect().top-n.getBoundingClientRect().top+n.scrollTop;n.scrollTo({top:Math.max(0,r-8)})};function iI(e,t=2500){let n=Date.now(),r=()=>{!e()&&Date.now()-n<t&&requestAnimationFrame(r)};r()}var aI=e=>t=>{let n=e.bs(t);return n&&(n.open=!0),n},oI=e=>t=>{let n=++e.c1,r=Date.now(),i=0,a=()=>{e.c1===n&&e.c1++},o=()=>{if(e.c1!==n)return;let s=e.s,c=e.bs(t.key);if(s&&c){let e=c.getBoundingClientRect().top-s.getBoundingClientRect().top+t.off;if(Math.abs(e)>1&&(s.scrollTop+=e),!i){i=Date.now();for(let e of[`wheel`,`touchstart`,`keydown`])s.addEventListener(e,a,{once:!0,passive:!0})}Date.now()-i<1500&&requestAnimationFrame(o)}else!i&&Date.now()-r<2500&&requestAnimationFrame(o)};requestAnimationFrame(o)},sI=e=>t=>e.s?.querySelector(`details[data-key="${CSS.escape(t)}"]`)??null;function cI(e){let t=new Map;for(let n of e){let e=t.get(n.repo);e?e.push(n):t.set(n.repo,[n])}return t}function lI(e){return e.includes(`#`)?e.split(`#`)[0]:e}var uI=e=>t=>{kN(e,t)},dI=e=>t=>{HN(e,t)},fI=e=>t=>{IN(e,t)},pI=e=>t=>{EP(e,t)},mI=e=>t=>t===`all`?fetch(`/api/workspaces/${e.a2}/review`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({action:`clear`})}):Promise.all(t.map(t=>fetch(`/api/workspaces/${e.a2}/review/${t}`,{method:`DELETE`}))),hI=e=>async()=>{if(!e.ck)try{let t=await l(`/api/workspaces/${e.a2}/review`);if(e.ck)return;_N(e,t.comments||[])}catch{}},gI=e=>()=>{e.by||=requestAnimationFrame(()=>{e.by=0,e.s?.isConnected&&(e.bz=e.c3())})},_I=e=>()=>{let t=e.s;if(!t||!t.scrollTop)return null;let n=t.getBoundingClientRect().top,r=null;for(let i of t.querySelectorAll(`details[data-key]`)){if(i.hidden)continue;let t=i.getBoundingClientRect().top;if(t>n+1)break;r={scope:e.ay,key:i.dataset.key,off:Math.round(n-t)}}return r},vI=e=>()=>{EP(e,!0),IP(e,+e.b3+1),e.b5.focus()};function yI(){}var bI=e=>(t,n)=>{e.bj??=new WeakMap,e.bj.set(t,n);let r=e.s||null;(!e.bk||e.bl!==r)&&(e.bk?.disconnect(),e.bl=r,e.bk=new IntersectionObserver(t=>{for(let n of t)n.isIntersecting&&(e.bk.unobserve(n.target),e.bj.get(n.target)?.())},{root:r,rootMargin:`800px 0px`})),e.bk.observe(t),requestAnimationFrame(()=>{if(!t.isConnected)return;let r=e.s,i=t.getBoundingClientRect(),a=r?r.getBoundingClientRect():{top:0,bottom:window.innerHeight};i.bottom>=a.top-800&&i.top<=a.bottom+800&&(e.bk?.unobserve(t),n())})};O(`m38`,xF),O(`m49`,SF),O(`m48`,CF),O(`m47`,wF),O(`m46`,TF),O(`m45`,EF),O(`m44`,DF),O(`m43`,OF),O(`m42`,kF),O(`m41`,AF),O(`m40`,jF),O(`m39`,MF),O(`m24`,NF),O(`m32`,PF),O(`m23`,FF),O(`m0`,IF),O(`m16`,LF),O(`m19`,RF),O(`m18`,zF),O(`m15`,BF),O(`m7`,VF),O(`m13`,HF),O(`m20`,UF),O(`m29`,WF),O(`m30`,GF),O(`m31`,KF),O(`m28`,qF),O(`m26`,JF),O(`m27`,YF),O(`m1`,XF),O(`m35`,ZF),O(`m52`,QF),O(`m3`,$F),O(`m10`,eI),O(`m37`,tI),O(`m34`,nI),O(`m5`,rI),O(`m6`,iI),O(`m9`,aI),O(`m14`,oI),O(`m8`,sI),O(`m21`,cI),O(`m22`,lI),O(`m53`,uI),O(`m51`,dI),O(`m50`,fI),O(`m36`,pI),O(`m25`,mI),O(`m17`,hI),O(`m12`,gI),O(`m11`,_I),O(`m33`,vI),O(`m2`,yI),O(`m4`,bI);var xI=oe(`m`,RA,zA,lP,gF);export{xI as default};