dominds 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (273) hide show
  1. package/LICENSE +157 -0
  2. package/README.md +250 -0
  3. package/README.zh.md +161 -0
  4. package/dist/access-control.js +253 -0
  5. package/dist/cli/create.js +263 -0
  6. package/dist/cli/read.js +84 -0
  7. package/dist/cli/tui.js +199 -0
  8. package/dist/cli/webui.js +169 -0
  9. package/dist/cli.js +227 -0
  10. package/dist/dialog-factory.js +53 -0
  11. package/dist/dialog-global-registry.js +68 -0
  12. package/dist/dialog-instance-registry.js +78 -0
  13. package/dist/dialog-run-state.js +198 -0
  14. package/dist/dialog.js +1024 -0
  15. package/dist/evt-registry.js +103 -0
  16. package/dist/index.js +8 -0
  17. package/dist/llm/client.js +69 -0
  18. package/dist/llm/defaults.yaml +386 -0
  19. package/dist/llm/driver.js +3214 -0
  20. package/dist/llm/gen/anthropic.js +611 -0
  21. package/dist/llm/gen/codex.js +375 -0
  22. package/dist/llm/gen/mock.js +326 -0
  23. package/dist/llm/gen/openai.js +470 -0
  24. package/dist/llm/gen/registry.js +26 -0
  25. package/dist/llm/gen.js +2 -0
  26. package/dist/llm/tools-projection.js +37 -0
  27. package/dist/log.js +228 -0
  28. package/dist/mcp/config.js +230 -0
  29. package/dist/mcp/sdk-client.js +129 -0
  30. package/dist/mcp/server-runtime.js +57 -0
  31. package/dist/mcp/stdio-client.js +280 -0
  32. package/dist/mcp/supervisor.js +979 -0
  33. package/dist/mcp/tool-names.js +109 -0
  34. package/dist/minds/builtin/cmdr/persona.md +3 -0
  35. package/dist/minds/builtin/dijiang/knowledge.md +287 -0
  36. package/dist/minds/builtin/dijiang/persona.md +7 -0
  37. package/dist/minds/builtin/fuxi/persona.en.md +59 -0
  38. package/dist/minds/builtin/fuxi/persona.zh.md +49 -0
  39. package/dist/minds/builtin/pangu/persona.en.md +78 -0
  40. package/dist/minds/builtin/pangu/persona.zh.md +71 -0
  41. package/dist/minds/load.js +617 -0
  42. package/dist/minds/minds-i18n.js +131 -0
  43. package/dist/minds/system-prompt.js +281 -0
  44. package/dist/persistence.js +3128 -0
  45. package/dist/problems.js +109 -0
  46. package/dist/server/api-routes.js +1031 -0
  47. package/dist/server/auth.js +180 -0
  48. package/dist/server/mime-types.js +32 -0
  49. package/dist/server/prompts-routes.js +543 -0
  50. package/dist/server/server-core.js +235 -0
  51. package/dist/server/setup-routes.js +697 -0
  52. package/dist/server/static-server.js +132 -0
  53. package/dist/server/websocket-handler.js +1011 -0
  54. package/dist/server.js +164 -0
  55. package/dist/shared/async-fifo-mutex.js +36 -0
  56. package/dist/shared/diligence.js +20 -0
  57. package/dist/shared/dotenv.js +144 -0
  58. package/dist/shared/evt.js +195 -0
  59. package/dist/shared/i18n/driver-messages.js +267 -0
  60. package/dist/shared/i18n/text.js +9 -0
  61. package/dist/shared/i18n/tool-result-messages.js +51 -0
  62. package/dist/shared/rtws-cli.js +73 -0
  63. package/dist/shared/runtime-language.js +47 -0
  64. package/dist/shared/team-mgmt-manual.js +116 -0
  65. package/dist/shared/types/context-health.js +2 -0
  66. package/dist/shared/types/dialog.js +11 -0
  67. package/dist/shared/types/i18n.js +2 -0
  68. package/dist/shared/types/index.js +26 -0
  69. package/dist/shared/types/language.js +40 -0
  70. package/dist/shared/types/problems.js +2 -0
  71. package/dist/shared/types/prompts.js +2 -0
  72. package/dist/shared/types/q4h.js +7 -0
  73. package/dist/shared/types/run-state.js +8 -0
  74. package/dist/shared/types/setup.js +2 -0
  75. package/dist/shared/types/storage.js +10 -0
  76. package/dist/shared/types/tellask.js +8 -0
  77. package/dist/shared/types/tools-registry.js +2 -0
  78. package/dist/shared/types/wire.js +12 -0
  79. package/dist/shared/utils/fmt.js +9 -0
  80. package/dist/shared/utils/html.js +20 -0
  81. package/dist/shared/utils/id.js +18 -0
  82. package/dist/shared/utils/inter-dialog-format.js +101 -0
  83. package/dist/shared/utils/time.js +13 -0
  84. package/dist/static/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
  85. package/dist/static/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
  86. package/dist/static/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
  87. package/dist/static/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
  88. package/dist/static/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
  89. package/dist/static/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
  90. package/dist/static/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
  91. package/dist/static/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
  92. package/dist/static/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
  93. package/dist/static/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
  94. package/dist/static/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
  95. package/dist/static/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
  96. package/dist/static/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
  97. package/dist/static/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
  98. package/dist/static/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
  99. package/dist/static/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
  100. package/dist/static/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
  101. package/dist/static/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
  102. package/dist/static/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
  103. package/dist/static/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
  104. package/dist/static/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
  105. package/dist/static/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
  106. package/dist/static/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
  107. package/dist/static/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
  108. package/dist/static/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
  109. package/dist/static/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
  110. package/dist/static/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
  111. package/dist/static/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
  112. package/dist/static/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
  113. package/dist/static/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
  114. package/dist/static/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
  115. package/dist/static/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
  116. package/dist/static/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
  117. package/dist/static/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
  118. package/dist/static/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
  119. package/dist/static/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
  120. package/dist/static/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
  121. package/dist/static/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
  122. package/dist/static/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
  123. package/dist/static/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
  124. package/dist/static/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
  125. package/dist/static/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
  126. package/dist/static/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
  127. package/dist/static/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
  128. package/dist/static/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
  129. package/dist/static/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
  130. package/dist/static/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
  131. package/dist/static/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
  132. package/dist/static/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
  133. package/dist/static/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
  134. package/dist/static/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
  135. package/dist/static/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
  136. package/dist/static/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
  137. package/dist/static/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
  138. package/dist/static/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
  139. package/dist/static/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
  140. package/dist/static/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
  141. package/dist/static/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
  142. package/dist/static/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
  143. package/dist/static/assets/_baseUniq-Crfl3d5Y.js +661 -0
  144. package/dist/static/assets/_baseUniq-Crfl3d5Y.js.map +1 -0
  145. package/dist/static/assets/arc-CbA_x9GD.js +132 -0
  146. package/dist/static/assets/arc-CbA_x9GD.js.map +1 -0
  147. package/dist/static/assets/architectureDiagram-VXUJARFQ-lcFS8ZQJ.js +8685 -0
  148. package/dist/static/assets/architectureDiagram-VXUJARFQ-lcFS8ZQJ.js.map +1 -0
  149. package/dist/static/assets/blockDiagram-VD42YOAC-B3Q36qRc.js +3608 -0
  150. package/dist/static/assets/blockDiagram-VD42YOAC-B3Q36qRc.js.map +1 -0
  151. package/dist/static/assets/c4Diagram-YG6GDRKO-Mt-aq3VH.js +2482 -0
  152. package/dist/static/assets/c4Diagram-YG6GDRKO-Mt-aq3VH.js.map +1 -0
  153. package/dist/static/assets/channel-BVr1Yke-.js +8 -0
  154. package/dist/static/assets/channel-BVr1Yke-.js.map +1 -0
  155. package/dist/static/assets/chunk-4BX2VUAB-qCIn5Iic.js +17 -0
  156. package/dist/static/assets/chunk-4BX2VUAB-qCIn5Iic.js.map +1 -0
  157. package/dist/static/assets/chunk-55IACEB6-q172NeCV.js +14 -0
  158. package/dist/static/assets/chunk-55IACEB6-q172NeCV.js.map +1 -0
  159. package/dist/static/assets/chunk-B4BG7PRW-CMJmtYzq.js +1827 -0
  160. package/dist/static/assets/chunk-B4BG7PRW-CMJmtYzq.js.map +1 -0
  161. package/dist/static/assets/chunk-DI55MBZ5-DiuwwZPL.js +1916 -0
  162. package/dist/static/assets/chunk-DI55MBZ5-DiuwwZPL.js.map +1 -0
  163. package/dist/static/assets/chunk-FMBD7UC4-06sqZTTn.js +20 -0
  164. package/dist/static/assets/chunk-FMBD7UC4-06sqZTTn.js.map +1 -0
  165. package/dist/static/assets/chunk-QN33PNHL-CnpBNkpP.js +25 -0
  166. package/dist/static/assets/chunk-QN33PNHL-CnpBNkpP.js.map +1 -0
  167. package/dist/static/assets/chunk-QZHKN3VN-CNgjMR-e.js +18 -0
  168. package/dist/static/assets/chunk-QZHKN3VN-CNgjMR-e.js.map +1 -0
  169. package/dist/static/assets/chunk-TZMSLE5B-BxtzW6--.js +109 -0
  170. package/dist/static/assets/chunk-TZMSLE5B-BxtzW6--.js.map +1 -0
  171. package/dist/static/assets/classDiagram-2ON5EDUG-29huvmn-.js +23 -0
  172. package/dist/static/assets/classDiagram-2ON5EDUG-29huvmn-.js.map +1 -0
  173. package/dist/static/assets/classDiagram-v2-WZHVMYZB-29huvmn-.js +23 -0
  174. package/dist/static/assets/classDiagram-v2-WZHVMYZB-29huvmn-.js.map +1 -0
  175. package/dist/static/assets/clone-D2OgLSSn.js +9 -0
  176. package/dist/static/assets/clone-D2OgLSSn.js.map +1 -0
  177. package/dist/static/assets/cose-bilkent-S5V4N54A-BNegDCxl.js +4943 -0
  178. package/dist/static/assets/cose-bilkent-S5V4N54A-BNegDCxl.js.map +1 -0
  179. package/dist/static/assets/cytoscape.esm-Bm8DJGmZ.js +30240 -0
  180. package/dist/static/assets/cytoscape.esm-Bm8DJGmZ.js.map +1 -0
  181. package/dist/static/assets/dagre-6UL2VRFP-f1XrTRSn.js +695 -0
  182. package/dist/static/assets/dagre-6UL2VRFP-f1XrTRSn.js.map +1 -0
  183. package/dist/static/assets/defaultLocale-DVr69WTU.js +207 -0
  184. package/dist/static/assets/defaultLocale-DVr69WTU.js.map +1 -0
  185. package/dist/static/assets/diagram-PSM6KHXK-8w1WbeDi.js +849 -0
  186. package/dist/static/assets/diagram-PSM6KHXK-8w1WbeDi.js.map +1 -0
  187. package/dist/static/assets/diagram-QEK2KX5R-CF4wtMmR.js +303 -0
  188. package/dist/static/assets/diagram-QEK2KX5R-CF4wtMmR.js.map +1 -0
  189. package/dist/static/assets/diagram-S2PKOQOG-8p3Avgn2.js +213 -0
  190. package/dist/static/assets/diagram-S2PKOQOG-8p3Avgn2.js.map +1 -0
  191. package/dist/static/assets/erDiagram-Q2GNP2WA-BMKLxlM9.js +1159 -0
  192. package/dist/static/assets/erDiagram-Q2GNP2WA-BMKLxlM9.js.map +1 -0
  193. package/dist/static/assets/favicon-Cmg5RbCj.svg +8 -0
  194. package/dist/static/assets/flowDiagram-NV44I4VS-CgEuPNK2.js +2332 -0
  195. package/dist/static/assets/flowDiagram-NV44I4VS-CgEuPNK2.js.map +1 -0
  196. package/dist/static/assets/ganttDiagram-JELNMOA3-bJkDCf-9.js +3681 -0
  197. package/dist/static/assets/ganttDiagram-JELNMOA3-bJkDCf-9.js.map +1 -0
  198. package/dist/static/assets/gitGraphDiagram-NY62KEGX-4QE9kesp.js +1206 -0
  199. package/dist/static/assets/gitGraphDiagram-NY62KEGX-4QE9kesp.js.map +1 -0
  200. package/dist/static/assets/graph-CS0Pmm7c.js +597 -0
  201. package/dist/static/assets/graph-CS0Pmm7c.js.map +1 -0
  202. package/dist/static/assets/index-BS6HnGzC.js +112303 -0
  203. package/dist/static/assets/index-BS6HnGzC.js.map +1 -0
  204. package/dist/static/assets/index-DaIsSzC_.css +483 -0
  205. package/dist/static/assets/infoDiagram-WHAUD3N6-ypBcKfUs.js +34 -0
  206. package/dist/static/assets/infoDiagram-WHAUD3N6-ypBcKfUs.js.map +1 -0
  207. package/dist/static/assets/init-ZxktEp_H.js +17 -0
  208. package/dist/static/assets/init-ZxktEp_H.js.map +1 -0
  209. package/dist/static/assets/journeyDiagram-XKPGCS4Q-QnrxDowJ.js +1255 -0
  210. package/dist/static/assets/journeyDiagram-XKPGCS4Q-QnrxDowJ.js.map +1 -0
  211. package/dist/static/assets/kanban-definition-3W4ZIXB7-CfvEc4z5.js +1048 -0
  212. package/dist/static/assets/kanban-definition-3W4ZIXB7-CfvEc4z5.js.map +1 -0
  213. package/dist/static/assets/layout-8TGxpm23.js +2218 -0
  214. package/dist/static/assets/layout-8TGxpm23.js.map +1 -0
  215. package/dist/static/assets/linear-BATBPQQv.js +341 -0
  216. package/dist/static/assets/linear-BATBPQQv.js.map +1 -0
  217. package/dist/static/assets/min-B3oVH3AC.js +42 -0
  218. package/dist/static/assets/min-B3oVH3AC.js.map +1 -0
  219. package/dist/static/assets/mindmap-definition-VGOIOE7T-L7VLwwF8.js +1127 -0
  220. package/dist/static/assets/mindmap-definition-VGOIOE7T-L7VLwwF8.js.map +1 -0
  221. package/dist/static/assets/ordinal-CxptdPJm.js +77 -0
  222. package/dist/static/assets/ordinal-CxptdPJm.js.map +1 -0
  223. package/dist/static/assets/pieDiagram-ADFJNKIX-CFW3zIhM.js +241 -0
  224. package/dist/static/assets/pieDiagram-ADFJNKIX-CFW3zIhM.js.map +1 -0
  225. package/dist/static/assets/quadrantDiagram-AYHSOK5B-B7ssen3E.js +1338 -0
  226. package/dist/static/assets/quadrantDiagram-AYHSOK5B-B7ssen3E.js.map +1 -0
  227. package/dist/static/assets/requirementDiagram-UZGBJVZJ-D0v5BArv.js +1162 -0
  228. package/dist/static/assets/requirementDiagram-UZGBJVZJ-D0v5BArv.js.map +1 -0
  229. package/dist/static/assets/sankeyDiagram-TZEHDZUN-B7slncJe.js +1195 -0
  230. package/dist/static/assets/sankeyDiagram-TZEHDZUN-B7slncJe.js.map +1 -0
  231. package/dist/static/assets/sequenceDiagram-WL72ISMW-oXU2lRh_.js +3875 -0
  232. package/dist/static/assets/sequenceDiagram-WL72ISMW-oXU2lRh_.js.map +1 -0
  233. package/dist/static/assets/stateDiagram-FKZM4ZOC-CFYsEd0x.js +452 -0
  234. package/dist/static/assets/stateDiagram-FKZM4ZOC-CFYsEd0x.js.map +1 -0
  235. package/dist/static/assets/stateDiagram-v2-4FDKWEC3-C0UWaNA7.js +22 -0
  236. package/dist/static/assets/stateDiagram-v2-4FDKWEC3-C0UWaNA7.js.map +1 -0
  237. package/dist/static/assets/timeline-definition-IT6M3QCI-C3KODUrh.js +1223 -0
  238. package/dist/static/assets/timeline-definition-IT6M3QCI-C3KODUrh.js.map +1 -0
  239. package/dist/static/assets/treemap-KMMF4GRG-DAGDLhj2.js +18753 -0
  240. package/dist/static/assets/treemap-KMMF4GRG-DAGDLhj2.js.map +1 -0
  241. package/dist/static/assets/xychartDiagram-PRI3JC2R-C0J9iwTO.js +1888 -0
  242. package/dist/static/assets/xychartDiagram-PRI3JC2R-C0J9iwTO.js.map +1 -0
  243. package/dist/static/index.html +71 -0
  244. package/dist/static/testing/dom-observation-utils.js +425 -0
  245. package/dist/static/testing/e2e-test-helper.js +3119 -0
  246. package/dist/team.js +1160 -0
  247. package/dist/tellask.js +431 -0
  248. package/dist/tool.js +150 -0
  249. package/dist/tools/apply-patch.js +542 -0
  250. package/dist/tools/builtins.js +196 -0
  251. package/dist/tools/context-health.js +177 -0
  252. package/dist/tools/ctrl.js +478 -0
  253. package/dist/tools/diag.js +583 -0
  254. package/dist/tools/env.js +184 -0
  255. package/dist/tools/fs.js +818 -0
  256. package/dist/tools/mcp.js +138 -0
  257. package/dist/tools/mem.js +349 -0
  258. package/dist/tools/os.js +751 -0
  259. package/dist/tools/prompts/team_mgmt.en.md +70 -0
  260. package/dist/tools/prompts/team_mgmt.zh.md +70 -0
  261. package/dist/tools/prompts/ws_mod.en.md +86 -0
  262. package/dist/tools/prompts/ws_mod.zh.md +87 -0
  263. package/dist/tools/registry-snapshot.js +31 -0
  264. package/dist/tools/registry.js +121 -0
  265. package/dist/tools/ripgrep.js +678 -0
  266. package/dist/tools/team-mgmt.js +3300 -0
  267. package/dist/tools/txt.js +3178 -0
  268. package/dist/utils/id.js +72 -0
  269. package/dist/utils/task-doc.js +236 -0
  270. package/dist/utils/task-package.js +522 -0
  271. package/dist/utils/taskdoc-search.js +280 -0
  272. package/dist/utils/taskdoc.js +400 -0
  273. package/package.json +69 -0
