docmedown 0.1.7 → 0.9.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 (304) hide show
  1. package/LICENSE +201 -21
  2. package/README.md +86 -37
  3. package/dist/architecture-7GRP2DOG-B8Xs9IfY.mjs +2 -0
  4. package/dist/architecture-7GRP2DOG-Vdsw7WC7.js +1 -0
  5. package/dist/cli.js +672 -1294
  6. package/dist/cynefin-OW5HDTMX-DU6kwwck.js +1 -0
  7. package/dist/cynefin-OW5HDTMX-F0P2M_lQ.mjs +2 -0
  8. package/dist/docmedown-compiler.js +228 -0
  9. package/dist/docmedown-mermaid.js +3588 -0
  10. package/dist/docmedown.cjs +7264 -80
  11. package/dist/docmedown.iife.js +7624 -424
  12. package/dist/docmedown.mjs +15531 -15009
  13. package/dist/docmedown.web.js +7628 -0
  14. package/dist/eventmodeling-NTZA5JFV-D58ICByZ.js +1 -0
  15. package/dist/eventmodeling-NTZA5JFV-SxxTo5cJ.mjs +2 -0
  16. package/dist/gitGraph-4MIJSDKK-C_R2a4aQ.mjs +2 -0
  17. package/dist/gitGraph-4MIJSDKK-CdMj8HJ8.js +1 -0
  18. package/dist/info-A6RAGUB7-CG4UBCfn.js +1 -0
  19. package/dist/info-A6RAGUB7-DmjQlHTj.mjs +2 -0
  20. package/dist/mermaid-BvOI3ZSW.js +3334 -0
  21. package/dist/mermaid-Cx9uSfoz.mjs +116948 -0
  22. package/dist/packet-AYTQ26CC-CMuoEJn0.js +1 -0
  23. package/dist/packet-AYTQ26CC-tdMo_iPL.mjs +2 -0
  24. package/dist/pie-WAS4IAKB-C1hjX8y0.js +1 -0
  25. package/dist/pie-WAS4IAKB-DG2Bio1G.mjs +2 -0
  26. package/dist/prism-CeBRmKvl.js +2 -0
  27. package/dist/prism-CummdiZX.mjs +1588 -0
  28. package/dist/radar-RG4KPBEZ-DHxYOB0f.mjs +2 -0
  29. package/dist/radar-RG4KPBEZ-Dvyo3gdA.js +1 -0
  30. package/dist/railroad-74A4TZTK-1sb9Z_QQ.js +1 -0
  31. package/dist/railroad-74A4TZTK-CwztrSkE.mjs +2 -0
  32. package/dist/railroad-abnf-HS5TGJTU-4264fZjH.js +1 -0
  33. package/dist/railroad-abnf-HS5TGJTU-BKCsR9iC.mjs +2 -0
  34. package/dist/railroad-ebnf-LZEXJU2U-BXErl5kO.js +1 -0
  35. package/dist/railroad-ebnf-LZEXJU2U-DzDOfuxK.mjs +2 -0
  36. package/dist/railroad-peg-WCYAUIDC-B6gNHamV.mjs +2 -0
  37. package/dist/railroad-peg-WCYAUIDC-D7pSwRGa.js +1 -0
  38. package/dist/rolldown-runtime-B0aSnxlc.mjs +20 -0
  39. package/dist/rolldown-runtime-DF3sbh8G.js +1 -0
  40. package/dist/svelte-compiler-loader-Deqbdbvf.js +1 -0
  41. package/dist/svelte-compiler-loader-DtYQgEKV.mjs +50 -0
  42. package/dist/svelte-runtime-Brc440dp.js +5 -0
  43. package/dist/svelte-runtime-CgCk_bw1.mjs +40 -0
  44. package/dist/treeView-Q6P3EWNA-DArM8kFH.mjs +2 -0
  45. package/dist/treeView-Q6P3EWNA-JstiGzov.js +1 -0
  46. package/dist/treemap-WGGIJYW6-CMIcmEVN.mjs +2 -0
  47. package/dist/treemap-WGGIJYW6-Dq6fFckz.js +1 -0
  48. package/dist/ts-compiler-BMDmcNn5.mjs +93 -0
  49. package/dist/ts-compiler-U7pTMJjY.js +3 -0
  50. package/dist/types/runtime/bridges/dynamic-component.d.ts +43 -0
  51. package/dist/types/runtime/bridges/element-bridge.d.ts +24 -0
  52. package/dist/types/runtime/bridges/index.d.ts +3 -0
  53. package/dist/types/runtime/bridges/react-bridge.d.ts +35 -0
  54. package/dist/types/runtime/compiler-cache.d.ts +18 -0
  55. package/dist/types/runtime/config-schema.d.ts +2 -0
  56. package/dist/types/runtime/favicons.d.ts +28 -0
  57. package/dist/types/runtime/loader/local-loader.d.ts +13 -0
  58. package/dist/types/runtime/markdown/component-body.d.ts +7 -0
  59. package/dist/types/runtime/markdown/escape.d.ts +1 -0
  60. package/dist/types/runtime/markdown/highlighter.d.ts +32 -6
  61. package/dist/types/runtime/markdown/katex.d.ts +5 -0
  62. package/dist/types/runtime/markdown/mermaid-engine.d.ts +1 -0
  63. package/dist/types/runtime/markdown/mermaid-loader.d.ts +19 -0
  64. package/dist/types/runtime/markdown/mermaid.d.ts +6 -0
  65. package/dist/types/runtime/markdown/tables.d.ts +68 -0
  66. package/dist/types/runtime/media.d.ts +30 -0
  67. package/dist/types/runtime/motion.d.ts +134 -0
  68. package/dist/types/runtime/offline-export.d.ts +9 -2
  69. package/dist/types/runtime/router.d.ts +40 -2
  70. package/dist/types/runtime/splash.d.ts +90 -0
  71. package/dist/types/runtime/svelte-compiler-engine.d.ts +1 -0
  72. package/dist/types/runtime/svelte-compiler-loader.d.ts +14 -0
  73. package/dist/types/runtime/svelte-runtime.d.ts +29 -0
  74. package/dist/types/runtime/svelte-tag.d.ts +7 -0
  75. package/dist/types/runtime/ts-compiler.d.ts +24 -0
  76. package/dist/types/runtime/types.d.ts +1 -0
  77. package/dist/types/ui/doc-context.svelte.d.ts +198 -0
  78. package/dist/types/ui/index.d.ts +33 -0
  79. package/dist/types/ui/registry.d.ts +52 -0
  80. package/dist/types/ui/theme.svelte.d.ts +32 -0
  81. package/dist/wardley-WFR3VGLG-BK9BA6h6.mjs +2 -0
  82. package/dist/wardley-WFR3VGLG-Cbs7W-dU.js +1 -0
  83. package/package.json +61 -48
  84. package/schemas/docs.schema.json +186 -181
  85. package/templates/.dmd/CounterWidget.svelte +29 -0
  86. package/templates/README.md +2 -2
  87. package/templates/favicon.svg +12 -0
  88. package/templates/favicons/favicon-book.svg +11 -0
  89. package/templates/favicons/favicon-markdown.svg +11 -0
  90. package/templates/favicons/favicon-minimal.svg +15 -0
  91. package/templates/favicons/favicon-terminal.svg +14 -0
  92. package/templates/favicons/favicon.svg +12 -0
  93. package/templates/guides/custom-components.md +82 -22
  94. package/templates/index.html +6 -3
  95. package/dist/abnfDiagram-VCTEODGH-CtQBp0Qv.mjs +0 -89
  96. package/dist/abnfDiagram-VCTEODGH-mccrzlD_.js +0 -1
  97. package/dist/arc-DgPKXEdT.mjs +0 -82
  98. package/dist/arc-n7TW7Bis.js +0 -1
  99. package/dist/architecture-7GRP2DOG-B7myQ46f.js +0 -1
  100. package/dist/architecture-7GRP2DOG-Cxj1ussQ.mjs +0 -3
  101. package/dist/architectureDiagram-5GKGNRK7-BdTCu5T3.js +0 -36
  102. package/dist/architectureDiagram-5GKGNRK7-CkgZa-G1.mjs +0 -4154
  103. package/dist/array-CApNbSU9.mjs +0 -6
  104. package/dist/array-DZSRzHA_.js +0 -1
  105. package/dist/blockDiagram-I7D4REHJ-CSYvpxQw.js +0 -129
  106. package/dist/blockDiagram-I7D4REHJ-CYngfPD9.mjs +0 -1922
  107. package/dist/c4Diagram-7LVT6UL2-B-sz5MUK.js +0 -38
  108. package/dist/c4Diagram-7LVT6UL2-DEzxFf2b.mjs +0 -3010
  109. package/dist/channel-LgHproiI.mjs +0 -5
  110. package/dist/channel-yqu0m4cl.js +0 -1
  111. package/dist/chunk-2E4U76K2-BOyeRQsI.js +0 -1
  112. package/dist/chunk-2E4U76K2-CoTrgtfg.mjs +0 -348
  113. package/dist/chunk-2Q5K7J3B-D4EgYPOq.mjs +0 -15
  114. package/dist/chunk-2Q5K7J3B-DhjCNjaM.js +0 -1
  115. package/dist/chunk-4HAMMTFA-GFyfmcSO.js +0 -62
  116. package/dist/chunk-4HAMMTFA-VgWPe1ng.mjs +0 -4188
  117. package/dist/chunk-5VM5RSS4-GINalzIv.js +0 -15
  118. package/dist/chunk-5VM5RSS4-TqxtqrwE.mjs +0 -5
  119. package/dist/chunk-75Z2AOVW-DYouz5MZ.js +0 -2
  120. package/dist/chunk-75Z2AOVW-Dz0Sko9Y.mjs +0 -1330
  121. package/dist/chunk-CLGD4ZFX-C5J-e2io.js +0 -1
  122. package/dist/chunk-CLGD4ZFX-DBkwyMMv.mjs +0 -14
  123. package/dist/chunk-DU6HZSFF-BEQZSmUu.mjs +0 -3836
  124. package/dist/chunk-DU6HZSFF-CWc5ewtb.js +0 -127
  125. package/dist/chunk-F27PBJKO-8jvY_jJK.js +0 -1
  126. package/dist/chunk-F27PBJKO-DFH3sRZG.mjs +0 -61
  127. package/dist/chunk-FOHPRMQF-LRqOLsSw.mjs +0 -21456
  128. package/dist/chunk-FOHPRMQF-tmTlwTeH.js +0 -161
  129. package/dist/chunk-GMAD6QVW-BZeZ4fdb.mjs +0 -1863
  130. package/dist/chunk-GMAD6QVW-DEQiTa0c.js +0 -72
  131. package/dist/chunk-GVQU2GXP-B1D3J05J.mjs +0 -37
  132. package/dist/chunk-GVQU2GXP-CdJIWN41.js +0 -1
  133. package/dist/chunk-IMKFNOWR-BmZb9U1f.mjs +0 -2042
  134. package/dist/chunk-IMKFNOWR-CPJsszGN.js +0 -231
  135. package/dist/chunk-JWPE2WC7-DIKiF5cm.mjs +0 -8
  136. package/dist/chunk-JWPE2WC7-p1fYVdYc.js +0 -1
  137. package/dist/chunk-L3NEJ4N5-TzDiVs78.js +0 -1
  138. package/dist/chunk-L3NEJ4N5-lal8wUID.mjs +0 -245
  139. package/dist/chunk-LNGE3PJU-BQX75wkM.js +0 -34
  140. package/dist/chunk-LNGE3PJU-DJ9JuXV6.mjs +0 -1521
  141. package/dist/chunk-OSK3NFVY-9AWK88m1.mjs +0 -672
  142. package/dist/chunk-OSK3NFVY-CHzvVe8m.js +0 -10
  143. package/dist/chunk-P2QGCYS3-6q3AXPt5.mjs +0 -67
  144. package/dist/chunk-P2QGCYS3-DKZzpRQW.js +0 -1
  145. package/dist/chunk-POPQ4Y6H-Dd7J9tx3.mjs +0 -26
  146. package/dist/chunk-POPQ4Y6H-T5C7wpjf.js +0 -1
  147. package/dist/chunk-PWAF6VOD-BYG76tEe.mjs +0 -275
  148. package/dist/chunk-PWAF6VOD-DxZLuCEw.js +0 -1
  149. package/dist/chunk-SHT3W25Y-B2Wes8jn.mjs +0 -4183
  150. package/dist/chunk-SHT3W25Y-BQjHSn5K.js +0 -168
  151. package/dist/chunk-SVP7TREG-BFMd615E.js +0 -88
  152. package/dist/chunk-SVP7TREG-CynckzeF.mjs +0 -490
  153. package/dist/chunk-TICWLB2K-BfCuoR1V.mjs +0 -3357
  154. package/dist/chunk-TICWLB2K-agcyBfUp.js +0 -206
  155. package/dist/chunk-TLUHSLCS-CUrWaKDG.mjs +0 -59
  156. package/dist/chunk-TLUHSLCS-Drx_a7am.js +0 -1
  157. package/dist/chunk-XXDRQBXY-AAk1-Cyg.js +0 -1
  158. package/dist/chunk-XXDRQBXY-DpR8eYzz.mjs +0 -9
  159. package/dist/chunk-Y2CYZVJY-CnmLqFtv.js +0 -1
  160. package/dist/chunk-Y2CYZVJY-i11wjrBe.mjs +0 -12
  161. package/dist/classDiagram-ZZMXUADV-B7IN9zcX.js +0 -1
  162. package/dist/classDiagram-ZZMXUADV-tcy6gxSB.mjs +0 -30
  163. package/dist/classDiagram-v2-VYDZK3BY-B7IN9zcX.js +0 -1
  164. package/dist/classDiagram-v2-VYDZK3BY-D5wM6Acp.mjs +0 -30
  165. package/dist/cose-bilkent-JH36ORCC-DBUPO3qJ.js +0 -1
  166. package/dist/cose-bilkent-JH36ORCC-Slpx4WIt.mjs +0 -2253
  167. package/dist/cynefin-OW5HDTMX--QVnfGi1.mjs +0 -3
  168. package/dist/cynefin-OW5HDTMX-lNKysi7S.js +0 -1
  169. package/dist/cynefinDiagram-5FMLGOSQ-CsFONYqx.js +0 -62
  170. package/dist/cynefinDiagram-5FMLGOSQ-DsrxYBcg.mjs +0 -355
  171. package/dist/cytoscape.esm-C5TvPYYm.mjs +0 -18148
  172. package/dist/cytoscape.esm-CBmWJr5M.js +0 -321
  173. package/dist/dagre-CZ6P9L_h.js +0 -1
  174. package/dist/dagre-GXQ25YYZ-CQszk-7P.js +0 -4
  175. package/dist/dagre-GXQ25YYZ-ecYByRSn.mjs +0 -425
  176. package/dist/dagre-J_1oH0eY.mjs +0 -1934
  177. package/dist/defaultLocale-N-0uLSyg.mjs +0 -198
  178. package/dist/defaultLocale-ybN1Vtvg.js +0 -1
  179. package/dist/diagram-S7CK7UJ4-CTMvxX__.js +0 -30
  180. package/dist/diagram-S7CK7UJ4-DxCghfa-.mjs +0 -301
  181. package/dist/diagram-UQ7AKVKN-1viEkqlG.js +0 -41
  182. package/dist/diagram-UQ7AKVKN-BA7Z_oB7.mjs +0 -214
  183. package/dist/diagram-VSXAHHWV-DgVT19mq.js +0 -3
  184. package/dist/diagram-VSXAHHWV-Dtqo03M5.mjs +0 -432
  185. package/dist/diagram-VX7I27RA-CNw0pOX_.js +0 -24
  186. package/dist/diagram-VX7I27RA-GMPRt8Zh.mjs +0 -527
  187. package/dist/diagram-Z3DM3KII-C6XdQK_Q.mjs +0 -134
  188. package/dist/diagram-Z3DM3KII-CPkBr3FT.js +0 -24
  189. package/dist/dist-CXWJafG_.js +0 -1
  190. package/dist/dist-DNdLIC8h.mjs +0 -59
  191. package/dist/ebnfDiagram-PWID7BFC-CseVsyL3.js +0 -1
  192. package/dist/ebnfDiagram-PWID7BFC-D_dBDXWC.mjs +0 -100
  193. package/dist/erDiagram-RLTQ6QDP-DFwfQTRS.js +0 -99
  194. package/dist/erDiagram-RLTQ6QDP-DP7ddGMH.mjs +0 -1966
  195. package/dist/eventmodeling-NTZA5JFV-CzxVg0l5.js +0 -1
  196. package/dist/eventmodeling-NTZA5JFV-Djsy__5n.mjs +0 -3
  197. package/dist/flowDiagram-HODETNUW-7hSJfI3W.js +0 -1
  198. package/dist/flowDiagram-HODETNUW-Dqu5Lr19.mjs +0 -17
  199. package/dist/ganttDiagram-EL5Y4UJY-KNL3tzTD.mjs +0 -3072
  200. package/dist/ganttDiagram-EL5Y4UJY-aiLqNWgi.js +0 -292
  201. package/dist/gitGraph-4MIJSDKK-DnElfqX7.js +0 -1
  202. package/dist/gitGraph-4MIJSDKK-xuKJBT2e.mjs +0 -3
  203. package/dist/gitGraphDiagram-WWUBYQGX-D4gSo_-e.js +0 -106
  204. package/dist/gitGraphDiagram-WWUBYQGX-Dooss5fG.mjs +0 -733
  205. package/dist/graphlib-BaETKKSa.js +0 -1
  206. package/dist/graphlib-XW-Jr8pF.mjs +0 -1267
  207. package/dist/info-A6RAGUB7-ClYskpn6.mjs +0 -3
  208. package/dist/info-A6RAGUB7-DDvvt-fW.js +0 -1
  209. package/dist/infoDiagram-27XIBGKW-B2-y2mdQ.mjs +0 -20
  210. package/dist/infoDiagram-27XIBGKW-DYQ9NzfL.js +0 -2
  211. package/dist/init-BJdqMO10.js +0 -1
  212. package/dist/init-CsQUQz36.mjs +0 -13
  213. package/dist/ishikawaDiagram-5VMMS53U-ULIhoYO5.js +0 -70
  214. package/dist/ishikawaDiagram-5VMMS53U-xAArNh-1.mjs +0 -719
  215. package/dist/journeyDiagram-3NMN7TZE-BBMYNZRL.js +0 -139
  216. package/dist/journeyDiagram-3NMN7TZE-BH-uKqP7.mjs +0 -884
  217. package/dist/kanban-definition-UXKFOSKX-Be49llXr.mjs +0 -976
  218. package/dist/kanban-definition-UXKFOSKX-CDL5yJkq.js +0 -89
  219. package/dist/line-BEwhHSLl.js +0 -1
  220. package/dist/line-CiXRog8O.mjs +0 -34
  221. package/dist/linear-75tfjrny.js +0 -1
  222. package/dist/linear-Ncx_RuON.mjs +0 -288
  223. package/dist/mermaid-parser.core-BBApyu_y.js +0 -6
  224. package/dist/mermaid-parser.core-BRHibdUE.mjs +0 -638
  225. package/dist/mindmap-definition-YA3MSWOX-Chy7XP_5.mjs +0 -1006
  226. package/dist/mindmap-definition-YA3MSWOX-DOda-fkL.js +0 -96
  227. package/dist/ordinal-B1BNQwUR.mjs +0 -65
  228. package/dist/ordinal-B9aFWmF9.js +0 -1
  229. package/dist/packet-AYTQ26CC-CorIy9Ul.js +0 -1
  230. package/dist/packet-AYTQ26CC-DWH8gXJK.mjs +0 -3
  231. package/dist/path-CnWkkRiY.mjs +0 -84
  232. package/dist/path-DIS6ck99.js +0 -1
  233. package/dist/pegDiagram-XKGWAZYB-Cdw6MeON.js +0 -1
  234. package/dist/pegDiagram-XKGWAZYB-uNfxRaq1.mjs +0 -94
  235. package/dist/pie-WAS4IAKB-Cn5eK-5P.mjs +0 -3
  236. package/dist/pie-WAS4IAKB-D84xrSoY.js +0 -1
  237. package/dist/pieDiagram-E7YTZNPT-Bd6mvpJw.js +0 -39
  238. package/dist/pieDiagram-E7YTZNPT-Cczo96a2.mjs +0 -203
  239. package/dist/quadrantDiagram-AXDQQJYC-BPfgvMsS.js +0 -7
  240. package/dist/quadrantDiagram-AXDQQJYC-eqRNtVRl.mjs +0 -2001
  241. package/dist/radar-RG4KPBEZ-DvkxGdO6.mjs +0 -3
  242. package/dist/radar-RG4KPBEZ-R2sQOLL9.js +0 -1
  243. package/dist/railroad-74A4TZTK-BOZIf6ts.js +0 -1
  244. package/dist/railroad-74A4TZTK-CrQzn8Nm.mjs +0 -3
  245. package/dist/railroad-abnf-HS5TGJTU-BZYetxLz.mjs +0 -3
  246. package/dist/railroad-abnf-HS5TGJTU-CXU1aC4B.js +0 -1
  247. package/dist/railroad-ebnf-LZEXJU2U-D29kI3YW.js +0 -1
  248. package/dist/railroad-ebnf-LZEXJU2U-qgzTOmN6.mjs +0 -3
  249. package/dist/railroad-peg-WCYAUIDC-Bjs9Ws3P.mjs +0 -3
  250. package/dist/railroad-peg-WCYAUIDC-CXviP0hz.js +0 -1
  251. package/dist/railroadDiagram-O6MQD6OU-58kvwt7H.mjs +0 -76
  252. package/dist/railroadDiagram-O6MQD6OU-CKY3uzTc.js +0 -1
  253. package/dist/requirementDiagram-BXWQKSXE-0hZ04Q6h.js +0 -84
  254. package/dist/requirementDiagram-BXWQKSXE-CS673B5n.mjs +0 -2224
  255. package/dist/rough.esm-ChRLLRha.js +0 -1
  256. package/dist/rough.esm-DXYGHN3m.mjs +0 -1361
  257. package/dist/sankeyDiagram-P5KCCOFB-D1D6HfAM.mjs +0 -972
  258. package/dist/sankeyDiagram-P5KCCOFB-ciJb9Zr8.js +0 -40
  259. package/dist/sequenceDiagram-WJ2MYXX4-BXEznuI6.js +0 -162
  260. package/dist/sequenceDiagram-WJ2MYXX4-CI1VT8AG.mjs +0 -4156
  261. package/dist/sizeCapture-INFHLROL-BihkCH-7.js +0 -1
  262. package/dist/sizeCapture-INFHLROL-BmxqyOLj.mjs +0 -46
  263. package/dist/src-B4mN2BMl.js +0 -1
  264. package/dist/src-D_hsMyeP.mjs +0 -2154
  265. package/dist/stateDiagram-D77RDMKH-BQrSs72W.mjs +0 -220
  266. package/dist/stateDiagram-D77RDMKH-D2PtkW2U.js +0 -1
  267. package/dist/stateDiagram-v2-MP3YSRHH-CCbvNfk-.mjs +0 -30
  268. package/dist/stateDiagram-v2-MP3YSRHH-Dq1QuPeN.js +0 -1
  269. package/dist/swimlanes-42K2YHIH-CA316NPm.mjs +0 -4979
  270. package/dist/swimlanes-42K2YHIH-DlggBCTy.js +0 -1
  271. package/dist/swimlanesDiagram-VR7AAH4N-BV9PEIoG.js +0 -8
  272. package/dist/swimlanesDiagram-VR7AAH4N-BfrOCfdf.mjs +0 -31
  273. package/dist/timeline-definition-24CTP7MA-Bkd8rWNJ.js +0 -120
  274. package/dist/timeline-definition-24CTP7MA-BvkqNYt1.mjs +0 -1069
  275. package/dist/treeView-Q6P3EWNA-Aof3Cp1M.mjs +0 -3
  276. package/dist/treeView-Q6P3EWNA-BTzvdwbb.js +0 -1
  277. package/dist/treemap-WGGIJYW6-BNXGg99p.mjs +0 -3
  278. package/dist/treemap-WGGIJYW6-DfR4P2Hh.js +0 -1
  279. package/dist/types/runtime/app.d.ts +0 -9
  280. package/dist/types/runtime/components/AppearanceMenu.d.ts +0 -2
  281. package/dist/types/runtime/components/Builtins.d.ts +0 -44
  282. package/dist/types/runtime/components/Content.d.ts +0 -2
  283. package/dist/types/runtime/components/DmdRegistry.d.ts +0 -19
  284. package/dist/types/runtime/components/Layout.d.ts +0 -2
  285. package/dist/types/runtime/components/MermaidDiagram.d.ts +0 -16
  286. package/dist/types/runtime/components/Navbar.d.ts +0 -2
  287. package/dist/types/runtime/components/OfflineDownloadButton.d.ts +0 -2
  288. package/dist/types/runtime/components/OfflineNotice.d.ts +0 -6
  289. package/dist/types/runtime/components/Sidebar.d.ts +0 -2
  290. package/dist/types/runtime/components/TableOfContents.d.ts +0 -8
  291. package/dist/types/runtime/index.d.ts +0 -8
  292. package/dist/types/runtime/markdown/renderer.d.ts +0 -7
  293. package/dist/types/runtime/provider/DocProvider.d.ts +0 -40
  294. package/dist/types/runtime/provider/ThemeProvider.d.ts +0 -25
  295. package/dist/types/runtime/search/SearchModal.d.ts +0 -11
  296. package/dist/vennDiagram-4TSXK5OY-BOUFXjso.js +0 -34
  297. package/dist/vennDiagram-4TSXK5OY-CeOg3-hU.mjs +0 -1880
  298. package/dist/wardley-WFR3VGLG-BOYcSLd1.mjs +0 -3
  299. package/dist/wardley-WFR3VGLG-DWDqJSgm.js +0 -1
  300. package/dist/wardleyDiagram-VM6X3IG4-BhWgMjFr.js +0 -78
  301. package/dist/wardleyDiagram-VM6X3IG4-C31KoRmF.mjs +0 -645
  302. package/dist/xychartDiagram-S5SC5T6Z-1yU8zz6I.js +0 -7
  303. package/dist/xychartDiagram-S5SC5T6Z-BK7upFom.mjs +0 -2210
  304. package/templates/.dmd/components.js +0 -25
