@sme.up/ketchup2 2.0.0-alpha.2 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (398) hide show
  1. package/dist/arc-CqG9Hxdf.cjs +1 -0
  2. package/dist/arc-Klgb378K.js +80 -0
  3. package/dist/architecture-YZFGNWBL-BRqToLcm.js +3 -0
  4. package/dist/architecture-YZFGNWBL-BTOWQWD9.cjs +1 -0
  5. package/dist/architectureDiagram-Q4EWVU46-JSjagcXX.cjs +36 -0
  6. package/dist/architectureDiagram-Q4EWVU46-u2vgZv3N.js +4057 -0
  7. package/dist/array-D8NZ46Ht.js +6 -0
  8. package/dist/array-Dxz0O8Q3.cjs +1 -0
  9. package/dist/assets/imageListAssets.d.ts +3 -1
  10. package/dist/assets/imageListAssets.d.ts.map +1 -1
  11. package/dist/assets/svg/chevron_down.svg +1 -0
  12. package/dist/assets/svg/error_outline.svg +1 -0
  13. package/dist/assets/svg/warning_outline.svg +1 -0
  14. package/dist/basic-components/autocomplete/autocomplete.d.ts.map +1 -1
  15. package/dist/basic-components/image-cell/image-cell.d.ts.map +1 -1
  16. package/dist/basic-components/list/list-types.d.ts +0 -1
  17. package/dist/basic-components/list/list-types.d.ts.map +1 -1
  18. package/dist/basic-components/list/list.d.ts.map +1 -1
  19. package/dist/basic-components/notification/notification.assets.d.ts.map +1 -1
  20. package/dist/basic-components/select/select.d.ts.map +1 -1
  21. package/dist/basic-components/text-editor/text-editor-utils.d.ts +1 -1
  22. package/dist/basic-components/text-editor/text-editor-utils.d.ts.map +1 -1
  23. package/dist/basic-components/typography/typography.d.ts.map +1 -1
  24. package/dist/blockDiagram-DXYQGD6D-BpB6_kTP.js +3033 -0
  25. package/dist/blockDiagram-DXYQGD6D-DlcDXSwH.cjs +132 -0
  26. package/dist/c4Diagram-AHTNJAMY-B5Z8nO1s.js +2961 -0
  27. package/dist/c4Diagram-AHTNJAMY-CX5IjREU.cjs +10 -0
  28. package/dist/channel-BY9Lkyz7.cjs +1 -0
  29. package/dist/channel-BqNr2cYO.js +5 -0
  30. package/dist/chunk-2KRD3SAO-Ca3zDQyj.js +23 -0
  31. package/dist/chunk-2KRD3SAO-oZrIWZvV.cjs +1 -0
  32. package/dist/chunk-336JU56O-CuXRn1VH.cjs +1 -0
  33. package/dist/chunk-336JU56O-xKPgkG3O.js +49 -0
  34. package/dist/chunk-426QAEUC-Df31vuwu.cjs +1 -0
  35. package/dist/chunk-426QAEUC-JjFVHKYG.js +9 -0
  36. package/dist/chunk-4BX2VUAB-BW54-JWg.js +8 -0
  37. package/dist/chunk-4BX2VUAB-Qba52sxc.cjs +1 -0
  38. package/dist/chunk-4TB4RGXK-CKyHmNcP.js +3253 -0
  39. package/dist/chunk-4TB4RGXK-DdKJIFS5.cjs +206 -0
  40. package/dist/chunk-55IACEB6-Bu3k0Yz5.js +8 -0
  41. package/dist/chunk-55IACEB6-DPatBzu7.cjs +1 -0
  42. package/dist/chunk-5FUZZQ4R-2kdZJWq2.js +3638 -0
  43. package/dist/chunk-5FUZZQ4R-D_vnCbAb.cjs +62 -0
  44. package/dist/chunk-5PVQY5BW-C5U7sJAA.js +1299 -0
  45. package/dist/chunk-5PVQY5BW-CfQDYQZt.cjs +2 -0
  46. package/dist/chunk-67CJDMHE-2Qg7i1xJ.cjs +1 -0
  47. package/dist/chunk-67CJDMHE-YMBkJcAO.js +23 -0
  48. package/dist/chunk-7N4EOEYR-C-GuhRgW.js +35 -0
  49. package/dist/chunk-7N4EOEYR-jNBQwvHx.cjs +1 -0
  50. package/dist/chunk-AA7GKIK3-B_ZB6dou.js +30 -0
  51. package/dist/chunk-AA7GKIK3-dqnTmnvO.cjs +1 -0
  52. package/dist/chunk-BSJP7CBP-CFzYPvgr.cjs +1 -0
  53. package/dist/chunk-BSJP7CBP-oNTXVRA7.js +82 -0
  54. package/dist/chunk-CIAEETIT-ClHUj0Su.cjs +1 -0
  55. package/dist/chunk-CIAEETIT-XlxsAz-4.js +23 -0
  56. package/dist/chunk-D-IZpNpi.cjs +1 -0
  57. package/dist/chunk-EDXVE4YY-BZsJORf8.cjs +1 -0
  58. package/dist/chunk-EDXVE4YY-Bzf4FU3i.js +25 -0
  59. package/dist/chunk-ENJZ2VHE-BluGQPyl.js +560 -0
  60. package/dist/chunk-ENJZ2VHE-CwgVASaU.cjs +10 -0
  61. package/dist/{chunk-FMBD7UC4-Bbe5VHO3.cjs → chunk-FMBD7UC4-CS9_r76V.cjs} +2 -2
  62. package/dist/chunk-FMBD7UC4-RRSc9jqt.js +5 -0
  63. package/dist/chunk-FOC6F5B3-DcZs851j.cjs +1 -0
  64. package/dist/chunk-FOC6F5B3-E9n6-juB.js +23 -0
  65. package/dist/chunk-ICPOFSXX-CoaJw-IT.cjs +122 -0
  66. package/dist/chunk-ICPOFSXX-Sn6LWD0k.js +3316 -0
  67. package/dist/chunk-K5T4RW27-BzDQkjC7.cjs +94 -0
  68. package/dist/chunk-K5T4RW27-DY7TOEqa.js +16070 -0
  69. package/dist/chunk-KGLVRYIC-5OJpfQCj.js +23 -0
  70. package/dist/chunk-KGLVRYIC-DnbIkai8.cjs +1 -0
  71. package/dist/chunk-LIHQZDEY-59I4-LWb.js +64 -0
  72. package/dist/chunk-LIHQZDEY-CrogR3nT.cjs +1 -0
  73. package/dist/chunk-ORNJ4GCN-CcrEtiCn.cjs +1 -0
  74. package/dist/chunk-ORNJ4GCN-CwkOSFbS.js +31 -0
  75. package/dist/chunk-OYMX7WX6-BCT45RPu.cjs +231 -0
  76. package/dist/chunk-OYMX7WX6-BQADsxYi.js +2014 -0
  77. package/dist/chunk-QZHKN3VN-Bx8I6l3c.js +15 -0
  78. package/dist/chunk-QZHKN3VN-CSMKL2rB.cjs +1 -0
  79. package/dist/chunk-U2HBQHQK-BZ3YFMXB.js +1879 -0
  80. package/dist/chunk-U2HBQHQK-D0AoQWxK.cjs +70 -0
  81. package/dist/chunk-WQLz0Won.js +20 -0
  82. package/dist/chunk-X2U36JSP-CY7mJR8m.js +67 -0
  83. package/dist/chunk-X2U36JSP-D1RYKjVc.cjs +1 -0
  84. package/dist/chunk-XPW4576I-BcWkx-AL.js +1146 -0
  85. package/dist/chunk-XPW4576I-D8Pp6a3j.cjs +32 -0
  86. package/dist/chunk-YZCP3GAM-9K9WNdyN.js +60 -0
  87. package/dist/chunk-YZCP3GAM-BmaAafMm.cjs +1 -0
  88. package/dist/chunk-ZZ45TVLE-AQQsnXy4.cjs +1 -0
  89. package/dist/chunk-ZZ45TVLE-CIYrdg-O.js +32 -0
  90. package/dist/classDiagram-6PBFFD2Q-B6betnLH.cjs +1 -0
  91. package/dist/classDiagram-6PBFFD2Q-XGxl_AeB.js +29 -0
  92. package/dist/classDiagram-v2-HSJHXN6E-CwayYG4G.js +29 -0
  93. package/dist/classDiagram-v2-HSJHXN6E-Dda8WDvn.cjs +1 -0
  94. package/dist/clone-Dn__H8fX.js +8 -0
  95. package/dist/clone-lShkT11Q.cjs +1 -0
  96. package/dist/components/app-bar/app-bar.d.ts.map +1 -1
  97. package/dist/components/box-list/box-list-types.d.ts +1 -0
  98. package/dist/components/box-list/box-list-types.d.ts.map +1 -1
  99. package/dist/components/box-list/box-list.d.ts.map +1 -1
  100. package/dist/components/dash-list/dash-list.d.ts.map +1 -1
  101. package/dist/components/field/field-types.d.ts +1 -1
  102. package/dist/components/field/field-types.d.ts.map +1 -1
  103. package/dist/components/htm/htm-types.d.ts +4 -0
  104. package/dist/components/htm/htm-types.d.ts.map +1 -1
  105. package/dist/components/htm/htm.d.ts.map +1 -1
  106. package/dist/components/image-list/components/image-list-command-panel.d.ts +15 -0
  107. package/dist/components/image-list/components/image-list-command-panel.d.ts.map +1 -0
  108. package/dist/components/image-list/components/image-list-command-trigger.d.ts +16 -0
  109. package/dist/components/image-list/components/image-list-command-trigger.d.ts.map +1 -0
  110. package/dist/components/image-list/components/image-list-filter-picker.d.ts +14 -0
  111. package/dist/components/image-list/components/image-list-filter-picker.d.ts.map +1 -0
  112. package/dist/components/image-list/components/image-list-h-strip.d.ts.map +1 -1
  113. package/dist/components/image-list/components/image-list-json-viewer.d.ts +11 -0
  114. package/dist/components/image-list/components/image-list-json-viewer.d.ts.map +1 -0
  115. package/dist/components/image-list/components/image-list-menu.d.ts.map +1 -1
  116. package/dist/components/image-list/components/image-list-navigation-picker.d.ts +15 -0
  117. package/dist/components/image-list/components/image-list-navigation-picker.d.ts.map +1 -0
  118. package/dist/components/image-list/components/image-list-sort-picker.d.ts +14 -0
  119. package/dist/components/image-list/components/image-list-sort-picker.d.ts.map +1 -0
  120. package/dist/components/image-list/components/image-list-v-strip.d.ts.map +1 -1
  121. package/dist/components/image-list/components/items/image-list-card-item.d.ts +5 -0
  122. package/dist/components/image-list/components/items/image-list-card-item.d.ts.map +1 -0
  123. package/dist/components/image-list/components/items/image-list-folder-item.d.ts.map +1 -1
  124. package/dist/components/image-list/components/items/image-list-item.d.ts.map +1 -1
  125. package/dist/components/image-list/components/menu-nav-item.d.ts.map +1 -1
  126. package/dist/components/image-list/components/navigation-modes/image-list-catalog.d.ts.map +1 -1
  127. package/dist/components/image-list/components/navigation-modes/image-list-explorer.d.ts.map +1 -1
  128. package/dist/components/image-list/components/navigation-modes/image-list-slideshow.d.ts.map +1 -1
  129. package/dist/components/image-list/components/navigation-modes/image-list-tree.d.ts.map +1 -1
  130. package/dist/components/image-list/components/strip-child-popup.d.ts.map +1 -1
  131. package/dist/components/image-list/components/strip-item.d.ts.map +1 -1
  132. package/dist/components/image-list/components/strip-overflow-button.d.ts.map +1 -1
  133. package/dist/components/image-list/hooks/useCommandPickers.d.ts +13 -0
  134. package/dist/components/image-list/hooks/useCommandPickers.d.ts.map +1 -0
  135. package/dist/components/image-list/image-list-column-utils.d.ts +9 -0
  136. package/dist/components/image-list/image-list-column-utils.d.ts.map +1 -0
  137. package/dist/components/image-list/image-list-context.d.ts +5 -2
  138. package/dist/components/image-list/image-list-context.d.ts.map +1 -1
  139. package/dist/components/image-list/image-list-debug-utils.d.ts +13 -0
  140. package/dist/components/image-list/image-list-debug-utils.d.ts.map +1 -0
  141. package/dist/components/image-list/image-list-filter-context.d.ts +9 -0
  142. package/dist/components/image-list/image-list-filter-context.d.ts.map +1 -0
  143. package/dist/components/image-list/image-list-filter-utils.d.ts +12 -0
  144. package/dist/components/image-list/image-list-filter-utils.d.ts.map +1 -0
  145. package/dist/components/image-list/image-list-sort-context.d.ts +9 -0
  146. package/dist/components/image-list/image-list-sort-context.d.ts.map +1 -0
  147. package/dist/components/image-list/image-list-sort-utils.d.ts +13 -0
  148. package/dist/components/image-list/image-list-sort-utils.d.ts.map +1 -0
  149. package/dist/components/image-list/image-list-state-context.d.ts +5 -0
  150. package/dist/components/image-list/image-list-state-context.d.ts.map +1 -0
  151. package/dist/components/image-list/image-list-types.d.ts +50 -2
  152. package/dist/components/image-list/image-list-types.d.ts.map +1 -1
  153. package/dist/components/image-list/image-list-utils.d.ts +54 -2
  154. package/dist/components/image-list/image-list-utils.d.ts.map +1 -1
  155. package/dist/components/image-list/image-list.d.ts +1 -1
  156. package/dist/components/image-list/image-list.d.ts.map +1 -1
  157. package/dist/components/tooltip/tooltip-assets.d.ts.map +1 -1
  158. package/dist/components/tooltip/tooltip-utils.d.ts.map +1 -1
  159. package/dist/components/tooltip/tooltip.d.ts.map +1 -1
  160. package/dist/cose-bilkent-S5V4N54A-B30Rh9DR.js +2250 -0
  161. package/dist/cose-bilkent-S5V4N54A-Bhdp-wcb.cjs +1 -0
  162. package/dist/cytoscape.esm-CPjF_mSK.js +18100 -0
  163. package/dist/cytoscape.esm-CrBwLFXE.cjs +321 -0
  164. package/dist/dagre-BjnWDdkw.cjs +1 -0
  165. package/dist/dagre-DVLnxd7n.js +1606 -0
  166. package/dist/dagre-KV5264BT-BjqayRYC.js +293 -0
  167. package/dist/dagre-KV5264BT-BvInGAUC.cjs +4 -0
  168. package/dist/defaultLocale-Dcyuaxxg.js +201 -0
  169. package/dist/defaultLocale-DtzyZW63.cjs +1 -0
  170. package/dist/diagram-5BDNPKRD-Bk7depC0.js +101 -0
  171. package/dist/diagram-5BDNPKRD-D6EXksHo.cjs +10 -0
  172. package/dist/diagram-G4DWMVQ6-BkQnbCLv.js +524 -0
  173. package/dist/diagram-G4DWMVQ6-CJASbR70.cjs +24 -0
  174. package/dist/diagram-MMDJMWI5-DEt7jQx9.cjs +43 -0
  175. package/dist/diagram-MMDJMWI5-DUUVPi55.js +213 -0
  176. package/dist/diagram-TYMM5635-5auoAFCi.cjs +24 -0
  177. package/dist/diagram-TYMM5635-Cpj8wfoJ.js +133 -0
  178. package/dist/dist-BgvMZbfo.cjs +1 -0
  179. package/dist/dist-DL30VIBI.js +60 -0
  180. package/dist/erDiagram-SMLLAGMA-DVUT6TBy.cjs +85 -0
  181. package/dist/erDiagram-SMLLAGMA-D_ByPk0C.js +1700 -0
  182. package/dist/flatten-BE1bWL-7.js +40 -0
  183. package/dist/flatten-DxvYSoR8.cjs +1 -0
  184. package/dist/flowDiagram-DWJPFMVM-BWrkDnqc.js +4145 -0
  185. package/dist/flowDiagram-DWJPFMVM-BbK42NaF.cjs +162 -0
  186. package/dist/functional-components/action/action-types.d.ts +70 -0
  187. package/dist/functional-components/action/action-types.d.ts.map +1 -0
  188. package/dist/functional-components/action/action-utils.d.ts +5 -0
  189. package/dist/functional-components/action/action-utils.d.ts.map +1 -0
  190. package/dist/functional-components/action/action.d.ts +3 -0
  191. package/dist/functional-components/action/action.d.ts.map +1 -0
  192. package/dist/functional-components/action-list/action-list.d.ts.map +1 -1
  193. package/dist/functional-components/action-list/dual-list/dual-list.d.ts.map +1 -1
  194. package/dist/functional-components/gantt/bar/gantt-bar.d.ts.map +1 -1
  195. package/dist/functional-components/gantt/gantt-assets.d.ts +4 -0
  196. package/dist/functional-components/gantt/gantt-assets.d.ts.map +1 -1
  197. package/dist/functional-components/gantt/gantt.d.ts.map +1 -1
  198. package/dist/functional-components/gantt/today-indicator/gantt-today-indicator.d.ts +17 -0
  199. package/dist/functional-components/gantt/today-indicator/gantt-today-indicator.d.ts.map +1 -0
  200. package/dist/ganttDiagram-T4ZO3ILL-DUi8jF9H.cjs +292 -0
  201. package/dist/ganttDiagram-T4ZO3ILL-LuaYkUvj.js +3077 -0
  202. package/dist/gitGraph-7Q5UKJZL-DZea3ltD.cjs +1 -0
  203. package/dist/gitGraph-7Q5UKJZL-sjlqDwJ_.js +3 -0
  204. package/dist/gitGraphDiagram-UUTBAWPF-D-tMWUQ1.cjs +106 -0
  205. package/dist/gitGraphDiagram-UUTBAWPF-DKkENwcV.js +728 -0
  206. package/dist/graphlib-Cpifseqb.js +373 -0
  207. package/dist/graphlib-HdfvGLpV.cjs +1 -0
  208. package/dist/hooks/useClickOutside.d.ts.map +1 -1
  209. package/dist/identity-KQSjemTb.cjs +1 -0
  210. package/dist/identity-g0dsMjx7.js +393 -0
  211. package/dist/info-OMHHGYJF-Bk0VWVNW.js +3 -0
  212. package/dist/info-OMHHGYJF-C8QtwF0k.cjs +1 -0
  213. package/dist/infoDiagram-42DDH7IO-CH5xHj8H.cjs +2 -0
  214. package/dist/infoDiagram-42DDH7IO-CLkQPFe0.js +19 -0
  215. package/dist/init-B2MubQrj.cjs +1 -0
  216. package/dist/init-BO60vQHJ.js +15 -0
  217. package/dist/isEmpty-CA3kJuev.cjs +1 -0
  218. package/dist/isEmpty-RwX-oIQS.js +35 -0
  219. package/dist/ishikawaDiagram-UXIWVN3A-Cl3Ivm8H.cjs +70 -0
  220. package/dist/ishikawaDiagram-UXIWVN3A-DqbVPChK.js +718 -0
  221. package/dist/journeyDiagram-VCZTEJTY-DudduR0c.js +883 -0
  222. package/dist/journeyDiagram-VCZTEJTY-XRc0J8gM.cjs +139 -0
  223. package/dist/kanban-definition-6JOO6SKY-Br87atRc.cjs +89 -0
  224. package/dist/kanban-definition-6JOO6SKY-DzEqE64J.js +973 -0
  225. package/dist/katex-Du5WiYIy.js +22000 -0
  226. package/dist/katex-SAH56fvc.cjs +257 -0
  227. package/dist/ketchup2.cjs.js +190 -1
  228. package/dist/ketchup2.css +2 -1
  229. package/dist/ketchup2.es.js +132419 -52
  230. package/dist/line-BbHmiwbs.cjs +1 -0
  231. package/dist/line-JyRBGWft.js +34 -0
  232. package/dist/linear-BsPvNLJv.js +289 -0
  233. package/dist/linear-CxHa1DsM.cjs +1 -0
  234. package/dist/mermaid-parser.core-CERDf-UG.js +69 -0
  235. package/dist/mermaid-parser.core-DHpvGOZR.cjs +3 -0
  236. package/dist/mindmap-definition-QFDTVHPH-BCq8zmLt.cjs +96 -0
  237. package/dist/mindmap-definition-QFDTVHPH-NGjPQ5SM.js +978 -0
  238. package/dist/ordinal-C-VoL0XF.js +65 -0
  239. package/dist/ordinal-Civr0hZL.cjs +1 -0
  240. package/dist/packet-4T2RLAQJ-X0BMsNFj.js +3 -0
  241. package/dist/packet-4T2RLAQJ-lvmQnXPI.cjs +1 -0
  242. package/dist/path-Civic7PQ.cjs +1 -0
  243. package/dist/path-CvfwEr8y.js +85 -0
  244. package/dist/pie-ZZUOXDRM-CJ_fU5k1.js +3 -0
  245. package/dist/pie-ZZUOXDRM-Dp4APKqR.cjs +1 -0
  246. package/dist/pieDiagram-DEJITSTG-CK4xy0PS.cjs +30 -0
  247. package/dist/pieDiagram-DEJITSTG-DTeyzHmB.js +165 -0
  248. package/dist/quadrantDiagram-34T5L4WZ-CCcJIf91.js +1974 -0
  249. package/dist/quadrantDiagram-34T5L4WZ-D-_iiK79.cjs +7 -0
  250. package/dist/radar-PYXPWWZC-BHWJy_E1.cjs +1 -0
  251. package/dist/radar-PYXPWWZC-DgZIW9Ah.js +3 -0
  252. package/dist/reduce-B7WW9rkU.cjs +1 -0
  253. package/dist/reduce-DNnkcf3M.js +532 -0
  254. package/dist/requirementDiagram-MS252O5E-BdOanuYe.js +2221 -0
  255. package/dist/requirementDiagram-MS252O5E-EfY029Xj.cjs +84 -0
  256. package/dist/rough.esm-1mqTSjCt.js +1352 -0
  257. package/dist/rough.esm-BLKo1fIQ.cjs +1 -0
  258. package/dist/sankeyDiagram-XADWPNL6-3jlM2UcU.cjs +10 -0
  259. package/dist/sankeyDiagram-XADWPNL6-3wviN_U4.js +920 -0
  260. package/dist/sequenceDiagram-FGHM5R23-DC8SjhFN.js +4157 -0
  261. package/dist/sequenceDiagram-FGHM5R23-lK1G3QLN.cjs +157 -0
  262. package/dist/src-BQiFKP24.js +2146 -0
  263. package/dist/src-DFxq-N5I.cjs +1 -0
  264. package/dist/stateDiagram-FHFEXIEX-DnkzFphf.js +217 -0
  265. package/dist/stateDiagram-FHFEXIEX-DsQigFuR.cjs +1 -0
  266. package/dist/stateDiagram-v2-QKLJ7IA2-2v8JiIJr.js +27 -0
  267. package/dist/stateDiagram-v2-QKLJ7IA2-UKKfWPoT.cjs +1 -0
  268. package/dist/timeline-definition-GMOUNBTQ-CBnYBWN0.js +1068 -0
  269. package/dist/timeline-definition-GMOUNBTQ-DWpngnE4.cjs +120 -0
  270. package/dist/treeView-SZITEDCU-CT5vX0q9.cjs +1 -0
  271. package/dist/treeView-SZITEDCU-Df3xzFtO.js +3 -0
  272. package/dist/treemap-W4RFUUIX-Bk_jVZ7D.cjs +1 -0
  273. package/dist/treemap-W4RFUUIX-ClUtdSdn.js +3 -0
  274. package/dist/utils/translation.d.ts.map +1 -1
  275. package/dist/v4-6yr83DbP.cjs +1 -0
  276. package/dist/v4-BR71w5_q.js +33 -0
  277. package/dist/vennDiagram-DHZGUBPP-D-kj-sVU.cjs +34 -0
  278. package/dist/vennDiagram-DHZGUBPP-M-kkEkXj.js +1858 -0
  279. package/dist/wardley-RL74JXVD-BtHQbnUy.js +3 -0
  280. package/dist/wardley-RL74JXVD-y8RO5Iqv.cjs +1 -0
  281. package/dist/wardleyDiagram-NUSXRM2D-CUX1SYhw.js +578 -0
  282. package/dist/wardleyDiagram-NUSXRM2D-thoOuA_D.cjs +20 -0
  283. package/dist/xychartDiagram-5P7HB3ND-1cXRZ1bi.js +2044 -0
  284. package/dist/xychartDiagram-5P7HB3ND-BF2WmJ4-.cjs +7 -0
  285. package/package.json +31 -31
  286. package/dist/_basePickBy-DGJmMScd.cjs +0 -1
  287. package/dist/_basePickBy-PX1Y-d1V.js +0 -151
  288. package/dist/_baseUniq-DcRTQJQN.cjs +0 -1
  289. package/dist/_baseUniq-DwOD2Otm.js +0 -614
  290. package/dist/arc-BsWNnd73.js +0 -83
  291. package/dist/arc-DBV_HLQY.cjs +0 -1
  292. package/dist/architecture-7HQA4BMR-CFSh30qd.js +0 -6
  293. package/dist/architecture-7HQA4BMR-lBVp8HRs.cjs +0 -1
  294. package/dist/architectureDiagram-VXUJARFQ-Bc0s-J3p.cjs +0 -36
  295. package/dist/architectureDiagram-VXUJARFQ-CMUHe_r-.js +0 -4661
  296. package/dist/blockDiagram-VD42YOAC-C_oUXbzO.cjs +0 -122
  297. package/dist/blockDiagram-VD42YOAC-IY9o9LbQ.js +0 -2256
  298. package/dist/c4Diagram-YG6GDRKO-CqZ8ZT08.cjs +0 -10
  299. package/dist/c4Diagram-YG6GDRKO-DJxkbTo5.js +0 -1580
  300. package/dist/channel-BkvCKlJ6.js +0 -5
  301. package/dist/channel-CswPsSpD.cjs +0 -1
  302. package/dist/chunk-4BX2VUAB-CYIF37mc.js +0 -8
  303. package/dist/chunk-4BX2VUAB-gEHSzd7y.cjs +0 -1
  304. package/dist/chunk-55IACEB6-BHAHwp5q.js +0 -8
  305. package/dist/chunk-55IACEB6-_lyvFxBQ.cjs +0 -1
  306. package/dist/chunk-B4BG7PRW-B8r_ephc.js +0 -1375
  307. package/dist/chunk-B4BG7PRW-BS27R9kc.cjs +0 -165
  308. package/dist/chunk-DI55MBZ5-Bm2YZ5i9.cjs +0 -220
  309. package/dist/chunk-DI55MBZ5-hEyGllSh.js +0 -1370
  310. package/dist/chunk-FMBD7UC4-D7nrDShK.js +0 -19
  311. package/dist/chunk-QN33PNHL-BgJe6Xfg.cjs +0 -1
  312. package/dist/chunk-QN33PNHL-rrJh01ga.js +0 -19
  313. package/dist/chunk-QZHKN3VN-BmAbl_2n.js +0 -15
  314. package/dist/chunk-QZHKN3VN-BrAhTHYa.cjs +0 -1
  315. package/dist/chunk-TZMSLE5B-BE-7S1wa.js +0 -64
  316. package/dist/chunk-TZMSLE5B-BHB7-VQp.cjs +0 -1
  317. package/dist/classDiagram-2ON5EDUG-CebcMRVR.cjs +0 -1
  318. package/dist/classDiagram-2ON5EDUG-D3F1RaIQ.js +0 -16
  319. package/dist/classDiagram-v2-WZHVMYZB-CebcMRVR.cjs +0 -1
  320. package/dist/classDiagram-v2-WZHVMYZB-D3F1RaIQ.js +0 -16
  321. package/dist/clone-BDgl72Aq.cjs +0 -1
  322. package/dist/clone-C_aDFxlO.js +0 -8
  323. package/dist/cose-bilkent-S5V4N54A-D3wiY3iN.cjs +0 -1
  324. package/dist/cose-bilkent-S5V4N54A-D5AClp5l.js +0 -2608
  325. package/dist/cytoscape.esm-CNUX3VTg.cjs +0 -321
  326. package/dist/cytoscape.esm-Cvf3sx9F.js +0 -18704
  327. package/dist/dagre-6UL2VRFP-CypqseiV.cjs +0 -4
  328. package/dist/dagre-6UL2VRFP-DMO4JOci.js +0 -444
  329. package/dist/defaultLocale-D7EN2tov.js +0 -171
  330. package/dist/defaultLocale-DIVzfLaQ.cjs +0 -1
  331. package/dist/diagram-PSM6KHXK-BDoLsIhn.cjs +0 -24
  332. package/dist/diagram-PSM6KHXK-cFCqdUIB.js +0 -531
  333. package/dist/diagram-QEK2KX5R-Cc5PUDIg.cjs +0 -43
  334. package/dist/diagram-QEK2KX5R-Cu_E8La-.js +0 -217
  335. package/dist/diagram-S2PKOQOG-CGnbJJ6_.cjs +0 -24
  336. package/dist/diagram-S2PKOQOG-Cz6p6CDp.js +0 -142
  337. package/dist/erDiagram-Q2GNP2WA-C4LFQCJ0.cjs +0 -60
  338. package/dist/erDiagram-Q2GNP2WA-DvfsJLvg.js +0 -841
  339. package/dist/flowDiagram-NV44I4VS-CeKGu9EW.js +0 -1620
  340. package/dist/flowDiagram-NV44I4VS-D5y8Cy09.cjs +0 -162
  341. package/dist/ganttDiagram-JELNMOA3-BSy5awHh.cjs +0 -267
  342. package/dist/ganttDiagram-JELNMOA3-Dr4U9R4y.js +0 -2670
  343. package/dist/gitGraph-G5XIXVHT-CO3K0I5T.js +0 -6
  344. package/dist/gitGraph-G5XIXVHT-Ca7V3WsM.cjs +0 -1
  345. package/dist/gitGraphDiagram-V2S2FVAM-1QBHZeWE.js +0 -699
  346. package/dist/gitGraphDiagram-V2S2FVAM-OiapaYQL.cjs +0 -65
  347. package/dist/graph-Jks8K00w.cjs +0 -1
  348. package/dist/graph-zNBt93GG.js +0 -247
  349. package/dist/index-D_QdHvga.js +0 -132342
  350. package/dist/index-DrE_PcNC.cjs +0 -390
  351. package/dist/info-VBDWY6EO-0Eh7RJSD.js +0 -6
  352. package/dist/info-VBDWY6EO-BUpod63m.cjs +0 -1
  353. package/dist/infoDiagram-HS3SLOUP-DQPTM4yd.cjs +0 -2
  354. package/dist/infoDiagram-HS3SLOUP-y4B3rGEI.js +0 -24
  355. package/dist/init-CHZsXQcr.cjs +0 -1
  356. package/dist/init-DjUOC4st.js +0 -16
  357. package/dist/journeyDiagram-XKPGCS4Q-BA6dU3fB.js +0 -834
  358. package/dist/journeyDiagram-XKPGCS4Q-CgX1uRWQ.cjs +0 -139
  359. package/dist/kanban-definition-3W4ZIXB7-CCcUvQw2.js +0 -719
  360. package/dist/kanban-definition-3W4ZIXB7-CLsSK820.cjs +0 -89
  361. package/dist/katex-C2g-EhzP.cjs +0 -261
  362. package/dist/katex-CUSbq6rG.js +0 -11692
  363. package/dist/layout-DQY8NU7r.cjs +0 -1
  364. package/dist/layout-DhDJaAGH.js +0 -1335
  365. package/dist/linear-BxHQa2UM.js +0 -259
  366. package/dist/linear-DFPXnk9z.cjs +0 -1
  367. package/dist/mermaid-parser.core-BLQ9Ldcb.cjs +0 -160
  368. package/dist/mermaid-parser.core-Bny4tLBT.js +0 -17907
  369. package/dist/mindmap-definition-VGOIOE7T-Bw0Ttp1K.cjs +0 -68
  370. package/dist/mindmap-definition-VGOIOE7T-DWETxOzy.js +0 -758
  371. package/dist/ordinal-B6-f3MAq.js +0 -61
  372. package/dist/ordinal-CagbB1m8.cjs +0 -1
  373. package/dist/packet-DYOGHKS2-A2xNn9e2.cjs +0 -1
  374. package/dist/packet-DYOGHKS2-C9WC8eNb.js +0 -6
  375. package/dist/pie-VRWISCQL-BafPWeA1.cjs +0 -1
  376. package/dist/pie-VRWISCQL-vKJ8WC8d.js +0 -6
  377. package/dist/pieDiagram-ADFJNKIX-BdsfNh69.js +0 -161
  378. package/dist/pieDiagram-ADFJNKIX-DOZhSj8j.cjs +0 -30
  379. package/dist/quadrantDiagram-AYHSOK5B-BLuxXMra.cjs +0 -7
  380. package/dist/quadrantDiagram-AYHSOK5B-D9KE7HJs.js +0 -1022
  381. package/dist/radar-ZZBFDIW7-BLGCqPHv.js +0 -6
  382. package/dist/radar-ZZBFDIW7-BWxFhKYx.cjs +0 -1
  383. package/dist/requirementDiagram-UZGBJVZJ-BEkU_fE6.js +0 -850
  384. package/dist/requirementDiagram-UZGBJVZJ-DkNufFqc.cjs +0 -64
  385. package/dist/sankeyDiagram-TZEHDZUN-BJD6V_yO.js +0 -810
  386. package/dist/sankeyDiagram-TZEHDZUN-Dt4bjS4w.cjs +0 -10
  387. package/dist/sequenceDiagram-WL72ISMW-CSEM0aqp.cjs +0 -145
  388. package/dist/sequenceDiagram-WL72ISMW-dCDlLWba.js +0 -2511
  389. package/dist/stateDiagram-FKZM4ZOC-BcD9IQHo.cjs +0 -1
  390. package/dist/stateDiagram-FKZM4ZOC-CZ3DL61f.js +0 -263
  391. package/dist/stateDiagram-v2-4FDKWEC3-DGsrmxNL.cjs +0 -1
  392. package/dist/stateDiagram-v2-4FDKWEC3-DON-yX7J.js +0 -16
  393. package/dist/timeline-definition-IT6M3QCI-Bwb7mbiA.js +0 -795
  394. package/dist/timeline-definition-IT6M3QCI-CIbYhaSE.cjs +0 -61
  395. package/dist/treemap-GDKQZRPO-BMq1hkbw.cjs +0 -1
  396. package/dist/treemap-GDKQZRPO-DYOf8KkT.js +0 -6
  397. package/dist/xychartDiagram-PRI3JC2R-DloZDwSO.cjs +0 -7
  398. package/dist/xychartDiagram-PRI3JC2R-er9aZ4EF.js +0 -1340