@@ -0,0 +1,1827 @@
1
+ var _a, _b;
2
+ import { g as getIconStyles } from "./chunk-FMBD7UC4-06sqZTTn.js";
3
+ import { g as getDiagramElement } from "./chunk-55IACEB6-q172NeCV.js";
4
+ import { s as setupViewPortForSVG } from "./chunk-QN33PNHL-CnpBNkpP.js";
5
+ import { _ as __name, l as log, c as getConfig2, o as getRegisteredLayoutAlgorithm, r as render, u as utils_default, d as select, b as setAccTitle, a as getAccTitle, s as setAccDescription, g as getAccDescription, p as setDiagramTitle, q as getDiagramTitle, k as common_default, y as clear, x as getEdgeId, i as sanitizeText, Q as parseGenericTypes } from "./index-BS6HnGzC.js";
6
+ var parser = (function() {
7
+ var o = /* @__PURE__ */ __name(function(k, v, o2, l) {
8
+ for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) ;
9
+ return o2;
10
+ }, "o"), $V0 = [1, 18], $V1 = [1, 19], $V2 = [1, 20], $V3 = [1, 41], $V4 = [1, 42], $V5 = [1, 26], $V6 = [1, 24], $V7 = [1, 25], $V8 = [1, 32], $V9 = [1, 33], $Va = [1, 34], $Vb = [1, 45], $Vc = [1, 35], $Vd = [1, 36], $Ve = [1, 37], $Vf = [1, 38], $Vg = [1, 27], $Vh = [1, 28], $Vi = [1, 29], $Vj = [1, 30], $Vk = [1, 31], $Vl = [1, 44], $Vm = [1, 46], $Vn = [1, 43], $Vo = [1, 47], $Vp = [1, 9], $Vq = [1, 8, 9], $Vr = [1, 58], $Vs = [1, 59], $Vt = [1, 60], $Vu = [1, 61], $Vv = [1, 62], $Vw = [1, 63], $Vx = [1, 64], $Vy = [1, 8, 9, 41], $Vz = [1, 76], $VA = [1, 8, 9, 12, 13, 22, 39, 41, 44, 68, 69, 70, 71, 72, 73, 74, 79, 81], $VB = [1, 8, 9, 12, 13, 18, 20, 22, 39, 41, 44, 50, 60, 68, 69, 70, 71, 72, 73, 74, 79, 81, 86, 100, 102, 103], $VC = [13, 60, 86, 100, 102, 103], $VD = [13, 60, 73, 74, 86, 100, 102, 103], $VE = [13, 60, 68, 69, 70, 71, 72, 86, 100, 102, 103], $VF = [1, 100], $VG = [1, 117], $VH = [1, 113], $VI = [1, 109], $VJ = [1, 115], $VK = [1, 110], $VL = [1, 111], $VM = [1, 112], $VN = [1, 114], $VO = [1, 116], $VP = [22, 48, 60, 61, 82, 86, 87, 88, 89, 90], $VQ = [1, 8, 9, 39, 41, 44], $VR = [1, 8, 9, 22], $VS = [1, 145], $VT = [1, 8, 9, 61], $VU = [1, 8, 9, 22, 48, 60, 61, 82, 86, 87, 88, 89, 90];
11
+ var parser2 = {
12
+ trace: /* @__PURE__ */ __name(function trace() {
13
+ }, "trace"),
14
+ yy: {},
15
+ symbols_: { "error": 2, "start": 3, "mermaidDoc": 4, "statements": 5, "graphConfig": 6, "CLASS_DIAGRAM": 7, "NEWLINE": 8, "EOF": 9, "statement": 10, "classLabel": 11, "SQS": 12, "STR": 13, "SQE": 14, "namespaceName": 15, "alphaNumToken": 16, "classLiteralName": 17, "DOT": 18, "className": 19, "GENERICTYPE": 20, "relationStatement": 21, "LABEL": 22, "namespaceStatement": 23, "classStatement": 24, "memberStatement": 25, "annotationStatement": 26, "clickStatement": 27, "styleStatement": 28, "cssClassStatement": 29, "noteStatement": 30, "classDefStatement": 31, "direction": 32, "acc_title": 33, "acc_title_value": 34, "acc_descr": 35, "acc_descr_value": 36, "acc_descr_multiline_value": 37, "namespaceIdentifier": 38, "STRUCT_START": 39, "classStatements": 40, "STRUCT_STOP": 41, "NAMESPACE": 42, "classIdentifier": 43, "STYLE_SEPARATOR": 44, "members": 45, "CLASS": 46, "emptyBody": 47, "SPACE": 48, "ANNOTATION_START": 49, "ANNOTATION_END": 50, "MEMBER": 51, "SEPARATOR": 52, "relation": 53, "NOTE_FOR": 54, "noteText": 55, "NOTE": 56, "CLASSDEF": 57, "classList": 58, "stylesOpt": 59, "ALPHA": 60, "COMMA": 61, "direction_tb": 62, "direction_bt": 63, "direction_rl": 64, "direction_lr": 65, "relationType": 66, "lineType": 67, "AGGREGATION": 68, "EXTENSION": 69, "COMPOSITION": 70, "DEPENDENCY": 71, "LOLLIPOP": 72, "LINE": 73, "DOTTED_LINE": 74, "CALLBACK": 75, "LINK": 76, "LINK_TARGET": 77, "CLICK": 78, "CALLBACK_NAME": 79, "CALLBACK_ARGS": 80, "HREF": 81, "STYLE": 82, "CSSCLASS": 83, "style": 84, "styleComponent": 85, "NUM": 86, "COLON": 87, "UNIT": 88, "BRKT": 89, "PCT": 90, "commentToken": 91, "textToken": 92, "graphCodeTokens": 93, "textNoTagsToken": 94, "TAGSTART": 95, "TAGEND": 96, "==": 97, "--": 98, "DEFAULT": 99, "MINUS": 100, "keywords": 101, "UNICODE_TEXT": 102, "BQUOTE_STR": 103, "$accept": 0, "$end": 1 },
16
+ terminals_: { 2: "error", 7: "CLASS_DIAGRAM", 8: "NEWLINE", 9: "EOF", 12: "SQS", 13: "STR", 14: "SQE", 18: "DOT", 20: "GENERICTYPE", 22: "LABEL", 33: "acc_title", 34: "acc_title_value", 35: "acc_descr", 36: "acc_descr_value", 37: "acc_descr_multiline_value", 39: "STRUCT_START", 41: "STRUCT_STOP", 42: "NAMESPACE", 44: "STYLE_SEPARATOR", 46: "CLASS", 48: "SPACE", 49: "ANNOTATION_START", 50: "ANNOTATION_END", 51: "MEMBER", 52: "SEPARATOR", 54: "NOTE_FOR", 56: "NOTE", 57: "CLASSDEF", 60: "ALPHA", 61: "COMMA", 62: "direction_tb", 63: "direction_bt", 64: "direction_rl", 65: "direction_lr", 68: "AGGREGATION", 69: "EXTENSION", 70: "COMPOSITION", 71: "DEPENDENCY", 72: "LOLLIPOP", 73: "LINE", 74: "DOTTED_LINE", 75: "CALLBACK", 76: "LINK", 77: "LINK_TARGET", 78: "CLICK", 79: "CALLBACK_NAME", 80: "CALLBACK_ARGS", 81: "HREF", 82: "STYLE", 83: "CSSCLASS", 86: "NUM", 87: "COLON", 88: "UNIT", 89: "BRKT", 90: "PCT", 93: "graphCodeTokens", 95: "TAGSTART", 96: "TAGEND", 97: "==", 98: "--", 99: "DEFAULT", 100: "MINUS", 101: "keywords", 102: "UNICODE_TEXT", 103: "BQUOTE_STR" },
17
+ productions_: [0, [3, 1], [3, 1], [4, 1], [6, 4], [5, 1], [5, 2], [5, 3], [11, 3], [15, 1], [15, 1], [15, 3], [15, 2], [19, 1], [19, 3], [19, 1], [19, 2], [19, 2], [19, 2], [10, 1], [10, 2], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 2], [10, 2], [10, 1], [23, 4], [23, 5], [38, 2], [40, 1], [40, 2], [40, 3], [24, 1], [24, 3], [24, 4], [24, 3], [24, 6], [43, 2], [43, 3], [47, 0], [47, 2], [47, 2], [26, 4], [45, 1], [45, 2], [25, 1], [25, 2], [25, 1], [25, 1], [21, 3], [21, 4], [21, 4], [21, 5], [30, 3], [30, 2], [31, 3], [58, 1], [58, 3], [32, 1], [32, 1], [32, 1], [32, 1], [53, 3], [53, 2], [53, 2], [53, 1], [66, 1], [66, 1], [66, 1], [66, 1], [66, 1], [67, 1], [67, 1], [27, 3], [27, 4], [27, 3], [27, 4], [27, 4], [27, 5], [27, 3], [27, 4], [27, 4], [27, 5], [27, 4], [27, 5], [27, 5], [27, 6], [28, 3], [29, 3], [59, 1], [59, 3], [84, 1], [84, 2], [85, 1], [85, 1], [85, 1], [85, 1], [85, 1], [85, 1], [85, 1], [85, 1], [85, 1], [91, 1], [91, 1], [92, 1], [92, 1], [92, 1], [92, 1], [92, 1], [92, 1], [92, 1], [94, 1], [94, 1], [94, 1], [94, 1], [16, 1], [16, 1], [16, 1], [16, 1], [17, 1], [55, 1]],
18
+ performAction: /* @__PURE__ */ __name(function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
19
+ var $0 = $$.length - 1;
20
+ switch (yystate) {
21
+ case 8:
22
+ this.$ = $$[$0 - 1];
23
+ break;
24
+ case 9:
25
+ case 10:
26
+ case 13:
27
+ case 15:
28
+ this.$ = $$[$0];
29
+ break;
30
+ case 11:
31
+ case 14:
32
+ this.$ = $$[$0 - 2] + "." + $$[$0];
33
+ break;
34
+ case 12:
35
+ case 16:
36
+ this.$ = $$[$0 - 1] + $$[$0];
37
+ break;
38
+ case 17:
39
+ case 18:
40
+ this.$ = $$[$0 - 1] + "~" + $$[$0] + "~";
41
+ break;
42
+ case 19:
43
+ yy.addRelation($$[$0]);
44
+ break;
45
+ case 20:
46
+ $$[$0 - 1].title = yy.cleanupLabel($$[$0]);
47
+ yy.addRelation($$[$0 - 1]);
48
+ break;
49
+ case 31:
50
+ this.$ = $$[$0].trim();
51
+ yy.setAccTitle(this.$);
52
+ break;
53
+ case 32:
54
+ case 33:
55
+ this.$ = $$[$0].trim();
56
+ yy.setAccDescription(this.$);
57
+ break;
58
+ case 34:
59
+ yy.addClassesToNamespace($$[$0 - 3], $$[$0 - 1]);
60
+ break;
61
+ case 35:
62
+ yy.addClassesToNamespace($$[$0 - 4], $$[$0 - 1]);
63
+ break;
64
+ case 36:
65
+ this.$ = $$[$0];
66
+ yy.addNamespace($$[$0]);
67
+ break;
68
+ case 37:
69
+ this.$ = [$$[$0]];
70
+ break;
71
+ case 38:
72
+ this.$ = [$$[$0 - 1]];
73
+ break;
74
+ case 39:
75
+ $$[$0].unshift($$[$0 - 2]);
76
+ this.$ = $$[$0];
77
+ break;
78
+ case 41:
79
+ yy.setCssClass($$[$0 - 2], $$[$0]);
80
+ break;
81
+ case 42:
82
+ yy.addMembers($$[$0 - 3], $$[$0 - 1]);
83
+ break;
84
+ case 44:
85
+ yy.setCssClass($$[$0 - 5], $$[$0 - 3]);
86
+ yy.addMembers($$[$0 - 5], $$[$0 - 1]);
87
+ break;
88
+ case 45:
89
+ this.$ = $$[$0];
90
+ yy.addClass($$[$0]);
91
+ break;
92
+ case 46:
93
+ this.$ = $$[$0 - 1];
94
+ yy.addClass($$[$0 - 1]);
95
+ yy.setClassLabel($$[$0 - 1], $$[$0]);
96
+ break;
97
+ case 50:
98
+ yy.addAnnotation($$[$0], $$[$0 - 2]);
99
+ break;
100
+ case 51:
101
+ case 64:
102
+ this.$ = [$$[$0]];
103
+ break;
104
+ case 52:
105
+ $$[$0].push($$[$0 - 1]);
106
+ this.$ = $$[$0];
107
+ break;
108
+ case 53:
109
+ break;
110
+ case 54:
111
+ yy.addMember($$[$0 - 1], yy.cleanupLabel($$[$0]));
112
+ break;
113
+ case 55:
114
+ break;
115
+ case 56:
116
+ break;
117
+ case 57:
118
+ this.$ = { "id1": $$[$0 - 2], "id2": $$[$0], relation: $$[$0 - 1], relationTitle1: "none", relationTitle2: "none" };
119
+ break;
120
+ case 58:
121
+ this.$ = { id1: $$[$0 - 3], id2: $$[$0], relation: $$[$0 - 1], relationTitle1: $$[$0 - 2], relationTitle2: "none" };
122
+ break;
123
+ case 59:
124
+ this.$ = { id1: $$[$0 - 3], id2: $$[$0], relation: $$[$0 - 2], relationTitle1: "none", relationTitle2: $$[$0 - 1] };
125
+ break;
126
+ case 60:
127
+ this.$ = { id1: $$[$0 - 4], id2: $$[$0], relation: $$[$0 - 2], relationTitle1: $$[$0 - 3], relationTitle2: $$[$0 - 1] };
128
+ break;
129
+ case 61:
130
+ yy.addNote($$[$0], $$[$0 - 1]);
131
+ break;
132
+ case 62:
133
+ yy.addNote($$[$0]);
134
+ break;
135
+ case 63:
136
+ this.$ = $$[$0 - 2];
137
+ yy.defineClass($$[$0 - 1], $$[$0]);
138
+ break;
139
+ case 65:
140
+ this.$ = $$[$0 - 2].concat([$$[$0]]);
141
+ break;
142
+ case 66:
143
+ yy.setDirection("TB");
144
+ break;
145
+ case 67:
146
+ yy.setDirection("BT");
147
+ break;
148
+ case 68:
149
+ yy.setDirection("RL");
150
+ break;
151
+ case 69:
152
+ yy.setDirection("LR");
153
+ break;
154
+ case 70:
155
+ this.$ = { type1: $$[$0 - 2], type2: $$[$0], lineType: $$[$0 - 1] };
156
+ break;
157
+ case 71:
158
+ this.$ = { type1: "none", type2: $$[$0], lineType: $$[$0 - 1] };
159
+ break;
160
+ case 72:
161
+ this.$ = { type1: $$[$0 - 1], type2: "none", lineType: $$[$0] };
162
+ break;
163
+ case 73:
164
+ this.$ = { type1: "none", type2: "none", lineType: $$[$0] };
165
+ break;
166
+ case 74:
167
+ this.$ = yy.relationType.AGGREGATION;
168
+ break;
169
+ case 75:
170
+ this.$ = yy.relationType.EXTENSION;
171
+ break;
172
+ case 76:
173
+ this.$ = yy.relationType.COMPOSITION;
174
+ break;
175
+ case 77:
176
+ this.$ = yy.relationType.DEPENDENCY;
177
+ break;
178
+ case 78:
179
+ this.$ = yy.relationType.LOLLIPOP;
180
+ break;
181
+ case 79:
182
+ this.$ = yy.lineType.LINE;
183
+ break;
184
+ case 80:
185
+ this.$ = yy.lineType.DOTTED_LINE;
186
+ break;
187
+ case 81:
188
+ case 87:
189
+ this.$ = $$[$0 - 2];
190
+ yy.setClickEvent($$[$0 - 1], $$[$0]);
191
+ break;
192
+ case 82:
193
+ case 88:
194
+ this.$ = $$[$0 - 3];
195
+ yy.setClickEvent($$[$0 - 2], $$[$0 - 1]);
196
+ yy.setTooltip($$[$0 - 2], $$[$0]);
197
+ break;
198
+ case 83:
199
+ this.$ = $$[$0 - 2];
200
+ yy.setLink($$[$0 - 1], $$[$0]);
201
+ break;
202
+ case 84:
203
+ this.$ = $$[$0 - 3];
204
+ yy.setLink($$[$0 - 2], $$[$0 - 1], $$[$0]);
205
+ break;
206
+ case 85:
207
+ this.$ = $$[$0 - 3];
208
+ yy.setLink($$[$0 - 2], $$[$0 - 1]);
209
+ yy.setTooltip($$[$0 - 2], $$[$0]);
210
+ break;
211
+ case 86:
212
+ this.$ = $$[$0 - 4];
213
+ yy.setLink($$[$0 - 3], $$[$0 - 2], $$[$0]);
214
+ yy.setTooltip($$[$0 - 3], $$[$0 - 1]);
215
+ break;
216
+ case 89:
217
+ this.$ = $$[$0 - 3];
218
+ yy.setClickEvent($$[$0 - 2], $$[$0 - 1], $$[$0]);
219
+ break;
220
+ case 90:
221
+ this.$ = $$[$0 - 4];
222
+ yy.setClickEvent($$[$0 - 3], $$[$0 - 2], $$[$0 - 1]);
223
+ yy.setTooltip($$[$0 - 3], $$[$0]);
224
+ break;
225
+ case 91:
226
+ this.$ = $$[$0 - 3];
227
+ yy.setLink($$[$0 - 2], $$[$0]);
228
+ break;
229
+ case 92:
230
+ this.$ = $$[$0 - 4];
231
+ yy.setLink($$[$0 - 3], $$[$0 - 1], $$[$0]);
232
+ break;
233
+ case 93:
234
+ this.$ = $$[$0 - 4];
235
+ yy.setLink($$[$0 - 3], $$[$0 - 1]);
236
+ yy.setTooltip($$[$0 - 3], $$[$0]);
237
+ break;
238
+ case 94:
239
+ this.$ = $$[$0 - 5];
240
+ yy.setLink($$[$0 - 4], $$[$0 - 2], $$[$0]);
241
+ yy.setTooltip($$[$0 - 4], $$[$0 - 1]);
242
+ break;
243
+ case 95:
244
+ this.$ = $$[$0 - 2];
245
+ yy.setCssStyle($$[$0 - 1], $$[$0]);
246
+ break;
247
+ case 96:
248
+ yy.setCssClass($$[$0 - 1], $$[$0]);
249
+ break;
250
+ case 97:
251
+ this.$ = [$$[$0]];
252
+ break;
253
+ case 98:
254
+ $$[$0 - 2].push($$[$0]);
255
+ this.$ = $$[$0 - 2];
256
+ break;
257
+ case 100:
258
+ this.$ = $$[$0 - 1] + $$[$0];
259
+ break;
260
+ }
261
+ }, "anonymous"),
262
+ table: [{ 3: 1, 4: 2, 5: 3, 6: 4, 7: [1, 6], 10: 5, 16: 39, 17: 40, 19: 21, 21: 7, 23: 8, 24: 9, 25: 10, 26: 11, 27: 12, 28: 13, 29: 14, 30: 15, 31: 16, 32: 17, 33: $V0, 35: $V1, 37: $V2, 38: 22, 42: $V3, 43: 23, 46: $V4, 49: $V5, 51: $V6, 52: $V7, 54: $V8, 56: $V9, 57: $Va, 60: $Vb, 62: $Vc, 63: $Vd, 64: $Ve, 65: $Vf, 75: $Vg, 76: $Vh, 78: $Vi, 82: $Vj, 83: $Vk, 86: $Vl, 100: $Vm, 102: $Vn, 103: $Vo }, { 1: [3] }, { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3] }, o($Vp, [2, 5], { 8: [1, 48] }), { 8: [1, 49] }, o($Vq, [2, 19], { 22: [1, 50] }), o($Vq, [2, 21]), o($Vq, [2, 22]), o($Vq, [2, 23]), o($Vq, [2, 24]), o($Vq, [2, 25]), o($Vq, [2, 26]), o($Vq, [2, 27]), o($Vq, [2, 28]), o($Vq, [2, 29]), o($Vq, [2, 30]), { 34: [1, 51] }, { 36: [1, 52] }, o($Vq, [2, 33]), o($Vq, [2, 53], { 53: 53, 66: 56, 67: 57, 13: [1, 54], 22: [1, 55], 68: $Vr, 69: $Vs, 70: $Vt, 71: $Vu, 72: $Vv, 73: $Vw, 74: $Vx }), { 39: [1, 65] }, o($Vy, [2, 40], { 39: [1, 67], 44: [1, 66] }), o($Vq, [2, 55]), o($Vq, [2, 56]), { 16: 68, 60: $Vb, 86: $Vl, 100: $Vm, 102: $Vn }, { 16: 39, 17: 40, 19: 69, 60: $Vb, 86: $Vl, 100: $Vm, 102: $Vn, 103: $Vo }, { 16: 39, 17: 40, 19: 70, 60: $Vb, 86: $Vl, 100: $Vm, 102: $Vn, 103: $Vo }, { 16: 39, 17: 40, 19: 71, 60: $Vb, 86: $Vl, 100: $Vm, 102: $Vn, 103: $Vo }, { 60: [1, 72] }, { 13: [1, 73] }, { 16: 39, 17: 40, 19: 74, 60: $Vb, 86: $Vl, 100: $Vm, 102: $Vn, 103: $Vo }, { 13: $Vz, 55: 75 }, { 58: 77, 60: [1, 78] }, o($Vq, [2, 66]), o($Vq, [2, 67]), o($Vq, [2, 68]), o($Vq, [2, 69]), o($VA, [2, 13], { 16: 39, 17: 40, 19: 80, 18: [1, 79], 20: [1, 81], 60: $Vb, 86: $Vl, 100: $Vm, 102: $Vn, 103: $Vo }), o($VA, [2, 15], { 20: [1, 82] }), { 15: 83, 16: 84, 17: 85, 60: $Vb, 86: $Vl, 100: $Vm, 102: $Vn, 103: $Vo }, { 16: 39, 17: 40, 19: 86, 60: $Vb, 86: $Vl, 100: $Vm, 102: $Vn, 103: $Vo }, o($VB, [2, 123]), o($VB, [2, 124]), o($VB, [2, 125]), o($VB, [2, 126]), o([1, 8, 9, 12, 13, 20, 22, 39, 41, 44, 68, 69, 70, 71, 72, 73, 74, 79, 81], [2, 127]), o($Vp, [2, 6], { 10: 5, 21: 7, 23: 8, 24: 9, 25: 10, 26: 11, 27: 12, 28: 13, 29: 14, 30: 15, 31: 16, 32: 17, 19: 21, 38: 22, 43: 23, 16: 39, 17: 40, 5: 87, 33: $V0, 35: $V1, 37: $V2, 42: $V3, 46: $V4, 49: $V5, 51: $V6, 52: $V7, 54: $V8, 56: $V9, 57: $Va, 60: $Vb, 62: $Vc, 63: $Vd, 64: $Ve, 65: $Vf, 75: $Vg, 76: $Vh, 78: $Vi, 82: $Vj, 83: $Vk, 86: $Vl, 100: $Vm, 102: $Vn, 103: $Vo }), { 5: 88, 10: 5, 16: 39, 17: 40, 19: 21, 21: 7, 23: 8, 24: 9, 25: 10, 26: 11, 27: 12, 28: 13, 29: 14, 30: 15, 31: 16, 32: 17, 33: $V0, 35: $V1, 37: $V2, 38: 22, 42: $V3, 43: 23, 46: $V4, 49: $V5, 51: $V6, 52: $V7, 54: $V8, 56: $V9, 57: $Va, 60: $Vb, 62: $Vc, 63: $Vd, 64: $Ve, 65: $Vf, 75: $Vg, 76: $Vh, 78: $Vi, 82: $Vj, 83: $Vk, 86: $Vl, 100: $Vm, 102: $Vn, 103: $Vo }, o($Vq, [2, 20]), o($Vq, [2, 31]), o($Vq, [2, 32]), { 13: [1, 90], 16: 39, 17: 40, 19: 89, 60: $Vb, 86: $Vl, 100: $Vm, 102: $Vn, 103: $Vo }, { 53: 91, 66: 56, 67: 57, 68: $Vr, 69: $Vs, 70: $Vt, 71: $Vu, 72: $Vv, 73: $Vw, 74: $Vx }, o($Vq, [2, 54]), { 67: 92, 73: $Vw, 74: $Vx }, o($VC, [2, 73], { 66: 93, 68: $Vr, 69: $Vs, 70: $Vt, 71: $Vu, 72: $Vv }), o($VD, [2, 74]), o($VD, [2, 75]), o($VD, [2, 76]), o($VD, [2, 77]), o($VD, [2, 78]), o($VE, [2, 79]), o($VE, [2, 80]), { 8: [1, 95], 24: 96, 40: 94, 43: 23, 46: $V4 }, { 16: 97, 60: $Vb, 86: $Vl, 100: $Vm, 102: $Vn }, { 41: [1, 99], 45: 98, 51: $VF }, { 50: [1, 101] }, { 13: [1, 102] }, { 13: [1, 103] }, { 79: [1, 104], 81: [1, 105] }, { 22: $VG, 48: $VH, 59: 106, 60: $VI, 82: $VJ, 84: 107, 85: 108, 86: $VK, 87: $VL, 88: $VM, 89: $VN, 90: $VO }, { 60: [1, 118] }, { 13: $Vz, 55: 119 }, o($Vq, [2, 62]), o($Vq, [2, 128]), { 22: $VG, 48: $VH, 59: 120, 60: $VI, 61: [1, 121], 82: $VJ, 84: 107, 85: 108, 86: $VK, 87: $VL, 88: $VM, 89: $VN, 90: $VO }, o($VP, [2, 64]), { 16: 39, 17: 40, 19: 122, 60: $Vb, 86: $Vl, 100: $Vm, 102: $Vn, 103: $Vo }, o($VA, [2, 16]), o($VA, [2, 17]), o($VA, [2, 18]), { 39: [2, 36] }, { 15: 124, 16: 84, 17: 85, 18: [1, 123], 39: [2, 9], 60: $Vb, 86: $Vl, 100: $Vm, 102: $Vn, 103: $Vo }, { 39: [2, 10] }, o($VQ, [2, 45], { 11: 125, 12: [1, 126] }), o($Vp, [2, 7]), { 9: [1, 127] }, o($VR, [2, 57]), { 16: 39, 17: 40, 19: 128, 60: $Vb, 86: $Vl, 100: $Vm, 102: $Vn, 103: $Vo }, { 13: [1, 130], 16: 39, 17: 40, 19: 129, 60: $Vb, 86: $Vl, 100: $Vm, 102: $Vn, 103: $Vo }, o($VC, [2, 72], { 66: 131, 68: $Vr, 69: $Vs, 70: $Vt, 71: $Vu, 72: $Vv }), o($VC, [2, 71]), { 41: [1, 132] }, { 24: 96, 40: 133, 43: 23, 46: $V4 }, { 8: [1, 134], 41: [2, 37] }, o($Vy, [2, 41], { 39: [1, 135] }), { 41: [1, 136] }, o($Vy, [2, 43]), { 41: [2, 51], 45: 137, 51: $VF }, { 16: 39, 17: 40, 19: 138, 60: $Vb, 86: $Vl, 100: $Vm, 102: $Vn, 103: $Vo }, o($Vq, [2, 81], { 13: [1, 139] }), o($Vq, [2, 83], { 13: [1, 141], 77: [1, 140] }), o($Vq, [2, 87], { 13: [1, 142], 80: [1, 143] }), { 13: [1, 144] }, o($Vq, [2, 95], { 61: $VS }), o($VT, [2, 97], { 85: 146, 22: $VG, 48: $VH, 60: $VI, 82: $VJ, 86: $VK, 87: $VL, 88: $VM, 89: $VN, 90: $VO }), o($VU, [2, 99]), o($VU, [2, 101]), o($VU, [2, 102]), o($VU, [2, 103]), o($VU, [2, 104]), o($VU, [2, 105]), o($VU, [2, 106]), o($VU, [2, 107]), o($VU, [2, 108]), o($VU, [2, 109]), o($Vq, [2, 96]), o($Vq, [2, 61]), o($Vq, [2, 63], { 61: $VS }), { 60: [1, 147] }, o($VA, [2, 14]), { 15: 148, 16: 84, 17: 85, 60: $Vb, 86: $Vl, 100: $Vm, 102: $Vn, 103: $Vo }, { 39: [2, 12] }, o($VQ, [2, 46]), { 13: [1, 149] }, { 1: [2, 4] }, o($VR, [2, 59]), o($VR, [2, 58]), { 16: 39, 17: 40, 19: 150, 60: $Vb, 86: $Vl, 100: $Vm, 102: $Vn, 103: $Vo }, o($VC, [2, 70]), o($Vq, [2, 34]), { 41: [1, 151] }, { 24: 96, 40: 152, 41: [2, 38], 43: 23, 46: $V4 }, { 45: 153, 51: $VF }, o($Vy, [2, 42]), { 41: [2, 52] }, o($Vq, [2, 50]), o($Vq, [2, 82]), o($Vq, [2, 84]), o($Vq, [2, 85], { 77: [1, 154] }), o($Vq, [2, 88]), o($Vq, [2, 89], { 13: [1, 155] }), o($Vq, [2, 91], { 13: [1, 157], 77: [1, 156] }), { 22: $VG, 48: $VH, 60: $VI, 82: $VJ, 84: 158, 85: 108, 86: $VK, 87: $VL, 88: $VM, 89: $VN, 90: $VO }, o($VU, [2, 100]), o($VP, [2, 65]), { 39: [2, 11] }, { 14: [1, 159] }, o($VR, [2, 60]), o($Vq, [2, 35]), { 41: [2, 39] }, { 41: [1, 160] }, o($Vq, [2, 86]), o($Vq, [2, 90]), o($Vq, [2, 92]), o($Vq, [2, 93], { 77: [1, 161] }), o($VT, [2, 98], { 85: 146, 22: $VG, 48: $VH, 60: $VI, 82: $VJ, 86: $VK, 87: $VL, 88: $VM, 89: $VN, 90: $VO }), o($VQ, [2, 8]), o($Vy, [2, 44]), o($Vq, [2, 94])],
263
+ defaultActions: { 2: [2, 1], 3: [2, 2], 4: [2, 3], 83: [2, 36], 85: [2, 10], 124: [2, 12], 127: [2, 4], 137: [2, 52], 148: [2, 11], 152: [2, 39] },
264
+ parseError: /* @__PURE__ */ __name(function parseError(str, hash) {
265
+ if (hash.recoverable) {
266
+ this.trace(str);
267
+ } else {
268
+ var error = new Error(str);
269
+ error.hash = hash;
270
+ throw error;
271
+ }
272
+ }, "parseError"),
273
+ parse: /* @__PURE__ */ __name(function parse(input) {
274
+ var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1;
275
+ var args = lstack.slice.call(arguments, 1);
276
+ var lexer2 = Object.create(this.lexer);
277
+ var sharedState = { yy: {} };
278
+ for (var k in this.yy) {
279
+ if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
280
+ sharedState.yy[k] = this.yy[k];
281
+ }
282
+ }
283
+ lexer2.setInput(input, sharedState.yy);
284
+ sharedState.yy.lexer = lexer2;
285
+ sharedState.yy.parser = this;
286
+ if (typeof lexer2.yylloc == "undefined") {
287
+ lexer2.yylloc = {};
288
+ }
289
+ var yyloc = lexer2.yylloc;
290
+ lstack.push(yyloc);
291
+ var ranges = lexer2.options && lexer2.options.ranges;
292
+ if (typeof sharedState.yy.parseError === "function") {
293
+ this.parseError = sharedState.yy.parseError;
294
+ } else {
295
+ this.parseError = Object.getPrototypeOf(this).parseError;
296
+ }
297
+ function popStack(n) {
298
+ stack.length = stack.length - 2 * n;
299
+ vstack.length = vstack.length - n;
300
+ lstack.length = lstack.length - n;
301
+ }
302
+ __name(popStack, "popStack");
303
+ function lex() {
304
+ var token;
305
+ token = tstack.pop() || lexer2.lex() || EOF;
306
+ if (typeof token !== "number") {
307
+ if (token instanceof Array) {
308
+ tstack = token;
309
+ token = tstack.pop();
310
+ }
311
+ token = self.symbols_[token] || token;
312
+ }
313
+ return token;
314
+ }
315
+ __name(lex, "lex");
316
+ var symbol, state, action, r, yyval = {}, p, len, newState, expected;
317
+ while (true) {
318
+ state = stack[stack.length - 1];
319
+ if (this.defaultActions[state]) {
320
+ action = this.defaultActions[state];
321
+ } else {
322
+ if (symbol === null || typeof symbol == "undefined") {
323
+ symbol = lex();
324
+ }
325
+ action = table[state] && table[state][symbol];
326
+ }
327
+ if (typeof action === "undefined" || !action.length || !action[0]) {
328
+ var errStr = "";
329
+ expected = [];
330
+ for (p in table[state]) {
331
+ if (this.terminals_[p] && p > TERROR) {
332
+ expected.push("'" + this.terminals_[p] + "'");
333
+ }
334
+ }
335
+ if (lexer2.showPosition) {
336
+ errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
337
+ } else {
338
+ errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
339
+ }
340
+ this.parseError(errStr, {
341
+ text: lexer2.match,
342
+ token: this.terminals_[symbol] || symbol,
343
+ line: lexer2.yylineno,
344
+ loc: yyloc,
345
+ expected
346
+ });
347
+ }
348
+ if (action[0] instanceof Array && action.length > 1) {
349
+ throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
350
+ }
351
+ switch (action[0]) {
352
+ case 1:
353
+ stack.push(symbol);
354
+ vstack.push(lexer2.yytext);
355
+ lstack.push(lexer2.yylloc);
356
+ stack.push(action[1]);
357
+ symbol = null;
358
+ {
359
+ yyleng = lexer2.yyleng;
360
+ yytext = lexer2.yytext;
361
+ yylineno = lexer2.yylineno;
362
+ yyloc = lexer2.yylloc;
363
+ }
364
+ break;
365
+ case 2:
366
+ len = this.productions_[action[1]][1];
367
+ yyval.$ = vstack[vstack.length - len];
368
+ yyval._$ = {
369
+ first_line: lstack[lstack.length - (len || 1)].first_line,
370
+ last_line: lstack[lstack.length - 1].last_line,
371
+ first_column: lstack[lstack.length - (len || 1)].first_column,
372
+ last_column: lstack[lstack.length - 1].last_column
373
+ };
374
+ if (ranges) {
375
+ yyval._$.range = [
376
+ lstack[lstack.length - (len || 1)].range[0],
377
+ lstack[lstack.length - 1].range[1]
378
+ ];
379
+ }
380
+ r = this.performAction.apply(yyval, [
381
+ yytext,
382
+ yyleng,
383
+ yylineno,
384
+ sharedState.yy,
385
+ action[1],
386
+ vstack,
387
+ lstack
388
+ ].concat(args));
389
+ if (typeof r !== "undefined") {
390
+ return r;
391
+ }
392
+ if (len) {
393
+ stack = stack.slice(0, -1 * len * 2);
394
+ vstack = vstack.slice(0, -1 * len);
395
+ lstack = lstack.slice(0, -1 * len);
396
+ }
397
+ stack.push(this.productions_[action[1]][0]);
398
+ vstack.push(yyval.$);
399
+ lstack.push(yyval._$);
400
+ newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
401
+ stack.push(newState);
402
+ break;
403
+ case 3:
404
+ return true;
405
+ }
406
+ }
407
+ return true;
408
+ }, "parse")
409
+ };
410
+ var lexer = /* @__PURE__ */ (function() {
411
+ var lexer2 = {
412
+ EOF: 1,
413
+ parseError: /* @__PURE__ */ __name(function parseError(str, hash) {
414
+ if (this.yy.parser) {
415
+ this.yy.parser.parseError(str, hash);
416
+ } else {
417
+ throw new Error(str);
418
+ }
419
+ }, "parseError"),
420
+ // resets the lexer, sets new input
421
+ setInput: /* @__PURE__ */ __name(function(input, yy) {
422
+ this.yy = yy || this.yy || {};
423
+ this._input = input;
424
+ this._more = this._backtrack = this.done = false;
425
+ this.yylineno = this.yyleng = 0;
426
+ this.yytext = this.matched = this.match = "";
427
+ this.conditionStack = ["INITIAL"];
428
+ this.yylloc = {
429
+ first_line: 1,
430
+ first_column: 0,
431
+ last_line: 1,
432
+ last_column: 0
433
+ };
434
+ if (this.options.ranges) {
435
+ this.yylloc.range = [0, 0];
436
+ }
437
+ this.offset = 0;
438
+ return this;
439
+ }, "setInput"),
440
+ // consumes and returns one char from the input
441
+ input: /* @__PURE__ */ __name(function() {
442
+ var ch = this._input[0];
443
+ this.yytext += ch;
444
+ this.yyleng++;
445
+ this.offset++;
446
+ this.match += ch;
447
+ this.matched += ch;
448
+ var lines = ch.match(/(?:\r\n?|\n).*/g);
449
+ if (lines) {
450
+ this.yylineno++;
451
+ this.yylloc.last_line++;
452
+ } else {
453
+ this.yylloc.last_column++;
454
+ }
455
+ if (this.options.ranges) {
456
+ this.yylloc.range[1]++;
457
+ }
458
+ this._input = this._input.slice(1);
459
+ return ch;
460
+ }, "input"),
461
+ // unshifts one char (or a string) into the input
462
+ unput: /* @__PURE__ */ __name(function(ch) {
463
+ var len = ch.length;
464
+ var lines = ch.split(/(?:\r\n?|\n)/g);
465
+ this._input = ch + this._input;
466
+ this.yytext = this.yytext.substr(0, this.yytext.length - len);
467
+ this.offset -= len;
468
+ var oldLines = this.match.split(/(?:\r\n?|\n)/g);
469
+ this.match = this.match.substr(0, this.match.length - 1);
470
+ this.matched = this.matched.substr(0, this.matched.length - 1);
471
+ if (lines.length - 1) {
472
+ this.yylineno -= lines.length - 1;
473
+ }
474
+ var r = this.yylloc.range;
475
+ this.yylloc = {
476
+ first_line: this.yylloc.first_line,
477
+ last_line: this.yylineno + 1,
478
+ first_column: this.yylloc.first_column,
479
+ last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len
480
+ };
481
+ if (this.options.ranges) {
482
+ this.yylloc.range = [r[0], r[0] + this.yyleng - len];
483
+ }
484
+ this.yyleng = this.yytext.length;
485
+ return this;
486
+ }, "unput"),
487
+ // When called from action, caches matched text and appends it on next action
488
+ more: /* @__PURE__ */ __name(function() {
489
+ this._more = true;
490
+ return this;
491
+ }, "more"),
492
+ // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
493
+ reject: /* @__PURE__ */ __name(function() {
494
+ if (this.options.backtrack_lexer) {
495
+ this._backtrack = true;
496
+ } else {
497
+ 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(), {
498
+ text: "",
499
+ token: null,
500
+ line: this.yylineno
501
+ });
502
+ }
503
+ return this;
504
+ }, "reject"),
505
+ // retain first n characters of the match
506
+ less: /* @__PURE__ */ __name(function(n) {
507
+ this.unput(this.match.slice(n));
508
+ }, "less"),
509
+ // displays already matched input, i.e. for error messages
510
+ pastInput: /* @__PURE__ */ __name(function() {
511
+ var past = this.matched.substr(0, this.matched.length - this.match.length);
512
+ return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, "");
513
+ }, "pastInput"),
514
+ // displays upcoming input, i.e. for error messages
515
+ upcomingInput: /* @__PURE__ */ __name(function() {
516
+ var next = this.match;
517
+ if (next.length < 20) {
518
+ next += this._input.substr(0, 20 - next.length);
519
+ }
520
+ return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, "");
521
+ }, "upcomingInput"),
522
+ // displays the character position where the lexing error occurred, i.e. for error messages
523
+ showPosition: /* @__PURE__ */ __name(function() {
524
+ var pre = this.pastInput();
525
+ var c = new Array(pre.length + 1).join("-");
526
+ return pre + this.upcomingInput() + "\n" + c + "^";
527
+ }, "showPosition"),
528
+ // test the lexed token: return FALSE when not a match, otherwise return token
529
+ test_match: /* @__PURE__ */ __name(function(match, indexed_rule) {
530
+ var token, lines, backup;
531
+ if (this.options.backtrack_lexer) {
532
+ backup = {
533
+ yylineno: this.yylineno,
534
+ yylloc: {
535
+ first_line: this.yylloc.first_line,
536
+ last_line: this.last_line,
537
+ first_column: this.yylloc.first_column,
538
+ last_column: this.yylloc.last_column
539
+ },
540
+ yytext: this.yytext,
541
+ match: this.match,
542
+ matches: this.matches,
543
+ matched: this.matched,
544
+ yyleng: this.yyleng,
545
+ offset: this.offset,
546
+ _more: this._more,
547
+ _input: this._input,
548
+ yy: this.yy,
549
+ conditionStack: this.conditionStack.slice(0),
550
+ done: this.done
551
+ };
552
+ if (this.options.ranges) {
553
+ backup.yylloc.range = this.yylloc.range.slice(0);
554
+ }
555
+ }
556
+ lines = match[0].match(/(?:\r\n?|\n).*/g);
557
+ if (lines) {
558
+ this.yylineno += lines.length;
559
+ }
560
+ this.yylloc = {
561
+ first_line: this.yylloc.last_line,
562
+ last_line: this.yylineno + 1,
563
+ first_column: this.yylloc.last_column,
564
+ last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
565
+ };
566
+ this.yytext += match[0];
567
+ this.match += match[0];
568
+ this.matches = match;
569
+ this.yyleng = this.yytext.length;
570
+ if (this.options.ranges) {
571
+ this.yylloc.range = [this.offset, this.offset += this.yyleng];
572
+ }
573
+ this._more = false;
574
+ this._backtrack = false;
575
+ this._input = this._input.slice(match[0].length);
576
+ this.matched += match[0];
577
+ token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
578
+ if (this.done && this._input) {
579
+ this.done = false;
580
+ }
581
+ if (token) {
582
+ return token;
583
+ } else if (this._backtrack) {
584
+ for (var k in backup) {
585
+ this[k] = backup[k];
586
+ }
587
+ return false;
588
+ }
589
+ return false;
590
+ }, "test_match"),
591
+ // return next match in input
592
+ next: /* @__PURE__ */ __name(function() {
593
+ if (this.done) {
594
+ return this.EOF;
595
+ }
596
+ if (!this._input) {
597
+ this.done = true;
598
+ }
599
+ var token, match, tempMatch, index;
600
+ if (!this._more) {
601
+ this.yytext = "";
602
+ this.match = "";
603
+ }
604
+ var rules = this._currentRules();
605
+ for (var i = 0; i < rules.length; i++) {
606
+ tempMatch = this._input.match(this.rules[rules[i]]);
607
+ if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
608
+ match = tempMatch;
609
+ index = i;
610
+ if (this.options.backtrack_lexer) {
611
+ token = this.test_match(tempMatch, rules[i]);
612
+ if (token !== false) {
613
+ return token;
614
+ } else if (this._backtrack) {
615
+ match = false;
616
+ continue;
617
+ } else {
618
+ return false;
619
+ }
620
+ } else if (!this.options.flex) {
621
+ break;
622
+ }
623
+ }
624
+ }
625
+ if (match) {
626
+ token = this.test_match(match, rules[index]);
627
+ if (token !== false) {
628
+ return token;
629
+ }
630
+ return false;
631
+ }
632
+ if (this._input === "") {
633
+ return this.EOF;
634
+ } else {
635
+ return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
636
+ text: "",
637
+ token: null,
638
+ line: this.yylineno
639
+ });
640
+ }
641
+ }, "next"),
642
+ // return next match that has a token
643
+ lex: /* @__PURE__ */ __name(function lex() {
644
+ var r = this.next();
645
+ if (r) {
646
+ return r;
647
+ } else {
648
+ return this.lex();
649
+ }
650
+ }, "lex"),
651
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
652
+ begin: /* @__PURE__ */ __name(function begin(condition) {
653
+ this.conditionStack.push(condition);
654
+ }, "begin"),
655
+ // pop the previously active lexer condition state off the condition stack
656
+ popState: /* @__PURE__ */ __name(function popState() {
657
+ var n = this.conditionStack.length - 1;
658
+ if (n > 0) {
659
+ return this.conditionStack.pop();
660
+ } else {
661
+ return this.conditionStack[0];
662
+ }
663
+ }, "popState"),
664
+ // produce the lexer rule set which is active for the currently active lexer condition state
665
+ _currentRules: /* @__PURE__ */ __name(function _currentRules() {
666
+ if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
667
+ return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
668
+ } else {
669
+ return this.conditions["INITIAL"].rules;
670
+ }
671
+ }, "_currentRules"),
672
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
673
+ topState: /* @__PURE__ */ __name(function topState(n) {
674
+ n = this.conditionStack.length - 1 - Math.abs(n || 0);
675
+ if (n >= 0) {
676
+ return this.conditionStack[n];
677
+ } else {
678
+ return "INITIAL";
679
+ }
680
+ }, "topState"),
681
+ // alias for begin(condition)
682
+ pushState: /* @__PURE__ */ __name(function pushState(condition) {
683
+ this.begin(condition);
684
+ }, "pushState"),
685
+ // return the number of states currently on the stack
686
+ stateStackSize: /* @__PURE__ */ __name(function stateStackSize() {
687
+ return this.conditionStack.length;
688
+ }, "stateStackSize"),
689
+ options: {},
690
+ performAction: /* @__PURE__ */ __name(function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
691
+ switch ($avoiding_name_collisions) {
692
+ case 0:
693
+ return 62;
694
+ case 1:
695
+ return 63;
696
+ case 2:
697
+ return 64;
698
+ case 3:
699
+ return 65;
700
+ case 4:
701
+ break;
702
+ case 5:
703
+ break;
704
+ case 6:
705
+ this.begin("acc_title");
706
+ return 33;
707
+ case 7:
708
+ this.popState();
709
+ return "acc_title_value";
710
+ case 8:
711
+ this.begin("acc_descr");
712
+ return 35;
713
+ case 9:
714
+ this.popState();
715
+ return "acc_descr_value";
716
+ case 10:
717
+ this.begin("acc_descr_multiline");
718
+ break;
719
+ case 11:
720
+ this.popState();
721
+ break;
722
+ case 12:
723
+ return "acc_descr_multiline_value";
724
+ case 13:
725
+ return 8;
726
+ case 14:
727
+ break;
728
+ case 15:
729
+ return 7;
730
+ case 16:
731
+ return 7;
732
+ case 17:
733
+ return "EDGE_STATE";
734
+ case 18:
735
+ this.begin("callback_name");
736
+ break;
737
+ case 19:
738
+ this.popState();
739
+ break;
740
+ case 20:
741
+ this.popState();
742
+ this.begin("callback_args");
743
+ break;
744
+ case 21:
745
+ return 79;
746
+ case 22:
747
+ this.popState();
748
+ break;
749
+ case 23:
750
+ return 80;
751
+ case 24:
752
+ this.popState();
753
+ break;
754
+ case 25:
755
+ return "STR";
756
+ case 26:
757
+ this.begin("string");
758
+ break;
759
+ case 27:
760
+ return 82;
761
+ case 28:
762
+ return 57;
763
+ case 29:
764
+ this.begin("namespace");
765
+ return 42;
766
+ case 30:
767
+ this.popState();
768
+ return 8;
769
+ case 31:
770
+ break;
771
+ case 32:
772
+ this.begin("namespace-body");
773
+ return 39;
774
+ case 33:
775
+ this.popState();
776
+ return 41;
777
+ case 34:
778
+ return "EOF_IN_STRUCT";
779
+ case 35:
780
+ return 8;
781
+ case 36:
782
+ break;
783
+ case 37:
784
+ return "EDGE_STATE";
785
+ case 38:
786
+ this.begin("class");
787
+ return 46;
788
+ case 39:
789
+ this.popState();
790
+ return 8;
791
+ case 40:
792
+ break;
793
+ case 41:
794
+ this.popState();
795
+ this.popState();
796
+ return 41;
797
+ case 42:
798
+ this.begin("class-body");
799
+ return 39;
800
+ case 43:
801
+ this.popState();
802
+ return 41;
803
+ case 44:
804
+ return "EOF_IN_STRUCT";
805
+ case 45:
806
+ return "EDGE_STATE";
807
+ case 46:
808
+ return "OPEN_IN_STRUCT";
809
+ case 47:
810
+ break;
811
+ case 48:
812
+ return "MEMBER";
813
+ case 49:
814
+ return 83;
815
+ case 50:
816
+ return 75;
817
+ case 51:
818
+ return 76;
819
+ case 52:
820
+ return 78;
821
+ case 53:
822
+ return 54;
823
+ case 54:
824
+ return 56;
825
+ case 55:
826
+ return 49;
827
+ case 56:
828
+ return 50;
829
+ case 57:
830
+ return 81;
831
+ case 58:
832
+ this.popState();
833
+ break;
834
+ case 59:
835
+ return "GENERICTYPE";
836
+ case 60:
837
+ this.begin("generic");
838
+ break;
839
+ case 61:
840
+ this.popState();
841
+ break;
842
+ case 62:
843
+ return "BQUOTE_STR";
844
+ case 63:
845
+ this.begin("bqstring");
846
+ break;
847
+ case 64:
848
+ return 77;
849
+ case 65:
850
+ return 77;
851
+ case 66:
852
+ return 77;
853
+ case 67:
854
+ return 77;
855
+ case 68:
856
+ return 69;
857
+ case 69:
858
+ return 69;
859
+ case 70:
860
+ return 71;
861
+ case 71:
862
+ return 71;
863
+ case 72:
864
+ return 70;
865
+ case 73:
866
+ return 68;
867
+ case 74:
868
+ return 72;
869
+ case 75:
870
+ return 73;
871
+ case 76:
872
+ return 74;
873
+ case 77:
874
+ return 22;
875
+ case 78:
876
+ return 44;
877
+ case 79:
878
+ return 100;
879
+ case 80:
880
+ return 18;
881
+ case 81:
882
+ return "PLUS";
883
+ case 82:
884
+ return 87;
885
+ case 83:
886
+ return 61;
887
+ case 84:
888
+ return 89;
889
+ case 85:
890
+ return 89;
891
+ case 86:
892
+ return 90;
893
+ case 87:
894
+ return "EQUALS";
895
+ case 88:
896
+ return "EQUALS";
897
+ case 89:
898
+ return 60;
899
+ case 90:
900
+ return 12;
901
+ case 91:
902
+ return 14;
903
+ case 92:
904
+ return "PUNCTUATION";
905
+ case 93:
906
+ return 86;
907
+ case 94:
908
+ return 102;
909
+ case 95:
910
+ return 48;
911
+ case 96:
912
+ return 48;
913
+ case 97:
914
+ return 9;
915
+ }
916
+ }, "anonymous"),
917
+ rules: [/^(?:.*direction\s+TB[^\n]*)/, /^(?:.*direction\s+BT[^\n]*)/, /^(?:.*direction\s+RL[^\n]*)/, /^(?:.*direction\s+LR[^\n]*)/, /^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/, /^(?:%%[^\n]*(\r?\n)*)/, /^(?:accTitle\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*\{\s*)/, /^(?:[\}])/, /^(?:[^\}]*)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:classDiagram-v2\b)/, /^(?:classDiagram\b)/, /^(?:\[\*\])/, /^(?:call[\s]+)/, /^(?:\([\s]*\))/, /^(?:\()/, /^(?:[^(]*)/, /^(?:\))/, /^(?:[^)]*)/, /^(?:["])/, /^(?:[^"]*)/, /^(?:["])/, /^(?:style\b)/, /^(?:classDef\b)/, /^(?:namespace\b)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:[{])/, /^(?:[}])/, /^(?:$)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:\[\*\])/, /^(?:class\b)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:[}])/, /^(?:[{])/, /^(?:[}])/, /^(?:$)/, /^(?:\[\*\])/, /^(?:[{])/, /^(?:[\n])/, /^(?:[^{}\n]*)/, /^(?:cssClass\b)/, /^(?:callback\b)/, /^(?:link\b)/, /^(?:click\b)/, /^(?:note for\b)/, /^(?:note\b)/, /^(?:<<)/, /^(?:>>)/, /^(?:href\b)/, /^(?:[~])/, /^(?:[^~]*)/, /^(?:~)/, /^(?:[`])/, /^(?:[^`]+)/, /^(?:[`])/, /^(?:_self\b)/, /^(?:_blank\b)/, /^(?:_parent\b)/, /^(?:_top\b)/, /^(?:\s*<\|)/, /^(?:\s*\|>)/, /^(?:\s*>)/, /^(?:\s*<)/, /^(?:\s*\*)/, /^(?:\s*o\b)/, /^(?:\s*\(\))/, /^(?:--)/, /^(?:\.\.)/, /^(?::{1}[^:\n;]+)/, /^(?::{3})/, /^(?:-)/, /^(?:\.)/, /^(?:\+)/, /^(?::)/, /^(?:,)/, /^(?:#)/, /^(?:#)/, /^(?:%)/, /^(?:=)/, /^(?:=)/, /^(?:\w+)/, /^(?:\[)/, /^(?:\])/, /^(?:[!"#$%&'*+,-.`?\\/])/, /^(?:[0-9]+)/, /^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/, /^(?:\s)/, /^(?:\s)/, /^(?:$)/],
918
+ conditions: { "namespace-body": { "rules": [26, 33, 34, 35, 36, 37, 38, 49, 50, 51, 52, 53, 54, 55, 56, 57, 60, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 97], "inclusive": false }, "namespace": { "rules": [26, 29, 30, 31, 32, 49, 50, 51, 52, 53, 54, 55, 56, 57, 60, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 97], "inclusive": false }, "class-body": { "rules": [26, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 60, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 97], "inclusive": false }, "class": { "rules": [26, 39, 40, 41, 42, 49, 50, 51, 52, 53, 54, 55, 56, 57, 60, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 97], "inclusive": false }, "acc_descr_multiline": { "rules": [11, 12, 26, 49, 50, 51, 52, 53, 54, 55, 56, 57, 60, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 97], "inclusive": false }, "acc_descr": { "rules": [9, 26, 49, 50, 51, 52, 53, 54, 55, 56, 57, 60, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 97], "inclusive": false }, "acc_title": { "rules": [7, 26, 49, 50, 51, 52, 53, 54, 55, 56, 57, 60, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 97], "inclusive": false }, "callback_args": { "rules": [22, 23, 26, 49, 50, 51, 52, 53, 54, 55, 56, 57, 60, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 97], "inclusive": false }, "callback_name": { "rules": [19, 20, 21, 26, 49, 50, 51, 52, 53, 54, 55, 56, 57, 60, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 97], "inclusive": false }, "href": { "rules": [26, 49, 50, 51, 52, 53, 54, 55, 56, 57, 60, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 97], "inclusive": false }, "struct": { "rules": [26, 49, 50, 51, 52, 53, 54, 55, 56, 57, 60, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 97], "inclusive": false }, "generic": { "rules": [26, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 97], "inclusive": false }, "bqstring": { "rules": [26, 49, 50, 51, 52, 53, 54, 55, 56, 57, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 97], "inclusive": false }, "string": { "rules": [24, 25, 26, 49, 50, 51, 52, 53, 54, 55, 56, 57, 60, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 97], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 5, 6, 8, 10, 13, 14, 15, 16, 17, 18, 26, 27, 28, 29, 38, 49, 50, 51, 52, 53, 54, 55, 56, 57, 60, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97], "inclusive": true } }
919
+ };
920
+ return lexer2;
921
+ })();
922
+ parser2.lexer = lexer;
923
+ function Parser() {
924
+ this.yy = {};
925
+ }
926
+ __name(Parser, "Parser");
927
+ Parser.prototype = parser2;
928
+ parser2.Parser = Parser;
929
+ return new Parser();
930
+ })();
931
+ parser.parser = parser;
932
+ var classDiagram_default = parser;
933
+ var visibilityValues = ["#", "+", "~", "-", ""];
934
+ var ClassMember = (_a = class {
935
+ constructor(input, memberType) {
936
+ this.memberType = memberType;
937
+ this.visibility = "";
938
+ this.classifier = "";
939
+ this.text = "";
940
+ const sanitizedInput = sanitizeText(input, getConfig2());
941
+ this.parseMember(sanitizedInput);
942
+ }
943
+ getDisplayDetails() {
944
+ let displayText = this.visibility + parseGenericTypes(this.id);
945
+ if (this.memberType === "method") {
946
+ displayText += `(${parseGenericTypes(this.parameters.trim())})`;
947
+ if (this.returnType) {
948
+ displayText += " : " + parseGenericTypes(this.returnType);
949
+ }
950
+ }
951
+ displayText = displayText.trim();
952
+ const cssStyle = this.parseClassifier();
953
+ return {
954
+ displayText,
955
+ cssStyle
956
+ };
957
+ }
958
+ parseMember(input) {
959
+ let potentialClassifier = "";
960
+ if (this.memberType === "method") {
961
+ const methodRegEx = /([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/;
962
+ const match = methodRegEx.exec(input);
963
+ if (match) {
964
+ const detectedVisibility = match[1] ? match[1].trim() : "";
965
+ if (visibilityValues.includes(detectedVisibility)) {
966
+ this.visibility = detectedVisibility;
967
+ }
968
+ this.id = match[2];
969
+ this.parameters = match[3] ? match[3].trim() : "";
970
+ potentialClassifier = match[4] ? match[4].trim() : "";
971
+ this.returnType = match[5] ? match[5].trim() : "";
972
+ if (potentialClassifier === "") {
973
+ const lastChar = this.returnType.substring(this.returnType.length - 1);
974
+ if (/[$*]/.exec(lastChar)) {
975
+ potentialClassifier = lastChar;
976
+ this.returnType = this.returnType.substring(0, this.returnType.length - 1);
977
+ }
978
+ }
979
+ }
980
+ } else {
981
+ const length = input.length;
982
+ const firstChar = input.substring(0, 1);
983
+ const lastChar = input.substring(length - 1);
984
+ if (visibilityValues.includes(firstChar)) {
985
+ this.visibility = firstChar;
986
+ }
987
+ if (/[$*]/.exec(lastChar)) {
988
+ potentialClassifier = lastChar;
989
+ }
990
+ this.id = input.substring(
991
+ this.visibility === "" ? 0 : 1,
992
+ potentialClassifier === "" ? length : length - 1
993
+ );
994
+ }
995
+ this.classifier = potentialClassifier;
996
+ this.id = this.id.startsWith(" ") ? " " + this.id.trim() : this.id.trim();
997
+ const combinedText = `${this.visibility ? "\\" + this.visibility : ""}${parseGenericTypes(this.id)}${this.memberType === "method" ? `(${parseGenericTypes(this.parameters)})${this.returnType ? " : " + parseGenericTypes(this.returnType) : ""}` : ""}`;
998
+ this.text = combinedText.replaceAll("<", "&lt;").replaceAll(">", "&gt;");
999
+ if (this.text.startsWith("\\&lt;")) {
1000
+ this.text = this.text.replace("\\&lt;", "~");
1001
+ }
1002
+ }
1003
+ parseClassifier() {
1004
+ switch (this.classifier) {
1005
+ case "*":
1006
+ return "font-style:italic;";
1007
+ case "$":
1008
+ return "text-decoration:underline;";
1009
+ default:
1010
+ return "";
1011
+ }
1012
+ }
1013
+ }, __name(_a, "ClassMember"), _a);
1014
+ var MERMAID_DOM_ID_PREFIX = "classId-";
1015
+ var classCounter = 0;
1016
+ var sanitizeText2 = /* @__PURE__ */ __name((txt) => common_default.sanitizeText(txt, getConfig2()), "sanitizeText");
1017
+ var ClassDB = (_b = class {
1018
+ constructor() {
1019
+ this.relations = [];
1020
+ this.classes = /* @__PURE__ */ new Map();
1021
+ this.styleClasses = /* @__PURE__ */ new Map();
1022
+ this.notes = [];
1023
+ this.interfaces = [];
1024
+ this.namespaces = /* @__PURE__ */ new Map();
1025
+ this.namespaceCounter = 0;
1026
+ this.functions = [];
1027
+ this.lineType = {
1028
+ LINE: 0,
1029
+ DOTTED_LINE: 1
1030
+ };
1031
+ this.relationType = {
1032
+ AGGREGATION: 0,
1033
+ EXTENSION: 1,
1034
+ COMPOSITION: 2,
1035
+ DEPENDENCY: 3,
1036
+ LOLLIPOP: 4
1037
+ };
1038
+ this.setupToolTips = /* @__PURE__ */ __name((element) => {
1039
+ let tooltipElem = select(".mermaidTooltip");
1040
+ if ((tooltipElem._groups || tooltipElem)[0][0] === null) {
1041
+ tooltipElem = select("body").append("div").attr("class", "mermaidTooltip").style("opacity", 0);
1042
+ }
1043
+ const svg = select(element).select("svg");
1044
+ const nodes = svg.selectAll("g.node");
1045
+ nodes.on("mouseover", (event) => {
1046
+ const el = select(event.currentTarget);
1047
+ const title = el.attr("title");
1048
+ if (title === null) {
1049
+ return;
1050
+ }
1051
+ const rect = this.getBoundingClientRect();
1052
+ tooltipElem.transition().duration(200).style("opacity", ".9");
1053
+ tooltipElem.text(el.attr("title")).style("left", window.scrollX + rect.left + (rect.right - rect.left) / 2 + "px").style("top", window.scrollY + rect.top - 14 + document.body.scrollTop + "px");
1054
+ tooltipElem.html(tooltipElem.html().replace(/&lt;br\/&gt;/g, "<br/>"));
1055
+ el.classed("hover", true);
1056
+ }).on("mouseout", (event) => {
1057
+ tooltipElem.transition().duration(500).style("opacity", 0);
1058
+ const el = select(event.currentTarget);
1059
+ el.classed("hover", false);
1060
+ });
1061
+ }, "setupToolTips");
1062
+ this.direction = "TB";
1063
+ this.setAccTitle = setAccTitle;
1064
+ this.getAccTitle = getAccTitle;
1065
+ this.setAccDescription = setAccDescription;
1066
+ this.getAccDescription = getAccDescription;
1067
+ this.setDiagramTitle = setDiagramTitle;
1068
+ this.getDiagramTitle = getDiagramTitle;
1069
+ this.getConfig = /* @__PURE__ */ __name(() => getConfig2().class, "getConfig");
1070
+ this.functions.push(this.setupToolTips.bind(this));
1071
+ this.clear();
1072
+ this.addRelation = this.addRelation.bind(this);
1073
+ this.addClassesToNamespace = this.addClassesToNamespace.bind(this);
1074
+ this.addNamespace = this.addNamespace.bind(this);
1075
+ this.setCssClass = this.setCssClass.bind(this);
1076
+ this.addMembers = this.addMembers.bind(this);
1077
+ this.addClass = this.addClass.bind(this);
1078
+ this.setClassLabel = this.setClassLabel.bind(this);
1079
+ this.addAnnotation = this.addAnnotation.bind(this);
1080
+ this.addMember = this.addMember.bind(this);
1081
+ this.cleanupLabel = this.cleanupLabel.bind(this);
1082
+ this.addNote = this.addNote.bind(this);
1083
+ this.defineClass = this.defineClass.bind(this);
1084
+ this.setDirection = this.setDirection.bind(this);
1085
+ this.setLink = this.setLink.bind(this);
1086
+ this.bindFunctions = this.bindFunctions.bind(this);
1087
+ this.clear = this.clear.bind(this);
1088
+ this.setTooltip = this.setTooltip.bind(this);
1089
+ this.setClickEvent = this.setClickEvent.bind(this);
1090
+ this.setCssStyle = this.setCssStyle.bind(this);
1091
+ }
1092
+ splitClassNameAndType(_id) {
1093
+ const id = common_default.sanitizeText(_id, getConfig2());
1094
+ let genericType = "";
1095
+ let className = id;
1096
+ if (id.indexOf("~") > 0) {
1097
+ const split = id.split("~");
1098
+ className = sanitizeText2(split[0]);
1099
+ genericType = sanitizeText2(split[1]);
1100
+ }
1101
+ return { className, type: genericType };
1102
+ }
1103
+ setClassLabel(_id, label) {
1104
+ const id = common_default.sanitizeText(_id, getConfig2());
1105
+ if (label) {
1106
+ label = sanitizeText2(label);
1107
+ }
1108
+ const { className } = this.splitClassNameAndType(id);
1109
+ this.classes.get(className).label = label;
1110
+ this.classes.get(className).text = `${label}${this.classes.get(className).type ? `<${this.classes.get(className).type}>` : ""}`;
1111
+ }
1112
+ /**
1113
+ * Function called by parser when a node definition has been found.
1114
+ *
1115
+ * @param id - ID of the class to add
1116
+ * @public
1117
+ */
1118
+ addClass(_id) {
1119
+ const id = common_default.sanitizeText(_id, getConfig2());
1120
+ const { className, type } = this.splitClassNameAndType(id);
1121
+ if (this.classes.has(className)) {
1122
+ return;
1123
+ }
1124
+ const name = common_default.sanitizeText(className, getConfig2());
1125
+ this.classes.set(name, {
1126
+ id: name,
1127
+ type,
1128
+ label: name,
1129
+ text: `${name}${type ? `&lt;${type}&gt;` : ""}`,
1130
+ shape: "classBox",
1131
+ cssClasses: "default",
1132
+ methods: [],
1133
+ members: [],
1134
+ annotations: [],
1135
+ styles: [],
1136
+ domId: MERMAID_DOM_ID_PREFIX + name + "-" + classCounter
1137
+ });
1138
+ classCounter++;
1139
+ }
1140
+ addInterface(label, classId) {
1141
+ const classInterface = {
1142
+ id: `interface${this.interfaces.length}`,
1143
+ label,
1144
+ classId
1145
+ };
1146
+ this.interfaces.push(classInterface);
1147
+ }
1148
+ /**
1149
+ * Function to lookup domId from id in the graph definition.
1150
+ *
1151
+ * @param id - class ID to lookup
1152
+ * @public
1153
+ */
1154
+ lookUpDomId(_id) {
1155
+ const id = common_default.sanitizeText(_id, getConfig2());
1156
+ if (this.classes.has(id)) {
1157
+ return this.classes.get(id).domId;
1158
+ }
1159
+ throw new Error("Class not found: " + id);
1160
+ }
1161
+ clear() {
1162
+ this.relations = [];
1163
+ this.classes = /* @__PURE__ */ new Map();
1164
+ this.notes = [];
1165
+ this.interfaces = [];
1166
+ this.functions = [];
1167
+ this.functions.push(this.setupToolTips.bind(this));
1168
+ this.namespaces = /* @__PURE__ */ new Map();
1169
+ this.namespaceCounter = 0;
1170
+ this.direction = "TB";
1171
+ clear();
1172
+ }
1173
+ getClass(id) {
1174
+ return this.classes.get(id);
1175
+ }
1176
+ getClasses() {
1177
+ return this.classes;
1178
+ }
1179
+ getRelations() {
1180
+ return this.relations;
1181
+ }
1182
+ getNotes() {
1183
+ return this.notes;
1184
+ }
1185
+ addRelation(classRelation) {
1186
+ log.debug("Adding relation: " + JSON.stringify(classRelation));
1187
+ const invalidTypes = [
1188
+ this.relationType.LOLLIPOP,
1189
+ this.relationType.AGGREGATION,
1190
+ this.relationType.COMPOSITION,
1191
+ this.relationType.DEPENDENCY,
1192
+ this.relationType.EXTENSION
1193
+ ];
1194
+ if (classRelation.relation.type1 === this.relationType.LOLLIPOP && !invalidTypes.includes(classRelation.relation.type2)) {
1195
+ this.addClass(classRelation.id2);
1196
+ this.addInterface(classRelation.id1, classRelation.id2);
1197
+ classRelation.id1 = `interface${this.interfaces.length - 1}`;
1198
+ } else if (classRelation.relation.type2 === this.relationType.LOLLIPOP && !invalidTypes.includes(classRelation.relation.type1)) {
1199
+ this.addClass(classRelation.id1);
1200
+ this.addInterface(classRelation.id2, classRelation.id1);
1201
+ classRelation.id2 = `interface${this.interfaces.length - 1}`;
1202
+ } else {
1203
+ this.addClass(classRelation.id1);
1204
+ this.addClass(classRelation.id2);
1205
+ }
1206
+ classRelation.id1 = this.splitClassNameAndType(classRelation.id1).className;
1207
+ classRelation.id2 = this.splitClassNameAndType(classRelation.id2).className;
1208
+ classRelation.relationTitle1 = common_default.sanitizeText(
1209
+ classRelation.relationTitle1.trim(),
1210
+ getConfig2()
1211
+ );
1212
+ classRelation.relationTitle2 = common_default.sanitizeText(
1213
+ classRelation.relationTitle2.trim(),
1214
+ getConfig2()
1215
+ );
1216
+ this.relations.push(classRelation);
1217
+ }
1218
+ /**
1219
+ * Adds an annotation to the specified class Annotations mark special properties of the given type
1220
+ * (like 'interface' or 'service')
1221
+ *
1222
+ * @param className - The class name
1223
+ * @param annotation - The name of the annotation without any brackets
1224
+ * @public
1225
+ */
1226
+ addAnnotation(className, annotation) {
1227
+ const validatedClassName = this.splitClassNameAndType(className).className;
1228
+ this.classes.get(validatedClassName).annotations.push(annotation);
1229
+ }
1230
+ /**
1231
+ * Adds a member to the specified class
1232
+ *
1233
+ * @param className - The class name
1234
+ * @param member - The full name of the member. If the member is enclosed in `<<brackets>>` it is
1235
+ * treated as an annotation If the member is ending with a closing bracket ) it is treated as a
1236
+ * method Otherwise the member will be treated as a normal property
1237
+ * @public
1238
+ */
1239
+ addMember(className, member) {
1240
+ this.addClass(className);
1241
+ const validatedClassName = this.splitClassNameAndType(className).className;
1242
+ const theClass = this.classes.get(validatedClassName);
1243
+ if (typeof member === "string") {
1244
+ const memberString = member.trim();
1245
+ if (memberString.startsWith("<<") && memberString.endsWith(">>")) {
1246
+ theClass.annotations.push(sanitizeText2(memberString.substring(2, memberString.length - 2)));
1247
+ } else if (memberString.indexOf(")") > 0) {
1248
+ theClass.methods.push(new ClassMember(memberString, "method"));
1249
+ } else if (memberString) {
1250
+ theClass.members.push(new ClassMember(memberString, "attribute"));
1251
+ }
1252
+ }
1253
+ }
1254
+ addMembers(className, members) {
1255
+ if (Array.isArray(members)) {
1256
+ members.reverse();
1257
+ members.forEach((member) => this.addMember(className, member));
1258
+ }
1259
+ }
1260
+ addNote(text, className) {
1261
+ const note = {
1262
+ id: `note${this.notes.length}`,
1263
+ class: className,
1264
+ text
1265
+ };
1266
+ this.notes.push(note);
1267
+ }
1268
+ cleanupLabel(label) {
1269
+ if (label.startsWith(":")) {
1270
+ label = label.substring(1);
1271
+ }
1272
+ return sanitizeText2(label.trim());
1273
+ }
1274
+ /**
1275
+ * Called by parser when assigning cssClass to a class
1276
+ *
1277
+ * @param ids - Comma separated list of ids
1278
+ * @param className - Class to add
1279
+ */
1280
+ setCssClass(ids, className) {
1281
+ ids.split(",").forEach((_id) => {
1282
+ let id = _id;
1283
+ if (/\d/.exec(_id[0])) {
1284
+ id = MERMAID_DOM_ID_PREFIX + id;
1285
+ }
1286
+ const classNode = this.classes.get(id);
1287
+ if (classNode) {
1288
+ classNode.cssClasses += " " + className;
1289
+ }
1290
+ });
1291
+ }
1292
+ defineClass(ids, style) {
1293
+ for (const id of ids) {
1294
+ let styleClass = this.styleClasses.get(id);
1295
+ if (styleClass === void 0) {
1296
+ styleClass = { id, styles: [], textStyles: [] };
1297
+ this.styleClasses.set(id, styleClass);
1298
+ }
1299
+ if (style) {
1300
+ style.forEach((s) => {
1301
+ if (/color/.exec(s)) {
1302
+ const newStyle = s.replace("fill", "bgFill");
1303
+ styleClass.textStyles.push(newStyle);
1304
+ }
1305
+ styleClass.styles.push(s);
1306
+ });
1307
+ }
1308
+ this.classes.forEach((value) => {
1309
+ if (value.cssClasses.includes(id)) {
1310
+ value.styles.push(...style.flatMap((s) => s.split(",")));
1311
+ }
1312
+ });
1313
+ }
1314
+ }
1315
+ /**
1316
+ * Called by parser when a tooltip is found, e.g. a clickable element.
1317
+ *
1318
+ * @param ids - Comma separated list of ids
1319
+ * @param tooltip - Tooltip to add
1320
+ */
1321
+ setTooltip(ids, tooltip) {
1322
+ ids.split(",").forEach((id) => {
1323
+ if (tooltip !== void 0) {
1324
+ this.classes.get(id).tooltip = sanitizeText2(tooltip);
1325
+ }
1326
+ });
1327
+ }
1328
+ getTooltip(id, namespace) {
1329
+ if (namespace && this.namespaces.has(namespace)) {
1330
+ return this.namespaces.get(namespace).classes.get(id).tooltip;
1331
+ }
1332
+ return this.classes.get(id).tooltip;
1333
+ }
1334
+ /**
1335
+ * Called by parser when a link is found. Adds the URL to the vertex data.
1336
+ *
1337
+ * @param ids - Comma separated list of ids
1338
+ * @param linkStr - URL to create a link for
1339
+ * @param target - Target of the link, _blank by default as originally defined in the svgDraw.js file
1340
+ */
1341
+ setLink(ids, linkStr, target) {
1342
+ const config = getConfig2();
1343
+ ids.split(",").forEach((_id) => {
1344
+ let id = _id;
1345
+ if (/\d/.exec(_id[0])) {
1346
+ id = MERMAID_DOM_ID_PREFIX + id;
1347
+ }
1348
+ const theClass = this.classes.get(id);
1349
+ if (theClass) {
1350
+ theClass.link = utils_default.formatUrl(linkStr, config);
1351
+ if (config.securityLevel === "sandbox") {
1352
+ theClass.linkTarget = "_top";
1353
+ } else if (typeof target === "string") {
1354
+ theClass.linkTarget = sanitizeText2(target);
1355
+ } else {
1356
+ theClass.linkTarget = "_blank";
1357
+ }
1358
+ }
1359
+ });
1360
+ this.setCssClass(ids, "clickable");
1361
+ }
1362
+ /**
1363
+ * Called by parser when a click definition is found. Registers an event handler.
1364
+ *
1365
+ * @param ids - Comma separated list of ids
1366
+ * @param functionName - Function to be called on click
1367
+ * @param functionArgs - Function args the function should be called with
1368
+ */
1369
+ setClickEvent(ids, functionName, functionArgs) {
1370
+ ids.split(",").forEach((id) => {
1371
+ this.setClickFunc(id, functionName, functionArgs);
1372
+ this.classes.get(id).haveCallback = true;
1373
+ });
1374
+ this.setCssClass(ids, "clickable");
1375
+ }
1376
+ setClickFunc(_domId, functionName, functionArgs) {
1377
+ const domId = common_default.sanitizeText(_domId, getConfig2());
1378
+ const config = getConfig2();
1379
+ if (config.securityLevel !== "loose") {
1380
+ return;
1381
+ }
1382
+ if (functionName === void 0) {
1383
+ return;
1384
+ }
1385
+ const id = domId;
1386
+ if (this.classes.has(id)) {
1387
+ const elemId = this.lookUpDomId(id);
1388
+ let argList = [];
1389
+ if (typeof functionArgs === "string") {
1390
+ argList = functionArgs.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);
1391
+ for (let i = 0; i < argList.length; i++) {
1392
+ let item = argList[i].trim();
1393
+ if (item.startsWith('"') && item.endsWith('"')) {
1394
+ item = item.substr(1, item.length - 2);
1395
+ }
1396
+ argList[i] = item;
1397
+ }
1398
+ }
1399
+ if (argList.length === 0) {
1400
+ argList.push(elemId);
1401
+ }
1402
+ this.functions.push(() => {
1403
+ const elem = document.querySelector(`[id="${elemId}"]`);
1404
+ if (elem !== null) {
1405
+ elem.addEventListener(
1406
+ "click",
1407
+ () => {
1408
+ utils_default.runFunc(functionName, ...argList);
1409
+ },
1410
+ false
1411
+ );
1412
+ }
1413
+ });
1414
+ }
1415
+ }
1416
+ bindFunctions(element) {
1417
+ this.functions.forEach((fun) => {
1418
+ fun(element);
1419
+ });
1420
+ }
1421
+ getDirection() {
1422
+ return this.direction;
1423
+ }
1424
+ setDirection(dir) {
1425
+ this.direction = dir;
1426
+ }
1427
+ /**
1428
+ * Function called by parser when a namespace definition has been found.
1429
+ *
1430
+ * @param id - ID of the namespace to add
1431
+ * @public
1432
+ */
1433
+ addNamespace(id) {
1434
+ if (this.namespaces.has(id)) {
1435
+ return;
1436
+ }
1437
+ this.namespaces.set(id, {
1438
+ id,
1439
+ classes: /* @__PURE__ */ new Map(),
1440
+ children: {},
1441
+ domId: MERMAID_DOM_ID_PREFIX + id + "-" + this.namespaceCounter
1442
+ });
1443
+ this.namespaceCounter++;
1444
+ }
1445
+ getNamespace(name) {
1446
+ return this.namespaces.get(name);
1447
+ }
1448
+ getNamespaces() {
1449
+ return this.namespaces;
1450
+ }
1451
+ /**
1452
+ * Function called by parser when a namespace definition has been found.
1453
+ *
1454
+ * @param id - ID of the namespace to add
1455
+ * @param classNames - IDs of the class to add
1456
+ * @public
1457
+ */
1458
+ addClassesToNamespace(id, classNames) {
1459
+ if (!this.namespaces.has(id)) {
1460
+ return;
1461
+ }
1462
+ for (const name of classNames) {
1463
+ const { className } = this.splitClassNameAndType(name);
1464
+ this.classes.get(className).parent = id;
1465
+ this.namespaces.get(id).classes.set(className, this.classes.get(className));
1466
+ }
1467
+ }
1468
+ setCssStyle(id, styles) {
1469
+ const thisClass = this.classes.get(id);
1470
+ if (!styles || !thisClass) {
1471
+ return;
1472
+ }
1473
+ for (const s of styles) {
1474
+ if (s.includes(",")) {
1475
+ thisClass.styles.push(...s.split(","));
1476
+ } else {
1477
+ thisClass.styles.push(s);
1478
+ }
1479
+ }
1480
+ }
1481
+ /**
1482
+ * Gets the arrow marker for a type index
1483
+ *
1484
+ * @param type - The type to look for
1485
+ * @returns The arrow marker
1486
+ */
1487
+ getArrowMarker(type) {
1488
+ let marker;
1489
+ switch (type) {
1490
+ case 0:
1491
+ marker = "aggregation";
1492
+ break;
1493
+ case 1:
1494
+ marker = "extension";
1495
+ break;
1496
+ case 2:
1497
+ marker = "composition";
1498
+ break;
1499
+ case 3:
1500
+ marker = "dependency";
1501
+ break;
1502
+ case 4:
1503
+ marker = "lollipop";
1504
+ break;
1505
+ default:
1506
+ marker = "none";
1507
+ }
1508
+ return marker;
1509
+ }
1510
+ getData() {
1511
+ const nodes = [];
1512
+ const edges = [];
1513
+ const config = getConfig2();
1514
+ for (const namespaceKey of this.namespaces.keys()) {
1515
+ const namespace = this.namespaces.get(namespaceKey);
1516
+ if (namespace) {
1517
+ const node = {
1518
+ id: namespace.id,
1519
+ label: namespace.id,
1520
+ isGroup: true,
1521
+ padding: config.class.padding ?? 16,
1522
+ // parent node must be one of [rect, roundedWithTitle, noteGroup, divider]
1523
+ shape: "rect",
1524
+ cssStyles: ["fill: none", "stroke: black"],
1525
+ look: config.look
1526
+ };
1527
+ nodes.push(node);
1528
+ }
1529
+ }
1530
+ for (const classKey of this.classes.keys()) {
1531
+ const classNode = this.classes.get(classKey);
1532
+ if (classNode) {
1533
+ const node = classNode;
1534
+ node.parentId = classNode.parent;
1535
+ node.look = config.look;
1536
+ nodes.push(node);
1537
+ }
1538
+ }
1539
+ let cnt = 0;
1540
+ for (const note of this.notes) {
1541
+ cnt++;
1542
+ const noteNode = {
1543
+ id: note.id,
1544
+ label: note.text,
1545
+ isGroup: false,
1546
+ shape: "note",
1547
+ padding: config.class.padding ?? 6,
1548
+ cssStyles: [
1549
+ "text-align: left",
1550
+ "white-space: nowrap",
1551
+ `fill: ${config.themeVariables.noteBkgColor}`,
1552
+ `stroke: ${config.themeVariables.noteBorderColor}`
1553
+ ],
1554
+ look: config.look
1555
+ };
1556
+ nodes.push(noteNode);
1557
+ const noteClassId = this.classes.get(note.class)?.id ?? "";
1558
+ if (noteClassId) {
1559
+ const edge = {
1560
+ id: `edgeNote${cnt}`,
1561
+ start: note.id,
1562
+ end: noteClassId,
1563
+ type: "normal",
1564
+ thickness: "normal",
1565
+ classes: "relation",
1566
+ arrowTypeStart: "none",
1567
+ arrowTypeEnd: "none",
1568
+ arrowheadStyle: "",
1569
+ labelStyle: [""],
1570
+ style: ["fill: none"],
1571
+ pattern: "dotted",
1572
+ look: config.look
1573
+ };
1574
+ edges.push(edge);
1575
+ }
1576
+ }
1577
+ for (const _interface of this.interfaces) {
1578
+ const interfaceNode = {
1579
+ id: _interface.id,
1580
+ label: _interface.label,
1581
+ isGroup: false,
1582
+ shape: "rect",
1583
+ cssStyles: ["opacity: 0;"],
1584
+ look: config.look
1585
+ };
1586
+ nodes.push(interfaceNode);
1587
+ }
1588
+ cnt = 0;
1589
+ for (const classRelation of this.relations) {
1590
+ cnt++;
1591
+ const edge = {
1592
+ id: getEdgeId(classRelation.id1, classRelation.id2, {
1593
+ prefix: "id",
1594
+ counter: cnt
1595
+ }),
1596
+ start: classRelation.id1,
1597
+ end: classRelation.id2,
1598
+ type: "normal",
1599
+ label: classRelation.title,
1600
+ labelpos: "c",
1601
+ thickness: "normal",
1602
+ classes: "relation",
1603
+ arrowTypeStart: this.getArrowMarker(classRelation.relation.type1),
1604
+ arrowTypeEnd: this.getArrowMarker(classRelation.relation.type2),
1605
+ startLabelRight: classRelation.relationTitle1 === "none" ? "" : classRelation.relationTitle1,
1606
+ endLabelLeft: classRelation.relationTitle2 === "none" ? "" : classRelation.relationTitle2,
1607
+ arrowheadStyle: "",
1608
+ labelStyle: ["display: inline-block"],
1609
+ style: classRelation.style || "",
1610
+ pattern: classRelation.relation.lineType == 1 ? "dashed" : "solid",
1611
+ look: config.look
1612
+ };
1613
+ edges.push(edge);
1614
+ }
1615
+ return { nodes, edges, other: {}, config, direction: this.getDirection() };
1616
+ }
1617
+ }, __name(_b, "ClassDB"), _b);
1618
+ var getStyles = /* @__PURE__ */ __name((options) => `g.classGroup text {
1619
+ fill: ${options.nodeBorder || options.classText};
1620
+ stroke: none;
1621
+ font-family: ${options.fontFamily};
1622
+ font-size: 10px;
1623
+
1624
+ .title {
1625
+ font-weight: bolder;
1626
+ }
1627
+
1628
+ }
1629
+
1630
+ .nodeLabel, .edgeLabel {
1631
+ color: ${options.classText};
1632
+ }
1633
+ .edgeLabel .label rect {
1634
+ fill: ${options.mainBkg};
1635
+ }
1636
+ .label text {
1637
+ fill: ${options.classText};
1638
+ }
1639
+
1640
+ .labelBkg {
1641
+ background: ${options.mainBkg};
1642
+ }
1643
+ .edgeLabel .label span {
1644
+ background: ${options.mainBkg};
1645
+ }
1646
+
1647
+ .classTitle {
1648
+ font-weight: bolder;
1649
+ }
1650
+ .node rect,
1651
+ .node circle,
1652
+ .node ellipse,
1653
+ .node polygon,
1654
+ .node path {
1655
+ fill: ${options.mainBkg};
1656
+ stroke: ${options.nodeBorder};
1657
+ stroke-width: 1px;
1658
+ }
1659
+
1660
+
1661
+ .divider {
1662
+ stroke: ${options.nodeBorder};
1663
+ stroke-width: 1;
1664
+ }
1665
+
1666
+ g.clickable {
1667
+ cursor: pointer;
1668
+ }
1669
+
1670
+ g.classGroup rect {
1671
+ fill: ${options.mainBkg};
1672
+ stroke: ${options.nodeBorder};
1673
+ }
1674
+
1675
+ g.classGroup line {
1676
+ stroke: ${options.nodeBorder};
1677
+ stroke-width: 1;
1678
+ }
1679
+
1680
+ .classLabel .box {
1681
+ stroke: none;
1682
+ stroke-width: 0;
1683
+ fill: ${options.mainBkg};
1684
+ opacity: 0.5;
1685
+ }
1686
+
1687
+ .classLabel .label {
1688
+ fill: ${options.nodeBorder};
1689
+ font-size: 10px;
1690
+ }
1691
+
1692
+ .relation {
1693
+ stroke: ${options.lineColor};
1694
+ stroke-width: 1;
1695
+ fill: none;
1696
+ }
1697
+
1698
+ .dashed-line{
1699
+ stroke-dasharray: 3;
1700
+ }
1701
+
1702
+ .dotted-line{
1703
+ stroke-dasharray: 1 2;
1704
+ }
1705
+
1706
+ #compositionStart, .composition {
1707
+ fill: ${options.lineColor} !important;
1708
+ stroke: ${options.lineColor} !important;
1709
+ stroke-width: 1;
1710
+ }
1711
+
1712
+ #compositionEnd, .composition {
1713
+ fill: ${options.lineColor} !important;
1714
+ stroke: ${options.lineColor} !important;
1715
+ stroke-width: 1;
1716
+ }
1717
+
1718
+ #dependencyStart, .dependency {
1719
+ fill: ${options.lineColor} !important;
1720
+ stroke: ${options.lineColor} !important;
1721
+ stroke-width: 1;
1722
+ }
1723
+
1724
+ #dependencyStart, .dependency {
1725
+ fill: ${options.lineColor} !important;
1726
+ stroke: ${options.lineColor} !important;
1727
+ stroke-width: 1;
1728
+ }
1729
+
1730
+ #extensionStart, .extension {
1731
+ fill: transparent !important;
1732
+ stroke: ${options.lineColor} !important;
1733
+ stroke-width: 1;
1734
+ }
1735
+
1736
+ #extensionEnd, .extension {
1737
+ fill: transparent !important;
1738
+ stroke: ${options.lineColor} !important;
1739
+ stroke-width: 1;
1740
+ }
1741
+
1742
+ #aggregationStart, .aggregation {
1743
+ fill: transparent !important;
1744
+ stroke: ${options.lineColor} !important;
1745
+ stroke-width: 1;
1746
+ }
1747
+
1748
+ #aggregationEnd, .aggregation {
1749
+ fill: transparent !important;
1750
+ stroke: ${options.lineColor} !important;
1751
+ stroke-width: 1;
1752
+ }
1753
+
1754
+ #lollipopStart, .lollipop {
1755
+ fill: ${options.mainBkg} !important;
1756
+ stroke: ${options.lineColor} !important;
1757
+ stroke-width: 1;
1758
+ }
1759
+
1760
+ #lollipopEnd, .lollipop {
1761
+ fill: ${options.mainBkg} !important;
1762
+ stroke: ${options.lineColor} !important;
1763
+ stroke-width: 1;
1764
+ }
1765
+
1766
+ .edgeTerminals {
1767
+ font-size: 11px;
1768
+ line-height: initial;
1769
+ }
1770
+
1771
+ .classTitleText {
1772
+ text-anchor: middle;
1773
+ font-size: 18px;
1774
+ fill: ${options.textColor};
1775
+ }
1776
+ ${getIconStyles()}
1777
+ `, "getStyles");
1778
+ var styles_default = getStyles;
1779
+ var getDir = /* @__PURE__ */ __name((parsedItem, defaultDir = "TB") => {
1780
+ if (!parsedItem.doc) {
1781
+ return defaultDir;
1782
+ }
1783
+ let dir = defaultDir;
1784
+ for (const parsedItemDoc of parsedItem.doc) {
1785
+ if (parsedItemDoc.stmt === "dir") {
1786
+ dir = parsedItemDoc.value;
1787
+ }
1788
+ }
1789
+ return dir;
1790
+ }, "getDir");
1791
+ var getClasses = /* @__PURE__ */ __name(function(text, diagramObj) {
1792
+ return diagramObj.db.getClasses();
1793
+ }, "getClasses");
1794
+ var draw = /* @__PURE__ */ __name(async function(text, id, _version, diag) {
1795
+ log.info("REF0:");
1796
+ log.info("Drawing class diagram (v3)", id);
1797
+ const { securityLevel, state: conf, layout } = getConfig2();
1798
+ const data4Layout = diag.db.getData();
1799
+ const svg = getDiagramElement(id, securityLevel);
1800
+ data4Layout.type = diag.type;
1801
+ data4Layout.layoutAlgorithm = getRegisteredLayoutAlgorithm(layout);
1802
+ data4Layout.nodeSpacing = conf?.nodeSpacing || 50;
1803
+ data4Layout.rankSpacing = conf?.rankSpacing || 50;
1804
+ data4Layout.markers = ["aggregation", "extension", "composition", "dependency", "lollipop"];
1805
+ data4Layout.diagramId = id;
1806
+ await render(data4Layout, svg);
1807
+ const padding = 8;
1808
+ utils_default.insertTitle(
1809
+ svg,
1810
+ "classDiagramTitleText",
1811
+ conf?.titleTopMargin ?? 25,
1812
+ diag.db.getDiagramTitle()
1813
+ );
1814
+ setupViewPortForSVG(svg, padding, "classDiagram", conf?.useMaxWidth ?? true);
1815
+ }, "draw");
1816
+ var classRenderer_v3_unified_default = {
1817
+ getClasses,
1818
+ draw,
1819
+ getDir
1820
+ };
1821
+ export {
1822
+ ClassDB as C,
1823
+ classDiagram_default as a,
1824
+ classRenderer_v3_unified_default as c,
1825
+ styles_default as s
1826
+ };
1827
+ //# sourceMappingURL=chunk-B4BG7PRW-CMJmtYzq.js.map