@intent-hq/web 2.345.1 → 2.346.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (364) hide show
  1. package/package.json +1 -1
  2. package/web/app/immutable/assets/{0.BtTQsuHZ.css → 0.C6uvaa87.css} +1 -1
  3. package/web/app/immutable/chunks/-UJlOg-6.js +1 -0
  4. package/web/app/immutable/chunks/-Wo302Zr.js +9 -0
  5. package/web/app/immutable/chunks/0qEvU7Aj.js +8 -0
  6. package/web/app/immutable/chunks/1_fC7X8z.js +1 -0
  7. package/web/app/immutable/chunks/2V4-p70U.js +408 -0
  8. package/web/app/immutable/chunks/{D3mUsAm9.js → 3DAIKGff.js} +1 -1
  9. package/web/app/immutable/chunks/{elYeRxWm.js → 3as4gwP9.js} +7 -7
  10. package/web/app/immutable/chunks/{BqRoJfH0.js → 3h5ZjEwa.js} +1 -1
  11. package/web/app/immutable/chunks/{Dz4sFk1c.js → 4sUGQp1u.js} +1 -1
  12. package/web/app/immutable/chunks/{AzoskYOh.js → 5Ixgq0WC.js} +1 -1
  13. package/web/app/immutable/chunks/{CgQ2Q_uI.js → 71L4lHBq.js} +1 -1
  14. package/web/app/immutable/chunks/7eL9Pgig.js +1 -0
  15. package/web/app/immutable/chunks/{CWE4oREl.js → 9XVQ1GVX.js} +1 -1
  16. package/web/app/immutable/chunks/{C8dU7SM3.js → A8_BT67P.js} +1 -1
  17. package/web/app/immutable/chunks/ACNn9MHT.js +2 -0
  18. package/web/app/immutable/chunks/{Cv_J2c72.js → B-7vt8Nv.js} +1 -1
  19. package/web/app/immutable/chunks/B0-4rCYZ.js +2 -0
  20. package/web/app/immutable/chunks/{CD-XXU5z.js → B0WVH3Hg.js} +1 -1
  21. package/web/app/immutable/chunks/B0mNIdOb.js +1 -0
  22. package/web/app/immutable/chunks/{CWQrbZgx.js → B1HPKTBI.js} +1 -1
  23. package/web/app/immutable/chunks/{s_GzTTEG.js → B1U_DCBw.js} +1 -1
  24. package/web/app/immutable/chunks/{HKs3jfWW.js → B3D9gAmi.js} +1 -1
  25. package/web/app/immutable/chunks/{C-M7eh_Z.js → B4XZNQ4a.js} +1 -1
  26. package/web/app/immutable/chunks/{BqqN40AD.js → B4gIvcP2.js} +1 -1
  27. package/web/app/immutable/chunks/{C4dCVzfY.js → B55-cQLT.js} +1 -1
  28. package/web/app/immutable/chunks/B5HeJKYE.js +1 -0
  29. package/web/app/immutable/chunks/{BiRT6AoP.js → B79pUPc3.js} +9 -9
  30. package/web/app/immutable/chunks/{34C5M9lk.js → B7dTLx8u.js} +1 -1
  31. package/web/app/immutable/chunks/B83M2_sj.js +1 -0
  32. package/web/app/immutable/chunks/BAGVOK-j.js +4 -0
  33. package/web/app/immutable/chunks/{DXDMhDlS.js → BBlTlRXR.js} +1 -1
  34. package/web/app/immutable/chunks/{CpHZSST_.js → BDDEv5gU.js} +1 -1
  35. package/web/app/immutable/chunks/BDPAYMJ1.js +4 -0
  36. package/web/app/immutable/chunks/BDPqCRJm.js +2 -0
  37. package/web/app/immutable/chunks/{CoXBdOLx.js → BDZoh7yg.js} +1 -1
  38. package/web/app/immutable/chunks/{oilydQC6.js → BDtb6AfX.js} +1 -1
  39. package/web/app/immutable/chunks/{LeKgig9P.js → BDzYiKUH.js} +3 -3
  40. package/web/app/immutable/chunks/{DeBWJfUF.js → BJZ04Dji.js} +1 -1
  41. package/web/app/immutable/chunks/{A34-FDia.js → BK2lpqz4.js} +1 -1
  42. package/web/app/immutable/chunks/{DOo17E8X.js → BK64B_Ic.js} +7 -7
  43. package/web/app/immutable/chunks/{8XhHIJcn.js → BKw5KoGy.js} +1 -1
  44. package/web/app/immutable/chunks/{PqUcZw1l.js → BLaIjbEF.js} +1 -1
  45. package/web/app/immutable/chunks/{CMxRuwYt.js → BLl22NdQ.js} +1 -1
  46. package/web/app/immutable/chunks/{DTXLkH8c.js → BM7oCSp5.js} +1 -1
  47. package/web/app/immutable/chunks/{C8BVjzNA.js → BMKkyPLo.js} +1 -1
  48. package/web/app/immutable/chunks/BO8NImWp.js +1 -0
  49. package/web/app/immutable/chunks/BOxkenyY.js +1 -0
  50. package/web/app/immutable/chunks/{CW_fORnH.js → BOyF7pe9.js} +1 -1
  51. package/web/app/immutable/chunks/BQ5F0iVp.js +1 -0
  52. package/web/app/immutable/chunks/BQbcEQz0.js +1 -0
  53. package/web/app/immutable/chunks/{WQwO_6NF.js → BTNEDHav.js} +1 -1
  54. package/web/app/immutable/chunks/{RL06_5hJ.js → BVURea8L.js} +1 -1
  55. package/web/app/immutable/chunks/{hTzIX9qo.js → BW9EApvt.js} +10 -10
  56. package/web/app/immutable/chunks/BWAGtvpD.js +1 -0
  57. package/web/app/immutable/chunks/BWTugGQ8.js +1 -0
  58. package/web/app/immutable/chunks/{D_2_kcuU.js → BWZmCaEW.js} +1 -1
  59. package/web/app/immutable/chunks/{Dt_vOHph.js → BY3nRRgO.js} +3 -3
  60. package/web/app/immutable/chunks/{Ch8P3vqn.js → BYDvuR-h.js} +1 -1
  61. package/web/app/immutable/chunks/{CaGwo1Kh.js → BZYeogxf.js} +1 -1
  62. package/web/app/immutable/chunks/{RvvsGyv8.js → Ba1C4iSG.js} +1 -1
  63. package/web/app/immutable/chunks/{DSf8k2cE.js → BaYeKXL3.js} +1 -1
  64. package/web/app/immutable/chunks/{BZLRqiW7.js → BaYzTmbw.js} +1 -1
  65. package/web/app/immutable/chunks/Bbkml6DP.js +1 -0
  66. package/web/app/immutable/chunks/{9HNwwiNt.js → BcbQZUsh.js} +1 -1
  67. package/web/app/immutable/chunks/BcgSXbtK.js +1 -0
  68. package/web/app/immutable/chunks/{Z9xsSWyS.js → BeJ5WWx4.js} +22 -22
  69. package/web/app/immutable/chunks/{A0r9TbR7.js → BfbZn9QX.js} +1 -1
  70. package/web/app/immutable/chunks/BgKhYgm8.js +1 -0
  71. package/web/app/immutable/chunks/Bgi2L8Br.js +1 -0
  72. package/web/app/immutable/chunks/Bgw3O9rE.js +1 -0
  73. package/web/app/immutable/chunks/Big_dnEI.js +1 -0
  74. package/web/app/immutable/chunks/{CwqpuMd6.js → BjURBDIt.js} +5 -5
  75. package/web/app/immutable/chunks/{CvGYkRzD.js → BlEwAz4v.js} +1 -1
  76. package/web/app/immutable/chunks/{CCwwkuT-.js → BmEcZoA2.js} +1 -1
  77. package/web/app/immutable/chunks/{Duypuh1W.js → BnkmaA34.js} +1 -1
  78. package/web/app/immutable/chunks/BpYNQf9o.js +1 -0
  79. package/web/app/immutable/chunks/{m3ndyWcI.js → BqBqZaGQ.js} +1 -1
  80. package/web/app/immutable/chunks/{DOca_73f.js → BqyYlCY3.js} +1 -1
  81. package/web/app/immutable/chunks/BrIsEZwT.js +1 -0
  82. package/web/app/immutable/chunks/Brqq8vhd.js +6 -0
  83. package/web/app/immutable/chunks/{D6qSHwEu.js → Bxnf75xq.js} +1 -1
  84. package/web/app/immutable/chunks/ByLCbaqp.js +1 -0
  85. package/web/app/immutable/chunks/{DLQToZFF.js → C-OtpXcF.js} +1 -1
  86. package/web/app/immutable/chunks/{BZr7mr7Q.js → C1CDOGnh.js} +2 -2
  87. package/web/app/immutable/chunks/C1osWUn_.js +1 -0
  88. package/web/app/immutable/chunks/{BI7MYBTt.js → C33Dw59E.js} +1 -1
  89. package/web/app/immutable/chunks/{BMm9sGZ6.js → C3NeTp2u.js} +1 -1
  90. package/web/app/immutable/chunks/{DdSX2jjJ.js → C3VPe7p1.js} +1 -1
  91. package/web/app/immutable/chunks/{BYMNRS4c.js → C3oF1SK5.js} +1 -1
  92. package/web/app/immutable/chunks/{CW13jkE8.js → C4HHXGmJ.js} +1 -1
  93. package/web/app/immutable/chunks/{ByCIOkhM.js → C59or46M.js} +1 -1
  94. package/web/app/immutable/chunks/{CL2hu5s-.js → C5SissXF.js} +1 -1
  95. package/web/app/immutable/chunks/{Cr_Liz2C.js → C8XrM-qb.js} +1 -1
  96. package/web/app/immutable/chunks/CA6TS0WC.js +1 -0
  97. package/web/app/immutable/chunks/CAUaU8Wh.js +1 -0
  98. package/web/app/immutable/chunks/CAdgzoaK.js +1 -0
  99. package/web/app/immutable/chunks/{DHNidPtN.js → CCm1BgPl.js} +1 -1
  100. package/web/app/immutable/chunks/CDbQwqu1.js +1 -0
  101. package/web/app/immutable/chunks/CEsW1euQ.js +1 -0
  102. package/web/app/immutable/chunks/{CcPTLJNE.js → CFs6uWH2.js} +1 -1
  103. package/web/app/immutable/chunks/{D6YDmdhV.js → CGcQAX9W.js} +1 -1
  104. package/web/app/immutable/chunks/{CVYjvOCP.js → CHfmHJ17.js} +1 -1
  105. package/web/app/immutable/chunks/{DuLyqtXH.js → CJ_dtcmM.js} +1 -1
  106. package/web/app/immutable/chunks/{CxdrVCtW.js → CNT1n9YR.js} +1 -1
  107. package/web/app/immutable/chunks/CP8WYBBE.js +1 -0
  108. package/web/app/immutable/chunks/{BzbcgIXt.js → CQB76zlc.js} +1 -1
  109. package/web/app/immutable/chunks/{DpMTpLDQ.js → CQbtnalz.js} +1 -1
  110. package/web/app/immutable/chunks/{CWmsRWEf.js → CQyjMIYw.js} +1 -1
  111. package/web/app/immutable/chunks/CSQXURhP.js +1 -0
  112. package/web/app/immutable/chunks/{DnpnDt-B.js → CSg3z6A2.js} +1 -1
  113. package/web/app/immutable/chunks/{BMaybjSV.js → CVa6MqnK.js} +1 -1
  114. package/web/app/immutable/chunks/{BzzDMYz_.js → CXVUfxHv.js} +5 -5
  115. package/web/app/immutable/chunks/{ClTbUKJh.js → CXpFRnSj.js} +1 -1
  116. package/web/app/immutable/chunks/C_EpV6jU.js +2 -0
  117. package/web/app/immutable/chunks/Cb0zVN4i.js +1 -0
  118. package/web/app/immutable/chunks/{BP7CI4Qx.js → CbZEAbX5.js} +1 -1
  119. package/web/app/immutable/chunks/{BqQiAH0O.js → CcaAQlGA.js} +1 -1
  120. package/web/app/immutable/chunks/CgLoJgPR.js +1 -0
  121. package/web/app/immutable/chunks/{_6kx8oz-.js → CguBowm8.js} +1 -1
  122. package/web/app/immutable/chunks/{dEUeoghd.js → ChNPgGKQ.js} +1 -1
  123. package/web/app/immutable/chunks/{B203wRvP.js → Chpqmkx4.js} +1 -1
  124. package/web/app/immutable/chunks/{DbK3CxeL.js → CiIELmgj.js} +1 -1
  125. package/web/app/immutable/chunks/CiKocWhX.js +1 -0
  126. package/web/app/immutable/chunks/{BIoLrYT0.js → CjbCpI18.js} +1 -1
  127. package/web/app/immutable/chunks/{hY1hM8g2.js → Ckp5dOHW.js} +1 -1
  128. package/web/app/immutable/chunks/{D_uYvQAH.js → ClMg3ew2.js} +1 -1
  129. package/web/app/immutable/chunks/{A8JjhnEv.js → Clhk_Z-l.js} +1 -1
  130. package/web/app/immutable/chunks/{DxMV_lzZ.js → CmoBwSCp.js} +1 -1
  131. package/web/app/immutable/chunks/{B5tGFpkq.js → CpHzYkzi.js} +1 -1
  132. package/web/app/immutable/chunks/{p3fN-Vr3.js → Cq2aackv.js} +1 -1
  133. package/web/app/immutable/chunks/Cq8oeEXe.js +1 -0
  134. package/web/app/immutable/chunks/CrHk5l6X.js +1 -0
  135. package/web/app/immutable/chunks/{BxuxDWAX.js → CrjpdU4V.js} +1 -1
  136. package/web/app/immutable/chunks/CswFIiBb.js +1 -0
  137. package/web/app/immutable/chunks/{BLR6m4ri.js → CtDj7gZD.js} +1 -1
  138. package/web/app/immutable/chunks/{7Zs8wY6y.js → CvGEpOsC.js} +1 -1
  139. package/web/app/immutable/chunks/CvHwMug-.js +2 -0
  140. package/web/app/immutable/chunks/{CaxyE6o_.js → Cx31i8ng.js} +1 -1
  141. package/web/app/immutable/chunks/CzcD2H5U.js +2 -0
  142. package/web/app/immutable/chunks/CzdMU9Bu.js +2 -0
  143. package/web/app/immutable/chunks/{CKzqOQI8.js → D-TVq_rK.js} +1 -1
  144. package/web/app/immutable/chunks/{SopK520R.js → D-i7C44m.js} +2 -2
  145. package/web/app/immutable/chunks/{CcuS-fLp.js → D0I9E6A0.js} +1 -1
  146. package/web/app/immutable/chunks/{CoDSLIZp.js → D1CYDv8t.js} +1 -1
  147. package/web/app/immutable/chunks/{FBAcw4MJ.js → D31IcU1_.js} +1 -1
  148. package/web/app/immutable/chunks/{B39Mxie0.js → D3toWTag.js} +8 -8
  149. package/web/app/immutable/chunks/{BFp6vZSQ.js → D492HRYt.js} +1 -1
  150. package/web/app/immutable/chunks/{Vk-IHNCU.js → D7NdkRF-.js} +4 -4
  151. package/web/app/immutable/chunks/{DZNLst19.js → D7dPbXji.js} +1 -1
  152. package/web/app/immutable/chunks/D9jYN6_J.js +1 -0
  153. package/web/app/immutable/chunks/{n58mTCVv.js → D9jvlcNy.js} +1 -1
  154. package/web/app/immutable/chunks/{QE-hjQtm.js → DByMRbHr.js} +1 -1
  155. package/web/app/immutable/chunks/{kjMhmnu9.js → DDySjsub.js} +1 -1
  156. package/web/app/immutable/chunks/{Dnr9ynjr.js → DE8QOEZV.js} +1 -1
  157. package/web/app/immutable/chunks/{Ca05Jmq3.js → DF1uIj8u.js} +1 -1
  158. package/web/app/immutable/chunks/{BYFJ74nm.js → DFs6FJS8.js} +1 -1
  159. package/web/app/immutable/chunks/{CgW9XFcu.js → DGmRhalF.js} +1 -1
  160. package/web/app/immutable/chunks/DH-29Rs_.js +11 -0
  161. package/web/app/immutable/chunks/{BL8utEbB.js → DHGSAfCZ.js} +1 -1
  162. package/web/app/immutable/chunks/DHROL4K5.js +1 -0
  163. package/web/app/immutable/chunks/DKKFIb2l.js +1 -0
  164. package/web/app/immutable/chunks/DKTqwHrN.js +1 -0
  165. package/web/app/immutable/chunks/DMYKSC8W.js +2 -0
  166. package/web/app/immutable/chunks/{-7ARPWgR.js → DMjNjha0.js} +1 -1
  167. package/web/app/immutable/chunks/{C1nHAGLu.js → DNWBkvFP.js} +1 -1
  168. package/web/app/immutable/chunks/DNjgs7AU.js +1 -0
  169. package/web/app/immutable/chunks/{4UXIq5lZ.js → DOB2ATTF.js} +5 -5
  170. package/web/app/immutable/chunks/{BrTyn-oU.js → DOCWMdWU.js} +1 -1
  171. package/web/app/immutable/chunks/{Z8gQAmFb.js → DOKxXiSI.js} +18 -18
  172. package/web/app/immutable/chunks/DOPeTAKk.js +13 -0
  173. package/web/app/immutable/chunks/{PrJr0a2j.js → DPUWJyjX.js} +1 -1
  174. package/web/app/immutable/chunks/{_xNtAuSN.js → DQlH_Wce.js} +1 -1
  175. package/web/app/immutable/chunks/{BIEvH8pu.js → DRZKWEq3.js} +1 -1
  176. package/web/app/immutable/chunks/DTSEdINd.js +2 -0
  177. package/web/app/immutable/chunks/{B7o4NziF.js → DUQV_xq3.js} +1 -1
  178. package/web/app/immutable/chunks/{BNuo4lAs.js → DW9MEQey.js} +1 -1
  179. package/web/app/immutable/chunks/{BL8tUtYB.js → DXnd4CJZ.js} +1 -1
  180. package/web/app/immutable/chunks/DYnCJwSs.js +1 -0
  181. package/web/app/immutable/chunks/DZ3SUe8R.js +1 -0
  182. package/web/app/immutable/chunks/{BmP1Wws6.js → DZyAzxxC.js} +1 -1
  183. package/web/app/immutable/chunks/D_SZXZdx.js +1 -0
  184. package/web/app/immutable/chunks/{BhMsVKL2.js → DcZKw8cP.js} +2 -2
  185. package/web/app/immutable/chunks/{C7tPYy06.js → DccrGg38.js} +22 -22
  186. package/web/app/immutable/chunks/DcwC09tE.js +1 -0
  187. package/web/app/immutable/chunks/{DSbO2mrE.js → DdVIXVso.js} +1 -1
  188. package/web/app/immutable/chunks/DeCAcSD9.js +19 -0
  189. package/web/app/immutable/chunks/DfjJilaB.js +2 -0
  190. package/web/app/immutable/chunks/{XzMpMF29.js → DgHZa_R5.js} +1 -1
  191. package/web/app/immutable/chunks/{DEGVinbl.js → DgwMMJRI.js} +1 -1
  192. package/web/app/immutable/chunks/{BecPnSy0.js → DhHSeQsG.js} +3 -3
  193. package/web/app/immutable/chunks/{Bk8EDJRq.js → Dj8J0eqI.js} +1 -1
  194. package/web/app/immutable/chunks/DjdPlKc4.js +2 -0
  195. package/web/app/immutable/chunks/{finAdq6c.js → DknPpgEW.js} +1 -1
  196. package/web/app/immutable/chunks/Dkr_RXdV.js +1 -0
  197. package/web/app/immutable/chunks/Dkva_evl.js +11 -0
  198. package/web/app/immutable/chunks/{Cf09_YLr.js → Do80Vc58.js} +1 -1
  199. package/web/app/immutable/chunks/{X8W_BfF4.js → Dr45ln4z.js} +1 -1
  200. package/web/app/immutable/chunks/DryyHkNv.js +1 -0
  201. package/web/app/immutable/chunks/{BdkEw9JP.js → DtAyUyC0.js} +1 -1
  202. package/web/app/immutable/chunks/Dto-4yb7.js +1 -0
  203. package/web/app/immutable/chunks/{CSdIXJpO.js → DukmxKgk.js} +1 -1
  204. package/web/app/immutable/chunks/{BwSA3fCS.js → DwA_Z_f6.js} +1 -1
  205. package/web/app/immutable/chunks/{Drt5qRI8.js → Dx3sZmi8.js} +1 -1
  206. package/web/app/immutable/chunks/{CcXuSxXv.js → DxBGs1BP.js} +1 -1
  207. package/web/app/immutable/chunks/{CeswpNyE.js → DzGNgfrZ.js} +1 -1
  208. package/web/app/immutable/chunks/DzKYjnRy.js +2 -0
  209. package/web/app/immutable/chunks/{HvBMlLJP.js → DzejiLWr.js} +3 -3
  210. package/web/app/immutable/chunks/{BBasLmtQ.js → G_wYaln-.js} +1 -1
  211. package/web/app/immutable/chunks/GzTl4Sb0.js +1 -0
  212. package/web/app/immutable/chunks/IRbjhecv.js +8 -0
  213. package/web/app/immutable/chunks/OPvMR-5p.js +1 -0
  214. package/web/app/immutable/chunks/{gURPJ1oX.js → SVZRr24P.js} +1 -1
  215. package/web/app/immutable/chunks/{DYmPPjiq.js → T9tywf_e.js} +1 -1
  216. package/web/app/immutable/chunks/TL85KYB9.js +1 -0
  217. package/web/app/immutable/chunks/{BgX4ALX_.js → U6cHmbYS.js} +3 -3
  218. package/web/app/immutable/chunks/{DLqztIqC.js → V9qci_dz.js} +1 -1
  219. package/web/app/immutable/chunks/{BESEELLz.js → W7sv3DY6.js} +1 -1
  220. package/web/app/immutable/chunks/{dR3YHGeF.js → WbTmlouE.js} +1 -1
  221. package/web/app/immutable/chunks/{CW41MFVu.js → Y4VeEPHl.js} +1 -1
  222. package/web/app/immutable/chunks/{BVviSubD.js → YYacqJ9a.js} +1 -1
  223. package/web/app/immutable/chunks/{Q-Oe5gQg.js → Zl17pAXX.js} +1 -1
  224. package/web/app/immutable/chunks/{BVt_T8ao.js → aQy6qVNs.js} +1 -1
  225. package/web/app/immutable/chunks/{C3SYquhf.js → ahX1JzRb.js} +1 -1
  226. package/web/app/immutable/chunks/{B0biUQQF.js → asQ_ruFQ.js} +1 -1
  227. package/web/app/immutable/chunks/{Cc_BIXdP.js → bKyElw3h.js} +1 -1
  228. package/web/app/immutable/chunks/cATI0wnI.js +1 -0
  229. package/web/app/immutable/chunks/ciTxbtqU.js +1 -0
  230. package/web/app/immutable/chunks/d-Ep-sfP.js +1 -0
  231. package/web/app/immutable/chunks/dBZS3-kp.js +3 -0
  232. package/web/app/immutable/chunks/{B1Zj1zGG.js → eNHX5lds.js} +1 -1
  233. package/web/app/immutable/chunks/etVaBLxV.js +6 -0
  234. package/web/app/immutable/chunks/euZ22sAu.js +1 -0
  235. package/web/app/immutable/chunks/{COrK0goa.js → ftma9Ybn.js} +1 -1
  236. package/web/app/immutable/chunks/fzs92dqr.js +1 -0
  237. package/web/app/immutable/chunks/i2sZiDEq.js +1 -0
  238. package/web/app/immutable/chunks/iKgBWWl-.js +2 -0
  239. package/web/app/immutable/chunks/{BRww0MVx.js → jlJQSpH6.js} +1 -1
  240. package/web/app/immutable/chunks/{DC_750GV.js → ouMKS3MA.js} +1 -1
  241. package/web/app/immutable/chunks/{jn3Rypn_.js → s0TWEExr.js} +1 -1
  242. package/web/app/immutable/chunks/{XIXbmV8F.js → txy0Txom.js} +1 -1
  243. package/web/app/immutable/chunks/{CYf2hryc.js → wTgWcOy1.js} +1 -1
  244. package/web/app/immutable/chunks/{BIlaJXMS.js → z-RLr2Z1.js} +1 -1
  245. package/web/app/immutable/chunks/zGl9gaL0.js +1 -0
  246. package/web/app/immutable/chunks/{DXCE75Ih.js → z_Tdw9N5.js} +1 -1
  247. package/web/app/immutable/entry/app.BXnRxWvG.js +4 -0
  248. package/web/app/immutable/entry/start.BX3EKd8C.js +1 -0
  249. package/web/app/immutable/nodes/0.CFk1FXLg.js +1 -0
  250. package/web/app/immutable/nodes/1.Bd67D1tA.js +1 -0
  251. package/web/app/immutable/nodes/10.CTZ0L3wZ.js +41 -0
  252. package/web/app/immutable/nodes/11.CH_h0WbH.js +1 -0
  253. package/web/app/immutable/nodes/12.DhihsAtw.js +1 -0
  254. package/web/app/immutable/nodes/{13.CscEwLVK.js → 13.B727xJXs.js} +5 -5
  255. package/web/app/immutable/nodes/14.CgITgBOZ.js +3 -0
  256. package/web/app/immutable/nodes/15.CCzIPJGf.js +1 -0
  257. package/web/app/immutable/nodes/{16.Cfgb0nOQ.js → 16.CbtJfPHZ.js} +2 -2
  258. package/web/app/immutable/nodes/17.CelzCwXF.js +1 -0
  259. package/web/app/immutable/nodes/{17.DFAwhIn_.js → 18.fqvApY-g.js} +2 -2
  260. package/web/app/immutable/nodes/2.t-1b60vK.js +13 -0
  261. package/web/app/immutable/nodes/3.4L0YPvZL.js +2 -0
  262. package/web/app/immutable/nodes/4.BLQgcpcU.js +1 -0
  263. package/web/app/immutable/nodes/5.Bp_OiOTI.js +5 -0
  264. package/web/app/immutable/nodes/6.CcuwCBp4.js +1 -0
  265. package/web/app/immutable/nodes/7.B-TRUT7o.js +1 -0
  266. package/web/app/immutable/nodes/{8.bG-TRaEn.js → 8.CaG5gby5.js} +9 -9
  267. package/web/app/immutable/nodes/{9.CBynOn0l.js → 9.DosMxTmg.js} +17 -17
  268. package/web/app/version.json +1 -1
  269. package/web/index.html +28 -21
  270. package/web/app/immutable/chunks/-6JGlnE4.js +0 -1
  271. package/web/app/immutable/chunks/-SwunqO3.js +0 -1
  272. package/web/app/immutable/chunks/3G6kqi6m.js +0 -19
  273. package/web/app/immutable/chunks/5MLUIYhU.js +0 -1
  274. package/web/app/immutable/chunks/B-jmn73b.js +0 -2
  275. package/web/app/immutable/chunks/B1C_jfbV.js +0 -1
  276. package/web/app/immutable/chunks/B65N3w4u.js +0 -1
  277. package/web/app/immutable/chunks/B6iA2dvO.js +0 -1
  278. package/web/app/immutable/chunks/BDACnpyW.js +0 -1
  279. package/web/app/immutable/chunks/BO67r0G6.js +0 -4
  280. package/web/app/immutable/chunks/BP5uyQTv.js +0 -18
  281. package/web/app/immutable/chunks/BPvruhgT.js +0 -13
  282. package/web/app/immutable/chunks/BQEszNiH.js +0 -1
  283. package/web/app/immutable/chunks/BVPvh88-.js +0 -1
  284. package/web/app/immutable/chunks/BXeiKdwz.js +0 -1
  285. package/web/app/immutable/chunks/BY-x4QLt.js +0 -1
  286. package/web/app/immutable/chunks/BZcpShp8.js +0 -9
  287. package/web/app/immutable/chunks/BbNk8c_P.js +0 -1
  288. package/web/app/immutable/chunks/BdD2ADMz.js +0 -1
  289. package/web/app/immutable/chunks/BlZYlbA9.js +0 -1
  290. package/web/app/immutable/chunks/BoCZH6mk.js +0 -1
  291. package/web/app/immutable/chunks/BsRwjCPo.js +0 -1
  292. package/web/app/immutable/chunks/BtXLgEvw.js +0 -6
  293. package/web/app/immutable/chunks/C4pN30lR.js +0 -2
  294. package/web/app/immutable/chunks/C52Qm4vO.js +0 -1
  295. package/web/app/immutable/chunks/C5AlgdZ0.js +0 -1
  296. package/web/app/immutable/chunks/CDQzU1Fp.js +0 -1
  297. package/web/app/immutable/chunks/CEQZVenN.js +0 -6
  298. package/web/app/immutable/chunks/CFduDdmx.js +0 -1
  299. package/web/app/immutable/chunks/CN-2rfdx.js +0 -1
  300. package/web/app/immutable/chunks/CRQGIXhv.js +0 -1
  301. package/web/app/immutable/chunks/CbCgON3R.js +0 -1
  302. package/web/app/immutable/chunks/CcvLGgrc.js +0 -1
  303. package/web/app/immutable/chunks/CdZRK319.js +0 -408
  304. package/web/app/immutable/chunks/Cfj3Lc6y.js +0 -1
  305. package/web/app/immutable/chunks/Ck9ZyE1n.js +0 -2
  306. package/web/app/immutable/chunks/CoLl8pQb.js +0 -1
  307. package/web/app/immutable/chunks/Cq0XJSNB.js +0 -1
  308. package/web/app/immutable/chunks/CuhrgDBI.js +0 -1
  309. package/web/app/immutable/chunks/CvWyDJGm.js +0 -1
  310. package/web/app/immutable/chunks/D5jO2tMO.js +0 -1
  311. package/web/app/immutable/chunks/DATvyyct.js +0 -1
  312. package/web/app/immutable/chunks/DBN9LmpO.js +0 -2
  313. package/web/app/immutable/chunks/DIP3ex32.js +0 -1
  314. package/web/app/immutable/chunks/DKBMY4SO.js +0 -2
  315. package/web/app/immutable/chunks/DPHzX3VR.js +0 -1
  316. package/web/app/immutable/chunks/DPLUjB3C.js +0 -11
  317. package/web/app/immutable/chunks/DTQYcznv.js +0 -1
  318. package/web/app/immutable/chunks/DU8kuP6M.js +0 -1
  319. package/web/app/immutable/chunks/DZmwTozc.js +0 -1
  320. package/web/app/immutable/chunks/DbGgneou.js +0 -3
  321. package/web/app/immutable/chunks/DbSsu2ZZ.js +0 -2
  322. package/web/app/immutable/chunks/Dc64E_SR.js +0 -1
  323. package/web/app/immutable/chunks/Ddw98WmY.js +0 -8
  324. package/web/app/immutable/chunks/DdxviGOy.js +0 -2
  325. package/web/app/immutable/chunks/De4z9gHo.js +0 -1
  326. package/web/app/immutable/chunks/DeBZgR-l.js +0 -2
  327. package/web/app/immutable/chunks/Dj_XMlva.js +0 -1
  328. package/web/app/immutable/chunks/Dk6iNNLu.js +0 -1
  329. package/web/app/immutable/chunks/DlN76n90.js +0 -1
  330. package/web/app/immutable/chunks/DlxIHej5.js +0 -1
  331. package/web/app/immutable/chunks/DoBQR8Vx.js +0 -4
  332. package/web/app/immutable/chunks/DtTm3-vx.js +0 -2
  333. package/web/app/immutable/chunks/DtftInpc.js +0 -1
  334. package/web/app/immutable/chunks/DvCoPCgB.js +0 -2
  335. package/web/app/immutable/chunks/DyASeQ3m.js +0 -2
  336. package/web/app/immutable/chunks/Ek5W6pp5.js +0 -1
  337. package/web/app/immutable/chunks/H60Tbroe.js +0 -1
  338. package/web/app/immutable/chunks/I2ER02OI.js +0 -2
  339. package/web/app/immutable/chunks/JzAjTSJP.js +0 -1
  340. package/web/app/immutable/chunks/S3l_n0fN.js +0 -1
  341. package/web/app/immutable/chunks/UYKGMt9K.js +0 -1
  342. package/web/app/immutable/chunks/VD4zAAAW.js +0 -1
  343. package/web/app/immutable/chunks/domP6Duj.js +0 -1
  344. package/web/app/immutable/chunks/exKuue_y.js +0 -2
  345. package/web/app/immutable/chunks/h4-gUr-R.js +0 -1
  346. package/web/app/immutable/chunks/oPIupn-5.js +0 -1
  347. package/web/app/immutable/chunks/rWjPMnbJ.js +0 -1
  348. package/web/app/immutable/chunks/uo2kAWaz.js +0 -1
  349. package/web/app/immutable/entry/app.B3U21m46.js +0 -4
  350. package/web/app/immutable/entry/start.BmptZn82.js +0 -1
  351. package/web/app/immutable/nodes/0.CWw0htIy.js +0 -1
  352. package/web/app/immutable/nodes/1.CwxWqCh2.js +0 -1
  353. package/web/app/immutable/nodes/10.DsQSJA4U.js +0 -41
  354. package/web/app/immutable/nodes/11.C9N9_Xb9.js +0 -1
  355. package/web/app/immutable/nodes/12.CqRfopX4.js +0 -1
  356. package/web/app/immutable/nodes/14.CGbyYvxu.js +0 -3
  357. package/web/app/immutable/nodes/15.BWtoiI44.js +0 -1
  358. package/web/app/immutable/nodes/2.DTAk55p0.js +0 -13
  359. package/web/app/immutable/nodes/3.DGPBblLK.js +0 -2
  360. package/web/app/immutable/nodes/4.ReQ1u5-M.js +0 -1
  361. package/web/app/immutable/nodes/5.Dp2B2lHQ.js +0 -5
  362. package/web/app/immutable/nodes/6.BpkWHnQJ.js +0 -1
  363. package/web/app/immutable/nodes/7.C7_Pil7L.js +0 -1
  364. /package/web/app/immutable/assets/{17.Cznk2DRv.css → 18.Cznk2DRv.css} +0 -0
