@aiquants/markdown 12.3.0 → 13.0.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 (256) hide show
  1. package/README.md +276 -65
  2. package/dist/{abnfDiagram-VRR7QNED-B_QmXzWv.js → abnfDiagram-VRR7QNED-B3Q9attM.js} +9 -9
  3. package/dist/abnfDiagram-VRR7QNED-QW4YM2AY.cjs +1 -0
  4. package/dist/arc-BBLXr5EU.js +83 -0
  5. package/dist/arc-Cn8XXgbN.cjs +1 -0
  6. package/dist/{architectureDiagram-ZJ3FMSHR-CEb923Bc.js → architectureDiagram-ZJ3FMSHR-BaSp0hC2.js} +123 -123
  7. package/dist/architectureDiagram-ZJ3FMSHR-BfmjNYww.cjs +36 -0
  8. package/dist/{blockDiagram-677ZJIJ3-CmKMdhaS.js → blockDiagram-677ZJIJ3-DFcPQ19k.js} +166 -166
  9. package/dist/{blockDiagram-677ZJIJ3-D7RRzjUx.cjs → blockDiagram-677ZJIJ3-u7d3VCxA.cjs} +1 -1
  10. package/dist/{c4Diagram-LMCZKHZV-CG6fvZQo.js → c4Diagram-LMCZKHZV-DW0yo5tR.js} +2 -2
  11. package/dist/{c4Diagram-LMCZKHZV-W7Qa-ecL.cjs → c4Diagram-LMCZKHZV-nScsMUE3.cjs} +1 -1
  12. package/dist/{channel-TsF8sms_.js → channel-B2FBCr9X.js} +1 -1
  13. package/dist/channel-DlkTPSf_.cjs +1 -0
  14. package/dist/{chunk-2Q5K7J3B-CopwR1m3.js → chunk-2Q5K7J3B-BkE4Fsuz.js} +1 -1
  15. package/dist/chunk-2Q5K7J3B-evSha-HP.cjs +1 -0
  16. package/dist/{chunk-32BRIVSS-BnNlhc1M.js → chunk-32BRIVSS-CqpDiZD2.js} +1 -1
  17. package/dist/chunk-32BRIVSS-rIw6tBRO.cjs +1 -0
  18. package/dist/{chunk-5VM5RSS4-lKwSmIqG.cjs → chunk-5VM5RSS4-CYVpj2mc.cjs} +1 -1
  19. package/dist/{chunk-5VM5RSS4-O28FGAOF.js → chunk-5VM5RSS4-DAgNhPcU.js} +1 -1
  20. package/dist/{chunk-EX3LRPZG-CtFe4olX.cjs → chunk-EX3LRPZG-Ct2cyGh-.cjs} +1 -1
  21. package/dist/{chunk-EX3LRPZG-C36gZH3_.js → chunk-EX3LRPZG-QFjD28UF.js} +21 -21
  22. package/dist/{chunk-JWPE2WC7-DG0ebjV4.js → chunk-JWPE2WC7-Bj2m1SXZ.js} +1 -1
  23. package/dist/chunk-JWPE2WC7-Dgw1ILoe.cjs +1 -0
  24. package/dist/{chunk-MOJQB5TN-nqR_swpx.js → chunk-MOJQB5TN-B1fdnpCz.js} +122 -122
  25. package/dist/{chunk-MOJQB5TN-DADVbG98.cjs → chunk-MOJQB5TN-yjlPYCh4.cjs} +3 -3
  26. package/dist/{chunk-PUDLZKDR-BUSFO-Gx.cjs → chunk-PUDLZKDR-BlQ3qKcC.cjs} +4 -4
  27. package/dist/{chunk-PUDLZKDR-CD96jce3.js → chunk-PUDLZKDR-CIcw3cpm.js} +21 -21
  28. package/dist/chunk-RYQCIY6F-B-V6UOJy.cjs +1 -0
  29. package/dist/{chunk-RYQCIY6F-DJkrr1sD.js → chunk-RYQCIY6F-DyVk8fNp.js} +5 -5
  30. package/dist/{chunk-V7JOEXUC-BzCaDGop.cjs → chunk-V7JOEXUC-B1EgagKh.cjs} +3 -3
  31. package/dist/{chunk-V7JOEXUC-eBy2sAXD.js → chunk-V7JOEXUC-C776k7_V.js} +15 -15
  32. package/dist/{chunk-VR4S4FIN-C-qPzUSR.js → chunk-VR4S4FIN-CyqARa17.js} +5 -5
  33. package/dist/chunk-VR4S4FIN-Sx71KwIQ.cjs +1 -0
  34. package/dist/{chunk-XXDRQBXY-BK6HOWf6.js → chunk-XXDRQBXY-B-99Fbs_.js} +3 -3
  35. package/dist/chunk-XXDRQBXY-BgeRIUG1.cjs +1 -0
  36. package/dist/classDiagram-OUVF2IWQ-BLAiuPPL.cjs +1 -0
  37. package/dist/{classDiagram-v2-EOCWNBFH-CPDmG5kI.js → classDiagram-OUVF2IWQ-DJ0hW16Q.js} +2 -2
  38. package/dist/classDiagram-v2-EOCWNBFH-BLAiuPPL.cjs +1 -0
  39. package/dist/{classDiagram-OUVF2IWQ-CPDmG5kI.js → classDiagram-v2-EOCWNBFH-DJ0hW16Q.js} +2 -2
  40. package/dist/{code-blocks-BWr5Xg1I.js → code-blocks-C6J8rVTc.js} +23 -22
  41. package/dist/{code-blocks-BdKjppKq.cjs → code-blocks-CTESwslp.cjs} +3 -3
  42. package/dist/code-blocks.cjs +1 -1
  43. package/dist/code-blocks.d.ts +1 -0
  44. package/dist/code-blocks.js +15 -14
  45. package/dist/components/CopyButton.d.ts +1 -2
  46. package/dist/components/MarkdownRenderer.d.ts +31 -2
  47. package/dist/components/MarkdownViewer.d.ts +11 -2
  48. package/dist/components/MermaidDiagram.d.ts +1 -0
  49. package/dist/components/ReadingPlaceKeeper.d.ts +32 -0
  50. package/dist/components/SelectionKeeper.d.ts +38 -0
  51. package/dist/components/SpreadsheetBlock.d.ts +2 -1
  52. package/dist/components/blockKeys.d.ts +9 -2
  53. package/dist/components/blockOffsets.d.ts +3 -0
  54. package/dist/components/clipboard.d.ts +1 -0
  55. package/dist/components/embeds/ClientFrame.d.ts +1 -0
  56. package/dist/components/embeds/ProviderEmbed.d.ts +2 -1
  57. package/dist/components/embeds/embedLabels.d.ts +1 -1
  58. package/dist/components/embeds/linkCardFetch.d.ts +2 -0
  59. package/dist/components/embeds.d.ts +5 -0
  60. package/dist/components/headingLevels.d.ts +6 -0
  61. package/dist/components/htmlNodes.d.ts +2 -0
  62. package/dist/components/htmlSanitizer.d.ts +15 -2
  63. package/dist/components/labels.d.ts +3 -2
  64. package/dist/components/links.d.ts +1 -0
  65. package/dist/components/mdastNodes/CodeNode.d.ts +3 -1
  66. package/dist/components/mermaidLabels.d.ts +5 -0
  67. package/dist/components/mermaidSetup.d.ts +10 -0
  68. package/dist/components/missingImageLabels.d.ts +2 -0
  69. package/dist/components/ownPixels.d.ts +1 -0
  70. package/dist/components/rawHtml.d.ts +7 -3
  71. package/dist/components/spreadsheetModel.d.ts +1 -0
  72. package/dist/components/viewerLabels.d.ts +11 -2
  73. package/dist/contentColors.d.ts +21 -0
  74. package/dist/conversion.d.ts +7 -0
  75. package/dist/converter/NOTICES.md +6 -6
  76. package/dist/converter/createMarkdownConverter.d.ts +1 -0
  77. package/dist/converter/protocol.d.ts +4 -0
  78. package/dist/converter.cjs +1 -1
  79. package/dist/converter.js +89 -71
  80. package/dist/converter.wasm +0 -0
  81. package/dist/{cose-bilkent-JH36ORCC-BxO1rjEU.js → cose-bilkent-JH36ORCC-CR6Hdvto.js} +24 -24
  82. package/dist/cose-bilkent-JH36ORCC-reAbGeDU.cjs +1 -0
  83. package/dist/cynefinDiagram-TSTJHNR4-2qz-sUtp.cjs +62 -0
  84. package/dist/{cynefinDiagram-TSTJHNR4-DBD-B_Un.js → cynefinDiagram-TSTJHNR4-D1eY-FSf.js} +65 -65
  85. package/dist/dagre-VKFMJZFB-Byr9WPjb.cjs +4 -0
  86. package/dist/{dagre-VKFMJZFB-B8vZCPJg.js → dagre-VKFMJZFB-CXSczF8v.js} +26 -26
  87. package/dist/{diagram-FQU43EPY-DwhEcKWF.cjs → diagram-FQU43EPY-2YWng437.cjs} +1 -1
  88. package/dist/{diagram-FQU43EPY-YrRTNuX-.js → diagram-FQU43EPY-BZo0xcaj.js} +54 -54
  89. package/dist/diagram-G47NLZAW-CQS7BN4F.cjs +24 -0
  90. package/dist/{diagram-G47NLZAW-D4vmirJw.js → diagram-G47NLZAW-CvJW9ny8.js} +65 -65
  91. package/dist/{diagram-NH7WQ7WH-Drekwiur.js → diagram-NH7WQ7WH-C6VIkj-R.js} +18 -18
  92. package/dist/diagram-NH7WQ7WH-DXUwOBe7.cjs +24 -0
  93. package/dist/{diagram-OA4YK3LP-DZsM4Fpo.js → diagram-OA4YK3LP-Co6nMbJc.js} +29 -29
  94. package/dist/{diagram-OA4YK3LP-DeJ7pMIO.cjs → diagram-OA4YK3LP-DBUm2qxb.cjs} +3 -3
  95. package/dist/{diagram-WEI45ONY-CjRbsbkF.js → diagram-WEI45ONY-BaMbc5o2.js} +76 -76
  96. package/dist/diagram-WEI45ONY-ChpK2gP3.cjs +41 -0
  97. package/dist/ebnfDiagram-CCIWWBDH-DMIRHp8N.cjs +1 -0
  98. package/dist/{ebnfDiagram-CCIWWBDH-D0kt5Zdu.js → ebnfDiagram-CCIWWBDH-i7CR-FU0.js} +3 -3
  99. package/dist/embeds/frames.d.ts +4 -0
  100. package/dist/embeds/linkCards.d.ts +3 -1
  101. package/dist/embeds/providers.d.ts +1 -0
  102. package/dist/embeds/testing.cjs +1 -1
  103. package/dist/embeds/testing.js +1 -1
  104. package/dist/embeds-B4g6w7Tf.cjs +1 -0
  105. package/dist/embeds-Dra-dGKD.js +64 -0
  106. package/dist/embeds.cjs +1 -1
  107. package/dist/embeds.d.ts +2 -2
  108. package/dist/embeds.js +31 -70
  109. package/dist/{erDiagram-Q63AITRT-Ce4GpK2Z.js → erDiagram-Q63AITRT-DC-HhdaO.js} +69 -69
  110. package/dist/{erDiagram-Q63AITRT-DqFANbZx.cjs → erDiagram-Q63AITRT-DjRvJyWK.cjs} +1 -1
  111. package/dist/errors-BWZJx2MD.cjs +1 -0
  112. package/dist/errors-CapTNE7l.js +62 -0
  113. package/dist/errors.d.ts +2 -2
  114. package/dist/extractHeadings-BAhmauKo.js +5296 -0
  115. package/dist/extractHeadings-qiJXegCx.cjs +11 -0
  116. package/dist/flowDiagram-23GEKE2U-CiNzp6BS.js +7 -0
  117. package/dist/flowDiagram-23GEKE2U-DzZNPkRJ.cjs +1 -0
  118. package/dist/{ganttDiagram-NO4QXBWP-DjpANtqX.js → ganttDiagram-NO4QXBWP-BwbtaPxc.js} +69 -69
  119. package/dist/ganttDiagram-NO4QXBWP-CJv5UQ4O.cjs +292 -0
  120. package/dist/gen/markdown/v1/linkcard_connect.d.ts +19 -0
  121. package/dist/gen/markdown/v1/linkcard_pb.d.ts +87 -0
  122. package/dist/gen/markdown/v1/markdown_pb.d.ts +4 -0
  123. package/dist/{gitGraphDiagram-IHSO6WYX-DzhnsGXo.js → gitGraphDiagram-IHSO6WYX--yebcp4V.js} +26 -26
  124. package/dist/gitGraphDiagram-IHSO6WYX-dSwtW7X6.cjs +106 -0
  125. package/dist/index.cjs +1 -1
  126. package/dist/index.client.cjs +1 -1
  127. package/dist/index.client.d.ts +2 -2
  128. package/dist/index.client.js +42 -36
  129. package/dist/index.js +42 -36
  130. package/dist/index.server.cjs +1 -1
  131. package/dist/index.server.d.ts +2 -1
  132. package/dist/index.server.js +126 -873
  133. package/dist/{infoDiagram-FWYZ7A6U-hraoyboI.js → infoDiagram-FWYZ7A6U-B4AiTiqD.js} +9 -9
  134. package/dist/infoDiagram-FWYZ7A6U-BOj0VF20.cjs +2 -0
  135. package/dist/{ishikawaDiagram-FXEZZL3T-cBJei3wJ.js → ishikawaDiagram-FXEZZL3T-BsYs_qnQ.js} +55 -55
  136. package/dist/{ishikawaDiagram-FXEZZL3T-D5b25aDN.cjs → ishikawaDiagram-FXEZZL3T-CisV4kPO.cjs} +1 -1
  137. package/dist/{journeyDiagram-5HDEW3XC-DrNyUSsx.cjs → journeyDiagram-5HDEW3XC-BAvgWwpr.cjs} +1 -1
  138. package/dist/{journeyDiagram-5HDEW3XC-IkQqMl8f.js → journeyDiagram-5HDEW3XC-DbDo-dqu.js} +29 -29
  139. package/dist/{kanban-definition-HUTT4EX6-D2UL88Cz.js → kanban-definition-HUTT4EX6-BlPZISwH.js} +111 -111
  140. package/dist/{kanban-definition-HUTT4EX6-CvBgN3eX.cjs → kanban-definition-HUTT4EX6-RjzOWas9.cjs} +2 -2
  141. package/dist/{linear-BiJV9gYf.js → linear-BXWX8YXI.js} +33 -33
  142. package/dist/linear-CKPQExK8.cjs +1 -0
  143. package/dist/linkCardServer/linkCardCore.d.ts +10 -0
  144. package/dist/linkCardServer/linkCardHandler.server.d.ts +1 -6
  145. package/dist/linkCardServer/pageFetchPort.d.ts +19 -0
  146. package/dist/linkCardServer/{pageMetadata.server.d.ts → pageMetadata.d.ts} +11 -3
  147. package/dist/linkCards-BikpIncf.cjs +1 -0
  148. package/dist/linkCards-DfSLqLPF.js +50 -0
  149. package/dist/linkCards.cjs +1 -0
  150. package/dist/linkCards.d.ts +2 -0
  151. package/dist/linkCards.js +5 -0
  152. package/dist/markdownServiceClient-C47z3Ynu.cjs +1 -0
  153. package/dist/markdownServiceClient-uDeklhtG.js +480 -0
  154. package/dist/markdownServiceClient.d.ts +20 -0
  155. package/dist/mermaid.core-C4EClWgB.js +15595 -0
  156. package/dist/mermaid.core-CRP55Hm1.cjs +305 -0
  157. package/dist/mermaidFrame/NOTICES.md +1345 -0
  158. package/dist/mermaidFrame/cssCleaner.d.ts +13 -0
  159. package/dist/mermaidFrame/drawer.d.ts +34 -0
  160. package/dist/mermaidFrame/frame.d.ts +1 -0
  161. package/dist/mermaidFrame/frame.js +3307 -0
  162. package/dist/mermaidFrame/katexInert.d.ts +4 -0
  163. package/dist/mermaidFrame/protocol.d.ts +38 -0
  164. package/dist/mermaidFrame/serve.d.ts +14 -0
  165. package/dist/mermaidFrame/svgCleaner.d.ts +4 -0
  166. package/dist/{mindmap-definition-LN4V7U3C-CK67hf6V.js → mindmap-definition-LN4V7U3C-BEWpoMMG.js} +75 -75
  167. package/dist/{mindmap-definition-LN4V7U3C-CBrUse7P.cjs → mindmap-definition-LN4V7U3C-DnbSfqWP.cjs} +3 -3
  168. package/dist/pageFetchPort-2H18xcdi.cjs +1 -0
  169. package/dist/pageFetchPort-DVpXsKCz.js +624 -0
  170. package/dist/{pegDiagram-2B236MQR-CwWX4Irn.js → pegDiagram-2B236MQR-BF7gLiB-.js} +3 -3
  171. package/dist/pegDiagram-2B236MQR-BJysMObA.cjs +1 -0
  172. package/dist/{pieDiagram-ENE6RG2P-MO42pSl8.js → pieDiagram-ENE6RG2P-D_YzC3qc.js} +65 -65
  173. package/dist/{pieDiagram-ENE6RG2P-BKvggS7k.cjs → pieDiagram-ENE6RG2P-UMpeIUyV.cjs} +2 -2
  174. package/dist/{providers-BwQK7hZa.js → providers-CSvkTZsr.js} +17 -2
  175. package/dist/{providers-DO2t7ks4.cjs → providers-Cx0FuVQU.cjs} +1 -1
  176. package/dist/{quadrantDiagram-ABIIQ3AL-BHhoAvLS.cjs → quadrantDiagram-ABIIQ3AL-DANY0ipQ.cjs} +1 -1
  177. package/dist/{quadrantDiagram-ABIIQ3AL-CzHgLdS3.js → quadrantDiagram-ABIIQ3AL-DDm-r_6D.js} +57 -57
  178. package/dist/railroadDiagram-RFXS5EU6-CDUd4th1.cjs +1 -0
  179. package/dist/{railroadDiagram-RFXS5EU6-Bu_Fhi5x.js → railroadDiagram-RFXS5EU6-hJ6uB90G.js} +3 -3
  180. package/dist/remarkProcessor.server.d.ts +2 -0
  181. package/dist/{requirementDiagram-TGXJPOKE-CY-JYM-P.js → requirementDiagram-TGXJPOKE-BJef5Jb0.js} +29 -29
  182. package/dist/{requirementDiagram-TGXJPOKE-BhdvQnjG.cjs → requirementDiagram-TGXJPOKE-DaoCo7go.cjs} +1 -1
  183. package/dist/{sankeyDiagram-HTMAVEWB-BmHtjxlW.js → sankeyDiagram-HTMAVEWB-BZQs0bE-.js} +48 -48
  184. package/dist/{sankeyDiagram-HTMAVEWB-CUeYKZeQ.cjs → sankeyDiagram-HTMAVEWB-DXiv0YOu.cjs} +3 -3
  185. package/dist/{sequenceDiagram-DBY2YBRQ-GepntdDB.cjs → sequenceDiagram-DBY2YBRQ-CJGpsnsv.cjs} +1 -1
  186. package/dist/{sequenceDiagram-DBY2YBRQ-Cn2CC9BC.js → sequenceDiagram-DBY2YBRQ-D05U2w26.js} +86 -86
  187. package/dist/serviceClient.cjs +1 -0
  188. package/dist/serviceClient.d.ts +3 -0
  189. package/dist/serviceClient.js +9 -0
  190. package/dist/{sizeCapture-X5ZJPWSS-CZF99dy_.js → sizeCapture-X5ZJPWSS-DTr0Vm61.js} +1 -1
  191. package/dist/sizeCapture-X5ZJPWSS-DjuH1zNP.cjs +1 -0
  192. package/dist/{stateDiagram-2N3HPSRC-CCbBvBua.js → stateDiagram-2N3HPSRC-B8nvJKpB.js} +20 -20
  193. package/dist/stateDiagram-2N3HPSRC-BrB47FD-.cjs +1 -0
  194. package/dist/stateDiagram-v2-6OUMAXLB-CC8gOGDK.cjs +1 -0
  195. package/dist/{stateDiagram-v2-6OUMAXLB-_A1QESxx.js → stateDiagram-v2-6OUMAXLB-CV-JqAeP.js} +2 -2
  196. package/dist/styles/markdown.css +1 -1
  197. package/dist/styles/markdown.standalone.css +1 -1
  198. package/dist/{swimlanes-5IMT3BWC-B-BDM_Ae.js → swimlanes-5IMT3BWC-BPtufzUd.js} +3 -3
  199. package/dist/swimlanes-5IMT3BWC-WAbDPRgt.cjs +1 -0
  200. package/dist/{swimlanesDiagram-G3AALYLV-BysT2rWl.js → swimlanesDiagram-G3AALYLV-BQKEmJFX.js} +2 -2
  201. package/dist/{swimlanesDiagram-G3AALYLV-DZuQxKuB.cjs → swimlanesDiagram-G3AALYLV-BTwwtLZL.cjs} +1 -1
  202. package/dist/{timeline-definition-FHXFAJF6-DVzdzbl1.js → timeline-definition-FHXFAJF6-DJ6GV7Fz.js} +34 -34
  203. package/dist/{timeline-definition-FHXFAJF6-oFf_sUOI.cjs → timeline-definition-FHXFAJF6-qdkrah7t.cjs} +1 -1
  204. package/dist/vennDiagram-L72KCM5P-B5onSWPA.cjs +34 -0
  205. package/dist/{vennDiagram-L72KCM5P-Bm1TGZux.js → vennDiagram-L72KCM5P-DWnnndTj.js} +196 -196
  206. package/dist/viewer-settings.cjs +1 -1
  207. package/dist/viewer-settings.d.ts +8 -0
  208. package/dist/viewer-settings.js +11 -5
  209. package/dist/{wardleyDiagram-EHGQE667-BC_1RAbp.js → wardleyDiagram-EHGQE667-DFmDgQSb.js} +41 -41
  210. package/dist/{wardleyDiagram-EHGQE667-CqB3gLCH.cjs → wardleyDiagram-EHGQE667-DdeBbvVM.cjs} +2 -2
  211. package/dist/{xychartDiagram-FW5EYKEG-a1vb5UxD.cjs → xychartDiagram-FW5EYKEG-CiJQMClv.cjs} +1 -1
  212. package/dist/{xychartDiagram-FW5EYKEG-ClITdEhV.js → xychartDiagram-FW5EYKEG-L2Kj4cZA.js} +28 -28
  213. package/package.json +29 -13
  214. package/dist/abnfDiagram-VRR7QNED-Crz-ChMJ.cjs +0 -1
  215. package/dist/arc-BKGy6Me1.js +0 -83
  216. package/dist/arc-CYJCyviq.cjs +0 -1
  217. package/dist/architectureDiagram-ZJ3FMSHR-gTB8pttO.cjs +0 -36
  218. package/dist/channel-BKoPLS2j.cjs +0 -1
  219. package/dist/chunk-2Q5K7J3B-DgtYKcDs.cjs +0 -1
  220. package/dist/chunk-32BRIVSS-D-6GBFtx.cjs +0 -1
  221. package/dist/chunk-JWPE2WC7-5sd39cpa.cjs +0 -1
  222. package/dist/chunk-RYQCIY6F-BBTBydZd.cjs +0 -1
  223. package/dist/chunk-VR4S4FIN-CHKLwvYh.cjs +0 -1
  224. package/dist/chunk-XXDRQBXY-DttkP7wv.cjs +0 -1
  225. package/dist/classDiagram-OUVF2IWQ-BKruajP_.cjs +0 -1
  226. package/dist/classDiagram-v2-EOCWNBFH-BKruajP_.cjs +0 -1
  227. package/dist/cose-bilkent-JH36ORCC-Cjfa6NyL.cjs +0 -1
  228. package/dist/cynefinDiagram-TSTJHNR4-B3boTACW.cjs +0 -62
  229. package/dist/dagre-VKFMJZFB-DF3Mvuas.cjs +0 -4
  230. package/dist/diagram-G47NLZAW-CKIEbGLS.cjs +0 -24
  231. package/dist/diagram-NH7WQ7WH-D6wMwkLQ.cjs +0 -24
  232. package/dist/diagram-WEI45ONY-SYHw7k8b.cjs +0 -41
  233. package/dist/ebnfDiagram-CCIWWBDH-23bjk9FU.cjs +0 -1
  234. package/dist/errors-BW5JXRoX.cjs +0 -1
  235. package/dist/errors-Blk_XJ9C.js +0 -55
  236. package/dist/extractHeadings-DlQcPv5N.js +0 -20361
  237. package/dist/extractHeadings-wWAipplS.cjs +0 -315
  238. package/dist/flowDiagram-23GEKE2U-CRC9U6qD.cjs +0 -1
  239. package/dist/flowDiagram-23GEKE2U-CRo7TM3K.js +0 -7
  240. package/dist/ganttDiagram-NO4QXBWP-CR55KG5d.cjs +0 -292
  241. package/dist/gitGraphDiagram-IHSO6WYX-BWYUn1Bi.cjs +0 -106
  242. package/dist/infoDiagram-FWYZ7A6U-CsUGc58_.cjs +0 -2
  243. package/dist/linear-DwqXGYLc.cjs +0 -1
  244. package/dist/linkCardServer/addressGuard.server.d.ts +0 -25
  245. package/dist/linkCardServer/pageFetch.server.d.ts +0 -37
  246. package/dist/linkCards-1JxY8wdm.js +0 -48
  247. package/dist/linkCards-Bjd_vW39.cjs +0 -1
  248. package/dist/pegDiagram-2B236MQR-C5pLIpKI.cjs +0 -1
  249. package/dist/railroadDiagram-RFXS5EU6-CwGmOFD_.cjs +0 -1
  250. package/dist/sizeCapture-X5ZJPWSS-Cd-k8xwk.cjs +0 -1
  251. package/dist/stateDiagram-2N3HPSRC-D2cvrAtN.cjs +0 -1
  252. package/dist/stateDiagram-v2-6OUMAXLB-BaktPIVY.cjs +0 -1
  253. package/dist/swimlanes-5IMT3BWC-DtdLK5z3.cjs +0 -1
  254. package/dist/vennDiagram-L72KCM5P-Ba2FGeN1.cjs +0 -34
  255. /package/dist/linkCardServer/{htmlEncoding.server.d.ts → htmlEncoding.d.ts} +0 -0
  256. /package/dist/linkCardServer/{metadataCache.server.d.ts → metadataCache.d.ts} +0 -0
