@intent-hq/web 2.310.1 → 2.310.3

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 (252) hide show
  1. package/package.json +1 -1
  2. package/web/app/immutable/assets/{DiagramPresentation.fimBl1wP.css → DiagramPresentation.Bfi3xHm0.css} +1 -1
  3. package/web/app/immutable/chunks/-xK_vQQs.js +1 -0
  4. package/web/app/immutable/chunks/{CeEeQIAV.js → 2rlMb19F.js} +1 -1
  5. package/web/app/immutable/chunks/{Bhcwd2SW.js → 6Z5k9P1U.js} +4 -4
  6. package/web/app/immutable/chunks/7xAw-BT0.js +213 -0
  7. package/web/app/immutable/chunks/{t3bi-ExW.js → B1s3oEqm.js} +2 -2
  8. package/web/app/immutable/chunks/{phowbgF-.js → B2JLNOy6.js} +1 -1
  9. package/web/app/immutable/chunks/B53WwE3a.js +1 -0
  10. package/web/app/immutable/chunks/{R7gFhaG_.js → B7VncZW5.js} +1 -1
  11. package/web/app/immutable/chunks/{EZw3rvya.js → B7s4-XTz.js} +30 -30
  12. package/web/app/immutable/chunks/{DOHtPCK9.js → BDPXN-l5.js} +1 -1
  13. package/web/app/immutable/chunks/{zXW6V5sa.js → BENBNSN7.js} +1 -1
  14. package/web/app/immutable/chunks/{DevHtnbn.js → BFXzH5IE.js} +1 -1
  15. package/web/app/immutable/chunks/BGcL9rs9.js +217 -0
  16. package/web/app/immutable/chunks/BHnD9zfx.js +99 -0
  17. package/web/app/immutable/chunks/{qMHHnffV.js → BI_SwxaN.js} +1 -1
  18. package/web/app/immutable/chunks/{BV9p4X5I.js → BMMFveB2.js} +6 -6
  19. package/web/app/immutable/chunks/BP6OqM9o.js +1 -0
  20. package/web/app/immutable/chunks/BRvgBsbx.js +291 -0
  21. package/web/app/immutable/chunks/{Cuozo7M1.js → BSel_zEu.js} +1 -1
  22. package/web/app/immutable/chunks/{B4dTn6xv.js → BUlPMLws.js} +1 -1
  23. package/web/app/immutable/chunks/{xMirTl3q.js → BYxB_o2p.js} +2 -2
  24. package/web/app/immutable/chunks/{CsYRAdgB.js → B_mbXOka.js} +1 -1
  25. package/web/app/immutable/chunks/BakMVsPT.js +2 -0
  26. package/web/app/immutable/chunks/{DeopB2f-.js → Bd0N6Q84.js} +3 -3
  27. package/web/app/immutable/chunks/{CHH2PtZ7.js → BfPWAh77.js} +1 -1
  28. package/web/app/immutable/chunks/BfZK-g4H.js +2 -0
  29. package/web/app/immutable/chunks/BhWJ-mUa.js +292 -0
  30. package/web/app/immutable/chunks/{CwH3s3Sg.js → Bhw4MKUW.js} +1 -1
  31. package/web/app/immutable/chunks/{CUvX4uDB.js → BmpVZmDT.js} +3 -3
  32. package/web/app/immutable/chunks/{BNg3GOxL.js → Bn-4GS40.js} +2 -2
  33. package/web/app/immutable/chunks/BpXeqZkK.js +12 -0
  34. package/web/app/immutable/chunks/{D-9LH0ah.js → Bpofk5Ge.js} +1 -1
  35. package/web/app/immutable/chunks/{DjEB6QMF.js → BrV7vQ-C.js} +1 -1
  36. package/web/app/immutable/chunks/ByGoYv9M.js +1 -0
  37. package/web/app/immutable/chunks/C-1nTNwc.js +120 -0
  38. package/web/app/immutable/chunks/{CBHPIqXg.js → C3nOF7W6.js} +1 -1
  39. package/web/app/immutable/chunks/{BIxkRFIj.js → C72YfPmr.js} +2 -2
  40. package/web/app/immutable/chunks/{DMGAuSgb.js → C87YV7yB.js} +4 -4
  41. package/web/app/immutable/chunks/{Coy9jSf1.js → CCDTjxXZ.js} +1 -1
  42. package/web/app/immutable/chunks/CEXJj_TX.js +62 -0
  43. package/web/app/immutable/chunks/CHFvnHJS.js +39 -0
  44. package/web/app/immutable/chunks/{CWyh7Yhz.js → CK1qXB1I.js} +1 -1
  45. package/web/app/immutable/chunks/{CCIGQjYf.js → CLEySo6k.js} +1 -1
  46. package/web/app/immutable/chunks/{DXOCO_oS.js → CNxOtEoC.js} +1 -1
  47. package/web/app/immutable/chunks/{7KTbkf4W.js → CPi1vTiT.js} +2 -2
  48. package/web/app/immutable/chunks/{ejL3HmTG.js → CQI-dvtu.js} +3 -3
  49. package/web/app/immutable/chunks/CSiG9Hvp.js +1 -0
  50. package/web/app/immutable/chunks/{C0DDaBnV.js → CTaTQq2B.js} +1 -1
  51. package/web/app/immutable/chunks/{dtB9lR1B.js → CUMlGGeg.js} +1 -1
  52. package/web/app/immutable/chunks/{fULl8IO9.js → CVyfvlNb.js} +7 -7
  53. package/web/app/immutable/chunks/{DUkegami.js → C_tu278J.js} +1 -1
  54. package/web/app/immutable/chunks/CcUMYVEM.js +41 -0
  55. package/web/app/immutable/chunks/Ccfa6x-j.js +24 -0
  56. package/web/app/immutable/chunks/{BmDskjjc.js → Cd_IIsl2.js} +1 -1
  57. package/web/app/immutable/chunks/CeijcUhC.js +38 -0
  58. package/web/app/immutable/chunks/Ci2_N-bK.js +370 -0
  59. package/web/app/immutable/chunks/CiPifYNB.js +1 -0
  60. package/web/app/immutable/chunks/{D8SVxzqF.js → CjcP6chv.js} +1 -1
  61. package/web/app/immutable/chunks/Cl430GWg.js +344 -0
  62. package/web/app/immutable/chunks/ClKsLSpN.js +27 -0
  63. package/web/app/immutable/chunks/ClebXGIM.js +141 -0
  64. package/web/app/immutable/chunks/{DOVnLHFz.js → CnIb6mve.js} +1 -1
  65. package/web/app/immutable/chunks/{qOCErwrn.js → CrdTEIp7.js} +1 -1
  66. package/web/app/immutable/chunks/{CPvhRhlk.js → Cstq9SM5.js} +11 -11
  67. package/web/app/immutable/chunks/CuzanJ4G.js +1 -0
  68. package/web/app/immutable/chunks/{D81gRUjY.js → D-QdqmeZ.js} +1 -1
  69. package/web/app/immutable/chunks/D0gJOzJU.js +40 -0
  70. package/web/app/immutable/chunks/{CoeuT-m3.js → D2ffSQ9J.js} +1 -1
  71. package/web/app/immutable/chunks/D2ojbL4J.js +98 -0
  72. package/web/app/immutable/chunks/{Bfkn2BGM.js → D3lH_sy-.js} +1 -1
  73. package/web/app/immutable/chunks/{C0Yks_oS.js → D5XrjD_m.js} +1 -1
  74. package/web/app/immutable/chunks/{DzvQOT8_.js → D5gGhPeB.js} +1 -1
  75. package/web/app/immutable/chunks/{DLm51UIm.js → D7ePuUtq.js} +1 -1
  76. package/web/app/immutable/chunks/{B9r0JXjW.js → D9RktmhG.js} +1 -1
  77. package/web/app/immutable/chunks/{Si43_nYW.js → D9zTmP-H.js} +3 -3
  78. package/web/app/immutable/chunks/{DQEBW0YT.js → DAhqFWJw.js} +1 -1
  79. package/web/app/immutable/chunks/{B20hJMKp.js → DAmyup4Q.js} +2 -2
  80. package/web/app/immutable/chunks/{B0X6Qy4e.js → DH-0T9oO.js} +1 -1
  81. package/web/app/immutable/chunks/{D-o9b0Cd.js → DHf042m3.js} +2 -2
  82. package/web/app/immutable/chunks/DICP2Iar.js +169 -0
  83. package/web/app/immutable/chunks/{D04E4MVv.js → DJ4er0zy.js} +4 -4
  84. package/web/app/immutable/chunks/{BtHVXttl.js → DLTK7s08.js} +5 -5
  85. package/web/app/immutable/chunks/{DQulsXJ7.js → DM80xiYc.js} +1 -1
  86. package/web/app/immutable/chunks/{BsP5G0Fo.js → DPWD_Z0m.js} +1 -1
  87. package/web/app/immutable/chunks/{t9id1Dgw.js → DPjuFI2m.js} +1 -1
  88. package/web/app/immutable/chunks/{DhdMM_zt.js → DR30pTuY.js} +14 -14
  89. package/web/app/immutable/chunks/{D_9AVJm5.js → DStbB4cJ.js} +1 -1
  90. package/web/app/immutable/chunks/{C8CCN24q.js → DV_gHrZ4.js} +1 -1
  91. package/web/app/immutable/chunks/{CQe4IdgR.js → DWqMBuHP.js} +1 -1
  92. package/web/app/immutable/chunks/DhDem5lD.js +34 -0
  93. package/web/app/immutable/chunks/{DaEQgqyy.js → Dj7a19mR.js} +1 -1
  94. package/web/app/immutable/chunks/{CnmCWFKQ.js → Dn1Hge9W.js} +2 -2
  95. package/web/app/immutable/chunks/{DxlwMmI8.js → DpbPS--w.js} +1 -1
  96. package/web/app/immutable/chunks/{Drg52kVf.js → DqPGIq9m.js} +1 -1
  97. package/web/app/immutable/chunks/Dr9n9KYD.js +8 -0
  98. package/web/app/immutable/chunks/Dx4xDmS-.js +1 -0
  99. package/web/app/immutable/chunks/{D411lQkp.js → DxBZwGJl.js} +1 -1
  100. package/web/app/immutable/chunks/{CEdLQlJ6.js → EF47gh5F.js} +6 -6
  101. package/web/app/immutable/chunks/FTZaXc8b.js +106 -0
  102. package/web/app/immutable/chunks/NHQiGgbv.js +200 -0
  103. package/web/app/immutable/chunks/{BCm8Gasf.js → OEEtadht.js} +1 -1
  104. package/web/app/immutable/chunks/{DCeW9_0X.js → PR2rc_KV.js} +2 -2
  105. package/web/app/immutable/chunks/{_F3xl3RI.js → Q48HTbqK.js} +1 -1
  106. package/web/app/immutable/chunks/{TQIai6Ne.js → Sd4DhpzB.js} +79 -79
  107. package/web/app/immutable/chunks/{C-Mmob1s.js → WaYTk5P-.js} +1 -1
  108. package/web/app/immutable/chunks/{ByGsJxdn.js → X-Frg4xt.js} +1 -1
  109. package/web/app/immutable/chunks/YDWB9C4j.js +36 -0
  110. package/web/app/immutable/chunks/{BUSwtV99.js → YqBgboHy.js} +1 -1
  111. package/web/app/immutable/chunks/{B_D0NLtg.js → _GDZ01fB.js} +1 -1
  112. package/web/app/immutable/chunks/{C7oH1dbI.js → aloh9OcN.js} +1 -1
  113. package/web/app/immutable/chunks/{BEhoKnQT.js → ap51LBWo.js} +1 -1
  114. package/web/app/immutable/chunks/bBO0iA4_.js +7 -0
  115. package/web/app/immutable/chunks/cMysCMc_.js +24 -0
  116. package/web/app/immutable/chunks/dpdLM1Cx.js +140 -0
  117. package/web/app/immutable/chunks/eHLf0w_s.js +1 -0
  118. package/web/app/immutable/chunks/fyjA8lOg.js +4 -0
  119. package/web/app/immutable/chunks/{CQf-fH5v.js → h6Xb9K7f.js} +1 -1
  120. package/web/app/immutable/chunks/{j0ThtFJc.js → iX-41BqF.js} +1 -1
  121. package/web/app/immutable/chunks/ibC6Wlul.js +3 -0
  122. package/web/app/immutable/chunks/jU5_8m_P.js +84 -0
  123. package/web/app/immutable/chunks/{BKGPkCRs.js → kHJUvxPR.js} +1 -1
  124. package/web/app/immutable/chunks/{BBTS8ZOM.js → lG67Zx5D.js} +3 -3
  125. package/web/app/immutable/chunks/{CgAIOmc3.js → lb9Uy5lM.js} +4 -4
  126. package/web/app/immutable/chunks/{DdAxykhC.js → lh2cjQS1.js} +1 -1
  127. package/web/app/immutable/chunks/{r1_PrlQL.js → lqs_HYEw.js} +1 -1
  128. package/web/app/immutable/chunks/{CnszEr0a.js → oEWQ7BWN.js} +1 -1
  129. package/web/app/immutable/chunks/{BGLkcG6I.js → ry72TFIz.js} +2 -2
  130. package/web/app/immutable/chunks/{BV7dztYI.js → ryFwnMjp.js} +1 -1
  131. package/web/app/immutable/chunks/{CsASRGy9.js → uOEty9O6.js} +5 -5
  132. package/web/app/immutable/chunks/wh3Y68il.js +1 -0
  133. package/web/app/immutable/chunks/{DRMT9vvq.js → xPs_63iv.js} +1 -1
  134. package/web/app/immutable/entry/{app.DlF41taB.js → app.np0VAfbg.js} +2 -2
  135. package/web/app/immutable/entry/start.BGCfjmAX.js +1 -0
  136. package/web/app/immutable/nodes/{0.BLjNhnkb.js → 0.DoZAnEaT.js} +1 -1
  137. package/web/app/immutable/nodes/{1.DaghOy3j.js → 1.BfLNDde5.js} +1 -1
  138. package/web/app/immutable/nodes/{10.CbV_flkh.js → 10.WVRhKQHR.js} +1 -1
  139. package/web/app/immutable/nodes/{14.N_oC1pv5.js → 14.BGrxllXE.js} +1 -1
  140. package/web/app/immutable/nodes/{16.Cn0uYbJe.js → 16.CkZkKSWx.js} +2 -2
  141. package/web/app/immutable/nodes/{2.CMERPJYK.js → 2.COM3w17g.js} +8 -8
  142. package/web/app/immutable/nodes/{3.Dk5w9XeG.js → 3.BhRx3b1m.js} +1 -1
  143. package/web/app/immutable/nodes/{4.CvLiKH0B.js → 4.C02hhSi-.js} +1 -1
  144. package/web/app/immutable/nodes/{5.BL5oLCOi.js → 5.Dgt2hWD3.js} +1 -1
  145. package/web/app/immutable/nodes/{6.DiKzgiKt.js → 6.KyP4WP5g.js} +1 -1
  146. package/web/app/immutable/nodes/{7.CM-hNW3A.js → 7.BxnoAMeX.js} +1 -1
  147. package/web/app/immutable/nodes/{8.BThIGSQR.js → 8.CnlHpTsC.js} +2 -2
  148. package/web/app/immutable/nodes/{9.D70tN3NX.js → 9.CJ1_wepy.js} +18 -18
  149. package/web/app/version.json +1 -1
  150. package/web/index.html +9 -9
  151. package/web/app/immutable/chunks/-SL67XKV.js +0 -1
  152. package/web/app/immutable/chunks/351KaJp_.js +0 -24
  153. package/web/app/immutable/chunks/7Iuyw4Ow.js +0 -106
  154. package/web/app/immutable/chunks/9ySBq1wF.js +0 -36
  155. package/web/app/immutable/chunks/B2safKX4.js +0 -1
  156. package/web/app/immutable/chunks/B8QrskMI.js +0 -139
  157. package/web/app/immutable/chunks/BCO4VeSA.js +0 -1
  158. package/web/app/immutable/chunks/BCaDoF8Y.js +0 -1
  159. package/web/app/immutable/chunks/BEdJCn-8.js +0 -1
  160. package/web/app/immutable/chunks/BGBb6fI-.js +0 -120
  161. package/web/app/immutable/chunks/BGQ3htf5.js +0 -1
  162. package/web/app/immutable/chunks/BKLEAopb.js +0 -7
  163. package/web/app/immutable/chunks/BKSgn5w-.js +0 -1
  164. package/web/app/immutable/chunks/BKY64haD.js +0 -12
  165. package/web/app/immutable/chunks/BOXqfDS_.js +0 -40
  166. package/web/app/immutable/chunks/BP_ooGOd.js +0 -24
  167. package/web/app/immutable/chunks/BQApP15C.js +0 -99
  168. package/web/app/immutable/chunks/BS6cE8e9.js +0 -231
  169. package/web/app/immutable/chunks/BTXk2yGf.js +0 -96
  170. package/web/app/immutable/chunks/BVrOGXf1.js +0 -78
  171. package/web/app/immutable/chunks/BZoKWA-r.js +0 -96
  172. package/web/app/immutable/chunks/BbiXTFqz.js +0 -1
  173. package/web/app/immutable/chunks/BgmKjqUX.js +0 -1
  174. package/web/app/immutable/chunks/Bk7xBWHf.js +0 -34
  175. package/web/app/immutable/chunks/BoiNnj2h.js +0 -1
  176. package/web/app/immutable/chunks/BrVvVCxw.js +0 -1
  177. package/web/app/immutable/chunks/ByM2DIOs.js +0 -1
  178. package/web/app/immutable/chunks/ByzYvvQp.js +0 -70
  179. package/web/app/immutable/chunks/Bz0SnIMO.js +0 -1
  180. package/web/app/immutable/chunks/C1IwSyrV.js +0 -99
  181. package/web/app/immutable/chunks/C9gL5x04.js +0 -39
  182. package/web/app/immutable/chunks/C9nyJoiB.js +0 -41
  183. package/web/app/immutable/chunks/CBV2Z_QZ.js +0 -89
  184. package/web/app/immutable/chunks/CDHds8o_.js +0 -3
  185. package/web/app/immutable/chunks/CHIHAnR-.js +0 -1
  186. package/web/app/immutable/chunks/CHj2oCmD.js +0 -39
  187. package/web/app/immutable/chunks/CIXNMjfT.js +0 -206
  188. package/web/app/immutable/chunks/CKFDW9cI.js +0 -24
  189. package/web/app/immutable/chunks/CKQlE_M1.js +0 -88
  190. package/web/app/immutable/chunks/CSBhPNbN.js +0 -206
  191. package/web/app/immutable/chunks/CSLTsum9.js +0 -38
  192. package/web/app/immutable/chunks/CSbiiZpm.js +0 -354
  193. package/web/app/immutable/chunks/CToDhNW4.js +0 -1
  194. package/web/app/immutable/chunks/CYFK9YEX.js +0 -168
  195. package/web/app/immutable/chunks/CcGF51wP.js +0 -1
  196. package/web/app/immutable/chunks/Cd5vVJw4.js +0 -292
  197. package/web/app/immutable/chunks/CgjSMAIJ.js +0 -120
  198. package/web/app/immutable/chunks/Ck7B90Kr.js +0 -38
  199. package/web/app/immutable/chunks/CkAILno9.js +0 -62
  200. package/web/app/immutable/chunks/CkawHIFZ.js +0 -1
  201. package/web/app/immutable/chunks/ClXr1b-t.js +0 -8
  202. package/web/app/immutable/chunks/CmWBRPmR.js +0 -24
  203. package/web/app/immutable/chunks/Cmo-9vFV.js +0 -1
  204. package/web/app/immutable/chunks/CoFCa7Mb.js +0 -231
  205. package/web/app/immutable/chunks/CrcLvVto.js +0 -84
  206. package/web/app/immutable/chunks/Cs_Q6mos.js +0 -1
  207. package/web/app/immutable/chunks/CsnLwu9F.js +0 -2
  208. package/web/app/immutable/chunks/CuYeKLE8.js +0 -8
  209. package/web/app/immutable/chunks/CvOaoHrI.js +0 -1
  210. package/web/app/immutable/chunks/CvYzv8kf.js +0 -1
  211. package/web/app/immutable/chunks/CxRm1vYn.js +0 -342
  212. package/web/app/immutable/chunks/CyfBUrNA.js +0 -1
  213. package/web/app/immutable/chunks/D1QKDDLH.js +0 -1
  214. package/web/app/immutable/chunks/D61DwhDw.js +0 -3
  215. package/web/app/immutable/chunks/DBAJPVI_.js +0 -1
  216. package/web/app/immutable/chunks/DBt8jmEX.js +0 -40
  217. package/web/app/immutable/chunks/DD-T_Om0.js +0 -178
  218. package/web/app/immutable/chunks/DEOiJZFa.js +0 -168
  219. package/web/app/immutable/chunks/DHW4IXFj.js +0 -36
  220. package/web/app/immutable/chunks/DJ0w8Oax.js +0 -129
  221. package/web/app/immutable/chunks/DJ52BT20.js +0 -1
  222. package/web/app/immutable/chunks/DK1048Bw.js +0 -129
  223. package/web/app/immutable/chunks/DZ0nrC9W.js +0 -162
  224. package/web/app/immutable/chunks/DeRneTJF.js +0 -106
  225. package/web/app/immutable/chunks/Df6EnPla.js +0 -4
  226. package/web/app/immutable/chunks/DfMKUxMU.js +0 -30
  227. package/web/app/immutable/chunks/DkH3yb1j.js +0 -34
  228. package/web/app/immutable/chunks/Doxgswr3.js +0 -4
  229. package/web/app/immutable/chunks/Dt53cexP.js +0 -1
  230. package/web/app/immutable/chunks/Dx6eBL0x.js +0 -1
  231. package/web/app/immutable/chunks/HP7Asd0t.js +0 -2
  232. package/web/app/immutable/chunks/HP8lGamR.js +0 -257
  233. package/web/app/immutable/chunks/HzpfURmp.js +0 -84
  234. package/web/app/immutable/chunks/PJfe_iA1.js +0 -1
  235. package/web/app/immutable/chunks/PXMyYXQv.js +0 -1
  236. package/web/app/immutable/chunks/Qi3HrsAm.js +0 -1
  237. package/web/app/immutable/chunks/S1FanOB0.js +0 -162
  238. package/web/app/immutable/chunks/SuMU9B9i.js +0 -1
  239. package/web/app/immutable/chunks/UaGv-ChR.js +0 -257
  240. package/web/app/immutable/chunks/YqyEOqRv.js +0 -178
  241. package/web/app/immutable/chunks/_MGNV7ZN.js +0 -338
  242. package/web/app/immutable/chunks/_lZu5Dth.js +0 -292
  243. package/web/app/immutable/chunks/gzjZWAx8.js +0 -62
  244. package/web/app/immutable/chunks/hqSEunOk.js +0 -15
  245. package/web/app/immutable/chunks/nGCCQCpO.js +0 -1
  246. package/web/app/immutable/chunks/o-kBqlaj.js +0 -7
  247. package/web/app/immutable/chunks/opO2fBQB.js +0 -1
  248. package/web/app/immutable/chunks/pdFamTTi.js +0 -7
  249. package/web/app/immutable/chunks/rEI8JpP3.js +0 -1
  250. package/web/app/immutable/chunks/s5P9UVzf.js +0 -1
  251. package/web/app/immutable/chunks/sIHUXgeh.js +0 -41
  252. package/web/app/immutable/entry/start.CCtO40vu.js +0 -1