@@ -0,0 +1,3033 @@
1
+ import { D as e, L as t, a as n, b as r, c as i, s as a, tt as o, w as s, y as c } from "./chunk-ICPOFSXX-Sn6LWD0k.js";
2
+ import { g as l, h as u, p as d } from "./src-BQiFKP24.js";
3
+ import { t as f } from "./channel-BqNr2cYO.js";
4
+ import { H as p, c as m, h, i as g } from "./chunk-5PVQY5BW-C5U7sJAA.js";
5
+ import { t as _ } from "./line-JyRBGWft.js";
6
+ import { n as v, t as y } from "./chunk-BSJP7CBP-oNTXVRA7.js";
7
+ import { n as b, t as x } from "./chunk-ZZ45TVLE-CIYrdg-O.js";
8
+ import { n as S } from "./chunk-U2HBQHQK-BZ3YFMXB.js";
9
+ import { t as C } from "./chunk-FMBD7UC4-RRSc9jqt.js";
10
+ import { t as w } from "./graphlib-Cpifseqb.js";
11
+ import { t as T } from "./clone-Dn__H8fX.js";
12
+ //#region node_modules/mermaid/dist/chunks/mermaid.core/blockDiagram-DXYQGD6D.mjs
13
+ var E = (function() {
14
+ var e = /* @__PURE__ */ u(function(e, t, n, r) {
15
+ for (n ||= {}, r = e.length; r--; n[e[r]] = t);
16
+ return n;
17
+ }, "o"), t = [1, 15], n = [1, 7], r = [1, 13], i = [1, 14], a = [1, 19], o = [1, 16], s = [1, 17], c = [1, 18], l = [8, 30], d = [
18
+ 8,
19
+ 10,
20
+ 21,
21
+ 28,
22
+ 29,
23
+ 30,
24
+ 31,
25
+ 39,
26
+ 43,
27
+ 46
28
+ ], f = [1, 23], p = [1, 24], m = [
29
+ 8,
30
+ 10,
31
+ 15,
32
+ 16,
33
+ 21,
34
+ 28,
35
+ 29,
36
+ 30,
37
+ 31,
38
+ 39,
39
+ 43,
40
+ 46
41
+ ], h = [
42
+ 8,
43
+ 10,
44
+ 15,
45
+ 16,
46
+ 21,
47
+ 27,
48
+ 28,
49
+ 29,
50
+ 30,
51
+ 31,
52
+ 39,
53
+ 43,
54
+ 46
55
+ ], g = [1, 49], _ = {
56
+ trace: /* @__PURE__ */ u(function() {}, "trace"),
57
+ yy: {},
58
+ symbols_: {
59
+ error: 2,
60
+ spaceLines: 3,
61
+ SPACELINE: 4,
62
+ NL: 5,
63
+ separator: 6,
64
+ SPACE: 7,
65
+ EOF: 8,
66
+ start: 9,
67
+ BLOCK_DIAGRAM_KEY: 10,
68
+ document: 11,
69
+ stop: 12,
70
+ statement: 13,
71
+ link: 14,
72
+ LINK: 15,
73
+ START_LINK: 16,
74
+ LINK_LABEL: 17,
75
+ STR: 18,
76
+ nodeStatement: 19,
77
+ columnsStatement: 20,
78
+ SPACE_BLOCK: 21,
79
+ blockStatement: 22,
80
+ classDefStatement: 23,
81
+ cssClassStatement: 24,
82
+ styleStatement: 25,
83
+ node: 26,
84
+ SIZE: 27,
85
+ COLUMNS: 28,
86
+ "id-block": 29,
87
+ end: 30,
88
+ NODE_ID: 31,
89
+ nodeShapeNLabel: 32,
90
+ dirList: 33,
91
+ DIR: 34,
92
+ NODE_DSTART: 35,
93
+ NODE_DEND: 36,
94
+ BLOCK_ARROW_START: 37,
95
+ BLOCK_ARROW_END: 38,
96
+ classDef: 39,
97
+ CLASSDEF_ID: 40,
98
+ CLASSDEF_STYLEOPTS: 41,
99
+ DEFAULT: 42,
100
+ class: 43,
101
+ CLASSENTITY_IDS: 44,
102
+ STYLECLASS: 45,
103
+ style: 46,
104
+ STYLE_ENTITY_IDS: 47,
105
+ STYLE_DEFINITION_DATA: 48,
106
+ $accept: 0,
107
+ $end: 1
108
+ },
109
+ terminals_: {
110
+ 2: "error",
111
+ 4: "SPACELINE",
112
+ 5: "NL",
113
+ 7: "SPACE",
114
+ 8: "EOF",
115
+ 10: "BLOCK_DIAGRAM_KEY",
116
+ 15: "LINK",
117
+ 16: "START_LINK",
118
+ 17: "LINK_LABEL",
119
+ 18: "STR",
120
+ 21: "SPACE_BLOCK",
121
+ 27: "SIZE",
122
+ 28: "COLUMNS",
123
+ 29: "id-block",
124
+ 30: "end",
125
+ 31: "NODE_ID",
126
+ 34: "DIR",
127
+ 35: "NODE_DSTART",
128
+ 36: "NODE_DEND",
129
+ 37: "BLOCK_ARROW_START",
130
+ 38: "BLOCK_ARROW_END",
131
+ 39: "classDef",
132
+ 40: "CLASSDEF_ID",
133
+ 41: "CLASSDEF_STYLEOPTS",
134
+ 42: "DEFAULT",
135
+ 43: "class",
136
+ 44: "CLASSENTITY_IDS",
137
+ 45: "STYLECLASS",
138
+ 46: "style",
139
+ 47: "STYLE_ENTITY_IDS",
140
+ 48: "STYLE_DEFINITION_DATA"
141
+ },
142
+ productions_: [
143
+ 0,
144
+ [3, 1],
145
+ [3, 2],
146
+ [3, 2],
147
+ [6, 1],
148
+ [6, 1],
149
+ [6, 1],
150
+ [9, 3],
151
+ [12, 1],
152
+ [12, 1],
153
+ [12, 2],
154
+ [12, 2],
155
+ [11, 1],
156
+ [11, 2],
157
+ [14, 1],
158
+ [14, 4],
159
+ [13, 1],
160
+ [13, 1],
161
+ [13, 1],
162
+ [13, 1],
163
+ [13, 1],
164
+ [13, 1],
165
+ [13, 1],
166
+ [19, 3],
167
+ [19, 2],
168
+ [19, 1],
169
+ [20, 1],
170
+ [22, 4],
171
+ [22, 3],
172
+ [26, 1],
173
+ [26, 2],
174
+ [33, 1],
175
+ [33, 2],
176
+ [32, 3],
177
+ [32, 4],
178
+ [23, 3],
179
+ [23, 3],
180
+ [24, 3],
181
+ [25, 3]
182
+ ],
183
+ performAction: /* @__PURE__ */ u(function(e, t, n, r, i, a, o) {
184
+ var s = a.length - 1;
185
+ switch (i) {
186
+ case 4:
187
+ r.getLogger().debug("Rule: separator (NL) ");
188
+ break;
189
+ case 5:
190
+ r.getLogger().debug("Rule: separator (Space) ");
191
+ break;
192
+ case 6:
193
+ r.getLogger().debug("Rule: separator (EOF) ");
194
+ break;
195
+ case 7:
196
+ r.getLogger().debug("Rule: hierarchy: ", a[s - 1]), r.setHierarchy(a[s - 1]);
197
+ break;
198
+ case 8:
199
+ r.getLogger().debug("Stop NL ");
200
+ break;
201
+ case 9:
202
+ r.getLogger().debug("Stop EOF ");
203
+ break;
204
+ case 10:
205
+ r.getLogger().debug("Stop NL2 ");
206
+ break;
207
+ case 11:
208
+ r.getLogger().debug("Stop EOF2 ");
209
+ break;
210
+ case 12:
211
+ r.getLogger().debug("Rule: statement: ", a[s]), typeof a[s].length == "number" ? this.$ = a[s] : this.$ = [a[s]];
212
+ break;
213
+ case 13:
214
+ r.getLogger().debug("Rule: statement #2: ", a[s - 1]), this.$ = [a[s - 1]].concat(a[s]);
215
+ break;
216
+ case 14:
217
+ r.getLogger().debug("Rule: link: ", a[s], e), this.$ = {
218
+ edgeTypeStr: a[s],
219
+ label: ""
220
+ };
221
+ break;
222
+ case 15:
223
+ r.getLogger().debug("Rule: LABEL link: ", a[s - 3], a[s - 1], a[s]), this.$ = {
224
+ edgeTypeStr: a[s],
225
+ label: a[s - 1]
226
+ };
227
+ break;
228
+ case 18:
229
+ let t = parseInt(a[s]);
230
+ this.$ = {
231
+ id: r.generateId(),
232
+ type: "space",
233
+ label: "",
234
+ width: t,
235
+ children: []
236
+ };
237
+ break;
238
+ case 23:
239
+ r.getLogger().debug("Rule: (nodeStatement link node) ", a[s - 2], a[s - 1], a[s], " typestr: ", a[s - 1].edgeTypeStr);
240
+ let n = r.edgeStrToEdgeData(a[s - 1].edgeTypeStr);
241
+ this.$ = [
242
+ {
243
+ id: a[s - 2].id,
244
+ label: a[s - 2].label,
245
+ type: a[s - 2].type,
246
+ directions: a[s - 2].directions
247
+ },
248
+ {
249
+ id: a[s - 2].id + "-" + a[s].id,
250
+ start: a[s - 2].id,
251
+ end: a[s].id,
252
+ label: a[s - 1].label,
253
+ type: "edge",
254
+ directions: a[s].directions,
255
+ arrowTypeEnd: n,
256
+ arrowTypeStart: "arrow_open"
257
+ },
258
+ {
259
+ id: a[s].id,
260
+ label: a[s].label,
261
+ type: r.typeStr2Type(a[s].typeStr),
262
+ directions: a[s].directions
263
+ }
264
+ ];
265
+ break;
266
+ case 24:
267
+ r.getLogger().debug("Rule: nodeStatement (abc88 node size) ", a[s - 1], a[s]), this.$ = {
268
+ id: a[s - 1].id,
269
+ label: a[s - 1].label,
270
+ type: r.typeStr2Type(a[s - 1].typeStr),
271
+ directions: a[s - 1].directions,
272
+ widthInColumns: parseInt(a[s], 10)
273
+ };
274
+ break;
275
+ case 25:
276
+ r.getLogger().debug("Rule: nodeStatement (node) ", a[s]), this.$ = {
277
+ id: a[s].id,
278
+ label: a[s].label,
279
+ type: r.typeStr2Type(a[s].typeStr),
280
+ directions: a[s].directions,
281
+ widthInColumns: 1
282
+ };
283
+ break;
284
+ case 26:
285
+ r.getLogger().debug("APA123", this ? this : "na"), r.getLogger().debug("COLUMNS: ", a[s]), this.$ = {
286
+ type: "column-setting",
287
+ columns: a[s] === "auto" ? -1 : parseInt(a[s])
288
+ };
289
+ break;
290
+ case 27:
291
+ r.getLogger().debug("Rule: id-block statement : ", a[s - 2], a[s - 1]), r.generateId(), this.$ = {
292
+ ...a[s - 2],
293
+ type: "composite",
294
+ children: a[s - 1]
295
+ };
296
+ break;
297
+ case 28:
298
+ r.getLogger().debug("Rule: blockStatement : ", a[s - 2], a[s - 1], a[s]), this.$ = {
299
+ id: r.generateId(),
300
+ type: "composite",
301
+ label: "",
302
+ children: a[s - 1]
303
+ };
304
+ break;
305
+ case 29:
306
+ r.getLogger().debug("Rule: node (NODE_ID separator): ", a[s]), this.$ = { id: a[s] };
307
+ break;
308
+ case 30:
309
+ r.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ", a[s - 1], a[s]), this.$ = {
310
+ id: a[s - 1],
311
+ label: a[s].label,
312
+ typeStr: a[s].typeStr,
313
+ directions: a[s].directions
314
+ };
315
+ break;
316
+ case 31:
317
+ r.getLogger().debug("Rule: dirList: ", a[s]), this.$ = [a[s]];
318
+ break;
319
+ case 32:
320
+ r.getLogger().debug("Rule: dirList: ", a[s - 1], a[s]), this.$ = [a[s - 1]].concat(a[s]);
321
+ break;
322
+ case 33:
323
+ r.getLogger().debug("Rule: nodeShapeNLabel: ", a[s - 2], a[s - 1], a[s]), this.$ = {
324
+ typeStr: a[s - 2] + a[s],
325
+ label: a[s - 1]
326
+ };
327
+ break;
328
+ case 34:
329
+ r.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ", a[s - 3], a[s - 2], " #3:", a[s - 1], a[s]), this.$ = {
330
+ typeStr: a[s - 3] + a[s],
331
+ label: a[s - 2],
332
+ directions: a[s - 1]
333
+ };
334
+ break;
335
+ case 35:
336
+ case 36:
337
+ this.$ = {
338
+ type: "classDef",
339
+ id: a[s - 1].trim(),
340
+ css: a[s].trim()
341
+ };
342
+ break;
343
+ case 37:
344
+ this.$ = {
345
+ type: "applyClass",
346
+ id: a[s - 1].trim(),
347
+ styleClass: a[s].trim()
348
+ };
349
+ break;
350
+ case 38:
351
+ this.$ = {
352
+ type: "applyStyles",
353
+ id: a[s - 1].trim(),
354
+ stylesStr: a[s].trim()
355
+ };
356
+ break;
357
+ }
358
+ }, "anonymous"),
359
+ table: [
360
+ {
361
+ 9: 1,
362
+ 10: [1, 2]
363
+ },
364
+ { 1: [3] },
365
+ {
366
+ 10: t,
367
+ 11: 3,
368
+ 13: 4,
369
+ 19: 5,
370
+ 20: 6,
371
+ 21: n,
372
+ 22: 8,
373
+ 23: 9,
374
+ 24: 10,
375
+ 25: 11,
376
+ 26: 12,
377
+ 28: r,
378
+ 29: i,
379
+ 31: a,
380
+ 39: o,
381
+ 43: s,
382
+ 46: c
383
+ },
384
+ { 8: [1, 20] },
385
+ e(l, [2, 12], {
386
+ 13: 4,
387
+ 19: 5,
388
+ 20: 6,
389
+ 22: 8,
390
+ 23: 9,
391
+ 24: 10,
392
+ 25: 11,
393
+ 26: 12,
394
+ 11: 21,
395
+ 10: t,
396
+ 21: n,
397
+ 28: r,
398
+ 29: i,
399
+ 31: a,
400
+ 39: o,
401
+ 43: s,
402
+ 46: c
403
+ }),
404
+ e(d, [2, 16], {
405
+ 14: 22,
406
+ 15: f,
407
+ 16: p
408
+ }),
409
+ e(d, [2, 17]),
410
+ e(d, [2, 18]),
411
+ e(d, [2, 19]),
412
+ e(d, [2, 20]),
413
+ e(d, [2, 21]),
414
+ e(d, [2, 22]),
415
+ e(m, [2, 25], { 27: [1, 25] }),
416
+ e(d, [2, 26]),
417
+ {
418
+ 19: 26,
419
+ 26: 12,
420
+ 31: a
421
+ },
422
+ {
423
+ 10: t,
424
+ 11: 27,
425
+ 13: 4,
426
+ 19: 5,
427
+ 20: 6,
428
+ 21: n,
429
+ 22: 8,
430
+ 23: 9,
431
+ 24: 10,
432
+ 25: 11,
433
+ 26: 12,
434
+ 28: r,
435
+ 29: i,
436
+ 31: a,
437
+ 39: o,
438
+ 43: s,
439
+ 46: c
440
+ },
441
+ {
442
+ 40: [1, 28],
443
+ 42: [1, 29]
444
+ },
445
+ { 44: [1, 30] },
446
+ { 47: [1, 31] },
447
+ e(h, [2, 29], {
448
+ 32: 32,
449
+ 35: [1, 33],
450
+ 37: [1, 34]
451
+ }),
452
+ { 1: [2, 7] },
453
+ e(l, [2, 13]),
454
+ {
455
+ 26: 35,
456
+ 31: a
457
+ },
458
+ { 31: [2, 14] },
459
+ { 17: [1, 36] },
460
+ e(m, [2, 24]),
461
+ {
462
+ 10: t,
463
+ 11: 37,
464
+ 13: 4,
465
+ 14: 22,
466
+ 15: f,
467
+ 16: p,
468
+ 19: 5,
469
+ 20: 6,
470
+ 21: n,
471
+ 22: 8,
472
+ 23: 9,
473
+ 24: 10,
474
+ 25: 11,
475
+ 26: 12,
476
+ 28: r,
477
+ 29: i,
478
+ 31: a,
479
+ 39: o,
480
+ 43: s,
481
+ 46: c
482
+ },
483
+ { 30: [1, 38] },
484
+ { 41: [1, 39] },
485
+ { 41: [1, 40] },
486
+ { 45: [1, 41] },
487
+ { 48: [1, 42] },
488
+ e(h, [2, 30]),
489
+ { 18: [1, 43] },
490
+ { 18: [1, 44] },
491
+ e(m, [2, 23]),
492
+ { 18: [1, 45] },
493
+ { 30: [1, 46] },
494
+ e(d, [2, 28]),
495
+ e(d, [2, 35]),
496
+ e(d, [2, 36]),
497
+ e(d, [2, 37]),
498
+ e(d, [2, 38]),
499
+ { 36: [1, 47] },
500
+ {
501
+ 33: 48,
502
+ 34: g
503
+ },
504
+ { 15: [1, 50] },
505
+ e(d, [2, 27]),
506
+ e(h, [2, 33]),
507
+ { 38: [1, 51] },
508
+ {
509
+ 33: 52,
510
+ 34: g,
511
+ 38: [2, 31]
512
+ },
513
+ { 31: [2, 15] },
514
+ e(h, [2, 34]),
515
+ { 38: [2, 32] }
516
+ ],
517
+ defaultActions: {
518
+ 20: [2, 7],
519
+ 23: [2, 14],
520
+ 50: [2, 15],
521
+ 52: [2, 32]
522
+ },
523
+ parseError: /* @__PURE__ */ u(function(e, t) {
524
+ if (t.recoverable) this.trace(e);
525
+ else {
526
+ var n = Error(e);
527
+ throw n.hash = t, n;
528
+ }
529
+ }, "parseError"),
530
+ parse: /* @__PURE__ */ u(function(e) {
531
+ var t = this, n = [0], r = [], i = [null], a = [], o = this.table, s = "", c = 0, l = 0, d = 0, f = 2, p = 1, m = a.slice.call(arguments, 1), h = Object.create(this.lexer), g = { yy: {} };
532
+ for (var _ in this.yy) Object.prototype.hasOwnProperty.call(this.yy, _) && (g.yy[_] = this.yy[_]);
533
+ h.setInput(e, g.yy), g.yy.lexer = h, g.yy.parser = this, h.yylloc === void 0 && (h.yylloc = {});
534
+ var v = h.yylloc;
535
+ a.push(v);
536
+ var y = h.options && h.options.ranges;
537
+ typeof g.yy.parseError == "function" ? this.parseError = g.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
538
+ function b(e) {
539
+ n.length -= 2 * e, i.length -= e, a.length -= e;
540
+ }
541
+ u(b, "popStack");
542
+ function x() {
543
+ var e = r.pop() || h.lex() || p;
544
+ return typeof e != "number" && (e instanceof Array && (r = e, e = r.pop()), e = t.symbols_[e] || e), e;
545
+ }
546
+ u(x, "lex");
547
+ for (var S, C, w, T, E, D = {}, O, k, A, j;;) {
548
+ if (w = n[n.length - 1], this.defaultActions[w] ? T = this.defaultActions[w] : (S ??= x(), T = o[w] && o[w][S]), T === void 0 || !T.length || !T[0]) {
549
+ var M = "";
550
+ for (O in j = [], o[w]) this.terminals_[O] && O > f && j.push("'" + this.terminals_[O] + "'");
551
+ M = h.showPosition ? "Parse error on line " + (c + 1) + ":\n" + h.showPosition() + "\nExpecting " + j.join(", ") + ", got '" + (this.terminals_[S] || S) + "'" : "Parse error on line " + (c + 1) + ": Unexpected " + (S == p ? "end of input" : "'" + (this.terminals_[S] || S) + "'"), this.parseError(M, {
552
+ text: h.match,
553
+ token: this.terminals_[S] || S,
554
+ line: h.yylineno,
555
+ loc: v,
556
+ expected: j
557
+ });
558
+ }
559
+ if (T[0] instanceof Array && T.length > 1) throw Error("Parse Error: multiple actions possible at state: " + w + ", token: " + S);
560
+ switch (T[0]) {
561
+ case 1:
562
+ n.push(S), i.push(h.yytext), a.push(h.yylloc), n.push(T[1]), S = null, C ? (S = C, C = null) : (l = h.yyleng, s = h.yytext, c = h.yylineno, v = h.yylloc, d > 0 && d--);
563
+ break;
564
+ case 2:
565
+ if (k = this.productions_[T[1]][1], D.$ = i[i.length - k], D._$ = {
566
+ first_line: a[a.length - (k || 1)].first_line,
567
+ last_line: a[a.length - 1].last_line,
568
+ first_column: a[a.length - (k || 1)].first_column,
569
+ last_column: a[a.length - 1].last_column
570
+ }, y && (D._$.range = [a[a.length - (k || 1)].range[0], a[a.length - 1].range[1]]), E = this.performAction.apply(D, [
571
+ s,
572
+ l,
573
+ c,
574
+ g.yy,
575
+ T[1],
576
+ i,
577
+ a
578
+ ].concat(m)), E !== void 0) return E;
579
+ k && (n = n.slice(0, -1 * k * 2), i = i.slice(0, -1 * k), a = a.slice(0, -1 * k)), n.push(this.productions_[T[1]][0]), i.push(D.$), a.push(D._$), A = o[n[n.length - 2]][n[n.length - 1]], n.push(A);
580
+ break;
581
+ case 3: return !0;
582
+ }
583
+ }
584
+ return !0;
585
+ }, "parse")
586
+ };
587
+ _.lexer = /* @__PURE__ */ (function() {
588
+ return {
589
+ EOF: 1,
590
+ parseError: /* @__PURE__ */ u(function(e, t) {
591
+ if (this.yy.parser) this.yy.parser.parseError(e, t);
592
+ else throw Error(e);
593
+ }, "parseError"),
594
+ setInput: /* @__PURE__ */ u(function(e, t) {
595
+ return this.yy = t || this.yy || {}, this._input = e, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
596
+ first_line: 1,
597
+ first_column: 0,
598
+ last_line: 1,
599
+ last_column: 0
600
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
601
+ }, "setInput"),
602
+ input: /* @__PURE__ */ u(function() {
603
+ var e = this._input[0];
604
+ return this.yytext += e, this.yyleng++, this.offset++, this.match += e, this.matched += e, e.match(/(?:\r\n?|\n).*/g) ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), e;
605
+ }, "input"),
606
+ unput: /* @__PURE__ */ u(function(e) {
607
+ var t = e.length, n = e.split(/(?:\r\n?|\n)/g);
608
+ this._input = e + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - t), this.offset -= t;
609
+ var r = this.match.split(/(?:\r\n?|\n)/g);
610
+ 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);
611
+ var i = this.yylloc.range;
612
+ return this.yylloc = {
613
+ first_line: this.yylloc.first_line,
614
+ last_line: this.yylineno + 1,
615
+ first_column: this.yylloc.first_column,
616
+ last_column: n ? (n.length === r.length ? this.yylloc.first_column : 0) + r[r.length - n.length].length - n[0].length : this.yylloc.first_column - t
617
+ }, this.options.ranges && (this.yylloc.range = [i[0], i[0] + this.yyleng - t]), this.yyleng = this.yytext.length, this;
618
+ }, "unput"),
619
+ more: /* @__PURE__ */ u(function() {
620
+ return this._more = !0, this;
621
+ }, "more"),
622
+ reject: /* @__PURE__ */ u(function() {
623
+ if (this.options.backtrack_lexer) this._backtrack = !0;
624
+ 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).\n" + this.showPosition(), {
625
+ text: "",
626
+ token: null,
627
+ line: this.yylineno
628
+ });
629
+ return this;
630
+ }, "reject"),
631
+ less: /* @__PURE__ */ u(function(e) {
632
+ this.unput(this.match.slice(e));
633
+ }, "less"),
634
+ pastInput: /* @__PURE__ */ u(function() {
635
+ var e = this.matched.substr(0, this.matched.length - this.match.length);
636
+ return (e.length > 20 ? "..." : "") + e.substr(-20).replace(/\n/g, "");
637
+ }, "pastInput"),
638
+ upcomingInput: /* @__PURE__ */ u(function() {
639
+ var e = this.match;
640
+ return e.length < 20 && (e += this._input.substr(0, 20 - e.length)), (e.substr(0, 20) + (e.length > 20 ? "..." : "")).replace(/\n/g, "");
641
+ }, "upcomingInput"),
642
+ showPosition: /* @__PURE__ */ u(function() {
643
+ var e = this.pastInput(), t = Array(e.length + 1).join("-");
644
+ return e + this.upcomingInput() + "\n" + t + "^";
645
+ }, "showPosition"),
646
+ test_match: /* @__PURE__ */ u(function(e, t) {
647
+ var n, r, i;
648
+ if (this.options.backtrack_lexer && (i = {
649
+ yylineno: this.yylineno,
650
+ yylloc: {
651
+ first_line: this.yylloc.first_line,
652
+ last_line: this.last_line,
653
+ first_column: this.yylloc.first_column,
654
+ last_column: this.yylloc.last_column
655
+ },
656
+ yytext: this.yytext,
657
+ match: this.match,
658
+ matches: this.matches,
659
+ matched: this.matched,
660
+ yyleng: this.yyleng,
661
+ offset: this.offset,
662
+ _more: this._more,
663
+ _input: this._input,
664
+ yy: this.yy,
665
+ conditionStack: this.conditionStack.slice(0),
666
+ done: this.done
667
+ }, this.options.ranges && (i.yylloc.range = this.yylloc.range.slice(0))), r = e[0].match(/(?:\r\n?|\n).*/g), r && (this.yylineno += r.length), this.yylloc = {
668
+ first_line: this.yylloc.last_line,
669
+ last_line: this.yylineno + 1,
670
+ first_column: this.yylloc.last_column,
671
+ last_column: r ? r[r.length - 1].length - r[r.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + e[0].length
672
+ }, this.yytext += e[0], this.match += e[0], this.matches = e, 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(e[0].length), this.matched += e[0], n = this.performAction.call(this, this.yy, this, t, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), n) return n;
673
+ if (this._backtrack) {
674
+ for (var a in i) this[a] = i[a];
675
+ return !1;
676
+ }
677
+ return !1;
678
+ }, "test_match"),
679
+ next: /* @__PURE__ */ u(function() {
680
+ if (this.done) return this.EOF;
681
+ this._input || (this.done = !0);
682
+ var e, t, n, r;
683
+ this._more || (this.yytext = "", this.match = "");
684
+ for (var i = this._currentRules(), a = 0; a < i.length; a++) if (n = this._input.match(this.rules[i[a]]), n && (!t || n[0].length > t[0].length)) {
685
+ if (t = n, r = a, this.options.backtrack_lexer) {
686
+ if (e = this.test_match(n, i[a]), e !== !1) return e;
687
+ if (this._backtrack) {
688
+ t = !1;
689
+ continue;
690
+ } else return !1;
691
+ } else if (!this.options.flex) break;
692
+ }
693
+ return t ? (e = this.test_match(t, i[r]), e === !1 ? !1 : e) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
694
+ text: "",
695
+ token: null,
696
+ line: this.yylineno
697
+ });
698
+ }, "next"),
699
+ lex: /* @__PURE__ */ u(function() {
700
+ return this.next() || this.lex();
701
+ }, "lex"),
702
+ begin: /* @__PURE__ */ u(function(e) {
703
+ this.conditionStack.push(e);
704
+ }, "begin"),
705
+ popState: /* @__PURE__ */ u(function() {
706
+ return this.conditionStack.length - 1 > 0 ? this.conditionStack.pop() : this.conditionStack[0];
707
+ }, "popState"),
708
+ _currentRules: /* @__PURE__ */ u(function() {
709
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
710
+ }, "_currentRules"),
711
+ topState: /* @__PURE__ */ u(function(e) {
712
+ return e = this.conditionStack.length - 1 - Math.abs(e || 0), e >= 0 ? this.conditionStack[e] : "INITIAL";
713
+ }, "topState"),
714
+ pushState: /* @__PURE__ */ u(function(e) {
715
+ this.begin(e);
716
+ }, "pushState"),
717
+ stateStackSize: /* @__PURE__ */ u(function() {
718
+ return this.conditionStack.length;
719
+ }, "stateStackSize"),
720
+ options: {},
721
+ performAction: /* @__PURE__ */ u(function(e, t, n, r) {
722
+ switch (n) {
723
+ case 0: return e.getLogger().debug("Found block-beta"), 10;
724
+ case 1: return e.getLogger().debug("Found id-block"), 29;
725
+ case 2: return e.getLogger().debug("Found block"), 10;
726
+ case 3:
727
+ e.getLogger().debug(".", t.yytext);
728
+ break;
729
+ case 4:
730
+ e.getLogger().debug("_", t.yytext);
731
+ break;
732
+ case 5: return 5;
733
+ case 6: return t.yytext = -1, 28;
734
+ case 7: return t.yytext = t.yytext.replace(/columns\s+/, ""), e.getLogger().debug("COLUMNS (LEX)", t.yytext), 28;
735
+ case 8:
736
+ this.pushState("md_string");
737
+ break;
738
+ case 9: return "MD_STR";
739
+ case 10:
740
+ this.popState();
741
+ break;
742
+ case 11:
743
+ this.pushState("string");
744
+ break;
745
+ case 12:
746
+ e.getLogger().debug("LEX: POPPING STR:", t.yytext), this.popState();
747
+ break;
748
+ case 13: return e.getLogger().debug("LEX: STR end:", t.yytext), "STR";
749
+ case 14: return t.yytext = t.yytext.replace(/space\:/, ""), e.getLogger().debug("SPACE NUM (LEX)", t.yytext), 21;
750
+ case 15: return t.yytext = "1", e.getLogger().debug("COLUMNS (LEX)", t.yytext), 21;
751
+ case 16: return 42;
752
+ case 17: return "LINKSTYLE";
753
+ case 18: return "INTERPOLATE";
754
+ case 19: return this.pushState("CLASSDEF"), 39;
755
+ case 20: return this.popState(), this.pushState("CLASSDEFID"), "DEFAULT_CLASSDEF_ID";
756
+ case 21: return this.popState(), this.pushState("CLASSDEFID"), 40;
757
+ case 22: return this.popState(), 41;
758
+ case 23: return this.pushState("CLASS"), 43;
759
+ case 24: return this.popState(), this.pushState("CLASS_STYLE"), 44;
760
+ case 25: return this.popState(), 45;
761
+ case 26: return this.pushState("STYLE_STMNT"), 46;
762
+ case 27: return this.popState(), this.pushState("STYLE_DEFINITION"), 47;
763
+ case 28: return this.popState(), 48;
764
+ case 29: return this.pushState("acc_title"), "acc_title";
765
+ case 30: return this.popState(), "acc_title_value";
766
+ case 31: return this.pushState("acc_descr"), "acc_descr";
767
+ case 32: return this.popState(), "acc_descr_value";
768
+ case 33:
769
+ this.pushState("acc_descr_multiline");
770
+ break;
771
+ case 34:
772
+ this.popState();
773
+ break;
774
+ case 35: return "acc_descr_multiline_value";
775
+ case 36: return 30;
776
+ case 37: return this.popState(), e.getLogger().debug("Lex: (("), "NODE_DEND";
777
+ case 38: return this.popState(), e.getLogger().debug("Lex: (("), "NODE_DEND";
778
+ case 39: return this.popState(), e.getLogger().debug("Lex: ))"), "NODE_DEND";
779
+ case 40: return this.popState(), e.getLogger().debug("Lex: (("), "NODE_DEND";
780
+ case 41: return this.popState(), e.getLogger().debug("Lex: (("), "NODE_DEND";
781
+ case 42: return this.popState(), e.getLogger().debug("Lex: (-"), "NODE_DEND";
782
+ case 43: return this.popState(), e.getLogger().debug("Lex: -)"), "NODE_DEND";
783
+ case 44: return this.popState(), e.getLogger().debug("Lex: (("), "NODE_DEND";
784
+ case 45: return this.popState(), e.getLogger().debug("Lex: ]]"), "NODE_DEND";
785
+ case 46: return this.popState(), e.getLogger().debug("Lex: ("), "NODE_DEND";
786
+ case 47: return this.popState(), e.getLogger().debug("Lex: ])"), "NODE_DEND";
787
+ case 48: return this.popState(), e.getLogger().debug("Lex: /]"), "NODE_DEND";
788
+ case 49: return this.popState(), e.getLogger().debug("Lex: /]"), "NODE_DEND";
789
+ case 50: return this.popState(), e.getLogger().debug("Lex: )]"), "NODE_DEND";
790
+ case 51: return this.popState(), e.getLogger().debug("Lex: )"), "NODE_DEND";
791
+ case 52: return this.popState(), e.getLogger().debug("Lex: ]>"), "NODE_DEND";
792
+ case 53: return this.popState(), e.getLogger().debug("Lex: ]"), "NODE_DEND";
793
+ case 54: return e.getLogger().debug("Lexa: -)"), this.pushState("NODE"), 35;
794
+ case 55: return e.getLogger().debug("Lexa: (-"), this.pushState("NODE"), 35;
795
+ case 56: return e.getLogger().debug("Lexa: ))"), this.pushState("NODE"), 35;
796
+ case 57: return e.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
797
+ case 58: return e.getLogger().debug("Lex: ((("), this.pushState("NODE"), 35;
798
+ case 59: return e.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
799
+ case 60: return e.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
800
+ case 61: return e.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
801
+ case 62: return e.getLogger().debug("Lexc: >"), this.pushState("NODE"), 35;
802
+ case 63: return e.getLogger().debug("Lexa: (["), this.pushState("NODE"), 35;
803
+ case 64: return e.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
804
+ case 65: return this.pushState("NODE"), 35;
805
+ case 66: return this.pushState("NODE"), 35;
806
+ case 67: return this.pushState("NODE"), 35;
807
+ case 68: return this.pushState("NODE"), 35;
808
+ case 69: return this.pushState("NODE"), 35;
809
+ case 70: return this.pushState("NODE"), 35;
810
+ case 71: return this.pushState("NODE"), 35;
811
+ case 72: return e.getLogger().debug("Lexa: ["), this.pushState("NODE"), 35;
812
+ case 73: return this.pushState("BLOCK_ARROW"), e.getLogger().debug("LEX ARR START"), 37;
813
+ case 74: return e.getLogger().debug("Lex: NODE_ID", t.yytext), 31;
814
+ case 75: return e.getLogger().debug("Lex: EOF", t.yytext), 8;
815
+ case 76:
816
+ this.pushState("md_string");
817
+ break;
818
+ case 77:
819
+ this.pushState("md_string");
820
+ break;
821
+ case 78: return "NODE_DESCR";
822
+ case 79:
823
+ this.popState();
824
+ break;
825
+ case 80:
826
+ e.getLogger().debug("Lex: Starting string"), this.pushState("string");
827
+ break;
828
+ case 81:
829
+ e.getLogger().debug("LEX ARR: Starting string"), this.pushState("string");
830
+ break;
831
+ case 82: return e.getLogger().debug("LEX: NODE_DESCR:", t.yytext), "NODE_DESCR";
832
+ case 83:
833
+ e.getLogger().debug("LEX POPPING"), this.popState();
834
+ break;
835
+ case 84:
836
+ e.getLogger().debug("Lex: =>BAE"), this.pushState("ARROW_DIR");
837
+ break;
838
+ case 85: return t.yytext = t.yytext.replace(/^,\s*/, ""), e.getLogger().debug("Lex (right): dir:", t.yytext), "DIR";
839
+ case 86: return t.yytext = t.yytext.replace(/^,\s*/, ""), e.getLogger().debug("Lex (left):", t.yytext), "DIR";
840
+ case 87: return t.yytext = t.yytext.replace(/^,\s*/, ""), e.getLogger().debug("Lex (x):", t.yytext), "DIR";
841
+ case 88: return t.yytext = t.yytext.replace(/^,\s*/, ""), e.getLogger().debug("Lex (y):", t.yytext), "DIR";
842
+ case 89: return t.yytext = t.yytext.replace(/^,\s*/, ""), e.getLogger().debug("Lex (up):", t.yytext), "DIR";
843
+ case 90: return t.yytext = t.yytext.replace(/^,\s*/, ""), e.getLogger().debug("Lex (down):", t.yytext), "DIR";
844
+ case 91: return t.yytext = "]>", e.getLogger().debug("Lex (ARROW_DIR end):", t.yytext), this.popState(), this.popState(), "BLOCK_ARROW_END";
845
+ case 92: return e.getLogger().debug("Lex: LINK", "#" + t.yytext + "#"), 15;
846
+ case 93: return e.getLogger().debug("Lex: LINK", t.yytext), 15;
847
+ case 94: return e.getLogger().debug("Lex: LINK", t.yytext), 15;
848
+ case 95: return e.getLogger().debug("Lex: LINK", t.yytext), 15;
849
+ case 96: return e.getLogger().debug("Lex: START_LINK", t.yytext), this.pushState("LLABEL"), 16;
850
+ case 97: return e.getLogger().debug("Lex: START_LINK", t.yytext), this.pushState("LLABEL"), 16;
851
+ case 98: return e.getLogger().debug("Lex: START_LINK", t.yytext), this.pushState("LLABEL"), 16;
852
+ case 99:
853
+ this.pushState("md_string");
854
+ break;
855
+ case 100: return e.getLogger().debug("Lex: Starting string"), this.pushState("string"), "LINK_LABEL";
856
+ case 101: return this.popState(), e.getLogger().debug("Lex: LINK", "#" + t.yytext + "#"), 15;
857
+ case 102: return this.popState(), e.getLogger().debug("Lex: LINK", t.yytext), 15;
858
+ case 103: return this.popState(), e.getLogger().debug("Lex: LINK", t.yytext), 15;
859
+ case 104: return e.getLogger().debug("Lex: COLON", t.yytext), t.yytext = t.yytext.slice(1), 27;
860
+ }
861
+ }, "anonymous"),
862
+ rules: [
863
+ /^(?:block-beta\b)/,
864
+ /^(?:block:)/,
865
+ /^(?:block\b)/,
866
+ /^(?:[\s]+)/,
867
+ /^(?:[\n]+)/,
868
+ /^(?:((\u000D\u000A)|(\u000A)))/,
869
+ /^(?:columns\s+auto\b)/,
870
+ /^(?:columns\s+[\d]+)/,
871
+ /^(?:["][`])/,
872
+ /^(?:[^`"]+)/,
873
+ /^(?:[`]["])/,
874
+ /^(?:["])/,
875
+ /^(?:["])/,
876
+ /^(?:[^"]*)/,
877
+ /^(?:space[:]\d+)/,
878
+ /^(?:space\b)/,
879
+ /^(?:default\b)/,
880
+ /^(?:linkStyle\b)/,
881
+ /^(?:interpolate\b)/,
882
+ /^(?:classDef\s+)/,
883
+ /^(?:DEFAULT\s+)/,
884
+ /^(?:\w+\s+)/,
885
+ /^(?:[^\n]*)/,
886
+ /^(?:class\s+)/,
887
+ /^(?:(\w+)+((,\s*\w+)*))/,
888
+ /^(?:[^\n]*)/,
889
+ /^(?:style\s+)/,
890
+ /^(?:(\w+)+((,\s*\w+)*))/,
891
+ /^(?:[^\n]*)/,
892
+ /^(?:accTitle\s*:\s*)/,
893
+ /^(?:(?!\n||)*[^\n]*)/,
894
+ /^(?:accDescr\s*:\s*)/,
895
+ /^(?:(?!\n||)*[^\n]*)/,
896
+ /^(?:accDescr\s*\{\s*)/,
897
+ /^(?:[\}])/,
898
+ /^(?:[^\}]*)/,
899
+ /^(?:end\b\s*)/,
900
+ /^(?:\(\(\()/,
901
+ /^(?:\)\)\))/,
902
+ /^(?:[\)]\))/,
903
+ /^(?:\}\})/,
904
+ /^(?:\})/,
905
+ /^(?:\(-)/,
906
+ /^(?:-\))/,
907
+ /^(?:\(\()/,
908
+ /^(?:\]\])/,
909
+ /^(?:\()/,
910
+ /^(?:\]\))/,
911
+ /^(?:\\\])/,
912
+ /^(?:\/\])/,
913
+ /^(?:\)\])/,
914
+ /^(?:[\)])/,
915
+ /^(?:\]>)/,
916
+ /^(?:[\]])/,
917
+ /^(?:-\))/,
918
+ /^(?:\(-)/,
919
+ /^(?:\)\))/,
920
+ /^(?:\))/,
921
+ /^(?:\(\(\()/,
922
+ /^(?:\(\()/,
923
+ /^(?:\{\{)/,
924
+ /^(?:\{)/,
925
+ /^(?:>)/,
926
+ /^(?:\(\[)/,
927
+ /^(?:\()/,
928
+ /^(?:\[\[)/,
929
+ /^(?:\[\|)/,
930
+ /^(?:\[\()/,
931
+ /^(?:\)\)\))/,
932
+ /^(?:\[\\)/,
933
+ /^(?:\[\/)/,
934
+ /^(?:\[\\)/,
935
+ /^(?:\[)/,
936
+ /^(?:<\[)/,
937
+ /^(?:[^\(\[\n\-\)\{\}\s\<\>:]+)/,
938
+ /^(?:$)/,
939
+ /^(?:["][`])/,
940
+ /^(?:["][`])/,
941
+ /^(?:[^`"]+)/,
942
+ /^(?:[`]["])/,
943
+ /^(?:["])/,
944
+ /^(?:["])/,
945
+ /^(?:[^"]+)/,
946
+ /^(?:["])/,
947
+ /^(?:\]>\s*\()/,
948
+ /^(?:,?\s*right\s*)/,
949
+ /^(?:,?\s*left\s*)/,
950
+ /^(?:,?\s*x\s*)/,
951
+ /^(?:,?\s*y\s*)/,
952
+ /^(?:,?\s*up\s*)/,
953
+ /^(?:,?\s*down\s*)/,
954
+ /^(?:\)\s*)/,
955
+ /^(?:\s*[xo<]?--+[-xo>]\s*)/,
956
+ /^(?:\s*[xo<]?==+[=xo>]\s*)/,
957
+ /^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,
958
+ /^(?:\s*~~[\~]+\s*)/,
959
+ /^(?:\s*[xo<]?--\s*)/,
960
+ /^(?:\s*[xo<]?==\s*)/,
961
+ /^(?:\s*[xo<]?-\.\s*)/,
962
+ /^(?:["][`])/,
963
+ /^(?:["])/,
964
+ /^(?:\s*[xo<]?--+[-xo>]\s*)/,
965
+ /^(?:\s*[xo<]?==+[=xo>]\s*)/,
966
+ /^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,
967
+ /^(?::\d+)/
968
+ ],
969
+ conditions: {
970
+ STYLE_DEFINITION: {
971
+ rules: [28],
972
+ inclusive: !1
973
+ },
974
+ STYLE_STMNT: {
975
+ rules: [27],
976
+ inclusive: !1
977
+ },
978
+ CLASSDEFID: {
979
+ rules: [22],
980
+ inclusive: !1
981
+ },
982
+ CLASSDEF: {
983
+ rules: [20, 21],
984
+ inclusive: !1
985
+ },
986
+ CLASS_STYLE: {
987
+ rules: [25],
988
+ inclusive: !1
989
+ },
990
+ CLASS: {
991
+ rules: [24],
992
+ inclusive: !1
993
+ },
994
+ LLABEL: {
995
+ rules: [
996
+ 99,
997
+ 100,
998
+ 101,
999
+ 102,
1000
+ 103
1001
+ ],
1002
+ inclusive: !1
1003
+ },
1004
+ ARROW_DIR: {
1005
+ rules: [
1006
+ 85,
1007
+ 86,
1008
+ 87,
1009
+ 88,
1010
+ 89,
1011
+ 90,
1012
+ 91
1013
+ ],
1014
+ inclusive: !1
1015
+ },
1016
+ BLOCK_ARROW: {
1017
+ rules: [
1018
+ 76,
1019
+ 81,
1020
+ 84
1021
+ ],
1022
+ inclusive: !1
1023
+ },
1024
+ NODE: {
1025
+ rules: [
1026
+ 37,
1027
+ 38,
1028
+ 39,
1029
+ 40,
1030
+ 41,
1031
+ 42,
1032
+ 43,
1033
+ 44,
1034
+ 45,
1035
+ 46,
1036
+ 47,
1037
+ 48,
1038
+ 49,
1039
+ 50,
1040
+ 51,
1041
+ 52,
1042
+ 53,
1043
+ 77,
1044
+ 80
1045
+ ],
1046
+ inclusive: !1
1047
+ },
1048
+ md_string: {
1049
+ rules: [
1050
+ 9,
1051
+ 10,
1052
+ 78,
1053
+ 79
1054
+ ],
1055
+ inclusive: !1
1056
+ },
1057
+ space: {
1058
+ rules: [],
1059
+ inclusive: !1
1060
+ },
1061
+ string: {
1062
+ rules: [
1063
+ 12,
1064
+ 13,
1065
+ 82,
1066
+ 83
1067
+ ],
1068
+ inclusive: !1
1069
+ },
1070
+ acc_descr_multiline: {
1071
+ rules: [34, 35],
1072
+ inclusive: !1
1073
+ },
1074
+ acc_descr: {
1075
+ rules: [32],
1076
+ inclusive: !1
1077
+ },
1078
+ acc_title: {
1079
+ rules: [30],
1080
+ inclusive: !1
1081
+ },
1082
+ INITIAL: {
1083
+ rules: [
1084
+ 0,
1085
+ 1,
1086
+ 2,
1087
+ 3,
1088
+ 4,
1089
+ 5,
1090
+ 6,
1091
+ 7,
1092
+ 8,
1093
+ 11,
1094
+ 14,
1095
+ 15,
1096
+ 16,
1097
+ 17,
1098
+ 18,
1099
+ 19,
1100
+ 23,
1101
+ 26,
1102
+ 29,
1103
+ 31,
1104
+ 33,
1105
+ 36,
1106
+ 54,
1107
+ 55,
1108
+ 56,
1109
+ 57,
1110
+ 58,
1111
+ 59,
1112
+ 60,
1113
+ 61,
1114
+ 62,
1115
+ 63,
1116
+ 64,
1117
+ 65,
1118
+ 66,
1119
+ 67,
1120
+ 68,
1121
+ 69,
1122
+ 70,
1123
+ 71,
1124
+ 72,
1125
+ 73,
1126
+ 74,
1127
+ 75,
1128
+ 92,
1129
+ 93,
1130
+ 94,
1131
+ 95,
1132
+ 96,
1133
+ 97,
1134
+ 98,
1135
+ 104
1136
+ ],
1137
+ inclusive: !0
1138
+ }
1139
+ }
1140
+ };
1141
+ })();
1142
+ function v() {
1143
+ this.yy = {};
1144
+ }
1145
+ return u(v, "Parser"), v.prototype = _, _.Parser = v, new v();
1146
+ })();
1147
+ E.parser = E;
1148
+ var D = E, O = /* @__PURE__ */ new Map(), k = [], A = /* @__PURE__ */ new Map(), j = "color", M = "fill", ee = "bgFill", te = ",", ne = r(), N = /* @__PURE__ */ new Map(), re = "", ie = /* @__PURE__ */ u((e) => a.sanitizeText(e, ne), "sanitizeText"), ae = /* @__PURE__ */ u(function(e, t = "") {
1149
+ let n = N.get(e);
1150
+ n || (n = {
1151
+ id: e,
1152
+ styles: [],
1153
+ textStyles: []
1154
+ }, N.set(e, n)), t?.split(te).forEach((e) => {
1155
+ let t = e.replace(/([^;]*);/, "$1").trim();
1156
+ if (RegExp(j).exec(e)) {
1157
+ let e = t.replace(M, ee).replace(j, M);
1158
+ n.textStyles.push(e);
1159
+ }
1160
+ n.styles.push(t);
1161
+ });
1162
+ }, "addStyleClass"), oe = /* @__PURE__ */ u(function(e, t = "") {
1163
+ let n = O.get(e);
1164
+ t != null && (n.styles = t.split(te));
1165
+ }, "addStyle2Node"), se = /* @__PURE__ */ u(function(e, t) {
1166
+ e.split(",").forEach(function(e) {
1167
+ let n = O.get(e);
1168
+ if (n === void 0) {
1169
+ let t = e.trim();
1170
+ n = {
1171
+ id: t,
1172
+ type: "na",
1173
+ children: []
1174
+ }, O.set(t, n);
1175
+ }
1176
+ n.classes ||= [], n.classes.push(t);
1177
+ });
1178
+ }, "setCssClass"), ce = /* @__PURE__ */ u((e, t) => {
1179
+ let n = e.flat(), r = [], i = n.find((e) => e?.type === "column-setting")?.columns ?? -1;
1180
+ for (let e of n) {
1181
+ if (typeof i == "number" && i > 0 && e.type !== "column-setting" && typeof e.widthInColumns == "number" && e.widthInColumns > i && l.warn(`Block ${e.id} width ${e.widthInColumns} exceeds configured column width ${i}`), e.label &&= ie(e.label), e.type === "classDef") {
1182
+ ae(e.id, e.css);
1183
+ continue;
1184
+ }
1185
+ if (e.type === "applyClass") {
1186
+ se(e.id, e?.styleClass ?? "");
1187
+ continue;
1188
+ }
1189
+ if (e.type === "applyStyles") {
1190
+ e?.stylesStr && oe(e.id, e?.stylesStr);
1191
+ continue;
1192
+ }
1193
+ if (e.type === "column-setting") t.columns = e.columns ?? -1;
1194
+ else if (e.type === "edge") {
1195
+ let t = (A.get(e.id) ?? 0) + 1;
1196
+ A.set(e.id, t), e.id = t + "-" + e.id, k.push(e);
1197
+ } else {
1198
+ e.label || (e.type === "composite" ? e.label = "" : e.label = e.id);
1199
+ let t = O.get(e.id);
1200
+ if (t === void 0 ? O.set(e.id, e) : (e.type !== "na" && (t.type = e.type), e.label !== e.id && (t.label = e.label)), e.children && ce(e.children, e), e.type === "space") {
1201
+ let t = e.width ?? 1;
1202
+ for (let n = 0; n < t; n++) {
1203
+ let t = T(e);
1204
+ t.id = t.id + "-" + n, O.set(t.id, t), r.push(t);
1205
+ }
1206
+ } else t === void 0 && r.push(e);
1207
+ }
1208
+ }
1209
+ t.children = r;
1210
+ }, "populateBlockDatabase"), le = [], P = {
1211
+ id: "root",
1212
+ type: "composite",
1213
+ children: [],
1214
+ columns: -1
1215
+ }, ue = /* @__PURE__ */ u(() => {
1216
+ l.debug("Clear called"), n(), P = {
1217
+ id: "root",
1218
+ type: "composite",
1219
+ children: [],
1220
+ columns: -1
1221
+ }, O = /* @__PURE__ */ new Map([["root", P]]), le = [], N = /* @__PURE__ */ new Map(), k = [], A = /* @__PURE__ */ new Map(), re = "";
1222
+ }, "clear");
1223
+ function de(e) {
1224
+ switch (l.debug("typeStr2Type", e), e) {
1225
+ case "[]": return "square";
1226
+ case "()": return l.debug("we have a round"), "round";
1227
+ case "(())": return "circle";
1228
+ case ">]": return "rect_left_inv_arrow";
1229
+ case "{}": return "diamond";
1230
+ case "{{}}": return "hexagon";
1231
+ case "([])": return "stadium";
1232
+ case "[[]]": return "subroutine";
1233
+ case "[()]": return "cylinder";
1234
+ case "((()))": return "doublecircle";
1235
+ case "[//]": return "lean_right";
1236
+ case "[\\\\]": return "lean_left";
1237
+ case "[/\\]": return "trapezoid";
1238
+ case "[\\/]": return "inv_trapezoid";
1239
+ case "<[]>": return "block_arrow";
1240
+ default: return "na";
1241
+ }
1242
+ }
1243
+ u(de, "typeStr2Type");
1244
+ function fe(e) {
1245
+ switch (l.debug("typeStr2Type", e), e) {
1246
+ case "==": return "thick";
1247
+ default: return "normal";
1248
+ }
1249
+ }
1250
+ u(fe, "edgeTypeStr2Type");
1251
+ function pe(e) {
1252
+ switch (e.replace(/^[\s-]+|[\s-]+$/g, "")) {
1253
+ case "x": return "arrow_cross";
1254
+ case "o": return "arrow_circle";
1255
+ case ">": return "arrow_point";
1256
+ default: return "";
1257
+ }
1258
+ }
1259
+ u(pe, "edgeStrToEdgeData");
1260
+ var me = 0, he = {
1261
+ getConfig: /* @__PURE__ */ u(() => c().block, "getConfig"),
1262
+ typeStr2Type: de,
1263
+ edgeTypeStr2Type: fe,
1264
+ edgeStrToEdgeData: pe,
1265
+ getLogger: /* @__PURE__ */ u(() => l, "getLogger"),
1266
+ getBlocksFlat: /* @__PURE__ */ u(() => [...O.values()], "getBlocksFlat"),
1267
+ getBlocks: /* @__PURE__ */ u(() => le || [], "getBlocks"),
1268
+ getEdges: /* @__PURE__ */ u(() => k, "getEdges"),
1269
+ setHierarchy: /* @__PURE__ */ u((e) => {
1270
+ P.children = e, ce(e, P), le = P.children;
1271
+ }, "setHierarchy"),
1272
+ getBlock: /* @__PURE__ */ u((e) => O.get(e), "getBlock"),
1273
+ setBlock: /* @__PURE__ */ u((e) => {
1274
+ O.set(e.id, e);
1275
+ }, "setBlock"),
1276
+ getColumns: /* @__PURE__ */ u((e) => {
1277
+ let t = O.get(e);
1278
+ return t ? t.columns ? t.columns : t.children ? t.children.length : -1 : -1;
1279
+ }, "getColumns"),
1280
+ getClasses: /* @__PURE__ */ u(function() {
1281
+ return N;
1282
+ }, "getClasses"),
1283
+ clear: ue,
1284
+ generateId: /* @__PURE__ */ u(() => (me++, "id-" + Math.random().toString(36).substr(2, 12) + "-" + me), "generateId"),
1285
+ setDiagramId: /* @__PURE__ */ u((e) => {
1286
+ re = e;
1287
+ }, "setDiagramId"),
1288
+ getDiagramId: /* @__PURE__ */ u(() => re, "getDiagramId")
1289
+ }, F = /* @__PURE__ */ u((e, t) => {
1290
+ let n = f;
1291
+ return o(n(e, "r"), n(e, "g"), n(e, "b"), t);
1292
+ }, "fade"), ge = /* @__PURE__ */ u((e) => `.label {
1293
+ font-family: ${e.fontFamily};
1294
+ color: ${e.nodeTextColor || e.textColor};
1295
+ }
1296
+ .cluster-label text {
1297
+ fill: ${e.titleColor};
1298
+ }
1299
+ .cluster-label span,p {
1300
+ color: ${e.titleColor};
1301
+ }
1302
+
1303
+
1304
+
1305
+ .label text,span,p {
1306
+ fill: ${e.nodeTextColor || e.textColor};
1307
+ color: ${e.nodeTextColor || e.textColor};
1308
+ }
1309
+
1310
+ .node rect,
1311
+ .node circle,
1312
+ .node ellipse,
1313
+ .node polygon,
1314
+ .node path {
1315
+ fill: ${e.mainBkg};
1316
+ stroke: ${e.nodeBorder};
1317
+ stroke-width: 1px;
1318
+ }
1319
+ .flowchart-label text {
1320
+ text-anchor: middle;
1321
+ }
1322
+ // .flowchart-label .text-outer-tspan {
1323
+ // text-anchor: middle;
1324
+ // }
1325
+ // .flowchart-label .text-inner-tspan {
1326
+ // text-anchor: start;
1327
+ // }
1328
+
1329
+ .node .label {
1330
+ text-align: center;
1331
+ }
1332
+ .node.clickable {
1333
+ cursor: pointer;
1334
+ }
1335
+
1336
+ .arrowheadPath {
1337
+ fill: ${e.arrowheadColor};
1338
+ }
1339
+
1340
+ .edgePath .path {
1341
+ stroke: ${e.lineColor};
1342
+ stroke-width: 2.0px;
1343
+ }
1344
+
1345
+ .flowchart-link {
1346
+ stroke: ${e.lineColor};
1347
+ fill: none;
1348
+ }
1349
+
1350
+ .edgeLabel {
1351
+ background-color: ${e.edgeLabelBackground};
1352
+ /*
1353
+ * This is for backward compatibility with existing code that didn't
1354
+ * add a \`<p>\` around edge labels.
1355
+ *
1356
+ * TODO: We should probably remove this in a future release.
1357
+ */
1358
+ p {
1359
+ margin: 0;
1360
+ padding: 0;
1361
+ display: inline;
1362
+ }
1363
+ rect {
1364
+ opacity: 0.5;
1365
+ background-color: ${e.edgeLabelBackground};
1366
+ fill: ${e.edgeLabelBackground};
1367
+ }
1368
+ text-align: center;
1369
+ }
1370
+
1371
+ /* For html labels only */
1372
+ .labelBkg {
1373
+ background-color: ${e.edgeLabelBackground};
1374
+ }
1375
+
1376
+ .node .cluster {
1377
+ // fill: ${F(e.mainBkg, .5)};
1378
+ fill: ${F(e.clusterBkg, .5)};
1379
+ stroke: ${F(e.clusterBorder, .2)};
1380
+ box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
1381
+ stroke-width: 1px;
1382
+ }
1383
+
1384
+ .cluster text {
1385
+ fill: ${e.titleColor};
1386
+ }
1387
+
1388
+ .cluster span,p {
1389
+ color: ${e.titleColor};
1390
+ }
1391
+ /* .cluster div {
1392
+ color: ${e.titleColor};
1393
+ } */
1394
+
1395
+ div.mermaidTooltip {
1396
+ position: absolute;
1397
+ text-align: center;
1398
+ max-width: 200px;
1399
+ padding: 2px;
1400
+ font-family: ${e.fontFamily};
1401
+ font-size: 12px;
1402
+ background: ${e.tertiaryColor};
1403
+ border: 1px solid ${e.border2};
1404
+ border-radius: 2px;
1405
+ pointer-events: none;
1406
+ z-index: 100;
1407
+ }
1408
+
1409
+ .flowchartTitleText {
1410
+ text-anchor: middle;
1411
+ font-size: 18px;
1412
+ fill: ${e.textColor};
1413
+ }
1414
+ ${C()}
1415
+ `, "getStyles"), _e = /* @__PURE__ */ u((e, t, n, r) => {
1416
+ t.forEach((t) => {
1417
+ ve[t](e, n, r);
1418
+ });
1419
+ }, "insertMarkers"), ve = {
1420
+ extension: /* @__PURE__ */ u((e, t, n) => {
1421
+ l.trace("Making markers for ", n), e.append("defs").append("marker").attr("id", n + "_" + t + "-extensionStart").attr("class", "marker extension " + t).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 1,7 L18,13 V 1 Z"), e.append("defs").append("marker").attr("id", n + "_" + t + "-extensionEnd").attr("class", "marker extension " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 1,1 V 13 L18,7 Z");
1422
+ }, "extension"),
1423
+ composition: /* @__PURE__ */ u((e, t, n) => {
1424
+ e.append("defs").append("marker").attr("id", n + "_" + t + "-compositionStart").attr("class", "marker composition " + t).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", n + "_" + t + "-compositionEnd").attr("class", "marker composition " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
1425
+ }, "composition"),
1426
+ aggregation: /* @__PURE__ */ u((e, t, n) => {
1427
+ e.append("defs").append("marker").attr("id", n + "_" + t + "-aggregationStart").attr("class", "marker aggregation " + t).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", n + "_" + t + "-aggregationEnd").attr("class", "marker aggregation " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
1428
+ }, "aggregation"),
1429
+ dependency: /* @__PURE__ */ u((e, t, n) => {
1430
+ e.append("defs").append("marker").attr("id", n + "_" + t + "-dependencyStart").attr("class", "marker dependency " + t).attr("refX", 6).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 5,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", n + "_" + t + "-dependencyEnd").attr("class", "marker dependency " + t).attr("refX", 13).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z");
1431
+ }, "dependency"),
1432
+ lollipop: /* @__PURE__ */ u((e, t, n) => {
1433
+ e.append("defs").append("marker").attr("id", n + "_" + t + "-lollipopStart").attr("class", "marker lollipop " + t).attr("refX", 13).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("stroke", "black").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6), e.append("defs").append("marker").attr("id", n + "_" + t + "-lollipopEnd").attr("class", "marker lollipop " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("stroke", "black").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6);
1434
+ }, "lollipop"),
1435
+ point: /* @__PURE__ */ u((e, t, n) => {
1436
+ e.append("marker").attr("id", n + "_" + t + "-pointEnd").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", 6).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"), e.append("marker").attr("id", n + "_" + t + "-pointStart").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", 4.5).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 5 L 10 10 L 10 0 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
1437
+ }, "point"),
1438
+ circle: /* @__PURE__ */ u((e, t, n) => {
1439
+ e.append("marker").attr("id", n + "_" + t + "-circleEnd").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", 11).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"), e.append("marker").attr("id", n + "_" + t + "-circleStart").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", -1).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
1440
+ }, "circle"),
1441
+ cross: /* @__PURE__ */ u((e, t, n) => {
1442
+ e.append("marker").attr("id", n + "_" + t + "-crossEnd").attr("class", "marker cross " + t).attr("viewBox", "0 0 11 11").attr("refX", 12).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0"), e.append("marker").attr("id", n + "_" + t + "-crossStart").attr("class", "marker cross " + t).attr("viewBox", "0 0 11 11").attr("refX", -1).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0");
1443
+ }, "cross"),
1444
+ barb: /* @__PURE__ */ u((e, t, n) => {
1445
+ e.append("defs").append("marker").attr("id", n + "_" + t + "-barbEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 14).attr("markerUnits", "strokeWidth").attr("orient", "auto").append("path").attr("d", "M 19,7 L9,13 L14,7 L9,1 Z");
1446
+ }, "barb")
1447
+ }, ye = _e, I = r()?.block?.padding ?? 8;
1448
+ function L(e, t) {
1449
+ if (e === 0 || !Number.isInteger(e)) throw Error("Columns must be an integer !== 0.");
1450
+ if (t < 0 || !Number.isInteger(t)) throw Error("Position must be a non-negative integer." + t);
1451
+ return e < 0 ? {
1452
+ px: t,
1453
+ py: 0
1454
+ } : e === 1 ? {
1455
+ px: 0,
1456
+ py: t
1457
+ } : {
1458
+ px: t % e,
1459
+ py: Math.floor(t / e)
1460
+ };
1461
+ }
1462
+ u(L, "calculateBlockPosition");
1463
+ var be = /* @__PURE__ */ u((e) => {
1464
+ let t = 0, n = 0;
1465
+ for (let r of e.children) {
1466
+ let { width: e, height: i, x: a, y: o } = r.size ?? {
1467
+ width: 0,
1468
+ height: 0,
1469
+ x: 0,
1470
+ y: 0
1471
+ };
1472
+ l.debug("getMaxChildSize abc95 child:", r.id, "width:", e, "height:", i, "x:", a, "y:", o, r.type), r.type !== "space" && (e > t && (t = e / (r.widthInColumns ?? 1)), i > n && (n = i));
1473
+ }
1474
+ return {
1475
+ width: t,
1476
+ height: n
1477
+ };
1478
+ }, "getMaxChildSize");
1479
+ function R(e, t, n = 0, r = 0) {
1480
+ l.debug("setBlockSizes abc95 (start)", e.id, e?.size?.x, "block width =", e?.size, "siblingWidth", n), e?.size?.width || (e.size = {
1481
+ width: n,
1482
+ height: r,
1483
+ x: 0,
1484
+ y: 0
1485
+ });
1486
+ let i = 0, a = 0;
1487
+ if (e.children?.length > 0) {
1488
+ for (let n of e.children) R(n, t);
1489
+ let o = be(e);
1490
+ i = o.width, a = o.height, l.debug("setBlockSizes abc95 maxWidth of", e.id, ":s children is ", i, a);
1491
+ for (let t of e.children) t.size && (l.debug(`abc95 Setting size of children of ${e.id} id=${t.id} ${i} ${a} ${JSON.stringify(t.size)}`), t.size.width = i * (t.widthInColumns ?? 1) + I * ((t.widthInColumns ?? 1) - 1), t.size.height = a, t.size.x = 0, t.size.y = 0, l.debug(`abc95 updating size of ${e.id} children child:${t.id} maxWidth:${i} maxHeight:${a}`));
1492
+ for (let n of e.children) R(n, t, i, a);
1493
+ let s = e.columns ?? -1, c = 0;
1494
+ for (let t of e.children) c += t.widthInColumns ?? 1;
1495
+ let u = e.children.length;
1496
+ s > 0 && s < c && (u = s);
1497
+ let d = Math.ceil(c / u), f = u * (i + I) + I, p = d * (a + I) + I;
1498
+ if (f < n) {
1499
+ l.debug(`Detected to small sibling: abc95 ${e.id} siblingWidth ${n} siblingHeight ${r} width ${f}`), f = n, p = r;
1500
+ let t = (n - u * I - I) / u, o = (r - d * I - I) / d;
1501
+ l.debug("Size indata abc88", e.id, "childWidth", t, "maxWidth", i), l.debug("Size indata abc88", e.id, "childHeight", o, "maxHeight", a), l.debug("Size indata abc88 xSize", u, "padding", I);
1502
+ for (let n of e.children) n.size && (n.size.width = t, n.size.height = o, n.size.x = 0, n.size.y = 0);
1503
+ }
1504
+ if (l.debug(`abc95 (finale calc) ${e.id} xSize ${u} ySize ${d} columns ${s}${e.children.length} width=${Math.max(f, e.size?.width || 0)}`), f < (e?.size?.width || 0)) {
1505
+ f = e?.size?.width || 0;
1506
+ let t = s > 0 ? Math.min(e.children.length, s) : e.children.length;
1507
+ if (t > 0) {
1508
+ let n = (f - t * I - I) / t;
1509
+ l.debug("abc95 (growing to fit) width", e.id, f, e.size?.width, n);
1510
+ for (let t of e.children) t.size && (t.size.width = n);
1511
+ }
1512
+ }
1513
+ e.size = {
1514
+ width: f,
1515
+ height: p,
1516
+ x: 0,
1517
+ y: 0
1518
+ };
1519
+ }
1520
+ l.debug("setBlockSizes abc94 (done)", e.id, e?.size?.x, e?.size?.width, e?.size?.y, e?.size?.height);
1521
+ }
1522
+ u(R, "setBlockSizes");
1523
+ function z(e, t) {
1524
+ l.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`);
1525
+ let n = e.columns ?? -1;
1526
+ if (l.debug("layoutBlocks columns abc95", e.id, "=>", n, e), e.children && e.children.length > 0) {
1527
+ let r = e?.children[0]?.size?.width ?? 0, i = e.children.length * r + (e.children.length - 1) * I;
1528
+ l.debug("widthOfChildren 88", i, "posX");
1529
+ let a = /* @__PURE__ */ new Map();
1530
+ {
1531
+ let t = 0;
1532
+ for (let r of e.children) {
1533
+ if (!r.size) continue;
1534
+ let { py: e } = L(n, t), i = a.get(e) ?? 0;
1535
+ r.size.height > i && a.set(e, r.size.height);
1536
+ let o = r?.widthInColumns ?? 1;
1537
+ n > 0 && (o = Math.min(o, n - t % n)), t += o;
1538
+ }
1539
+ }
1540
+ let o = /* @__PURE__ */ new Map();
1541
+ {
1542
+ let e = 0, t = [...a.keys()].sort((e, t) => e - t);
1543
+ for (let n of t) o.set(n, e), e += (a.get(n) ?? 0) + I;
1544
+ }
1545
+ let s = 0;
1546
+ l.debug("abc91 block?.size?.x", e.id, e?.size?.x);
1547
+ let c = e?.size?.x ? e?.size?.x + (-e?.size?.width / 2 || 0) : -I, u = 0;
1548
+ for (let r of e.children) {
1549
+ let i = e;
1550
+ if (!r.size) continue;
1551
+ let { width: d, height: f } = r.size, { px: p, py: m } = L(n, s);
1552
+ if (m != u && (u = m, c = e?.size?.x ? e?.size?.x + (-e?.size?.width / 2 || 0) : -I, l.debug("New row in layout for block", e.id, " and child ", r.id, u)), l.debug(`abc89 layout blocks (child) id: ${r.id} Pos: ${s} (px, py) ${p},${m} (${i?.size?.x},${i?.size?.y}) parent: ${i.id} width: ${d}${I}`), i.size) {
1553
+ let e = d / 2;
1554
+ r.size.x = c + I + e, l.debug(`abc91 layout blocks (calc) px, pyid:${r.id} startingPos=X${c} new startingPosX${r.size.x} ${e} padding=${I} width=${d} halfWidth=${e} => x:${r.size.x} y:${r.size.y} ${r.widthInColumns} (width * (child?.w || 1)) / 2 ${d * (r?.widthInColumns ?? 1) / 2}`), c = r.size.x + e;
1555
+ let t = o.get(m) ?? 0, n = a.get(m) ?? f;
1556
+ r.size.y = i.size.y - i.size.height / 2 + t + n / 2 + I, l.debug(`abc88 layout blocks (calc) px, pyid:${r.id}startingPosX${c}${I}${e}=>x:${r.size.x}y:${r.size.y}${r.widthInColumns}(width * (child?.w || 1)) / 2${d * (r?.widthInColumns ?? 1) / 2}`);
1557
+ }
1558
+ r.children && z(r, t);
1559
+ let h = r?.widthInColumns ?? 1;
1560
+ n > 0 && (h = Math.min(h, n - s % n)), s += h, l.debug("abc88 columnsPos", r, s);
1561
+ }
1562
+ }
1563
+ l.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`);
1564
+ }
1565
+ u(z, "layoutBlocks");
1566
+ function B(e, { minX: t, minY: n, maxX: r, maxY: i } = {
1567
+ minX: 0,
1568
+ minY: 0,
1569
+ maxX: 0,
1570
+ maxY: 0
1571
+ }) {
1572
+ if (e.size && e.id !== "root") {
1573
+ let { x: a, y: o, width: s, height: c } = e.size;
1574
+ a - s / 2 < t && (t = a - s / 2), o - c / 2 < n && (n = o - c / 2), a + s / 2 > r && (r = a + s / 2), o + c / 2 > i && (i = o + c / 2);
1575
+ }
1576
+ if (e.children) for (let a of e.children) ({minX: t, minY: n, maxX: r, maxY: i} = B(a, {
1577
+ minX: t,
1578
+ minY: n,
1579
+ maxX: r,
1580
+ maxY: i
1581
+ }));
1582
+ return {
1583
+ minX: t,
1584
+ minY: n,
1585
+ maxX: r,
1586
+ maxY: i
1587
+ };
1588
+ }
1589
+ u(B, "findBounds");
1590
+ function xe(e) {
1591
+ let t = e.getBlock("root");
1592
+ if (!t) return;
1593
+ R(t, e, 0, 0), z(t, e), l.debug("getBlocks", JSON.stringify(t, null, 2));
1594
+ let { minX: n, minY: r, maxX: i, maxY: a } = B(t), o = a - r;
1595
+ return {
1596
+ x: n,
1597
+ y: r,
1598
+ width: i - n,
1599
+ height: o
1600
+ };
1601
+ }
1602
+ u(xe, "layout");
1603
+ var V = /* @__PURE__ */ u(async (e, t, n, i = !1, a = !1) => {
1604
+ let o = t || "";
1605
+ typeof o == "object" && (o = o[0]);
1606
+ let c = r(), l = s(c);
1607
+ return await S(e, o, {
1608
+ style: n,
1609
+ isTitle: i,
1610
+ useHtmlLabels: l,
1611
+ markdown: !1,
1612
+ isNode: a,
1613
+ width: Infinity
1614
+ }, c);
1615
+ }, "createLabel"), Se = /* @__PURE__ */ u((e, t, n, r, i) => {
1616
+ t.arrowTypeStart && we(e, "start", t.arrowTypeStart, n, r, i), t.arrowTypeEnd && we(e, "end", t.arrowTypeEnd, n, r, i);
1617
+ }, "addEdgeMarkers"), Ce = {
1618
+ arrow_cross: "cross",
1619
+ arrow_point: "point",
1620
+ arrow_barb: "barb",
1621
+ arrow_circle: "circle",
1622
+ aggregation: "aggregation",
1623
+ extension: "extension",
1624
+ composition: "composition",
1625
+ dependency: "dependency",
1626
+ lollipop: "lollipop"
1627
+ }, we = /* @__PURE__ */ u((e, t, n, r, i, a) => {
1628
+ let o = Ce[n];
1629
+ if (!o) {
1630
+ l.warn(`Unknown arrow type: ${n}`);
1631
+ return;
1632
+ }
1633
+ let s = t === "start" ? "Start" : "End";
1634
+ e.attr(`marker-${t}`, `url(${r}#${i}_${a}-${o}${s})`);
1635
+ }, "addEdgeMarker"), H = {}, U = {}, Te = /* @__PURE__ */ u(async (e, t) => {
1636
+ let n = r(), i = s(n), a = e.insert("g").attr("class", "edgeLabel"), o = a.insert("g").attr("class", "label"), c = t.labelType === "markdown", l = await S(e, t.label, {
1637
+ style: t.labelStyle,
1638
+ useHtmlLabels: i,
1639
+ addSvgBackground: c,
1640
+ isNode: !1,
1641
+ markdown: c,
1642
+ width: c ? void 0 : Infinity
1643
+ }, n);
1644
+ o.node().appendChild(l);
1645
+ let u = l.getBBox(), f = u;
1646
+ if (i) {
1647
+ let e = l.children[0], t = d(l);
1648
+ u = e.getBoundingClientRect(), f = u, t.attr("width", u.width), t.attr("height", u.height);
1649
+ } else {
1650
+ let e = d(l).select("text").node();
1651
+ e && typeof e.getBBox == "function" && (f = e.getBBox());
1652
+ }
1653
+ o.attr("transform", y(f, i)), H[t.id] = a, t.width = u.width, t.height = u.height;
1654
+ let p;
1655
+ if (t.startLabelLeft) {
1656
+ let n = e.insert("g").attr("class", "edgeTerminals"), r = n.insert("g").attr("class", "inner"), a = await V(r, t.startLabelLeft, t.labelStyle);
1657
+ p = a;
1658
+ let o = a.getBBox();
1659
+ if (i) {
1660
+ let e = a.children[0], t = d(a);
1661
+ o = e.getBoundingClientRect(), t.attr("width", o.width), t.attr("height", o.height);
1662
+ }
1663
+ r.attr("transform", y(o, i)), U[t.id] || (U[t.id] = {}), U[t.id].startLeft = n, W(p, t.startLabelLeft);
1664
+ }
1665
+ if (t.startLabelRight) {
1666
+ let n = e.insert("g").attr("class", "edgeTerminals"), r = n.insert("g").attr("class", "inner"), a = await V(n, t.startLabelRight, t.labelStyle);
1667
+ p = a, r.node().appendChild(a);
1668
+ let o = a.getBBox();
1669
+ if (i) {
1670
+ let e = a.children[0], t = d(a);
1671
+ o = e.getBoundingClientRect(), t.attr("width", o.width), t.attr("height", o.height);
1672
+ }
1673
+ r.attr("transform", y(o, i)), U[t.id] || (U[t.id] = {}), U[t.id].startRight = n, W(p, t.startLabelRight);
1674
+ }
1675
+ if (t.endLabelLeft) {
1676
+ let n = e.insert("g").attr("class", "edgeTerminals"), r = n.insert("g").attr("class", "inner"), a = await V(r, t.endLabelLeft, t.labelStyle);
1677
+ p = a;
1678
+ let o = a.getBBox();
1679
+ if (i) {
1680
+ let e = a.children[0], t = d(a);
1681
+ o = e.getBoundingClientRect(), t.attr("width", o.width), t.attr("height", o.height);
1682
+ }
1683
+ r.attr("transform", y(o, i)), n.node().appendChild(a), U[t.id] || (U[t.id] = {}), U[t.id].endLeft = n, W(p, t.endLabelLeft);
1684
+ }
1685
+ if (t.endLabelRight) {
1686
+ let n = e.insert("g").attr("class", "edgeTerminals"), r = n.insert("g").attr("class", "inner"), a = await V(r, t.endLabelRight, t.labelStyle);
1687
+ p = a;
1688
+ let o = a.getBBox();
1689
+ if (i) {
1690
+ let e = a.children[0], t = d(a);
1691
+ o = e.getBoundingClientRect(), t.attr("width", o.width), t.attr("height", o.height);
1692
+ }
1693
+ r.attr("transform", y(o, i)), n.node().appendChild(a), U[t.id] || (U[t.id] = {}), U[t.id].endRight = n, W(p, t.endLabelRight);
1694
+ }
1695
+ return l;
1696
+ }, "insertEdgeLabel");
1697
+ function W(e, t) {
1698
+ s(r()) && e && (e.style.width = t.length * 9 + "px", e.style.height = "12px");
1699
+ }
1700
+ u(W, "setTerminalWidth");
1701
+ var Ee = /* @__PURE__ */ u((e, t) => {
1702
+ l.debug("Moving label abc88 ", e.id, e.label, H[e.id], t);
1703
+ let n = t.updatedPath ? t.updatedPath : t.originalPath, { subGraphTitleTotalMargin: i } = b(r());
1704
+ if (e.label) {
1705
+ let r = H[e.id], a = e.x, o = e.y;
1706
+ if (n) {
1707
+ let r = h.calcLabelPosition(n);
1708
+ l.debug("Moving label " + e.label + " from (", a, ",", o, ") to (", r.x, ",", r.y, ") abc88"), t.updatedPath && (a = r.x, o = r.y);
1709
+ }
1710
+ r.attr("transform", `translate(${a}, ${o + i / 2})`);
1711
+ }
1712
+ if (e.startLabelLeft) {
1713
+ let t = U[e.id].startLeft, r = e.x, i = e.y;
1714
+ if (n) {
1715
+ let t = h.calcTerminalLabelPosition(e.arrowTypeStart ? 10 : 0, "start_left", n);
1716
+ r = t.x, i = t.y;
1717
+ }
1718
+ t.attr("transform", `translate(${r}, ${i})`);
1719
+ }
1720
+ if (e.startLabelRight) {
1721
+ let t = U[e.id].startRight, r = e.x, i = e.y;
1722
+ if (n) {
1723
+ let t = h.calcTerminalLabelPosition(e.arrowTypeStart ? 10 : 0, "start_right", n);
1724
+ r = t.x, i = t.y;
1725
+ }
1726
+ t.attr("transform", `translate(${r}, ${i})`);
1727
+ }
1728
+ if (e.endLabelLeft) {
1729
+ let t = U[e.id].endLeft, r = e.x, i = e.y;
1730
+ if (n) {
1731
+ let t = h.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_left", n);
1732
+ r = t.x, i = t.y;
1733
+ }
1734
+ t.attr("transform", `translate(${r}, ${i})`);
1735
+ }
1736
+ if (e.endLabelRight) {
1737
+ let t = U[e.id].endRight, r = e.x, i = e.y;
1738
+ if (n) {
1739
+ let t = h.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_right", n);
1740
+ r = t.x, i = t.y;
1741
+ }
1742
+ t.attr("transform", `translate(${r}, ${i})`);
1743
+ }
1744
+ }, "positionEdgeLabel"), De = /* @__PURE__ */ u((e, t) => {
1745
+ let n = e.x, r = e.y, i = Math.abs(t.x - n), a = Math.abs(t.y - r), o = e.width / 2, s = e.height / 2;
1746
+ return i >= o || a >= s;
1747
+ }, "outsideNode"), Oe = /* @__PURE__ */ u((e, t, n) => {
1748
+ l.debug(`intersection calc abc89:
1749
+ outsidePoint: ${JSON.stringify(t)}
1750
+ insidePoint : ${JSON.stringify(n)}
1751
+ node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);
1752
+ let r = e.x, i = e.y, a = Math.abs(r - n.x), o = e.width / 2, s = n.x < t.x ? o - a : o + a, c = e.height / 2, u = Math.abs(t.y - n.y), d = Math.abs(t.x - n.x);
1753
+ if (Math.abs(i - t.y) * o > Math.abs(r - t.x) * c) {
1754
+ let e = n.y < t.y ? t.y - c - i : i - c - t.y;
1755
+ s = d * e / u;
1756
+ let r = {
1757
+ x: n.x < t.x ? n.x + s : n.x - d + s,
1758
+ y: n.y < t.y ? n.y + u - e : n.y - u + e
1759
+ };
1760
+ return s === 0 && (r.x = t.x, r.y = t.y), d === 0 && (r.x = t.x), u === 0 && (r.y = t.y), l.debug(`abc89 topp/bott calc, Q ${u}, q ${e}, R ${d}, r ${s}`, r), r;
1761
+ } else {
1762
+ s = n.x < t.x ? t.x - o - r : r - o - t.x;
1763
+ let e = u * s / d, i = n.x < t.x ? n.x + d - s : n.x - d + s, a = n.y < t.y ? n.y + e : n.y - e;
1764
+ return l.debug(`sides calc abc89, Q ${u}, q ${e}, R ${d}, r ${s}`, {
1765
+ _x: i,
1766
+ _y: a
1767
+ }), s === 0 && (i = t.x, a = t.y), d === 0 && (i = t.x), u === 0 && (a = t.y), {
1768
+ x: i,
1769
+ y: a
1770
+ };
1771
+ }
1772
+ }, "intersection"), ke = /* @__PURE__ */ u((e, t) => {
1773
+ l.debug("abc88 cutPathAtIntersect", e, t);
1774
+ let n = [], r = e[0], i = !1;
1775
+ return e.forEach((e) => {
1776
+ if (!De(t, e) && !i) {
1777
+ let a = Oe(t, r, e), o = !1;
1778
+ n.forEach((e) => {
1779
+ o ||= e.x === a.x && e.y === a.y;
1780
+ }), n.some((e) => e.x === a.x && e.y === a.y) || n.push(a), i = !0;
1781
+ } else r = e, i || n.push(e);
1782
+ }), n;
1783
+ }, "cutPathAtIntersect"), Ae = /* @__PURE__ */ u(function(t, n, i, a, o, s, c) {
1784
+ let u = i.points;
1785
+ l.debug("abc88 InsertEdge: edge=", i, "e=", n);
1786
+ let d = !1, f = s.node(n.v);
1787
+ var m = s.node(n.w);
1788
+ m?.intersect && f?.intersect && (u = u.slice(1, i.points.length - 1), u.unshift(f.intersect(u[0])), u.push(m.intersect(u[u.length - 1]))), i.toCluster && (l.debug("to cluster abc88", a[i.toCluster]), u = ke(i.points, a[i.toCluster].node), d = !0), i.fromCluster && (l.debug("from cluster abc88", a[i.fromCluster]), u = ke(u.reverse(), a[i.fromCluster].node).reverse(), d = !0);
1789
+ let h = u.filter((e) => !Number.isNaN(e.y)), g = p;
1790
+ i.curve && (o === "graph" || o === "flowchart") && (g = i.curve);
1791
+ let { x: y, y: b } = v(i), x = _().x(y).y(b).curve(g), S;
1792
+ switch (i.thickness) {
1793
+ case "normal":
1794
+ S = "edge-thickness-normal";
1795
+ break;
1796
+ case "thick":
1797
+ S = "edge-thickness-thick";
1798
+ break;
1799
+ case "invisible":
1800
+ S = "edge-thickness-thick";
1801
+ break;
1802
+ default: S = "";
1803
+ }
1804
+ switch (i.pattern) {
1805
+ case "solid":
1806
+ S += " edge-pattern-solid";
1807
+ break;
1808
+ case "dotted":
1809
+ S += " edge-pattern-dotted";
1810
+ break;
1811
+ case "dashed":
1812
+ S += " edge-pattern-dashed";
1813
+ break;
1814
+ }
1815
+ let C = t.append("path").attr("d", x(h)).attr("id", i.id).attr("class", " " + S + (i.classes ? " " + i.classes : "")).attr("style", i.style), w = "";
1816
+ (r().flowchart.arrowMarkerAbsolute || r().state.arrowMarkerAbsolute) && (w = e(!0)), Se(C, i, w, c, o);
1817
+ let T = {};
1818
+ return d && (T.updatedPath = u), T.originalPath = i.points, T;
1819
+ }, "insertEdge"), je = /* @__PURE__ */ u((e) => {
1820
+ let t = /* @__PURE__ */ new Set();
1821
+ for (let n of e) switch (n) {
1822
+ case "x":
1823
+ t.add("right"), t.add("left");
1824
+ break;
1825
+ case "y":
1826
+ t.add("up"), t.add("down");
1827
+ break;
1828
+ default:
1829
+ t.add(n);
1830
+ break;
1831
+ }
1832
+ return t;
1833
+ }, "expandAndDeduplicateDirections"), Me = /* @__PURE__ */ u((e, t, n) => {
1834
+ let r = je(e), i = t.height + 2 * n.padding, a = i / 2, o = t.width + 2 * a + n.padding, s = n.padding / 2;
1835
+ return r.has("right") && r.has("left") && r.has("up") && r.has("down") ? [
1836
+ {
1837
+ x: 0,
1838
+ y: 0
1839
+ },
1840
+ {
1841
+ x: a,
1842
+ y: 0
1843
+ },
1844
+ {
1845
+ x: o / 2,
1846
+ y: 2 * s
1847
+ },
1848
+ {
1849
+ x: o - a,
1850
+ y: 0
1851
+ },
1852
+ {
1853
+ x: o,
1854
+ y: 0
1855
+ },
1856
+ {
1857
+ x: o,
1858
+ y: -i / 3
1859
+ },
1860
+ {
1861
+ x: o + 2 * s,
1862
+ y: -i / 2
1863
+ },
1864
+ {
1865
+ x: o,
1866
+ y: -2 * i / 3
1867
+ },
1868
+ {
1869
+ x: o,
1870
+ y: -i
1871
+ },
1872
+ {
1873
+ x: o - a,
1874
+ y: -i
1875
+ },
1876
+ {
1877
+ x: o / 2,
1878
+ y: -i - 2 * s
1879
+ },
1880
+ {
1881
+ x: a,
1882
+ y: -i
1883
+ },
1884
+ {
1885
+ x: 0,
1886
+ y: -i
1887
+ },
1888
+ {
1889
+ x: 0,
1890
+ y: -2 * i / 3
1891
+ },
1892
+ {
1893
+ x: -2 * s,
1894
+ y: -i / 2
1895
+ },
1896
+ {
1897
+ x: 0,
1898
+ y: -i / 3
1899
+ }
1900
+ ] : r.has("right") && r.has("left") && r.has("up") ? [
1901
+ {
1902
+ x: a,
1903
+ y: 0
1904
+ },
1905
+ {
1906
+ x: o - a,
1907
+ y: 0
1908
+ },
1909
+ {
1910
+ x: o,
1911
+ y: -i / 2
1912
+ },
1913
+ {
1914
+ x: o - a,
1915
+ y: -i
1916
+ },
1917
+ {
1918
+ x: a,
1919
+ y: -i
1920
+ },
1921
+ {
1922
+ x: 0,
1923
+ y: -i / 2
1924
+ }
1925
+ ] : r.has("right") && r.has("left") && r.has("down") ? [
1926
+ {
1927
+ x: 0,
1928
+ y: 0
1929
+ },
1930
+ {
1931
+ x: a,
1932
+ y: -i
1933
+ },
1934
+ {
1935
+ x: o - a,
1936
+ y: -i
1937
+ },
1938
+ {
1939
+ x: o,
1940
+ y: 0
1941
+ }
1942
+ ] : r.has("right") && r.has("up") && r.has("down") ? [
1943
+ {
1944
+ x: 0,
1945
+ y: 0
1946
+ },
1947
+ {
1948
+ x: o,
1949
+ y: -a
1950
+ },
1951
+ {
1952
+ x: o,
1953
+ y: -i + a
1954
+ },
1955
+ {
1956
+ x: 0,
1957
+ y: -i
1958
+ }
1959
+ ] : r.has("left") && r.has("up") && r.has("down") ? [
1960
+ {
1961
+ x: o,
1962
+ y: 0
1963
+ },
1964
+ {
1965
+ x: 0,
1966
+ y: -a
1967
+ },
1968
+ {
1969
+ x: 0,
1970
+ y: -i + a
1971
+ },
1972
+ {
1973
+ x: o,
1974
+ y: -i
1975
+ }
1976
+ ] : r.has("right") && r.has("left") ? [
1977
+ {
1978
+ x: a,
1979
+ y: 0
1980
+ },
1981
+ {
1982
+ x: a,
1983
+ y: -s
1984
+ },
1985
+ {
1986
+ x: o - a,
1987
+ y: -s
1988
+ },
1989
+ {
1990
+ x: o - a,
1991
+ y: 0
1992
+ },
1993
+ {
1994
+ x: o,
1995
+ y: -i / 2
1996
+ },
1997
+ {
1998
+ x: o - a,
1999
+ y: -i
2000
+ },
2001
+ {
2002
+ x: o - a,
2003
+ y: -i + s
2004
+ },
2005
+ {
2006
+ x: a,
2007
+ y: -i + s
2008
+ },
2009
+ {
2010
+ x: a,
2011
+ y: -i
2012
+ },
2013
+ {
2014
+ x: 0,
2015
+ y: -i / 2
2016
+ }
2017
+ ] : r.has("up") && r.has("down") ? [
2018
+ {
2019
+ x: o / 2,
2020
+ y: 0
2021
+ },
2022
+ {
2023
+ x: 0,
2024
+ y: -s
2025
+ },
2026
+ {
2027
+ x: a,
2028
+ y: -s
2029
+ },
2030
+ {
2031
+ x: a,
2032
+ y: -i + s
2033
+ },
2034
+ {
2035
+ x: 0,
2036
+ y: -i + s
2037
+ },
2038
+ {
2039
+ x: o / 2,
2040
+ y: -i
2041
+ },
2042
+ {
2043
+ x: o,
2044
+ y: -i + s
2045
+ },
2046
+ {
2047
+ x: o - a,
2048
+ y: -i + s
2049
+ },
2050
+ {
2051
+ x: o - a,
2052
+ y: -s
2053
+ },
2054
+ {
2055
+ x: o,
2056
+ y: -s
2057
+ }
2058
+ ] : r.has("right") && r.has("up") ? [
2059
+ {
2060
+ x: 0,
2061
+ y: 0
2062
+ },
2063
+ {
2064
+ x: o,
2065
+ y: -a
2066
+ },
2067
+ {
2068
+ x: 0,
2069
+ y: -i
2070
+ }
2071
+ ] : r.has("right") && r.has("down") ? [
2072
+ {
2073
+ x: 0,
2074
+ y: 0
2075
+ },
2076
+ {
2077
+ x: o,
2078
+ y: 0
2079
+ },
2080
+ {
2081
+ x: 0,
2082
+ y: -i
2083
+ }
2084
+ ] : r.has("left") && r.has("up") ? [
2085
+ {
2086
+ x: o,
2087
+ y: 0
2088
+ },
2089
+ {
2090
+ x: 0,
2091
+ y: -a
2092
+ },
2093
+ {
2094
+ x: o,
2095
+ y: -i
2096
+ }
2097
+ ] : r.has("left") && r.has("down") ? [
2098
+ {
2099
+ x: o,
2100
+ y: 0
2101
+ },
2102
+ {
2103
+ x: 0,
2104
+ y: 0
2105
+ },
2106
+ {
2107
+ x: o,
2108
+ y: -i
2109
+ }
2110
+ ] : r.has("right") ? [
2111
+ {
2112
+ x: a,
2113
+ y: -s
2114
+ },
2115
+ {
2116
+ x: a,
2117
+ y: -s
2118
+ },
2119
+ {
2120
+ x: o - a,
2121
+ y: -s
2122
+ },
2123
+ {
2124
+ x: o - a,
2125
+ y: 0
2126
+ },
2127
+ {
2128
+ x: o,
2129
+ y: -i / 2
2130
+ },
2131
+ {
2132
+ x: o - a,
2133
+ y: -i
2134
+ },
2135
+ {
2136
+ x: o - a,
2137
+ y: -i + s
2138
+ },
2139
+ {
2140
+ x: a,
2141
+ y: -i + s
2142
+ },
2143
+ {
2144
+ x: a,
2145
+ y: -i + s
2146
+ }
2147
+ ] : r.has("left") ? [
2148
+ {
2149
+ x: a,
2150
+ y: 0
2151
+ },
2152
+ {
2153
+ x: a,
2154
+ y: -s
2155
+ },
2156
+ {
2157
+ x: o - a,
2158
+ y: -s
2159
+ },
2160
+ {
2161
+ x: o - a,
2162
+ y: -i + s
2163
+ },
2164
+ {
2165
+ x: a,
2166
+ y: -i + s
2167
+ },
2168
+ {
2169
+ x: a,
2170
+ y: -i
2171
+ },
2172
+ {
2173
+ x: 0,
2174
+ y: -i / 2
2175
+ }
2176
+ ] : r.has("up") ? [
2177
+ {
2178
+ x: a,
2179
+ y: -s
2180
+ },
2181
+ {
2182
+ x: a,
2183
+ y: -i + s
2184
+ },
2185
+ {
2186
+ x: 0,
2187
+ y: -i + s
2188
+ },
2189
+ {
2190
+ x: o / 2,
2191
+ y: -i
2192
+ },
2193
+ {
2194
+ x: o,
2195
+ y: -i + s
2196
+ },
2197
+ {
2198
+ x: o - a,
2199
+ y: -i + s
2200
+ },
2201
+ {
2202
+ x: o - a,
2203
+ y: -s
2204
+ }
2205
+ ] : r.has("down") ? [
2206
+ {
2207
+ x: o / 2,
2208
+ y: 0
2209
+ },
2210
+ {
2211
+ x: 0,
2212
+ y: -s
2213
+ },
2214
+ {
2215
+ x: a,
2216
+ y: -s
2217
+ },
2218
+ {
2219
+ x: a,
2220
+ y: -i + s
2221
+ },
2222
+ {
2223
+ x: o - a,
2224
+ y: -i + s
2225
+ },
2226
+ {
2227
+ x: o - a,
2228
+ y: -s
2229
+ },
2230
+ {
2231
+ x: o,
2232
+ y: -s
2233
+ }
2234
+ ] : [{
2235
+ x: 0,
2236
+ y: 0
2237
+ }];
2238
+ }, "getArrowPoints");
2239
+ function Ne(e, t) {
2240
+ return e.intersect(t);
2241
+ }
2242
+ u(Ne, "intersectNode");
2243
+ var Pe = Ne;
2244
+ function Fe(e, t, n, r) {
2245
+ var i = e.x, a = e.y, o = i - r.x, s = a - r.y, c = Math.sqrt(t * t * s * s + n * n * o * o), l = Math.abs(t * n * o / c);
2246
+ r.x < i && (l = -l);
2247
+ var u = Math.abs(t * n * s / c);
2248
+ return r.y < a && (u = -u), {
2249
+ x: i + l,
2250
+ y: a + u
2251
+ };
2252
+ }
2253
+ u(Fe, "intersectEllipse");
2254
+ var Ie = Fe;
2255
+ function Le(e, t, n) {
2256
+ return Ie(e, t, t, n);
2257
+ }
2258
+ u(Le, "intersectCircle");
2259
+ var Re = Le;
2260
+ function ze(e, t, n, r) {
2261
+ var i = t.y - e.y, a, o = e.x - t.x, s, c = t.x * e.y - e.x * t.y, l, u, d, f = i * n.x + o * n.y + c, p = i * r.x + o * r.y + c, m, h, g, _, v;
2262
+ if (!(f !== 0 && p !== 0 && G(f, p)) && (a = r.y - n.y, s = n.x - r.x, l = r.x * n.y - n.x * r.y, u = a * e.x + s * e.y + l, d = a * t.x + s * t.y + l, !(u !== 0 && d !== 0 && G(u, d)) && (m = i * s - a * o, m !== 0))) return h = Math.abs(m / 2), g = o * l - s * c, _ = g < 0 ? (g - h) / m : (g + h) / m, g = a * c - i * l, v = g < 0 ? (g - h) / m : (g + h) / m, {
2263
+ x: _,
2264
+ y: v
2265
+ };
2266
+ }
2267
+ u(ze, "intersectLine");
2268
+ function G(e, t) {
2269
+ return e * t > 0;
2270
+ }
2271
+ u(G, "sameSign");
2272
+ var Be = ze, Ve = He;
2273
+ function He(e, t, n) {
2274
+ var r = e.x, i = e.y, a = [], o = Infinity, s = Infinity;
2275
+ typeof t.forEach == "function" ? t.forEach(function(e) {
2276
+ o = Math.min(o, e.x), s = Math.min(s, e.y);
2277
+ }) : (o = Math.min(o, t.x), s = Math.min(s, t.y));
2278
+ for (var c = r - e.width / 2 - o, l = i - e.height / 2 - s, u = 0; u < t.length; u++) {
2279
+ var d = t[u], f = t[u < t.length - 1 ? u + 1 : 0], p = Be(e, n, {
2280
+ x: c + d.x,
2281
+ y: l + d.y
2282
+ }, {
2283
+ x: c + f.x,
2284
+ y: l + f.y
2285
+ });
2286
+ p && a.push(p);
2287
+ }
2288
+ return a.length ? (a.length > 1 && a.sort(function(e, t) {
2289
+ var r = e.x - n.x, i = e.y - n.y, a = Math.sqrt(r * r + i * i), o = t.x - n.x, s = t.y - n.y, c = Math.sqrt(o * o + s * s);
2290
+ return a < c ? -1 : a === c ? 0 : 1;
2291
+ }), a[0]) : e;
2292
+ }
2293
+ u(He, "intersectPolygon");
2294
+ var K = {
2295
+ node: Pe,
2296
+ circle: Re,
2297
+ ellipse: Ie,
2298
+ polygon: Ve,
2299
+ rect: /* @__PURE__ */ u((e, t) => {
2300
+ var n = e.x, r = e.y, i = t.x - n, a = t.y - r, o = e.width / 2, s = e.height / 2, c, l;
2301
+ return Math.abs(a) * o > Math.abs(i) * s ? (a < 0 && (s = -s), c = a === 0 ? 0 : s * i / a, l = s) : (i < 0 && (o = -o), c = o, l = i === 0 ? 0 : o * a / i), {
2302
+ x: n + c,
2303
+ y: r + l
2304
+ };
2305
+ }, "intersectRect")
2306
+ }, q = /* @__PURE__ */ u(async (e, n, i, a) => {
2307
+ let o = r(), c, l = n.useHtmlLabels || s(o);
2308
+ c = i || "node default";
2309
+ let u = e.insert("g").attr("class", c).attr("id", n.domId || n.id), f = u.insert("g").attr("class", "label").attr("style", n.labelStyle), p;
2310
+ p = n.labelText === void 0 ? "" : typeof n.labelText == "string" ? n.labelText : n.labelText[0];
2311
+ let m;
2312
+ m = n.labelType === "markdown" ? S(f, t(g(p), o), {
2313
+ useHtmlLabels: l,
2314
+ width: n.width || o.flowchart.wrappingWidth,
2315
+ classes: "markdown-node-label"
2316
+ }, o) : await V(f, t(g(p), o), n.labelStyle, !1, a);
2317
+ let h = m.getBBox(), _ = n.padding / 2;
2318
+ if (s(o)) {
2319
+ let e = m.children[0], t = d(m);
2320
+ await x(e, p), h = e.getBoundingClientRect(), t.attr("width", h.width), t.attr("height", h.height);
2321
+ }
2322
+ return l ? f.attr("transform", "translate(" + -h.width / 2 + ", " + -h.height / 2 + ")") : f.attr("transform", "translate(0, " + -h.height / 2 + ")"), n.centerLabel && f.attr("transform", "translate(" + -h.width / 2 + ", " + -h.height / 2 + ")"), f.insert("rect", ":first-child"), {
2323
+ shapeSvg: u,
2324
+ bbox: h,
2325
+ halfPadding: _,
2326
+ label: f
2327
+ };
2328
+ }, "labelHelper"), J = /* @__PURE__ */ u((e, t) => {
2329
+ let n = t.node().getBBox();
2330
+ e.width = n.width, e.height = n.height;
2331
+ }, "updateNodeBounds");
2332
+ function Y(e, t, n, r) {
2333
+ return e.insert("polygon", ":first-child").attr("points", r.map(function(e) {
2334
+ return e.x + "," + e.y;
2335
+ }).join(" ")).attr("class", "label-container").attr("transform", "translate(" + -t / 2 + "," + n / 2 + ")");
2336
+ }
2337
+ u(Y, "insertPolygonShape");
2338
+ var Ue = /* @__PURE__ */ u(async (e, t) => {
2339
+ t.useHtmlLabels || s(r()) || (t.centerLabel = !0);
2340
+ let { shapeSvg: n, bbox: i, halfPadding: a } = await q(e, t, "node " + t.classes, !0);
2341
+ l.info("Classes = ", t.classes);
2342
+ let o = n.insert("rect", ":first-child");
2343
+ return o.attr("rx", t.rx).attr("ry", t.ry).attr("x", -i.width / 2 - a).attr("y", -i.height / 2 - a).attr("width", i.width + t.padding).attr("height", i.height + t.padding), J(t, o), t.intersect = function(e) {
2344
+ return K.rect(t, e);
2345
+ }, n;
2346
+ }, "note"), We = /* @__PURE__ */ u((e) => e ? " " + e : "", "formatClass"), X = /* @__PURE__ */ u((e, t) => `${t || "node default"}${We(e.classes)} ${We(e.class)}`, "getClassesFromNode"), Ge = /* @__PURE__ */ u(async (e, t) => {
2347
+ let { shapeSvg: n, bbox: r } = await q(e, t, X(t, void 0), !0), i = r.width + t.padding + (r.height + t.padding), a = [
2348
+ {
2349
+ x: i / 2,
2350
+ y: 0
2351
+ },
2352
+ {
2353
+ x: i,
2354
+ y: -i / 2
2355
+ },
2356
+ {
2357
+ x: i / 2,
2358
+ y: -i
2359
+ },
2360
+ {
2361
+ x: 0,
2362
+ y: -i / 2
2363
+ }
2364
+ ];
2365
+ l.info("Question main (Circle)");
2366
+ let o = Y(n, i, i, a);
2367
+ return o.attr("style", t.style), J(t, o), t.intersect = function(e) {
2368
+ return l.warn("Intersect called"), K.polygon(t, a, e);
2369
+ }, n;
2370
+ }, "question"), Ke = /* @__PURE__ */ u((e, t) => {
2371
+ let n = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id);
2372
+ return n.insert("polygon", ":first-child").attr("points", [
2373
+ {
2374
+ x: 0,
2375
+ y: 28 / 2
2376
+ },
2377
+ {
2378
+ x: 28 / 2,
2379
+ y: 0
2380
+ },
2381
+ {
2382
+ x: 0,
2383
+ y: -28 / 2
2384
+ },
2385
+ {
2386
+ x: -28 / 2,
2387
+ y: 0
2388
+ }
2389
+ ].map(function(e) {
2390
+ return e.x + "," + e.y;
2391
+ }).join(" ")).attr("class", "state-start").attr("r", 7).attr("width", 28).attr("height", 28), t.width = 28, t.height = 28, t.intersect = function(e) {
2392
+ return K.circle(t, 14, e);
2393
+ }, n;
2394
+ }, "choice"), qe = /* @__PURE__ */ u(async (e, t) => {
2395
+ let { shapeSvg: n, bbox: r } = await q(e, t, X(t, void 0), !0), i = r.height + t.padding, a = i / 4, o = r.width + 2 * a + t.padding, s = [
2396
+ {
2397
+ x: a,
2398
+ y: 0
2399
+ },
2400
+ {
2401
+ x: o - a,
2402
+ y: 0
2403
+ },
2404
+ {
2405
+ x: o,
2406
+ y: -i / 2
2407
+ },
2408
+ {
2409
+ x: o - a,
2410
+ y: -i
2411
+ },
2412
+ {
2413
+ x: a,
2414
+ y: -i
2415
+ },
2416
+ {
2417
+ x: 0,
2418
+ y: -i / 2
2419
+ }
2420
+ ], c = Y(n, o, i, s);
2421
+ return c.attr("style", t.style), J(t, c), t.intersect = function(e) {
2422
+ return K.polygon(t, s, e);
2423
+ }, n;
2424
+ }, "hexagon"), Je = /* @__PURE__ */ u(async (e, t) => {
2425
+ let { shapeSvg: n, bbox: r } = await q(e, t, void 0, !0), i = r.height + 2 * t.padding, a = i / 2, o = r.width + 2 * a + t.padding, s = Me(t.directions, r, t), c = Y(n, o, i, s);
2426
+ return c.attr("style", t.style), J(t, c), t.intersect = function(e) {
2427
+ return K.polygon(t, s, e);
2428
+ }, n;
2429
+ }, "block_arrow"), Ye = /* @__PURE__ */ u(async (e, t) => {
2430
+ let { shapeSvg: n, bbox: r } = await q(e, t, X(t, void 0), !0), i = r.width + t.padding, a = r.height + t.padding, o = [
2431
+ {
2432
+ x: -a / 2,
2433
+ y: 0
2434
+ },
2435
+ {
2436
+ x: i,
2437
+ y: 0
2438
+ },
2439
+ {
2440
+ x: i,
2441
+ y: -a
2442
+ },
2443
+ {
2444
+ x: -a / 2,
2445
+ y: -a
2446
+ },
2447
+ {
2448
+ x: 0,
2449
+ y: -a / 2
2450
+ }
2451
+ ];
2452
+ return Y(n, i, a, o).attr("style", t.style), t.width = i + a, t.height = a, t.intersect = function(e) {
2453
+ return K.polygon(t, o, e);
2454
+ }, n;
2455
+ }, "rect_left_inv_arrow"), Xe = /* @__PURE__ */ u(async (e, t) => {
2456
+ let { shapeSvg: n, bbox: r } = await q(e, t, X(t), !0), i = r.width + t.padding, a = r.height + t.padding, o = [
2457
+ {
2458
+ x: -2 * a / 6,
2459
+ y: 0
2460
+ },
2461
+ {
2462
+ x: i - a / 6,
2463
+ y: 0
2464
+ },
2465
+ {
2466
+ x: i + 2 * a / 6,
2467
+ y: -a
2468
+ },
2469
+ {
2470
+ x: a / 6,
2471
+ y: -a
2472
+ }
2473
+ ], s = Y(n, i, a, o);
2474
+ return s.attr("style", t.style), J(t, s), t.intersect = function(e) {
2475
+ return K.polygon(t, o, e);
2476
+ }, n;
2477
+ }, "lean_right"), Ze = /* @__PURE__ */ u(async (e, t) => {
2478
+ let { shapeSvg: n, bbox: r } = await q(e, t, X(t, void 0), !0), i = r.width + t.padding, a = r.height + t.padding, o = [
2479
+ {
2480
+ x: 2 * a / 6,
2481
+ y: 0
2482
+ },
2483
+ {
2484
+ x: i + a / 6,
2485
+ y: 0
2486
+ },
2487
+ {
2488
+ x: i - 2 * a / 6,
2489
+ y: -a
2490
+ },
2491
+ {
2492
+ x: -a / 6,
2493
+ y: -a
2494
+ }
2495
+ ], s = Y(n, i, a, o);
2496
+ return s.attr("style", t.style), J(t, s), t.intersect = function(e) {
2497
+ return K.polygon(t, o, e);
2498
+ }, n;
2499
+ }, "lean_left"), Qe = /* @__PURE__ */ u(async (e, t) => {
2500
+ let { shapeSvg: n, bbox: r } = await q(e, t, X(t, void 0), !0), i = r.width + t.padding, a = r.height + t.padding, o = [
2501
+ {
2502
+ x: -2 * a / 6,
2503
+ y: 0
2504
+ },
2505
+ {
2506
+ x: i + 2 * a / 6,
2507
+ y: 0
2508
+ },
2509
+ {
2510
+ x: i - a / 6,
2511
+ y: -a
2512
+ },
2513
+ {
2514
+ x: a / 6,
2515
+ y: -a
2516
+ }
2517
+ ], s = Y(n, i, a, o);
2518
+ return s.attr("style", t.style), J(t, s), t.intersect = function(e) {
2519
+ return K.polygon(t, o, e);
2520
+ }, n;
2521
+ }, "trapezoid"), $e = /* @__PURE__ */ u(async (e, t) => {
2522
+ let { shapeSvg: n, bbox: r } = await q(e, t, X(t, void 0), !0), i = r.width + t.padding, a = r.height + t.padding, o = [
2523
+ {
2524
+ x: a / 6,
2525
+ y: 0
2526
+ },
2527
+ {
2528
+ x: i - a / 6,
2529
+ y: 0
2530
+ },
2531
+ {
2532
+ x: i + 2 * a / 6,
2533
+ y: -a
2534
+ },
2535
+ {
2536
+ x: -2 * a / 6,
2537
+ y: -a
2538
+ }
2539
+ ], s = Y(n, i, a, o);
2540
+ return s.attr("style", t.style), J(t, s), t.intersect = function(e) {
2541
+ return K.polygon(t, o, e);
2542
+ }, n;
2543
+ }, "inv_trapezoid"), et = /* @__PURE__ */ u(async (e, t) => {
2544
+ let { shapeSvg: n, bbox: r } = await q(e, t, X(t, void 0), !0), i = r.width + t.padding, a = r.height + t.padding, o = [
2545
+ {
2546
+ x: 0,
2547
+ y: 0
2548
+ },
2549
+ {
2550
+ x: i + a / 2,
2551
+ y: 0
2552
+ },
2553
+ {
2554
+ x: i,
2555
+ y: -a / 2
2556
+ },
2557
+ {
2558
+ x: i + a / 2,
2559
+ y: -a
2560
+ },
2561
+ {
2562
+ x: 0,
2563
+ y: -a
2564
+ }
2565
+ ], s = Y(n, i, a, o);
2566
+ return s.attr("style", t.style), J(t, s), t.intersect = function(e) {
2567
+ return K.polygon(t, o, e);
2568
+ }, n;
2569
+ }, "rect_right_inv_arrow"), tt = /* @__PURE__ */ u(async (e, t) => {
2570
+ let { shapeSvg: n, bbox: r } = await q(e, t, X(t, void 0), !0), i = r.width + t.padding, a = i / 2, o = a / (2.5 + i / 50), s = r.height + o + t.padding, c = "M 0," + o + " a " + a + "," + o + " 0,0,0 " + i + " 0 a " + a + "," + o + " 0,0,0 " + -i + " 0 l 0," + s + " a " + a + "," + o + " 0,0,0 " + i + " 0 l 0," + -s;
2571
+ return J(t, n.attr("label-offset-y", o).insert("path", ":first-child").attr("style", t.style).attr("d", c).attr("transform", "translate(" + -i / 2 + "," + -(s / 2 + o) + ")")), t.intersect = function(e) {
2572
+ let n = K.rect(t, e), r = n.x - t.x;
2573
+ if (a != 0 && (Math.abs(r) < t.width / 2 || Math.abs(r) == t.width / 2 && Math.abs(n.y - t.y) > t.height / 2 - o)) {
2574
+ let i = o * o * (1 - r * r / (a * a));
2575
+ i != 0 && (i = Math.sqrt(i)), i = o - i, e.y - t.y > 0 && (i = -i), n.y += i;
2576
+ }
2577
+ return n;
2578
+ }, n;
2579
+ }, "cylinder"), nt = /* @__PURE__ */ u(async (e, t) => {
2580
+ let { shapeSvg: n, bbox: r, halfPadding: i } = await q(e, t, "node " + t.classes + " " + t.class, !0), a = n.insert("rect", ":first-child"), o = t.positioned ? t.width : r.width + t.padding, s = t.positioned ? t.height : r.height + t.padding, c = t.positioned ? -o / 2 : -r.width / 2 - i, u = t.positioned ? -s / 2 : -r.height / 2 - i;
2581
+ if (a.attr("class", "basic label-container").attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", c).attr("y", u).attr("width", o).attr("height", s), t.props) {
2582
+ let e = new Set(Object.keys(t.props));
2583
+ t.props.borders && (Z(a, t.props.borders, o, s), e.delete("borders")), e.forEach((e) => {
2584
+ l.warn(`Unknown node property ${e}`);
2585
+ });
2586
+ }
2587
+ return J(t, a), t.intersect = function(e) {
2588
+ return K.rect(t, e);
2589
+ }, n;
2590
+ }, "rect"), rt = /* @__PURE__ */ u(async (e, t) => {
2591
+ let { shapeSvg: n, bbox: r, halfPadding: i } = await q(e, t, "node " + t.classes, !0), a = n.insert("rect", ":first-child"), o = t.positioned ? t.width : r.width + t.padding, s = t.positioned ? t.height : r.height + t.padding, c = t.positioned ? -o / 2 : -r.width / 2 - i, u = t.positioned ? -s / 2 : -r.height / 2 - i;
2592
+ if (a.attr("class", "basic cluster composite label-container").attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", c).attr("y", u).attr("width", o).attr("height", s), t.props) {
2593
+ let e = new Set(Object.keys(t.props));
2594
+ t.props.borders && (Z(a, t.props.borders, o, s), e.delete("borders")), e.forEach((e) => {
2595
+ l.warn(`Unknown node property ${e}`);
2596
+ });
2597
+ }
2598
+ return J(t, a), t.intersect = function(e) {
2599
+ return K.rect(t, e);
2600
+ }, n;
2601
+ }, "composite"), it = /* @__PURE__ */ u(async (e, t) => {
2602
+ let { shapeSvg: n } = await q(e, t, "label", !0);
2603
+ l.trace("Classes = ", t.class);
2604
+ let r = n.insert("rect", ":first-child");
2605
+ if (r.attr("width", 0).attr("height", 0), n.attr("class", "label edgeLabel"), t.props) {
2606
+ let e = new Set(Object.keys(t.props));
2607
+ t.props.borders && (Z(r, t.props.borders, 0, 0), e.delete("borders")), e.forEach((e) => {
2608
+ l.warn(`Unknown node property ${e}`);
2609
+ });
2610
+ }
2611
+ return J(t, r), t.intersect = function(e) {
2612
+ return K.rect(t, e);
2613
+ }, n;
2614
+ }, "labelRect");
2615
+ function Z(e, t, n, r) {
2616
+ let i = [], a = /* @__PURE__ */ u((e) => {
2617
+ i.push(e, 0);
2618
+ }, "addBorder"), o = /* @__PURE__ */ u((e) => {
2619
+ i.push(0, e);
2620
+ }, "skipBorder");
2621
+ t.includes("t") ? (l.debug("add top border"), a(n)) : o(n), t.includes("r") ? (l.debug("add right border"), a(r)) : o(r), t.includes("b") ? (l.debug("add bottom border"), a(n)) : o(n), t.includes("l") ? (l.debug("add left border"), a(r)) : o(r), e.attr("stroke-dasharray", i.join(" "));
2622
+ }
2623
+ u(Z, "applyNodePropertyBorders");
2624
+ var at = /* @__PURE__ */ u(async (e, t) => {
2625
+ let n;
2626
+ n = t.classes ? "node " + t.classes : "node default";
2627
+ let i = e.insert("g").attr("class", n).attr("id", t.domId || t.id), a = i.insert("rect", ":first-child"), o = i.insert("line"), c = i.insert("g").attr("class", "label"), u = t.labelText.flat ? t.labelText.flat() : t.labelText, f = "";
2628
+ f = typeof u == "object" ? u[0] : u, l.info("Label text abc79", f, u, typeof u == "object");
2629
+ let p = await V(c, f, t.labelStyle, !0, !0), m = {
2630
+ width: 0,
2631
+ height: 0
2632
+ };
2633
+ if (s(r())) {
2634
+ let e = p.children[0], t = d(p);
2635
+ m = e.getBoundingClientRect(), t.attr("width", m.width), t.attr("height", m.height);
2636
+ }
2637
+ l.info("Text 2", u);
2638
+ let h = u.slice(1, u.length), g = p.getBBox(), _ = await V(c, h.join ? h.join("<br/>") : h, t.labelStyle, !0, !0);
2639
+ if (s(r())) {
2640
+ let e = _.children[0], t = d(_);
2641
+ m = e.getBoundingClientRect(), t.attr("width", m.width), t.attr("height", m.height);
2642
+ }
2643
+ let v = t.padding / 2;
2644
+ return d(_).attr("transform", "translate( " + (m.width > g.width ? 0 : (g.width - m.width) / 2) + ", " + (g.height + v + 5) + ")"), d(p).attr("transform", "translate( " + (m.width < g.width ? 0 : -(g.width - m.width) / 2) + ", 0)"), m = c.node().getBBox(), c.attr("transform", "translate(" + -m.width / 2 + ", " + (-m.height / 2 - v + 3) + ")"), a.attr("class", "outer title-state").attr("x", -m.width / 2 - v).attr("y", -m.height / 2 - v).attr("width", m.width + t.padding).attr("height", m.height + t.padding), o.attr("class", "divider").attr("x1", -m.width / 2 - v).attr("x2", m.width / 2 + v).attr("y1", -m.height / 2 - v + g.height + v).attr("y2", -m.height / 2 - v + g.height + v), J(t, a), t.intersect = function(e) {
2645
+ return K.rect(t, e);
2646
+ }, i;
2647
+ }, "rectWithTitle"), ot = /* @__PURE__ */ u(async (e, t) => {
2648
+ let { shapeSvg: n, bbox: r } = await q(e, t, X(t, void 0), !0), i = r.height + t.padding, a = r.width + i / 4 + t.padding;
2649
+ return J(t, n.insert("rect", ":first-child").attr("style", t.style).attr("rx", i / 2).attr("ry", i / 2).attr("x", -a / 2).attr("y", -i / 2).attr("width", a).attr("height", i)), t.intersect = function(e) {
2650
+ return K.rect(t, e);
2651
+ }, n;
2652
+ }, "stadium"), st = /* @__PURE__ */ u(async (e, t) => {
2653
+ let { shapeSvg: n, bbox: r, halfPadding: i } = await q(e, t, X(t, void 0), !0), a = n.insert("circle", ":first-child");
2654
+ return a.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", r.width / 2 + i).attr("width", r.width + t.padding).attr("height", r.height + t.padding), l.info("Circle main"), J(t, a), t.intersect = function(e) {
2655
+ return l.info("Circle intersect", t, r.width / 2 + i, e), K.circle(t, r.width / 2 + i, e);
2656
+ }, n;
2657
+ }, "circle"), ct = /* @__PURE__ */ u(async (e, t) => {
2658
+ let { shapeSvg: n, bbox: r, halfPadding: i } = await q(e, t, X(t, void 0), !0), a = n.insert("g", ":first-child"), o = a.insert("circle"), s = a.insert("circle");
2659
+ return a.attr("class", t.class), o.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", r.width / 2 + i + 5).attr("width", r.width + t.padding + 10).attr("height", r.height + t.padding + 10), s.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", r.width / 2 + i).attr("width", r.width + t.padding).attr("height", r.height + t.padding), l.info("DoubleCircle main"), J(t, o), t.intersect = function(e) {
2660
+ return l.info("DoubleCircle intersect", t, r.width / 2 + i + 5, e), K.circle(t, r.width / 2 + i + 5, e);
2661
+ }, n;
2662
+ }, "doublecircle"), lt = /* @__PURE__ */ u(async (e, t) => {
2663
+ let { shapeSvg: n, bbox: r } = await q(e, t, X(t, void 0), !0), i = r.width + t.padding, a = r.height + t.padding, o = [
2664
+ {
2665
+ x: 0,
2666
+ y: 0
2667
+ },
2668
+ {
2669
+ x: i,
2670
+ y: 0
2671
+ },
2672
+ {
2673
+ x: i,
2674
+ y: -a
2675
+ },
2676
+ {
2677
+ x: 0,
2678
+ y: -a
2679
+ },
2680
+ {
2681
+ x: 0,
2682
+ y: 0
2683
+ },
2684
+ {
2685
+ x: -8,
2686
+ y: 0
2687
+ },
2688
+ {
2689
+ x: i + 8,
2690
+ y: 0
2691
+ },
2692
+ {
2693
+ x: i + 8,
2694
+ y: -a
2695
+ },
2696
+ {
2697
+ x: -8,
2698
+ y: -a
2699
+ },
2700
+ {
2701
+ x: -8,
2702
+ y: 0
2703
+ }
2704
+ ], s = Y(n, i, a, o);
2705
+ return s.attr("style", t.style), J(t, s), t.intersect = function(e) {
2706
+ return K.polygon(t, o, e);
2707
+ }, n;
2708
+ }, "subroutine"), ut = /* @__PURE__ */ u((e, t) => {
2709
+ let n = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), r = n.insert("circle", ":first-child");
2710
+ return r.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), J(t, r), t.intersect = function(e) {
2711
+ return K.circle(t, 7, e);
2712
+ }, n;
2713
+ }, "start"), dt = /* @__PURE__ */ u((e, t, n) => {
2714
+ let r = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), i = 70, a = 10;
2715
+ return n === "LR" && (i = 10, a = 70), J(t, r.append("rect").attr("x", -1 * i / 2).attr("y", -1 * a / 2).attr("width", i).attr("height", a).attr("class", "fork-join")), t.height += t.padding / 2, t.width += t.padding / 2, t.intersect = function(e) {
2716
+ return K.rect(t, e);
2717
+ }, r;
2718
+ }, "forkJoin"), ft = {
2719
+ rhombus: Ge,
2720
+ composite: rt,
2721
+ question: Ge,
2722
+ rect: nt,
2723
+ labelRect: it,
2724
+ rectWithTitle: at,
2725
+ choice: Ke,
2726
+ circle: st,
2727
+ doublecircle: ct,
2728
+ stadium: ot,
2729
+ hexagon: qe,
2730
+ block_arrow: Je,
2731
+ rect_left_inv_arrow: Ye,
2732
+ lean_right: Xe,
2733
+ lean_left: Ze,
2734
+ trapezoid: Qe,
2735
+ inv_trapezoid: $e,
2736
+ rect_right_inv_arrow: et,
2737
+ cylinder: tt,
2738
+ start: ut,
2739
+ end: /* @__PURE__ */ u((e, t) => {
2740
+ let n = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), r = n.insert("circle", ":first-child"), i = n.insert("circle", ":first-child");
2741
+ return i.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), r.attr("class", "state-end").attr("r", 5).attr("width", 10).attr("height", 10), J(t, i), t.intersect = function(e) {
2742
+ return K.circle(t, 7, e);
2743
+ }, n;
2744
+ }, "end"),
2745
+ note: Ue,
2746
+ subroutine: lt,
2747
+ fork: dt,
2748
+ join: dt,
2749
+ class_box: /* @__PURE__ */ u(async (e, t) => {
2750
+ let n = t.padding / 2, i;
2751
+ i = t.classes ? "node " + t.classes : "node default";
2752
+ let a = e.insert("g").attr("class", i).attr("id", t.domId || t.id), o = a.insert("rect", ":first-child"), c = a.insert("line"), l = a.insert("line"), u = 0, f = 4, p = a.insert("g").attr("class", "label"), m = 0, h = t.classData.annotations?.[0], g = await V(p, t.classData.annotations[0] ? "«" + t.classData.annotations[0] + "»" : "", t.labelStyle, !0, !0), _ = g.getBBox();
2753
+ if (s(r())) {
2754
+ let e = g.children[0], t = d(g);
2755
+ _ = e.getBoundingClientRect(), t.attr("width", _.width), t.attr("height", _.height);
2756
+ }
2757
+ t.classData.annotations[0] && (f += _.height + 4, u += _.width);
2758
+ let v = t.classData.label;
2759
+ t.classData.type !== void 0 && t.classData.type !== "" && (s(r()) ? v += "&lt;" + t.classData.type + "&gt;" : v += "<" + t.classData.type + ">");
2760
+ let y = await V(p, v, t.labelStyle, !0, !0);
2761
+ d(y).attr("class", "classTitle");
2762
+ let b = y.getBBox();
2763
+ if (s(r())) {
2764
+ let e = y.children[0], t = d(y);
2765
+ b = e.getBoundingClientRect(), t.attr("width", b.width), t.attr("height", b.height);
2766
+ }
2767
+ f += b.height + 4, b.width > u && (u = b.width);
2768
+ let x = [];
2769
+ t.classData.members.forEach(async (e) => {
2770
+ let n = e.getDisplayDetails(), i = n.displayText;
2771
+ s(r()) && (i = i.replace(/</g, "&lt;").replace(/>/g, "&gt;"));
2772
+ let a = await V(p, i, n.cssStyle ? n.cssStyle : t.labelStyle, !0, !0), o = a.getBBox();
2773
+ if (s(r())) {
2774
+ let e = a.children[0], t = d(a);
2775
+ o = e.getBoundingClientRect(), t.attr("width", o.width), t.attr("height", o.height);
2776
+ }
2777
+ o.width > u && (u = o.width), f += o.height + 4, x.push(a);
2778
+ }), f += 8;
2779
+ let S = [];
2780
+ if (t.classData.methods.forEach(async (e) => {
2781
+ let n = e.getDisplayDetails(), i = n.displayText;
2782
+ s(r()) && (i = i.replace(/</g, "&lt;").replace(/>/g, "&gt;"));
2783
+ let a = await V(p, i, n.cssStyle ? n.cssStyle : t.labelStyle, !0, !0), o = a.getBBox();
2784
+ if (s(r())) {
2785
+ let e = a.children[0], t = d(a);
2786
+ o = e.getBoundingClientRect(), t.attr("width", o.width), t.attr("height", o.height);
2787
+ }
2788
+ o.width > u && (u = o.width), f += o.height + 4, S.push(a);
2789
+ }), f += 8, h) {
2790
+ let e = (u - _.width) / 2;
2791
+ d(g).attr("transform", "translate( " + (-1 * u / 2 + e) + ", " + -1 * f / 2 + ")"), m = _.height + 4;
2792
+ }
2793
+ let C = (u - b.width) / 2;
2794
+ return d(y).attr("transform", "translate( " + (-1 * u / 2 + C) + ", " + (-1 * f / 2 + m) + ")"), m += b.height + 4, c.attr("class", "divider").attr("x1", -u / 2 - n).attr("x2", u / 2 + n).attr("y1", -f / 2 - n + 8 + m).attr("y2", -f / 2 - n + 8 + m), m += 8, x.forEach((e) => {
2795
+ d(e).attr("transform", "translate( " + -u / 2 + ", " + (-1 * f / 2 + m + 8 / 2) + ")");
2796
+ let t = e?.getBBox();
2797
+ m += (t?.height ?? 0) + 4;
2798
+ }), m += 8, l.attr("class", "divider").attr("x1", -u / 2 - n).attr("x2", u / 2 + n).attr("y1", -f / 2 - n + 8 + m).attr("y2", -f / 2 - n + 8 + m), m += 8, S.forEach((e) => {
2799
+ d(e).attr("transform", "translate( " + -u / 2 + ", " + (-1 * f / 2 + m) + ")");
2800
+ let t = e?.getBBox();
2801
+ m += (t?.height ?? 0) + 4;
2802
+ }), o.attr("style", t.style).attr("class", "outer title-state").attr("x", -u / 2 - n).attr("y", -(f / 2) - n).attr("width", u + t.padding).attr("height", f + t.padding), J(t, o), t.intersect = function(e) {
2803
+ return K.rect(t, e);
2804
+ }, a;
2805
+ }, "class_box")
2806
+ }, Q = {}, pt = /* @__PURE__ */ u(async (e, t, n) => {
2807
+ let i, a;
2808
+ if (t.link) {
2809
+ let o;
2810
+ r().securityLevel === "sandbox" ? o = "_top" : t.linkTarget && (o = t.linkTarget || "_blank"), i = e.insert("svg:a").attr("xlink:href", t.link).attr("target", o), a = await ft[t.shape](i, t, n);
2811
+ } else a = await ft[t.shape](e, t, n), i = a;
2812
+ return t.tooltip && a.attr("title", t.tooltip), t.class && a.attr("class", "node default " + t.class), Q[t.id] = i, t.haveCallback && Q[t.id].attr("class", Q[t.id].attr("class") + " clickable"), i;
2813
+ }, "insertNode"), mt = /* @__PURE__ */ u((e) => {
2814
+ let t = Q[e.id];
2815
+ l.trace("Transforming node", e.diff, e, "translate(" + (e.x - e.width / 2 - 5) + ", " + e.width / 2 + ")");
2816
+ let n = e.diff || 0;
2817
+ return e.clusterNode ? t.attr("transform", "translate(" + (e.x + n - e.width / 2) + ", " + (e.y - e.height / 2 - 8) + ")") : t.attr("transform", "translate(" + e.x + ", " + e.y + ")"), n;
2818
+ }, "positionNode");
2819
+ function ht(e, t, n = !1) {
2820
+ let r = e, i = "default";
2821
+ (r?.classes?.length || 0) > 0 && (i = (r?.classes ?? []).join(" ")), i += " flowchart-label";
2822
+ let a = 0, o = "", s;
2823
+ switch (r.type) {
2824
+ case "round":
2825
+ a = 5, o = "rect";
2826
+ break;
2827
+ case "composite":
2828
+ a = 0, o = "composite", s = 0;
2829
+ break;
2830
+ case "square":
2831
+ o = "rect";
2832
+ break;
2833
+ case "diamond":
2834
+ o = "question";
2835
+ break;
2836
+ case "hexagon":
2837
+ o = "hexagon";
2838
+ break;
2839
+ case "block_arrow":
2840
+ o = "block_arrow";
2841
+ break;
2842
+ case "odd":
2843
+ o = "rect_left_inv_arrow";
2844
+ break;
2845
+ case "lean_right":
2846
+ o = "lean_right";
2847
+ break;
2848
+ case "lean_left":
2849
+ o = "lean_left";
2850
+ break;
2851
+ case "trapezoid":
2852
+ o = "trapezoid";
2853
+ break;
2854
+ case "inv_trapezoid":
2855
+ o = "inv_trapezoid";
2856
+ break;
2857
+ case "rect_left_inv_arrow":
2858
+ o = "rect_left_inv_arrow";
2859
+ break;
2860
+ case "circle":
2861
+ o = "circle";
2862
+ break;
2863
+ case "ellipse":
2864
+ o = "ellipse";
2865
+ break;
2866
+ case "stadium":
2867
+ o = "stadium";
2868
+ break;
2869
+ case "subroutine":
2870
+ o = "subroutine";
2871
+ break;
2872
+ case "cylinder":
2873
+ o = "cylinder";
2874
+ break;
2875
+ case "group":
2876
+ o = "rect";
2877
+ break;
2878
+ case "doublecircle":
2879
+ o = "doublecircle";
2880
+ break;
2881
+ default: o = "rect";
2882
+ }
2883
+ let l = m(r?.styles ?? []), u = r.label, d = r.size ?? {
2884
+ width: 0,
2885
+ height: 0,
2886
+ x: 0,
2887
+ y: 0
2888
+ }, f = t.getDiagramId();
2889
+ return {
2890
+ labelStyle: l.labelStyle,
2891
+ shape: o,
2892
+ labelText: u,
2893
+ rx: a,
2894
+ ry: a,
2895
+ class: i,
2896
+ style: l.style,
2897
+ id: r.id,
2898
+ domId: f ? `${f}-${r.id}` : r.id,
2899
+ directions: r.directions,
2900
+ width: d.width,
2901
+ height: d.height,
2902
+ x: d.x,
2903
+ y: d.y,
2904
+ positioned: n,
2905
+ intersect: void 0,
2906
+ type: r.type,
2907
+ padding: s ?? c()?.block?.padding ?? 0
2908
+ };
2909
+ }
2910
+ u(ht, "getNodeFromBlock");
2911
+ async function gt(e, t, n) {
2912
+ let r = ht(t, n, !1);
2913
+ if (r.type === "group") return;
2914
+ let i = await pt(e, r, { config: c() }), a = i.node().getBBox(), o = n.getBlock(r.id);
2915
+ o.size = {
2916
+ width: a.width,
2917
+ height: a.height,
2918
+ x: 0,
2919
+ y: 0,
2920
+ node: i
2921
+ }, n.setBlock(o), i.remove();
2922
+ }
2923
+ u(gt, "calculateBlockSize");
2924
+ async function _t(e, t, n) {
2925
+ let r = ht(t, n, !0);
2926
+ n.getBlock(r.id).type !== "space" && (await pt(e, r, { config: c() }), t.intersect = r?.intersect, mt(r));
2927
+ }
2928
+ u(_t, "insertBlockPositioned");
2929
+ async function $(e, t, n, r) {
2930
+ for (let i of t) await r(e, i, n), i.children && await $(e, i.children, n, r);
2931
+ }
2932
+ u($, "performOperations");
2933
+ async function vt(e, t, n) {
2934
+ await $(e, t, n, gt);
2935
+ }
2936
+ u(vt, "calculateBlockSizes");
2937
+ async function yt(e, t, n) {
2938
+ await $(e, t, n, _t);
2939
+ }
2940
+ u(yt, "insertBlocks");
2941
+ async function bt(e, t, n, r, i) {
2942
+ let a = new w({
2943
+ multigraph: !0,
2944
+ compound: !0
2945
+ });
2946
+ a.setGraph({
2947
+ rankdir: "TB",
2948
+ nodesep: 10,
2949
+ ranksep: 10,
2950
+ marginx: 8,
2951
+ marginy: 8
2952
+ });
2953
+ for (let e of n) e.size && a.setNode(e.id, {
2954
+ width: e.size.width,
2955
+ height: e.size.height,
2956
+ intersect: e.intersect
2957
+ });
2958
+ for (let n of t) if (n.start && n.end) {
2959
+ let t = r.getBlock(n.start), o = r.getBlock(n.end);
2960
+ if (t?.size && o?.size) {
2961
+ let r = t.size, s = o.size, c = [
2962
+ {
2963
+ x: r.x,
2964
+ y: r.y
2965
+ },
2966
+ {
2967
+ x: r.x + (s.x - r.x) / 2,
2968
+ y: r.y + (s.y - r.y) / 2
2969
+ },
2970
+ {
2971
+ x: s.x,
2972
+ y: s.y
2973
+ }
2974
+ ], l = i ? `${i}-${n.id}` : n.id;
2975
+ Ae(e, {
2976
+ v: n.start,
2977
+ w: n.end,
2978
+ name: l
2979
+ }, {
2980
+ ...n,
2981
+ id: l,
2982
+ arrowTypeEnd: n.arrowTypeEnd,
2983
+ arrowTypeStart: n.arrowTypeStart,
2984
+ points: c,
2985
+ classes: "edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"
2986
+ }, void 0, "block", a, i), n.label && (await Te(e, {
2987
+ ...n,
2988
+ label: n.label,
2989
+ labelStyle: "stroke: #333; stroke-width: 1.5px;fill:none;",
2990
+ arrowTypeEnd: n.arrowTypeEnd,
2991
+ arrowTypeStart: n.arrowTypeStart,
2992
+ points: c,
2993
+ classes: "edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"
2994
+ }), Ee({
2995
+ ...n,
2996
+ x: c[1].x,
2997
+ y: c[1].y
2998
+ }, { originalPath: c }));
2999
+ }
3000
+ }
3001
+ }
3002
+ u(bt, "insertEdges");
3003
+ var xt = {
3004
+ parser: D,
3005
+ db: he,
3006
+ renderer: {
3007
+ draw: /* @__PURE__ */ u(async function(e, t, n, r) {
3008
+ let { securityLevel: a, block: o } = c(), s = r.db;
3009
+ s.setDiagramId(t);
3010
+ let u;
3011
+ a === "sandbox" && (u = d("#i" + t));
3012
+ let f = d(a === "sandbox" ? u.nodes()[0].contentDocument.body : "body"), p = a === "sandbox" ? f.select(`[id="${t}"]`) : d(`[id="${t}"]`);
3013
+ ye(p, [
3014
+ "point",
3015
+ "circle",
3016
+ "cross"
3017
+ ], r.type, t);
3018
+ let m = s.getBlocks(), h = s.getBlocksFlat(), g = s.getEdges(), _ = p.insert("g").attr("class", "block");
3019
+ await vt(_, m, s);
3020
+ let v = xe(s);
3021
+ if (await yt(_, m, s), await bt(_, g, h, s, t), v) {
3022
+ let e = v, t = Math.max(1, Math.round(.125 * (e.width / e.height))), n = e.height + t + 10, r = e.width + 10, { useMaxWidth: a } = o;
3023
+ i(p, n, r, !!a), l.debug("Here Bounds", v, e), p.attr("viewBox", `${e.x - 5} ${e.y - 5} ${e.width + 10} ${e.height + 10}`);
3024
+ }
3025
+ }, "draw"),
3026
+ getClasses: /* @__PURE__ */ u(function(e, t) {
3027
+ return t.db.getClasses();
3028
+ }, "getClasses")
3029
+ },
3030
+ styles: ge
3031
+ };
3032
+ //#endregion
3033
+ export { xt as diagram };