@@ -1,1922 +0,0 @@
1
- import { m as e, p as t } from "./src-D_hsMyeP.mjs";
2
- import { n } from "./chunk-Y2CYZVJY-i11wjrBe.mjs";
3
- import { a as r, b as i, c as a, it as o, s, x as c } from "./chunk-DU6HZSFF-BEQZSmUu.mjs";
4
- import { t as l } from "./channel-LgHproiI.mjs";
5
- import { A as u, B as d, C as f, D as p, E as m, F as h, G as g, H as _, I as v, L as y, M as b, N as x, O as S, P as C, R as w, T, U as E, V as D, W as O, b as k, j as A, k as j, l as M, v as ee, w as te, z as ne } from "./chunk-75Z2AOVW-Dz0Sko9Y.mjs";
6
- import "./chunk-P2QGCYS3-6q3AXPt5.mjs";
7
- import "./chunk-PWAF6VOD-BYG76tEe.mjs";
8
- import "./chunk-GMAD6QVW-BZeZ4fdb.mjs";
9
- import "./chunk-4HAMMTFA-VgWPe1ng.mjs";
10
- import { i as re, r as N } from "./chunk-GVQU2GXP-B1D3J05J.mjs";
11
- import { a as ie, c as ae, i as oe, s as se } from "./chunk-OSK3NFVY-9AWK88m1.mjs";
12
- import { t as ce } from "./graphlib-XW-Jr8pF.mjs";
13
- import { t as le } from "./chunk-5VM5RSS4-TqxtqrwE.mjs";
14
- //#region node_modules/es-toolkit/dist/compat/predicate/isArray.mjs
15
- function ue(e) {
16
- return Array.isArray(e);
17
- }
18
- //#endregion
19
- //#region node_modules/es-toolkit/dist/compat/object/clone.mjs
20
- function de(e) {
21
- if (k(e)) return e;
22
- let t = g(e);
23
- if (!fe(e)) return {};
24
- if (ue(e)) {
25
- let t = Array.from(e);
26
- return e.length > 0 && typeof e[0] == "string" && Object.hasOwn(e, "index") && (t.index = e.index, t.input = e.input), t;
27
- }
28
- if (ee(e)) {
29
- let t = e, n = t.constructor;
30
- return new n(t.buffer, t.byteOffset, t.length);
31
- }
32
- if (t === "[object ArrayBuffer]") return new ArrayBuffer(e.byteLength);
33
- if (t === "[object DataView]") {
34
- let t = e, n = t.buffer, r = t.byteOffset, i = t.byteLength, a = new ArrayBuffer(i), o = new Uint8Array(n, r, i);
35
- return new Uint8Array(a).set(o), new DataView(a);
36
- }
37
- if (t === "[object Boolean]" || t === "[object Number]" || t === "[object String]") {
38
- let n = e.constructor, r = new n(e.valueOf());
39
- return t === "[object String]" ? me(r, e) : P(r, e), r;
40
- }
41
- if (t === "[object Date]") return new Date(Number(e));
42
- if (t === "[object RegExp]") {
43
- let t = e, n = new RegExp(t.source, t.flags);
44
- return n.lastIndex = t.lastIndex, n;
45
- }
46
- if (t === "[object Symbol]") return Object(Symbol.prototype.valueOf.call(e));
47
- if (t === "[object Map]") {
48
- let t = e, n = /* @__PURE__ */ new Map();
49
- return t.forEach((e, t) => {
50
- n.set(t, e);
51
- }), n;
52
- }
53
- if (t === "[object Set]") {
54
- let t = e, n = /* @__PURE__ */ new Set();
55
- return t.forEach((e) => {
56
- n.add(e);
57
- }), n;
58
- }
59
- if (t === "[object Arguments]") {
60
- let t = e, n = {};
61
- return P(n, t), n.length = t.length, n[Symbol.iterator] = t[Symbol.iterator], n;
62
- }
63
- let n = {};
64
- return he(n, e), P(n, e), pe(n, e), n;
65
- }
66
- function fe(e) {
67
- switch (g(e)) {
68
- case f:
69
- case T:
70
- case te:
71
- case p:
72
- case m:
73
- case S:
74
- case j:
75
- case u:
76
- case x:
77
- case A:
78
- case b:
79
- case C:
80
- case h:
81
- case v:
82
- case y:
83
- case w:
84
- case ne:
85
- case d:
86
- case E:
87
- case O:
88
- case D:
89
- case _: return !0;
90
- default: return !1;
91
- }
92
- }
93
- function P(e, t) {
94
- for (let n in t) Object.hasOwn(t, n) && (e[n] = t[n]);
95
- }
96
- function pe(e, t) {
97
- let n = Object.getOwnPropertySymbols(t);
98
- for (let r = 0; r < n.length; r++) {
99
- let i = n[r];
100
- Object.prototype.propertyIsEnumerable.call(t, i) && (e[i] = t[i]);
101
- }
102
- }
103
- function me(e, t) {
104
- let n = t.valueOf().length;
105
- for (let r in t) Object.hasOwn(t, r) && (Number.isNaN(Number(r)) || Number(r) >= n) && (e[r] = t[r]);
106
- }
107
- function he(e, t) {
108
- let n = Object.getPrototypeOf(t);
109
- n !== null && typeof t.constructor == "function" && Object.setPrototypeOf(e, n);
110
- }
111
- //#endregion
112
- //#region node_modules/mermaid/dist/chunks/mermaid.core/blockDiagram-I7D4REHJ.mjs
113
- var F = (function() {
114
- var e = /* @__PURE__ */ n(function(e, t, n, r) {
115
- for (n ||= {}, r = e.length; r--; n[e[r]] = t);
116
- return n;
117
- }, "o"), t = [1, 15], r = [1, 7], i = [1, 13], a = [1, 14], o = [1, 19], s = [1, 16], c = [1, 17], l = [1, 18], u = [8, 30], d = [
118
- 8,
119
- 10,
120
- 21,
121
- 28,
122
- 29,
123
- 30,
124
- 31,
125
- 39,
126
- 43,
127
- 46
128
- ], f = [1, 23], p = [1, 24], m = [
129
- 8,
130
- 10,
131
- 15,
132
- 16,
133
- 21,
134
- 28,
135
- 29,
136
- 30,
137
- 31,
138
- 39,
139
- 43,
140
- 46
141
- ], h = [
142
- 8,
143
- 10,
144
- 15,
145
- 16,
146
- 21,
147
- 27,
148
- 28,
149
- 29,
150
- 30,
151
- 31,
152
- 39,
153
- 43,
154
- 46
155
- ], g = [1, 49], _ = {
156
- trace: /* @__PURE__ */ n(function() {}, "trace"),
157
- yy: {},
158
- symbols_: {
159
- error: 2,
160
- spaceLines: 3,
161
- SPACELINE: 4,
162
- NL: 5,
163
- separator: 6,
164
- SPACE: 7,
165
- EOF: 8,
166
- start: 9,
167
- BLOCK_DIAGRAM_KEY: 10,
168
- document: 11,
169
- stop: 12,
170
- statement: 13,
171
- link: 14,
172
- LINK: 15,
173
- START_LINK: 16,
174
- LINK_LABEL: 17,
175
- STR: 18,
176
- nodeStatement: 19,
177
- columnsStatement: 20,
178
- SPACE_BLOCK: 21,
179
- blockStatement: 22,
180
- classDefStatement: 23,
181
- cssClassStatement: 24,
182
- styleStatement: 25,
183
- node: 26,
184
- SIZE: 27,
185
- COLUMNS: 28,
186
- "id-block": 29,
187
- end: 30,
188
- NODE_ID: 31,
189
- nodeShapeNLabel: 32,
190
- dirList: 33,
191
- DIR: 34,
192
- NODE_DSTART: 35,
193
- NODE_DEND: 36,
194
- BLOCK_ARROW_START: 37,
195
- BLOCK_ARROW_END: 38,
196
- classDef: 39,
197
- CLASSDEF_ID: 40,
198
- CLASSDEF_STYLEOPTS: 41,
199
- DEFAULT: 42,
200
- class: 43,
201
- CLASSENTITY_IDS: 44,
202
- STYLECLASS: 45,
203
- style: 46,
204
- STYLE_ENTITY_IDS: 47,
205
- STYLE_DEFINITION_DATA: 48,
206
- $accept: 0,
207
- $end: 1
208
- },
209
- terminals_: {
210
- 2: "error",
211
- 4: "SPACELINE",
212
- 5: "NL",
213
- 7: "SPACE",
214
- 8: "EOF",
215
- 10: "BLOCK_DIAGRAM_KEY",
216
- 15: "LINK",
217
- 16: "START_LINK",
218
- 17: "LINK_LABEL",
219
- 18: "STR",
220
- 21: "SPACE_BLOCK",
221
- 27: "SIZE",
222
- 28: "COLUMNS",
223
- 29: "id-block",
224
- 30: "end",
225
- 31: "NODE_ID",
226
- 34: "DIR",
227
- 35: "NODE_DSTART",
228
- 36: "NODE_DEND",
229
- 37: "BLOCK_ARROW_START",
230
- 38: "BLOCK_ARROW_END",
231
- 39: "classDef",
232
- 40: "CLASSDEF_ID",
233
- 41: "CLASSDEF_STYLEOPTS",
234
- 42: "DEFAULT",
235
- 43: "class",
236
- 44: "CLASSENTITY_IDS",
237
- 45: "STYLECLASS",
238
- 46: "style",
239
- 47: "STYLE_ENTITY_IDS",
240
- 48: "STYLE_DEFINITION_DATA"
241
- },
242
- productions_: [
243
- 0,
244
- [3, 1],
245
- [3, 2],
246
- [3, 2],
247
- [6, 1],
248
- [6, 1],
249
- [6, 1],
250
- [9, 3],
251
- [12, 1],
252
- [12, 1],
253
- [12, 2],
254
- [12, 2],
255
- [11, 1],
256
- [11, 2],
257
- [14, 1],
258
- [14, 4],
259
- [13, 1],
260
- [13, 1],
261
- [13, 1],
262
- [13, 1],
263
- [13, 1],
264
- [13, 1],
265
- [13, 1],
266
- [19, 3],
267
- [19, 2],
268
- [19, 1],
269
- [20, 1],
270
- [22, 4],
271
- [22, 3],
272
- [26, 1],
273
- [26, 2],
274
- [33, 1],
275
- [33, 2],
276
- [32, 3],
277
- [32, 4],
278
- [23, 3],
279
- [23, 3],
280
- [24, 3],
281
- [25, 3]
282
- ],
283
- performAction: /* @__PURE__ */ n(function(e, t, n, r, i, a, o) {
284
- var s = a.length - 1;
285
- switch (i) {
286
- case 4:
287
- r.getLogger().debug("Rule: separator (NL) ");
288
- break;
289
- case 5:
290
- r.getLogger().debug("Rule: separator (Space) ");
291
- break;
292
- case 6:
293
- r.getLogger().debug("Rule: separator (EOF) ");
294
- break;
295
- case 7:
296
- r.getLogger().debug("Rule: hierarchy: ", a[s - 1]), r.setHierarchy(a[s - 1]);
297
- break;
298
- case 8:
299
- r.getLogger().debug("Stop NL ");
300
- break;
301
- case 9:
302
- r.getLogger().debug("Stop EOF ");
303
- break;
304
- case 10:
305
- r.getLogger().debug("Stop NL2 ");
306
- break;
307
- case 11:
308
- r.getLogger().debug("Stop EOF2 ");
309
- break;
310
- case 12:
311
- r.getLogger().debug("Rule: statement: ", a[s]), this.$ = typeof a[s].length == "number" ? a[s] : [a[s]];
312
- break;
313
- case 13:
314
- r.getLogger().debug("Rule: statement #2: ", a[s - 1]), this.$ = [a[s - 1]].concat(a[s]);
315
- break;
316
- case 14:
317
- r.getLogger().debug("Rule: link: ", a[s], e), this.$ = {
318
- edgeTypeStr: a[s],
319
- label: ""
320
- };
321
- break;
322
- case 15:
323
- r.getLogger().debug("Rule: LABEL link: ", a[s - 3], a[s - 1], a[s]), this.$ = {
324
- edgeTypeStr: a[s],
325
- label: a[s - 1]
326
- };
327
- break;
328
- case 18:
329
- let t = parseInt(a[s]), n = r.generateId();
330
- this.$ = {
331
- id: n,
332
- type: "space",
333
- label: "",
334
- width: t,
335
- children: []
336
- };
337
- break;
338
- case 23:
339
- r.getLogger().debug("Rule: (nodeStatement link node) ", a[s - 2], a[s - 1], a[s], " typestr: ", a[s - 1].edgeTypeStr);
340
- let i = r.edgeStrToEdgeData(a[s - 1].edgeTypeStr), o = r.edgeStrToEdgeStartData(a[s - 1].edgeTypeStr), c = r.edgeStrToThickness(a[s - 1].edgeTypeStr), l = r.edgeStrToPattern(a[s - 1].edgeTypeStr);
341
- this.$ = [
342
- {
343
- id: a[s - 2].id,
344
- label: a[s - 2].label,
345
- type: a[s - 2].type,
346
- directions: a[s - 2].directions
347
- },
348
- {
349
- id: a[s - 2].id + "-" + a[s].id,
350
- start: a[s - 2].id,
351
- end: a[s].id,
352
- label: a[s - 1].label,
353
- type: "edge",
354
- thickness: c,
355
- pattern: l,
356
- directions: a[s].directions,
357
- arrowTypeEnd: i,
358
- arrowTypeStart: o
359
- },
360
- {
361
- id: a[s].id,
362
- label: a[s].label,
363
- type: r.typeStr2Type(a[s].typeStr),
364
- directions: a[s].directions
365
- }
366
- ];
367
- break;
368
- case 24:
369
- r.getLogger().debug("Rule: nodeStatement (abc88 node size) ", a[s - 1], a[s]), this.$ = {
370
- id: a[s - 1].id,
371
- label: a[s - 1].label,
372
- type: r.typeStr2Type(a[s - 1].typeStr),
373
- directions: a[s - 1].directions,
374
- widthInColumns: parseInt(a[s], 10)
375
- };
376
- break;
377
- case 25:
378
- r.getLogger().debug("Rule: nodeStatement (node) ", a[s]), this.$ = {
379
- id: a[s].id,
380
- label: a[s].label,
381
- type: r.typeStr2Type(a[s].typeStr),
382
- directions: a[s].directions,
383
- widthInColumns: 1
384
- };
385
- break;
386
- case 26:
387
- r.getLogger().debug("APA123", this ? this : "na"), r.getLogger().debug("COLUMNS: ", a[s]), this.$ = {
388
- type: "column-setting",
389
- columns: a[s] === "auto" ? -1 : parseInt(a[s])
390
- };
391
- break;
392
- case 27:
393
- r.getLogger().debug("Rule: id-block statement : ", a[s - 2], a[s - 1]), r.generateId(), this.$ = {
394
- ...a[s - 2],
395
- type: "composite",
396
- children: a[s - 1]
397
- };
398
- break;
399
- case 28:
400
- r.getLogger().debug("Rule: blockStatement : ", a[s - 2], a[s - 1], a[s]);
401
- let u = r.generateId();
402
- this.$ = {
403
- id: u,
404
- type: "composite",
405
- label: "",
406
- children: a[s - 1]
407
- };
408
- break;
409
- case 29:
410
- r.getLogger().debug("Rule: node (NODE_ID separator): ", a[s]), this.$ = { id: a[s] };
411
- break;
412
- case 30:
413
- r.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ", a[s - 1], a[s]), this.$ = {
414
- id: a[s - 1],
415
- label: a[s].label,
416
- typeStr: a[s].typeStr,
417
- directions: a[s].directions
418
- };
419
- break;
420
- case 31:
421
- r.getLogger().debug("Rule: dirList: ", a[s]), this.$ = [a[s]];
422
- break;
423
- case 32:
424
- r.getLogger().debug("Rule: dirList: ", a[s - 1], a[s]), this.$ = [a[s - 1]].concat(a[s]);
425
- break;
426
- case 33:
427
- r.getLogger().debug("Rule: nodeShapeNLabel: ", a[s - 2], a[s - 1], a[s]), this.$ = {
428
- typeStr: a[s - 2] + a[s],
429
- label: a[s - 1]
430
- };
431
- break;
432
- case 34:
433
- r.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ", a[s - 3], a[s - 2], " #3:", a[s - 1], a[s]), this.$ = {
434
- typeStr: a[s - 3] + a[s],
435
- label: a[s - 2],
436
- directions: a[s - 1]
437
- };
438
- break;
439
- case 35:
440
- case 36:
441
- this.$ = {
442
- type: "classDef",
443
- id: a[s - 1].trim(),
444
- css: a[s].trim()
445
- };
446
- break;
447
- case 37:
448
- this.$ = {
449
- type: "applyClass",
450
- id: a[s - 1].trim(),
451
- styleClass: a[s].trim()
452
- };
453
- break;
454
- case 38: this.$ = {
455
- type: "applyStyles",
456
- id: a[s - 1].trim(),
457
- stylesStr: a[s].trim()
458
- };
459
- }
460
- }, "anonymous"),
461
- table: [
462
- {
463
- 9: 1,
464
- 10: [1, 2]
465
- },
466
- { 1: [3] },
467
- {
468
- 10: t,
469
- 11: 3,
470
- 13: 4,
471
- 19: 5,
472
- 20: 6,
473
- 21: r,
474
- 22: 8,
475
- 23: 9,
476
- 24: 10,
477
- 25: 11,
478
- 26: 12,
479
- 28: i,
480
- 29: a,
481
- 31: o,
482
- 39: s,
483
- 43: c,
484
- 46: l
485
- },
486
- { 8: [1, 20] },
487
- e(u, [2, 12], {
488
- 13: 4,
489
- 19: 5,
490
- 20: 6,
491
- 22: 8,
492
- 23: 9,
493
- 24: 10,
494
- 25: 11,
495
- 26: 12,
496
- 11: 21,
497
- 10: t,
498
- 21: r,
499
- 28: i,
500
- 29: a,
501
- 31: o,
502
- 39: s,
503
- 43: c,
504
- 46: l
505
- }),
506
- e(d, [2, 16], {
507
- 14: 22,
508
- 15: f,
509
- 16: p
510
- }),
511
- e(d, [2, 17]),
512
- e(d, [2, 18]),
513
- e(d, [2, 19]),
514
- e(d, [2, 20]),
515
- e(d, [2, 21]),
516
- e(d, [2, 22]),
517
- e(m, [2, 25], { 27: [1, 25] }),
518
- e(d, [2, 26]),
519
- {
520
- 19: 26,
521
- 26: 12,
522
- 31: o
523
- },
524
- {
525
- 10: t,
526
- 11: 27,
527
- 13: 4,
528
- 19: 5,
529
- 20: 6,
530
- 21: r,
531
- 22: 8,
532
- 23: 9,
533
- 24: 10,
534
- 25: 11,
535
- 26: 12,
536
- 28: i,
537
- 29: a,
538
- 31: o,
539
- 39: s,
540
- 43: c,
541
- 46: l
542
- },
543
- {
544
- 40: [1, 28],
545
- 42: [1, 29]
546
- },
547
- { 44: [1, 30] },
548
- { 47: [1, 31] },
549
- e(h, [2, 29], {
550
- 32: 32,
551
- 35: [1, 33],
552
- 37: [1, 34]
553
- }),
554
- { 1: [2, 7] },
555
- e(u, [2, 13]),
556
- {
557
- 26: 35,
558
- 31: o
559
- },
560
- { 31: [2, 14] },
561
- { 17: [1, 36] },
562
- e(m, [2, 24]),
563
- {
564
- 10: t,
565
- 11: 37,
566
- 13: 4,
567
- 14: 22,
568
- 15: f,
569
- 16: p,
570
- 19: 5,
571
- 20: 6,
572
- 21: r,
573
- 22: 8,
574
- 23: 9,
575
- 24: 10,
576
- 25: 11,
577
- 26: 12,
578
- 28: i,
579
- 29: a,
580
- 31: o,
581
- 39: s,
582
- 43: c,
583
- 46: l
584
- },
585
- { 30: [1, 38] },
586
- { 41: [1, 39] },
587
- { 41: [1, 40] },
588
- { 45: [1, 41] },
589
- { 48: [1, 42] },
590
- e(h, [2, 30]),
591
- { 18: [1, 43] },
592
- { 18: [1, 44] },
593
- e(m, [2, 23]),
594
- { 18: [1, 45] },
595
- { 30: [1, 46] },
596
- e(d, [2, 28]),
597
- e(d, [2, 35]),
598
- e(d, [2, 36]),
599
- e(d, [2, 37]),
600
- e(d, [2, 38]),
601
- { 36: [1, 47] },
602
- {
603
- 33: 48,
604
- 34: g
605
- },
606
- { 15: [1, 50] },
607
- e(d, [2, 27]),
608
- e(h, [2, 33]),
609
- { 38: [1, 51] },
610
- {
611
- 33: 52,
612
- 34: g,
613
- 38: [2, 31]
614
- },
615
- { 31: [2, 15] },
616
- e(h, [2, 34]),
617
- { 38: [2, 32] }
618
- ],
619
- defaultActions: {
620
- 20: [2, 7],
621
- 23: [2, 14],
622
- 50: [2, 15],
623
- 52: [2, 32]
624
- },
625
- parseError: /* @__PURE__ */ n(function(e, t) {
626
- if (t.recoverable) this.trace(e);
627
- else {
628
- var n = Error(e);
629
- throw n.hash = t, n;
630
- }
631
- }, "parseError"),
632
- parse: /* @__PURE__ */ n(function(e) {
633
- var t = this, r = [0], i = [], a = [null], o = [], s = this.table, c = "", l = 0, u = 0, d = 0, f = 2, p = 1, m = o.slice.call(arguments, 1), h = Object.create(this.lexer), g = { yy: {} };
634
- for (var _ in this.yy) Object.prototype.hasOwnProperty.call(this.yy, _) && (g.yy[_] = this.yy[_]);
635
- h.setInput(e, g.yy), g.yy.lexer = h, g.yy.parser = this, h.yylloc === void 0 && (h.yylloc = {});
636
- var v = h.yylloc;
637
- o.push(v);
638
- var y = h.options && h.options.ranges;
639
- this.parseError = typeof g.yy.parseError == "function" ? g.yy.parseError : Object.getPrototypeOf(this).parseError;
640
- function b(e) {
641
- r.length -= 2 * e, a.length -= e, o.length -= e;
642
- }
643
- n(b, "popStack");
644
- function x() {
645
- var e = i.pop() || h.lex() || p;
646
- return typeof e != "number" && (e instanceof Array && (i = e, e = i.pop()), e = t.symbols_[e] || e), e;
647
- }
648
- n(x, "lex");
649
- for (var S, C, w, T, E, D = {}, O, k, A, j;;) {
650
- if (w = r[r.length - 1], this.defaultActions[w] ? T = this.defaultActions[w] : (S ??= x(), T = s[w] && s[w][S]), T === void 0 || !T.length || !T[0]) {
651
- var M = "";
652
- for (O in j = [], s[w]) this.terminals_[O] && O > f && j.push("'" + this.terminals_[O] + "'");
653
- M = h.showPosition ? "Parse error on line " + (l + 1) + ":\n" + h.showPosition() + "\nExpecting " + j.join(", ") + ", got '" + (this.terminals_[S] || S) + "'" : "Parse error on line " + (l + 1) + ": Unexpected " + (S == p ? "end of input" : "'" + (this.terminals_[S] || S) + "'"), this.parseError(M, {
654
- text: h.match,
655
- token: this.terminals_[S] || S,
656
- line: h.yylineno,
657
- loc: v,
658
- expected: j
659
- });
660
- }
661
- if (T[0] instanceof Array && T.length > 1) throw Error("Parse Error: multiple actions possible at state: " + w + ", token: " + S);
662
- switch (T[0]) {
663
- case 1:
664
- r.push(S), a.push(h.yytext), o.push(h.yylloc), r.push(T[1]), S = null, C ? (S = C, C = null) : (u = h.yyleng, c = h.yytext, l = h.yylineno, v = h.yylloc, d > 0 && d--);
665
- break;
666
- case 2:
667
- if (k = this.productions_[T[1]][1], D.$ = a[a.length - k], D._$ = {
668
- first_line: o[o.length - (k || 1)].first_line,
669
- last_line: o[o.length - 1].last_line,
670
- first_column: o[o.length - (k || 1)].first_column,
671
- last_column: o[o.length - 1].last_column
672
- }, y && (D._$.range = [o[o.length - (k || 1)].range[0], o[o.length - 1].range[1]]), E = this.performAction.apply(D, [
673
- c,
674
- u,
675
- l,
676
- g.yy,
677
- T[1],
678
- a,
679
- o
680
- ].concat(m)), E !== void 0) return E;
681
- k && (r = r.slice(0, -1 * k * 2), a = a.slice(0, -1 * k), o = o.slice(0, -1 * k)), r.push(this.productions_[T[1]][0]), a.push(D.$), o.push(D._$), A = s[r[r.length - 2]][r[r.length - 1]], r.push(A);
682
- break;
683
- case 3: return !0;
684
- }
685
- }
686
- return !0;
687
- }, "parse")
688
- };
689
- _.lexer = /* @__PURE__ */ (function() {
690
- return {
691
- EOF: 1,
692
- parseError: /* @__PURE__ */ n(function(e, t) {
693
- if (this.yy.parser) this.yy.parser.parseError(e, t);
694
- else throw Error(e);
695
- }, "parseError"),
696
- setInput: /* @__PURE__ */ n(function(e, t) {
697
- 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 = {
698
- first_line: 1,
699
- first_column: 0,
700
- last_line: 1,
701
- last_column: 0
702
- }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
703
- }, "setInput"),
704
- input: /* @__PURE__ */ n(function() {
705
- var e = this._input[0];
706
- 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;
707
- }, "input"),
708
- unput: /* @__PURE__ */ n(function(e) {
709
- var t = e.length, n = e.split(/(?:\r\n?|\n)/g);
710
- this._input = e + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - t), this.offset -= t;
711
- var r = this.match.split(/(?:\r\n?|\n)/g);
712
- 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);
713
- var i = this.yylloc.range;
714
- return this.yylloc = {
715
- first_line: this.yylloc.first_line,
716
- last_line: this.yylineno + 1,
717
- first_column: this.yylloc.first_column,
718
- 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
719
- }, this.options.ranges && (this.yylloc.range = [i[0], i[0] + this.yyleng - t]), this.yyleng = this.yytext.length, this;
720
- }, "unput"),
721
- more: /* @__PURE__ */ n(function() {
722
- return this._more = !0, this;
723
- }, "more"),
724
- reject: /* @__PURE__ */ n(function() {
725
- if (this.options.backtrack_lexer) this._backtrack = !0;
726
- 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(), {
727
- text: "",
728
- token: null,
729
- line: this.yylineno
730
- });
731
- return this;
732
- }, "reject"),
733
- less: /* @__PURE__ */ n(function(e) {
734
- this.unput(this.match.slice(e));
735
- }, "less"),
736
- pastInput: /* @__PURE__ */ n(function() {
737
- var e = this.matched.substr(0, this.matched.length - this.match.length);
738
- return (e.length > 20 ? "..." : "") + e.substr(-20).replace(/\n/g, "");
739
- }, "pastInput"),
740
- upcomingInput: /* @__PURE__ */ n(function() {
741
- var e = this.match;
742
- return e.length < 20 && (e += this._input.substr(0, 20 - e.length)), (e.substr(0, 20) + (e.length > 20 ? "..." : "")).replace(/\n/g, "");
743
- }, "upcomingInput"),
744
- showPosition: /* @__PURE__ */ n(function() {
745
- var e = this.pastInput(), t = Array(e.length + 1).join("-");
746
- return e + this.upcomingInput() + "\n" + t + "^";
747
- }, "showPosition"),
748
- test_match: /* @__PURE__ */ n(function(e, t) {
749
- var n, r, i;
750
- if (this.options.backtrack_lexer && (i = {
751
- yylineno: this.yylineno,
752
- yylloc: {
753
- first_line: this.yylloc.first_line,
754
- last_line: this.last_line,
755
- first_column: this.yylloc.first_column,
756
- last_column: this.yylloc.last_column
757
- },
758
- yytext: this.yytext,
759
- match: this.match,
760
- matches: this.matches,
761
- matched: this.matched,
762
- yyleng: this.yyleng,
763
- offset: this.offset,
764
- _more: this._more,
765
- _input: this._input,
766
- yy: this.yy,
767
- conditionStack: this.conditionStack.slice(0),
768
- done: this.done
769
- }, 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 = {
770
- first_line: this.yylloc.last_line,
771
- last_line: this.yylineno + 1,
772
- first_column: this.yylloc.last_column,
773
- last_column: r ? r[r.length - 1].length - r[r.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + e[0].length
774
- }, 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;
775
- if (this._backtrack) {
776
- for (var a in i) this[a] = i[a];
777
- return !1;
778
- }
779
- return !1;
780
- }, "test_match"),
781
- next: /* @__PURE__ */ n(function() {
782
- if (this.done) return this.EOF;
783
- this._input || (this.done = !0);
784
- var e, t, n, r;
785
- this._more || (this.yytext = "", this.match = "");
786
- 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)) {
787
- if (t = n, r = a, this.options.backtrack_lexer) {
788
- if (e = this.test_match(n, i[a]), e !== !1) return e;
789
- if (this._backtrack) {
790
- t = !1;
791
- continue;
792
- }
793
- return !1;
794
- }
795
- if (!this.options.flex) break;
796
- }
797
- return t ? (e = this.test_match(t, i[r]), e !== !1 && e) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
798
- text: "",
799
- token: null,
800
- line: this.yylineno
801
- });
802
- }, "next"),
803
- lex: /* @__PURE__ */ n(function() {
804
- return this.next() || this.lex();
805
- }, "lex"),
806
- begin: /* @__PURE__ */ n(function(e) {
807
- this.conditionStack.push(e);
808
- }, "begin"),
809
- popState: /* @__PURE__ */ n(function() {
810
- return this.conditionStack.length - 1 > 0 ? this.conditionStack.pop() : this.conditionStack[0];
811
- }, "popState"),
812
- _currentRules: /* @__PURE__ */ n(function() {
813
- return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
814
- }, "_currentRules"),
815
- topState: /* @__PURE__ */ n(function(e) {
816
- return e = this.conditionStack.length - 1 - Math.abs(e || 0), e >= 0 ? this.conditionStack[e] : "INITIAL";
817
- }, "topState"),
818
- pushState: /* @__PURE__ */ n(function(e) {
819
- this.begin(e);
820
- }, "pushState"),
821
- stateStackSize: /* @__PURE__ */ n(function() {
822
- return this.conditionStack.length;
823
- }, "stateStackSize"),
824
- options: {},
825
- performAction: /* @__PURE__ */ n(function(e, t, n, r) {
826
- switch (n) {
827
- case 0: return e.getLogger().debug("Found block-beta"), 10;
828
- case 1: return e.getLogger().debug("Found id-block"), 29;
829
- case 2: return e.getLogger().debug("Found block"), 10;
830
- case 3:
831
- e.getLogger().debug(".", t.yytext);
832
- break;
833
- case 4:
834
- e.getLogger().debug("_", t.yytext);
835
- break;
836
- case 5: return 5;
837
- case 6: return t.yytext = -1, 28;
838
- case 7: return t.yytext = t.yytext.replace(/columns\s+/, ""), e.getLogger().debug("COLUMNS (LEX)", t.yytext), 28;
839
- case 8:
840
- this.pushState("md_string");
841
- break;
842
- case 9: return "MD_STR";
843
- case 10:
844
- this.popState();
845
- break;
846
- case 11:
847
- this.pushState("string");
848
- break;
849
- case 12:
850
- e.getLogger().debug("LEX: POPPING STR:", t.yytext), this.popState();
851
- break;
852
- case 13: return e.getLogger().debug("LEX: STR end:", t.yytext), "STR";
853
- case 14: return t.yytext = t.yytext.replace(/space\:/, ""), e.getLogger().debug("SPACE NUM (LEX)", t.yytext), 21;
854
- case 15: return t.yytext = "1", e.getLogger().debug("COLUMNS (LEX)", t.yytext), 21;
855
- case 16: return 42;
856
- case 17: return "LINKSTYLE";
857
- case 18: return "INTERPOLATE";
858
- case 19: return this.pushState("CLASSDEF"), 39;
859
- case 20: return this.popState(), this.pushState("CLASSDEFID"), "DEFAULT_CLASSDEF_ID";
860
- case 21: return this.popState(), this.pushState("CLASSDEFID"), 40;
861
- case 22: return this.popState(), 41;
862
- case 23: return this.pushState("CLASS"), 43;
863
- case 24: return this.popState(), this.pushState("CLASS_STYLE"), 44;
864
- case 25: return this.popState(), 45;
865
- case 26: return this.pushState("STYLE_STMNT"), 46;
866
- case 27: return this.popState(), this.pushState("STYLE_DEFINITION"), 47;
867
- case 28: return this.popState(), 48;
868
- case 29: return this.pushState("acc_title"), "acc_title";
869
- case 30: return this.popState(), "acc_title_value";
870
- case 31: return this.pushState("acc_descr"), "acc_descr";
871
- case 32: return this.popState(), "acc_descr_value";
872
- case 33:
873
- this.pushState("acc_descr_multiline");
874
- break;
875
- case 34:
876
- this.popState();
877
- break;
878
- case 35: return "acc_descr_multiline_value";
879
- case 36: return 30;
880
- case 37: return this.popState(), e.getLogger().debug("Lex: (("), "NODE_DEND";
881
- case 38: return this.popState(), e.getLogger().debug("Lex: (("), "NODE_DEND";
882
- case 39: return this.popState(), e.getLogger().debug("Lex: ))"), "NODE_DEND";
883
- case 40: return this.popState(), e.getLogger().debug("Lex: (("), "NODE_DEND";
884
- case 41: return this.popState(), e.getLogger().debug("Lex: (("), "NODE_DEND";
885
- case 42: return this.popState(), e.getLogger().debug("Lex: (-"), "NODE_DEND";
886
- case 43: return this.popState(), e.getLogger().debug("Lex: -)"), "NODE_DEND";
887
- case 44: return this.popState(), e.getLogger().debug("Lex: (("), "NODE_DEND";
888
- case 45: return this.popState(), e.getLogger().debug("Lex: ]]"), "NODE_DEND";
889
- case 46: return this.popState(), e.getLogger().debug("Lex: ("), "NODE_DEND";
890
- case 47: return this.popState(), e.getLogger().debug("Lex: ])"), "NODE_DEND";
891
- case 48: return this.popState(), e.getLogger().debug("Lex: /]"), "NODE_DEND";
892
- case 49: return this.popState(), e.getLogger().debug("Lex: /]"), "NODE_DEND";
893
- case 50: return this.popState(), e.getLogger().debug("Lex: )]"), "NODE_DEND";
894
- case 51: return this.popState(), e.getLogger().debug("Lex: )"), "NODE_DEND";
895
- case 52: return this.popState(), e.getLogger().debug("Lex: ]>"), "NODE_DEND";
896
- case 53: return this.popState(), e.getLogger().debug("Lex: ]"), "NODE_DEND";
897
- case 54: return e.getLogger().debug("Lexa: -)"), this.pushState("NODE"), 35;
898
- case 55: return e.getLogger().debug("Lexa: (-"), this.pushState("NODE"), 35;
899
- case 56: return e.getLogger().debug("Lexa: ))"), this.pushState("NODE"), 35;
900
- case 57: return e.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
901
- case 58: return e.getLogger().debug("Lex: ((("), this.pushState("NODE"), 35;
902
- case 59: return e.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
903
- case 60: return e.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
904
- case 61: return e.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
905
- case 62: return e.getLogger().debug("Lexc: >"), this.pushState("NODE"), 35;
906
- case 63: return e.getLogger().debug("Lexa: (["), this.pushState("NODE"), 35;
907
- case 64: return e.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
908
- case 65: return this.pushState("NODE"), 35;
909
- case 66: return this.pushState("NODE"), 35;
910
- case 67: return this.pushState("NODE"), 35;
911
- case 68: return this.pushState("NODE"), 35;
912
- case 69: return this.pushState("NODE"), 35;
913
- case 70: return this.pushState("NODE"), 35;
914
- case 71: return this.pushState("NODE"), 35;
915
- case 72: return e.getLogger().debug("Lexa: ["), this.pushState("NODE"), 35;
916
- case 73: return this.pushState("BLOCK_ARROW"), e.getLogger().debug("LEX ARR START"), 37;
917
- case 74: return e.getLogger().debug("Lex: NODE_ID", t.yytext), 31;
918
- case 75: return e.getLogger().debug("Lex: EOF", t.yytext), 8;
919
- case 76:
920
- this.pushState("md_string");
921
- break;
922
- case 77:
923
- this.pushState("md_string");
924
- break;
925
- case 78: return "NODE_DESCR";
926
- case 79:
927
- this.popState();
928
- break;
929
- case 80:
930
- e.getLogger().debug("Lex: Starting string"), this.pushState("string");
931
- break;
932
- case 81:
933
- e.getLogger().debug("LEX ARR: Starting string"), this.pushState("string");
934
- break;
935
- case 82: return e.getLogger().debug("LEX: NODE_DESCR:", t.yytext), "NODE_DESCR";
936
- case 83:
937
- e.getLogger().debug("LEX POPPING"), this.popState();
938
- break;
939
- case 84:
940
- e.getLogger().debug("Lex: =>BAE"), this.pushState("ARROW_DIR");
941
- break;
942
- case 85: return t.yytext = t.yytext.replace(/^,\s*/, ""), e.getLogger().debug("Lex (right): dir:", t.yytext), "DIR";
943
- case 86: return t.yytext = t.yytext.replace(/^,\s*/, ""), e.getLogger().debug("Lex (left):", t.yytext), "DIR";
944
- case 87: return t.yytext = t.yytext.replace(/^,\s*/, ""), e.getLogger().debug("Lex (x):", t.yytext), "DIR";
945
- case 88: return t.yytext = t.yytext.replace(/^,\s*/, ""), e.getLogger().debug("Lex (y):", t.yytext), "DIR";
946
- case 89: return t.yytext = t.yytext.replace(/^,\s*/, ""), e.getLogger().debug("Lex (up):", t.yytext), "DIR";
947
- case 90: return t.yytext = t.yytext.replace(/^,\s*/, ""), e.getLogger().debug("Lex (down):", t.yytext), "DIR";
948
- case 91: return t.yytext = "]>", e.getLogger().debug("Lex (ARROW_DIR end):", t.yytext), this.popState(), this.popState(), "BLOCK_ARROW_END";
949
- case 92: return e.getLogger().debug("Lex: LINK", "#" + t.yytext + "#"), 15;
950
- case 93: return e.getLogger().debug("Lex: LINK", t.yytext), 15;
951
- case 94: return e.getLogger().debug("Lex: LINK", t.yytext), 15;
952
- case 95: return e.getLogger().debug("Lex: LINK", t.yytext), 15;
953
- case 96: return e.getLogger().debug("Lex: START_LINK", t.yytext), this.pushState("LLABEL"), 16;
954
- case 97: return e.getLogger().debug("Lex: START_LINK", t.yytext), this.pushState("LLABEL"), 16;
955
- case 98: return e.getLogger().debug("Lex: START_LINK", t.yytext), this.pushState("LLABEL"), 16;
956
- case 99:
957
- this.pushState("md_string");
958
- break;
959
- case 100: return e.getLogger().debug("Lex: Starting string"), this.pushState("string"), "LINK_LABEL";
960
- case 101: return this.popState(), e.getLogger().debug("Lex: LINK", "#" + t.yytext + "#"), 15;
961
- case 102: return this.popState(), e.getLogger().debug("Lex: LINK", t.yytext), 15;
962
- case 103: return this.popState(), e.getLogger().debug("Lex: LINK", t.yytext), 15;
963
- case 104: return e.getLogger().debug("Lex: COLON", t.yytext), t.yytext = t.yytext.slice(1), 27;
964
- }
965
- }, "anonymous"),
966
- rules: [
967
- /^(?:block-beta\b)/,
968
- /^(?:block:)/,
969
- /^(?:block\b)/,
970
- /^(?:[\s]+)/,
971
- /^(?:[\n]+)/,
972
- /^(?:((\u000D\u000A)|(\u000A)))/,
973
- /^(?:columns\s+auto\b)/,
974
- /^(?:columns\s+[\d]+)/,
975
- /^(?:["][`])/,
976
- /^(?:[^`"]+)/,
977
- /^(?:[`]["])/,
978
- /^(?:["])/,
979
- /^(?:["])/,
980
- /^(?:[^"]*)/,
981
- /^(?:space[:]\d+)/,
982
- /^(?:space\b)/,
983
- /^(?:default\b)/,
984
- /^(?:linkStyle\b)/,
985
- /^(?:interpolate\b)/,
986
- /^(?:classDef\s+)/,
987
- /^(?:DEFAULT\s+)/,
988
- /^(?:\w+\s+)/,
989
- /^(?:[^\n]*)/,
990
- /^(?:class\s+)/,
991
- /^(?:(\w+)+((,\s*\w+)*))/,
992
- /^(?:[^\n]*)/,
993
- /^(?:style\s+)/,
994
- /^(?:(\w+)+((,\s*\w+)*))/,
995
- /^(?:[^\n]*)/,
996
- /^(?:accTitle\s*:\s*)/,
997
- /^(?:(?!\n||)*[^\n]*)/,
998
- /^(?:accDescr\s*:\s*)/,
999
- /^(?:(?!\n||)*[^\n]*)/,
1000
- /^(?:accDescr\s*\{\s*)/,
1001
- /^(?:[\}])/,
1002
- /^(?:[^\}]*)/,
1003
- /^(?:end\b\s*)/,
1004
- /^(?:\(\(\()/,
1005
- /^(?:\)\)\))/,
1006
- /^(?:[\)]\))/,
1007
- /^(?:\}\})/,
1008
- /^(?:\})/,
1009
- /^(?:\(-)/,
1010
- /^(?:-\))/,
1011
- /^(?:\(\()/,
1012
- /^(?:\]\])/,
1013
- /^(?:\()/,
1014
- /^(?:\]\))/,
1015
- /^(?:\\\])/,
1016
- /^(?:\/\])/,
1017
- /^(?:\)\])/,
1018
- /^(?:[\)])/,
1019
- /^(?:\]>)/,
1020
- /^(?:[\]])/,
1021
- /^(?:-\))/,
1022
- /^(?:\(-)/,
1023
- /^(?:\)\))/,
1024
- /^(?:\))/,
1025
- /^(?:\(\(\()/,
1026
- /^(?:\(\()/,
1027
- /^(?:\{\{)/,
1028
- /^(?:\{)/,
1029
- /^(?:>)/,
1030
- /^(?:\(\[)/,
1031
- /^(?:\()/,
1032
- /^(?:\[\[)/,
1033
- /^(?:\[\|)/,
1034
- /^(?:\[\()/,
1035
- /^(?:\)\)\))/,
1036
- /^(?:\[\\)/,
1037
- /^(?:\[\/)/,
1038
- /^(?:\[\\)/,
1039
- /^(?:\[)/,
1040
- /^(?:<\[)/,
1041
- /^(?:[^\(\[\n\-\)\{\}\s\<\>:=]+)/,
1042
- /^(?:$)/,
1043
- /^(?:["][`])/,
1044
- /^(?:["][`])/,
1045
- /^(?:[^`"]+)/,
1046
- /^(?:[`]["])/,
1047
- /^(?:["])/,
1048
- /^(?:["])/,
1049
- /^(?:[^"]+)/,
1050
- /^(?:["])/,
1051
- /^(?:\]>\s*\()/,
1052
- /^(?:,?\s*right\s*)/,
1053
- /^(?:,?\s*left\s*)/,
1054
- /^(?:,?\s*x\s*)/,
1055
- /^(?:,?\s*y\s*)/,
1056
- /^(?:,?\s*up\s*)/,
1057
- /^(?:,?\s*down\s*)/,
1058
- /^(?:\)\s*)/,
1059
- /^(?:\s*[xo<]?--+[-xo>]\s*)/,
1060
- /^(?:\s*[xo<]?==+[=xo>]\s*)/,
1061
- /^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,
1062
- /^(?:\s*~~[\~]+\s*)/,
1063
- /^(?:\s*[xo<]?--\s*)/,
1064
- /^(?:\s*[xo<]?==\s*)/,
1065
- /^(?:\s*[xo<]?-\.\s*)/,
1066
- /^(?:["][`])/,
1067
- /^(?:["])/,
1068
- /^(?:\s*[xo<]?--+[-xo>]\s*)/,
1069
- /^(?:\s*[xo<]?==+[=xo>]\s*)/,
1070
- /^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,
1071
- /^(?::\d+)/
1072
- ],
1073
- conditions: {
1074
- STYLE_DEFINITION: {
1075
- rules: [28],
1076
- inclusive: !1
1077
- },
1078
- STYLE_STMNT: {
1079
- rules: [27],
1080
- inclusive: !1
1081
- },
1082
- CLASSDEFID: {
1083
- rules: [22],
1084
- inclusive: !1
1085
- },
1086
- CLASSDEF: {
1087
- rules: [20, 21],
1088
- inclusive: !1
1089
- },
1090
- CLASS_STYLE: {
1091
- rules: [25],
1092
- inclusive: !1
1093
- },
1094
- CLASS: {
1095
- rules: [24],
1096
- inclusive: !1
1097
- },
1098
- LLABEL: {
1099
- rules: [
1100
- 99,
1101
- 100,
1102
- 101,
1103
- 102,
1104
- 103
1105
- ],
1106
- inclusive: !1
1107
- },
1108
- ARROW_DIR: {
1109
- rules: [
1110
- 85,
1111
- 86,
1112
- 87,
1113
- 88,
1114
- 89,
1115
- 90,
1116
- 91
1117
- ],
1118
- inclusive: !1
1119
- },
1120
- BLOCK_ARROW: {
1121
- rules: [
1122
- 76,
1123
- 81,
1124
- 84
1125
- ],
1126
- inclusive: !1
1127
- },
1128
- NODE: {
1129
- rules: [
1130
- 37,
1131
- 38,
1132
- 39,
1133
- 40,
1134
- 41,
1135
- 42,
1136
- 43,
1137
- 44,
1138
- 45,
1139
- 46,
1140
- 47,
1141
- 48,
1142
- 49,
1143
- 50,
1144
- 51,
1145
- 52,
1146
- 53,
1147
- 77,
1148
- 80
1149
- ],
1150
- inclusive: !1
1151
- },
1152
- md_string: {
1153
- rules: [
1154
- 9,
1155
- 10,
1156
- 78,
1157
- 79
1158
- ],
1159
- inclusive: !1
1160
- },
1161
- space: {
1162
- rules: [],
1163
- inclusive: !1
1164
- },
1165
- string: {
1166
- rules: [
1167
- 12,
1168
- 13,
1169
- 82,
1170
- 83
1171
- ],
1172
- inclusive: !1
1173
- },
1174
- acc_descr_multiline: {
1175
- rules: [34, 35],
1176
- inclusive: !1
1177
- },
1178
- acc_descr: {
1179
- rules: [32],
1180
- inclusive: !1
1181
- },
1182
- acc_title: {
1183
- rules: [30],
1184
- inclusive: !1
1185
- },
1186
- INITIAL: {
1187
- rules: [
1188
- 0,
1189
- 1,
1190
- 2,
1191
- 3,
1192
- 4,
1193
- 5,
1194
- 6,
1195
- 7,
1196
- 8,
1197
- 11,
1198
- 14,
1199
- 15,
1200
- 16,
1201
- 17,
1202
- 18,
1203
- 19,
1204
- 23,
1205
- 26,
1206
- 29,
1207
- 31,
1208
- 33,
1209
- 36,
1210
- 54,
1211
- 55,
1212
- 56,
1213
- 57,
1214
- 58,
1215
- 59,
1216
- 60,
1217
- 61,
1218
- 62,
1219
- 63,
1220
- 64,
1221
- 65,
1222
- 66,
1223
- 67,
1224
- 68,
1225
- 69,
1226
- 70,
1227
- 71,
1228
- 72,
1229
- 73,
1230
- 74,
1231
- 75,
1232
- 92,
1233
- 93,
1234
- 94,
1235
- 95,
1236
- 96,
1237
- 97,
1238
- 98,
1239
- 104
1240
- ],
1241
- inclusive: !0
1242
- }
1243
- }
1244
- };
1245
- })();
1246
- function v() {
1247
- this.yy = {};
1248
- }
1249
- return n(v, "Parser"), v.prototype = _, _.Parser = v, new v();
1250
- })();
1251
- F.parser = F;
1252
- var ge = F, I = /* @__PURE__ */ new Map(), L = [], R = /* @__PURE__ */ new Map(), _e = "color", z = "fill", ve = "bgFill", ye = ",", B = /* @__PURE__ */ new Map(), V = "", be = /* @__PURE__ */ n((e) => s.sanitizeText(e, c()), "sanitizeText"), xe = /* @__PURE__ */ n(function(e, t = "") {
1253
- let n = B.get(e);
1254
- n || (n = {
1255
- id: e,
1256
- styles: [],
1257
- textStyles: []
1258
- }, B.set(e, n)), t?.split(ye).forEach((e) => {
1259
- let t = e.replace(/([^;]*);/, "$1").trim();
1260
- if (RegExp(_e).exec(e)) {
1261
- let e = t.replace(z, ve).replace(_e, z);
1262
- n.textStyles.push(e);
1263
- }
1264
- n.styles.push(t);
1265
- });
1266
- }, "addStyleClass"), Se = /* @__PURE__ */ n(function(e, t = "") {
1267
- let n = I.get(e);
1268
- t != null && (n.styles = t.split(ye));
1269
- }, "addStyle2Node"), Ce = /* @__PURE__ */ n(function(e, t) {
1270
- e.split(",").forEach(function(e) {
1271
- let n = I.get(e);
1272
- if (n === void 0) {
1273
- let t = e.trim();
1274
- n = {
1275
- id: t,
1276
- type: "na",
1277
- children: []
1278
- }, I.set(t, n);
1279
- }
1280
- n.classes || (n.classes = []), n.classes.push(t);
1281
- });
1282
- }, "setCssClass"), we = /* @__PURE__ */ n((t, n) => {
1283
- let r = t.flat(), i = [], a = r.find((e) => e?.type === "column-setting")?.columns ?? -1;
1284
- for (let t of r) {
1285
- if (typeof a == "number" && a > 0 && t.type !== "column-setting" && typeof t.widthInColumns == "number" && t.widthInColumns > a && e.warn(`Block ${t.id} width ${t.widthInColumns} exceeds configured column width ${a}`), t.label &&= be(t.label), t.type === "classDef") {
1286
- xe(t.id, t.css);
1287
- continue;
1288
- }
1289
- if (t.type === "applyClass") {
1290
- Ce(t.id, t?.styleClass ?? "");
1291
- continue;
1292
- }
1293
- if (t.type === "applyStyles") {
1294
- t?.stylesStr && Se(t.id, t?.stylesStr);
1295
- continue;
1296
- }
1297
- if (t.type === "column-setting") n.columns = t.columns ?? -1;
1298
- else if (t.type === "edge") {
1299
- let e = (R.get(t.id) ?? 0) + 1;
1300
- R.set(t.id, e), t.id = e + "-" + t.id, L.push(t);
1301
- } else {
1302
- t.label ||= t.type === "composite" ? "" : t.id;
1303
- let e = I.get(t.id);
1304
- if (e === void 0 ? I.set(t.id, t) : (t.type !== "na" && (e.type = t.type), t.label !== t.id && (e.label = t.label)), t.children && we(t.children, t), t.type === "space") {
1305
- let e = t.width ?? 1;
1306
- for (let n = 0; n < e; n++) {
1307
- let e = de(t);
1308
- e.id = e.id + "-" + n, I.set(e.id, e), i.push(e);
1309
- }
1310
- } else e === void 0 && i.push(t);
1311
- }
1312
- }
1313
- n.children = i;
1314
- }, "populateBlockDatabase"), H = [], U = {
1315
- id: "root",
1316
- type: "composite",
1317
- children: [],
1318
- columns: -1
1319
- }, Te = /* @__PURE__ */ n(() => {
1320
- e.debug("Clear called"), r(), U = {
1321
- id: "root",
1322
- type: "composite",
1323
- children: [],
1324
- columns: -1
1325
- }, I = /* @__PURE__ */ new Map([["root", U]]), H = [], B = /* @__PURE__ */ new Map(), L = [], R = /* @__PURE__ */ new Map(), V = "";
1326
- }, "clear");
1327
- function Ee(t) {
1328
- switch (e.debug("typeStr2Type", t), t) {
1329
- case "[]": return "square";
1330
- case "()": return e.debug("we have a round"), "round";
1331
- case "(())": return "circle";
1332
- case ">]": return "rect_left_inv_arrow";
1333
- case "{}": return "diamond";
1334
- case "{{}}": return "hexagon";
1335
- case "([])": return "stadium";
1336
- case "[[]]": return "subroutine";
1337
- case "[()]": return "cylinder";
1338
- case "((()))": return "doublecircle";
1339
- case "[//]": return "lean_right";
1340
- case "[\\\\]": return "lean_left";
1341
- case "[/\\]": return "trapezoid";
1342
- case "[\\/]": return "inv_trapezoid";
1343
- case "<[]>": return "block_arrow";
1344
- default: return "na";
1345
- }
1346
- }
1347
- n(Ee, "typeStr2Type");
1348
- function De(t) {
1349
- switch (e.debug("typeStr2Type", t), t) {
1350
- case "==": return "thick";
1351
- default: return "normal";
1352
- }
1353
- }
1354
- n(De, "edgeTypeStr2Type");
1355
- function Oe(e) {
1356
- switch (e.trim().slice(-1)) {
1357
- case "x": return "arrow_cross";
1358
- case "o": return "arrow_circle";
1359
- case ">": return "arrow_point";
1360
- default: return "";
1361
- }
1362
- }
1363
- n(Oe, "edgeStrToEdgeData");
1364
- function ke(e) {
1365
- switch (e.trim().charAt(0)) {
1366
- case "x": return "arrow_cross";
1367
- case "o": return "arrow_circle";
1368
- case "<": return "arrow_point";
1369
- default: return "arrow_open";
1370
- }
1371
- }
1372
- n(ke, "edgeStrToEdgeStartData");
1373
- function Ae(e) {
1374
- return e.includes("==") ? "thick" : "normal";
1375
- }
1376
- n(Ae, "edgeStrToThickness");
1377
- function W(e) {
1378
- return e.includes(".-") ? "dotted" : "solid";
1379
- }
1380
- n(W, "edgeStrToPattern");
1381
- var G = 0, je = {
1382
- getConfig: /* @__PURE__ */ n(() => i().block, "getConfig"),
1383
- typeStr2Type: Ee,
1384
- edgeTypeStr2Type: De,
1385
- edgeStrToEdgeData: Oe,
1386
- edgeStrToEdgeStartData: ke,
1387
- edgeStrToThickness: Ae,
1388
- edgeStrToPattern: W,
1389
- getLogger: /* @__PURE__ */ n(() => e, "getLogger"),
1390
- getBlocksFlat: /* @__PURE__ */ n(() => [...I.values()], "getBlocksFlat"),
1391
- getBlocks: /* @__PURE__ */ n(() => H || [], "getBlocks"),
1392
- getEdges: /* @__PURE__ */ n(() => L, "getEdges"),
1393
- setHierarchy: /* @__PURE__ */ n((e) => {
1394
- U.children = e, we(e, U), H = U.children;
1395
- }, "setHierarchy"),
1396
- getBlock: /* @__PURE__ */ n((e) => I.get(e), "getBlock"),
1397
- setBlock: /* @__PURE__ */ n((e) => {
1398
- I.set(e.id, e);
1399
- }, "setBlock"),
1400
- getColumns: /* @__PURE__ */ n((e) => {
1401
- let t = I.get(e);
1402
- return t ? t.columns ? t.columns : t.children ? t.children.length : -1 : -1;
1403
- }, "getColumns"),
1404
- getClasses: /* @__PURE__ */ n(function() {
1405
- return B;
1406
- }, "getClasses"),
1407
- clear: Te,
1408
- generateId: /* @__PURE__ */ n(() => (G++, "id-" + Math.random().toString(36).substr(2, 12) + "-" + G), "generateId"),
1409
- setDiagramId: /* @__PURE__ */ n((e) => {
1410
- V = e;
1411
- }, "setDiagramId"),
1412
- getDiagramId: /* @__PURE__ */ n(() => V, "getDiagramId")
1413
- }, K = /* @__PURE__ */ n((e, t) => {
1414
- let n = l, r = n(e, "r"), i = n(e, "g"), a = n(e, "b");
1415
- return o(r, i, a, t);
1416
- }, "fade"), Me = /* @__PURE__ */ n((e) => `.label {
1417
- font-family: ${e.fontFamily};
1418
- color: ${e.nodeTextColor || e.textColor};
1419
- }
1420
- .cluster-label text {
1421
- fill: ${e.titleColor};
1422
- }
1423
- .cluster-label span {
1424
- color: ${e.titleColor};
1425
- }
1426
-
1427
-
1428
-
1429
- .label text,span {
1430
- fill: ${e.nodeTextColor || e.textColor};
1431
- color: ${e.nodeTextColor || e.textColor};
1432
- }
1433
-
1434
- .node rect,
1435
- .node circle,
1436
- .node ellipse,
1437
- .node polygon,
1438
- .node path {
1439
- fill: ${e.mainBkg};
1440
- stroke: ${e.nodeBorder};
1441
- stroke-width: 1px;
1442
- }
1443
- .flowchart-label text {
1444
- text-anchor: middle;
1445
- }
1446
- // .flowchart-label .text-outer-tspan {
1447
- // text-anchor: middle;
1448
- // }
1449
- // .flowchart-label .text-inner-tspan {
1450
- // text-anchor: start;
1451
- // }
1452
-
1453
- .node .label {
1454
- text-align: center;
1455
- }
1456
- .node.clickable {
1457
- cursor: pointer;
1458
- }
1459
-
1460
- .arrowheadPath {
1461
- fill: ${e.arrowheadColor};
1462
- }
1463
-
1464
- .edgePaths .path {
1465
- stroke: ${e.lineColor};
1466
- stroke-width: 2.0px;
1467
- }
1468
-
1469
- .flowchart-link {
1470
- stroke: ${e.lineColor};
1471
- fill: none;
1472
- }
1473
-
1474
- .edgeLabel {
1475
- background-color: ${e.edgeLabelBackground};
1476
- /*
1477
- * This is for backward compatibility with existing code that didn't
1478
- * add a \`<p>\` around edge labels.
1479
- *
1480
- * TODO: We should probably remove this in a future release.
1481
- */
1482
- p {
1483
- margin: 0;
1484
- padding: 0;
1485
- display: inline;
1486
- }
1487
- rect {
1488
- opacity: 0.5;
1489
- background-color: ${e.edgeLabelBackground};
1490
- fill: ${e.edgeLabelBackground};
1491
- }
1492
- text-align: center;
1493
- }
1494
-
1495
- /* For html labels only */
1496
- .labelBkg {
1497
- background-color: ${e.edgeLabelBackground};
1498
- }
1499
-
1500
- .node .cluster {
1501
- // fill: ${K(e.mainBkg, .5)};
1502
- fill: ${K(e.clusterBkg, .5)};
1503
- stroke: ${K(e.clusterBorder, .2)};
1504
- box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
1505
- stroke-width: 1px;
1506
- }
1507
-
1508
- .cluster text {
1509
- fill: ${e.titleColor};
1510
- }
1511
-
1512
- .cluster span {
1513
- color: ${e.titleColor};
1514
- }
1515
- /* .cluster div {
1516
- color: ${e.titleColor};
1517
- } */
1518
-
1519
- div.mermaidTooltip {
1520
- position: absolute;
1521
- text-align: center;
1522
- max-width: 200px;
1523
- padding: 2px;
1524
- font-family: ${e.fontFamily};
1525
- font-size: 12px;
1526
- background: ${e.tertiaryColor};
1527
- border: 1px solid ${e.border2};
1528
- border-radius: 2px;
1529
- pointer-events: none;
1530
- z-index: 100;
1531
- }
1532
-
1533
- .flowchartTitleText {
1534
- text-anchor: middle;
1535
- font-size: 18px;
1536
- fill: ${e.textColor};
1537
- }
1538
- ${le()}
1539
- `, "getStyles");
1540
- function q(e, t) {
1541
- if (e === 0 || !Number.isInteger(e)) throw Error("Columns must be an integer !== 0.");
1542
- if (t < 0 || !Number.isInteger(t)) throw Error("Position must be a non-negative integer." + t);
1543
- return e < 0 ? {
1544
- px: t,
1545
- py: 0
1546
- } : e === 1 ? {
1547
- px: 0,
1548
- py: t
1549
- } : {
1550
- px: t % e,
1551
- py: Math.floor(t / e)
1552
- };
1553
- }
1554
- n(q, "calculateBlockPosition");
1555
- var Ne = /* @__PURE__ */ n((t) => {
1556
- let n = 0, r = 0;
1557
- for (let i of t.children) {
1558
- let { width: t, height: a, x: o, y: s } = i.size ?? {
1559
- width: 0,
1560
- height: 0,
1561
- x: 0,
1562
- y: 0
1563
- };
1564
- if (e.debug("getMaxChildSize abc95 child:", i.id, "width:", t, "height:", a, "x:", o, "y:", s, i.type), i.type === "space") continue;
1565
- let c = t / (i.widthInColumns ?? 1);
1566
- c > n && (n = c), a > r && (r = a);
1567
- }
1568
- return {
1569
- width: n,
1570
- height: r
1571
- };
1572
- }, "getMaxChildSize");
1573
- function J(t, n, r = 0, i = 0, a = 8) {
1574
- e.debug("setBlockSizes abc95 (start)", t.id, t?.size?.x, "block width =", t?.size, "siblingWidth", r), t?.size?.width || (t.size = {
1575
- width: r,
1576
- height: i,
1577
- x: 0,
1578
- y: 0
1579
- });
1580
- let o = 0, s = 0;
1581
- if (t.children?.length > 0) {
1582
- for (let e of t.children) J(e, n, 0, 0, a);
1583
- let c = Ne(t);
1584
- o = c.width, s = c.height, e.debug("setBlockSizes abc95 maxWidth of", t.id, ":s children is ", o, s);
1585
- for (let n of t.children) n.size && (e.debug(`abc95 Setting size of children of ${t.id} id=${n.id} ${o} ${s} ${JSON.stringify(n.size)}`), n.size.width = o * (n.widthInColumns ?? 1) + a * ((n.widthInColumns ?? 1) - 1), n.size.height = s, n.size.x = 0, n.size.y = 0, e.debug(`abc95 updating size of ${t.id} children child:${n.id} maxWidth:${o} maxHeight:${s}`));
1586
- for (let e of t.children) J(e, n, o, s, a);
1587
- let l = t.columns ?? -1, u = 0;
1588
- for (let e of t.children) u += e.widthInColumns ?? 1;
1589
- let d = t.children.length;
1590
- l > 0 && l < u && (d = l);
1591
- let f = Math.ceil(u / d), p = d * (o + a) + a, m = f * (s + a) + a;
1592
- if (p < r) {
1593
- e.debug(`Detected to small sibling: abc95 ${t.id} siblingWidth ${r} siblingHeight ${i} width ${p}`), p = r, m = i;
1594
- let n = (r - d * a - a) / d, c = (i - f * a - a) / f;
1595
- e.debug("Size indata abc88", t.id, "childWidth", n, "maxWidth", o), e.debug("Size indata abc88", t.id, "childHeight", c, "maxHeight", s), e.debug("Size indata abc88 xSize", d, "padding", a);
1596
- for (let e of t.children) e.size && (e.size.width = n, e.size.height = c, e.size.x = 0, e.size.y = 0);
1597
- }
1598
- if (e.debug(`abc95 (finale calc) ${t.id} xSize ${d} ySize ${f} columns ${l}${t.children.length} width=${Math.max(p, t.size?.width || 0)}`), p < (t?.size?.width || 0)) {
1599
- p = t?.size?.width || 0;
1600
- let n = l > 0 ? Math.min(t.children.length, l) : t.children.length;
1601
- if (n > 0) {
1602
- let r = (p - n * a - a) / n;
1603
- e.debug("abc95 (growing to fit) width", t.id, p, t.size?.width, r);
1604
- for (let e of t.children) e.size && (e.size.width = r);
1605
- }
1606
- }
1607
- t.size = {
1608
- width: p,
1609
- height: m,
1610
- x: 0,
1611
- y: 0
1612
- };
1613
- }
1614
- e.debug("setBlockSizes abc94 (done)", t.id, t?.size?.x, t?.size?.width, t?.size?.y, t?.size?.height);
1615
- }
1616
- n(J, "setBlockSizes");
1617
- function Y(t, n, r = 8) {
1618
- e.debug(`abc85 layout blocks (=>layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: ${t?.size?.width}`);
1619
- let i = t.columns ?? -1;
1620
- if (e.debug("layoutBlocks columns abc95", t.id, "=>", i, t), t.children && t.children.length > 0) {
1621
- let a = t?.children[0]?.size?.width ?? 0, o = t.children.length * a + (t.children.length - 1) * r;
1622
- e.debug("widthOfChildren 88", o, "posX");
1623
- let s = /* @__PURE__ */ new Map();
1624
- {
1625
- let e = 0;
1626
- for (let n of t.children) {
1627
- if (!n.size) continue;
1628
- let { py: t } = q(i, e), r = s.get(t) ?? 0;
1629
- n.size.height > r && s.set(t, n.size.height);
1630
- let a = n?.widthInColumns ?? 1;
1631
- i > 0 && (a = Math.min(a, i - e % i)), e += a;
1632
- }
1633
- }
1634
- let c = /* @__PURE__ */ new Map();
1635
- {
1636
- let e = 0, t = [...s.keys()].sort((e, t) => e - t);
1637
- for (let n of t) c.set(n, e), e += (s.get(n) ?? 0) + r;
1638
- }
1639
- let l = 0;
1640
- e.debug("abc91 block?.size?.x", t.id, t?.size?.x);
1641
- let u = t?.size?.x ? t?.size?.x + (-t?.size?.width / 2 || 0) : -r, d = 0;
1642
- for (let a of t.children) {
1643
- let o = t;
1644
- if (!a.size) continue;
1645
- let { width: f, height: p } = a.size, { px: m, py: h } = q(i, l);
1646
- if (h != d && (d = h, u = t?.size?.x ? t?.size?.x + (-t?.size?.width / 2 || 0) : -r, e.debug("New row in layout for block", t.id, " and child ", a.id, d)), e.debug(`abc89 layout blocks (child) id: ${a.id} Pos: ${l} (px, py) ${m},${h} (${o?.size?.x},${o?.size?.y}) parent: ${o.id} width: ${f}${r}`), o.size) {
1647
- let t = f / 2;
1648
- a.size.x = u + r + t, e.debug(`abc91 layout blocks (calc) px, pyid:${a.id} startingPos=X${u} new startingPosX${a.size.x} ${t} padding=${r} width=${f} halfWidth=${t} => x:${a.size.x} y:${a.size.y} ${a.widthInColumns} (width * (child?.w || 1)) / 2 ${f * (a?.widthInColumns ?? 1) / 2}`), u = a.size.x + t;
1649
- let n = c.get(h) ?? 0, i = s.get(h) ?? p;
1650
- a.size.y = o.size.y - o.size.height / 2 + n + i / 2 + r, e.debug(`abc88 layout blocks (calc) px, pyid:${a.id}startingPosX${u}${r}${t}=>x:${a.size.x}y:${a.size.y}${a.widthInColumns}(width * (child?.w || 1)) / 2${f * (a?.widthInColumns ?? 1) / 2}`);
1651
- }
1652
- a.children && Y(a, n, r);
1653
- let g = a?.widthInColumns ?? 1;
1654
- i > 0 && (g = Math.min(g, i - l % i)), l += g, e.debug("abc88 columnsPos", a, l);
1655
- }
1656
- }
1657
- e.debug(`layout blocks (<==layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: ${t?.size?.width}`);
1658
- }
1659
- n(Y, "layoutBlocks");
1660
- function X(e, { minX: t, minY: n, maxX: r, maxY: i } = {
1661
- minX: 0,
1662
- minY: 0,
1663
- maxX: 0,
1664
- maxY: 0
1665
- }) {
1666
- if (e.size && e.id !== "root") {
1667
- let { x: a, y: o, width: s, height: c } = e.size;
1668
- 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);
1669
- }
1670
- if (e.children) for (let a of e.children) ({minX: t, minY: n, maxX: r, maxY: i} = X(a, {
1671
- minX: t,
1672
- minY: n,
1673
- maxX: r,
1674
- maxY: i
1675
- }));
1676
- return {
1677
- minX: t,
1678
- minY: n,
1679
- maxX: r,
1680
- maxY: i
1681
- };
1682
- }
1683
- n(X, "findBounds");
1684
- function Z(t) {
1685
- let n = t.getBlock("root");
1686
- if (!n) return;
1687
- let r = c()?.block?.padding ?? 8;
1688
- J(n, t, 0, 0, r), Y(n, t, r), e.debug("getBlocks", JSON.stringify(n, null, 2));
1689
- let { minX: i, minY: a, maxX: o, maxY: s } = X(n), l = s - a;
1690
- return {
1691
- x: i,
1692
- y: a,
1693
- width: o - i,
1694
- height: l
1695
- };
1696
- }
1697
- n(Z, "layout");
1698
- function Q(e, t, n = !1) {
1699
- let r = e, a = "default";
1700
- (r?.classes?.length || 0) > 0 && (a = (r?.classes ?? []).join(" ")), a += " flowchart-label";
1701
- let o = (r?.classes ?? []).flatMap((e) => t.getClasses().get(e)?.styles ?? []), s = 0, c = "rect", l;
1702
- switch (r.type) {
1703
- case "round":
1704
- s = 5, c = "rect";
1705
- break;
1706
- case "composite":
1707
- s = 0, c = "composite", l = 0;
1708
- break;
1709
- case "square":
1710
- c = "rect";
1711
- break;
1712
- case "diamond":
1713
- c = "question";
1714
- break;
1715
- case "hexagon":
1716
- c = "hexagon";
1717
- break;
1718
- case "block_arrow":
1719
- c = "block_arrow";
1720
- break;
1721
- case "odd":
1722
- c = "rect_left_inv_arrow";
1723
- break;
1724
- case "lean_right":
1725
- c = "lean_right";
1726
- break;
1727
- case "lean_left":
1728
- c = "lean_left";
1729
- break;
1730
- case "trapezoid":
1731
- c = "trapezoid";
1732
- break;
1733
- case "inv_trapezoid":
1734
- c = "inv_trapezoid";
1735
- break;
1736
- case "rect_left_inv_arrow":
1737
- c = "rect_left_inv_arrow";
1738
- break;
1739
- case "circle":
1740
- c = "circle";
1741
- break;
1742
- case "ellipse":
1743
- c = "ellipse";
1744
- break;
1745
- case "stadium":
1746
- c = "stadium";
1747
- break;
1748
- case "subroutine":
1749
- c = "subroutine";
1750
- break;
1751
- case "cylinder":
1752
- c = "cylinder";
1753
- break;
1754
- case "group":
1755
- c = "rect";
1756
- break;
1757
- case "doublecircle":
1758
- c = "doublecircle";
1759
- break;
1760
- default: c = "rect";
1761
- }
1762
- let u = M(r?.styles ?? []), d = r.label, f = r.size ?? {
1763
- width: 0,
1764
- height: 0,
1765
- x: 0,
1766
- y: 0
1767
- }, p = t.getDiagramId();
1768
- return {
1769
- labelStyle: u.labelStyle,
1770
- shape: c,
1771
- label: d,
1772
- labelText: d,
1773
- rx: s,
1774
- ry: s,
1775
- class: a,
1776
- cssClasses: a,
1777
- cssStyles: r?.styles ?? [],
1778
- cssCompiledStyles: o,
1779
- style: u.style,
1780
- id: r.id,
1781
- domId: p ? `${p}-${r.id}` : r.id,
1782
- isGroup: !1,
1783
- directions: r.directions,
1784
- width: f.width || void 0,
1785
- height: f.height || void 0,
1786
- wrappingWidth: f.width || Infinity,
1787
- x: f.x,
1788
- y: f.y,
1789
- positioned: n,
1790
- intersect: void 0,
1791
- padding: l ?? i()?.block?.padding ?? 0,
1792
- widthInColumns: r.widthInColumns ?? 1
1793
- };
1794
- }
1795
- n(Q, "getNodeFromBlock");
1796
- async function Pe(e, t, n) {
1797
- let r = Q(t, n, !1);
1798
- if (t.type === "group") return;
1799
- let a = i(), o = await N(e, r, { config: a }), s = o.node()?.getBBox() ?? {
1800
- width: 0,
1801
- height: 0
1802
- }, c = n.getBlock(r.id);
1803
- c.size = {
1804
- width: s.width,
1805
- height: s.height,
1806
- x: 0,
1807
- y: 0,
1808
- node: o
1809
- }, n.setBlock(c), o.remove();
1810
- }
1811
- n(Pe, "calculateBlockSize");
1812
- async function Fe(e, t, n) {
1813
- let r = Q(t, n, !0);
1814
- if (n.getBlock(r.id).type !== "space") {
1815
- let n = i();
1816
- await N(e, r, { config: n }), t.intersect = r?.intersect, re(r);
1817
- }
1818
- }
1819
- n(Fe, "insertBlockPositioned");
1820
- async function $(e, t, n, r) {
1821
- for (let i of t) await r(e, i, n), i.children && await $(e, i.children, n, r);
1822
- }
1823
- n($, "performOperations");
1824
- async function Ie(e, t, n) {
1825
- await $(e, t, n, Pe);
1826
- }
1827
- n(Ie, "calculateBlockSizes");
1828
- async function Le(e, t, n) {
1829
- await $(e, t, n, Fe);
1830
- }
1831
- n(Le, "insertBlocks");
1832
- async function Re(e, t, n, r, i) {
1833
- let a = new ce({
1834
- multigraph: !0,
1835
- compound: !0
1836
- });
1837
- a.setGraph({
1838
- rankdir: "TB",
1839
- nodesep: 10,
1840
- ranksep: 10,
1841
- marginx: 8,
1842
- marginy: 8
1843
- });
1844
- for (let e of n) e.size && a.setNode(e.id, {
1845
- width: e.size.width,
1846
- height: e.size.height,
1847
- intersect: e.intersect
1848
- });
1849
- for (let n of t) if (n.start && n.end) {
1850
- let t = r.getBlock(n.start), o = r.getBlock(n.end);
1851
- if (t?.size && o?.size) {
1852
- let r = t.size, s = o.size, c = [
1853
- {
1854
- x: r.x,
1855
- y: r.y
1856
- },
1857
- {
1858
- x: r.x + (s.x - r.x) / 2,
1859
- y: r.y + (s.y - r.y) / 2
1860
- },
1861
- {
1862
- x: s.x,
1863
- y: s.y
1864
- }
1865
- ], l = i ? `${i}-${n.id}` : n.id, u = `${n.thickness === "thick" ? "edge-thickness-thick" : "edge-thickness-normal"} ${n.pattern === "dotted" ? "edge-pattern-dotted" : "edge-pattern-solid"} flowchart-link LS-a1 LE-b1`;
1866
- oe(e, {
1867
- ...n,
1868
- id: l,
1869
- arrowTypeEnd: n.arrowTypeEnd,
1870
- arrowTypeStart: n.arrowTypeStart,
1871
- points: c,
1872
- classes: u
1873
- }, {}, "block", a.node(n.start), a.node(n.end), i), n.label && (await ie(e, {
1874
- ...n,
1875
- label: n.label,
1876
- labelStyle: "stroke: #333; stroke-width: 1.5px;fill:none;",
1877
- arrowTypeEnd: n.arrowTypeEnd,
1878
- arrowTypeStart: n.arrowTypeStart,
1879
- points: c,
1880
- classes: u
1881
- }), ae({
1882
- ...n,
1883
- x: c[1].x,
1884
- y: c[1].y
1885
- }, { originalPath: c }));
1886
- }
1887
- }
1888
- }
1889
- n(Re, "insertEdges");
1890
- var ze = {
1891
- parser: ge,
1892
- db: je,
1893
- renderer: {
1894
- draw: /* @__PURE__ */ n(async function(n, r, o, s) {
1895
- let { securityLevel: c, block: l } = i(), u = s.db;
1896
- u.setDiagramId(r);
1897
- let d;
1898
- c === "sandbox" && (d = t("#i" + r));
1899
- let f = t(c === "sandbox" ? d.nodes()[0].contentDocument.body : "body"), p = c === "sandbox" ? f.select(`[id="${r}"]`) : t(`[id="${r}"]`);
1900
- se(p, [
1901
- "point",
1902
- "circle",
1903
- "cross"
1904
- ], s.type, r);
1905
- let m = u.getBlocks(), h = u.getBlocksFlat(), g = u.getEdges(), _ = p.insert("g").attr("class", "block");
1906
- await Ie(_, m, u);
1907
- let v = Z(u);
1908
- await Le(_, m, u), await Re(_, g, h, u, r);
1909
- let y = _.node()?.getBBox(), b = y && Number.isFinite(y.width) && Number.isFinite(y.height) ? y : v;
1910
- if (b) {
1911
- let t = Math.max(1, Math.round(.125 * (b.width / b.height))), n = b.height + t + 10, r = b.width + 10, { useMaxWidth: i } = l;
1912
- a(p, n, r, !!i), e.debug("Here Bounds", v, b), p.attr("viewBox", `${b.x - 5} ${b.y - 5} ${b.width + 10} ${b.height + 10}`);
1913
- }
1914
- }, "draw"),
1915
- getClasses: /* @__PURE__ */ n(function(e, t) {
1916
- return t.db.getClasses();
1917
- }, "getClasses")
1918
- },
1919
- styles: Me
1920
- };
1921
- //#endregion
1922
- export { ze as diagram };