vibelet 1.2.248 → 1.2.249

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 (181) hide show
  1. package/dist/index.cjs +1 -1
  2. package/dist/inventory-scan-worker.cjs +1 -1
  3. package/dist/remoteDirect/manifest.json +12 -12
  4. package/dist/runtime-version.cjs +1 -1
  5. package/dist/web/assets/App-CqANyaMK.css +97 -0
  6. package/dist/web/assets/App-gwVbOIB1.js +2 -0
  7. package/dist/web/assets/BrowserControlPanel-ChZyiZg8.js +1 -0
  8. package/dist/web/assets/{ChatPane-CzxrCqL_.css → ChatPane-CWKGXZWT.css} +1 -1
  9. package/dist/web/assets/ChatPane-fH0IY48w.js +1 -0
  10. package/dist/web/assets/{ChipGroup-7CAhvUt1.js → ChipGroup-0exv9rzn.js} +1 -1
  11. package/dist/web/assets/ComposerMenus-DhMX49q9.js +1 -0
  12. package/dist/web/assets/DiffDrawer-D4eELjEe.js +1 -0
  13. package/dist/web/assets/FilesControlPanel-Bz4i0bf2.js +1 -0
  14. package/dist/web/assets/FilesControlPanel-JMh8U1IC.css +1 -0
  15. package/dist/web/assets/{GlobalPendingDialog--lYE48cR.js → GlobalPendingDialog-tews3DVC.js} +1 -1
  16. package/dist/web/assets/ImageViewer-BojwpCb-.js +1 -0
  17. package/dist/web/assets/{LanguageSettingsPanel-EPESHevZ.js → LanguageSettingsPanel-C1ZHQpVG.js} +1 -1
  18. package/dist/web/assets/{MarkdownModePanel-CGJDuUhg.js → MarkdownModePanel-B4iVncFO.js} +1 -1
  19. package/dist/web/assets/NewSessionDialog-CsOHExrY.js +1 -0
  20. package/dist/web/assets/{NotificationSettingsPanel-CYmXEnsF.js → NotificationSettingsPanel-BA0Lj4kT.js} +1 -1
  21. package/dist/web/assets/{PanelFind-CQnWpcIB.js → PanelFind-D_pRPFBN.js} +1 -1
  22. package/dist/web/assets/RemoteLifeOSBlock-CZkQLmE5.js +2 -0
  23. package/dist/web/assets/{RemoteWorkspaceSettings-DzHtw75P.js → RemoteWorkspaceSettings-tDqbDqj4.js} +1 -1
  24. package/dist/web/assets/{SessionTerminalPanel-i2N28V0A.js → SessionTerminalPanel-B-TvX4Fz.js} +2 -2
  25. package/dist/web/assets/{SpeechInputSettingsPanel-Ig45GnlA.js → SpeechInputSettingsPanel-Buqwjrth.js} +1 -1
  26. package/dist/web/assets/{ThemeSettingsPanel-C02iFM8b.js → ThemeSettingsPanel-Bph9zVcN.js} +1 -1
  27. package/dist/web/assets/{__vite-browser-external-2447137e-D97de6th.js → __vite-browser-external-2447137e-Dbwxx6PZ.js} +1 -1
  28. package/dist/web/assets/_baseMerge-YHvLFG89.js +1 -0
  29. package/dist/web/assets/{_initCloneObject-BR1zWEqJ.js → _initCloneObject-CgHgrY9n.js} +1 -1
  30. package/dist/web/assets/abnfDiagram-VRR7QNED-dJfL32qR.js +1 -0
  31. package/dist/web/assets/arc-BYAxnPQ_.js +1 -0
  32. package/dist/web/assets/architectureDiagram-ZJ3FMSHR-LXgKoYZv.js +1 -0
  33. package/dist/web/assets/{arrow-left-BL56KTLD.js → arrow-left-CagvtJU8.js} +1 -1
  34. package/dist/web/assets/{arrow-right-BV-uA_nA.js → arrow-right-CW797wzk.js} +1 -1
  35. package/dist/web/assets/blockDiagram-677ZJIJ3-BOLqwY0y.js +1 -0
  36. package/dist/web/assets/c4Diagram-LMCZKHZV-BvwC7DIr.js +1 -0
  37. package/dist/web/assets/channel-DpGkajT1.js +1 -0
  38. package/dist/web/assets/chevron-up-DfL2d5fV.js +1 -0
  39. package/dist/web/assets/{chunk-2Q5K7J3B-C8JBUKrX.js → chunk-2Q5K7J3B-D2B_BdaG.js} +1 -1
  40. package/dist/web/assets/{chunk-32BRIVSS-DCe9Y9ii.js → chunk-32BRIVSS-B93XkYif.js} +1 -1
  41. package/dist/web/assets/{chunk-5VM5RSS4-CJ5XB5TH.js → chunk-5VM5RSS4-Uv1D4oA2.js} +1 -1
  42. package/dist/web/assets/{chunk-EX3LRPZG-DbBMJLot.js → chunk-EX3LRPZG-xZrFFOcj.js} +1 -1
  43. package/dist/web/assets/{chunk-JWPE2WC7-BHVdLkDM.js → chunk-JWPE2WC7-1--FpPFR.js} +1 -1
  44. package/dist/web/assets/{chunk-MOJQB5TN-uHzAp-k5.js → chunk-MOJQB5TN-BLOL5fhw.js} +1 -1
  45. package/dist/web/assets/{chunk-RYQCIY6F-Cn6aFViK.js → chunk-RYQCIY6F-z7wmcSRp.js} +1 -1
  46. package/dist/web/assets/{chunk-V7JOEXUC-DxPwkXTU.js → chunk-V7JOEXUC-DPvobQwd.js} +1 -1
  47. package/dist/web/assets/{chunk-VR4S4FIN-O5Mrjsjy.js → chunk-VR4S4FIN-DD3Gj91z.js} +1 -1
  48. package/dist/web/assets/{chunk-XXDRQBXY-0mC3mDJF.js → chunk-XXDRQBXY-DoVRk31D.js} +1 -1
  49. package/dist/web/assets/classDiagram-OUVF2IWQ-oZMIKKng.js +1 -0
  50. package/dist/web/assets/classDiagram-v2-EOCWNBFH-oZMIKKng.js +1 -0
  51. package/dist/web/assets/clsx-DoZLeicy.js +1 -0
  52. package/dist/web/assets/collectMessageImages-B2EAkrhU.js +1 -0
  53. package/dist/web/assets/cose-bilkent-JH36ORCC-BQknAy25.js +1 -0
  54. package/dist/web/assets/{cynefin-VYW2F7L2-CO9lWPZn.js → cynefin-VYW2F7L2-09uNSfvT.js} +1 -1
  55. package/dist/web/assets/cynefinDiagram-TSTJHNR4-CgKhj0m5.js +1 -0
  56. package/dist/web/assets/dagre-VKFMJZFB-CLCxvrOo.js +1 -0
  57. package/dist/web/assets/diagram-FQU43EPY-B4VfNgsF.js +1 -0
  58. package/dist/web/assets/diagram-G47NLZAW-CQC0I6zX.js +1 -0
  59. package/dist/web/assets/diagram-NH7WQ7WH-CSBbTiMh.js +1 -0
  60. package/dist/web/assets/diagram-OA4YK3LP-CkUx0v34.js +1 -0
  61. package/dist/web/assets/diagram-WEI45ONY-dlEY_W2R.js +1 -0
  62. package/dist/web/assets/ebnfDiagram-CCIWWBDH-BsxdwE2E.js +1 -0
  63. package/dist/web/assets/erDiagram-Q63AITRT-CE8BUsrY.js +1 -0
  64. package/dist/web/assets/{file-editor-FileCodeEditor-CkMO-zP9.js → file-editor-FileCodeEditor-HR6Wsm5I.js} +1 -1
  65. package/dist/web/assets/{file-editor-ObsidianCodeEditor-Ct5ku7x2.js → file-editor-ObsidianCodeEditor-BMcU5Aqo.js} +6 -6
  66. package/dist/web/assets/file-editor-ObsidianFileEditor-BuzsfQwA.js +2 -0
  67. package/dist/web/assets/{flowDiagram-23GEKE2U-DfTXu8Tf.js → flowDiagram-23GEKE2U-DUiI830l.js} +1 -1
  68. package/dist/web/assets/{folder-plus-DeXueDPL.js → folder-plus-Byi2WQUY.js} +1 -1
  69. package/dist/web/assets/ganttDiagram-NO4QXBWP-x0WR7K4r.js +1 -0
  70. package/dist/web/assets/gitGraphDiagram-IHSO6WYX-BJA7zQjW.js +1 -0
  71. package/dist/web/assets/highlighted-body-TPN3WLV5-lW0JmP5H.js +1 -0
  72. package/dist/web/assets/index-1M7_HtDu.js +1 -0
  73. package/dist/web/assets/index-76-ZfKAK.css +1 -0
  74. package/dist/web/assets/index-8TM1eFHE.js +1 -0
  75. package/dist/web/assets/index-S4bzeLfy.js +1 -0
  76. package/dist/web/assets/{index-BaK7b1aP.js → index-c9Eb0rEZ.js} +2 -2
  77. package/dist/web/assets/infoDiagram-FWYZ7A6U-BfA2fWjL.js +1 -0
  78. package/dist/web/assets/ishikawaDiagram-FXEZZL3T-B7WW0j7E.js +1 -0
  79. package/dist/web/assets/journeyDiagram-5HDEW3XC-BEMtGLhR.js +1 -0
  80. package/dist/web/assets/kanban-definition-HUTT4EX6-DqIkrGPA.js +1 -0
  81. package/dist/web/assets/{key-round-DRT2ZbDR.js → key-round-y1oxWXOB.js} +1 -1
  82. package/dist/web/assets/{layout-CmMX872C.js → layout-CAp4KseL.js} +1 -1
  83. package/dist/web/assets/{linear-Bv80xPYH.js → linear-DRFQGBEA.js} +1 -1
  84. package/dist/web/assets/logo-iv8HSlJj.webp +0 -0
  85. package/dist/web/assets/{map-Dwt0FgOz.js → map-XtUTTYLw.js} +1 -1
  86. package/dist/web/assets/mermaid-O7DHMXV3-9HC6mORt.js +2 -0
  87. package/dist/web/assets/{mermaid.core-CzqhAinL.js → mermaid.core-LEKKQwXZ.js} +2 -2
  88. package/dist/web/assets/{mic-DhJeizK9.js → mic-BOKcmdUn.js} +1 -1
  89. package/dist/web/assets/mindmap-definition-LN4V7U3C-Bt6LtGWO.js +1 -0
  90. package/dist/web/assets/pegDiagram-2B236MQR-DVdodUA1.js +1 -0
  91. package/dist/web/assets/pieDiagram-ENE6RG2P-CeQnXIl7.js +1 -0
  92. package/dist/web/assets/quadrantDiagram-ABIIQ3AL-DNGl4Hse.js +1 -0
  93. package/dist/web/assets/railroadDiagram-RFXS5EU6-BiFr0x3V.js +1 -0
  94. package/dist/web/assets/requirementDiagram-TGXJPOKE-DIx4dpS7.js +1 -0
  95. package/dist/web/assets/sankeyDiagram-HTMAVEWB-D_zRhmQ_.js +1 -0
  96. package/dist/web/assets/sequenceDiagram-DBY2YBRQ-ChMRMmPd.js +1 -0
  97. package/dist/web/assets/{shield-check-CwbnsnOe.js → shield-check-DM9poYLJ.js} +1 -1
  98. package/dist/web/assets/sizeCapture-X5ZJPWSS-CLVxFMDT.js +1 -0
  99. package/dist/web/assets/square-K9kFBDil.js +1 -0
  100. package/dist/web/assets/stateDiagram-2N3HPSRC-Dn7yCHtf.js +1 -0
  101. package/dist/web/assets/stateDiagram-v2-6OUMAXLB-DkgnQPrP.js +1 -0
  102. package/dist/web/assets/swimlanes-5IMT3BWC-Dhut6RY-.js +2 -0
  103. package/dist/web/assets/swimlanesDiagram-G3AALYLV-D62G5R34.js +1 -0
  104. package/dist/web/assets/timeline-definition-FHXFAJF6-D_9aY3SL.js +1 -0
  105. package/dist/web/assets/useComposerCompletion-DcHhaHlX.js +1 -0
  106. package/dist/web/assets/vennDiagram-L72KCM5P-Bxsjs1td.js +1 -0
  107. package/dist/web/assets/wardleyDiagram-EHGQE667-B8vO0orG.js +1 -0
  108. package/dist/web/assets/xychartDiagram-FW5EYKEG-CUBLdGVB.js +1 -0
  109. package/dist/web/assets/{zap-CJH1FjCl.js → zap-4rbaTb6R.js} +1 -1
  110. package/dist/web/index.html +2 -2
  111. package/dist/web/obsidian-editor-assets.json +1 -1
  112. package/package.json +7 -7
  113. package/dist/web/assets/App-BvW36-4M.js +0 -2
  114. package/dist/web/assets/App-DAtZu22A.css +0 -97
  115. package/dist/web/assets/BrowserControlPanel-DmDwrRxu.js +0 -1
  116. package/dist/web/assets/ChatPane-RyWUI1bq.js +0 -2
  117. package/dist/web/assets/ComposerMenus-D1uWPFXr.js +0 -1
  118. package/dist/web/assets/DiffDrawer-BEGVqU1n.js +0 -1
  119. package/dist/web/assets/FilesControlPanel-BXXKMrYD.js +0 -1
  120. package/dist/web/assets/FilesControlPanel-DeLKfCiq.css +0 -1
  121. package/dist/web/assets/ImageViewer-dOitFny1.js +0 -1
  122. package/dist/web/assets/MessageImage-BtpNPUOG.js +0 -1
  123. package/dist/web/assets/MessageImage-XcPrPLDn.css +0 -1
  124. package/dist/web/assets/NewSessionDialog-DgmnoXsk.js +0 -1
  125. package/dist/web/assets/RemoteLifeOSBlock-gBVCJ1KA.js +0 -2
  126. package/dist/web/assets/_baseMerge-DBQbsGvS.js +0 -1
  127. package/dist/web/assets/abnfDiagram-VRR7QNED-DmwaYNlH.js +0 -1
  128. package/dist/web/assets/arc-j_Wwjf6k.js +0 -1
  129. package/dist/web/assets/architectureDiagram-ZJ3FMSHR-glqGay8y.js +0 -1
  130. package/dist/web/assets/blockDiagram-677ZJIJ3-B8c7J04C.js +0 -1
  131. package/dist/web/assets/c4Diagram-LMCZKHZV-CG3zztsH.js +0 -1
  132. package/dist/web/assets/channel-DgblqPfw.js +0 -1
  133. package/dist/web/assets/chevron-up-CvywgAdp.js +0 -1
  134. package/dist/web/assets/classDiagram-OUVF2IWQ-bsBy4PcE.js +0 -1
  135. package/dist/web/assets/classDiagram-v2-EOCWNBFH-bsBy4PcE.js +0 -1
  136. package/dist/web/assets/collectMessageImages-BjN-Gevg.js +0 -1
  137. package/dist/web/assets/cose-bilkent-JH36ORCC-BgHa3fCS.js +0 -1
  138. package/dist/web/assets/cynefinDiagram-TSTJHNR4-0Z9seUPF.js +0 -1
  139. package/dist/web/assets/dagre-VKFMJZFB-BTOqPL06.js +0 -1
  140. package/dist/web/assets/diagram-FQU43EPY-BPXD1X4G.js +0 -1
  141. package/dist/web/assets/diagram-G47NLZAW-DKhfIaJX.js +0 -1
  142. package/dist/web/assets/diagram-NH7WQ7WH-TJq_qxyk.js +0 -1
  143. package/dist/web/assets/diagram-OA4YK3LP-DTkDt5xm.js +0 -1
  144. package/dist/web/assets/diagram-WEI45ONY-CPTKbbj_.js +0 -1
  145. package/dist/web/assets/ebnfDiagram-CCIWWBDH-6j_AlAL7.js +0 -1
  146. package/dist/web/assets/erDiagram-Q63AITRT-CF7E_ZqO.js +0 -1
  147. package/dist/web/assets/file-editor-ObsidianFileEditor-aYLrufoa.js +0 -2
  148. package/dist/web/assets/ganttDiagram-NO4QXBWP-CrYbCAop.js +0 -1
  149. package/dist/web/assets/gitGraphDiagram-IHSO6WYX-DckwoanW.js +0 -1
  150. package/dist/web/assets/highlighted-body-TPN3WLV5-CxmpyVYz.js +0 -1
  151. package/dist/web/assets/imageViewerCopy-S5HtozB3.js +0 -1
  152. package/dist/web/assets/index-BNl2LlC5.js +0 -1
  153. package/dist/web/assets/index-C_vQZvvM.js +0 -1
  154. package/dist/web/assets/index-CjLh4QgJ.js +0 -1
  155. package/dist/web/assets/index-FQXZYOsr.js +0 -1
  156. package/dist/web/assets/index-xAMW1ul2.css +0 -1
  157. package/dist/web/assets/infoDiagram-FWYZ7A6U-DFF0Gmic.js +0 -1
  158. package/dist/web/assets/ishikawaDiagram-FXEZZL3T-Cv-VE1wB.js +0 -1
  159. package/dist/web/assets/journeyDiagram-5HDEW3XC-ByLfT2Us.js +0 -1
  160. package/dist/web/assets/kanban-definition-HUTT4EX6-DHBZws3R.js +0 -1
  161. package/dist/web/assets/logo-Caf1Fn81.webp +0 -0
  162. package/dist/web/assets/mermaid-O7DHMXV3-B4_lK8p1.js +0 -2
  163. package/dist/web/assets/mindmap-definition-LN4V7U3C-Bnyri0I2.js +0 -1
  164. package/dist/web/assets/pegDiagram-2B236MQR-6X6OAtrD.js +0 -1
  165. package/dist/web/assets/pieDiagram-ENE6RG2P-DdtY7NGx.js +0 -1
  166. package/dist/web/assets/quadrantDiagram-ABIIQ3AL-BDqHj-TT.js +0 -1
  167. package/dist/web/assets/railroadDiagram-RFXS5EU6-B5lI016a.js +0 -1
  168. package/dist/web/assets/requirementDiagram-TGXJPOKE-DsEgsQJj.js +0 -1
  169. package/dist/web/assets/sankeyDiagram-HTMAVEWB-C0ypjxpz.js +0 -1
  170. package/dist/web/assets/sequenceDiagram-DBY2YBRQ-CMshcz69.js +0 -1
  171. package/dist/web/assets/sizeCapture-X5ZJPWSS-Db9dkTnd.js +0 -1
  172. package/dist/web/assets/stateDiagram-2N3HPSRC-C6srGQcS.js +0 -1
  173. package/dist/web/assets/stateDiagram-v2-6OUMAXLB-BubiXOGD.js +0 -1
  174. package/dist/web/assets/swimlanes-5IMT3BWC-B1YoJvr3.js +0 -2
  175. package/dist/web/assets/swimlanesDiagram-G3AALYLV-B02Fdgr_.js +0 -1
  176. package/dist/web/assets/timeline-definition-FHXFAJF6-CRG13zHS.js +0 -1
  177. package/dist/web/assets/useComposerCompletion-DmtYYaK9.js +0 -1
  178. package/dist/web/assets/useMessageImage-D-dQN21J.js +0 -1
  179. package/dist/web/assets/vennDiagram-L72KCM5P-BN5Bx-tU.js +0 -1
  180. package/dist/web/assets/wardleyDiagram-EHGQE667-C2kiCoYR.js +0 -1
  181. package/dist/web/assets/xychartDiagram-FW5EYKEG-CVzHNjnj.js +0 -1