@@ -1 +1 @@
1
- import{d as s}from"./CEQZVenN.js";import{a as t}from"./BdWqymET.js";import{cG as i}from"./B0biUQQF.js";import{Iz as a}from"./A0r9TbR7.js";import{setLinkActionMenuLinkedWorkspaces as n}from"./Ddqq3yIK.js";const c=new t("LinkActionMenuLinkedWorkspaces");async function u(r,e){if(i.select(a.state)?.capabilities.prWorkspaceLookup===1)try{const o=await s.workspaces.findByPullRequest(e);n(r,o)}catch(o){c.debug("PR workspace lookup failed",{url:e,error:o})}}export{u as loadLinkActionMenuLinkedWorkspaces};
1
+ import{d as s}from"./etVaBLxV.js";import{a as t}from"./BdWqymET.js";import{cG as i}from"./asQ_ruFQ.js";import{Iz as a}from"./BfbZn9QX.js";import{setLinkActionMenuLinkedWorkspaces as n}from"./Ddqq3yIK.js";const c=new t("LinkActionMenuLinkedWorkspaces");async function u(r,e){if(i.select(a.state)?.capabilities.prWorkspaceLookup===1)try{const o=await s.workspaces.findByPullRequest(e);n(r,o)}catch(o){c.debug("PR workspace lookup failed",{url:e,error:o})}}export{u as loadLinkActionMenuLinkedWorkspaces};
@@ -1 +1 @@
1
- import{p as k}from"./BqqN40AD.js";import{bp as a}from"./DTQYcznv.js";import{Iz as r,nw as i}from"./A0r9TbR7.js";import{bT as _,aO as g}from"./B0biUQQF.js";import{bQ as H}from"./Ca05Jmq3.js";import{ap as d,x as f,y as b}from"./SopK520R.js";function c(e){return e.lastBackupAt?k(e.lastBackupAt):""}function l(e){if(e.starting)return a.workspaceHome_starting_label();if(e.state==="moving")return a.workspaceHome_banner_moving();if(e.unknownState)return a.workspaceHome_banner_detachedNoBackup({name:e.name});const o=c(e);return o?a.workspaceHome_banner_detached({name:e.name,time:o}):a.workspaceHome_banner_detachedNoBackup({name:e.name})}function T(e){return e?.unavailable?l(e):null}function O(e){if(e.banner==="detached"||e.banner==="moving")return l(e);if(e.banner!=="backupWarning")return"";const o=c(e);return o?a.workspaceHome_banner_backupWarning({name:e.name,time:o}):a.workspaceHome_banner_backupWarningNoBackup({name:e.name})}function x(e){return e==="detached"?a.workspaceHome_marker_detached():a.workspaceHome_marker_moving()}function N(e){const o=c(e);return o?a.workspaceHome_header_lastBackup({time:o}):null}function y(e){if(!e.moveWarning)return null;const o=c(e);return o?a.workspaceHome_moveDialog_warning({name:e.name,time:o}):a.workspaceHome_moveDialog_warningNoBackup({name:e.name})}function E(e){switch(e.code){case"forbidden":return a.workspaceHome_moveError_forbidden();case"homes-unsupported":return a.workspaceHome_moveError_homesUnsupported();case"home-moving":return a.workspaceHome_moveError_homeMoving();case"home-target-unavailable":return a.workspaceHome_moveError_targetUnavailable();case"machine-update-required":return a.workspaceHome_moveError_updateRequired();default:return a.workspaceHome_moveError_failed({message:e.message})}}const p=new WeakMap,R=r.createSelector((e,o)=>{const n=i(e.workspace.workspaces,o),t=n?.home;if(!t)return null;const s=p.get(t);if(s)return s;const m=d(n);return m&&p.set(t,m),m}),A=r.createSelector((e,o)=>f(i(e.workspace.workspaces,o),!_.select(e,o))),D=r.createSelector((e,o)=>e.workspaceHome.waiting[o]===!0),F=r.createSelector(e=>e.workspaceHome.dialogWorkspaceId),L=r.createSelector(e=>e.workspaceHome.moveStatus==="submitting"),U=r.createSelector(e=>e.workspaceHome.moveFailure),h=[],u=new Map,V=r.createSelector((e,o)=>{if(!o)return h;const n=b({agents:g.select(e,o),machineRows:H.select(e)}),t=JSON.stringify(n),s=u.get(o);return s?.key===t?s.options:(u.set(o,{key:t,options:n}),n)}),q=r.createSelector((e,o)=>i(e.workspace.workspaces,o)!==void 0);export{N as a,x as b,y as c,T as d,l as e,D as f,F as g,O as h,U as i,V as j,L as k,R as l,E as m,q as n,A as s};
1
+ import{p as k}from"./B4gIvcP2.js";import{bo as a}from"./D9jYN6_J.js";import{Iz as r,nw as i}from"./BfbZn9QX.js";import{bT as _,aO as g}from"./asQ_ruFQ.js";import{bQ as H}from"./DF1uIj8u.js";import{ap as d,x as f,y as b}from"./D-i7C44m.js";function c(e){return e.lastBackupAt?k(e.lastBackupAt):""}function l(e){if(e.starting)return a.workspaceHome_starting_label();if(e.state==="moving")return a.workspaceHome_banner_moving();if(e.unknownState)return a.workspaceHome_banner_detachedNoBackup({name:e.name});const o=c(e);return o?a.workspaceHome_banner_detached({name:e.name,time:o}):a.workspaceHome_banner_detachedNoBackup({name:e.name})}function T(e){return e?.unavailable?l(e):null}function O(e){if(e.banner==="detached"||e.banner==="moving")return l(e);if(e.banner!=="backupWarning")return"";const o=c(e);return o?a.workspaceHome_banner_backupWarning({name:e.name,time:o}):a.workspaceHome_banner_backupWarningNoBackup({name:e.name})}function x(e){return e==="detached"?a.workspaceHome_marker_detached():a.workspaceHome_marker_moving()}function N(e){const o=c(e);return o?a.workspaceHome_header_lastBackup({time:o}):null}function y(e){if(!e.moveWarning)return null;const o=c(e);return o?a.workspaceHome_moveDialog_warning({name:e.name,time:o}):a.workspaceHome_moveDialog_warningNoBackup({name:e.name})}function E(e){switch(e.code){case"forbidden":return a.workspaceHome_moveError_forbidden();case"homes-unsupported":return a.workspaceHome_moveError_homesUnsupported();case"home-moving":return a.workspaceHome_moveError_homeMoving();case"home-target-unavailable":return a.workspaceHome_moveError_targetUnavailable();case"machine-update-required":return a.workspaceHome_moveError_updateRequired();default:return a.workspaceHome_moveError_failed({message:e.message})}}const u=new WeakMap,R=r.createSelector((e,o)=>{const n=i(e.workspace.workspaces,o),t=n?.home;if(!t)return null;const s=u.get(t);if(s)return s;const m=d(n);return m&&u.set(t,m),m}),A=r.createSelector((e,o)=>f(i(e.workspace.workspaces,o),!_.select(e,o))),D=r.createSelector((e,o)=>e.workspaceHome.waiting[o]===!0),F=r.createSelector(e=>e.workspaceHome.dialogWorkspaceId),L=r.createSelector(e=>e.workspaceHome.moveStatus==="submitting"),U=r.createSelector(e=>e.workspaceHome.moveFailure),h=[],p=new Map,V=r.createSelector((e,o)=>{if(!o)return h;const n=b({agents:g.select(e,o),machineRows:H.select(e)}),t=JSON.stringify(n),s=p.get(o);return s?.key===t?s.options:(p.set(o,{key:t,options:n}),n)}),q=r.createSelector((e,o)=>i(e.workspace.workspaces,o)!==void 0);export{N as a,x as b,y as c,T as d,l as e,D as f,F as g,O as h,U as i,V as j,L as k,R as l,E as m,q as n,A as s};
@@ -0,0 +1,4 @@
1
+ import{bo as b,t as wt,bq as H,by as Tt,bs as xt,b as kt,bu as D}from"./D9jYN6_J.js";import{bs as It,ca as Q,aD as t,a7 as At,ay as X,W as w,bn as Pt,bS as N,c9 as f,aA as J,aB as x,a5 as I,bA as A,bl as P,b_ as F,bO as S}from"./DYhIMPy1.js";import{i as L}from"./7eL9Pgig.js";import{k as St}from"./OPvMR-5p.js";import{c as Wt}from"./DZyAzxxC.js";import{C as V}from"./DypB-Dwi.js";import{L as $t}from"./CSiaiLHL.js";import"./BW9EApvt.js";import"./C_EpV6jU.js";import"./Cx31i8ng.js";import{bc as Dt}from"./CAUaU8Wh.js";import"./Dkva_evl.js";import"./BAGVOK-j.js";import{Iz as B,J4 as Nt,Jl as Ft,J9 as Lt,uR as Bt}from"./BfbZn9QX.js";import{T as Et}from"./C1CDOGnh.js";import{g as Ut}from"./DfN8_dcw.js";import{dr as Ot}from"./asQ_ruFQ.js";import{bR as jt,bL as Rt,b6 as Ht}from"./ChNPgGKQ.js";import"./d-Ep-sfP.js";import{M as Jt}from"./CrHk5l6X.js";import{V as Mt}from"./zGl9gaL0.js";import{O as Vt}from"./Dto-4yb7.js";import{c as qt}from"./ChTqQfQN.js";import{i as zt}from"./H2jLkRRS.js";const T=new $t({category:"change-converters"});function M(e,n){return e.path||e.file||e.filePath||e.relativePath||n?.filePath}function Y(e,n){return{additions:e.additions??n?.additions??0,deletions:e.deletions??n?.deletions??0,binary:e.binary??!1}}function Gt(e,n){if(n.actor?.type==="agent"&&n.actor.id){const r=n.actor;return{agentId:r.id,agentName:r.name||b.fileTracking_changeTimeline_agent_fallback(),sessionId:r.sessionId||e.sessionId||"",turnNumber:r.turnNumber??e.turnNumber??0,messageId:r.messageId,timestamp:new Date(n.timestamp).getTime()}}if(e.agentId)return{agentId:e.agentId,agentName:e.agentName||b.fileTracking_changeTimeline_agent_fallback(),sessionId:e.sessionId||"",turnNumber:e.turnNumber||0,timestamp:new Date(n.timestamp).getTime()}}function Z(e,n){return{timestamp:new Date(e.timestamp).getTime(),manual:e.actor?.type==="user",agent:Gt(n,e)}}function tt(e,n){return{oldContent:n?.oldContent??e.oldContent,newContent:n?.newContent??e.newContent,diff:e.diff??n?.diff}}function et(e,n,r){return r!==void 0?`${e}-${n}-${r}`:`${e}-${n}`}function Kt(e){try{const n=e.data||{},r=e.codeChange;T.debug("Converting event to TrackedChange",{eventType:e.type,eventId:e.id,hasData:!!n,hasCodeChange:!!r});const c=M(n,r);if(e.type.startsWith("file:")&&c){const d=Y(n,r);return T.debug("Creating TrackedChange for file event",{filePath:c,stats:d,hasDiff:!!(n.diff||r?.diff)}),[{id:et("event",e.id),file:c,relativePath:c,stage:V.Unstaged,stats:d,attribution:Z(e,n),content:tt(n,r)}]}return(e.type==="agent:completed"||e.type.startsWith("agent:"))&&n.fileChanges&&Array.isArray(n.fileChanges)?(T.debug("Creating TrackedChanges for agent event",{eventType:e.type,fileChangesCount:n.fileChanges.length,agentId:n.agentId}),n.fileChanges.filter(d=>M(d)?!0:(T.warn("Skipping file change without path",{change:d}),!1)).map((d,s)=>{const v=M(d);if(!v)throw new Error("file change without path");return{id:et("event",e.id,s),file:v,relativePath:v,stage:V.Unstaged,stats:Y(d),attribution:Z(e,n),content:tt(d)}})):(T.debug("No TrackedChanges created for event",{eventType:e.type,eventId:e.id,hasFilePath:!!c,hasFileChanges:!!(n.fileChanges&&Array.isArray(n.fileChanges))}),[])}catch(n){return T.error("Error converting event to TrackedChange",n instanceof Error?n:new Error(String(n)),{eventType:e.type,eventId:e.id}),[]}}function Qt(e){if(!e)return{oldContent:"",newContent:""};const n=[],r=[],c=e.split(`
2
+ `);c.length>0&&c[c.length-1]===""&&c.pop();let d=!1;for(const s of c)if(!(s.startsWith("diff --git")||s.startsWith("index ")||s.startsWith("--- ")||s.startsWith("+++ ")||s.startsWith("\"))){if(s.startsWith("@@")){d=!0;continue}d&&(s.startsWith("+")?r.push(s.slice(1)):s.startsWith("-")?n.push(s.slice(1)):s.startsWith(" ")?(n.push(s.slice(1)),r.push(s.slice(1))):s===""&&(n.push(""),r.push("")))}return{oldContent:n.join(`
3
+ `),newContent:r.join(`
4
+ `)}}var Xt=x("<!> <!>",1),Yt=x('<div class="flex items-center gap-1.5 px-3 py-1.5 text-xs text-subtle bg-muted/50 border-b border-border"><span> </span></div>'),Zt=x('<div class="flex flex-col h-full"><!> <div class="flex-1 min-h-0"><!></div></div>'),te=x('<div class="flex flex-col items-center justify-center h-full text-subtle gap-4"><p class="text-sm"> </p> <p class="text-xs opacity-70"> </p></div>'),ee=x('<p class="text-xs opacity-70"> </p>'),ne=x('<div class="flex flex-col items-center justify-center h-full text-subtle gap-4"><p class="text-sm"> </p> <!></div>');function ae(e,n){if(new.target)return wt({component:ae,...e});It(n,!0);const r=()=>D(lt,"$workspace",v),c=()=>D(st,"$foldUnchanged",v),d=()=>D(rt,"$lineWrapping",v),s=()=>D(ot,"$diffSideBySide",v),[v,nt]=xt(),at=a=>{Mt(a,{embedded:!0,get foldEnabled(){return c()},onToggleFold:()=>B.dispatch(Lt()),get wrapEnabled(){return d()},onToggleWrap:()=>B.dispatch(Ft()),get splitEnabled(){return s()},onToggleSplit:()=>B.dispatch(Nt())})},it=a=>{var i=Xt(),u=X(i);{let m=f(()=>b.layout_diffHeader_goToFile_tooltip());Wt(u,()=>Jt,(l,h)=>{h(l,{get icon(){return Dt},get label(){return t(m)},onclick:$=>gt()})})}var y=N(u,2);{var C=m=>{Vt(m,{get filePath(){return t(z)},get workspaceId(){return _()},isDirectory:!1,embedded:!0,get workspaceFolderPath(){return t(O)}})};L(y,m=>{t(z)&&m(C)})}w(a,i)},rt=jt(),st=Rt(),ot=Ht(),dt=qt("ActivityChangesTabType");let E=H(n,"tab",7),_=H(n,"workspaceId",7),U=H(n,"isActive",7);const q=Ut(),lt=Ot(_()),O=f(()=>r()?.worktreePath||r()?.repositoryPath||void 0),o=f(()=>E().data?.event),ct=f(()=>t(o)?Kt(t(o)):[]),g=f(()=>t(ct)[0]),p=f(()=>t(g)?.relativePath||t(g)?.file||null),z=f(()=>t(p)&&t(O)?zt(t(p))?t(p):`${t(O)}/${t(p)}`:null),j=f(()=>()=>{if(!t(o))return null;const a=t(o).data,i=t(o).codeChange;return a?.diff||i?.diff||t(g)?.content?.diff||null}),G=f(()=>()=>t(g)?.content?!!(t(g).content.oldContent&&t(g).content.newContent):!1);function ft(a){if(!a)return;const i=a.match(/@@ -(\d+)/);return i?parseInt(i[1],10):void 0}const k=f(()=>{if(t(G)()&&t(g)?.content)return{oldContent:t(g).content.oldContent??"",newContent:t(g).content.newContent??""};const a=t(j)();return a?Qt(a):null}),W=f(()=>ft(t(j)())),pt=f(()=>t(W)!==void 0&&t(W)>1),ut=f(()=>{const a=t(p)||"",i=t(o)?.data||{};return{id:`activity-${t(o)?.id||"unknown"}-${a}`,file:a,relativePath:a,stage:V.Committed,status:t(g)?.status||"modified",stats:{additions:i?.additions||t(g)?.stats?.additions||0,deletions:i?.deletions||t(g)?.stats?.deletions||0},attribution:{timestamp:t(o)?.timestamp?new Date(t(o).timestamp).getTime():Date.now()},content:t(k)?{oldContent:t(k).oldContent,newContent:t(k).newContent}:void 0}});function gt(a){if(!t(p))return;const u={type:"file",title:t(p).split("/").pop()||t(p),closable:!0,filePath:t(p),workspaceId:_()};B.dispatch(Bt(_(),u))}Q(()=>{!q||!U()||q.registerActions({display:at,actions:it})}),Q(()=>{if(t(o)){const a=t(o).data;dt.debug("Activity event diff info",{eventType:t(o).type,eventId:t(o).id,filePath:t(p),hasDiffString:!!t(j)(),hasOldNewContent:t(G)(),hasDiffContents:!!t(k),dataAdditions:a?.additions,dataDeletions:a?.deletions})}});var ht={get tab(){return E()},set tab(a){E(a),J()},get workspaceId(){return _()},set workspaceId(a){_(a),J()},get isActive(){return U()},set isActive(a){U(a),J()},$set:Tt,$on:(a,i)=>kt(n,a,i)},K=At(),mt=X(K);{var vt=a=>{var i=Zt(),u=I(i);{var y=l=>{var h=Yt(),$=I(h),R=P($,!0);A(h),F(_t=>S(R,_t),[()=>b.layout_activityChanges_partialDiff_label({line:t(W)??0})]),w(l,h)};L(u,l=>{t(pt)&&l(y)})}var C=N(u,2),m=I(C);St(m,()=>`${t(o)?.id}-${t(p)}`,l=>{{let h=f(()=>s()?"split":"unified");Et(l,{get change(){return t(ut)},get workspaceId(){return _()},get viewMode(){return t(h)},get foldUnchanged(){return c()},get lineWrapping(){return d()},get lineOffset(){return t(W)}})}}),A(C),A(i),w(a,i)},yt=a=>{var i=te(),u=I(i),y=P(u,!0),C=N(u,2),m=P(C,!0);A(i),F((l,h)=>{S(y,l),S(m,h)},[()=>b.layout_activityChanges_noDiffStored_label(),()=>b.layout_activityChanges_diffNotCaptured_description()]),w(a,i)},Ct=a=>{var i=ne(),u=I(i),y=P(u,!0),C=N(u,2);{var m=l=>{var h=ee(),$=P(h,!0);F(R=>S($,R),[()=>b.layout_activityChanges_eventType_label({type:t(o).type})]),w(l,h)};L(C,l=>{t(o)&&l(m)})}A(i),F(l=>S(y,l),[()=>b.layout_activityChanges_noChanges_label()]),w(a,i)};L(mt,a=>{t(p)&&t(k)?a(vt):t(p)?a(yt,1):a(Ct,-1)})}w(e,K);var bt=Pt(ht);return nt(),bt}export{ae as default};
@@ -0,0 +1,2 @@
1
+ import{t as zt,bq as ee,_ as Jr,by as Lt,bu as ce,bs as ir,b as At,bo as c}from"./D9jYN6_J.js";import{bs as Wt,ca as pe,aD as e,bH as f,a5 as T,bA as x,W as l,bn as Nt,bV as N,c9 as n,aA as te,c6 as Mt,ay as ne,be as Ze,b$ as tt,b_ as k,bO as g,bS as p,bl as F,aB as P,bj as Xr,aw as rt,ai as Yr,c5 as rr,a as yr,a7 as je,aj as gt,cd as Gr,br as Zr}from"./DYhIMPy1.js";import{i as Q}from"./7eL9Pgig.js";import{k as Pr}from"./OPvMR-5p.js";import{g as Ct}from"./Bgw3O9rE.js";import{c as Rt}from"./DZyAzxxC.js";import{b as $r}from"./BaIAhI85.js";import{Iz as j,nw as kr,vy as Ir,vx as Cr,KO as Qr,KP as ea,et as ta,eu as ra,Ke as fr,lI as Gt,BF as vr,s1 as pr,nU as aa,zg as oa,a5 as gr,J3 as ia,Jl as na,n7 as sa,iE as la,ny as da,u$ as ca,zD as ua,Kd as fa}from"./BfbZn9QX.js";import{g as va}from"./DfN8_dcw.js";import{a as pa,h as ga,j as ma,c as _a,d as ha,i as wa,e as ba,f as mr,g as xa,b as Zt}from"./DFs6FJS8.js";import{bA as ya,bN as Pa,dr as $a}from"./asQ_ruFQ.js";import{w as _r,d as ka}from"./DxBGs1BP.js";import{f as Ia}from"./C3NeTp2u.js";import{k as Qt}from"./BWAGtvpD.js";import{f as Ce}from"./0qEvU7Aj.js";import{h as Ca}from"./Dkva_evl.js";import"./Cx31i8ng.js";import{s as at,g as It,f as hr}from"./C_EpV6jU.js";import{F as et,a8 as Fa,aq as Sa,aV as Da,a$ as jt,co as Ta,cp as Ea,bi as Ra,cN as Ua,c4 as Ma}from"./CAUaU8Wh.js";import{d as ja,f as Va,t as wr}from"./IRbjhecv.js";import{c as za}from"./ChTqQfQN.js";import"./CQbtnalz.js";import{$ as La}from"./2V4-p70U.js";import{i as er,b as Aa,a as Wa}from"./H2jLkRRS.js";import{C as ar,p as Na}from"./1_fC7X8z.js";import{M as Ba}from"./Brqq8vhd.js";import{t as tr,u as Fr}from"./B4gIvcP2.js";import"./ftma9Ybn.js";import"./d-Ep-sfP.js";import{M as Ut}from"./CrHk5l6X.js";import{V as Oa}from"./zGl9gaL0.js";import{bR as Ha,b5 as qa}from"./ChNPgGKQ.js";import{ap as Ka}from"./B79pUPc3.js";import{G as Ja}from"./CEsW1euQ.js";import{g as Xa,W as Ya}from"./BWTugGQ8.js";import{r as Ga,p as Za}from"./D-i7C44m.js";import{l as Qa}from"./BDDEv5gU.js";const Sr=j.createSelector((X,w)=>kr(X.pdfPreview.previews,w));var eo=P('<div class="flex shrink-0 flex-wrap items-center justify-center gap-2 border-b border-border p-2"><!> <span aria-live="polite"> </span> <!> <!> <span> </span> <!></div> <div class="min-h-0 flex-1 overflow-auto p-4"><canvas class="mx-auto block" role="img"></canvas></div>',1),to=P('<div class="flex h-full min-h-0 flex-col" data-testid="pdf-viewer"><!></div>');function or(X,w){if(new.target)return zt({component:or,...X});Wt(w,!0);const ye=()=>ce(we,"$preview",ot),[ot,re]=ir();let y=ee(w,"workspaceId",7),ae=ee(w,"filePath",7),Pe=ee(w,"gitRootId",7);const Fe=crypto.randomUUID(),we=Sr(Fe),ge=new WeakMap;let G=N(null),Je=N(void 0),z=N(1),B=N(1),se=N(!0),me=N(!1),Se=N(null),A=N(0);const be=n(()=>ye()?.error??e(Se)),De=n(()=>e(be)==="missing"?c.file_pdf_missing_error():e(be)==="large"?c.file_pdf_large_error():e(be)==="invalid"?c.file_pdf_invalid_error():e(be)==="password"?c.file_pdf_password_error():c.file_pdf_load_error());pe(()=>{const d=y(),I=ae();e(A);const b=crypto.randomUUID();return j.dispatch(Ir(Fe,b,d,I,...Pe()?[{gitRootId:Pe()}]:[])),()=>{j.dispatch(Cr(Fe,b))}}),pe(()=>{const d=ye()?.url;let I=!1,b;if(f(G,null),f(Se,null),f(se,!0),f(z,1),f(B,1),!!d)return(async()=>{try{const{loadPdfDocument:W}=await Jr(async()=>{const{loadPdfDocument:_e}=await import("./cb1JHFKl.js");return{loadPdfDocument:_e}},[],import.meta.url);if(I)return;b=W(d);const U=await b.promise;I||f(G,U)}catch(W){if(I)return;f(Se,W instanceof Error&&W.name==="PasswordException"?"password":W instanceof Error&&W.name==="InvalidPDFException"?"invalid":"load",!0)}finally{I||f(se,!1)}})(),()=>{I=!0,b?.destroy()}}),pe(()=>{const d=e(G),I=e(Je),b=e(z),W=e(B);if(!d||!I)return;let U=!1,_e,E;const oe=()=>{if(!E)return;const J=(ge.get(E)??1)-1;J?ge.set(E,J):(ge.delete(E),E.cleanup()),E=void 0};return f(me,!0),(async()=>{try{if(E=await d.getPage(b),ge.set(E,(ge.get(E)??0)+1),U){oe();return}const J=E.getViewport({scale:W}),Z=Math.min(window.devicePixelRatio||1,2,Math.sqrt(16e6/(J.width*J.height)));I.width=Math.ceil(J.width*Z),I.height=Math.ceil(J.height*Z),I.style.width=`${J.width}px`,I.style.height=`${J.height}px`,_e=E.render({canvas:I,viewport:J,transform:[Z,0,0,Z,0,0]}),await _e.promise}catch{U||f(Se,"invalid")}finally{U||f(me,!1)}})(),()=>{U=!0,_e?.cancel(),_e?_e.promise.then(oe,oe):oe()}});var Ne={get workspaceId(){return y()},set workspaceId(d){y(d),te()},get filePath(){return ae()},set filePath(d){ae(d),te()},get gitRootId(){return Pe()},set gitRootId(d){Pe(d),te()},$set:Lt,$on:(d,I)=>At(w,d,I)},Ve=to(),Be=T(Ve);{var o=d=>{{const I=W=>{Ze();var U=tt();k(()=>g(U,e(De))),l(W,U)};let b=n(()=>c.ui_combobox_retry_label());ja(d,{onRetry:()=>Mt(A),get retryLabel(){return e(b)},class:"m-auto",message:I,$$slots:{message:!0}})}},i=d=>{{let I=n(()=>c.file_pdf_loading_label());Va(d,{get label(){return e(I)},count:1,class:"p-4"})}},S=d=>{var I=eo(),b=ne(I),W=T(b);{let ue=n(()=>e(z)<=1);Ce(W,{variant:"ghost",size:"compact",get disabled(){return e(ue)},onclick:()=>Mt(z,-1),children:(Ee,ze)=>{Ze();var fe=tt();k(Le=>g(fe,Le),[()=>c.file_pdf_previous_label()]),l(Ee,fe)},$$slots:{default:!0}})}var U=p(W,2),_e=F(U,!0),E=p(U,2);{let ue=n(()=>e(z)>=e(G).numPages);Ce(E,{variant:"ghost",size:"compact",get disabled(){return e(ue)},onclick:()=>Mt(z),children:(Ee,ze)=>{Ze();var fe=tt();k(Le=>g(fe,Le),[()=>c.file_pdf_next_label()]),l(Ee,fe)},$$slots:{default:!0}})}var oe=p(E,2);{let ue=n(()=>e(B)<=.25);Ce(oe,{variant:"ghost",size:"compact",get disabled(){return e(ue)},onclick:()=>f(B,Math.max(.25,e(B)-.25),!0),children:(Ee,ze)=>{Ze();var fe=tt();k(Le=>g(fe,Le),[()=>c.editor_fileViewer_zoomOut_tooltip()]),l(Ee,fe)},$$slots:{default:!0}})}var J=p(oe,2),Z=F(J,!0),it=p(J,2);{let ue=n(()=>e(B)>=3);Ce(it,{variant:"ghost",size:"compact",get disabled(){return e(ue)},onclick:()=>f(B,Math.min(3,e(B)+.25),!0),children:(Ee,ze)=>{Ze();var fe=tt();k(Le=>g(fe,Le),[()=>c.editor_fileViewer_zoomIn_tooltip()]),l(Ee,fe)},$$slots:{default:!0}})}x(b);var nt=p(b,2),st=T(nt);let ut;$r(st,ue=>f(Je,ue),()=>e(Je)),x(nt),k((ue,Ee,ze)=>{g(_e,ue),g(Z,Ee),at(nt,"aria-busy",e(me)),at(st,"aria-label",ze),ut=It(st,"",ut,{visibility:e(me)?"hidden":"visible"})},[()=>c.file_pdf_page_label({page:tr(e(z)),total:tr(e(G).numPages)}),()=>Fr(e(B),{style:"percent"}),()=>c.file_pdf_canvas_ariaLabel({name:ae(),page:tr(e(z))})]),l(d,I)};Q(Be,d=>{e(be)?d(o):e(se)||ye()?.status==="loading"?d(i,1):e(G)&&d(S,2)})}x(Ve),l(X,Ve);var Te=Nt(Ne);return re(),Te}const ro=j.createSelector((X,w)=>kr(X.videoPreview.previews,w));var ao=P('<p role="status"> </p>'),oo=P('<p role="alert"> </p>'),io=P('<div class="flex flex-col items-center gap-3 p-6 text-center text-sm text-subtle"><p class="break-all"> </p> <!> <!></div>'),no=P('<video controls="" preload="metadata" playsinline="" class="max-w-full max-h-full" data-testid="file-video"> </video>',2),so=P('<div class="min-h-0 flex-1 flex items-center justify-center bg-background"><!></div>');function Dr(X,w){if(new.target)return zt({component:Dr,...X});Wt(w,!0);const ye=()=>ce(Je,"$preview",ot),[ot,re]=ir();let y=ee(w,"sourceUrl",7),ae=ee(w,"fileName",7),Pe=ee(w,"allowDownload",7),Fe=ee(w,"downloading",7),we=ee(w,"onDownload",7),ge=N(null);const G=crypto.randomUUID(),Je=ro(G),z=n(()=>ye()?.status==="loading"),B=n(()=>e(ge)??ye()?.error);let se=!1,me=!1;Xr(()=>{me=!0,j.dispatch(Qr(G))});function Se(){if(me||e(z))return;const i=y().startsWith("workspace-file://")?new URL(y()):null;if(se||!i||!i.pathname.toLowerCase().endsWith(".mp4")){f(ge,"unsupported");return}se=!0,i.searchParams.set("preview","h264"),j.dispatch(ea(G,i.hostname,i.toString()))}function A(i){if(me)return;const S=i.currentTarget.error?.code;S===2?f(ge,"network"):S!==1&&Se()}var be={get sourceUrl(){return y()},set sourceUrl(i){y(i),te()},get fileName(){return ae()},set fileName(i){ae(i),te()},get allowDownload(){return Pe()},set allowDownload(i){Pe(i),te()},get downloading(){return Fe()},set downloading(i){Fe(i),te()},get onDownload(){return we()},set onDownload(i){we(i),te()},$set:Lt,$on:(i,S)=>At(w,i,S)},De=so(),Ne=T(De);{var Ve=i=>{var S=io(),Te=T(S),d=F(Te,!0),I=p(Te,2);{var b=E=>{var oe=ao(),J=F(oe,!0);k(Z=>g(J,Z),[()=>c.editor_fileViewer_videoPreparing_label()]),l(E,oe)},W=E=>{var oe=oo(),J=F(oe,!0);k(Z=>g(J,Z),[()=>e(B)==="network"?c.editor_fileViewer_videoLoad_error():c.editor_fileViewer_videoUnsupported_label()]),l(E,oe)};Q(I,E=>{e(z)?E(b):E(W,-1)})}var U=p(I,2);{var _e=E=>{Ce(E,{variant:"secondary",size:"sm",get onclick(){return we()},get disabled(){return Fe()},children:(oe,J)=>{Ze();var Z=tt();k(it=>g(Z,it),[()=>c.layout_fileTab_downloadFile_label()]),l(oe,Z)},$$slots:{default:!0}})};Q(U,E=>{Pe()&&E(_e)})}x(S),k(()=>g(d,ae())),l(i,S)},Be=i=>{var S=no(),Te=F(S,!0);k(d=>{at(S,"src",ye()?.url??y()),g(Te,d)},[()=>c.editor_fileViewer_videoUnsupported_label()]),rt("error",S,A),rt("loadedmetadata",S,d=>{d.currentTarget.videoWidth===0&&Se()}),l(i,S)};Q(Ne,i=>{e(B)||e(z)?i(Ve):i(Be,-1)})}x(De),l(X,De);var o=Nt(be);return re(),o}var lo=P('<!> <span class="text-xs text-subtle min-w-[50px] text-center"> </span> <!> <div class="w-px h-5 bg-border mx-1"></div>',1),co=P('<div class="min-h-0 flex-1 flex flex-col"><div class="flex items-center gap-2 p-2 border-b border-border bg-muted/30"><!> <!> <div class="w-px h-5 bg-border mx-1"></div> <!> <!> <div class="ml-auto text-xs text-subtle"> </div></div> <div><img draggable="false" class="max-w-full max-h-full object-contain"/></div></div>'),uo=P('<div class="min-h-0 flex-1 flex flex-col"><div class="flex items-center gap-2 p-2 border-b border-border bg-muted/30"><!> <!> <div class="ml-auto text-xs text-subtle"> </div></div> <div><img draggable="false" class="max-w-full max-h-full object-contain"/></div></div>'),fo=P('<div class="flex-1 flex flex-col items-center justify-center p-8"><div class="text-subtle mb-4"><svg class="w-24 h-24" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 19V6l12-3v13M9 19c0 1.105-1.343 2-3 2s-3-.895-3-2 1.343-2 3-2 3 .895 3 2zm12-3c0 1.105-1.343 2-3 2s-3-.895-3-2 1.343-2 3-2 3 .895 3 2zM9 10l12-3"></path></svg></div> <div class="text-sm text-subtle mb-4"> </div> <audio controls="" class="w-full max-w-md"><source/> </audio></div>'),vo=P("<!> ",1),po=P('<div class="flex-1 flex flex-col items-center justify-center p-8"><div class="text-subtle mb-4"><svg class="w-24 h-24" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg></div> <p class="text-sm text-subtle mb-4"> </p> <!></div>'),go=P('<th class="border border-border px-2 py-1 text-left text-xs font-medium bg-muted"> </th>'),mo=P('<td class="border border-border px-2 py-1 text-xs"> </td>'),_o=P("<tr></tr>"),ho=P('<div class="flex-1 overflow-auto p-4"><table class="w-full border-collapse"><thead><tr></tr></thead><tbody></tbody></table></div>'),wo=P('<div class="flex-1 flex flex-col items-center justify-center p-8"><div class="text-subtle mb-4"><svg class="w-24 h-24" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M20 13V6a2 2 0 00-2-2H6a2 2 0 00-2 2v7m16 0v5a2 2 0 01-2 2H6a2 2 0 01-2-2v-5m16 0h-2.586a1 1 0 00-.707.293l-2.414 2.414a1 1 0 01-.707.293h-3.172a1 1 0 01-.707-.293l-2.414-2.414A1 1 0 006.586 13H4"></path></svg></div> <p class="text-sm text-subtle mb-2"> </p> <p class="text-xs text-subtle"> </p></div>'),bo=P('<div class="flex-1 flex flex-col items-center justify-center p-8"><div class="text-subtle mb-4"><svg class="w-24 h-24" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 3v2m6-2v2M9 19v2m6-2v2M5 9H3m2 6H3m18-6h-2m2 6h-2M7 19h10a2 2 0 002-2V7a2 2 0 00-2-2H7a2 2 0 00-2 2v10a2 2 0 002 2zM9 9h6v6H9V9z"></path></svg></div> <p class="text-sm text-subtle mb-2"> </p> <p class="text-xs text-subtle"> </p></div>'),xo=P('<div class="h-full flex flex-col"><!></div>');function Vt(X,w){if(new.target)return zt({component:Vt,...X});Wt(w,!0);const ye=t=>{var a=lo(),u=ne(a);{let O=n(()=>c.editor_fileViewer_zoomOut_tooltip());Ce(u,{size:"icon",variant:"ghost",class:"h-7 w-7",onclick:oe,get title(){return e(O)},children:(D,V)=>{et(D,{get icon(){return Ta},size:"sm"})},$$slots:{default:!0}})}var m=p(u,2),h=F(m,!0),R=p(m,2);{let O=n(()=>c.editor_fileViewer_zoomIn_tooltip());Ce(R,{size:"icon",variant:"ghost",class:"h-7 w-7",onclick:E,get title(){return e(O)},children:(D,V)=>{et(D,{get icon(){return Ea},size:"sm"})},$$slots:{default:!0}})}Ze(2),k(()=>g(h,e(Se))),l(t,a)},ot=za("FileViewer");let re=ee(w,"filePath",7),y=ee(w,"fileContent",7,""),ae=ee(w,"sourceUrl",7),Pe=ee(w,"language",7),Fe=ee(w,"isBinary",7),we=ee(w,"allowDownload",7,!0),ge=ee(w,"onDownload",7),G=ee(w,"downloading",7,!1);const Je=t=>{const a=t.split(".").pop()?.toLowerCase()||"";return["png","jpg","jpeg","gif","webp","bmp","ico","avif"].includes(a)?"image":a==="svg"?"svg":["mp4","webm","ogg","mov","avi"].includes(a)?"video":["mp3","wav","ogg","m4a","flac"].includes(a)?"audio":a==="pdf"?"pdf":["md","markdown"].includes(a)?"markdown":a==="json"?"json":a==="csv"?"csv":["yaml","yml"].includes(a)?"yaml":a==="xml"?"xml":["zip","tar","gz","rar","7z","bz2"].includes(a)?"archive":["exe","dll","so","dylib","wasm"].includes(a)?"binary":"text"},z=n(()=>Je(re())),B=n(()=>re().split("/").pop()||c.editor_fileViewer_unknown_fallback());let se=N(100),me=N(0);const Se=n(()=>Fr(e(se)/100,{style:"percent",maximumFractionDigits:0}));let A=N(!1),be=N(0),De=N(0),Ne=N(0),Ve=N(0),Be=N(!1),o=null;function i(){const t=o;o=null,f(Be,!1),t?.viewport.hasPointerCapture(t.pointerId)&&t.viewport.releasePointerCapture(t.pointerId)}function S(t){if(t.button!==0||!t.isPrimary||o)return;const a=t.currentTarget;a.setPointerCapture(t.pointerId),o={pointerId:t.pointerId,x:t.clientX,y:t.clientY,viewport:a},f(Be,!0),t.preventDefault()}function Te(t){if(!(!o||t.pointerId!==o.pointerId)){if((t.buttons&1)===0){i();return}f(Ne,o.viewport.scrollLeft,!0),f(Ve,o.viewport.scrollTop,!0),f(be,e(be)+(t.clientX-o.x)),f(De,e(De)+(t.clientY-o.y)),o.x=t.clientX,o.y=t.clientY}}function d(t){t.pointerId===o?.pointerId&&i()}pe(()=>{re(),ae(),e(se),e(me),f(Ne,0),f(Ve,0)}),pe(()=>(re(),ae(),rr(()=>{i(),f(be,0),f(De,0)}),i));const I=t=>{const a=t.split(".").pop()?.toLowerCase();return a==="jpg"||a==="jpeg"?"image/jpeg":a==="png"?"image/png":a==="gif"?"image/gif":a==="webp"?"image/webp":"application/octet-stream"},b=t=>{const a=t.split(".").pop()?.toLowerCase();if(a==="mp4")return"video/mp4";if(a==="webm")return"video/webm"},W=()=>{if(ae())return ae();if(typeof y()=="string")return y().startsWith("data:")||y().startsWith("http")?y():Fe()?`data:${I(re())};base64,${y()}`:`data:${I(re())};base64,${y()}`;if(y()instanceof ArrayBuffer){const a=new Uint8Array(y()).reduce((m,h)=>m+String.fromCharCode(h),""),u=btoa(a);return`data:${I(re())};base64,${u}`}return""},U=()=>{if(ae())return ae();const t=b(re());if(!t)return"";if(typeof y()=="string")return y().startsWith("data:")||y().startsWith("http")?y():`data:${t};base64,${y()}`;const a=new Uint8Array(y()),u=[],m=32768;for(let h=0;h<a.length;h+=m)u.push(String.fromCharCode(...a.subarray(h,h+m)));return`data:${t};base64,${btoa(u.join(""))}`},_e=()=>{const t=typeof y()=="string"?new TextEncoder().encode(y()):new Uint8Array(y()),a=[],u=32768;for(let m=0;m<t.length;m+=u)a.push(String.fromCharCode(...t.subarray(m,m+u)));return`data:image/svg+xml;base64,${btoa(a.join(""))}`},E=()=>{f(se,Math.min(e(se)+25,500),!0)},oe=()=>{f(se,Math.max(e(se)-25,25),!0)},J=()=>{f(me,(e(me)+90)%360)},Z=()=>{if(!we()||G())return;if(ge()){ge()();return}const t=document.createElement("a");t.href=e(z)==="video"?U():e(z)==="svg"?_e():W(),t.download=e(B),t.click()},it=async()=>{try{const t=W(),a=new Image;a.crossOrigin="anonymous";const u=await new Promise((m,h)=>{a.onload=()=>{const R=document.createElement("canvas");R.width=a.naturalWidth,R.height=a.naturalHeight;const O=R.getContext("2d");if(!O){h(new Error("Failed to get canvas context"));return}O.drawImage(a,0,0),R.toBlob(D=>{D?m(D):h(new Error("Failed to create blob from canvas"))},"image/png",1)},a.onerror=()=>h(new Error("Failed to load image")),a.src=t});await navigator.clipboard.write([new ClipboardItem({"image/png":u})]),f(A,!0),setTimeout(()=>f(A,!1),2e3)}catch(t){ot.error("Failed to copy image:",t)}},nt=t=>{try{const a=JSON.parse(t);return JSON.stringify(a,null,2)}catch{return t}},st=t=>t.split(`
2
+ `).map(u=>u.split(",").map(m=>m.trim()));var ut={get filePath(){return re()},set filePath(t){re(t),te()},get fileContent(){return y()},set fileContent(t=""){y(t),te()},get sourceUrl(){return ae()},set sourceUrl(t){ae(t),te()},get language(){return Pe()},set language(t){Pe(t),te()},get isBinary(){return Fe()},set isBinary(t){Fe(t),te()},get allowDownload(){return we()},set allowDownload(t=!0){we(t),te()},get onDownload(){return ge()},set onDownload(t){ge(t),te()},get downloading(){return G()},set downloading(t=!1){G(t),te()},$set:Lt,$on:(t,a)=>At(w,t,a)},ue=xo();rt("blur",yr,i);var Ee=T(ue);{var ze=t=>{var a=co(),u=T(a),m=T(u);ye(m);var h=p(m,2);{let he=n(()=>c.editor_fileViewer_rotate_tooltip());Ce(h,{size:"icon",variant:"ghost",class:"h-7 w-7",onclick:J,get title(){return e(he)},children:($e,He)=>{et($e,{get icon(){return Fa},size:"sm"})},$$slots:{default:!0}})}var R=p(h,4);{let he=n(()=>c.editor_fileViewer_copyImage_tooltip());Ce(R,{size:"icon",variant:"ghost",class:"h-7 w-7",onclick:it,get title(){return e(he)},children:($e,He)=>{var ke=je(),St=ne(ke);{var Dt=Ie=>{et(Ie,{get icon(){return Sa},size:"sm",class:"text-green-500"})},Ye=Ie=>{et(Ie,{get icon(){return Da},size:"sm"})};Q(St,Ie=>{e(A)?Ie(Dt):Ie(Ye,-1)})}l($e,ke)},$$slots:{default:!0}})}var O=p(R,2);{let he=n(()=>!we()||G()),$e=n(()=>c.editor_fileViewer_download_tooltip());Ce(O,{size:"icon",variant:"ghost",class:"h-7 w-7",onclick:Z,get disabled(){return e(he)},get title(){return e($e)},children:(He,ke)=>{et(He,{get icon(){return jt},size:"sm"})},$$slots:{default:!0}})}var D=p(O,2),V=F(D,!0);x(u);var H=p(u,2),xe=F(H);x(a),k(he=>{g(V,e(B)),hr(H,1,`relative min-h-0 flex-1 overflow-auto bg-checkered flex items-center justify-center p-4 select-none ${e(Be)?"cursor-grabbing":"cursor-grab"}`,"svelte-1uj35xu"),It(H,`--pan-scroll-x: ${e(Ne)??""}px; --pan-scroll-y: ${e(Ve)??""}px;`),at(xe,"src",he),at(xe,"alt",e(B)),It(xe,`translate: ${e(be)??""}px ${e(De)??""}px; transform: scale(${e(se)/100}) rotate(${e(me)??""}deg); transition: transform 0.2s;`)},[()=>W()]),gt("pointerdown",H,S),gt("pointermove",H,Te),gt("pointerup",H,d),rt("pointercancel",H,d),rt("lostpointercapture",H,d),l(t,a)},fe=t=>{var a=uo(),u=T(a),m=T(u);ye(m);var h=p(m,2);{let H=n(()=>!we()||G()),xe=n(()=>c.editor_fileViewer_download_tooltip());Ce(h,{size:"icon",variant:"ghost",class:"h-7 w-7",onclick:Z,get disabled(){return e(H)},get title(){return e(xe)},children:(he,$e)=>{et(he,{get icon(){return jt},size:"sm"})},$$slots:{default:!0}})}var R=p(h,2),O=F(R,!0);x(u);var D=p(u,2),V=F(D);x(a),k(H=>{g(O,e(B)),hr(D,1,`relative min-h-0 flex-1 overflow-auto bg-checkered flex items-center justify-center p-4 select-none ${e(Be)?"cursor-grabbing":"cursor-grab"}`,"svelte-1uj35xu"),It(D,`--pan-scroll-x: ${e(Ne)??""}px; --pan-scroll-y: ${e(Ve)??""}px;`),at(V,"src",H),at(V,"alt",e(B)),It(V,`translate: ${e(be)??""}px ${e(De)??""}px; transform: scale(${e(se)/100});`)},[()=>_e()]),gt("pointerdown",D,S),gt("pointermove",D,Te),gt("pointerup",D,d),rt("pointercancel",D,d),rt("lostpointercapture",D,d),l(t,a)},Le=t=>{const a=n(U);var u=je(),m=ne(u);Pr(m,()=>re()+e(a),h=>{Dr(h,{get sourceUrl(){return e(a)},get fileName(){return e(B)},get allowDownload(){return we()},get downloading(){return G()},onDownload:Z})}),l(t,u)},mt=t=>{var a=fo(),u=p(T(a),2),m=F(u,!0),h=p(u,2),R=T(h),O=p(R);x(h),x(a),k((D,V)=>{g(m,e(B)),at(R,"src",D),g(O,` ${V??""}`)},[()=>W(),()=>c.editor_fileViewer_audioUnsupported_label()]),l(t,a)},Bt=t=>{var a=po(),u=p(T(a),2),m=F(u,!0),h=p(u,2);{let R=n(()=>!we()||G());Ce(h,{size:"sm",variant:"secondary",onclick:Z,get disabled(){return e(R)},children:(O,D)=>{var V=vo(),H=ne(V);et(H,{get icon(){return jt},size:"sm",class:"mr-2"});var xe=p(H);k(he=>g(xe,` ${he??""}`),[()=>c.editor_fileViewer_downloadPdf_label()]),l(O,V)},$$slots:{default:!0}})}x(a),k(R=>g(m,R),[()=>c.editor_fileViewer_pdfUnavailable_label()]),l(t,a)},Ot=t=>{{let a=n(()=>nt(y().toString()));ar(t,{get value(){return e(a)},language:"json",get fileName(){return re()},lineNumbers:!0,readOnly:!0})}},Oe=t=>{const a=n(()=>st(y().toString()));var u=ho(),m=T(u),h=T(m),R=T(h);Ct(R,23,()=>e(a)[0]||[],(D,V)=>`header-${V}-${D}`,(D,V)=>{var H=go(),xe=F(H,!0);k(()=>g(xe,e(V))),l(D,H)}),x(R),x(h);var O=p(h);Ct(O,23,()=>e(a).slice(1),(D,V)=>`row-${V}`,(D,V,H)=>{var xe=_o();Ct(xe,23,()=>e(V),(he,$e)=>`cell-${e(H)}-${$e}`,(he,$e)=>{var He=mo(),ke=F(He,!0);k(()=>g(ke,e($e))),l(he,He)}),x(xe),l(D,xe)}),x(O),x(m),x(u),l(t,u)},Xe=t=>{var a=wo(),u=p(T(a),2),m=F(u,!0),h=p(u,2),R=F(h,!0);x(a),k(O=>{g(m,e(B)),g(R,O)},[()=>c.editor_fileViewer_archive_label()]),l(t,a)},Ht=t=>{var a=bo(),u=p(T(a),2),m=F(u,!0),h=p(u,2),R=F(h,!0);x(a),k(O=>{g(m,e(B)),g(R,O)},[()=>c.editor_fileViewer_binary_label()]),l(t,a)},Ft=t=>{{let a=n(()=>y().toString());ar(t,{get value(){return e(a)},get language(){return Pe()},get fileName(){return re()},lineNumbers:!0,highlightActiveLine:!0})}};Q(Ee,t=>{e(z)==="image"?t(ze):e(z)==="svg"?t(fe,1):e(z)==="video"?t(Le,2):e(z)==="audio"?t(mt,3):e(z)==="pdf"?t(Bt,4):e(z)==="json"?t(Ot,5):e(z)==="csv"?t(Oe,6):e(z)==="archive"?t(Xe,7):e(z)==="binary"?t(Ht,8):t(Ft,-1)})}return x(ue),l(X,ue),Nt(ut)}Yr(["pointerdown","pointermove","pointerup"]);const yo=/access denied|permission denied|outside (?:the )?workspace/i,Po=/file not found|no such file or directory/i;function $o(X){return yo.test(X)?"access-denied":X===c.files_read_notFound_error()||Po.test(X)?"not-found":"generic"}function ko(X){switch(X){case"access-denied":return c.layout_fileTab_errorAccessDenied_label();case"not-found":return c.layout_fileTab_errorNotFound_label();case"generic":return c.layout_fileTab_errorGeneric_label()}}var Io=P("<!> <!>",1),Co=P("<!> <!> <!>",1),Fo=P('<div class="flex flex-col items-center justify-center h-full text-subtle gap-2"><p> </p> <p class="text-xs"> </p></div>'),br=P('<div class="flex h-full items-center justify-center p-4 text-subtle"><p role="alert"> </p></div>'),So=P('<div class="flex h-full items-center justify-center text-subtle"><p> </p></div>'),xr=P('<div class="flex items-center justify-center h-full text-subtle"><p> </p></div>'),Do=P('<div class="flex items-center gap-3"><!> <!></div>'),To=P('<div class="flex flex-col h-full"><div class="flex-1 p-4 space-y-2"></div></div>'),Eo=P('<p class="text-xs"> </p>'),Ro=P("<li><!></li>"),Uo=P('<p class="text-xs mt-2"> </p> <ul class="flex flex-col items-center gap-1"></ul>',1),Mo=P('<div class="flex flex-col items-center justify-center h-full text-subtle gap-2"><p class="text-danger" role="alert"> </p> <p class="text-xs font-mono"> </p> <!> <!></div>'),jo=P('<div class="flex flex-col items-center justify-center h-full text-subtle gap-3 p-4"><p> </p> <p class="text-xs break-all"> </p> <!></div>'),Vo=P('<div class="h-full overflow-auto p-4"><!></div>');function zo(X,w){if(new.target)return zt({component:zo,...X});Wt(w,!0);const ye=()=>ce(Ot,"$workspace",A),ot=()=>ce(_e,"$fileContentStore",A),re=()=>ce(E,"$fileLoadingStore",A),y=()=>ce(oe,"$fileSavingStore",A),ae=()=>ce(J,"$fileErrorStore",A),Pe=()=>ce(Z,"$fileErrorInfoStore",A),Fe=()=>ce(it,"$homeView$",A),we=()=>ce(nt,"$fileNotFoundCandidatesStore",A),ge=()=>ce(st,"$isFileBinaryStore",A),G=()=>ce(ut,"$isFileDirtyStore",A),Je=()=>ce(ue,"$fileLastUpdatedStore",A),z=()=>ce(Ee,"$ftChanges$",A),B=()=>ce(Bt,"$gutterRead$",A),se=()=>ce(Ve,"$lineWrapping",A),me=()=>ce(Be,"$diffIndicators",A),Se=()=>ce(Le,"$rootMediaPreview",A),[A,be]=ir(),De=r=>{var s=Io(),$=ne(s);{var C=de=>{var Ae=je(),qe=ne(Ae);Rt(qe,()=>Ut,(pt,xt)=>{xt(pt,{get icon(){return Ra},get label(){return e(he)},disabled:!0})}),l(de,Ae)};Q($,de=>{!e(_t)&&!e(b)&&!e(V)&&de(C)})}var le=p($,2);{var Re=de=>{{let Ae=n(()=>!e(Tt)||!e(Ye)),qe=n(()=>!e(b)&&(!e(Tt)||!e(Ye)));Oa(de,{embedded:!0,showFold:!1,showSplit:!1,get showPreview(){return e(Tt)},get previewEnabled(){return e(Ye)},onTogglePreview:()=>f(Ye,!e(Ye)),get showWrap(){return e(Ae)},get wrapEnabled(){return se()},onToggleWrap:()=>j.dispatch(na()),get showDiff(){return e(qe)},get diffEnabled(){return me()},onToggleDiff:()=>j.dispatch(ia())})}};Q(le,de=>{o().filePath&&!e(_t)&&!e(V)&&de(Re)})}l(r,s)},Ne=r=>{var s=je(),$=ne(s);{var C=le=>{var Re=Co(),de=ne(Re);{var Ae=We=>{var Ge=je(),dt=ne(Ge);{let yt=n(()=>c.layout_fileTab_goToChanges_tooltip());Rt(dt,()=>Ut,(Pt,$t)=>{$t(Pt,{get icon(){return Ma},get label(){return e(yt)},onclick:Lr})})}l(We,Ge)};Q(de,We=>{e(Rr)&&We(Ae)})}var qe=p(de,2);{var pt=We=>{var Ge=je(),dt=ne(Ge);{let yt=n(()=>c.layout_fileTab_downloadFile_label()),Pt=n(()=>!e(wt)||e(lt));Rt(dt,()=>Ut,($t,Jt)=>{Jt($t,{get icon(){return jt},get label(){return e(yt)},onclick:Et,get disabled(){return e(Pt)}})})}l(We,Ge)};Q(qe,We=>{e(Qe)&&We(pt)})}var xt=p(qe,2);{let We=n(()=>c.layout_fileTab_deleteFile_tooltip());Rt(xt,()=>Ut,(Ge,dt)=>{dt(Ge,{get icon(){return Ua},get label(){return e(We)},onclick:Ar,destructive:!0})})}l(le,Re)};Q($,le=>{o().filePath&&!e(_t)&&!e(b)&&le(C)})}l(r,s)},Ve=Ha(),Be=qa();let o=ee(w,"tab",7),i=ee(w,"workspaceId",7),S=ee(w,"isActive",7),Te=ee(w,"isPanelFocused",7);pe(()=>{const r=i();if(!(!S()||!r||e(d)))return j.dispatch(ta(r,"files")),()=>j.dispatch(ra(r,"files"))});const d=n(()=>typeof o().data?.gitRootId=="string"?o().data.gitRootId:void 0),I=n(()=>typeof o().data?.gitRootPath=="string"?o().data.gitRootPath:void 0),b=n(()=>!!e(d)),W=n(()=>o().filePath?Ia(o().filePath,e(d)):o().filePath),U=Gr(e(W));pe(()=>{U.set(e(W))});const _e=pa(i(),U),E=ga(i(),U),oe=ma(i(),U),J=_a(i(),U),Z=ha(i(),U),it=Qa(i()),nt=wa(i(),U),st=ba(i(),U),ut=mr(i(),U),ue=xa(i(),U),Ee=ya(i()),ze=va(),fe=crypto.randomUUID(),Le=Sr(fe),mt=`file-gutter:${crypto.randomUUID()}`,Bt=Pa(i(),mt),Ot=$a(i()),Oe=n(()=>ye()?.worktreePath||ye()?.repositoryPath||ye()?.path||null),Xe=n(ot),Ht=Xa();pe(()=>{e(Xe)!==null&&e(Xe)!==void 0&&Ht?.markContentLoaded()});const Ft=n(re),t=n(y),a=n(ae),u=n(()=>e(a)?$o(e(a)):"generic"),m=n(()=>e(a)?Ga(Pe()):null);let h=N(0),R=!1;pe(()=>{const r=Fe();if(!r||r.unavailable){R=!1;return}e(m)&&!R&&(R=!0,rr(()=>Mt(h)))});const O=5,D=n(()=>(we()??[]).slice(0,O)),V=n(ge),H=n(G),xe=n(Je),he=n(()=>e(t)?c.ui_saveIndicator_saving_tooltip():e(H)?c.ui_saveIndicator_autoSaving_tooltip():c.ui_saveIndicator_saved_tooltip());let $e=N(null),He=N(Zr([])),ke=N(null),St=N(void 0),Dt=N(void 0),Ye=N(!0);pe(()=>{const r=o().data?.line,s=o().data?.jumpTimestamp;!r||s!==void 0&&s===e(Dt)||(f(Dt,s,!0),f(St,{line:r},!0),f(Ye,!1))});const Ie=n(()=>e(d)?_r(o().filePath,e(I)):null),_t=n(()=>e(d)?!e(Ie):!!(o().filePath&&(Aa(o().filePath)||e(Oe)&&Wa(o().filePath,e(Oe))))),ht=n(()=>o().filePath&&e(Oe)?er(o().filePath)?o().filePath:`${e(Oe)}/${o().filePath}`:null),ft=n(()=>!!o().filePath&&/\.pdf$/i.test(o().filePath)),vt=n(()=>!!o().filePath&&/\.(?:png|jpe?g|gif|webp|mp4|webm)$/i.test(o().filePath)),Qe=n(()=>i()&&/^[A-Za-z0-9._-]+$/.test(i())?_r(o().filePath,e(Oe)):null),Tr=n(()=>!e(d)&&e(Qe)?e(Qe).split("/").slice(0,-1).join("/"):void 0),qt=n(()=>e(ft)||e(vt)?e(Qe):null),nr=n(()=>e(d)&&e(vt)?{png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",webp:"image/webp",mp4:"video/mp4",webm:"video/webm"}[o().filePath?.split(".").pop()?.toLowerCase()??""]:void 0);pe(()=>{if(!S()||!e(d)||!e(Ie)||!e(nr))return;const r=crypto.randomUUID();return j.dispatch(Ir(fe,r,i(),e(Ie),{gitRootId:e(d),mimeType:e(nr)})),()=>j.dispatch(Cr(fe,r))});let lt=N(!1);const wt=n(()=>!!e(Qe)&&!e(Ft)&&(!e(vt)||e(ke)===e(Qe))),sr=n(()=>e(ke)&&i()?`workspace-file://${i()}/${e(ke).split("/").map(encodeURIComponent).join("/")}`:null),Kt=n(()=>o().filePath?da(o().filePath):"plaintext"),Tt=n(()=>e(Kt)==="markdown");pe(()=>{if(!S()||e(ft)||e(d))return;const r=e(qt),s=o().filePath,$=i(),C=o().id;if(f(ke,null),!r||!s||!$)return;let le=!1;const Re=()=>!le&&i()===$&&o().id===C&&o().filePath===s;return(async()=>{let de=!1;try{de=(await Ca("file.stat",{workspaceId:$,path:r}))?.isFile===!0}catch{}if(!Re())return;if(de){f(ke,r,!0);return}if(!/\.(?:png|jpe?g|gif|webp|mp4|webm)$/i.test(r)){f(ke,r,!0);return}const{candidates:Ae,truncated:qe}=await La($,r);if(Re()){if(!qe&&Ae.length===1){j.dispatch(fr($,s,Ae[0],C));return}f(ke,r,!0)}})(),()=>{le=!0}});function Er(r,s){return!!(r.file===s||r.relativePath===s||r.relativePath&&s.endsWith("/"+r.relativePath)||r.file&&s.endsWith("/"+r.file)||r.relativePath&&r.relativePath.endsWith("/"+s)||r.file&&r.file.endsWith("/"+s))}const bt=n(()=>e(b)||!o().filePath?null:z().find(r=>Er(r,o().filePath))??null),Rr=n(()=>!!e(bt));pe(()=>{if(e(b))return;const r=i(),s=o().filePath,$=e(Oe);return()=>{if(!r||!s)return;const C=Zt.select(j.state,r,s);if(C?.kind!=="editable-text")return;const le=Gt(C.localContent),Re=mr.select(j.state,r,s),de=er(s)?s:$?`${$}/${s}`:null;Re&&de&&j.dispatch(vr(r,s,de,le))}}),pe(()=>{const r=o().filePath,s=e(ht),$=i();if(e(h),!S())return;const C=!e(d)&&!!r&&er(r)&&!e(Oe);r&&$&&!e(_t)&&!e(vt)&&!e(ft)&&!C&&(e(d)&&e(Ie)&&e(W)?j.dispatch(pr($,e(W),s??r,{gitRoot:{id:e(d),relativePath:e(Ie)}})):j.dispatch(pr($,r,s??r)))});function Ur(){return e(Xe)??""}function Mr(r){e(b)||e(V)||!o().filePath||!i()||!e(ht)||j.dispatch(fa(i(),o().filePath,Gt(r)))}function jr(){if(e(b)||e(V)||!o().filePath||!e(ht)||e(Xe)===null||e(t))return;const r=Zt.select(j.state,i(),o().filePath);r?.kind==="editable-text"&&j.dispatch(vr(i(),o().filePath,e(ht),Gt(r.localContent)))}function Vr(r){const s=o().filePath;!s||!i()||(j.dispatch(ua(i(),s)),j.dispatch(fr(i(),s,r,o().id)))}pe(()=>{const r=o().filePath,s=e(bt);if(!r||!s){f(He,[],!0);return}if(!S())return;const $=i(),C=crypto.randomUUID();return j.dispatch(aa($,mt,C,{kind:"diffs",path:r,staged:s.stage==="staged"})),()=>{j.dispatch(oa($,mt,C))}}),pe(()=>{const r=B(),s=r?.result?.kind==="diffs"?r.result.chunks:[],$=s.find(C=>C.file===o().filePath)??s[0];f(He,$?Na($.chunks.map(C=>({oldStart:C.oldStart,oldLines:C.oldLines,newStart:C.newStart,newLines:C.newLines,lines:C.lines.map(le=>(le.type===gr.Addition?"+":le.type===gr.Deletion?"-":" ")+le.content)}))):[],!0)});function zr(r){const s=/Mac|iPhone|iPad|iPod/.test(navigator.userAgent),$=Re=>Ja(r,Ka(Re),s);if($("editor.save")){r.preventDefault(),e(H)&&!e(t)&&jr();return}const C=$("editor.undo")?"undo":$("editor.redo")?"redo":$("editor.toggle-task-list")?"toggle-task-list":$("editor.copy")?"copy":$("editor.select-all")?"select-all":null;if(!C||e(b)&&C!=="copy"&&C!=="select-all")return;C!=="toggle-task-list"&&e($e)?.runShortcut(C)&&r.preventDefault()}function Lr(r){if(!o().filePath||!e(bt))return;const s=r?.metaKey||r?.ctrlKey||!1,C=r?.target?.closest("[data-panel-id]")?.getAttribute("data-panel-id")??void 0;j.dispatch(ca(i(),e(bt),{filePath:o().filePath,changeId:e(bt).id,openInAdjacentPanel:s,sourcePanelId:C}))}async function Et(){const r=e(Qe);if(!(e(b)||!r||!i()||!e(wt)||e(lt))){f(lt,!0);try{const s=await ka(i(),r,e(Oe));!s?.success&&!s?.canceled&&Qt.error(s?.error?.message||c.layout_fileTab_downloadFailed_error())}catch{Qt.error(c.layout_fileTab_downloadFailed_error())}finally{f(lt,!1)}}}function Ar(){const r=e(ht);if(e(b)||!o().filePath||!i()||!r)return;const s=sa(Zt.select(j.state,i(),o().filePath));if(!s){Qt.error(c.ui_reversibleActions_failed_error({message:c.fileExplorer_tree_undoUnavailable_error()}));return}j.dispatch(la(i(),o().filePath,{absolutePath:r,tabId:o().id,snapshot:s}))}pe(()=>{if(!ze||!S())return;const r={isDirty:!e(b)&&e(H),isSaving:!e(b)&&e(t)};rr(()=>{ze.registerActions({display:De,actions:Ne}),ze.registerState(r)})});var Wr={get tab(){return o()},set tab(r){o(r),te()},get workspaceId(){return i()},set workspaceId(r){i(r),te()},get isActive(){return S()},set isActive(r){S(r),te()},get isPanelFocused(){return Te()},set isPanelFocused(r){Te(r),te()},$set:Lt,$on:(r,s)=>At(w,r,s)},lr=je();rt("keydown",yr,r=>S()&&zr(r));var Nr=ne(lr);{var Br=r=>{var s=je(),$=ne(s);Pr($,()=>o().filePath,C=>{var le=je(),Re=ne(le);{var de=_=>{var v=Fo(),M=T(v),q=F(M,!0),L=p(M,2),Ue=F(L,!0);x(v),k(Y=>{g(q,Y),g(Ue,o().filePath)},[()=>c.layout_fileTab_outsideWorkspace_label()]),l(_,v)},Ae=_=>{var v=je(),M=ne(v);{var q=L=>{or(L,{get workspaceId(){return i()},get filePath(){return e(Ie)},get gitRootId(){return e(d)}})};Q(M,L=>{S()&&L(q)})}l(_,v)},qe=_=>{var v=je(),M=ne(v);{var q=Y=>{var K=br(),ie=T(K),Me=F(ie,!0);x(K),k(ve=>g(Me,ve),[()=>c.layout_fileTab_errorLoading_label()]),l(Y,K)},L=Y=>{Vt(Y,{get filePath(){return o().filePath},get sourceUrl(){return Se().url},allowDownload:!1})},Ue=Y=>{var K=So(),ie=T(K),Me=F(ie,!0);x(K),k(ve=>g(Me,ve),[()=>c.layout_fileTab_preparing_label()]),l(Y,K)};Q(M,Y=>{Se()?.error?Y(q):Se()?.url?Y(L,1):Y(Ue,-1)})}l(_,v)},pt=_=>{var v=je(),M=ne(v);{var q=L=>{or(L,{get workspaceId(){return i()},get filePath(){return e(qt)}})};Q(M,L=>{S()&&L(q)})}l(_,v)},xt=_=>{var v=br(),M=T(v),q=F(M,!0);x(v),k(L=>g(q,L),[()=>c.file_pdf_load_error()]),l(_,v)},We=_=>{{let v=n(()=>e(ke)??o().filePath),M=n(()=>!e(b)&&e(wt));Vt(_,{get filePath(){return e(v)},get sourceUrl(){return e(sr)},onDownload:Et,get allowDownload(){return e(M)},get downloading(){return e(lt)}})}},Ge=_=>{var v=xr(),M=T(v),q=F(M,!0);x(v),k(L=>g(q,L),[()=>c.layout_fileTab_preparing_label()]),l(_,v)},dt=_=>{var v=To(),M=T(v);Ct(M,20,()=>[...Array(20).keys()],q=>q,(q,L)=>{var Ue=Do(),Y=T(Ue);wr(Y,{class:"h-3 w-8 shrink-0"});var K=p(Y,2);wr(K,{class:"h-3",style:`width: ${30+Math.random()*60}%`}),x(Ue),l(q,Ue)}),x(M),x(v),l(_,v)},yt=_=>{{let v=n(()=>Za(e(m)));Ya(_,{get view(){return e(v)}})}},Pt=_=>{var v=Mo(),M=T(v),q=F(M,!0),L=p(M,2),Ue=F(L,!0),Y=p(L,2);{var K=ve=>{var Ke=Eo(),ct=F(Ke,!0);k(()=>g(ct,e(a))),l(ve,Ke)};Q(Y,ve=>{e(u)==="generic"&&ve(K)})}var ie=p(Y,2);{var Me=ve=>{var Ke=Uo(),ct=ne(Ke),Xt=F(ct,!0),dr=p(ct,2);Ct(dr,20,()=>e(D),kt=>kt,(kt,cr)=>{var Yt=Ro(),qr=T(Yt);Ce(qr,{variant:"link",size:"compact",class:"h-auto p-0 font-mono text-xs",onclick:()=>Vr(cr),children:(Kr,Lo)=>{Ze();var ur=tt();k(()=>g(ur,cr)),l(Kr,ur)},$$slots:{default:!0}}),x(Yt),l(kt,Yt)}),x(dr),k(kt=>g(Xt,kt),[()=>c.layout_fileTab_didYouMean_label()]),l(ve,Ke)};Q(ie,ve=>{e(D).length>0&&ve(Me)})}x(v),k(ve=>{g(q,ve),g(Ue,o().filePath)},[()=>ko(e(u))]),l(_,v)},$t=_=>{var v=jo(),M=T(v),q=F(M,!0),L=p(M,2),Ue=F(L,!0),Y=p(L,2);{var K=ie=>{{let Me=n(()=>!e(wt)||e(lt));Ce(ie,{variant:"secondary",size:"sm",onclick:Et,get disabled(){return e(Me)},children:(ve,Ke)=>{Ze();var ct=tt();k(Xt=>g(ct,Xt),[()=>c.layout_fileTab_downloadFile_label()]),l(ve,ct)},$$slots:{default:!0}})}};Q(Y,ie=>{!e(b)&&e(Qe)&&ie(K)})}x(v),k(ie=>{g(q,ie),g(Ue,o().filePath)},[()=>c.editor_fileViewer_binary_label()]),l(_,v)},Jt=_=>{const v=n(()=>o().filePath?.toLowerCase().endsWith(".svg"));var M=je(),q=ne(M);{var L=K=>{{let ie=n(()=>o().filePath||""),Me=n(()=>!e(b)&&e(wt));Vt(K,{get filePath(){return e(ie)},get fileContent(){return e(Xe)},get language(){return e(Kt)},get isBinary(){return e(V)},onDownload:Et,get allowDownload(){return e(Me)},get downloading(){return e(lt)}})}},Ue=K=>{var ie=Vo(),Me=T(ie);Ba(Me,{get content(){return e(Xe)},get workspaceId(){return i()},get relativeMediaBase(){return e(Tr)},renderRichFencesAsCode:!0,renderDiagrams:!0}),x(ie),l(K,ie)},Y=K=>{var ie=Ur,Me=Mr;{let ve=n(()=>me()?e(He):[]);$r(ar(K,{get value(){return ie()},set value(Ke){Me(Ke)},get language(){return e(Kt)},get readOnly(){return e(b)},get fileName(){return o().filePath},get workspaceId(){return i()},get filePath(){return o().filePath},get lineWrapping(){return se()},get lineChanges(){return e(ve)},get jumpTo(){return e(St)},get externalContentVersion(){return e(xe)},get isPanelFocused(){return Te()}}),Ke=>f($e,Ke,!0),()=>e($e))}};Q(q,K=>{e(v)?K(L):e(Tt)&&e(Ye)?K(Ue,1):K(Y,-1)})}l(_,M)},Hr=_=>{var v=xr(),M=T(v),q=F(M,!0);x(v),k(L=>g(q,L),[()=>c.layout_fileTab_preparing_label()]),l(_,v)};Q(Re,_=>{e(_t)?_(de):e(d)&&e(ft)&&e(Ie)?_(Ae,1):e(d)&&e(vt)?_(qe,2):e(ft)&&e(qt)?_(pt,3):e(ft)?_(xt,4):e(sr)?_(We,5):e(vt)?_(Ge,6):e(Ft)?_(dt,7):e(m)?_(yt,8):e(a)?_(Pt,9):e(V)?_($t,10):e(Xe)!==null?_(Jt,11):_(Hr,-1)})}l(C,le)}),l(r,s)};Q(Nr,r=>{o().filePath&&r(Br)})}l(X,lr);var Or=Nt(Wr);return be(),Or}export{zo as default};
@@ -1,4 +1,4 @@
1
- import{s as ce,a as Wn,b as qn,d as Hn,f as Te,c as T,i as zn}from"./DKBMY4SO.js";import{b as x,X as Jn,ay as m,bg as Kn,b1 as Zn,a4 as Qn,af as Se,aL as Ce,ad as er,ae as nr,aK as rr}from"./Z8gQAmFb.js";import{L as U,I as O,r as Ie,s as H,C as z,H as tn,m as le,K as an,c as tr,g as on,W as ar,R as ir,Q as or,J as he,k as sr,V as dr,U as Re,a as ke,w as pe,n as ge,P as V,E as sn,S as dn,b as ur,B as I,v as fr,M as cr,D as lr,A as Me,F as hr,h as un,l as M,O as pr,f as gr,e as vr,d as X,o as fn,i as cn,y as br,z as ve,p as ln,X as wr,j as hn,x as mr,Y as yr,G as N,u as l,q as xr,N as L,t as $,Z as R,T as J}from"./-xK_vQQs.js";var Er=/\s/;function Lr(e){for(var n=e.length;n--&&Er.test(e.charAt(n)););return n}var Or=/^\s+/;function Nr(e){return e&&e.slice(0,Lr(e)+1).replace(Or,"")}var _e=NaN,Pr=/^[-+]0x[0-9a-f]+$/i,Tr=/^0b[01]+$/i,Sr=/^0o[0-7]+$/i,Cr=parseInt;function Ir(e){if(typeof e=="number")return e;if(U(e))return _e;if(O(e)){var n=typeof e.valueOf=="function"?e.valueOf():e;e=O(n)?n+"":n}if(typeof e!="string")return e===0?e:+e;e=Nr(e);var r=Tr.test(e);return r||Sr.test(e)?Cr(e.slice(2),r?2:8):Pr.test(e)?_e:+e}var Ae=1/0,Rr=17976931348623157e292;function G(e){if(!e)return e===0?e:0;if(e=Ir(e),e===Ae||e===-Ae){var n=e<0?-1:1;return n*Rr}return e===e?e:0}function kr(e){var n=G(e),r=n%1;return n===n?r?n-r:n:0}var je=Object.create,Mr=(function(){function e(){}return function(n){if(!O(n))return{};if(je)return je(n);e.prototype=n;var r=new e;return e.prototype=void 0,r}})();function _r(e,n){var r=-1,t=e.length;for(n||(n=Array(t));++r<t;)n[r]=e[r];return n}function K(e,n,r){n=="__proto__"&&Ie?Ie(e,n,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[n]=r}var Ar=Object.prototype,jr=Ar.hasOwnProperty;function Z(e,n,r){var t=e[n];(!(jr.call(e,n)&&H(t,r))||r===void 0&&!(n in e))&&K(e,n,r)}function Dr(e,n,r,t){var a=!r;r||(r={});for(var o=-1,i=n.length;++o<i;){var s=n[o],d=void 0;d===void 0&&(d=e[s]),a?K(r,s,d):Z(r,s,d)}return r}function j(e,n,r){if(!O(r))return!1;var t=typeof n;return(t=="number"?z(r)&&tn(n,r.length):t=="string"&&n in r)?H(r[n],e):!1}function Br(e){return le(function(n,r){var t=-1,a=r.length,o=a>1?r[a-1]:void 0,i=a>2?r[2]:void 0;for(o=e.length>3&&typeof o=="function"?(a--,o):void 0,i&&j(r[0],r[1],i)&&(o=a<3?void 0:o,a=1),n=Object(n);++t<a;){var s=r[t];s&&e(n,s,t,o)}return n})}function $r(e){var n=[];if(e!=null)for(var r in Object(e))n.push(r);return n}var Fr=Object.prototype,Xr=Fr.hasOwnProperty;function Gr(e){if(!O(e))return $r(e);var n=an(e),r=[];for(var t in e)t=="constructor"&&(n||!Xr.call(e,t))||r.push(t);return r}function Q(e){return z(e)?tr(e,!0):Gr(e)}function _(e){var n=e==null?0:e.length;return n?on(e):[]}function Yr(e){return ar(ir(e,void 0,_),e+"")}var pn=or(Object.getPrototypeOf,Object),Ur="[object Object]",Vr=Function.prototype,Wr=Object.prototype,gn=Vr.toString,qr=Wr.hasOwnProperty,Hr=gn.call(Object);function zr(e){if(!he(e)||sr(e)!=Ur)return!1;var n=pn(e);if(n===null)return!0;var r=qr.call(n,"constructor")&&n.constructor;return typeof r=="function"&&r instanceof r&&gn.call(r)==Hr}var vn=typeof exports=="object"&&exports&&!exports.nodeType&&exports,De=vn&&typeof module=="object"&&module&&!module.nodeType&&module,Jr=De&&De.exports===vn,Be=Jr?dr.Buffer:void 0,$e=Be?Be.allocUnsafe:void 0;function bn(e,n){if(n)return e.slice();var r=e.length,t=$e?$e(r):new e.constructor(r);return e.copy(t),t}var Kr=Object.prototype,Zr=Kr.hasOwnProperty;function Qr(e){var n=e.length,r=new e.constructor(n);return n&&typeof e[0]=="string"&&Zr.call(e,"index")&&(r.index=e.index,r.input=e.input),r}function be(e){var n=new e.constructor(e.byteLength);return new Re(n).set(new Re(e)),n}function et(e,n){var r=be(e.buffer);return new e.constructor(r,e.byteOffset,e.byteLength)}var nt=/\w*$/;function rt(e){var n=new e.constructor(e.source,nt.exec(e));return n.lastIndex=e.lastIndex,n}var Fe=ke?ke.prototype:void 0,Xe=Fe?Fe.valueOf:void 0;function tt(e){return Xe?Object(Xe.call(e)):{}}function wn(e,n){var r=n?be(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var at="[object Boolean]",it="[object Date]",ot="[object Map]",st="[object Number]",dt="[object RegExp]",ut="[object Set]",ft="[object String]",ct="[object Symbol]",lt="[object ArrayBuffer]",ht="[object DataView]",pt="[object Float32Array]",gt="[object Float64Array]",vt="[object Int8Array]",bt="[object Int16Array]",wt="[object Int32Array]",mt="[object Uint8Array]",yt="[object Uint8ClampedArray]",xt="[object Uint16Array]",Et="[object Uint32Array]";function Lt(e,n,r){var t=e.constructor;switch(n){case lt:return be(e);case at:case it:return new t(+e);case ht:return et(e);case pt:case gt:case vt:case bt:case wt:case mt:case yt:case xt:case Et:return wn(e,r);case ot:return new t;case st:case ft:return new t(e);case dt:return rt(e);case ut:return new t;case ct:return tt(e)}}function mn(e){return typeof e.constructor=="function"&&!an(e)?Mr(pn(e)):{}}var Ot="[object Map]";function Nt(e){return he(e)&&pe(e)==Ot}var Ge=V&&V.isMap,Pt=Ge?ge(Ge):Nt,Tt="[object Set]";function St(e){return he(e)&&pe(e)==Tt}var Ye=V&&V.isSet,Ct=Ye?ge(Ye):St,It=1,yn="[object Arguments]",Rt="[object Array]",kt="[object Boolean]",Mt="[object Date]",_t="[object Error]",xn="[object Function]",At="[object GeneratorFunction]",jt="[object Map]",Dt="[object Number]",En="[object Object]",Bt="[object RegExp]",$t="[object Set]",Ft="[object String]",Xt="[object Symbol]",Gt="[object WeakMap]",Yt="[object ArrayBuffer]",Ut="[object DataView]",Vt="[object Float32Array]",Wt="[object Float64Array]",qt="[object Int8Array]",Ht="[object Int16Array]",zt="[object Int32Array]",Jt="[object Uint8Array]",Kt="[object Uint8ClampedArray]",Zt="[object Uint16Array]",Qt="[object Uint32Array]",y={};y[yn]=y[Rt]=y[Yt]=y[Ut]=y[kt]=y[Mt]=y[Vt]=y[Wt]=y[qt]=y[Ht]=y[zt]=y[jt]=y[Dt]=y[En]=y[Bt]=y[$t]=y[Ft]=y[Xt]=y[Jt]=y[Kt]=y[Zt]=y[Qt]=!0;y[_t]=y[xn]=y[Gt]=!1;function Y(e,n,r,t,a,o){var i,s=n&It;if(i!==void 0)return i;if(!O(e))return e;var d=I(e);if(d)i=Qr(e);else{var u=pe(e),f=u==xn||u==At;if(sn(e))return bn(e,s);if(u==En||u==yn||f&&!a)i=f?{}:mn(e);else{if(!y[u])return a?e:{};i=Lt(e,u,s)}}o||(o=new dn);var c=o.get(e);if(c)return c;o.set(e,i),Ct(e)?e.forEach(function(p){i.add(Y(p,n,r,p,e,o))}):Pt(e)&&e.forEach(function(p,g){i.set(g,Y(p,n,r,g,e,o))});var h=fr,v=d?void 0:h(e);return ur(v||e,function(p,g){v&&(g=p,p=e[g]),Z(i,g,Y(p,n,r,g,e,o))}),i}var ea=1,na=4;function ra(e){return Y(e,ea|na)}var Ln=Object.prototype,ta=Ln.hasOwnProperty,aa=le(function(e,n){e=Object(e);var r=-1,t=n.length,a=t>2?n[2]:void 0;for(a&&j(n[0],n[1],a)&&(t=1);++r<t;)for(var o=n[r],i=Q(o),s=-1,d=i.length;++s<d;){var u=i[s],f=e[u];(f===void 0||H(f,Ln[u])&&!ta.call(e,u))&&(e[u]=o[u])}return e});function se(e,n,r){(r!==void 0&&!H(e[n],r)||r===void 0&&!(n in e))&&K(e,n,r)}function de(e,n){if(!(n==="constructor"&&typeof e[n]=="function")&&n!="__proto__")return e[n]}function ia(e){return Dr(e,Q(e))}function oa(e,n,r,t,a,o,i){var s=de(e,r),d=de(n,r),u=i.get(d);if(u){se(e,r,u);return}var f=o?o(s,d,r+"",e,n,i):void 0,c=f===void 0;if(c){var h=I(d),v=!h&&sn(d),p=!h&&!v&&cr(d);f=d,h||v||p?I(s)?f=s:lr(s)?f=_r(s):v?(c=!1,f=bn(d,!0)):p?(c=!1,f=wn(d,!0)):f=[]:zr(d)||Me(d)?(f=s,Me(s)?f=ia(s):(!O(s)||hr(s))&&(f=mn(d))):c=!1}c&&(i.set(d,f),a(f,d,t,o,i),i.delete(d)),se(e,r,f)}function On(e,n,r,t,a){e!==n&&un(n,function(o,i){if(a||(a=new dn),O(o))oa(e,n,i,r,On,t,a);else{var s=t?t(de(e,i),o,i+"",e,n,a):void 0;s===void 0&&(s=o),se(e,i,s)}},Q)}function W(e){var n=e==null?0:e.length;return n?e[n-1]:void 0}function sa(e){return function(n,r,t){var a=Object(n);if(!z(n)){var o=M(r);n=pr(n),r=function(s){return o(a[s],s,a)}}var i=e(n,r,t);return i>-1?a[o?n[i]:i]:void 0}}var da=Math.max;function ua(e,n,r){var t=e==null?0:e.length;if(!t)return-1;var a=r==null?0:kr(r);return a<0&&(a=da(t+a,0)),gr(e,M(n),a)}var we=sa(ua);function Nn(e,n){var r=-1,t=z(e)?Array(e.length):[];return vr(e,function(a,o,i){t[++r]=n(a,o,i)}),t}function E(e,n){var r=I(e)?X:Nn;return r(e,M(n))}function fa(e,n){return e==null?e:un(e,fn(n),Q)}function ca(e,n){return e&&cn(e,fn(n))}function la(e,n){return e>n}var ha=Object.prototype,pa=ha.hasOwnProperty;function ga(e,n){return e!=null&&pa.call(e,n)}function Pn(e,n){return e!=null&&br(e,n,ga)}function Tn(e,n){return e<n}function ee(e,n){var r={};return n=M(n),cn(e,function(t,a,o){K(r,a,n(t,a,o))}),r}function me(e,n,r){for(var t=-1,a=e.length;++t<a;){var o=e[t],i=n(o);if(i!=null&&(s===void 0?i===i&&!U(i):r(i,s)))var s=i,d=o}return d}function S(e){return e&&e.length?me(e,ve,la):void 0}var ue=Br(function(e,n,r){On(e,n,r)});function D(e){return e&&e.length?me(e,ve,Tn):void 0}function ye(e,n){return e&&e.length?me(e,M(n),Tn):void 0}function va(e,n,r,t){if(!O(e))return e;n=ln(n,e);for(var a=-1,o=n.length,i=o-1,s=e;s!=null&&++a<o;){var d=wr(n[a]),u=r;if(d==="__proto__"||d==="constructor"||d==="prototype")return e;if(a!=i){var f=s[d];u=void 0,u===void 0&&(u=O(f)?f:tn(n[a+1])?[]:{})}Z(s,d,u),s=s[d]}return e}function ba(e,n,r){for(var t=-1,a=n.length,o={};++t<a;){var i=n[t],s=hn(e,i);r(s,i)&&va(o,ln(i,e),s)}return o}function wa(e,n){var r=e.length;for(e.sort(n);r--;)e[r]=e[r].value;return e}function ma(e,n){if(e!==n){var r=e!==void 0,t=e===null,a=e===e,o=U(e),i=n!==void 0,s=n===null,d=n===n,u=U(n);if(!s&&!u&&!o&&e>n||o&&i&&d&&!s&&!u||t&&i&&d||!r&&d||!a)return 1;if(!t&&!o&&!u&&e<n||u&&r&&a&&!t&&!o||s&&r&&a||!i&&a||!d)return-1}return 0}function ya(e,n,r){for(var t=-1,a=e.criteria,o=n.criteria,i=a.length,s=r.length;++t<i;){var d=ma(a[t],o[t]);if(d){if(t>=s)return d;var u=r[t];return d*(u=="desc"?-1:1)}}return e.index-n.index}function xa(e,n,r){n.length?n=X(n,function(o){return I(o)?function(i){return hn(i,o.length===1?o[0]:o)}:o}):n=[ve];var t=-1;n=X(n,ge(M));var a=Nn(e,function(o,i,s){var d=X(n,function(u){return u(o)});return{criteria:d,index:++t,value:o}});return wa(a,function(o,i){return ya(o,i,r)})}function Ea(e,n){return ba(e,n,function(r,t){return mr(e,t)})}var q=Yr(function(e,n){return e==null?{}:Ea(e,n)}),La=Math.ceil,Oa=Math.max;function Na(e,n,r,t){for(var a=-1,o=Oa(La((n-e)/(r||1)),0),i=Array(o);o--;)i[++a]=e,e+=r;return i}function Pa(e){return function(n,r,t){return t&&typeof t!="number"&&j(n,r,t)&&(r=t=void 0),n=G(n),r===void 0?(r=n,n=0):r=G(r),t=t===void 0?n<r?1:-1:G(t),Na(n,r,t)}}var k=Pa(),F=le(function(e,n){if(e==null)return[];var r=n.length;return r>1&&j(e,n[0],n[1])?n=[]:r>2&&j(n[0],n[1],n[2])&&(n=[n[0]]),xa(e,on(n),[])}),Ta=0;function xe(e){var n=++Ta;return yr(e)+n}function Sa(e,n,r){for(var t=-1,a=e.length,o=n.length,i={};++t<a;){var s=t<o?n[t]:void 0;r(i,e[t],s)}return i}function Ca(e,n){return Sa(e||[],n||[],Z)}class Ia{constructor(){var n={};n._next=n._prev=n,this._sentinel=n}dequeue(){var n=this._sentinel,r=n._prev;if(r!==n)return Ue(r),r}enqueue(n){var r=this._sentinel;n._prev&&n._next&&Ue(n),n._next=r._next,r._next._prev=n,r._next=n,n._prev=r}toString(){for(var n=[],r=this._sentinel,t=r._prev;t!==r;)n.push(JSON.stringify(t,Ra)),t=t._prev;return"["+n.join(", ")+"]"}}function Ue(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function Ra(e,n){if(e!=="_next"&&e!=="_prev")return n}var ka=xr(1);function Ma(e,n){if(e.nodeCount()<=1)return[];var r=Aa(e,n||ka),t=_a(r.graph,r.buckets,r.zeroIdx);return _(E(t,function(a){return e.outEdges(a.v,a.w)}))}function _a(e,n,r){for(var t=[],a=n[n.length-1],o=n[0],i;e.nodeCount();){for(;i=o.dequeue();)re(e,n,r,i);for(;i=a.dequeue();)re(e,n,r,i);if(e.nodeCount()){for(var s=n.length-2;s>0;--s)if(i=n[s].dequeue(),i){t=t.concat(re(e,n,r,i,!0));break}}}return t}function re(e,n,r,t,a){var o=a?[]:void 0;return l(e.inEdges(t.v),function(i){var s=e.edge(i),d=e.node(i.v);a&&o.push({v:i.v,w:i.w}),d.out-=s,fe(n,r,d)}),l(e.outEdges(t.v),function(i){var s=e.edge(i),d=i.w,u=e.node(d);u.in-=s,fe(n,r,u)}),e.removeNode(t.v),o}function Aa(e,n){var r=new N,t=0,a=0;l(e.nodes(),function(s){r.setNode(s,{v:s,in:0,out:0})}),l(e.edges(),function(s){var d=r.edge(s.v,s.w)||0,u=n(s),f=d+u;r.setEdge(s.v,s.w,f),a=Math.max(a,r.node(s.v).out+=u),t=Math.max(t,r.node(s.w).in+=u)});var o=k(a+t+3).map(function(){return new Ia}),i=t+1;return l(r.nodes(),function(s){fe(o,i,r.node(s))}),{graph:r,buckets:o,zeroIdx:i}}function fe(e,n,r){r.out?r.in?e[r.out-r.in+n].enqueue(r):e[e.length-1].enqueue(r):e[0].enqueue(r)}function ja(e){var n=e.graph().acyclicer==="greedy"?Ma(e,r(e)):Da(e);l(n,function(t){var a=e.edge(t);e.removeEdge(t),a.forwardName=t.name,a.reversed=!0,e.setEdge(t.w,t.v,a,xe("rev"))});function r(t){return function(a){return t.edge(a).weight}}}function Da(e){var n=[],r={},t={};function a(o){Object.prototype.hasOwnProperty.call(t,o)||(t[o]=!0,r[o]=!0,l(e.outEdges(o),function(i){Object.prototype.hasOwnProperty.call(r,i.w)?n.push(i):a(i.w)}),delete r[o])}return l(e.nodes(),a),n}function Ba(e){l(e.edges(),function(n){var r=e.edge(n);if(r.reversed){e.removeEdge(n);var t=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(n.w,n.v,r,t)}})}function A(e,n,r,t){var a;do a=xe(t);while(e.hasNode(a));return r.dummy=n,e.setNode(a,r),a}function $a(e){var n=new N().setGraph(e.graph());return l(e.nodes(),function(r){n.setNode(r,e.node(r))}),l(e.edges(),function(r){var t=n.edge(r.v,r.w)||{weight:0,minlen:1},a=e.edge(r);n.setEdge(r.v,r.w,{weight:t.weight+a.weight,minlen:Math.max(t.minlen,a.minlen)})}),n}function Sn(e){var n=new N({multigraph:e.isMultigraph()}).setGraph(e.graph());return l(e.nodes(),function(r){e.children(r).length||n.setNode(r,e.node(r))}),l(e.edges(),function(r){n.setEdge(r,e.edge(r))}),n}function Ve(e,n){var r=e.x,t=e.y,a=n.x-r,o=n.y-t,i=e.width/2,s=e.height/2;if(!a&&!o)throw new Error("Not possible to find intersection inside of the rectangle");var d,u;return Math.abs(o)*i>Math.abs(a)*s?(o<0&&(s=-s),d=s*a/o,u=s):(a<0&&(i=-i),d=i,u=i*o/a),{x:r+d,y:t+u}}function ne(e){var n=E(k(Cn(e)+1),function(){return[]});return l(e.nodes(),function(r){var t=e.node(r),a=t.rank;L(a)||(n[a][t.order]=r)}),n}function Fa(e){var n=D(E(e.nodes(),function(r){return e.node(r).rank}));l(e.nodes(),function(r){var t=e.node(r);Pn(t,"rank")&&(t.rank-=n)})}function Xa(e){var n=D(E(e.nodes(),function(o){return e.node(o).rank})),r=[];l(e.nodes(),function(o){var i=e.node(o).rank-n;r[i]||(r[i]=[]),r[i].push(o)});var t=0,a=e.graph().nodeRankFactor;l(r,function(o,i){L(o)&&i%a!==0?--t:t&&l(o,function(s){e.node(s).rank+=t})})}function We(e,n,r,t){var a={width:0,height:0};return arguments.length>=4&&(a.rank=r,a.order=t),A(e,"border",a,n)}function Cn(e){return S(E(e.nodes(),function(n){var r=e.node(n).rank;if(!L(r))return r}))}function Ga(e,n){var r={lhs:[],rhs:[]};return l(e,function(t){n(t)?r.lhs.push(t):r.rhs.push(t)}),r}function Ya(e,n){return n()}function Ua(e){function n(r){var t=e.children(r),a=e.node(r);if(t.length&&l(t,n),Object.prototype.hasOwnProperty.call(a,"minRank")){a.borderLeft=[],a.borderRight=[];for(var o=a.minRank,i=a.maxRank+1;o<i;++o)qe(e,"borderLeft","_bl",r,a,o),qe(e,"borderRight","_br",r,a,o)}}l(e.children(),n)}function qe(e,n,r,t,a,o){var i={width:0,height:0,rank:o,borderType:n},s=a[n][o-1],d=A(e,"border",i,r);a[n][o]=d,e.setParent(d,t),s&&e.setEdge(s,d,{weight:1})}function Va(e){var n=e.graph().rankdir.toLowerCase();(n==="lr"||n==="rl")&&In(e)}function Wa(e){var n=e.graph().rankdir.toLowerCase();(n==="bt"||n==="rl")&&qa(e),(n==="lr"||n==="rl")&&(Ha(e),In(e))}function In(e){l(e.nodes(),function(n){He(e.node(n))}),l(e.edges(),function(n){He(e.edge(n))})}function He(e){var n=e.width;e.width=e.height,e.height=n}function qa(e){l(e.nodes(),function(n){te(e.node(n))}),l(e.edges(),function(n){var r=e.edge(n);l(r.points,te),Object.prototype.hasOwnProperty.call(r,"y")&&te(r)})}function te(e){e.y=-e.y}function Ha(e){l(e.nodes(),function(n){ae(e.node(n))}),l(e.edges(),function(n){var r=e.edge(n);l(r.points,ae),Object.prototype.hasOwnProperty.call(r,"x")&&ae(r)})}function ae(e){var n=e.x;e.x=e.y,e.y=n}function za(e){e.graph().dummyChains=[],l(e.edges(),function(n){Ja(e,n)})}function Ja(e,n){var r=n.v,t=e.node(r).rank,a=n.w,o=e.node(a).rank,i=n.name,s=e.edge(n),d=s.labelRank;if(o!==t+1){e.removeEdge(n);var u=void 0,f,c;for(c=0,++t;t<o;++c,++t)s.points=[],u={width:0,height:0,edgeLabel:s,edgeObj:n,rank:t},f=A(e,"edge",u,"_d"),t===d&&(u.width=s.width,u.height=s.height,u.dummy="edge-label",u.labelpos=s.labelpos),e.setEdge(r,f,{weight:s.weight},i),c===0&&e.graph().dummyChains.push(f),r=f;e.setEdge(r,a,{weight:s.weight},i)}}function Ka(e){l(e.graph().dummyChains,function(n){var r=e.node(n),t=r.edgeLabel,a;for(e.setEdge(r.edgeObj,t);r.dummy;)a=e.successors(n)[0],e.removeNode(n),t.points.push({x:r.x,y:r.y}),r.dummy==="edge-label"&&(t.x=r.x,t.y=r.y,t.width=r.width,t.height=r.height),n=a,r=e.node(n)})}function Ee(e){var n={};function r(t){var a=e.node(t);if(Object.prototype.hasOwnProperty.call(n,t))return a.rank;n[t]=!0;var o=D(E(e.outEdges(t),function(i){return r(i.w)-e.edge(i).minlen}));return(o===Number.POSITIVE_INFINITY||o===void 0||o===null)&&(o=0),a.rank=o}l(e.sources(),r)}function B(e,n){return e.node(n.w).rank-e.node(n.v).rank-e.edge(n).minlen}function Rn(e){var n=new N({directed:!1}),r=e.nodes()[0],t=e.nodeCount();n.setNode(r,{});for(var a,o;Za(n,e)<t;)a=Qa(n,e),o=n.hasNode(a.v)?B(e,a):-B(e,a),ei(n,e,o);return n}function Za(e,n){function r(t){l(n.nodeEdges(t),function(a){var o=a.v,i=t===o?a.w:o;!e.hasNode(i)&&!B(n,a)&&(e.setNode(i,{}),e.setEdge(t,i,{}),r(i))})}return l(e.nodes(),r),e.nodeCount()}function Qa(e,n){return ye(n.edges(),function(r){if(e.hasNode(r.v)!==e.hasNode(r.w))return B(n,r)})}function ei(e,n,r){l(e.nodes(),function(t){n.node(t).rank+=r})}function ni(){}ni.prototype=new Error;function kn(e,n,r){I(n)||(n=[n]);var t=(e.isDirected()?e.successors:e.neighbors).bind(e),a=[],o={};return l(n,function(i){if(!e.hasNode(i))throw new Error("Graph does not have node: "+i);Mn(e,i,r==="post",o,t,a)}),a}function Mn(e,n,r,t,a,o){Object.prototype.hasOwnProperty.call(t,n)||(t[n]=!0,r||o.push(n),l(a(n),function(i){Mn(e,i,r,t,a,o)}),r&&o.push(n))}function ri(e,n){return kn(e,n,"post")}function ti(e,n){return kn(e,n,"pre")}C.initLowLimValues=Oe;C.initCutValues=Le;C.calcCutValue=_n;C.leaveEdge=jn;C.enterEdge=Dn;C.exchangeEdges=Bn;function C(e){e=$a(e),Ee(e);var n=Rn(e);Oe(n),Le(n,e);for(var r,t;r=jn(n);)t=Dn(n,e,r),Bn(n,e,r,t)}function Le(e,n){var r=ri(e,e.nodes());r=r.slice(0,r.length-1),l(r,function(t){ai(e,n,t)})}function ai(e,n,r){var t=e.node(r),a=t.parent;e.edge(r,a).cutvalue=_n(e,n,r)}function _n(e,n,r){var t=e.node(r),a=t.parent,o=!0,i=n.edge(r,a),s=0;return i||(o=!1,i=n.edge(a,r)),s=i.weight,l(n.nodeEdges(r),function(d){var u=d.v===r,f=u?d.w:d.v;if(f!==a){var c=u===o,h=n.edge(d).weight;if(s+=c?h:-h,oi(e,r,f)){var v=e.edge(r,f).cutvalue;s+=c?-v:v}}}),s}function Oe(e,n){arguments.length<2&&(n=e.nodes()[0]),An(e,{},1,n)}function An(e,n,r,t,a){var o=r,i=e.node(t);return n[t]=!0,l(e.neighbors(t),function(s){Object.prototype.hasOwnProperty.call(n,s)||(r=An(e,n,r,s,t))}),i.low=o,i.lim=r++,a?i.parent=a:delete i.parent,r}function jn(e){return we(e.edges(),function(n){return e.edge(n).cutvalue<0})}function Dn(e,n,r){var t=r.v,a=r.w;n.hasEdge(t,a)||(t=r.w,a=r.v);var o=e.node(t),i=e.node(a),s=o,d=!1;o.lim>i.lim&&(s=i,d=!0);var u=$(n.edges(),function(f){return d===ze(e,e.node(f.v),s)&&d!==ze(e,e.node(f.w),s)});return ye(u,function(f){return B(n,f)})}function Bn(e,n,r,t){var a=r.v,o=r.w;e.removeEdge(a,o),e.setEdge(t.v,t.w,{}),Oe(e),Le(e,n),ii(e,n)}function ii(e,n){var r=we(e.nodes(),function(a){return!n.node(a).parent}),t=ti(e,r);t=t.slice(1),l(t,function(a){var o=e.node(a).parent,i=n.edge(a,o),s=!1;i||(i=n.edge(o,a),s=!0),n.node(a).rank=n.node(o).rank+(s?i.minlen:-i.minlen)})}function oi(e,n,r){return e.hasEdge(n,r)}function ze(e,n,r){return r.low<=n.lim&&n.lim<=r.lim}function si(e){switch(e.graph().ranker){case"network-simplex":Je(e);break;case"tight-tree":ui(e);break;case"longest-path":di(e);break;default:Je(e)}}var di=Ee;function ui(e){Ee(e),Rn(e)}function Je(e){C(e)}function fi(e){var n=A(e,"root",{},"_root"),r=ci(e),t=S(R(r))-1,a=2*t+1;e.graph().nestingRoot=n,l(e.edges(),function(i){e.edge(i).minlen*=a});var o=li(e)+1;l(e.children(),function(i){$n(e,n,a,o,t,r,i)}),e.graph().nodeRankFactor=a}function $n(e,n,r,t,a,o,i){var s=e.children(i);if(!s.length){i!==n&&e.setEdge(n,i,{weight:0,minlen:r});return}var d=We(e,"_bt"),u=We(e,"_bb"),f=e.node(i);e.setParent(d,i),f.borderTop=d,e.setParent(u,i),f.borderBottom=u,l(s,function(c){$n(e,n,r,t,a,o,c);var h=e.node(c),v=h.borderTop?h.borderTop:c,p=h.borderBottom?h.borderBottom:c,g=h.borderTop?t:2*t,b=v!==p?1:a-o[i]+1;e.setEdge(d,v,{weight:g,minlen:b,nestingEdge:!0}),e.setEdge(p,u,{weight:g,minlen:b,nestingEdge:!0})}),e.parent(i)||e.setEdge(n,d,{weight:0,minlen:a+o[i]})}function ci(e){var n={};function r(t,a){var o=e.children(t);o&&o.length&&l(o,function(i){r(i,a+1)}),n[t]=a}return l(e.children(),function(t){r(t,1)}),n}function li(e){return J(e.edges(),function(n,r){return n+e.edge(r).weight},0)}function hi(e){var n=e.graph();e.removeNode(n.nestingRoot),delete n.nestingRoot,l(e.edges(),function(r){var t=e.edge(r);t.nestingEdge&&e.removeEdge(r)})}function pi(e,n,r){var t={},a;l(r,function(o){for(var i=e.parent(o),s,d;i;){if(s=e.parent(i),s?(d=t[s],t[s]=i):(d=a,a=i),d&&d!==i){n.setEdge(d,i);return}i=s}})}function gi(e,n,r){var t=vi(e),a=new N({compound:!0}).setGraph({root:t}).setDefaultNodeLabel(function(o){return e.node(o)});return l(e.nodes(),function(o){var i=e.node(o),s=e.parent(o);(i.rank===n||i.minRank<=n&&n<=i.maxRank)&&(a.setNode(o),a.setParent(o,s||t),l(e[r](o),function(d){var u=d.v===o?d.w:d.v,f=a.edge(u,o),c=L(f)?0:f.weight;a.setEdge(u,o,{weight:e.edge(d).weight+c})}),Object.prototype.hasOwnProperty.call(i,"minRank")&&a.setNode(o,{borderLeft:i.borderLeft[n],borderRight:i.borderRight[n]}))}),a}function vi(e){for(var n;e.hasNode(n=xe("_root")););return n}function bi(e,n){for(var r=0,t=1;t<n.length;++t)r+=wi(e,n[t-1],n[t]);return r}function wi(e,n,r){for(var t=Ca(r,E(r,function(u,f){return f})),a=_(E(n,function(u){return F(E(e.outEdges(u),function(f){return{pos:t[f.w],weight:e.edge(f).weight}}),"pos")})),o=1;o<r.length;)o<<=1;var i=2*o-1;o-=1;var s=E(new Array(i),function(){return 0}),d=0;return l(a.forEach(function(u){var f=u.pos+o;s[f]+=u.weight;for(var c=0;f>0;)f%2&&(c+=s[f+1]),f=f-1>>1,s[f]+=u.weight;d+=u.weight*c})),d}function mi(e){var n={},r=$(e.nodes(),function(s){return!e.children(s).length}),t=S(E(r,function(s){return e.node(s).rank})),a=E(k(t+1),function(){return[]});function o(s){if(!Pn(n,s)){n[s]=!0;var d=e.node(s);a[d.rank].push(s),l(e.successors(s),o)}}var i=F(r,function(s){return e.node(s).rank});return l(i,o),a}function yi(e,n){return E(n,function(r){var t=e.inEdges(r);if(t.length){var a=J(t,function(o,i){var s=e.edge(i),d=e.node(i.v);return{sum:o.sum+s.weight*d.order,weight:o.weight+s.weight}},{sum:0,weight:0});return{v:r,barycenter:a.sum/a.weight,weight:a.weight}}else return{v:r}})}function xi(e,n){var r={};l(e,function(a,o){var i=r[a.v]={indegree:0,in:[],out:[],vs:[a.v],i:o};L(a.barycenter)||(i.barycenter=a.barycenter,i.weight=a.weight)}),l(n.edges(),function(a){var o=r[a.v],i=r[a.w];!L(o)&&!L(i)&&(i.indegree++,o.out.push(r[a.w]))});var t=$(r,function(a){return!a.indegree});return Ei(t)}function Ei(e){var n=[];function r(o){return function(i){i.merged||(L(i.barycenter)||L(o.barycenter)||i.barycenter>=o.barycenter)&&Li(o,i)}}function t(o){return function(i){i.in.push(o),--i.indegree===0&&e.push(i)}}for(;e.length;){var a=e.pop();n.push(a),l(a.in.reverse(),r(a)),l(a.out,t(a))}return E($(n,function(o){return!o.merged}),function(o){return q(o,["vs","i","barycenter","weight"])})}function Li(e,n){var r=0,t=0;e.weight&&(r+=e.barycenter*e.weight,t+=e.weight),n.weight&&(r+=n.barycenter*n.weight,t+=n.weight),e.vs=n.vs.concat(e.vs),e.barycenter=r/t,e.weight=t,e.i=Math.min(n.i,e.i),n.merged=!0}function Oi(e,n){var r=Ga(e,function(f){return Object.prototype.hasOwnProperty.call(f,"barycenter")}),t=r.lhs,a=F(r.rhs,function(f){return-f.i}),o=[],i=0,s=0,d=0;t.sort(Ni(!!n)),d=Ke(o,a,d),l(t,function(f){d+=f.vs.length,o.push(f.vs),i+=f.barycenter*f.weight,s+=f.weight,d=Ke(o,a,d)});var u={vs:_(o)};return s&&(u.barycenter=i/s,u.weight=s),u}function Ke(e,n,r){for(var t;n.length&&(t=W(n)).i<=r;)n.pop(),e.push(t.vs),r++;return r}function Ni(e){return function(n,r){return n.barycenter<r.barycenter?-1:n.barycenter>r.barycenter?1:e?r.i-n.i:n.i-r.i}}function Fn(e,n,r,t){var a=e.children(n),o=e.node(n),i=o?o.borderLeft:void 0,s=o?o.borderRight:void 0,d={};i&&(a=$(a,function(p){return p!==i&&p!==s}));var u=yi(e,a);l(u,function(p){if(e.children(p.v).length){var g=Fn(e,p.v,r,t);d[p.v]=g,Object.prototype.hasOwnProperty.call(g,"barycenter")&&Ti(p,g)}});var f=xi(u,r);Pi(f,d);var c=Oi(f,t);if(i&&(c.vs=_([i,c.vs,s]),e.predecessors(i).length)){var h=e.node(e.predecessors(i)[0]),v=e.node(e.predecessors(s)[0]);Object.prototype.hasOwnProperty.call(c,"barycenter")||(c.barycenter=0,c.weight=0),c.barycenter=(c.barycenter*c.weight+h.order+v.order)/(c.weight+2),c.weight+=2}return c}function Pi(e,n){l(e,function(r){r.vs=_(r.vs.map(function(t){return n[t]?n[t].vs:t}))})}function Ti(e,n){L(e.barycenter)?(e.barycenter=n.barycenter,e.weight=n.weight):(e.barycenter=(e.barycenter*e.weight+n.barycenter*n.weight)/(e.weight+n.weight),e.weight+=n.weight)}function Si(e){var n=Cn(e),r=Ze(e,k(1,n+1),"inEdges"),t=Ze(e,k(n-1,-1,-1),"outEdges"),a=mi(e);Qe(e,a);for(var o=Number.POSITIVE_INFINITY,i,s=0,d=0;d<4;++s,++d){Ci(s%2?r:t,s%4>=2),a=ne(e);var u=bi(e,a);u<o&&(d=0,i=ra(a),o=u)}Qe(e,i)}function Ze(e,n,r){return E(n,function(t){return gi(e,t,r)})}function Ci(e,n){var r=new N;l(e,function(t){var a=t.graph().root,o=Fn(t,a,r,n);l(o.vs,function(i,s){t.node(i).order=s}),pi(t,r,o.vs)})}function Qe(e,n){l(n,function(r){l(r,function(t,a){e.node(t).order=a})})}function Ii(e){var n=ki(e);l(e.graph().dummyChains,function(r){for(var t=e.node(r),a=t.edgeObj,o=Ri(e,n,a.v,a.w),i=o.path,s=o.lca,d=0,u=i[d],f=!0;r!==a.w;){if(t=e.node(r),f){for(;(u=i[d])!==s&&e.node(u).maxRank<t.rank;)d++;u===s&&(f=!1)}if(!f){for(;d<i.length-1&&e.node(u=i[d+1]).minRank<=t.rank;)d++;u=i[d]}e.setParent(r,u),r=e.successors(r)[0]}})}function Ri(e,n,r,t){var a=[],o=[],i=Math.min(n[r].low,n[t].low),s=Math.max(n[r].lim,n[t].lim),d,u;d=r;do d=e.parent(d),a.push(d);while(d&&(n[d].low>i||s>n[d].lim));for(u=d,d=t;(d=e.parent(d))!==u;)o.push(d);return{path:a.concat(o.reverse()),lca:u}}function ki(e){var n={},r=0;function t(a){var o=r;l(e.children(a),t),n[a]={low:o,lim:r++}}return l(e.children(),t),n}function Mi(e,n){var r={};function t(a,o){var i=0,s=0,d=a.length,u=W(o);return l(o,function(f,c){var h=Ai(e,f),v=h?e.node(h).order:d;(h||f===u)&&(l(o.slice(s,c+1),function(p){l(e.predecessors(p),function(g){var b=e.node(g),w=b.order;(w<i||v<w)&&!(b.dummy&&e.node(p).dummy)&&Xn(r,g,p)})}),s=c+1,i=v)}),o}return J(n,t),r}function _i(e,n){var r={};function t(o,i,s,d,u){var f;l(k(i,s),function(c){f=o[c],e.node(f).dummy&&l(e.predecessors(f),function(h){var v=e.node(h);v.dummy&&(v.order<d||v.order>u)&&Xn(r,h,f)})})}function a(o,i){var s=-1,d,u=0;return l(i,function(f,c){if(e.node(f).dummy==="border"){var h=e.predecessors(f);h.length&&(d=e.node(h[0]).order,t(i,u,c,s,d),u=c,s=d)}t(i,u,i.length,d,o.length)}),i}return J(n,a),r}function Ai(e,n){if(e.node(n).dummy)return we(e.predecessors(n),function(r){return e.node(r).dummy})}function Xn(e,n,r){if(n>r){var t=n;n=r,r=t}Object.prototype.hasOwnProperty.call(e,n)||Object.defineProperty(e,n,{enumerable:!0,configurable:!0,value:{},writable:!0});var a=e[n];Object.defineProperty(a,r,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function ji(e,n,r){if(n>r){var t=n;n=r,r=t}return!!e[n]&&Object.prototype.hasOwnProperty.call(e[n],r)}function Di(e,n,r,t){var a={},o={},i={};return l(n,function(s){l(s,function(d,u){a[d]=d,o[d]=d,i[d]=u})}),l(n,function(s){var d=-1;l(s,function(u){var f=t(u);if(f.length){f=F(f,function(g){return i[g]});for(var c=(f.length-1)/2,h=Math.floor(c),v=Math.ceil(c);h<=v;++h){var p=f[h];o[u]===u&&d<i[p]&&!ji(r,u,p)&&(o[p]=u,o[u]=a[u]=a[p],d=i[p])}}})}),{root:a,align:o}}function Bi(e,n,r,t,a){var o={},i=$i(e,n,r,a),s=a?"borderLeft":"borderRight";function d(c,h){for(var v=i.nodes(),p=v.pop(),g={};p;)g[p]?c(p):(g[p]=!0,v.push(p),v=v.concat(h(p))),p=v.pop()}function u(c){o[c]=i.inEdges(c).reduce(function(h,v){return Math.max(h,o[v.v]+i.edge(v))},0)}function f(c){var h=i.outEdges(c).reduce(function(p,g){return Math.min(p,o[g.w]-i.edge(g))},Number.POSITIVE_INFINITY),v=e.node(c);h!==Number.POSITIVE_INFINITY&&v.borderType!==s&&(o[c]=Math.max(o[c],h))}return d(u,i.predecessors.bind(i)),d(f,i.successors.bind(i)),l(t,function(c){o[c]=o[r[c]]}),o}function $i(e,n,r,t){var a=new N,o=e.graph(),i=Ui(o.nodesep,o.edgesep,t);return l(n,function(s){var d;l(s,function(u){var f=r[u];if(a.setNode(f),d){var c=r[d],h=a.edge(c,f);a.setEdge(c,f,Math.max(i(e,u,d),h||0))}d=u})}),a}function Fi(e,n){return ye(R(n),function(r){var t=Number.NEGATIVE_INFINITY,a=Number.POSITIVE_INFINITY;return fa(r,function(o,i){var s=Vi(e,i)/2;t=Math.max(o+s,t),a=Math.min(o-s,a)}),t-a})}function Xi(e,n){var r=R(n),t=D(r),a=S(r);l(["u","d"],function(o){l(["l","r"],function(i){var s=o+i,d=e[s],u;if(d!==n){var f=R(d);u=i==="l"?t-D(f):a-S(f),u&&(e[s]=ee(d,function(c){return c+u}))}})})}function Gi(e,n){return ee(e.ul,function(r,t){if(n)return e[n.toLowerCase()][t];var a=F(E(e,t));return(a[1]+a[2])/2})}function Yi(e){var n=ne(e),r=ue(Mi(e,n),_i(e,n)),t={},a;l(["u","d"],function(i){a=i==="u"?n:R(n).reverse(),l(["l","r"],function(s){s==="r"&&(a=E(a,function(c){return R(c).reverse()}));var d=(i==="u"?e.predecessors:e.successors).bind(e),u=Di(e,a,r,d),f=Bi(e,a,u.root,u.align,s==="r");s==="r"&&(f=ee(f,function(c){return-c})),t[i+s]=f})});var o=Fi(e,t);return Xi(t,o),Gi(t,e.graph().align)}function Ui(e,n,r){return function(t,a,o){var i=t.node(a),s=t.node(o),d=0,u;if(d+=i.width/2,Object.prototype.hasOwnProperty.call(i,"labelpos"))switch(i.labelpos.toLowerCase()){case"l":u=-i.width/2;break;case"r":u=i.width/2;break}if(u&&(d+=r?u:-u),u=0,d+=(i.dummy?n:e)/2,d+=(s.dummy?n:e)/2,d+=s.width/2,Object.prototype.hasOwnProperty.call(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":u=s.width/2;break;case"r":u=-s.width/2;break}return u&&(d+=r?u:-u),u=0,d}}function Vi(e,n){return e.node(n).width}function Wi(e){e=Sn(e),qi(e),ca(Yi(e),function(n,r){e.node(r).x=n})}function qi(e){var n=ne(e),r=e.graph().ranksep,t=0;l(n,function(a){var o=S(E(a,function(i){return e.node(i).height}));l(a,function(i){e.node(i).y=t+o/2}),t+=o+r})}function Hi(e,n){var r=Ya;r("layout",()=>{var t=r(" buildLayoutGraph",()=>io(e));r(" runLayout",()=>zi(t,r)),r(" updateInputGraph",()=>Ji(e,t))})}function zi(e,n){n(" makeSpaceForEdgeLabels",()=>oo(e)),n(" removeSelfEdges",()=>vo(e)),n(" acyclic",()=>ja(e)),n(" nestingGraph.run",()=>fi(e)),n(" rank",()=>si(Sn(e))),n(" injectEdgeLabelProxies",()=>so(e)),n(" removeEmptyRanks",()=>Xa(e)),n(" nestingGraph.cleanup",()=>hi(e)),n(" normalizeRanks",()=>Fa(e)),n(" assignRankMinMax",()=>uo(e)),n(" removeEdgeLabelProxies",()=>fo(e)),n(" normalize.run",()=>za(e)),n(" parentDummyChains",()=>Ii(e)),n(" addBorderSegments",()=>Ua(e)),n(" order",()=>Si(e)),n(" insertSelfEdges",()=>bo(e)),n(" adjustCoordinateSystem",()=>Va(e)),n(" position",()=>Wi(e)),n(" positionSelfEdges",()=>wo(e)),n(" removeBorderNodes",()=>go(e)),n(" normalize.undo",()=>Ka(e)),n(" fixupEdgeLabelCoords",()=>ho(e)),n(" undoCoordinateSystem",()=>Wa(e)),n(" translateGraph",()=>co(e)),n(" assignNodeIntersects",()=>lo(e)),n(" reversePoints",()=>po(e)),n(" acyclic.undo",()=>Ba(e))}function Ji(e,n){l(e.nodes(),function(r){var t=e.node(r),a=n.node(r);t&&(t.x=a.x,t.y=a.y,n.children(r).length&&(t.width=a.width,t.height=a.height))}),l(e.edges(),function(r){var t=e.edge(r),a=n.edge(r);t.points=a.points,Object.prototype.hasOwnProperty.call(a,"x")&&(t.x=a.x,t.y=a.y)}),e.graph().width=n.graph().width,e.graph().height=n.graph().height}var Ki=["nodesep","edgesep","ranksep","marginx","marginy"],Zi={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},Qi=["acyclicer","ranker","rankdir","align"],eo=["width","height"],no={width:0,height:0},ro=["minlen","weight","width","height","labeloffset"],to={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},ao=["labelpos"];function io(e){var n=new N({multigraph:!0,compound:!0}),r=oe(e.graph());return n.setGraph(ue({},Zi,ie(r,Ki),q(r,Qi))),l(e.nodes(),function(t){var a=oe(e.node(t));n.setNode(t,aa(ie(a,eo),no)),n.setParent(t,e.parent(t))}),l(e.edges(),function(t){var a=oe(e.edge(t));n.setEdge(t,ue({},to,ie(a,ro),q(a,ao)))}),n}function oo(e){var n=e.graph();n.ranksep/=2,l(e.edges(),function(r){var t=e.edge(r);t.minlen*=2,t.labelpos.toLowerCase()!=="c"&&(n.rankdir==="TB"||n.rankdir==="BT"?t.width+=t.labeloffset:t.height+=t.labeloffset)})}function so(e){l(e.edges(),function(n){var r=e.edge(n);if(r.width&&r.height){var t=e.node(n.v),a=e.node(n.w),o={rank:(a.rank-t.rank)/2+t.rank,e:n};A(e,"edge-proxy",o,"_ep")}})}function uo(e){var n=0;l(e.nodes(),function(r){var t=e.node(r);t.borderTop&&(t.minRank=e.node(t.borderTop).rank,t.maxRank=e.node(t.borderBottom).rank,n=S(n,t.maxRank))}),e.graph().maxRank=n}function fo(e){l(e.nodes(),function(n){var r=e.node(n);r.dummy==="edge-proxy"&&(e.edge(r.e).labelRank=r.rank,e.removeNode(n))})}function co(e){var n=Number.POSITIVE_INFINITY,r=0,t=Number.POSITIVE_INFINITY,a=0,o=e.graph(),i=o.marginx||0,s=o.marginy||0;function d(u){var f=u.x,c=u.y,h=u.width,v=u.height;n=Math.min(n,f-h/2),r=Math.max(r,f+h/2),t=Math.min(t,c-v/2),a=Math.max(a,c+v/2)}l(e.nodes(),function(u){d(e.node(u))}),l(e.edges(),function(u){var f=e.edge(u);Object.prototype.hasOwnProperty.call(f,"x")&&d(f)}),n-=i,t-=s,l(e.nodes(),function(u){var f=e.node(u);f.x-=n,f.y-=t}),l(e.edges(),function(u){var f=e.edge(u);l(f.points,function(c){c.x-=n,c.y-=t}),Object.prototype.hasOwnProperty.call(f,"x")&&(f.x-=n),Object.prototype.hasOwnProperty.call(f,"y")&&(f.y-=t)}),o.width=r-n+i,o.height=a-t+s}function lo(e){l(e.edges(),function(n){var r=e.edge(n),t=e.node(n.v),a=e.node(n.w),o,i;r.points?(o=r.points[0],i=r.points[r.points.length-1]):(r.points=[],o=a,i=t),r.points.unshift(Ve(t,o)),r.points.push(Ve(a,i))})}function ho(e){l(e.edges(),function(n){var r=e.edge(n);if(Object.prototype.hasOwnProperty.call(r,"x"))switch((r.labelpos==="l"||r.labelpos==="r")&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset;break}})}function po(e){l(e.edges(),function(n){var r=e.edge(n);r.reversed&&r.points.reverse()})}function go(e){l(e.nodes(),function(n){if(e.children(n).length){var r=e.node(n),t=e.node(r.borderTop),a=e.node(r.borderBottom),o=e.node(W(r.borderLeft)),i=e.node(W(r.borderRight));r.width=Math.abs(i.x-o.x),r.height=Math.abs(a.y-t.y),r.x=o.x+r.width/2,r.y=t.y+r.height/2}}),l(e.nodes(),function(n){e.node(n).dummy==="border"&&e.removeNode(n)})}function vo(e){l(e.edges(),function(n){if(n.v===n.w){var r=e.node(n.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:n,label:e.edge(n)}),e.removeEdge(n)}})}function bo(e){var n=ne(e);l(n,function(r){var t=0;l(r,function(a,o){var i=e.node(a);i.order=o+t,l(i.selfEdges,function(s){A(e,"selfedge",{width:s.label.width,height:s.label.height,rank:i.rank,order:o+ ++t,e:s.e,label:s.label},"_se")}),delete i.selfEdges})})}function wo(e){l(e.nodes(),function(n){var r=e.node(n);if(r.dummy==="selfedge"){var t=e.node(r.e.v),a=t.x+t.width/2,o=t.y,i=r.x-a,s=t.height/2;e.setEdge(r.e,r.label),e.removeNode(n),r.label.points=[{x:a+2*i/3,y:o-s},{x:a+5*i/6,y:o-s},{x:a+i,y:o},{x:a+5*i/6,y:o+s},{x:a+2*i/3,y:o+s}],r.label.x=r.x,r.label.y=r.y}})}function ie(e,n){return ee(q(e,n),Number)}function oe(e){var n={};return l(e,function(r,t){n[t.toLowerCase()]=r}),n}var en=x((e,n,r)=>Math.max(n,Math.min(r,e)),"clamp"),nn=x((e="TB")=>{switch(e){case"BT":return"bottom";case"LR":return"right";case"RL":return"left";case"TB":default:return"top"}},"getDefaultSelfLoopSide"),mo=x(e=>e==="flowchart"||e==="flowchart-v2"||e==="stateDiagram"||e==="er"||e==="classDiagram","shouldMergeSelfLoopSegments"),yo=["x","y","width","height","labelBBox","intersect","calcIntersect","diff","clusterNode"],xo=x((e,n,r,t,a)=>{const o=[],i=new Set;if(r.forEach(({start:f,end:c})=>{f!==t&&i.add(f),c!==t&&i.add(c)}),i.forEach(f=>{const c=e.node(f);typeof c?.x=="number"&&typeof c?.y=="number"&&o.push(c)}),o.length===0&&r.forEach(({edge:f})=>{(f.points??[]).forEach(c=>{typeof c?.x=="number"&&typeof c?.y=="number"&&o.push(c)})}),o.length===0)return nn(a);const s=o.reduce((f,c)=>({x:f.x+c.x/o.length,y:f.y+c.y/o.length}),{x:0,y:0}),d=s.x-n.x,u=s.y-n.y;return Math.abs(d)>Math.abs(u)?d>0?"right":"left":Math.abs(u)>0?u>0?"bottom":"top":nn(a)},"getSelfLoopSide"),Eo=x((e,n="top",r=0,t=0)=>{const a=e.x,o=e.y-r,i=e.width/2,s=e.height/2,d=Math.max(36,Math.min(100,e.width*.8)),u=en(Math.max(t,e.width*.35),36,d),f=en(Math.min(e.width,e.height)*.45,24,48);switch(n){case"bottom":{const c=o+s;return[{x:a-u/2,y:c},{x:a-u/2,y:c+f},{x:a+u/2,y:c+f},{x:a+u/2,y:c}]}case"right":{const c=a+i;return[{x:c,y:o-u/2},{x:c+f,y:o-u/2},{x:c+f,y:o+u/2},{x:c,y:o+u/2}]}case"left":{const c=a-i;return[{x:c,y:o-u/2},{x:c-f,y:o-u/2},{x:c-f,y:o+u/2},{x:c,y:o+u/2}]}case"top":default:{const c=o-s;return[{x:a-u/2,y:c},{x:a-u/2,y:c-f},{x:a+u/2,y:c-f},{x:a+u/2,y:c}]}}},"getSelfLoopPoints"),Lo=x((e,n,r="top",t=0,a={})=>{const i=e.x,s=e.y-t,d=a.width??0,u=a.height??0;switch(r){case"bottom":return{x:i,y:Math.max(...n.map(f=>f.y))+u/2+4};case"right":return{x:Math.max(...n.map(f=>f.x))+d/2+4,y:s};case"left":return{x:Math.min(...n.map(f=>f.x))-d/2-4,y:s};case"top":default:return{x:i,y:Math.min(...n.map(f=>f.y))-u/2-4}}},"getSelfLoopLabelPosition"),Gn=x((e,n=0,{mergeSelfLoops:r=!0}={})=>{const t=new Map,a=[],o=e.graph()?.rankdir;return e.edges().forEach(i=>{const s=e.edge(i);if(r&&s.selfLoop){const d=s.selfLoop.id;t.has(d)||t.set(d,[]),t.get(d).push({edge:s,start:i.v,end:i.w})}else a.push({edge:s,start:i.v,end:i.w})}),t.forEach(i=>{if(i.length!==3){i.forEach(w=>a.push(w));return}i.sort((w,P)=>w.edge.selfLoop.order-P.edge.selfLoop.order);const[s,d,u]=i,f=s.edge.originalEdge??d.edge.originalEdge??u.edge.originalEdge??d.edge,c=e.node(f.start);if(!c){i.forEach(w=>a.push(w));return}const h={width:d.edge.width,height:d.edge.height},v=xo(e,c,i,f.start,o),p=Eo(c,v,n,h.width??0),g=Lo(c,p,v,n,h),b={...d.edge,...f,id:f.id,points:p,start:f.start,end:f.end,x:g.x,y:g.y,width:h.width,height:h.height,labelStyle:d.edge.labelStyle,fromCluster:s.edge.fromCluster??d.edge.fromCluster??u.edge.fromCluster,toCluster:s.edge.toCluster??d.edge.toCluster??u.edge.toCluster};delete b.selfLoop,delete b.originalEdge,a.push({edge:b,start:b.start,end:b.end})}),a},"getEdgesToRender"),Yn=x(async({element:e,graph:n,diagramType:r,id:t,parentCluster:a,siteConfig:o})=>{const i=n.graph().rankdir;m.trace("Dir in recursive render - dir:",i);const{clusters:s,edgePaths:d,edgeLabels:u,nodes:f,rootGroups:c}=Hn(e,{edgePathsClass:"edgePaths"});n.nodes()?m.info("Recursive render XXX",n.nodes()):m.info("No nodes found for",n),n.edges().length>0&&m.info("Recursive edges",n.edge(n.edges()[0]));const h=mo(r);await Promise.all(n.nodes().map(async function(g){const b=n.node(g);if(a!==void 0){const w=JSON.parse(JSON.stringify(a.clusterData));m.trace(`Setting data for parent cluster XXX
1
+ import{s as ce,a as Wn,b as qn,d as Hn,f as Te,c as T,i as zn}from"./DfjJilaB.js";import{b as x,X as Jn,ay as m,bg as Kn,b1 as Zn,a4 as Qn,af as Se,aL as Ce,ad as er,ae as nr,aK as rr}from"./DOKxXiSI.js";import{L as U,I as O,r as Ie,s as H,C as z,H as tn,m as le,K as an,c as tr,g as on,W as ar,R as ir,Q as or,J as he,k as sr,V as dr,U as Re,a as ke,w as pe,n as ge,P as V,E as sn,S as dn,b as ur,B as I,v as fr,M as cr,D as lr,A as Me,F as hr,h as un,l as M,O as pr,f as gr,e as vr,d as X,o as fn,i as cn,y as br,z as ve,p as ln,X as wr,j as hn,x as mr,Y as yr,G as N,u as l,q as xr,N as L,t as $,Z as R,T as J}from"./-xK_vQQs.js";var Er=/\s/;function Lr(e){for(var n=e.length;n--&&Er.test(e.charAt(n)););return n}var Or=/^\s+/;function Nr(e){return e&&e.slice(0,Lr(e)+1).replace(Or,"")}var _e=NaN,Pr=/^[-+]0x[0-9a-f]+$/i,Tr=/^0b[01]+$/i,Sr=/^0o[0-7]+$/i,Cr=parseInt;function Ir(e){if(typeof e=="number")return e;if(U(e))return _e;if(O(e)){var n=typeof e.valueOf=="function"?e.valueOf():e;e=O(n)?n+"":n}if(typeof e!="string")return e===0?e:+e;e=Nr(e);var r=Tr.test(e);return r||Sr.test(e)?Cr(e.slice(2),r?2:8):Pr.test(e)?_e:+e}var Ae=1/0,Rr=17976931348623157e292;function G(e){if(!e)return e===0?e:0;if(e=Ir(e),e===Ae||e===-Ae){var n=e<0?-1:1;return n*Rr}return e===e?e:0}function kr(e){var n=G(e),r=n%1;return n===n?r?n-r:n:0}var je=Object.create,Mr=(function(){function e(){}return function(n){if(!O(n))return{};if(je)return je(n);e.prototype=n;var r=new e;return e.prototype=void 0,r}})();function _r(e,n){var r=-1,t=e.length;for(n||(n=Array(t));++r<t;)n[r]=e[r];return n}function K(e,n,r){n=="__proto__"&&Ie?Ie(e,n,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[n]=r}var Ar=Object.prototype,jr=Ar.hasOwnProperty;function Z(e,n,r){var t=e[n];(!(jr.call(e,n)&&H(t,r))||r===void 0&&!(n in e))&&K(e,n,r)}function Dr(e,n,r,t){var a=!r;r||(r={});for(var o=-1,i=n.length;++o<i;){var s=n[o],d=void 0;d===void 0&&(d=e[s]),a?K(r,s,d):Z(r,s,d)}return r}function j(e,n,r){if(!O(r))return!1;var t=typeof n;return(t=="number"?z(r)&&tn(n,r.length):t=="string"&&n in r)?H(r[n],e):!1}function Br(e){return le(function(n,r){var t=-1,a=r.length,o=a>1?r[a-1]:void 0,i=a>2?r[2]:void 0;for(o=e.length>3&&typeof o=="function"?(a--,o):void 0,i&&j(r[0],r[1],i)&&(o=a<3?void 0:o,a=1),n=Object(n);++t<a;){var s=r[t];s&&e(n,s,t,o)}return n})}function $r(e){var n=[];if(e!=null)for(var r in Object(e))n.push(r);return n}var Fr=Object.prototype,Xr=Fr.hasOwnProperty;function Gr(e){if(!O(e))return $r(e);var n=an(e),r=[];for(var t in e)t=="constructor"&&(n||!Xr.call(e,t))||r.push(t);return r}function Q(e){return z(e)?tr(e,!0):Gr(e)}function _(e){var n=e==null?0:e.length;return n?on(e):[]}function Yr(e){return ar(ir(e,void 0,_),e+"")}var pn=or(Object.getPrototypeOf,Object),Ur="[object Object]",Vr=Function.prototype,Wr=Object.prototype,gn=Vr.toString,qr=Wr.hasOwnProperty,Hr=gn.call(Object);function zr(e){if(!he(e)||sr(e)!=Ur)return!1;var n=pn(e);if(n===null)return!0;var r=qr.call(n,"constructor")&&n.constructor;return typeof r=="function"&&r instanceof r&&gn.call(r)==Hr}var vn=typeof exports=="object"&&exports&&!exports.nodeType&&exports,De=vn&&typeof module=="object"&&module&&!module.nodeType&&module,Jr=De&&De.exports===vn,Be=Jr?dr.Buffer:void 0,$e=Be?Be.allocUnsafe:void 0;function bn(e,n){if(n)return e.slice();var r=e.length,t=$e?$e(r):new e.constructor(r);return e.copy(t),t}var Kr=Object.prototype,Zr=Kr.hasOwnProperty;function Qr(e){var n=e.length,r=new e.constructor(n);return n&&typeof e[0]=="string"&&Zr.call(e,"index")&&(r.index=e.index,r.input=e.input),r}function be(e){var n=new e.constructor(e.byteLength);return new Re(n).set(new Re(e)),n}function et(e,n){var r=be(e.buffer);return new e.constructor(r,e.byteOffset,e.byteLength)}var nt=/\w*$/;function rt(e){var n=new e.constructor(e.source,nt.exec(e));return n.lastIndex=e.lastIndex,n}var Fe=ke?ke.prototype:void 0,Xe=Fe?Fe.valueOf:void 0;function tt(e){return Xe?Object(Xe.call(e)):{}}function wn(e,n){var r=n?be(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var at="[object Boolean]",it="[object Date]",ot="[object Map]",st="[object Number]",dt="[object RegExp]",ut="[object Set]",ft="[object String]",ct="[object Symbol]",lt="[object ArrayBuffer]",ht="[object DataView]",pt="[object Float32Array]",gt="[object Float64Array]",vt="[object Int8Array]",bt="[object Int16Array]",wt="[object Int32Array]",mt="[object Uint8Array]",yt="[object Uint8ClampedArray]",xt="[object Uint16Array]",Et="[object Uint32Array]";function Lt(e,n,r){var t=e.constructor;switch(n){case lt:return be(e);case at:case it:return new t(+e);case ht:return et(e);case pt:case gt:case vt:case bt:case wt:case mt:case yt:case xt:case Et:return wn(e,r);case ot:return new t;case st:case ft:return new t(e);case dt:return rt(e);case ut:return new t;case ct:return tt(e)}}function mn(e){return typeof e.constructor=="function"&&!an(e)?Mr(pn(e)):{}}var Ot="[object Map]";function Nt(e){return he(e)&&pe(e)==Ot}var Ge=V&&V.isMap,Pt=Ge?ge(Ge):Nt,Tt="[object Set]";function St(e){return he(e)&&pe(e)==Tt}var Ye=V&&V.isSet,Ct=Ye?ge(Ye):St,It=1,yn="[object Arguments]",Rt="[object Array]",kt="[object Boolean]",Mt="[object Date]",_t="[object Error]",xn="[object Function]",At="[object GeneratorFunction]",jt="[object Map]",Dt="[object Number]",En="[object Object]",Bt="[object RegExp]",$t="[object Set]",Ft="[object String]",Xt="[object Symbol]",Gt="[object WeakMap]",Yt="[object ArrayBuffer]",Ut="[object DataView]",Vt="[object Float32Array]",Wt="[object Float64Array]",qt="[object Int8Array]",Ht="[object Int16Array]",zt="[object Int32Array]",Jt="[object Uint8Array]",Kt="[object Uint8ClampedArray]",Zt="[object Uint16Array]",Qt="[object Uint32Array]",y={};y[yn]=y[Rt]=y[Yt]=y[Ut]=y[kt]=y[Mt]=y[Vt]=y[Wt]=y[qt]=y[Ht]=y[zt]=y[jt]=y[Dt]=y[En]=y[Bt]=y[$t]=y[Ft]=y[Xt]=y[Jt]=y[Kt]=y[Zt]=y[Qt]=!0;y[_t]=y[xn]=y[Gt]=!1;function Y(e,n,r,t,a,o){var i,s=n&It;if(i!==void 0)return i;if(!O(e))return e;var d=I(e);if(d)i=Qr(e);else{var u=pe(e),f=u==xn||u==At;if(sn(e))return bn(e,s);if(u==En||u==yn||f&&!a)i=f?{}:mn(e);else{if(!y[u])return a?e:{};i=Lt(e,u,s)}}o||(o=new dn);var c=o.get(e);if(c)return c;o.set(e,i),Ct(e)?e.forEach(function(p){i.add(Y(p,n,r,p,e,o))}):Pt(e)&&e.forEach(function(p,g){i.set(g,Y(p,n,r,g,e,o))});var h=fr,v=d?void 0:h(e);return ur(v||e,function(p,g){v&&(g=p,p=e[g]),Z(i,g,Y(p,n,r,g,e,o))}),i}var ea=1,na=4;function ra(e){return Y(e,ea|na)}var Ln=Object.prototype,ta=Ln.hasOwnProperty,aa=le(function(e,n){e=Object(e);var r=-1,t=n.length,a=t>2?n[2]:void 0;for(a&&j(n[0],n[1],a)&&(t=1);++r<t;)for(var o=n[r],i=Q(o),s=-1,d=i.length;++s<d;){var u=i[s],f=e[u];(f===void 0||H(f,Ln[u])&&!ta.call(e,u))&&(e[u]=o[u])}return e});function se(e,n,r){(r!==void 0&&!H(e[n],r)||r===void 0&&!(n in e))&&K(e,n,r)}function de(e,n){if(!(n==="constructor"&&typeof e[n]=="function")&&n!="__proto__")return e[n]}function ia(e){return Dr(e,Q(e))}function oa(e,n,r,t,a,o,i){var s=de(e,r),d=de(n,r),u=i.get(d);if(u){se(e,r,u);return}var f=o?o(s,d,r+"",e,n,i):void 0,c=f===void 0;if(c){var h=I(d),v=!h&&sn(d),p=!h&&!v&&cr(d);f=d,h||v||p?I(s)?f=s:lr(s)?f=_r(s):v?(c=!1,f=bn(d,!0)):p?(c=!1,f=wn(d,!0)):f=[]:zr(d)||Me(d)?(f=s,Me(s)?f=ia(s):(!O(s)||hr(s))&&(f=mn(d))):c=!1}c&&(i.set(d,f),a(f,d,t,o,i),i.delete(d)),se(e,r,f)}function On(e,n,r,t,a){e!==n&&un(n,function(o,i){if(a||(a=new dn),O(o))oa(e,n,i,r,On,t,a);else{var s=t?t(de(e,i),o,i+"",e,n,a):void 0;s===void 0&&(s=o),se(e,i,s)}},Q)}function W(e){var n=e==null?0:e.length;return n?e[n-1]:void 0}function sa(e){return function(n,r,t){var a=Object(n);if(!z(n)){var o=M(r);n=pr(n),r=function(s){return o(a[s],s,a)}}var i=e(n,r,t);return i>-1?a[o?n[i]:i]:void 0}}var da=Math.max;function ua(e,n,r){var t=e==null?0:e.length;if(!t)return-1;var a=r==null?0:kr(r);return a<0&&(a=da(t+a,0)),gr(e,M(n),a)}var we=sa(ua);function Nn(e,n){var r=-1,t=z(e)?Array(e.length):[];return vr(e,function(a,o,i){t[++r]=n(a,o,i)}),t}function E(e,n){var r=I(e)?X:Nn;return r(e,M(n))}function fa(e,n){return e==null?e:un(e,fn(n),Q)}function ca(e,n){return e&&cn(e,fn(n))}function la(e,n){return e>n}var ha=Object.prototype,pa=ha.hasOwnProperty;function ga(e,n){return e!=null&&pa.call(e,n)}function Pn(e,n){return e!=null&&br(e,n,ga)}function Tn(e,n){return e<n}function ee(e,n){var r={};return n=M(n),cn(e,function(t,a,o){K(r,a,n(t,a,o))}),r}function me(e,n,r){for(var t=-1,a=e.length;++t<a;){var o=e[t],i=n(o);if(i!=null&&(s===void 0?i===i&&!U(i):r(i,s)))var s=i,d=o}return d}function S(e){return e&&e.length?me(e,ve,la):void 0}var ue=Br(function(e,n,r){On(e,n,r)});function D(e){return e&&e.length?me(e,ve,Tn):void 0}function ye(e,n){return e&&e.length?me(e,M(n),Tn):void 0}function va(e,n,r,t){if(!O(e))return e;n=ln(n,e);for(var a=-1,o=n.length,i=o-1,s=e;s!=null&&++a<o;){var d=wr(n[a]),u=r;if(d==="__proto__"||d==="constructor"||d==="prototype")return e;if(a!=i){var f=s[d];u=void 0,u===void 0&&(u=O(f)?f:tn(n[a+1])?[]:{})}Z(s,d,u),s=s[d]}return e}function ba(e,n,r){for(var t=-1,a=n.length,o={};++t<a;){var i=n[t],s=hn(e,i);r(s,i)&&va(o,ln(i,e),s)}return o}function wa(e,n){var r=e.length;for(e.sort(n);r--;)e[r]=e[r].value;return e}function ma(e,n){if(e!==n){var r=e!==void 0,t=e===null,a=e===e,o=U(e),i=n!==void 0,s=n===null,d=n===n,u=U(n);if(!s&&!u&&!o&&e>n||o&&i&&d&&!s&&!u||t&&i&&d||!r&&d||!a)return 1;if(!t&&!o&&!u&&e<n||u&&r&&a&&!t&&!o||s&&r&&a||!i&&a||!d)return-1}return 0}function ya(e,n,r){for(var t=-1,a=e.criteria,o=n.criteria,i=a.length,s=r.length;++t<i;){var d=ma(a[t],o[t]);if(d){if(t>=s)return d;var u=r[t];return d*(u=="desc"?-1:1)}}return e.index-n.index}function xa(e,n,r){n.length?n=X(n,function(o){return I(o)?function(i){return hn(i,o.length===1?o[0]:o)}:o}):n=[ve];var t=-1;n=X(n,ge(M));var a=Nn(e,function(o,i,s){var d=X(n,function(u){return u(o)});return{criteria:d,index:++t,value:o}});return wa(a,function(o,i){return ya(o,i,r)})}function Ea(e,n){return ba(e,n,function(r,t){return mr(e,t)})}var q=Yr(function(e,n){return e==null?{}:Ea(e,n)}),La=Math.ceil,Oa=Math.max;function Na(e,n,r,t){for(var a=-1,o=Oa(La((n-e)/(r||1)),0),i=Array(o);o--;)i[++a]=e,e+=r;return i}function Pa(e){return function(n,r,t){return t&&typeof t!="number"&&j(n,r,t)&&(r=t=void 0),n=G(n),r===void 0?(r=n,n=0):r=G(r),t=t===void 0?n<r?1:-1:G(t),Na(n,r,t)}}var k=Pa(),F=le(function(e,n){if(e==null)return[];var r=n.length;return r>1&&j(e,n[0],n[1])?n=[]:r>2&&j(n[0],n[1],n[2])&&(n=[n[0]]),xa(e,on(n),[])}),Ta=0;function xe(e){var n=++Ta;return yr(e)+n}function Sa(e,n,r){for(var t=-1,a=e.length,o=n.length,i={};++t<a;){var s=t<o?n[t]:void 0;r(i,e[t],s)}return i}function Ca(e,n){return Sa(e||[],n||[],Z)}class Ia{constructor(){var n={};n._next=n._prev=n,this._sentinel=n}dequeue(){var n=this._sentinel,r=n._prev;if(r!==n)return Ue(r),r}enqueue(n){var r=this._sentinel;n._prev&&n._next&&Ue(n),n._next=r._next,r._next._prev=n,r._next=n,n._prev=r}toString(){for(var n=[],r=this._sentinel,t=r._prev;t!==r;)n.push(JSON.stringify(t,Ra)),t=t._prev;return"["+n.join(", ")+"]"}}function Ue(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function Ra(e,n){if(e!=="_next"&&e!=="_prev")return n}var ka=xr(1);function Ma(e,n){if(e.nodeCount()<=1)return[];var r=Aa(e,n||ka),t=_a(r.graph,r.buckets,r.zeroIdx);return _(E(t,function(a){return e.outEdges(a.v,a.w)}))}function _a(e,n,r){for(var t=[],a=n[n.length-1],o=n[0],i;e.nodeCount();){for(;i=o.dequeue();)re(e,n,r,i);for(;i=a.dequeue();)re(e,n,r,i);if(e.nodeCount()){for(var s=n.length-2;s>0;--s)if(i=n[s].dequeue(),i){t=t.concat(re(e,n,r,i,!0));break}}}return t}function re(e,n,r,t,a){var o=a?[]:void 0;return l(e.inEdges(t.v),function(i){var s=e.edge(i),d=e.node(i.v);a&&o.push({v:i.v,w:i.w}),d.out-=s,fe(n,r,d)}),l(e.outEdges(t.v),function(i){var s=e.edge(i),d=i.w,u=e.node(d);u.in-=s,fe(n,r,u)}),e.removeNode(t.v),o}function Aa(e,n){var r=new N,t=0,a=0;l(e.nodes(),function(s){r.setNode(s,{v:s,in:0,out:0})}),l(e.edges(),function(s){var d=r.edge(s.v,s.w)||0,u=n(s),f=d+u;r.setEdge(s.v,s.w,f),a=Math.max(a,r.node(s.v).out+=u),t=Math.max(t,r.node(s.w).in+=u)});var o=k(a+t+3).map(function(){return new Ia}),i=t+1;return l(r.nodes(),function(s){fe(o,i,r.node(s))}),{graph:r,buckets:o,zeroIdx:i}}function fe(e,n,r){r.out?r.in?e[r.out-r.in+n].enqueue(r):e[e.length-1].enqueue(r):e[0].enqueue(r)}function ja(e){var n=e.graph().acyclicer==="greedy"?Ma(e,r(e)):Da(e);l(n,function(t){var a=e.edge(t);e.removeEdge(t),a.forwardName=t.name,a.reversed=!0,e.setEdge(t.w,t.v,a,xe("rev"))});function r(t){return function(a){return t.edge(a).weight}}}function Da(e){var n=[],r={},t={};function a(o){Object.prototype.hasOwnProperty.call(t,o)||(t[o]=!0,r[o]=!0,l(e.outEdges(o),function(i){Object.prototype.hasOwnProperty.call(r,i.w)?n.push(i):a(i.w)}),delete r[o])}return l(e.nodes(),a),n}function Ba(e){l(e.edges(),function(n){var r=e.edge(n);if(r.reversed){e.removeEdge(n);var t=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(n.w,n.v,r,t)}})}function A(e,n,r,t){var a;do a=xe(t);while(e.hasNode(a));return r.dummy=n,e.setNode(a,r),a}function $a(e){var n=new N().setGraph(e.graph());return l(e.nodes(),function(r){n.setNode(r,e.node(r))}),l(e.edges(),function(r){var t=n.edge(r.v,r.w)||{weight:0,minlen:1},a=e.edge(r);n.setEdge(r.v,r.w,{weight:t.weight+a.weight,minlen:Math.max(t.minlen,a.minlen)})}),n}function Sn(e){var n=new N({multigraph:e.isMultigraph()}).setGraph(e.graph());return l(e.nodes(),function(r){e.children(r).length||n.setNode(r,e.node(r))}),l(e.edges(),function(r){n.setEdge(r,e.edge(r))}),n}function Ve(e,n){var r=e.x,t=e.y,a=n.x-r,o=n.y-t,i=e.width/2,s=e.height/2;if(!a&&!o)throw new Error("Not possible to find intersection inside of the rectangle");var d,u;return Math.abs(o)*i>Math.abs(a)*s?(o<0&&(s=-s),d=s*a/o,u=s):(a<0&&(i=-i),d=i,u=i*o/a),{x:r+d,y:t+u}}function ne(e){var n=E(k(Cn(e)+1),function(){return[]});return l(e.nodes(),function(r){var t=e.node(r),a=t.rank;L(a)||(n[a][t.order]=r)}),n}function Fa(e){var n=D(E(e.nodes(),function(r){return e.node(r).rank}));l(e.nodes(),function(r){var t=e.node(r);Pn(t,"rank")&&(t.rank-=n)})}function Xa(e){var n=D(E(e.nodes(),function(o){return e.node(o).rank})),r=[];l(e.nodes(),function(o){var i=e.node(o).rank-n;r[i]||(r[i]=[]),r[i].push(o)});var t=0,a=e.graph().nodeRankFactor;l(r,function(o,i){L(o)&&i%a!==0?--t:t&&l(o,function(s){e.node(s).rank+=t})})}function We(e,n,r,t){var a={width:0,height:0};return arguments.length>=4&&(a.rank=r,a.order=t),A(e,"border",a,n)}function Cn(e){return S(E(e.nodes(),function(n){var r=e.node(n).rank;if(!L(r))return r}))}function Ga(e,n){var r={lhs:[],rhs:[]};return l(e,function(t){n(t)?r.lhs.push(t):r.rhs.push(t)}),r}function Ya(e,n){return n()}function Ua(e){function n(r){var t=e.children(r),a=e.node(r);if(t.length&&l(t,n),Object.prototype.hasOwnProperty.call(a,"minRank")){a.borderLeft=[],a.borderRight=[];for(var o=a.minRank,i=a.maxRank+1;o<i;++o)qe(e,"borderLeft","_bl",r,a,o),qe(e,"borderRight","_br",r,a,o)}}l(e.children(),n)}function qe(e,n,r,t,a,o){var i={width:0,height:0,rank:o,borderType:n},s=a[n][o-1],d=A(e,"border",i,r);a[n][o]=d,e.setParent(d,t),s&&e.setEdge(s,d,{weight:1})}function Va(e){var n=e.graph().rankdir.toLowerCase();(n==="lr"||n==="rl")&&In(e)}function Wa(e){var n=e.graph().rankdir.toLowerCase();(n==="bt"||n==="rl")&&qa(e),(n==="lr"||n==="rl")&&(Ha(e),In(e))}function In(e){l(e.nodes(),function(n){He(e.node(n))}),l(e.edges(),function(n){He(e.edge(n))})}function He(e){var n=e.width;e.width=e.height,e.height=n}function qa(e){l(e.nodes(),function(n){te(e.node(n))}),l(e.edges(),function(n){var r=e.edge(n);l(r.points,te),Object.prototype.hasOwnProperty.call(r,"y")&&te(r)})}function te(e){e.y=-e.y}function Ha(e){l(e.nodes(),function(n){ae(e.node(n))}),l(e.edges(),function(n){var r=e.edge(n);l(r.points,ae),Object.prototype.hasOwnProperty.call(r,"x")&&ae(r)})}function ae(e){var n=e.x;e.x=e.y,e.y=n}function za(e){e.graph().dummyChains=[],l(e.edges(),function(n){Ja(e,n)})}function Ja(e,n){var r=n.v,t=e.node(r).rank,a=n.w,o=e.node(a).rank,i=n.name,s=e.edge(n),d=s.labelRank;if(o!==t+1){e.removeEdge(n);var u=void 0,f,c;for(c=0,++t;t<o;++c,++t)s.points=[],u={width:0,height:0,edgeLabel:s,edgeObj:n,rank:t},f=A(e,"edge",u,"_d"),t===d&&(u.width=s.width,u.height=s.height,u.dummy="edge-label",u.labelpos=s.labelpos),e.setEdge(r,f,{weight:s.weight},i),c===0&&e.graph().dummyChains.push(f),r=f;e.setEdge(r,a,{weight:s.weight},i)}}function Ka(e){l(e.graph().dummyChains,function(n){var r=e.node(n),t=r.edgeLabel,a;for(e.setEdge(r.edgeObj,t);r.dummy;)a=e.successors(n)[0],e.removeNode(n),t.points.push({x:r.x,y:r.y}),r.dummy==="edge-label"&&(t.x=r.x,t.y=r.y,t.width=r.width,t.height=r.height),n=a,r=e.node(n)})}function Ee(e){var n={};function r(t){var a=e.node(t);if(Object.prototype.hasOwnProperty.call(n,t))return a.rank;n[t]=!0;var o=D(E(e.outEdges(t),function(i){return r(i.w)-e.edge(i).minlen}));return(o===Number.POSITIVE_INFINITY||o===void 0||o===null)&&(o=0),a.rank=o}l(e.sources(),r)}function B(e,n){return e.node(n.w).rank-e.node(n.v).rank-e.edge(n).minlen}function Rn(e){var n=new N({directed:!1}),r=e.nodes()[0],t=e.nodeCount();n.setNode(r,{});for(var a,o;Za(n,e)<t;)a=Qa(n,e),o=n.hasNode(a.v)?B(e,a):-B(e,a),ei(n,e,o);return n}function Za(e,n){function r(t){l(n.nodeEdges(t),function(a){var o=a.v,i=t===o?a.w:o;!e.hasNode(i)&&!B(n,a)&&(e.setNode(i,{}),e.setEdge(t,i,{}),r(i))})}return l(e.nodes(),r),e.nodeCount()}function Qa(e,n){return ye(n.edges(),function(r){if(e.hasNode(r.v)!==e.hasNode(r.w))return B(n,r)})}function ei(e,n,r){l(e.nodes(),function(t){n.node(t).rank+=r})}function ni(){}ni.prototype=new Error;function kn(e,n,r){I(n)||(n=[n]);var t=(e.isDirected()?e.successors:e.neighbors).bind(e),a=[],o={};return l(n,function(i){if(!e.hasNode(i))throw new Error("Graph does not have node: "+i);Mn(e,i,r==="post",o,t,a)}),a}function Mn(e,n,r,t,a,o){Object.prototype.hasOwnProperty.call(t,n)||(t[n]=!0,r||o.push(n),l(a(n),function(i){Mn(e,i,r,t,a,o)}),r&&o.push(n))}function ri(e,n){return kn(e,n,"post")}function ti(e,n){return kn(e,n,"pre")}C.initLowLimValues=Oe;C.initCutValues=Le;C.calcCutValue=_n;C.leaveEdge=jn;C.enterEdge=Dn;C.exchangeEdges=Bn;function C(e){e=$a(e),Ee(e);var n=Rn(e);Oe(n),Le(n,e);for(var r,t;r=jn(n);)t=Dn(n,e,r),Bn(n,e,r,t)}function Le(e,n){var r=ri(e,e.nodes());r=r.slice(0,r.length-1),l(r,function(t){ai(e,n,t)})}function ai(e,n,r){var t=e.node(r),a=t.parent;e.edge(r,a).cutvalue=_n(e,n,r)}function _n(e,n,r){var t=e.node(r),a=t.parent,o=!0,i=n.edge(r,a),s=0;return i||(o=!1,i=n.edge(a,r)),s=i.weight,l(n.nodeEdges(r),function(d){var u=d.v===r,f=u?d.w:d.v;if(f!==a){var c=u===o,h=n.edge(d).weight;if(s+=c?h:-h,oi(e,r,f)){var v=e.edge(r,f).cutvalue;s+=c?-v:v}}}),s}function Oe(e,n){arguments.length<2&&(n=e.nodes()[0]),An(e,{},1,n)}function An(e,n,r,t,a){var o=r,i=e.node(t);return n[t]=!0,l(e.neighbors(t),function(s){Object.prototype.hasOwnProperty.call(n,s)||(r=An(e,n,r,s,t))}),i.low=o,i.lim=r++,a?i.parent=a:delete i.parent,r}function jn(e){return we(e.edges(),function(n){return e.edge(n).cutvalue<0})}function Dn(e,n,r){var t=r.v,a=r.w;n.hasEdge(t,a)||(t=r.w,a=r.v);var o=e.node(t),i=e.node(a),s=o,d=!1;o.lim>i.lim&&(s=i,d=!0);var u=$(n.edges(),function(f){return d===ze(e,e.node(f.v),s)&&d!==ze(e,e.node(f.w),s)});return ye(u,function(f){return B(n,f)})}function Bn(e,n,r,t){var a=r.v,o=r.w;e.removeEdge(a,o),e.setEdge(t.v,t.w,{}),Oe(e),Le(e,n),ii(e,n)}function ii(e,n){var r=we(e.nodes(),function(a){return!n.node(a).parent}),t=ti(e,r);t=t.slice(1),l(t,function(a){var o=e.node(a).parent,i=n.edge(a,o),s=!1;i||(i=n.edge(o,a),s=!0),n.node(a).rank=n.node(o).rank+(s?i.minlen:-i.minlen)})}function oi(e,n,r){return e.hasEdge(n,r)}function ze(e,n,r){return r.low<=n.lim&&n.lim<=r.lim}function si(e){switch(e.graph().ranker){case"network-simplex":Je(e);break;case"tight-tree":ui(e);break;case"longest-path":di(e);break;default:Je(e)}}var di=Ee;function ui(e){Ee(e),Rn(e)}function Je(e){C(e)}function fi(e){var n=A(e,"root",{},"_root"),r=ci(e),t=S(R(r))-1,a=2*t+1;e.graph().nestingRoot=n,l(e.edges(),function(i){e.edge(i).minlen*=a});var o=li(e)+1;l(e.children(),function(i){$n(e,n,a,o,t,r,i)}),e.graph().nodeRankFactor=a}function $n(e,n,r,t,a,o,i){var s=e.children(i);if(!s.length){i!==n&&e.setEdge(n,i,{weight:0,minlen:r});return}var d=We(e,"_bt"),u=We(e,"_bb"),f=e.node(i);e.setParent(d,i),f.borderTop=d,e.setParent(u,i),f.borderBottom=u,l(s,function(c){$n(e,n,r,t,a,o,c);var h=e.node(c),v=h.borderTop?h.borderTop:c,p=h.borderBottom?h.borderBottom:c,g=h.borderTop?t:2*t,b=v!==p?1:a-o[i]+1;e.setEdge(d,v,{weight:g,minlen:b,nestingEdge:!0}),e.setEdge(p,u,{weight:g,minlen:b,nestingEdge:!0})}),e.parent(i)||e.setEdge(n,d,{weight:0,minlen:a+o[i]})}function ci(e){var n={};function r(t,a){var o=e.children(t);o&&o.length&&l(o,function(i){r(i,a+1)}),n[t]=a}return l(e.children(),function(t){r(t,1)}),n}function li(e){return J(e.edges(),function(n,r){return n+e.edge(r).weight},0)}function hi(e){var n=e.graph();e.removeNode(n.nestingRoot),delete n.nestingRoot,l(e.edges(),function(r){var t=e.edge(r);t.nestingEdge&&e.removeEdge(r)})}function pi(e,n,r){var t={},a;l(r,function(o){for(var i=e.parent(o),s,d;i;){if(s=e.parent(i),s?(d=t[s],t[s]=i):(d=a,a=i),d&&d!==i){n.setEdge(d,i);return}i=s}})}function gi(e,n,r){var t=vi(e),a=new N({compound:!0}).setGraph({root:t}).setDefaultNodeLabel(function(o){return e.node(o)});return l(e.nodes(),function(o){var i=e.node(o),s=e.parent(o);(i.rank===n||i.minRank<=n&&n<=i.maxRank)&&(a.setNode(o),a.setParent(o,s||t),l(e[r](o),function(d){var u=d.v===o?d.w:d.v,f=a.edge(u,o),c=L(f)?0:f.weight;a.setEdge(u,o,{weight:e.edge(d).weight+c})}),Object.prototype.hasOwnProperty.call(i,"minRank")&&a.setNode(o,{borderLeft:i.borderLeft[n],borderRight:i.borderRight[n]}))}),a}function vi(e){for(var n;e.hasNode(n=xe("_root")););return n}function bi(e,n){for(var r=0,t=1;t<n.length;++t)r+=wi(e,n[t-1],n[t]);return r}function wi(e,n,r){for(var t=Ca(r,E(r,function(u,f){return f})),a=_(E(n,function(u){return F(E(e.outEdges(u),function(f){return{pos:t[f.w],weight:e.edge(f).weight}}),"pos")})),o=1;o<r.length;)o<<=1;var i=2*o-1;o-=1;var s=E(new Array(i),function(){return 0}),d=0;return l(a.forEach(function(u){var f=u.pos+o;s[f]+=u.weight;for(var c=0;f>0;)f%2&&(c+=s[f+1]),f=f-1>>1,s[f]+=u.weight;d+=u.weight*c})),d}function mi(e){var n={},r=$(e.nodes(),function(s){return!e.children(s).length}),t=S(E(r,function(s){return e.node(s).rank})),a=E(k(t+1),function(){return[]});function o(s){if(!Pn(n,s)){n[s]=!0;var d=e.node(s);a[d.rank].push(s),l(e.successors(s),o)}}var i=F(r,function(s){return e.node(s).rank});return l(i,o),a}function yi(e,n){return E(n,function(r){var t=e.inEdges(r);if(t.length){var a=J(t,function(o,i){var s=e.edge(i),d=e.node(i.v);return{sum:o.sum+s.weight*d.order,weight:o.weight+s.weight}},{sum:0,weight:0});return{v:r,barycenter:a.sum/a.weight,weight:a.weight}}else return{v:r}})}function xi(e,n){var r={};l(e,function(a,o){var i=r[a.v]={indegree:0,in:[],out:[],vs:[a.v],i:o};L(a.barycenter)||(i.barycenter=a.barycenter,i.weight=a.weight)}),l(n.edges(),function(a){var o=r[a.v],i=r[a.w];!L(o)&&!L(i)&&(i.indegree++,o.out.push(r[a.w]))});var t=$(r,function(a){return!a.indegree});return Ei(t)}function Ei(e){var n=[];function r(o){return function(i){i.merged||(L(i.barycenter)||L(o.barycenter)||i.barycenter>=o.barycenter)&&Li(o,i)}}function t(o){return function(i){i.in.push(o),--i.indegree===0&&e.push(i)}}for(;e.length;){var a=e.pop();n.push(a),l(a.in.reverse(),r(a)),l(a.out,t(a))}return E($(n,function(o){return!o.merged}),function(o){return q(o,["vs","i","barycenter","weight"])})}function Li(e,n){var r=0,t=0;e.weight&&(r+=e.barycenter*e.weight,t+=e.weight),n.weight&&(r+=n.barycenter*n.weight,t+=n.weight),e.vs=n.vs.concat(e.vs),e.barycenter=r/t,e.weight=t,e.i=Math.min(n.i,e.i),n.merged=!0}function Oi(e,n){var r=Ga(e,function(f){return Object.prototype.hasOwnProperty.call(f,"barycenter")}),t=r.lhs,a=F(r.rhs,function(f){return-f.i}),o=[],i=0,s=0,d=0;t.sort(Ni(!!n)),d=Ke(o,a,d),l(t,function(f){d+=f.vs.length,o.push(f.vs),i+=f.barycenter*f.weight,s+=f.weight,d=Ke(o,a,d)});var u={vs:_(o)};return s&&(u.barycenter=i/s,u.weight=s),u}function Ke(e,n,r){for(var t;n.length&&(t=W(n)).i<=r;)n.pop(),e.push(t.vs),r++;return r}function Ni(e){return function(n,r){return n.barycenter<r.barycenter?-1:n.barycenter>r.barycenter?1:e?r.i-n.i:n.i-r.i}}function Fn(e,n,r,t){var a=e.children(n),o=e.node(n),i=o?o.borderLeft:void 0,s=o?o.borderRight:void 0,d={};i&&(a=$(a,function(p){return p!==i&&p!==s}));var u=yi(e,a);l(u,function(p){if(e.children(p.v).length){var g=Fn(e,p.v,r,t);d[p.v]=g,Object.prototype.hasOwnProperty.call(g,"barycenter")&&Ti(p,g)}});var f=xi(u,r);Pi(f,d);var c=Oi(f,t);if(i&&(c.vs=_([i,c.vs,s]),e.predecessors(i).length)){var h=e.node(e.predecessors(i)[0]),v=e.node(e.predecessors(s)[0]);Object.prototype.hasOwnProperty.call(c,"barycenter")||(c.barycenter=0,c.weight=0),c.barycenter=(c.barycenter*c.weight+h.order+v.order)/(c.weight+2),c.weight+=2}return c}function Pi(e,n){l(e,function(r){r.vs=_(r.vs.map(function(t){return n[t]?n[t].vs:t}))})}function Ti(e,n){L(e.barycenter)?(e.barycenter=n.barycenter,e.weight=n.weight):(e.barycenter=(e.barycenter*e.weight+n.barycenter*n.weight)/(e.weight+n.weight),e.weight+=n.weight)}function Si(e){var n=Cn(e),r=Ze(e,k(1,n+1),"inEdges"),t=Ze(e,k(n-1,-1,-1),"outEdges"),a=mi(e);Qe(e,a);for(var o=Number.POSITIVE_INFINITY,i,s=0,d=0;d<4;++s,++d){Ci(s%2?r:t,s%4>=2),a=ne(e);var u=bi(e,a);u<o&&(d=0,i=ra(a),o=u)}Qe(e,i)}function Ze(e,n,r){return E(n,function(t){return gi(e,t,r)})}function Ci(e,n){var r=new N;l(e,function(t){var a=t.graph().root,o=Fn(t,a,r,n);l(o.vs,function(i,s){t.node(i).order=s}),pi(t,r,o.vs)})}function Qe(e,n){l(n,function(r){l(r,function(t,a){e.node(t).order=a})})}function Ii(e){var n=ki(e);l(e.graph().dummyChains,function(r){for(var t=e.node(r),a=t.edgeObj,o=Ri(e,n,a.v,a.w),i=o.path,s=o.lca,d=0,u=i[d],f=!0;r!==a.w;){if(t=e.node(r),f){for(;(u=i[d])!==s&&e.node(u).maxRank<t.rank;)d++;u===s&&(f=!1)}if(!f){for(;d<i.length-1&&e.node(u=i[d+1]).minRank<=t.rank;)d++;u=i[d]}e.setParent(r,u),r=e.successors(r)[0]}})}function Ri(e,n,r,t){var a=[],o=[],i=Math.min(n[r].low,n[t].low),s=Math.max(n[r].lim,n[t].lim),d,u;d=r;do d=e.parent(d),a.push(d);while(d&&(n[d].low>i||s>n[d].lim));for(u=d,d=t;(d=e.parent(d))!==u;)o.push(d);return{path:a.concat(o.reverse()),lca:u}}function ki(e){var n={},r=0;function t(a){var o=r;l(e.children(a),t),n[a]={low:o,lim:r++}}return l(e.children(),t),n}function Mi(e,n){var r={};function t(a,o){var i=0,s=0,d=a.length,u=W(o);return l(o,function(f,c){var h=Ai(e,f),v=h?e.node(h).order:d;(h||f===u)&&(l(o.slice(s,c+1),function(p){l(e.predecessors(p),function(g){var b=e.node(g),w=b.order;(w<i||v<w)&&!(b.dummy&&e.node(p).dummy)&&Xn(r,g,p)})}),s=c+1,i=v)}),o}return J(n,t),r}function _i(e,n){var r={};function t(o,i,s,d,u){var f;l(k(i,s),function(c){f=o[c],e.node(f).dummy&&l(e.predecessors(f),function(h){var v=e.node(h);v.dummy&&(v.order<d||v.order>u)&&Xn(r,h,f)})})}function a(o,i){var s=-1,d,u=0;return l(i,function(f,c){if(e.node(f).dummy==="border"){var h=e.predecessors(f);h.length&&(d=e.node(h[0]).order,t(i,u,c,s,d),u=c,s=d)}t(i,u,i.length,d,o.length)}),i}return J(n,a),r}function Ai(e,n){if(e.node(n).dummy)return we(e.predecessors(n),function(r){return e.node(r).dummy})}function Xn(e,n,r){if(n>r){var t=n;n=r,r=t}Object.prototype.hasOwnProperty.call(e,n)||Object.defineProperty(e,n,{enumerable:!0,configurable:!0,value:{},writable:!0});var a=e[n];Object.defineProperty(a,r,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function ji(e,n,r){if(n>r){var t=n;n=r,r=t}return!!e[n]&&Object.prototype.hasOwnProperty.call(e[n],r)}function Di(e,n,r,t){var a={},o={},i={};return l(n,function(s){l(s,function(d,u){a[d]=d,o[d]=d,i[d]=u})}),l(n,function(s){var d=-1;l(s,function(u){var f=t(u);if(f.length){f=F(f,function(g){return i[g]});for(var c=(f.length-1)/2,h=Math.floor(c),v=Math.ceil(c);h<=v;++h){var p=f[h];o[u]===u&&d<i[p]&&!ji(r,u,p)&&(o[p]=u,o[u]=a[u]=a[p],d=i[p])}}})}),{root:a,align:o}}function Bi(e,n,r,t,a){var o={},i=$i(e,n,r,a),s=a?"borderLeft":"borderRight";function d(c,h){for(var v=i.nodes(),p=v.pop(),g={};p;)g[p]?c(p):(g[p]=!0,v.push(p),v=v.concat(h(p))),p=v.pop()}function u(c){o[c]=i.inEdges(c).reduce(function(h,v){return Math.max(h,o[v.v]+i.edge(v))},0)}function f(c){var h=i.outEdges(c).reduce(function(p,g){return Math.min(p,o[g.w]-i.edge(g))},Number.POSITIVE_INFINITY),v=e.node(c);h!==Number.POSITIVE_INFINITY&&v.borderType!==s&&(o[c]=Math.max(o[c],h))}return d(u,i.predecessors.bind(i)),d(f,i.successors.bind(i)),l(t,function(c){o[c]=o[r[c]]}),o}function $i(e,n,r,t){var a=new N,o=e.graph(),i=Ui(o.nodesep,o.edgesep,t);return l(n,function(s){var d;l(s,function(u){var f=r[u];if(a.setNode(f),d){var c=r[d],h=a.edge(c,f);a.setEdge(c,f,Math.max(i(e,u,d),h||0))}d=u})}),a}function Fi(e,n){return ye(R(n),function(r){var t=Number.NEGATIVE_INFINITY,a=Number.POSITIVE_INFINITY;return fa(r,function(o,i){var s=Vi(e,i)/2;t=Math.max(o+s,t),a=Math.min(o-s,a)}),t-a})}function Xi(e,n){var r=R(n),t=D(r),a=S(r);l(["u","d"],function(o){l(["l","r"],function(i){var s=o+i,d=e[s],u;if(d!==n){var f=R(d);u=i==="l"?t-D(f):a-S(f),u&&(e[s]=ee(d,function(c){return c+u}))}})})}function Gi(e,n){return ee(e.ul,function(r,t){if(n)return e[n.toLowerCase()][t];var a=F(E(e,t));return(a[1]+a[2])/2})}function Yi(e){var n=ne(e),r=ue(Mi(e,n),_i(e,n)),t={},a;l(["u","d"],function(i){a=i==="u"?n:R(n).reverse(),l(["l","r"],function(s){s==="r"&&(a=E(a,function(c){return R(c).reverse()}));var d=(i==="u"?e.predecessors:e.successors).bind(e),u=Di(e,a,r,d),f=Bi(e,a,u.root,u.align,s==="r");s==="r"&&(f=ee(f,function(c){return-c})),t[i+s]=f})});var o=Fi(e,t);return Xi(t,o),Gi(t,e.graph().align)}function Ui(e,n,r){return function(t,a,o){var i=t.node(a),s=t.node(o),d=0,u;if(d+=i.width/2,Object.prototype.hasOwnProperty.call(i,"labelpos"))switch(i.labelpos.toLowerCase()){case"l":u=-i.width/2;break;case"r":u=i.width/2;break}if(u&&(d+=r?u:-u),u=0,d+=(i.dummy?n:e)/2,d+=(s.dummy?n:e)/2,d+=s.width/2,Object.prototype.hasOwnProperty.call(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":u=s.width/2;break;case"r":u=-s.width/2;break}return u&&(d+=r?u:-u),u=0,d}}function Vi(e,n){return e.node(n).width}function Wi(e){e=Sn(e),qi(e),ca(Yi(e),function(n,r){e.node(r).x=n})}function qi(e){var n=ne(e),r=e.graph().ranksep,t=0;l(n,function(a){var o=S(E(a,function(i){return e.node(i).height}));l(a,function(i){e.node(i).y=t+o/2}),t+=o+r})}function Hi(e,n){var r=Ya;r("layout",()=>{var t=r(" buildLayoutGraph",()=>io(e));r(" runLayout",()=>zi(t,r)),r(" updateInputGraph",()=>Ji(e,t))})}function zi(e,n){n(" makeSpaceForEdgeLabels",()=>oo(e)),n(" removeSelfEdges",()=>vo(e)),n(" acyclic",()=>ja(e)),n(" nestingGraph.run",()=>fi(e)),n(" rank",()=>si(Sn(e))),n(" injectEdgeLabelProxies",()=>so(e)),n(" removeEmptyRanks",()=>Xa(e)),n(" nestingGraph.cleanup",()=>hi(e)),n(" normalizeRanks",()=>Fa(e)),n(" assignRankMinMax",()=>uo(e)),n(" removeEdgeLabelProxies",()=>fo(e)),n(" normalize.run",()=>za(e)),n(" parentDummyChains",()=>Ii(e)),n(" addBorderSegments",()=>Ua(e)),n(" order",()=>Si(e)),n(" insertSelfEdges",()=>bo(e)),n(" adjustCoordinateSystem",()=>Va(e)),n(" position",()=>Wi(e)),n(" positionSelfEdges",()=>wo(e)),n(" removeBorderNodes",()=>go(e)),n(" normalize.undo",()=>Ka(e)),n(" fixupEdgeLabelCoords",()=>ho(e)),n(" undoCoordinateSystem",()=>Wa(e)),n(" translateGraph",()=>co(e)),n(" assignNodeIntersects",()=>lo(e)),n(" reversePoints",()=>po(e)),n(" acyclic.undo",()=>Ba(e))}function Ji(e,n){l(e.nodes(),function(r){var t=e.node(r),a=n.node(r);t&&(t.x=a.x,t.y=a.y,n.children(r).length&&(t.width=a.width,t.height=a.height))}),l(e.edges(),function(r){var t=e.edge(r),a=n.edge(r);t.points=a.points,Object.prototype.hasOwnProperty.call(a,"x")&&(t.x=a.x,t.y=a.y)}),e.graph().width=n.graph().width,e.graph().height=n.graph().height}var Ki=["nodesep","edgesep","ranksep","marginx","marginy"],Zi={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},Qi=["acyclicer","ranker","rankdir","align"],eo=["width","height"],no={width:0,height:0},ro=["minlen","weight","width","height","labeloffset"],to={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},ao=["labelpos"];function io(e){var n=new N({multigraph:!0,compound:!0}),r=oe(e.graph());return n.setGraph(ue({},Zi,ie(r,Ki),q(r,Qi))),l(e.nodes(),function(t){var a=oe(e.node(t));n.setNode(t,aa(ie(a,eo),no)),n.setParent(t,e.parent(t))}),l(e.edges(),function(t){var a=oe(e.edge(t));n.setEdge(t,ue({},to,ie(a,ro),q(a,ao)))}),n}function oo(e){var n=e.graph();n.ranksep/=2,l(e.edges(),function(r){var t=e.edge(r);t.minlen*=2,t.labelpos.toLowerCase()!=="c"&&(n.rankdir==="TB"||n.rankdir==="BT"?t.width+=t.labeloffset:t.height+=t.labeloffset)})}function so(e){l(e.edges(),function(n){var r=e.edge(n);if(r.width&&r.height){var t=e.node(n.v),a=e.node(n.w),o={rank:(a.rank-t.rank)/2+t.rank,e:n};A(e,"edge-proxy",o,"_ep")}})}function uo(e){var n=0;l(e.nodes(),function(r){var t=e.node(r);t.borderTop&&(t.minRank=e.node(t.borderTop).rank,t.maxRank=e.node(t.borderBottom).rank,n=S(n,t.maxRank))}),e.graph().maxRank=n}function fo(e){l(e.nodes(),function(n){var r=e.node(n);r.dummy==="edge-proxy"&&(e.edge(r.e).labelRank=r.rank,e.removeNode(n))})}function co(e){var n=Number.POSITIVE_INFINITY,r=0,t=Number.POSITIVE_INFINITY,a=0,o=e.graph(),i=o.marginx||0,s=o.marginy||0;function d(u){var f=u.x,c=u.y,h=u.width,v=u.height;n=Math.min(n,f-h/2),r=Math.max(r,f+h/2),t=Math.min(t,c-v/2),a=Math.max(a,c+v/2)}l(e.nodes(),function(u){d(e.node(u))}),l(e.edges(),function(u){var f=e.edge(u);Object.prototype.hasOwnProperty.call(f,"x")&&d(f)}),n-=i,t-=s,l(e.nodes(),function(u){var f=e.node(u);f.x-=n,f.y-=t}),l(e.edges(),function(u){var f=e.edge(u);l(f.points,function(c){c.x-=n,c.y-=t}),Object.prototype.hasOwnProperty.call(f,"x")&&(f.x-=n),Object.prototype.hasOwnProperty.call(f,"y")&&(f.y-=t)}),o.width=r-n+i,o.height=a-t+s}function lo(e){l(e.edges(),function(n){var r=e.edge(n),t=e.node(n.v),a=e.node(n.w),o,i;r.points?(o=r.points[0],i=r.points[r.points.length-1]):(r.points=[],o=a,i=t),r.points.unshift(Ve(t,o)),r.points.push(Ve(a,i))})}function ho(e){l(e.edges(),function(n){var r=e.edge(n);if(Object.prototype.hasOwnProperty.call(r,"x"))switch((r.labelpos==="l"||r.labelpos==="r")&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset;break}})}function po(e){l(e.edges(),function(n){var r=e.edge(n);r.reversed&&r.points.reverse()})}function go(e){l(e.nodes(),function(n){if(e.children(n).length){var r=e.node(n),t=e.node(r.borderTop),a=e.node(r.borderBottom),o=e.node(W(r.borderLeft)),i=e.node(W(r.borderRight));r.width=Math.abs(i.x-o.x),r.height=Math.abs(a.y-t.y),r.x=o.x+r.width/2,r.y=t.y+r.height/2}}),l(e.nodes(),function(n){e.node(n).dummy==="border"&&e.removeNode(n)})}function vo(e){l(e.edges(),function(n){if(n.v===n.w){var r=e.node(n.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:n,label:e.edge(n)}),e.removeEdge(n)}})}function bo(e){var n=ne(e);l(n,function(r){var t=0;l(r,function(a,o){var i=e.node(a);i.order=o+t,l(i.selfEdges,function(s){A(e,"selfedge",{width:s.label.width,height:s.label.height,rank:i.rank,order:o+ ++t,e:s.e,label:s.label},"_se")}),delete i.selfEdges})})}function wo(e){l(e.nodes(),function(n){var r=e.node(n);if(r.dummy==="selfedge"){var t=e.node(r.e.v),a=t.x+t.width/2,o=t.y,i=r.x-a,s=t.height/2;e.setEdge(r.e,r.label),e.removeNode(n),r.label.points=[{x:a+2*i/3,y:o-s},{x:a+5*i/6,y:o-s},{x:a+i,y:o},{x:a+5*i/6,y:o+s},{x:a+2*i/3,y:o+s}],r.label.x=r.x,r.label.y=r.y}})}function ie(e,n){return ee(q(e,n),Number)}function oe(e){var n={};return l(e,function(r,t){n[t.toLowerCase()]=r}),n}var en=x((e,n,r)=>Math.max(n,Math.min(r,e)),"clamp"),nn=x((e="TB")=>{switch(e){case"BT":return"bottom";case"LR":return"right";case"RL":return"left";case"TB":default:return"top"}},"getDefaultSelfLoopSide"),mo=x(e=>e==="flowchart"||e==="flowchart-v2"||e==="stateDiagram"||e==="er"||e==="classDiagram","shouldMergeSelfLoopSegments"),yo=["x","y","width","height","labelBBox","intersect","calcIntersect","diff","clusterNode"],xo=x((e,n,r,t,a)=>{const o=[],i=new Set;if(r.forEach(({start:f,end:c})=>{f!==t&&i.add(f),c!==t&&i.add(c)}),i.forEach(f=>{const c=e.node(f);typeof c?.x=="number"&&typeof c?.y=="number"&&o.push(c)}),o.length===0&&r.forEach(({edge:f})=>{(f.points??[]).forEach(c=>{typeof c?.x=="number"&&typeof c?.y=="number"&&o.push(c)})}),o.length===0)return nn(a);const s=o.reduce((f,c)=>({x:f.x+c.x/o.length,y:f.y+c.y/o.length}),{x:0,y:0}),d=s.x-n.x,u=s.y-n.y;return Math.abs(d)>Math.abs(u)?d>0?"right":"left":Math.abs(u)>0?u>0?"bottom":"top":nn(a)},"getSelfLoopSide"),Eo=x((e,n="top",r=0,t=0)=>{const a=e.x,o=e.y-r,i=e.width/2,s=e.height/2,d=Math.max(36,Math.min(100,e.width*.8)),u=en(Math.max(t,e.width*.35),36,d),f=en(Math.min(e.width,e.height)*.45,24,48);switch(n){case"bottom":{const c=o+s;return[{x:a-u/2,y:c},{x:a-u/2,y:c+f},{x:a+u/2,y:c+f},{x:a+u/2,y:c}]}case"right":{const c=a+i;return[{x:c,y:o-u/2},{x:c+f,y:o-u/2},{x:c+f,y:o+u/2},{x:c,y:o+u/2}]}case"left":{const c=a-i;return[{x:c,y:o-u/2},{x:c-f,y:o-u/2},{x:c-f,y:o+u/2},{x:c,y:o+u/2}]}case"top":default:{const c=o-s;return[{x:a-u/2,y:c},{x:a-u/2,y:c-f},{x:a+u/2,y:c-f},{x:a+u/2,y:c}]}}},"getSelfLoopPoints"),Lo=x((e,n,r="top",t=0,a={})=>{const i=e.x,s=e.y-t,d=a.width??0,u=a.height??0;switch(r){case"bottom":return{x:i,y:Math.max(...n.map(f=>f.y))+u/2+4};case"right":return{x:Math.max(...n.map(f=>f.x))+d/2+4,y:s};case"left":return{x:Math.min(...n.map(f=>f.x))-d/2-4,y:s};case"top":default:return{x:i,y:Math.min(...n.map(f=>f.y))-u/2-4}}},"getSelfLoopLabelPosition"),Gn=x((e,n=0,{mergeSelfLoops:r=!0}={})=>{const t=new Map,a=[],o=e.graph()?.rankdir;return e.edges().forEach(i=>{const s=e.edge(i);if(r&&s.selfLoop){const d=s.selfLoop.id;t.has(d)||t.set(d,[]),t.get(d).push({edge:s,start:i.v,end:i.w})}else a.push({edge:s,start:i.v,end:i.w})}),t.forEach(i=>{if(i.length!==3){i.forEach(w=>a.push(w));return}i.sort((w,P)=>w.edge.selfLoop.order-P.edge.selfLoop.order);const[s,d,u]=i,f=s.edge.originalEdge??d.edge.originalEdge??u.edge.originalEdge??d.edge,c=e.node(f.start);if(!c){i.forEach(w=>a.push(w));return}const h={width:d.edge.width,height:d.edge.height},v=xo(e,c,i,f.start,o),p=Eo(c,v,n,h.width??0),g=Lo(c,p,v,n,h),b={...d.edge,...f,id:f.id,points:p,start:f.start,end:f.end,x:g.x,y:g.y,width:h.width,height:h.height,labelStyle:d.edge.labelStyle,fromCluster:s.edge.fromCluster??d.edge.fromCluster??u.edge.fromCluster,toCluster:s.edge.toCluster??d.edge.toCluster??u.edge.toCluster};delete b.selfLoop,delete b.originalEdge,a.push({edge:b,start:b.start,end:b.end})}),a},"getEdgesToRender"),Yn=x(async({element:e,graph:n,diagramType:r,id:t,parentCluster:a,siteConfig:o})=>{const i=n.graph().rankdir;m.trace("Dir in recursive render - dir:",i);const{clusters:s,edgePaths:d,edgeLabels:u,nodes:f,rootGroups:c}=Hn(e,{edgePathsClass:"edgePaths"});n.nodes()?m.info("Recursive render XXX",n.nodes()):m.info("No nodes found for",n),n.edges().length>0&&m.info("Recursive edges",n.edge(n.edges()[0]));const h=mo(r);await Promise.all(n.nodes().map(async function(g){const b=n.node(g);if(a!==void 0){const w=JSON.parse(JSON.stringify(a.clusterData));m.trace(`Setting data for parent cluster XXX
2
2
  Node.id = `,g,`
3
3
  data=`,w.height,`
4
4
  Parent cluster`,a.height),n.setNode(a.id,w),n.parent(g)||(m.trace("Setting parent",g,a.id),n.setParent(g,a.id,w))}if(m.info("(Insert) Node XXX"+g+": "+JSON.stringify(n.node(g))),b?.clusterNode){m.info("Cluster identified XBX",g,b.width,n.node(g));const{ranksep:w,nodesep:P}=n.graph();b.graph.setGraph({...b.graph.graph(),ranksep:w+25,nodesep:P});const Ne=await So({element:f,graph:b.graph,diagramType:r,id:t,parentCluster:n.node(g),siteConfig:o}),Pe=Ne.elem;Kn(b,Pe),b.diff=Ne.diff||0,m.info("New compound node after recursive render XAX",g,"width",b.width,"height",b.height),Zn(Pe,b)}else n.children(g).length>0?(m.trace("Cluster - the non recursive path XBX",g,b.id,b,b.width,"Graph:",n),m.trace(Te(b.id,n)),T.set(b.id,{id:Te(b.id,n),node:b})):(m.trace("Node - the non recursive path XAX",g,f,n.node(g),i),await zn(f,n.node(g),{config:o,dir:i}))})),await x(async()=>{const g=n.edges().map(async function(b){const w=n.edge(b.v,b.w,b.name);if(m.info("Edge "+b.v+" -> "+b.w+": "+JSON.stringify(b)),m.info("Edge "+b.v+" -> "+b.w+": ",b," ",JSON.stringify(n.edge(b))),m.info("Fix",T,"ids:",b.v,b.w,"Translating: ",T.get(b.v),T.get(b.w)),h&&w.selfLoop){if(w.selfLoop.order!==1)return;const P={...w.originalEdge,...w,id:w.selfLoop.id,startLabelLeft:w.originalEdge?.startLabelLeft??w.startLabelLeft,startLabelRight:w.originalEdge?.startLabelRight??w.startLabelRight,endLabelLeft:w.originalEdge?.endLabelLeft??w.endLabelLeft,endLabelRight:w.originalEdge?.endLabelRight??w.endLabelRight};await Se(u,P),w.width=P.width,w.height=P.height,w.labelStyle=P.labelStyle;return}await Se(u,w)});await Promise.all(g)},"processEdges")();const{subGraphTitleTotalMargin:p}=Qn(o);return{elem:c,graph:n,groups:{clusters:s,edgePaths:d,edgeLabels:u,nodes:f,rootGroups:c},diagramType:r,id:t,mergeSelfLoops:h,subGraphTitleTotalMargin:p}},"measureDagreGraph"),Un=x(e=>{m.info("############################################# XXX"),m.info("### Layout ### XXX"),m.info("############################################# XXX"),Hi(e)},"runDagreGraphLayout"),Oo=x((e,n,r)=>{const t=e.node(n);if(!t)return;const a={...t};return t?.clusterNode?a.y=(t.y??0)+r:e.children(n).length>0?a.height=(t.height??0)+r:a.y=(t.y??0)+r/2,a},"normalizeDagreNode"),rn=x((e,n)=>{yo.forEach(r=>{n[r]!==void 0&&(e[r]=n[r])})},"applyDagreNodeLayout"),No=x((e,n,r,t)=>({...e,start:e.start??n,end:e.end??r,points:(e.points??[]).map(a=>({...a,y:typeof a.y=="number"?a.y+t:a.y}))}),"normalizeDagreEdge"),Po=x((e,n)=>{const{graph:r,mergeSelfLoops:t,subGraphTitleTotalMargin:a=0}=n,o=new Map(e.nodes.map(s=>[s.id,s]));ce(r).forEach(s=>{const d=Oo(r,s,a);if(!d)return;rn(r.node(s),d);const u=o.get(s);u&&rn(u,d)});const i=a/2;return e.edges=Gn(r,i,{mergeSelfLoops:t}).map(({edge:s,start:d,end:u})=>No(s,d,u,i)),e},"applyDagreLayoutResult"),To=x(async({elem:e,graph:n,groups:{clusters:r,edgePaths:t},diagramType:a,id:o,mergeSelfLoops:i,subGraphTitleTotalMargin:s})=>{let d=0;await Promise.all(ce(n).map(async function(c){const h=n.node(c);if(m.info("Position XBX => "+c+": ("+h.x,","+h.y,") width: ",h.width," height: ",h.height),h?.clusterNode)h.y+=s,m.info("A tainted cluster node XBX1",c,h.id,h.width,h.height,h.x,h.y,n.parent(c)),T.get(h.id).node=h,Ce(h);else if(n.children(c).length>0){m.info("A pure cluster node XBX1",c,h.id,h.x,h.y,h.width,h.height,n.parent(c)),h.height+=s,n.node(h.parentId);const v=h?.padding/2||0,p=h?.labelBBox?.height||0,g=p-v||0;m.debug("OffsetY",g,"labelHeight",p,"halfPadding",v),await er(r,h),T.get(h.id).node=h}else{const v=n.node(h.parentId);h.y+=s/2,m.info("A regular node XBX1 - using the padding",h.id,"parent",h.parentId,h.width,h.height,h.x,h.y,"offsetY",h.offsetY,"parent",v,v?.offsetY,h),Ce(h)}}));const u=s/2;return Gn(n,u,{mergeSelfLoops:i}).forEach(function({edge:c,start:h,end:v}){m.info("Edge "+h+" -> "+v+": "+JSON.stringify(c),c),c.points.forEach(w=>w.y+=u);const p=n.node(h),g=n.node(v),b=nr(t,c,T,a,p,g,o);rr(c,b)}),n.nodes().forEach(function(c){const h=n.node(c);m.info(c,h.type,h.diff),h.isGroup&&(d=h.diff)}),m.warn("Returning from recursive render XAX",e,d),{elem:e,diff:d}},"paintDagreLayoutCore"),So=x(async e=>{const n=await Yn(e);return Un(n.graph),await To(n)},"renderDagreSubgraph"),Vn=x(e=>{const n=new N({multigraph:!0,compound:!0}).setGraph({rankdir:e.direction,nodesep:e.config?.nodeSpacing||e.nodeSpacing||e.config?.flowchart?.nodeSpacing,ranksep:e.config?.rankSpacing||e.rankSpacing||e.config?.flowchart?.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});return e.nodes.forEach(r=>{n.setNode(r.id,{...r}),r.parentId&&n.setParent(r.id,r.parentId)}),m.debug("Edges:",e.edges),e.edges.forEach(r=>{if(r.start===r.end){const t=r.start,a=t+"---"+t+"---1",o=t+"---"+t+"---2",i=n.node(t);n.setNode(a,{domId:a,id:a,parentId:i.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),n.setParent(a,i.parentId),n.setNode(o,{domId:o,id:o,parentId:i.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),n.setParent(o,i.parentId);const s=structuredClone(r),d=structuredClone(r),u=structuredClone(r),f=structuredClone(r);d.originalEdge=s,d.selfLoop={id:s.id,order:0},u.originalEdge=s,u.selfLoop={id:s.id,order:1},f.originalEdge=s,f.selfLoop={id:s.id,order:2},d.label="",d.arrowTypeEnd="none",d.endLabelLeft="",d.endLabelRight="",d.startLabelLeft="",d.id=t+"-cyclic-special-1",u.startLabelRight="",u.startLabelLeft="",u.endLabelLeft="",u.endLabelRight="",u.arrowTypeStart="none",u.arrowTypeEnd="none",u.id=t+"-cyclic-special-mid",f.label="",f.startLabelRight="",f.startLabelLeft="",f.arrowTypeStart="none",i.isGroup&&(d.fromCluster=t,f.toCluster=t),f.id=t+"-cyclic-special-2",f.arrowTypeStart="none",n.setEdge(t,a,d,t+"-cyclic-special-0"),n.setEdge(a,o,u,t+"-cyclic-special-1"),n.setEdge(o,t,f,t+"-cyclic-special-2")}else n.setEdge(r.start,r.end,{...r},r.id)}),Wn(n),{graph:n}},"prepareLayoutForDagre"),Co=x(async(e,{element:n,preparedLayout:r})=>{const t=r??Vn(e),a=Jn(),o=await Yn({element:n,graph:t.graph,diagramType:e.type,id:e.diagramId,parentCluster:void 0,siteConfig:a});return t.measuredLayout=o,o},"measureDagreLayout"),Io=x((e,n)=>{const r=n.preparedLayout?.measuredLayout;if(!r)throw new Error("runDagreLayoutCore requires measureDagreLayout to run first");return Un(r.graph),Po(e,r),r},"runDagreLayoutCore"),Ro=x((e,{measure:n})=>ce(n.graph).map(r=>n.graph.node(r)).filter(Boolean),"getDagrePaintNodes"),ko=x((e,n,{measure:r})=>e?r.graph.node(e):void 0,"getDagreEdgeNode"),jo=qn({prepareLayout:Vn,measureLayout:Co,runLayoutCore:Io,paintOptions:{clusterDb:T,getNodes:Ro,getEdgeNode:ko,skipNode:x((e,{measure:n})=>!n.graph.hasNode(e.id),"skipNode"),isCluster:x((e,{measure:n})=>n.graph.hasNode(e.id)&&(n.graph.children(e.id)??[]).length>0,"isCluster")}});export{Po as applyDagreLayoutResult,Gn as getEdgesToRender,Co as measureDagreLayout,Vn as prepareLayoutForDagre,jo as render,Io as runDagreLayoutCore};
@@ -1 +1 @@
1
- import{bp as n}from"./DTQYcznv.js";import{Iz as t}from"./A0r9TbR7.js";let c=1,i=null;const a=[],s=new Set;function l(){for(const e of s)e(i)}function h(){return typeof document<"u"&&document.activeElement instanceof HTMLElement?document.activeElement:null}function u(e){a.push({...e,id:c++,returnFocus:h()}),i||(i=a.shift()??null,l())}function _(e){return new Promise(r=>u({kind:"confirm",options:e,resolve:r}))}function p(e){return new Promise(r=>u({kind:"prompt",options:e,resolve:r}))}function S(e){return s.add(e),e(i),()=>s.delete(e)}function f(e,r){if(!i||i.id!==e)return;const o=i;i=a.shift()??null,o.resolve(r),o.returnFocus?.focus(),l()}const m={IS_AUTHENTICATED:"linear-auth:is-authenticated",START_AUTH:"linear-auth:start-auth",CANCEL_AUTH:"linear-auth:cancel-auth",LOGOUT:"linear-auth:logout",GET_AUTH_STATE:"linear-auth:get-auth-state",GET_STATUS:"linear-auth:get-status",FETCH_MY_ISSUES:"linear-auth:fetch-my-issues",SEARCH_ISSUES:"linear-auth:search-issues"},g=[{value:"assigned",get label(){return n.linearAuth_filter_assigned_label()},get description(){return n.linearAuth_filter_assigned_description()}},{value:"created",get label(){return n.linearAuth_filter_created_label()},get description(){return n.linearAuth_filter_created_description()}},{value:"subscribed",get label(){return n.linearAuth_filter_subscribed_label()},get description(){return n.linearAuth_filter_subscribed_description()}},{value:"team",get label(){return n.linearAuth_filter_team_label()},get description(){return n.linearAuth_filter_team_description()}},{value:"all",get label(){return n.linearAuth_filter_all_label()},get description(){return n.linearAuth_filter_all_description()}}],I=t.createSelector(e=>e.linearAuth.operation),E=t.createSelector((e,r)=>e.linearAuth.operation?.consumerId===r?e.linearAuth.operation:null),b=t.createSelector(e=>e.linearAuth.operation?.kind==="logout"&&e.linearAuth.operation.status==="pending"),T=t.createSelector(e=>e.linearAuth.isAuthenticated),y=t.createSelector(e=>e.linearAuth.requiresDaemonAuth),C=t.createSelector(e=>e.linearAuth.isAuthenticating),L=t.createSelector(e=>e.linearAuth.error),N=t.createSelector(e=>e.sentryAuth.operation),U=t.createSelector((e,r)=>e.sentryAuth.operation?.consumerId===r?e.sentryAuth.operation:null),v=t.createSelector(e=>e.sentryAuth.operation?.kind==="logout"&&e.sentryAuth.operation.status==="pending"),O=t.createSelector(e=>e.sentryAuth.isAuthenticated),H=t.createSelector(e=>e.sentryAuth.organization),R=t.createSelector(e=>e.sentryAuth.isConnecting),q=t.createSelector(e=>e.sentryAuth.error),D="npx not found — install Node.js (with npm) to use Claude Code";export{D as C,m as L,g as a,I as b,_ as c,L as d,T as e,C as f,b as g,y as h,U as i,N as j,q as k,O as l,R as m,v as n,H as o,p,f as q,S as r,E as s};
1
+ import{bo as n}from"./D9jYN6_J.js";import{Iz as t}from"./BfbZn9QX.js";let c=1,i=null;const a=[],s=new Set;function l(){for(const e of s)e(i)}function h(){return typeof document<"u"&&document.activeElement instanceof HTMLElement?document.activeElement:null}function u(e){a.push({...e,id:c++,returnFocus:h()}),i||(i=a.shift()??null,l())}function _(e){return new Promise(r=>u({kind:"confirm",options:e,resolve:r}))}function S(e){return new Promise(r=>u({kind:"prompt",options:e,resolve:r}))}function p(e){return s.add(e),e(i),()=>s.delete(e)}function f(e,r){if(!i||i.id!==e)return;const o=i;i=a.shift()??null,o.resolve(r),o.returnFocus?.focus(),l()}const m={IS_AUTHENTICATED:"linear-auth:is-authenticated",START_AUTH:"linear-auth:start-auth",CANCEL_AUTH:"linear-auth:cancel-auth",LOGOUT:"linear-auth:logout",GET_AUTH_STATE:"linear-auth:get-auth-state",GET_STATUS:"linear-auth:get-status",FETCH_MY_ISSUES:"linear-auth:fetch-my-issues",SEARCH_ISSUES:"linear-auth:search-issues"},g=[{value:"assigned",get label(){return n.linearAuth_filter_assigned_label()},get description(){return n.linearAuth_filter_assigned_description()}},{value:"created",get label(){return n.linearAuth_filter_created_label()},get description(){return n.linearAuth_filter_created_description()}},{value:"subscribed",get label(){return n.linearAuth_filter_subscribed_label()},get description(){return n.linearAuth_filter_subscribed_description()}},{value:"team",get label(){return n.linearAuth_filter_team_label()},get description(){return n.linearAuth_filter_team_description()}},{value:"all",get label(){return n.linearAuth_filter_all_label()},get description(){return n.linearAuth_filter_all_description()}}],I=t.createSelector(e=>e.linearAuth.operation),E=t.createSelector((e,r)=>e.linearAuth.operation?.consumerId===r?e.linearAuth.operation:null),b=t.createSelector(e=>e.linearAuth.operation?.kind==="logout"&&e.linearAuth.operation.status==="pending"),T=t.createSelector(e=>e.linearAuth.isAuthenticated),y=t.createSelector(e=>e.linearAuth.requiresDaemonAuth),C=t.createSelector(e=>e.linearAuth.isAuthenticating),L=t.createSelector(e=>e.linearAuth.error),N=t.createSelector(e=>e.sentryAuth.operation),U=t.createSelector((e,r)=>e.sentryAuth.operation?.consumerId===r?e.sentryAuth.operation:null),v=t.createSelector(e=>e.sentryAuth.operation?.kind==="logout"&&e.sentryAuth.operation.status==="pending"),O=t.createSelector(e=>e.sentryAuth.isAuthenticated),H=t.createSelector(e=>e.sentryAuth.organization),R=t.createSelector(e=>e.sentryAuth.isConnecting),q=t.createSelector(e=>e.sentryAuth.error),D="npx not found — install Node.js (with npm) to use Claude Code";export{D as C,m as L,g as a,I as b,_ as c,L as d,T as e,C as f,b as g,y as h,U as i,N as j,q as k,O as l,R as m,v as n,H as o,S as p,f as q,p as r,E as s};