@@ -0,0 +1,4 @@
1
+ declare const _default: {
2
+ renderToString: (formula: string) => string;
3
+ };
4
+ export default _default;
@@ -0,0 +1,38 @@
1
+ export declare const MERMAID_FRAME_LISTENING_ATTRIBUTE = "data-aqmd-mermaid-drawing-place";
2
+ export declare const MERMAID_FRAME_LISTENING = "listening";
3
+ export declare const MERMAID_FRAME_CONNECT = "aiquants-markdown:mermaid-frame:connect";
4
+ export interface MermaidFrameConnectMessage {
5
+ readonly type: typeof MERMAID_FRAME_CONNECT;
6
+ }
7
+ export interface MermaidFrameRequest {
8
+ readonly id: number;
9
+ readonly svgId: string;
10
+ readonly source: string;
11
+ readonly theme: "light" | "dark";
12
+ readonly width: number;
13
+ readonly fontFamily: string;
14
+ readonly lang: string;
15
+ readonly maxChars: number;
16
+ readonly maxEdges: number;
17
+ }
18
+ export type MermaidFrameFailure = {
19
+ readonly kind: "too-large";
20
+ readonly length: number;
21
+ readonly limit: number;
22
+ } | {
23
+ readonly kind: "too-many-edges";
24
+ readonly limit: number;
25
+ } | {
26
+ readonly kind: "mermaid";
27
+ readonly message: string;
28
+ } | {
29
+ readonly kind: "frame";
30
+ readonly message: string;
31
+ };
32
+ export type MermaidFrameAnswer = {
33
+ readonly id: number;
34
+ readonly svg: string;
35
+ } | {
36
+ readonly id: number;
37
+ readonly failure: MermaidFrameFailure;
38
+ };
@@ -0,0 +1,14 @@
1
+ import { Mermaid, MermaidConfig } from "mermaid";
2
+ import { MermaidFrameAnswer, MermaidFrameFailure, MermaidFrameRequest } from "./protocol.ts";
3
+ export type MermaidLibrary = Pick<Mermaid, "initialize" | "render">;
4
+ export interface MermaidFrameScope {
5
+ readonly document: Document;
6
+ readonly parent: unknown;
7
+ readonly origin: string;
8
+ addEventListener(type: "message", listener: (event: MessageEvent) => void): void;
9
+ }
10
+ export declare const MERMAID_LOCKED_CONFIG_KEYS: readonly string[];
11
+ export declare const mermaidFrameConfig: (request: MermaidFrameRequest) => MermaidConfig;
12
+ export declare const mermaidFailureOf: (error: unknown, maxEdges: number) => MermaidFrameFailure;
13
+ export declare const drawMermaidRequest: (library: MermaidLibrary, document: Document, request: MermaidFrameRequest) => Promise<MermaidFrameAnswer>;
14
+ export declare const serveMermaidFrame: (scope: MermaidFrameScope, library: MermaidLibrary) => void;
@@ -0,0 +1,4 @@
1
+ import { WindowLike } from "dompurify";
2
+ export declare const MERMAID_CLASS_PREFIX = "aqmd-mmd-";
3
+ export type MermaidSvgCleaner = (markup: string, svgId: string) => SVGSVGElement | null;
4
+ export declare function createMermaidSvgCleaner(view: WindowLike): MermaidSvgCleaner;
@@ -1,6 +1,6 @@
1
- import { g as oe } from "./chunk-XXDRQBXY-BK6HOWf6.js";
2
- import { s as ce } from "./chunk-VR4S4FIN-C-qPzUSR.js";
3
- import { _ as h, W as I, a7 as le, a8 as he, ak as de, an as j, U as P, a0 as G, a5 as ge, aC as ue, aD as pe, aE as fe } from "./extractHeadings-DlQcPv5N.js";
1
+ import { g as ae } from "./chunk-XXDRQBXY-B-99Fbs_.js";
2
+ import { s as ce } from "./chunk-VR4S4FIN-CyqARa17.js";
3
+ import { _ as h, l as I, p as le, r as he, D as de, G as j, c as P, i as G, n as ge, V as ue, W as pe, X as fe } from "./mermaid.core-C4EClWgB.js";
4
4
  const _ = [];