@@ -1 +1 @@
1
- var t;import{g as e}from"./chunk-XXDRQBXY-0mC3mDJF.js";import{s}from"./chunk-VR4S4FIN-O5Mrjsjy.js";import{_ as i,l as n,c as r,x as o,y as a,a as c,b as l,g as h,s as d,o as u,p,a8 as y,k as g,q as f,d as m}from"./mermaid.core-CzqhAinL.js";import{f as S}from"./chunk-32BRIVSS-DCe9Y9ii.js";import{p as k}from"./purify.es-BNLkGfTg.js";var b=function(){var t=i(function(t,e,s,i){for(s=s||{},i=t.length;i--;s[t[i]]=e);return s},"o"),e=[1,2],s=[1,3],n=[1,4],r=[2,4],o=[1,9],a=[1,11],c=[1,16],l=[1,17],h=[1,18],d=[1,19],u=[1,33],p=[1,20],y=[1,21],g=[1,22],f=[1,23],m=[1,24],S=[1,26],k=[1,27],b=[1,28],T=[1,29],_=[1,30],E=[1,31],x=[1,32],C=[1,35],$=[1,36],D=[1,37],v=[1,38],I=[1,34],A=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],L=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],w=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],N={trace:i(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"--\x3e":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"--\x3e",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:i(function(t,e,s,i,n,r,o){var a=r.length-1;switch(n){case 3:return i.setRootDoc(r[a]),r[a];case 4:this.$=[];break;case 5:"nl"!=r[a]&&(r[a-1].push(r[a]),this.$=r[a-1]);break;case 6:case 7:case 12:this.$=r[a];break;case 8:this.$="nl";break;case 13:const t=r[a-1];t.description=i.trimColon(r[a]),this.$=t;break;case 14:this.$={stmt:"relation",state1:r[a-2],state2:r[a]};break;case 15:const e=i.trimColon(r[a]);this.$={stmt:"relation",state1:r[a-3],state2:r[a-1],description:e};break;case 19:this.$={stmt:"state",id:r[a-3],type:"default",description:"",doc:r[a-1]};break;case 20:var c=r[a],l=r[a-2].trim();if(r[a].match(":")){var h=r[a].split(":");c=h[0],l=[l,h[1]]}this.$={stmt:"state",id:c,type:"default",description:l};break;case 21:this.$={stmt:"state",id:r[a-3],type:"default",description:r[a-5],doc:r[a-1]};break;case 22:this.$={stmt:"state",id:r[a],type:"fork"};break;case 23:this.$={stmt:"state",id:r[a],type:"join"};break;case 24:this.$={stmt:"state",id:r[a],type:"choice"};break;case 25:this.$={stmt:"state",id:i.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:r[a-1].trim(),note:{position:r[a-2].trim(),text:r[a].trim()}};break;case 29:this.$=r[a].trim(),i.setAccTitle(this.$);break;case 30:case 31:this.$=r[a].trim(),i.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:r[a-3],url:r[a-2],tooltip:r[a-1]};break;case 33:this.$={stmt:"click",id:r[a-3],url:r[a-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:r[a-1].trim(),classes:r[a].trim()};break;case 36:this.$={stmt:"style",id:r[a-1].trim(),styleClass:r[a].trim()};break;case 37:this.$={stmt:"applyClass",id:r[a-1].trim(),styleClass:r[a].trim()};break;case 38:i.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:i.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:i.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:i.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:r[a].trim(),type:"default",description:""};break;case 46:case 47:this.$={stmt:"state",id:r[a-2].trim(),classes:[r[a].trim()],type:"default",description:""}}},"anonymous"),table:[{3:1,4:e,5:s,6:n},{1:[3]},{3:5,4:e,5:s,6:n},{3:6,4:e,5:s,6:n},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],r,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:o,5:a,8:8,9:10,10:12,11:13,12:14,13:15,16:c,17:l,19:h,22:d,24:u,25:p,26:y,27:g,28:f,29:m,32:25,33:S,35:k,37:b,38:T,41:_,45:E,48:x,51:C,52:$,53:D,54:v,57:I},t(A,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:c,17:l,19:h,22:d,24:u,25:p,26:y,27:g,28:f,29:m,32:25,33:S,35:k,37:b,38:T,41:_,45:E,48:x,51:C,52:$,53:D,54:v,57:I},t(A,[2,7]),t(A,[2,8]),t(A,[2,9]),t(A,[2,10]),t(A,[2,11]),t(A,[2,12],{14:[1,40],15:[1,41]}),t(A,[2,16]),{18:[1,42]},t(A,[2,18],{20:[1,43]}),{23:[1,44]},t(A,[2,22]),t(A,[2,23]),t(A,[2,24]),t(A,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(A,[2,28]),{34:[1,49]},{36:[1,50]},t(A,[2,31]),{13:51,24:u,57:I},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(L,[2,44],{58:[1,56]}),t(L,[2,45],{58:[1,57]}),t(A,[2,38]),t(A,[2,39]),t(A,[2,40]),t(A,[2,41]),t(A,[2,6]),t(A,[2,13]),{13:58,24:u,57:I},t(A,[2,17]),t(w,r,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(A,[2,29]),t(A,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(A,[2,14],{14:[1,71]}),{4:o,5:a,8:8,9:10,10:12,11:13,12:14,13:15,16:c,17:l,19:h,21:[1,72],22:d,24:u,25:p,26:y,27:g,28:f,29:m,32:25,33:S,35:k,37:b,38:T,41:_,45:E,48:x,51:C,52:$,53:D,54:v,57:I},t(A,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(A,[2,34]),t(A,[2,35]),t(A,[2,36]),t(A,[2,37]),t(L,[2,46]),t(L,[2,47]),t(A,[2,15]),t(A,[2,19]),t(w,r,{7:78}),t(A,[2,26]),t(A,[2,27]),{5:[1,79]},{5:[1,80]},{4:o,5:a,8:8,9:10,10:12,11:13,12:14,13:15,16:c,17:l,19:h,21:[1,81],22:d,24:u,25:p,26:y,27:g,28:f,29:m,32:25,33:S,35:k,37:b,38:T,41:_,45:E,48:x,51:C,52:$,53:D,54:v,57:I},t(A,[2,32]),t(A,[2,33]),t(A,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:i(function(t,e){if(!e.recoverable){var s=new Error(t);throw s.hash=e,s}this.trace(t)},"parseError"),parse:i(function(t){var e=this,s=[0],n=[],r=[null],o=[],a=this.table,c="",l=0,h=0,d=o.slice.call(arguments,1),u=Object.create(this.lexer),p={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(p.yy[y]=this.yy[y]);u.setInput(t,p.yy),p.yy.lexer=u,p.yy.parser=this,void 0===u.yylloc&&(u.yylloc={});var g=u.yylloc;o.push(g);var f=u.options&&u.options.ranges;function m(){var t;return"number"!=typeof(t=n.pop()||u.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,i(function(t){s.length=s.length-2*t,r.length=r.length-t,o.length=o.length-t},"popStack"),i(m,"lex");for(var S,k,b,T,_,E,x,C,$={};;){if(k=s[s.length-1],this.defaultActions[k]?b=this.defaultActions[k]:(null==S&&(S=m()),b=a[k]&&a[k][S]),void 0===b||!b.length||!b[0]){var D;for(_ in C=[],a[k])this.terminals_[_]&&_>2&&C.push("'"+this.terminals_[_]+"'");D=u.showPosition?"Parse error on line "+(l+1)+":\n"+u.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[S]||S)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==S?"end of input":"'"+(this.terminals_[S]||S)+"'"),this.parseError(D,{text:u.match,token:this.terminals_[S]||S,line:u.yylineno,loc:g,expected:C})}if(b[0]instanceof Array&&b.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+S);switch(b[0]){case 1:s.push(S),r.push(u.yytext),o.push(u.yylloc),s.push(b[1]),S=null,h=u.yyleng,c=u.yytext,l=u.yylineno,g=u.yylloc;break;case 2:if(E=this.productions_[b[1]][1],$.$=r[r.length-E],$._$={first_line:o[o.length-(E||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(E||1)].first_column,last_column:o[o.length-1].last_column},f&&($._$.range=[o[o.length-(E||1)].range[0],o[o.length-1].range[1]]),void 0!==(T=this.performAction.apply($,[c,h,l,p.yy,b[1],r,o].concat(d))))return T;E&&(s=s.slice(0,-1*E*2),r=r.slice(0,-1*E),o=o.slice(0,-1*E)),s.push(this.productions_[b[1]][0]),r.push($.$),o.push($._$),x=a[s[s.length-2]][s[s.length-1]],s.push(x);break;case 3:return!0}}return!0},"parse")},O=function(){return{EOF:1,parseError:i(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:i(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:i(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:i(function(t){var e=t.length,s=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),s.length-1&&(this.yylineno-=s.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:s?(s.length===i.length?this.yylloc.first_column:0)+i[i.length-s.length].length-s[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:i(function(){return this._more=!0,this},"more"),reject:i(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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(),{text:"",token:null,line:this.yylineno})},"reject"),less:i(function(t){this.unput(this.match.slice(t))},"less"),pastInput:i(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:i(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:i(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:i(function(t,e){var s,i,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],s=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack){for(var r in n)this[r]=n[r];return!1}return!1},"test_match"),next:i(function(){if(this.done)return this.EOF;var t,e,s,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),r=0;r<n.length;r++)if((s=this._input.match(this.rules[n[r]]))&&(!e||s[0].length>e[0].length)){if(e=s,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(s,n[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:i(function(){return this.next()||this.lex()},"lex"),begin:i(function(t){this.conditionStack.push(t)},"begin"),popState:i(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:i(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:i(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:i(function(t){this.begin(t)},"pushState"),stateStackSize:i(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:i(function(t,e,s,n){function r(){const s=e.yytext.indexOf("%%");if(0===s)return!1;if(s>0){const i=e.yytext.slice(0,s),n=e.yytext.slice(s);n&&t.lexer.unput(n),e.yytext=i}return!0}switch(i(r,"processId"),s){case 0:return 38;case 1:return 40;case 2:return 39;case 3:return 44;case 4:case 43:return 51;case 5:case 44:return 52;case 6:case 45:return 53;case 7:case 46:return 54;case 8:case 78:return 5;case 9:case 10:case 11:case 12:case 57:case 63:break;case 13:case 33:return this.pushState("SCALE"),17;case 14:case 34:return 18;case 15:case 21:case 35:case 50:case 54:this.popState();break;case 16:return this.begin("acc_title"),33;case 17:return this.popState(),"acc_title_value";case 18:return this.begin("acc_descr"),35;case 19:return this.popState(),"acc_descr_value";case 20:this.begin("acc_descr_multiline");break;case 22:return"acc_descr_multiline_value";case 23:return this.pushState("CLASSDEF"),41;case 24:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 25:return this.popState(),this.pushState("CLASSDEFID"),42;case 26:return this.popState(),43;case 27:return this.pushState("CLASS"),48;case 28:return this.popState(),this.pushState("CLASS_STYLE"),49;case 29:return this.popState(),50;case 30:return this.pushState("STYLE"),45;case 31:return this.popState(),this.pushState("STYLEDEF_STYLES"),46;case 32:return this.popState(),47;case 36:this.pushState("STATE");break;case 37:case 40:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),25;case 38:case 41:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),26;case 39:case 42:return this.popState(),e.yytext=e.yytext.slice(0,-10).trim(),27;case 47:this.pushState("STATE_STRING");break;case 48:return this.pushState("STATE_ID"),"AS";case 49:case 65:if(!r())return;return this.popState(),"ID";case 51:return"STATE_DESCR";case 52:throw new Error('Error: State name must be a single word. Found: "'+e.yytext.trim()+'"');case 53:return 19;case 55:return this.popState(),this.pushState("struct"),20;case 56:return this.popState(),21;case 58:return this.begin("NOTE"),29;case 59:return this.popState(),this.pushState("NOTE_ID"),59;case 60:return this.popState(),this.pushState("NOTE_ID"),60;case 61:this.popState(),this.pushState("FLOATING_NOTE");break;case 62:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 64:return"NOTE_TEXT";case 66:if(!r())return;return this.popState(),this.pushState("NOTE_TEXT"),24;case 67:return this.popState(),e.yytext=e.yytext.substr(2).trim(),31;case 68:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),31;case 69:case 70:return 6;case 71:return 16;case 72:return 57;case 73:if(!r())return;return 24;case 74:return e.yytext=e.yytext.trim(),14;case 75:return 15;case 76:return 28;case 77:return 58;case 79:return"INVALID"}},"anonymous"),rules:[/^(?:click\b)/i,/^(?:href\b)/i,/^(?:"[^"]*")/i,/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:style\s+)/i,/^(?:[\w,]+\s+)/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*<<choice>>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\w+\s+\w+.*?\{)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?\n\s*end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:(?:[^:\n;]|:[^:\n;])+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[10,11,12],inclusive:!1},struct:{rules:[10,11,12,23,27,30,36,43,44,45,46,56,57,58,72,73,74,75,76,77],inclusive:!1},FLOATING_NOTE_ID:{rules:[65],inclusive:!1},FLOATING_NOTE:{rules:[62,63,64],inclusive:!1},NOTE_TEXT:{rules:[67,68],inclusive:!1},NOTE_ID:{rules:[66],inclusive:!1},NOTE:{rules:[59,60,61],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[32],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[31],inclusive:!1},CLASS_STYLE:{rules:[29],inclusive:!1},CLASS:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[26],inclusive:!1},CLASSDEF:{rules:[24,25],inclusive:!1},acc_descr_multiline:{rules:[21,22],inclusive:!1},acc_descr:{rules:[19],inclusive:!1},acc_title:{rules:[17],inclusive:!1},SCALE:{rules:[14,15,34,35],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[49],inclusive:!1},STATE_STRING:{rules:[50,51],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[10,11,12,37,38,39,40,41,42,47,48,52,53,54,55],inclusive:!1},ID:{rules:[10,11,12],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,12,13,16,18,20,23,27,30,33,36,55,58,69,70,71,72,73,74,75,77,78,79],inclusive:!0}}}}();function R(){this.yy={}}return N.lexer=O,i(R,"Parser"),R.prototype=N,N.Parser=R,new R}();b.parser=b;var T=b,_="state",E="root",x="relation",C="default",$="divider",D="fill:none",v="fill: #333",I="markdown",A="normal",L="rect",w="rectWithTitle",N="divider",O="roundedWithTitle",R="statediagram",B=`${R}-state`,F="transition",P=`${F} note-edge`,Y=`${R}-note`,G=`${R}-cluster`,j=`${R}-cluster-alt`,z="parent",W="note",M="----",U=`${M}${W}`,X=`${M}${z}`,V=i((t,e="TB")=>{if(!t.doc)return e;let s=e;for(const i of t.doc)"dir"===i.stmt&&(s=i.value);return s},"getDir"),H={getClasses:i(function(t,e){return e.db.getClasses()},"getClasses"),draw:i(async function(t,i,c,l){n.info("REF0:"),n.info("Drawing state diagram (v2)",i);const{securityLevel:h,state:d,layout:u}=r();l.db.extract(l.db.getRootDocV2());const p=l.db.getData(),y=e(i,h);p.type=l.type,p.layoutAlgorithm=u,p.nodeSpacing=d?.nodeSpacing||50,p.rankSpacing=d?.rankSpacing||50,"neo"===r().look?p.markers=["barbNeo"]:p.markers=["barb"],p.diagramId=i,await o(p,y);try{("function"==typeof l.db.getLinks?l.db.getLinks():new Map).forEach((t,e)=>{const s="string"==typeof e?e:"string"==typeof e?.id?e.id:"",i=p.nodes.find(t=>t.id===s);if(!s)return void n.warn("⚠️ Invalid or missing stateId from key:",JSON.stringify(e));const r=y.node()?.querySelectorAll("g.node, g.rough-node");let o;if(r?.forEach(t=>{const e=t.textContent?.trim();t.id!==i?.domId&&e!==s||(o=t)}),!o)return void n.warn("⚠️ Could not find node matching text:",s);const a=o.parentNode;if(!a)return void n.warn("⚠️ Node has no parent, cannot wrap:",s);const c=document.createElementNS("http://www.w3.org/2000/svg","a"),l=t.url.replace(/^"+|"+$/g,"");if(c.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l),c.setAttribute("target","_blank"),t.tooltip){const e=t.tooltip.replace(/^"+|"+$/g,"");c.setAttribute("title",e),o.setAttribute("title",e)}a.replaceChild(c,o),c.appendChild(o),n.info("🔗 Wrapped node in <a> tag for:",s,t.url)})}catch(g){n.error("❌ Error injecting clickable links:",g)}a.insertTitle(y,"statediagramTitleText",d?.titleTopMargin??25,l.db.getDiagramTitle()),s(y,8,R,d?.useMaxWidth??!0)},"draw"),getDir:V},J=new Map,K=0;function q(t="",e=0,s="",i=M){return`state-${t}${null!==s&&s.length>0?`${i}${s}`:""}-${e}`}i(q,"stateDomId");var Q=i((t,e,s,i,o,a,c,l)=>{n.trace("items",e),e.forEach(e=>{switch(e.stmt){case _:case C:it(t,e,s,i,o,a,c,l);break;case x:{it(t,e.state1,s,i,o,a,c,l),it(t,e.state2,s,i,o,a,c,l);const n="neo"===c,h={id:"edge"+K,start:e.state1.id,end:e.state2.id,arrowhead:"normal",arrowTypeEnd:n?"arrow_barb_neo":"arrow_barb",style:D,labelStyle:"",label:g.sanitizeText(e.description??"",r()),arrowheadStyle:v,labelpos:"c",labelType:I,thickness:A,classes:F,look:c};o.push(h),K++}}})},"setupDoc"),Z=i((t,e="TB")=>{let s=e;if(t.doc)for(const i of t.doc)"dir"===i.stmt&&(s=i.value);return s},"getDir");function tt(t,e,s){if(!e.id||"</join></fork>"===e.id||"</choice>"===e.id)return;e.cssClasses&&(Array.isArray(e.cssCompiledStyles)||(e.cssCompiledStyles=[]),e.cssClasses.split(" ").forEach(t=>{const i=s.get(t);i&&(e.cssCompiledStyles=[...e.cssCompiledStyles??[],...i.styles])}));const i=t.find(t=>t.id===e.id);i?Object.assign(i,e):t.push(e)}function et(t){return t?.classes?.join(" ")??""}function st(t){return t?.styles??[]}i(tt,"insertOrUpdateNode"),i(et,"getClassesFromDbInfo"),i(st,"getStylesFromDbInfo");var it=i((t,e,s,i,o,a,c,l)=>{const h=e.id,d=s.get(h),u=et(d),p=st(d),y=r();if(n.info("dataFetcher parsedItem",e,d,p),"root"!==h){let s=L;!0===e.start?s="stateStart":!1===e.start&&(s="stateEnd"),e.type!==C&&(s=e.type),J.get(h)||J.set(h,{id:h,shape:s,description:g.sanitizeText(h,y),cssClasses:`${u} ${B}`,cssStyles:p});const r=J.get(h);e.description&&(Array.isArray(r.description)?(r.shape=w,r.description.push(e.description)):r.description?.length&&r.description.length>0?(r.shape=w,r.description===h?r.description=[e.description]:r.description=[r.description,e.description]):(r.shape=L,r.description=e.description),r.description=g.sanitizeTextOrArray(r.description,y)),1===r.description?.length&&r.shape===w&&("group"===r.type?r.shape=O:r.shape=L),!r.type&&e.doc&&(n.info("Setting cluster for XCX",h,Z(e)),r.type="group",r.isGroup=!0,r.dir=Z(e),r.explicitDir=e.doc.some(t=>"dir"===t.stmt),r.shape=e.type===$?N:O,r.cssClasses=`${r.cssClasses} ${G} ${a?j:""}`);const d={labelStyle:"",shape:r.shape,label:r.description,cssClasses:r.cssClasses,cssCompiledStyles:[],cssStyles:r.cssStyles,id:h,dir:r.dir,domId:q(h,K),type:r.type,isGroup:"group"===r.type,padding:8,rx:10,ry:10,look:c,labelType:"markdown"};if(d.shape===N&&(d.label=""),t&&"root"!==t.id&&(n.trace("Setting node ",h," to be child of its parent ",t.id),d.parentId=t.id),d.centerLabel=!0,e.note){const t={labelStyle:"",shape:"note",label:e.note.text,labelType:"markdown",cssClasses:Y,cssStyles:[],cssCompiledStyles:[],id:h+U+"-"+K,domId:q(h,K,W),type:r.type,isGroup:"group"===r.type,padding:y.flowchart?.padding,look:c,position:e.note.position},s=h+X,n={labelStyle:"",shape:"noteGroup",label:e.note.text,cssClasses:r.cssClasses,cssStyles:[],id:h+X,domId:q(h,K,z),type:"group",isGroup:!0,padding:16,look:c,position:e.note.position};K++,n.id=s,t.parentId=s,tt(i,n,l),tt(i,t,l),tt(i,d,l);let a=h,u=t.id;"left of"===e.note.position&&(a=t.id,u=h),o.push({id:a+"-"+u,start:a,end:u,arrowhead:"none",arrowTypeEnd:"",style:D,labelStyle:"",classes:P,arrowheadStyle:v,labelpos:"c",labelType:I,thickness:A,look:c})}else tt(i,d,l)}e.doc&&(n.trace("Adding nodes children "),Q(e,e.doc,s,i,o,!a,c,l))},"dataFetcher"),nt=i(()=>{J.clear(),K=0},"reset"),rt="[*]",ot="start",at="color",ct="fill",lt=i(()=>new Map,"newClassesList"),ht=i(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),dt=i(t=>JSON.parse(JSON.stringify(t)),"clone"),ut=(i(t=class{constructor(t){this.version=t,this.nodes=[],this.edges=[],this.rootDoc=[],this.classes=lt(),this.documents={root:ht()},this.currentDocument=this.documents.root,this.startEndCount=0,this.dividerCnt=0,this.links=new Map,this.funs=[],this.getAccTitle=c,this.setAccTitle=l,this.getAccDescription=h,this.setAccDescription=d,this.setDiagramTitle=u,this.getDiagramTitle=p,this.clear(),this.setRootDoc=this.setRootDoc.bind(this),this.getDividerId=this.getDividerId.bind(this),this.setDirection=this.setDirection.bind(this),this.trimColon=this.trimColon.bind(this),this.bindFunctions=this.bindFunctions.bind(this)}extract(t){this.clear(!0);for(const i of Array.isArray(t)?t:t.doc)switch(i.stmt){case _:this.addState(i.id.trim(),i.type,i.doc,i.description,i.note);break;case x:this.addRelation(i.state1,i.state2,i.description);break;case"classDef":this.addStyleClass(i.id.trim(),i.classes);break;case"style":this.handleStyleDef(i);break;case"applyClass":this.setCssClass(i.id.trim(),i.styleClass);break;case"click":this.addLink(i.id,i.url,i.tooltip)}const e=this.getStates(),s=r();nt(),it(void 0,this.getRootDocV2(),e,this.nodes,this.edges,!0,s.look,this.classes);for(const i of this.nodes)if(Array.isArray(i.label)){if(i.description=i.label.slice(1),i.isGroup&&i.description.length>0)throw new Error(`Group nodes can only have label. Remove the additional description for node [${i.id}]`);i.label=i.label[0]}}handleStyleDef(t){const e=t.id.trim().split(","),s=t.styleClass.split(",");for(const i of e){let t=this.getState(i);if(!t){const e=i.trim();this.addState(e),t=this.getState(e)}t&&(t.styles=s.map(t=>t.replace(/;/g,"")?.trim()))}}setRootDoc(t){n.info("Setting root doc",t),this.rootDoc=t,1===this.version?this.extract(t):this.extract(this.getRootDocV2())}docTranslator(t,e,s){if(e.stmt===x)return this.docTranslator(t,e.state1,!0),void this.docTranslator(t,e.state2,!1);if(e.stmt===_&&(e.id===rt?(e.id=t.id+(s?"_start":"_end"),e.start=s):e.id=e.id.trim()),e.stmt!==E&&e.stmt!==_||!e.doc)return;const i=[];let n=[];for(const r of e.doc)if(r.type===$){const t=dt(r);t.doc=dt(n),i.push(t),n=[]}else n.push(r);if(i.length>0&&n.length>0){const t={stmt:_,id:y(),type:"divider",doc:dt(n)};i.push(dt(t)),e.doc=i}e.doc.forEach(t=>this.docTranslator(e,t,!0))}getRootDocV2(){return this.docTranslator({id:E,stmt:E},{id:E,stmt:E,doc:this.rootDoc},!0),{id:E,doc:this.rootDoc}}addState(t,e=C,s=void 0,i=void 0,o=void 0,a=void 0,c=void 0,l=void 0){const h=t?.trim();if(this.currentDocument.states.has(h)){const t=this.currentDocument.states.get(h);if(!t)throw new Error(`State not found: ${h}`);t.doc||(t.doc=s),t.type||(t.type=e)}else n.info("Adding state ",h,i),this.currentDocument.states.set(h,{stmt:_,id:h,descriptions:[],type:e,doc:s,note:o,classes:[],styles:[],textStyles:[]});if(i&&(n.info("Setting state description",h,i),(Array.isArray(i)?i:[i]).forEach(t=>this.addDescription(h,t.trim()))),o){const t=this.currentDocument.states.get(h);if(!t)throw new Error(`State not found: ${h}`);t.note=o,t.note.text=g.sanitizeText(t.note.text,r())}a&&(n.info("Setting state classes",h,a),(Array.isArray(a)?a:[a]).forEach(t=>this.setCssClass(h,t.trim()))),c&&(n.info("Setting state styles",h,c),(Array.isArray(c)?c:[c]).forEach(t=>this.setStyle(h,t.trim()))),l&&(n.info("Setting state styles",h,c),(Array.isArray(l)?l:[l]).forEach(t=>this.setTextStyle(h,t.trim())))}clear(t){this.nodes=[],this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.documents={root:ht()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=lt(),t||(this.links=new Map,f())}getState(t){return this.currentDocument.states.get(t)}getStates(){return this.currentDocument.states}logDocuments(){n.info("Documents = ",this.documents)}getRelations(){return this.currentDocument.relations}addLink(t,e,s){this.links.set(t,{url:e,tooltip:s}),n.warn("Adding link",t,e,s)}getLinks(){return this.links}startIdIfNeeded(t=""){return t===rt?(this.startEndCount++,`${ot}${this.startEndCount}`):t}startTypeIfNeeded(t="",e=C){return t===rt?ot:e}endIdIfNeeded(t=""){return"[*]"===t?(this.startEndCount++,`end${this.startEndCount}`):t}endTypeIfNeeded(t="",e=C){return"[*]"===t?"end":e}addRelationObjs(t,e,s=""){const i=this.startIdIfNeeded(t.id.trim()),n=this.startTypeIfNeeded(t.id.trim(),t.type),o=this.startIdIfNeeded(e.id.trim()),a=this.startTypeIfNeeded(e.id.trim(),e.type);this.addState(i,n,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),this.addState(o,a,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),this.currentDocument.relations.push({id1:i,id2:o,relationTitle:g.sanitizeText(s,r())})}addRelation(t,e,s){if("object"==typeof t&&"object"==typeof e)this.addRelationObjs(t,e,s);else if("string"==typeof t&&"string"==typeof e){const i=this.startIdIfNeeded(t.trim()),n=this.startTypeIfNeeded(t),o=this.endIdIfNeeded(e.trim()),a=this.endTypeIfNeeded(e);this.addState(i,n),this.addState(o,a),this.currentDocument.relations.push({id1:i,id2:o,relationTitle:s?g.sanitizeText(s,r()):void 0})}}addDescription(t,e){const s=this.currentDocument.states.get(t),i=e.startsWith(":")?e.replace(":","").trim():e;s?.descriptions?.push(g.sanitizeText(i,r()))}cleanupLabel(t){return t.startsWith(":")?t.slice(2).trim():t.trim()}getDividerId(){return this.dividerCnt++,`divider-id-${this.dividerCnt}`}addStyleClass(t,e=""){this.classes.has(t)||this.classes.set(t,{id:t,styles:[],textStyles:[]});const s=this.classes.get(t);e&&s&&e.split(",").forEach(t=>{const e=t.replace(/([^;]*);/,"$1").trim();if(RegExp(at).exec(t)){const t=e.replace(ct,"bgFill").replace(at,ct);s.textStyles.push(t)}s.styles.push(e)})}getClasses(){return this.classes}setupToolTips(t){const e=S();m(t).select("svg").selectAll("g.node, g.rough-node").on("mouseover",t=>{const s=m(t.currentTarget),i=s.attr("title");if(null===i)return;const n=t.currentTarget?.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.style("left",window.scrollX+n.left+(n.right-n.left)/2+"px").style("top",window.scrollY+n.bottom+"px"),e.html(k.sanitize(i)),s.classed("hover",!0)}).on("mouseout",t=>{e.transition().duration(500).style("opacity",0),m(t.currentTarget).classed("hover",!1)})}setCssClass(t,e){t.split(",").forEach(t=>{let s=this.getState(t);if(!s){const e=t.trim();this.addState(e),s=this.getState(e)}s?.classes?.push(e)})}setStyle(t,e){this.getState(t)?.styles?.push(e)}setTextStyle(t,e){this.getState(t)?.textStyles?.push(e)}bindFunctions(t){this.funs.forEach(e=>{e(t)})}getDirectionStatement(){return this.rootDoc.find(t=>"dir"===t.stmt)}getDirection(){return this.getDirectionStatement()?.value??"TB"}setDirection(t){const e=this.getDirectionStatement();e?e.value=t:this.rootDoc.unshift({stmt:"dir",value:t})}trimColon(t){return t.startsWith(":")?t.slice(1).trim():t.trim()}getData(){const t=r();return{nodes:this.nodes,edges:this.edges,other:{},config:t,direction:V(this.getRootDocV2())}}getConfig(){return r().state}},"StateDB"),t.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},t),pt=i(t=>`\ndefs [id$="-barbEnd"] {\n fill: ${t.transitionColor};\n stroke: ${t.transitionColor};\n }\ng.stateGroup text {\n fill: ${t.nodeBorder};\n stroke: none;\n font-size: 10px;\n}\ng.stateGroup text {\n fill: ${t.textColor};\n stroke: none;\n font-size: 10px;\n\n}\ng.stateGroup .state-title {\n font-weight: bolder;\n fill: ${t.stateLabelColor};\n}\n\ng.stateGroup rect {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n}\n\ng.stateGroup line {\n stroke: ${t.lineColor};\n stroke-width: ${t.strokeWidth||1};\n}\n\n.transition {\n stroke: ${t.transitionColor};\n stroke-width: ${t.strokeWidth||1};\n fill: none;\n}\n\n.stateGroup .composit {\n fill: ${t.background};\n border-bottom: 1px\n}\n\n.stateGroup .alt-composit {\n fill: #e0e0e0;\n border-bottom: 1px\n}\n\n.state-note {\n stroke: ${t.noteBorderColor};\n fill: ${t.noteBkgColor};\n\n text {\n fill: ${t.noteTextColor};\n stroke: none;\n font-size: 10px;\n }\n}\n\n.stateLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ${t.mainBkg};\n opacity: 0.5;\n}\n\n.edgeLabel .label rect {\n fill: ${t.labelBackgroundColor};\n opacity: 0.5;\n}\n.edgeLabel {\n background-color: ${t.edgeLabelBackground};\n p {\n background-color: ${t.edgeLabelBackground};\n }\n rect {\n opacity: 0.5;\n background-color: ${t.edgeLabelBackground};\n fill: ${t.edgeLabelBackground};\n }\n text-align: center;\n}\n.edgeLabel .label text {\n fill: ${t.transitionLabelColor||t.tertiaryTextColor};\n}\n.label div .edgeLabel {\n color: ${t.transitionLabelColor||t.tertiaryTextColor};\n}\n\n.stateLabel text {\n fill: ${t.stateLabelColor};\n font-size: 10px;\n font-weight: bold;\n}\n\n.node circle.state-start {\n fill: ${t.specialStateColor};\n stroke: ${t.specialStateColor};\n}\n\n.node .fork-join {\n fill: ${t.specialStateColor};\n stroke: ${t.specialStateColor};\n}\n\n.node circle.state-end {\n fill: ${t.innerEndBackground};\n stroke: ${t.background};\n stroke-width: 1.5\n}\n.end-state-inner {\n fill: ${t.compositeBackground||t.background};\n // stroke: ${t.background};\n stroke-width: 1.5\n}\n\n.node rect {\n fill: ${t.stateBkg||t.mainBkg};\n stroke: ${t.stateBorder||t.nodeBorder};\n stroke-width: ${t.strokeWidth||1}px;\n}\n.node polygon {\n fill: ${t.mainBkg};\n stroke: ${t.stateBorder||t.nodeBorder};;\n stroke-width: ${t.strokeWidth||1}px;\n}\n[id$="-barbEnd"] {\n fill: ${t.lineColor};\n}\n\n.statediagram-cluster rect {\n fill: ${t.compositeTitleBackground};\n stroke: ${t.stateBorder||t.nodeBorder};\n stroke-width: ${t.strokeWidth||1}px;\n}\n\n.cluster-label, .nodeLabel {\n color: ${t.stateLabelColor};\n // line-height: 1;\n}\n\n.statediagram-cluster rect.outer {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state .divider {\n stroke: ${t.stateBorder||t.nodeBorder};\n}\n\n.statediagram-state .title-state {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-cluster.statediagram-cluster .inner {\n fill: ${t.compositeBackground||t.background};\n}\n.statediagram-cluster.statediagram-cluster-alt .inner {\n fill: ${t.altBackground?t.altBackground:"#efefef"};\n}\n\n.statediagram-cluster .inner {\n rx:0;\n ry:0;\n}\n\n.statediagram-state rect.basic {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state rect.divider {\n stroke-dasharray: 10,10;\n fill: ${t.altBackground?t.altBackground:"#efefef"};\n}\n\n.note-edge {\n stroke-dasharray: 5;\n}\n\n.statediagram-note rect {\n fill: ${t.noteBkgColor};\n stroke: ${t.noteBorderColor};\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n.statediagram-note rect {\n fill: ${t.noteBkgColor};\n stroke: ${t.noteBorderColor};\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n\n.statediagram-note text {\n fill: ${t.noteTextColor};\n}\n\n.statediagram-note .nodeLabel {\n color: ${t.noteTextColor};\n}\n.statediagram .edgeLabel {\n color: red; // ${t.noteTextColor};\n}\n\n[id$="-dependencyStart"], [id$="-dependencyEnd"] {\n fill: ${t.lineColor};\n stroke: ${t.lineColor};\n stroke-width: ${t.strokeWidth||1};\n}\n\n.statediagramTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n}\n\n[data-look="neo"].statediagram-cluster rect {\n fill: ${t.mainBkg};\n stroke: ${t.useGradient?"url("+t.svgId+"-gradient)":t.stateBorder||t.nodeBorder};\n stroke-width: ${t.strokeWidth??1};\n}\n[data-look="neo"].statediagram-cluster rect.outer {\n rx: ${t.radius}px;\n ry: ${t.radius}px;\n filter: ${t.dropShadow?t.dropShadow.replace("url(#drop-shadow)",`url(${t.svgId}-drop-shadow)`):"none"}\n}\n`,"getStyles");export{ut as S,T as a,H as b,pt as s};
1
+ var t;import{g as e}from"./chunk-XXDRQBXY-DoVRk31D.js";import{s}from"./chunk-VR4S4FIN-DD3Gj91z.js";import{_ as i,l as n,c as r,x as o,y as a,a as c,b as l,g as h,s as d,o as u,p,a8 as y,k as g,q as f,d as m}from"./mermaid.core-LEKKQwXZ.js";import{f as S}from"./chunk-32BRIVSS-B93XkYif.js";import{p as k}from"./purify.es-BNLkGfTg.js";var b=function(){var t=i(function(t,e,s,i){for(s=s||{},i=t.length;i--;s[t[i]]=e);return s},"o"),e=[1,2],s=[1,3],n=[1,4],r=[2,4],o=[1,9],a=[1,11],c=[1,16],l=[1,17],h=[1,18],d=[1,19],u=[1,33],p=[1,20],y=[1,21],g=[1,22],f=[1,23],m=[1,24],S=[1,26],k=[1,27],b=[1,28],T=[1,29],_=[1,30],E=[1,31],x=[1,32],C=[1,35],$=[1,36],D=[1,37],v=[1,38],I=[1,34],A=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],L=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],w=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],N={trace:i(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"--\x3e":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"--\x3e",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:i(function(t,e,s,i,n,r,o){var a=r.length-1;switch(n){case 3:return i.setRootDoc(r[a]),r[a];case 4:this.$=[];break;case 5:"nl"!=r[a]&&(r[a-1].push(r[a]),this.$=r[a-1]);break;case 6:case 7:case 12:this.$=r[a];break;case 8:this.$="nl";break;case 13:const t=r[a-1];t.description=i.trimColon(r[a]),this.$=t;break;case 14:this.$={stmt:"relation",state1:r[a-2],state2:r[a]};break;case 15:const e=i.trimColon(r[a]);this.$={stmt:"relation",state1:r[a-3],state2:r[a-1],description:e};break;case 19:this.$={stmt:"state",id:r[a-3],type:"default",description:"",doc:r[a-1]};break;case 20:var c=r[a],l=r[a-2].trim();if(r[a].match(":")){var h=r[a].split(":");c=h[0],l=[l,h[1]]}this.$={stmt:"state",id:c,type:"default",description:l};break;case 21:this.$={stmt:"state",id:r[a-3],type:"default",description:r[a-5],doc:r[a-1]};break;case 22:this.$={stmt:"state",id:r[a],type:"fork"};break;case 23:this.$={stmt:"state",id:r[a],type:"join"};break;case 24:this.$={stmt:"state",id:r[a],type:"choice"};break;case 25:this.$={stmt:"state",id:i.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:r[a-1].trim(),note:{position:r[a-2].trim(),text:r[a].trim()}};break;case 29:this.$=r[a].trim(),i.setAccTitle(this.$);break;case 30:case 31:this.$=r[a].trim(),i.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:r[a-3],url:r[a-2],tooltip:r[a-1]};break;case 33:this.$={stmt:"click",id:r[a-3],url:r[a-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:r[a-1].trim(),classes:r[a].trim()};break;case 36:this.$={stmt:"style",id:r[a-1].trim(),styleClass:r[a].trim()};break;case 37:this.$={stmt:"applyClass",id:r[a-1].trim(),styleClass:r[a].trim()};break;case 38:i.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:i.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:i.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:i.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:r[a].trim(),type:"default",description:""};break;case 46:case 47:this.$={stmt:"state",id:r[a-2].trim(),classes:[r[a].trim()],type:"default",description:""}}},"anonymous"),table:[{3:1,4:e,5:s,6:n},{1:[3]},{3:5,4:e,5:s,6:n},{3:6,4:e,5:s,6:n},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],r,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:o,5:a,8:8,9:10,10:12,11:13,12:14,13:15,16:c,17:l,19:h,22:d,24:u,25:p,26:y,27:g,28:f,29:m,32:25,33:S,35:k,37:b,38:T,41:_,45:E,48:x,51:C,52:$,53:D,54:v,57:I},t(A,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:c,17:l,19:h,22:d,24:u,25:p,26:y,27:g,28:f,29:m,32:25,33:S,35:k,37:b,38:T,41:_,45:E,48:x,51:C,52:$,53:D,54:v,57:I},t(A,[2,7]),t(A,[2,8]),t(A,[2,9]),t(A,[2,10]),t(A,[2,11]),t(A,[2,12],{14:[1,40],15:[1,41]}),t(A,[2,16]),{18:[1,42]},t(A,[2,18],{20:[1,43]}),{23:[1,44]},t(A,[2,22]),t(A,[2,23]),t(A,[2,24]),t(A,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(A,[2,28]),{34:[1,49]},{36:[1,50]},t(A,[2,31]),{13:51,24:u,57:I},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(L,[2,44],{58:[1,56]}),t(L,[2,45],{58:[1,57]}),t(A,[2,38]),t(A,[2,39]),t(A,[2,40]),t(A,[2,41]),t(A,[2,6]),t(A,[2,13]),{13:58,24:u,57:I},t(A,[2,17]),t(w,r,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(A,[2,29]),t(A,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(A,[2,14],{14:[1,71]}),{4:o,5:a,8:8,9:10,10:12,11:13,12:14,13:15,16:c,17:l,19:h,21:[1,72],22:d,24:u,25:p,26:y,27:g,28:f,29:m,32:25,33:S,35:k,37:b,38:T,41:_,45:E,48:x,51:C,52:$,53:D,54:v,57:I},t(A,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(A,[2,34]),t(A,[2,35]),t(A,[2,36]),t(A,[2,37]),t(L,[2,46]),t(L,[2,47]),t(A,[2,15]),t(A,[2,19]),t(w,r,{7:78}),t(A,[2,26]),t(A,[2,27]),{5:[1,79]},{5:[1,80]},{4:o,5:a,8:8,9:10,10:12,11:13,12:14,13:15,16:c,17:l,19:h,21:[1,81],22:d,24:u,25:p,26:y,27:g,28:f,29:m,32:25,33:S,35:k,37:b,38:T,41:_,45:E,48:x,51:C,52:$,53:D,54:v,57:I},t(A,[2,32]),t(A,[2,33]),t(A,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:i(function(t,e){if(!e.recoverable){var s=new Error(t);throw s.hash=e,s}this.trace(t)},"parseError"),parse:i(function(t){var e=this,s=[0],n=[],r=[null],o=[],a=this.table,c="",l=0,h=0,d=o.slice.call(arguments,1),u=Object.create(this.lexer),p={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(p.yy[y]=this.yy[y]);u.setInput(t,p.yy),p.yy.lexer=u,p.yy.parser=this,void 0===u.yylloc&&(u.yylloc={});var g=u.yylloc;o.push(g);var f=u.options&&u.options.ranges;function m(){var t;return"number"!=typeof(t=n.pop()||u.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,i(function(t){s.length=s.length-2*t,r.length=r.length-t,o.length=o.length-t},"popStack"),i(m,"lex");for(var S,k,b,T,_,E,x,C,$={};;){if(k=s[s.length-1],this.defaultActions[k]?b=this.defaultActions[k]:(null==S&&(S=m()),b=a[k]&&a[k][S]),void 0===b||!b.length||!b[0]){var D;for(_ in C=[],a[k])this.terminals_[_]&&_>2&&C.push("'"+this.terminals_[_]+"'");D=u.showPosition?"Parse error on line "+(l+1)+":\n"+u.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[S]||S)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==S?"end of input":"'"+(this.terminals_[S]||S)+"'"),this.parseError(D,{text:u.match,token:this.terminals_[S]||S,line:u.yylineno,loc:g,expected:C})}if(b[0]instanceof Array&&b.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+S);switch(b[0]){case 1:s.push(S),r.push(u.yytext),o.push(u.yylloc),s.push(b[1]),S=null,h=u.yyleng,c=u.yytext,l=u.yylineno,g=u.yylloc;break;case 2:if(E=this.productions_[b[1]][1],$.$=r[r.length-E],$._$={first_line:o[o.length-(E||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(E||1)].first_column,last_column:o[o.length-1].last_column},f&&($._$.range=[o[o.length-(E||1)].range[0],o[o.length-1].range[1]]),void 0!==(T=this.performAction.apply($,[c,h,l,p.yy,b[1],r,o].concat(d))))return T;E&&(s=s.slice(0,-1*E*2),r=r.slice(0,-1*E),o=o.slice(0,-1*E)),s.push(this.productions_[b[1]][0]),r.push($.$),o.push($._$),x=a[s[s.length-2]][s[s.length-1]],s.push(x);break;case 3:return!0}}return!0},"parse")},O=function(){return{EOF:1,parseError:i(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:i(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:i(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:i(function(t){var e=t.length,s=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),s.length-1&&(this.yylineno-=s.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:s?(s.length===i.length?this.yylloc.first_column:0)+i[i.length-s.length].length-s[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:i(function(){return this._more=!0,this},"more"),reject:i(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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(),{text:"",token:null,line:this.yylineno})},"reject"),less:i(function(t){this.unput(this.match.slice(t))},"less"),pastInput:i(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:i(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:i(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:i(function(t,e){var s,i,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],s=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack){for(var r in n)this[r]=n[r];return!1}return!1},"test_match"),next:i(function(){if(this.done)return this.EOF;var t,e,s,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),r=0;r<n.length;r++)if((s=this._input.match(this.rules[n[r]]))&&(!e||s[0].length>e[0].length)){if(e=s,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(s,n[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:i(function(){return this.next()||this.lex()},"lex"),begin:i(function(t){this.conditionStack.push(t)},"begin"),popState:i(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:i(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:i(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:i(function(t){this.begin(t)},"pushState"),stateStackSize:i(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:i(function(t,e,s,n){function r(){const s=e.yytext.indexOf("%%");if(0===s)return!1;if(s>0){const i=e.yytext.slice(0,s),n=e.yytext.slice(s);n&&t.lexer.unput(n),e.yytext=i}return!0}switch(i(r,"processId"),s){case 0:return 38;case 1:return 40;case 2:return 39;case 3:return 44;case 4:case 43:return 51;case 5:case 44:return 52;case 6:case 45:return 53;case 7:case 46:return 54;case 8:case 78:return 5;case 9:case 10:case 11:case 12:case 57:case 63:break;case 13:case 33:return this.pushState("SCALE"),17;case 14:case 34:return 18;case 15:case 21:case 35:case 50:case 54:this.popState();break;case 16:return this.begin("acc_title"),33;case 17:return this.popState(),"acc_title_value";case 18:return this.begin("acc_descr"),35;case 19:return this.popState(),"acc_descr_value";case 20:this.begin("acc_descr_multiline");break;case 22:return"acc_descr_multiline_value";case 23:return this.pushState("CLASSDEF"),41;case 24:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 25:return this.popState(),this.pushState("CLASSDEFID"),42;case 26:return this.popState(),43;case 27:return this.pushState("CLASS"),48;case 28:return this.popState(),this.pushState("CLASS_STYLE"),49;case 29:return this.popState(),50;case 30:return this.pushState("STYLE"),45;case 31:return this.popState(),this.pushState("STYLEDEF_STYLES"),46;case 32:return this.popState(),47;case 36:this.pushState("STATE");break;case 37:case 40:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),25;case 38:case 41:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),26;case 39:case 42:return this.popState(),e.yytext=e.yytext.slice(0,-10).trim(),27;case 47:this.pushState("STATE_STRING");break;case 48:return this.pushState("STATE_ID"),"AS";case 49:case 65:if(!r())return;return this.popState(),"ID";case 51:return"STATE_DESCR";case 52:throw new Error('Error: State name must be a single word. Found: "'+e.yytext.trim()+'"');case 53:return 19;case 55:return this.popState(),this.pushState("struct"),20;case 56:return this.popState(),21;case 58:return this.begin("NOTE"),29;case 59:return this.popState(),this.pushState("NOTE_ID"),59;case 60:return this.popState(),this.pushState("NOTE_ID"),60;case 61:this.popState(),this.pushState("FLOATING_NOTE");break;case 62:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 64:return"NOTE_TEXT";case 66:if(!r())return;return this.popState(),this.pushState("NOTE_TEXT"),24;case 67:return this.popState(),e.yytext=e.yytext.substr(2).trim(),31;case 68:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),31;case 69:case 70:return 6;case 71:return 16;case 72:return 57;case 73:if(!r())return;return 24;case 74:return e.yytext=e.yytext.trim(),14;case 75:return 15;case 76:return 28;case 77:return 58;case 79:return"INVALID"}},"anonymous"),rules:[/^(?:click\b)/i,/^(?:href\b)/i,/^(?:"[^"]*")/i,/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:style\s+)/i,/^(?:[\w,]+\s+)/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*<<choice>>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\w+\s+\w+.*?\{)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?\n\s*end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:(?:[^:\n;]|:[^:\n;])+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[10,11,12],inclusive:!1},struct:{rules:[10,11,12,23,27,30,36,43,44,45,46,56,57,58,72,73,74,75,76,77],inclusive:!1},FLOATING_NOTE_ID:{rules:[65],inclusive:!1},FLOATING_NOTE:{rules:[62,63,64],inclusive:!1},NOTE_TEXT:{rules:[67,68],inclusive:!1},NOTE_ID:{rules:[66],inclusive:!1},NOTE:{rules:[59,60,61],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[32],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[31],inclusive:!1},CLASS_STYLE:{rules:[29],inclusive:!1},CLASS:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[26],inclusive:!1},CLASSDEF:{rules:[24,25],inclusive:!1},acc_descr_multiline:{rules:[21,22],inclusive:!1},acc_descr:{rules:[19],inclusive:!1},acc_title:{rules:[17],inclusive:!1},SCALE:{rules:[14,15,34,35],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[49],inclusive:!1},STATE_STRING:{rules:[50,51],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[10,11,12,37,38,39,40,41,42,47,48,52,53,54,55],inclusive:!1},ID:{rules:[10,11,12],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,12,13,16,18,20,23,27,30,33,36,55,58,69,70,71,72,73,74,75,77,78,79],inclusive:!0}}}}();function R(){this.yy={}}return N.lexer=O,i(R,"Parser"),R.prototype=N,N.Parser=R,new R}();b.parser=b;var T=b,_="state",E="root",x="relation",C="default",$="divider",D="fill:none",v="fill: #333",I="markdown",A="normal",L="rect",w="rectWithTitle",N="divider",O="roundedWithTitle",R="statediagram",B=`${R}-state`,F="transition",P=`${F} note-edge`,Y=`${R}-note`,G=`${R}-cluster`,j=`${R}-cluster-alt`,z="parent",W="note",M="----",U=`${M}${W}`,X=`${M}${z}`,H=i((t,e="TB")=>{if(!t.doc)return e;let s=e;for(const i of t.doc)"dir"===i.stmt&&(s=i.value);return s},"getDir"),V={getClasses:i(function(t,e){return e.db.getClasses()},"getClasses"),draw:i(async function(t,i,c,l){n.info("REF0:"),n.info("Drawing state diagram (v2)",i);const{securityLevel:h,state:d,layout:u}=r();l.db.extract(l.db.getRootDocV2());const p=l.db.getData(),y=e(i,h);p.type=l.type,p.layoutAlgorithm=u,p.nodeSpacing=d?.nodeSpacing||50,p.rankSpacing=d?.rankSpacing||50,"neo"===r().look?p.markers=["barbNeo"]:p.markers=["barb"],p.diagramId=i,await o(p,y);try{("function"==typeof l.db.getLinks?l.db.getLinks():new Map).forEach((t,e)=>{const s="string"==typeof e?e:"string"==typeof e?.id?e.id:"",i=p.nodes.find(t=>t.id===s);if(!s)return void n.warn("⚠️ Invalid or missing stateId from key:",JSON.stringify(e));const r=y.node()?.querySelectorAll("g.node, g.rough-node");let o;if(r?.forEach(t=>{const e=t.textContent?.trim();t.id!==i?.domId&&e!==s||(o=t)}),!o)return void n.warn("⚠️ Could not find node matching text:",s);const a=o.parentNode;if(!a)return void n.warn("⚠️ Node has no parent, cannot wrap:",s);const c=document.createElementNS("http://www.w3.org/2000/svg","a"),l=t.url.replace(/^"+|"+$/g,"");if(c.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l),c.setAttribute("target","_blank"),t.tooltip){const e=t.tooltip.replace(/^"+|"+$/g,"");c.setAttribute("title",e),o.setAttribute("title",e)}a.replaceChild(c,o),c.appendChild(o),n.info("🔗 Wrapped node in <a> tag for:",s,t.url)})}catch(g){n.error("❌ Error injecting clickable links:",g)}a.insertTitle(y,"statediagramTitleText",d?.titleTopMargin??25,l.db.getDiagramTitle()),s(y,8,R,d?.useMaxWidth??!0)},"draw"),getDir:H},J=new Map,K=0;function q(t="",e=0,s="",i=M){return`state-${t}${null!==s&&s.length>0?`${i}${s}`:""}-${e}`}i(q,"stateDomId");var Q=i((t,e,s,i,o,a,c,l)=>{n.trace("items",e),e.forEach(e=>{switch(e.stmt){case _:case C:it(t,e,s,i,o,a,c,l);break;case x:{it(t,e.state1,s,i,o,a,c,l),it(t,e.state2,s,i,o,a,c,l);const n="neo"===c,h={id:"edge"+K,start:e.state1.id,end:e.state2.id,arrowhead:"normal",arrowTypeEnd:n?"arrow_barb_neo":"arrow_barb",style:D,labelStyle:"",label:g.sanitizeText(e.description??"",r()),arrowheadStyle:v,labelpos:"c",labelType:I,thickness:A,classes:F,look:c};o.push(h),K++}}})},"setupDoc"),Z=i((t,e="TB")=>{let s=e;if(t.doc)for(const i of t.doc)"dir"===i.stmt&&(s=i.value);return s},"getDir");function tt(t,e,s){if(!e.id||"</join></fork>"===e.id||"</choice>"===e.id)return;e.cssClasses&&(Array.isArray(e.cssCompiledStyles)||(e.cssCompiledStyles=[]),e.cssClasses.split(" ").forEach(t=>{const i=s.get(t);i&&(e.cssCompiledStyles=[...e.cssCompiledStyles??[],...i.styles])}));const i=t.find(t=>t.id===e.id);i?Object.assign(i,e):t.push(e)}function et(t){return t?.classes?.join(" ")??""}function st(t){return t?.styles??[]}i(tt,"insertOrUpdateNode"),i(et,"getClassesFromDbInfo"),i(st,"getStylesFromDbInfo");var it=i((t,e,s,i,o,a,c,l)=>{const h=e.id,d=s.get(h),u=et(d),p=st(d),y=r();if(n.info("dataFetcher parsedItem",e,d,p),"root"!==h){let s=L;!0===e.start?s="stateStart":!1===e.start&&(s="stateEnd"),e.type!==C&&(s=e.type),J.get(h)||J.set(h,{id:h,shape:s,description:g.sanitizeText(h,y),cssClasses:`${u} ${B}`,cssStyles:p});const r=J.get(h);e.description&&(Array.isArray(r.description)?(r.shape=w,r.description.push(e.description)):r.description?.length&&r.description.length>0?(r.shape=w,r.description===h?r.description=[e.description]:r.description=[r.description,e.description]):(r.shape=L,r.description=e.description),r.description=g.sanitizeTextOrArray(r.description,y)),1===r.description?.length&&r.shape===w&&("group"===r.type?r.shape=O:r.shape=L),!r.type&&e.doc&&(n.info("Setting cluster for XCX",h,Z(e)),r.type="group",r.isGroup=!0,r.dir=Z(e),r.explicitDir=e.doc.some(t=>"dir"===t.stmt),r.shape=e.type===$?N:O,r.cssClasses=`${r.cssClasses} ${G} ${a?j:""}`);const d={labelStyle:"",shape:r.shape,label:r.description,cssClasses:r.cssClasses,cssCompiledStyles:[],cssStyles:r.cssStyles,id:h,dir:r.dir,domId:q(h,K),type:r.type,isGroup:"group"===r.type,padding:8,rx:10,ry:10,look:c,labelType:"markdown"};if(d.shape===N&&(d.label=""),t&&"root"!==t.id&&(n.trace("Setting node ",h," to be child of its parent ",t.id),d.parentId=t.id),d.centerLabel=!0,e.note){const t={labelStyle:"",shape:"note",label:e.note.text,labelType:"markdown",cssClasses:Y,cssStyles:[],cssCompiledStyles:[],id:h+U+"-"+K,domId:q(h,K,W),type:r.type,isGroup:"group"===r.type,padding:y.flowchart?.padding,look:c,position:e.note.position},s=h+X,n={labelStyle:"",shape:"noteGroup",label:e.note.text,cssClasses:r.cssClasses,cssStyles:[],id:h+X,domId:q(h,K,z),type:"group",isGroup:!0,padding:16,look:c,position:e.note.position};K++,n.id=s,t.parentId=s,tt(i,n,l),tt(i,t,l),tt(i,d,l);let a=h,u=t.id;"left of"===e.note.position&&(a=t.id,u=h),o.push({id:a+"-"+u,start:a,end:u,arrowhead:"none",arrowTypeEnd:"",style:D,labelStyle:"",classes:P,arrowheadStyle:v,labelpos:"c",labelType:I,thickness:A,look:c})}else tt(i,d,l)}e.doc&&(n.trace("Adding nodes children "),Q(e,e.doc,s,i,o,!a,c,l))},"dataFetcher"),nt=i(()=>{J.clear(),K=0},"reset"),rt="[*]",ot="start",at="color",ct="fill",lt=i(()=>new Map,"newClassesList"),ht=i(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),dt=i(t=>JSON.parse(JSON.stringify(t)),"clone"),ut=(i(t=class{constructor(t){this.version=t,this.nodes=[],this.edges=[],this.rootDoc=[],this.classes=lt(),this.documents={root:ht()},this.currentDocument=this.documents.root,this.startEndCount=0,this.dividerCnt=0,this.links=new Map,this.funs=[],this.getAccTitle=c,this.setAccTitle=l,this.getAccDescription=h,this.setAccDescription=d,this.setDiagramTitle=u,this.getDiagramTitle=p,this.clear(),this.setRootDoc=this.setRootDoc.bind(this),this.getDividerId=this.getDividerId.bind(this),this.setDirection=this.setDirection.bind(this),this.trimColon=this.trimColon.bind(this),this.bindFunctions=this.bindFunctions.bind(this)}extract(t){this.clear(!0);for(const i of Array.isArray(t)?t:t.doc)switch(i.stmt){case _:this.addState(i.id.trim(),i.type,i.doc,i.description,i.note);break;case x:this.addRelation(i.state1,i.state2,i.description);break;case"classDef":this.addStyleClass(i.id.trim(),i.classes);break;case"style":this.handleStyleDef(i);break;case"applyClass":this.setCssClass(i.id.trim(),i.styleClass);break;case"click":this.addLink(i.id,i.url,i.tooltip)}const e=this.getStates(),s=r();nt(),it(void 0,this.getRootDocV2(),e,this.nodes,this.edges,!0,s.look,this.classes);for(const i of this.nodes)if(Array.isArray(i.label)){if(i.description=i.label.slice(1),i.isGroup&&i.description.length>0)throw new Error(`Group nodes can only have label. Remove the additional description for node [${i.id}]`);i.label=i.label[0]}}handleStyleDef(t){const e=t.id.trim().split(","),s=t.styleClass.split(",");for(const i of e){let t=this.getState(i);if(!t){const e=i.trim();this.addState(e),t=this.getState(e)}t&&(t.styles=s.map(t=>t.replace(/;/g,"")?.trim()))}}setRootDoc(t){n.info("Setting root doc",t),this.rootDoc=t,1===this.version?this.extract(t):this.extract(this.getRootDocV2())}docTranslator(t,e,s){if(e.stmt===x)return this.docTranslator(t,e.state1,!0),void this.docTranslator(t,e.state2,!1);if(e.stmt===_&&(e.id===rt?(e.id=t.id+(s?"_start":"_end"),e.start=s):e.id=e.id.trim()),e.stmt!==E&&e.stmt!==_||!e.doc)return;const i=[];let n=[];for(const r of e.doc)if(r.type===$){const t=dt(r);t.doc=dt(n),i.push(t),n=[]}else n.push(r);if(i.length>0&&n.length>0){const t={stmt:_,id:y(),type:"divider",doc:dt(n)};i.push(dt(t)),e.doc=i}e.doc.forEach(t=>this.docTranslator(e,t,!0))}getRootDocV2(){return this.docTranslator({id:E,stmt:E},{id:E,stmt:E,doc:this.rootDoc},!0),{id:E,doc:this.rootDoc}}addState(t,e=C,s=void 0,i=void 0,o=void 0,a=void 0,c=void 0,l=void 0){const h=t?.trim();if(this.currentDocument.states.has(h)){const t=this.currentDocument.states.get(h);if(!t)throw new Error(`State not found: ${h}`);t.doc||(t.doc=s),t.type||(t.type=e)}else n.info("Adding state ",h,i),this.currentDocument.states.set(h,{stmt:_,id:h,descriptions:[],type:e,doc:s,note:o,classes:[],styles:[],textStyles:[]});if(i&&(n.info("Setting state description",h,i),(Array.isArray(i)?i:[i]).forEach(t=>this.addDescription(h,t.trim()))),o){const t=this.currentDocument.states.get(h);if(!t)throw new Error(`State not found: ${h}`);t.note=o,t.note.text=g.sanitizeText(t.note.text,r())}a&&(n.info("Setting state classes",h,a),(Array.isArray(a)?a:[a]).forEach(t=>this.setCssClass(h,t.trim()))),c&&(n.info("Setting state styles",h,c),(Array.isArray(c)?c:[c]).forEach(t=>this.setStyle(h,t.trim()))),l&&(n.info("Setting state styles",h,c),(Array.isArray(l)?l:[l]).forEach(t=>this.setTextStyle(h,t.trim())))}clear(t){this.nodes=[],this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.documents={root:ht()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=lt(),t||(this.links=new Map,f())}getState(t){return this.currentDocument.states.get(t)}getStates(){return this.currentDocument.states}logDocuments(){n.info("Documents = ",this.documents)}getRelations(){return this.currentDocument.relations}addLink(t,e,s){this.links.set(t,{url:e,tooltip:s}),n.warn("Adding link",t,e,s)}getLinks(){return this.links}startIdIfNeeded(t=""){return t===rt?(this.startEndCount++,`${ot}${this.startEndCount}`):t}startTypeIfNeeded(t="",e=C){return t===rt?ot:e}endIdIfNeeded(t=""){return"[*]"===t?(this.startEndCount++,`end${this.startEndCount}`):t}endTypeIfNeeded(t="",e=C){return"[*]"===t?"end":e}addRelationObjs(t,e,s=""){const i=this.startIdIfNeeded(t.id.trim()),n=this.startTypeIfNeeded(t.id.trim(),t.type),o=this.startIdIfNeeded(e.id.trim()),a=this.startTypeIfNeeded(e.id.trim(),e.type);this.addState(i,n,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),this.addState(o,a,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),this.currentDocument.relations.push({id1:i,id2:o,relationTitle:g.sanitizeText(s,r())})}addRelation(t,e,s){if("object"==typeof t&&"object"==typeof e)this.addRelationObjs(t,e,s);else if("string"==typeof t&&"string"==typeof e){const i=this.startIdIfNeeded(t.trim()),n=this.startTypeIfNeeded(t),o=this.endIdIfNeeded(e.trim()),a=this.endTypeIfNeeded(e);this.addState(i,n),this.addState(o,a),this.currentDocument.relations.push({id1:i,id2:o,relationTitle:s?g.sanitizeText(s,r()):void 0})}}addDescription(t,e){const s=this.currentDocument.states.get(t),i=e.startsWith(":")?e.replace(":","").trim():e;s?.descriptions?.push(g.sanitizeText(i,r()))}cleanupLabel(t){return t.startsWith(":")?t.slice(2).trim():t.trim()}getDividerId(){return this.dividerCnt++,`divider-id-${this.dividerCnt}`}addStyleClass(t,e=""){this.classes.has(t)||this.classes.set(t,{id:t,styles:[],textStyles:[]});const s=this.classes.get(t);e&&s&&e.split(",").forEach(t=>{const e=t.replace(/([^;]*);/,"$1").trim();if(RegExp(at).exec(t)){const t=e.replace(ct,"bgFill").replace(at,ct);s.textStyles.push(t)}s.styles.push(e)})}getClasses(){return this.classes}setupToolTips(t){const e=S();m(t).select("svg").selectAll("g.node, g.rough-node").on("mouseover",t=>{const s=m(t.currentTarget),i=s.attr("title");if(null===i)return;const n=t.currentTarget?.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.style("left",window.scrollX+n.left+(n.right-n.left)/2+"px").style("top",window.scrollY+n.bottom+"px"),e.html(k.sanitize(i)),s.classed("hover",!0)}).on("mouseout",t=>{e.transition().duration(500).style("opacity",0),m(t.currentTarget).classed("hover",!1)})}setCssClass(t,e){t.split(",").forEach(t=>{let s=this.getState(t);if(!s){const e=t.trim();this.addState(e),s=this.getState(e)}s?.classes?.push(e)})}setStyle(t,e){this.getState(t)?.styles?.push(e)}setTextStyle(t,e){this.getState(t)?.textStyles?.push(e)}bindFunctions(t){this.funs.forEach(e=>{e(t)})}getDirectionStatement(){return this.rootDoc.find(t=>"dir"===t.stmt)}getDirection(){return this.getDirectionStatement()?.value??"TB"}setDirection(t){const e=this.getDirectionStatement();e?e.value=t:this.rootDoc.unshift({stmt:"dir",value:t})}trimColon(t){return t.startsWith(":")?t.slice(1).trim():t.trim()}getData(){const t=r();return{nodes:this.nodes,edges:this.edges,other:{},config:t,direction:H(this.getRootDocV2())}}getConfig(){return r().state}},"StateDB"),t.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},t),pt=i(t=>`\ndefs [id$="-barbEnd"] {\n fill: ${t.transitionColor};\n stroke: ${t.transitionColor};\n }\ng.stateGroup text {\n fill: ${t.nodeBorder};\n stroke: none;\n font-size: 10px;\n}\ng.stateGroup text {\n fill: ${t.textColor};\n stroke: none;\n font-size: 10px;\n\n}\ng.stateGroup .state-title {\n font-weight: bolder;\n fill: ${t.stateLabelColor};\n}\n\ng.stateGroup rect {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n}\n\ng.stateGroup line {\n stroke: ${t.lineColor};\n stroke-width: ${t.strokeWidth||1};\n}\n\n.transition {\n stroke: ${t.transitionColor};\n stroke-width: ${t.strokeWidth||1};\n fill: none;\n}\n\n.stateGroup .composit {\n fill: ${t.background};\n border-bottom: 1px\n}\n\n.stateGroup .alt-composit {\n fill: #e0e0e0;\n border-bottom: 1px\n}\n\n.state-note {\n stroke: ${t.noteBorderColor};\n fill: ${t.noteBkgColor};\n\n text {\n fill: ${t.noteTextColor};\n stroke: none;\n font-size: 10px;\n }\n}\n\n.stateLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ${t.mainBkg};\n opacity: 0.5;\n}\n\n.edgeLabel .label rect {\n fill: ${t.labelBackgroundColor};\n opacity: 0.5;\n}\n.edgeLabel {\n background-color: ${t.edgeLabelBackground};\n p {\n background-color: ${t.edgeLabelBackground};\n }\n rect {\n opacity: 0.5;\n background-color: ${t.edgeLabelBackground};\n fill: ${t.edgeLabelBackground};\n }\n text-align: center;\n}\n.edgeLabel .label text {\n fill: ${t.transitionLabelColor||t.tertiaryTextColor};\n}\n.label div .edgeLabel {\n color: ${t.transitionLabelColor||t.tertiaryTextColor};\n}\n\n.stateLabel text {\n fill: ${t.stateLabelColor};\n font-size: 10px;\n font-weight: bold;\n}\n\n.node circle.state-start {\n fill: ${t.specialStateColor};\n stroke: ${t.specialStateColor};\n}\n\n.node .fork-join {\n fill: ${t.specialStateColor};\n stroke: ${t.specialStateColor};\n}\n\n.node circle.state-end {\n fill: ${t.innerEndBackground};\n stroke: ${t.background};\n stroke-width: 1.5\n}\n.end-state-inner {\n fill: ${t.compositeBackground||t.background};\n // stroke: ${t.background};\n stroke-width: 1.5\n}\n\n.node rect {\n fill: ${t.stateBkg||t.mainBkg};\n stroke: ${t.stateBorder||t.nodeBorder};\n stroke-width: ${t.strokeWidth||1}px;\n}\n.node polygon {\n fill: ${t.mainBkg};\n stroke: ${t.stateBorder||t.nodeBorder};;\n stroke-width: ${t.strokeWidth||1}px;\n}\n[id$="-barbEnd"] {\n fill: ${t.lineColor};\n}\n\n.statediagram-cluster rect {\n fill: ${t.compositeTitleBackground};\n stroke: ${t.stateBorder||t.nodeBorder};\n stroke-width: ${t.strokeWidth||1}px;\n}\n\n.cluster-label, .nodeLabel {\n color: ${t.stateLabelColor};\n // line-height: 1;\n}\n\n.statediagram-cluster rect.outer {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state .divider {\n stroke: ${t.stateBorder||t.nodeBorder};\n}\n\n.statediagram-state .title-state {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-cluster.statediagram-cluster .inner {\n fill: ${t.compositeBackground||t.background};\n}\n.statediagram-cluster.statediagram-cluster-alt .inner {\n fill: ${t.altBackground?t.altBackground:"#efefef"};\n}\n\n.statediagram-cluster .inner {\n rx:0;\n ry:0;\n}\n\n.statediagram-state rect.basic {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state rect.divider {\n stroke-dasharray: 10,10;\n fill: ${t.altBackground?t.altBackground:"#efefef"};\n}\n\n.note-edge {\n stroke-dasharray: 5;\n}\n\n.statediagram-note rect {\n fill: ${t.noteBkgColor};\n stroke: ${t.noteBorderColor};\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n.statediagram-note rect {\n fill: ${t.noteBkgColor};\n stroke: ${t.noteBorderColor};\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n\n.statediagram-note text {\n fill: ${t.noteTextColor};\n}\n\n.statediagram-note .nodeLabel {\n color: ${t.noteTextColor};\n}\n.statediagram .edgeLabel {\n color: red; // ${t.noteTextColor};\n}\n\n[id$="-dependencyStart"], [id$="-dependencyEnd"] {\n fill: ${t.lineColor};\n stroke: ${t.lineColor};\n stroke-width: ${t.strokeWidth||1};\n}\n\n.statediagramTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n}\n\n[data-look="neo"].statediagram-cluster rect {\n fill: ${t.mainBkg};\n stroke: ${t.useGradient?"url("+t.svgId+"-gradient)":t.stateBorder||t.nodeBorder};\n stroke-width: ${t.strokeWidth??1};\n}\n[data-look="neo"].statediagram-cluster rect.outer {\n rx: ${t.radius}px;\n ry: ${t.radius}px;\n filter: ${t.dropShadow?t.dropShadow.replace("url(#drop-shadow)",`url(${t.svgId}-drop-shadow)`):"none"}\n}\n`,"getStyles");export{ut as S,T as a,V as b,pt as s};
@@ -1 +1 @@
1
- import{_ as c}from"./mermaid.core-CzqhAinL.js";function e(c,e){c.accDescr&&e.setAccDescription?.(c.accDescr),c.accTitle&&e.setAccTitle?.(c.accTitle),c.title&&e.setDiagramTitle?.(c.title)}c(e,"populateCommonDb");export{e as p};
1
+ import{_ as c}from"./mermaid.core-LEKKQwXZ.js";function e(c,e){c.accDescr&&e.setAccDescription?.(c.accDescr),c.accTitle&&e.setAccTitle?.(c.accTitle),c.title&&e.setDiagramTitle?.(c.title)}c(e,"populateCommonDb");export{e as p};
@@ -1 +1 @@
1
- var e,t;import{_ as n,l as r,F as i,z as a,q as o,W as l,e as s,i as d,c as m}from"./mermaid.core-CzqhAinL.js";var c="",h="",p="",u=[],g=new Map,T=n(e=>d(e,m()),"sanitizeText"),f=n(e=>{switch(e.type){case"terminal":return{...e,value:T(e.value)};case"nonterminal":return{...e,name:T(e.name)};case"sequence":return{...e,elements:e.elements.map(f)};case"choice":return{...e,alternatives:e.alternatives.map(f)};case"optional":return{...e,element:f(e.element)};case"repetition":return{...e,element:f(e.element),separator:e.separator?f(e.separator):void 0};case"special":return{...e,text:T(e.text)}}},"sanitizeAstNode"),x=n(()=>{c="",h="",p="",u.length=0,g.clear(),o(),r.debug("[Railroad] Database cleared")},"clear"),w=n(e=>{c=T(e),r.debug("[Railroad] Title set:",e)},"setTitle"),k=n(()=>c,"getTitle"),C={clear:x,setTitle:w,getTitle:k,addRule:n(e=>{const t={...e,name:T(e.name),definition:f(e.definition),comment:e.comment?T(e.comment):void 0};r.debug("[Railroad] Adding rule:",t.name),g.has(t.name)&&r.warn(`[Railroad] Rule '${t.name}' is already defined. Overwriting.`),u.push(t),g.set(t.name,t)},"addRule"),getRules:n(()=>u,"getRules"),getRule:n(e=>g.get(e),"getRule"),setAccTitle:n(e=>{h=T(e).replace(/^\s+/g,""),r.debug("[Railroad] Accessibility title set:",e)},"setAccTitle"),getAccTitle:n(()=>h,"getAccTitle"),setAccDescription:n(e=>{p=T(e).replace(/\n\s+/g,"\n"),r.debug("[Railroad] Accessibility description set:",e)},"setAccDescription"),getAccDescription:n(()=>p,"getAccDescription"),setDiagramTitle:w,getDiagramTitle:k},F={compactMode:!1,padding:10,verticalSeparation:8,horizontalSeparation:10,arcRadius:10,fontSize:14,fontFamily:"monospace",terminalFill:"#FFFFC0",terminalStroke:"#000000",terminalTextColor:"#000000",nonTerminalFill:"#FFFFFF",nonTerminalStroke:"#000000",nonTerminalTextColor:"#000000",lineColor:"#000000",strokeWidth:2,markerFill:"#000000",commentFill:"#E8E8E8",commentStroke:"#888888",commentTextColor:"#666666",specialFill:"#F0E0FF",specialStroke:"#8800CC",ruleNameColor:"#000066",showMarkers:!0,markerRadius:5},S=/^#(?:[\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$|^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch)\([\d\s%+,./-]+\)$|^[a-z]+$/i,$=/^[\w "',.-]+$/,y=new Set(["compactMode","padding","verticalSeparation","horizontalSeparation","arcRadius","fontSize","fontFamily","terminalFill","terminalStroke","terminalTextColor","nonTerminalFill","nonTerminalStroke","nonTerminalTextColor","lineColor","strokeWidth","markerFill","commentFill","commentStroke","commentTextColor","specialFill","specialStroke","ruleNameColor","showMarkers","markerRadius"]),b=n(e=>!!e&&Object.keys(e).every(e=>"railroad"===e||y.has(e)),"isRailroadStyleOptions"),R=n(e=>e?"railroad"in e&&e.railroad?e.railroad:b(e)?e:{}:{},"extractRailroadOverrides"),v=n(e=>{if(!e||b(e))return{};const{railroad:t,svgId:n,theme:r,look:i,...a}=e;return a},"extractThemeOverrides"),z=n((e,t)=>{if("string"!=typeof e)return t;const n=e.trim();return S.test(n)?n:t},"sanitizeColorValue"),N=n((e,t)=>{if("string"!=typeof e)return t;const n=e.trim();return $.test(n)?n:t},"sanitizeFontFamilyValue"),M=n((e,t)=>{const n="number"==typeof e?e:"string"==typeof e?Number.parseFloat(e):Number.NaN;return Number.isFinite(n)&&n>=0?n:t},"sanitizeNumberValue"),A=n(e=>{const t="number"==typeof e?e:"string"==typeof e?Number.parseFloat(e):Number.NaN;return Number.isFinite(t)&&t>0?t:void 0},"parseThemeFontSize"),B=n(e=>{const t=N(e.fontFamily,F.fontFamily),n=A(e.fontSize)??F.fontSize;return{...F,fontFamily:t,fontSize:n,terminalFill:z(e.secondBkg??e.secondaryColor,F.terminalFill),terminalStroke:z(e.secondaryBorderColor??e.lineColor,F.terminalStroke),terminalTextColor:z(e.secondaryTextColor??e.textColor,F.terminalTextColor),nonTerminalFill:z(e.mainBkg??e.background,F.nonTerminalFill),nonTerminalStroke:z(e.primaryBorderColor??e.lineColor,F.nonTerminalStroke),nonTerminalTextColor:z(e.primaryTextColor??e.textColor,F.nonTerminalTextColor),lineColor:z(e.lineColor,F.lineColor),markerFill:z(e.lineColor,F.markerFill),commentFill:z(e.labelBackground??e.tertiaryColor,F.commentFill),commentStroke:z(e.tertiaryBorderColor??e.lineColor,F.commentStroke),commentTextColor:z(e.tertiaryTextColor??e.textColor,F.commentTextColor),specialFill:z(e.tertiaryColor??e.secondaryColor,F.specialFill),specialStroke:z(e.tertiaryBorderColor??e.secondaryBorderColor,F.specialStroke),ruleNameColor:z(e.titleColor??e.textColor,F.ruleNameColor)}},"buildThemeDefaults"),E=n(e=>{const t=a(),n={...l(),...t.themeVariables??{},...v(e)},r=B(n),i={...t.railroad??{},...R(e)};return{compactMode:i.compactMode??r.compactMode,padding:M(i.padding,r.padding),verticalSeparation:M(i.verticalSeparation,r.verticalSeparation),horizontalSeparation:M(i.horizontalSeparation,r.horizontalSeparation),arcRadius:M(i.arcRadius,r.arcRadius),fontSize:M(i.fontSize,r.fontSize),fontFamily:N(i.fontFamily,r.fontFamily),terminalFill:z(i.terminalFill,r.terminalFill),terminalStroke:z(i.terminalStroke,r.terminalStroke),terminalTextColor:z(i.terminalTextColor,r.terminalTextColor),nonTerminalFill:z(i.nonTerminalFill,r.nonTerminalFill),nonTerminalStroke:z(i.nonTerminalStroke,r.nonTerminalStroke),nonTerminalTextColor:z(i.nonTerminalTextColor,r.nonTerminalTextColor),lineColor:z(i.lineColor,r.lineColor),strokeWidth:M(i.strokeWidth,r.strokeWidth),markerFill:z(i.markerFill,r.markerFill),commentFill:z(i.commentFill,r.commentFill),commentStroke:z(i.commentStroke,r.commentStroke),commentTextColor:z(i.commentTextColor,r.commentTextColor),specialFill:z(i.specialFill,r.specialFill),specialStroke:z(i.specialStroke,r.specialStroke),ruleNameColor:z(i.ruleNameColor,r.ruleNameColor),showMarkers:i.showMarkers??r.showMarkers,markerRadius:M(i.markerRadius,r.markerRadius)}},"buildRailroadStyleOptions"),D=n(e=>{const{fontFamily:t,fontSize:n,terminalFill:r,terminalStroke:i,terminalTextColor:a,nonTerminalFill:o,nonTerminalStroke:l,nonTerminalTextColor:s,lineColor:d,strokeWidth:m,markerFill:c,commentFill:h,commentStroke:p,commentTextColor:u,specialFill:g,specialStroke:T,ruleNameColor:f}=E(e);return`\n .railroad-diagram {\n font-family: ${t};\n font-size: ${n}px;\n }\n\n .railroad-terminal rect {\n fill: ${r};\n stroke: ${i};\n stroke-width: ${m}px;\n }\n\n .railroad-terminal text {\n fill: ${a};\n font-family: ${t};\n font-size: ${n}px;\n text-anchor: middle;\n dominant-baseline: middle;\n }\n\n .railroad-nonterminal rect {\n fill: ${o};\n stroke: ${l};\n stroke-width: ${m}px;\n }\n\n .railroad-nonterminal text {\n fill: ${s};\n font-family: ${t};\n font-size: ${n}px;\n text-anchor: middle;\n dominant-baseline: middle;\n }\n\n .railroad-line {\n stroke: ${d};\n stroke-width: ${m}px;\n fill: none;\n }\n\n .railroad-start circle,\n .railroad-end circle {\n fill: ${c};\n }\n\n .railroad-comment ellipse {\n fill: ${h};\n stroke: ${p};\n stroke-width: ${m}px;\n }\n\n .railroad-comment text {\n fill: ${u};\n font-style: italic;\n font-family: ${t};\n font-size: ${n}px;\n text-anchor: middle;\n dominant-baseline: middle;\n }\n\n .railroad-special rect {\n fill: ${g};\n stroke: ${T};\n stroke-width: ${m}px;\n stroke-dasharray: 5,3;\n }\n\n .railroad-special text {\n fill: ${s};\n font-family: ${t};\n font-size: ${n}px;\n text-anchor: middle;\n dominant-baseline: middle;\n }\n\n .railroad-rule-name {\n font-weight: bold;\n fill: ${f};\n font-family: ${t};\n font-size: ${n}px;\n }\n\n .railroad-group {\n /* Grouping container, no specific styles */\n }\n`},"getStyles"),O=(n(e=class{constructor(){this.d=""}moveTo(e,t){return this.d+=`M ${e} ${t} `,this}lineTo(e,t){return this.d+=`L ${e} ${t} `,this}horizontalTo(e){return this.d+=`H ${e} `,this}verticalTo(e){return this.d+=`V ${e} `,this}arcTo(e,t,n,r,i,a,o){return this.d+=`A ${e} ${t} ${n} ${r?1:0} ${i?1:0} ${a} ${o} `,this}build(){return this.d.trim()}},"PathBuilder"),e),W=(n(t=class{constructor(e,t=E()){this.textCache=new Map,this.svg=e,this.config=t}measureText(e){if(this.textCache.has(e))return this.textCache.get(e);const t=this.svg.append("text").attr("font-family",this.config.fontFamily).attr("font-size",this.config.fontSize).text(e),n=t.node().getBBox(),r={width:n.width,height:n.height};return t.remove(),this.textCache.set(e,r),r}renderTerminal(e,t){const n=this.measureText(t),r=n.width+2*this.config.padding,i=n.height+2*this.config.padding,a=e.append("g").attr("class","railroad-terminal");return a.append("rect").attr("x",0).attr("y",0).attr("width",r).attr("height",i).attr("rx",10).attr("ry",10),a.append("text").attr("x",r/2).attr("y",i/2).text(t),{element:a.node(),dimensions:{width:r,height:i,up:i/2,down:i/2}}}renderNonTerminal(e,t){const n=this.measureText(t),r=n.width+2*this.config.padding,i=n.height+2*this.config.padding,a=e.append("g").attr("class","railroad-nonterminal");return a.append("rect").attr("x",0).attr("y",0).attr("width",r).attr("height",i),a.append("text").attr("x",r/2).attr("y",i/2).text(t),{element:a.node(),dimensions:{width:r,height:i,up:i/2,down:i/2}}}renderSequence(e,t){const n=t.map(t=>this.renderExpression(e,t));let r=0,i=0,a=0;for(const s of n)r+=s.dimensions.width,i=Math.max(i,s.dimensions.up),a=Math.max(a,s.dimensions.down);r+=(n.length-1)*this.config.horizontalSeparation;const o=e.append("g").attr("class","railroad-sequence");let l=0;for(let s=0;s<n.length;s++){const e=n[s],t=i-e.dimensions.up;if(o.node().appendChild(e.element).setAttribute("transform",`translate(${l}, ${t})`),s<n.length-1){const t=l+e.dimensions.width,n=t+this.config.horizontalSeparation,r=i;o.append("path").attr("class","railroad-line").attr("d",(new O).moveTo(t,r).lineTo(n,r).build())}l+=e.dimensions.width+this.config.horizontalSeparation}return{element:o.node(),dimensions:{width:r,height:i+a,up:i,down:a}}}renderChoice(e,t){const n=t.map(t=>this.renderExpression(e,t));let r=0,i=0;for(const m of n)r=Math.max(r,m.dimensions.width),i+=m.dimensions.height;i+=(n.length-1)*this.config.verticalSeparation;const a=this.config.arcRadius,o=r+4*a,l=e.append("g").attr("class","railroad-choice");let s=0;const d=i/2;for(const m of n){const e=s,t=e+m.dimensions.up,n=2*a+(r-m.dimensions.width)/2;l.node().appendChild(m.element).setAttribute("transform",`translate(${n}, ${e})`);const i=new O,c=t>d;t===d?i.moveTo(0,d).lineTo(n,t):i.moveTo(0,d).arcTo(a,a,0,!1,c,a,d+(c?a:-a)).lineTo(a,t-(c?a:-a)).arcTo(a,a,0,!1,!c,2*a,t).lineTo(n,t),l.append("path").attr("class","railroad-line").attr("d",i.build());const h=new O,p=n+m.dimensions.width,u=o-2*a;t===d?h.moveTo(p,t).lineTo(o,d):h.moveTo(p,t).lineTo(u,t).arcTo(a,a,0,!1,!c,o-a,t+(c?-a:a)).lineTo(o-a,d+(c?a:-a)).arcTo(a,a,0,!1,c,o,d),l.append("path").attr("class","railroad-line").attr("d",h.build()),s+=m.dimensions.height+this.config.verticalSeparation}return{element:l.node(),dimensions:{width:o,height:i,up:d,down:i-d}}}renderOptional(e,t){const n=this.renderExpression(e,t),r=this.config.arcRadius,i=2*r,a=n.dimensions.width+4*r,o=n.dimensions.height+i,l=e.append("g").attr("class","railroad-optional"),s=2*r,d=i;l.node().appendChild(n.element).setAttribute("transform",`translate(${s}, ${d})`);const m=d+n.dimensions.up,c=(new O).moveTo(0,m).lineTo(2*r,m);l.append("path").attr("class","railroad-line").attr("d",c.build());const h=(new O).moveTo(s+n.dimensions.width,m).lineTo(a,m);l.append("path").attr("class","railroad-line").attr("d",h.build());const p=(new O).moveTo(0,m).arcTo(r,r,0,!1,!1,r,m-r).lineTo(r,r).arcTo(r,r,0,!1,!0,2*r,0).lineTo(a-2*r,0).arcTo(r,r,0,!1,!0,a-r,r).lineTo(a-r,m-r).arcTo(r,r,0,!1,!1,a,m);return l.append("path").attr("class","railroad-line").attr("d",p.build()),{element:l.node(),dimensions:{width:a,height:o,up:m,down:o-m}}}renderRepetition(e,t,n){const r=this.renderExpression(e,t),i=this.config.arcRadius,a=2*i,o=r.dimensions.width+4*i,l=0===n,s=r.dimensions.height+a+(l?a:0),d=e.append("g").attr("class","railroad-repetition"),m=2*i,c=l?a:0;d.node().appendChild(r.element).setAttribute("transform",`translate(${m}, ${c})`);const h=c+r.dimensions.up;d.append("path").attr("class","railroad-line").attr("d",(new O).moveTo(0,h).lineTo(2*i,h).build()),d.append("path").attr("class","railroad-line").attr("d",(new O).moveTo(m+r.dimensions.width,h).lineTo(o,h).build());const p=c+r.dimensions.height+i,u=(new O).moveTo(m+r.dimensions.width,h).arcTo(i,i,0,!1,!0,m+r.dimensions.width+i,h+i).lineTo(m+r.dimensions.width+i,p).arcTo(i,i,0,!1,!0,m+r.dimensions.width,p+i).lineTo(2*i,p+i).arcTo(i,i,0,!1,!0,i,p).lineTo(i,h+i).arcTo(i,i,0,!1,!0,2*i,h);if(d.append("path").attr("class","railroad-line").attr("d",u.build()),l){const e=(new O).moveTo(0,h).arcTo(i,i,0,!1,!1,i,h-i).lineTo(i,i).arcTo(i,i,0,!1,!0,2*i,0).lineTo(o-2*i,0).arcTo(i,i,0,!1,!0,o-i,i).lineTo(o-i,h-i).arcTo(i,i,0,!1,!1,o,h);d.append("path").attr("class","railroad-line").attr("d",e.build())}return{element:d.node(),dimensions:{width:o,height:s,up:h,down:s-h}}}renderSpecial(e,t){const n=this.measureText("? "+t+" ?"),r=n.width+2*this.config.padding,i=n.height+2*this.config.padding,a=e.append("g").attr("class","railroad-special");return a.append("rect").attr("x",0).attr("y",0).attr("width",r).attr("height",i),a.append("text").attr("x",r/2).attr("y",i/2).text("? "+t+" ?"),{element:a.node(),dimensions:{width:r,height:i,up:i/2,down:i/2}}}renderExpression(e,t){switch(t.type){case"terminal":return this.renderTerminal(e,t.value);case"nonterminal":return this.renderNonTerminal(e,t.name);case"sequence":return this.renderSequence(e,t.elements);case"choice":return this.renderChoice(e,t.alternatives);case"optional":return this.renderOptional(e,t.element);case"repetition":return this.renderRepetition(e,t.element,t.min);case"special":return this.renderSpecial(e,t.text);default:throw new Error(`Unknown node type: ${t.type}`)}}renderRule(e,t){const n=this.svg.append("g").attr("class","railroad-rule").attr("transform",`translate(0, ${t})`),r=e.name+" =",i=this.measureText(r).width+20,a=i+20,o=n.append("g"),l=this.renderExpression(o,e.definition),s=Math.max(20,l.dimensions.up),d=s-l.dimensions.up;return o.attr("transform",`translate(${a}, ${d})`),n.append("g").attr("class","railroad-rule-name-group").append("text").attr("class","railroad-rule-name").attr("x",0).attr("y",s).text(r),n.append("g").attr("class","railroad-start").append("circle").attr("cx",i).attr("cy",s).attr("r",this.config.markerRadius),n.append("g").attr("class","railroad-end").append("circle").attr("cx",a+l.dimensions.width+10).attr("cy",s).attr("r",this.config.markerRadius),n.append("path").attr("class","railroad-line").attr("d",(new O).moveTo(i+this.config.markerRadius,s).lineTo(a,s).build()),n.append("path").attr("class","railroad-line").attr("d",(new O).moveTo(a+l.dimensions.width,s).lineTo(a+l.dimensions.width+10-this.config.markerRadius,s).build()),{height:Math.max(40,d+l.dimensions.height+2*this.config.padding),width:a+l.dimensions.width+10+this.config.markerRadius}}renderDiagram(e){let t=this.config.padding,n=0;for(const r of e){const e=this.renderRule(r,t);t+=e.height+this.config.verticalSeparation,n=Math.max(n,e.width)}return{width:n+2*this.config.padding,height:t+this.config.padding}}},"RailroadRenderer"),t),q=n((e,t,n)=>{s(e,t.height,t.width,n),e.attr("viewBox",`0 0 ${t.width} ${t.height}`)},"configureRailroadSvgSize"),V={draw:n((e,t,n)=>{r.debug("[Railroad] Rendering diagram\n"+e);try{const e=i(t);e.attr("class","railroad-diagram");const n=a().railroad,o=n?.useMaxWidth??!0,l=C.getRules();if(r.debug(`[Railroad] Rendering ${l.length} rules`),0===l.length)return r.warn("[Railroad] No rules to render"),void q(e,{height:100,width:200},o);const s=new W(e,E()).renderDiagram(l);q(e,s,o),r.debug("[Railroad] Render complete")}catch(o){throw r.error("[Railroad] Render error:",o),o}},"draw")};export{C as d,D as g,V as r};
1
+ var e,t;import{_ as n,l as r,F as i,z as a,q as o,W as l,e as s,i as d,c as m}from"./mermaid.core-LEKKQwXZ.js";var c="",h="",p="",u=[],g=new Map,T=n(e=>d(e,m()),"sanitizeText"),f=n(e=>{switch(e.type){case"terminal":return{...e,value:T(e.value)};case"nonterminal":return{...e,name:T(e.name)};case"sequence":return{...e,elements:e.elements.map(f)};case"choice":return{...e,alternatives:e.alternatives.map(f)};case"optional":return{...e,element:f(e.element)};case"repetition":return{...e,element:f(e.element),separator:e.separator?f(e.separator):void 0};case"special":return{...e,text:T(e.text)}}},"sanitizeAstNode"),x=n(()=>{c="",h="",p="",u.length=0,g.clear(),o(),r.debug("[Railroad] Database cleared")},"clear"),w=n(e=>{c=T(e),r.debug("[Railroad] Title set:",e)},"setTitle"),k=n(()=>c,"getTitle"),C={clear:x,setTitle:w,getTitle:k,addRule:n(e=>{const t={...e,name:T(e.name),definition:f(e.definition),comment:e.comment?T(e.comment):void 0};r.debug("[Railroad] Adding rule:",t.name),g.has(t.name)&&r.warn(`[Railroad] Rule '${t.name}' is already defined. Overwriting.`),u.push(t),g.set(t.name,t)},"addRule"),getRules:n(()=>u,"getRules"),getRule:n(e=>g.get(e),"getRule"),setAccTitle:n(e=>{h=T(e).replace(/^\s+/g,""),r.debug("[Railroad] Accessibility title set:",e)},"setAccTitle"),getAccTitle:n(()=>h,"getAccTitle"),setAccDescription:n(e=>{p=T(e).replace(/\n\s+/g,"\n"),r.debug("[Railroad] Accessibility description set:",e)},"setAccDescription"),getAccDescription:n(()=>p,"getAccDescription"),setDiagramTitle:w,getDiagramTitle:k},F={compactMode:!1,padding:10,verticalSeparation:8,horizontalSeparation:10,arcRadius:10,fontSize:14,fontFamily:"monospace",terminalFill:"#FFFFC0",terminalStroke:"#000000",terminalTextColor:"#000000",nonTerminalFill:"#FFFFFF",nonTerminalStroke:"#000000",nonTerminalTextColor:"#000000",lineColor:"#000000",strokeWidth:2,markerFill:"#000000",commentFill:"#E8E8E8",commentStroke:"#888888",commentTextColor:"#666666",specialFill:"#F0E0FF",specialStroke:"#8800CC",ruleNameColor:"#000066",showMarkers:!0,markerRadius:5},S=/^#(?:[\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$|^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch)\([\d\s%+,./-]+\)$|^[a-z]+$/i,$=/^[\w "',.-]+$/,y=new Set(["compactMode","padding","verticalSeparation","horizontalSeparation","arcRadius","fontSize","fontFamily","terminalFill","terminalStroke","terminalTextColor","nonTerminalFill","nonTerminalStroke","nonTerminalTextColor","lineColor","strokeWidth","markerFill","commentFill","commentStroke","commentTextColor","specialFill","specialStroke","ruleNameColor","showMarkers","markerRadius"]),b=n(e=>!!e&&Object.keys(e).every(e=>"railroad"===e||y.has(e)),"isRailroadStyleOptions"),R=n(e=>e?"railroad"in e&&e.railroad?e.railroad:b(e)?e:{}:{},"extractRailroadOverrides"),v=n(e=>{if(!e||b(e))return{};const{railroad:t,svgId:n,theme:r,look:i,...a}=e;return a},"extractThemeOverrides"),z=n((e,t)=>{if("string"!=typeof e)return t;const n=e.trim();return S.test(n)?n:t},"sanitizeColorValue"),N=n((e,t)=>{if("string"!=typeof e)return t;const n=e.trim();return $.test(n)?n:t},"sanitizeFontFamilyValue"),M=n((e,t)=>{const n="number"==typeof e?e:"string"==typeof e?Number.parseFloat(e):Number.NaN;return Number.isFinite(n)&&n>=0?n:t},"sanitizeNumberValue"),A=n(e=>{const t="number"==typeof e?e:"string"==typeof e?Number.parseFloat(e):Number.NaN;return Number.isFinite(t)&&t>0?t:void 0},"parseThemeFontSize"),B=n(e=>{const t=N(e.fontFamily,F.fontFamily),n=A(e.fontSize)??F.fontSize;return{...F,fontFamily:t,fontSize:n,terminalFill:z(e.secondBkg??e.secondaryColor,F.terminalFill),terminalStroke:z(e.secondaryBorderColor??e.lineColor,F.terminalStroke),terminalTextColor:z(e.secondaryTextColor??e.textColor,F.terminalTextColor),nonTerminalFill:z(e.mainBkg??e.background,F.nonTerminalFill),nonTerminalStroke:z(e.primaryBorderColor??e.lineColor,F.nonTerminalStroke),nonTerminalTextColor:z(e.primaryTextColor??e.textColor,F.nonTerminalTextColor),lineColor:z(e.lineColor,F.lineColor),markerFill:z(e.lineColor,F.markerFill),commentFill:z(e.labelBackground??e.tertiaryColor,F.commentFill),commentStroke:z(e.tertiaryBorderColor??e.lineColor,F.commentStroke),commentTextColor:z(e.tertiaryTextColor??e.textColor,F.commentTextColor),specialFill:z(e.tertiaryColor??e.secondaryColor,F.specialFill),specialStroke:z(e.tertiaryBorderColor??e.secondaryBorderColor,F.specialStroke),ruleNameColor:z(e.titleColor??e.textColor,F.ruleNameColor)}},"buildThemeDefaults"),E=n(e=>{const t=a(),n={...l(),...t.themeVariables??{},...v(e)},r=B(n),i={...t.railroad??{},...R(e)};return{compactMode:i.compactMode??r.compactMode,padding:M(i.padding,r.padding),verticalSeparation:M(i.verticalSeparation,r.verticalSeparation),horizontalSeparation:M(i.horizontalSeparation,r.horizontalSeparation),arcRadius:M(i.arcRadius,r.arcRadius),fontSize:M(i.fontSize,r.fontSize),fontFamily:N(i.fontFamily,r.fontFamily),terminalFill:z(i.terminalFill,r.terminalFill),terminalStroke:z(i.terminalStroke,r.terminalStroke),terminalTextColor:z(i.terminalTextColor,r.terminalTextColor),nonTerminalFill:z(i.nonTerminalFill,r.nonTerminalFill),nonTerminalStroke:z(i.nonTerminalStroke,r.nonTerminalStroke),nonTerminalTextColor:z(i.nonTerminalTextColor,r.nonTerminalTextColor),lineColor:z(i.lineColor,r.lineColor),strokeWidth:M(i.strokeWidth,r.strokeWidth),markerFill:z(i.markerFill,r.markerFill),commentFill:z(i.commentFill,r.commentFill),commentStroke:z(i.commentStroke,r.commentStroke),commentTextColor:z(i.commentTextColor,r.commentTextColor),specialFill:z(i.specialFill,r.specialFill),specialStroke:z(i.specialStroke,r.specialStroke),ruleNameColor:z(i.ruleNameColor,r.ruleNameColor),showMarkers:i.showMarkers??r.showMarkers,markerRadius:M(i.markerRadius,r.markerRadius)}},"buildRailroadStyleOptions"),D=n(e=>{const{fontFamily:t,fontSize:n,terminalFill:r,terminalStroke:i,terminalTextColor:a,nonTerminalFill:o,nonTerminalStroke:l,nonTerminalTextColor:s,lineColor:d,strokeWidth:m,markerFill:c,commentFill:h,commentStroke:p,commentTextColor:u,specialFill:g,specialStroke:T,ruleNameColor:f}=E(e);return`\n .railroad-diagram {\n font-family: ${t};\n font-size: ${n}px;\n }\n\n .railroad-terminal rect {\n fill: ${r};\n stroke: ${i};\n stroke-width: ${m}px;\n }\n\n .railroad-terminal text {\n fill: ${a};\n font-family: ${t};\n font-size: ${n}px;\n text-anchor: middle;\n dominant-baseline: middle;\n }\n\n .railroad-nonterminal rect {\n fill: ${o};\n stroke: ${l};\n stroke-width: ${m}px;\n }\n\n .railroad-nonterminal text {\n fill: ${s};\n font-family: ${t};\n font-size: ${n}px;\n text-anchor: middle;\n dominant-baseline: middle;\n }\n\n .railroad-line {\n stroke: ${d};\n stroke-width: ${m}px;\n fill: none;\n }\n\n .railroad-start circle,\n .railroad-end circle {\n fill: ${c};\n }\n\n .railroad-comment ellipse {\n fill: ${h};\n stroke: ${p};\n stroke-width: ${m}px;\n }\n\n .railroad-comment text {\n fill: ${u};\n font-style: italic;\n font-family: ${t};\n font-size: ${n}px;\n text-anchor: middle;\n dominant-baseline: middle;\n }\n\n .railroad-special rect {\n fill: ${g};\n stroke: ${T};\n stroke-width: ${m}px;\n stroke-dasharray: 5,3;\n }\n\n .railroad-special text {\n fill: ${s};\n font-family: ${t};\n font-size: ${n}px;\n text-anchor: middle;\n dominant-baseline: middle;\n }\n\n .railroad-rule-name {\n font-weight: bold;\n fill: ${f};\n font-family: ${t};\n font-size: ${n}px;\n }\n\n .railroad-group {\n /* Grouping container, no specific styles */\n }\n`},"getStyles"),O=(n(e=class{constructor(){this.d=""}moveTo(e,t){return this.d+=`M ${e} ${t} `,this}lineTo(e,t){return this.d+=`L ${e} ${t} `,this}horizontalTo(e){return this.d+=`H ${e} `,this}verticalTo(e){return this.d+=`V ${e} `,this}arcTo(e,t,n,r,i,a,o){return this.d+=`A ${e} ${t} ${n} ${r?1:0} ${i?1:0} ${a} ${o} `,this}build(){return this.d.trim()}},"PathBuilder"),e),W=(n(t=class{constructor(e,t=E()){this.textCache=new Map,this.svg=e,this.config=t}measureText(e){if(this.textCache.has(e))return this.textCache.get(e);const t=this.svg.append("text").attr("font-family",this.config.fontFamily).attr("font-size",this.config.fontSize).text(e),n=t.node().getBBox(),r={width:n.width,height:n.height};return t.remove(),this.textCache.set(e,r),r}renderTerminal(e,t){const n=this.measureText(t),r=n.width+2*this.config.padding,i=n.height+2*this.config.padding,a=e.append("g").attr("class","railroad-terminal");return a.append("rect").attr("x",0).attr("y",0).attr("width",r).attr("height",i).attr("rx",10).attr("ry",10),a.append("text").attr("x",r/2).attr("y",i/2).text(t),{element:a.node(),dimensions:{width:r,height:i,up:i/2,down:i/2}}}renderNonTerminal(e,t){const n=this.measureText(t),r=n.width+2*this.config.padding,i=n.height+2*this.config.padding,a=e.append("g").attr("class","railroad-nonterminal");return a.append("rect").attr("x",0).attr("y",0).attr("width",r).attr("height",i),a.append("text").attr("x",r/2).attr("y",i/2).text(t),{element:a.node(),dimensions:{width:r,height:i,up:i/2,down:i/2}}}renderSequence(e,t){const n=t.map(t=>this.renderExpression(e,t));let r=0,i=0,a=0;for(const s of n)r+=s.dimensions.width,i=Math.max(i,s.dimensions.up),a=Math.max(a,s.dimensions.down);r+=(n.length-1)*this.config.horizontalSeparation;const o=e.append("g").attr("class","railroad-sequence");let l=0;for(let s=0;s<n.length;s++){const e=n[s],t=i-e.dimensions.up;if(o.node().appendChild(e.element).setAttribute("transform",`translate(${l}, ${t})`),s<n.length-1){const t=l+e.dimensions.width,n=t+this.config.horizontalSeparation,r=i;o.append("path").attr("class","railroad-line").attr("d",(new O).moveTo(t,r).lineTo(n,r).build())}l+=e.dimensions.width+this.config.horizontalSeparation}return{element:o.node(),dimensions:{width:r,height:i+a,up:i,down:a}}}renderChoice(e,t){const n=t.map(t=>this.renderExpression(e,t));let r=0,i=0;for(const m of n)r=Math.max(r,m.dimensions.width),i+=m.dimensions.height;i+=(n.length-1)*this.config.verticalSeparation;const a=this.config.arcRadius,o=r+4*a,l=e.append("g").attr("class","railroad-choice");let s=0;const d=i/2;for(const m of n){const e=s,t=e+m.dimensions.up,n=2*a+(r-m.dimensions.width)/2;l.node().appendChild(m.element).setAttribute("transform",`translate(${n}, ${e})`);const i=new O,c=t>d;t===d?i.moveTo(0,d).lineTo(n,t):i.moveTo(0,d).arcTo(a,a,0,!1,c,a,d+(c?a:-a)).lineTo(a,t-(c?a:-a)).arcTo(a,a,0,!1,!c,2*a,t).lineTo(n,t),l.append("path").attr("class","railroad-line").attr("d",i.build());const h=new O,p=n+m.dimensions.width,u=o-2*a;t===d?h.moveTo(p,t).lineTo(o,d):h.moveTo(p,t).lineTo(u,t).arcTo(a,a,0,!1,!c,o-a,t+(c?-a:a)).lineTo(o-a,d+(c?a:-a)).arcTo(a,a,0,!1,c,o,d),l.append("path").attr("class","railroad-line").attr("d",h.build()),s+=m.dimensions.height+this.config.verticalSeparation}return{element:l.node(),dimensions:{width:o,height:i,up:d,down:i-d}}}renderOptional(e,t){const n=this.renderExpression(e,t),r=this.config.arcRadius,i=2*r,a=n.dimensions.width+4*r,o=n.dimensions.height+i,l=e.append("g").attr("class","railroad-optional"),s=2*r,d=i;l.node().appendChild(n.element).setAttribute("transform",`translate(${s}, ${d})`);const m=d+n.dimensions.up,c=(new O).moveTo(0,m).lineTo(2*r,m);l.append("path").attr("class","railroad-line").attr("d",c.build());const h=(new O).moveTo(s+n.dimensions.width,m).lineTo(a,m);l.append("path").attr("class","railroad-line").attr("d",h.build());const p=(new O).moveTo(0,m).arcTo(r,r,0,!1,!1,r,m-r).lineTo(r,r).arcTo(r,r,0,!1,!0,2*r,0).lineTo(a-2*r,0).arcTo(r,r,0,!1,!0,a-r,r).lineTo(a-r,m-r).arcTo(r,r,0,!1,!1,a,m);return l.append("path").attr("class","railroad-line").attr("d",p.build()),{element:l.node(),dimensions:{width:a,height:o,up:m,down:o-m}}}renderRepetition(e,t,n){const r=this.renderExpression(e,t),i=this.config.arcRadius,a=2*i,o=r.dimensions.width+4*i,l=0===n,s=r.dimensions.height+a+(l?a:0),d=e.append("g").attr("class","railroad-repetition"),m=2*i,c=l?a:0;d.node().appendChild(r.element).setAttribute("transform",`translate(${m}, ${c})`);const h=c+r.dimensions.up;d.append("path").attr("class","railroad-line").attr("d",(new O).moveTo(0,h).lineTo(2*i,h).build()),d.append("path").attr("class","railroad-line").attr("d",(new O).moveTo(m+r.dimensions.width,h).lineTo(o,h).build());const p=c+r.dimensions.height+i,u=(new O).moveTo(m+r.dimensions.width,h).arcTo(i,i,0,!1,!0,m+r.dimensions.width+i,h+i).lineTo(m+r.dimensions.width+i,p).arcTo(i,i,0,!1,!0,m+r.dimensions.width,p+i).lineTo(2*i,p+i).arcTo(i,i,0,!1,!0,i,p).lineTo(i,h+i).arcTo(i,i,0,!1,!0,2*i,h);if(d.append("path").attr("class","railroad-line").attr("d",u.build()),l){const e=(new O).moveTo(0,h).arcTo(i,i,0,!1,!1,i,h-i).lineTo(i,i).arcTo(i,i,0,!1,!0,2*i,0).lineTo(o-2*i,0).arcTo(i,i,0,!1,!0,o-i,i).lineTo(o-i,h-i).arcTo(i,i,0,!1,!1,o,h);d.append("path").attr("class","railroad-line").attr("d",e.build())}return{element:d.node(),dimensions:{width:o,height:s,up:h,down:s-h}}}renderSpecial(e,t){const n=this.measureText("? "+t+" ?"),r=n.width+2*this.config.padding,i=n.height+2*this.config.padding,a=e.append("g").attr("class","railroad-special");return a.append("rect").attr("x",0).attr("y",0).attr("width",r).attr("height",i),a.append("text").attr("x",r/2).attr("y",i/2).text("? "+t+" ?"),{element:a.node(),dimensions:{width:r,height:i,up:i/2,down:i/2}}}renderExpression(e,t){switch(t.type){case"terminal":return this.renderTerminal(e,t.value);case"nonterminal":return this.renderNonTerminal(e,t.name);case"sequence":return this.renderSequence(e,t.elements);case"choice":return this.renderChoice(e,t.alternatives);case"optional":return this.renderOptional(e,t.element);case"repetition":return this.renderRepetition(e,t.element,t.min);case"special":return this.renderSpecial(e,t.text);default:throw new Error(`Unknown node type: ${t.type}`)}}renderRule(e,t){const n=this.svg.append("g").attr("class","railroad-rule").attr("transform",`translate(0, ${t})`),r=e.name+" =",i=this.measureText(r).width+20,a=i+20,o=n.append("g"),l=this.renderExpression(o,e.definition),s=Math.max(20,l.dimensions.up),d=s-l.dimensions.up;return o.attr("transform",`translate(${a}, ${d})`),n.append("g").attr("class","railroad-rule-name-group").append("text").attr("class","railroad-rule-name").attr("x",0).attr("y",s).text(r),n.append("g").attr("class","railroad-start").append("circle").attr("cx",i).attr("cy",s).attr("r",this.config.markerRadius),n.append("g").attr("class","railroad-end").append("circle").attr("cx",a+l.dimensions.width+10).attr("cy",s).attr("r",this.config.markerRadius),n.append("path").attr("class","railroad-line").attr("d",(new O).moveTo(i+this.config.markerRadius,s).lineTo(a,s).build()),n.append("path").attr("class","railroad-line").attr("d",(new O).moveTo(a+l.dimensions.width,s).lineTo(a+l.dimensions.width+10-this.config.markerRadius,s).build()),{height:Math.max(40,d+l.dimensions.height+2*this.config.padding),width:a+l.dimensions.width+10+this.config.markerRadius}}renderDiagram(e){let t=this.config.padding,n=0;for(const r of e){const e=this.renderRule(r,t);t+=e.height+this.config.verticalSeparation,n=Math.max(n,e.width)}return{width:n+2*this.config.padding,height:t+this.config.padding}}},"RailroadRenderer"),t),q=n((e,t,n)=>{s(e,t.height,t.width,n),e.attr("viewBox",`0 0 ${t.width} ${t.height}`)},"configureRailroadSvgSize"),V={draw:n((e,t,n)=>{r.debug("[Railroad] Rendering diagram\n"+e);try{const e=i(t);e.attr("class","railroad-diagram");const n=a().railroad,o=n?.useMaxWidth??!0,l=C.getRules();if(r.debug(`[Railroad] Rendering ${l.length} rules`),0===l.length)return r.warn("[Railroad] No rules to render"),void q(e,{height:100,width:200},o);const s=new W(e,E()).renderDiagram(l);q(e,s,o),r.debug("[Railroad] Render complete")}catch(o){throw r.error("[Railroad] Render error:",o),o}},"draw")};export{C as d,D as g,V as r};
@@ -1 +1 @@
1
- import{_ as e,l as n}from"./mermaid.core-CzqhAinL.js";import{i as t,G as r}from"./graph-BD-RY4fR.js";import{b as o,m as a}from"./map-Dwt0FgOz.js";function s(e){var n={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:i(e),edges:d(e)};return t(e.graph())||(n.value=function(e){return o(e,4)}(e.graph())),n}function i(e){return a(e.nodes(),function(n){var r=e.node(n),o=e.parent(n),a={v:n};return t(r)||(a.value=r),t(o)||(a.parent=o),a})}function d(e){return a(e.edges(),function(n){var r=e.edge(n),o={v:n.v,w:n.w};return t(n.name)||(o.name=n.name),t(r)||(o.value=r),o})}var c=new Map,l=new Map,g=new Map,u=e(()=>{l.clear(),g.clear(),c.clear()},"clear"),f=e((e,t)=>{const r=l.get(t)||[];return n.trace("In isDescendant",t," ",e," = ",r.includes(e)),r.includes(e)},"isDescendant"),h=e((e,t)=>{const r=l.get(t)||[];return n.info("Descendants of ",t," is ",r),n.info("Edge is ",e),e.v!==t&&e.w!==t&&(r?r.includes(e.v)||f(e.v,t)||f(e.w,t)||r.includes(e.w):(n.debug("Tilt, ",t,",not in descendants"),!1))},"edgeInCluster"),p=e((e,t,r,o)=>{n.warn("Copying children of ",e,"root",o,"data",t.node(e),o);const a=t.children(e)||[];e!==o&&a.push(e),n.warn("Copying (nodes) clusterId",e,"nodes",a),a.forEach(a=>{if(t.children(a).length>0)p(a,t,r,o);else{const s=t.node(a);n.info("cp ",a," to ",o," with parent ",e),r.setNode(a,s),o!==t.parent(a)&&(n.warn("Setting parent",a,t.parent(a)),r.setParent(a,t.parent(a))),e!==o&&a!==e?(n.debug("Setting parent",a,e),r.setParent(a,e)):(n.info("In copy ",e,"root",o,"data",t.node(e),o),n.debug("Not Setting parent for node=",a,"cluster!==rootId",e!==o,"node!==clusterId",a!==e));const i=t.edges(a);n.debug("Copying Edges",i),i.forEach(a=>{n.info("Edge",a);const s=t.edge(a.v,a.w,a.name);n.info("Edge data",s,o);try{if(h(a,o)){const e=l.get(o)||[],i=e.includes(a.v)||f(a.v,o)||a.v===o,d=e.includes(a.w)||f(a.w,o)||a.w===o;if(i&&d)n.info("Copying as ",a.v,a.w,s,a.name),r.setEdge(a.v,a.w,s,a.name),n.info("newGraph edges ",r.edges(),r.edge(r.edges()[0]));else{const e=i?o:a.v,r=d?o:a.w;n.info("Rebinding cross-boundary edge as ",e,r,s,a.name),t.setEdge(e,r,s,a.name)}}else n.info("Skipping copy of edge ",a.v,"--\x3e",a.w," rootId: ",o," clusterId:",e)}catch(i){n.error(i)}})}n.debug("Removing node",a),t.removeNode(a)})},"copy"),w=e((e,n)=>{const t=n.children(e);let r=[...t];for(const o of t)g.set(o,e),r=[...r,...w(o,n)];return r},"extractDescendants"),v=e((e,n,t)=>{const r=e.edges().filter(e=>e.v===n||e.w===n),o=e.edges().filter(e=>e.v===t||e.w===t),a=r.map(e=>({v:e.v===n?t:e.v,w:e.w===n?n:e.w})),s=o.map(e=>({v:e.v,w:e.w}));return a.filter(e=>s.some(n=>e.v===n.v&&e.w===n.w))},"findCommonEdges"),m=e((e,t,r)=>{const o=t.children(e);if(n.trace("Searching children of id ",e,o),o.length<1)return e;let a;for(const n of o){const e=m(n,t,r),o=v(t,r,e);if(e){if(!(o.length>0))return e;a=e}}return a},"findNonClusterChild"),b=e(e=>c.has(e)&&c.get(e).externalConnections&&c.has(e)?c.get(e).id:e,"getAnchorId"),x=e((e,t)=>{if(!e||t>10)n.debug("Opting out, no graph ");else{n.debug("Opting in, graph "),e.nodes().forEach(function(t){e.children(t).length>0&&(n.warn("Cluster identified",t," Replacement id in edges: ",m(t,e,t)),l.set(t,w(t,e)),c.set(t,{id:m(t,e,t),clusterData:e.node(t)}))}),e.nodes().forEach(function(t){const r=e.children(t),o=e.edges();r.length>0?(n.debug("Cluster identified",t,l),o.forEach(e=>{f(e.v,t)^f(e.w,t)&&(n.warn("Edge: ",e," leaves cluster ",t),n.warn("Descendants of XXX ",t,": ",l.get(t)),c.get(t).externalConnections=!0)})):n.debug("Not a cluster ",t,l)});for(let n of c.keys()){const t=c.get(n).id,r=e.parent(t);r!==n&&c.has(r)&&!c.get(r).externalConnections&&(c.get(n).id=r);const o=e.edges().some(e=>e.v===n);if(t&&c.get(n)?.externalConnections&&o&&N(e,t,n)){const r=y(e,n,e.parent(t));r&&(c.get(n).id=r)}}e.edges().forEach(function(t){const r=e.edge(t);n.warn("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t)),n.warn("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(e.edge(t)));let o=t.v,a=t.w;if(n.warn("Fix XXX",c,"ids:",t.v,t.w,"Translating: ",c.get(t.v)," --- ",c.get(t.w)),c.get(t.v)||c.get(t.w)){if(n.warn("Fixing and trying - removing XXX",t.v,t.w,t.name),o=b(t.v),a=b(t.w),e.removeEdge(t.v,t.w,t.name),o!==t.v){const n=e.parent(o);c.get(n).externalConnections=!0,r.fromCluster=t.v}if(a!==t.w){const n=e.parent(a);c.get(n).externalConnections=!0,r.toCluster=t.w}n.warn("Fix Replacing with XXX",o,a,t.name),e.setEdge(o,a,r,t.name)}}),n.warn("Adjusted Graph",s(e)),C(e,0),n.trace(c)}},"adjustClustersAndEdges"),C=e((e,t)=>{if(n.warn("extractor - ",t,s(e),e.children("D")),t>10)return void n.error("Bailing out");let o=e.nodes(),a=!1;for(const n of o){const t=e.children(n);a=a||t.length>0}if(a){n.debug("Nodes = ",o,t);for(const a of o)if(n.debug("Extracting node",a,c,c.has(a)&&!c.get(a).externalConnections,!e.parent(a),e.node(a),e.children("D")," Depth ",t),c.has(a))if(c.get(a)?.clusterData?.explicitDir&&e.children(a)&&e.children(a).length>0){n.warn("Cluster with explicit dir, creating subgraph for children",a,t);const o=c.get(a).clusterData.dir,i=new r({multigraph:!0,compound:!0}).setGraph({rankdir:o,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});p(a,e,i,a);const d=e.node(a)||{};e.setNode(a,{...d,clusterNode:!0,id:a,clusterData:c.get(a).clusterData,label:c.get(a).label,graph:i}),n.warn("Subgraph for cluster with explicit dir created:",a,s(i))}else if(!c.get(a).externalConnections&&e.children(a)&&e.children(a).length>0){n.warn("Cluster without external connections, without a parent and with children",a,t);let o="TB"===e.graph().rankdir?"LR":"TB";c.get(a)?.clusterData?.dir&&(o=c.get(a).clusterData.dir,n.warn("Fixing dir",c.get(a).clusterData.dir,o));const i=new r({multigraph:!0,compound:!0}).setGraph({rankdir:o,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});p(a,e,i,a);const d=e.node(a)||{};e.setNode(a,{...d,clusterNode:!0,id:a,clusterData:c.get(a).clusterData,label:c.get(a).label,graph:i}),n.debug("Old graph after copy",s(e))}else n.warn("Cluster ** ",a," **not meeting the criteria !externalConnections:",!c.get(a).externalConnections," no parent: ",!e.parent(a)," children ",e.children(a)&&e.children(a).length>0,e.children("D"),t),n.debug(c);else n.debug("Not a cluster",a,t);o=e.nodes(),n.warn("New list of nodes",o);for(const r of o){const o=e.node(r);n.warn(" Now next level",r,o),o?.clusterNode&&C(o.graph,t+1)}}else n.debug("Done, no node has children",e.nodes())},"extractor"),D=e((e,n)=>{if(0===n.length)return[];let t=Object.assign([],n);return n.forEach(n=>{const r=e.children(n),o=D(e,r);t=[...t,...o]}),t},"sorter"),E=e(e=>D(e,e.children()),"sortNodesByHierarchy"),N=e((e,n,t)=>{let r=e.parent(n);for(;r&&r!==t;){const n=c.get(r);if(n&&!n.externalConnections)return!0;r=e.parent(r)}return!1},"isNodeInExtractableCluster"),y=e((e,n,t)=>{const r=e.children(n)??[];for(const o of r){if(o===t||f(o,t))continue;const r=m(o,e,n);if(r&&!N(e,r,n))return r}return null},"findSafeAnchorNode");export{x as a,c as b,u as c,m as f,E as s,s as w};
1
+ import{_ as e,l as n}from"./mermaid.core-LEKKQwXZ.js";import{i as t,G as r}from"./graph-BD-RY4fR.js";import{b as o,m as a}from"./map-XtUTTYLw.js";function s(e){var n={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:i(e),edges:d(e)};return t(e.graph())||(n.value=function(e){return o(e,4)}(e.graph())),n}function i(e){return a(e.nodes(),function(n){var r=e.node(n),o=e.parent(n),a={v:n};return t(r)||(a.value=r),t(o)||(a.parent=o),a})}function d(e){return a(e.edges(),function(n){var r=e.edge(n),o={v:n.v,w:n.w};return t(n.name)||(o.name=n.name),t(r)||(o.value=r),o})}var c=new Map,l=new Map,g=new Map,u=e(()=>{l.clear(),g.clear(),c.clear()},"clear"),f=e((e,t)=>{const r=l.get(t)||[];return n.trace("In isDescendant",t," ",e," = ",r.includes(e)),r.includes(e)},"isDescendant"),h=e((e,t)=>{const r=l.get(t)||[];return n.info("Descendants of ",t," is ",r),n.info("Edge is ",e),e.v!==t&&e.w!==t&&(r?r.includes(e.v)||f(e.v,t)||f(e.w,t)||r.includes(e.w):(n.debug("Tilt, ",t,",not in descendants"),!1))},"edgeInCluster"),p=e((e,t,r,o)=>{n.warn("Copying children of ",e,"root",o,"data",t.node(e),o);const a=t.children(e)||[];e!==o&&a.push(e),n.warn("Copying (nodes) clusterId",e,"nodes",a),a.forEach(a=>{if(t.children(a).length>0)p(a,t,r,o);else{const s=t.node(a);n.info("cp ",a," to ",o," with parent ",e),r.setNode(a,s),o!==t.parent(a)&&(n.warn("Setting parent",a,t.parent(a)),r.setParent(a,t.parent(a))),e!==o&&a!==e?(n.debug("Setting parent",a,e),r.setParent(a,e)):(n.info("In copy ",e,"root",o,"data",t.node(e),o),n.debug("Not Setting parent for node=",a,"cluster!==rootId",e!==o,"node!==clusterId",a!==e));const i=t.edges(a);n.debug("Copying Edges",i),i.forEach(a=>{n.info("Edge",a);const s=t.edge(a.v,a.w,a.name);n.info("Edge data",s,o);try{if(h(a,o)){const e=l.get(o)||[],i=e.includes(a.v)||f(a.v,o)||a.v===o,d=e.includes(a.w)||f(a.w,o)||a.w===o;if(i&&d)n.info("Copying as ",a.v,a.w,s,a.name),r.setEdge(a.v,a.w,s,a.name),n.info("newGraph edges ",r.edges(),r.edge(r.edges()[0]));else{const e=i?o:a.v,r=d?o:a.w;n.info("Rebinding cross-boundary edge as ",e,r,s,a.name),t.setEdge(e,r,s,a.name)}}else n.info("Skipping copy of edge ",a.v,"--\x3e",a.w," rootId: ",o," clusterId:",e)}catch(i){n.error(i)}})}n.debug("Removing node",a),t.removeNode(a)})},"copy"),w=e((e,n)=>{const t=n.children(e);let r=[...t];for(const o of t)g.set(o,e),r=[...r,...w(o,n)];return r},"extractDescendants"),v=e((e,n,t)=>{const r=e.edges().filter(e=>e.v===n||e.w===n),o=e.edges().filter(e=>e.v===t||e.w===t),a=r.map(e=>({v:e.v===n?t:e.v,w:e.w===n?n:e.w})),s=o.map(e=>({v:e.v,w:e.w}));return a.filter(e=>s.some(n=>e.v===n.v&&e.w===n.w))},"findCommonEdges"),m=e((e,t,r)=>{const o=t.children(e);if(n.trace("Searching children of id ",e,o),o.length<1)return e;let a;for(const n of o){const e=m(n,t,r),o=v(t,r,e);if(e){if(!(o.length>0))return e;a=e}}return a},"findNonClusterChild"),b=e(e=>c.has(e)&&c.get(e).externalConnections&&c.has(e)?c.get(e).id:e,"getAnchorId"),x=e((e,t)=>{if(!e||t>10)n.debug("Opting out, no graph ");else{n.debug("Opting in, graph "),e.nodes().forEach(function(t){e.children(t).length>0&&(n.warn("Cluster identified",t," Replacement id in edges: ",m(t,e,t)),l.set(t,w(t,e)),c.set(t,{id:m(t,e,t),clusterData:e.node(t)}))}),e.nodes().forEach(function(t){const r=e.children(t),o=e.edges();r.length>0?(n.debug("Cluster identified",t,l),o.forEach(e=>{f(e.v,t)^f(e.w,t)&&(n.warn("Edge: ",e," leaves cluster ",t),n.warn("Descendants of XXX ",t,": ",l.get(t)),c.get(t).externalConnections=!0)})):n.debug("Not a cluster ",t,l)});for(let n of c.keys()){const t=c.get(n).id,r=e.parent(t);r!==n&&c.has(r)&&!c.get(r).externalConnections&&(c.get(n).id=r);const o=e.edges().some(e=>e.v===n);if(t&&c.get(n)?.externalConnections&&o&&N(e,t,n)){const r=y(e,n,e.parent(t));r&&(c.get(n).id=r)}}e.edges().forEach(function(t){const r=e.edge(t);n.warn("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t)),n.warn("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(e.edge(t)));let o=t.v,a=t.w;if(n.warn("Fix XXX",c,"ids:",t.v,t.w,"Translating: ",c.get(t.v)," --- ",c.get(t.w)),c.get(t.v)||c.get(t.w)){if(n.warn("Fixing and trying - removing XXX",t.v,t.w,t.name),o=b(t.v),a=b(t.w),e.removeEdge(t.v,t.w,t.name),o!==t.v){const n=e.parent(o);c.get(n).externalConnections=!0,r.fromCluster=t.v}if(a!==t.w){const n=e.parent(a);c.get(n).externalConnections=!0,r.toCluster=t.w}n.warn("Fix Replacing with XXX",o,a,t.name),e.setEdge(o,a,r,t.name)}}),n.warn("Adjusted Graph",s(e)),C(e,0),n.trace(c)}},"adjustClustersAndEdges"),C=e((e,t)=>{if(n.warn("extractor - ",t,s(e),e.children("D")),t>10)return void n.error("Bailing out");let o=e.nodes(),a=!1;for(const n of o){const t=e.children(n);a=a||t.length>0}if(a){n.debug("Nodes = ",o,t);for(const a of o)if(n.debug("Extracting node",a,c,c.has(a)&&!c.get(a).externalConnections,!e.parent(a),e.node(a),e.children("D")," Depth ",t),c.has(a))if(c.get(a)?.clusterData?.explicitDir&&e.children(a)&&e.children(a).length>0){n.warn("Cluster with explicit dir, creating subgraph for children",a,t);const o=c.get(a).clusterData.dir,i=new r({multigraph:!0,compound:!0}).setGraph({rankdir:o,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});p(a,e,i,a);const d=e.node(a)||{};e.setNode(a,{...d,clusterNode:!0,id:a,clusterData:c.get(a).clusterData,label:c.get(a).label,graph:i}),n.warn("Subgraph for cluster with explicit dir created:",a,s(i))}else if(!c.get(a).externalConnections&&e.children(a)&&e.children(a).length>0){n.warn("Cluster without external connections, without a parent and with children",a,t);let o="TB"===e.graph().rankdir?"LR":"TB";c.get(a)?.clusterData?.dir&&(o=c.get(a).clusterData.dir,n.warn("Fixing dir",c.get(a).clusterData.dir,o));const i=new r({multigraph:!0,compound:!0}).setGraph({rankdir:o,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});p(a,e,i,a);const d=e.node(a)||{};e.setNode(a,{...d,clusterNode:!0,id:a,clusterData:c.get(a).clusterData,label:c.get(a).label,graph:i}),n.debug("Old graph after copy",s(e))}else n.warn("Cluster ** ",a," **not meeting the criteria !externalConnections:",!c.get(a).externalConnections," no parent: ",!e.parent(a)," children ",e.children(a)&&e.children(a).length>0,e.children("D"),t),n.debug(c);else n.debug("Not a cluster",a,t);o=e.nodes(),n.warn("New list of nodes",o);for(const r of o){const o=e.node(r);n.warn(" Now next level",r,o),o?.clusterNode&&C(o.graph,t+1)}}else n.debug("Done, no node has children",e.nodes())},"extractor"),D=e((e,n)=>{if(0===n.length)return[];let t=Object.assign([],n);return n.forEach(n=>{const r=e.children(n),o=D(e,r);t=[...t,...o]}),t},"sorter"),E=e(e=>D(e,e.children()),"sortNodesByHierarchy"),N=e((e,n,t)=>{let r=e.parent(n);for(;r&&r!==t;){const n=c.get(r);if(n&&!n.externalConnections)return!0;r=e.parent(r)}return!1},"isNodeInExtractableCluster"),y=e((e,n,t)=>{const r=e.children(n)??[];for(const o of r){if(o===t||f(o,t))continue;const r=m(o,e,n);if(r&&!N(e,r,n))return r}return null},"findSafeAnchorNode");export{x as a,c as b,u as c,m as f,E as s,s as w};
@@ -1 +1 @@
1
- var t,e;import{g as s}from"./chunk-5VM5RSS4-CJ5XB5TH.js";import{g as i}from"./chunk-XXDRQBXY-0mC3mDJF.js";import{s as n}from"./chunk-VR4S4FIN-O5Mrjsjy.js";import{_ as a,l as r,c as u,v as l,x as o,y as c,d as h,b as p,a as d,s as A,g as y,o as m,p as g,k as C,q as b,r as k,i as E,a5 as f}from"./mermaid.core-CzqhAinL.js";import{f as T}from"./chunk-32BRIVSS-DCe9Y9ii.js";import{p as F}from"./purify.es-BNLkGfTg.js";var D=function(){var t=a(function(t,e,s,i){for(s=s||{},i=t.length;i--;s[t[i]]=e);return s},"o"),e=[1,18],s=[1,19],i=[1,20],n=[1,41],r=[1,26],u=[1,42],l=[1,24],o=[1,25],c=[1,32],h=[1,33],p=[1,34],d=[1,45],A=[1,35],y=[1,36],m=[1,37],g=[1,38],C=[1,27],b=[1,28],k=[1,29],E=[1,30],f=[1,31],T=[1,44],F=[1,46],D=[1,43],B=[1,47],_=[1,9],S=[1,8,9],N=[1,58],$=[1,59],L=[1,60],x=[1,61],I=[1,62],v=[1,63],O=[1,64],w=[1,8,9,41],R=[1,77],P=[1,8,9,12,13,22,39,41,44,46,68,69,70,71,72,73,74,79,81],M=[1,8,9,12,13,18,20,22,39,41,44,46,47,60,68,69,70,71,72,73,74,79,81,86,100,102,103],G=[13,60,86,100,102,103],U=[13,60,73,74,86,100,102,103],z=[13,60,68,69,70,71,72,86,100,102,103],Y=[1,103],j=[1,121],K=[1,117],Q=[1,113],W=[1,119],X=[1,114],V=[1,115],q=[1,116],H=[1,118],J=[1,120],Z=[22,50,60,61,82,86,87,88,89,90],tt=[1,128],et=[12,39],st=[1,8,9,39,41,44,46],it=[1,8,9,22],nt=[1,153],at=[1,8,9,61],rt=[1,8,9,22,50,60,61,82,86,87,88,89,90],ut={trace:a(function(){},"trace"),yy:{},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,ANNOTATION_START:46,ANNOTATION_END:47,CLASS:48,emptyBody:49,SPACE: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},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:"ANNOTATION_START",47:"ANNOTATION_END",48:"CLASS",50:"SPACE",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"},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],[38,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[24,4],[24,7],[24,6],[43,2],[43,3],[49,0],[49,2],[49,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]],performAction:a(function(t,e,s,i,n,a,r){var u=a.length-1;switch(n){case 8:this.$=a[u-1];break;case 9:case 10:case 13:case 15:case 46:this.$=a[u];break;case 11:case 14:this.$=a[u-2]+"."+a[u];break;case 12:case 16:case 110:this.$=a[u-1]+a[u];break;case 17:case 18:this.$=a[u-1]+"~"+a[u]+"~";break;case 19:i.addRelation(a[u]);break;case 20:a[u-1].title=i.cleanupLabel(a[u]),i.addRelation(a[u-1]);break;case 31:this.$=a[u].trim(),i.setAccTitle(this.$);break;case 32:case 33:this.$=a[u].trim(),i.setAccDescription(this.$);break;case 34:i.addClassesToNamespace(a[u-3],a[u-1][0],a[u-1][1]),i.popNamespace();break;case 35:i.addClassesToNamespace(a[u-4],a[u-1][0],a[u-1][1]),i.popNamespace();break;case 36:this.$=i.addNamespace(a[u]);break;case 37:this.$=i.addNamespace(a[u-1],a[u]);break;case 38:this.$=[[a[u]],[]];break;case 39:this.$=[[a[u-1]],[]];break;case 40:a[u][0].unshift(a[u-2]),this.$=a[u];break;case 41:this.$=[[],[a[u]]];break;case 42:this.$=[[],[a[u-1]]];break;case 43:a[u][1].unshift(a[u-2]),this.$=a[u];break;case 44:case 45:this.$=[[],[]];break;case 48:i.setCssClass(a[u-2],a[u]);break;case 49:i.addMembers(a[u-3],a[u-1]);break;case 51:i.setCssClass(a[u-5],a[u-3]),i.addMembers(a[u-5],a[u-1]);break;case 52:i.addAnnotation(a[u-3],a[u-1]);break;case 53:i.addAnnotation(a[u-6],a[u-4]),i.addMembers(a[u-6],a[u-1]);break;case 54:i.addAnnotation(a[u-5],a[u-3]);break;case 55:this.$=a[u],i.addClass(a[u]);break;case 56:this.$=a[u-1],i.addClass(a[u-1]),i.setClassLabel(a[u-1],a[u]);break;case 60:i.addAnnotation(a[u],a[u-2]);break;case 61:case 74:case 107:this.$=[a[u]];break;case 62:a[u].push(a[u-1]),this.$=a[u];break;case 63:case 65:case 66:break;case 64:i.addMember(a[u-1],i.cleanupLabel(a[u]));break;case 67:this.$={id1:a[u-2],id2:a[u],relation:a[u-1],relationTitle1:"none",relationTitle2:"none"};break;case 68:this.$={id1:a[u-3],id2:a[u],relation:a[u-1],relationTitle1:a[u-2],relationTitle2:"none"};break;case 69:this.$={id1:a[u-3],id2:a[u],relation:a[u-2],relationTitle1:"none",relationTitle2:a[u-1]};break;case 70:this.$={id1:a[u-4],id2:a[u],relation:a[u-2],relationTitle1:a[u-3],relationTitle2:a[u-1]};break;case 71:this.$=i.addNote(a[u],a[u-1]);break;case 72:this.$=i.addNote(a[u]);break;case 73:this.$=a[u-2],i.defineClass(a[u-1],a[u]);break;case 75:this.$=a[u-2].concat([a[u]]);break;case 76:i.setDirection("TB");break;case 77:i.setDirection("BT");break;case 78:i.setDirection("RL");break;case 79:i.setDirection("LR");break;case 80:this.$={type1:a[u-2],type2:a[u],lineType:a[u-1]};break;case 81:this.$={type1:"none",type2:a[u],lineType:a[u-1]};break;case 82:this.$={type1:a[u-1],type2:"none",lineType:a[u]};break;case 83:this.$={type1:"none",type2:"none",lineType:a[u]};break;case 84:this.$=i.relationType.AGGREGATION;break;case 85:this.$=i.relationType.EXTENSION;break;case 86:this.$=i.relationType.COMPOSITION;break;case 87:this.$=i.relationType.DEPENDENCY;break;case 88:this.$=i.relationType.LOLLIPOP;break;case 89:this.$=i.lineType.LINE;break;case 90:this.$=i.lineType.DOTTED_LINE;break;case 91:case 97:this.$=a[u-2],i.setClickEvent(a[u-1],a[u]);break;case 92:case 98:this.$=a[u-3],i.setClickEvent(a[u-2],a[u-1]),i.setTooltip(a[u-2],a[u]);break;case 93:this.$=a[u-2],i.setLink(a[u-1],a[u]);break;case 94:this.$=a[u-3],i.setLink(a[u-2],a[u-1],a[u]);break;case 95:this.$=a[u-3],i.setLink(a[u-2],a[u-1]),i.setTooltip(a[u-2],a[u]);break;case 96:this.$=a[u-4],i.setLink(a[u-3],a[u-2],a[u]),i.setTooltip(a[u-3],a[u-1]);break;case 99:this.$=a[u-3],i.setClickEvent(a[u-2],a[u-1],a[u]);break;case 100:this.$=a[u-4],i.setClickEvent(a[u-3],a[u-2],a[u-1]),i.setTooltip(a[u-3],a[u]);break;case 101:this.$=a[u-3],i.setLink(a[u-2],a[u]);break;case 102:this.$=a[u-4],i.setLink(a[u-3],a[u-1],a[u]);break;case 103:this.$=a[u-4],i.setLink(a[u-3],a[u-1]),i.setTooltip(a[u-3],a[u]);break;case 104:this.$=a[u-5],i.setLink(a[u-4],a[u-2],a[u]),i.setTooltip(a[u-4],a[u-1]);break;case 105:this.$=a[u-2],i.setCssStyle(a[u-1],a[u]);break;case 106:i.setCssClass(a[u-1],a[u]);break;case 108:a[u-2].push(a[u]),this.$=a[u-2]}},"anonymous"),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:e,35:s,37:i,38:22,42:n,43:23,46:r,48:u,51:l,52:o,54:c,56:h,57:p,60:d,62:A,63:y,64:m,65:g,75:C,76:b,78:k,82:E,83:f,86:T,100:F,102:D,103:B},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},t(_,[2,5],{8:[1,48]}),{8:[1,49]},t(S,[2,19],{22:[1,50]}),t(S,[2,21]),t(S,[2,22]),t(S,[2,23]),t(S,[2,24]),t(S,[2,25]),t(S,[2,26]),t(S,[2,27]),t(S,[2,28]),t(S,[2,29]),t(S,[2,30]),{34:[1,51]},{36:[1,52]},t(S,[2,33]),t(S,[2,63],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:N,69:$,70:L,71:x,72:I,73:v,74:O}),{39:[1,65]},t(w,[2,47],{39:[1,67],44:[1,66],46:[1,68]}),t(S,[2,65]),t(S,[2,66]),{16:69,60:d,86:T,100:F,102:D},{16:39,17:40,19:70,60:d,86:T,100:F,102:D,103:B},{16:39,17:40,19:71,60:d,86:T,100:F,102:D,103:B},{16:39,17:40,19:72,60:d,86:T,100:F,102:D,103:B},{60:[1,73]},{13:[1,74]},{16:39,17:40,19:75,60:d,86:T,100:F,102:D,103:B},{13:R,55:76},{58:78,60:[1,79]},t(S,[2,76]),t(S,[2,77]),t(S,[2,78]),t(S,[2,79]),t(P,[2,13],{16:39,17:40,19:81,18:[1,80],20:[1,82],60:d,86:T,100:F,102:D,103:B}),t(P,[2,15],{20:[1,83]}),{15:84,16:85,17:86,60:d,86:T,100:F,102:D,103:B},{16:39,17:40,19:87,60:d,86:T,100:F,102:D,103:B},t(M,[2,133]),t(M,[2,134]),t(M,[2,135]),t(M,[2,136]),t([1,8,9,12,13,20,22,39,41,44,46,68,69,70,71,72,73,74,79,81],[2,137]),t(_,[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:88,33:e,35:s,37:i,42:n,46:r,48:u,51:l,52:o,54:c,56:h,57:p,60:d,62:A,63:y,64:m,65:g,75:C,76:b,78:k,82:E,83:f,86:T,100:F,102:D,103:B}),{5:89,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:e,35:s,37:i,38:22,42:n,43:23,46:r,48:u,51:l,52:o,54:c,56:h,57:p,60:d,62:A,63:y,64:m,65:g,75:C,76:b,78:k,82:E,83:f,86:T,100:F,102:D,103:B},t(S,[2,20]),t(S,[2,31]),t(S,[2,32]),{13:[1,91],16:39,17:40,19:90,60:d,86:T,100:F,102:D,103:B},{53:92,66:56,67:57,68:N,69:$,70:L,71:x,72:I,73:v,74:O},t(S,[2,64]),{67:93,73:v,74:O},t(G,[2,83],{66:94,68:N,69:$,70:L,71:x,72:I}),t(U,[2,84]),t(U,[2,85]),t(U,[2,86]),t(U,[2,87]),t(U,[2,88]),t(z,[2,89]),t(z,[2,90]),{8:[1,96],23:99,24:97,30:98,38:22,40:95,42:n,43:23,48:u,54:c,56:h},{16:100,60:d,86:T,100:F,102:D},{41:[1,102],45:101,51:Y},{16:104,60:d,86:T,100:F,102:D},{47:[1,105]},{13:[1,106]},{13:[1,107]},{79:[1,108],81:[1,109]},{22:j,50:K,59:110,60:Q,82:W,84:111,85:112,86:X,87:V,88:q,89:H,90:J},{60:[1,122]},{13:R,55:123},t(w,[2,72]),t(w,[2,138]),{22:j,50:K,59:124,60:Q,61:[1,125],82:W,84:111,85:112,86:X,87:V,88:q,89:H,90:J},t(Z,[2,74]),{16:39,17:40,19:126,60:d,86:T,100:F,102:D,103:B},t(P,[2,16]),t(P,[2,17]),t(P,[2,18]),{11:127,12:tt,39:[2,36]},t(et,[2,9],{16:85,17:86,15:130,18:[1,129],60:d,86:T,100:F,102:D,103:B}),t(et,[2,10]),t(st,[2,55],{11:131,12:tt}),t(_,[2,7]),{9:[1,132]},t(it,[2,67]),{16:39,17:40,19:133,60:d,86:T,100:F,102:D,103:B},{13:[1,135],16:39,17:40,19:134,60:d,86:T,100:F,102:D,103:B},t(G,[2,82],{66:136,68:N,69:$,70:L,71:x,72:I}),t(G,[2,81]),{41:[1,137]},{23:99,24:97,30:98,38:22,40:138,42:n,43:23,48:u,54:c,56:h},{8:[1,139],41:[2,38]},{8:[1,140],41:[2,41]},{8:[1,141],41:[2,44]},t(w,[2,48],{39:[1,142]}),{41:[1,143]},t(w,[2,50]),{41:[2,61],45:144,51:Y},{47:[1,145]},{16:39,17:40,19:146,60:d,86:T,100:F,102:D,103:B},t(S,[2,91],{13:[1,147]}),t(S,[2,93],{13:[1,149],77:[1,148]}),t(S,[2,97],{13:[1,150],80:[1,151]}),{13:[1,152]},t(S,[2,105],{61:nt}),t(at,[2,107],{85:154,22:j,50:K,60:Q,82:W,86:X,87:V,88:q,89:H,90:J}),t(rt,[2,109]),t(rt,[2,111]),t(rt,[2,112]),t(rt,[2,113]),t(rt,[2,114]),t(rt,[2,115]),t(rt,[2,116]),t(rt,[2,117]),t(rt,[2,118]),t(rt,[2,119]),t(S,[2,106]),t(w,[2,71]),t(S,[2,73],{61:nt}),{60:[1,155]},t(P,[2,14]),{39:[2,37]},{13:[1,156]},{15:157,16:85,17:86,60:d,86:T,100:F,102:D,103:B},t(et,[2,12]),t(st,[2,56]),{1:[2,4]},t(it,[2,69]),t(it,[2,68]),{16:39,17:40,19:158,60:d,86:T,100:F,102:D,103:B},t(G,[2,80]),t(w,[2,34]),{41:[1,159]},{23:99,24:97,30:98,38:22,40:160,41:[2,39],42:n,43:23,48:u,54:c,56:h},{23:99,24:97,30:98,38:22,40:161,41:[2,42],42:n,43:23,48:u,54:c,56:h},{23:99,24:97,30:98,38:22,40:162,41:[2,45],42:n,43:23,48:u,54:c,56:h},{45:163,51:Y},t(w,[2,49]),{41:[2,62]},t(w,[2,52],{39:[1,164]}),t(S,[2,60]),t(S,[2,92]),t(S,[2,94]),t(S,[2,95],{77:[1,165]}),t(S,[2,98]),t(S,[2,99],{13:[1,166]}),t(S,[2,101],{13:[1,168],77:[1,167]}),{22:j,50:K,60:Q,82:W,84:169,85:112,86:X,87:V,88:q,89:H,90:J},t(rt,[2,110]),t(Z,[2,75]),{14:[1,170]},t(et,[2,11]),t(it,[2,70]),t(w,[2,35]),{41:[2,40]},{41:[2,43]},{41:[2,46]},{41:[1,171]},{41:[1,173],45:172,51:Y},t(S,[2,96]),t(S,[2,100]),t(S,[2,102]),t(S,[2,103],{77:[1,174]}),t(at,[2,108],{85:154,22:j,50:K,60:Q,82:W,86:X,87:V,88:q,89:H,90:J}),t(st,[2,8]),t(w,[2,51]),{41:[1,175]},t(w,[2,54]),t(S,[2,104]),t(w,[2,53])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],127:[2,37],132:[2,4],144:[2,62],160:[2,40],161:[2,43],162:[2,46]},parseError:a(function(t,e){if(!e.recoverable){var s=new Error(t);throw s.hash=e,s}this.trace(t)},"parseError"),parse:a(function(t){var e=this,s=[0],i=[],n=[null],r=[],u=this.table,l="",o=0,c=0,h=r.slice.call(arguments,1),p=Object.create(this.lexer),d={yy:{}};for(var A in this.yy)Object.prototype.hasOwnProperty.call(this.yy,A)&&(d.yy[A]=this.yy[A]);p.setInput(t,d.yy),d.yy.lexer=p,d.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var y=p.yylloc;r.push(y);var m=p.options&&p.options.ranges;function g(){var t;return"number"!=typeof(t=i.pop()||p.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof d.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,a(function(t){s.length=s.length-2*t,n.length=n.length-t,r.length=r.length-t},"popStack"),a(g,"lex");for(var C,b,k,E,f,T,F,D,B={};;){if(b=s[s.length-1],this.defaultActions[b]?k=this.defaultActions[b]:(null==C&&(C=g()),k=u[b]&&u[b][C]),void 0===k||!k.length||!k[0]){var _;for(f in D=[],u[b])this.terminals_[f]&&f>2&&D.push("'"+this.terminals_[f]+"'");_=p.showPosition?"Parse error on line "+(o+1)+":\n"+p.showPosition()+"\nExpecting "+D.join(", ")+", got '"+(this.terminals_[C]||C)+"'":"Parse error on line "+(o+1)+": Unexpected "+(1==C?"end of input":"'"+(this.terminals_[C]||C)+"'"),this.parseError(_,{text:p.match,token:this.terminals_[C]||C,line:p.yylineno,loc:y,expected:D})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+C);switch(k[0]){case 1:s.push(C),n.push(p.yytext),r.push(p.yylloc),s.push(k[1]),C=null,c=p.yyleng,l=p.yytext,o=p.yylineno,y=p.yylloc;break;case 2:if(T=this.productions_[k[1]][1],B.$=n[n.length-T],B._$={first_line:r[r.length-(T||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(T||1)].first_column,last_column:r[r.length-1].last_column},m&&(B._$.range=[r[r.length-(T||1)].range[0],r[r.length-1].range[1]]),void 0!==(E=this.performAction.apply(B,[l,c,o,d.yy,k[1],n,r].concat(h))))return E;T&&(s=s.slice(0,-1*T*2),n=n.slice(0,-1*T),r=r.slice(0,-1*T)),s.push(this.productions_[k[1]][0]),n.push(B.$),r.push(B._$),F=u[s[s.length-2]][s[s.length-1]],s.push(F);break;case 3:return!0}}return!0},"parse")},lt=function(){return{EOF:1,parseError:a(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:a(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:a(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:a(function(t){var e=t.length,s=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),s.length-1&&(this.yylineno-=s.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:s?(s.length===i.length?this.yylloc.first_column:0)+i[i.length-s.length].length-s[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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(),{text:"",token:null,line:this.yylineno})},"reject"),less:a(function(t){this.unput(this.match.slice(t))},"less"),pastInput:a(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:a(function(t,e){var s,i,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],s=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack){for(var a in n)this[a]=n[a];return!1}return!1},"test_match"),next:a(function(){if(this.done)return this.EOF;var t,e,s,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),a=0;a<n.length;a++)if((s=this._input.match(this.rules[n[a]]))&&(!e||s[0].length>e[0].length)){if(e=s,i=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(s,n[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:a(function(){return this.next()||this.lex()},"lex"),begin:a(function(t){this.conditionStack.push(t)},"begin"),popState:a(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:a(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:a(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:a(function(t){this.begin(t)},"pushState"),stateStackSize:a(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:a(function(t,e,s,i){switch(s){case 0:return 62;case 1:return 63;case 2:return 64;case 3:return 65;case 4:case 5:case 14:case 31:case 37:case 41:case 48:break;case 6:return this.begin("acc_title"),33;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),35;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:case 19:case 22:case 24:case 59:case 62:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:case 36:return 8;case 15:case 16:return 7;case 17:case 38:case 46:return"EDGE_STATE";case 18:this.begin("callback_name");break;case 20:this.popState(),this.begin("callback_args");break;case 21:return 79;case 23:return 80;case 25:return"STR";case 26:this.begin("string");break;case 27:return 82;case 28:return 57;case 29:return this.begin("namespace"),42;case 30:case 40:return this.popState(),8;case 32:return this.begin("namespace-body"),39;case 33:this.popState(),this.less(0);break;case 34:case 44:return this.popState(),41;case 35:case 45:return"EOF_IN_STRUCT";case 39:return this.begin("class"),48;case 42:return this.popState(),this.popState(),41;case 43:return this.begin("class-body"),39;case 47:return"OPEN_IN_STRUCT";case 49:return"MEMBER";case 50:return 83;case 51:return 75;case 52:return 76;case 53:return 78;case 54:return 54;case 55:return 56;case 56:return 46;case 57:return 47;case 58:return 81;case 60:return"GENERICTYPE";case 61:this.begin("generic");break;case 63:return"BQUOTE_STR";case 64:this.begin("bqstring");break;case 65:case 66:case 67:case 68:return 77;case 69:case 70:return 69;case 71:case 72:return 71;case 73:return 70;case 74:return 68;case 75:return 72;case 76:return 73;case 77:return 74;case 78:return 22;case 79:return 44;case 80:return 100;case 81:return 18;case 82:return"PLUS";case 83:return 87;case 84:return 61;case 85:case 86:return 89;case 87:return 90;case 88:case 89:return"EQUALS";case 90:return 60;case 91:return 12;case 92:return 14;case 93:return"PUNCTUATION";case 94:return 86;case 95:return 102;case 96:case 97:return 50;case 98:return 9}},"anonymous"),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)/,/^(?:$)/],conditions:{"namespace-body":{rules:[26,29,34,35,36,37,38,39,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},namespace:{rules:[26,29,30,31,32,33,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},"class-body":{rules:[26,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},class:{rules:[26,40,41,42,43,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},acc_descr_multiline:{rules:[11,12,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},acc_descr:{rules:[9,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},acc_title:{rules:[7,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},callback_args:{rules:[22,23,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},callback_name:{rules:[19,20,21,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},href:{rules:[26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},struct:{rules:[26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},generic:{rules:[26,50,51,52,53,54,55,56,57,58,59,60,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},bqstring:{rules:[26,50,51,52,53,54,55,56,57,58,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},string:{rules:[24,25,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,26,27,28,29,39,50,51,52,53,54,55,56,57,58,61,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,98],inclusive:!0}}}}();function ot(){this.yy={}}return ut.lexer=lt,a(ot,"Parser"),ot.prototype=ut,ut.Parser=ot,new ot}();D.parser=D;var B=D,_=["#","+","~","-",""],S=(a(t=class{constructor(t,e){this.memberType=e,this.visibility="",this.classifier="",this.text="";const s=E(t,u());this.parseMember(s)}getDisplayDetails(){let t=this.visibility+f(this.id);return"method"===this.memberType&&(t+=`(${f(this.parameters.trim())})`,this.returnType&&(t+=" : "+f(this.returnType))),t=t.trim(),{displayText:t,cssStyle:this.parseClassifier()}}parseMember(t){let e="";if("method"===this.memberType){const s=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/.exec(t);if(s){const t=s[1]?s[1].trim():"";if(_.includes(t)&&(this.visibility=t),this.id=s[2],this.parameters=s[3]?s[3].trim():"",e=s[4]?s[4].trim():"",this.returnType=s[5]?s[5].trim():"",""===e){const t=this.returnType.substring(this.returnType.length-1);/[$*]/.exec(t)&&(e=t,this.returnType=this.returnType.substring(0,this.returnType.length-1))}}}else{const s=t.length,i=t.substring(0,1),n=t.substring(s-1);_.includes(i)&&(this.visibility=i),/[$*]/.exec(n)&&(e=n),this.id=t.substring(""===this.visibility?0:1,""===e?s:s-1)}this.classifier=e,this.id=this.id.startsWith(" ")?" "+this.id.trim():this.id.trim();const s=`${this.visibility?"\\"+this.visibility:""}${f(this.id)}${"method"===this.memberType?`(${f(this.parameters)})${this.returnType?" : "+f(this.returnType):""}`:""}`;this.text=s.replaceAll("<","&lt;").replaceAll(">","&gt;"),this.text.startsWith("\\&lt;")&&(this.text=this.text.replace("\\&lt;","~"))}parseClassifier(){switch(this.classifier){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}}},"ClassMember"),t),N="classId-",$=0,L=a(t=>C.sanitizeText(t,u()),"sanitizeText"),x=(a(e=class{constructor(){this.relations=[],this.classes=new Map,this.styleClasses=new Map,this.notes=new Map,this.interfaces=[],this.namespaces=new Map,this.namespaceCounter=0,this.namespaceStack=[],this.diagramId="",this.functions=[],this.lineType={LINE:0,DOTTED_LINE:1},this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4},this.setupToolTips=a(t=>{const e=T();h(t).select("svg").selectAll("g").filter(function(){return null!==h(this).attr("title")}).on("mouseover",t=>{const s=h(t.currentTarget),i=s.attr("title");if(!i)return;const n=t.currentTarget.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.html(F.sanitize(i)).style("left",`${window.scrollX+n.left+n.width/2}px`).style("top",`${window.scrollY+n.bottom+4}px`),s.classed("hover",!0)}).on("mouseout",t=>{e.transition().duration(500).style("opacity",0),h(t.currentTarget).classed("hover",!1)})},"setupToolTips"),this.direction="TB",this.setAccTitle=p,this.getAccTitle=d,this.setAccDescription=A,this.getAccDescription=y,this.setDiagramTitle=m,this.getDiagramTitle=g,this.getConfig=a(()=>u().class,"getConfig"),this.functions.push(this.setupToolTips.bind(this)),this.clear(),this.addRelation=this.addRelation.bind(this),this.addClassesToNamespace=this.addClassesToNamespace.bind(this),this.addNamespace=this.addNamespace.bind(this),this.popNamespace=this.popNamespace.bind(this),this.setCssClass=this.setCssClass.bind(this),this.addMembers=this.addMembers.bind(this),this.addClass=this.addClass.bind(this),this.setClassLabel=this.setClassLabel.bind(this),this.addAnnotation=this.addAnnotation.bind(this),this.addMember=this.addMember.bind(this),this.cleanupLabel=this.cleanupLabel.bind(this),this.addNote=this.addNote.bind(this),this.defineClass=this.defineClass.bind(this),this.setDirection=this.setDirection.bind(this),this.setLink=this.setLink.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.clear=this.clear.bind(this),this.setTooltip=this.setTooltip.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setCssStyle=this.setCssStyle.bind(this)}splitClassNameAndType(t){const e=C.sanitizeText(t,u());let s="",i=e;if(e.indexOf("~")>0){const t=e.split("~");i=L(t[0]),s=L(t[1])}return{className:i,type:s}}setClassLabel(t,e){const s=C.sanitizeText(t,u());e&&(e=L(e));const{className:i}=this.splitClassNameAndType(s);this.classes.get(i).label=e,this.classes.get(i).text=`${e}${this.classes.get(i).type?`<${this.classes.get(i).type}>`:""}`}addClass(t){const e=C.sanitizeText(t,u()),{className:s,type:i}=this.splitClassNameAndType(e);if(this.classes.has(s))return;const n=C.sanitizeText(s,u());this.classes.set(n,{id:n,type:i,label:n,text:`${n}${i?`&lt;${i}&gt;`:""}`,shape:"classBox",cssClasses:"default",methods:[],members:[],annotations:[],styles:[],domId:N+n+"-"+$}),$++}addInterface(t,e){const s={id:`interface${this.interfaces.length}`,label:t,classId:e};this.interfaces.push(s)}setDiagramId(t){this.diagramId=t}lookUpDomId(t){const e=C.sanitizeText(t,u());if(this.classes.has(e)){const t=this.classes.get(e).domId;return this.diagramId?`${this.diagramId}-${t}`:t}throw new Error("Class not found: "+e)}clear(){this.relations=[],this.classes=new Map,this.notes=new Map,this.interfaces=[],this.functions=[],this.functions.push(this.setupToolTips.bind(this)),this.namespaces=new Map,this.namespaceCounter=0,this.namespaceStack=[],this.diagramId="",this.direction="TB",b()}getClass(t){return this.classes.get(t)}getClasses(){return this.classes}getRelations(){return this.relations}getNote(t){const e="number"==typeof t?`note${t}`:t;return this.notes.get(e)}getNotes(){return this.notes}addRelation(t){r.debug("Adding relation: "+JSON.stringify(t));const e=[this.relationType.LOLLIPOP,this.relationType.AGGREGATION,this.relationType.COMPOSITION,this.relationType.DEPENDENCY,this.relationType.EXTENSION];t.relation.type1!==this.relationType.LOLLIPOP||e.includes(t.relation.type2)?t.relation.type2!==this.relationType.LOLLIPOP||e.includes(t.relation.type1)?(this.addClass(t.id1),this.addClass(t.id2)):(this.addClass(t.id1),this.addInterface(t.id2,t.id1),t.id2="interface"+(this.interfaces.length-1)):(this.addClass(t.id2),this.addInterface(t.id1,t.id2),t.id1="interface"+(this.interfaces.length-1)),t.id1=this.splitClassNameAndType(t.id1).className,t.id2=this.splitClassNameAndType(t.id2).className,t.relationTitle1=C.sanitizeText(t.relationTitle1.trim(),u()),t.relationTitle2=C.sanitizeText(t.relationTitle2.trim(),u()),this.relations.push(t)}addAnnotation(t,e){const s=this.splitClassNameAndType(t).className;this.classes.get(s).annotations.push(e)}addMember(t,e){this.addClass(t);const s=this.splitClassNameAndType(t).className,i=this.classes.get(s);if("string"==typeof e){const t=e.trim();t.startsWith("<<")&&t.endsWith(">>")?i.annotations.push(L(t.substring(2,t.length-2))):t.indexOf(")")>0?i.methods.push(new S(t,"method")):t&&i.members.push(new S(t,"attribute"))}}addMembers(t,e){Array.isArray(e)&&(e.reverse(),e.forEach(e=>this.addMember(t,e)))}addNote(t,e){const s=this.notes.size,i={id:`note${s}`,class:e,text:t,index:s};return this.notes.set(i.id,i),i.id}cleanupLabel(t){return t.startsWith(":")&&(t=t.substring(1)),L(t.trim())}setCssClass(t,e){t.split(",").forEach(t=>{let s=t;/\d/.exec(t[0])&&(s=N+s),s=this.splitClassNameAndType(s).className;const i=this.classes.get(s);i&&(i.cssClasses+=" "+e)})}defineClass(t,e){for(const s of t){let t=this.styleClasses.get(s);void 0===t&&(t={id:s,styles:[],textStyles:[]},this.styleClasses.set(s,t)),e&&e.forEach(e=>{if(/color/.exec(e)){const s=e.replace("fill","bgFill");t.textStyles.push(s)}t.styles.push(e)}),this.classes.forEach(t=>{t.cssClasses.includes(s)&&t.styles.push(...e.flatMap(t=>t.split(",")))})}}setTooltip(t,e){t.split(",").forEach(t=>{if(void 0!==e){const s=this.splitClassNameAndType(t).className,i=this.classes.get(s);i&&(i.tooltip=L(e))}})}getTooltip(t,e){return e&&this.namespaces.has(e)?this.namespaces.get(e).classes.get(t).tooltip:this.classes.get(t).tooltip}setLink(t,e,s){const i=u();t.split(",").forEach(t=>{let n=t;/\d/.exec(t[0])&&(n=N+n),n=this.splitClassNameAndType(n).className;const a=this.classes.get(n);a&&(a.link=c.formatUrl(e,i),"sandbox"===i.securityLevel?a.linkTarget="_top":a.linkTarget="string"==typeof s?L(s):"_blank")}),this.setCssClass(t,"clickable")}setClickEvent(t,e,s){t.split(",").forEach(t=>{this.setClickFunc(t,e,s);const i=this.splitClassNameAndType(t).className,n=this.classes.get(i);n&&(n.haveCallback=!0)}),this.setCssClass(t,"clickable")}setClickFunc(t,e,s){const i=C.sanitizeText(t,u());if("loose"!==u().securityLevel)return;if(void 0===e)return;const n=this.splitClassNameAndType(i).className;if(this.classes.has(n)){let t=[];if("string"==typeof s){t=s.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let e=0;e<t.length;e++){let s=t[e].trim();s.startsWith('"')&&s.endsWith('"')&&(s=s.substr(1,s.length-2)),t[e]=s}}0===t.length&&t.push(n),this.functions.push(()=>{const s=this.lookUpDomId(n),i=document.querySelector(`[id="${s}"]`);null!==i&&i.addEventListener("click",()=>{c.runFunc(e,...t)},!1)})}}bindFunctions(t){this.functions.forEach(e=>{e(t)})}escapeHtml(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}getDirection(){return this.direction}setDirection(t){this.direction=t}static resolveQualifiedId(t,e){const s=e.at(-1);return s?`${s}.${t}`:t}static getAncestorIds(t){const e=t.split("."),s=new Array(e.length);s[0]=e[0];for(let i=1;i<e.length;i++)s[i]=`${s[i-1]}.${e[i]}`;return s}createNamespaceNode(t,e,s,i=!1){return{id:t,label:e,classes:new Map,notes:new Map,children:new Map,domId:N+t+"-"+this.namespaceCounter++,parent:s,explicit:i}}linkParentChild(t,e){const s=this.namespaces.get(t),i=this.namespaces.get(e);s&&i&&(s.children.has(e)||s.children.set(e,i),i.parent??=t)}addNamespace(t,s){const i=e.resolveQualifiedId(t,this.namespaceStack);if(this.namespaceStack.push(i),this.namespaces.has(i)){const t=this.namespaces.get(i);return t.explicit=!0,s&&(t.label=s),i}const n=i.split("."),a=e.getAncestorIds(i);for(let e=0;e<a.length;e++){const t=a[e],i=e>0?a[e-1]:void 0,r=e===a.length-1,u=r&&s?s:n[e];this.namespaces.has(t)?r&&(this.namespaces.get(t).explicit=!0):this.namespaces.set(t,this.createNamespaceNode(t,u,i,r)),i&&this.linkParentChild(i,t)}return i}popNamespace(){this.namespaceStack.pop()}getNamespace(t){return this.namespaces.get(t)}getNamespaces(){return this.namespaces}addClassesToNamespace(t,e,s){if(this.namespaces.has(t)){for(const s of e){const{className:e}=this.splitClassNameAndType(s),i=this.getClass(e);i.parent=t,this.namespaces.get(t).classes.set(e,i)}for(const e of s){const s=this.getNote(e);s.parent=t,this.namespaces.get(t).notes.set(e,s)}}}setCssStyle(t,e){const s=this.classes.get(t);if(e&&s)for(const i of e)i.includes(",")?s.styles.push(...i.split(",")):s.styles.push(i)}getArrowMarker(t){let e;switch(t){case 0:e="aggregation";break;case 1:e="extension";break;case 2:e="composition";break;case 3:e="dependency";break;case 4:e="lollipop";break;default:e="none"}return e}resolveExplicitAncestor(t){let e=t;for(;e;){const t=this.namespaces.get(e);if(!t)return;if(t.explicit)return e;e=t.parent}}getData(){const t=[],e=[],s=u(),i=s.class?.hierarchicalNamespaces??!0;for(const a of this.namespaces.values()){if(!i&&!a.explicit)continue;const e={id:a.id,label:i?a.label:a.id,isGroup:!0,padding:s.class.padding??16,shape:"rect",cssStyles:[],look:s.look,parentId:i?a.parent:void 0};t.push(e)}for(const a of this.classes.values()){const e=i?a.parent:this.resolveExplicitAncestor(a.parent),n={...a,type:void 0,isGroup:!1,parentId:e,look:s.look};t.push(n)}for(const a of this.notes.values()){const n=i?a.parent:this.resolveExplicitAncestor(a.parent),r={id:a.id,label:a.text,isGroup:!1,shape:"note",padding:s.class.padding??6,cssStyles:["text-align: left","white-space: nowrap",`fill: ${s.themeVariables.noteBkgColor}`,`stroke: ${s.themeVariables.noteBorderColor}`],look:s.look,parentId:n,labelType:"markdown"};t.push(r);const u=this.classes.get(a.class)?.id;if(u){const t={id:`edgeNote${a.index}`,start:a.id,end:u,type:"normal",thickness:"normal",classes:"relation",arrowTypeStart:"none",arrowTypeEnd:"none",arrowheadStyle:"",labelStyle:[""],style:["fill: none"],pattern:"dotted",look:s.look};e.push(t)}}for(const a of this.interfaces){const e={id:a.id,label:a.label,isGroup:!1,shape:"rect",cssStyles:["opacity: 0;"],look:s.look};t.push(e)}let n=0;for(const a of this.relations){n++;const t={id:k(a.id1,a.id2,{prefix:"id",counter:n}),start:a.id1,end:a.id2,type:"normal",label:a.title,labelpos:"c",thickness:"normal",classes:"relation",arrowTypeStart:this.getArrowMarker(a.relation.type1),arrowTypeEnd:this.getArrowMarker(a.relation.type2),startLabelRight:"none"===a.relationTitle1?"":a.relationTitle1,endLabelLeft:"none"===a.relationTitle2?"":a.relationTitle2,arrowheadStyle:"",labelStyle:["display: inline-block"],style:a.style||"",pattern:1==a.relation.lineType?"dashed":"solid",look:s.look,labelType:"markdown"};e.push(t)}return{nodes:t,edges:e,other:{},config:s,direction:this.getDirection()}}},"ClassDB"),e),I=a(t=>`g.classGroup text {\n fill: ${t.nodeBorder||t.classText};\n stroke: none;\n font-family: ${t.fontFamily};\n font-size: 10px;\n\n .title {\n font-weight: bolder;\n }\n\n}\n\n .cluster-label text {\n fill: ${t.titleColor};\n }\n .cluster-label span {\n color: ${t.titleColor};\n }\n .cluster-label span p {\n background-color: transparent;\n }\n\n .cluster rect {\n fill: ${t.clusterBkg};\n stroke: ${t.clusterBorder};\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${t.titleColor};\n }\n\n .cluster span {\n color: ${t.titleColor};\n }\n\n.nodeLabel, .edgeLabel {\n color: ${t.classText};\n}\n\n.noteLabel .nodeLabel, .noteLabel .edgeLabel {\n color: ${t.noteTextColor};\n}\n.edgeLabel .label rect {\n fill: ${t.mainBkg};\n}\n.label text {\n fill: ${t.classText};\n}\n\n.labelBkg {\n background: ${t.mainBkg};\n}\n.edgeLabel .label span {\n background: ${t.mainBkg};\n}\n\n.classTitle {\n font-weight: bolder;\n}\n.node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: ${t.strokeWidth};\n }\n\n\n.divider {\n stroke: ${t.nodeBorder};\n stroke-width: 1;\n}\n\ng.clickable {\n cursor: pointer;\n}\n\ng.classGroup rect {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n}\n\ng.classGroup line {\n stroke: ${t.nodeBorder};\n stroke-width: 1;\n}\n\n.classLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ${t.mainBkg};\n opacity: 0.5;\n}\n\n.classLabel .label {\n fill: ${t.nodeBorder};\n font-size: 10px;\n}\n\n.relation {\n stroke: ${t.lineColor};\n stroke-width: ${t.strokeWidth};\n fill: none;\n}\n\n.dashed-line{\n stroke-dasharray: 3;\n}\n\n.dotted-line{\n stroke-dasharray: 1 2;\n}\n\n[id$="-compositionStart"], .composition {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n[id$="-compositionEnd"], .composition {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n[id$="-dependencyStart"], .dependency {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n[id$="-dependencyEnd"], .dependency {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n[id$="-extensionStart"], .extension {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n[id$="-extensionEnd"], .extension {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n[id$="-aggregationStart"], .aggregation {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n[id$="-aggregationEnd"], .aggregation {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n[id$="-lollipopStart"], .lollipop {\n fill: ${t.mainBkg} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n[id$="-lollipopEnd"], .lollipop {\n fill: ${t.mainBkg} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n.edgeTerminals {\n font-size: 11px;\n line-height: initial;\n}\n\n.classTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n}\n\n.edgeLabel[data-look="neo"] {\n background-color: ${t.edgeLabelBackground};\n p {\n background-color: ${t.edgeLabelBackground};\n }\n rect {\n opacity: 0.5;\n background-color: ${t.edgeLabelBackground};\n fill: ${t.edgeLabelBackground};\n }\n text-align: center;\n}\n ${s()}\n`,"getStyles"),v=a((t,e="TB")=>{if(!t.doc)return e;let s=e;for(const i of t.doc)"dir"===i.stmt&&(s=i.value);return s},"getDir"),O={getClasses:a(function(t,e){return e.db.getClasses()},"getClasses"),draw:a(async function(t,e,s,a){r.info("REF0:"),r.info("Drawing class diagram (v3)",e);const{securityLevel:h,state:p,layout:d}=u();a.db.setDiagramId(e);const A=a.db.getData(),y=i(e,h);A.type=a.type,A.layoutAlgorithm=l(d),A.nodeSpacing=p?.nodeSpacing||50,A.rankSpacing=p?.rankSpacing||50,A.markers=["aggregation","extension","composition","dependency","lollipop"],A.diagramId=e,await o(A,y),c.insertTitle(y,"classDiagramTitleText",p?.titleTopMargin??25,a.db.getDiagramTitle()),n(y,8,"classDiagram",p?.useMaxWidth??!0)},"draw"),getDir:v};export{x as C,B as a,O as c,I as s};
1
+ var t,e;import{g as s}from"./chunk-5VM5RSS4-Uv1D4oA2.js";import{g as i}from"./chunk-XXDRQBXY-DoVRk31D.js";import{s as n}from"./chunk-VR4S4FIN-DD3Gj91z.js";import{_ as a,l as r,c as u,v as l,x as o,y as c,d as h,b as p,a as d,s as A,g as y,o as m,p as g,k as C,q as b,r as k,i as E,a5 as f}from"./mermaid.core-LEKKQwXZ.js";import{f as T}from"./chunk-32BRIVSS-B93XkYif.js";import{p as F}from"./purify.es-BNLkGfTg.js";var D=function(){var t=a(function(t,e,s,i){for(s=s||{},i=t.length;i--;s[t[i]]=e);return s},"o"),e=[1,18],s=[1,19],i=[1,20],n=[1,41],r=[1,26],u=[1,42],l=[1,24],o=[1,25],c=[1,32],h=[1,33],p=[1,34],d=[1,45],A=[1,35],y=[1,36],m=[1,37],g=[1,38],C=[1,27],b=[1,28],k=[1,29],E=[1,30],f=[1,31],T=[1,44],F=[1,46],D=[1,43],B=[1,47],_=[1,9],S=[1,8,9],N=[1,58],$=[1,59],L=[1,60],x=[1,61],I=[1,62],v=[1,63],O=[1,64],w=[1,8,9,41],R=[1,77],P=[1,8,9,12,13,22,39,41,44,46,68,69,70,71,72,73,74,79,81],M=[1,8,9,12,13,18,20,22,39,41,44,46,47,60,68,69,70,71,72,73,74,79,81,86,100,102,103],G=[13,60,86,100,102,103],U=[13,60,73,74,86,100,102,103],z=[13,60,68,69,70,71,72,86,100,102,103],Y=[1,103],j=[1,121],K=[1,117],W=[1,113],Q=[1,119],X=[1,114],q=[1,115],H=[1,116],V=[1,118],J=[1,120],Z=[22,50,60,61,82,86,87,88,89,90],tt=[1,128],et=[12,39],st=[1,8,9,39,41,44,46],it=[1,8,9,22],nt=[1,153],at=[1,8,9,61],rt=[1,8,9,22,50,60,61,82,86,87,88,89,90],ut={trace:a(function(){},"trace"),yy:{},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,ANNOTATION_START:46,ANNOTATION_END:47,CLASS:48,emptyBody:49,SPACE: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},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:"ANNOTATION_START",47:"ANNOTATION_END",48:"CLASS",50:"SPACE",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"},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],[38,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[24,4],[24,7],[24,6],[43,2],[43,3],[49,0],[49,2],[49,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]],performAction:a(function(t,e,s,i,n,a,r){var u=a.length-1;switch(n){case 8:this.$=a[u-1];break;case 9:case 10:case 13:case 15:case 46:this.$=a[u];break;case 11:case 14:this.$=a[u-2]+"."+a[u];break;case 12:case 16:case 110:this.$=a[u-1]+a[u];break;case 17:case 18:this.$=a[u-1]+"~"+a[u]+"~";break;case 19:i.addRelation(a[u]);break;case 20:a[u-1].title=i.cleanupLabel(a[u]),i.addRelation(a[u-1]);break;case 31:this.$=a[u].trim(),i.setAccTitle(this.$);break;case 32:case 33:this.$=a[u].trim(),i.setAccDescription(this.$);break;case 34:i.addClassesToNamespace(a[u-3],a[u-1][0],a[u-1][1]),i.popNamespace();break;case 35:i.addClassesToNamespace(a[u-4],a[u-1][0],a[u-1][1]),i.popNamespace();break;case 36:this.$=i.addNamespace(a[u]);break;case 37:this.$=i.addNamespace(a[u-1],a[u]);break;case 38:this.$=[[a[u]],[]];break;case 39:this.$=[[a[u-1]],[]];break;case 40:a[u][0].unshift(a[u-2]),this.$=a[u];break;case 41:this.$=[[],[a[u]]];break;case 42:this.$=[[],[a[u-1]]];break;case 43:a[u][1].unshift(a[u-2]),this.$=a[u];break;case 44:case 45:this.$=[[],[]];break;case 48:i.setCssClass(a[u-2],a[u]);break;case 49:i.addMembers(a[u-3],a[u-1]);break;case 51:i.setCssClass(a[u-5],a[u-3]),i.addMembers(a[u-5],a[u-1]);break;case 52:i.addAnnotation(a[u-3],a[u-1]);break;case 53:i.addAnnotation(a[u-6],a[u-4]),i.addMembers(a[u-6],a[u-1]);break;case 54:i.addAnnotation(a[u-5],a[u-3]);break;case 55:this.$=a[u],i.addClass(a[u]);break;case 56:this.$=a[u-1],i.addClass(a[u-1]),i.setClassLabel(a[u-1],a[u]);break;case 60:i.addAnnotation(a[u],a[u-2]);break;case 61:case 74:case 107:this.$=[a[u]];break;case 62:a[u].push(a[u-1]),this.$=a[u];break;case 63:case 65:case 66:break;case 64:i.addMember(a[u-1],i.cleanupLabel(a[u]));break;case 67:this.$={id1:a[u-2],id2:a[u],relation:a[u-1],relationTitle1:"none",relationTitle2:"none"};break;case 68:this.$={id1:a[u-3],id2:a[u],relation:a[u-1],relationTitle1:a[u-2],relationTitle2:"none"};break;case 69:this.$={id1:a[u-3],id2:a[u],relation:a[u-2],relationTitle1:"none",relationTitle2:a[u-1]};break;case 70:this.$={id1:a[u-4],id2:a[u],relation:a[u-2],relationTitle1:a[u-3],relationTitle2:a[u-1]};break;case 71:this.$=i.addNote(a[u],a[u-1]);break;case 72:this.$=i.addNote(a[u]);break;case 73:this.$=a[u-2],i.defineClass(a[u-1],a[u]);break;case 75:this.$=a[u-2].concat([a[u]]);break;case 76:i.setDirection("TB");break;case 77:i.setDirection("BT");break;case 78:i.setDirection("RL");break;case 79:i.setDirection("LR");break;case 80:this.$={type1:a[u-2],type2:a[u],lineType:a[u-1]};break;case 81:this.$={type1:"none",type2:a[u],lineType:a[u-1]};break;case 82:this.$={type1:a[u-1],type2:"none",lineType:a[u]};break;case 83:this.$={type1:"none",type2:"none",lineType:a[u]};break;case 84:this.$=i.relationType.AGGREGATION;break;case 85:this.$=i.relationType.EXTENSION;break;case 86:this.$=i.relationType.COMPOSITION;break;case 87:this.$=i.relationType.DEPENDENCY;break;case 88:this.$=i.relationType.LOLLIPOP;break;case 89:this.$=i.lineType.LINE;break;case 90:this.$=i.lineType.DOTTED_LINE;break;case 91:case 97:this.$=a[u-2],i.setClickEvent(a[u-1],a[u]);break;case 92:case 98:this.$=a[u-3],i.setClickEvent(a[u-2],a[u-1]),i.setTooltip(a[u-2],a[u]);break;case 93:this.$=a[u-2],i.setLink(a[u-1],a[u]);break;case 94:this.$=a[u-3],i.setLink(a[u-2],a[u-1],a[u]);break;case 95:this.$=a[u-3],i.setLink(a[u-2],a[u-1]),i.setTooltip(a[u-2],a[u]);break;case 96:this.$=a[u-4],i.setLink(a[u-3],a[u-2],a[u]),i.setTooltip(a[u-3],a[u-1]);break;case 99:this.$=a[u-3],i.setClickEvent(a[u-2],a[u-1],a[u]);break;case 100:this.$=a[u-4],i.setClickEvent(a[u-3],a[u-2],a[u-1]),i.setTooltip(a[u-3],a[u]);break;case 101:this.$=a[u-3],i.setLink(a[u-2],a[u]);break;case 102:this.$=a[u-4],i.setLink(a[u-3],a[u-1],a[u]);break;case 103:this.$=a[u-4],i.setLink(a[u-3],a[u-1]),i.setTooltip(a[u-3],a[u]);break;case 104:this.$=a[u-5],i.setLink(a[u-4],a[u-2],a[u]),i.setTooltip(a[u-4],a[u-1]);break;case 105:this.$=a[u-2],i.setCssStyle(a[u-1],a[u]);break;case 106:i.setCssClass(a[u-1],a[u]);break;case 108:a[u-2].push(a[u]),this.$=a[u-2]}},"anonymous"),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:e,35:s,37:i,38:22,42:n,43:23,46:r,48:u,51:l,52:o,54:c,56:h,57:p,60:d,62:A,63:y,64:m,65:g,75:C,76:b,78:k,82:E,83:f,86:T,100:F,102:D,103:B},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},t(_,[2,5],{8:[1,48]}),{8:[1,49]},t(S,[2,19],{22:[1,50]}),t(S,[2,21]),t(S,[2,22]),t(S,[2,23]),t(S,[2,24]),t(S,[2,25]),t(S,[2,26]),t(S,[2,27]),t(S,[2,28]),t(S,[2,29]),t(S,[2,30]),{34:[1,51]},{36:[1,52]},t(S,[2,33]),t(S,[2,63],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:N,69:$,70:L,71:x,72:I,73:v,74:O}),{39:[1,65]},t(w,[2,47],{39:[1,67],44:[1,66],46:[1,68]}),t(S,[2,65]),t(S,[2,66]),{16:69,60:d,86:T,100:F,102:D},{16:39,17:40,19:70,60:d,86:T,100:F,102:D,103:B},{16:39,17:40,19:71,60:d,86:T,100:F,102:D,103:B},{16:39,17:40,19:72,60:d,86:T,100:F,102:D,103:B},{60:[1,73]},{13:[1,74]},{16:39,17:40,19:75,60:d,86:T,100:F,102:D,103:B},{13:R,55:76},{58:78,60:[1,79]},t(S,[2,76]),t(S,[2,77]),t(S,[2,78]),t(S,[2,79]),t(P,[2,13],{16:39,17:40,19:81,18:[1,80],20:[1,82],60:d,86:T,100:F,102:D,103:B}),t(P,[2,15],{20:[1,83]}),{15:84,16:85,17:86,60:d,86:T,100:F,102:D,103:B},{16:39,17:40,19:87,60:d,86:T,100:F,102:D,103:B},t(M,[2,133]),t(M,[2,134]),t(M,[2,135]),t(M,[2,136]),t([1,8,9,12,13,20,22,39,41,44,46,68,69,70,71,72,73,74,79,81],[2,137]),t(_,[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:88,33:e,35:s,37:i,42:n,46:r,48:u,51:l,52:o,54:c,56:h,57:p,60:d,62:A,63:y,64:m,65:g,75:C,76:b,78:k,82:E,83:f,86:T,100:F,102:D,103:B}),{5:89,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:e,35:s,37:i,38:22,42:n,43:23,46:r,48:u,51:l,52:o,54:c,56:h,57:p,60:d,62:A,63:y,64:m,65:g,75:C,76:b,78:k,82:E,83:f,86:T,100:F,102:D,103:B},t(S,[2,20]),t(S,[2,31]),t(S,[2,32]),{13:[1,91],16:39,17:40,19:90,60:d,86:T,100:F,102:D,103:B},{53:92,66:56,67:57,68:N,69:$,70:L,71:x,72:I,73:v,74:O},t(S,[2,64]),{67:93,73:v,74:O},t(G,[2,83],{66:94,68:N,69:$,70:L,71:x,72:I}),t(U,[2,84]),t(U,[2,85]),t(U,[2,86]),t(U,[2,87]),t(U,[2,88]),t(z,[2,89]),t(z,[2,90]),{8:[1,96],23:99,24:97,30:98,38:22,40:95,42:n,43:23,48:u,54:c,56:h},{16:100,60:d,86:T,100:F,102:D},{41:[1,102],45:101,51:Y},{16:104,60:d,86:T,100:F,102:D},{47:[1,105]},{13:[1,106]},{13:[1,107]},{79:[1,108],81:[1,109]},{22:j,50:K,59:110,60:W,82:Q,84:111,85:112,86:X,87:q,88:H,89:V,90:J},{60:[1,122]},{13:R,55:123},t(w,[2,72]),t(w,[2,138]),{22:j,50:K,59:124,60:W,61:[1,125],82:Q,84:111,85:112,86:X,87:q,88:H,89:V,90:J},t(Z,[2,74]),{16:39,17:40,19:126,60:d,86:T,100:F,102:D,103:B},t(P,[2,16]),t(P,[2,17]),t(P,[2,18]),{11:127,12:tt,39:[2,36]},t(et,[2,9],{16:85,17:86,15:130,18:[1,129],60:d,86:T,100:F,102:D,103:B}),t(et,[2,10]),t(st,[2,55],{11:131,12:tt}),t(_,[2,7]),{9:[1,132]},t(it,[2,67]),{16:39,17:40,19:133,60:d,86:T,100:F,102:D,103:B},{13:[1,135],16:39,17:40,19:134,60:d,86:T,100:F,102:D,103:B},t(G,[2,82],{66:136,68:N,69:$,70:L,71:x,72:I}),t(G,[2,81]),{41:[1,137]},{23:99,24:97,30:98,38:22,40:138,42:n,43:23,48:u,54:c,56:h},{8:[1,139],41:[2,38]},{8:[1,140],41:[2,41]},{8:[1,141],41:[2,44]},t(w,[2,48],{39:[1,142]}),{41:[1,143]},t(w,[2,50]),{41:[2,61],45:144,51:Y},{47:[1,145]},{16:39,17:40,19:146,60:d,86:T,100:F,102:D,103:B},t(S,[2,91],{13:[1,147]}),t(S,[2,93],{13:[1,149],77:[1,148]}),t(S,[2,97],{13:[1,150],80:[1,151]}),{13:[1,152]},t(S,[2,105],{61:nt}),t(at,[2,107],{85:154,22:j,50:K,60:W,82:Q,86:X,87:q,88:H,89:V,90:J}),t(rt,[2,109]),t(rt,[2,111]),t(rt,[2,112]),t(rt,[2,113]),t(rt,[2,114]),t(rt,[2,115]),t(rt,[2,116]),t(rt,[2,117]),t(rt,[2,118]),t(rt,[2,119]),t(S,[2,106]),t(w,[2,71]),t(S,[2,73],{61:nt}),{60:[1,155]},t(P,[2,14]),{39:[2,37]},{13:[1,156]},{15:157,16:85,17:86,60:d,86:T,100:F,102:D,103:B},t(et,[2,12]),t(st,[2,56]),{1:[2,4]},t(it,[2,69]),t(it,[2,68]),{16:39,17:40,19:158,60:d,86:T,100:F,102:D,103:B},t(G,[2,80]),t(w,[2,34]),{41:[1,159]},{23:99,24:97,30:98,38:22,40:160,41:[2,39],42:n,43:23,48:u,54:c,56:h},{23:99,24:97,30:98,38:22,40:161,41:[2,42],42:n,43:23,48:u,54:c,56:h},{23:99,24:97,30:98,38:22,40:162,41:[2,45],42:n,43:23,48:u,54:c,56:h},{45:163,51:Y},t(w,[2,49]),{41:[2,62]},t(w,[2,52],{39:[1,164]}),t(S,[2,60]),t(S,[2,92]),t(S,[2,94]),t(S,[2,95],{77:[1,165]}),t(S,[2,98]),t(S,[2,99],{13:[1,166]}),t(S,[2,101],{13:[1,168],77:[1,167]}),{22:j,50:K,60:W,82:Q,84:169,85:112,86:X,87:q,88:H,89:V,90:J},t(rt,[2,110]),t(Z,[2,75]),{14:[1,170]},t(et,[2,11]),t(it,[2,70]),t(w,[2,35]),{41:[2,40]},{41:[2,43]},{41:[2,46]},{41:[1,171]},{41:[1,173],45:172,51:Y},t(S,[2,96]),t(S,[2,100]),t(S,[2,102]),t(S,[2,103],{77:[1,174]}),t(at,[2,108],{85:154,22:j,50:K,60:W,82:Q,86:X,87:q,88:H,89:V,90:J}),t(st,[2,8]),t(w,[2,51]),{41:[1,175]},t(w,[2,54]),t(S,[2,104]),t(w,[2,53])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],127:[2,37],132:[2,4],144:[2,62],160:[2,40],161:[2,43],162:[2,46]},parseError:a(function(t,e){if(!e.recoverable){var s=new Error(t);throw s.hash=e,s}this.trace(t)},"parseError"),parse:a(function(t){var e=this,s=[0],i=[],n=[null],r=[],u=this.table,l="",o=0,c=0,h=r.slice.call(arguments,1),p=Object.create(this.lexer),d={yy:{}};for(var A in this.yy)Object.prototype.hasOwnProperty.call(this.yy,A)&&(d.yy[A]=this.yy[A]);p.setInput(t,d.yy),d.yy.lexer=p,d.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var y=p.yylloc;r.push(y);var m=p.options&&p.options.ranges;function g(){var t;return"number"!=typeof(t=i.pop()||p.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof d.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,a(function(t){s.length=s.length-2*t,n.length=n.length-t,r.length=r.length-t},"popStack"),a(g,"lex");for(var C,b,k,E,f,T,F,D,B={};;){if(b=s[s.length-1],this.defaultActions[b]?k=this.defaultActions[b]:(null==C&&(C=g()),k=u[b]&&u[b][C]),void 0===k||!k.length||!k[0]){var _;for(f in D=[],u[b])this.terminals_[f]&&f>2&&D.push("'"+this.terminals_[f]+"'");_=p.showPosition?"Parse error on line "+(o+1)+":\n"+p.showPosition()+"\nExpecting "+D.join(", ")+", got '"+(this.terminals_[C]||C)+"'":"Parse error on line "+(o+1)+": Unexpected "+(1==C?"end of input":"'"+(this.terminals_[C]||C)+"'"),this.parseError(_,{text:p.match,token:this.terminals_[C]||C,line:p.yylineno,loc:y,expected:D})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+C);switch(k[0]){case 1:s.push(C),n.push(p.yytext),r.push(p.yylloc),s.push(k[1]),C=null,c=p.yyleng,l=p.yytext,o=p.yylineno,y=p.yylloc;break;case 2:if(T=this.productions_[k[1]][1],B.$=n[n.length-T],B._$={first_line:r[r.length-(T||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(T||1)].first_column,last_column:r[r.length-1].last_column},m&&(B._$.range=[r[r.length-(T||1)].range[0],r[r.length-1].range[1]]),void 0!==(E=this.performAction.apply(B,[l,c,o,d.yy,k[1],n,r].concat(h))))return E;T&&(s=s.slice(0,-1*T*2),n=n.slice(0,-1*T),r=r.slice(0,-1*T)),s.push(this.productions_[k[1]][0]),n.push(B.$),r.push(B._$),F=u[s[s.length-2]][s[s.length-1]],s.push(F);break;case 3:return!0}}return!0},"parse")},lt=function(){return{EOF:1,parseError:a(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:a(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:a(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:a(function(t){var e=t.length,s=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),s.length-1&&(this.yylineno-=s.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:s?(s.length===i.length?this.yylloc.first_column:0)+i[i.length-s.length].length-s[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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(),{text:"",token:null,line:this.yylineno})},"reject"),less:a(function(t){this.unput(this.match.slice(t))},"less"),pastInput:a(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:a(function(t,e){var s,i,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],s=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack){for(var a in n)this[a]=n[a];return!1}return!1},"test_match"),next:a(function(){if(this.done)return this.EOF;var t,e,s,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),a=0;a<n.length;a++)if((s=this._input.match(this.rules[n[a]]))&&(!e||s[0].length>e[0].length)){if(e=s,i=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(s,n[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:a(function(){return this.next()||this.lex()},"lex"),begin:a(function(t){this.conditionStack.push(t)},"begin"),popState:a(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:a(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:a(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:a(function(t){this.begin(t)},"pushState"),stateStackSize:a(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:a(function(t,e,s,i){switch(s){case 0:return 62;case 1:return 63;case 2:return 64;case 3:return 65;case 4:case 5:case 14:case 31:case 37:case 41:case 48:break;case 6:return this.begin("acc_title"),33;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),35;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:case 19:case 22:case 24:case 59:case 62:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:case 36:return 8;case 15:case 16:return 7;case 17:case 38:case 46:return"EDGE_STATE";case 18:this.begin("callback_name");break;case 20:this.popState(),this.begin("callback_args");break;case 21:return 79;case 23:return 80;case 25:return"STR";case 26:this.begin("string");break;case 27:return 82;case 28:return 57;case 29:return this.begin("namespace"),42;case 30:case 40:return this.popState(),8;case 32:return this.begin("namespace-body"),39;case 33:this.popState(),this.less(0);break;case 34:case 44:return this.popState(),41;case 35:case 45:return"EOF_IN_STRUCT";case 39:return this.begin("class"),48;case 42:return this.popState(),this.popState(),41;case 43:return this.begin("class-body"),39;case 47:return"OPEN_IN_STRUCT";case 49:return"MEMBER";case 50:return 83;case 51:return 75;case 52:return 76;case 53:return 78;case 54:return 54;case 55:return 56;case 56:return 46;case 57:return 47;case 58:return 81;case 60:return"GENERICTYPE";case 61:this.begin("generic");break;case 63:return"BQUOTE_STR";case 64:this.begin("bqstring");break;case 65:case 66:case 67:case 68:return 77;case 69:case 70:return 69;case 71:case 72:return 71;case 73:return 70;case 74:return 68;case 75:return 72;case 76:return 73;case 77:return 74;case 78:return 22;case 79:return 44;case 80:return 100;case 81:return 18;case 82:return"PLUS";case 83:return 87;case 84:return 61;case 85:case 86:return 89;case 87:return 90;case 88:case 89:return"EQUALS";case 90:return 60;case 91:return 12;case 92:return 14;case 93:return"PUNCTUATION";case 94:return 86;case 95:return 102;case 96:case 97:return 50;case 98:return 9}},"anonymous"),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)/,/^(?:$)/],conditions:{"namespace-body":{rules:[26,29,34,35,36,37,38,39,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},namespace:{rules:[26,29,30,31,32,33,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},"class-body":{rules:[26,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},class:{rules:[26,40,41,42,43,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},acc_descr_multiline:{rules:[11,12,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},acc_descr:{rules:[9,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},acc_title:{rules:[7,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},callback_args:{rules:[22,23,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},callback_name:{rules:[19,20,21,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},href:{rules:[26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},struct:{rules:[26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},generic:{rules:[26,50,51,52,53,54,55,56,57,58,59,60,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},bqstring:{rules:[26,50,51,52,53,54,55,56,57,58,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},string:{rules:[24,25,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,26,27,28,29,39,50,51,52,53,54,55,56,57,58,61,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,98],inclusive:!0}}}}();function ot(){this.yy={}}return ut.lexer=lt,a(ot,"Parser"),ot.prototype=ut,ut.Parser=ot,new ot}();D.parser=D;var B=D,_=["#","+","~","-",""],S=(a(t=class{constructor(t,e){this.memberType=e,this.visibility="",this.classifier="",this.text="";const s=E(t,u());this.parseMember(s)}getDisplayDetails(){let t=this.visibility+f(this.id);return"method"===this.memberType&&(t+=`(${f(this.parameters.trim())})`,this.returnType&&(t+=" : "+f(this.returnType))),t=t.trim(),{displayText:t,cssStyle:this.parseClassifier()}}parseMember(t){let e="";if("method"===this.memberType){const s=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/.exec(t);if(s){const t=s[1]?s[1].trim():"";if(_.includes(t)&&(this.visibility=t),this.id=s[2],this.parameters=s[3]?s[3].trim():"",e=s[4]?s[4].trim():"",this.returnType=s[5]?s[5].trim():"",""===e){const t=this.returnType.substring(this.returnType.length-1);/[$*]/.exec(t)&&(e=t,this.returnType=this.returnType.substring(0,this.returnType.length-1))}}}else{const s=t.length,i=t.substring(0,1),n=t.substring(s-1);_.includes(i)&&(this.visibility=i),/[$*]/.exec(n)&&(e=n),this.id=t.substring(""===this.visibility?0:1,""===e?s:s-1)}this.classifier=e,this.id=this.id.startsWith(" ")?" "+this.id.trim():this.id.trim();const s=`${this.visibility?"\\"+this.visibility:""}${f(this.id)}${"method"===this.memberType?`(${f(this.parameters)})${this.returnType?" : "+f(this.returnType):""}`:""}`;this.text=s.replaceAll("<","&lt;").replaceAll(">","&gt;"),this.text.startsWith("\\&lt;")&&(this.text=this.text.replace("\\&lt;","~"))}parseClassifier(){switch(this.classifier){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}}},"ClassMember"),t),N="classId-",$=0,L=a(t=>C.sanitizeText(t,u()),"sanitizeText"),x=(a(e=class{constructor(){this.relations=[],this.classes=new Map,this.styleClasses=new Map,this.notes=new Map,this.interfaces=[],this.namespaces=new Map,this.namespaceCounter=0,this.namespaceStack=[],this.diagramId="",this.functions=[],this.lineType={LINE:0,DOTTED_LINE:1},this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4},this.setupToolTips=a(t=>{const e=T();h(t).select("svg").selectAll("g").filter(function(){return null!==h(this).attr("title")}).on("mouseover",t=>{const s=h(t.currentTarget),i=s.attr("title");if(!i)return;const n=t.currentTarget.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.html(F.sanitize(i)).style("left",`${window.scrollX+n.left+n.width/2}px`).style("top",`${window.scrollY+n.bottom+4}px`),s.classed("hover",!0)}).on("mouseout",t=>{e.transition().duration(500).style("opacity",0),h(t.currentTarget).classed("hover",!1)})},"setupToolTips"),this.direction="TB",this.setAccTitle=p,this.getAccTitle=d,this.setAccDescription=A,this.getAccDescription=y,this.setDiagramTitle=m,this.getDiagramTitle=g,this.getConfig=a(()=>u().class,"getConfig"),this.functions.push(this.setupToolTips.bind(this)),this.clear(),this.addRelation=this.addRelation.bind(this),this.addClassesToNamespace=this.addClassesToNamespace.bind(this),this.addNamespace=this.addNamespace.bind(this),this.popNamespace=this.popNamespace.bind(this),this.setCssClass=this.setCssClass.bind(this),this.addMembers=this.addMembers.bind(this),this.addClass=this.addClass.bind(this),this.setClassLabel=this.setClassLabel.bind(this),this.addAnnotation=this.addAnnotation.bind(this),this.addMember=this.addMember.bind(this),this.cleanupLabel=this.cleanupLabel.bind(this),this.addNote=this.addNote.bind(this),this.defineClass=this.defineClass.bind(this),this.setDirection=this.setDirection.bind(this),this.setLink=this.setLink.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.clear=this.clear.bind(this),this.setTooltip=this.setTooltip.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setCssStyle=this.setCssStyle.bind(this)}splitClassNameAndType(t){const e=C.sanitizeText(t,u());let s="",i=e;if(e.indexOf("~")>0){const t=e.split("~");i=L(t[0]),s=L(t[1])}return{className:i,type:s}}setClassLabel(t,e){const s=C.sanitizeText(t,u());e&&(e=L(e));const{className:i}=this.splitClassNameAndType(s);this.classes.get(i).label=e,this.classes.get(i).text=`${e}${this.classes.get(i).type?`<${this.classes.get(i).type}>`:""}`}addClass(t){const e=C.sanitizeText(t,u()),{className:s,type:i}=this.splitClassNameAndType(e);if(this.classes.has(s))return;const n=C.sanitizeText(s,u());this.classes.set(n,{id:n,type:i,label:n,text:`${n}${i?`&lt;${i}&gt;`:""}`,shape:"classBox",cssClasses:"default",methods:[],members:[],annotations:[],styles:[],domId:N+n+"-"+$}),$++}addInterface(t,e){const s={id:`interface${this.interfaces.length}`,label:t,classId:e};this.interfaces.push(s)}setDiagramId(t){this.diagramId=t}lookUpDomId(t){const e=C.sanitizeText(t,u());if(this.classes.has(e)){const t=this.classes.get(e).domId;return this.diagramId?`${this.diagramId}-${t}`:t}throw new Error("Class not found: "+e)}clear(){this.relations=[],this.classes=new Map,this.notes=new Map,this.interfaces=[],this.functions=[],this.functions.push(this.setupToolTips.bind(this)),this.namespaces=new Map,this.namespaceCounter=0,this.namespaceStack=[],this.diagramId="",this.direction="TB",b()}getClass(t){return this.classes.get(t)}getClasses(){return this.classes}getRelations(){return this.relations}getNote(t){const e="number"==typeof t?`note${t}`:t;return this.notes.get(e)}getNotes(){return this.notes}addRelation(t){r.debug("Adding relation: "+JSON.stringify(t));const e=[this.relationType.LOLLIPOP,this.relationType.AGGREGATION,this.relationType.COMPOSITION,this.relationType.DEPENDENCY,this.relationType.EXTENSION];t.relation.type1!==this.relationType.LOLLIPOP||e.includes(t.relation.type2)?t.relation.type2!==this.relationType.LOLLIPOP||e.includes(t.relation.type1)?(this.addClass(t.id1),this.addClass(t.id2)):(this.addClass(t.id1),this.addInterface(t.id2,t.id1),t.id2="interface"+(this.interfaces.length-1)):(this.addClass(t.id2),this.addInterface(t.id1,t.id2),t.id1="interface"+(this.interfaces.length-1)),t.id1=this.splitClassNameAndType(t.id1).className,t.id2=this.splitClassNameAndType(t.id2).className,t.relationTitle1=C.sanitizeText(t.relationTitle1.trim(),u()),t.relationTitle2=C.sanitizeText(t.relationTitle2.trim(),u()),this.relations.push(t)}addAnnotation(t,e){const s=this.splitClassNameAndType(t).className;this.classes.get(s).annotations.push(e)}addMember(t,e){this.addClass(t);const s=this.splitClassNameAndType(t).className,i=this.classes.get(s);if("string"==typeof e){const t=e.trim();t.startsWith("<<")&&t.endsWith(">>")?i.annotations.push(L(t.substring(2,t.length-2))):t.indexOf(")")>0?i.methods.push(new S(t,"method")):t&&i.members.push(new S(t,"attribute"))}}addMembers(t,e){Array.isArray(e)&&(e.reverse(),e.forEach(e=>this.addMember(t,e)))}addNote(t,e){const s=this.notes.size,i={id:`note${s}`,class:e,text:t,index:s};return this.notes.set(i.id,i),i.id}cleanupLabel(t){return t.startsWith(":")&&(t=t.substring(1)),L(t.trim())}setCssClass(t,e){t.split(",").forEach(t=>{let s=t;/\d/.exec(t[0])&&(s=N+s),s=this.splitClassNameAndType(s).className;const i=this.classes.get(s);i&&(i.cssClasses+=" "+e)})}defineClass(t,e){for(const s of t){let t=this.styleClasses.get(s);void 0===t&&(t={id:s,styles:[],textStyles:[]},this.styleClasses.set(s,t)),e&&e.forEach(e=>{if(/color/.exec(e)){const s=e.replace("fill","bgFill");t.textStyles.push(s)}t.styles.push(e)}),this.classes.forEach(t=>{t.cssClasses.includes(s)&&t.styles.push(...e.flatMap(t=>t.split(",")))})}}setTooltip(t,e){t.split(",").forEach(t=>{if(void 0!==e){const s=this.splitClassNameAndType(t).className,i=this.classes.get(s);i&&(i.tooltip=L(e))}})}getTooltip(t,e){return e&&this.namespaces.has(e)?this.namespaces.get(e).classes.get(t).tooltip:this.classes.get(t).tooltip}setLink(t,e,s){const i=u();t.split(",").forEach(t=>{let n=t;/\d/.exec(t[0])&&(n=N+n),n=this.splitClassNameAndType(n).className;const a=this.classes.get(n);a&&(a.link=c.formatUrl(e,i),"sandbox"===i.securityLevel?a.linkTarget="_top":a.linkTarget="string"==typeof s?L(s):"_blank")}),this.setCssClass(t,"clickable")}setClickEvent(t,e,s){t.split(",").forEach(t=>{this.setClickFunc(t,e,s);const i=this.splitClassNameAndType(t).className,n=this.classes.get(i);n&&(n.haveCallback=!0)}),this.setCssClass(t,"clickable")}setClickFunc(t,e,s){const i=C.sanitizeText(t,u());if("loose"!==u().securityLevel)return;if(void 0===e)return;const n=this.splitClassNameAndType(i).className;if(this.classes.has(n)){let t=[];if("string"==typeof s){t=s.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let e=0;e<t.length;e++){let s=t[e].trim();s.startsWith('"')&&s.endsWith('"')&&(s=s.substr(1,s.length-2)),t[e]=s}}0===t.length&&t.push(n),this.functions.push(()=>{const s=this.lookUpDomId(n),i=document.querySelector(`[id="${s}"]`);null!==i&&i.addEventListener("click",()=>{c.runFunc(e,...t)},!1)})}}bindFunctions(t){this.functions.forEach(e=>{e(t)})}escapeHtml(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}getDirection(){return this.direction}setDirection(t){this.direction=t}static resolveQualifiedId(t,e){const s=e.at(-1);return s?`${s}.${t}`:t}static getAncestorIds(t){const e=t.split("."),s=new Array(e.length);s[0]=e[0];for(let i=1;i<e.length;i++)s[i]=`${s[i-1]}.${e[i]}`;return s}createNamespaceNode(t,e,s,i=!1){return{id:t,label:e,classes:new Map,notes:new Map,children:new Map,domId:N+t+"-"+this.namespaceCounter++,parent:s,explicit:i}}linkParentChild(t,e){const s=this.namespaces.get(t),i=this.namespaces.get(e);s&&i&&(s.children.has(e)||s.children.set(e,i),i.parent??=t)}addNamespace(t,s){const i=e.resolveQualifiedId(t,this.namespaceStack);if(this.namespaceStack.push(i),this.namespaces.has(i)){const t=this.namespaces.get(i);return t.explicit=!0,s&&(t.label=s),i}const n=i.split("."),a=e.getAncestorIds(i);for(let e=0;e<a.length;e++){const t=a[e],i=e>0?a[e-1]:void 0,r=e===a.length-1,u=r&&s?s:n[e];this.namespaces.has(t)?r&&(this.namespaces.get(t).explicit=!0):this.namespaces.set(t,this.createNamespaceNode(t,u,i,r)),i&&this.linkParentChild(i,t)}return i}popNamespace(){this.namespaceStack.pop()}getNamespace(t){return this.namespaces.get(t)}getNamespaces(){return this.namespaces}addClassesToNamespace(t,e,s){if(this.namespaces.has(t)){for(const s of e){const{className:e}=this.splitClassNameAndType(s),i=this.getClass(e);i.parent=t,this.namespaces.get(t).classes.set(e,i)}for(const e of s){const s=this.getNote(e);s.parent=t,this.namespaces.get(t).notes.set(e,s)}}}setCssStyle(t,e){const s=this.classes.get(t);if(e&&s)for(const i of e)i.includes(",")?s.styles.push(...i.split(",")):s.styles.push(i)}getArrowMarker(t){let e;switch(t){case 0:e="aggregation";break;case 1:e="extension";break;case 2:e="composition";break;case 3:e="dependency";break;case 4:e="lollipop";break;default:e="none"}return e}resolveExplicitAncestor(t){let e=t;for(;e;){const t=this.namespaces.get(e);if(!t)return;if(t.explicit)return e;e=t.parent}}getData(){const t=[],e=[],s=u(),i=s.class?.hierarchicalNamespaces??!0;for(const a of this.namespaces.values()){if(!i&&!a.explicit)continue;const e={id:a.id,label:i?a.label:a.id,isGroup:!0,padding:s.class.padding??16,shape:"rect",cssStyles:[],look:s.look,parentId:i?a.parent:void 0};t.push(e)}for(const a of this.classes.values()){const e=i?a.parent:this.resolveExplicitAncestor(a.parent),n={...a,type:void 0,isGroup:!1,parentId:e,look:s.look};t.push(n)}for(const a of this.notes.values()){const n=i?a.parent:this.resolveExplicitAncestor(a.parent),r={id:a.id,label:a.text,isGroup:!1,shape:"note",padding:s.class.padding??6,cssStyles:["text-align: left","white-space: nowrap",`fill: ${s.themeVariables.noteBkgColor}`,`stroke: ${s.themeVariables.noteBorderColor}`],look:s.look,parentId:n,labelType:"markdown"};t.push(r);const u=this.classes.get(a.class)?.id;if(u){const t={id:`edgeNote${a.index}`,start:a.id,end:u,type:"normal",thickness:"normal",classes:"relation",arrowTypeStart:"none",arrowTypeEnd:"none",arrowheadStyle:"",labelStyle:[""],style:["fill: none"],pattern:"dotted",look:s.look};e.push(t)}}for(const a of this.interfaces){const e={id:a.id,label:a.label,isGroup:!1,shape:"rect",cssStyles:["opacity: 0;"],look:s.look};t.push(e)}let n=0;for(const a of this.relations){n++;const t={id:k(a.id1,a.id2,{prefix:"id",counter:n}),start:a.id1,end:a.id2,type:"normal",label:a.title,labelpos:"c",thickness:"normal",classes:"relation",arrowTypeStart:this.getArrowMarker(a.relation.type1),arrowTypeEnd:this.getArrowMarker(a.relation.type2),startLabelRight:"none"===a.relationTitle1?"":a.relationTitle1,endLabelLeft:"none"===a.relationTitle2?"":a.relationTitle2,arrowheadStyle:"",labelStyle:["display: inline-block"],style:a.style||"",pattern:1==a.relation.lineType?"dashed":"solid",look:s.look,labelType:"markdown"};e.push(t)}return{nodes:t,edges:e,other:{},config:s,direction:this.getDirection()}}},"ClassDB"),e),I=a(t=>`g.classGroup text {\n fill: ${t.nodeBorder||t.classText};\n stroke: none;\n font-family: ${t.fontFamily};\n font-size: 10px;\n\n .title {\n font-weight: bolder;\n }\n\n}\n\n .cluster-label text {\n fill: ${t.titleColor};\n }\n .cluster-label span {\n color: ${t.titleColor};\n }\n .cluster-label span p {\n background-color: transparent;\n }\n\n .cluster rect {\n fill: ${t.clusterBkg};\n stroke: ${t.clusterBorder};\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${t.titleColor};\n }\n\n .cluster span {\n color: ${t.titleColor};\n }\n\n.nodeLabel, .edgeLabel {\n color: ${t.classText};\n}\n\n.noteLabel .nodeLabel, .noteLabel .edgeLabel {\n color: ${t.noteTextColor};\n}\n.edgeLabel .label rect {\n fill: ${t.mainBkg};\n}\n.label text {\n fill: ${t.classText};\n}\n\n.labelBkg {\n background: ${t.mainBkg};\n}\n.edgeLabel .label span {\n background: ${t.mainBkg};\n}\n\n.classTitle {\n font-weight: bolder;\n}\n.node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: ${t.strokeWidth};\n }\n\n\n.divider {\n stroke: ${t.nodeBorder};\n stroke-width: 1;\n}\n\ng.clickable {\n cursor: pointer;\n}\n\ng.classGroup rect {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n}\n\ng.classGroup line {\n stroke: ${t.nodeBorder};\n stroke-width: 1;\n}\n\n.classLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ${t.mainBkg};\n opacity: 0.5;\n}\n\n.classLabel .label {\n fill: ${t.nodeBorder};\n font-size: 10px;\n}\n\n.relation {\n stroke: ${t.lineColor};\n stroke-width: ${t.strokeWidth};\n fill: none;\n}\n\n.dashed-line{\n stroke-dasharray: 3;\n}\n\n.dotted-line{\n stroke-dasharray: 1 2;\n}\n\n[id$="-compositionStart"], .composition {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n[id$="-compositionEnd"], .composition {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n[id$="-dependencyStart"], .dependency {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n[id$="-dependencyEnd"], .dependency {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n[id$="-extensionStart"], .extension {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n[id$="-extensionEnd"], .extension {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n[id$="-aggregationStart"], .aggregation {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n[id$="-aggregationEnd"], .aggregation {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n[id$="-lollipopStart"], .lollipop {\n fill: ${t.mainBkg} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n[id$="-lollipopEnd"], .lollipop {\n fill: ${t.mainBkg} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n.edgeTerminals {\n font-size: 11px;\n line-height: initial;\n}\n\n.classTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n}\n\n.edgeLabel[data-look="neo"] {\n background-color: ${t.edgeLabelBackground};\n p {\n background-color: ${t.edgeLabelBackground};\n }\n rect {\n opacity: 0.5;\n background-color: ${t.edgeLabelBackground};\n fill: ${t.edgeLabelBackground};\n }\n text-align: center;\n}\n ${s()}\n`,"getStyles"),v=a((t,e="TB")=>{if(!t.doc)return e;let s=e;for(const i of t.doc)"dir"===i.stmt&&(s=i.value);return s},"getDir"),O={getClasses:a(function(t,e){return e.db.getClasses()},"getClasses"),draw:a(async function(t,e,s,a){r.info("REF0:"),r.info("Drawing class diagram (v3)",e);const{securityLevel:h,state:p,layout:d}=u();a.db.setDiagramId(e);const A=a.db.getData(),y=i(e,h);A.type=a.type,A.layoutAlgorithm=l(d),A.nodeSpacing=p?.nodeSpacing||50,A.rankSpacing=p?.rankSpacing||50,A.markers=["aggregation","extension","composition","dependency","lollipop"],A.diagramId=e,await o(A,y),c.insertTitle(y,"classDiagramTitleText",p?.titleTopMargin??25,a.db.getDiagramTitle()),n(y,8,"classDiagram",p?.useMaxWidth??!0)},"draw"),getDir:v};export{x as C,B as a,O as c,I as s};
@@ -1 +1 @@
1
- import{_ as t,e,l as i}from"./mermaid.core-CzqhAinL.js";var o=t((t,o,r,s)=>{t.attr("class",r);const{width:d,height:n,x:c,y:g}=a(t,o);e(t,n,d,s);const w=h(c,g,d,n,o);t.attr("viewBox",w),i.debug(`viewBox configured: ${w} with padding: ${o}`)},"setupViewPortForSVG"),a=t((t,e)=>{const i=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:i.width+2*e,height:i.height+2*e,x:i.x,y:i.y}},"calculateDimensionsWithPadding"),h=t((t,e,i,o,a)=>`${t-a} ${e-a} ${i} ${o}`,"createViewBox");export{o as s};
1
+ import{_ as t,e,l as i}from"./mermaid.core-LEKKQwXZ.js";var o=t((t,o,r,s)=>{t.attr("class",r);const{width:d,height:n,x:c,y:g}=a(t,o);e(t,n,d,s);const w=h(c,g,d,n,o);t.attr("viewBox",w),i.debug(`viewBox configured: ${w} with padding: ${o}`)},"setupViewPortForSVG"),a=t((t,e)=>{const i=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:i.width+2*e,height:i.height+2*e,x:i.x,y:i.y}},"calculateDimensionsWithPadding"),h=t((t,e,i,o,a)=>`${t-a} ${e-a} ${i} ${o}`,"createViewBox");export{o as s};