@@ -1,129 +0,0 @@
1
- import{g as Pe}from"./DOVnLHFz.js";import{bq as Fe,aV as xe,bt as Me,cs as Ke,cr as Ye,cu as We,ct as Ve,cn as Ue,cl as He,cb as Xe,bX as Ge,bN as je,bM as qe,bD as Je,ba as Ze,b9 as Qe,bb as $e,aH as et,aG as tt,au as st,N as rt,at as it,o as nt,s as at,m as ot,f as u,aN as Y,c3 as X,bF as ct,a6 as lt,bC as y,a0 as ut,c0 as gt,aO as Le,G as ht,b5 as dt,b6 as pt,bT as ft,a4 as bt,aT as St,b8 as me,bU as xt}from"./CxRm1vYn.js";import{c as Lt}from"./ByM2DIOs.js";function mt(e){return Array.isArray(e)}function yt(e){if(Fe(e))return e;const n=xe(e);if(!wt(e))return{};if(mt(e)){const r=Array.from(e);return e.length>0&&typeof e[0]=="string"&&Object.hasOwn(e,"index")&&(r.index=e.index,r.input=e.input),r}if(Me(e)){const r=e,l=r.constructor;return new l(r.buffer,r.byteOffset,r.length)}if(n==="[object ArrayBuffer]")return new ArrayBuffer(e.byteLength);if(n==="[object DataView]"){const r=e,l=r.buffer,d=r.byteOffset,s=r.byteLength,h=new ArrayBuffer(s),x=new Uint8Array(l,d,s);return new Uint8Array(h).set(x),new DataView(h)}if(n==="[object Boolean]"||n==="[object Number]"||n==="[object String]"){const r=e.constructor,l=new r(e.valueOf());return n==="[object String]"?_t(l,e):se(l,e),l}if(n==="[object Date]")return new Date(Number(e));if(n==="[object RegExp]"){const r=e,l=new RegExp(r.source,r.flags);return l.lastIndex=r.lastIndex,l}if(n==="[object Symbol]")return Object(Symbol.prototype.valueOf.call(e));if(n==="[object Map]"){const r=e,l=new Map;return r.forEach((d,s)=>{l.set(s,d)}),l}if(n==="[object Set]"){const r=e,l=new Set;return r.forEach(d=>{l.add(d)}),l}if(n==="[object Arguments]"){const r=e,l={};return se(l,r),l.length=r.length,l[Symbol.iterator]=r[Symbol.iterator],l}const o={};return kt(o,e),se(o,e),Et(o,e),o}function wt(e){switch(xe(e)){case ot:case at:case nt:case it:case rt:case st:case tt:case et:case $e:case Qe:case Ze:case Je:case qe:case je:case Ge:case Xe:case He:case Ue:case Ve:case We:case Ye:case Ke:return!0;default:return!1}}function se(e,n){for(const o in n)Object.hasOwn(n,o)&&(e[o]=n[o])}function Et(e,n){const o=Object.getOwnPropertySymbols(n);for(let r=0;r<o.length;r++){const l=o[r];Object.prototype.propertyIsEnumerable.call(n,l)&&(e[l]=n[l])}}function _t(e,n){const o=n.valueOf().length;for(const r in n)Object.hasOwn(n,r)&&(Number.isNaN(Number(r))||Number(r)>=o)&&(e[r]=n[r])}function kt(e,n){const o=Object.getPrototypeOf(n);o!==null&&typeof n.constructor=="function"&&Object.setPrototypeOf(e,o)}var ie=(function(){var e=u(function(v,g,i,c){for(i=i||{},c=v.length;c--;i[v[c]]=g);return i},"o"),n=[1,15],o=[1,7],r=[1,13],l=[1,14],d=[1,19],s=[1,16],h=[1,17],x=[1,18],m=[8,30],S=[8,10,21,28,29,30,31,39,43,46],f=[1,23],L=[1,24],w=[8,10,15,16,21,28,29,30,31,39,43,46],b=[8,10,15,16,21,27,28,29,30,31,39,43,46],k=[1,49],_={trace:u(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:u(function(g,i,c,p,E,t,M){var a=t.length-1;switch(E){case 4:p.getLogger().debug("Rule: separator (NL) ");break;case 5:p.getLogger().debug("Rule: separator (Space) ");break;case 6:p.getLogger().debug("Rule: separator (EOF) ");break;case 7:p.getLogger().debug("Rule: hierarchy: ",t[a-1]),p.setHierarchy(t[a-1]);break;case 8:p.getLogger().debug("Stop NL ");break;case 9:p.getLogger().debug("Stop EOF ");break;case 10:p.getLogger().debug("Stop NL2 ");break;case 11:p.getLogger().debug("Stop EOF2 ");break;case 12:p.getLogger().debug("Rule: statement: ",t[a]),typeof t[a].length=="number"?this.$=t[a]:this.$=[t[a]];break;case 13:p.getLogger().debug("Rule: statement #2: ",t[a-1]),this.$=[t[a-1]].concat(t[a]);break;case 14:p.getLogger().debug("Rule: link: ",t[a],g),this.$={edgeTypeStr:t[a],label:""};break;case 15:p.getLogger().debug("Rule: LABEL link: ",t[a-3],t[a-1],t[a]),this.$={edgeTypeStr:t[a],label:t[a-1]};break;case 18:const P=parseInt(t[a]),W=p.generateId();this.$={id:W,type:"space",label:"",width:P,children:[]};break;case 23:p.getLogger().debug("Rule: (nodeStatement link node) ",t[a-2],t[a-1],t[a]," typestr: ",t[a-1].edgeTypeStr);const J=p.edgeStrToEdgeData(t[a-1].edgeTypeStr),V=p.edgeStrToEdgeStartData(t[a-1].edgeTypeStr),Z=p.edgeStrToThickness(t[a-1].edgeTypeStr),D=p.edgeStrToPattern(t[a-1].edgeTypeStr);this.$=[{id:t[a-2].id,label:t[a-2].label,type:t[a-2].type,directions:t[a-2].directions},{id:t[a-2].id+"-"+t[a].id,start:t[a-2].id,end:t[a].id,label:t[a-1].label,type:"edge",thickness:Z,pattern:D,directions:t[a].directions,arrowTypeEnd:J,arrowTypeStart:V},{id:t[a].id,label:t[a].label,type:p.typeStr2Type(t[a].typeStr),directions:t[a].directions}];break;case 24:p.getLogger().debug("Rule: nodeStatement (abc88 node size) ",t[a-1],t[a]),this.$={id:t[a-1].id,label:t[a-1].label,type:p.typeStr2Type(t[a-1].typeStr),directions:t[a-1].directions,widthInColumns:parseInt(t[a],10)};break;case 25:p.getLogger().debug("Rule: nodeStatement (node) ",t[a]),this.$={id:t[a].id,label:t[a].label,type:p.typeStr2Type(t[a].typeStr),directions:t[a].directions,widthInColumns:1};break;case 26:p.getLogger().debug("APA123",this?this:"na"),p.getLogger().debug("COLUMNS: ",t[a]),this.$={type:"column-setting",columns:t[a]==="auto"?-1:parseInt(t[a])};break;case 27:p.getLogger().debug("Rule: id-block statement : ",t[a-2],t[a-1]),p.generateId(),this.$={...t[a-2],type:"composite",children:t[a-1]};break;case 28:p.getLogger().debug("Rule: blockStatement : ",t[a-2],t[a-1],t[a]);const A=p.generateId();this.$={id:A,type:"composite",label:"",children:t[a-1]};break;case 29:p.getLogger().debug("Rule: node (NODE_ID separator): ",t[a]),this.$={id:t[a]};break;case 30:p.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",t[a-1],t[a]),this.$={id:t[a-1],label:t[a].label,typeStr:t[a].typeStr,directions:t[a].directions};break;case 31:p.getLogger().debug("Rule: dirList: ",t[a]),this.$=[t[a]];break;case 32:p.getLogger().debug("Rule: dirList: ",t[a-1],t[a]),this.$=[t[a-1]].concat(t[a]);break;case 33:p.getLogger().debug("Rule: nodeShapeNLabel: ",t[a-2],t[a-1],t[a]),this.$={typeStr:t[a-2]+t[a],label:t[a-1]};break;case 34:p.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",t[a-3],t[a-2]," #3:",t[a-1],t[a]),this.$={typeStr:t[a-3]+t[a],label:t[a-2],directions:t[a-1]};break;case 35:case 36:this.$={type:"classDef",id:t[a-1].trim(),css:t[a].trim()};break;case 37:this.$={type:"applyClass",id:t[a-1].trim(),styleClass:t[a].trim()};break;case 38:this.$={type:"applyStyles",id:t[a-1].trim(),stylesStr:t[a].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:n,11:3,13:4,19:5,20:6,21:o,22:8,23:9,24:10,25:11,26:12,28:r,29:l,31:d,39:s,43:h,46:x},{8:[1,20]},e(m,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:n,21:o,28:r,29:l,31:d,39:s,43:h,46:x}),e(S,[2,16],{14:22,15:f,16:L}),e(S,[2,17]),e(S,[2,18]),e(S,[2,19]),e(S,[2,20]),e(S,[2,21]),e(S,[2,22]),e(w,[2,25],{27:[1,25]}),e(S,[2,26]),{19:26,26:12,31:d},{10:n,11:27,13:4,19:5,20:6,21:o,22:8,23:9,24:10,25:11,26:12,28:r,29:l,31:d,39:s,43:h,46:x},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(b,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(m,[2,13]),{26:35,31:d},{31:[2,14]},{17:[1,36]},e(w,[2,24]),{10:n,11:37,13:4,14:22,15:f,16:L,19:5,20:6,21:o,22:8,23:9,24:10,25:11,26:12,28:r,29:l,31:d,39:s,43:h,46:x},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(b,[2,30]),{18:[1,43]},{18:[1,44]},e(w,[2,23]),{18:[1,45]},{30:[1,46]},e(S,[2,28]),e(S,[2,35]),e(S,[2,36]),e(S,[2,37]),e(S,[2,38]),{36:[1,47]},{33:48,34:k},{15:[1,50]},e(S,[2,27]),e(b,[2,33]),{38:[1,51]},{33:52,34:k,38:[2,31]},{31:[2,15]},e(b,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:u(function(g,i){if(i.recoverable)this.trace(g);else{var c=new Error(g);throw c.hash=i,c}},"parseError"),parse:u(function(g){var i=this,c=[0],p=[],E=[null],t=[],M=this.table,a="",P=0,W=0,J=2,V=1,Z=t.slice.call(arguments,1),D=Object.create(this.lexer),A={yy:{}};for(var Q in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Q)&&(A.yy[Q]=this.yy[Q]);D.setInput(g,A.yy),A.yy.lexer=D,A.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var $=D.yylloc;t.push($);var Be=D.options&&D.options.ranges;typeof A.yy.parseError=="function"?this.parseError=A.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Re(O){c.length=c.length-2*O,E.length=E.length-O,t.length=t.length-O}u(Re,"popStack");function de(){var O;return O=p.pop()||D.lex()||V,typeof O!="number"&&(O instanceof Array&&(p=O,O=p.pop()),O=i.symbols_[O]||O),O}u(de,"lex");for(var N,R,C,ee,F={},U,B,pe,H;;){if(R=c[c.length-1],this.defaultActions[R]?C=this.defaultActions[R]:((N===null||typeof N>"u")&&(N=de()),C=M[R]&&M[R][N]),typeof C>"u"||!C.length||!C[0]){var te="";H=[];for(U in M[R])this.terminals_[U]&&U>J&&H.push("'"+this.terminals_[U]+"'");D.showPosition?te="Parse error on line "+(P+1)+`:
2
- `+D.showPosition()+`
3
- Expecting `+H.join(", ")+", got '"+(this.terminals_[N]||N)+"'":te="Parse error on line "+(P+1)+": Unexpected "+(N==V?"end of input":"'"+(this.terminals_[N]||N)+"'"),this.parseError(te,{text:D.match,token:this.terminals_[N]||N,line:D.yylineno,loc:$,expected:H})}if(C[0]instanceof Array&&C.length>1)throw new Error("Parse Error: multiple actions possible at state: "+R+", token: "+N);switch(C[0]){case 1:c.push(N),E.push(D.yytext),t.push(D.yylloc),c.push(C[1]),N=null,W=D.yyleng,a=D.yytext,P=D.yylineno,$=D.yylloc;break;case 2:if(B=this.productions_[C[1]][1],F.$=E[E.length-B],F._$={first_line:t[t.length-(B||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(B||1)].first_column,last_column:t[t.length-1].last_column},Be&&(F._$.range=[t[t.length-(B||1)].range[0],t[t.length-1].range[1]]),ee=this.performAction.apply(F,[a,W,P,A.yy,C[1],E,t].concat(Z)),typeof ee<"u")return ee;B&&(c=c.slice(0,-1*B*2),E=E.slice(0,-1*B),t=t.slice(0,-1*B)),c.push(this.productions_[C[1]][0]),E.push(F.$),t.push(F._$),pe=M[c[c.length-2]][c[c.length-1]],c.push(pe);break;case 3:return!0}}return!0},"parse")},T=(function(){var v={EOF:1,parseError:u(function(i,c){if(this.yy.parser)this.yy.parser.parseError(i,c);else throw new Error(i)},"parseError"),setInput:u(function(g,i){return this.yy=i||this.yy||{},this._input=g,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:u(function(){var g=this._input[0];this.yytext+=g,this.yyleng++,this.offset++,this.match+=g,this.matched+=g;var i=g.match(/(?:\r\n?|\n).*/g);return i?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),g},"input"),unput:u(function(g){var i=g.length,c=g.split(/(?:\r\n?|\n)/g);this._input=g+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;var p=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var E=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===p.length?this.yylloc.first_column:0)+p[p.length-c.length].length-c[0].length:this.yylloc.first_column-i},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-i]),this.yyleng=this.yytext.length,this},"unput"),more:u(function(){return this._more=!0,this},"more"),reject:u(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
- `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:u(function(g){this.unput(this.match.slice(g))},"less"),pastInput:u(function(){var g=this.matched.substr(0,this.matched.length-this.match.length);return(g.length>20?"...":"")+g.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:u(function(){var g=this.match;return g.length<20&&(g+=this._input.substr(0,20-g.length)),(g.substr(0,20)+(g.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:u(function(){var g=this.pastInput(),i=new Array(g.length+1).join("-");return g+this.upcomingInput()+`
5
- `+i+"^"},"showPosition"),test_match:u(function(g,i){var c,p,E;if(this.options.backtrack_lexer&&(E={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(E.yylloc.range=this.yylloc.range.slice(0))),p=g[0].match(/(?:\r\n?|\n).*/g),p&&(this.yylineno+=p.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:p?p[p.length-1].length-p[p.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+g[0].length},this.yytext+=g[0],this.match+=g[0],this.matches=g,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(g[0].length),this.matched+=g[0],c=this.performAction.call(this,this.yy,this,i,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),c)return c;if(this._backtrack){for(var t in E)this[t]=E[t];return!1}return!1},"test_match"),next:u(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var g,i,c,p;this._more||(this.yytext="",this.match="");for(var E=this._currentRules(),t=0;t<E.length;t++)if(c=this._input.match(this.rules[E[t]]),c&&(!i||c[0].length>i[0].length)){if(i=c,p=t,this.options.backtrack_lexer){if(g=this.test_match(c,E[t]),g!==!1)return g;if(this._backtrack){i=!1;continue}else return!1}else if(!this.options.flex)break}return i?(g=this.test_match(i,E[p]),g!==!1?g:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:u(function(){var i=this.next();return i||this.lex()},"lex"),begin:u(function(i){this.conditionStack.push(i)},"begin"),popState:u(function(){var i=this.conditionStack.length-1;return i>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:u(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:u(function(i){return i=this.conditionStack.length-1-Math.abs(i||0),i>=0?this.conditionStack[i]:"INITIAL"},"topState"),pushState:u(function(i){this.begin(i)},"pushState"),stateStackSize:u(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:u(function(i,c,p,E){switch(p){case 0:return i.getLogger().debug("Found block-beta"),10;case 1:return i.getLogger().debug("Found id-block"),29;case 2:return i.getLogger().debug("Found block"),10;case 3:i.getLogger().debug(".",c.yytext);break;case 4:i.getLogger().debug("_",c.yytext);break;case 5:return 5;case 6:return c.yytext=-1,28;case 7:return c.yytext=c.yytext.replace(/columns\s+/,""),i.getLogger().debug("COLUMNS (LEX)",c.yytext),28;case 8:this.pushState("md_string");break;case 9:return"MD_STR";case 10:this.popState();break;case 11:this.pushState("string");break;case 12:i.getLogger().debug("LEX: POPPING STR:",c.yytext),this.popState();break;case 13:return i.getLogger().debug("LEX: STR end:",c.yytext),"STR";case 14:return c.yytext=c.yytext.replace(/space\:/,""),i.getLogger().debug("SPACE NUM (LEX)",c.yytext),21;case 15:return c.yytext="1",i.getLogger().debug("COLUMNS (LEX)",c.yytext),21;case 16:return 42;case 17:return"LINKSTYLE";case 18:return"INTERPOLATE";case 19:return this.pushState("CLASSDEF"),39;case 20:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 21:return this.popState(),this.pushState("CLASSDEFID"),40;case 22:return this.popState(),41;case 23:return this.pushState("CLASS"),43;case 24:return this.popState(),this.pushState("CLASS_STYLE"),44;case 25:return this.popState(),45;case 26:return this.pushState("STYLE_STMNT"),46;case 27:return this.popState(),this.pushState("STYLE_DEFINITION"),47;case 28:return this.popState(),48;case 29:return this.pushState("acc_title"),"acc_title";case 30:return this.popState(),"acc_title_value";case 31:return this.pushState("acc_descr"),"acc_descr";case 32:return this.popState(),"acc_descr_value";case 33:this.pushState("acc_descr_multiline");break;case 34:this.popState();break;case 35:return"acc_descr_multiline_value";case 36:return 30;case 37:return this.popState(),i.getLogger().debug("Lex: (("),"NODE_DEND";case 38:return this.popState(),i.getLogger().debug("Lex: (("),"NODE_DEND";case 39:return this.popState(),i.getLogger().debug("Lex: ))"),"NODE_DEND";case 40:return this.popState(),i.getLogger().debug("Lex: (("),"NODE_DEND";case 41:return this.popState(),i.getLogger().debug("Lex: (("),"NODE_DEND";case 42:return this.popState(),i.getLogger().debug("Lex: (-"),"NODE_DEND";case 43:return this.popState(),i.getLogger().debug("Lex: -)"),"NODE_DEND";case 44:return this.popState(),i.getLogger().debug("Lex: (("),"NODE_DEND";case 45:return this.popState(),i.getLogger().debug("Lex: ]]"),"NODE_DEND";case 46:return this.popState(),i.getLogger().debug("Lex: ("),"NODE_DEND";case 47:return this.popState(),i.getLogger().debug("Lex: ])"),"NODE_DEND";case 48:return this.popState(),i.getLogger().debug("Lex: /]"),"NODE_DEND";case 49:return this.popState(),i.getLogger().debug("Lex: /]"),"NODE_DEND";case 50:return this.popState(),i.getLogger().debug("Lex: )]"),"NODE_DEND";case 51:return this.popState(),i.getLogger().debug("Lex: )"),"NODE_DEND";case 52:return this.popState(),i.getLogger().debug("Lex: ]>"),"NODE_DEND";case 53:return this.popState(),i.getLogger().debug("Lex: ]"),"NODE_DEND";case 54:return i.getLogger().debug("Lexa: -)"),this.pushState("NODE"),35;case 55:return i.getLogger().debug("Lexa: (-"),this.pushState("NODE"),35;case 56:return i.getLogger().debug("Lexa: ))"),this.pushState("NODE"),35;case 57:return i.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 58:return i.getLogger().debug("Lex: ((("),this.pushState("NODE"),35;case 59:return i.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 60:return i.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 61:return i.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 62:return i.getLogger().debug("Lexc: >"),this.pushState("NODE"),35;case 63:return i.getLogger().debug("Lexa: (["),this.pushState("NODE"),35;case 64:return i.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 65:return this.pushState("NODE"),35;case 66:return this.pushState("NODE"),35;case 67:return this.pushState("NODE"),35;case 68:return this.pushState("NODE"),35;case 69:return this.pushState("NODE"),35;case 70:return this.pushState("NODE"),35;case 71:return this.pushState("NODE"),35;case 72:return i.getLogger().debug("Lexa: ["),this.pushState("NODE"),35;case 73:return this.pushState("BLOCK_ARROW"),i.getLogger().debug("LEX ARR START"),37;case 74:return i.getLogger().debug("Lex: NODE_ID",c.yytext),31;case 75:return i.getLogger().debug("Lex: EOF",c.yytext),8;case 76:this.pushState("md_string");break;case 77:this.pushState("md_string");break;case 78:return"NODE_DESCR";case 79:this.popState();break;case 80:i.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 81:i.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 82:return i.getLogger().debug("LEX: NODE_DESCR:",c.yytext),"NODE_DESCR";case 83:i.getLogger().debug("LEX POPPING"),this.popState();break;case 84:i.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 85:return c.yytext=c.yytext.replace(/^,\s*/,""),i.getLogger().debug("Lex (right): dir:",c.yytext),"DIR";case 86:return c.yytext=c.yytext.replace(/^,\s*/,""),i.getLogger().debug("Lex (left):",c.yytext),"DIR";case 87:return c.yytext=c.yytext.replace(/^,\s*/,""),i.getLogger().debug("Lex (x):",c.yytext),"DIR";case 88:return c.yytext=c.yytext.replace(/^,\s*/,""),i.getLogger().debug("Lex (y):",c.yytext),"DIR";case 89:return c.yytext=c.yytext.replace(/^,\s*/,""),i.getLogger().debug("Lex (up):",c.yytext),"DIR";case 90:return c.yytext=c.yytext.replace(/^,\s*/,""),i.getLogger().debug("Lex (down):",c.yytext),"DIR";case 91:return c.yytext="]>",i.getLogger().debug("Lex (ARROW_DIR end):",c.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 92:return i.getLogger().debug("Lex: LINK","#"+c.yytext+"#"),15;case 93:return i.getLogger().debug("Lex: LINK",c.yytext),15;case 94:return i.getLogger().debug("Lex: LINK",c.yytext),15;case 95:return i.getLogger().debug("Lex: LINK",c.yytext),15;case 96:return i.getLogger().debug("Lex: START_LINK",c.yytext),this.pushState("LLABEL"),16;case 97:return i.getLogger().debug("Lex: START_LINK",c.yytext),this.pushState("LLABEL"),16;case 98:return i.getLogger().debug("Lex: START_LINK",c.yytext),this.pushState("LLABEL"),16;case 99:this.pushState("md_string");break;case 100:return i.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 101:return this.popState(),i.getLogger().debug("Lex: LINK","#"+c.yytext+"#"),15;case 102:return this.popState(),i.getLogger().debug("Lex: LINK",c.yytext),15;case 103:return this.popState(),i.getLogger().debug("Lex: LINK",c.yytext),15;case 104:return i.getLogger().debug("Lex: COLON",c.yytext),c.yytext=c.yytext.slice(1),27}},"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block:)/,/^(?:block\b)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:=]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[28],inclusive:!1},STYLE_STMNT:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[22],inclusive:!1},CLASSDEF:{rules:[20,21],inclusive:!1},CLASS_STYLE:{rules:[25],inclusive:!1},CLASS:{rules:[24],inclusive:!1},LLABEL:{rules:[99,100,101,102,103],inclusive:!1},ARROW_DIR:{rules:[85,86,87,88,89,90,91],inclusive:!1},BLOCK_ARROW:{rules:[76,81,84],inclusive:!1},NODE:{rules:[37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,77,80],inclusive:!1},md_string:{rules:[9,10,78,79],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[12,13,82,83],inclusive:!1},acc_descr_multiline:{rules:[34,35],inclusive:!1},acc_descr:{rules:[32],inclusive:!1},acc_title:{rules:[30],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,11,14,15,16,17,18,19,23,26,29,31,33,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,92,93,94,95,96,97,98,104],inclusive:!0}}};return v})();_.lexer=T;function I(){this.yy={}}return u(I,"Parser"),I.prototype=_,_.Parser=I,new I})();ie.parser=ie;var Dt=ie,z=new Map,oe=[],ne=new Map,fe="color",be="fill",Tt="bgFill",ye=",",G=new Map,ce="",Nt=u(e=>bt.sanitizeText(e,Le()),"sanitizeText"),Ot=u(function(e,n=""){let o=G.get(e);o||(o={id:e,styles:[],textStyles:[]},G.set(e,o)),n?.split(ye).forEach(r=>{const l=r.replace(/([^;]*);/,"$1").trim();if(RegExp(fe).exec(r)){const s=l.replace(be,Tt).replace(fe,be);o.textStyles.push(s)}o.styles.push(l)})},"addStyleClass"),It=u(function(e,n=""){const o=z.get(e);n!=null&&(o.styles=n.split(ye))},"addStyle2Node"),vt=u(function(e,n){e.split(",").forEach(function(o){let r=z.get(o);if(r===void 0){const l=o.trim();r={id:l,type:"na",children:[]},z.set(l,r)}r.classes||(r.classes=[]),r.classes.push(n)})},"setCssClass"),we=u((e,n)=>{const o=e.flat(),r=[],d=o.find(s=>s?.type==="column-setting")?.columns??-1;for(const s of o){if(typeof d=="number"&&d>0&&s.type!=="column-setting"&&typeof s.widthInColumns=="number"&&s.widthInColumns>d&&y.warn(`Block ${s.id} width ${s.widthInColumns} exceeds configured column width ${d}`),s.label&&(s.label=Nt(s.label)),s.type==="classDef"){Ot(s.id,s.css);continue}if(s.type==="applyClass"){vt(s.id,s?.styleClass??"");continue}if(s.type==="applyStyles"){s?.stylesStr&&It(s.id,s?.stylesStr);continue}if(s.type==="column-setting")n.columns=s.columns??-1;else if(s.type==="edge"){const h=(ne.get(s.id)??0)+1;ne.set(s.id,h),s.id=h+"-"+s.id,oe.push(s)}else{s.label||(s.type==="composite"?s.label="":s.label=s.id);const h=z.get(s.id);if(h===void 0?z.set(s.id,s):(s.type!=="na"&&(h.type=s.type),s.label!==s.id&&(h.label=s.label)),s.children&&we(s.children,s),s.type==="space"){const x=s.width??1;for(let m=0;m<x;m++){const S=yt(s);S.id=S.id+"-"+m,z.set(S.id,S),r.push(S)}}else h===void 0&&r.push(s)}}n.children=r},"populateBlockDatabase"),le=[],K={id:"root",type:"composite",children:[],columns:-1},Ct=u(()=>{y.debug("Clear called"),ut(),K={id:"root",type:"composite",children:[],columns:-1},z=new Map([["root",K]]),le=[],G=new Map,oe=[],ne=new Map,ce=""},"clear");function Ee(e){switch(y.debug("typeStr2Type",e),e){case"[]":return"square";case"()":return y.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}u(Ee,"typeStr2Type");function _e(e){switch(y.debug("typeStr2Type",e),e){case"==":return"thick";default:return"normal"}}u(_e,"edgeTypeStr2Type");function ke(e){switch(e.trim().slice(-1)){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return""}}u(ke,"edgeStrToEdgeData");function De(e){switch(e.trim().charAt(0)){case"x":return"arrow_cross";case"o":return"arrow_circle";case"<":return"arrow_point";default:return"arrow_open"}}u(De,"edgeStrToEdgeStartData");function Te(e){return e.includes("==")?"thick":"normal"}u(Te,"edgeStrToThickness");function Ne(e){return e.includes(".-")?"dotted":"solid"}u(Ne,"edgeStrToPattern");var Se=0,zt=u(()=>(Se++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Se),"generateId"),At=u(e=>{K.children=e,we(e,K),le=K.children},"setHierarchy"),Bt=u(e=>{const n=z.get(e);return n?n.columns?n.columns:n.children?n.children.length:-1:-1},"getColumns"),Rt=u(()=>[...z.values()],"getBlocksFlat"),Pt=u(()=>le||[],"getBlocks"),Ft=u(()=>oe,"getEdges"),Mt=u(e=>z.get(e),"getBlock"),Kt=u(e=>{z.set(e.id,e)},"setBlock"),Yt=u(e=>{ce=e},"setDiagramId"),Wt=u(()=>ce,"getDiagramId"),Vt=u(()=>y,"getLogger"),Ut=u(function(){return G},"getClasses"),Ht={getConfig:u(()=>Y().block,"getConfig"),typeStr2Type:Ee,edgeTypeStr2Type:_e,edgeStrToEdgeData:ke,edgeStrToEdgeStartData:De,edgeStrToThickness:Te,edgeStrToPattern:Ne,getLogger:Vt,getBlocksFlat:Rt,getBlocks:Pt,getEdges:Ft,setHierarchy:At,getBlock:Mt,setBlock:Kt,getColumns:Bt,getClasses:Ut,clear:Ct,generateId:zt,setDiagramId:Yt,getDiagramId:Wt},Xt=Ht,re=u((e,n)=>{const o=Lt,r=o(e,"r"),l=o(e,"g"),d=o(e,"b");return gt(r,l,d,n)},"fade"),Gt=u(e=>`.label {
7
- font-family: ${e.fontFamily};
8
- color: ${e.nodeTextColor||e.textColor};
9
- }
10
- .cluster-label text {
11
- fill: ${e.titleColor};
12
- }
13
- .cluster-label span {
14
- color: ${e.titleColor};
15
- }
16
-
17
-
18
-
19
- .label text,span {
20
- fill: ${e.nodeTextColor||e.textColor};
21
- color: ${e.nodeTextColor||e.textColor};
22
- }
23
-
24
- .node rect,
25
- .node circle,
26
- .node ellipse,
27
- .node polygon,
28
- .node path {
29
- fill: ${e.mainBkg};
30
- stroke: ${e.nodeBorder};
31
- stroke-width: 1px;
32
- }
33
- .flowchart-label text {
34
- text-anchor: middle;
35
- }
36
- // .flowchart-label .text-outer-tspan {
37
- // text-anchor: middle;
38
- // }
39
- // .flowchart-label .text-inner-tspan {
40
- // text-anchor: start;
41
- // }
42
-
43
- .node .label {
44
- text-align: center;
45
- }
46
- .node.clickable {
47
- cursor: pointer;
48
- }
49
-
50
- .arrowheadPath {
51
- fill: ${e.arrowheadColor};
52
- }
53
-
54
- .edgePaths .path {
55
- stroke: ${e.lineColor};
56
- stroke-width: 2.0px;
57
- }
58
-
59
- .flowchart-link {
60
- stroke: ${e.lineColor};
61
- fill: none;
62
- }
63
-
64
- .edgeLabel {
65
- background-color: ${e.edgeLabelBackground};
66
- /*
67
- * This is for backward compatibility with existing code that didn't
68
- * add a \`<p>\` around edge labels.
69
- *
70
- * TODO: We should probably remove this in a future release.
71
- */
72
- p {
73
- margin: 0;
74
- padding: 0;
75
- display: inline;
76
- }
77
- rect {
78
- opacity: 0.5;
79
- background-color: ${e.edgeLabelBackground};
80
- fill: ${e.edgeLabelBackground};
81
- }
82
- text-align: center;
83
- }
84
-
85
- /* For html labels only */
86
- .labelBkg {
87
- background-color: ${e.edgeLabelBackground};
88
- }
89
-
90
- .node .cluster {
91
- // fill: ${re(e.mainBkg,.5)};
92
- fill: ${re(e.clusterBkg,.5)};
93
- stroke: ${re(e.clusterBorder,.2)};
94
- box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
95
- stroke-width: 1px;
96
- }
97
-
98
- .cluster text {
99
- fill: ${e.titleColor};
100
- }
101
-
102
- .cluster span {
103
- color: ${e.titleColor};
104
- }
105
- /* .cluster div {
106
- color: ${e.titleColor};
107
- } */
108
-
109
- div.mermaidTooltip {
110
- position: absolute;
111
- text-align: center;
112
- max-width: 200px;
113
- padding: 2px;
114
- font-family: ${e.fontFamily};
115
- font-size: 12px;
116
- background: ${e.tertiaryColor};
117
- border: 1px solid ${e.border2};
118
- border-radius: 2px;
119
- pointer-events: none;
120
- z-index: 100;
121
- }
122
-
123
- .flowchartTitleText {
124
- text-anchor: middle;
125
- font-size: 18px;
126
- fill: ${e.textColor};
127
- }
128
- ${Pe()}
129
- `,"getStyles"),jt=Gt;function ae(e,n){if(e===0||!Number.isInteger(e))throw new Error("Columns must be an integer !== 0.");if(n<0||!Number.isInteger(n))throw new Error("Position must be a non-negative integer."+n);if(e<0)return{px:n,py:0};if(e===1)return{px:0,py:n};const o=n%e,r=Math.floor(n/e);return{px:o,py:r}}u(ae,"calculateBlockPosition");var qt=u(e=>{let n=0,o=0;for(const r of e.children){const{width:l,height:d,x:s,y:h}=r.size??{width:0,height:0,x:0,y:0};if(y.debug("getMaxChildSize abc95 child:",r.id,"width:",l,"height:",d,"x:",s,"y:",h,r.type),r.type==="space")continue;const x=l/(r.widthInColumns??1);x>n&&(n=x),d>o&&(o=d)}return{width:n,height:o}},"getMaxChildSize");function j(e,n,o=0,r=0,l=8){y.debug("setBlockSizes abc95 (start)",e.id,e?.size?.x,"block width =",e?.size,"siblingWidth",o),e?.size?.width||(e.size={width:o,height:r,x:0,y:0});let d=0,s=0;if(e.children?.length>0){for(const b of e.children)j(b,n,0,0,l);const h=qt(e);d=h.width,s=h.height,y.debug("setBlockSizes abc95 maxWidth of",e.id,":s children is ",d,s);for(const b of e.children)b.size&&(y.debug(`abc95 Setting size of children of ${e.id} id=${b.id} ${d} ${s} ${JSON.stringify(b.size)}`),b.size.width=d*(b.widthInColumns??1)+l*((b.widthInColumns??1)-1),b.size.height=s,b.size.x=0,b.size.y=0,y.debug(`abc95 updating size of ${e.id} children child:${b.id} maxWidth:${d} maxHeight:${s}`));for(const b of e.children)j(b,n,d,s,l);const x=e.columns??-1;let m=0;for(const b of e.children)m+=b.widthInColumns??1;let S=e.children.length;x>0&&x<m&&(S=x);const f=Math.ceil(m/S);let L=S*(d+l)+l,w=f*(s+l)+l;if(L<o){y.debug(`Detected to small sibling: abc95 ${e.id} siblingWidth ${o} siblingHeight ${r} width ${L}`),L=o,w=r;const b=(o-S*l-l)/S,k=(r-f*l-l)/f;y.debug("Size indata abc88",e.id,"childWidth",b,"maxWidth",d),y.debug("Size indata abc88",e.id,"childHeight",k,"maxHeight",s),y.debug("Size indata abc88 xSize",S,"padding",l);for(const _ of e.children)_.size&&(_.size.width=b,_.size.height=k,_.size.x=0,_.size.y=0)}if(y.debug(`abc95 (finale calc) ${e.id} xSize ${S} ySize ${f} columns ${x}${e.children.length} width=${Math.max(L,e.size?.width||0)}`),L<(e?.size?.width||0)){L=e?.size?.width||0;const b=x>0?Math.min(e.children.length,x):e.children.length;if(b>0){const k=(L-b*l-l)/b;y.debug("abc95 (growing to fit) width",e.id,L,e.size?.width,k);for(const _ of e.children)_.size&&(_.size.width=k)}}e.size={width:L,height:w,x:0,y:0}}y.debug("setBlockSizes abc94 (done)",e.id,e?.size?.x,e?.size?.width,e?.size?.y,e?.size?.height)}u(j,"setBlockSizes");function ue(e,n,o=8){y.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`);const r=e.columns??-1;if(y.debug("layoutBlocks columns abc95",e.id,"=>",r,e),e.children&&e.children.length>0){const l=e?.children[0]?.size?.width??0,d=e.children.length*l+(e.children.length-1)*o;y.debug("widthOfChildren 88",d,"posX");const s=new Map;{let f=0;for(const L of e.children){if(!L.size)continue;const{py:w}=ae(r,f),b=s.get(w)??0;L.size.height>b&&s.set(w,L.size.height);let k=L?.widthInColumns??1;r>0&&(k=Math.min(k,r-f%r)),f+=k}}const h=new Map;{let f=0;const L=[...s.keys()].sort((w,b)=>w-b);for(const w of L)h.set(w,f),f+=(s.get(w)??0)+o}let x=0;y.debug("abc91 block?.size?.x",e.id,e?.size?.x);let m=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-o,S=0;for(const f of e.children){const L=e;if(!f.size)continue;const{width:w,height:b}=f.size,{px:k,py:_}=ae(r,x);if(_!=S&&(S=_,m=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-o,y.debug("New row in layout for block",e.id," and child ",f.id,S)),y.debug(`abc89 layout blocks (child) id: ${f.id} Pos: ${x} (px, py) ${k},${_} (${L?.size?.x},${L?.size?.y}) parent: ${L.id} width: ${w}${o}`),L.size){const I=w/2;f.size.x=m+o+I,y.debug(`abc91 layout blocks (calc) px, pyid:${f.id} startingPos=X${m} new startingPosX${f.size.x} ${I} padding=${o} width=${w} halfWidth=${I} => x:${f.size.x} y:${f.size.y} ${f.widthInColumns} (width * (child?.w || 1)) / 2 ${w*(f?.widthInColumns??1)/2}`),m=f.size.x+I;const v=h.get(_)??0,g=s.get(_)??b;f.size.y=L.size.y-L.size.height/2+v+g/2+o,y.debug(`abc88 layout blocks (calc) px, pyid:${f.id}startingPosX${m}${o}${I}=>x:${f.size.x}y:${f.size.y}${f.widthInColumns}(width * (child?.w || 1)) / 2${w*(f?.widthInColumns??1)/2}`)}f.children&&ue(f,n,o);let T=f?.widthInColumns??1;r>0&&(T=Math.min(T,r-x%r)),x+=T,y.debug("abc88 columnsPos",f,x)}}y.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`)}u(ue,"layoutBlocks");function ge(e,{minX:n,minY:o,maxX:r,maxY:l}={minX:0,minY:0,maxX:0,maxY:0}){if(e.size&&e.id!=="root"){const{x:d,y:s,width:h,height:x}=e.size;d-h/2<n&&(n=d-h/2),s-x/2<o&&(o=s-x/2),d+h/2>r&&(r=d+h/2),s+x/2>l&&(l=s+x/2)}if(e.children)for(const d of e.children)({minX:n,minY:o,maxX:r,maxY:l}=ge(d,{minX:n,minY:o,maxX:r,maxY:l}));return{minX:n,minY:o,maxX:r,maxY:l}}u(ge,"findBounds");function Oe(e){const n=e.getBlock("root");if(!n)return;const o=Le()?.block?.padding??8;j(n,e,0,0,o),ue(n,e,o),y.debug("getBlocks",JSON.stringify(n,null,2));const{minX:r,minY:l,maxX:d,maxY:s}=ge(n),h=s-l,x=d-r;return{x:r,y:l,width:x,height:h}}u(Oe,"layout");function he(e,n,o=!1){const r=e;let l="default";(r?.classes?.length||0)>0&&(l=(r?.classes??[]).join(" ")),l=l+" flowchart-label";const d=(r?.classes??[]).flatMap(b=>n.getClasses().get(b)?.styles??[]);let s=0,h="rect",x;switch(r.type){case"round":s=5,h="rect";break;case"composite":s=0,h="composite",x=0;break;case"square":h="rect";break;case"diamond":h="question";break;case"hexagon":h="hexagon";break;case"block_arrow":h="block_arrow";break;case"odd":h="rect_left_inv_arrow";break;case"lean_right":h="lean_right";break;case"lean_left":h="lean_left";break;case"trapezoid":h="trapezoid";break;case"inv_trapezoid":h="inv_trapezoid";break;case"rect_left_inv_arrow":h="rect_left_inv_arrow";break;case"circle":h="circle";break;case"ellipse":h="ellipse";break;case"stadium":h="stadium";break;case"subroutine":h="subroutine";break;case"cylinder":h="cylinder";break;case"group":h="rect";break;case"doublecircle":h="doublecircle";break;default:h="rect"}const m=St(r?.styles??[]),S=r.label,f=r.size??{width:0,height:0,x:0,y:0},L=n.getDiagramId();return{labelStyle:m.labelStyle,shape:h,label:S,labelText:S,rx:s,ry:s,class:l,cssClasses:l,cssStyles:r?.styles??[],cssCompiledStyles:d,style:m.style,id:r.id,domId:L?`${L}-${r.id}`:r.id,isGroup:!1,directions:r.directions,width:f.width||void 0,height:f.height||void 0,wrappingWidth:f.width||Number.POSITIVE_INFINITY,x:f.x,y:f.y,positioned:o,intersect:void 0,padding:x??Y()?.block?.padding??0,widthInColumns:r.widthInColumns??1}}u(he,"getNodeFromBlock");async function Ie(e,n,o){const r=he(n,o,!1);if(n.type==="group")return;const l=Y(),d=await me(e,r,{config:l}),s=d.node()?.getBBox()??{width:0,height:0},h=o.getBlock(r.id);h.size={width:s.width,height:s.height,x:0,y:0,node:d},o.setBlock(h),d.remove()}u(Ie,"calculateBlockSize");async function ve(e,n,o){const r=he(n,o,!0);if(o.getBlock(r.id).type!=="space"){const d=Y();await me(e,r,{config:d}),n.intersect=r?.intersect,xt(r)}}u(ve,"insertBlockPositioned");async function q(e,n,o,r){for(const l of n)await r(e,l,o),l.children&&await q(e,l.children,o,r)}u(q,"performOperations");async function Ce(e,n,o){await q(e,n,o,Ie)}u(Ce,"calculateBlockSizes");async function ze(e,n,o){await q(e,n,o,ve)}u(ze,"insertBlocks");async function Ae(e,n,o,r,l){const d=new ht({multigraph:!0,compound:!0});d.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(const s of o)s.size&&d.setNode(s.id,{width:s.size.width,height:s.size.height,intersect:s.intersect});for(const s of n)if(s.start&&s.end){const h=r.getBlock(s.start),x=r.getBlock(s.end);if(h?.size&&x?.size){const m=h.size,S=x.size,f=[{x:m.x,y:m.y},{x:m.x+(S.x-m.x)/2,y:m.y+(S.y-m.y)/2},{x:S.x,y:S.y}],L=l?`${l}-${s.id}`:s.id,w=s.thickness==="thick"?"edge-thickness-thick":"edge-thickness-normal",b=s.pattern==="dotted"?"edge-pattern-dotted":"edge-pattern-solid",k=`${w} ${b} flowchart-link LS-a1 LE-b1`;dt(e,{...s,id:L,arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:f,classes:k},{},"block",d.node(s.start),d.node(s.end),l),s.label&&(await pt(e,{...s,label:s.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:f,classes:k}),ft({...s,x:f[1].x,y:f[1].y},{originalPath:f}))}}}u(Ae,"insertEdges");var Jt=u(function(e,n){return n.db.getClasses()},"getClasses"),Zt=u(async function(e,n,o,r){const{securityLevel:l,block:d}=Y(),s=r.db;s.setDiagramId(n);let h;l==="sandbox"&&(h=X("#i"+n));const x=l==="sandbox"?X(h.nodes()[0].contentDocument.body):X("body"),m=l==="sandbox"?x.select(`[id="${n}"]`):X(`[id="${n}"]`);ct(m,["point","circle","cross"],r.type,n);const f=s.getBlocks(),L=s.getBlocksFlat(),w=s.getEdges(),b=m.insert("g").attr("class","block");await Ce(b,f,s);const k=Oe(s);await ze(b,f,s),await Ae(b,w,L,s,n);const _=b.node()?.getBBox(),T=_&&Number.isFinite(_.width)&&Number.isFinite(_.height)?_:k;if(T){const I=Math.max(1,Math.round(.125*(T.width/T.height))),v=T.height+I+10,g=T.width+10,{useMaxWidth:i}=d;lt(m,v,g,!!i),y.debug("Here Bounds",k,T),m.attr("viewBox",`${T.x-5} ${T.y-5} ${T.width+10} ${T.height+10}`)}},"draw"),Qt={draw:Zt,getClasses:Jt},ss={parser:Dt,db:Xt,renderer:Qt,styles:jt};export{ss as diagram};
@@ -1 +0,0 @@
1
- import{a8 as j,bc as p,a2 as w,bd as k,be as q}from"./CxRm1vYn.js";import{i as D}from"./Gi6I4Gst.js";import{e as g,b as F,a as z,f as B}from"./CrowFXzY.js";function M(n,r){return n==null||r==null?NaN:n<r?-1:n>r?1:n>=r?0:NaN}function I(n,r){return n==null||r==null?NaN:r<n?-1:r>n?1:r>=n?0:NaN}function R(n){let r,t,e;n.length!==2?(r=M,t=(o,c)=>M(n(o),c),e=(o,c)=>n(o)-c):(r=n===M||n===I?n:P,t=n,e=n);function u(o,c,i=0,h=o.length){if(i<h){if(r(c,c)!==0)return h;do{const l=i+h>>>1;t(o[l],c)<0?i=l+1:h=l}while(i<h)}return i}function f(o,c,i=0,h=o.length){if(i<h){if(r(c,c)!==0)return h;do{const l=i+h>>>1;t(o[l],c)<=0?i=l+1:h=l}while(i<h)}return i}function a(o,c,i=0,h=o.length){const l=u(o,c,i,h-1);return l>i&&e(o[l-1],c)>-e(o[l],c)?l-1:l}return{left:u,center:a,right:f}}function P(){return 0}function V(n){return n===null?NaN:+n}const $=R(M),x=$.right;R(V).center;const O=Math.sqrt(50),T=Math.sqrt(10),C=Math.sqrt(2);function v(n,r,t){const e=(r-n)/Math.max(0,t),u=Math.floor(Math.log10(e)),f=e/Math.pow(10,u),a=f>=O?10:f>=T?5:f>=C?2:1;let o,c,i;return u<0?(i=Math.pow(10,-u)/a,o=Math.round(n*i),c=Math.round(r*i),o/i<n&&++o,c/i>r&&--c,i=-i):(i=Math.pow(10,u)*a,o=Math.round(n/i),c=Math.round(r/i),o*i<n&&++o,c*i>r&&--c),c<o&&.5<=t&&t<2?v(n,r,t*2):[o,c,i]}function E(n,r,t){if(r=+r,n=+n,t=+t,!(t>0))return[];if(n===r)return[n];const e=r<n,[u,f,a]=e?v(r,n,t):v(n,r,t);if(!(f>=u))return[];const o=f-u+1,c=new Array(o);if(e)if(a<0)for(let i=0;i<o;++i)c[i]=(f-i)/-a;else for(let i=0;i<o;++i)c[i]=(f-i)*a;else if(a<0)for(let i=0;i<o;++i)c[i]=(u+i)/-a;else for(let i=0;i<o;++i)c[i]=(u+i)*a;return c}function y(n,r,t){return r=+r,n=+n,t=+t,v(n,r,t)[2]}function G(n,r,t){r=+r,n=+n,t=+t;const e=r<n,u=e?y(r,n,t):y(n,r,t);return(e?-1:1)*(u<0?1/-u:u)}function H(n,r){r||(r=[]);var t=n?Math.min(r.length,n.length):0,e=r.slice(),u;return function(f){for(u=0;u<t;++u)e[u]=n[u]*(1-f)+r[u]*f;return e}}function J(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function K(n,r){var t=r?r.length:0,e=n?Math.min(t,n.length):0,u=new Array(e),f=new Array(t),a;for(a=0;a<e;++a)u[a]=N(n[a],r[a]);for(;a<t;++a)f[a]=r[a];return function(o){for(a=0;a<e;++a)f[a]=u[a](o);return f}}function L(n,r){var t=new Date;return n=+n,r=+r,function(e){return t.setTime(n*(1-e)+r*e),t}}function Q(n,r){var t={},e={},u;(n===null||typeof n!="object")&&(n={}),(r===null||typeof r!="object")&&(r={});for(u in r)u in n?t[u]=N(n[u],r[u]):e[u]=r[u];return function(f){for(u in t)e[u]=t[u](f);return e}}function N(n,r){var t=typeof r,e;return r==null||t==="boolean"?j(r):(t==="number"?p:t==="string"?(e=w(r))?(r=e,k):q:r instanceof w?k:r instanceof Date?L:J(r)?H:Array.isArray(r)?K:typeof r.valueOf!="function"&&typeof r.toString!="function"||isNaN(r)?Q:p)(n,r)}function U(n,r){return n=+n,r=+r,function(t){return Math.round(n*(1-t)+r*t)}}function W(n){return Math.max(0,-g(Math.abs(n)))}function X(n,r){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(g(r)/3)))*3-g(Math.abs(n)))}function Y(n,r){return n=Math.abs(n),r=Math.abs(r)-n,Math.max(0,g(r)-g(n))+1}function Z(n){return function(){return n}}function _(n){return+n}var A=[0,1];function m(n){return n}function d(n,r){return(r-=n=+n)?function(t){return(t-n)/r}:Z(isNaN(r)?NaN:.5)}function b(n,r){var t;return n>r&&(t=n,n=r,r=t),function(e){return Math.max(n,Math.min(r,e))}}function nn(n,r,t){var e=n[0],u=n[1],f=r[0],a=r[1];return u<e?(e=d(u,e),f=t(a,f)):(e=d(e,u),f=t(f,a)),function(o){return f(e(o))}}function rn(n,r,t){var e=Math.min(n.length,r.length)-1,u=new Array(e),f=new Array(e),a=-1;for(n[e]<n[0]&&(n=n.slice().reverse(),r=r.slice().reverse());++a<e;)u[a]=d(n[a],n[a+1]),f[a]=t(r[a],r[a+1]);return function(o){var c=x(n,o,1,e)-1;return f[c](u[c](o))}}function en(n,r){return r.domain(n.domain()).range(n.range()).interpolate(n.interpolate()).clamp(n.clamp()).unknown(n.unknown())}function tn(){var n=A,r=A,t=N,e,u,f,a=m,o,c,i;function h(){var s=Math.min(n.length,r.length);return a!==m&&(a=b(n[0],n[s-1])),o=s>2?rn:nn,c=i=null,l}function l(s){return s==null||isNaN(s=+s)?f:(c||(c=o(n.map(e),r,t)))(e(a(s)))}return l.invert=function(s){return a(u((i||(i=o(r,n.map(e),p)))(s)))},l.domain=function(s){return arguments.length?(n=Array.from(s,_),h()):n.slice()},l.range=function(s){return arguments.length?(r=Array.from(s),h()):r.slice()},l.rangeRound=function(s){return r=Array.from(s),t=U,h()},l.clamp=function(s){return arguments.length?(a=s?!0:m,h()):a!==m},l.interpolate=function(s){return arguments.length?(t=s,h()):t},l.unknown=function(s){return arguments.length?(f=s,l):f},function(s,S){return e=s,u=S,h()}}function un(){return tn()(m,m)}function an(n,r,t,e){var u=G(n,r,t),f;switch(e=F(e??",f"),e.type){case"s":{var a=Math.max(Math.abs(n),Math.abs(r));return e.precision==null&&!isNaN(f=X(u,a))&&(e.precision=f),z(e,a)}case"":case"e":case"g":case"p":case"r":{e.precision==null&&!isNaN(f=Y(u,Math.max(Math.abs(n),Math.abs(r))))&&(e.precision=f-(e.type==="e"));break}case"f":case"%":{e.precision==null&&!isNaN(f=W(u))&&(e.precision=f-(e.type==="%")*2);break}}return B(e)}function on(n){var r=n.domain;return n.ticks=function(t){var e=r();return E(e[0],e[e.length-1],t??10)},n.tickFormat=function(t,e){var u=r();return an(u[0],u[u.length-1],t??10,e)},n.nice=function(t){t==null&&(t=10);var e=r(),u=0,f=e.length-1,a=e[u],o=e[f],c,i,h=10;for(o<a&&(i=a,a=o,o=i,i=u,u=f,f=i);h-- >0;){if(i=y(a,o,t),i===c)return e[u]=a,e[f]=o,r(e);if(i>0)a=Math.floor(a/i)*i,o=Math.ceil(o/i)*i;else if(i<0)a=Math.ceil(a*i)/i,o=Math.floor(o*i)/i;else break;c=i}return n},n}function fn(){var n=un();return n.copy=function(){return en(n,fn())},D.apply(n,arguments),on(n)}export{en as a,R as b,un as c,fn as l,G as t};
@@ -1,129 +0,0 @@
1
- import{a as c,M as V,ah as Re,r as Pe,ad as E,k as Fe,aC as Me,N as Ce,G as Ke,a0 as Ye,a1 as We,aq as Ve,l as je,i as Ue,p as He,S as Xe,a3 as Oe,ar as Ge}from"./CSbiiZpm.js";import{g as qe}from"./hqSEunOk.js";import{c3 as q,g as L}from"./CxRm1vYn.js";var ce=(function(){var e=c(function(O,u,r,n){for(r=r||{},n=O.length;n--;r[O[n]]=u);return r},"o"),o=[1,15],l=[1,7],a=[1,13],h=[1,14],p=[1,19],s=[1,16],g=[1,17],x=[1,18],y=[8,30],b=[8,10,21,28,29,30,31,39,43,46],f=[1,23],m=[1,24],_=[8,10,15,16,21,28,29,30,31,39,43,46],S=[8,10,15,16,21,27,28,29,30,31,39,43,46],D=[1,49],w={trace:c(L(function(){},"trace"),"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:c(L(function(u,r,n,d,k,t,K){var i=t.length-1;switch(k){case 4:d.getLogger().debug("Rule: separator (NL) ");break;case 5:d.getLogger().debug("Rule: separator (Space) ");break;case 6:d.getLogger().debug("Rule: separator (EOF) ");break;case 7:d.getLogger().debug("Rule: hierarchy: ",t[i-1]),d.setHierarchy(t[i-1]);break;case 8:d.getLogger().debug("Stop NL ");break;case 9:d.getLogger().debug("Stop EOF ");break;case 10:d.getLogger().debug("Stop NL2 ");break;case 11:d.getLogger().debug("Stop EOF2 ");break;case 12:d.getLogger().debug("Rule: statement: ",t[i]),typeof t[i].length=="number"?this.$=t[i]:this.$=[t[i]];break;case 13:d.getLogger().debug("Rule: statement #2: ",t[i-1]),this.$=[t[i-1]].concat(t[i]);break;case 14:d.getLogger().debug("Rule: link: ",t[i],u),this.$={edgeTypeStr:t[i],label:""};break;case 15:d.getLogger().debug("Rule: LABEL link: ",t[i-3],t[i-1],t[i]),this.$={edgeTypeStr:t[i],label:t[i-1]};break;case 18:const F=parseInt(t[i]),U=d.generateId();this.$={id:U,type:"space",label:"",width:F,children:[]};break;case 23:d.getLogger().debug("Rule: (nodeStatement link node) ",t[i-2],t[i-1],t[i]," typestr: ",t[i-1].edgeTypeStr);const te=d.edgeStrToEdgeData(t[i-1].edgeTypeStr),H=d.edgeStrToEdgeStartData(t[i-1].edgeTypeStr),se=d.edgeStrToThickness(t[i-1].edgeTypeStr),N=d.edgeStrToPattern(t[i-1].edgeTypeStr);this.$=[{id:t[i-2].id,label:t[i-2].label,type:t[i-2].type,directions:t[i-2].directions},{id:t[i-2].id+"-"+t[i].id,start:t[i-2].id,end:t[i].id,label:t[i-1].label,type:"edge",thickness:se,pattern:N,directions:t[i].directions,arrowTypeEnd:te,arrowTypeStart:H},{id:t[i].id,label:t[i].label,type:d.typeStr2Type(t[i].typeStr),directions:t[i].directions}];break;case 24:d.getLogger().debug("Rule: nodeStatement (abc88 node size) ",t[i-1],t[i]),this.$={id:t[i-1].id,label:t[i-1].label,type:d.typeStr2Type(t[i-1].typeStr),directions:t[i-1].directions,widthInColumns:parseInt(t[i],10)};break;case 25:d.getLogger().debug("Rule: nodeStatement (node) ",t[i]),this.$={id:t[i].id,label:t[i].label,type:d.typeStr2Type(t[i].typeStr),directions:t[i].directions,widthInColumns:1};break;case 26:d.getLogger().debug("APA123",this?this:"na"),d.getLogger().debug("COLUMNS: ",t[i]),this.$={type:"column-setting",columns:t[i]==="auto"?-1:parseInt(t[i])};break;case 27:d.getLogger().debug("Rule: id-block statement : ",t[i-2],t[i-1]),d.generateId(),this.$={...t[i-2],type:"composite",children:t[i-1]};break;case 28:d.getLogger().debug("Rule: blockStatement : ",t[i-2],t[i-1],t[i]);const A=d.generateId();this.$={id:A,type:"composite",label:"",children:t[i-1]};break;case 29:d.getLogger().debug("Rule: node (NODE_ID separator): ",t[i]),this.$={id:t[i]};break;case 30:d.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",t[i-1],t[i]),this.$={id:t[i-1],label:t[i].label,typeStr:t[i].typeStr,directions:t[i].directions};break;case 31:d.getLogger().debug("Rule: dirList: ",t[i]),this.$=[t[i]];break;case 32:d.getLogger().debug("Rule: dirList: ",t[i-1],t[i]),this.$=[t[i-1]].concat(t[i]);break;case 33:d.getLogger().debug("Rule: nodeShapeNLabel: ",t[i-2],t[i-1],t[i]),this.$={typeStr:t[i-2]+t[i],label:t[i-1]};break;case 34:d.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",t[i-3],t[i-2]," #3:",t[i-1],t[i]),this.$={typeStr:t[i-3]+t[i],label:t[i-2],directions:t[i-1]};break;case 35:case 36:this.$={type:"classDef",id:t[i-1].trim(),css:t[i].trim()};break;case 37:this.$={type:"applyClass",id:t[i-1].trim(),styleClass:t[i].trim()};break;case 38:this.$={type:"applyStyles",id:t[i-1].trim(),stylesStr:t[i].trim()};break}},"anonymous"),"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:o,11:3,13:4,19:5,20:6,21:l,22:8,23:9,24:10,25:11,26:12,28:a,29:h,31:p,39:s,43:g,46:x},{8:[1,20]},e(y,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:o,21:l,28:a,29:h,31:p,39:s,43:g,46:x}),e(b,[2,16],{14:22,15:f,16:m}),e(b,[2,17]),e(b,[2,18]),e(b,[2,19]),e(b,[2,20]),e(b,[2,21]),e(b,[2,22]),e(_,[2,25],{27:[1,25]}),e(b,[2,26]),{19:26,26:12,31:p},{10:o,11:27,13:4,19:5,20:6,21:l,22:8,23:9,24:10,25:11,26:12,28:a,29:h,31:p,39:s,43:g,46:x},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(S,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(y,[2,13]),{26:35,31:p},{31:[2,14]},{17:[1,36]},e(_,[2,24]),{10:o,11:37,13:4,14:22,15:f,16:m,19:5,20:6,21:l,22:8,23:9,24:10,25:11,26:12,28:a,29:h,31:p,39:s,43:g,46:x},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(S,[2,30]),{18:[1,43]},{18:[1,44]},e(_,[2,23]),{18:[1,45]},{30:[1,46]},e(b,[2,28]),e(b,[2,35]),e(b,[2,36]),e(b,[2,37]),e(b,[2,38]),{36:[1,47]},{33:48,34:D},{15:[1,50]},e(b,[2,27]),e(S,[2,33]),{38:[1,51]},{33:52,34:D,38:[2,31]},{31:[2,15]},e(S,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:c(L(function(u,r){if(r.recoverable)this.trace(u);else{var n=new Error(u);throw n.hash=r,n}},"parseError"),"parseError"),parse:c(L(function(u){var r=this,n=[0],d=[],k=[null],t=[],K=this.table,i="",F=0,U=0,te=2,H=1,se=t.slice.call(arguments,1),N=Object.create(this.lexer),A={yy:{}};for(var re in this.yy)Object.prototype.hasOwnProperty.call(this.yy,re)&&(A.yy[re]=this.yy[re]);N.setInput(u,A.yy),A.yy.lexer=N,A.yy.parser=this,typeof N.yylloc>"u"&&(N.yylloc={});var ie=N.yylloc;t.push(ie);var Ae=N.options&&N.options.ranges;typeof A.yy.parseError=="function"?this.parseError=A.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function De(C){n.length=n.length-2*C,k.length=k.length-C,t.length=t.length-C}L(De,"popStack"),c(De,"popStack");function ne(){var C;return C=d.pop()||N.lex()||H,typeof C!="number"&&(C instanceof Array&&(d=C,C=d.pop()),C=r.symbols_[C]||C),C}L(ne,"lex"),c(ne,"lex");for(var I,P,z,ae,M={},X,R,Ne,G;;){if(P=n[n.length-1],this.defaultActions[P]?z=this.defaultActions[P]:((I===null||typeof I>"u")&&(I=ne()),z=K[P]&&K[P][I]),typeof z>"u"||!z.length||!z[0]){var oe="";G=[];for(X in K[P])this.terminals_[X]&&X>te&&G.push("'"+this.terminals_[X]+"'");N.showPosition?oe="Parse error on line "+(F+1)+`:
2
- `+N.showPosition()+`
3
- Expecting `+G.join(", ")+", got '"+(this.terminals_[I]||I)+"'":oe="Parse error on line "+(F+1)+": Unexpected "+(I==H?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError(oe,{text:N.match,token:this.terminals_[I]||I,line:N.yylineno,loc:ie,expected:G})}if(z[0]instanceof Array&&z.length>1)throw new Error("Parse Error: multiple actions possible at state: "+P+", token: "+I);switch(z[0]){case 1:n.push(I),k.push(N.yytext),t.push(N.yylloc),n.push(z[1]),I=null,U=N.yyleng,i=N.yytext,F=N.yylineno,ie=N.yylloc;break;case 2:if(R=this.productions_[z[1]][1],M.$=k[k.length-R],M._$={first_line:t[t.length-(R||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(R||1)].first_column,last_column:t[t.length-1].last_column},Ae&&(M._$.range=[t[t.length-(R||1)].range[0],t[t.length-1].range[1]]),ae=this.performAction.apply(M,[i,U,F,A.yy,z[1],k,t].concat(se)),typeof ae<"u")return ae;R&&(n=n.slice(0,-1*R*2),k=k.slice(0,-1*R),t=t.slice(0,-1*R)),n.push(this.productions_[z[1]][0]),k.push(M.$),t.push(M._$),Ne=K[n[n.length-2]][n[n.length-1]],n.push(Ne);break;case 3:return!0}}return!0},"parse"),"parse")},T=(function(){var O={EOF:1,parseError:c(L(function(r,n){if(this.yy.parser)this.yy.parser.parseError(r,n);else throw new Error(r)},"parseError"),"parseError"),setInput:c(function(u,r){return this.yy=r||this.yy||{},this._input=u,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:c(function(){var u=this._input[0];this.yytext+=u,this.yyleng++,this.offset++,this.match+=u,this.matched+=u;var r=u.match(/(?:\r\n?|\n).*/g);return r?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),u},"input"),unput:c(function(u){var r=u.length,n=u.split(/(?:\r\n?|\n)/g);this._input=u+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-r),this.offset-=r;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var k=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===d.length?this.yylloc.first_column:0)+d[d.length-n.length].length-n[0].length:this.yylloc.first_column-r},this.options.ranges&&(this.yylloc.range=[k[0],k[0]+this.yyleng-r]),this.yyleng=this.yytext.length,this},"unput"),more:c(function(){return this._more=!0,this},"more"),reject:c(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
- `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:c(function(u){this.unput(this.match.slice(u))},"less"),pastInput:c(function(){var u=this.matched.substr(0,this.matched.length-this.match.length);return(u.length>20?"...":"")+u.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:c(function(){var u=this.match;return u.length<20&&(u+=this._input.substr(0,20-u.length)),(u.substr(0,20)+(u.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:c(function(){var u=this.pastInput(),r=new Array(u.length+1).join("-");return u+this.upcomingInput()+`
5
- `+r+"^"},"showPosition"),test_match:c(function(u,r){var n,d,k;if(this.options.backtrack_lexer&&(k={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(k.yylloc.range=this.yylloc.range.slice(0))),d=u[0].match(/(?:\r\n?|\n).*/g),d&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+u[0].length},this.yytext+=u[0],this.match+=u[0],this.matches=u,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(u[0].length),this.matched+=u[0],n=this.performAction.call(this,this.yy,this,r,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var t in k)this[t]=k[t];return!1}return!1},"test_match"),next:c(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var u,r,n,d;this._more||(this.yytext="",this.match="");for(var k=this._currentRules(),t=0;t<k.length;t++)if(n=this._input.match(this.rules[k[t]]),n&&(!r||n[0].length>r[0].length)){if(r=n,d=t,this.options.backtrack_lexer){if(u=this.test_match(n,k[t]),u!==!1)return u;if(this._backtrack){r=!1;continue}else return!1}else if(!this.options.flex)break}return r?(u=this.test_match(r,k[d]),u!==!1?u:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:c(L(function(){var r=this.next();return r||this.lex()},"lex"),"lex"),begin:c(L(function(r){this.conditionStack.push(r)},"begin"),"begin"),popState:c(L(function(){var r=this.conditionStack.length-1;return r>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),"popState"),_currentRules:c(L(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),"_currentRules"),topState:c(L(function(r){return r=this.conditionStack.length-1-Math.abs(r||0),r>=0?this.conditionStack[r]:"INITIAL"},"topState"),"topState"),pushState:c(L(function(r){this.begin(r)},"pushState"),"pushState"),stateStackSize:c(L(function(){return this.conditionStack.length},"stateStackSize"),"stateStackSize"),options:{},performAction:c(L(function(r,n,d,k){switch(d){case 0:return r.getLogger().debug("Found block-beta"),10;case 1:return r.getLogger().debug("Found id-block"),29;case 2:return r.getLogger().debug("Found block"),10;case 3:r.getLogger().debug(".",n.yytext);break;case 4:r.getLogger().debug("_",n.yytext);break;case 5:return 5;case 6:return n.yytext=-1,28;case 7:return n.yytext=n.yytext.replace(/columns\s+/,""),r.getLogger().debug("COLUMNS (LEX)",n.yytext),28;case 8:this.pushState("md_string");break;case 9:return"MD_STR";case 10:this.popState();break;case 11:this.pushState("string");break;case 12:r.getLogger().debug("LEX: POPPING STR:",n.yytext),this.popState();break;case 13:return r.getLogger().debug("LEX: STR end:",n.yytext),"STR";case 14:return n.yytext=n.yytext.replace(/space\:/,""),r.getLogger().debug("SPACE NUM (LEX)",n.yytext),21;case 15:return n.yytext="1",r.getLogger().debug("COLUMNS (LEX)",n.yytext),21;case 16:return 42;case 17:return"LINKSTYLE";case 18:return"INTERPOLATE";case 19:return this.pushState("CLASSDEF"),39;case 20:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 21:return this.popState(),this.pushState("CLASSDEFID"),40;case 22:return this.popState(),41;case 23:return this.pushState("CLASS"),43;case 24:return this.popState(),this.pushState("CLASS_STYLE"),44;case 25:return this.popState(),45;case 26:return this.pushState("STYLE_STMNT"),46;case 27:return this.popState(),this.pushState("STYLE_DEFINITION"),47;case 28:return this.popState(),48;case 29:return this.pushState("acc_title"),"acc_title";case 30:return this.popState(),"acc_title_value";case 31:return this.pushState("acc_descr"),"acc_descr";case 32:return this.popState(),"acc_descr_value";case 33:this.pushState("acc_descr_multiline");break;case 34:this.popState();break;case 35:return"acc_descr_multiline_value";case 36:return 30;case 37:return this.popState(),r.getLogger().debug("Lex: (("),"NODE_DEND";case 38:return this.popState(),r.getLogger().debug("Lex: (("),"NODE_DEND";case 39:return this.popState(),r.getLogger().debug("Lex: ))"),"NODE_DEND";case 40:return this.popState(),r.getLogger().debug("Lex: (("),"NODE_DEND";case 41:return this.popState(),r.getLogger().debug("Lex: (("),"NODE_DEND";case 42:return this.popState(),r.getLogger().debug("Lex: (-"),"NODE_DEND";case 43:return this.popState(),r.getLogger().debug("Lex: -)"),"NODE_DEND";case 44:return this.popState(),r.getLogger().debug("Lex: (("),"NODE_DEND";case 45:return this.popState(),r.getLogger().debug("Lex: ]]"),"NODE_DEND";case 46:return this.popState(),r.getLogger().debug("Lex: ("),"NODE_DEND";case 47:return this.popState(),r.getLogger().debug("Lex: ])"),"NODE_DEND";case 48:return this.popState(),r.getLogger().debug("Lex: /]"),"NODE_DEND";case 49:return this.popState(),r.getLogger().debug("Lex: /]"),"NODE_DEND";case 50:return this.popState(),r.getLogger().debug("Lex: )]"),"NODE_DEND";case 51:return this.popState(),r.getLogger().debug("Lex: )"),"NODE_DEND";case 52:return this.popState(),r.getLogger().debug("Lex: ]>"),"NODE_DEND";case 53:return this.popState(),r.getLogger().debug("Lex: ]"),"NODE_DEND";case 54:return r.getLogger().debug("Lexa: -)"),this.pushState("NODE"),35;case 55:return r.getLogger().debug("Lexa: (-"),this.pushState("NODE"),35;case 56:return r.getLogger().debug("Lexa: ))"),this.pushState("NODE"),35;case 57:return r.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 58:return r.getLogger().debug("Lex: ((("),this.pushState("NODE"),35;case 59:return r.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 60:return r.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 61:return r.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 62:return r.getLogger().debug("Lexc: >"),this.pushState("NODE"),35;case 63:return r.getLogger().debug("Lexa: (["),this.pushState("NODE"),35;case 64:return r.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 65:return this.pushState("NODE"),35;case 66:return this.pushState("NODE"),35;case 67:return this.pushState("NODE"),35;case 68:return this.pushState("NODE"),35;case 69:return this.pushState("NODE"),35;case 70:return this.pushState("NODE"),35;case 71:return this.pushState("NODE"),35;case 72:return r.getLogger().debug("Lexa: ["),this.pushState("NODE"),35;case 73:return this.pushState("BLOCK_ARROW"),r.getLogger().debug("LEX ARR START"),37;case 74:return r.getLogger().debug("Lex: NODE_ID",n.yytext),31;case 75:return r.getLogger().debug("Lex: EOF",n.yytext),8;case 76:this.pushState("md_string");break;case 77:this.pushState("md_string");break;case 78:return"NODE_DESCR";case 79:this.popState();break;case 80:r.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 81:r.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 82:return r.getLogger().debug("LEX: NODE_DESCR:",n.yytext),"NODE_DESCR";case 83:r.getLogger().debug("LEX POPPING"),this.popState();break;case 84:r.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 85:return n.yytext=n.yytext.replace(/^,\s*/,""),r.getLogger().debug("Lex (right): dir:",n.yytext),"DIR";case 86:return n.yytext=n.yytext.replace(/^,\s*/,""),r.getLogger().debug("Lex (left):",n.yytext),"DIR";case 87:return n.yytext=n.yytext.replace(/^,\s*/,""),r.getLogger().debug("Lex (x):",n.yytext),"DIR";case 88:return n.yytext=n.yytext.replace(/^,\s*/,""),r.getLogger().debug("Lex (y):",n.yytext),"DIR";case 89:return n.yytext=n.yytext.replace(/^,\s*/,""),r.getLogger().debug("Lex (up):",n.yytext),"DIR";case 90:return n.yytext=n.yytext.replace(/^,\s*/,""),r.getLogger().debug("Lex (down):",n.yytext),"DIR";case 91:return n.yytext="]>",r.getLogger().debug("Lex (ARROW_DIR end):",n.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 92:return r.getLogger().debug("Lex: LINK","#"+n.yytext+"#"),15;case 93:return r.getLogger().debug("Lex: LINK",n.yytext),15;case 94:return r.getLogger().debug("Lex: LINK",n.yytext),15;case 95:return r.getLogger().debug("Lex: LINK",n.yytext),15;case 96:return r.getLogger().debug("Lex: START_LINK",n.yytext),this.pushState("LLABEL"),16;case 97:return r.getLogger().debug("Lex: START_LINK",n.yytext),this.pushState("LLABEL"),16;case 98:return r.getLogger().debug("Lex: START_LINK",n.yytext),this.pushState("LLABEL"),16;case 99:this.pushState("md_string");break;case 100:return r.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 101:return this.popState(),r.getLogger().debug("Lex: LINK","#"+n.yytext+"#"),15;case 102:return this.popState(),r.getLogger().debug("Lex: LINK",n.yytext),15;case 103:return this.popState(),r.getLogger().debug("Lex: LINK",n.yytext),15;case 104:return r.getLogger().debug("Lex: COLON",n.yytext),n.yytext=n.yytext.slice(1),27}},"anonymous"),"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block:)/,/^(?:block\b)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:=]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[28],inclusive:!1},STYLE_STMNT:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[22],inclusive:!1},CLASSDEF:{rules:[20,21],inclusive:!1},CLASS_STYLE:{rules:[25],inclusive:!1},CLASS:{rules:[24],inclusive:!1},LLABEL:{rules:[99,100,101,102,103],inclusive:!1},ARROW_DIR:{rules:[85,86,87,88,89,90,91],inclusive:!1},BLOCK_ARROW:{rules:[76,81,84],inclusive:!1},NODE:{rules:[37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,77,80],inclusive:!1},md_string:{rules:[9,10,78,79],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[12,13,82,83],inclusive:!1},acc_descr_multiline:{rules:[34,35],inclusive:!1},acc_descr:{rules:[32],inclusive:!1},acc_title:{rules:[30],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,11,14,15,16,17,18,19,23,26,29,31,33,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,92,93,94,95,96,97,98,104],inclusive:!0}}};return O})();w.lexer=T;function v(){this.yy={}}return L(v,"Parser"),c(v,"Parser"),v.prototype=w,w.Parser=v,new v})();ce.parser=ce;var Je=ce,B=new Map,ue=[],he=new Map,Te="color",Ie="fill",Ze="bgFill",ze=",",J=new Map,ge="",Qe=c(e=>He.sanitizeText(e,Ce()),"sanitizeText"),$e=c(function(e,o=""){let l=J.get(e);l||(l={id:e,styles:[],textStyles:[]},J.set(e,l)),o?.split(ze).forEach(a=>{const h=a.replace(/([^;]*);/,"$1").trim();if(RegExp(Te).exec(a)){const s=h.replace(Ie,Ze).replace(Te,Ie);l.textStyles.push(s)}l.styles.push(h)})},"addStyleClass"),et=c(function(e,o=""){const l=B.get(e);o!=null&&(l.styles=o.split(ze))},"addStyle2Node"),tt=c(function(e,o){e.split(",").forEach(function(l){let a=B.get(l);if(a===void 0){const h=l.trim();a={id:h,type:"na",children:[]},B.set(h,a)}a.classes||(a.classes=[]),a.classes.push(o)})},"setCssClass"),Be=c((e,o)=>{const l=e.flat(),a=[],p=l.find(s=>s?.type==="column-setting")?.columns??-1;for(const s of l){if(typeof p=="number"&&p>0&&s.type!=="column-setting"&&typeof s.widthInColumns=="number"&&s.widthInColumns>p&&E.warn(`Block ${s.id} width ${s.widthInColumns} exceeds configured column width ${p}`),s.label&&(s.label=Qe(s.label)),s.type==="classDef"){$e(s.id,s.css);continue}if(s.type==="applyClass"){tt(s.id,s?.styleClass??"");continue}if(s.type==="applyStyles"){s?.stylesStr&&et(s.id,s?.stylesStr);continue}if(s.type==="column-setting")o.columns=s.columns??-1;else if(s.type==="edge"){const g=(he.get(s.id)??0)+1;he.set(s.id,g),s.id=g+"-"+s.id,ue.push(s)}else{s.label||(s.type==="composite"?s.label="":s.label=s.id);const g=B.get(s.id);if(g===void 0?B.set(s.id,s):(s.type!=="na"&&(g.type=s.type),s.label!==s.id&&(g.label=s.label)),s.children&&Be(s.children,s),s.type==="space"){const x=s.width??1;for(let y=0;y<x;y++){const b=je(s);b.id=b.id+"-"+y,B.set(b.id,b),a.push(b)}}else g===void 0&&a.push(s)}}o.children=a},"populateBlockDatabase"),de=[],Y={id:"root",type:"composite",children:[],columns:-1},st=c(()=>{E.debug("Clear called"),Fe(),Y={id:"root",type:"composite",children:[],columns:-1},B=new Map([["root",Y]]),de=[],J=new Map,ue=[],he=new Map,ge=""},"clear");function pe(e){switch(E.debug("typeStr2Type",e),e){case"[]":return"square";case"()":return E.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}L(pe,"typeStr2Type");c(pe,"typeStr2Type");function fe(e){switch(E.debug("typeStr2Type",e),e){case"==":return"thick";default:return"normal"}}L(fe,"edgeTypeStr2Type");c(fe,"edgeTypeStr2Type");function Se(e){switch(e.trim().slice(-1)){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return""}}L(Se,"edgeStrToEdgeData");c(Se,"edgeStrToEdgeData");function be(e){switch(e.trim().charAt(0)){case"x":return"arrow_cross";case"o":return"arrow_circle";case"<":return"arrow_point";default:return"arrow_open"}}L(be,"edgeStrToEdgeStartData");c(be,"edgeStrToEdgeStartData");function xe(e){return e.includes("==")?"thick":"normal"}L(xe,"edgeStrToThickness");c(xe,"edgeStrToThickness");function Le(e){return e.includes(".-")?"dotted":"solid"}L(Le,"edgeStrToPattern");c(Le,"edgeStrToPattern");var ve=0,rt=c(()=>(ve++,"id-"+Math.random().toString(36).substr(2,12)+"-"+ve),"generateId"),it=c(e=>{Y.children=e,Be(e,Y),de=Y.children},"setHierarchy"),nt=c(e=>{const o=B.get(e);return o?o.columns?o.columns:o.children?o.children.length:-1:-1},"getColumns"),at=c(()=>[...B.values()],"getBlocksFlat"),ot=c(()=>de||[],"getBlocks"),lt=c(()=>ue,"getEdges"),ct=c(e=>B.get(e),"getBlock"),ht=c(e=>{B.set(e.id,e)},"setBlock"),ut=c(e=>{ge=e},"setDiagramId"),gt=c(()=>ge,"getDiagramId"),dt=c(()=>E,"getLogger"),pt=c(function(){return J},"getClasses"),ft={getConfig:c(()=>V().block,"getConfig"),typeStr2Type:pe,edgeTypeStr2Type:fe,edgeStrToEdgeData:Se,edgeStrToEdgeStartData:be,edgeStrToThickness:xe,edgeStrToPattern:Le,getLogger:dt,getBlocksFlat:at,getBlocks:ot,getEdges:lt,setHierarchy:it,getBlock:ct,setBlock:ht,getColumns:nt,getClasses:pt,clear:st,generateId:rt,setDiagramId:ut,getDiagramId:gt},St=ft,le=c((e,o)=>{const l=Ue,a=l(e,"r"),h=l(e,"g"),p=l(e,"b");return Me(a,h,p,o)},"fade"),bt=c(e=>`.label {
7
- font-family: ${e.fontFamily};
8
- color: ${e.nodeTextColor||e.textColor};
9
- }
10
- .cluster-label text {
11
- fill: ${e.titleColor};
12
- }
13
- .cluster-label span {
14
- color: ${e.titleColor};
15
- }
16
-
17
-
18
-
19
- .label text,span {
20
- fill: ${e.nodeTextColor||e.textColor};
21
- color: ${e.nodeTextColor||e.textColor};
22
- }
23
-
24
- .node rect,
25
- .node circle,
26
- .node ellipse,
27
- .node polygon,
28
- .node path {
29
- fill: ${e.mainBkg};
30
- stroke: ${e.nodeBorder};
31
- stroke-width: 1px;
32
- }
33
- .flowchart-label text {
34
- text-anchor: middle;
35
- }
36
- // .flowchart-label .text-outer-tspan {
37
- // text-anchor: middle;
38
- // }
39
- // .flowchart-label .text-inner-tspan {
40
- // text-anchor: start;
41
- // }
42
-
43
- .node .label {
44
- text-align: center;
45
- }
46
- .node.clickable {
47
- cursor: pointer;
48
- }
49
-
50
- .arrowheadPath {
51
- fill: ${e.arrowheadColor};
52
- }
53
-
54
- .edgePath .path {
55
- stroke: ${e.lineColor};
56
- stroke-width: 2.0px;
57
- }
58
-
59
- .flowchart-link {
60
- stroke: ${e.lineColor};
61
- fill: none;
62
- }
63
-
64
- .edgeLabel {
65
- background-color: ${e.edgeLabelBackground};
66
- /*
67
- * This is for backward compatibility with existing code that didn't
68
- * add a \`<p>\` around edge labels.
69
- *
70
- * TODO: We should probably remove this in a future release.
71
- */
72
- p {
73
- margin: 0;
74
- padding: 0;
75
- display: inline;
76
- }
77
- rect {
78
- opacity: 0.5;
79
- background-color: ${e.edgeLabelBackground};
80
- fill: ${e.edgeLabelBackground};
81
- }
82
- text-align: center;
83
- }
84
-
85
- /* For html labels only */
86
- .labelBkg {
87
- background-color: ${e.edgeLabelBackground};
88
- }
89
-
90
- .node .cluster {
91
- // fill: ${le(e.mainBkg,.5)};
92
- fill: ${le(e.clusterBkg,.5)};
93
- stroke: ${le(e.clusterBorder,.2)};
94
- box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
95
- stroke-width: 1px;
96
- }
97
-
98
- .cluster text {
99
- fill: ${e.titleColor};
100
- }
101
-
102
- .cluster span {
103
- color: ${e.titleColor};
104
- }
105
- /* .cluster div {
106
- color: ${e.titleColor};
107
- } */
108
-
109
- div.mermaidTooltip {
110
- position: absolute;
111
- text-align: center;
112
- max-width: 200px;
113
- padding: 2px;
114
- font-family: ${e.fontFamily};
115
- font-size: 12px;
116
- background: ${e.tertiaryColor};
117
- border: 1px solid ${e.border2};
118
- border-radius: 2px;
119
- pointer-events: none;
120
- z-index: 100;
121
- }
122
-
123
- .flowchartTitleText {
124
- text-anchor: middle;
125
- font-size: 18px;
126
- fill: ${e.textColor};
127
- }
128
- ${qe()}
129
- `,"getStyles"),xt=bt;function Z(e,o){if(e===0||!Number.isInteger(e))throw new Error("Columns must be an integer !== 0.");if(o<0||!Number.isInteger(o))throw new Error("Position must be a non-negative integer."+o);if(e<0)return{px:o,py:0};if(e===1)return{px:0,py:o};const l=o%e,a=Math.floor(o/e);return{px:l,py:a}}L(Z,"calculateBlockPosition");c(Z,"calculateBlockPosition");var Lt=c(e=>{let o=0,l=0;for(const a of e.children){const{width:h,height:p,x:s,y:g}=a.size??{width:0,height:0,x:0,y:0};if(E.debug("getMaxChildSize abc95 child:",a.id,"width:",h,"height:",p,"x:",s,"y:",g,a.type),a.type==="space")continue;const x=h/(a.widthInColumns??1);x>o&&(o=x),p>l&&(l=p)}return{width:o,height:l}},"getMaxChildSize");function W(e,o,l=0,a=0,h=8){E.debug("setBlockSizes abc95 (start)",e.id,e?.size?.x,"block width =",e?.size,"siblingWidth",l),e?.size?.width||(e.size={width:l,height:a,x:0,y:0});let p=0,s=0;if(e.children?.length>0){for(const S of e.children)W(S,o,0,0,h);const g=Lt(e);p=g.width,s=g.height,E.debug("setBlockSizes abc95 maxWidth of",e.id,":s children is ",p,s);for(const S of e.children)S.size&&(E.debug(`abc95 Setting size of children of ${e.id} id=${S.id} ${p} ${s} ${JSON.stringify(S.size)}`),S.size.width=p*(S.widthInColumns??1)+h*((S.widthInColumns??1)-1),S.size.height=s,S.size.x=0,S.size.y=0,E.debug(`abc95 updating size of ${e.id} children child:${S.id} maxWidth:${p} maxHeight:${s}`));for(const S of e.children)W(S,o,p,s,h);const x=e.columns??-1;let y=0;for(const S of e.children)y+=S.widthInColumns??1;let b=e.children.length;x>0&&x<y&&(b=x);const f=Math.ceil(y/b);let m=b*(p+h)+h,_=f*(s+h)+h;if(m<l){E.debug(`Detected to small sibling: abc95 ${e.id} siblingWidth ${l} siblingHeight ${a} width ${m}`),m=l,_=a;const S=(l-b*h-h)/b,D=(a-f*h-h)/f;E.debug("Size indata abc88",e.id,"childWidth",S,"maxWidth",p),E.debug("Size indata abc88",e.id,"childHeight",D,"maxHeight",s),E.debug("Size indata abc88 xSize",b,"padding",h);for(const w of e.children)w.size&&(w.size.width=S,w.size.height=D,w.size.x=0,w.size.y=0)}if(E.debug(`abc95 (finale calc) ${e.id} xSize ${b} ySize ${f} columns ${x}${e.children.length} width=${Math.max(m,e.size?.width||0)}`),m<(e?.size?.width||0)){m=e?.size?.width||0;const S=x>0?Math.min(e.children.length,x):e.children.length;if(S>0){const D=(m-S*h-h)/S;E.debug("abc95 (growing to fit) width",e.id,m,e.size?.width,D);for(const w of e.children)w.size&&(w.size.width=D)}}e.size={width:m,height:_,x:0,y:0}}E.debug("setBlockSizes abc94 (done)",e.id,e?.size?.x,e?.size?.width,e?.size?.y,e?.size?.height)}L(W,"setBlockSizes");c(W,"setBlockSizes");function Q(e,o,l=8){E.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`);const a=e.columns??-1;if(E.debug("layoutBlocks columns abc95",e.id,"=>",a,e),e.children&&e.children.length>0){const h=e?.children[0]?.size?.width??0,p=e.children.length*h+(e.children.length-1)*l;E.debug("widthOfChildren 88",p,"posX");const s=new Map;{let f=0;for(const m of e.children){if(!m.size)continue;const{py:_}=Z(a,f),S=s.get(_)??0;m.size.height>S&&s.set(_,m.size.height);let D=m?.widthInColumns??1;a>0&&(D=Math.min(D,a-f%a)),f+=D}}const g=new Map;{let f=0;const m=[...s.keys()].sort((_,S)=>_-S);for(const _ of m)g.set(_,f),f+=(s.get(_)??0)+l}let x=0;E.debug("abc91 block?.size?.x",e.id,e?.size?.x);let y=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-l,b=0;for(const f of e.children){const m=e;if(!f.size)continue;const{width:_,height:S}=f.size,{px:D,py:w}=Z(a,x);if(w!=b&&(b=w,y=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-l,E.debug("New row in layout for block",e.id," and child ",f.id,b)),E.debug(`abc89 layout blocks (child) id: ${f.id} Pos: ${x} (px, py) ${D},${w} (${m?.size?.x},${m?.size?.y}) parent: ${m.id} width: ${_}${l}`),m.size){const v=_/2;f.size.x=y+l+v,E.debug(`abc91 layout blocks (calc) px, pyid:${f.id} startingPos=X${y} new startingPosX${f.size.x} ${v} padding=${l} width=${_} halfWidth=${v} => x:${f.size.x} y:${f.size.y} ${f.widthInColumns} (width * (child?.w || 1)) / 2 ${_*(f?.widthInColumns??1)/2}`),y=f.size.x+v;const O=g.get(w)??0,u=s.get(w)??S;f.size.y=m.size.y-m.size.height/2+O+u/2+l,E.debug(`abc88 layout blocks (calc) px, pyid:${f.id}startingPosX${y}${l}${v}=>x:${f.size.x}y:${f.size.y}${f.widthInColumns}(width * (child?.w || 1)) / 2${_*(f?.widthInColumns??1)/2}`)}f.children&&Q(f,o,l);let T=f?.widthInColumns??1;a>0&&(T=Math.min(T,a-x%a)),x+=T,E.debug("abc88 columnsPos",f,x)}}E.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`)}L(Q,"layoutBlocks");c(Q,"layoutBlocks");function $(e,{minX:o,minY:l,maxX:a,maxY:h}={minX:0,minY:0,maxX:0,maxY:0}){if(e.size&&e.id!=="root"){const{x:p,y:s,width:g,height:x}=e.size;p-g/2<o&&(o=p-g/2),s-x/2<l&&(l=s-x/2),p+g/2>a&&(a=p+g/2),s+x/2>h&&(h=s+x/2)}if(e.children)for(const p of e.children)({minX:o,minY:l,maxX:a,maxY:h}=$(p,{minX:o,minY:l,maxX:a,maxY:h}));return{minX:o,minY:l,maxX:a,maxY:h}}L($,"findBounds");c($,"findBounds");function me(e){const o=e.getBlock("root");if(!o)return;const l=Ce()?.block?.padding??8;W(o,e,0,0,l),Q(o,e,l),E.debug("getBlocks",JSON.stringify(o,null,2));const{minX:a,minY:h,maxX:p,maxY:s}=$(o),g=s-h,x=p-a;return{x:a,y:h,width:x,height:g}}L(me,"layout");c(me,"layout");function ee(e,o,l=!1){const a=e;let h="default";(a?.classes?.length||0)>0&&(h=(a?.classes??[]).join(" ")),h=h+" flowchart-label";const p=(a?.classes??[]).flatMap(S=>o.getClasses().get(S)?.styles??[]);let s=0,g="rect",x;switch(a.type){case"round":s=5,g="rect";break;case"composite":s=0,g="composite",x=0;break;case"square":g="rect";break;case"diamond":g="question";break;case"hexagon":g="hexagon";break;case"block_arrow":g="block_arrow";break;case"odd":g="rect_left_inv_arrow";break;case"lean_right":g="lean_right";break;case"lean_left":g="lean_left";break;case"trapezoid":g="trapezoid";break;case"inv_trapezoid":g="inv_trapezoid";break;case"rect_left_inv_arrow":g="rect_left_inv_arrow";break;case"circle":g="circle";break;case"ellipse":g="ellipse";break;case"stadium":g="stadium";break;case"subroutine":g="subroutine";break;case"cylinder":g="cylinder";break;case"group":g="rect";break;case"doublecircle":g="doublecircle";break;default:g="rect"}const y=Xe(a?.styles??[]),b=a.label,f=a.size??{width:0,height:0,x:0,y:0},m=o.getDiagramId();return{labelStyle:y.labelStyle,shape:g,label:b,labelText:b,rx:s,ry:s,class:h,cssClasses:h,cssStyles:a?.styles??[],cssCompiledStyles:p,style:y.style,id:a.id,domId:m?`${m}-${a.id}`:a.id,isGroup:!1,directions:a.directions,width:f.width||void 0,height:f.height||void 0,wrappingWidth:f.width||Number.POSITIVE_INFINITY,x:f.x,y:f.y,positioned:l,intersect:void 0,padding:x??V()?.block?.padding??0,widthInColumns:a.widthInColumns??1}}L(ee,"getNodeFromBlock");c(ee,"getNodeFromBlock");async function ye(e,o,l){const a=ee(o,l,!1);if(o.type==="group")return;const h=V(),p=await Oe(e,a,{config:h}),s=p.node()?.getBBox()??{width:0,height:0},g=l.getBlock(a.id);g.size={width:s.width,height:s.height,x:0,y:0,node:p},l.setBlock(g),p.remove()}L(ye,"calculateBlockSize");c(ye,"calculateBlockSize");async function Ee(e,o,l){const a=ee(o,l,!0);if(l.getBlock(a.id).type!=="space"){const p=V();await Oe(e,a,{config:p}),o.intersect=a?.intersect,Ge(a)}}L(Ee,"insertBlockPositioned");c(Ee,"insertBlockPositioned");async function j(e,o,l,a){for(const h of o)await a(e,h,l),h.children&&await j(e,h.children,l,a)}L(j,"performOperations");c(j,"performOperations");async function _e(e,o,l){await j(e,o,l,ye)}L(_e,"calculateBlockSizes");c(_e,"calculateBlockSizes");async function ke(e,o,l){await j(e,o,l,Ee)}L(ke,"insertBlocks");c(ke,"insertBlocks");async function we(e,o,l,a,h){const p=new Ke({multigraph:!0,compound:!0});p.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(const s of l)s.size&&p.setNode(s.id,{width:s.size.width,height:s.size.height,intersect:s.intersect});for(const s of o)if(s.start&&s.end){const g=a.getBlock(s.start),x=a.getBlock(s.end);if(g?.size&&x?.size){const y=g.size,b=x.size,f=[{x:y.x,y:y.y},{x:y.x+(b.x-y.x)/2,y:y.y+(b.y-y.y)/2},{x:b.x,y:b.y}],m=h?`${h}-${s.id}`:s.id,_=s.thickness==="thick"?"edge-thickness-thick":"edge-thickness-normal",S=s.pattern==="dotted"?"edge-pattern-dotted":"edge-pattern-solid",D=`${_} ${S} flowchart-link LS-a1 LE-b1`;Ye(e,{...s,id:m,arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:f,classes:D},{},"block",p.node(s.start),p.node(s.end),h),s.label&&(await We(e,{...s,label:s.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:f,classes:D}),Ve({...s,x:f[1].x,y:f[1].y},{originalPath:f}))}}}L(we,"insertEdges");c(we,"insertEdges");var mt=c(function(e,o){return o.db.getClasses()},"getClasses"),yt=c(async function(e,o,l,a){const{securityLevel:h,block:p}=V(),s=a.db;s.setDiagramId(o);let g;h==="sandbox"&&(g=q("#i"+o));const x=h==="sandbox"?q(g.nodes()[0].contentDocument.body):q("body"),y=h==="sandbox"?x.select(`[id="${o}"]`):q(`[id="${o}"]`);Re(y,["point","circle","cross"],a.type,o);const f=s.getBlocks(),m=s.getBlocksFlat(),_=s.getEdges(),S=y.insert("g").attr("class","block");await _e(S,f,s);const D=me(s);await ke(S,f,s),await we(S,_,m,s,o);const w=S.node()?.getBBox(),T=w&&Number.isFinite(w.width)&&Number.isFinite(w.height)?w:D;if(T){const v=Math.max(1,Math.round(.125*(T.width/T.height))),O=T.height+v+10,u=T.width+10,{useMaxWidth:r}=p;Pe(y,O,u,!!r),E.debug("Here Bounds",D,T),y.attr("viewBox",`${T.x-5} ${T.y-5} ${T.width+10} ${T.height+10}`)}},"draw"),Et={draw:yt,getClasses:mt},Dt={parser:Je,db:St,renderer:Et,styles:xt};export{Dt as diagram};