5
5
  for (let t = 0; t < 256; ++t)
6
6
  _.push((t + 256).toString(16).slice(1));
@@ -11,10 +11,10 @@ const ye = new Uint8Array(16);
11
11
  function Ee() {
12
12
  return crypto.getRandomValues(ye);
13
13
  }
14
- function _e(t, e, o) {
14
+ function _e(t, e, a) {
15
15
  return crypto.randomUUID ? crypto.randomUUID() : ke(t);
16
16
  }
17
- function ke(t, e, o) {
17
+ function ke(t, e, a) {
18
18
  t = t || {};
19
19
  const l = t.random ?? t.rng?.() ?? Ee();
20
20
  if (l.length < 16)
@@ -22,17 +22,17 @@ function ke(t, e, o) {
22
22
  return l[6] = l[6] & 15 | 64, l[8] = l[8] & 63 | 128, me(l);
23
23
  }
24
24
  var q = (function() {
25
- var t = /* @__PURE__ */ h(function(L, s, i, a) {
26
- for (i = i || {}, a = L.length; a--; i[L[a]] = s) ;
25
+ var t = /* @__PURE__ */ h(function(L, s, i, o) {
26
+ for (i = i || {}, o = L.length; o--; i[L[o]] = s) ;
27
27
  return i;
28
- }, "o"), e = [1, 4], o = [1, 13], l = [1, 12], n = [1, 15], d = [1, 16], f = [1, 20], y = [1, 19], E = [6, 7, 8], k = [1, 26], v = [1, 24], R = [1, 25], g = [6, 7, 11], A = [1, 6, 13, 15, 16, 19, 22], J = [1, 33], K = [1, 34], $ = [1, 6, 7, 11, 13, 15, 16, 19, 22], H = {
28
+ }, "o"), e = [1, 4], a = [1, 13], l = [1, 12], n = [1, 15], d = [1, 16], f = [1, 20], y = [1, 19], E = [6, 7, 8], k = [1, 26], v = [1, 24], R = [1, 25], g = [6, 7, 11], A = [1, 6, 13, 15, 16, 19, 22], J = [1, 33], K = [1, 34], $ = [1, 6, 7, 11, 13, 15, 16, 19, 22], H = {
29
29
  trace: /* @__PURE__ */ h(function() {
30
30
  }, "trace"),
31
31
  yy: {},
32
32
  symbols_: { error: 2, start: 3, mindMap: 4, spaceLines: 5, SPACELINE: 6, NL: 7, MINDMAP: 8, document: 9, stop: 10, EOF: 11, statement: 12, SPACELIST: 13, node: 14, ICON: 15, CLASS: 16, nodeWithId: 17, nodeWithoutId: 18, NODE_DSTART: 19, NODE_DESCR: 20, NODE_DEND: 21, NODE_ID: 22, $accept: 0, $end: 1 },
33
33
  terminals_: { 2: "error", 6: "SPACELINE", 7: "NL", 8: "MINDMAP", 11: "EOF", 13: "SPACELIST", 15: "ICON", 16: "CLASS", 19: "NODE_DSTART", 20: "NODE_DESCR", 21: "NODE_DEND", 22: "NODE_ID" },
34
34
  productions_: [0, [3, 1], [3, 2], [5, 1], [5, 2], [5, 2], [4, 2], [4, 3], [10, 1], [10, 1], [10, 1], [10, 2], [10, 2], [9, 3], [9, 2], [12, 2], [12, 2], [12, 2], [12, 1], [12, 1], [12, 1], [12, 1], [12, 1], [14, 1], [14, 1], [18, 3], [17, 1], [17, 4]],
35
- performAction: /* @__PURE__ */ h(function(s, i, a, c, p, r, B) {
35
+ performAction: /* @__PURE__ */ h(function(s, i, o, c, p, r, B) {
36
36
  var u = r.length - 1;
37
37
  switch (p) {
38
38
  case 6:
@@ -80,36 +80,36 @@ var q = (function() {
80
80
  break;
81
81
  }
82
82
  }, "anonymous"),
83
- table: [{ 3: 1, 4: 2, 5: 3, 6: [1, 5], 8: e }, { 1: [3] }, { 1: [2, 1] }, { 4: 6, 6: [1, 7], 7: [1, 8], 8: e }, { 6: o, 7: [1, 10], 9: 9, 12: 11, 13: l, 14: 14, 15: n, 16: d, 17: 17, 18: 18, 19: f, 22: y }, t(E, [2, 3]), { 1: [2, 2] }, t(E, [2, 4]), t(E, [2, 5]), { 1: [2, 6], 6: o, 12: 21, 13: l, 14: 14, 15: n, 16: d, 17: 17, 18: 18, 19: f, 22: y }, { 6: o, 9: 22, 12: 11, 13: l, 14: 14, 15: n, 16: d, 17: 17, 18: 18, 19: f, 22: y }, { 6: k, 7: v, 10: 23, 11: R }, t(g, [2, 22], { 17: 17, 18: 18, 14: 27, 15: [1, 28], 16: [1, 29], 19: f, 22: y }), t(g, [2, 18]), t(g, [2, 19]), t(g, [2, 20]), t(g, [2, 21]), t(g, [2, 23]), t(g, [2, 24]), t(g, [2, 26], { 19: [1, 30] }), { 20: [1, 31] }, { 6: k, 7: v, 10: 32, 11: R }, { 1: [2, 7], 6: o, 12: 21, 13: l, 14: 14, 15: n, 16: d, 17: 17, 18: 18, 19: f, 22: y }, t(A, [2, 14], { 7: J, 11: K }), t($, [2, 8]), t($, [2, 9]), t($, [2, 10]), t(g, [2, 15]), t(g, [2, 16]), t(g, [2, 17]), { 20: [1, 35] }, { 21: [1, 36] }, t(A, [2, 13], { 7: J, 11: K }), t($, [2, 11]), t($, [2, 12]), { 21: [1, 37] }, t(g, [2, 25]), t(g, [2, 27])],
83
+ table: [{ 3: 1, 4: 2, 5: 3, 6: [1, 5], 8: e }, { 1: [3] }, { 1: [2, 1] }, { 4: 6, 6: [1, 7], 7: [1, 8], 8: e }, { 6: a, 7: [1, 10], 9: 9, 12: 11, 13: l, 14: 14, 15: n, 16: d, 17: 17, 18: 18, 19: f, 22: y }, t(E, [2, 3]), { 1: [2, 2] }, t(E, [2, 4]), t(E, [2, 5]), { 1: [2, 6], 6: a, 12: 21, 13: l, 14: 14, 15: n, 16: d, 17: 17, 18: 18, 19: f, 22: y }, { 6: a, 9: 22, 12: 11, 13: l, 14: 14, 15: n, 16: d, 17: 17, 18: 18, 19: f, 22: y }, { 6: k, 7: v, 10: 23, 11: R }, t(g, [2, 22], { 17: 17, 18: 18, 14: 27, 15: [1, 28], 16: [1, 29], 19: f, 22: y }), t(g, [2, 18]), t(g, [2, 19]), t(g, [2, 20]), t(g, [2, 21]), t(g, [2, 23]), t(g, [2, 24]), t(g, [2, 26], { 19: [1, 30] }), { 20: [1, 31] }, { 6: k, 7: v, 10: 32, 11: R }, { 1: [2, 7], 6: a, 12: 21, 13: l, 14: 14, 15: n, 16: d, 17: 17, 18: 18, 19: f, 22: y }, t(A, [2, 14], { 7: J, 11: K }), t($, [2, 8]), t($, [2, 9]), t($, [2, 10]), t(g, [2, 15]), t(g, [2, 16]), t(g, [2, 17]), { 20: [1, 35] }, { 21: [1, 36] }, t(A, [2, 13], { 7: J, 11: K }), t($, [2, 11]), t($, [2, 12]), { 21: [1, 37] }, t(g, [2, 25]), t(g, [2, 27])],
84
84
  defaultActions: { 2: [2, 1], 6: [2, 2] },
85
85
  parseError: /* @__PURE__ */ h(function(s, i) {
86
86
  if (i.recoverable)
87
87
  this.trace(s);
88
88
  else {
89
- var a = new Error(s);
90
- throw a.hash = i, a;
89
+ var o = new Error(s);
90
+ throw o.hash = i, o;
91
91
  }
92
92
  }, "parseError"),
93
93
  parse: /* @__PURE__ */ h(function(s) {
94
- var i = this, a = [0], c = [], p = [null], r = [], B = this.table, u = "", U = 0, Q = 0, ie = 2, Z = 1, se = r.slice.call(arguments, 1), m = Object.create(this.lexer), T = { yy: {} };
94
+ var i = this, o = [0], c = [], p = [null], r = [], B = this.table, u = "", U = 0, Q = 0, ie = 2, Z = 1, se = r.slice.call(arguments, 1), m = Object.create(this.lexer), T = { yy: {} };
95
95
  for (var W in this.yy)
96
96
  Object.prototype.hasOwnProperty.call(this.yy, W) && (T.yy[W] = this.yy[W]);
97
97
  m.setInput(s, T.yy), T.yy.lexer = m, T.yy.parser = this, typeof m.yylloc > "u" && (m.yylloc = {});
98
- var z = m.yylloc;
99
- r.push(z);
98
+ var X = m.yylloc;
99
+ r.push(X);
100
100
  var re = m.options && m.options.ranges;
101
101
  typeof T.yy.parseError == "function" ? this.parseError = T.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
102
- function ae(S) {
103
- a.length = a.length - 2 * S, p.length = p.length - S, r.length = r.length - S;
102
+ function oe(S) {
103
+ o.length = o.length - 2 * S, p.length = p.length - S, r.length = r.length - S;
104
104
  }
105
- h(ae, "popStack");
105
+ h(oe, "popStack");
106
106
  function ee() {
107
107
  var S;
108
108
  return S = c.pop() || m.lex() || Z, typeof S != "number" && (S instanceof Array && (c = S, S = c.pop()), S = i.symbols_[S] || S), S;
109
109
  }
110
110
  h(ee, "lex");
111
- for (var b, O, x, X, C = {}, V, N, te, F; ; ) {
112
- if (O = a[a.length - 1], this.defaultActions[O] ? x = this.defaultActions[O] : ((b === null || typeof b > "u") && (b = ee()), x = B[O] && B[O][b]), typeof x > "u" || !x.length || !x[0]) {
111
+ for (var b, O, x, z, C = {}, V, N, te, F; ; ) {
112
+ if (O = o[o.length - 1], this.defaultActions[O] ? x = this.defaultActions[O] : ((b === null || typeof b > "u") && (b = ee()), x = B[O] && B[O][b]), typeof x > "u" || !x.length || !x[0]) {
113
113
  var Y = "";
114
114
  F = [];
115
115
  for (V in B[O])
@@ -120,7 +120,7 @@ Expecting ` + F.join(", ") + ", got '" + (this.terminals_[b] || b) + "'" : Y = "
120
120
  text: m.match,
121
121
  token: this.terminals_[b] || b,
122
122
  line: m.yylineno,
123
- loc: z,
123
+ loc: X,
124
124
  expected: F
125
125
  });
126
126
  }
@@ -128,7 +128,7 @@ Expecting ` + F.join(", ") + ", got '" + (this.terminals_[b] || b) + "'" : Y = "
128
128
  throw new Error("Parse Error: multiple actions possible at state: " + O + ", token: " + b);
129
129
  switch (x[0]) {
130
130
  case 1:
131
- a.push(b), p.push(m.yytext), r.push(m.yylloc), a.push(x[1]), b = null, Q = m.yyleng, u = m.yytext, U = m.yylineno, z = m.yylloc;
131
+ o.push(b), p.push(m.yytext), r.push(m.yylloc), o.push(x[1]), b = null, Q = m.yyleng, u = m.yytext, U = m.yylineno, X = m.yylloc;
132
132
  break;
133
133
  case 2:
134
134
  if (N = this.productions_[x[1]][1], C.$ = p[p.length - N], C._$ = {
@@ -139,7 +139,7 @@ Expecting ` + F.join(", ") + ", got '" + (this.terminals_[b] || b) + "'" : Y = "
139
139
  }, re && (C._$.range = [
140
140
  r[r.length - (N || 1)].range[0],
141
141
  r[r.length - 1].range[1]
142
- ]), X = this.performAction.apply(C, [
142
+ ]), z = this.performAction.apply(C, [
143
143
  u,
144
144
  Q,
145
145
  U,
@@ -147,9 +147,9 @@ Expecting ` + F.join(", ") + ", got '" + (this.terminals_[b] || b) + "'" : Y = "
147
147
  x[1],
148
148
  p,
149
149
  r
150
- ].concat(se)), typeof X < "u")
151
- return X;
152
- N && (a = a.slice(0, -1 * N * 2), p = p.slice(0, -1 * N), r = r.slice(0, -1 * N)), a.push(this.productions_[x[1]][0]), p.push(C.$), r.push(C._$), te = B[a[a.length - 2]][a[a.length - 1]], a.push(te);
150
+ ].concat(se)), typeof z < "u")
151
+ return z;
152
+ N && (o = o.slice(0, -1 * N * 2), p = p.slice(0, -1 * N), r = r.slice(0, -1 * N)), o.push(this.productions_[x[1]][0]), p.push(C.$), r.push(C._$), te = B[o[o.length - 2]][o[o.length - 1]], o.push(te);
153
153
  break;
154
154
  case 3:
155
155
  return !0;
@@ -160,9 +160,9 @@ Expecting ` + F.join(", ") + ", got '" + (this.terminals_[b] || b) + "'" : Y = "
160
160
  }, ne = /* @__PURE__ */ (function() {
161
161
  var L = {
162
162
  EOF: 1,
163
- parseError: /* @__PURE__ */ h(function(i, a) {
163
+ parseError: /* @__PURE__ */ h(function(i, o) {
164
164
  if (this.yy.parser)
165
- this.yy.parser.parseError(i, a);
165
+ this.yy.parser.parseError(i, o);
166
166
  else
167
167
  throw new Error(i);
168
168
  }, "parseError"),
@@ -184,16 +184,16 @@ Expecting ` + F.join(", ") + ", got '" + (this.terminals_[b] || b) + "'" : Y = "
184
184
  }, "input"),
185
185
  // unshifts one char (or a string) into the input
186
186
  unput: /* @__PURE__ */ h(function(s) {
187
- var i = s.length, a = s.split(/(?:\r\n?|\n)/g);
187
+ var i = s.length, o = s.split(/(?:\r\n?|\n)/g);
188
188
  this._input = s + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - i), this.offset -= i;
189
189
  var c = this.match.split(/(?:\r\n?|\n)/g);
190
- this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), a.length - 1 && (this.yylineno -= a.length - 1);
190
+ this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), o.length - 1 && (this.yylineno -= o.length - 1);
191
191
  var p = this.yylloc.range;
192
192
  return this.yylloc = {
193
193
  first_line: this.yylloc.first_line,
194
194
  last_line: this.yylineno + 1,
195
195
  first_column: this.yylloc.first_column,
196
- last_column: a ? (a.length === c.length ? this.yylloc.first_column : 0) + c[c.length - a.length].length - a[0].length : this.yylloc.first_column - i
196
+ last_column: o ? (o.length === c.length ? this.yylloc.first_column : 0) + c[c.length - o.length].length - o[0].length : this.yylloc.first_column - i
197
197
  }, this.options.ranges && (this.yylloc.range = [p[0], p[0] + this.yyleng - i]), this.yyleng = this.yytext.length, this;
198
198
  }, "unput"),
199
199
  // When called from action, caches matched text and appends it on next action
@@ -235,7 +235,7 @@ Expecting ` + F.join(", ") + ", got '" + (this.terminals_[b] || b) + "'" : Y = "
235
235
  }, "showPosition"),
236
236
  // test the lexed token: return FALSE when not a match, otherwise return token
237
237
  test_match: /* @__PURE__ */ h(function(s, i) {
238
- var a, c, p;
238
+ var o, c, p;
239
239
  if (this.options.backtrack_lexer && (p = {
240
240
  yylineno: this.yylineno,
241
241
  yylloc: {
@@ -260,8 +260,8 @@ Expecting ` + F.join(", ") + ", got '" + (this.terminals_[b] || b) + "'" : Y = "
260
260
  last_line: this.yylineno + 1,
261
261
  first_column: this.yylloc.last_column,
262
262
  last_column: c ? c[c.length - 1].length - c[c.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + s[0].length
263
- }, this.yytext += s[0], this.match += s[0], this.matches = s, 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(s[0].length), this.matched += s[0], a = this.performAction.call(this, this.yy, this, i, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), a)
264
- return a;
263
+ }, this.yytext += s[0], this.match += s[0], this.matches = s, 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(s[0].length), this.matched += s[0], o = this.performAction.call(this, this.yy, this, i, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), o)
264
+ return o;
265
265
  if (this._backtrack) {
266
266
  for (var r in p)
267
267
  this[r] = p[r];
@@ -274,12 +274,12 @@ Expecting ` + F.join(", ") + ", got '" + (this.terminals_[b] || b) + "'" : Y = "
274
274
  if (this.done)
275
275
  return this.EOF;
276
276
  this._input || (this.done = !0);
277
- var s, i, a, c;
277
+ var s, i, o, c;
278
278
  this._more || (this.yytext = "", this.match = "");
279
279
  for (var p = this._currentRules(), r = 0; r < p.length; r++)
280
- if (a = this._input.match(this.rules[p[r]]), a && (!i || a[0].length > i[0].length)) {
281
- if (i = a, c = r, this.options.backtrack_lexer) {
282
- if (s = this.test_match(a, p[r]), s !== !1)
280
+ if (o = this._input.match(this.rules[p[r]]), o && (!i || o[0].length > i[0].length)) {
281
+ if (i = o, c = r, this.options.backtrack_lexer) {
282
+ if (s = this.test_match(o, p[r]), s !== !1)
283
283
  return s;
284
284
  if (this._backtrack) {
285
285
  i = !1;
@@ -327,10 +327,10 @@ Expecting ` + F.join(", ") + ", got '" + (this.terminals_[b] || b) + "'" : Y = "
327
327
  return this.conditionStack.length;
328
328
  }, "stateStackSize"),
329
329
  options: { "case-insensitive": !0 },
330
- performAction: /* @__PURE__ */ h(function(i, a, c, p) {
330
+ performAction: /* @__PURE__ */ h(function(i, o, c, p) {
331
331
  switch (c) {
332
332
  case 0:
333
- return i.getLogger().trace("Found comment", a.yytext), 6;
333
+ return i.getLogger().trace("Found comment", o.yytext), 6;
334
334
  case 1:
335
335
  return 8;
336
336
  case 2:
@@ -387,7 +387,7 @@ Expecting ` + F.join(", ") + ", got '" + (this.terminals_[b] || b) + "'" : Y = "
387
387
  i.getLogger().trace("Starting NSTR"), this.begin("NSTR");
388
388
  break;
389
389
  case 25:
390
- return i.getLogger().trace("description:", a.yytext), "NODE_DESCR";
390
+ return i.getLogger().trace("description:", o.yytext), "NODE_DESCR";
391
391
  case 26:
392
392
  this.popState();
393
393
  break;
@@ -396,7 +396,7 @@ Expecting ` + F.join(", ") + ", got '" + (this.terminals_[b] || b) + "'" : Y = "
396
396
  case 28:
397
397
  return this.popState(), i.getLogger().trace("node end )"), "NODE_DEND";
398
398
  case 29:
399
- return this.popState(), i.getLogger().trace("node end ...", a.yytext), "NODE_DEND";
399
+ return this.popState(), i.getLogger().trace("node end ...", o.yytext), "NODE_DEND";
400
400
  case 30:
401
401
  return this.popState(), i.getLogger().trace("node end (("), "NODE_DEND";
402
402
  case 31:
@@ -408,9 +408,9 @@ Expecting ` + F.join(", ") + ", got '" + (this.terminals_[b] || b) + "'" : Y = "
408
408
  case 34:
409
409
  return this.popState(), i.getLogger().trace("node end (("), "NODE_DEND";
410
410
  case 35:
411
- return i.getLogger().trace("Long description:", a.yytext), 20;
411
+ return i.getLogger().trace("Long description:", o.yytext), 20;
412
412
  case 36:
413
- return i.getLogger().trace("Long description:", a.yytext), 20;
413
+ return i.getLogger().trace("Long description:", o.yytext), 20;
414
414
  }
415
415
  }, "anonymous"),
416
416
  rules: [/^(?:\s*%%.*)/i, /^(?:mindmap\b)/i, /^(?::::)/i, /^(?:.+)/i, /^(?:\n)/i, /^(?:::icon\()/i, /^(?:[\s]+[\n])/i, /^(?:[\n]+)/i, /^(?:[^\)]+)/i, /^(?:\))/i, /^(?:-\))/i, /^(?:\(-)/i, /^(?:\)\))/i, /^(?:\))/i, /^(?:\(\()/i, /^(?:\{\{)/i, /^(?:\()/i, /^(?:\[)/i, /^(?:[\s]+)/i, /^(?:[^\(\[\n\)\{\}]+)/i, /^(?:$)/i, /^(?:["][`])/i, /^(?:[^`"]+)/i, /^(?:[`]["])/i, /^(?:["])/i, /^(?:[^"]+)/i, /^(?:["])/i, /^(?:[\)]\))/i, /^(?:[\)])/i, /^(?:[\]])/i, /^(?:\}\})/i, /^(?:\(-)/i, /^(?:-\))/i, /^(?:\(\()/i, /^(?:\()/i, /^(?:[^\)\]\(\}]+)/i, /^(?:.+(?!\(\())/i],
@@ -442,16 +442,16 @@ var be = q, Se = 12, D = {
442
442
  this.nodes = [], this.count = 0, this.elements = {}, this.baseLevel = void 0;
443
443
  }
444
444
  getParent(e) {
445
- for (let o = this.nodes.length - 1; o >= 0; o--)
446
- if (this.nodes[o].level < e)
447
- return this.nodes[o];
445
+ for (let a = this.nodes.length - 1; a >= 0; a--)
446
+ if (this.nodes[a].level < e)
447
+ return this.nodes[a];
448
448
  return null;
449
449
  }
450
450
  getMindmap() {
451
451
  return this.nodes.length > 0 ? this.nodes[0] : null;
452
452
  }
453
- addNode(e, o, l, n) {
454
- I.info("addNode", e, o, l, n);
453
+ addNode(e, a, l, n) {
454
+ I.info("addNode", e, a, l, n);
455
455
  let d = !1;
456
456
  this.nodes.length === 0 ? (this.baseLevel = e, e = 0, d = !0) : this.baseLevel !== void 0 && (e = e - this.baseLevel, d = !1);
457
457
  const f = P();
@@ -465,7 +465,7 @@ var be = q, Se = 12, D = {
465
465
  }
466
466
  const E = {
467
467
  id: this.count++,
468
- nodeId: G(o, f),
468
+ nodeId: G(a, f),
469
469
  level: e,
470
470
  descr: G(l, f),
471
471
  type: n,
@@ -483,12 +483,12 @@ var be = q, Se = 12, D = {
483
483
  `There can be only one root. No parent could be found for ("${E.descr}")`
484
484
  );
485
485
  }
486
- getType(e, o) {
487
- switch (I.debug("In get type", e, o), e) {
486
+ getType(e, a) {
487
+ switch (I.debug("In get type", e, a), e) {
488
488
  case "[":
489
489
  return this.nodeType.RECT;
490
490
  case "(":
491
- return o === ")" ? this.nodeType.ROUNDED_RECT : this.nodeType.CLOUD;
491
+ return a === ")" ? this.nodeType.ROUNDED_RECT : this.nodeType.CLOUD;
492
492
  case "((":
493
493
  return this.nodeType.CIRCLE;
494
494
  case ")":
@@ -501,8 +501,8 @@ var be = q, Se = 12, D = {
501
501
  return this.nodeType.DEFAULT;
502
502
  }
503
503
  }
504
- setElementForId(e, o) {
505
- this.elements[e] = o;
504
+ setElementForId(e, a) {
505
+ this.elements[e] = a;
506
506
  }
507
507
  getElementById(e) {
508
508
  return this.elements[e];
@@ -510,8 +510,8 @@ var be = q, Se = 12, D = {
510
510
  decorateNode(e) {
511
511
  if (!e)
512
512
  return;
513
- const o = P(), l = this.nodes[this.nodes.length - 1];
514
- e.icon && (l.icon = G(e.icon, o)), e.class && (l.class = G(e.class, o));
513
+ const a = P(), l = this.nodes[this.nodes.length - 1];
514
+ e.icon && (l.icon = G(e.icon, a)), e.class && (l.class = G(e.class, a));
515
515
  }
516
516
  type2Str(e) {
517
517
  switch (e) {
@@ -539,10 +539,10 @@ var be = q, Se = 12, D = {
539
539
  * @param node - The mindmap node to process
540
540
  * @param sectionNumber - The section number to assign (undefined for root)
541
541
  */
542
- assignSections(e, o) {
543
- if (e.level === 0 ? e.section = void 0 : e.section = o, e.children)
542
+ assignSections(e, a) {
543
+ if (e.level === 0 ? e.section = void 0 : e.section = a, e.children)
544
544
  for (const [l, n] of e.children.entries()) {
545
- const d = e.level === 0 ? l % (Se - 1) : o;
545
+ const d = e.level === 0 ? l % (Se - 1) : a;
546
546
  this.assignSections(n, d);
547
547
  }
548
548
  }
@@ -551,7 +551,7 @@ var be = q, Se = 12, D = {
551
551
  * @param node - The mindmap node to process
552
552
  * @param processedNodes - Array to collect processed nodes
553
553
  */
554
- flattenNodes(e, o) {
554
+ flattenNodes(e, a) {
555
555
  const l = P(), n = ["mindmap-node"];
556
556
  e.isRoot === !0 ? n.push("section-root", "section--1") : e.section !== void 0 && n.push(`section-${e.section}`), e.class && n.push(e.class);
557
557
  const d = n.join(" "), f = /* @__PURE__ */ h((E) => {
@@ -597,16 +597,16 @@ var be = q, Se = 12, D = {
597
597
  type: e.type,
598
598
  section: e.section
599
599
  };
600
- if (o.push(y), e.children)
600
+ if (a.push(y), e.children)
601
601
  for (const E of e.children)
602
- this.flattenNodes(E, o);
602
+ this.flattenNodes(E, a);
603
603
  }
604
604
  /**
605
605
  * Generate edges from parent-child relationships in mindmap tree
606
606
  * @param node - The mindmap node to process
607
607
  * @param edges - Array to collect edges
608
608
  */
609
- generateEdges(e, o) {
609
+ generateEdges(e, a) {
610
610
  if (!e.children)
611
611
  return;
612
612
  const l = P();
@@ -628,7 +628,7 @@ var be = q, Se = 12, D = {
628
628
  depth: e.level,
629
629
  section: n.section
630
630
  };
631
- o.push(y), this.generateEdges(n, o);
631
+ a.push(y), this.generateEdges(n, a);
632
632
  }
633
633
  }
634
634
  /**
@@ -637,14 +637,14 @@ var be = q, Se = 12, D = {
637
637
  * @returns Structured data containing nodes, edges, and config
638
638
  */
639
639
  getData() {
640
- const e = this.getMindmap(), o = P(), n = ge().layout !== void 0, d = o;
640
+ const e = this.getMindmap(), a = P(), n = ge().layout !== void 0, d = a;
641
641
  if (n || (d.layout = "cose-bilkent"), !e)
642
642
  return {
643
643
  nodes: [],
644
644
  edges: [],
645
645
  config: d
646
646
  };
647
- I.debug("getData: mindmapRoot", e, o), this.assignSections(e);
647
+ I.debug("getData: mindmapRoot", e, a), this.assignSections(e);
648
648
  const f = [], y = [];
649
649
  this.flattenNodes(e, f), this.generateEdges(e, y), I.debug(
650
650
  `getData: processed ${f.length} nodes and ${y.length} edges`
@@ -683,10 +683,10 @@ var be = q, Se = 12, D = {
683
683
  getLogger() {
684
684
  return I;
685
685
  }
686
- }, h(w, "MindmapDB"), w), Ne = /* @__PURE__ */ h(async (t, e, o, l) => {
686
+ }, h(w, "MindmapDB"), w), Ne = /* @__PURE__ */ h(async (t, e, a, l) => {
687
687
  I.debug(`Rendering mindmap diagram
688
688
  ` + t);
689
- const n = l.db, d = n.getData(), f = oe(e, d.config.securityLevel);
689
+ const n = l.db, d = n.getData(), f = ae(e, d.config.securityLevel);
690
690
  if (d.type = l.type, d.layoutAlgorithm = le(d.config.layout, {
691
691
  fallback: "cose-bilkent"
692
692
  }), d.diagramId = e, !n.getMindmap())
@@ -708,12 +708,12 @@ var be = q, Se = 12, D = {
708
708
  }, "draw"), De = {
709
709
  draw: Ne
710
710
  }, Le = /* @__PURE__ */ h((t) => {
711
- const { theme: e, look: o } = t;
711
+ const { theme: e, look: a } = t;
712
712
  let l = "";
713
713
  for (let n = 0; n < t.THEME_COLOR_LIMIT; n++)
714
714
  t["lineColor" + n] = t["lineColor" + n] || t["cScaleInv" + n], ue(t["lineColor" + n]) ? t["lineColor" + n] = pe(t["lineColor" + n], 20) : t["lineColor" + n] = fe(t["lineColor" + n], 20);
715
715
  for (let n = 0; n < t.THEME_COLOR_LIMIT; n++) {
716
- const d = "" + (o === "neo" ? Math.max(10 - (n - 1) * 2, 2) : 17 - 3 * n);
716
+ const d = "" + (a === "neo" ? Math.max(10 - (n - 1) * 2, 2) : 17 - 3 * n);
717
717
  l += `
718
718
  .section-${n - 1} rect, .section-${n - 1} path, .section-${n - 1} circle, .section-${n - 1} polygon, .section-${n - 1} path {
719
719
  fill: ${t["cScale" + n]};
@@ -759,20 +759,20 @@ var be = q, Se = 12, D = {
759
759
  `;
760
760
  }
761
761
  return l;
762
- }, "genSections"), ve = /* @__PURE__ */ h((t, e, o) => {
762
+ }, "genSections"), ve = /* @__PURE__ */ h((t, e, a) => {
763
763
  let l = "";
764
764
  for (let n = 0; n < t; n++)
765
765
  l += `
766
766
  [data-look="neo"].mindmap-node.section-${n - 1} rect, [data-look="neo"].mindmap-node.section-${n - 1} path, [data-look="neo"].mindmap-node.section-${n - 1} circle, [data-look="neo"].mindmap-node.section-${n - 1} polygon {
767
767
  stroke: url(${e}-gradient);
768
- fill: ${o};
768
+ fill: ${a};
769
769
  }
770
770
  .section-${n - 1} line {
771
771
  stroke-width: 0;
772
772
  }`;
773
773
  return l;
774
774
  }, "genGradient"), Te = /* @__PURE__ */ h((t) => {
775
- const { theme: e } = t, o = t.svgId, l = t.dropShadow ? t.dropShadow.replace("url(#drop-shadow)", `url(${o}-drop-shadow)`) : "none";
775
+ const { theme: e } = t, a = t.svgId, l = t.dropShadow ? t.dropShadow.replace("url(#drop-shadow)", `url(${a}-drop-shadow)`) : "none";
776
776
  return `
777
777
  .edge {
778
778
  stroke-width: 3;
@@ -812,7 +812,7 @@ var be = q, Se = 12, D = {
812
812
  [data-look="neo"].mindmap-node.section-root .text-inner-tspan {
813
813
  fill: ${e?.includes("redux") ? t.nodeBorder : t["cScaleLabel" + (e === "neutral" ? 1 : 0)]};
814
814
  }
815
- ${t.useGradient && o && t.mainBkg ? ve(t.THEME_COLOR_LIMIT, o, t.mainBkg) : ""}
815
+ ${t.useGradient && a && t.mainBkg ? ve(t.THEME_COLOR_LIMIT, a, t.mainBkg) : ""}
816
816
  `;
817
817
  }, "getStyles"), Oe = Te, Re = {
818
818
  get db() {
@@ -1,9 +1,9 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ie=require("./chunk-XXDRQBXY-DttkP7wv.cjs"),se=require("./chunk-VR4S4FIN-CHKLwvYh.cjs"),s=require("./extractHeadings-wWAipplS.cjs"),E=[];for(let t=0;t<256;++t)E.push((t+256).toString(16).slice(1));function re(t,e=0){return(E[t[e+0]]+E[t[e+1]]+E[t[e+2]]+E[t[e+3]]+"-"+E[t[e+4]]+E[t[e+5]]+"-"+E[t[e+6]]+E[t[e+7]]+"-"+E[t[e+8]]+E[t[e+9]]+"-"+E[t[e+10]]+E[t[e+11]]+E[t[e+12]]+E[t[e+13]]+E[t[e+14]]+E[t[e+15]]).toLowerCase()}const ae=new Uint8Array(16);function oe(){return crypto.getRandomValues(ae)}function ce(t,e,c){return crypto.randomUUID?crypto.randomUUID():le(t)}function le(t,e,c){t=t||{};const h=t.random??t.rng?.()??oe();if(h.length<16)throw new Error("Random bytes length must be >= 16");return h[6]=h[6]&15|64,h[8]=h[8]&63|128,re(h)}var z=(function(){var t=s.__name(function(L,r,i,o){for(i=i||{},o=L.length;o--;i[L[o]]=r);return i},"o"),e=[1,4],c=[1,13],h=[1,12],n=[1,15],d=[1,16],f=[1,20],y=[1,19],_=[6,7,8],k=[1,26],v=[1,24],w=[1,25],g=[6,7,11],R=[1,6,13,15,16,19,22],X=[1,33],W=[1,34],A=[1,6,7,11,13,15,16,19,22],V={trace:s.__name(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:s.__name(function(r,i,o,l,p,a,$){var u=a.length-1;switch(p){case 6:case 7:return l;case 8:l.getLogger().trace("Stop NL ");break;case 9:l.getLogger().trace("Stop EOF ");break;case 11:l.getLogger().trace("Stop NL2 ");break;case 12:l.getLogger().trace("Stop EOF2 ");break;case 15:l.getLogger().info("Node: ",a[u].id),l.addNode(a[u-1].length,a[u].id,a[u].descr,a[u].type);break;case 16:l.getLogger().trace("Icon: ",a[u]),l.decorateNode({icon:a[u]});break;case 17:case 21:l.decorateNode({class:a[u]});break;case 18:l.getLogger().trace("SPACELIST");break;case 19:l.getLogger().trace("Node: ",a[u].id),l.addNode(0,a[u].id,a[u].descr,a[u].type);break;case 20:l.decorateNode({icon:a[u]});break;case 25:l.getLogger().trace("node found ..",a[u-2]),this.$={id:a[u-1],descr:a[u-1],type:l.getType(a[u-2],a[u])};break;case 26:this.$={id:a[u],descr:a[u],type:l.nodeType.DEFAULT};break;case 27:l.getLogger().trace("node found ..",a[u-3]),this.$={id:a[u-3],descr:a[u-1],type:l.getType(a[u-2],a[u])};break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:e},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:e},{6:c,7:[1,10],9:9,12:11,13:h,14:14,15:n,16:d,17:17,18:18,19:f,22:y},t(_,[2,3]),{1:[2,2]},t(_,[2,4]),t(_,[2,5]),{1:[2,6],6:c,12:21,13:h,14:14,15:n,16:d,17:17,18:18,19:f,22:y},{6:c,9:22,12:11,13:h,14:14,15:n,16:d,17:17,18:18,19:f,22:y},{6:k,7:v,10:23,11:w},t(g,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:f,22:y}),t(g,[2,18]),t(g,[2,19]),t(g,[2,20]),t(g,[2,21]),t(g,[2,23]),t(g,[2,24]),t(g,[2,26],{19:[1,30]}),{20:[1,31]},{6:k,7:v,10:32,11:w},{1:[2,7],6:c,12:21,13:h,14:14,15:n,16:d,17:17,18:18,19:f,22:y},t(R,[2,14],{7:X,11:W}),t(A,[2,8]),t(A,[2,9]),t(A,[2,10]),t(g,[2,15]),t(g,[2,16]),t(g,[2,17]),{20:[1,35]},{21:[1,36]},t(R,[2,13],{7:X,11:W}),t(A,[2,11]),t(A,[2,12]),{21:[1,37]},t(g,[2,25]),t(g,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:s.__name(function(r,i){if(i.recoverable)this.trace(r);else{var o=new Error(r);throw o.hash=i,o}},"parseError"),parse:s.__name(function(r){var i=this,o=[0],l=[],p=[null],a=[],$=this.table,u="",P=0,Y=0,Z=2,q=1,ee=a.slice.call(arguments,1),m=Object.create(this.lexer),T={yy:{}};for(var F in this.yy)Object.prototype.hasOwnProperty.call(this.yy,F)&&(T.yy[F]=this.yy[F]);m.setInput(r,T.yy),T.yy.lexer=m,T.yy.parser=this,typeof m.yylloc>"u"&&(m.yylloc={});var G=m.yylloc;a.push(G);var te=m.options&&m.options.ranges;typeof T.yy.parseError=="function"?this.parseError=T.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ne(S){o.length=o.length-2*S,p.length=p.length-S,a.length=a.length-S}s.__name(ne,"popStack");function Q(){var S;return S=l.pop()||m.lex()||q,typeof S!="number"&&(S instanceof Array&&(l=S,S=l.pop()),S=i.symbols_[S]||S),S}s.__name(Q,"lex");for(var b,C,x,j,O={},M,N,J,U;;){if(C=o[o.length-1],this.defaultActions[C]?x=this.defaultActions[C]:((b===null||typeof b>"u")&&(b=Q()),x=$[C]&&$[C][b]),typeof x>"u"||!x.length||!x[0]){var H="";U=[];for(M in $[C])this.terminals_[M]&&M>Z&&U.push("'"+this.terminals_[M]+"'");m.showPosition?H="Parse error on line "+(P+1)+`:
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ie=require("./chunk-XXDRQBXY-BgeRIUG1.cjs"),se=require("./chunk-VR4S4FIN-Sx71KwIQ.cjs"),s=require("./mermaid.core-CRP55Hm1.cjs"),E=[];for(let t=0;t<256;++t)E.push((t+256).toString(16).slice(1));function re(t,e=0){return(E[t[e+0]]+E[t[e+1]]+E[t[e+2]]+E[t[e+3]]+"-"+E[t[e+4]]+E[t[e+5]]+"-"+E[t[e+6]]+E[t[e+7]]+"-"+E[t[e+8]]+E[t[e+9]]+"-"+E[t[e+10]]+E[t[e+11]]+E[t[e+12]]+E[t[e+13]]+E[t[e+14]]+E[t[e+15]]).toLowerCase()}const ae=new Uint8Array(16);function oe(){return crypto.getRandomValues(ae)}function ce(t,e,c){return crypto.randomUUID?crypto.randomUUID():le(t)}function le(t,e,c){t=t||{};const h=t.random??t.rng?.()??oe();if(h.length<16)throw new Error("Random bytes length must be >= 16");return h[6]=h[6]&15|64,h[8]=h[8]&63|128,re(h)}var H=(function(){var t=s.__name(function(L,r,i,o){for(i=i||{},o=L.length;o--;i[L[o]]=r);return i},"o"),e=[1,4],c=[1,13],h=[1,12],n=[1,15],d=[1,16],f=[1,20],y=[1,19],_=[6,7,8],k=[1,26],v=[1,24],w=[1,25],g=[6,7,11],R=[1,6,13,15,16,19,22],X=[1,33],W=[1,34],A=[1,6,7,11,13,15,16,19,22],V={trace:s.__name(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:s.__name(function(r,i,o,l,p,a,$){var u=a.length-1;switch(p){case 6:case 7:return l;case 8:l.getLogger().trace("Stop NL ");break;case 9:l.getLogger().trace("Stop EOF ");break;case 11:l.getLogger().trace("Stop NL2 ");break;case 12:l.getLogger().trace("Stop EOF2 ");break;case 15:l.getLogger().info("Node: ",a[u].id),l.addNode(a[u-1].length,a[u].id,a[u].descr,a[u].type);break;case 16:l.getLogger().trace("Icon: ",a[u]),l.decorateNode({icon:a[u]});break;case 17:case 21:l.decorateNode({class:a[u]});break;case 18:l.getLogger().trace("SPACELIST");break;case 19:l.getLogger().trace("Node: ",a[u].id),l.addNode(0,a[u].id,a[u].descr,a[u].type);break;case 20:l.decorateNode({icon:a[u]});break;case 25:l.getLogger().trace("node found ..",a[u-2]),this.$={id:a[u-1],descr:a[u-1],type:l.getType(a[u-2],a[u])};break;case 26:this.$={id:a[u],descr:a[u],type:l.nodeType.DEFAULT};break;case 27:l.getLogger().trace("node found ..",a[u-3]),this.$={id:a[u-3],descr:a[u-1],type:l.getType(a[u-2],a[u])};break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:e},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:e},{6:c,7:[1,10],9:9,12:11,13:h,14:14,15:n,16:d,17:17,18:18,19:f,22:y},t(_,[2,3]),{1:[2,2]},t(_,[2,4]),t(_,[2,5]),{1:[2,6],6:c,12:21,13:h,14:14,15:n,16:d,17:17,18:18,19:f,22:y},{6:c,9:22,12:11,13:h,14:14,15:n,16:d,17:17,18:18,19:f,22:y},{6:k,7:v,10:23,11:w},t(g,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:f,22:y}),t(g,[2,18]),t(g,[2,19]),t(g,[2,20]),t(g,[2,21]),t(g,[2,23]),t(g,[2,24]),t(g,[2,26],{19:[1,30]}),{20:[1,31]},{6:k,7:v,10:32,11:w},{1:[2,7],6:c,12:21,13:h,14:14,15:n,16:d,17:17,18:18,19:f,22:y},t(R,[2,14],{7:X,11:W}),t(A,[2,8]),t(A,[2,9]),t(A,[2,10]),t(g,[2,15]),t(g,[2,16]),t(g,[2,17]),{20:[1,35]},{21:[1,36]},t(R,[2,13],{7:X,11:W}),t(A,[2,11]),t(A,[2,12]),{21:[1,37]},t(g,[2,25]),t(g,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:s.__name(function(r,i){if(i.recoverable)this.trace(r);else{var o=new Error(r);throw o.hash=i,o}},"parseError"),parse:s.__name(function(r){var i=this,o=[0],l=[],p=[null],a=[],$=this.table,u="",P=0,Y=0,Z=2,q=1,ee=a.slice.call(arguments,1),m=Object.create(this.lexer),T={yy:{}};for(var F in this.yy)Object.prototype.hasOwnProperty.call(this.yy,F)&&(T.yy[F]=this.yy[F]);m.setInput(r,T.yy),T.yy.lexer=m,T.yy.parser=this,typeof m.yylloc>"u"&&(m.yylloc={});var G=m.yylloc;a.push(G);var te=m.options&&m.options.ranges;typeof T.yy.parseError=="function"?this.parseError=T.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ne(S){o.length=o.length-2*S,p.length=p.length-S,a.length=a.length-S}s.__name(ne,"popStack");function Q(){var S;return S=l.pop()||m.lex()||q,typeof S!="number"&&(S instanceof Array&&(l=S,S=l.pop()),S=i.symbols_[S]||S),S}s.__name(Q,"lex");for(var b,C,x,j,O={},M,N,J,U;;){if(C=o[o.length-1],this.defaultActions[C]?x=this.defaultActions[C]:((b===null||typeof b>"u")&&(b=Q()),x=$[C]&&$[C][b]),typeof x>"u"||!x.length||!x[0]){var z="";U=[];for(M in $[C])this.terminals_[M]&&M>Z&&U.push("'"+this.terminals_[M]+"'");m.showPosition?z="Parse error on line "+(P+1)+`:
2
2
  `+m.showPosition()+`
3
- Expecting `+U.join(", ")+", got '"+(this.terminals_[b]||b)+"'":H="Parse error on line "+(P+1)+": Unexpected "+(b==q?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(H,{text:m.match,token:this.terminals_[b]||b,line:m.yylineno,loc:G,expected:U})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+C+", token: "+b);switch(x[0]){case 1:o.push(b),p.push(m.yytext),a.push(m.yylloc),o.push(x[1]),b=null,Y=m.yyleng,u=m.yytext,P=m.yylineno,G=m.yylloc;break;case 2:if(N=this.productions_[x[1]][1],O.$=p[p.length-N],O._$={first_line:a[a.length-(N||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(N||1)].first_column,last_column:a[a.length-1].last_column},te&&(O._$.range=[a[a.length-(N||1)].range[0],a[a.length-1].range[1]]),j=this.performAction.apply(O,[u,Y,P,T.yy,x[1],p,a].concat(ee)),typeof j<"u")return j;N&&(o=o.slice(0,-1*N*2),p=p.slice(0,-1*N),a=a.slice(0,-1*N)),o.push(this.productions_[x[1]][0]),p.push(O.$),a.push(O._$),J=$[o[o.length-2]][o[o.length-1]],o.push(J);break;case 3:return!0}}return!0},"parse")},K=(function(){var L={EOF:1,parseError:s.__name(function(i,o){if(this.yy.parser)this.yy.parser.parseError(i,o);else throw new Error(i)},"parseError"),setInput:s.__name(function(r,i){return this.yy=i||this.yy||{},this._input=r,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s.__name(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var i=r.match(/(?:\r\n?|\n).*/g);return i?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:s.__name(function(r){var i=r.length,o=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;var l=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),o.length-1&&(this.yylineno-=o.length-1);var p=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:o?(o.length===l.length?this.yylloc.first_column:0)+l[l.length-o.length].length-o[0].length:this.yylloc.first_column-i},this.options.ranges&&(this.yylloc.range=[p[0],p[0]+this.yyleng-i]),this.yyleng=this.yytext.length,this},"unput"),more:s.__name(function(){return this._more=!0,this},"more"),reject:s.__name(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
3
+ Expecting `+U.join(", ")+", got '"+(this.terminals_[b]||b)+"'":z="Parse error on line "+(P+1)+": Unexpected "+(b==q?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(z,{text:m.match,token:this.terminals_[b]||b,line:m.yylineno,loc:G,expected:U})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+C+", token: "+b);switch(x[0]){case 1:o.push(b),p.push(m.yytext),a.push(m.yylloc),o.push(x[1]),b=null,Y=m.yyleng,u=m.yytext,P=m.yylineno,G=m.yylloc;break;case 2:if(N=this.productions_[x[1]][1],O.$=p[p.length-N],O._$={first_line:a[a.length-(N||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(N||1)].first_column,last_column:a[a.length-1].last_column},te&&(O._$.range=[a[a.length-(N||1)].range[0],a[a.length-1].range[1]]),j=this.performAction.apply(O,[u,Y,P,T.yy,x[1],p,a].concat(ee)),typeof j<"u")return j;N&&(o=o.slice(0,-1*N*2),p=p.slice(0,-1*N),a=a.slice(0,-1*N)),o.push(this.productions_[x[1]][0]),p.push(O.$),a.push(O._$),J=$[o[o.length-2]][o[o.length-1]],o.push(J);break;case 3:return!0}}return!0},"parse")},K=(function(){var L={EOF:1,parseError:s.__name(function(i,o){if(this.yy.parser)this.yy.parser.parseError(i,o);else throw new Error(i)},"parseError"),setInput:s.__name(function(r,i){return this.yy=i||this.yy||{},this._input=r,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s.__name(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var i=r.match(/(?:\r\n?|\n).*/g);return i?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:s.__name(function(r){var i=r.length,o=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;var l=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),o.length-1&&(this.yylineno-=o.length-1);var p=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:o?(o.length===l.length?this.yylloc.first_column:0)+l[l.length-o.length].length-o[0].length:this.yylloc.first_column-i},this.options.ranges&&(this.yylloc.range=[p[0],p[0]+this.yyleng-i]),this.yyleng=this.yytext.length,this},"unput"),more:s.__name(function(){return this._more=!0,this},"more"),reject:s.__name(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:s.__name(function(r){this.unput(this.match.slice(r))},"less"),pastInput:s.__name(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s.__name(function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s.__name(function(){var r=this.pastInput(),i=new Array(r.length+1).join("-");return r+this.upcomingInput()+`
5
5
  `+i+"^"},"showPosition"),test_match:s.__name(function(r,i){var o,l,p;if(this.options.backtrack_lexer&&(p={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(p.yylloc.range=this.yylloc.range.slice(0))),l=r[0].match(/(?:\r\n?|\n).*/g),l&&(this.yylineno+=l.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:l?l[l.length-1].length-l[l.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+r[0].length},this.yytext+=r[0],this.match+=r[0],this.matches=r,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(r[0].length),this.matched+=r[0],o=this.performAction.call(this,this.yy,this,i,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),o)return o;if(this._backtrack){for(var a in p)this[a]=p[a];return!1}return!1},"test_match"),next:s.__name(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var r,i,o,l;this._more||(this.yytext="",this.match="");for(var p=this._currentRules(),a=0;a<p.length;a++)if(o=this._input.match(this.rules[p[a]]),o&&(!i||o[0].length>i[0].length)){if(i=o,l=a,this.options.backtrack_lexer){if(r=this.test_match(o,p[a]),r!==!1)return r;if(this._backtrack){i=!1;continue}else return!1}else if(!this.options.flex)break}return i?(r=this.test_match(i,p[l]),r!==!1?r:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:s.__name(function(){var i=this.next();return i||this.lex()},"lex"),begin:s.__name(function(i){this.conditionStack.push(i)},"begin"),popState:s.__name(function(){var i=this.conditionStack.length-1;return i>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s.__name(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:s.__name(function(i){return i=this.conditionStack.length-1-Math.abs(i||0),i>=0?this.conditionStack[i]:"INITIAL"},"topState"),pushState:s.__name(function(i){this.begin(i)},"pushState"),stateStackSize:s.__name(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s.__name(function(i,o,l,p){switch(l){case 0:return i.getLogger().trace("Found comment",o.yytext),6;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;case 4:this.popState();break;case 5:i.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return i.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:i.getLogger().trace("end icon"),this.popState();break;case 10:return i.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return i.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return i.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return i.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;case 14:return this.begin("NODE"),19;case 15:return this.begin("NODE"),19;case 16:return this.begin("NODE"),19;case 17:return this.begin("NODE"),19;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 23:this.popState();break;case 24:i.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return i.getLogger().trace("description:",o.yytext),"NODE_DESCR";case 26:this.popState();break;case 27:return this.popState(),i.getLogger().trace("node end ))"),"NODE_DEND";case 28:return this.popState(),i.getLogger().trace("node end )"),"NODE_DEND";case 29:return this.popState(),i.getLogger().trace("node end ...",o.yytext),"NODE_DEND";case 30:return this.popState(),i.getLogger().trace("node end (("),"NODE_DEND";case 31:return this.popState(),i.getLogger().trace("node end (-"),"NODE_DEND";case 32:return this.popState(),i.getLogger().trace("node end (-"),"NODE_DEND";case 33:return this.popState(),i.getLogger().trace("node end (("),"NODE_DEND";case 34:return this.popState(),i.getLogger().trace("node end (("),"NODE_DEND";case 35:return i.getLogger().trace("Long description:",o.yytext),20;case 36:return i.getLogger().trace("Long description:",o.yytext),20}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}};return L})();V.lexer=K;function B(){this.yy={}}return s.__name(B,"Parser"),B.prototype=V,V.Parser=B,new B})();z.parser=z;var he=z,de=12,D={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},I,ge=(I=class{constructor(){this.nodes=[],this.count=0,this.elements={},this.getLogger=this.getLogger.bind(this),this.nodeType=D,this.clear(),this.getType=this.getType.bind(this),this.getElementById=this.getElementById.bind(this),this.getParent=this.getParent.bind(this),this.getMindmap=this.getMindmap.bind(this),this.addNode=this.addNode.bind(this),this.decorateNode=this.decorateNode.bind(this)}clear(){this.nodes=[],this.count=0,this.elements={},this.baseLevel=void 0}getParent(e){for(let c=this.nodes.length-1;c>=0;c--)if(this.nodes[c].level<e)return this.nodes[c];return null}getMindmap(){return this.nodes.length>0?this.nodes[0]:null}addNode(e,c,h,n){s.log.info("addNode",e,c,h,n);let d=!1;this.nodes.length===0?(this.baseLevel=e,e=0,d=!0):this.baseLevel!==void 0&&(e=e-this.baseLevel,d=!1);const f=s.getConfig2();let y=f.mindmap?.padding??s.defaultConfig_default.mindmap.padding;switch(n){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:y*=2;break}const _={id:this.count++,nodeId:s.sanitizeText(c,f),level:e,descr:s.sanitizeText(h,f),type:n,children:[],width:f.mindmap?.maxNodeWidth??s.defaultConfig_default.mindmap.maxNodeWidth,padding:y,isRoot:d},k=this.getParent(e);if(k)k.children.push(_),this.nodes.push(_);else if(d)this.nodes.push(_);else throw new Error(`There can be only one root. No parent could be found for ("${_.descr}")`)}getType(e,c){switch(s.log.debug("In get type",e,c),e){case"[":return this.nodeType.RECT;case"(":return c===")"?this.nodeType.ROUNDED_RECT:this.nodeType.CLOUD;case"((":return this.nodeType.CIRCLE;case")":return this.nodeType.CLOUD;case"))":return this.nodeType.BANG;case"{{":return this.nodeType.HEXAGON;default:return this.nodeType.DEFAULT}}setElementForId(e,c){this.elements[e]=c}getElementById(e){return this.elements[e]}decorateNode(e){if(!e)return;const c=s.getConfig2(),h=this.nodes[this.nodes.length-1];e.icon&&(h.icon=s.sanitizeText(e.icon,c)),e.class&&(h.class=s.sanitizeText(e.class,c))}type2Str(e){switch(e){case this.nodeType.DEFAULT:return"no-border";case this.nodeType.RECT:return"rect";case this.nodeType.ROUNDED_RECT:return"rounded-rect";case this.nodeType.CIRCLE:return"circle";case this.nodeType.CLOUD:return"cloud";case this.nodeType.BANG:return"bang";case this.nodeType.HEXAGON:return"hexgon";default:return"no-border"}}assignSections(e,c){if(e.level===0?e.section=void 0:e.section=c,e.children)for(const[h,n]of e.children.entries()){const d=e.level===0?h%(de-1):c;this.assignSections(n,d)}}flattenNodes(e,c){const h=s.getConfig2(),n=["mindmap-node"];e.isRoot===!0?n.push("section-root","section--1"):e.section!==void 0&&n.push(`section-${e.section}`),e.class&&n.push(e.class);const d=n.join(" "),f=s.__name(_=>{const v=(h.theme?.toLowerCase()??"").includes("redux");switch(_){case D.CIRCLE:return"mindmapCircle";case D.RECT:return"rect";case D.ROUNDED_RECT:return"rounded";case D.CLOUD:return"cloud";case D.BANG:return"bang";case D.HEXAGON:return"hexagon";case D.DEFAULT:return v?"rounded":"defaultMindmapNode";case D.NO_BORDER:default:return"rect"}},"getShapeFromType"),y={id:e.id.toString(),domId:"node_"+e.id.toString(),label:e.descr,labelType:"markdown",isGroup:!1,shape:f(e.type),width:e.width,height:e.height??0,padding:e.padding,cssClasses:d,cssStyles:[],look:h.look,icon:e.icon,x:e.x,y:e.y,level:e.level,nodeId:e.nodeId,type:e.type,section:e.section};if(c.push(y),e.children)for(const _ of e.children)this.flattenNodes(_,c)}generateEdges(e,c){if(!e.children)return;const h=s.getConfig2();for(const n of e.children){let d="edge";n.section!==void 0&&(d+=` section-edge-${n.section}`);const f=e.level+1;d+=` edge-depth-${f}`;const y={id:`edge_${e.id}_${n.id}`,start:e.id.toString(),end:n.id.toString(),type:"normal",curve:"basis",thickness:"normal",look:h.look,classes:d,depth:e.level,section:n.section};c.push(y),this.generateEdges(n,c)}}getData(){const e=this.getMindmap(),c=s.getConfig2(),n=s.getUserDefinedConfig().layout!==void 0,d=c;if(n||(d.layout="cose-bilkent"),!e)return{nodes:[],edges:[],config:d};s.log.debug("getData: mindmapRoot",e,c),this.assignSections(e);const f=[],y=[];this.flattenNodes(e,f),this.generateEdges(e,y),s.log.debug(`getData: processed ${f.length} nodes and ${y.length} edges`);const _=new Map;for(const k of f)_.set(k.id,{shape:k.shape,width:k.width,height:k.height,padding:k.padding});return{nodes:f,edges:y,config:d,rootNode:e,markers:["point"],direction:"TB",nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(_),type:"mindmap",diagramId:"mindmap-"+ce()}}getLogger(){return s.log}},s.__name(I,"MindmapDB"),I),ue=s.__name(async(t,e,c,h)=>{s.log.debug(`Rendering mindmap diagram
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:s.__name(function(){var i=this.next();return i||this.lex()},"lex"),begin:s.__name(function(i){this.conditionStack.push(i)},"begin"),popState:s.__name(function(){var i=this.conditionStack.length-1;return i>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s.__name(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:s.__name(function(i){return i=this.conditionStack.length-1-Math.abs(i||0),i>=0?this.conditionStack[i]:"INITIAL"},"topState"),pushState:s.__name(function(i){this.begin(i)},"pushState"),stateStackSize:s.__name(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s.__name(function(i,o,l,p){switch(l){case 0:return i.getLogger().trace("Found comment",o.yytext),6;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;case 4:this.popState();break;case 5:i.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return i.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:i.getLogger().trace("end icon"),this.popState();break;case 10:return i.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return i.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return i.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return i.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;case 14:return this.begin("NODE"),19;case 15:return this.begin("NODE"),19;case 16:return this.begin("NODE"),19;case 17:return this.begin("NODE"),19;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 23:this.popState();break;case 24:i.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return i.getLogger().trace("description:",o.yytext),"NODE_DESCR";case 26:this.popState();break;case 27:return this.popState(),i.getLogger().trace("node end ))"),"NODE_DEND";case 28:return this.popState(),i.getLogger().trace("node end )"),"NODE_DEND";case 29:return this.popState(),i.getLogger().trace("node end ...",o.yytext),"NODE_DEND";case 30:return this.popState(),i.getLogger().trace("node end (("),"NODE_DEND";case 31:return this.popState(),i.getLogger().trace("node end (-"),"NODE_DEND";case 32:return this.popState(),i.getLogger().trace("node end (-"),"NODE_DEND";case 33:return this.popState(),i.getLogger().trace("node end (("),"NODE_DEND";case 34:return this.popState(),i.getLogger().trace("node end (("),"NODE_DEND";case 35:return i.getLogger().trace("Long description:",o.yytext),20;case 36:return i.getLogger().trace("Long description:",o.yytext),20}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}};return L})();V.lexer=K;function B(){this.yy={}}return s.__name(B,"Parser"),B.prototype=V,V.Parser=B,new B})();H.parser=H;var he=H,de=12,D={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},I,ge=(I=class{constructor(){this.nodes=[],this.count=0,this.elements={},this.getLogger=this.getLogger.bind(this),this.nodeType=D,this.clear(),this.getType=this.getType.bind(this),this.getElementById=this.getElementById.bind(this),this.getParent=this.getParent.bind(this),this.getMindmap=this.getMindmap.bind(this),this.addNode=this.addNode.bind(this),this.decorateNode=this.decorateNode.bind(this)}clear(){this.nodes=[],this.count=0,this.elements={},this.baseLevel=void 0}getParent(e){for(let c=this.nodes.length-1;c>=0;c--)if(this.nodes[c].level<e)return this.nodes[c];return null}getMindmap(){return this.nodes.length>0?this.nodes[0]:null}addNode(e,c,h,n){s.log.info("addNode",e,c,h,n);let d=!1;this.nodes.length===0?(this.baseLevel=e,e=0,d=!0):this.baseLevel!==void 0&&(e=e-this.baseLevel,d=!1);const f=s.getConfig2();let y=f.mindmap?.padding??s.defaultConfig_default.mindmap.padding;switch(n){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:y*=2;break}const _={id:this.count++,nodeId:s.sanitizeText(c,f),level:e,descr:s.sanitizeText(h,f),type:n,children:[],width:f.mindmap?.maxNodeWidth??s.defaultConfig_default.mindmap.maxNodeWidth,padding:y,isRoot:d},k=this.getParent(e);if(k)k.children.push(_),this.nodes.push(_);else if(d)this.nodes.push(_);else throw new Error(`There can be only one root. No parent could be found for ("${_.descr}")`)}getType(e,c){switch(s.log.debug("In get type",e,c),e){case"[":return this.nodeType.RECT;case"(":return c===")"?this.nodeType.ROUNDED_RECT:this.nodeType.CLOUD;case"((":return this.nodeType.CIRCLE;case")":return this.nodeType.CLOUD;case"))":return this.nodeType.BANG;case"{{":return this.nodeType.HEXAGON;default:return this.nodeType.DEFAULT}}setElementForId(e,c){this.elements[e]=c}getElementById(e){return this.elements[e]}decorateNode(e){if(!e)return;const c=s.getConfig2(),h=this.nodes[this.nodes.length-1];e.icon&&(h.icon=s.sanitizeText(e.icon,c)),e.class&&(h.class=s.sanitizeText(e.class,c))}type2Str(e){switch(e){case this.nodeType.DEFAULT:return"no-border";case this.nodeType.RECT:return"rect";case this.nodeType.ROUNDED_RECT:return"rounded-rect";case this.nodeType.CIRCLE:return"circle";case this.nodeType.CLOUD:return"cloud";case this.nodeType.BANG:return"bang";case this.nodeType.HEXAGON:return"hexgon";default:return"no-border"}}assignSections(e,c){if(e.level===0?e.section=void 0:e.section=c,e.children)for(const[h,n]of e.children.entries()){const d=e.level===0?h%(de-1):c;this.assignSections(n,d)}}flattenNodes(e,c){const h=s.getConfig2(),n=["mindmap-node"];e.isRoot===!0?n.push("section-root","section--1"):e.section!==void 0&&n.push(`section-${e.section}`),e.class&&n.push(e.class);const d=n.join(" "),f=s.__name(_=>{const v=(h.theme?.toLowerCase()??"").includes("redux");switch(_){case D.CIRCLE:return"mindmapCircle";case D.RECT:return"rect";case D.ROUNDED_RECT:return"rounded";case D.CLOUD:return"cloud";case D.BANG:return"bang";case D.HEXAGON:return"hexagon";case D.DEFAULT:return v?"rounded":"defaultMindmapNode";case D.NO_BORDER:default:return"rect"}},"getShapeFromType"),y={id:e.id.toString(),domId:"node_"+e.id.toString(),label:e.descr,labelType:"markdown",isGroup:!1,shape:f(e.type),width:e.width,height:e.height??0,padding:e.padding,cssClasses:d,cssStyles:[],look:h.look,icon:e.icon,x:e.x,y:e.y,level:e.level,nodeId:e.nodeId,type:e.type,section:e.section};if(c.push(y),e.children)for(const _ of e.children)this.flattenNodes(_,c)}generateEdges(e,c){if(!e.children)return;const h=s.getConfig2();for(const n of e.children){let d="edge";n.section!==void 0&&(d+=` section-edge-${n.section}`);const f=e.level+1;d+=` edge-depth-${f}`;const y={id:`edge_${e.id}_${n.id}`,start:e.id.toString(),end:n.id.toString(),type:"normal",curve:"basis",thickness:"normal",look:h.look,classes:d,depth:e.level,section:n.section};c.push(y),this.generateEdges(n,c)}}getData(){const e=this.getMindmap(),c=s.getConfig2(),n=s.getUserDefinedConfig().layout!==void 0,d=c;if(n||(d.layout="cose-bilkent"),!e)return{nodes:[],edges:[],config:d};s.log.debug("getData: mindmapRoot",e,c),this.assignSections(e);const f=[],y=[];this.flattenNodes(e,f),this.generateEdges(e,y),s.log.debug(`getData: processed ${f.length} nodes and ${y.length} edges`);const _=new Map;for(const k of f)_.set(k.id,{shape:k.shape,width:k.width,height:k.height,padding:k.padding});return{nodes:f,edges:y,config:d,rootNode:e,markers:["point"],direction:"TB",nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(_),type:"mindmap",diagramId:"mindmap-"+ce()}}getLogger(){return s.log}},s.__name(I,"MindmapDB"),I),ue=s.__name(async(t,e,c,h)=>{s.log.debug(`Rendering mindmap diagram
7
7
  `+t);const n=h.db,d=n.getData(),f=ie.getDiagramElement(e,d.config.securityLevel);if(d.type=h.type,d.layoutAlgorithm=s.getRegisteredLayoutAlgorithm(d.config.layout,{fallback:"cose-bilkent"}),d.diagramId=e,!n.getMindmap())return;d.nodes.forEach(g=>{g.shape==="rounded"?(g.radius=15,g.taper=15,g.stroke="none",g.width=0,g.padding=15):g.shape==="circle"?g.padding=10:g.shape==="rect"?(g.width=0,g.padding=10):g.shape==="hexagon"&&(g.width=0,g.height=0)}),await s.render(d,f);const{themeVariables:_}=s.getConfig(),{useGradient:k,gradientStart:v,gradientStop:w}=_;if(k&&v&&w){const g=f.attr("id"),R=f.append("defs").append("linearGradient").attr("id",`${g}-gradient`).attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");R.append("stop").attr("offset","0%").attr("stop-color",v).attr("stop-opacity",1),R.append("stop").attr("offset","100%").attr("stop-color",w).attr("stop-opacity",1)}se.setupViewPortForSVG(f,d.config.mindmap?.padding??s.defaultConfig_default.mindmap.padding,"mindmapDiagram",d.config.mindmap?.useMaxWidth??s.defaultConfig_default.mindmap.useMaxWidth)},"draw"),pe={draw:ue},fe=s.__name(t=>{const{theme:e,look:c}=t;let h="";for(let n=0;n<t.THEME_COLOR_LIMIT;n++)t["lineColor"+n]=t["lineColor"+n]||t["cScaleInv"+n],s.isDark(t["lineColor"+n])?t["lineColor"+n]=s.lighten(t["lineColor"+n],20):t["lineColor"+n]=s.darken(t["lineColor"+n],20);for(let n=0;n<t.THEME_COLOR_LIMIT;n++){const d=""+(c==="neo"?Math.max(10-(n-1)*2,2):17-3*n);h+=`
8
8
  .section-${n-1} rect, .section-${n-1} path, .section-${n-1} circle, .section-${n-1} polygon, .section-${n-1} path {
9
9
  fill: ${t["cScale"+n]};